@feedmepos/mf-connect 0.1.98-beta.4 → 0.1.98-beta.40

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 (135) hide show
  1. package/package.json +3 -3
  2. package/dist/App-BGv_JihW.js +0 -4642
  3. package/dist/AuditLogs-53rnjCmD.js +0 -2013
  4. package/dist/Bin-B0Q_WpuY.js +0 -166
  5. package/dist/Broadcast-PiJE1Syl.js +0 -266
  6. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Dz2KsBZl.js +0 -120
  7. package/dist/Card-DlqMu3Sl.js +0 -910
  8. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
  9. package/dist/Collections-BWcBlDDR.js +0 -540
  10. package/dist/Credit-CMfcuj5n.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-DCvH0lGA.js +0 -3377
  14. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-B_FyeWq4.js +0 -351
  15. package/dist/Experience-DacFmPYy.js +0 -259
  16. package/dist/FileSaver.min-CMZKiGkX.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-DXKnGuhR.js +0 -330
  20. package/dist/Grab-DaBL5y3H.js +0 -300
  21. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BaY_nQio.js +0 -145
  22. package/dist/Index-2UrjF35w.js +0 -259
  23. package/dist/JsonViewer-v8_C7l5N.js +0 -87
  24. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-BuVBZsCN.js +0 -48
  25. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-6wUxYqWe.js +0 -18737
  26. package/dist/LoyaltyDashboard-DIArPp71.js +0 -1082
  27. package/dist/MainLayout-BjvTxTPG.js +0 -41
  28. package/dist/Marketing-DEp--hFd.js +0 -235
  29. package/dist/MarketingMaterialEdit-BHL8Ptsu.js +0 -1035
  30. package/dist/Member-BU1YxoEV.js +0 -280
  31. package/dist/MemberList-zjvJBYf0.js +0 -1601
  32. package/dist/MemberOverview-wL_ailso.js +0 -58
  33. package/dist/MemberTransactions-BvyLV69V.js +0 -45
  34. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-_YOM1SlS.js +0 -60802
  35. package/dist/Mission-BNYk_aPM.js +0 -334
  36. package/dist/Overview-BToUlbsH.js +0 -1079
  37. package/dist/Point-B-L2326L.js +0 -262
  38. package/dist/Promotion-sMKGkL4w.js +0 -397
  39. package/dist/Queue-D3vUkKN9.js +0 -260
  40. package/dist/Record-BViEbZZ8.js +0 -342
  41. package/dist/Review-CMBAk-Qu.js +0 -1067
  42. package/dist/ReviewFacebookCallback-BCJTFy3b.js +0 -243
  43. package/dist/ReviewGoogleCallback-DKUG075r.js +0 -208
  44. package/dist/Reward-CZsvsYW_.js +0 -442
  45. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-BASPLoRa.js +0 -149
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-B90meAnV.js +0 -1911
  47. package/dist/Segment-CN8NEg8w.js +0 -1014
  48. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BGyYQST4.js +0 -181
  49. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-BxW-Kc6t.js +0 -188
  50. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-C9dwcEr5.js +0 -226
  51. package/dist/Setting-DLPbZW11.js +0 -2047
  52. package/dist/SettingAdvertisements-BIq8gS5g.js +0 -264
  53. package/dist/Store-DNB3gUIR.js +0 -1996
  54. package/dist/StoreRewards-BoEjVFk6.js +0 -540
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Bv9ABH1K.js +0 -1130
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DNHgSfIg.js +0 -7007
  57. package/dist/Tier-kQ6X9h-t.js +0 -969
  58. package/dist/Title-XosVAF2Y.js +0 -566
  59. package/dist/Transaction-CO6oLPKR.js +0 -39
  60. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-McMR2Y7Y.js +0 -130
  61. package/dist/Voucher-CogaCxx2.js +0 -421
  62. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DjHwHFBq.js +0 -421
  63. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-Dor9klZ8.js +0 -56
  64. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  65. package/dist/app-C9UPXbDs.js +0 -59737
  66. package/dist/app-wDQR6dpb.js +0 -39
  67. package/dist/app.js +0 -7
  68. package/dist/business-CYpW6-Ls.js +0 -82
  69. package/dist/campaign-BtLa7KeF.js +0 -277
  70. package/dist/campaign-CpzFl8Vr.js +0 -4
  71. package/dist/campaign-CtoHyXVT.js +0 -219
  72. package/dist/campaign.enum-DiLhS5il.js +0 -26
  73. package/dist/campaign.fn-CLB9gBHo.js +0 -776
  74. package/dist/collectible.enum-CmwWcfBh.js +0 -19
  75. package/dist/duplicateCampaign-DGhOBd5l.js +0 -51
  76. package/dist/effect-CY5Y6sxy.js +0 -89
  77. package/dist/email-addresses-BEnOHWj_.js +0 -705
  78. package/dist/export-BgYu7SCd.js +0 -97
  79. package/dist/feedme.ico +0 -0
  80. package/dist/helper-DTDgoyEh.js +0 -86
  81. package/dist/index-B4IAURA_.js +0 -3684
  82. package/dist/index-BZVhi3ZG.js +0 -28900
  83. package/dist/index-C8ehLvXG.js +0 -31
  84. package/dist/index-CDk0Itu1.js +0 -32
  85. package/dist/index-CLZnH782.js +0 -54
  86. package/dist/index-CNKP1_IW.js +0 -30289
  87. package/dist/index-CP-7qATP.js +0 -67
  88. package/dist/index-Ck3PeOQ5.js +0 -1157
  89. package/dist/index-CuvNtC_M.js +0 -61
  90. package/dist/index-DntoqWT_.js +0 -85
  91. package/dist/index-DtyWsBgg.js +0 -3
  92. package/dist/index-P8Qh2yIP.js +0 -52
  93. package/dist/index-goRooQn5.js +0 -2802
  94. package/dist/index-kS20rM5m.js +0 -8910
  95. package/dist/index-vh86FiIQ.js +0 -10
  96. package/dist/index-zF0gIg9H.js +0 -151
  97. package/dist/index.esm2017-C79fd6cz.js +0 -3069
  98. package/dist/loading-Dfr_97Ri.js +0 -72
  99. package/dist/lodash-BX2mJOxF.js +0 -3678
  100. package/dist/membership-ncNOUJwj.js +0 -255
  101. package/dist/moment-D7p2TMB-.js +0 -2583
  102. package/dist/money-vEtTzt04.js +0 -15
  103. package/dist/number-BjgTlMsp.js +0 -12
  104. package/dist/object-BYyQ0PZp.js +0 -18
  105. package/dist/objectId-dwaoBfJX.js +0 -7
  106. package/dist/objectid-C9DiLwge.js +0 -145
  107. package/dist/plugins-BVGqEmE1.js +0 -1788
  108. package/dist/reward-BGTLhhzT.js +0 -36
  109. package/dist/rule-BB2VX3Gy.js +0 -1969
  110. package/dist/string-Gcy5IM_H.js +0 -32
  111. package/dist/style.css +0 -4
  112. package/dist/template-DLiHnpjK.js +0 -188
  113. package/dist/tier-BJDhpH6X.js +0 -4
  114. package/dist/tiers/tier=1.png +0 -0
  115. package/dist/tiers/tier=2.png +0 -0
  116. package/dist/tiers/tier=3.png +0 -0
  117. package/dist/tiers/tier=4.png +0 -0
  118. package/dist/titles/type=diamond.png +0 -0
  119. package/dist/titles/type=drinks.png +0 -0
  120. package/dist/titles/type=food.png +0 -0
  121. package/dist/titles/type=heart.png +0 -0
  122. package/dist/titles/type=medal.png +0 -0
  123. package/dist/titles/type=spend.png +0 -0
  124. package/dist/titles/type=thank-you.png +0 -0
  125. package/dist/titles/type=thumbs-up.png +0 -0
  126. package/dist/titles/type=years.png +0 -0
  127. package/dist/trigger-DrKnfSoi.js +0 -213
  128. package/dist/tslib.es6-BCqqvLQ_.js +0 -44
  129. package/dist/type_drinks-D6jnpvwV.js +0 -4
  130. package/dist/useMarketingMaterialActions-B6zaDbNE.js +0 -107
  131. package/dist/usePagination-Dgd-onzU.js +0 -220
  132. package/dist/user-BcDUmNrZ.js +0 -55
  133. package/dist/vue-i18n-DNBGmwox.js +0 -2365
  134. package/dist/xlsx-BX-U0_Au.js +0 -15491
  135. package/dist/zod-Mx51GBPY.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-BVGqEmE1.js";
5
- import { u as ae } from "./loading-Dfr_97Ri.js";
6
- import { u as ne } from "./business-CYpW6-Ls.js";
7
- import { u as ie, c as _ } from "./campaign-CtoHyXVT.js";
8
- import { b as D, c as G, a as se } from "./campaign-BtLa7KeF.js";
9
- import { c as re, p as le } from "./duplicateCampaign-DGhOBd5l.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-DCvH0lGA.js";
12
- import { u as de } from "./template-DLiHnpjK.js";
13
- import { u as ue } from "./vue-i18n-DNBGmwox.js";
14
- import { _ as pe } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-BxW-Kc6t.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
- };