@feedmepos/mf-connect 0.1.38-beta.2 → 0.1.39-prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/Analytic-D8WCDkga.js +427 -0
  2. package/dist/{App-D11A2JY1.js → App-CTnXtg1W.js} +352 -364
  3. package/dist/{Bin-9wV4Ah3M.js → Bin-BY6-bvFj.js} +8 -8
  4. package/dist/{Broadcast-I3BtSk8V.js → Broadcast-5VTEIQAr.js} +40 -40
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-XJqTXbKr.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BuAQxEM4.js} +18 -18
  6. package/dist/{Card-CqALG5RM.js → Card-8ivdV-Qz.js} +159 -159
  7. package/dist/{Collections-rg3SzoUb.js → Collections-CFszRHmE.js} +91 -103
  8. package/dist/{Credit-BNn1sYZv.js → Credit-DFslY__4.js} +74 -74
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-PJ8q72XH.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BvCLYtJ3.js} +488 -489
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Sww7KNle.js → EffectSheet.vue_vue_type_style_index_0_lang-Ci_bp7GH.js} +94 -94
  11. package/dist/{Experience-D_Qm8SUj.js → Experience-BxfiZNlY.js} +41 -41
  12. package/dist/{Game-CKXgXm6Q.js → Game-0FZJcLmj.js} +31 -31
  13. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
  14. package/dist/{Index-D4DGfUHd.js → Index-ByeKKbuM.js} +10 -10
  15. package/dist/Marketing-C7F4abzg.js +319 -0
  16. package/dist/{Member-B55vWHDd.js → Member-DP0fLSIV.js} +64 -64
  17. package/dist/MemberList-DFW2bMbr.js +1606 -0
  18. package/dist/MemberOverview-C2n9oJZh.js +58 -0
  19. package/dist/{MemberTransactions-CP5EI-W0.js → MemberTransactions-CW62fvgx.js} +1 -1
  20. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-iJXNbgsB.js +455 -0
  21. package/dist/{Mission-CFvhROuB.js → Mission-DEgQHJw6.js} +21 -21
  22. package/dist/{Overview-4273yNwL.js → Overview-5jDtZKi8.js} +335 -335
  23. package/dist/{Point-B_-_C919.js → Point-D2lB1-xB.js} +41 -41
  24. package/dist/{Promotion-D2S3COxk.js → Promotion-Diz1gIa0.js} +42 -42
  25. package/dist/{Queue-BmS1Oi-C.js → Queue-DIAuq7HG.js} +51 -51
  26. package/dist/{Record-DRBl0M8g.js → Record-T608yda1.js} +9 -9
  27. package/dist/{Reward-8056NmfK.js → Reward-fZzHrHCW.js} +173 -173
  28. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJ_WC2gV.js → RewardGroup.vue_vue_type_script_setup_true_lang-YOKVfimM.js} +11 -11
  29. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DqNQl_nz.js → RuleGroup.vue_vue_type_script_setup_true_lang-C3_lmBe5.js} +431 -431
  30. package/dist/Segment-DDQIzsrk.js +882 -0
  31. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-4nNkkklE.js → SelectItems.vue_vue_type_script_setup_true_lang-B5oUf91Q.js} +2 -2
  32. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dnf2oxOG.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C2U6Kzvx.js} +11 -11
  33. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLYP-5U9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRmqgxES.js} +3 -3
  34. package/dist/{Setting-BrJfYoru.js → Setting-CQNyXmp4.js} +432 -432
  35. package/dist/{Store-Bpl_4yZW.js → Store-CIA1Rtsg.js} +210 -210
  36. package/dist/StoreRewards-D5zlE6cE.js +423 -0
  37. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BkTYngJ_.js +995 -0
  38. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-QucRaI08.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-D8l3fQyz.js} +1 -1
  39. package/dist/{Tier-_LnXg3n6.js → Tier-jFXVOje_.js} +106 -106
  40. package/dist/{Title-B7AGStvx.js → Title-DVpZ1YMK.js} +131 -133
  41. package/dist/{Transaction-Chxv6V7u.js → Transaction-BF_wmok6.js} +2 -2
  42. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzXNmobp.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cex1Z43W.js} +6 -6
  43. package/dist/{Voucher-C5z2kOq9.js → Voucher-CaBMU5w0.js} +37 -37
  44. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BXt2fLOD.js +419 -0
  45. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js → ZodTextField.vue_vue_type_script_setup_true_lang-CtHjWpUe.js} +1 -1
  46. package/dist/{app-BVojNX0w.js → app-CPhyKlyf.js} +1 -1
  47. package/dist/{app-7cvPyHJ7.js → app-DuIzRGvb.js} +124 -161
  48. package/dist/app.js +3 -4
  49. package/dist/{business-CmxV69wT.js → business-TTvv3aTz.js} +1 -1
  50. package/dist/{campaign-Dq5C_no-.js → campaign-BiMCoAzx.js} +3 -5
  51. package/dist/{campaign-CT_cNJEL.js → campaign-CjEVStN1.js} +9 -9
  52. package/dist/{campaign.enum-dp7yHKzF.js → campaign.enum-DpYmj9jp.js} +1 -1
  53. package/dist/campaign.fn-DJ6J98jS.js +758 -0
  54. package/dist/{collectible.enum-DxbB4DxT.js → collectible.enum-Cgmm_s-C.js} +1 -1
  55. package/dist/{collection.fn-CNZRdUgy.js → collection.fn-BsYCNgfJ.js} +2 -2
  56. package/dist/{dto-CT9zZbv9.js → dto-DgmHIlZ2.js} +4 -4
  57. package/dist/{effect-FIlOEC4H.js → effect-DnAVIDFy.js} +1 -1
  58. package/dist/{email-addresses-Ba7xImfX.js → email-addresses-CMRgb6Uv.js} +1 -1
  59. package/dist/{export-uzjZFNF9.js → export-DtarK6IJ.js} +3 -3
  60. package/dist/{helper-D4sAZde0.js → helper-BKZghMbF.js} +1 -1
  61. package/dist/{index-l2F5MnLF.js → index-2OAcPmuQ.js} +1 -1
  62. package/dist/{index-BI3m1Ehv.js → index-B0YZKHyu.js} +3 -3
  63. package/dist/{index-CH3z92VV.js → index-B5oXFFlO.js} +1 -1
  64. package/dist/{index-CvBcve-r.js → index-BQ3KHJXX.js} +1 -1
  65. package/dist/{index-B9pl4zRZ.js → index-B_893fH7.js} +79 -179
  66. package/dist/{index-CNJLP3D5.js → index-BoR-BOFw.js} +1 -1
  67. package/dist/{index-DNxa8Rqx.js → index-C7rl1eHp.js} +449 -516
  68. package/dist/{index-BXz54M1s.js → index-CBcbwf0k.js} +1 -1
  69. package/dist/{index-CS3Jmojj.js → index-CIztuDE4.js} +2462 -2453
  70. package/dist/{index-D5rvMvzx.js → index-CK67enPK.js} +1 -1
  71. package/dist/index-CuvNtC_M.js +61 -0
  72. package/dist/index-D2uZzjpn.js +44 -0
  73. package/dist/{index-CUfS9Kp1.js → index-DWdAUovq.js} +9 -9
  74. package/dist/{index-CONvJfKv.js → index-DkWcEDHA.js} +1 -1
  75. package/dist/{index-BjU8LVUC.js → index-VHu8hYtE.js} +385 -376
  76. package/dist/{index.esm2017-ATcsD5N4.js → index.esm2017-DkwLmmR_.js} +127 -127
  77. package/dist/{loading-BWGQSrCB.js → loading-BFkEqWR6.js} +1 -1
  78. package/dist/{membership-Cc4OZ8-U.js → membership-D0eN3i_T.js} +3 -3
  79. package/dist/{money-D7p8nfun.js → money-DS9ZQwSP.js} +1 -1
  80. package/dist/{number-CMJjC4qz.js → number-C8Gt93v9.js} +1 -1
  81. package/dist/objectid-Cr99eTPd.js +145 -0
  82. package/dist/{plugins-eQis66QR.js → plugins-DK_ue6Xa.js} +2 -2
  83. package/dist/{reward-DrnzbG20.js → reward-CW2dSLDW.js} +1 -1
  84. package/dist/{rule-CtRxkYXB.js → rule-CebKyXSm.js} +3 -3
  85. package/dist/{rule-builder-Di9RIYHF.js → rule-builder-kQq14RfN.js} +17 -17
  86. package/dist/style.css +1 -1
  87. package/dist/{template-C3UfY0v5.js → template-CxUxlb6-.js} +64 -64
  88. package/dist/{trigger-C9U7Zgad.js → trigger-RqJo06KA.js} +4 -4
  89. package/dist/{usePagination-BeF5K3M7.js → usePagination-JoYaROkV.js} +85 -85
  90. package/dist/{user-D7n9yYmO.js → user-DhV5Iy52.js} +1 -1
  91. package/dist/{vue-i18n-Bz45zC04.js → vue-i18n-BtvUK9hI.js} +419 -419
  92. package/dist/{xlsx-D4S4qbcZ.js → xlsx-WnLDq4qn.js} +381 -381
  93. package/package.json +3 -9
  94. package/dist/Analytic-BjSfI2Ff.js +0 -761
  95. package/dist/AuditLogs-DWCFYoRg.js +0 -1887
  96. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +0 -58
  97. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
  98. package/dist/Marketing-Dn9A1vgH.js +0 -20073
  99. package/dist/MemberList-BWTG9Ohy.js +0 -1606
  100. package/dist/MemberOverview-wL_ailso.js +0 -58
  101. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D--_An-f.js +0 -60279
  102. package/dist/Segment-Bzq-pyhc.js +0 -882
  103. package/dist/StoreRewards-Cu7n7Pjz.js +0 -423
  104. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-T3Wo2maC.js +0 -1029
  105. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DdGMrk2C.js +0 -419
  106. package/dist/campaign.fn-BYZgKDN7.js +0 -758
  107. package/dist/index-CsaQJMAR.js +0 -66
  108. package/dist/index-CwsMG2cV.js +0 -56
  109. package/dist/objectid-D5T27iny.js +0 -145
  110. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
@@ -1,20 +1,23 @@
1
1
  import { defineComponent as N, ref as v, computed as q, onMounted as z, resolveComponent as r, openBlock as p, createElementBlock as C, Fragment as b, createVNode as s, unref as o, withCtx as h, createElementVNode as n, toDisplayString as c, renderList as J, createBlock as k, resolveDynamicComponent as O, h as l } from "vue";
2
2
  import { _ as Q } from "./campaign-CpzFl8Vr.js";
3
3
  import { useDialog as W, components as w } from "@feedmepos/ui-library";
4
- import { a as X, p as Y } from "./plugins-eQis66QR.js";
5
- import { u as Z } from "./loading-BWGQSrCB.js";
6
- import { u as ee } from "./business-CmxV69wT.js";
7
- import { u as te } from "./campaign-Dq5C_no-.js";
8
- import { a as $, b as A, g as oe } from "./campaign-CT_cNJEL.js";
4
+ import { a as X, p as Y } from "./plugins-DK_ue6Xa.js";
5
+ import { u as Z } from "./loading-BFkEqWR6.js";
6
+ import { u as ee } from "./business-TTvv3aTz.js";
7
+ import { u as te } from "./campaign-BiMCoAzx.js";
8
+ import { a as $, b as A, g as oe } from "./campaign-CjEVStN1.js";
9
9
  import { _ as ae } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
10
- import { _ as ne } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-PJ8q72XH.js";
11
- import { u as se } from "./template-C3UfY0v5.js";
12
- import { u as ie } from "./vue-i18n-Bz45zC04.js";
13
- import { _ as re } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dnf2oxOG.js";
14
- import { c as x } from "./index-D5rvMvzx.js";
15
- const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, me = { class: "px-24 flex flex-col gap-y-16" }, de = { class: "flex items-center justify-between w-full" }, pe = { class: "flex gap-8 overflow-x-auto" }, ue = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "space-y-4" }, _e = { class: "fm-typo-en-body-lg-600" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xe = { class: "flex flex-col gap-16 text-center" }, ve = { class: "fm-typo-en-title-sm-800" }, Ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ie = /* @__PURE__ */ N({
10
+ import { _ as ne } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-BvCLYtJ3.js";
11
+ import { u as se } from "./template-CxUxlb6-.js";
12
+ import { u as ie } from "./vue-i18n-BtvUK9hI.js";
13
+ import { _ as re } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-C2U6Kzvx.js";
14
+ import { c as x } from "./index-CK67enPK.js";
15
+ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, me = { class: "px-24 flex flex-col gap-y-16" }, de = { class: "flex items-center justify-between w-full" }, pe = { class: "flex gap-8 overflow-x-auto" }, ue = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _e = { class: "space-y-4" }, ye = { class: "fm-typo-en-body-lg-600" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xe = /* @__PURE__ */ n("img", {
16
+ src: Q,
17
+ class: "aspect-square w-[150px]"
18
+ }, null, -1), ve = { class: "flex flex-col gap-16 text-center" }, Ce = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Te = /* @__PURE__ */ N({
16
19
  __name: "Game",
17
- setup(be) {
20
+ setup(ke) {
18
21
  const { t: m } = ie(), E = {
19
22
  label: m("connect.program.common.actions.create", {
20
23
  type: m("connect.program.game.title").toLowerCase()
@@ -112,13 +115,13 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
112
115
  }
113
116
  );
114
117
  }
115
- async function y(e) {
118
+ async function _(e) {
116
119
  e ? await t() : K.open(async (u) => {
117
120
  await t(u);
118
121
  });
119
122
  async function t(u) {
120
- var _;
121
- (_ = S.value) == null || _.showSheet(
123
+ var y;
124
+ (y = S.value) == null || y.showSheet(
122
125
  !0,
123
126
  "GAME",
124
127
  e ? await x.readById(e._id) : void 0,
@@ -148,11 +151,11 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
148
151
  await d.read("GAME"), await f.readPremium();
149
152
  });
150
153
  }), (e, t) => {
151
- const u = r("FmPill"), _ = r("FmPageHead"), V = r("FmSearch"), U = r("FmTable"), B = r("FmButton"), j = r("FmListItem"), D = r("FmList"), H = r("FmCard");
154
+ const u = r("FmPill"), y = r("FmPageHead"), V = r("FmSearch"), U = r("FmTable"), B = r("FmButton"), j = r("FmListItem"), D = r("FmList"), H = r("FmCard");
152
155
  return p(), C(b, null, [
153
- s(_, {
156
+ s(y, {
154
157
  actions: o(g).length > 0 && o(f).isPremium ? [E] : [],
155
- "onClick:action": t[0] || (t[0] = () => y())
158
+ "onClick:action": t[0] || (t[0] = () => _())
156
159
  }, {
157
160
  title: h(() => [
158
161
  n("div", le, [
@@ -197,7 +200,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
197
200
  "column-defs": G,
198
201
  "search-value": o(i).searchKey,
199
202
  "column-filter": [],
200
- onRowClick: t[4] || (t[4] = (a) => y(a.original)),
203
+ onRowClick: t[4] || (t[4] = (a) => _(a.original)),
201
204
  "hide-footer": o(g).length < 10
202
205
  }, null, 8, ["row-data", "search-value", "hide-footer"]),
203
206
  s(D, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
@@ -206,7 +209,7 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
206
209
  (a) => a.name.toLowerCase().includes(o(i).searchKey.toLowerCase())
207
210
  ), (a) => (p(), k(j, {
208
211
  key: a._id.toString(),
209
- onClick: (R) => y(a),
212
+ onClick: (R) => _(a),
210
213
  class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
211
214
  }, {
212
215
  default: h(() => [
@@ -215,8 +218,8 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
215
218
  (p(), k(O(o($)(a)))),
216
219
  n("div", ge, c(a.currentReceive ?? 0) + " used ", 1)
217
220
  ]),
218
- n("div", ye, [
219
- n("div", _e, c(a.name), 1),
221
+ n("div", _e, [
222
+ n("div", ye, c(a.name), 1),
220
223
  n("div", he, c(o(A)(a)), 1)
221
224
  ]),
222
225
  n("div", we, c(o(m)("connect.program.game.token_received", {
@@ -241,20 +244,17 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
241
244
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
242
245
  }, {
243
246
  default: h(() => [
244
- t[6] || (t[6] = n("img", {
245
- src: Q,
246
- class: "aspect-square w-[150px]"
247
- }, null, -1)),
248
- n("div", xe, [
249
- n("div", ve, c(o(m)("connect.program.game.empty_state.title")), 1),
250
- n("div", Ce, c(o(m)("connect.program.game.empty_state.description")), 1)
247
+ xe,
248
+ n("div", ve, [
249
+ n("div", Ce, c(o(m)("connect.program.game.empty_state.title")), 1),
250
+ n("div", be, c(o(m)("connect.program.game.empty_state.description")), 1)
251
251
  ]),
252
252
  s(B, {
253
253
  variant: "primary",
254
254
  label: "Create game program",
255
255
  icon: "add",
256
256
  disabled: !o(f).isPremium,
257
- onClick: t[5] || (t[5] = (a) => y())
257
+ onClick: t[5] || (t[5] = (a) => _())
258
258
  }, null, 8, ["disabled"])
259
259
  ]),
260
260
  _: 1
@@ -274,5 +274,5 @@ const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-60
274
274
  }
275
275
  });
276
276
  export {
277
- Ie as default
277
+ Te as default
278
278
  };
@@ -0,0 +1,144 @@
1
+ import { openBlock as l, createElementBlock as o, createElementVNode as n, defineComponent as $, ref as h, onMounted as j, resolveComponent as m, renderSlot as v, toDisplayString as i, createCommentVNode as b, normalizeStyle as C, unref as s, Fragment as x, createVNode as w, withCtx as f, createTextVNode as g, normalizeClass as R, createBlock as F } from "vue";
2
+ import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const z = {}, H = { class: "animate-pulse flex space-x-4 bg-gray-300 dark:bg-gray-700 items-center justify-center rounded w-full h-full" }, N = /* @__PURE__ */ n("svg", {
4
+ class: "dark:text-gray-600 h-10 text-gray-200 w-10",
5
+ "aria-hidden": "true",
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ fill: "currentColor",
8
+ viewBox: "0 0 20 18"
9
+ }, [
10
+ /* @__PURE__ */ n("path", { d: "M18 0H2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2Zm-5.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm4.376 10.481A1 1 0 0 1 16 15H4a1 1 0 0 1-.895-1.447l3.5-7A1 1 0 0 1 7.468 6a.965.965 0 0 1 .9.5l2.775 4.757 1.546-1.887a1 1 0 0 1 1.618.1l2.541 4a1 1 0 0 1 .028 1.011Z" })
11
+ ], -1), A = [
12
+ N
13
+ ];
14
+ function D(e, p) {
15
+ return l(), o("div", H, A);
16
+ }
17
+ const I = /* @__PURE__ */ V(z, [["render", D]]), L = { class: "max-w-full max-h-[400px] space-y-4" }, T = { key: 0 }, U = { class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400" }, Z = {
18
+ key: 1,
19
+ class: "h-full w-full relative bg-fm-color-neutral-white p-12 border-2 border-dashed border-fm-color-neutral-gray-300 rounded-md flex flex-col items-center justify-center gap-8 hover:border-fm-color-neutral-gray-400"
20
+ }, E = ["src"], M = ["src"], q = { class: "absolute right-0 top-0" }, G = /* @__PURE__ */ $({
21
+ __name: "ImageInput",
22
+ props: {
23
+ required: {
24
+ type: Boolean,
25
+ default: () => !1
26
+ },
27
+ disabled: {
28
+ type: Boolean,
29
+ default: () => !1
30
+ },
31
+ thumbnail: {
32
+ type: String,
33
+ default: () => {
34
+ }
35
+ },
36
+ file: {
37
+ type: File,
38
+ default: () => {
39
+ }
40
+ },
41
+ label: {
42
+ type: String,
43
+ default: () => {
44
+ }
45
+ },
46
+ aspectRatio: {
47
+ type: String,
48
+ default: "2/3"
49
+ },
50
+ imageFit: {
51
+ type: String,
52
+ default: "contain"
53
+ },
54
+ accept: {
55
+ type: String,
56
+ default: ".png, .jpg, .jpeg, .webm"
57
+ },
58
+ recommendedSize: {
59
+ type: String,
60
+ default: "Recommended: 950px x 600px"
61
+ },
62
+ deleteButton: {
63
+ type: Boolean,
64
+ default: !0
65
+ }
66
+ },
67
+ emits: ["update:file"],
68
+ setup(e, { emit: p }) {
69
+ const r = e, a = h({
70
+ loading: !1,
71
+ imgsrc: r.thumbnail
72
+ }), u = h(!1), y = p;
73
+ async function d(t) {
74
+ return t == null ? (a.value.imgsrc = void 0, y("update:file", null)) : (u.value = !!t.type.startsWith("video/"), a.value.loading = !0, a.value.imgsrc = URL.createObjectURL(t), a.value.loading = !1, y("update:file", t));
75
+ }
76
+ return j(() => {
77
+ var t;
78
+ r.file && d(r.file), (t = r.thumbnail) != null && t.includes("mp4") && (u.value = !0);
79
+ }), (t, c) => {
80
+ const k = m("FmDropField"), S = m("FmHelperText"), _ = m("FmButton");
81
+ return l(), o("div", L, [
82
+ v(t.$slots, "label", {}, () => [
83
+ e.label ? (l(), o("div", T, i(e.label), 1)) : b("", !0)
84
+ ]),
85
+ n("div", {
86
+ style: C({ "aspect-ratio": e.aspectRatio }),
87
+ class: "flex flex-col max-h-full max-w-full"
88
+ }, [
89
+ s(a).loading ? (l(), F(I, { key: 1 })) : (l(), o(x, { key: 0 }, [
90
+ s(a).imgsrc ? (l(), o("div", Z, [
91
+ s(u) ? (l(), o("video", {
92
+ key: 1,
93
+ src: s(a).imgsrc || e.thumbnail,
94
+ class: "w-full h-full",
95
+ controls: ""
96
+ }, null, 8, M)) : (l(), o("img", {
97
+ key: 0,
98
+ class: R([`object-${e.imageFit}`, "w-full h-full"]),
99
+ src: s(a).imgsrc || e.thumbnail
100
+ }, null, 10, E)),
101
+ n("div", q, [
102
+ v(t.$slots, "delete-button"),
103
+ e.deleteButton ? (l(), F(_, {
104
+ key: 0,
105
+ class: "!text-neutral-50 !bg-neutral-700",
106
+ icon: "delete",
107
+ variant: "tertiary",
108
+ disabled: e.disabled,
109
+ onClick: c[1] || (c[1] = (B) => d(null))
110
+ }, null, 8, ["disabled"])) : b("", !0)
111
+ ])
112
+ ])) : (l(), o(x, { key: 0 }, [
113
+ w(k, {
114
+ class: "flex-1 hihiha",
115
+ accept: e.accept,
116
+ disabled: e.disabled,
117
+ onFileUpload: d,
118
+ onFileRejected: c[0] || (c[0] = (B) => d(null))
119
+ }, {
120
+ label: f(() => [
121
+ g(i(void 0))
122
+ ]),
123
+ "helper-text": f(() => [
124
+ g(i(void 0))
125
+ ]),
126
+ "accept-text": f(() => [
127
+ n("div", U, [
128
+ n("div", null, "(" + i(e.recommendedSize) + ")", 1),
129
+ g(" Accepts " + i(e.accept), 1)
130
+ ])
131
+ ]),
132
+ _: 1
133
+ }, 8, ["accept", "disabled"]),
134
+ w(S, { text: "" })
135
+ ], 64))
136
+ ], 64))
137
+ ], 4)
138
+ ]);
139
+ };
140
+ }
141
+ });
142
+ export {
143
+ G as _
144
+ };
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as U, ref as g, watch as O, onMounted as I, resolveComponent as m, openBlock as b, createBlock as j, withCtx as P, createTextVNode as z, toDisplayString as $, createElementVNode as c, createVNode as o, unref as e, createElementBlock as F, createCommentVNode as W, normalizeClass as G, computed as L, Fragment as q, isRef as J } from "vue";
2
- import { u as H } from "./vue-i18n-Bz45zC04.js";
3
- import "./index-CNJLP3D5.js";
2
+ import { u as H } from "./vue-i18n-BtvUK9hI.js";
3
+ import "./index-BoR-BOFw.js";
4
4
  import { useRouter as K } from "vue-router";
5
- import { u as Q } from "./loading-BWGQSrCB.js";
6
- import { f as V, p as X } from "./plugins-eQis66QR.js";
7
- import { u as Y, _ as Z } from "./RewardGroup.vue_vue_type_script_setup_true_lang-CJ_WC2gV.js";
5
+ import { u as Q } from "./loading-BFkEqWR6.js";
6
+ import { f as V, p as X } from "./plugins-DK_ue6Xa.js";
7
+ import { u as Y, _ as Z } from "./RewardGroup.vue_vue_type_script_setup_true_lang-YOKVfimM.js";
8
8
  import { useDialog as ee, useSnackbar as ne, FmButtonVariant as p } from "@feedmepos/ui-library";
9
- import { r as N } from "./index-BXz54M1s.js";
10
- import { u as ae } from "./reward-DrnzbG20.js";
11
- import { u as oe } from "./business-CmxV69wT.js";
12
- import { u as te } from "./membership-Cc4OZ8-U.js";
13
- import { R as S } from "./app-7cvPyHJ7.js";
9
+ import { r as N } from "./index-CBcbwf0k.js";
10
+ import { u as ae } from "./reward-CW2dSLDW.js";
11
+ import { u as oe } from "./business-TTvv3aTz.js";
12
+ import { u as te } from "./membership-D0eN3i_T.js";
13
+ import { R as S } from "./app-DuIzRGvb.js";
14
14
  const re = { class: "space-y-24" }, le = {
15
15
  key: 0,
16
16
  class: /* @__PURE__ */ G([
@@ -0,0 +1,319 @@
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
+ import { _ as q } from "./campaign-CpzFl8Vr.js";
3
+ import { components as G } from "@feedmepos/ui-library";
4
+ import { p as X } from "./plugins-DK_ue6Xa.js";
5
+ import { u as Q } from "./loading-BFkEqWR6.js";
6
+ import { defineStore as W } from "pinia";
7
+ import { F as C } from "./index-DkWcEDHA.js";
8
+ import { useCoreStore as Z } from "@feedmepos/mf-common";
9
+ import { g as h, S as ee, b as te } from "./index-VHu8hYtE.js";
10
+ import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
+ import { u as ae } from "./campaign-BiMCoAzx.js";
12
+ import { h as oe } from "./moment-BWErdI6_.js";
13
+ import { u as re } from "./vue-i18n-BtvUK9hI.js";
14
+ 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" };
15
+ const y = () => {
16
+ const o = ee.getBusinessId();
17
+ if (!o) throw new Error("Invalid business ID");
18
+ return te(`businesses/${o}/marketing-materials/`, {
19
+ url: se.backendUrl,
20
+ noIdRequired: !0
21
+ });
22
+ }, L = {
23
+ async read() {
24
+ return h(await y().get(""));
25
+ },
26
+ async createMarketing(o) {
27
+ return h(await y().post("", o));
28
+ },
29
+ // add id
30
+ async updateMarketing(o, t) {
31
+ return h(
32
+ await y().put(o, t)
33
+ );
34
+ },
35
+ async deleteMarketing(o) {
36
+ return h(await y().delete(o));
37
+ }
38
+ }, I = W("mf-connect-marketing", {
39
+ state: () => {
40
+ var o, t;
41
+ return {
42
+ marketing: [],
43
+ defaultMarketing: {
44
+ _id: void 0,
45
+ business: ((t = (o = Z().currentBusiness) == null ? void 0 : o.value) == null ? void 0 : t._id) ?? "",
46
+ name: "",
47
+ campaign: null,
48
+ keywords: "",
49
+ image: "",
50
+ headline: {
51
+ content: "",
52
+ key: void 0
53
+ },
54
+ assets: [
55
+ {
56
+ platform: C.enum.FACEBOOK,
57
+ contents: [
58
+ {
59
+ type: "POST",
60
+ size: {
61
+ width: 1920,
62
+ height: 1080
63
+ },
64
+ images: []
65
+ },
66
+ {
67
+ type: "STORY",
68
+ size: {
69
+ width: 1080,
70
+ height: 1920
71
+ },
72
+ images: []
73
+ }
74
+ ]
75
+ },
76
+ {
77
+ platform: C.enum.INSTAGRAM,
78
+ contents: [
79
+ {
80
+ type: "POST",
81
+ size: {
82
+ width: 1080,
83
+ height: 1080
84
+ },
85
+ images: []
86
+ },
87
+ {
88
+ type: "STORY",
89
+ size: {
90
+ width: 1080,
91
+ height: 1920
92
+ },
93
+ images: []
94
+ },
95
+ {
96
+ type: "REEL",
97
+ size: {
98
+ width: 1080,
99
+ height: 1920
100
+ },
101
+ images: []
102
+ }
103
+ ]
104
+ },
105
+ {
106
+ platform: C.enum.BRAND_APP,
107
+ contents: [
108
+ {
109
+ type: "IMAGE",
110
+ size: {
111
+ width: 1080,
112
+ height: 1920
113
+ },
114
+ images: []
115
+ }
116
+ ]
117
+ }
118
+ ],
119
+ captions: [{ language: "en", content: "" }]
120
+ }
121
+ };
122
+ },
123
+ actions: {
124
+ async readMarketingMaterial() {
125
+ const o = await L.read();
126
+ this.marketing = o;
127
+ }
128
+ },
129
+ getters: {
130
+ state(o) {
131
+ return o;
132
+ }
133
+ }
134
+ }), ie = {};
135
+ function le(o, t) {
136
+ return m(), p("div");
137
+ }
138
+ const ce = /* @__PURE__ */ ne(ie, [["render", le]]), me = { class: "px-24 flex flex-col gap-y-16" }, de = { class: "flex items-center justify-between w-full" }, pe = { class: "space-y-8" }, ue = { class: "fm-typo-en-body-lg-600" }, ge = { class: "fm-typo-en-body-lg-600" }, fe = { key: 0 }, he = /* @__PURE__ */ s("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1), ye = [
139
+ he
140
+ ], ke = /* @__PURE__ */ s("img", {
141
+ src: q,
142
+ class: "w-[150px]"
143
+ }, null, -1), _e = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary w-4/6 text-center" }, Le = /* @__PURE__ */ z({
144
+ __name: "Marketing",
145
+ setup(o) {
146
+ const { t } = re(), O = {
147
+ label: t("connect.marketing.create"),
148
+ value: "create",
149
+ isPrimary: !0,
150
+ prependIcon: "add"
151
+ }, k = S(!1), _ = I(), b = ae(), { global: N, minor: U } = Q;
152
+ Y(async () => {
153
+ await N(async () => {
154
+ await b.read(), await _.readMarketingMaterial();
155
+ });
156
+ });
157
+ const d = H(() => _.marketing.filter(
158
+ (n) => n.name.includes(l.value.searchKey.toLowerCase())
159
+ )), u = S(
160
+ I().defaultMarketing
161
+ ), D = [
162
+ {
163
+ header: t("connect.marketing.table.name"),
164
+ accessorFn: (n) => n.name
165
+ },
166
+ {
167
+ header: t("connect.marketing.table.campaign"),
168
+ accessorFn: (n) => {
169
+ var e;
170
+ return n.campaign === null || n.campaign === void 0 ? "-" : (e = b.campaigns.all.find(
171
+ (v) => v._id === n.campaign
172
+ )) == null ? void 0 : e.name;
173
+ }
174
+ },
175
+ {
176
+ header: t("connect.marketing.table.createdDate"),
177
+ accessorFn: (n) => {
178
+ const e = new Date(
179
+ parseInt(n._id.toString().substring(0, 8), 16) * 1e3
180
+ );
181
+ return oe(e).format("DD MMM YYYY");
182
+ }
183
+ },
184
+ {
185
+ header: t("connect.marketing.table.actions"),
186
+ cell(n) {
187
+ return J(G.FmButton, {
188
+ variant: "tertiary",
189
+ icon: "delete",
190
+ iconColor: "neutral-gray-400",
191
+ onClick: (e) => {
192
+ e.stopPropagation(), P(n.row.original);
193
+ }
194
+ });
195
+ }
196
+ }
197
+ ];
198
+ async function P(n) {
199
+ await X.remove(
200
+ t("connect.marketing.delete.confirm", { name: n.name })
201
+ ) && await U(
202
+ async () => {
203
+ await L.deleteMarketing(n._id), await _.readMarketingMaterial();
204
+ },
205
+ {
206
+ message: t("connect.marketing.delete.removing", { name: n.name }),
207
+ successMessage: t("connect.marketing.delete.success", {
208
+ name: n.name
209
+ })
210
+ }
211
+ );
212
+ }
213
+ async function g(n) {
214
+ n ? u.value = JSON.parse(JSON.stringify(n)) : u.value = JSON.parse(
215
+ JSON.stringify(I().defaultMarketing)
216
+ ), k.value = !0;
217
+ }
218
+ const l = S({
219
+ searchKey: ""
220
+ });
221
+ return (n, e) => {
222
+ const v = c("FmPageHead"), V = c("FmSearch"), E = c("FmTable"), T = c("FmButton"), K = c("FmListItem"), A = c("FmList"), R = c("FmCard");
223
+ return m(), p(x, null, [
224
+ i(v, {
225
+ title: r(t)("connect.marketing.title"),
226
+ class: "xs:hidden",
227
+ actions: r(d).length > 0 ? [O] : [],
228
+ "onClick:action": e[0] || (e[0] = () => g())
229
+ }, null, 8, ["title", "actions"]),
230
+ s("div", me, [
231
+ i(V, {
232
+ modelValue: l.value.searchKey,
233
+ "onUpdate:modelValue": e[1] || (e[1] = (a) => l.value.searchKey = a),
234
+ placeholder: r(t)("connect.marketing.search"),
235
+ class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
236
+ collapsible: ""
237
+ }, null, 8, ["modelValue", "placeholder"]),
238
+ i(ce, {
239
+ modelValue: u.value,
240
+ "onUpdate:modelValue": e[2] || (e[2] = (a) => u.value = a),
241
+ "is-open": k.value,
242
+ "onUpdate:isOpen": e[3] || (e[3] = (a) => k.value = a)
243
+ }, null, 8, ["modelValue", "is-open"]),
244
+ r(d).length > 0 ? (m(), p(x, { key: 0 }, [
245
+ s("div", de, [
246
+ i(V, {
247
+ modelValue: l.value.searchKey,
248
+ "onUpdate:modelValue": e[4] || (e[4] = (a) => l.value.searchKey = a),
249
+ class: "xs:hidden",
250
+ placeholder: r(t)("connect.marketing.search"),
251
+ collapsible: ""
252
+ }, null, 8, ["modelValue", "placeholder"])
253
+ ]),
254
+ i(E, {
255
+ class: "xs:hidden",
256
+ "row-data": r(d),
257
+ "column-defs": D,
258
+ "search-value": l.value.searchKey,
259
+ "column-filter": [],
260
+ onRowClick: e[5] || (e[5] = (a) => g(a.original)),
261
+ "hide-footer": !0
262
+ }, null, 8, ["row-data", "search-value"]),
263
+ i(A, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
264
+ default: F(() => [
265
+ (m(!0), p(x, null, $(r(d).filter(
266
+ (a) => a.name.toLowerCase().includes(l.value.searchKey.toLowerCase())
267
+ ), (a) => (m(), B(K, {
268
+ key: a._id.toString(),
269
+ onClick: (w) => g(a),
270
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
271
+ }, {
272
+ default: F(() => {
273
+ var w;
274
+ return [
275
+ s("div", pe, [
276
+ s("div", ue, f(a.name), 1),
277
+ s("div", ge, f(a.campaign === null || a.campaign === void 0 ? "-" : (w = r(b).campaigns.all.find(
278
+ (M) => M._id === a.campaign
279
+ )) == null ? void 0 : w.name), 1)
280
+ ]),
281
+ i(T, {
282
+ icon: "delete",
283
+ "icon-color": "neutral-gray-400",
284
+ variant: "tertiary",
285
+ onClick: (M) => (M.stopPropagation(), P(a))
286
+ }, null, 8, ["onClick"])
287
+ ];
288
+ }),
289
+ _: 2
290
+ }, 1032, ["onClick"]))), 128))
291
+ ]),
292
+ _: 1
293
+ }),
294
+ r(d).length == 0 ? (m(), p("div", fe, ye)) : j("", !0)
295
+ ], 64)) : (m(), B(R, {
296
+ key: 1,
297
+ variant: "outlined",
298
+ class: "w-full justify-center items-center flex flex-col p-[24px] gap-[24px]"
299
+ }, {
300
+ default: F(() => [
301
+ ke,
302
+ s("p", _e, f(r(t)("connect.marketing.emptyState.title")), 1),
303
+ s("p", be, f(r(t)("connect.marketing.emptyState.description")), 1),
304
+ i(T, {
305
+ label: r(t)("connect.marketing.emptyState.action"),
306
+ "prepend-icon": "add",
307
+ onClick: e[6] || (e[6] = (a) => g())
308
+ }, null, 8, ["label"])
309
+ ]),
310
+ _: 1
311
+ }))
312
+ ])
313
+ ], 64);
314
+ };
315
+ }
316
+ });
317
+ export {
318
+ Le as default
319
+ };