ods-ant 0.4.0 → 0.4.1
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-lib/display/Table.cjs +9 -9
- package/dist-lib/display/Table.cjs.map +1 -1
- package/dist-lib/display/Table.js +181 -124
- package/dist-lib/display/Table.js.map +1 -1
- package/dist-lib/types/ds/display/Table.d.ts +50 -0
- package/dist-lib/types/ds/display/Table.d.ts.map +1 -1
- package/package.json +6 -2
|
@@ -133,7 +133,7 @@ function y(e, t, n) {
|
|
|
133
133
|
let r = Math.max(t, Math.round(e));
|
|
134
134
|
return typeof n == "number" ? Math.min(n, r) : r;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function ne(e, t, n = {}) {
|
|
137
137
|
if (!e) return n;
|
|
138
138
|
let r = { ...n }, i = (e) => {
|
|
139
139
|
e.forEach((e) => {
|
|
@@ -141,19 +141,51 @@ function b(e, t, n = {}) {
|
|
|
141
141
|
i(e.children);
|
|
142
142
|
return;
|
|
143
143
|
}
|
|
144
|
-
let
|
|
145
|
-
!
|
|
144
|
+
let t = _(e);
|
|
145
|
+
if (!t || r[t] != null) return;
|
|
146
|
+
let n = v(e.width);
|
|
147
|
+
n != null && (r[t] = n);
|
|
146
148
|
});
|
|
147
149
|
};
|
|
148
150
|
return i(e), r;
|
|
149
151
|
}
|
|
150
|
-
function
|
|
152
|
+
function b(e) {
|
|
153
|
+
let t = e == null ? "" : String(e);
|
|
154
|
+
return t ? t.length * 8 : 0;
|
|
155
|
+
}
|
|
156
|
+
function x(e) {
|
|
157
|
+
return typeof e == "string" || typeof e == "number" ? String(e) : "";
|
|
158
|
+
}
|
|
159
|
+
function re(e, t, n) {
|
|
160
|
+
if (!e) return e;
|
|
161
|
+
let r = t.slice(0, Math.max(0, n.sampleSize)), i = (e) => {
|
|
162
|
+
let t = { ...e };
|
|
163
|
+
if (Array.isArray(t.children) && t.children.length > 0) return t.children = t.children.map(i), t;
|
|
164
|
+
if (t.width != null) return t;
|
|
165
|
+
let a = _(t);
|
|
166
|
+
if (n.enabledColumnKeys && (!a || !n.enabledColumnKeys.has(a))) return t;
|
|
167
|
+
let o = b(x(t.title)), s = r.reduce((e, n, r) => {
|
|
168
|
+
let i = S(n, t.dataIndex), a = typeof t.render == "function" ? t.render(i, n, r) : i, o = f(a) ? b(a) : b(i);
|
|
169
|
+
return Math.max(e, o);
|
|
170
|
+
}, 0);
|
|
171
|
+
return t.width = y(Math.max(o, s) + n.cellPadding, n.minWidth, n.maxWidth), t;
|
|
172
|
+
};
|
|
173
|
+
return e.map(i);
|
|
174
|
+
}
|
|
175
|
+
function ie(e) {
|
|
176
|
+
if (!(e === !0 || e === !1 || e == null)) {
|
|
177
|
+
if (Array.isArray(e)) return new Set(e.map(String));
|
|
178
|
+
if (typeof e == "string") return new Set(e.split(",").map((e) => e.trim()).filter(Boolean));
|
|
179
|
+
if (typeof e == "object") return new Set(Object.entries(e).filter(([, e]) => !!e).map(([e]) => e));
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
function S(e, t) {
|
|
151
183
|
if (Array.isArray(t)) return t.reduce((e, t) => {
|
|
152
184
|
if (e && typeof e == "object") return e[String(t)];
|
|
153
185
|
}, e);
|
|
154
186
|
if (typeof t == "string" || typeof t == "number") return e[String(t)];
|
|
155
187
|
}
|
|
156
|
-
function
|
|
188
|
+
function ae(e, t, n) {
|
|
157
189
|
if (Array.isArray(t) && t.length > 0) {
|
|
158
190
|
let r = { ...e }, i = r;
|
|
159
191
|
for (let e = 0; e < t.length - 1; e += 1) {
|
|
@@ -167,13 +199,13 @@ function ne(e, t, n) {
|
|
|
167
199
|
[String(t)]: n
|
|
168
200
|
} : e;
|
|
169
201
|
}
|
|
170
|
-
function
|
|
202
|
+
function oe(e, t, n) {
|
|
171
203
|
return e && e.map((e) => {
|
|
172
204
|
let r = { ...e };
|
|
173
|
-
if (Array.isArray(r.children) && r.children.length > 0) return r.children =
|
|
205
|
+
if (Array.isArray(r.children) && r.children.length > 0) return r.children = oe(r.children, t, n), r;
|
|
174
206
|
let i = _(r);
|
|
175
207
|
return !(i && t.has(i)) || r.dataIndex == null || (r.render = (e, t, i) => {
|
|
176
|
-
let o =
|
|
208
|
+
let o = S(t, r.dataIndex), s = typeof o == "number";
|
|
177
209
|
return /* @__PURE__ */ l(a, {
|
|
178
210
|
className: "ds-table-edit-input",
|
|
179
211
|
type: s ? "number" : "text",
|
|
@@ -187,15 +219,15 @@ function re(e, t, n) {
|
|
|
187
219
|
}), r;
|
|
188
220
|
});
|
|
189
221
|
}
|
|
190
|
-
function
|
|
222
|
+
function se(e, t) {
|
|
191
223
|
return e && e.map((e) => {
|
|
192
224
|
let n = { ...e };
|
|
193
|
-
if (Array.isArray(n.children) && n.children.length > 0) return n.children =
|
|
225
|
+
if (Array.isArray(n.children) && n.children.length > 0) return n.children = se(n.children, t), n;
|
|
194
226
|
let r = _(n);
|
|
195
227
|
return !r || t.has(r) ? n : null;
|
|
196
228
|
}).filter((e) => e !== null);
|
|
197
229
|
}
|
|
198
|
-
var
|
|
230
|
+
var ce = ({ columns: e, visibleColumns: t, onToggle: n }) => {
|
|
199
231
|
let r = s.useMemo(() => {
|
|
200
232
|
let t = [], n = (e) => {
|
|
201
233
|
e.forEach((e) => {
|
|
@@ -228,7 +260,7 @@ var ae = ({ columns: e, visibleColumns: t, onToggle: n }) => {
|
|
|
228
260
|
}, e))
|
|
229
261
|
})]
|
|
230
262
|
});
|
|
231
|
-
},
|
|
263
|
+
}, le = ({ width: e, minWidth: t = 96, maxWidth: n, onResize: r, children: i, className: a, style: o, ...c }) => {
|
|
232
264
|
let d = s.useRef(0), f = s.useRef(0), p = s.useCallback((e) => {
|
|
233
265
|
r && r(y(e, t, n));
|
|
234
266
|
}, [
|
|
@@ -274,10 +306,10 @@ var ae = ({ columns: e, visibleColumns: t, onToggle: n }) => {
|
|
|
274
306
|
}) : null]
|
|
275
307
|
});
|
|
276
308
|
};
|
|
277
|
-
function
|
|
309
|
+
function ue(e, t, n, r, i, a) {
|
|
278
310
|
return e && e.map((e) => {
|
|
279
311
|
let o = { ...e };
|
|
280
|
-
if (Array.isArray(o.children) && o.children.length > 0) return o.children =
|
|
312
|
+
if (Array.isArray(o.children) && o.children.length > 0) return o.children = ue(o.children, t, n, r, i, a), o;
|
|
281
313
|
let s = _(o);
|
|
282
314
|
if (!s) return o;
|
|
283
315
|
let c = t[s] ?? v(o.width) ?? a, l = o.onHeaderCell;
|
|
@@ -294,7 +326,12 @@ function se(e, t, n, r, i, a) {
|
|
|
294
326
|
}, o;
|
|
295
327
|
});
|
|
296
328
|
}
|
|
297
|
-
function
|
|
329
|
+
function de(e, t) {
|
|
330
|
+
if (!e || e.length === 0) return t;
|
|
331
|
+
let n = (e) => e.flatMap((e) => Array.isArray(e?.children) && e.children.length > 0 ? n(e.children) : [v(e?.width) ?? t]), r = n(e);
|
|
332
|
+
return r.length === 0 ? t : r.reduce((e, t) => e + t, 0);
|
|
333
|
+
}
|
|
334
|
+
function fe() {
|
|
298
335
|
if (typeof document > "u") return;
|
|
299
336
|
let { table: t, checkbox: n } = e, r = document.getElementById(d);
|
|
300
337
|
r || (r = document.createElement("style"), r.id = d, document.head.appendChild(r)), r.textContent = `
|
|
@@ -327,7 +364,7 @@ function ce() {
|
|
|
327
364
|
display: none !important;
|
|
328
365
|
}
|
|
329
366
|
|
|
330
|
-
.ds-table .ant-table-tbody > tr > td {
|
|
367
|
+
.ds-table .ant-table-tbody > tr:not(.ant-table-measure-row) > td {
|
|
331
368
|
color: ${t.text.body} !important;
|
|
332
369
|
font-weight: ${t.typography.body.fontWeight} !important;
|
|
333
370
|
font-size: ${t.typography.body.fontSize} !important;
|
|
@@ -461,7 +498,7 @@ function ce() {
|
|
|
461
498
|
}
|
|
462
499
|
|
|
463
500
|
.ds-table.ds-table-size-small .ant-table-thead > tr > th,
|
|
464
|
-
.ds-table.ds-table-size-small .ant-table-tbody > tr > td {
|
|
501
|
+
.ds-table.ds-table-size-small .ant-table-tbody > tr:not(.ant-table-measure-row) > td {
|
|
465
502
|
vertical-align: middle !important;
|
|
466
503
|
}
|
|
467
504
|
|
|
@@ -475,7 +512,7 @@ function ce() {
|
|
|
475
512
|
border-bottom: ${t.border.headerDividerWidth} solid ${t.border.container} !important;
|
|
476
513
|
}
|
|
477
514
|
|
|
478
|
-
.ds-table.ds-table-size-small .ant-table-tbody > tr > td {
|
|
515
|
+
.ds-table.ds-table-size-small .ant-table-tbody > tr:not(.ant-table-measure-row) > td {
|
|
479
516
|
font-size: ${t.typography.compactBody.fontSize} !important;
|
|
480
517
|
line-height: ${t.typography.compactBody.lineHeight} !important;
|
|
481
518
|
font-weight: ${t.typography.compactBody.fontWeight} !important;
|
|
@@ -504,7 +541,7 @@ function ce() {
|
|
|
504
541
|
}
|
|
505
542
|
|
|
506
543
|
.ds-table.ds-table-size-middle .ant-table-thead > tr > th,
|
|
507
|
-
.ds-table.ds-table-size-middle .ant-table-tbody > tr > td {
|
|
544
|
+
.ds-table.ds-table-size-middle .ant-table-tbody > tr:not(.ant-table-measure-row) > td {
|
|
508
545
|
padding: 0 16px !important;
|
|
509
546
|
vertical-align: middle !important;
|
|
510
547
|
}
|
|
@@ -517,7 +554,7 @@ function ce() {
|
|
|
517
554
|
font-weight: ${t.typography.header.fontWeight} !important;
|
|
518
555
|
}
|
|
519
556
|
|
|
520
|
-
.ds-table.ds-table-size-middle .ant-table-tbody > tr > td {
|
|
557
|
+
.ds-table.ds-table-size-middle .ant-table-tbody > tr:not(.ant-table-measure-row) > td {
|
|
521
558
|
font-size: ${t.typography.body.fontSize} !important;
|
|
522
559
|
line-height: ${t.typography.body.lineHeight} !important;
|
|
523
560
|
letter-spacing: ${t.typography.body.letterSpacing} !important;
|
|
@@ -525,7 +562,7 @@ function ce() {
|
|
|
525
562
|
}
|
|
526
563
|
|
|
527
564
|
.ds-table.ds-table-size-large .ant-table-thead > tr > th,
|
|
528
|
-
.ds-table.ds-table-size-large .ant-table-tbody > tr > td {
|
|
565
|
+
.ds-table.ds-table-size-large .ant-table-tbody > tr:not(.ant-table-measure-row) > td {
|
|
529
566
|
padding: 0 16px !important;
|
|
530
567
|
vertical-align: middle !important;
|
|
531
568
|
}
|
|
@@ -538,7 +575,7 @@ function ce() {
|
|
|
538
575
|
font-weight: 600 !important;
|
|
539
576
|
}
|
|
540
577
|
|
|
541
|
-
.ds-table.ds-table-size-large .ant-table-tbody > tr > td {
|
|
578
|
+
.ds-table.ds-table-size-large .ant-table-tbody > tr:not(.ant-table-measure-row) > td {
|
|
542
579
|
font-size: 16px !important;
|
|
543
580
|
line-height: 20px !important;
|
|
544
581
|
letter-spacing: -0.016px !important;
|
|
@@ -807,173 +844,193 @@ function ce() {
|
|
|
807
844
|
}
|
|
808
845
|
`;
|
|
809
846
|
}
|
|
810
|
-
var
|
|
811
|
-
let [
|
|
847
|
+
var C = ({ dsStyle: e = "styleA", dsHeaderVariant: t = "default", dsFrozenColumns: n = "none", dsFrozenBreakpoint: a = 768, dsFrozenColumnWidth: d = 180, dsTruncateCellText: f = !1, dsTruncateTooltip: p = !0, dsTruncateTooltipDelay: m = .25, dsTruncateTooltipSize: v = "normal", dsTruncateTooltipTitle: b = "Title Heading", dsEditableColumns: x = [], dsOnEditableDataChange: S, dsCustomizable: C = !1, dsVisibleColumns: w, dsOnVisibleColumnsChange: pe, dsFixedBodyHeight: me = 320, dsResizableColumns: he = !1, dsColumnWidths: T, dsOnColumnWidthsChange: ge, dsResizableColumnMinWidth: E = 96, dsResizableColumnMaxWidth: D, dsResizableDefaultColumnWidth: O = 180, dsResponsive: k = !0, dsResponsiveMinColumnWidth: _e = 160, dsDensity: ve = "comfortable", dsStickyHeader: ye = !1, dsStickyOffsetHeader: be = 0, dsRowsPerPageOptions: A, dsAutoSizeColumns: j = !1, dsAutoSizeMinWidth: xe = 96, dsAutoSizeMaxWidth: Se = 520, dsAutoSizeSampleSize: Ce = 50, dsAutoSizeCellPadding: we = 32, size: Te, className: Ee, columns: M, dataSource: N, pagination: P, ...De }) => {
|
|
848
|
+
let [Oe, ke] = s.useState(!1), [F, Ae] = s.useState(Array.isArray(N) ? N : []), [I, je] = s.useState(() => Array.isArray(w) ? new Set(w.map(String)) : M && Array.isArray(M) ? new Set(M.map((e) => _(e)).filter((e) => !!e)) : /* @__PURE__ */ new Set()), [Me, L] = s.useState(() => T ?? ne(M, O));
|
|
812
849
|
c(() => {
|
|
813
|
-
|
|
850
|
+
fe(), r();
|
|
814
851
|
}, []), c(() => {
|
|
815
852
|
if (typeof window > "u") return;
|
|
816
853
|
let e = () => {
|
|
817
|
-
|
|
854
|
+
ke(window.innerWidth <= a);
|
|
818
855
|
};
|
|
819
856
|
return e(), window.addEventListener("resize", e), () => {
|
|
820
857
|
window.removeEventListener("resize", e);
|
|
821
858
|
};
|
|
822
859
|
}, [a]), c(() => {
|
|
823
|
-
e === "styleAEditable" &&
|
|
860
|
+
e === "styleAEditable" && Ae(Array.isArray(N) ? N : []);
|
|
824
861
|
}, [N, e]);
|
|
825
|
-
let { scroll:
|
|
862
|
+
let { scroll: R, tableLayout: Ne, showSorterTooltip: z, components: B, sticky: Pe, ...Fe } = De, V = n !== "none" && Oe, H = e === "styleAEditable", U = e === "styleACustomizable" && C, W = e === "styleAFixedHeaderFooter", G = e === "styleAResizable" || he, K = P && typeof P == "object" ? P : void 0, q = s.useMemo(() => !K || !A || A.length === 0 ? K : {
|
|
863
|
+
...K,
|
|
864
|
+
pageSizeOptions: K.pageSizeOptions ?? A,
|
|
865
|
+
showSizeChanger: K.showSizeChanger ?? !0
|
|
866
|
+
}, [A, K]), Ie = Te ?? (ve === "compact" ? "small" : "middle"), [Le, Re] = s.useState(K?.defaultCurrent ?? 1), [ze, Be] = s.useState(K?.defaultPageSize ?? K?.pageSize ?? 10);
|
|
826
867
|
c(() => {
|
|
827
|
-
|
|
828
|
-
}, [w,
|
|
829
|
-
if (
|
|
830
|
-
if (
|
|
831
|
-
|
|
868
|
+
U && Array.isArray(w) && je(new Set(w.map(String)));
|
|
869
|
+
}, [w, U]), c(() => {
|
|
870
|
+
if (G) {
|
|
871
|
+
if (T) {
|
|
872
|
+
L(T);
|
|
832
873
|
return;
|
|
833
874
|
}
|
|
834
|
-
|
|
875
|
+
L((e) => ne(M, O, e));
|
|
835
876
|
}
|
|
836
877
|
}, [
|
|
837
878
|
M,
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
879
|
+
T,
|
|
880
|
+
O,
|
|
881
|
+
G
|
|
841
882
|
]);
|
|
842
|
-
let
|
|
843
|
-
|
|
883
|
+
let Ve = s.useCallback((e, t) => {
|
|
884
|
+
je((n) => {
|
|
844
885
|
let r = new Set(n);
|
|
845
886
|
t ? r.add(e) : r.delete(e);
|
|
846
887
|
let i = Array.from(r);
|
|
847
|
-
return
|
|
888
|
+
return pe?.(i), r;
|
|
848
889
|
});
|
|
849
|
-
}, [
|
|
850
|
-
|
|
890
|
+
}, [pe]), He = s.useMemo(() => Array.isArray(x) ? x.map(String) : typeof x == "string" ? x.split(",").map((e) => e.trim()).filter(Boolean) : x && typeof x == "object" ? Object.entries(x).filter(([, e]) => !!e).map(([e]) => e) : [], [x]), Ue = s.useCallback((e, t, n) => {
|
|
891
|
+
Ae((r) => {
|
|
851
892
|
if (!Array.isArray(r) || !r[e]) return r;
|
|
852
893
|
let i = [...r], a = i[e];
|
|
853
|
-
return i[e] =
|
|
894
|
+
return i[e] = ae(a, t, n), S?.(i), i;
|
|
854
895
|
});
|
|
855
|
-
}, [
|
|
856
|
-
let n = y(t,
|
|
857
|
-
|
|
896
|
+
}, [S]), We = s.useCallback((e, t) => {
|
|
897
|
+
let n = y(t, E, D);
|
|
898
|
+
L((t) => {
|
|
858
899
|
let r = {
|
|
859
900
|
...t,
|
|
860
901
|
[e]: n
|
|
861
902
|
};
|
|
862
|
-
return
|
|
903
|
+
return ge?.(r), r;
|
|
863
904
|
});
|
|
864
905
|
}, [
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
]),
|
|
869
|
-
let e = g(M,
|
|
870
|
-
|
|
906
|
+
ge,
|
|
907
|
+
D,
|
|
908
|
+
E
|
|
909
|
+
]), J = s.useMemo(() => {
|
|
910
|
+
let e = g(M, z), t = V ? ee(e, n, d) : e, r = U ? se(t, I) : t, i = new Set(He), a = H ? oe(r, i, Ue) : r, o = H ? F : Array.isArray(N) ? N : [], s = ie(j), c = j === !0 || s?.size ? re(a, o, {
|
|
911
|
+
minWidth: xe,
|
|
912
|
+
maxWidth: Se,
|
|
913
|
+
sampleSize: Ce,
|
|
914
|
+
cellPadding: we,
|
|
915
|
+
enabledColumnKeys: s
|
|
916
|
+
}) : a, l = G ? ue(c, Me, We, E, D, O) : c;
|
|
917
|
+
return !f || H ? l : te(l, p, m, v, b);
|
|
871
918
|
}, [
|
|
872
919
|
M,
|
|
873
|
-
|
|
920
|
+
z,
|
|
874
921
|
d,
|
|
875
922
|
n,
|
|
876
923
|
f,
|
|
877
924
|
p,
|
|
878
925
|
m,
|
|
879
926
|
v,
|
|
880
|
-
|
|
927
|
+
b,
|
|
928
|
+
He,
|
|
929
|
+
Ue,
|
|
930
|
+
G,
|
|
931
|
+
Me,
|
|
932
|
+
We,
|
|
933
|
+
E,
|
|
934
|
+
D,
|
|
935
|
+
O,
|
|
936
|
+
j,
|
|
937
|
+
xe,
|
|
938
|
+
Se,
|
|
881
939
|
Ce,
|
|
882
940
|
we,
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
Te,
|
|
886
|
-
O,
|
|
887
|
-
k,
|
|
888
|
-
A,
|
|
889
|
-
U,
|
|
890
|
-
W,
|
|
941
|
+
V,
|
|
942
|
+
H,
|
|
891
943
|
F,
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
944
|
+
N,
|
|
945
|
+
I,
|
|
946
|
+
U,
|
|
947
|
+
Ve
|
|
948
|
+
]), Y = s.useMemo(() => de(J, _e), [J, _e]), X = s.useCallback((e) => k ? !e || typeof e != "object" ? { x: Y } : {
|
|
949
|
+
...e,
|
|
950
|
+
x: e.x ?? Y
|
|
951
|
+
} : e, [k, Y]), Ge = s.useMemo(() => {
|
|
952
|
+
if (W) {
|
|
953
|
+
let e = R && typeof R == "object" ? R : {};
|
|
954
|
+
return X({
|
|
898
955
|
...e,
|
|
899
|
-
y: e.y ??
|
|
900
|
-
};
|
|
956
|
+
y: e.y ?? me
|
|
957
|
+
});
|
|
901
958
|
}
|
|
902
|
-
return
|
|
903
|
-
...z,
|
|
904
|
-
x: z.x ?? "max-content"
|
|
905
|
-
} : z;
|
|
959
|
+
return X(R);
|
|
906
960
|
}, [
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
961
|
+
R,
|
|
962
|
+
X,
|
|
963
|
+
me,
|
|
964
|
+
V,
|
|
965
|
+
W,
|
|
966
|
+
G
|
|
967
|
+
]), Ke = H || G || k ? Ne ?? "fixed" : Ne, qe = Pe ?? (ye ? { offsetHeader: be } : void 0), Je = s.useMemo(() => G ? {
|
|
968
|
+
...B,
|
|
914
969
|
header: {
|
|
915
|
-
...
|
|
916
|
-
cell:
|
|
970
|
+
...B?.header,
|
|
971
|
+
cell: le
|
|
917
972
|
}
|
|
918
|
-
} :
|
|
919
|
-
let e =
|
|
920
|
-
if (!
|
|
921
|
-
let t = (
|
|
922
|
-
return e.slice(t, t +
|
|
973
|
+
} : B, [B, G]), Ye = q?.total ?? (Array.isArray(N) ? N.length : 0), Z = q?.current ?? Le, Q = q?.pageSize ?? ze, Xe = s.useMemo(() => {
|
|
974
|
+
let e = H ? F : N;
|
|
975
|
+
if (!W || !Array.isArray(e) || q?.total != null && q.total > e.length) return e;
|
|
976
|
+
let t = (Z - 1) * Q;
|
|
977
|
+
return e.slice(t, t + Q);
|
|
923
978
|
}, [
|
|
924
979
|
N,
|
|
925
|
-
|
|
926
|
-
X,
|
|
980
|
+
F,
|
|
927
981
|
Z,
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
982
|
+
Q,
|
|
983
|
+
q?.total,
|
|
984
|
+
H,
|
|
985
|
+
W
|
|
986
|
+
]), Ze = {
|
|
987
|
+
...q,
|
|
988
|
+
current: Z,
|
|
989
|
+
pageSize: Q,
|
|
990
|
+
total: Ye,
|
|
991
|
+
showSizeChanger: q?.showSizeChanger ?? !1,
|
|
937
992
|
onChange: (e, t) => {
|
|
938
|
-
|
|
993
|
+
Re(e), Be(t), q?.onChange?.(e, t);
|
|
939
994
|
},
|
|
940
995
|
onShowSizeChange: (e, t) => {
|
|
941
|
-
|
|
996
|
+
Re(e), Be(t), q?.onShowSizeChange?.(e, t);
|
|
942
997
|
}
|
|
943
|
-
},
|
|
998
|
+
}, Qe = [
|
|
944
999
|
"ds-table",
|
|
945
1000
|
`ds-table-${e}`,
|
|
946
|
-
`ds-table-size-${
|
|
1001
|
+
`ds-table-size-${Ie}`,
|
|
1002
|
+
k ? "ds-table-responsive" : "",
|
|
947
1003
|
t === "white" ? "ds-table-header-white" : "",
|
|
948
|
-
|
|
1004
|
+
Ee || ""
|
|
949
1005
|
].filter(Boolean).join(" "), $ = /* @__PURE__ */ l(o, {
|
|
950
|
-
...
|
|
951
|
-
columns:
|
|
952
|
-
dataSource:
|
|
953
|
-
pagination:
|
|
954
|
-
scroll:
|
|
955
|
-
tableLayout:
|
|
956
|
-
components:
|
|
957
|
-
size:
|
|
958
|
-
className:
|
|
959
|
-
|
|
1006
|
+
...Fe,
|
|
1007
|
+
columns: J,
|
|
1008
|
+
dataSource: Xe,
|
|
1009
|
+
pagination: W ? !1 : q ?? P,
|
|
1010
|
+
scroll: Ge,
|
|
1011
|
+
tableLayout: Ke,
|
|
1012
|
+
components: Je,
|
|
1013
|
+
size: Ie,
|
|
1014
|
+
className: Qe,
|
|
1015
|
+
sticky: qe,
|
|
1016
|
+
showSorterTooltip: h(z)
|
|
960
1017
|
});
|
|
961
|
-
return
|
|
962
|
-
className: `${
|
|
1018
|
+
return W ? /* @__PURE__ */ u("div", {
|
|
1019
|
+
className: `${Qe} ds-table-fixed-frame`,
|
|
963
1020
|
children: [$, /* @__PURE__ */ l("div", {
|
|
964
1021
|
className: "ds-table-fixed-footer",
|
|
965
|
-
children: /* @__PURE__ */ l(i, { ...
|
|
1022
|
+
children: /* @__PURE__ */ l(i, { ...Ze })
|
|
966
1023
|
})]
|
|
967
|
-
}) :
|
|
968
|
-
className:
|
|
969
|
-
children: [/* @__PURE__ */ l(
|
|
1024
|
+
}) : U ? /* @__PURE__ */ u("div", {
|
|
1025
|
+
className: Qe,
|
|
1026
|
+
children: [/* @__PURE__ */ l(ce, {
|
|
970
1027
|
columns: M,
|
|
971
|
-
visibleColumns:
|
|
972
|
-
onToggle:
|
|
1028
|
+
visibleColumns: I,
|
|
1029
|
+
onToggle: Ve
|
|
973
1030
|
}), $]
|
|
974
1031
|
}) : $;
|
|
975
1032
|
};
|
|
976
1033
|
//#endregion
|
|
977
|
-
export {
|
|
1034
|
+
export { C as Table, C as default };
|
|
978
1035
|
|
|
979
1036
|
//# sourceMappingURL=Table.js.map
|