@feedmepos/mf-connect 0.1.47-prod → 0.1.49-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 (109) hide show
  1. package/dist/{Analytic-AnuRQDA4.js → Analytic-ibBD_21m.js} +113 -113
  2. package/dist/{App-DP_jCyej.js → App-CDjwWK8a.js} +632 -622
  3. package/dist/{Bin-tL4lF6PB.js → Bin-DCaG0YGW.js} +9 -9
  4. package/dist/Broadcast-CbF3d_N7.js +233 -0
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BgPJCH02.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BqYusgBO.js} +18 -18
  6. package/dist/{Card-Bi-ODgCc.js → Card-CDNE85po.js} +239 -239
  7. package/dist/{Collections-JHWotZ1I.js → Collections-DHn__E9U.js} +31 -31
  8. package/dist/Credit-DiTnwnFe.js +228 -0
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJEAsRON.js} +756 -753
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-ECkaQxuI.js → EffectSheet.vue_vue_type_style_index_0_lang-CU9XpMjd.js} +96 -96
  11. package/dist/Experience-CjMVeGsX.js +229 -0
  12. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  13. package/dist/{Game-DUCx2Dl9.js → Game-D3gANFAo.js} +98 -92
  14. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
  15. package/dist/{Index-zynxjOOr.js → Index-DEF_a5Mu.js} +54 -54
  16. package/dist/{Marketing-BBHDVRkR.js → Marketing-BeED4Y7H.js} +24 -24
  17. package/dist/{Member-B09bj6C3.js → Member-CA4hnHJY.js} +63 -63
  18. package/dist/MemberList-CZtriA_Q.js +1606 -0
  19. package/dist/MemberOverview-wL_ailso.js +58 -0
  20. package/dist/{MemberTransactions-DERMSs7o.js → MemberTransactions-BVrvf4AM.js} +1 -1
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CAADF6vv.js → MessageInput.vue_vue_type_script_setup_true_lang-BqTDGnOG.js} +2286 -2220
  22. package/dist/{Mission-DAv0e_ZH.js → Mission-CDSMpqnG.js} +113 -107
  23. package/dist/{Overview-D0rBTEtP.js → Overview-ArineqY4.js} +337 -337
  24. package/dist/Point-51MD49EM.js +232 -0
  25. package/dist/{Promotion-BSPU5hP9.js → Promotion-BVrofYd6.js} +43 -43
  26. package/dist/{Queue-C5IFJ3iE.js → Queue-Q-aEeZ8w.js} +13 -13
  27. package/dist/{Record-CoFSrv7j.js → Record-DaVcschI.js} +10 -10
  28. package/dist/{Reward-COIOBOl-.js → Reward-DTtFuqOZ.js} +173 -173
  29. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B9Tl7hqv.js → RewardGroup.vue_vue_type_script_setup_true_lang-P_gNd6ZP.js} +11 -11
  30. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BzsYC3k2.js → RuleGroup.vue_vue_type_script_setup_true_lang-CVy_kDmy.js} +381 -381
  31. package/dist/{Segment-DF5SrucQ.js → Segment-DIy4RERw.js} +327 -327
  32. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BSSfQu3F.js → SelectItems.vue_vue_type_script_setup_true_lang-D3KIZJLo.js} +14 -14
  33. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DoL_gTKy.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-bSi6_uqi.js} +11 -11
  34. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cijyol1Q.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BsNLkA2v.js} +3 -3
  35. package/dist/Setting-DGDgmP84.js +1936 -0
  36. package/dist/{Store-E2_0EIy8.js → Store-Dh2uVHGY.js} +238 -238
  37. package/dist/StoreRewards-DFF_0g59.js +423 -0
  38. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DuatzcJ8.js → StoreTransactions.vue_vue_type_script_setup_true_lang-PrFhYJXc.js} +186 -186
  39. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D_r8I0h7.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-VcU2Asjy.js} +1 -1
  40. package/dist/{Tier-CEEHsXkC.js → Tier-yKvE4mRW.js} +106 -106
  41. package/dist/{Title-BMAWlGeW.js → Title-DWWSC02W.js} +95 -95
  42. package/dist/{Transaction-CLsceq-O.js → Transaction-ru7M0PKE.js} +2 -2
  43. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CFLekn9O.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BSkv6hMH.js} +6 -6
  44. package/dist/{Voucher-Cd293WYY.js → Voucher-DmuaThKv.js} +37 -37
  45. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Db_aeyc1.js +419 -0
  46. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B8HHh8HU.js → ZodTextField.vue_vue_type_script_setup_true_lang-B5co0F__.js} +1 -1
  47. package/dist/app-DaFoFS2V.js +57962 -0
  48. package/dist/{app-aVXsWATU.js → app-ja_XST5q.js} +31 -31
  49. package/dist/app.js +1 -1
  50. package/dist/{business-DVlHPzaL.js → business-BSP_3iNl.js} +11 -8
  51. package/dist/{campaign-D9KeUWA7.js → campaign-C1hWNRWr.js} +2 -2
  52. package/dist/{campaign-l-u9A514.js → campaign-DMZnXtyb.js} +10 -10
  53. package/dist/{campaign.enum-Cud82tES.js → campaign.enum-Bfsz7Aon.js} +1 -1
  54. package/dist/campaign.fn-B-xvcbEb.js +758 -0
  55. package/dist/{collectible.enum-PrlUDScv.js → collectible.enum-BRkrN4Bi.js} +1 -1
  56. package/dist/{collection.fn-yR-xnV4g.js → collection.fn-D03AXdUn.js} +2 -2
  57. package/dist/{dto-Cua1OHMY.js → dto-DpRkSGg6.js} +4 -4
  58. package/dist/{effect-B5-eXNEr.js → effect-BW1-I1J4.js} +1 -1
  59. package/dist/{email-addresses-BeYh5fr5.js → email-addresses-BLVkwSkP.js} +1 -1
  60. package/dist/{export-BUF4_DUz.js → export-DOfDownW.js} +4 -4
  61. package/dist/{helper-CGwOThAl.js → helper-BzfjLXgi.js} +1 -1
  62. package/dist/{index-DlFVLRKG.js → index-BBi9jDD1.js} +3 -3
  63. package/dist/{index-Cx8-ipee.js → index-BJl_HxaB.js} +6 -6
  64. package/dist/{index-1BGPM6Uy.js → index-Ba5-z1MU.js} +1 -1
  65. package/dist/{index-BmL_b0IR.js → index-Bp8F6U9V.js} +1 -1
  66. package/dist/{index-C-d_4n-1.js → index-C6fpU8-G.js} +1 -1
  67. package/dist/{index-knuJv0ti.js → index-COoQSeE7.js} +4 -4
  68. package/dist/{index-aMDi62-C.js → index-DTnzjEWu.js} +1 -1
  69. package/dist/{index-BLdVWQId.js → index-DWBeauin.js} +3 -3
  70. package/dist/{index-Cl2iYM2F.js → index-Da1qz9oA.js} +1 -1
  71. package/dist/{index-CB8iWT_p.js → index-Dve1-uYX.js} +1 -1
  72. package/dist/{index-ng2IXlL1.js → index-P6ISAxfQ.js} +1 -1
  73. package/dist/{index-hX2mE0gQ.js → index-cpWgtd-c.js} +1 -1
  74. package/dist/{index-D5KIp8ZB.js → index-sFyvCun2.js} +1023 -1023
  75. package/dist/{index-DNTd-FNx.js → index-zyVYgteg.js} +2 -2
  76. package/dist/{index.esm2017-D8stWFci.js → index.esm2017-DT0awUwa.js} +40 -40
  77. package/dist/{loading-c4b7n9Xp.js → loading-CZH88Duq.js} +1 -1
  78. package/dist/{membership-oBIs4sbL.js → membership-GNRX1fEK.js} +3 -3
  79. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  80. package/dist/{money-AP24H0gk.js → money-Xe5mDYRC.js} +1 -1
  81. package/dist/{number-CwsAYC_2.js → number-CAjqc2Pu.js} +1 -1
  82. package/dist/objectid-BQJRv_jX.js +145 -0
  83. package/dist/{plugins-Dn7JDHi7.js → plugins-Z2YcDTj8.js} +2 -2
  84. package/dist/{reward-4wdoZeXw.js → reward-G656rbLJ.js} +1 -1
  85. package/dist/{rule-_OJza6tn.js → rule-BJ5blBZp.js} +4 -4
  86. package/dist/{rule-builder-DmlhHAED.js → rule-builder-CursBigG.js} +1 -1
  87. package/dist/{template-BSQLFHf4.js → template-BnyUm8is.js} +63 -63
  88. package/dist/timezone-B64-HrWi.js +1150 -0
  89. package/dist/{trigger-DC9tDnI2.js → trigger-C_ih51ky.js} +4 -4
  90. package/dist/usePagination-Ds-cuHop.js +223 -0
  91. package/dist/{user-CCVOptFD.js → user-BZc_OAUj.js} +1 -1
  92. package/dist/{vue-i18n--_Wu1nMj.js → vue-i18n-2D47GxQX.js} +401 -401
  93. package/dist/{xlsx-BVMaOi8M.js → xlsx-BEk5qawh.js} +226 -226
  94. package/package.json +5 -4
  95. package/dist/Broadcast-T2a5tN8R.js +0 -227
  96. package/dist/Credit-DQQCXqS0.js +0 -222
  97. package/dist/Experience-DzTV21vX.js +0 -223
  98. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  99. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
  100. package/dist/MemberList-DLSLGQ02.js +0 -1606
  101. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  102. package/dist/Point-BeBYi1BT.js +0 -226
  103. package/dist/Setting-Dt0sG_hk.js +0 -1936
  104. package/dist/StoreRewards-DuSsWnTE.js +0 -423
  105. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Qc5cCqh5.js +0 -419
  106. package/dist/app-jRT7vsk_.js +0 -33357
  107. package/dist/campaign.fn-C-UojhHv.js +0 -758
  108. package/dist/objectid-CVDLTdni.js +0 -145
  109. package/dist/usePagination-JoYaROkV.js +0 -223
@@ -1,11 +1,11 @@
1
- import { defineComponent as P, ref as C, onMounted as Q, computed as H, resolveComponent as y, openBlock as i, createElementBlock as x, renderSlot as W, toDisplayString as w, createCommentVNode as v, createBlock as f, unref as e, isRef as q, createVNode as b, normalizeClass as G, watch as X, withCtx as F, resolveDynamicComponent as O, Fragment as _, createElementVNode as U, createTextVNode as ee } from "vue";
2
- import { z as te } from "./app-aVXsWATU.js";
1
+ import { defineComponent as P, ref as O, onMounted as Q, computed as H, resolveComponent as y, openBlock as s, createElementBlock as x, renderSlot as W, toDisplayString as w, createCommentVNode as v, createBlock as f, unref as e, isRef as q, createVNode as b, normalizeClass as G, watch as X, withCtx as F, resolveDynamicComponent as R, Fragment as _, createElementVNode as U, createTextVNode as ee } from "vue";
2
+ import { z as te } from "./app-ja_XST5q.js";
3
3
  import { Z as u } from "./zod-Bg2FbC-D.js";
4
- import { f as le, g as oe } from "./index-DNTd-FNx.js";
5
- import { u as Z } from "./vue-i18n--_Wu1nMj.js";
6
- import { s as R } from "./effect-B5-eXNEr.js";
7
- import { p as ae } from "./plugins-Dn7JDHi7.js";
8
- import { O as ne } from "./app-jRT7vsk_.js";
4
+ import { f as le, g as oe } from "./index-zyVYgteg.js";
5
+ import { u as Z } from "./vue-i18n-2D47GxQX.js";
6
+ import { s as C } from "./effect-BW1-I1J4.js";
7
+ import { p as ae } from "./plugins-Z2YcDTj8.js";
8
+ import { e as ne } from "./app-DaFoFS2V.js";
9
9
  const ie = { class: "flex flex-col gap-8" }, se = {
10
10
  key: 0,
11
11
  class: "fm-typo-en-body-lg-600"
@@ -39,58 +39,58 @@ const ie = { class: "flex flex-col gap-8" }, se = {
39
39
  }
40
40
  },
41
41
  emits: ["update:model-value"],
42
- setup(t, { emit: h }) {
42
+ setup(t, { emit: g }) {
43
43
  var A, B;
44
- const { t: s } = Z(), l = t, g = h, o = [
45
- { label: s("connect.template.validity_option.date_range"), value: "range" },
46
- { label: s("connect.template.validity_option.custom"), value: "custom" }
47
- ], d = C(!1);
44
+ const { t: d } = Z(), l = t, S = g, o = [
45
+ { label: d("connect.template.validity_option.date_range"), value: "range" },
46
+ { label: d("connect.template.validity_option.custom"), value: "custom" }
47
+ ], a = O(!1);
48
48
  Q(() => {
49
- d.value = l.modelValue && Object.entries(l.modelValue).filter(
49
+ a.value = l.modelValue && Object.entries(l.modelValue).filter(
50
50
  ([p, r]) => p != "followFirstReceive" && r != null
51
51
  ).length > 0;
52
52
  });
53
- const a = C(
53
+ const n = O(
54
54
  l.type ? o.find((p) => p.value === l.type) : (A = l.modelValue) != null && A.validBefore || (B = l.modelValue) != null && B.validAfter ? o[0] : o[1]
55
- ), S = H(
55
+ ), h = H(
56
56
  () => l.forCredit ? le : oe
57
57
  ), m = H(() => {
58
- const p = S.value.safeParse(l.modelValue);
58
+ const p = h.value.safeParse(l.modelValue);
59
59
  return p.success ? [] : p.error.errors;
60
60
  });
61
- function n(p) {
62
- g("update:model-value", p);
61
+ function i(p) {
62
+ S("update:model-value", p);
63
63
  }
64
64
  function k(p) {
65
65
  var r, D;
66
66
  if (p.value == "range")
67
- return n({
67
+ return i({
68
68
  followFirstReceive: (r = l.modelValue) == null ? void 0 : r.followFirstReceive,
69
69
  validAfter: void 0,
70
70
  validBefore: void 0
71
71
  });
72
72
  if (p.value == "custom")
73
- return d.value = !1, n({
73
+ return a.value = !1, i({
74
74
  validForDay: (D = l.modelValue) == null ? void 0 : D.validForDay
75
75
  });
76
76
  }
77
77
  return (p, r) => {
78
78
  var I, $, j, E, M, N, L, z;
79
79
  const D = y("FmButtonGroup"), Y = y("FmSimpleDateRangePicker"), J = y("FmSwitch"), K = y("FmStepperField"), T = y("FmHelperText");
80
- return i(), x("div", ie, [
80
+ return s(), x("div", ie, [
81
81
  W(p.$slots, "label", {}, () => [
82
- t.label ? (i(), x("div", se, w(t.label), 1)) : v("", !0)
82
+ t.label ? (s(), x("div", se, w(t.label), 1)) : v("", !0)
83
83
  ]),
84
- t.type ? v("", !0) : (i(), f(D, {
84
+ t.type ? v("", !0) : (s(), f(D, {
85
85
  key: 0,
86
- modelValue: e(a),
86
+ modelValue: e(n),
87
87
  "onUpdate:modelValue": [
88
- r[0] || (r[0] = (c) => q(a) ? a.value = c : null),
88
+ r[0] || (r[0] = (c) => q(n) ? n.value = c : null),
89
89
  r[1] || (r[1] = (c) => k(c))
90
90
  ],
91
91
  items: o
92
92
  }, null, 8, ["modelValue"])),
93
- e(a).value === "range" ? (i(), x("div", de, [
93
+ e(n).value === "range" ? (s(), x("div", de, [
94
94
  b(Y, {
95
95
  "model-value": {
96
96
  startDate: (I = t.modelValue) != null && I.validAfter ? new Date(($ = t.modelValue) == null ? void 0 : $.validAfter).toISOString() : null,
@@ -98,59 +98,59 @@ const ie = { class: "flex flex-col gap-8" }, se = {
98
98
  },
99
99
  "onUpdate:modelValue": r[2] || (r[2] = (c) => {
100
100
  var V;
101
- n({
101
+ i({
102
102
  followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive,
103
103
  validAfter: new Date(c.startDate).toISOString(),
104
104
  validBefore: new Date(c.endDate).toISOString()
105
105
  });
106
106
  })
107
107
  }, null, 8, ["model-value"])
108
- ])) : e(a).value === "custom" ? (i(), x("div", me, [
108
+ ])) : e(n).value === "custom" ? (s(), x("div", me, [
109
109
  b(J, {
110
- "model-value": e(d),
111
- label: e(s)("connect.template.validity_option.expire"),
110
+ "model-value": e(a),
111
+ label: e(d)("connect.template.validity_option.expire"),
112
112
  "label-placement": "right",
113
113
  "onUpdate:modelValue": r[3] || (r[3] = (c) => {
114
114
  var V;
115
- d.value = c, n({
115
+ a.value = c, i({
116
116
  validForDay: c ? 1 : void 0,
117
117
  followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive
118
118
  });
119
119
  })
120
120
  }, null, 8, ["model-value", "label"]),
121
- e(d) ? (i(), f(K, {
121
+ e(a) ? (s(), f(K, {
122
122
  key: 0,
123
- label: e(s)("connect.template.validity_option.after_day"),
123
+ label: e(d)("connect.template.validity_option.after_day"),
124
124
  class: G([{
125
- "opacity-50 pointer-events-none": !e(d)
125
+ "opacity-50 pointer-events-none": !e(a)
126
126
  }, "mt-[-4px]"]),
127
127
  "max-fraction-digits": 0,
128
- disabled: !e(d),
128
+ disabled: !e(a),
129
129
  "show-steppers": !1,
130
130
  max: 99999,
131
- "append-text": e(s)("connect.template.validity_option.days"),
131
+ "append-text": e(d)("connect.template.validity_option.days"),
132
132
  "model-value": ((M = l.modelValue) == null ? void 0 : M.validForDay) ?? null,
133
133
  "onUpdate:modelValue": r[4] || (r[4] = (c) => {
134
134
  var V;
135
- return n({
135
+ return i({
136
136
  validForDay: c == null ? void 0 : parseInt(c.toString()),
137
137
  followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive
138
138
  });
139
139
  })
140
140
  }, null, 8, ["label", "class", "disabled", "append-text", "model-value"])) : v("", !0)
141
141
  ])) : v("", !0),
142
- ((N = l.modelValue) == null ? void 0 : N.followFirstReceive) === !0 && e(d) ? (i(), f(T, {
142
+ ((N = l.modelValue) == null ? void 0 : N.followFirstReceive) === !0 && e(a) ? (s(), f(T, {
143
143
  key: 3,
144
- text: e(s)("connect.template.validity_option.expire_follow_first_receive")
144
+ text: e(d)("connect.template.validity_option.expire_follow_first_receive")
145
145
  }, null, 8, ["text"])) : v("", !0),
146
146
  b(T, {
147
- text: t.helperText || (((L = l.modelValue) == null ? void 0 : L.validForDay) === 0 ? e(s)("connect.template.validity_option.expires_on_same_day") : e(u).helperText(e(m), "")),
147
+ text: t.helperText || (((L = l.modelValue) == null ? void 0 : L.validForDay) === 0 ? e(d)("connect.template.validity_option.expires_on_same_day") : e(u).helperText(e(m), "")),
148
148
  state: t.helperText ? "error" : ((z = l.modelValue) == null ? void 0 : z.validForDay) === 0 ? "warning" : e(u).helperState(e(m), "")
149
149
  }, null, 8, ["text", "state"])
150
150
  ]);
151
151
  };
152
152
  }
153
- }), ue = { class: "space-y-8" }, Ae = /* @__PURE__ */ P({
153
+ }), ue = { class: "space-y-8" }, he = /* @__PURE__ */ P({
154
154
  __name: "CollectibleOptionInput",
155
155
  props: {
156
156
  modelValue: {
@@ -169,89 +169,89 @@ const ie = { class: "flex flex-col gap-8" }, se = {
169
169
  }
170
170
  },
171
171
  emits: ["update:model-value"],
172
- setup(t, { emit: h }) {
173
- const { t: s } = Z(), l = t, g = h, o = C(l.modelValue ?? {});
174
- return X(o, () => g("update:model-value", o.value)), (d, a) => {
175
- const S = y("FmSwitch"), m = y("FmStepperField");
176
- return i(), x("div", ue, [
177
- t.isMission ? v("", !0) : (i(), f(S, {
172
+ setup(t, { emit: g }) {
173
+ const { t: d } = Z(), l = t, S = g, o = O(l.modelValue ?? {});
174
+ return X(o, () => S("update:model-value", o.value)), (a, n) => {
175
+ const h = y("FmSwitch"), m = y("FmStepperField");
176
+ return s(), x("div", ue, [
177
+ t.isMission ? v("", !0) : (s(), f(h, {
178
178
  key: 0,
179
- label: e(s)("connect.template.enable_transfer"),
179
+ label: e(d)("connect.template.enable_transfer"),
180
180
  "label-placement": "right",
181
181
  modelValue: e(o).enableTransfer,
182
- "onUpdate:modelValue": a[0] || (a[0] = (n) => e(o).enableTransfer = n)
182
+ "onUpdate:modelValue": n[0] || (n[0] = (i) => e(o).enableTransfer = i)
183
183
  }, null, 8, ["label", "modelValue"])),
184
- t.noCampaign ? v("", !0) : (i(), x("div", {
184
+ t.noCampaign ? v("", !0) : (s(), x("div", {
185
185
  key: 1,
186
186
  class: G(["grid gap-16", t.isMission ? "" : "grid-cols-2"])
187
187
  }, [
188
188
  b(m, {
189
189
  modelValue: e(o).maxPerUser,
190
- "onUpdate:modelValue": a[1] || (a[1] = (n) => e(o).maxPerUser = n),
190
+ "onUpdate:modelValue": n[1] || (n[1] = (i) => e(o).maxPerUser = i),
191
191
  "show-steppers": !1,
192
192
  rules: [e(u).ruleAtPath(t.schema, "maxPerUser")],
193
- "helper-text": e(s)("connect.template.leave_empty_unlimited")
193
+ "helper-text": e(d)("connect.template.leave_empty_unlimited")
194
194
  }, {
195
195
  label: F(() => [
196
- (i(), f(O(
196
+ (s(), f(R(
197
197
  e(u).toInputLabel(
198
198
  e(u).typeAtPath(t.schema, "maxPerUser"),
199
- e(s)("connect.template.max_per_user")
199
+ e(d)("connect.template.max_per_user")
200
200
  )
201
201
  )))
202
202
  ]),
203
203
  _: 1
204
204
  }, 8, ["modelValue", "rules", "helper-text"]),
205
- t.isMission ? v("", !0) : (i(), f(m, {
205
+ t.isMission ? v("", !0) : (s(), f(m, {
206
206
  key: 0,
207
207
  modelValue: e(o).maxReceive,
208
- "onUpdate:modelValue": a[2] || (a[2] = (n) => e(o).maxReceive = n),
208
+ "onUpdate:modelValue": n[2] || (n[2] = (i) => e(o).maxReceive = i),
209
209
  "show-steppers": !1,
210
210
  rules: [e(u).ruleAtPath(t.schema, "maxReceive")],
211
- "helper-text": e(s)("connect.template.leave_empty_unlimited")
211
+ "helper-text": e(d)("connect.template.leave_empty_unlimited")
212
212
  }, {
213
213
  label: F(() => [
214
- (i(), f(O(
214
+ (s(), f(R(
215
215
  e(u).toInputLabel(
216
216
  e(u).typeAtPath(t.schema, "maxReceive"),
217
- e(s)("connect.template.max_distribute")
217
+ e(d)("connect.template.max_distribute")
218
218
  )
219
219
  )))
220
220
  ]),
221
221
  _: 1
222
222
  }, 8, ["modelValue", "rules", "helper-text"]))
223
223
  ], 2)),
224
- t.isMission ? v("", !0) : (i(), x(_, { key: 2 }, [
224
+ t.isMission ? v("", !0) : (s(), x(_, { key: 2 }, [
225
225
  b(m, {
226
226
  modelValue: e(o).maxUse,
227
- "onUpdate:modelValue": a[3] || (a[3] = (n) => e(o).maxUse = n),
227
+ "onUpdate:modelValue": n[3] || (n[3] = (i) => e(o).maxUse = i),
228
228
  "append-text": "use(s)",
229
229
  "show-steppers": !1,
230
230
  rules: [e(u).ruleAtPath(t.schema, "maxUse")]
231
231
  }, {
232
232
  label: F(() => [
233
- (i(), f(O(
233
+ (s(), f(R(
234
234
  e(u).toInputLabel(
235
235
  e(u).typeAtPath(t.schema, "maxUse"),
236
- e(s)("connect.template.usage_count")
236
+ e(d)("connect.template.usage_count")
237
237
  )
238
238
  )))
239
239
  ]),
240
240
  _: 1
241
241
  }, 8, ["modelValue", "rules"]),
242
- e(o).maxUse && e(o).maxUse > 1 ? (i(), f(m, {
242
+ e(o).maxUse && e(o).maxUse > 1 ? (s(), f(m, {
243
243
  key: 0,
244
244
  modelValue: e(o).cooldown,
245
- "onUpdate:modelValue": a[4] || (a[4] = (n) => e(o).cooldown = n),
245
+ "onUpdate:modelValue": n[4] || (n[4] = (i) => e(o).cooldown = i),
246
246
  "append-text": "minute(s)",
247
247
  "show-steppers": !1,
248
248
  rules: [e(u).ruleAtPath(t.schema, "cooldown")]
249
249
  }, {
250
250
  label: F(() => [
251
- (i(), f(O(
251
+ (s(), f(R(
252
252
  e(u).toInputLabel(
253
253
  e(u).typeAtPath(t.schema, "cooldown"),
254
- e(s)("connect.template.cooldown")
254
+ e(d)("connect.template.cooldown")
255
255
  )
256
256
  )))
257
257
  ]),
@@ -259,17 +259,17 @@ const ie = { class: "flex flex-col gap-8" }, se = {
259
259
  }, 8, ["modelValue", "rules"])) : v("", !0),
260
260
  b(re, {
261
261
  modelValue: e(o).validityOption,
262
- "onUpdate:modelValue": a[5] || (a[5] = (n) => e(o).validityOption = n),
263
- label: e(s)("connect.template.validity_option.title")
262
+ "onUpdate:modelValue": n[5] || (n[5] = (i) => e(o).validityOption = i),
263
+ label: e(d)("connect.template.validity_option.title")
264
264
  }, null, 8, ["modelValue", "label"])
265
265
  ], 64))
266
266
  ]);
267
267
  };
268
268
  }
269
- }), pe = { class: "space-y-8" }, ce = /* @__PURE__ */ U("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Configure the discount you want to offer your customer. ", -1), fe = {
269
+ }), pe = { class: "space-y-8" }, ce = {
270
270
  key: 1,
271
271
  class: "border-1 rounded-md flex gap-16 items-center justify-between px-16 py-12"
272
- }, ve = { class: "fm-typo-en-body-lg-400" }, ye = { class: "text-fm-color-typo-secondary" }, Ue = /* @__PURE__ */ P({
272
+ }, fe = { class: "fm-typo-en-body-lg-400" }, ve = { class: "text-fm-color-typo-secondary" }, Ae = /* @__PURE__ */ P({
273
273
  __name: "EffectSheet",
274
274
  props: {
275
275
  modelValue: { type: Object },
@@ -278,39 +278,39 @@ const ie = { class: "flex flex-col gap-8" }, se = {
278
278
  }
279
279
  },
280
280
  emits: ["update:model-value"],
281
- setup(t, { emit: h }) {
282
- const s = h, l = C(!1);
283
- async function g(o) {
284
- o.stopPropagation(), await ae.remove("Are you sure you want to remove this effect?") && s("update:model-value", null);
281
+ setup(t, { emit: g }) {
282
+ const d = g, l = O(!1);
283
+ async function S(o) {
284
+ o.stopPropagation(), await ae.remove("Are you sure you want to remove this effect?") && d("update:model-value", null);
285
285
  }
286
- return (o, d) => {
287
- const a = y("FmButton"), S = y("FmSideSheet");
288
- return i(), f(S, {
286
+ return (o, a) => {
287
+ const n = y("FmButton"), h = y("FmSideSheet");
288
+ return s(), f(h, {
289
289
  "max-width": 550,
290
290
  header: "Apply discount",
291
291
  modelValue: e(l),
292
292
  "onUpdate:modelValue": [
293
- d[2] || (d[2] = (m) => q(l) ? l.value = m : null),
294
- d[3] || (d[3] = (m) => l.value = m)
293
+ a[2] || (a[2] = (m) => q(l) ? l.value = m : null),
294
+ a[3] || (a[3] = (m) => l.value = m)
295
295
  ]
296
296
  }, {
297
297
  "side-sheet-button": F(() => {
298
- var m, n, k, A;
298
+ var m, i, k, A;
299
299
  return [
300
300
  U("div", pe, [
301
- ce,
302
- t.modelValue ? (i(), x("div", fe, [
303
- U("div", ve, [
304
- U("div", null, w((m = e(R)(t.modelValue)) == null ? void 0 : m.type), 1),
305
- U("div", ye, w((n = e(R)(t.modelValue)) == null ? void 0 : n.adjustment) + " with " + w((k = e(R)(t.modelValue)) == null ? void 0 : k.requirements) + " " + w((A = e(R)(t.modelValue)) == null ? void 0 : A.maxCap), 1)
301
+ a[4] || (a[4] = U("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Configure the discount you want to offer your customer. ", -1)),
302
+ t.modelValue ? (s(), x("div", ce, [
303
+ U("div", fe, [
304
+ U("div", null, w((m = e(C)(t.modelValue)) == null ? void 0 : m.type), 1),
305
+ U("div", ve, w((i = e(C)(t.modelValue)) == null ? void 0 : i.adjustment) + " with " + w((k = e(C)(t.modelValue)) == null ? void 0 : k.requirements) + " " + w((A = e(C)(t.modelValue)) == null ? void 0 : A.maxCap), 1)
306
306
  ]),
307
- b(a, {
307
+ b(n, {
308
308
  icon: "delete",
309
309
  "icon-color": "neutral-gray-400",
310
310
  variant: "tertiary",
311
- onClick: g
311
+ onClick: S
312
312
  })
313
- ])) : (i(), f(a, {
313
+ ])) : (s(), f(n, {
314
314
  key: 0,
315
315
  label: "Apply discount",
316
316
  icon: "add",
@@ -321,9 +321,9 @@ const ie = { class: "flex flex-col gap-8" }, se = {
321
321
  ])
322
322
  ];
323
323
  }),
324
- "side-sheet-footer": F(() => [
325
- ee(w(void 0))
326
- ]),
324
+ "side-sheet-footer": F(() => [...a[5] || (a[5] = [
325
+ ee(w(void 0), -1)
326
+ ])]),
327
327
  default: F(() => [
328
328
  b(e(ne), {
329
329
  class: "fm-effect-sheet",
@@ -331,8 +331,8 @@ const ie = { class: "flex flex-col gap-8" }, se = {
331
331
  "can-set-auto-apply": t.canSetAutoApply,
332
332
  "disable-effects": t.canSetAutoApply ? ["PAYMENT"] : void 0,
333
333
  "initial-value": t.modelValue,
334
- onOnConfirm: d[0] || (d[0] = (m) => (s("update:model-value", m), l.value = !1)),
335
- onOnCancel: d[1] || (d[1] = (m) => l.value = !1)
334
+ onOnConfirm: a[0] || (a[0] = (m) => (d("update:model-value", m), l.value = !1)),
335
+ onOnCancel: a[1] || (a[1] = (m) => l.value = !1)
336
336
  }, null, 8, ["can-set-auto-apply", "disable-effects", "initial-value"])
337
337
  ]),
338
338
  _: 1
@@ -341,7 +341,7 @@ const ie = { class: "flex flex-col gap-8" }, se = {
341
341
  }
342
342
  });
343
343
  export {
344
- Ue as _,
345
- Ae as a,
344
+ Ae as _,
345
+ he as a,
346
346
  re as b
347
347
  };
@@ -0,0 +1,229 @@
1
+ import { defineComponent as E, ref as S, computed as U, onMounted as j, resolveComponent as m, openBlock as p, createElementBlock as _, Fragment as x, createVNode as i, unref as o, createElementVNode as a, withCtx as h, renderList as M, createBlock as w, resolveDynamicComponent as H, toDisplayString as u, h as q } from "vue";
2
+ import { _ as z } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as G, components as J } from "@feedmepos/ui-library";
4
+ import { p as Q } from "./plugins-Z2YcDTj8.js";
5
+ import { u as W } from "./loading-CZH88Duq.js";
6
+ import { u as X } from "./business-BSP_3iNl.js";
7
+ import { u as Y } from "./campaign-C1hWNRWr.js";
8
+ import { a as L, b as V, g as Z } from "./campaign-DMZnXtyb.js";
9
+ import { u as ee } from "./vue-i18n-2D47GxQX.js";
10
+ import { _ as te } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
11
+ import { _ as oe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJEAsRON.js";
12
+ import { u as ne } from "./template-BnyUm8is.js";
13
+ import { c as g } from "./index-Ba5-z1MU.js";
14
+ const ae = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, ie = { class: "space-y-8" }, ce = { class: "flex w-full gap-4 items-center" }, le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, me = { class: "space-y-4" }, de = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ie = /* @__PURE__ */ E({
15
+ __name: "Experience",
16
+ setup(_e) {
17
+ const { t: r } = ee(), P = {
18
+ label: r("connect.program.common.actions.create", {
19
+ type: r("connect.program.experience.title").toLowerCase()
20
+ }),
21
+ value: "create",
22
+ isPrimary: !0,
23
+ prependIcon: "add"
24
+ }, B = ne("POINT", G()), I = X(), d = Y(), { global: T, minor: v } = W, s = S({
25
+ searchKey: "",
26
+ location: []
27
+ });
28
+ function $(e) {
29
+ const t = s.value.location;
30
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
31
+ var c;
32
+ return (c = e == null ? void 0 : e.targetLocation) == null ? void 0 : c.includes(l);
33
+ }) : e.targetLocation.includes(t);
34
+ }
35
+ const f = U(
36
+ () => d.campaigns.experience.filter((e) => $(e))
37
+ ), K = [
38
+ {
39
+ header: "Program title",
40
+ accessorFn: (e) => e.name
41
+ },
42
+ {
43
+ header: "Status",
44
+ accessorFn: (e) => Z(e),
45
+ cell(e) {
46
+ return L(e.row.original);
47
+ }
48
+ },
49
+ {
50
+ header: "Summary",
51
+ accessorFn: (e) => V(e)
52
+ //v.effect,
53
+ },
54
+ {
55
+ header: "Actions",
56
+ cell(e) {
57
+ return q(J.FmButton, {
58
+ variant: "tertiary",
59
+ icon: "delete",
60
+ iconColor: "neutral-gray-400",
61
+ onClick: (t) => {
62
+ t.stopPropagation(), C(e.row.original);
63
+ }
64
+ });
65
+ }
66
+ }
67
+ ], b = S();
68
+ async function C(e) {
69
+ await Q.remove(`Are you sure you want to remove ${e.name}?`) && await v(
70
+ async () => {
71
+ await g.delete(e._id), await d.read("POINT");
72
+ },
73
+ {
74
+ message: `Removing ${e.name}`,
75
+ successMessage: `Removed ${e.name} successfully`
76
+ }
77
+ );
78
+ }
79
+ async function y(e) {
80
+ e ? await t() : B.open(async (l) => {
81
+ await t(l);
82
+ });
83
+ async function t(l) {
84
+ var c;
85
+ (c = b.value) == null || c.showSheet(
86
+ !0,
87
+ "POINT",
88
+ e ? await g.readById(e._id) : void 0,
89
+ l
90
+ );
91
+ }
92
+ }
93
+ async function N(e) {
94
+ await v(
95
+ async () => {
96
+ e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await d.read("POINT");
97
+ },
98
+ {
99
+ message: r("connect.program.common.update.updating", {
100
+ type: r("connect.program.experience.title")
101
+ }),
102
+ successMessage: r("connect.program.common.update.success", {
103
+ type: r("connect.program.experience.title"),
104
+ action: e.campaign._id ? "updated" : "created"
105
+ })
106
+ }
107
+ );
108
+ }
109
+ return j(async () => {
110
+ await T(async () => {
111
+ await d.read("POINT");
112
+ });
113
+ }), (e, t) => {
114
+ const l = m("FmPageHead"), c = m("FmSearch"), R = m("FmTable"), F = m("FmButton"), A = m("FmListItem"), O = m("FmList"), D = m("FmCard");
115
+ return p(), _(x, null, [
116
+ i(l, {
117
+ title: o(r)("connect.program.experience.title"),
118
+ actions: o(f).length > 0 ? [P] : [],
119
+ "onClick:action": t[0] || (t[0] = () => y())
120
+ }, null, 8, ["title", "actions"]),
121
+ a("div", ae, [
122
+ i(c, {
123
+ modelValue: o(s).searchKey,
124
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => o(s).searchKey = n),
125
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
126
+ placeholder: o(r)("connect.program.common.search"),
127
+ collapsible: ""
128
+ }, null, 8, ["modelValue", "placeholder"]),
129
+ o(d).campaigns.experience && o(d).campaigns.experience.length > 0 ? (p(), _(x, { key: 0 }, [
130
+ a("div", re, [
131
+ a("div", se, [
132
+ i(te, {
133
+ label: `${o(r)("connect.common.location")}: `,
134
+ "right-icon": "keyboard_arrow_down",
135
+ modelValue: o(s).location,
136
+ "onUpdate:modelValue": t[2] || (t[2] = (n) => o(s).location = n),
137
+ icon: "storefront",
138
+ "show-item-label": !0,
139
+ items: o(I).locationOptions
140
+ }, null, 8, ["label", "modelValue", "items"])
141
+ ]),
142
+ i(c, {
143
+ modelValue: o(s).searchKey,
144
+ "onUpdate:modelValue": t[3] || (t[3] = (n) => o(s).searchKey = n),
145
+ class: "xs:hidden",
146
+ placeholder: "search",
147
+ collapsible: ""
148
+ }, null, 8, ["modelValue"])
149
+ ]),
150
+ i(R, {
151
+ class: "xs:hidden",
152
+ "row-data": o(f),
153
+ "column-defs": K,
154
+ "search-value": o(s).searchKey,
155
+ "column-filter": [],
156
+ onRowClick: t[4] || (t[4] = (n) => y(n.original)),
157
+ "hide-footer": o(f).length < 10
158
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
159
+ i(O, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
160
+ default: h(() => [
161
+ (p(!0), _(x, null, M(o(f).filter(
162
+ (n) => n.name.toLowerCase().includes(o(s).searchKey.toLowerCase())
163
+ ), (n) => (p(), w(A, {
164
+ key: n._id.toString(),
165
+ onClick: (k) => y(n),
166
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
167
+ }, {
168
+ default: h(() => [
169
+ a("div", ie, [
170
+ a("div", ce, [
171
+ (p(), w(H(o(L)(n)))),
172
+ a("div", le, u(n.currentReceive ?? 0) + " used ", 1)
173
+ ]),
174
+ a("div", me, [
175
+ a("div", de, u(n.name), 1),
176
+ a("div", pe, u(o(V)(n)), 1)
177
+ ]),
178
+ a("div", ue, u(o(r)("connect.program.experience.received", {
179
+ count: n.currentReceive ?? 0
180
+ })), 1)
181
+ ]),
182
+ i(F, {
183
+ icon: "delete",
184
+ "icon-color": "neutral-gray-400",
185
+ variant: "tertiary",
186
+ onClick: (k) => (k.stopPropagation(), C(n))
187
+ }, null, 8, ["onClick"])
188
+ ]),
189
+ _: 2
190
+ }, 1032, ["onClick"]))), 128))
191
+ ]),
192
+ _: 1
193
+ })
194
+ ], 64)) : (p(), w(D, {
195
+ key: 1,
196
+ variant: "outlined",
197
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
198
+ }, {
199
+ default: h(() => [
200
+ t[6] || (t[6] = a("img", {
201
+ src: z,
202
+ class: "aspect-square w-[150px]"
203
+ }, null, -1)),
204
+ a("div", fe, [
205
+ a("div", ye, u(o(r)("connect.program.experience.empty_state.title")), 1),
206
+ a("div", ge, u(o(r)("connect.program.experience.empty_state.description")), 1)
207
+ ]),
208
+ i(F, {
209
+ variant: "primary",
210
+ label: "Create experience program",
211
+ icon: "add",
212
+ onClick: t[5] || (t[5] = (n) => y())
213
+ })
214
+ ]),
215
+ _: 1
216
+ })),
217
+ i(oe, {
218
+ ref_key: "sheetRef",
219
+ ref: b,
220
+ "onSubmit:modelValue": N
221
+ }, null, 512)
222
+ ])
223
+ ], 64);
224
+ };
225
+ }
226
+ });
227
+ export {
228
+ Ie as default
229
+ };