@feedmepos/mf-connect 0.1.38-beta.1 → 0.1.38-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-Dc1l0CZK.js +427 -0
- package/dist/{App-BWZ2EE71.js → App-BLg0CWv-.js} +352 -364
- package/dist/{Bin-C-Ha-4yF.js → Bin-DDbKIePj.js} +8 -8
- package/dist/{Broadcast-Bo3QS8lS.js → Broadcast-CihKie6G.js} +40 -40
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-4vUMzH-l.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DbdBGvgR.js} +18 -18
- package/dist/{Card-Bs1TDE0e.js → Card-h1dYFE_s.js} +159 -159
- package/dist/{Collections-Dy5RN7Js.js → Collections-DUXdnJqQ.js} +91 -103
- package/dist/{Credit-Bqc4dw1s.js → Credit-CsGEuX9p.js} +74 -74
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-D6AmN3o3.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-0gMUNtdO.js} +488 -488
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BzwADnKp.js → EffectSheet.vue_vue_type_style_index_0_lang-CQDnl97F.js} +94 -94
- package/dist/{Experience-C2e2T7B-.js → Experience-CBbqYrql.js} +41 -41
- package/dist/{Game-C86eEhcx.js → Game-CicPpdT5.js} +31 -31
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
- package/dist/{Index-BRGweFco.js → Index-Xgvlt4vk.js} +10 -10
- package/dist/Marketing-CqOAQgg4.js +319 -0
- package/dist/{Member-B3o0Zhcw.js → Member-D1k4ZQ95.js} +76 -76
- package/dist/MemberList-BdV9sxO_.js +1606 -0
- package/dist/MemberOverview-C2n9oJZh.js +58 -0
- package/dist/{MemberTransactions-C4hao-d9.js → MemberTransactions-Q0_4nT4e.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D9zfmqLs.js → MessageInput.vue_vue_type_script_setup_true_lang-COGCJGRc.js} +36 -36
- package/dist/{Mission-BURXfzjd.js → Mission-D-TW52zn.js} +21 -21
- package/dist/{Overview-D_hrrM4O.js → Overview-BleJmxHa.js} +335 -335
- package/dist/{Point-CJXkJY5Q.js → Point-B7BYX9us.js} +41 -41
- package/dist/{Promotion-CunJrh42.js → Promotion-BphlQC55.js} +42 -42
- package/dist/{Queue-v5Itg9J4.js → Queue-DJfZqO1f.js} +51 -51
- package/dist/{Record-DJe4tg9R.js → Record-Bv1P0s2g.js} +9 -9
- package/dist/{Reward-Y9aHpny5.js → Reward-CRyEjr47.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-1KAjCblO.js → RewardGroup.vue_vue_type_script_setup_true_lang-Ckqox5Ut.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Cr99ikbK.js → RuleGroup.vue_vue_type_script_setup_true_lang-Dp4ku9ep.js} +431 -431
- package/dist/Segment-Br0Y5hzV.js +882 -0
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BhJ-oVMb.js → SelectItems.vue_vue_type_script_setup_true_lang-BuB-qwcM.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-b5bjfBvc.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DanHGQXC.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DoKAgSLE.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCKUXnGl.js} +3 -3
- package/dist/{Setting-BU5778gG.js → Setting-BPFArJMv.js} +432 -432
- package/dist/{Store-IWg0POAU.js → Store-e_odFoS5.js} +210 -210
- package/dist/StoreRewards-wXhyzIFI.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CVPQt-bn.js +995 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BcOvr526.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CWJmeeo-.js} +1 -1
- package/dist/{Tier-iN30KD7g.js → Tier-GfdGRbTX.js} +106 -106
- package/dist/{Title-Duh_Srek.js → Title-C2ZyFxNf.js} +131 -133
- package/dist/{Transaction-DLBA7Svl.js → Transaction-Dv8yYXJS.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DLD5d43d.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CK_4iMCA.js} +6 -6
- package/dist/{Voucher-cTvlMN0Y.js → Voucher-CBujqgnF.js} +37 -37
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CgooH4yn.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C5S-bi5J.js → ZodTextField.vue_vue_type_script_setup_true_lang-B8pgaARn.js} +1 -1
- package/dist/{app-De-yQ1CJ.js → app-B2Cgyy70.js} +124 -161
- package/dist/{app-A3oEKLq5.js → app-B8E3wp8L.js} +1 -1
- package/dist/app.js +3 -4
- package/dist/{business-B2JBpm4y.js → business-BRidHvRK.js} +1 -1
- package/dist/{campaign-vkzui6F2.js → campaign-B0vnIan2.js} +3 -5
- package/dist/{campaign-Bhur0NJx.js → campaign-B7v0a8YV.js} +9 -9
- package/dist/{campaign.enum-DCYkKGhd.js → campaign.enum-NH5faqyS.js} +1 -1
- package/dist/{campaign.fn--affTEi5.js → campaign.fn-BPHARk3Y.js} +161 -161
- package/dist/{collectible.enum-CLBCnfev.js → collectible.enum-Cun9w38h.js} +1 -1
- package/dist/{collection.fn-bA8q0KYy.js → collection.fn-RR5q6jqi.js} +2 -2
- package/dist/{dto-RCcWeYE0.js → dto-DK1VnGlq.js} +4 -4
- package/dist/{effect-D7qRfPe_.js → effect-CI4ZR8HW.js} +1 -1
- package/dist/{email-addresses-a8PqViID.js → email-addresses-bguwgnrW.js} +1 -1
- package/dist/{export-BneqNRn4.js → export-CcepocZB.js} +3 -3
- package/dist/{helper-DfvvxOyO.js → helper-BM1JTEFS.js} +1 -1
- package/dist/{index-CbsJ6vMJ.js → index-B0Slqiqo.js} +1 -1
- package/dist/{index-y-7yUm2e.js → index-B6_uPXyL.js} +9 -9
- package/dist/{index-CTKMdxSm.js → index-BS3AjuVw.js} +1 -1
- package/dist/{index-2LpkG8Ye.js → index-BfGdztHf.js} +1 -1
- package/dist/{index-D0GnMoag.js → index-CBuCx_0r.js} +79 -168
- package/dist/{index-4kMeSNTr.js → index-CLkqja9X.js} +385 -376
- package/dist/{index-DMrIQqFt.js → index-Cm_6xScD.js} +1 -1
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/index-DHEJX75j.js +44 -0
- package/dist/{index-CMBPIb8x.js → index-D_gLVFsk.js} +941 -932
- package/dist/{index-BWTvsoH0.js → index-DbjZHuoG.js} +1 -1
- package/dist/{index-CrFUhsZO.js → index-De1JnaPh.js} +1 -1
- package/dist/{index-DeXvASjP.js → index-Di6bqaLm.js} +3 -3
- package/dist/{index-CtDqXnOp.js → index-DjycZwfg.js} +448 -515
- package/dist/{index-B0T9GDIZ.js → index-vs1HgFHz.js} +1 -1
- package/dist/{index.esm2017-JtyypweZ.js → index.esm2017-DANlqJ4g.js} +127 -127
- package/dist/{loading-a-FqrwqI.js → loading-BXu9ofEu.js} +1 -1
- package/dist/{membership-CGVtil5J.js → membership-BBb7gdZg.js} +3 -3
- package/dist/{money-CTc1l_Cq.js → money-C02BW-pt.js} +1 -1
- package/dist/{number-W3R-0nYP.js → number-D7tIDv2q.js} +1 -1
- package/dist/objectid-oVX5A5oa.js +145 -0
- package/dist/{plugins-D2sSgTSl.js → plugins-B5tuGbFw.js} +2 -2
- package/dist/{reward-atP8vnNn.js → reward-CE-bnnnQ.js} +1 -1
- package/dist/{rule-eA5IvnjB.js → rule-BN5R8pYj.js} +3 -3
- package/dist/{rule-builder-BB29ZJ_C.js → rule-builder-16JDtaoI.js} +17 -17
- package/dist/style.css +1 -1
- package/dist/{template-DhBeDaAm.js → template-C-zyZgxl.js} +64 -64
- package/dist/{trigger-Bq_pZj1J.js → trigger-DCLjl3mM.js} +4 -4
- package/dist/{usePagination-BeF5K3M7.js → usePagination-JoYaROkV.js} +85 -85
- package/dist/{user-B-bhVFIG.js → user-C7bmFOaT.js} +1 -1
- package/dist/{vue-i18n-D-h8VDSx.js → vue-i18n-Cts9OsqE.js} +277 -277
- package/dist/{xlsx-DsByAcZl.js → xlsx-CJ5ufXk3.js} +226 -226
- package/package.json +3 -5
- package/dist/Analytic-O-qZWrFp.js +0 -761
- package/dist/AuditLogs-DlmcFEta.js +0 -1887
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +0 -58
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
- package/dist/Marketing-CnnrnXbS.js +0 -20073
- package/dist/MemberList-BpE1IjED.js +0 -1606
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/Segment-DVT8uDn8.js +0 -882
- package/dist/StoreRewards-CIjHcVoh.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cx05-OPF.js +0 -1029
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DkjojUvD.js +0 -419
- package/dist/index-CVAWGMus.js +0 -56
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/objectid-BU0Y8iAN.js +0 -145
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
|
@@ -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
|
};
|