@feedmepos/mf-connect 0.1.38-beta.2 → 0.1.39-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 (110) hide show
  1. package/dist/Analytic-D8WCDkga.js +427 -0
  2. package/dist/{App-D11A2JY1.js → App-CTnXtg1W.js} +352 -364
  3. package/dist/{Bin-9wV4Ah3M.js → Bin-BY6-bvFj.js} +8 -8
  4. package/dist/{Broadcast-I3BtSk8V.js → Broadcast-5VTEIQAr.js} +40 -40
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-XJqTXbKr.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BuAQxEM4.js} +18 -18
  6. package/dist/{Card-CqALG5RM.js → Card-8ivdV-Qz.js} +159 -159
  7. package/dist/{Collections-rg3SzoUb.js → Collections-CFszRHmE.js} +91 -103
  8. package/dist/{Credit-BNn1sYZv.js → Credit-DFslY__4.js} +74 -74
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-PJ8q72XH.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BvCLYtJ3.js} +488 -489
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Sww7KNle.js → EffectSheet.vue_vue_type_style_index_0_lang-Ci_bp7GH.js} +94 -94
  11. package/dist/{Experience-D_Qm8SUj.js → Experience-BxfiZNlY.js} +41 -41
  12. package/dist/{Game-CKXgXm6Q.js → Game-0FZJcLmj.js} +31 -31
  13. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
  14. package/dist/{Index-D4DGfUHd.js → Index-ByeKKbuM.js} +10 -10
  15. package/dist/Marketing-C7F4abzg.js +319 -0
  16. package/dist/{Member-B55vWHDd.js → Member-DP0fLSIV.js} +64 -64
  17. package/dist/MemberList-DFW2bMbr.js +1606 -0
  18. package/dist/MemberOverview-C2n9oJZh.js +58 -0
  19. package/dist/{MemberTransactions-CP5EI-W0.js → MemberTransactions-CW62fvgx.js} +1 -1
  20. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-iJXNbgsB.js +455 -0
  21. package/dist/{Mission-CFvhROuB.js → Mission-DEgQHJw6.js} +21 -21
  22. package/dist/{Overview-4273yNwL.js → Overview-5jDtZKi8.js} +335 -335
  23. package/dist/{Point-B_-_C919.js → Point-D2lB1-xB.js} +41 -41
  24. package/dist/{Promotion-D2S3COxk.js → Promotion-Diz1gIa0.js} +42 -42
  25. package/dist/{Queue-BmS1Oi-C.js → Queue-DIAuq7HG.js} +51 -51
  26. package/dist/{Record-DRBl0M8g.js → Record-T608yda1.js} +9 -9
  27. package/dist/{Reward-8056NmfK.js → Reward-fZzHrHCW.js} +173 -173
  28. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJ_WC2gV.js → RewardGroup.vue_vue_type_script_setup_true_lang-YOKVfimM.js} +11 -11
  29. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DqNQl_nz.js → RuleGroup.vue_vue_type_script_setup_true_lang-C3_lmBe5.js} +431 -431
  30. package/dist/Segment-DDQIzsrk.js +882 -0
  31. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-4nNkkklE.js → SelectItems.vue_vue_type_script_setup_true_lang-B5oUf91Q.js} +2 -2
  32. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dnf2oxOG.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C2U6Kzvx.js} +11 -11
  33. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLYP-5U9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRmqgxES.js} +3 -3
  34. package/dist/{Setting-BrJfYoru.js → Setting-CQNyXmp4.js} +432 -432
  35. package/dist/{Store-Bpl_4yZW.js → Store-CIA1Rtsg.js} +210 -210
  36. package/dist/StoreRewards-D5zlE6cE.js +423 -0
  37. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BkTYngJ_.js +995 -0
  38. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-QucRaI08.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-D8l3fQyz.js} +1 -1
  39. package/dist/{Tier-_LnXg3n6.js → Tier-jFXVOje_.js} +106 -106
  40. package/dist/{Title-B7AGStvx.js → Title-DVpZ1YMK.js} +131 -133
  41. package/dist/{Transaction-Chxv6V7u.js → Transaction-BF_wmok6.js} +2 -2
  42. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzXNmobp.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cex1Z43W.js} +6 -6
  43. package/dist/{Voucher-C5z2kOq9.js → Voucher-CaBMU5w0.js} +37 -37
  44. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BXt2fLOD.js +419 -0
  45. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js → ZodTextField.vue_vue_type_script_setup_true_lang-CtHjWpUe.js} +1 -1
  46. package/dist/{app-BVojNX0w.js → app-CPhyKlyf.js} +1 -1
  47. package/dist/{app-7cvPyHJ7.js → app-DuIzRGvb.js} +124 -161
  48. package/dist/app.js +3 -4
  49. package/dist/{business-CmxV69wT.js → business-TTvv3aTz.js} +1 -1
  50. package/dist/{campaign-Dq5C_no-.js → campaign-BiMCoAzx.js} +3 -5
  51. package/dist/{campaign-CT_cNJEL.js → campaign-CjEVStN1.js} +9 -9
  52. package/dist/{campaign.enum-dp7yHKzF.js → campaign.enum-DpYmj9jp.js} +1 -1
  53. package/dist/campaign.fn-DJ6J98jS.js +758 -0
  54. package/dist/{collectible.enum-DxbB4DxT.js → collectible.enum-Cgmm_s-C.js} +1 -1
  55. package/dist/{collection.fn-CNZRdUgy.js → collection.fn-BsYCNgfJ.js} +2 -2
  56. package/dist/{dto-CT9zZbv9.js → dto-DgmHIlZ2.js} +4 -4
  57. package/dist/{effect-FIlOEC4H.js → effect-DnAVIDFy.js} +1 -1
  58. package/dist/{email-addresses-Ba7xImfX.js → email-addresses-CMRgb6Uv.js} +1 -1
  59. package/dist/{export-uzjZFNF9.js → export-DtarK6IJ.js} +3 -3
  60. package/dist/{helper-D4sAZde0.js → helper-BKZghMbF.js} +1 -1
  61. package/dist/{index-l2F5MnLF.js → index-2OAcPmuQ.js} +1 -1
  62. package/dist/{index-BI3m1Ehv.js → index-B0YZKHyu.js} +3 -3
  63. package/dist/{index-CH3z92VV.js → index-B5oXFFlO.js} +1 -1
  64. package/dist/{index-CvBcve-r.js → index-BQ3KHJXX.js} +1 -1
  65. package/dist/{index-B9pl4zRZ.js → index-B_893fH7.js} +79 -179
  66. package/dist/{index-CNJLP3D5.js → index-BoR-BOFw.js} +1 -1
  67. package/dist/{index-DNxa8Rqx.js → index-C7rl1eHp.js} +449 -516
  68. package/dist/{index-BXz54M1s.js → index-CBcbwf0k.js} +1 -1
  69. package/dist/{index-CS3Jmojj.js → index-CIztuDE4.js} +2462 -2453
  70. package/dist/{index-D5rvMvzx.js → index-CK67enPK.js} +1 -1
  71. package/dist/index-CuvNtC_M.js +61 -0
  72. package/dist/index-D2uZzjpn.js +44 -0
  73. package/dist/{index-CUfS9Kp1.js → index-DWdAUovq.js} +9 -9
  74. package/dist/{index-CONvJfKv.js → index-DkWcEDHA.js} +1 -1
  75. package/dist/{index-BjU8LVUC.js → index-VHu8hYtE.js} +385 -376
  76. package/dist/{index.esm2017-ATcsD5N4.js → index.esm2017-DkwLmmR_.js} +127 -127
  77. package/dist/{loading-BWGQSrCB.js → loading-BFkEqWR6.js} +1 -1
  78. package/dist/{membership-Cc4OZ8-U.js → membership-D0eN3i_T.js} +3 -3
  79. package/dist/{money-D7p8nfun.js → money-DS9ZQwSP.js} +1 -1
  80. package/dist/{number-CMJjC4qz.js → number-C8Gt93v9.js} +1 -1
  81. package/dist/objectid-Cr99eTPd.js +145 -0
  82. package/dist/{plugins-eQis66QR.js → plugins-DK_ue6Xa.js} +2 -2
  83. package/dist/{reward-DrnzbG20.js → reward-CW2dSLDW.js} +1 -1
  84. package/dist/{rule-CtRxkYXB.js → rule-CebKyXSm.js} +3 -3
  85. package/dist/{rule-builder-Di9RIYHF.js → rule-builder-kQq14RfN.js} +17 -17
  86. package/dist/style.css +1 -1
  87. package/dist/{template-C3UfY0v5.js → template-CxUxlb6-.js} +64 -64
  88. package/dist/{trigger-C9U7Zgad.js → trigger-RqJo06KA.js} +4 -4
  89. package/dist/{usePagination-BeF5K3M7.js → usePagination-JoYaROkV.js} +85 -85
  90. package/dist/{user-D7n9yYmO.js → user-DhV5Iy52.js} +1 -1
  91. package/dist/{vue-i18n-Bz45zC04.js → vue-i18n-BtvUK9hI.js} +419 -419
  92. package/dist/{xlsx-D4S4qbcZ.js → xlsx-WnLDq4qn.js} +381 -381
  93. package/package.json +3 -9
  94. package/dist/Analytic-BjSfI2Ff.js +0 -761
  95. package/dist/AuditLogs-DWCFYoRg.js +0 -1887
  96. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +0 -58
  97. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
  98. package/dist/Marketing-Dn9A1vgH.js +0 -20073
  99. package/dist/MemberList-BWTG9Ohy.js +0 -1606
  100. package/dist/MemberOverview-wL_ailso.js +0 -58
  101. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D--_An-f.js +0 -60279
  102. package/dist/Segment-Bzq-pyhc.js +0 -882
  103. package/dist/StoreRewards-Cu7n7Pjz.js +0 -423
  104. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-T3Wo2maC.js +0 -1029
  105. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DdGMrk2C.js +0 -419
  106. package/dist/campaign.fn-BYZgKDN7.js +0 -758
  107. package/dist/index-CsaQJMAR.js +0 -66
  108. package/dist/index-CwsMG2cV.js +0 -56
  109. package/dist/objectid-D5T27iny.js +0 -145
  110. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
@@ -2,18 +2,18 @@ var q = Object.defineProperty;
2
2
  var G = (g, o, m) => o in g ? q(g, o, { enumerable: !0, configurable: !0, writable: !0, value: m }) : g[o] = m;
3
3
  var z = (g, o, m) => G(g, typeof o != "symbol" ? o + "" : o, m);
4
4
  import { defineComponent as T, ref as B, computed as H, resolveComponent as C, openBlock as I, createBlock as J, unref as n, isRef as Q, withCtx as X, createElementBlock as U, createVNode as w, withModifiers as Z, createCommentVNode as ee, createElementVNode as N, h, onMounted as re, Fragment as te } from "vue";
5
- import { u as oe, _ as ae } from "./usePagination-BeF5K3M7.js";
6
- import { g as A } from "./user-D7n9yYmO.js";
5
+ import { u as oe, _ as ae } from "./usePagination-JoYaROkV.js";
6
+ import { g as A } from "./user-DhV5Iy52.js";
7
7
  import { components as R } from "@feedmepos/ui-library";
8
- import "./index-CS3Jmojj.js";
9
- import { u as j } from "./vue-i18n-Bz45zC04.js";
10
- import { u as L } from "./loading-BWGQSrCB.js";
8
+ import "./index-CIztuDE4.js";
9
+ import { u as j } from "./vue-i18n-BtvUK9hI.js";
10
+ import { u as L } from "./loading-BFkEqWR6.js";
11
11
  import { useCoreStore as se } from "@feedmepos/mf-common";
12
- import { r as v } from "./index-BXz54M1s.js";
12
+ import { r as v } from "./index-CBcbwf0k.js";
13
13
  import { c as ie, a as ne } from "./object-qECH92oz.js";
14
- import { u as ce } from "./membership-Cc4OZ8-U.js";
15
- import { a as le, c as de } from "./plugins-eQis66QR.js";
16
- import { u as V, w as me } from "./xlsx-D4S4qbcZ.js";
14
+ import { u as ce } from "./membership-D0eN3i_T.js";
15
+ import { a as le, c as de } from "./plugins-DK_ue6Xa.js";
16
+ import { u as V, w as me } from "./xlsx-WnLDq4qn.js";
17
17
  import { e as f } from "./index-vh86FiIQ.js";
18
18
  import { h as ue } from "./moment-BWErdI6_.js";
19
19
  import { o as pe } from "./objectId-dwaoBfJX.js";
@@ -1,55 +1,55 @@
1
- import { defineComponent as X, ref as x, computed as H, resolveComponent as w, openBlock as b, createBlock as h, unref as t, isRef as Z, withCtx as A, createElementVNode as f, createVNode as d, createCommentVNode as k, createElementBlock as M, Fragment as Y, h as O, onMounted as q, toDisplayString as B } from "vue";
1
+ import { defineComponent as X, ref as h, computed as H, resolveComponent as f, openBlock as b, createBlock as U, unref as t, isRef as Z, withCtx as A, createElementVNode as w, createVNode as c, createCommentVNode as k, createElementBlock as M, Fragment as Y, h as F, onMounted as q, toDisplayString as B } from "vue";
2
2
  import { _ as z } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as Q, components as L } from "@feedmepos/ui-library";
4
- import { u as G } from "./loading-BWGQSrCB.js";
5
- import { u as J, C as ee } from "./membership-Cc4OZ8-U.js";
6
- import { f as j, p as te } from "./plugins-eQis66QR.js";
7
- import { u as oe } from "./vue-i18n-Bz45zC04.js";
4
+ import { u as G } from "./loading-BFkEqWR6.js";
5
+ import { u as J, C as ee } from "./membership-D0eN3i_T.js";
6
+ import { f as j, p as te } from "./plugins-DK_ue6Xa.js";
7
+ import { u as oe } from "./vue-i18n-BtvUK9hI.js";
8
8
  import { c as ae } from "./object-qECH92oz.js";
9
- import { Z as _ } from "./zod-Bg2FbC-D.js";
10
- import "./index-CUfS9Kp1.js";
11
- import { F as N } from "./index-BI3m1Ehv.js";
12
- import { useCoreStore as le } from "@feedmepos/mf-common";
13
- import { _ as ne, a as ie } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-DdGMrk2C.js";
14
- import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-Sww7KNle.js";
9
+ import { Z as O } from "./zod-Bg2FbC-D.js";
10
+ import "./index-DWdAUovq.js";
11
+ import { F as N } from "./index-B0YZKHyu.js";
12
+ import { useCoreStore as ne } from "@feedmepos/mf-common";
13
+ import { _ as le, a as ie } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-BXt2fLOD.js";
14
+ import { b as re } from "./EffectSheet.vue_vue_type_style_index_0_lang-Ci_bp7GH.js";
15
15
  import { J as K } from "./JsonViewer-v8_C7l5N.js";
16
- import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js";
17
- import { i as de } from "./helper-D4sAZde0.js";
18
- import { u as pe, r as P } from "./reward-DrnzbG20.js";
19
- import "./index-CNJLP3D5.js";
20
- import { C as ce } from "./campaign.fn-BYZgKDN7.js";
21
- import { e as me } from "./effect-FIlOEC4H.js";
16
+ import { _ as se } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CtHjWpUe.js";
17
+ import { i as ce } from "./helper-BKZghMbF.js";
18
+ import { u as de, r as P } from "./reward-CW2dSLDW.js";
19
+ import "./index-BoR-BOFw.js";
20
+ import { C as pe } from "./campaign.fn-DJ6J98jS.js";
21
+ import { e as me } from "./effect-DnAVIDFy.js";
22
22
  import { useRouter as ue } from "vue-router";
23
- import { R as ye } from "./app-7cvPyHJ7.js";
24
- const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__ */ X({
23
+ import { R as ye } from "./app-DuIzRGvb.js";
24
+ const fe = /* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1), we = { class: "flex gap-8 items-center justify-start" }, ve = /* @__PURE__ */ X({
25
25
  __name: "EditRewardSheet",
26
26
  emits: ["update"],
27
- setup(W, { expose: n, emit: I }) {
28
- const p = J(), { minor: C } = G, v = x(!1), a = x({}), y = x(), R = H(() => {
29
- var l;
30
- return ((l = a.value.option) == null ? void 0 : l.collectibleType) === "CREDIT" ? N.superRefine((e, o) => {
27
+ setup(W, { expose: l, emit: I }) {
28
+ const d = J(), { minor: C } = G, v = h(!1), o = h({}), y = h(), R = H(() => {
29
+ var n;
30
+ return ((n = o.value.option) == null ? void 0 : n.collectibleType) === "CREDIT" ? N.superRefine((e, a) => {
31
31
  var i, m, g, r;
32
- !((m = (i = e.option) == null ? void 0 : i.validityOption) != null && m.validForDay) && !((r = (g = e.option) == null ? void 0 : g.validityOption) != null && r.validBefore) && o.addIssue({
32
+ !((m = (i = e.option) == null ? void 0 : i.validityOption) != null && m.validForDay) && !((r = (g = e.option) == null ? void 0 : g.validityOption) != null && r.validBefore) && a.addIssue({
33
33
  code: "custom",
34
34
  path: [],
35
35
  message: "Credit validity must be set"
36
36
  });
37
37
  }) : N;
38
38
  }), u = H(() => {
39
- const l = R.value.safeParse(a.value);
40
- return l.success ? [] : l.error.errors;
39
+ const n = R.value.safeParse(o.value);
40
+ return n.success ? [] : n.error.errors;
41
41
  });
42
- function F(l, e) {
43
- l && (y.value = void 0, a.value = e), v.value = l;
42
+ function _(n, e) {
43
+ n && (y.value = void 0, o.value = e), v.value = n;
44
44
  }
45
- const D = I;
45
+ const $ = I;
46
46
  async function S() {
47
- const l = R.value.safeParse(a.value);
48
- !l.success || !l.data || (await C(
47
+ const n = R.value.safeParse(o.value);
48
+ !n.success || !n.data || (await C(
49
49
  async () => {
50
50
  var e;
51
- l.data.option.type === "VOUCHER" && y.value && (l.data.option.collectibleConfig.image = await j.update(
52
- ((e = l.data.option.collectibleConfig) == null ? void 0 : e.image) || j.collectibleImagePath(void 0, y.value),
51
+ n.data.option.type === "VOUCHER" && y.value && (n.data.option.collectibleConfig.image = await j.update(
52
+ ((e = n.data.option.collectibleConfig) == null ? void 0 : e.image) || j.collectibleImagePath(void 0, y.value),
53
53
  y.value
54
54
  ));
55
55
  },
@@ -57,14 +57,14 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
57
57
  message: "Uploading reward image",
58
58
  successMessage: "Reward image updated"
59
59
  }
60
- ), D("update", l.data));
60
+ ), $("update", n.data));
61
61
  }
62
- function T(l) {
63
- l === "VOUCHER" ? a.value.option = {
62
+ function x(n) {
63
+ n === "VOUCHER" ? o.value.option = {
64
64
  collectible: null,
65
65
  type: "VOUCHER",
66
- collectibleConfig: de("VOUCHER", {
67
- business: le().currentBusiness.value._id
66
+ collectibleConfig: ce("VOUCHER", {
67
+ business: ne().currentBusiness.value._id
68
68
  }),
69
69
  earningOption: {
70
70
  amount: 1,
@@ -73,9 +73,9 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
73
73
  validityOption: {
74
74
  validForDay: 7
75
75
  }
76
- } : a.value.option = {
77
- collectible: p.loyaltyRewards.raw[0]._id,
78
- collectibleType: p.loyaltyRewards.raw[0].type,
76
+ } : o.value.option = {
77
+ collectible: d.loyaltyRewards.raw[0]._id,
78
+ collectibleType: d.loyaltyRewards.raw[0].type,
79
79
  type: "LOYALTY",
80
80
  earningOption: {
81
81
  amount: 1,
@@ -86,17 +86,17 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
86
86
  }
87
87
  };
88
88
  }
89
- function $(l) {
90
- a.value.option.collectible = l, a.value.option.collectibleType = p.loyaltyRewards.raw.find(
91
- (e) => e._id === l
89
+ function D(n) {
90
+ o.value.option.collectible = n, o.value.option.collectibleType = d.loyaltyRewards.raw.find(
91
+ (e) => e._id === n
92
92
  ).type;
93
93
  }
94
- const V = x();
95
- return n({
96
- showSheet: F
97
- }), (l, e) => {
98
- const o = w("FmSelect"), i = w("FmForm"), m = w("FmButton"), g = w("FmSideSheet");
99
- return b(), h(g, {
94
+ const T = h();
95
+ return l({
96
+ showSheet: _
97
+ }), (n, e) => {
98
+ const a = f("FmSelect"), i = f("FmForm"), m = f("FmButton"), g = f("FmSideSheet");
99
+ return b(), U(g, {
100
100
  "max-width": 560,
101
101
  modelValue: t(v),
102
102
  "onUpdate:modelValue": [
@@ -106,15 +106,15 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
106
106
  header: "Edit reward"
107
107
  }, {
108
108
  "side-sheet-footer": A(() => [
109
- f("div", fe, [
110
- d(m, {
109
+ w("div", we, [
110
+ c(m, {
111
111
  variant: "primary",
112
112
  type: "button",
113
113
  label: "Confirm",
114
114
  disabled: t(u).length > 0,
115
115
  onClick: e[6] || (e[6] = (r) => S())
116
116
  }, null, 8, ["disabled"]),
117
- d(m, {
117
+ c(m, {
118
118
  variant: "secondary",
119
119
  type: "button",
120
120
  label: "Cancel",
@@ -123,87 +123,87 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
123
123
  ])
124
124
  ]),
125
125
  default: A(() => [
126
- d(K, { json: t(a) }, null, 8, ["json"]),
127
- d(i, {
126
+ c(K, { json: t(o) }, null, 8, ["json"]),
127
+ c(i, {
128
128
  class: "flex flex-col gap-y-24",
129
129
  ref_key: "formRef",
130
- ref: V,
130
+ ref: T,
131
131
  onValidationSuccess: e[5] || (e[5] = (r) => S())
132
132
  }, {
133
133
  default: A(() => {
134
- var r, E, c;
134
+ var r, E, p;
135
135
  return [
136
- d(se, {
137
- modelValue: t(a).name,
138
- "onUpdate:modelValue": e[0] || (e[0] = (s) => t(a).name = s),
136
+ c(se, {
137
+ modelValue: t(o).name,
138
+ "onUpdate:modelValue": e[0] || (e[0] = (s) => t(o).name = s),
139
139
  label: "Reward Name",
140
- schema: t(_).typeAtPath(t(R), "name", []),
141
- "error-text": t(_).helperText(t(u), "name")
140
+ schema: t(O).typeAtPath(t(R), "name", []),
141
+ "error-text": t(O).helperText(t(u), "name")
142
142
  }, null, 8, ["modelValue", "schema", "error-text"]),
143
- d(o, {
143
+ c(a, {
144
144
  label: "Reward Type",
145
- disabled: !!t(a)._id,
145
+ disabled: !!t(o)._id,
146
146
  items: [
147
147
  { label: "Voucher", value: "VOUCHER" },
148
148
  { label: "Loyalty", value: "LOYALTY" }
149
149
  ],
150
- "model-value": t(a).option.type,
151
- "onUpdate:modelValue": T
150
+ "model-value": t(o).option.type,
151
+ "onUpdate:modelValue": x
152
152
  }, null, 8, ["disabled", "model-value"]),
153
- t(a).option.type == "LOYALTY" ? (b(), h(o, {
153
+ t(o).option.type == "LOYALTY" ? (b(), U(a, {
154
154
  key: 0,
155
155
  label: "Loyalty type",
156
- items: t(p).loyaltyRewards.items,
157
- "model-value": t(a).option.collectible,
158
- "onUpdate:modelValue": $
156
+ items: t(d).loyaltyRewards.items,
157
+ "model-value": t(o).option.collectible,
158
+ "onUpdate:modelValue": D
159
159
  }, null, 8, ["items", "model-value"])) : k("", !0),
160
- t(a).option.type === "LOYALTY" ? (b(), M(Y, { key: 1 }, [
161
- e[10] || (e[10] = f("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
162
- ((r = t(p).loyaltyRewards.items.find(
160
+ t(o).option.type === "LOYALTY" ? (b(), M(Y, { key: 1 }, [
161
+ fe,
162
+ ((r = t(d).loyaltyRewards.items.find(
163
163
  (s) => {
164
- var U;
165
- return s.value === ((U = t(a)) == null ? void 0 : U.option.collectible);
164
+ var V;
165
+ return s.value === ((V = t(o)) == null ? void 0 : V.option.collectible);
166
166
  }
167
- )) == null ? void 0 : r.raw.type) !== "TITLE" ? (b(), h(ne, {
167
+ )) == null ? void 0 : r.raw.type) !== "TITLE" ? (b(), U(le, {
168
168
  key: 0,
169
169
  class: "mt-[-8px]",
170
170
  rules: [
171
- t(_).ruleAtPath(t(R), "option.earningOption", [
172
- t(a).option.type
171
+ t(O).ruleAtPath(t(R), "option.earningOption", [
172
+ t(o).option.type
173
173
  ])
174
174
  ],
175
- "helper-state": t(_).helperState(t(u), "option.earningOption"),
176
- "error-text": t(_).helperText(t(u), "option.earningOption"),
175
+ "helper-state": t(O).helperState(t(u), "option.earningOption"),
176
+ "error-text": t(O).helperText(t(u), "option.earningOption"),
177
177
  "fixed-type": !0,
178
- "model-value": t(a).option.earningOption,
179
- "onUpdate:modelValue": e[1] || (e[1] = (s) => t(a).option.earningOption = s)
178
+ "model-value": t(o).option.earningOption,
179
+ "onUpdate:modelValue": e[1] || (e[1] = (s) => t(o).option.earningOption = s)
180
180
  }, null, 8, ["rules", "helper-state", "error-text", "model-value"])) : k("", !0),
181
- d(re, {
181
+ c(re, {
182
182
  class: "!gap-24",
183
- "for-credit": t(a).option.type === "LOYALTY" && ((E = t(p).loyaltyRewards.items.find(
183
+ "for-credit": t(o).option.type === "LOYALTY" && ((E = t(d).loyaltyRewards.items.find(
184
184
  (s) => {
185
- var U;
186
- return s.value === ((U = t(a).option) == null ? void 0 : U.collectible);
185
+ var V;
186
+ return s.value === ((V = t(o).option) == null ? void 0 : V.collectible);
187
187
  }
188
188
  )) == null ? void 0 : E.raw.type) === "CREDIT",
189
- type: t(a).option.type === "VOUCHER" ? "range" : "custom",
189
+ type: t(o).option.type === "VOUCHER" ? "range" : "custom",
190
190
  rules: [
191
- t(_).ruleAtPath(t(R), "option.validityOption", [
192
- t(a).option.type
191
+ t(O).ruleAtPath(t(R), "option.validityOption", [
192
+ t(o).option.type
193
193
  ])
194
194
  ],
195
- "model-value": t(a).option.validityOption,
196
- "onUpdate:modelValue": e[2] || (e[2] = (s) => t(a).option.validityOption = s)
195
+ "model-value": t(o).option.validityOption,
196
+ "onUpdate:modelValue": e[2] || (e[2] = (s) => t(o).option.validityOption = s)
197
197
  }, null, 8, ["for-credit", "type", "rules", "model-value"])
198
198
  ], 64)) : k("", !0),
199
- t(a).option.type === "VOUCHER" ? (b(), h(ie, {
199
+ t(o).option.type === "VOUCHER" ? (b(), U(ie, {
200
200
  key: 2,
201
201
  "reward-image": t(y),
202
- "model-value": ((c = t(a)) == null ? void 0 : c.option.collectibleConfig) ?? void 0,
203
- "onUpdate:modelValue": e[3] || (e[3] = (s) => t(a).option.collectibleConfig = s),
202
+ "model-value": ((p = t(o)) == null ? void 0 : p.option.collectibleConfig) ?? void 0,
203
+ "onUpdate:modelValue": e[3] || (e[3] = (s) => t(o).option.collectibleConfig = s),
204
204
  "onUpdate:rewardImage": e[4] || (e[4] = (s) => y.value = s)
205
205
  }, null, 8, ["reward-image", "model-value"])) : k("", !0),
206
- d(K, { json: t(u) }, null, 8, ["json"])
206
+ c(K, { json: t(u) }, null, 8, ["json"])
207
207
  ];
208
208
  }),
209
209
  _: 1
@@ -213,19 +213,22 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
213
213
  }, 8, ["modelValue"]);
214
214
  };
215
215
  }
216
- }), ve = { class: "px-24 flex flex-col gap-y-16" }, ge = { class: "flex items-center justify-between w-full" }, be = { class: "flex flex-col gap-16 text-center" }, Re = { class: "fm-typo-en-title-sm-800" }, Ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ke = /* @__PURE__ */ X({
216
+ }), ge = { class: "px-24 flex flex-col gap-y-16" }, be = { class: "flex items-center justify-between w-full" }, Re = /* @__PURE__ */ w("div", { class: "flex gap-8" }, null, -1), Ce = /* @__PURE__ */ w("img", {
217
+ src: z,
218
+ class: "aspect-square w-[150px]"
219
+ }, null, -1), _e = { class: "flex flex-col gap-16 text-center" }, Fe = { class: "fm-typo-en-title-sm-800" }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Je = /* @__PURE__ */ X({
217
220
  __name: "Reward",
218
221
  setup(W) {
219
- const { t: n } = oe(), I = {
220
- label: n("connect.storeRewards.create"),
222
+ const { t: l } = oe(), I = {
223
+ label: l("connect.storeRewards.create"),
221
224
  value: "create",
222
225
  isPrimary: !0,
223
226
  prependIcon: "add"
224
- }, p = J(), C = pe(), { global: v, minor: a } = G, y = ue(), R = Q(), u = x({
227
+ }, d = J(), C = de(), { global: v, minor: o } = G, y = ue(), R = Q(), u = h({
225
228
  searchKey: "",
226
229
  columnFilters: []
227
- }), F = H(() => C.rewards);
228
- function D(e) {
230
+ }), _ = H(() => C.rewards);
231
+ function $(e) {
229
232
  y.push({
230
233
  name: ye["$connect-STORE_REWARD_COLLECTIONS"],
231
234
  params: { id: e }
@@ -233,66 +236,66 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
233
236
  }
234
237
  const S = [
235
238
  {
236
- header: n("connect.storeRewards.table.name"),
239
+ header: l("connect.storeRewards.table.name"),
237
240
  accessorFn: (e) => e.name
238
241
  },
239
242
  {
240
- header: n("connect.storeRewards.table.type"),
243
+ header: l("connect.storeRewards.table.type"),
241
244
  cell(e) {
242
245
  return e.row.original.collectibleConfig ? ee[e.row.original.collectibleConfig.type].chip() : "N/A";
243
246
  }
244
247
  },
245
248
  {
246
- header: n("connect.storeRewards.table.summary"),
249
+ header: l("connect.storeRewards.table.summary"),
247
250
  accessorFn: (e) => {
248
- var o, i;
251
+ var a, i;
249
252
  if (e.option.type === "VOUCHER")
250
- return me((i = (o = e.option.collectibleConfig) == null ? void 0 : o.extras) == null ? void 0 : i.effect);
253
+ return me((i = (a = e.option.collectibleConfig) == null ? void 0 : a.extras) == null ? void 0 : i.effect);
251
254
  if (e.option.collectibleType == "TITLE") {
252
- const m = p.sortedTitles.find(
255
+ const m = d.sortedTitles.find(
253
256
  (g) => g._id == e.option.collectible
254
257
  );
255
258
  return `Get ${m == null ? void 0 : m.name} valid for ${e.option.validityOption.validForDay} days`;
256
259
  }
257
- return `Get ${e.option.earningOption.amount} ${ce.formattedType(e.option.collectibleType)}`;
260
+ return `Get ${e.option.earningOption.amount} ${pe.formattedType(e.option.collectibleType)}`;
258
261
  }
259
262
  },
260
263
  {
261
- header: n("connect.storeRewards.table.actions"),
264
+ header: l("connect.storeRewards.table.actions"),
262
265
  cell(e) {
263
- return O("div", { class: "flex items-center justify-end gap-4" }, [
264
- O(
266
+ return F("div", { class: "flex items-center justify-end gap-4" }, [
267
+ F(
265
268
  L.FmMenu,
266
269
  {
267
270
  placement: "bottom-end",
268
- onClick: (o) => {
269
- o.stopPropagation();
271
+ onClick: (a) => {
272
+ a.stopPropagation();
270
273
  }
271
274
  },
272
275
  {
273
- "menu-button": () => O(L.FmButton, {
276
+ "menu-button": () => F(L.FmButton, {
274
277
  icon: "more_vert",
275
278
  iconColor: "neutral-gray-400",
276
279
  variant: "tertiary"
277
280
  }),
278
281
  default: () => [
279
- e.row.original.option.type === "VOUCHER" && O(L.FmMenuItem, {
282
+ e.row.original.option.type === "VOUCHER" && F(L.FmMenuItem, {
280
283
  label: "View collections",
281
- onClick: async (o) => {
282
- o.stopPropagation(), D(
284
+ onClick: async (a) => {
285
+ a.stopPropagation(), $(
283
286
  e.row.original.option.collectible
284
287
  );
285
288
  }
286
289
  }),
287
- O(
290
+ F(
288
291
  L.FmMenuItem,
289
292
  {
290
- onClick: async (o) => {
291
- o.stopPropagation(), $(e.row.original);
293
+ onClick: async (a) => {
294
+ a.stopPropagation(), D(e.row.original);
292
295
  }
293
296
  },
294
297
  {
295
- label: O(
298
+ label: F(
296
299
  "div",
297
300
  {
298
301
  class: "text-fm-color-typo-error fm-typo-en-body-md-400"
@@ -307,29 +310,29 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
307
310
  ]);
308
311
  }
309
312
  }
310
- ], T = x();
311
- async function $(e) {
313
+ ], x = h();
314
+ async function D(e) {
312
315
  await te.remove(
313
- n("connect.storeRewards.delete.confirm"),
314
- n("connect.storeRewards.delete.title")
315
- ) && await a(
316
+ l("connect.storeRewards.delete.confirm"),
317
+ l("connect.storeRewards.delete.title")
318
+ ) && await o(
316
319
  async () => {
317
320
  await P.deleteReward(e._id), await C.readRewards();
318
321
  },
319
322
  {
320
- message: n("connect.storeRewards.delete.message"),
321
- successMessage: n("connect.storeRewards.delete.success")
323
+ message: l("connect.storeRewards.delete.message"),
324
+ successMessage: l("connect.storeRewards.delete.success")
322
325
  }
323
326
  );
324
327
  }
325
- async function V(e) {
326
- var o;
328
+ async function T(e) {
329
+ var a;
327
330
  e || (e = {
328
331
  name: "",
329
332
  option: {
330
333
  type: "LOYALTY",
331
- collectible: p.loyaltyRewards.items[0].value,
332
- collectibleType: p.loyaltyRewards.items[0].raw.type,
334
+ collectible: d.loyaltyRewards.items[0].value,
335
+ collectibleType: d.loyaltyRewards.items[0].raw.type,
333
336
  validityOption: {
334
337
  validForDay: 7
335
338
  },
@@ -338,10 +341,10 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
338
341
  amount: 1
339
342
  }
340
343
  }
341
- }), (o = T.value) == null || o.showSheet(!0, ae(e));
344
+ }), (a = x.value) == null || a.showSheet(!0, ae(e));
342
345
  }
343
- async function l(e) {
344
- let o = !1;
346
+ async function n(e) {
347
+ let a = !1;
345
348
  e._id && e.option.type === "VOUCHER" && await new Promise((i) => {
346
349
  R.open({
347
350
  title: "Confirmation",
@@ -349,17 +352,17 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
349
352
  primaryActions: { text: "Update all", close: !0 },
350
353
  secondaryActions: { text: "Update future only", close: !0 }
351
354
  }).onPrimary(async () => {
352
- o = !0, i();
355
+ a = !0, i();
353
356
  }).onSecondary(async () => {
354
357
  i();
355
358
  });
356
- }), await a(
359
+ }), await o(
357
360
  async () => {
358
361
  var i;
359
362
  e.collectibleConfig = void 0, e._id ? await P.updateReward(e._id, {
360
363
  ...e,
361
- updateCollection: o
362
- }) : await P.createReward(e), await C.readRewards(), (i = T.value) == null || i.showSheet(!1);
364
+ updateCollection: a
365
+ }) : await P.createReward(e), await C.readRewards(), (i = x.value) == null || i.showSheet(!1);
363
366
  },
364
367
  {
365
368
  message: "Updating reward",
@@ -369,68 +372,65 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
369
372
  }
370
373
  return q(async () => {
371
374
  await v(async () => {
372
- await p.readMembership(), await p.readRewards(), await C.readRewards();
375
+ await d.readMembership(), await d.readRewards(), await C.readRewards();
373
376
  });
374
- }), (e, o) => {
375
- const i = w("FmPageHead"), m = w("FmSearch"), g = w("FmTable"), r = w("FmButton"), E = w("FmCard");
377
+ }), (e, a) => {
378
+ const i = f("FmPageHead"), m = f("FmSearch"), g = f("FmTable"), r = f("FmButton"), E = f("FmCard");
376
379
  return b(), M(Y, null, [
377
- d(i, {
378
- title: t(n)("connect.reward.title"),
380
+ c(i, {
381
+ title: t(l)("connect.reward.title"),
379
382
  actions: [I],
380
383
  "back-button": !0,
381
- "onClick:action": o[0] || (o[0] = () => V()),
382
- "onClick:back": o[1] || (o[1] = () => {
383
- var c;
384
- return (c = t(y)) == null ? void 0 : c.back();
384
+ "onClick:action": a[0] || (a[0] = () => T()),
385
+ "onClick:back": a[1] || (a[1] = () => {
386
+ var p;
387
+ return (p = t(y)) == null ? void 0 : p.back();
385
388
  })
386
389
  }, null, 8, ["title", "actions"]),
387
- f("div", ve, [
388
- t(F) && t(F).length > 0 ? (b(), M(Y, { key: 0 }, [
389
- f("div", ge, [
390
- o[6] || (o[6] = f("div", { class: "flex gap-8" }, null, -1)),
391
- d(m, {
390
+ w("div", ge, [
391
+ t(_) && t(_).length > 0 ? (b(), M(Y, { key: 0 }, [
392
+ w("div", be, [
393
+ Re,
394
+ c(m, {
392
395
  modelValue: t(u).searchKey,
393
- "onUpdate:modelValue": o[2] || (o[2] = (c) => t(u).searchKey = c),
396
+ "onUpdate:modelValue": a[2] || (a[2] = (p) => t(u).searchKey = p),
394
397
  class: "",
395
398
  placeholder: "search",
396
399
  collapsible: ""
397
400
  }, null, 8, ["modelValue"])
398
401
  ]),
399
- d(g, {
400
- "row-data": t(F),
402
+ c(g, {
403
+ "row-data": t(_),
401
404
  "column-defs": S,
402
405
  "search-value": t(u).searchKey,
403
406
  "column-filter": t(u).columnFilters,
404
- onRowClick: o[3] || (o[3] = (c) => V(c.original)),
405
- "hide-footer": t(F).length < 10
407
+ onRowClick: a[3] || (a[3] = (p) => T(p.original)),
408
+ "hide-footer": t(_).length < 10
406
409
  }, null, 8, ["row-data", "search-value", "column-filter", "hide-footer"])
407
- ], 64)) : (b(), h(E, {
410
+ ], 64)) : (b(), U(E, {
408
411
  key: 1,
409
412
  variant: "outlined",
410
413
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
411
414
  }, {
412
415
  default: A(() => [
413
- o[7] || (o[7] = f("img", {
414
- src: z,
415
- class: "aspect-square w-[150px]"
416
- }, null, -1)),
417
- f("div", be, [
418
- f("div", Re, B(t(n)("connect.storeRewards.empty.title")), 1),
419
- f("div", Ce, B(t(n)("connect.storeRewards.empty.description")), 1)
416
+ Ce,
417
+ w("div", _e, [
418
+ w("div", Fe, B(t(l)("connect.storeRewards.empty.title")), 1),
419
+ w("div", Oe, B(t(l)("connect.storeRewards.empty.description")), 1)
420
420
  ]),
421
- d(r, {
421
+ c(r, {
422
422
  variant: "primary",
423
- label: t(n)("connect.storeRewards.empty.action"),
424
- onClick: o[4] || (o[4] = (c) => V()),
423
+ label: t(l)("connect.storeRewards.empty.action"),
424
+ onClick: a[4] || (a[4] = (p) => T()),
425
425
  icon: "add"
426
426
  }, null, 8, ["label"])
427
427
  ]),
428
428
  _: 1
429
429
  })),
430
- d(we, {
430
+ c(ve, {
431
431
  ref_key: "rewardSheetRef",
432
- ref: T,
433
- onUpdate: o[5] || (o[5] = (c) => l(c))
432
+ ref: x,
433
+ onUpdate: a[5] || (a[5] = (p) => n(p))
434
434
  }, null, 512)
435
435
  ])
436
436
  ], 64);
@@ -438,5 +438,5 @@ const fe = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__
438
438
  }
439
439
  });
440
440
  export {
441
- Ke as default
441
+ Je as default
442
442
  };