@feedmepos/mf-connect 0.1.38-beta.23 → 0.1.38-beta.25
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-xMxbAEul.js → Analytic-CnNFr3FF.js} +14 -14
- package/dist/{App-DkBJoQa2.js → App-Bs4Lgw2l.js} +7 -7
- package/dist/{AuditLogs-CkpffM8N.js → AuditLogs-BLoAipFo.js} +11 -11
- package/dist/{Bin-D3JHC66F.js → Bin-CGTdlBny.js} +8 -8
- package/dist/{Broadcast-eCxNA0EG.js → Broadcast-B3W5RzRy.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BMrLc0hX.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B2Rodvvf.js} +6 -6
- package/dist/{Card-CaOvpWvL.js → Card-CkP5_s5B.js} +18 -18
- package/dist/{Collections-CxScAHZl.js → Collections-Czp-eFqo.js} +7 -7
- package/dist/{Credit-BnPpMq8q.js → Credit-BcaIvY_C.js} +11 -11
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BEnaGmCW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CD_HmVtT.js} +63 -62
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DJhtUAk_.js → EffectSheet.vue_vue_type_style_index_0_lang-CeJtGIq8.js} +20 -20
- package/dist/{Experience-nMxubr1P.js → Experience-CqpT4RKC.js} +9 -9
- package/dist/{Game-C8pHAp1o.js → Game-BU19eUZe.js} +10 -10
- package/dist/Grab-DrgKhQ-n.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js} +8 -8
- package/dist/{Index-COHMtBIi.js → Index-j750egzP.js} +54 -54
- package/dist/{Marketing-C3R9Rw4y.js → Marketing-DxBCWgGW.js} +10 -10
- package/dist/{Member-gjwH9kPr.js → Member-BlpnS-gt.js} +10 -10
- package/dist/{MemberList-Bg_zsGbz.js → MemberList-XolPpdeh.js} +31 -31
- package/dist/{MemberTransactions-7aZsIeZL.js → MemberTransactions-mE7RmB-H.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DtPV3l4w.js → MessageInput.vue_vue_type_script_setup_true_lang-CnIWWNgD.js} +9 -9
- package/dist/{Mission-DqAahrB0.js → Mission-BtavZVDY.js} +10 -10
- package/dist/{Overview-_b_4mLBe.js → Overview-AnvTfXXo.js} +21 -21
- package/dist/{Point-CsMZA2do.js → Point-Bw1G73vZ.js} +9 -9
- package/dist/{Promotion-j4_gUzqi.js → Promotion-By1szSrB.js} +10 -10
- package/dist/{Queue-MOdvEl5u.js → Queue-CDNcLHGr.js} +11 -11
- package/dist/{Record-BQIQBdc6.js → Record-D7CLYo3F.js} +9 -9
- package/dist/{Reward-DABAfCmo.js → Reward-BfCNtJE1.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D-BK8GZ4.js → RewardGroup.vue_vue_type_script_setup_true_lang-BIsAuAN2.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-ClwtUvs9.js → RuleGroup.vue_vue_type_script_setup_true_lang-DFZsY5Wx.js} +185 -185
- package/dist/{Segment-DSpcce-q.js → Segment-Cx4Y8niG.js} +232 -232
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CZu-7I-8.js → SelectItems.vue_vue_type_script_setup_true_lang-BZ_J5OFJ.js} +14 -14
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-D5Oc0pqy.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BJGAnjDZ.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-7NWmWQjo.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CJ5lkVPN.js} +3 -3
- package/dist/{Setting-DTFpHJd7.js → Setting-CZ-ZoCbx.js} +17 -17
- package/dist/{Store-mAraPykq.js → Store-BEolF_8B.js} +34 -34
- package/dist/{StoreRewards-C1Cw1Nij.js → StoreRewards-Dad1Zg2s.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-C_igl8vi.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BioIIRWp.js} +21 -21
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D3c0qO9i.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DFck5Zap.js} +1 -1
- package/dist/{Tier-B7AUECOs.js → Tier-DkMdCg4f.js} +21 -21
- package/dist/{Title-DWw4-4cE.js → Title-CE4vkjCt.js} +20 -20
- package/dist/{Transaction-ClZvbeDP.js → Transaction-DQOdYA5y.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Cen_yXF7.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CLIhaeAY.js} +6 -6
- package/dist/{Voucher-BBYDF1GX.js → Voucher-BNCkPTeD.js} +13 -13
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Vscwqd3r.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BCG4LuXq.js} +86 -86
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C2yUE0Cq.js → ZodTextField.vue_vue_type_script_setup_true_lang-DZPz72YM.js} +1 -1
- package/dist/{app-DLdolyB3.js → app-CGyViOA2.js} +41 -34
- package/dist/app-DuuQV4iK.js +57962 -0
- package/dist/app.js +1 -1
- package/dist/{business-D900a5Tb.js → business-CT9f5Mcu.js} +1 -1
- package/dist/{campaign-D_F3xj3O.js → campaign-DruWV9_z.js} +9 -9
- package/dist/{campaign-DXo7F7aH.js → campaign-QNfednQV.js} +2 -2
- package/dist/{campaign.enum-CG0IjpL0.js → campaign.enum-BfqWuf2f.js} +1 -1
- package/dist/{campaign.fn-B6f4zAed.js → campaign.fn-CdyLr0Xa.js} +3 -3
- package/dist/{collectible.enum-0jg7mZtz.js → collectible.enum-C4SBy9ie.js} +1 -1
- package/dist/{collection.fn-BDcZoQfR.js → collection.fn-DGmard-T.js} +2 -2
- package/dist/{dto-Diu2Xl3e.js → dto-AdHaYlrt.js} +4 -4
- package/dist/{effect-DvIk5Cg6.js → effect-BxLYXWa0.js} +1 -1
- package/dist/{email-addresses-DQf3ZdZP.js → email-addresses-BywpJOyH.js} +1 -1
- package/dist/{export-WSVAzeqR.js → export-CaCjWJbv.js} +3 -3
- package/dist/{helper-CzsKE573.js → helper-1sDGGcCs.js} +1 -1
- package/dist/{index-DMg2pJLu.js → index-AYw2MTFM.js} +1 -1
- package/dist/{index-D3wppWii.js → index-BGWAVguX.js} +1 -1
- package/dist/{index-D-VZHYyP.js → index-BWINkCFC.js} +1 -1
- package/dist/{index-B6Kbxgky.js → index-Ce7luA3z.js} +1 -1
- package/dist/{index-DPyNXHg6.js → index-Cur9hyPV.js} +2 -2
- package/dist/{index-B6KkRHaV.js → index-DJZ-kqpE.js} +1 -1
- package/dist/{index-DlwPVNEv.js → index-DKsWTRyN.js} +18 -9
- package/dist/{index-Bej-AJUB.js → index-DOeqRIlL.js} +3 -3
- package/dist/{index-1-H1oqKb.js → index-DWRBSads.js} +1 -1
- package/dist/{index-D1fzmeG6.js → index-DZ3vwqCm.js} +1 -1
- package/dist/{index-__X1c_dR.js → index-ILVT0cch.js} +6 -6
- package/dist/{index-uJ-YdKV1.js → index-J-gYw1zz.js} +3 -3
- package/dist/{index-CErvxcDp.js → index-_mZAUf_O.js} +1 -1
- package/dist/{index-DWN3abQr.js → index-xV0yJaxT.js} +3 -3
- package/dist/{index.esm2017-shNT9EQF.js → index.esm2017-Bo-H9Epv.js} +1 -1
- package/dist/{loading-CBKMbqM5.js → loading-Bqjqslgf.js} +1 -1
- package/dist/{membership-DQa8yaY2.js → membership-CqhEppfS.js} +3 -3
- package/dist/{money-IYgOL6F1.js → money-CooAqk_P.js} +1 -1
- package/dist/{number-DXdhRp2S.js → number-C6cARyqZ.js} +1 -1
- package/dist/{objectid-DABStWGB.js → objectid-DiYL018Z.js} +8 -8
- package/dist/{plugins-DXwZ_v63.js → plugins-BaVr4Awd.js} +2 -2
- package/dist/{reward-DYiYZcJC.js → reward-43EpLVnK.js} +1 -1
- package/dist/{rule-Beum_Zy5.js → rule-CECnGrxI.js} +3 -3
- package/dist/{rule-builder-BLNgIsjE.js → rule-builder-C58mHAaP.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-C5PTDFfm.js → template-CMZziR_-.js} +5 -5
- package/dist/{timezone-PLVeOMdC.js → timezone-DpcMMfGn.js} +1 -1
- package/dist/{trigger-B0u2ZuY-.js → trigger-D99PwOLC.js} +4 -4
- package/dist/usePagination-Ds-cuHop.js +223 -0
- package/dist/{user-BlM3HCwC.js → user-C1NEGH5J.js} +1 -1
- package/dist/{vue-i18n-CwrnHMwQ.js → vue-i18n-CzjqSUwt.js} +157 -157
- package/dist/{xlsx-BAbyCaI0.js → xlsx-DOkzrP7b.js} +1 -1
- package/package.json +4 -4
- package/dist/Grab-DjTma0rb.js +0 -282
- package/dist/app-9boJd9tw.js +0 -33357
- package/dist/usePagination-BeF5K3M7.js +0 -223
|
@@ -1,11 +1,11 @@
|
|
|
1
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 c, withCtx as d, createElementVNode as l, createElementBlock as w, createVNode as i, normalizeClass as h, createTextVNode as T, Fragment as S, renderList as N, toDisplayString as g, createCommentVNode as M } from "vue";
|
|
2
|
-
import { u as P } from "./campaign-
|
|
2
|
+
import { u as P } from "./campaign-QNfednQV.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-ILVT0cch.js";
|
|
5
|
+
import { C as A } from "./collection.fn-DGmard-T.js";
|
|
6
6
|
import { s as V } from "./index-CsaQJMAR.js";
|
|
7
7
|
import { _ as G } from "./lodash-B5I3zXaY.js";
|
|
8
|
-
import { C as H } from "./campaign-
|
|
8
|
+
import { C as H } from "./campaign-DruWV9_z.js";
|
|
9
9
|
import { J as U } from "./JsonViewer-v8_C7l5N.js";
|
|
10
10
|
const K = /* @__PURE__ */ L({
|
|
11
11
|
__name: "CampaignChip",
|
|
@@ -83,7 +83,7 @@ const K = /* @__PURE__ */ L({
|
|
|
83
83
|
})
|
|
84
84
|
]),
|
|
85
85
|
default: d(() => [
|
|
86
|
-
n[2] || (n[2] = T(" Most popular "))
|
|
86
|
+
n[2] || (n[2] = T(" Most popular ", -1))
|
|
87
87
|
]),
|
|
88
88
|
_: 1
|
|
89
89
|
}, 8, ["class"]),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as q0, c as o0, g as W0 } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
2
2
|
import { m as d0 } from "./moment-D7p2TMB-.js";
|
|
3
|
-
import { e as n } from "./index-
|
|
3
|
+
import { e as n } from "./index-J-gYw1zz.js";
|
|
4
4
|
var _ = { exports: {} }, j = { exports: {} };
|
|
5
5
|
const R0 = /* @__PURE__ */ q0(d0);
|
|
6
6
|
(function(S) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as i, openBlock as m, createBlock as s, unref as n } from "vue";
|
|
2
|
-
import "./index-
|
|
3
|
-
import { R as l } from "./rule-builder-
|
|
4
|
-
import { _ as p } from "./RuleGroup.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { l as e, H as E } from "./index-
|
|
2
|
+
import "./index-Cur9hyPV.js";
|
|
3
|
+
import { R as l } from "./rule-builder-C58mHAaP.js";
|
|
4
|
+
import { _ as p } from "./RuleGroup.vue_vue_type_script_setup_true_lang-DFZsY5Wx.js";
|
|
5
|
+
import { l as e, H as E } from "./index-DKsWTRyN.js";
|
|
6
6
|
const O = /* @__PURE__ */ i({
|
|
7
7
|
__name: "BillRuleGroup",
|
|
8
8
|
props: {
|
|
@@ -0,0 +1,223 @@
|
|
|
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-B5I3zXaY.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
|
+
};
|