@feedmepos/mf-connect 0.1.38-beta.71 → 0.1.38-beta.73
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-BY0xqCru.js → Analytic-gGjm5ome.js} +14 -14
- package/dist/{App-n6-XqhU7.js → App-BDz9mw-6.js} +7 -7
- package/dist/{AuditLogs-Dml3WjdH.js → AuditLogs-4x90ZjjY.js} +9 -9
- package/dist/{Bin-DaPZyWm-.js → Bin-Bby2f42O.js} +8 -8
- package/dist/{Broadcast-hLmkBNne.js → Broadcast-eYN2AqFC.js} +10 -10
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BahnNhzD.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B-fO9-Hb.js} +6 -6
- package/dist/{Card-C_Fm3E0s.js → Card-Cz-pLt7X.js} +17 -17
- package/dist/{Collections-DAUsUa0c.js → Collections-CgfXuVA1.js} +7 -7
- package/dist/{Credit-DklbckuQ.js → Credit-Lc6B2oQ9.js} +10 -10
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-vpnaCdLI.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bm7XTR7o.js} +33 -33
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-e1ZWGrXS.js → EffectSheet.vue_vue_type_style_index_0_lang-Cp5nSLEX.js} +6 -6
- package/dist/{Experience-D3Ve8dCI.js → Experience-Ca94IJBt.js} +10 -10
- package/dist/{FileSaver.min-Bg15HHd0.js → FileSaver.min-BThLVsSf.js} +1 -1
- package/dist/{Game-BJzRdZNg.js → Game-BYLYDTU9.js} +11 -11
- package/dist/{GenerateMaterial-pDWgptXt.js → GenerateMaterial-CUoG6uyI.js} +6 -6
- package/dist/{Grab-B0D8SpcD.js → Grab-DZ_LkTly.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DkI3qMHv.js → ImageInput.vue_vue_type_script_setup_true_lang-CI4kP9ul.js} +1 -1
- package/dist/{Index-ysSM8-pd.js → Index-BZ2r8x0t.js} +10 -10
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-C7bEzQ4b.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BLKlXW1b.js} +1 -1
- package/dist/{MainLayout-Kt1Wiz87.js → MainLayout-BfGSSVMW.js} +1 -1
- package/dist/{Marketing-CFS6ff03.js → Marketing-DYg0J1xG.js} +4 -4
- package/dist/{MarketingMaterialEdit-BDYr5Rlw.js → MarketingMaterialEdit-B--Kck7j.js} +4 -4
- package/dist/{Member-Dgb3QBKF.js → Member-By5QEJxn.js} +11 -11
- package/dist/{MemberList-CfcQUvN8.js → MemberList-D49bMmGJ.js} +434 -439
- package/dist/{MemberTransactions-BVwGdpXo.js → MemberTransactions-Cz9XENK1.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Dj3h51yH.js → MessageInput.vue_vue_type_script_setup_true_lang-IlFjM-Y5.js} +8 -8
- package/dist/{Mission-B9K8-Wrt.js → Mission-Cvl-V7c8.js} +11 -11
- package/dist/{Overview-DJgKxAvU.js → Overview-lu82lUJp.js} +18 -18
- package/dist/{Point-lev1_Nit.js → Point-C65YFhOB.js} +10 -10
- package/dist/{Promotion-De9e8yPj.js → Promotion-DQCrKO6a.js} +11 -11
- package/dist/{Queue-DH_F0Ekd.js → Queue-DR5lfSMi.js} +10 -10
- package/dist/{Record-CH2AZqzF.js → Record-BCt42_VZ.js} +9 -9
- package/dist/{Reward-BUgOAjd4.js → Reward-7aOnjmMm.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-KTaTLjjw.js → RewardGroup.vue_vue_type_script_setup_true_lang-BPgjr91S.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-rs5kKp_v.js → RuleGroup.vue_vue_type_script_setup_true_lang-Bp5jnlFr.js} +14 -14
- package/dist/{Segment-DL6O--Aw.js → Segment-DiYwfb8M.js} +24 -24
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-ZUGDMD5J.js → SelectItems.vue_vue_type_script_setup_true_lang-ydM5ypC0.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CIeyrheH.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BRs7pw0l.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BAtXxIjO.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DU8AAPFD.js} +4 -4
- package/dist/{Setting-DOA80XlJ.js → Setting-k6xShcs8.js} +13 -13
- package/dist/{SettingAdvertisements-Dl0eisXq.js → SettingAdvertisements-DQa_jXYM.js} +11 -11
- package/dist/{Store-fni1Xblz.js → Store-B6lYBpsm.js} +20 -20
- package/dist/{StoreRewards-CLMO-kNi.js → StoreRewards-Cqd399q8.js} +14 -14
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Wv_SHwmo.js +1128 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D-jYcuAa.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Bi1o4YAz.js} +2 -2
- package/dist/{Tier-B0_DiVNv.js → Tier-CXXImaDx.js} +23 -23
- package/dist/{Title-twptCzpk.js → Title-CTxNCmBW.js} +20 -20
- package/dist/{Transaction-CTX5I6gO.js → Transaction-DonaHVzF.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Bp-rIgz4.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DbRVYccO.js} +6 -6
- package/dist/{Voucher-C7Kxmzjr.js → Voucher-Bso_Mjlg.js} +14 -14
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-lZQTZUUU.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DNvmaJk9.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BlBEFfgu.js → ZodTextField.vue_vue_type_script_setup_true_lang-KHZ3-THo.js} +2 -2
- package/dist/{app-D5GVWKxc.js → app-DKrmktFJ.js} +224 -224
- package/dist/app.js +1 -1
- package/dist/{business-BvNsRlY4.js → business-Dd73TVX5.js} +1 -1
- package/dist/{campaign-DRErhSfb.js → campaign-BUQHH4KL.js} +2 -2
- package/dist/{campaign-MN_o01w6.js → campaign-DkJOyF24.js} +8 -8
- package/dist/{campaign.enum-BtfwwLCf.js → campaign.enum-C8vJuDAq.js} +1 -1
- package/dist/{campaign.fn-BgSGxLPo.js → campaign.fn-DJSpfhZH.js} +3 -3
- package/dist/{collectible.enum-CV2tpD2C.js → collectible.enum-D3W0TwoJ.js} +1 -1
- package/dist/{collection.fn-BYjqObg7.js → collection.fn-YzgpOmG0.js} +2 -2
- package/dist/{dto-CyhnIGn-.js → dto-sceHHLGr.js} +4 -4
- package/dist/{duplicateCampaign-jOZ1UznM.js → duplicateCampaign-CDulKxgJ.js} +2 -2
- package/dist/{effect-NKfquhhR.js → effect-BSgfR9iB.js} +1 -1
- package/dist/{email-addresses-EmFJeFmB.js → email-addresses-D_fyxOof.js} +2 -2
- package/dist/{export-B70Bp6s8.js → export-OxiqL1B7.js} +2 -2
- package/dist/{helper-DiSstsUa.js → helper-CzurWUe4.js} +1 -1
- package/dist/{index-CHXlBh7-.js → index-BF0hGAkO.js} +1 -1
- package/dist/{index-bAmlAkpk.js → index-BGMhsZnB.js} +1 -1
- package/dist/{index-DK45XoFG.js → index-B_QGGlMD.js} +3 -3
- package/dist/{index-BgP5ZHK6.js → index-BbTHqh58.js} +1 -1
- package/dist/{index-Cr2243n7.js → index-BqQas5Sx.js} +45 -40
- package/dist/{index-tvZKdKVU.js → index-BtMmY44D.js} +1 -1
- package/dist/{index-CD7Ji4Nw.js → index-CAUVTn1I.js} +23 -12
- package/dist/{index-B09KKPb4.js → index-Cg-sBBf_.js} +4 -4
- package/dist/{index-CrDg9PFk.js → index-Cyt6eKEF.js} +3 -3
- package/dist/index-Dw3ew6qN.js +85 -0
- package/dist/{index-5FmmWAib.js → index-IBvUTxqC.js} +3 -3
- package/dist/{index-nTpkh7pU.js → index-pkwrUX33.js} +2 -2
- package/dist/{index-C46EHygk.js → index-tYmg4eyJ.js} +1 -1
- package/dist/{index.esm2017-B8fYlj6l.js → index.esm2017-5xGykkgL.js} +1 -1
- package/dist/{loading-DVr3dbZ1.js → loading-CvHPT80F.js} +2 -2
- package/dist/{lodash-BNr1VEn2.js → lodash-Q-_FPkpI.js} +1 -1
- package/dist/{membership-LEuPDIbe.js → membership-CU-wFWan.js} +3 -3
- package/dist/{money-CogUwiv6.js → money-CzlfhEoe.js} +1 -1
- package/dist/{number-C5wGUTN5.js → number-Bee2M41N.js} +1 -1
- package/dist/{objectid-DbUENFHd.js → objectid-DRJQv7AY.js} +6 -6
- package/dist/{plugins-BxKrsjEx.js → plugins-CAdlnev8.js} +3 -3
- package/dist/{reward-CM4Wx2zA.js → reward-BhlYd0FB.js} +1 -1
- package/dist/{rule-CMMr2GMg.js → rule-Ccvu41A_.js} +3 -3
- package/dist/{rule-builder-D5QsmOxi.js → rule-builder-B968rIyS.js} +1 -1
- package/dist/{template-BDKqBasy.js → template-OZfyPJVE.js} +6 -6
- package/dist/{timezone-DuaWQsQ2.js → timezone-CopuRbDK.js} +2 -2
- package/dist/{trigger-IcyZcRow.js → trigger-BtQI81FL.js} +5 -5
- package/dist/usePagination-Ciom38dd.js +266 -0
- package/dist/{user-u3blYzG2.js → user-BOW0ixDK.js} +1 -1
- package/dist/{vue-i18n-DfD8ZY6j.js → vue-i18n-jTYKTJq1.js} +247 -247
- package/dist/{xlsx-Bgf4_JHr.js → xlsx-YD3LYwip.js} +1 -1
- package/dist/{zod-9J33xiFS.js → zod-B_G9o5PC.js} +1 -1
- package/package.json +1 -1
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BlBovyiT.js +0 -1034
- package/dist/index-Qg_bzaF2.js +0 -76
- package/dist/usePagination-D8OEDsCt.js +0 -223
package/dist/index-Qg_bzaF2.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { g as t, S as I, u as C, b as w } from "./index-nTpkh7pU.js";
|
|
2
|
-
const a = () => {
|
|
3
|
-
if (!I.getBusinessId()) throw new Error("Invalid business ID");
|
|
4
|
-
return C("users");
|
|
5
|
-
}, c = () => {
|
|
6
|
-
const e = I.getBusinessId();
|
|
7
|
-
if (!e) throw new Error("Invalid business ID");
|
|
8
|
-
return w(`businesses/${e}/membership`, {
|
|
9
|
-
noIdRequired: !0
|
|
10
|
-
});
|
|
11
|
-
}, y = {
|
|
12
|
-
async read(e) {
|
|
13
|
-
const s = t(
|
|
14
|
-
await a().get("", { params: e })
|
|
15
|
-
), n = s.resources.map((r) => {
|
|
16
|
-
var i, o, d, l, p, u, m, b;
|
|
17
|
-
return {
|
|
18
|
-
...r,
|
|
19
|
-
collection_TIER_0_balance: ((o = (i = r.collection.TIER) == null ? void 0 : i[0]) == null ? void 0 : o.balance) ?? 0,
|
|
20
|
-
collection_CREDIT_0_balance: ((l = (d = r.collection.CREDIT) == null ? void 0 : d[0]) == null ? void 0 : l.balance) ?? 0,
|
|
21
|
-
collection_COIN_0_balance: ((u = (p = r.collection.COIN) == null ? void 0 : p[0]) == null ? void 0 : u.balance) ?? 0,
|
|
22
|
-
collection_TITLE_0_title: ((b = (m = r.collection.TITLE) == null ? void 0 : m[0]) == null ? void 0 : b.title) ?? ""
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
return {
|
|
26
|
-
meta: s.meta,
|
|
27
|
-
resources: n
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
async readById(e) {
|
|
31
|
-
return t(await a().get(`${e}`));
|
|
32
|
-
},
|
|
33
|
-
async sendCredit(e, s) {
|
|
34
|
-
return t(
|
|
35
|
-
await c().post(
|
|
36
|
-
`members/${e}/send-credit`,
|
|
37
|
-
s
|
|
38
|
-
)
|
|
39
|
-
);
|
|
40
|
-
},
|
|
41
|
-
async deductCredit(e, s) {
|
|
42
|
-
return t(
|
|
43
|
-
await c().post(
|
|
44
|
-
`members/${e}/deduct-credit`,
|
|
45
|
-
s
|
|
46
|
-
)
|
|
47
|
-
);
|
|
48
|
-
},
|
|
49
|
-
async sendCoin(e, s) {
|
|
50
|
-
return t(
|
|
51
|
-
await c().post(
|
|
52
|
-
`members/${e}/send-coin`,
|
|
53
|
-
s
|
|
54
|
-
)
|
|
55
|
-
);
|
|
56
|
-
},
|
|
57
|
-
async deductCoin(e, s) {
|
|
58
|
-
return t(
|
|
59
|
-
await c().post(
|
|
60
|
-
`members/${e}/deduct-coin`,
|
|
61
|
-
s
|
|
62
|
-
)
|
|
63
|
-
);
|
|
64
|
-
},
|
|
65
|
-
async updateMember(e, s) {
|
|
66
|
-
return t(
|
|
67
|
-
await a().put(`${e}`, s)
|
|
68
|
-
);
|
|
69
|
-
},
|
|
70
|
-
async import(e) {
|
|
71
|
-
return await a().post("import", e);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
export {
|
|
75
|
-
y as m
|
|
76
|
-
};
|
|
@@ -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-BNr1VEn2.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
|
-
};
|