@feedmepos/mf-connect 0.1.38-beta.8 → 0.1.38-beta.80
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-CJap-Cat.js → Analytic-LOK5TzX0.js} +31 -32
- package/dist/{App-CLTtX1QT.js → App-Bk5Z5u5_.js} +617 -607
- package/dist/AuditLogs-Rezf9EeA.js +1991 -0
- package/dist/{Bin-C2xMLxoE.js → Bin-B8yzS5bD.js} +10 -10
- package/dist/Broadcast-CZ0QCvua.js +266 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BCkD7Xfn.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-iJQS2Ck9.js} +6 -6
- package/dist/{Card-BPrCNLQy.js → Card-BQOv5yB9.js} +145 -140
- package/dist/Collections-qenPlCd2.js +540 -0
- package/dist/Credit-BJLskbVu.js +260 -0
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
- package/dist/DateInput.vue_vue_type_script_setup_true_lang-BN4Q5Y3l.js +54 -0
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DKWCWOU_.js +3120 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-Dw1qQfnG.js +351 -0
- package/dist/Experience-BjfEiGT8.js +259 -0
- package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-C013Tr1o.js} +1 -1
- 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-Gw_tFjen.js +330 -0
- package/dist/Grab-Bdv7SaB9.js +300 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-Ba4L39GL.js} +49 -48
- package/dist/{Index-DMdNgISh.js → Index-C67U3YDJ.js} +54 -54
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-pQ8sF5KW.js +48 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-o-eN3J4i.js} +1 -1
- package/dist/{MainLayout-B1aJoR95.js → MainLayout-DPjqCyJ5.js} +1 -1
- package/dist/Marketing-DtEooXof.js +166 -0
- package/dist/MarketingMaterialEdit-Balw055Y.js +1065 -0
- package/dist/{Member-CnSXGQi_.js → Member-QA7TQnyw.js} +38 -37
- package/dist/{MemberList-DcpEKV1D.js → MemberList-CSJQFYlh.js} +486 -491
- package/dist/{MemberTransactions-DeuuEcO5.js → MemberTransactions-D-46vda_.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DLAEPNsq.js → MessageInput.vue_vue_type_script_setup_true_lang-6a7_lw74.js} +13443 -10607
- package/dist/Mission-DJVxFbX5.js +334 -0
- package/dist/{Overview-elpi-jpI.js → Overview-Btkh3oiI.js} +24 -25
- package/dist/Point-CVdF9GtN.js +262 -0
- package/dist/Promotion-BtmlvUd3.js +396 -0
- package/dist/{Queue-GvBhNEFe.js → Queue-BfiCMsLC.js} +23 -24
- package/dist/{Record-CbSxgo8i.js → Record-B07QGPli.js} +10 -10
- package/dist/Review-BeZ90jW9.js +621 -0
- package/dist/ReviewFacebookCallback-CwAcKaib.js +243 -0
- package/dist/ReviewGoogleCallback-CVK6Yc5E.js +213 -0
- package/dist/{Reward-QCGlrq89.js → Reward-CyXqNpAa.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DSRvoo9z.js → RewardGroup.vue_vue_type_script_setup_true_lang-BICsdgSh.js} +13 -14
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BgKGNK7y.js +1912 -0
- package/dist/{Segment-5PndnEUa.js → Segment-B9g57O7g.js} +273 -274
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DXR7bpzY.js → SelectItems.vue_vue_type_script_setup_true_lang-BwDOXE87.js} +23 -23
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DmITlNtt.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DXDcJLYF.js} +12 -12
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CROBk6cD.js +226 -0
- package/dist/Setting-BHteqZv6.js +2039 -0
- package/dist/SettingAdvertisements-CubrbuSL.js +264 -0
- package/dist/Store-u6LYUnmp.js +1996 -0
- package/dist/StoreRewards-D9h0YnEx.js +535 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-vrYqDGOa.js +1129 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-WgNstmNx.js +7007 -0
- package/dist/{Tier-BKKxG29r.js → Tier-CBdi4sPT.js} +561 -480
- package/dist/{Title-CReZgw8V.js → Title-BegmN7hs.js} +151 -149
- package/dist/{Transaction-HWCmSVaJ.js → Transaction-C6XMd9_r.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-D00AchXo.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BBf4BP4m.js} +7 -7
- package/dist/Voucher-D6hSas_z.js +421 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-ZOlAZ_q5.js +421 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXF39yC1.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bs8TNiCY.js} +2 -2
- package/dist/app-Duwed9mD.js +59309 -0
- package/dist/app.js +1 -1
- package/dist/{business-Bc-EMd2p.js → business-6oZ8Rgui.js} +11 -8
- package/dist/campaign-CzenWLhs.js +219 -0
- package/dist/campaign-PYce7g0o.js +253 -0
- package/dist/campaign.enum-KHniCp5a.js +26 -0
- package/dist/campaign.fn-dOSgHJcU.js +776 -0
- package/dist/{collectible.enum-C4dM8khp.js → collectible.enum-BZA1DKIB.js} +1 -1
- package/dist/{collection.fn-AjDNdFe1.js → collection.fn-CyfrdKBf.js} +2 -2
- package/dist/dto-DYmM2ud_.js +222 -0
- package/dist/duplicateCampaign-BXaDK8Q6.js +51 -0
- package/dist/effect-DBI_JHbP.js +89 -0
- package/dist/{email-addresses-B0SzUCQM.js → email-addresses-BNs-WN79.js} +2 -2
- package/dist/{export-Bgz6WcNZ.js → export-DTCCKE2m.js} +4 -4
- package/dist/{helper-B1vFwohM.js → helper-CeYr7Anh.js} +22 -7
- package/dist/index-38u-cCwD.js +3431 -0
- package/dist/{index-Cm2sBagk.js → index-BdjY7GRO.js} +1 -1
- package/dist/index-CGMiuxyf.js +85 -0
- package/dist/index-CQZbm9P5.js +8912 -0
- package/dist/index-Cal60fAm.js +48 -0
- package/dist/{index-DT2viYsL.js → index-CnRLkzpg.js} +617 -191
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/{index-CSQY21Zb.js → index-D-kPBF9C.js} +3 -3
- package/dist/{index-DVQnrex_.js → index-DcFYm1fy.js} +3 -3
- package/dist/index-DjONNxbl.js +30289 -0
- package/dist/{index-26SopNpv.js → index-ItaoypTr.js} +1 -1
- package/dist/index-_jxXI4_v.js +28899 -0
- package/dist/{index-DwT9RLst.js → index-nXfjG8UQ.js} +23 -12
- package/dist/{index-BIRmS75g.js → index-pHQfP2e7.js} +1 -1
- package/dist/{index.esm2017-BAIN70_n.js → index.esm2017-CokFPnqn.js} +185 -185
- package/dist/{loading-C6Ouh0mG.js → loading-fZQi5zP8.js} +1 -1
- package/dist/{lodash-B5I3zXaY.js → lodash-R-DIRmbj.js} +1 -1
- package/dist/{membership-DU0BwIj8.js → membership-CApN5ZJ1.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-Bg7GuE5s.js → money-C6I6vVy2.js} +1 -1
- package/dist/{number-Ddmqo5D_.js → number-Dq4d381U.js} +1 -1
- package/dist/objectid-Kv5GREBk.js +145 -0
- package/dist/{campaign-BeF8kTyg.js → plugins-9_UvAdJ2.js} +784 -777
- package/dist/remy-NLAa-9Qg.js +46 -0
- package/dist/{reward-CN4gvn4c.js → reward-DXHGeGYY.js} +1 -1
- package/dist/{rule-CpiqqR0c.js → rule-B_XgRDr-.js} +505 -487
- package/dist/rule-builder-BMXyzu8k.js +102 -0
- package/dist/style.css +11 -2
- package/dist/template-CnyTUzQU.js +188 -0
- package/dist/timezone-Izs3ibB-.js +1156 -0
- package/dist/trigger-Dda3NmaE.js +213 -0
- package/dist/usePagination-Byxk4XVn.js +220 -0
- package/dist/user-BZxO8qdh.js +55 -0
- package/dist/{vue-i18n-DVmD9I_o.js → vue-i18n-DDbkmbSf.js} +433 -433
- package/dist/{xlsx-qJHsnW7k.js → xlsx-D8yNl8dN.js} +1 -1
- package/dist/{zod-Bg2FbC-D.js → zod-Xp7TePRP.js} +32 -31
- package/package.json +14 -6
- package/dist/AuditLogs-DW4rwNOn.js +0 -1887
- package/dist/Broadcast-Dhc0j16O.js +0 -227
- package/dist/Collections-CsUJEmqz.js +0 -465
- package/dist/Credit-Mqa-0XJd.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-DWWLxIq-.js +0 -2185
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BiQGZeDc.js +0 -347
- package/dist/Experience-BD5C3old.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/Game-D4xsi8Ym.js +0 -278
- package/dist/Marketing-axcQYl8k.js +0 -20073
- package/dist/Mission-BHZiL-GH.js +0 -296
- package/dist/Point-gKvdggAl.js +0 -226
- package/dist/Promotion-7x2F_sFX.js +0 -289
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-AuN9NgcG.js +0 -1751
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DTlv8ZAn.js +0 -147
- package/dist/Setting-Cab47wfH.js +0 -1936
- package/dist/Store-BFL3T9B5.js +0 -1842
- package/dist/StoreRewards-C43dCJtM.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-aAj5-nzZ.js +0 -1029
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-K3OPSYrF.js +0 -139
- package/dist/Voucher-BhUAcPZg.js +0 -384
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-C0YNez2L.js +0 -419
- package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/app-BGaUIdCr.js +0 -7086
- package/dist/app-DccKBdW_.js +0 -33357
- package/dist/campaign-DbJZEU7P.js +0 -96
- package/dist/campaign.enum-PBKYGUQY.js +0 -20
- package/dist/campaign.fn-Cq-4LfQj.js +0 -758
- package/dist/dto-8NvMMYAb.js +0 -214
- package/dist/effect-DZhcEQ5g.js +0 -78
- package/dist/index-CQQedv0M.js +0 -32260
- package/dist/index-CTgQRqQR.js +0 -30038
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/index-DGaywhpY.js +0 -76
- package/dist/index-DOfLDlI8.js +0 -8861
- package/dist/index-DVpAocyR.js +0 -3120
- package/dist/index-DlJGd8RC.js +0 -121
- package/dist/index-Dm65CTdy.js +0 -38
- package/dist/objectid-MCaJXAgq.js +0 -145
- package/dist/plugins-C-CRzeyC.js +0 -208
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
- package/dist/rule-builder-DmkJng-x.js +0 -89
- package/dist/template-DTZgnkl5.js +0 -190
- package/dist/trigger-CPjJ73Rc.js +0 -144
- package/dist/usePagination-BeF5K3M7.js +0 -223
- package/dist/user-8VIt8A1x.js +0 -54
|
@@ -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,330 @@
|
|
|
1
|
+
import { defineComponent as W, ref as P, computed as J, onMounted as Q, resolveComponent as m, openBlock as f, createElementBlock as V, Fragment as A, createVNode as r, unref as o, withCtx as x, createElementVNode as n, toDisplayString as g, renderList as X, createBlock as L, resolveDynamicComponent as Y, h as c } from "vue";
|
|
2
|
+
import { _ as Z } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as ee, components as y } from "@feedmepos/ui-library";
|
|
4
|
+
import { a as te, p as oe } from "./plugins-9_UvAdJ2.js";
|
|
5
|
+
import { u as ae } from "./loading-fZQi5zP8.js";
|
|
6
|
+
import { u as ne } from "./business-6oZ8Rgui.js";
|
|
7
|
+
import { u as ie, c as _ } from "./campaign-CzenWLhs.js";
|
|
8
|
+
import { b as D, c as G, a as se } from "./campaign-PYce7g0o.js";
|
|
9
|
+
import { c as re, p as le } from "./duplicateCampaign-BXaDK8Q6.js";
|
|
10
|
+
import { _ as ce } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
11
|
+
import { _ as me } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DKWCWOU_.js";
|
|
12
|
+
import { u as de } from "./template-CnyTUzQU.js";
|
|
13
|
+
import { u as ue } from "./vue-i18n-DDbkmbSf.js";
|
|
14
|
+
import { _ as pe } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-DXDcJLYF.js";
|
|
15
|
+
const fe = { class: "flex items-center" }, ge = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, ye = { class: "px-24 flex flex-col gap-y-16" }, _e = { class: "flex items-center justify-between w-full" }, he = { class: "flex gap-8 overflow-x-auto" }, we = { class: "space-y-8" }, Ce = { class: "flex w-full gap-4 items-center" }, xe = { class: "space-y-4" }, ve = { class: "fm-typo-en-body-lg-600" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ke = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fe = { class: "flex items-center gap-8" }, Se = { class: "flex flex-col gap-16 text-center" }, Pe = { class: "fm-typo-en-title-sm-800" }, Ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ne = /* @__PURE__ */ W({
|
|
16
|
+
__name: "Game",
|
|
17
|
+
setup(Ae) {
|
|
18
|
+
const { t: d } = ue(), K = {
|
|
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
|
+
}, B = ee(), U = de("GAME", B), h = ne(), u = ie(), { global: I, minor: R } = ae, l = P({
|
|
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((s) => {
|
|
32
|
+
var i;
|
|
33
|
+
return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(s);
|
|
34
|
+
}) : e.targetLocation.includes(t);
|
|
35
|
+
}
|
|
36
|
+
const w = J(
|
|
37
|
+
() => u.campaigns.token.filter((e) => T(e))
|
|
38
|
+
), j = [
|
|
39
|
+
{
|
|
40
|
+
header: "Program title",
|
|
41
|
+
accessorKey: "name",
|
|
42
|
+
// accessorFn: (v) => v.name,
|
|
43
|
+
cell(e) {
|
|
44
|
+
return c("div", { class: "flex items-center justify-between gap-4" }, [
|
|
45
|
+
c("div", { class: "flex items-center" }, [
|
|
46
|
+
c(
|
|
47
|
+
y.FmTooltip,
|
|
48
|
+
{
|
|
49
|
+
content: e.row.original._id,
|
|
50
|
+
onClick: (t) => {
|
|
51
|
+
t.stopPropagation(), te(e.row.original._id);
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
[
|
|
55
|
+
c(y.FmIcon, {
|
|
56
|
+
name: "info",
|
|
57
|
+
outline: !0,
|
|
58
|
+
size: "sm"
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
)
|
|
62
|
+
]),
|
|
63
|
+
c("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 D(e.row.original);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
header: "Summary",
|
|
76
|
+
accessorFn: (e) => G(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 c("div", { class: "flex items-center gap-8" }, [
|
|
90
|
+
c(y.FmButton, {
|
|
91
|
+
variant: "tertiary",
|
|
92
|
+
icon: "content_copy",
|
|
93
|
+
iconColor: "neutral-gray-400",
|
|
94
|
+
onClick: async (t) => {
|
|
95
|
+
t.stopPropagation(), await M(e.row.original);
|
|
96
|
+
}
|
|
97
|
+
}),
|
|
98
|
+
c(y.FmButton, {
|
|
99
|
+
variant: "tertiary",
|
|
100
|
+
icon: "send",
|
|
101
|
+
iconColor: "neutral-gray-400",
|
|
102
|
+
onClick: (t) => {
|
|
103
|
+
t.stopPropagation(), N(e.row.original);
|
|
104
|
+
}
|
|
105
|
+
}),
|
|
106
|
+
c(y.FmButton, {
|
|
107
|
+
variant: "tertiary",
|
|
108
|
+
icon: "delete",
|
|
109
|
+
iconColor: "neutral-gray-400",
|
|
110
|
+
onClick: (t) => {
|
|
111
|
+
t.stopPropagation(), E(e.row.original);
|
|
112
|
+
}
|
|
113
|
+
})
|
|
114
|
+
]);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
], v = P(), $ = P();
|
|
118
|
+
async function E(e) {
|
|
119
|
+
await oe.remove(`Are you sure you want to remove ${e.name}?`) && await R(
|
|
120
|
+
async () => {
|
|
121
|
+
await _.delete(e._id), await u.read("GAME");
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
message: `Removing ${e.name}`,
|
|
125
|
+
successMessage: `Removed ${e.name} successfully`
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
async function C(e) {
|
|
130
|
+
e ? await t() : U.open(async (s) => {
|
|
131
|
+
await t(s);
|
|
132
|
+
});
|
|
133
|
+
async function t(s) {
|
|
134
|
+
var i;
|
|
135
|
+
(i = v.value) == null || i.showSheet(
|
|
136
|
+
!0,
|
|
137
|
+
"GAME",
|
|
138
|
+
e ? await _.readById(e._id) : void 0,
|
|
139
|
+
s
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
async function M(e) {
|
|
144
|
+
var i;
|
|
145
|
+
if (!await re(e.name))
|
|
146
|
+
return;
|
|
147
|
+
const t = await _.readById(e._id), s = le(t);
|
|
148
|
+
(i = v.value) == null || i.showSheet(
|
|
149
|
+
!0,
|
|
150
|
+
"GAME",
|
|
151
|
+
s,
|
|
152
|
+
t.template
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
async function H(e) {
|
|
156
|
+
var t, s, i;
|
|
157
|
+
e.campaign._id && ((i = (s = (t = e.campaign) == null ? void 0 : t.game) == null ? void 0 : s.rewards) != null && i.some(
|
|
158
|
+
(p) => p.type === "VOUCHER"
|
|
159
|
+
)) && await new Promise((p) => {
|
|
160
|
+
B.open({
|
|
161
|
+
title: "Confirmation",
|
|
162
|
+
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
163
|
+
primaryActions: { text: "Update all", close: !0 },
|
|
164
|
+
secondaryActions: { text: "Update future only", close: !0 }
|
|
165
|
+
}).onPrimary(async () => {
|
|
166
|
+
e.updateCollections = !0, p();
|
|
167
|
+
}).onSecondary(async () => {
|
|
168
|
+
p();
|
|
169
|
+
});
|
|
170
|
+
}), await R(
|
|
171
|
+
async () => {
|
|
172
|
+
e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await u.read("GAME");
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
message: `${e.campaign._id ? "Updating" : "Creating"} game program`,
|
|
176
|
+
successMessage: `Game program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
function N(e) {
|
|
181
|
+
var t;
|
|
182
|
+
(t = $.value) == null || t.showSheet({
|
|
183
|
+
campaign: e
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
return Q(async () => {
|
|
187
|
+
await I(async () => {
|
|
188
|
+
await u.read("GAME"), await h.readPremium();
|
|
189
|
+
});
|
|
190
|
+
}), (e, t) => {
|
|
191
|
+
const s = m("FmPill"), i = m("FmPageHead"), b = m("FmSearch"), p = m("FmTable"), k = m("FmButton"), O = m("FmListItem"), q = m("FmList"), z = m("FmCard");
|
|
192
|
+
return f(), V(A, null, [
|
|
193
|
+
r(i, {
|
|
194
|
+
actions: o(w).length > 0 && o(h).isPremium ? [K] : [],
|
|
195
|
+
"onClick:action": t[0] || (t[0] = () => C())
|
|
196
|
+
}, {
|
|
197
|
+
title: x(() => [
|
|
198
|
+
n("div", fe, [
|
|
199
|
+
n("span", ge, g(o(d)("connect.program.game.title")), 1),
|
|
200
|
+
r(s, { variant: "premium" })
|
|
201
|
+
])
|
|
202
|
+
]),
|
|
203
|
+
_: 1
|
|
204
|
+
}, 8, ["actions"]),
|
|
205
|
+
n("div", ye, [
|
|
206
|
+
r(b, {
|
|
207
|
+
modelValue: o(l).searchKey,
|
|
208
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => o(l).searchKey = a),
|
|
209
|
+
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
210
|
+
placeholder: "search",
|
|
211
|
+
collapsible: ""
|
|
212
|
+
}, null, 8, ["modelValue"]),
|
|
213
|
+
o(u).campaigns.token && o(u).campaigns.token.length > 0 ? (f(), V(A, { key: 0 }, [
|
|
214
|
+
n("div", _e, [
|
|
215
|
+
n("div", he, [
|
|
216
|
+
r(ce, {
|
|
217
|
+
label: `${o(d)("connect.common.location")}: `,
|
|
218
|
+
"right-icon": "keyboard_arrow_down",
|
|
219
|
+
modelValue: o(l).location,
|
|
220
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => o(l).location = a),
|
|
221
|
+
icon: "storefront",
|
|
222
|
+
"show-item-label": !0,
|
|
223
|
+
items: o(h).locationOptions
|
|
224
|
+
}, null, 8, ["label", "modelValue", "items"])
|
|
225
|
+
]),
|
|
226
|
+
r(b, {
|
|
227
|
+
modelValue: o(l).searchKey,
|
|
228
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => o(l).searchKey = a),
|
|
229
|
+
class: "xs:hidden sm:hidden",
|
|
230
|
+
placeholder: "search",
|
|
231
|
+
collapsible: ""
|
|
232
|
+
}, null, 8, ["modelValue"])
|
|
233
|
+
]),
|
|
234
|
+
r(p, {
|
|
235
|
+
class: "xs:hidden sm:hidden",
|
|
236
|
+
"row-data": o(w),
|
|
237
|
+
"column-defs": j,
|
|
238
|
+
"search-value": o(l).searchKey,
|
|
239
|
+
"column-filter": [],
|
|
240
|
+
onRowClick: t[4] || (t[4] = (a) => C(a.original)),
|
|
241
|
+
"hide-footer": o(w).length < 10
|
|
242
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
243
|
+
r(q, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
244
|
+
default: x(() => [
|
|
245
|
+
(f(!0), V(A, null, X(o(w).filter(
|
|
246
|
+
(a) => a.name.toLowerCase().includes(o(l).searchKey.toLowerCase())
|
|
247
|
+
), (a) => (f(), L(O, {
|
|
248
|
+
key: a._id.toString(),
|
|
249
|
+
onClick: (F) => C(a),
|
|
250
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
251
|
+
}, {
|
|
252
|
+
default: x(() => {
|
|
253
|
+
var F;
|
|
254
|
+
return [
|
|
255
|
+
n("div", we, [
|
|
256
|
+
n("div", Ce, [
|
|
257
|
+
(f(), L(Y(o(D)(a))))
|
|
258
|
+
]),
|
|
259
|
+
n("div", xe, [
|
|
260
|
+
n("div", ve, g(a.name), 1),
|
|
261
|
+
n("div", be, g(o(G)(a)), 1)
|
|
262
|
+
]),
|
|
263
|
+
n("div", ke, g(o(d)("connect.program.game.token_received", {
|
|
264
|
+
count: ((F = a.pf_collectible) == null ? void 0 : F.currentReceive) ?? 0
|
|
265
|
+
})), 1)
|
|
266
|
+
]),
|
|
267
|
+
n("div", Fe, [
|
|
268
|
+
r(k, {
|
|
269
|
+
icon: "content_copy",
|
|
270
|
+
"icon-color": "neutral-gray-400",
|
|
271
|
+
variant: "tertiary",
|
|
272
|
+
onClick: async (S) => {
|
|
273
|
+
S.stopPropagation(), await M(a);
|
|
274
|
+
}
|
|
275
|
+
}, null, 8, ["onClick"]),
|
|
276
|
+
r(k, {
|
|
277
|
+
icon: "delete",
|
|
278
|
+
"icon-color": "neutral-gray-400",
|
|
279
|
+
variant: "tertiary",
|
|
280
|
+
onClick: (S) => (S.stopPropagation(), E(a))
|
|
281
|
+
}, null, 8, ["onClick"])
|
|
282
|
+
])
|
|
283
|
+
];
|
|
284
|
+
}),
|
|
285
|
+
_: 2
|
|
286
|
+
}, 1032, ["onClick"]))), 128))
|
|
287
|
+
]),
|
|
288
|
+
_: 1
|
|
289
|
+
})
|
|
290
|
+
], 64)) : (f(), L(z, {
|
|
291
|
+
key: 1,
|
|
292
|
+
variant: "outlined",
|
|
293
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
294
|
+
}, {
|
|
295
|
+
default: x(() => [
|
|
296
|
+
t[6] || (t[6] = n("img", {
|
|
297
|
+
src: Z,
|
|
298
|
+
class: "aspect-square w-[150px]"
|
|
299
|
+
}, null, -1)),
|
|
300
|
+
n("div", Se, [
|
|
301
|
+
n("div", Pe, g(o(d)("connect.program.game.empty_state.title")), 1),
|
|
302
|
+
n("div", Ve, g(o(d)("connect.program.game.empty_state.description")), 1)
|
|
303
|
+
]),
|
|
304
|
+
r(k, {
|
|
305
|
+
variant: "primary",
|
|
306
|
+
label: "Create game program",
|
|
307
|
+
icon: "add",
|
|
308
|
+
disabled: !o(h).isPremium,
|
|
309
|
+
onClick: t[5] || (t[5] = (a) => C())
|
|
310
|
+
}, null, 8, ["disabled"])
|
|
311
|
+
]),
|
|
312
|
+
_: 1
|
|
313
|
+
})),
|
|
314
|
+
r(me, {
|
|
315
|
+
ref_key: "sheetRef",
|
|
316
|
+
ref: v,
|
|
317
|
+
"onSubmit:modelValue": H
|
|
318
|
+
}, null, 512),
|
|
319
|
+
r(pe, {
|
|
320
|
+
ref_key: "sendCollectionSheetRef",
|
|
321
|
+
ref: $
|
|
322
|
+
}, null, 512)
|
|
323
|
+
])
|
|
324
|
+
], 64);
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
export {
|
|
329
|
+
Ne as default
|
|
330
|
+
};
|