@feedmepos/mf-connect 0.0.5-beta.12 → 0.0.5-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/{Analytic-CUX5-xQR.js → Analytic-Dv_LzcqY.js} +137 -137
  2. package/dist/{Broadcast-v7CP0LAw.js → Broadcast-D3jZhdCD.js} +7 -7
  3. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CQuuTHgy.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-ChrE76H3.js} +8 -8
  4. package/dist/{Card-DqbAwLY9.js → Card-DWlrW_bj.js} +44 -44
  5. package/dist/{Collections-D6mUxTeb.js → Collections-jtrc9mrw.js} +9 -9
  6. package/dist/{Credit-MQzEFmKS.js → Credit-CAE6NIPg.js} +7 -7
  7. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-0o-vEFzM.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-6TgnyUt6.js} +21 -21
  8. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BGOuwruo.js +309 -0
  9. package/dist/{Experience-1zavl5Cz.js → Experience-CDpqPPy2.js} +7 -7
  10. package/dist/{Game-Brf7qBk6.js → Game-m-P1NEQW.js} +7 -7
  11. package/dist/{JsonViewer-CM3mQGeR.js → JsonViewer-Cw-PxhpP.js} +1 -1
  12. package/dist/{MainLayout-CmF8IpFn.js → MainLayout-BW7UPvBV.js} +9 -10
  13. package/dist/{Marketing-Cv8oBbi5.js → Marketing-DDnllsGc.js} +4 -4
  14. package/dist/{Member-CsuwPC67.js → Member-BUnpqvd_.js} +12 -12
  15. package/dist/{MemberList-BvEcNQLy.js → MemberList-CLE0iMrO.js} +12 -12
  16. package/dist/{MemberTransactions-C2tHglfj.js → MemberTransactions-lmMYCk29.js} +2 -2
  17. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-5tf_r1kV.js → MessageInput.vue_vue_type_script_setup_true_lang-DIvaiiW_.js} +2 -2
  18. package/dist/{Point-EZ648C2S.js → Point-CPs1N38Y.js} +7 -7
  19. package/dist/{Promotion-DhJOKFiz.js → Promotion-Bon_LotA.js} +8 -8
  20. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DFqdPg0D.js → RuleGroup.vue_vue_type_script_setup_true_lang-CJDAM7R-.js} +13 -13
  21. package/dist/{Segment-NwmeNOgB.js → Segment-DsG9jZVq.js} +56 -56
  22. package/dist/{Setting-CE44n1lp.js → Setting-3S2qjiRd.js} +8 -8
  23. package/dist/{Store-DfmDBapW.js → Store-BlFCkzus.js} +13 -13
  24. package/dist/{StoreRewards-DmXcW6FJ.js → StoreRewards-BDs1FBJd.js} +25 -25
  25. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BMCS6_2b.js → StoreTransactions.vue_vue_type_script_setup_true_lang-l5hZbj_G.js} +5 -5
  26. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DqtAHlXF.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DPMC728G.js} +1 -1
  27. package/dist/{Tier-Dn3qrgqi.js → Tier-DOJvlvnO.js} +17 -17
  28. package/dist/{Title-7UEUc4lB.js → Title-C9ZV3523.js} +13 -13
  29. package/dist/{Transaction-CXVLW1sZ.js → Transaction-BNUjFlP_.js} +1 -1
  30. package/dist/{Voucher-moIKIm9Y.js → Voucher-pBYsRoBB.js} +19 -19
  31. package/dist/{app-DfC4Wz5O.js → app-Dvev0uC3.js} +1365 -1369
  32. package/dist/app.js +1 -1
  33. package/dist/{campaign-BUhFqt7i.js → campaign-BE3eGawG.js} +2 -2
  34. package/dist/{dto-DAulHCaS.js → dto-BQE1JRsC.js} +8 -8
  35. package/dist/{effect-BSuXGgTS.js → effect-DdzbkRSh.js} +1 -1
  36. package/dist/{helper-BqSdP7S_.js → helper-Do84UMfe.js} +1 -1
  37. package/dist/{index-Osw8yB8l.js → index-B7hqpca6.js} +1 -1
  38. package/dist/{index-DGEH0xtv.js → index-BIbYuG3f.js} +2 -2
  39. package/dist/{index-D4h0WRgl.js → index-BPJIa0X2.js} +1 -1
  40. package/dist/{index-BZNH49ud.js → index-C9kOjsY9.js} +1 -1
  41. package/dist/{index-BAb2T24H.js → index-DQ_19j65.js} +3 -3
  42. package/dist/{index-0ZWqvP75.js → index-DmWjX4hp.js} +5 -5
  43. package/dist/{index-DMefGCH-.js → index-Dnq0Kzy7.js} +5 -5
  44. package/dist/{index-Csq4bOCD.js → index-DomUjFLo.js} +1 -1
  45. package/dist/{index-2QLy2rMc.js → index-DsAn5Q4W.js} +2 -2
  46. package/dist/{index-CcHhuVkx.js → index-F_SzjA2O.js} +2 -2
  47. package/dist/{index-BD_ef1Tj.js → index-eDAmIa0J.js} +3 -3
  48. package/dist/{loading-BbBkQmU8.js → loading-CTicD3SM.js} +2 -2
  49. package/dist/{lodash-Dwm-9TwD.js → lodash-DezmDnLI.js} +1 -1
  50. package/dist/{membership-hGD2o5qr.js → membership-DD5dO-ly.js} +3 -3
  51. package/dist/{money-CaVIc7e5.js → money-OOwcLral.js} +1 -1
  52. package/dist/{number-DFuwV1nt.js → number-r3ixpwL3.js} +1 -1
  53. package/dist/{rule-B-HQJ31S.js → rule-bmIVq7N9.js} +2 -2
  54. package/dist/{rule-builder-nlrinIF1.js → rule-builder-Dh4DvPql.js} +1 -1
  55. package/dist/{template-Bmql0Nfc.js → template-CyjQ7gNz.js} +5 -5
  56. package/dist/{xlsx-BKPvXeCZ.js → xlsx-CxVjVdxH.js} +226 -226
  57. package/package.json +1 -1
  58. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-B6dqauXk.js +0 -30142
@@ -1,19 +1,19 @@
1
- import { defineComponent as I, openBlock as o, createElementBlock as h, Fragment as V, renderList as P, createElementVNode as a, toDisplayString as U, createCommentVNode as T, resolveComponent as S, createBlock as F, withCtx as O, createVNode as p, unref as n, ref as C, computed as G, onMounted as D, watch as X, isRef as q, createSlots as Y, createTextVNode as ee, reactive as te, normalizeClass as ae } from "vue";
2
- import { _ as ne } from "./campaign-CpzFl8Vr.js";
3
- import { f as le } from "./number-DFuwV1nt.js";
4
- import { C as oe, F as se, a as ie } from "./dto-DAulHCaS.js";
5
- import { useRouter as re } from "vue-router";
6
- import { c as B } from "./index-D4h0WRgl.js";
7
- import { _ as ce, Z as ue } from "./ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js";
8
- import { J as de } from "./JsonViewer-CM3mQGeR.js";
9
- import "./index-BD_ef1Tj.js";
10
- import { useSnackbar as me } from "@feedmepos/ui-library";
11
- import { u as pe } from "./app-DfC4Wz5O.js";
12
- import { u as fe } from "./loading-BbBkQmU8.js";
13
- import { g as ve } from "./object-qECH92oz.js";
14
- import { u as ye } from "./campaign-BUhFqt7i.js";
15
- import { m as _e } from "./index-Csq4bOCD.js";
16
- const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-md-400 mb-2 text-fm-color-typo-secondary" }, be = { class: "fm-typo-en-title-sm-800" }, xe = /* @__PURE__ */ I({
1
+ import { defineComponent as I, openBlock as l, createElementBlock as h, Fragment as V, renderList as B, createElementVNode as a, toDisplayString as U, createCommentVNode as T, resolveComponent as S, createBlock as F, withCtx as O, createVNode as p, unref as n, ref as C, computed as G, onMounted as q, watch as X, isRef as N, createSlots as Y, createTextVNode as ee, reactive as te, onBeforeMount as ae, normalizeClass as ne } from "vue";
2
+ import { _ as oe } from "./campaign-CpzFl8Vr.js";
3
+ import { f as le } from "./number-r3ixpwL3.js";
4
+ import { C as se, F as ie, a as re } from "./dto-BQE1JRsC.js";
5
+ import { useRouter as ce } from "vue-router";
6
+ import { c as P } from "./index-BPJIa0X2.js";
7
+ import { _ as ue, Z as de } from "./ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js";
8
+ import { J as me } from "./JsonViewer-Cw-PxhpP.js";
9
+ import "./index-eDAmIa0J.js";
10
+ import { useSnackbar as pe } from "@feedmepos/ui-library";
11
+ import { u as fe } from "./app-Dvev0uC3.js";
12
+ import { u as ve } from "./loading-CTicD3SM.js";
13
+ import { g as ye } from "./object-qECH92oz.js";
14
+ import { u as _e } from "./campaign-BE3eGawG.js";
15
+ import { m as ge } from "./index-DomUjFLo.js";
16
+ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-md-400 mb-2 text-fm-color-typo-secondary" }, xe = { class: "fm-typo-en-title-sm-800" }, Ce = /* @__PURE__ */ I({
17
17
  __name: "CampaignStat",
18
18
  props: {
19
19
  data: {
@@ -34,19 +34,19 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
34
34
  var r;
35
35
  return le((r = R.data) == null ? void 0 : r[_], 2, !0) || 0;
36
36
  }
37
- return (_, r) => (o(), h("div", ge, [
38
- (o(), h(V, null, P(i, (e) => (o(), h(V, null, [
39
- e.key in m.data ? (o(), h("div", {
37
+ return (_, r) => (l(), h("div", he, [
38
+ (l(), h(V, null, B(i, (e) => (l(), h(V, null, [
39
+ e.key in m.data ? (l(), h("div", {
40
40
  key: e.key,
41
41
  class: "px-16"
42
42
  }, [
43
- a("div", he, U(e.label), 1),
44
- a("div", be, U(u(e.key)), 1)
43
+ a("div", be, U(e.label), 1),
44
+ a("div", xe, U(u(e.key)), 1)
45
45
  ])) : T("", !0)
46
46
  ], 64))), 64))
47
47
  ]));
48
48
  }
49
- }), Ce = { class: "bg-fm-color-neutral-gray-100 gap-4 h-[30px] inline-flex items-center justify-center max-w-[250px] px-8 py-4 rounded-md" }, ke = { class: "fm-typo-en-body-md-600 overflow-hidden select-none text-ellipsis text-fm-color-typo-secondary whitespace-nowrap" }, Se = /* @__PURE__ */ I({
49
+ }), ke = { class: "bg-fm-color-neutral-gray-100 gap-4 h-[30px] inline-flex items-center justify-center max-w-[250px] px-8 py-4 rounded-md" }, Se = { class: "fm-typo-en-body-md-600 overflow-hidden select-none text-ellipsis text-fm-color-typo-secondary whitespace-nowrap" }, we = /* @__PURE__ */ I({
50
50
  __name: "CampaignChip",
51
51
  props: {
52
52
  type: { type: String, required: !0 },
@@ -60,22 +60,22 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
60
60
  }
61
61
  },
62
62
  setup(m) {
63
- const i = oe[m.type];
63
+ const i = se[m.type];
64
64
  return (u, _) => {
65
65
  const r = S("FmIcon"), e = S("FmTooltip");
66
- return o(), F(e, {
66
+ return l(), F(e, {
67
67
  variant: "plain",
68
68
  placement: "top",
69
69
  content: m.label
70
70
  }, {
71
71
  default: O(() => [
72
- a("div", Ce, [
72
+ a("div", ke, [
73
73
  p(r, {
74
74
  name: n(i).icon,
75
75
  outline: "",
76
76
  size: "sm"
77
77
  }, null, 8, ["name"]),
78
- a("div", ke, U(m.label), 1),
78
+ a("div", Se, U(m.label), 1),
79
79
  p(r, {
80
80
  name: m.icon.name,
81
81
  color: m.icon.color,
@@ -87,7 +87,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
87
87
  }, 8, ["content"]);
88
88
  };
89
89
  }
90
- }), we = { class: "flex flex-col" }, $e = { class: "flex flex-nowrap items-center justify-between mb-12" }, Fe = { class: "flex gap-4 items-center justify-start" }, Ve = { class: "fm-typo-en-title-sm-800" }, Re = { class: "flex flex-wrap gap-4 items-center mb-16 overflow-y-hidden" }, Ae = /* @__PURE__ */ I({
90
+ }), $e = { class: "flex flex-col" }, Fe = { class: "flex flex-nowrap items-center justify-between mb-12" }, Ve = { class: "flex gap-4 items-center justify-start" }, Re = { class: "fm-typo-en-title-sm-800" }, Ae = { class: "flex flex-wrap gap-4 items-center mb-16 overflow-y-hidden" }, Ue = /* @__PURE__ */ I({
91
91
  __name: "CampaignGroup",
92
92
  props: {
93
93
  group: {
@@ -101,7 +101,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
101
101
  },
102
102
  emits: ["changed"],
103
103
  setup(m, { emit: R }) {
104
- re(), C(!1);
104
+ ce(), C(!1);
105
105
  const i = m, u = C([]), _ = G(
106
106
  () => u.value.reduce(
107
107
  (e, c) => ({ ...e, [c.type]: c.totalAmount }),
@@ -114,21 +114,21 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
114
114
  label: c.name
115
115
  }))) || [];
116
116
  });
117
- return D(async () => {
118
- u.value = await B.readStats({
117
+ return q(async () => {
118
+ u.value = await P.readStats({
119
119
  groupId: i.group._id.toString()
120
120
  });
121
121
  }), (e, c) => {
122
- const s = S("FmButton"), l = S("FmCard");
123
- return o(), F(l, {
122
+ const s = S("FmButton"), o = S("FmCard");
123
+ return l(), F(o, {
124
124
  class: "mb-24 p-24",
125
125
  variant: "outlined"
126
126
  }, {
127
127
  default: O(() => [
128
- a("div", we, [
129
- a("div", $e, [
130
- a("div", Fe, [
131
- a("div", Ve, U(m.group.name), 1),
128
+ a("div", $e, [
129
+ a("div", Fe, [
130
+ a("div", Ve, [
131
+ a("div", Re, U(m.group.name), 1),
132
132
  p(s, {
133
133
  icon: "edit",
134
134
  variant: "tertiary",
@@ -136,21 +136,21 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
136
136
  })
137
137
  ])
138
138
  ]),
139
- a("div", Re, [
140
- (o(!0), h(V, null, P(n(r), (f) => (o(), F(Se, {
139
+ a("div", Ae, [
140
+ (l(!0), h(V, null, B(n(r), (f) => (l(), F(we, {
141
141
  key: e.index,
142
142
  type: f.campaign.type,
143
143
  label: f.label
144
144
  }, null, 8, ["type", "label"]))), 128))
145
145
  ]),
146
- p(xe, { data: n(_) }, null, 8, ["data"])
146
+ p(Ce, { data: n(_) }, null, 8, ["data"])
147
147
  ])
148
148
  ]),
149
149
  _: 1
150
150
  });
151
151
  };
152
152
  }
153
- }), Ue = { class: "ml-32 flex flex-col" }, Oe = /* @__PURE__ */ I({
153
+ }), Oe = { class: "ml-32 flex flex-col" }, Ee = /* @__PURE__ */ I({
154
154
  __name: "CampaignCard",
155
155
  props: {
156
156
  title: {},
@@ -160,7 +160,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
160
160
  emits: ["update:model-value"],
161
161
  setup(m, { emit: R }) {
162
162
  const i = m, u = R, _ = (s) => {
163
- s ? c.value = i.items.map((l) => l.value) : c.value = [], e.value = s, u("update:model-value", c.value);
163
+ s ? c.value = i.items.map((o) => o.value) : c.value = [], e.value = s, u("update:model-value", c.value);
164
164
  }, r = (s) => {
165
165
  c.value = s, e.value = s.length === i.items.length, u("update:model-value", s);
166
166
  }, e = C(!1), c = C([]);
@@ -168,16 +168,16 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
168
168
  () => i.modelValue,
169
169
  () => {
170
170
  c.value = i.modelValue.filter(
171
- (s) => i.items.find((l) => l.value === s)
171
+ (s) => i.items.find((o) => o.value === s)
172
172
  );
173
173
  }
174
- ), D(() => {
174
+ ), q(() => {
175
175
  c.value = i.modelValue.filter(
176
- (s) => i.items.find((l) => l.value === s)
176
+ (s) => i.items.find((o) => o.value === s)
177
177
  );
178
- }), (s, l) => {
178
+ }), (s, o) => {
179
179
  const f = S("FmCheckbox"), b = S("FmCard");
180
- return o(), F(b, {
180
+ return l(), F(b, {
181
181
  variant: "outlined",
182
182
  class: "p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3"
183
183
  }, {
@@ -189,8 +189,8 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
189
189
  indeterminate: n(c).length > 0,
190
190
  "onUpdate:modelValue": _
191
191
  }, null, 8, ["model-value", "label", "indeterminate"]),
192
- a("div", Ue, [
193
- (o(!0), h(V, null, P(i.items, (g, w) => (o(), F(f, {
192
+ a("div", Oe, [
193
+ (l(!0), h(V, null, B(i.items, (g, w) => (l(), F(f, {
194
194
  key: w,
195
195
  "model-value": n(c),
196
196
  label: g.label,
@@ -203,7 +203,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
203
203
  });
204
204
  };
205
205
  }
206
- }), Ee = { class: "space-y-16" }, Te = { class: "flex items-center" }, Pe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary w-[300px]" }, Be = { class: "space-y-[40px]" }, Ge = /* @__PURE__ */ I({
206
+ }), Te = { class: "space-y-16" }, Be = { class: "flex items-center" }, Pe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary w-[300px]" }, Ge = { class: "space-y-[40px]" }, Ie = /* @__PURE__ */ I({
207
207
  __name: "LinkCampaign",
208
208
  props: {
209
209
  modelValue: {
@@ -217,36 +217,36 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
217
217
  },
218
218
  emits: ["update:model-value"],
219
219
  setup(m, { emit: R }) {
220
- const i = C(""), u = C([]), _ = m, r = R, e = G(() => Object.entries(_.campaigns).reduce((s, [l, f]) => {
220
+ const i = C(""), u = C([]), _ = m, r = R, e = G(() => Object.entries(_.campaigns).reduce((s, [o, f]) => {
221
221
  const b = f.filter(
222
222
  (g) => g.label.toLowerCase().includes(i.value.toLowerCase())
223
223
  );
224
- return b.length > 0 && (s[l] = b), s;
224
+ return b.length > 0 && (s[o] = b), s;
225
225
  }, {}));
226
- function c(s, l) {
226
+ function c(s, o) {
227
227
  u.value = u.value.filter(
228
- (f) => !l.map((b) => b.value).includes(f)
228
+ (f) => !o.map((b) => b.value).includes(f)
229
229
  ), u.value = [.../* @__PURE__ */ new Set([...u.value, ...s])], r("update:model-value", u.value);
230
230
  }
231
- return D(() => {
231
+ return q(() => {
232
232
  u.value = _.modelValue;
233
- }), (s, l) => {
233
+ }), (s, o) => {
234
234
  const f = S("FmTextField");
235
- return o(), h(V, null, [
236
- p(de, { json: m.campaigns }, null, 8, ["json"]),
237
- a("div", Ee, [
238
- a("div", Te, [
235
+ return l(), h(V, null, [
236
+ p(me, { json: m.campaigns }, null, 8, ["json"]),
237
+ a("div", Te, [
238
+ a("div", Be, [
239
239
  a("div", Pe, U(n(u).length) + " campaign(s) linked ", 1),
240
240
  p(f, {
241
241
  modelValue: n(i),
242
- "onUpdate:modelValue": l[0] || (l[0] = (b) => q(i) ? i.value = b : null),
242
+ "onUpdate:modelValue": o[0] || (o[0] = (b) => N(i) ? i.value = b : null),
243
243
  "prepend-icon": "search",
244
244
  placeholder: "Search",
245
245
  class: "w-full"
246
246
  }, null, 8, ["modelValue"])
247
247
  ]),
248
- a("div", Be, [
249
- (o(!0), h(V, null, P(n(e), (b, g) => (o(), F(Oe, {
248
+ a("div", Ge, [
249
+ (l(!0), h(V, null, B(n(e), (b, g) => (l(), F(Ee, {
250
250
  "model-value": n(u),
251
251
  title: g,
252
252
  items: b,
@@ -257,26 +257,26 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
257
257
  ], 64);
258
258
  };
259
259
  }
260
- }), Ie = { class: "flex items-center gap-x-8" }, Le = {
260
+ }), Le = { class: "flex items-center gap-x-8" }, je = {
261
261
  key: 0,
262
262
  class: "space-y-16 pr-12"
263
- }, je = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800" }, "Group detail", -1), De = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800" }, "Link campaign", -1), Me = { class: "flex items-center gap-x-16" }, Ne = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, qe = { class: "mt-16" }, He = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600 py-8 px-16 bg-gray-100" }, ze = { class: "flex justify-between items-center py-8 px-16 border-b-1" }, Ke = { class: "flex items-center gap-8" }, Je = /* @__PURE__ */ I({
263
+ }, Me = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800" }, "Group detail", -1), De = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800" }, "Link campaign", -1), Ne = { class: "flex items-center gap-x-16" }, qe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, He = { class: "mt-16" }, ze = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600 py-8 px-16 bg-gray-100" }, Ke = { class: "flex justify-between items-center py-8 px-16 border-b-1" }, Je = { class: "flex items-center gap-8" }, We = /* @__PURE__ */ I({
264
264
  __name: "AnalyticSheet",
265
265
  emits: ["success"],
266
266
  setup(m, { expose: R, emit: i }) {
267
- const u = i, _ = pe();
268
- me();
267
+ const u = i, _ = fe();
268
+ pe();
269
269
  const r = C(!1), e = C(!1), c = {
270
270
  name: "",
271
271
  campaigns: []
272
- }, s = C(""), l = C({ ...c }), f = se.superRefine((d, t) => {
273
- }), b = C([]), g = C(null), { global: w, minor: v } = fe, E = G(() => {
274
- const d = f.safeParse(l.value);
272
+ }, s = C(""), o = C({ ...c }), f = ie.superRefine((d, t) => {
273
+ }), b = C([]), g = C(null), { global: w, minor: v } = ve, E = G(() => {
274
+ const d = f.safeParse(o.value);
275
275
  return d.success ? [] : d.error.errors;
276
276
  });
277
277
  function L(d) {
278
278
  var t;
279
- r.value = !0, d ? (g.value = { ...d }, l.value = { ...d, campaigns: (t = d.pf_campaigns) == null ? void 0 : t.map((y) => y._id) }) : (g.value = null, l.value = { ...c });
279
+ r.value = !0, d ? (g.value = { ...d }, o.value = { ...d, campaigns: (t = d.pf_campaigns) == null ? void 0 : t.map((y) => y._id) }) : (g.value = null, o.value = { ...c });
280
280
  }
281
281
  function k() {
282
282
  r.value = !1, g.value = null;
@@ -285,7 +285,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
285
285
  e.value = !0;
286
286
  }
287
287
  async function $() {
288
- const d = await B.readAll({
288
+ const d = await P.readAll({
289
289
  limit: 1e3,
290
290
  skip: 0,
291
291
  sortBy: "_id",
@@ -301,16 +301,16 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
301
301
  label: A.name,
302
302
  value: A._id
303
303
  }));
304
- return ve(
304
+ return ye(
305
305
  b.value,
306
- (y) => ie.formattedType(y.type),
306
+ (y) => re.formattedType(y.type),
307
307
  d
308
308
  );
309
309
  }), K = G(() => Object.entries(M.value).reduce(
310
310
  (d, [t, y]) => {
311
311
  const A = y.filter((j) => {
312
- var N, x;
313
- return (x = (N = l.value) == null ? void 0 : N.campaigns) == null ? void 0 : x.includes(j.value);
312
+ var D, x;
313
+ return (x = (D = o.value) == null ? void 0 : D.campaigns) == null ? void 0 : x.includes(j.value);
314
314
  }).filter(
315
315
  (j) => j.label.toLowerCase().includes(s.value.toLowerCase())
316
316
  );
@@ -320,17 +320,17 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
320
320
  ));
321
321
  function J(d) {
322
322
  var y, A;
323
- const t = (y = l.value.campaigns) == null ? void 0 : y.indexOf(d);
324
- t != null && t > -1 && ((A = l.value.campaigns) == null || A.splice(t, 1));
323
+ const t = (y = o.value.campaigns) == null ? void 0 : y.indexOf(d);
324
+ t != null && t > -1 && ((A = o.value.campaigns) == null || A.splice(t, 1));
325
325
  }
326
326
  async function W() {
327
- f.safeParse(l.value).success && await v(
327
+ f.safeParse(o.value).success && await v(
328
328
  async () => {
329
329
  var t;
330
- g.value ? await B.updateGroup(
330
+ g.value ? await P.updateGroup(
331
331
  (t = g.value) == null ? void 0 : t._id,
332
- l.value
333
- ) : await B.createGroup(l.value), u("success"), k();
332
+ o.value
333
+ ) : await P.createGroup(o.value), u("success"), k();
334
334
  },
335
335
  {
336
336
  message: "Saving group",
@@ -342,7 +342,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
342
342
  await v(
343
343
  async () => {
344
344
  var d;
345
- await B.deleteGroup((d = g.value) == null ? void 0 : d._id), u("success"), k();
345
+ await P.deleteGroup((d = g.value) == null ? void 0 : d._id), u("success"), k();
346
346
  },
347
347
  {
348
348
  message: "Deleting group",
@@ -350,24 +350,24 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
350
350
  }
351
351
  );
352
352
  }
353
- return D(async () => {
353
+ return q(async () => {
354
354
  await $();
355
355
  }), R({
356
356
  showSheet: L,
357
357
  hideSheet: k
358
358
  }), (d, t) => {
359
- const y = S("FmButton"), A = S("FmTextField"), j = S("FmList"), N = S("FmSideSheet");
360
- return o(), F(N, {
359
+ const y = S("FmButton"), A = S("FmTextField"), j = S("FmList"), D = S("FmSideSheet");
360
+ return l(), F(D, {
361
361
  modelValue: n(r),
362
- "onUpdate:modelValue": t[7] || (t[7] = (x) => q(r) ? r.value = x : null),
362
+ "onUpdate:modelValue": t[7] || (t[7] = (x) => N(r) ? r.value = x : null),
363
363
  header: n(g) ? "Edit group" : "Add group",
364
364
  "dismiss-away": "",
365
365
  "close-button": !0,
366
366
  "max-width": 550
367
367
  }, Y({
368
368
  "side-sheet-footer": O(() => [
369
- a("div", Ke, [
370
- n(e) ? T("", !0) : (o(), h(V, { key: 0 }, [
369
+ a("div", Je, [
370
+ n(e) ? T("", !0) : (l(), h(V, { key: 0 }, [
371
371
  p(y, {
372
372
  label: "Submit",
373
373
  onClick: W,
@@ -378,7 +378,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
378
378
  onClick: t[4] || (t[4] = (x) => k()),
379
379
  variant: "tertiary"
380
380
  }),
381
- n(g) ? (o(), F(y, {
381
+ n(g) ? (l(), F(y, {
382
382
  key: 0,
383
383
  label: "Delete",
384
384
  variant: "plain",
@@ -386,7 +386,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
386
386
  onClick: t[5] || (t[5] = (x) => Z())
387
387
  })) : T("", !0)
388
388
  ], 64)),
389
- n(e) ? (o(), F(y, {
389
+ n(e) ? (l(), F(y, {
390
390
  key: 1,
391
391
  label: "Confirm",
392
392
  onClick: t[6] || (t[6] = (x) => e.value = !1)
@@ -394,20 +394,20 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
394
394
  ])
395
395
  ]),
396
396
  default: O(() => [
397
- n(e) ? T("", !0) : (o(), h("div", Le, [
398
- je,
399
- p(ce, {
400
- modelValue: n(l).name,
401
- "onUpdate:modelValue": t[1] || (t[1] = (x) => n(l).name = x),
397
+ n(e) ? T("", !0) : (l(), h("div", je, [
398
+ Me,
399
+ p(ue, {
400
+ modelValue: n(o).name,
401
+ "onUpdate:modelValue": t[1] || (t[1] = (x) => n(o).name = x),
402
402
  label: "Name",
403
- schema: n(ue).typeAtPath(n(f), "name")
403
+ schema: n(de).typeAtPath(n(f), "name")
404
404
  }, null, 8, ["modelValue", "schema"]),
405
405
  De,
406
- a("div", Me, [
407
- a("div", Ne, U(n(l).campaigns.length) + " campaign(s) linked ", 1),
406
+ a("div", Ne, [
407
+ a("div", qe, U(n(o).campaigns.length) + " campaign(s) linked ", 1),
408
408
  p(A, {
409
409
  modelValue: n(s),
410
- "onUpdate:modelValue": t[2] || (t[2] = (x) => q(s) ? s.value = x : null),
410
+ "onUpdate:modelValue": t[2] || (t[2] = (x) => N(s) ? s.value = x : null),
411
411
  "prepend-icon": "search",
412
412
  placeholder: "Search",
413
413
  class: "w-auto"
@@ -420,23 +420,23 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
420
420
  onClick: H
421
421
  })
422
422
  ])),
423
- n(e) ? (o(), F(Ge, {
423
+ n(e) ? (l(), F(Ie, {
424
424
  key: 1,
425
- modelValue: n(l).campaigns,
426
- "onUpdate:modelValue": t[3] || (t[3] = (x) => n(l).campaigns = x),
425
+ modelValue: n(o).campaigns,
426
+ "onUpdate:modelValue": t[3] || (t[3] = (x) => n(o).campaigns = x),
427
427
  campaigns: n(M)
428
428
  }, null, 8, ["modelValue", "campaigns"])) : T("", !0),
429
- a("div", qe, [
430
- n(e) ? T("", !0) : (o(!0), h(V, { key: 0 }, P(n(K), (x, Q) => (o(), h("div", null, [
431
- a("div", He, U(Q), 1),
429
+ a("div", He, [
430
+ n(e) ? T("", !0) : (l(!0), h(V, { key: 0 }, B(n(K), (x, Q) => (l(), h("div", null, [
431
+ a("div", ze, U(Q), 1),
432
432
  p(j, { separator: !0 }, {
433
433
  default: O(() => [
434
- (o(!0), h(V, null, P(x, (z) => (o(), h("div", ze, [
434
+ (l(!0), h(V, null, B(x, (z) => (l(), h("div", Ke, [
435
435
  a("div", null, U(z.label), 1),
436
436
  a("div", null, [
437
437
  p(y, {
438
438
  icon: "delete",
439
- onClick: (st) => J(z.value),
439
+ onClick: (it) => J(z.value),
440
440
  variant: "tertiary"
441
441
  }, null, 8, ["onClick"])
442
442
  ])
@@ -452,7 +452,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
452
452
  n(e) ? {
453
453
  name: "side-sheet-header",
454
454
  fn: O(() => [
455
- a("div", Ie, [
455
+ a("div", Le, [
456
456
  p(y, {
457
457
  icon: "arrow_back",
458
458
  variant: "tertiary",
@@ -466,10 +466,10 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
466
466
  ]), 1032, ["modelValue", "header"]);
467
467
  };
468
468
  }
469
- }), We = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Ze = { class: "space-y-16" }, Qe = { class: "flex items-center justify-end" }, Xe = /* @__PURE__ */ a("div", { class: "fm-typo-en-body-lg-600" }, "Connect summary", -1), Ye = { class: "grid grid-cols-4 xs:grid-cols-2 gap-4 divide-x xs:divide-x-0" }, et = { class: "fm-typo-body-md-400 fm-typo-en-body-md-400 mb-2 text-fm-color-typo-secondary" }, tt = { class: "fm-typo-en-title-sm-800" }, at = /* @__PURE__ */ a("img", {
470
- src: ne,
469
+ }), Ze = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Qe = { class: "space-y-16" }, Xe = { class: "flex items-center justify-end" }, Ye = /* @__PURE__ */ a("div", { class: "fm-typo-en-body-lg-600" }, "Connect summary", -1), et = { class: "grid grid-cols-4 xs:grid-cols-2 gap-4 divide-x xs:divide-x-0" }, tt = { class: "fm-typo-body-md-400 fm-typo-en-body-md-400 mb-2 text-fm-color-typo-secondary" }, at = { class: "fm-typo-en-title-sm-800" }, nt = /* @__PURE__ */ a("img", {
470
+ src: oe,
471
471
  class: "w-[150px]"
472
- }, null, -1), nt = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800 text-center" }, " Create campaign group to track performance ", -1), lt = /* @__PURE__ */ a("div", { class: "fm-typo-body-en-md-400 text-center text-fm-color-typo-secondary" }, " Start organizing your campaigns and promotions by creating groups. Groups allow you to aggregate performance metrics across multiple vouchers, promotions, or other rewards. ", -1), ot = { class: "flex gap-16 items-center" }, Ct = /* @__PURE__ */ I({
472
+ }, null, -1), ot = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800 text-center" }, " Create campaign group to track performance ", -1), lt = /* @__PURE__ */ a("div", { class: "fm-typo-body-en-md-400 text-center text-fm-color-typo-secondary" }, " Start organizing your campaigns and promotions by creating groups. Groups allow you to aggregate performance metrics across multiple vouchers, promotions, or other rewards. ", -1), st = { class: "flex gap-16 items-center" }, kt = /* @__PURE__ */ I({
473
473
  __name: "Analytic",
474
474
  setup(m) {
475
475
  const R = {
@@ -477,7 +477,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
477
477
  value: "create",
478
478
  isPrimary: !0,
479
479
  prependIcon: "add"
480
- }, i = ye(), u = C(), _ = C([]), r = C(""), e = te({
480
+ }, i = _e(), u = C(), _ = C([]), r = C(""), e = te({
481
481
  totalCampaign: 0,
482
482
  totalProgram: 0,
483
483
  totalMember: 0
@@ -495,13 +495,13 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
495
495
  value: () => e.totalMember
496
496
  }
497
497
  ];
498
- function l(w) {
498
+ function o(w) {
499
499
  var v;
500
500
  c.value = (/* @__PURE__ */ new Date()).toISOString(), (v = u.value) == null || v.showSheet(w);
501
501
  }
502
502
  async function f() {
503
503
  await i.readGroups();
504
- const w = await B.readAllGrouped({
504
+ const w = await P.readAllGrouped({
505
505
  limit: 100,
506
506
  skip: 0,
507
507
  sortBy: "_id",
@@ -512,13 +512,13 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
512
512
  }
513
513
  async function b() {
514
514
  var E, L;
515
- const w = await _e.read({
515
+ const w = await ge.read({
516
516
  limit: 1,
517
517
  skip: 0,
518
518
  sortBy: "_id",
519
519
  search: "",
520
520
  descending: !1
521
- }), v = await B.readAll({
521
+ }), v = await P.readAll({
522
522
  limit: 1e3,
523
523
  skip: 0,
524
524
  sortBy: "_id",
@@ -535,23 +535,23 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
535
535
  var v;
536
536
  return w.name.includes(r.value) || ((v = w.pf_campaigns) == null ? void 0 : v.filter((E) => E.name.includes(r.value)).length);
537
537
  }));
538
- return D(async () => {
538
+ return ae(async () => {
539
539
  await f(), await b();
540
540
  }), (w, v) => {
541
541
  const E = S("FmPageHead"), L = S("FmSearch"), k = S("FmCard"), H = S("FmButton");
542
- return o(), h(V, null, [
542
+ return l(), h(V, null, [
543
543
  p(E, {
544
544
  title: "Analytic",
545
545
  actions: n(_).length > 0 ? [R] : [],
546
- "onClick:action": v[0] || (v[0] = ($) => l())
546
+ "onClick:action": v[0] || (v[0] = ($) => o())
547
547
  }, null, 8, ["actions"]),
548
- a("div", We, [
549
- a("div", Ze, [
550
- a("div", Qe, [
548
+ a("div", Ze, [
549
+ a("div", Qe, [
550
+ a("div", Xe, [
551
551
  p(L, {
552
552
  class: "xs:hidden",
553
553
  modelValue: n(r),
554
- "onUpdate:modelValue": v[1] || (v[1] = ($) => q(r) ? r.value = $ : null),
554
+ "onUpdate:modelValue": v[1] || (v[1] = ($) => N(r) ? r.value = $ : null),
555
555
  placeholder: "Search Table",
556
556
  collapsible: ""
557
557
  }, null, 8, ["modelValue"])
@@ -561,45 +561,45 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
561
561
  class: "flex flex-col gap-16 p-16"
562
562
  }, {
563
563
  default: O(() => [
564
- Xe,
565
- a("div", Ye, [
566
- (o(), h(V, null, P(s, ($, M) => a("div", {
564
+ Ye,
565
+ a("div", et, [
566
+ (l(), h(V, null, B(s, ($, M) => a("div", {
567
567
  key: $.key,
568
- class: ae(["px-8", { "xs:!border-r": M % 2 == 0 }])
568
+ class: ne(["px-8", { "xs:!border-r": M % 2 == 0 }])
569
569
  }, [
570
- a("div", et, U($.key), 1),
571
- a("div", tt, U($.value()), 1)
570
+ a("div", tt, U($.key), 1),
571
+ a("div", at, U($.value()), 1)
572
572
  ], 2)), 64))
573
573
  ])
574
574
  ]),
575
575
  _: 1
576
576
  })
577
577
  ]),
578
- n(_).length ? T("", !0) : (o(), F(k, {
578
+ n(_).length ? T("", !0) : (l(), F(k, {
579
579
  key: 0,
580
580
  variant: "outlined",
581
581
  class: "flex flex-col gap-y-24 items-center p-16"
582
582
  }, {
583
583
  default: O(() => [
584
- at,
585
584
  nt,
585
+ ot,
586
586
  lt,
587
- a("div", ot, [
587
+ a("div", st, [
588
588
  p(H, {
589
589
  label: "Create group",
590
590
  icon: "add",
591
- onClick: v[2] || (v[2] = ($) => l())
591
+ onClick: v[2] || (v[2] = ($) => o())
592
592
  })
593
593
  ])
594
594
  ]),
595
595
  _: 1
596
596
  })),
597
- (o(!0), h(V, null, P(n(g), ($) => (o(), F(Ae, {
597
+ (l(!0), h(V, null, B(n(g), ($) => (l(), F(Ue, {
598
598
  key: $._id.toString(),
599
599
  group: $,
600
- "on-edit": l
600
+ "on-edit": o
601
601
  }, null, 8, ["group"]))), 128)),
602
- p(Je, {
602
+ p(We, {
603
603
  ref_key: "sheetRef",
604
604
  ref: u,
605
605
  onSuccess: f
@@ -610,5 +610,5 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
610
610
  }
611
611
  });
612
612
  export {
613
- Ct as default
613
+ kt as default
614
614
  };
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as P, ref as g, computed as U, onMounted as M, resolveComponent as l, openBlock as i, createElementBlock as f, Fragment as _, createVNode as r, unref as o, createElementVNode as s, withCtx as h, renderList as j, createBlock as w, resolveDynamicComponent as E, toDisplayString as C, createCommentVNode as H, h as q } from "vue";
2
2
  import { _ as z } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as G, components as J } from "@feedmepos/ui-library";
4
- import { u as Q, p as W } from "./loading-BbBkQmU8.js";
5
- import { a as X } from "./app-DfC4Wz5O.js";
6
- import { u as Y } from "./campaign-BUhFqt7i.js";
7
- import { g as F, b as k } from "./dto-DAulHCaS.js";
4
+ import { u as Q, p as W } from "./loading-CTicD3SM.js";
5
+ import { a as X } from "./app-Dvev0uC3.js";
6
+ import { u as Y } from "./campaign-BE3eGawG.js";
7
+ import { g as F, b as k } from "./dto-BQE1JRsC.js";
8
8
  import { _ as Z } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
9
- import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-0o-vEFzM.js";
10
- import { u as te } from "./template-Bmql0Nfc.js";
11
- import { c as y } from "./index-D4h0WRgl.js";
9
+ import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-6TgnyUt6.js";
10
+ import { u as te } from "./template-CyjQ7gNz.js";
11
+ import { c as y } from "./index-BPJIa0X2.js";
12
12
  const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, ne = { class: "space-y-8" }, re = { class: "flex w-full gap-4 items-center" }, le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ie = { class: "space-y-4" }, ce = { class: "fm-typo-en-body-lg-600" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { key: 0 }, ue = /* @__PURE__ */ s("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1), pe = [
13
13
  ue
14
14
  ], fe = /* @__PURE__ */ s("img", {