@feedmepos/mf-connect 0.1.38-beta.6 → 0.1.38-beta.61
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-NBx32reB.js → Analytic-CM7mh-iO.js} +16 -16
- package/dist/{App-CaK9PvMd.js → App-CeCzzsDu.js} +625 -619
- package/dist/AuditLogs-VWx8DFKA.js +1991 -0
- package/dist/{Bin-CL6o1JSs.js → Bin-vUuol_I9.js} +10 -10
- package/dist/Broadcast-6VXz4-IG.js +233 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BIySMYGP.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CV-zhJ15.js} +6 -6
- package/dist/{Card-DNdEjt6s.js → Card-CeIeGET1.js} +144 -140
- package/dist/Collections-CF_OcAL3.js +540 -0
- package/dist/Credit-BUqGOyp_.js +226 -0
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js +3150 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BZfchHlT.js +347 -0
- package/dist/Experience-BxiFH_uV.js +225 -0
- package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-lgg_oBvT.js} +1 -1
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/Game-BzYW0LfY.js +300 -0
- package/dist/GenerateMaterial-B5A7mx2y.js +589 -0
- package/dist/Grab-BgiMqwvj.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-DZ8DHrQ_.js} +49 -48
- package/dist/{Index-2wokhhFB.js → Index-B85ops8K.js} +54 -54
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-B5rIjxYd.js} +1 -1
- package/dist/{MainLayout-B1aJoR95.js → MainLayout-CXGVkD-W.js} +1 -1
- package/dist/Marketing-Bnijl7lA.js +145 -0
- package/dist/MarketingMaterialEdit-BlUKwSoP.js +746 -0
- package/dist/{Member-2xV4Izwa.js → Member-sT853g51.js} +38 -37
- package/dist/{MemberList-CYgBdyJt.js → MemberList-DYT5_fSP.js} +158 -159
- package/dist/{MemberTransactions-DWDV01N4.js → MemberTransactions-Cqce5ebe.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Becsw31k.js → MessageInput.vue_vue_type_script_setup_true_lang-Dq0Hswj8.js} +5940 -5668
- package/dist/Mission-Q5_sGgrm.js +304 -0
- package/dist/{Overview-BZjto86d.js → Overview-B0rwrHR1.js} +24 -25
- package/dist/Point-BGYFMvev.js +228 -0
- package/dist/Promotion-0acd63nA.js +364 -0
- package/dist/{Queue-D62r2qjy.js → Queue-SVqRUlD_.js} +14 -15
- package/dist/{Record-0iF3dG7y.js → Record-BTjg4ihy.js} +10 -10
- package/dist/{Reward-C5IEJYu6.js → Reward-DW58VMRO.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-S2Fd0qO8.js → RewardGroup.vue_vue_type_script_setup_true_lang-s1RI55Rc.js} +13 -14
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Os17lXBX.js +1766 -0
- package/dist/{Segment-BknjBrUP.js → Segment-Dny8pxP1.js} +273 -274
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BLQlkp-j.js → SelectItems.vue_vue_type_script_setup_true_lang-Czx7rqiq.js} +12 -12
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CaPi4hYB.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-EgVxUG_N.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BoZ0ZpNZ.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CO0fgI3K.js} +4 -4
- package/dist/Setting-CjcnxK34.js +1992 -0
- package/dist/SettingAdvertisements-CIyDF4C8.js +263 -0
- package/dist/Store-B8k5YVqU.js +1934 -0
- package/dist/StoreRewards-BW08rwpL.js +534 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BfFSfE2H.js +1034 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CZkKjUNQ.js +8093 -0
- package/dist/{Tier-B168DtFj.js → Tier-DKzu4tYw.js} +561 -480
- package/dist/{Title-uH0RI1N3.js → Title-BK-TXatJ.js} +149 -147
- package/dist/{Transaction-Bx-pmLrJ.js → Transaction-Duayg1jd.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Ce_55V7l.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BAR9h1TV.js} +7 -7
- package/dist/{Voucher-Dzpz2AEB.js → Voucher-BEVAkNeJ.js} +140 -124
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DvFy9Z6X.js +421 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CfLiUj9f.js → ZodTextField.vue_vue_type_script_setup_true_lang-CU_Sx2PM.js} +2 -2
- package/dist/app-IvbII0ql.js +45026 -0
- package/dist/app.js +1 -1
- package/dist/{business-B65OtB5B.js → business-BFIwFfkq.js} +11 -8
- package/dist/campaign-RuIwxc4y.js +253 -0
- package/dist/{campaign-qGy6uzrC.js → campaign-w9j4I4jn.js} +29 -25
- package/dist/{campaign.enum-CZp2DmXI.js → campaign.enum-IHLsfdik.js} +3 -2
- package/dist/campaign.fn-B_P1MkRV.js +776 -0
- package/dist/{collectible.enum-CN-lnG1m.js → collectible.enum-CUgSjO08.js} +1 -1
- package/dist/{collection.fn-mMwGQWce.js → collection.fn-CrfnNb41.js} +2 -2
- package/dist/dto-jwO_sX9I.js +222 -0
- package/dist/{effect-Bg3yb9T6.js → effect--0g8PNyt.js} +1 -1
- package/dist/{email-addresses-CQsN724N.js → email-addresses-HtsxvXw9.js} +2 -2
- package/dist/{export-BLf2dhFd.js → export-CFEwMRmd.js} +9 -10
- package/dist/{helper-CFaph16Q.js → helper-CCfb24PO.js} +22 -7
- package/dist/index-B-AMMFfT.js +3419 -0
- package/dist/{index-BPyac0fq.js → index-BR3UbZ0F.js} +1 -1
- package/dist/{index-Dy5p_b1S.js → index-BZEM0T2A.js} +1 -1
- package/dist/index-Bflu4Rft.js +8884 -0
- package/dist/{index-Dkmn0jmX.js → index-CR3f3BXQ.js} +2552 -2356
- package/dist/{index-BkySejFg.js → index-CZPcwcUo.js} +3 -3
- package/dist/{index-BPZtjcTm.js → index-CkuPY85X.js} +1 -1
- package/dist/index-CppLPpqB.js +30933 -0
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/{index-BKOgzVx6.js → index-DDYH-IEX.js} +1 -1
- package/dist/{index-DaEQgaiW.js → index-DdZdHioZ.js} +455 -245
- package/dist/{index-BBPIZjw6.js → index-Dic_WcAL.js} +3 -3
- package/dist/{index-CH2d_B8c.js → index-DpjYgKTN.js} +4 -1
- package/dist/index-wzSeRJAd.js +36 -0
- package/dist/{index.esm2017-B9vJTKYg.js → index.esm2017-CUnjzfU-.js} +89 -89
- package/dist/loading-CivgDw5C.js +215 -0
- package/dist/{lodash-B5I3zXaY.js → lodash-BSbv_9TG.js} +1 -1
- package/dist/{membership-Du79A0Pl.js → membership-j2w1YUO-.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-DXgYs2-R.js → money-DL-x8hiT.js} +1 -1
- package/dist/{number-CBMkNZvH.js → number-D1yoFGEr.js} +1 -1
- package/dist/objectid-CHab6j3r.js +145 -0
- package/dist/{campaign-iKI-L84v.js → plugins-P-V4XWmW.js} +784 -777
- package/dist/remy-D_Deb3ue.js +13 -0
- package/dist/{reward-ClX_lWcQ.js → reward-BqMlBQRu.js} +1 -1
- package/dist/{rule-BfidJ75Y.js → rule-CztsLdki.js} +4 -4
- package/dist/rule-builder-DANv7Rmz.js +102 -0
- package/dist/style.css +11 -2
- package/dist/template-Dbz3FhHK.js +188 -0
- package/dist/timezone-BgVqObBq.js +1151 -0
- package/dist/trigger-CbriUibd.js +213 -0
- package/dist/usePagination-DtNK7W0U.js +223 -0
- package/dist/user-CVapqHfr.js +55 -0
- package/dist/vue-i18n-tpDAnnmD.js +2365 -0
- package/dist/{xlsx-Be4bARvl.js → xlsx-EewcN2uY.js} +1 -1
- package/dist/{zod-Bg2FbC-D.js → zod-D-wiCQRJ.js} +32 -31
- package/package.json +13 -5
- package/dist/AuditLogs-C-gCCPvF.js +0 -1887
- package/dist/Broadcast-B2-itjvZ.js +0 -227
- package/dist/Collections-DepGq6WJ.js +0 -465
- package/dist/Credit-D7K0gFwc.js +0 -222
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-HMjbuy2C.js +0 -2185
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DrbMJlm5.js +0 -347
- package/dist/Experience-FlBX3eyN.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/Game-Cc3D7lKV.js +0 -278
- package/dist/Marketing-D7PXYloN.js +0 -20073
- package/dist/Mission-BSGc9822.js +0 -296
- package/dist/Point-0U4TTdPW.js +0 -226
- package/dist/Promotion-DiUa0GcV.js +0 -289
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CxlamGFP.js +0 -1751
- package/dist/Setting-RLI7RgmN.js +0 -1936
- package/dist/Store-gxmv8hWJ.js +0 -1842
- package/dist/StoreRewards-C_6gY_Nk.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B5uzSYM4.js +0 -1029
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-yjI96ZL0.js +0 -139
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-dbA6_6b9.js +0 -419
- package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/app-B90wINOO.js +0 -33357
- package/dist/app-DuUxQ1ZP.js +0 -7086
- package/dist/campaign.fn-DKScnmjX.js +0 -758
- package/dist/dto-C5ri8Nws.js +0 -214
- package/dist/index-BCGDOgxb.js +0 -38
- package/dist/index-BCPBmANe.js +0 -3120
- package/dist/index-BN2Uyvj4.js +0 -30038
- package/dist/index-CrbnfAk8.js +0 -8861
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/index-DJwQICyC.js +0 -146
- package/dist/loading-MEQuW9Xa.js +0 -71
- package/dist/objectid-BeZTZYqi.js +0 -145
- package/dist/plugins-KiMuDTPp.js +0 -208
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
- package/dist/rule-builder-BTcZx77a.js +0 -89
- package/dist/template-DPpMK30W.js +0 -190
- package/dist/trigger-DLp1bkZP.js +0 -144
- package/dist/usePagination-BeF5K3M7.js +0 -223
- package/dist/user-Cq9CGBHZ.js +0 -54
- package/dist/vue-i18n-COzqUgQy.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,300 @@
|
|
|
1
|
+
import { defineComponent as z, ref as k, computed as W, onMounted as J, resolveComponent as c, openBlock as f, createElementBlock as F, Fragment as S, createVNode as s, unref as o, withCtx as w, createElementVNode as n, toDisplayString as g, renderList as Q, createBlock as P, resolveDynamicComponent as X, h as m } from "vue";
|
|
2
|
+
import { _ as Y } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as Z, components as x } from "@feedmepos/ui-library";
|
|
4
|
+
import { a as ee, p as te } from "./plugins-P-V4XWmW.js";
|
|
5
|
+
import { u as oe } from "./loading-CivgDw5C.js";
|
|
6
|
+
import { u as ae } from "./business-BFIwFfkq.js";
|
|
7
|
+
import { u as ne } from "./campaign-w9j4I4jn.js";
|
|
8
|
+
import { b as E, c as K, a as se } from "./campaign-RuIwxc4y.js";
|
|
9
|
+
import { _ as ie } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
10
|
+
import { _ as re } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js";
|
|
11
|
+
import { u as le } from "./template-Dbz3FhHK.js";
|
|
12
|
+
import { u as ce } from "./vue-i18n-tpDAnnmD.js";
|
|
13
|
+
import { _ as me } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-EgVxUG_N.js";
|
|
14
|
+
import { c as C } from "./index-DpjYgKTN.js";
|
|
15
|
+
const de = { class: "flex items-center" }, ue = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, pe = { class: "px-24 flex flex-col gap-y-16" }, fe = { class: "flex items-center justify-between w-full" }, ge = { class: "flex gap-8 overflow-x-auto" }, ye = { class: "space-y-8" }, _e = { class: "flex w-full gap-4 items-center" }, he = { class: "space-y-4" }, we = { class: "fm-typo-en-body-lg-600" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ve = { class: "flex flex-col gap-16 text-center" }, be = { class: "fm-typo-en-title-sm-800" }, ke = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ie = /* @__PURE__ */ z({
|
|
16
|
+
__name: "Game",
|
|
17
|
+
setup(Fe) {
|
|
18
|
+
const { t: d } = ce(), M = {
|
|
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
|
+
}, V = Z(), U = le("GAME", V), y = ae(), u = ne(), { global: G, minor: L } = oe, l = k({
|
|
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((i) => {
|
|
32
|
+
var r;
|
|
33
|
+
return (r = e == null ? void 0 : e.targetLocation) == null ? void 0 : r.includes(i);
|
|
34
|
+
}) : e.targetLocation.includes(t);
|
|
35
|
+
}
|
|
36
|
+
const _ = W(
|
|
37
|
+
() => u.campaigns.token.filter((e) => T(e))
|
|
38
|
+
), I = [
|
|
39
|
+
{
|
|
40
|
+
header: "Program title",
|
|
41
|
+
accessorKey: "name",
|
|
42
|
+
// accessorFn: (v) => v.name,
|
|
43
|
+
cell(e) {
|
|
44
|
+
return m("div", { class: "flex items-center justify-between gap-4" }, [
|
|
45
|
+
m("div", { class: "flex items-center" }, [
|
|
46
|
+
m(
|
|
47
|
+
x.FmTooltip,
|
|
48
|
+
{
|
|
49
|
+
content: e.row.original._id,
|
|
50
|
+
onClick: (t) => {
|
|
51
|
+
t.stopPropagation(), ee(e.row.original._id);
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
[
|
|
55
|
+
m(x.FmIcon, {
|
|
56
|
+
name: "info",
|
|
57
|
+
outline: !0,
|
|
58
|
+
size: "sm"
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
)
|
|
62
|
+
]),
|
|
63
|
+
m("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 E(e.row.original);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
header: "Summary",
|
|
76
|
+
accessorFn: (e) => K(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 m("div", { class: "flex items-center gap-8" }, [
|
|
90
|
+
m(x.FmButton, {
|
|
91
|
+
variant: "tertiary",
|
|
92
|
+
icon: "send",
|
|
93
|
+
iconColor: "neutral-gray-400",
|
|
94
|
+
onClick: (t) => {
|
|
95
|
+
t.stopPropagation(), j(e.row.original);
|
|
96
|
+
}
|
|
97
|
+
}),
|
|
98
|
+
m(x.FmButton, {
|
|
99
|
+
variant: "tertiary",
|
|
100
|
+
icon: "delete",
|
|
101
|
+
iconColor: "neutral-gray-400",
|
|
102
|
+
onClick: (t) => {
|
|
103
|
+
t.stopPropagation(), B(e.row.original);
|
|
104
|
+
}
|
|
105
|
+
})
|
|
106
|
+
]);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
], A = k(), R = k();
|
|
110
|
+
async function B(e) {
|
|
111
|
+
await te.remove(`Are you sure you want to remove ${e.name}?`) && await L(
|
|
112
|
+
async () => {
|
|
113
|
+
await C.delete(e._id), await u.read("GAME");
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
message: `Removing ${e.name}`,
|
|
117
|
+
successMessage: `Removed ${e.name} successfully`
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
async function h(e) {
|
|
122
|
+
e ? await t() : U.open(async (i) => {
|
|
123
|
+
await t(i);
|
|
124
|
+
});
|
|
125
|
+
async function t(i) {
|
|
126
|
+
var r;
|
|
127
|
+
(r = A.value) == null || r.showSheet(
|
|
128
|
+
!0,
|
|
129
|
+
"GAME",
|
|
130
|
+
e ? await C.readById(e._id) : void 0,
|
|
131
|
+
i
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
async function D(e) {
|
|
136
|
+
var t, i, r;
|
|
137
|
+
e.campaign._id && ((r = (i = (t = e.campaign) == null ? void 0 : t.game) == null ? void 0 : i.rewards) != null && r.some(
|
|
138
|
+
(p) => p.type === "VOUCHER"
|
|
139
|
+
)) && await new Promise((p) => {
|
|
140
|
+
V.open({
|
|
141
|
+
title: "Confirmation",
|
|
142
|
+
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
143
|
+
primaryActions: { text: "Update all", close: !0 },
|
|
144
|
+
secondaryActions: { text: "Update future only", close: !0 }
|
|
145
|
+
}).onPrimary(async () => {
|
|
146
|
+
e.updateCollections = !0, p();
|
|
147
|
+
}).onSecondary(async () => {
|
|
148
|
+
p();
|
|
149
|
+
});
|
|
150
|
+
}), await L(
|
|
151
|
+
async () => {
|
|
152
|
+
e.campaign._id ? await C.update(e.campaign._id, e) : await C.create(e), await u.read("GAME");
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
message: `${e.campaign._id ? "Updating" : "Creating"} game program`,
|
|
156
|
+
successMessage: `Game program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
function j(e) {
|
|
161
|
+
var t;
|
|
162
|
+
(t = R.value) == null || t.showSheet({
|
|
163
|
+
campaign: e
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
return J(async () => {
|
|
167
|
+
await G(async () => {
|
|
168
|
+
await u.read("GAME"), await y.readPremium();
|
|
169
|
+
});
|
|
170
|
+
}), (e, t) => {
|
|
171
|
+
const i = c("FmPill"), r = c("FmPageHead"), v = c("FmSearch"), p = c("FmTable"), $ = c("FmButton"), H = c("FmListItem"), N = c("FmList"), O = c("FmCard");
|
|
172
|
+
return f(), F(S, null, [
|
|
173
|
+
s(r, {
|
|
174
|
+
actions: o(_).length > 0 && o(y).isPremium ? [M] : [],
|
|
175
|
+
"onClick:action": t[0] || (t[0] = () => h())
|
|
176
|
+
}, {
|
|
177
|
+
title: w(() => [
|
|
178
|
+
n("div", de, [
|
|
179
|
+
n("span", ue, g(o(d)("connect.program.game.title")), 1),
|
|
180
|
+
s(i, { variant: "premium" })
|
|
181
|
+
])
|
|
182
|
+
]),
|
|
183
|
+
_: 1
|
|
184
|
+
}, 8, ["actions"]),
|
|
185
|
+
n("div", pe, [
|
|
186
|
+
s(v, {
|
|
187
|
+
modelValue: o(l).searchKey,
|
|
188
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => o(l).searchKey = a),
|
|
189
|
+
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
190
|
+
placeholder: "search",
|
|
191
|
+
collapsible: ""
|
|
192
|
+
}, null, 8, ["modelValue"]),
|
|
193
|
+
o(u).campaigns.token && o(u).campaigns.token.length > 0 ? (f(), F(S, { key: 0 }, [
|
|
194
|
+
n("div", fe, [
|
|
195
|
+
n("div", ge, [
|
|
196
|
+
s(ie, {
|
|
197
|
+
label: `${o(d)("connect.common.location")}: `,
|
|
198
|
+
"right-icon": "keyboard_arrow_down",
|
|
199
|
+
modelValue: o(l).location,
|
|
200
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => o(l).location = a),
|
|
201
|
+
icon: "storefront",
|
|
202
|
+
"show-item-label": !0,
|
|
203
|
+
items: o(y).locationOptions
|
|
204
|
+
}, null, 8, ["label", "modelValue", "items"])
|
|
205
|
+
]),
|
|
206
|
+
s(v, {
|
|
207
|
+
modelValue: o(l).searchKey,
|
|
208
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => o(l).searchKey = a),
|
|
209
|
+
class: "xs:hidden sm:hidden",
|
|
210
|
+
placeholder: "search",
|
|
211
|
+
collapsible: ""
|
|
212
|
+
}, null, 8, ["modelValue"])
|
|
213
|
+
]),
|
|
214
|
+
s(p, {
|
|
215
|
+
class: "xs:hidden sm:hidden",
|
|
216
|
+
"row-data": o(_),
|
|
217
|
+
"column-defs": I,
|
|
218
|
+
"search-value": o(l).searchKey,
|
|
219
|
+
"column-filter": [],
|
|
220
|
+
onRowClick: t[4] || (t[4] = (a) => h(a.original)),
|
|
221
|
+
"hide-footer": o(_).length < 10
|
|
222
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
223
|
+
s(N, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
224
|
+
default: w(() => [
|
|
225
|
+
(f(!0), F(S, null, Q(o(_).filter(
|
|
226
|
+
(a) => a.name.toLowerCase().includes(o(l).searchKey.toLowerCase())
|
|
227
|
+
), (a) => (f(), P(H, {
|
|
228
|
+
key: a._id.toString(),
|
|
229
|
+
onClick: (b) => h(a),
|
|
230
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
231
|
+
}, {
|
|
232
|
+
default: w(() => {
|
|
233
|
+
var b;
|
|
234
|
+
return [
|
|
235
|
+
n("div", ye, [
|
|
236
|
+
n("div", _e, [
|
|
237
|
+
(f(), P(X(o(E)(a))))
|
|
238
|
+
]),
|
|
239
|
+
n("div", he, [
|
|
240
|
+
n("div", we, g(a.name), 1),
|
|
241
|
+
n("div", xe, g(o(K)(a)), 1)
|
|
242
|
+
]),
|
|
243
|
+
n("div", Ce, g(o(d)("connect.program.game.token_received", {
|
|
244
|
+
count: ((b = e.pf_collectible) == null ? void 0 : b.currentReceive) ?? 0
|
|
245
|
+
})), 1)
|
|
246
|
+
]),
|
|
247
|
+
s($, {
|
|
248
|
+
icon: "delete",
|
|
249
|
+
"icon-color": "neutral-gray-400",
|
|
250
|
+
variant: "tertiary",
|
|
251
|
+
onClick: (q) => (q.stopPropagation(), B(a))
|
|
252
|
+
}, null, 8, ["onClick"])
|
|
253
|
+
];
|
|
254
|
+
}),
|
|
255
|
+
_: 2
|
|
256
|
+
}, 1032, ["onClick"]))), 128))
|
|
257
|
+
]),
|
|
258
|
+
_: 1
|
|
259
|
+
})
|
|
260
|
+
], 64)) : (f(), P(O, {
|
|
261
|
+
key: 1,
|
|
262
|
+
variant: "outlined",
|
|
263
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
264
|
+
}, {
|
|
265
|
+
default: w(() => [
|
|
266
|
+
t[6] || (t[6] = n("img", {
|
|
267
|
+
src: Y,
|
|
268
|
+
class: "aspect-square w-[150px]"
|
|
269
|
+
}, null, -1)),
|
|
270
|
+
n("div", ve, [
|
|
271
|
+
n("div", be, g(o(d)("connect.program.game.empty_state.title")), 1),
|
|
272
|
+
n("div", ke, g(o(d)("connect.program.game.empty_state.description")), 1)
|
|
273
|
+
]),
|
|
274
|
+
s($, {
|
|
275
|
+
variant: "primary",
|
|
276
|
+
label: "Create game program",
|
|
277
|
+
icon: "add",
|
|
278
|
+
disabled: !o(y).isPremium,
|
|
279
|
+
onClick: t[5] || (t[5] = (a) => h())
|
|
280
|
+
}, null, 8, ["disabled"])
|
|
281
|
+
]),
|
|
282
|
+
_: 1
|
|
283
|
+
})),
|
|
284
|
+
s(re, {
|
|
285
|
+
ref_key: "sheetRef",
|
|
286
|
+
ref: A,
|
|
287
|
+
"onSubmit:modelValue": D
|
|
288
|
+
}, null, 512),
|
|
289
|
+
s(me, {
|
|
290
|
+
ref_key: "sendCollectionSheetRef",
|
|
291
|
+
ref: R
|
|
292
|
+
}, null, 512)
|
|
293
|
+
])
|
|
294
|
+
], 64);
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
export {
|
|
299
|
+
Ie as default
|
|
300
|
+
};
|