@feedmepos/mf-connect 0.1.115-dev → 0.1.115-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-43mZfFAr.js → App-CvtSY8ZO.js} +618 -652
  3. package/dist/{Bin-CA7v180Y.js → Bin-B3gS9QVZ.js} +8 -8
  4. package/dist/{Broadcast-qmdifF2Y.js → Broadcast-DAeb-HaN.js} +21 -22
  5. package/dist/{CampaignAnalytic-xnrDxqaH.js → CampaignAnalytic-BfTaHVem.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zjk-QdtX.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zsei4OfG.js} +9 -9
  7. package/dist/{Card-D8icsk7L.js → Card-JFeVIwFs.js} +24 -25
  8. package/dist/{Collections--THcD-E_.js → Collections-xcDpEhIm.js} +185 -197
  9. package/dist/{Credit-JrbtVMBp.js → Credit-C9HJZjDS.js} +20 -21
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DrwKtnE5.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DSqVY91w.js} +1 -1
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js +3494 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hVgqWdD0.js → EffectSheet.vue_vue_type_style_index_0_lang-C3J0rCTt.js} +32 -32
  13. package/dist/{Experience-CFeRqBoj.js → Experience-DszS8gto.js} +31 -32
  14. package/dist/{FileSaver.min-CCXIBm58.js → FileSaver.min-CFVQKaC-.js} +1 -1
  15. package/dist/{Game-CPxq6Ex3.js → Game-DhgeN7E2.js} +18 -19
  16. package/dist/{GiftCardSetup-D0esVZDp.js → GiftCardSetup-CWm6IhrS.js} +75 -75
  17. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-CJ1-vL-K.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-BuKADvmK.js} +7 -7
  18. package/dist/{Goals-DaKI6uXt.js → Goals-DtRVierH.js} +4 -4
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BOnL0GxM.js → ImageInput.vue_vue_type_script_setup_true_lang-DlEFyu6h.js} +1 -1
  20. package/dist/{Index-2kENoaZm.js → Index-DFRcu_qE.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BtWnJKU_.js → LocationPicker.vue_vue_type_script_setup_true_lang-B3Br4Xvi.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CX_Sspu5.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CjNJj3qj.js} +1 -1
  23. package/dist/{LoyaltyDashboard-CB93Fz8u.js → LoyaltyDashboard-BWHKDPzk.js} +15 -15
  24. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-Du8fw5v_.js → MainLayout-BmpNNAiE.js} +4 -5
  25. package/dist/Marketing-BKK45Eve.js +236 -0
  26. package/dist/{remy-icon-BhUGu2NI.js → MarketingMaterialEdit-x3c_N7Gs.js} +1031 -2
  27. package/dist/{Member-B--nYyr0.js → Member-xEzrBW_p.js} +7 -7
  28. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-BBlzO7Db.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DRoC-I0t.js} +50 -43
  29. package/dist/{MemberImportHistory-D52Y4RTC.js → MemberImportHistory-CEQpBBF8.js} +7 -7
  30. package/dist/{MemberList-13Owa1fj.js → MemberList-CCvzkHv8.js} +105 -103
  31. package/dist/{MemberTransactions-CpXEWNbq.js → MemberTransactions-Bmh39J2W.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DlELjFM0.js → MessageInput.vue_vue_type_script_setup_true_lang-D3Pmk80l.js} +14 -14
  33. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-C_y0rM8c.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DIBKAwHP.js} +1 -1
  34. package/dist/{Mission-Ci-UzXSu.js → Mission-CpUo2Bgw.js} +21 -22
  35. package/dist/{Overview-CKxSfAGF.js → Overview-CwQqQ1Tn.js} +144 -145
  36. package/dist/{Overview-CXen9Ram.js → Overview-DcDZmDXA.js} +22 -23
  37. package/dist/{Point-CR3YOaag.js → Point-CUNQsQIx.js} +21 -22
  38. package/dist/{Promotion-tw3J4ul-.js → Promotion-Cqdim7aW.js} +131 -137
  39. package/dist/{Queue-BZGA5ZXt.js → Queue-CNBVh1UG.js} +45 -46
  40. package/dist/{Record-BTevVXnT.js → Record-BYwz4l4o.js} +9 -9
  41. package/dist/{Review-BU7c8ZF0.js → Review-CqLcZFj8.js} +2 -2
  42. package/dist/ReviewFacebookCallback-DbSCILNN.js +238 -0
  43. package/dist/{ReviewGoogleCallback-xpdPHSdg.js → ReviewGoogleCallback-Dg8R7QlO.js} +5 -5
  44. package/dist/{Reward-jlA_7cxz.js → Reward-M8GZ8eHq.js} +29 -29
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D3z_n42G.js → RewardGroup.vue_vue_type_script_setup_true_lang-BkM9-Sx-.js} +15 -16
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js +1883 -0
  47. package/dist/{Segment-C1Bwm--Q.js → Segment-CrMi6xrp.js} +305 -304
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B6apgWTM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DKH5_9db.js} +30 -31
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B7m2F9UV.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyeAQ-hg.js} +4 -4
  50. package/dist/Setting-BnFRI0Se.js +2037 -0
  51. package/dist/{SettingAdvertisements-4XEAJzlL.js → SettingAdvertisements-Dh7v4c1D.js} +12 -12
  52. package/dist/Settings-BvT8_tkQ.js +179 -0
  53. package/dist/{Store-C56dXtc4.js → Store-CV-BmK5b.js} +30 -31
  54. package/dist/{StoreRewards-DQ1Q6WS6.js → StoreRewards-DPhSLvSZ.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDu1QySl.js +1264 -0
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Dqz6jTlH.js +142 -0
  57. package/dist/{Tier-D4CPZqw7.js → Tier-ChvYps23.js} +687 -2576
  58. package/dist/{Title-DCbwhUic.js → Title-v-Ivswr1.js} +92 -94
  59. package/dist/{Transaction-C5LrasXr.js → Transaction-CRqE1Ix0.js} +2 -2
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Cl9b4mrK.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B0Uh9iuj.js} +26 -26
  61. package/dist/{Voucher-rrVbNZKR.js → Voucher-Bg8FOuzD.js} +19 -19
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BIq227nz.js → VoucherEditor.vue_vue_type_script_setup_true_lang-HKxivQMF.js} +16 -16
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C39_95SZ.js → ZodTextField.vue_vue_type_script_setup_true_lang-8d290Dcp.js} +2 -2
  64. package/dist/{app-CgimGODl.js → app-DdNKsn2Q.js} +7107 -8874
  65. package/dist/app.js +3 -4
  66. package/dist/{base.export-D2P6HFvo.js → base.export-R97FrSQL.js} +2 -2
  67. package/dist/{business-Bu5TqSA0.js → business-Ce8vq3wQ.js} +1 -1
  68. package/dist/{campaign-zJxttSIk.js → campaign-BTllt2LH.js} +25 -31
  69. package/dist/{campaign-BFIXSgdJ.js → campaign-C19If7bW.js} +94 -121
  70. package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-9CCbalR4.js} +2 -3
  71. package/dist/{campaign.fn-gvjlcEfe.js → campaign.fn-B4g03h0A.js} +78 -78
  72. package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-MvqF7mSg.js} +1 -1
  73. package/dist/{collection.fn-DOm0HsSh.js → collection.fn-CR0bD33S.js} +2 -2
  74. package/dist/{currency-BpbQvbm8.js → currency-DmlguGIM.js} +1 -1
  75. package/dist/{effect-D-GtNB3n.js → effect-Dx3zfl28.js} +1 -1
  76. package/dist/{email-addresses-BKMoAtMi.js → email-addresses-De5PGOY4.js} +2 -2
  77. package/dist/{feature-flag-BJ_eyKsq.js → feature-flag-CD9V1V0h.js} +74 -74
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-CkfjBgMM.js → helper-CEiv7SaO.js} +1 -1
  80. package/dist/{index-zTvr2GR4.js → index-649OZ_e1.js} +2 -2
  81. package/dist/{index-feCrYhi6.js → index-B8meeQoD.js} +1 -1
  82. package/dist/{index-CIej31pF.js → index-B8yWVB8P.js} +3 -4
  83. package/dist/{index-BKsxIwbi.js → index-BAXKd9Gg.js} +198 -198
  84. package/dist/{index-BAtUrtqM.js → index-BDPnyro2.js} +6 -19
  85. package/dist/{index-DUAZOMVJ.js → index-BR9h5DTI.js} +1 -1
  86. package/dist/{index-DwU3fsLW.js → index-BVdYxi3l.js} +15 -29
  87. package/dist/{index-D0JK99Ko.js → index-BW6eb3n6.js} +252 -611
  88. package/dist/{index-LygS9WsG.js → index-BYI9ttxy.js} +10767 -8028
  89. package/dist/{index-BdEXUNoG.js → index-BquSqx6K.js} +4 -4
  90. package/dist/{index-BpTIulTX.js → index-CBJy9bxB.js} +1 -1
  91. package/dist/{index-B6kU3PkV.js → index-CPODug8b.js} +2613 -2700
  92. package/dist/{index-CfQuYqXn.js → index-CWUrODxL.js} +1 -1
  93. package/dist/{index-DKxN1mMS.js → index-CqOCJTeR.js} +232 -390
  94. package/dist/{index-CuREApMc.js → index-D4d3l0gw.js} +7 -8
  95. package/dist/{index-Bhl5IRXy.js → index-DT3S00_Y.js} +10 -11
  96. package/dist/{index-DqGs6RJG.js → index-IZRfmmde.js} +581 -683
  97. package/dist/{index-CQ8XFbBk.js → index-__UT3_Ey.js} +2 -2
  98. package/dist/{index-CCEXSPxk.js → index-xct3mnu8.js} +7 -7
  99. package/dist/{index.esm2017-DZi9IQPS.js → index.esm2017-AVbZ9btd.js} +177 -177
  100. package/dist/{loading-Brid2wnu.js → loading-BvHm1m3K.js} +1 -1
  101. package/dist/{lodash-C1epw3Kv.js → lodash-Dvrceo7x.js} +1 -1
  102. package/dist/{member-import-DAIxTIiu.js → member-import-c9avpiSS.js} +5 -6
  103. package/dist/{membership-BZmljFhF.js → membership-D-pZS634.js} +3 -3
  104. package/dist/{money-cLcyGcSZ.js → money-D4skwMkD.js} +1 -1
  105. package/dist/{number-C2jPLJr2.js → number-DJ6ncfT6.js} +1 -1
  106. package/dist/objectid-DEMM_jdR.js +145 -0
  107. package/dist/{onboarding-oRfy_g05.js → onboarding-t7R1d3h-.js} +25 -25
  108. package/dist/{onboardingSetup-BLD6m8HY.js → onboardingSetup-lTaJc0oT.js} +2 -2
  109. package/dist/{plugins-CUsr9vB0.js → plugins-DQNOWwRC.js} +3 -3
  110. package/dist/{reward-UOT03odb.js → reward-BK150pjm.js} +1 -1
  111. package/dist/{rule-BgJnPjkI.js → rule-COcdAnUu.js} +492 -572
  112. package/dist/rule-builder-Deufb6h_.js +102 -0
  113. package/dist/style.css +1 -1
  114. package/dist/template-DeebIqJ_.js +236 -0
  115. package/dist/{timezone-BXA4wq7Y.js → timezone-BP6UC4KL.js} +1 -1
  116. package/dist/{transaction.fn-CQ4fpRt3.js → transaction.fn-BY0hzon0.js} +2 -2
  117. package/dist/{trigger-DXJCGT0q.js → trigger-DVBjVPbN.js} +8 -8
  118. package/dist/useMarketingMaterialActions-DpQCQHFI.js +96 -0
  119. package/dist/{usePagination-Pp4okWr8.js → usePagination-QT552XyF.js} +1 -1
  120. package/dist/{user-B3gXcAIy.js → user-CmAxNc7T.js} +1 -1
  121. package/dist/vue-i18n-Cze706-f.js +2365 -0
  122. package/dist/{xlsx-CCaDUTgW.js → xlsx-DAczoc8y.js} +224 -224
  123. package/dist/{zod-CPwjOxvW.js → zod-Aj-GuVQL.js} +1 -1
  124. package/package.json +2 -6
  125. package/dist/AuditLogs-BPpdm96t.js +0 -2016
  126. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DgdAlHU7.js +0 -4442
  127. package/dist/Grab-BWzdN_cd.js +0 -301
  128. package/dist/MainLayout-DwnjGXh6.js +0 -4
  129. package/dist/Marketing-DCco__2F.js +0 -273
  130. package/dist/MarketingMaterialEdit-BbgFtrYP.js +0 -1037
  131. package/dist/ReviewFacebookCallback-BnMF6Arh.js +0 -225
  132. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CsHxqH9h.js +0 -1923
  133. package/dist/Setting-CDM4RhLW.js +0 -574
  134. package/dist/Settings-D-0tvZRr.js +0 -286
  135. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-LLD91Rz6.js +0 -1319
  136. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Bvy4NJMd.js +0 -7007
  137. package/dist/WhatsappAccount-oJDo5zTr.js +0 -159
  138. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-aCQCYFYq.js +0 -39
  139. package/dist/WhatsappBot-Cl64wG_F.js +0 -876
  140. package/dist/WhatsappBotLogs-D3uT4EiB.js +0 -372
  141. package/dist/WhatsappBotSettings-Cs1lLxh-.js +0 -705
  142. package/dist/WhatsappLayout-C639d2HP.js +0 -21
  143. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DpPxWp2x.js +0 -253
  144. package/dist/browser-BSAOEeIM.js +0 -1478
  145. package/dist/duplicateCampaign-CvsvjRE9.js +0 -51
  146. package/dist/feature-flag-Bo-k5sIG.js +0 -50
  147. package/dist/google-BQK68wbe.js +0 -5
  148. package/dist/index-C-iwb2Ln.js +0 -109
  149. package/dist/index-C_H8jFYf.js +0 -2743
  150. package/dist/index-DQ8JJhxs.js +0 -74
  151. package/dist/objectid-C-wocWKI.js +0 -145
  152. package/dist/template-BZyFhr73.js +0 -188
  153. package/dist/useMarketingMaterialActions-B-Wib5ga.js +0 -125
  154. package/dist/vue-i18n-DWGiC_vs.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-CPwjOxvW.js";
4
- import { useDialog as me } from "@feedmepos/ui-library";
5
- import { u as Fe } from "./loading-Brid2wnu.js";
6
- import { u as Ae } from "./app-wDQR6dpb.js";
7
- import { u as K, l as ue } from "./business-Bu5TqSA0.js";
8
- import { u as pe } from "./membership-BZmljFhF.js";
9
- import { P as Q } from "./index-LygS9WsG.js";
10
- import { m as Pe, b as Se } from "./index-DKxN1mMS.js";
11
- import { _ as $e } from "./ImageInput.vue_vue_type_script_setup_true_lang-BOnL0GxM.js";
12
- import { c as fe, p as Me, f as O } from "./plugins-CUsr9vB0.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-Bvy4NJMd.js";
15
- import { u as ve } from "./vue-i18n-DWGiC_vs.js";
16
- import { M as Te, b as Re } from "./MessageInput.vue_vue_type_script_setup_true_lang-DlELjFM0.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-CgimGODl.js";
20
- import { m as W } from "./index-BAtUrtqM.js";
21
- import { S as re } from "./index-CCEXSPxk.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
- };