@feedmepos/mf-connect 0.1.13-prod → 0.1.15-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 (91) hide show
  1. package/dist/{Analytic-CBEDTJ94.js → Analytic-C7qqDS5D.js} +18 -17
  2. package/dist/{App-BcrQs0nE.js → App-DKZYz5r2.js} +68 -64
  3. package/dist/Bin-U7U1Vaju.js +165 -0
  4. package/dist/{Broadcast-ClM81ght.js → Broadcast-BzChnp4V.js} +38 -37
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CTwScH9I.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BELIbS3v.js} +6 -7
  6. package/dist/{Card-B7_nUT03.js → Card-DAfZz7q5.js} +78 -79
  7. package/dist/Collections-joGRHyag.js +445 -0
  8. package/dist/{Credit-DC6pzGIR.js → Credit-N1qDB4XC.js} +57 -56
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DCwaUg09.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-J95iaF7a.js} +27 -27
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-D2qCLBp3.js → EffectSheet.vue_vue_type_style_index_0_lang-DwzQSmst.js} +8 -8
  11. package/dist/{Experience-ClJWQLEB.js → Experience-D5GrDbft.js} +39 -38
  12. package/dist/{Game-BznCxZXt.js → Game-DI7BDPO_.js} +46 -45
  13. package/dist/{Index-D27v-Lqw.js → Index-CbuAJ2dE.js} +9 -9
  14. package/dist/{Marketing-FvYJ_Lt-.js → Marketing-BSqMfy70.js} +5 -5
  15. package/dist/{Member-CQYj0FQK.js → Member-CGd5wNHJ.js} +4 -4
  16. package/dist/MemberList-DnS8KHYF.js +1596 -0
  17. package/dist/MemberTransactions-GAAX3aSV.js +45 -0
  18. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-_72tx6g3.js → MessageInput.vue_vue_type_script_setup_true_lang-Bc2wcibo.js} +5 -5
  19. package/dist/{Mission-LwSpobZu.js → Mission-BVM_1IJ8.js} +35 -34
  20. package/dist/{Overview-PXshmkPD.js → Overview-D2IYZCPn.js} +62 -63
  21. package/dist/{Point-uaIRQMRW.js → Point-B684quZM.js} +51 -50
  22. package/dist/{Promotion-qjos6ksl.js → Promotion-DJOoRnxt.js} +34 -33
  23. package/dist/{Record-qqPaVdrx.js → Record-Bk74XVUj.js} +6 -6
  24. package/dist/{Reward-BC6GJ4kD.js → Reward-BM0AGGL6.js} +35 -35
  25. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CF7hNZIU.js → RewardGroup.vue_vue_type_script_setup_true_lang-CuA2D52B.js} +12 -13
  26. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DQ8rQIwv.js → RuleGroup.vue_vue_type_script_setup_true_lang-Cxv3cZ1v.js} +14 -15
  27. package/dist/{Segment-B5E2FdYc.js → Segment-DqOsH95n.js} +13 -13
  28. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Dqz3uAze.js → SelectItems.vue_vue_type_script_setup_true_lang-ypjkVZkZ.js} +2 -2
  29. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-Qo0aOTI9.js +147 -0
  30. package/dist/{Setting-CA9PQVKp.js → Setting-D6cRTVUl.js} +31 -31
  31. package/dist/{Store-irRFotGI.js → Store-DqtUurcv.js} +295 -293
  32. package/dist/{StoreRewards-CcJ8MMvp.js → StoreRewards-DPFMA3p9.js} +12 -12
  33. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CYqo5att.js +1105 -0
  34. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-2i2fDWDC.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DxEV-6_4.js} +1 -1
  35. package/dist/{Tier-CdxK-QtB.js → Tier-CFd-HaGX.js} +20 -21
  36. package/dist/{Title-Ci_NXdrD.js → Title-CBktBb5l.js} +20 -21
  37. package/dist/{Transaction-ChKg7UTd.js → Transaction-Bb8UU_lj.js} +2 -2
  38. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-B3INK4Ue.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DBiUmz3C.js} +6 -6
  39. package/dist/Voucher-Bukem4U7.js +353 -0
  40. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-D9wqrTVc.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CTbqVMCn.js} +10 -10
  41. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Di6QPzfu.js → ZodTextField.vue_vue_type_script_setup_true_lang-D8zMv7ks.js} +1 -1
  42. package/dist/{app-B9MkUjRo.js → app-BL2xIPMp.js} +102 -66
  43. package/dist/{app-BmT3kZJr.js → app-CO6FVdHg.js} +1 -1
  44. package/dist/app.js +1 -1
  45. package/dist/{business-1nKmKs9l.js → business-BMTDDe8v.js} +1 -1
  46. package/dist/{dto-DP9kIlr_.js → campaign-C5TEfnWg.js} +610 -818
  47. package/dist/{campaign-xn4PhDSV.js → campaign-CzpECNqa.js} +2 -2
  48. package/dist/{campaign.enum-KwZQ6yBR.js → campaign.enum-CVF3KbJ2.js} +1 -1
  49. package/dist/{campaign.fn-CVj38fae.js → campaign.fn-WT1gfEwK.js} +2 -2
  50. package/dist/{collectible.enum-DojcTb50.js → collectible.enum-BW7-BEa-.js} +3 -3
  51. package/dist/{collection.fn-Bv2EZuA3.js → collection.fn-BRsC9uPP.js} +2 -2
  52. package/dist/dto-B1tWHAjt.js +214 -0
  53. package/dist/{effect-47JS4i8Q.js → effect-4Ov4Jl68.js} +1 -1
  54. package/dist/{email-addresses-C6Jvh8MK.js → email-addresses-L25192f3.js} +1 -1
  55. package/dist/{export-BdPv7Hej.js → export-UEJjaL0g.js} +5 -5
  56. package/dist/{helper-Di0AEV1F.js → helper-BNBSbgdl.js} +1 -1
  57. package/dist/{index-BPkcvPHp.js → index-BWY2o9U9.js} +1 -1
  58. package/dist/index-BnWjqXOJ.js +115 -0
  59. package/dist/{index-D5LMqy6S.js → index-BxwVs3Ot.js} +29 -4
  60. package/dist/index-Cg64BkVG.js +44 -0
  61. package/dist/{index-DHb0pIVR.js → index-ChKwu49G.js} +6 -6
  62. package/dist/{index-Be9fjCVp.js → index-CtY-c-yc.js} +1 -1
  63. package/dist/{index-CVsuhUpe.js → index-D4iYmdD4.js} +12 -13
  64. package/dist/{index-YAoPUv6z.js → index-D8Qn3ZjQ.js} +1 -1
  65. package/dist/{index-gYvuI9Nk.js → index-DpCBCiH_.js} +5 -5
  66. package/dist/{index-BZg5tj39.js → index-DxjXJh5H.js} +3039 -3036
  67. package/dist/{index-BUjGxHkM.js → index-fdv6AHmk.js} +2057 -1010
  68. package/dist/{index-CDmiwLKd.js → index-jf1CG6wc.js} +1 -1
  69. package/dist/{index.esm2017-C-O-0X0H.js → index.esm2017-D-3LEGru.js} +1 -1
  70. package/dist/{loading-E0zwe5lq.js → loading-CUp8ZsA0.js} +4 -4
  71. package/dist/{membership-OECc9rWj.js → membership-DwbiFGd7.js} +6 -6
  72. package/dist/{money-CVSdH00t.js → money-BLrbHrdQ.js} +1 -1
  73. package/dist/{number-Iu6cix1k.js → number--bZt83Nn.js} +1 -1
  74. package/dist/objectid-CCGQh_Y_.js +145 -0
  75. package/dist/{reward-BH_1xbHQ.js → reward-D99cFWcD.js} +1 -1
  76. package/dist/{rule-CbkzOdR3.js → rule-UpH1Y1i5.js} +3 -3
  77. package/dist/{rule-builder-WIEeIoXD.js → rule-builder-ujLy6UTt.js} +1 -1
  78. package/dist/{template-Dlo0YPQp.js → template-FiuUP37O.js} +4 -4
  79. package/dist/{trigger-BMknrXKj.js → trigger-BZYtwSky.js} +13 -13
  80. package/dist/{usePagination-B9K_XXDC.js → usePagination-DDW-s6D3.js} +1 -1
  81. package/dist/{user-CuX5BIg5.js → user-BA3Sw5dU.js} +1 -1
  82. package/dist/{vue-i18n-CrVlAF7z.js → vue-i18n-C5t_xZZj.js} +2 -2
  83. package/package.json +6 -6
  84. package/dist/Collections-N7LIfZ2D.js +0 -435
  85. package/dist/MemberList-UIZANV1T.js +0 -1043
  86. package/dist/MemberTransactions-JKLzrvh6.js +0 -38
  87. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CcNjdcMX.js +0 -1132
  88. package/dist/Voucher-CDlHku1x.js +0 -490
  89. package/dist/index-CPjDZrsE.js +0 -99
  90. package/dist/index-Dd0IgwOF.js +0 -1051
  91. package/dist/objectid-B16Lk1pC.js +0 -145
@@ -0,0 +1,45 @@
1
+ import { defineComponent as d, ref as p, resolveComponent as _, openBlock as a, createElementBlock as f, createVNode as v, unref as o, createBlock as u, createCommentVNode as b } from "vue";
2
+ import { _ as k, a as x } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-CYqo5att.js";
3
+ import { useRouter as y } from "vue-router";
4
+ const C = { class: "flex flex-col gap-y-32 pb-24" }, F = /* @__PURE__ */ d({
5
+ __name: "MemberTransactions",
6
+ setup(T) {
7
+ const r = y(), t = [
8
+ {
9
+ label: "Collection",
10
+ value: "collection"
11
+ },
12
+ {
13
+ label: "Store",
14
+ value: "store"
15
+ }
16
+ ], l = p(
17
+ t.find(
18
+ (s) => {
19
+ var e;
20
+ return s.value == ((e = r.currentRoute.value.query) == null ? void 0 : e.tab);
21
+ }
22
+ ) || t[0]
23
+ ), n = r.currentRoute.value.params.id;
24
+ return (s, e) => {
25
+ const c = _("FmTabs");
26
+ return a(), f("div", C, [
27
+ v(c, {
28
+ "model-value": o(l).value,
29
+ items: t,
30
+ "onUpdate:modelValue": e[0] || (e[0] = (m) => l.value = t.find((i) => i.value === m))
31
+ }, null, 8, ["model-value"]),
32
+ o(l).value == "collection" ? (a(), u(k, {
33
+ key: 0,
34
+ user: o(n)
35
+ }, null, 8, ["user"])) : o(l).value == "store" ? (a(), u(x, {
36
+ key: 1,
37
+ user: o(n)
38
+ }, null, 8, ["user"])) : b("", !0)
39
+ ]);
40
+ };
41
+ }
42
+ });
43
+ export {
44
+ F as default
45
+ };
@@ -1,6 +1,6 @@
1
- import { defineComponent as M, ref as C, computed as E, onMounted as D, resolveComponent as l, openBlock as p, createElementBlock as v, createElementVNode as m, createVNode as c, unref as u, withCtx as h, createTextVNode as F, toDisplayString as T, Fragment as j, renderList as k, createBlock as U } from "vue";
2
- import { p as A } from "./loading-E0zwe5lq.js";
3
- import { s as B } from "./index-Dd0IgwOF.js";
1
+ import { defineComponent as M, ref as C, computed as D, onMounted as E, resolveComponent as l, openBlock as p, createElementBlock as v, createElementVNode as m, createVNode as c, unref as u, withCtx as h, createTextVNode as F, toDisplayString as T, Fragment as j, renderList as k, createBlock as U } from "vue";
2
+ import { p as A } from "./loading-CUp8ZsA0.js";
3
+ import { D as B } from "./index-fdv6AHmk.js";
4
4
  const L = {
5
5
  "user.name": {
6
6
  name: "User name"
@@ -101,7 +101,7 @@ const L = {
101
101
  variables: n.variables
102
102
  });
103
103
  }
104
- const _ = C(n.helperState || "none"), y = E(() => {
104
+ const _ = C(n.helperState || "none"), y = D(() => {
105
105
  var t;
106
106
  const a = ((t = n.modelValue) == null ? void 0 : t.content.replace(/{{([^}]+)}}/g, (s, o) => {
107
107
  switch (o) {
@@ -134,7 +134,7 @@ const L = {
134
134
  }
135
135
  return `Character used: ${e} ≈ ${Math.ceil(e / 160)} SMS (Every 160 characters will be sent as 1 SMS)`;
136
136
  });
137
- return D(() => {
137
+ return E(() => {
138
138
  g("update:model-value", {
139
139
  ...n.modelValue,
140
140
  variables: n.variables
@@ -1,30 +1,30 @@
1
1
  import { defineComponent as E, ref as M, computed as $, h as d, onMounted as H, resolveComponent as l, openBlock as p, createElementBlock as h, Fragment as w, createVNode as c, unref as t, createElementVNode as s, withCtx as x, renderList as q, createBlock as b, resolveDynamicComponent as z, toDisplayString as u } from "vue";
2
2
  import { _ as W } from "./campaign-CpzFl8Vr.js";
3
- import { a as G, p as J, u as Q } from "./loading-E0zwe5lq.js";
4
- import { g as L, a as B } from "./dto-DP9kIlr_.js";
5
- import { u as X } from "./business-1nKmKs9l.js";
6
- import { u as Y } from "./campaign-xn4PhDSV.js";
7
- import { useDialog as Z, components as v } from "@feedmepos/ui-library";
8
- import { _ as ee } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
9
- import { u as oe } from "./template-Dlo0YPQp.js";
10
- import { _ as te } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DCwaUg09.js";
11
- import { s as ne } from "./index-CuvNtC_M.js";
12
- import { u as ae } from "./vue-i18n-CrVlAF7z.js";
13
- import { c as _ } from "./index-CPjDZrsE.js";
14
- const se = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-center justify-between w-full" }, ce = { class: "flex gap-8 overflow-x-auto" }, re = { class: "space-y-8" }, le = { class: "flex w-full gap-4 items-center" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { class: "space-y-4" }, pe = { class: "fm-typo-en-body-lg-600" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = /* @__PURE__ */ s("img", {
3
+ import { a as G, p as J, u as Q } from "./loading-CUp8ZsA0.js";
4
+ import { g as X, a as L, b as B } from "./campaign-C5TEfnWg.js";
5
+ import { u as Y } from "./business-BMTDDe8v.js";
6
+ import { u as Z } from "./campaign-CzpECNqa.js";
7
+ import { useDialog as ee, components as v } from "@feedmepos/ui-library";
8
+ import { _ as oe } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
9
+ import { u as te } from "./template-FiuUP37O.js";
10
+ import { _ as ne } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-J95iaF7a.js";
11
+ import { s as ae } from "./index-CuvNtC_M.js";
12
+ import { u as se } from "./vue-i18n-C5t_xZZj.js";
13
+ import { c as _ } from "./index-BnWjqXOJ.js";
14
+ const ie = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-center justify-between w-full" }, re = { class: "flex gap-8 overflow-x-auto" }, le = { class: "space-y-8" }, me = { class: "flex w-full gap-4 items-center" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = /* @__PURE__ */ s("img", {
15
15
  src: W,
16
16
  class: "aspect-square w-[150px]"
17
- }, null, -1), ye = { class: "flex flex-col gap-16 text-center" }, _e = { class: "fm-typo-en-title-sm-800" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ke = /* @__PURE__ */ E({
17
+ }, null, -1), _e = { class: "flex flex-col gap-16 text-center" }, he = { class: "fm-typo-en-title-sm-800" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ne = /* @__PURE__ */ E({
18
18
  __name: "Mission",
19
- setup(we) {
20
- const { t: n } = ae(), P = {
19
+ setup(xe) {
20
+ const { t: n } = se(), P = {
21
21
  label: n("connect.program.common.actions.create", {
22
22
  type: n("connect.program.mission.title").toLowerCase()
23
23
  }),
24
24
  value: "create",
25
25
  isPrimary: !0,
26
26
  prependIcon: "add"
27
- }, C = Z(), K = oe("MISSION", C), N = X(), m = Y(), { global: R, minor: S } = Q, i = M({
27
+ }, C = ee(), K = te("MISSION", C), N = Y(), m = Z(), { global: R, minor: S } = Q, i = M({
28
28
  searchKey: "",
29
29
  location: null
30
30
  }), g = $(
@@ -62,11 +62,12 @@ const se = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-
62
62
  },
63
63
  {
64
64
  header: n("connect.campaign.mission.type"),
65
- accessorFn: (e) => ne(e.mission.type)
65
+ accessorFn: (e) => ae(e.mission.type)
66
66
  //v.effect,
67
67
  },
68
68
  {
69
69
  header: n("connect.program.common.table.status"),
70
+ accessorFn: (e) => X(e),
70
71
  cell(e) {
71
72
  return L(e.row.original);
72
73
  }
@@ -167,7 +168,7 @@ const se = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-
167
168
  actions: t(g).length > 0 ? [P] : [],
168
169
  "onClick:action": o[0] || (o[0] = () => y())
169
170
  }, null, 8, ["title", "actions"]),
170
- s("div", se, [
171
+ s("div", ie, [
171
172
  c(f, {
172
173
  modelValue: t(i).searchKey,
173
174
  "onUpdate:modelValue": o[1] || (o[1] = (a) => t(i).searchKey = a),
@@ -176,9 +177,9 @@ const se = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-
176
177
  collapsible: ""
177
178
  }, null, 8, ["modelValue", "placeholder"]),
178
179
  t(m).campaigns.mission && t(m).campaigns.mission.length > 0 ? (p(), h(w, { key: 0 }, [
179
- s("div", ie, [
180
- s("div", ce, [
181
- c(ee, {
180
+ s("div", ce, [
181
+ s("div", re, [
182
+ c(oe, {
182
183
  modelValue: t(i).location,
183
184
  "onUpdate:modelValue": o[2] || (o[2] = (a) => t(i).location = a),
184
185
  label: t(n)("connect.program.common.location"),
@@ -215,16 +216,16 @@ const se = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-
215
216
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
216
217
  }, {
217
218
  default: x(() => [
218
- s("div", re, [
219
- s("div", le, [
219
+ s("div", le, [
220
+ s("div", me, [
220
221
  (p(), b(z(t(L)(a)))),
221
- s("div", me, u(a.currentReceive ?? 0) + " used ", 1)
222
+ s("div", de, u(a.currentReceive ?? 0) + " used ", 1)
222
223
  ]),
223
- s("div", de, [
224
- s("div", pe, u(a.name), 1),
225
- s("div", ue, u(t(B)(a)), 1)
224
+ s("div", pe, [
225
+ s("div", ue, u(a.name), 1),
226
+ s("div", ge, u(t(B)(a)), 1)
226
227
  ]),
227
- s("div", ge, " Token received: " + u(a.currentReceive ?? 0), 1)
228
+ s("div", fe, " Token received: " + u(a.currentReceive ?? 0), 1)
228
229
  ]),
229
230
  c(I, {
230
231
  icon: "delete",
@@ -244,10 +245,10 @@ const se = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-
244
245
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
245
246
  }, {
246
247
  default: x(() => [
247
- fe,
248
- s("div", ye, [
249
- s("div", _e, u(t(n)("connect.campaign.mission.createProgram")), 1),
250
- s("div", he, u(t(n)("connect.campaign.mission.description")), 1)
248
+ ye,
249
+ s("div", _e, [
250
+ s("div", he, u(t(n)("connect.campaign.mission.createProgram")), 1),
251
+ s("div", we, u(t(n)("connect.campaign.mission.description")), 1)
251
252
  ]),
252
253
  c(I, {
253
254
  variant: "primary",
@@ -258,7 +259,7 @@ const se = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-
258
259
  ]),
259
260
  _: 1
260
261
  })),
261
- c(te, {
262
+ c(ne, {
262
263
  ref_key: "sheetRef",
263
264
  ref: F,
264
265
  "onSubmit:modelValue": U
@@ -269,5 +270,5 @@ const se = { class: "px-24 flex flex-col gap-y-16" }, ie = { class: "flex items-
269
270
  }
270
271
  });
271
272
  export {
272
- Ke as default
273
+ Ne as default
273
274
  };
@@ -1,27 +1,26 @@
1
1
  import { defineComponent as q, resolveComponent as w, openBlock as C, createElementBlock as B, Fragment as Y, createVNode as c, withCtx as V, createElementVNode as a, toDisplayString as O, unref as r, renderSlot as _e, ref as $, computed as G, watch as ie, createBlock as j, isRef as J, resolveDynamicComponent as ne, renderList as re, normalizeClass as ce, createTextVNode as de, createCommentVNode as z, h as te, onMounted as ve } from "vue";
2
2
  import { _ as ge } from "./campaign-CpzFl8Vr.js";
3
- import { u as Z } from "./vue-i18n-CrVlAF7z.js";
4
- import { c as we, p as K, u as ue } from "./loading-E0zwe5lq.js";
3
+ import { u as Z } from "./vue-i18n-C5t_xZZj.js";
4
+ import { c as we, p as K, u as ue } from "./loading-CUp8ZsA0.js";
5
5
  import { J as X } from "./JsonViewer-v8_C7l5N.js";
6
6
  import { Z as N } from "./zod-Bg2FbC-D.js";
7
7
  import { u as W } from "./app-wDQR6dpb.js";
8
- import { u as Q, _ as ye } from "./RewardGroup.vue_vue_type_script_setup_true_lang-CF7hNZIU.js";
9
- import { u as me } from "./reward-BH_1xbHQ.js";
10
- import "./index-BUjGxHkM.js";
11
- import "./index-DHb0pIVR.js";
12
- import { k as le, l as se } from "./index-Dd0IgwOF.js";
13
- import { a as be, b as xe } from "./index-CVsuhUpe.js";
14
- import "./index-BPkcvPHp.js";
15
- import "./index-gYvuI9Nk.js";
16
- import { C as fe } from "./membership-OECc9rWj.js";
17
- import { t as ee } from "./helper-Di0AEV1F.js";
8
+ import { u as Q, _ as ye } from "./RewardGroup.vue_vue_type_script_setup_true_lang-CuA2D52B.js";
9
+ import { u as me } from "./reward-D99cFWcD.js";
10
+ import { i as le, j as se } from "./index-fdv6AHmk.js";
11
+ import "./index-ChKwu49G.js";
12
+ import { a as be, b as xe } from "./index-D4iYmdD4.js";
13
+ import "./index-BWY2o9U9.js";
14
+ import "./index-DpCBCiH_.js";
15
+ import { C as fe } from "./membership-DwbiFGd7.js";
16
+ import { t as ee } from "./helper-BNBSbgdl.js";
18
17
  import { c as H } from "./object-qECH92oz.js";
19
18
  import { useDialog as Ce, components as oe } from "@feedmepos/ui-library";
20
- import { _ as Re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-Di6QPzfu.js";
21
- import { b as Se, _ as $e, a as ke } from "./trigger-BMknrXKj.js";
22
- import { O as Fe } from "./objectid-B16Lk1pC.js";
23
- import { r as pe } from "./index-YAoPUv6z.js";
24
- import { u as Pe } from "./business-1nKmKs9l.js";
19
+ import { _ as Re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-D8zMv7ks.js";
20
+ import { T as Se, _ as $e, a as Fe } from "./trigger-BZYtwSky.js";
21
+ import { O as ke } from "./objectid-CCGQh_Y_.js";
22
+ import { r as pe } from "./index-D8Qn3ZjQ.js";
23
+ import { u as Pe } from "./business-BMTDDe8v.js";
25
24
  const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Te = { class: "flex-1" }, Ue = { class: "flex items-center gap-8" }, Ae = { class: "fm-typo-en-title-sm-800" }, Le = { class: "flex gap-8 items-center" }, Ee = { class: "space-y-4 hidden xs:block border-b border-fm-color-neutral-gray-100 px-16 flex-1 pb-24" }, Be = { class: "flex items-center justify-between" }, Oe = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, je = { class: "flex-1 space-y-4" }, De = { class: "fm-typo-en-body-lg-600" }, Ge = /* @__PURE__ */ q({
26
25
  __name: "ReferralRewadGroupCard",
27
26
  props: {
@@ -35,13 +34,13 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
35
34
  }
36
35
  },
37
36
  emits: ["edit", "addCount", "remove"],
38
- setup(k, { emit: n }) {
37
+ setup(F, { emit: n }) {
39
38
  const { t: I } = Z(), p = n;
40
39
  return (g, m) => {
41
40
  const l = w("FmButton"), d = w("FmListItem");
42
41
  return C(), B(Y, null, [
43
42
  c(d, {
44
- onClick: m[4] || (m[4] = (u) => p("edit", k.level)),
43
+ onClick: m[4] || (m[4] = (u) => p("edit", F.level)),
45
44
  class: "!p-0"
46
45
  }, {
47
46
  default: V(() => [
@@ -49,7 +48,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
49
48
  a("div", Ie, [
50
49
  a("div", Te, [
51
50
  a("div", Ue, [
52
- a("div", Ae, O(k.rewardGroup.name), 1)
51
+ a("div", Ae, O(F.rewardGroup.name), 1)
53
52
  ])
54
53
  ])
55
54
  ]),
@@ -59,13 +58,13 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
59
58
  label: r(I)("connect.referral.reward.add_count"),
60
59
  icon: "add",
61
60
  onClick: m[0] || (m[0] = (u) => {
62
- u.stopPropagation(), p("addCount", k.level);
61
+ u.stopPropagation(), p("addCount", F.level);
63
62
  })
64
63
  }, null, 8, ["label"]),
65
64
  c(l, {
66
65
  icon: "delete",
67
66
  onClick: m[1] || (m[1] = (u) => {
68
- u.stopPropagation(), p("remove", k.level);
67
+ u.stopPropagation(), p("remove", F.level);
69
68
  }),
70
69
  variant: "tertiary"
71
70
  })
@@ -76,14 +75,14 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
76
75
  a("div", Oe, [
77
76
  a("div", je, [
78
77
  a("div", null, [
79
- a("div", De, O(k.rewardGroup.name), 1)
78
+ a("div", De, O(F.rewardGroup.name), 1)
80
79
  ])
81
80
  ])
82
81
  ]),
83
82
  c(l, {
84
83
  variant: "tertiary",
85
84
  icon: "delete",
86
- onClick: m[2] || (m[2] = (u) => (u.stopPropagation(), p("remove", k.level)))
85
+ onClick: m[2] || (m[2] = (u) => (u.stopPropagation(), p("remove", F.level)))
87
86
  })
88
87
  ]),
89
88
  c(l, {
@@ -92,7 +91,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
92
91
  label: "Add count",
93
92
  disabled: !0,
94
93
  icon: "add",
95
- onClick: m[3] || (m[3] = (u) => (u.stopPropagation(), p("addCount", k.level)))
94
+ onClick: m[3] || (m[3] = (u) => (u.stopPropagation(), p("addCount", F.level)))
96
95
  })
97
96
  ])
98
97
  ]),
@@ -105,10 +104,10 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
105
104
  }), Me = { class: "flex flex-col space-y-16 pr-12" }, Ne = { class: "flex gap-16 items-center" }, He = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ze = { class: "fm-typo-en-title-sm-800" }, Ye = { class: "flex items-center gap-8" }, qe = /* @__PURE__ */ q({
106
105
  __name: "EditReferralCountSheet",
107
106
  emits: ["update"],
108
- setup(k, { expose: n, emit: I }) {
107
+ setup(F, { expose: n, emit: I }) {
109
108
  const { t: p } = Z(), g = I, m = $(!1), l = $({}), d = $(-1), u = $(-1), R = Q(), A = be.superRefine((e, t) => {
110
- var F, U, P, x, _, E, ae;
111
- const i = u.value == -1 ? ((P = (U = (F = R.referralProgram) == null ? void 0 : F.reward[d.value]) == null ? void 0 : U.rewards) == null ? void 0 : P.length) || 0 : u.value, v = (_ = (x = R.referralProgram) == null ? void 0 : x.reward[d.value]) == null ? void 0 : _.rewards[i - 1], b = (ae = (E = R.referralProgram) == null ? void 0 : E.reward[d.value]) == null ? void 0 : ae.rewards[i + 1];
109
+ var k, U, P, x, _, E, ae;
110
+ const i = u.value == -1 ? ((P = (U = (k = R.referralProgram) == null ? void 0 : k.reward[d.value]) == null ? void 0 : U.rewards) == null ? void 0 : P.length) || 0 : u.value, v = (_ = (x = R.referralProgram) == null ? void 0 : x.reward[d.value]) == null ? void 0 : _.rewards[i - 1], b = (ae = (E = R.referralProgram) == null ? void 0 : E.reward[d.value]) == null ? void 0 : ae.rewards[i + 1];
112
111
  v && e.threshold.from < v.threshold.from + 1 && t.addIssue({
113
112
  code: "custom",
114
113
  message: `The min referral must be at least ${v.threshold.from + 1}`,
@@ -131,14 +130,14 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
131
130
  });
132
131
  }
133
132
  async function D(e, t) {
134
- var i, v, b, F, U, P;
133
+ var i, v, b, k, U, P;
135
134
  if (m.value = e, e && typeof (t == null ? void 0 : t.countIndex) == "number" && t.countIndex >= 0)
136
135
  d.value = t.groupIndex, u.value = t.countIndex, l.value = H(
137
136
  (i = R.referralProgram) == null ? void 0 : i.reward[t.groupIndex].rewards[t.countIndex]
138
137
  );
139
138
  else {
140
139
  d.value = t.groupIndex, u.value = -1;
141
- const x = u.value == -1 ? ((F = (b = (v = R.referralProgram) == null ? void 0 : v.reward[d.value]) == null ? void 0 : b.rewards) == null ? void 0 : F.length) || 0 : u.value, _ = (P = (U = R.referralProgram) == null ? void 0 : U.reward[d.value]) == null ? void 0 : P.rewards[x - 1];
140
+ const x = u.value == -1 ? ((k = (b = (v = R.referralProgram) == null ? void 0 : v.reward[d.value]) == null ? void 0 : b.rewards) == null ? void 0 : k.length) || 0 : u.value, _ = (P = (U = R.referralProgram) == null ? void 0 : U.reward[d.value]) == null ? void 0 : P.rewards[x - 1];
142
141
  l.value = {
143
142
  threshold: {
144
143
  from: _ != null && _.threshold ? _ != null && _.threshold.to ? _.threshold.to + 1 : (_ == null ? void 0 : _.threshold.from) + 1 : 1,
@@ -210,7 +209,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
210
209
  hideSheet: L,
211
210
  data: l
212
211
  }), (e, t) => {
213
- const i = w("FmStepperField"), v = w("FmHelperText"), b = w("FmTable"), F = w("FmButton"), U = w("FmSideSheet");
212
+ const i = w("FmStepperField"), v = w("FmHelperText"), b = w("FmTable"), k = w("FmButton"), U = w("FmSideSheet");
214
213
  return C(), j(U, {
215
214
  "max-width": 1e3,
216
215
  modelValue: r(m),
@@ -219,13 +218,13 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
219
218
  }, {
220
219
  "side-sheet-footer": V(() => [
221
220
  a("div", Ye, [
222
- c(F, {
221
+ c(k, {
223
222
  label: r(p)("connect.editTierSheet.submit"),
224
223
  onClick: M,
225
224
  disabled: r(T).length > 0 || r(W)().isLoading,
226
225
  loading: r(W)().isLoading
227
226
  }, null, 8, ["label", "disabled", "loading"]),
228
- c(F, {
227
+ c(k, {
229
228
  label: r(p)("connect.editTierSheet.cancel"),
230
229
  onClick: t[3] || (t[3] = (P) => L()),
231
230
  variant: "tertiary"
@@ -311,8 +310,8 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
311
310
  }
312
311
  },
313
312
  emits: ["update:model-value"],
314
- setup(k, { emit: n }) {
315
- const I = k, p = n, g = G(() => [
313
+ setup(F, { emit: n }) {
314
+ const I = F, p = n, g = G(() => [
316
315
  le.enum.BILL_COMPLETED,
317
316
  le.enum.FEEDBACK
318
317
  ].map((m) => Se[m]));
@@ -327,8 +326,8 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
327
326
  disabled: I.disabled,
328
327
  class: ce(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
329
328
  "col-span-3": r(g).length == 1,
330
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": k.modelValue == u.value,
331
- "hover:bg-fm-color-opacity-sm": k.modelValue != u.value
329
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": F.modelValue == u.value,
330
+ "hover:bg-fm-color-opacity-sm": F.modelValue != u.value
332
331
  }]),
333
332
  onClick: () => {
334
333
  I.modelValue != u.value && !I.disabled && p("update:model-value", u.value);
@@ -353,7 +352,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
353
352
  }, cr = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-600" }, "Feedback Criteria", -1), dr = { class: "flex items-center gap-8" }, ur = /* @__PURE__ */ q({
354
353
  __name: "EditCriteriaSheet",
355
354
  emits: ["update"],
356
- setup(k, { expose: n, emit: I }) {
355
+ setup(F, { expose: n, emit: I }) {
357
356
  const { t: p } = Z(), g = I, m = $(!1), l = $(-1), d = $({}), u = Q(), R = xe.superRefine((y, f) => {
358
357
  y.name.length >= 50 && f.addIssue({
359
358
  code: "custom",
@@ -371,7 +370,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
371
370
  m.value = y, y && typeof f == "number" && f >= 0 ? (l.value = f, d.value = H(
372
371
  (o = u.referralProgram) == null ? void 0 : o.criteria[f]
373
372
  )) : (l.value = -1, d.value = {
374
- _id: new Fe().toString(),
373
+ _id: new ke().toString(),
375
374
  name: "",
376
375
  type: "AUTO",
377
376
  event: { type: "BILL_COMPLETED" }
@@ -469,7 +468,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
469
468
  ])) : z("", !0),
470
469
  r(d).event.type == r(se).enum.FEEDBACK ? (C(), B("div", ir, [
471
470
  cr,
472
- c(ke, {
471
+ c(Fe, {
473
472
  "model-value": r(d).event.rule,
474
473
  "onUpdate:modelValue": f[4] || (f[4] = (e) => r(d).event.rule = e)
475
474
  }, null, 8, ["model-value"])
@@ -483,7 +482,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
483
482
  }
484
483
  });
485
484
  function he() {
486
- const k = $(!1), n = Ce();
485
+ const F = $(!1), n = Ce();
487
486
  return {
488
487
  confirmUpdateReferralRecord: async () => {
489
488
  await new Promise((p) => {
@@ -493,13 +492,13 @@ function he() {
493
492
  primaryActions: { text: "Update all", close: !0 },
494
493
  secondaryActions: { text: "Update future only", close: !0 }
495
494
  }).onPrimary(async () => {
496
- k.value = !0, p();
495
+ F.value = !0, p();
497
496
  }).onSecondary(async () => {
498
- k.value = !1, p();
497
+ F.value = !1, p();
499
498
  });
500
499
  });
501
500
  },
502
- updateReferralRecord: k
501
+ updateReferralRecord: F
503
502
  };
504
503
  }
505
504
  const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex justify-between items-center" }, pr = /* @__PURE__ */ a("div", null, [
@@ -507,7 +506,7 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
507
506
  /* @__PURE__ */ a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Set participation rules to start your referral program ")
508
507
  ], -1), hr = /* @__PURE__ */ q({
509
508
  __name: "ManageCriteriaSheet",
510
- setup(k, { expose: n }) {
509
+ setup(F, { expose: n }) {
511
510
  const { t: I } = Z(), { minor: p } = ue, { confirmUpdateReferralRecord: g, updateReferralRecord: m } = he(), l = $(!1), d = $({}), u = Q(), R = $(
512
511
  null
513
512
  ), A = G(() => {
@@ -628,7 +627,7 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
628
627
  }), _r = { class: "flex flex-col space-y-16 pr-12" }, vr = { class: "fm-typo-en-title-sm-800" }, gr = { class: "flex items-center gap-8" }, wr = /* @__PURE__ */ q({
629
628
  __name: "EditRefereeRewardSheet",
630
629
  emits: ["update"],
631
- setup(k, { expose: n, emit: I }) {
630
+ setup(F, { expose: n, emit: I }) {
632
631
  const { t: p } = Z(), g = I, m = $(!1), l = $([]), d = Q();
633
632
  function u() {
634
633
  g("update", l.value);
@@ -738,15 +737,15 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
738
737
  }), yr = { class: "fm-typo-en-title-sm-600" }, br = { class: "grid grid-cols-4 xs:grid-cols-1 gap-4 divide-x xs:divide-x-0" }, xr = { class: "flex gap-x-8" }, Cr = { class: "fm-typo-body-lg-600 flex items-center gap-x-4" }, Rr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Sr = { class: "mb-40" }, $r = {
739
738
  key: 0,
740
739
  class: "flex flex-col items-center justify-center gap-y-16 p-24"
741
- }, kr = /* @__PURE__ */ a("div", { class: "flex flex-col gap-16 text-center" }, [
740
+ }, Fr = /* @__PURE__ */ a("div", { class: "flex flex-col gap-16 text-center" }, [
742
741
  /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800" }, "Create progressive reward"),
743
742
  /* @__PURE__ */ a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Add referral count to configure progression reward to the referral program ")
744
- ], -1), Fr = /* @__PURE__ */ a("img", {
743
+ ], -1), kr = /* @__PURE__ */ a("img", {
745
744
  src: ge,
746
745
  class: "aspect-square w-[150px]"
747
- }, null, -1), Pr = { class: "flex flex-col gap-16 text-center" }, Vr = { class: "fm-typo-en-title-sm-800" }, Ir = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, tt = /* @__PURE__ */ q({
746
+ }, null, -1), Pr = { class: "flex flex-col gap-16 text-center" }, Vr = { class: "fm-typo-en-title-sm-800" }, Ir = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, rt = /* @__PURE__ */ q({
748
747
  __name: "Overview",
749
- setup(k) {
748
+ setup(F) {
750
749
  const { t: n } = Z(), { minor: I } = ue, p = Pe(), g = Q(), { confirmUpdateReferralRecord: m, updateReferralRecord: l } = he(), d = G(() => {
751
750
  var e;
752
751
  return ((e = g.referralProgram) == null ? void 0 : e.reward) ?? [];
@@ -808,15 +807,15 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
808
807
  g.referralProgram
809
808
  ), b = v.reward[e.groupIndex];
810
809
  b.rewards[t] = e.referralCount;
811
- const F = b.rewards[t - 1], U = b.rewards[t + 1];
812
- if (F && F.threshold.to != i.threshold.from - 1) {
810
+ const k = b.rewards[t - 1], U = b.rewards[t + 1];
811
+ if (k && k.threshold.to != i.threshold.from - 1) {
813
812
  if (!await K.confirm(
814
813
  n(
815
814
  "connect.referral.referral_count.update.range_discontinuous.previous",
816
815
  {
817
- name: F.threshold.from,
818
- from: F.threshold.from ?? 0,
819
- to: F.threshold.to ?? 1 / 0,
816
+ name: k.threshold.from,
817
+ from: k.threshold.from ?? 0,
818
+ to: k.threshold.to ?? 1 / 0,
820
819
  newTo: i.threshold.from - 1
821
820
  }
822
821
  ),
@@ -824,7 +823,7 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
824
823
  n("connect.referral.referral_count.remove.next_range")
825
824
  ))
826
825
  return;
827
- F.threshold.to = i.threshold.from - 1;
826
+ k.threshold.to = i.threshold.from - 1;
828
827
  }
829
828
  if (U && U.threshold.from - 1 != i.threshold.to) {
830
829
  if (!await K.confirm(
@@ -932,7 +931,7 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
932
931
  return ve(async () => {
933
932
  await g.readReferralProgram();
934
933
  }), (e, t) => {
935
- const i = w("FmCard"), v = w("FmIcon"), b = w("FmTooltip"), F = w("FmButton"), U = w("FmTable"), P = w("FmList");
934
+ const i = w("FmCard"), v = w("FmIcon"), b = w("FmTooltip"), k = w("FmButton"), U = w("FmTable"), P = w("FmList");
936
935
  return C(), B(Y, null, [
937
936
  z("", !0),
938
937
  c(i, {
@@ -970,7 +969,7 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
970
969
  }, 1032, ["content"])) : z("", !0)
971
970
  ]),
972
971
  a("div", Rr, O(x.sublabel), 1),
973
- x.action ? (C(), j(F, {
972
+ x.action ? (C(), j(k, {
974
973
  key: 0,
975
974
  variant: "plain",
976
975
  label: x.action,
@@ -1014,8 +1013,8 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
1014
1013
  }, null, 8, ["row-data", "onRowClick"])
1015
1014
  ]),
1016
1015
  x.rewards.length ? z("", !0) : (C(), B("div", $r, [
1017
- kr,
1018
- c(F, {
1016
+ Fr,
1017
+ c(k, {
1019
1018
  variant: "secondary",
1020
1019
  label: "Add count",
1021
1020
  icon: "add",
@@ -1036,12 +1035,12 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
1036
1035
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
1037
1036
  }, {
1038
1037
  default: V(() => [
1039
- Fr,
1038
+ kr,
1040
1039
  a("div", Pr, [
1041
1040
  a("div", Vr, O(r(n)("connect.referral.referral_tier_title")), 1),
1042
1041
  a("div", Ir, O(r(n)("connect.referral.referral_tier_description")), 1)
1043
1042
  ]),
1044
- c(F, {
1043
+ c(k, {
1045
1044
  variant: "primary",
1046
1045
  label: r(n)("connect.referral.add_referral_tier"),
1047
1046
  icon: "add",
@@ -1074,5 +1073,5 @@ const mr = { class: "flex flex-col space-y-16 mt-24" }, fr = { class: "flex just
1074
1073
  }
1075
1074
  });
1076
1075
  export {
1077
- tt as default
1076
+ rt as default
1078
1077
  };