@feedmepos/mf-connect 0.1.0-beta.8 → 0.1.0-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-D1vIDmhJ.js +620 -0
- package/dist/{App-SRz4257n.js → App-DHrfWG8l.js} +249 -250
- package/dist/Broadcast-B2rxZAZi.js +216 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CZXSxA9u.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D2a9rcXK.js} +20 -20
- package/dist/Card-Dr6pTTM0.js +824 -0
- package/dist/Collections-0tbg0MFt.js +441 -0
- package/dist/Credit-KbB_7Jq-.js +214 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Cuklmxur.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-we7ADwFk.js} +999 -1018
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-VBNyvZCJ.js +344 -0
- package/dist/Experience-C_Q9Iml8.js +211 -0
- package/dist/Game-BwODw7M6.js +250 -0
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → MainLayout-DpZC6o3R.js} +53 -19
- package/dist/Marketing-QOKTAS_T.js +309 -0
- package/dist/Member-d7RIGRm1.js +92 -0
- package/dist/MemberList-CK9629ew.js +1737 -0
- package/dist/MemberOverview-C2n9oJZh.js +58 -0
- package/dist/{MemberTransactions-BwT3zE2a.js → MemberTransactions-D-pnlXiP.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-3VS7JnK6.js +203 -0
- package/dist/Mission-BAKDm4VZ.js +248 -0
- package/dist/Point-Puu0jKz0.js +220 -0
- package/dist/Promotion-DRIaUvJi.js +244 -0
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BkFm7tXq.js → RuleGroup.vue_vue_type_script_setup_true_lang-DTdfYGya.js} +557 -557
- package/dist/Segment-DpBxGuuu.js +435 -0
- package/dist/Setting-DLB2ywCp.js +1870 -0
- package/dist/Store-8DO6ITWc.js +1513 -0
- package/dist/StoreRewards-DZfqUeYR.js +429 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BqpsMcl1.js → StoreTransactions.vue_vue_type_script_setup_true_lang-RTfozD01.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrzmjYmU.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BGI78ycg.js} +1 -1
- package/dist/{Tier-CJ9-d8Zg.js → Tier-BnQRujpX.js} +453 -481
- package/dist/{Title-DZCpvg4q.js → Title-BPf1tUFx.js} +295 -314
- package/dist/Transaction-ese0oNrz.js +36 -0
- package/dist/Voucher--gtOZQx1.js +485 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +140 -0
- package/dist/app-Bt59niI-.js +2974 -0
- package/dist/{app-Cg2pTZJK.js → app-DHE61XdR.js} +1 -1
- package/dist/app.js +3 -5
- package/dist/{business-Cw_qGw8y.js → business-BSo7EPan.js} +1 -1
- package/dist/{campaign-winsqufa.js → campaign-CsOje3Ap.js} +3 -5
- package/dist/{collection.fn-CI5Llblg.js → collection.fn-BYQfFJOr.js} +2 -2
- package/dist/dto-CfEXSCq6.js +1145 -0
- package/dist/{effect-CdkrIYgX.js → effect-Bn_ofYS3.js} +9 -9
- package/dist/{export-DGxfief1.js → export-CMR243CF.js} +3 -3
- package/dist/{helper-B8RqcTNu.js → helper-BqOQRtvW.js} +1 -1
- package/dist/index-BLDYTxnc.js +28058 -0
- package/dist/{index-Cw_aXFH6.js → index-BWnFs-Cb.js} +281 -299
- package/dist/{index-wzdbEEcZ.js → index-BaBNmzUb.js} +1 -1
- package/dist/{index-CjVmULNd.js → index-Boo5np6l.js} +1 -1
- package/dist/{index-HZC9LLAX.js → index-CC1GV8OW.js} +1 -1
- package/dist/{index-OzicErwL.js → index-CHO4_zsT.js} +1 -1
- package/dist/{index-DAEmawcj.js → index-DEZsrQ2f.js} +3 -3
- package/dist/{index-9w43_U1v.js → index-D_f2lmK2.js} +1 -1
- package/dist/{index-BaozRfWB.js → index-Da142OER.js} +66 -78
- package/dist/index-DbP04yeg.js +11 -0
- package/dist/{index-A34xEz20.js → index-DtPe-TEm.js} +3 -3
- package/dist/{index-BLACZ3-L.js → index-FvlaxwGB.js} +20 -20
- package/dist/{index.esm2017-CppSMh_U.js → index.esm2017-ePm--Atp.js} +55 -55
- package/dist/{loading-DuEFUCwF.js → loading-KNmEMBUB.js} +460 -469
- package/dist/{membership-nsMtWeTC.js → membership-DKoVIS1a.js} +3 -3
- package/dist/money-CkD3zl5C.js +15 -0
- package/dist/number-BDsGpOXm.js +12 -0
- package/dist/{rule-CPIMqt1h.js → rule-CzamI50_.js} +2 -2
- package/dist/{rule-builder-CSs5XRKP.js → rule-builder-DHf6wfaQ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-CJZoYavu.js → template-CFAIPoD7.js} +63 -63
- package/dist/{usePagination-BeF5K3M7.js → usePagination-JoYaROkV.js} +85 -85
- package/dist/{xlsx-BZlnYinX.js → xlsx-BDJMaozs.js} +517 -517
- package/package.json +4 -7
- package/dist/Analytic-5QztrYSp.js +0 -622
- package/dist/Broadcast-DmkrJGp2.js +0 -223
- package/dist/Card-BsjFTVsH.js +0 -825
- package/dist/Collections-7wqZHOax.js +0 -453
- package/dist/Credit-CcNrq9qk.js +0 -220
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BIZDiLns.js +0 -345
- package/dist/Experience-DNsQLzDH.js +0 -221
- package/dist/Game-DlzDerT7.js +0 -255
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
- package/dist/MainLayout-B1aJoR95.js +0 -41
- package/dist/Marketing-BqhpaG4o.js +0 -316
- package/dist/Member-AFgZcdtz.js +0 -69
- package/dist/MemberList-BKgrLz2C.js +0 -1733
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-GCEQCVOt.js +0 -432
- package/dist/Mission-BTAia7AS.js +0 -261
- package/dist/Point-Ck8EG_3k.js +0 -222
- package/dist/Promotion-0v3kvsK3.js +0 -247
- 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/Transaction-DpnTxlbf.js +0 -39
- package/dist/Voucher-DsP_rh8I.js +0 -490
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-SukfoJpU.js +0 -56
- package/dist/app-DzAexOqx.js +0 -5639
- package/dist/dto-ozu1smC3.js +0 -2770
- package/dist/index-CZgQVRsm.js +0 -3
- package/dist/index-Oxr-mU6h.js +0 -29193
- package/dist/money-BGZPFtUc.js +0 -15
- package/dist/number-4J0xvXP9.js +0 -12
- package/dist/vue-i18n-CCyiVzOE.js +0 -2365
- package/dist/zod-Bg2FbC-D.js +0 -90
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { components as U } from "@feedmepos/ui-library";
|
|
2
|
-
import { n as o } from "./index-
|
|
2
|
+
import { n as o } from "./index-D_f2lmK2.js";
|
|
3
3
|
import { h as f, ref as r } from "vue";
|
|
4
4
|
import { defineStore as V } from "pinia";
|
|
5
|
-
import { m as p } from "./index-
|
|
6
|
-
import { g as c, u as k } from "./index-
|
|
5
|
+
import { m as p } from "./index-CC1GV8OW.js";
|
|
6
|
+
import { g as c, u as k } from "./index-BLDYTxnc.js";
|
|
7
7
|
function i(t) {
|
|
8
8
|
return f(
|
|
9
9
|
"div",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { c as r } from "./index-BLDYTxnc.js";
|
|
2
|
+
function n(o) {
|
|
3
|
+
return r.Dinero.fromNumber({ number: o });
|
|
4
|
+
}
|
|
5
|
+
function t() {
|
|
6
|
+
return r.Dinero.zero().toObject();
|
|
7
|
+
}
|
|
8
|
+
function i() {
|
|
9
|
+
return r.Dinero.zero();
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
i as a,
|
|
13
|
+
n as t,
|
|
14
|
+
t as z
|
|
15
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { c as n } from "./index-BLDYTxnc.js";
|
|
2
|
+
function s(t) {
|
|
3
|
+
return n.DineroFactory(t).multiply(100).toFormat(!1);
|
|
4
|
+
}
|
|
5
|
+
function c(t, r = 2, o = !1) {
|
|
6
|
+
const e = parseFloat(String(t)).toFixed(r);
|
|
7
|
+
return o ? parseFloat(e).toString() : e;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
s as F,
|
|
11
|
+
c as f
|
|
12
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h as S } from "./moment-BWErdI6_.js";
|
|
2
2
|
import { a as de, b as N, c as y } from "./tslib.es6-BCqqvLQ_.js";
|
|
3
|
-
import { u as ee } from "./membership-
|
|
4
|
-
import { R as P, a as pe } from "./rule-builder-
|
|
3
|
+
import { u as ee } from "./membership-DKoVIS1a.js";
|
|
4
|
+
import { R as P, a as pe } from "./rule-builder-DHf6wfaQ.js";
|
|
5
5
|
var ue = [
|
|
6
6
|
"MO",
|
|
7
7
|
"TU",
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.json-viewer[data-v-d8502b13]{font-family:monospace;white-space:pre-wrap}.fm-effect-sheet>div{padding:0!important;border-radius:0!important}.fm-effect-sheet>div>div>div{padding:0!important}.
|
|
1
|
+
.json-viewer[data-v-d8502b13]{font-family:monospace;white-space:pre-wrap}.fm-effect-sheet>div{padding:0!important;border-radius:0!important}.fm-effect-sheet>div>div>div{padding:0!important}.tab-option-selected[data-v-4c2ef18e]{background-color:var(--fm-color-system-orange-100)}::-webkit-scrollbar{height:4px!important;width:8px!important}::-webkit-scrollbar-thumb{background:var(--fm-color-neutral-gray-200)!important;border-radius:1000px!important}.fm-top-sheet--fullscreen-lg{gap:0px!important;padding-bottom:0!important}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as L, openBlock as r, createBlock as C, resolveDynamicComponent as D, unref as e, ref as E, computed as I, onMounted as j, resolveComponent as
|
|
2
|
-
import { u as P } from "./campaign-
|
|
1
|
+
import { defineComponent as L, openBlock as r, createBlock as C, resolveDynamicComponent as D, unref as e, ref as E, computed as I, onMounted as j, resolveComponent as m, withCtx as d, createElementVNode as s, createElementBlock as h, createVNode as a, normalizeClass as w, createTextVNode as T, Fragment as S, renderList as N, toDisplayString as g, createCommentVNode as M } from "vue";
|
|
2
|
+
import { u as P } from "./campaign-CsOje3Ap.js";
|
|
3
3
|
import { useDialog as q } from "@feedmepos/ui-library";
|
|
4
|
-
import { F as J } from "./index-
|
|
5
|
-
import { C as A } from "./collection.fn-
|
|
4
|
+
import { F as J } from "./index-BWnFs-Cb.js";
|
|
5
|
+
import { C as A } from "./collection.fn-BYQfFJOr.js";
|
|
6
6
|
import { s as V } from "./index-CuvNtC_M.js";
|
|
7
7
|
import { _ as G } from "./lodash-B5I3zXaY.js";
|
|
8
|
-
import { C as H } from "./dto-
|
|
8
|
+
import { C as H } from "./dto-CfEXSCq6.js";
|
|
9
9
|
import { J as U } from "./JsonViewer-v8_C7l5N.js";
|
|
10
10
|
const K = /* @__PURE__ */ L({
|
|
11
11
|
__name: "CampaignChip",
|
|
@@ -13,13 +13,13 @@ const K = /* @__PURE__ */ L({
|
|
|
13
13
|
type: { type: String, required: !0 }
|
|
14
14
|
},
|
|
15
15
|
setup(u) {
|
|
16
|
-
const
|
|
17
|
-
return (
|
|
16
|
+
const i = H[u.type];
|
|
17
|
+
return (n, t) => (r(), C(D(e(i).chip())));
|
|
18
18
|
}
|
|
19
19
|
}), Q = { class: "flex flex-nowrap gap-x-2 grow h-full" }, R = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "p-8 w-1/4"
|
|
22
|
-
}, W = { class: "flex flex-col grow p-24" }, X = { class: "space-y-4" }, Y = { class: "fm-typo-en-title-sm-800" }, Z = { class: "grow pb-16 pr-16 pt-6 w-full max-h-[400px] overflow-y-auto" },
|
|
22
|
+
}, W = { class: "flex flex-col grow p-24" }, X = { class: "space-y-4" }, Y = { class: "fm-typo-en-title-sm-800" }, Z = /* @__PURE__ */ s("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, " Get started faster with templates that flex with your business. ", -1), ee = { class: "grow pb-16 pr-16 pt-6 w-full max-h-[400px] overflow-y-auto" }, te = { class: "gap-24 grid grid-cols-1 lg:grid-cols-2" }, ne = { class: "gap-4 h-[22px] inline-flex items-center justify-center min-w-min rounded-md" }, oe = { class: "fm-typo-en-title-sm-800" }, se = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, le = { class: "flex gap-4 items-end justify-end py-8" }, ae = /* @__PURE__ */ L({
|
|
23
23
|
__name: "TemplateDialog",
|
|
24
24
|
props: {
|
|
25
25
|
campaignType: {
|
|
@@ -33,72 +33,72 @@ const K = /* @__PURE__ */ L({
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
setup(u) {
|
|
36
|
-
const p = q(),
|
|
36
|
+
const p = q(), i = P(), n = u, t = E({
|
|
37
37
|
intention: null,
|
|
38
38
|
template: null
|
|
39
39
|
}), b = I(() => {
|
|
40
|
-
const
|
|
40
|
+
const c = (i.templates ?? []).filter(
|
|
41
41
|
() => !0
|
|
42
42
|
//t.intention && t.intention.length > 0
|
|
43
43
|
);
|
|
44
|
-
return
|
|
45
|
-
(
|
|
46
|
-
var
|
|
47
|
-
return ((f = (
|
|
44
|
+
return n.campaignType ? c.filter(
|
|
45
|
+
(l) => {
|
|
46
|
+
var _, f;
|
|
47
|
+
return ((f = (_ = l.defaultValue) == null ? void 0 : _.campaign) == null ? void 0 : f.type) === n.campaignType;
|
|
48
48
|
}
|
|
49
|
-
) : t.value.intention === null ? G.sampleSize(
|
|
50
|
-
(
|
|
49
|
+
) : t.value.intention === null ? G.sampleSize(c, 7) : c.filter(
|
|
50
|
+
(l) => l.intention.includes(t.value.intention)
|
|
51
51
|
);
|
|
52
52
|
});
|
|
53
53
|
j(async () => {
|
|
54
|
-
await
|
|
54
|
+
await i.readTemplates();
|
|
55
55
|
});
|
|
56
56
|
function O() {
|
|
57
|
-
|
|
57
|
+
n.onOk(void 0), p.close();
|
|
58
58
|
}
|
|
59
59
|
function $() {
|
|
60
|
-
const
|
|
61
|
-
|
|
60
|
+
const c = t.value.template;
|
|
61
|
+
n.onOk(i.templates.find((l) => l._id === c)), p.close();
|
|
62
62
|
}
|
|
63
|
-
return (
|
|
64
|
-
const
|
|
63
|
+
return (c, l) => {
|
|
64
|
+
const _ = m("FmChip"), f = m("FmListItem"), z = m("FmList"), k = m("FmCard"), v = m("FmButton"), B = m("FmSpacer");
|
|
65
65
|
return r(), C(k, { class: "h-[534px] max-w-6xl" }, {
|
|
66
66
|
default: d(() => [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
s("div", Q, [
|
|
68
|
+
n.campaignType ? M("", !0) : (r(), h("div", R, [
|
|
69
|
+
a(z, null, {
|
|
70
70
|
default: d(() => [
|
|
71
|
-
|
|
72
|
-
class:
|
|
71
|
+
a(f, {
|
|
72
|
+
class: w([{
|
|
73
73
|
"bg-fm-color-system-warning-100": e(t).intention === null
|
|
74
74
|
}, "rounded-sm"]),
|
|
75
|
-
onClick:
|
|
75
|
+
onClick: l[0] || (l[0] = (o) => {
|
|
76
76
|
e(t).intention = null, e(t).template = null;
|
|
77
77
|
})
|
|
78
78
|
}, {
|
|
79
79
|
append: d(() => [
|
|
80
|
-
|
|
80
|
+
a(_, {
|
|
81
81
|
label: "Hot",
|
|
82
82
|
variant: "critical"
|
|
83
83
|
})
|
|
84
84
|
]),
|
|
85
85
|
default: d(() => [
|
|
86
|
-
|
|
86
|
+
T(" Most popular ")
|
|
87
87
|
]),
|
|
88
88
|
_: 1
|
|
89
89
|
}, 8, ["class"]),
|
|
90
|
-
(r(!0),
|
|
90
|
+
(r(!0), h(S, null, N(e(J).options, (o, x) => (r(), C(f, {
|
|
91
91
|
key: x,
|
|
92
|
-
class:
|
|
93
|
-
"bg-fm-color-system-warning-100": e(t).intention ===
|
|
92
|
+
class: w(["rounded-sm", {
|
|
93
|
+
"bg-fm-color-system-warning-100": e(t).intention === o
|
|
94
94
|
}]),
|
|
95
95
|
style: { padding: "8px 16px" },
|
|
96
|
-
onClick: (
|
|
97
|
-
e(t).intention =
|
|
96
|
+
onClick: (y) => {
|
|
97
|
+
e(t).intention = o, e(t).template = null;
|
|
98
98
|
}
|
|
99
99
|
}, {
|
|
100
100
|
default: d(() => [
|
|
101
|
-
T(g(e(V)(
|
|
101
|
+
T(g(e(V)(o)), 1)
|
|
102
102
|
]),
|
|
103
103
|
_: 2
|
|
104
104
|
}, 1032, ["class", "onClick"]))), 128))
|
|
@@ -106,57 +106,57 @@ const K = /* @__PURE__ */ L({
|
|
|
106
106
|
_: 1
|
|
107
107
|
})
|
|
108
108
|
])),
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
`${e(A).formattedType(
|
|
109
|
+
s("div", W, [
|
|
110
|
+
s("div", X, [
|
|
111
|
+
s("div", Y, g(n.campaignType ? e(V)(
|
|
112
|
+
`${e(A).formattedType(n.campaignType)} campaign`
|
|
113
113
|
) : "Template list"), 1),
|
|
114
|
-
|
|
114
|
+
Z
|
|
115
115
|
]),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
(r(!0),
|
|
116
|
+
s("div", ee, [
|
|
117
|
+
a(U, { json: e(b) }, null, 8, ["json"]),
|
|
118
|
+
s("div", te, [
|
|
119
|
+
(r(!0), h(S, null, N(e(b), (o, x) => (r(), C(k, {
|
|
120
120
|
key: x,
|
|
121
121
|
variant: "outlined",
|
|
122
|
-
class:
|
|
123
|
-
"bg-fm-color-system-warning-100 border-fm-color-primary border-2": e(t).template ===
|
|
122
|
+
class: w(["box-border cursor-pointer h-full p-16 scroll-p-4 space-y-8", {
|
|
123
|
+
"bg-fm-color-system-warning-100 border-fm-color-primary border-2": e(t).template === o._id.toString()
|
|
124
124
|
}]),
|
|
125
|
-
onClick: (
|
|
125
|
+
onClick: (y) => e(t).template = o._id.toString()
|
|
126
126
|
}, {
|
|
127
127
|
default: d(() => {
|
|
128
|
-
var
|
|
128
|
+
var y, F;
|
|
129
129
|
return [
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
type: (F = (
|
|
130
|
+
s("div", ne, [
|
|
131
|
+
a(K, {
|
|
132
|
+
type: (F = (y = o.defaultValue) == null ? void 0 : y.campaign) == null ? void 0 : F.type
|
|
133
133
|
}, null, 8, ["type"])
|
|
134
134
|
]),
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
s("div", oe, g(o.name), 1),
|
|
136
|
+
s("p", se, g(o.description), 1)
|
|
137
137
|
];
|
|
138
138
|
}),
|
|
139
139
|
_: 2
|
|
140
140
|
}, 1032, ["class", "onClick"]))), 128))
|
|
141
141
|
])
|
|
142
142
|
]),
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
s("div", le, [
|
|
144
|
+
a(v, {
|
|
145
145
|
class: "sm:w-full xs:w-full",
|
|
146
146
|
variant: "plain",
|
|
147
147
|
label: "Custom Campaign",
|
|
148
148
|
size: "md",
|
|
149
149
|
onClick: O
|
|
150
150
|
}),
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
a(B, { class: "sm:hidden xs:hidden" }),
|
|
152
|
+
a(v, {
|
|
153
153
|
class: "sm:w-full xs:w-full",
|
|
154
154
|
variant: "tertiary",
|
|
155
155
|
label: "Cancel",
|
|
156
156
|
size: "md",
|
|
157
|
-
onClick:
|
|
157
|
+
onClick: l[1] || (l[1] = (o) => e(p).close())
|
|
158
158
|
}),
|
|
159
|
-
|
|
159
|
+
a(v, {
|
|
160
160
|
class: "sm:w-full xs:w-full",
|
|
161
161
|
variant: "primary",
|
|
162
162
|
label: "Start",
|
|
@@ -173,13 +173,13 @@ const K = /* @__PURE__ */ L({
|
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
175
|
}), ye = (u, p) => ({
|
|
176
|
-
open: async (
|
|
176
|
+
open: async (i) => {
|
|
177
177
|
p.open({
|
|
178
178
|
title: "",
|
|
179
|
-
dialogComponent:
|
|
179
|
+
dialogComponent: ae,
|
|
180
180
|
dialogComponentProps: {
|
|
181
181
|
campaignType: u,
|
|
182
|
-
onOk: async (
|
|
182
|
+
onOk: async (n) => (console.debug(n, "selected template"), await i(n))
|
|
183
183
|
},
|
|
184
184
|
overlay: !0
|
|
185
185
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as M, ref as w, resolveComponent as C, openBlock as v, createBlock as F, withCtx as B, createVNode as c, createElementVNode as i, normalizeStyle as N, createElementBlock as
|
|
1
|
+
import { defineComponent as M, ref as w, resolveComponent as C, openBlock as v, createBlock as F, withCtx as B, createVNode as c, createElementVNode as i, normalizeStyle as N, createElementBlock as x, Fragment as P, renderList as E, computed as b, onMounted as L, watch as R, unref as p, createCommentVNode as V, toDisplayString as k } from "vue";
|
|
2
2
|
import { l as A } from "./lodash-B5I3zXaY.js";
|
|
3
3
|
const T = ["id"], D = /* @__PURE__ */ M({
|
|
4
4
|
__name: "FmTableSelection",
|
|
@@ -8,10 +8,10 @@ const T = ["id"], D = /* @__PURE__ */ M({
|
|
|
8
8
|
},
|
|
9
9
|
emits: ["update:modelValue"],
|
|
10
10
|
setup(f, { emit: g }) {
|
|
11
|
-
const
|
|
11
|
+
const o = g, t = f, r = w(!1);
|
|
12
12
|
return (d, u) => {
|
|
13
|
-
const
|
|
14
|
-
return v(), F(
|
|
13
|
+
const h = C("FmButton"), y = C("FmMenuItem"), a = C("FmMenu");
|
|
14
|
+
return v(), F(a, {
|
|
15
15
|
"max-height": 264,
|
|
16
16
|
shift: "",
|
|
17
17
|
onMenuChanged: u[0] || (u[0] = (n) => r.value = n)
|
|
@@ -19,9 +19,9 @@ const T = ["id"], D = /* @__PURE__ */ M({
|
|
|
19
19
|
"menu-button": B(() => {
|
|
20
20
|
var n;
|
|
21
21
|
return [
|
|
22
|
-
c(
|
|
22
|
+
c(h, {
|
|
23
23
|
icon: r.value ? "expand_less" : "expand_more",
|
|
24
|
-
label: (n = d.items.find((
|
|
24
|
+
label: (n = d.items.find((l) => l.value === t.value)) == null ? void 0 : n.label,
|
|
25
25
|
"icon-position": "append",
|
|
26
26
|
size: "md",
|
|
27
27
|
variant: "tertiary"
|
|
@@ -34,12 +34,12 @@ const T = ["id"], D = /* @__PURE__ */ M({
|
|
|
34
34
|
style: N({ maxHeight: `${n}px` }),
|
|
35
35
|
class: "bg-fm-color-neutral-white flex flex-col overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"
|
|
36
36
|
}, [
|
|
37
|
-
(v(!0),
|
|
38
|
-
key:
|
|
39
|
-
label:
|
|
40
|
-
value:
|
|
41
|
-
"model-value":
|
|
42
|
-
"onUpdate:modelValue": (
|
|
37
|
+
(v(!0), x(P, null, E(d.items, (l) => (v(), F(y, {
|
|
38
|
+
key: l.value,
|
|
39
|
+
label: l.label,
|
|
40
|
+
value: l.value,
|
|
41
|
+
"model-value": l.value === t.value,
|
|
42
|
+
"onUpdate:modelValue": (S) => o("update:modelValue", l.value)
|
|
43
43
|
}, null, 8, ["label", "value", "model-value", "onUpdate:modelValue"]))), 128))
|
|
44
44
|
], 12, T)
|
|
45
45
|
]),
|
|
@@ -50,10 +50,13 @@ const T = ["id"], D = /* @__PURE__ */ M({
|
|
|
50
50
|
}), U = { class: "" }, O = {
|
|
51
51
|
key: 0,
|
|
52
52
|
class: "w-full flex flex-col gap-16 items-center py-16"
|
|
53
|
-
}, j = {
|
|
53
|
+
}, j = /* @__PURE__ */ i("div", { class: "fm-typo-en-body-lg-600" }, "No data found", -1), W = /* @__PURE__ */ i("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " No data to show at the current moment. ", -1), q = [
|
|
54
|
+
j,
|
|
55
|
+
W
|
|
56
|
+
], G = {
|
|
54
57
|
key: 1,
|
|
55
58
|
class: "basis-72 bg-white flex items-center justify-between px-24 pt-6 border-t border-fm-color-border"
|
|
56
|
-
},
|
|
59
|
+
}, H = { class: "flex gap-24 items-center justify-between xs:hidden xs:invisible" }, J = { class: "flex gap-8 items-center" }, K = /* @__PURE__ */ i("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, " Items per page: ", -1), Q = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, X = { class: "flex gap-8 items-center" }, Y = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto" }, Z = { class: "flex gap-8" }, ae = /* @__PURE__ */ M({
|
|
57
60
|
__name: "BaseTable",
|
|
58
61
|
props: {
|
|
59
62
|
rowData: {},
|
|
@@ -73,27 +76,27 @@ const T = ["id"], D = /* @__PURE__ */ M({
|
|
|
73
76
|
},
|
|
74
77
|
emits: ["sortChange", "rowClick", "pageChange"],
|
|
75
78
|
setup(f, { emit: g }) {
|
|
76
|
-
const
|
|
77
|
-
() => Math.min(d.value +
|
|
78
|
-
),
|
|
79
|
-
|
|
79
|
+
const o = f, t = g, r = b(() => o.pageIndex + 1), d = b(() => o.pageIndex * o.pageSize), u = b(
|
|
80
|
+
() => Math.min(d.value + o.pageSize, o.rowCount || 0)
|
|
81
|
+
), h = b(() => o.pageIndex > 0), y = b(() => o.pageIndex < o.pageCount - 1), a = (e) => {
|
|
82
|
+
t("sortChange", e);
|
|
80
83
|
}, n = (e) => {
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
},
|
|
84
|
+
t("rowClick", e);
|
|
85
|
+
}, l = (e) => {
|
|
86
|
+
t("pageChange", { pageIndex: e, pageSize: o.pageSize });
|
|
87
|
+
}, S = (e) => {
|
|
88
|
+
t("pageChange", { pageIndex: 0, pageSize: e });
|
|
89
|
+
}, z = w(!1);
|
|
87
90
|
return L(() => {
|
|
88
91
|
R(
|
|
89
|
-
() =>
|
|
90
|
-
(e,
|
|
91
|
-
|
|
92
|
+
() => o.loading,
|
|
93
|
+
(e, s) => {
|
|
94
|
+
s === !0 && e === !1 && (z.value = !0);
|
|
92
95
|
}
|
|
93
96
|
);
|
|
94
|
-
}), (e,
|
|
95
|
-
const $ = C("FmTable"),
|
|
96
|
-
return v(),
|
|
97
|
+
}), (e, s) => {
|
|
98
|
+
const $ = C("FmTable"), _ = C("FmButton");
|
|
99
|
+
return v(), x("div", U, [
|
|
97
100
|
c($, {
|
|
98
101
|
loading: e.loading,
|
|
99
102
|
"row-data": e.rowData,
|
|
@@ -104,63 +107,60 @@ const T = ["id"], D = /* @__PURE__ */ M({
|
|
|
104
107
|
"page-size": e.pageSize,
|
|
105
108
|
"fetch-fn": void 0,
|
|
106
109
|
"hide-footer": "",
|
|
107
|
-
onSortChange:
|
|
110
|
+
onSortChange: a,
|
|
108
111
|
onRowClick: n
|
|
109
112
|
}, null, 8, ["loading", "row-data", "row-count", "column-defs", "shrink-at", "page-count", "page-size"]),
|
|
110
|
-
e.rowData.length == 0 && e.loading == !1 && p(
|
|
111
|
-
|
|
112
|
-
i("div",
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
i("div", W, [
|
|
116
|
-
i("div", q, [
|
|
117
|
-
t[6] || (t[6] = i("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, " Items per page: ", -1)),
|
|
113
|
+
e.rowData.length == 0 && e.loading == !1 && p(z) ? (v(), x("div", O, q)) : V("", !0),
|
|
114
|
+
e.hideFooter ? V("", !0) : (v(), x("div", G, [
|
|
115
|
+
i("div", H, [
|
|
116
|
+
i("div", J, [
|
|
117
|
+
K,
|
|
118
118
|
c(D, {
|
|
119
119
|
items: e.pageSizeOptions,
|
|
120
120
|
value: e.pageSize,
|
|
121
|
-
"onUpdate:modelValue":
|
|
121
|
+
"onUpdate:modelValue": S
|
|
122
122
|
}, null, 8, ["items", "value"])
|
|
123
123
|
]),
|
|
124
|
-
i("span",
|
|
124
|
+
i("span", Q, k(p(d) + 1) + " - " + k(p(u)) + " of " + k(e.rowCount) + " items ", 1)
|
|
125
125
|
]),
|
|
126
|
-
i("div",
|
|
126
|
+
i("div", X, [
|
|
127
127
|
c(D, {
|
|
128
|
-
items: Array.from(Array(e.pageCount), (m,
|
|
129
|
-
label: (
|
|
130
|
-
value:
|
|
128
|
+
items: Array.from(Array(e.pageCount), (m, I) => ({
|
|
129
|
+
label: (I + 1).toString(),
|
|
130
|
+
value: I + 1
|
|
131
131
|
})),
|
|
132
132
|
value: p(r),
|
|
133
|
-
"onUpdate:modelValue":
|
|
133
|
+
"onUpdate:modelValue": s[0] || (s[0] = (m) => l(m - 1))
|
|
134
134
|
}, null, 8, ["items", "value"]),
|
|
135
|
-
i("span",
|
|
136
|
-
i("div",
|
|
137
|
-
c(
|
|
138
|
-
disabled: !p(
|
|
135
|
+
i("span", Y, " of " + k(e.pageCount) + " pages ", 1),
|
|
136
|
+
i("div", Z, [
|
|
137
|
+
c(_, {
|
|
138
|
+
disabled: !p(h),
|
|
139
139
|
icon: "first_page",
|
|
140
140
|
"icon-color": "neutral-black",
|
|
141
141
|
variant: "tertiary",
|
|
142
|
-
onClick:
|
|
142
|
+
onClick: s[1] || (s[1] = (m) => l(0))
|
|
143
143
|
}, null, 8, ["disabled"]),
|
|
144
|
-
c(
|
|
145
|
-
disabled: !p(
|
|
144
|
+
c(_, {
|
|
145
|
+
disabled: !p(h),
|
|
146
146
|
icon: "chevron_left",
|
|
147
147
|
"icon-color": "neutral-black",
|
|
148
148
|
variant: "tertiary",
|
|
149
|
-
onClick:
|
|
149
|
+
onClick: s[2] || (s[2] = (m) => l(e.pageIndex - 1))
|
|
150
150
|
}, null, 8, ["disabled"]),
|
|
151
|
-
c(
|
|
152
|
-
disabled: !p(
|
|
151
|
+
c(_, {
|
|
152
|
+
disabled: !p(y),
|
|
153
153
|
icon: "chevron_right",
|
|
154
154
|
"icon-color": "neutral-black",
|
|
155
155
|
variant: "tertiary",
|
|
156
|
-
onClick:
|
|
156
|
+
onClick: s[3] || (s[3] = (m) => l(e.pageIndex + 1))
|
|
157
157
|
}, null, 8, ["disabled"]),
|
|
158
|
-
c(
|
|
159
|
-
disabled: !p(
|
|
158
|
+
c(_, {
|
|
159
|
+
disabled: !p(y),
|
|
160
160
|
icon: "last_page",
|
|
161
161
|
"icon-color": "neutral-black",
|
|
162
162
|
variant: "tertiary",
|
|
163
|
-
onClick:
|
|
163
|
+
onClick: s[4] || (s[4] = (m) => l(e.pageCount - 1))
|
|
164
164
|
}, null, 8, ["disabled"])
|
|
165
165
|
])
|
|
166
166
|
])
|
|
@@ -169,55 +169,55 @@ const T = ["id"], D = /* @__PURE__ */ M({
|
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
171
|
});
|
|
172
|
-
function
|
|
173
|
-
const
|
|
172
|
+
function ne(f, g = { key: "_id", descending: !0 }) {
|
|
173
|
+
const o = w({
|
|
174
174
|
pageCount: 0,
|
|
175
175
|
searchValue: "",
|
|
176
176
|
pageIndex: 0,
|
|
177
177
|
totalRows: 0,
|
|
178
178
|
isLoading: !1,
|
|
179
179
|
pageSize: 10
|
|
180
|
-
}),
|
|
181
|
-
|
|
180
|
+
}), t = w(g), r = w([]), d = async (a) => {
|
|
181
|
+
o.value.isLoading = !0, r.value = [];
|
|
182
182
|
try {
|
|
183
183
|
const n = await f({
|
|
184
|
-
limit:
|
|
185
|
-
skip:
|
|
186
|
-
sortBy:
|
|
187
|
-
descending:
|
|
188
|
-
search:
|
|
184
|
+
limit: a.pageSize || o.value.pageSize,
|
|
185
|
+
skip: a.pageIndex ?? 0,
|
|
186
|
+
sortBy: t.value.key,
|
|
187
|
+
descending: t.value.descending,
|
|
188
|
+
search: o.value.searchValue
|
|
189
189
|
});
|
|
190
|
-
r.value = n.resources,
|
|
190
|
+
r.value = n.resources, o.value.totalRows = n.meta.totalResources ?? 0, o.value.pageCount = n.meta.totalPages ?? 0, o.value.pageIndex = n.meta.skip ?? 0;
|
|
191
191
|
} catch (n) {
|
|
192
192
|
console.error("Error fetching data:", n);
|
|
193
193
|
} finally {
|
|
194
|
-
|
|
194
|
+
o.value.isLoading = !1;
|
|
195
195
|
}
|
|
196
|
-
}, u = A.debounce(async (
|
|
197
|
-
|
|
198
|
-
pageSize:
|
|
199
|
-
pageIndex: (
|
|
196
|
+
}, u = A.debounce(async (a) => {
|
|
197
|
+
o.value.pageSize = (a == null ? void 0 : a.pageSize) || o.value.pageSize, await d({
|
|
198
|
+
pageSize: o.value.pageSize,
|
|
199
|
+
pageIndex: (a == null ? void 0 : a.pageIndex) || 0
|
|
200
200
|
});
|
|
201
201
|
}, 200);
|
|
202
202
|
return {
|
|
203
|
-
tableMeta:
|
|
203
|
+
tableMeta: o,
|
|
204
204
|
rowData: r,
|
|
205
|
-
sortBy:
|
|
205
|
+
sortBy: t,
|
|
206
206
|
fetchData: d,
|
|
207
207
|
debouncedFetchData: u,
|
|
208
|
-
onSort: async (
|
|
208
|
+
onSort: async (a) => {
|
|
209
209
|
var n;
|
|
210
|
-
console.log("sortState", (n =
|
|
211
|
-
key:
|
|
212
|
-
descending:
|
|
213
|
-
}, console.log("sortBy",
|
|
210
|
+
console.log("sortState", (n = a[0]) == null ? void 0 : n.id), a.length ? (t.value = {
|
|
211
|
+
key: a[0].id.startsWith("_") ? a[0].id : a[0].id.replace(new RegExp("_", "g"), "."),
|
|
212
|
+
descending: a[0].desc
|
|
213
|
+
}, console.log("sortBy", t.value)) : t.value = g, await u();
|
|
214
214
|
},
|
|
215
215
|
onSearch: () => {
|
|
216
|
-
u({ pageIndex: 0, pageSize:
|
|
216
|
+
u({ pageIndex: 0, pageSize: o.value.pageSize });
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
220
|
export {
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
ae as _,
|
|
222
|
+
ne as u
|
|
223
223
|
};
|