@feedmepos/mf-connect 0.1.128-prod → 0.1.129-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.
Files changed (149) hide show
  1. package/dist/{App-DFXou0ZK.js → App-DvKWSqd0.js} +223 -215
  2. package/dist/AuditLogs-Di41b_Ka.js +2016 -0
  3. package/dist/{Bin-ril4yEp7.js → Bin-D0VJaSda.js} +8 -8
  4. package/dist/{Broadcast-CcseZmao.js → Broadcast-lOKmeyF5.js} +22 -21
  5. package/dist/{CampaignAnalytic-DaJ5a6G1.js → CampaignAnalytic-BR7qr2Rk.js} +6 -6
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CsmgbhtH.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-f_irDYbB.js} +9 -10
  7. package/dist/{Card-D7sTDXgf.js → Card-C0FjooTO.js} +23 -23
  8. package/dist/{Collections-C6d4vkox.js → Collections-fM1PptfB.js} +197 -185
  9. package/dist/{Credit-B9JCYQYi.js → Credit-RJpI_hfW.js} +21 -20
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CwD5dRnJ.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DBqqfruz.js} +1 -1
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DGTBYWbC.js +4584 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BMxA26t5.js → EffectSheet.vue_vue_type_style_index_0_lang-9iMoc4-j.js} +33 -33
  13. package/dist/{Experience-pBNjY5aC.js → Experience-Beikw_KZ.js} +32 -31
  14. package/dist/{FileSaver.min-BdA7jj3J.js → FileSaver.min-Djm1XTRD.js} +1 -1
  15. package/dist/{Game-Ba1LqaLj.js → Game-D1H4RZRw.js} +19 -18
  16. package/dist/{GiftCardSetup-DteySO0t.js → GiftCardSetup-CTCP6_Ht.js} +31 -31
  17. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-DxFGFA_U.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-D6qxdYOi.js} +140 -128
  18. package/dist/{Goals-D4rLwe3y.js → Goals-CY2WQED5.js} +4 -4
  19. package/dist/Grab-DsMx3lCJ.js +301 -0
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-C-1uplPm.js → ImageInput.vue_vue_type_script_setup_true_lang-DKRggrex.js} +1 -1
  21. package/dist/{Index-DZ9bEViq.js → Index-ByeYSoK-.js} +10 -10
  22. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DS3y4uib.js → LocationPicker.vue_vue_type_script_setup_true_lang-C0D53C2N.js} +1 -1
  23. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BTHmofSe.js → LottieAnimation.vue_vue_type_script_setup_true_lang-iLUXbCQ_.js} +1 -1
  24. package/dist/{LoyaltyDashboard-CBMyLX7W.js → LoyaltyDashboard-DjD4jSCx.js} +14 -14
  25. package/dist/{MainLayout-B3-DumYs.js → MainLayout-D7cpvtY_.js} +1 -1
  26. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-BWOWZMYx.js → MainLayout.vue_vue_type_script_setup_true_lang-CG1qvcum.js} +3 -3
  27. package/dist/{Marketing-CJiu6eP4.js → Marketing-BpnTVwWR.js} +4 -4
  28. package/dist/{MarketingMaterialEdit-BuHpXGwZ.js → MarketingMaterialEdit-j76T_qaw.js} +214 -211
  29. package/dist/{Member-AOxxLQ-x.js → Member-CeFsJL8A.js} +7 -7
  30. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-ArZ8cvMK.js +1336 -0
  31. package/dist/{MemberImportHistory-o-ruPMEe.js → MemberImportHistory-CwUXydVO.js} +7 -7
  32. package/dist/{MemberList-BkX_jgos.js → MemberList-Dxfmeq35.js} +103 -105
  33. package/dist/{MemberTransactions-Bnc3BWr5.js → MemberTransactions-DGvXpgAq.js} +1 -1
  34. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DoUw4U88.js → MessageInput.vue_vue_type_script_setup_true_lang-8klAQtYp.js} +12 -12
  35. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BHprSEKu.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BQNf6z-_.js} +1 -1
  36. package/dist/{Mission-D80DxR7z.js → Mission-CMMJSaIe.js} +22 -21
  37. package/dist/{Overview-jb3HWI09.js → Overview-Xtz3sU8A.js} +21 -21
  38. package/dist/{Overview-9gdETQLU.js → Overview-chOvaL7E.js} +145 -144
  39. package/dist/{Point-Pf_s2Ggb.js → Point-RZTZYN8G.js} +22 -21
  40. package/dist/{Promotion-BjjugEKH.js → Promotion-BqcuV7CX.js} +137 -131
  41. package/dist/{Queue-CVWdBEvK.js → Queue-ER6uDdkZ.js} +46 -46
  42. package/dist/{Record-BS9lp0Cs.js → Record-f3M08xoH.js} +9 -9
  43. package/dist/{Review-1MRQGLAX.js → Review-CtMC0SLr.js} +2 -2
  44. package/dist/ReviewFacebookCallback-DGwq3hYg.js +225 -0
  45. package/dist/{ReviewGoogleCallback-8kzG-TMh.js → ReviewGoogleCallback-DdxHlmxB.js} +5 -5
  46. package/dist/{Reward-UPonEShz.js → Reward-Cf9weya5.js} +16 -16
  47. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CW-EEgDZ.js → RewardGroup.vue_vue_type_script_setup_true_lang-CgafHHo1.js} +14 -14
  48. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DqAI7oH2.js +1923 -0
  49. package/dist/{Segment-BsNstBo-.js → Segment-6SBsEUoL.js} +304 -307
  50. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-3uc5TjrH.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-pbDGxQlY.js} +15 -15
  51. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CKc0Q7pK.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CEeBMZUD.js} +4 -4
  52. package/dist/{Setting-BD-fl3v8.js → Setting-BffjA4Ar.js} +17 -17
  53. package/dist/{SettingAdvertisements-DG1btpAQ.js → SettingAdvertisements-Dt2FJuln.js} +12 -12
  54. package/dist/Settings-c_khgiuB.js +286 -0
  55. package/dist/{Store-CQe1YA-D.js → Store-BW4dbML2.js} +29 -29
  56. package/dist/{StoreRewards-C7z5eJc4.js → StoreRewards-BVZX_cAF.js} +15 -15
  57. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CvX_M1KW.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CrvPa_4T.js} +25 -25
  58. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CGe8vmiK.js +7007 -0
  59. package/dist/{Tier-BBb_E8_V.js → Tier-FSQh2lvv.js} +2583 -688
  60. package/dist/{Title-CjJaca4P.js → Title-oB7Kb32J.js} +96 -95
  61. package/dist/{Transaction-Dn-EPCom.js → Transaction-C3gt-4Th.js} +2 -2
  62. package/dist/{Upselling-DB8HU6B_.js → Upselling-DqmTk4n0.js} +3 -3
  63. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BG2o3Nip.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CnLThjUf.js} +26 -26
  64. package/dist/{Voucher-Cwg3WelV.js → Voucher-DVqZh9hJ.js} +19 -19
  65. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CRz0wdSO.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Yrw65BaW.js} +12 -12
  66. package/dist/{WhatsappAccount--SMCex1D.js → WhatsappAccount-5fcZZ-0m.js} +6 -6
  67. package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BpZ0_NtK.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BKkrc4kw.js} +1 -1
  68. package/dist/{WhatsappBot-2BTZU0cI.js → WhatsappBot-DvwGIMBY.js} +7 -7
  69. package/dist/{WhatsappBotLogs-nGIYzZCU.js → WhatsappBotLogs-ujnVIcVS.js} +5 -5
  70. package/dist/{WhatsappBotSettings-DBx7ezqA.js → WhatsappBotSettings-TArljpKB.js} +5 -5
  71. package/dist/{WhatsappLayout-DK2idBeB.js → WhatsappLayout-qw4Ffnoj.js} +3 -3
  72. package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-B-pAId0k.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-ByfYZ78V.js} +3 -3
  73. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DYpCPJDx.js → ZodTextField.vue_vue_type_script_setup_true_lang-Cy62_4_q.js} +2 -2
  74. package/dist/{app-DjtVpjOD.js → app-CWi-W3yH.js} +4286 -3522
  75. package/dist/app.js +4 -3
  76. package/dist/{base.export-Dc9I7xbt.js → base.export-CQRAkm5d.js} +2 -2
  77. package/dist/business-D3OHW7AT.js +83 -0
  78. package/dist/{campaign-BNgMmhg6.js → campaign-B7dVjNGp.js} +121 -94
  79. package/dist/{campaign-U8KBANd_.js → campaign-DOqE4MfM.js} +31 -25
  80. package/dist/{campaign.enum-mYG3oWwU.js → campaign.enum-UEQYOY5t.js} +3 -2
  81. package/dist/campaign.fn-DHYDb4hv.js +776 -0
  82. package/dist/{collectible.enum-BtBBkbIB.js → collectible.enum-BsAN6p6D.js} +1 -1
  83. package/dist/{collection.fn-lFr9HoHC.js → collection.fn-Gm9D9ulH.js} +2 -2
  84. package/dist/{currency-B6GBpIWb.js → currency-CTEZgACE.js} +1 -1
  85. package/dist/duplicateCampaign-C80PKqYp.js +51 -0
  86. package/dist/{effect-DmzU8TpX.js → effect-C1e1yy73.js} +1 -1
  87. package/dist/{email-addresses-s_oiQY8W.js → email-addresses-CNONB99X.js} +2 -2
  88. package/dist/{feature-flag-CRbNgxfa.js → feature-flag-CAf5xPv2.js} +84 -84
  89. package/dist/google-BQK68wbe.js +5 -0
  90. package/dist/{helper-0o3cPptM.js → helper-D3ibSHOf.js} +1 -1
  91. package/dist/{index-Cnl3vaVR.js → index-BZQxnWTK.js} +2 -2
  92. package/dist/{index-BECZ4ORu.js → index-BlW_i2Dq.js} +1 -1
  93. package/dist/{index-iEzy3892.js → index-Bq3EaCT0.js} +1 -1
  94. package/dist/{index-DMgSW1aH.js → index-C9I_BbH3.js} +198 -198
  95. package/dist/{index-DLcl6mHQ.js → index-CFCuWT0v.js} +1 -1
  96. package/dist/{index-Bql1JMH9.js → index-CHBVTLaB.js} +26 -19
  97. package/dist/{index-BvoYHJ0i.js → index-Cco3w1OY.js} +2 -2
  98. package/dist/{index-CigqpRCP.js → index-CeERazr-.js} +609 -252
  99. package/dist/{index-CxxWGkQz.js → index-ChrgK9rD.js} +23 -23
  100. package/dist/{index-BMG5fllq.js → index-Cie3akNu.js} +4 -4
  101. package/dist/{index-DNx-iJd1.js → index-CuaoX2qa.js} +2 -2
  102. package/dist/{index-NhHbOATm.js → index-D6Kw_BIJ.js} +1315 -1243
  103. package/dist/{index-Df5CnMjC.js → index-D9WVHRkg.js} +4 -4
  104. package/dist/{index-DQLDjCeb.js → index-DN2p4Ds-.js} +1 -1
  105. package/dist/{index-CZWCtODZ.js → index-DQHeEclJ.js} +1 -1
  106. package/dist/{index-C9MKLJzw.js → index-DTVOmhFW.js} +2700 -2614
  107. package/dist/{index-CPByCjHI.js → index-DXOIiilO.js} +9 -9
  108. package/dist/{index-DphGTJkl.js → index-DqLwK46-.js} +4 -4
  109. package/dist/{index-NOeUp1Wc.js → index-DzRCjjVJ.js} +390 -236
  110. package/dist/{index-BXi5bQbd.js → index-uzf55NWc.js} +19 -6
  111. package/dist/{index-B6BmfoiZ.js → index-v73QbuDe.js} +1 -1
  112. package/dist/{index-DXV_Kdhp.js → index-y_gri2a3.js} +7 -7
  113. package/dist/{index.esm2017-DpKkF6uX.js → index.esm2017-DdnESO2S.js} +57 -57
  114. package/dist/{loading-nQaPRntd.js → loading-Dk6F9REp.js} +1 -1
  115. package/dist/{lodash-B6558zRv.js → lodash-lPRTuxNQ.js} +1 -1
  116. package/dist/{member-import-DWDpO4uU.js → member-import-TekQCbcQ.js} +2 -2
  117. package/dist/{membership-BY1-idAv.js → membership-DIme1cal.js} +3 -3
  118. package/dist/{money-DE62jPYV.js → money-B2ySjftN.js} +1 -1
  119. package/dist/{number-C9mUt-Ac.js → number-C_SdhwNx.js} +1 -1
  120. package/dist/objectid-DSZHf9-B.js +145 -0
  121. package/dist/{onboarding-OTAVtlNj.js → onboarding-B22eQGjb.js} +25 -25
  122. package/dist/{onboardingSetup-DhwhJk-r.js → onboardingSetup-CznYh7FA.js} +2 -2
  123. package/dist/{plugins-CpxP-Bn_.js → plugins-C-wY_Lzp.js} +3 -3
  124. package/dist/{reward-yx-Ttob3.js → reward--TbWBNNE.js} +1 -1
  125. package/dist/{rule-C_T37PuL.js → rule-BuoxJoFL.js} +572 -492
  126. package/dist/style.css +1 -1
  127. package/dist/template-BUUUr5wv.js +227 -0
  128. package/dist/{transaction.fn-4IcKHgri.js → transaction.fn-BE9pT4qk.js} +2 -2
  129. package/dist/{trigger-8zSNA5H1.js → trigger-Bvc7RgJ2.js} +9 -9
  130. package/dist/{useMarketingMaterialActions-CXjA7dhm.js → useMarketingMaterialActions-Dc5gQUq-.js} +4 -4
  131. package/dist/{usePagination-BECgW_Yq.js → usePagination-CK4Lu0Rq.js} +1 -1
  132. package/dist/{user-Czn9R1f-.js → user-B-jfQzWb.js} +1 -1
  133. package/dist/vue-i18n-CkPLtogB.js +2365 -0
  134. package/dist/{xlsx-3kbv63FT.js → xlsx-CPQkUIJH.js} +440 -440
  135. package/dist/{zod-DMdtnaR4.js → zod-CgCRBVd1.js} +1 -1
  136. package/package.json +6 -2
  137. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Cteezb57.js +0 -3638
  138. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-cGglvqwB.js +0 -1308
  139. package/dist/ReviewFacebookCallback-DuuQxEIK.js +0 -238
  140. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BmTEULNC.js +0 -1884
  141. package/dist/Settings-LPdO0Djy.js +0 -179
  142. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DmeOGncB.js +0 -142
  143. package/dist/business-C0Ej4JRP.js +0 -82
  144. package/dist/campaign.fn-BaBPV7He.js +0 -776
  145. package/dist/google-C3S8u0mT.js +0 -4
  146. package/dist/objectid-DyUyXFvt.js +0 -145
  147. package/dist/rule-builder-WoEQdgK2.js +0 -102
  148. package/dist/template-AnoXsK9Y.js +0 -275
  149. package/dist/vue-i18n-BJWf_QrH.js +0 -2365
@@ -1,179 +0,0 @@
1
- import { defineComponent as N, useSlots as U, openBlock as r, createElementBlock as l, createElementVNode as s, normalizeClass as $, unref as e, toDisplayString as y, createCommentVNode as m, Fragment as b, createBlock as E, createVNode as w, renderSlot as T, ref as x, computed as B, onMounted as G, withCtx as O, renderList as C, createStaticVNode as z } from "vue";
2
- import { u as A } from "./loading-nQaPRntd.js";
3
- import { u as M } from "./business-C0Ej4JRP.js";
4
- import { components as f, useSnackbar as W } from "@feedmepos/ui-library";
5
- import { u as R } from "./vue-i18n-BJWf_QrH.js";
6
- import { g as j } from "./google-C3S8u0mT.js";
7
- import { R as D } from "./app-DjtVpjOD.js";
8
- import { useRouter as H } from "vue-router";
9
- import { r as h } from "./index-CPByCjHI.js";
10
- const P = { class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white overflow-hidden" }, q = ["src"], J = { class: "flex flex-col flex-1 gap-1 min-w-0" }, K = { class: "fm-typo-en-body-md-600 capitalize" }, Q = {
11
- key: 0,
12
- class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate"
13
- }, X = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400" }, Y = /* @__PURE__ */ N({
14
- __name: "ReviewSource",
15
- props: {
16
- icon: {},
17
- name: {},
18
- connected: { type: Boolean },
19
- subtitle: {},
20
- syncing: { type: Boolean },
21
- tokenExpired: { type: Boolean }
22
- },
23
- emits: ["connect", "sync"],
24
- setup(o, { emit: p }) {
25
- const u = p, { t: i } = R(), g = U();
26
- return (c, a) => (r(), l("div", P, [
27
- s("div", {
28
- class: $(["flex items-center gap-12 p-16", e(g).default ? "border-b border-fm-color-neutral-gray-100" : ""])
29
- }, [
30
- s("img", {
31
- src: o.icon,
32
- class: "w-10 h-10 shrink-0"
33
- }, null, 8, q),
34
- s("div", J, [
35
- s("span", K, y(o.name), 1),
36
- o.subtitle || !o.connected ? (r(), l("span", Q, y(o.connected ? o.subtitle : e(i)("connect.review.notConnected")), 1)) : m("", !0)
37
- ]),
38
- o.connected ? (r(), l(b, { key: 0 }, [
39
- o.tokenExpired ? (r(), E(e(f).FmChip, {
40
- key: 0,
41
- label: e(i)("connect.review.expired"),
42
- variant: "critical"
43
- }, null, 8, ["label"])) : m("", !0),
44
- w(e(f).FmButton, {
45
- variant: "secondary",
46
- "prepend-icon": "refresh",
47
- label: e(i)("connect.review.reconnect"),
48
- onClick: a[0] || (a[0] = (v) => u("connect"))
49
- }, null, 8, ["label"]),
50
- o.tokenExpired ? m("", !0) : (r(), E(e(f).FmButton, {
51
- key: 1,
52
- variant: "primary",
53
- "prepend-icon": "sync",
54
- label: e(i)("connect.review.sync"),
55
- loading: o.syncing,
56
- onClick: a[1] || (a[1] = (v) => u("sync"))
57
- }, null, 8, ["label", "loading"]))
58
- ], 64)) : m("", !0)
59
- ], 2),
60
- o.connected ? m("", !0) : (r(), l("div", {
61
- key: 0,
62
- class: $(["flex items-center justify-between gap-12 p-16", e(g).default ? "border-b border-fm-color-neutral-gray-100" : ""])
63
- }, [
64
- s("span", X, y(e(i)("connect.review.connectHint", { name: o.name })), 1),
65
- w(e(f).FmButton, {
66
- "prepend-icon": "add",
67
- label: e(i)("connect.review.connect"),
68
- onClick: a[2] || (a[2] = (v) => u("connect"))
69
- }, null, 8, ["label"])
70
- ], 2)),
71
- T(c.$slots, "default")
72
- ]));
73
- }
74
- }), Z = { class: "p-24 flex flex-col gap-8" }, ee = { class: "flex flex-col flex-1 min-w-0" }, ne = { class: "fm-typo-en-body-lg-600 truncate" }, oe = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 truncate" }, me = /* @__PURE__ */ N({
75
- __name: "Settings",
76
- setup(o) {
77
- const { t: p } = R(), u = W(), i = H(), g = M(), c = x(null), a = x(!1);
78
- x(!1);
79
- const v = B(
80
- () => {
81
- var n;
82
- return c.value ? ((n = c.value.google) == null ? void 0 : n.accessToken) === null : !1;
83
- }
84
- );
85
- B(
86
- () => {
87
- var n;
88
- return c.value ? ((n = c.value.facebook) == null ? void 0 : n.token) === null : !1;
89
- }
90
- );
91
- function _(n) {
92
- const t = window.location.pathname.replace(/\/review(?:\/.*)?$/, "");
93
- return `${window.location.origin}${t}${n}`;
94
- }
95
- async function S() {
96
- await A.minor(async () => {
97
- c.value = await h.getSource();
98
- });
99
- }
100
- function V(n) {
101
- var t;
102
- return (t = g.locations.find(
103
- (d) => d._id.toString() === n
104
- )) == null ? void 0 : t.name;
105
- }
106
- function F() {
107
- u.open({
108
- message: p("connect.review.syncSuccess"),
109
- type: "success"
110
- }), i.push({ name: D["$connect-REVIEW_OVERVIEW"] });
111
- }
112
- async function I() {
113
- var n, t;
114
- a.value = !0;
115
- try {
116
- await h.syncGoogleReviews(), F();
117
- } catch (d) {
118
- if (await S(), ((t = (n = c.value) == null ? void 0 : n.google) == null ? void 0 : t.accessToken) === null) {
119
- u.open({
120
- message: p("connect.review.tokenExpired"),
121
- type: "error"
122
- });
123
- return;
124
- }
125
- throw d;
126
- } finally {
127
- a.value = !1;
128
- }
129
- }
130
- async function L() {
131
- const n = _("/review/google/callback"), { callbackUrl: t } = await h.getOauthUrl("google", n);
132
- window.location.href = t;
133
- }
134
- return G(() => {
135
- S(), g.readLocations();
136
- }), (n, t) => (r(), l("div", Z, [
137
- e(c) ? (r(), l(b, { key: 0 }, [
138
- w(Y, {
139
- icon: e(j),
140
- name: "google",
141
- connected: !!e(c).google,
142
- syncing: e(a),
143
- "token-expired": e(v),
144
- onConnect: L,
145
- onSync: I
146
- }, {
147
- default: O(() => {
148
- var d;
149
- return [
150
- (r(!0), l(b, null, C((d = e(c).google) == null ? void 0 : d.locations, (k) => (r(), l("div", {
151
- key: k.googleLocationName,
152
- class: "flex items-center gap-12 px-16 py-12 border-b border-fm-color-neutral-gray-100 last:border-b-0"
153
- }, [
154
- w(e(f).FmIcon, {
155
- name: "location_on",
156
- class: "text-fm-color-neutral-gray-300 shrink-0"
157
- }),
158
- s("div", ee, [
159
- s("span", ne, y(k.displayName), 1),
160
- s("span", oe, y(V(k.locationId)), 1)
161
- ])
162
- ]))), 128))
163
- ];
164
- }),
165
- _: 1
166
- }, 8, ["icon", "connected", "syncing", "token-expired"]),
167
- m("", !0)
168
- ], 64)) : (r(), l(b, { key: 1 }, C(["google", "facebook"], (d) => s("div", {
169
- key: d,
170
- class: "rounded-lg border border-fm-color-neutral-gray-200 bg-white p-16"
171
- }, [...t[0] || (t[0] = [
172
- z('<div class="animate-pulse flex items-center gap-12"><div class="w-10 h-10 rounded-full bg-fm-color-neutral-gray-100 shrink-0"></div><div class="flex-1 min-w-0 space-y-8"><div class="h-16 w-20 rounded bg-fm-color-neutral-gray-100"></div><div class="h-12 w-full max-w-[160px] rounded bg-fm-color-neutral-gray-100"></div></div><div class="h-32 w-24 rounded bg-fm-color-neutral-gray-100 shrink-0"></div></div>', 1)
173
- ])])), 64))
174
- ]));
175
- }
176
- });
177
- export {
178
- me as default
179
- };
@@ -1,142 +0,0 @@
1
- import { defineComponent as N, ref as U, computed as w, watch as M, resolveComponent as v, openBlock as a, createElementBlock as i, Fragment as p, toDisplayString as F, createCommentVNode as T, createElementVNode as j, createVNode as h, unref as n, renderList as S, createBlock as k, isRef as $, withCtx as C } from "vue";
2
- import { u as q } from "./business-C0Ej4JRP.js";
3
- import { u as D } from "./vue-i18n-BJWf_QrH.js";
4
- function K(l, s, o) {
5
- return l.some(
6
- o instanceof Function ? o : (u) => u === s
7
- ) || l.push(s), l;
8
- }
9
- function O(l, s, o) {
10
- return l.filter(
11
- o instanceof Function ? (u) => !o(u) : (u) => u !== s
12
- );
13
- }
14
- const R = {
15
- key: 0,
16
- class: "fm-typo-en-body-lg-400"
17
- }, z = {
18
- key: 1,
19
- class: "space-y-4"
20
- }, A = { key: 0 }, G = { key: 1 }, H = { key: 2 }, W = /* @__PURE__ */ N({
21
- __name: "TargetLocationInput",
22
- props: {
23
- label: {
24
- type: String
25
- },
26
- type: {
27
- type: String,
28
- default: "select"
29
- },
30
- modelValue: {
31
- type: Object,
32
- required: !0
33
- }
34
- },
35
- emits: ["update:model-value"],
36
- setup(l, { emit: s }) {
37
- const o = q(), { t: u } = D(), c = l, r = U(""), B = w(() => o.locations.filter(
38
- (d) => {
39
- var t;
40
- return d.name.toLowerCase().includes(r.value.toLowerCase()) || ((t = d == null ? void 0 : d.code) == null ? void 0 : t.toLowerCase().includes(r.value.toLowerCase()));
41
- }
42
- )), b = s;
43
- function L(d, t) {
44
- const m = d ? K(c.modelValue || [], t.toString()) : O(
45
- c.modelValue || o.locations.map((g) => g._id.toString()),
46
- t.toString()
47
- );
48
- return b("update:model-value", m);
49
- }
50
- const V = U(!1), I = w(() => {
51
- var m, g;
52
- const t = ((m = c.modelValue) == null ? void 0 : m.slice(0, 5).map((f) => {
53
- var y;
54
- return ((y = o.locationById(f)) == null ? void 0 : y.name) || f;
55
- })) || [];
56
- return c.modelValue && ((g = c.modelValue) == null ? void 0 : g.length) > 5 && t.push(`+${c.modelValue.length - 5} more`), t;
57
- });
58
- return M(V, (d) => {
59
- d && (r.value = "");
60
- }), (d, t) => {
61
- const m = v("FmCheckbox"), g = v("FmChip"), f = v("FmField"), y = v("FmTextField"), E = v("FmMenu");
62
- return a(), i(p, null, [
63
- l.label ? (a(), i("div", R, F(l.label), 1)) : T("", !0),
64
- l.type === "checkbox" ? (a(), i("div", z, [
65
- j("div", null, [
66
- h(m, {
67
- value: null,
68
- indeterminate: l.modelValue != null && l.modelValue.length > 0 && l.modelValue.length < n(o).locations.length,
69
- label: n(u)("connect.setting.location.allLocations"),
70
- "model-value": l.modelValue == null || l.modelValue.length === n(o).locations.length,
71
- "onUpdate:modelValue": t[0] || (t[0] = (e) => b("update:model-value", e ? null : []))
72
- }, null, 8, ["indeterminate", "label", "model-value"])
73
- ]),
74
- (a(!0), i(p, null, S(n(o).locations, (e) => (a(), i("div", {
75
- key: e._id.toString()
76
- }, [
77
- h(m, {
78
- value: e._id.toString(),
79
- label: `${e.code ? `${e.code} - ` : ""} ${e.name}`,
80
- "model-value": !l.modelValue || l.modelValue.includes(e._id.toString()),
81
- "onUpdate:modelValue": (x) => L(x, e._id.toString())
82
- }, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"])
83
- ]))), 128))
84
- ])) : (a(), k(E, {
85
- key: 2,
86
- modelValue: n(V),
87
- "onUpdate:modelValue": t[3] || (t[3] = (e) => $(V) ? V.value = e : null),
88
- onMenuChanged: t[4] || (t[4] = (e) => V.value = e),
89
- placement: "top-end"
90
- }, {
91
- "menu-button": C(() => [
92
- h(f, {
93
- "append-icon": n(V) ? "expand_more" : "expand_less",
94
- class: "!h-auto"
95
- }, {
96
- default: C(() => [
97
- !l.modelValue || l.modelValue.length == n(o).locations.length ? (a(), i("div", A, F(n(u)("connect.setting.location.allLocations")), 1)) : l.modelValue.length ? (a(), i("div", H, [
98
- (a(!0), i(p, null, S(n(I), (e) => (a(), k(g, {
99
- key: e,
100
- label: e,
101
- class: "max-w-[130px] text-ellipsis"
102
- }, null, 8, ["label"]))), 128))
103
- ])) : (a(), i("div", G, F(n(u)("connect.setting.location.noLocations")), 1))
104
- ]),
105
- _: 1
106
- }, 8, ["append-icon"])
107
- ]),
108
- default: C(() => [
109
- h(y, {
110
- modelValue: n(r),
111
- "onUpdate:modelValue": t[1] || (t[1] = (e) => $(r) ? r.value = e : null),
112
- placeholder: n(u)("connect.setting.location.searchLocations"),
113
- class: "my-8"
114
- }, null, 8, ["modelValue", "placeholder"]),
115
- h(m, {
116
- class: "my-8",
117
- value: null,
118
- indeterminate: l.modelValue != null && l.modelValue.length > 0 && l.modelValue.length < n(o).locations.length,
119
- label: n(u)("connect.setting.location.allLocations"),
120
- "model-value": l.modelValue == null || l.modelValue.length === n(o).locations.length,
121
- "onUpdate:modelValue": t[2] || (t[2] = (e) => b("update:model-value", e ? null : []))
122
- }, null, 8, ["indeterminate", "label", "model-value"]),
123
- (a(!0), i(p, null, S(n(B), (e) => (a(), k(m, {
124
- class: "my-8",
125
- key: e._id.toString(),
126
- value: e._id.toString(),
127
- label: `${e.code ? `${e.code} - ` : ""} ${e.name}`,
128
- "model-value": !l.modelValue || l.modelValue.includes(e._id.toString()),
129
- "onUpdate:modelValue": (x) => L(x, e._id.toString())
130
- }, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
131
- ]),
132
- _: 1
133
- }, 8, ["modelValue"]))
134
- ], 64);
135
- };
136
- }
137
- });
138
- export {
139
- W as _,
140
- K as p,
141
- O as r
142
- };
@@ -1,82 +0,0 @@
1
- import { ref as i, computed as u } from "vue";
2
- import { defineStore as w } from "pinia";
3
- import { useCoreStore as y } from "@feedmepos/mf-common";
4
- import { d as I, g as r, A as b, S, b as D } from "./index-DXV_Kdhp.js";
5
- const $ = {
6
- async readSettings(e) {
7
- try {
8
- return r(await I(`marketing-v2/${e}/setting`).get(""));
9
- } catch (t) {
10
- if (console.error(JSON.stringify(t)), t instanceof b)
11
- return {
12
- _id: e,
13
- business: e,
14
- apiVersion: "v1"
15
- };
16
- throw t;
17
- }
18
- }
19
- }, o = () => {
20
- const e = S.getBusinessId();
21
- if (!e) throw new Error("Invalid business ID");
22
- return D(`businesses/${e}/location`, {
23
- noIdRequired: !0
24
- });
25
- }, l = {
26
- async read() {
27
- return r(await o().get(""));
28
- },
29
- async readDevices() {
30
- return r(await o().get("devices"));
31
- },
32
- async unregisterDevice(e) {
33
- await r(await o().delete(`devices/${e}`));
34
- },
35
- async getOtp(e) {
36
- return r(await o().post(`${e}/otp`));
37
- }
38
- }, h = w("mf-connect-business", () => {
39
- const e = i("v2"), t = i(!1), a = i([]), c = i([]);
40
- async function d() {
41
- const n = y().currentBusiness.value, s = await $.readSettings(n == null ? void 0 : n.id);
42
- return t.value = s && "business" in s && s.premium == !0 || !1, e.value = (s == null ? void 0 : s.apiVersion) || "v1", t.value;
43
- }
44
- async function v() {
45
- return a.value = await l.read(), a.value;
46
- }
47
- async function p() {
48
- return c.value = await l.readDevices(), c.value;
49
- }
50
- function m(n) {
51
- return a.value.find((s) => s._id === n);
52
- }
53
- const f = u(() => [
54
- { label: "All", value: null },
55
- ...a.value.map((n) => ({
56
- label: n.name,
57
- value: n._id
58
- }))
59
- ]), g = u(() => a.value.map((n) => ({
60
- label: `${n.code ? `${n.code} - ` : ""} ${n.name}`,
61
- value: n._id
62
- })));
63
- return {
64
- // state
65
- version: e,
66
- isPremium: t,
67
- locations: a,
68
- locationDevices: c,
69
- // actions
70
- readPremium: d,
71
- readLocations: v,
72
- readLocationDevices: p,
73
- locationById: m,
74
- // getters
75
- locationItems: f,
76
- locationOptions: g
77
- };
78
- });
79
- export {
80
- l,
81
- h as u
82
- };