@feedmepos/mf-connect 0.1.98-beta.7 → 0.1.98-beta.71
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-BonFFUVJ.js → App-B-Onur9k.js} +812 -666
- package/dist/{AuditLogs-CaQisyMC.js → AuditLogs-BnEeKG1C.js} +14 -13
- package/dist/{Bin-Mu8gAiHw.js → Bin-BH9_nATR.js} +8 -8
- package/dist/Broadcast-Gt2ZLLpZ.js +302 -0
- package/dist/CampaignAnalytic-BT6zTgNk.js +1830 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BoLZVrCU.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-nNLLEzii.js} +6 -5
- package/dist/Card-dD52oor7.js +1084 -0
- package/dist/{Collections-CByXxRW_.js → Collections-7bwYNl3M.js} +14 -13
- package/dist/Credit-qZdlqXqR.js +286 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-DeNn_k19.js +53 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C09W9Qja.js +4213 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BXsAX1Xa.js → EffectSheet.vue_vue_type_style_index_0_lang-Bz1HRBMa.js} +35 -35
- package/dist/{Experience-B7J-aqPK.js → Experience-CAaWgWXP.js} +112 -86
- package/dist/{FileSaver.min-D_F_MSZt.js → FileSaver.min-BpfY6VnX.js} +1 -1
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
- package/dist/Game-fhrbFb_5.js +356 -0
- package/dist/GiftCardSetup-CTwmNKim.js +736 -0
- package/dist/{Grab-C45MmlD9.js → Grab-BnPfb92x.js} +33 -32
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CPPcB3PC.js → ImageInput.vue_vue_type_script_setup_true_lang-BySju1oT.js} +1 -1
- package/dist/{Index-vQ6uP49O.js → Index-DRwvmm_j.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Cj3hN3tg.js → LocationPicker.vue_vue_type_script_setup_true_lang-Ya4r9NNE.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DU9eIein.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CDwtqqLQ.js} +1 -1
- package/dist/LoyaltyDashboard-8jn6SIWo.js +2865 -0
- package/dist/MainLayout-Bf42AcB1.js +143 -0
- package/dist/{Marketing-B6xMdQvW.js → Marketing-DruTMjiR.js} +7 -6
- package/dist/{MarketingMaterialEdit-0cZN4bek.js → MarketingMaterialEdit-moEHd_gP.js} +15 -14
- package/dist/Member-C9VTQqIm.js +654 -0
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DEsVSWmv.js +1279 -0
- package/dist/MemberImportHistory-DZVwya9v.js +187 -0
- package/dist/MemberList-KusIfy1u.js +334 -0
- package/dist/{MemberTransactions-Bg-ziZy8.js → MemberTransactions-msyjdzlI.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jbDJkbZh.js → MessageInput.vue_vue_type_script_setup_true_lang-DbV-m3cC.js} +5928 -5644
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-1DYGpJnD.js +40 -0
- package/dist/Mission-CUUxpBUF.js +360 -0
- package/dist/{Overview-nsyJGSCq.js → Overview-C9jyKXHX.js} +21 -20
- package/dist/Overview-CYKoF8Hp.js +1316 -0
- package/dist/Point-CPpQ07yp.js +288 -0
- package/dist/Promotion-CJ95m9Qb.js +423 -0
- package/dist/{Queue-Dkipt6fw.js → Queue-CX39ILh_.js} +14 -13
- package/dist/{Record-BFqx6vM-.js → Record-6I0qyXB5.js} +9 -9
- package/dist/Review-DoWu2XNT.js +45 -0
- package/dist/ReviewFacebookCallback-Co-5TnI7.js +238 -0
- package/dist/ReviewGoogleCallback-Ca7ZuMcF.js +213 -0
- package/dist/{Reward-DjFEE7I_.js → Reward-Cx_N6qBJ.js} +35 -35
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BzZ6VH80.js → RewardGroup.vue_vue_type_script_setup_true_lang-Cn5Yp37p.js} +14 -13
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-A9jQX4jt.js → RuleGroup.vue_vue_type_script_setup_true_lang-M0c67Dyl.js} +196 -186
- package/dist/{Segment-BAjdUfZ6.js → Segment-Bx0EW966.js} +275 -276
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CAQPFzRH.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-ahvrEUGa.js} +37 -36
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Gkz8jhES.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-C7zSfZdl.js} +4 -4
- package/dist/{Setting-BK7y0XC-.js → Setting-DzEK3dWj.js} +14 -14
- package/dist/{SettingAdvertisements-DfQ645xr.js → SettingAdvertisements-BNALbI88.js} +12 -12
- package/dist/Settings-Cw85-xzq.js +230 -0
- package/dist/Store-BSqW1gwf.js +2612 -0
- package/dist/{StoreRewards-usHKOGmB.js → StoreRewards-CJXnS8Qf.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-C6tUwHEj.js +1329 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrcWUZuR.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-iylphGuV.js} +2 -2
- package/dist/{Tier-BF3V430O.js → Tier-DfitNxp2.js} +2580 -754
- package/dist/{Title-DwPuqKfJ.js → Title-QCbtOvKB.js} +39 -37
- package/dist/Transaction-dOCzlidD.js +45 -0
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DToNRTJS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Be5X1C-Y.js} +26 -26
- package/dist/{Voucher-DnhVIl_o.js → Voucher-BfoCDwjg.js} +156 -133
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Btb3UZCn.js → VoucherEditor.vue_vue_type_script_setup_true_lang-0EIYoZ0F.js} +118 -124
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-EFUW9DMY.js → ZodTextField.vue_vue_type_script_setup_true_lang-UdStgKbX.js} +2 -2
- package/dist/{app-i3r-6ZVm.js → app-BxTElIm-.js} +45168 -37577
- package/dist/app.js +1 -1
- package/dist/base.export-BmUK8hMh.js +75 -0
- package/dist/{business-i0Gxk7gG.js → business-DjAiT8tR.js} +5 -5
- package/dist/campaign-DlR3KF9m.js +368 -0
- package/dist/campaign-tAmQNoq7.js +100 -0
- package/dist/{campaign.enum-CbUTfxek.js → campaign.enum-BjwEQd11.js} +1 -1
- package/dist/{campaign.fn-BjHSIDd1.js → campaign.fn-C6kWWIQx.js} +53 -53
- package/dist/{collectible.enum-DN7E_kHg.js → collectible.enum-BrtXpT9S.js} +1 -1
- package/dist/collection.fn-CDhfM3Eq.js +26 -0
- package/dist/currency-10nX5QnT.js +7 -0
- package/dist/{duplicateCampaign-DmdJQEIA.js → duplicateCampaign-6oMZOvfM.js} +11 -11
- package/dist/{effect-DM4AzeQl.js → effect-T4YzuTc5.js} +1 -1
- package/dist/{email-addresses-BlqVJhwZ.js → email-addresses-BjODnJMM.js} +209 -201
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-CkdISSVP.js → helper-BCl5r5yZ.js} +1 -1
- package/dist/{index-DgzNGQgE.js → index-B9ZMIUMa.js} +2083 -2559
- package/dist/{index-CB7ytKOE.js → index-BBsK7TUw.js} +1588 -1522
- package/dist/index-BQk6zTgf.js +32437 -0
- package/dist/index-Bd4clHfr.js +901 -0
- package/dist/index-BeVWchv7.js +14550 -0
- package/dist/index-Bht1Z11w.js +72 -0
- package/dist/{index-FD50UHqf.js → index-BiolIgqR.js} +105 -123
- package/dist/{index-Cl8t41Sk.js → index-BxU--5J5.js} +5 -5
- package/dist/index-Bz6oSli7.js +151 -0
- package/dist/index-C5IfNJUl.js +53 -0
- package/dist/{index-BWsj6lCJ.js → index-CRvUvCMA.js} +14 -14
- package/dist/{index-B6xi1soU.js → index-CnaQt4Pn.js} +1 -1
- package/dist/{index-4EtrCy_K.js → index-Ctja--IE.js} +4 -4
- package/dist/{index-D6qeYVNz.js → index-D8rGhchh.js} +1 -1
- package/dist/{index-BrboOmPq.js → index-DJdTDF9C.js} +347 -216
- package/dist/index-DXiJa8Cw.js +137 -0
- package/dist/{index-CxdLExX0.js → index-DeQKLilv.js} +24 -9
- package/dist/{index-vI-ndGu_.js → index-DhtKt4OL.js} +5 -5
- package/dist/{index.esm2017-BX5CyKoc.js → index.esm2017-CEOegJjn.js} +132 -132
- package/dist/{loading-DTKDhqew.js → loading-Dx4SCvZY.js} +1 -1
- package/dist/{lodash-CCPBsqhe.js → lodash-Dq8OKCKK.js} +1 -1
- package/dist/member-import-DX-jn2uk.js +187 -0
- package/dist/membership-CltAa-gH.js +274 -0
- package/dist/{money-wMK3QkZ5.js → money-DsaAjJTI.js} +1 -1
- package/dist/{number-DjKVlWn0.js → number-DmhHKYgY.js} +1 -1
- package/dist/objectid-BdNv-dZX.js +145 -0
- package/dist/{plugins-D25PaNJk.js → plugins-BFKVM3uC.js} +13 -12
- package/dist/remy-Qz_pNsUS.js +13 -0
- package/dist/{reward-E63jqJHm.js → reward--SjvIeyy.js} +1 -1
- package/dist/{rule-RVvPtAnk.js → rule-CAKdNobZ.js} +335 -275
- package/dist/style.css +1 -1
- package/dist/{template-zNxOQaqe.js → template-Cfxc5eM8.js} +6 -6
- package/dist/timezone-D2b-V5XD.js +20 -0
- package/dist/transaction.fn-B5mLY7bz.js +71 -0
- package/dist/{trigger-BXV02FhP.js → trigger-DvYcjRBZ.js} +17 -17
- package/dist/useMarketingMaterialActions-DtqnjMSt.js +96 -0
- package/dist/{usePagination-BPcPhEnp.js → usePagination-DKX24g31.js} +1 -1
- package/dist/{user-Bd8S7R5u.js → user-fWb1NxGO.js} +1 -1
- package/dist/vue-i18n-wJReAVJw.js +2365 -0
- package/dist/{xlsx-_tQC9Ezf.js → xlsx-Mthhu4JR.js} +440 -440
- package/dist/{zod-C1j2GLZP.js → zod-CVpVUgBZ.js} +1 -1
- package/package.json +10 -6
- package/dist/Broadcast-Cy-i-WOT.js +0 -266
- package/dist/Card-f2XOtWxp.js +0 -910
- package/dist/Credit-CcZF4aQS.js +0 -260
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C7KZ8GMx.js +0 -3377
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
- package/dist/Game-CUW7NeVG.js +0 -330
- package/dist/LoyaltyDashboard-GqyUwvXz.js +0 -1082
- package/dist/MainLayout-R5NxIBR-.js +0 -41
- package/dist/Member-CC5F6Bmz.js +0 -280
- package/dist/MemberList-Cq4zxopX.js +0 -1601
- package/dist/Mission-DcCZ6tAG.js +0 -334
- package/dist/Point-D1vLd5hL.js +0 -262
- package/dist/Promotion-Cv7MW5RJ.js +0 -397
- package/dist/Review-CKhakUMe.js +0 -1123
- package/dist/ReviewFacebookCallback-xgRpXQAg.js +0 -243
- package/dist/ReviewGoogleCallback-Cqi_43qi.js +0 -208
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-DDqK4kV1.js +0 -181
- package/dist/Store-uTRQ6KbC.js +0 -1996
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Bb2sTsuA.js +0 -1130
- package/dist/Transaction-CnTEfMGU.js +0 -39
- package/dist/campaign-CbMlARNI.js +0 -219
- package/dist/campaign-f7FT91GR.js +0 -277
- package/dist/export-DQR-0lmK.js +0 -97
- package/dist/index-COrXX9MR.js +0 -52
- package/dist/index-CWiaP-aV.js +0 -28900
- package/dist/index-jVfDVEtz.js +0 -85
- package/dist/membership-rifuatxU.js +0 -255
- package/dist/objectid-DjpWkCxH.js +0 -145
- package/dist/useMarketingMaterialActions-5TFNqZVo.js +0 -107
- package/dist/vue-i18n-CgMK-TaC.js +0 -2365
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { defineComponent as I, ref as i, computed as g, onMounted as j, resolveComponent as r, openBlock as c, createBlock as d, unref as o, withCtx as p, createVNode as b, normalizeClass as f, createCommentVNode as k, createElementVNode as B, toDisplayString as F, isRef as M, createElementBlock as O, Fragment as A, renderList as z } from "vue";
|
|
2
|
+
const N = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, E = /* @__PURE__ */ I({
|
|
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
|
+
allLabel: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: "All"
|
|
47
|
+
},
|
|
48
|
+
selectedLabel: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: "{count} selected"
|
|
51
|
+
},
|
|
52
|
+
searchPlaceholder: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: "Search locations"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
emits: ["update:model-value"],
|
|
58
|
+
setup(u, { emit: C }) {
|
|
59
|
+
const e = u, v = C, m = i(!1), t = i({}), s = i(""), V = g(() => {
|
|
60
|
+
const l = Object.keys(t.value).length;
|
|
61
|
+
return !t.value || Object.keys(t.value).length == e.items.length || l === 0 ? e.allLabel : e.selectedLabel.replace("{count}", String(l));
|
|
62
|
+
});
|
|
63
|
+
function w(l) {
|
|
64
|
+
t.value[l] ? delete t.value[l] : t.value[l] = !0, v("update:model-value", Object.keys(t.value));
|
|
65
|
+
}
|
|
66
|
+
function L() {
|
|
67
|
+
Object.keys(t.value).length > 0 ? t.value = {} : t.value = e.items.reduce((l, n) => (l[n.value] = !0, l), {}), v("update:model-value", Object.keys(t.value));
|
|
68
|
+
}
|
|
69
|
+
const S = g(() => s.value && s.value.length > 0 ? e.items.filter(
|
|
70
|
+
(l) => l.label.toLowerCase().includes(s.value.trim().toLowerCase())
|
|
71
|
+
) : e.items);
|
|
72
|
+
return j(() => {
|
|
73
|
+
t.value = e.modelValue.reduce((l, n) => (l[n] = !0, l), {}), e.modelValue.length == 0;
|
|
74
|
+
}), (l, n) => {
|
|
75
|
+
const y = r("FmIcon"), _ = r("FmChip"), x = r("FmTextField"), h = r("FmMenuItem"), q = r("FmMenu");
|
|
76
|
+
return c(), d(q, {
|
|
77
|
+
placement: u.placement || "bottom-end",
|
|
78
|
+
disabled: u.disabled == !0,
|
|
79
|
+
"model-value": o(m),
|
|
80
|
+
onMenuChanged: n[1] || (n[1] = (a) => m.value = a),
|
|
81
|
+
"close-on-click": !1
|
|
82
|
+
}, {
|
|
83
|
+
"menu-button": p(() => [
|
|
84
|
+
b(_, {
|
|
85
|
+
label: u.label,
|
|
86
|
+
class: f(e.class || "text-fm-color-neutral-gray-400 cursor-pointer")
|
|
87
|
+
}, {
|
|
88
|
+
default: p(() => [
|
|
89
|
+
e.icon ? (c(), d(y, {
|
|
90
|
+
key: 0,
|
|
91
|
+
name: e.icon,
|
|
92
|
+
class: f(e.class),
|
|
93
|
+
outline: "",
|
|
94
|
+
size: "sm"
|
|
95
|
+
}, null, 8, ["name", "class"])) : k("", !0),
|
|
96
|
+
B("div", N, F(e.label) + " " + F(u.showItemLabel ? o(V) : ""), 1),
|
|
97
|
+
b(y, {
|
|
98
|
+
name: o(m) ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
99
|
+
class: f(e.class),
|
|
100
|
+
outline: "",
|
|
101
|
+
size: "sm"
|
|
102
|
+
}, null, 8, ["name", "class"])
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
}, 8, ["label", "class"])
|
|
106
|
+
]),
|
|
107
|
+
default: p(() => [
|
|
108
|
+
u.searchable ? (c(), d(x, {
|
|
109
|
+
key: 0,
|
|
110
|
+
modelValue: o(s),
|
|
111
|
+
"onUpdate:modelValue": n[0] || (n[0] = (a) => M(s) ? s.value = a : null),
|
|
112
|
+
placeholder: e.searchPlaceholder,
|
|
113
|
+
class: "my-8"
|
|
114
|
+
}, null, 8, ["modelValue", "placeholder"])) : k("", !0),
|
|
115
|
+
b(h, {
|
|
116
|
+
"model-value": Object.keys(o(t)).length === e.items.length,
|
|
117
|
+
label: e.allLabel,
|
|
118
|
+
"has-checkbox": !0,
|
|
119
|
+
indeterminate: !0,
|
|
120
|
+
onClick: L
|
|
121
|
+
}, null, 8, ["model-value", "label"]),
|
|
122
|
+
(c(!0), O(A, null, z(o(S) ?? [], (a) => (c(), d(h, {
|
|
123
|
+
key: a.value,
|
|
124
|
+
value: a.value,
|
|
125
|
+
label: a.label,
|
|
126
|
+
"has-checkbox": !0,
|
|
127
|
+
"model-value": o(t)[a.value],
|
|
128
|
+
"onUpdate:modelValue": (T) => w(a.value)
|
|
129
|
+
}, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
|
|
130
|
+
]),
|
|
131
|
+
_: 1
|
|
132
|
+
}, 8, ["placement", "disabled", "model-value"]);
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
export {
|
|
137
|
+
E as _
|
|
138
|
+
};
|
|
@@ -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-BFKVM3uC.js";
|
|
5
|
+
import { u as ie } from "./loading-Dx4SCvZY.js";
|
|
6
|
+
import { u as re } from "./business-DjAiT8tR.js";
|
|
7
|
+
import { u as se } from "./campaign-tAmQNoq7.js";
|
|
8
|
+
import { b as T, c as U, a as le } from "./campaign-DlR3KF9m.js";
|
|
9
|
+
import { c as ce, p as me } from "./duplicateCampaign-6oMZOvfM.js";
|
|
10
|
+
import { _ as de } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
|
|
11
|
+
import { _ as ue } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-C09W9Qja.js";
|
|
12
|
+
import { u as pe } from "./template-Cfxc5eM8.js";
|
|
13
|
+
import { u as fe } from "./vue-i18n-wJReAVJw.js";
|
|
14
|
+
import { _ as ge } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-ahvrEUGa.js";
|
|
15
|
+
import "./index-D8rGhchh.js";
|
|
16
|
+
import { useRouter as ye } from "vue-router";
|
|
17
|
+
import { c as h } from "./index-Bz6oSli7.js";
|
|
18
|
+
import { R as _e } from "./app-BxTElIm-.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
|
+
};
|