@feedmepos/mf-connect 0.1.116-dev → 0.1.117-prod

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 (154) hide show
  1. package/README.md +1 -66
  2. package/dist/{App-DWDgsBqW.js → App-CAo1izHr.js} +618 -652
  3. package/dist/{Bin-Cz6fmewG.js → Bin-DDDfjisJ.js} +8 -8
  4. package/dist/{Broadcast-CQ0pfKpx.js → Broadcast-BsCulZhE.js} +21 -22
  5. package/dist/{CampaignAnalytic-CiRCB3kh.js → CampaignAnalytic-CnVYFSkT.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bp7UeQWJ.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-ZTHyZ_0y.js} +9 -9
  7. package/dist/{Card-Kw2PFL2m.js → Card-DPyQH9qZ.js} +24 -25
  8. package/dist/{Collections-D8Vx_EEH.js → Collections-CZCVA969.js} +185 -197
  9. package/dist/{Credit-B1jsQ5zg.js → Credit-BTg364-i.js} +20 -21
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-B6Fpf8zy.js → DateRangeChip.vue_vue_type_script_setup_true_lang-BJx8K6Ja.js} +1 -1
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Ijya9Cho.js +3494 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Cdpr9Ku4.js → EffectSheet.vue_vue_type_style_index_0_lang-CfEnSXzg.js} +32 -32
  13. package/dist/{Experience-B0JIA3sL.js → Experience-Bk_eUcSX.js} +31 -32
  14. package/dist/{FileSaver.min-M-9kTN8q.js → FileSaver.min-CXFiZAp7.js} +1 -1
  15. package/dist/{Game-CNJyqnK3.js → Game-CBnKpFdl.js} +18 -19
  16. package/dist/{GiftCardSetup-DSQIC7fD.js → GiftCardSetup-q75wNV_F.js} +75 -75
  17. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-ABiLOF1j.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-Cga0Th2O.js} +7 -7
  18. package/dist/{Goals-DBPzGIRK.js → Goals-Bbbgurfd.js} +4 -4
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-B2edB52s.js → ImageInput.vue_vue_type_script_setup_true_lang-CZS05h1r.js} +1 -1
  20. package/dist/{Index-CiWyZXnK.js → Index-C8_OWllb.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DnP03_b7.js → LocationPicker.vue_vue_type_script_setup_true_lang-BlCg-jI7.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DM17LaNE.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CACxChIo.js} +1 -1
  23. package/dist/{LoyaltyDashboard-C4ZlK9Hv.js → LoyaltyDashboard-DJlE0371.js} +15 -15
  24. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-CJncINki.js → MainLayout-Bs2UPvFx.js} +4 -5
  25. package/dist/Marketing-BvRYzFV8.js +236 -0
  26. package/dist/{remy-icon-BhUGu2NI.js → MarketingMaterialEdit-o88sdvTM.js} +1031 -2
  27. package/dist/{Member-B-l5P9jk.js → Member-C4yqwsMH.js} +7 -7
  28. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-C_ZjHH4I.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-BbumjyC_.js} +50 -43
  29. package/dist/{MemberImportHistory-BJcu-ahG.js → MemberImportHistory-CbuXCdxC.js} +7 -7
  30. package/dist/{MemberList-DVsWNWIc.js → MemberList-CpAepPBe.js} +105 -103
  31. package/dist/{MemberTransactions-C2VPySEO.js → MemberTransactions-BbpXvsSk.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BXqrn9tg.js → MessageInput.vue_vue_type_script_setup_true_lang-BaWgxbad.js} +14 -14
  33. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BouFp66T.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CEgMElLo.js} +1 -1
  34. package/dist/{Mission-DWO-IF0f.js → Mission-Bdb9KVeP.js} +21 -22
  35. package/dist/{Overview-DPcWm2S0.js → Overview-CEiyGMcf.js} +22 -23
  36. package/dist/{Overview-Dbp4Sv-H.js → Overview-D_9JwnFU.js} +144 -145
  37. package/dist/{Point-PnWrzVOY.js → Point-Bd5cMXQx.js} +21 -22
  38. package/dist/{Promotion-Bwpi60dN.js → Promotion-D9gZDvgR.js} +131 -137
  39. package/dist/{Queue-BvEcKyVJ.js → Queue-BnAOL_rp.js} +45 -46
  40. package/dist/{Record-DzNvU2fM.js → Record-D6TWFKe0.js} +9 -9
  41. package/dist/{Review-HDYwnMd6.js → Review-DLEgvnc-.js} +2 -2
  42. package/dist/ReviewFacebookCallback-jVlm2O8f.js +238 -0
  43. package/dist/{ReviewGoogleCallback-6V9JNKsl.js → ReviewGoogleCallback-BgAbO3pI.js} +5 -5
  44. package/dist/{Reward-DI6IyG-d.js → Reward-DBheQiFu.js} +29 -29
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DFAIPMe7.js → RewardGroup.vue_vue_type_script_setup_true_lang-Bt-EqsiH.js} +15 -16
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CKL8MEld.js +1883 -0
  47. package/dist/{Segment-DrV6pQyx.js → Segment-B9Se5FFw.js} +305 -304
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CXHt_ZeT.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-f7AS5vwv.js} +30 -31
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-XRXkLy6j.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-3BKA0UFI.js} +4 -4
  50. package/dist/Setting-B92JT_Y4.js +2037 -0
  51. package/dist/{SettingAdvertisements-BtqKt4Ca.js → SettingAdvertisements-CLw-dqiA.js} +12 -12
  52. package/dist/Settings-BmmM8ZnR.js +179 -0
  53. package/dist/{Store-HZs9GG03.js → Store-B5PPP5zM.js} +30 -31
  54. package/dist/{StoreRewards-BSTXL4FR.js → StoreRewards-DllyaVBY.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-3Vvqf6_H.js +1264 -0
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-7ZZ0e5tQ.js +142 -0
  57. package/dist/{Tier-Ka0rbjC_.js → Tier-M_TApfju.js} +687 -2576
  58. package/dist/{Title-7jvrf34J.js → Title-Cpltm-I2.js} +92 -94
  59. package/dist/{Transaction-D-M3udf5.js → Transaction-BYfAYRpv.js} +2 -2
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CrlpuElX.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BOhfGxVj.js} +26 -26
  61. package/dist/{Voucher-BZCLPyDk.js → Voucher-DHoyg0YZ.js} +19 -19
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-C_MOMFkX.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DWHwM6AJ.js} +16 -16
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Do4GTTKx.js → ZodTextField.vue_vue_type_script_setup_true_lang-B6tTjLAZ.js} +2 -2
  64. package/dist/{app-CEe3kSZM.js → app-B_doYklh.js} +7107 -8879
  65. package/dist/app.js +3 -4
  66. package/dist/{base.export-BjSdr85q.js → base.export-DmbnT_bp.js} +2 -2
  67. package/dist/{business-CJjiItSo.js → business-DdVGtTvx.js} +1 -1
  68. package/dist/{campaign-DEXq52fE.js → campaign-CVkA08zl.js} +25 -31
  69. package/dist/{campaign-D4MWLs1D.js → campaign-jEhKmpKg.js} +94 -121
  70. package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-DWu6-kOo.js} +2 -3
  71. package/dist/{campaign.fn-DiadKjES.js → campaign.fn-BlgEyeFz.js} +82 -82
  72. package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-CVLkXKml.js} +1 -1
  73. package/dist/{collection.fn-CfqIdnSS.js → collection.fn-DLNGTrPf.js} +2 -2
  74. package/dist/{currency-CPB6E_s-.js → currency-DKS1md4e.js} +1 -1
  75. package/dist/{effect-DFodA5mh.js → effect-Bk-zYexf.js} +1 -1
  76. package/dist/{email-addresses-C0CwgNs_.js → email-addresses-I9A5iLzf.js} +2 -2
  77. package/dist/{feature-flag-Bap2oi_S.js → feature-flag-DQti61iR.js} +74 -74
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-DKKsSb2o.js → helper-9cPlo6ae.js} +1 -1
  80. package/dist/{index-CJGb1iJi.js → index-1Cdj34z1.js} +1 -1
  81. package/dist/{index-CtwPthW5.js → index-3V8E9GaZ.js} +2 -2
  82. package/dist/{index-CfqmNZUH.js → index-728mP6kW.js} +581 -683
  83. package/dist/{index-DDmpyI6z.js → index-BRm0LMTo.js} +252 -611
  84. package/dist/{index-qAQiQd-s.js → index-BxpbI0GH.js} +7 -7
  85. package/dist/{index-DFV2ydYE.js → index-C-OnJpT8.js} +1 -1
  86. package/dist/{index-D5veZ8LP.js → index-CIwdXphn.js} +2613 -2700
  87. package/dist/{index-DxmlvoHV.js → index-CNUXbXvG.js} +6 -19
  88. package/dist/{index-RUdMURTx.js → index-Cj6oxbl0.js} +10 -11
  89. package/dist/{index-CXqPYmyv.js → index-ClYX4COd.js} +3 -4
  90. package/dist/{index-CEFEuMOF.js → index-CuyzSc1l.js} +1 -1
  91. package/dist/{index-BS6725ZB.js → index-DOE2VR99.js} +198 -198
  92. package/dist/{index-C_4eW8Sr.js → index-DWkuIfHy.js} +232 -390
  93. package/dist/{index-BdGo-qgB.js → index-Dj51vqab.js} +4 -4
  94. package/dist/{index-DRnUcSVN.js → index-DuvnRxeo.js} +1 -1
  95. package/dist/{index-BJCirs9i.js → index-cgtAlOl9.js} +10767 -8028
  96. package/dist/{index-BWsGYTzB.js → index-fHiFL1dW.js} +15 -29
  97. package/dist/{index-CFZMwKR6.js → index-oNMFyOGe.js} +7 -8
  98. package/dist/{index-4LQanFJi.js → index-vKvGJ4Ve.js} +2 -2
  99. package/dist/{index.esm2017-i1myv90H.js → index.esm2017-CsF37oA-.js} +177 -177
  100. package/dist/{loading-BAFiJnEb.js → loading-BJJmTFoe.js} +1 -1
  101. package/dist/{lodash-De2KDgqX.js → lodash-BMJ6_hsa.js} +1 -1
  102. package/dist/{member-import-BP4RZGbA.js → member-import-DrGxVJt9.js} +5 -6
  103. package/dist/{membership-CQWw-rTa.js → membership-CAqKihwy.js} +3 -3
  104. package/dist/{money-rwjWYzdi.js → money-Bf9d2ZUH.js} +1 -1
  105. package/dist/{number-DwSvkBpS.js → number-CWXlGZa5.js} +1 -1
  106. package/dist/objectid-2DN5a9sY.js +145 -0
  107. package/dist/{onboarding-u7cpl6k3.js → onboarding-Dn9O7r3a.js} +25 -25
  108. package/dist/{onboardingSetup-DoxDlcVN.js → onboardingSetup-BMkDoGy-.js} +2 -2
  109. package/dist/{plugins-CKaeoHSK.js → plugins-KDgceFWV.js} +3 -3
  110. package/dist/{reward-BasbGRWt.js → reward-eilGRaXi.js} +1 -1
  111. package/dist/{rule-IN41b-qE.js → rule-Dr9Zjg_o.js} +492 -572
  112. package/dist/rule-builder-cz6Dy-no.js +102 -0
  113. package/dist/style.css +1 -1
  114. package/dist/template-DwbazO8p.js +236 -0
  115. package/dist/{timezone-C68y8HiI.js → timezone-C5CIfvHs.js} +1 -1
  116. package/dist/{transaction.fn-Ckxm2gof.js → transaction.fn-Cr-FLjh0.js} +2 -2
  117. package/dist/{trigger-xA8j3s9B.js → trigger-B0Fv6wbN.js} +8 -8
  118. package/dist/useMarketingMaterialActions-CNk3LR9M.js +96 -0
  119. package/dist/{usePagination-CIRxyVr8.js → usePagination-BcA-imTr.js} +1 -1
  120. package/dist/{user-PTTQTMyQ.js → user-DRvLwlBE.js} +1 -1
  121. package/dist/vue-i18n-y7bHQpNx.js +2365 -0
  122. package/dist/{xlsx-l0AsOrP1.js → xlsx-CBObn76o.js} +379 -379
  123. package/dist/{zod-Bm1pKYLC.js → zod-DWU5EdQV.js} +1 -1
  124. package/package.json +2 -6
  125. package/dist/AuditLogs-BqEtvKFs.js +0 -2016
  126. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BW1RntIP.js +0 -4442
  127. package/dist/Grab-CGWinKBS.js +0 -301
  128. package/dist/MainLayout-D22Q2_jN.js +0 -4
  129. package/dist/Marketing-CmVnvEN6.js +0 -269
  130. package/dist/MarketingMaterialEdit-CQ55zG-W.js +0 -1037
  131. package/dist/ReviewFacebookCallback-rAlgcTQ_.js +0 -225
  132. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CDoba0oG.js +0 -1923
  133. package/dist/Setting-aLQCUCP9.js +0 -574
  134. package/dist/Settings-BkYtKb4l.js +0 -286
  135. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D9nykzc3.js +0 -1319
  136. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DBnHk6jn.js +0 -7007
  137. package/dist/WhatsappAccount-BG0dIroG.js +0 -159
  138. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-Co05OXon.js +0 -39
  139. package/dist/WhatsappBot-O5h5UKXz.js +0 -876
  140. package/dist/WhatsappBotLogs-BOPTuu6o.js +0 -372
  141. package/dist/WhatsappBotSettings-BSiIvpGO.js +0 -705
  142. package/dist/WhatsappLayout-DLVIfkzJ.js +0 -21
  143. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DJdi7dV6.js +0 -253
  144. package/dist/browser-BSAOEeIM.js +0 -1478
  145. package/dist/duplicateCampaign-BzWvsZwc.js +0 -51
  146. package/dist/feature-flag--GbS6Qn_.js +0 -50
  147. package/dist/google-BQK68wbe.js +0 -5
  148. package/dist/index-C-iwb2Ln.js +0 -109
  149. package/dist/index-C1C21iKU.js +0 -74
  150. package/dist/index-C_H8jFYf.js +0 -2743
  151. package/dist/objectid-DtEPzPd_.js +0 -145
  152. package/dist/template-3Nu_MAMG.js +0 -188
  153. package/dist/useMarketingMaterialActions-ClYoBaFw.js +0 -125
  154. package/dist/vue-i18n-DYnrLWFT.js +0 -2365
@@ -1,574 +0,0 @@
1
- import { defineComponent as J, ref as k, computed as E, onMounted as de, resolveComponent as u, openBlock as f, createBlock as B, withCtx as $, createElementVNode as t, createVNode as c, unref as e, isRef as Z, watch as ke, createElementBlock as V, toDisplayString as i, Fragment as R, renderList as G, createTextVNode as T, createCommentVNode as z } from "vue";
2
- import { h as Ue } from "./moment-D7p2TMB-.js";
3
- import { Z as ce } from "./zod-Bm1pKYLC.js";
4
- import { useDialog as me } from "@feedmepos/ui-library";
5
- import { u as Fe } from "./loading-BAFiJnEb.js";
6
- import { u as Ae } from "./app-wDQR6dpb.js";
7
- import { u as K, l as ue } from "./business-CJjiItSo.js";
8
- import { u as pe } from "./membership-CQWw-rTa.js";
9
- import { P as Q } from "./index-BJCirs9i.js";
10
- import { m as Pe, b as Se } from "./index-C_4eW8Sr.js";
11
- import { _ as $e } from "./ImageInput.vue_vue_type_script_setup_true_lang-B2edB52s.js";
12
- import { c as fe, p as Me, f as O } from "./plugins-CKaeoHSK.js";
13
- import { b as Le } from "./browser-BSAOEeIM.js";
14
- import { p as De, r as Ie, _ as Ee } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-DBnHk6jn.js";
15
- import { u as ve } from "./vue-i18n-DYnrLWFT.js";
16
- import { M as Te, b as Re } from "./MessageInput.vue_vue_type_script_setup_true_lang-BXqrn9tg.js";
17
- import { useCoreStore as Be } from "@feedmepos/mf-common";
18
- import { useRouter as Ne } from "vue-router";
19
- import { R as He } from "./app-CEe3kSZM.js";
20
- import { m as W } from "./index-DxmlvoHV.js";
21
- import { S as re } from "./index-qAQiQd-s.js";
22
- import { o as Oe } from "./objectId-dwaoBfJX.js";
23
- import { a as je } from "./object-BYyQ0PZp.js";
24
- async function qe(v, x = 350) {
25
- try {
26
- return await Le.toDataURL(v, {
27
- width: x,
28
- margin: 0
29
- });
30
- } catch (g) {
31
- console.error(g);
32
- }
33
- }
34
- var Xe = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
35
- const ze = { class: "flex items-start" }, Qe = { class: "flex flex-col gap-16 mt-16" }, We = ["src"], Ye = /* @__PURE__ */ J({
36
- __name: "LinkDeviceDialog",
37
- setup(v) {
38
- const x = K(), g = pe(), h = me(), p = k(), y = k(), U = Xe.crmUrl, b = k(), D = E(() => g.membership), o = E(() => {
39
- var d, a;
40
- return `https://${(d = D.value) != null && d.url ? D.value.url : (a = D.value) == null ? void 0 : a.business}.${U}`;
41
- });
42
- async function F(d) {
43
- const a = await ue.getOtp(d);
44
- return `${o.value}?link-device=${a.otp}`;
45
- }
46
- async function A(d) {
47
- const a = await F(d);
48
- b.value = a, p.value = await qe(a);
49
- }
50
- return de(async () => {
51
- if (await x.readLocations(), !x.locations.length) {
52
- h.close();
53
- return;
54
- }
55
- const d = x.locations[0]._id;
56
- y.value = d, await A(d);
57
- }), (d, a) => {
58
- const _ = u("FmIcon"), P = u("FmSelect"), w = u("FmButton"), n = u("FmCard");
59
- return f(), B(n, { class: "p-24 max-w-[350px]" }, {
60
- default: $(() => [
61
- t("div", ze, [
62
- a[3] || (a[3] = t("div", null, [
63
- t("div", { class: "fm-typo-en-title-sm-800" }, "Link device"),
64
- t("div", { class: "fm-typo-en-body-sm-400" }, " Open your camera on your device to link counter app. ")
65
- ], -1)),
66
- c(_, {
67
- name: "close",
68
- onClick: a[0] || (a[0] = (S) => e(h).close()),
69
- class: "cursor-pointer"
70
- })
71
- ]),
72
- t("div", Qe, [
73
- c(P, {
74
- modelValue: e(y),
75
- "onUpdate:modelValue": [
76
- a[1] || (a[1] = (S) => Z(y) ? y.value = S : null),
77
- A
78
- ],
79
- label: "Select Location",
80
- items: e(x).locationItems.filter((S) => !!S.value)
81
- }, null, 8, ["modelValue", "items"]),
82
- t("img", {
83
- src: e(p),
84
- class: "aspect-square w-full"
85
- }, null, 8, We),
86
- c(w, {
87
- class: "mx-auto",
88
- variant: "plain",
89
- icon: "content_copy",
90
- onClick: a[2] || (a[2] = (S) => e(fe)(e(b)))
91
- })
92
- ])
93
- ]),
94
- _: 1
95
- });
96
- };
97
- }
98
- }), Ze = { class: "space-y-4" }, Ge = { key: 0 }, Ke = { key: 1 }, Je = { key: 2 }, et = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, tt = /* @__PURE__ */ J({
99
- __name: "AllowedPhoneCountriesSelect",
100
- props: {
101
- modelValue: {}
102
- },
103
- emits: ["update:modelValue"],
104
- setup(v, { emit: x }) {
105
- const { t: g } = ve(), h = v, p = x, y = [...new Set(Q.map((d) => d.phoneCode))], U = k(""), b = k(!1), D = E(() => {
106
- const d = U.value.toLowerCase();
107
- return Q.filter(
108
- (a) => a.name.toLowerCase().includes(d) || a.phoneCode.toLowerCase().includes(d)
109
- );
110
- });
111
- function o(d, a) {
112
- const _ = d ? De([...h.modelValue || []], a) : Ie(h.modelValue || y, a);
113
- p("update:modelValue", _);
114
- }
115
- const F = E(() => {
116
- var _;
117
- const a = ((_ = h.modelValue) == null ? void 0 : _.slice(0, 5).map(
118
- (P) => {
119
- var w;
120
- return ((w = Q.find((n) => n.phoneCode === P)) == null ? void 0 : w.name) || P;
121
- }
122
- )) || [];
123
- return h.modelValue && h.modelValue.length > 5 && a.push(`+${h.modelValue.length - 5} more`), a;
124
- }), A = E(() => {
125
- const d = h.modelValue;
126
- return Array.isArray(d) && d.length === 0 ? g("connect.setting.allowedPhoneCountries.helper.noneAllowed") : d == null ? g("connect.setting.allowedPhoneCountries.helper.allAllowed") : g("connect.setting.allowedPhoneCountries.helper.selectedOnly");
127
- });
128
- return ke(b, (d) => {
129
- d && (U.value = "");
130
- }), (d, a) => {
131
- const _ = u("FmChip"), P = u("FmField"), w = u("FmTextField"), n = u("FmCheckbox"), S = u("FmMenu");
132
- return f(), V("div", Ze, [
133
- c(S, {
134
- modelValue: e(b),
135
- "onUpdate:modelValue": a[2] || (a[2] = (m) => Z(b) ? b.value = m : null),
136
- onMenuChanged: a[3] || (a[3] = (m) => b.value = m),
137
- placement: "top-end"
138
- }, {
139
- "menu-button": $(() => [
140
- c(P, {
141
- "append-icon": e(b) ? "expand_more" : "expand_less",
142
- class: "!h-auto"
143
- }, {
144
- default: $(() => [
145
- v.modelValue ? v.modelValue.length ? (f(), V("div", Je, [
146
- (f(!0), V(R, null, G(e(F), (m, I) => (f(), B(_, {
147
- key: I,
148
- label: m,
149
- class: "max-w-[130px] text-ellipsis"
150
- }, null, 8, ["label"]))), 128))
151
- ])) : (f(), V("div", Ke, i(e(g)("connect.setting.allowedPhoneCountries.noCountries")), 1)) : (f(), V("div", Ge, i(e(g)("connect.setting.allowedPhoneCountries.allCountries")), 1))
152
- ]),
153
- _: 1
154
- }, 8, ["append-icon"])
155
- ]),
156
- default: $(() => [
157
- c(w, {
158
- modelValue: e(U),
159
- "onUpdate:modelValue": a[0] || (a[0] = (m) => Z(U) ? U.value = m : null),
160
- placeholder: e(g)("connect.setting.allowedPhoneCountries.searchCountries"),
161
- class: "my-8"
162
- }, null, 8, ["modelValue", "placeholder"]),
163
- c(n, {
164
- class: "my-8",
165
- value: null,
166
- indeterminate: v.modelValue != null && v.modelValue.length > 0 && v.modelValue.length < y.length,
167
- label: e(g)("connect.setting.allowedPhoneCountries.allCountries"),
168
- "model-value": v.modelValue == null || v.modelValue.length === y.length,
169
- "onUpdate:modelValue": a[1] || (a[1] = (m) => p("update:modelValue", m ? null : []))
170
- }, null, 8, ["indeterminate", "label", "model-value"]),
171
- (f(!0), V(R, null, G(e(D), (m) => (f(), B(n, {
172
- class: "my-8",
173
- key: m.iso2,
174
- value: m.phoneCode,
175
- label: `${m.name} (${m.phoneCode})`,
176
- "model-value": !v.modelValue || v.modelValue.includes(m.phoneCode),
177
- "onUpdate:modelValue": (I) => o(I, m.phoneCode)
178
- }, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
179
- ]),
180
- _: 1
181
- }, 8, ["modelValue"]),
182
- t("div", et, i(e(A)), 1)
183
- ]);
184
- };
185
- }
186
- });
187
- var Y = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
188
- const nt = { class: "hidden xs:!flex items-center justify-between px-16 py-12 border-b border-fm-color-neutral-gray-100" }, ot = { class: "fm-typo-en-title-md-800" }, lt = {
189
- key: 0,
190
- class: "px-24 gap-32 grid grid-cols-3 xs:pt-16"
191
- }, st = { class: "col-span-2 flex flex-col xs:col-span-3 space-y-8" }, at = { class: "fm-typo-en-title-sm-800" }, it = { class: "space-y-24" }, ct = { class: "space-y-8" }, rt = { class: "fm-typo-en-title-sm-800" }, dt = { class: "fm-typo-body-lg-400" }, mt = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, ut = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, pt = { class: "space-y-8" }, ft = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, vt = { class: "fm-typo-en-body-lg-600" }, gt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, yt = { class: "space-y-8" }, ht = { class: "space-y-8" }, bt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _t = { class: "space-y-8" }, wt = { class: "fm-typo-en-title-sm-800" }, Ct = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, xt = { class: "space-y-8" }, Vt = { class: "fm-typo-en-title-sm-800" }, kt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-error" }, Ut = { class: "space-y-8" }, Ft = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, At = { class: "space-y-8" }, Pt = { class: "space-y-8" }, St = { class: "fm-typo-en-title-sm-800" }, $t = { class: "space-y-8" }, Mt = { class: "fm-typo-en-title-sm-800" }, Lt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Dt = { class: "flex justify-end pb-24" }, It = { class: "col-span-1 space-y-8 xs:hidden" }, Et = { class: "fm-typo-en-body-lg-600" }, Tt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Rt = { class: "fm-typo-en-body-lg-600" }, Bt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Nt = { class: "fm-typo-en-body-lg-600" }, Ht = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ot = { class: "fm-typo-en-body-lg-600" }, jt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, qt = { class: "fm-typo-en-body-lg-600" }, vn = /* @__PURE__ */ J({
192
- __name: "Setting",
193
- setup(v) {
194
- const x = Ne(), g = Ae(), h = Be(), p = K(), y = pe(), { global: U, minor: b } = Fe, D = me(), o = k(), F = k([]), A = k(null), d = Pe, a = [
195
- (r) => !r || r.length >= 6 || "Invalid URL format, please enter at least 6 characters",
196
- (r) => !r || new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/).test(r) || "Invalid URL format, url should start with a letter or number and can only include lowercase letters, numbers, or hyphens"
197
- ], _ = Y.appUrl, P = E(() => {
198
- var r;
199
- return `https://${(r = o.value) == null ? void 0 : r.business}.${_}/user?join=true`;
200
- }), w = k(), { t: n } = ve(), S = h.currentCountry.value || "MY", m = [
201
- "user.name",
202
- "user.gender",
203
- "user.birthday",
204
- "user.phoneNumber",
205
- "membership.url"
206
- ].filter(
207
- (r) => {
208
- var l;
209
- return !((l = Te[S]) != null && l.includes(r));
210
- }
211
- ), I = k(
212
- n("connect.setting.sms.welcomeMessage")
213
- );
214
- async function ge() {
215
- D.open({
216
- title: "",
217
- dialogComponent: Ye,
218
- closeButton: !1
219
- });
220
- }
221
- async function ye(r) {
222
- await Me.remove(
223
- "Are you sure you want to unlink this device?",
224
- "Unlink device",
225
- "Unlink"
226
- ) && await b(
227
- async () => {
228
- await ue.unregisterDevice(r), await p.readLocationDevices();
229
- },
230
- {
231
- message: "Unlinking device",
232
- successMessage: "Unlinked device successfully"
233
- }
234
- );
235
- }
236
- async function he() {
237
- await b(
238
- async () => {
239
- var N;
240
- const r = je(o.value);
241
- console.log(o.value), r.welcomeMessage && !((N = r.welcomeMessage) != null && N.content) && (r.welcomeMessage.content = "Hi there, you have been invited to join our membership");
242
- const l = Se.parse(r);
243
- w.value === null && l.image ? await O.delete(O.coverImagePath()) : w.value && (l.image = await O.update(
244
- O.coverImagePath(),
245
- w.value
246
- )), await W.update(l), await y.readMembership(), o.value = y.membership;
247
- },
248
- {
249
- message: "Updating membership",
250
- successMessage: "Membership updated successfully"
251
- }
252
- );
253
- }
254
- async function be() {
255
- const r = await W.getEmailAddresses();
256
- console.log(r), F.value = r, A.value = r.find((l) => l.default.includes("Marketing"));
257
- }
258
- async function _e() {
259
- window.open(
260
- `${Y.licensePortalUrl}business/${re.businessId}/settings`,
261
- "_blank"
262
- );
263
- }
264
- async function we() {
265
- const r = `${Y.licensePortalUrl}settings?businessId=${re.businessId}`;
266
- console.log("Opening", r), window.open(r, "_blank");
267
- }
268
- return de(async () => {
269
- await U(async () => {
270
- await p.readPremium(), await p.readLocations(), await p.readLocationDevices(), await y.readMembership(), await be(), o.value = y.membership;
271
- try {
272
- const { content: r } = await W.getDefaultWelcomeMessage();
273
- r && (I.value = r);
274
- } catch (r) {
275
- console.error("Failed to load default welcome message", r);
276
- }
277
- });
278
- }), (r, l) => {
279
- var te, ne, oe, le, se, ae, ie;
280
- const N = u("FmPageHead"), M = u("FmButton"), H = u("FmTextField"), j = u("FmCard"), ee = u("FmPill"), Ce = u("FmSelect"), q = u("FmSwitch"), xe = u("FmMenuDivider");
281
- return f(), V(R, null, [
282
- c(N, {
283
- title: e(n)("connect.setting.title"),
284
- class: "xs:hidden"
285
- }, null, 8, ["title"]),
286
- t("div", nt, [
287
- t("div", ot, i(e(n)("connect.setting.basicInfo.title")), 1),
288
- c(M, {
289
- icon: "info",
290
- variant: "tertiary"
291
- })
292
- ]),
293
- e(o) ? (f(), V("div", lt, [
294
- t("div", st, [
295
- t("div", at, i(e(n)("connect.setting.basicInfo.title")), 1),
296
- t("div", it, [
297
- c(H, {
298
- label: e(n)("connect.setting.basicInfo.membershipTitle"),
299
- modelValue: e(o).name,
300
- "onUpdate:modelValue": l[0] || (l[0] = (s) => e(o).name = s)
301
- }, null, 8, ["label", "modelValue"]),
302
- c(H, {
303
- disabled: !0,
304
- "model-value": e(o).business,
305
- rules: a,
306
- required: !0,
307
- label: e(n)("connect.setting.basicInfo.memberAppUrl"),
308
- "helper-text": e(P),
309
- placeholder: e(o).business.toString(),
310
- "onUpdate:modelValue": l[2] || (l[2] = (s) => e(o).url = s)
311
- }, {
312
- prepend: $(() => [...l[15] || (l[15] = [
313
- T(" https:// ", -1)
314
- ])]),
315
- append: $(() => [
316
- T(" ." + i(e(_)) + " ", 1),
317
- c(M, {
318
- icon: "content_copy",
319
- variant: "tertiary",
320
- onClick: l[1] || (l[1] = (s) => e(fe)(e(P)))
321
- })
322
- ]),
323
- _: 1
324
- }, 8, ["model-value", "label", "helper-text", "placeholder"]),
325
- c($e, {
326
- label: "Cover image",
327
- class: "w-2/3 xs:w-full",
328
- "image-fit": "cover",
329
- "aspect-ratio": "3/1",
330
- thumbnail: e(o).image || void 0,
331
- "onUpdate:file": l[3] || (l[3] = async (s) => {
332
- w.value = s, s || (e(o).image = null);
333
- })
334
- }, null, 8, ["thumbnail"]),
335
- t("div", ct, [
336
- t("div", rt, i(e(n)("connect.setting.counterApp.title")), 1),
337
- c(M, {
338
- variant: "plain",
339
- icon: "link",
340
- label: e(n)("connect.setting.counterApp.linkDevice"),
341
- onClick: ge
342
- }, null, 8, ["label"]),
343
- (f(!0), V(R, null, G(e(p).locationDevices, (s, C) => (f(), B(j, {
344
- key: C,
345
- variant: "outlined",
346
- class: "flex items-center justify-between px-16 py-12"
347
- }, {
348
- default: $(() => [
349
- t("div", null, [
350
- t("p", dt, i(s.name || `Device ${s._id}`), 1),
351
- t("p", mt, i(e(n)("connect.setting.counterApp.device.activationDate")) + " " + i(e(Ue)(e(Oe)(s._id.toString())).format(
352
- "D MMM YYYY"
353
- )), 1),
354
- t("p", ut, i(e(n)("connect.setting.counterApp.device.linkedLocation")) + " " + i(e(p).locations.find((L) => L._id == s.location).name), 1)
355
- ]),
356
- c(M, {
357
- icon: "link_off",
358
- variant: "tertiary",
359
- onClick: (L) => ye(s._id)
360
- }, null, 8, ["onClick"])
361
- ]),
362
- _: 2
363
- }, 1024))), 128))
364
- ]),
365
- t("div", pt, [
366
- t("div", ft, [
367
- T(i(e(n)("connect.setting.advertisement.title")) + " ", 1),
368
- c(ee, { variant: "premium" })
369
- ]),
370
- c(j, {
371
- variant: "outlined",
372
- class: "p-16 flex items-center justify-between"
373
- }, {
374
- default: $(() => {
375
- var s;
376
- return [
377
- t("div", null, [
378
- t("div", vt, i(e(n)("connect.setting.advertisement.manageAd")), 1),
379
- t("div", gt, i(e(n)("connect.setting.advertisement.activeAdsShowing", {
380
- count: ((s = e(o).advertisements) == null ? void 0 : s.length) ?? 0
381
- })), 1)
382
- ]),
383
- c(M, {
384
- label: e(n)("connect.setting.advertisement.manage"),
385
- icon: "arrow_forward",
386
- "icon-position": "right",
387
- disabled: !e(p).isPremium,
388
- onClick: l[4] || (l[4] = (C) => e(x).push({
389
- name: e(He)["$connect-SETTING_ADVERTISEMENTS"]
390
- }))
391
- }, null, 8, ["label", "disabled"])
392
- ];
393
- }),
394
- _: 1
395
- })
396
- ]),
397
- t("div", yt, [
398
- l[16] || (l[16] = t("div", { class: "fm-typo-en-title-sm-800" }, "SMS", -1)),
399
- c(H, {
400
- "model-value": ((te = e(o)) == null ? void 0 : te.brand) || "",
401
- "max-length": 15,
402
- label: e(n)("connect.setting.sms.brandName"),
403
- "show-word-count": "",
404
- "helper-text": e(n)("connect.setting.sms.messageFormat", {
405
- brand: ((ne = e(o)) == null ? void 0 : ne.brand) || ""
406
- }),
407
- "onUpdate:modelValue": l[5] || (l[5] = (s) => e(o).brand = s)
408
- }, null, 8, ["model-value", "label", "helper-text"]),
409
- c(Re, {
410
- modelValue: e(o).welcomeMessage,
411
- "onUpdate:modelValue": l[6] || (l[6] = (s) => e(o).welcomeMessage = s),
412
- "hide-credit-card": !0,
413
- variables: e(m),
414
- placeholder: e(I)
415
- }, null, 8, ["modelValue", "variables", "placeholder"])
416
- ]),
417
- t("div", ht, [
418
- l[17] || (l[17] = t("div", { class: "fm-typo-en-title-sm-800" }, "Email", -1)),
419
- t("div", bt, i(e(n)("connect.setting.email.description")), 1),
420
- e(F).length ? z("", !0) : (f(), B(M, {
421
- key: 0,
422
- onClick: _e,
423
- label: e(n)("connect.setting.email.addNewAddress")
424
- }, null, 8, ["label"])),
425
- e(F).length ? (f(), V(R, { key: 1 }, [
426
- c(Ce, {
427
- "model-value": ((le = (oe = e(o)) == null ? void 0 : oe.email) == null ? void 0 : le.from) || null,
428
- label: e(n)("connect.setting.email.fromAddress"),
429
- items: e(F).map((s) => ({
430
- label: s.emailAddress,
431
- value: s.emailAddress
432
- })),
433
- placeholder: e(A) ? e(A).emailAddress : e(n)("connect.setting.email.noAddressAvailable"),
434
- "onUpdate:modelValue": l[7] || (l[7] = (s) => {
435
- var C, L;
436
- (C = e(o)) != null && C.email || (e(o).email = {
437
- from: s,
438
- name: (L = e(F).find((X) => X.emailAddress == s)) == null ? void 0 : L.name
439
- }), e(o).email.from = s || null;
440
- }),
441
- rules: [e(ce).ruleAtPath(e(d), "email.from")]
442
- }, null, 8, ["model-value", "label", "items", "placeholder", "rules"]),
443
- c(H, {
444
- "model-value": ((ae = (se = e(o)) == null ? void 0 : se.email) == null ? void 0 : ae.name) || null,
445
- label: e(n)("connect.setting.email.senderName"),
446
- disabled: "",
447
- placeholder: ((ie = e(A)) == null ? void 0 : ie.name) || null,
448
- "onUpdate:modelValue": l[8] || (l[8] = (s) => {
449
- var C;
450
- (C = e(o)) != null && C.email || (e(o).email = {
451
- name: s
452
- }), e(o).email.name = s || null;
453
- }),
454
- rules: [e(ce).ruleAtPath(e(d), "email.name")]
455
- }, null, 8, ["model-value", "label", "placeholder", "rules"])
456
- ], 64)) : z("", !0)
457
- ]),
458
- t("div", _t, [
459
- t("div", wt, i(e(n)("connect.setting.whatsapp.title")), 1),
460
- t("div", Ct, i(e(n)("connect.setting.whatsapp.description")), 1),
461
- c(M, {
462
- label: e(n)("connect.setting.whatsapp.manageChannel"),
463
- icon: "open_in_new",
464
- onClick: l[9] || (l[9] = (s) => we())
465
- }, null, 8, ["label"])
466
- ]),
467
- t("div", xt, [
468
- t("div", Vt, [
469
- T(i(e(n)("connect.setting.freeCredit.title")) + " ", 1),
470
- t("span", kt, i(e(n)("connect.setting.freeCredit.posVersion")), 1)
471
- ]),
472
- c(q, {
473
- "model-value": e(o).freeCreditAsDiscount ?? !1,
474
- "onUpdate:modelValue": l[10] || (l[10] = (s) => e(o).freeCreditAsDiscount = s),
475
- label: e(n)("connect.setting.freeCredit.title"),
476
- sublabel: e(n)("connect.setting.freeCredit.description"),
477
- "label-placement": "right",
478
- value: ""
479
- }, null, 8, ["model-value", "label", "sublabel"])
480
- ]),
481
- t("div", Ut, [
482
- t("div", Ft, [
483
- T(i(e(n)("connect.setting.memberCard.title")) + " ", 1),
484
- c(ee, { variant: "premium" })
485
- ]),
486
- c(q, {
487
- "model-value": e(o).cardEnable ?? !1,
488
- "onUpdate:modelValue": l[11] || (l[11] = (s) => e(o).cardEnable = s),
489
- label: "",
490
- sublabel: e(n)("connect.setting.memberCard.description"),
491
- "label-placement": "right",
492
- value: "",
493
- disabled: !e(p).isPremium
494
- }, null, 8, ["model-value", "sublabel", "disabled"])
495
- ]),
496
- t("div", At, [
497
- l[18] || (l[18] = t("div", { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, " Auto Revert Reward ", -1)),
498
- c(q, {
499
- "model-value": e(o).autoRevertReward ?? !1,
500
- "onUpdate:modelValue": l[12] || (l[12] = (s) => e(o).autoRevertReward = s),
501
- label: "",
502
- sublabel: "When enabled, rewards are automatically revert when if a refund is processed in POS",
503
- "label-placement": "right",
504
- value: ""
505
- }, null, 8, ["model-value"])
506
- ]),
507
- t("div", Pt, [
508
- t("div", St, i(e(n)("connect.setting.location.title")), 1),
509
- c(Ee, {
510
- label: e(n)("connect.setting.location.selectLabel"),
511
- "model-value": e(o).targetLocation ?? null,
512
- "onUpdate:modelValue": l[13] || (l[13] = (s) => e(o).targetLocation = s)
513
- }, null, 8, ["label", "model-value"])
514
- ]),
515
- t("div", $t, [
516
- t("div", Mt, i(e(n)("connect.setting.allowedPhoneCountries.title")), 1),
517
- t("div", Lt, i(e(n)("connect.setting.allowedPhoneCountries.description")), 1),
518
- c(tt, {
519
- modelValue: e(o).allowedPhoneCountries,
520
- "onUpdate:modelValue": l[14] || (l[14] = (s) => e(o).allowedPhoneCountries = s)
521
- }, null, 8, ["modelValue"])
522
- ]),
523
- t("div", Dt, [
524
- c(M, {
525
- label: e(n)("connect.setting.action.update"),
526
- type: "button",
527
- onClick: he,
528
- disabled: !!e(g).loadingQueue.length,
529
- loading: !!e(g).loadingQueue.length
530
- }, null, 8, ["label", "disabled", "loading"])
531
- ])
532
- ])
533
- ]),
534
- t("div", It, [
535
- c(j, {
536
- variant: "outlined",
537
- class: "flex flex-col p-24 gap-8"
538
- }, {
539
- default: $(() => {
540
- var s, C, L;
541
- return [
542
- t("div", Et, i(e(n)("connect.setting.summary.title")), 1),
543
- c(xe, { class: "my-4" }),
544
- t("div", null, [
545
- t("div", Tt, i(e(n)("connect.setting.summary.name")), 1),
546
- t("div", Rt, i(e(o).name), 1)
547
- ]),
548
- t("div", null, [
549
- t("div", Bt, i(e(n)("connect.setting.summary.advertisement")), 1),
550
- t("div", Nt, i((((s = e(o).advertisements) == null ? void 0 : s.length) ?? 0) || e(n)("connect.setting.summary.noAds")), 1)
551
- ]),
552
- t("div", null, [
553
- t("div", Ht, i(e(n)("connect.setting.summary.freeCredit")), 1),
554
- t("div", Ot, i(e(o).freeCreditAsDiscount ? e(n)("connect.setting.summary.enabled") : e(n)("connect.setting.summary.disabled")), 1)
555
- ]),
556
- t("div", null, [
557
- t("div", jt, i(e(n)("connect.setting.summary.locations")), 1),
558
- t("div", qt, i(!e(o).targetLocation || e(o).targetLocation.length == e(K)().locations.length ? e(n)("connect.setting.summary.allLocations") : (L = (C = e(o)) == null ? void 0 : C.targetLocation) == null ? void 0 : L.map(
559
- (X) => e(p).locations.find((Ve) => Ve._id == X).name
560
- ).join(", ")), 1)
561
- ])
562
- ];
563
- }),
564
- _: 1
565
- })
566
- ])
567
- ])) : z("", !0)
568
- ], 64);
569
- };
570
- }
571
- });
572
- export {
573
- vn as default
574
- };