@feedmepos/mf-connect 0.1.0-beta.7 → 0.1.0-beta.70
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-DEQUEGlq.js +427 -0
- package/dist/{App-DalxIjTu.js → App-CcoU2SAx.js} +445 -420
- package/dist/AuditLogs-CiB6u06w.js +1886 -0
- package/dist/Bin-C2_1m5RT.js +166 -0
- package/dist/{Broadcast-uMAvsC--.js → Broadcast-TotIXDuJ.js} +56 -54
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-JxbENan8.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CixQu3Pr.js} +6 -8
- package/dist/Card-Ce-_xMgS.js +896 -0
- package/dist/Collections-DKva6Doi.js +459 -0
- package/dist/{Credit-QlnatflM.js → Credit-BVUxIJ6C.js} +36 -34
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BKEumoan.js +2181 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BE07lc4M.js → EffectSheet.vue_vue_type_style_index_0_lang-ah4bz-qR.js} +49 -49
- package/dist/{Experience-Czy41ifp.js → Experience-DV3384o0.js} +32 -30
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
- package/dist/Game-DY83ti52.js +278 -0
- package/dist/Index-DEIaZ-2H.js +259 -0
- package/dist/Marketing-C2RwIlrg.js +20071 -0
- package/dist/Member-D4fc-wzd.js +333 -0
- package/dist/MemberList-DSMI6t_D.js +1598 -0
- package/dist/MemberTransactions-wXUlbbRq.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CtM73bcN.js → MessageInput.vue_vue_type_script_setup_true_lang-DYS0klKm.js} +135 -120
- package/dist/Mission-P_KLDEpg.js +296 -0
- package/dist/Overview-8vc0f1D7.js +1078 -0
- package/dist/{Point-By6ogYy_.js → Point-B4Y0Pq60.js} +55 -53
- package/dist/{Promotion-DKcBr-RI.js → Promotion-C1CbesgZ.js} +65 -57
- package/dist/Queue-BlPA7PNH.js +244 -0
- package/dist/Record-Cl1qXSSk.js +340 -0
- package/dist/Reward-jy6-W1Eh.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-d5JNNNHf.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DYul_Nu8.js +1640 -0
- package/dist/Segment-B36Nrvxs.js +568 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-jN0xUFNR.js +181 -0
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLFTNooB.js +186 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-H_Sehhgf.js +147 -0
- package/dist/Setting-AgQf2X4W.js +1931 -0
- package/dist/Store-D3Mm0pan.js +1841 -0
- package/dist/StoreRewards-L0VLWz8l.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Zl_cXXSD.js +1028 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-nEdCD6la.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-b4mfueTj.js} +1 -1
- package/dist/{Tier-DvAs0-yx.js → Tier-DQq-375x.js} +327 -318
- package/dist/{Title-B_Trr39o.js → Title-OJxuBvaa.js} +224 -209
- package/dist/{Transaction-DCJw-b3H.js → Transaction-vgsYRfD7.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Cwi0mvC3.js +130 -0
- package/dist/Voucher-BFwLaoxe.js +354 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DNUBaNtJ.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXkhu8e9.js → ZodTextField.vue_vue_type_script_setup_true_lang-ms40eptZ.js} +1 -1
- package/dist/app-BQFTJ_hE.js +33357 -0
- package/dist/app-D7C3Fxfi.js +7077 -0
- package/dist/app.js +1 -1
- package/dist/{business-BC4-i1cU.js → business-vzpvmTdG.js} +1 -1
- package/dist/{campaign--0_yMbMV.js → campaign-BkxTDfsK.js} +2 -2
- package/dist/campaign-UQ8kMVeC.js +1810 -0
- package/dist/campaign.enum-BdT-e9h9.js +20 -0
- package/dist/campaign.fn-lc4ZhFCU.js +758 -0
- package/dist/collectible.enum-C8kd17Tz.js +19 -0
- package/dist/{collection.fn-3TwPe7aF.js → collection.fn-BIw1Y_tv.js} +2 -2
- package/dist/dto-CwzAhB8x.js +214 -0
- package/dist/{effect-BeR0LK61.js → effect-CJcvLlKG.js} +33 -16
- package/dist/email-addresses-BCJTQPT0.js +705 -0
- package/dist/{export-xeLLhqvh.js → export-URRwle1z.js} +5 -5
- package/dist/{helper-B5iqfKh8.js → helper-DccnE6zn.js} +1 -1
- package/dist/index-BiIZ7X6d.js +29556 -0
- package/dist/{index-CyKZ-SsN.js → index-BsRJ4kVb.js} +1 -1
- package/dist/{index-CU_d8jjU.js → index-C3lpXz_P.js} +1 -1
- package/dist/{index-Ct_wR519.js → index-CFA3EqId.js} +24 -21
- package/dist/{index-DP-dGMJC.js → index-CPRN3irj.js} +2230 -871
- package/dist/index-CaxFS90M.js +56 -0
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/index-D4MX9e5q.js +115 -0
- package/dist/index-DrE9VkxR.js +32 -0
- package/dist/index-EOPRlB9V.js +54 -0
- package/dist/{index-CAn5heDe.js → index-FcxOGFKj.js} +48 -4
- package/dist/{index-Bh-uaaBG.js → index-OScGm4mF.js} +1506 -1480
- package/dist/{index-BOdtpNkP.js → index-ghSGvG-m.js} +266 -173
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/{index.esm2017-5jeDA5Zo.js → index.esm2017-CE1CQHrP.js} +121 -121
- package/dist/loading-B8zghYbj.js +71 -0
- package/dist/{membership-D0nqqWNZ.js → membership-DoJMF2T6.js} +54 -46
- package/dist/money-CTR0rXZw.js +15 -0
- package/dist/number-Bhgz9eFP.js +12 -0
- package/dist/objectid-DdVJrRBw.js +145 -0
- package/dist/{loading-C-JDVajU.js → plugins-B5mQ7CHT.js} +3871 -3943
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-DicsEEHe.js +36 -0
- package/dist/{rule-builder-BXt29Es4.js → rule-builder-BWb4JTrd.js} +1 -1
- package/dist/{rule-Dn_GgBCe.js → rule-s8siRar1.js} +185 -178
- package/dist/style.css +1 -1
- package/dist/{template-D2Oi3dxP.js → template-Qb5ozfLa.js} +5 -5
- package/dist/trigger-Bsb3Kj35.js +144 -0
- package/dist/user-DJ8aHRaM.js +54 -0
- package/dist/{vue-i18n-Dud8fvmw.js → vue-i18n-BG2U7GtN.js} +282 -282
- package/dist/{xlsx-CCRCidY2.js → xlsx-2QxyDFwt.js} +1 -1
- package/package.json +11 -7
- package/dist/Analytic-BMpS6jWb.js +0 -622
- package/dist/Card-DV8-g69L.js +0 -825
- package/dist/Collections-DRafEHT1.js +0 -453
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-TDoMehSB.js +0 -2813
- package/dist/Game-CD3zSitz.js +0 -255
- package/dist/Marketing-NNes8z6Q.js +0 -316
- package/dist/Member-CTqBgYuV.js +0 -69
- package/dist/MemberList-B99tS5ce.js +0 -1733
- package/dist/MemberTransactions-D1YCXPOg.js +0 -38
- package/dist/Mission-XbBVKBiE.js +0 -261
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-D1ESqEFO.js +0 -1753
- package/dist/Segment-B8cszL-F.js +0 -437
- package/dist/Setting-aZYABlMW.js +0 -1901
- package/dist/Store-Bx2tyJwe.js +0 -1511
- package/dist/StoreRewards-DTp9G6gw.js +0 -401
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B2W7ly5Z.js +0 -890
- package/dist/Voucher-jqv3ji90.js +0 -490
- package/dist/app-WlcUVbFb.js +0 -5764
- package/dist/app-_w0hjM7u.js +0 -53428
- package/dist/dto-Ns2dLn1B.js +0 -2770
- package/dist/index-BWb9vRCi.js +0 -29193
- package/dist/index-CpU9aqyW.js +0 -206
- package/dist/index-CqO_ZvtD.js +0 -99
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DsNsA2uX.js +0 -298
- package/dist/index-WAMr3npT.js +0 -762
- package/dist/money-hdbrblud.js +0 -15
- package/dist/number-CRWGOZaW.js +0 -12
- package/dist/user-Bm4KttFq.js +0 -37
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineComponent as d, ref as p, resolveComponent as _, openBlock as a, createElementBlock as f, createVNode as v, unref as o, createBlock as u, createCommentVNode as b } from "vue";
|
|
2
|
+
import { _ as k, a as x } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-Zl_cXXSD.js";
|
|
3
|
+
import { useRouter as y } from "vue-router";
|
|
4
|
+
const C = { class: "flex flex-col gap-y-32 pb-24" }, F = /* @__PURE__ */ d({
|
|
5
|
+
__name: "MemberTransactions",
|
|
6
|
+
setup(T) {
|
|
7
|
+
const r = y(), t = [
|
|
8
|
+
{
|
|
9
|
+
label: "Collection",
|
|
10
|
+
value: "collection"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: "Store",
|
|
14
|
+
value: "store"
|
|
15
|
+
}
|
|
16
|
+
], l = p(
|
|
17
|
+
t.find(
|
|
18
|
+
(s) => {
|
|
19
|
+
var e;
|
|
20
|
+
return s.value == ((e = r.currentRoute.value.query) == null ? void 0 : e.tab);
|
|
21
|
+
}
|
|
22
|
+
) || t[0]
|
|
23
|
+
), n = r.currentRoute.value.params.id;
|
|
24
|
+
return (s, e) => {
|
|
25
|
+
const c = _("FmTabs");
|
|
26
|
+
return a(), f("div", C, [
|
|
27
|
+
v(c, {
|
|
28
|
+
"model-value": o(l).value,
|
|
29
|
+
items: t,
|
|
30
|
+
"onUpdate:modelValue": e[0] || (e[0] = (m) => l.value = t.find((i) => i.value === m))
|
|
31
|
+
}, null, 8, ["model-value"]),
|
|
32
|
+
o(l).value == "collection" ? (a(), u(k, {
|
|
33
|
+
key: 0,
|
|
34
|
+
user: o(n)
|
|
35
|
+
}, null, 8, ["user"])) : o(l).value == "store" ? (a(), u(x, {
|
|
36
|
+
key: 1,
|
|
37
|
+
user: o(n)
|
|
38
|
+
}, null, 8, ["user"])) : b("", !0)
|
|
39
|
+
]);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
F as default
|
|
45
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { p as
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as j, shallowRef as N, openBlock as p, createElementBlock as w, normalizeStyle as O, ref as V, resolveComponent as g, createBlock as E, unref as s, isRef as P, withCtx as x, createVNode as h, createElementVNode as v, createCommentVNode as T, withDirectives as U, vShow as A, computed as q, onMounted as G, Fragment as L, createTextVNode as J, toDisplayString as z, renderList as K } from "vue";
|
|
2
|
+
import { p as W } from "./plugins-B5mQ7CHT.js";
|
|
3
|
+
import { A as Y } from "./index-CPRN3irj.js";
|
|
4
4
|
import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
import { _ as Q, S as X } from "./LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js";
|
|
6
|
-
import { c as
|
|
7
|
-
const
|
|
6
|
+
import { c as ee } from "./object-qECH92oz.js";
|
|
7
|
+
const te = {
|
|
8
8
|
"user.name": {
|
|
9
9
|
name: "User name"
|
|
10
10
|
},
|
|
@@ -29,40 +29,51 @@ const ee = {
|
|
|
29
29
|
"user.point": {
|
|
30
30
|
name: "User experience"
|
|
31
31
|
},
|
|
32
|
+
"user.gender": {
|
|
33
|
+
name: "Gender"
|
|
34
|
+
},
|
|
35
|
+
"user.phoneNumber": {
|
|
36
|
+
name: "Phone Number"
|
|
37
|
+
},
|
|
32
38
|
"transaction.amount": {
|
|
33
39
|
name: "Reward amount"
|
|
34
40
|
},
|
|
35
41
|
"collectible.name": {
|
|
36
42
|
name: "Reward name"
|
|
43
|
+
},
|
|
44
|
+
"membership.url": {
|
|
45
|
+
name: "Membership URL"
|
|
37
46
|
}
|
|
38
|
-
},
|
|
47
|
+
}, Me = {
|
|
48
|
+
MY: ["user.phoneNumber", "membership.url"]
|
|
49
|
+
}, ne = "https://editor.unlayer.com/embed.js?2", R = [];
|
|
39
50
|
let H = !1;
|
|
40
|
-
const
|
|
51
|
+
const ae = (e) => {
|
|
41
52
|
const n = document.querySelectorAll("script");
|
|
42
|
-
let
|
|
53
|
+
let i = !1;
|
|
43
54
|
return n.forEach((u) => {
|
|
44
|
-
u.src.includes(e) && (
|
|
45
|
-
}),
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
},
|
|
55
|
+
u.src.includes(e) && (i = !0);
|
|
56
|
+
}), i;
|
|
57
|
+
}, ie = (e) => {
|
|
58
|
+
R.push(e);
|
|
59
|
+
}, B = () => {
|
|
49
60
|
if (H) {
|
|
50
61
|
let e;
|
|
51
|
-
for (; e =
|
|
62
|
+
for (; e = R.shift(); )
|
|
52
63
|
e();
|
|
53
64
|
}
|
|
54
|
-
},
|
|
55
|
-
if (
|
|
56
|
-
|
|
65
|
+
}, oe = (e, n = ne) => {
|
|
66
|
+
if (ie(e), ae(n))
|
|
67
|
+
B();
|
|
57
68
|
else {
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
H = !0,
|
|
61
|
-
}, document.head.appendChild(
|
|
69
|
+
const i = document.createElement("script");
|
|
70
|
+
i.setAttribute("src", n), i.onload = () => {
|
|
71
|
+
H = !0, B();
|
|
72
|
+
}, document.head.appendChild(i);
|
|
62
73
|
}
|
|
63
74
|
};
|
|
64
|
-
let
|
|
65
|
-
const
|
|
75
|
+
let se = 0;
|
|
76
|
+
const re = j({
|
|
66
77
|
name: "EmailEditor",
|
|
67
78
|
props: {
|
|
68
79
|
editorId: String,
|
|
@@ -91,17 +102,17 @@ const le = M({
|
|
|
91
102
|
},
|
|
92
103
|
computed: {
|
|
93
104
|
id() {
|
|
94
|
-
return this.editorId || `editor-${++
|
|
105
|
+
return this.editorId || `editor-${++se}`;
|
|
95
106
|
}
|
|
96
107
|
},
|
|
97
108
|
setup() {
|
|
98
109
|
return {
|
|
99
|
-
editor:
|
|
110
|
+
editor: N(null)
|
|
100
111
|
// Makes editor available to the template
|
|
101
112
|
};
|
|
102
113
|
},
|
|
103
114
|
mounted() {
|
|
104
|
-
this.$emit("load"),
|
|
115
|
+
this.$emit("load"), oe(this.loadEditor.bind(this), this.scriptUrl);
|
|
105
116
|
},
|
|
106
117
|
methods: {
|
|
107
118
|
loadEditor() {
|
|
@@ -135,15 +146,15 @@ const le = M({
|
|
|
135
146
|
(n = this.editor) == null || n.saveDesign(e);
|
|
136
147
|
}
|
|
137
148
|
}
|
|
138
|
-
}),
|
|
139
|
-
function
|
|
140
|
-
return p(),
|
|
149
|
+
}), le = ["id"];
|
|
150
|
+
function de(e, n, i, u, y, r) {
|
|
151
|
+
return p(), w("div", {
|
|
141
152
|
id: e.id,
|
|
142
153
|
class: "unlayer-editor",
|
|
143
154
|
style: O({ minHeight: e.minHeight })
|
|
144
|
-
}, null, 12,
|
|
155
|
+
}, null, 12, le);
|
|
145
156
|
}
|
|
146
|
-
const
|
|
157
|
+
const ue = /* @__PURE__ */ Z(re, [["render", de], ["__scopeId", "data-v-a9a2bb94"]]), ce = { class: "h-full flex flex-col" }, me = { class: "flex items-center gap-8" }, pe = /* @__PURE__ */ j({
|
|
147
158
|
__name: "EmailEditorSheet",
|
|
148
159
|
props: {
|
|
149
160
|
design: {
|
|
@@ -156,66 +167,66 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
156
167
|
}
|
|
157
168
|
},
|
|
158
169
|
emits: ["update:design"],
|
|
159
|
-
setup(e, { expose: n, emit:
|
|
170
|
+
setup(e, { expose: n, emit: i }) {
|
|
160
171
|
const u = V(!1), y = V(null), r = V(!1), b = e, f = V({
|
|
161
172
|
html: "",
|
|
162
173
|
design: b.design,
|
|
163
174
|
title: b.title || ""
|
|
164
175
|
});
|
|
165
|
-
function o
|
|
166
|
-
u.value =
|
|
176
|
+
function S(o) {
|
|
177
|
+
u.value = o;
|
|
167
178
|
}
|
|
168
|
-
const
|
|
169
|
-
function
|
|
170
|
-
y.value && (y.value.exportHtml((
|
|
179
|
+
const l = i;
|
|
180
|
+
function t() {
|
|
181
|
+
y.value && (y.value.exportHtml((o) => {
|
|
171
182
|
f.value = {
|
|
172
|
-
html:
|
|
173
|
-
design:
|
|
183
|
+
html: o.html,
|
|
184
|
+
design: o.design,
|
|
174
185
|
title: f.value.title
|
|
175
|
-
},
|
|
176
|
-
}),
|
|
186
|
+
}, l("update:design", f.value);
|
|
187
|
+
}), S(!1));
|
|
177
188
|
}
|
|
178
189
|
return n({
|
|
179
|
-
showSheet:
|
|
180
|
-
}), (
|
|
181
|
-
const
|
|
182
|
-
return p(), E(
|
|
190
|
+
showSheet: S
|
|
191
|
+
}), (o, a) => {
|
|
192
|
+
const c = g("FmButton"), M = g("FmTextField"), _ = g("FmSideSheet");
|
|
193
|
+
return p(), E(_, {
|
|
183
194
|
modelValue: s(u),
|
|
184
|
-
"onUpdate:modelValue":
|
|
195
|
+
"onUpdate:modelValue": a[4] || (a[4] = (d) => P(u) ? u.value = d : null),
|
|
185
196
|
header: "Email editor",
|
|
186
197
|
"max-width": 1280
|
|
187
198
|
}, {
|
|
188
199
|
"side-sheet-button": x(() => [
|
|
189
|
-
h(
|
|
200
|
+
h(c, {
|
|
190
201
|
label: "Edit email",
|
|
191
202
|
variant: "tertiary",
|
|
192
203
|
icon: "edit"
|
|
193
204
|
})
|
|
194
205
|
]),
|
|
195
206
|
default: x(() => [
|
|
196
|
-
v("div",
|
|
197
|
-
s(r) ?
|
|
207
|
+
v("div", ce, [
|
|
208
|
+
s(r) ? T("", !0) : (p(), E(Q, {
|
|
198
209
|
key: 0,
|
|
199
210
|
class: "flex-1",
|
|
200
211
|
json: s(X),
|
|
201
212
|
width: 100,
|
|
202
213
|
height: 100
|
|
203
214
|
}, null, 8, ["json"])),
|
|
204
|
-
|
|
215
|
+
U(h(M, {
|
|
205
216
|
label: "Email title",
|
|
206
217
|
modelValue: s(f).title,
|
|
207
|
-
"onUpdate:modelValue":
|
|
218
|
+
"onUpdate:modelValue": a[0] || (a[0] = (d) => s(f).title = d)
|
|
208
219
|
}, null, 8, ["modelValue"]), [
|
|
209
220
|
[A, s(r)]
|
|
210
221
|
]),
|
|
211
|
-
|
|
222
|
+
U(h(ue, {
|
|
212
223
|
class: "flex-1",
|
|
213
224
|
ref_key: "editorRef",
|
|
214
225
|
ref: y,
|
|
215
|
-
onLoad:
|
|
216
|
-
onReady:
|
|
226
|
+
onLoad: a[1] || (a[1] = (d) => r.value = !1),
|
|
227
|
+
onReady: a[2] || (a[2] = () => {
|
|
217
228
|
var d;
|
|
218
|
-
r.value = !0, b.design && ((d = s(y)) == null || d.loadDesign(s(
|
|
229
|
+
r.value = !0, b.design && ((d = s(y)) == null || d.loadDesign(s(ee)(b.design)));
|
|
219
230
|
})
|
|
220
231
|
}, null, 512), [
|
|
221
232
|
[A, s(r)]
|
|
@@ -223,16 +234,16 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
223
234
|
])
|
|
224
235
|
]),
|
|
225
236
|
"side-sheet-footer": x(() => [
|
|
226
|
-
v("div",
|
|
227
|
-
h(
|
|
237
|
+
v("div", me, [
|
|
238
|
+
h(c, {
|
|
228
239
|
variant: "primary",
|
|
229
240
|
label: "Confirm",
|
|
230
|
-
onClick:
|
|
241
|
+
onClick: t
|
|
231
242
|
}),
|
|
232
|
-
h(
|
|
243
|
+
h(c, {
|
|
233
244
|
variant: "tertiary",
|
|
234
245
|
label: "Cancel",
|
|
235
|
-
onClick:
|
|
246
|
+
onClick: a[3] || (a[3] = (d) => S(!1))
|
|
236
247
|
})
|
|
237
248
|
])
|
|
238
249
|
]),
|
|
@@ -240,7 +251,7 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
240
251
|
}, 8, ["modelValue"]);
|
|
241
252
|
};
|
|
242
253
|
}
|
|
243
|
-
}),
|
|
254
|
+
}), he = { class: "space-y-4" }, fe = { class: "flex items-center gap-8 justify-between" }, ge = { class: "relative" }, ye = { class: "absolute bottom-[24px] right-[4px]" }, _e = /* @__PURE__ */ j({
|
|
244
255
|
__name: "MessageInput",
|
|
245
256
|
props: {
|
|
246
257
|
allowEmail: {
|
|
@@ -281,10 +292,10 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
281
292
|
},
|
|
282
293
|
emits: ["update:model-value"],
|
|
283
294
|
setup(e, { emit: n }) {
|
|
284
|
-
const
|
|
295
|
+
const i = e, u = n;
|
|
285
296
|
function y() {
|
|
286
|
-
var
|
|
287
|
-
const
|
|
297
|
+
var o;
|
|
298
|
+
const l = {
|
|
288
299
|
user: {
|
|
289
300
|
name: "John Doe",
|
|
290
301
|
tier: 1,
|
|
@@ -299,26 +310,26 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
299
310
|
collectible: {
|
|
300
311
|
name: "RM10 Voucher"
|
|
301
312
|
}
|
|
302
|
-
}, t =
|
|
303
|
-
((
|
|
304
|
-
|
|
313
|
+
}, t = Y(
|
|
314
|
+
((o = i.modelValue) == null ? void 0 : o.content) ?? "",
|
|
315
|
+
l
|
|
305
316
|
);
|
|
306
|
-
|
|
317
|
+
W.confirm(t, "Preview message", "OK");
|
|
307
318
|
}
|
|
308
|
-
function r(
|
|
319
|
+
function r(l, t = "SMS") {
|
|
309
320
|
u("update:model-value", {
|
|
310
321
|
channel: t,
|
|
311
|
-
content: t == "SMS" ?
|
|
312
|
-
design: t == "EMAIL" ?
|
|
322
|
+
content: t == "SMS" ? l : l.html,
|
|
323
|
+
design: t == "EMAIL" ? l.design : void 0,
|
|
313
324
|
language: "en",
|
|
314
|
-
title: t == "EMAIL" ?
|
|
315
|
-
variables:
|
|
325
|
+
title: t == "EMAIL" ? l.title : void 0,
|
|
326
|
+
variables: i.variables
|
|
316
327
|
});
|
|
317
328
|
}
|
|
318
|
-
const b = V(
|
|
319
|
-
var
|
|
320
|
-
const
|
|
321
|
-
switch (
|
|
329
|
+
const b = V(i.helperState || "none"), f = q(() => {
|
|
330
|
+
var o;
|
|
331
|
+
const l = ((o = i.modelValue) == null ? void 0 : o.content.replace(/{{([^}]+)}}/g, (a, c) => {
|
|
332
|
+
switch (c) {
|
|
322
333
|
case "user.name":
|
|
323
334
|
return "1234567890";
|
|
324
335
|
case "user.tier":
|
|
@@ -342,47 +353,50 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
342
353
|
}
|
|
343
354
|
})) || "";
|
|
344
355
|
let t = 0;
|
|
345
|
-
for (let
|
|
346
|
-
const
|
|
347
|
-
/[\u4e00-\u9fff\u3040-\u30ff\u3400-\u4dbf]/.test(
|
|
356
|
+
for (let a = 0; a < l.length; a++) {
|
|
357
|
+
const c = l.charAt(a);
|
|
358
|
+
/[\u4e00-\u9fff\u3040-\u30ff\u3400-\u4dbf]/.test(c) || /[{}\\~\[\]|\^€]/.test(c) ? t += 2 : t += 1;
|
|
348
359
|
}
|
|
349
360
|
return `Character used: ${t} ≈ ${Math.ceil(t / 160)} SMS (Every 160 characters will be sent as 1 SMS)`;
|
|
350
|
-
})
|
|
351
|
-
|
|
361
|
+
}), S = [
|
|
362
|
+
{ label: "SMS" }
|
|
363
|
+
// { label: 'EMAIL' }
|
|
364
|
+
];
|
|
365
|
+
return G(() => {
|
|
352
366
|
u("update:model-value", {
|
|
353
|
-
...
|
|
354
|
-
variables:
|
|
355
|
-
}),
|
|
356
|
-
}), (
|
|
357
|
-
var
|
|
358
|
-
const
|
|
359
|
-
return p(),
|
|
360
|
-
e.allowEmail ? (p(), E(
|
|
367
|
+
...i.modelValue,
|
|
368
|
+
variables: i.variables
|
|
369
|
+
}), i.modelValue || r("");
|
|
370
|
+
}), (l, t) => {
|
|
371
|
+
var d, F, $, k, C;
|
|
372
|
+
const o = g("FmButtonGroup"), a = g("FmButton"), c = g("FmTextarea"), M = g("FmMenuItem"), _ = g("FmMenu");
|
|
373
|
+
return p(), w("div", he, [
|
|
374
|
+
e.allowEmail ? (p(), E(o, {
|
|
361
375
|
key: 0,
|
|
362
|
-
items:
|
|
363
|
-
"model-value": { label: (
|
|
364
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
365
|
-
}, null, 8, ["model-value"])) :
|
|
366
|
-
((
|
|
376
|
+
items: S,
|
|
377
|
+
"model-value": { label: (d = e.modelValue) == null ? void 0 : d.channel },
|
|
378
|
+
"onUpdate:modelValue": t[0] || (t[0] = (m) => r("", m.label))
|
|
379
|
+
}, null, 8, ["model-value"])) : T("", !0),
|
|
380
|
+
((F = e.modelValue) == null ? void 0 : F.channel) == "EMAIL" ? (p(), E(pe, {
|
|
367
381
|
key: 1,
|
|
368
|
-
design: (
|
|
369
|
-
title: ((
|
|
370
|
-
"onUpdate:design": t[1] || (t[1] = (
|
|
371
|
-
r(
|
|
382
|
+
design: ($ = e.modelValue) == null ? void 0 : $.design,
|
|
383
|
+
title: ((k = e.modelValue) == null ? void 0 : k.title) || void 0,
|
|
384
|
+
"onUpdate:design": t[1] || (t[1] = (m) => {
|
|
385
|
+
r(m, "EMAIL");
|
|
372
386
|
})
|
|
373
|
-
}, null, 8, ["design", "title"])) : (p(),
|
|
374
|
-
v("div",
|
|
387
|
+
}, null, 8, ["design", "title"])) : (p(), w(L, { key: 2 }, [
|
|
388
|
+
v("div", fe, [
|
|
375
389
|
t[2] || (t[2] = v("div", { class: "fm-typo-en-body-lg-400" }, "Add message", -1)),
|
|
376
|
-
h(
|
|
390
|
+
h(a, {
|
|
377
391
|
icon: "visibility",
|
|
378
392
|
label: "Preview message",
|
|
379
393
|
variant: "plain",
|
|
380
394
|
onClick: y
|
|
381
395
|
})
|
|
382
396
|
]),
|
|
383
|
-
v("div",
|
|
384
|
-
h(
|
|
385
|
-
"model-value": (
|
|
397
|
+
v("div", ge, [
|
|
398
|
+
h(c, {
|
|
399
|
+
"model-value": (C = e.modelValue) == null ? void 0 : C.content,
|
|
386
400
|
"onUpdate:modelValue": r,
|
|
387
401
|
"show-word-count": !0,
|
|
388
402
|
placeholder: e.placeholder,
|
|
@@ -390,30 +404,30 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
390
404
|
"helper-text": s(f)
|
|
391
405
|
}, {
|
|
392
406
|
"helper-text": x(() => [
|
|
393
|
-
|
|
407
|
+
J(z(s(f)), 1)
|
|
394
408
|
]),
|
|
395
409
|
_: 1
|
|
396
410
|
}, 8, ["model-value", "placeholder", "helper-state", "helper-text"]),
|
|
397
|
-
v("div",
|
|
398
|
-
h(
|
|
411
|
+
v("div", ye, [
|
|
412
|
+
h(_, { placement: "left-end" }, {
|
|
399
413
|
"menu-button": x(() => [
|
|
400
|
-
h(
|
|
414
|
+
h(a, {
|
|
401
415
|
icon: "add",
|
|
402
416
|
variant: "tertiary",
|
|
403
417
|
size: "md"
|
|
404
418
|
})
|
|
405
419
|
]),
|
|
406
420
|
default: x(() => [
|
|
407
|
-
(p(!0),
|
|
408
|
-
(
|
|
409
|
-
), (
|
|
410
|
-
var
|
|
411
|
-
return p(), E(
|
|
412
|
-
key:
|
|
413
|
-
label: ((
|
|
414
|
-
onClick: (
|
|
415
|
-
var
|
|
416
|
-
return r(((
|
|
421
|
+
(p(!0), w(L, null, K(e.variables.filter(
|
|
422
|
+
(m) => e.triggerType == "SCHEDULE" ? !m.startsWith("transaction.") : !0
|
|
423
|
+
), (m) => {
|
|
424
|
+
var I;
|
|
425
|
+
return p(), E(M, {
|
|
426
|
+
key: m,
|
|
427
|
+
label: ((I = s(te)[m]) == null ? void 0 : I.name) || m,
|
|
428
|
+
onClick: (be) => {
|
|
429
|
+
var D;
|
|
430
|
+
return r(((D = e.modelValue) == null ? void 0 : D.content) + `{{${m}}}`);
|
|
417
431
|
}
|
|
418
432
|
}, null, 8, ["label", "onClick"]);
|
|
419
433
|
}), 128))
|
|
@@ -428,5 +442,6 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
428
442
|
}
|
|
429
443
|
});
|
|
430
444
|
export {
|
|
431
|
-
|
|
445
|
+
Me as M,
|
|
446
|
+
_e as _
|
|
432
447
|
};
|