@feedmepos/mf-connect 0.1.38-beta.74 → 0.1.38-beta.75
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.
- package/dist/Analytic-9B27Q-I3.js +761 -0
- package/dist/App-isiE4pjM.js +4642 -0
- package/dist/AuditLogs-BmHr7pNI.js +1991 -0
- package/dist/Bin-BR06pDbx.js +166 -0
- package/dist/Broadcast-D_t80J2I.js +267 -0
- package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C5IuPCTB.js +121 -0
- package/dist/Card-Zs-1lcSr.js +910 -0
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
- package/dist/Collections-BjeTJSHo.js +541 -0
- package/dist/Credit-DdmdsxOF.js +261 -0
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
- package/dist/DateInput.vue_vue_type_script_setup_true_lang-BN4Q5Y3l.js +54 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DkOfrONH.js +3120 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-kzk3iEKA.js +351 -0
- package/dist/Experience-WxtE9ZIT.js +260 -0
- package/dist/FileSaver.min-Vgxo4jNi.js +74 -0
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/Game-Cc0mZ3y4.js +331 -0
- package/dist/GenerateMaterial-Dsvnpz4o.js +589 -0
- package/dist/Grab-CcaXToD-.js +301 -0
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D0yJMgs9.js +145 -0
- package/dist/Index-C0TcFJJY.js +259 -0
- package/dist/JsonViewer-v8_C7l5N.js +87 -0
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-CXFtSS9_.js +48 -0
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-Ca7hKpcD.js +18737 -0
- package/dist/MainLayout-DPpjvWwq.js +41 -0
- package/dist/Marketing-DfXuNM7X.js +145 -0
- package/dist/MarketingMaterialEdit-C63qyQSd.js +746 -0
- package/dist/Member-LTYVn-80.js +280 -0
- package/dist/MemberList-Gqr6ha5p.js +1601 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/MemberTransactions-CVZ-SPhm.js +45 -0
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BGooFTgg.js +60799 -0
- package/dist/Mission-CLQdNsOe.js +335 -0
- package/dist/Overview-BluyLBRI.js +1078 -0
- package/dist/Point-DQLQxJG1.js +263 -0
- package/dist/Promotion-BG0xL1ed.js +397 -0
- package/dist/Queue-BR7TrLI8.js +259 -0
- package/dist/Record-2WFpDhAb.js +341 -0
- package/dist/Review-Bu9SGftr.js +617 -0
- package/dist/ReviewFacebookCallback-CV99Udei.js +243 -0
- package/dist/ReviewGoogleCallback-DiqgQzOt.js +213 -0
- package/dist/Reward-CPhM3ChT.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-Q9pVq11w.js +149 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BRUQtqjv.js +1912 -0
- package/dist/Segment-D6V8FKUY.js +881 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BrE1gGHP.js +181 -0
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-DQhO9k7V.js +188 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyHx6m95.js +147 -0
- package/dist/Setting-Bh5bB75w.js +2000 -0
- package/dist/SettingAdvertisements-CFUjq6s1.js +264 -0
- package/dist/Store-DiVaUn7w.js +1996 -0
- package/dist/StoreRewards-Bb9iW3Yz.js +535 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DVFsPzLK.js +1129 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D9uZR0si.js +7005 -0
- package/dist/Tier-BYxLjqAB.js +970 -0
- package/dist/Title-D3cdNE2O.js +568 -0
- package/dist/Transaction-D7ItbBra.js +39 -0
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-UXSlpEM0.js +130 -0
- package/dist/Voucher-DNQz_ujN.js +422 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CztGuaCV.js +421 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-RI0mY3Nx.js +56 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-wDQR6dpb.js +39 -0
- package/dist/app-zPef9Uzl.js +59396 -0
- package/dist/app.js +7 -0
- package/dist/business-DKEB57Mf.js +82 -0
- package/dist/campaign-BD_s6pW4.js +100 -0
- package/dist/campaign-CpzFl8Vr.js +4 -0
- package/dist/campaign-D9IfNIPI.js +253 -0
- package/dist/campaign.enum-gPz5hWSW.js +26 -0
- package/dist/campaign.fn-Csxad3W7.js +776 -0
- package/dist/collectible.enum-CA-QbTP-.js +19 -0
- package/dist/collection.fn-tFxG0UiA.js +26 -0
- package/dist/dto-CdvywxS_.js +222 -0
- package/dist/duplicateCampaign-Cj68m0Ti.js +51 -0
- package/dist/effect-KecOJIEK.js +89 -0
- package/dist/email-addresses-Ske7sY-s.js +705 -0
- package/dist/export-17vDh5vq.js +97 -0
- package/dist/feedme.ico +0 -0
- package/dist/helper-B-ZDFjy7.js +86 -0
- package/dist/index-BRZC-Cy5.js +85 -0
- package/dist/index-BV_G-XzK.js +30289 -0
- package/dist/index-BwLCkOIF.js +36 -0
- package/dist/index-C1Z4oibL.js +48 -0
- package/dist/index-CNLqZu6_.js +2639 -0
- package/dist/index-CdByBgmF.js +32 -0
- package/dist/index-CkqQGjg1.js +8912 -0
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/index-D05Pcg0E.js +124 -0
- package/dist/index-D58_aTiN.js +28897 -0
- package/dist/index-DCzjjZgV.js +67 -0
- package/dist/index-DY3_9zbY.js +3431 -0
- package/dist/index-Dc2JsMD2.js +54 -0
- package/dist/index-Dh78uGTl.js +146 -0
- package/dist/index-DnrSd_o_.js +3 -0
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/index-woXH3LmA.js +31 -0
- package/dist/index.esm2017-DxQe1gCt.js +3069 -0
- package/dist/loading-B1ymwDT_.js +71 -0
- package/dist/lodash-BiGSPE0G.js +3678 -0
- package/dist/membership-GnNCDGBk.js +235 -0
- package/dist/moment-D7p2TMB-.js +2583 -0
- package/dist/money-CG6LGklW.js +15 -0
- package/dist/number-p19we-YD.js +12 -0
- package/dist/object-qECH92oz.js +26 -0
- package/dist/objectId-dwaoBfJX.js +7 -0
- package/dist/objectid-XhaZoPQl.js +145 -0
- package/dist/plugins-cxSxZO0d.js +1817 -0
- package/dist/remy-D_Deb3ue.js +13 -0
- package/dist/reward-siULTu5h.js +36 -0
- package/dist/rule-GD9oMCPH.js +1969 -0
- package/dist/rule-builder-DWFem4d5.js +102 -0
- package/dist/style.css +13 -0
- package/dist/template-o23nw6e2.js +188 -0
- package/dist/tier-BJDhpH6X.js +4 -0
- package/dist/tiers/tier=1.png +0 -0
- package/dist/tiers/tier=2.png +0 -0
- package/dist/tiers/tier=3.png +0 -0
- package/dist/tiers/tier=4.png +0 -0
- package/dist/timezone-BVwygiRH.js +1154 -0
- package/dist/titles/type=diamond.png +0 -0
- package/dist/titles/type=drinks.png +0 -0
- package/dist/titles/type=food.png +0 -0
- package/dist/titles/type=heart.png +0 -0
- package/dist/titles/type=medal.png +0 -0
- package/dist/titles/type=spend.png +0 -0
- package/dist/titles/type=thank-you.png +0 -0
- package/dist/titles/type=thumbs-up.png +0 -0
- package/dist/titles/type=years.png +0 -0
- package/dist/trigger-CrEBP1aZ.js +213 -0
- package/dist/tslib.es6-BCqqvLQ_.js +44 -0
- package/dist/type_drinks-D6jnpvwV.js +4 -0
- package/dist/usePagination-BbTCnhtY.js +266 -0
- package/dist/user-DcMEufQ6.js +55 -0
- package/dist/vue-i18n-BxV_u4BZ.js +2365 -0
- package/dist/xlsx-BnJDxONa.js +15491 -0
- package/dist/zod-CUN5LrI6.js +91 -0
- package/package.json +1 -1
|
@@ -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-cxSxZO0d.js";
|
|
5
|
+
import { u as ae } from "./loading-B1ymwDT_.js";
|
|
6
|
+
import { u as ne } from "./business-DKEB57Mf.js";
|
|
7
|
+
import { u as ie } from "./campaign-BD_s6pW4.js";
|
|
8
|
+
import { b as D, c as G, a as se } from "./campaign-D9IfNIPI.js";
|
|
9
|
+
import { c as re, p as le } from "./duplicateCampaign-Cj68m0Ti.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-DkOfrONH.js";
|
|
12
|
+
import { u as de } from "./template-o23nw6e2.js";
|
|
13
|
+
import { u as ue } from "./vue-i18n-BxV_u4BZ.js";
|
|
14
|
+
import { _ as pe } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-DQhO9k7V.js";
|
|
15
|
+
import { c as _ } from "./index-D05Pcg0E.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
|
+
};
|