@feedmepos/mf-payment 1.6.12 → 1.6.16-dev
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/{Actions.vue_vue_type_script_setup_true_lang-BzE-Gct7.js → Actions.vue_vue_type_script_setup_true_lang-wXi4zlOF.js} +1 -1
- package/dist/AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-CQSEq_3Z.js +139 -0
- package/dist/Chargeback-CJqlNeMt.js +397 -0
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-DaHSwthx.js → DocumentViewer.vue_vue_type_script_setup_true_lang-Ckul-6N5.js} +1 -1
- package/dist/{OnboardForm-ClZARc4S.js → OnboardForm-B4uFIDfL.js} +5 -5
- package/dist/{OnboardForm-BOTZDBIb.js → OnboardForm-BXMmCslr.js} +5 -5
- package/dist/{OnboardSubmission-YguR5hDF.js → OnboardSubmission-DEdrkQIy.js} +2 -2
- package/dist/{OnboardSubmission-DnV65T9I.js → OnboardSubmission-DTShUQzf.js} +5 -5
- package/dist/{PayoutAccount-B1NDLtp2.js → PayoutAccount-3nq_6mVJ.js} +5 -5
- package/dist/{PayoutAccount-DvNYv5HL.js → PayoutAccount-CPjDqMpd.js} +5 -5
- package/dist/{PayoutAccountSetting-C_Zqx05F.js → PayoutAccountSetting-BVgA9_0u.js} +6 -6
- package/dist/{Restaurant-DD_CHrum.js → Restaurant-DVj-b61o.js} +4 -4
- package/dist/{RestaurantSetting-Bm47mRio.js → RestaurantSetting-7y0qkqkE.js} +3 -3
- package/dist/{Settlement-PL5GSzh4.js → Settlement-Dg24FLXs.js} +3 -3
- package/dist/{Settlement-Bbbpm65S.js → Settlement-j77mmZXv.js} +4 -4
- package/dist/{SettlementTransactions-Dc15r2Lr.js → SettlementTransactions-DqnFsNBQ.js} +4 -4
- package/dist/{SettlementTransactions-BltqZDje.js → SettlementTransactions-PBQgs92s.js} +4 -4
- package/dist/{Status.vue_vue_type_script_setup_true_lang-BGA9FRsy.js → Status.vue_vue_type_script_setup_true_lang-DhbTRCYM.js} +1 -1
- package/dist/{Terminal-B_6KMihp.js → Terminal-BUDlYupd.js} +5 -5
- package/dist/{TerminalSetting-Xlol7GTZ.js → TerminalSetting-CnfALKFc.js} +4 -4
- package/dist/Transaction-C5oj2fA7.js +690 -0
- package/dist/{Transaction-BxHkdZcG.js → Transaction-Cvl6QATl.js} +10 -10
- package/dist/{TransactionOld-CKf51pjf.js → TransactionOld-Cy2U8Hn4.js} +7 -7
- package/dist/api/transaction/index.d.ts +5 -2
- package/dist/{app-soArwhtM.js → app-Bv1eKatH.js} +180 -171
- package/dist/app.js +1 -1
- package/dist/{assets-CDtrDqyi.js → assets-DAh5KIbj.js} +2 -1
- package/dist/components/AdminRestaurantSelector.vue.d.ts +17 -0
- package/dist/{grafana-DnYr_-93.js → grafana-CfbW-0Ri.js} +1 -1
- package/dist/{index-dfmTcS_Y.js → index--DP2Qv9r.js} +40 -37
- package/dist/{index-Bcykl7xw.js → index-AdfhP3iZ.js} +1 -1
- package/dist/{index-BzMAf7Yp.js → index-BP3lxBw_.js} +1 -1
- package/dist/{index-B9kfuGyP.js → index-BU3AY5BY.js} +1 -1
- package/dist/{index-CKm-Ns6l.js → index-D_XLTy5p.js} +1 -1
- package/dist/{index-C4XVaUGD.js → index-Ds4tJNkA.js} +1 -1
- package/dist/{index-d0gunCev.js → index-DyRqovBt.js} +1 -1
- package/dist/{index-CquTV1aj.js → index-FMXYkp6e.js} +2 -2
- package/dist/{index-Dq9o142y.js → index-HB-taFPL.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-C7cGPhsu.js → index.vue_vue_type_script_setup_true_lang-BqUNz7vW.js} +68 -61
- package/dist/model/transaction.d.ts +1 -0
- package/dist/package.json +2 -2
- package/dist/{payout-account-wDDfcRuF.js → payout-account-0jjiMCJQ.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/transaction/TransactionMetadataDialog.vue.d.ts +5 -0
- package/dist/views/admin/transaction/cell/Actions.vue.d.ts +1 -1
- package/package.json +1 -1
- package/dist/Chargeback-argZQvT3.js +0 -413
- package/dist/Transaction-DyGqIS3F.js +0 -582
package/dist/app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as Q } from "./index-
|
|
1
|
+
import { p as Q } from "./index-HB-taFPL.js";
|
|
2
2
|
import { d as w } from "./dinero-CIVmXLL-.js";
|
|
3
3
|
import { h as V } from "./moment-h96o7c8I.js";
|
|
4
4
|
import { defineComponent as c, resolveComponent as R, openBlock as l, createBlock as L, normalizeClass as T, withCtx as z, createElementVNode as p, toDisplayString as r } from "vue";
|
|
@@ -47,6 +47,7 @@ function k(A) {
|
|
|
47
47
|
billId: A == null ? void 0 : A.billId,
|
|
48
48
|
seqNumber: A == null ? void 0 : A.seqNumber,
|
|
49
49
|
seqNumberBinded: (A == null ? void 0 : A.seqNumberBinded) ?? !1,
|
|
50
|
+
callbackResponse: A.callbackResponse,
|
|
50
51
|
flags: {
|
|
51
52
|
notify: A.status === "SUCCESS" && !!A.notifyUrl && A._id.length > 6,
|
|
52
53
|
refund: A.status === "SUCCESS",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ValidationRule } from "@feedmepos/ui-library";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
label?: string;
|
|
4
|
+
labelMark?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
searchPlaceholder?: string;
|
|
7
|
+
rules?: ValidationRule[];
|
|
8
|
+
};
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
10
|
+
modelValue?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
"update:modelValue": (value: string) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as c } from "./index-
|
|
1
|
+
import { e as c } from "./index-HB-taFPL.js";
|
|
2
2
|
import { useCoreStore as p } from "@feedmepos/mf-common";
|
|
3
3
|
import { h as n } from "./moment-h96o7c8I.js";
|
|
4
4
|
const i = "https://grafana.feedme.farm/explore?schemaVersion=1", m = (o, r, t) => ({
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import { g as
|
|
1
|
+
import { g as r, b as n, a as s, d as m, l, c as i, r as f } from "./index-HB-taFPL.js";
|
|
2
2
|
import { h as a } from "./moment-h96o7c8I.js";
|
|
3
3
|
const w = {
|
|
4
4
|
async readBySettlementId(t) {
|
|
5
|
-
return
|
|
6
|
-
await
|
|
5
|
+
return r(
|
|
6
|
+
await n().get(
|
|
7
7
|
`/transactions/settlements/${t}`
|
|
8
8
|
)
|
|
9
9
|
);
|
|
10
10
|
},
|
|
11
11
|
async readTransactions(t) {
|
|
12
|
-
return
|
|
13
|
-
await
|
|
12
|
+
return s(
|
|
13
|
+
await n().get("/transactions", {
|
|
14
14
|
params: {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
status: t.status,
|
|
16
|
+
id: t.id,
|
|
17
|
+
by: t.by,
|
|
17
18
|
limit: t.limit,
|
|
19
|
+
cursor: t.cursor,
|
|
20
|
+
search: t.search,
|
|
18
21
|
start: a(t.start).startOf("day").toISOString(),
|
|
19
22
|
end: a(t.end).endOf("day").toISOString()
|
|
20
23
|
}
|
|
@@ -22,45 +25,45 @@ const w = {
|
|
|
22
25
|
);
|
|
23
26
|
},
|
|
24
27
|
async removeTransactionFromSettlement(t) {
|
|
25
|
-
return
|
|
26
|
-
await
|
|
28
|
+
return r(
|
|
29
|
+
await n().delete(`/settlements/${t}`)
|
|
27
30
|
);
|
|
28
31
|
},
|
|
29
32
|
async refetchTransaction({
|
|
30
33
|
transactionId: t
|
|
31
34
|
}) {
|
|
32
|
-
return
|
|
33
|
-
await
|
|
35
|
+
return r(
|
|
36
|
+
await n().get(`/transactions/query/${t}`)
|
|
34
37
|
);
|
|
35
38
|
},
|
|
36
39
|
async refundTransaction(t) {
|
|
37
|
-
return
|
|
38
|
-
await
|
|
40
|
+
return r(
|
|
41
|
+
await n().post("/transactions/refund", t)
|
|
39
42
|
);
|
|
40
43
|
},
|
|
41
44
|
async renotifyTransaction(t) {
|
|
42
|
-
return
|
|
43
|
-
await
|
|
45
|
+
return r(
|
|
46
|
+
await n().post("/payments/re-notify", { transactionId: t })
|
|
44
47
|
);
|
|
45
48
|
},
|
|
46
49
|
async bindPayId(t) {
|
|
47
|
-
return
|
|
48
|
-
await
|
|
50
|
+
return r(
|
|
51
|
+
await n().patch(
|
|
49
52
|
`/transactions/${t.transactionId}/payId`,
|
|
50
53
|
{ payId: t.payId }
|
|
51
54
|
)
|
|
52
55
|
);
|
|
53
56
|
},
|
|
54
57
|
async setGatewayId(t) {
|
|
55
|
-
return
|
|
56
|
-
await
|
|
58
|
+
return r(
|
|
59
|
+
await n().patch(
|
|
57
60
|
`/transactions/${t.transactionId}/gatewayTransactionId`,
|
|
58
61
|
{ gatewayTransactionId: t.gatewayTransactionId }
|
|
59
62
|
)
|
|
60
63
|
);
|
|
61
64
|
},
|
|
62
65
|
async readRestaurantTransactions(t) {
|
|
63
|
-
return
|
|
66
|
+
return r(
|
|
64
67
|
await f().get("/transactions", {
|
|
65
68
|
params: {
|
|
66
69
|
v2: !0,
|
|
@@ -71,7 +74,7 @@ const w = {
|
|
|
71
74
|
);
|
|
72
75
|
},
|
|
73
76
|
async readTransactionsV2(t) {
|
|
74
|
-
return
|
|
77
|
+
return s(
|
|
75
78
|
await i().get("/transactions", {
|
|
76
79
|
params: {
|
|
77
80
|
status: t.status,
|
|
@@ -87,15 +90,15 @@ const w = {
|
|
|
87
90
|
);
|
|
88
91
|
},
|
|
89
92
|
async readBusinessTransactionsBySettlementId(t) {
|
|
90
|
-
return
|
|
93
|
+
return r(
|
|
91
94
|
await i().get(
|
|
92
95
|
`/settlements/transactions/${t}`
|
|
93
96
|
)
|
|
94
97
|
);
|
|
95
98
|
},
|
|
96
99
|
async downloadPortalTransactionReport(t, c, d = !1) {
|
|
97
|
-
const u = a(t.startDate), y = a(t.endDate).endOf("day"),
|
|
98
|
-
return d &&
|
|
100
|
+
const u = a(t.startDate), y = a(t.endDate).endOf("day"), o = ["method", "fdoAmount", "amount", "fee", "payout", "flags", "businessId"];
|
|
101
|
+
return d && o.push(
|
|
99
102
|
"gatewayTransactionId",
|
|
100
103
|
"gatewayRefundId",
|
|
101
104
|
"restaurantId",
|
|
@@ -103,7 +106,7 @@ const w = {
|
|
|
103
106
|
"settlementAt"
|
|
104
107
|
), l(c, {
|
|
105
108
|
filename: `transaction-report-${u.format("YYYY_MM_DD_HH:mm")}-${y.format("YYYY_MM_DD_HH:mm")}.xlsx`,
|
|
106
|
-
exclude:
|
|
109
|
+
exclude: o,
|
|
107
110
|
include: ["method.issuer", "fdoAmount.amount", "fdoAmount.currency"],
|
|
108
111
|
rename: {
|
|
109
112
|
"method.issuer": "method",
|
|
@@ -113,17 +116,17 @@ const w = {
|
|
|
113
116
|
seqNumberBinded: "Bill Binded"
|
|
114
117
|
},
|
|
115
118
|
transformers: {
|
|
116
|
-
gateway: (
|
|
117
|
-
"fdoAmount.amount": (
|
|
118
|
-
transactionAt: (
|
|
119
|
-
refundedAt: (
|
|
120
|
-
seqNumberBinded: (
|
|
119
|
+
gateway: (e) => e === "RAZER_MERCHANT_SERVICE" ? "FIUU" : e,
|
|
120
|
+
"fdoAmount.amount": (e) => parseFloat((e / 100).toFixed(2)),
|
|
121
|
+
transactionAt: (e) => a(e).format("YYYY-MM-DD HH:mm:ss"),
|
|
122
|
+
refundedAt: (e) => e ? a(e).format("YYYY-MM-DD HH:mm:ss") : "-",
|
|
123
|
+
seqNumberBinded: (e) => e ? "Yes" : "No"
|
|
121
124
|
}
|
|
122
125
|
});
|
|
123
126
|
},
|
|
124
127
|
async downloadTransactionReport(t) {
|
|
125
128
|
return m(
|
|
126
|
-
await
|
|
129
|
+
await n().get("/transactions/report", {
|
|
127
130
|
params: {
|
|
128
131
|
start: a(t.start).startOf("day").toISOString(),
|
|
129
132
|
end: a(t.end).endOf("day").toISOString()
|
|
@@ -133,8 +136,8 @@ const w = {
|
|
|
133
136
|
);
|
|
134
137
|
},
|
|
135
138
|
async readChargebackTransactions(t) {
|
|
136
|
-
return
|
|
137
|
-
await
|
|
139
|
+
return s(
|
|
140
|
+
await n().get("/transactions/chargeback", {
|
|
138
141
|
params: {
|
|
139
142
|
search: t.search,
|
|
140
143
|
cursor: t.cursor,
|
|
@@ -146,13 +149,13 @@ const w = {
|
|
|
146
149
|
);
|
|
147
150
|
},
|
|
148
151
|
async createChargebackTransaction(t) {
|
|
149
|
-
return
|
|
150
|
-
await
|
|
152
|
+
return r(
|
|
153
|
+
await n().post("/transactions/chargeback", t)
|
|
151
154
|
);
|
|
152
155
|
},
|
|
153
156
|
async updateChargebackTransaction(t) {
|
|
154
|
-
return
|
|
155
|
-
await
|
|
157
|
+
return r(
|
|
158
|
+
await n().patch(
|
|
156
159
|
`/transactions/chargeback/${t.chargebackId}`,
|
|
157
160
|
{ canSettleAt: t.canSettleAt }
|
|
158
161
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as o, c as m, b as s, d as l, l as c, f as d, h as y } from "./index-
|
|
1
|
+
import { g as o, c as m, b as s, d as l, l as c, f as d, h as y } from "./index-HB-taFPL.js";
|
|
2
2
|
import { h as a } from "./moment-h96o7c8I.js";
|
|
3
3
|
import { d as f } from "./dinero-CIVmXLL-.js";
|
|
4
4
|
function* p(t, r) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as n, b as a, o as u, a as m } from "./index-
|
|
1
|
+
import { g as n, b as a, o as u, a as m } from "./index-HB-taFPL.js";
|
|
2
2
|
import { h as b } from "./moment-h96o7c8I.js";
|
|
3
|
-
import { d } from "./index-
|
|
3
|
+
import { d } from "./index-Ds4tJNkA.js";
|
|
4
4
|
const w = {
|
|
5
5
|
async read(s) {
|
|
6
6
|
return m(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as V, a as nR, g as rR } from "./app-
|
|
1
|
+
import { c as V, a as nR, g as rR } from "./app-Bv1eKatH.js";
|
|
2
2
|
import { useCoreStore as Bu } from "@feedmepos/mf-common";
|
|
3
3
|
import { ref as iR } from "vue";
|
|
4
4
|
var gh = {}, il = {}, y = {}, ah = {}, Vm = {}, Hm = {}, Oc = {};
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as
|
|
1
|
+
import { defineComponent as q, ref as r, resolveComponent as f, openBlock as g, createBlock as z, withCtx as I, createElementVNode as i, normalizeStyle as E, createElementBlock as M, Fragment as N, renderList as O, createVNode as c, computed as _, watch as L, onMounted as R, unref as D, toDisplayString as B, createCommentVNode as G, nextTick as H, normalizeClass as J } from "vue";
|
|
2
|
+
import { u as K } from "./index-HB-taFPL.js";
|
|
3
3
|
import "@feedmepos/ui-library";
|
|
4
|
-
const
|
|
4
|
+
const Q = ["id"], U = /* @__PURE__ */ q({
|
|
5
5
|
__name: "FmTableSelection",
|
|
6
6
|
props: {
|
|
7
7
|
value: {},
|
|
8
8
|
items: {}
|
|
9
9
|
},
|
|
10
10
|
emits: ["update:modelValue"],
|
|
11
|
-
setup(
|
|
12
|
-
const F = k,
|
|
13
|
-
return (
|
|
14
|
-
const
|
|
15
|
-
return g(),
|
|
11
|
+
setup(d, { emit: k }) {
|
|
12
|
+
const F = k, y = d, m = r(!1);
|
|
13
|
+
return (P, v) => {
|
|
14
|
+
const V = f("FmButton"), h = f("FmMenuItem"), x = f("FmMenu");
|
|
15
|
+
return g(), z(x, {
|
|
16
16
|
"max-height": 264,
|
|
17
17
|
shift: "",
|
|
18
|
-
onMenuChanged: v[0] || (v[0] = (a) =>
|
|
18
|
+
onMenuChanged: v[0] || (v[0] = (a) => m.value = a)
|
|
19
19
|
}, {
|
|
20
|
-
"menu-button":
|
|
20
|
+
"menu-button": I(() => {
|
|
21
21
|
var a;
|
|
22
22
|
return [
|
|
23
|
-
c(
|
|
24
|
-
icon:
|
|
25
|
-
label: (a =
|
|
23
|
+
c(V, {
|
|
24
|
+
icon: m.value ? "expand_less" : "expand_more",
|
|
25
|
+
label: (a = d.items.find((o) => o.value === y.value)) == null ? void 0 : a.label,
|
|
26
26
|
"icon-position": "append",
|
|
27
27
|
size: "md",
|
|
28
28
|
variant: "tertiary"
|
|
29
29
|
}, null, 8, ["icon", "label"])
|
|
30
30
|
];
|
|
31
31
|
}),
|
|
32
|
-
"menu-wrapper":
|
|
33
|
-
|
|
32
|
+
"menu-wrapper": I(({ maxHeight: a }) => [
|
|
33
|
+
i("div", {
|
|
34
34
|
id: `menu-wrapper-${a}`,
|
|
35
|
-
style:
|
|
35
|
+
style: E({ maxHeight: `${a}px` }),
|
|
36
36
|
class: "bg-fm-color-neutral-white flex flex-col overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"
|
|
37
37
|
}, [
|
|
38
|
-
(g(!0),
|
|
38
|
+
(g(!0), M(N, null, O(d.items, (o) => (g(), z(h, {
|
|
39
39
|
key: o.value,
|
|
40
40
|
label: o.label,
|
|
41
41
|
value: o.value,
|
|
42
|
-
"model-value": o.value ===
|
|
42
|
+
"model-value": o.value === y.value,
|
|
43
43
|
"onUpdate:modelValue": (l) => F("update:modelValue", o.value)
|
|
44
44
|
}, null, 8, ["label", "value", "model-value", "onUpdate:modelValue"]))), 128))
|
|
45
|
-
], 12,
|
|
45
|
+
], 12, Q)
|
|
46
46
|
]),
|
|
47
47
|
_: 1
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
}),
|
|
51
|
+
}), W = {
|
|
52
52
|
key: 0,
|
|
53
53
|
class: "basis-72 bg-white flex items-center justify-between px-24 pt-6"
|
|
54
|
-
},
|
|
55
|
-
class: /* @__PURE__ */
|
|
56
|
-
},
|
|
54
|
+
}, X = { class: "flex gap-24 items-center justify-between xs:hidden xs:invisible" }, Y = { class: "flex gap-8 items-center" }, Z = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary xs:hidden xs:invisible" }, ee = {
|
|
55
|
+
class: /* @__PURE__ */ J(["flex gap-8 items-center"])
|
|
56
|
+
}, te = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto" }, ae = { class: "flex gap-8" }, ue = /* @__PURE__ */ q({
|
|
57
57
|
__name: "index",
|
|
58
58
|
props: {
|
|
59
59
|
columnDefs: {
|
|
@@ -70,30 +70,37 @@ const K = ["id"], L = /* @__PURE__ */ U({
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
emits: ["row-click"],
|
|
73
|
-
setup(
|
|
74
|
-
const
|
|
73
|
+
setup(d, { expose: k, emit: F }) {
|
|
74
|
+
const y = [10, 20, 30, 50, 100].map((t) => ({
|
|
75
75
|
label: t.toString(),
|
|
76
76
|
value: t
|
|
77
|
-
})),
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
})), m = d, P = F, { isLoading: v, startLoading: V, stopLoading: h } = K(!0), x = r(), a = r(), o = r(""), l = r(10), n = r(1), p = r(0), C = r(0), b = async function(t = !1) {
|
|
78
|
+
const e = ++C.value;
|
|
79
|
+
V(), t && (a.value = [], o.value = "", n.value = 1, await H(), p.value = 0);
|
|
80
|
+
try {
|
|
81
|
+
const s = await m.paginate(l.value, o.value);
|
|
82
|
+
if (e !== C.value)
|
|
83
|
+
return;
|
|
84
|
+
a.value = [...a.value ?? [], ...s.data], o.value = s.meta.cursor ?? "", p.value += 1;
|
|
85
|
+
} finally {
|
|
86
|
+
e === C.value && h();
|
|
87
|
+
}
|
|
88
|
+
}, T = _(() => n.value > 1), $ = _(() => n.value < p.value ? !0 : o.value > ""), A = _(() => {
|
|
82
89
|
const t = l.value * (n.value - 1), e = t + l.value;
|
|
83
|
-
return (a.value ?? []).slice(t, e).map(
|
|
90
|
+
return (a.value ?? []).slice(t, e).map(m.rowsDefs);
|
|
84
91
|
});
|
|
85
|
-
|
|
92
|
+
L(l, () => b(!0)), L(n, (t) => {
|
|
86
93
|
t > p.value && b();
|
|
87
|
-
}),
|
|
88
|
-
const
|
|
94
|
+
}), R(() => b());
|
|
95
|
+
const j = _(() => l.value * (n.value - 1));
|
|
89
96
|
return k({
|
|
90
97
|
reset: () => b(!0),
|
|
91
98
|
data: () => a.value ?? [],
|
|
92
99
|
allData: async () => {
|
|
93
100
|
let t = [], e = "";
|
|
94
101
|
do {
|
|
95
|
-
const
|
|
96
|
-
t = [...t, ...
|
|
102
|
+
const s = await m.paginate(100, e);
|
|
103
|
+
t = [...t, ...s.data], e = s.meta.cursor ?? "";
|
|
97
104
|
} while (e > "");
|
|
98
105
|
return t;
|
|
99
106
|
},
|
|
@@ -102,40 +109,40 @@ const K = ["id"], L = /* @__PURE__ */ U({
|
|
|
102
109
|
return (a.value ?? []).slice(t, e);
|
|
103
110
|
},
|
|
104
111
|
replaceData: (t, e) => {
|
|
105
|
-
const
|
|
106
|
-
a.value && (a.value[
|
|
112
|
+
const s = l.value * (n.value - 1) + t;
|
|
113
|
+
a.value && (a.value[s] = e);
|
|
107
114
|
}
|
|
108
115
|
}), (t, e) => {
|
|
109
|
-
const
|
|
110
|
-
return g(),
|
|
111
|
-
c(
|
|
112
|
-
modelValue:
|
|
113
|
-
"onUpdate:modelValue": e[0] || (e[0] = (u) =>
|
|
114
|
-
loading:
|
|
116
|
+
const s = f("FmTable"), S = f("FmButton");
|
|
117
|
+
return g(), M(N, null, [
|
|
118
|
+
c(s, {
|
|
119
|
+
modelValue: x.value,
|
|
120
|
+
"onUpdate:modelValue": e[0] || (e[0] = (u) => x.value = u),
|
|
121
|
+
loading: D(v),
|
|
115
122
|
"page-size": l.value,
|
|
116
|
-
"row-data":
|
|
117
|
-
"column-defs":
|
|
123
|
+
"row-data": A.value,
|
|
124
|
+
"column-defs": d.columnDefs,
|
|
118
125
|
"hide-footer": !0,
|
|
119
126
|
"shrink-at": !1,
|
|
120
127
|
onRowClick: e[1] || (e[1] = (u) => {
|
|
121
128
|
var w;
|
|
122
|
-
return
|
|
129
|
+
return P("row-click", (w = a.value) == null ? void 0 : w.at(j.value + u.index));
|
|
123
130
|
})
|
|
124
131
|
}, null, 8, ["modelValue", "loading", "page-size", "row-data", "column-defs"]),
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
e[6] || (e[6] =
|
|
129
|
-
c(
|
|
130
|
-
items:
|
|
132
|
+
D(v) ? G("", !0) : (g(), M("div", W, [
|
|
133
|
+
i("div", X, [
|
|
134
|
+
i("div", Y, [
|
|
135
|
+
e[6] || (e[6] = i("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, " Items per page: ", -1)),
|
|
136
|
+
c(U, {
|
|
137
|
+
items: D(y),
|
|
131
138
|
value: l.value,
|
|
132
139
|
"onUpdate:modelValue": e[2] || (e[2] = (u) => l.value = u)
|
|
133
140
|
}, null, 8, ["items", "value"])
|
|
134
141
|
]),
|
|
135
|
-
|
|
142
|
+
i("span", Z, B((n.value - 1) * l.value) + " - " + B((n.value - 1) * l.value + l.value), 1)
|
|
136
143
|
]),
|
|
137
|
-
|
|
138
|
-
c(
|
|
144
|
+
i("div", ee, [
|
|
145
|
+
c(U, {
|
|
139
146
|
items: Array.from(Array(p.value), (u, w) => w + 1).map(
|
|
140
147
|
(u) => ({
|
|
141
148
|
label: u.toString(),
|
|
@@ -145,16 +152,16 @@ const K = ["id"], L = /* @__PURE__ */ U({
|
|
|
145
152
|
value: n.value,
|
|
146
153
|
"onUpdate:modelValue": e[3] || (e[3] = (u) => n.value = u)
|
|
147
154
|
}, null, 8, ["items", "value"]),
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
c(
|
|
155
|
+
i("span", te, " Page " + B(n.value), 1),
|
|
156
|
+
i("div", ae, [
|
|
157
|
+
c(S, {
|
|
151
158
|
disabled: !T.value,
|
|
152
159
|
icon: "chevron_left",
|
|
153
160
|
"icon-color": "neutral-black",
|
|
154
161
|
variant: "tertiary",
|
|
155
162
|
onClick: e[4] || (e[4] = () => n.value -= 1)
|
|
156
163
|
}, null, 8, ["disabled"]),
|
|
157
|
-
c(
|
|
164
|
+
c(S, {
|
|
158
165
|
disabled: !$.value,
|
|
159
166
|
icon: "chevron_right",
|
|
160
167
|
"icon-color": "neutral-black",
|
|
@@ -169,5 +176,5 @@ const K = ["id"], L = /* @__PURE__ */ U({
|
|
|
169
176
|
}
|
|
170
177
|
});
|
|
171
178
|
export {
|
|
172
|
-
|
|
179
|
+
ue as _
|
|
173
180
|
};
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as E, B as st } from "./index-
|
|
2
|
-
import { g as it, c as at, _ as ut } from "./app-
|
|
1
|
+
import { p as E, B as st } from "./index-HB-taFPL.js";
|
|
2
|
+
import { g as it, c as at, _ as ut } from "./app-Bv1eKatH.js";
|
|
3
3
|
import { useCoreStore as ot } from "@feedmepos/mf-common";
|
|
4
|
-
import { d as H } from "./index-
|
|
4
|
+
import { d as H } from "./index-Ds4tJNkA.js";
|
|
5
5
|
var Q = { exports: {} };
|
|
6
6
|
(function(i, a) {
|
|
7
7
|
(function(t, m) {
|