@feedmepos/mf-connect 0.1.0-beta.9 → 0.1.1-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-C2etD-eu.js +620 -0
- package/dist/{App-DQUbRsdA.js → App-DlRvkDpN.js} +58 -59
- package/dist/Broadcast-DpCGUS6r.js +216 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D-BFllvG.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cj4IcH5D.js} +20 -20
- package/dist/Card-DjGC6jmq.js +823 -0
- package/dist/Collections-Q2pYWnJF.js +440 -0
- package/dist/Credit-DOIq2VYW.js +214 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C_ZKNWzb.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D7ML8ePp.js} +1010 -1026
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CyxWG5I7.js +344 -0
- package/dist/Experience-DUst4I0H.js +211 -0
- package/dist/Game-CXnQR-wV.js +250 -0
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → MainLayout-DpZC6o3R.js} +53 -19
- package/dist/Marketing-CZfHsMFC.js +309 -0
- package/dist/Member-CX5Ohgeg.js +92 -0
- package/dist/MemberList-D8I3SaAs.js +1040 -0
- package/dist/MemberOverview-C2n9oJZh.js +58 -0
- package/dist/{MemberTransactions-zSxSnUkK.js → MemberTransactions-DfZNbCHD.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BxFVEoBX.js +203 -0
- package/dist/Mission-S1pwDbqp.js +248 -0
- package/dist/Point-BdLUcGZy.js +220 -0
- package/dist/Promotion-DWAeQGkU.js +244 -0
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CTKKhH-r.js → RuleGroup.vue_vue_type_script_setup_true_lang-Dux_NMO5.js} +577 -568
- package/dist/Segment-CXSE8Bzf.js +560 -0
- package/dist/Setting-CLuXuEId.js +1870 -0
- package/dist/Store-Be3cui0S.js +1533 -0
- package/dist/StoreRewards-zFy_w8p4.js +429 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-2Jqj_rKv.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DxGJKgbc.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BkdSj0cX.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Dreo45H1.js} +1 -1
- package/dist/{Tier-Cpl0FV8L.js → Tier-ChzcISYF.js} +453 -481
- package/dist/{Title-CbMDd1Et.js → Title-DQSjhBkT.js} +295 -314
- package/dist/Transaction-CeWmWpN_.js +36 -0
- package/dist/Voucher-BkLIxiZN.js +485 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +140 -0
- package/dist/app-CLNirPsB.js +2974 -0
- package/dist/{app-VxaUCtgl.js → app-DuNsy0aC.js} +1 -1
- package/dist/app.js +3 -5
- package/dist/{business-DR7jpnLz.js → business-COGiTmLD.js} +1 -1
- package/dist/{campaign-MqcTb329.js → campaign-BHZMjQi5.js} +3 -5
- package/dist/{collection.fn-CvEoe61K.js → collection.fn-sAxtYO_r.js} +2 -2
- package/dist/dto-ndeeV_nc.js +1145 -0
- package/dist/{effect-BjjQeiQg.js → effect-BQt0rkdT.js} +9 -9
- package/dist/email-addresses-B3PazwKs.js +705 -0
- package/dist/{export-B8cvWh5n.js → export-D6r-xNji.js} +3 -3
- package/dist/{helper-DfgVNY7B.js → helper-CrjQw_Et.js} +1 -1
- package/dist/{index-CWR3qYjb.js → index-Btlj28Vg.js} +1 -1
- package/dist/{index-C7zMfUgy.js → index-Buy-yvAZ.js} +319 -304
- package/dist/{index-0UYoh1-7.js → index-C3AAy__p.js} +1 -1
- package/dist/index-CHAaFSD2.js +11 -0
- package/dist/{index-Dap5R3vr.js → index-Cg3RFxc9.js} +91 -102
- package/dist/{index-2P9w5u3m.js → index-CqpEhMr6.js} +4 -4
- package/dist/{index-BsfWRB8R.js → index-CvHj-wYi.js} +1 -1
- package/dist/index-DGLmbBnE.js +28997 -0
- package/dist/{index-CJ8Uh2Ja.js → index-DXpd07G3.js} +3 -3
- package/dist/{index-B5NufbUt.js → index-Daax_BQa.js} +1 -1
- package/dist/{index-C2JNcGc-.js → index-DrLEuIe1.js} +281 -299
- package/dist/{index-DBy30v8N.js → index-tSEYvA-2.js} +3 -3
- package/dist/{index.esm2017-D1X3PgpO.js → index.esm2017-a5BlZ76G.js} +55 -55
- package/dist/{loading-CJ3nOovJ.js → loading-B3XGyQ8W.js} +460 -469
- package/dist/{membership-B1cmSRyk.js → membership-GIOJ1ptN.js} +3 -3
- package/dist/money-z7VwzhZP.js +15 -0
- package/dist/number-DHYb2ua_.js +12 -0
- package/dist/{rule-builder-CSmOONdb.js → rule-builder-CcsWd5r9.js} +1 -1
- package/dist/{rule-ChWyR-0j.js → rule-iIEblTE4.js} +179 -177
- package/dist/style.css +1 -1
- package/dist/{template-Cug7aRK0.js → template-DMRMDZOW.js} +63 -63
- package/dist/{xlsx-CfgPFFvp.js → usePagination-CNFe0T2B.js} +3176 -2955
- package/package.json +5 -8
- package/dist/Analytic-CMXUjK_F.js +0 -622
- package/dist/Broadcast-DowFtHv6.js +0 -223
- package/dist/Card-C7rhL0pV.js +0 -825
- package/dist/Collections-B-1wlk3r.js +0 -453
- package/dist/Credit-DDjozmoF.js +0 -220
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-pwMuIgs5.js +0 -345
- package/dist/Experience-BbE-c1Op.js +0 -221
- package/dist/Game-DQdRpaN-.js +0 -255
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
- package/dist/MainLayout-B1aJoR95.js +0 -41
- package/dist/Marketing-Dgmxzg4h.js +0 -316
- package/dist/Member-w23oRVwN.js +0 -69
- package/dist/MemberList-BLIdjznQ.js +0 -1735
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Dy_lMdZA.js +0 -432
- package/dist/Mission-Cjt0E083.js +0 -261
- package/dist/Point-CQJL3Ewu.js +0 -222
- package/dist/Promotion-BYViH3bu.js +0 -247
- package/dist/Segment-B9Jj1ak0.js +0 -437
- package/dist/Setting-DXWbgRxs.js +0 -1901
- package/dist/Store-Dswk2e_z.js +0 -1511
- package/dist/StoreRewards-CNUhG_Ue.js +0 -401
- package/dist/Transaction-BB-kk-84.js +0 -39
- package/dist/Voucher-b1_Jlm6X.js +0 -490
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-pG-SrXp9.js +0 -56
- package/dist/app-DCHKJoql.js +0 -5639
- package/dist/dto-jcK3TGB7.js +0 -2770
- package/dist/index-Cv7pLAYq.js +0 -3
- package/dist/index-LrSSauN2.js +0 -29193
- package/dist/money-BEATdGS6.js +0 -15
- package/dist/number-CeAYAKCp.js +0 -12
- package/dist/usePagination-BeF5K3M7.js +0 -223
- package/dist/vue-i18n-BRhKDHdF.js +0 -2365
- package/dist/zod-Bg2FbC-D.js +0 -90
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { defineComponent as O, ref as R, onMounted as J, computed as z, resolveComponent as y, openBlock as s, createElementBlock as x, renderSlot as K, toDisplayString as S, createCommentVNode as f, createBlock as p, unref as e, isRef as H, createVNode as b, normalizeClass as q, watch as Q, withCtx as F, resolveDynamicComponent as k, Fragment as W, createElementVNode as A, createTextVNode as X } from "vue";
|
|
2
|
+
import { z as _ } from "./app-CLNirPsB.js";
|
|
3
|
+
import { Z as d } from "./ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js";
|
|
4
|
+
import { g as ee, h as te } from "./index-Buy-yvAZ.js";
|
|
5
|
+
import { s as C } from "./effect-BQt0rkdT.js";
|
|
6
|
+
import { p as le } from "./loading-B3XGyQ8W.js";
|
|
7
|
+
import { I as oe } from "./app-DuNsy0aC.js";
|
|
8
|
+
const ae = { class: "flex flex-col gap-8" }, ne = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "fm-typo-en-body-lg-600"
|
|
11
|
+
}, se = { key: 1 }, ie = {
|
|
12
|
+
key: 2,
|
|
13
|
+
class: "space-y-16"
|
|
14
|
+
}, de = /* @__PURE__ */ O({
|
|
15
|
+
__name: "ValidityInput",
|
|
16
|
+
props: {
|
|
17
|
+
label: {
|
|
18
|
+
type: String
|
|
19
|
+
},
|
|
20
|
+
disabled: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !1
|
|
23
|
+
},
|
|
24
|
+
type: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: void 0
|
|
27
|
+
},
|
|
28
|
+
modelValue: {
|
|
29
|
+
type: Object,
|
|
30
|
+
required: !0
|
|
31
|
+
},
|
|
32
|
+
forCredit: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !1
|
|
35
|
+
},
|
|
36
|
+
helperText: {
|
|
37
|
+
type: String
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
emits: ["update:model-value"],
|
|
41
|
+
setup(t, { emit: h }) {
|
|
42
|
+
var g, P;
|
|
43
|
+
const n = t, c = h, a = [
|
|
44
|
+
{ label: "Date Range", value: "range" },
|
|
45
|
+
{ label: "Custom", value: "custom" }
|
|
46
|
+
], u = R(!1);
|
|
47
|
+
J(() => {
|
|
48
|
+
u.value = n.modelValue && Object.entries(n.modelValue).filter(
|
|
49
|
+
([r, i]) => r != "followFirstReceive" && i != null
|
|
50
|
+
).length > 0;
|
|
51
|
+
});
|
|
52
|
+
const l = R(
|
|
53
|
+
n.type ? a.find((r) => r.value === n.type) : (g = n.modelValue) != null && g.validBefore || (P = n.modelValue) != null && P.validAfter ? a[0] : a[1]
|
|
54
|
+
), w = z(
|
|
55
|
+
() => n.forCredit ? ee : te
|
|
56
|
+
), v = z(() => {
|
|
57
|
+
const r = w.value.safeParse(n.modelValue);
|
|
58
|
+
return r.success ? [] : r.error.errors;
|
|
59
|
+
});
|
|
60
|
+
function o(r) {
|
|
61
|
+
c("update:model-value", r);
|
|
62
|
+
}
|
|
63
|
+
function U(r) {
|
|
64
|
+
var i, D;
|
|
65
|
+
if (r.value == "range")
|
|
66
|
+
return o({
|
|
67
|
+
followFirstReceive: (i = n.modelValue) == null ? void 0 : i.followFirstReceive,
|
|
68
|
+
validAfter: void 0,
|
|
69
|
+
validBefore: void 0
|
|
70
|
+
});
|
|
71
|
+
if (r.value == "custom")
|
|
72
|
+
return u.value = !1, o({
|
|
73
|
+
validForDay: (D = n.modelValue) == null ? void 0 : D.validForDay
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return (r, i) => {
|
|
77
|
+
var T, I, E, M, $, j, N, L;
|
|
78
|
+
const D = y("FmButtonGroup"), G = y("FmSimpleDateRangePicker"), Z = y("FmSwitch"), Y = y("FmStepperField"), B = y("FmHelperText");
|
|
79
|
+
return s(), x("div", ae, [
|
|
80
|
+
K(r.$slots, "label", {}, () => [
|
|
81
|
+
t.label ? (s(), x("div", ne, S(t.label), 1)) : f("", !0)
|
|
82
|
+
]),
|
|
83
|
+
t.type ? f("", !0) : (s(), p(D, {
|
|
84
|
+
key: 0,
|
|
85
|
+
modelValue: e(l),
|
|
86
|
+
"onUpdate:modelValue": [
|
|
87
|
+
i[0] || (i[0] = (m) => H(l) ? l.value = m : null),
|
|
88
|
+
i[1] || (i[1] = (m) => U(m))
|
|
89
|
+
],
|
|
90
|
+
items: a
|
|
91
|
+
}, null, 8, ["modelValue"])),
|
|
92
|
+
e(l).value === "range" ? (s(), x("div", se, [
|
|
93
|
+
b(G, {
|
|
94
|
+
"model-value": {
|
|
95
|
+
startDate: (T = t.modelValue) != null && T.validAfter ? new Date((I = t.modelValue) == null ? void 0 : I.validAfter).toISOString() : null,
|
|
96
|
+
endDate: (E = t.modelValue) != null && E.validAfter ? new Date(((M = t.modelValue) == null ? void 0 : M.validBefore) || "").toISOString() : null
|
|
97
|
+
},
|
|
98
|
+
"onUpdate:modelValue": i[2] || (i[2] = (m) => {
|
|
99
|
+
var V;
|
|
100
|
+
o({
|
|
101
|
+
followFirstReceive: (V = n.modelValue) == null ? void 0 : V.followFirstReceive,
|
|
102
|
+
validAfter: new Date(m.startDate).toISOString(),
|
|
103
|
+
validBefore: new Date(m.endDate).toISOString()
|
|
104
|
+
});
|
|
105
|
+
})
|
|
106
|
+
}, null, 8, ["model-value"])
|
|
107
|
+
])) : e(l).value === "custom" ? (s(), x("div", ie, [
|
|
108
|
+
b(Z, {
|
|
109
|
+
"model-value": e(u),
|
|
110
|
+
label: "Expires",
|
|
111
|
+
"label-placement": "right",
|
|
112
|
+
"onUpdate:modelValue": i[3] || (i[3] = (m) => {
|
|
113
|
+
var V;
|
|
114
|
+
u.value = m, o({
|
|
115
|
+
validForDay: m ? 1 : void 0,
|
|
116
|
+
followFirstReceive: (V = n.modelValue) == null ? void 0 : V.followFirstReceive
|
|
117
|
+
});
|
|
118
|
+
})
|
|
119
|
+
}, null, 8, ["model-value"]),
|
|
120
|
+
e(u) ? (s(), p(Y, {
|
|
121
|
+
key: 0,
|
|
122
|
+
label: "After (days)",
|
|
123
|
+
class: q([{
|
|
124
|
+
"opacity-50 pointer-events-none": !e(u)
|
|
125
|
+
}, "mt-[-4px]"]),
|
|
126
|
+
"max-fraction-digits": 0,
|
|
127
|
+
disabled: !e(u),
|
|
128
|
+
"show-steppers": !1,
|
|
129
|
+
max: 99999,
|
|
130
|
+
"append-text": "day(s)",
|
|
131
|
+
"model-value": (($ = n.modelValue) == null ? void 0 : $.validForDay) ?? null,
|
|
132
|
+
"onUpdate:modelValue": i[4] || (i[4] = (m) => {
|
|
133
|
+
var V;
|
|
134
|
+
return o({
|
|
135
|
+
validForDay: m == null ? void 0 : parseInt(m.toString()),
|
|
136
|
+
followFirstReceive: (V = n.modelValue) == null ? void 0 : V.followFirstReceive
|
|
137
|
+
});
|
|
138
|
+
})
|
|
139
|
+
}, null, 8, ["class", "disabled", "model-value"])) : f("", !0)
|
|
140
|
+
])) : f("", !0),
|
|
141
|
+
((j = n.modelValue) == null ? void 0 : j.followFirstReceive) === !0 && e(u) ? (s(), p(B, {
|
|
142
|
+
key: 3,
|
|
143
|
+
text: "Expiry follows the first receive"
|
|
144
|
+
})) : f("", !0),
|
|
145
|
+
b(B, {
|
|
146
|
+
text: t.helperText || (((N = n.modelValue) == null ? void 0 : N.validForDay) === 0 ? "Expires on the same day" : e(d).helperText(e(v), "")),
|
|
147
|
+
state: t.helperText ? "error" : ((L = n.modelValue) == null ? void 0 : L.validForDay) === 0 ? "warning" : e(d).helperState(e(v), "")
|
|
148
|
+
}, null, 8, ["text", "state"])
|
|
149
|
+
]);
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
}), re = { class: "space-y-8" }, he = /* @__PURE__ */ O({
|
|
153
|
+
__name: "CollectibleOptionInput",
|
|
154
|
+
props: {
|
|
155
|
+
modelValue: {
|
|
156
|
+
type: Object
|
|
157
|
+
},
|
|
158
|
+
noCampaign: {
|
|
159
|
+
type: Boolean
|
|
160
|
+
},
|
|
161
|
+
schema: {
|
|
162
|
+
type: Object,
|
|
163
|
+
default: () => _.any()
|
|
164
|
+
},
|
|
165
|
+
isMission: {
|
|
166
|
+
type: Boolean,
|
|
167
|
+
default: !1
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
emits: ["update:model-value"],
|
|
171
|
+
setup(t, { emit: h }) {
|
|
172
|
+
const n = t, c = h, a = R(n.modelValue ?? {});
|
|
173
|
+
return Q(a, () => c("update:model-value", a.value)), (u, l) => {
|
|
174
|
+
const w = y("FmSwitch"), v = y("FmStepperField");
|
|
175
|
+
return s(), x("div", re, [
|
|
176
|
+
t.isMission ? f("", !0) : (s(), p(w, {
|
|
177
|
+
key: 0,
|
|
178
|
+
label: "Enable Transfer",
|
|
179
|
+
"label-placement": "right",
|
|
180
|
+
modelValue: e(a).enableTransfer,
|
|
181
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => e(a).enableTransfer = o)
|
|
182
|
+
}, null, 8, ["modelValue"])),
|
|
183
|
+
t.noCampaign ? f("", !0) : (s(), x("div", {
|
|
184
|
+
key: 1,
|
|
185
|
+
class: q(["grid gap-16", t.isMission ? "" : "grid-cols-2"])
|
|
186
|
+
}, [
|
|
187
|
+
b(v, {
|
|
188
|
+
modelValue: e(a).maxPerUser,
|
|
189
|
+
"onUpdate:modelValue": l[1] || (l[1] = (o) => e(a).maxPerUser = o),
|
|
190
|
+
"show-steppers": !1,
|
|
191
|
+
rules: [e(d).ruleAtPath(t.schema, "maxPerUser")]
|
|
192
|
+
}, {
|
|
193
|
+
label: F(() => [
|
|
194
|
+
(s(), p(k(
|
|
195
|
+
e(d).toInputLabel(
|
|
196
|
+
e(d).typeAtPath(t.schema, "maxPerUser"),
|
|
197
|
+
"Max per user"
|
|
198
|
+
)
|
|
199
|
+
)))
|
|
200
|
+
]),
|
|
201
|
+
_: 1
|
|
202
|
+
}, 8, ["modelValue", "rules"]),
|
|
203
|
+
t.isMission ? f("", !0) : (s(), p(v, {
|
|
204
|
+
key: 0,
|
|
205
|
+
modelValue: e(a).maxReceive,
|
|
206
|
+
"onUpdate:modelValue": l[2] || (l[2] = (o) => e(a).maxReceive = o),
|
|
207
|
+
"show-steppers": !1,
|
|
208
|
+
rules: [e(d).ruleAtPath(t.schema, "maxReceive")]
|
|
209
|
+
}, {
|
|
210
|
+
label: F(() => [
|
|
211
|
+
(s(), p(k(
|
|
212
|
+
e(d).toInputLabel(
|
|
213
|
+
e(d).typeAtPath(t.schema, "maxReceive"),
|
|
214
|
+
"Max distribute"
|
|
215
|
+
)
|
|
216
|
+
)))
|
|
217
|
+
]),
|
|
218
|
+
_: 1
|
|
219
|
+
}, 8, ["modelValue", "rules"]))
|
|
220
|
+
], 2)),
|
|
221
|
+
t.isMission ? f("", !0) : (s(), x(W, { key: 2 }, [
|
|
222
|
+
b(v, {
|
|
223
|
+
modelValue: e(a).maxUse,
|
|
224
|
+
"onUpdate:modelValue": l[3] || (l[3] = (o) => e(a).maxUse = o),
|
|
225
|
+
"append-text": "use(s)",
|
|
226
|
+
"show-steppers": !1,
|
|
227
|
+
rules: [e(d).ruleAtPath(t.schema, "maxUse")]
|
|
228
|
+
}, {
|
|
229
|
+
label: F(() => [
|
|
230
|
+
(s(), p(k(
|
|
231
|
+
e(d).toInputLabel(
|
|
232
|
+
e(d).typeAtPath(t.schema, "maxUse"),
|
|
233
|
+
"Usage count"
|
|
234
|
+
)
|
|
235
|
+
)))
|
|
236
|
+
]),
|
|
237
|
+
_: 1
|
|
238
|
+
}, 8, ["modelValue", "rules"]),
|
|
239
|
+
e(a).maxUse && e(a).maxUse > 1 ? (s(), p(v, {
|
|
240
|
+
key: 0,
|
|
241
|
+
modelValue: e(a).cooldown,
|
|
242
|
+
"onUpdate:modelValue": l[4] || (l[4] = (o) => e(a).cooldown = o),
|
|
243
|
+
"append-text": "minute(s)",
|
|
244
|
+
"show-steppers": !1,
|
|
245
|
+
rules: [e(d).ruleAtPath(t.schema, "cooldown")]
|
|
246
|
+
}, {
|
|
247
|
+
label: F(() => [
|
|
248
|
+
(s(), p(k(
|
|
249
|
+
e(d).toInputLabel(
|
|
250
|
+
e(d).typeAtPath(t.schema, "cooldown"),
|
|
251
|
+
"Cooldown"
|
|
252
|
+
)
|
|
253
|
+
)))
|
|
254
|
+
]),
|
|
255
|
+
_: 1
|
|
256
|
+
}, 8, ["modelValue", "rules"])) : f("", !0),
|
|
257
|
+
b(de, {
|
|
258
|
+
modelValue: e(a).validityOption,
|
|
259
|
+
"onUpdate:modelValue": l[5] || (l[5] = (o) => e(a).validityOption = o),
|
|
260
|
+
label: "Validity option"
|
|
261
|
+
}, null, 8, ["modelValue"])
|
|
262
|
+
], 64))
|
|
263
|
+
]);
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
}), ue = { class: "space-y-8" }, me = /* @__PURE__ */ A("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Configure the discount you want to offer your customer. ", -1), pe = {
|
|
267
|
+
key: 1,
|
|
268
|
+
class: "border-1 rounded-md flex gap-16 items-center justify-between px-16 py-12"
|
|
269
|
+
}, ce = { class: "fm-typo-en-body-lg-400" }, fe = { class: "text-fm-color-typo-secondary" }, ge = /* @__PURE__ */ O({
|
|
270
|
+
__name: "EffectSheet",
|
|
271
|
+
props: {
|
|
272
|
+
modelValue: { type: Object },
|
|
273
|
+
canSetAutoApply: {
|
|
274
|
+
type: Boolean
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
emits: ["update:model-value"],
|
|
278
|
+
setup(t, { emit: h }) {
|
|
279
|
+
const n = h, c = R(!1);
|
|
280
|
+
async function a(u) {
|
|
281
|
+
u.stopPropagation(), await le.remove("Are you sure you want to remove this effect?") && n("update:model-value", null);
|
|
282
|
+
}
|
|
283
|
+
return (u, l) => {
|
|
284
|
+
const w = y("FmButton"), v = y("FmSideSheet");
|
|
285
|
+
return s(), p(v, {
|
|
286
|
+
"max-width": 550,
|
|
287
|
+
header: "Apply discount",
|
|
288
|
+
modelValue: e(c),
|
|
289
|
+
"onUpdate:modelValue": [
|
|
290
|
+
l[2] || (l[2] = (o) => H(c) ? c.value = o : null),
|
|
291
|
+
l[3] || (l[3] = (o) => c.value = o)
|
|
292
|
+
]
|
|
293
|
+
}, {
|
|
294
|
+
"side-sheet-button": F(() => {
|
|
295
|
+
var o, U, g;
|
|
296
|
+
return [
|
|
297
|
+
A("div", ue, [
|
|
298
|
+
me,
|
|
299
|
+
t.modelValue ? (s(), x("div", pe, [
|
|
300
|
+
A("div", ce, [
|
|
301
|
+
A("div", null, S((o = e(C)(t.modelValue)) == null ? void 0 : o.type), 1),
|
|
302
|
+
A("div", fe, S((U = e(C)(t.modelValue)) == null ? void 0 : U.adjustment) + " with " + S((g = e(C)(t.modelValue)) == null ? void 0 : g.requirements), 1)
|
|
303
|
+
]),
|
|
304
|
+
b(w, {
|
|
305
|
+
icon: "delete",
|
|
306
|
+
"icon-color": "neutral-gray-400",
|
|
307
|
+
variant: "tertiary",
|
|
308
|
+
onClick: a
|
|
309
|
+
})
|
|
310
|
+
])) : (s(), p(w, {
|
|
311
|
+
key: 0,
|
|
312
|
+
label: "Apply discount",
|
|
313
|
+
icon: "add",
|
|
314
|
+
"icon-color": "primary",
|
|
315
|
+
variant: "secondary",
|
|
316
|
+
class: "border-fm-color-primary text-fm-color-primary"
|
|
317
|
+
}))
|
|
318
|
+
])
|
|
319
|
+
];
|
|
320
|
+
}),
|
|
321
|
+
"side-sheet-footer": F(() => [
|
|
322
|
+
X(S(void 0))
|
|
323
|
+
]),
|
|
324
|
+
default: F(() => [
|
|
325
|
+
b(e(oe), {
|
|
326
|
+
class: "fm-effect-sheet",
|
|
327
|
+
title: "",
|
|
328
|
+
"can-set-auto-apply": t.canSetAutoApply,
|
|
329
|
+
"disable-effects": t.canSetAutoApply ? ["PAYMENT"] : void 0,
|
|
330
|
+
"initial-value": t.modelValue,
|
|
331
|
+
onOnConfirm: l[0] || (l[0] = (o) => (n("update:model-value", o), c.value = !1)),
|
|
332
|
+
onOnCancel: l[1] || (l[1] = (o) => c.value = !1)
|
|
333
|
+
}, null, 8, ["can-set-auto-apply", "disable-effects", "initial-value"])
|
|
334
|
+
]),
|
|
335
|
+
_: 1
|
|
336
|
+
}, 8, ["modelValue"]);
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
export {
|
|
341
|
+
ge as _,
|
|
342
|
+
he as a,
|
|
343
|
+
de as b
|
|
344
|
+
};
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { defineComponent as O, ref as k, computed as U, onMounted as A, resolveComponent as i, openBlock as c, createElementBlock as g, Fragment as _, createVNode as r, unref as a, createElementVNode as n, withCtx as h, renderList as D, createBlock as x, resolveDynamicComponent as j, toDisplayString as f, h as M } from "vue";
|
|
2
|
+
import { _ as H } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as q, components as z } from "@feedmepos/ui-library";
|
|
4
|
+
import { u as G, p as J } from "./loading-B3XGyQ8W.js";
|
|
5
|
+
import { u as Q } from "./business-COGiTmLD.js";
|
|
6
|
+
import { u as W } from "./campaign-BHZMjQi5.js";
|
|
7
|
+
import { g as S, b as V } from "./dto-ndeeV_nc.js";
|
|
8
|
+
import { _ as X } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
9
|
+
import { _ as Y } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D7ML8ePp.js";
|
|
10
|
+
import { u as Z } from "./template-DMRMDZOW.js";
|
|
11
|
+
import { c as y } from "./index-Btlj28Vg.js";
|
|
12
|
+
const ee = { class: "px-24 flex flex-col gap-y-16" }, te = { class: "flex items-center justify-between w-full" }, oe = { class: "flex gap-8 overflow-x-auto" }, ae = { class: "space-y-8" }, ne = { class: "flex w-full gap-4 items-center" }, se = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, re = { class: "space-y-4" }, ie = { class: "fm-typo-en-body-lg-600" }, le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, me = /* @__PURE__ */ n("img", {
|
|
13
|
+
src: H,
|
|
14
|
+
class: "aspect-square w-[150px]"
|
|
15
|
+
}, null, -1), de = /* @__PURE__ */ n("div", { class: "flex flex-col gap-16 text-center" }, [
|
|
16
|
+
/* @__PURE__ */ n("div", { class: "fm-typo-en-title-sm-800" }, "Create experience program"),
|
|
17
|
+
/* @__PURE__ */ n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Experience help customers gain membership tiers. The more they interact and spend, the higher their membership level, unlocking more rewards and benefits. ")
|
|
18
|
+
], -1), Fe = /* @__PURE__ */ O({
|
|
19
|
+
__name: "Experience",
|
|
20
|
+
setup(pe) {
|
|
21
|
+
const L = {
|
|
22
|
+
label: "Create campaign",
|
|
23
|
+
value: "create",
|
|
24
|
+
isPrimary: !0,
|
|
25
|
+
prependIcon: "add"
|
|
26
|
+
}, P = Z("POINT", q()), I = Q(), l = W(), { global: T, minor: w } = G, s = k({
|
|
27
|
+
searchKey: "",
|
|
28
|
+
location: null
|
|
29
|
+
}), p = U(
|
|
30
|
+
() => l.campaigns.experience.filter(
|
|
31
|
+
(e) => !s.value.location || !e.targetLocation || e.targetLocation.includes(s.value.location)
|
|
32
|
+
)
|
|
33
|
+
), B = [
|
|
34
|
+
{
|
|
35
|
+
header: "Program title",
|
|
36
|
+
accessorFn: (e) => e.name
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
header: "Status",
|
|
40
|
+
cell(e) {
|
|
41
|
+
return S(e.row.original);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
header: "Summary",
|
|
46
|
+
accessorFn: (e) => V(e)
|
|
47
|
+
//v.effect,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
header: "Actions",
|
|
51
|
+
cell(e) {
|
|
52
|
+
return M(z.FmButton, {
|
|
53
|
+
variant: "tertiary",
|
|
54
|
+
icon: "delete",
|
|
55
|
+
iconColor: "neutral-gray-400",
|
|
56
|
+
onClick: (o) => {
|
|
57
|
+
o.stopPropagation(), v(e.row.original);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
], b = k();
|
|
63
|
+
async function v(e) {
|
|
64
|
+
await J.remove(`Are you sure you want to remove ${e.name}?`) && await w(
|
|
65
|
+
async () => {
|
|
66
|
+
await y.delete(e._id), await l.read("POINT");
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
message: `Removing ${e.name}`,
|
|
70
|
+
successMessage: `Removed ${e.name} successfully`
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
async function u(e) {
|
|
75
|
+
e ? await o() : P.open(async (m) => {
|
|
76
|
+
await o(m);
|
|
77
|
+
});
|
|
78
|
+
async function o(m) {
|
|
79
|
+
var d;
|
|
80
|
+
(d = b.value) == null || d.showSheet(
|
|
81
|
+
!0,
|
|
82
|
+
"POINT",
|
|
83
|
+
e ? await y.readById(e._id) : void 0,
|
|
84
|
+
m
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
async function $(e) {
|
|
89
|
+
await w(
|
|
90
|
+
async () => {
|
|
91
|
+
e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await l.read("POINT");
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
message: `${e.campaign._id ? "Updating" : "Creating"} experience program`,
|
|
95
|
+
successMessage: `Experience program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
return A(async () => {
|
|
100
|
+
await T(async () => {
|
|
101
|
+
await l.read("POINT");
|
|
102
|
+
});
|
|
103
|
+
}), (e, o) => {
|
|
104
|
+
const m = i("FmPageHead"), d = i("FmSearch"), E = i("FmTable"), C = i("FmButton"), K = i("FmListItem"), N = i("FmList"), R = i("FmCard");
|
|
105
|
+
return c(), g(_, null, [
|
|
106
|
+
r(m, {
|
|
107
|
+
title: "Experience",
|
|
108
|
+
actions: a(p).length > 0 ? [L] : [],
|
|
109
|
+
"onClick:action": o[0] || (o[0] = () => u())
|
|
110
|
+
}, null, 8, ["actions"]),
|
|
111
|
+
n("div", ee, [
|
|
112
|
+
r(d, {
|
|
113
|
+
modelValue: a(s).searchKey,
|
|
114
|
+
"onUpdate:modelValue": o[1] || (o[1] = (t) => a(s).searchKey = t),
|
|
115
|
+
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
116
|
+
placeholder: "search",
|
|
117
|
+
collapsible: ""
|
|
118
|
+
}, null, 8, ["modelValue"]),
|
|
119
|
+
a(l).campaigns.experience && a(l).campaigns.experience.length > 0 ? (c(), g(_, { key: 0 }, [
|
|
120
|
+
n("div", te, [
|
|
121
|
+
n("div", oe, [
|
|
122
|
+
r(X, {
|
|
123
|
+
modelValue: a(s).location,
|
|
124
|
+
"onUpdate:modelValue": o[2] || (o[2] = (t) => a(s).location = t),
|
|
125
|
+
label: "Location: ",
|
|
126
|
+
"show-item-label": !0,
|
|
127
|
+
icon: "storefront",
|
|
128
|
+
placement: "bottom-start",
|
|
129
|
+
items: a(I).locationItems
|
|
130
|
+
}, null, 8, ["modelValue", "items"])
|
|
131
|
+
]),
|
|
132
|
+
r(d, {
|
|
133
|
+
modelValue: a(s).searchKey,
|
|
134
|
+
"onUpdate:modelValue": o[3] || (o[3] = (t) => a(s).searchKey = t),
|
|
135
|
+
class: "xs:hidden",
|
|
136
|
+
placeholder: "search",
|
|
137
|
+
collapsible: ""
|
|
138
|
+
}, null, 8, ["modelValue"])
|
|
139
|
+
]),
|
|
140
|
+
r(E, {
|
|
141
|
+
class: "xs:hidden",
|
|
142
|
+
"row-data": a(p),
|
|
143
|
+
"column-defs": B,
|
|
144
|
+
"search-value": a(s).searchKey,
|
|
145
|
+
"column-filter": [],
|
|
146
|
+
onRowClick: o[4] || (o[4] = (t) => u(t.original)),
|
|
147
|
+
"hide-footer": a(p).length < 10
|
|
148
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
149
|
+
r(N, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
150
|
+
default: h(() => [
|
|
151
|
+
(c(!0), g(_, null, D(a(p).filter(
|
|
152
|
+
(t) => t.name.toLowerCase().includes(a(s).searchKey.toLowerCase())
|
|
153
|
+
), (t) => (c(), x(K, {
|
|
154
|
+
key: t._id.toString(),
|
|
155
|
+
onClick: (F) => u(t),
|
|
156
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
157
|
+
}, {
|
|
158
|
+
default: h(() => [
|
|
159
|
+
n("div", ae, [
|
|
160
|
+
n("div", ne, [
|
|
161
|
+
(c(), x(j(a(S)(t)))),
|
|
162
|
+
n("div", se, f(t.currentReceive ?? 0) + " used ", 1)
|
|
163
|
+
]),
|
|
164
|
+
n("div", re, [
|
|
165
|
+
n("div", ie, f(t.name), 1),
|
|
166
|
+
n("div", le, f(a(V)(t)), 1)
|
|
167
|
+
]),
|
|
168
|
+
n("div", ce, " Experience received: " + f(t.currentReceive ?? 0), 1)
|
|
169
|
+
]),
|
|
170
|
+
r(C, {
|
|
171
|
+
icon: "delete",
|
|
172
|
+
"icon-color": "neutral-gray-400",
|
|
173
|
+
variant: "tertiary",
|
|
174
|
+
onClick: (F) => (F.stopPropagation(), v(t))
|
|
175
|
+
}, null, 8, ["onClick"])
|
|
176
|
+
]),
|
|
177
|
+
_: 2
|
|
178
|
+
}, 1032, ["onClick"]))), 128))
|
|
179
|
+
]),
|
|
180
|
+
_: 1
|
|
181
|
+
})
|
|
182
|
+
], 64)) : (c(), x(R, {
|
|
183
|
+
key: 1,
|
|
184
|
+
variant: "outlined",
|
|
185
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
186
|
+
}, {
|
|
187
|
+
default: h(() => [
|
|
188
|
+
me,
|
|
189
|
+
de,
|
|
190
|
+
r(C, {
|
|
191
|
+
variant: "primary",
|
|
192
|
+
label: "Create experience program",
|
|
193
|
+
icon: "add",
|
|
194
|
+
onClick: o[5] || (o[5] = (t) => u())
|
|
195
|
+
})
|
|
196
|
+
]),
|
|
197
|
+
_: 1
|
|
198
|
+
})),
|
|
199
|
+
r(Y, {
|
|
200
|
+
ref_key: "sheetRef",
|
|
201
|
+
ref: b,
|
|
202
|
+
"onSubmit:modelValue": $
|
|
203
|
+
}, null, 512)
|
|
204
|
+
])
|
|
205
|
+
], 64);
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
export {
|
|
210
|
+
Fe as default
|
|
211
|
+
};
|