@feedmepos/mf-connect 0.1.38-beta.9 → 0.1.38-beta.91

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 (162) hide show
  1. package/dist/{Analytic-3MN2saaU.js → Analytic-Drbkm5By.js} +31 -32
  2. package/dist/{App-Co8X5Wdy.js → App-C0cdcG5i.js} +741 -728
  3. package/dist/AuditLogs-BZZLtf2u.js +2013 -0
  4. package/dist/{Bin-8a56ZDib.js → Bin-DRV5lRmj.js} +10 -10
  5. package/dist/Broadcast-C90FN2LB.js +266 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BVXlfq31.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CsdxwjCn.js} +6 -6
  7. package/dist/{Card-B8_09LJu.js → Card-CWF84A1O.js} +145 -140
  8. package/dist/Collections-ja0gMaFf.js +540 -0
  9. package/dist/Credit-D8U2AJgq.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-YR62BvBG.js +3120 -0
  14. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BVbhDMqH.js +351 -0
  15. package/dist/Experience-DDXLGizu.js +259 -0
  16. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-Dng61jiL.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-CMOilzsW.js +330 -0
  20. package/dist/Grab-tPVQB39R.js +300 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-BbtEXO4b.js} +49 -48
  22. package/dist/{Index-DLF71mx_.js → Index-Ch7wiShF.js} +54 -54
  23. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-DLO0jj6Z.js +48 -0
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CplyhUFF.js} +1 -1
  25. package/dist/{MainLayout-B1aJoR95.js → MainLayout-BMqnfxHh.js} +1 -1
  26. package/dist/Marketing-C0weDg-u.js +236 -0
  27. package/dist/MarketingMaterialEdit-BD-SyXVQ.js +1036 -0
  28. package/dist/{Member-Bkw4aqtv.js → Member-Bpf0amjr.js} +38 -37
  29. package/dist/{MemberList-a3PdVYB3.js → MemberList-cWYPEpL4.js} +485 -489
  30. package/dist/{MemberTransactions-CPDBd-n3.js → MemberTransactions-vzRUVwpO.js} +1 -1
  31. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-pbN8pN1m.js → MessageInput.vue_vue_type_script_setup_true_lang-DY3L9CvB.js} +10392 -9967
  32. package/dist/Mission-HRwIp1QY.js +334 -0
  33. package/dist/{Overview-De97NDoe.js → Overview-D9cfX4Kr.js} +34 -34
  34. package/dist/Point-Dz-Z0_m9.js +262 -0
  35. package/dist/Promotion-Csb0bdI6.js +397 -0
  36. package/dist/{Queue-ISVZxCE2.js → Queue-CAVKh9bK.js} +18 -18
  37. package/dist/{Record-2FMByNC6.js → Record-bPnIoHnT.js} +15 -14
  38. package/dist/Review-D2DfvLqJ.js +621 -0
  39. package/dist/ReviewFacebookCallback-CI7V3xbp.js +243 -0
  40. package/dist/ReviewGoogleCallback-LA2S8FLZ.js +213 -0
  41. package/dist/{Reward-DPRyQ37x.js → Reward-DdHF5Pr7.js} +16 -16
  42. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Ba7-3bL-.js → RewardGroup.vue_vue_type_script_setup_true_lang-DyZhWnI4.js} +13 -14
  43. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-B0OSLJVN.js +1912 -0
  44. package/dist/Segment-DV1zcWF7.js +1015 -0
  45. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DZbyDVid.js → SelectItems.vue_vue_type_script_setup_true_lang-Df1HE9sL.js} +23 -23
  46. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-ioMFYIwK.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C0K9giqI.js} +12 -12
  47. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CzJL8Xl0.js +226 -0
  48. package/dist/Setting-DZiZy8A5.js +2039 -0
  49. package/dist/SettingAdvertisements-Bb9shWVJ.js +264 -0
  50. package/dist/Store-mymtMyho.js +1996 -0
  51. package/dist/StoreRewards-jcjZfSv7.js +537 -0
  52. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B-b5_TFL.js +1130 -0
  53. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-sCa1J_hq.js +7007 -0
  54. package/dist/{Tier-CwRj0oJ1.js → Tier-Ba6aHC3R.js} +562 -480
  55. package/dist/{Title-EII5OxSP.js → Title-C4uKD8E1.js} +151 -149
  56. package/dist/{Transaction-1MTkAfej.js → Transaction-Bf2uG6co.js} +2 -2
  57. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BlQVWQHJ.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-C3ttU-bw.js} +7 -7
  58. package/dist/Voucher-Lsc2pKCk.js +421 -0
  59. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-MA7tsTm-.js +421 -0
  60. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CTeGK4bk.js → ZodTextField.vue_vue_type_script_setup_true_lang-DEDavbCx.js} +2 -2
  61. package/dist/app-BRrGcz9U.js +59647 -0
  62. package/dist/app.js +1 -1
  63. package/dist/{business-DjnN-J4U.js → business-TBSvPv65.js} +11 -8
  64. package/dist/campaign-CL95CZkI.js +219 -0
  65. package/dist/campaign-DxcuYXB7.js +254 -0
  66. package/dist/campaign.enum-DRydaoy9.js +26 -0
  67. package/dist/campaign.fn-BsoUwQ5N.js +776 -0
  68. package/dist/{collectible.enum-r6N115Lu.js → collectible.enum-CpTbpumt.js} +1 -1
  69. package/dist/{collection.fn-CSsfVv26.js → collection.fn-BNrPdDIr.js} +2 -2
  70. package/dist/dto-BGrkIVqX.js +222 -0
  71. package/dist/duplicateCampaign-DBaFROXd.js +51 -0
  72. package/dist/effect-fonU-1xO.js +89 -0
  73. package/dist/{email-addresses-D8uheCCF.js → email-addresses-WeV5Gvxa.js} +2 -2
  74. package/dist/{export-Ver6WiX6.js → export-DDXf8yf_.js} +4 -4
  75. package/dist/{helper-Bg4xoFbh.js → helper-DwnzJKxo.js} +22 -7
  76. package/dist/index-10x-WMiS.js +30289 -0
  77. package/dist/index-9Wt89ReU.js +3625 -0
  78. package/dist/{index-Bb0CHeNx.js → index-Brh5FXQ7.js} +3 -3
  79. package/dist/index-BxxNZQUc.js +8910 -0
  80. package/dist/{index-hJUxCNsF.js → index-CDAMmPIn.js} +1 -1
  81. package/dist/{index-CNhr0_Zx.js → index-Cg1vzNzf.js} +617 -191
  82. package/dist/{index-BZZ4iF4-.js → index-Cl7QnFc4.js} +23 -12
  83. package/dist/index-CuvNtC_M.js +61 -0
  84. package/dist/{index-BPQyQc4q.js → index-Cvw-xFek.js} +1 -1
  85. package/dist/index-DCJ_r_e2.js +85 -0
  86. package/dist/{index-Dn_bmcns.js → index-DLG8B-TK.js} +3 -3
  87. package/dist/{index-D4JOeJJJ.js → index-DWhh_u0L.js} +1 -1
  88. package/dist/index-DsQJTvKe.js +28900 -0
  89. package/dist/index-oR7xhhIt.js +48 -0
  90. package/dist/{index.esm2017-hK1Mi9yY.js → index.esm2017-CFvohTUs.js} +122 -122
  91. package/dist/{loading-kIQFOTwH.js → loading-DiD8J1Jc.js} +4 -3
  92. package/dist/{lodash-B5I3zXaY.js → lodash-BJgKlNEt.js} +1 -1
  93. package/dist/{membership--xR-HZoa.js → membership-C8HuK9_K.js} +38 -18
  94. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  95. package/dist/{money-c-ITXnlg.js → money-DXl1-c0l.js} +1 -1
  96. package/dist/{number-DfZSBLOY.js → number-C6RGu6qp.js} +1 -1
  97. package/dist/objectid-8Boc1xMT.js +145 -0
  98. package/dist/{campaign-BpJ1O6KS.js → plugins-CxBcRdUi.js} +677 -699
  99. package/dist/remy-D_Deb3ue.js +13 -0
  100. package/dist/{reward-CE0ifMHS.js → reward-CEh2CA9Z.js} +1 -1
  101. package/dist/{rule-DrjdmpaB.js → rule-DEfU8NOO.js} +505 -487
  102. package/dist/rule-builder-BZIx2IzX.js +102 -0
  103. package/dist/string-Gcy5IM_H.js +32 -0
  104. package/dist/style.css +11 -2
  105. package/dist/template-Ba8NxY41.js +188 -0
  106. package/dist/timezone-DUqMvcwo.js +1156 -0
  107. package/dist/trigger-KQ-DPHv-.js +213 -0
  108. package/dist/useMarketingMaterialActions-DSI7Fpu9.js +96 -0
  109. package/dist/usePagination-BeTADCIt.js +220 -0
  110. package/dist/{user-Cl3IotYV.js → user-DN6_QE2j.js} +15 -14
  111. package/dist/vue-i18n-B4dOYJz4.js +2365 -0
  112. package/dist/{xlsx-BDBzdOuM.js → xlsx-BDFTkXYe.js} +1 -1
  113. package/dist/{zod-Bg2FbC-D.js → zod-B8WJKIxe.js} +32 -31
  114. package/package.json +14 -6
  115. package/dist/AuditLogs-DTq6IAuc.js +0 -1887
  116. package/dist/Broadcast-UreS5Kiq.js +0 -227
  117. package/dist/Collections-B0I5ULxR.js +0 -465
  118. package/dist/Credit-B4Ad8DWP.js +0 -222
  119. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  120. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DjgACf9F.js +0 -2185
  121. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-y5JnuIev.js +0 -347
  122. package/dist/Experience-xO5KpTTm.js +0 -223
  123. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  124. package/dist/Game-ChgrVvz5.js +0 -278
  125. package/dist/Marketing-BlmRXSGl.js +0 -20073
  126. package/dist/Mission-B07wK0HX.js +0 -296
  127. package/dist/Point-Ckj9QIeH.js +0 -226
  128. package/dist/Promotion-aGNCOeRN.js +0 -289
  129. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DWj-421v.js +0 -1751
  130. package/dist/Segment-CRMNJ11X.js +0 -882
  131. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cfp8XXdO.js +0 -147
  132. package/dist/Setting-c0FWRZsD.js +0 -1936
  133. package/dist/Store-Bm1_15s8.js +0 -1842
  134. package/dist/StoreRewards-BCQHHfay.js +0 -423
  135. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CfTF2l-D.js +0 -1029
  136. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-rvhoxo0w.js +0 -139
  137. package/dist/Voucher-CYvjCb-v.js +0 -384
  138. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-63Jr71dJ.js +0 -419
  139. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  140. package/dist/app-BJLHk8ao.js +0 -33357
  141. package/dist/app-BzIk1ojT.js +0 -7086
  142. package/dist/campaign-BHNS5kXt.js +0 -96
  143. package/dist/campaign.enum-CJDWE_Om.js +0 -20
  144. package/dist/campaign.fn-C0HQE9uh.js +0 -758
  145. package/dist/dto-Byq51uVH.js +0 -214
  146. package/dist/effect-Do3yTM-_.js +0 -78
  147. package/dist/index-B1V9UnI9.js +0 -76
  148. package/dist/index-BM9CWjC6.js +0 -38
  149. package/dist/index-CsaQJMAR.js +0 -66
  150. package/dist/index-D6VxioBg.js +0 -30038
  151. package/dist/index-DGKlRWn3.js +0 -32260
  152. package/dist/index-DLKyOu7W.js +0 -8861
  153. package/dist/index-DyYF6HYL.js +0 -121
  154. package/dist/index-UXtH44XQ.js +0 -3120
  155. package/dist/objectid-DKbha9-x.js +0 -145
  156. package/dist/plugins-DtakupKW.js +0 -208
  157. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  158. package/dist/rule-builder-B_hCyq3x.js +0 -89
  159. package/dist/template-WI4a-lFY.js +0 -190
  160. package/dist/trigger-DieDHht3.js +0 -144
  161. package/dist/usePagination-BeF5K3M7.js +0 -223
  162. package/dist/vue-i18n-DKh0SMhL.js +0 -2365
@@ -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-CfTF2l-D.js";
3
- import { u as C } from "./vue-i18n-DKh0SMhL.js";
2
+ import { _ as g, a as y } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-B-b5_TFL.js";
3
+ import { u as C } from "./vue-i18n-B4dOYJz4.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-DLKyOu7W.js";
3
- import { i as C, R as e } from "./rule-builder-B_hCyq3x.js";
4
- import { _ as I } from "./RuleGroup.vue_vue_type_script_setup_true_lang-DWj-421v.js";
5
- import { p as N } from "./plugins-DtakupKW.js";
6
- import { u as S } from "./membership--xR-HZoa.js";
7
- import { _ as j } from "./CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js";
8
- import { u as x } from "./vue-i18n-DKh0SMhL.js";
2
+ import "./index-BxxNZQUc.js";
3
+ import { i as C, R as e } from "./rule-builder-BZIx2IzX.js";
4
+ import { _ as I } from "./RuleGroup.vue_vue_type_script_setup_true_lang-B0OSLJVN.js";
5
+ import { p as N } from "./plugins-CxBcRdUi.js";
6
+ import { u as S } from "./membership-C8HuK9_K.js";
7
+ import { _ as j } from "./CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js";
8
+ import { u as x } from "./vue-i18n-B4dOYJz4.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 { c as le, p as me } from "./plugins-CxBcRdUi.js";
6
+ import { useCoreStore as ue } from "@feedmepos/mf-common";
7
+ import { u as de } from "./loading-DiD8J1Jc.js";
8
+ import { u as pe } from "./business-TBSvPv65.js";
9
+ import { u as fe, c as _ } from "./campaign-CL95CZkI.js";
10
+ import { a as ye, b as $, c as D } from "./campaign-DxcuYXB7.js";
11
+ import { c as he, p as ge } from "./duplicateCampaign-DBaFROXd.js";
12
+ import "./index-DWhh_u0L.js";
13
+ import { u as ve } from "./template-Ba8NxY41.js";
14
+ import { _ as _e } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-YR62BvBG.js";
15
+ import { _ as Ce } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-CzJL8Xl0.js";
16
+ import { u as we } from "./vue-i18n-B4dOYJz4.js";
17
+ import { T as be } from "./trigger-KQ-DPHv-.js";
18
+ import { useRouter as ke } from "vue-router";
19
+ import { R as K } from "./app-BRrGcz9U.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
+ };