@feedmepos/mf-connect 0.1.98-beta.86 → 0.1.98-beta.89
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-C3brXgJH.js → App-D4hRwK-o.js} +586 -569
- package/dist/{AuditLogs-CknggPMD.js → AuditLogs-D_PrLKVP.js} +13 -13
- package/dist/{Bin-BOE-Liwr.js → Bin-DF_1hlo5.js} +8 -8
- package/dist/{Broadcast-BStqQOUT.js → Broadcast-D81xkQ0B.js} +12 -12
- package/dist/{CampaignAnalytic-Dga32CpH.js → CampaignAnalytic-960oR5Nw.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CldyOaCt.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-WOfSfATi.js} +8 -8
- package/dist/{Card-CQxp73o4.js → Card-nF9lexRS.js} +23 -23
- package/dist/{Collections-BRms0YoR.js → Collections-CJbGLkwm.js} +8 -8
- package/dist/{Credit-DW7Vq-01.js → Credit-tfInnpDW.js} +12 -12
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BXK40fTr.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CAPxB3r7.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bv2r2gFI.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BM2UlBtj.js} +35 -36
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-TBjXJglM.js → EffectSheet.vue_vue_type_style_index_0_lang-BfrzJxWQ.js} +6 -6
- package/dist/{Experience-C_H8mmJJ.js → Experience-2uX3ESg5.js} +13 -13
- package/dist/{FileSaver.min-C5N6-O4l.js → FileSaver.min-DqWpgesn.js} +1 -1
- package/dist/{Game-LgNoMtbs.js → Game-BQtHns1v.js} +13 -13
- package/dist/{GiftCardSetup-DmL416w3.js → GiftCardSetup-B4I83SkJ.js} +10 -10
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-DqDerUNT.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-DujMhaOh.js} +7 -7
- package/dist/{Goals-D-maM_jj.js → Goals-DSkXACjH.js} +4 -4
- package/dist/{Grab-DKbgjw7e.js → Grab-ArpQ-7LU.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BZ3UDnkx.js → ImageInput.vue_vue_type_script_setup_true_lang-GdfKNEdQ.js} +1 -1
- package/dist/{Index-_cZDq1HS.js → Index-Bb8k7ofl.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Chm-x4fo.js → LocationPicker.vue_vue_type_script_setup_true_lang-tHLWrX4C.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Ez1QV7ON.js → LottieAnimation.vue_vue_type_script_setup_true_lang-C5E_mvcD.js} +1 -1
- package/dist/{LoyaltyDashboard-D1B3MjhC.js → LoyaltyDashboard-C-U8HulY.js} +23 -24
- package/dist/MainLayout-TV3HyBYh.js +4 -0
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-Bf-Kvl5W.js → MainLayout.vue_vue_type_script_setup_true_lang-lO1k_OLo.js} +5 -4
- package/dist/{Marketing-C4apg5nO.js → Marketing-CWe_R_3E.js} +4 -4
- package/dist/MarketingMaterialEdit-TGP6o6Vv.js +1037 -0
- package/dist/{Member-B2W3wm1r.js → Member-DDZ8TLLZ.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-l3edYke6.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CweUf6Iv.js} +24 -24
- package/dist/{MemberImportHistory-C3i6ekKS.js → MemberImportHistory-Til1afm1.js} +7 -7
- package/dist/{MemberList-CsIsMafE.js → MemberList-uoSeAZlO.js} +14 -14
- package/dist/{MemberTransactions-Cdndq5ic.js → MemberTransactions-MxJWI1es.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BtVvv1xd.js → MessageInput.vue_vue_type_script_setup_true_lang-B4H67Tvb.js} +10 -10
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DwXsAI7F.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DhHMIgza.js} +1 -1
- package/dist/{Mission-Fa1VYYZa.js → Mission-C_hcFlzC.js} +14 -14
- package/dist/{Overview-DSmO8LtX.js → Overview-B3ugdY_2.js} +4 -4
- package/dist/{Overview-oxeTbsQ8.js → Overview-Bxe-Kfci.js} +21 -21
- package/dist/{Point-CWpQn9W_.js → Point-BBVTyXIL.js} +14 -14
- package/dist/{Promotion-CoYdDRod.js → Promotion-D-44JTkv.js} +14 -14
- package/dist/{Queue-Bij3hgY2.js → Queue-BNjlzhJ_.js} +13 -13
- package/dist/{Record-Be2TI_X_.js → Record-C34UZ1q6.js} +9 -9
- package/dist/{Review-C-QnIayC.js → Review-C4iuNBR7.js} +2 -2
- package/dist/{ReviewFacebookCallback-CPyXfHvB.js → ReviewFacebookCallback-Bsp6WSaQ.js} +5 -5
- package/dist/{ReviewGoogleCallback-BPNB0btT.js → ReviewGoogleCallback-Ddqe1tZZ.js} +5 -5
- package/dist/{Reward-RyaVdYyZ.js → Reward-CjybtjcT.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-C2ebKu-S.js → RewardGroup.vue_vue_type_script_setup_true_lang-Do_obBgC.js} +14 -14
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BZ_wN3Gj.js → RuleGroup.vue_vue_type_script_setup_true_lang-BiGexpsh.js} +15 -15
- package/dist/{Segment-CE7Ca2Zo.js → Segment-BU5W9wBQ.js} +26 -26
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-vODQiSna.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Buih6X5R.js} +15 -15
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CgI_qWVw.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DN-VwmTf.js} +4 -4
- package/dist/{Setting-BC6ir0DR.js → Setting-BsCkMHQZ.js} +14 -14
- package/dist/{SettingAdvertisements-DLmxEwdG.js → SettingAdvertisements-CTTFCozw.js} +12 -12
- package/dist/{Settings-CF78Ug2K.js → Settings-D3_nrJff.js} +5 -5
- package/dist/{Store-CZTZTO1x.js → Store-DRWKc7Q7.js} +29 -30
- package/dist/{StoreRewards-BdtlvNcm.js → StoreRewards-_4iqQsak.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DSKYWLE_.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Db4fakO6.js} +25 -25
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DsQiBOV4.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CAO3Ycxn.js} +2 -2
- package/dist/{Tier-5eUYHhoX.js → Tier-Cj_4Z8PG.js} +27 -27
- package/dist/{Title-ibn2JnRB.js → Title-Bjg44PZP.js} +23 -23
- package/dist/{Transaction-BZzL13MU.js → Transaction-DbehbwRK.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DUv9nFqV.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DeMdcwb2.js} +6 -6
- package/dist/{Voucher-B6qYDcnp.js → Voucher-DARWiV1M.js} +18 -18
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CI7NwvnH.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BYNjq7K0.js} +12 -12
- package/dist/WhatsappAccount-CBx-FoRb.js +158 -0
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BFUOuRGy.js +39 -0
- package/dist/{WhatsappBot-BhrP6JnO.js → WhatsappBot-MSJq0pE4.js} +229 -221
- package/dist/WhatsappBotLogs-CEyUngzi.js +372 -0
- package/dist/WhatsappBotSettings-NIE8NeN4.js +387 -0
- package/dist/{WhatsappBotTickets-DJnC4c2j.js → WhatsappBotTickets-OCmEkzeD.js} +3 -3
- package/dist/WhatsappLayout-DLPLalle.js +21 -0
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-D_bVWePp.js +195 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C2nesHNf.js → ZodTextField.vue_vue_type_script_setup_true_lang-HVcTakep.js} +2 -2
- package/dist/{app-C5bfcrJd.js → app-CsPUjtBR.js} +670 -522
- package/dist/app.js +1 -1
- package/dist/{base.export-0man_ZSH.js → base.export-CSSDz0q9.js} +2 -2
- package/dist/{business-BW09R8w1.js → business-BwGS0vma.js} +5 -5
- package/dist/{campaign-Dxbvq3Zl.js → campaign-Bw44Blhh.js} +8 -8
- package/dist/{campaign-gSM8Uzyl.js → campaign-CwfENerv.js} +2 -2
- package/dist/{campaign.fn-CzNJtky2.js → campaign.fn-Bx7g_BvU.js} +31 -31
- package/dist/{collection.fn-BVUdafur.js → collection.fn-Ba8-HPHO.js} +2 -2
- package/dist/{currency-CcWkcszY.js → currency-CO5xQCxT.js} +1 -1
- package/dist/{duplicateCampaign-DDfAc-AY.js → duplicateCampaign-C2FQFuzl.js} +2 -2
- package/dist/{effect-Dn7anzDq.js → effect-BUxZHyCk.js} +1 -1
- package/dist/{email-addresses-BRRFCqW3.js → email-addresses-CfdqSZi6.js} +2 -2
- package/dist/feature-flag-DpIT0Nh2.js +50 -0
- package/dist/{helper-DPI5b1e1.js → helper-miVbMaVy.js} +1 -1
- package/dist/{index-D9SBKZvv.js → index-BC30mczi.js} +9 -9
- package/dist/{index-ZLyACIvN.js → index-Bshl0e-c.js} +2 -2
- package/dist/{index-_EvVNmhF.js → index-CMGEBPm-.js} +7746 -5975
- package/dist/{index-DtZ450Y-.js → index-CNX6rFiO.js} +3 -3
- package/dist/{index-CeDuysyp.js → index-CW07TXqO.js} +2 -2
- package/dist/{index-Dv9W26wg.js → index-CYVDCxVj.js} +1 -1
- package/dist/{index-Bi4203Wb.js → index-Co3X9LyE.js} +1 -1
- package/dist/{index-DPS6iW7Q.js → index-CxzJwolN.js} +1 -1
- package/dist/{index-D8rPhlZa.js → index-CyMrx8XA.js} +1 -1
- package/dist/{index-KNE2wEbP.js → index-D6RtVzN9.js} +2 -2
- package/dist/{index-CoFJoIox.js → index-DIOb3eOI.js} +14 -14
- package/dist/{index-BsSqDkI8.js → index-DSwOhkYZ.js} +2 -2
- package/dist/{index-U6kp2_A3.js → index-DgnQ18-j.js} +1 -1
- package/dist/{index-BBLmqV8g.js → index-Dy7VtHTZ.js} +3 -3
- package/dist/{index-xLDLoo67.js → index-L7SBt-2D.js} +19 -13
- package/dist/index-RwNlbTO8.js +115 -0
- package/dist/{index-BQ-9m3Ro.js → index-Se-R3ekJ.js} +2 -2
- package/dist/{index-BLQbc3Rv.js → index-bJ2Ur1Yd.js} +1 -1
- package/dist/{index-LSYjttVr.js → index-gP-EJA-Y.js} +2 -2
- package/dist/{index-ButxHAMi.js → index-mBHnjwCf.js} +10 -10
- package/dist/{index-sVyIf_p-.js → index-nZUfIfsn.js} +4 -4
- package/dist/{index.esm2017-DQJ6E2gu.js → index.esm2017-DlOLsAJL.js} +1 -1
- package/dist/{loading-DOyd2D4O.js → loading-BEDz7eTi.js} +1 -1
- package/dist/{lodash-BLqC3Cwx.js → lodash-Bx7d35Zs.js} +1 -1
- package/dist/{member-import-x7Vw0b3w.js → member-import-D4zgQyJX.js} +1 -1
- package/dist/{membership-CE9vEP2d.js → membership-VJBDeKcE.js} +2 -2
- package/dist/{money-CX-ZAEDu.js → money-Dh0agFMv.js} +1 -1
- package/dist/{number-CSungdQc.js → number-D2coZpxW.js} +1 -1
- package/dist/{objectid-DwEAf7Cc.js → objectid-DVSB63oC.js} +10 -10
- package/dist/{onboarding-BAJgDH9y.js → onboarding-CLwhjKAL.js} +3 -3
- package/dist/{onboardingSetup-GvIYNiAE.js → onboardingSetup-78evK8yB.js} +2 -2
- package/dist/{plugins-B1AphVoU.js → plugins-CKViI6Y3.js} +3 -3
- package/dist/{MarketingMaterialEdit-Dcjzvwfv.js → remy-icon-BhUGu2NI.js} +2 -1034
- package/dist/{reward-D2zC58M2.js → reward-Drd9EaxJ.js} +1 -1
- package/dist/{rule-CxoPKAlI.js → rule-Dr21X2h0.js} +10 -10
- package/dist/{template-KRS1NbWX.js → template-yVg3lQKo.js} +6 -6
- package/dist/{timezone-CW8sKc69.js → timezone-CGlmgCYo.js} +1 -1
- package/dist/{transaction.fn-Djbx8lHM.js → transaction.fn-outAFFwM.js} +2 -2
- package/dist/{trigger-RkjkEHrL.js → trigger-C1GL_8pm.js} +7 -7
- package/dist/{useMarketingMaterialActions-BUnl-bFY.js → useMarketingMaterialActions-D8MIFnMy.js} +3 -3
- package/dist/{usePagination-vdRzCfJw.js → usePagination-Dlx9q4a8.js} +1 -1
- package/dist/useWhatsappAccount-1Yy7aaA9.js +62 -0
- package/dist/{user-CamDVkKA.js → user-BtORKvTK.js} +1 -1
- package/dist/{vue-i18n-DwgfDwGn.js → vue-i18n-CkZqjA2G.js} +355 -355
- package/dist/{xlsx-DkuYe2Jz.js → xlsx-HAQ29LQq.js} +1 -1
- package/dist/{zod-BDeUQtCa.js → zod-DByiKRxr.js} +1 -1
- package/package.json +1 -1
- package/dist/MainLayout-C115sjz6.js +0 -4
- package/dist/WhatsappAccount-CodbP5kY.js +0 -342
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BAgSc0i4.js +0 -97
- package/dist/WhatsappBotSettings-CjDKw25J.js +0 -394
- package/dist/WhatsappLayout-BgW1ASQE.js +0 -21
- package/dist/feature-flag-D2MJ8eLY.js +0 -18
- package/dist/index-BVdImOs0.js +0 -1775
- package/dist/index-DgkRREfK.js +0 -72
|
@@ -1,394 +0,0 @@
|
|
|
1
|
-
import { defineComponent as W, mergeModels as U, useModel as O, resolveComponent as w, openBlock as d, createElementBlock as c, createElementVNode as i, toDisplayString as u, unref as e, createVNode as b, computed as F, Fragment as L, renderList as Q, normalizeClass as M, createTextVNode as P, createCommentVNode as S, withDirectives as oe, vModelRadio as le, ref as g, watch as j, onBeforeUnmount as ae, createBlock as se } from "vue";
|
|
2
|
-
import { u as D } from "./vue-i18n-DwgfDwGn.js";
|
|
3
|
-
import { F as Y, a as C, b as ne, c as re, d as ie, e as N, f as de } from "./index-DgkRREfK.js";
|
|
4
|
-
import { S as ce } from "./index-BVdImOs0.js";
|
|
5
|
-
import { w as J } from "./index-xLDLoo67.js";
|
|
6
|
-
const pe = { class: "flex flex-col gap-[16px]" }, ue = { class: "flex flex-col gap-[4px]" }, me = { class: "text-[16px] leading-[24px] font-semibold" }, ve = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary" }, xe = /* @__PURE__ */ W({
|
|
7
|
-
__name: "BotInstructions",
|
|
8
|
-
props: /* @__PURE__ */ U({
|
|
9
|
-
disabled: { type: Boolean }
|
|
10
|
-
}, {
|
|
11
|
-
modelValue: { required: !0 },
|
|
12
|
-
modelModifiers: {}
|
|
13
|
-
}),
|
|
14
|
-
emits: ["update:modelValue"],
|
|
15
|
-
setup(p) {
|
|
16
|
-
const s = O(p, "modelValue"), { t } = D();
|
|
17
|
-
return (l, a) => {
|
|
18
|
-
const r = w("FmTextarea");
|
|
19
|
-
return d(), c("div", pe, [
|
|
20
|
-
i("div", ue, [
|
|
21
|
-
i("h2", me, u(e(t)("connect.whatsappBot.botSettings.instructions")), 1),
|
|
22
|
-
i("p", ve, u(e(t)("connect.whatsappBot.botSettings.description")), 1)
|
|
23
|
-
]),
|
|
24
|
-
b(r, {
|
|
25
|
-
modelValue: s.value,
|
|
26
|
-
"onUpdate:modelValue": a[0] || (a[0] = (m) => s.value = m),
|
|
27
|
-
"aria-label": e(t)("connect.whatsappBot.botSettings.instructions"),
|
|
28
|
-
placeholder: e(t)("connect.whatsappBot.botSettings.placeholder"),
|
|
29
|
-
"max-length": e(Y),
|
|
30
|
-
disabled: p.disabled,
|
|
31
|
-
"show-word-count": "",
|
|
32
|
-
class: "bot-instructions-textarea"
|
|
33
|
-
}, null, 8, ["modelValue", "aria-label", "placeholder", "max-length", "disabled"])
|
|
34
|
-
]);
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
}), be = {
|
|
38
|
-
"aria-labelledby": "knowledge-base-title",
|
|
39
|
-
class: "border-t-[1px] border-fm-color-neutral-gray-100 pt-[20px] flex flex-col gap-[12px]"
|
|
40
|
-
}, ge = { class: "flex flex-col gap-[4px]" }, fe = {
|
|
41
|
-
id: "knowledge-base-title",
|
|
42
|
-
class: "text-[16px] leading-[24px] font-semibold"
|
|
43
|
-
}, he = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary" }, _e = { class: "flex flex-wrap gap-[8px]" }, ye = ["title", "aria-expanded", "disabled", "onClick"], we = ["disabled"], Se = {
|
|
44
|
-
key: 0,
|
|
45
|
-
class: "text-[14px] text-fm-color-typo-tertiary"
|
|
46
|
-
}, Be = {
|
|
47
|
-
key: 1,
|
|
48
|
-
class: "text-[14px] text-fm-color-typo-secondary"
|
|
49
|
-
}, ke = /* @__PURE__ */ W({
|
|
50
|
-
__name: "KnowledgeBase",
|
|
51
|
-
props: /* @__PURE__ */ U({
|
|
52
|
-
disabled: { type: Boolean }
|
|
53
|
-
}, {
|
|
54
|
-
modelValue: {
|
|
55
|
-
required: !0
|
|
56
|
-
},
|
|
57
|
-
modelModifiers: {},
|
|
58
|
-
activeTopicIndex: {
|
|
59
|
-
required: !0
|
|
60
|
-
},
|
|
61
|
-
activeTopicIndexModifiers: {}
|
|
62
|
-
}),
|
|
63
|
-
emits: ["update:modelValue", "update:activeTopicIndex"],
|
|
64
|
-
setup(p) {
|
|
65
|
-
const s = p, t = O(p, "modelValue"), l = O(p, "activeTopicIndex"), { t: a } = D(), r = F(
|
|
66
|
-
() => l.value === null ? null : t.value[l.value]
|
|
67
|
-
);
|
|
68
|
-
function m() {
|
|
69
|
-
s.disabled || t.value.length >= C || (t.value.push({ title: "", description: "" }), l.value = t.value.length - 1);
|
|
70
|
-
}
|
|
71
|
-
function f() {
|
|
72
|
-
s.disabled || l.value === null || (t.value.splice(l.value, 1), l.value = null);
|
|
73
|
-
}
|
|
74
|
-
return ($, v) => {
|
|
75
|
-
const V = w("FmIcon"), I = w("FmTextField"), k = w("FmTextarea"), _ = w("FmButton");
|
|
76
|
-
return d(), c("section", be, [
|
|
77
|
-
i("div", ge, [
|
|
78
|
-
i("h2", fe, u(e(a)("connect.whatsappBot.botSettings.knowledgeBase.title")), 1),
|
|
79
|
-
i("p", he, u(e(a)("connect.whatsappBot.botSettings.knowledgeBase.description")), 1)
|
|
80
|
-
]),
|
|
81
|
-
i("div", _e, [
|
|
82
|
-
(d(!0), c(L, null, Q(t.value, (x, y) => (d(), c("button", {
|
|
83
|
-
key: y,
|
|
84
|
-
type: "button",
|
|
85
|
-
title: x.title.trim() || e(a)("connect.whatsappBot.botSettings.knowledgeBase.untitled"),
|
|
86
|
-
"aria-expanded": l.value === y,
|
|
87
|
-
"aria-controls": "knowledge-topic-editor",
|
|
88
|
-
disabled: p.disabled,
|
|
89
|
-
class: M(["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", [
|
|
90
|
-
l.value === y ? "border-fm-color-primary bg-fm-color-primary-oats text-fm-color-primary" : "border-fm-color-neutral-gray-200 bg-fm-color-neutral-white",
|
|
91
|
-
p.disabled ? "cursor-default" : "cursor-pointer hover:border-fm-color-primary"
|
|
92
|
-
]]),
|
|
93
|
-
onClick: (H) => l.value = l.value === y ? null : y
|
|
94
|
-
}, u(x.title.trim() || e(a)("connect.whatsappBot.botSettings.knowledgeBase.untitled")), 11, ye))), 128)),
|
|
95
|
-
i("button", {
|
|
96
|
-
type: "button",
|
|
97
|
-
disabled: p.disabled || t.value.length >= e(C),
|
|
98
|
-
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",
|
|
99
|
-
onClick: m
|
|
100
|
-
}, [
|
|
101
|
-
b(V, {
|
|
102
|
-
name: "add",
|
|
103
|
-
size: "sm"
|
|
104
|
-
}),
|
|
105
|
-
P(" " + u(e(a)("connect.whatsappBot.botSettings.knowledgeBase.addTopic")), 1)
|
|
106
|
-
], 8, we)
|
|
107
|
-
]),
|
|
108
|
-
t.value.length === 0 ? (d(), c("p", Se, u(e(a)("connect.whatsappBot.botSettings.knowledgeBase.empty")), 1)) : S("", !0),
|
|
109
|
-
t.value.length >= e(C) ? (d(), c("p", Be, u(e(a)("connect.whatsappBot.botSettings.knowledgeBase.topicLimit", {
|
|
110
|
-
count: e(C)
|
|
111
|
-
})), 1)) : S("", !0),
|
|
112
|
-
r.value ? (d(), c("div", {
|
|
113
|
-
id: "knowledge-topic-editor",
|
|
114
|
-
key: l.value ?? void 0,
|
|
115
|
-
class: "rounded-[8px] border-[1px] border-fm-color-neutral-gray-100 p-[16px] flex flex-col gap-[12px]"
|
|
116
|
-
}, [
|
|
117
|
-
b(I, {
|
|
118
|
-
modelValue: r.value.title,
|
|
119
|
-
"onUpdate:modelValue": v[0] || (v[0] = (x) => r.value.title = x),
|
|
120
|
-
label: e(a)("connect.whatsappBot.botSettings.knowledgeBase.titleLabel"),
|
|
121
|
-
placeholder: e(a)("connect.whatsappBot.botSettings.knowledgeBase.titlePlaceholder"),
|
|
122
|
-
"max-length": e(ne),
|
|
123
|
-
disabled: p.disabled
|
|
124
|
-
}, null, 8, ["modelValue", "label", "placeholder", "max-length", "disabled"]),
|
|
125
|
-
b(k, {
|
|
126
|
-
modelValue: r.value.description,
|
|
127
|
-
"onUpdate:modelValue": v[1] || (v[1] = (x) => r.value.description = x),
|
|
128
|
-
label: e(a)("connect.whatsappBot.botSettings.knowledgeBase.descriptionLabel"),
|
|
129
|
-
placeholder: e(a)(
|
|
130
|
-
"connect.whatsappBot.botSettings.knowledgeBase.descriptionPlaceholder"
|
|
131
|
-
),
|
|
132
|
-
"max-length": e(re),
|
|
133
|
-
disabled: p.disabled,
|
|
134
|
-
"show-word-count": "",
|
|
135
|
-
class: "bot-instructions-textarea"
|
|
136
|
-
}, null, 8, ["modelValue", "label", "placeholder", "max-length", "disabled"]),
|
|
137
|
-
b(_, {
|
|
138
|
-
variant: "plain",
|
|
139
|
-
size: "sm",
|
|
140
|
-
"prepend-icon": "delete",
|
|
141
|
-
"text-color": "typo-error",
|
|
142
|
-
label: e(a)("connect.whatsappBot.botSettings.knowledgeBase.removeTopic"),
|
|
143
|
-
disabled: p.disabled,
|
|
144
|
-
class: "self-start",
|
|
145
|
-
onClick: f
|
|
146
|
-
}, null, 8, ["label", "disabled"])
|
|
147
|
-
])) : S("", !0)
|
|
148
|
-
]);
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
}), Te = {
|
|
152
|
-
"aria-labelledby": "response-speed-title",
|
|
153
|
-
class: "border-t-[1px] border-fm-color-neutral-gray-100 pt-[20px] flex flex-col gap-[12px]"
|
|
154
|
-
}, Ve = { class: "flex flex-col gap-[4px]" }, Fe = {
|
|
155
|
-
id: "response-speed-title",
|
|
156
|
-
class: "text-[16px] leading-[24px] font-semibold"
|
|
157
|
-
}, Ie = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary" }, Ee = {
|
|
158
|
-
role: "radiogroup",
|
|
159
|
-
"aria-labelledby": "response-speed-title",
|
|
160
|
-
"aria-describedby": "response-speed-detail",
|
|
161
|
-
class: "grid grid-cols-[repeat(auto-fit,minmax(150px,1fr))] gap-[8px]"
|
|
162
|
-
}, Pe = ["value", "disabled"], $e = { class: "flex items-center gap-[8px] text-[14px] leading-[20px] font-semibold" }, Ae = {
|
|
163
|
-
key: 0,
|
|
164
|
-
class: "w-[8px] h-[8px] rounded-full bg-fm-color-primary"
|
|
165
|
-
}, Ce = { class: "text-[12px] leading-[16px] text-fm-color-typo-secondary" }, Ne = {
|
|
166
|
-
id: "response-speed-detail",
|
|
167
|
-
"aria-live": "polite",
|
|
168
|
-
class: "text-[14px] leading-[20px] text-fm-color-typo-secondary"
|
|
169
|
-
}, Oe = {
|
|
170
|
-
key: 0,
|
|
171
|
-
class: "rounded-[8px] bg-fm-color-system-warning-100 px-[12px] py-[10px] flex items-start gap-[10px] text-[14px] leading-[20px]"
|
|
172
|
-
}, Le = /* @__PURE__ */ W({
|
|
173
|
-
__name: "ResponseSpeed",
|
|
174
|
-
props: /* @__PURE__ */ U({
|
|
175
|
-
disabled: { type: Boolean }
|
|
176
|
-
}, {
|
|
177
|
-
modelValue: {
|
|
178
|
-
required: !0
|
|
179
|
-
},
|
|
180
|
-
modelModifiers: {}
|
|
181
|
-
}),
|
|
182
|
-
emits: ["update:modelValue"],
|
|
183
|
-
setup(p) {
|
|
184
|
-
const s = O(p, "modelValue"), { t } = D();
|
|
185
|
-
return (l, a) => {
|
|
186
|
-
const r = w("FmIcon");
|
|
187
|
-
return d(), c("section", Te, [
|
|
188
|
-
i("div", Ve, [
|
|
189
|
-
i("h2", Fe, u(e(t)("connect.whatsappBot.botSettings.responseSpeed.title")), 1),
|
|
190
|
-
i("p", Ie, u(e(t)("connect.whatsappBot.botSettings.responseSpeed.description")), 1)
|
|
191
|
-
]),
|
|
192
|
-
i("div", Ee, [
|
|
193
|
-
(d(!0), c(L, null, Q(e(ie), (m) => (d(), c("label", { key: m }, [
|
|
194
|
-
oe(i("input", {
|
|
195
|
-
"onUpdate:modelValue": a[0] || (a[0] = (f) => s.value = f),
|
|
196
|
-
type: "radio",
|
|
197
|
-
name: "response-speed",
|
|
198
|
-
value: m,
|
|
199
|
-
disabled: p.disabled,
|
|
200
|
-
class: "sr-only peer"
|
|
201
|
-
}, null, 8, Pe), [
|
|
202
|
-
[le, s.value]
|
|
203
|
-
]),
|
|
204
|
-
i("span", {
|
|
205
|
-
class: M(["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", [
|
|
206
|
-
s.value === m ? "border-fm-color-primary bg-fm-color-primary-oats" : "border-fm-color-neutral-gray-200 bg-fm-color-neutral-white",
|
|
207
|
-
p.disabled ? "cursor-default opacity-60" : "cursor-pointer hover:border-fm-color-primary"
|
|
208
|
-
]])
|
|
209
|
-
}, [
|
|
210
|
-
i("span", $e, [
|
|
211
|
-
i("span", {
|
|
212
|
-
"aria-hidden": "true",
|
|
213
|
-
class: M([
|
|
214
|
-
"w-[16px] h-[16px] shrink-0 rounded-full border-[1.5px] bg-fm-color-neutral-white flex items-center justify-center",
|
|
215
|
-
s.value === m ? "border-fm-color-primary" : "border-fm-color-neutral-gray-300"
|
|
216
|
-
])
|
|
217
|
-
}, [
|
|
218
|
-
s.value === m ? (d(), c("span", Ae)) : S("", !0)
|
|
219
|
-
], 2),
|
|
220
|
-
P(" " + u(e(t)(`connect.whatsappBot.botSettings.responseSpeed.${m}.label`)), 1)
|
|
221
|
-
]),
|
|
222
|
-
i("span", Ce, u(e(t)(`connect.whatsappBot.botSettings.responseSpeed.${m}.hint`)), 1)
|
|
223
|
-
], 2)
|
|
224
|
-
]))), 128))
|
|
225
|
-
]),
|
|
226
|
-
i("p", Ne, u(e(t)(
|
|
227
|
-
`connect.whatsappBot.botSettings.responseSpeed.${s.value}.detail`
|
|
228
|
-
)), 1),
|
|
229
|
-
s.value === "immediate" ? (d(), c("div", Oe, [
|
|
230
|
-
b(r, {
|
|
231
|
-
name: "warning",
|
|
232
|
-
size: "sm",
|
|
233
|
-
class: "mt-[2px] shrink-0 text-fm-color-typo-warning"
|
|
234
|
-
}),
|
|
235
|
-
P(" " + u(e(t)("connect.whatsappBot.botSettings.responseSpeed.immediateWarning")), 1)
|
|
236
|
-
])) : S("", !0)
|
|
237
|
-
]);
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
}), We = { class: "mt-[24px] w-full flex flex-col gap-[20px]" }, De = {
|
|
241
|
-
key: 0,
|
|
242
|
-
role: "status",
|
|
243
|
-
class: "py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
244
|
-
}, Me = {
|
|
245
|
-
key: 1,
|
|
246
|
-
role: "alert",
|
|
247
|
-
class: "text-[14px] text-fm-color-typo-error"
|
|
248
|
-
}, Ue = { class: "flex items-center justify-end gap-[12px] flex-wrap" }, He = {
|
|
249
|
-
key: 0,
|
|
250
|
-
role: "status",
|
|
251
|
-
class: "mr-auto flex items-center gap-[6px] text-[14px] text-fm-color-typo-success"
|
|
252
|
-
}, je = /* @__PURE__ */ W({
|
|
253
|
-
__name: "WhatsappBotSettings",
|
|
254
|
-
setup(p) {
|
|
255
|
-
const { t: s } = D(), t = F(() => ce.getBusinessId() ?? ""), l = g(""), a = g(""), r = g([]), m = g([]), f = g(null), $ = F(
|
|
256
|
-
() => r.value.filter(
|
|
257
|
-
(o) => o.title.trim() || o.description.trim()
|
|
258
|
-
)
|
|
259
|
-
), v = g(
|
|
260
|
-
N
|
|
261
|
-
), V = g(
|
|
262
|
-
N
|
|
263
|
-
), I = g(!0), k = g(!1), _ = g(!1), x = g(""), y = g(!1), H = Y, Z = F(
|
|
264
|
-
() => l.value !== a.value || v.value !== V.value || JSON.stringify(r.value) !== JSON.stringify(m.value)
|
|
265
|
-
), R = F(
|
|
266
|
-
() => !k.value || _.value || !Z.value
|
|
267
|
-
), G = F(
|
|
268
|
-
() => R.value || l.value.length > H || !de.safeParse($.value).success
|
|
269
|
-
);
|
|
270
|
-
let h, K;
|
|
271
|
-
function E() {
|
|
272
|
-
clearTimeout(K), y.value = !1;
|
|
273
|
-
}
|
|
274
|
-
function z(o) {
|
|
275
|
-
l.value = o.botInstructions, a.value = o.botInstructions, v.value = o.responseSpeed, V.value = o.responseSpeed, r.value = o.knowledgeBase.map((n) => ({ ...n })), m.value = o.knowledgeBase.map((n) => ({
|
|
276
|
-
...n
|
|
277
|
-
}));
|
|
278
|
-
}
|
|
279
|
-
async function X() {
|
|
280
|
-
h == null || h.abort(), E();
|
|
281
|
-
const o = new AbortController();
|
|
282
|
-
h = o, I.value = !0, k.value = !1, _.value = !1, x.value = "", l.value = "", a.value = "", v.value = N, V.value = N, r.value = [], m.value = [], f.value = null;
|
|
283
|
-
try {
|
|
284
|
-
if (!t.value)
|
|
285
|
-
throw new Error(s("connect.whatsappBot.errors.selectBusiness"));
|
|
286
|
-
const n = await J.getSettings(
|
|
287
|
-
t.value,
|
|
288
|
-
o.signal
|
|
289
|
-
);
|
|
290
|
-
if (o.signal.aborted) return;
|
|
291
|
-
z(n), k.value = !0;
|
|
292
|
-
} catch (n) {
|
|
293
|
-
o.signal.aborted || (x.value = n instanceof Error ? n.message : s("connect.whatsappBot.errors.loadSettings"));
|
|
294
|
-
} finally {
|
|
295
|
-
o.signal.aborted || (I.value = !1);
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
async function q() {
|
|
299
|
-
if (G.value) return;
|
|
300
|
-
h == null || h.abort();
|
|
301
|
-
const o = new AbortController();
|
|
302
|
-
h = o, _.value = !0, x.value = "", E();
|
|
303
|
-
const n = f.value === null ? void 0 : r.value[f.value], A = n ? $.value.indexOf(n) : -1;
|
|
304
|
-
try {
|
|
305
|
-
const B = await J.saveSettings(
|
|
306
|
-
t.value,
|
|
307
|
-
{
|
|
308
|
-
botInstructions: l.value,
|
|
309
|
-
responseSpeed: v.value,
|
|
310
|
-
knowledgeBase: $.value
|
|
311
|
-
},
|
|
312
|
-
o.signal
|
|
313
|
-
);
|
|
314
|
-
if (o.signal.aborted) return;
|
|
315
|
-
z(B), f.value = A < 0 ? null : A, y.value = !0, K = setTimeout(() => {
|
|
316
|
-
y.value = !1;
|
|
317
|
-
}, 2500);
|
|
318
|
-
} catch (B) {
|
|
319
|
-
o.signal.aborted || (x.value = B instanceof Error ? B.message : s("connect.whatsappBot.errors.saveSettings"));
|
|
320
|
-
} finally {
|
|
321
|
-
o.signal.aborted || (_.value = !1);
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
function ee() {
|
|
325
|
-
l.value = a.value, v.value = V.value, r.value = m.value.map((o) => ({ ...o })), f.value = null, E();
|
|
326
|
-
}
|
|
327
|
-
return j([l, v, r], E, {
|
|
328
|
-
flush: "sync",
|
|
329
|
-
deep: !0
|
|
330
|
-
}), j(t, X, { immediate: !0 }), ae(() => {
|
|
331
|
-
h == null || h.abort(), E();
|
|
332
|
-
}), (o, n) => {
|
|
333
|
-
const A = w("FmCircularProgress"), B = w("FmButton"), te = w("FmIcon");
|
|
334
|
-
return d(), c("div", We, [
|
|
335
|
-
I.value ? (d(), c("div", De, [
|
|
336
|
-
b(A),
|
|
337
|
-
P(" " + u(e(s)("connect.whatsappBot.botSettings.loading")), 1)
|
|
338
|
-
])) : (d(), c(L, { key: 1 }, [
|
|
339
|
-
k.value ? (d(), c(L, { key: 0 }, [
|
|
340
|
-
b(xe, {
|
|
341
|
-
modelValue: l.value,
|
|
342
|
-
"onUpdate:modelValue": n[0] || (n[0] = (T) => l.value = T),
|
|
343
|
-
disabled: _.value
|
|
344
|
-
}, null, 8, ["modelValue", "disabled"]),
|
|
345
|
-
b(ke, {
|
|
346
|
-
modelValue: r.value,
|
|
347
|
-
"onUpdate:modelValue": n[1] || (n[1] = (T) => r.value = T),
|
|
348
|
-
"active-topic-index": f.value,
|
|
349
|
-
"onUpdate:activeTopicIndex": n[2] || (n[2] = (T) => f.value = T),
|
|
350
|
-
disabled: _.value
|
|
351
|
-
}, null, 8, ["modelValue", "active-topic-index", "disabled"]),
|
|
352
|
-
b(Le, {
|
|
353
|
-
modelValue: v.value,
|
|
354
|
-
"onUpdate:modelValue": n[3] || (n[3] = (T) => v.value = T),
|
|
355
|
-
disabled: _.value
|
|
356
|
-
}, null, 8, ["modelValue", "disabled"])
|
|
357
|
-
], 64)) : S("", !0),
|
|
358
|
-
x.value ? (d(), c("p", Me, u(x.value), 1)) : S("", !0),
|
|
359
|
-
k.value ? S("", !0) : (d(), se(B, {
|
|
360
|
-
key: 2,
|
|
361
|
-
class: "self-start",
|
|
362
|
-
label: e(s)("connect.whatsappBot.tryAgain"),
|
|
363
|
-
"prepend-icon": "refresh",
|
|
364
|
-
onClick: X
|
|
365
|
-
}, null, 8, ["label"])),
|
|
366
|
-
i("div", Ue, [
|
|
367
|
-
y.value ? (d(), c("span", He, [
|
|
368
|
-
b(te, {
|
|
369
|
-
name: "check",
|
|
370
|
-
size: "sm"
|
|
371
|
-
}),
|
|
372
|
-
P(" " + u(e(s)("connect.whatsappBot.botSettings.saved")), 1)
|
|
373
|
-
])) : S("", !0),
|
|
374
|
-
b(B, {
|
|
375
|
-
variant: "secondary",
|
|
376
|
-
label: e(s)("connect.common.cancel"),
|
|
377
|
-
disabled: R.value,
|
|
378
|
-
onClick: ee
|
|
379
|
-
}, null, 8, ["label", "disabled"]),
|
|
380
|
-
b(B, {
|
|
381
|
-
label: e(s)("connect.common.save"),
|
|
382
|
-
disabled: G.value,
|
|
383
|
-
loading: _.value,
|
|
384
|
-
onClick: q
|
|
385
|
-
}, null, 8, ["label", "disabled", "loading"])
|
|
386
|
-
])
|
|
387
|
-
], 64))
|
|
388
|
-
]);
|
|
389
|
-
};
|
|
390
|
-
}
|
|
391
|
-
});
|
|
392
|
-
export {
|
|
393
|
-
je as default
|
|
394
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { defineComponent as r, computed as a, watch as m, openBlock as n, createBlock as c, createCommentVNode as p } from "vue";
|
|
2
|
-
import { useRouter as s } from "vue-router";
|
|
3
|
-
import { i } from "./feature-flag-D2MJ8eLY.js";
|
|
4
|
-
import { R as u } from "./app-C5bfcrJd.js";
|
|
5
|
-
import { _ } from "./MainLayout.vue_vue_type_script_setup_true_lang-Bf-Kvl5W.js";
|
|
6
|
-
const C = /* @__PURE__ */ r({
|
|
7
|
-
__name: "WhatsappLayout",
|
|
8
|
-
setup(f) {
|
|
9
|
-
const o = s(), e = a(i);
|
|
10
|
-
return m(
|
|
11
|
-
e,
|
|
12
|
-
(t) => {
|
|
13
|
-
t || o.replace({ name: u["$connect-ANALYTIC"] });
|
|
14
|
-
},
|
|
15
|
-
{ immediate: !0 }
|
|
16
|
-
), (t, d) => e.value ? (n(), c(_, { key: 0 })) : p("", !0);
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
export {
|
|
20
|
-
C as default
|
|
21
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { c as o } from "./index-_EvVNmhF.js";
|
|
2
|
-
import { useCoreStore as t } from "@feedmepos/mf-common";
|
|
3
|
-
const n = "crm_whatsapp_bot";
|
|
4
|
-
function c() {
|
|
5
|
-
var r, s;
|
|
6
|
-
const e = t();
|
|
7
|
-
return o.FeatureFlag.can({
|
|
8
|
-
key: n,
|
|
9
|
-
customConditions: {
|
|
10
|
-
country: e.currentCountry.value,
|
|
11
|
-
userId: (r = e.sessionUser.value) == null ? void 0 : r.id,
|
|
12
|
-
businessId: (s = e.currentBusiness.value) == null ? void 0 : s._id
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
c as i
|
|
18
|
-
};
|