@feedmepos/mf-connect 0.1.37-prod → 0.1.38-beta.10

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 (118) hide show
  1. package/dist/Analytic-BdyLURDk.js +761 -0
  2. package/dist/{App-Bpo0XZSs.js → App-BLV7hTax.js} +364 -352
  3. package/dist/AuditLogs-DbJczPj1.js +1887 -0
  4. package/dist/{Bin-ohZ2CZZR.js → Bin-BMEEisLw.js} +8 -8
  5. package/dist/{Broadcast-D5x0_-zC.js → Broadcast-kJ4PM-iv.js} +40 -40
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CYb38NXA.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Dyy6Iknj.js} +18 -18
  7. package/dist/{Card-BM-Lrm5y.js → Card-SrRupWyd.js} +159 -159
  8. package/dist/{Collections-Cr4aoJer.js → Collections-CNoranW5.js} +136 -123
  9. package/dist/{Credit-DzDVFv4H.js → Credit-tW7knMvR.js} +74 -74
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bs8o9n1V.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BplJqfmQ.js} +491 -488
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-koqrPPqM.js → EffectSheet.vue_vue_type_style_index_0_lang-DKKptxcn.js} +91 -89
  13. package/dist/{Experience-CjaDdbvZ.js → Experience-DkZIYg_s.js} +41 -41
  14. package/dist/{FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js → FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js} +2 -6
  15. package/dist/{Game-BuiTygow.js → Game-D3smlHJp.js} +31 -31
  16. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  17. package/dist/{Index-CQGzUU-w.js → Index-3Iep5Agi.js} +10 -10
  18. package/dist/Marketing-e3He2TRQ.js +20073 -0
  19. package/dist/Member-CdOzAmzY.js +279 -0
  20. package/dist/MemberList-DPNBniHV.js +1606 -0
  21. package/dist/MemberOverview-wL_ailso.js +58 -0
  22. package/dist/{MemberTransactions-DzG1fY0c.js → MemberTransactions-B4ROd3yQ.js} +1 -1
  23. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-CF0IVI5X.js +60482 -0
  24. package/dist/{Mission-BtypT2uF.js → Mission-BRnOVwzw.js} +21 -21
  25. package/dist/{Overview-Be7bUtRO.js → Overview-DJ4ihjSG.js} +335 -335
  26. package/dist/{Point-Bw4lnLqp.js → Point-X2XbIe2Q.js} +41 -41
  27. package/dist/Promotion-B6FXsO-R.js +289 -0
  28. package/dist/{Queue-CpPEVgn8.js → Queue-kzL4GDld.js} +52 -52
  29. package/dist/{Record-DQq4P69i.js → Record-CbpzqZvu.js} +9 -9
  30. package/dist/{Reward-DJH0eM8u.js → Reward-CnLgcOl6.js} +173 -173
  31. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-_kw_PR0h.js → RewardGroup.vue_vue_type_script_setup_true_lang-CGzaVt3L.js} +11 -11
  32. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BHSbFQ81.js +1751 -0
  33. package/dist/Segment-C9rvyN-t.js +882 -0
  34. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Dx6Ew9Z_.js → SelectItems.vue_vue_type_script_setup_true_lang-Bq2TBHn4.js} +2 -2
  35. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B60_8Toi.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-9rmFSymz.js} +11 -11
  36. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCaJ3xKT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-qAwMzxkn.js} +3 -3
  37. package/dist/Setting-CHWl3Rlt.js +1936 -0
  38. package/dist/{Store-H0UDQpln.js → Store-BEJYH91p.js} +211 -211
  39. package/dist/StoreRewards-C0LoDVM6.js +423 -0
  40. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Q7W66jrt.js +1029 -0
  41. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D-jL1oGS.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-zupkP2uw.js} +1 -1
  42. package/dist/{Tier-CJufQcIz.js → Tier-8dGY0rNK.js} +106 -106
  43. package/dist/{Title-BBMgGUld.js → Title-BdgXkzgT.js} +133 -131
  44. package/dist/{Transaction-DsucPnfp.js → Transaction-BgFnK0ZU.js} +2 -2
  45. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CwOcZEQX.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-gMC5mLHh.js} +6 -6
  46. package/dist/{Voucher-BPvxKO_w.js → Voucher-B2ITqfZO.js} +153 -123
  47. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BZ1uzuZz.js +419 -0
  48. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DMs4XKXM.js → ZodTextField.vue_vue_type_script_setup_true_lang-C9svkJkQ.js} +1 -1
  49. package/dist/{app-D3MT1deX.js → app-BpNK9Shm.js} +164 -125
  50. package/dist/{app-Bo0JpadQ.js → app-kfprY-bq.js} +1 -1
  51. package/dist/app.js +4 -3
  52. package/dist/business-DKrvq1V9.js +79 -0
  53. package/dist/{campaign-j1c3ou7l.js → campaign-DmYOJ9S0.js} +5 -3
  54. package/dist/{campaign-Z3l7BoMg.js → campaign-sim1PpwX.js} +9 -9
  55. package/dist/{campaign.enum-CVXPc5Pd.js → campaign.enum-BD2rWUV4.js} +1 -1
  56. package/dist/campaign.fn-CBkNQbkW.js +758 -0
  57. package/dist/{collectible.enum-CDSikBAy.js → collectible.enum-SmUqreZO.js} +1 -1
  58. package/dist/{collection.fn-Bz38mGMa.js → collection.fn-kt3pF_1n.js} +2 -2
  59. package/dist/{dto-D648NN4s.js → dto-CgQvfjEp.js} +4 -4
  60. package/dist/{effect-DbMAmVSR.js → effect-Cof8Q_oG.js} +1 -1
  61. package/dist/{email-addresses-KOVDrRiK.js → email-addresses-Bq1gqAtY.js} +1 -1
  62. package/dist/{export-cTZf8Avd.js → export-CvhFTpK3.js} +3 -3
  63. package/dist/{helper-BYyfcLqw.js → helper-fHTdEmqM.js} +1 -1
  64. package/dist/index-B5526zoT.js +56 -0
  65. package/dist/index-BKs8ARn4.js +32260 -0
  66. package/dist/{index-DPBHiqsJ.js → index-BOxj8CUi.js} +11 -4
  67. package/dist/{index-nF9iYTlh.js → index-CA6LB3uR.js} +1 -1
  68. package/dist/{index-BrKXRxe_.js → index-CDPz2U9g.js} +1 -1
  69. package/dist/{index-CTPMbFf5.js → index-CNB0Lbxl.js} +10 -9
  70. package/dist/{index-E-0tTd0_.js → index-CYkHKi_f.js} +1 -1
  71. package/dist/{index-B3p0hmIV.js → index-ChdZIg_A.js} +1 -1
  72. package/dist/index-CsaQJMAR.js +66 -0
  73. package/dist/{index-BTb8I_eB.js → index-DBwa778L.js} +1 -1
  74. package/dist/{index-B4MqsaBz.js → index-DFZmjlFv.js} +3 -3
  75. package/dist/{index-BMl2KZts.js → index-DR0MjqoO.js} +11415 -10933
  76. package/dist/{index-BIaCtk8e.js → index-DasON_G8.js} +192 -79
  77. package/dist/index-ZoiSAZFK.js +31 -0
  78. package/dist/{index-CvoShC5J.js → index-meUmYtul.js} +536 -461
  79. package/dist/{index.esm2017-DFYwde30.js → index.esm2017-C7S5pHXF.js} +127 -127
  80. package/dist/{loading-vUArhX_O.js → loading-CWqSCt18.js} +1 -1
  81. package/dist/{membership-BHKv29yt.js → membership-DetnBa1q.js} +3 -3
  82. package/dist/{money-Bl3_QRkE.js → money-BkjOh2D6.js} +1 -1
  83. package/dist/{number-hh_S9w7k.js → number-DgbK531o.js} +1 -1
  84. package/dist/objectid-BQwSaw2U.js +145 -0
  85. package/dist/{plugins-CVes2wzE.js → plugins-OrApXSK1.js} +2 -2
  86. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  87. package/dist/{reward-ANZOdWzf.js → reward-KXD18Lzr.js} +1 -1
  88. package/dist/{rule-BvFk5bQg.js → rule-BnAvQkaq.js} +3 -3
  89. package/dist/{rule-builder-BSN777PN.js → rule-builder-fPUwOVc7.js} +17 -17
  90. package/dist/style.css +4 -1
  91. package/dist/{template-Dh9lDLs_.js → template-SbZEb9hY.js} +64 -64
  92. package/dist/{trigger-C7THbt7R.js → trigger-CnST_aOW.js} +7 -7
  93. package/dist/{usePagination-JoYaROkV.js → usePagination-BeF5K3M7.js} +85 -85
  94. package/dist/{user-DtNR9JY2.js → user-D2wQnmQQ.js} +1 -1
  95. package/dist/{vue-i18n-BWyHnm4m.js → vue-i18n-DiFFrwf8.js} +375 -375
  96. package/dist/{xlsx-7u9SB0oa.js → xlsx-B47YZ_wM.js} +226 -226
  97. package/package.json +9 -3
  98. package/dist/Analytic-CavR2bzs.js +0 -427
  99. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
  100. package/dist/Marketing-BSspYuhg.js +0 -319
  101. package/dist/Member-B4S0UNGq.js +0 -287
  102. package/dist/MemberList-CfnUJ3mh.js +0 -1606
  103. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  104. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-hZUWLTWj.js +0 -455
  105. package/dist/Promotion-Bg6x0rAh.js +0 -255
  106. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CRGep1RK.js +0 -1641
  107. package/dist/Segment-BLB4VWNJ.js +0 -882
  108. package/dist/Setting-GRIUo7vg.js +0 -1932
  109. package/dist/StoreRewards--TNIFaCo.js +0 -423
  110. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CfB8tA5l.js +0 -995
  111. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Bg-9YqLP.js +0 -419
  112. package/dist/business-DMALI7ZO.js +0 -78
  113. package/dist/campaign.fn-rsRhHYZP.js +0 -758
  114. package/dist/index-BsCGyJMY.js +0 -29566
  115. package/dist/index-CuvNtC_M.js +0 -61
  116. package/dist/index-DFKmjCG1.js +0 -44
  117. package/dist/index-Dbd4WA4r.js +0 -61
  118. package/dist/objectid-CEyMlMge.js +0 -145
@@ -1,29 +1,28 @@
1
- var te = Object.defineProperty;
2
- var ae = (f, i, d) => i in f ? te(f, i, { enumerable: !0, configurable: !0, writable: !0, value: d }) : f[i] = d;
3
- var O = (f, i, d) => ae(f, typeof i != "symbol" ? i + "" : i, d);
4
- import { defineComponent as H, ref as p, computed as J, watch as K, resolveComponent as u, openBlock as y, createBlock as T, unref as o, isRef as j, withCtx as I, createElementVNode as h, createVNode as r, createElementBlock as R, Fragment as N, renderList as le, createCommentVNode as U, onMounted as ne, h as z } from "vue";
1
+ var ae = Object.defineProperty;
2
+ var le = (g, i, d) => i in g ? ae(g, i, { enumerable: !0, configurable: !0, writable: !0, value: d }) : g[i] = d;
3
+ var O = (g, i, d) => le(g, typeof i != "symbol" ? i + "" : i, d);
4
+ import { defineComponent as J, ref as f, computed as Q, watch as K, resolveComponent as u, openBlock as y, createBlock as z, unref as o, isRef as j, withCtx as I, createElementVNode as h, createVNode as r, createElementBlock as N, Fragment as P, renderList as ne, createCommentVNode as R, onMounted as se, h as S } from "vue";
5
5
  import { h as G } from "./moment-BWErdI6_.js";
6
- import { components as se } from "@feedmepos/ui-library";
7
- import "./index-BsCGyJMY.js";
6
+ import { components as H } from "@feedmepos/ui-library";
7
+ import "./index-BKs8ARn4.js";
8
8
  import { J as re } from "./JsonViewer-v8_C7l5N.js";
9
- import { u as Q } from "./loading-vUArhX_O.js";
9
+ import { u as W } from "./loading-CWqSCt18.js";
10
10
  import { u as ie } from "./app-wDQR6dpb.js";
11
- import { useRoute as W, useRouter as ue } from "vue-router";
12
- import { c as P } from "./index-B3p0hmIV.js";
13
- import { e as m } from "./index-vh86FiIQ.js";
14
- import { u as Y, w as de } from "./xlsx-7u9SB0oa.js";
15
- import { g as ce } from "./user-DtNR9JY2.js";
16
- import { u as me, _ as pe } from "./usePagination-JoYaROkV.js";
17
- import { a as fe } from "./plugins-CVes2wzE.js";
18
- import { m as ge } from "./index-DPBHiqsJ.js";
19
- import { o as be } from "./objectId-dwaoBfJX.js";
20
- const Ce = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1), he = { class: "space-y-16" }, ve = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1), ye = { class: "gap-16 grid grid-cols-2" }, xe = { class: "flex items-center gap-8" }, Ve = /* @__PURE__ */ H({
11
+ import { useRoute as X, useRouter as ue } from "vue-router";
12
+ import { c as q } from "./index-ChdZIg_A.js";
13
+ import { e as p } from "./index-vh86FiIQ.js";
14
+ import { u as Y, w as de } from "./xlsx-B47YZ_wM.js";
15
+ import { u as ce, _ as me } from "./usePagination-BeF5K3M7.js";
16
+ import { a as pe } from "./plugins-OrApXSK1.js";
17
+ import { m as fe } from "./index-BOxj8CUi.js";
18
+ import { o as ge } from "./objectId-dwaoBfJX.js";
19
+ const be = { class: "space-y-16" }, Ce = { class: "gap-16 grid grid-cols-2" }, ve = { class: "flex items-center gap-8" }, he = /* @__PURE__ */ J({
21
20
  __name: "CreateCollectionSheet",
22
21
  emits: ["success"],
23
- setup(f, { expose: i, emit: d }) {
24
- const { minor: S } = Q, w = W(), F = p(), k = p(!1), q = d, g = p(!1);
22
+ setup(g, { expose: i, emit: d }) {
23
+ const { minor: w } = W, F = X(), k = f(), _ = f(!1), A = d, b = f(!1);
25
24
  function D(s) {
26
- g.value = s, s && (a.value = {
25
+ b.value = s, s && (a.value = {
27
26
  quantity: 1,
28
27
  code: "",
29
28
  codeConfig: {
@@ -35,7 +34,7 @@ const Ce = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
35
34
  }
36
35
  });
37
36
  }
38
- const a = p({
37
+ const a = f({
39
38
  quantity: 1,
40
39
  code: "",
41
40
  codeConfig: {
@@ -56,7 +55,7 @@ const Ce = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
56
55
  value: "single",
57
56
  sublabel: "Enter your own custom codes"
58
57
  }
59
- ], B = [
58
+ ], U = [
60
59
  {
61
60
  label: "Alphanumeric",
62
61
  value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@ -69,12 +68,12 @@ const Ce = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
69
68
  { label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
70
69
  { label: "Numbers", value: "0123456789" },
71
70
  { label: "Custom", value: "" }
72
- ], v = p(B[0].value), c = p("bulk"), x = p(!1), A = J(() => w.params.id);
71
+ ], x = f(U[0].value), c = f("bulk"), V = f(!1), M = Q(() => F.params.id);
73
72
  async function n(s) {
74
73
  var e;
75
- await ((e = F.value) == null ? void 0 : e.validateInputs()), k.value && await S(
74
+ await ((e = k.value) == null ? void 0 : e.validateInputs()), _.value && await w(
76
75
  async () => {
77
- await P.createCollectionByCampaignId(A.value, s), await q("success");
76
+ await q.createCollectionByCampaignId(M.value, s), await A("success");
78
77
  },
79
78
  {
80
79
  message: "Creating claim(s)",
@@ -93,10 +92,10 @@ const Ce = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
93
92
  function l(s) {
94
93
  if (c.value !== "single") return !1;
95
94
  const e = s.split(`
96
- `).map((C) => C.trim()).filter(Boolean);
95
+ `).map((v) => v.trim()).filter(Boolean);
97
96
  return new Set(e).size !== e.length;
98
97
  }
99
- function b(s) {
98
+ function C(s) {
100
99
  return /[ \t]/.test(s);
101
100
  }
102
101
  return K(
@@ -105,19 +104,19 @@ const Ce = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
105
104
  s != e && (a.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(s))));
106
105
  }
107
106
  ), (s, e) => {
108
- const C = u("FmRadio"), M = u("FmRadioGroup"), V = u("FmSwitch"), L = u("FmStepperField"), X = u("FmSelect"), _ = u("FmTextField"), Z = u("FmTextarea"), ee = u("FmForm"), $ = u("FmButton"), oe = u("FmSideSheet");
109
- return y(), T(oe, {
107
+ const v = u("FmRadio"), L = u("FmRadioGroup"), m = u("FmSwitch"), T = u("FmStepperField"), Z = u("FmSelect"), B = u("FmTextField"), ee = u("FmTextarea"), oe = u("FmForm"), $ = u("FmButton"), te = u("FmSideSheet");
108
+ return y(), z(te, {
110
109
  "max-width": 560,
111
110
  "dismiss-away": !0,
112
111
  header: "Create collection",
113
- modelValue: o(g),
112
+ modelValue: o(b),
114
113
  "onUpdate:modelValue": [
115
- e[14] || (e[14] = (t) => j(g) ? g.value = t : null),
116
- e[15] || (e[15] = (t) => g.value = t)
114
+ e[14] || (e[14] = (t) => j(b) ? b.value = t : null),
115
+ e[15] || (e[15] = (t) => b.value = t)
117
116
  ]
118
117
  }, {
119
118
  "side-sheet-footer": I(() => [
120
- h("div", xe, [
119
+ h("div", ve, [
121
120
  r($, {
122
121
  label: "Save",
123
122
  onClick: e[12] || (e[12] = (t) => n(o(a))),
@@ -127,29 +126,29 @@ const Ce = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
127
126
  label: "Cancel",
128
127
  type: "button",
129
128
  variant: "tertiary",
130
- onClick: e[13] || (e[13] = (t) => g.value = !1)
129
+ onClick: e[13] || (e[13] = (t) => b.value = !1)
131
130
  })
132
131
  ])
133
132
  ]),
134
133
  default: I(() => [
135
134
  r(re, { json: o(a) }, null, 8, ["json"]),
136
- r(ee, {
135
+ r(oe, {
137
136
  ref_key: "form",
138
- ref: F,
137
+ ref: k,
139
138
  class: "space-y-40",
140
- onValidationSuccess: e[10] || (e[10] = (t) => k.value = !0),
141
- onValidationFailed: e[11] || (e[11] = (t) => k.value = !1)
139
+ onValidationSuccess: e[10] || (e[10] = (t) => _.value = !0),
140
+ onValidationFailed: e[11] || (e[11] = (t) => _.value = !1)
142
141
  }, {
143
142
  default: I(() => [
144
143
  h("div", null, [
145
- Ce,
146
- r(M, {
144
+ e[16] || (e[16] = h("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1)),
145
+ r(L, {
147
146
  modelValue: o(c),
148
147
  "onUpdate:modelValue": e[0] || (e[0] = (t) => j(c) ? c.value = t : null),
149
148
  inline: !1
150
149
  }, {
151
150
  default: I(() => [
152
- (y(), R(N, null, le(E, (t) => r(C, {
151
+ (y(), N(P, null, ne(E, (t) => r(v, {
153
152
  key: t.value,
154
153
  value: t.value,
155
154
  label: t.label,
@@ -159,19 +158,19 @@ const Ce = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
159
158
  _: 1
160
159
  }, 8, ["modelValue"])
161
160
  ]),
162
- h("div", he, [
163
- ve,
164
- o(c) === "bulk" ? (y(), R(N, { key: 0 }, [
165
- r(V, {
166
- "model-value": o(x),
161
+ h("div", be, [
162
+ e[17] || (e[17] = h("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1)),
163
+ o(c) === "bulk" ? (y(), N(P, { key: 0 }, [
164
+ r(m, {
165
+ "model-value": o(V),
167
166
  "label-placement": "right",
168
167
  value: "true",
169
168
  label: "Advance code setting",
170
169
  required: !0,
171
- "onUpdate:modelValue": e[1] || (e[1] = () => x.value = !o(x))
170
+ "onUpdate:modelValue": e[1] || (e[1] = () => V.value = !o(V))
172
171
  }, null, 8, ["model-value"]),
173
- o(x) ? (y(), R(N, { key: 0 }, [
174
- r(L, {
172
+ o(V) ? (y(), N(P, { key: 0 }, [
173
+ r(T, {
175
174
  modelValue: o(a).codeConfig.length,
176
175
  "onUpdate:modelValue": e[2] || (e[2] = (t) => o(a).codeConfig.length = t),
177
176
  label: "Code length",
@@ -183,42 +182,42 @@ const Ce = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
183
182
  ],
184
183
  required: !0
185
184
  }, null, 8, ["modelValue", "rules"]),
186
- r(X, {
185
+ r(Z, {
187
186
  label: "Charset",
188
- "model-value": o(v),
189
- items: B,
187
+ "model-value": o(x),
188
+ items: U,
190
189
  "helper-text": o(a).codeConfig.charset.length > 62 ? `${o(a).codeConfig.charset.substring(0, 62)}...` : o(a).codeConfig.charset,
191
190
  "onUpdate:modelValue": e[3] || (e[3] = (t) => {
192
- v.value = t, o(a).codeConfig.charset = t;
191
+ x.value = t, o(a).codeConfig.charset = t;
193
192
  })
194
193
  }, null, 8, ["model-value", "helper-text"]),
195
- o(v) === "" ? (y(), T(_, {
194
+ o(x) === "" ? (y(), z(B, {
196
195
  key: 0,
197
196
  modelValue: o(a).codeConfig.charset,
198
197
  "onUpdate:modelValue": e[4] || (e[4] = (t) => o(a).codeConfig.charset = t),
199
198
  label: "Custom Charset",
200
199
  required: ""
201
- }, null, 8, ["modelValue"])) : U("", !0),
202
- h("div", ye, [
203
- r(_, {
200
+ }, null, 8, ["modelValue"])) : R("", !0),
201
+ h("div", Ce, [
202
+ r(B, {
204
203
  modelValue: o(a).codeConfig.prefix,
205
204
  "onUpdate:modelValue": e[5] || (e[5] = (t) => o(a).codeConfig.prefix = t),
206
205
  label: "Prefix (Optional)"
207
206
  }, null, 8, ["modelValue"]),
208
- r(_, {
207
+ r(B, {
209
208
  modelValue: o(a).codeConfig.suffix,
210
209
  "onUpdate:modelValue": e[6] || (e[6] = (t) => o(a).codeConfig.suffix = t),
211
210
  label: "Suffix (Optional)"
212
211
  }, null, 8, ["modelValue"])
213
212
  ]),
214
- r(_, {
213
+ r(B, {
215
214
  modelValue: o(a).codeConfig.pattern,
216
215
  "onUpdate:modelValue": e[7] || (e[7] = (t) => o(a).codeConfig.pattern = t),
217
216
  label: "Pattern",
218
217
  required: !0
219
218
  }, null, 8, ["modelValue"])
220
- ], 64)) : U("", !0),
221
- r(_, {
219
+ ], 64)) : R("", !0),
220
+ r(B, {
222
221
  modelValue: o(a).quantity,
223
222
  "onUpdate:modelValue": e[8] || (e[8] = (t) => o(a).quantity = t),
224
223
  label: "Number of code",
@@ -229,8 +228,8 @@ const Ce = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
229
228
  required: !0,
230
229
  "helper-text": `${o(a).quantity} claim will be created`
231
230
  }, null, 8, ["modelValue", "rules", "helper-text"])
232
- ], 64)) : U("", !0),
233
- o(c) !== "bulk" ? (y(), T(Z, {
231
+ ], 64)) : R("", !0),
232
+ o(c) !== "bulk" ? (y(), z(ee, {
234
233
  key: 1,
235
234
  modelValue: o(a).code,
236
235
  "onUpdate:modelValue": e[9] || (e[9] = (t) => o(a).code = t),
@@ -238,10 +237,10 @@ const Ce = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
238
237
  rules: [
239
238
  (t) => o(c) != "single" || !!t || "Custom code is required",
240
239
  (t) => !l(t) || "Custom code must be unique",
241
- (t) => !b(t) || "Custom code must not contain space"
240
+ (t) => !C(t) || "Custom code must not contain space"
242
241
  ],
243
242
  placeholder: "(For multiple codes, please enter in the new row.)"
244
- }, null, 8, ["modelValue", "rules"])) : U("", !0)
243
+ }, null, 8, ["modelValue", "rules"])) : R("", !0)
245
244
  ])
246
245
  ]),
247
246
  _: 1
@@ -252,7 +251,7 @@ const Ce = /* @__PURE__ */ h("div", { class: "fm-typo-en-body-lg-600" }, "Code t
252
251
  };
253
252
  }
254
253
  });
255
- class Se {
254
+ class xe {
256
255
  constructor() {
257
256
  O(this, "data", []);
258
257
  }
@@ -264,27 +263,27 @@ class Se {
264
263
  return Y.book_append_sheet(i, d, "Collection"), i;
265
264
  }
266
265
  }
267
- const we = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Fe = { class: "flex items-center justify-end py-4 xs:hidden" }, $e = /* @__PURE__ */ H({
266
+ const ye = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ve = { class: "flex items-center justify-end py-4 xs:hidden" }, Le = /* @__PURE__ */ J({
268
267
  __name: "Collections",
269
- setup(f) {
270
- const i = ue(), d = W(), S = p(), w = J(() => d.params.id), F = p(!1), { custom: k } = Q, q = [
268
+ setup(g) {
269
+ const i = ue(), d = X(), w = f(), F = Q(() => d.params.id), k = f(!1), { custom: _ } = W, A = [
271
270
  {
272
271
  header: "ID/Code",
273
272
  accessorKey: "_id",
274
273
  cell(n) {
275
- return z("div", { class: "flex items-center" }, [
276
- z(se.FmIcon, {
274
+ return S("div", { class: "flex items-center" }, [
275
+ S(H.FmIcon, {
277
276
  name: "content_copy",
278
277
  outline: !0,
279
278
  size: "sm",
280
279
  class: "cursor-pointer mr-4",
281
280
  onClick: (l) => {
282
- l.preventDefault(), l.stopPropagation(), fe(
281
+ l.preventDefault(), l.stopPropagation(), pe(
283
282
  n.row.original.code || n.row.original._id.toString()
284
283
  );
285
284
  }
286
285
  }),
287
- z(
286
+ S(
288
287
  "div",
289
288
  { class: "pr-2 text-ellipsis overflow-hidden" },
290
289
  n.row.original.code || n.row.original._id.toString()
@@ -298,7 +297,20 @@ const we = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Fe = { class: "flex
298
297
  enableSorting: !1,
299
298
  cell(n) {
300
299
  const l = n.row.original.pf_user;
301
- return ce(l);
300
+ return S(
301
+ "div",
302
+ {
303
+ class: "flex items-center gap-x-8"
304
+ },
305
+ [
306
+ S(H.FmAvatar, {
307
+ name: l != null && l.photoUrl || l == null ? void 0 : l.name,
308
+ src: (l == null ? void 0 : l.photoUrl) ?? void 0,
309
+ size: "sm"
310
+ }),
311
+ S("span", l == null ? void 0 : l.name)
312
+ ]
313
+ );
302
314
  }
303
315
  },
304
316
  {
@@ -316,7 +328,7 @@ const we = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Fe = { class: "flex
316
328
  {
317
329
  header: "Created at",
318
330
  accessorKey: "_id",
319
- accessorFn: (n) => G(be(n._id.toString())).format("DD MMM YYYY")
331
+ accessorFn: (n) => G(ge(n._id.toString())).format("DD MMM YYYY")
320
332
  },
321
333
  {
322
334
  header: "Nearest expired at",
@@ -326,45 +338,46 @@ const we = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Fe = { class: "flex
326
338
  return n.expiryBalance && n.expiryBalance.length ? G((l = n.expiryBalance) == null ? void 0 : l[0].expiredAt).format("DD MMM YYYY") : "Never expires";
327
339
  }
328
340
  }
329
- ], g = {
330
- "$connect-STORE_REWARD_COLLECTIONS": ge.readCollectionsByRewardId,
331
- "$connect-CAMPAIGN_VOUCHER_COLLECTIONS": P.readCollectionsByCampaignId
341
+ ], b = {
342
+ "$connect-STORE_REWARD_COLLECTIONS": fe.readCollectionsByRewardId,
343
+ "$connect-CAMPAIGN_VOUCHER_COLLECTIONS": q.readCollectionsByCampaignId
332
344
  }, D = (n) => {
333
- const l = g[d.name];
334
- return (b) => l(n, b);
335
- }, { tableMeta: a, rowData: E, onSort: B, debouncedFetchData: v, onSearch: c } = me(D(w.value));
336
- async function x() {
345
+ const l = b[d.name];
346
+ return (C) => l(n, C);
347
+ }, { tableMeta: a, rowData: E, onSort: U, debouncedFetchData: x, onSearch: c } = ce(D(F.value));
348
+ async function V() {
337
349
  var n;
338
- await v(), (n = S.value) == null || n.showSheet(!1);
350
+ await x(), (n = w.value) == null || n.showSheet(!1);
339
351
  }
340
- async function A() {
341
- F.value || k(
352
+ async function M() {
353
+ k.value || _(
342
354
  async () => {
343
355
  var s;
344
- const n = new Se(), l = (await P.readCollectionsByCampaignId(w.value, {
356
+ const n = new xe(), l = (await q.readCollectionsByCampaignId(F.value, {
345
357
  limit: 1,
346
358
  skip: 0,
347
- sortBy: m.sortBy,
348
- descending: m.descending
349
- })).meta.totalResources ?? 0, b = m.rowsPerPage;
350
- for (let e = 0; e < l; e += b) {
351
- const C = {
352
- ...m,
353
- limit: b,
354
- skip: m.page - 1,
355
- sortBy: m.sortBy,
356
- descending: m.descending
357
- }, M = await P.readCollectionsByCampaignId(
358
- w.value,
359
- C
359
+ sortBy: p.sortBy,
360
+ descending: p.descending
361
+ })).meta.totalResources ?? 0, C = p.rowsPerPage;
362
+ for (let e = 0; e < l; e += C) {
363
+ const v = {
364
+ ...p,
365
+ limit: C,
366
+ skip: p.page - 1,
367
+ sortBy: p.sortBy,
368
+ descending: p.descending
369
+ }, L = await q.readCollectionsByCampaignId(
370
+ F.value,
371
+ v
360
372
  );
361
- for await (const V of M.resources) {
362
- const L = {
363
- Id: (V == null ? void 0 : V.code) || ((s = V._id) == null ? void 0 : s.toString()) || ""
373
+ for await (const m of L.resources) {
374
+ const T = {
375
+ Id: (m == null ? void 0 : m.code) || ((s = m._id) == null ? void 0 : s.toString()) || "",
376
+ Balance: (m == null ? void 0 : m.balance) || 0
364
377
  };
365
- n.addRecord(L);
378
+ n.addRecord(T);
366
379
  }
367
- m.page++;
380
+ p.page++;
368
381
  }
369
382
  await de(
370
383
  n.buildExcel(),
@@ -374,19 +387,19 @@ const we = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Fe = { class: "flex
374
387
  bookSST: !1,
375
388
  type: "array"
376
389
  }
377
- ), m.page = 1;
390
+ ), p.page = 1;
378
391
  },
379
392
  {
380
- isLoading: F
393
+ isLoading: k
381
394
  }
382
395
  );
383
396
  }
384
- return ne(async () => {
385
- await v();
397
+ return se(async () => {
398
+ await x();
386
399
  }), (n, l) => {
387
- const b = u("FmPageHead"), s = u("FmSearch");
388
- return y(), R(N, null, [
389
- r(b, {
400
+ const C = u("FmPageHead"), s = u("FmSearch");
401
+ return y(), N(P, null, [
402
+ r(C, {
390
403
  title: "Collections",
391
404
  "back-button": !0,
392
405
  actions: [
@@ -399,11 +412,11 @@ const we = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Fe = { class: "flex
399
412
  ],
400
413
  "onClick:back": l[0] || (l[0] = (e) => o(i).back()),
401
414
  "onClick:action": l[1] || (l[1] = (e) => {
402
- var C;
403
- e === "create" && ((C = o(S)) == null || C.showSheet(!0)), e === "export" && A();
415
+ var v;
416
+ e === "create" && ((v = o(w)) == null || v.showSheet(!0)), e === "export" && M();
404
417
  })
405
418
  }),
406
- h("div", we, [
419
+ h("div", ye, [
407
420
  r(s, {
408
421
  class: "hidden xs:flex border-b border-fm-color-neutral-gray-100",
409
422
  modelValue: o(a).searchValue,
@@ -414,7 +427,7 @@ const we = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Fe = { class: "flex
414
427
  placeholder: "Search",
415
428
  collapsible: ""
416
429
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
417
- h("div", Fe, [
430
+ h("div", Ve, [
418
431
  r(s, {
419
432
  modelValue: o(a).searchValue,
420
433
  "onUpdate:modelValue": [
@@ -425,22 +438,22 @@ const we = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Fe = { class: "flex
425
438
  collapsible: ""
426
439
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
427
440
  ]),
428
- r(pe, {
441
+ r(me, {
429
442
  loading: o(a).isLoading,
430
443
  "row-data": o(E),
431
- "column-defs": q,
444
+ "column-defs": A,
432
445
  "row-count": o(a).totalRows,
433
446
  "page-count": o(a).pageCount,
434
447
  "page-index": o(a).pageIndex,
435
448
  "page-size": o(a).pageSize,
436
449
  "shrink-at": !1,
437
- onSortChange: o(B),
438
- onPageChange: l[4] || (l[4] = (e) => o(v)({ pageSize: e.pageSize, pageIndex: e.pageIndex }))
450
+ onSortChange: o(U),
451
+ onPageChange: l[4] || (l[4] = (e) => o(x)({ pageSize: e.pageSize, pageIndex: e.pageIndex }))
439
452
  }, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
440
- r(Ve, {
453
+ r(he, {
441
454
  ref_key: "sheetRef",
442
- ref: S,
443
- onSuccess: x
455
+ ref: w,
456
+ onSuccess: V
444
457
  }, null, 512)
445
458
  ])
446
459
  ], 64);
@@ -448,5 +461,5 @@ const we = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Fe = { class: "flex
448
461
  }
449
462
  });
450
463
  export {
451
- $e as default
464
+ Le as default
452
465
  };