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

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 (86) hide show
  1. package/dist/{Analytic-Dv_LzcqY.js → Analytic-DUWe-WYz.js} +41 -41
  2. package/dist/{Broadcast-D3jZhdCD.js → Broadcast-CAmI-dS9.js} +45 -44
  3. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-ChrE76H3.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CQbePPyW.js} +34 -34
  4. package/dist/Card-DhgETjhz.js +914 -0
  5. package/dist/{Collections-jtrc9mrw.js → Collections-9fPXIR34.js} +153 -166
  6. package/dist/{Credit-CAE6NIPg.js → Credit-CxyIk-mH.js} +12 -11
  7. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-AGQwe70B.js +2434 -0
  8. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-y263YYGy.js +53698 -0
  9. package/dist/{Experience-CDpqPPy2.js → Experience-DH6nbWal.js} +12 -11
  10. package/dist/{Game-m-P1NEQW.js → Game-BGMGl6Uw.js} +23 -22
  11. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DMsxZkxf.js → ImageInput.vue_vue_type_script_setup_true_lang-rs3BEnpo.js} +1 -1
  12. package/dist/{MainLayout-BW7UPvBV.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BIwBZ7FH.js} +20 -53
  13. package/dist/MainLayout-CjvNB4RK.js +41 -0
  14. package/dist/{Marketing-DDnllsGc.js → Marketing-BLbR9_KN.js} +33 -33
  15. package/dist/Member-BqPHWUos.js +91 -0
  16. package/dist/MemberList-DoBv4aBY.js +1724 -0
  17. package/dist/{MemberTransactions-lmMYCk29.js → MemberTransactions-Cri3UCrX.js} +4 -4
  18. package/dist/MessageInput.vue_vue_type_script_setup_true_lang--qiv_ZUS.js +432 -0
  19. package/dist/Mission-BXRMH__V.js +249 -0
  20. package/dist/{Point-CPs1N38Y.js → Point-MS30HaX7.js} +12 -11
  21. package/dist/{Promotion-Bon_LotA.js → Promotion-BuOELg3x.js} +13 -12
  22. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CJDAM7R-.js → RuleGroup.vue_vue_type_script_setup_true_lang-CAnO-3XN.js} +251 -248
  23. package/dist/Segment-C9s9hDBX.js +377 -0
  24. package/dist/{Setting-3S2qjiRd.js → Setting-CHk3QEsN.js} +593 -562
  25. package/dist/Store-CQWAs4Ew.js +1438 -0
  26. package/dist/StoreRewards-DJkh42Es.js +435 -0
  27. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-1GgzlIRZ.js +693 -0
  28. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DPMC728G.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CEBqSaBp.js} +1 -1
  29. package/dist/Tier-3zGwCsja.js +845 -0
  30. package/dist/{Title-C9ZV3523.js → Title-TotAXw2n.js} +281 -253
  31. package/dist/{Transaction-BNUjFlP_.js → Transaction-gV9vaJCR.js} +1 -1
  32. package/dist/Voucher-BJ-pXo7Y.js +449 -0
  33. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js +55 -0
  34. package/dist/{app-Dvev0uC3.js → app--rCS8dWb.js} +3903 -3783
  35. package/dist/app.js +1 -1
  36. package/dist/campaign-BPWXzTLO.js +96 -0
  37. package/dist/{collection.fn-DHlfGYAC.js → collection.fn-NFB67-6j.js} +4 -2
  38. package/dist/dto-ChVvY7GG.js +1133 -0
  39. package/dist/{effect-DdzbkRSh.js → effect-CbwZuhWY.js} +1 -1
  40. package/dist/{helper-Do84UMfe.js → helper-D16-sxkv.js} +20 -8
  41. package/dist/{index-DsAn5Q4W.js → index--VC0kdJZ.js} +20 -15
  42. package/dist/index-BGAWJ6-h.js +1736 -0
  43. package/dist/{index-Dnq0Kzy7.js → index-Blbjd5Y9.js} +370 -92
  44. package/dist/{index-DmWjX4hp.js → index-C7SZ9gvu.js} +251 -187
  45. package/dist/{index-DomUjFLo.js → index-CGTaSvN6.js} +2 -2
  46. package/dist/{index-BIbYuG3f.js → index-D-bPAs1d.js} +39 -28
  47. package/dist/{index-F_SzjA2O.js → index-Dh6x04Wk.js} +1755 -1750
  48. package/dist/{index-BPJIa0X2.js → index-DlqRXSLU.js} +1 -1
  49. package/dist/{index-B7hqpca6.js → index-EmqFPQGb.js} +4 -8
  50. package/dist/{index-C9kOjsY9.js → index-vsgk07Y2.js} +1 -1
  51. package/dist/loading-B5tUSWjN.js +100 -0
  52. package/dist/{lodash-DezmDnLI.js → lodash-7Fz14kKI.js} +1 -1
  53. package/dist/membership-ByQds6Nb.js +219 -0
  54. package/dist/{money-OOwcLral.js → money-DsiT1-aV.js} +1 -1
  55. package/dist/{number-r3ixpwL3.js → number-D4SI_vwy.js} +3 -3
  56. package/dist/plugins-Ccv9TIl4.js +32599 -0
  57. package/dist/{rule-bmIVq7N9.js → rule-NzJI8lrC.js} +124 -124
  58. package/dist/{rule-builder-Dh4DvPql.js → rule-builder-CNz0WgMq.js} +1 -1
  59. package/dist/style.css +1 -1
  60. package/dist/{template-CyjQ7gNz.js → template-9wDwTGR-.js} +6 -6
  61. package/dist/usePagination-CsZrmXsU.js +222 -0
  62. package/dist/user-Bm4KttFq.js +37 -0
  63. package/dist/{xlsx-CxVjVdxH.js → xlsx-CUa5ix7U.js} +517 -517
  64. package/dist/zod-W_PvIofQ.js +90 -0
  65. package/package.json +10 -6
  66. package/dist/Card-DWlrW_bj.js +0 -775
  67. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-6TgnyUt6.js +0 -1952
  68. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BGOuwruo.js +0 -309
  69. package/dist/JsonViewer-Cw-PxhpP.js +0 -87
  70. package/dist/Member-BUnpqvd_.js +0 -90
  71. package/dist/MemberList-CLE0iMrO.js +0 -1752
  72. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-DIvaiiW_.js +0 -163
  73. package/dist/Segment-DsG9jZVq.js +0 -392
  74. package/dist/Store-BlFCkzus.js +0 -1415
  75. package/dist/StoreRewards-BDs1FBJd.js +0 -432
  76. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-l5hZbj_G.js +0 -640
  77. package/dist/Tier-DOJvlvnO.js +0 -821
  78. package/dist/Voucher-pBYsRoBB.js +0 -448
  79. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +0 -140
  80. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  81. package/dist/campaign-BE3eGawG.js +0 -93
  82. package/dist/dto-BQE1JRsC.js +0 -353
  83. package/dist/index-DQ_19j65.js +0 -1742
  84. package/dist/index-eDAmIa0J.js +0 -29565
  85. package/dist/loading-CTicD3SM.js +0 -3131
  86. package/dist/membership-DD5dO-ly.js +0 -213
@@ -1,18 +1,18 @@
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";
1
+ import { defineComponent as I, openBlock as l, createElementBlock as h, Fragment as V, renderList as P, createElementVNode as a, toDisplayString as U, createCommentVNode as B, 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
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";
3
+ import { f as le } from "./number-D4SI_vwy.js";
4
+ import { C as se, F as ie, a as re } from "./dto-ChVvY7GG.js";
5
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";
6
+ import { c as T } from "./index-DlqRXSLU.js";
7
+ import { _ as ue } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js";
8
+ import { Z as de } from "./zod-W_PvIofQ.js";
9
+ import { J as me, u as pe } from "./app--rCS8dWb.js";
10
+ import "./plugins-Ccv9TIl4.js";
11
+ import { useSnackbar as fe } from "@feedmepos/ui-library";
12
+ import { u as ve } from "./loading-B5tUSWjN.js";
13
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";
14
+ import { u as _e } from "./campaign-BPWXzTLO.js";
15
+ import { m as ge } from "./index-CGTaSvN6.js";
16
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: {
@@ -35,14 +35,14 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
35
35
  return le((r = R.data) == null ? void 0 : r[_], 2, !0) || 0;
36
36
  }
37
37
  return (_, r) => (l(), h("div", he, [
38
- (l(), h(V, null, B(i, (e) => (l(), h(V, null, [
38
+ (l(), h(V, null, P(i, (e) => (l(), h(V, null, [
39
39
  e.key in m.data ? (l(), h("div", {
40
40
  key: e.key,
41
41
  class: "px-16"
42
42
  }, [
43
43
  a("div", be, U(e.label), 1),
44
44
  a("div", xe, U(u(e.key)), 1)
45
- ])) : T("", !0)
45
+ ])) : B("", !0)
46
46
  ], 64))), 64))
47
47
  ]));
48
48
  }
@@ -115,7 +115,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
115
115
  }))) || [];
116
116
  });
117
117
  return q(async () => {
118
- u.value = await P.readStats({
118
+ u.value = await T.readStats({
119
119
  groupId: i.group._id.toString()
120
120
  });
121
121
  }), (e, c) => {
@@ -137,7 +137,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
137
137
  ])
138
138
  ]),
139
139
  a("div", Ae, [
140
- (l(!0), h(V, null, B(n(r), (f) => (l(), F(we, {
140
+ (l(!0), h(V, null, P(n(r), (f) => (l(), F(we, {
141
141
  key: e.index,
142
142
  type: f.campaign.type,
143
143
  label: f.label
@@ -190,7 +190,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
190
190
  "onUpdate:modelValue": _
191
191
  }, null, 8, ["model-value", "label", "indeterminate"]),
192
192
  a("div", Oe, [
193
- (l(!0), h(V, null, B(i.items, (g, w) => (l(), F(f, {
193
+ (l(!0), h(V, null, P(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 he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
203
203
  });
204
204
  };
205
205
  }
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({
206
+ }), Be = { class: "space-y-16" }, Pe = { class: "flex items-center" }, Te = { 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: {
@@ -234,9 +234,9 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
234
234
  const f = S("FmTextField");
235
235
  return l(), h(V, null, [
236
236
  p(me, { json: m.campaigns }, null, 8, ["json"]),
237
- a("div", Te, [
238
- a("div", Be, [
239
- a("div", Pe, U(n(u).length) + " campaign(s) linked ", 1),
237
+ a("div", Be, [
238
+ a("div", Pe, [
239
+ a("div", Te, U(n(u).length) + " campaign(s) linked ", 1),
240
240
  p(f, {
241
241
  modelValue: n(i),
242
242
  "onUpdate:modelValue": o[0] || (o[0] = (b) => N(i) ? i.value = b : null),
@@ -246,7 +246,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
246
246
  }, null, 8, ["modelValue"])
247
247
  ]),
248
248
  a("div", Ge, [
249
- (l(!0), h(V, null, B(n(e), (b, g) => (l(), F(Ee, {
249
+ (l(!0), h(V, null, P(n(e), (b, g) => (l(), F(Ee, {
250
250
  "model-value": n(u),
251
251
  title: g,
252
252
  items: b,
@@ -264,8 +264,8 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
264
264
  __name: "AnalyticSheet",
265
265
  emits: ["success"],
266
266
  setup(m, { expose: R, emit: i }) {
267
- const u = i, _ = fe();
268
- pe();
267
+ const u = i, _ = pe();
268
+ fe();
269
269
  const r = C(!1), e = C(!1), c = {
270
270
  name: "",
271
271
  campaigns: []
@@ -285,7 +285,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
285
285
  e.value = !0;
286
286
  }
287
287
  async function $() {
288
- const d = await P.readAll({
288
+ const d = await T.readAll({
289
289
  limit: 1e3,
290
290
  skip: 0,
291
291
  sortBy: "_id",
@@ -327,10 +327,10 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
327
327
  f.safeParse(o.value).success && await v(
328
328
  async () => {
329
329
  var t;
330
- g.value ? await P.updateGroup(
330
+ g.value ? await T.updateGroup(
331
331
  (t = g.value) == null ? void 0 : t._id,
332
332
  o.value
333
- ) : await P.createGroup(o.value), u("success"), k();
333
+ ) : await T.createGroup(o.value), u("success"), k();
334
334
  },
335
335
  {
336
336
  message: "Saving group",
@@ -342,7 +342,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
342
342
  await v(
343
343
  async () => {
344
344
  var d;
345
- await P.deleteGroup((d = g.value) == null ? void 0 : d._id), u("success"), k();
345
+ await T.deleteGroup((d = g.value) == null ? void 0 : d._id), u("success"), k();
346
346
  },
347
347
  {
348
348
  message: "Deleting group",
@@ -367,7 +367,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
367
367
  }, Y({
368
368
  "side-sheet-footer": O(() => [
369
369
  a("div", Je, [
370
- n(e) ? T("", !0) : (l(), h(V, { key: 0 }, [
370
+ n(e) ? B("", !0) : (l(), h(V, { key: 0 }, [
371
371
  p(y, {
372
372
  label: "Submit",
373
373
  onClick: W,
@@ -384,17 +384,17 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
384
384
  variant: "plain",
385
385
  class: "ml-auto fm-color-system-error-300",
386
386
  onClick: t[5] || (t[5] = (x) => Z())
387
- })) : T("", !0)
387
+ })) : B("", !0)
388
388
  ], 64)),
389
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)
393
- })) : T("", !0)
393
+ })) : B("", !0)
394
394
  ])
395
395
  ]),
396
396
  default: O(() => [
397
- n(e) ? T("", !0) : (l(), h("div", je, [
397
+ n(e) ? B("", !0) : (l(), h("div", je, [
398
398
  Me,
399
399
  p(ue, {
400
400
  modelValue: n(o).name,
@@ -425,13 +425,13 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
425
425
  modelValue: n(o).campaigns,
426
426
  "onUpdate:modelValue": t[3] || (t[3] = (x) => n(o).campaigns = x),
427
427
  campaigns: n(M)
428
- }, null, 8, ["modelValue", "campaigns"])) : T("", !0),
428
+ }, null, 8, ["modelValue", "campaigns"])) : B("", !0),
429
429
  a("div", He, [
430
- n(e) ? T("", !0) : (l(!0), h(V, { key: 0 }, B(n(K), (x, Q) => (l(), h("div", null, [
430
+ n(e) ? B("", !0) : (l(!0), h(V, { key: 0 }, P(n(K), (x, Q) => (l(), h("div", null, [
431
431
  a("div", ze, U(Q), 1),
432
432
  p(j, { separator: !0 }, {
433
433
  default: O(() => [
434
- (l(!0), h(V, null, B(x, (z) => (l(), h("div", Ke, [
434
+ (l(!0), h(V, null, P(x, (z) => (l(), h("div", Ke, [
435
435
  a("div", null, U(z.label), 1),
436
436
  a("div", null, [
437
437
  p(y, {
@@ -501,7 +501,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
501
501
  }
502
502
  async function f() {
503
503
  await i.readGroups();
504
- const w = await P.readAllGrouped({
504
+ const w = await T.readAllGrouped({
505
505
  limit: 100,
506
506
  skip: 0,
507
507
  sortBy: "_id",
@@ -518,7 +518,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
518
518
  sortBy: "_id",
519
519
  search: "",
520
520
  descending: !1
521
- }), v = await P.readAll({
521
+ }), v = await T.readAll({
522
522
  limit: 1e3,
523
523
  skip: 0,
524
524
  sortBy: "_id",
@@ -552,7 +552,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
552
552
  class: "xs:hidden",
553
553
  modelValue: n(r),
554
554
  "onUpdate:modelValue": v[1] || (v[1] = ($) => N(r) ? r.value = $ : null),
555
- placeholder: "Search Table",
555
+ placeholder: "Search",
556
556
  collapsible: ""
557
557
  }, null, 8, ["modelValue"])
558
558
  ]),
@@ -563,7 +563,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
563
563
  default: O(() => [
564
564
  Ye,
565
565
  a("div", et, [
566
- (l(), h(V, null, B(s, ($, M) => a("div", {
566
+ (l(), h(V, null, P(s, ($, M) => a("div", {
567
567
  key: $.key,
568
568
  class: ne(["px-8", { "xs:!border-r": M % 2 == 0 }])
569
569
  }, [
@@ -575,7 +575,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
575
575
  _: 1
576
576
  })
577
577
  ]),
578
- n(_).length ? T("", !0) : (l(), F(k, {
578
+ n(_).length ? B("", !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"
@@ -594,7 +594,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
594
594
  ]),
595
595
  _: 1
596
596
  })),
597
- (l(!0), h(V, null, B(n(g), ($) => (l(), F(Ue, {
597
+ (l(!0), h(V, null, P(n(g), ($) => (l(), F(Ue, {
598
598
  key: $._id.toString(),
599
599
  group: $,
600
600
  "on-edit": o
@@ -1,23 +1,24 @@
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";
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 a, createElementVNode as s, withCtx as h, renderList as j, createBlock as w, resolveDynamicComponent as E, toDisplayString as b, 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-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";
4
+ import { p as Q } from "./plugins-Ccv9TIl4.js";
5
+ import { u as W } from "./loading-B5tUSWjN.js";
6
+ import { a as X } from "./app--rCS8dWb.js";
7
+ import { u as Y } from "./campaign-BPWXzTLO.js";
8
+ import { g as F, b as k } from "./dto-ChVvY7GG.js";
8
9
  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-6TgnyUt6.js";
10
- import { u as te } from "./template-CyjQ7gNz.js";
11
- import { c as y } from "./index-BPJIa0X2.js";
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 = [
10
+ import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-AGQwe70B.js";
11
+ import { u as te } from "./template-9wDwTGR-.js";
12
+ import { c as y } from "./index-DlqRXSLU.js";
13
+ const oe = { class: "px-24 flex flex-col gap-y-16" }, ae = { 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
14
  ue
14
15
  ], fe = /* @__PURE__ */ s("img", {
15
16
  src: z,
16
17
  class: "aspect-square w-[150px]"
17
18
  }, null, -1), ye = /* @__PURE__ */ s("div", { class: "flex flex-col gap-16 text-center" }, [
18
19
  /* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800" }, " Create your broadcast campaign "),
19
- /* @__PURE__ */ s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Broadcasts are virtual money that customers can use to pay for their purchases, similar to cash within your store. ")
20
- ], -1), Ae = /* @__PURE__ */ P({
20
+ /* @__PURE__ */ s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Broadcasting allows you to send text messages to all your customers, informing them about new deals, events, or important updates. ")
21
+ ], -1), Ve = /* @__PURE__ */ P({
21
22
  __name: "Broadcast",
22
23
  setup(ge) {
23
24
  const A = {
@@ -25,7 +26,7 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
25
26
  value: "create",
26
27
  isPrimary: !0,
27
28
  prependIcon: "add"
28
- }, V = te("BROADCAST", G()), R = X(), c = Y(), { global: D, minor: b } = Q, L = g((/* @__PURE__ */ new Date()).toISOString()), n = g({
29
+ }, V = te("BROADCAST", G()), R = X(), c = Y(), { global: D, minor: C } = W, L = g((/* @__PURE__ */ new Date()).toISOString()), n = g({
29
30
  searchKey: "",
30
31
  location: null
31
32
  }), u = U(
@@ -58,15 +59,15 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
58
59
  variant: "tertiary",
59
60
  icon: "delete",
60
61
  iconColor: "neutral-gray-400",
61
- onClick: (a) => {
62
- a.stopPropagation(), x(e.row.original);
62
+ onClick: (o) => {
63
+ o.stopPropagation(), x(e.row.original);
63
64
  }
64
65
  });
65
66
  }
66
67
  }
67
68
  ], v = g();
68
69
  async function x(e) {
69
- await W.remove(`Are you sure you want to remove ${e.name}?`) && await b(
70
+ await Q.remove(`Are you sure you want to remove ${e.name}?`) && await C(
70
71
  async () => {
71
72
  await y.delete(e._id), await c.read("BROADCAST");
72
73
  },
@@ -77,10 +78,10 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
77
78
  );
78
79
  }
79
80
  async function p(e) {
80
- L.value = (/* @__PURE__ */ new Date()).toISOString(), e ? await a() : V.open(async (m) => {
81
- await a(m);
81
+ L.value = (/* @__PURE__ */ new Date()).toISOString(), e ? await o() : V.open(async (m) => {
82
+ await o(m);
82
83
  });
83
- async function a(m) {
84
+ async function o(m) {
84
85
  var d;
85
86
  (d = v.value) == null || d.showSheet(
86
87
  !0,
@@ -91,7 +92,7 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
91
92
  }
92
93
  }
93
94
  async function $(e) {
94
- await b(
95
+ await C(
95
96
  async () => {
96
97
  e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await c.read("BROADCAST");
97
98
  },
@@ -105,38 +106,38 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
105
106
  await D(async () => {
106
107
  await c.read("BROADCAST");
107
108
  });
108
- }), (e, a) => {
109
+ }), (e, o) => {
109
110
  const m = l("FmPageHead"), d = l("FmSearch"), K = l("FmTable"), S = l("FmButton"), I = l("FmListItem"), O = l("FmList"), N = l("FmCard");
110
111
  return i(), f(_, null, [
111
112
  r(m, {
112
113
  title: "Broadcast",
113
- actions: o(u).length > 0 ? [A] : [],
114
- "onClick:action": a[0] || (a[0] = () => p())
114
+ actions: a(u).length > 0 ? [A] : [],
115
+ "onClick:action": o[0] || (o[0] = () => p())
115
116
  }, null, 8, ["actions"]),
116
- s("div", ae, [
117
+ s("div", oe, [
117
118
  r(d, {
118
- modelValue: o(n).searchKey,
119
- "onUpdate:modelValue": a[1] || (a[1] = (t) => o(n).searchKey = t),
119
+ modelValue: a(n).searchKey,
120
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => a(n).searchKey = t),
120
121
  class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
121
122
  placeholder: "search",
122
123
  collapsible: ""
123
124
  }, null, 8, ["modelValue"]),
124
- o(c).campaigns.broadcast && o(c).campaigns.broadcast.length > 0 ? (i(), f(_, { key: 0 }, [
125
- s("div", oe, [
125
+ a(c).campaigns.broadcast && a(c).campaigns.broadcast.length > 0 ? (i(), f(_, { key: 0 }, [
126
+ s("div", ae, [
126
127
  s("div", se, [
127
128
  r(Z, {
128
- modelValue: o(n).location,
129
- "onUpdate:modelValue": a[2] || (a[2] = (t) => o(n).location = t),
129
+ modelValue: a(n).location,
130
+ "onUpdate:modelValue": o[2] || (o[2] = (t) => a(n).location = t),
130
131
  label: "Location: ",
131
132
  "show-item-label": !0,
132
133
  icon: "storefront",
133
134
  placement: "bottom-start",
134
- items: o(R).locationItems
135
+ items: a(R).locationItems
135
136
  }, null, 8, ["modelValue", "items"])
136
137
  ]),
137
138
  r(d, {
138
- modelValue: o(n).searchKey,
139
- "onUpdate:modelValue": a[3] || (a[3] = (t) => o(n).searchKey = t),
139
+ modelValue: a(n).searchKey,
140
+ "onUpdate:modelValue": o[3] || (o[3] = (t) => a(n).searchKey = t),
140
141
  class: "xs:hidden",
141
142
  placeholder: "search",
142
143
  collapsible: ""
@@ -144,17 +145,17 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
144
145
  ]),
145
146
  r(K, {
146
147
  class: "xs:hidden",
147
- "row-data": o(u),
148
+ "row-data": a(u),
148
149
  "column-defs": T,
149
- "search-value": o(n).searchKey,
150
+ "search-value": a(n).searchKey,
150
151
  "column-filter": [],
151
- onRowClick: a[4] || (a[4] = (t) => p(t.original)),
152
+ onRowClick: o[4] || (o[4] = (t) => p(t.original)),
152
153
  "hide-footer": !0
153
154
  }, null, 8, ["row-data", "search-value"]),
154
155
  r(O, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
155
156
  default: h(() => [
156
- (i(!0), f(_, null, j(o(u).filter(
157
- (t) => t.name.toLowerCase().includes(o(n).searchKey.toLowerCase())
157
+ (i(!0), f(_, null, j(a(u).filter(
158
+ (t) => t.name.toLowerCase().includes(a(n).searchKey.toLowerCase())
158
159
  ), (t) => (i(), w(I, {
159
160
  key: t._id.toString(),
160
161
  onClick: (B) => p(t),
@@ -163,12 +164,12 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
163
164
  default: h(() => [
164
165
  s("div", ne, [
165
166
  s("div", re, [
166
- (i(), w(E(o(F)(t)))),
167
- s("div", le, C(t.currentReceive ?? 0) + " sent ", 1)
167
+ (i(), w(E(a(F)(t)))),
168
+ s("div", le, b(t.currentReceive ?? 0) + " sent ", 1)
168
169
  ]),
169
170
  s("div", ie, [
170
- s("div", ce, C(t.name), 1),
171
- s("div", me, C(o(k)(t)), 1)
171
+ s("div", ce, b(t.name), 1),
172
+ s("div", me, b(a(k)(t)), 1)
172
173
  ])
173
174
  ]),
174
175
  r(S, {
@@ -183,7 +184,7 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
183
184
  ]),
184
185
  _: 1
185
186
  }),
186
- o(u).length == 0 ? (i(), f("div", de, pe)) : H("", !0)
187
+ a(u).length == 0 ? (i(), f("div", de, pe)) : H("", !0)
187
188
  ], 64)) : (i(), w(N, {
188
189
  key: 1,
189
190
  variant: "outlined",
@@ -196,7 +197,7 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
196
197
  variant: "primary",
197
198
  label: "Create broadcast campaign",
198
199
  icon: "add",
199
- onClick: a[5] || (a[5] = (t) => p())
200
+ onClick: o[5] || (o[5] = (t) => p())
200
201
  })
201
202
  ]),
202
203
  _: 1
@@ -212,5 +213,5 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
212
213
  }
213
214
  });
214
215
  export {
215
- Ae as default
216
+ Ve as default
216
217
  };
@@ -1,38 +1,38 @@
1
- import { R as RuleOperator, _ } from "./index-F_SzjA2O.js";
2
- import { i as isRuleGroup } from "./rule-builder-Dh4DvPql.js";
1
+ import { R as RuleOperator, _ } from "./index-Dh6x04Wk.js";
2
+ import { i as isRuleGroup } from "./rule-builder-CNz0WgMq.js";
3
3
  import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, Fragment, renderList, createVNode, toDisplayString } from "vue";
4
4
  import { useDialog } from "@feedmepos/ui-library";
5
- import "./index-BIbYuG3f.js";
6
- import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-DmWjX4hp.js";
7
- import "./index-DQ_19j65.js";
8
- import "./index-Dnq0Kzy7.js";
9
- import "./index-DsAn5Q4W.js";
10
- import "./index-C9kOjsY9.js";
5
+ import "./index-D-bPAs1d.js";
6
+ import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-C7SZ9gvu.js";
7
+ import "./index-BGAWJ6-h.js";
8
+ import "./index-Blbjd5Y9.js";
9
+ import "./index--VC0kdJZ.js";
10
+ import "./index-vsgk07Y2.js";
11
11
  function validateRule(data, r, date) {
12
12
  const rules = new RuleOperator(date ?? /* @__PURE__ */ new Date());
13
13
  function meetConditions(e) {
14
14
  return Object.entries(e.conditions ?? {}).reduce(
15
- (o, [i, t]) => {
16
- const n = e.property ? e.property === "__now" ? rules.ruleNow : _.get(data, e.property) : data;
15
+ (o, [n, t]) => {
16
+ const l = e.property ? e.property === "__now" ? rules.ruleNow : _.get(data, e.property) : data;
17
17
  if (!t)
18
18
  return o;
19
- const l = rules[i](
20
- n,
19
+ const i = rules[n](
20
+ l,
21
21
  t
22
22
  );
23
- return o && l;
23
+ return o && i;
24
24
  },
25
25
  !0
26
26
  );
27
27
  }
28
28
  function evaluateRuleResult(rr, logic) {
29
- const target = Object.entries(rr).reduce((e, [o, i]) => e.replace(RegExp(`\\b${o}\\b`, "g"), i ? "true" : "false"), logic);
29
+ const target = Object.entries(rr).reduce((e, [o, n]) => e.replace(RegExp(`\\b${o}\\b`, "g"), n ? "true" : "false"), logic);
30
30
  return !logic || !!eval(target);
31
31
  }
32
32
  function getRuleResults(e) {
33
- return isRuleGroup(e) ? Object.entries(e.rules).reduce((o, [i, t]) => ({
33
+ return isRuleGroup(e) ? Object.entries(e.rules).reduce((o, [n, t]) => ({
34
34
  ...o,
35
- [i]: isRuleGroup(t) ? evaluateRuleResult(getRuleResults(t), t.logic) : meetConditions(t)
35
+ [n]: isRuleGroup(t) ? evaluateRuleResult(getRuleResults(t), t.logic) : meetConditions(t)
36
36
  }), {}) : {
37
37
  [e.name]: meetConditions(e)
38
38
  };
@@ -42,7 +42,7 @@ function validateRule(data, r, date) {
42
42
  const _hoisted_1 = /* @__PURE__ */ createElementVNode("div", { class: "" }, [
43
43
  /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Add benefit"),
44
44
  /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Select the benefit type that you want to reward the selected tier. ")
45
- ], -1), _hoisted_2 = { class: "flex flex-col h-full space-y-24" }, _hoisted_3 = { class: "fm-typo-en-title-sm-800" }, _hoisted_4 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main = /* @__PURE__ */ defineComponent({
45
+ ], -1), _hoisted_2 = { class: "flex flex-col h-full space-y-24" }, _hoisted_3 = { class: "fm-typo-en-title-sm-600" }, _hoisted_4 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main = /* @__PURE__ */ defineComponent({
46
46
  __name: "CampaignTypeDialog",
47
47
  props: {
48
48
  onSelect: {
@@ -51,7 +51,7 @@ const _hoisted_1 = /* @__PURE__ */ createElementVNode("div", { class: "" }, [
51
51
  }
52
52
  },
53
53
  setup(e) {
54
- const o = e, i = useDialog(), t = [
54
+ const o = e, n = useDialog(), t = [
55
55
  {
56
56
  title: "Promotion",
57
57
  description: "Special offers or deals made available for a limited time",
@@ -59,48 +59,48 @@ const _hoisted_1 = /* @__PURE__ */ createElementVNode("div", { class: "" }, [
59
59
  },
60
60
  {
61
61
  title: "Voucher",
62
- description: "Special offers or deals made available for a limited time",
62
+ description: "A digital coupon that can be redeemed for a discounts on future purchases.",
63
63
  value: F_RUNNABLE_CAMPAIGN_TYPE.enum.VOUCHER
64
64
  },
65
65
  {
66
66
  title: "Experience",
67
- description: "Special offers or deals made available for a limited time",
67
+ description: "Experience points help customers gain membership tiers.",
68
68
  value: F_RUNNABLE_CAMPAIGN_TYPE.enum.POINT
69
69
  },
70
70
  {
71
71
  title: "Point",
72
- description: "Special offers or deals made available for a limited time",
72
+ description: "Points allow customers to purchase bundle items.",
73
73
  value: F_RUNNABLE_CAMPAIGN_TYPE.enum.COIN
74
74
  },
75
75
  {
76
76
  title: "Game",
77
- description: "Special offers or deals made available for a limited time",
77
+ description: "The game feature adds a fun and encourage customers to engage more.",
78
78
  value: F_RUNNABLE_CAMPAIGN_TYPE.enum.GAME
79
79
  },
80
80
  {
81
81
  title: "Credit",
82
- description: "Special offers or deals made available for a limited time",
82
+ description: "Credits are virtual money that customers can use to pay for their purchases.",
83
83
  value: F_RUNNABLE_CAMPAIGN_TYPE.enum.CREDIT
84
84
  }
85
85
  ];
86
- function n(l) {
87
- i.close(), o.onSelect(l);
86
+ function l(i) {
87
+ n.close(), o.onSelect(i);
88
88
  }
89
- return (l, c) => {
90
- const s = resolveComponent("FmCard");
91
- return openBlock(), createBlock(s, { class: "p-24 space-y-16" }, {
89
+ return (i, c) => {
90
+ const a = resolveComponent("FmCard");
91
+ return openBlock(), createBlock(a, { class: "p-24 space-y-16" }, {
92
92
  default: withCtx(() => [
93
93
  _hoisted_1,
94
94
  createElementVNode("div", _hoisted_2, [
95
- (openBlock(), createElementBlock(Fragment, null, renderList(t, (a) => createVNode(s, {
95
+ (openBlock(), createElementBlock(Fragment, null, renderList(t, (s) => createVNode(a, {
96
96
  variant: "outlined",
97
- key: a.value,
98
- onClick: (d) => n(a.value),
99
- class: "p-16"
97
+ key: s.value,
98
+ onClick: (u) => l(s.value),
99
+ class: "p-16 space-y-8 cursor-pointer"
100
100
  }, {
101
101
  default: withCtx(() => [
102
- createElementVNode("div", _hoisted_3, toDisplayString(a.title), 1),
103
- createElementVNode("div", _hoisted_4, toDisplayString(a.description), 1)
102
+ createElementVNode("div", _hoisted_3, toDisplayString(s.title), 1),
103
+ createElementVNode("div", _hoisted_4, toDisplayString(s.description), 1)
104
104
  ]),
105
105
  _: 2
106
106
  }, 1032, ["onClick"])), 64))