@feedmepos/mf-connect 0.1.98-beta.8 → 0.1.98-beta.80
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-DsB2o1oB.js → App-DievprEi.js} +853 -683
- package/dist/{AuditLogs-BcfgiYnJ.js → AuditLogs-DrdqOhZL.js} +16 -13
- package/dist/{Bin-DMr7K8Kj.js → Bin-Ci2k3z77.js} +8 -8
- package/dist/Broadcast-CpDMAG1o.js +306 -0
- package/dist/CampaignAnalytic-uRyGaLaN.js +1830 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CwGoEBsW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DtGe2Og1.js} +8 -5
- package/dist/Card-tb98Kyr-.js +1086 -0
- package/dist/{Collections-B0uGC2FE.js → Collections-P1S5WjnJ.js} +14 -13
- package/dist/Credit-DwK7JYf-.js +286 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-Cyk0iIsd.js +53 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-8r29jKh9.js +4432 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DJLxGk7W.js → EffectSheet.vue_vue_type_style_index_0_lang-BML_-v8I.js} +36 -36
- package/dist/Experience-BejtRlOj.js +288 -0
- package/dist/{FileSaver.min-BlA0oZEC.js → FileSaver.min-C-hmBaHm.js} +1 -1
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
- package/dist/Game-n8qL896g.js +356 -0
- package/dist/GiftCardSetup-Bgsfcu7N.js +736 -0
- package/dist/GoalPickerPanel.vue_vue_type_script_setup_true_lang-CzL68PPP.js +424 -0
- package/dist/Goals-BB8LJlq3.js +247 -0
- package/dist/{Grab-DmmwrGzk.js → Grab-COq3Ujst.js} +33 -32
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DNtLW0yQ.js → ImageInput.vue_vue_type_script_setup_true_lang-BmLclEyi.js} +1 -1
- package/dist/{Index-m7l4insz.js → Index-BdkIinaE.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B9sJ-M20.js → LocationPicker.vue_vue_type_script_setup_true_lang-DsWv3DVb.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Dsg2sWjF.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DvOzGF8c.js} +1 -1
- package/dist/LoyaltyDashboard-D4Jtpw0n.js +2911 -0
- package/dist/MainLayout-Ca-Xm3eZ.js +143 -0
- package/dist/{Marketing-C9pSIdBU.js → Marketing-Cpe4s7NZ.js} +7 -6
- package/dist/{MarketingMaterialEdit-BEF2T9LR.js → MarketingMaterialEdit-nTeS9VVx.js} +15 -14
- package/dist/Member-DgGZ4Cdg.js +654 -0
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-_O3B-FIA.js +1281 -0
- package/dist/MemberImportHistory-rdlbDVWU.js +187 -0
- package/dist/MemberList-BC4aRJTt.js +334 -0
- package/dist/{MemberTransactions-CAut1TQb.js → MemberTransactions-BFfdTttp.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-1AuHixPC.js → MessageInput.vue_vue_type_script_setup_true_lang-DXajAQy9.js} +5928 -5644
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-8xVDzdO3.js +40 -0
- package/dist/Mission-BWCNKTjU.js +363 -0
- package/dist/Overview--Q7vzhNK.js +1316 -0
- package/dist/{Overview-DOJj4XvO.js → Overview-i02Wnyjn.js} +23 -20
- package/dist/Point-CiWxqny5.js +297 -0
- package/dist/Promotion-B0G9qfBm.js +426 -0
- package/dist/{Queue-55G2gtP5.js → Queue-YfwgYmzH.js} +16 -13
- package/dist/{Record-DNPI02c6.js → Record-CCuwrPKW.js} +9 -9
- package/dist/Review-ymsfdh7Q.js +45 -0
- package/dist/ReviewFacebookCallback-DyDExWvP.js +238 -0
- package/dist/ReviewGoogleCallback-DNyg3n2S.js +213 -0
- package/dist/{Reward-CnP8R2pS.js → Reward-BKIb0ezH.js} +28 -28
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BN71h9IK.js → RewardGroup.vue_vue_type_script_setup_true_lang-DPaaNgpr.js} +26 -23
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CtB9Ls5-.js → RuleGroup.vue_vue_type_script_setup_true_lang-BLFLybFn.js} +198 -186
- package/dist/{Segment-CxiQnnyj.js → Segment-D5_pp7fh.js} +278 -276
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B1vj5f7T.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLLjIA-D.js} +45 -42
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-cWx0G3nM.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRIcZwnU.js} +4 -4
- package/dist/Setting-CD78gIMU.js +574 -0
- package/dist/{SettingAdvertisements-Vt7w1WN3.js → SettingAdvertisements-C2AIT4s4.js} +12 -12
- package/dist/Settings-DI_tryQV.js +230 -0
- package/dist/Store-BV2JTRNZ.js +2615 -0
- package/dist/{StoreRewards-DILeipMG.js → StoreRewards-Bk55YXyO.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BZZ1fqwg.js +1331 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C7lVeybl.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BrEzWVrH.js} +2 -2
- package/dist/{Tier-BAZ1xuKL.js → Tier-CO2K30Ew.js} +2576 -757
- package/dist/{Title-CcNAt47f.js → Title-qProQh3T.js} +41 -37
- package/dist/Transaction-qL5L-fE_.js +45 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-hUjQVZ_U.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Co1BPScS.js} +26 -26
- package/dist/Voucher-VFD1LY9Y.js +837 -0
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CTQDxc5l.js → VoucherEditor.vue_vue_type_script_setup_true_lang-9QyTl7iq.js} +118 -124
- package/dist/WhatsappAccount-CxSGqm7H.js +325 -0
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-D8L6izf0.js +96 -0
- package/dist/WhatsappBot-C4Oz7Xwv.js +441 -0
- package/dist/WhatsappBotSettings-CKqaWzwE.js +136 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DuRKA4cj.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bcsi94dw.js} +2 -2
- package/dist/{app-Z-UKRG5V.js → app-BEYzXWZO.js} +50954 -42517
- package/dist/app.js +1 -1
- package/dist/base.export-S_82Elmg.js +75 -0
- package/dist/browser-BSAOEeIM.js +1478 -0
- package/dist/{business-C7EF6cKC.js → business-DH7djUl8.js} +5 -5
- package/dist/campaign-DlHDgoFX.js +100 -0
- package/dist/campaign-k_WHxsOR.js +400 -0
- package/dist/{campaign.enum-BNN2gLFY.js → campaign.enum-Dx-Zo68Q.js} +1 -1
- package/dist/{campaign.fn-Bd34dVnx.js → campaign.fn-B-4JRzft.js} +67 -67
- package/dist/{collectible.enum-DO9HdJGH.js → collectible.enum-Liy2wH3s.js} +1 -1
- package/dist/collection.fn-zQwWDzZT.js +26 -0
- package/dist/currency-CQVHXBFe.js +7 -0
- package/dist/{duplicateCampaign-2ODeDw3a.js → duplicateCampaign-YTXMbJTj.js} +11 -11
- package/dist/{effect-BcB8IlTI.js → effect-CQkVLHWi.js} +1 -1
- package/dist/{email-addresses-BcTeU4Sh.js → email-addresses-BIoVbPGC.js} +209 -201
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-BSgrCJRv.js → helper-BCkTvF4m.js} +1 -1
- package/dist/{index-CoHWpylO.js → index-B-bQnb0_.js} +2115 -2557
- package/dist/index-BAJOC43K.js +14550 -0
- package/dist/{index-HXiYGO4_.js → index-BFIHEBnX.js} +6343 -7693
- package/dist/{index-VlFWaBrg.js → index-BJIQe3QJ.js} +1 -1
- package/dist/{index-BpI-BI4H.js → index-BJkRTH5T.js} +4 -4
- package/dist/index-BOJogkKQ.js +172 -0
- package/dist/{index-BoYEqLif.js → index-BRPajAkE.js} +1517 -263
- package/dist/{index-CsoBDon4.js → index-BTkxgos0.js} +1590 -1523
- package/dist/index-BUP4aHq8.js +32438 -0
- package/dist/index-BYvnqARr.js +902 -0
- package/dist/{index-hlyg-wxV.js → index-Bonq819P.js} +1 -1
- package/dist/{index-CIBPhxlC.js → index-C6mOI2Pp.js} +105 -123
- package/dist/{index-Bf6jNZit.js → index-CDIe15AY.js} +24 -9
- package/dist/index-CTrcdIkt.js +137 -0
- package/dist/index-C_H8jFYf.js +2743 -0
- package/dist/index-CpnchVe1.js +74 -0
- package/dist/index-D5AR7A5e.js +151 -0
- package/dist/index-D7-Q86HI.js +54 -0
- package/dist/index-DdOj8Hew.js +53 -0
- package/dist/{index-iMPtFp54.js → index-Dvqguh2B.js} +10 -9
- package/dist/{index-Bm0QPucw.js → index-hAKRfE-4.js} +14 -14
- package/dist/index-o2Ga_qaX.js +39 -0
- package/dist/{index.esm2017-CM7OnEyP.js → index.esm2017-D0fhMMPG.js} +128 -128
- package/dist/{loading-CSXr0Yqz.js → loading-C686AMVG.js} +1 -1
- package/dist/{lodash-Bh7XKI-R.js → lodash-CANlWUWW.js} +1 -1
- package/dist/member-import-UzJ6ByIS.js +188 -0
- package/dist/membership-DCVzFaFy.js +274 -0
- package/dist/{money-BZIST_m9.js → money-DuazwoX7.js} +1 -1
- package/dist/{number-DXLR2w95.js → number-B2HFiV0g.js} +1 -1
- package/dist/objectid-Bq-oVMdP.js +145 -0
- package/dist/onboarding-BxvNxz-9.js +131 -0
- package/dist/onboardingSetup-CcvKmyx8.js +17 -0
- package/dist/{plugins-4FlbwoES.js → plugins-C39O5j42.js} +13 -12
- package/dist/remy-Qz_pNsUS.js +13 -0
- package/dist/{reward-DUbl79bZ.js → reward-HYt-2nxt.js} +1 -1
- package/dist/{rule-BQUoZ4l_.js → rule-3xNIYM7z.js} +337 -275
- package/dist/style.css +1 -1
- package/dist/{template-BoiSG7G7.js → template-D37Z_b0m.js} +6 -6
- package/dist/timezone-JwnQgpaU.js +20 -0
- package/dist/transaction.fn-C5vswLI_.js +71 -0
- package/dist/{trigger-D5g5m6tT.js → trigger-Bc6s2cvq.js} +17 -17
- package/dist/useMarketingMaterialActions-DMGyAXcy.js +96 -0
- package/dist/{usePagination-DHePBBoR.js → usePagination-DLOOwiiY.js} +1 -1
- package/dist/{user-C_ToSo-g.js → user-CTIGugVF.js} +1 -1
- package/dist/{vue-i18n-BcYh6_51.js → vue-i18n-Dpic36zz.js} +287 -287
- package/dist/{xlsx-h4G1C-xj.js → xlsx-CT9_1SFr.js} +786 -786
- package/dist/{zod-CgigfJar.js → zod-CGVrMcDl.js} +1 -1
- package/package.json +10 -6
- package/dist/Broadcast-C9akM-TB.js +0 -266
- package/dist/Card-DRkIYs0M.js +0 -910
- package/dist/Credit-V5YA_hGx.js +0 -260
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CYQMXARx.js +0 -3377
- package/dist/Experience-WTWy5yY6.js +0 -259
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
- package/dist/Game-BwOfTCW5.js +0 -330
- package/dist/LoyaltyDashboard-CJdhYiea.js +0 -1082
- package/dist/MainLayout-Du5kZOtA.js +0 -41
- package/dist/Member-DUV_vbPI.js +0 -280
- package/dist/MemberList-Ye4nOk-i.js +0 -1601
- package/dist/Mission-BBmCGpt8.js +0 -334
- package/dist/Point-Bzg6hi6o.js +0 -262
- package/dist/Promotion-BMXIp_ef.js +0 -397
- package/dist/Review-CYNPPxYU.js +0 -1141
- package/dist/ReviewFacebookCallback-0SUkKAaC.js +0 -243
- package/dist/ReviewGoogleCallback-BZEzx68n.js +0 -208
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-C4vohf6c.js +0 -181
- package/dist/Setting-jHAjccod.js +0 -2047
- package/dist/Store-Cu-hKmVa.js +0 -1996
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CGz6CTWA.js +0 -1130
- package/dist/Transaction-D7DO3dKQ.js +0 -39
- package/dist/Voucher-Cq-n1CaC.js +0 -421
- package/dist/campaign--MjoY1Mn.js +0 -219
- package/dist/campaign-DHBuP4UA.js +0 -277
- package/dist/export-CjB7qxZ9.js +0 -97
- package/dist/index-BIAjmMga.js +0 -85
- package/dist/index-Bv4MBLQ5.js +0 -52
- package/dist/index-hbyCVNa7.js +0 -30289
- package/dist/membership-CfredTm3.js +0 -255
- package/dist/objectid-Dg4ZodlT.js +0 -145
- package/dist/useMarketingMaterialActions-B-Jlw2Z9.js +0 -107
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { defineComponent as j, mergeModels as J, useModel as K, computed as R, ref as u, watch as M, onBeforeUnmount as S, resolveComponent as g, openBlock as p, createBlock as U, withCtx as E, createElementVNode as e, toDisplayString as n, unref as t, createElementBlock as x, createVNode as f, createTextVNode as T, Fragment as D, renderList as Q, createCommentVNode as A, normalizeClass as X } from "vue";
|
|
2
|
+
import { u as W } from "./vue-i18n-Dpic36zz.js";
|
|
3
|
+
import { useRoute as Y } from "vue-router";
|
|
4
|
+
import { S as z, a as P } from "./index-BUP4aHq8.js";
|
|
5
|
+
import { w as O } from "./index-D7-Q86HI.js";
|
|
6
|
+
import { u as q, _ as Z } from "./WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-D8L6izf0.js";
|
|
7
|
+
import { b as ee } from "./browser-BSAOEeIM.js";
|
|
8
|
+
import { R as te } from "./app-BEYzXWZO.js";
|
|
9
|
+
const oe = { class: "min-w-0 flex flex-col" }, ne = { class: "text-[18px] leading-[24px] font-semibold" }, ae = { class: "text-[13px] leading-[18px] text-fm-color-typo-secondary break-words" }, se = {
|
|
10
|
+
key: 0,
|
|
11
|
+
role: "status",
|
|
12
|
+
class: "py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
13
|
+
}, le = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "py-[40px] flex flex-col items-center text-center gap-[16px]"
|
|
16
|
+
}, re = {
|
|
17
|
+
role: "alert",
|
|
18
|
+
class: "text-[14px] text-fm-color-typo-error"
|
|
19
|
+
}, ie = {
|
|
20
|
+
key: 2,
|
|
21
|
+
class: "grid grid-cols-[minmax(0,1fr)_226px] xs:grid-cols-1 gap-[32px] p-[8px] xs:p-[0px]"
|
|
22
|
+
}, ce = { class: "min-w-0 flex flex-col gap-[20px] text-[14px] leading-[20px]" }, pe = { class: "text-fm-color-typo-secondary" }, ue = { class: "flex flex-col gap-[10px]" }, de = { class: "text-[12px] leading-[16px] font-semibold uppercase tracking-[0.06em] text-fm-color-typo-secondary" }, fe = { class: "flex flex-col gap-[10px]" }, xe = { class: "flex flex-col gap-[6px]" }, me = {
|
|
23
|
+
id: "whatsapp-group-invite-link-label",
|
|
24
|
+
class: "font-medium text-fm-color-typo-secondary"
|
|
25
|
+
}, ve = { class: "flex items-center gap-[8px] border border-fm-color-neutral-gray-200 rounded-[8px] pl-[12px] pr-[4px] py-[4px]" }, he = {
|
|
26
|
+
id: "whatsapp-group-invite-link",
|
|
27
|
+
role: "textbox",
|
|
28
|
+
"aria-readonly": "true",
|
|
29
|
+
"aria-labelledby": "whatsapp-group-invite-link-label",
|
|
30
|
+
tabindex: "0",
|
|
31
|
+
class: "flex-1 min-w-0 h-[32px] overflow-x-auto overflow-y-hidden whitespace-nowrap text-[13px] leading-[32px] font-mono bg-fm-color-neutral-white rounded-[4px] focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary"
|
|
32
|
+
}, ge = ["disabled"], _e = {
|
|
33
|
+
key: 0,
|
|
34
|
+
role: "status",
|
|
35
|
+
class: "sr-only"
|
|
36
|
+
}, ye = {
|
|
37
|
+
key: 1,
|
|
38
|
+
role: "alert",
|
|
39
|
+
class: "text-[12px] leading-[16px] text-fm-color-typo-error"
|
|
40
|
+
}, be = { class: "text-[12px] leading-[16px] text-fm-color-typo-secondary" }, we = { class: "flex flex-col items-center gap-[12px] w-[226px] xs:justify-self-center" }, Be = { class: "border border-fm-color-neutral-gray-100 rounded-[12px] overflow-hidden" }, ke = ["src", "alt"], $e = ["href"], Ge = /* @__PURE__ */ j({
|
|
41
|
+
__name: "WhatsappNotificationGroupDialog",
|
|
42
|
+
props: /* @__PURE__ */ J({
|
|
43
|
+
account: {}
|
|
44
|
+
}, {
|
|
45
|
+
modelValue: { type: Boolean, required: !0 },
|
|
46
|
+
modelModifiers: {}
|
|
47
|
+
}),
|
|
48
|
+
emits: ["update:modelValue"],
|
|
49
|
+
setup(N) {
|
|
50
|
+
const s = N, k = K(N, "modelValue"), { t: o } = W(), _ = R(() => z.getBusinessId() ?? ""), { name: d, phoneNumber: G } = q(() => s.account), l = u(), m = u(""), C = u(!1), v = u(""), h = u(!1), y = u(!1), b = u("");
|
|
51
|
+
let r, w;
|
|
52
|
+
function B() {
|
|
53
|
+
r == null || r.abort(), clearTimeout(w), h.value = !1, y.value = !1;
|
|
54
|
+
}
|
|
55
|
+
async function $() {
|
|
56
|
+
B();
|
|
57
|
+
const a = new AbortController();
|
|
58
|
+
r = a, C.value = !0, v.value = "", b.value = "", l.value = void 0, m.value = "";
|
|
59
|
+
try {
|
|
60
|
+
if (!_.value)
|
|
61
|
+
throw new Error(o("connect.whatsappBot.errors.selectBusiness"));
|
|
62
|
+
const c = await O.getNotificationGroup(
|
|
63
|
+
_.value,
|
|
64
|
+
s.account.clientId,
|
|
65
|
+
a.signal
|
|
66
|
+
);
|
|
67
|
+
if (a.signal.aborted) return;
|
|
68
|
+
const F = await ee.toDataURL(c.inviteLink, {
|
|
69
|
+
width: 224,
|
|
70
|
+
margin: 2,
|
|
71
|
+
errorCorrectionLevel: "M"
|
|
72
|
+
});
|
|
73
|
+
if (a.signal.aborted) return;
|
|
74
|
+
l.value = c, m.value = F;
|
|
75
|
+
} catch (c) {
|
|
76
|
+
if (a.signal.aborted) return;
|
|
77
|
+
c instanceof P && c.status === 409 ? v.value = o("connect.whatsappBot.notificationGroup.notReady") : c instanceof P && c.status === 404 ? v.value = o("connect.whatsappBot.errors.accountNotFound") : v.value = _.value ? o("connect.whatsappBot.errors.loadGroup") : o("connect.whatsappBot.errors.selectBusiness");
|
|
78
|
+
} finally {
|
|
79
|
+
a.signal.aborted || (C.value = !1);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
async function i() {
|
|
83
|
+
if (!l.value || !r || y.value) return;
|
|
84
|
+
const a = r;
|
|
85
|
+
y.value = !0, h.value = !1, b.value = "", clearTimeout(w);
|
|
86
|
+
try {
|
|
87
|
+
if (await navigator.clipboard.writeText(l.value.inviteLink), a.signal.aborted) return;
|
|
88
|
+
h.value = !0, w = setTimeout(() => {
|
|
89
|
+
h.value = !1;
|
|
90
|
+
}, 2e3);
|
|
91
|
+
} catch {
|
|
92
|
+
a.signal.aborted || (b.value = o("connect.whatsappBot.errors.copyGroupLink"));
|
|
93
|
+
} finally {
|
|
94
|
+
a.signal.aborted || (y.value = !1);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return M(
|
|
98
|
+
[k, _, () => s.account.clientId],
|
|
99
|
+
([a]) => {
|
|
100
|
+
a ? $() : B();
|
|
101
|
+
},
|
|
102
|
+
{ immediate: !0 }
|
|
103
|
+
), S(B), (a, c) => {
|
|
104
|
+
const F = g("FmCircularProgress"), V = g("FmButton"), I = g("FmIcon"), H = g("FmDialog");
|
|
105
|
+
return p(), U(H, {
|
|
106
|
+
modelValue: k.value,
|
|
107
|
+
"onUpdate:modelValue": c[0] || (c[0] = (L) => k.value = L),
|
|
108
|
+
"min-width": "min(720px, calc(100% - 32px))",
|
|
109
|
+
"max-width": "720px",
|
|
110
|
+
"max-height": "90vh",
|
|
111
|
+
"dismiss-away": ""
|
|
112
|
+
}, {
|
|
113
|
+
"dialog-header": E(() => [
|
|
114
|
+
e("div", oe, [
|
|
115
|
+
e("h2", ne, n(t(o)("connect.whatsappBot.notificationGroup.dialogTitle")), 1),
|
|
116
|
+
e("p", ae, n(t(d)) + " · " + n(t(G)), 1)
|
|
117
|
+
])
|
|
118
|
+
]),
|
|
119
|
+
default: E(() => [
|
|
120
|
+
C.value ? (p(), x("div", se, [
|
|
121
|
+
f(F),
|
|
122
|
+
T(" " + n(t(o)("connect.whatsappBot.notificationGroup.loading")), 1)
|
|
123
|
+
])) : v.value ? (p(), x("div", le, [
|
|
124
|
+
e("p", re, n(v.value), 1),
|
|
125
|
+
f(V, {
|
|
126
|
+
label: t(o)("connect.whatsappBot.tryAgain"),
|
|
127
|
+
"prepend-icon": "refresh",
|
|
128
|
+
onClick: $
|
|
129
|
+
}, null, 8, ["label"])
|
|
130
|
+
])) : l.value ? (p(), x("div", ie, [
|
|
131
|
+
e("div", ce, [
|
|
132
|
+
e("p", pe, n(t(o)("connect.whatsappBot.notificationGroup.scanDescription")), 1),
|
|
133
|
+
e("div", ue, [
|
|
134
|
+
e("h3", de, n(t(o)("connect.whatsappBot.notificationGroup.postsTitle")), 1),
|
|
135
|
+
e("ul", fe, [
|
|
136
|
+
(p(), x(D, null, Q(["unanswered", "staffRequests", "humanRequests"], (L) => e("li", {
|
|
137
|
+
key: L,
|
|
138
|
+
class: "flex gap-[10px]"
|
|
139
|
+
}, [
|
|
140
|
+
c[1] || (c[1] = e("span", {
|
|
141
|
+
"aria-hidden": "true",
|
|
142
|
+
class: "w-[6px] h-[6px] rounded-full bg-fm-color-primary shrink-0 mt-[7px]"
|
|
143
|
+
}, null, -1)),
|
|
144
|
+
T(" " + n(t(o)(`connect.whatsappBot.notificationGroup.posts.${L}`)), 1)
|
|
145
|
+
])), 64))
|
|
146
|
+
])
|
|
147
|
+
]),
|
|
148
|
+
e("div", xe, [
|
|
149
|
+
e("span", me, n(t(o)("connect.whatsappBot.notificationGroup.inviteLink")), 1),
|
|
150
|
+
e("div", ve, [
|
|
151
|
+
e("div", he, n(l.value.inviteLink), 1),
|
|
152
|
+
e("button", {
|
|
153
|
+
type: "button",
|
|
154
|
+
disabled: y.value,
|
|
155
|
+
class: "shrink-0 h-[32px] px-[12px] rounded-[6px] bg-fm-color-neutral-gray-100 text-[13px] font-semibold hover:bg-fm-color-neutral-gray-200 disabled:opacity-50 focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary",
|
|
156
|
+
onClick: i
|
|
157
|
+
}, n(t(o)(
|
|
158
|
+
`connect.whatsappBot.notificationGroup.${h.value ? "copied" : "copy"}`
|
|
159
|
+
)), 9, ge)
|
|
160
|
+
]),
|
|
161
|
+
h.value ? (p(), x("span", _e, n(t(o)("connect.whatsappBot.notificationGroup.copied")), 1)) : A("", !0),
|
|
162
|
+
b.value ? (p(), x("p", ye, n(b.value), 1)) : A("", !0),
|
|
163
|
+
e("p", be, n(t(o)("connect.whatsappBot.notificationGroup.shareNote")), 1)
|
|
164
|
+
])
|
|
165
|
+
]),
|
|
166
|
+
e("div", we, [
|
|
167
|
+
e("div", Be, [
|
|
168
|
+
e("img", {
|
|
169
|
+
src: m.value,
|
|
170
|
+
alt: t(o)("connect.whatsappBot.notificationGroup.qrAlt"),
|
|
171
|
+
width: "224",
|
|
172
|
+
height: "224"
|
|
173
|
+
}, null, 8, ke)
|
|
174
|
+
]),
|
|
175
|
+
e("a", {
|
|
176
|
+
href: l.value.inviteLink,
|
|
177
|
+
target: "_blank",
|
|
178
|
+
rel: "noopener noreferrer",
|
|
179
|
+
class: "w-full h-[40px] flex items-center justify-center gap-[6px] rounded-full bg-fm-color-primary text-fm-color-typo-white text-[14px] font-semibold no-underline hover:opacity-90 focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary focus-visible:ring-offset-[2px]"
|
|
180
|
+
}, [
|
|
181
|
+
T(n(t(o)("connect.whatsappBot.notificationGroup.openWhatsapp")) + " ", 1),
|
|
182
|
+
f(I, {
|
|
183
|
+
name: "open_in_new",
|
|
184
|
+
size: "sm"
|
|
185
|
+
})
|
|
186
|
+
], 8, $e)
|
|
187
|
+
])
|
|
188
|
+
])) : A("", !0)
|
|
189
|
+
]),
|
|
190
|
+
_: 1
|
|
191
|
+
}, 8, ["modelValue"]);
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
}), Ce = { class: "px-[24px] xs:px-[12px] pt-[20px] pb-[40px] text-fm-color-typo-primary" }, Fe = { class: "w-full flex flex-col gap-[24px]" }, Ie = {
|
|
195
|
+
key: 0,
|
|
196
|
+
role: "status",
|
|
197
|
+
class: "py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
198
|
+
}, Te = {
|
|
199
|
+
key: 1,
|
|
200
|
+
class: "border border-fm-color-neutral-gray-200 rounded-[16px] px-[24px] py-[56px] flex flex-col items-center text-center gap-[16px]"
|
|
201
|
+
}, Ae = {
|
|
202
|
+
role: "alert",
|
|
203
|
+
class: "text-[14px] text-fm-color-typo-error"
|
|
204
|
+
}, Ve = { class: "flex items-center gap-[16px]" }, Le = { class: "min-w-0 flex-1 flex flex-col gap-[2px]" }, Ne = { class: "text-[24px] leading-[32px] font-semibold tracking-[-0.01em] break-words" }, Re = { class: "flex items-center gap-[10px] flex-wrap text-[14px] text-fm-color-typo-secondary" }, Ee = { class: "break-all" }, De = {
|
|
205
|
+
"aria-labelledby": "notification-group-title",
|
|
206
|
+
class: "border border-fm-color-neutral-gray-100 rounded-[16px] p-[24px] xs:p-[20px] flex items-center gap-[16px] flex-wrap"
|
|
207
|
+
}, Pe = {
|
|
208
|
+
"aria-hidden": "true",
|
|
209
|
+
class: "w-[40px] h-[40px] rounded-[8px] shrink-0 self-start bg-fm-color-primary-oats text-fm-color-primary flex items-center justify-center"
|
|
210
|
+
}, je = { class: "min-w-[240px] xs:min-w-0 flex-1 flex flex-col gap-[4px]" }, Me = {
|
|
211
|
+
id: "notification-group-title",
|
|
212
|
+
class: "text-[16px] leading-[24px] font-semibold"
|
|
213
|
+
}, Se = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary" }, Qe = /* @__PURE__ */ j({
|
|
214
|
+
__name: "WhatsappAccount",
|
|
215
|
+
setup(N) {
|
|
216
|
+
const { t: s } = W(), k = Y(), o = R(() => z.getBusinessId() ?? ""), _ = R(
|
|
217
|
+
() => typeof k.params.clientId == "string" ? k.params.clientId : ""
|
|
218
|
+
), d = u(), G = u(!0), l = u(""), m = u(!1), { name: C, phoneNumber: v, initials: h, state: y, avatarColor: b } = q(d);
|
|
219
|
+
let r, w;
|
|
220
|
+
async function B($ = !1) {
|
|
221
|
+
clearTimeout(w), r == null || r.abort();
|
|
222
|
+
const i = new AbortController();
|
|
223
|
+
r = i, $ || (G.value = !0, l.value = "");
|
|
224
|
+
try {
|
|
225
|
+
if (!o.value)
|
|
226
|
+
throw new Error(s("connect.whatsappBot.errors.selectBusiness"));
|
|
227
|
+
const a = await O.getClient(
|
|
228
|
+
o.value,
|
|
229
|
+
_.value,
|
|
230
|
+
i.signal
|
|
231
|
+
);
|
|
232
|
+
if (i.signal.aborted) return;
|
|
233
|
+
d.value = a, l.value = "";
|
|
234
|
+
} catch (a) {
|
|
235
|
+
if (i.signal.aborted) return;
|
|
236
|
+
a instanceof P && a.status === 404 ? (m.value = !1, d.value = void 0, l.value = s("connect.whatsappBot.errors.accountNotFound")) : $ || (l.value = o.value ? s("connect.whatsappBot.errors.loadAccount") : s("connect.whatsappBot.errors.selectBusiness"));
|
|
237
|
+
} finally {
|
|
238
|
+
i.signal.aborted || (G.value = !1, d.value && (w = setTimeout(() => void B(!0), 1e4)));
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return M(
|
|
242
|
+
[o, _],
|
|
243
|
+
() => {
|
|
244
|
+
m.value = !1, d.value = void 0, B();
|
|
245
|
+
},
|
|
246
|
+
{ immediate: !0 }
|
|
247
|
+
), S(() => {
|
|
248
|
+
r == null || r.abort(), clearTimeout(w);
|
|
249
|
+
}), ($, i) => {
|
|
250
|
+
const a = g("FmIcon"), c = g("RouterLink"), F = g("FmCircularProgress"), V = g("FmButton");
|
|
251
|
+
return p(), x(D, null, [
|
|
252
|
+
e("div", Ce, [
|
|
253
|
+
e("div", Fe, [
|
|
254
|
+
f(c, {
|
|
255
|
+
to: { name: t(te)["$connect-WHATSAPP_BOT"] },
|
|
256
|
+
class: "self-start flex items-center gap-[4px] h-[32px] pl-[6px] pr-[10px] -ml-[6px] rounded-[8px] text-[14px] font-medium text-fm-color-typo-secondary no-underline hover:bg-fm-color-neutral-gray-100 hover:text-fm-color-typo-primary focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary"
|
|
257
|
+
}, {
|
|
258
|
+
default: E(() => [
|
|
259
|
+
f(a, {
|
|
260
|
+
name: "chevron_left",
|
|
261
|
+
size: "sm"
|
|
262
|
+
}),
|
|
263
|
+
T(" " + n(t(s)("connect.navigation.whatsappBot")), 1)
|
|
264
|
+
]),
|
|
265
|
+
_: 1
|
|
266
|
+
}, 8, ["to"]),
|
|
267
|
+
G.value ? (p(), x("div", Ie, [
|
|
268
|
+
f(F),
|
|
269
|
+
T(" " + n(t(s)("connect.whatsappBot.loadingAccount")), 1)
|
|
270
|
+
])) : l.value ? (p(), x("div", Te, [
|
|
271
|
+
e("p", Ae, n(l.value), 1),
|
|
272
|
+
f(V, {
|
|
273
|
+
label: t(s)("connect.whatsappBot.tryAgain"),
|
|
274
|
+
"prepend-icon": "refresh",
|
|
275
|
+
onClick: i[0] || (i[0] = (I) => B())
|
|
276
|
+
}, null, 8, ["label"])
|
|
277
|
+
])) : d.value ? (p(), x(D, { key: 2 }, [
|
|
278
|
+
e("div", Ve, [
|
|
279
|
+
e("div", {
|
|
280
|
+
"aria-hidden": "true",
|
|
281
|
+
class: X(["w-[56px] h-[56px] rounded-full shrink-0 flex items-center justify-center text-[18px] font-semibold text-fm-color-typo-white", t(b)])
|
|
282
|
+
}, n(t(h)), 3),
|
|
283
|
+
e("div", Le, [
|
|
284
|
+
e("h1", Ne, n(t(C)), 1),
|
|
285
|
+
e("div", Re, [
|
|
286
|
+
e("span", Ee, n(t(v)), 1),
|
|
287
|
+
f(Z, { state: t(y) }, null, 8, ["state"])
|
|
288
|
+
])
|
|
289
|
+
])
|
|
290
|
+
]),
|
|
291
|
+
e("section", De, [
|
|
292
|
+
e("div", Pe, [
|
|
293
|
+
f(a, {
|
|
294
|
+
name: "notifications",
|
|
295
|
+
size: "md"
|
|
296
|
+
})
|
|
297
|
+
]),
|
|
298
|
+
e("div", je, [
|
|
299
|
+
e("h2", Me, n(t(s)("connect.whatsappBot.notificationGroup.title")), 1),
|
|
300
|
+
e("p", Se, n(t(s)("connect.whatsappBot.notificationGroup.description")), 1)
|
|
301
|
+
]),
|
|
302
|
+
f(V, {
|
|
303
|
+
variant: "secondary",
|
|
304
|
+
label: t(s)("connect.whatsappBot.notificationGroup.join"),
|
|
305
|
+
"prepend-icon": "group",
|
|
306
|
+
class: "shrink-0",
|
|
307
|
+
onClick: i[1] || (i[1] = (I) => m.value = !0)
|
|
308
|
+
}, null, 8, ["label"])
|
|
309
|
+
])
|
|
310
|
+
], 64)) : A("", !0)
|
|
311
|
+
])
|
|
312
|
+
]),
|
|
313
|
+
d.value ? (p(), U(Ge, {
|
|
314
|
+
key: 0,
|
|
315
|
+
modelValue: m.value,
|
|
316
|
+
"onUpdate:modelValue": i[2] || (i[2] = (I) => m.value = I),
|
|
317
|
+
account: d.value
|
|
318
|
+
}, null, 8, ["modelValue", "account"])) : A("", !0)
|
|
319
|
+
], 64);
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
export {
|
|
324
|
+
Qe as default
|
|
325
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { computed as n, toValue as h, defineComponent as x, openBlock as w, createElementBlock as A, normalizeClass as b, createElementVNode as B, createTextVNode as _, toDisplayString as C, unref as N } from "vue";
|
|
2
|
+
import { u as f } from "./vue-i18n-Dpic36zz.js";
|
|
3
|
+
function O(a) {
|
|
4
|
+
const o = a.connectedAt !== null;
|
|
5
|
+
switch (a.status) {
|
|
6
|
+
case "connected":
|
|
7
|
+
return "connected";
|
|
8
|
+
case "disconnected":
|
|
9
|
+
return "disconnected";
|
|
10
|
+
case "connecting":
|
|
11
|
+
return o ? "connecting" : void 0;
|
|
12
|
+
case "not_found":
|
|
13
|
+
return o ? "loggedOut" : void 0;
|
|
14
|
+
case "unavailable":
|
|
15
|
+
return o ? "unavailable" : void 0;
|
|
16
|
+
case "pairing":
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const g = [
|
|
21
|
+
"bg-fm-color-primary",
|
|
22
|
+
"bg-fm-color-secondary-plum",
|
|
23
|
+
"bg-fm-color-system-success-400"
|
|
24
|
+
];
|
|
25
|
+
function I(a) {
|
|
26
|
+
const { t: o, locale: l } = f(), t = n(() => h(a)), c = n(
|
|
27
|
+
() => {
|
|
28
|
+
var e, s, p, i, m, d;
|
|
29
|
+
return ((s = (e = t.value) == null ? void 0 : e.account) == null ? void 0 : s.businessName) || ((i = (p = t.value) == null ? void 0 : p.account) == null ? void 0 : i.name) || ((d = (m = t.value) == null ? void 0 : m.account) == null ? void 0 : d.phoneNumber) || o("connect.whatsappBot.unnamedAccount");
|
|
30
|
+
}
|
|
31
|
+
), r = n(
|
|
32
|
+
() => {
|
|
33
|
+
var e, s;
|
|
34
|
+
return ((s = (e = t.value) == null ? void 0 : e.account) == null ? void 0 : s.phoneNumber) || o("connect.whatsappBot.phoneUnavailable");
|
|
35
|
+
}
|
|
36
|
+
), u = n(
|
|
37
|
+
() => c.value.trim().split(/\s+/).slice(0, 2).map((e) => Array.from(e)[0]).join("").toLocaleUpperCase(l.value)
|
|
38
|
+
), v = n(
|
|
39
|
+
() => t.value ? O(t.value) ?? "unavailable" : "unavailable"
|
|
40
|
+
), y = n(
|
|
41
|
+
() => {
|
|
42
|
+
var e;
|
|
43
|
+
return g[parseInt(((e = t.value) == null ? void 0 : e.clientId.slice(-6)) ?? "0", 16) % g.length];
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
return { name: c, phoneNumber: r, initials: u, state: v, avatarColor: y };
|
|
47
|
+
}
|
|
48
|
+
const L = /* @__PURE__ */ x({
|
|
49
|
+
__name: "WhatsappAccountStatusLabel",
|
|
50
|
+
props: {
|
|
51
|
+
state: {}
|
|
52
|
+
},
|
|
53
|
+
setup(a) {
|
|
54
|
+
const o = a, { t: l } = f(), t = {
|
|
55
|
+
connected: {
|
|
56
|
+
label: "connect.whatsappBot.connected",
|
|
57
|
+
pill: "text-fm-color-typo-success bg-fm-color-system-success-100",
|
|
58
|
+
dot: "bg-fm-color-system-success-400"
|
|
59
|
+
},
|
|
60
|
+
connecting: {
|
|
61
|
+
label: "connect.whatsappBot.statusConnecting",
|
|
62
|
+
pill: "text-fm-color-typo-warning bg-fm-color-system-warning-100",
|
|
63
|
+
dot: "bg-fm-color-system-warning-400"
|
|
64
|
+
},
|
|
65
|
+
disconnected: {
|
|
66
|
+
label: "connect.whatsappBot.disconnected",
|
|
67
|
+
pill: "text-fm-color-typo-error bg-fm-color-system-error-100",
|
|
68
|
+
dot: "bg-fm-color-system-error-400"
|
|
69
|
+
},
|
|
70
|
+
loggedOut: {
|
|
71
|
+
label: "connect.whatsappBot.loggedOut",
|
|
72
|
+
pill: "text-fm-color-typo-error bg-fm-color-system-error-100",
|
|
73
|
+
dot: "bg-fm-color-system-error-400"
|
|
74
|
+
},
|
|
75
|
+
unavailable: {
|
|
76
|
+
label: "connect.whatsappBot.statusUnavailable",
|
|
77
|
+
pill: "text-fm-color-typo-secondary bg-fm-color-neutral-gray-100",
|
|
78
|
+
dot: "bg-fm-color-neutral-gray-400"
|
|
79
|
+
}
|
|
80
|
+
}, c = n(() => t[o.state]);
|
|
81
|
+
return (r, u) => (w(), A("span", {
|
|
82
|
+
class: b(["flex items-center gap-[6px] text-[12px] font-semibold px-[8px] py-[3px] rounded-[6px]", c.value.pill])
|
|
83
|
+
}, [
|
|
84
|
+
B("span", {
|
|
85
|
+
"aria-hidden": "true",
|
|
86
|
+
class: b(["w-[6px] h-[6px] rounded-full", c.value.dot])
|
|
87
|
+
}, null, 2),
|
|
88
|
+
_(" " + C(N(l)(c.value.label)), 1)
|
|
89
|
+
], 2));
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
export {
|
|
93
|
+
L as _,
|
|
94
|
+
I as u,
|
|
95
|
+
O as w
|
|
96
|
+
};
|