@feedmepos/mf-connect 0.1.124-prod → 0.1.126-dev
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/{App-DMh2xABv.js → App-B_Yp6cvN.js} +224 -216
- package/dist/AuditLogs-C1U17evK.js +2016 -0
- package/dist/{Bin-C_pkPgIo.js → Bin-CmIpEIwe.js} +8 -8
- package/dist/{Broadcast-6ZJzdY0b.js → Broadcast-DkV4BdU_.js} +22 -21
- package/dist/{CampaignAnalytic-CLd5ecQe.js → CampaignAnalytic-Dkwo_lpB.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C4OWhhAx.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Ch8Gblw6.js} +9 -10
- package/dist/{Card-CkS8F43U.js → Card-DXCkG34M.js} +23 -23
- package/dist/{Collections-BA9I-dDz.js → Collections-CybPfSO4.js} +197 -185
- package/dist/{Credit-CXm0A-qe.js → Credit-B-KUzWsX.js} +21 -20
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DzsHTlrN.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CWHYeYVD.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C86llTFR.js +4439 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-zSPUBUSz.js → EffectSheet.vue_vue_type_style_index_0_lang-nMcH6y5e.js} +33 -33
- package/dist/{Experience-Bq4ykqTJ.js → Experience-Q2NHpa-V.js} +32 -31
- package/dist/{FileSaver.min-BtBxrIBi.js → FileSaver.min-CKw2rn-J.js} +1 -1
- package/dist/{Game-DpLFmP-G.js → Game-lZvkg04z.js} +19 -18
- package/dist/{GiftCardSetup-BqOqEUim.js → GiftCardSetup-CPRju80_.js} +31 -31
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-B06xj5q7.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-Ci686UoB.js} +7 -7
- package/dist/{Goals-DMlNeiUc.js → Goals-asGsUeVv.js} +4 -4
- package/dist/Grab-BjFLSMpE.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DPWRgxG_.js → ImageInput.vue_vue_type_script_setup_true_lang-nk87zPWH.js} +1 -1
- package/dist/{Index-Cw07jj0k.js → Index-DIasPS4Y.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-CLjjquVP.js → LocationPicker.vue_vue_type_script_setup_true_lang-DkOn8p1v.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DHOShJQp.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BdSkxiP-.js} +1 -1
- package/dist/{LoyaltyDashboard-DzSiK6M7.js → LoyaltyDashboard-DlCsZ3YX.js} +15 -15
- package/dist/{MainLayout-1EF680_j.js → MainLayout-DLObnTAA.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-Df9pBgH9.js → MainLayout.vue_vue_type_script_setup_true_lang-DigSZKt1.js} +3 -3
- package/dist/{Marketing-T-epFsvG.js → Marketing-JflPW-w9.js} +4 -4
- package/dist/{MarketingMaterialEdit-CVhPfyEp.js → MarketingMaterialEdit-fSAB3YVb.js} +214 -211
- package/dist/{Member-BUZOPyQR.js → Member-CzNahXTj.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-zURjtl1z.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-bqWUIbMG.js} +40 -48
- package/dist/{MemberImportHistory-DGz9i6L7.js → MemberImportHistory--r_A_2Es.js} +7 -7
- package/dist/{MemberList-CNdSrzBa.js → MemberList-CQZQ4sN8.js} +103 -105
- package/dist/{MemberTransactions-CdQMuQsd.js → MemberTransactions-BPg9JaUA.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CWKVXeCa.js → MessageInput.vue_vue_type_script_setup_true_lang-BhIFChx-.js} +12 -12
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-xZitIoXE.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CdGSNqEp.js} +1 -1
- package/dist/{Mission-CYxgMBPt.js → Mission-CYCB3YQc.js} +22 -21
- package/dist/{Overview-qZ1KKw9D.js → Overview-B5ylMBHT.js} +145 -144
- package/dist/{Overview-DSm8AfDB.js → Overview-DuNuUYYq.js} +21 -21
- package/dist/{Point-BGlbT9OK.js → Point-DG-Uwj25.js} +22 -21
- package/dist/{Promotion-CtlrUFa8.js → Promotion-DqxBQ1yO.js} +137 -131
- package/dist/{Queue-Dc_z9MKc.js → Queue-Cy8LGt_Y.js} +46 -46
- package/dist/{Record-DVKrhFwJ.js → Record-CzXbu41w.js} +9 -9
- package/dist/{Review-Bh8Tw_QU.js → Review-7VL6gIqp.js} +2 -2
- package/dist/ReviewFacebookCallback-BwzuPmrz.js +225 -0
- package/dist/{ReviewGoogleCallback-CsSCz_C5.js → ReviewGoogleCallback-1JXR_f5O.js} +5 -5
- package/dist/{Reward-DY1Q3m1w.js → Reward-BKhUDEu3.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-4A91EkSW.js → RewardGroup.vue_vue_type_script_setup_true_lang-DjjCytWF.js} +14 -14
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Vg7pRGIz.js +1923 -0
- package/dist/{Segment-D6LchJFl.js → Segment-DdHDJhaS.js} +304 -307
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CSAtkMnJ.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-9kGUkHMi.js} +15 -15
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Co1MQoVq.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DeFw0px7.js} +4 -4
- package/dist/{Setting-UkdSKiUb.js → Setting-DZKGXw-i.js} +17 -17
- package/dist/{SettingAdvertisements-DK97gcus.js → SettingAdvertisements-BBNs8tCw.js} +12 -12
- package/dist/Settings-9v0hnBJZ.js +286 -0
- package/dist/{Store-2VVStL5_.js → Store-C8IlE4IH.js} +29 -29
- package/dist/{StoreRewards-f3Pyb9hu.js → StoreRewards-DWygRLR1.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BmnyPSVT.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CeYYws6P.js} +25 -25
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BiN3uRJ_.js +7007 -0
- package/dist/{Tier-D4Of9P17.js → Tier-7RoxGHsP.js} +2583 -688
- package/dist/{Title-Cg6X9UkB.js → Title-0q2Z4HIe.js} +96 -95
- package/dist/{Transaction-LJbjQnj_.js → Transaction-CFasERdg.js} +2 -2
- package/dist/{Upselling-B-VwbtjT.js → Upselling-DM9R6pYw.js} +3 -3
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DqH6Upx-.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BDjwcgnc.js} +26 -26
- package/dist/{Voucher-BJG6VKXt.js → Voucher-BkzW2hVV.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-7kYeJthi.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DaE4xa3x.js} +12 -12
- package/dist/{WhatsappAccount-Dc1fJWWj.js → WhatsappAccount-C3WpDF9O.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BV0Bsl7a.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BxC_3h52.js} +1 -1
- package/dist/{WhatsappBot-Coq1WP96.js → WhatsappBot-DZb-Dn3s.js} +6 -6
- package/dist/WhatsappBotLogs--KskC32Z.js +509 -0
- package/dist/WhatsappBotSettings-Dns_PqVE.js +945 -0
- package/dist/{WhatsappLayout-x9Ovpu6e.js → WhatsappLayout-NIrFGbId.js} +3 -3
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DZlT0uLW.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-BfD5hHc7.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DSJncfI_.js → ZodTextField.vue_vue_type_script_setup_true_lang-CJGxy7gf.js} +2 -2
- package/dist/{app-BMFxxLUm.js → app-B9nLnoBt.js} +4497 -3667
- package/dist/app.js +4 -3
- package/dist/{base.export-LmQ51u5f.js → base.export-CBzNea0v.js} +2 -2
- package/dist/{business-DZWViiMC.js → business-aT2zslwu.js} +1 -1
- package/dist/{campaign-DZDGbR4W.js → campaign-B6nTwt17.js} +121 -94
- package/dist/{campaign-C9xvGyrL.js → campaign-BDCLKFwN.js} +31 -25
- package/dist/{campaign.enum-BqekIiiN.js → campaign.enum-Dx-Zo68Q.js} +2 -1
- package/dist/campaign.fn-Ck1t5C1T.js +776 -0
- package/dist/{collection.fn-DrNrla0B.js → collection.fn-CDna_VLD.js} +2 -2
- package/dist/{currency-BZv2gSlF.js → currency-Baum67Wz.js} +1 -1
- package/dist/duplicateCampaign-BwrMZgaV.js +51 -0
- package/dist/{effect-CvumfBMY.js → effect-CeJbflOK.js} +1 -1
- package/dist/{email-addresses-79tPeI4j.js → email-addresses-Y3vF73J0.js} +2 -2
- package/dist/{feature-flag-CYXnrECh.js → feature-flag-zn6Ql9tv.js} +84 -84
- package/dist/google-BQK68wbe.js +5 -0
- package/dist/{helper-DFjsyjri.js → helper-DZvnn-yx.js} +1 -1
- package/dist/{index-CcCiEG6N.js → index-B20FfbEE.js} +1 -1
- package/dist/{index-DWZzsJHU.js → index-B22ojkMy.js} +2 -2
- package/dist/{index-I9lmcd2w.js → index-B3LCTMwV.js} +68 -54
- package/dist/{index-C43KoLej.js → index-B5H4znfe.js} +4 -4
- package/dist/{index-C5bC2n8X.js → index-BL2zQnXK.js} +3 -3
- package/dist/{index-MhAbTpBy.js → index-BYUEPfbP.js} +23 -23
- package/dist/{index-CA7oIW_T.js → index-BqniSMV6.js} +197 -197
- package/dist/{index-CAWnce4u.js → index-CDRTiAEu.js} +1 -1
- package/dist/{index-_-nCOZ1D.js → index-CMs3aIA6.js} +19 -6
- package/dist/{index-BiPRZRyE.js → index-CPi3Qwmj.js} +2699 -2613
- package/dist/{index-Ba1t5vQv.js → index-DCR1GFCA.js} +380 -234
- package/dist/{index-C6ZTa-eq.js → index-DHNhIloU.js} +1 -1
- package/dist/{index-CBd91xYU.js → index-DJIt5tXC.js} +7 -7
- package/dist/index-DXKJsqgW.js +104 -0
- package/dist/{index-CNzQ3FLi.js → index-DXyOBtgF.js} +1 -1
- package/dist/{index-Bnane9cm.js → index-Da0-7h2j.js} +1 -1
- package/dist/{index-C6Rx7pjc.js → index-DkBOM8za.js} +608 -251
- package/dist/{index-CW4rNV1_.js → index-FgM7b2Sw.js} +2 -2
- package/dist/{index-DZrX13oF.js → index-juXxYQ_a.js} +1314 -1242
- package/dist/{index-Bt-n8QuD.js → index-njg4JLa-.js} +9 -9
- package/dist/{index-B_8PAyia.js → index-r_T5o_hF.js} +2 -2
- package/dist/{index.esm2017-DtTjnHHc.js → index.esm2017-Dtk7BscN.js} +57 -57
- package/dist/{loading-DkqEFbrR.js → loading-PoODMkQD.js} +1 -1
- package/dist/{lodash-BxU_5gPB.js → lodash-TthNgH98.js} +1 -1
- package/dist/{member-import-B3NBqSF6.js → member-import-D7zs0Jvh.js} +22 -13
- package/dist/{membership-Dr5BxoL-.js → membership-Cab-iWQ1.js} +2 -2
- package/dist/{money-D58xuACG.js → money-9Q306M3g.js} +1 -1
- package/dist/{number-C9CiD5ci.js → number-D9M3D435.js} +1 -1
- package/dist/objectid-DKvQl6FD.js +145 -0
- package/dist/{onboarding-BssUSfGQ.js → onboarding-D5LKUHVI.js} +25 -25
- package/dist/{onboardingSetup-Dc_lD-K8.js → onboardingSetup-D0jsS6w5.js} +2 -2
- package/dist/{plugins-D7Xjefvk.js → plugins-CDTKQ1Pg.js} +3 -3
- package/dist/{reward-CACqYkQp.js → reward-De3e9vYS.js} +1 -1
- package/dist/{rule-BRaTrwKz.js → rule-trVJgEOe.js} +572 -492
- package/dist/style.css +1 -1
- package/dist/template-Bj3Tb6bP.js +227 -0
- package/dist/{timezone-CgVEOC5i.js → timezone-DkuByUmb.js} +1 -1
- package/dist/{transaction.fn-C64l_ja_.js → transaction.fn-CPE-oQhA.js} +2 -2
- package/dist/{trigger-d2RIqXLt.js → trigger-C6oM-8pe.js} +9 -9
- package/dist/{useMarketingMaterialActions-Drf2MY9h.js → useMarketingMaterialActions-C5scdJQp.js} +4 -4
- package/dist/{usePagination-IUw34YLE.js → usePagination-CIuTHSSG.js} +1 -1
- package/dist/{user-ClGyYHyS.js → user-Bdlgn2yo.js} +1 -1
- package/dist/vue-i18n-DEpDI-dt.js +2365 -0
- package/dist/{xlsx-HvtVSofi.js → xlsx-CvecxUOG.js} +1 -1
- package/dist/{zod-IPdjFU_b.js → zod-bniyeWdY.js} +1 -1
- package/package.json +6 -2
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C5INV6R7.js +0 -3493
- package/dist/ReviewFacebookCallback-ZZ0pxplM.js +0 -238
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-JA0XIgqb.js +0 -1884
- package/dist/Settings-BFcVswDS.js +0 -179
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CCWNzg4p.js +0 -142
- package/dist/WhatsappBotLogs-EH9PQVn9.js +0 -372
- package/dist/WhatsappBotSettings-fNRFecJX.js +0 -704
- package/dist/campaign.fn-OVkj0QLu.js +0 -776
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/index-C-pVo6PI.js +0 -74
- package/dist/objectid-CgTtbB6Q.js +0 -145
- package/dist/rule-builder-DZOASGFD.js +0 -102
- package/dist/template-DdeVPIBt.js +0 -275
- package/dist/vue-i18n-Cby9s0nj.js +0 -2365
|
@@ -1,704 +0,0 @@
|
|
|
1
|
-
import { defineComponent as O, mergeModels as Z, useModel as H, openBlock as a, createElementBlock as i, createElementVNode as e, toDisplayString as l, unref as t, withDirectives as q, vModelText as re, resolveComponent as $, Fragment as L, renderList as ee, createBlock as P, ref as y, computed as E, watch as ce, onBeforeUnmount as ie, createCommentVNode as _, createVNode as S, createTextVNode as N, withCtx as ae, normalizeClass as X, vModelRadio as fe } from "vue";
|
|
2
|
-
import { u as U } from "./vue-i18n-Cby9s0nj.js";
|
|
3
|
-
import { useSnackbar as de } from "@feedmepos/ui-library";
|
|
4
|
-
import { F as J, a as W, b as be, c as se, d as ve, e as z, f as ge } from "./index-I9lmcd2w.js";
|
|
5
|
-
import { S as Q } from "./index-CBd91xYU.js";
|
|
6
|
-
import { w as Y } from "./index-C-pVo6PI.js";
|
|
7
|
-
import { p as he } from "./plugins-D7Xjefvk.js";
|
|
8
|
-
const ye = { class: "flex flex-col gap-[10px]" }, _e = { class: "flex flex-col gap-[2px]" }, we = {
|
|
9
|
-
id: "whatsapp-bot-instructions-title",
|
|
10
|
-
class: "text-[16px] leading-[24px] font-semibold"
|
|
11
|
-
}, Be = {
|
|
12
|
-
id: "whatsapp-bot-instructions-description",
|
|
13
|
-
class: "text-[14px] leading-[20px] text-fm-color-typo-secondary [text-wrap:pretty]"
|
|
14
|
-
}, ke = { class: "flex flex-col gap-[6px]" }, Se = ["placeholder", "maxlength", "disabled"], $e = {
|
|
15
|
-
id: "whatsapp-bot-instructions-count",
|
|
16
|
-
class: "text-right text-[12px] leading-[16px] text-fm-color-typo-tertiary tabular-nums"
|
|
17
|
-
}, Ae = /* @__PURE__ */ O({
|
|
18
|
-
__name: "BotInstructions",
|
|
19
|
-
props: /* @__PURE__ */ Z({
|
|
20
|
-
disabled: { type: Boolean }
|
|
21
|
-
}, {
|
|
22
|
-
modelValue: { required: !0 },
|
|
23
|
-
modelModifiers: {}
|
|
24
|
-
}),
|
|
25
|
-
emits: ["update:modelValue"],
|
|
26
|
-
setup(p) {
|
|
27
|
-
const n = H(p, "modelValue"), { t: m } = U();
|
|
28
|
-
return (s, o) => (a(), i("div", ye, [
|
|
29
|
-
e("div", _e, [
|
|
30
|
-
e("h2", we, l(t(m)("connect.whatsappBot.botSettings.instructions")), 1),
|
|
31
|
-
e("p", Be, l(t(m)("connect.whatsappBot.botSettings.description")), 1)
|
|
32
|
-
]),
|
|
33
|
-
e("div", ke, [
|
|
34
|
-
q(e("textarea", {
|
|
35
|
-
"onUpdate:modelValue": o[0] || (o[0] = (b) => n.value = b),
|
|
36
|
-
"aria-labelledby": "whatsapp-bot-instructions-title",
|
|
37
|
-
"aria-describedby": "whatsapp-bot-instructions-description whatsapp-bot-instructions-count",
|
|
38
|
-
placeholder: t(m)("connect.whatsappBot.botSettings.placeholder"),
|
|
39
|
-
maxlength: t(J),
|
|
40
|
-
disabled: p.disabled,
|
|
41
|
-
rows: "6",
|
|
42
|
-
class: "block w-full min-h-[136px] resize-y rounded-[8px] border border-fm-color-neutral-gray-200 bg-fm-color-neutral-white p-[12px] text-[14px] leading-[20px] text-fm-color-typo-primary placeholder:text-fm-color-typo-tertiary transition-[border-color,box-shadow] focus:border-fm-color-primary focus:outline-none focus:ring-[4px] focus:ring-fm-color-primary/30 disabled:cursor-not-allowed disabled:bg-fm-color-neutral-gray-100 disabled:text-fm-color-typo-disabled"
|
|
43
|
-
}, null, 8, Se), [
|
|
44
|
-
[re, n.value]
|
|
45
|
-
]),
|
|
46
|
-
e("p", $e, l(n.value.length) + " / " + l(t(J)), 1)
|
|
47
|
-
])
|
|
48
|
-
]));
|
|
49
|
-
}
|
|
50
|
-
}), Te = { class: "overflow-x-auto" }, Ie = ["aria-label"], Fe = { class: "border-b border-fm-color-neutral-gray-100 bg-fm-color-neutral-gray-100/30 text-[12px] leading-[16px] text-fm-color-typo-tertiary" }, Ce = {
|
|
51
|
-
scope: "col",
|
|
52
|
-
class: "py-[10px] pl-[16px] pr-[8px] font-semibold"
|
|
53
|
-
}, Ee = {
|
|
54
|
-
scope: "col",
|
|
55
|
-
class: "px-[8px] py-[10px] font-semibold"
|
|
56
|
-
}, Ve = {
|
|
57
|
-
scope: "col",
|
|
58
|
-
class: "px-[8px] py-[10px] font-semibold"
|
|
59
|
-
}, Pe = {
|
|
60
|
-
scope: "col",
|
|
61
|
-
class: "py-[10px] pl-[8px] pr-[16px]"
|
|
62
|
-
}, Ne = { class: "sr-only" }, De = { class: "text-[14px] leading-[20px]" }, Le = { class: "py-[8px] pl-[16px] pr-[8px] font-medium" }, Oe = ["title"], Ue = { class: "px-[8px] py-[8px] text-fm-color-typo-secondary tabular-nums" }, Me = ["title"], Re = { class: "px-[8px] py-[8px] text-fm-color-typo-tertiary tabular-nums" }, We = ["datetime", "title"], ze = { class: "py-[8px] pl-[8px] pr-[16px]" }, He = ["aria-label", "disabled", "aria-busy", "onClick"], Ge = { key: 1 }, ne = /* @__PURE__ */ O({
|
|
63
|
-
__name: "ExcludedAccountsTable",
|
|
64
|
-
props: {
|
|
65
|
-
accounts: {},
|
|
66
|
-
removingId: {}
|
|
67
|
-
},
|
|
68
|
-
emits: ["remove"],
|
|
69
|
-
setup(p, { emit: n }) {
|
|
70
|
-
const m = n, { t: s, locale: o } = U();
|
|
71
|
-
function b(f) {
|
|
72
|
-
return f.customerName || f.phoneNumber || f.customerLid;
|
|
73
|
-
}
|
|
74
|
-
function u(f) {
|
|
75
|
-
return new Intl.DateTimeFormat(o.value, {
|
|
76
|
-
dateStyle: "medium",
|
|
77
|
-
timeStyle: "short"
|
|
78
|
-
}).format(new Date(f));
|
|
79
|
-
}
|
|
80
|
-
return (f, h) => {
|
|
81
|
-
const w = $("FmCircularProgress");
|
|
82
|
-
return a(), i("div", Te, [
|
|
83
|
-
e("table", {
|
|
84
|
-
"aria-label": t(s)("connect.whatsappBot.excludedAccounts.title"),
|
|
85
|
-
class: "w-full min-w-[600px] table-fixed border-collapse text-left"
|
|
86
|
-
}, [
|
|
87
|
-
h[0] || (h[0] = e("colgroup", null, [
|
|
88
|
-
e("col", { class: "w-[30%]" }),
|
|
89
|
-
e("col", { class: "w-[25%]" }),
|
|
90
|
-
e("col"),
|
|
91
|
-
e("col", { class: "w-[116px]" })
|
|
92
|
-
], -1)),
|
|
93
|
-
e("thead", Fe, [
|
|
94
|
-
e("tr", null, [
|
|
95
|
-
e("th", Ce, l(t(s)("connect.whatsappBot.excludedAccounts.name")), 1),
|
|
96
|
-
e("th", Ee, l(t(s)("connect.whatsappBot.excludedAccounts.phoneNumber")), 1),
|
|
97
|
-
e("th", Ve, l(t(s)("connect.whatsappBot.excludedAccounts.excludedOn")), 1),
|
|
98
|
-
e("th", Pe, [
|
|
99
|
-
e("span", Ne, l(t(s)("connect.whatsappBot.excludedAccounts.actions")), 1)
|
|
100
|
-
])
|
|
101
|
-
])
|
|
102
|
-
]),
|
|
103
|
-
e("tbody", De, [
|
|
104
|
-
(a(!0), i(L, null, ee(p.accounts, (r) => (a(), i("tr", {
|
|
105
|
-
key: r.id,
|
|
106
|
-
class: "border-b border-fm-color-neutral-gray-100 last:border-b-0"
|
|
107
|
-
}, [
|
|
108
|
-
e("td", Le, [
|
|
109
|
-
e("span", {
|
|
110
|
-
class: "block truncate",
|
|
111
|
-
title: b(r)
|
|
112
|
-
}, l(b(r)), 9, Oe)
|
|
113
|
-
]),
|
|
114
|
-
e("td", Ue, [
|
|
115
|
-
e("span", {
|
|
116
|
-
class: "block truncate",
|
|
117
|
-
title: r.phoneNumber || t(s)("connect.whatsappBot.phoneUnavailable")
|
|
118
|
-
}, l(r.phoneNumber || t(s)("connect.whatsappBot.phoneUnavailable")), 9, Me)
|
|
119
|
-
]),
|
|
120
|
-
e("td", Re, [
|
|
121
|
-
e("time", {
|
|
122
|
-
datetime: r.updatedAt,
|
|
123
|
-
title: u(r.updatedAt),
|
|
124
|
-
class: "block truncate"
|
|
125
|
-
}, l(u(r.updatedAt)), 9, We)
|
|
126
|
-
]),
|
|
127
|
-
e("td", ze, [
|
|
128
|
-
e("button", {
|
|
129
|
-
type: "button",
|
|
130
|
-
"aria-label": t(s)("connect.whatsappBot.excludedAccounts.removeAccount", {
|
|
131
|
-
name: b(r)
|
|
132
|
-
}),
|
|
133
|
-
disabled: !!p.removingId,
|
|
134
|
-
"aria-busy": p.removingId === r.id,
|
|
135
|
-
class: "flex h-[32px] w-[84px] items-center justify-center rounded-[8px] text-[14px] font-semibold text-fm-color-typo-secondary transition-colors hover:bg-fm-color-system-error-100 hover:text-fm-color-typo-error focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary disabled:cursor-wait disabled:opacity-50",
|
|
136
|
-
onClick: (T) => m("remove", r)
|
|
137
|
-
}, [
|
|
138
|
-
p.removingId === r.id ? (a(), P(w, {
|
|
139
|
-
key: 0,
|
|
140
|
-
size: "md",
|
|
141
|
-
"aria-hidden": "true"
|
|
142
|
-
})) : (a(), i("span", Ge, l(t(s)("connect.common.remove")), 1))
|
|
143
|
-
], 8, He)
|
|
144
|
-
])
|
|
145
|
-
]))), 128))
|
|
146
|
-
])
|
|
147
|
-
], 8, Ie)
|
|
148
|
-
]);
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
}), Ke = {
|
|
152
|
-
id: "whatsapp-excluded-accounts",
|
|
153
|
-
"aria-labelledby": "whatsapp-excluded-accounts-title",
|
|
154
|
-
class: "flex min-w-0 flex-col gap-[12px]"
|
|
155
|
-
}, je = { class: "flex flex-col gap-[2px]" }, Xe = {
|
|
156
|
-
id: "whatsapp-excluded-accounts-title",
|
|
157
|
-
class: "text-[16px] leading-[24px] font-semibold"
|
|
158
|
-
}, Je = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary [text-wrap:pretty]" }, Qe = {
|
|
159
|
-
key: 0,
|
|
160
|
-
role: "alert",
|
|
161
|
-
class: "text-[14px] text-fm-color-typo-error"
|
|
162
|
-
}, Ye = {
|
|
163
|
-
key: 1,
|
|
164
|
-
class: "flex flex-col items-center gap-[12px] py-[32px] text-[14px] text-fm-color-typo-secondary"
|
|
165
|
-
}, Ze = {
|
|
166
|
-
key: 0,
|
|
167
|
-
class: "flex flex-wrap items-center gap-[12px]"
|
|
168
|
-
}, qe = {
|
|
169
|
-
role: "alert",
|
|
170
|
-
class: "text-[14px] text-fm-color-typo-error"
|
|
171
|
-
}, et = {
|
|
172
|
-
key: 1,
|
|
173
|
-
class: "flex flex-col items-center gap-[6px] rounded-[16px] border border-fm-color-neutral-gray-200 px-[24px] py-[32px] text-center"
|
|
174
|
-
}, tt = { class: "text-[16px] leading-[24px] font-semibold" }, ot = { class: "max-w-[420px] text-[14px] leading-[20px] text-fm-color-typo-secondary [text-wrap:pretty]" }, lt = {
|
|
175
|
-
key: 2,
|
|
176
|
-
class: "overflow-hidden rounded-[16px] border border-fm-color-neutral-gray-100 bg-fm-color-neutral-white"
|
|
177
|
-
}, at = { class: "flex min-w-0 flex-col" }, st = { class: "text-[18px] leading-[24px] font-semibold" }, nt = { class: "text-[14px] leading-[20px] text-fm-color-typo-tertiary" }, rt = {
|
|
178
|
-
key: 0,
|
|
179
|
-
role: "alert",
|
|
180
|
-
class: "mb-[12px] text-[14px] text-fm-color-typo-error"
|
|
181
|
-
}, ct = {
|
|
182
|
-
key: 1,
|
|
183
|
-
class: "px-[24px] py-[40px] text-center text-[14px] text-fm-color-typo-secondary"
|
|
184
|
-
}, it = /* @__PURE__ */ O({
|
|
185
|
-
__name: "ExcludedAccounts",
|
|
186
|
-
props: {
|
|
187
|
-
accounts: {},
|
|
188
|
-
loading: { type: Boolean },
|
|
189
|
-
error: {}
|
|
190
|
-
},
|
|
191
|
-
emits: ["retry", "removed"],
|
|
192
|
-
setup(p, { emit: n }) {
|
|
193
|
-
const m = p, s = n, { t: o } = U(), b = de(), u = y(""), f = y(""), h = y(!1);
|
|
194
|
-
let w;
|
|
195
|
-
const r = E(
|
|
196
|
-
() => [...m.accounts].sort((x, v) => v.updatedAt.localeCompare(x.updatedAt))
|
|
197
|
-
), T = E(() => r.value.slice(0, 3));
|
|
198
|
-
async function C(x) {
|
|
199
|
-
if (u.value) return;
|
|
200
|
-
const v = Q.getBusinessId();
|
|
201
|
-
if (!v || x.businessId !== v) return;
|
|
202
|
-
const B = new AbortController();
|
|
203
|
-
w = B, u.value = x.id, f.value = "";
|
|
204
|
-
try {
|
|
205
|
-
if (await Y.removeExcludedAccount(
|
|
206
|
-
v,
|
|
207
|
-
x.id,
|
|
208
|
-
B.signal
|
|
209
|
-
), B.signal.aborted) return;
|
|
210
|
-
s("removed", x.id), b.open({
|
|
211
|
-
type: "success",
|
|
212
|
-
message: o("connect.whatsappBot.excludedAccounts.removed", {
|
|
213
|
-
name: x.customerName || x.phoneNumber || x.customerLid
|
|
214
|
-
})
|
|
215
|
-
});
|
|
216
|
-
} catch (I) {
|
|
217
|
-
B.signal.aborted || (f.value = I instanceof Error ? I.message : o("connect.whatsappBot.excludedAccounts.removeError"), b.open({ type: "error", message: f.value }));
|
|
218
|
-
} finally {
|
|
219
|
-
B.signal.aborted || (u.value = "");
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
function g() {
|
|
223
|
-
w == null || w.abort(), u.value = "", f.value = "", h.value = !1;
|
|
224
|
-
}
|
|
225
|
-
return ce(() => Q.getBusinessId(), g), ie(g), (x, v) => {
|
|
226
|
-
const B = $("FmCircularProgress"), I = $("FmButton"), G = $("FmIcon"), K = $("FmDialog");
|
|
227
|
-
return a(), i(L, null, [
|
|
228
|
-
e("section", Ke, [
|
|
229
|
-
e("div", je, [
|
|
230
|
-
e("h2", Xe, l(t(o)("connect.whatsappBot.excludedAccounts.title")), 1),
|
|
231
|
-
e("p", Je, l(t(o)("connect.whatsappBot.excludedAccounts.description")), 1)
|
|
232
|
-
]),
|
|
233
|
-
f.value ? (a(), i("p", Qe, l(f.value), 1)) : _("", !0),
|
|
234
|
-
p.loading ? (a(), i("output", Ye, [
|
|
235
|
-
S(B),
|
|
236
|
-
N(" " + l(t(o)("connect.whatsappBot.excludedAccounts.loading")), 1)
|
|
237
|
-
])) : (a(), i(L, { key: 2 }, [
|
|
238
|
-
p.error ? (a(), i("div", Ze, [
|
|
239
|
-
e("p", qe, l(p.error), 1),
|
|
240
|
-
S(I, {
|
|
241
|
-
variant: "secondary",
|
|
242
|
-
"border-color": "neutral-gray-200",
|
|
243
|
-
label: t(o)("connect.whatsappBot.tryAgain"),
|
|
244
|
-
"prepend-icon": "refresh",
|
|
245
|
-
class: "!rounded-full [&_.label]:text-[14px]",
|
|
246
|
-
onClick: v[0] || (v[0] = (V) => s("retry"))
|
|
247
|
-
}, null, 8, ["label"])
|
|
248
|
-
])) : _("", !0),
|
|
249
|
-
!r.value.length && !p.error ? (a(), i("div", et, [
|
|
250
|
-
e("h3", tt, l(t(o)("connect.whatsappBot.excludedAccounts.emptyTitle")), 1),
|
|
251
|
-
e("p", ot, l(t(o)("connect.whatsappBot.excludedAccounts.emptyDescription")), 1)
|
|
252
|
-
])) : r.value.length ? (a(), i("div", lt, [
|
|
253
|
-
S(ne, {
|
|
254
|
-
accounts: T.value,
|
|
255
|
-
"removing-id": u.value,
|
|
256
|
-
onRemove: C
|
|
257
|
-
}, null, 8, ["accounts", "removing-id"]),
|
|
258
|
-
r.value.length > T.value.length ? (a(), i("button", {
|
|
259
|
-
key: 0,
|
|
260
|
-
type: "button",
|
|
261
|
-
class: "flex min-h-[44px] w-full items-center justify-center gap-[6px] border-t border-fm-color-neutral-gray-100 px-[16px] py-[8px] text-[14px] font-semibold text-fm-color-primary transition-colors hover:bg-fm-color-primary-oats focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-inset focus-visible:ring-fm-color-primary",
|
|
262
|
-
onClick: v[1] || (v[1] = (V) => h.value = !0)
|
|
263
|
-
}, [
|
|
264
|
-
N(l(t(o)("connect.whatsappBot.excludedAccounts.showAll", {
|
|
265
|
-
count: r.value.length
|
|
266
|
-
})) + " ", 1),
|
|
267
|
-
S(G, {
|
|
268
|
-
name: "chevron_right",
|
|
269
|
-
size: "sm",
|
|
270
|
-
"aria-hidden": "true"
|
|
271
|
-
})
|
|
272
|
-
])) : _("", !0)
|
|
273
|
-
])) : _("", !0)
|
|
274
|
-
], 64))
|
|
275
|
-
]),
|
|
276
|
-
S(K, {
|
|
277
|
-
modelValue: h.value,
|
|
278
|
-
"onUpdate:modelValue": v[2] || (v[2] = (V) => h.value = V),
|
|
279
|
-
"min-width": "min(720px, calc(100% - 32px))",
|
|
280
|
-
"max-width": "720px",
|
|
281
|
-
"max-height": "90vh",
|
|
282
|
-
"dismiss-away": ""
|
|
283
|
-
}, {
|
|
284
|
-
"dialog-header": ae(() => [
|
|
285
|
-
e("div", at, [
|
|
286
|
-
e("h2", st, l(t(o)("connect.whatsappBot.excludedAccounts.title")), 1),
|
|
287
|
-
e("p", nt, l(t(o)("connect.whatsappBot.accountCount", r.value.length)), 1)
|
|
288
|
-
])
|
|
289
|
-
]),
|
|
290
|
-
default: ae(() => [
|
|
291
|
-
f.value ? (a(), i("p", rt, l(f.value), 1)) : _("", !0),
|
|
292
|
-
r.value.length ? (a(), P(ne, {
|
|
293
|
-
key: 2,
|
|
294
|
-
accounts: r.value,
|
|
295
|
-
"removing-id": u.value,
|
|
296
|
-
onRemove: C
|
|
297
|
-
}, null, 8, ["accounts", "removing-id"])) : (a(), i("p", ct, l(t(o)("connect.whatsappBot.excludedAccounts.emptyTitle")), 1))
|
|
298
|
-
]),
|
|
299
|
-
_: 1
|
|
300
|
-
}, 8, ["modelValue"])
|
|
301
|
-
], 64);
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
|
-
}), dt = {
|
|
305
|
-
"aria-labelledby": "knowledge-base-title",
|
|
306
|
-
class: "flex flex-col gap-[10px]"
|
|
307
|
-
}, pt = { class: "flex flex-col gap-[2px]" }, ut = {
|
|
308
|
-
id: "knowledge-base-title",
|
|
309
|
-
class: "text-[16px] leading-[24px] font-semibold"
|
|
310
|
-
}, mt = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary [text-wrap:pretty]" }, xt = { class: "flex flex-wrap gap-[8px]" }, ft = ["title", "aria-expanded", "disabled", "onClick"], bt = ["disabled"], vt = {
|
|
311
|
-
key: 0,
|
|
312
|
-
class: "text-[14px] text-fm-color-typo-tertiary"
|
|
313
|
-
}, gt = {
|
|
314
|
-
key: 1,
|
|
315
|
-
class: "text-[14px] text-fm-color-typo-secondary"
|
|
316
|
-
}, ht = { class: "flex flex-col gap-[6px]" }, yt = {
|
|
317
|
-
for: "whatsapp-knowledge-topic-description",
|
|
318
|
-
class: "text-[14px] leading-[20px] font-medium text-fm-color-typo-secondary"
|
|
319
|
-
}, _t = ["placeholder", "maxlength", "disabled"], wt = {
|
|
320
|
-
id: "whatsapp-knowledge-topic-description-count",
|
|
321
|
-
class: "text-right text-[12px] leading-[16px] text-fm-color-typo-tertiary tabular-nums"
|
|
322
|
-
}, Bt = /* @__PURE__ */ O({
|
|
323
|
-
__name: "KnowledgeBase",
|
|
324
|
-
props: /* @__PURE__ */ Z({
|
|
325
|
-
disabled: { type: Boolean }
|
|
326
|
-
}, {
|
|
327
|
-
modelValue: {
|
|
328
|
-
required: !0
|
|
329
|
-
},
|
|
330
|
-
modelModifiers: {},
|
|
331
|
-
activeTopicIndex: {
|
|
332
|
-
required: !0
|
|
333
|
-
},
|
|
334
|
-
activeTopicIndexModifiers: {}
|
|
335
|
-
}),
|
|
336
|
-
emits: ["update:modelValue", "update:activeTopicIndex"],
|
|
337
|
-
setup(p) {
|
|
338
|
-
const n = p, m = H(p, "modelValue"), s = H(p, "activeTopicIndex"), { t: o } = U(), b = E(
|
|
339
|
-
() => s.value === null ? null : m.value[s.value]
|
|
340
|
-
);
|
|
341
|
-
function u() {
|
|
342
|
-
n.disabled || m.value.length >= W || (m.value.push({ title: "", description: "" }), s.value = m.value.length - 1);
|
|
343
|
-
}
|
|
344
|
-
function f() {
|
|
345
|
-
n.disabled || s.value === null || (m.value.splice(s.value, 1), s.value = null);
|
|
346
|
-
}
|
|
347
|
-
return (h, w) => {
|
|
348
|
-
const r = $("FmIcon"), T = $("FmTextField"), C = $("FmButton");
|
|
349
|
-
return a(), i("section", dt, [
|
|
350
|
-
e("div", pt, [
|
|
351
|
-
e("h2", ut, l(t(o)("connect.whatsappBot.botSettings.knowledgeBase.title")), 1),
|
|
352
|
-
e("p", mt, l(t(o)("connect.whatsappBot.botSettings.knowledgeBase.description")), 1)
|
|
353
|
-
]),
|
|
354
|
-
e("div", xt, [
|
|
355
|
-
(a(!0), i(L, null, ee(m.value, (g, x) => (a(), i("button", {
|
|
356
|
-
key: x,
|
|
357
|
-
type: "button",
|
|
358
|
-
title: g.title.trim() || t(o)("connect.whatsappBot.botSettings.knowledgeBase.untitled"),
|
|
359
|
-
"aria-expanded": s.value === x,
|
|
360
|
-
"aria-controls": "knowledge-topic-editor",
|
|
361
|
-
disabled: p.disabled,
|
|
362
|
-
class: X(["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", [
|
|
363
|
-
s.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",
|
|
364
|
-
p.disabled ? "cursor-default" : "cursor-pointer hover:border-fm-color-primary"
|
|
365
|
-
]]),
|
|
366
|
-
onClick: (v) => s.value = s.value === x ? null : x
|
|
367
|
-
}, l(g.title.trim() || t(o)("connect.whatsappBot.botSettings.knowledgeBase.untitled")), 11, ft))), 128)),
|
|
368
|
-
e("button", {
|
|
369
|
-
type: "button",
|
|
370
|
-
disabled: p.disabled || m.value.length >= t(W),
|
|
371
|
-
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",
|
|
372
|
-
onClick: u
|
|
373
|
-
}, [
|
|
374
|
-
S(r, {
|
|
375
|
-
name: "add",
|
|
376
|
-
size: "sm"
|
|
377
|
-
}),
|
|
378
|
-
N(" " + l(t(o)("connect.whatsappBot.botSettings.knowledgeBase.addTopic")), 1)
|
|
379
|
-
], 8, bt)
|
|
380
|
-
]),
|
|
381
|
-
m.value.length === 0 ? (a(), i("p", vt, l(t(o)("connect.whatsappBot.botSettings.knowledgeBase.empty")), 1)) : _("", !0),
|
|
382
|
-
m.value.length >= t(W) ? (a(), i("p", gt, l(t(o)("connect.whatsappBot.botSettings.knowledgeBase.topicLimit", {
|
|
383
|
-
count: t(W)
|
|
384
|
-
})), 1)) : _("", !0),
|
|
385
|
-
b.value ? (a(), i("div", {
|
|
386
|
-
id: "knowledge-topic-editor",
|
|
387
|
-
key: s.value ?? void 0,
|
|
388
|
-
class: "rounded-[8px] border-[1px] border-fm-color-neutral-gray-100 p-[16px] flex flex-col gap-[10px]"
|
|
389
|
-
}, [
|
|
390
|
-
S(T, {
|
|
391
|
-
modelValue: b.value.title,
|
|
392
|
-
"onUpdate:modelValue": w[0] || (w[0] = (g) => b.value.title = g),
|
|
393
|
-
label: t(o)("connect.whatsappBot.botSettings.knowledgeBase.titleLabel"),
|
|
394
|
-
placeholder: t(o)("connect.whatsappBot.botSettings.knowledgeBase.titlePlaceholder"),
|
|
395
|
-
"max-length": t(be),
|
|
396
|
-
disabled: p.disabled
|
|
397
|
-
}, null, 8, ["modelValue", "label", "placeholder", "max-length", "disabled"]),
|
|
398
|
-
e("div", ht, [
|
|
399
|
-
e("label", yt, l(t(o)("connect.whatsappBot.botSettings.knowledgeBase.descriptionLabel")), 1),
|
|
400
|
-
q(e("textarea", {
|
|
401
|
-
id: "whatsapp-knowledge-topic-description",
|
|
402
|
-
"onUpdate:modelValue": w[1] || (w[1] = (g) => b.value.description = g),
|
|
403
|
-
"aria-describedby": "whatsapp-knowledge-topic-description-count",
|
|
404
|
-
placeholder: t(o)(
|
|
405
|
-
"connect.whatsappBot.botSettings.knowledgeBase.descriptionPlaceholder"
|
|
406
|
-
),
|
|
407
|
-
maxlength: t(se),
|
|
408
|
-
disabled: p.disabled,
|
|
409
|
-
rows: "5",
|
|
410
|
-
class: "block w-full min-h-[116px] resize-y rounded-[8px] border border-fm-color-neutral-gray-200 bg-fm-color-neutral-white px-[12px] py-[8px] text-[14px] leading-[20px] text-fm-color-typo-primary placeholder:text-fm-color-typo-tertiary transition-[border-color,box-shadow] focus:border-fm-color-primary focus:outline-none focus:ring-[4px] focus:ring-fm-color-primary/30 disabled:cursor-not-allowed disabled:bg-fm-color-neutral-gray-100 disabled:text-fm-color-typo-disabled"
|
|
411
|
-
}, null, 8, _t), [
|
|
412
|
-
[re, b.value.description]
|
|
413
|
-
]),
|
|
414
|
-
e("p", wt, l(b.value.description.length) + " / " + l(t(se)), 1)
|
|
415
|
-
]),
|
|
416
|
-
S(C, {
|
|
417
|
-
variant: "plain",
|
|
418
|
-
size: "sm",
|
|
419
|
-
"prepend-icon": "delete",
|
|
420
|
-
"text-color": "typo-error",
|
|
421
|
-
label: t(o)("connect.whatsappBot.botSettings.knowledgeBase.removeTopic"),
|
|
422
|
-
disabled: p.disabled,
|
|
423
|
-
class: "self-start",
|
|
424
|
-
onClick: f
|
|
425
|
-
}, null, 8, ["label", "disabled"])
|
|
426
|
-
])) : _("", !0)
|
|
427
|
-
]);
|
|
428
|
-
};
|
|
429
|
-
}
|
|
430
|
-
}), kt = {
|
|
431
|
-
"aria-labelledby": "response-speed-title",
|
|
432
|
-
class: "flex flex-col gap-[12px]"
|
|
433
|
-
}, St = { class: "flex flex-col gap-[2px]" }, $t = {
|
|
434
|
-
id: "response-speed-title",
|
|
435
|
-
class: "text-[16px] leading-[24px] font-semibold"
|
|
436
|
-
}, At = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary [text-wrap:pretty]" }, Tt = {
|
|
437
|
-
role: "radiogroup",
|
|
438
|
-
"aria-labelledby": "response-speed-title",
|
|
439
|
-
"aria-describedby": "response-speed-detail",
|
|
440
|
-
class: "grid grid-cols-[repeat(auto-fit,minmax(150px,1fr))] gap-[8px]"
|
|
441
|
-
}, It = ["value", "disabled"], Ft = { class: "flex items-center gap-[8px] text-[14px] leading-[20px] font-semibold" }, Ct = {
|
|
442
|
-
key: 0,
|
|
443
|
-
class: "w-[8px] h-[8px] rounded-full bg-fm-color-primary"
|
|
444
|
-
}, Et = { class: "text-[12px] leading-[16px] text-fm-color-typo-secondary" }, Vt = {
|
|
445
|
-
id: "response-speed-detail",
|
|
446
|
-
"aria-live": "polite",
|
|
447
|
-
class: "text-[14px] leading-[20px] text-fm-color-typo-secondary"
|
|
448
|
-
}, Pt = {
|
|
449
|
-
key: 0,
|
|
450
|
-
class: "rounded-[8px] bg-fm-color-system-warning-100 px-[12px] py-[10px] flex items-start gap-[10px] text-[14px] leading-[20px]"
|
|
451
|
-
}, Nt = /* @__PURE__ */ O({
|
|
452
|
-
__name: "ResponseSpeed",
|
|
453
|
-
props: /* @__PURE__ */ Z({
|
|
454
|
-
disabled: { type: Boolean }
|
|
455
|
-
}, {
|
|
456
|
-
modelValue: {
|
|
457
|
-
required: !0
|
|
458
|
-
},
|
|
459
|
-
modelModifiers: {}
|
|
460
|
-
}),
|
|
461
|
-
emits: ["update:modelValue"],
|
|
462
|
-
setup(p) {
|
|
463
|
-
const n = H(p, "modelValue"), { t: m } = U();
|
|
464
|
-
return (s, o) => {
|
|
465
|
-
const b = $("FmIcon");
|
|
466
|
-
return a(), i("section", kt, [
|
|
467
|
-
e("div", St, [
|
|
468
|
-
e("h2", $t, l(t(m)("connect.whatsappBot.botSettings.responseSpeed.title")), 1),
|
|
469
|
-
e("p", At, l(t(m)("connect.whatsappBot.botSettings.responseSpeed.description")), 1)
|
|
470
|
-
]),
|
|
471
|
-
e("div", Tt, [
|
|
472
|
-
(a(!0), i(L, null, ee(t(ve), (u) => (a(), i("label", { key: u }, [
|
|
473
|
-
q(e("input", {
|
|
474
|
-
"onUpdate:modelValue": o[0] || (o[0] = (f) => n.value = f),
|
|
475
|
-
type: "radio",
|
|
476
|
-
name: "response-speed",
|
|
477
|
-
value: u,
|
|
478
|
-
disabled: p.disabled,
|
|
479
|
-
class: "sr-only peer"
|
|
480
|
-
}, null, 8, It), [
|
|
481
|
-
[fe, n.value]
|
|
482
|
-
]),
|
|
483
|
-
e("span", {
|
|
484
|
-
class: X(["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", [
|
|
485
|
-
n.value === u ? "border-fm-color-primary bg-fm-color-primary-oats" : "border-fm-color-neutral-gray-200 bg-fm-color-neutral-white",
|
|
486
|
-
p.disabled ? "cursor-default opacity-60" : "cursor-pointer hover:border-fm-color-primary"
|
|
487
|
-
]])
|
|
488
|
-
}, [
|
|
489
|
-
e("span", Ft, [
|
|
490
|
-
e("span", {
|
|
491
|
-
"aria-hidden": "true",
|
|
492
|
-
class: X([
|
|
493
|
-
"w-[16px] h-[16px] shrink-0 rounded-full border-[1.5px] bg-fm-color-neutral-white flex items-center justify-center",
|
|
494
|
-
n.value === u ? "border-fm-color-primary" : "border-fm-color-neutral-gray-300"
|
|
495
|
-
])
|
|
496
|
-
}, [
|
|
497
|
-
n.value === u ? (a(), i("span", Ct)) : _("", !0)
|
|
498
|
-
], 2),
|
|
499
|
-
N(" " + l(t(m)(`connect.whatsappBot.botSettings.responseSpeed.${u}.label`)), 1)
|
|
500
|
-
]),
|
|
501
|
-
e("span", Et, l(t(m)(`connect.whatsappBot.botSettings.responseSpeed.${u}.hint`)), 1)
|
|
502
|
-
], 2)
|
|
503
|
-
]))), 128))
|
|
504
|
-
]),
|
|
505
|
-
e("p", Vt, l(t(m)(
|
|
506
|
-
`connect.whatsappBot.botSettings.responseSpeed.${n.value}.detail`
|
|
507
|
-
)), 1),
|
|
508
|
-
n.value === "immediate" ? (a(), i("div", Pt, [
|
|
509
|
-
S(b, {
|
|
510
|
-
name: "warning",
|
|
511
|
-
size: "sm",
|
|
512
|
-
class: "mt-[2px] shrink-0 text-fm-color-typo-warning"
|
|
513
|
-
}),
|
|
514
|
-
N(" " + l(t(m)("connect.whatsappBot.botSettings.responseSpeed.immediateWarning")), 1)
|
|
515
|
-
])) : _("", !0)
|
|
516
|
-
]);
|
|
517
|
-
};
|
|
518
|
-
}
|
|
519
|
-
}), Dt = { class: "mt-[20px] mx-auto w-full min-w-0 flex flex-col gap-[20px]" }, Lt = {
|
|
520
|
-
key: 0,
|
|
521
|
-
class: "py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
522
|
-
}, Ot = { class: "border-t border-fm-color-neutral-gray-100 pt-[20px]" }, Ut = { class: "group border-t border-fm-color-neutral-gray-100 pt-[12px]" }, Mt = { class: "flex h-[36px] w-fit cursor-pointer list-none items-center gap-[8px] rounded-[8px] px-[8px] -ml-[8px] text-[16px] font-semibold transition-colors hover:bg-fm-color-neutral-gray-100 focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary [&::-webkit-details-marker]:hidden" }, Rt = { class: "mt-[20px] flex flex-col gap-[20px]" }, Wt = {
|
|
523
|
-
key: 1,
|
|
524
|
-
role: "alert",
|
|
525
|
-
class: "text-[14px] text-fm-color-typo-error"
|
|
526
|
-
}, zt = { class: "flex items-center justify-end gap-[12px] flex-wrap" }, Yt = /* @__PURE__ */ O({
|
|
527
|
-
__name: "WhatsappBotSettings",
|
|
528
|
-
setup(p) {
|
|
529
|
-
const { t: n } = U(), m = de(), s = E(() => Q.getBusinessId() ?? ""), o = y(""), b = y(""), u = y([]), f = y([]), h = y(null), w = E(
|
|
530
|
-
() => u.value.filter(
|
|
531
|
-
(d) => d.title.trim() || d.description.trim()
|
|
532
|
-
)
|
|
533
|
-
), r = y(
|
|
534
|
-
z
|
|
535
|
-
), T = y(
|
|
536
|
-
z
|
|
537
|
-
), C = y(!0), g = y(!1), x = y(!1), v = y(""), B = y([]), I = y(""), G = J, K = E(
|
|
538
|
-
() => o.value !== b.value || r.value !== T.value || JSON.stringify(u.value) !== JSON.stringify(f.value)
|
|
539
|
-
), V = E(
|
|
540
|
-
() => !g.value || x.value || !K.value
|
|
541
|
-
), te = E(
|
|
542
|
-
() => !g.value || x.value || o.value.length > G || !ge.safeParse(w.value).success
|
|
543
|
-
);
|
|
544
|
-
let A, M;
|
|
545
|
-
function oe(d) {
|
|
546
|
-
B.value = d.excludedAccounts, o.value = d.botInstructions, b.value = d.botInstructions, r.value = d.responseSpeed, T.value = d.responseSpeed, u.value = d.knowledgeBase.map((c) => ({ ...c })), f.value = d.knowledgeBase.map((c) => ({
|
|
547
|
-
...c
|
|
548
|
-
}));
|
|
549
|
-
}
|
|
550
|
-
function pe(d, c) {
|
|
551
|
-
const k = d instanceof Error ? d.message : n("connect.whatsappBot.errors.loadSettings");
|
|
552
|
-
c ? I.value = k : v.value = k;
|
|
553
|
-
}
|
|
554
|
-
async function R(d = !1) {
|
|
555
|
-
if (d && x.value) return;
|
|
556
|
-
clearTimeout(M), A == null || A.abort();
|
|
557
|
-
const c = new AbortController();
|
|
558
|
-
A = c, d || (C.value = !0, g.value = !1, x.value = !1, v.value = "", o.value = "", b.value = "", r.value = z, T.value = z, u.value = [], f.value = [], h.value = null, B.value = [], I.value = "");
|
|
559
|
-
try {
|
|
560
|
-
if (!s.value)
|
|
561
|
-
throw new Error(n("connect.whatsappBot.errors.selectBusiness"));
|
|
562
|
-
const k = await Y.getSettings(
|
|
563
|
-
s.value,
|
|
564
|
-
c.signal
|
|
565
|
-
);
|
|
566
|
-
if (c.signal.aborted) return;
|
|
567
|
-
B.value = k.excludedAccounts, I.value = "", d || (oe(k), g.value = !0);
|
|
568
|
-
} catch (k) {
|
|
569
|
-
c.signal.aborted || pe(k, d);
|
|
570
|
-
} finally {
|
|
571
|
-
c.signal.aborted || (C.value = !1, g.value && le());
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
function le() {
|
|
575
|
-
clearTimeout(M), M = setTimeout(() => void R(!0), 1e4);
|
|
576
|
-
}
|
|
577
|
-
function ue(d) {
|
|
578
|
-
B.value = B.value.filter(
|
|
579
|
-
(c) => c.id !== d
|
|
580
|
-
), R(!0);
|
|
581
|
-
}
|
|
582
|
-
async function me() {
|
|
583
|
-
if (te.value) return;
|
|
584
|
-
clearTimeout(M), A == null || A.abort();
|
|
585
|
-
const d = new AbortController();
|
|
586
|
-
A = d, x.value = !0, v.value = "";
|
|
587
|
-
const c = h.value === null ? void 0 : u.value[h.value], k = c ? w.value.indexOf(c) : -1;
|
|
588
|
-
try {
|
|
589
|
-
const D = await Y.saveSettings(
|
|
590
|
-
s.value,
|
|
591
|
-
{
|
|
592
|
-
botInstructions: o.value,
|
|
593
|
-
responseSpeed: r.value,
|
|
594
|
-
knowledgeBase: w.value
|
|
595
|
-
},
|
|
596
|
-
d.signal
|
|
597
|
-
);
|
|
598
|
-
if (d.signal.aborted) return;
|
|
599
|
-
oe(D), h.value = k < 0 ? null : k, m.open({
|
|
600
|
-
type: "success",
|
|
601
|
-
message: n("connect.whatsappBot.botSettings.saved")
|
|
602
|
-
});
|
|
603
|
-
} catch (D) {
|
|
604
|
-
d.signal.aborted || (v.value = D instanceof Error ? D.message : n("connect.whatsappBot.errors.saveSettings"), m.open({ type: "error", message: v.value }));
|
|
605
|
-
} finally {
|
|
606
|
-
d.signal.aborted || (x.value = !1, le());
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
async function xe() {
|
|
610
|
-
if (V.value) return;
|
|
611
|
-
const d = s.value;
|
|
612
|
-
!await he.confirm(
|
|
613
|
-
n("connect.whatsappBot.botSettings.discardChangesMessage"),
|
|
614
|
-
n("connect.whatsappBot.botSettings.discardChangesTitle"),
|
|
615
|
-
n("connect.common.confirm"),
|
|
616
|
-
n("connect.common.cancel")
|
|
617
|
-
) || V.value || s.value !== d || (o.value = b.value, r.value = T.value, u.value = f.value.map((k) => ({ ...k })), h.value = null);
|
|
618
|
-
}
|
|
619
|
-
return ce(s, () => void R(), { immediate: !0 }), ie(() => {
|
|
620
|
-
A == null || A.abort(), clearTimeout(M);
|
|
621
|
-
}), (d, c) => {
|
|
622
|
-
const k = $("FmCircularProgress"), D = $("FmIcon"), j = $("FmButton");
|
|
623
|
-
return a(), i("div", Dt, [
|
|
624
|
-
C.value ? (a(), i("output", Lt, [
|
|
625
|
-
S(k),
|
|
626
|
-
N(" " + l(t(n)("connect.whatsappBot.botSettings.loading")), 1)
|
|
627
|
-
])) : (a(), i(L, { key: 1 }, [
|
|
628
|
-
g.value ? (a(), P(Ae, {
|
|
629
|
-
key: 0,
|
|
630
|
-
modelValue: o.value,
|
|
631
|
-
"onUpdate:modelValue": c[0] || (c[0] = (F) => o.value = F),
|
|
632
|
-
disabled: x.value
|
|
633
|
-
}, null, 8, ["modelValue", "disabled"])) : _("", !0),
|
|
634
|
-
e("div", Ot, [
|
|
635
|
-
g.value ? (a(), P(it, {
|
|
636
|
-
key: 0,
|
|
637
|
-
accounts: B.value,
|
|
638
|
-
loading: !1,
|
|
639
|
-
error: I.value,
|
|
640
|
-
onRetry: c[1] || (c[1] = (F) => R(!0)),
|
|
641
|
-
onRemoved: ue
|
|
642
|
-
}, null, 8, ["accounts", "error"])) : _("", !0)
|
|
643
|
-
]),
|
|
644
|
-
e("details", Ut, [
|
|
645
|
-
e("summary", Mt, [
|
|
646
|
-
N(l(t(n)("connect.whatsappBot.botSettings.advancedSettings")) + " ", 1),
|
|
647
|
-
S(D, {
|
|
648
|
-
name: "keyboard_arrow_down",
|
|
649
|
-
size: "sm",
|
|
650
|
-
class: "transition-transform group-open:rotate-180 motion-reduce:transition-none",
|
|
651
|
-
"aria-hidden": "true"
|
|
652
|
-
})
|
|
653
|
-
]),
|
|
654
|
-
e("div", Rt, [
|
|
655
|
-
g.value ? (a(), P(Bt, {
|
|
656
|
-
key: 0,
|
|
657
|
-
modelValue: u.value,
|
|
658
|
-
"onUpdate:modelValue": c[2] || (c[2] = (F) => u.value = F),
|
|
659
|
-
"active-topic-index": h.value,
|
|
660
|
-
"onUpdate:activeTopicIndex": c[3] || (c[3] = (F) => h.value = F),
|
|
661
|
-
disabled: x.value
|
|
662
|
-
}, null, 8, ["modelValue", "active-topic-index", "disabled"])) : _("", !0),
|
|
663
|
-
g.value ? (a(), P(Nt, {
|
|
664
|
-
key: 1,
|
|
665
|
-
modelValue: r.value,
|
|
666
|
-
"onUpdate:modelValue": c[4] || (c[4] = (F) => r.value = F),
|
|
667
|
-
disabled: x.value,
|
|
668
|
-
class: "border-t border-fm-color-neutral-gray-100 pt-[20px]"
|
|
669
|
-
}, null, 8, ["modelValue", "disabled"])) : _("", !0)
|
|
670
|
-
])
|
|
671
|
-
]),
|
|
672
|
-
v.value ? (a(), i("p", Wt, l(v.value), 1)) : _("", !0),
|
|
673
|
-
g.value ? _("", !0) : (a(), P(j, {
|
|
674
|
-
key: 2,
|
|
675
|
-
class: "self-start !rounded-full [&_.label]:text-[14px]",
|
|
676
|
-
label: t(n)("connect.whatsappBot.tryAgain"),
|
|
677
|
-
"prepend-icon": "refresh",
|
|
678
|
-
onClick: c[5] || (c[5] = (F) => R())
|
|
679
|
-
}, null, 8, ["label"])),
|
|
680
|
-
e("div", zt, [
|
|
681
|
-
S(j, {
|
|
682
|
-
variant: "secondary",
|
|
683
|
-
"border-color": "neutral-gray-200",
|
|
684
|
-
label: t(n)("connect.common.cancel"),
|
|
685
|
-
disabled: V.value,
|
|
686
|
-
class: "!rounded-full !px-[20px] [&_.label]:text-[14px]",
|
|
687
|
-
onClick: xe
|
|
688
|
-
}, null, 8, ["label", "disabled"]),
|
|
689
|
-
S(j, {
|
|
690
|
-
label: t(n)("connect.common.save"),
|
|
691
|
-
disabled: te.value,
|
|
692
|
-
loading: x.value,
|
|
693
|
-
class: "!rounded-full !px-[20px] [&_.label]:text-[14px]",
|
|
694
|
-
onClick: me
|
|
695
|
-
}, null, 8, ["label", "disabled", "loading"])
|
|
696
|
-
])
|
|
697
|
-
], 64))
|
|
698
|
-
]);
|
|
699
|
-
};
|
|
700
|
-
}
|
|
701
|
-
});
|
|
702
|
-
export {
|
|
703
|
-
Yt as default
|
|
704
|
-
};
|