@para-ui/core 5.0.0-beta.11 → 5.0.0-beta.12
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/es/Anchor/index.js +15 -15
- package/es/Argv/dataGenerator/index.js +1 -1
- package/es/Argv/index.js +1 -1
- package/es/AutoBox/protal.js +1 -1
- package/es/AutoTips/index.js +1 -1
- package/es/Cascader/Cascader.js +1 -1
- package/es/Cascader/OptionList/Column.js +1 -1
- package/es/Cascader/OptionList/index.js +1 -1
- package/es/CheckboxGroup/index.js +1 -1
- package/es/CodeEditor/index.d.ts +1 -1
- package/es/CodeEditor/index.js +19 -19
- package/es/ComboSelect/index.js +53 -52
- package/es/DatePicker/generatePicker/generateRangePicker.js +1 -1
- package/es/DatePicker/generatePicker/generateSinglePicker.js +1 -1
- package/es/Desktop/index.js +1 -1
- package/es/Drawer/index.js +1 -1
- package/es/Dropdown/index.js +1 -1
- package/es/DynamicMultiBox/index.js +1 -1
- package/es/FieldForm/FieldFormItem/ItemHolder.js +1 -1
- package/es/FieldForm/FieldFormItem/StatusProvider.js +1 -1
- package/es/FieldForm/Form.js +1 -1
- package/es/FieldForm/FormItemInput.js +1 -1
- package/es/FieldForm/FormItemLabel.js +1 -1
- package/es/Form/index.js +1 -1
- package/es/GlobalContext/confirmLocale.js +1 -1
- package/es/GlobalContext/index.js +1 -1
- package/es/Image/PreviewGroup.js +1 -1
- package/es/Image/index.js +1 -1
- package/es/InputLang/index.js +1 -1
- package/es/Menu/verticalMenuList.js +1 -1
- package/es/Modal/Confirm/index.js +1 -1
- package/es/PageHeader/horizontalMeun.js +1 -1
- package/es/PageHeader/horizontalMeunRight.js +1 -1
- package/es/ParauiProvider/index.js +1 -1
- package/es/QuickReply/QuickReplyCode/index.js +1 -1
- package/es/RangeInput/index.js +19 -19
- package/es/Select/index.js +1 -1
- package/es/Selector/index.js +52 -47
- package/es/Selector/interface.d.ts +1 -1
- package/es/Selector/selectorData/index.js +1 -1
- package/es/Selector/selectorMain/index.js +1 -1
- package/es/Selector/util.d.ts +1 -1
- package/es/Selector/util.js +6 -12
- package/es/Table/index.js +256 -253
- package/es/Table/interface.d.ts +24 -0
- package/es/Table/tableHead.js +1 -1
- package/es/Table/util.d.ts +1 -1
- package/es/Table/util.js +3 -12
- package/es/TextEditor/index.js +1 -1
- package/es/TextField/index.js +1 -1
- package/es/ToggleButton/index.js +1 -1
- package/es/Tree/OperateBar/index.js +1 -1
- package/es/Tree/Tree.js +3 -3
- package/es/Tree/interface.d.ts +1 -1
- package/es/Upload/util.js +1 -1
- package/es/Utils/snack-kit-shims.d.ts +18 -0
- package/es/Utils/snack-kit-shims.js +19 -0
- package/es/_virtual/index.js +5 -3
- package/es/_virtual/index2.js +2 -5
- package/es/node_modules/classnames/index.js +1 -1
- package/lib/Anchor/index.js +1 -1
- package/lib/Argv/dataGenerator/index.js +1 -1
- package/lib/Argv/index.js +1 -1
- package/lib/AutoBox/protal.js +1 -1
- package/lib/AutoTips/index.js +1 -1
- package/lib/Cascader/Cascader.js +1 -1
- package/lib/Cascader/OptionList/Column.js +1 -1
- package/lib/Cascader/OptionList/index.js +1 -1
- package/lib/CheckboxGroup/index.js +1 -1
- package/lib/CodeEditor/index.d.ts +1 -1
- package/lib/CodeEditor/index.js +1 -1
- package/lib/ComboSelect/index.js +1 -1
- package/lib/DatePicker/generatePicker/generateRangePicker.js +1 -1
- package/lib/DatePicker/generatePicker/generateSinglePicker.js +1 -1
- package/lib/Desktop/index.js +1 -1
- package/lib/Drawer/index.js +1 -1
- package/lib/Dropdown/index.js +1 -1
- package/lib/DynamicMultiBox/index.js +1 -1
- package/lib/FieldForm/FieldFormItem/ItemHolder.js +1 -1
- package/lib/FieldForm/FieldFormItem/StatusProvider.js +1 -1
- package/lib/FieldForm/Form.js +1 -1
- package/lib/FieldForm/FormItemInput.js +1 -1
- package/lib/FieldForm/FormItemLabel.js +1 -1
- package/lib/Form/index.js +1 -1
- package/lib/GlobalContext/confirmLocale.js +1 -1
- package/lib/GlobalContext/index.js +1 -1
- package/lib/Image/PreviewGroup.js +1 -1
- package/lib/Image/index.js +1 -1
- package/lib/InputLang/index.js +1 -1
- package/lib/Menu/verticalMenuList.js +1 -1
- package/lib/Modal/Confirm/index.js +1 -1
- package/lib/PageHeader/horizontalMeun.js +1 -1
- package/lib/PageHeader/horizontalMeunRight.js +1 -1
- package/lib/ParauiProvider/index.js +1 -1
- package/lib/QuickReply/QuickReplyCode/index.js +1 -1
- package/lib/RangeInput/index.js +1 -1
- package/lib/Select/index.js +1 -1
- package/lib/Selector/index.js +1 -1
- package/lib/Selector/interface.d.ts +1 -1
- package/lib/Selector/selectorData/index.js +1 -1
- package/lib/Selector/selectorMain/index.js +1 -1
- package/lib/Selector/util.d.ts +1 -1
- package/lib/Selector/util.js +1 -1
- package/lib/Table/index.js +1 -1
- package/lib/Table/interface.d.ts +24 -0
- package/lib/Table/tableHead.js +1 -1
- package/lib/Table/util.d.ts +1 -1
- package/lib/Table/util.js +1 -1
- package/lib/TextEditor/index.js +1 -1
- package/lib/TextField/index.js +1 -1
- package/lib/ToggleButton/index.js +1 -1
- package/lib/Tree/OperateBar/index.js +2 -2
- package/lib/Tree/Tree.js +1 -1
- package/lib/Tree/interface.d.ts +1 -1
- package/lib/Upload/util.js +1 -1
- package/lib/Utils/snack-kit-shims.d.ts +18 -0
- package/lib/Utils/snack-kit-shims.js +2 -0
- package/lib/_virtual/index.js +1 -1
- package/lib/_virtual/index2.js +1 -1
- package/lib/node_modules/classnames/index.js +1 -1
- package/package.json +3 -2
- package/es/_virtual/index3.js +0 -5
- package/es/_virtual/index4.js +0 -5
- package/es/node_modules/@para-snack/core/dist/index.js +0 -5231
- package/lib/_virtual/index3.js +0 -2
- package/lib/_virtual/index4.js +0 -2
- package/lib/node_modules/@para-snack/core/dist/index.js +0 -20
package/es/Table/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { j as S } from "../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useState as u, useRef as
|
|
3
|
-
import {
|
|
2
|
+
import { useState as u, useRef as Q, useEffect as m, useMemo as Ve } from "react";
|
|
3
|
+
import { Cancel as Jt, DeepClone as _t, UUID as _r } from "@snack-kit/lib";
|
|
4
|
+
import { ArrayToObject as Je, GetBrowserClass as $r } from "../Utils/snack-kit-shims.js";
|
|
4
5
|
import { handGetReqParams as $t, getStringInNumber as be, requestFunc as Er, getLocalStorageSelectHead as Ir, setLocalStorageSelectHead as qr } from "./util.js";
|
|
5
6
|
import { TableHead as Br } from "./tableHead.js";
|
|
6
7
|
import { TableBody as Kr } from "./tableBody.js";
|
|
@@ -15,9 +16,9 @@ import en from "./lang/index.js";
|
|
|
15
16
|
import tn from "../ScrollBar/index.js";
|
|
16
17
|
import './index.css';/* empty css */
|
|
17
18
|
import rn from "../Utils/Hooks/useResizeObserver.js";
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
|
|
19
|
+
const wn = (Et) => {
|
|
20
|
+
const a = Yr(Et, "Table");
|
|
21
|
+
$r() === "ie" && (a.fixedColumn = !1);
|
|
21
22
|
const {
|
|
22
23
|
className: _e,
|
|
23
24
|
style: It,
|
|
@@ -36,25 +37,25 @@ const Tn = (Et) => {
|
|
|
36
37
|
autoPagination: Be = !0,
|
|
37
38
|
tableCell: Ke,
|
|
38
39
|
requestCallback: Ue,
|
|
39
|
-
checkDefaultValue:
|
|
40
|
+
checkDefaultValue: X,
|
|
40
41
|
setCheck: ye,
|
|
41
|
-
radioDefaultValue:
|
|
42
|
+
radioDefaultValue: Y,
|
|
42
43
|
setRadio: xe,
|
|
43
44
|
refresh: Bt,
|
|
44
|
-
disabledArr:
|
|
45
|
+
disabledArr: Z,
|
|
45
46
|
disabledArrStatus: Ge,
|
|
46
47
|
headData: Qe = [],
|
|
47
48
|
sortTableRadio: Xe,
|
|
48
|
-
sortTable:
|
|
49
|
+
sortTable: ee = !1,
|
|
49
50
|
filter: Ye = !1,
|
|
50
|
-
expandable:
|
|
51
|
-
rowKey:
|
|
51
|
+
expandable: R,
|
|
52
|
+
rowKey: k = "key",
|
|
52
53
|
check: V = !1,
|
|
53
54
|
radio: J = !1,
|
|
54
55
|
checkRememberPage: Kt = !1,
|
|
55
|
-
align:
|
|
56
|
-
paramsCallback:
|
|
57
|
-
operate:
|
|
56
|
+
align: te = "left",
|
|
57
|
+
paramsCallback: re,
|
|
58
|
+
operate: ne,
|
|
58
59
|
showColumns: j = "inside",
|
|
59
60
|
fixedTable: _ = !0,
|
|
60
61
|
fixedColumn: z = !0,
|
|
@@ -62,21 +63,21 @@ const Tn = (Et) => {
|
|
|
62
63
|
dragRow: $,
|
|
63
64
|
formatter: Ze,
|
|
64
65
|
lineHeight: E = 48,
|
|
65
|
-
lineWidth:
|
|
66
|
+
lineWidth: oe = 80,
|
|
66
67
|
autoSize: et = !0,
|
|
67
68
|
loadMore: T = !1,
|
|
68
69
|
loadMoreRender: tt,
|
|
69
70
|
onClickMore: rt,
|
|
70
71
|
expandValue: nt,
|
|
71
|
-
expandMultiple:
|
|
72
|
-
disabledExpand:
|
|
72
|
+
expandMultiple: ot,
|
|
73
|
+
disabledExpand: at,
|
|
73
74
|
onExpand: lt,
|
|
74
|
-
defaultExpandAllRows:
|
|
75
|
+
defaultExpandAllRows: st = !1,
|
|
75
76
|
onClickColumns: we,
|
|
76
77
|
beyondText: ae = !0,
|
|
77
|
-
tipMaxWidth:
|
|
78
|
+
tipMaxWidth: le = 500,
|
|
78
79
|
loading: Ne,
|
|
79
|
-
defaultSortValue:
|
|
80
|
+
defaultSortValue: it,
|
|
80
81
|
defaultFilterValue: Ut,
|
|
81
82
|
searchKeyName: Gt,
|
|
82
83
|
filterSearchCallback: Qt,
|
|
@@ -85,112 +86,112 @@ const Tn = (Et) => {
|
|
|
85
86
|
getPopupContainer: ft,
|
|
86
87
|
onSort: Se,
|
|
87
88
|
onError: Xt,
|
|
88
|
-
refreshInside: dt = !!
|
|
89
|
-
checkCount: ht = !!
|
|
89
|
+
refreshInside: dt = !!a.url,
|
|
90
|
+
checkCount: ht = !!a.check,
|
|
90
91
|
onDragRow: mt,
|
|
91
|
-
virtual:
|
|
92
|
+
virtual: Re = !1,
|
|
92
93
|
columnsInfoEvent: gt,
|
|
93
|
-
onRefreshCallback:
|
|
94
|
-
} =
|
|
95
|
-
page:
|
|
94
|
+
onRefreshCallback: se
|
|
95
|
+
} = a, Yt = Zr("Table", en), pt = a.expirationTime ? a.expirationTime === 0 ? 1e8 : a.expirationTime : 7, [I, bt] = u(a.page !== void 0 ? a.page : 1), [q, Zt] = u(null), [Ct, er] = u(P), [ie, ke] = u(0), [y, ve] = u([]), [tr, Dt] = u({}), [v, yt] = u({}), [p, rr] = u(Object.values(it || {})), [C, nr] = u(Object.keys(it || {})), [ce, B] = u("not"), [D, Me] = u({}), [Fe, or] = u(), [M, ar] = u({}), [lr, sr] = u({}), [K, ir] = u([]), [U, xt] = u([]), [F, cr] = u({ ...Ut }), [ue, L] = u(!0), [Tt, ur] = u(!1), He = Q(""), [fr, H] = u(), [dr, hr] = u(0), [fe, mr] = u({}), [wt, Ae] = u({}), [de, Nt] = u(!1), [St, Rt] = u([0, 0]), [gr, kt] = u(0), [vt, pr] = u(), h = Q(null), je = Q(null), G = Q(null), o = Q({
|
|
96
|
+
page: a.page !== void 0 ? a.page : 1,
|
|
96
97
|
headDataConfig: {}
|
|
97
98
|
});
|
|
98
99
|
rn({
|
|
99
100
|
dom: je.current,
|
|
100
101
|
cb: () => Wr()
|
|
101
|
-
}),
|
|
102
|
-
|
|
102
|
+
}), o.current.loadMoreUrl = T && x, o.current.search = Ee, o.current.url = x, o.current.orderTypeArr = p, o.current.orderFieldArr = C, o.current.selectFilterCom = F, o.current.data = De, o.current.searchKeyName = Gt, o.current.filterSearchCallback = Qt, o.current.onError = Xt, o.current.sizeCom = q, o.current.virtual = Re, o.current.expandable = R, m(() => () => {
|
|
103
|
+
o.current.isDestroy = !0, clearTimeout(o.current.reqTimer), clearTimeout(o.current.loadingTimer), Jt(He.current);
|
|
103
104
|
}, []), m(() => {
|
|
104
|
-
Ne !== void 0 && (clearTimeout(
|
|
105
|
+
Ne !== void 0 && (clearTimeout(o.current.loadingTimer), o.current.loadingTimer = setTimeout(() => {
|
|
105
106
|
L(Ne);
|
|
106
107
|
}, 50));
|
|
107
108
|
}, [Ne]), m(() => {
|
|
108
109
|
ur(!!(T && x));
|
|
109
110
|
}, [T, x]), m(() => {
|
|
110
|
-
|
|
111
|
+
a.page !== void 0 && w(a.page);
|
|
111
112
|
}, [qt]), m(() => {
|
|
112
|
-
if (!et) return
|
|
113
|
-
if (
|
|
114
|
-
|
|
113
|
+
if (!et) return he(W);
|
|
114
|
+
if (a.size)
|
|
115
|
+
he(W);
|
|
115
116
|
else if (h && h.current) {
|
|
116
117
|
const e = Mt();
|
|
117
|
-
P.indexOf(e) === -1 && (P.unshift(e), P.sort((t, r) => t - r), er([...P])),
|
|
118
|
+
P.indexOf(e) === -1 && (P.unshift(e), P.sort((t, r) => t - r), er([...P])), he(e);
|
|
118
119
|
}
|
|
119
120
|
}, [W, et]), m(() => {
|
|
120
|
-
|
|
121
|
+
a.headData !== void 0 && Ot(Qe, !1);
|
|
121
122
|
}, [Qe]), m(() => {
|
|
122
123
|
if (De) {
|
|
123
|
-
|
|
124
|
-
const e = Ft(), t = Je(
|
|
124
|
+
o.current.historyData = [];
|
|
125
|
+
const e = Ft(), t = Je(k, e);
|
|
125
126
|
yt(t), H(Math.random());
|
|
126
127
|
}
|
|
127
128
|
}, [De]), m(() => {
|
|
128
|
-
|
|
129
|
+
o.current.initReq && (w(1), o.current.historyData = []);
|
|
129
130
|
}, [Ee, x]), m(() => {
|
|
130
|
-
|
|
131
|
+
o.current.loadMoreUrl ? (o.current.historyData = [], w(1)) : H(Math.random());
|
|
131
132
|
}, [Bt]), m(() => {
|
|
132
|
-
clearTimeout(
|
|
133
|
-
if (
|
|
133
|
+
clearTimeout(o.current.reqTimer), o.current.url && Jt(He.current), o.current.reqTimer = setTimeout(() => {
|
|
134
|
+
if (o.current.initReq = !0, o.current.url) {
|
|
134
135
|
let e = {};
|
|
135
136
|
if (A) {
|
|
136
|
-
if (
|
|
137
|
-
e.size =
|
|
137
|
+
if (o.current.page === null || o.current.size === null) return;
|
|
138
|
+
e.size = o.current.size, e.page = o.current.page;
|
|
138
139
|
}
|
|
139
|
-
if (C.length > 0 && (e.orderField = C, e.orderType = p,
|
|
140
|
+
if (C.length > 0 && (e.orderField = C, e.orderType = p, a.sortTableRadio && (e.orderField = C[0], e.orderType = p[0])), F && Object.keys(F).length > 0) {
|
|
140
141
|
const r = Tr();
|
|
141
142
|
Object.keys(r).length > 0 && (e.filter = r);
|
|
142
143
|
}
|
|
143
|
-
|
|
144
|
-
const t = { url:
|
|
144
|
+
o.current.search && typeof o.current.search == "object" && (e = { ...e, ...o.current.search });
|
|
145
|
+
const t = { url: o.current.url, ctx: Ce, method: O, data: e };
|
|
145
146
|
if (O === "Get")
|
|
146
|
-
if (
|
|
147
|
-
|
|
148
|
-
const
|
|
149
|
-
|
|
147
|
+
if (re)
|
|
148
|
+
re(t, (r) => {
|
|
149
|
+
const n = $t(r);
|
|
150
|
+
me({ ...r, url: n, ctx: Ce, method: O });
|
|
150
151
|
});
|
|
151
152
|
else {
|
|
152
153
|
const r = $t(t);
|
|
153
|
-
|
|
154
|
+
me({ url: r, ctx: Ce, method: O });
|
|
154
155
|
}
|
|
155
|
-
O === "Post" && (
|
|
156
|
-
|
|
157
|
-
}) :
|
|
156
|
+
O === "Post" && (re ? re(t, (r) => {
|
|
157
|
+
me(r);
|
|
158
|
+
}) : me(t));
|
|
158
159
|
}
|
|
159
|
-
if (
|
|
160
|
+
if (o.current.data) {
|
|
160
161
|
let e = Ft();
|
|
161
162
|
if (e = br(e), A) {
|
|
162
|
-
if (
|
|
163
|
+
if (o.current.page === null || o.current.size === null) return;
|
|
163
164
|
const t = e.slice(
|
|
164
|
-
(
|
|
165
|
-
(
|
|
165
|
+
(o.current.page - 1) * o.current.size,
|
|
166
|
+
(o.current.page - 1) * o.current.size + o.current.size
|
|
166
167
|
);
|
|
167
|
-
|
|
168
|
+
ge(t), ke(e.length);
|
|
168
169
|
} else
|
|
169
|
-
|
|
170
|
-
|
|
170
|
+
ge(e);
|
|
171
|
+
a.loading === void 0 && L(!1);
|
|
171
172
|
}
|
|
172
173
|
}, 50);
|
|
173
174
|
}, [fr]), m(() => {
|
|
174
|
-
|
|
175
|
-
}, [
|
|
176
|
-
if (
|
|
175
|
+
Y !== void 0 && Y !== Fe && or(Y);
|
|
176
|
+
}, [Y]), m(() => {
|
|
177
|
+
if (X) {
|
|
177
178
|
const e = {};
|
|
178
|
-
for (let t = 0, r =
|
|
179
|
-
const
|
|
180
|
-
e[
|
|
179
|
+
for (let t = 0, r = X.length; t < r; t++) {
|
|
180
|
+
const n = X[t];
|
|
181
|
+
e[n] = !0;
|
|
181
182
|
}
|
|
182
183
|
Me(e);
|
|
183
184
|
}
|
|
184
|
-
}, [
|
|
185
|
-
if (
|
|
185
|
+
}, [X]), m(() => {
|
|
186
|
+
if (Z) {
|
|
186
187
|
const e = {};
|
|
187
|
-
for (let t = 0, r =
|
|
188
|
-
const
|
|
189
|
-
e[
|
|
188
|
+
for (let t = 0, r = Z.length; t < r; t++) {
|
|
189
|
+
const n = Z[t];
|
|
190
|
+
e[n] = !0;
|
|
190
191
|
}
|
|
191
|
-
|
|
192
|
+
ar(e);
|
|
192
193
|
}
|
|
193
|
-
}, [
|
|
194
|
+
}, [Z]), m(() => {
|
|
194
195
|
if (Object.keys(D).length === 0)
|
|
195
196
|
B("not");
|
|
196
197
|
else {
|
|
@@ -198,8 +199,8 @@ const Tn = (Et) => {
|
|
|
198
199
|
if (e.length === 0)
|
|
199
200
|
return B("not");
|
|
200
201
|
let t = e.length, r = 0;
|
|
201
|
-
for (let
|
|
202
|
-
const l = e[
|
|
202
|
+
for (let n = 0, s = e.length; n < s; n++) {
|
|
203
|
+
const l = e[n];
|
|
203
204
|
M[l] ? t-- : D[l] !== void 0 && r++;
|
|
204
205
|
}
|
|
205
206
|
if (r === 0)
|
|
@@ -211,35 +212,35 @@ const Tn = (Et) => {
|
|
|
211
212
|
}
|
|
212
213
|
}, [D, y, M]), m(() => {
|
|
213
214
|
Pe();
|
|
214
|
-
}, [
|
|
215
|
+
}, [Re, y, R]), m(() => {
|
|
215
216
|
We({ target: h.current });
|
|
216
217
|
});
|
|
217
218
|
const Mt = () => {
|
|
218
219
|
if (!h.current) return W;
|
|
219
220
|
let e = h.current.clientHeight - 48;
|
|
220
|
-
|
|
221
|
+
a.loadMore && (e -= E);
|
|
221
222
|
const t = Math.floor(e / E);
|
|
222
223
|
return t < 1 ? W : t;
|
|
223
|
-
},
|
|
224
|
-
|
|
224
|
+
}, he = (e) => {
|
|
225
|
+
o.current.size = e, Zt(e), H(Math.random());
|
|
225
226
|
}, w = (e) => {
|
|
226
|
-
|
|
227
|
+
o.current.page = e, bt(e), H(Math.random());
|
|
227
228
|
}, Ft = () => {
|
|
228
229
|
let e = [];
|
|
229
|
-
return
|
|
230
|
+
return o.current.data instanceof Array ? e = o.current.data : e = o.current.data?.list, e;
|
|
230
231
|
}, br = (e) => {
|
|
231
|
-
const t = Object.keys(
|
|
232
|
-
for (let
|
|
233
|
-
const l = e[
|
|
232
|
+
const t = Object.keys(o.current.selectFilterCom || {}), r = [];
|
|
233
|
+
for (let n = 0, s = e.length; n < s; n++) {
|
|
234
|
+
const l = e[n];
|
|
234
235
|
let c = !0;
|
|
235
|
-
if (
|
|
236
|
-
c =
|
|
237
|
-
search:
|
|
238
|
-
filter:
|
|
236
|
+
if (o.current.filterSearchCallback)
|
|
237
|
+
c = o.current.filterSearchCallback(l, {
|
|
238
|
+
search: o.current.search,
|
|
239
|
+
filter: o.current.selectFilterCom
|
|
239
240
|
});
|
|
240
241
|
else {
|
|
241
|
-
for (let
|
|
242
|
-
const d = t[
|
|
242
|
+
for (let i = 0, f = t.length; i < f; i++) {
|
|
243
|
+
const d = t[i], b = o.current.selectFilterCom[d] || [], N = l[d];
|
|
243
244
|
if (b.length > 0 && b.indexOf(N) === -1) {
|
|
244
245
|
c = !1;
|
|
245
246
|
continue;
|
|
@@ -252,18 +253,18 @@ const Tn = (Et) => {
|
|
|
252
253
|
return r;
|
|
253
254
|
}, Cr = (e) => {
|
|
254
255
|
let t;
|
|
255
|
-
const r =
|
|
256
|
-
if (r && typeof r != "string" && r.searchKey && (t = r.searchKey), typeof t == "string" &&
|
|
257
|
-
for (let
|
|
258
|
-
const l =
|
|
256
|
+
const r = o.current.search;
|
|
257
|
+
if (r && typeof r != "string" && r.searchKey && (t = r.searchKey), typeof t == "string" && o.current.searchKeyName && o.current.searchKeyName.length > 0)
|
|
258
|
+
for (let n = 0, s = o.current.searchKeyName.length; n < s; n++) {
|
|
259
|
+
const l = o.current.searchKeyName[n], c = e[l];
|
|
259
260
|
if (c && c.indexOf && c.indexOf(t) !== -1)
|
|
260
261
|
return !0;
|
|
261
262
|
}
|
|
262
263
|
else
|
|
263
264
|
return !0;
|
|
264
265
|
return !1;
|
|
265
|
-
}, Ht = () =>
|
|
266
|
-
if (
|
|
266
|
+
}, Ht = () => a.tableKey ? a.tableKey : a.data ? window.location.origin + window.location.pathname + window.location.hash : a.url ? `${a.url}_${a.method || "Get"}` : "", At = () => a.rememberColumns === !1 ? {} : Ir(Ht(), pt), jt = (e) => {
|
|
267
|
+
if (a.rememberColumns === !1) return;
|
|
267
268
|
const t = At(), r = {
|
|
268
269
|
headName: t.headName || {},
|
|
269
270
|
headDataConfig: t.headDataConfig || {},
|
|
@@ -271,10 +272,10 @@ const Tn = (Et) => {
|
|
|
271
272
|
validity: pt * (3600 * 24)
|
|
272
273
|
};
|
|
273
274
|
if (e.setFixed) {
|
|
274
|
-
const
|
|
275
|
-
for (let
|
|
276
|
-
const
|
|
277
|
-
r.headName[
|
|
275
|
+
const n = Je("name", e.headArr || []);
|
|
276
|
+
for (let s = 0, l = K.length; s < l; s++) {
|
|
277
|
+
const i = K[s].name || "";
|
|
278
|
+
r.headName[i] = !1, n[i] && (r.headName[i] = !0);
|
|
278
279
|
}
|
|
279
280
|
}
|
|
280
281
|
e.setDrag && (r.headDataConfig = e.headDataConfig || {}), qr(Ht(), r);
|
|
@@ -283,10 +284,10 @@ const Tn = (Et) => {
|
|
|
283
284
|
t.push(e);
|
|
284
285
|
return;
|
|
285
286
|
}
|
|
286
|
-
if (
|
|
287
|
+
if (a.rememberColumns === !1)
|
|
287
288
|
e.selected && t.push(e);
|
|
288
289
|
else {
|
|
289
|
-
const
|
|
290
|
+
const n = r.headName || {}, s = e.name || "", l = n[s];
|
|
290
291
|
l !== void 0 ? l && t.push(e) : e.selected && t.push(e);
|
|
291
292
|
}
|
|
292
293
|
}, zt = (e) => {
|
|
@@ -294,274 +295,276 @@ const Tn = (Et) => {
|
|
|
294
295
|
label: Yt({ id: "serial" }),
|
|
295
296
|
// 序号
|
|
296
297
|
selected: !0,
|
|
297
|
-
width:
|
|
298
|
+
width: a.radio || a.check || a.expandable ? 45 : 55,
|
|
298
299
|
fixed: "left",
|
|
299
300
|
align: "center",
|
|
300
301
|
className: "table-serial-number",
|
|
301
302
|
name: "table-serial-number",
|
|
302
303
|
sort: !1,
|
|
303
304
|
filter: !1,
|
|
304
|
-
render: (r,
|
|
305
|
+
render: (r, n, s, l, c) => Number(c) + 1
|
|
305
306
|
};
|
|
306
|
-
|
|
307
|
+
a.serialNumber && (typeof a.serialNumber == "boolean" ? e.unshift(t) : e.unshift({ ...t, ...a.serialNumber }));
|
|
307
308
|
}, Lt = (e) => {
|
|
308
309
|
gt && gt(e);
|
|
309
310
|
}, Ot = (e, t) => {
|
|
310
|
-
const r = [],
|
|
311
|
-
|
|
312
|
-
for (let c = 0,
|
|
311
|
+
const r = [], n = [], s = {}, l = At();
|
|
312
|
+
o.current.headDataConfig = l.headDataConfig || {};
|
|
313
|
+
for (let c = 0, i = e.length; c < i; c++) {
|
|
313
314
|
const f = e[c], d = f.name || "";
|
|
314
|
-
typeof f.width == "number" && (f.width = `${f.width}px`), t || (f.orderNum = c), Dr(f, r, l),
|
|
315
|
+
typeof f.width == "number" && (f.width = `${f.width}px`), t || (f.orderNum = c), Dr(f, r, l), n.push(f), s[d] = f;
|
|
315
316
|
}
|
|
316
|
-
t && (r.sort((c,
|
|
317
|
+
t && (r.sort((c, i) => Number(c.orderNum) - Number(i.orderNum)), n.sort((c, i) => Number(c.orderNum) - Number(i.orderNum))), zt(r), Le(r), xt(r), Lt(r), ir(n), Ae({ ...o.current.headDataConfig }), o.current.headDataJson = s;
|
|
317
318
|
}, yr = () => {
|
|
318
319
|
let e = 0;
|
|
319
|
-
return
|
|
320
|
+
return a.check && (e += 48), a.radio && (a.check ? e += 32 : e += 48), a.expandable && (a.check || a.radio ? e += 32 : e += 48), e;
|
|
320
321
|
}, xr = () => {
|
|
321
322
|
let e = 0;
|
|
322
|
-
return (
|
|
323
|
+
return (a.showColumns === "inside" || a.showColumns === void 0 || a.dragRow) && (e += 53), a.operate && (a.operate.width ? e += be(a.operate.width) : a.operate.operateBtnRender ? a.dragRow ? e += 145 : e += e === 0 ? 158 : 105 : e += oe), e;
|
|
323
324
|
}, ze = (e) => {
|
|
324
325
|
let t = e.width || "";
|
|
325
|
-
const r = e.name || "",
|
|
326
|
-
return
|
|
326
|
+
const r = e.name || "", n = o.current.headDataConfig[r] && o.current.headDataConfig[r].width;
|
|
327
|
+
return n && (t = n), t;
|
|
327
328
|
}, Le = (e) => {
|
|
328
329
|
const t = [], r = [];
|
|
329
|
-
let
|
|
330
|
-
const
|
|
331
|
-
|
|
330
|
+
let n = 0;
|
|
331
|
+
const s = yr();
|
|
332
|
+
n += s;
|
|
332
333
|
const l = xr();
|
|
333
|
-
|
|
334
|
+
n += l;
|
|
334
335
|
const c = {
|
|
335
336
|
leftBol: !1,
|
|
336
337
|
rightBol: !1
|
|
337
338
|
};
|
|
338
|
-
for (let
|
|
339
|
-
const d = e[
|
|
339
|
+
for (let i = 0, f = e.length; i < f; i++) {
|
|
340
|
+
const d = e[i];
|
|
340
341
|
let b = 0;
|
|
341
342
|
const N = ze(d);
|
|
342
|
-
N ? (b = be(N),
|
|
343
|
+
N ? (b = be(N), n += b) : n += oe, d.fixed === "left" && d.width && t.push(d), d.fixed === "right" && d.width && r.push(d);
|
|
343
344
|
}
|
|
344
345
|
if (t.length > 0) {
|
|
345
346
|
c.leftBol = !0;
|
|
346
|
-
let
|
|
347
|
+
let i = s;
|
|
347
348
|
for (let f = 0, d = t.length; f < d; f++) {
|
|
348
349
|
const b = t[f];
|
|
349
350
|
if (b.width) {
|
|
350
351
|
const N = ze(b), Jr = be(N);
|
|
351
|
-
b.paraui_left_width =
|
|
352
|
+
b.paraui_left_width = i, i += Jr, f === t.length - 1 ? b.paraui_fixed_left_last = !0 : b.paraui_fixed_left_last = !1;
|
|
352
353
|
}
|
|
353
354
|
}
|
|
354
355
|
}
|
|
355
356
|
if (r.length > 0) {
|
|
356
357
|
c.rightBol = !0;
|
|
357
|
-
let
|
|
358
|
+
let i = l;
|
|
358
359
|
for (let f = r.length - 1; f >= 0; f--) {
|
|
359
360
|
const d = r[f];
|
|
360
361
|
if (d.width) {
|
|
361
362
|
const b = ze(d), N = be(b);
|
|
362
|
-
d.paraui_right_width =
|
|
363
|
+
d.paraui_right_width = i, i += N, f === 0 ? d.paraui_fixed_right_first = !0 : d.paraui_fixed_right_first = !1;
|
|
363
364
|
}
|
|
364
365
|
}
|
|
365
366
|
}
|
|
366
|
-
hr(
|
|
367
|
+
hr(n), mr(c);
|
|
367
368
|
}, Tr = () => {
|
|
368
|
-
const e = {}, t = Object.keys(F), r =
|
|
369
|
-
for (let
|
|
370
|
-
const l = t[
|
|
369
|
+
const e = {}, t = Object.keys(F), r = o.current.headDataJson || {};
|
|
370
|
+
for (let n = 0, s = t.length; n < s; n++) {
|
|
371
|
+
const l = t[n], c = F[l] || [];
|
|
371
372
|
if (c.length === 0) continue;
|
|
372
|
-
const
|
|
373
|
-
|
|
373
|
+
const i = r[l];
|
|
374
|
+
i && i.filterRadio ? e[l] = c[0] : e[l] = c;
|
|
374
375
|
}
|
|
375
376
|
return e;
|
|
376
|
-
},
|
|
377
|
-
e.
|
|
378
|
-
|
|
379
|
-
|
|
377
|
+
}, me = async (e) => {
|
|
378
|
+
e.onCancelId = (n) => {
|
|
379
|
+
He.current = n;
|
|
380
|
+
}, a.loading === void 0 && L(!0);
|
|
381
|
+
let { data: t, error: r } = await Er(e);
|
|
382
|
+
if (!o.current.isDestroy) {
|
|
380
383
|
if (r) {
|
|
381
|
-
if (
|
|
382
|
-
let
|
|
383
|
-
if (
|
|
384
|
-
ve([]),
|
|
384
|
+
if (a.loading === void 0 && L(!1), !r.__CANCEL__) {
|
|
385
|
+
let n = !1;
|
|
386
|
+
if (o.current.onError && (n = await o.current.onError(r)), !n) return;
|
|
387
|
+
ve([]), ke(0), Dt({});
|
|
385
388
|
}
|
|
386
389
|
return !1;
|
|
387
390
|
}
|
|
388
|
-
Ue ? Ue(t, (
|
|
389
|
-
|
|
390
|
-
}) : (t.data && (t = t.data), Wt(t),
|
|
391
|
+
Ue ? Ue(t, (n) => {
|
|
392
|
+
n && (n.data && (n = n.data), Wt(n), a.loading === void 0 && L(!1));
|
|
393
|
+
}) : (t.data && (t = t.data), Wt(t), a.loading === void 0 && L(!1));
|
|
391
394
|
}
|
|
392
395
|
}, Wt = (e) => {
|
|
393
|
-
if (e.columns &&
|
|
394
|
-
|
|
395
|
-
const r = Object.keys(e.columns),
|
|
396
|
-
for (let
|
|
397
|
-
const c = r[
|
|
398
|
-
|
|
396
|
+
if (e.columns && a.headData === void 0 && JSON.stringify(e.columns) !== JSON.stringify(lr)) {
|
|
397
|
+
sr(e.columns);
|
|
398
|
+
const r = Object.keys(e.columns), n = [];
|
|
399
|
+
for (let s = 0, l = r.length; s < l; s++) {
|
|
400
|
+
const c = r[s], i = e.columns[c];
|
|
401
|
+
i.name = c, i.label = i.displayName, i.filter = i.filterFlag, i.filterRadio = i.filterRadioFlag, i.sort = i.orderFlag, i.selected = i.selectedFlag, i.width = i.width, n.push(i);
|
|
399
402
|
}
|
|
400
|
-
Ot(
|
|
403
|
+
Ot(n, !0);
|
|
401
404
|
}
|
|
402
405
|
if (A)
|
|
403
|
-
|
|
406
|
+
ge(e.list || []), ke(e.total), e.page !== void 0 && e.page !== null && (o.current.page = Number(e.page), bt(Number(e.page)));
|
|
404
407
|
else {
|
|
405
408
|
let t = [];
|
|
406
|
-
e instanceof Array ? t = e : t = e.list || [],
|
|
409
|
+
e instanceof Array ? t = e : t = e.list || [], ge(t);
|
|
407
410
|
}
|
|
408
|
-
},
|
|
409
|
-
if (
|
|
410
|
-
const r =
|
|
411
|
+
}, ge = (e) => {
|
|
412
|
+
if (o.current.loadMoreUrl) {
|
|
413
|
+
const r = o.current.historyData || [];
|
|
411
414
|
r.length > 0 && (e = [...r, ...e]);
|
|
412
415
|
}
|
|
413
|
-
const t = Je(
|
|
414
|
-
|
|
416
|
+
const t = Je(k, e);
|
|
417
|
+
o.current.historyData = e, Dt(t), ve(e), x && yt({ ...v, ...t });
|
|
415
418
|
}, wr = (e) => {
|
|
416
|
-
e !== void 0 && w(e),
|
|
419
|
+
e !== void 0 && w(e), pe();
|
|
417
420
|
}, Nr = (e) => {
|
|
418
|
-
e !== void 0 &&
|
|
421
|
+
e !== void 0 && he(e), w(1), pe();
|
|
419
422
|
}, Sr = (e) => {
|
|
420
423
|
const t = e || Number(I) + 1;
|
|
421
424
|
w(t);
|
|
422
|
-
},
|
|
425
|
+
}, Rr = (e, t) => {
|
|
423
426
|
const r = C.indexOf(t);
|
|
424
427
|
if (r !== -1) {
|
|
425
428
|
const l = p[r];
|
|
426
429
|
l === "asc" && (p[r] = "desc"), l === "desc" && (C.splice(r, 1), p.splice(r, 1)), l === void 0 && (p[r] = "asc");
|
|
427
430
|
} else
|
|
428
431
|
C.push(t), p.push("asc");
|
|
429
|
-
let
|
|
432
|
+
let n = [...C], s = [...p];
|
|
430
433
|
if (Xe) {
|
|
431
|
-
const l =
|
|
432
|
-
l !== -1 && (
|
|
434
|
+
const l = n.indexOf(t);
|
|
435
|
+
l !== -1 && (n = [n[l]], s = [s[l]]);
|
|
433
436
|
}
|
|
434
|
-
nr(
|
|
437
|
+
nr(n), rr(s), o.current.orderFieldArr = n, o.current.orderTypeArr = s, Se && Se({ orderField: n, orderType: s }), o.current.loadMoreUrl && (o.current.historyData = [], w(1)), H(Math.random());
|
|
435
438
|
}, Oe = (e) => {
|
|
436
|
-
|
|
439
|
+
a.checkDefaultValue === void 0 && Me({ ...e });
|
|
437
440
|
const t = Object.keys(e);
|
|
438
441
|
if (ye) {
|
|
439
442
|
const r = [];
|
|
440
|
-
for (let
|
|
441
|
-
v[t[
|
|
443
|
+
for (let n = 0, s = t.length; n < s; n++)
|
|
444
|
+
v[t[n]] && r.push(v[t[n]]);
|
|
442
445
|
ye(t, r);
|
|
443
446
|
}
|
|
444
447
|
}, Pt = (e, t) => {
|
|
445
|
-
const r =
|
|
446
|
-
for (let
|
|
447
|
-
const l = y[
|
|
448
|
+
const r = a.checkDefaultValue !== void 0 ? { ...D } : D;
|
|
449
|
+
for (let n = 0, s = y.length; n < s; n++) {
|
|
450
|
+
const l = y[n][k];
|
|
448
451
|
M[l] || (t ? r[l] = !0 : r[l] && delete r[l]);
|
|
449
452
|
}
|
|
450
453
|
Oe(r);
|
|
451
|
-
},
|
|
452
|
-
const
|
|
453
|
-
|
|
454
|
+
}, kr = (e, t, r) => {
|
|
455
|
+
const n = a.checkDefaultValue !== void 0 ? { ...D } : D;
|
|
456
|
+
n[r] = t, n[r] === !1 && delete n[r], Oe(n);
|
|
454
457
|
}, vr = (e, t) => {
|
|
455
458
|
xe && xe(t, v[t]);
|
|
456
|
-
},
|
|
459
|
+
}, pe = () => {
|
|
457
460
|
Kt || (Me({}), Oe({}));
|
|
458
461
|
}, Vt = (e, t, r) => {
|
|
459
462
|
Le(e), xt(e), Lt(e);
|
|
460
|
-
const
|
|
463
|
+
const n = {
|
|
461
464
|
setFixed: !0,
|
|
462
465
|
headArr: e
|
|
463
466
|
};
|
|
464
|
-
r && (
|
|
467
|
+
r && (n.setDrag = !0, n.headDataConfig = {}), jt(n), we && we(e, t);
|
|
465
468
|
}, Mr = (e, t, r) => {
|
|
466
469
|
if (t) {
|
|
467
|
-
|
|
468
|
-
const
|
|
470
|
+
o.current.headDataConfig = {}, Ae({});
|
|
471
|
+
const s = [], l = [...K];
|
|
469
472
|
zt(l);
|
|
470
|
-
for (let c = 0,
|
|
473
|
+
for (let c = 0, i = l.length; c < i; c++) {
|
|
471
474
|
const f = l[c];
|
|
472
|
-
f && f.selected &&
|
|
475
|
+
f && f.selected && s.push(f);
|
|
473
476
|
}
|
|
474
|
-
Vt(
|
|
477
|
+
Vt(s, r, !0);
|
|
475
478
|
return;
|
|
476
479
|
}
|
|
477
|
-
e.sort((
|
|
478
|
-
const
|
|
479
|
-
Vt(
|
|
480
|
+
e.sort((s, l) => Number(s.orderNum) - Number(l.orderNum));
|
|
481
|
+
const n = [...e];
|
|
482
|
+
Vt(n, r);
|
|
480
483
|
}, Fr = (e) => {
|
|
481
|
-
|
|
484
|
+
o.current.selectFilterCom = _t(e), cr(_t(e)), w(1);
|
|
482
485
|
}, Hr = (e, t) => {
|
|
483
486
|
const r = e.name || "";
|
|
484
|
-
|
|
487
|
+
o.current.headDataConfig[r] = {
|
|
485
488
|
width: t.width
|
|
486
|
-
}, Ae({ ...
|
|
487
|
-
headDataConfig:
|
|
489
|
+
}, Ae({ ...o.current.headDataConfig }), Le([...U]), jt({
|
|
490
|
+
headDataConfig: o.current.headDataConfig,
|
|
488
491
|
setDrag: !0
|
|
489
492
|
});
|
|
490
493
|
}, Ar = (e, t, r) => {
|
|
491
|
-
const
|
|
492
|
-
return e.splice(r, 0,
|
|
494
|
+
const n = e.splice(t, 1)[0];
|
|
495
|
+
return e.splice(r, 0, n), e;
|
|
493
496
|
}, jr = async (e) => {
|
|
494
497
|
const { oldIndex: t, newIndex: r } = e;
|
|
495
498
|
if (t === r) return;
|
|
496
|
-
const
|
|
497
|
-
Ar(
|
|
499
|
+
const n = [...y || []];
|
|
500
|
+
Ar(n, t, r), await mt?.(n, e) || ve(n);
|
|
498
501
|
}, zr = Ve(() => /* @__PURE__ */ S.jsx(
|
|
499
502
|
Br,
|
|
500
503
|
{
|
|
501
504
|
orderTypeArr: p,
|
|
502
505
|
orderFieldArr: C,
|
|
503
|
-
sortTable:
|
|
506
|
+
sortTable: ee,
|
|
504
507
|
filter: Ye,
|
|
505
|
-
expandable:
|
|
508
|
+
expandable: R,
|
|
506
509
|
check: V,
|
|
507
|
-
selectStatus:
|
|
510
|
+
selectStatus: ce,
|
|
508
511
|
radio: J,
|
|
509
|
-
align:
|
|
512
|
+
align: te,
|
|
510
513
|
showList: K,
|
|
511
514
|
headData: U,
|
|
512
515
|
selectFilter: F,
|
|
513
|
-
operate:
|
|
514
|
-
onRequestSort:
|
|
516
|
+
operate: ne,
|
|
517
|
+
onRequestSort: Rr,
|
|
515
518
|
selectAll: Pt,
|
|
516
519
|
changeShowList: Mr,
|
|
517
520
|
changeFilter: Fr,
|
|
518
521
|
showColumns: j,
|
|
519
|
-
rowKey:
|
|
522
|
+
rowKey: k,
|
|
520
523
|
fixedTable: _,
|
|
521
524
|
fixedColumn: z,
|
|
522
|
-
posFixed:
|
|
525
|
+
posFixed: fe,
|
|
523
526
|
beyondText: ae,
|
|
524
|
-
lineWidth:
|
|
527
|
+
lineWidth: oe,
|
|
525
528
|
dragColumn: Te,
|
|
526
529
|
dragRow: $,
|
|
527
530
|
headDataConfig: wt,
|
|
528
|
-
tipMaxWidth:
|
|
531
|
+
tipMaxWidth: le,
|
|
529
532
|
changeColumnWidth: Hr,
|
|
530
533
|
getPopupContainer: ft
|
|
531
534
|
}
|
|
532
535
|
), [
|
|
533
536
|
v,
|
|
534
537
|
j,
|
|
535
|
-
|
|
538
|
+
k,
|
|
536
539
|
y,
|
|
537
540
|
D,
|
|
538
541
|
M,
|
|
539
542
|
p,
|
|
540
543
|
C,
|
|
541
|
-
|
|
544
|
+
ee,
|
|
542
545
|
Ye,
|
|
543
|
-
|
|
546
|
+
R,
|
|
544
547
|
V,
|
|
545
|
-
|
|
548
|
+
ce,
|
|
546
549
|
J,
|
|
547
|
-
|
|
550
|
+
te,
|
|
548
551
|
K,
|
|
549
552
|
U,
|
|
550
553
|
F,
|
|
551
|
-
|
|
554
|
+
ne,
|
|
552
555
|
we,
|
|
553
556
|
Xe,
|
|
554
557
|
_,
|
|
555
|
-
|
|
558
|
+
fe,
|
|
556
559
|
ae,
|
|
557
560
|
z,
|
|
558
|
-
|
|
561
|
+
oe,
|
|
559
562
|
Te,
|
|
560
563
|
$,
|
|
561
564
|
wt,
|
|
562
565
|
ft,
|
|
563
566
|
Se,
|
|
564
|
-
|
|
567
|
+
le
|
|
565
568
|
]), Lr = Ve(() => /* @__PURE__ */ S.jsx(
|
|
566
569
|
Kr,
|
|
567
570
|
{
|
|
@@ -572,69 +575,69 @@ const Tn = (Et) => {
|
|
|
572
575
|
total: ie,
|
|
573
576
|
page: I,
|
|
574
577
|
currentRowsPerPage: q,
|
|
575
|
-
loadState:
|
|
578
|
+
loadState: ue,
|
|
576
579
|
loadMore: T,
|
|
577
580
|
loadMoreRender: tt,
|
|
578
581
|
onClickMore: rt,
|
|
579
582
|
rowData: y,
|
|
580
583
|
headData: U,
|
|
581
|
-
expandable:
|
|
584
|
+
expandable: R,
|
|
582
585
|
check: V,
|
|
583
586
|
radio: J,
|
|
584
587
|
checkJson: D,
|
|
585
588
|
radioValue: Fe,
|
|
586
589
|
disabledJson: M,
|
|
587
590
|
disabledArrStatus: Ge,
|
|
588
|
-
align:
|
|
591
|
+
align: te,
|
|
589
592
|
tableCell: Ke,
|
|
590
|
-
operate:
|
|
593
|
+
operate: ne,
|
|
591
594
|
showColumns: j,
|
|
592
595
|
formatter: Ze,
|
|
593
596
|
orderTypeArr: p,
|
|
594
597
|
orderFieldArr: C,
|
|
595
|
-
sortTable:
|
|
596
|
-
selectCheck:
|
|
598
|
+
sortTable: ee,
|
|
599
|
+
selectCheck: kr,
|
|
597
600
|
selectRadio: vr,
|
|
598
|
-
rowKey:
|
|
599
|
-
expandMultiple:
|
|
601
|
+
rowKey: k,
|
|
602
|
+
expandMultiple: ot,
|
|
600
603
|
expandValue: nt,
|
|
601
|
-
disabledExpand:
|
|
604
|
+
disabledExpand: at,
|
|
602
605
|
onExpand: lt,
|
|
603
|
-
defaultExpandAllRows:
|
|
606
|
+
defaultExpandAllRows: st,
|
|
604
607
|
onRefresh: () => {
|
|
605
|
-
|
|
608
|
+
se?.("empty"), H(Math.random()), pe();
|
|
606
609
|
},
|
|
607
|
-
posFixed:
|
|
610
|
+
posFixed: fe,
|
|
608
611
|
beyondText: ae,
|
|
609
612
|
fixedColumn: z,
|
|
610
613
|
fixedTable: _,
|
|
611
614
|
onClickRow: ct,
|
|
612
615
|
rowClassMapping: ut,
|
|
613
|
-
tipMaxWidth:
|
|
616
|
+
tipMaxWidth: le,
|
|
614
617
|
lineHeight: E,
|
|
615
618
|
dragRow: $,
|
|
616
619
|
onDragRow: jr,
|
|
617
620
|
virtualIndex: St,
|
|
618
|
-
virtual:
|
|
621
|
+
virtual: de
|
|
619
622
|
}
|
|
620
623
|
), [
|
|
621
624
|
j,
|
|
622
625
|
Ze,
|
|
623
|
-
|
|
626
|
+
k,
|
|
624
627
|
y,
|
|
625
628
|
U,
|
|
626
|
-
|
|
629
|
+
R,
|
|
627
630
|
V,
|
|
628
631
|
J,
|
|
629
632
|
D,
|
|
630
|
-
|
|
633
|
+
ee,
|
|
631
634
|
p,
|
|
632
635
|
C,
|
|
633
636
|
Fe,
|
|
634
637
|
M,
|
|
635
|
-
|
|
638
|
+
te,
|
|
636
639
|
Ke,
|
|
637
|
-
|
|
640
|
+
ne,
|
|
638
641
|
xe,
|
|
639
642
|
ye,
|
|
640
643
|
v,
|
|
@@ -646,30 +649,30 @@ const Tn = (Et) => {
|
|
|
646
649
|
q,
|
|
647
650
|
Tt,
|
|
648
651
|
nt,
|
|
649
|
-
at,
|
|
650
652
|
ot,
|
|
653
|
+
at,
|
|
651
654
|
lt,
|
|
652
|
-
|
|
653
|
-
|
|
655
|
+
st,
|
|
656
|
+
ue,
|
|
654
657
|
$e,
|
|
655
658
|
x,
|
|
656
659
|
Ge,
|
|
657
|
-
|
|
660
|
+
fe,
|
|
658
661
|
ae,
|
|
659
662
|
_,
|
|
660
663
|
z,
|
|
661
664
|
ct,
|
|
662
665
|
ut,
|
|
663
|
-
|
|
666
|
+
le,
|
|
664
667
|
E,
|
|
665
668
|
$,
|
|
666
669
|
mt,
|
|
667
670
|
St,
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
+
Re,
|
|
672
|
+
de,
|
|
673
|
+
se
|
|
671
674
|
]), Or = Ve(() => {
|
|
672
|
-
if (!(
|
|
675
|
+
if (!(o.current.page === null || o.current.size === null || T))
|
|
673
676
|
return A && /* @__PURE__ */ S.jsx(
|
|
674
677
|
Ur,
|
|
675
678
|
{
|
|
@@ -685,9 +688,9 @@ const Tn = (Et) => {
|
|
|
685
688
|
refreshInside: dt,
|
|
686
689
|
checkCount: ht,
|
|
687
690
|
onRefresh: () => {
|
|
688
|
-
|
|
691
|
+
se?.("refresh"), H(Math.random()), pe();
|
|
689
692
|
},
|
|
690
|
-
selectStatus:
|
|
693
|
+
selectStatus: ce,
|
|
691
694
|
selectAll: Pt,
|
|
692
695
|
checkNumber: Object.keys(D).length,
|
|
693
696
|
currentPageTotal: y.length,
|
|
@@ -706,13 +709,13 @@ const Tn = (Et) => {
|
|
|
706
709
|
qe,
|
|
707
710
|
dt,
|
|
708
711
|
ht,
|
|
709
|
-
|
|
712
|
+
ce,
|
|
710
713
|
y,
|
|
711
714
|
D,
|
|
712
715
|
M,
|
|
713
716
|
v,
|
|
714
717
|
vt,
|
|
715
|
-
|
|
718
|
+
se
|
|
716
719
|
]), We = (e) => {
|
|
717
720
|
const t = je.current, r = e.target;
|
|
718
721
|
if (!(!t || !r) && (t.classList.remove("table-scroll-left", "table-scroll-right", "table-scroll-middle"), !(r.scrollWidth <= r.clientWidth))) {
|
|
@@ -727,18 +730,18 @@ const Tn = (Et) => {
|
|
|
727
730
|
t.classList.add("table-scroll-middle");
|
|
728
731
|
}
|
|
729
732
|
}, Wr = () => {
|
|
730
|
-
Pe(), We({ target: h.current }), pr(
|
|
733
|
+
Pe(), We({ target: h.current }), pr(_r());
|
|
731
734
|
}, Pe = () => {
|
|
732
735
|
const e = Mt(), t = 10;
|
|
733
|
-
if (
|
|
736
|
+
if (o.current.virtual && !o.current.expandable && Number(o.current.sizeCom) > e + 2 * t) {
|
|
734
737
|
if (Nt(!0), !G.current || !h.current) return;
|
|
735
738
|
const r = G.current.clientHeight - h.current.clientHeight;
|
|
736
|
-
h.current.scrollTop >= r && (h.current.scrollTop = r,
|
|
737
|
-
const
|
|
738
|
-
|
|
739
|
+
h.current.scrollTop >= r && (h.current.scrollTop = r, kt(r)), kt(h.current.scrollTop);
|
|
740
|
+
const n = h.current, s = Math.floor(n.scrollTop / E), l = s + e + t;
|
|
741
|
+
Rt([s, l]);
|
|
739
742
|
} else
|
|
740
|
-
|
|
741
|
-
}, Pr = () => !
|
|
743
|
+
Rt([0, 0]), Nt(!1);
|
|
744
|
+
}, Pr = () => !de || !G.current || !h.current ? null : /* @__PURE__ */ S.jsx(
|
|
742
745
|
tn,
|
|
743
746
|
{
|
|
744
747
|
style: { position: "absolute", top: 0, right: 0, zIndex: 100 },
|
|
@@ -750,7 +753,7 @@ const Tn = (Et) => {
|
|
|
750
753
|
}
|
|
751
754
|
), Vr = () => {
|
|
752
755
|
let e = `${g}-table`;
|
|
753
|
-
return j === "inside" && (e += ` ${g}-table-columns-inside`), A && (e += ` ${g}-table-pagination`), T && (e += ` ${g}-table-load-more`), _ && (e += ` ${g}-table-fixed-table`), z && (e += ` ${g}-table-fixed-cloumn`), Te && (e += ` ${g}-table-drag-column`), $ && (e += ` ${g}-table-drag-row`), V && (e += ` ${g}-table-check`), J && (e += ` ${g}-table-radio`),
|
|
756
|
+
return j === "inside" && (e += ` ${g}-table-columns-inside`), A && (e += ` ${g}-table-pagination`), T && (e += ` ${g}-table-load-more`), _ && (e += ` ${g}-table-fixed-table`), z && (e += ` ${g}-table-fixed-cloumn`), Te && (e += ` ${g}-table-drag-column`), $ && (e += ` ${g}-table-drag-row`), V && (e += ` ${g}-table-check`), J && (e += ` ${g}-table-radio`), R && (e += ` ${g}-table-expandable`), y.length === 0 && (e += ` ${g}-table-no-data`), ue && (e += ` ${g}-table-load`), de && (e += ` ${g}-virtual`), _e && (e += ` ${_e}`), e;
|
|
754
757
|
};
|
|
755
758
|
return /* @__PURE__ */ S.jsxs(
|
|
756
759
|
"div",
|
|
@@ -782,13 +785,13 @@ const Tn = (Et) => {
|
|
|
782
785
|
}
|
|
783
786
|
),
|
|
784
787
|
Pr(),
|
|
785
|
-
|
|
788
|
+
ue && /* @__PURE__ */ S.jsx(Xr, {}),
|
|
786
789
|
Or
|
|
787
790
|
]
|
|
788
791
|
}
|
|
789
792
|
);
|
|
790
793
|
};
|
|
791
794
|
export {
|
|
792
|
-
|
|
795
|
+
wn as default
|
|
793
796
|
};
|
|
794
797
|
//# sourceMappingURL=index.js.map
|