@feedmepos/mf-connect 0.1.56-prod → 0.1.58-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/package.json +1 -1
- package/dist/Analytic-XUI4rZyP.js +0 -427
- package/dist/App-vv5J1Ebe.js +0 -4630
- package/dist/Bin-D4V36uXK.js +0 -166
- package/dist/Broadcast-BvW27G77.js +0 -233
- package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D2MC6Gy1.js +0 -121
- package/dist/Card-C7xLv1Fb.js +0 -911
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
- package/dist/Collections-BKfS-bGL.js +0 -458
- package/dist/Credit-CGmWQq0t.js +0 -228
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C2p6_R01.js +0 -2194
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BGlaqjWp.js +0 -348
- package/dist/Experience-CT7Yab3W.js +0 -229
- package/dist/FileSaver.min-NlMItPOc.js +0 -74
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
- package/dist/Game-DtW4rtYQ.js +0 -284
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +0 -144
- package/dist/Index-Bs5ob9Km.js +0 -259
- package/dist/JsonViewer-v8_C7l5N.js +0 -87
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +0 -18737
- package/dist/MainLayout-B1aJoR95.js +0 -41
- package/dist/Marketing-tA350rTd.js +0 -319
- package/dist/Member-CZoTXgKz.js +0 -279
- package/dist/MemberList-ChwyPtmW.js +0 -1607
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MemberTransactions-Cchtvxm9.js +0 -45
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Bo0EnHBx.js +0 -60553
- package/dist/Mission-DDpelLqN.js +0 -302
- package/dist/Overview-Da3ewBat.js +0 -1079
- package/dist/Point-CggE8VUk.js +0 -232
- package/dist/Promotion-DxvbZhgQ.js +0 -289
- package/dist/Queue-fIxlHrMd.js +0 -260
- package/dist/Record-Bv90_VUG.js +0 -341
- package/dist/Reward-BWYLk7aC.js +0 -442
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CjYEtENe.js +0 -150
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Ak1R8Y2a.js +0 -1763
- package/dist/Segment-_VGdBy3a.js +0 -882
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-Dm4hF1n1.js +0 -181
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-DWDMhmNr.js +0 -188
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-Czy25PII.js +0 -147
- package/dist/Setting-7fTz1dJa.js +0 -1936
- package/dist/Store-TQHKR__B.js +0 -1842
- package/dist/StoreRewards-DZy1ZwiI.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cae25Vr6.js +0 -995
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BVVEzpyP.js +0 -139
- package/dist/Tier-CK53vdbl.js +0 -895
- package/dist/Title-CGWPq_FF.js +0 -566
- package/dist/Transaction-DjJ03PfX.js +0 -39
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DNSdyxrF.js +0 -130
- package/dist/Voucher-D6RuJjNn.js +0 -384
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-D4iCOq3V.js +0 -419
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-BFz8RvY_.js +0 -56
- package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-BLlAxdVk.js +0 -57962
- package/dist/app-_rmIFJ8M.js +0 -7057
- package/dist/app-wDQR6dpb.js +0 -39
- package/dist/app.js +0 -6
- package/dist/business-gJ9fK_2b.js +0 -82
- package/dist/campaign-BfznfcHc.js +0 -94
- package/dist/campaign-C_Yq-ffV.js +0 -1810
- package/dist/campaign-CpzFl8Vr.js +0 -4
- package/dist/campaign.enum-Dsbpz7BO.js +0 -20
- package/dist/campaign.fn-C6vKb-lp.js +0 -758
- package/dist/collectible.enum-DNpj_oyC.js +0 -19
- package/dist/collection.fn-Cgo0sPL2.js +0 -26
- package/dist/dto-CaSQ4Pp9.js +0 -216
- package/dist/effect-DuH74x-N.js +0 -78
- package/dist/email-addresses-DXr-Qqt9.js +0 -705
- package/dist/export-tMPFlVV0.js +0 -97
- package/dist/feedme.ico +0 -0
- package/dist/helper-CJTseW10.js +0 -71
- package/dist/index-8RETBwYy.js +0 -8861
- package/dist/index-B57kxqv7.js +0 -3
- package/dist/index-BNUuy_4R.js +0 -44
- package/dist/index-BSJ-4JYy.js +0 -146
- package/dist/index-BTpBLMHl.js +0 -3070
- package/dist/index-C6Iyn1Q6.js +0 -54
- package/dist/index-CWI06v9e.js +0 -31
- package/dist/index-CdnKwJuz.js +0 -30076
- package/dist/index-Cr_9Bqa1.js +0 -121
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DTyfvK3U.js +0 -2130
- package/dist/index-Dn0gJspN.js +0 -32269
- package/dist/index-IHKkNyxb.js +0 -38
- package/dist/index-J3TDCX-5.js +0 -76
- package/dist/index-V9kRRAB1.js +0 -32
- package/dist/index-vh86FiIQ.js +0 -10
- package/dist/index.esm2017-P2nmohVw.js +0 -3069
- package/dist/loading-D5ZAAdUU.js +0 -71
- package/dist/lodash-B5I3zXaY.js +0 -3678
- package/dist/membership-xl9aKOQ_.js +0 -235
- package/dist/moment-D7p2TMB-.js +0 -2583
- package/dist/money-CIHN3jJZ.js +0 -15
- package/dist/number-BN4-Jdog.js +0 -12
- package/dist/object-qECH92oz.js +0 -26
- package/dist/objectId-dwaoBfJX.js +0 -7
- package/dist/objectid-Dh6RD0Tk.js +0 -145
- package/dist/plugins-CJlgzIv2.js +0 -208
- package/dist/reward-C8mezXzs.js +0 -36
- package/dist/rule-9VRIJFHZ.js +0 -1951
- package/dist/rule-builder-CZUgrDAw.js +0 -102
- package/dist/style.css +0 -4
- package/dist/template-aPJnNGLi.js +0 -190
- package/dist/tier-BJDhpH6X.js +0 -4
- package/dist/tiers/tier=1.png +0 -0
- package/dist/tiers/tier=2.png +0 -0
- package/dist/tiers/tier=3.png +0 -0
- package/dist/tiers/tier=4.png +0 -0
- package/dist/timezone-CpvXaiqq.js +0 -1151
- package/dist/titles/type=diamond.png +0 -0
- package/dist/titles/type=drinks.png +0 -0
- package/dist/titles/type=food.png +0 -0
- package/dist/titles/type=heart.png +0 -0
- package/dist/titles/type=medal.png +0 -0
- package/dist/titles/type=spend.png +0 -0
- package/dist/titles/type=thank-you.png +0 -0
- package/dist/titles/type=thumbs-up.png +0 -0
- package/dist/titles/type=years.png +0 -0
- package/dist/trigger-BfrtcBd-.js +0 -144
- package/dist/tslib.es6-BCqqvLQ_.js +0 -44
- package/dist/type_drinks-D6jnpvwV.js +0 -4
- package/dist/usePagination-Ds-cuHop.js +0 -223
- package/dist/user-Bt1C0yV5.js +0 -54
- package/dist/vue-i18n-OdHHHpEE.js +0 -2365
- package/dist/xlsx-BgB0dYfE.js +0 -15491
- package/dist/zod-Bg2FbC-D.js +0 -90
|
@@ -1,419 +0,0 @@
|
|
|
1
|
-
import { defineComponent as A, ref as w, resolveComponent as c, openBlock as d, createBlock as F, withCtx as f, renderSlot as q, createVNode as m, createTextVNode as S, toDisplayString as I, createElementVNode as n, computed as N, createElementBlock as h, Fragment as U, renderList as z, unref as e, normalizeClass as J, createCommentVNode as P, resolveDynamicComponent as H } from "vue";
|
|
2
|
-
import { c as X } from "./index-CdnKwJuz.js";
|
|
3
|
-
import { e as K, F as Q } from "./index-8RETBwYy.js";
|
|
4
|
-
import { C as W } from "./membership-xl9aKOQ_.js";
|
|
5
|
-
import { Z as g } from "./zod-Bg2FbC-D.js";
|
|
6
|
-
import { _ as Y } from "./SelectItems.vue_vue_type_script_setup_true_lang-Dm4hF1n1.js";
|
|
7
|
-
import { u as ee } from "./business-gJ9fK_2b.js";
|
|
8
|
-
import { useCoreStore as te } from "@feedmepos/mf-common";
|
|
9
|
-
import { _ as le } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BFz8RvY_.js";
|
|
10
|
-
import { _ as oe } from "./ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js";
|
|
11
|
-
import { _ as ae, a as ne } from "./EffectSheet.vue_vue_type_style_index_0_lang-BGlaqjWp.js";
|
|
12
|
-
import { _ as se } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-BVVEzpyP.js";
|
|
13
|
-
import { u as me } from "./vue-i18n-OdHHHpEE.js";
|
|
14
|
-
import { i as re } from "./helper-CJTseW10.js";
|
|
15
|
-
const ue = { class: "flex justify-end gap-8 w-full" }, ie = /* @__PURE__ */ A({
|
|
16
|
-
__name: "MenuSheet",
|
|
17
|
-
props: {
|
|
18
|
-
modelValue: {},
|
|
19
|
-
filterItems: { type: Function }
|
|
20
|
-
},
|
|
21
|
-
emits: ["confirm"],
|
|
22
|
-
setup(o, { emit: T }) {
|
|
23
|
-
const O = w(), s = w(!1);
|
|
24
|
-
function l() {
|
|
25
|
-
var i;
|
|
26
|
-
(i = O.value) == null || i.onConfirm();
|
|
27
|
-
}
|
|
28
|
-
const y = T;
|
|
29
|
-
return (i, x) => {
|
|
30
|
-
const a = c("FmField"), v = c("FmButton"), R = c("FmSideSheet");
|
|
31
|
-
return d(), F(R, {
|
|
32
|
-
modelValue: s.value,
|
|
33
|
-
"onUpdate:modelValue": x[1] || (x[1] = (b) => s.value = b),
|
|
34
|
-
title: "Select Items",
|
|
35
|
-
"close-button": !1,
|
|
36
|
-
"dismiss-away": !0,
|
|
37
|
-
"max-width": 560
|
|
38
|
-
}, {
|
|
39
|
-
"side-sheet-button": f(() => [
|
|
40
|
-
q(i.$slots, "side-sheet-button", {}, () => [
|
|
41
|
-
m(a, { class: "text-fm-color-typo-tertiary cursor-pointer" }, {
|
|
42
|
-
default: f(() => [
|
|
43
|
-
S(I(o.modelValue.length) + " item(s) selected ", 1)
|
|
44
|
-
]),
|
|
45
|
-
_: 1
|
|
46
|
-
})
|
|
47
|
-
])
|
|
48
|
-
]),
|
|
49
|
-
"side-sheet-footer": f(() => [
|
|
50
|
-
n("div", ue, [
|
|
51
|
-
m(v, {
|
|
52
|
-
variant: "tertiary",
|
|
53
|
-
onClick: x[0] || (x[0] = (b) => s.value = !1),
|
|
54
|
-
label: "Cancel"
|
|
55
|
-
}),
|
|
56
|
-
m(v, {
|
|
57
|
-
variant: "primary",
|
|
58
|
-
onClick: l,
|
|
59
|
-
label: "Confirm"
|
|
60
|
-
})
|
|
61
|
-
])
|
|
62
|
-
]),
|
|
63
|
-
default: f(() => [
|
|
64
|
-
m(Y, {
|
|
65
|
-
class: "h-full",
|
|
66
|
-
"max-height": 0,
|
|
67
|
-
ref_key: "selectItemRef",
|
|
68
|
-
ref: O,
|
|
69
|
-
"initial-value": o.modelValue,
|
|
70
|
-
"filter-items": o.filterItems,
|
|
71
|
-
"on-complete": (b) => {
|
|
72
|
-
y("confirm", b), s.value = !1;
|
|
73
|
-
}
|
|
74
|
-
}, null, 8, ["initial-value", "filter-items", "on-complete"])
|
|
75
|
-
]),
|
|
76
|
-
_: 3
|
|
77
|
-
}, 8, ["modelValue"]);
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
}), de = { class: "space-y-24" }, pe = { class: "grid grid-cols-2 gap-16" }, ce = { class: "fm-typo-en-title-sm-800" }, fe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ye = { class: "space-y-16" }, ve = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, be = {
|
|
81
|
-
key: 0,
|
|
82
|
-
class: "xs:!block flex gap-16 items-center pt-8"
|
|
83
|
-
}, ge = { class: "fm-typo-en-body-lg-400" }, xe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ve = {
|
|
84
|
-
key: 0,
|
|
85
|
-
class: "pt-8 space-y-8"
|
|
86
|
-
}, Fe = { class: "flex items-center gap-16 xs:block xs:space-y-8 w-fit" }, Ce = { class: "xs:!block flex gap-16 items-center" }, De = /* @__PURE__ */ A({
|
|
87
|
-
__name: "EarningOptionInput",
|
|
88
|
-
props: {
|
|
89
|
-
modelValue: {
|
|
90
|
-
type: Object
|
|
91
|
-
},
|
|
92
|
-
extras: {
|
|
93
|
-
type: Object
|
|
94
|
-
},
|
|
95
|
-
fixedType: {
|
|
96
|
-
type: Boolean
|
|
97
|
-
},
|
|
98
|
-
errorText: {
|
|
99
|
-
type: String
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
emits: ["update:model-value"],
|
|
103
|
-
setup(o, { emit: T }) {
|
|
104
|
-
var R, b, k;
|
|
105
|
-
const O = ee(), s = o, l = T, y = [
|
|
106
|
-
{
|
|
107
|
-
label: "Based on spending",
|
|
108
|
-
sublabel: "Customers earn rewards based on how much they spend.",
|
|
109
|
-
value: "PROPORTIONAL"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
label: "Fixed amount",
|
|
113
|
-
sublabel: "Customers earn a set amount of rewards for specific actions.",
|
|
114
|
-
value: "FIXED"
|
|
115
|
-
}
|
|
116
|
-
].filter((p) => {
|
|
117
|
-
var t, C;
|
|
118
|
-
return s.fixedType || ((C = (t = s.extras) == null ? void 0 : t.campaign) == null ? void 0 : C.event.type) != "BILL_COMPLETED" ? p.value == "FIXED" : !0;
|
|
119
|
-
}), i = N(() => {
|
|
120
|
-
var t, C;
|
|
121
|
-
const p = s.extras && "configs" in s.extras ? s.extras.configs.type : (t = s.extras) == null ? void 0 : t.campaign.type;
|
|
122
|
-
return (((C = W[p]) == null ? void 0 : C.name) || "reward").toLowerCase();
|
|
123
|
-
}), x = N(() => {
|
|
124
|
-
const p = K.safeParse(s.modelValue);
|
|
125
|
-
return p.success ? [] : p.error.errors;
|
|
126
|
-
});
|
|
127
|
-
function a(p) {
|
|
128
|
-
var t;
|
|
129
|
-
p != ((t = s.modelValue) == null ? void 0 : t.type) && l(
|
|
130
|
-
"update:model-value",
|
|
131
|
-
p === "FIXED" ? {
|
|
132
|
-
type: "FIXED",
|
|
133
|
-
amount: 1
|
|
134
|
-
} : {
|
|
135
|
-
type: "PROPORTIONAL",
|
|
136
|
-
amount: 1,
|
|
137
|
-
every: 1
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
const v = w(
|
|
142
|
-
((R = s.modelValue) == null ? void 0 : R.type) === "PROPORTIONAL" && !!((k = (b = s.modelValue) == null ? void 0 : b.property) != null && k.length) || !1
|
|
143
|
-
);
|
|
144
|
-
return (p, t) => {
|
|
145
|
-
var B, D, _;
|
|
146
|
-
const C = c("FmCard"), $ = c("FmStepperField"), L = c("FmRadio"), j = c("FmPill"), G = c("FmButton"), M = c("FmRadioGroup"), Z = c("FmHelperText");
|
|
147
|
-
return d(), h("div", de, [
|
|
148
|
-
n("div", pe, [
|
|
149
|
-
(d(!0), h(U, null, z(e(y), (r) => {
|
|
150
|
-
var V, u;
|
|
151
|
-
return d(), F(C, {
|
|
152
|
-
variant: "outlined",
|
|
153
|
-
class: J(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-2", {
|
|
154
|
-
"col-span-2": e(y).length == 1,
|
|
155
|
-
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((V = o.modelValue) == null ? void 0 : V.type) === r.value,
|
|
156
|
-
"hover:bg-fm-color-opacity-sm": ((u = o.modelValue) == null ? void 0 : u.type) != r.value
|
|
157
|
-
}]),
|
|
158
|
-
onClick: (E) => a(r.value),
|
|
159
|
-
key: r.value
|
|
160
|
-
}, {
|
|
161
|
-
default: f(() => [
|
|
162
|
-
n("div", ce, I(r.label), 1),
|
|
163
|
-
n("div", fe, I(r.sublabel), 1)
|
|
164
|
-
]),
|
|
165
|
-
_: 2
|
|
166
|
-
}, 1032, ["class", "onClick"]);
|
|
167
|
-
}), 128))
|
|
168
|
-
]),
|
|
169
|
-
n("div", ye, [
|
|
170
|
-
((B = o.modelValue) == null ? void 0 : B.type) === "FIXED" ? (d(), F($, {
|
|
171
|
-
key: 0,
|
|
172
|
-
label: `Receive ${e(i)}(s)`,
|
|
173
|
-
class: "flex-1",
|
|
174
|
-
"model-value": ((D = o.modelValue) == null ? void 0 : D.amount) ?? null,
|
|
175
|
-
"onUpdate:modelValue": t[0] || (t[0] = (r) => l("update:model-value", {
|
|
176
|
-
...o.modelValue ?? { type: "FIXED" },
|
|
177
|
-
amount: r
|
|
178
|
-
}))
|
|
179
|
-
}, null, 8, ["label", "model-value"])) : ((_ = o.modelValue) == null ? void 0 : _.type) === "PROPORTIONAL" ? (d(), h(U, { key: 1 }, [
|
|
180
|
-
t[11] || (t[11] = n("div", { class: "fm-typo-en-body-lg-600" }, "Spending type", -1)),
|
|
181
|
-
m(M, {
|
|
182
|
-
"model-value": e(v),
|
|
183
|
-
"onUpdate:modelValue": t[6] || (t[6] = (r) => {
|
|
184
|
-
e(v) != r && (l("update:model-value", {
|
|
185
|
-
...o.modelValue ?? {
|
|
186
|
-
type: "PROPORTIONAL",
|
|
187
|
-
amount: 1,
|
|
188
|
-
every: 1
|
|
189
|
-
},
|
|
190
|
-
property: r ? [] : void 0,
|
|
191
|
-
every: 1
|
|
192
|
-
}), v.value = r);
|
|
193
|
-
})
|
|
194
|
-
}, {
|
|
195
|
-
default: f(() => [
|
|
196
|
-
m(L, {
|
|
197
|
-
label: "Amount spent",
|
|
198
|
-
sublabel: `Receive ${e(i)} by amount spent`,
|
|
199
|
-
value: !1
|
|
200
|
-
}, {
|
|
201
|
-
label: f(() => {
|
|
202
|
-
var r, V;
|
|
203
|
-
return [
|
|
204
|
-
t[8] || (t[8] = n("div", { class: "fm-typo-en-body-lg-400" }, "Amount spent", -1)),
|
|
205
|
-
n("div", ve, " Receive " + I(e(i)) + " by amount spent ", 1),
|
|
206
|
-
e(v) ? P("", !0) : (d(), h("div", be, [
|
|
207
|
-
m($, {
|
|
208
|
-
label: `Receive ${e(i)}(s)`,
|
|
209
|
-
inputmode: "decimal",
|
|
210
|
-
class: "flex-1",
|
|
211
|
-
"model-value": ((r = o.modelValue) == null ? void 0 : r.amount) ?? null,
|
|
212
|
-
"onUpdate:modelValue": t[1] || (t[1] = (u) => l("update:model-value", {
|
|
213
|
-
...o.modelValue ?? { type: "FIXED" },
|
|
214
|
-
amount: u
|
|
215
|
-
}))
|
|
216
|
-
}, null, 8, ["label", "model-value"]),
|
|
217
|
-
t[7] || (t[7] = n("div", { class: "xs:py-4 text-center" }, "for every", -1)),
|
|
218
|
-
m($, {
|
|
219
|
-
label: `Amount spend (${e(X.Config).getCountry().currency.symbol})`,
|
|
220
|
-
class: "flex-1",
|
|
221
|
-
inputmode: "decimal",
|
|
222
|
-
"model-value": ((V = o.modelValue) == null ? void 0 : V.every) ?? null,
|
|
223
|
-
"onUpdate:modelValue": t[2] || (t[2] = (u) => l("update:model-value", {
|
|
224
|
-
...o.modelValue,
|
|
225
|
-
every: u
|
|
226
|
-
}))
|
|
227
|
-
}, {
|
|
228
|
-
prepend: f(() => [
|
|
229
|
-
S(I(e(X.Config).getCountry().currency.symbol), 1)
|
|
230
|
-
]),
|
|
231
|
-
_: 1
|
|
232
|
-
}, 8, ["label", "model-value"])
|
|
233
|
-
]))
|
|
234
|
-
];
|
|
235
|
-
}),
|
|
236
|
-
_: 1
|
|
237
|
-
}, 8, ["sublabel"]),
|
|
238
|
-
m(L, {
|
|
239
|
-
label: "Product bought",
|
|
240
|
-
sublabel: `Receive ${e(i)} by product bought`,
|
|
241
|
-
value: !0,
|
|
242
|
-
disabled: !e(O).isPremium
|
|
243
|
-
}, {
|
|
244
|
-
label: f(() => {
|
|
245
|
-
var r, V;
|
|
246
|
-
return [
|
|
247
|
-
n("div", ge, [
|
|
248
|
-
t[9] || (t[9] = S(" Product bought ", -1)),
|
|
249
|
-
m(j, { variant: "premium" })
|
|
250
|
-
]),
|
|
251
|
-
n("div", xe, " Receive " + I(e(i)) + " by product bought ", 1),
|
|
252
|
-
e(v) ? (d(), h("div", Ve, [
|
|
253
|
-
n("div", Fe, [
|
|
254
|
-
m(ie, {
|
|
255
|
-
"model-value": s.modelValue.property || [],
|
|
256
|
-
onConfirm: t[3] || (t[3] = (u) => l("update:model-value", {
|
|
257
|
-
...o.modelValue,
|
|
258
|
-
property: u
|
|
259
|
-
}))
|
|
260
|
-
}, {
|
|
261
|
-
"side-sheet-button": f(() => {
|
|
262
|
-
var u, E;
|
|
263
|
-
return [
|
|
264
|
-
m(G, {
|
|
265
|
-
label: (u = s.modelValue.property) != null && u.length ? `${(E = s.modelValue.property) == null ? void 0 : E.length} product(s) selected` : "Select product",
|
|
266
|
-
icon: "link",
|
|
267
|
-
variant: "secondary"
|
|
268
|
-
}, null, 8, ["label"])
|
|
269
|
-
];
|
|
270
|
-
}),
|
|
271
|
-
_: 1
|
|
272
|
-
}, 8, ["model-value"])
|
|
273
|
-
]),
|
|
274
|
-
n("div", Ce, [
|
|
275
|
-
m($, {
|
|
276
|
-
inputmode: "decimal",
|
|
277
|
-
label: `Receive ${e(i)}(s)`,
|
|
278
|
-
class: "flex-1",
|
|
279
|
-
"model-value": ((r = o.modelValue) == null ? void 0 : r.amount) ?? null,
|
|
280
|
-
"onUpdate:modelValue": t[4] || (t[4] = (u) => l("update:model-value", {
|
|
281
|
-
...o.modelValue ?? { type: "FIXED" },
|
|
282
|
-
amount: u
|
|
283
|
-
}))
|
|
284
|
-
}, null, 8, ["label", "model-value"]),
|
|
285
|
-
t[10] || (t[10] = n("div", { class: "xs:py-4 text-center" }, "for every", -1)),
|
|
286
|
-
m($, {
|
|
287
|
-
label: "Item purchased",
|
|
288
|
-
class: "flex-1",
|
|
289
|
-
"model-value": ((V = o.modelValue) == null ? void 0 : V.every) ?? null,
|
|
290
|
-
inputmode: "numeric",
|
|
291
|
-
"max-fraction-digits": 0,
|
|
292
|
-
"onUpdate:modelValue": t[5] || (t[5] = (u) => l("update:model-value", {
|
|
293
|
-
...o.modelValue,
|
|
294
|
-
every: u
|
|
295
|
-
}))
|
|
296
|
-
}, null, 8, ["model-value"])
|
|
297
|
-
])
|
|
298
|
-
])) : P("", !0)
|
|
299
|
-
];
|
|
300
|
-
}),
|
|
301
|
-
_: 1
|
|
302
|
-
}, 8, ["sublabel", "disabled"])
|
|
303
|
-
]),
|
|
304
|
-
_: 1
|
|
305
|
-
}, 8, ["model-value"])
|
|
306
|
-
], 64)) : P("", !0)
|
|
307
|
-
]),
|
|
308
|
-
o.errorText || e(x).length > 0 ? (d(), F(Z, {
|
|
309
|
-
key: 0,
|
|
310
|
-
class: "!mt-4",
|
|
311
|
-
text: o.errorText || e(g).helperText(e(x), ""),
|
|
312
|
-
state: "error"
|
|
313
|
-
}, null, 8, ["text"])) : P("", !0)
|
|
314
|
-
]);
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
}), Ie = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary flex items-center justify-between" }, _e = /* @__PURE__ */ A({
|
|
318
|
-
__name: "VoucherEditor",
|
|
319
|
-
props: {
|
|
320
|
-
modelValue: {
|
|
321
|
-
type: Object
|
|
322
|
-
},
|
|
323
|
-
rewardImage: {
|
|
324
|
-
type: Object
|
|
325
|
-
}
|
|
326
|
-
},
|
|
327
|
-
emits: ["update:model-value", "update:reward-image"],
|
|
328
|
-
setup(o, { emit: T }) {
|
|
329
|
-
const { t: O } = me(), l = w(
|
|
330
|
-
o.modelValue ?? re("VOUCHER", {
|
|
331
|
-
business: te().currentBusiness.value._id,
|
|
332
|
-
name: ""
|
|
333
|
-
})
|
|
334
|
-
), y = Q, i = T;
|
|
335
|
-
return (x, a) => {
|
|
336
|
-
var b, k, p;
|
|
337
|
-
const v = c("FmTextarea"), R = c("FmHelperText");
|
|
338
|
-
return d(), h(U, null, [
|
|
339
|
-
m(le, {
|
|
340
|
-
modelValue: e(l).name,
|
|
341
|
-
"onUpdate:modelValue": a[0] || (a[0] = (t) => e(l).name = t),
|
|
342
|
-
label: "Voucher name",
|
|
343
|
-
schema: e(g).typeAtPath(e(y), "name", [e(l).type])
|
|
344
|
-
}, null, 8, ["modelValue", "schema"]),
|
|
345
|
-
m(v, {
|
|
346
|
-
class: "!mb-[-16px]",
|
|
347
|
-
modelValue: e(l).description,
|
|
348
|
-
"onUpdate:modelValue": a[1] || (a[1] = (t) => e(l).description = t),
|
|
349
|
-
rules: [e(g).ruleAtPath(e(y), "description", [e(l).type])]
|
|
350
|
-
}, {
|
|
351
|
-
label: f(() => [
|
|
352
|
-
(d(), F(H(
|
|
353
|
-
e(g).toInputLabel(
|
|
354
|
-
e(g).typeAtPath(e(y), "description", [e(l).type]),
|
|
355
|
-
"Voucher description"
|
|
356
|
-
)
|
|
357
|
-
)))
|
|
358
|
-
]),
|
|
359
|
-
_: 1
|
|
360
|
-
}, 8, ["modelValue", "rules"]),
|
|
361
|
-
n("div", Ie, [
|
|
362
|
-
a[6] || (a[6] = n("div", null, "Voucher description should not exceed 200 characters.", -1)),
|
|
363
|
-
n("div", null, I(((b = e(l).description) == null ? void 0 : b.length) ?? 0) + "/200", 1)
|
|
364
|
-
]),
|
|
365
|
-
m(oe, {
|
|
366
|
-
class: "w-1/2 xs:w-2/3",
|
|
367
|
-
"aspect-ratio": "16/9",
|
|
368
|
-
file: o.rewardImage ?? void 0,
|
|
369
|
-
thumbnail: e(l).image ?? void 0,
|
|
370
|
-
"onUpdate:file": a[2] || (a[2] = async (t) => {
|
|
371
|
-
i("update:reward-image", t), t || (e(l).image = null);
|
|
372
|
-
})
|
|
373
|
-
}, {
|
|
374
|
-
label: f(() => [
|
|
375
|
-
(d(), F(H(
|
|
376
|
-
e(g).toInputLabel(
|
|
377
|
-
e(g).typeAtPath(e(y), "image", [e(l).type]),
|
|
378
|
-
"Voucher image"
|
|
379
|
-
)
|
|
380
|
-
)))
|
|
381
|
-
]),
|
|
382
|
-
_: 1
|
|
383
|
-
}, 8, ["file", "thumbnail"]),
|
|
384
|
-
a[7] || (a[7] = n("div", { class: "fm-typo-en-title-sm-800" }, "Discount", -1)),
|
|
385
|
-
m(ae, {
|
|
386
|
-
"model-value": e(l).extras.effect,
|
|
387
|
-
"onUpdate:modelValue": a[3] || (a[3] = (t) => e(l).extras.effect = t)
|
|
388
|
-
}, null, 8, ["model-value"]),
|
|
389
|
-
e(l).extras.effect == null ? (d(), F(R, {
|
|
390
|
-
key: 0,
|
|
391
|
-
class: "!mt-8",
|
|
392
|
-
text: e(O)("connect.campaign.common.effect_required"),
|
|
393
|
-
state: "error"
|
|
394
|
-
}, null, 8, ["text"])) : P("", !0),
|
|
395
|
-
a[8] || (a[8] = n("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Usage configuration", -1)),
|
|
396
|
-
m(ne, {
|
|
397
|
-
"model-value": e(l).options,
|
|
398
|
-
"no-campaign": e(l).noCampaign,
|
|
399
|
-
"onUpdate:modelValue": a[4] || (a[4] = (t) => e(l).options = t),
|
|
400
|
-
schema: e(g).typeAtPath(e(y), "options", ["VOUCHER"])
|
|
401
|
-
}, null, 8, ["model-value", "no-campaign", "schema"]),
|
|
402
|
-
a[9] || (a[9] = n("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Availability", -1)),
|
|
403
|
-
e(l).type === "VOUCHER" ? (d(), F(se, {
|
|
404
|
-
key: 1,
|
|
405
|
-
"model-value": ((p = (k = e(l).extras) == null ? void 0 : k.targetLocation) == null ? void 0 : p.map(String)) ?? null,
|
|
406
|
-
type: "select",
|
|
407
|
-
"onUpdate:modelValue": a[5] || (a[5] = (t) => {
|
|
408
|
-
e(l).extras.targetLocation = t;
|
|
409
|
-
}),
|
|
410
|
-
rules: [e(g).ruleAtPath(e(y), "extras.targetLocation")]
|
|
411
|
-
}, null, 8, ["model-value", "rules"])) : P("", !0)
|
|
412
|
-
], 64);
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
});
|
|
416
|
-
export {
|
|
417
|
-
De as _,
|
|
418
|
-
_e as a
|
|
419
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { defineComponent as f, useAttrs as y, resolveComponent as b, openBlock as l, createBlock as v, mergeProps as x, unref as t, createSlots as g, withCtx as h, createElementVNode as a, toDisplayString as n, renderSlot as k, createElementBlock as F, createCommentVNode as S } from "vue";
|
|
2
|
-
import { Z as d } from "./zod-Bg2FbC-D.js";
|
|
3
|
-
import { u as V } from "./vue-i18n-OdHHHpEE.js";
|
|
4
|
-
const B = { class: "fm-typo-en-body-lg-400 flex gap-4 text-fm-color-typo-primary items-center" }, C = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "text-fm-color-typo-tertiary"
|
|
7
|
-
}, E = /* @__PURE__ */ f({
|
|
8
|
-
__name: "ZodTextField",
|
|
9
|
-
props: {
|
|
10
|
-
label: {
|
|
11
|
-
type: String,
|
|
12
|
-
required: !1
|
|
13
|
-
},
|
|
14
|
-
schema: {
|
|
15
|
-
type: Object,
|
|
16
|
-
required: !0
|
|
17
|
-
},
|
|
18
|
-
modelValue: {
|
|
19
|
-
type: String
|
|
20
|
-
},
|
|
21
|
-
disabled: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: !1
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
emits: ["update:model-value", "focus-changed"],
|
|
27
|
-
setup(e, { emit: r }) {
|
|
28
|
-
const { t: s } = V(), m = r, i = y();
|
|
29
|
-
return (c, o) => {
|
|
30
|
-
const u = b("FmTextField");
|
|
31
|
-
return l(), v(u, x({
|
|
32
|
-
"model-value": e.modelValue,
|
|
33
|
-
"onUpdate:modelValue": o[0] || (o[0] = (p) => m("update:model-value", p)),
|
|
34
|
-
disabled: e.disabled
|
|
35
|
-
}, t(i), {
|
|
36
|
-
rules: [t(d).toRule(e.schema)]
|
|
37
|
-
}), g({ _: 2 }, [
|
|
38
|
-
e.label ? {
|
|
39
|
-
name: "label",
|
|
40
|
-
fn: h(() => [
|
|
41
|
-
a("div", B, [
|
|
42
|
-
a("div", null, n(e.label), 1),
|
|
43
|
-
k(c.$slots, "append-label", {}, () => [
|
|
44
|
-
t(d).isRequired(e.schema) ? S("", !0) : (l(), F("div", C, n(t(s)("connect.common.optional")), 1))
|
|
45
|
-
])
|
|
46
|
-
])
|
|
47
|
-
]),
|
|
48
|
-
key: "0"
|
|
49
|
-
} : void 0
|
|
50
|
-
]), 1040, ["model-value", "disabled", "rules"]);
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
export {
|
|
55
|
-
E as _
|
|
56
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
var u = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
-
function f(e) {
|
|
3
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
-
}
|
|
5
|
-
function l(e) {
|
|
6
|
-
if (e.__esModule) return e;
|
|
7
|
-
var r = e.default;
|
|
8
|
-
if (typeof r == "function") {
|
|
9
|
-
var t = function o() {
|
|
10
|
-
return this instanceof o ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
t.prototype = r.prototype;
|
|
13
|
-
} else t = {};
|
|
14
|
-
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
|
|
15
|
-
var n = Object.getOwnPropertyDescriptor(e, o);
|
|
16
|
-
Object.defineProperty(t, o, n.get ? n : {
|
|
17
|
-
enumerable: !0,
|
|
18
|
-
get: function() {
|
|
19
|
-
return e[o];
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}), t;
|
|
23
|
-
}
|
|
24
|
-
export {
|
|
25
|
-
l as a,
|
|
26
|
-
u as c,
|
|
27
|
-
f as g
|
|
28
|
-
};
|