@feedmepos/mf-connect 0.1.71-prod → 0.1.72-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-DIzZEv_G.js → Analytic-CxQKbOnR.js} +163 -163
- package/dist/{App-DrnbBc_l.js → App-C0HCgYW2.js} +7 -7
- package/dist/{Bin-Bt_ru3Gd.js → Bin-BFx6j8vs.js} +8 -8
- package/dist/{Broadcast-Bn5ZjKqo.js → Broadcast-CUfwWq6_.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BojGwK_6.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-2oosZTlv.js} +6 -6
- package/dist/{Card-sBhDvBXT.js → Card-DsMVa01V.js} +16 -16
- package/dist/{Collections-Duct2pSH.js → Collections-DSbNXU78.js} +7 -7
- package/dist/{Credit-D3mJTvRc.js → Credit-Dp-tSMfE.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-_60iFOeG.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BW7V_Nsq.js} +817 -794
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-D7QHcodO.js +348 -0
- package/dist/{Experience-CIGwlErx.js → Experience-DkQbI88m.js} +8 -8
- package/dist/{Game-Canf-7L-.js → Game-BJvtVGC7.js} +9 -9
- package/dist/{Index-25eVdVm7.js → Index-BcHe2Qqe.js} +10 -10
- package/dist/{Marketing-krqaA6fv.js → Marketing-BaYjdZpb.js} +6 -6
- package/dist/{Member-Bt0NaXiS.js → Member-BzrcLN4X.js} +10 -10
- package/dist/{MemberList-CXk-T9r2.js → MemberList-_uD6WR--.js} +25 -25
- package/dist/{MemberTransactions-Dg-A6a0v.js → MemberTransactions-DIG5noli.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DtpDrupj.js → MessageInput.vue_vue_type_script_setup_true_lang-Cm4jVJBM.js} +7 -7
- package/dist/{Mission-CsxpvhsB.js → Mission-B0h7ECrd.js} +9 -9
- package/dist/{Overview-BUlq3MuQ.js → Overview-BfjTYcaf.js} +18 -18
- package/dist/{Point-DvPTk5wL.js → Point-yBqZgf08.js} +8 -8
- package/dist/{Promotion-BWygpn4X.js → Promotion-Bh8yiwPe.js} +9 -9
- package/dist/{Queue-iD4D04Z-.js → Queue-CMMyxmWP.js} +10 -10
- package/dist/{Record-CritfdkX.js → Record-DSLpbGVk.js} +8 -8
- package/dist/{Reward-DuZ73-kd.js → Reward-BzAIdcgx.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B1073xkE.js → RewardGroup.vue_vue_type_script_setup_true_lang-DoGsPRbi.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-1CJRrkoS.js → RuleGroup.vue_vue_type_script_setup_true_lang-B7qMLC2M.js} +595 -591
- package/dist/{Segment-C8rNVlEi.js → Segment-BVH3YC8I.js} +22 -22
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BmWRTRMe.js → SelectItems.vue_vue_type_script_setup_true_lang-BkHWRVba.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BaP2tykA.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-D-4QjkWh.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CqICTY8X.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CzCSXHge.js} +3 -3
- package/dist/{Setting-BwLCOkXJ.js → Setting-CFLtqHFJ.js} +12 -12
- package/dist/{SettingAdvertisements-Bjw1RSKB.js → SettingAdvertisements-CvFG5Fun.js} +11 -11
- package/dist/{Store-DEtsM22Y.js → Store-CHcszdPx.js} +19 -19
- package/dist/{StoreRewards-DVzCi6nY.js → StoreRewards-BXrXO3Cg.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DKWElE0N.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Clou5scZ.js} +19 -19
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CS_3d3zl.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BEpXudTV.js} +1 -1
- package/dist/{Tier-qUFmMLZe.js → Tier-98o6YCz1.js} +19 -19
- package/dist/{Title-Qk0xODw6.js → Title-BmvCMh9F.js} +18 -18
- package/dist/{Transaction-Be-VAdL0.js → Transaction-D07dnpCB.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Lcgh9b36.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DHvItthe.js} +6 -6
- package/dist/{Voucher-DjiXcyL2.js → Voucher-BX5Dy6oL.js} +12 -12
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BlXCP_IR.js +421 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B0KU6cW2.js → ZodTextField.vue_vue_type_script_setup_true_lang-TkZAyKkk.js} +1 -1
- package/dist/{app-BYt1acSS.js → app-7Ivt_7kS.js} +1974 -914
- package/dist/{app-CVDxFFOq.js → app-C98aAmiY.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-COPU_15m.js → business-B55rTB5S.js} +1 -1
- package/dist/{campaign-CANP8DZ7.js → campaign-RS-eYMBW.js} +1 -1
- package/dist/campaign-dSphYCws.js +226 -0
- package/dist/{campaign.enum-YFcT9qdL.js → campaign.enum-BZRXf9TI.js} +1 -1
- package/dist/{campaign.fn-CF0vxr00.js → campaign.fn-D_b763b6.js} +82 -82
- package/dist/{collectible.enum-CKyUdzxK.js → collectible.enum-ANnJMtnj.js} +1 -1
- package/dist/{collection.fn-CLGxII_6.js → collection.fn-BObHG1bS.js} +2 -2
- package/dist/{dto-D2FwEDQQ.js → dto-BA2PX6Mi.js} +4 -4
- package/dist/{effect-C_AEVoTp.js → effect-DDAGMMzr.js} +1 -1
- package/dist/{email-addresses-BWnpaUzY.js → email-addresses-jx17hvtN.js} +1 -1
- package/dist/{export-7MCVnb85.js → export-DI_2PZhY.js} +3 -3
- package/dist/{helper-BwCpzGpj.js → helper-ApDLcgT1.js} +1 -1
- package/dist/{index-doXz2Xnd.js → index-B5J1HBw3.js} +1 -1
- package/dist/{index-B776PH8X.js → index-BCOxYH7r.js} +1 -1
- package/dist/{index-CY9fLTpI.js → index-BbNMr2Lt.js} +3 -3
- package/dist/{index-BWctDnVc.js → index-C1tcqVNm.js} +3 -3
- package/dist/{index-B7v1Tn5m.js → index-CEeIezsZ.js} +1 -1
- package/dist/{index-D_Yyiihg.js → index-CN0ree8J.js} +1 -1
- package/dist/{index-DhJ4RwuN.js → index-Cl85lvDM.js} +1 -1
- package/dist/{index-BRPLDaar.js → index-CtpRdZKH.js} +2 -2
- package/dist/{index-BCcnESMx.js → index-DUfWM7U3.js} +1023 -1023
- package/dist/{index-CvWUVGAn.js → index-D_9bRGRa.js} +1 -1
- package/dist/{index-BdTNXQvR.js → index-Dg6gbVXO.js} +1 -1
- package/dist/{index-vEDs6OGV.js → index-Dpe36Jv6.js} +4 -4
- package/dist/{index-DMD1qL3R.js → index-DtB1XLw6.js} +183 -178
- package/dist/{index.esm2017-BwgUTaPG.js → index.esm2017-CcAT1nnu.js} +1 -1
- package/dist/{loading-CpAYlxoG.js → loading-Hh5FSOP9.js} +1 -1
- package/dist/{membership-CgJ7PFUR.js → membership-DXQf9Mj3.js} +3 -3
- package/dist/{money-CQGmkTRp.js → money-OBHKTSCa.js} +1 -1
- package/dist/{number-B_oM4a_k.js → number-DTqujv4j.js} +1 -1
- package/dist/{objectid-Dwu4f87A.js → objectid-BkZDKSpn.js} +1 -1
- package/dist/{campaign-DRXh3QJ1.js → plugins-CQqQawn6.js} +784 -776
- package/dist/{reward-CAhovk_1.js → reward-n9uPwsH1.js} +1 -1
- package/dist/{rule-b2BC4jY8.js → rule-BgsibUNE.js} +3 -3
- package/dist/{rule-builder-w8uO1XAF.js → rule-builder-BkzqGukH.js} +1 -1
- package/dist/template-gXT-yGOY.js +188 -0
- package/dist/{timezone-Di5x-2AC.js → timezone-X-iXAUqa.js} +1 -1
- package/dist/{trigger-B9EDmE6z.js → trigger-DEZuV7Fw.js} +4 -4
- package/dist/{user-BCB96Qct.js → user-DG_FfcGk.js} +1 -1
- package/dist/{vue-i18n-DddYl0c6.js → vue-i18n-BB1YkgAs.js} +317 -317
- package/dist/{xlsx-Dj8VVXnA.js → xlsx-CJQa9ako.js} +166 -166
- package/package.json +1 -1
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-Sk5ub0FZ.js +0 -348
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DHySLFcf.js +0 -419
- package/dist/plugins-Bo72kWn7.js +0 -208
- package/dist/template-DDBscrPK.js +0 -190
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { defineComponent as B, ref as k, resolveComponent as g, openBlock as d, createBlock as F, withCtx as y, renderSlot as J, createVNode as m, createTextVNode as U, toDisplayString as f, createElementVNode as s, computed as N, createElementBlock as P, Fragment as w, renderList as K, unref as e, normalizeClass as Q, createCommentVNode as I, resolveDynamicComponent as H } from "vue";
|
|
2
|
+
import { u as G } from "./vue-i18n-BB1YkgAs.js";
|
|
3
|
+
import { c as j } from "./index-C1tcqVNm.js";
|
|
4
|
+
import { e as W, F as Y } from "./index-CtpRdZKH.js";
|
|
5
|
+
import { C as ee } from "./membership-DXQf9Mj3.js";
|
|
6
|
+
import { Z as V } from "./zod-Bg2FbC-D.js";
|
|
7
|
+
import { _ as te } from "./SelectItems.vue_vue_type_script_setup_true_lang-BkHWRVba.js";
|
|
8
|
+
import { u as le } from "./business-B55rTB5S.js";
|
|
9
|
+
import { useCoreStore as oe } from "@feedmepos/mf-common";
|
|
10
|
+
import { _ as ne } from "./ZodTextField.vue_vue_type_script_setup_true_lang-TkZAyKkk.js";
|
|
11
|
+
import { _ as ae } from "./ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js";
|
|
12
|
+
import { _ as ie, a as se } from "./EffectSheet.vue_vue_type_style_index_0_lang-D7QHcodO.js";
|
|
13
|
+
import { _ as me } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-BEpXudTV.js";
|
|
14
|
+
import { i as re } from "./helper-ApDLcgT1.js";
|
|
15
|
+
const ue = { class: "flex justify-end gap-8 w-full" }, ce = /* @__PURE__ */ B({
|
|
16
|
+
__name: "MenuSheet",
|
|
17
|
+
props: {
|
|
18
|
+
modelValue: {},
|
|
19
|
+
filterItems: { type: Function }
|
|
20
|
+
},
|
|
21
|
+
emits: ["confirm"],
|
|
22
|
+
setup(o, { emit: T }) {
|
|
23
|
+
const C = k(), l = k(!1);
|
|
24
|
+
function t() {
|
|
25
|
+
var v;
|
|
26
|
+
(v = C.value) == null || v.onConfirm();
|
|
27
|
+
}
|
|
28
|
+
const u = T;
|
|
29
|
+
return (v, p) => {
|
|
30
|
+
const n = g("FmField"), _ = g("FmButton"), x = g("FmSideSheet");
|
|
31
|
+
return d(), F(x, {
|
|
32
|
+
modelValue: l.value,
|
|
33
|
+
"onUpdate:modelValue": p[1] || (p[1] = (b) => l.value = b),
|
|
34
|
+
title: "Select Items",
|
|
35
|
+
"close-button": !1,
|
|
36
|
+
"dismiss-away": !0,
|
|
37
|
+
"max-width": 560
|
|
38
|
+
}, {
|
|
39
|
+
"side-sheet-button": y(() => [
|
|
40
|
+
J(v.$slots, "side-sheet-button", {}, () => [
|
|
41
|
+
m(n, { class: "text-fm-color-typo-tertiary cursor-pointer" }, {
|
|
42
|
+
default: y(() => [
|
|
43
|
+
U(f(o.modelValue.length) + " item(s) selected ", 1)
|
|
44
|
+
]),
|
|
45
|
+
_: 1
|
|
46
|
+
})
|
|
47
|
+
])
|
|
48
|
+
]),
|
|
49
|
+
"side-sheet-footer": y(() => [
|
|
50
|
+
s("div", ue, [
|
|
51
|
+
m(_, {
|
|
52
|
+
variant: "tertiary",
|
|
53
|
+
onClick: p[0] || (p[0] = (b) => l.value = !1),
|
|
54
|
+
label: "Cancel"
|
|
55
|
+
}),
|
|
56
|
+
m(_, {
|
|
57
|
+
variant: "primary",
|
|
58
|
+
onClick: t,
|
|
59
|
+
label: "Confirm"
|
|
60
|
+
})
|
|
61
|
+
])
|
|
62
|
+
]),
|
|
63
|
+
default: y(() => [
|
|
64
|
+
m(te, {
|
|
65
|
+
class: "h-full",
|
|
66
|
+
"max-height": 0,
|
|
67
|
+
ref_key: "selectItemRef",
|
|
68
|
+
ref: C,
|
|
69
|
+
"initial-value": o.modelValue,
|
|
70
|
+
"filter-items": o.filterItems,
|
|
71
|
+
"on-complete": (b) => {
|
|
72
|
+
u("confirm", b), l.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" }, fe = { class: "fm-typo-en-title-sm-800" }, ge = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ye = { class: "space-y-16" }, be = { class: "fm-typo-en-body-lg-600" }, ve = { class: "fm-typo-en-body-lg-400" }, xe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ve = {
|
|
81
|
+
key: 0,
|
|
82
|
+
class: "xs:!block flex gap-16 items-center pt-8"
|
|
83
|
+
}, Oe = { class: "xs:py-4 text-center" }, Fe = { class: "fm-typo-en-body-lg-400" }, he = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ce = {
|
|
84
|
+
key: 0,
|
|
85
|
+
class: "pt-8 space-y-8"
|
|
86
|
+
}, _e = { class: "flex items-center gap-16 xs:block xs:space-y-8 w-fit" }, Pe = { class: "xs:!block flex gap-16 items-center" }, Ie = { class: "xs:py-4 text-center" }, je = /* @__PURE__ */ B({
|
|
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 b, R, E;
|
|
105
|
+
const C = le(), { t: l } = G(), t = o, u = T, v = N(
|
|
106
|
+
() => [
|
|
107
|
+
{
|
|
108
|
+
label: l("connect.campaign.earningOption.type.PROPORTIONAL.label"),
|
|
109
|
+
sublabel: l("connect.campaign.earningOption.type.PROPORTIONAL.sublabel"),
|
|
110
|
+
value: "PROPORTIONAL"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
label: l("connect.campaign.earningOption.type.FIXED.label"),
|
|
114
|
+
sublabel: l("connect.campaign.earningOption.type.FIXED.sublabel"),
|
|
115
|
+
value: "FIXED"
|
|
116
|
+
}
|
|
117
|
+
].filter((a) => {
|
|
118
|
+
var i, h;
|
|
119
|
+
return t.fixedType || ((h = (i = t.extras) == null ? void 0 : i.campaign) == null ? void 0 : h.event.type) != "BILL_COMPLETED" ? a.value == "FIXED" : !0;
|
|
120
|
+
})
|
|
121
|
+
), p = N(() => {
|
|
122
|
+
var i, h;
|
|
123
|
+
const a = t.extras && "configs" in t.extras ? t.extras.configs.type : (i = t.extras) == null ? void 0 : i.campaign.type;
|
|
124
|
+
return (((h = ee[a]) == null ? void 0 : h.name) || "reward").toLowerCase();
|
|
125
|
+
}), n = N(() => {
|
|
126
|
+
const a = W.safeParse(t.modelValue);
|
|
127
|
+
return a.success ? [] : a.error.errors;
|
|
128
|
+
});
|
|
129
|
+
function _(a) {
|
|
130
|
+
var i;
|
|
131
|
+
a != ((i = t.modelValue) == null ? void 0 : i.type) && u(
|
|
132
|
+
"update:model-value",
|
|
133
|
+
a === "FIXED" ? {
|
|
134
|
+
type: "FIXED",
|
|
135
|
+
amount: 1
|
|
136
|
+
} : {
|
|
137
|
+
type: "PROPORTIONAL",
|
|
138
|
+
amount: 1,
|
|
139
|
+
every: 1
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
const x = k(
|
|
144
|
+
((b = t.modelValue) == null ? void 0 : b.type) === "PROPORTIONAL" && !!((E = (R = t.modelValue) == null ? void 0 : R.property) != null && E.length) || !1
|
|
145
|
+
);
|
|
146
|
+
return (a, i) => {
|
|
147
|
+
var D, $, X;
|
|
148
|
+
const h = g("FmCard"), S = g("FmStepperField"), A = g("FmRadio"), M = g("FmPill"), Z = g("FmButton"), q = g("FmRadioGroup"), z = g("FmHelperText");
|
|
149
|
+
return d(), P("div", de, [
|
|
150
|
+
s("div", pe, [
|
|
151
|
+
(d(!0), P(w, null, K(e(v), (r) => {
|
|
152
|
+
var O, c;
|
|
153
|
+
return d(), F(h, {
|
|
154
|
+
variant: "outlined",
|
|
155
|
+
class: Q(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-2", {
|
|
156
|
+
"col-span-2": e(v).length == 1,
|
|
157
|
+
"border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((O = o.modelValue) == null ? void 0 : O.type) === r.value,
|
|
158
|
+
"hover:bg-fm-color-opacity-sm": ((c = o.modelValue) == null ? void 0 : c.type) != r.value
|
|
159
|
+
}]),
|
|
160
|
+
onClick: (L) => _(r.value),
|
|
161
|
+
key: r.value
|
|
162
|
+
}, {
|
|
163
|
+
default: y(() => [
|
|
164
|
+
s("div", fe, f(r.label), 1),
|
|
165
|
+
s("div", ge, f(r.sublabel), 1)
|
|
166
|
+
]),
|
|
167
|
+
_: 2
|
|
168
|
+
}, 1032, ["class", "onClick"]);
|
|
169
|
+
}), 128))
|
|
170
|
+
]),
|
|
171
|
+
s("div", ye, [
|
|
172
|
+
((D = o.modelValue) == null ? void 0 : D.type) === "FIXED" ? (d(), F(S, {
|
|
173
|
+
key: 0,
|
|
174
|
+
label: e(l)("connect.campaign.earningOption.receiveLabel", { configName: e(p) }),
|
|
175
|
+
class: "flex-1",
|
|
176
|
+
"model-value": (($ = o.modelValue) == null ? void 0 : $.amount) ?? null,
|
|
177
|
+
"onUpdate:modelValue": i[0] || (i[0] = (r) => u("update:model-value", {
|
|
178
|
+
...o.modelValue ?? { type: "FIXED" },
|
|
179
|
+
amount: r
|
|
180
|
+
}))
|
|
181
|
+
}, null, 8, ["label", "model-value"])) : ((X = o.modelValue) == null ? void 0 : X.type) === "PROPORTIONAL" ? (d(), P(w, { key: 1 }, [
|
|
182
|
+
s("div", be, f(e(l)("connect.campaign.earningOption.spendingType")), 1),
|
|
183
|
+
m(q, {
|
|
184
|
+
"model-value": e(x),
|
|
185
|
+
"onUpdate:modelValue": i[6] || (i[6] = (r) => {
|
|
186
|
+
e(x) != r && (u("update:model-value", {
|
|
187
|
+
...o.modelValue ?? {
|
|
188
|
+
type: "PROPORTIONAL",
|
|
189
|
+
amount: 1,
|
|
190
|
+
every: 1
|
|
191
|
+
},
|
|
192
|
+
property: r ? [] : void 0,
|
|
193
|
+
every: 1
|
|
194
|
+
}), x.value = r);
|
|
195
|
+
})
|
|
196
|
+
}, {
|
|
197
|
+
default: y(() => [
|
|
198
|
+
m(A, {
|
|
199
|
+
label: e(l)("connect.campaign.earningOption.amountSpent.label"),
|
|
200
|
+
sublabel: e(l)("connect.campaign.earningOption.amountSpent.sublabel", { configName: e(p) }),
|
|
201
|
+
value: !1
|
|
202
|
+
}, {
|
|
203
|
+
label: y(() => {
|
|
204
|
+
var r, O;
|
|
205
|
+
return [
|
|
206
|
+
s("div", ve, f(e(l)("connect.campaign.earningOption.amountSpent.label")), 1),
|
|
207
|
+
s("div", xe, f(e(l)("connect.campaign.earningOption.amountSpent.sublabel", { configName: e(p) })), 1),
|
|
208
|
+
e(x) ? I("", !0) : (d(), P("div", Ve, [
|
|
209
|
+
m(S, {
|
|
210
|
+
label: e(l)("connect.campaign.earningOption.receiveLabel", { configName: e(p) }),
|
|
211
|
+
inputmode: "decimal",
|
|
212
|
+
class: "flex-1",
|
|
213
|
+
"model-value": ((r = o.modelValue) == null ? void 0 : r.amount) ?? null,
|
|
214
|
+
"onUpdate:modelValue": i[1] || (i[1] = (c) => u("update:model-value", {
|
|
215
|
+
...o.modelValue ?? { type: "FIXED" },
|
|
216
|
+
amount: c
|
|
217
|
+
}))
|
|
218
|
+
}, null, 8, ["label", "model-value"]),
|
|
219
|
+
s("div", Oe, f(e(l)("connect.campaign.earningOption.forEvery")), 1),
|
|
220
|
+
m(S, {
|
|
221
|
+
label: e(l)("connect.campaign.earningOption.amountSpend", { currency: e(j.Config).getCountry().currency.symbol }),
|
|
222
|
+
class: "flex-1",
|
|
223
|
+
inputmode: "decimal",
|
|
224
|
+
"model-value": ((O = o.modelValue) == null ? void 0 : O.every) ?? null,
|
|
225
|
+
"onUpdate:modelValue": i[2] || (i[2] = (c) => u("update:model-value", {
|
|
226
|
+
...o.modelValue,
|
|
227
|
+
every: c
|
|
228
|
+
}))
|
|
229
|
+
}, {
|
|
230
|
+
prepend: y(() => [
|
|
231
|
+
U(f(e(j.Config).getCountry().currency.symbol), 1)
|
|
232
|
+
]),
|
|
233
|
+
_: 1
|
|
234
|
+
}, 8, ["label", "model-value"])
|
|
235
|
+
]))
|
|
236
|
+
];
|
|
237
|
+
}),
|
|
238
|
+
_: 1
|
|
239
|
+
}, 8, ["label", "sublabel"]),
|
|
240
|
+
m(A, {
|
|
241
|
+
label: e(l)("connect.campaign.earningOption.productBought.label"),
|
|
242
|
+
sublabel: e(l)("connect.campaign.earningOption.productBought.sublabel", { configName: e(p) }),
|
|
243
|
+
value: !0,
|
|
244
|
+
disabled: !e(C).isPremium
|
|
245
|
+
}, {
|
|
246
|
+
label: y(() => {
|
|
247
|
+
var r, O;
|
|
248
|
+
return [
|
|
249
|
+
s("div", Fe, [
|
|
250
|
+
U(f(e(l)("connect.campaign.earningOption.productBought.label")) + " ", 1),
|
|
251
|
+
m(M, { variant: "premium" })
|
|
252
|
+
]),
|
|
253
|
+
s("div", he, f(e(l)("connect.campaign.earningOption.productBought.sublabel", { configName: e(p) })), 1),
|
|
254
|
+
e(x) ? (d(), P("div", Ce, [
|
|
255
|
+
s("div", _e, [
|
|
256
|
+
m(ce, {
|
|
257
|
+
"model-value": t.modelValue.property || [],
|
|
258
|
+
onConfirm: i[3] || (i[3] = (c) => u("update:model-value", {
|
|
259
|
+
...o.modelValue,
|
|
260
|
+
property: c
|
|
261
|
+
}))
|
|
262
|
+
}, {
|
|
263
|
+
"side-sheet-button": y(() => {
|
|
264
|
+
var c, L;
|
|
265
|
+
return [
|
|
266
|
+
m(Z, {
|
|
267
|
+
label: (c = t.modelValue.property) != null && c.length ? e(l)("connect.campaign.earningOption.productsSelected", { count: (L = t.modelValue.property) == null ? void 0 : L.length }) : e(l)("connect.campaign.earningOption.selectProduct"),
|
|
268
|
+
icon: "link",
|
|
269
|
+
variant: "secondary"
|
|
270
|
+
}, null, 8, ["label"])
|
|
271
|
+
];
|
|
272
|
+
}),
|
|
273
|
+
_: 1
|
|
274
|
+
}, 8, ["model-value"])
|
|
275
|
+
]),
|
|
276
|
+
s("div", Pe, [
|
|
277
|
+
m(S, {
|
|
278
|
+
inputmode: "decimal",
|
|
279
|
+
label: e(l)("connect.campaign.earningOption.receiveLabel", { configName: e(p) }),
|
|
280
|
+
class: "flex-1",
|
|
281
|
+
"model-value": ((r = o.modelValue) == null ? void 0 : r.amount) ?? null,
|
|
282
|
+
"onUpdate:modelValue": i[4] || (i[4] = (c) => u("update:model-value", {
|
|
283
|
+
...o.modelValue ?? { type: "FIXED" },
|
|
284
|
+
amount: c
|
|
285
|
+
}))
|
|
286
|
+
}, null, 8, ["label", "model-value"]),
|
|
287
|
+
s("div", Ie, f(e(l)("connect.campaign.earningOption.forEvery")), 1),
|
|
288
|
+
m(S, {
|
|
289
|
+
label: e(l)("connect.campaign.earningOption.itemPurchased"),
|
|
290
|
+
class: "flex-1",
|
|
291
|
+
"model-value": ((O = o.modelValue) == null ? void 0 : O.every) ?? null,
|
|
292
|
+
inputmode: "numeric",
|
|
293
|
+
"max-fraction-digits": 0,
|
|
294
|
+
"onUpdate:modelValue": i[5] || (i[5] = (c) => u("update:model-value", {
|
|
295
|
+
...o.modelValue,
|
|
296
|
+
every: c
|
|
297
|
+
}))
|
|
298
|
+
}, null, 8, ["label", "model-value"])
|
|
299
|
+
])
|
|
300
|
+
])) : I("", !0)
|
|
301
|
+
];
|
|
302
|
+
}),
|
|
303
|
+
_: 1
|
|
304
|
+
}, 8, ["label", "sublabel", "disabled"])
|
|
305
|
+
]),
|
|
306
|
+
_: 1
|
|
307
|
+
}, 8, ["model-value"])
|
|
308
|
+
], 64)) : I("", !0)
|
|
309
|
+
]),
|
|
310
|
+
o.errorText || e(n).length > 0 ? (d(), F(z, {
|
|
311
|
+
key: 0,
|
|
312
|
+
class: "!mt-4",
|
|
313
|
+
text: o.errorText || e(V).helperText(e(n), ""),
|
|
314
|
+
state: "error"
|
|
315
|
+
}, null, 8, ["text"])) : I("", !0)
|
|
316
|
+
]);
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
}), Te = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary flex items-center justify-between" }, Ge = /* @__PURE__ */ B({
|
|
320
|
+
__name: "VoucherEditor",
|
|
321
|
+
props: {
|
|
322
|
+
modelValue: {
|
|
323
|
+
type: Object
|
|
324
|
+
},
|
|
325
|
+
rewardImage: {
|
|
326
|
+
type: Object
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
emits: ["update:model-value", "update:reward-image"],
|
|
330
|
+
setup(o, { emit: T }) {
|
|
331
|
+
const { t: C } = G(), t = k(
|
|
332
|
+
o.modelValue ?? re("VOUCHER", {
|
|
333
|
+
business: oe().currentBusiness.value._id,
|
|
334
|
+
name: ""
|
|
335
|
+
})
|
|
336
|
+
), u = Y, v = T;
|
|
337
|
+
return (p, n) => {
|
|
338
|
+
var b, R, E;
|
|
339
|
+
const _ = g("FmTextarea"), x = g("FmHelperText");
|
|
340
|
+
return d(), P(w, null, [
|
|
341
|
+
m(ne, {
|
|
342
|
+
modelValue: e(t).name,
|
|
343
|
+
"onUpdate:modelValue": n[0] || (n[0] = (a) => e(t).name = a),
|
|
344
|
+
label: "Voucher name",
|
|
345
|
+
schema: e(V).typeAtPath(e(u), "name", [e(t).type])
|
|
346
|
+
}, null, 8, ["modelValue", "schema"]),
|
|
347
|
+
m(_, {
|
|
348
|
+
class: "!mb-[-16px]",
|
|
349
|
+
modelValue: e(t).description,
|
|
350
|
+
"onUpdate:modelValue": n[1] || (n[1] = (a) => e(t).description = a),
|
|
351
|
+
rules: [e(V).ruleAtPath(e(u), "description", [e(t).type])]
|
|
352
|
+
}, {
|
|
353
|
+
label: y(() => [
|
|
354
|
+
(d(), F(H(
|
|
355
|
+
e(V).toInputLabel(
|
|
356
|
+
e(V).typeAtPath(e(u), "description", [e(t).type]),
|
|
357
|
+
"Voucher description"
|
|
358
|
+
)
|
|
359
|
+
)))
|
|
360
|
+
]),
|
|
361
|
+
_: 1
|
|
362
|
+
}, 8, ["modelValue", "rules"]),
|
|
363
|
+
s("div", Te, [
|
|
364
|
+
n[6] || (n[6] = s("div", null, "Voucher description should not exceed 200 characters.", -1)),
|
|
365
|
+
s("div", null, f(((b = e(t).description) == null ? void 0 : b.length) ?? 0) + "/200", 1)
|
|
366
|
+
]),
|
|
367
|
+
m(ae, {
|
|
368
|
+
class: "w-1/2 xs:w-2/3",
|
|
369
|
+
"aspect-ratio": "16/9",
|
|
370
|
+
file: o.rewardImage ?? void 0,
|
|
371
|
+
thumbnail: e(t).image ?? void 0,
|
|
372
|
+
"onUpdate:file": n[2] || (n[2] = async (a) => {
|
|
373
|
+
v("update:reward-image", a), a || (e(t).image = null);
|
|
374
|
+
})
|
|
375
|
+
}, {
|
|
376
|
+
label: y(() => [
|
|
377
|
+
(d(), F(H(
|
|
378
|
+
e(V).toInputLabel(
|
|
379
|
+
e(V).typeAtPath(e(u), "image", [e(t).type]),
|
|
380
|
+
"Voucher image"
|
|
381
|
+
)
|
|
382
|
+
)))
|
|
383
|
+
]),
|
|
384
|
+
_: 1
|
|
385
|
+
}, 8, ["file", "thumbnail"]),
|
|
386
|
+
n[7] || (n[7] = s("div", { class: "fm-typo-en-title-sm-800" }, "Discount", -1)),
|
|
387
|
+
m(ie, {
|
|
388
|
+
"model-value": e(t).extras.effect,
|
|
389
|
+
"onUpdate:modelValue": n[3] || (n[3] = (a) => e(t).extras.effect = a)
|
|
390
|
+
}, null, 8, ["model-value"]),
|
|
391
|
+
e(t).extras.effect == null ? (d(), F(x, {
|
|
392
|
+
key: 0,
|
|
393
|
+
class: "!mt-8",
|
|
394
|
+
text: e(C)("connect.campaign.common.effect_required"),
|
|
395
|
+
state: "error"
|
|
396
|
+
}, null, 8, ["text"])) : I("", !0),
|
|
397
|
+
n[8] || (n[8] = s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Usage configuration", -1)),
|
|
398
|
+
m(se, {
|
|
399
|
+
"model-value": e(t).options,
|
|
400
|
+
"no-campaign": e(t).noCampaign,
|
|
401
|
+
"onUpdate:modelValue": n[4] || (n[4] = (a) => e(t).options = a),
|
|
402
|
+
schema: e(V).typeAtPath(e(u), "options", ["VOUCHER"])
|
|
403
|
+
}, null, 8, ["model-value", "no-campaign", "schema"]),
|
|
404
|
+
n[9] || (n[9] = s("div", { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, "Availability", -1)),
|
|
405
|
+
e(t).type === "VOUCHER" ? (d(), F(me, {
|
|
406
|
+
key: 1,
|
|
407
|
+
"model-value": ((E = (R = e(t).extras) == null ? void 0 : R.targetLocation) == null ? void 0 : E.map(String)) ?? null,
|
|
408
|
+
type: "select",
|
|
409
|
+
"onUpdate:modelValue": n[5] || (n[5] = (a) => {
|
|
410
|
+
e(t).extras.targetLocation = a;
|
|
411
|
+
}),
|
|
412
|
+
rules: [e(V).ruleAtPath(e(u), "extras.targetLocation")]
|
|
413
|
+
}, null, 8, ["model-value", "rules"])) : I("", !0)
|
|
414
|
+
], 64);
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
export {
|
|
419
|
+
je as _,
|
|
420
|
+
Ge as a
|
|
421
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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
2
|
import { Z as d } from "./zod-Bg2FbC-D.js";
|
|
3
|
-
import { u as V } from "./vue-i18n-
|
|
3
|
+
import { u as V } from "./vue-i18n-BB1YkgAs.js";
|
|
4
4
|
const B = { class: "fm-typo-en-body-lg-400 flex gap-4 text-fm-color-typo-primary items-center" }, C = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "text-fm-color-typo-tertiary"
|