@feedmepos/mf-connect 0.1.98-beta.84 → 0.1.98-beta.86

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.
Files changed (136) hide show
  1. package/README.md +9 -1
  2. package/dist/{App-2gK-7sDH.js → App-C3brXgJH.js} +409 -403
  3. package/dist/{AuditLogs-DsvvAt8f.js → AuditLogs-CknggPMD.js} +13 -13
  4. package/dist/{Bin-f4C6ymIq.js → Bin-BOE-Liwr.js} +8 -8
  5. package/dist/{Broadcast-tdqUBB_9.js → Broadcast-BStqQOUT.js} +12 -12
  6. package/dist/{CampaignAnalytic-BI7qfGV2.js → CampaignAnalytic-Dga32CpH.js} +7 -7
  7. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CGAIYHt6.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CldyOaCt.js} +8 -8
  8. package/dist/{Card-CBU8ZOFT.js → Card-CQxp73o4.js} +23 -23
  9. package/dist/{Collections-DWPcYM4M.js → Collections-BRms0YoR.js} +8 -8
  10. package/dist/{Credit-Cq12WUk_.js → Credit-DW7Vq-01.js} +12 -12
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BwpYtfRw.js → DateRangeChip.vue_vue_type_script_setup_true_lang-BXK40fTr.js} +1 -1
  12. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C7b6aFq3.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bv2r2gFI.js} +36 -35
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-KkAGKKsV.js → EffectSheet.vue_vue_type_style_index_0_lang-TBjXJglM.js} +6 -6
  14. package/dist/{Experience-BuIgMiB3.js → Experience-C_H8mmJJ.js} +13 -13
  15. package/dist/{FileSaver.min-DS15uUce.js → FileSaver.min-C5N6-O4l.js} +1 -1
  16. package/dist/{Game-_NIMd0cY.js → Game-LgNoMtbs.js} +13 -13
  17. package/dist/{GiftCardSetup-Bw_8x29B.js → GiftCardSetup-DmL416w3.js} +73 -61
  18. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-B1sHLgFd.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-DqDerUNT.js} +7 -7
  19. package/dist/{Goals-BE_FaHh-.js → Goals-D-maM_jj.js} +4 -4
  20. package/dist/{Grab-CIIr5EZR.js → Grab-DKbgjw7e.js} +9 -9
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-fg6xOcnj.js → ImageInput.vue_vue_type_script_setup_true_lang-BZ3UDnkx.js} +1 -1
  22. package/dist/{Index-BiShzj-5.js → Index-_cZDq1HS.js} +10 -10
  23. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DQXs_qw9.js → LocationPicker.vue_vue_type_script_setup_true_lang-Chm-x4fo.js} +1 -1
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-B6NRhdWR.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Ez1QV7ON.js} +1 -1
  25. package/dist/{LoyaltyDashboard-B5AG4nLL.js → LoyaltyDashboard-D1B3MjhC.js} +24 -23
  26. package/dist/MainLayout-C115sjz6.js +4 -0
  27. package/dist/{MainLayout-DxqoiKXJ.js → MainLayout.vue_vue_type_script_setup_true_lang-Bf-Kvl5W.js} +4 -4
  28. package/dist/{Marketing-rtJPqmHZ.js → Marketing-C4apg5nO.js} +4 -4
  29. package/dist/{MarketingMaterialEdit-DZbsKiMW.js → MarketingMaterialEdit-Dcjzvwfv.js} +6 -6
  30. package/dist/{Member-B_4IU8GD.js → Member-B2W3wm1r.js} +7 -7
  31. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-CtQiWe15.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-l3edYke6.js} +24 -24
  32. package/dist/{MemberImportHistory-DepqkpDF.js → MemberImportHistory-C3i6ekKS.js} +7 -7
  33. package/dist/{MemberList-RbR2vpfv.js → MemberList-CsIsMafE.js} +14 -14
  34. package/dist/{MemberTransactions-BXJy6Ism.js → MemberTransactions-Cdndq5ic.js} +1 -1
  35. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-0OCCIP0v.js → MessageInput.vue_vue_type_script_setup_true_lang-BtVvv1xd.js} +10 -10
  36. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DnECpLmj.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DwXsAI7F.js} +1 -1
  37. package/dist/{Mission-CMNVAn_S.js → Mission-Fa1VYYZa.js} +14 -14
  38. package/dist/{Overview-C-QEY2MS.js → Overview-DSmO8LtX.js} +4 -4
  39. package/dist/{Overview-C05OOSXQ.js → Overview-oxeTbsQ8.js} +21 -21
  40. package/dist/{Point-XEJSumy7.js → Point-CWpQn9W_.js} +14 -14
  41. package/dist/{Promotion-DfzE_BnO.js → Promotion-CoYdDRod.js} +14 -14
  42. package/dist/{Queue-D4Td8Bgv.js → Queue-Bij3hgY2.js} +13 -13
  43. package/dist/{Record-DgkTuKc4.js → Record-Be2TI_X_.js} +9 -9
  44. package/dist/{Review-8ZMji0fb.js → Review-C-QnIayC.js} +2 -2
  45. package/dist/{ReviewFacebookCallback-Ve87-GyX.js → ReviewFacebookCallback-CPyXfHvB.js} +5 -5
  46. package/dist/{ReviewGoogleCallback-DRpVe1uq.js → ReviewGoogleCallback-BPNB0btT.js} +5 -5
  47. package/dist/{Reward-CEhr7Ns0.js → Reward-RyaVdYyZ.js} +16 -16
  48. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-w3QixigS.js → RewardGroup.vue_vue_type_script_setup_true_lang-C2ebKu-S.js} +14 -14
  49. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CnTY1iff.js → RuleGroup.vue_vue_type_script_setup_true_lang-BZ_wN3Gj.js} +15 -15
  50. package/dist/{Segment-CeMerVn4.js → Segment-CE7Ca2Zo.js} +26 -26
  51. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CQ038K1l.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-vODQiSna.js} +15 -15
  52. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cq5ywNFY.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CgI_qWVw.js} +4 -4
  53. package/dist/{Setting-Rge2DsP0.js → Setting-BC6ir0DR.js} +14 -14
  54. package/dist/{SettingAdvertisements-YXLfS10e.js → SettingAdvertisements-DLmxEwdG.js} +12 -12
  55. package/dist/{Settings-Cnp1yLCt.js → Settings-CF78Ug2K.js} +5 -5
  56. package/dist/{Store-BqNd-YZA.js → Store-CZTZTO1x.js} +780 -771
  57. package/dist/{StoreRewards-CtFg932k.js → StoreRewards-BdtlvNcm.js} +15 -15
  58. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DSLRZ4_T.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DSKYWLE_.js} +25 -25
  59. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-ViE-riFl.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DsQiBOV4.js} +2 -2
  60. package/dist/{Tier-77bfKMw8.js → Tier-5eUYHhoX.js} +27 -27
  61. package/dist/{Title-ExsDsweT.js → Title-ibn2JnRB.js} +23 -23
  62. package/dist/{Transaction-rtSeIIw0.js → Transaction-BZzL13MU.js} +2 -2
  63. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CRBQ9Fda.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DUv9nFqV.js} +6 -6
  64. package/dist/{Voucher-BkZtSGlP.js → Voucher-B6qYDcnp.js} +18 -18
  65. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-4PYSnlPB.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CI7NwvnH.js} +12 -12
  66. package/dist/WhatsappAccount-CodbP5kY.js +342 -0
  67. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BAgSc0i4.js +97 -0
  68. package/dist/WhatsappBot-BhrP6JnO.js +581 -0
  69. package/dist/{WhatsappBotSettings-BuKmIjV8.js → WhatsappBotSettings-CjDKw25J.js} +4 -4
  70. package/dist/WhatsappBotTickets-DJnC4c2j.js +162 -0
  71. package/dist/WhatsappLayout-BgW1ASQE.js +21 -0
  72. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CZfhn5Jq.js → ZodTextField.vue_vue_type_script_setup_true_lang-C2nesHNf.js} +2 -2
  73. package/dist/{app-Bc6LqwtE.js → app-C5bfcrJd.js} +396 -396
  74. package/dist/app.js +1 -1
  75. package/dist/{base.export-Btj8Rg8X.js → base.export-0man_ZSH.js} +2 -2
  76. package/dist/{business-D764zw_0.js → business-BW09R8w1.js} +5 -5
  77. package/dist/{campaign-BQup_7UA.js → campaign-Dxbvq3Zl.js} +8 -8
  78. package/dist/{campaign-z0b9Kjkw.js → campaign-gSM8Uzyl.js} +2 -2
  79. package/dist/{campaign.fn-CFw7_K_I.js → campaign.fn-CzNJtky2.js} +116 -116
  80. package/dist/{collection.fn-C4U4ilHh.js → collection.fn-BVUdafur.js} +2 -2
  81. package/dist/{currency-ByFTp6eT.js → currency-CcWkcszY.js} +1 -1
  82. package/dist/{duplicateCampaign-CbmUt1Lo.js → duplicateCampaign-DDfAc-AY.js} +2 -2
  83. package/dist/{effect-DsO-mw9A.js → effect-Dn7anzDq.js} +1 -1
  84. package/dist/{email-addresses-CL-EMr73.js → email-addresses-BRRFCqW3.js} +2 -2
  85. package/dist/feature-flag-D2MJ8eLY.js +18 -0
  86. package/dist/{helper-Avy2CxJa.js → helper-DPI5b1e1.js} +1 -1
  87. package/dist/{index-BwbjP4YO.js → index-BBLmqV8g.js} +4 -3
  88. package/dist/{index-BGYPv4nh.js → index-BLQbc3Rv.js} +1 -1
  89. package/dist/{index-DIEsCZpR.js → index-BQ-9m3Ro.js} +2 -2
  90. package/dist/index-BVdImOs0.js +1775 -0
  91. package/dist/{index-CqHP5Wpq.js → index-Bi4203Wb.js} +1 -1
  92. package/dist/{index-BtlTdbMh.js → index-BsSqDkI8.js} +2 -2
  93. package/dist/{index-DLWc6jN6.js → index-ButxHAMi.js} +7 -7
  94. package/dist/{index-DJBDlwI0.js → index-CeDuysyp.js} +2 -2
  95. package/dist/{index-Dw1JLMxf.js → index-CoFJoIox.js} +4 -4
  96. package/dist/{index-0iobnNos.js → index-D8rPhlZa.js} +1 -1
  97. package/dist/{index-C_ZRQxuy.js → index-D9SBKZvv.js} +9 -9
  98. package/dist/{index-DV97WJgE.js → index-DPS6iW7Q.js} +1 -1
  99. package/dist/{index-DopAV1p0.js → index-DgkRREfK.js} +18 -14
  100. package/dist/{index-4Gb9FUwx.js → index-DtZ450Y-.js} +3 -3
  101. package/dist/{index-6kHtFMu_.js → index-Dv9W26wg.js} +1 -1
  102. package/dist/{index-BYJfzCGF.js → index-KNE2wEbP.js} +2 -2
  103. package/dist/{index-DKVgQIxK.js → index-LSYjttVr.js} +2 -2
  104. package/dist/{index-BOX-kv2H.js → index-U6kp2_A3.js} +1 -1
  105. package/dist/{index-QesgyoGt.js → index-ZLyACIvN.js} +2 -2
  106. package/dist/{index-BqBHO03o.js → index-_EvVNmhF.js} +5975 -7746
  107. package/dist/{index-DUiP6eMM.js → index-sVyIf_p-.js} +583 -576
  108. package/dist/{index-BaRq5efe.js → index-xLDLoo67.js} +2 -2
  109. package/dist/{index.esm2017-6fTAB2zC.js → index.esm2017-DQJ6E2gu.js} +1 -1
  110. package/dist/{loading-Ctv0pifD.js → loading-DOyd2D4O.js} +1 -1
  111. package/dist/{lodash-voP8B3y-.js → lodash-BLqC3Cwx.js} +1 -1
  112. package/dist/{member-import-Cnclh9kc.js → member-import-x7Vw0b3w.js} +1 -1
  113. package/dist/{membership-BFw22ljB.js → membership-CE9vEP2d.js} +2 -2
  114. package/dist/{money-UKkYKlYB.js → money-CX-ZAEDu.js} +1 -1
  115. package/dist/{number-C3ZVrlnG.js → number-CSungdQc.js} +1 -1
  116. package/dist/{objectid-cm0MpmhJ.js → objectid-DwEAf7Cc.js} +9 -9
  117. package/dist/{onboarding-DPlyVNxC.js → onboarding-BAJgDH9y.js} +3 -3
  118. package/dist/{onboardingSetup-DNxWR49X.js → onboardingSetup-GvIYNiAE.js} +2 -2
  119. package/dist/{plugins-CmODURCb.js → plugins-B1AphVoU.js} +3 -3
  120. package/dist/{reward-PFP-zWBV.js → reward-D2zC58M2.js} +1 -1
  121. package/dist/{rule-O6gC43w9.js → rule-CxoPKAlI.js} +10 -10
  122. package/dist/{template-C3wE6QI8.js → template-KRS1NbWX.js} +6 -6
  123. package/dist/{timezone-h8QjEIVE.js → timezone-CW8sKc69.js} +1 -1
  124. package/dist/{transaction.fn-CMLlNsBi.js → transaction.fn-Djbx8lHM.js} +2 -2
  125. package/dist/{trigger-rwKj95on.js → trigger-RkjkEHrL.js} +5 -5
  126. package/dist/{useMarketingMaterialActions-DFhA_QMl.js → useMarketingMaterialActions-BUnl-bFY.js} +3 -3
  127. package/dist/{usePagination-DG6Ztr9a.js → usePagination-vdRzCfJw.js} +1 -1
  128. package/dist/{user-B8GnAjaS.js → user-CamDVkKA.js} +1 -1
  129. package/dist/{vue-i18n-Bc5Ls0lk.js → vue-i18n-DwgfDwGn.js} +2 -2
  130. package/dist/{xlsx-CKvgpuVs.js → xlsx-DkuYe2Jz.js} +440 -440
  131. package/dist/{zod-Bt021IY2.js → zod-BDeUQtCa.js} +1 -1
  132. package/package.json +1 -1
  133. package/dist/WhatsappAccount-BHhjnuXB.js +0 -325
  134. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DKFevg6y.js +0 -80
  135. package/dist/WhatsappBot-DDDfDb-u.js +0 -566
  136. package/dist/WhatsappBotTickets-D1fGYaRQ.js +0 -153
@@ -1,4 +1,4 @@
1
- import { i as Z } from "./plugins-CmODURCb.js";
1
+ import { i as Z } from "./plugins-B1AphVoU.js";
2
2
  import { h as f } from "vue";
3
3
  function u(e, o) {
4
4
  return e.path.join(".") === o;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-connect",
3
- "version": "0.1.98-beta.84",
3
+ "version": "0.1.98-beta.86",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,325 +0,0 @@
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-Bc5Ls0lk.js";
3
- import { useRoute as Y } from "vue-router";
4
- import { S as z, a as P } from "./index-BqBHO03o.js";
5
- import { w as O } from "./index-BaRq5efe.js";
6
- import { u as q, _ as Z } from "./WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DKFevg6y.js";
7
- import { b as ee } from "./browser-BSAOEeIM.js";
8
- import { R as te } from "./app-Bc6LqwtE.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
- };
@@ -1,80 +0,0 @@
1
- import { computed as o, toValue as v, defineComponent as x, openBlock as w, createElementBlock as A, normalizeClass as f, createElementVNode as _, createTextVNode as B, toDisplayString as C, unref as N } from "vue";
2
- import { u as g } from "./vue-i18n-Bc5Ls0lk.js";
3
- function S(c) {
4
- const n = c.connectedAt !== null;
5
- switch (c.status) {
6
- case "connected":
7
- return "connected";
8
- case "disconnected":
9
- return n ? "disconnected" : void 0;
10
- case "connecting":
11
- return n ? "connecting" : void 0;
12
- }
13
- }
14
- const b = [
15
- "bg-fm-color-primary",
16
- "bg-fm-color-secondary-plum",
17
- "bg-fm-color-system-success-400"
18
- ];
19
- function L(c) {
20
- const { t: n, locale: l } = g(), t = o(() => v(c)), s = o(
21
- () => {
22
- var e, a, u, i, m, d;
23
- return ((a = (e = t.value) == null ? void 0 : e.account) == null ? void 0 : a.businessName) || ((i = (u = t.value) == null ? void 0 : u.account) == null ? void 0 : i.name) || ((d = (m = t.value) == null ? void 0 : m.account) == null ? void 0 : d.phoneNumber) || n("connect.whatsappBot.unnamedAccount");
24
- }
25
- ), r = o(
26
- () => {
27
- var e, a;
28
- return ((a = (e = t.value) == null ? void 0 : e.account) == null ? void 0 : a.phoneNumber) || n("connect.whatsappBot.phoneUnavailable");
29
- }
30
- ), p = o(
31
- () => s.value.trim().split(/\s+/).slice(0, 2).map((e) => Array.from(e)[0]).join("").toLocaleUpperCase(l.value)
32
- ), h = o(
33
- () => t.value ? S(t.value) ?? "disconnected" : "disconnected"
34
- ), y = o(
35
- () => {
36
- var e;
37
- return b[parseInt(((e = t.value) == null ? void 0 : e.clientId.slice(-6)) ?? "0", 16) % b.length];
38
- }
39
- );
40
- return { name: s, phoneNumber: r, initials: p, state: h, avatarColor: y };
41
- }
42
- const k = /* @__PURE__ */ x({
43
- __name: "WhatsappAccountStatusLabel",
44
- props: {
45
- state: {}
46
- },
47
- setup(c) {
48
- const n = c, { t: l } = g(), t = {
49
- connected: {
50
- label: "connect.whatsappBot.connected",
51
- pill: "text-fm-color-typo-success bg-fm-color-system-success-100",
52
- dot: "bg-fm-color-system-success-400"
53
- },
54
- disconnected: {
55
- label: "connect.whatsappBot.disconnected",
56
- pill: "text-fm-color-typo-error bg-fm-color-system-error-100",
57
- dot: "bg-fm-color-system-error-400"
58
- },
59
- connecting: {
60
- label: "connect.whatsappBot.statusConnecting",
61
- pill: "text-fm-color-typo-warning bg-fm-color-system-warning-100",
62
- dot: "bg-fm-color-system-warning-400"
63
- }
64
- }, s = o(() => t[n.state]);
65
- return (r, p) => (w(), A("span", {
66
- class: f(["flex items-center gap-[6px] text-[12px] font-semibold px-[8px] py-[3px] rounded-[6px]", s.value.pill])
67
- }, [
68
- _("span", {
69
- "aria-hidden": "true",
70
- class: f(["w-[6px] h-[6px] rounded-full", s.value.dot])
71
- }, null, 2),
72
- B(" " + C(N(l)(s.value.label)), 1)
73
- ], 2));
74
- }
75
- });
76
- export {
77
- k as _,
78
- L as u,
79
- S as w
80
- };