@feedmepos/mf-connect 0.1.58-prod → 0.1.60-prod
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-CB0xAr9Q.js +427 -0
- package/dist/App-fp_3oll7.js +4630 -0
- package/dist/Bin-CPEbn14A.js +166 -0
- package/dist/Broadcast-jKp2iB8c.js +233 -0
- package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CmJG893h.js +121 -0
- package/dist/Card-BaPJkgd2.js +911 -0
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
- package/dist/Collections-Bqsg-ON3.js +458 -0
- package/dist/Credit-C9zIva1h.js +228 -0
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CSMV8OwA.js +2194 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-Doyw0pvU.js +348 -0
- package/dist/Experience-CCI_oesa.js +229 -0
- package/dist/FileSaver.min-NlMItPOc.js +74 -0
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/Game-CRMVz1JP.js +284 -0
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +144 -0
- package/dist/Index-szNiSnjR.js +259 -0
- package/dist/JsonViewer-v8_C7l5N.js +87 -0
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +18737 -0
- package/dist/MainLayout-B1aJoR95.js +41 -0
- package/dist/Marketing-AvEiNiD9.js +319 -0
- package/dist/Member-DIZwt6Hh.js +279 -0
- package/dist/MemberList-dxteIRWn.js +1607 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/MemberTransactions-Q3phmXfI.js +45 -0
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BLk8rX-T.js +60553 -0
- package/dist/Mission-CZjySlcS.js +302 -0
- package/dist/Overview-BXbWEDy3.js +1079 -0
- package/dist/Point-CgjNc_Qn.js +232 -0
- package/dist/Promotion-COYo3qLi.js +289 -0
- package/dist/Queue-BLIStJth.js +260 -0
- package/dist/Record-BWoTvVEE.js +341 -0
- package/dist/Reward-Dq6GxHMP.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CR1feHth.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DuYYfbOH.js +1763 -0
- package/dist/Segment-CUfn6k5R.js +882 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CxycOqNJ.js +181 -0
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-C7jqrfEj.js +188 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CMmdbYH4.js +147 -0
- package/dist/Setting-CC5AiQSy.js +1928 -0
- package/dist/SettingAdvertisements-DHQTaMC1.js +262 -0
- package/dist/Store-CEgv5aOD.js +1842 -0
- package/dist/StoreRewards-Dtzk_YG2.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cwt8pmoM.js +995 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BEU2u1-a.js +139 -0
- package/dist/Tier-1xqQvWzc.js +895 -0
- package/dist/Title-Da-G8plz.js +566 -0
- package/dist/Transaction-B0vuVZFZ.js +39 -0
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-e4-wNfrg.js +130 -0
- package/dist/Voucher-DLFjkXLu.js +384 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-5X7dGFD9.js +419 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-BPTrvEwa.js +56 -0
- package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-Do_C3F_N.js +7094 -0
- package/dist/app-o7Kvv5aK.js +57962 -0
- package/dist/app-wDQR6dpb.js +39 -0
- package/dist/app.js +6 -0
- package/dist/business-BDi-QTa5.js +82 -0
- package/dist/campaign-BHqizYy6.js +1810 -0
- package/dist/campaign-CpzFl8Vr.js +4 -0
- package/dist/campaign-DNXI3K9c.js +94 -0
- package/dist/campaign.enum-BXDwYoeA.js +20 -0
- package/dist/campaign.fn-Rws4mJa5.js +758 -0
- package/dist/collectible.enum-cMc4fL1T.js +19 -0
- package/dist/collection.fn-F8FZ7Dnr.js +26 -0
- package/dist/dto-CAtf1jq0.js +216 -0
- package/dist/effect-Dhg1ZIrL.js +78 -0
- package/dist/email-addresses-BZJZwglQ.js +705 -0
- package/dist/export-B6yvRuct.js +97 -0
- package/dist/feedme.ico +0 -0
- package/dist/helper-VoErinsY.js +71 -0
- package/dist/index-B0Pzwzkd.js +31 -0
- package/dist/index-Bq6FwMwW.js +32 -0
- package/dist/index-BvE6Sbog.js +3 -0
- package/dist/index-BysJoGFD.js +146 -0
- package/dist/index-C8m_F_I4.js +121 -0
- package/dist/index-CQZinjc9.js +54 -0
- package/dist/index-Cq7s1Pk2.js +76 -0
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/index-DOGrOlB8.js +8859 -0
- package/dist/index-Di23nMJ7.js +38 -0
- package/dist/index-Dkyb4P6T.js +30076 -0
- package/dist/index-DvZiQOtl.js +3077 -0
- package/dist/index-Ved5V90A.js +2155 -0
- package/dist/index-d4A3r8kv.js +32269 -0
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/index-y7IqG-tl.js +44 -0
- package/dist/index.esm2017-CRTpUsW5.js +3069 -0
- package/dist/loading-CoUrS63J.js +71 -0
- package/dist/lodash-B5I3zXaY.js +3678 -0
- package/dist/membership-BiQwBHAA.js +235 -0
- package/dist/moment-D7p2TMB-.js +2583 -0
- package/dist/money-CA3gpWD3.js +15 -0
- package/dist/number-CgmVpwHm.js +12 -0
- package/dist/object-qECH92oz.js +26 -0
- package/dist/objectId-dwaoBfJX.js +7 -0
- package/dist/objectid-C80eoTvt.js +145 -0
- package/dist/plugins-BkWtR_R5.js +208 -0
- package/dist/reward-D7SKofYj.js +36 -0
- package/dist/rule-Cpxty5PH.js +1951 -0
- package/dist/rule-builder-d_TMgXEC.js +102 -0
- package/dist/style.css +4 -0
- package/dist/template-BB7bab5R.js +190 -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-Dj3UaenF.js +1151 -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-ZVR5eR1H.js +144 -0
- package/dist/tslib.es6-BCqqvLQ_.js +44 -0
- package/dist/type_drinks-D6jnpvwV.js +4 -0
- package/dist/usePagination-Ds-cuHop.js +223 -0
- package/dist/user-DjRqnFsC.js +54 -0
- package/dist/vue-i18n-BlCNfIcP.js +2365 -0
- package/dist/xlsx-CtNr_GAa.js +15491 -0
- package/dist/zod-Bg2FbC-D.js +90 -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,284 @@
|
|
|
1
|
+
import { defineComponent as q, ref as v, computed as z, onMounted as O, resolveComponent as r, openBlock as f, createElementBlock as C, Fragment as b, createVNode as s, unref as o, withCtx as h, createElementVNode as n, toDisplayString as u, renderList as J, createBlock as k, resolveDynamicComponent as Q, h as l } from "vue";
|
|
2
|
+
import { _ as W } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as X, components as w } from "@feedmepos/ui-library";
|
|
4
|
+
import { a as Y, p as Z } from "./plugins-BkWtR_R5.js";
|
|
5
|
+
import { u as ee } from "./loading-CoUrS63J.js";
|
|
6
|
+
import { u as te } from "./business-BDi-QTa5.js";
|
|
7
|
+
import { u as oe } from "./campaign-DNXI3K9c.js";
|
|
8
|
+
import { a as $, b as R, g as ae } from "./campaign-BHqizYy6.js";
|
|
9
|
+
import { _ as ne } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
10
|
+
import { _ as se } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CSMV8OwA.js";
|
|
11
|
+
import { u as ie } from "./template-BB7bab5R.js";
|
|
12
|
+
import { u as re } from "./vue-i18n-BlCNfIcP.js";
|
|
13
|
+
import { _ as le } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-C7jqrfEj.js";
|
|
14
|
+
import { c as x } from "./index-C8m_F_I4.js";
|
|
15
|
+
const ce = { class: "flex items-center" }, me = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, de = { class: "px-24 flex flex-col gap-y-16" }, ue = { class: "flex items-center justify-between w-full" }, pe = { class: "flex gap-8 overflow-x-auto" }, fe = { class: "space-y-8" }, ge = { class: "flex w-full gap-4 items-center" }, ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _e = { class: "space-y-4" }, he = { class: "fm-typo-en-body-lg-600" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ve = { class: "flex flex-col gap-16 text-center" }, Ce = { class: "fm-typo-en-title-sm-800" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Te = /* @__PURE__ */ q({
|
|
16
|
+
__name: "Game",
|
|
17
|
+
setup(ke) {
|
|
18
|
+
const { t: c } = re(), E = {
|
|
19
|
+
label: c("connect.program.common.actions.create", {
|
|
20
|
+
type: c("connect.program.game.title").toLowerCase()
|
|
21
|
+
}),
|
|
22
|
+
value: "create",
|
|
23
|
+
isPrimary: !0,
|
|
24
|
+
prependIcon: "add"
|
|
25
|
+
}, K = ie("GAME", X()), g = te(), p = oe(), { global: M, minor: F } = ee, i = v({
|
|
26
|
+
searchKey: "",
|
|
27
|
+
location: []
|
|
28
|
+
});
|
|
29
|
+
function G(e) {
|
|
30
|
+
const t = i.value.location;
|
|
31
|
+
return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((m) => {
|
|
32
|
+
var d;
|
|
33
|
+
return (d = e == null ? void 0 : e.targetLocation) == null ? void 0 : d.includes(m);
|
|
34
|
+
}) : e.targetLocation.includes(t);
|
|
35
|
+
}
|
|
36
|
+
const y = z(
|
|
37
|
+
() => p.campaigns.token.filter((e) => G(e))
|
|
38
|
+
), I = [
|
|
39
|
+
{
|
|
40
|
+
header: "Program title",
|
|
41
|
+
accessorKey: "name",
|
|
42
|
+
// accessorFn: (v) => v.name,
|
|
43
|
+
cell(e) {
|
|
44
|
+
return l("div", { class: "flex items-center justify-between gap-4" }, [
|
|
45
|
+
l("div", { class: "flex items-center" }, [
|
|
46
|
+
l(
|
|
47
|
+
w.FmTooltip,
|
|
48
|
+
{
|
|
49
|
+
content: e.row.original._id,
|
|
50
|
+
onClick: (t) => {
|
|
51
|
+
t.stopPropagation(), Y(e.row.original._id);
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
[
|
|
55
|
+
l(w.FmIcon, {
|
|
56
|
+
name: "info",
|
|
57
|
+
outline: !0,
|
|
58
|
+
size: "sm"
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
)
|
|
62
|
+
]),
|
|
63
|
+
l("div", { class: "flex-1" }, e.row.original.name)
|
|
64
|
+
]);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
header: "Status",
|
|
69
|
+
accessorFn: (e) => ae(e),
|
|
70
|
+
cell(e) {
|
|
71
|
+
return $(e.row.original);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
header: "Summary",
|
|
76
|
+
accessorFn: (e) => R(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 l("div", { class: "flex items-center gap-8" }, [
|
|
90
|
+
l(w.FmButton, {
|
|
91
|
+
variant: "tertiary",
|
|
92
|
+
icon: "send",
|
|
93
|
+
iconColor: "neutral-gray-400",
|
|
94
|
+
onClick: (t) => {
|
|
95
|
+
t.stopPropagation(), U(e.row.original);
|
|
96
|
+
}
|
|
97
|
+
}),
|
|
98
|
+
l(w.FmButton, {
|
|
99
|
+
variant: "tertiary",
|
|
100
|
+
icon: "delete",
|
|
101
|
+
iconColor: "neutral-gray-400",
|
|
102
|
+
onClick: (t) => {
|
|
103
|
+
t.stopPropagation(), P(e.row.original);
|
|
104
|
+
}
|
|
105
|
+
})
|
|
106
|
+
]);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
], S = v(), L = v();
|
|
110
|
+
async function P(e) {
|
|
111
|
+
await Z.remove(`Are you sure you want to remove ${e.name}?`) && await F(
|
|
112
|
+
async () => {
|
|
113
|
+
await x.delete(e._id), await p.read("GAME");
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
message: `Removing ${e.name}`,
|
|
117
|
+
successMessage: `Removed ${e.name} successfully`
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
async function _(e) {
|
|
122
|
+
e ? await t() : K.open(async (m) => {
|
|
123
|
+
await t(m);
|
|
124
|
+
});
|
|
125
|
+
async function t(m) {
|
|
126
|
+
var d;
|
|
127
|
+
(d = S.value) == null || d.showSheet(
|
|
128
|
+
!0,
|
|
129
|
+
"GAME",
|
|
130
|
+
e ? await x.readById(e._id) : void 0,
|
|
131
|
+
m
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
async function T(e) {
|
|
136
|
+
await F(
|
|
137
|
+
async () => {
|
|
138
|
+
e.campaign._id ? await x.update(e.campaign._id, e) : await x.create(e), await p.read("GAME");
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
message: `${e.campaign._id ? "Updating" : "Creating"} game program`,
|
|
142
|
+
successMessage: `Game program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
function U(e) {
|
|
147
|
+
var t;
|
|
148
|
+
(t = L.value) == null || t.showSheet({
|
|
149
|
+
campaign: e
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
return O(async () => {
|
|
153
|
+
await M(async () => {
|
|
154
|
+
await p.read("GAME"), await g.readPremium();
|
|
155
|
+
});
|
|
156
|
+
}), (e, t) => {
|
|
157
|
+
const m = r("FmPill"), d = r("FmPageHead"), V = r("FmSearch"), j = r("FmTable"), A = r("FmButton"), D = r("FmListItem"), H = r("FmList"), N = r("FmCard");
|
|
158
|
+
return f(), C(b, null, [
|
|
159
|
+
s(d, {
|
|
160
|
+
actions: o(y).length > 0 && o(g).isPremium ? [E] : [],
|
|
161
|
+
"onClick:action": t[0] || (t[0] = () => _())
|
|
162
|
+
}, {
|
|
163
|
+
title: h(() => [
|
|
164
|
+
n("div", ce, [
|
|
165
|
+
n("span", me, u(o(c)("connect.program.game.title")), 1),
|
|
166
|
+
s(m, { variant: "premium" })
|
|
167
|
+
])
|
|
168
|
+
]),
|
|
169
|
+
_: 1
|
|
170
|
+
}, 8, ["actions"]),
|
|
171
|
+
n("div", de, [
|
|
172
|
+
s(V, {
|
|
173
|
+
modelValue: o(i).searchKey,
|
|
174
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => o(i).searchKey = a),
|
|
175
|
+
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
176
|
+
placeholder: "search",
|
|
177
|
+
collapsible: ""
|
|
178
|
+
}, null, 8, ["modelValue"]),
|
|
179
|
+
o(p).campaigns.token && o(p).campaigns.token.length > 0 ? (f(), C(b, { key: 0 }, [
|
|
180
|
+
n("div", ue, [
|
|
181
|
+
n("div", pe, [
|
|
182
|
+
s(ne, {
|
|
183
|
+
label: `${o(c)("connect.common.location")}: `,
|
|
184
|
+
"right-icon": "keyboard_arrow_down",
|
|
185
|
+
modelValue: o(i).location,
|
|
186
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => o(i).location = a),
|
|
187
|
+
icon: "storefront",
|
|
188
|
+
"show-item-label": !0,
|
|
189
|
+
items: o(g).locationOptions
|
|
190
|
+
}, null, 8, ["label", "modelValue", "items"])
|
|
191
|
+
]),
|
|
192
|
+
s(V, {
|
|
193
|
+
modelValue: o(i).searchKey,
|
|
194
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => o(i).searchKey = a),
|
|
195
|
+
class: "xs:hidden",
|
|
196
|
+
placeholder: "search",
|
|
197
|
+
collapsible: ""
|
|
198
|
+
}, null, 8, ["modelValue"])
|
|
199
|
+
]),
|
|
200
|
+
s(j, {
|
|
201
|
+
class: "xs:hidden",
|
|
202
|
+
"row-data": o(y),
|
|
203
|
+
"column-defs": I,
|
|
204
|
+
"search-value": o(i).searchKey,
|
|
205
|
+
"column-filter": [],
|
|
206
|
+
onRowClick: t[4] || (t[4] = (a) => _(a.original)),
|
|
207
|
+
"hide-footer": o(y).length < 10
|
|
208
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
209
|
+
s(H, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
210
|
+
default: h(() => [
|
|
211
|
+
(f(!0), C(b, null, J(o(y).filter(
|
|
212
|
+
(a) => a.name.toLowerCase().includes(o(i).searchKey.toLowerCase())
|
|
213
|
+
), (a) => (f(), k(D, {
|
|
214
|
+
key: a._id.toString(),
|
|
215
|
+
onClick: (B) => _(a),
|
|
216
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
217
|
+
}, {
|
|
218
|
+
default: h(() => [
|
|
219
|
+
n("div", fe, [
|
|
220
|
+
n("div", ge, [
|
|
221
|
+
(f(), k(Q(o($)(a)))),
|
|
222
|
+
n("div", ye, u(a.currentReceive ?? 0) + " used ", 1)
|
|
223
|
+
]),
|
|
224
|
+
n("div", _e, [
|
|
225
|
+
n("div", he, u(a.name), 1),
|
|
226
|
+
n("div", we, u(o(R)(a)), 1)
|
|
227
|
+
]),
|
|
228
|
+
n("div", xe, u(o(c)("connect.program.game.token_received", {
|
|
229
|
+
count: a.currentReceive ?? 0
|
|
230
|
+
})), 1)
|
|
231
|
+
]),
|
|
232
|
+
s(A, {
|
|
233
|
+
icon: "delete",
|
|
234
|
+
"icon-color": "neutral-gray-400",
|
|
235
|
+
variant: "tertiary",
|
|
236
|
+
onClick: (B) => (B.stopPropagation(), P(a))
|
|
237
|
+
}, null, 8, ["onClick"])
|
|
238
|
+
]),
|
|
239
|
+
_: 2
|
|
240
|
+
}, 1032, ["onClick"]))), 128))
|
|
241
|
+
]),
|
|
242
|
+
_: 1
|
|
243
|
+
})
|
|
244
|
+
], 64)) : (f(), k(N, {
|
|
245
|
+
key: 1,
|
|
246
|
+
variant: "outlined",
|
|
247
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
248
|
+
}, {
|
|
249
|
+
default: h(() => [
|
|
250
|
+
t[6] || (t[6] = n("img", {
|
|
251
|
+
src: W,
|
|
252
|
+
class: "aspect-square w-[150px]"
|
|
253
|
+
}, null, -1)),
|
|
254
|
+
n("div", ve, [
|
|
255
|
+
n("div", Ce, u(o(c)("connect.program.game.empty_state.title")), 1),
|
|
256
|
+
n("div", be, u(o(c)("connect.program.game.empty_state.description")), 1)
|
|
257
|
+
]),
|
|
258
|
+
s(A, {
|
|
259
|
+
variant: "primary",
|
|
260
|
+
label: "Create game program",
|
|
261
|
+
icon: "add",
|
|
262
|
+
disabled: !o(g).isPremium,
|
|
263
|
+
onClick: t[5] || (t[5] = (a) => _())
|
|
264
|
+
}, null, 8, ["disabled"])
|
|
265
|
+
]),
|
|
266
|
+
_: 1
|
|
267
|
+
})),
|
|
268
|
+
s(se, {
|
|
269
|
+
ref_key: "sheetRef",
|
|
270
|
+
ref: S,
|
|
271
|
+
"onSubmit:modelValue": T
|
|
272
|
+
}, null, 512),
|
|
273
|
+
s(le, {
|
|
274
|
+
ref_key: "sendCollectionSheetRef",
|
|
275
|
+
ref: L
|
|
276
|
+
}, null, 512)
|
|
277
|
+
])
|
|
278
|
+
], 64);
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
export {
|
|
283
|
+
Te as default
|
|
284
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { openBlock as l, createElementBlock as o, createElementVNode as i, defineComponent as C, ref as v, onMounted as $, resolveComponent as f, renderSlot as b, toDisplayString as r, createCommentVNode as x, normalizeStyle as R, unref as s, Fragment as h, createVNode as w, withCtx as g, createTextVNode as p, normalizeClass as V, createBlock as F } from "vue";
|
|
2
|
+
import { _ as z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
const H = {}, N = { class: "animate-pulse flex space-x-4 bg-gray-300 dark:bg-gray-700 items-center justify-center rounded w-full h-full" };
|
|
4
|
+
function A(e, d) {
|
|
5
|
+
return l(), o("div", N, [...d[0] || (d[0] = [
|
|
6
|
+
i("svg", {
|
|
7
|
+
class: "dark:text-gray-600 h-10 text-gray-200 w-10",
|
|
8
|
+
"aria-hidden": "true",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
fill: "currentColor",
|
|
11
|
+
viewBox: "0 0 20 18"
|
|
12
|
+
}, [
|
|
13
|
+
i("path", { d: "M18 0H2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2Zm-5.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm4.376 10.481A1 1 0 0 1 16 15H4a1 1 0 0 1-.895-1.447l3.5-7A1 1 0 0 1 7.468 6a.965.965 0 0 1 .9.5l2.775 4.757 1.546-1.887a1 1 0 0 1 1.618.1l2.541 4a1 1 0 0 1 .028 1.011Z" })
|
|
14
|
+
], -1)
|
|
15
|
+
])]);
|
|
16
|
+
}
|
|
17
|
+
const D = /* @__PURE__ */ z(H, [["render", A]]), I = { class: "max-w-full max-h-[400px] space-y-4" }, L = { key: 0 }, T = { class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400" }, U = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "h-full w-full relative bg-fm-color-neutral-white p-12 border-2 border-dashed border-fm-color-neutral-gray-300 rounded-md flex flex-col items-center justify-center gap-8 hover:border-fm-color-neutral-gray-400"
|
|
20
|
+
}, Z = ["src"], _ = ["src"], E = { class: "absolute right-0 top-0" }, O = /* @__PURE__ */ C({
|
|
21
|
+
__name: "ImageInput",
|
|
22
|
+
props: {
|
|
23
|
+
required: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: () => !1
|
|
26
|
+
},
|
|
27
|
+
disabled: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: () => !1
|
|
30
|
+
},
|
|
31
|
+
thumbnail: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: () => {
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
file: {
|
|
37
|
+
type: File,
|
|
38
|
+
default: () => {
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
label: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: () => {
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
aspectRatio: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: "2/3"
|
|
49
|
+
},
|
|
50
|
+
imageFit: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: "contain"
|
|
53
|
+
},
|
|
54
|
+
accept: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: ".png, .jpg, .jpeg, .webm"
|
|
57
|
+
},
|
|
58
|
+
recommendedSize: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: "Recommended: 950px x 600px"
|
|
61
|
+
},
|
|
62
|
+
deleteButton: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: !0
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
emits: ["update:file"],
|
|
68
|
+
setup(e, { emit: d }) {
|
|
69
|
+
const c = e, a = v({
|
|
70
|
+
loading: !1,
|
|
71
|
+
imgsrc: c.thumbnail
|
|
72
|
+
}), m = v(!1), y = d;
|
|
73
|
+
async function u(t) {
|
|
74
|
+
return t == null ? (a.value.imgsrc = void 0, y("update:file", null)) : (m.value = !!t.type.startsWith("video/"), a.value.loading = !0, a.value.imgsrc = URL.createObjectURL(t), a.value.loading = !1, y("update:file", t));
|
|
75
|
+
}
|
|
76
|
+
return $(() => {
|
|
77
|
+
var t;
|
|
78
|
+
c.file && u(c.file), (t = c.thumbnail) != null && t.includes("mp4") && (m.value = !0);
|
|
79
|
+
}), (t, n) => {
|
|
80
|
+
const k = f("FmDropField"), S = f("FmHelperText"), B = f("FmButton");
|
|
81
|
+
return l(), o("div", I, [
|
|
82
|
+
b(t.$slots, "label", {}, () => [
|
|
83
|
+
e.label ? (l(), o("div", L, r(e.label), 1)) : x("", !0)
|
|
84
|
+
]),
|
|
85
|
+
i("div", {
|
|
86
|
+
style: R({ "aspect-ratio": e.aspectRatio }),
|
|
87
|
+
class: "flex flex-col max-h-full max-w-full"
|
|
88
|
+
}, [
|
|
89
|
+
s(a).loading ? (l(), F(D, { key: 1 })) : (l(), o(h, { key: 0 }, [
|
|
90
|
+
s(a).imgsrc ? (l(), o("div", U, [
|
|
91
|
+
s(m) ? (l(), o("video", {
|
|
92
|
+
key: 1,
|
|
93
|
+
src: s(a).imgsrc || e.thumbnail,
|
|
94
|
+
class: "w-full h-full",
|
|
95
|
+
controls: ""
|
|
96
|
+
}, null, 8, _)) : (l(), o("img", {
|
|
97
|
+
key: 0,
|
|
98
|
+
class: V([`object-${e.imageFit}`, "w-full h-full"]),
|
|
99
|
+
src: s(a).imgsrc || e.thumbnail
|
|
100
|
+
}, null, 10, Z)),
|
|
101
|
+
i("div", E, [
|
|
102
|
+
b(t.$slots, "delete-button"),
|
|
103
|
+
e.deleteButton ? (l(), F(B, {
|
|
104
|
+
key: 0,
|
|
105
|
+
class: "!text-neutral-50 !bg-neutral-700",
|
|
106
|
+
icon: "delete",
|
|
107
|
+
variant: "tertiary",
|
|
108
|
+
disabled: e.disabled,
|
|
109
|
+
onClick: n[1] || (n[1] = (j) => u(null))
|
|
110
|
+
}, null, 8, ["disabled"])) : x("", !0)
|
|
111
|
+
])
|
|
112
|
+
])) : (l(), o(h, { key: 0 }, [
|
|
113
|
+
w(k, {
|
|
114
|
+
class: "flex-1 hihiha",
|
|
115
|
+
accept: e.accept,
|
|
116
|
+
disabled: e.disabled,
|
|
117
|
+
onFileUpload: u,
|
|
118
|
+
onFileRejected: n[0] || (n[0] = (j) => u(null))
|
|
119
|
+
}, {
|
|
120
|
+
label: g(() => [...n[2] || (n[2] = [
|
|
121
|
+
p(r(void 0), -1)
|
|
122
|
+
])]),
|
|
123
|
+
"helper-text": g(() => [...n[3] || (n[3] = [
|
|
124
|
+
p(r(void 0), -1)
|
|
125
|
+
])]),
|
|
126
|
+
"accept-text": g(() => [
|
|
127
|
+
i("div", T, [
|
|
128
|
+
i("div", null, "(" + r(e.recommendedSize) + ")", 1),
|
|
129
|
+
p(" Accepts " + r(e.accept), 1)
|
|
130
|
+
])
|
|
131
|
+
]),
|
|
132
|
+
_: 1
|
|
133
|
+
}, 8, ["accept", "disabled"]),
|
|
134
|
+
w(S, { text: "" })
|
|
135
|
+
], 64))
|
|
136
|
+
], 64))
|
|
137
|
+
], 4)
|
|
138
|
+
]);
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
export {
|
|
143
|
+
O as _
|
|
144
|
+
};
|