@feedmepos/mf-connect 0.1.98-beta.40 → 0.1.98-beta.41
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/App-C6JJ9uQ8.js +4785 -0
- package/dist/AuditLogs-CAlgtDgx.js +2014 -0
- package/dist/Bin-D8jwhwER.js +166 -0
- package/dist/Broadcast-CP8DRfkT.js +269 -0
- package/dist/CampaignAnalytic-MVjYBFvu.js +1826 -0
- package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DeLURz87.js +122 -0
- package/dist/Card-QribXJwZ.js +911 -0
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
- package/dist/Collections-X9xbt43V.js +541 -0
- package/dist/Credit-QmbsW1eb.js +286 -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-eIoPtgO5.js +58 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-ClNieHSo.js +3382 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CrGHTNhg.js +351 -0
- package/dist/Experience-CPGMg847.js +285 -0
- package/dist/FileSaver.min-CK67LsPG.js +74 -0
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
- package/dist/Game-BrkiEFCS.js +356 -0
- package/dist/GiftCardSetup-DXNBHF1A.js +542 -0
- package/dist/Grab-BgtDzK1B.js +301 -0
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-Dzv2AkKN.js +145 -0
- package/dist/Index-KJgzalOd.js +259 -0
- package/dist/JsonViewer-v8_C7l5N.js +87 -0
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-C6SBLJGQ.js +48 -0
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-Dj74lJ7b.js +18737 -0
- package/dist/LoyaltyDashboard-B2JpbC01.js +1345 -0
- package/dist/MainLayout-DlfTKHQ-.js +143 -0
- package/dist/Marketing-Crx_JQpi.js +236 -0
- package/dist/MarketingMaterialEdit-BfsdcMXJ.js +1036 -0
- package/dist/Member-C50Nrsko.js +281 -0
- package/dist/MemberList-C9uUKw1o.js +1603 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/MemberTransactions-DZ7zPOHX.js +45 -0
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Du_ZGsbX.js +60957 -0
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
- package/dist/Mission-D_km8zi6.js +360 -0
- package/dist/Overview-BBieK6qQ.js +1080 -0
- package/dist/Overview-B_kmLOcc.js +1316 -0
- package/dist/Point-D0q9N7f9.js +288 -0
- package/dist/Promotion-DoFTy-NK.js +423 -0
- package/dist/Queue-Dh5sDRHW.js +261 -0
- package/dist/Record-0owEBKqN.js +342 -0
- package/dist/Review-DV2fnpOH.js +45 -0
- package/dist/ReviewFacebookCallback-D8mnAPzR.js +238 -0
- package/dist/ReviewGoogleCallback-CLzt_ox2.js +213 -0
- package/dist/Reward-Co20Xrss.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-0qU49c47.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-qdvaXPhJ.js +1913 -0
- package/dist/Segment-7dQKeHWK.js +1017 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BUVrUifO.js +181 -0
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-DDsV9TD9.js +189 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DqPZpddc.js +226 -0
- package/dist/Setting-Bvahxs-y.js +2047 -0
- package/dist/SettingAdvertisements-fbXLRwfb.js +264 -0
- package/dist/Settings-C_HWDFN8.js +179 -0
- package/dist/Store-8yBKDR1b.js +2413 -0
- package/dist/StoreRewards-DKaJvoJs.js +540 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D23XzJD7.js +1075 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-JaFhCK_L.js +7007 -0
- package/dist/Tier-CD-CjXC3.js +972 -0
- package/dist/Title-C_lcgye8.js +569 -0
- package/dist/Transaction-BvUYm-rT.js +39 -0
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-C3Yacz7K.js +130 -0
- package/dist/Voucher-CYaG0GLU.js +444 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DF2JqzRe.js +421 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-B4UPqSNc.js +56 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-CE5hQ4Uq.js +60740 -0
- package/dist/app-wDQR6dpb.js +39 -0
- package/dist/app.js +7 -0
- package/dist/business-CE_4siXc.js +82 -0
- package/dist/campaign-BP6rvSpg.js +255 -0
- package/dist/campaign-CXQtKpeb.js +100 -0
- package/dist/campaign-CpzFl8Vr.js +4 -0
- package/dist/campaign.enum-Dx-Zo68Q.js +26 -0
- package/dist/campaign.fn-DKnBpE1N.js +776 -0
- package/dist/collectible.enum-Liy2wH3s.js +19 -0
- package/dist/collection.fn-Cg16QZSp.js +26 -0
- package/dist/duplicateCampaign-DbtVAGsT.js +51 -0
- package/dist/effect-CLI8NI4O.js +89 -0
- package/dist/email-addresses-DlLiZ1io.js +705 -0
- package/dist/export-6Hr34dBU.js +97 -0
- package/dist/feedme.ico +0 -0
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/helper-vkjFqj70.js +86 -0
- package/dist/index-BIyKgw4m.js +72 -0
- package/dist/index-BLQJ-rv3.js +31 -0
- package/dist/index-BbTIqReL.js +67 -0
- package/dist/index-BuMfQxMf.js +897 -0
- package/dist/index-C8cXXcLk.js +45 -0
- package/dist/index-CSVhIZSY.js +8919 -0
- package/dist/index-CVHacTbc.js +151 -0
- package/dist/index-C_H8jFYf.js +2743 -0
- package/dist/index-CmNsGhDf.js +2706 -0
- package/dist/index-CnTeeRyJ.js +53 -0
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/index-CzbNobLv.js +1139 -0
- package/dist/index-D06n1h1b.js +146 -0
- package/dist/index-D4SDAfbP.js +27550 -0
- package/dist/index-DVnYQ3Hs.js +85 -0
- package/dist/index-DcjnS5Sv.js +28900 -0
- package/dist/index-Dx9h0FNH.js +3 -0
- package/dist/index-YgP4ihQL.js +32 -0
- package/dist/index-kedErkLZ.js +2963 -0
- package/dist/index-lnQT4P3d.js +55 -0
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/index.esm2017-Jhv2lkrq.js +3069 -0
- package/dist/loading-NY-FPxVY.js +72 -0
- package/dist/lodash-BC_P6kLg.js +3678 -0
- package/dist/membership-BWaK-9FY.js +255 -0
- package/dist/moment-D7p2TMB-.js +2583 -0
- package/dist/money-COoh4GXK.js +15 -0
- package/dist/number-BX5OEXgq.js +12 -0
- package/dist/object-BYyQ0PZp.js +18 -0
- package/dist/objectId-dwaoBfJX.js +7 -0
- package/dist/objectid-1SUSRtmY.js +145 -0
- package/dist/plugins-ur-FAoye.js +1788 -0
- package/dist/remy-Qz_pNsUS.js +13 -0
- package/dist/reward-DSsylZ22.js +36 -0
- package/dist/rule-BM9GUd1C.js +1969 -0
- package/dist/rule-builder-gC9LH2AC.js +126 -0
- package/dist/string-Gcy5IM_H.js +32 -0
- package/dist/style.css +4 -0
- package/dist/template-CUV3AMFI.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-BFZhekOU.js +20 -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/transaction.fn-C5MlkEIC.js +64 -0
- package/dist/trigger-CbjiuoSo.js +213 -0
- package/dist/tslib.es6-BCqqvLQ_.js +44 -0
- package/dist/type_drinks-D6jnpvwV.js +4 -0
- package/dist/useMarketingMaterialActions-BLisTieA.js +96 -0
- package/dist/usePagination-Caah4sJr.js +220 -0
- package/dist/user-BZC4P_jL.js +55 -0
- package/dist/vue-i18n-BYz7XAr_.js +2365 -0
- package/dist/xlsx-Bn7BqUFA.js +15491 -0
- package/dist/zod-DHH42rXG.js +91 -0
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { c as s } from "./app-CE5hQ4Uq.js";
|
|
2
|
+
var E = { exports: {} };
|
|
3
|
+
(function(h, j) {
|
|
4
|
+
(function(p, i) {
|
|
5
|
+
i();
|
|
6
|
+
})(s, function() {
|
|
7
|
+
function p(e, t) {
|
|
8
|
+
return typeof t > "u" ? t = { autoBom: !1 } : typeof t != "object" && (console.warn("Deprecated: Expected third argument to be a object"), t = { autoBom: !t }), t.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
|
|
9
|
+
}
|
|
10
|
+
function i(e, t, r) {
|
|
11
|
+
var n = new XMLHttpRequest();
|
|
12
|
+
n.open("GET", e), n.responseType = "blob", n.onload = function() {
|
|
13
|
+
u(n.response, t, r);
|
|
14
|
+
}, n.onerror = function() {
|
|
15
|
+
console.error("could not download file");
|
|
16
|
+
}, n.send();
|
|
17
|
+
}
|
|
18
|
+
function v(e) {
|
|
19
|
+
var t = new XMLHttpRequest();
|
|
20
|
+
t.open("HEAD", e, !1);
|
|
21
|
+
try {
|
|
22
|
+
t.send();
|
|
23
|
+
} catch {
|
|
24
|
+
}
|
|
25
|
+
return 200 <= t.status && 299 >= t.status;
|
|
26
|
+
}
|
|
27
|
+
function l(e) {
|
|
28
|
+
try {
|
|
29
|
+
e.dispatchEvent(new MouseEvent("click"));
|
|
30
|
+
} catch {
|
|
31
|
+
var t = document.createEvent("MouseEvents");
|
|
32
|
+
t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
var a = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof s == "object" && s.global === s ? s : void 0, w = a.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), u = a.saveAs || (typeof window != "object" || window !== a ? function() {
|
|
36
|
+
} : "download" in HTMLAnchorElement.prototype && !w ? function(e, t, r) {
|
|
37
|
+
var n = a.URL || a.webkitURL, o = document.createElement("a");
|
|
38
|
+
t = t || e.name || "download", o.download = t, o.rel = "noopener", typeof e == "string" ? (o.href = e, o.origin === location.origin ? l(o) : v(o.href) ? i(e, t, r) : l(o, o.target = "_blank")) : (o.href = n.createObjectURL(e), setTimeout(function() {
|
|
39
|
+
n.revokeObjectURL(o.href);
|
|
40
|
+
}, 4e4), setTimeout(function() {
|
|
41
|
+
l(o);
|
|
42
|
+
}, 0));
|
|
43
|
+
} : "msSaveOrOpenBlob" in navigator ? function(e, t, r) {
|
|
44
|
+
if (t = t || e.name || "download", typeof e != "string") navigator.msSaveOrOpenBlob(p(e, r), t);
|
|
45
|
+
else if (v(e)) i(e, t, r);
|
|
46
|
+
else {
|
|
47
|
+
var n = document.createElement("a");
|
|
48
|
+
n.href = e, n.target = "_blank", setTimeout(function() {
|
|
49
|
+
l(n);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
} : function(e, t, r, n) {
|
|
53
|
+
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string") return i(e, t, r);
|
|
54
|
+
var o = e.type === "application/octet-stream", b = /constructor/i.test(a.HTMLElement) || a.safari, m = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
55
|
+
if ((m || o && b || w) && typeof FileReader < "u") {
|
|
56
|
+
var d = new FileReader();
|
|
57
|
+
d.onloadend = function() {
|
|
58
|
+
var c = d.result;
|
|
59
|
+
c = m ? c : c.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = c : location = c, n = null;
|
|
60
|
+
}, d.readAsDataURL(e);
|
|
61
|
+
} else {
|
|
62
|
+
var y = a.URL || a.webkitURL, f = y.createObjectURL(e);
|
|
63
|
+
n ? n.location = f : location.href = f, n = null, setTimeout(function() {
|
|
64
|
+
y.revokeObjectURL(f);
|
|
65
|
+
}, 4e4);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
a.saveAs = u.saveAs = u, h.exports = u;
|
|
69
|
+
});
|
|
70
|
+
})(E);
|
|
71
|
+
var R = E.exports;
|
|
72
|
+
export {
|
|
73
|
+
R as F
|
|
74
|
+
};
|
|
@@ -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,52 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import { defineComponent as J, ref as A, computed as Q, onMounted as X, resolveComponent as m, openBlock as f, createElementBlock as P, Fragment as R, createVNode as r, unref as o, withCtx as b, createElementVNode as n, toDisplayString as g, renderList as Z, createBlock as V, resolveDynamicComponent as ee, h as l } from "vue";
|
|
2
|
+
import { _ as te } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as oe, components as y } from "@feedmepos/ui-library";
|
|
4
|
+
import { c as ae, p as ne } from "./plugins-ur-FAoye.js";
|
|
5
|
+
import { u as ie } from "./loading-NY-FPxVY.js";
|
|
6
|
+
import { u as re } from "./business-CE_4siXc.js";
|
|
7
|
+
import { u as se } from "./campaign-CXQtKpeb.js";
|
|
8
|
+
import { b as T, c as U, a as le } from "./campaign-BP6rvSpg.js";
|
|
9
|
+
import { c as ce, p as me } from "./duplicateCampaign-DbtVAGsT.js";
|
|
10
|
+
import { _ as de } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
11
|
+
import { _ as ue } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-ClNieHSo.js";
|
|
12
|
+
import { u as pe } from "./template-CUV3AMFI.js";
|
|
13
|
+
import { u as fe } from "./vue-i18n-BYz7XAr_.js";
|
|
14
|
+
import { _ as ge } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-DDsV9TD9.js";
|
|
15
|
+
import "./index-Dx9h0FNH.js";
|
|
16
|
+
import { useRouter as ye } from "vue-router";
|
|
17
|
+
import { c as h } from "./index-D06n1h1b.js";
|
|
18
|
+
import { R as _e } from "./app-CE5hQ4Uq.js";
|
|
19
|
+
const he = { class: "flex items-center" }, we = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, Ce = { class: "px-24 flex flex-col gap-y-16" }, ve = { class: "flex items-center justify-between w-full" }, xe = { class: "flex gap-8 overflow-x-auto" }, be = { class: "space-y-8" }, ke = { class: "flex w-full gap-4 items-center" }, Fe = { class: "space-y-4" }, Se = { class: "fm-typo-en-body-lg-600" }, Ae = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Re = { class: "flex items-center gap-8" }, Ve = { class: "flex flex-col gap-16 text-center" }, Le = { class: "fm-typo-en-title-sm-800" }, Be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xe = /* @__PURE__ */ J({
|
|
20
|
+
__name: "Game",
|
|
21
|
+
setup(Ee) {
|
|
22
|
+
const { t: d } = fe(), D = ye(), I = {
|
|
23
|
+
label: d("connect.program.common.actions.create", {
|
|
24
|
+
type: d("connect.program.game.title").toLowerCase()
|
|
25
|
+
}),
|
|
26
|
+
value: "create",
|
|
27
|
+
isPrimary: !0,
|
|
28
|
+
prependIcon: "add"
|
|
29
|
+
}, L = oe(), K = pe("GAME", L), w = re(), u = se(), { global: j, minor: B } = ie, c = A({
|
|
30
|
+
searchKey: "",
|
|
31
|
+
location: []
|
|
32
|
+
});
|
|
33
|
+
function N(e) {
|
|
34
|
+
const t = c.value.location;
|
|
35
|
+
return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((s) => {
|
|
36
|
+
var i;
|
|
37
|
+
return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(s);
|
|
38
|
+
}) : e.targetLocation.includes(t);
|
|
39
|
+
}
|
|
40
|
+
const C = Q(
|
|
41
|
+
() => u.campaigns.token.filter((e) => N(e))
|
|
42
|
+
), O = [
|
|
43
|
+
{
|
|
44
|
+
header: "Program title",
|
|
45
|
+
accessorKey: "name",
|
|
46
|
+
// accessorFn: (v) => v.name,
|
|
47
|
+
cell(e) {
|
|
48
|
+
return l("div", { class: "flex items-center justify-between gap-4" }, [
|
|
49
|
+
l("div", { class: "flex items-center" }, [
|
|
50
|
+
l(
|
|
51
|
+
y.FmTooltip,
|
|
52
|
+
{
|
|
53
|
+
content: e.row.original._id,
|
|
54
|
+
onClick: (t) => {
|
|
55
|
+
t.stopPropagation(), ae(e.row.original._id);
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
[
|
|
59
|
+
l(y.FmIcon, {
|
|
60
|
+
name: "info",
|
|
61
|
+
outline: !0,
|
|
62
|
+
size: "sm"
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
)
|
|
66
|
+
]),
|
|
67
|
+
l("div", { class: "flex-1" }, e.row.original.name)
|
|
68
|
+
]);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
header: "Status",
|
|
73
|
+
accessorFn: (e) => le(e),
|
|
74
|
+
cell(e) {
|
|
75
|
+
return T(e.row.original);
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
header: "Summary",
|
|
80
|
+
accessorFn: (e) => U(e)
|
|
81
|
+
//v.effect,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
header: "Token received",
|
|
85
|
+
accessorFn: (e) => {
|
|
86
|
+
var t;
|
|
87
|
+
return ((t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.currentReceive) ?? 0;
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
header: "Actions",
|
|
92
|
+
cell(e) {
|
|
93
|
+
return l("div", { class: "flex items-center gap-8" }, [
|
|
94
|
+
l(y.FmButton, {
|
|
95
|
+
variant: "tertiary",
|
|
96
|
+
icon: "insights",
|
|
97
|
+
iconColor: "neutral-gray-400",
|
|
98
|
+
onClick: async (t) => {
|
|
99
|
+
t.stopPropagation(), await G(e.row.original);
|
|
100
|
+
}
|
|
101
|
+
}),
|
|
102
|
+
l(y.FmButton, {
|
|
103
|
+
variant: "tertiary",
|
|
104
|
+
icon: "content_copy",
|
|
105
|
+
iconColor: "neutral-gray-400",
|
|
106
|
+
onClick: async (t) => {
|
|
107
|
+
t.stopPropagation(), await $(e.row.original);
|
|
108
|
+
}
|
|
109
|
+
}),
|
|
110
|
+
l(y.FmButton, {
|
|
111
|
+
variant: "tertiary",
|
|
112
|
+
icon: "send",
|
|
113
|
+
iconColor: "neutral-gray-400",
|
|
114
|
+
onClick: (t) => {
|
|
115
|
+
t.stopPropagation(), q(e.row.original);
|
|
116
|
+
}
|
|
117
|
+
}),
|
|
118
|
+
l(y.FmButton, {
|
|
119
|
+
variant: "tertiary",
|
|
120
|
+
icon: "delete",
|
|
121
|
+
iconColor: "neutral-gray-400",
|
|
122
|
+
onClick: (t) => {
|
|
123
|
+
t.stopPropagation(), M(e.row.original);
|
|
124
|
+
}
|
|
125
|
+
})
|
|
126
|
+
]);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
], k = A(), E = A();
|
|
130
|
+
async function M(e) {
|
|
131
|
+
await ne.remove(`Are you sure you want to remove ${e.name}?`) && await B(
|
|
132
|
+
async () => {
|
|
133
|
+
await h.delete(e._id), await u.read("GAME");
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
message: `Removing ${e.name}`,
|
|
137
|
+
successMessage: `Removed ${e.name} successfully`
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
async function v(e) {
|
|
142
|
+
e ? await t() : K.open(async (s) => {
|
|
143
|
+
await t(s);
|
|
144
|
+
});
|
|
145
|
+
async function t(s) {
|
|
146
|
+
var i;
|
|
147
|
+
(i = k.value) == null || i.showSheet(
|
|
148
|
+
!0,
|
|
149
|
+
"GAME",
|
|
150
|
+
e ? await h.readById(e._id) : void 0,
|
|
151
|
+
s
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
async function $(e) {
|
|
156
|
+
var i;
|
|
157
|
+
if (!await ce(e.name))
|
|
158
|
+
return;
|
|
159
|
+
const t = await h.readById(e._id), s = me(t);
|
|
160
|
+
(i = k.value) == null || i.showSheet(
|
|
161
|
+
!0,
|
|
162
|
+
"GAME",
|
|
163
|
+
s,
|
|
164
|
+
t.template
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
async function H(e) {
|
|
168
|
+
var t, s, i;
|
|
169
|
+
e.campaign._id && ((i = (s = (t = e.campaign) == null ? void 0 : t.game) == null ? void 0 : s.rewards) != null && i.some(
|
|
170
|
+
(p) => p.type === "VOUCHER"
|
|
171
|
+
)) && await new Promise((p) => {
|
|
172
|
+
L.open({
|
|
173
|
+
title: "Confirmation",
|
|
174
|
+
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
175
|
+
primaryActions: { text: "Update all", close: !0 },
|
|
176
|
+
secondaryActions: { text: "Update future only", close: !0 }
|
|
177
|
+
}).onPrimary(async () => {
|
|
178
|
+
e.updateCollections = !0, p();
|
|
179
|
+
}).onSecondary(async () => {
|
|
180
|
+
p();
|
|
181
|
+
});
|
|
182
|
+
}), await B(
|
|
183
|
+
async () => {
|
|
184
|
+
e.campaign._id ? await h.update(e.campaign._id, e) : await h.create(e), await u.read("GAME");
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
message: `${e.campaign._id ? "Updating" : "Creating"} game program`,
|
|
188
|
+
successMessage: `Game program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
function q(e) {
|
|
193
|
+
var t;
|
|
194
|
+
(t = E.value) == null || t.showSheet({
|
|
195
|
+
campaign: e
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
async function G(e) {
|
|
199
|
+
await D.push({
|
|
200
|
+
name: _e["$connect-PROGRAM_GAME_ANALYTIC"],
|
|
201
|
+
params: { id: e._id }
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
return X(async () => {
|
|
205
|
+
await j(async () => {
|
|
206
|
+
await u.read("GAME"), await w.readPremium();
|
|
207
|
+
});
|
|
208
|
+
}), (e, t) => {
|
|
209
|
+
const s = m("FmPill"), i = m("FmPageHead"), F = m("FmSearch"), p = m("FmTable"), x = m("FmButton"), z = m("FmListItem"), W = m("FmList"), Y = m("FmCard");
|
|
210
|
+
return f(), P(R, null, [
|
|
211
|
+
r(i, {
|
|
212
|
+
actions: o(C).length > 0 && o(w).isPremium ? [I] : [],
|
|
213
|
+
"onClick:action": t[0] || (t[0] = () => v())
|
|
214
|
+
}, {
|
|
215
|
+
title: b(() => [
|
|
216
|
+
n("div", he, [
|
|
217
|
+
n("span", we, g(o(d)("connect.program.game.title")), 1),
|
|
218
|
+
r(s, { variant: "premium" })
|
|
219
|
+
])
|
|
220
|
+
]),
|
|
221
|
+
_: 1
|
|
222
|
+
}, 8, ["actions"]),
|
|
223
|
+
n("div", Ce, [
|
|
224
|
+
r(F, {
|
|
225
|
+
modelValue: o(c).searchKey,
|
|
226
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => o(c).searchKey = a),
|
|
227
|
+
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
228
|
+
placeholder: "search",
|
|
229
|
+
collapsible: ""
|
|
230
|
+
}, null, 8, ["modelValue"]),
|
|
231
|
+
o(u).campaigns.token && o(u).campaigns.token.length > 0 ? (f(), P(R, { key: 0 }, [
|
|
232
|
+
n("div", ve, [
|
|
233
|
+
n("div", xe, [
|
|
234
|
+
r(de, {
|
|
235
|
+
label: `${o(d)("connect.common.location")}: `,
|
|
236
|
+
"right-icon": "keyboard_arrow_down",
|
|
237
|
+
modelValue: o(c).location,
|
|
238
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => o(c).location = a),
|
|
239
|
+
icon: "storefront",
|
|
240
|
+
"show-item-label": !0,
|
|
241
|
+
items: o(w).locationOptions
|
|
242
|
+
}, null, 8, ["label", "modelValue", "items"])
|
|
243
|
+
]),
|
|
244
|
+
r(F, {
|
|
245
|
+
modelValue: o(c).searchKey,
|
|
246
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => o(c).searchKey = a),
|
|
247
|
+
class: "xs:hidden sm:hidden",
|
|
248
|
+
placeholder: "search",
|
|
249
|
+
collapsible: ""
|
|
250
|
+
}, null, 8, ["modelValue"])
|
|
251
|
+
]),
|
|
252
|
+
r(p, {
|
|
253
|
+
class: "xs:hidden sm:hidden",
|
|
254
|
+
"row-data": o(C),
|
|
255
|
+
"column-defs": O,
|
|
256
|
+
"search-value": o(c).searchKey,
|
|
257
|
+
"column-filter": [],
|
|
258
|
+
onRowClick: t[4] || (t[4] = (a) => v(a.original)),
|
|
259
|
+
"hide-footer": o(C).length < 10
|
|
260
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
261
|
+
r(W, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
262
|
+
default: b(() => [
|
|
263
|
+
(f(!0), P(R, null, Z(o(C).filter(
|
|
264
|
+
(a) => a.name.toLowerCase().includes(o(c).searchKey.toLowerCase())
|
|
265
|
+
), (a) => (f(), V(z, {
|
|
266
|
+
key: a._id.toString(),
|
|
267
|
+
onClick: (S) => v(a),
|
|
268
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
269
|
+
}, {
|
|
270
|
+
default: b(() => {
|
|
271
|
+
var S;
|
|
272
|
+
return [
|
|
273
|
+
n("div", be, [
|
|
274
|
+
n("div", ke, [
|
|
275
|
+
(f(), V(ee(o(T)(a))))
|
|
276
|
+
]),
|
|
277
|
+
n("div", Fe, [
|
|
278
|
+
n("div", Se, g(a.name), 1),
|
|
279
|
+
n("div", Ae, g(o(U)(a)), 1)
|
|
280
|
+
]),
|
|
281
|
+
n("div", Pe, g(o(d)("connect.program.game.token_received", {
|
|
282
|
+
count: ((S = a.pf_collectible) == null ? void 0 : S.currentReceive) ?? 0
|
|
283
|
+
})), 1)
|
|
284
|
+
]),
|
|
285
|
+
n("div", Re, [
|
|
286
|
+
r(x, {
|
|
287
|
+
icon: "insights",
|
|
288
|
+
"icon-color": "neutral-gray-400",
|
|
289
|
+
variant: "tertiary",
|
|
290
|
+
onClick: async (_) => {
|
|
291
|
+
_.stopPropagation(), await G(a);
|
|
292
|
+
}
|
|
293
|
+
}, null, 8, ["onClick"]),
|
|
294
|
+
r(x, {
|
|
295
|
+
icon: "content_copy",
|
|
296
|
+
"icon-color": "neutral-gray-400",
|
|
297
|
+
variant: "tertiary",
|
|
298
|
+
onClick: async (_) => {
|
|
299
|
+
_.stopPropagation(), await $(a);
|
|
300
|
+
}
|
|
301
|
+
}, null, 8, ["onClick"]),
|
|
302
|
+
r(x, {
|
|
303
|
+
icon: "delete",
|
|
304
|
+
"icon-color": "neutral-gray-400",
|
|
305
|
+
variant: "tertiary",
|
|
306
|
+
onClick: (_) => (_.stopPropagation(), M(a))
|
|
307
|
+
}, null, 8, ["onClick"])
|
|
308
|
+
])
|
|
309
|
+
];
|
|
310
|
+
}),
|
|
311
|
+
_: 2
|
|
312
|
+
}, 1032, ["onClick"]))), 128))
|
|
313
|
+
]),
|
|
314
|
+
_: 1
|
|
315
|
+
})
|
|
316
|
+
], 64)) : (f(), V(Y, {
|
|
317
|
+
key: 1,
|
|
318
|
+
variant: "outlined",
|
|
319
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
320
|
+
}, {
|
|
321
|
+
default: b(() => [
|
|
322
|
+
t[6] || (t[6] = n("img", {
|
|
323
|
+
src: te,
|
|
324
|
+
class: "aspect-square w-[150px]"
|
|
325
|
+
}, null, -1)),
|
|
326
|
+
n("div", Ve, [
|
|
327
|
+
n("div", Le, g(o(d)("connect.program.game.empty_state.title")), 1),
|
|
328
|
+
n("div", Be, g(o(d)("connect.program.game.empty_state.description")), 1)
|
|
329
|
+
]),
|
|
330
|
+
r(x, {
|
|
331
|
+
variant: "primary",
|
|
332
|
+
label: "Create game program",
|
|
333
|
+
icon: "add",
|
|
334
|
+
disabled: !o(w).isPremium,
|
|
335
|
+
onClick: t[5] || (t[5] = (a) => v())
|
|
336
|
+
}, null, 8, ["disabled"])
|
|
337
|
+
]),
|
|
338
|
+
_: 1
|
|
339
|
+
})),
|
|
340
|
+
r(ue, {
|
|
341
|
+
ref_key: "sheetRef",
|
|
342
|
+
ref: k,
|
|
343
|
+
"onSubmit:modelValue": H
|
|
344
|
+
}, null, 512),
|
|
345
|
+
r(ge, {
|
|
346
|
+
ref_key: "sendCollectionSheetRef",
|
|
347
|
+
ref: E
|
|
348
|
+
}, null, 512)
|
|
349
|
+
])
|
|
350
|
+
], 64);
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
export {
|
|
355
|
+
Xe as default
|
|
356
|
+
};
|