@feedmepos/mf-connect 0.1.98-beta.9 → 0.1.99-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 (121) hide show
  1. package/dist/Analytic-CmlJa1WX.js +426 -0
  2. package/dist/{App-CwMrP0Q-.js → App-D0thRELq.js} +807 -673
  3. package/dist/{Bin-sSw4Gatd.js → Bin-DnkPcZdC.js} +8 -8
  4. package/dist/{Broadcast-DH2Fpb-O.js → Broadcast-o6nSQOsx.js} +17 -18
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cd47Mrej.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BPGzh4u8.js} +6 -5
  6. package/dist/{Card-D4YJZ_I8.js → Card-zjezSaRB.js} +19 -19
  7. package/dist/{Collections--8QcjuAp.js → Collections-48W_jFFS.js} +185 -197
  8. package/dist/{Credit-DgF3qd52.js → Credit-CYaCjNVK.js} +53 -54
  9. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D3SnYlQ0.js +2223 -0
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BgHApZqm.js → EffectSheet.vue_vue_type_style_index_0_lang-CbpKQj-r.js} +6 -6
  11. package/dist/{Experience-DxtkVeS9.js → Experience-HmfLlywu.js} +34 -35
  12. package/dist/{FileSaver.min-BtPuPAIo.js → FileSaver.min-cDraiw9g.js} +1 -1
  13. package/dist/{Game-CbcrkUBh.js → Game-DHLdDQRi.js} +15 -16
  14. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CqoO7N7r.js → ImageInput.vue_vue_type_script_setup_true_lang-DZrmFruC.js} +1 -1
  15. package/dist/{Index-BzPX7mr1.js → Index-CMm5L1Ph.js} +10 -10
  16. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-mI-5po-a.js → LocationPicker.vue_vue_type_script_setup_true_lang-B6tGeGGC.js} +1 -1
  17. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DyP3ipwX.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CV4V9qlc.js} +1 -1
  18. package/dist/{MainLayout-gxkaZeZ-.js → MainLayout-iru8naVF.js} +1 -1
  19. package/dist/{Marketing-BlMjT0cP.js → Marketing-AP8z-pA0.js} +4 -4
  20. package/dist/{MarketingMaterialEdit-v0vGn3Lz.js → MarketingMaterialEdit-HYTdiTvs.js} +211 -214
  21. package/dist/{Member-BBUlAPqZ.js → Member-N_ks2GiW.js} +20 -20
  22. package/dist/{MemberList-DZJhULFD.js → MemberList-Cj8EfN0q.js} +51 -50
  23. package/dist/{MemberTransactions-CTBoDEg4.js → MemberTransactions-DUj4Fq6M.js} +1 -1
  24. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-nlYOP9gZ.js → MessageInput.vue_vue_type_script_setup_true_lang-ZD6_8BzX.js} +11 -11
  25. package/dist/{Mission-D_xjOnWO.js → Mission-DfZ0brqC.js} +34 -35
  26. package/dist/{Overview-C5-uSEJH.js → Overview-BnFPQbSg.js} +19 -19
  27. package/dist/Overview-kB_HApIc.js +969 -0
  28. package/dist/{Point-BmVyG_i-.js → Point-PsWJEEsn.js} +29 -30
  29. package/dist/{Promotion-BWmTkHyw.js → Promotion-BsNT1kOG.js} +105 -111
  30. package/dist/{Queue-Do2XlY5H.js → Queue-Cgw3PgEi.js} +43 -43
  31. package/dist/{Record-BIzUOikr.js → Record-DwzoIz3R.js} +10 -10
  32. package/dist/Review-kF2wLu5o.js +46 -0
  33. package/dist/ReviewFacebookCallback-B6RjqR5T.js +238 -0
  34. package/dist/ReviewGoogleCallback-DjLK1b4-.js +213 -0
  35. package/dist/{Reward-gCpIJIq9.js → Reward-C8O5U2NU.js} +17 -17
  36. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Dkyz-W9m.js → RewardGroup.vue_vue_type_script_setup_true_lang-BqKABBF1.js} +12 -12
  37. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DvNyurCW.js +1888 -0
  38. package/dist/{Segment-CZrzY2st.js → Segment-BtmeNQnL.js} +78 -77
  39. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-B1qAMtkn.js → SelectItems.vue_vue_type_script_setup_true_lang-P4wy1bqG.js} +3 -3
  40. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dc36wzB0.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DQ93AOeI.js} +12 -12
  41. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BtnF-BPt.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-B3P7Ob40.js} +4 -4
  42. package/dist/{Setting-JrI4ttI1.js → Setting-D1SQ6TKF.js} +248 -259
  43. package/dist/{SettingAdvertisements-iOOpEUlI.js → SettingAdvertisements-pUTX9uu3.js} +13 -13
  44. package/dist/Settings-Bbd3cMNH.js +228 -0
  45. package/dist/{Store-DbXKThJn.js → Store-Dgc-J8Q7.js} +24 -24
  46. package/dist/{StoreRewards-CfkwVw7d.js → StoreRewards-CJ090vEj.js} +16 -16
  47. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B35vDFFq.js +1067 -0
  48. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-5Aazsvfa.js +142 -0
  49. package/dist/{Tier-BVrAqpWt.js → Tier-CKGyFDiY.js} +469 -544
  50. package/dist/{Title-DhumBh-S.js → Title-DXRex7t9.js} +92 -93
  51. package/dist/{Transaction-BQLge28p.js → Transaction-B1eC-Gln.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CSPaj2uN.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B2GABNUx.js} +6 -6
  53. package/dist/{Voucher-DeB4YhvL.js → Voucher-Omh_kYVH.js} +27 -28
  54. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BjUFEIlS.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DD2WD_Vt.js} +12 -12
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BzrPUcC9.js → ZodTextField.vue_vue_type_script_setup_true_lang-CAtzo8zL.js} +2 -2
  56. package/dist/{app-BHIG18wW.js → app-D8i8XAyR.js} +1439 -1406
  57. package/dist/app.js +3 -4
  58. package/dist/{business-CCmy2VBj.js → business-6gZtKQ8L.js} +1 -1
  59. package/dist/{campaign-DiFdvcPE.js → campaign-DIgbywUy.js} +64 -114
  60. package/dist/{campaign-jofcGLi8.js → campaign-MPUFwgli.js} +7 -13
  61. package/dist/{campaign.enum-CBp5IeWz.js → campaign.enum-CSlbGhc-.js} +2 -3
  62. package/dist/{campaign.fn-BZ0Ivuwi.js → campaign.fn-BvxZt-0r.js} +65 -65
  63. package/dist/{collectible.enum-frp5wluZ.js → collectible.enum-20LKRFir.js} +1 -1
  64. package/dist/collection.fn-03oGQuF_.js +26 -0
  65. package/dist/dto-C5_Te4gk.js +216 -0
  66. package/dist/{effect-BegkMXTr.js → effect-CkurpNMu.js} +1 -1
  67. package/dist/{email-addresses-B0t3BKV6.js → email-addresses-CR8pgurp.js} +2 -2
  68. package/dist/{export-CGrchnsA.js → export-CfDeISbW.js} +3 -3
  69. package/dist/google-BQK68wbe.js +5 -0
  70. package/dist/{helper-CIYSBZvt.js → helper-BQYvN6FL.js} +1 -1
  71. package/dist/{index-Dg_OJTxE.js → index-6FvsyekG.js} +1 -1
  72. package/dist/index-ARC-NYFZ.js +55 -0
  73. package/dist/{index-Cv0pq7A_.js → index-C9j6OhgK.js} +302 -634
  74. package/dist/{index-BPh_k5rA.js → index-CH_QL_76.js} +3 -3
  75. package/dist/{index-DdAl4SK2.js → index-CJUzQG6t.js} +26 -17
  76. package/dist/{index-PmoP3mXP.js → index-Cv-DbZdw.js} +7 -7
  77. package/dist/{index-D4_JDL9j.js → index-D6wOnTAl.js} +3 -3
  78. package/dist/{index-CixwNfnv.js → index-D8vmbFE5.js} +1 -1
  79. package/dist/{index-DcE-11T-.js → index-DW7H-3z4.js} +1275 -1506
  80. package/dist/{index-C_6y8OES.js → index-Dcxjgr6s.js} +1 -1
  81. package/dist/{index-CF1RNy12.js → index-Dz130JVH.js} +1 -1
  82. package/dist/{index-BBgVfqVf.js → index-ERqXuFvQ.js} +1 -1
  83. package/dist/{index-C-2YkeBp.js → index-hTgJrZR8.js} +1968 -1996
  84. package/dist/{index.esm2017-QGfAIiCc.js → index.esm2017-DY9Lrb0O.js} +184 -184
  85. package/dist/{loading-Cql_LElt.js → loading-EnU7K0k3.js} +1 -1
  86. package/dist/{lodash-PMdIVUsY.js → lodash-Cr7KdLib.js} +1 -1
  87. package/dist/{membership-BHD1GQ45.js → membership-B1eIzQDB.js} +3 -3
  88. package/dist/{money-CASVly6f.js → money-DpUzzEJj.js} +1 -1
  89. package/dist/{number-dMI2x0jy.js → number-DAz9zOKI.js} +1 -1
  90. package/dist/object-qECH92oz.js +26 -0
  91. package/dist/objectid-LXOkMCkM.js +145 -0
  92. package/dist/{plugins-CnEVta3V.js → plugins-DJ13vaqz.js} +95 -94
  93. package/dist/{reward-vdrNMYrF.js → reward-Cmx_swM1.js} +1 -1
  94. package/dist/{rule-BLXUDFEw.js → rule-BCzySyr6.js} +487 -505
  95. package/dist/rule-builder-CDkWYBLG.js +102 -0
  96. package/dist/style.css +1 -1
  97. package/dist/template-DfnYZzoa.js +236 -0
  98. package/dist/{index-DzQCyuGA.js → timezone-Beb0XkZC.js} +20 -21
  99. package/dist/{trigger-Ccrh378a.js → trigger-BfQprjI-.js} +5 -5
  100. package/dist/{useMarketingMaterialActions-BQLBRa3G.js → useMarketingMaterialActions-CagN58AP.js} +3 -3
  101. package/dist/{usePagination-BjsffqjT.js → usePagination-XyeJR5ws.js} +1 -1
  102. package/dist/{user-B5jS1GLb.js → user-l2YG1VjD.js} +1 -1
  103. package/dist/{vue-i18n-CCjHlB6z.js → vue-i18n-DJXhpQga.js} +391 -391
  104. package/dist/{xlsx-DmBOvA2N.js → xlsx-DypdT1NW.js} +1 -1
  105. package/dist/{zod-DrYZ6KS4.js → zod-BM5P7Bti.js} +1 -1
  106. package/package.json +4 -8
  107. package/dist/AuditLogs-CAtlilma.js +0 -2013
  108. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bpr9KuHW.js +0 -3377
  109. package/dist/Grab-CDhmMNsL.js +0 -300
  110. package/dist/LoyaltyDashboard-BFjI3IWT.js +0 -1082
  111. package/dist/Review-D9cFDrhN.js +0 -1192
  112. package/dist/ReviewFacebookCallback-DbE8_6D3.js +0 -243
  113. package/dist/ReviewGoogleCallback-LMZgyopt.js +0 -208
  114. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BEqgU70M.js +0 -1911
  115. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CNC_jNgW.js +0 -1130
  116. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BBlCR4pN.js +0 -7007
  117. package/dist/duplicateCampaign-CxuNftok.js +0 -51
  118. package/dist/index-Dc-I4Jr-.js +0 -67
  119. package/dist/object-BYyQ0PZp.js +0 -18
  120. package/dist/objectid-Db_4Ays3.js +0 -145
  121. package/dist/template-CRjkIq3e.js +0 -188
@@ -1,28 +1,29 @@
1
1
  var ie = Object.defineProperty;
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";
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";
5
5
  import { h as E } from "./moment-D7p2TMB-.js";
6
- import { components as X } from "@feedmepos/ui-library";
7
- import "./index-BPh_k5rA.js";
6
+ import { components as ee } from "@feedmepos/ui-library";
7
+ import "./index-CH_QL_76.js";
8
8
  import { J as me } from "./JsonViewer-v8_C7l5N.js";
9
- import { u as le } from "./loading-Cql_LElt.js";
9
+ import { u as le } from "./loading-EnU7K0k3.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-jofcGLi8.js";
13
- import { e as b } from "./index-vh86FiIQ.js";
14
- import { u as J, w as ve } from "./xlsx-DmBOvA2N.js";
15
- import { u as he, _ as be } from "./usePagination-BjsffqjT.js";
16
- import { c as te } from "./plugins-CnEVta3V.js";
17
- import { m as Ce } from "./index-Dg_OJTxE.js";
12
+ import { c as re, u as ge } from "./campaign-MPUFwgli.js";
13
+ import { e as h } from "./index-vh86FiIQ.js";
14
+ import { u as X, w as be } from "./xlsx-DypdT1NW.js";
15
+ import { g as he } from "./user-l2YG1VjD.js";
16
+ import { u as Ce, _ as ve } from "./usePagination-XyeJR5ws.js";
17
+ import { c as te } from "./plugins-DJ13vaqz.js";
18
+ import { m as ye } from "./index-6FvsyekG.js";
18
19
  import { o as oe } from "./objectId-dwaoBfJX.js";
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({
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({
20
21
  __name: "CreateCollectionSheet",
21
22
  emits: ["success"],
22
- setup(y, { expose: u, emit: v }) {
23
- const { minor: M } = le, P = ne(), F = C(), k = C(!1), $ = v, x = C(!1);
23
+ setup(v, { expose: u, emit: b }) {
24
+ const { minor: M } = le, P = ne(), w = C(), F = C(!1), $ = b, y = C(!1);
24
25
  function R(r) {
25
- x.value = r, r && (n.value = {
26
+ y.value = r, r && (n.value = {
26
27
  quantity: 1,
27
28
  code: "",
28
29
  codeConfig: {
@@ -55,7 +56,7 @@ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, S
55
56
  value: "single",
56
57
  sublabel: "Enter your own custom codes"
57
58
  }
58
- ], A = [
59
+ ], N = [
59
60
  {
60
61
  label: "Alphanumeric",
61
62
  value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@ -68,10 +69,10 @@ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, S
68
69
  { label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
69
70
  { label: "Numbers", value: "0123456789" },
70
71
  { label: "Custom", value: "" }
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(
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(
75
76
  async () => {
76
77
  await re.createCollectionByCampaignId(K.value, r), await $("success");
77
78
  },
@@ -85,164 +86,164 @@ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, S
85
86
  showSheet: R
86
87
  }), W(
87
88
  () => f.value,
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 = "########");
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 = "########");
90
91
  }
91
92
  );
92
93
  function g(r) {
93
94
  if (f.value !== "single") return !1;
94
- const t = r.split(`
95
- `).map((B) => B.trim()).filter(Boolean);
96
- return new Set(t).size !== t.length;
95
+ const e = r.split(`
96
+ `).map((_) => _.trim()).filter(Boolean);
97
+ return new Set(e).size !== e.length;
97
98
  }
98
99
  function j(r) {
99
100
  return /[ \t]/.test(r);
100
101
  }
101
102
  return W(
102
103
  () => n.value.codeConfig.length,
103
- (r, t) => {
104
- r != t && (n.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(r))));
104
+ (r, e) => {
105
+ r != e && (n.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(r))));
105
106
  }
106
107
  ), W(
107
108
  () => n.value.codeConfig.pattern,
108
- (r, t) => {
109
- r != t && (n.value.codeConfig.length = (n.value.codeConfig.pattern.match(/#/g) || []).length);
109
+ (r, e) => {
110
+ r != e && (n.value.codeConfig.length = (n.value.codeConfig.pattern.match(/#/g) || []).length);
110
111
  }
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, {
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, {
114
115
  "max-width": 560,
115
116
  "dismiss-away": !0,
116
117
  header: "Create collection",
117
- modelValue: o(x),
118
+ modelValue: t(y),
118
119
  "onUpdate:modelValue": [
119
- t[14] || (t[14] = (a) => ee(x) ? x.value = a : null),
120
- t[15] || (t[15] = (a) => x.value = a)
120
+ e[14] || (e[14] = (o) => Z(y) ? y.value = o : null),
121
+ e[15] || (e[15] = (o) => y.value = o)
121
122
  ]
122
123
  }, {
123
124
  "side-sheet-footer": Y(() => [
124
- V("div", Se, [
125
- i(S, {
125
+ S("div", Ve, [
126
+ i(x, {
126
127
  label: "Save",
127
- onClick: t[12] || (t[12] = (a) => N(o(n))),
128
- loading: o(pe)().isLoading
128
+ onClick: e[12] || (e[12] = (o) => A(t(n))),
129
+ loading: t(pe)().isLoading
129
130
  }, null, 8, ["loading"]),
130
- i(S, {
131
+ i(x, {
131
132
  label: "Cancel",
132
133
  type: "button",
133
134
  variant: "tertiary",
134
- onClick: t[13] || (t[13] = (a) => x.value = !1)
135
+ onClick: e[13] || (e[13] = (o) => y.value = !1)
135
136
  })
136
137
  ])
137
138
  ]),
138
139
  default: Y(() => [
139
- i(me, { json: o(n) }, null, 8, ["json"]),
140
+ i(me, { json: t(n) }, null, 8, ["json"]),
140
141
  i(s, {
141
142
  ref_key: "form",
142
- ref: F,
143
+ ref: w,
143
144
  class: "space-y-40",
144
- onValidationSuccess: t[10] || (t[10] = (a) => k.value = !0),
145
- onValidationFailed: t[11] || (t[11] = (a) => k.value = !1)
145
+ onValidationSuccess: e[10] || (e[10] = (o) => F.value = !0),
146
+ onValidationFailed: e[11] || (e[11] = (o) => F.value = !1)
146
147
  }, {
147
148
  default: Y(() => [
148
- V("div", null, [
149
- t[16] || (t[16] = V("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1)),
149
+ S("div", null, [
150
+ e[16] || (e[16] = S("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1)),
150
151
  i(O, {
151
- modelValue: o(f),
152
- "onUpdate:modelValue": t[0] || (t[0] = (a) => ee(f) ? f.value = a : null),
152
+ modelValue: t(f),
153
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => Z(f) ? f.value = o : null),
153
154
  inline: !1
154
155
  }, {
155
156
  default: Y(() => [
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
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
161
162
  }, null, 8, ["value", "label", "sublabel"])), 64))
162
163
  ]),
163
164
  _: 1
164
165
  }, 8, ["modelValue"])
165
166
  ]),
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 }, [
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 }, [
169
170
  i(H, {
170
- "model-value": o(_),
171
+ "model-value": t(U),
171
172
  "label-placement": "right",
172
173
  value: "true",
173
174
  label: "Advance code setting",
174
175
  required: !0,
175
- "onUpdate:modelValue": t[1] || (t[1] = () => _.value = !o(_))
176
+ "onUpdate:modelValue": e[1] || (e[1] = () => U.value = !t(U))
176
177
  }, null, 8, ["model-value"]),
177
- o(_) ? (w(), T(L, { key: 0 }, [
178
+ t(U) ? (V(), T(L, { key: 0 }, [
178
179
  i(l, {
179
- modelValue: o(n).codeConfig.length,
180
- "onUpdate:modelValue": t[2] || (t[2] = (a) => o(n).codeConfig.length = a),
180
+ modelValue: t(n).codeConfig.length,
181
+ "onUpdate:modelValue": e[2] || (e[2] = (o) => t(n).codeConfig.length = o),
181
182
  label: "Code length",
182
183
  max: 16,
183
184
  min: 1,
184
185
  rules: [
185
- (a) => Number(a) >= 1 || "Code length must at least 1",
186
- (a) => Number(a) <= 16 || "Code length must less than 16"
186
+ (o) => Number(o) >= 1 || "Code length must at least 1",
187
+ (o) => Number(o) <= 16 || "Code length must less than 16"
187
188
  ],
188
189
  required: !0
189
190
  }, null, 8, ["modelValue", "rules"]),
190
- i(e, {
191
+ i(a, {
191
192
  label: "Charset",
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;
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;
197
198
  })
198
199
  }, null, 8, ["model-value", "helper-text"]),
199
- o(U) === "" ? (w(), Q(c, {
200
+ t(k) === "" ? (V(), Q(c, {
200
201
  key: 0,
201
- modelValue: o(n).codeConfig.charset,
202
- "onUpdate:modelValue": t[4] || (t[4] = (a) => o(n).codeConfig.charset = a),
202
+ modelValue: t(n).codeConfig.charset,
203
+ "onUpdate:modelValue": e[4] || (e[4] = (o) => t(n).codeConfig.charset = o),
203
204
  label: "Custom Charset",
204
205
  required: ""
205
206
  }, null, 8, ["modelValue"])) : q("", !0),
206
- V("div", xe, [
207
+ S("div", Se, [
207
208
  i(c, {
208
- modelValue: o(n).codeConfig.prefix,
209
- "onUpdate:modelValue": t[5] || (t[5] = (a) => o(n).codeConfig.prefix = a),
209
+ modelValue: t(n).codeConfig.prefix,
210
+ "onUpdate:modelValue": e[5] || (e[5] = (o) => t(n).codeConfig.prefix = o),
210
211
  label: "Prefix (Optional)"
211
212
  }, null, 8, ["modelValue"]),
212
213
  i(c, {
213
- modelValue: o(n).codeConfig.suffix,
214
- "onUpdate:modelValue": t[6] || (t[6] = (a) => o(n).codeConfig.suffix = a),
214
+ modelValue: t(n).codeConfig.suffix,
215
+ "onUpdate:modelValue": e[6] || (e[6] = (o) => t(n).codeConfig.suffix = o),
215
216
  label: "Suffix (Optional)"
216
217
  }, null, 8, ["modelValue"])
217
218
  ]),
218
219
  i(c, {
219
- modelValue: o(n).codeConfig.pattern,
220
- "onUpdate:modelValue": t[7] || (t[7] = (a) => o(n).codeConfig.pattern = a),
220
+ modelValue: t(n).codeConfig.pattern,
221
+ "onUpdate:modelValue": e[7] || (e[7] = (o) => t(n).codeConfig.pattern = o),
221
222
  label: "Pattern",
222
223
  required: !0
223
224
  }, null, 8, ["modelValue"])
224
225
  ], 64)) : q("", !0),
225
226
  i(c, {
226
- modelValue: o(n).quantity,
227
- "onUpdate:modelValue": t[8] || (t[8] = (a) => o(n).quantity = a),
227
+ modelValue: t(n).quantity,
228
+ "onUpdate:modelValue": e[8] || (e[8] = (o) => t(n).quantity = o),
228
229
  label: "Number of code",
229
230
  rules: [
230
- (a) => a >= 1 || "Quantity cannot be less than 1",
231
- (a) => a <= 1e4 || "Quantity cannot more than 10,000"
231
+ (o) => o >= 1 || "Quantity cannot be less than 1",
232
+ (o) => o <= 1e4 || "Quantity cannot more than 10,000"
232
233
  ],
233
234
  required: !0,
234
- "helper-text": `${o(n).quantity} claim will be created`
235
+ "helper-text": `${t(n).quantity} claim will be created`
235
236
  }, null, 8, ["modelValue", "rules", "helper-text"])
236
237
  ], 64)) : q("", !0),
237
- o(f) !== "bulk" ? (w(), Q(d, {
238
+ t(f) !== "bulk" ? (V(), Q(d, {
238
239
  key: 1,
239
- modelValue: o(n).code,
240
- "onUpdate:modelValue": t[9] || (t[9] = (a) => o(n).code = a),
240
+ modelValue: t(n).code,
241
+ "onUpdate:modelValue": e[9] || (e[9] = (o) => t(n).code = o),
241
242
  label: "Custom Code",
242
243
  rules: [
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"
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"
246
247
  ],
247
248
  placeholder: "(For multiple codes, please enter in the new row.)"
248
249
  }, null, 8, ["modelValue", "rules"])) : q("", !0)
@@ -256,73 +257,73 @@ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, S
256
257
  };
257
258
  }
258
259
  });
259
- class we {
260
+ class Fe {
260
261
  constructor() {
261
- Z(this, "data", []);
262
+ J(this, "data", []);
262
263
  }
263
264
  addRecord(u) {
264
265
  this.data.push(u);
265
266
  }
266
267
  buildExcel() {
267
- const u = J.book_new(), v = J.json_to_sheet(this.data);
268
- return J.book_append_sheet(u, v, "Collection"), u;
268
+ const u = X.book_new(), b = X.json_to_sheet(this.data);
269
+ return X.book_append_sheet(u, b, "Collection"), u;
269
270
  }
270
271
  }
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({
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({
273
274
  __name: "Collections",
274
- setup(y) {
275
+ setup(v) {
275
276
  function u(l) {
276
277
  return l.hideInApp === !1;
277
278
  }
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();
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();
282
283
  }
283
284
  function R(l) {
284
285
  var d;
285
- const e = (d = Fe.voucherAppUrl) == null ? void 0 : d.replace(/\/$/, ""), c = x(l);
286
- return !e || !c ? "" : `${e}/c/${c}`;
286
+ const a = (d = ke.voucherAppUrl) == null ? void 0 : d.replace(/\/$/, ""), c = y(l);
287
+ return !a || !c ? "" : `${a}/c/${c}`;
287
288
  }
288
289
  function n(l) {
289
290
  var d, s;
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);
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);
292
293
  }
293
294
  async function z(l) {
294
- const e = R(l);
295
- e && await te(e, {
295
+ const a = R(l);
296
+ a && await te(a, {
296
297
  successMessage: "Collection link copied to clipboard"
297
298
  });
298
299
  }
299
- const A = ge(), U = D(
300
- () => A.campaigns.voucher.find(
300
+ const N = ge(), k = D(
301
+ () => N.campaigns.voucher.find(
301
302
  (l) => {
302
- var e;
303
- return ((e = l._id) == null ? void 0 : e.toString()) === F.value;
303
+ var a;
304
+ return ((a = l._id) == null ? void 0 : a.toString()) === w.value;
304
305
  }
305
306
  )
306
307
  ), f = D(
307
- () => !!U.value && !u(U.value)
308
- ), _ = D(() => [
308
+ () => !!k.value && !u(k.value)
309
+ ), U = D(() => [
309
310
  {
310
311
  header: "ID/Code",
311
312
  accessorKey: "_id",
312
313
  cell(l) {
313
- return h("div", { class: "flex items-center" }, [
314
- h(X.FmIcon, {
314
+ return I("div", { class: "flex items-center" }, [
315
+ I(ee.FmIcon, {
315
316
  name: "content_copy",
316
317
  outline: !0,
317
318
  size: "sm",
318
319
  class: "cursor-pointer mr-4",
319
- onClick: (e) => {
320
- e.preventDefault(), e.stopPropagation(), te(
320
+ onClick: (a) => {
321
+ a.preventDefault(), a.stopPropagation(), te(
321
322
  l.row.original.code || l.row.original._id.toString()
322
323
  );
323
324
  }
324
325
  }),
325
- h(
326
+ I(
326
327
  "div",
327
328
  { class: "pr-2 text-ellipsis overflow-hidden" },
328
329
  l.row.original.code || l.row.original._id.toString()
@@ -335,28 +336,15 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
335
336
  accessorKey: "user",
336
337
  enableSorting: !1,
337
338
  cell(l) {
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
- );
339
+ const a = l.row.original.pf_user;
340
+ return he(a);
353
341
  }
354
342
  },
355
343
  {
356
344
  header: "Phone",
357
345
  accessorFn: (l) => {
358
- var e;
359
- return ((e = l.pf_user) == null ? void 0 : e.phoneNumber) || "-";
346
+ var a;
347
+ return ((a = l.pf_user) == null ? void 0 : a.phoneNumber) || "-";
360
348
  },
361
349
  accessorKey: "pf_user.phoneNumber"
362
350
  },
@@ -373,8 +361,8 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
373
361
  header: "Nearest expired at",
374
362
  accessorKey: "expiryBalance",
375
363
  accessorFn: (l) => {
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";
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";
378
366
  }
379
367
  },
380
368
  ...f.value ? [
@@ -386,16 +374,16 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
386
374
  maxWidth: "72px"
387
375
  },
388
376
  cell(l) {
389
- return n(l.row.original) ? h("div", { class: "flex items-center justify-center" }, [
390
- h(X.FmButton, {
377
+ return n(l.row.original) ? I("div", { class: "flex items-center justify-center" }, [
378
+ I(ee.FmButton, {
391
379
  icon: "share",
392
380
  variant: "tertiary",
393
381
  iconColor: "neutral-gray-400",
394
- onClick: async (e) => {
395
- e.preventDefault(), e.stopPropagation(), await z(l.row.original);
382
+ onClick: async (a) => {
383
+ a.preventDefault(), a.stopPropagation(), await z(l.row.original);
396
384
  }
397
385
  })
398
- ]) : h(
386
+ ]) : I(
399
387
  "div",
400
388
  {
401
389
  class: "flex items-center justify-center text-fm-color-typo-disabled"
@@ -406,39 +394,39 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
406
394
  }
407
395
  ] : []
408
396
  ]), K = {
409
- "$connect-STORE_REWARD_COLLECTIONS": Ce.readCollectionsByRewardId,
397
+ "$connect-STORE_REWARD_COLLECTIONS": ye.readCollectionsByRewardId,
410
398
  "$connect-CAMPAIGN_VOUCHER_COLLECTIONS": re.readCollectionsByCampaignId
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));
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));
415
403
  async function O() {
416
404
  var l;
417
- await t(), (l = P.value) == null || l.showSheet(!1);
405
+ await e(), (l = P.value) == null || l.showSheet(!1);
418
406
  }
419
407
  async function H() {
420
- k.value || $(
408
+ F.value || $(
421
409
  async () => {
422
410
  var s;
423
- const l = new we(), e = N(F.value), c = (await e({
411
+ const l = new Fe(), a = A(w.value), c = (await a({
424
412
  limit: 1,
425
413
  skip: 0,
426
- sortBy: b.sortBy,
427
- descending: b.descending
428
- })).meta.totalResources ?? 0, d = b.rowsPerPage;
429
- for (let S = 0; S < c; S += d) {
414
+ sortBy: h.sortBy,
415
+ descending: h.descending
416
+ })).meta.totalResources ?? 0, d = h.rowsPerPage;
417
+ for (let x = 0; x < c; x += d) {
430
418
  const G = {
431
- ...b,
419
+ ...h,
432
420
  limit: d,
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 = {
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 = {
439
427
  "ID/Code": (m == null ? void 0 : m.code) || ((s = m._id) == null ? void 0 : s.toString()),
440
- User: (I == null ? void 0 : I.name) || "-",
441
- Phone: (I == null ? void 0 : I.phoneNumber) || "-",
428
+ User: (B == null ? void 0 : B.name) || "-",
429
+ Phone: (B == null ? void 0 : B.phoneNumber) || "-",
442
430
  Balance: (m == null ? void 0 : m.balance) || 0,
443
431
  "Created at": E(
444
432
  oe(m._id.toString())
@@ -450,9 +438,9 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
450
438
  };
451
439
  l.addRecord(se);
452
440
  }
453
- b.page++;
441
+ h.page++;
454
442
  }
455
- await ve(
443
+ await be(
456
444
  l.buildExcel(),
457
445
  `vouchers-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
458
446
  {
@@ -460,24 +448,24 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
460
448
  bookSST: !1,
461
449
  type: "array"
462
450
  }
463
- ), b.page = 1;
451
+ ), h.page = 1;
464
452
  },
465
453
  {
466
- isLoading: k
454
+ isLoading: F
467
455
  }
468
456
  );
469
457
  }
470
458
  return de(async () => {
471
- await t();
472
- }), (l, e) => {
459
+ await e();
460
+ }), (l, a) => {
473
461
  const c = p("FmPageHead"), d = p("FmSearch");
474
- return w(), T(L, null, [
462
+ return V(), T(L, null, [
475
463
  i(c, {
476
464
  title: "Collections",
477
465
  "back-button": !0,
478
466
  actions: [
479
467
  { label: "Export", value: "export", isPrimary: !1 },
480
- ...o(f) ? [
468
+ ...t(f) ? [
481
469
  {
482
470
  label: "Create collection",
483
471
  value: "create",
@@ -485,47 +473,47 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
485
473
  }
486
474
  ] : []
487
475
  ],
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();
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();
492
480
  })
493
481
  }, null, 8, ["actions"]),
494
- V("div", ke, [
482
+ S("div", Ue, [
495
483
  i(d, {
496
484
  class: "hidden xs:!flex border-b border-fm-color-neutral-gray-100",
497
- modelValue: o(g).searchValue,
485
+ modelValue: t(g).searchValue,
498
486
  "onUpdate:modelValue": [
499
- e[2] || (e[2] = (s) => o(g).searchValue = s),
500
- o(B)
487
+ a[2] || (a[2] = (s) => t(g).searchValue = s),
488
+ t(_)
501
489
  ],
502
490
  placeholder: "Search",
503
491
  collapsible: ""
504
492
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
505
- V("div", Ue, [
493
+ S("div", _e, [
506
494
  i(d, {
507
- modelValue: o(g).searchValue,
495
+ modelValue: t(g).searchValue,
508
496
  "onUpdate:modelValue": [
509
- e[3] || (e[3] = (s) => o(g).searchValue = s),
510
- o(B)
497
+ a[3] || (a[3] = (s) => t(g).searchValue = s),
498
+ t(_)
511
499
  ],
512
500
  placeholder: "Search",
513
501
  collapsible: ""
514
502
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
515
503
  ]),
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,
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,
524
512
  "shrink-at": !1,
525
- onSortChange: o(r),
526
- onPageChange: e[4] || (e[4] = (s) => o(t)({ pageSize: s.pageSize, pageIndex: s.pageIndex }))
513
+ onSortChange: t(r),
514
+ onPageChange: a[4] || (a[4] = (s) => t(e)({ pageSize: s.pageSize, pageIndex: s.pageIndex }))
527
515
  }, null, 8, ["loading", "row-data", "column-defs", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
528
- i(Ve, {
516
+ i(we, {
529
517
  ref_key: "sheetRef",
530
518
  ref: P,
531
519
  onSuccess: O
@@ -536,5 +524,5 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
536
524
  }
537
525
  });
538
526
  export {
539
- Ke as default
527
+ Oe as default
540
528
  };