@feedmepos/mf-connect 0.1.21-prod → 0.1.23-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 (89) hide show
  1. package/dist/{Analytic-BQiGib08.js → Analytic-DfTQmuSa.js} +10 -10
  2. package/dist/{App-B8e7d2pF.js → App-C5AMrBM2.js} +7 -7
  3. package/dist/{Bin-BLlnEux-.js → Bin-nZv2ZrAD.js} +7 -7
  4. package/dist/{Broadcast-BGw646-m.js → Broadcast-1ViZILw6.js} +8 -8
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BT5rtjPA.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Nuj7G5E1.js} +6 -6
  6. package/dist/{Card-I9YI4BlJ.js → Card-CUAfRl0P.js} +14 -14
  7. package/dist/{Collections-BV8_G7vd.js → Collections-DNlV8CiV.js} +5 -5
  8. package/dist/{Credit-nrEbKUWc.js → Credit-C8WVgeKO.js} +8 -8
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BTkAiIvO.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CZmd7K3H.js} +28 -27
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-C-dcVww-.js → EffectSheet.vue_vue_type_style_index_0_lang-Crakwwgo.js} +6 -6
  11. package/dist/{Experience-Cj6yrQ-5.js → Experience-C0ZrJ-rU.js} +8 -8
  12. package/dist/{Game-C57UeXHH.js → Game-KiwAxjQX.js} +8 -8
  13. package/dist/{Index-C_m0ldjU.js → Index-C_mvHa_E.js} +9 -9
  14. package/dist/{MainLayout-DpZC6o3R.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js} +19 -53
  15. package/dist/MainLayout-B1aJoR95.js +41 -0
  16. package/dist/{Marketing-CH1DN3VY.js → Marketing-7lvR6gR_.js} +12 -12
  17. package/dist/{Member-BcORjsqn.js → Member-DR406GTr.js} +4 -4
  18. package/dist/{MemberList-Ca75OWm_.js → MemberList-BDsVY1bB.js} +23 -23
  19. package/dist/{MemberTransactions-B0Oa15-s.js → MemberTransactions-DXgJ8Tua.js} +1 -1
  20. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BbiWEoQQ.js +447 -0
  21. package/dist/{Mission-o0TjmbH_.js → Mission-CJnySjh4.js} +8 -8
  22. package/dist/{Overview-EiAhGzV6.js → Overview-ZENHKQhC.js} +16 -16
  23. package/dist/{Point-qan2Ihfu.js → Point-DvYLQNmg.js} +8 -8
  24. package/dist/{Promotion-COVNuE2t.js → Promotion-CE6Mqev4.js} +9 -9
  25. package/dist/{Record-Cyd2x4RU.js → Record-Cl4o08E4.js} +6 -6
  26. package/dist/{Reward-k-AweK42.js → Reward-C1hZ9c6y.js} +14 -14
  27. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CFhyLvSA.js → RewardGroup.vue_vue_type_script_setup_true_lang-Co1mzeQA.js} +10 -10
  28. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-tcfaWFK4.js → RuleGroup.vue_vue_type_script_setup_true_lang-CDEiSeqW.js} +181 -178
  29. package/dist/{Segment-DIb21-Ns.js → Segment-1RH6jUyt.js} +13 -13
  30. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-D7r3NMJu.js → SelectItems.vue_vue_type_script_setup_true_lang-CJTZZ4EH.js} +2 -2
  31. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B5IaCgiU.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DL2A84oN.js} +3 -3
  32. package/dist/Setting-DK9lsogh.js +1930 -0
  33. package/dist/{Store-DLEcQWU_.js → Store-DSeXriUy.js} +145 -143
  34. package/dist/StoreRewards-DFUg0n5g.js +422 -0
  35. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BpNYA-xj.js → StoreTransactions.vue_vue_type_script_setup_true_lang-D_F7zaEl.js} +82 -82
  36. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BlEfnhii.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-hR4OBTrC.js} +1 -1
  37. package/dist/{Tier-jmOeJ9BB.js → Tier-Yq3BNKGq.js} +19 -19
  38. package/dist/{Title-CsV4jem5.js → Title-CwWan9gL.js} +100 -100
  39. package/dist/{Transaction-Bf8PWUc6.js → Transaction-BgO5EYZB.js} +2 -2
  40. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-bFnBW5gb.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CyUXbl30.js} +6 -6
  41. package/dist/{Voucher-eayylhcc.js → Voucher-C2w8z86e.js} +34 -34
  42. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DjlgbRZ4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-dEgiWiLL.js} +10 -10
  43. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DMh6Q2iI.js → ZodTextField.vue_vue_type_script_setup_true_lang-BME260O1.js} +1 -1
  44. package/dist/{app-NqEzL0OT.js → app-BVIgk6aa.js} +1 -1
  45. package/dist/{app-bxGFzJpn.js → app-BVsQcG_m.js} +40 -40
  46. package/dist/app.js +1 -1
  47. package/dist/{business-D6C_7bDy.js → business-CdvE-WIp.js} +1 -1
  48. package/dist/{campaign-BGzVYFng.js → campaign-WGLWFuCK.js} +9 -9
  49. package/dist/{campaign-yLK6vWS8.js → campaign-gunNEZhU.js} +2 -2
  50. package/dist/{campaign.enum-Dbmht5_i.js → campaign.enum-O82qvpU2.js} +1 -1
  51. package/dist/{campaign.fn-Dj2_FuER.js → campaign.fn-Bzr9Jc5X.js} +22 -22
  52. package/dist/{collectible.enum-Dnn_Aj65.js → collectible.enum-CzUCHExj.js} +1 -1
  53. package/dist/{collection.fn-CoMxWCc1.js → collection.fn-Czs8Mpdz.js} +2 -2
  54. package/dist/{dto-ClZmLiV_.js → dto-Czd638gm.js} +7 -7
  55. package/dist/{effect-BDMkCpDf.js → effect-D8Km5OHX.js} +1 -1
  56. package/dist/{email-addresses-B3uFvya7.js → email-addresses-2-RgQal8.js} +1 -1
  57. package/dist/{export-v3KwUDUd.js → export--jJWZuJy.js} +3 -3
  58. package/dist/{helper-CBL7LpuD.js → helper-BOwvTpT_.js} +1 -1
  59. package/dist/{index-DP6beo56.js → index-7SYnV8B2.js} +4 -4
  60. package/dist/{index-Cqzz3NCP.js → index-BMPlc7it.js} +225 -218
  61. package/dist/{index-DUJOEcLO.js → index-Bg8Lqk3s.js} +1 -1
  62. package/dist/{index-CQAOZuRz.js → index-C6j2uVRJ.js} +1 -1
  63. package/dist/{index-CyJqTXt8.js → index-CFxA9VYh.js} +91 -73
  64. package/dist/{index-TyHupXxP.js → index-CKSGfZ62.js} +21 -16
  65. package/dist/{index-MMYQth2d.js → index-CpsX7fKq.js} +1 -1
  66. package/dist/{index-DHbi29uw.js → index-DExfBo0i.js} +3 -3
  67. package/dist/{index-DAk26zCe.js → index-DGi6aLjD.js} +1 -1
  68. package/dist/{index-g-PCtD2d.js → index-DRVIuG-G.js} +1 -1
  69. package/dist/{index-C3-pSb8M.js → index-DllRE4Xv.js} +1 -1
  70. package/dist/{index-RwV8duB6.js → index-FBWWEOV0.js} +12 -5
  71. package/dist/{index.esm2017-B9fqtwTI.js → index.esm2017-CkIJgInI.js} +38 -38
  72. package/dist/{loading-DasBRvHo.js → loading-C-HOw2p9.js} +4 -4
  73. package/dist/{membership-CxFyoQ-0.js → membership-ByveC1Cs.js} +3 -3
  74. package/dist/{money-CVZMau41.js → money-C_wAhRJ4.js} +1 -1
  75. package/dist/{number-q8W5mWjg.js → number-B1OxEx_j.js} +1 -1
  76. package/dist/{objectid-wDM4YS-R.js → objectid-CtnWn6lG.js} +6 -6
  77. package/dist/{reward-DvTNcjsB.js → reward-BOA1fyrM.js} +1 -1
  78. package/dist/{rule-Cy2u2C6N.js → rule-CfePtJap.js} +8 -4
  79. package/dist/{rule-builder-DQavAK_J.js → rule-builder-B7wNFPfi.js} +1 -1
  80. package/dist/style.css +1 -1
  81. package/dist/{template-Be8bixKI.js → template-CvIL9Pex.js} +4 -4
  82. package/dist/{trigger-Nhtu-Pr4.js → trigger-D7uzmrxE.js} +4 -4
  83. package/dist/{usePagination-Djq5Hy-n.js → usePagination-BFzJ3YC7.js} +1 -1
  84. package/dist/{user-B36pyi6C.js → user-NlenrMEw.js} +1 -1
  85. package/dist/{vue-i18n-DaIhSEbY.js → vue-i18n-BjInRP6b.js} +2 -2
  86. package/package.json +1 -1
  87. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-DDBXmzd5.js +0 -215
  88. package/dist/Setting-ZTPL9b35.js +0 -1877
  89. package/dist/StoreRewards-B5txZ3P9.js +0 -401
@@ -1,16 +1,16 @@
1
1
  import { openBlock as m, createElementBlock as p, defineComponent as z, ref as S, onMounted as Y, computed as H, h as J, resolveComponent as c, Fragment as x, createVNode as i, unref as r, createElementVNode as s, withCtx as F, renderList as $, createBlock as B, toDisplayString as f, createCommentVNode as j } from "vue";
2
2
  import { _ as q } from "./campaign-CpzFl8Vr.js";
3
3
  import { components as G } from "@feedmepos/ui-library";
4
- import { p as X, u as Q } from "./loading-DasBRvHo.js";
4
+ import { p as X, u as Q } from "./loading-C-HOw2p9.js";
5
5
  import { defineStore as W } from "pinia";
6
- import { F as C } from "./index-DUJOEcLO.js";
6
+ import { F as C } from "./index-Bg8Lqk3s.js";
7
7
  import { useCoreStore as Z } from "@feedmepos/mf-common";
8
- import { g as h, S as ee, b as te } from "./index-DP6beo56.js";
8
+ import { g as h, S as ee, b as te } from "./index-7SYnV8B2.js";
9
9
  import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
- import { u as ae } from "./campaign-yLK6vWS8.js";
10
+ import { u as ae } from "./campaign-gunNEZhU.js";
11
11
  import { h as oe } from "./moment-BWErdI6_.js";
12
- import { u as re } from "./vue-i18n-DaIhSEbY.js";
13
- var se = { 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", marketingV1Portal: "https://marketing-v1.feedme.cc" };
12
+ import { u as re } from "./vue-i18n-BjInRP6b.js";
13
+ var se = { 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" };
14
14
  const y = () => {
15
15
  const o = ee.getBusinessId();
16
16
  if (!o) throw new Error("Invalid business ID");
@@ -188,13 +188,13 @@ const ce = /* @__PURE__ */ ne(ie, [["render", le]]), me = { class: "px-24 flex f
188
188
  icon: "delete",
189
189
  iconColor: "neutral-gray-400",
190
190
  onClick: (e) => {
191
- e.stopPropagation(), V(n.row.original);
191
+ e.stopPropagation(), P(n.row.original);
192
192
  }
193
193
  });
194
194
  }
195
195
  }
196
196
  ];
197
- async function V(n) {
197
+ async function P(n) {
198
198
  await X.remove(
199
199
  t("marketing.delete.confirm", { name: n.name })
200
200
  ) && await U(
@@ -216,7 +216,7 @@ const ce = /* @__PURE__ */ ne(ie, [["render", le]]), me = { class: "px-24 flex f
216
216
  searchKey: ""
217
217
  });
218
218
  return (n, e) => {
219
- const v = c("FmPageHead"), P = c("FmSearch"), E = c("FmTable"), T = c("FmButton"), K = c("FmListItem"), A = c("FmList"), R = c("FmCard");
219
+ const v = c("FmPageHead"), V = c("FmSearch"), E = c("FmTable"), T = c("FmButton"), K = c("FmListItem"), A = c("FmList"), R = c("FmCard");
220
220
  return m(), p(x, null, [
221
221
  i(v, {
222
222
  title: r(t)("connect.marketing.title"),
@@ -225,7 +225,7 @@ const ce = /* @__PURE__ */ ne(ie, [["render", le]]), me = { class: "px-24 flex f
225
225
  "onClick:action": e[0] || (e[0] = () => g())
226
226
  }, null, 8, ["title", "actions"]),
227
227
  s("div", me, [
228
- i(P, {
228
+ i(V, {
229
229
  modelValue: l.value.searchKey,
230
230
  "onUpdate:modelValue": e[1] || (e[1] = (a) => l.value.searchKey = a),
231
231
  placeholder: r(t)("connect.marketing.search"),
@@ -240,7 +240,7 @@ const ce = /* @__PURE__ */ ne(ie, [["render", le]]), me = { class: "px-24 flex f
240
240
  }, null, 8, ["modelValue", "is-open"]),
241
241
  r(d).length > 0 ? (m(), p(x, { key: 0 }, [
242
242
  s("div", de, [
243
- i(P, {
243
+ i(V, {
244
244
  modelValue: l.value.searchKey,
245
245
  "onUpdate:modelValue": e[4] || (e[4] = (a) => l.value.searchKey = a),
246
246
  class: "xs:hidden",
@@ -279,7 +279,7 @@ const ce = /* @__PURE__ */ ne(ie, [["render", le]]), me = { class: "px-24 flex f
279
279
  icon: "delete",
280
280
  "icon-color": "neutral-gray-400",
281
281
  variant: "tertiary",
282
- onClick: (M) => (M.stopPropagation(), V(a))
282
+ onClick: (M) => (M.stopPropagation(), P(a))
283
283
  }, null, 8, ["onClick"])
284
284
  ];
285
285
  }),
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as f, computed as T, ref as d, watch as k, resolveComponent as s, openBlock as _, createElementBlock as B, Fragment as E, createVNode as b, unref as n, createElementVNode as y, createBlock as A, createCommentVNode as L } from "vue";
2
- import "./index-CQAOZuRz.js";
3
- import { u as M } from "./vue-i18n-DaIhSEbY.js";
2
+ import "./index-C6j2uVRJ.js";
3
+ import { u as M } from "./vue-i18n-BjInRP6b.js";
4
4
  import { useRouter as N } from "vue-router";
5
- import { m as Y } from "./index-DAk26zCe.js";
6
- import { R as i } from "./app-bxGFzJpn.js";
5
+ import { m as Y } from "./index-DGi6aLjD.js";
6
+ import { R as i } from "./app-BVsQcG_m.js";
7
7
  const h = { class: "px-24 flex flex-col gap-y-16 pb-24" }, g = /* @__PURE__ */ f({
8
8
  __name: "Member",
9
9
  setup(w) {
@@ -1,35 +1,35 @@
1
1
  import { defineComponent as be, computed as H, ref as G, resolveComponent as $, openBlock as u, createElementBlock as A, Fragment as q, createElementVNode as t, unref as e, createBlock as R, createCommentVNode as ce, createVNode as h, renderList as ie, withCtx as xe, createTextVNode as Fe, toDisplayString as V, withDirectives as ze, vShow as je, watch as qe, onBeforeMount as lt, h as K, onMounted as Ke, isRef as ct, normalizeClass as dt } from "vue";
2
2
  import { h as S } from "./moment-BWErdI6_.js";
3
3
  import { useDialog as Ee, components as ve } from "@feedmepos/ui-library";
4
- import { e as mt, M as ut } from "./email-addresses-B3uFvya7.js";
5
- import { a as Ge, _ as He, w as pt } from "./usePagination-Djq5Hy-n.js";
6
- import "./index-CQAOZuRz.js";
7
- import { p as Pe, c as Oe, b as Re, u as We } from "./loading-DasBRvHo.js";
8
- import { u as $e, C as Ue, s as ft } from "./membership-CxFyoQ-0.js";
9
- import { c as bt } from "./index-DP6beo56.js";
4
+ import { e as mt, M as ut } from "./email-addresses-2-RgQal8.js";
5
+ import { a as Ge, _ as He, w as pt } from "./usePagination-BFzJ3YC7.js";
6
+ import "./index-C6j2uVRJ.js";
7
+ import { p as Pe, c as Oe, b as Re, u as We } from "./loading-C-HOw2p9.js";
8
+ import { u as $e, C as Ue, s as ft } from "./membership-ByveC1Cs.js";
9
+ import { c as bt } from "./index-7SYnV8B2.js";
10
10
  import { _ as Le } from "./lodash-B5I3zXaY.js";
11
11
  import { D as yt } from "./type_drinks-D6jnpvwV.js";
12
- import { b as gt, c as vt, d as xt, e as _t, f as ht } from "./index-Cqzz3NCP.js";
13
- import { C as Ae } from "./collection.fn-CoMxWCc1.js";
12
+ import { b as gt, c as vt, d as xt, e as _t, f as ht } from "./index-BMPlc7it.js";
13
+ import { C as Ae } from "./collection.fn-Czs8Mpdz.js";
14
14
  import { defineStore as St } from "pinia";
15
- import { u as Je } from "./business-D6C_7bDy.js";
16
- import { f as ee } from "./number-q8W5mWjg.js";
17
- import "./index-TyHupXxP.js";
18
- import "./index-CyJqTXt8.js";
19
- import "./index-DUJOEcLO.js";
20
- import "./index-DHbi29uw.js";
15
+ import { u as Je } from "./business-CdvE-WIp.js";
16
+ import { f as ee } from "./number-B1OxEx_j.js";
17
+ import "./index-CKSGfZ62.js";
18
+ import "./index-CFxA9VYh.js";
19
+ import "./index-Bg8Lqk3s.js";
20
+ import "./index-DExfBo0i.js";
21
21
  import { s as Ct } from "./index-CuvNtC_M.js";
22
- import { B as wt, e as Ft } from "./export-v3KwUDUd.js";
23
- import { m as Me } from "./index-RwV8duB6.js";
22
+ import { B as wt, e as Ft } from "./export--jJWZuJy.js";
23
+ import { m as Me } from "./index-FBWWEOV0.js";
24
24
  import { o as Ce } from "./objectId-dwaoBfJX.js";
25
- import { F as ke } from "./collectible.enum-Dnn_Aj65.js";
26
- import { g as Mt, b as Tt } from "./campaign-BGzVYFng.js";
25
+ import { F as ke } from "./collectible.enum-CzUCHExj.js";
26
+ import { g as Mt, b as Tt } from "./campaign-WGLWFuCK.js";
27
27
  import { useRouter as Xe } from "vue-router";
28
- import { m as le } from "./index-DAk26zCe.js";
29
- import { t as kt } from "./index-g-PCtD2d.js";
30
- import { R as Qe } from "./app-bxGFzJpn.js";
31
- import { t as At } from "./money-CVZMau41.js";
32
- import { g as Et, a as $t, b as It } from "./user-B36pyi6C.js";
28
+ import { m as le } from "./index-DGi6aLjD.js";
29
+ import { t as kt } from "./index-DRVIuG-G.js";
30
+ import { R as Qe } from "./app-BVsQcG_m.js";
31
+ import { t as At } from "./money-C_wAhRJ4.js";
32
+ import { g as Et, a as $t, b as It } from "./user-NlenrMEw.js";
33
33
  const Vt = { class: "flex flex-col" }, Bt = /* @__PURE__ */ t("div", { class: "fm-typo-en-title-sm-800 mb-8" }, "Member tiering", -1), Dt = /* @__PURE__ */ t("div", { class: "fm-typo-en-title-sm-800 mt-16 mb-8" }, "Member Card", -1), Nt = /* @__PURE__ */ t("div", { class: "fm-typo-en-title-sm-800 mt-16 mb-8" }, "Titles", -1), Yt = { key: 1 }, Pt = /* @__PURE__ */ t("div", { class: "flex flex-nowrap gap-4 items-center" }, [
34
34
  /* @__PURE__ */ t("div", { class: "flex-1" }, "Title"),
35
35
  /* @__PURE__ */ t("div", { class: "flex-1" }, "Expires in days"),
@@ -1,5 +1,5 @@
1
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-BpNYA-xj.js";
2
+ import { _ as k, a as x } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-D_F7zaEl.js";
3
3
  import { useRouter as y } from "vue-router";
4
4
  const C = { class: "flex flex-col gap-y-32 pb-24" }, F = /* @__PURE__ */ d({
5
5
  __name: "MemberTransactions",
@@ -0,0 +1,447 @@
1
+ import { defineComponent as j, shallowRef as N, openBlock as p, createElementBlock as _, normalizeStyle as O, ref as V, resolveComponent as g, createBlock as E, unref as s, isRef as P, withCtx as v, createVNode as h, createElementVNode as x, createCommentVNode as T, withDirectives as U, vShow as A, computed as q, onMounted as G, Fragment as L, createTextVNode as J, toDisplayString as z, renderList as K } from "vue";
2
+ import { p as W } from "./loading-C-HOw2p9.js";
3
+ import { E as Y } from "./index-BMPlc7it.js";
4
+ import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ import { _ as Q, S as X } from "./LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js";
6
+ import { c as ee } from "./object-qECH92oz.js";
7
+ const te = {
8
+ "user.name": {
9
+ name: "User name"
10
+ },
11
+ "user.birthday": {
12
+ name: "Birthday"
13
+ },
14
+ "user.joinAt": {
15
+ name: "Join at"
16
+ },
17
+ "user.expiringVouchers.days7": {
18
+ name: "Expiring vouchers in 7 days"
19
+ },
20
+ "user.expiringVouchers.days30": {
21
+ name: "Expiring vouchers in 30 days"
22
+ },
23
+ "user.expiringVouchers.days90": {
24
+ name: "Expiring vouchers in 90 days"
25
+ },
26
+ "user.tier": {
27
+ name: "User tier"
28
+ },
29
+ "user.point": {
30
+ name: "User experience"
31
+ },
32
+ "user.gender": {
33
+ name: "Gender"
34
+ },
35
+ "user.phoneNumber": {
36
+ name: "Phone Number"
37
+ },
38
+ "transaction.amount": {
39
+ name: "Reward amount"
40
+ },
41
+ "collectible.name": {
42
+ name: "Reward name"
43
+ },
44
+ "membership.url": {
45
+ name: "Membership URL"
46
+ }
47
+ }, Me = {
48
+ MY: ["user.phoneNumber", "membership.url"]
49
+ }, ne = "https://editor.unlayer.com/embed.js?2", R = [];
50
+ let H = !1;
51
+ const ae = (e) => {
52
+ const n = document.querySelectorAll("script");
53
+ let i = !1;
54
+ return n.forEach((u) => {
55
+ u.src.includes(e) && (i = !0);
56
+ }), i;
57
+ }, ie = (e) => {
58
+ R.push(e);
59
+ }, B = () => {
60
+ if (H) {
61
+ let e;
62
+ for (; e = R.shift(); )
63
+ e();
64
+ }
65
+ }, oe = (e, n = ne) => {
66
+ if (ie(e), ae(n))
67
+ B();
68
+ else {
69
+ const i = document.createElement("script");
70
+ i.setAttribute("src", n), i.onload = () => {
71
+ H = !0, B();
72
+ }, document.head.appendChild(i);
73
+ }
74
+ };
75
+ let se = 0;
76
+ const re = j({
77
+ name: "EmailEditor",
78
+ props: {
79
+ editorId: String,
80
+ minHeight: {
81
+ type: String,
82
+ default: "500px"
83
+ },
84
+ options: Object,
85
+ scriptUrl: String,
86
+ /**
87
+ * @Deprecated Props: Use `options.appearance` instead
88
+ */
89
+ appearance: Object,
90
+ /**
91
+ * @Deprecated Props: Use `options.locale` instead
92
+ */
93
+ locale: String,
94
+ /**
95
+ * @Deprecated Props: Use `options.projectId` instead
96
+ */
97
+ projectId: Number,
98
+ /**
99
+ * @Deprecated Props: Use `options.tools` instead
100
+ */
101
+ tools: Object
102
+ },
103
+ computed: {
104
+ id() {
105
+ return this.editorId || `editor-${++se}`;
106
+ }
107
+ },
108
+ setup() {
109
+ return {
110
+ editor: N(null)
111
+ // Makes editor available to the template
112
+ };
113
+ },
114
+ mounted() {
115
+ this.$emit("load"), oe(this.loadEditor.bind(this), this.scriptUrl);
116
+ },
117
+ methods: {
118
+ loadEditor() {
119
+ const e = this.options || {};
120
+ this.appearance && (e.appearance = this.appearance), this.locale && (e.locale = this.locale), this.projectId && (e.projectId = this.projectId), this.tools && (e.tools = this.tools), this.editor = unlayer.createEditor({
121
+ ...e,
122
+ id: this.id
123
+ }), this.editor.addEventListener("editor:ready", () => {
124
+ this.$emit("ready");
125
+ });
126
+ },
127
+ /**
128
+ * @deprecated This method will be removed in the next major release. Use `editor.exportHtml` instead.
129
+ */
130
+ exportHtml(e) {
131
+ var n;
132
+ (n = this.editor) == null || n.exportHtml(e);
133
+ },
134
+ /**
135
+ * @deprecated This method will be removed in the next major release. Use `editor.loadDesign` instead.
136
+ */
137
+ loadDesign(e) {
138
+ var n;
139
+ (n = this.editor) == null || n.loadDesign(e);
140
+ },
141
+ /**
142
+ * @deprecated This method will be removed in the next major release. Use `editor.saveDesign` instead.
143
+ */
144
+ saveDesign(e) {
145
+ var n;
146
+ (n = this.editor) == null || n.saveDesign(e);
147
+ }
148
+ }
149
+ }), le = ["id"];
150
+ function de(e, n, i, u, y, r) {
151
+ return p(), _("div", {
152
+ id: e.id,
153
+ class: "unlayer-editor",
154
+ style: O({ minHeight: e.minHeight })
155
+ }, null, 12, le);
156
+ }
157
+ const ue = /* @__PURE__ */ Z(re, [["render", de], ["__scopeId", "data-v-a9a2bb94"]]), ce = { class: "h-full flex flex-col" }, me = { class: "flex items-center gap-8" }, pe = /* @__PURE__ */ j({
158
+ __name: "EmailEditorSheet",
159
+ props: {
160
+ design: {
161
+ type: Object,
162
+ required: !1
163
+ },
164
+ title: {
165
+ type: String,
166
+ required: !1
167
+ }
168
+ },
169
+ emits: ["update:design"],
170
+ setup(e, { expose: n, emit: i }) {
171
+ const u = V(!1), y = V(null), r = V(!1), b = e, f = V({
172
+ html: "",
173
+ design: b.design,
174
+ title: b.title || ""
175
+ });
176
+ function S(o) {
177
+ u.value = o;
178
+ }
179
+ const l = i;
180
+ function t() {
181
+ y.value && (y.value.exportHtml((o) => {
182
+ f.value = {
183
+ html: o.html,
184
+ design: o.design,
185
+ title: f.value.title
186
+ }, l("update:design", f.value);
187
+ }), S(!1));
188
+ }
189
+ return n({
190
+ showSheet: S
191
+ }), (o, a) => {
192
+ const c = g("FmButton"), w = g("FmTextField"), M = g("FmSideSheet");
193
+ return p(), E(M, {
194
+ modelValue: s(u),
195
+ "onUpdate:modelValue": a[4] || (a[4] = (d) => P(u) ? u.value = d : null),
196
+ header: "Email editor",
197
+ "max-width": 1280
198
+ }, {
199
+ "side-sheet-button": v(() => [
200
+ h(c, {
201
+ label: "Edit email",
202
+ variant: "tertiary",
203
+ icon: "edit"
204
+ })
205
+ ]),
206
+ default: v(() => [
207
+ x("div", ce, [
208
+ s(r) ? T("", !0) : (p(), E(Q, {
209
+ key: 0,
210
+ class: "flex-1",
211
+ json: s(X),
212
+ width: 100,
213
+ height: 100
214
+ }, null, 8, ["json"])),
215
+ U(h(w, {
216
+ label: "Email title",
217
+ modelValue: s(f).title,
218
+ "onUpdate:modelValue": a[0] || (a[0] = (d) => s(f).title = d)
219
+ }, null, 8, ["modelValue"]), [
220
+ [A, s(r)]
221
+ ]),
222
+ U(h(ue, {
223
+ class: "flex-1",
224
+ ref_key: "editorRef",
225
+ ref: y,
226
+ onLoad: a[1] || (a[1] = (d) => r.value = !1),
227
+ onReady: a[2] || (a[2] = () => {
228
+ var d;
229
+ r.value = !0, b.design && ((d = s(y)) == null || d.loadDesign(s(ee)(b.design)));
230
+ })
231
+ }, null, 512), [
232
+ [A, s(r)]
233
+ ])
234
+ ])
235
+ ]),
236
+ "side-sheet-footer": v(() => [
237
+ x("div", me, [
238
+ h(c, {
239
+ variant: "primary",
240
+ label: "Confirm",
241
+ onClick: t
242
+ }),
243
+ h(c, {
244
+ variant: "tertiary",
245
+ label: "Cancel",
246
+ onClick: a[3] || (a[3] = (d) => S(!1))
247
+ })
248
+ ])
249
+ ]),
250
+ _: 1
251
+ }, 8, ["modelValue"]);
252
+ };
253
+ }
254
+ }), he = { class: "space-y-4" }, fe = { class: "flex items-center gap-8 justify-between" }, ge = /* @__PURE__ */ x("div", { class: "fm-typo-en-body-lg-400" }, "Add message", -1), ye = { class: "relative" }, be = { class: "absolute bottom-[24px] right-[4px]" }, je = /* @__PURE__ */ j({
255
+ __name: "MessageInput",
256
+ props: {
257
+ allowEmail: {
258
+ type: Boolean,
259
+ default: !1
260
+ },
261
+ modelValue: {
262
+ type: Object
263
+ },
264
+ triggerType: {
265
+ type: String,
266
+ default: () => "SCHEDULE"
267
+ },
268
+ helperText: {
269
+ type: String
270
+ },
271
+ helperState: {
272
+ type: String
273
+ },
274
+ variables: {
275
+ type: Object,
276
+ default: () => [
277
+ "user.name",
278
+ "user.birthday",
279
+ "user.joinAt",
280
+ "user.expiringVouchers.days7",
281
+ "user.expiringVouchers.days30",
282
+ "user.expiringVouchers.days90",
283
+ "user.tier",
284
+ "user.point",
285
+ "transaction.amount",
286
+ "collectible.name"
287
+ ]
288
+ },
289
+ placeholder: {
290
+ type: String
291
+ }
292
+ },
293
+ emits: ["update:model-value"],
294
+ setup(e, { emit: n }) {
295
+ const i = e, u = n;
296
+ function y() {
297
+ var o;
298
+ const l = {
299
+ user: {
300
+ name: "John Doe",
301
+ tier: 1,
302
+ point: 1283,
303
+ birthday: (/* @__PURE__ */ new Date("2000-10-02T16:00:00.000Z")).toLocaleDateString(),
304
+ joinAt: (/* @__PURE__ */ new Date("2024-06-14")).toLocaleDateString(),
305
+ expiringVouchers: { days7: 3, days30: 5, days90: 5 }
306
+ },
307
+ transaction: {
308
+ amount: 3
309
+ },
310
+ collectible: {
311
+ name: "RM10 Voucher"
312
+ }
313
+ }, t = Y(
314
+ ((o = i.modelValue) == null ? void 0 : o.content) ?? "",
315
+ l
316
+ );
317
+ W.confirm(t, "Preview message", "OK");
318
+ }
319
+ function r(l, t = "SMS") {
320
+ u("update:model-value", {
321
+ channel: t,
322
+ content: t == "SMS" ? l : l.html,
323
+ design: t == "EMAIL" ? l.design : void 0,
324
+ language: "en",
325
+ title: t == "EMAIL" ? l.title : void 0,
326
+ variables: i.variables
327
+ });
328
+ }
329
+ const b = V(i.helperState || "none"), f = q(() => {
330
+ var o;
331
+ const l = ((o = i.modelValue) == null ? void 0 : o.content.replace(/{{([^}]+)}}/g, (a, c) => {
332
+ switch (c) {
333
+ case "user.name":
334
+ return "1234567890";
335
+ case "user.tier":
336
+ return "1";
337
+ case "user.point":
338
+ return "1000";
339
+ case "user.birthday":
340
+ return "01/01/2024";
341
+ case "user.joinAt":
342
+ return "01/01/2024";
343
+ case "user.expiringVouchers.days7":
344
+ case "user.expiringVouchers.days30":
345
+ case "user.expiringVouchers.days90":
346
+ return "5";
347
+ case "transaction.amount":
348
+ return "100";
349
+ case "collectible.name":
350
+ return "Voucher";
351
+ default:
352
+ return "...";
353
+ }
354
+ })) || "";
355
+ let t = 0;
356
+ for (let a = 0; a < l.length; a++) {
357
+ const c = l.charAt(a);
358
+ /[\u4e00-\u9fff\u3040-\u30ff\u3400-\u4dbf]/.test(c) || /[{}\\~\[\]|\^€]/.test(c) ? t += 2 : t += 1;
359
+ }
360
+ return `Character used: ${t} ≈ ${Math.ceil(t / 160)} SMS (Every 160 characters will be sent as 1 SMS)`;
361
+ }), S = [
362
+ { label: "SMS" }
363
+ // { label: 'EMAIL' }
364
+ ];
365
+ return G(() => {
366
+ u("update:model-value", {
367
+ ...i.modelValue,
368
+ variables: i.variables
369
+ }), i.modelValue || r("");
370
+ }), (l, t) => {
371
+ var d, F, $, k, C;
372
+ const o = g("FmButtonGroup"), a = g("FmButton"), c = g("FmTextarea"), w = g("FmMenuItem"), M = g("FmMenu");
373
+ return p(), _("div", he, [
374
+ e.allowEmail ? (p(), E(o, {
375
+ key: 0,
376
+ items: S,
377
+ "model-value": { label: (d = e.modelValue) == null ? void 0 : d.channel },
378
+ "onUpdate:modelValue": t[0] || (t[0] = (m) => r("", m.label))
379
+ }, null, 8, ["model-value"])) : T("", !0),
380
+ ((F = e.modelValue) == null ? void 0 : F.channel) == "EMAIL" ? (p(), E(pe, {
381
+ key: 1,
382
+ design: ($ = e.modelValue) == null ? void 0 : $.design,
383
+ title: ((k = e.modelValue) == null ? void 0 : k.title) || void 0,
384
+ "onUpdate:design": t[1] || (t[1] = (m) => {
385
+ r(m, "EMAIL");
386
+ })
387
+ }, null, 8, ["design", "title"])) : (p(), _(L, { key: 2 }, [
388
+ x("div", fe, [
389
+ ge,
390
+ h(a, {
391
+ icon: "visibility",
392
+ label: "Preview message",
393
+ variant: "plain",
394
+ onClick: y
395
+ })
396
+ ]),
397
+ x("div", ye, [
398
+ h(c, {
399
+ "model-value": (C = e.modelValue) == null ? void 0 : C.content,
400
+ "onUpdate:modelValue": r,
401
+ "show-word-count": !0,
402
+ placeholder: e.placeholder,
403
+ "helper-state": s(b) || "none",
404
+ "helper-text": s(f)
405
+ }, {
406
+ "helper-text": v(() => [
407
+ J(z(s(f)), 1)
408
+ ]),
409
+ _: 1
410
+ }, 8, ["model-value", "placeholder", "helper-state", "helper-text"]),
411
+ x("div", be, [
412
+ h(M, { placement: "left-end" }, {
413
+ "menu-button": v(() => [
414
+ h(a, {
415
+ icon: "add",
416
+ variant: "tertiary",
417
+ size: "md"
418
+ })
419
+ ]),
420
+ default: v(() => [
421
+ (p(!0), _(L, null, K(e.variables.filter(
422
+ (m) => e.triggerType == "SCHEDULE" ? !m.startsWith("transaction.") : !0
423
+ ), (m) => {
424
+ var I;
425
+ return p(), E(w, {
426
+ key: m,
427
+ label: ((I = s(te)[m]) == null ? void 0 : I.name) || m,
428
+ onClick: (ve) => {
429
+ var D;
430
+ return r(((D = e.modelValue) == null ? void 0 : D.content) + `{{${m}}}`);
431
+ }
432
+ }, null, 8, ["label", "onClick"]);
433
+ }), 128))
434
+ ]),
435
+ _: 1
436
+ })
437
+ ])
438
+ ])
439
+ ], 64))
440
+ ]);
441
+ };
442
+ }
443
+ });
444
+ export {
445
+ Me as M,
446
+ je as _
447
+ };
@@ -1,16 +1,16 @@
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-DasBRvHo.js";
4
- import { g as X, a as L, b as B } from "./campaign-BGzVYFng.js";
5
- import { u as Y } from "./business-D6C_7bDy.js";
6
- import { u as Z } from "./campaign-yLK6vWS8.js";
3
+ import { a as G, p as J, u as Q } from "./loading-C-HOw2p9.js";
4
+ import { g as X, a as L, b as B } from "./campaign-WGLWFuCK.js";
5
+ import { u as Y } from "./business-CdvE-WIp.js";
6
+ import { u as Z } from "./campaign-gunNEZhU.js";
7
7
  import { useDialog as ee, components as v } from "@feedmepos/ui-library";
8
8
  import { _ as oe } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
9
- import { u as te } from "./template-Be8bixKI.js";
10
- import { _ as ne } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BTkAiIvO.js";
9
+ import { u as te } from "./template-CvIL9Pex.js";
10
+ import { _ as ne } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CZmd7K3H.js";
11
11
  import { s as ae } from "./index-CuvNtC_M.js";
12
- import { u as se } from "./vue-i18n-DaIhSEbY.js";
13
- import { c as _ } from "./index-MMYQth2d.js";
12
+ import { u as se } from "./vue-i18n-BjInRP6b.js";
13
+ import { c as _ } from "./index-CpsX7fKq.js";
14
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]"