Skip to content

Commit

Permalink
add splunk events
Browse files Browse the repository at this point in the history
by anahita

--
This is an automated commit generated by anahita mansoori
using Plasmic (https://plasmic.app/).

Project name: ravi (r&r)
Project URL: https://studio.plasmic.app/projects/qQzsBf58SqzNJX45iggq96
  • Loading branch information
plasmicops committed Apr 7, 2024
1 parent 7bfed50 commit bc2c7e2
Show file tree
Hide file tree
Showing 4 changed files with 256 additions and 68 deletions.
204 changes: 167 additions & 37 deletions .plasmic/plasmic/ravi_r_r/PlasmicReviewCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ import RepliesIcon from "../fragment_icons/icons/PlasmicIcon__Replies"; // plasm
import HeartIcon from "../fragment_icons/icons/PlasmicIcon__Heart"; // plasmic-import: WTtCf_1I-uMv/icon
import BoldheartIcon from "../fragment_icons/icons/PlasmicIcon__Boldheart"; // plasmic-import: eZfYsLpdWQA_/icon

import __fn_splunkEvent from "@/common/services/plasmicSplunkEvent"; // plasmic-import: splunkEvent/customFunction

createPlasmicElementProxy;

export type PlasmicReviewCard__VariantMembers = {};
Expand Down Expand Up @@ -174,7 +176,9 @@ export interface DefaultReviewCardProps {
className?: string;
}

const $$ = {};
const $$ = {
splunkEvent: __fn_splunkEvent
};

function useNextRouter() {
try {
Expand Down Expand Up @@ -388,6 +392,34 @@ function PlasmicReviewCard__RenderFunc(props: {
) {
$steps["runCode"] = await $steps["runCode"];
}

$steps["splunk"] = true
? (() => {
const actionArgs = {
customFunction: async () => {
return $$.splunkEvent({
group: "feedback",
data: {
doctor_id,
comment_id
},
type: "share_comment",
token: "f4fd4b50-fe90-48f3-a1ab-5a5070140318"
});
}
};
return (({ customFunction }) => {
return customFunction();
})?.apply(null, [actionArgs]);
})()
: undefined;
if (
$steps["splunk"] != null &&
typeof $steps["splunk"] === "object" &&
typeof $steps["splunk"].then === "function"
) {
$steps["splunk"] = await $steps["splunk"];
}
}}
>
<ShareIcon
Expand Down Expand Up @@ -652,6 +684,36 @@ function PlasmicReviewCard__RenderFunc(props: {
) {
$steps["close"] = await $steps["close"];
}

$steps["splunk"] = true
? (() => {
const actionArgs = {
customFunction: async () => {
return $$.splunkEvent({
group: "feedback",
data: {
doctor_id,
comment_id,
edit_text: $state.edditTextBox.value
},
type: "edit_comment",
token:
"f4fd4b50-fe90-48f3-a1ab-5a5070140318"
});
}
};
return (({ customFunction }) => {
return customFunction();
})?.apply(null, [actionArgs]);
})()
: undefined;
if (
$steps["splunk"] != null &&
typeof $steps["splunk"] === "object" &&
typeof $steps["splunk"].then === "function"
) {
$steps["splunk"] = await $steps["splunk"];
}
}}
startIcon={
<ChevronRightIcon
Expand All @@ -675,46 +737,26 @@ function PlasmicReviewCard__RenderFunc(props: {
"\u0648\u06cc\u0631\u0627\u06cc\u0634 \u0646\u0638\u0631"
}
trigger={
(() => {
try {
return true;
} catch (e) {
if (
e instanceof TypeError ||
e?.plasmicType === "PlasmicUndefinedDataError"
) {
return true;
}
throw e;
}
})() ? (
<Stack__
as={"div"}
hasGap={true}
<Stack__
as={"div"}
hasGap={true}
className={classNames(projectcss.all, sty.freeBox__gt7U)}
>
<Icon3Icon
className={classNames(projectcss.all, sty.svg___8ZJpu)}
role={"img"}
/>

<div
className={classNames(
projectcss.all,
sty.freeBox__gt7U
projectcss.__wab_text,
sty.text__ttly5
)}
>
<Icon3Icon
className={classNames(
projectcss.all,
sty.svg___8ZJpu
)}
role={"img"}
/>

<div
className={classNames(
projectcss.all,
projectcss.__wab_text,
sty.text__ttly5
)}
>
{"\u0648\u06cc\u0631\u0627\u06cc\u0634"}
</div>
</Stack__>
) : null
{"\u0648\u06cc\u0631\u0627\u06cc\u0634"}
</div>
</Stack__>
}
/>
) : null}
Expand Down Expand Up @@ -950,6 +992,35 @@ function PlasmicReviewCard__RenderFunc(props: {
) {
$steps["close"] = await $steps["close"];
}

$steps["splunk"] = true
? (() => {
const actionArgs = {
customFunction: async () => {
return $$.splunkEvent({
group: "feedback",
data: {
doctor_id,
comment_id
},
type: "delete_comment",
token:
"f4fd4b50-fe90-48f3-a1ab-5a5070140318"
});
}
};
return (({ customFunction }) => {
return customFunction();
})?.apply(null, [actionArgs]);
})()
: undefined;
if (
$steps["splunk"] != null &&
typeof $steps["splunk"] === "object" &&
typeof $steps["splunk"].then === "function"
) {
$steps["splunk"] = await $steps["splunk"];
}
}}
startIcon={
<ChevronRightIcon
Expand Down Expand Up @@ -1749,6 +1820,35 @@ function PlasmicReviewCard__RenderFunc(props: {
) {
$steps["ifLogin"] = await $steps["ifLogin"];
}

$steps["splunk"] = $ctx.auth.isLogin
? (() => {
const actionArgs = {
customFunction: async () => {
return $$.splunkEvent({
group: "feedback",
data: {
doctor_id,
comment_id,
doc_center
},
type: "like_comment",
token: "f4fd4b50-fe90-48f3-a1ab-5a5070140318"
});
}
};
return (({ customFunction }) => {
return customFunction();
})?.apply(null, [actionArgs]);
})()
: undefined;
if (
$steps["splunk"] != null &&
typeof $steps["splunk"] === "object" &&
typeof $steps["splunk"].then === "function"
) {
$steps["splunk"] = await $steps["splunk"];
}
}}
>
{(() => {
Expand Down Expand Up @@ -2097,6 +2197,36 @@ function PlasmicReviewCard__RenderFunc(props: {
) {
$steps["login"] = await $steps["login"];
}

$steps["splunk"] =
$state.reportText.value.length >= 10 && $ctx.auth.isLogin
? (() => {
const actionArgs = {
customFunction: async () => {
return $$.splunkEvent({
group: "feedback",
data: {
doctor_id,
comment_id,
report_text: $state.reportText.value
},
type: "report_comment",
token: "f4fd4b50-fe90-48f3-a1ab-5a5070140318"
});
}
};
return (({ customFunction }) => {
return customFunction();
})?.apply(null, [actionArgs]);
})()
: undefined;
if (
$steps["splunk"] != null &&
typeof $steps["splunk"] === "object" &&
typeof $steps["splunk"].then === "function"
) {
$steps["splunk"] = await $steps["splunk"];
}
}}
startIcon={
<ChevronRightIcon
Expand Down
58 changes: 58 additions & 0 deletions .plasmic/plasmic/ravi_r_r/PlasmicReviewList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,35 @@ function PlasmicReviewList__RenderFunc(props: {
) {
$steps["runOnSort"] = await $steps["runOnSort"];
}

$steps["splunk"] = true
? (() => {
const actionArgs = {
customFunction: async () => {
return $$.splunkEvent({
group: "feedback",
data: {
doctor_id,
comment_id,
sort: $state.sortInput.value
},
type: "sort_comment",
token: "f4fd4b50-fe90-48f3-a1ab-5a5070140318"
});
}
};
return (({ customFunction }) => {
return customFunction();
})?.apply(null, [actionArgs]);
})()
: undefined;
if (
$steps["splunk"] != null &&
typeof $steps["splunk"] === "object" &&
typeof $steps["splunk"].then === "function"
) {
$steps["splunk"] = await $steps["splunk"];
}
}).apply(null, eventArgs);
}}
options={(() => {
Expand Down Expand Up @@ -489,6 +518,35 @@ function PlasmicReviewList__RenderFunc(props: {
) {
$steps["runOnSearch"] = await $steps["runOnSearch"];
}

$steps["splunk"] = true
? (() => {
const actionArgs = {
customFunction: async () => {
return $$.splunkEvent({
group: "feedback",
data: {
doctor_id,
comment_id,
search_text: $state.searchInput.value
},
type: "search_in_comment",
token: "f4fd4b50-fe90-48f3-a1ab-5a5070140318"
});
}
};
return (({ customFunction }) => {
return customFunction();
})?.apply(null, [actionArgs]);
})()
: undefined;
if (
$steps["splunk"] != null &&
typeof $steps["splunk"] === "object" &&
typeof $steps["splunk"].then === "function"
) {
$steps["splunk"] = await $steps["splunk"];
}
}).apply(null, eventArgs);
}}
placeholder={
Expand Down
6 changes: 3 additions & 3 deletions plasmic.json
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,8 @@
"name": "splunkEvent",
"namespace": null
}
]
],
"jsBundleThemes": []
},
{
"projectId": "YUiM7yqBWAqsh8KSnrdj7",
Expand Down Expand Up @@ -908,8 +909,7 @@
"name": "splunkEvent",
"namespace": null
}
],
"jsBundleThemes": []
]
},
{
"projectId": "9Vr5YWkf3w7jj6SsTcCEta",
Expand Down
Loading

0 comments on commit bc2c7e2

Please sign in to comment.