@feedmepos/mf-connect 0.1.0-beta.7 → 0.1.0-beta.71
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-CnF_WeRZ.js +427 -0
- package/dist/{App-DalxIjTu.js → App-DJwSTuRa.js} +445 -420
- package/dist/AuditLogs-RarW2PHL.js +1886 -0
- package/dist/Bin-BaixTvHW.js +166 -0
- package/dist/{Broadcast-uMAvsC--.js → Broadcast-8DEAMhyM.js} +56 -54
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-JxbENan8.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DPXoOupI.js} +6 -8
- package/dist/Card-DRwLZ-Mn.js +896 -0
- package/dist/Collections-WsPM9v03.js +459 -0
- package/dist/{Credit-QlnatflM.js → Credit-DMxRdTzt.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-Bcj6o4Xi.js +2181 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BE07lc4M.js → EffectSheet.vue_vue_type_style_index_0_lang-CuJ8curT.js} +49 -49
- package/dist/{Experience-Czy41ifp.js → Experience-B0BV4Tc_.js} +32 -30
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
- package/dist/Game-Bu6kJJHx.js +278 -0
- package/dist/Index-CX-aPFQt.js +259 -0
- package/dist/Marketing-CiVFwl6S.js +20071 -0
- package/dist/Member-DZfTtt13.js +333 -0
- package/dist/MemberList-CscwsZnv.js +1598 -0
- package/dist/MemberTransactions-BWNs6bUm.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CtM73bcN.js → MessageInput.vue_vue_type_script_setup_true_lang-BrbRudIU.js} +134 -122
- package/dist/Mission-CyJ-9Qfl.js +296 -0
- package/dist/Overview-DLyt6VId.js +1078 -0
- package/dist/{Point-By6ogYy_.js → Point-Cc_0-RKm.js} +55 -53
- package/dist/Promotion-KqA8nev2.js +289 -0
- package/dist/Queue-i8--zps9.js +249 -0
- package/dist/Record-CLUO1JVc.js +340 -0
- package/dist/Reward-BEdUKQ3M.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-B9vnSbWj.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-B8zw1TmO.js +1727 -0
- package/dist/Segment-B8sYajZG.js +568 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CmmI5Vwl.js +181 -0
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-CIcXjbJG.js +186 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DY3FMuIf.js +147 -0
- package/dist/Setting-DT8dRb2A.js +1931 -0
- package/dist/Store-BhsPWRkR.js +1841 -0
- package/dist/StoreRewards-Cx2WDZ3p.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Byb7GOoh.js +1028 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-nEdCD6la.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Cb-FGTO9.js} +1 -1
- package/dist/{Tier-DvAs0-yx.js → Tier-kQy1vGwo.js} +327 -318
- package/dist/{Title-B_Trr39o.js → Title-DKv8FqpX.js} +224 -209
- package/dist/{Transaction-DCJw-b3H.js → Transaction-CSLllOgl.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-CvpBdNBn.js +130 -0
- package/dist/Voucher-BP6fmSwu.js +354 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CxQEg_HW.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXkhu8e9.js → ZodTextField.vue_vue_type_script_setup_true_lang-aurdXO2X.js} +1 -1
- package/dist/app-B3qgrQOd.js +7079 -0
- package/dist/app-s3iL79De.js +33357 -0
- package/dist/app.js +1 -1
- package/dist/business-DG2w8U-i.js +79 -0
- package/dist/campaign-BP6Rz-AH.js +1810 -0
- package/dist/{campaign--0_yMbMV.js → campaign-WPRZ4BRF.js} +2 -2
- package/dist/campaign.enum-CoqrWNTZ.js +20 -0
- package/dist/campaign.fn-BRPigTOA.js +758 -0
- package/dist/collectible.enum-Dy4sxF43.js +19 -0
- package/dist/{collection.fn-3TwPe7aF.js → collection.fn-DGnLyYgV.js} +2 -2
- package/dist/dto-xZ9I6-Jr.js +214 -0
- package/dist/{effect-BeR0LK61.js → effect-C0XoYTus.js} +33 -16
- package/dist/email-addresses-CJ87c7W1.js +705 -0
- package/dist/{export-xeLLhqvh.js → export-qlV-AbEl.js} +5 -5
- package/dist/{helper-B5iqfKh8.js → helper-DzYe8aNx.js} +1 -1
- package/dist/{index-BOdtpNkP.js → index-4vdSri7m.js} +266 -173
- package/dist/{index-CU_d8jjU.js → index-BfSj7cUl.js} +1 -1
- package/dist/index-Bj0ULpXi.js +29556 -0
- package/dist/index-BnZ4yaMH.js +115 -0
- package/dist/index-Bo5DJXxs.js +54 -0
- package/dist/{index-Ct_wR519.js → index-BuvJH6SU.js} +24 -21
- package/dist/index-C2GEs8di.js +32 -0
- package/dist/{index-CyKZ-SsN.js → index-CJuOTcCE.js} +1 -1
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/{index-DP-dGMJC.js → index-DReysUPw.js} +2230 -871
- package/dist/{index-CAn5heDe.js → index-DgCjRb3o.js} +48 -4
- package/dist/index-IwITtvVu.js +56 -0
- package/dist/{index-Bh-uaaBG.js → index-n3wiQlbk.js} +1506 -1480
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/{index.esm2017-5jeDA5Zo.js → index.esm2017-CkJhTmme.js} +154 -154
- package/dist/loading-DwJdwl4G.js +71 -0
- package/dist/{membership-D0nqqWNZ.js → membership-DvPK3h8f.js} +54 -46
- package/dist/money-C_WIbr_x.js +15 -0
- package/dist/number-ZeVoGhzP.js +12 -0
- package/dist/objectid-8lkX6otO.js +145 -0
- package/dist/{loading-C-JDVajU.js → plugins-D20keyDW.js} +2990 -3062
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-CqnMEq_w.js +36 -0
- package/dist/{rule-Dn_GgBCe.js → rule-D7htGgWz.js} +185 -178
- package/dist/{rule-builder-BXt29Es4.js → rule-builder-BbJpYQ0n.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-D2Oi3dxP.js → template-BWQCVHm7.js} +5 -5
- package/dist/trigger-DMuv0_O7.js +144 -0
- package/dist/user-C_v2C0qN.js +54 -0
- package/dist/vue-i18n-N8_TEEd0.js +2365 -0
- package/dist/{xlsx-CCRCidY2.js → xlsx-CsPDNSTo.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/Promotion-DKcBr-RI.js +0 -247
- 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/business-BC4-i1cU.js +0 -78
- 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
- package/dist/vue-i18n-Dud8fvmw.js +0 -2365
|
@@ -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-Byb7GOoh.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 M, 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 A, vShow as U, 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-D20keyDW.js";
|
|
3
|
+
import { A as Y } from "./index-DReysUPw.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
|
+
}, we = {
|
|
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(), M("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,83 +167,83 @@ 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"), w = 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
|
+
A(h(w, {
|
|
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
|
+
[U, s(r)]
|
|
210
221
|
]),
|
|
211
|
-
|
|
222
|
+
A(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
|
+
[U, s(r)]
|
|
222
233
|
])
|
|
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,47 @@ 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
|
-
return
|
|
361
|
+
}), S = [{ label: "SMS" }, { label: "EMAIL" }];
|
|
362
|
+
return G(() => {
|
|
352
363
|
u("update:model-value", {
|
|
353
|
-
...
|
|
354
|
-
variables:
|
|
355
|
-
}),
|
|
356
|
-
}), (
|
|
357
|
-
var
|
|
358
|
-
const
|
|
359
|
-
return p(),
|
|
360
|
-
e.allowEmail ? (p(), E(
|
|
364
|
+
...i.modelValue,
|
|
365
|
+
variables: i.variables
|
|
366
|
+
}), i.modelValue || r("");
|
|
367
|
+
}), (l, t) => {
|
|
368
|
+
var d, F, $, k, C;
|
|
369
|
+
const o = g("FmButtonGroup"), a = g("FmButton"), c = g("FmTextarea"), w = g("FmMenuItem"), _ = g("FmMenu");
|
|
370
|
+
return p(), M("div", he, [
|
|
371
|
+
e.allowEmail ? (p(), E(o, {
|
|
361
372
|
key: 0,
|
|
362
|
-
items:
|
|
363
|
-
"model-value": { label: (
|
|
364
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
365
|
-
}, null, 8, ["model-value"])) :
|
|
366
|
-
((
|
|
373
|
+
items: S,
|
|
374
|
+
"model-value": { label: (d = e.modelValue) == null ? void 0 : d.channel },
|
|
375
|
+
"onUpdate:modelValue": t[0] || (t[0] = (m) => r("", m.label))
|
|
376
|
+
}, null, 8, ["model-value"])) : T("", !0),
|
|
377
|
+
((F = e.modelValue) == null ? void 0 : F.channel) == "EMAIL" ? (p(), E(pe, {
|
|
367
378
|
key: 1,
|
|
368
|
-
design: (
|
|
369
|
-
title: ((
|
|
370
|
-
"onUpdate:design": t[1] || (t[1] = (
|
|
371
|
-
r(
|
|
379
|
+
design: ($ = e.modelValue) == null ? void 0 : $.design,
|
|
380
|
+
title: ((k = e.modelValue) == null ? void 0 : k.title) || void 0,
|
|
381
|
+
"onUpdate:design": t[1] || (t[1] = (m) => {
|
|
382
|
+
r(m, "EMAIL");
|
|
372
383
|
})
|
|
373
|
-
}, null, 8, ["design", "title"])) : (p(),
|
|
374
|
-
v("div",
|
|
384
|
+
}, null, 8, ["design", "title"])) : (p(), M(L, { key: 2 }, [
|
|
385
|
+
v("div", fe, [
|
|
375
386
|
t[2] || (t[2] = v("div", { class: "fm-typo-en-body-lg-400" }, "Add message", -1)),
|
|
376
|
-
h(
|
|
387
|
+
h(a, {
|
|
377
388
|
icon: "visibility",
|
|
378
389
|
label: "Preview message",
|
|
379
390
|
variant: "plain",
|
|
380
391
|
onClick: y
|
|
381
392
|
})
|
|
382
393
|
]),
|
|
383
|
-
v("div",
|
|
384
|
-
h(
|
|
385
|
-
"model-value": (
|
|
394
|
+
v("div", ge, [
|
|
395
|
+
h(c, {
|
|
396
|
+
"model-value": (C = e.modelValue) == null ? void 0 : C.content,
|
|
386
397
|
"onUpdate:modelValue": r,
|
|
387
398
|
"show-word-count": !0,
|
|
388
399
|
placeholder: e.placeholder,
|
|
@@ -390,30 +401,30 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
390
401
|
"helper-text": s(f)
|
|
391
402
|
}, {
|
|
392
403
|
"helper-text": x(() => [
|
|
393
|
-
|
|
404
|
+
J(z(s(f)), 1)
|
|
394
405
|
]),
|
|
395
406
|
_: 1
|
|
396
407
|
}, 8, ["model-value", "placeholder", "helper-state", "helper-text"]),
|
|
397
|
-
v("div",
|
|
398
|
-
h(
|
|
408
|
+
v("div", ye, [
|
|
409
|
+
h(_, { placement: "left-end" }, {
|
|
399
410
|
"menu-button": x(() => [
|
|
400
|
-
h(
|
|
411
|
+
h(a, {
|
|
401
412
|
icon: "add",
|
|
402
413
|
variant: "tertiary",
|
|
403
414
|
size: "md"
|
|
404
415
|
})
|
|
405
416
|
]),
|
|
406
417
|
default: x(() => [
|
|
407
|
-
(p(!0),
|
|
408
|
-
(
|
|
409
|
-
), (
|
|
410
|
-
var
|
|
411
|
-
return p(), E(
|
|
412
|
-
key:
|
|
413
|
-
label: ((
|
|
414
|
-
onClick: (
|
|
415
|
-
var
|
|
416
|
-
return r(((
|
|
418
|
+
(p(!0), M(L, null, K(e.variables.filter(
|
|
419
|
+
(m) => e.triggerType == "SCHEDULE" ? !m.startsWith("transaction.") : !0
|
|
420
|
+
), (m) => {
|
|
421
|
+
var I;
|
|
422
|
+
return p(), E(w, {
|
|
423
|
+
key: m,
|
|
424
|
+
label: ((I = s(te)[m]) == null ? void 0 : I.name) || m,
|
|
425
|
+
onClick: (be) => {
|
|
426
|
+
var D;
|
|
427
|
+
return r(((D = e.modelValue) == null ? void 0 : D.content) + `{{${m}}}`);
|
|
417
428
|
}
|
|
418
429
|
}, null, 8, ["label", "onClick"]);
|
|
419
430
|
}), 128))
|
|
@@ -428,5 +439,6 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
428
439
|
}
|
|
429
440
|
});
|
|
430
441
|
export {
|
|
431
|
-
we as
|
|
442
|
+
we as M,
|
|
443
|
+
_e as _
|
|
432
444
|
};
|