@feedmepos/mf-connect 0.1.87-prod → 0.1.89-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-B9s-dPCT.js → Analytic-Caz3AQQ2.js} +11 -11
- package/dist/{App-Bu9NaLJ4.js → App-D_q4nHiY.js} +7 -7
- package/dist/{Bin-BUUuvk8j.js → Bin-DURa0qe2.js} +8 -8
- package/dist/{Broadcast-VvFRuN2K.js → Broadcast-ByDjXqap.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CgA2btmM.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BD8mWUzO.js} +7 -7
- package/dist/{Card--OD7WD_W.js → Card-BSSzVrbz.js} +19 -19
- package/dist/{Collections-DemrIeUs.js → Collections-CTwUl8W3.js} +8 -8
- package/dist/{Credit-PFNGAhPj.js → Credit-TgZBmYsM.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DyuJDS7x.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DZV3JtDl.js} +33 -33
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BLjGHozS.js → EffectSheet.vue_vue_type_style_index_0_lang-BwOs5NHt.js} +6 -6
- package/dist/{Experience-BCVsnWYw.js → Experience-DUCO6do6.js} +8 -8
- package/dist/{FileSaver.min-BMBGjHQ2.js → FileSaver.min-BaCfYtPG.js} +1 -1
- package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
- package/dist/{Game-B3Gxv2v-.js → Game-DcwQSCjZ.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CyMgFI2D.js → ImageInput.vue_vue_type_script_setup_true_lang-BSMwEFqp.js} +1 -1
- package/dist/{Index-R4XrhBHJ.js → Index-Bp2CKHw3.js} +10 -10
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DjpZnU4y.js → LottieAnimation.vue_vue_type_script_setup_true_lang-WWVHvcOU.js} +1 -1
- package/dist/{MainLayout-Cd8eCkPV.js → MainLayout-Q_0POZ4I.js} +1 -1
- package/dist/{Marketing-BzBEJgtQ.js → Marketing-D52IYXPR.js} +6 -6
- package/dist/{Member-CTFEe38e.js → Member-sxjxhLwQ.js} +12 -12
- package/dist/{MemberList-oL4hRjbk.js → MemberList-vLNFHNRw.js} +27 -27
- package/dist/{MemberTransactions-CUzzrl_F.js → MemberTransactions-BeHeN0Rk.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D3X7vfMo.js → MessageInput.vue_vue_type_script_setup_true_lang-B6cF0EC3.js} +9 -9
- package/dist/{Mission-C93sLLDp.js → Mission-CnJCjBhe.js} +9 -9
- package/dist/{Overview-CANS2hu-.js → Overview-B3jRs_Cg.js} +19 -19
- package/dist/{Point-D3Qk09Kr.js → Point-BldY5wb0.js} +8 -8
- package/dist/{Promotion-Dtd_dDh4.js → Promotion-CsGhqlY0.js} +9 -9
- package/dist/{Queue-bAOANEOe.js → Queue-CLa2pSXF.js} +11 -11
- package/dist/{Record-7Nsigxg9.js → Record-JbbAM6lI.js} +9 -9
- package/dist/{Reward-BCCSo5Ao.js → Reward-wgiBCIV3.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-sVQ2XtOZ.js → RewardGroup.vue_vue_type_script_setup_true_lang-DiNlpy7_.js} +12 -12
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-B3Ylb1vx.js +1889 -0
- package/dist/{Segment-BTtsXpEm.js → Segment-BQiZ51Wi.js} +25 -25
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Etmkc-3s.js → SelectItems.vue_vue_type_script_setup_true_lang-DbXFTjAN.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dc2_TQiF.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Be_kiAB6.js} +13 -13
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DS1MWUOc.js +226 -0
- package/dist/Setting-De1lCG6N.js +1989 -0
- package/dist/{SettingAdvertisements-D9Lhamel.js → SettingAdvertisements-OdDM05s7.js} +12 -12
- package/dist/{Store-VZ8appMT.js → Store-D1Q0wOXk.js} +289 -285
- package/dist/{StoreRewards-egMoq16P.js → StoreRewards-2Gdv7uu4.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Bh33_foI.js → StoreTransactions.vue_vue_type_script_setup_true_lang-NtxHf8HF.js} +20 -20
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BKzZIJkt.js +140 -0
- package/dist/{Tier-IQfhLdUW.js → Tier-DOnYGgah.js} +22 -22
- package/dist/{Title-DAhwskG_.js → Title-F4XJw6oN.js} +21 -21
- package/dist/{Transaction-DoYHMx8C.js → Transaction-Ws7kBZUE.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-B6SAfZCS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BZb0EXgi.js} +6 -6
- package/dist/{Voucher-CjUzxTj9.js → Voucher-DX8MKz00.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DjwuuQOy.js → VoucherEditor.vue_vue_type_script_setup_true_lang-tUNn1vRE.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-905euk7D.js → ZodTextField.vue_vue_type_script_setup_true_lang-BvgIZlIh.js} +2 -2
- package/dist/{app-BQKaKSTN.js → app-C-nC9SMv.js} +368 -83
- package/dist/app.js +1 -1
- package/dist/{business-D-Y0xqsG.js → business-CrQ_qouH.js} +1 -1
- package/dist/{campaign-C4FU4mF-.js → campaign-CBRSag11.js} +8 -8
- package/dist/{campaign-BO_GMK22.js → campaign-shm1Nb7g.js} +1 -1
- package/dist/{campaign.enum-ME5t80SA.js → campaign.enum-C-p5_XEd.js} +1 -1
- package/dist/{campaign.fn-CpSdTR_Z.js → campaign.fn-BGzZfg1o.js} +185 -185
- package/dist/{collectible.enum-BJNC4deW.js → collectible.enum-DxOoBouZ.js} +1 -1
- package/dist/{collection.fn-BclOhIak.js → collection.fn-BKmv2KVW.js} +2 -2
- package/dist/{dto-CeKAIN4F.js → dto-BRQj35uX.js} +4 -4
- package/dist/{effect-C5coTG7j.js → effect-Bbc7QO26.js} +1 -1
- package/dist/{email-addresses-DdpDo4U3.js → email-addresses-CdmKczY8.js} +2 -2
- package/dist/{export-Cd7RMmWF.js → export-xWupGZRl.js} +3 -3
- package/dist/{helper-8QHPhfxd.js → helper-C_t7u0sc.js} +1 -1
- package/dist/{index-D8LAuyy5.js → index-BHwWZLKa.js} +2 -2
- package/dist/{index-B2UGAU9v.js → index-BaGjDOR2.js} +1 -1
- package/dist/{index-DlwlvbrO.js → index-BxosLsfW.js} +1 -1
- package/dist/{index-e5r6FpSJ.js → index-C6PeL89d.js} +3 -3
- package/dist/{index-CAP90xO7.js → index-CLvFXL_E.js} +4 -4
- package/dist/{index-CdgAq0Pz.js → index-ClEGMTrv.js} +1 -1
- package/dist/{index-M5KI7NIT.js → index-DAhj82tf.js} +1 -1
- package/dist/{index-D_b2gjAX.js → index-DDQaEXt7.js} +1 -1
- package/dist/{index-BJne3mAB.js → index-DW7nPyed.js} +6 -6
- package/dist/{index-Rb7s8Lqk.js → index-DaCQrz9t.js} +3 -3
- package/dist/{index-Ch_6nXW4.js → index-REoHVOcy.js} +1 -1
- package/dist/{index-BJuTIPNg.js → index-RsNRLaWL.js} +1 -1
- package/dist/{index-Csxi8Zcu.js → index-lZq2A3X2.js} +3 -3
- package/dist/{index.esm2017-D6CILdWW.js → index.esm2017-DIVK9KD2.js} +1 -1
- package/dist/{loading-tl9p27VA.js → loading-xptL2Ny2.js} +1 -1
- package/dist/{lodash-fxLQlj7m.js → lodash-88xjswCi.js} +1 -1
- package/dist/{membership-CBpNdC9y.js → membership-eoLCZt_p.js} +3 -3
- package/dist/{money-CNRljtC1.js → money-DcsDa1nm.js} +1 -1
- package/dist/{number-DmTfN_5Y.js → number-BkGWCSrD.js} +1 -1
- package/dist/{objectid-BuanIDxD.js → objectid-gUqB9tj7.js} +6 -6
- package/dist/{plugins-DvsCeess.js → plugins-DoTCd9nY.js} +3 -3
- package/dist/{reward-CW22wI3L.js → reward-Culc3-Rv.js} +1 -1
- package/dist/{rule-C_3XR2Zd.js → rule-DUDjRs8M.js} +3 -3
- package/dist/{rule-builder-DrwCpDKV.js → rule-builder-CkZtoez-.js} +1 -1
- package/dist/{template-CBaQ8LLp.js → template-CxhdtuLf.js} +7 -7
- package/dist/{timezone-DSEM5B5J.js → timezone-CdsdekR2.js} +2 -2
- package/dist/{trigger-3QCLi7tq.js → trigger-CFXIiuLd.js} +5 -5
- package/dist/usePagination-BSeGmTq6.js +177 -0
- package/dist/{user-CY_UexCt.js → user-C7hrMSvV.js} +1 -1
- package/dist/{vue-i18n-DGcpLn5c.js → vue-i18n-BdGyU2Nr.js} +111 -111
- package/dist/{xlsx-rSwsIehi.js → xlsx-BN2KFkI2.js} +1 -1
- package/dist/{zod-BD5VYWIO.js → zod-DvUTBth7.js} +1 -1
- package/package.json +1 -1
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-C2ZrTL5p.js +0 -1767
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DPDq-Juz.js +0 -147
- package/dist/Setting-D5YbEHxm.js +0 -1982
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-qWbACUbe.js +0 -139
- package/dist/usePagination-CZ7RnfzE.js +0 -223
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { defineComponent as N, ref as C, computed as L, watch as E, resolveComponent as g, openBlock as o, createElementBlock as i, Fragment as y, toDisplayString as I, createCommentVNode as A, createElementVNode as M, createVNode as v, unref as u, renderList as S, createBlock as b, isRef as U, withCtx as F } from "vue";
|
|
2
|
-
import { u as T } from "./business-D-Y0xqsG.js";
|
|
3
|
-
function j(l, s, n) {
|
|
4
|
-
return l.some(
|
|
5
|
-
n instanceof Function ? n : (a) => a === s
|
|
6
|
-
) || l.push(s), l;
|
|
7
|
-
}
|
|
8
|
-
function q(l, s, n) {
|
|
9
|
-
return l.filter(
|
|
10
|
-
n instanceof Function ? (a) => !n(a) : (a) => a !== s
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
const D = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "fm-typo-en-body-lg-400"
|
|
16
|
-
}, K = {
|
|
17
|
-
key: 1,
|
|
18
|
-
class: "space-y-4"
|
|
19
|
-
}, O = { key: 0 }, R = { key: 1 }, z = { key: 2 }, J = /* @__PURE__ */ N({
|
|
20
|
-
__name: "TargetLocationInput",
|
|
21
|
-
props: {
|
|
22
|
-
label: {
|
|
23
|
-
type: String
|
|
24
|
-
},
|
|
25
|
-
type: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: "select"
|
|
28
|
-
},
|
|
29
|
-
modelValue: {
|
|
30
|
-
type: Object,
|
|
31
|
-
required: !0
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
emits: ["update:model-value"],
|
|
35
|
-
setup(l, { emit: s }) {
|
|
36
|
-
const n = T(), a = l, c = C(""), w = L(() => n.locations.filter(
|
|
37
|
-
(d) => {
|
|
38
|
-
var t;
|
|
39
|
-
return d.name.toLowerCase().includes(c.value.toLowerCase()) || ((t = d == null ? void 0 : d.code) == null ? void 0 : t.toLowerCase().includes(c.value.toLowerCase()));
|
|
40
|
-
}
|
|
41
|
-
)), p = s;
|
|
42
|
-
function k(d, t) {
|
|
43
|
-
const m = d ? j(a.modelValue || [], t.toString()) : q(
|
|
44
|
-
a.modelValue || n.locations.map((V) => V._id.toString()),
|
|
45
|
-
t.toString()
|
|
46
|
-
);
|
|
47
|
-
return p("update:model-value", m);
|
|
48
|
-
}
|
|
49
|
-
const r = C(!1), $ = L(() => {
|
|
50
|
-
var m, V;
|
|
51
|
-
const t = ((m = a.modelValue) == null ? void 0 : m.slice(0, 5).map((h) => {
|
|
52
|
-
var f;
|
|
53
|
-
return ((f = n.locationById(h)) == null ? void 0 : f.name) || h;
|
|
54
|
-
})) || [];
|
|
55
|
-
return a.modelValue && ((V = a.modelValue) == null ? void 0 : V.length) > 5 && t.push(`+${a.modelValue.length - 5} more`), t;
|
|
56
|
-
});
|
|
57
|
-
return E(r, (d) => {
|
|
58
|
-
d && (c.value = "");
|
|
59
|
-
}), (d, t) => {
|
|
60
|
-
const m = g("FmCheckbox"), V = g("FmChip"), h = g("FmField"), f = g("FmTextField"), B = g("FmMenu");
|
|
61
|
-
return o(), i(y, null, [
|
|
62
|
-
l.label ? (o(), i("div", D, I(l.label), 1)) : A("", !0),
|
|
63
|
-
l.type === "checkbox" ? (o(), i("div", K, [
|
|
64
|
-
M("div", null, [
|
|
65
|
-
v(m, {
|
|
66
|
-
value: null,
|
|
67
|
-
indeterminate: l.modelValue != null && l.modelValue.length > 0 && l.modelValue.length < u(n).locations.length,
|
|
68
|
-
label: "All locations",
|
|
69
|
-
"model-value": l.modelValue == null || l.modelValue.length === u(n).locations.length,
|
|
70
|
-
"onUpdate:modelValue": t[0] || (t[0] = (e) => p("update:model-value", e ? null : []))
|
|
71
|
-
}, null, 8, ["indeterminate", "model-value"])
|
|
72
|
-
]),
|
|
73
|
-
(o(!0), i(y, null, S(u(n).locations, (e) => (o(), i("div", {
|
|
74
|
-
key: e._id.toString()
|
|
75
|
-
}, [
|
|
76
|
-
v(m, {
|
|
77
|
-
value: e._id.toString(),
|
|
78
|
-
label: `${e.code ? `${e.code} - ` : ""} ${e.name}`,
|
|
79
|
-
"model-value": !l.modelValue || l.modelValue.includes(e._id.toString()),
|
|
80
|
-
"onUpdate:modelValue": (x) => k(x, e._id.toString())
|
|
81
|
-
}, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"])
|
|
82
|
-
]))), 128))
|
|
83
|
-
])) : (o(), b(B, {
|
|
84
|
-
key: 2,
|
|
85
|
-
modelValue: u(r),
|
|
86
|
-
"onUpdate:modelValue": t[3] || (t[3] = (e) => U(r) ? r.value = e : null),
|
|
87
|
-
onMenuChanged: t[4] || (t[4] = (e) => r.value = e),
|
|
88
|
-
placement: "top-end"
|
|
89
|
-
}, {
|
|
90
|
-
"menu-button": F(() => [
|
|
91
|
-
v(h, {
|
|
92
|
-
"append-icon": u(r) ? "expand_more" : "expand_less",
|
|
93
|
-
class: "!h-auto"
|
|
94
|
-
}, {
|
|
95
|
-
default: F(() => [
|
|
96
|
-
!l.modelValue || l.modelValue.length == u(n).locations.length ? (o(), i("div", O, " All Locations ")) : l.modelValue.length ? (o(), i("div", z, [
|
|
97
|
-
(o(!0), i(y, null, S(u($), (e) => (o(), b(V, {
|
|
98
|
-
key: e,
|
|
99
|
-
label: e,
|
|
100
|
-
class: "max-w-[130px] text-ellipsis"
|
|
101
|
-
}, null, 8, ["label"]))), 128))
|
|
102
|
-
])) : (o(), i("div", R, "No Locations"))
|
|
103
|
-
]),
|
|
104
|
-
_: 1
|
|
105
|
-
}, 8, ["append-icon"])
|
|
106
|
-
]),
|
|
107
|
-
default: F(() => [
|
|
108
|
-
v(f, {
|
|
109
|
-
modelValue: u(c),
|
|
110
|
-
"onUpdate:modelValue": t[1] || (t[1] = (e) => U(c) ? c.value = e : null),
|
|
111
|
-
placeholder: "Search locations",
|
|
112
|
-
class: "my-8"
|
|
113
|
-
}, null, 8, ["modelValue"]),
|
|
114
|
-
v(m, {
|
|
115
|
-
class: "my-8",
|
|
116
|
-
value: null,
|
|
117
|
-
indeterminate: l.modelValue != null && l.modelValue.length > 0 && l.modelValue.length < u(n).locations.length,
|
|
118
|
-
label: "All locations",
|
|
119
|
-
"model-value": l.modelValue == null || l.modelValue.length === u(n).locations.length,
|
|
120
|
-
"onUpdate:modelValue": t[2] || (t[2] = (e) => p("update:model-value", e ? null : []))
|
|
121
|
-
}, null, 8, ["indeterminate", "model-value"]),
|
|
122
|
-
(o(!0), i(y, null, S(u(w), (e) => (o(), b(m, {
|
|
123
|
-
class: "my-8",
|
|
124
|
-
key: e._id.toString(),
|
|
125
|
-
value: e._id.toString(),
|
|
126
|
-
label: `${e.code ? `${e.code} - ` : ""} ${e.name}`,
|
|
127
|
-
"model-value": !l.modelValue || l.modelValue.includes(e._id.toString()),
|
|
128
|
-
"onUpdate:modelValue": (x) => k(x, e._id.toString())
|
|
129
|
-
}, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
|
|
130
|
-
]),
|
|
131
|
-
_: 1
|
|
132
|
-
}, 8, ["modelValue"]))
|
|
133
|
-
], 64);
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
export {
|
|
138
|
-
J as _
|
|
139
|
-
};
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import { defineComponent as $, ref as h, resolveComponent as w, openBlock as f, createBlock as B, withCtx as V, createVNode as g, createElementVNode as d, normalizeStyle as P, createElementBlock as S, Fragment as E, renderList as L, computed as b, onMounted as R, watch as A, unref as c, createCommentVNode as D, toDisplayString as k } from "vue";
|
|
2
|
-
import { l as T } from "./lodash-fxLQlj7m.js";
|
|
3
|
-
const U = ["id"], M = /* @__PURE__ */ $({
|
|
4
|
-
__name: "FmTableSelection",
|
|
5
|
-
props: {
|
|
6
|
-
value: {},
|
|
7
|
-
items: {}
|
|
8
|
-
},
|
|
9
|
-
emits: ["update:modelValue"],
|
|
10
|
-
setup(e, { emit: m }) {
|
|
11
|
-
const a = m, l = e, r = h(!1);
|
|
12
|
-
return (p, u) => {
|
|
13
|
-
const y = w("FmButton"), x = w("FmMenuItem"), n = w("FmMenu");
|
|
14
|
-
return f(), B(n, {
|
|
15
|
-
"max-height": 264,
|
|
16
|
-
shift: "",
|
|
17
|
-
onMenuChanged: u[0] || (u[0] = (o) => r.value = o)
|
|
18
|
-
}, {
|
|
19
|
-
"menu-button": V(() => {
|
|
20
|
-
var o;
|
|
21
|
-
return [
|
|
22
|
-
g(y, {
|
|
23
|
-
icon: r.value ? "expand_less" : "expand_more",
|
|
24
|
-
label: (o = e.items.find((i) => i.value === l.value)) == null ? void 0 : o.label,
|
|
25
|
-
"icon-position": "append",
|
|
26
|
-
size: "md",
|
|
27
|
-
variant: "tertiary"
|
|
28
|
-
}, null, 8, ["icon", "label"])
|
|
29
|
-
];
|
|
30
|
-
}),
|
|
31
|
-
"menu-wrapper": V(({ maxHeight: o }) => [
|
|
32
|
-
d("div", {
|
|
33
|
-
id: `menu-wrapper-${o}`,
|
|
34
|
-
style: P({ maxHeight: `${o}px` }),
|
|
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
|
-
}, [
|
|
37
|
-
(f(!0), S(E, null, L(e.items, (i) => (f(), B(x, {
|
|
38
|
-
key: i.value,
|
|
39
|
-
label: i.label,
|
|
40
|
-
value: i.value,
|
|
41
|
-
"model-value": i.value === l.value,
|
|
42
|
-
"onUpdate:modelValue": (z) => a("update:modelValue", i.value)
|
|
43
|
-
}, null, 8, ["label", "value", "model-value", "onUpdate:modelValue"]))), 128))
|
|
44
|
-
], 12, U)
|
|
45
|
-
]),
|
|
46
|
-
_: 1
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}), O = { class: "" }, j = {
|
|
51
|
-
key: 0,
|
|
52
|
-
class: "w-full flex flex-col gap-16 items-center py-16"
|
|
53
|
-
}, W = {
|
|
54
|
-
key: 1,
|
|
55
|
-
class: "basis-72 bg-white flex items-center justify-between px-24 pt-6 border-t border-fm-color-border"
|
|
56
|
-
}, q = { class: "flex gap-24 items-center justify-between xs:hidden xs:invisible" }, G = { class: "flex gap-8 items-center" }, H = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, J = { class: "flex gap-8 items-center" }, K = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto" }, Q = { class: "flex gap-8" }, Z = /* @__PURE__ */ $({
|
|
57
|
-
__name: "BaseTable",
|
|
58
|
-
props: {
|
|
59
|
-
rowData: {},
|
|
60
|
-
columnDefs: {},
|
|
61
|
-
loading: { type: Boolean, default: !1 },
|
|
62
|
-
rowCount: { default: 0 },
|
|
63
|
-
shrinkAt: { type: [Number, Boolean], default: !1 },
|
|
64
|
-
pageCount: {},
|
|
65
|
-
pageIndex: {},
|
|
66
|
-
hideFooter: { type: Boolean, default: !1 },
|
|
67
|
-
pageSize: {},
|
|
68
|
-
pageSizeOptions: { default: () => [
|
|
69
|
-
{ label: "10", value: 10 },
|
|
70
|
-
{ label: "20", value: 20 },
|
|
71
|
-
{ label: "50", value: 50 }
|
|
72
|
-
] }
|
|
73
|
-
},
|
|
74
|
-
emits: ["sortChange", "rowClick", "pageChange"],
|
|
75
|
-
setup(e, { emit: m }) {
|
|
76
|
-
const a = e, l = m, r = b(() => a.pageIndex + 1), p = b(() => a.pageIndex * a.pageSize), u = b(
|
|
77
|
-
() => Math.min(p.value + a.pageSize, a.rowCount || 0)
|
|
78
|
-
), y = b(() => a.pageIndex > 0), x = b(() => a.pageIndex < a.pageCount - 1), n = (s) => {
|
|
79
|
-
l("sortChange", s);
|
|
80
|
-
}, o = (s) => {
|
|
81
|
-
l("rowClick", s);
|
|
82
|
-
}, i = (s) => {
|
|
83
|
-
l("pageChange", { pageIndex: s, pageSize: a.pageSize });
|
|
84
|
-
}, z = (s) => {
|
|
85
|
-
l("pageChange", { pageIndex: 0, pageSize: s });
|
|
86
|
-
}, I = h(!1);
|
|
87
|
-
return R(() => {
|
|
88
|
-
A(
|
|
89
|
-
() => a.loading,
|
|
90
|
-
(s, t) => {
|
|
91
|
-
t === !0 && s === !1 && (I.value = !0);
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
}), (s, t) => {
|
|
95
|
-
const N = w("FmTable"), C = w("FmButton");
|
|
96
|
-
return f(), S("div", O, [
|
|
97
|
-
g(N, {
|
|
98
|
-
loading: e.loading,
|
|
99
|
-
"row-data": e.rowData,
|
|
100
|
-
"row-count": e.rowCount,
|
|
101
|
-
"column-defs": e.columnDefs,
|
|
102
|
-
"shrink-at": e.shrinkAt,
|
|
103
|
-
"page-count": e.pageCount,
|
|
104
|
-
"page-size": e.pageSize,
|
|
105
|
-
"fetch-fn": void 0,
|
|
106
|
-
"hide-footer": "",
|
|
107
|
-
onSortChange: n,
|
|
108
|
-
onRowClick: o
|
|
109
|
-
}, null, 8, ["loading", "row-data", "row-count", "column-defs", "shrink-at", "page-count", "page-size"]),
|
|
110
|
-
e.rowData.length == 0 && e.loading == !1 && c(I) ? (f(), S("div", j, [...t[5] || (t[5] = [
|
|
111
|
-
d("div", { class: "fm-typo-en-body-lg-600" }, "No data found", -1),
|
|
112
|
-
d("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " No data to show at the current moment. ", -1)
|
|
113
|
-
])])) : D("", !0),
|
|
114
|
-
e.hideFooter ? D("", !0) : (f(), S("div", W, [
|
|
115
|
-
d("div", q, [
|
|
116
|
-
d("div", G, [
|
|
117
|
-
t[6] || (t[6] = d("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, " Items per page: ", -1)),
|
|
118
|
-
g(M, {
|
|
119
|
-
items: e.pageSizeOptions,
|
|
120
|
-
value: e.pageSize,
|
|
121
|
-
"onUpdate:modelValue": z
|
|
122
|
-
}, null, 8, ["items", "value"])
|
|
123
|
-
]),
|
|
124
|
-
d("span", H, k(c(p) + 1) + " - " + k(c(u)) + " of " + k(e.rowCount) + " items ", 1)
|
|
125
|
-
]),
|
|
126
|
-
d("div", J, [
|
|
127
|
-
g(M, {
|
|
128
|
-
items: Array.from(Array(e.pageCount), (v, F) => ({
|
|
129
|
-
label: (F + 1).toString(),
|
|
130
|
-
value: F + 1
|
|
131
|
-
})),
|
|
132
|
-
value: c(r),
|
|
133
|
-
"onUpdate:modelValue": t[0] || (t[0] = (v) => i(v - 1))
|
|
134
|
-
}, null, 8, ["items", "value"]),
|
|
135
|
-
d("span", K, " of " + k(e.pageCount) + " pages ", 1),
|
|
136
|
-
d("div", Q, [
|
|
137
|
-
g(C, {
|
|
138
|
-
disabled: !c(y),
|
|
139
|
-
icon: "first_page",
|
|
140
|
-
"icon-color": "neutral-black",
|
|
141
|
-
variant: "tertiary",
|
|
142
|
-
onClick: t[1] || (t[1] = (v) => i(0))
|
|
143
|
-
}, null, 8, ["disabled"]),
|
|
144
|
-
g(C, {
|
|
145
|
-
disabled: !c(y),
|
|
146
|
-
icon: "chevron_left",
|
|
147
|
-
"icon-color": "neutral-black",
|
|
148
|
-
variant: "tertiary",
|
|
149
|
-
onClick: t[2] || (t[2] = (v) => i(e.pageIndex - 1))
|
|
150
|
-
}, null, 8, ["disabled"]),
|
|
151
|
-
g(C, {
|
|
152
|
-
disabled: !c(x),
|
|
153
|
-
icon: "chevron_right",
|
|
154
|
-
"icon-color": "neutral-black",
|
|
155
|
-
variant: "tertiary",
|
|
156
|
-
onClick: t[3] || (t[3] = (v) => i(e.pageIndex + 1))
|
|
157
|
-
}, null, 8, ["disabled"]),
|
|
158
|
-
g(C, {
|
|
159
|
-
disabled: !c(x),
|
|
160
|
-
icon: "last_page",
|
|
161
|
-
"icon-color": "neutral-black",
|
|
162
|
-
variant: "tertiary",
|
|
163
|
-
onClick: t[4] || (t[4] = (v) => i(e.pageCount - 1))
|
|
164
|
-
}, null, 8, ["disabled"])
|
|
165
|
-
])
|
|
166
|
-
])
|
|
167
|
-
]))
|
|
168
|
-
]);
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
function _(e, m = { key: "_id", descending: !0 }) {
|
|
173
|
-
const a = h({
|
|
174
|
-
pageCount: 0,
|
|
175
|
-
searchValue: "",
|
|
176
|
-
pageIndex: 0,
|
|
177
|
-
totalRows: 0,
|
|
178
|
-
isLoading: !1,
|
|
179
|
-
pageSize: 10
|
|
180
|
-
}), l = h(m), r = h([]), p = async (n) => {
|
|
181
|
-
a.value.isLoading = !0, r.value = [];
|
|
182
|
-
try {
|
|
183
|
-
const o = await e({
|
|
184
|
-
limit: n.pageSize || a.value.pageSize,
|
|
185
|
-
skip: n.pageIndex ?? 0,
|
|
186
|
-
sortBy: l.value.key,
|
|
187
|
-
descending: l.value.descending,
|
|
188
|
-
search: a.value.searchValue
|
|
189
|
-
});
|
|
190
|
-
r.value = o.resources, a.value.totalRows = o.meta.totalResources ?? 0, a.value.pageCount = o.meta.totalPages ?? 0, a.value.pageIndex = o.meta.skip ?? 0;
|
|
191
|
-
} catch (o) {
|
|
192
|
-
console.error("Error fetching data:", o);
|
|
193
|
-
} finally {
|
|
194
|
-
a.value.isLoading = !1;
|
|
195
|
-
}
|
|
196
|
-
}, u = T.debounce(async (n) => {
|
|
197
|
-
a.value.pageSize = (n == null ? void 0 : n.pageSize) || a.value.pageSize, await p({
|
|
198
|
-
pageSize: a.value.pageSize,
|
|
199
|
-
pageIndex: (n == null ? void 0 : n.pageIndex) || 0
|
|
200
|
-
});
|
|
201
|
-
}, 200);
|
|
202
|
-
return {
|
|
203
|
-
tableMeta: a,
|
|
204
|
-
rowData: r,
|
|
205
|
-
sortBy: l,
|
|
206
|
-
fetchData: p,
|
|
207
|
-
debouncedFetchData: u,
|
|
208
|
-
onSort: async (n) => {
|
|
209
|
-
var o;
|
|
210
|
-
console.log("sortState", (o = n[0]) == null ? void 0 : o.id), n.length ? (l.value = {
|
|
211
|
-
key: n[0].id.startsWith("_") ? n[0].id : n[0].id.replace(new RegExp("_", "g"), "."),
|
|
212
|
-
descending: n[0].desc
|
|
213
|
-
}, console.log("sortBy", l.value)) : l.value = m, await u();
|
|
214
|
-
},
|
|
215
|
-
onSearch: () => {
|
|
216
|
-
u({ pageIndex: 0, pageSize: a.value.pageSize });
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
export {
|
|
221
|
-
Z as _,
|
|
222
|
-
_ as u
|
|
223
|
-
};
|