@feedmepos/mf-connect 0.1.97-prod → 0.1.98-beta.2

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 (116) hide show
  1. package/dist/{App-DHAyGCKP.js → App-BWBeJksP.js} +118 -106
  2. package/dist/AuditLogs-CWVUX5o0.js +2013 -0
  3. package/dist/{Bin-BxyU2xtK.js → Bin-jXmZpGfg.js} +8 -8
  4. package/dist/{Broadcast-BJjehb02.js → Broadcast-C76pTADb.js} +18 -17
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCxP8rEW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-9kfq8OXE.js} +5 -6
  6. package/dist/{Card-BYDuADCn.js → Card-qXn83BYu.js} +19 -19
  7. package/dist/{Collections-BlPEkNm8.js → Collections-DGXUQSbz.js} +197 -185
  8. package/dist/{Credit-D9Eqxv2E.js → Credit-CpmrPZx9.js} +18 -17
  9. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
  10. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DAnw5TFZ.js +3377 -0
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hpNgkLOt.js → EffectSheet.vue_vue_type_style_index_0_lang-BCAotF0P.js} +6 -6
  12. package/dist/{Experience-DGumSpYK.js → Experience-CuOq7hd3.js} +35 -34
  13. package/dist/{FileSaver.min-D_TpPHp3.js → FileSaver.min-Cjv6SzrG.js} +1 -1
  14. package/dist/{Game-DDsYLdKu.js → Game-D0KfLD-b.js} +16 -15
  15. package/dist/Grab-L1h7bHD7.js +300 -0
  16. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-R00i7YNe.js → ImageInput.vue_vue_type_script_setup_true_lang-DMAaHxzm.js} +1 -1
  17. package/dist/{Index-DwRbFOsj.js → Index-DxwMHEV3.js} +10 -10
  18. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-i9-B25xO.js +48 -0
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-D_HOJBzW.js → LottieAnimation.vue_vue_type_script_setup_true_lang-D84v7zC_.js} +1 -1
  20. package/dist/LoyaltyDashboard-B5wg1EUC.js +1082 -0
  21. package/dist/{MainLayout-BEUAguIP.js → MainLayout-Cgi3Z3EM.js} +1 -1
  22. package/dist/{Marketing-WdhEZvmz.js → Marketing-Cl5OSBI1.js} +4 -4
  23. package/dist/{MarketingMaterialEdit-DUIkUA79.js → MarketingMaterialEdit-CzYTbdJd.js} +214 -211
  24. package/dist/{Member-jL3RMGsZ.js → Member-D29x5Cic.js} +20 -20
  25. package/dist/{MemberList-B1bdPK63.js → MemberList-DDPe6Ymr.js} +50 -51
  26. package/dist/{MemberTransactions-BNKJ0wtr.js → MemberTransactions-3mboVWAx.js} +1 -1
  27. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Cvsz00_4.js → MessageInput.vue_vue_type_script_setup_true_lang-C2HlA9O8.js} +11 -11
  28. package/dist/{Mission-CoXzS7U6.js → Mission-CMPc4NLe.js} +35 -34
  29. package/dist/{Overview-B16wZUSV.js → Overview-sJ2kuP4U.js} +19 -19
  30. package/dist/{Point-CORBv0y2.js → Point-BBP4UEhf.js} +30 -29
  31. package/dist/{Promotion-DQ4WnFkH.js → Promotion-Bt0RLGsd.js} +111 -105
  32. package/dist/{Queue-BW97QEY2.js → Queue-CzVsoIDM.js} +43 -43
  33. package/dist/{Record-DZOhwf13.js → Record-CAoGgaxo.js} +10 -10
  34. package/dist/Review-CVBJlwGK.js +959 -0
  35. package/dist/ReviewFacebookCallback-RGWdxXYf.js +243 -0
  36. package/dist/ReviewGoogleCallback-L7_Jjbkx.js +208 -0
  37. package/dist/{Reward-Bi9mpuyH.js → Reward-CrpFlr0a.js} +17 -17
  38. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Dtosx1wE.js → RewardGroup.vue_vue_type_script_setup_true_lang-DW-WFNI6.js} +12 -12
  39. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DlcsO8fk.js +1911 -0
  40. package/dist/{Segment-COhS8SPv.js → Segment-Cy-QwYQQ.js} +77 -78
  41. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-By_BQodK.js → SelectItems.vue_vue_type_script_setup_true_lang-ovvxxcrQ.js} +3 -3
  42. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BoEnwoYd.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D69bJtyd.js} +12 -12
  43. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DonadRJT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DQyoPZ_6.js} +4 -4
  44. package/dist/{Setting-BNtYrzdN.js → Setting-DEQIJ4fY.js} +259 -248
  45. package/dist/{SettingAdvertisements-Cne8GikV.js → SettingAdvertisements-NuwjCPLN.js} +13 -13
  46. package/dist/{Store-iTgtmUVL.js → Store-Cw2J_ecA.js} +24 -24
  47. package/dist/{StoreRewards-DLawXBsl.js → StoreRewards-BK5rDAaK.js} +16 -16
  48. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B3jwaYHX.js +1130 -0
  49. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D_OdWctk.js +7007 -0
  50. package/dist/{Tier-BbZMbFSd.js → Tier-CwZ40RYc.js} +544 -469
  51. package/dist/{Title-Co5XWIJm.js → Title-DU7KmsK2.js} +93 -92
  52. package/dist/{Transaction-CoUbt5rr.js → Transaction-Uh5Ozt93.js} +2 -2
  53. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzJpNT94.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BtnUNkcS.js} +6 -6
  54. package/dist/{Voucher-CXojttH0.js → Voucher-BF6ARaRe.js} +28 -27
  55. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Bxkds9_4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C7msPJdi.js} +12 -12
  56. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CHVqFzLm.js → ZodTextField.vue_vue_type_script_setup_true_lang-BrR2WA1K.js} +2 -2
  57. package/dist/{app-_LtKE4PZ.js → app-DlECkPwT.js} +3408 -2913
  58. package/dist/app.js +4 -3
  59. package/dist/{business-CchrWCX9.js → business-BSe9C-xG.js} +1 -1
  60. package/dist/{campaign-N2x2N6OP.js → campaign-BNS2RxKc.js} +114 -64
  61. package/dist/{campaign-D2RzC0L1.js → campaign-CXw3jpdr.js} +13 -7
  62. package/dist/{campaign.enum-DqJsu1At.js → campaign.enum-CnMa2Tia.js} +3 -2
  63. package/dist/{campaign.fn-Da4r_dvc.js → campaign.fn-CNOinW8t.js} +131 -131
  64. package/dist/{collectible.enum-CHheiKkA.js → collectible.enum-BIvEz79q.js} +1 -1
  65. package/dist/duplicateCampaign-Co2TdbrL.js +51 -0
  66. package/dist/{effect-DADvE7lZ.js → effect-Bt8PE3-M.js} +1 -1
  67. package/dist/{email-addresses-DzUHQuVs.js → email-addresses-Dh95ALqP.js} +2 -2
  68. package/dist/{export-uzECYleM.js → export-DIIgAwP7.js} +3 -3
  69. package/dist/{helper-DMsYRFIM.js → helper-8zEdQ9jm.js} +1 -1
  70. package/dist/{index-CEVpWmjC.js → index-0BNEvaYc.js} +7 -7
  71. package/dist/{index-r8TuEpzi.js → index-BAlFstx4.js} +1 -1
  72. package/dist/{index-C2h4SP0A.js → index-BP5qSDQw.js} +806 -205
  73. package/dist/{index-KYtKBtvK.js → index-Bqxe3Gbq.js} +3 -3
  74. package/dist/{index-CrPHsZg1.js → index-CWypTyOP.js} +1554 -1270
  75. package/dist/{index-DXl_Qtu-.js → index-CfxDirFl.js} +1 -1
  76. package/dist/{index-Bc-pgOn6.js → index-DDp0nMys.js} +1 -1
  77. package/dist/index-DW4-mTTG.js +52 -0
  78. package/dist/{timezone-B_KZGqyd.js → index-DdCPfF8x.js} +21 -20
  79. package/dist/index-IPOrNVQw.js +67 -0
  80. package/dist/{index-XJX8_Wlh.js → index-SsUBL4IR.js} +1 -1
  81. package/dist/{index-Ct1Qf7kH.js → index-VS1hWlhk.js} +1 -1
  82. package/dist/{index-B9RmImNP.js → index-ZKJoXi1-.js} +3 -3
  83. package/dist/{index-DQ6H1MEw.js → index-rwlkBKrS.js} +1996 -1968
  84. package/dist/{index.esm2017-D9jjiQqn.js → index.esm2017-CgR02aQB.js} +209 -209
  85. package/dist/{loading-DK8UdxtS.js → loading-CxY9qhzD.js} +1 -1
  86. package/dist/{lodash-CgcQgDO8.js → lodash-CELsN1M_.js} +1 -1
  87. package/dist/{membership-Cs4GzRnn.js → membership-BoQMuerb.js} +3 -3
  88. package/dist/{money-TgbWserQ.js → money-CH913hGN.js} +1 -1
  89. package/dist/{number-fLCh4B45.js → number-CO-WbLdr.js} +1 -1
  90. package/dist/object-BYyQ0PZp.js +18 -0
  91. package/dist/objectid-BM2Ygj-U.js +145 -0
  92. package/dist/{plugins-DYcrIMpx.js → plugins-YK45gSb1.js} +94 -95
  93. package/dist/{reward-uQ8Oz8Fd.js → reward-3aFPahH6.js} +1 -1
  94. package/dist/{rule-BcbgF0xS.js → rule-DC9my0Vg.js} +505 -487
  95. package/dist/style.css +1 -1
  96. package/dist/template-tDq12e1p.js +188 -0
  97. package/dist/{trigger-c-_77EFL.js → trigger-DoPHRgKt.js} +5 -5
  98. package/dist/{useMarketingMaterialActions-BCqwGe4e.js → useMarketingMaterialActions-CEd6ODsz.js} +3 -3
  99. package/dist/{usePagination-C3cT5BmC.js → usePagination-C8FUj5q_.js} +1 -1
  100. package/dist/{user-CRIo5MyA.js → user-Dhlhrnf8.js} +1 -1
  101. package/dist/{vue-i18n-BU_SuDqj.js → vue-i18n-B-92uhPn.js} +175 -175
  102. package/dist/{xlsx-Bw1AshOG.js → xlsx-Dmxne1eM.js} +166 -166
  103. package/dist/{zod-CzlTW8Al.js → zod-Dcdy9Dm3.js} +1 -1
  104. package/package.json +8 -4
  105. package/dist/Analytic-Ccb5IKBy.js +0 -426
  106. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bf8Rc-Eh.js +0 -2223
  107. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CrvTdEPu.js +0 -1888
  108. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cl8JEYjx.js +0 -1118
  109. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DEEz7iEu.js +0 -142
  110. package/dist/collection.fn-BqDPyvUe.js +0 -26
  111. package/dist/dto-CstKk_3g.js +0 -216
  112. package/dist/index-_KlH62Ed.js +0 -55
  113. package/dist/object-qECH92oz.js +0 -26
  114. package/dist/objectid-CVxLIQ5K.js +0 -145
  115. package/dist/rule-builder-CIkRKgap.js +0 -102
  116. package/dist/template-wZEVj8lZ.js +0 -236
@@ -1,29 +1,28 @@
1
1
  var ie = Object.defineProperty;
2
- var ue = (v, u, b) => u in v ? ie(v, u, { enumerable: !0, configurable: !0, writable: !0, value: b }) : v[u] = b;
3
- var J = (v, u, b) => ue(v, typeof u != "symbol" ? u + "" : u, b);
4
- import { defineComponent as ae, ref as C, computed as D, watch as W, resolveComponent as p, openBlock as V, createBlock as Q, unref as t, isRef as Z, withCtx as Y, createElementVNode as S, createVNode as i, createElementBlock as T, Fragment as L, renderList as ce, createCommentVNode as q, h as I, onMounted as de } from "vue";
2
+ var ue = (y, u, v) => u in y ? ie(y, u, { enumerable: !0, configurable: !0, writable: !0, value: v }) : y[u] = v;
3
+ var Z = (y, u, v) => ue(y, typeof u != "symbol" ? u + "" : u, v);
4
+ import { defineComponent as ae, ref as C, computed as D, watch as W, resolveComponent as p, openBlock as w, createBlock as Q, unref as o, isRef as ee, withCtx as Y, createElementVNode as V, createVNode as i, createElementBlock as T, Fragment as L, renderList as ce, createCommentVNode as q, h, onMounted as de } from "vue";
5
5
  import { h as E } from "./moment-D7p2TMB-.js";
6
- import { components as ee } from "@feedmepos/ui-library";
7
- import "./index-KYtKBtvK.js";
6
+ import { components as X } from "@feedmepos/ui-library";
7
+ import "./index-Bqxe3Gbq.js";
8
8
  import { J as me } from "./JsonViewer-v8_C7l5N.js";
9
- import { u as le } from "./loading-DK8UdxtS.js";
9
+ import { u as le } from "./loading-CxY9qhzD.js";
10
10
  import { u as pe } from "./app-wDQR6dpb.js";
11
11
  import { useRoute as ne, useRouter as fe } from "vue-router";
12
- import { c as re, u as ge } from "./campaign-D2RzC0L1.js";
13
- import { e as h } from "./index-vh86FiIQ.js";
14
- import { u as X, w as be } from "./xlsx-Bw1AshOG.js";
15
- import { g as he } from "./user-CRIo5MyA.js";
16
- import { u as Ce, _ as ve } from "./usePagination-C3cT5BmC.js";
17
- import { c as te } from "./plugins-DYcrIMpx.js";
18
- import { m as ye } from "./index-r8TuEpzi.js";
12
+ import { c as re, u as ge } from "./campaign-CXw3jpdr.js";
13
+ import { e as b } from "./index-vh86FiIQ.js";
14
+ import { u as J, w as ve } from "./xlsx-Dmxne1eM.js";
15
+ import { u as he, _ as be } from "./usePagination-C8FUj5q_.js";
16
+ import { c as te } from "./plugins-YK45gSb1.js";
17
+ import { m as Ce } from "./index-BAlFstx4.js";
19
18
  import { o as oe } from "./objectId-dwaoBfJX.js";
20
- const xe = { class: "space-y-16" }, Se = { class: "gap-16 grid grid-cols-2" }, Ve = { class: "flex items-center gap-8" }, we = /* @__PURE__ */ ae({
19
+ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, Se = { class: "flex items-center gap-8" }, Ve = /* @__PURE__ */ ae({
21
20
  __name: "CreateCollectionSheet",
22
21
  emits: ["success"],
23
- setup(v, { expose: u, emit: b }) {
24
- const { minor: M } = le, P = ne(), w = C(), F = C(!1), $ = b, y = C(!1);
22
+ setup(y, { expose: u, emit: v }) {
23
+ const { minor: M } = le, P = ne(), F = C(), k = C(!1), $ = v, x = C(!1);
25
24
  function R(r) {
26
- y.value = r, r && (n.value = {
25
+ x.value = r, r && (n.value = {
27
26
  quantity: 1,
28
27
  code: "",
29
28
  codeConfig: {
@@ -56,7 +55,7 @@ const xe = { class: "space-y-16" }, Se = { class: "gap-16 grid grid-cols-2" }, V
56
55
  value: "single",
57
56
  sublabel: "Enter your own custom codes"
58
57
  }
59
- ], N = [
58
+ ], A = [
60
59
  {
61
60
  label: "Alphanumeric",
62
61
  value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@ -69,10 +68,10 @@ const xe = { class: "space-y-16" }, Se = { class: "gap-16 grid grid-cols-2" }, V
69
68
  { label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
70
69
  { label: "Numbers", value: "0123456789" },
71
70
  { label: "Custom", value: "" }
72
- ], k = C(N[0].value), f = C("bulk"), U = C(!1), K = D(() => P.params.id);
73
- async function A(r) {
74
- var e;
75
- await ((e = w.value) == null ? void 0 : e.validateInputs()), F.value && await M(
71
+ ], U = C(A[0].value), f = C("bulk"), _ = C(!1), K = D(() => P.params.id);
72
+ async function N(r) {
73
+ var t;
74
+ await ((t = F.value) == null ? void 0 : t.validateInputs()), k.value && await M(
76
75
  async () => {
77
76
  await re.createCollectionByCampaignId(K.value, r), await $("success");
78
77
  },
@@ -86,164 +85,164 @@ const xe = { class: "space-y-16" }, Se = { class: "gap-16 grid grid-cols-2" }, V
86
85
  showSheet: R
87
86
  }), W(
88
87
  () => f.value,
89
- (r, e) => {
90
- e != r && (n.value.code = "", n.value.codeConfig.length = 8, n.value.codeConfig.charset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", n.value.codeConfig.prefix = "", n.value.codeConfig.suffix = "", n.value.codeConfig.pattern = "########");
88
+ (r, t) => {
89
+ t != r && (n.value.code = "", n.value.codeConfig.length = 8, n.value.codeConfig.charset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", n.value.codeConfig.prefix = "", n.value.codeConfig.suffix = "", n.value.codeConfig.pattern = "########");
91
90
  }
92
91
  );
93
92
  function g(r) {
94
93
  if (f.value !== "single") return !1;
95
- const e = r.split(`
96
- `).map((_) => _.trim()).filter(Boolean);
97
- return new Set(e).size !== e.length;
94
+ const t = r.split(`
95
+ `).map((B) => B.trim()).filter(Boolean);
96
+ return new Set(t).size !== t.length;
98
97
  }
99
98
  function j(r) {
100
99
  return /[ \t]/.test(r);
101
100
  }
102
101
  return W(
103
102
  () => n.value.codeConfig.length,
104
- (r, e) => {
105
- r != e && (n.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(r))));
103
+ (r, t) => {
104
+ r != t && (n.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(r))));
106
105
  }
107
106
  ), W(
108
107
  () => n.value.codeConfig.pattern,
109
- (r, e) => {
110
- r != e && (n.value.codeConfig.length = (n.value.codeConfig.pattern.match(/#/g) || []).length);
108
+ (r, t) => {
109
+ r != t && (n.value.codeConfig.length = (n.value.codeConfig.pattern.match(/#/g) || []).length);
111
110
  }
112
- ), (r, e) => {
113
- const _ = p("FmRadio"), O = p("FmRadioGroup"), H = p("FmSwitch"), l = p("FmStepperField"), a = p("FmSelect"), c = p("FmTextField"), d = p("FmTextarea"), s = p("FmForm"), x = p("FmButton"), G = p("FmSideSheet");
114
- return V(), Q(G, {
111
+ ), (r, t) => {
112
+ const B = p("FmRadio"), O = p("FmRadioGroup"), H = p("FmSwitch"), l = p("FmStepperField"), e = p("FmSelect"), c = p("FmTextField"), d = p("FmTextarea"), s = p("FmForm"), S = p("FmButton"), G = p("FmSideSheet");
113
+ return w(), Q(G, {
115
114
  "max-width": 560,
116
115
  "dismiss-away": !0,
117
116
  header: "Create collection",
118
- modelValue: t(y),
117
+ modelValue: o(x),
119
118
  "onUpdate:modelValue": [
120
- e[14] || (e[14] = (o) => Z(y) ? y.value = o : null),
121
- e[15] || (e[15] = (o) => y.value = o)
119
+ t[14] || (t[14] = (a) => ee(x) ? x.value = a : null),
120
+ t[15] || (t[15] = (a) => x.value = a)
122
121
  ]
123
122
  }, {
124
123
  "side-sheet-footer": Y(() => [
125
- S("div", Ve, [
126
- i(x, {
124
+ V("div", Se, [
125
+ i(S, {
127
126
  label: "Save",
128
- onClick: e[12] || (e[12] = (o) => A(t(n))),
129
- loading: t(pe)().isLoading
127
+ onClick: t[12] || (t[12] = (a) => N(o(n))),
128
+ loading: o(pe)().isLoading
130
129
  }, null, 8, ["loading"]),
131
- i(x, {
130
+ i(S, {
132
131
  label: "Cancel",
133
132
  type: "button",
134
133
  variant: "tertiary",
135
- onClick: e[13] || (e[13] = (o) => y.value = !1)
134
+ onClick: t[13] || (t[13] = (a) => x.value = !1)
136
135
  })
137
136
  ])
138
137
  ]),
139
138
  default: Y(() => [
140
- i(me, { json: t(n) }, null, 8, ["json"]),
139
+ i(me, { json: o(n) }, null, 8, ["json"]),
141
140
  i(s, {
142
141
  ref_key: "form",
143
- ref: w,
142
+ ref: F,
144
143
  class: "space-y-40",
145
- onValidationSuccess: e[10] || (e[10] = (o) => F.value = !0),
146
- onValidationFailed: e[11] || (e[11] = (o) => F.value = !1)
144
+ onValidationSuccess: t[10] || (t[10] = (a) => k.value = !0),
145
+ onValidationFailed: t[11] || (t[11] = (a) => k.value = !1)
147
146
  }, {
148
147
  default: Y(() => [
149
- S("div", null, [
150
- e[16] || (e[16] = S("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1)),
148
+ V("div", null, [
149
+ t[16] || (t[16] = V("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1)),
151
150
  i(O, {
152
- modelValue: t(f),
153
- "onUpdate:modelValue": e[0] || (e[0] = (o) => Z(f) ? f.value = o : null),
151
+ modelValue: o(f),
152
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => ee(f) ? f.value = a : null),
154
153
  inline: !1
155
154
  }, {
156
155
  default: Y(() => [
157
- (V(), T(L, null, ce(z, (o) => i(_, {
158
- key: o.value,
159
- value: o.value,
160
- label: o.label,
161
- sublabel: o.sublabel
156
+ (w(), T(L, null, ce(z, (a) => i(B, {
157
+ key: a.value,
158
+ value: a.value,
159
+ label: a.label,
160
+ sublabel: a.sublabel
162
161
  }, null, 8, ["value", "label", "sublabel"])), 64))
163
162
  ]),
164
163
  _: 1
165
164
  }, 8, ["modelValue"])
166
165
  ]),
167
- S("div", xe, [
168
- e[17] || (e[17] = S("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1)),
169
- t(f) === "bulk" ? (V(), T(L, { key: 0 }, [
166
+ V("div", ye, [
167
+ t[17] || (t[17] = V("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1)),
168
+ o(f) === "bulk" ? (w(), T(L, { key: 0 }, [
170
169
  i(H, {
171
- "model-value": t(U),
170
+ "model-value": o(_),
172
171
  "label-placement": "right",
173
172
  value: "true",
174
173
  label: "Advance code setting",
175
174
  required: !0,
176
- "onUpdate:modelValue": e[1] || (e[1] = () => U.value = !t(U))
175
+ "onUpdate:modelValue": t[1] || (t[1] = () => _.value = !o(_))
177
176
  }, null, 8, ["model-value"]),
178
- t(U) ? (V(), T(L, { key: 0 }, [
177
+ o(_) ? (w(), T(L, { key: 0 }, [
179
178
  i(l, {
180
- modelValue: t(n).codeConfig.length,
181
- "onUpdate:modelValue": e[2] || (e[2] = (o) => t(n).codeConfig.length = o),
179
+ modelValue: o(n).codeConfig.length,
180
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => o(n).codeConfig.length = a),
182
181
  label: "Code length",
183
182
  max: 16,
184
183
  min: 1,
185
184
  rules: [
186
- (o) => Number(o) >= 1 || "Code length must at least 1",
187
- (o) => Number(o) <= 16 || "Code length must less than 16"
185
+ (a) => Number(a) >= 1 || "Code length must at least 1",
186
+ (a) => Number(a) <= 16 || "Code length must less than 16"
188
187
  ],
189
188
  required: !0
190
189
  }, null, 8, ["modelValue", "rules"]),
191
- i(a, {
190
+ i(e, {
192
191
  label: "Charset",
193
- "model-value": t(k),
194
- items: N,
195
- "helper-text": t(n).codeConfig.charset.length > 62 ? `${t(n).codeConfig.charset.substring(0, 62)}...` : t(n).codeConfig.charset,
196
- "onUpdate:modelValue": e[3] || (e[3] = (o) => {
197
- k.value = o, t(n).codeConfig.charset = o;
192
+ "model-value": o(U),
193
+ items: A,
194
+ "helper-text": o(n).codeConfig.charset.length > 62 ? `${o(n).codeConfig.charset.substring(0, 62)}...` : o(n).codeConfig.charset,
195
+ "onUpdate:modelValue": t[3] || (t[3] = (a) => {
196
+ U.value = a, o(n).codeConfig.charset = a;
198
197
  })
199
198
  }, null, 8, ["model-value", "helper-text"]),
200
- t(k) === "" ? (V(), Q(c, {
199
+ o(U) === "" ? (w(), Q(c, {
201
200
  key: 0,
202
- modelValue: t(n).codeConfig.charset,
203
- "onUpdate:modelValue": e[4] || (e[4] = (o) => t(n).codeConfig.charset = o),
201
+ modelValue: o(n).codeConfig.charset,
202
+ "onUpdate:modelValue": t[4] || (t[4] = (a) => o(n).codeConfig.charset = a),
204
203
  label: "Custom Charset",
205
204
  required: ""
206
205
  }, null, 8, ["modelValue"])) : q("", !0),
207
- S("div", Se, [
206
+ V("div", xe, [
208
207
  i(c, {
209
- modelValue: t(n).codeConfig.prefix,
210
- "onUpdate:modelValue": e[5] || (e[5] = (o) => t(n).codeConfig.prefix = o),
208
+ modelValue: o(n).codeConfig.prefix,
209
+ "onUpdate:modelValue": t[5] || (t[5] = (a) => o(n).codeConfig.prefix = a),
211
210
  label: "Prefix (Optional)"
212
211
  }, null, 8, ["modelValue"]),
213
212
  i(c, {
214
- modelValue: t(n).codeConfig.suffix,
215
- "onUpdate:modelValue": e[6] || (e[6] = (o) => t(n).codeConfig.suffix = o),
213
+ modelValue: o(n).codeConfig.suffix,
214
+ "onUpdate:modelValue": t[6] || (t[6] = (a) => o(n).codeConfig.suffix = a),
216
215
  label: "Suffix (Optional)"
217
216
  }, null, 8, ["modelValue"])
218
217
  ]),
219
218
  i(c, {
220
- modelValue: t(n).codeConfig.pattern,
221
- "onUpdate:modelValue": e[7] || (e[7] = (o) => t(n).codeConfig.pattern = o),
219
+ modelValue: o(n).codeConfig.pattern,
220
+ "onUpdate:modelValue": t[7] || (t[7] = (a) => o(n).codeConfig.pattern = a),
222
221
  label: "Pattern",
223
222
  required: !0
224
223
  }, null, 8, ["modelValue"])
225
224
  ], 64)) : q("", !0),
226
225
  i(c, {
227
- modelValue: t(n).quantity,
228
- "onUpdate:modelValue": e[8] || (e[8] = (o) => t(n).quantity = o),
226
+ modelValue: o(n).quantity,
227
+ "onUpdate:modelValue": t[8] || (t[8] = (a) => o(n).quantity = a),
229
228
  label: "Number of code",
230
229
  rules: [
231
- (o) => o >= 1 || "Quantity cannot be less than 1",
232
- (o) => o <= 1e4 || "Quantity cannot more than 10,000"
230
+ (a) => a >= 1 || "Quantity cannot be less than 1",
231
+ (a) => a <= 1e4 || "Quantity cannot more than 10,000"
233
232
  ],
234
233
  required: !0,
235
- "helper-text": `${t(n).quantity} claim will be created`
234
+ "helper-text": `${o(n).quantity} claim will be created`
236
235
  }, null, 8, ["modelValue", "rules", "helper-text"])
237
236
  ], 64)) : q("", !0),
238
- t(f) !== "bulk" ? (V(), Q(d, {
237
+ o(f) !== "bulk" ? (w(), Q(d, {
239
238
  key: 1,
240
- modelValue: t(n).code,
241
- "onUpdate:modelValue": e[9] || (e[9] = (o) => t(n).code = o),
239
+ modelValue: o(n).code,
240
+ "onUpdate:modelValue": t[9] || (t[9] = (a) => o(n).code = a),
242
241
  label: "Custom Code",
243
242
  rules: [
244
- (o) => t(f) != "single" || !!o || "Custom code is required",
245
- (o) => !g(o) || "Custom code must be unique",
246
- (o) => !j(o) || "Custom code must not contain space"
243
+ (a) => o(f) != "single" || !!a || "Custom code is required",
244
+ (a) => !g(a) || "Custom code must be unique",
245
+ (a) => !j(a) || "Custom code must not contain space"
247
246
  ],
248
247
  placeholder: "(For multiple codes, please enter in the new row.)"
249
248
  }, null, 8, ["modelValue", "rules"])) : q("", !0)
@@ -257,73 +256,73 @@ const xe = { class: "space-y-16" }, Se = { class: "gap-16 grid grid-cols-2" }, V
257
256
  };
258
257
  }
259
258
  });
260
- class Fe {
259
+ class we {
261
260
  constructor() {
262
- J(this, "data", []);
261
+ Z(this, "data", []);
263
262
  }
264
263
  addRecord(u) {
265
264
  this.data.push(u);
266
265
  }
267
266
  buildExcel() {
268
- const u = X.book_new(), b = X.json_to_sheet(this.data);
269
- return X.book_append_sheet(u, b, "Collection"), u;
267
+ const u = J.book_new(), v = J.json_to_sheet(this.data);
268
+ return J.book_append_sheet(u, v, "Collection"), u;
270
269
  }
271
270
  }
272
- var ke = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc", voucherAppUrl: "https://voucher.feedme.cc/" };
273
- const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex items-center justify-end py-4 xs:hidden" }, Oe = /* @__PURE__ */ ae({
271
+ var Fe = { 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/" };
272
+ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex items-center justify-end py-4 xs:hidden" }, Ke = /* @__PURE__ */ ae({
274
273
  __name: "Collections",
275
- setup(v) {
274
+ setup(y) {
276
275
  function u(l) {
277
276
  return l.hideInApp === !1;
278
277
  }
279
- const b = fe(), M = ne(), P = C(), w = D(() => M.params.id), F = C(!1), { custom: $ } = le;
280
- function y(l) {
281
- var a;
282
- return (a = l._id) == null ? void 0 : a.toString();
278
+ const v = fe(), M = ne(), P = C(), F = D(() => M.params.id), k = C(!1), { custom: $ } = le;
279
+ function x(l) {
280
+ var e;
281
+ return (e = l._id) == null ? void 0 : e.toString();
283
282
  }
284
283
  function R(l) {
285
284
  var d;
286
- const a = (d = ke.voucherAppUrl) == null ? void 0 : d.replace(/\/$/, ""), c = y(l);
287
- return !a || !c ? "" : `${a}/c/${c}`;
285
+ const e = (d = Fe.voucherAppUrl) == null ? void 0 : d.replace(/\/$/, ""), c = x(l);
286
+ return !e || !c ? "" : `${e}/c/${c}`;
288
287
  }
289
288
  function n(l) {
290
289
  var d, s;
291
- const a = (d = l.user) == null ? void 0 : d.toString(), c = (s = l.business) == null ? void 0 : s.toString();
292
- return (l.balance || 0) > 0 && (!a || a === c);
290
+ const e = (d = l.user) == null ? void 0 : d.toString(), c = (s = l.business) == null ? void 0 : s.toString();
291
+ return (l.balance || 0) > 0 && (!e || e === c);
293
292
  }
294
293
  async function z(l) {
295
- const a = R(l);
296
- a && await te(a, {
294
+ const e = R(l);
295
+ e && await te(e, {
297
296
  successMessage: "Collection link copied to clipboard"
298
297
  });
299
298
  }
300
- const N = ge(), k = D(
301
- () => N.campaigns.voucher.find(
299
+ const A = ge(), U = D(
300
+ () => A.campaigns.voucher.find(
302
301
  (l) => {
303
- var a;
304
- return ((a = l._id) == null ? void 0 : a.toString()) === w.value;
302
+ var e;
303
+ return ((e = l._id) == null ? void 0 : e.toString()) === F.value;
305
304
  }
306
305
  )
307
306
  ), f = D(
308
- () => !!k.value && !u(k.value)
309
- ), U = D(() => [
307
+ () => !!U.value && !u(U.value)
308
+ ), _ = D(() => [
310
309
  {
311
310
  header: "ID/Code",
312
311
  accessorKey: "_id",
313
312
  cell(l) {
314
- return I("div", { class: "flex items-center" }, [
315
- I(ee.FmIcon, {
313
+ return h("div", { class: "flex items-center" }, [
314
+ h(X.FmIcon, {
316
315
  name: "content_copy",
317
316
  outline: !0,
318
317
  size: "sm",
319
318
  class: "cursor-pointer mr-4",
320
- onClick: (a) => {
321
- a.preventDefault(), a.stopPropagation(), te(
319
+ onClick: (e) => {
320
+ e.preventDefault(), e.stopPropagation(), te(
322
321
  l.row.original.code || l.row.original._id.toString()
323
322
  );
324
323
  }
325
324
  }),
326
- I(
325
+ h(
327
326
  "div",
328
327
  { class: "pr-2 text-ellipsis overflow-hidden" },
329
328
  l.row.original.code || l.row.original._id.toString()
@@ -336,15 +335,28 @@ const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex
336
335
  accessorKey: "user",
337
336
  enableSorting: !1,
338
337
  cell(l) {
339
- const a = l.row.original.pf_user;
340
- return he(a);
338
+ const e = l.row.original.pf_user;
339
+ return h(
340
+ "div",
341
+ {
342
+ class: "flex items-center gap-x-8"
343
+ },
344
+ [
345
+ h(X.FmAvatar, {
346
+ name: e != null && e.photoUrl || e == null ? void 0 : e.name,
347
+ src: (e == null ? void 0 : e.photoUrl) ?? void 0,
348
+ size: "sm"
349
+ }),
350
+ h("span", e == null ? void 0 : e.name)
351
+ ]
352
+ );
341
353
  }
342
354
  },
343
355
  {
344
356
  header: "Phone",
345
357
  accessorFn: (l) => {
346
- var a;
347
- return ((a = l.pf_user) == null ? void 0 : a.phoneNumber) || "-";
358
+ var e;
359
+ return ((e = l.pf_user) == null ? void 0 : e.phoneNumber) || "-";
348
360
  },
349
361
  accessorKey: "pf_user.phoneNumber"
350
362
  },
@@ -361,8 +373,8 @@ const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex
361
373
  header: "Nearest expired at",
362
374
  accessorKey: "expiryBalance",
363
375
  accessorFn: (l) => {
364
- var a;
365
- return l.expiryBalance && l.expiryBalance.length ? E((a = l.expiryBalance) == null ? void 0 : a[0].expiredAt).format("DD MMM YYYY") : "Never expires";
376
+ var e;
377
+ return l.expiryBalance && l.expiryBalance.length ? E((e = l.expiryBalance) == null ? void 0 : e[0].expiredAt).format("DD MMM YYYY") : "Never expires";
366
378
  }
367
379
  },
368
380
  ...f.value ? [
@@ -374,16 +386,16 @@ const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex
374
386
  maxWidth: "72px"
375
387
  },
376
388
  cell(l) {
377
- return n(l.row.original) ? I("div", { class: "flex items-center justify-center" }, [
378
- I(ee.FmButton, {
389
+ return n(l.row.original) ? h("div", { class: "flex items-center justify-center" }, [
390
+ h(X.FmButton, {
379
391
  icon: "share",
380
392
  variant: "tertiary",
381
393
  iconColor: "neutral-gray-400",
382
- onClick: async (a) => {
383
- a.preventDefault(), a.stopPropagation(), await z(l.row.original);
394
+ onClick: async (e) => {
395
+ e.preventDefault(), e.stopPropagation(), await z(l.row.original);
384
396
  }
385
397
  })
386
- ]) : I(
398
+ ]) : h(
387
399
  "div",
388
400
  {
389
401
  class: "flex items-center justify-center text-fm-color-typo-disabled"
@@ -394,39 +406,39 @@ const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex
394
406
  }
395
407
  ] : []
396
408
  ]), K = {
397
- "$connect-STORE_REWARD_COLLECTIONS": ye.readCollectionsByRewardId,
409
+ "$connect-STORE_REWARD_COLLECTIONS": Ce.readCollectionsByRewardId,
398
410
  "$connect-CAMPAIGN_VOUCHER_COLLECTIONS": re.readCollectionsByCampaignId
399
- }, A = (l) => {
400
- const a = K[M.name];
401
- return (c) => a(l, c);
402
- }, { tableMeta: g, rowData: j, onSort: r, debouncedFetchData: e, onSearch: _ } = Ce(A(w.value));
411
+ }, N = (l) => {
412
+ const e = K[M.name];
413
+ return (c) => e(l, c);
414
+ }, { tableMeta: g, rowData: j, onSort: r, debouncedFetchData: t, onSearch: B } = he(N(F.value));
403
415
  async function O() {
404
416
  var l;
405
- await e(), (l = P.value) == null || l.showSheet(!1);
417
+ await t(), (l = P.value) == null || l.showSheet(!1);
406
418
  }
407
419
  async function H() {
408
- F.value || $(
420
+ k.value || $(
409
421
  async () => {
410
422
  var s;
411
- const l = new Fe(), a = A(w.value), c = (await a({
423
+ const l = new we(), e = N(F.value), c = (await e({
412
424
  limit: 1,
413
425
  skip: 0,
414
- sortBy: h.sortBy,
415
- descending: h.descending
416
- })).meta.totalResources ?? 0, d = h.rowsPerPage;
417
- for (let x = 0; x < c; x += d) {
426
+ sortBy: b.sortBy,
427
+ descending: b.descending
428
+ })).meta.totalResources ?? 0, d = b.rowsPerPage;
429
+ for (let S = 0; S < c; S += d) {
418
430
  const G = {
419
- ...h,
431
+ ...b,
420
432
  limit: d,
421
- skip: h.page - 1,
422
- sortBy: h.sortBy,
423
- descending: h.descending
424
- }, o = await a(G);
425
- for await (const m of o.resources) {
426
- const B = m.pf_user, se = {
433
+ skip: b.page - 1,
434
+ sortBy: b.sortBy,
435
+ descending: b.descending
436
+ }, a = await e(G);
437
+ for await (const m of a.resources) {
438
+ const I = m.pf_user, se = {
427
439
  "ID/Code": (m == null ? void 0 : m.code) || ((s = m._id) == null ? void 0 : s.toString()),
428
- User: (B == null ? void 0 : B.name) || "-",
429
- Phone: (B == null ? void 0 : B.phoneNumber) || "-",
440
+ User: (I == null ? void 0 : I.name) || "-",
441
+ Phone: (I == null ? void 0 : I.phoneNumber) || "-",
430
442
  Balance: (m == null ? void 0 : m.balance) || 0,
431
443
  "Created at": E(
432
444
  oe(m._id.toString())
@@ -438,9 +450,9 @@ const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex
438
450
  };
439
451
  l.addRecord(se);
440
452
  }
441
- h.page++;
453
+ b.page++;
442
454
  }
443
- await be(
455
+ await ve(
444
456
  l.buildExcel(),
445
457
  `vouchers-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
446
458
  {
@@ -448,24 +460,24 @@ const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex
448
460
  bookSST: !1,
449
461
  type: "array"
450
462
  }
451
- ), h.page = 1;
463
+ ), b.page = 1;
452
464
  },
453
465
  {
454
- isLoading: F
466
+ isLoading: k
455
467
  }
456
468
  );
457
469
  }
458
470
  return de(async () => {
459
- await e();
460
- }), (l, a) => {
471
+ await t();
472
+ }), (l, e) => {
461
473
  const c = p("FmPageHead"), d = p("FmSearch");
462
- return V(), T(L, null, [
474
+ return w(), T(L, null, [
463
475
  i(c, {
464
476
  title: "Collections",
465
477
  "back-button": !0,
466
478
  actions: [
467
479
  { label: "Export", value: "export", isPrimary: !1 },
468
- ...t(f) ? [
480
+ ...o(f) ? [
469
481
  {
470
482
  label: "Create collection",
471
483
  value: "create",
@@ -473,47 +485,47 @@ const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex
473
485
  }
474
486
  ] : []
475
487
  ],
476
- "onClick:back": a[0] || (a[0] = (s) => t(b).back()),
477
- "onClick:action": a[1] || (a[1] = (s) => {
478
- var x;
479
- s === "create" && ((x = t(P)) == null || x.showSheet(!0)), s === "export" && H();
488
+ "onClick:back": e[0] || (e[0] = (s) => o(v).back()),
489
+ "onClick:action": e[1] || (e[1] = (s) => {
490
+ var S;
491
+ s === "create" && ((S = o(P)) == null || S.showSheet(!0)), s === "export" && H();
480
492
  })
481
493
  }, null, 8, ["actions"]),
482
- S("div", Ue, [
494
+ V("div", ke, [
483
495
  i(d, {
484
496
  class: "hidden xs:!flex border-b border-fm-color-neutral-gray-100",
485
- modelValue: t(g).searchValue,
497
+ modelValue: o(g).searchValue,
486
498
  "onUpdate:modelValue": [
487
- a[2] || (a[2] = (s) => t(g).searchValue = s),
488
- t(_)
499
+ e[2] || (e[2] = (s) => o(g).searchValue = s),
500
+ o(B)
489
501
  ],
490
502
  placeholder: "Search",
491
503
  collapsible: ""
492
504
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
493
- S("div", _e, [
505
+ V("div", Ue, [
494
506
  i(d, {
495
- modelValue: t(g).searchValue,
507
+ modelValue: o(g).searchValue,
496
508
  "onUpdate:modelValue": [
497
- a[3] || (a[3] = (s) => t(g).searchValue = s),
498
- t(_)
509
+ e[3] || (e[3] = (s) => o(g).searchValue = s),
510
+ o(B)
499
511
  ],
500
512
  placeholder: "Search",
501
513
  collapsible: ""
502
514
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
503
515
  ]),
504
- i(ve, {
505
- loading: t(g).isLoading,
506
- "row-data": t(j),
507
- "column-defs": t(U),
508
- "row-count": t(g).totalRows,
509
- "page-count": t(g).pageCount,
510
- "page-index": t(g).pageIndex,
511
- "page-size": t(g).pageSize,
516
+ i(be, {
517
+ loading: o(g).isLoading,
518
+ "row-data": o(j),
519
+ "column-defs": o(_),
520
+ "row-count": o(g).totalRows,
521
+ "page-count": o(g).pageCount,
522
+ "page-index": o(g).pageIndex,
523
+ "page-size": o(g).pageSize,
512
524
  "shrink-at": !1,
513
- onSortChange: t(r),
514
- onPageChange: a[4] || (a[4] = (s) => t(e)({ pageSize: s.pageSize, pageIndex: s.pageIndex }))
525
+ onSortChange: o(r),
526
+ onPageChange: e[4] || (e[4] = (s) => o(t)({ pageSize: s.pageSize, pageIndex: s.pageIndex }))
515
527
  }, null, 8, ["loading", "row-data", "column-defs", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
516
- i(we, {
528
+ i(Ve, {
517
529
  ref_key: "sheetRef",
518
530
  ref: P,
519
531
  onSuccess: O
@@ -524,5 +536,5 @@ const Ue = { class: "px-24 flex flex-col gap-y-32 pb-24" }, _e = { class: "flex
524
536
  }
525
537
  });
526
538
  export {
527
- Oe as default
539
+ Ke as default
528
540
  };