@feedmepos/mf-connect 0.1.98-beta.13 → 0.1.98-beta.15

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 (138) hide show
  1. package/package.json +1 -1
  2. package/dist/App-DQqZfak3.js +0 -4782
  3. package/dist/AuditLogs-C19m85wp.js +0 -2013
  4. package/dist/Bin-GjJ5Q2ae.js +0 -166
  5. package/dist/Broadcast-CVTBL0T0.js +0 -266
  6. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B6BYvVmq.js +0 -120
  7. package/dist/Card-DzYit3v6.js +0 -910
  8. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
  9. package/dist/Collections-CaU7auvn.js +0 -540
  10. package/dist/Credit-B_eUMV0R.js +0 -260
  11. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
  12. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  13. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bgcm1S_g.js +0 -3377
  14. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CZLoCJM4.js +0 -351
  15. package/dist/Experience-B7kxE07l.js +0 -259
  16. package/dist/FileSaver.min-BBvy4uPh.js +0 -74
  17. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  18. package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +0 -52
  19. package/dist/Game-B98hcWvR.js +0 -330
  20. package/dist/Grab-RdxV7xhM.js +0 -300
  21. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BBYekrJp.js +0 -145
  22. package/dist/Index-CvMVxCY5.js +0 -259
  23. package/dist/JsonViewer-v8_C7l5N.js +0 -87
  24. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-D4-wjMg6.js +0 -48
  25. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-Jir8zY8e.js +0 -18737
  26. package/dist/LoyaltyDashboard-B1OzFT4q.js +0 -1082
  27. package/dist/MainLayout-De_edc-D.js +0 -41
  28. package/dist/Marketing-B7-To3XF.js +0 -235
  29. package/dist/MarketingMaterialEdit-DGONncxn.js +0 -1035
  30. package/dist/Member-DEGCrqnh.js +0 -280
  31. package/dist/MemberList-vKYbpLVu.js +0 -1601
  32. package/dist/MemberOverview-wL_ailso.js +0 -58
  33. package/dist/MemberTransactions-CGC3vYKC.js +0 -45
  34. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BP9YtuPA.js +0 -60802
  35. package/dist/Mission-hxf_AIGL.js +0 -334
  36. package/dist/Overview-NvgUuMYp.js +0 -949
  37. package/dist/Overview-iRLMLoAo.js +0 -1079
  38. package/dist/Point-tkUTXOCe.js +0 -262
  39. package/dist/Promotion-DNUcMKJQ.js +0 -397
  40. package/dist/Queue-5XYiIuG8.js +0 -260
  41. package/dist/Record-B5aYp7eF.js +0 -342
  42. package/dist/Review-BqaHlzXV.js +0 -45
  43. package/dist/ReviewFacebookCallback-BqlFkSB7.js +0 -248
  44. package/dist/ReviewGoogleCallback-ssKL4jh4.js +0 -213
  45. package/dist/Reward-1xOMowTW.js +0 -442
  46. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-Db3FSfIc.js +0 -149
  47. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Cmrp2Tia.js +0 -1911
  48. package/dist/Segment-BMBwsUug.js +0 -1014
  49. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-DSfdei-h.js +0 -181
  50. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-BJVeGJ5J.js +0 -188
  51. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-OBZubKUy.js +0 -226
  52. package/dist/Setting-DWygYkHW.js +0 -2047
  53. package/dist/SettingAdvertisements-TYB1b7dB.js +0 -264
  54. package/dist/Settings-DynjmCPL.js +0 -220
  55. package/dist/Store-DRYkmigC.js +0 -1996
  56. package/dist/StoreRewards-DU8eWbXE.js +0 -540
  57. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BkqBjEFm.js +0 -1130
  58. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-l6KmXVBZ.js +0 -7007
  59. package/dist/Tier-4k8SxKtl.js +0 -969
  60. package/dist/Title-B9lWQ_jl.js +0 -566
  61. package/dist/Transaction-C38Yd0tf.js +0 -39
  62. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-D6tgpKpc.js +0 -130
  63. package/dist/Voucher-BQbqC7RV.js +0 -421
  64. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-erwpbvYi.js +0 -421
  65. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-Dt05b7fU.js +0 -56
  66. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  67. package/dist/app-BTm9mz0r.js +0 -59940
  68. package/dist/app-wDQR6dpb.js +0 -39
  69. package/dist/app.js +0 -7
  70. package/dist/business-B7GwHLce.js +0 -82
  71. package/dist/campaign-BCdKDHgz.js +0 -277
  72. package/dist/campaign-CpzFl8Vr.js +0 -4
  73. package/dist/campaign-DWlsbsKQ.js +0 -219
  74. package/dist/campaign.enum-BgK4maXz.js +0 -26
  75. package/dist/campaign.fn-DxnwGCB2.js +0 -776
  76. package/dist/collectible.enum-CdOSUDwG.js +0 -19
  77. package/dist/duplicateCampaign-BSHe0P-g.js +0 -51
  78. package/dist/effect-C7wkN_13.js +0 -89
  79. package/dist/email-addresses-DJycNI7L.js +0 -705
  80. package/dist/export-uIHWDxuh.js +0 -97
  81. package/dist/feedme.ico +0 -0
  82. package/dist/google-BQK68wbe.js +0 -5
  83. package/dist/helper-czpAhAIw.js +0 -86
  84. package/dist/index-5Sa4xS2m.js +0 -151
  85. package/dist/index-5WGEWCcI.js +0 -3
  86. package/dist/index-B2C7kc4z.js +0 -31
  87. package/dist/index-B5eb6_bi.js +0 -3678
  88. package/dist/index-B7nE1Pb2.js +0 -67
  89. package/dist/index-BFAHLexA.js +0 -32
  90. package/dist/index-BanxlNli.js +0 -8910
  91. package/dist/index-ByHoFriu.js +0 -85
  92. package/dist/index-Ca2bBJuR.js +0 -54
  93. package/dist/index-CuvNtC_M.js +0 -61
  94. package/dist/index-D-kYrDAi.js +0 -30289
  95. package/dist/index-D2gAYMIp.js +0 -28900
  96. package/dist/index-DWxmK2NJ.js +0 -61
  97. package/dist/index-U_rwkNKU.js +0 -2819
  98. package/dist/index-knizSLfz.js +0 -1157
  99. package/dist/index-vh86FiIQ.js +0 -10
  100. package/dist/index.esm2017-DFVkiPjd.js +0 -3069
  101. package/dist/loading-B3OgwEC8.js +0 -72
  102. package/dist/lodash-CiRTkvui.js +0 -3678
  103. package/dist/membership-s2VKnu_8.js +0 -255
  104. package/dist/moment-D7p2TMB-.js +0 -2583
  105. package/dist/money-DqxOXYd0.js +0 -15
  106. package/dist/number-Bt4sacaM.js +0 -12
  107. package/dist/object-BYyQ0PZp.js +0 -18
  108. package/dist/objectId-dwaoBfJX.js +0 -7
  109. package/dist/objectid-CxCupSWP.js +0 -145
  110. package/dist/plugins-CQ1JAqJB.js +0 -1788
  111. package/dist/reward-pjbal-XX.js +0 -36
  112. package/dist/rule-CzU2GAur.js +0 -1969
  113. package/dist/string-Gcy5IM_H.js +0 -32
  114. package/dist/style.css +0 -4
  115. package/dist/template-7yiMSL1f.js +0 -188
  116. package/dist/tier-BJDhpH6X.js +0 -4
  117. package/dist/tiers/tier=1.png +0 -0
  118. package/dist/tiers/tier=2.png +0 -0
  119. package/dist/tiers/tier=3.png +0 -0
  120. package/dist/tiers/tier=4.png +0 -0
  121. package/dist/titles/type=diamond.png +0 -0
  122. package/dist/titles/type=drinks.png +0 -0
  123. package/dist/titles/type=food.png +0 -0
  124. package/dist/titles/type=heart.png +0 -0
  125. package/dist/titles/type=medal.png +0 -0
  126. package/dist/titles/type=spend.png +0 -0
  127. package/dist/titles/type=thank-you.png +0 -0
  128. package/dist/titles/type=thumbs-up.png +0 -0
  129. package/dist/titles/type=years.png +0 -0
  130. package/dist/trigger-C5bqlYHn.js +0 -213
  131. package/dist/tslib.es6-BCqqvLQ_.js +0 -44
  132. package/dist/type_drinks-D6jnpvwV.js +0 -4
  133. package/dist/useMarketingMaterialActions-CW_QRtQb.js +0 -107
  134. package/dist/usePagination-D2pke4vy.js +0 -220
  135. package/dist/user-BcXrT_t5.js +0 -55
  136. package/dist/vue-i18n-CFNkj6JK.js +0 -2365
  137. package/dist/xlsx-DyVY5_Qx.js +0 -15491
  138. package/dist/zod-BD_8DRqQ.js +0 -91
@@ -1,129 +0,0 @@
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
- };
@@ -1,52 +0,0 @@
1
- import { defineComponent as _, ref as f, resolveComponent as t, openBlock as o, createBlock as r, withCtx as d, createVNode as x, createElementVNode as b, normalizeStyle as h, createElementBlock as F, Fragment as w, renderList as y } from "vue";
2
- const V = ["id"], k = /* @__PURE__ */ _({
3
- __name: "FmTableSelection",
4
- props: {
5
- value: {},
6
- items: {}
7
- },
8
- emits: ["update:modelValue"],
9
- setup(n, { emit: s }) {
10
- const p = s, a = n, u = f(!1);
11
- return (g, m) => {
12
- const i = t("FmButton"), c = t("FmMenuItem"), v = t("FmMenu");
13
- return o(), r(v, {
14
- "max-height": 264,
15
- shift: "",
16
- onMenuChanged: m[0] || (m[0] = (e) => u.value = e)
17
- }, {
18
- "menu-button": d(() => {
19
- var e;
20
- return [
21
- x(i, {
22
- icon: u.value ? "expand_less" : "expand_more",
23
- label: (e = n.items.find((l) => l.value === a.value)) == null ? void 0 : e.label,
24
- "icon-position": "append",
25
- size: "md",
26
- variant: "tertiary"
27
- }, null, 8, ["icon", "label"])
28
- ];
29
- }),
30
- "menu-wrapper": d(({ maxHeight: e }) => [
31
- b("div", {
32
- id: `menu-wrapper-${e}`,
33
- style: h({ maxHeight: `${e}px` }),
34
- class: "bg-fm-color-neutral-white flex flex-col overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"
35
- }, [
36
- (o(!0), F(w, null, y(n.items, (l) => (o(), r(c, {
37
- key: l.value,
38
- label: l.label,
39
- value: l.value,
40
- "model-value": l.value === a.value,
41
- "onUpdate:modelValue": (B) => p("update:modelValue", l.value)
42
- }, null, 8, ["label", "value", "model-value", "onUpdate:modelValue"]))), 128))
43
- ], 12, V)
44
- ]),
45
- _: 1
46
- });
47
- };
48
- }
49
- });
50
- export {
51
- k as _
52
- };
@@ -1,330 +0,0 @@
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 { c as te, p as oe } from "./plugins-CQ1JAqJB.js";
5
- import { u as ae } from "./loading-B3OgwEC8.js";
6
- import { u as ne } from "./business-B7GwHLce.js";
7
- import { u as ie, c as _ } from "./campaign-DWlsbsKQ.js";
8
- import { b as D, c as G, a as se } from "./campaign-BCdKDHgz.js";
9
- import { c as re, p as le } from "./duplicateCampaign-BSHe0P-g.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-Bgcm1S_g.js";
12
- import { u as de } from "./template-7yiMSL1f.js";
13
- import { u as ue } from "./vue-i18n-CFNkj6JK.js";
14
- import { _ as pe } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-BJVeGJ5J.js";
15
- 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" }, Ne = /* @__PURE__ */ W({
16
- __name: "Game",
17
- setup(Ae) {
18
- const { t: d } = ue(), K = {
19
- label: d("connect.program.common.actions.create", {
20
- type: d("connect.program.game.title").toLowerCase()
21
- }),
22
- value: "create",
23
- isPrimary: !0,
24
- prependIcon: "add"
25
- }, B = ee(), U = de("GAME", B), h = ne(), u = ie(), { global: I, minor: R } = ae, l = P({
26
- searchKey: "",
27
- location: []
28
- });
29
- function T(e) {
30
- const t = l.value.location;
31
- return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((s) => {
32
- var i;
33
- return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(s);
34
- }) : e.targetLocation.includes(t);
35
- }
36
- const w = J(
37
- () => u.campaigns.token.filter((e) => T(e))
38
- ), j = [
39
- {
40
- header: "Program title",
41
- accessorKey: "name",
42
- // accessorFn: (v) => v.name,
43
- cell(e) {
44
- return c("div", { class: "flex items-center justify-between gap-4" }, [
45
- c("div", { class: "flex items-center" }, [
46
- c(
47
- y.FmTooltip,
48
- {
49
- content: e.row.original._id,
50
- onClick: (t) => {
51
- t.stopPropagation(), te(e.row.original._id);
52
- }
53
- },
54
- [
55
- c(y.FmIcon, {
56
- name: "info",
57
- outline: !0,
58
- size: "sm"
59
- })
60
- ]
61
- )
62
- ]),
63
- c("div", { class: "flex-1" }, e.row.original.name)
64
- ]);
65
- }
66
- },
67
- {
68
- header: "Status",
69
- accessorFn: (e) => se(e),
70
- cell(e) {
71
- return D(e.row.original);
72
- }
73
- },
74
- {
75
- header: "Summary",
76
- accessorFn: (e) => G(e)
77
- //v.effect,
78
- },
79
- {
80
- header: "Token received",
81
- accessorFn: (e) => {
82
- var t;
83
- return ((t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.currentReceive) ?? 0;
84
- }
85
- },
86
- {
87
- header: "Actions",
88
- cell(e) {
89
- return c("div", { class: "flex items-center gap-8" }, [
90
- c(y.FmButton, {
91
- variant: "tertiary",
92
- icon: "content_copy",
93
- iconColor: "neutral-gray-400",
94
- onClick: async (t) => {
95
- t.stopPropagation(), await M(e.row.original);
96
- }
97
- }),
98
- c(y.FmButton, {
99
- variant: "tertiary",
100
- icon: "send",
101
- iconColor: "neutral-gray-400",
102
- onClick: (t) => {
103
- t.stopPropagation(), N(e.row.original);
104
- }
105
- }),
106
- c(y.FmButton, {
107
- variant: "tertiary",
108
- icon: "delete",
109
- iconColor: "neutral-gray-400",
110
- onClick: (t) => {
111
- t.stopPropagation(), E(e.row.original);
112
- }
113
- })
114
- ]);
115
- }
116
- }
117
- ], v = P(), $ = P();
118
- async function E(e) {
119
- await oe.remove(`Are you sure you want to remove ${e.name}?`) && await R(
120
- async () => {
121
- await _.delete(e._id), await u.read("GAME");
122
- },
123
- {
124
- message: `Removing ${e.name}`,
125
- successMessage: `Removed ${e.name} successfully`
126
- }
127
- );
128
- }
129
- async function C(e) {
130
- e ? await t() : U.open(async (s) => {
131
- await t(s);
132
- });
133
- async function t(s) {
134
- var i;
135
- (i = v.value) == null || i.showSheet(
136
- !0,
137
- "GAME",
138
- e ? await _.readById(e._id) : void 0,
139
- s
140
- );
141
- }
142
- }
143
- async function M(e) {
144
- var i;
145
- if (!await re(e.name))
146
- return;
147
- const t = await _.readById(e._id), s = le(t);
148
- (i = v.value) == null || i.showSheet(
149
- !0,
150
- "GAME",
151
- s,
152
- t.template
153
- );
154
- }
155
- async function H(e) {
156
- var t, s, i;
157
- e.campaign._id && ((i = (s = (t = e.campaign) == null ? void 0 : t.game) == null ? void 0 : s.rewards) != null && i.some(
158
- (p) => p.type === "VOUCHER"
159
- )) && await new Promise((p) => {
160
- B.open({
161
- title: "Confirmation",
162
- message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
163
- primaryActions: { text: "Update all", close: !0 },
164
- secondaryActions: { text: "Update future only", close: !0 }
165
- }).onPrimary(async () => {
166
- e.updateCollections = !0, p();
167
- }).onSecondary(async () => {
168
- p();
169
- });
170
- }), await R(
171
- async () => {
172
- e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await u.read("GAME");
173
- },
174
- {
175
- message: `${e.campaign._id ? "Updating" : "Creating"} game program`,
176
- successMessage: `Game program ${e.campaign._id ? "updated" : "created"} successfully`
177
- }
178
- );
179
- }
180
- function N(e) {
181
- var t;
182
- (t = $.value) == null || t.showSheet({
183
- campaign: e
184
- });
185
- }
186
- return Q(async () => {
187
- await I(async () => {
188
- await u.read("GAME"), await h.readPremium();
189
- });
190
- }), (e, t) => {
191
- 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");
192
- return f(), V(A, null, [
193
- r(i, {
194
- actions: o(w).length > 0 && o(h).isPremium ? [K] : [],
195
- "onClick:action": t[0] || (t[0] = () => C())
196
- }, {
197
- title: x(() => [
198
- n("div", fe, [
199
- n("span", ge, g(o(d)("connect.program.game.title")), 1),
200
- r(s, { variant: "premium" })
201
- ])
202
- ]),
203
- _: 1
204
- }, 8, ["actions"]),
205
- n("div", ye, [
206
- r(b, {
207
- modelValue: o(l).searchKey,
208
- "onUpdate:modelValue": t[1] || (t[1] = (a) => o(l).searchKey = a),
209
- class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
210
- placeholder: "search",
211
- collapsible: ""
212
- }, null, 8, ["modelValue"]),
213
- o(u).campaigns.token && o(u).campaigns.token.length > 0 ? (f(), V(A, { key: 0 }, [
214
- n("div", _e, [
215
- n("div", he, [
216
- r(ce, {
217
- label: `${o(d)("connect.common.location")}: `,
218
- "right-icon": "keyboard_arrow_down",
219
- modelValue: o(l).location,
220
- "onUpdate:modelValue": t[2] || (t[2] = (a) => o(l).location = a),
221
- icon: "storefront",
222
- "show-item-label": !0,
223
- items: o(h).locationOptions
224
- }, null, 8, ["label", "modelValue", "items"])
225
- ]),
226
- r(b, {
227
- modelValue: o(l).searchKey,
228
- "onUpdate:modelValue": t[3] || (t[3] = (a) => o(l).searchKey = a),
229
- class: "xs:hidden sm:hidden",
230
- placeholder: "search",
231
- collapsible: ""
232
- }, null, 8, ["modelValue"])
233
- ]),
234
- r(p, {
235
- class: "xs:hidden sm:hidden",
236
- "row-data": o(w),
237
- "column-defs": j,
238
- "search-value": o(l).searchKey,
239
- "column-filter": [],
240
- onRowClick: t[4] || (t[4] = (a) => C(a.original)),
241
- "hide-footer": o(w).length < 10
242
- }, null, 8, ["row-data", "search-value", "hide-footer"]),
243
- r(q, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
244
- default: x(() => [
245
- (f(!0), V(A, null, X(o(w).filter(
246
- (a) => a.name.toLowerCase().includes(o(l).searchKey.toLowerCase())
247
- ), (a) => (f(), L(O, {
248
- key: a._id.toString(),
249
- onClick: (F) => C(a),
250
- class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
251
- }, {
252
- default: x(() => {
253
- var F;
254
- return [
255
- n("div", we, [
256
- n("div", Ce, [
257
- (f(), L(Y(o(D)(a))))
258
- ]),
259
- n("div", xe, [
260
- n("div", ve, g(a.name), 1),
261
- n("div", be, g(o(G)(a)), 1)
262
- ]),
263
- n("div", ke, g(o(d)("connect.program.game.token_received", {
264
- count: ((F = a.pf_collectible) == null ? void 0 : F.currentReceive) ?? 0
265
- })), 1)
266
- ]),
267
- n("div", Fe, [
268
- r(k, {
269
- icon: "content_copy",
270
- "icon-color": "neutral-gray-400",
271
- variant: "tertiary",
272
- onClick: async (S) => {
273
- S.stopPropagation(), await M(a);
274
- }
275
- }, null, 8, ["onClick"]),
276
- r(k, {
277
- icon: "delete",
278
- "icon-color": "neutral-gray-400",
279
- variant: "tertiary",
280
- onClick: (S) => (S.stopPropagation(), E(a))
281
- }, null, 8, ["onClick"])
282
- ])
283
- ];
284
- }),
285
- _: 2
286
- }, 1032, ["onClick"]))), 128))
287
- ]),
288
- _: 1
289
- })
290
- ], 64)) : (f(), L(z, {
291
- key: 1,
292
- variant: "outlined",
293
- class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
294
- }, {
295
- default: x(() => [
296
- t[6] || (t[6] = n("img", {
297
- src: Z,
298
- class: "aspect-square w-[150px]"
299
- }, null, -1)),
300
- n("div", Se, [
301
- n("div", Pe, g(o(d)("connect.program.game.empty_state.title")), 1),
302
- n("div", Ve, g(o(d)("connect.program.game.empty_state.description")), 1)
303
- ]),
304
- r(k, {
305
- variant: "primary",
306
- label: "Create game program",
307
- icon: "add",
308
- disabled: !o(h).isPremium,
309
- onClick: t[5] || (t[5] = (a) => C())
310
- }, null, 8, ["disabled"])
311
- ]),
312
- _: 1
313
- })),
314
- r(me, {
315
- ref_key: "sheetRef",
316
- ref: v,
317
- "onSubmit:modelValue": H
318
- }, null, 512),
319
- r(pe, {
320
- ref_key: "sendCollectionSheetRef",
321
- ref: $
322
- }, null, 512)
323
- ])
324
- ], 64);
325
- };
326
- }
327
- });
328
- export {
329
- Ne as default
330
- };