@feedmepos/mf-connect 0.1.115-prod → 0.1.117-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/README.md +64 -1
- package/dist/{App-CvtSY8ZO.js → App-BpcsgH7K.js} +444 -427
- package/dist/AuditLogs-BNnUiVnD.js +2016 -0
- package/dist/{Bin-B3gS9QVZ.js → Bin-Cm0wjQeR.js} +8 -8
- package/dist/{Broadcast-DAeb-HaN.js → Broadcast-BoJaHqnO.js} +22 -21
- package/dist/{CampaignAnalytic-BfTaHVem.js → CampaignAnalytic-Eg4xZW0B.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zsei4OfG.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BXylK6Ze.js} +9 -9
- package/dist/{Card-JFeVIwFs.js → Card-BfkMcFaG.js} +25 -24
- package/dist/{Collections-xcDpEhIm.js → Collections-RXmxQbII.js} +197 -185
- package/dist/{Credit-C9HJZjDS.js → Credit-CsRPM1jv.js} +21 -20
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DSqVY91w.js → DateRangeChip.vue_vue_type_script_setup_true_lang-D2tvK7pw.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgPeHurN.js +4442 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-C3J0rCTt.js → EffectSheet.vue_vue_type_style_index_0_lang-CUx8UIIq.js} +32 -32
- package/dist/{Experience-DszS8gto.js → Experience-BC8Pj-v9.js} +32 -31
- package/dist/{FileSaver.min-CFVQKaC-.js → FileSaver.min-DzmoQFA0.js} +1 -1
- package/dist/{Game-DhgeN7E2.js → Game-DJXNHFBs.js} +19 -18
- package/dist/{GiftCardSetup-CWm6IhrS.js → GiftCardSetup-_0n8lU-t.js} +75 -75
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-BuKADvmK.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-C-AiJdui.js} +7 -7
- package/dist/{Goals-DtRVierH.js → Goals-DSZwKpds.js} +4 -4
- package/dist/Grab-DDc7e-AC.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DlEFyu6h.js → ImageInput.vue_vue_type_script_setup_true_lang-BZb-H4fM.js} +1 -1
- package/dist/{Index-DFRcu_qE.js → Index-Cbi0bquE.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B3Br4Xvi.js → LocationPicker.vue_vue_type_script_setup_true_lang-GLhMtvzi.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CjNJj3qj.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Bt9CO_QR.js} +1 -1
- package/dist/{LoyaltyDashboard-BWHKDPzk.js → LoyaltyDashboard-fK90c27A.js} +15 -15
- package/dist/MainLayout-Bf-l9yL4.js +4 -0
- package/dist/{MainLayout-BmpNNAiE.js → MainLayout.vue_vue_type_script_setup_true_lang-COR6YYYI.js} +5 -4
- package/dist/Marketing-B7cZGsO-.js +269 -0
- package/dist/MarketingMaterialEdit-5IcV2ct6.js +1037 -0
- package/dist/{Member-xEzrBW_p.js → Member-BGTrRVdq.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DRoC-I0t.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DJr2hV2W.js} +43 -50
- package/dist/{MemberImportHistory-CEQpBBF8.js → MemberImportHistory--FxkTJmu.js} +7 -7
- package/dist/{MemberList-CCvzkHv8.js → MemberList-EjY5dgwt.js} +103 -105
- package/dist/{MemberTransactions-Bmh39J2W.js → MemberTransactions-Oia7LIFK.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D3Pmk80l.js → MessageInput.vue_vue_type_script_setup_true_lang-CLOQZCYy.js} +14 -14
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DIBKAwHP.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Ev3bB8cg.js} +1 -1
- package/dist/{Mission-CpUo2Bgw.js → Mission-BFHYb4aT.js} +22 -21
- package/dist/{Overview-DcDZmDXA.js → Overview-BVNyQxFL.js} +23 -22
- package/dist/{Overview-CwQqQ1Tn.js → Overview-d5U37aot.js} +145 -144
- package/dist/{Point-CUNQsQIx.js → Point-CXkqH02Z.js} +22 -21
- package/dist/{Promotion-Cqdim7aW.js → Promotion-DdxNvlOO.js} +137 -131
- package/dist/{Queue-CNBVh1UG.js → Queue-C96oNKyP.js} +46 -45
- package/dist/{Record-BYwz4l4o.js → Record-Bj2e2Y4i.js} +9 -9
- package/dist/{Review-CqLcZFj8.js → Review-CJK5S1oI.js} +2 -2
- package/dist/ReviewFacebookCallback-ChG7TRy5.js +225 -0
- package/dist/{ReviewGoogleCallback-Dg8R7QlO.js → ReviewGoogleCallback-Dmk4VyGA.js} +5 -5
- package/dist/{Reward-M8GZ8eHq.js → Reward-Dh2YI0Xb.js} +29 -29
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BkM9-Sx-.js → RewardGroup.vue_vue_type_script_setup_true_lang-U47m3AAn.js} +16 -15
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-2L6ZGMW7.js +1923 -0
- package/dist/{Segment-CrMi6xrp.js → Segment-FYvtCkqH.js} +304 -305
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DKH5_9db.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DPZZz2e0.js} +31 -30
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyeAQ-hg.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8wBgLlS.js} +4 -4
- package/dist/Setting-CUAWjCqa.js +574 -0
- package/dist/{SettingAdvertisements-Dh7v4c1D.js → SettingAdvertisements-COIQwUD6.js} +12 -12
- package/dist/Settings-D2gFPvmW.js +286 -0
- package/dist/{Store-CV-BmK5b.js → Store-BAXwiyvx.js} +31 -30
- package/dist/{StoreRewards-DPhSLvSZ.js → StoreRewards-2mUavtUg.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-5g3yIL1a.js +1319 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DHi4rdT1.js +7007 -0
- package/dist/{Tier-ChvYps23.js → Tier-BmAOzRHL.js} +2576 -687
- package/dist/{Title-v-Ivswr1.js → Title-DMxiUg30.js} +94 -92
- package/dist/{Transaction-CRqE1Ix0.js → Transaction-CF6hXEpN.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-B0Uh9iuj.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BON_t0dL.js} +26 -26
- package/dist/{Voucher-Bg8FOuzD.js → Voucher-DrtITxq-.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-HKxivQMF.js → VoucherEditor.vue_vue_type_script_setup_true_lang-1DZOzJKx.js} +16 -16
- package/dist/WhatsappAccount-Bb0Y7ikk.js +159 -0
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-CPlyzkp4.js +39 -0
- package/dist/WhatsappBot-DNvvaPey.js +876 -0
- package/dist/WhatsappBotLogs-C8M-1pvv.js +372 -0
- package/dist/WhatsappBotSettings-D6egqUyU.js +705 -0
- package/dist/WhatsappLayout-DeQTPuF6.js +21 -0
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DI0pcHcE.js +253 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-8d290Dcp.js → ZodTextField.vue_vue_type_script_setup_true_lang-CKZscSjU.js} +2 -2
- package/dist/{app-DdNKsn2Q.js → app-BjdLqYQq.js} +8879 -7107
- package/dist/app.js +4 -3
- package/dist/{base.export-R97FrSQL.js → base.export-B68z5BF6.js} +2 -2
- package/dist/browser-BSAOEeIM.js +1478 -0
- package/dist/{business-Ce8vq3wQ.js → business-D9fgkHxb.js} +1 -1
- package/dist/{campaign-C19If7bW.js → campaign-Dw_ujovr.js} +121 -94
- package/dist/{campaign-BTllt2LH.js → campaign-eMaPX8r6.js} +31 -25
- package/dist/{campaign.enum-9CCbalR4.js → campaign.enum-Dx-Zo68Q.js} +3 -2
- package/dist/{campaign.fn-B4g03h0A.js → campaign.fn-DFjGNvmN.js} +78 -78
- package/dist/{collectible.enum-MvqF7mSg.js → collectible.enum-Liy2wH3s.js} +1 -1
- package/dist/{collection.fn-CR0bD33S.js → collection.fn-CCOWtB-c.js} +2 -2
- package/dist/{currency-DmlguGIM.js → currency-CTLKReFC.js} +1 -1
- package/dist/duplicateCampaign-BcpBfUGL.js +51 -0
- package/dist/{effect-Dx3zfl28.js → effect-CTI1ZH57.js} +1 -1
- package/dist/{email-addresses-De5PGOY4.js → email-addresses-B74e3bnB.js} +2 -2
- package/dist/{feature-flag-CD9V1V0h.js → feature-flag-DVdEaChJ.js} +182 -166
- package/dist/google-BQK68wbe.js +5 -0
- package/dist/{helper-CEiv7SaO.js → helper-as9K-piK.js} +1 -1
- package/dist/{index-CBJy9bxB.js → index-3LjKJhQa.js} +1 -1
- package/dist/{index-BW6eb3n6.js → index-8mBfDn3M.js} +611 -252
- package/dist/{index-D4d3l0gw.js → index-B0h0iYWP.js} +8 -7
- package/dist/{index-BAXKd9Gg.js → index-BEKMTiFb.js} +198 -198
- package/dist/{index-B8yWVB8P.js → index-BW7FoVEA.js} +4 -3
- package/dist/{index-BVdYxi3l.js → index-B_wRpO02.js} +29 -15
- package/dist/{index-B8meeQoD.js → index-Ba719MYq.js} +1 -1
- package/dist/{index-BDPnyro2.js → index-BbVbqe4Y.js} +19 -6
- package/dist/{index-CqOCJTeR.js → index-BhTrG89b.js} +390 -232
- package/dist/index-C-iwb2Ln.js +109 -0
- package/dist/{index-CPODug8b.js → index-C5V6u2Qd.js} +2700 -2613
- package/dist/{index-CWUrODxL.js → index-CHU3UePP.js} +1 -1
- package/dist/{index-IZRfmmde.js → index-CQxkDpX0.js} +683 -581
- package/dist/{index-DT3S00_Y.js → index-CWLOcQ6j.js} +11 -10
- package/dist/index-C_H8jFYf.js +2743 -0
- package/dist/{index-__UT3_Ey.js → index-Ckz6u3ac.js} +2 -2
- package/dist/{index-BYI9ttxy.js → index-Czg-2Ni0.js} +8028 -10767
- package/dist/{index-xct3mnu8.js → index-DKI8401o.js} +7 -7
- package/dist/{index-649OZ_e1.js → index-DcZiikOH.js} +2 -2
- package/dist/{index-BquSqx6K.js → index-QHqcSN2q.js} +4 -4
- package/dist/{index-BR9h5DTI.js → index-TAoQpeLQ.js} +1 -1
- package/dist/index-wsCCqwdr.js +74 -0
- package/dist/{index.esm2017-AVbZ9btd.js → index.esm2017-DL6rTGDW.js} +177 -177
- package/dist/{loading-BvHm1m3K.js → loading-x6IScY4K.js} +1 -1
- package/dist/{lodash-Dvrceo7x.js → lodash-nwnDizYo.js} +1 -1
- package/dist/{member-import-c9avpiSS.js → member-import-C-b01Tyd.js} +6 -5
- package/dist/{membership-D-pZS634.js → membership-DfarOMtO.js} +3 -3
- package/dist/{money-D4skwMkD.js → money-CFn-jR4W.js} +1 -1
- package/dist/{number-DJ6ncfT6.js → number-CSlyDL2x.js} +1 -1
- package/dist/objectid-zcT6ESET.js +145 -0
- package/dist/{onboarding-t7R1d3h-.js → onboarding-DyaFaaF2.js} +25 -25
- package/dist/{onboardingSetup-lTaJc0oT.js → onboardingSetup-DQt91O9f.js} +2 -2
- package/dist/{plugins-DQNOWwRC.js → plugins-DEHr0UOe.js} +3 -3
- package/dist/{MarketingMaterialEdit-x3c_N7Gs.js → remy-icon-BhUGu2NI.js} +2 -1031
- package/dist/{reward-BK150pjm.js → reward-Du_Pv-4p.js} +1 -1
- package/dist/{rule-COcdAnUu.js → rule-DfqmQTVK.js} +572 -492
- package/dist/style.css +1 -1
- package/dist/template-CcbNF4PF.js +188 -0
- package/dist/{timezone-BP6UC4KL.js → timezone-_4tabIaK.js} +1 -1
- package/dist/{transaction.fn-BY0hzon0.js → transaction.fn-C46PHwCV.js} +2 -2
- package/dist/{trigger-DVBjVPbN.js → trigger-Dipr6btC.js} +8 -8
- package/dist/useMarketingMaterialActions-BAw2ZjeF.js +125 -0
- package/dist/{usePagination-QT552XyF.js → usePagination-D6RZ18zS.js} +1 -1
- package/dist/{user-CmAxNc7T.js → user-BCexQj3Q.js} +1 -1
- package/dist/vue-i18n-DXvyTCZf.js +2365 -0
- package/dist/{xlsx-DAczoc8y.js → xlsx-BTxt_Jg6.js} +224 -224
- package/dist/{zod-Aj-GuVQL.js → zod-T4wMYjWT.js} +1 -1
- package/package.json +6 -2
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js +0 -3494
- package/dist/Marketing-BKK45Eve.js +0 -236
- package/dist/ReviewFacebookCallback-DbSCILNN.js +0 -238
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js +0 -1883
- package/dist/Setting-BnFRI0Se.js +0 -2037
- package/dist/Settings-BvT8_tkQ.js +0 -179
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDu1QySl.js +0 -1264
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Dqz6jTlH.js +0 -142
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/objectid-DEMM_jdR.js +0 -145
- package/dist/rule-builder-Deufb6h_.js +0 -102
- package/dist/template-DeebIqJ_.js +0 -236
- package/dist/useMarketingMaterialActions-DpQCQHFI.js +0 -96
- package/dist/vue-i18n-Cze706-f.js +0 -2365
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as n, computed as s, watch as c, openBlock as t, createBlock as a, createCommentVNode as p } from "vue";
|
|
2
|
+
import { useRouter as u } from "vue-router";
|
|
3
|
+
import { _ as f, a as i } from "./MainLayout.vue_vue_type_script_setup_true_lang-COR6YYYI.js";
|
|
4
|
+
import { F as _, u as l } from "./feature-flag-DVdEaChJ.js";
|
|
5
|
+
import { R as d } from "./app-BjdLqYQq.js";
|
|
6
|
+
const w = /* @__PURE__ */ n({
|
|
7
|
+
__name: "WhatsappLayout",
|
|
8
|
+
setup(h) {
|
|
9
|
+
const r = u(), m = l(), e = s(() => m(_.whatsappBot));
|
|
10
|
+
return c(
|
|
11
|
+
e,
|
|
12
|
+
(o) => {
|
|
13
|
+
o === "off" && r.replace({ name: d["$connect-ANALYTIC"] });
|
|
14
|
+
},
|
|
15
|
+
{ immediate: !0 }
|
|
16
|
+
), (o, F) => e.value === "loading" ? (t(), a(f, { key: 0 })) : e.value === "on" ? (t(), a(i, { key: 1 })) : p("", !0);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
w as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { computed as f, toValue as j, ref as m, watch as S, defineComponent as W, mergeModels as O, useModel as $, onBeforeUnmount as z, resolveComponent as N, openBlock as h, createBlock as H, withCtx as T, createElementVNode as t, toDisplayString as n, unref as s, createElementBlock as _, createVNode as L, createTextVNode as V, Fragment as J, renderList as K, createCommentVNode as F } from "vue";
|
|
2
|
+
import { u as U } from "./vue-i18n-DXvyTCZf.js";
|
|
3
|
+
import { b as Q } from "./browser-BSAOEeIM.js";
|
|
4
|
+
import { S as X, a as R } from "./index-DKI8401o.js";
|
|
5
|
+
import { w as Y } from "./index-wsCCqwdr.js";
|
|
6
|
+
function Z(x) {
|
|
7
|
+
const c = x.connectedAt !== null;
|
|
8
|
+
switch (x.status) {
|
|
9
|
+
case "connected":
|
|
10
|
+
return "connected";
|
|
11
|
+
case "disconnected":
|
|
12
|
+
return c ? "disconnected" : void 0;
|
|
13
|
+
case "connecting":
|
|
14
|
+
return c ? "connecting" : void 0;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const D = [
|
|
18
|
+
"bg-fm-color-primary",
|
|
19
|
+
"bg-fm-color-secondary-plum",
|
|
20
|
+
"bg-fm-color-system-success-400"
|
|
21
|
+
];
|
|
22
|
+
function ee(x) {
|
|
23
|
+
const { t: c, locale: b } = U(), e = f(() => j(x)), v = f(
|
|
24
|
+
() => {
|
|
25
|
+
var o, a, r;
|
|
26
|
+
return (r = (a = (o = e.value) == null ? void 0 : o.account) == null ? void 0 : a.profilePicture) == null ? void 0 : r.url;
|
|
27
|
+
}
|
|
28
|
+
), k = m(!1);
|
|
29
|
+
S(v, () => {
|
|
30
|
+
k.value = !1;
|
|
31
|
+
});
|
|
32
|
+
const G = f(
|
|
33
|
+
() => {
|
|
34
|
+
var o, a, r, u, g, y;
|
|
35
|
+
return ((a = (o = e.value) == null ? void 0 : o.account) == null ? void 0 : a.businessName) || ((u = (r = e.value) == null ? void 0 : r.account) == null ? void 0 : u.name) || ((y = (g = e.value) == null ? void 0 : g.account) == null ? void 0 : y.phoneNumber) || c("connect.whatsappBot.unnamedAccount");
|
|
36
|
+
}
|
|
37
|
+
), p = f(
|
|
38
|
+
() => {
|
|
39
|
+
var o, a;
|
|
40
|
+
return ((a = (o = e.value) == null ? void 0 : o.account) == null ? void 0 : a.phoneNumber) || c("connect.whatsappBot.phoneUnavailable");
|
|
41
|
+
}
|
|
42
|
+
), w = f(
|
|
43
|
+
() => G.value.trim().split(/\s+/).slice(0, 2).map((o) => Array.from(o)[0]).join("").toLocaleUpperCase(b.value)
|
|
44
|
+
), B = f(
|
|
45
|
+
() => e.value ? Z(e.value) ?? "disconnected" : "disconnected"
|
|
46
|
+
), d = f(
|
|
47
|
+
() => {
|
|
48
|
+
var o;
|
|
49
|
+
return D[parseInt(((o = e.value) == null ? void 0 : o.clientId.slice(-6)) ?? "0", 16) % D.length];
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
return {
|
|
53
|
+
name: G,
|
|
54
|
+
phoneNumber: p,
|
|
55
|
+
initials: w,
|
|
56
|
+
state: B,
|
|
57
|
+
avatarColor: d,
|
|
58
|
+
profilePictureUrl: v,
|
|
59
|
+
profilePictureFailed: k
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
const te = { class: "min-w-0 flex flex-col" }, oe = { class: "text-[18px] leading-[24px] font-semibold" }, ne = { class: "text-[13px] leading-[18px] text-fm-color-typo-tertiary break-words" }, ae = {
|
|
63
|
+
key: 0,
|
|
64
|
+
role: "status",
|
|
65
|
+
class: "py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
66
|
+
}, se = {
|
|
67
|
+
key: 1,
|
|
68
|
+
class: "py-[40px] flex flex-col items-center text-center gap-[16px]"
|
|
69
|
+
}, ie = {
|
|
70
|
+
role: "alert",
|
|
71
|
+
class: "text-[14px] text-fm-color-typo-error"
|
|
72
|
+
}, le = {
|
|
73
|
+
key: 2,
|
|
74
|
+
class: "grid grid-cols-[minmax(0,1fr)_226px] xs:grid-cols-1 gap-[32px] p-[8px] xs:p-[0px]"
|
|
75
|
+
}, re = { class: "min-w-0 flex flex-col gap-[20px] text-[14px] leading-[20px]" }, ce = { class: "text-fm-color-typo-secondary [text-wrap:pretty]" }, pe = { class: "flex flex-col gap-[10px]" }, ue = { class: "text-[12px] leading-[16px] font-semibold uppercase tracking-[0.06em] text-fm-color-typo-tertiary" }, de = { class: "flex flex-col gap-[10px]" }, fe = { class: "flex flex-col gap-[6px]" }, me = {
|
|
76
|
+
id: "whatsapp-group-invite-link-label",
|
|
77
|
+
class: "font-medium text-fm-color-typo-tertiary"
|
|
78
|
+
}, xe = { class: "flex items-center gap-[8px] border border-fm-color-neutral-gray-200 rounded-[8px] pl-[12px] pr-[4px] py-[4px]" }, ve = {
|
|
79
|
+
id: "whatsapp-group-invite-link",
|
|
80
|
+
role: "textbox",
|
|
81
|
+
"aria-readonly": "true",
|
|
82
|
+
"aria-labelledby": "whatsapp-group-invite-link-label",
|
|
83
|
+
tabindex: "0",
|
|
84
|
+
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"
|
|
85
|
+
}, he = ["disabled"], ge = {
|
|
86
|
+
key: 0,
|
|
87
|
+
role: "status",
|
|
88
|
+
class: "sr-only"
|
|
89
|
+
}, ye = {
|
|
90
|
+
key: 1,
|
|
91
|
+
role: "alert",
|
|
92
|
+
class: "text-[12px] leading-[16px] text-fm-color-typo-error"
|
|
93
|
+
}, _e = { class: "text-[12px] leading-[16px] text-fm-color-typo-tertiary" }, be = { class: "flex flex-col items-center gap-[12px] w-[226px] xs:justify-self-center" }, we = { class: "border border-fm-color-neutral-gray-100 rounded-[12px] overflow-hidden" }, Be = ["src", "alt"], ke = ["href"], Ve = /* @__PURE__ */ W({
|
|
94
|
+
__name: "WhatsappNotificationGroupDialog",
|
|
95
|
+
props: /* @__PURE__ */ O({
|
|
96
|
+
account: {}
|
|
97
|
+
}, {
|
|
98
|
+
modelValue: { type: Boolean, required: !0 },
|
|
99
|
+
modelModifiers: {}
|
|
100
|
+
}),
|
|
101
|
+
emits: ["update:modelValue"],
|
|
102
|
+
setup(x) {
|
|
103
|
+
const c = x, b = $(x, "modelValue"), { t: e } = U(), v = f(() => X.getBusinessId() ?? ""), { name: k, phoneNumber: G } = ee(() => c.account), p = m(), w = m(""), B = m(!1), d = m(""), o = m(!1), a = m(!1), r = m("");
|
|
104
|
+
let u, g;
|
|
105
|
+
function y() {
|
|
106
|
+
u == null || u.abort(), clearTimeout(g), o.value = !1, a.value = !1;
|
|
107
|
+
}
|
|
108
|
+
async function I() {
|
|
109
|
+
y();
|
|
110
|
+
const i = new AbortController();
|
|
111
|
+
u = i, B.value = !0, d.value = "", r.value = "", p.value = void 0, w.value = "";
|
|
112
|
+
try {
|
|
113
|
+
if (!v.value)
|
|
114
|
+
throw new Error(e("connect.whatsappBot.errors.selectBusiness"));
|
|
115
|
+
const l = await Y.getNotificationGroup(
|
|
116
|
+
v.value,
|
|
117
|
+
c.account.clientId,
|
|
118
|
+
i.signal
|
|
119
|
+
);
|
|
120
|
+
if (i.signal.aborted) return;
|
|
121
|
+
const A = await Q.toDataURL(l.inviteLink, {
|
|
122
|
+
width: 224,
|
|
123
|
+
margin: 2,
|
|
124
|
+
errorCorrectionLevel: "M"
|
|
125
|
+
});
|
|
126
|
+
if (i.signal.aborted) return;
|
|
127
|
+
p.value = l, w.value = A;
|
|
128
|
+
} catch (l) {
|
|
129
|
+
if (i.signal.aborted) return;
|
|
130
|
+
l instanceof R && l.status === 409 ? d.value = e("connect.whatsappBot.notificationGroup.notReady") : l instanceof R && l.status === 404 ? d.value = e("connect.whatsappBot.errors.accountNotFound") : d.value = v.value ? e("connect.whatsappBot.errors.loadGroup") : e("connect.whatsappBot.errors.selectBusiness");
|
|
131
|
+
} finally {
|
|
132
|
+
i.signal.aborted || (B.value = !1);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
async function q() {
|
|
136
|
+
if (!p.value || !u || a.value) return;
|
|
137
|
+
const i = u;
|
|
138
|
+
a.value = !0, o.value = !1, r.value = "", clearTimeout(g);
|
|
139
|
+
try {
|
|
140
|
+
if (await navigator.clipboard.writeText(p.value.inviteLink), i.signal.aborted) return;
|
|
141
|
+
o.value = !0, g = setTimeout(() => {
|
|
142
|
+
o.value = !1;
|
|
143
|
+
}, 2e3);
|
|
144
|
+
} catch {
|
|
145
|
+
i.signal.aborted || (r.value = e("connect.whatsappBot.errors.copyGroupLink"));
|
|
146
|
+
} finally {
|
|
147
|
+
i.signal.aborted || (a.value = !1);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return S(
|
|
151
|
+
[b, v, () => c.account.clientId],
|
|
152
|
+
([i]) => {
|
|
153
|
+
i ? I() : y();
|
|
154
|
+
},
|
|
155
|
+
{ immediate: !0 }
|
|
156
|
+
), z(y), (i, l) => {
|
|
157
|
+
const A = N("FmCircularProgress"), E = N("FmButton"), P = N("FmIcon"), M = N("FmDialog");
|
|
158
|
+
return h(), H(M, {
|
|
159
|
+
modelValue: b.value,
|
|
160
|
+
"onUpdate:modelValue": l[0] || (l[0] = (C) => b.value = C),
|
|
161
|
+
"min-width": "min(640px, calc(100% - 32px))",
|
|
162
|
+
"max-width": "640px",
|
|
163
|
+
"max-height": "90vh",
|
|
164
|
+
"dismiss-away": ""
|
|
165
|
+
}, {
|
|
166
|
+
"dialog-header": T(() => [
|
|
167
|
+
t("div", te, [
|
|
168
|
+
t("h2", oe, n(s(e)("connect.whatsappBot.notificationGroup.dialogTitle")), 1),
|
|
169
|
+
t("p", ne, n(s(k)) + " · " + n(s(G)), 1)
|
|
170
|
+
])
|
|
171
|
+
]),
|
|
172
|
+
default: T(() => [
|
|
173
|
+
B.value ? (h(), _("div", ae, [
|
|
174
|
+
L(A),
|
|
175
|
+
V(" " + n(s(e)("connect.whatsappBot.notificationGroup.loading")), 1)
|
|
176
|
+
])) : d.value ? (h(), _("div", se, [
|
|
177
|
+
t("p", ie, n(d.value), 1),
|
|
178
|
+
L(E, {
|
|
179
|
+
label: s(e)("connect.whatsappBot.tryAgain"),
|
|
180
|
+
"prepend-icon": "refresh",
|
|
181
|
+
class: "!rounded-full [&_.label]:text-[14px]",
|
|
182
|
+
onClick: I
|
|
183
|
+
}, null, 8, ["label"])
|
|
184
|
+
])) : p.value ? (h(), _("div", le, [
|
|
185
|
+
t("div", re, [
|
|
186
|
+
t("p", ce, n(s(e)("connect.whatsappBot.notificationGroup.scanDescription")), 1),
|
|
187
|
+
t("div", pe, [
|
|
188
|
+
t("h3", ue, n(s(e)("connect.whatsappBot.notificationGroup.postsTitle")), 1),
|
|
189
|
+
t("ul", de, [
|
|
190
|
+
(h(), _(J, null, K(["unanswered", "staffRequests", "humanRequests"], (C) => t("li", {
|
|
191
|
+
key: C,
|
|
192
|
+
class: "flex gap-[10px]"
|
|
193
|
+
}, [
|
|
194
|
+
l[1] || (l[1] = t("span", {
|
|
195
|
+
"aria-hidden": "true",
|
|
196
|
+
class: "w-[6px] h-[6px] rounded-full bg-fm-color-primary shrink-0 mt-[7px]"
|
|
197
|
+
}, null, -1)),
|
|
198
|
+
V(" " + n(s(e)(`connect.whatsappBot.notificationGroup.posts.${C}`)), 1)
|
|
199
|
+
])), 64))
|
|
200
|
+
])
|
|
201
|
+
]),
|
|
202
|
+
t("div", fe, [
|
|
203
|
+
t("span", me, n(s(e)("connect.whatsappBot.notificationGroup.inviteLink")), 1),
|
|
204
|
+
t("div", xe, [
|
|
205
|
+
t("div", ve, n(p.value.inviteLink), 1),
|
|
206
|
+
t("button", {
|
|
207
|
+
type: "button",
|
|
208
|
+
disabled: a.value,
|
|
209
|
+
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",
|
|
210
|
+
onClick: q
|
|
211
|
+
}, n(s(e)(
|
|
212
|
+
`connect.whatsappBot.notificationGroup.${o.value ? "copied" : "copy"}`
|
|
213
|
+
)), 9, he)
|
|
214
|
+
]),
|
|
215
|
+
o.value ? (h(), _("span", ge, n(s(e)("connect.whatsappBot.notificationGroup.copied")), 1)) : F("", !0),
|
|
216
|
+
r.value ? (h(), _("p", ye, n(r.value), 1)) : F("", !0),
|
|
217
|
+
t("p", _e, n(s(e)("connect.whatsappBot.notificationGroup.shareNote")), 1)
|
|
218
|
+
])
|
|
219
|
+
]),
|
|
220
|
+
t("div", be, [
|
|
221
|
+
t("div", we, [
|
|
222
|
+
t("img", {
|
|
223
|
+
src: w.value,
|
|
224
|
+
alt: s(e)("connect.whatsappBot.notificationGroup.qrAlt"),
|
|
225
|
+
width: "224",
|
|
226
|
+
height: "224"
|
|
227
|
+
}, null, 8, Be)
|
|
228
|
+
]),
|
|
229
|
+
t("a", {
|
|
230
|
+
href: p.value.inviteLink,
|
|
231
|
+
target: "_blank",
|
|
232
|
+
rel: "noopener noreferrer",
|
|
233
|
+
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]"
|
|
234
|
+
}, [
|
|
235
|
+
V(n(s(e)("connect.whatsappBot.notificationGroup.openWhatsapp")) + " ", 1),
|
|
236
|
+
L(P, {
|
|
237
|
+
name: "open_in_new",
|
|
238
|
+
size: "sm"
|
|
239
|
+
})
|
|
240
|
+
], 8, ke)
|
|
241
|
+
])
|
|
242
|
+
])) : F("", !0)
|
|
243
|
+
]),
|
|
244
|
+
_: 1
|
|
245
|
+
}, 8, ["modelValue"]);
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
export {
|
|
250
|
+
Ve as _,
|
|
251
|
+
ee as u,
|
|
252
|
+
Z as w
|
|
253
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as f, useAttrs as y, resolveComponent as b, openBlock as l, createBlock as v, mergeProps as x, unref as t, createSlots as g, withCtx as h, createElementVNode as a, toDisplayString as n, renderSlot as k, createElementBlock as F, createCommentVNode as S } from "vue";
|
|
2
|
-
import { Z as d } from "./zod-
|
|
3
|
-
import { u as V } from "./vue-i18n-
|
|
2
|
+
import { Z as d } from "./zod-T4wMYjWT.js";
|
|
3
|
+
import { u as V } from "./vue-i18n-DXvyTCZf.js";
|
|
4
4
|
const B = { class: "fm-typo-en-body-lg-400 flex gap-4 text-fm-color-typo-primary items-center" }, C = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "text-fm-color-typo-tertiary"
|