@feedmepos/mf-connect 0.1.98-beta.87 → 0.1.98-beta.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/dist/{App-DZzCW6yw.js → App-D4hRwK-o.js} +10 -10
  2. package/dist/{AuditLogs-C5s1oYtj.js → AuditLogs-D_PrLKVP.js} +13 -13
  3. package/dist/{Bin-B1e-qVtO.js → Bin-DF_1hlo5.js} +8 -8
  4. package/dist/{Broadcast-CwO5ut-E.js → Broadcast-D81xkQ0B.js} +12 -12
  5. package/dist/{CampaignAnalytic-B1KXy3dl.js → CampaignAnalytic-960oR5Nw.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DS8RAeUt.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-WOfSfATi.js} +8 -8
  7. package/dist/{Card-BK-p9FW9.js → Card-nF9lexRS.js} +23 -23
  8. package/dist/{Collections-CTF-r_mV.js → Collections-CJbGLkwm.js} +8 -8
  9. package/dist/{Credit-DR2AvPrI.js → Credit-tfInnpDW.js} +12 -12
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CixW7_65.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CAPxB3r7.js} +1 -1
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-D53ghi_e.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BM2UlBtj.js} +35 -35
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BNCvFw9v.js → EffectSheet.vue_vue_type_style_index_0_lang-BfrzJxWQ.js} +6 -6
  13. package/dist/{Experience-BzPvYJ0N.js → Experience-2uX3ESg5.js} +13 -13
  14. package/dist/{FileSaver.min-BBi03O9S.js → FileSaver.min-DqWpgesn.js} +1 -1
  15. package/dist/{Game-DNdM6BpR.js → Game-BQtHns1v.js} +13 -13
  16. package/dist/{GiftCardSetup-yVVt1hCK.js → GiftCardSetup-B4I83SkJ.js} +10 -10
  17. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-C_REykTp.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-DujMhaOh.js} +7 -7
  18. package/dist/{Goals-RyNCRCoT.js → Goals-DSkXACjH.js} +4 -4
  19. package/dist/{Grab-COgtKEHg.js → Grab-ArpQ-7LU.js} +9 -9
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DueG1yQj.js → ImageInput.vue_vue_type_script_setup_true_lang-GdfKNEdQ.js} +1 -1
  21. package/dist/{Index-CW5ib46F.js → Index-Bb8k7ofl.js} +10 -10
  22. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Dbk0uqyl.js → LocationPicker.vue_vue_type_script_setup_true_lang-tHLWrX4C.js} +1 -1
  23. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-s19mfQze.js → LottieAnimation.vue_vue_type_script_setup_true_lang-C5E_mvcD.js} +1 -1
  24. package/dist/{LoyaltyDashboard-CJW9sSpM.js → LoyaltyDashboard-C-U8HulY.js} +15 -15
  25. package/dist/{MainLayout-DJrtcFYj.js → MainLayout-TV3HyBYh.js} +1 -1
  26. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-fXA-ixLQ.js → MainLayout.vue_vue_type_script_setup_true_lang-lO1k_OLo.js} +3 -3
  27. package/dist/{Marketing-DJD3MCP0.js → Marketing-CWe_R_3E.js} +4 -4
  28. package/dist/MarketingMaterialEdit-TGP6o6Vv.js +1037 -0
  29. package/dist/{Member-B9_6dgmX.js → Member-DDZ8TLLZ.js} +7 -7
  30. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-B6PrfIdK.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CweUf6Iv.js} +24 -24
  31. package/dist/{MemberImportHistory-daeSSL3G.js → MemberImportHistory-Til1afm1.js} +7 -7
  32. package/dist/{MemberList-DpMvv6MH.js → MemberList-uoSeAZlO.js} +14 -14
  33. package/dist/{MemberTransactions-CekjmOnU.js → MemberTransactions-MxJWI1es.js} +1 -1
  34. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Cgb0WN3L.js → MessageInput.vue_vue_type_script_setup_true_lang-B4H67Tvb.js} +10 -10
  35. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DKJH_z31.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DhHMIgza.js} +1 -1
  36. package/dist/{Mission-B3YYFaqK.js → Mission-C_hcFlzC.js} +14 -14
  37. package/dist/{Overview-B3VtDXAN.js → Overview-B3ugdY_2.js} +4 -4
  38. package/dist/{Overview-DcLRK3qr.js → Overview-Bxe-Kfci.js} +21 -21
  39. package/dist/{Point-rE75hllY.js → Point-BBVTyXIL.js} +14 -14
  40. package/dist/{Promotion-CldXbf59.js → Promotion-D-44JTkv.js} +14 -14
  41. package/dist/{Queue-Im8WyRKY.js → Queue-BNjlzhJ_.js} +13 -13
  42. package/dist/{Record-DmP7Q885.js → Record-C34UZ1q6.js} +9 -9
  43. package/dist/{Review-DDaoANvS.js → Review-C4iuNBR7.js} +2 -2
  44. package/dist/{ReviewFacebookCallback-6fQq9t2y.js → ReviewFacebookCallback-Bsp6WSaQ.js} +5 -5
  45. package/dist/{ReviewGoogleCallback-DDmUWLd9.js → ReviewGoogleCallback-Ddqe1tZZ.js} +5 -5
  46. package/dist/{Reward-BzL-toJQ.js → Reward-CjybtjcT.js} +16 -16
  47. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CrQvlB_E.js → RewardGroup.vue_vue_type_script_setup_true_lang-Do_obBgC.js} +14 -14
  48. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Dk8kqDSk.js → RuleGroup.vue_vue_type_script_setup_true_lang-BiGexpsh.js} +15 -15
  49. package/dist/{Segment-BweG5YWo.js → Segment-BU5W9wBQ.js} +26 -26
  50. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BfFtD5TS.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Buih6X5R.js} +15 -15
  51. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BsgQ1kqK.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DN-VwmTf.js} +4 -4
  52. package/dist/{Setting-MW6B10tv.js → Setting-BsCkMHQZ.js} +14 -14
  53. package/dist/{SettingAdvertisements-DP-Wm3vC.js → SettingAdvertisements-CTTFCozw.js} +12 -12
  54. package/dist/{Settings-CczrlaKr.js → Settings-D3_nrJff.js} +5 -5
  55. package/dist/{Store-C9pYfjIe.js → Store-DRWKc7Q7.js} +27 -27
  56. package/dist/{StoreRewards-DecpygTj.js → StoreRewards-_4iqQsak.js} +15 -15
  57. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Cw63xJWj.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Db4fakO6.js} +25 -25
  58. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B_t4xibZ.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CAO3Ycxn.js} +2 -2
  59. package/dist/{Tier-D7dHj_zA.js → Tier-Cj_4Z8PG.js} +27 -27
  60. package/dist/{Title-DqEvTcqS.js → Title-Bjg44PZP.js} +23 -23
  61. package/dist/{Transaction-Z4qjSyBB.js → Transaction-DbehbwRK.js} +2 -2
  62. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-D9X2-IIl.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DeMdcwb2.js} +6 -6
  63. package/dist/{Voucher-BY8YGlpM.js → Voucher-DARWiV1M.js} +18 -18
  64. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-3j_0rbsk.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BYNjq7K0.js} +12 -12
  65. package/dist/WhatsappAccount-CBx-FoRb.js +158 -0
  66. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BFUOuRGy.js +39 -0
  67. package/dist/{WhatsappBot-Oo1KHYLi.js → WhatsappBot-MSJq0pE4.js} +229 -221
  68. package/dist/WhatsappBotLogs-CEyUngzi.js +372 -0
  69. package/dist/{WhatsappBotSettings-DL1f_qXt.js → WhatsappBotSettings-NIE8NeN4.js} +5 -5
  70. package/dist/{WhatsappBotTickets-CerGACm5.js → WhatsappBotTickets-OCmEkzeD.js} +3 -3
  71. package/dist/{WhatsappLayout-B2DrnLNS.js → WhatsappLayout-DLPLalle.js} +3 -3
  72. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-D_bVWePp.js +195 -0
  73. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-0cvPcwm5.js → ZodTextField.vue_vue_type_script_setup_true_lang-HVcTakep.js} +2 -2
  74. package/dist/{app-bGZlAIpq.js → app-CsPUjtBR.js} +529 -391
  75. package/dist/app.js +1 -1
  76. package/dist/{base.export-COcyNfbe.js → base.export-CSSDz0q9.js} +2 -2
  77. package/dist/{business-DTPgRJRn.js → business-BwGS0vma.js} +1 -1
  78. package/dist/{campaign-cm9TQ4dw.js → campaign-Bw44Blhh.js} +8 -8
  79. package/dist/{campaign-Cg6Z_tME.js → campaign-CwfENerv.js} +2 -2
  80. package/dist/{campaign.fn-CS5nJBxQ.js → campaign.fn-Bx7g_BvU.js} +2 -2
  81. package/dist/{collection.fn-BYzmqREp.js → collection.fn-Ba8-HPHO.js} +2 -2
  82. package/dist/{currency-Dtmbe1s9.js → currency-CO5xQCxT.js} +1 -1
  83. package/dist/{duplicateCampaign-DFarTXOQ.js → duplicateCampaign-C2FQFuzl.js} +2 -2
  84. package/dist/{effect-DAGCCFgZ.js → effect-BUxZHyCk.js} +1 -1
  85. package/dist/{email-addresses-Dw4rkWem.js → email-addresses-CfdqSZi6.js} +2 -2
  86. package/dist/{feature-flag-3dM_IVQU.js → feature-flag-DpIT0Nh2.js} +1 -1
  87. package/dist/{helper-C-LQhPI2.js → helper-miVbMaVy.js} +1 -1
  88. package/dist/{index-DXR3e2yE.js → index-BC30mczi.js} +9 -9
  89. package/dist/{index-CpqSrwMX.js → index-Bshl0e-c.js} +2 -2
  90. package/dist/{index-lSJu-_m2.js → index-CMGEBPm-.js} +2 -2
  91. package/dist/{index-CJMFN-JV.js → index-CNX6rFiO.js} +3 -3
  92. package/dist/{index-BagVZkdk.js → index-CW07TXqO.js} +2 -2
  93. package/dist/{index-DGpe4auo.js → index-CYVDCxVj.js} +1 -1
  94. package/dist/{index-B1kMvJbU.js → index-Co3X9LyE.js} +1 -1
  95. package/dist/{index-BeW-BxcE.js → index-CxzJwolN.js} +1 -1
  96. package/dist/{index-BoDbRee_.js → index-CyMrx8XA.js} +1 -1
  97. package/dist/{index-CMSKFejw.js → index-D6RtVzN9.js} +2 -2
  98. package/dist/{index-DzelXsaZ.js → index-DIOb3eOI.js} +14 -14
  99. package/dist/{index-9V_mKS4w.js → index-DSwOhkYZ.js} +2 -2
  100. package/dist/{index-DKm7rszt.js → index-DgnQ18-j.js} +1 -1
  101. package/dist/{index-B3T_0jO2.js → index-Dy7VtHTZ.js} +3 -3
  102. package/dist/{index-8c7H1u7j.js → index-L7SBt-2D.js} +19 -13
  103. package/dist/index-RwNlbTO8.js +115 -0
  104. package/dist/{index-DGp5iEyx.js → index-Se-R3ekJ.js} +2 -2
  105. package/dist/{index-B3IhN22s.js → index-bJ2Ur1Yd.js} +1 -1
  106. package/dist/{index-xtTYwD-W.js → index-gP-EJA-Y.js} +2 -2
  107. package/dist/{index-C6iTrQ-p.js → index-mBHnjwCf.js} +10 -10
  108. package/dist/{index-DTDGCVKV.js → index-nZUfIfsn.js} +4 -4
  109. package/dist/{index.esm2017-Bm5C6Wxi.js → index.esm2017-DlOLsAJL.js} +1 -1
  110. package/dist/{loading-DoiqPnnv.js → loading-BEDz7eTi.js} +1 -1
  111. package/dist/{lodash-CrTM0DQe.js → lodash-Bx7d35Zs.js} +1 -1
  112. package/dist/{member-import-_VaTYOMn.js → member-import-D4zgQyJX.js} +1 -1
  113. package/dist/{membership-Dm8t6-K5.js → membership-VJBDeKcE.js} +2 -2
  114. package/dist/{money-D0kv1vnT.js → money-Dh0agFMv.js} +1 -1
  115. package/dist/{number-BymDKXn2.js → number-D2coZpxW.js} +1 -1
  116. package/dist/{objectid-CC_whd1t.js → objectid-DVSB63oC.js} +13 -13
  117. package/dist/{onboarding-P6c1Ebh4.js → onboarding-CLwhjKAL.js} +3 -3
  118. package/dist/{onboardingSetup-Ca4782qf.js → onboardingSetup-78evK8yB.js} +2 -2
  119. package/dist/{plugins-BN9qJUUc.js → plugins-CKViI6Y3.js} +3 -3
  120. package/dist/{MarketingMaterialEdit-NlZLrI0D.js → remy-icon-BhUGu2NI.js} +2 -1034
  121. package/dist/{reward-dfKI7Nq1.js → reward-Drd9EaxJ.js} +1 -1
  122. package/dist/{rule-Cu-_boGe.js → rule-Dr21X2h0.js} +10 -10
  123. package/dist/{template-D2qwGN2m.js → template-yVg3lQKo.js} +6 -6
  124. package/dist/{timezone-DjMsHrhm.js → timezone-CGlmgCYo.js} +1 -1
  125. package/dist/{transaction.fn-Bj5yz8tS.js → transaction.fn-outAFFwM.js} +2 -2
  126. package/dist/{trigger-CFjJj6Ri.js → trigger-C1GL_8pm.js} +7 -7
  127. package/dist/{useMarketingMaterialActions-Dx8ZTmHW.js → useMarketingMaterialActions-D8MIFnMy.js} +3 -3
  128. package/dist/{usePagination-CN2auZK8.js → usePagination-Dlx9q4a8.js} +1 -1
  129. package/dist/useWhatsappAccount-1Yy7aaA9.js +62 -0
  130. package/dist/{user-CL05OSdb.js → user-BtORKvTK.js} +1 -1
  131. package/dist/{vue-i18n-CJMFzslC.js → vue-i18n-CkZqjA2G.js} +415 -415
  132. package/dist/{xlsx-BoSbkiXt.js → xlsx-HAQ29LQq.js} +440 -440
  133. package/dist/{zod-6X3ups5P.js → zod-DByiKRxr.js} +1 -1
  134. package/package.json +1 -1
  135. package/dist/WhatsappAccount-SPlDi9BN.js +0 -342
  136. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DYXAJ35J.js +0 -97
  137. package/dist/index-DgkRREfK.js +0 -72
@@ -1,4 +1,4 @@
1
- import { i as Z } from "./plugins-BN9qJUUc.js";
1
+ import { i as Z } from "./plugins-CKViI6Y3.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.87",
3
+ "version": "0.1.98-beta.89",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,342 +0,0 @@
1
- import { defineComponent as U, mergeModels as J, useModel as K, computed as E, ref as d, watch as M, onBeforeUnmount as S, resolveComponent as y, openBlock as i, createBlock as W, withCtx as P, createElementVNode as e, toDisplayString as a, unref as t, createElementBlock as c, createVNode as x, createTextVNode as T, Fragment as j, renderList as Q, createCommentVNode as A, normalizeClass as X } from "vue";
2
- import { u as z } from "./vue-i18n-CJMFzslC.js";
3
- import { useRoute as Y } from "vue-router";
4
- import { S as O, a as D } from "./index-lSJu-_m2.js";
5
- import { w as q } from "./index-8c7H1u7j.js";
6
- import { u as H, _ as Z } from "./WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DYXAJ35J.js";
7
- import { b as ee } from "./browser-BSAOEeIM.js";
8
- import { R as te } from "./app-bGZlAIpq.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__ */ U({
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(L) {
50
- const l = L, k = K(L, "modelValue"), { t: n } = z(), b = E(() => O.getBusinessId() ?? ""), { name: f, phoneNumber: C } = H(() => l.account), r = d(), m = d(""), F = d(!1), g = d(""), _ = d(!1), w = d(!1), B = d("");
51
- let v, $;
52
- function p() {
53
- v == null || v.abort(), clearTimeout($), _.value = !1, w.value = !1;
54
- }
55
- async function G() {
56
- p();
57
- const s = new AbortController();
58
- v = s, F.value = !0, g.value = "", B.value = "", r.value = void 0, m.value = "";
59
- try {
60
- if (!b.value)
61
- throw new Error(n("connect.whatsappBot.errors.selectBusiness"));
62
- const o = await q.getNotificationGroup(
63
- b.value,
64
- l.account.clientId,
65
- s.signal
66
- );
67
- if (s.signal.aborted) return;
68
- const u = await ee.toDataURL(o.inviteLink, {
69
- width: 224,
70
- margin: 2,
71
- errorCorrectionLevel: "M"
72
- });
73
- if (s.signal.aborted) return;
74
- r.value = o, m.value = u;
75
- } catch (o) {
76
- if (s.signal.aborted) return;
77
- o instanceof D && o.status === 409 ? g.value = n("connect.whatsappBot.notificationGroup.notReady") : o instanceof D && o.status === 404 ? g.value = n("connect.whatsappBot.errors.accountNotFound") : g.value = b.value ? n("connect.whatsappBot.errors.loadGroup") : n("connect.whatsappBot.errors.selectBusiness");
78
- } finally {
79
- s.signal.aborted || (F.value = !1);
80
- }
81
- }
82
- async function I() {
83
- if (!r.value || !v || w.value) return;
84
- const s = v;
85
- w.value = !0, _.value = !1, B.value = "", clearTimeout($);
86
- try {
87
- if (await navigator.clipboard.writeText(r.value.inviteLink), s.signal.aborted) return;
88
- _.value = !0, $ = setTimeout(() => {
89
- _.value = !1;
90
- }, 2e3);
91
- } catch {
92
- s.signal.aborted || (B.value = n("connect.whatsappBot.errors.copyGroupLink"));
93
- } finally {
94
- s.signal.aborted || (w.value = !1);
95
- }
96
- }
97
- return M(
98
- [k, b, () => l.account.clientId],
99
- ([s]) => {
100
- s ? G() : p();
101
- },
102
- { immediate: !0 }
103
- ), S(p), (s, o) => {
104
- const u = y("FmCircularProgress"), N = y("FmButton"), R = y("FmIcon"), V = y("FmDialog");
105
- return i(), W(V, {
106
- modelValue: k.value,
107
- "onUpdate:modelValue": o[0] || (o[0] = (h) => k.value = h),
108
- "min-width": "min(720px, calc(100% - 32px))",
109
- "max-width": "720px",
110
- "max-height": "90vh",
111
- "dismiss-away": ""
112
- }, {
113
- "dialog-header": P(() => [
114
- e("div", oe, [
115
- e("h2", ne, a(t(n)("connect.whatsappBot.notificationGroup.dialogTitle")), 1),
116
- e("p", ae, a(t(f)) + " · " + a(t(C)), 1)
117
- ])
118
- ]),
119
- default: P(() => [
120
- F.value ? (i(), c("div", se, [
121
- x(u),
122
- T(" " + a(t(n)("connect.whatsappBot.notificationGroup.loading")), 1)
123
- ])) : g.value ? (i(), c("div", le, [
124
- e("p", re, a(g.value), 1),
125
- x(N, {
126
- label: t(n)("connect.whatsappBot.tryAgain"),
127
- "prepend-icon": "refresh",
128
- onClick: G
129
- }, null, 8, ["label"])
130
- ])) : r.value ? (i(), c("div", ie, [
131
- e("div", ce, [
132
- e("p", pe, a(t(n)("connect.whatsappBot.notificationGroup.scanDescription")), 1),
133
- e("div", ue, [
134
- e("h3", de, a(t(n)("connect.whatsappBot.notificationGroup.postsTitle")), 1),
135
- e("ul", fe, [
136
- (i(), c(j, null, Q(["unanswered", "staffRequests", "humanRequests"], (h) => e("li", {
137
- key: h,
138
- class: "flex gap-[10px]"
139
- }, [
140
- o[1] || (o[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(" " + a(t(n)(`connect.whatsappBot.notificationGroup.posts.${h}`)), 1)
145
- ])), 64))
146
- ])
147
- ]),
148
- e("div", xe, [
149
- e("span", me, a(t(n)("connect.whatsappBot.notificationGroup.inviteLink")), 1),
150
- e("div", ve, [
151
- e("div", he, a(r.value.inviteLink), 1),
152
- e("button", {
153
- type: "button",
154
- disabled: w.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
- }, a(t(n)(
158
- `connect.whatsappBot.notificationGroup.${_.value ? "copied" : "copy"}`
159
- )), 9, ge)
160
- ]),
161
- _.value ? (i(), c("span", _e, a(t(n)("connect.whatsappBot.notificationGroup.copied")), 1)) : A("", !0),
162
- B.value ? (i(), c("p", ye, a(B.value), 1)) : A("", !0),
163
- e("p", be, a(t(n)("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(n)("connect.whatsappBot.notificationGroup.qrAlt"),
171
- width: "224",
172
- height: "224"
173
- }, null, 8, ke)
174
- ]),
175
- e("a", {
176
- href: r.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(a(t(n)("connect.whatsappBot.notificationGroup.openWhatsapp")) + " ", 1),
182
- x(R, {
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 = ["src"], Ne = { key: 1 }, Re = { class: "min-w-0 flex-1 flex flex-col gap-[2px]" }, Ee = { class: "text-[24px] leading-[32px] font-semibold tracking-[-0.01em] break-words" }, Pe = { class: "flex items-center gap-[10px] flex-wrap text-[14px] text-fm-color-typo-secondary" }, je = { 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
- }, Ue = {
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
- }, Me = { class: "min-w-[240px] xs:min-w-0 flex-1 flex flex-col gap-[4px]" }, Se = {
211
- id: "notification-group-title",
212
- class: "text-[16px] leading-[24px] font-semibold"
213
- }, We = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary" }, Ye = /* @__PURE__ */ U({
214
- __name: "WhatsappAccount",
215
- setup(L) {
216
- const { t: l } = z(), k = Y(), n = E(() => O.getBusinessId() ?? ""), b = E(
217
- () => typeof k.params.clientId == "string" ? k.params.clientId : ""
218
- ), f = d(), C = d(!0), r = d(""), m = d(!1), {
219
- name: F,
220
- phoneNumber: g,
221
- initials: _,
222
- state: w,
223
- avatarColor: B,
224
- profilePictureUrl: v,
225
- profilePictureFailed: $
226
- } = H(f);
227
- let p, G;
228
- async function I(s = !1) {
229
- clearTimeout(G), p == null || p.abort();
230
- const o = new AbortController();
231
- p = o, s || (C.value = !0, r.value = "");
232
- try {
233
- if (!n.value)
234
- throw new Error(l("connect.whatsappBot.errors.selectBusiness"));
235
- const u = await q.getClient(
236
- n.value,
237
- b.value,
238
- o.signal
239
- );
240
- if (o.signal.aborted) return;
241
- f.value = u, r.value = "";
242
- } catch (u) {
243
- if (o.signal.aborted) return;
244
- u instanceof D && u.status === 404 ? (m.value = !1, f.value = void 0, r.value = l("connect.whatsappBot.errors.accountNotFound")) : s || (r.value = n.value ? l("connect.whatsappBot.errors.loadAccount") : l("connect.whatsappBot.errors.selectBusiness"));
245
- } finally {
246
- o.signal.aborted || (C.value = !1, f.value && (G = setTimeout(() => void I(!0), 1e4)));
247
- }
248
- }
249
- return M(
250
- [n, b],
251
- () => {
252
- m.value = !1, f.value = void 0, I();
253
- },
254
- { immediate: !0 }
255
- ), S(() => {
256
- p == null || p.abort(), clearTimeout(G);
257
- }), (s, o) => {
258
- const u = y("FmIcon"), N = y("RouterLink"), R = y("FmCircularProgress"), V = y("FmButton");
259
- return i(), c(j, null, [
260
- e("div", Ce, [
261
- e("div", Fe, [
262
- x(N, {
263
- to: { name: t(te)["$connect-WHATSAPP_BOT"] },
264
- 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"
265
- }, {
266
- default: P(() => [
267
- x(u, {
268
- name: "chevron_left",
269
- size: "sm"
270
- }),
271
- T(" " + a(t(l)("connect.navigation.whatsappBot")), 1)
272
- ]),
273
- _: 1
274
- }, 8, ["to"]),
275
- C.value ? (i(), c("div", Ie, [
276
- x(R),
277
- T(" " + a(t(l)("connect.whatsappBot.loadingAccount")), 1)
278
- ])) : r.value ? (i(), c("div", Te, [
279
- e("p", Ae, a(r.value), 1),
280
- x(V, {
281
- label: t(l)("connect.whatsappBot.tryAgain"),
282
- "prepend-icon": "refresh",
283
- onClick: o[0] || (o[0] = (h) => I())
284
- }, null, 8, ["label"])
285
- ])) : f.value ? (i(), c(j, { key: 2 }, [
286
- e("div", Ve, [
287
- e("div", {
288
- "aria-hidden": "true",
289
- class: X(["w-[56px] h-[56px] rounded-full overflow-hidden shrink-0 flex items-center justify-center text-[18px] font-semibold text-fm-color-typo-white", t(B)])
290
- }, [
291
- t(v) && !t($) ? (i(), c("img", {
292
- key: 0,
293
- src: t(v),
294
- alt: "",
295
- class: "w-full h-full object-cover",
296
- referrerpolicy: "no-referrer",
297
- onError: o[1] || (o[1] = (h) => $.value = !0)
298
- }, null, 40, Le)) : (i(), c("span", Ne, a(t(_)), 1))
299
- ], 2),
300
- e("div", Re, [
301
- e("h1", Ee, a(t(F)), 1),
302
- e("div", Pe, [
303
- e("span", je, a(t(g)), 1),
304
- x(Z, { state: t(w) }, null, 8, ["state"])
305
- ])
306
- ])
307
- ]),
308
- e("section", De, [
309
- e("div", Ue, [
310
- x(u, {
311
- name: "notifications",
312
- size: "md"
313
- })
314
- ]),
315
- e("div", Me, [
316
- e("h2", Se, a(t(l)("connect.whatsappBot.notificationGroup.title")), 1),
317
- e("p", We, a(t(l)("connect.whatsappBot.notificationGroup.description")), 1)
318
- ]),
319
- x(V, {
320
- variant: "secondary",
321
- label: t(l)("connect.whatsappBot.notificationGroup.join"),
322
- "prepend-icon": "group",
323
- class: "shrink-0",
324
- onClick: o[2] || (o[2] = (h) => m.value = !0)
325
- }, null, 8, ["label"])
326
- ])
327
- ], 64)) : A("", !0)
328
- ])
329
- ]),
330
- f.value ? (i(), W(Ge, {
331
- key: 0,
332
- modelValue: m.value,
333
- "onUpdate:modelValue": o[3] || (o[3] = (h) => m.value = h),
334
- account: f.value
335
- }, null, 8, ["modelValue", "account"])) : A("", !0)
336
- ], 64);
337
- };
338
- }
339
- });
340
- export {
341
- Ye as default
342
- };
@@ -1,97 +0,0 @@
1
- import { computed as c, toValue as w, ref as A, watch as _, defineComponent as B, openBlock as C, createElementBlock as N, normalizeClass as f, createElementVNode as S, createTextVNode as V, toDisplayString as I, unref as L } from "vue";
2
- import { u as g } from "./vue-i18n-CJMFzslC.js";
3
- function P(s) {
4
- const n = s.connectedAt !== null;
5
- switch (s.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 E(s) {
20
- const { t: n, locale: r } = g(), t = c(() => w(s)), a = c(
21
- () => {
22
- var e, o, l;
23
- return (l = (o = (e = t.value) == null ? void 0 : e.account) == null ? void 0 : o.profilePicture) == null ? void 0 : l.url;
24
- }
25
- ), p = A(!1);
26
- _(a, () => {
27
- p.value = !1;
28
- });
29
- const u = c(
30
- () => {
31
- var e, o, l, i, m, d;
32
- return ((o = (e = t.value) == null ? void 0 : e.account) == null ? void 0 : o.businessName) || ((i = (l = t.value) == null ? void 0 : l.account) == null ? void 0 : i.name) || ((d = (m = t.value) == null ? void 0 : m.account) == null ? void 0 : d.phoneNumber) || n("connect.whatsappBot.unnamedAccount");
33
- }
34
- ), h = c(
35
- () => {
36
- var e, o;
37
- return ((o = (e = t.value) == null ? void 0 : e.account) == null ? void 0 : o.phoneNumber) || n("connect.whatsappBot.phoneUnavailable");
38
- }
39
- ), v = c(
40
- () => u.value.trim().split(/\s+/).slice(0, 2).map((e) => Array.from(e)[0]).join("").toLocaleUpperCase(r.value)
41
- ), y = c(
42
- () => t.value ? P(t.value) ?? "disconnected" : "disconnected"
43
- ), x = c(
44
- () => {
45
- var e;
46
- return b[parseInt(((e = t.value) == null ? void 0 : e.clientId.slice(-6)) ?? "0", 16) % b.length];
47
- }
48
- );
49
- return {
50
- name: u,
51
- phoneNumber: h,
52
- initials: v,
53
- state: y,
54
- avatarColor: x,
55
- profilePictureUrl: a,
56
- profilePictureFailed: p
57
- };
58
- }
59
- const O = /* @__PURE__ */ B({
60
- __name: "WhatsappAccountStatusLabel",
61
- props: {
62
- state: {}
63
- },
64
- setup(s) {
65
- const n = s, { t: r } = g(), t = {
66
- connected: {
67
- label: "connect.whatsappBot.connected",
68
- pill: "text-fm-color-typo-success bg-fm-color-system-success-100",
69
- dot: "bg-fm-color-system-success-400"
70
- },
71
- disconnected: {
72
- label: "connect.whatsappBot.disconnected",
73
- pill: "text-fm-color-typo-error bg-fm-color-system-error-100",
74
- dot: "bg-fm-color-system-error-400"
75
- },
76
- connecting: {
77
- label: "connect.whatsappBot.statusConnecting",
78
- pill: "text-fm-color-typo-warning bg-fm-color-system-warning-100",
79
- dot: "bg-fm-color-system-warning-400"
80
- }
81
- }, a = c(() => t[n.state]);
82
- return (p, u) => (C(), N("span", {
83
- class: f(["flex items-center gap-[6px] text-[12px] font-semibold px-[8px] py-[3px] rounded-[6px]", a.value.pill])
84
- }, [
85
- S("span", {
86
- "aria-hidden": "true",
87
- class: f(["w-[6px] h-[6px] rounded-full", a.value.dot])
88
- }, null, 2),
89
- V(" " + I(L(r)(a.value.label)), 1)
90
- ], 2));
91
- }
92
- });
93
- export {
94
- O as _,
95
- E as u,
96
- P as w
97
- };
@@ -1,72 +0,0 @@
1
- import { z as t } from "./index-C_H8jFYf.js";
2
- const s = 2e3, n = [
3
- "slow",
4
- "medium",
5
- "fast",
6
- "immediate"
7
- ], A = "medium", i = 50, o = 200, a = 1e4, r = t.object({
8
- title: t.string().max(o),
9
- description: t.string().max(a)
10
- }).refine((e) => e.title.trim() || e.description.trim(), {
11
- message: "Knowledge topics must include a title or description"
12
- }), c = r.array().max(
13
- i
14
- ), d = t.object({
15
- botInstructions: t.string().max(s),
16
- responseSpeed: t.enum(n),
17
- knowledgeBase: c
18
- }), p = d.extend({
19
- businessId: t.string().regex(/^[a-f\d]{24}$/i)
20
- }), g = t.object({
21
- clientId: t.string().regex(/^[a-f\d]{24}$/i),
22
- qr: t.string().min(1),
23
- expiresAt: t.string().datetime({ offset: !0 })
24
- }), l = [
25
- "connecting",
26
- "connected",
27
- "disconnected"
28
- ], m = t.object({
29
- clientId: g.shape.clientId,
30
- status: t.enum(l),
31
- profileStatus: t.enum(["pending", "ready"]),
32
- account: t.object({
33
- name: t.string().optional(),
34
- businessName: t.string().optional(),
35
- phoneNumber: t.string().optional(),
36
- profilePicture: t.object({
37
- url: t.string().optional()
38
- }).nullish()
39
- }).nullable(),
40
- connectedAt: t.string().datetime({ offset: !0 }).nullable(),
41
- createdAt: t.string().datetime({ offset: !0 })
42
- }), T = t.object({
43
- groupId: t.string().regex(/^[0-9]+(-[0-9]+)?@g\.us$/),
44
- inviteLink: t.string().url().regex(/^https:\/\/chat\.whatsapp\.com\/[A-Za-z0-9]+$/)
45
- }), u = t.enum(["staff", "bot"]), P = t.object({
46
- id: t.string().regex(/^[a-f\d]{24}$/i),
47
- businessId: p.shape.businessId,
48
- customerLid: t.string().regex(/^[0-9]+@(lid|hosted\.lid)$/),
49
- customerName: t.string(),
50
- profileImage: t.string().optional(),
51
- phoneNumber: t.string(),
52
- clientId: m.shape.clientId,
53
- source: u,
54
- reason: t.string().min(1),
55
- createdAt: t.string().datetime({ offset: !0 }),
56
- updatedAt: t.string().datetime({ offset: !0 })
57
- });
58
- export {
59
- s as F,
60
- i as a,
61
- o as b,
62
- a as c,
63
- n as d,
64
- A as e,
65
- c as f,
66
- P as g,
67
- p as h,
68
- d as i,
69
- m as j,
70
- g as k,
71
- T as l
72
- };