@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,6 +1,6 @@
1
1
  import { defineComponent as d, ref as f, resolveComponent as s, openBlock as t, createElementBlock as v, Fragment as b, createVNode as r, unref as o, createElementVNode as k, createBlock as l, KeepAlive as x, resolveDynamicComponent as m, createCommentVNode as F } from "vue";
2
- import { _ as g, a as y } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-DuatzcJ8.js";
3
- import { u as C } from "./vue-i18n--_Wu1nMj.js";
2
+ import { _ as g, a as y } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-PrFhYJXc.js";
3
+ import { u as C } from "./vue-i18n-2D47GxQX.js";
4
4
  const T = { class: "px-24 flex flex-col gap-y-32 pb-24" }, P = /* @__PURE__ */ d({
5
5
  __name: "Transaction",
6
6
  setup(V) {
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as y, computed as b, openBlock as i, createBlock as R, unref as l, ref as E, watch as k, resolveComponent as h, createElementBlock as g, createElementVNode as B, Fragment as O, renderList as T, createVNode as V, isRef as U, createCommentVNode as v } from "vue";
2
- import "./index-DNTd-FNx.js";
3
- import { i as C, R as e } from "./rule-builder-DmlhHAED.js";
4
- import { _ as I } from "./RuleGroup.vue_vue_type_script_setup_true_lang-BzsYC3k2.js";
5
- import { p as N } from "./plugins-Dn7JDHi7.js";
6
- import { u as S } from "./membership-oBIs4sbL.js";
2
+ import "./index-zyVYgteg.js";
3
+ import { i as C, R as e } from "./rule-builder-CursBigG.js";
4
+ import { _ as I } from "./RuleGroup.vue_vue_type_script_setup_true_lang-CVy_kDmy.js";
5
+ import { p as N } from "./plugins-Z2YcDTj8.js";
6
+ import { u as S } from "./membership-GNRX1fEK.js";
7
7
  import { _ as j } from "./CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js";
8
- import { u as x } from "./vue-i18n--_Wu1nMj.js";
8
+ import { u as x } from "./vue-i18n-2D47GxQX.js";
9
9
  const A = /* @__PURE__ */ y({
10
10
  __name: "SegmentConfigurator",
11
11
  props: {
@@ -1,30 +1,27 @@
1
- import { defineComponent as Y, ref as x, computed as ee, h as m, onMounted as oe, resolveComponent as d, openBlock as u, createElementBlock as V, Fragment as S, createVNode as l, unref as t, createElementVNode as c, withCtx as F, renderList as te, createBlock as y, resolveDynamicComponent as ne, toDisplayString as g, createCommentVNode as E } from "vue";
1
+ import { defineComponent as Y, ref as x, computed as ee, h as m, onMounted as oe, resolveComponent as d, openBlock as u, createElementBlock as V, Fragment as S, createVNode as l, unref as t, createElementVNode as c, withCtx as F, renderList as te, createBlock as h, resolveDynamicComponent as ne, toDisplayString as g, createCommentVNode as E } from "vue";
2
2
  import { _ as ae } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as re, components as f } from "@feedmepos/ui-library";
4
- import { _ as M } from "./FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js";
5
- import { p as A, a as ce } from "./plugins-Dn7JDHi7.js";
4
+ import { _ as M } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
5
+ import { p as A, a as ce } from "./plugins-Z2YcDTj8.js";
6
6
  import { useCoreStore as ie } from "@feedmepos/mf-common";
7
- import { u as se } from "./loading-c4b7n9Xp.js";
8
- import { u as le } from "./business-DVlHPzaL.js";
9
- import { u as me } from "./campaign-D9KeUWA7.js";
10
- import { g as ue, a as O, b as B } from "./campaign-l-u9A514.js";
11
- import "./index-Cl2iYM2F.js";
12
- import { u as de } from "./template-BSQLFHf4.js";
13
- import { _ as pe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-hxuYl-OQ.js";
14
- import { _ as fe } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cijyol1Q.js";
15
- import { u as he } from "./vue-i18n--_Wu1nMj.js";
16
- import { T as ye } from "./trigger-DC9tDnI2.js";
7
+ import { u as se } from "./loading-CZH88Duq.js";
8
+ import { u as le } from "./business-BSP_3iNl.js";
9
+ import { u as me } from "./campaign-C1hWNRWr.js";
10
+ import { g as ue, a as O, b as B } from "./campaign-DMZnXtyb.js";
11
+ import "./index-Da1qz9oA.js";
12
+ import { u as de } from "./template-BnyUm8is.js";
13
+ import { _ as pe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJEAsRON.js";
14
+ import { _ as fe } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-BsNLkA2v.js";
15
+ import { u as ye } from "./vue-i18n-2D47GxQX.js";
16
+ import { T as he } from "./trigger-C_ih51ky.js";
17
17
  import { useRouter as ge } from "vue-router";
18
- import { c as w } from "./index-1BGPM6Uy.js";
19
- import { R as H } from "./app-aVXsWATU.js";
18
+ import { c as w } from "./index-Ba5-z1MU.js";
19
+ import { R as H } from "./app-ja_XST5q.js";
20
20
  var _e = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc" };
21
- const ve = { class: "px-24 flex flex-col gap-y-16" }, Ce = { class: "flex items-center justify-between w-full" }, we = { class: "flex gap-8 overflow-x-auto" }, be = { class: "space-y-8" }, ke = { class: "flex w-full gap-4 items-center" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ve = { class: "space-y-4" }, Se = { class: "fm-typo-en-body-lg-600" }, Fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Le = { class: "flex gap-8 items-center" }, Te = /* @__PURE__ */ c("img", {
22
- src: ae,
23
- class: "aspect-square w-[150px]"
24
- }, null, -1), Ue = { class: "flex flex-col gap-16 text-center" }, Pe = { class: "fm-typo-en-title-sm-800" }, Ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ye = /* @__PURE__ */ Y({
21
+ const ve = { class: "px-24 flex flex-col gap-y-16" }, Ce = { class: "flex items-center justify-between w-full" }, we = { class: "flex gap-8 overflow-x-auto" }, be = { class: "space-y-8" }, ke = { class: "flex w-full gap-4 items-center" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ve = { class: "space-y-4" }, Se = { class: "fm-typo-en-body-lg-600" }, Fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Le = { class: "flex gap-8 items-center" }, Te = { class: "flex flex-col gap-16 text-center" }, Ue = { class: "fm-typo-en-title-sm-800" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Je = /* @__PURE__ */ Y({
25
22
  __name: "Voucher",
26
- setup(Re) {
27
- const { t: a } = he(), $ = {
23
+ setup(Ie) {
24
+ const { t: a } = ye(), $ = {
28
25
  label: a("connect.voucher.createCampaign"),
29
26
  value: "create",
30
27
  isPrimary: !0,
@@ -37,7 +34,7 @@ const ve = { class: "px-24 flex flex-col gap-y-16" }, Ce = { class: "flex items-
37
34
  () => p.campaigns.voucher.filter(
38
35
  (e) => q(e) && G(e)
39
36
  )
40
- ), j = ye.VOUCHER.map((e) => ({
37
+ ), j = he.VOUCHER.map((e) => ({
41
38
  label: e.name,
42
39
  value: e.value
43
40
  }));
@@ -288,7 +285,7 @@ const ve = { class: "px-24 flex flex-col gap-y-16" }, Ce = { class: "flex items-
288
285
  default: F(() => [
289
286
  (u(!0), V(S, null, te(t(_).filter(
290
287
  (n) => n.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
291
- ), (n) => (u(), y(Q, {
288
+ ), (n) => (u(), h(Q, {
292
289
  key: n._id.toString(),
293
290
  onClick: (k) => v(n),
294
291
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
@@ -298,7 +295,7 @@ const ve = { class: "px-24 flex flex-col gap-y-16" }, Ce = { class: "flex items-
298
295
  return [
299
296
  c("div", be, [
300
297
  c("div", ke, [
301
- (u(), y(ne(t(O)(n)))),
298
+ (u(), h(ne(t(O)(n)))),
302
299
  c("div", xe, g(((k = n.pf_collectible) == null ? void 0 : k.currentReceive) ?? 0) + " claimed ", 1)
303
300
  ]),
304
301
  c("div", Ve, [
@@ -307,26 +304,26 @@ const ve = { class: "px-24 flex flex-col gap-y-16" }, Ce = { class: "flex items-
307
304
  ])
308
305
  ]),
309
306
  c("div", Le, [
310
- n.event.type === "SIMPLE_CLAIM" ? (u(), y(C, {
307
+ n.event.type === "SIMPLE_CLAIM" ? (u(), h(C, {
311
308
  key: 0,
312
309
  icon: "visibility",
313
310
  "icon-color": "neutral-gray-400",
314
311
  variant: "tertiary",
315
- onClick: async (h) => {
316
- h.stopPropagation(), await t(U).push({
312
+ onClick: async (y) => {
313
+ y.stopPropagation(), await t(U).push({
317
314
  name: t(H)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
318
315
  params: { id: n._id }
319
316
  });
320
317
  }
321
318
  }, null, 8, ["onClick"])) : E("", !0),
322
- n.event.type === "SIMPLE_CLAIM" ? (u(), y(C, {
319
+ n.event.type === "SIMPLE_CLAIM" ? (u(), h(C, {
323
320
  key: 1,
324
321
  icon: "send",
325
322
  "icon-color": "neutral-gray-400",
326
323
  variant: "tertiary",
327
- onClick: (h) => {
324
+ onClick: (y) => {
328
325
  var R;
329
- h.stopPropagation(), (R = t(b)) == null || R.showSheet({
326
+ y.stopPropagation(), (R = t(b)) == null || R.showSheet({
330
327
  campaignId: n._id
331
328
  });
332
329
  }
@@ -335,7 +332,7 @@ const ve = { class: "px-24 flex flex-col gap-y-16" }, Ce = { class: "flex items-
335
332
  icon: "delete",
336
333
  "icon-color": "neutral-gray-400",
337
334
  variant: "tertiary",
338
- onClick: (h) => (h.stopPropagation(), I(n))
335
+ onClick: (y) => (y.stopPropagation(), I(n))
339
336
  }, null, 8, ["onClick"])
340
337
  ])
341
338
  ];
@@ -345,16 +342,19 @@ const ve = { class: "px-24 flex flex-col gap-y-16" }, Ce = { class: "flex items-
345
342
  ]),
346
343
  _: 1
347
344
  })
348
- ], 64)) : (u(), y(J, {
345
+ ], 64)) : (u(), h(J, {
349
346
  key: 1,
350
347
  variant: "outlined",
351
348
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
352
349
  }, {
353
350
  default: F(() => [
354
- Te,
355
- c("div", Ue, [
356
- c("div", Pe, g(t(a)("connect.voucher.createVoucherCampaign")), 1),
357
- c("div", Ie, g(t(a)("connect.voucher.description")), 1)
351
+ o[7] || (o[7] = c("img", {
352
+ src: ae,
353
+ class: "aspect-square w-[150px]"
354
+ }, null, -1)),
355
+ c("div", Te, [
356
+ c("div", Ue, g(t(a)("connect.voucher.createVoucherCampaign")), 1),
357
+ c("div", Pe, g(t(a)("connect.voucher.description")), 1)
358
358
  ]),
359
359
  l(C, {
360
360
  variant: "primary",
@@ -380,5 +380,5 @@ const ve = { class: "px-24 flex flex-col gap-y-16" }, Ce = { class: "flex items-
380
380
  }
381
381
  });
382
382
  export {
383
- Ye as default
383
+ Je as default
384
384
  };
@@ -0,0 +1,419 @@
1
+ import { defineComponent as A, ref as w, resolveComponent as c, openBlock as d, createBlock as F, withCtx as f, renderSlot as q, createVNode as m, createTextVNode as S, toDisplayString as I, createElementVNode as n, computed as N, createElementBlock as h, Fragment as U, renderList as z, unref as e, normalizeClass as J, createCommentVNode as P, resolveDynamicComponent as H } from "vue";
2
+ import { c as X } from "./index-DWBeauin.js";
3
+ import { e as K, F as Q } from "./index-zyVYgteg.js";
4
+ import { C as W } from "./membership-GNRX1fEK.js";
5
+ import { Z as g } from "./zod-Bg2FbC-D.js";
6
+ import { _ as Y } from "./SelectItems.vue_vue_type_script_setup_true_lang-D3KIZJLo.js";
7
+ import { u as ee } from "./business-BSP_3iNl.js";
8
+ import { useCoreStore as te } from "@feedmepos/mf-common";
9
+ import { _ as le } from "./ZodTextField.vue_vue_type_script_setup_true_lang-B5co0F__.js";
10
+ import { _ as oe } from "./ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js";
11
+ import { _ as ae, a as ne } from "./EffectSheet.vue_vue_type_style_index_0_lang-CU9XpMjd.js";
12
+ import { _ as se } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-VcU2Asjy.js";
13
+ import { u as me } from "./vue-i18n-2D47GxQX.js";
14
+ import { i as re } from "./helper-BzfjLXgi.js";
15
+ const ue = { class: "flex justify-end gap-8 w-full" }, ie = /* @__PURE__ */ A({
16
+ __name: "MenuSheet",
17
+ props: {
18
+ modelValue: {},
19
+ filterItems: { type: Function }
20
+ },
21
+ emits: ["confirm"],
22
+ setup(o, { emit: T }) {
23
+ const O = w(), s = w(!1);
24
+ function l() {
25
+ var i;
26
+ (i = O.value) == null || i.onConfirm();
27
+ }
28
+ const y = T;
29
+ return (i, x) => {
30
+ const a = c("FmField"), v = c("FmButton"), R = c("FmSideSheet");
31
+ return d(), F(R, {
32
+ modelValue: s.value,
33
+ "onUpdate:modelValue": x[1] || (x[1] = (b) => s.value = b),
34
+ title: "Select Items",
35
+ "close-button": !1,
36
+ "dismiss-away": !0,
37
+ "max-width": 560
38
+ }, {
39
+ "side-sheet-button": f(() => [
40
+ q(i.$slots, "side-sheet-button", {}, () => [
41
+ m(a, { class: "text-fm-color-typo-tertiary cursor-pointer" }, {
42
+ default: f(() => [
43
+ S(I(o.modelValue.length) + " item(s) selected ", 1)
44
+ ]),
45
+ _: 1
46
+ })
47
+ ])
48
+ ]),
49
+ "side-sheet-footer": f(() => [
50
+ n("div", ue, [
51
+ m(v, {
52
+ variant: "tertiary",
53
+ onClick: x[0] || (x[0] = (b) => s.value = !1),
54
+ label: "Cancel"
55
+ }),
56
+ m(v, {
57
+ variant: "primary",
58
+ onClick: l,
59
+ label: "Confirm"
60
+ })
61
+ ])
62
+ ]),
63
+ default: f(() => [
64
+ m(Y, {
65
+ class: "h-full",
66
+ "max-height": 0,
67
+ ref_key: "selectItemRef",
68
+ ref: O,
69
+ "initial-value": o.modelValue,
70
+ "filter-items": o.filterItems,
71
+ "on-complete": (b) => {
72
+ y("confirm", b), s.value = !1;
73
+ }
74
+ }, null, 8, ["initial-value", "filter-items", "on-complete"])
75
+ ]),
76
+ _: 3
77
+ }, 8, ["modelValue"]);
78
+ };
79
+ }
80
+ }), de = { class: "space-y-24" }, pe = { class: "grid grid-cols-2 gap-16" }, ce = { class: "fm-typo-en-title-sm-800" }, fe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ye = { class: "space-y-16" }, ve = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, be = {
81
+ key: 0,
82
+ class: "xs:!block flex gap-16 items-center pt-8"
83
+ }, ge = { class: "fm-typo-en-body-lg-400" }, xe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ve = {
84
+ key: 0,
85
+ class: "pt-8 space-y-8"
86
+ }, Fe = { class: "flex items-center gap-16 xs:block xs:space-y-8 w-fit" }, Ce = { class: "xs:!block flex gap-16 items-center" }, De = /* @__PURE__ */ A({
87
+ __name: "EarningOptionInput",
88
+ props: {
89
+ modelValue: {
90
+ type: Object
91
+ },
92
+ extras: {
93
+ type: Object
94
+ },
95
+ fixedType: {
96
+ type: Boolean
97
+ },
98
+ errorText: {
99
+ type: String
100
+ }
101
+ },
102
+ emits: ["update:model-value"],
103
+ setup(o, { emit: T }) {
104
+ var R, b, k;
105
+ const O = ee(), s = o, l = T, y = [
106
+ {
107
+ label: "Based on spending",
108
+ sublabel: "Customers earn rewards based on how much they spend.",
109
+ value: "PROPORTIONAL"
110
+ },
111
+ {
112
+ label: "Fixed amount",
113
+ sublabel: "Customers earn a set amount of rewards for specific actions.",
114
+ value: "FIXED"
115
+ }
116
+ ].filter((p) => {
117
+ var t, C;
118
+ return s.fixedType || ((C = (t = s.extras) == null ? void 0 : t.campaign) == null ? void 0 : C.event.type) != "BILL_COMPLETED" ? p.value == "FIXED" : !0;
119
+ }), i = N(() => {
120
+ var t, C;
121
+ const p = s.extras && "configs" in s.extras ? s.extras.configs.type : (t = s.extras) == null ? void 0 : t.campaign.type;
122
+ return (((C = W[p]) == null ? void 0 : C.name) || "reward").toLowerCase();
123
+ }), x = N(() => {
124
+ const p = K.safeParse(s.modelValue);
125
+ return p.success ? [] : p.error.errors;
126
+ });
127
+ function a(p) {
128
+ var t;
129
+ p != ((t = s.modelValue) == null ? void 0 : t.type) && l(
130
+ "update:model-value",
131
+ p === "FIXED" ? {
132
+ type: "FIXED",
133
+ amount: 1
134
+ } : {
135
+ type: "PROPORTIONAL",
136
+ amount: 1,
137
+ every: 1
138
+ }
139
+ );
140
+ }
141
+ const v = w(
142
+ ((R = s.modelValue) == null ? void 0 : R.type) === "PROPORTIONAL" && !!((k = (b = s.modelValue) == null ? void 0 : b.property) != null && k.length) || !1
143
+ );
144
+ return (p, t) => {
145
+ var B, D, _;
146
+ const C = c("FmCard"), $ = c("FmStepperField"), L = c("FmRadio"), j = c("FmPill"), G = c("FmButton"), M = c("FmRadioGroup"), Z = c("FmHelperText");
147
+ return d(), h("div", de, [
148
+ n("div", pe, [
149
+ (d(!0), h(U, null, z(e(y), (r) => {
150
+ var V, u;
151
+ return d(), F(C, {
152
+ variant: "outlined",
153
+ class: J(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-2", {
154
+ "col-span-2": e(y).length == 1,
155
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((V = o.modelValue) == null ? void 0 : V.type) === r.value,
156
+ "hover:bg-fm-color-opacity-sm": ((u = o.modelValue) == null ? void 0 : u.type) != r.value
157
+ }]),
158
+ onClick: (E) => a(r.value),
159
+ key: r.value
160
+ }, {
161
+ default: f(() => [
162
+ n("div", ce, I(r.label), 1),
163
+ n("div", fe, I(r.sublabel), 1)
164
+ ]),
165
+ _: 2
166
+ }, 1032, ["class", "onClick"]);
167
+ }), 128))
168
+ ]),
169
+ n("div", ye, [
170
+ ((B = o.modelValue) == null ? void 0 : B.type) === "FIXED" ? (d(), F($, {
171
+ key: 0,
172
+ label: `Receive ${e(i)}(s)`,
173
+ class: "flex-1",
174
+ "model-value": ((D = o.modelValue) == null ? void 0 : D.amount) ?? null,
175
+ "onUpdate:modelValue": t[0] || (t[0] = (r) => l("update:model-value", {
176
+ ...o.modelValue ?? { type: "FIXED" },
177
+ amount: r
178
+ }))
179
+ }, null, 8, ["label", "model-value"])) : ((_ = o.modelValue) == null ? void 0 : _.type) === "PROPORTIONAL" ? (d(), h(U, { key: 1 }, [
180
+ t[11] || (t[11] = n("div", { class: "fm-typo-en-body-lg-600" }, "Spending type", -1)),
181
+ m(M, {
182
+ "model-value": e(v),
183
+ "onUpdate:modelValue": t[6] || (t[6] = (r) => {
184
+ e(v) != r && (l("update:model-value", {
185
+ ...o.modelValue ?? {
186
+ type: "PROPORTIONAL",
187
+ amount: 1,
188
+ every: 1
189
+ },
190
+ property: r ? [] : void 0,
191
+ every: 1
192
+ }), v.value = r);
193
+ })
194
+ }, {
195
+ default: f(() => [
196
+ m(L, {
197
+ label: "Amount spent",
198
+ sublabel: `Receive ${e(i)} by amount spent`,
199
+ value: !1
200
+ }, {
201
+ label: f(() => {
202
+ var r, V;
203
+ return [
204
+ t[8] || (t[8] = n("div", { class: "fm-typo-en-body-lg-400" }, "Amount spent", -1)),
205
+ n("div", ve, " Receive " + I(e(i)) + " by amount spent ", 1),
206
+ e(v) ? P("", !0) : (d(), h("div", be, [
207
+ m($, {
208
+ label: `Receive ${e(i)}(s)`,
209
+ inputmode: "decimal",
210
+ class: "flex-1",
211
+ "model-value": ((r = o.modelValue) == null ? void 0 : r.amount) ?? null,
212
+ "onUpdate:modelValue": t[1] || (t[1] = (u) => l("update:model-value", {
213
+ ...o.modelValue ?? { type: "FIXED" },
214
+ amount: u
215
+ }))
216
+ }, null, 8, ["label", "model-value"]),
217
+ t[7] || (t[7] = n("div", { class: "xs:py-4 text-center" }, "for every", -1)),
218
+ m($, {
219
+ label: `Amount spend (${e(X.Config).getCountry().currency.symbol})`,
220
+ class: "flex-1",
221
+ inputmode: "decimal",
222
+ "model-value": ((V = o.modelValue) == null ? void 0 : V.every) ?? null,
223
+ "onUpdate:modelValue": t[2] || (t[2] = (u) => l("update:model-value", {
224
+ ...o.modelValue,
225
+ every: u
226
+ }))
227
+ }, {
228
+ prepend: f(() => [
229
+ S(I(e(X.Config).getCountry().currency.symbol), 1)
230
+ ]),
231
+ _: 1
232
+ }, 8, ["label", "model-value"])
233
+ ]))
234
+ ];
235
+ }),
236
+ _: 1
237
+ }, 8, ["sublabel"]),
238
+ m(L, {
239
+ label: "Product bought",
240
+ sublabel: `Receive ${e(i)} by product bought`,
241
+ value: !0,
242
+ disabled: !e(O).isPremium
243
+ }, {
244
+ label: f(() => {
245
+ var r, V;
246
+ return [
247
+ n("div", ge, [
248
+ t[9] || (t[9] = S(" Product bought ", -1)),
249
+ m(j, { variant: "premium" })
250
+ ]),
251
+ n("div", xe, " Receive " + I(e(i)) + " by product bought ", 1),
252
+ e(v) ? (d(), h("div", Ve, [
253
+ n("div", Fe, [
254
+ m(ie, {
255
+ "model-value": s.modelValue.property || [],
256
+ onConfirm: t[3] || (t[3] = (u) => l("update:model-value", {
257
+ ...o.modelValue,
258
+ property: u
259
+ }))
260
+ }, {
261
+ "side-sheet-button": f(() => {
262
+ var u, E;
263
+ return [
264
+ m(G, {
265
+ label: (u = s.modelValue.property) != null && u.length ? `${(E = s.modelValue.property) == null ? void 0 : E.length} product(s) selected` : "Select product",
266
+ icon: "link",
267
+ variant: "secondary"
268
+ }, null, 8, ["label"])
269
+ ];
270
+ }),
271
+ _: 1
272
+ }, 8, ["model-value"])
273
+ ]),
274
+ n("div", Ce, [
275
+ m($, {
276
+ inputmode: "decimal",
277
+ label: `Receive ${e(i)}(s)`,
278
+ class: "flex-1",
279
+ "model-value": ((r = o.modelValue) == null ? void 0 : r.amount) ?? null,
280
+ "onUpdate:modelValue": t[4] || (t[4] = (u) => l("update:model-value", {
281
+ ...o.modelValue ?? { type: "FIXED" },
282
+ amount: u
283
+ }))
284
+ }, null, 8, ["label", "model-value"]),
285
+ t[10] || (t[10] = n("div", { class: "xs:py-4 text-center" }, "for every", -1)),
286
+ m($, {
287
+ label: "Item purchased",
288
+ class: "flex-1",
289
+ "model-value": ((V = o.modelValue) == null ? void 0 : V.every) ?? null,
290
+ inputmode: "numeric",
291
+ "max-fraction-digits": 0,
292
+ "onUpdate:modelValue": t[5] || (t[5] = (u) => l("update:model-value", {
293
+ ...o.modelValue,
294
+ every: u
295
+ }))
296
+ }, null, 8, ["model-value"])
297
+ ])
298
+ ])) : P("", !0)
299
+ ];
300
+ }),
301
+ _: 1
302
+ }, 8, ["sublabel", "disabled"])
303
+ ]),
304
+ _: 1
305
+ }, 8, ["model-value"])
306
+ ], 64)) : P("", !0)
307
+ ]),
308
+ o.errorText || e(x).length > 0 ? (d(), F(Z, {
309
+ key: 0,
310
+ class: "!mt-4",
311
+ text: o.errorText || e(g).helperText(e(x), ""),
312
+ state: "error"
313
+ }, null, 8, ["text"])) : P("", !0)
314
+ ]);
315
+ };
316
+ }
317
+ }), Ie = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary flex items-center justify-between" }, _e = /* @__PURE__ */ A({
318
+ __name: "VoucherEditor",
319
+ props: {
320
+ modelValue: {
321
+ type: Object
322
+ },
323
+ rewardImage: {
324
+ type: Object
325
+ }
326
+ },
327
+ emits: ["update:model-value", "update:reward-image"],
328
+ setup(o, { emit: T }) {
329
+ const { t: O } = me(), l = w(
330
+ o.modelValue ?? re("VOUCHER", {
331
+ business: te().currentBusiness.value._id,
332
+ name: ""
333
+ })
334
+ ), y = Q, i = T;
335
+ return (x, a) => {
336
+ var b, k, p;
337
+ const v = c("FmTextarea"), R = c("FmHelperText");
338
+ return d(), h(U, null, [
339
+ m(le, {
340
+ modelValue: e(l).name,
341
+ "onUpdate:modelValue": a[0] || (a[0] = (t) => e(l).name = t),
342
+ label: "Voucher name",
343
+ schema: e(g).typeAtPath(e(y), "name", [e(l).type])
344
+ }, null, 8, ["modelValue", "schema"]),
345
+ m(v, {
346
+ class: "!mb-[-16px]",
347
+ modelValue: e(l).description,
348
+ "onUpdate:modelValue": a[1] || (a[1] = (t) => e(l).description = t),
349
+ rules: [e(g).ruleAtPath(e(y), "description", [e(l).type])]
350
+ }, {
351
+ label: f(() => [
352
+ (d(), F(H(
353
+ e(g).toInputLabel(
354
+ e(g).typeAtPath(e(y), "description", [e(l).type]),
355
+ "Voucher description"
356
+ )
357
+ )))
358
+ ]),
359
+ _: 1
360
+ }, 8, ["modelValue", "rules"]),
361
+ n("div", Ie, [
362
+ a[6] || (a[6] = n("div", null, "Voucher description should not exceed 200 characters.", -1)),
363
+ n("div", null, I(((b = e(l).description) == null ? void 0 : b.length) ?? 0) + "/200", 1)
364
+ ]),
365
+ m(oe, {
366
+ class: "w-1/2 xs:w-2/3",
367
+ "aspect-ratio": "16/9",
368
+ file: o.rewardImage ?? void 0,
369
+ thumbnail: e(l).image ?? void 0,
370
+ "onUpdate:file": a[2] || (a[2] = async (t) => {
371
+ i("update:reward-image", t), t || (e(l).image = null);
372
+ })
373
+ }, {
374
+ label: f(() => [
375
+ (d(), F(H(
376
+ e(g).toInputLabel(
377
+ e(g).typeAtPath(e(y), "image", [e(l).type]),
378
+ "Voucher image"
379
+ )
380
+ )))
381
+ ]),
382
+ _: 1
383
+ }, 8, ["file", "thumbnail"]),
384
+ a[7] || (a[7] = n("div", { class: "fm-typo-en-title-sm-800" }, "Discount", -1)),
385
+ m(ae, {
386
+ "model-value": e(l).extras.effect,
387
+ "onUpdate:modelValue": a[3] || (a[3] = (t) => e(l).extras.effect = t)
388
+ }, null, 8, ["model-value"]),
389
+ e(l).extras.effect == null ? (d(), F(R, {
390
+ key: 0,
391
+ class: "!mt-8",
392
+ text: e(O)("connect.campaign.common.effect_required"),
393
+ state: "error"
394
+ }, null, 8, ["text"])) : P("", !0),
395
+ a[8] || (a[8] = n("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Usage configuration", -1)),
396
+ m(ne, {
397
+ "model-value": e(l).options,
398
+ "no-campaign": e(l).noCampaign,
399
+ "onUpdate:modelValue": a[4] || (a[4] = (t) => e(l).options = t),
400
+ schema: e(g).typeAtPath(e(y), "options", ["VOUCHER"])
401
+ }, null, 8, ["model-value", "no-campaign", "schema"]),
402
+ a[9] || (a[9] = n("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Availability", -1)),
403
+ e(l).type === "VOUCHER" ? (d(), F(se, {
404
+ key: 1,
405
+ "model-value": ((p = (k = e(l).extras) == null ? void 0 : k.targetLocation) == null ? void 0 : p.map(String)) ?? null,
406
+ type: "select",
407
+ "onUpdate:modelValue": a[5] || (a[5] = (t) => {
408
+ e(l).extras.targetLocation = t;
409
+ }),
410
+ rules: [e(g).ruleAtPath(e(y), "extras.targetLocation")]
411
+ }, null, 8, ["model-value", "rules"])) : P("", !0)
412
+ ], 64);
413
+ };
414
+ }
415
+ });
416
+ export {
417
+ De as _,
418
+ _e as a
419
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as f, useAttrs as y, resolveComponent as b, openBlock as l, createBlock as v, mergeProps as x, unref as t, createSlots as g, withCtx as h, createElementVNode as a, toDisplayString as n, renderSlot as k, createElementBlock as F, createCommentVNode as S } from "vue";
2
2
  import { Z as d } from "./zod-Bg2FbC-D.js";
3
- import { u as V } from "./vue-i18n--_Wu1nMj.js";
3
+ import { u as V } from "./vue-i18n-2D47GxQX.js";
4
4
  const B = { class: "fm-typo-en-body-lg-400 flex gap-4 text-fm-color-typo-primary items-center" }, C = {
5
5
  key: 0,
6
6
  class: "text-fm-color-typo-tertiary"