@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
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
import { defineComponent as P, ref as R, onMounted as Q, computed as H, resolveComponent as y, openBlock as s, createElementBlock as x, renderSlot as W, toDisplayString as A, createCommentVNode as v, createBlock as f, unref as e, isRef as q, createVNode as b, normalizeClass as G, watch as X, withCtx as F, resolveDynamicComponent as D, Fragment as _, createElementVNode as h, createTextVNode as ee } from "vue";
|
|
2
|
-
import { z as te } from "./app-DCHKJoql.js";
|
|
3
|
-
import { Z as u } from "./zod-Bg2FbC-D.js";
|
|
4
|
-
import { g as le, h as oe } from "./index-C7zMfUgy.js";
|
|
5
|
-
import { u as Z } from "./vue-i18n-BRhKDHdF.js";
|
|
6
|
-
import { s as O } from "./effect-BjjQeiQg.js";
|
|
7
|
-
import { p as ae } from "./loading-CJ3nOovJ.js";
|
|
8
|
-
import { I as ne } from "./app-VxaUCtgl.js";
|
|
9
|
-
const ie = { class: "flex flex-col gap-8" }, se = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "fm-typo-en-body-lg-600"
|
|
12
|
-
}, de = { key: 1 }, me = {
|
|
13
|
-
key: 2,
|
|
14
|
-
class: "space-y-16"
|
|
15
|
-
}, re = /* @__PURE__ */ P({
|
|
16
|
-
__name: "ValidityInput",
|
|
17
|
-
props: {
|
|
18
|
-
label: {
|
|
19
|
-
type: String
|
|
20
|
-
},
|
|
21
|
-
disabled: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: !1
|
|
24
|
-
},
|
|
25
|
-
type: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: void 0
|
|
28
|
-
},
|
|
29
|
-
modelValue: {
|
|
30
|
-
type: Object,
|
|
31
|
-
required: !0
|
|
32
|
-
},
|
|
33
|
-
forCredit: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: !1
|
|
36
|
-
},
|
|
37
|
-
helperText: {
|
|
38
|
-
type: String
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
emits: ["update:model-value"],
|
|
42
|
-
setup(t, { emit: w }) {
|
|
43
|
-
var B, C;
|
|
44
|
-
const { t: d } = Z(), l = t, g = w, o = [
|
|
45
|
-
{ label: d("connect.template.validity_option.date_range"), value: "range" },
|
|
46
|
-
{ label: d("connect.template.validity_option.custom"), value: "custom" }
|
|
47
|
-
], a = R(!1);
|
|
48
|
-
Q(() => {
|
|
49
|
-
a.value = l.modelValue && Object.entries(l.modelValue).filter(
|
|
50
|
-
([p, r]) => p != "followFirstReceive" && r != null
|
|
51
|
-
).length > 0;
|
|
52
|
-
});
|
|
53
|
-
const n = R(
|
|
54
|
-
l.type ? o.find((p) => p.value === l.type) : (B = l.modelValue) != null && B.validBefore || (C = l.modelValue) != null && C.validAfter ? o[0] : o[1]
|
|
55
|
-
), S = H(
|
|
56
|
-
() => l.forCredit ? le : oe
|
|
57
|
-
), m = H(() => {
|
|
58
|
-
const p = S.value.safeParse(l.modelValue);
|
|
59
|
-
return p.success ? [] : p.error.errors;
|
|
60
|
-
});
|
|
61
|
-
function i(p) {
|
|
62
|
-
g("update:model-value", p);
|
|
63
|
-
}
|
|
64
|
-
function U(p) {
|
|
65
|
-
var r, k;
|
|
66
|
-
if (p.value == "range")
|
|
67
|
-
return i({
|
|
68
|
-
followFirstReceive: (r = l.modelValue) == null ? void 0 : r.followFirstReceive,
|
|
69
|
-
validAfter: void 0,
|
|
70
|
-
validBefore: void 0
|
|
71
|
-
});
|
|
72
|
-
if (p.value == "custom")
|
|
73
|
-
return a.value = !1, i({
|
|
74
|
-
validForDay: (k = l.modelValue) == null ? void 0 : k.validForDay
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
return (p, r) => {
|
|
78
|
-
var T, $, j, E, M, N, L, z;
|
|
79
|
-
const k = y("FmButtonGroup"), Y = y("FmSimpleDateRangePicker"), J = y("FmSwitch"), K = y("FmStepperField"), I = y("FmHelperText");
|
|
80
|
-
return s(), x("div", ie, [
|
|
81
|
-
W(p.$slots, "label", {}, () => [
|
|
82
|
-
t.label ? (s(), x("div", se, A(t.label), 1)) : v("", !0)
|
|
83
|
-
]),
|
|
84
|
-
t.type ? v("", !0) : (s(), f(k, {
|
|
85
|
-
key: 0,
|
|
86
|
-
modelValue: e(n),
|
|
87
|
-
"onUpdate:modelValue": [
|
|
88
|
-
r[0] || (r[0] = (c) => q(n) ? n.value = c : null),
|
|
89
|
-
r[1] || (r[1] = (c) => U(c))
|
|
90
|
-
],
|
|
91
|
-
items: o
|
|
92
|
-
}, null, 8, ["modelValue"])),
|
|
93
|
-
e(n).value === "range" ? (s(), x("div", de, [
|
|
94
|
-
b(Y, {
|
|
95
|
-
"model-value": {
|
|
96
|
-
startDate: (T = t.modelValue) != null && T.validAfter ? new Date(($ = t.modelValue) == null ? void 0 : $.validAfter).toISOString() : null,
|
|
97
|
-
endDate: (j = t.modelValue) != null && j.validAfter ? new Date(((E = t.modelValue) == null ? void 0 : E.validBefore) || "").toISOString() : null
|
|
98
|
-
},
|
|
99
|
-
"onUpdate:modelValue": r[2] || (r[2] = (c) => {
|
|
100
|
-
var V;
|
|
101
|
-
i({
|
|
102
|
-
followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive,
|
|
103
|
-
validAfter: new Date(c.startDate).toISOString(),
|
|
104
|
-
validBefore: new Date(c.endDate).toISOString()
|
|
105
|
-
});
|
|
106
|
-
})
|
|
107
|
-
}, null, 8, ["model-value"])
|
|
108
|
-
])) : e(n).value === "custom" ? (s(), x("div", me, [
|
|
109
|
-
b(J, {
|
|
110
|
-
"model-value": e(a),
|
|
111
|
-
label: e(d)("connect.template.validity_option.expire"),
|
|
112
|
-
"label-placement": "right",
|
|
113
|
-
"onUpdate:modelValue": r[3] || (r[3] = (c) => {
|
|
114
|
-
var V;
|
|
115
|
-
a.value = c, i({
|
|
116
|
-
validForDay: c ? 1 : void 0,
|
|
117
|
-
followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive
|
|
118
|
-
});
|
|
119
|
-
})
|
|
120
|
-
}, null, 8, ["model-value", "label"]),
|
|
121
|
-
e(a) ? (s(), f(K, {
|
|
122
|
-
key: 0,
|
|
123
|
-
label: e(d)("connect.template.validity_option.after_day"),
|
|
124
|
-
class: G([{
|
|
125
|
-
"opacity-50 pointer-events-none": !e(a)
|
|
126
|
-
}, "mt-[-4px]"]),
|
|
127
|
-
"max-fraction-digits": 0,
|
|
128
|
-
disabled: !e(a),
|
|
129
|
-
"show-steppers": !1,
|
|
130
|
-
max: 99999,
|
|
131
|
-
"append-text": e(d)("connect.template.validity_option.days"),
|
|
132
|
-
"model-value": ((M = l.modelValue) == null ? void 0 : M.validForDay) ?? null,
|
|
133
|
-
"onUpdate:modelValue": r[4] || (r[4] = (c) => {
|
|
134
|
-
var V;
|
|
135
|
-
return i({
|
|
136
|
-
validForDay: c == null ? void 0 : parseInt(c.toString()),
|
|
137
|
-
followFirstReceive: (V = l.modelValue) == null ? void 0 : V.followFirstReceive
|
|
138
|
-
});
|
|
139
|
-
})
|
|
140
|
-
}, null, 8, ["label", "class", "disabled", "append-text", "model-value"])) : v("", !0)
|
|
141
|
-
])) : v("", !0),
|
|
142
|
-
((N = l.modelValue) == null ? void 0 : N.followFirstReceive) === !0 && e(a) ? (s(), f(I, {
|
|
143
|
-
key: 3,
|
|
144
|
-
text: e(d)("connect.template.validity_option.expire_follow_first_receive")
|
|
145
|
-
}, null, 8, ["text"])) : v("", !0),
|
|
146
|
-
b(I, {
|
|
147
|
-
text: t.helperText || (((L = l.modelValue) == null ? void 0 : L.validForDay) === 0 ? e(d)("connect.template.validity_option.expires_on_same_day") : e(u).helperText(e(m), "")),
|
|
148
|
-
state: t.helperText ? "error" : ((z = l.modelValue) == null ? void 0 : z.validForDay) === 0 ? "warning" : e(u).helperState(e(m), "")
|
|
149
|
-
}, null, 8, ["text", "state"])
|
|
150
|
-
]);
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
}), ue = { class: "space-y-8" }, he = /* @__PURE__ */ P({
|
|
154
|
-
__name: "CollectibleOptionInput",
|
|
155
|
-
props: {
|
|
156
|
-
modelValue: {
|
|
157
|
-
type: Object
|
|
158
|
-
},
|
|
159
|
-
noCampaign: {
|
|
160
|
-
type: Boolean
|
|
161
|
-
},
|
|
162
|
-
schema: {
|
|
163
|
-
type: Object,
|
|
164
|
-
default: () => te.any()
|
|
165
|
-
},
|
|
166
|
-
isMission: {
|
|
167
|
-
type: Boolean,
|
|
168
|
-
default: !1
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
emits: ["update:model-value"],
|
|
172
|
-
setup(t, { emit: w }) {
|
|
173
|
-
const { t: d } = Z(), l = t, g = w, o = R(l.modelValue ?? {});
|
|
174
|
-
return X(o, () => g("update:model-value", o.value)), (a, n) => {
|
|
175
|
-
const S = y("FmSwitch"), m = y("FmStepperField");
|
|
176
|
-
return s(), x("div", ue, [
|
|
177
|
-
t.isMission ? v("", !0) : (s(), f(S, {
|
|
178
|
-
key: 0,
|
|
179
|
-
label: e(d)("connect.template.enable_transfer"),
|
|
180
|
-
"label-placement": "right",
|
|
181
|
-
modelValue: e(o).enableTransfer,
|
|
182
|
-
"onUpdate:modelValue": n[0] || (n[0] = (i) => e(o).enableTransfer = i)
|
|
183
|
-
}, null, 8, ["label", "modelValue"])),
|
|
184
|
-
t.noCampaign ? v("", !0) : (s(), x("div", {
|
|
185
|
-
key: 1,
|
|
186
|
-
class: G(["grid gap-16", t.isMission ? "" : "grid-cols-2"])
|
|
187
|
-
}, [
|
|
188
|
-
b(m, {
|
|
189
|
-
modelValue: e(o).maxPerUser,
|
|
190
|
-
"onUpdate:modelValue": n[1] || (n[1] = (i) => e(o).maxPerUser = i),
|
|
191
|
-
"show-steppers": !1,
|
|
192
|
-
rules: [e(u).ruleAtPath(t.schema, "maxPerUser")]
|
|
193
|
-
}, {
|
|
194
|
-
label: F(() => [
|
|
195
|
-
(s(), f(D(
|
|
196
|
-
e(u).toInputLabel(
|
|
197
|
-
e(u).typeAtPath(t.schema, "maxPerUser"),
|
|
198
|
-
e(d)("connect.template.max_per_user")
|
|
199
|
-
)
|
|
200
|
-
)))
|
|
201
|
-
]),
|
|
202
|
-
_: 1
|
|
203
|
-
}, 8, ["modelValue", "rules"]),
|
|
204
|
-
t.isMission ? v("", !0) : (s(), f(m, {
|
|
205
|
-
key: 0,
|
|
206
|
-
modelValue: e(o).maxReceive,
|
|
207
|
-
"onUpdate:modelValue": n[2] || (n[2] = (i) => e(o).maxReceive = i),
|
|
208
|
-
"show-steppers": !1,
|
|
209
|
-
rules: [e(u).ruleAtPath(t.schema, "maxReceive")]
|
|
210
|
-
}, {
|
|
211
|
-
label: F(() => [
|
|
212
|
-
(s(), f(D(
|
|
213
|
-
e(u).toInputLabel(
|
|
214
|
-
e(u).typeAtPath(t.schema, "maxReceive"),
|
|
215
|
-
e(d)("connect.template.max_distribute")
|
|
216
|
-
)
|
|
217
|
-
)))
|
|
218
|
-
]),
|
|
219
|
-
_: 1
|
|
220
|
-
}, 8, ["modelValue", "rules"]))
|
|
221
|
-
], 2)),
|
|
222
|
-
t.isMission ? v("", !0) : (s(), x(_, { key: 2 }, [
|
|
223
|
-
b(m, {
|
|
224
|
-
modelValue: e(o).maxUse,
|
|
225
|
-
"onUpdate:modelValue": n[3] || (n[3] = (i) => e(o).maxUse = i),
|
|
226
|
-
"append-text": "use(s)",
|
|
227
|
-
"show-steppers": !1,
|
|
228
|
-
rules: [e(u).ruleAtPath(t.schema, "maxUse")]
|
|
229
|
-
}, {
|
|
230
|
-
label: F(() => [
|
|
231
|
-
(s(), f(D(
|
|
232
|
-
e(u).toInputLabel(
|
|
233
|
-
e(u).typeAtPath(t.schema, "maxUse"),
|
|
234
|
-
e(d)("connect.template.usage_count")
|
|
235
|
-
)
|
|
236
|
-
)))
|
|
237
|
-
]),
|
|
238
|
-
_: 1
|
|
239
|
-
}, 8, ["modelValue", "rules"]),
|
|
240
|
-
e(o).maxUse && e(o).maxUse > 1 ? (s(), f(m, {
|
|
241
|
-
key: 0,
|
|
242
|
-
modelValue: e(o).cooldown,
|
|
243
|
-
"onUpdate:modelValue": n[4] || (n[4] = (i) => e(o).cooldown = i),
|
|
244
|
-
"append-text": "minute(s)",
|
|
245
|
-
"show-steppers": !1,
|
|
246
|
-
rules: [e(u).ruleAtPath(t.schema, "cooldown")]
|
|
247
|
-
}, {
|
|
248
|
-
label: F(() => [
|
|
249
|
-
(s(), f(D(
|
|
250
|
-
e(u).toInputLabel(
|
|
251
|
-
e(u).typeAtPath(t.schema, "cooldown"),
|
|
252
|
-
e(d)("connect.template.cooldown")
|
|
253
|
-
)
|
|
254
|
-
)))
|
|
255
|
-
]),
|
|
256
|
-
_: 1
|
|
257
|
-
}, 8, ["modelValue", "rules"])) : v("", !0),
|
|
258
|
-
b(re, {
|
|
259
|
-
modelValue: e(o).validityOption,
|
|
260
|
-
"onUpdate:modelValue": n[5] || (n[5] = (i) => e(o).validityOption = i),
|
|
261
|
-
label: e(d)("connect.template.validity_option.title")
|
|
262
|
-
}, null, 8, ["modelValue", "label"])
|
|
263
|
-
], 64))
|
|
264
|
-
]);
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
}), pe = { class: "space-y-8" }, ce = {
|
|
268
|
-
key: 1,
|
|
269
|
-
class: "border-1 rounded-md flex gap-16 items-center justify-between px-16 py-12"
|
|
270
|
-
}, fe = { class: "fm-typo-en-body-lg-400" }, ve = { class: "text-fm-color-typo-secondary" }, Ae = /* @__PURE__ */ P({
|
|
271
|
-
__name: "EffectSheet",
|
|
272
|
-
props: {
|
|
273
|
-
modelValue: { type: Object },
|
|
274
|
-
canSetAutoApply: {
|
|
275
|
-
type: Boolean
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
|
-
emits: ["update:model-value"],
|
|
279
|
-
setup(t, { emit: w }) {
|
|
280
|
-
const d = w, l = R(!1);
|
|
281
|
-
async function g(o) {
|
|
282
|
-
o.stopPropagation(), await ae.remove("Are you sure you want to remove this effect?") && d("update:model-value", null);
|
|
283
|
-
}
|
|
284
|
-
return (o, a) => {
|
|
285
|
-
const n = y("FmButton"), S = y("FmSideSheet");
|
|
286
|
-
return s(), f(S, {
|
|
287
|
-
"max-width": 550,
|
|
288
|
-
header: "Apply discount",
|
|
289
|
-
modelValue: e(l),
|
|
290
|
-
"onUpdate:modelValue": [
|
|
291
|
-
a[2] || (a[2] = (m) => q(l) ? l.value = m : null),
|
|
292
|
-
a[3] || (a[3] = (m) => l.value = m)
|
|
293
|
-
]
|
|
294
|
-
}, {
|
|
295
|
-
"side-sheet-button": F(() => {
|
|
296
|
-
var m, i, U;
|
|
297
|
-
return [
|
|
298
|
-
h("div", pe, [
|
|
299
|
-
a[4] || (a[4] = h("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Configure the discount you want to offer your customer. ", -1)),
|
|
300
|
-
t.modelValue ? (s(), x("div", ce, [
|
|
301
|
-
h("div", fe, [
|
|
302
|
-
h("div", null, A((m = e(O)(t.modelValue)) == null ? void 0 : m.type), 1),
|
|
303
|
-
h("div", ve, A((i = e(O)(t.modelValue)) == null ? void 0 : i.adjustment) + " with " + A((U = e(O)(t.modelValue)) == null ? void 0 : U.requirements), 1)
|
|
304
|
-
]),
|
|
305
|
-
b(n, {
|
|
306
|
-
icon: "delete",
|
|
307
|
-
"icon-color": "neutral-gray-400",
|
|
308
|
-
variant: "tertiary",
|
|
309
|
-
onClick: g
|
|
310
|
-
})
|
|
311
|
-
])) : (s(), f(n, {
|
|
312
|
-
key: 0,
|
|
313
|
-
label: "Apply discount",
|
|
314
|
-
icon: "add",
|
|
315
|
-
"icon-color": "primary",
|
|
316
|
-
variant: "secondary",
|
|
317
|
-
class: "border-fm-color-primary text-fm-color-primary"
|
|
318
|
-
}))
|
|
319
|
-
])
|
|
320
|
-
];
|
|
321
|
-
}),
|
|
322
|
-
"side-sheet-footer": F(() => a[5] || (a[5] = [
|
|
323
|
-
ee(A(void 0))
|
|
324
|
-
])),
|
|
325
|
-
default: F(() => [
|
|
326
|
-
b(e(ne), {
|
|
327
|
-
class: "fm-effect-sheet",
|
|
328
|
-
title: "",
|
|
329
|
-
"can-set-auto-apply": t.canSetAutoApply,
|
|
330
|
-
"disable-effects": t.canSetAutoApply ? ["PAYMENT"] : void 0,
|
|
331
|
-
"initial-value": t.modelValue,
|
|
332
|
-
onOnConfirm: a[0] || (a[0] = (m) => (d("update:model-value", m), l.value = !1)),
|
|
333
|
-
onOnCancel: a[1] || (a[1] = (m) => l.value = !1)
|
|
334
|
-
}, null, 8, ["can-set-auto-apply", "disable-effects", "initial-value"])
|
|
335
|
-
]),
|
|
336
|
-
_: 1
|
|
337
|
-
}, 8, ["modelValue"]);
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
});
|
|
341
|
-
export {
|
|
342
|
-
Ae as _,
|
|
343
|
-
he as a,
|
|
344
|
-
re as b
|
|
345
|
-
};
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import { defineComponent as D, ref as S, computed as E, onMounted as U, resolveComponent as i, openBlock as m, createElementBlock as _, Fragment as x, createVNode as c, unref as t, createElementVNode as n, withCtx as h, renderList as j, createBlock as w, resolveDynamicComponent as M, toDisplayString as p, h as H } from "vue";
|
|
2
|
-
import { _ as q } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as z, components as G } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as J, p as Q } from "./loading-CJ3nOovJ.js";
|
|
5
|
-
import { u as W } from "./business-DR7jpnLz.js";
|
|
6
|
-
import { u as X } from "./campaign-MqcTb329.js";
|
|
7
|
-
import { g as L, b as V } from "./dto-jcK3TGB7.js";
|
|
8
|
-
import { u as Y } from "./vue-i18n-BRhKDHdF.js";
|
|
9
|
-
import { _ as Z } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
10
|
-
import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-C_ZKNWzb.js";
|
|
11
|
-
import { u as te } from "./template-Cug7aRK0.js";
|
|
12
|
-
import { c as g } from "./index-CWR3qYjb.js";
|
|
13
|
-
const oe = { class: "px-24 flex flex-col gap-y-16" }, ae = { class: "flex items-center justify-between w-full" }, ne = { class: "flex gap-8 overflow-x-auto" }, se = { class: "space-y-8" }, re = { class: "flex w-full gap-4 items-center" }, ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ie = { class: "space-y-4" }, le = { class: "fm-typo-en-body-lg-600" }, me = { 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" }, de = { class: "flex flex-col gap-16 text-center" }, ue = { class: "fm-typo-en-title-sm-800" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ve = /* @__PURE__ */ D({
|
|
14
|
-
__name: "Experience",
|
|
15
|
-
setup(ye) {
|
|
16
|
-
const { t: s } = Y(), I = {
|
|
17
|
-
label: s("connect.program.common.actions.create", {
|
|
18
|
-
type: s("connect.program.experience.title").toLowerCase()
|
|
19
|
-
}),
|
|
20
|
-
value: "create",
|
|
21
|
-
isPrimary: !0,
|
|
22
|
-
prependIcon: "add"
|
|
23
|
-
}, P = te("POINT", z()), B = W(), l = X(), { global: T, minor: v } = J, r = S({
|
|
24
|
-
searchKey: "",
|
|
25
|
-
location: null
|
|
26
|
-
}), f = E(
|
|
27
|
-
() => l.campaigns.experience.filter(
|
|
28
|
-
(e) => !r.value.location || !e.targetLocation || e.targetLocation.includes(r.value.location)
|
|
29
|
-
)
|
|
30
|
-
), K = [
|
|
31
|
-
{
|
|
32
|
-
header: "Program title",
|
|
33
|
-
accessorFn: (e) => e.name
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
header: "Status",
|
|
37
|
-
cell(e) {
|
|
38
|
-
return L(e.row.original);
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
header: "Summary",
|
|
43
|
-
accessorFn: (e) => V(e)
|
|
44
|
-
//v.effect,
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
header: "Actions",
|
|
48
|
-
cell(e) {
|
|
49
|
-
return H(G.FmButton, {
|
|
50
|
-
variant: "tertiary",
|
|
51
|
-
icon: "delete",
|
|
52
|
-
iconColor: "neutral-gray-400",
|
|
53
|
-
onClick: (o) => {
|
|
54
|
-
o.stopPropagation(), C(e.row.original);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
], b = S();
|
|
60
|
-
async function C(e) {
|
|
61
|
-
await Q.remove(`Are you sure you want to remove ${e.name}?`) && await v(
|
|
62
|
-
async () => {
|
|
63
|
-
await g.delete(e._id), await l.read("POINT");
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
message: `Removing ${e.name}`,
|
|
67
|
-
successMessage: `Removed ${e.name} successfully`
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
async function y(e) {
|
|
72
|
-
e ? await o() : P.open(async (d) => {
|
|
73
|
-
await o(d);
|
|
74
|
-
});
|
|
75
|
-
async function o(d) {
|
|
76
|
-
var u;
|
|
77
|
-
(u = b.value) == null || u.showSheet(
|
|
78
|
-
!0,
|
|
79
|
-
"POINT",
|
|
80
|
-
e ? await g.readById(e._id) : void 0,
|
|
81
|
-
d
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
async function N(e) {
|
|
86
|
-
await v(
|
|
87
|
-
async () => {
|
|
88
|
-
e.campaign._id ? await g.update(e.campaign._id, e) : await g.create(e), await l.read("POINT");
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
message: s("connect.program.common.update.updating", {
|
|
92
|
-
type: s("connect.program.experience.title")
|
|
93
|
-
}),
|
|
94
|
-
successMessage: s("connect.program.common.update.success", {
|
|
95
|
-
type: s("connect.program.experience.title"),
|
|
96
|
-
action: e.campaign._id ? "updated" : "created"
|
|
97
|
-
})
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
return U(async () => {
|
|
102
|
-
await T(async () => {
|
|
103
|
-
await l.read("POINT");
|
|
104
|
-
});
|
|
105
|
-
}), (e, o) => {
|
|
106
|
-
const d = i("FmPageHead"), u = i("FmSearch"), R = i("FmTable"), F = i("FmButton"), $ = i("FmListItem"), O = i("FmList"), A = i("FmCard");
|
|
107
|
-
return m(), _(x, null, [
|
|
108
|
-
c(d, {
|
|
109
|
-
title: t(s)("connect.program.experience.title"),
|
|
110
|
-
actions: t(f).length > 0 ? [I] : [],
|
|
111
|
-
"onClick:action": o[0] || (o[0] = () => y())
|
|
112
|
-
}, null, 8, ["title", "actions"]),
|
|
113
|
-
n("div", oe, [
|
|
114
|
-
c(u, {
|
|
115
|
-
modelValue: t(r).searchKey,
|
|
116
|
-
"onUpdate:modelValue": o[1] || (o[1] = (a) => t(r).searchKey = a),
|
|
117
|
-
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
118
|
-
placeholder: t(s)("connect.program.common.search"),
|
|
119
|
-
collapsible: ""
|
|
120
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
121
|
-
t(l).campaigns.experience && t(l).campaigns.experience.length > 0 ? (m(), _(x, { key: 0 }, [
|
|
122
|
-
n("div", ae, [
|
|
123
|
-
n("div", ne, [
|
|
124
|
-
c(Z, {
|
|
125
|
-
modelValue: t(r).location,
|
|
126
|
-
"onUpdate:modelValue": o[2] || (o[2] = (a) => t(r).location = a),
|
|
127
|
-
label: "Location: ",
|
|
128
|
-
"show-item-label": !0,
|
|
129
|
-
icon: "storefront",
|
|
130
|
-
placement: "bottom-start",
|
|
131
|
-
items: t(B).locationItems
|
|
132
|
-
}, null, 8, ["modelValue", "items"])
|
|
133
|
-
]),
|
|
134
|
-
c(u, {
|
|
135
|
-
modelValue: t(r).searchKey,
|
|
136
|
-
"onUpdate:modelValue": o[3] || (o[3] = (a) => t(r).searchKey = a),
|
|
137
|
-
class: "xs:hidden",
|
|
138
|
-
placeholder: "search",
|
|
139
|
-
collapsible: ""
|
|
140
|
-
}, null, 8, ["modelValue"])
|
|
141
|
-
]),
|
|
142
|
-
c(R, {
|
|
143
|
-
class: "xs:hidden",
|
|
144
|
-
"row-data": t(f),
|
|
145
|
-
"column-defs": K,
|
|
146
|
-
"search-value": t(r).searchKey,
|
|
147
|
-
"column-filter": [],
|
|
148
|
-
onRowClick: o[4] || (o[4] = (a) => y(a.original)),
|
|
149
|
-
"hide-footer": t(f).length < 10
|
|
150
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
151
|
-
c(O, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
152
|
-
default: h(() => [
|
|
153
|
-
(m(!0), _(x, null, j(t(f).filter(
|
|
154
|
-
(a) => a.name.toLowerCase().includes(t(r).searchKey.toLowerCase())
|
|
155
|
-
), (a) => (m(), w($, {
|
|
156
|
-
key: a._id.toString(),
|
|
157
|
-
onClick: (k) => y(a),
|
|
158
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
159
|
-
}, {
|
|
160
|
-
default: h(() => [
|
|
161
|
-
n("div", se, [
|
|
162
|
-
n("div", re, [
|
|
163
|
-
(m(), w(M(t(L)(a)))),
|
|
164
|
-
n("div", ce, p(a.currentReceive ?? 0) + " used ", 1)
|
|
165
|
-
]),
|
|
166
|
-
n("div", ie, [
|
|
167
|
-
n("div", le, p(a.name), 1),
|
|
168
|
-
n("div", me, p(t(V)(a)), 1)
|
|
169
|
-
]),
|
|
170
|
-
n("div", pe, p(t(s)("program.experience.received", {
|
|
171
|
-
count: a.currentReceive ?? 0
|
|
172
|
-
})), 1)
|
|
173
|
-
]),
|
|
174
|
-
c(F, {
|
|
175
|
-
icon: "delete",
|
|
176
|
-
"icon-color": "neutral-gray-400",
|
|
177
|
-
variant: "tertiary",
|
|
178
|
-
onClick: (k) => (k.stopPropagation(), C(a))
|
|
179
|
-
}, null, 8, ["onClick"])
|
|
180
|
-
]),
|
|
181
|
-
_: 2
|
|
182
|
-
}, 1032, ["onClick"]))), 128))
|
|
183
|
-
]),
|
|
184
|
-
_: 1
|
|
185
|
-
})
|
|
186
|
-
], 64)) : (m(), w(A, {
|
|
187
|
-
key: 1,
|
|
188
|
-
variant: "outlined",
|
|
189
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
190
|
-
}, {
|
|
191
|
-
default: h(() => [
|
|
192
|
-
o[6] || (o[6] = n("img", {
|
|
193
|
-
src: q,
|
|
194
|
-
class: "aspect-square w-[150px]"
|
|
195
|
-
}, null, -1)),
|
|
196
|
-
n("div", de, [
|
|
197
|
-
n("div", ue, p(t(s)("connect.program.experience.empty_state.title")), 1),
|
|
198
|
-
n("div", fe, p(t(s)("connect.program.experience.empty_state.description")), 1)
|
|
199
|
-
]),
|
|
200
|
-
c(F, {
|
|
201
|
-
variant: "primary",
|
|
202
|
-
label: "Create experience program",
|
|
203
|
-
icon: "add",
|
|
204
|
-
onClick: o[5] || (o[5] = (a) => y())
|
|
205
|
-
})
|
|
206
|
-
]),
|
|
207
|
-
_: 1
|
|
208
|
-
})),
|
|
209
|
-
c(ee, {
|
|
210
|
-
ref_key: "sheetRef",
|
|
211
|
-
ref: b,
|
|
212
|
-
"onSubmit:modelValue": N
|
|
213
|
-
}, null, 512)
|
|
214
|
-
])
|
|
215
|
-
], 64);
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
export {
|
|
220
|
-
Ve as default
|
|
221
|
-
};
|