@feedmepos/mf-connect 0.1.38-beta.8 → 0.1.38-beta.80

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 (159) hide show
  1. package/dist/{Analytic-CJap-Cat.js → Analytic-LOK5TzX0.js} +31 -32
  2. package/dist/{App-CLTtX1QT.js → App-Bk5Z5u5_.js} +617 -607
  3. package/dist/AuditLogs-Rezf9EeA.js +1991 -0
  4. package/dist/{Bin-C2xMLxoE.js → Bin-B8yzS5bD.js} +10 -10
  5. package/dist/Broadcast-CZ0QCvua.js +266 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCkD7Xfn.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-iJQS2Ck9.js} +6 -6
  7. package/dist/{Card-BPrCNLQy.js → Card-BQOv5yB9.js} +145 -140
  8. package/dist/Collections-qenPlCd2.js +540 -0
  9. package/dist/Credit-BJLskbVu.js +260 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/DateInput.vue_vue_type_script_setup_true_lang-BN4Q5Y3l.js +54 -0
  12. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
  13. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DKWCWOU_.js +3120 -0
  14. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-Dw1qQfnG.js +351 -0
  15. package/dist/Experience-BjfEiGT8.js +259 -0
  16. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-C013Tr1o.js} +1 -1
  17. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  18. package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
  19. package/dist/Game-Gw_tFjen.js +330 -0
  20. package/dist/Grab-Bdv7SaB9.js +300 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-Ba4L39GL.js} +49 -48
  22. package/dist/{Index-DMdNgISh.js → Index-C67U3YDJ.js} +54 -54
  23. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-pQ8sF5KW.js +48 -0
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-o-eN3J4i.js} +1 -1
  25. package/dist/{MainLayout-B1aJoR95.js → MainLayout-DPjqCyJ5.js} +1 -1
  26. package/dist/Marketing-DtEooXof.js +166 -0
  27. package/dist/MarketingMaterialEdit-Balw055Y.js +1065 -0
  28. package/dist/{Member-CnSXGQi_.js → Member-QA7TQnyw.js} +38 -37
  29. package/dist/{MemberList-DcpEKV1D.js → MemberList-CSJQFYlh.js} +486 -491
  30. package/dist/{MemberTransactions-DeuuEcO5.js → MemberTransactions-D-46vda_.js} +1 -1
  31. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DLAEPNsq.js → MessageInput.vue_vue_type_script_setup_true_lang-6a7_lw74.js} +13443 -10607
  32. package/dist/Mission-DJVxFbX5.js +334 -0
  33. package/dist/{Overview-elpi-jpI.js → Overview-Btkh3oiI.js} +24 -25
  34. package/dist/Point-CVdF9GtN.js +262 -0
  35. package/dist/Promotion-BtmlvUd3.js +396 -0
  36. package/dist/{Queue-GvBhNEFe.js → Queue-BfiCMsLC.js} +23 -24
  37. package/dist/{Record-CbSxgo8i.js → Record-B07QGPli.js} +10 -10
  38. package/dist/Review-BeZ90jW9.js +621 -0
  39. package/dist/ReviewFacebookCallback-CwAcKaib.js +243 -0
  40. package/dist/ReviewGoogleCallback-CVK6Yc5E.js +213 -0
  41. package/dist/{Reward-QCGlrq89.js → Reward-CyXqNpAa.js} +16 -16
  42. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DSRvoo9z.js → RewardGroup.vue_vue_type_script_setup_true_lang-BICsdgSh.js} +13 -14
  43. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BgKGNK7y.js +1912 -0
  44. package/dist/{Segment-5PndnEUa.js → Segment-B9g57O7g.js} +273 -274
  45. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DXR7bpzY.js → SelectItems.vue_vue_type_script_setup_true_lang-BwDOXE87.js} +23 -23
  46. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DmITlNtt.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DXDcJLYF.js} +12 -12
  47. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CROBk6cD.js +226 -0
  48. package/dist/Setting-BHteqZv6.js +2039 -0
  49. package/dist/SettingAdvertisements-CubrbuSL.js +264 -0
  50. package/dist/Store-u6LYUnmp.js +1996 -0
  51. package/dist/StoreRewards-D9h0YnEx.js +535 -0
  52. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-vrYqDGOa.js +1129 -0
  53. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-WgNstmNx.js +7007 -0
  54. package/dist/{Tier-BKKxG29r.js → Tier-CBdi4sPT.js} +561 -480
  55. package/dist/{Title-CReZgw8V.js → Title-BegmN7hs.js} +151 -149
  56. package/dist/{Transaction-HWCmSVaJ.js → Transaction-C6XMd9_r.js} +2 -2
  57. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-D00AchXo.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BBf4BP4m.js} +7 -7
  58. package/dist/Voucher-D6hSas_z.js +421 -0
  59. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-ZOlAZ_q5.js +421 -0
  60. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXF39yC1.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bs8TNiCY.js} +2 -2
  61. package/dist/app-Duwed9mD.js +59309 -0
  62. package/dist/app.js +1 -1
  63. package/dist/{business-Bc-EMd2p.js → business-6oZ8Rgui.js} +11 -8
  64. package/dist/campaign-CzenWLhs.js +219 -0
  65. package/dist/campaign-PYce7g0o.js +253 -0
  66. package/dist/campaign.enum-KHniCp5a.js +26 -0
  67. package/dist/campaign.fn-dOSgHJcU.js +776 -0
  68. package/dist/{collectible.enum-C4dM8khp.js → collectible.enum-BZA1DKIB.js} +1 -1
  69. package/dist/{collection.fn-AjDNdFe1.js → collection.fn-CyfrdKBf.js} +2 -2
  70. package/dist/dto-DYmM2ud_.js +222 -0
  71. package/dist/duplicateCampaign-BXaDK8Q6.js +51 -0
  72. package/dist/effect-DBI_JHbP.js +89 -0
  73. package/dist/{email-addresses-B0SzUCQM.js → email-addresses-BNs-WN79.js} +2 -2
  74. package/dist/{export-Bgz6WcNZ.js → export-DTCCKE2m.js} +4 -4
  75. package/dist/{helper-B1vFwohM.js → helper-CeYr7Anh.js} +22 -7
  76. package/dist/index-38u-cCwD.js +3431 -0
  77. package/dist/{index-Cm2sBagk.js → index-BdjY7GRO.js} +1 -1
  78. package/dist/index-CGMiuxyf.js +85 -0
  79. package/dist/index-CQZbm9P5.js +8912 -0
  80. package/dist/index-Cal60fAm.js +48 -0
  81. package/dist/{index-DT2viYsL.js → index-CnRLkzpg.js} +617 -191
  82. package/dist/index-CuvNtC_M.js +61 -0
  83. package/dist/{index-CSQY21Zb.js → index-D-kPBF9C.js} +3 -3
  84. package/dist/{index-DVQnrex_.js → index-DcFYm1fy.js} +3 -3
  85. package/dist/index-DjONNxbl.js +30289 -0
  86. package/dist/{index-26SopNpv.js → index-ItaoypTr.js} +1 -1
  87. package/dist/index-_jxXI4_v.js +28899 -0
  88. package/dist/{index-DwT9RLst.js → index-nXfjG8UQ.js} +23 -12
  89. package/dist/{index-BIRmS75g.js → index-pHQfP2e7.js} +1 -1
  90. package/dist/{index.esm2017-BAIN70_n.js → index.esm2017-CokFPnqn.js} +185 -185
  91. package/dist/{loading-C6Ouh0mG.js → loading-fZQi5zP8.js} +1 -1
  92. package/dist/{lodash-B5I3zXaY.js → lodash-R-DIRmbj.js} +1 -1
  93. package/dist/{membership-DU0BwIj8.js → membership-CApN5ZJ1.js} +3 -3
  94. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  95. package/dist/{money-Bg7GuE5s.js → money-C6I6vVy2.js} +1 -1
  96. package/dist/{number-Ddmqo5D_.js → number-Dq4d381U.js} +1 -1
  97. package/dist/objectid-Kv5GREBk.js +145 -0
  98. package/dist/{campaign-BeF8kTyg.js → plugins-9_UvAdJ2.js} +784 -777
  99. package/dist/remy-NLAa-9Qg.js +46 -0
  100. package/dist/{reward-CN4gvn4c.js → reward-DXHGeGYY.js} +1 -1
  101. package/dist/{rule-CpiqqR0c.js → rule-B_XgRDr-.js} +505 -487
  102. package/dist/rule-builder-BMXyzu8k.js +102 -0
  103. package/dist/style.css +11 -2
  104. package/dist/template-CnyTUzQU.js +188 -0
  105. package/dist/timezone-Izs3ibB-.js +1156 -0
  106. package/dist/trigger-Dda3NmaE.js +213 -0
  107. package/dist/usePagination-Byxk4XVn.js +220 -0
  108. package/dist/user-BZxO8qdh.js +55 -0
  109. package/dist/{vue-i18n-DVmD9I_o.js → vue-i18n-DDbkmbSf.js} +433 -433
  110. package/dist/{xlsx-qJHsnW7k.js → xlsx-D8yNl8dN.js} +1 -1
  111. package/dist/{zod-Bg2FbC-D.js → zod-Xp7TePRP.js} +32 -31
  112. package/package.json +14 -6
  113. package/dist/AuditLogs-DW4rwNOn.js +0 -1887
  114. package/dist/Broadcast-Dhc0j16O.js +0 -227
  115. package/dist/Collections-CsUJEmqz.js +0 -465
  116. package/dist/Credit-Mqa-0XJd.js +0 -222
  117. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  118. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DWWLxIq-.js +0 -2185
  119. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BiQGZeDc.js +0 -347
  120. package/dist/Experience-BD5C3old.js +0 -223
  121. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  122. package/dist/Game-D4xsi8Ym.js +0 -278
  123. package/dist/Marketing-axcQYl8k.js +0 -20073
  124. package/dist/Mission-BHZiL-GH.js +0 -296
  125. package/dist/Point-gKvdggAl.js +0 -226
  126. package/dist/Promotion-7x2F_sFX.js +0 -289
  127. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-AuN9NgcG.js +0 -1751
  128. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DTlv8ZAn.js +0 -147
  129. package/dist/Setting-Cab47wfH.js +0 -1936
  130. package/dist/Store-BFL3T9B5.js +0 -1842
  131. package/dist/StoreRewards-C43dCJtM.js +0 -423
  132. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-aAj5-nzZ.js +0 -1029
  133. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-K3OPSYrF.js +0 -139
  134. package/dist/Voucher-BhUAcPZg.js +0 -384
  135. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-C0YNez2L.js +0 -419
  136. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  137. package/dist/app-BGaUIdCr.js +0 -7086
  138. package/dist/app-DccKBdW_.js +0 -33357
  139. package/dist/campaign-DbJZEU7P.js +0 -96
  140. package/dist/campaign.enum-PBKYGUQY.js +0 -20
  141. package/dist/campaign.fn-Cq-4LfQj.js +0 -758
  142. package/dist/dto-8NvMMYAb.js +0 -214
  143. package/dist/effect-DZhcEQ5g.js +0 -78
  144. package/dist/index-CQQedv0M.js +0 -32260
  145. package/dist/index-CTgQRqQR.js +0 -30038
  146. package/dist/index-CsaQJMAR.js +0 -66
  147. package/dist/index-DGaywhpY.js +0 -76
  148. package/dist/index-DOfLDlI8.js +0 -8861
  149. package/dist/index-DVpAocyR.js +0 -3120
  150. package/dist/index-DlJGd8RC.js +0 -121
  151. package/dist/index-Dm65CTdy.js +0 -38
  152. package/dist/objectid-MCaJXAgq.js +0 -145
  153. package/dist/plugins-C-CRzeyC.js +0 -208
  154. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  155. package/dist/rule-builder-DmkJng-x.js +0 -89
  156. package/dist/template-DTZgnkl5.js +0 -190
  157. package/dist/trigger-CPjJ73Rc.js +0 -144
  158. package/dist/usePagination-BeF5K3M7.js +0 -223
  159. package/dist/user-8VIt8A1x.js +0 -54
@@ -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-aAj5-nzZ.js";
3
- import { u as C } from "./vue-i18n-DVmD9I_o.js";
2
+ import { _ as g, a as y } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-vrYqDGOa.js";
3
+ import { u as C } from "./vue-i18n-DDbkmbSf.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-DOfLDlI8.js";
3
- import { i as C, R as e } from "./rule-builder-DmkJng-x.js";
4
- import { _ as I } from "./RuleGroup.vue_vue_type_script_setup_true_lang-AuN9NgcG.js";
5
- import { p as N } from "./plugins-C-CRzeyC.js";
6
- import { u as S } from "./membership-DU0BwIj8.js";
7
- import { _ as j } from "./CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js";
8
- import { u as x } from "./vue-i18n-DVmD9I_o.js";
2
+ import "./index-CQZbm9P5.js";
3
+ import { i as C, R as e } from "./rule-builder-BMXyzu8k.js";
4
+ import { _ as I } from "./RuleGroup.vue_vue_type_script_setup_true_lang-BgKGNK7y.js";
5
+ import { p as N } from "./plugins-9_UvAdJ2.js";
6
+ import { u as S } from "./membership-CApN5ZJ1.js";
7
+ import { _ as j } from "./CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js";
8
+ import { u as x } from "./vue-i18n-DDbkmbSf.js";
9
9
  const A = /* @__PURE__ */ y({
10
10
  __name: "SegmentConfigurator",
11
11
  props: {
@@ -0,0 +1,421 @@
1
+ import { defineComponent as te, ref as U, computed as ne, h as m, onMounted as ae, resolveComponent as d, openBlock as u, createElementBlock as T, Fragment as P, createVNode as l, unref as t, createElementVNode as c, withCtx as R, renderList as re, createBlock as h, resolveDynamicComponent as ce, createCommentVNode as L, toDisplayString as v } from "vue";
2
+ import { _ as ie } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as se, components as p } from "@feedmepos/ui-library";
4
+ import { _ as H } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
5
+ import { a as le, p as me } from "./plugins-9_UvAdJ2.js";
6
+ import { useCoreStore as ue } from "@feedmepos/mf-common";
7
+ import { u as de } from "./loading-fZQi5zP8.js";
8
+ import { u as pe } from "./business-6oZ8Rgui.js";
9
+ import { u as fe, c as _ } from "./campaign-CzenWLhs.js";
10
+ import { a as ye, b as $, c as D } from "./campaign-PYce7g0o.js";
11
+ import { c as he, p as ge } from "./duplicateCampaign-BXaDK8Q6.js";
12
+ import "./index-BdjY7GRO.js";
13
+ import { u as ve } from "./template-CnyTUzQU.js";
14
+ import { _ as _e } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DKWCWOU_.js";
15
+ import { _ as Ce } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-CROBk6cD.js";
16
+ import { u as we } from "./vue-i18n-DDbkmbSf.js";
17
+ import { T as be } from "./trigger-Dda3NmaE.js";
18
+ import { useRouter as ke } from "vue-router";
19
+ import { R as K } from "./app-Duwed9mD.js";
20
+ var xe = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
21
+ const Fe = { class: "px-24 flex flex-col gap-y-16" }, Ve = { class: "flex items-center justify-between w-full" }, Se = { class: "flex gap-8 overflow-x-auto" }, Ue = { class: "space-y-8" }, Te = { class: "flex w-full gap-4 items-center" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Re = { class: "space-y-4" }, Le = { class: "fm-typo-en-body-lg-600" }, Ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ee = { class: "flex gap-8 items-center" }, Be = { class: "flex flex-col gap-16 text-center" }, Oe = { class: "fm-typo-en-title-sm-800" }, Ae = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ao = /* @__PURE__ */ te({
22
+ __name: "Voucher",
23
+ setup(Me) {
24
+ const { t: a } = we(), N = {
25
+ label: a("connect.voucher.createCampaign"),
26
+ value: "create",
27
+ isPrimary: !0,
28
+ prependIcon: "add"
29
+ }, I = se(), j = ve("VOUCHER", I), q = pe(), y = fe(), { global: G, minor: E } = de, B = ke(), s = U({
30
+ searchKey: "",
31
+ location: [],
32
+ triggerType: []
33
+ }), C = ne(
34
+ () => y.campaigns.voucher.filter(
35
+ (e) => W(e) && z(e)
36
+ )
37
+ ), X = be.VOUCHER.map((e) => ({
38
+ label: e.name,
39
+ value: e.value
40
+ }));
41
+ function W(e) {
42
+ const o = s.value.location;
43
+ return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some(
44
+ (r) => {
45
+ var i;
46
+ return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(r);
47
+ }
48
+ ) : e.targetLocation.includes(o);
49
+ }
50
+ function k(e) {
51
+ return e.hideInApp === !1;
52
+ }
53
+ function x(e) {
54
+ return e.event.type === "SIMPLE_CLAIM" && !k(e);
55
+ }
56
+ function z(e) {
57
+ const o = s.value.triggerType;
58
+ if (!o || o.length === 0) return !0;
59
+ const r = e.event.type;
60
+ return o.includes(r);
61
+ }
62
+ const Q = [
63
+ {
64
+ header: a("connect.voucher.voucherTitle"),
65
+ accessorFn: (e) => e.name,
66
+ cell(e) {
67
+ const o = [e.row.original.name];
68
+ return k(e.row.original) && o.push(
69
+ m(p.FmChip, {
70
+ label: "Feedvibe",
71
+ class: "text-fm-color-primary bg-fm-color-system-warning-100",
72
+ compact: !0
73
+ })
74
+ ), m("div", { class: "flex items-center gap-4" }, o);
75
+ }
76
+ },
77
+ {
78
+ header: a("connect.voucher.status"),
79
+ accessorFn: (e) => ye(e),
80
+ cell(e) {
81
+ return $(e.row.original);
82
+ }
83
+ },
84
+ {
85
+ header: a("connect.voucher.summary"),
86
+ accessorFn: (e) => D(e)
87
+ },
88
+ {
89
+ header: a("connect.voucher.quota"),
90
+ accessorFn: (e) => {
91
+ var o;
92
+ return ((o = e.pf_collectible) == null ? void 0 : o.options.maxReceive) ?? "Unlimited";
93
+ }
94
+ },
95
+ {
96
+ header: a("connect.voucher.claimed"),
97
+ accessorFn: (e) => {
98
+ var o;
99
+ return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
100
+ }
101
+ },
102
+ {
103
+ header: a("connect.voucher.actions"),
104
+ cell(e) {
105
+ return m("div", { class: "flex items-center justify-end" }, [
106
+ m(p.FmButton, {
107
+ icon: "visibility",
108
+ variant: "tertiary",
109
+ iconColor: "neutral-gray-400",
110
+ onClick: async (o) => {
111
+ o.stopPropagation(), await B.push({
112
+ name: K["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
113
+ params: { id: e.row.original._id }
114
+ });
115
+ }
116
+ }),
117
+ m(
118
+ p.FmMenu,
119
+ {
120
+ placement: "bottom-end",
121
+ onClick: (o) => {
122
+ o.stopPropagation();
123
+ }
124
+ },
125
+ {
126
+ "menu-button": () => m(p.FmButton, {
127
+ icon: "more_vert",
128
+ iconColor: "neutral-gray-400",
129
+ variant: "tertiary"
130
+ }),
131
+ default: () => {
132
+ const o = [
133
+ m(p.FmMenuItem, {
134
+ label: a("connect.voucher.duplicate"),
135
+ onClick: async (r) => {
136
+ r.stopPropagation(), await A(e.row.original);
137
+ }
138
+ }),
139
+ m(
140
+ p.FmMenuItem,
141
+ {
142
+ onClick: async (r) => {
143
+ r.stopPropagation(), O(e.row.original);
144
+ }
145
+ },
146
+ {
147
+ label: m(
148
+ "div",
149
+ {
150
+ class: "text-fm-color-typo-error fm-typo-en-body-md-400"
151
+ },
152
+ a("connect.voucher.remove")
153
+ )
154
+ }
155
+ )
156
+ ];
157
+ return x(e.row.original) && (o.unshift(
158
+ m(p.FmMenuItem, {
159
+ label: a("connect.voucher.send"),
160
+ onClick: async (r) => {
161
+ var i;
162
+ r.stopPropagation(), (i = V.value) == null || i.showSheet({
163
+ campaignId: e.row.original._id
164
+ });
165
+ }
166
+ })
167
+ ), o.unshift(
168
+ m(p.FmMenuItem, {
169
+ label: a("connect.voucher.share"),
170
+ onClick: async (r) => {
171
+ r.stopPropagation(), await le(
172
+ `https://${ue().currentBusiness.value._id}.${xe.appUrl}/vouchers/${e.row.original._id}`,
173
+ {
174
+ successMessage: "Voucher link copied to clipboard"
175
+ }
176
+ );
177
+ }
178
+ })
179
+ )), o;
180
+ }
181
+ }
182
+ )
183
+ ]);
184
+ }
185
+ }
186
+ ], F = U(), V = U();
187
+ async function O(e) {
188
+ await me.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await E(
189
+ async () => {
190
+ await _.delete(e._id), await y.read("VOUCHER");
191
+ },
192
+ {
193
+ message: a("connect.voucher.removing", { name: e.name }),
194
+ successMessage: a("connect.voucher.removedSuccessfully", {
195
+ name: e.name
196
+ })
197
+ }
198
+ );
199
+ }
200
+ async function w(e) {
201
+ e ? await o(await _.readById(e._id)) : j.open(async (r) => {
202
+ await o(void 0, r);
203
+ });
204
+ async function o(r, i) {
205
+ var b;
206
+ (b = F.value) == null || b.showSheet(!0, "VOUCHER", r, i);
207
+ }
208
+ }
209
+ async function A(e) {
210
+ var i;
211
+ if (!await he(e.name))
212
+ return;
213
+ const o = await _.readById(e._id), r = ge(o);
214
+ (i = F.value) == null || i.showSheet(
215
+ !0,
216
+ "VOUCHER",
217
+ r,
218
+ o.template
219
+ );
220
+ }
221
+ async function Z(e) {
222
+ e.campaign._id && await new Promise((o) => {
223
+ I.open({
224
+ title: "Confirmation",
225
+ message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
226
+ primaryActions: { text: "Update all", close: !0 },
227
+ secondaryActions: { text: "Update future only", close: !0 }
228
+ }).onPrimary(async () => {
229
+ var r;
230
+ e.updateCollections = !0, (r = window.top) == null || r.postMessage("updateAllVoucher", "*"), o();
231
+ }).onSecondary(async () => {
232
+ o();
233
+ });
234
+ }), await E(
235
+ async () => {
236
+ e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await y.read("VOUCHER");
237
+ },
238
+ {
239
+ message: a(
240
+ e.campaign._id ? "connect.voucher.updating" : "connect.voucher.creating"
241
+ ),
242
+ successMessage: a(
243
+ e.campaign._id ? "connect.voucher.updatedSuccessfully" : "connect.voucher.createdSuccessfully"
244
+ )
245
+ }
246
+ );
247
+ }
248
+ return ae(async () => {
249
+ await G(async () => {
250
+ await y.read("VOUCHER");
251
+ });
252
+ }), (e, o) => {
253
+ const r = d("FmPageHead"), i = d("FmSearch"), b = d("FmTable"), J = d("FmChip"), g = d("FmButton"), Y = d("FmListItem"), ee = d("FmList"), oe = d("FmCard");
254
+ return u(), T(P, null, [
255
+ l(r, {
256
+ title: t(a)("connect.voucher.title"),
257
+ actions: t(C).length > 0 ? [N] : [],
258
+ "onClick:action": o[0] || (o[0] = () => w())
259
+ }, null, 8, ["title", "actions"]),
260
+ c("div", Fe, [
261
+ l(i, {
262
+ modelValue: t(s).searchKey,
263
+ "onUpdate:modelValue": o[1] || (o[1] = (n) => t(s).searchKey = n),
264
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
265
+ placeholder: t(a)("connect.voucher.search"),
266
+ collapsible: ""
267
+ }, null, 8, ["modelValue", "placeholder"]),
268
+ t(y).campaigns.voucher && t(y).campaigns.voucher.length > 0 ? (u(), T(P, { key: 0 }, [
269
+ c("div", Ve, [
270
+ c("div", Se, [
271
+ l(H, {
272
+ label: `${t(a)("connect.common.location")}: `,
273
+ "right-icon": "keyboard_arrow_down",
274
+ modelValue: t(s).location,
275
+ "onUpdate:modelValue": o[2] || (o[2] = (n) => t(s).location = n),
276
+ icon: "storefront",
277
+ "show-item-label": !0,
278
+ items: t(q).locationOptions
279
+ }, null, 8, ["label", "modelValue", "items"]),
280
+ l(H, {
281
+ label: "Type:",
282
+ "right-icon": "keyboard_arrow_down",
283
+ modelValue: t(s).triggerType,
284
+ "onUpdate:modelValue": o[3] || (o[3] = (n) => t(s).triggerType = n),
285
+ icon: "filter_list",
286
+ "show-item-label": !0,
287
+ items: t(X)
288
+ }, null, 8, ["modelValue", "items"])
289
+ ]),
290
+ l(i, {
291
+ modelValue: t(s).searchKey,
292
+ "onUpdate:modelValue": o[4] || (o[4] = (n) => t(s).searchKey = n),
293
+ class: "xs:hidden sm:hidden",
294
+ placeholder: t(a)("connect.voucher.search"),
295
+ collapsible: ""
296
+ }, null, 8, ["modelValue", "placeholder"])
297
+ ]),
298
+ l(b, {
299
+ class: "xs:hidden sm:hidden",
300
+ "row-data": t(C),
301
+ "column-defs": Q,
302
+ "search-value": t(s).searchKey,
303
+ "column-filter": [],
304
+ onRowClick: o[5] || (o[5] = (n) => w(n.original)),
305
+ "hide-footer": t(C).length < 10
306
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
307
+ l(ee, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
308
+ default: R(() => [
309
+ (u(!0), T(P, null, re(t(C).filter(
310
+ (n) => n.name.toLowerCase().includes(t(s).searchKey.toLowerCase())
311
+ ), (n) => (u(), h(Y, {
312
+ key: n._id.toString(),
313
+ onClick: (S) => w(n),
314
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
315
+ }, {
316
+ default: R(() => {
317
+ var S;
318
+ return [
319
+ c("div", Ue, [
320
+ c("div", Te, [
321
+ (u(), h(ce(t($)(n)))),
322
+ k(n) ? (u(), h(J, {
323
+ key: 0,
324
+ label: "Feedvibe",
325
+ class: "text-fm-color-primary bg-fm-color-system-warning-100",
326
+ compact: ""
327
+ })) : L("", !0),
328
+ c("div", Pe, v(((S = n.pf_collectible) == null ? void 0 : S.currentReceive) ?? 0) + " claimed ", 1)
329
+ ]),
330
+ c("div", Re, [
331
+ c("div", Le, v(n.name), 1),
332
+ c("div", Ie, v(t(D)(n)), 1)
333
+ ])
334
+ ]),
335
+ c("div", Ee, [
336
+ l(g, {
337
+ icon: "content_copy",
338
+ "icon-color": "neutral-gray-400",
339
+ variant: "tertiary",
340
+ onClick: async (f) => {
341
+ f.stopPropagation(), await A(n);
342
+ }
343
+ }, null, 8, ["onClick"]),
344
+ x(n) ? (u(), h(g, {
345
+ key: 0,
346
+ icon: "visibility",
347
+ "icon-color": "neutral-gray-400",
348
+ variant: "tertiary",
349
+ onClick: async (f) => {
350
+ f.stopPropagation(), await t(B).push({
351
+ name: t(K)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
352
+ params: { id: n._id }
353
+ });
354
+ }
355
+ }, null, 8, ["onClick"])) : L("", !0),
356
+ x(n) ? (u(), h(g, {
357
+ key: 1,
358
+ icon: "send",
359
+ "icon-color": "neutral-gray-400",
360
+ variant: "tertiary",
361
+ onClick: (f) => {
362
+ var M;
363
+ f.stopPropagation(), (M = t(V)) == null || M.showSheet({
364
+ campaignId: n._id
365
+ });
366
+ }
367
+ }, null, 8, ["onClick"])) : L("", !0),
368
+ l(g, {
369
+ icon: "delete",
370
+ "icon-color": "neutral-gray-400",
371
+ variant: "tertiary",
372
+ onClick: (f) => (f.stopPropagation(), O(n))
373
+ }, null, 8, ["onClick"])
374
+ ])
375
+ ];
376
+ }),
377
+ _: 2
378
+ }, 1032, ["onClick"]))), 128))
379
+ ]),
380
+ _: 1
381
+ })
382
+ ], 64)) : (u(), h(oe, {
383
+ key: 1,
384
+ variant: "outlined",
385
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
386
+ }, {
387
+ default: R(() => [
388
+ o[7] || (o[7] = c("img", {
389
+ src: ie,
390
+ class: "aspect-square w-[150px]"
391
+ }, null, -1)),
392
+ c("div", Be, [
393
+ c("div", Oe, v(t(a)("connect.voucher.createVoucherCampaign")), 1),
394
+ c("div", Ae, v(t(a)("connect.voucher.description")), 1)
395
+ ]),
396
+ l(g, {
397
+ variant: "primary",
398
+ label: t(a)("connect.voucher.createVoucherCampaign"),
399
+ icon: "add",
400
+ onClick: o[6] || (o[6] = (n) => w())
401
+ }, null, 8, ["label"])
402
+ ]),
403
+ _: 1
404
+ })),
405
+ l(_e, {
406
+ ref_key: "sheetRef",
407
+ ref: F,
408
+ "onSubmit:modelValue": Z
409
+ }, null, 512),
410
+ l(Ce, {
411
+ ref_key: "sendVoucherSheetRef",
412
+ ref: V
413
+ }, null, 512)
414
+ ])
415
+ ], 64);
416
+ };
417
+ }
418
+ });
419
+ export {
420
+ ao as default
421
+ };