@feedmepos/mf-connect 0.1.0-beta.8 → 0.1.0-beta.80
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-C84B4MSt.js +427 -0
- package/dist/{App-SRz4257n.js → App-CnbbBVSn.js} +441 -420
- package/dist/AuditLogs-KOxiG5Q0.js +1887 -0
- package/dist/Bin-BBSQDzD4.js +166 -0
- package/dist/{Broadcast-DmkrJGp2.js → Broadcast-DlvPEqW7.js} +56 -54
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CZXSxA9u.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-M1Za3MaN.js} +14 -10
- package/dist/Card-BluWm_EY.js +905 -0
- package/dist/Collections-DtHJpxRT.js +464 -0
- package/dist/{Credit-CcNrq9qk.js → Credit-Be2pcBVn.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-sqq_sO_a.js +2182 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BIZDiLns.js → EffectSheet.vue_vue_type_style_index_0_lang-CBsYx54P.js} +49 -49
- package/dist/{Experience-DNsQLzDH.js → Experience-CLPyvgs0.js} +32 -30
- package/dist/FileSaver.min-NlMItPOc.js +74 -0
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
- package/dist/Game-5kEG7o4J.js +278 -0
- package/dist/Index-BSZi21Wo.js +259 -0
- package/dist/Marketing-CE1Sq3Pb.js +20071 -0
- package/dist/Member-DaBqmOYX.js +287 -0
- package/dist/MemberList-jIriR6B0.js +1606 -0
- package/dist/MemberTransactions-BGEZwpPO.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-GCEQCVOt.js → MessageInput.vue_vue_type_script_setup_true_lang-CSlafowP.js} +152 -137
- package/dist/Mission-BOByUsYC.js +296 -0
- package/dist/Overview-BQQs8TsL.js +1079 -0
- package/dist/{Point-Ck8EG_3k.js → Point-BuRBh_HC.js} +55 -53
- package/dist/Promotion-Py2WWNt0.js +289 -0
- package/dist/Queue-On8_svkl.js +260 -0
- package/dist/Record-CSWkHs9Y.js +341 -0
- package/dist/Reward-BLVyFkAH.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-BW8kuoLt.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DC8JEmEC.js +1728 -0
- package/dist/Segment-BjBskgf9.js +880 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CrVw6j2M.js +181 -0
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-oaAVUxO4.js +188 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CKOTgzL-.js +147 -0
- package/dist/Setting-CAMlhgGd.js +1932 -0
- package/dist/Store-0qvNbHne.js +1842 -0
- package/dist/StoreRewards-CjcHvUNa.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CdZ7QIaf.js +1029 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrzmjYmU.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-vJaZIDrx.js} +1 -1
- package/dist/{Tier-CJ9-d8Zg.js → Tier-D_pHKGSv.js} +350 -334
- package/dist/{Title-DZCpvg4q.js → Title-DgdtJ87h.js} +245 -222
- package/dist/{Transaction-DpnTxlbf.js → Transaction-CKlLWcjS.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-2GOvljvv.js +130 -0
- package/dist/Voucher-Cg6zQSAy.js +354 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-rpjQkheM.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-SukfoJpU.js → ZodTextField.vue_vue_type_script_setup_true_lang-BRdY-P8U.js} +1 -1
- package/dist/{app-DzAexOqx.js → app-CScRp4SA.js} +2709 -1265
- package/dist/app-jGYefKeR.js +33357 -0
- package/dist/app.js +1 -1
- package/dist/business-DYhO4gjc.js +79 -0
- package/dist/campaign-BgXy1Ngd.js +1810 -0
- package/dist/{campaign-winsqufa.js → campaign-CZ5pMrUu.js} +2 -2
- package/dist/campaign.enum-CWBDlzqp.js +20 -0
- package/dist/campaign.fn-HHZ5mQKe.js +758 -0
- package/dist/collectible.enum-MvoLHpuA.js +19 -0
- package/dist/{collection.fn-CI5Llblg.js → collection.fn-BHUoLJPj.js} +2 -2
- package/dist/dto-DXdR0em1.js +214 -0
- package/dist/{effect-CdkrIYgX.js → effect-HLuo1A_f.js} +33 -16
- package/dist/email-addresses-DU4ehcHM.js +705 -0
- package/dist/{export-DGxfief1.js → export-BDRHAxZr.js} +5 -5
- package/dist/{helper-B8RqcTNu.js → helper-JhFOw8n-.js} +1 -1
- package/dist/{index-OzicErwL.js → index-BG_GpbnZ.js} +24 -21
- package/dist/{index-Cw_aXFH6.js → index-BZWr1bgh.js} +269 -173
- package/dist/{loading-DuEFUCwF.js → index-Bs-tzd5F.js} +4609 -4886
- package/dist/{index-wzdbEEcZ.js → index-C2nNcNjw.js} +1 -1
- package/dist/index-CIF8DeC8.js +54 -0
- package/dist/{index-HZC9LLAX.js → index-CqT8uK3R.js} +48 -4
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/{index-9w43_U1v.js → index-DVj1MyZp.js} +1506 -1480
- package/dist/{index-CZgQVRsm.js → index-GmHsjd7O.js} +1 -1
- package/dist/index-QDEKR2Rj.js +115 -0
- package/dist/{index-A34xEz20.js → index-cYKPj4fA.js} +2246 -871
- package/dist/index-eRBO4PzZ.js +56 -0
- package/dist/index-fS6fmvFv.js +29556 -0
- package/dist/index-l8E6r07W.js +32 -0
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/{index.esm2017-CppSMh_U.js → index.esm2017-B-YrQ0sw.js} +206 -206
- package/dist/loading-C09t0mFj.js +71 -0
- package/dist/{membership-nsMtWeTC.js → membership-tHAn3VRs.js} +80 -66
- package/dist/money-DYVCca49.js +15 -0
- package/dist/number-VYuUME2F.js +12 -0
- package/dist/objectid-BTO4csVa.js +145 -0
- package/dist/plugins-CXgvBDMF.js +208 -0
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-DX9TZrk4.js +36 -0
- package/dist/{rule-CPIMqt1h.js → rule-CbCZqulx.js} +185 -178
- package/dist/{rule-builder-CSs5XRKP.js → rule-builder-J8K_fjI-.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-CJZoYavu.js → template-BtYJpEBa.js} +5 -5
- package/dist/trigger-D6dpZFSN.js +144 -0
- package/dist/user-C0QvWk-o.js +54 -0
- package/dist/vue-i18n-cz2_cPSz.js +2365 -0
- package/dist/{xlsx-BZlnYinX.js → xlsx-BIPQrY49.js} +1 -1
- package/package.json +11 -7
- package/dist/Analytic-5QztrYSp.js +0 -622
- package/dist/Card-BsjFTVsH.js +0 -825
- package/dist/Collections-7wqZHOax.js +0 -453
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Cuklmxur.js +0 -2813
- package/dist/Game-DlzDerT7.js +0 -255
- package/dist/Marketing-BqhpaG4o.js +0 -316
- package/dist/Member-AFgZcdtz.js +0 -69
- package/dist/MemberList-BKgrLz2C.js +0 -1733
- package/dist/MemberTransactions-BwT3zE2a.js +0 -38
- package/dist/Mission-BTAia7AS.js +0 -261
- package/dist/Promotion-0v3kvsK3.js +0 -247
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BkFm7tXq.js +0 -1753
- package/dist/Segment-BenLupqV.js +0 -437
- package/dist/Setting-0fpREqpJ.js +0 -1901
- package/dist/Store-BDGwe4ar.js +0 -1511
- package/dist/StoreRewards-TDZt9H1V.js +0 -401
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BqpsMcl1.js +0 -890
- package/dist/Voucher-DsP_rh8I.js +0 -490
- package/dist/app-Cg2pTZJK.js +0 -53428
- package/dist/business-Cw_qGw8y.js +0 -78
- package/dist/dto-ozu1smC3.js +0 -2770
- package/dist/index-BLACZ3-L.js +0 -206
- package/dist/index-BaozRfWB.js +0 -762
- package/dist/index-CjVmULNd.js +0 -99
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DAEmawcj.js +0 -298
- package/dist/index-Oxr-mU6h.js +0 -29193
- package/dist/money-BGZPFtUc.js +0 -15
- package/dist/number-4J0xvXP9.js +0 -12
- package/dist/user-Bm4KttFq.js +0 -37
- package/dist/vue-i18n-CCyiVzOE.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-CdZ7QIaf.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,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { p as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { _ as Q
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { defineComponent as I, shallowRef as G, openBlock as p, createElementBlock as C, normalizeStyle as P, ref as M, resolveComponent as g, createBlock as _, unref as i, isRef as q, withCtx as x, createVNode as h, createElementVNode as v, createCommentVNode as H, withDirectives as A, vShow as B, computed as J, onMounted as z, Fragment as T, createTextVNode as K, toDisplayString as W, renderList as X } from "vue";
|
|
2
|
+
import { p as Y } from "./plugins-CXgvBDMF.js";
|
|
3
|
+
import { B as Z } from "./index-cYKPj4fA.js";
|
|
4
|
+
import "./index-Bs-tzd5F.js";
|
|
5
|
+
import { _ as Q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
import { _ as ee, S as te } from "./LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js";
|
|
7
|
+
import { c as ne } from "./object-qECH92oz.js";
|
|
8
|
+
import { useCoreStore as oe } from "@feedmepos/mf-common";
|
|
9
|
+
import { u as ae } from "./membership-tHAn3VRs.js";
|
|
10
|
+
const se = {
|
|
8
11
|
"user.name": {
|
|
9
12
|
name: "User name"
|
|
10
13
|
},
|
|
@@ -29,40 +32,51 @@ const ee = {
|
|
|
29
32
|
"user.point": {
|
|
30
33
|
name: "User experience"
|
|
31
34
|
},
|
|
35
|
+
"user.gender": {
|
|
36
|
+
name: "Gender"
|
|
37
|
+
},
|
|
38
|
+
"user.phoneNumber": {
|
|
39
|
+
name: "Phone Number"
|
|
40
|
+
},
|
|
32
41
|
"transaction.amount": {
|
|
33
42
|
name: "Reward amount"
|
|
34
43
|
},
|
|
35
44
|
"collectible.name": {
|
|
36
45
|
name: "Reward name"
|
|
46
|
+
},
|
|
47
|
+
"membership.url": {
|
|
48
|
+
name: "Membership URL"
|
|
37
49
|
}
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
|
|
50
|
+
}, Ie = {
|
|
51
|
+
MY: ["user.phoneNumber", "membership.url"]
|
|
52
|
+
}, ie = "https://editor.unlayer.com/embed.js?2", N = [];
|
|
53
|
+
let O = !1;
|
|
54
|
+
const re = (e) => {
|
|
41
55
|
const n = document.querySelectorAll("script");
|
|
42
|
-
let
|
|
43
|
-
return n.forEach((
|
|
44
|
-
|
|
45
|
-
}),
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
if (
|
|
56
|
+
let r = !1;
|
|
57
|
+
return n.forEach((m) => {
|
|
58
|
+
m.src.includes(e) && (r = !0);
|
|
59
|
+
}), r;
|
|
60
|
+
}, le = (e) => {
|
|
61
|
+
N.push(e);
|
|
62
|
+
}, R = () => {
|
|
63
|
+
if (O) {
|
|
50
64
|
let e;
|
|
51
|
-
for (; e =
|
|
65
|
+
for (; e = N.shift(); )
|
|
52
66
|
e();
|
|
53
67
|
}
|
|
54
|
-
},
|
|
55
|
-
if (
|
|
56
|
-
|
|
68
|
+
}, de = (e, n = ie) => {
|
|
69
|
+
if (le(e), re(n))
|
|
70
|
+
R();
|
|
57
71
|
else {
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, document.head.appendChild(
|
|
72
|
+
const r = document.createElement("script");
|
|
73
|
+
r.setAttribute("src", n), r.onload = () => {
|
|
74
|
+
O = !0, R();
|
|
75
|
+
}, document.head.appendChild(r);
|
|
62
76
|
}
|
|
63
77
|
};
|
|
64
|
-
let
|
|
65
|
-
const
|
|
78
|
+
let ue = 0;
|
|
79
|
+
const me = I({
|
|
66
80
|
name: "EmailEditor",
|
|
67
81
|
props: {
|
|
68
82
|
editorId: String,
|
|
@@ -91,17 +105,17 @@ const le = M({
|
|
|
91
105
|
},
|
|
92
106
|
computed: {
|
|
93
107
|
id() {
|
|
94
|
-
return this.editorId || `editor-${++
|
|
108
|
+
return this.editorId || `editor-${++ue}`;
|
|
95
109
|
}
|
|
96
110
|
},
|
|
97
111
|
setup() {
|
|
98
112
|
return {
|
|
99
|
-
editor:
|
|
113
|
+
editor: G(null)
|
|
100
114
|
// Makes editor available to the template
|
|
101
115
|
};
|
|
102
116
|
},
|
|
103
117
|
mounted() {
|
|
104
|
-
this.$emit("load"),
|
|
118
|
+
this.$emit("load"), de(this.loadEditor.bind(this), this.scriptUrl);
|
|
105
119
|
},
|
|
106
120
|
methods: {
|
|
107
121
|
loadEditor() {
|
|
@@ -135,15 +149,15 @@ const le = M({
|
|
|
135
149
|
(n = this.editor) == null || n.saveDesign(e);
|
|
136
150
|
}
|
|
137
151
|
}
|
|
138
|
-
}),
|
|
139
|
-
function
|
|
140
|
-
return p(),
|
|
152
|
+
}), ce = ["id"];
|
|
153
|
+
function pe(e, n, r, m, a, c) {
|
|
154
|
+
return p(), C("div", {
|
|
141
155
|
id: e.id,
|
|
142
156
|
class: "unlayer-editor",
|
|
143
|
-
style:
|
|
144
|
-
}, null, 12,
|
|
157
|
+
style: P({ minHeight: e.minHeight })
|
|
158
|
+
}, null, 12, ce);
|
|
145
159
|
}
|
|
146
|
-
const
|
|
160
|
+
const he = /* @__PURE__ */ Q(me, [["render", pe], ["__scopeId", "data-v-a9a2bb94"]]), fe = { class: "h-full flex flex-col" }, ge = { class: "flex items-center gap-8" }, be = /* @__PURE__ */ I({
|
|
147
161
|
__name: "EmailEditorSheet",
|
|
148
162
|
props: {
|
|
149
163
|
design: {
|
|
@@ -156,83 +170,83 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
156
170
|
}
|
|
157
171
|
},
|
|
158
172
|
emits: ["update:design"],
|
|
159
|
-
setup(e, { expose: n, emit:
|
|
160
|
-
const
|
|
173
|
+
setup(e, { expose: n, emit: r }) {
|
|
174
|
+
const m = M(!1), a = M(null), c = M(!1), b = e, l = M({
|
|
161
175
|
html: "",
|
|
162
176
|
design: b.design,
|
|
163
177
|
title: b.title || ""
|
|
164
178
|
});
|
|
165
|
-
function o
|
|
166
|
-
|
|
179
|
+
function S(o) {
|
|
180
|
+
m.value = o;
|
|
167
181
|
}
|
|
168
|
-
const
|
|
169
|
-
function
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
html:
|
|
173
|
-
design:
|
|
174
|
-
title:
|
|
175
|
-
},
|
|
176
|
-
}),
|
|
182
|
+
const w = r;
|
|
183
|
+
function F() {
|
|
184
|
+
a.value && (a.value.exportHtml((o) => {
|
|
185
|
+
l.value = {
|
|
186
|
+
html: o.html,
|
|
187
|
+
design: o.design,
|
|
188
|
+
title: l.value.title
|
|
189
|
+
}, w("update:design", l.value);
|
|
190
|
+
}), S(!1));
|
|
177
191
|
}
|
|
178
192
|
return n({
|
|
179
|
-
showSheet:
|
|
180
|
-
}), (
|
|
181
|
-
const
|
|
182
|
-
return p(),
|
|
183
|
-
modelValue:
|
|
184
|
-
"onUpdate:modelValue":
|
|
193
|
+
showSheet: S
|
|
194
|
+
}), (o, t) => {
|
|
195
|
+
const d = g("FmButton"), f = g("FmTextField"), y = g("FmSideSheet");
|
|
196
|
+
return p(), _(y, {
|
|
197
|
+
modelValue: i(m),
|
|
198
|
+
"onUpdate:modelValue": t[4] || (t[4] = (s) => q(m) ? m.value = s : null),
|
|
185
199
|
header: "Email editor",
|
|
186
200
|
"max-width": 1280
|
|
187
201
|
}, {
|
|
188
202
|
"side-sheet-button": x(() => [
|
|
189
|
-
h(
|
|
203
|
+
h(d, {
|
|
190
204
|
label: "Edit email",
|
|
191
205
|
variant: "tertiary",
|
|
192
206
|
icon: "edit"
|
|
193
207
|
})
|
|
194
208
|
]),
|
|
195
209
|
default: x(() => [
|
|
196
|
-
v("div",
|
|
197
|
-
|
|
210
|
+
v("div", fe, [
|
|
211
|
+
i(c) ? H("", !0) : (p(), _(ee, {
|
|
198
212
|
key: 0,
|
|
199
213
|
class: "flex-1",
|
|
200
|
-
json:
|
|
214
|
+
json: i(te),
|
|
201
215
|
width: 100,
|
|
202
216
|
height: 100
|
|
203
217
|
}, null, 8, ["json"])),
|
|
204
|
-
|
|
218
|
+
A(h(f, {
|
|
205
219
|
label: "Email title",
|
|
206
|
-
modelValue:
|
|
207
|
-
"onUpdate:modelValue":
|
|
220
|
+
modelValue: i(l).title,
|
|
221
|
+
"onUpdate:modelValue": t[0] || (t[0] = (s) => i(l).title = s)
|
|
208
222
|
}, null, 8, ["modelValue"]), [
|
|
209
|
-
[
|
|
223
|
+
[B, i(c)]
|
|
210
224
|
]),
|
|
211
|
-
|
|
225
|
+
A(h(he, {
|
|
212
226
|
class: "flex-1",
|
|
213
227
|
ref_key: "editorRef",
|
|
214
|
-
ref:
|
|
215
|
-
onLoad:
|
|
216
|
-
onReady:
|
|
217
|
-
var
|
|
218
|
-
|
|
228
|
+
ref: a,
|
|
229
|
+
onLoad: t[1] || (t[1] = (s) => c.value = !1),
|
|
230
|
+
onReady: t[2] || (t[2] = () => {
|
|
231
|
+
var s;
|
|
232
|
+
c.value = !0, b.design && ((s = i(a)) == null || s.loadDesign(i(ne)(b.design)));
|
|
219
233
|
})
|
|
220
234
|
}, null, 512), [
|
|
221
|
-
[
|
|
235
|
+
[B, i(c)]
|
|
222
236
|
])
|
|
223
237
|
])
|
|
224
238
|
]),
|
|
225
239
|
"side-sheet-footer": x(() => [
|
|
226
|
-
v("div",
|
|
227
|
-
h(
|
|
240
|
+
v("div", ge, [
|
|
241
|
+
h(d, {
|
|
228
242
|
variant: "primary",
|
|
229
243
|
label: "Confirm",
|
|
230
|
-
onClick:
|
|
244
|
+
onClick: F
|
|
231
245
|
}),
|
|
232
|
-
h(
|
|
246
|
+
h(d, {
|
|
233
247
|
variant: "tertiary",
|
|
234
248
|
label: "Cancel",
|
|
235
|
-
onClick:
|
|
249
|
+
onClick: t[3] || (t[3] = (s) => S(!1))
|
|
236
250
|
})
|
|
237
251
|
])
|
|
238
252
|
]),
|
|
@@ -240,7 +254,7 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
240
254
|
}, 8, ["modelValue"]);
|
|
241
255
|
};
|
|
242
256
|
}
|
|
243
|
-
}),
|
|
257
|
+
}), ye = { class: "space-y-4" }, ve = { class: "flex items-center gap-8 justify-between" }, xe = { class: "relative" }, Se = { class: "absolute bottom-[24px] right-[4px]" }, Le = /* @__PURE__ */ I({
|
|
244
258
|
__name: "MessageInput",
|
|
245
259
|
props: {
|
|
246
260
|
allowEmail: {
|
|
@@ -281,9 +295,9 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
281
295
|
},
|
|
282
296
|
emits: ["update:model-value"],
|
|
283
297
|
setup(e, { emit: n }) {
|
|
284
|
-
const a = e,
|
|
285
|
-
function
|
|
286
|
-
var
|
|
298
|
+
const r = oe(), m = ae(), a = e, c = n;
|
|
299
|
+
function b() {
|
|
300
|
+
var d;
|
|
287
301
|
const o = {
|
|
288
302
|
user: {
|
|
289
303
|
name: "John Doe",
|
|
@@ -299,14 +313,14 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
299
313
|
collectible: {
|
|
300
314
|
name: "RM10 Voucher"
|
|
301
315
|
}
|
|
302
|
-
}, t =
|
|
303
|
-
((
|
|
316
|
+
}, t = Z(
|
|
317
|
+
((d = a.modelValue) == null ? void 0 : d.content) ?? "",
|
|
304
318
|
o
|
|
305
319
|
);
|
|
306
|
-
|
|
320
|
+
Y.confirm(t, "Preview message", "OK");
|
|
307
321
|
}
|
|
308
|
-
function
|
|
309
|
-
|
|
322
|
+
function l(o, t = "SMS") {
|
|
323
|
+
c("update:model-value", {
|
|
310
324
|
channel: t,
|
|
311
325
|
content: t == "SMS" ? o : o.html,
|
|
312
326
|
design: t == "EMAIL" ? o.design : void 0,
|
|
@@ -315,10 +329,12 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
315
329
|
variables: a.variables
|
|
316
330
|
});
|
|
317
331
|
}
|
|
318
|
-
const
|
|
319
|
-
var
|
|
320
|
-
const o = ((
|
|
321
|
-
|
|
332
|
+
const S = M(a.helperState || "none"), w = J(() => {
|
|
333
|
+
var V, E;
|
|
334
|
+
const o = ((V = m.membership) == null ? void 0 : V.brand) || r.currentBusiness.value.name || "", t = 160;
|
|
335
|
+
let d = t;
|
|
336
|
+
const f = ((E = a.modelValue) == null ? void 0 : E.content.replace(/{{([^}]+)}}/g, (k, j) => {
|
|
337
|
+
switch (j) {
|
|
322
338
|
case "user.name":
|
|
323
339
|
return "1234567890";
|
|
324
340
|
case "user.tier":
|
|
@@ -341,79 +357,77 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
341
357
|
return "...";
|
|
342
358
|
}
|
|
343
359
|
})) || "";
|
|
344
|
-
let
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
return J(() => {
|
|
352
|
-
u("update:model-value", {
|
|
360
|
+
let y = o.length + 4, s = f.length + y;
|
|
361
|
+
(/[\u4e00-\u9fff\u3040-\u30ff\u3400-\u4dbf]/.test(f) || /[\u4e00-\u9fff\u3040-\u30ff\u3400-\u4dbf]/.test(f)) && (d = 70);
|
|
362
|
+
const $ = Math.min(d, t);
|
|
363
|
+
return `Reserverd: ${y} | Character used: ${s} ≈ ${Math.ceil(s / $)} SMS (Every ${$} characters will be sent as 1 SMS)`;
|
|
364
|
+
}), F = [{ label: "SMS" }, { label: "EMAIL" }];
|
|
365
|
+
return z(() => {
|
|
366
|
+
c("update:model-value", {
|
|
353
367
|
...a.modelValue,
|
|
354
368
|
variables: a.variables
|
|
355
|
-
}), a.modelValue ||
|
|
369
|
+
}), a.modelValue || l("");
|
|
356
370
|
}), (o, t) => {
|
|
357
|
-
var
|
|
358
|
-
const
|
|
359
|
-
return p(),
|
|
360
|
-
e.allowEmail ? (p(),
|
|
371
|
+
var V, E, k, j, L;
|
|
372
|
+
const d = g("FmButtonGroup"), f = g("FmButton"), y = g("FmTextarea"), s = g("FmMenuItem"), $ = g("FmMenu");
|
|
373
|
+
return p(), C("div", ye, [
|
|
374
|
+
e.allowEmail ? (p(), _(d, {
|
|
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: F,
|
|
377
|
+
"model-value": { label: (V = e.modelValue) == null ? void 0 : V.channel },
|
|
378
|
+
"onUpdate:modelValue": t[0] || (t[0] = (u) => l("", u.label))
|
|
379
|
+
}, null, 8, ["model-value"])) : H("", !0),
|
|
380
|
+
((E = e.modelValue) == null ? void 0 : E.channel) == "EMAIL" ? (p(), _(be, {
|
|
367
381
|
key: 1,
|
|
368
|
-
design: (
|
|
369
|
-
title: ((
|
|
370
|
-
"onUpdate:design": t[1] || (t[1] = (
|
|
371
|
-
|
|
382
|
+
design: (k = e.modelValue) == null ? void 0 : k.design,
|
|
383
|
+
title: ((j = e.modelValue) == null ? void 0 : j.title) || void 0,
|
|
384
|
+
"onUpdate:design": t[1] || (t[1] = (u) => {
|
|
385
|
+
l(u, "EMAIL");
|
|
372
386
|
})
|
|
373
|
-
}, null, 8, ["design", "title"])) : (p(),
|
|
374
|
-
v("div",
|
|
387
|
+
}, null, 8, ["design", "title"])) : (p(), C(T, { key: 2 }, [
|
|
388
|
+
v("div", ve, [
|
|
375
389
|
t[2] || (t[2] = v("div", { class: "fm-typo-en-body-lg-400" }, "Add message", -1)),
|
|
376
|
-
h(
|
|
390
|
+
h(f, {
|
|
377
391
|
icon: "visibility",
|
|
378
392
|
label: "Preview message",
|
|
379
393
|
variant: "plain",
|
|
380
|
-
onClick:
|
|
394
|
+
onClick: b
|
|
381
395
|
})
|
|
382
396
|
]),
|
|
383
|
-
v("div",
|
|
384
|
-
h(
|
|
385
|
-
"model-value": (
|
|
386
|
-
"onUpdate:modelValue":
|
|
397
|
+
v("div", xe, [
|
|
398
|
+
h(y, {
|
|
399
|
+
"model-value": (L = e.modelValue) == null ? void 0 : L.content,
|
|
400
|
+
"onUpdate:modelValue": l,
|
|
387
401
|
"show-word-count": !0,
|
|
388
402
|
placeholder: e.placeholder,
|
|
389
|
-
"helper-state":
|
|
390
|
-
"helper-text":
|
|
403
|
+
"helper-state": i(S) || "none",
|
|
404
|
+
"helper-text": i(w)
|
|
391
405
|
}, {
|
|
392
406
|
"helper-text": x(() => [
|
|
393
|
-
|
|
407
|
+
K(W(i(w)), 1)
|
|
394
408
|
]),
|
|
395
409
|
_: 1
|
|
396
410
|
}, 8, ["model-value", "placeholder", "helper-state", "helper-text"]),
|
|
397
|
-
v("div",
|
|
398
|
-
h(
|
|
411
|
+
v("div", Se, [
|
|
412
|
+
h($, { placement: "left-end" }, {
|
|
399
413
|
"menu-button": x(() => [
|
|
400
|
-
h(
|
|
414
|
+
h(f, {
|
|
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(),
|
|
412
|
-
key:
|
|
413
|
-
label: ((
|
|
414
|
-
onClick: (
|
|
415
|
-
var
|
|
416
|
-
return
|
|
421
|
+
(p(!0), C(T, null, X(e.variables.filter(
|
|
422
|
+
(u) => e.triggerType == "SCHEDULE" ? !u.startsWith("transaction.") : !0
|
|
423
|
+
), (u) => {
|
|
424
|
+
var D;
|
|
425
|
+
return p(), _(s, {
|
|
426
|
+
key: u,
|
|
427
|
+
label: ((D = i(se)[u]) == null ? void 0 : D.name) || u,
|
|
428
|
+
onClick: (Ve) => {
|
|
429
|
+
var U;
|
|
430
|
+
return l(((U = e.modelValue) == null ? void 0 : U.content) + `{{${u}}}`);
|
|
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
|
+
Ie as M,
|
|
446
|
+
Le as _
|
|
432
447
|
};
|