@feedmepos/mf-connect 0.0.16-beta.1 → 0.0.17-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-CKM1hA08.js +612 -0
- package/dist/{Broadcast-X69Mtv3b.js → Broadcast-DzJRPvz5.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VWLBlxy1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D7J9gl35.js} +8 -8
- package/dist/{Card-D0X3v1UF.js → Card-BowvmBJD.js} +121 -121
- package/dist/{Collections-umR6Ehqf.js → Collections-DHi8bxpj.js} +129 -141
- package/dist/{Credit-C1EWF7R0.js → Credit-DakCAG7z.js} +7 -7
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bz6TSmbW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-B6L77rz7.js} +22 -24
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-AhWnHG02.js → EffectSheet.vue_vue_type_style_index_0_lang-RLmpxA5_.js} +6 -6
- package/dist/{Experience-CqL8wyPm.js → Experience-CnHloEig.js} +7 -7
- package/dist/{Game--kYe64EV.js → Game-D-X4EgC-.js} +7 -7
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BjOJ3XSL.js → ImageInput.vue_vue_type_script_setup_true_lang-DZhanVR2.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DykNOOFD.js → MainLayout-BAyMP_C8.js} +53 -20
- package/dist/{Marketing-CTCQ5ZmZ.js → Marketing-c4QG38L1.js} +25 -25
- package/dist/{Member-DCduX7zP.js → Member-DQBVPHCv.js} +2 -2
- package/dist/MemberList-Ci6LRnrH.js +1718 -0
- package/dist/{MemberTransactions-CTAx5jIV.js → MemberTransactions-CztAzAA6.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-B_hDmE8e.js +203 -0
- package/dist/{Mission-CVr9rS_D.js → Mission-Cj_hi3tv.js} +7 -7
- package/dist/{Point-BnZ6M74y.js → Point-BGDCrLdw.js} +7 -7
- package/dist/{Promotion-B0PUve5S.js → Promotion-BABafzmp.js} +8 -8
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CrpJySSp.js → RuleGroup.vue_vue_type_script_setup_true_lang-C7Tqs2pq.js} +14 -14
- package/dist/{Segment-B-XpkyM5.js → Segment-Bh8bddz_.js} +18 -19
- package/dist/{Setting-Zrj5P_4m.js → Setting-ByrGfBdk.js} +541 -571
- package/dist/Store-6lrxcf8I.js +1442 -0
- package/dist/{StoreRewards-D8410Q_-.js → StoreRewards-C5bJ9hxE.js} +74 -75
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DS4APaHw.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DaboQyfR.js} +79 -82
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DUaTP2_0.js +124 -0
- package/dist/{Tier-DVWJyQ9S.js → Tier-D71DR1ez.js} +68 -71
- package/dist/{Title-B5kX64vs.js → Title-CxAYzUIx.js} +75 -78
- package/dist/{Transaction-CZBO4v4d.js → Transaction-BWRGkDrb.js} +1 -1
- package/dist/{Voucher-se-4JF9B.js → Voucher-BLy2jD1L.js} +37 -37
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +140 -0
- package/dist/{app-B2ImSO3V.js → app-BGUDahHa.js} +1 -1
- package/dist/{app-DkI7dYRN.js → app-roSGTcOh.js} +46 -46
- package/dist/app.js +1 -1
- package/dist/{campaign-BZJuknWK.js → campaign-B7-BUOfP.js} +11 -13
- package/dist/{collection.fn-DoCkZ6z4.js → collection.fn-DHlfGYAC.js} +2 -4
- package/dist/{dto-BWpvRpK2.js → dto-zv3OTrbd.js} +214 -215
- package/dist/{effect-B8kmnKvY.js → effect-DLtYeqVg.js} +1 -1
- package/dist/{export-Dm6LYnWo.js → export-Bm6xBE89.js} +3 -3
- package/dist/{helper-DR4XK3nv.js → helper-BaLvfRCZ.js} +1 -1
- package/dist/{index-DcUrk07Q.js → index-BmgXoYUK.js} +1 -1
- package/dist/{index-CuL5-ORK.js → index-D9Ft2U8O.js} +8 -9
- package/dist/{index-CWf0mh3a.js → index-DIA3Lkck.js} +2 -2
- package/dist/{index-BryrRq8O.js → index-DP2wL3EA.js} +37 -47
- package/dist/{index-CkiYkbXb.js → index-DgAr53Ae.js} +1 -1
- package/dist/{index-yxJMhfxj.js → index-DiC8aGiv.js} +66 -109
- package/dist/{index-boor8e80.js → index-DrA3F2aA.js} +27 -28
- package/dist/{index-BxkxVtgm.js → index-Qr6T_tfL.js} +1 -1
- package/dist/index-SdCqUstr.js +244 -0
- package/dist/{index-Bu4_26qI.js → index-aYwIKfns.js} +1 -1
- package/dist/{loading-BzV5acUX.js → loading-CB6v7hws.js} +4 -4
- package/dist/{lodash-mg4435Qq.js → lodash-DkICSg8W.js} +1 -1
- package/dist/{membership-CqbsLHqx.js → membership-CFVkuT3Z.js} +58 -63
- package/dist/{money-DA_gtp3q.js → money-DMEHb1PR.js} +1 -1
- package/dist/{number-C388eyOu.js → number-RVupiUMd.js} +3 -3
- package/dist/{rule-Clmr5y4j.js → rule-CpU35zT1.js} +2 -2
- package/dist/{rule-builder-BgqNbM-P.js → rule-builder-CrtuA_0Q.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-Dwp7heBA.js → template-DxvJmDC3.js} +6 -6
- package/dist/{usePagination-o5fgsZwU.js → usePagination-FlXHEH_R.js} +1 -1
- package/dist/{xlsx-BRdh9e2p.js → xlsx-BJ7B-X33.js} +309 -309
- package/package.json +2 -2
- package/dist/Analytic-C-zZmF5N.js +0 -760
- package/dist/MainLayout-D0AoA1tk.js +0 -41
- package/dist/MemberList-B0EkXZJu.js +0 -1729
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-C-BtHxSc.js +0 -432
- package/dist/Store-B2gywCt2.js +0 -1503
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-ZYjWlDJ1.js +0 -139
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js +0 -55
- package/dist/index-BobRgQrE.js +0 -291
- package/dist/zod-W_PvIofQ.js +0 -90
|
@@ -1,432 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, shallowRef as R, openBlock as p, createElementBlock as w, normalizeStyle as O, ref as V, resolveComponent as g, createBlock as E, unref as s, isRef as N, withCtx as v, createVNode as h, createElementVNode as x, createCommentVNode as B, withDirectives as D, vShow as A, computed as q, onMounted as J, Fragment as U, createTextVNode as P, toDisplayString as z, renderList as G } from "vue";
|
|
2
|
-
import { p as K } from "./loading-BzV5acUX.js";
|
|
3
|
-
import { r as W } from "./index-BryrRq8O.js";
|
|
4
|
-
import { _ as Z } from "./app-DkI7dYRN.js";
|
|
5
|
-
import { _ as Q, S as X } from "./LottieAnimation.vue_vue_type_script_setup_true_lang-DykNOOFD.js";
|
|
6
|
-
import { c as Y } from "./object-qECH92oz.js";
|
|
7
|
-
const ee = {
|
|
8
|
-
"user.name": {
|
|
9
|
-
name: "User name"
|
|
10
|
-
},
|
|
11
|
-
"user.birthday": {
|
|
12
|
-
name: "Birthday"
|
|
13
|
-
},
|
|
14
|
-
"user.joinAt": {
|
|
15
|
-
name: "Join at"
|
|
16
|
-
},
|
|
17
|
-
"user.expiringVouchers.days7": {
|
|
18
|
-
name: "Expiring vouchers in 7 days"
|
|
19
|
-
},
|
|
20
|
-
"user.expiringVouchers.days30": {
|
|
21
|
-
name: "Expiring vouchers in 30 days"
|
|
22
|
-
},
|
|
23
|
-
"user.expiringVouchers.days90": {
|
|
24
|
-
name: "Expiring vouchers in 90 days"
|
|
25
|
-
},
|
|
26
|
-
"user.tier": {
|
|
27
|
-
name: "User tier"
|
|
28
|
-
},
|
|
29
|
-
"user.point": {
|
|
30
|
-
name: "User experience"
|
|
31
|
-
},
|
|
32
|
-
"transaction.amount": {
|
|
33
|
-
name: "Reward amount"
|
|
34
|
-
},
|
|
35
|
-
"collectible.name": {
|
|
36
|
-
name: "Reward name"
|
|
37
|
-
}
|
|
38
|
-
}, te = "https://editor.unlayer.com/embed.js?2", T = [];
|
|
39
|
-
let H = !1;
|
|
40
|
-
const ne = (e) => {
|
|
41
|
-
const n = document.querySelectorAll("script");
|
|
42
|
-
let a = !1;
|
|
43
|
-
return n.forEach((c) => {
|
|
44
|
-
c.src.includes(e) && (a = !0);
|
|
45
|
-
}), a;
|
|
46
|
-
}, ae = (e) => {
|
|
47
|
-
T.push(e);
|
|
48
|
-
}, L = () => {
|
|
49
|
-
if (H) {
|
|
50
|
-
let e;
|
|
51
|
-
for (; e = T.shift(); )
|
|
52
|
-
e();
|
|
53
|
-
}
|
|
54
|
-
}, ie = (e, n = te) => {
|
|
55
|
-
if (ae(e), ne(n))
|
|
56
|
-
L();
|
|
57
|
-
else {
|
|
58
|
-
const a = document.createElement("script");
|
|
59
|
-
a.setAttribute("src", n), a.onload = () => {
|
|
60
|
-
H = !0, L();
|
|
61
|
-
}, document.head.appendChild(a);
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
let oe = 0;
|
|
65
|
-
const le = M({
|
|
66
|
-
name: "EmailEditor",
|
|
67
|
-
props: {
|
|
68
|
-
editorId: String,
|
|
69
|
-
minHeight: {
|
|
70
|
-
type: String,
|
|
71
|
-
default: "500px"
|
|
72
|
-
},
|
|
73
|
-
options: Object,
|
|
74
|
-
scriptUrl: String,
|
|
75
|
-
/**
|
|
76
|
-
* @Deprecated Props: Use `options.appearance` instead
|
|
77
|
-
*/
|
|
78
|
-
appearance: Object,
|
|
79
|
-
/**
|
|
80
|
-
* @Deprecated Props: Use `options.locale` instead
|
|
81
|
-
*/
|
|
82
|
-
locale: String,
|
|
83
|
-
/**
|
|
84
|
-
* @Deprecated Props: Use `options.projectId` instead
|
|
85
|
-
*/
|
|
86
|
-
projectId: Number,
|
|
87
|
-
/**
|
|
88
|
-
* @Deprecated Props: Use `options.tools` instead
|
|
89
|
-
*/
|
|
90
|
-
tools: Object
|
|
91
|
-
},
|
|
92
|
-
computed: {
|
|
93
|
-
id() {
|
|
94
|
-
return this.editorId || `editor-${++oe}`;
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
setup() {
|
|
98
|
-
return {
|
|
99
|
-
editor: R(null)
|
|
100
|
-
// Makes editor available to the template
|
|
101
|
-
};
|
|
102
|
-
},
|
|
103
|
-
mounted() {
|
|
104
|
-
this.$emit("load"), ie(this.loadEditor.bind(this), this.scriptUrl);
|
|
105
|
-
},
|
|
106
|
-
methods: {
|
|
107
|
-
loadEditor() {
|
|
108
|
-
const e = this.options || {};
|
|
109
|
-
this.appearance && (e.appearance = this.appearance), this.locale && (e.locale = this.locale), this.projectId && (e.projectId = this.projectId), this.tools && (e.tools = this.tools), this.editor = unlayer.createEditor({
|
|
110
|
-
...e,
|
|
111
|
-
id: this.id
|
|
112
|
-
}), this.editor.addEventListener("editor:ready", () => {
|
|
113
|
-
this.$emit("ready");
|
|
114
|
-
});
|
|
115
|
-
},
|
|
116
|
-
/**
|
|
117
|
-
* @deprecated This method will be removed in the next major release. Use `editor.exportHtml` instead.
|
|
118
|
-
*/
|
|
119
|
-
exportHtml(e) {
|
|
120
|
-
var n;
|
|
121
|
-
(n = this.editor) == null || n.exportHtml(e);
|
|
122
|
-
},
|
|
123
|
-
/**
|
|
124
|
-
* @deprecated This method will be removed in the next major release. Use `editor.loadDesign` instead.
|
|
125
|
-
*/
|
|
126
|
-
loadDesign(e) {
|
|
127
|
-
var n;
|
|
128
|
-
(n = this.editor) == null || n.loadDesign(e);
|
|
129
|
-
},
|
|
130
|
-
/**
|
|
131
|
-
* @deprecated This method will be removed in the next major release. Use `editor.saveDesign` instead.
|
|
132
|
-
*/
|
|
133
|
-
saveDesign(e) {
|
|
134
|
-
var n;
|
|
135
|
-
(n = this.editor) == null || n.saveDesign(e);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}), se = ["id"];
|
|
139
|
-
function re(e, n, a, c, y, r) {
|
|
140
|
-
return p(), w("div", {
|
|
141
|
-
id: e.id,
|
|
142
|
-
class: "unlayer-editor",
|
|
143
|
-
style: O({ minHeight: e.minHeight })
|
|
144
|
-
}, null, 12, se);
|
|
145
|
-
}
|
|
146
|
-
const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94"]]), ce = { class: "h-full flex flex-col" }, ue = { class: "flex items-center gap-8" }, me = /* @__PURE__ */ M({
|
|
147
|
-
__name: "EmailEditorSheet",
|
|
148
|
-
props: {
|
|
149
|
-
design: {
|
|
150
|
-
type: Object,
|
|
151
|
-
required: !1
|
|
152
|
-
},
|
|
153
|
-
title: {
|
|
154
|
-
type: String,
|
|
155
|
-
required: !1
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
emits: ["update:design"],
|
|
159
|
-
setup(e, { expose: n, emit: a }) {
|
|
160
|
-
const c = V(!1), y = V(null), r = V(!1), b = e, f = V({
|
|
161
|
-
html: "",
|
|
162
|
-
design: b.design,
|
|
163
|
-
title: b.title || ""
|
|
164
|
-
});
|
|
165
|
-
function o(l) {
|
|
166
|
-
c.value = l;
|
|
167
|
-
}
|
|
168
|
-
const t = a;
|
|
169
|
-
function m() {
|
|
170
|
-
y.value && (y.value.exportHtml((l) => {
|
|
171
|
-
f.value = {
|
|
172
|
-
html: l.html,
|
|
173
|
-
design: l.design,
|
|
174
|
-
title: f.value.title
|
|
175
|
-
}, t("update:design", f.value);
|
|
176
|
-
}), o(!1));
|
|
177
|
-
}
|
|
178
|
-
return n({
|
|
179
|
-
showSheet: o
|
|
180
|
-
}), (l, i) => {
|
|
181
|
-
const S = g("FmButton"), j = g("FmTextField"), _ = g("FmSideSheet");
|
|
182
|
-
return p(), E(_, {
|
|
183
|
-
modelValue: s(c),
|
|
184
|
-
"onUpdate:modelValue": i[4] || (i[4] = (d) => N(c) ? c.value = d : null),
|
|
185
|
-
header: "Email editor",
|
|
186
|
-
"max-width": 1280
|
|
187
|
-
}, {
|
|
188
|
-
"side-sheet-button": v(() => [
|
|
189
|
-
h(S, {
|
|
190
|
-
label: "Edit email",
|
|
191
|
-
variant: "tertiary",
|
|
192
|
-
icon: "edit"
|
|
193
|
-
})
|
|
194
|
-
]),
|
|
195
|
-
default: v(() => [
|
|
196
|
-
x("div", ce, [
|
|
197
|
-
s(r) ? B("", !0) : (p(), E(Q, {
|
|
198
|
-
key: 0,
|
|
199
|
-
class: "flex-1",
|
|
200
|
-
json: s(X),
|
|
201
|
-
width: 100,
|
|
202
|
-
height: 100
|
|
203
|
-
}, null, 8, ["json"])),
|
|
204
|
-
D(h(j, {
|
|
205
|
-
label: "Email title",
|
|
206
|
-
modelValue: s(f).title,
|
|
207
|
-
"onUpdate:modelValue": i[0] || (i[0] = (d) => s(f).title = d)
|
|
208
|
-
}, null, 8, ["modelValue"]), [
|
|
209
|
-
[A, s(r)]
|
|
210
|
-
]),
|
|
211
|
-
D(h(de, {
|
|
212
|
-
class: "flex-1",
|
|
213
|
-
ref_key: "editorRef",
|
|
214
|
-
ref: y,
|
|
215
|
-
onLoad: i[1] || (i[1] = (d) => r.value = !1),
|
|
216
|
-
onReady: i[2] || (i[2] = () => {
|
|
217
|
-
var d;
|
|
218
|
-
r.value = !0, b.design && ((d = s(y)) == null || d.loadDesign(s(Y)(b.design)));
|
|
219
|
-
})
|
|
220
|
-
}, null, 512), [
|
|
221
|
-
[A, s(r)]
|
|
222
|
-
])
|
|
223
|
-
])
|
|
224
|
-
]),
|
|
225
|
-
"side-sheet-footer": v(() => [
|
|
226
|
-
x("div", ue, [
|
|
227
|
-
h(S, {
|
|
228
|
-
variant: "primary",
|
|
229
|
-
label: "Confirm",
|
|
230
|
-
onClick: m
|
|
231
|
-
}),
|
|
232
|
-
h(S, {
|
|
233
|
-
variant: "tertiary",
|
|
234
|
-
label: "Cancel",
|
|
235
|
-
onClick: i[3] || (i[3] = (d) => o(!1))
|
|
236
|
-
})
|
|
237
|
-
])
|
|
238
|
-
]),
|
|
239
|
-
_: 1
|
|
240
|
-
}, 8, ["modelValue"]);
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
}), pe = { class: "space-y-4" }, he = { class: "flex items-center gap-8 justify-between" }, fe = /* @__PURE__ */ x("div", { class: "fm-typo-en-body-lg-400" }, "Add message", -1), ge = { class: "relative" }, ye = { class: "absolute bottom-[24px] right-[4px]" }, we = /* @__PURE__ */ M({
|
|
244
|
-
__name: "MessageInput",
|
|
245
|
-
props: {
|
|
246
|
-
allowEmail: {
|
|
247
|
-
type: Boolean,
|
|
248
|
-
default: !1
|
|
249
|
-
},
|
|
250
|
-
modelValue: {
|
|
251
|
-
type: Object
|
|
252
|
-
},
|
|
253
|
-
triggerType: {
|
|
254
|
-
type: String,
|
|
255
|
-
default: () => "SCHEDULE"
|
|
256
|
-
},
|
|
257
|
-
helperText: {
|
|
258
|
-
type: String
|
|
259
|
-
},
|
|
260
|
-
helperState: {
|
|
261
|
-
type: String
|
|
262
|
-
},
|
|
263
|
-
variables: {
|
|
264
|
-
type: Object,
|
|
265
|
-
default: () => [
|
|
266
|
-
"user.name",
|
|
267
|
-
"user.birthday",
|
|
268
|
-
"user.joinAt",
|
|
269
|
-
"user.expiringVouchers.days7",
|
|
270
|
-
"user.expiringVouchers.days30",
|
|
271
|
-
"user.expiringVouchers.days90",
|
|
272
|
-
"user.tier",
|
|
273
|
-
"user.point",
|
|
274
|
-
"transaction.amount",
|
|
275
|
-
"collectible.name"
|
|
276
|
-
]
|
|
277
|
-
},
|
|
278
|
-
placeholder: {
|
|
279
|
-
type: String
|
|
280
|
-
}
|
|
281
|
-
},
|
|
282
|
-
emits: ["update:model-value"],
|
|
283
|
-
setup(e, { emit: n }) {
|
|
284
|
-
const a = e, c = n;
|
|
285
|
-
function y() {
|
|
286
|
-
var m;
|
|
287
|
-
const o = {
|
|
288
|
-
user: {
|
|
289
|
-
name: "John Doe",
|
|
290
|
-
tier: 1,
|
|
291
|
-
point: 1283,
|
|
292
|
-
birthday: (/* @__PURE__ */ new Date("2000-10-02T16:00:00.000Z")).toLocaleDateString(),
|
|
293
|
-
joinAt: (/* @__PURE__ */ new Date("2024-06-14")).toLocaleDateString(),
|
|
294
|
-
expiringVouchers: { days7: 3, days30: 5, days90: 5 }
|
|
295
|
-
},
|
|
296
|
-
transaction: {
|
|
297
|
-
amount: 3
|
|
298
|
-
},
|
|
299
|
-
collectible: {
|
|
300
|
-
name: "RM10 Voucher"
|
|
301
|
-
}
|
|
302
|
-
}, t = W(
|
|
303
|
-
((m = a.modelValue) == null ? void 0 : m.content) ?? "",
|
|
304
|
-
o
|
|
305
|
-
);
|
|
306
|
-
K.confirm(t, "Preview message", "OK");
|
|
307
|
-
}
|
|
308
|
-
function r(o, t = "SMS") {
|
|
309
|
-
c("update:model-value", {
|
|
310
|
-
channel: t,
|
|
311
|
-
content: t == "SMS" ? o : o.html,
|
|
312
|
-
design: t == "EMAIL" ? o.design : void 0,
|
|
313
|
-
language: "en",
|
|
314
|
-
title: t == "EMAIL" ? o.title : void 0,
|
|
315
|
-
variables: a.variables
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
const b = V(a.helperState || "none"), f = q(() => {
|
|
319
|
-
var m;
|
|
320
|
-
const o = ((m = a.modelValue) == null ? void 0 : m.content.replace(/{{([^}]+)}}/g, (l, i) => {
|
|
321
|
-
switch (i) {
|
|
322
|
-
case "user.name":
|
|
323
|
-
return "1234567890";
|
|
324
|
-
case "user.tier":
|
|
325
|
-
return "1";
|
|
326
|
-
case "user.point":
|
|
327
|
-
return "1000";
|
|
328
|
-
case "user.birthday":
|
|
329
|
-
return "01/01/2024";
|
|
330
|
-
case "user.joinAt":
|
|
331
|
-
return "01/01/2024";
|
|
332
|
-
case "user.expiringVouchers.days7":
|
|
333
|
-
case "user.expiringVouchers.days30":
|
|
334
|
-
case "user.expiringVouchers.days90":
|
|
335
|
-
return "5";
|
|
336
|
-
case "transaction.amount":
|
|
337
|
-
return "100";
|
|
338
|
-
case "collectible.name":
|
|
339
|
-
return "Voucher";
|
|
340
|
-
default:
|
|
341
|
-
return "...";
|
|
342
|
-
}
|
|
343
|
-
})) || "";
|
|
344
|
-
let t = 0;
|
|
345
|
-
for (let l = 0; l < o.length; l++) {
|
|
346
|
-
const i = o.charAt(l);
|
|
347
|
-
/[\u4e00-\u9fff\u3040-\u30ff\u3400-\u4dbf]/.test(i) || /[{}\\~\[\]|\^€]/.test(i) ? t += 2 : t += 1;
|
|
348
|
-
}
|
|
349
|
-
return `Character used: ${t} ≈ ${Math.ceil(t / 160)} SMS (Every 160 characters will be sent as 1 SMS)`;
|
|
350
|
-
});
|
|
351
|
-
return J(() => {
|
|
352
|
-
c("update:model-value", {
|
|
353
|
-
...a.modelValue,
|
|
354
|
-
variables: a.variables
|
|
355
|
-
}), a.modelValue || r("");
|
|
356
|
-
}), (o, t) => {
|
|
357
|
-
var _, d, F, $, k;
|
|
358
|
-
const m = g("FmButtonGroup"), l = g("FmButton"), i = g("FmTextarea"), S = g("FmMenuItem"), j = g("FmMenu");
|
|
359
|
-
return p(), w("div", pe, [
|
|
360
|
-
e.allowEmail ? (p(), E(m, {
|
|
361
|
-
key: 0,
|
|
362
|
-
items: [{ label: "SMS" }, { label: "EMAIL" }],
|
|
363
|
-
"model-value": { label: (_ = e.modelValue) == null ? void 0 : _.channel },
|
|
364
|
-
"onUpdate:modelValue": t[0] || (t[0] = (u) => r("", u.label))
|
|
365
|
-
}, null, 8, ["model-value"])) : B("", !0),
|
|
366
|
-
((d = e.modelValue) == null ? void 0 : d.channel) == "EMAIL" ? (p(), E(me, {
|
|
367
|
-
key: 1,
|
|
368
|
-
design: (F = e.modelValue) == null ? void 0 : F.design,
|
|
369
|
-
title: (($ = e.modelValue) == null ? void 0 : $.title) || void 0,
|
|
370
|
-
"onUpdate:design": t[1] || (t[1] = (u) => {
|
|
371
|
-
r(u, "EMAIL");
|
|
372
|
-
})
|
|
373
|
-
}, null, 8, ["design", "title"])) : (p(), w(U, { key: 2 }, [
|
|
374
|
-
x("div", he, [
|
|
375
|
-
fe,
|
|
376
|
-
h(l, {
|
|
377
|
-
icon: "visibility",
|
|
378
|
-
label: "Preview message",
|
|
379
|
-
variant: "plain",
|
|
380
|
-
onClick: y
|
|
381
|
-
})
|
|
382
|
-
]),
|
|
383
|
-
x("div", ge, [
|
|
384
|
-
h(i, {
|
|
385
|
-
"model-value": (k = e.modelValue) == null ? void 0 : k.content,
|
|
386
|
-
"onUpdate:modelValue": r,
|
|
387
|
-
"show-word-count": !0,
|
|
388
|
-
placeholder: e.placeholder,
|
|
389
|
-
"helper-state": s(b) || "none",
|
|
390
|
-
"helper-text": s(f)
|
|
391
|
-
}, {
|
|
392
|
-
"helper-text": v(() => [
|
|
393
|
-
P(z(s(f)), 1)
|
|
394
|
-
]),
|
|
395
|
-
_: 1
|
|
396
|
-
}, 8, ["model-value", "placeholder", "helper-state", "helper-text"]),
|
|
397
|
-
x("div", ye, [
|
|
398
|
-
h(j, { placement: "left-end" }, {
|
|
399
|
-
"menu-button": v(() => [
|
|
400
|
-
h(l, {
|
|
401
|
-
icon: "add",
|
|
402
|
-
variant: "tertiary",
|
|
403
|
-
size: "md"
|
|
404
|
-
})
|
|
405
|
-
]),
|
|
406
|
-
default: v(() => [
|
|
407
|
-
(p(!0), w(U, null, G(e.variables.filter(
|
|
408
|
-
(u) => e.triggerType == "SCHEDULE" ? !u.startsWith("transaction.") : !0
|
|
409
|
-
), (u) => {
|
|
410
|
-
var C;
|
|
411
|
-
return p(), E(S, {
|
|
412
|
-
key: u,
|
|
413
|
-
label: ((C = s(ee)[u]) == null ? void 0 : C.name) || u,
|
|
414
|
-
onClick: (be) => {
|
|
415
|
-
var I;
|
|
416
|
-
return r(((I = e.modelValue) == null ? void 0 : I.content) + `{{${u}}}`);
|
|
417
|
-
}
|
|
418
|
-
}, null, 8, ["label", "onClick"]);
|
|
419
|
-
}), 128))
|
|
420
|
-
]),
|
|
421
|
-
_: 1
|
|
422
|
-
})
|
|
423
|
-
])
|
|
424
|
-
])
|
|
425
|
-
], 64))
|
|
426
|
-
]);
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
});
|
|
430
|
-
export {
|
|
431
|
-
we as _
|
|
432
|
-
};
|