@feedmepos/mf-connect 0.1.98-beta.85 → 0.1.98-beta.87
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/README.md +62 -5
- package/dist/{App-BxA547CP.js → App-DZzCW6yw.js} +586 -569
- package/dist/{AuditLogs-DjsuO-ou.js → AuditLogs-C5s1oYtj.js} +12 -12
- package/dist/{Bin-Cp1JuoPV.js → Bin-B1e-qVtO.js} +8 -8
- package/dist/{Broadcast-C-dZ7I7J.js → Broadcast-CwO5ut-E.js} +12 -12
- package/dist/{CampaignAnalytic-CeJrlblr.js → CampaignAnalytic-B1KXy3dl.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DNshyt4k.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DS8RAeUt.js} +7 -7
- package/dist/{Card-BRkDbHgP.js → Card-BK-p9FW9.js} +22 -22
- package/dist/{Collections-KGkn4jVg.js → Collections-CTF-r_mV.js} +8 -8
- package/dist/{Credit-CYtdA8LR.js → Credit-DR2AvPrI.js} +12 -12
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-B_GGXmKj.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CixW7_65.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CC84YrQj.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D53ghi_e.js} +34 -35
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Y8euxc9u.js → EffectSheet.vue_vue_type_style_index_0_lang-BNCvFw9v.js} +6 -6
- package/dist/{Experience-DyCWhTIc.js → Experience-BzPvYJ0N.js} +13 -13
- package/dist/{FileSaver.min-sifwJvOC.js → FileSaver.min-BBi03O9S.js} +1 -1
- package/dist/{Game-D2dtBGMx.js → Game-DNdM6BpR.js} +13 -13
- package/dist/{GiftCardSetup-4_wPeuGx.js → GiftCardSetup-yVVt1hCK.js} +10 -10
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-DaXZiLCz.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-C_REykTp.js} +7 -7
- package/dist/{Goals-BZriqe6a.js → Goals-RyNCRCoT.js} +4 -4
- package/dist/{Grab-DE43gcBH.js → Grab-COgtKEHg.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BSmoRIp3.js → ImageInput.vue_vue_type_script_setup_true_lang-DueG1yQj.js} +1 -1
- package/dist/{Index-3-__a-F8.js → Index-CW5ib46F.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DMFmuJHS.js → LocationPicker.vue_vue_type_script_setup_true_lang-Dbk0uqyl.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-aCBsAVgf.js → LottieAnimation.vue_vue_type_script_setup_true_lang-s19mfQze.js} +1 -1
- package/dist/{LoyaltyDashboard-BxqVkHWZ.js → LoyaltyDashboard-CJW9sSpM.js} +23 -24
- package/dist/MainLayout-DJrtcFYj.js +4 -0
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-DKwbltBD.js → MainLayout.vue_vue_type_script_setup_true_lang-fXA-ixLQ.js} +5 -4
- package/dist/{Marketing-BkTXd2kV.js → Marketing-DJD3MCP0.js} +4 -4
- package/dist/{MarketingMaterialEdit-DCmGVhn1.js → MarketingMaterialEdit-NlZLrI0D.js} +6 -6
- package/dist/{Member-BZ-cZyCC.js → Member-B9_6dgmX.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DeRvNRsk.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-B6PrfIdK.js} +23 -23
- package/dist/{MemberImportHistory-CunTfazI.js → MemberImportHistory-daeSSL3G.js} +7 -7
- package/dist/{MemberList-H8H9xzMg.js → MemberList-DpMvv6MH.js} +14 -14
- package/dist/{MemberTransactions-B1GTs17R.js → MemberTransactions-CekjmOnU.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-C2K_acoB.js → MessageInput.vue_vue_type_script_setup_true_lang-Cgb0WN3L.js} +10 -10
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BCRSJoq7.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DKJH_z31.js} +1 -1
- package/dist/{Mission-CNXUBVI4.js → Mission-B3YYFaqK.js} +14 -14
- package/dist/{Overview-CwoDIRXD.js → Overview-B3VtDXAN.js} +4 -4
- package/dist/{Overview-CiIMyx-_.js → Overview-DcLRK3qr.js} +20 -20
- package/dist/{Point-BpFvqe5M.js → Point-rE75hllY.js} +14 -14
- package/dist/{Promotion-DwcxXXS3.js → Promotion-CldXbf59.js} +14 -14
- package/dist/{Queue-CI9PtRqs.js → Queue-Im8WyRKY.js} +12 -12
- package/dist/{Record-Cl73WIoN.js → Record-DmP7Q885.js} +9 -9
- package/dist/{Review-BQL9TzxZ.js → Review-DDaoANvS.js} +2 -2
- package/dist/{ReviewFacebookCallback-BVcW6zNJ.js → ReviewFacebookCallback-6fQq9t2y.js} +5 -5
- package/dist/{ReviewGoogleCallback-peKv_-nP.js → ReviewGoogleCallback-DDmUWLd9.js} +5 -5
- package/dist/{Reward-6rLOoOkv.js → Reward-BzL-toJQ.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CZ2OWRik.js → RewardGroup.vue_vue_type_script_setup_true_lang-CrQvlB_E.js} +13 -13
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-B7GKzELx.js → RuleGroup.vue_vue_type_script_setup_true_lang-Dk8kqDSk.js} +14 -14
- package/dist/{Segment-DnrCf_-F.js → Segment-BweG5YWo.js} +25 -25
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DyYWf2RR.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BfFtD5TS.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-C-GxdVOH.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BsgQ1kqK.js} +4 -4
- package/dist/{Setting-BlU3XioB.js → Setting-MW6B10tv.js} +14 -14
- package/dist/{SettingAdvertisements-CW9KUQAk.js → SettingAdvertisements-DP-Wm3vC.js} +12 -12
- package/dist/{Settings-DfKCItWN.js → Settings-CczrlaKr.js} +5 -5
- package/dist/{Store-Dh90RjUg.js → Store-C9pYfjIe.js} +28 -29
- package/dist/{StoreRewards-BmEJZR1O.js → StoreRewards-DecpygTj.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-C-Efc4SV.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Cw63xJWj.js} +24 -24
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-Bv0_e1wk.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-B_t4xibZ.js} +2 -2
- package/dist/{Tier-C7EiLGJW.js → Tier-D7dHj_zA.js} +26 -26
- package/dist/{Title-DPf-0vrF.js → Title-DqEvTcqS.js} +22 -22
- package/dist/{Transaction-DsAk9Gb9.js → Transaction-Z4qjSyBB.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Csojc1fI.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-D9X2-IIl.js} +6 -6
- package/dist/{Voucher-BKp9CMMe.js → Voucher-BY8YGlpM.js} +18 -18
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Cpn8legF.js → VoucherEditor.vue_vue_type_script_setup_true_lang-3j_0rbsk.js} +12 -12
- package/dist/{WhatsappAccount-DjAL89Re.js → WhatsappAccount-SPlDi9BN.js} +5 -5
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-D25DVRXA.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DYXAJ35J.js} +1 -1
- package/dist/{WhatsappBot-CSy_Z1bz.js → WhatsappBot-Oo1KHYLi.js} +5 -5
- package/dist/WhatsappBotSettings-DL1f_qXt.js +387 -0
- package/dist/{WhatsappBotTickets-DS7_jaE3.js → WhatsappBotTickets-CerGACm5.js} +3 -3
- package/dist/WhatsappLayout-B2DrnLNS.js +21 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-D6Z-3QOR.js → ZodTextField.vue_vue_type_script_setup_true_lang-0cvPcwm5.js} +2 -2
- package/dist/{app-BiUEivOU.js → app-bGZlAIpq.js} +227 -217
- package/dist/app.js +1 -1
- package/dist/{base.export-Bvf3GR9p.js → base.export-COcyNfbe.js} +2 -2
- package/dist/{business-DgmJwclv.js → business-DTPgRJRn.js} +5 -5
- package/dist/{campaign-DxjYod5y.js → campaign-Cg6Z_tME.js} +2 -2
- package/dist/{campaign-C9TU71PO.js → campaign-cm9TQ4dw.js} +8 -8
- package/dist/{campaign.fn-BGdwcW0r.js → campaign.fn-CS5nJBxQ.js} +133 -133
- package/dist/{collection.fn-B9t79SwE.js → collection.fn-BYzmqREp.js} +2 -2
- package/dist/{currency-K9kgZvJm.js → currency-Dtmbe1s9.js} +1 -1
- package/dist/{duplicateCampaign-CLeVibNm.js → duplicateCampaign-DFarTXOQ.js} +2 -2
- package/dist/{effect-Bj5p3FOF.js → effect-DAGCCFgZ.js} +1 -1
- package/dist/{email-addresses-CUpmh5j3.js → email-addresses-Dw4rkWem.js} +2 -2
- package/dist/feature-flag-3dM_IVQU.js +50 -0
- package/dist/{helper-iVOlqZr5.js → helper-C-LQhPI2.js} +1 -1
- package/dist/{index-Cq0kWJ_W.js → index-8c7H1u7j.js} +1 -1
- package/dist/{index-YV22ZWWA.js → index-9V_mKS4w.js} +2 -2
- package/dist/{index-CGctGLsw.js → index-B1kMvJbU.js} +1 -1
- package/dist/{index-dEfSQ43r.js → index-B3IhN22s.js} +1 -1
- package/dist/{index-MVfpQsRI.js → index-B3T_0jO2.js} +3 -3
- package/dist/{index-C57WFxg7.js → index-BagVZkdk.js} +2 -2
- package/dist/{index-Dhd9eEjz.js → index-BeW-BxcE.js} +1 -1
- package/dist/{index-C641kFzY.js → index-BoDbRee_.js} +1 -1
- package/dist/{index-DAcwqenP.js → index-C6iTrQ-p.js} +7 -7
- package/dist/{index-D6CbkBm6.js → index-CJMFN-JV.js} +3 -3
- package/dist/{index-CedoUPYn.js → index-CMSKFejw.js} +2 -2
- package/dist/{index-BIqP1bQh.js → index-CpqSrwMX.js} +2 -2
- package/dist/{index-DUr59xHS.js → index-DGp5iEyx.js} +2 -2
- package/dist/{index-DJQVYP1Z.js → index-DGpe4auo.js} +1 -1
- package/dist/{index-BRk5I8NE.js → index-DKm7rszt.js} +1 -1
- package/dist/{index-COB25nai.js → index-DTDGCVKV.js} +4 -4
- package/dist/{index-FcdiLtUc.js → index-DXR3e2yE.js} +8 -8
- package/dist/{index-HctLGyyi.js → index-DzelXsaZ.js} +4 -4
- package/dist/{index-onmieavP.js → index-lSJu-_m2.js} +7746 -5975
- package/dist/{index-DXNB9FHg.js → index-xtTYwD-W.js} +2 -2
- package/dist/{index.esm2017-BUZxOBD5.js → index.esm2017-Bm5C6Wxi.js} +1 -1
- package/dist/{loading-D3jN17Xy.js → loading-DoiqPnnv.js} +1 -1
- package/dist/{lodash-DvKbipfn.js → lodash-CrTM0DQe.js} +1 -1
- package/dist/{member-import-BuytQk0w.js → member-import-_VaTYOMn.js} +1 -1
- package/dist/{membership-Beh_I5Kj.js → membership-Dm8t6-K5.js} +2 -2
- package/dist/{money-C3v95tda.js → money-D0kv1vnT.js} +1 -1
- package/dist/{number-Cc7Yq2nP.js → number-BymDKXn2.js} +1 -1
- package/dist/{objectid-fKMrrct7.js → objectid-CC_whd1t.js} +9 -9
- package/dist/{onboarding-DJgY8HJr.js → onboarding-P6c1Ebh4.js} +3 -3
- package/dist/{onboardingSetup-DJJLdr11.js → onboardingSetup-Ca4782qf.js} +2 -2
- package/dist/{plugins-CcGeLF_l.js → plugins-BN9qJUUc.js} +3 -3
- package/dist/{reward-4aAVrRc8.js → reward-dfKI7Nq1.js} +1 -1
- package/dist/{rule-D6x2GyGw.js → rule-Cu-_boGe.js} +9 -9
- package/dist/{template-Dafdx5YI.js → template-D2qwGN2m.js} +6 -6
- package/dist/{timezone-BDIlVTOp.js → timezone-DjMsHrhm.js} +1 -1
- package/dist/{transaction.fn-CBVylmzu.js → transaction.fn-Bj5yz8tS.js} +2 -2
- package/dist/{trigger-ChNg0oG9.js → trigger-CFjJj6Ri.js} +5 -5
- package/dist/{useMarketingMaterialActions-LSsbTrFn.js → useMarketingMaterialActions-Dx8ZTmHW.js} +3 -3
- package/dist/{usePagination-CqPRf6q3.js → usePagination-CN2auZK8.js} +1 -1
- package/dist/{user-6kqmEFbR.js → user-CL05OSdb.js} +1 -1
- package/dist/{vue-i18n-BJ_ZHWvK.js → vue-i18n-CJMFzslC.js} +383 -383
- package/dist/{xlsx-CWXvmWqg.js → xlsx-BoSbkiXt.js} +1 -1
- package/dist/{zod-DBefBbjY.js → zod-6X3ups5P.js} +1 -1
- package/package.json +1 -1
- package/dist/MainLayout-VDwSL1-n.js +0 -4
- package/dist/WhatsappBotSettings-CxcuCZ-V.js +0 -394
- package/dist/WhatsappLayout-Db3329On.js +0 -21
- package/dist/feature-flag-Dfon0BoK.js +0 -18
- package/dist/index-Cfr0vxa5.js +0 -1775
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
import { defineComponent as L, mergeModels as U, useModel as A, resolveComponent as k, openBlock as c, createElementBlock as p, createElementVNode as r, toDisplayString as m, unref as e, createVNode as g, computed as E, Fragment as N, renderList as X, normalizeClass as D, createTextVNode as O, createCommentVNode as T, withDirectives as Y, vModelRadio as Z, ref as f, watch as ee, onBeforeUnmount as te, createBlock as oe } from "vue";
|
|
2
|
+
import { u as M } from "./vue-i18n-CJMFzslC.js";
|
|
3
|
+
import { useSnackbar as ae } from "@feedmepos/ui-library";
|
|
4
|
+
import { F as j, a as C, b as le, c as se, d as ne, e as $, f as re } from "./index-DgkRREfK.js";
|
|
5
|
+
import { S as ie } from "./index-lSJu-_m2.js";
|
|
6
|
+
import { w as z } from "./index-8c7H1u7j.js";
|
|
7
|
+
import { p as ce } from "./plugins-BN9qJUUc.js";
|
|
8
|
+
const de = { class: "flex flex-col gap-[16px]" }, pe = { class: "flex flex-col gap-[4px]" }, ue = { class: "text-[16px] leading-[24px] font-semibold" }, me = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary" }, ve = /* @__PURE__ */ L({
|
|
9
|
+
__name: "BotInstructions",
|
|
10
|
+
props: /* @__PURE__ */ U({
|
|
11
|
+
disabled: { type: Boolean }
|
|
12
|
+
}, {
|
|
13
|
+
modelValue: { required: !0 },
|
|
14
|
+
modelModifiers: {}
|
|
15
|
+
}),
|
|
16
|
+
emits: ["update:modelValue"],
|
|
17
|
+
setup(d) {
|
|
18
|
+
const o = A(d, "modelValue"), { t: a } = M();
|
|
19
|
+
return (i, t) => {
|
|
20
|
+
const v = k("FmTextarea");
|
|
21
|
+
return c(), p("div", de, [
|
|
22
|
+
r("div", pe, [
|
|
23
|
+
r("h2", ue, m(e(a)("connect.whatsappBot.botSettings.instructions")), 1),
|
|
24
|
+
r("p", me, m(e(a)("connect.whatsappBot.botSettings.description")), 1)
|
|
25
|
+
]),
|
|
26
|
+
g(v, {
|
|
27
|
+
modelValue: o.value,
|
|
28
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => o.value = n),
|
|
29
|
+
"aria-label": e(a)("connect.whatsappBot.botSettings.instructions"),
|
|
30
|
+
placeholder: e(a)("connect.whatsappBot.botSettings.placeholder"),
|
|
31
|
+
"max-length": e(j),
|
|
32
|
+
disabled: d.disabled,
|
|
33
|
+
"show-word-count": "",
|
|
34
|
+
class: "bot-instructions-textarea"
|
|
35
|
+
}, null, 8, ["modelValue", "aria-label", "placeholder", "max-length", "disabled"])
|
|
36
|
+
]);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}), xe = {
|
|
40
|
+
"aria-labelledby": "knowledge-base-title",
|
|
41
|
+
class: "border-t-[1px] border-fm-color-neutral-gray-100 pt-[20px] flex flex-col gap-[12px]"
|
|
42
|
+
}, be = { class: "flex flex-col gap-[4px]" }, ge = {
|
|
43
|
+
id: "knowledge-base-title",
|
|
44
|
+
class: "text-[16px] leading-[24px] font-semibold"
|
|
45
|
+
}, fe = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary" }, he = { class: "flex flex-wrap gap-[8px]" }, _e = ["title", "aria-expanded", "disabled", "onClick"], ye = ["disabled"], we = {
|
|
46
|
+
key: 0,
|
|
47
|
+
class: "text-[14px] text-fm-color-typo-tertiary"
|
|
48
|
+
}, Se = {
|
|
49
|
+
key: 1,
|
|
50
|
+
class: "text-[14px] text-fm-color-typo-secondary"
|
|
51
|
+
}, Be = /* @__PURE__ */ L({
|
|
52
|
+
__name: "KnowledgeBase",
|
|
53
|
+
props: /* @__PURE__ */ U({
|
|
54
|
+
disabled: { type: Boolean }
|
|
55
|
+
}, {
|
|
56
|
+
modelValue: {
|
|
57
|
+
required: !0
|
|
58
|
+
},
|
|
59
|
+
modelModifiers: {},
|
|
60
|
+
activeTopicIndex: {
|
|
61
|
+
required: !0
|
|
62
|
+
},
|
|
63
|
+
activeTopicIndexModifiers: {}
|
|
64
|
+
}),
|
|
65
|
+
emits: ["update:modelValue", "update:activeTopicIndex"],
|
|
66
|
+
setup(d) {
|
|
67
|
+
const o = d, a = A(d, "modelValue"), i = A(d, "activeTopicIndex"), { t } = M(), v = E(
|
|
68
|
+
() => i.value === null ? null : a.value[i.value]
|
|
69
|
+
);
|
|
70
|
+
function n() {
|
|
71
|
+
o.disabled || a.value.length >= C || (a.value.push({ title: "", description: "" }), i.value = a.value.length - 1);
|
|
72
|
+
}
|
|
73
|
+
function _() {
|
|
74
|
+
o.disabled || i.value === null || (a.value.splice(i.value, 1), i.value = null);
|
|
75
|
+
}
|
|
76
|
+
return (y, w) => {
|
|
77
|
+
const h = k("FmIcon"), F = k("FmTextField"), P = k("FmTextarea"), S = k("FmButton");
|
|
78
|
+
return c(), p("section", xe, [
|
|
79
|
+
r("div", be, [
|
|
80
|
+
r("h2", ge, m(e(t)("connect.whatsappBot.botSettings.knowledgeBase.title")), 1),
|
|
81
|
+
r("p", fe, m(e(t)("connect.whatsappBot.botSettings.knowledgeBase.description")), 1)
|
|
82
|
+
]),
|
|
83
|
+
r("div", he, [
|
|
84
|
+
(c(!0), p(N, null, X(a.value, (u, x) => (c(), p("button", {
|
|
85
|
+
key: x,
|
|
86
|
+
type: "button",
|
|
87
|
+
title: u.title.trim() || e(t)("connect.whatsappBot.botSettings.knowledgeBase.untitled"),
|
|
88
|
+
"aria-expanded": i.value === x,
|
|
89
|
+
"aria-controls": "knowledge-topic-editor",
|
|
90
|
+
disabled: d.disabled,
|
|
91
|
+
class: D(["h-[32px] max-w-[240px] rounded-[8px] border-[1px] px-[12px] truncate text-[14px] font-medium transition-colors focus-visible:ring-2 focus-visible:ring-fm-color-primary disabled:opacity-60", [
|
|
92
|
+
i.value === x ? "border-fm-color-primary bg-fm-color-primary-oats text-fm-color-primary" : "border-fm-color-neutral-gray-200 bg-fm-color-neutral-white",
|
|
93
|
+
d.disabled ? "cursor-default" : "cursor-pointer hover:border-fm-color-primary"
|
|
94
|
+
]]),
|
|
95
|
+
onClick: (H) => i.value = i.value === x ? null : x
|
|
96
|
+
}, m(u.title.trim() || e(t)("connect.whatsappBot.botSettings.knowledgeBase.untitled")), 11, _e))), 128)),
|
|
97
|
+
r("button", {
|
|
98
|
+
type: "button",
|
|
99
|
+
disabled: d.disabled || a.value.length >= e(C),
|
|
100
|
+
class: "h-[32px] rounded-[8px] border-[1px] border-dashed border-fm-color-neutral-gray-200 bg-fm-color-neutral-white px-[12px] flex items-center gap-[6px] text-[14px] font-semibold text-fm-color-primary hover:border-fm-color-primary focus-visible:ring-2 focus-visible:ring-fm-color-primary disabled:opacity-60 disabled:cursor-default",
|
|
101
|
+
onClick: n
|
|
102
|
+
}, [
|
|
103
|
+
g(h, {
|
|
104
|
+
name: "add",
|
|
105
|
+
size: "sm"
|
|
106
|
+
}),
|
|
107
|
+
O(" " + m(e(t)("connect.whatsappBot.botSettings.knowledgeBase.addTopic")), 1)
|
|
108
|
+
], 8, ye)
|
|
109
|
+
]),
|
|
110
|
+
a.value.length === 0 ? (c(), p("p", we, m(e(t)("connect.whatsappBot.botSettings.knowledgeBase.empty")), 1)) : T("", !0),
|
|
111
|
+
a.value.length >= e(C) ? (c(), p("p", Se, m(e(t)("connect.whatsappBot.botSettings.knowledgeBase.topicLimit", {
|
|
112
|
+
count: e(C)
|
|
113
|
+
})), 1)) : T("", !0),
|
|
114
|
+
v.value ? (c(), p("div", {
|
|
115
|
+
id: "knowledge-topic-editor",
|
|
116
|
+
key: i.value ?? void 0,
|
|
117
|
+
class: "rounded-[8px] border-[1px] border-fm-color-neutral-gray-100 p-[16px] flex flex-col gap-[12px]"
|
|
118
|
+
}, [
|
|
119
|
+
g(F, {
|
|
120
|
+
modelValue: v.value.title,
|
|
121
|
+
"onUpdate:modelValue": w[0] || (w[0] = (u) => v.value.title = u),
|
|
122
|
+
label: e(t)("connect.whatsappBot.botSettings.knowledgeBase.titleLabel"),
|
|
123
|
+
placeholder: e(t)("connect.whatsappBot.botSettings.knowledgeBase.titlePlaceholder"),
|
|
124
|
+
"max-length": e(le),
|
|
125
|
+
disabled: d.disabled
|
|
126
|
+
}, null, 8, ["modelValue", "label", "placeholder", "max-length", "disabled"]),
|
|
127
|
+
g(P, {
|
|
128
|
+
modelValue: v.value.description,
|
|
129
|
+
"onUpdate:modelValue": w[1] || (w[1] = (u) => v.value.description = u),
|
|
130
|
+
label: e(t)("connect.whatsappBot.botSettings.knowledgeBase.descriptionLabel"),
|
|
131
|
+
placeholder: e(t)(
|
|
132
|
+
"connect.whatsappBot.botSettings.knowledgeBase.descriptionPlaceholder"
|
|
133
|
+
),
|
|
134
|
+
"max-length": e(se),
|
|
135
|
+
disabled: d.disabled,
|
|
136
|
+
"show-word-count": "",
|
|
137
|
+
class: "bot-instructions-textarea"
|
|
138
|
+
}, null, 8, ["modelValue", "label", "placeholder", "max-length", "disabled"]),
|
|
139
|
+
g(S, {
|
|
140
|
+
variant: "plain",
|
|
141
|
+
size: "sm",
|
|
142
|
+
"prepend-icon": "delete",
|
|
143
|
+
"text-color": "typo-error",
|
|
144
|
+
label: e(t)("connect.whatsappBot.botSettings.knowledgeBase.removeTopic"),
|
|
145
|
+
disabled: d.disabled,
|
|
146
|
+
class: "self-start",
|
|
147
|
+
onClick: _
|
|
148
|
+
}, null, 8, ["label", "disabled"])
|
|
149
|
+
])) : T("", !0)
|
|
150
|
+
]);
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}), ke = {
|
|
154
|
+
"aria-labelledby": "response-speed-title",
|
|
155
|
+
class: "border-t-[1px] border-fm-color-neutral-gray-100 pt-[20px] flex flex-col gap-[12px]"
|
|
156
|
+
}, Te = { class: "flex flex-col gap-[4px]" }, Ve = {
|
|
157
|
+
id: "response-speed-title",
|
|
158
|
+
class: "text-[16px] leading-[24px] font-semibold"
|
|
159
|
+
}, Fe = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary" }, Ie = {
|
|
160
|
+
role: "radiogroup",
|
|
161
|
+
"aria-labelledby": "response-speed-title",
|
|
162
|
+
"aria-describedby": "response-speed-detail",
|
|
163
|
+
class: "grid grid-cols-[repeat(auto-fit,minmax(150px,1fr))] gap-[8px]"
|
|
164
|
+
}, Ee = ["value", "disabled"], Pe = { class: "flex items-center gap-[8px] text-[14px] leading-[20px] font-semibold" }, Ce = {
|
|
165
|
+
key: 0,
|
|
166
|
+
class: "w-[8px] h-[8px] rounded-full bg-fm-color-primary"
|
|
167
|
+
}, $e = { class: "text-[12px] leading-[16px] text-fm-color-typo-secondary" }, Ae = {
|
|
168
|
+
id: "response-speed-detail",
|
|
169
|
+
"aria-live": "polite",
|
|
170
|
+
class: "text-[14px] leading-[20px] text-fm-color-typo-secondary"
|
|
171
|
+
}, Ne = {
|
|
172
|
+
key: 0,
|
|
173
|
+
class: "rounded-[8px] bg-fm-color-system-warning-100 px-[12px] py-[10px] flex items-start gap-[10px] text-[14px] leading-[20px]"
|
|
174
|
+
}, Oe = /* @__PURE__ */ L({
|
|
175
|
+
__name: "ResponseSpeed",
|
|
176
|
+
props: /* @__PURE__ */ U({
|
|
177
|
+
disabled: { type: Boolean }
|
|
178
|
+
}, {
|
|
179
|
+
modelValue: {
|
|
180
|
+
required: !0
|
|
181
|
+
},
|
|
182
|
+
modelModifiers: {}
|
|
183
|
+
}),
|
|
184
|
+
emits: ["update:modelValue"],
|
|
185
|
+
setup(d) {
|
|
186
|
+
const o = A(d, "modelValue"), { t: a } = M();
|
|
187
|
+
return (i, t) => {
|
|
188
|
+
const v = k("FmIcon");
|
|
189
|
+
return c(), p("section", ke, [
|
|
190
|
+
r("div", Te, [
|
|
191
|
+
r("h2", Ve, m(e(a)("connect.whatsappBot.botSettings.responseSpeed.title")), 1),
|
|
192
|
+
r("p", Fe, m(e(a)("connect.whatsappBot.botSettings.responseSpeed.description")), 1)
|
|
193
|
+
]),
|
|
194
|
+
r("div", Ie, [
|
|
195
|
+
(c(!0), p(N, null, X(e(ne), (n) => (c(), p("label", { key: n }, [
|
|
196
|
+
Y(r("input", {
|
|
197
|
+
"onUpdate:modelValue": t[0] || (t[0] = (_) => o.value = _),
|
|
198
|
+
type: "radio",
|
|
199
|
+
name: "response-speed",
|
|
200
|
+
value: n,
|
|
201
|
+
disabled: d.disabled,
|
|
202
|
+
class: "sr-only peer"
|
|
203
|
+
}, null, 8, Ee), [
|
|
204
|
+
[Z, o.value]
|
|
205
|
+
]),
|
|
206
|
+
r("span", {
|
|
207
|
+
class: D(["h-full border-[1px] rounded-[8px] p-[12px] flex flex-col gap-[4px] transition-colors peer-focus-visible:ring-2 peer-focus-visible:ring-fm-color-primary", [
|
|
208
|
+
o.value === n ? "border-fm-color-primary bg-fm-color-primary-oats" : "border-fm-color-neutral-gray-200 bg-fm-color-neutral-white",
|
|
209
|
+
d.disabled ? "cursor-default opacity-60" : "cursor-pointer hover:border-fm-color-primary"
|
|
210
|
+
]])
|
|
211
|
+
}, [
|
|
212
|
+
r("span", Pe, [
|
|
213
|
+
r("span", {
|
|
214
|
+
"aria-hidden": "true",
|
|
215
|
+
class: D([
|
|
216
|
+
"w-[16px] h-[16px] shrink-0 rounded-full border-[1.5px] bg-fm-color-neutral-white flex items-center justify-center",
|
|
217
|
+
o.value === n ? "border-fm-color-primary" : "border-fm-color-neutral-gray-300"
|
|
218
|
+
])
|
|
219
|
+
}, [
|
|
220
|
+
o.value === n ? (c(), p("span", Ce)) : T("", !0)
|
|
221
|
+
], 2),
|
|
222
|
+
O(" " + m(e(a)(`connect.whatsappBot.botSettings.responseSpeed.${n}.label`)), 1)
|
|
223
|
+
]),
|
|
224
|
+
r("span", $e, m(e(a)(`connect.whatsappBot.botSettings.responseSpeed.${n}.hint`)), 1)
|
|
225
|
+
], 2)
|
|
226
|
+
]))), 128))
|
|
227
|
+
]),
|
|
228
|
+
r("p", Ae, m(e(a)(
|
|
229
|
+
`connect.whatsappBot.botSettings.responseSpeed.${o.value}.detail`
|
|
230
|
+
)), 1),
|
|
231
|
+
o.value === "immediate" ? (c(), p("div", Ne, [
|
|
232
|
+
g(v, {
|
|
233
|
+
name: "warning",
|
|
234
|
+
size: "sm",
|
|
235
|
+
class: "mt-[2px] shrink-0 text-fm-color-typo-warning"
|
|
236
|
+
}),
|
|
237
|
+
O(" " + m(e(a)("connect.whatsappBot.botSettings.responseSpeed.immediateWarning")), 1)
|
|
238
|
+
])) : T("", !0)
|
|
239
|
+
]);
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
}), Le = { class: "mt-[24px] w-full flex flex-col gap-[20px]" }, Me = {
|
|
243
|
+
key: 0,
|
|
244
|
+
role: "status",
|
|
245
|
+
class: "py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
246
|
+
}, We = {
|
|
247
|
+
key: 1,
|
|
248
|
+
role: "alert",
|
|
249
|
+
class: "text-[14px] text-fm-color-typo-error"
|
|
250
|
+
}, De = { class: "flex items-center justify-end gap-[12px] flex-wrap" }, je = /* @__PURE__ */ L({
|
|
251
|
+
__name: "WhatsappBotSettings",
|
|
252
|
+
setup(d) {
|
|
253
|
+
const { t: o } = M(), a = ae(), i = E(() => ie.getBusinessId() ?? ""), t = f(""), v = f(""), n = f([]), _ = f([]), y = f(null), w = E(
|
|
254
|
+
() => n.value.filter(
|
|
255
|
+
(l) => l.title.trim() || l.description.trim()
|
|
256
|
+
)
|
|
257
|
+
), h = f(
|
|
258
|
+
$
|
|
259
|
+
), F = f(
|
|
260
|
+
$
|
|
261
|
+
), P = f(!0), S = f(!1), u = f(!1), x = f(""), H = j, J = E(
|
|
262
|
+
() => t.value !== v.value || h.value !== F.value || JSON.stringify(n.value) !== JSON.stringify(_.value)
|
|
263
|
+
), W = E(
|
|
264
|
+
() => !S.value || u.value || !J.value
|
|
265
|
+
), R = E(
|
|
266
|
+
() => !S.value || u.value || t.value.length > H || !re.safeParse(w.value).success
|
|
267
|
+
);
|
|
268
|
+
let b;
|
|
269
|
+
function G(l) {
|
|
270
|
+
t.value = l.botInstructions, v.value = l.botInstructions, h.value = l.responseSpeed, F.value = l.responseSpeed, n.value = l.knowledgeBase.map((s) => ({ ...s })), _.value = l.knowledgeBase.map((s) => ({
|
|
271
|
+
...s
|
|
272
|
+
}));
|
|
273
|
+
}
|
|
274
|
+
async function K() {
|
|
275
|
+
b == null || b.abort();
|
|
276
|
+
const l = new AbortController();
|
|
277
|
+
b = l, P.value = !0, S.value = !1, u.value = !1, x.value = "", t.value = "", v.value = "", h.value = $, F.value = $, n.value = [], _.value = [], y.value = null;
|
|
278
|
+
try {
|
|
279
|
+
if (!i.value)
|
|
280
|
+
throw new Error(o("connect.whatsappBot.errors.selectBusiness"));
|
|
281
|
+
const s = await z.getSettings(
|
|
282
|
+
i.value,
|
|
283
|
+
l.signal
|
|
284
|
+
);
|
|
285
|
+
if (l.signal.aborted) return;
|
|
286
|
+
G(s), S.value = !0;
|
|
287
|
+
} catch (s) {
|
|
288
|
+
l.signal.aborted || (x.value = s instanceof Error ? s.message : o("connect.whatsappBot.errors.loadSettings"));
|
|
289
|
+
} finally {
|
|
290
|
+
l.signal.aborted || (P.value = !1);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
async function q() {
|
|
294
|
+
if (R.value) return;
|
|
295
|
+
b == null || b.abort();
|
|
296
|
+
const l = new AbortController();
|
|
297
|
+
b = l, u.value = !0, x.value = "";
|
|
298
|
+
const s = y.value === null ? void 0 : n.value[y.value], I = s ? w.value.indexOf(s) : -1;
|
|
299
|
+
try {
|
|
300
|
+
const B = await z.saveSettings(
|
|
301
|
+
i.value,
|
|
302
|
+
{
|
|
303
|
+
botInstructions: t.value,
|
|
304
|
+
responseSpeed: h.value,
|
|
305
|
+
knowledgeBase: w.value
|
|
306
|
+
},
|
|
307
|
+
l.signal
|
|
308
|
+
);
|
|
309
|
+
if (l.signal.aborted) return;
|
|
310
|
+
G(B), y.value = I < 0 ? null : I, a.open({
|
|
311
|
+
type: "success",
|
|
312
|
+
message: o("connect.whatsappBot.botSettings.saved")
|
|
313
|
+
});
|
|
314
|
+
} catch (B) {
|
|
315
|
+
l.signal.aborted || (x.value = B instanceof Error ? B.message : o("connect.whatsappBot.errors.saveSettings"), a.open({ type: "error", message: x.value }));
|
|
316
|
+
} finally {
|
|
317
|
+
l.signal.aborted || (u.value = !1);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
async function Q() {
|
|
321
|
+
if (W.value) return;
|
|
322
|
+
const l = b;
|
|
323
|
+
!await ce.confirm(
|
|
324
|
+
o("connect.whatsappBot.botSettings.discardChangesMessage"),
|
|
325
|
+
o("connect.whatsappBot.botSettings.discardChangesTitle"),
|
|
326
|
+
o("connect.common.confirm"),
|
|
327
|
+
o("connect.common.cancel")
|
|
328
|
+
) || W.value || b !== l || (t.value = v.value, h.value = F.value, n.value = _.value.map((I) => ({ ...I })), y.value = null);
|
|
329
|
+
}
|
|
330
|
+
return ee(i, K, { immediate: !0 }), te(() => {
|
|
331
|
+
b == null || b.abort();
|
|
332
|
+
}), (l, s) => {
|
|
333
|
+
const I = k("FmCircularProgress"), B = k("FmButton");
|
|
334
|
+
return c(), p("div", Le, [
|
|
335
|
+
P.value ? (c(), p("div", Me, [
|
|
336
|
+
g(I),
|
|
337
|
+
O(" " + m(e(o)("connect.whatsappBot.botSettings.loading")), 1)
|
|
338
|
+
])) : (c(), p(N, { key: 1 }, [
|
|
339
|
+
S.value ? (c(), p(N, { key: 0 }, [
|
|
340
|
+
g(ve, {
|
|
341
|
+
modelValue: t.value,
|
|
342
|
+
"onUpdate:modelValue": s[0] || (s[0] = (V) => t.value = V),
|
|
343
|
+
disabled: u.value
|
|
344
|
+
}, null, 8, ["modelValue", "disabled"]),
|
|
345
|
+
g(Be, {
|
|
346
|
+
modelValue: n.value,
|
|
347
|
+
"onUpdate:modelValue": s[1] || (s[1] = (V) => n.value = V),
|
|
348
|
+
"active-topic-index": y.value,
|
|
349
|
+
"onUpdate:activeTopicIndex": s[2] || (s[2] = (V) => y.value = V),
|
|
350
|
+
disabled: u.value
|
|
351
|
+
}, null, 8, ["modelValue", "active-topic-index", "disabled"]),
|
|
352
|
+
g(Oe, {
|
|
353
|
+
modelValue: h.value,
|
|
354
|
+
"onUpdate:modelValue": s[3] || (s[3] = (V) => h.value = V),
|
|
355
|
+
disabled: u.value
|
|
356
|
+
}, null, 8, ["modelValue", "disabled"])
|
|
357
|
+
], 64)) : T("", !0),
|
|
358
|
+
x.value ? (c(), p("p", We, m(x.value), 1)) : T("", !0),
|
|
359
|
+
S.value ? T("", !0) : (c(), oe(B, {
|
|
360
|
+
key: 2,
|
|
361
|
+
class: "self-start",
|
|
362
|
+
label: e(o)("connect.whatsappBot.tryAgain"),
|
|
363
|
+
"prepend-icon": "refresh",
|
|
364
|
+
onClick: K
|
|
365
|
+
}, null, 8, ["label"])),
|
|
366
|
+
r("div", De, [
|
|
367
|
+
g(B, {
|
|
368
|
+
variant: "secondary",
|
|
369
|
+
label: e(o)("connect.common.cancel"),
|
|
370
|
+
disabled: W.value,
|
|
371
|
+
onClick: Q
|
|
372
|
+
}, null, 8, ["label", "disabled"]),
|
|
373
|
+
g(B, {
|
|
374
|
+
label: e(o)("connect.common.save"),
|
|
375
|
+
disabled: R.value,
|
|
376
|
+
loading: u.value,
|
|
377
|
+
onClick: q
|
|
378
|
+
}, null, 8, ["label", "disabled", "loading"])
|
|
379
|
+
])
|
|
380
|
+
], 64))
|
|
381
|
+
]);
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
export {
|
|
386
|
+
je as default
|
|
387
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as U, ref as h, computed as $, watch as L, onBeforeUnmount as R, resolveComponent as w, openBlock as n, createElementBlock as l, createElementVNode as s, toDisplayString as r, unref as c, createVNode as g, createTextVNode as b, createCommentVNode as B, Fragment as T, renderList as z } from "vue";
|
|
2
|
-
import { u as M } from "./vue-i18n-
|
|
3
|
-
import { S as A } from "./index-
|
|
4
|
-
import { w as W } from "./index-
|
|
2
|
+
import { u as M } from "./vue-i18n-CJMFzslC.js";
|
|
3
|
+
import { S as A } from "./index-lSJu-_m2.js";
|
|
4
|
+
import { w as W } from "./index-8c7H1u7j.js";
|
|
5
5
|
const G = { class: "mt-[20px] w-full flex flex-col gap-[16px]" }, H = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary" }, J = {
|
|
6
6
|
key: 0,
|
|
7
7
|
role: "status",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as n, watch as s, unref as a, openBlock as o, createBlock as r, createCommentVNode as p } from "vue";
|
|
2
|
+
import { useRouter as c } from "vue-router";
|
|
3
|
+
import { _ as u, a as _ } from "./MainLayout.vue_vue_type_script_setup_true_lang-fXA-ixLQ.js";
|
|
4
|
+
import { u as f } from "./feature-flag-3dM_IVQU.js";
|
|
5
|
+
import { R as i } from "./app-bGZlAIpq.js";
|
|
6
|
+
const y = /* @__PURE__ */ n({
|
|
7
|
+
__name: "WhatsappLayout",
|
|
8
|
+
setup(d) {
|
|
9
|
+
const m = c(), e = f();
|
|
10
|
+
return s(
|
|
11
|
+
() => e.loaded && !e.whatsappBotEnabled,
|
|
12
|
+
(t) => {
|
|
13
|
+
t && m.replace({ name: i["$connect-ANALYTIC"] });
|
|
14
|
+
},
|
|
15
|
+
{ immediate: !0 }
|
|
16
|
+
), (t, l) => a(e).loaded ? a(e).whatsappBotEnabled ? (o(), r(_, { key: 1 })) : p("", !0) : (o(), r(u, { key: 0 }));
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
y as default
|
|
21
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as f, useAttrs as y, resolveComponent as b, openBlock as l, createBlock as v, mergeProps as x, unref as t, createSlots as g, withCtx as h, createElementVNode as a, toDisplayString as n, renderSlot as k, createElementBlock as F, createCommentVNode as S } from "vue";
|
|
2
|
-
import { Z as d } from "./zod-
|
|
3
|
-
import { u as V } from "./vue-i18n-
|
|
2
|
+
import { Z as d } from "./zod-6X3ups5P.js";
|
|
3
|
+
import { u as V } from "./vue-i18n-CJMFzslC.js";
|
|
4
4
|
const B = { class: "fm-typo-en-body-lg-400 flex gap-4 text-fm-color-typo-primary items-center" }, C = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "text-fm-color-typo-tertiary"
|