@bikdotai/bik-component-library 0.0.863-beta.6 → 0.0.863
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/agent-builder/AgentBuilder.js +1 -1
- package/dist/cjs/components/agent-builder/AgentBuilder.js.map +1 -1
- package/dist/cjs/components/agent-builder/AgentBuilder.styled.js +42 -174
- package/dist/cjs/components/agent-builder/AgentBuilder.styled.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/MentionPicker.js +1 -1
- package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js +3 -3
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/cjs/components/agent-builder/constants/steps.js +1 -1
- package/dist/cjs/components/agent-builder/constants/steps.js.map +1 -1
- package/dist/cjs/components/agent-builder/constants/tools.js +1 -1
- package/dist/cjs/components/agent-builder/constants/tools.js.map +1 -1
- package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js +1 -1
- package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
- package/dist/cjs/components/agent-builder/steps/Step1About.js +1 -1
- package/dist/cjs/components/agent-builder/steps/Step1About.js.map +1 -1
- package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js +2 -2
- package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js.map +1 -1
- package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js +1 -1
- package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js.map +1 -1
- package/dist/cjs/components/agent-builder/utils/sourceIcons.js.map +1 -1
- package/dist/cjs/components/agent-listing/AgentTableRow.js +1 -1
- package/dist/cjs/components/agent-listing/AgentTableRow.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.js +99 -105
- package/dist/esm/components/agent-builder/AgentBuilder.js.map +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.model.d.ts +0 -76
- package/dist/esm/components/agent-builder/AgentBuilder.styled.d.ts +0 -91
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js +93 -271
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionPicker.js +27 -27
- package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/esm/components/agent-builder/components/SelectableListSection.js +42 -34
- package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/esm/components/agent-builder/constants/steps.d.ts +1 -31
- package/dist/esm/components/agent-builder/constants/steps.js +6 -15
- package/dist/esm/components/agent-builder/constants/steps.js.map +1 -1
- package/dist/esm/components/agent-builder/constants/tools.d.ts +6 -5
- package/dist/esm/components/agent-builder/constants/tools.js +24 -21
- package/dist/esm/components/agent-builder/constants/tools.js.map +1 -1
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.d.ts +1 -13
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js +175 -192
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
- package/dist/esm/components/agent-builder/index.d.ts +2 -7
- package/dist/esm/components/agent-builder/steps/Step1About.js +13 -15
- package/dist/esm/components/agent-builder/steps/Step1About.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js +49 -54
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.d.ts +0 -11
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js +23 -127
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js.map +1 -1
- package/dist/esm/components/agent-builder/utils/sourceIcons.d.ts +4 -0
- package/dist/esm/components/agent-builder/utils/sourceIcons.js.map +1 -1
- package/dist/esm/components/agent-listing/AgentTableRow.js +38 -71
- package/dist/esm/components/agent-listing/AgentTableRow.js.map +1 -1
- package/dist/esm/index.js +634 -644
- package/dist/esm/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/cjs/components/agent-builder/components/AgentStateModal.js +0 -2
- package/dist/cjs/components/agent-builder/components/AgentStateModal.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/ChannelSelectModal.js +0 -2
- package/dist/cjs/components/agent-builder/components/ChannelSelectModal.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/ChannelsSection.js +0 -2
- package/dist/cjs/components/agent-builder/components/ChannelsSection.js.map +0 -1
- package/dist/cjs/components/agent-builder/constants/channels.js +0 -2
- package/dist/cjs/components/agent-builder/constants/channels.js.map +0 -1
- package/dist/esm/components/agent-builder/components/AgentStateModal.d.ts +0 -47
- package/dist/esm/components/agent-builder/components/AgentStateModal.js +0 -82
- package/dist/esm/components/agent-builder/components/AgentStateModal.js.map +0 -1
- package/dist/esm/components/agent-builder/components/ChannelSelectModal.d.ts +0 -26
- package/dist/esm/components/agent-builder/components/ChannelSelectModal.js +0 -121
- package/dist/esm/components/agent-builder/components/ChannelSelectModal.js.map +0 -1
- package/dist/esm/components/agent-builder/components/ChannelsSection.d.ts +0 -10
- package/dist/esm/components/agent-builder/components/ChannelsSection.js +0 -183
- package/dist/esm/components/agent-builder/components/ChannelsSection.js.map +0 -1
- package/dist/esm/components/agent-builder/constants/channels.d.ts +0 -56
- package/dist/esm/components/agent-builder/constants/channels.js +0 -41
- package/dist/esm/components/agent-builder/constants/channels.js.map +0 -1
|
@@ -1,132 +1,28 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
{
|
|
24
|
-
"data-test": "handover-method-default",
|
|
25
|
-
type: "button",
|
|
26
|
-
selected: !r,
|
|
27
|
-
onClick: () => i({ handover: { ...n, method: h } }),
|
|
28
|
-
children: [
|
|
29
|
-
/* @__PURE__ */ e(
|
|
30
|
-
m,
|
|
31
|
-
{
|
|
32
|
-
isActive: !r,
|
|
33
|
-
onValueChange: () => i({ handover: { ...n, method: h } }),
|
|
34
|
-
skipSelectingOff: !0,
|
|
35
|
-
activeColor: v.brand[800]
|
|
36
|
-
}
|
|
37
|
-
),
|
|
38
|
-
/* @__PURE__ */ t(g, { children: [
|
|
39
|
-
/* @__PURE__ */ e(c, { color: a.content.primary, children: "Use default settings" }),
|
|
40
|
-
/* @__PURE__ */ t(p, { color: a.content.secondary, children: [
|
|
41
|
-
"As defined in",
|
|
42
|
-
" ",
|
|
43
|
-
o ? /* @__PURE__ */ t(
|
|
44
|
-
H,
|
|
45
|
-
{
|
|
46
|
-
"data-test": "handover-smart-agent-link",
|
|
47
|
-
type: "button",
|
|
48
|
-
onClick: (k) => {
|
|
49
|
-
k.stopPropagation(), o();
|
|
50
|
-
},
|
|
51
|
-
style: { display: "inline-flex" },
|
|
52
|
-
children: [
|
|
53
|
-
"Smart agent handover",
|
|
54
|
-
/* @__PURE__ */ e(x, { width: 12, height: 12 })
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
) : "Smart agent handover"
|
|
58
|
-
] })
|
|
59
|
-
] })
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
),
|
|
63
|
-
/* @__PURE__ */ e(
|
|
64
|
-
R,
|
|
65
|
-
{
|
|
66
|
-
body: "Custom handover rules are coming soon. For now this agent follows your smart agent handover settings.",
|
|
67
|
-
placement: "top",
|
|
68
|
-
children: /* @__PURE__ */ e(
|
|
69
|
-
"span",
|
|
70
|
-
{
|
|
71
|
-
style: {
|
|
72
|
-
flex: 1,
|
|
73
|
-
display: "flex",
|
|
74
|
-
cursor: "not-allowed"
|
|
75
|
-
},
|
|
76
|
-
children: /* @__PURE__ */ t(
|
|
77
|
-
f,
|
|
78
|
-
{
|
|
79
|
-
"data-test": "handover-method-custom",
|
|
80
|
-
type: "button",
|
|
81
|
-
disabled: !0,
|
|
82
|
-
selected: r,
|
|
83
|
-
children: [
|
|
84
|
-
/* @__PURE__ */ e(
|
|
85
|
-
m,
|
|
86
|
-
{
|
|
87
|
-
isActive: r,
|
|
88
|
-
isDisabled: !0,
|
|
89
|
-
onValueChange: () => {
|
|
90
|
-
},
|
|
91
|
-
skipSelectingOff: !0,
|
|
92
|
-
activeColor: v.brand[800]
|
|
93
|
-
}
|
|
94
|
-
),
|
|
95
|
-
/* @__PURE__ */ t(g, { children: [
|
|
96
|
-
/* @__PURE__ */ e(c, { color: a.content.inactive, children: "Custom instructions" }),
|
|
97
|
-
/* @__PURE__ */ e(p, { color: a.content.inactive, children: "Write custom handover rules for this agent." })
|
|
98
|
-
] })
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
)
|
|
102
|
-
}
|
|
103
|
-
)
|
|
104
|
-
}
|
|
105
|
-
)
|
|
106
|
-
] })
|
|
107
|
-
] }),
|
|
108
|
-
r && /* @__PURE__ */ e(y, {})
|
|
109
|
-
] })
|
|
110
|
-
] }) : /* @__PURE__ */ t("div", { className: "bik-agent-step bik-agent-step--handover", children: [
|
|
111
|
-
/* @__PURE__ */ e(C, { title: d.title, helper: d.helper }),
|
|
112
|
-
/* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(y, {}) })
|
|
1
|
+
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { SectionBodyWrap as s } from "../AgentBuilder.styled.js";
|
|
3
|
+
import { AiTextArea as d } from "../components/AiTextArea.js";
|
|
4
|
+
import { StepSectionHeader as m } from "../components/StepSectionHeader.js";
|
|
5
|
+
import { STEP_DEFINITIONS as p } from "../constants/steps.js";
|
|
6
|
+
import { useAgentBuilderContext as l } from "../context/AgentBuilderContext.js";
|
|
7
|
+
const t = p[3], S = () => {
|
|
8
|
+
const { value: o, patch: n, charLimits: a } = l(), { handover: r } = o;
|
|
9
|
+
return /* @__PURE__ */ h("div", { className: "bik-agent-step bik-agent-step--handover", children: [
|
|
10
|
+
/* @__PURE__ */ e(m, { title: t.title, helper: t.helper }),
|
|
11
|
+
/* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(
|
|
12
|
+
d,
|
|
13
|
+
{
|
|
14
|
+
"data-test": "handover-when",
|
|
15
|
+
label: "Handover when",
|
|
16
|
+
value: r.when,
|
|
17
|
+
onChange: (i) => n({ handover: { ...r, when: i } }),
|
|
18
|
+
maxLength: a.handoverWhen,
|
|
19
|
+
placeholder: "e.g. Hand over if the customer is angry or asks for a human three times. Hand over if the order value exceeds ₹5,000.",
|
|
20
|
+
minHeight: "120px"
|
|
21
|
+
}
|
|
22
|
+
) })
|
|
113
23
|
] });
|
|
114
|
-
}, y = () => {
|
|
115
|
-
const { value: l, patch: i, charLimits: s } = S(), { handover: o } = l;
|
|
116
|
-
return /* @__PURE__ */ e(
|
|
117
|
-
A,
|
|
118
|
-
{
|
|
119
|
-
"data-test": "handover-when",
|
|
120
|
-
label: "Handover when",
|
|
121
|
-
value: o.when,
|
|
122
|
-
onChange: (n) => i({ handover: { ...o, when: n } }),
|
|
123
|
-
maxLength: s.handoverWhen,
|
|
124
|
-
placeholder: "e.g. Hand over if the customer is angry or asks for a human three times. Hand over if the order value exceeds ₹5,000.",
|
|
125
|
-
minHeight: "120px"
|
|
126
|
-
}
|
|
127
|
-
);
|
|
128
24
|
};
|
|
129
25
|
export {
|
|
130
|
-
|
|
26
|
+
S as Step4HandoverRules
|
|
131
27
|
};
|
|
132
28
|
//# sourceMappingURL=Step4HandoverRules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Step4HandoverRules.js","sources":["../../../../../src/components/agent-builder/steps/Step4HandoverRules.tsx"],"sourcesContent":["import RedirectIcon from '@src/assets/icons/RedirectToNew.svg';\nimport React from 'react';\nimport { RadioButton } from '@src/components/radioButton/RadioButton';\nimport { Tooltip } from '@src/components/tooltips';\nimport { BodyCaption, TitleSmall } from '@src/components/TypographyStyle';\nimport { BASE_COLORS, COLORS } from '@src/constants/Theme';\nimport type { HandoverMethod } from '../AgentBuilder.model';\nimport {\n\tCardRow,\n\tChannelsLink,\n\tFieldBlock,\n\tRadioCard,\n\tRadioCardText,\n\tSectionBodyWrap,\n} from '../AgentBuilder.styled';\nimport { AiTextArea } from '../components/AiTextArea';\nimport { StepSectionHeader } from '../components/StepSectionHeader';\nimport { STEP_DEFINITIONS } from '../constants/steps';\nimport { useAgentBuilderContext } from '../context/AgentBuilderContext';\nimport { appTypeLabel } from '../utils/mentionSerialization';\n\nconst STEP = STEP_DEFINITIONS[3];\n\n/**\n * The stored `handover.method` that means \"inherit the store's smart-agent\n * handover settings\" — the BIK default, and the only method selectable today.\n */\nconst DEFAULT_METHOD: HandoverMethod = 'default';\n\n/**\n * Step 4.\n *\n * **Manifest** (and any other host) keeps the original single free-text field:\n * the method is implicit and the consumer always sends the seeded `'default'`.\n *\n * **BIK** picks a handover *method* first. \"Use default settings\" is selected by\n * default and links out to where those defaults live; \"Custom instructions\" is\n * deliberately disabled until that flow is built, so the free-text field only\n * appears for an agent already saved with a non-default method.\n */\nexport const Step4HandoverRules: React.FC = () => {\n\tconst { value, patch, applicationType, onSmartAgentHandover } =\n\t\tuseAgentBuilderContext();\n\tconst { handover } = value;\n\n\tconst isBik = appTypeLabel(applicationType) === 'BIK';\n\t// Anything other than the default method means the merchant is on custom\n\t// instructions, so the free-text field is what they need to see.\n\tconst usesCustom = handover.method !== DEFAULT_METHOD;\n\n\tif (!isBik) {\n\t\treturn (\n\t\t\t<div className=\"bik-agent-step bik-agent-step--handover\">\n\t\t\t\t<StepSectionHeader title={STEP.title} helper={STEP.helper} />\n\t\t\t\t<SectionBodyWrap>\n\t\t\t\t\t<HandoverWhenField />\n\t\t\t\t</SectionBodyWrap>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"bik-agent-step bik-agent-step--handover\">\n\t\t\t<StepSectionHeader title={STEP.title} helper={STEP.helper} />\n\n\t\t\t<SectionBodyWrap>\n\t\t\t\t<FieldBlock>\n\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\tHandover method\n\t\t\t\t\t</TitleSmall>\n\n\t\t\t\t\t<CardRow>\n\t\t\t\t\t\t<RadioCard\n\t\t\t\t\t\t\tdata-test=\"handover-method-default\"\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tselected={!usesCustom}\n\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\tpatch({ handover: { ...handover, method: DEFAULT_METHOD } })\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<RadioButton\n\t\t\t\t\t\t\t\tisActive={!usesCustom}\n\t\t\t\t\t\t\t\tonValueChange={() =>\n\t\t\t\t\t\t\t\t\tpatch({ handover: { ...handover, method: DEFAULT_METHOD } })\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tskipSelectingOff\n\t\t\t\t\t\t\t\tactiveColor={BASE_COLORS.brand['800']}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<RadioCardText>\n\t\t\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\t\tUse default settings\n\t\t\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t\t\tAs defined in{' '}\n\t\t\t\t\t\t\t\t\t{onSmartAgentHandover ? (\n\t\t\t\t\t\t\t\t\t\t<ChannelsLink\n\t\t\t\t\t\t\t\t\t\t\tdata-test=\"handover-smart-agent-link\"\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t// The link sits inside the card's own click target, so\n\t\t\t\t\t\t\t\t\t\t\t// stop the click bubbling up and re-selecting the card.\n\t\t\t\t\t\t\t\t\t\t\tonClick={(event) => {\n\t\t\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\t\tonSmartAgentHandover();\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\tstyle={{ display: 'inline-flex' }}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\tSmart agent handover\n\t\t\t\t\t\t\t\t\t\t\t<RedirectIcon width={12} height={12} />\n\t\t\t\t\t\t\t\t\t\t</ChannelsLink>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t'Smart agent handover'\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t\t</RadioCardText>\n\t\t\t\t\t\t</RadioCard>\n\n\t\t\t\t\t\t{/* Custom handover rules aren't built yet — the card is shown so the\n\t\t\t\t\t\t merchant knows it's coming, but it can't be selected. */}\n\t\t\t\t\t\t<Tooltip\n\t\t\t\t\t\t\tbody=\"Custom handover rules are coming soon. For now this agent follows your smart agent handover settings.\"\n\t\t\t\t\t\t\tplacement=\"top\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{/* A disabled <button> fires no mouse events, so the tooltip would\n\t\t\t\t\t\t\t never open on the card itself — the span is the hover target\n\t\t\t\t\t\t\t (same wrapper IconButton uses for its disabled tooltip). It also\n\t\t\t\t\t\t\t has to carry the card's `flex: 1`, since it is now the flex item. */}\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tflex: 1,\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\tcursor: 'not-allowed',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<RadioCard\n\t\t\t\t\t\t\t\t\tdata-test=\"handover-method-custom\"\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\tselected={usesCustom}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<RadioButton\n\t\t\t\t\t\t\t\t\t\tisActive={usesCustom}\n\t\t\t\t\t\t\t\t\t\tisDisabled\n\t\t\t\t\t\t\t\t\t\tonValueChange={() => undefined}\n\t\t\t\t\t\t\t\t\t\tskipSelectingOff\n\t\t\t\t\t\t\t\t\t\tactiveColor={BASE_COLORS.brand['800']}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<RadioCardText>\n\t\t\t\t\t\t\t\t\t\t<TitleSmall color={COLORS.content.inactive}>\n\t\t\t\t\t\t\t\t\t\t\tCustom instructions\n\t\t\t\t\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.inactive}>\n\t\t\t\t\t\t\t\t\t\t\tWrite custom handover rules for this agent.\n\t\t\t\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t\t\t\t</RadioCardText>\n\t\t\t\t\t\t\t\t</RadioCard>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t</CardRow>\n\t\t\t\t</FieldBlock>\n\n\t\t\t\t{usesCustom && <HandoverWhenField />}\n\t\t\t</SectionBodyWrap>\n\t\t</div>\n\t);\n};\n\n/** The free-text \"Handover when\" field, shared by both layouts. */\nconst HandoverWhenField: React.FC = () => {\n\tconst { value, patch, charLimits } = useAgentBuilderContext();\n\tconst { handover } = value;\n\n\treturn (\n\t\t<AiTextArea\n\t\t\tdata-test=\"handover-when\"\n\t\t\tlabel=\"Handover when\"\n\t\t\tvalue={handover.when}\n\t\t\tonChange={(text) => patch({ handover: { ...handover, when: text } })}\n\t\t\tmaxLength={charLimits.handoverWhen}\n\t\t\tplaceholder=\"e.g. Hand over if the customer is angry or asks for a human three times. Hand over if the order value exceeds ₹5,000.\"\n\t\t\tminHeight=\"120px\"\n\t\t/>\n\t);\n};\n"],"names":["STEP","STEP_DEFINITIONS","DEFAULT_METHOD","Step4HandoverRules","value","patch","applicationType","onSmartAgentHandover","useAgentBuilderContext","handover","isBik","appTypeLabel","usesCustom","jsxs","jsx","StepSectionHeader","SectionBodyWrap","FieldBlock","TitleSmall","COLORS","CardRow","RadioCard","RadioButton","BASE_COLORS","RadioCardText","BodyCaption","ChannelsLink","event","RedirectIcon","Tooltip","HandoverWhenField","charLimits","AiTextArea","text"],"mappings":";;;;;;;;;;;;AAqBA,MAAMA,IAAOC,EAAiB,CAAC,GAMzBC,IAAiC,WAa1BC,IAA+B,MAAM;AACjD,QAAM,EAAE,OAAAC,GAAO,OAAAC,GAAO,iBAAAC,GAAiB,sBAAAC,EAAA,IACtCC,EAAA,GACK,EAAE,UAAAC,MAAaL,GAEfM,IAAQC,EAAaL,CAAe,MAAM,OAG1CM,IAAaH,EAAS,WAAWP;AAEvC,SAAKQ,IAYJ,gBAAAG,EAAC,OAAA,EAAI,WAAU,2CACd,UAAA;AAAA,IAAA,gBAAAC,EAACC,KAAkB,OAAOf,EAAK,OAAO,QAAQA,EAAK,QAAQ;AAAA,sBAE1DgB,GAAA,EACA,UAAA;AAAA,MAAA,gBAAAH,EAACI,GAAA,EACA,UAAA;AAAA,QAAA,gBAAAH,EAACI,GAAA,EAAW,OAAOC,EAAO,QAAQ,SAAS,UAAA,mBAE3C;AAAA,0BAECC,GAAA,EACA,UAAA;AAAA,UAAA,gBAAAP;AAAA,YAACQ;AAAA,YAAA;AAAA,cACA,aAAU;AAAA,cACV,MAAK;AAAA,cACL,UAAU,CAACT;AAAA,cACX,SAAS,MACRP,EAAM,EAAE,UAAU,EAAE,GAAGI,GAAU,QAAQP,EAAA,GAAkB;AAAA,cAG5D,UAAA;AAAA,gBAAA,gBAAAY;AAAA,kBAACQ;AAAA,kBAAA;AAAA,oBACA,UAAU,CAACV;AAAA,oBACX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+
{"version":3,"file":"Step4HandoverRules.js","sources":["../../../../../src/components/agent-builder/steps/Step4HandoverRules.tsx"],"sourcesContent":["import React from 'react';\nimport { SectionBodyWrap } from '../AgentBuilder.styled';\nimport { AiTextArea } from '../components/AiTextArea';\nimport { StepSectionHeader } from '../components/StepSectionHeader';\nimport { STEP_DEFINITIONS } from '../constants/steps';\nimport { useAgentBuilderContext } from '../context/AgentBuilderContext';\n\nconst STEP = STEP_DEFINITIONS[3];\n\n// The \"Handover method\" radio section was removed: the method is UI-only and the\n// consumer always sends the seeded default ('default'); handover.method stays on\n// the value shape untouched.\nexport const Step4HandoverRules: React.FC = () => {\n\tconst { value, patch, charLimits } = useAgentBuilderContext();\n\tconst { handover } = value;\n\n\treturn (\n\t\t<div className=\"bik-agent-step bik-agent-step--handover\">\n\t\t\t<StepSectionHeader title={STEP.title} helper={STEP.helper} />\n\n\t\t\t<SectionBodyWrap>\n\t\t\t\t<AiTextArea\n\t\t\t\t\tdata-test=\"handover-when\"\n\t\t\t\t\tlabel=\"Handover when\"\n\t\t\t\t\tvalue={handover.when}\n\t\t\t\t\tonChange={(text) => patch({ handover: { ...handover, when: text } })}\n\t\t\t\t\tmaxLength={charLimits.handoverWhen}\n\t\t\t\t\tplaceholder=\"e.g. Hand over if the customer is angry or asks for a human three times. Hand over if the order value exceeds ₹5,000.\"\n\t\t\t\t\tminHeight=\"120px\"\n\t\t\t\t/>\n\t\t\t</SectionBodyWrap>\n\t\t</div>\n\t);\n};\n"],"names":["STEP","STEP_DEFINITIONS","Step4HandoverRules","value","patch","charLimits","useAgentBuilderContext","handover","jsxs","jsx","StepSectionHeader","SectionBodyWrap","AiTextArea","text"],"mappings":";;;;;;AAOA,MAAMA,IAAOC,EAAiB,CAAC,GAKlBC,IAA+B,MAAM;AACjD,QAAM,EAAE,OAAAC,GAAO,OAAAC,GAAO,YAAAC,EAAA,IAAeC,EAAA,GAC/B,EAAE,UAAAC,MAAaJ;AAErB,SACC,gBAAAK,EAAC,OAAA,EAAI,WAAU,2CACd,UAAA;AAAA,IAAA,gBAAAC,EAACC,KAAkB,OAAOV,EAAK,OAAO,QAAQA,EAAK,QAAQ;AAAA,sBAE1DW,GAAA,EACA,UAAA,gBAAAF;AAAA,MAACG;AAAA,MAAA;AAAA,QACA,aAAU;AAAA,QACV,OAAM;AAAA,QACN,OAAOL,EAAS;AAAA,QAChB,UAAU,CAACM,MAAST,EAAM,EAAE,UAAU,EAAE,GAAGG,GAAU,MAAMM,EAAA,GAAQ;AAAA,QACnE,WAAWR,EAAW;AAAA,QACtB,aAAY;AAAA,QACZ,WAAU;AAAA,MAAA;AAAA,IAAA,EACX,CACD;AAAA,EAAA,GACD;AAEF;"}
|
|
@@ -6,6 +6,10 @@ export type { IconComp, SourceIcon };
|
|
|
6
6
|
* buttons. Partial: not every source has a glyph, and the render path
|
|
7
7
|
* null-guards. Look up with {@link sourceIcon} when the key is a dynamic /
|
|
8
8
|
* unknown string rather than a {@link ToolSource}.
|
|
9
|
+
*
|
|
10
|
+
* `Aftership` is deliberately absent — we have no AfterShip brand asset yet, so
|
|
11
|
+
* it resolves to {@link GENERIC_SOURCE_ICON}. Drop `AfterShip.svg` into
|
|
12
|
+
* `@src/assets/icons` (same as ShipStation) and add its entry here to fix that.
|
|
9
13
|
*/
|
|
10
14
|
export declare const SOURCE_ICONS: Partial<Record<ToolSource, SourceIcon>>;
|
|
11
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceIcons.js","sources":["../../../../../src/components/agent-builder/utils/sourceIcons.ts"],"sourcesContent":["import BigCommerce from '@src/assets/icons/BigCommerce.svg';\nimport Gorgias from '@src/assets/icons/Gorgias.svg';\nimport ManifestGlass from '@src/assets/icons/ManifestGlass.svg';\nimport ShipStation from '@src/assets/icons/ShipStation.svg';\nimport Shopify from '@src/assets/icons/Shopify.svg';\nimport Skio from '@src/assets/icons/Skio.svg';\nimport {\n\tEmail,\n\tLinkSimpleHorizontal,\n\tPuzzlePiece,\n\tSlackIcon,\n\tWebhook,\n} from '@src/icons';\nimport React from 'react';\nimport { ToolSource } from '../constants/tools';\nimport type { IconComp, SourceIcon } from '../constants/tools';\n\n// The icon types live with the source enum (constants/tools) to keep the\n// dependency one-directional (util → constants); re-exported here so existing\n// `from '../utils/sourceIcons'` importers keep resolving them.\nexport type { IconComp, SourceIcon };\n\n/**\n * Per-source brand glyph — shared by the `@` picker and the Tools source\n * buttons. Partial: not every source has a glyph, and the render path\n * null-guards. Look up with {@link sourceIcon} when the key is a dynamic /\n * unknown string rather than a {@link ToolSource}.\n */\nexport const SOURCE_ICONS: Partial<Record<ToolSource, SourceIcon>> = {\n\t[ToolSource.Manifest]: { Icon: ManifestGlass, w: 24, h: 24 },\n\t[ToolSource.Shopify]: { Icon: Shopify, w: 21, h: 24 },\n\t[ToolSource.Bigcommerce]: { Icon: BigCommerce, w: 20, h: 20 },\n\t[ToolSource.Shipstation]: { Icon: ShipStation, w: 22, h: 21 },\n\t[ToolSource.Skio]: { Icon: Skio, w: 20, h: 20 },\n\t[ToolSource.Gorgias]: { Icon: Gorgias, w: 20, h: 20 },\n\t[ToolSource.Integration]: { Icon: PuzzlePiece as IconComp, w: 20, h: 20 },\n\t[ToolSource.RestApi]: { Icon: Webhook as IconComp, w: 20, h: 20 },\n\t[ToolSource.EmailHandover]: { Icon: Email as IconComp, w: 20, h: 20 },\n\t[ToolSource.Slack]: { Icon: SlackIcon as IconComp, w: 20, h: 20 },\n};\n\n/**\n * Generic glyph for a tool whose source has no dedicated brand icon (any custom\n * / future integration the FE doesn't bundle a logo for). Ensures EVERY tool\n * chip still leads with an icon.\n */\nexport const GENERIC_SOURCE_ICON: SourceIcon = {\n\tIcon: LinkSimpleHorizontal as IconComp,\n\tw: 20,\n\th: 20,\n};\n\n/**\n * Lenient icon lookup for a source that may be a raw/dynamic string (a\n * bik-models tool source, an integration key, or the picker's `'other'`\n * fallback). A known source returns its brand glyph; any other NON-EMPTY source\n * falls back to {@link GENERIC_SOURCE_ICON} so no tool renders iconless. An\n * empty/undefined source (e.g. a sub-agent reference) returns `undefined`.\n */\nexport const sourceIcon = (\n\tsource: string | undefined,\n): SourceIcon | undefined =>\n\tsource\n\t\t? SOURCE_ICONS[source as ToolSource] ?? GENERIC_SOURCE_ICON\n\t\t: undefined;\n\n/**\n * Render a {@link SourceIcon} at its own aspect ratio. `sizeDelta` nudges both\n * dimensions (e.g. `-4` for the smaller source-button glyph). Returns `null` when\n * no icon is supplied, so callers can drop their own `icon &&` guard.\n */\nexport const renderSourceIcon = (\n\ticon: SourceIcon | undefined,\n\tsizeDelta = 0,\n): React.ReactElement | null =>\n\ticon\n\t\t? React.createElement(icon.Icon, {\n\t\t\t\twidth: icon.w + sizeDelta,\n\t\t\t\theight: icon.h + sizeDelta,\n\t\t })\n\t\t: null;\n"],"names":["SOURCE_ICONS","ToolSource","ManifestGlass","Shopify","BigCommerce","ShipStation","Skio","Gorgias","PuzzlePiece","Webhook","Email","SlackIcon","GENERIC_SOURCE_ICON","LinkSimpleHorizontal","sourceIcon","source","renderSourceIcon","icon","sizeDelta","React"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"sourceIcons.js","sources":["../../../../../src/components/agent-builder/utils/sourceIcons.ts"],"sourcesContent":["import BigCommerce from '@src/assets/icons/BigCommerce.svg';\nimport Gorgias from '@src/assets/icons/Gorgias.svg';\nimport ManifestGlass from '@src/assets/icons/ManifestGlass.svg';\nimport ShipStation from '@src/assets/icons/ShipStation.svg';\nimport Shopify from '@src/assets/icons/Shopify.svg';\nimport Skio from '@src/assets/icons/Skio.svg';\nimport {\n\tEmail,\n\tLinkSimpleHorizontal,\n\tPuzzlePiece,\n\tSlackIcon,\n\tWebhook,\n} from '@src/icons';\nimport React from 'react';\nimport { ToolSource } from '../constants/tools';\nimport type { IconComp, SourceIcon } from '../constants/tools';\n\n// The icon types live with the source enum (constants/tools) to keep the\n// dependency one-directional (util → constants); re-exported here so existing\n// `from '../utils/sourceIcons'` importers keep resolving them.\nexport type { IconComp, SourceIcon };\n\n/**\n * Per-source brand glyph — shared by the `@` picker and the Tools source\n * buttons. Partial: not every source has a glyph, and the render path\n * null-guards. Look up with {@link sourceIcon} when the key is a dynamic /\n * unknown string rather than a {@link ToolSource}.\n *\n * `Aftership` is deliberately absent — we have no AfterShip brand asset yet, so\n * it resolves to {@link GENERIC_SOURCE_ICON}. Drop `AfterShip.svg` into\n * `@src/assets/icons` (same as ShipStation) and add its entry here to fix that.\n */\nexport const SOURCE_ICONS: Partial<Record<ToolSource, SourceIcon>> = {\n\t[ToolSource.Manifest]: { Icon: ManifestGlass, w: 24, h: 24 },\n\t[ToolSource.Shopify]: { Icon: Shopify, w: 21, h: 24 },\n\t[ToolSource.Bigcommerce]: { Icon: BigCommerce, w: 20, h: 20 },\n\t[ToolSource.Shipstation]: { Icon: ShipStation, w: 22, h: 21 },\n\t[ToolSource.Skio]: { Icon: Skio, w: 20, h: 20 },\n\t[ToolSource.Gorgias]: { Icon: Gorgias, w: 20, h: 20 },\n\t[ToolSource.Integration]: { Icon: PuzzlePiece as IconComp, w: 20, h: 20 },\n\t[ToolSource.RestApi]: { Icon: Webhook as IconComp, w: 20, h: 20 },\n\t[ToolSource.EmailHandover]: { Icon: Email as IconComp, w: 20, h: 20 },\n\t[ToolSource.Slack]: { Icon: SlackIcon as IconComp, w: 20, h: 20 },\n};\n\n/**\n * Generic glyph for a tool whose source has no dedicated brand icon (any custom\n * / future integration the FE doesn't bundle a logo for). Ensures EVERY tool\n * chip still leads with an icon.\n */\nexport const GENERIC_SOURCE_ICON: SourceIcon = {\n\tIcon: LinkSimpleHorizontal as IconComp,\n\tw: 20,\n\th: 20,\n};\n\n/**\n * Lenient icon lookup for a source that may be a raw/dynamic string (a\n * bik-models tool source, an integration key, or the picker's `'other'`\n * fallback). A known source returns its brand glyph; any other NON-EMPTY source\n * falls back to {@link GENERIC_SOURCE_ICON} so no tool renders iconless. An\n * empty/undefined source (e.g. a sub-agent reference) returns `undefined`.\n */\nexport const sourceIcon = (\n\tsource: string | undefined,\n): SourceIcon | undefined =>\n\tsource\n\t\t? SOURCE_ICONS[source as ToolSource] ?? GENERIC_SOURCE_ICON\n\t\t: undefined;\n\n/**\n * Render a {@link SourceIcon} at its own aspect ratio. `sizeDelta` nudges both\n * dimensions (e.g. `-4` for the smaller source-button glyph). Returns `null` when\n * no icon is supplied, so callers can drop their own `icon &&` guard.\n */\nexport const renderSourceIcon = (\n\ticon: SourceIcon | undefined,\n\tsizeDelta = 0,\n): React.ReactElement | null =>\n\ticon\n\t\t? React.createElement(icon.Icon, {\n\t\t\t\twidth: icon.w + sizeDelta,\n\t\t\t\theight: icon.h + sizeDelta,\n\t\t })\n\t\t: null;\n"],"names":["SOURCE_ICONS","ToolSource","ManifestGlass","Shopify","BigCommerce","ShipStation","Skio","Gorgias","PuzzlePiece","Webhook","Email","SlackIcon","GENERIC_SOURCE_ICON","LinkSimpleHorizontal","sourceIcon","source","renderSourceIcon","icon","sizeDelta","React"],"mappings":";;;;;;;;;;;;;AAgCO,MAAMA,IAAwD;AAAA,EACpE,CAACC,EAAW,QAAQ,GAAG,EAAE,MAAMC,GAAe,GAAG,IAAI,GAAG,GAAA;AAAA,EACxD,CAACD,EAAW,OAAO,GAAG,EAAE,MAAME,GAAS,GAAG,IAAI,GAAG,GAAA;AAAA,EACjD,CAACF,EAAW,WAAW,GAAG,EAAE,MAAMG,GAAa,GAAG,IAAI,GAAG,GAAA;AAAA,EACzD,CAACH,EAAW,WAAW,GAAG,EAAE,MAAMI,GAAa,GAAG,IAAI,GAAG,GAAA;AAAA,EACzD,CAACJ,EAAW,IAAI,GAAG,EAAE,MAAMK,GAAM,GAAG,IAAI,GAAG,GAAA;AAAA,EAC3C,CAACL,EAAW,OAAO,GAAG,EAAE,MAAMM,GAAS,GAAG,IAAI,GAAG,GAAA;AAAA,EACjD,CAACN,EAAW,WAAW,GAAG,EAAE,MAAMO,GAAyB,GAAG,IAAI,GAAG,GAAA;AAAA,EACrE,CAACP,EAAW,OAAO,GAAG,EAAE,MAAMQ,GAAqB,GAAG,IAAI,GAAG,GAAA;AAAA,EAC7D,CAACR,EAAW,aAAa,GAAG,EAAE,MAAMS,GAAmB,GAAG,IAAI,GAAG,GAAA;AAAA,EACjE,CAACT,EAAW,KAAK,GAAG,EAAE,MAAMU,GAAuB,GAAG,IAAI,GAAG,GAAA;AAC9D,GAOaC,IAAkC;AAAA,EAC9C,MAAMC;AAAAA,EACN,GAAG;AAAA,EACH,GAAG;AACJ,GASaC,IAAa,CACzBC,MAEAA,IACGf,EAAae,CAAoB,KAAKH,IACtC,QAOSI,IAAmB,CAC/BC,GACAC,IAAY,MAEZD,IACGE,EAAM,cAAcF,EAAK,MAAM;AAAA,EAC/B,OAAOA,EAAK,IAAIC;AAAA,EAChB,QAAQD,EAAK,IAAIC;AACjB,CAAC,IACD;"}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import S from "../../assets/icons/
|
|
5
|
-
import T from "../../assets/icons/
|
|
6
|
-
import D from "
|
|
7
|
-
import { DropdownPopover as B } from "../dropdown/DropdownPopover/index.js";
|
|
2
|
+
import w from "../../assets/icons/delete.svg.js";
|
|
3
|
+
import x from "../../assets/icons/edit.svg.js";
|
|
4
|
+
import S from "../../assets/icons/playOutline.svg.js";
|
|
5
|
+
import T from "../../assets/icons/vertical_dots.svg.js";
|
|
6
|
+
import { DropdownPopover as D } from "../dropdown/DropdownPopover/index.js";
|
|
8
7
|
import { BikShimmer as C } from "../shimmer/ShimmerComponent/BikShimmer.js";
|
|
9
|
-
import { TitleSmall as L, BodyCaption as O, BodySecondary as
|
|
8
|
+
import { TitleSmall as L, BodyCaption as O, BodySecondary as p } from "../TypographyStyle.js";
|
|
10
9
|
import R from "../../utils/StringUtils.js";
|
|
11
10
|
import { COLORS as o } from "../../constants/Theme.js";
|
|
12
|
-
import { ActionButton as
|
|
13
|
-
import { Tooltip as
|
|
14
|
-
import { Tag as
|
|
15
|
-
import { unwrapDropdownValue as
|
|
16
|
-
const
|
|
11
|
+
import { ActionButton as m, BodyGridRow as B, Cell as n, ActionGroup as P } from "./AgentListing.styled.js";
|
|
12
|
+
import { Tooltip as h } from "../tooltips/Tooltip.js";
|
|
13
|
+
import { Tag as $ } from "../tag/Tag.js";
|
|
14
|
+
import { unwrapDropdownValue as k } from "../dropdown/utils.js";
|
|
15
|
+
const j = (e) => {
|
|
17
16
|
switch (e.kind) {
|
|
18
17
|
case "topic":
|
|
19
18
|
return `Topic: ${R.capitalize(
|
|
@@ -24,21 +23,21 @@ const A = (e) => {
|
|
|
24
23
|
default:
|
|
25
24
|
return e.label ?? "";
|
|
26
25
|
}
|
|
27
|
-
},
|
|
26
|
+
}, N = ({
|
|
28
27
|
agent: e,
|
|
29
28
|
onRunAgent: u,
|
|
30
29
|
onEditAgent: f,
|
|
31
30
|
onDeleteAgent: a,
|
|
32
31
|
onRowClick: l,
|
|
33
|
-
triggerCountLoading:
|
|
32
|
+
triggerCountLoading: b
|
|
34
33
|
}) => {
|
|
35
|
-
const
|
|
34
|
+
const c = e.status === "live", d = j(e.trigger), y = (i) => {
|
|
36
35
|
i.stopPropagation(), !e.isRunDisabled && u(e);
|
|
37
|
-
},
|
|
36
|
+
}, v = [
|
|
38
37
|
{
|
|
39
38
|
label: "Edit",
|
|
40
39
|
value: "edit",
|
|
41
|
-
leadingIcon: /* @__PURE__ */ t(
|
|
40
|
+
leadingIcon: /* @__PURE__ */ t(x, { width: 16, height: 16, color: o.content.secondary })
|
|
42
41
|
},
|
|
43
42
|
...a ? [
|
|
44
43
|
{
|
|
@@ -58,7 +57,7 @@ const A = (e) => {
|
|
|
58
57
|
},
|
|
59
58
|
children: [
|
|
60
59
|
/* @__PURE__ */ t(
|
|
61
|
-
|
|
60
|
+
w,
|
|
62
61
|
{
|
|
63
62
|
width: 16,
|
|
64
63
|
height: 16,
|
|
@@ -71,17 +70,17 @@ const A = (e) => {
|
|
|
71
70
|
)
|
|
72
71
|
}
|
|
73
72
|
] : []
|
|
74
|
-
],
|
|
73
|
+
], g = (i) => {
|
|
75
74
|
i === "edit" ? f(e) : i === "delete" && a?.(e);
|
|
76
|
-
},
|
|
77
|
-
|
|
75
|
+
}, s = /* @__PURE__ */ t(
|
|
76
|
+
m,
|
|
78
77
|
{
|
|
79
78
|
"data-test": `agent-row-run-${e.id}`,
|
|
80
79
|
disabled: e.isRunDisabled,
|
|
81
|
-
onClick:
|
|
80
|
+
onClick: y,
|
|
82
81
|
"aria-label": "Run agent",
|
|
83
82
|
children: /* @__PURE__ */ t(
|
|
84
|
-
|
|
83
|
+
S,
|
|
85
84
|
{
|
|
86
85
|
width: 20,
|
|
87
86
|
height: 20,
|
|
@@ -91,53 +90,21 @@ const A = (e) => {
|
|
|
91
90
|
}
|
|
92
91
|
);
|
|
93
92
|
return /* @__PURE__ */ r(
|
|
94
|
-
|
|
93
|
+
B,
|
|
95
94
|
{
|
|
96
95
|
"data-test": `agent-row-${e.id}`,
|
|
97
96
|
clickable: !!l,
|
|
98
97
|
onClick: l ? () => l(e) : void 0,
|
|
99
98
|
children: [
|
|
100
99
|
/* @__PURE__ */ r(n, { children: [
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
"div",
|
|
103
|
-
{
|
|
104
|
-
style: {
|
|
105
|
-
display: "flex",
|
|
106
|
-
alignItems: "center",
|
|
107
|
-
gap: 8,
|
|
108
|
-
minWidth: 0
|
|
109
|
-
},
|
|
110
|
-
children: [
|
|
111
|
-
/* @__PURE__ */ t(L, { numberOfLines: 1, color: o.content.primary, children: e.name }),
|
|
112
|
-
e.sourceBadge ? /* @__PURE__ */ t(c, { body: e.sourceBadge, placement: "top", children: /* @__PURE__ */ t(
|
|
113
|
-
"span",
|
|
114
|
-
{
|
|
115
|
-
style: {
|
|
116
|
-
display: "flex",
|
|
117
|
-
flexShrink: 0,
|
|
118
|
-
cursor: "help"
|
|
119
|
-
},
|
|
120
|
-
"aria-label": "Agent source",
|
|
121
|
-
children: /* @__PURE__ */ t(
|
|
122
|
-
S,
|
|
123
|
-
{
|
|
124
|
-
width: 16,
|
|
125
|
-
height: 16,
|
|
126
|
-
color: o.content.secondary
|
|
127
|
-
}
|
|
128
|
-
)
|
|
129
|
-
}
|
|
130
|
-
) }) : null
|
|
131
|
-
]
|
|
132
|
-
}
|
|
133
|
-
),
|
|
100
|
+
/* @__PURE__ */ t(L, { numberOfLines: 1, color: o.content.primary, children: e.name }),
|
|
134
101
|
/* @__PURE__ */ r(O, { numberOfLines: 1, color: o.content.secondary, children: [
|
|
135
102
|
"Created: ",
|
|
136
103
|
e.createdAtLabel
|
|
137
104
|
] })
|
|
138
105
|
] }),
|
|
139
|
-
/* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(
|
|
140
|
-
/* @__PURE__ */ t(n, { align: "right", children:
|
|
106
|
+
/* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(h, { body: d, placement: "top", children: /* @__PURE__ */ t(p, { numberOfLines: 2, color: o.content.primary, children: d }) }) }),
|
|
107
|
+
/* @__PURE__ */ t(n, { align: "right", children: b ? /* @__PURE__ */ t(
|
|
141
108
|
C,
|
|
142
109
|
{
|
|
143
110
|
boxes: [
|
|
@@ -149,37 +116,37 @@ const A = (e) => {
|
|
|
149
116
|
}
|
|
150
117
|
]
|
|
151
118
|
}
|
|
152
|
-
) : /* @__PURE__ */ t(
|
|
119
|
+
) : /* @__PURE__ */ t(p, { color: o.content.primary, children: e.triggerCount }) }),
|
|
153
120
|
/* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(
|
|
154
|
-
|
|
121
|
+
$,
|
|
155
122
|
{
|
|
156
|
-
tagText:
|
|
157
|
-
type:
|
|
123
|
+
tagText: c ? "Live" : "Draft",
|
|
124
|
+
type: c ? "positive" : "neutral",
|
|
158
125
|
variant: "regular"
|
|
159
126
|
}
|
|
160
127
|
) }),
|
|
161
|
-
/* @__PURE__ */ t(n, { align: "center", children: /* @__PURE__ */ r(
|
|
162
|
-
e.isRunDisabled && e.runDisabledTooltip ? /* @__PURE__ */ t(
|
|
128
|
+
/* @__PURE__ */ t(n, { align: "center", children: /* @__PURE__ */ r(P, { children: [
|
|
129
|
+
e.isRunDisabled && e.runDisabledTooltip ? /* @__PURE__ */ t(h, { body: e.runDisabledTooltip, placement: "top", children: /* @__PURE__ */ t("span", { style: { display: "flex" }, children: s }) }) : s,
|
|
163
130
|
/* @__PURE__ */ t(
|
|
164
131
|
"span",
|
|
165
132
|
{
|
|
166
133
|
style: { display: "flex" },
|
|
167
134
|
onClick: (i) => i.stopPropagation(),
|
|
168
135
|
children: /* @__PURE__ */ t(
|
|
169
|
-
|
|
136
|
+
D,
|
|
170
137
|
{
|
|
171
138
|
"data-test": `agent-row-menu-${e.id}`,
|
|
172
|
-
options:
|
|
139
|
+
options: v,
|
|
173
140
|
placement: "bottom-end",
|
|
174
141
|
width: "160px",
|
|
175
|
-
onSelect: (i) =>
|
|
142
|
+
onSelect: (i) => g(k(i)),
|
|
176
143
|
children: /* @__PURE__ */ t(
|
|
177
|
-
|
|
144
|
+
m,
|
|
178
145
|
{
|
|
179
146
|
"data-test": `agent-row-menu-button-${e.id}`,
|
|
180
147
|
"aria-label": "More actions",
|
|
181
148
|
children: /* @__PURE__ */ t(
|
|
182
|
-
|
|
149
|
+
T,
|
|
183
150
|
{
|
|
184
151
|
width: 20,
|
|
185
152
|
height: 20,
|
|
@@ -198,6 +165,6 @@ const A = (e) => {
|
|
|
198
165
|
);
|
|
199
166
|
};
|
|
200
167
|
export {
|
|
201
|
-
|
|
168
|
+
N as AgentTableRow
|
|
202
169
|
};
|
|
203
170
|
//# sourceMappingURL=AgentTableRow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentTableRow.js","sources":["../../../../src/components/agent-listing/AgentTableRow.tsx"],"sourcesContent":["import DeleteIcon from '@src/assets/icons/delete.svg';\nimport EditIcon from '@src/assets/icons/edit.svg';\nimport InfoIcon from '@src/assets/icons/info.svg';\nimport PlayOutlineIcon from '@src/assets/icons/playOutline.svg';\nimport MoreIcon from '@src/assets/icons/vertical_dots.svg';\nimport React from 'react';\nimport { unwrapDropdownValue } from '@src/components/dropdown';\nimport { DropdownPopover } from '@src/components/dropdown/DropdownPopover';\nimport { SingleOption } from '@src/components/dropdown/type';\nimport BikShimmer from '@src/components/shimmer/ShimmerComponent/BikShimmer';\nimport { Tag } from '@src/components/tag';\nimport { Tooltip } from '@src/components/tooltips';\nimport {\n\tBodyCaption,\n\tBodySecondary,\n\tTitleSmall,\n} from '@src/components/TypographyStyle';\nimport StringUtils from '@src/utils/StringUtils';\nimport { COLORS } from '@src/constants/Theme';\nimport { AgentListItem, AgentTriggerSummary } from './AgentListing.model';\nimport {\n\tActionButton,\n\tActionGroup,\n\tBodyGridRow,\n\tCell,\n} from './AgentListing.styled';\n\nconst triggerToText = (trigger: AgentTriggerSummary): string => {\n\tswitch (trigger.kind) {\n\t\tcase 'topic':\n\t\t\t// Intent keys arrive snake_cased (e.g. \"order_cancellation\"); show them\n\t\t\t// space-separated and sentence-cased (first letter capital) so the\n\t\t\t// trigger reads as plain words, not a raw key.\n\t\t\treturn `Topic: ${StringUtils.capitalize(\n\t\t\t\t(trigger.label ?? '').replace(/_/g, ' '),\n\t\t\t)}`;\n\t\tcase 'phrases':\n\t\t\t// No enumerable phrase list (free-text trigger) → just the word.\n\t\t\treturn trigger.items?.length\n\t\t\t\t? `Phrases: ${trigger.items.join(', ')}`\n\t\t\t\t: 'Phrases';\n\t\tcase 'custom':\n\t\tdefault:\n\t\t\treturn trigger.label ?? '';\n\t}\n};\n\ninterface AgentTableRowProps {\n\tagent: AgentListItem;\n\tonRunAgent: (agent: AgentListItem) => void;\n\tonEditAgent: (agent: AgentListItem) => void;\n\t/** When set, render a delete action (the listing handles confirmation). */\n\tonDeleteAgent?: (agent: AgentListItem) => void;\n\tonRowClick?: (agent: AgentListItem) => void;\n\t/** Shimmer the trigger-count cell while the analytics count is still loading. */\n\ttriggerCountLoading?: boolean;\n}\n\nexport const AgentTableRow: React.FC<AgentTableRowProps> = ({\n\tagent,\n\tonRunAgent,\n\tonEditAgent,\n\tonDeleteAgent,\n\tonRowClick,\n\ttriggerCountLoading,\n}) => {\n\tconst isLive = agent.status === 'live';\n\tconst triggerText = triggerToText(agent.trigger);\n\n\tconst handleRun = (e: React.MouseEvent) => {\n\t\te.stopPropagation();\n\t\tif (agent.isRunDisabled) {\n\t\t\treturn;\n\t\t}\n\t\tonRunAgent(agent);\n\t};\n\n\t// Edit + Delete live in the \"⋮\" menu beside the run button.\n\tconst menuOptions: SingleOption[] = [\n\t\t{\n\t\t\tlabel: 'Edit',\n\t\t\tvalue: 'edit',\n\t\t\tleadingIcon: (\n\t\t\t\t<EditIcon width={16} height={16} color={COLORS.content.secondary} />\n\t\t\t),\n\t\t},\n\t\t...(onDeleteAgent\n\t\t\t? [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: 'Delete',\n\t\t\t\t\t\tvalue: 'delete',\n\t\t\t\t\t\t// Rendered red (icon + label) via customComponent.\n\t\t\t\t\t\tcustomComponent: (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\tgap: 8,\n\t\t\t\t\t\t\t\t\tcolor: COLORS.content.negative,\n\t\t\t\t\t\t\t\t\tfontFamily: 'Inter',\n\t\t\t\t\t\t\t\t\tfontSize: 14,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<DeleteIcon\n\t\t\t\t\t\t\t\t\twidth={16}\n\t\t\t\t\t\t\t\t\theight={16}\n\t\t\t\t\t\t\t\t\tcolor={COLORS.content.negative}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\tDelete\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t ]\n\t\t\t: []),\n\t];\n\n\tconst handleMenuSelect = (value: string | undefined) => {\n\t\tif (value === 'edit') {\n\t\t\tonEditAgent(agent);\n\t\t} else if (value === 'delete') {\n\t\t\tonDeleteAgent?.(agent);\n\t\t}\n\t};\n\n\tconst playButton = (\n\t\t<ActionButton\n\t\t\tdata-test={`agent-row-run-${agent.id}`}\n\t\t\tdisabled={agent.isRunDisabled}\n\t\t\tonClick={handleRun}\n\t\t\taria-label=\"Run agent\"\n\t\t>\n\t\t\t<PlayOutlineIcon\n\t\t\t\twidth={20}\n\t\t\t\theight={20}\n\t\t\t\tcolor={COLORS.content.secondary}\n\t\t\t/>\n\t\t</ActionButton>\n\t);\n\n\treturn (\n\t\t<BodyGridRow\n\t\t\tdata-test={`agent-row-${agent.id}`}\n\t\t\tclickable={!!onRowClick}\n\t\t\tonClick={onRowClick ? () => onRowClick(agent) : undefined}\n\t\t>\n\t\t\t<Cell>\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tgap: 8,\n\t\t\t\t\t\tminWidth: 0,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<TitleSmall numberOfLines={1} color={COLORS.content.primary}>\n\t\t\t\t\t\t{agent.name}\n\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t{/* Provenance: an info icon beside the name reveals where this\n\t\t\t\t\t agent was copied from (source store + agent, or the agent\n\t\t\t\t\t library). Consumer's doc→row mapper builds the tooltip text. */}\n\t\t\t\t\t{agent.sourceBadge ? (\n\t\t\t\t\t\t<Tooltip body={agent.sourceBadge} placement=\"top\">\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\tflexShrink: 0,\n\t\t\t\t\t\t\t\t\tcursor: 'help',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\taria-label=\"Agent source\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<InfoIcon\n\t\t\t\t\t\t\t\t\twidth={16}\n\t\t\t\t\t\t\t\t\theight={16}\n\t\t\t\t\t\t\t\t\tcolor={COLORS.content.secondary}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t) : null}\n\t\t\t\t</div>\n\t\t\t\t<BodyCaption numberOfLines={1} color={COLORS.content.secondary}>\n\t\t\t\t\tCreated: {agent.createdAtLabel}\n\t\t\t\t</BodyCaption>\n\t\t\t</Cell>\n\n\t\t\t<Cell>\n\t\t\t\t{/* Cell truncates to 2 lines; the tooltip reveals the full trigger. */}\n\t\t\t\t<Tooltip body={triggerText} placement=\"top\">\n\t\t\t\t\t<BodySecondary numberOfLines={2} color={COLORS.content.primary}>\n\t\t\t\t\t\t{triggerText}\n\t\t\t\t\t</BodySecondary>\n\t\t\t\t</Tooltip>\n\t\t\t</Cell>\n\n\t\t\t<Cell align=\"right\">\n\t\t\t\t{triggerCountLoading ? (\n\t\t\t\t\t<BikShimmer\n\t\t\t\t\t\tboxes={[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twidth: '48px',\n\t\t\t\t\t\t\t\theight: '16px',\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tmarginTop: '0',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]}\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<BodySecondary color={COLORS.content.primary}>\n\t\t\t\t\t\t{agent.triggerCount}\n\t\t\t\t\t</BodySecondary>\n\t\t\t\t)}\n\t\t\t</Cell>\n\n\t\t\t<Cell>\n\t\t\t\t<Tag\n\t\t\t\t\ttagText={isLive ? 'Live' : 'Draft'}\n\t\t\t\t\ttype={isLive ? 'positive' : 'neutral'}\n\t\t\t\t\tvariant=\"regular\"\n\t\t\t\t/>\n\t\t\t</Cell>\n\n\t\t\t<Cell align=\"center\">\n\t\t\t\t<ActionGroup>\n\t\t\t\t\t{agent.isRunDisabled && agent.runDisabledTooltip ? (\n\t\t\t\t\t\t<Tooltip body={agent.runDisabledTooltip} placement=\"top\">\n\t\t\t\t\t\t\t<span style={{ display: 'flex' }}>{playButton}</span>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tplayButton\n\t\t\t\t\t)}\n\t\t\t\t\t{/* Stop the row's onClick from firing when interacting with the menu. */}\n\t\t\t\t\t<span\n\t\t\t\t\t\tstyle={{ display: 'flex' }}\n\t\t\t\t\t\tonClick={(e) => e.stopPropagation()}\n\t\t\t\t\t>\n\t\t\t\t\t\t<DropdownPopover\n\t\t\t\t\t\t\tdata-test={`agent-row-menu-${agent.id}`}\n\t\t\t\t\t\t\toptions={menuOptions}\n\t\t\t\t\t\t\tplacement=\"bottom-end\"\n\t\t\t\t\t\t\twidth=\"160px\"\n\t\t\t\t\t\t\tonSelect={(opt) => handleMenuSelect(unwrapDropdownValue(opt))}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ActionButton\n\t\t\t\t\t\t\t\tdata-test={`agent-row-menu-button-${agent.id}`}\n\t\t\t\t\t\t\t\taria-label=\"More actions\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<MoreIcon\n\t\t\t\t\t\t\t\t\twidth={20}\n\t\t\t\t\t\t\t\t\theight={20}\n\t\t\t\t\t\t\t\t\tcolor={COLORS.content.secondary}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ActionButton>\n\t\t\t\t\t\t</DropdownPopover>\n\t\t\t\t\t</span>\n\t\t\t\t</ActionGroup>\n\t\t\t</Cell>\n\t\t</BodyGridRow>\n\t);\n};\n"],"names":["triggerToText","trigger","StringUtils","AgentTableRow","agent","onRunAgent","onEditAgent","onDeleteAgent","onRowClick","triggerCountLoading","isLive","triggerText","handleRun","e","menuOptions","jsx","EditIcon","COLORS","jsxs","DeleteIcon","handleMenuSelect","value","playButton","ActionButton","PlayOutlineIcon","BodyGridRow","Cell","TitleSmall","Tooltip","InfoIcon","BodyCaption","BodySecondary","BikShimmer","Tag","ActionGroup","DropdownPopover","opt","unwrapDropdownValue","MoreIcon"],"mappings":";;;;;;;;;;;;;;;AA2BA,MAAMA,IAAgB,CAACC,MAAyC;AAC/D,UAAQA,EAAQ,MAAA;AAAA,IACf,KAAK;AAIJ,aAAO,UAAUC,EAAY;AAAA,SAC3BD,EAAQ,SAAS,IAAI,QAAQ,MAAM,GAAG;AAAA,MAAA,CACvC;AAAA,IACF,KAAK;AAEJ,aAAOA,EAAQ,OAAO,SACnB,YAAYA,EAAQ,MAAM,KAAK,IAAI,CAAC,KACpC;AAAA,IAEJ;AACC,aAAOA,EAAQ,SAAS;AAAA,EAAA;AAE3B,GAaaE,IAA8C,CAAC;AAAA,EAC3D,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,qBAAAC;AACD,MAAM;AACL,QAAMC,IAASN,EAAM,WAAW,QAC1BO,IAAcX,EAAcI,EAAM,OAAO,GAEzCQ,IAAY,CAACC,MAAwB;AAE1C,IADAA,EAAE,gBAAA,GACE,CAAAT,EAAM,iBAGVC,EAAWD,CAAK;AAAA,EACjB,GAGMU,IAA8B;AAAA,IACnC;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,MACP,aACC,gBAAAC,EAACC,GAAA,EAAS,OAAO,IAAI,QAAQ,IAAI,OAAOC,EAAO,QAAQ,UAAA,CAAW;AAAA,IAAA;AAAA,IAGpE,GAAIV,IACD;AAAA,MACA;AAAA,QACC,OAAO;AAAA,QACP,OAAO;AAAA;AAAA,QAEP,iBACC,gBAAAW;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,OAAO;AAAA,cACN,SAAS;AAAA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SAASvB,IAAS,SAAS;AAAA,YAC3B,MAAMA,IAAS,aAAa;AAAA,YAC5B,SAAQ;AAAA,UAAA;AAAA,QAAA,GAEV;AAAA,QAEA,gBAAAK,EAACW,GAAA,EAAK,OAAM,UACX,4BAACQ,GAAA,EACC,UAAA;AAAA,UAAA9B,EAAM,iBAAiBA,EAAM,uCAC5BwB,GAAA,EAAQ,MAAMxB,EAAM,oBAAoB,WAAU,OAClD,UAAA,gBAAAW,EAAC,QAAA,EAAK,OAAO,EAAE,SAAS,UAAW,UAAAO,GAAW,GAC/C,IAEAA;AAAA,UAGD,gBAAAP;AAAA,YAAC;AAAA,YAAA;AAAA,cACA,OAAO,EAAE,SAAS,OAAA;AAAA,cAClB,SAAS,CAACF,MAAMA,EAAE,gBAAA;AAAA,cAElB,UAAA,gBAAAE;AAAA,gBAACoB;AAAA,gBAAA;AAAA,kBACA,aAAW,kBAAkB/B,EAAM,EAAE;AAAA,kBACrC,SAASU;AAAA,kBACT,WAAU;AAAA,kBACV,OAAM;AAAA,kBACN,UAAU,CAACsB,MAAQhB,EAAiBiB,EAAoBD,CAAG,CAAC;AAAA,kBAE5D,UAAA,gBAAArB;AAAA,oBAACQ;AAAA,oBAAA;AAAA,sBACA,aAAW,yBAAyBnB,EAAM,EAAE;AAAA,sBAC5C,cAAW;AAAA,sBAEX,UAAA,gBAAAW;AAAA,wBAACuB;AAAAA,wBAAA;AAAA,0BACA,OAAO;AAAA,0BACP,QAAQ;AAAA,0BACR,OAAOrB,EAAO,QAAQ;AAAA,wBAAA;AAAA,sBAAA;AAAA,oBACvB;AAAA,kBAAA;AAAA,gBACD;AAAA,cAAA;AAAA,YACD;AAAA,UAAA;AAAA,QACD,EAAA,CACD,EAAA,CACD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGH;"}
|
|
1
|
+
{"version":3,"file":"AgentTableRow.js","sources":["../../../../src/components/agent-listing/AgentTableRow.tsx"],"sourcesContent":["import DeleteIcon from '@src/assets/icons/delete.svg';\nimport EditIcon from '@src/assets/icons/edit.svg';\nimport PlayOutlineIcon from '@src/assets/icons/playOutline.svg';\nimport MoreIcon from '@src/assets/icons/vertical_dots.svg';\nimport React from 'react';\nimport { unwrapDropdownValue } from '@src/components/dropdown';\nimport { DropdownPopover } from '@src/components/dropdown/DropdownPopover';\nimport { SingleOption } from '@src/components/dropdown/type';\nimport BikShimmer from '@src/components/shimmer/ShimmerComponent/BikShimmer';\nimport { Tag } from '@src/components/tag';\nimport { Tooltip } from '@src/components/tooltips';\nimport {\n\tBodyCaption,\n\tBodySecondary,\n\tTitleSmall,\n} from '@src/components/TypographyStyle';\nimport StringUtils from '@src/utils/StringUtils';\nimport { COLORS } from '@src/constants/Theme';\nimport { AgentListItem, AgentTriggerSummary } from './AgentListing.model';\nimport {\n\tActionButton,\n\tActionGroup,\n\tBodyGridRow,\n\tCell,\n} from './AgentListing.styled';\n\nconst triggerToText = (trigger: AgentTriggerSummary): string => {\n\tswitch (trigger.kind) {\n\t\tcase 'topic':\n\t\t\t// Intent keys arrive snake_cased (e.g. \"order_cancellation\"); show them\n\t\t\t// space-separated and sentence-cased (first letter capital) so the\n\t\t\t// trigger reads as plain words, not a raw key.\n\t\t\treturn `Topic: ${StringUtils.capitalize(\n\t\t\t\t(trigger.label ?? '').replace(/_/g, ' '),\n\t\t\t)}`;\n\t\tcase 'phrases':\n\t\t\t// No enumerable phrase list (free-text trigger) → just the word.\n\t\t\treturn trigger.items?.length\n\t\t\t\t? `Phrases: ${trigger.items.join(', ')}`\n\t\t\t\t: 'Phrases';\n\t\tcase 'custom':\n\t\tdefault:\n\t\t\treturn trigger.label ?? '';\n\t}\n};\n\ninterface AgentTableRowProps {\n\tagent: AgentListItem;\n\tonRunAgent: (agent: AgentListItem) => void;\n\tonEditAgent: (agent: AgentListItem) => void;\n\t/** When set, render a delete action (the listing handles confirmation). */\n\tonDeleteAgent?: (agent: AgentListItem) => void;\n\tonRowClick?: (agent: AgentListItem) => void;\n\t/** Shimmer the trigger-count cell while the analytics count is still loading. */\n\ttriggerCountLoading?: boolean;\n}\n\nexport const AgentTableRow: React.FC<AgentTableRowProps> = ({\n\tagent,\n\tonRunAgent,\n\tonEditAgent,\n\tonDeleteAgent,\n\tonRowClick,\n\ttriggerCountLoading,\n}) => {\n\tconst isLive = agent.status === 'live';\n\tconst triggerText = triggerToText(agent.trigger);\n\n\tconst handleRun = (e: React.MouseEvent) => {\n\t\te.stopPropagation();\n\t\tif (agent.isRunDisabled) {\n\t\t\treturn;\n\t\t}\n\t\tonRunAgent(agent);\n\t};\n\n\t// Edit + Delete live in the \"⋮\" menu beside the run button.\n\tconst menuOptions: SingleOption[] = [\n\t\t{\n\t\t\tlabel: 'Edit',\n\t\t\tvalue: 'edit',\n\t\t\tleadingIcon: (\n\t\t\t\t<EditIcon width={16} height={16} color={COLORS.content.secondary} />\n\t\t\t),\n\t\t},\n\t\t...(onDeleteAgent\n\t\t\t? [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: 'Delete',\n\t\t\t\t\t\tvalue: 'delete',\n\t\t\t\t\t\t// Rendered red (icon + label) via customComponent.\n\t\t\t\t\t\tcustomComponent: (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\tgap: 8,\n\t\t\t\t\t\t\t\t\tcolor: COLORS.content.negative,\n\t\t\t\t\t\t\t\t\tfontFamily: 'Inter',\n\t\t\t\t\t\t\t\t\tfontSize: 14,\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<DeleteIcon\n\t\t\t\t\t\t\t\t\twidth={16}\n\t\t\t\t\t\t\t\t\theight={16}\n\t\t\t\t\t\t\t\t\tcolor={COLORS.content.negative}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\tDelete\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t ]\n\t\t\t: []),\n\t];\n\n\tconst handleMenuSelect = (value: string | undefined) => {\n\t\tif (value === 'edit') {\n\t\t\tonEditAgent(agent);\n\t\t} else if (value === 'delete') {\n\t\t\tonDeleteAgent?.(agent);\n\t\t}\n\t};\n\n\tconst playButton = (\n\t\t<ActionButton\n\t\t\tdata-test={`agent-row-run-${agent.id}`}\n\t\t\tdisabled={agent.isRunDisabled}\n\t\t\tonClick={handleRun}\n\t\t\taria-label=\"Run agent\"\n\t\t>\n\t\t\t<PlayOutlineIcon\n\t\t\t\twidth={20}\n\t\t\t\theight={20}\n\t\t\t\tcolor={COLORS.content.secondary}\n\t\t\t/>\n\t\t</ActionButton>\n\t);\n\n\treturn (\n\t\t<BodyGridRow\n\t\t\tdata-test={`agent-row-${agent.id}`}\n\t\t\tclickable={!!onRowClick}\n\t\t\tonClick={onRowClick ? () => onRowClick(agent) : undefined}\n\t\t>\n\t\t\t<Cell>\n\t\t\t\t<TitleSmall numberOfLines={1} color={COLORS.content.primary}>\n\t\t\t\t\t{agent.name}\n\t\t\t\t</TitleSmall>\n\t\t\t\t<BodyCaption numberOfLines={1} color={COLORS.content.secondary}>\n\t\t\t\t\tCreated: {agent.createdAtLabel}\n\t\t\t\t</BodyCaption>\n\t\t\t</Cell>\n\n\t\t\t<Cell>\n\t\t\t\t{/* Cell truncates to 2 lines; the tooltip reveals the full trigger. */}\n\t\t\t\t<Tooltip body={triggerText} placement=\"top\">\n\t\t\t\t\t<BodySecondary numberOfLines={2} color={COLORS.content.primary}>\n\t\t\t\t\t\t{triggerText}\n\t\t\t\t\t</BodySecondary>\n\t\t\t\t</Tooltip>\n\t\t\t</Cell>\n\n\t\t\t<Cell align=\"right\">\n\t\t\t\t{triggerCountLoading ? (\n\t\t\t\t\t<BikShimmer\n\t\t\t\t\t\tboxes={[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twidth: '48px',\n\t\t\t\t\t\t\t\theight: '16px',\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tmarginTop: '0',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]}\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<BodySecondary color={COLORS.content.primary}>\n\t\t\t\t\t\t{agent.triggerCount}\n\t\t\t\t\t</BodySecondary>\n\t\t\t\t)}\n\t\t\t</Cell>\n\n\t\t\t<Cell>\n\t\t\t\t<Tag\n\t\t\t\t\ttagText={isLive ? 'Live' : 'Draft'}\n\t\t\t\t\ttype={isLive ? 'positive' : 'neutral'}\n\t\t\t\t\tvariant=\"regular\"\n\t\t\t\t/>\n\t\t\t</Cell>\n\n\t\t\t<Cell align=\"center\">\n\t\t\t\t<ActionGroup>\n\t\t\t\t\t{agent.isRunDisabled && agent.runDisabledTooltip ? (\n\t\t\t\t\t\t<Tooltip body={agent.runDisabledTooltip} placement=\"top\">\n\t\t\t\t\t\t\t<span style={{ display: 'flex' }}>{playButton}</span>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tplayButton\n\t\t\t\t\t)}\n\t\t\t\t\t{/* Stop the row's onClick from firing when interacting with the menu. */}\n\t\t\t\t\t<span\n\t\t\t\t\t\tstyle={{ display: 'flex' }}\n\t\t\t\t\t\tonClick={(e) => e.stopPropagation()}\n\t\t\t\t\t>\n\t\t\t\t\t\t<DropdownPopover\n\t\t\t\t\t\t\tdata-test={`agent-row-menu-${agent.id}`}\n\t\t\t\t\t\t\toptions={menuOptions}\n\t\t\t\t\t\t\tplacement=\"bottom-end\"\n\t\t\t\t\t\t\twidth=\"160px\"\n\t\t\t\t\t\t\tonSelect={(opt) => handleMenuSelect(unwrapDropdownValue(opt))}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ActionButton\n\t\t\t\t\t\t\t\tdata-test={`agent-row-menu-button-${agent.id}`}\n\t\t\t\t\t\t\t\taria-label=\"More actions\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<MoreIcon\n\t\t\t\t\t\t\t\t\twidth={20}\n\t\t\t\t\t\t\t\t\theight={20}\n\t\t\t\t\t\t\t\t\tcolor={COLORS.content.secondary}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ActionButton>\n\t\t\t\t\t\t</DropdownPopover>\n\t\t\t\t\t</span>\n\t\t\t\t</ActionGroup>\n\t\t\t</Cell>\n\t\t</BodyGridRow>\n\t);\n};\n"],"names":["triggerToText","trigger","StringUtils","AgentTableRow","agent","onRunAgent","onEditAgent","onDeleteAgent","onRowClick","triggerCountLoading","isLive","triggerText","handleRun","e","menuOptions","jsx","EditIcon","COLORS","jsxs","DeleteIcon","handleMenuSelect","value","playButton","ActionButton","PlayOutlineIcon","BodyGridRow","Cell","TitleSmall","BodyCaption","Tooltip","BodySecondary","BikShimmer","Tag","ActionGroup","DropdownPopover","opt","unwrapDropdownValue","MoreIcon"],"mappings":";;;;;;;;;;;;;;AA0BA,MAAMA,IAAgB,CAACC,MAAyC;AAC/D,UAAQA,EAAQ,MAAA;AAAA,IACf,KAAK;AAIJ,aAAO,UAAUC,EAAY;AAAA,SAC3BD,EAAQ,SAAS,IAAI,QAAQ,MAAM,GAAG;AAAA,MAAA,CACvC;AAAA,IACF,KAAK;AAEJ,aAAOA,EAAQ,OAAO,SACnB,YAAYA,EAAQ,MAAM,KAAK,IAAI,CAAC,KACpC;AAAA,IAEJ;AACC,aAAOA,EAAQ,SAAS;AAAA,EAAA;AAE3B,GAaaE,IAA8C,CAAC;AAAA,EAC3D,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,qBAAAC;AACD,MAAM;AACL,QAAMC,IAASN,EAAM,WAAW,QAC1BO,IAAcX,EAAcI,EAAM,OAAO,GAEzCQ,IAAY,CAACC,MAAwB;AAE1C,IADAA,EAAE,gBAAA,GACE,CAAAT,EAAM,iBAG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