@feedmepos/mf-connect 0.1.75-prod → 0.1.76-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 (94) hide show
  1. package/dist/{Analytic-DUEvJYDp.js → Analytic-Bu23TSdC.js} +11 -11
  2. package/dist/{App-DYprmn8y.js → App-CFovt5At.js} +7 -7
  3. package/dist/{Bin-2Rk6Xq3_.js → Bin-BTZ0CGHi.js} +8 -8
  4. package/dist/{Broadcast-CjLQtCYq.js → Broadcast-PLGxwGqd.js} +8 -8
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-j_mrCB0-.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BP6EusQ_.js} +6 -6
  6. package/dist/{Card-Nvb2bMYu.js → Card-cHrKRkwH.js} +18 -18
  7. package/dist/{Collections-CWSK6IrK.js → Collections-BdJKSLLq.js} +164 -157
  8. package/dist/{Credit-DvH-Dl3G.js → Credit-D1r1Sdes.js} +8 -8
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-2z373aLJ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BB_rrikT.js} +32 -32
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BJtgROR-.js → EffectSheet.vue_vue_type_style_index_0_lang-BXYIPABz.js} +7 -7
  11. package/dist/{Experience-IUi4k8hW.js → Experience-B8VHgHBW.js} +8 -8
  12. package/dist/{Game-DazUj4ey.js → Game-DUuF8FZi.js} +9 -9
  13. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-D_bjZnDb.js → ImageInput.vue_vue_type_script_setup_true_lang-BC0iTIpa.js} +1 -1
  14. package/dist/{Index-BH_USKnN.js → Index-D-kF-r95.js} +10 -10
  15. package/dist/{Marketing-C8vrSSVl.js → Marketing-MM2XT5Ks.js} +6 -6
  16. package/dist/{Member-CDn4aNMc.js → Member-JePEKywx.js} +10 -10
  17. package/dist/{MemberList-CCqh5_5q.js → MemberList-Doz8RzJr.js} +25 -25
  18. package/dist/{MemberTransactions-B-KMuPKv.js → MemberTransactions-D3r1Shfr.js} +1 -1
  19. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BsHROUsQ.js → MessageInput.vue_vue_type_script_setup_true_lang-Blvhn8Ve.js} +4154 -4093
  20. package/dist/{Mission-BVNGD2_t.js → Mission-Adf3hE_Q.js} +9 -9
  21. package/dist/{Overview-B0-d6Etz.js → Overview-D9C_ngcE.js} +19 -19
  22. package/dist/{Point-Py0HmgNJ.js → Point-C7YytfWh.js} +8 -8
  23. package/dist/{Promotion-DD1vORIo.js → Promotion-DLKzm-Zt.js} +9 -9
  24. package/dist/{Queue-BgijP6U_.js → Queue-BzJkaeos.js} +10 -10
  25. package/dist/{Record-BkeU8cPZ.js → Record-E366_Z-I.js} +8 -8
  26. package/dist/{Reward-C7QrUqwC.js → Reward-DRqDZR_W.js} +16 -16
  27. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CPu1mt3q.js → RewardGroup.vue_vue_type_script_setup_true_lang-mk13fdhG.js} +12 -12
  28. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BcwKLWYK.js → RuleGroup.vue_vue_type_script_setup_true_lang-CT4L602f.js} +15 -15
  29. package/dist/{Segment-DewclEb5.js → Segment-CMBQY0Ew.js} +23 -23
  30. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BD3SnaqX.js → SelectItems.vue_vue_type_script_setup_true_lang-BJwqnJ5q.js} +2 -2
  31. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-C50jqGKS.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-ysfMGi60.js} +12 -12
  32. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B0PbKee9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DJmqtpet.js} +3 -3
  33. package/dist/{Setting-CRx8nEir.js → Setting-Difs2QM2.js} +14 -14
  34. package/dist/{SettingAdvertisements-BSVD1jDZ.js → SettingAdvertisements-nCOD94KT.js} +12 -12
  35. package/dist/{Store-Yp4PCYfn.js → Store-Corm7ovM.js} +21 -21
  36. package/dist/{StoreRewards-DdlPqqgw.js → StoreRewards-Dd9giWnX.js} +15 -15
  37. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BhllzKIH.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DvZnfko7.js} +19 -19
  38. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CYlmLezR.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Ciy_Y3pw.js} +1 -1
  39. package/dist/{Tier-CacLJi_w.js → Tier-CdG8b5i7.js} +21 -21
  40. package/dist/{Title-ChEdSy2e.js → Title-HDBW1XJy.js} +20 -20
  41. package/dist/{Transaction-DzKPGg0z.js → Transaction-BTdCgUTW.js} +2 -2
  42. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BMFHV1rf.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BKAixX5Q.js} +6 -6
  43. package/dist/{Voucher-BY968ZWi.js → Voucher-DXxlsMqy.js} +12 -12
  44. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Dz00eJ9H.js → VoucherEditor.vue_vue_type_script_setup_true_lang-IggVStfo.js} +12 -12
  45. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-D2tee21e.js → ZodTextField.vue_vue_type_script_setup_true_lang-DvZJ4o-A.js} +2 -2
  46. package/dist/{app-BCpSaWo1.js → app-BV-w2LiQ.js} +31 -31
  47. package/dist/{app-DSrIQ4DD.js → app-XylQ73N9.js} +1 -1
  48. package/dist/app.js +1 -1
  49. package/dist/{business-BUwrUiZd.js → business-CmK1Bgrl.js} +1 -1
  50. package/dist/{campaign-C6r437Sl.js → campaign-B0Iu64XS.js} +8 -8
  51. package/dist/{campaign-DRsLRoE_.js → campaign-BbeHkY_g.js} +1 -1
  52. package/dist/{campaign.enum-DEVSDx1x.js → campaign.enum-BTyjcgl5.js} +1 -1
  53. package/dist/campaign.fn-BRylLZN8.js +776 -0
  54. package/dist/{collectible.enum-NmGkgbtx.js → collectible.enum-BaMwAovj.js} +1 -1
  55. package/dist/{collection.fn-DGxXkrKR.js → collection.fn-DMKcRR3s.js} +2 -2
  56. package/dist/{dto-DkzC4UXh.js → dto-DWD2z5aU.js} +4 -4
  57. package/dist/{effect-CCkLz54g.js → effect-BXFkVwFt.js} +1 -1
  58. package/dist/{email-addresses-BI-hzqNp.js → email-addresses-CM4YhQKU.js} +1 -1
  59. package/dist/{export-CWdRRO2G.js → export-CIH5GPPA.js} +3 -3
  60. package/dist/{helper-D_42I-gp.js → helper-Dfi5KBsu.js} +1 -1
  61. package/dist/{index-Dv4rV3ao.js → index-B-EJxIcf.js} +6 -3
  62. package/dist/{index-DuxdcE2l.js → index-BMuFXYr-.js} +1 -1
  63. package/dist/{index-CjY4xs6I.js → index-BijInYgP.js} +1 -1
  64. package/dist/{index-CenoStQr.js → index-Bv3V6gFA.js} +6 -6
  65. package/dist/{index-CjpGoDUN.js → index-CGurwPv7.js} +1 -1
  66. package/dist/{index-BrJL6ynS.js → index-Cb-dmYUO.js} +1 -1
  67. package/dist/{index-GaIw_UC9.js → index-CmCHMjjj.js} +1 -1
  68. package/dist/{index-BzG4v0vX.js → index-CuYPD6KT.js} +1 -1
  69. package/dist/{index-vp_gMtjn.js → index-D3EuM03E.js} +1 -1
  70. package/dist/{index-Bm1wYU16.js → index-DK5SOeWG.js} +3 -3
  71. package/dist/index-DgpNkwMC.js +3159 -0
  72. package/dist/{index-DAzFTh99.js → index-DllrUMlF.js} +3 -3
  73. package/dist/{index-DlgXjTqT.js → index-tBQVmdqJ.js} +3151 -3136
  74. package/dist/{index.esm2017-BzWkzxKj.js → index.esm2017-DaQYdqzn.js} +1 -1
  75. package/dist/{loading-CmNICqjK.js → loading-CqksxFrY.js} +1 -1
  76. package/dist/{membership-DprK3B6Y.js → membership-DldR-rE4.js} +3 -3
  77. package/dist/{money-Dg_iubf-.js → money-DF9CHClT.js} +1 -1
  78. package/dist/{number-Ca2cdigB.js → number-BAUERN5R.js} +1 -1
  79. package/dist/objectid-D8KxKrZP.js +145 -0
  80. package/dist/{plugins-mrq2iOcI.js → plugins-D_xP2_oh.js} +3 -3
  81. package/dist/{reward-CVYK2q-L.js → reward-C_GBKqJ2.js} +1 -1
  82. package/dist/{rule-BXbTGISB.js → rule-DSqtOvSH.js} +3 -3
  83. package/dist/{rule-builder-BRzmaFCC.js → rule-builder-BkLQ-LDJ.js} +1 -1
  84. package/dist/{template-CtPwWw0c.js → template-CSnoZfH8.js} +5 -5
  85. package/dist/{timezone-B64oxXr_.js → timezone-BEtLA-7y.js} +1 -1
  86. package/dist/{trigger-Cg7nb88O.js → trigger-CHDwsOgx.js} +5 -5
  87. package/dist/{user-mcrAB16z.js → user-BqlOvZQu.js} +1 -1
  88. package/dist/{vue-i18n-BbxdiSSM.js → vue-i18n-1NETuk_J.js} +267 -267
  89. package/dist/{xlsx-X5xo5NGx.js → xlsx-CMa9ngC1.js} +1 -1
  90. package/dist/{zod-DrrudjoP.js → zod-DuLxE9Yg.js} +1 -1
  91. package/package.json +4 -1
  92. package/dist/campaign.fn-B4L_dDfB.js +0 -758
  93. package/dist/index-dEHBqn4i.js +0 -3078
  94. package/dist/objectid-D1ROVHbY.js +0 -145
@@ -1,29 +1,29 @@
1
- var re = Object.defineProperty;
2
- var se = (C, u, g) => u in C ? re(C, u, { enumerable: !0, configurable: !0, writable: !0, value: g }) : C[u] = g;
3
- var Q = (C, u, g) => se(C, typeof u != "symbol" ? u + "" : u, g);
4
- import { defineComponent as te, ref as h, computed as P, watch as H, resolveComponent as m, openBlock as V, createBlock as G, unref as t, isRef as X, withCtx as N, createElementVNode as S, createVNode as i, createElementBlock as M, Fragment as T, renderList as ie, createCommentVNode as E, h as B, onMounted as ue } from "vue";
5
- import { h as J } from "./moment-D7p2TMB-.js";
6
- import { components as Z } from "@feedmepos/ui-library";
7
- import "./index-Dv4rV3ao.js";
8
- import { J as ce } from "./JsonViewer-v8_C7l5N.js";
9
- import { u as oe } from "./loading-CmNICqjK.js";
10
- import { u as de } from "./app-wDQR6dpb.js";
11
- import { useRoute as ae, useRouter as me } from "vue-router";
12
- import { c as le, u as pe } from "./campaign-DRsLRoE_.js";
13
- import { e as b } from "./index-vh86FiIQ.js";
14
- import { u as W, w as fe } from "./xlsx-X5xo5NGx.js";
15
- import { g as ge } from "./user-mcrAB16z.js";
16
- import { u as be, _ as he } from "./usePagination-Ds-cuHop.js";
17
- import { a as ee } from "./plugins-mrq2iOcI.js";
18
- import { m as Ce } from "./index-BrJL6ynS.js";
19
- import { o as ve } from "./objectId-dwaoBfJX.js";
20
- const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, Se = { class: "flex items-center gap-8" }, Ve = /* @__PURE__ */ te({
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 A, createElementVNode as S, createVNode as i, createElementBlock as E, Fragment as T, renderList as ce, createCommentVNode as Y, h as I, onMounted as de } from "vue";
5
+ import { h as q } from "./moment-D7p2TMB-.js";
6
+ import { components as ee } from "@feedmepos/ui-library";
7
+ import "./index-B-EJxIcf.js";
8
+ import { J as me } from "./JsonViewer-v8_C7l5N.js";
9
+ import { u as le } from "./loading-CqksxFrY.js";
10
+ import { u as pe } from "./app-wDQR6dpb.js";
11
+ import { useRoute as ne, useRouter as fe } from "vue-router";
12
+ import { c as re, u as ge } from "./campaign-BbeHkY_g.js";
13
+ import { e as h } from "./index-vh86FiIQ.js";
14
+ import { u as X, w as be } from "./xlsx-CMa9ngC1.js";
15
+ import { g as he } from "./user-BqlOvZQu.js";
16
+ import { u as Ce, _ as ve } from "./usePagination-Ds-cuHop.js";
17
+ import { a as te } from "./plugins-D_xP2_oh.js";
18
+ import { m as ye } from "./index-Cb-dmYUO.js";
19
+ 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({
21
21
  __name: "CreateCollectionSheet",
22
22
  emits: ["success"],
23
- setup(C, { expose: u, emit: g }) {
24
- const { minor: R } = oe, I = ae(), w = h(), F = h(!1), L = g, v = h(!1);
25
- function A(r) {
26
- v.value = r, r && (n.value = {
23
+ setup(v, { expose: u, emit: b }) {
24
+ const { minor: M } = le, P = ne(), w = C(), F = C(!1), L = b, y = C(!1);
25
+ function $(r) {
26
+ y.value = r, r && (n.value = {
27
27
  quantity: 1,
28
28
  code: "",
29
29
  codeConfig: {
@@ -35,7 +35,7 @@ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, S
35
35
  }
36
36
  });
37
37
  }
38
- const n = h({
38
+ const n = C({
39
39
  quantity: 1,
40
40
  code: "",
41
41
  codeConfig: {
@@ -45,7 +45,7 @@ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, S
45
45
  suffix: "",
46
46
  pattern: "########"
47
47
  }
48
- }), $ = [
48
+ }), z = [
49
49
  {
50
50
  label: "Bulk codes",
51
51
  value: "bulk",
@@ -56,7 +56,7 @@ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, S
56
56
  value: "single",
57
57
  sublabel: "Enter your own custom codes"
58
58
  }
59
- ], q = [
59
+ ], R = [
60
60
  {
61
61
  label: "Alphanumeric",
62
62
  value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@ -69,12 +69,12 @@ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, S
69
69
  { label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
70
70
  { label: "Numbers", value: "0123456789" },
71
71
  { label: "Custom", value: "" }
72
- ], k = h(q[0].value), p = h("bulk"), U = h(!1), z = P(() => I.params.id);
73
- async function D(r) {
72
+ ], k = C(R[0].value), f = C("bulk"), U = C(!1), K = D(() => P.params.id);
73
+ async function N(r) {
74
74
  var e;
75
- await ((e = w.value) == null ? void 0 : e.validateInputs()), F.value && await R(
75
+ await ((e = w.value) == null ? void 0 : e.validateInputs()), F.value && await M(
76
76
  async () => {
77
- await le.createCollectionByCampaignId(z.value, r), await L("success");
77
+ await re.createCollectionByCampaignId(K.value, r), await L("success");
78
78
  },
79
79
  {
80
80
  message: "Creating claim(s)",
@@ -83,61 +83,61 @@ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, S
83
83
  );
84
84
  }
85
85
  u({
86
- showSheet: A
87
- }), H(
88
- () => p.value,
86
+ showSheet: $
87
+ }), W(
88
+ () => f.value,
89
89
  (r, e) => {
90
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 = "########");
91
91
  }
92
92
  );
93
- function f(r) {
94
- if (p.value !== "single") return !1;
93
+ function g(r) {
94
+ if (f.value !== "single") return !1;
95
95
  const e = r.split(`
96
96
  `).map((_) => _.trim()).filter(Boolean);
97
97
  return new Set(e).size !== e.length;
98
98
  }
99
- function K(r) {
99
+ function j(r) {
100
100
  return /[ \t]/.test(r);
101
101
  }
102
- return H(
102
+ return W(
103
103
  () => n.value.codeConfig.length,
104
104
  (r, e) => {
105
105
  r != e && (n.value.codeConfig.pattern = "#".repeat(Math.min(16, Number(r))));
106
106
  }
107
- ), H(
107
+ ), W(
108
108
  () => n.value.codeConfig.pattern,
109
109
  (r, e) => {
110
110
  r != e && (n.value.codeConfig.length = (n.value.codeConfig.pattern.match(/#/g) || []).length);
111
111
  }
112
112
  ), (r, e) => {
113
- const _ = m("FmRadio"), Y = m("FmRadioGroup"), j = m("FmSwitch"), l = m("FmStepperField"), a = m("FmSelect"), c = m("FmTextField"), d = m("FmTextarea"), s = m("FmForm"), y = m("FmButton"), O = m("FmSideSheet");
114
- return V(), G(O, {
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, {
115
115
  "max-width": 560,
116
116
  "dismiss-away": !0,
117
117
  header: "Create collection",
118
- modelValue: t(v),
118
+ modelValue: t(y),
119
119
  "onUpdate:modelValue": [
120
- e[14] || (e[14] = (o) => X(v) ? v.value = o : null),
121
- e[15] || (e[15] = (o) => v.value = o)
120
+ e[14] || (e[14] = (o) => Z(y) ? y.value = o : null),
121
+ e[15] || (e[15] = (o) => y.value = o)
122
122
  ]
123
123
  }, {
124
- "side-sheet-footer": N(() => [
125
- S("div", Se, [
126
- i(y, {
124
+ "side-sheet-footer": A(() => [
125
+ S("div", Ve, [
126
+ i(x, {
127
127
  label: "Save",
128
- onClick: e[12] || (e[12] = (o) => D(t(n))),
129
- loading: t(de)().isLoading
128
+ onClick: e[12] || (e[12] = (o) => N(t(n))),
129
+ loading: t(pe)().isLoading
130
130
  }, null, 8, ["loading"]),
131
- i(y, {
131
+ i(x, {
132
132
  label: "Cancel",
133
133
  type: "button",
134
134
  variant: "tertiary",
135
- onClick: e[13] || (e[13] = (o) => v.value = !1)
135
+ onClick: e[13] || (e[13] = (o) => y.value = !1)
136
136
  })
137
137
  ])
138
138
  ]),
139
- default: N(() => [
140
- i(ce, { json: t(n) }, null, 8, ["json"]),
139
+ default: A(() => [
140
+ i(me, { json: t(n) }, null, 8, ["json"]),
141
141
  i(s, {
142
142
  ref_key: "form",
143
143
  ref: w,
@@ -145,16 +145,16 @@ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, S
145
145
  onValidationSuccess: e[10] || (e[10] = (o) => F.value = !0),
146
146
  onValidationFailed: e[11] || (e[11] = (o) => F.value = !1)
147
147
  }, {
148
- default: N(() => [
148
+ default: A(() => [
149
149
  S("div", null, [
150
150
  e[16] || (e[16] = S("div", { class: "fm-typo-en-body-lg-600" }, "Code type", -1)),
151
- i(Y, {
152
- modelValue: t(p),
153
- "onUpdate:modelValue": e[0] || (e[0] = (o) => X(p) ? p.value = o : null),
151
+ i(O, {
152
+ modelValue: t(f),
153
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => Z(f) ? f.value = o : null),
154
154
  inline: !1
155
155
  }, {
156
- default: N(() => [
157
- (V(), M(T, null, ie($, (o) => i(_, {
156
+ default: A(() => [
157
+ (V(), E(T, null, ce(z, (o) => i(_, {
158
158
  key: o.value,
159
159
  value: o.value,
160
160
  label: o.label,
@@ -164,10 +164,10 @@ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, S
164
164
  _: 1
165
165
  }, 8, ["modelValue"])
166
166
  ]),
167
- S("div", ye, [
167
+ S("div", xe, [
168
168
  e[17] || (e[17] = S("div", { class: "fm-typo-en-body-lg-600" }, "Settings", -1)),
169
- t(p) === "bulk" ? (V(), M(T, { key: 0 }, [
170
- i(j, {
169
+ t(f) === "bulk" ? (V(), E(T, { key: 0 }, [
170
+ i(H, {
171
171
  "model-value": t(U),
172
172
  "label-placement": "right",
173
173
  value: "true",
@@ -175,7 +175,7 @@ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, S
175
175
  required: !0,
176
176
  "onUpdate:modelValue": e[1] || (e[1] = () => U.value = !t(U))
177
177
  }, null, 8, ["model-value"]),
178
- t(U) ? (V(), M(T, { key: 0 }, [
178
+ t(U) ? (V(), E(T, { key: 0 }, [
179
179
  i(l, {
180
180
  modelValue: t(n).codeConfig.length,
181
181
  "onUpdate:modelValue": e[2] || (e[2] = (o) => t(n).codeConfig.length = o),
@@ -191,20 +191,20 @@ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, S
191
191
  i(a, {
192
192
  label: "Charset",
193
193
  "model-value": t(k),
194
- items: q,
194
+ items: R,
195
195
  "helper-text": t(n).codeConfig.charset.length > 62 ? `${t(n).codeConfig.charset.substring(0, 62)}...` : t(n).codeConfig.charset,
196
196
  "onUpdate:modelValue": e[3] || (e[3] = (o) => {
197
197
  k.value = o, t(n).codeConfig.charset = o;
198
198
  })
199
199
  }, null, 8, ["model-value", "helper-text"]),
200
- t(k) === "" ? (V(), G(c, {
200
+ t(k) === "" ? (V(), Q(c, {
201
201
  key: 0,
202
202
  modelValue: t(n).codeConfig.charset,
203
203
  "onUpdate:modelValue": e[4] || (e[4] = (o) => t(n).codeConfig.charset = o),
204
204
  label: "Custom Charset",
205
205
  required: ""
206
- }, null, 8, ["modelValue"])) : E("", !0),
207
- S("div", xe, [
206
+ }, null, 8, ["modelValue"])) : Y("", !0),
207
+ S("div", Se, [
208
208
  i(c, {
209
209
  modelValue: t(n).codeConfig.prefix,
210
210
  "onUpdate:modelValue": e[5] || (e[5] = (o) => t(n).codeConfig.prefix = o),
@@ -222,7 +222,7 @@ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, S
222
222
  label: "Pattern",
223
223
  required: !0
224
224
  }, null, 8, ["modelValue"])
225
- ], 64)) : E("", !0),
225
+ ], 64)) : Y("", !0),
226
226
  i(c, {
227
227
  modelValue: t(n).quantity,
228
228
  "onUpdate:modelValue": e[8] || (e[8] = (o) => t(n).quantity = o),
@@ -234,19 +234,19 @@ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, S
234
234
  required: !0,
235
235
  "helper-text": `${t(n).quantity} claim will be created`
236
236
  }, null, 8, ["modelValue", "rules", "helper-text"])
237
- ], 64)) : E("", !0),
238
- t(p) !== "bulk" ? (V(), G(d, {
237
+ ], 64)) : Y("", !0),
238
+ t(f) !== "bulk" ? (V(), Q(d, {
239
239
  key: 1,
240
240
  modelValue: t(n).code,
241
241
  "onUpdate:modelValue": e[9] || (e[9] = (o) => t(n).code = o),
242
242
  label: "Custom Code",
243
243
  rules: [
244
- (o) => t(p) != "single" || !!o || "Custom code is required",
245
- (o) => !f(o) || "Custom code must be unique",
246
- (o) => !K(o) || "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"
247
247
  ],
248
248
  placeholder: "(For multiple codes, please enter in the new row.)"
249
- }, null, 8, ["modelValue", "rules"])) : E("", !0)
249
+ }, null, 8, ["modelValue", "rules"])) : Y("", !0)
250
250
  ])
251
251
  ]),
252
252
  _: 1
@@ -257,33 +257,33 @@ const ye = { class: "space-y-16" }, xe = { class: "gap-16 grid grid-cols-2" }, S
257
257
  };
258
258
  }
259
259
  });
260
- class we {
260
+ class Fe {
261
261
  constructor() {
262
- Q(this, "data", []);
262
+ J(this, "data", []);
263
263
  }
264
264
  addRecord(u) {
265
265
  this.data.push(u);
266
266
  }
267
267
  buildExcel() {
268
- const u = W.book_new(), g = W.json_to_sheet(this.data);
269
- return W.book_append_sheet(u, g, "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;
270
270
  }
271
271
  }
272
- var Fe = { 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 ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex items-center justify-end py-4 xs:hidden" }, je = /* @__PURE__ */ te({
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({
274
274
  __name: "Collections",
275
- setup(C) {
275
+ setup(v) {
276
276
  function u(l) {
277
277
  return l.hideInApp === !1;
278
278
  }
279
- const g = me(), R = ae(), I = h(), w = P(() => R.params.id), F = h(!1), { custom: L } = oe;
280
- function v(l) {
279
+ const b = fe(), M = ne(), P = C(), w = D(() => M.params.id), F = C(!1), { custom: L } = le;
280
+ function y(l) {
281
281
  var a;
282
282
  return (a = l._id) == null ? void 0 : a.toString();
283
283
  }
284
- function A(l) {
284
+ function $(l) {
285
285
  var d;
286
- const a = (d = Fe.voucherAppUrl) == null ? void 0 : d.replace(/\/$/, ""), c = v(l);
286
+ const a = (d = ke.voucherAppUrl) == null ? void 0 : d.replace(/\/$/, ""), c = y(l);
287
287
  return !a || !c ? "" : `${a}/c/${c}`;
288
288
  }
289
289
  function n(l) {
@@ -291,39 +291,39 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
291
291
  const a = (d = l.user) == null ? void 0 : d.toString(), c = (s = l.business) == null ? void 0 : s.toString();
292
292
  return (l.balance || 0) > 0 && (!a || a === c);
293
293
  }
294
- async function $(l) {
295
- const a = A(l);
296
- a && await ee(a, {
294
+ async function z(l) {
295
+ const a = $(l);
296
+ a && await te(a, {
297
297
  successMessage: "Collection link copied to clipboard"
298
298
  });
299
299
  }
300
- const q = pe(), k = P(
301
- () => q.campaigns.voucher.find(
300
+ const R = ge(), k = D(
301
+ () => R.campaigns.voucher.find(
302
302
  (l) => {
303
303
  var a;
304
304
  return ((a = l._id) == null ? void 0 : a.toString()) === w.value;
305
305
  }
306
306
  )
307
- ), p = P(
307
+ ), f = D(
308
308
  () => !!k.value && !u(k.value)
309
- ), U = P(() => [
309
+ ), U = D(() => [
310
310
  {
311
311
  header: "ID/Code",
312
312
  accessorKey: "_id",
313
313
  cell(l) {
314
- return B("div", { class: "flex items-center" }, [
315
- B(Z.FmIcon, {
314
+ return I("div", { class: "flex items-center" }, [
315
+ I(ee.FmIcon, {
316
316
  name: "content_copy",
317
317
  outline: !0,
318
318
  size: "sm",
319
319
  class: "cursor-pointer mr-4",
320
320
  onClick: (a) => {
321
- a.preventDefault(), a.stopPropagation(), ee(
321
+ a.preventDefault(), a.stopPropagation(), te(
322
322
  l.row.original.code || l.row.original._id.toString()
323
323
  );
324
324
  }
325
325
  }),
326
- B(
326
+ I(
327
327
  "div",
328
328
  { class: "pr-2 text-ellipsis overflow-hidden" },
329
329
  l.row.original.code || l.row.original._id.toString()
@@ -337,7 +337,7 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
337
337
  enableSorting: !1,
338
338
  cell(l) {
339
339
  const a = l.row.original.pf_user;
340
- return ge(a);
340
+ return he(a);
341
341
  }
342
342
  },
343
343
  {
@@ -355,17 +355,17 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
355
355
  {
356
356
  header: "Created at",
357
357
  accessorKey: "_id",
358
- accessorFn: (l) => J(ve(l._id.toString())).format("DD MMM YYYY")
358
+ accessorFn: (l) => q(oe(l._id.toString())).format("DD MMM YYYY")
359
359
  },
360
360
  {
361
361
  header: "Nearest expired at",
362
362
  accessorKey: "expiryBalance",
363
363
  accessorFn: (l) => {
364
364
  var a;
365
- return l.expiryBalance && l.expiryBalance.length ? J((a = l.expiryBalance) == null ? void 0 : a[0].expiredAt).format("DD MMM YYYY") : "Never expires";
365
+ return l.expiryBalance && l.expiryBalance.length ? q((a = l.expiryBalance) == null ? void 0 : a[0].expiredAt).format("DD MMM YYYY") : "Never expires";
366
366
  }
367
367
  },
368
- ...p.value ? [
368
+ ...f.value ? [
369
369
  {
370
370
  header: "Actions",
371
371
  accessorKey: "actions",
@@ -374,16 +374,16 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
374
374
  maxWidth: "72px"
375
375
  },
376
376
  cell(l) {
377
- return n(l.row.original) ? B("div", { class: "flex items-center justify-center" }, [
378
- B(Z.FmButton, {
377
+ return n(l.row.original) ? I("div", { class: "flex items-center justify-center" }, [
378
+ I(ee.FmButton, {
379
379
  icon: "share",
380
380
  variant: "tertiary",
381
381
  iconColor: "neutral-gray-400",
382
382
  onClick: async (a) => {
383
- a.preventDefault(), a.stopPropagation(), await $(l.row.original);
383
+ a.preventDefault(), a.stopPropagation(), await z(l.row.original);
384
384
  }
385
385
  })
386
- ]) : B(
386
+ ]) : I(
387
387
  "div",
388
388
  {
389
389
  class: "flex items-center justify-center text-fm-color-typo-disabled"
@@ -393,46 +393,53 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
393
393
  }
394
394
  }
395
395
  ] : []
396
- ]), z = {
397
- "$connect-STORE_REWARD_COLLECTIONS": Ce.readCollectionsByRewardId,
398
- "$connect-CAMPAIGN_VOUCHER_COLLECTIONS": le.readCollectionsByCampaignId
399
- }, D = (l) => {
400
- const a = z[R.name];
396
+ ]), K = {
397
+ "$connect-STORE_REWARD_COLLECTIONS": ye.readCollectionsByRewardId,
398
+ "$connect-CAMPAIGN_VOUCHER_COLLECTIONS": re.readCollectionsByCampaignId
399
+ }, N = (l) => {
400
+ const a = K[M.name];
401
401
  return (c) => a(l, c);
402
- }, { tableMeta: f, rowData: K, onSort: r, debouncedFetchData: e, onSearch: _ } = be(D(w.value));
403
- async function Y() {
402
+ }, { tableMeta: g, rowData: j, onSort: r, debouncedFetchData: e, onSearch: _ } = Ce(N(w.value));
403
+ async function O() {
404
404
  var l;
405
- await e(), (l = I.value) == null || l.showSheet(!1);
405
+ await e(), (l = P.value) == null || l.showSheet(!1);
406
406
  }
407
- async function j() {
407
+ async function H() {
408
408
  F.value || L(
409
409
  async () => {
410
410
  var s;
411
- const l = new we(), a = D(w.value), c = (await a({
411
+ const l = new Fe(), a = N(w.value), c = (await a({
412
412
  limit: 1,
413
413
  skip: 0,
414
- sortBy: b.sortBy,
415
- descending: b.descending
416
- })).meta.totalResources ?? 0, d = b.rowsPerPage;
417
- for (let y = 0; y < c; y += d) {
418
- const O = {
419
- ...b,
414
+ sortBy: h.sortBy,
415
+ descending: h.descending
416
+ })).meta.totalResources ?? 0, d = h.rowsPerPage;
417
+ for (let x = 0; x < c; x += d) {
418
+ const G = {
419
+ ...h,
420
420
  limit: d,
421
- skip: b.page - 1,
422
- sortBy: b.sortBy,
423
- descending: b.descending
424
- }, o = await a(O);
425
- for await (const x of o.resources) {
426
- const ne = {
427
- Id: (x == null ? void 0 : x.code) || ((s = x._id) == null ? void 0 : s.toString()),
428
- Balance: (x == null ? void 0 : x.balance) || 0,
429
- Url: A(x)
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 = {
427
+ "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) || "-",
430
+ Balance: (m == null ? void 0 : m.balance) || 0,
431
+ "Created at": q(
432
+ oe(m._id.toString())
433
+ ).format("DD MMM YYYY"),
434
+ "Nearest expired at": m.expiryBalance && m.expiryBalance.length ? q(m.expiryBalance[0].expiredAt).format(
435
+ "DD MMM YYYY"
436
+ ) : "Never expires"
430
437
  };
431
- l.addRecord(ne);
438
+ l.addRecord(se);
432
439
  }
433
- b.page++;
440
+ h.page++;
434
441
  }
435
- await fe(
442
+ await be(
436
443
  l.buildExcel(),
437
444
  `vouchers-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
438
445
  {
@@ -440,24 +447,24 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
440
447
  bookSST: !1,
441
448
  type: "array"
442
449
  }
443
- ), b.page = 1;
450
+ ), h.page = 1;
444
451
  },
445
452
  {
446
453
  isLoading: F
447
454
  }
448
455
  );
449
456
  }
450
- return ue(async () => {
457
+ return de(async () => {
451
458
  await e();
452
459
  }), (l, a) => {
453
- const c = m("FmPageHead"), d = m("FmSearch");
454
- return V(), M(T, null, [
460
+ const c = p("FmPageHead"), d = p("FmSearch");
461
+ return V(), E(T, null, [
455
462
  i(c, {
456
463
  title: "Collections",
457
464
  "back-button": !0,
458
465
  actions: [
459
466
  { label: "Export", value: "export", isPrimary: !1 },
460
- ...t(p) ? [
467
+ ...t(f) ? [
461
468
  {
462
469
  label: "Create collection",
463
470
  value: "create",
@@ -465,50 +472,50 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
465
472
  }
466
473
  ] : []
467
474
  ],
468
- "onClick:back": a[0] || (a[0] = (s) => t(g).back()),
475
+ "onClick:back": a[0] || (a[0] = (s) => t(b).back()),
469
476
  "onClick:action": a[1] || (a[1] = (s) => {
470
- var y;
471
- s === "create" && ((y = t(I)) == null || y.showSheet(!0)), s === "export" && j();
477
+ var x;
478
+ s === "create" && ((x = t(P)) == null || x.showSheet(!0)), s === "export" && H();
472
479
  })
473
480
  }, null, 8, ["actions"]),
474
- S("div", ke, [
481
+ S("div", Ue, [
475
482
  i(d, {
476
483
  class: "hidden xs:flex border-b border-fm-color-neutral-gray-100",
477
- modelValue: t(f).searchValue,
484
+ modelValue: t(g).searchValue,
478
485
  "onUpdate:modelValue": [
479
- a[2] || (a[2] = (s) => t(f).searchValue = s),
486
+ a[2] || (a[2] = (s) => t(g).searchValue = s),
480
487
  t(_)
481
488
  ],
482
489
  placeholder: "Search",
483
490
  collapsible: ""
484
491
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
485
- S("div", Ue, [
492
+ S("div", _e, [
486
493
  i(d, {
487
- modelValue: t(f).searchValue,
494
+ modelValue: t(g).searchValue,
488
495
  "onUpdate:modelValue": [
489
- a[3] || (a[3] = (s) => t(f).searchValue = s),
496
+ a[3] || (a[3] = (s) => t(g).searchValue = s),
490
497
  t(_)
491
498
  ],
492
499
  placeholder: "Search",
493
500
  collapsible: ""
494
501
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
495
502
  ]),
496
- i(he, {
497
- loading: t(f).isLoading,
498
- "row-data": t(K),
503
+ i(ve, {
504
+ loading: t(g).isLoading,
505
+ "row-data": t(j),
499
506
  "column-defs": t(U),
500
- "row-count": t(f).totalRows,
501
- "page-count": t(f).pageCount,
502
- "page-index": t(f).pageIndex,
503
- "page-size": t(f).pageSize,
507
+ "row-count": t(g).totalRows,
508
+ "page-count": t(g).pageCount,
509
+ "page-index": t(g).pageIndex,
510
+ "page-size": t(g).pageSize,
504
511
  "shrink-at": !1,
505
512
  onSortChange: t(r),
506
513
  onPageChange: a[4] || (a[4] = (s) => t(e)({ pageSize: s.pageSize, pageIndex: s.pageIndex }))
507
514
  }, null, 8, ["loading", "row-data", "column-defs", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
508
- i(Ve, {
515
+ i(we, {
509
516
  ref_key: "sheetRef",
510
- ref: I,
511
- onSuccess: Y
517
+ ref: P,
518
+ onSuccess: O
512
519
  }, null, 512)
513
520
  ])
514
521
  ], 64);
@@ -516,5 +523,5 @@ const ke = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ue = { class: "flex
516
523
  }
517
524
  });
518
525
  export {
519
- je as default
526
+ Oe as default
520
527
  };
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as N, ref as L, computed as j, h as M, onMounted as H, resolveComponent as m, openBlock as d, createElementBlock as y, Fragment as h, createVNode as i, unref as t, createElementVNode as n, withCtx as C, renderList as q, createBlock as w, resolveDynamicComponent as O, toDisplayString as g, createCommentVNode as z } from "vue";
2
2
  import { _ as G } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as J, components as Q } from "@feedmepos/ui-library";
4
- import { p as W } from "./plugins-mrq2iOcI.js";
5
- import { u as X } from "./loading-CmNICqjK.js";
6
- import { u as Y } from "./business-BUwrUiZd.js";
7
- import { u as Z, c as _ } from "./campaign-DRsLRoE_.js";
8
- import { g as ee, a as S, b as V } from "./campaign-C6r437Sl.js";
9
- import { u as oe } from "./vue-i18n-BbxdiSSM.js";
4
+ import { p as W } from "./plugins-D_xP2_oh.js";
5
+ import { u as X } from "./loading-CqksxFrY.js";
6
+ import { u as Y } from "./business-CmK1Bgrl.js";
7
+ import { u as Z, c as _ } from "./campaign-BbeHkY_g.js";
8
+ import { g as ee, a as S, b as V } from "./campaign-B0Iu64XS.js";
9
+ import { u as oe } from "./vue-i18n-1NETuk_J.js";
10
10
  import { _ as te } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
11
- import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-2z373aLJ.js";
12
- import { u as ne } from "./template-CtPwWw0c.js";
11
+ import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BB_rrikT.js";
12
+ import { u as ne } from "./template-CSnoZfH8.js";
13
13
  const re = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-center justify-between w-full" }, ie = { class: "flex gap-8 overflow-x-auto" }, ce = { class: "space-y-8" }, le = { class: "flex w-full gap-4 items-center" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { key: 0 }, Be = /* @__PURE__ */ N({
14
14
  __name: "Credit",
15
15
  setup(ge) {