@feedmepos/mf-connect 0.1.38-beta.7 → 0.1.38-beta.70

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 (153) hide show
  1. package/dist/{Analytic-NNi-22sK.js → Analytic-qVhEo_im.js} +16 -16
  2. package/dist/{App-Bu14Mro_.js → App-Ixv1jrHc.js} +625 -619
  3. package/dist/AuditLogs-B2D62tMF.js +1991 -0
  4. package/dist/{Bin-CnAQA85j.js → Bin-Lj7jtS9m.js} +10 -10
  5. package/dist/Broadcast-BpP9VJsx.js +267 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DC_fReu7.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BB43gKXv.js} +6 -6
  7. package/dist/{Card-DqAGiETA.js → Card-CjArjpou.js} +144 -140
  8. package/dist/Collections-CFzUAHxz.js +540 -0
  9. package/dist/Credit-D43x-T3d.js +261 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DlgTeQLe.js +3167 -0
  13. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-9UhSzClJ.js +351 -0
  14. package/dist/Experience-BaUbRoHV.js +260 -0
  15. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-BO_rbswB.js} +1 -1
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  17. package/dist/Game-DaVqgPWQ.js +331 -0
  18. package/dist/GenerateMaterial-DJM8fZyl.js +589 -0
  19. package/dist/Grab-CykZDrWI.js +301 -0
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-C51yGAp9.js} +49 -48
  21. package/dist/{Index-loHkiwyo.js → Index-Do3WIIfM.js} +54 -54
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BjdBaj4c.js} +1 -1
  23. package/dist/{MainLayout-B1aJoR95.js → MainLayout-DD-OlYxZ.js} +1 -1
  24. package/dist/Marketing-C9bsnUaQ.js +145 -0
  25. package/dist/MarketingMaterialEdit-CbSh8dpn.js +746 -0
  26. package/dist/{Member-BQjQQdoA.js → Member-IcVRwAAS.js} +38 -37
  27. package/dist/{MemberList-WPsEUKf_.js → MemberList-C_A4PrQN.js} +158 -159
  28. package/dist/{MemberTransactions-BtM7dugy.js → MemberTransactions-CBoaY-gv.js} +1 -1
  29. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Bl9sFIwG.js → MessageInput.vue_vue_type_script_setup_true_lang-Dx28XNPi.js} +13463 -10597
  30. package/dist/Mission-COY_uhwz.js +335 -0
  31. package/dist/{Overview-Bsf5IPOg.js → Overview-DDSz2R4K.js} +24 -25
  32. package/dist/Point-C-KEwgx4.js +263 -0
  33. package/dist/Promotion-BpW9qWzf.js +397 -0
  34. package/dist/{Queue-XFVbSuDw.js → Queue-CO32O8i6.js} +14 -15
  35. package/dist/{Record-CQzujESE.js → Record-BrT5DR9L.js} +10 -10
  36. package/dist/{Reward-Dj_h_May.js → Reward-CbrEw-If.js} +16 -16
  37. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Clxk-oYM.js → RewardGroup.vue_vue_type_script_setup_true_lang-CpNjlbjZ.js} +13 -14
  38. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BS5jsRiN.js +1912 -0
  39. package/dist/{Segment-D_DUu_Sp.js → Segment-Cu9_qwXc.js} +273 -274
  40. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-D3C2mVlv.js → SelectItems.vue_vue_type_script_setup_true_lang-BH-hzxSs.js} +23 -23
  41. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-C0vsl8oV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DGm3gujH.js} +12 -12
  42. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-5HkJROSb.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DcUb8X-q.js} +4 -4
  43. package/dist/Setting-CQKfb5b_.js +1999 -0
  44. package/dist/SettingAdvertisements-BxR6Gl-5.js +263 -0
  45. package/dist/Store-6TUpmqAr.js +1995 -0
  46. package/dist/StoreRewards-BOThAOWU.js +534 -0
  47. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BYD229dz.js +1034 -0
  48. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CAamZtdf.js +7005 -0
  49. package/dist/{Tier-YQsLRt06.js → Tier-MF-ad-xm.js} +561 -480
  50. package/dist/{Title-C5gxYNvh.js → Title-MkjTHBzb.js} +149 -147
  51. package/dist/{Transaction-CZ_QdIii.js → Transaction-trYJwTrc.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DqUu7wSt.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DwlNK1TC.js} +7 -7
  53. package/dist/Voucher-BD5dTdht.js +422 -0
  54. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BhR_s48Q.js +421 -0
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DCtdp-LK.js → ZodTextField.vue_vue_type_script_setup_true_lang-CcTe5TJL.js} +2 -2
  56. package/dist/app-CybjF-6Q.js +59071 -0
  57. package/dist/app.js +1 -1
  58. package/dist/{business-DZYFoAKz.js → business-2hCbD0JX.js} +11 -8
  59. package/dist/{campaign-Ca4l6UUg.js → campaign-Bv-8uM2S.js} +29 -25
  60. package/dist/campaign-h1J8NTAo.js +253 -0
  61. package/dist/campaign.enum-Dea0E4o1.js +26 -0
  62. package/dist/campaign.fn-DqxZMyu0.js +776 -0
  63. package/dist/{collectible.enum-DnIeDAB-.js → collectible.enum-DOyAoz4F.js} +1 -1
  64. package/dist/{collection.fn-mQfXEwJv.js → collection.fn-DU2HuZod.js} +2 -2
  65. package/dist/dto-CT65-FHY.js +222 -0
  66. package/dist/duplicateCampaign-YJGHvOqb.js +51 -0
  67. package/dist/effect-XZ767UQ4.js +89 -0
  68. package/dist/{email-addresses-CQYqi2rN.js → email-addresses-DSgkxSnV.js} +2 -2
  69. package/dist/{export-BsikVZw2.js → export-4gx5C9s9.js} +9 -10
  70. package/dist/{helper-n74IteBU.js → helper-HOLsJca3.js} +22 -7
  71. package/dist/index-BO7N-s4K.js +8912 -0
  72. package/dist/{index-Dt6wui_L.js → index-BfRa1sI3.js} +3 -3
  73. package/dist/index-BnCtmlvU.js +28897 -0
  74. package/dist/{index-Bg3fAg5z.js → index-C5VvGYtP.js} +1 -1
  75. package/dist/index-CSzvYzf4.js +3419 -0
  76. package/dist/{index-Do7TcKmg.js → index-CrdkPXsx.js} +4 -1
  77. package/dist/index-CuvNtC_M.js +61 -0
  78. package/dist/{index-DTErPYrT.js → index-CxE-VVlL.js} +1 -1
  79. package/dist/{index-DRrSsoqp.js → index-Djenbz3F.js} +1 -1
  80. package/dist/{index-BJ-IAF-1.js → index-IHteBJ_D.js} +1 -1
  81. package/dist/{index-BpjT8Rx0.js → index-dUhOAfj9.js} +455 -245
  82. package/dist/index-wm4nGBB_.js +30289 -0
  83. package/dist/{index-CrHCbDIs.js → index-xTrAj026.js} +3 -3
  84. package/dist/index-yViT18i_.js +36 -0
  85. package/dist/{index.esm2017-T7F54Aqa.js → index.esm2017-Wq4FUMEv.js} +185 -185
  86. package/dist/loading-D22xapd8.js +215 -0
  87. package/dist/{lodash-B5I3zXaY.js → lodash-HM6bxuWV.js} +1 -1
  88. package/dist/{membership-BRy4jMt2.js → membership-CX464ZBI.js} +3 -3
  89. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  90. package/dist/{money-B9Auav5u.js → money-B3cPZAZu.js} +1 -1
  91. package/dist/{number-BdhIBsUp.js → number-DT65dEZt.js} +1 -1
  92. package/dist/objectid-DZWw4iLL.js +145 -0
  93. package/dist/{campaign-162kZMje.js → plugins-D-4BlIGs.js} +784 -777
  94. package/dist/remy-D_Deb3ue.js +13 -0
  95. package/dist/{reward-UuqZUHsq.js → reward-C6B-kn0X.js} +1 -1
  96. package/dist/{rule-D158NIpm.js → rule-B94SrDX1.js} +505 -487
  97. package/dist/rule-builder-CQ3uHeX4.js +102 -0
  98. package/dist/style.css +11 -2
  99. package/dist/template-CXB2Ez2S.js +188 -0
  100. package/dist/timezone-D3NuV-rx.js +1154 -0
  101. package/dist/trigger-BsCVC_nU.js +213 -0
  102. package/dist/usePagination-BOZ0-D67.js +223 -0
  103. package/dist/user-Dxp7kluY.js +55 -0
  104. package/dist/vue-i18n-DpCWu1gI.js +2365 -0
  105. package/dist/{xlsx-Ddqi5i8p.js → xlsx-Cc2a2IL9.js} +1 -1
  106. package/dist/{zod-Bg2FbC-D.js → zod-BCSHGdXs.js} +32 -31
  107. package/package.json +14 -6
  108. package/dist/AuditLogs-Cai9CVBl.js +0 -1887
  109. package/dist/Broadcast-DskXjXn4.js +0 -227
  110. package/dist/Collections-DuaIQAk7.js +0 -465
  111. package/dist/Credit-D40Vzu2g.js +0 -222
  112. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  113. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsQ4iAsV.js +0 -2185
  114. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CDCX5B5k.js +0 -347
  115. package/dist/Experience-B9yHQPuj.js +0 -223
  116. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  117. package/dist/Game-e9-Q3qmO.js +0 -278
  118. package/dist/Marketing-CipbukIV.js +0 -20073
  119. package/dist/Mission-B_DJ3Yu_.js +0 -296
  120. package/dist/Point-DMphcWjy.js +0 -226
  121. package/dist/Promotion-B33A-Jwe.js +0 -289
  122. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CGAXTOLN.js +0 -1751
  123. package/dist/Setting-CtdC4G3W.js +0 -1936
  124. package/dist/Store-DCksWACh.js +0 -1842
  125. package/dist/StoreRewards-CHWKYKet.js +0 -423
  126. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D1TDyD6N.js +0 -1029
  127. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D59sGO3F.js +0 -139
  128. package/dist/Voucher-BzV8yZ3o.js +0 -384
  129. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DjBj_3EF.js +0 -419
  130. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  131. package/dist/app-FFOpPHwj.js +0 -33357
  132. package/dist/app-az9e8Yfl.js +0 -7086
  133. package/dist/campaign.enum-DWjyDV2D.js +0 -20
  134. package/dist/campaign.fn-DWWJ74z-.js +0 -758
  135. package/dist/dto-mKZIPV4o.js +0 -214
  136. package/dist/effect-B8UexeyG.js +0 -78
  137. package/dist/index-5ShiAY8U.js +0 -8861
  138. package/dist/index-Bf6AmJwX.js +0 -32260
  139. package/dist/index-C5gjIb5d.js +0 -146
  140. package/dist/index-C9YrDtDN.js +0 -38
  141. package/dist/index-CK-MAqWE.js +0 -3120
  142. package/dist/index-CsaQJMAR.js +0 -66
  143. package/dist/index-f4MzX8IY.js +0 -30038
  144. package/dist/loading-BEAayQS-.js +0 -71
  145. package/dist/objectid-K-JVTsfA.js +0 -145
  146. package/dist/plugins-CWlRYif_.js +0 -208
  147. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  148. package/dist/rule-builder-DNeViq0I.js +0 -89
  149. package/dist/template-B02wYF7G.js +0 -190
  150. package/dist/trigger-BDjnKHLI.js +0 -144
  151. package/dist/usePagination-BeF5K3M7.js +0 -223
  152. package/dist/user-DbP37Ohh.js +0 -54
  153. package/dist/vue-i18n-BbhkYWlk.js +0 -2365
@@ -0,0 +1,129 @@
1
+ import { defineComponent as j, ref as i, computed as g, onMounted as B, resolveComponent as r, openBlock as m, createBlock as c, unref as o, withCtx as p, createVNode as v, normalizeClass as f, createCommentVNode as k, createElementVNode as L, toDisplayString as F, isRef as M, createElementBlock as O, Fragment as A, renderList as N } from "vue";
2
+ const z = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, E = /* @__PURE__ */ j({
3
+ __name: "FilterChip",
4
+ props: {
5
+ modelValue: {
6
+ type: Array,
7
+ required: !1
8
+ },
9
+ label: {
10
+ type: String,
11
+ required: !1,
12
+ default: ""
13
+ },
14
+ showItemLabel: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ placement: {
19
+ type: String,
20
+ required: !1,
21
+ default: "bottom-end"
22
+ },
23
+ class: {
24
+ type: String,
25
+ required: !1
26
+ },
27
+ disabled: {
28
+ type: Boolean,
29
+ required: !1
30
+ },
31
+ items: {
32
+ type: Array,
33
+ required: !0
34
+ },
35
+ icon: {
36
+ type: String,
37
+ required: !1
38
+ },
39
+ searchable: {
40
+ type: Boolean,
41
+ required: !1,
42
+ default: !0
43
+ }
44
+ },
45
+ emits: ["update:model-value"],
46
+ setup(u, { emit: C }) {
47
+ const t = u, b = C, d = i(!1), l = i({}), s = i(""), V = g(() => {
48
+ const e = Object.keys(l.value).length;
49
+ return !l.value || Object.keys(l.value).length == t.items.length || e === 0 ? "All" : `${e > 0 ? e : "None"} selected`;
50
+ });
51
+ function w(e) {
52
+ l.value[e] ? delete l.value[e] : l.value[e] = !0, b("update:model-value", Object.keys(l.value));
53
+ }
54
+ function _() {
55
+ Object.keys(l.value).length > 0 ? l.value = {} : l.value = t.items.reduce((e, n) => (e[n.value] = !0, e), {}), b("update:model-value", Object.keys(l.value));
56
+ }
57
+ const x = g(() => s.value && s.value.length > 0 ? t.items.filter(
58
+ (e) => e.label.toLowerCase().includes(s.value.trim().toLowerCase())
59
+ ) : t.items);
60
+ return B(() => {
61
+ l.value = t.modelValue.reduce(
62
+ (e, n) => (e[n] = !0, e),
63
+ {}
64
+ ), t.modelValue.length == 0;
65
+ }), (e, n) => {
66
+ const y = r("FmIcon"), q = r("FmChip"), I = r("FmTextField"), h = r("FmMenuItem"), S = r("FmMenu");
67
+ return m(), c(S, {
68
+ placement: u.placement || "bottom-end",
69
+ disabled: u.disabled == !0,
70
+ "model-value": o(d),
71
+ onMenuChanged: n[1] || (n[1] = (a) => d.value = a),
72
+ "close-on-click": !1
73
+ }, {
74
+ "menu-button": p(() => [
75
+ v(q, {
76
+ label: u.label,
77
+ class: f(t.class || "text-fm-color-neutral-gray-400 cursor-pointer")
78
+ }, {
79
+ default: p(() => [
80
+ t.icon ? (m(), c(y, {
81
+ key: 0,
82
+ name: t.icon,
83
+ class: f(t.class),
84
+ outline: "",
85
+ size: "sm"
86
+ }, null, 8, ["name", "class"])) : k("", !0),
87
+ L("div", z, F(t.label) + " " + F(u.showItemLabel ? o(V) : ""), 1),
88
+ v(y, {
89
+ name: o(d) ? "keyboard_arrow_up" : "keyboard_arrow_down",
90
+ class: f(t.class),
91
+ outline: "",
92
+ size: "sm"
93
+ }, null, 8, ["name", "class"])
94
+ ]),
95
+ _: 1
96
+ }, 8, ["label", "class"])
97
+ ]),
98
+ default: p(() => [
99
+ u.searchable ? (m(), c(I, {
100
+ key: 0,
101
+ modelValue: o(s),
102
+ "onUpdate:modelValue": n[0] || (n[0] = (a) => M(s) ? s.value = a : null),
103
+ placeholder: "Search locations",
104
+ class: "my-8"
105
+ }, null, 8, ["modelValue"])) : k("", !0),
106
+ v(h, {
107
+ "model-value": Object.keys(o(l)).length === t.items.length,
108
+ label: "All",
109
+ "has-checkbox": !0,
110
+ indeterminate: !0,
111
+ onClick: _
112
+ }, null, 8, ["model-value"]),
113
+ (m(!0), O(A, null, N(o(x) ?? [], (a) => (m(), c(h, {
114
+ key: a.value,
115
+ value: a.value,
116
+ label: a.label,
117
+ "has-checkbox": !0,
118
+ "model-value": o(l)[a.value],
119
+ "onUpdate:modelValue": (T) => w(a.value)
120
+ }, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
121
+ ]),
122
+ _: 1
123
+ }, 8, ["placement", "disabled", "model-value"]);
124
+ };
125
+ }
126
+ });
127
+ export {
128
+ E as _
129
+ };
@@ -0,0 +1,331 @@
1
+ import { defineComponent as W, ref as P, computed as J, onMounted as Q, resolveComponent as m, openBlock as f, createElementBlock as V, Fragment as A, createVNode as r, unref as o, withCtx as x, createElementVNode as n, toDisplayString as g, renderList as X, createBlock as L, resolveDynamicComponent as Y, h as c } from "vue";
2
+ import { _ as Z } from "./campaign-CpzFl8Vr.js";
3
+ import { useDialog as ee, components as y } from "@feedmepos/ui-library";
4
+ import { a as te, p as oe } from "./plugins-D-4BlIGs.js";
5
+ import { u as ae } from "./loading-D22xapd8.js";
6
+ import { u as ne } from "./business-2hCbD0JX.js";
7
+ import { u as ie } from "./campaign-Bv-8uM2S.js";
8
+ import { b as D, c as G, a as se } from "./campaign-h1J8NTAo.js";
9
+ import { c as re, p as le } from "./duplicateCampaign-YJGHvOqb.js";
10
+ import { _ as ce } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
11
+ import { _ as me } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DlgTeQLe.js";
12
+ import { u as de } from "./template-CXB2Ez2S.js";
13
+ import { u as ue } from "./vue-i18n-DpCWu1gI.js";
14
+ import { _ as pe } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-DGm3gujH.js";
15
+ import { c as _ } from "./index-CrdkPXsx.js";
16
+ const fe = { class: "flex items-center" }, ge = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, ye = { class: "px-24 flex flex-col gap-y-16" }, _e = { class: "flex items-center justify-between w-full" }, he = { class: "flex gap-8 overflow-x-auto" }, we = { class: "space-y-8" }, Ce = { class: "flex w-full gap-4 items-center" }, xe = { class: "space-y-4" }, ve = { class: "fm-typo-en-body-lg-600" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ke = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fe = { class: "flex items-center gap-8" }, Se = { class: "flex flex-col gap-16 text-center" }, Pe = { class: "fm-typo-en-title-sm-800" }, Ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Oe = /* @__PURE__ */ W({
17
+ __name: "Game",
18
+ setup(Ae) {
19
+ const { t: d } = ue(), K = {
20
+ label: d("connect.program.common.actions.create", {
21
+ type: d("connect.program.game.title").toLowerCase()
22
+ }),
23
+ value: "create",
24
+ isPrimary: !0,
25
+ prependIcon: "add"
26
+ }, B = ee(), U = de("GAME", B), h = ne(), u = ie(), { global: I, minor: R } = ae, l = P({
27
+ searchKey: "",
28
+ location: []
29
+ });
30
+ function T(e) {
31
+ const t = l.value.location;
32
+ return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((s) => {
33
+ var i;
34
+ return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(s);
35
+ }) : e.targetLocation.includes(t);
36
+ }
37
+ const w = J(
38
+ () => u.campaigns.token.filter((e) => T(e))
39
+ ), j = [
40
+ {
41
+ header: "Program title",
42
+ accessorKey: "name",
43
+ // accessorFn: (v) => v.name,
44
+ cell(e) {
45
+ return c("div", { class: "flex items-center justify-between gap-4" }, [
46
+ c("div", { class: "flex items-center" }, [
47
+ c(
48
+ y.FmTooltip,
49
+ {
50
+ content: e.row.original._id,
51
+ onClick: (t) => {
52
+ t.stopPropagation(), te(e.row.original._id);
53
+ }
54
+ },
55
+ [
56
+ c(y.FmIcon, {
57
+ name: "info",
58
+ outline: !0,
59
+ size: "sm"
60
+ })
61
+ ]
62
+ )
63
+ ]),
64
+ c("div", { class: "flex-1" }, e.row.original.name)
65
+ ]);
66
+ }
67
+ },
68
+ {
69
+ header: "Status",
70
+ accessorFn: (e) => se(e),
71
+ cell(e) {
72
+ return D(e.row.original);
73
+ }
74
+ },
75
+ {
76
+ header: "Summary",
77
+ accessorFn: (e) => G(e)
78
+ //v.effect,
79
+ },
80
+ {
81
+ header: "Token received",
82
+ accessorFn: (e) => {
83
+ var t;
84
+ return ((t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.currentReceive) ?? 0;
85
+ }
86
+ },
87
+ {
88
+ header: "Actions",
89
+ cell(e) {
90
+ return c("div", { class: "flex items-center gap-8" }, [
91
+ c(y.FmButton, {
92
+ variant: "tertiary",
93
+ icon: "content_copy",
94
+ iconColor: "neutral-gray-400",
95
+ onClick: async (t) => {
96
+ t.stopPropagation(), await M(e.row.original);
97
+ }
98
+ }),
99
+ c(y.FmButton, {
100
+ variant: "tertiary",
101
+ icon: "send",
102
+ iconColor: "neutral-gray-400",
103
+ onClick: (t) => {
104
+ t.stopPropagation(), N(e.row.original);
105
+ }
106
+ }),
107
+ c(y.FmButton, {
108
+ variant: "tertiary",
109
+ icon: "delete",
110
+ iconColor: "neutral-gray-400",
111
+ onClick: (t) => {
112
+ t.stopPropagation(), E(e.row.original);
113
+ }
114
+ })
115
+ ]);
116
+ }
117
+ }
118
+ ], v = P(), $ = P();
119
+ async function E(e) {
120
+ await oe.remove(`Are you sure you want to remove ${e.name}?`) && await R(
121
+ async () => {
122
+ await _.delete(e._id), await u.read("GAME");
123
+ },
124
+ {
125
+ message: `Removing ${e.name}`,
126
+ successMessage: `Removed ${e.name} successfully`
127
+ }
128
+ );
129
+ }
130
+ async function C(e) {
131
+ e ? await t() : U.open(async (s) => {
132
+ await t(s);
133
+ });
134
+ async function t(s) {
135
+ var i;
136
+ (i = v.value) == null || i.showSheet(
137
+ !0,
138
+ "GAME",
139
+ e ? await _.readById(e._id) : void 0,
140
+ s
141
+ );
142
+ }
143
+ }
144
+ async function M(e) {
145
+ var i;
146
+ if (!await re(e.name))
147
+ return;
148
+ const t = await _.readById(e._id), s = le(t);
149
+ (i = v.value) == null || i.showSheet(
150
+ !0,
151
+ "GAME",
152
+ s,
153
+ t.template
154
+ );
155
+ }
156
+ async function H(e) {
157
+ var t, s, i;
158
+ e.campaign._id && ((i = (s = (t = e.campaign) == null ? void 0 : t.game) == null ? void 0 : s.rewards) != null && i.some(
159
+ (p) => p.type === "VOUCHER"
160
+ )) && await new Promise((p) => {
161
+ B.open({
162
+ title: "Confirmation",
163
+ message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
164
+ primaryActions: { text: "Update all", close: !0 },
165
+ secondaryActions: { text: "Update future only", close: !0 }
166
+ }).onPrimary(async () => {
167
+ e.updateCollections = !0, p();
168
+ }).onSecondary(async () => {
169
+ p();
170
+ });
171
+ }), await R(
172
+ async () => {
173
+ e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await u.read("GAME");
174
+ },
175
+ {
176
+ message: `${e.campaign._id ? "Updating" : "Creating"} game program`,
177
+ successMessage: `Game program ${e.campaign._id ? "updated" : "created"} successfully`
178
+ }
179
+ );
180
+ }
181
+ function N(e) {
182
+ var t;
183
+ (t = $.value) == null || t.showSheet({
184
+ campaign: e
185
+ });
186
+ }
187
+ return Q(async () => {
188
+ await I(async () => {
189
+ await u.read("GAME"), await h.readPremium();
190
+ });
191
+ }), (e, t) => {
192
+ const s = m("FmPill"), i = m("FmPageHead"), b = m("FmSearch"), p = m("FmTable"), k = m("FmButton"), O = m("FmListItem"), q = m("FmList"), z = m("FmCard");
193
+ return f(), V(A, null, [
194
+ r(i, {
195
+ actions: o(w).length > 0 && o(h).isPremium ? [K] : [],
196
+ "onClick:action": t[0] || (t[0] = () => C())
197
+ }, {
198
+ title: x(() => [
199
+ n("div", fe, [
200
+ n("span", ge, g(o(d)("connect.program.game.title")), 1),
201
+ r(s, { variant: "premium" })
202
+ ])
203
+ ]),
204
+ _: 1
205
+ }, 8, ["actions"]),
206
+ n("div", ye, [
207
+ r(b, {
208
+ modelValue: o(l).searchKey,
209
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => o(l).searchKey = a),
210
+ class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
211
+ placeholder: "search",
212
+ collapsible: ""
213
+ }, null, 8, ["modelValue"]),
214
+ o(u).campaigns.token && o(u).campaigns.token.length > 0 ? (f(), V(A, { key: 0 }, [
215
+ n("div", _e, [
216
+ n("div", he, [
217
+ r(ce, {
218
+ label: `${o(d)("connect.common.location")}: `,
219
+ "right-icon": "keyboard_arrow_down",
220
+ modelValue: o(l).location,
221
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => o(l).location = a),
222
+ icon: "storefront",
223
+ "show-item-label": !0,
224
+ items: o(h).locationOptions
225
+ }, null, 8, ["label", "modelValue", "items"])
226
+ ]),
227
+ r(b, {
228
+ modelValue: o(l).searchKey,
229
+ "onUpdate:modelValue": t[3] || (t[3] = (a) => o(l).searchKey = a),
230
+ class: "xs:hidden sm:hidden",
231
+ placeholder: "search",
232
+ collapsible: ""
233
+ }, null, 8, ["modelValue"])
234
+ ]),
235
+ r(p, {
236
+ class: "xs:hidden sm:hidden",
237
+ "row-data": o(w),
238
+ "column-defs": j,
239
+ "search-value": o(l).searchKey,
240
+ "column-filter": [],
241
+ onRowClick: t[4] || (t[4] = (a) => C(a.original)),
242
+ "hide-footer": o(w).length < 10
243
+ }, null, 8, ["row-data", "search-value", "hide-footer"]),
244
+ r(q, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
245
+ default: x(() => [
246
+ (f(!0), V(A, null, X(o(w).filter(
247
+ (a) => a.name.toLowerCase().includes(o(l).searchKey.toLowerCase())
248
+ ), (a) => (f(), L(O, {
249
+ key: a._id.toString(),
250
+ onClick: (F) => C(a),
251
+ class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
252
+ }, {
253
+ default: x(() => {
254
+ var F;
255
+ return [
256
+ n("div", we, [
257
+ n("div", Ce, [
258
+ (f(), L(Y(o(D)(a))))
259
+ ]),
260
+ n("div", xe, [
261
+ n("div", ve, g(a.name), 1),
262
+ n("div", be, g(o(G)(a)), 1)
263
+ ]),
264
+ n("div", ke, g(o(d)("connect.program.game.token_received", {
265
+ count: ((F = a.pf_collectible) == null ? void 0 : F.currentReceive) ?? 0
266
+ })), 1)
267
+ ]),
268
+ n("div", Fe, [
269
+ r(k, {
270
+ icon: "content_copy",
271
+ "icon-color": "neutral-gray-400",
272
+ variant: "tertiary",
273
+ onClick: async (S) => {
274
+ S.stopPropagation(), await M(a);
275
+ }
276
+ }, null, 8, ["onClick"]),
277
+ r(k, {
278
+ icon: "delete",
279
+ "icon-color": "neutral-gray-400",
280
+ variant: "tertiary",
281
+ onClick: (S) => (S.stopPropagation(), E(a))
282
+ }, null, 8, ["onClick"])
283
+ ])
284
+ ];
285
+ }),
286
+ _: 2
287
+ }, 1032, ["onClick"]))), 128))
288
+ ]),
289
+ _: 1
290
+ })
291
+ ], 64)) : (f(), L(z, {
292
+ key: 1,
293
+ variant: "outlined",
294
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
295
+ }, {
296
+ default: x(() => [
297
+ t[6] || (t[6] = n("img", {
298
+ src: Z,
299
+ class: "aspect-square w-[150px]"
300
+ }, null, -1)),
301
+ n("div", Se, [
302
+ n("div", Pe, g(o(d)("connect.program.game.empty_state.title")), 1),
303
+ n("div", Ve, g(o(d)("connect.program.game.empty_state.description")), 1)
304
+ ]),
305
+ r(k, {
306
+ variant: "primary",
307
+ label: "Create game program",
308
+ icon: "add",
309
+ disabled: !o(h).isPremium,
310
+ onClick: t[5] || (t[5] = (a) => C())
311
+ }, null, 8, ["disabled"])
312
+ ]),
313
+ _: 1
314
+ })),
315
+ r(me, {
316
+ ref_key: "sheetRef",
317
+ ref: v,
318
+ "onSubmit:modelValue": H
319
+ }, null, 512),
320
+ r(pe, {
321
+ ref_key: "sendCollectionSheetRef",
322
+ ref: $
323
+ }, null, 512)
324
+ ])
325
+ ], 64);
326
+ };
327
+ }
328
+ });
329
+ export {
330
+ Oe as default
331
+ };