@gulibs/react-vtable 0.0.13 → 0.0.15
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/index.cjs +4 -4
- package/dist/index.js +144 -135
- package/dist/pro-table.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -47,7 +47,7 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
47
47
|
["partial", x],
|
|
48
48
|
["partialRight", S],
|
|
49
49
|
["rearg", w]
|
|
50
|
-
], me = "[object Arguments]", he = "[object Array]", ge = "[object AsyncFunction]", D = "[object Boolean]", _e = "[object Date]", ve = "[object DOMException]", ye = "[object Error]", O = "[object Function]",
|
|
50
|
+
], me = "[object Arguments]", he = "[object Array]", ge = "[object AsyncFunction]", D = "[object Boolean]", _e = "[object Date]", ve = "[object DOMException]", ye = "[object Error]", O = "[object Function]", be = "[object GeneratorFunction]", k = "[object Map]", A = "[object Number]", xe = "[object Null]", Se = "[object Object]", Ce = "[object Promise]", we = "[object Proxy]", Te = "[object RegExp]", Ee = "[object Set]", De = "[object String]", Oe = "[object Symbol]", ke = "[object Undefined]", Ae = "[object WeakMap]", je = "[object WeakSet]", Me = "[object ArrayBuffer]", Ne = "[object DataView]", Pe = "[object Float32Array]", Fe = "[object Float64Array]", Ie = "[object Int8Array]", Le = "[object Int16Array]", Re = "[object Int32Array]", ze = "[object Uint8Array]", Be = "[object Uint8ClampedArray]", Ve = "[object Uint16Array]", He = "[object Uint32Array]", Ue = /\b__p \+= '';/g, We = /\b(__p \+=) '' \+/g, Ge = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Ke = /&(?:amp|lt|gt|quot|#39);/g, qe = /[&<>"']/g, Je = RegExp(Ke.source), Ye = RegExp(qe.source), Xe = /<%-([\s\S]+?)%>/g, Ze = /<%([\s\S]+?)%>/g, Qe = /<%=([\s\S]+?)%>/g, $e = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, et = /^\w*$/, tt = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, nt = /[\\^$.*+?()[\]{}|]/g, rt = RegExp(nt.source), it = /^\s+/, j = /\s/, at = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, ot = /\{\n\/\* \[wrapped with (.+)\] \*/, st = /,? & /, ct = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, lt = /[()=,{}\[\]\/\s]/, ut = /\\(\\)?/g, dt = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, ft = /\w*$/, pt = /^[-+]0x[0-9a-f]+$/i, mt = /^0b[01]+$/i, ht = /^\[object .+?Constructor\]$/, gt = /^0o[0-7]+$/i, _t = /^(?:0|[1-9]\d*)$/, vt = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, yt = /($^)/, bt = /['\n\r\u2028\u2029\\]/g, xt = "\\ud800-\\udfff", St = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", Ct = "\\u2700-\\u27bf", M = "a-z\\xdf-\\xf6\\xf8-\\xff", wt = "\\xac\\xb1\\xd7\\xf7", Tt = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", Et = "\\u2000-\\u206f", Dt = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", Ot = "A-Z\\xc0-\\xd6\\xd8-\\xde", kt = "\\ufe0e\\ufe0f", At = wt + Tt + Et + Dt, jt = "['’]", N = "[" + xt + "]", Mt = "[" + At + "]", Nt = "[" + St + "]", Pt = "\\d+", Ft = "[" + Ct + "]", It = "[" + M + "]", Lt = "[^" + xt + At + Pt + Ct + M + Ot + "]", Rt = "\\ud83c[\\udffb-\\udfff]", zt = "(?:" + Nt + "|" + Rt + ")", Bt = "[^" + xt + "]", Vt = "(?:\\ud83c[\\udde6-\\uddff]){2}", Ht = "[\\ud800-\\udbff][\\udc00-\\udfff]", Ut = "[" + Ot + "]", Wt = "\\u200d", Gt = "(?:" + It + "|" + Lt + ")", Kt = "(?:" + Ut + "|" + Lt + ")", qt = "(?:" + jt + "(?:d|ll|m|re|s|t|ve))?", Jt = "(?:" + jt + "(?:D|LL|M|RE|S|T|VE))?", Yt = zt + "?", Xt = "[" + kt + "]?", Zt = "(?:" + Wt + "(?:" + [
|
|
51
51
|
Bt,
|
|
52
52
|
Vt,
|
|
53
53
|
Ht
|
|
@@ -79,9 +79,9 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
79
79
|
Pt,
|
|
80
80
|
tn
|
|
81
81
|
].join("|"), "g"), ln = RegExp("[" + Wt + xt + St + kt + "]"), P = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, un = /* @__PURE__ */ "Array.Buffer.DataView.Date.Error.Float32Array.Float64Array.Function.Int8Array.Int16Array.Int32Array.Map.Math.Object.Promise.RegExp.Set.String.Symbol.TypeError.Uint8Array.Uint8ClampedArray.Uint16Array.Uint32Array.WeakMap._.clearTimeout.isFinite.parseInt.setTimeout".split("."), dn = -1, F = {};
|
|
82
|
-
F[Pe] = F[Fe] = F[Ie] = F[Le] = F[Re] = F[ze] = F[Be] = F[Ve] = F[He] = !0, F[me] = F[he] = F[Me] = F[D] = F[Ne] = F[_e] = F[ye] = F[O] = F[
|
|
82
|
+
F[Pe] = F[Fe] = F[Ie] = F[Le] = F[Re] = F[ze] = F[Be] = F[Ve] = F[He] = !0, F[me] = F[he] = F[Me] = F[D] = F[Ne] = F[_e] = F[ye] = F[O] = F[k] = F[A] = F[Se] = F[Te] = F[Ee] = F[De] = F[Ae] = !1;
|
|
83
83
|
var I = {};
|
|
84
|
-
I[me] = I[he] = I[Me] = I[Ne] = I[D] = I[_e] = I[Pe] = I[Fe] = I[Ie] = I[Le] = I[Re] = I[
|
|
84
|
+
I[me] = I[he] = I[Me] = I[Ne] = I[D] = I[_e] = I[Pe] = I[Fe] = I[Ie] = I[Le] = I[Re] = I[k] = I[A] = I[Se] = I[Te] = I[Ee] = I[De] = I[Oe] = I[ze] = I[Be] = I[Ve] = I[He] = !0, I[ye] = I[O] = I[Ae] = !1;
|
|
85
85
|
var L = {
|
|
86
86
|
À: "A",
|
|
87
87
|
Á: "A",
|
|
@@ -789,7 +789,7 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
789
789
|
if (m) {
|
|
790
790
|
if (s = fs(e), !c) return mo(e, s);
|
|
791
791
|
} else {
|
|
792
|
-
var h = cs(e), g = h == O || h ==
|
|
792
|
+
var h = cs(e), g = h == O || h == be;
|
|
793
793
|
if (Su(e)) return ro(e, c);
|
|
794
794
|
if (h == Se || h == me || g && !a) {
|
|
795
795
|
if (s = l || g ? {} : ps(e), !c) return l ? _o(e, Ti(s, e)) : go(e, wi(s, e));
|
|
@@ -974,7 +974,7 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
974
974
|
return f ? (a ||= new ui(), qo(e, t, n, r, i, a)) : !1;
|
|
975
975
|
}
|
|
976
976
|
function oa(e) {
|
|
977
|
-
return Y(e) && cs(e) ==
|
|
977
|
+
return Y(e) && cs(e) == k;
|
|
978
978
|
}
|
|
979
979
|
function sa(e, t, r, i) {
|
|
980
980
|
var a = r.length, o = a, s = !i;
|
|
@@ -1581,7 +1581,7 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
1581
1581
|
function Bo(e) {
|
|
1582
1582
|
return function(t) {
|
|
1583
1583
|
var n = cs(t);
|
|
1584
|
-
return n ==
|
|
1584
|
+
return n == k ? _r(t) : n == Ee ? xr(t) : nr(t, e(t));
|
|
1585
1585
|
};
|
|
1586
1586
|
}
|
|
1587
1587
|
function Vo(e, t, r, i, a, s, c, l) {
|
|
@@ -1653,11 +1653,11 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
1653
1653
|
case Me: return !(e.byteLength != t.byteLength || !a(new Bt(e), new Bt(t)));
|
|
1654
1654
|
case D:
|
|
1655
1655
|
case _e:
|
|
1656
|
-
case
|
|
1656
|
+
case A: return hu(+e, +t);
|
|
1657
1657
|
case ye: return e.name == t.name && e.message == t.message;
|
|
1658
1658
|
case Te:
|
|
1659
1659
|
case De: return e == t + "";
|
|
1660
|
-
case
|
|
1660
|
+
case k: var s = _r;
|
|
1661
1661
|
case Ee:
|
|
1662
1662
|
var c = r & m;
|
|
1663
1663
|
if (s ||= br, e.size != t.size && !c) return !1;
|
|
@@ -1759,11 +1759,11 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
1759
1759
|
for (var t = []; e;) Ln(t, os(e)), e = Ht(e);
|
|
1760
1760
|
return t;
|
|
1761
1761
|
} : $f, cs = qi;
|
|
1762
|
-
(vn && cs(new vn(/* @__PURE__ */ new ArrayBuffer(1))) != Ne || yn && cs(new yn()) !=
|
|
1762
|
+
(vn && cs(new vn(/* @__PURE__ */ new ArrayBuffer(1))) != Ne || yn && cs(new yn()) != k || bn && cs(bn.resolve()) != Ce || Sn && cs(new Sn()) != Ee || z && cs(new z()) != Ae) && (cs = function(e) {
|
|
1763
1763
|
var t = qi(e), r = t == Se ? e.constructor : n, i = r ? Us(r) : "";
|
|
1764
1764
|
if (i) switch (i) {
|
|
1765
1765
|
case Sr: return Ne;
|
|
1766
|
-
case Or: return
|
|
1766
|
+
case Or: return k;
|
|
1767
1767
|
case kr: return Ce;
|
|
1768
1768
|
case Mr: return Ee;
|
|
1769
1769
|
case Nr: return Ae;
|
|
@@ -1829,8 +1829,8 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
1829
1829
|
case Be:
|
|
1830
1830
|
case Ve:
|
|
1831
1831
|
case He: return co(e, n);
|
|
1832
|
-
case
|
|
1833
|
-
case
|
|
1832
|
+
case k: return new r();
|
|
1833
|
+
case A:
|
|
1834
1834
|
case De: return new r(e);
|
|
1835
1835
|
case Te: return oo(e);
|
|
1836
1836
|
case Ee: return new r();
|
|
@@ -2382,7 +2382,7 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
2382
2382
|
if (e == null) return 0;
|
|
2383
2383
|
if (bu(e)) return Gu(e) ? wr(e) : e.length;
|
|
2384
2384
|
var t = cs(e);
|
|
2385
|
-
return t ==
|
|
2385
|
+
return t == k || t == Ee ? e.size : pa(e).length;
|
|
2386
2386
|
}
|
|
2387
2387
|
function Ll(e, t, r) {
|
|
2388
2388
|
var i = K(e) ? Bn : Ra;
|
|
@@ -2603,7 +2603,7 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
2603
2603
|
if (e == null) return !0;
|
|
2604
2604
|
if (bu(e) && (K(e) || typeof e == "string" || typeof e.splice == "function" || Su(e) || qu(e) || vu(e))) return !e.length;
|
|
2605
2605
|
var t = cs(e);
|
|
2606
|
-
if (t ==
|
|
2606
|
+
if (t == k || t == Ee) return !e.size;
|
|
2607
2607
|
if (ws(e)) return !pa(e).length;
|
|
2608
2608
|
for (var n in e) if (N.call(e, n)) return !1;
|
|
2609
2609
|
return !0;
|
|
@@ -2627,7 +2627,7 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
2627
2627
|
function Au(e) {
|
|
2628
2628
|
if (!J(e)) return !1;
|
|
2629
2629
|
var t = qi(e);
|
|
2630
|
-
return t == O || t ==
|
|
2630
|
+
return t == O || t == be || t == ge || t == we;
|
|
2631
2631
|
}
|
|
2632
2632
|
function ju(e) {
|
|
2633
2633
|
return typeof e == "number" && e == Z(e);
|
|
@@ -2663,7 +2663,7 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
2663
2663
|
return e == null;
|
|
2664
2664
|
}
|
|
2665
2665
|
function Bu(e) {
|
|
2666
|
-
return typeof e == "number" || Y(e) && qi(e) ==
|
|
2666
|
+
return typeof e == "number" || Y(e) && qi(e) == A;
|
|
2667
2667
|
}
|
|
2668
2668
|
function Vu(e) {
|
|
2669
2669
|
if (!Y(e) || qi(e) != Se) return !1;
|
|
@@ -2701,7 +2701,7 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
2701
2701
|
if (bu(e)) return Gu(e) ? Tr(e) : mo(e);
|
|
2702
2702
|
if (qt && e[qt]) return gr(e[qt]());
|
|
2703
2703
|
var t = cs(e);
|
|
2704
|
-
return (t ==
|
|
2704
|
+
return (t == k ? _r : t == Ee ? br : Gd)(e);
|
|
2705
2705
|
}
|
|
2706
2706
|
function ed(e) {
|
|
2707
2707
|
return e ? (e = nd(e), e === oe || e === -oe ? (e < 0 ? -1 : 1) * ce : e === e ? e : 0) : e === 0 ? e : 0;
|
|
@@ -4084,7 +4084,7 @@ function useProTable(e) {
|
|
|
4084
4084
|
payload: e
|
|
4085
4085
|
});
|
|
4086
4086
|
}, [x, T.total]);
|
|
4087
|
-
let
|
|
4087
|
+
let be = useMemo(() => t.filter((e) => !e.hideInTable).map((e) => ({
|
|
4088
4088
|
id: e.key || String(e.dataIndex),
|
|
4089
4089
|
accessorKey: e.dataIndex,
|
|
4090
4090
|
header: e.title,
|
|
@@ -4111,9 +4111,9 @@ function useProTable(e) {
|
|
|
4111
4111
|
return t ? parseFloat(t[1]) : parseInt(String(e.width)) || 100;
|
|
4112
4112
|
})() : 100 : e.fixed ? 100 : void 0,
|
|
4113
4113
|
...e
|
|
4114
|
-
})), [t]),
|
|
4114
|
+
})), [t]), k = useReactTable({
|
|
4115
4115
|
data: T.data,
|
|
4116
|
-
columns:
|
|
4116
|
+
columns: be,
|
|
4117
4117
|
state: {
|
|
4118
4118
|
sorting: ie,
|
|
4119
4119
|
columnFilters: oe,
|
|
@@ -4139,7 +4139,7 @@ function useProTable(e) {
|
|
|
4139
4139
|
pageCount: Math.ceil(T.total / T.pageSize),
|
|
4140
4140
|
columnResizeMode: "onChange",
|
|
4141
4141
|
enableColumnPinning: !0
|
|
4142
|
-
}),
|
|
4142
|
+
}), A = useCallback((e, t) => {
|
|
4143
4143
|
r ? (E({
|
|
4144
4144
|
type: "SET_PAGINATION",
|
|
4145
4145
|
payload: {
|
|
@@ -4243,12 +4243,12 @@ function useProTable(e) {
|
|
|
4243
4243
|
}
|
|
4244
4244
|
});
|
|
4245
4245
|
}, [n, x]), {
|
|
4246
|
-
table:
|
|
4246
|
+
table: k,
|
|
4247
4247
|
state: T,
|
|
4248
4248
|
dispatch: E,
|
|
4249
4249
|
actions: Ce,
|
|
4250
4250
|
handlers: {
|
|
4251
|
-
handlePaginationChange:
|
|
4251
|
+
handlePaginationChange: A,
|
|
4252
4252
|
handleSearch: xe,
|
|
4253
4253
|
handleReset: Se
|
|
4254
4254
|
}
|
|
@@ -6210,6 +6210,13 @@ var getFixedStyle = (e) => {
|
|
|
6210
6210
|
minWidth: t ? `${i}px` : void 0,
|
|
6211
6211
|
maxWidth: t ? `${i}px` : void 0
|
|
6212
6212
|
};
|
|
6213
|
+
}, shouldShowTooltip = (e) => {
|
|
6214
|
+
if (e == null) return !1;
|
|
6215
|
+
if (typeof e == "string") {
|
|
6216
|
+
let t = e.trim();
|
|
6217
|
+
return t !== "" && t !== "-";
|
|
6218
|
+
}
|
|
6219
|
+
return !0;
|
|
6213
6220
|
};
|
|
6214
6221
|
function DraggableRow({ row: e, children: t }) {
|
|
6215
6222
|
let { attributes: n, listeners: r, setNodeRef: i, transform: a, transition: o, isDragging: s } = useSortable({ id: e.id }), c = {
|
|
@@ -6235,51 +6242,53 @@ function DraggableRow({ row: e, children: t }) {
|
|
|
6235
6242
|
});
|
|
6236
6243
|
}
|
|
6237
6244
|
const ProTable = forwardRef((e, t) => {
|
|
6238
|
-
let { columns: r = [], className: i, classNames: o, style: l, tableStyle: u, size: d = "middle", bordered: m = !1, loading: h = !1, toolbar: g, pagination: _, paginationRender: v, rowSelection: y, draggable: b, editable: x, headerTitle: S, headerSubTitle: C, footer: ne, onRow: T, search: E, cardBordered: re = !1, cardProps: ie, tableRender: ce, tableExtraRender: le, emptyRender: ue, onSubmit: de, onReset: fe, scroll: pe, sticky: me, tableLayout: he, locale: ge, expandable: D, rowKey: _e = "id" } = e, [
|
|
6245
|
+
let { columns: r = [], className: i, classNames: o, style: l, tableStyle: u, size: d = "middle", bordered: m = !1, loading: h = !1, toolbar: g, pagination: _, paginationRender: v, rowSelection: y, draggable: b, editable: x, headerTitle: S, headerSubTitle: C, footer: ne, onRow: T, search: E, cardBordered: re = !1, cardProps: ie, tableRender: ce, tableExtraRender: le, emptyRender: ue, onSubmit: de, onReset: fe, scroll: pe, sticky: me, tableLayout: he, locale: ge, expandable: D, rowKey: _e = "id", actionRef: ve } = e, [ye, O] = useState(() => r);
|
|
6239
6246
|
useEffect(() => {
|
|
6240
|
-
|
|
6247
|
+
O(r);
|
|
6241
6248
|
}, [r]);
|
|
6242
|
-
let
|
|
6249
|
+
let be = {
|
|
6243
6250
|
...e,
|
|
6244
|
-
columns:
|
|
6245
|
-
}, { table: k, state: A, actions:
|
|
6246
|
-
columns:
|
|
6251
|
+
columns: ye
|
|
6252
|
+
}, { table: k, state: A, actions: xe, handlers: Se } = useProTable(be), { request: Ce } = be, { visibleColumns: we, setVisibleColumns: Te, columnSettings: Ee, updateColumnSettings: De } = useColumns({
|
|
6253
|
+
columns: ye,
|
|
6247
6254
|
rowSelection: !!y,
|
|
6248
6255
|
draggable: !!b,
|
|
6249
6256
|
editable: !!x
|
|
6250
|
-
}),
|
|
6257
|
+
}), Oe = D !== !1 && D !== void 0, ke = D !== !1 && D !== void 0 && D.childrenColumnName || "children", Ae = typeof _e == "function" ? _e : (e) => e[_e] || e.id || e.key, je = useCallback((e) => {
|
|
6251
6258
|
let t = [];
|
|
6252
6259
|
return e.forEach((e) => {
|
|
6253
|
-
t.push(
|
|
6254
|
-
let n = e[
|
|
6255
|
-
n && Array.isArray(n) && n.length > 0 && t.push(...
|
|
6260
|
+
t.push(Ae(e));
|
|
6261
|
+
let n = e[ke];
|
|
6262
|
+
n && Array.isArray(n) && n.length > 0 && t.push(...je(n));
|
|
6256
6263
|
}), t;
|
|
6257
|
-
}, [
|
|
6264
|
+
}, [ke, Ae]), [Me, Ne] = useState(() => D !== !1 && D !== void 0 && D.defaultExpandAllRows && A.data.length > 0 ? je(A.data) : D !== !1 && D !== void 0 && D.defaultExpandedRowKeys || []), Pe = D !== !1 && D !== void 0 ? D.expandedRowKeys ?? Me : Me, Fe = D !== !1 && D !== void 0 && D.expandedRowKeys !== void 0;
|
|
6258
6265
|
useEffect(() => {
|
|
6259
|
-
D !== !1 && D !== void 0 && D.defaultExpandAllRows && A.data.length > 0 && !
|
|
6266
|
+
D !== !1 && D !== void 0 && D.defaultExpandAllRows && A.data.length > 0 && !Fe && Ne(je(A.data));
|
|
6260
6267
|
}, [
|
|
6261
6268
|
A.data,
|
|
6262
6269
|
D !== !1 && D !== void 0 ? D.defaultExpandAllRows : !1,
|
|
6263
|
-
|
|
6264
|
-
|
|
6270
|
+
je,
|
|
6271
|
+
Fe
|
|
6265
6272
|
]);
|
|
6266
|
-
let
|
|
6267
|
-
let n =
|
|
6268
|
-
r = D !== !1 && D !== void 0 && D.accordion ? t ? [n] : [] : t ? [...
|
|
6273
|
+
let Ie = useCallback((e, t) => {
|
|
6274
|
+
let n = Ae(e), r;
|
|
6275
|
+
r = D !== !1 && D !== void 0 && D.accordion ? t ? [n] : [] : t ? [...Pe, n] : Pe.filter((e) => e !== n), Fe || Ne(r), D !== !1 && D !== void 0 && (D.onExpand?.(t, e), D.onExpandedRowsChange?.(r));
|
|
6269
6276
|
}, [
|
|
6270
|
-
Ne,
|
|
6271
|
-
D,
|
|
6272
6277
|
Pe,
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6278
|
+
D,
|
|
6279
|
+
Fe,
|
|
6280
|
+
Ae
|
|
6281
|
+
]), Le = useCallback((e) => {
|
|
6282
|
+
let t = e[ke];
|
|
6276
6283
|
return !!(t && Array.isArray(t) && t.length > 0);
|
|
6277
|
-
}, [
|
|
6278
|
-
let t =
|
|
6279
|
-
return
|
|
6280
|
-
}, [
|
|
6281
|
-
useImperativeHandle(t, () =>
|
|
6282
|
-
|
|
6284
|
+
}, [ke]), Re = useCallback((e) => {
|
|
6285
|
+
let t = Ae(e);
|
|
6286
|
+
return Pe.includes(t);
|
|
6287
|
+
}, [Pe, Ae]), [ze, Be] = useState(d), [Ve, He] = useState(!1), Ue = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor));
|
|
6288
|
+
useImperativeHandle(t, () => xe, [xe]), useEffect(() => {
|
|
6289
|
+
ve && (typeof ve == "function" ? ve(xe) : ve && typeof ve == "object" && "current" in ve && (ve.current = xe));
|
|
6290
|
+
}, [xe, ve]);
|
|
6291
|
+
let We = (e) => {
|
|
6283
6292
|
if (b && typeof b == "object" && typeof b.onDragEnd == "function") {
|
|
6284
6293
|
let { active: t, over: n } = e;
|
|
6285
6294
|
if (!n || t.id === n.id) return;
|
|
@@ -6288,7 +6297,7 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6288
6297
|
let t = [...A.data], [n] = t.splice(i, 1);
|
|
6289
6298
|
t.splice(a, 0, n);
|
|
6290
6299
|
try {
|
|
6291
|
-
|
|
6300
|
+
xe.setTableData(t);
|
|
6292
6301
|
} catch {}
|
|
6293
6302
|
try {
|
|
6294
6303
|
b.onDragEnd({
|
|
@@ -6301,60 +6310,60 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6301
6310
|
} catch {}
|
|
6302
6311
|
}
|
|
6303
6312
|
}
|
|
6304
|
-
},
|
|
6313
|
+
}, Ge = () => {
|
|
6305
6314
|
try {
|
|
6306
6315
|
k.toggleAllRowsSelected?.(!1);
|
|
6307
6316
|
} catch {}
|
|
6308
|
-
|
|
6309
|
-
},
|
|
6310
|
-
|
|
6311
|
-
},
|
|
6312
|
-
|
|
6313
|
-
},
|
|
6317
|
+
xe.clearSelected();
|
|
6318
|
+
}, Ke = (e) => {
|
|
6319
|
+
Se.handleSearch(e), de?.(e);
|
|
6320
|
+
}, et = () => {
|
|
6321
|
+
Se.handleReset(), fe?.();
|
|
6322
|
+
}, nt = (e, t) => {
|
|
6314
6323
|
if (k.setColumnFilters((n) => {
|
|
6315
6324
|
let r = (Array.isArray(n) ? n : []).filter((t) => t.id !== e);
|
|
6316
6325
|
return t.length > 0 && r.push({
|
|
6317
6326
|
id: e,
|
|
6318
6327
|
value: t
|
|
6319
6328
|
}), r;
|
|
6320
|
-
}),
|
|
6329
|
+
}), Ce) {
|
|
6321
6330
|
let n = { ...A.filters };
|
|
6322
|
-
t.length > 0 ? n[e] = t : delete n[e],
|
|
6331
|
+
t.length > 0 ? n[e] = t : delete n[e], Se.handleSearch(n);
|
|
6323
6332
|
}
|
|
6324
|
-
},
|
|
6325
|
-
if (k.setColumnFilters((t) => (Array.isArray(t) ? t : []).filter((t) => t.id !== e)),
|
|
6333
|
+
}, it = (e) => {
|
|
6334
|
+
if (k.setColumnFilters((t) => (Array.isArray(t) ? t : []).filter((t) => t.id !== e)), Ce) {
|
|
6326
6335
|
let t = { ...A.filters };
|
|
6327
|
-
delete t[e],
|
|
6336
|
+
delete t[e], Se.handleSearch(t);
|
|
6328
6337
|
}
|
|
6329
|
-
},
|
|
6338
|
+
}, j = (e, t) => {
|
|
6330
6339
|
if (e === "order" && Array.isArray(t)) {
|
|
6331
|
-
|
|
6340
|
+
O(t);
|
|
6332
6341
|
return;
|
|
6333
6342
|
}
|
|
6334
6343
|
if (typeof e == "string" && t && t.fixed !== void 0) {
|
|
6335
6344
|
let n = e, r = t.fixed;
|
|
6336
|
-
|
|
6345
|
+
O((e) => e.map((e) => (e.key || String(e.dataIndex)) === n ? {
|
|
6337
6346
|
...e,
|
|
6338
6347
|
fixed: r
|
|
6339
6348
|
} : e));
|
|
6340
6349
|
return;
|
|
6341
6350
|
}
|
|
6342
|
-
|
|
6343
|
-
},
|
|
6351
|
+
De(e, t);
|
|
6352
|
+
}, at = {
|
|
6344
6353
|
small: "text-xs [&_th]:py-1.5 [&_td]:py-1",
|
|
6345
6354
|
middle: "text-sm [&_th]:py-2 [&_td]:py-2",
|
|
6346
6355
|
large: "text-base [&_th]:py-3 [&_td]:py-3"
|
|
6347
|
-
},
|
|
6348
|
-
let n = e.original, r =
|
|
6356
|
+
}, ot = ye.length + (y ? 1 : 0) + (b ? 1 : 0), st = (e, t = 0) => {
|
|
6357
|
+
let n = e.original, r = Ae(n) || e.original.id || e.original.key || e.id, i = A.editingKey === r;
|
|
6349
6358
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
6350
6359
|
/* @__PURE__ */ jsx(ExpandIcon, {
|
|
6351
6360
|
record: n,
|
|
6352
6361
|
indent: t,
|
|
6353
|
-
hasChild:
|
|
6354
|
-
expanded:
|
|
6362
|
+
hasChild: Le(n),
|
|
6363
|
+
expanded: Re(n),
|
|
6355
6364
|
expandable: D,
|
|
6356
|
-
isExpandable:
|
|
6357
|
-
onExpand:
|
|
6365
|
+
isExpandable: Oe,
|
|
6366
|
+
onExpand: Ie
|
|
6358
6367
|
}),
|
|
6359
6368
|
y && /* @__PURE__ */ jsx(TableCell, {
|
|
6360
6369
|
className: "w-8",
|
|
@@ -6365,7 +6374,7 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6365
6374
|
})
|
|
6366
6375
|
}),
|
|
6367
6376
|
e.getVisibleCells().map((t) => {
|
|
6368
|
-
let n =
|
|
6377
|
+
let n = ye.find((e) => (e.key || String(e.dataIndex)) === t.column.id), a = getFixedStyle(t.column), o = n?.width || t.column.getSize(), s = t.column.getIsPinned();
|
|
6369
6378
|
return x && n?.editable && i ? /* @__PURE__ */ jsx(TableCell, {
|
|
6370
6379
|
className: cn("align-middle", n?.align && `text-${n.align}`),
|
|
6371
6380
|
style: {
|
|
@@ -6408,10 +6417,10 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6408
6417
|
...e.original,
|
|
6409
6418
|
[n.dataIndex]: t
|
|
6410
6419
|
};
|
|
6411
|
-
|
|
6420
|
+
xe.saveEditable(r, i), x?.onSave && x.onSave(r, i, e.original);
|
|
6412
6421
|
},
|
|
6413
|
-
onCancel: () =>
|
|
6414
|
-
onStartEdit: () =>
|
|
6422
|
+
onCancel: () => xe.cancelEditable(r),
|
|
6423
|
+
onStartEdit: () => xe.startEditable(r)
|
|
6415
6424
|
})
|
|
6416
6425
|
}), o = !!n?.ellipsis;
|
|
6417
6426
|
if (n?.tooltip && !i) {
|
|
@@ -6423,7 +6432,7 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6423
6432
|
let r = n?.dataIndex ? e.original[n.dataIndex] : t.getValue();
|
|
6424
6433
|
i = typeof r == "object" && r ? JSON.stringify(r, null, 2) : String(r ?? "");
|
|
6425
6434
|
} else i = t.getValue();
|
|
6426
|
-
return /* @__PURE__ */ jsxs(Tooltip, {
|
|
6435
|
+
return shouldShowTooltip(i) ? /* @__PURE__ */ jsxs(Tooltip, {
|
|
6427
6436
|
delayDuration: r.delayDuration,
|
|
6428
6437
|
children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
6429
6438
|
asChild: !0,
|
|
@@ -6433,7 +6442,7 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6433
6442
|
align: r.align,
|
|
6434
6443
|
children: i
|
|
6435
6444
|
})]
|
|
6436
|
-
});
|
|
6445
|
+
}) : a;
|
|
6437
6446
|
}
|
|
6438
6447
|
return a;
|
|
6439
6448
|
})()
|
|
@@ -6482,7 +6491,7 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6482
6491
|
let r = n?.dataIndex ? e.original[n.dataIndex] : t.getValue();
|
|
6483
6492
|
o = typeof r == "object" && r ? JSON.stringify(r, null, 2) : String(r ?? "");
|
|
6484
6493
|
} else o = t.getValue();
|
|
6485
|
-
return /* @__PURE__ */ jsxs(Tooltip, {
|
|
6494
|
+
return shouldShowTooltip(o) ? /* @__PURE__ */ jsxs(Tooltip, {
|
|
6486
6495
|
delayDuration: a.delayDuration,
|
|
6487
6496
|
children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
6488
6497
|
asChild: !0,
|
|
@@ -6492,7 +6501,7 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6492
6501
|
align: a.align,
|
|
6493
6502
|
children: o
|
|
6494
6503
|
})]
|
|
6495
|
-
});
|
|
6504
|
+
}) : r;
|
|
6496
6505
|
}
|
|
6497
6506
|
return r;
|
|
6498
6507
|
})()
|
|
@@ -6518,22 +6527,22 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6518
6527
|
editingKey: A.editingKey || ""
|
|
6519
6528
|
},
|
|
6520
6529
|
editable: x,
|
|
6521
|
-
onEdit: () =>
|
|
6530
|
+
onEdit: () => xe.startEditable(r),
|
|
6522
6531
|
onSave: () => {
|
|
6523
|
-
|
|
6532
|
+
xe.cancelEditable(r);
|
|
6524
6533
|
},
|
|
6525
|
-
onCancel: () =>
|
|
6534
|
+
onCancel: () => xe.cancelEditable(r),
|
|
6526
6535
|
onDelete: x.onDelete ? () => {
|
|
6527
6536
|
x.onDelete && x.onDelete(r, e.original);
|
|
6528
6537
|
} : void 0
|
|
6529
6538
|
})
|
|
6530
6539
|
})
|
|
6531
6540
|
] });
|
|
6532
|
-
},
|
|
6533
|
-
let n =
|
|
6541
|
+
}, ct = (e, t = 0) => {
|
|
6542
|
+
let n = Ae(e), r = Le(e), i = Re(e), a = e[ke], o = {
|
|
6534
6543
|
id: String(n),
|
|
6535
6544
|
original: e,
|
|
6536
|
-
index: A.data.findIndex((e) =>
|
|
6545
|
+
index: A.data.findIndex((e) => Ae(e) === n),
|
|
6537
6546
|
getIsSelected: () => {
|
|
6538
6547
|
try {
|
|
6539
6548
|
return k.getRow(String(n))?.getIsSelected() ?? !1;
|
|
@@ -6547,7 +6556,7 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6547
6556
|
t && t.toggleSelected(e);
|
|
6548
6557
|
} catch {}
|
|
6549
6558
|
},
|
|
6550
|
-
getVisibleCells: () =>
|
|
6559
|
+
getVisibleCells: () => ye.filter((e) => !e.hideInTable).map((t) => {
|
|
6551
6560
|
let n = t.key || String(t.dataIndex), r = t.dataPath || t.dataIndex, i = () => {
|
|
6552
6561
|
if (r) return getNestedValue(e, Array.isArray(r) || typeof r == "string" ? r : String(r));
|
|
6553
6562
|
}, a = null;
|
|
@@ -6591,25 +6600,25 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6591
6600
|
}, s = T?.(e, t) || {}, c = [];
|
|
6592
6601
|
return b ? c.push(/* @__PURE__ */ jsx(DraggableRow, {
|
|
6593
6602
|
row: o,
|
|
6594
|
-
children:
|
|
6603
|
+
children: st(o, t)
|
|
6595
6604
|
}, o.id)) : c.push(/* @__PURE__ */ jsx(TableRow, {
|
|
6596
6605
|
"data-state": o.getIsSelected && o.getIsSelected() ? "selected" : void 0,
|
|
6597
6606
|
...s,
|
|
6598
|
-
children:
|
|
6607
|
+
children: st(o, t)
|
|
6599
6608
|
}, o.id)), i && r && a && a.length > 0 && a.forEach((e) => {
|
|
6600
|
-
c.push(...
|
|
6609
|
+
c.push(...ct(e, t + 1));
|
|
6601
6610
|
}), c;
|
|
6602
|
-
},
|
|
6611
|
+
}, lt = (e, t) => {
|
|
6603
6612
|
let n = T?.(e.original, t) || {};
|
|
6604
6613
|
return b ? /* @__PURE__ */ jsx(DraggableRow, {
|
|
6605
6614
|
row: e,
|
|
6606
|
-
children:
|
|
6615
|
+
children: st(e, 0)
|
|
6607
6616
|
}, e.id) : /* @__PURE__ */ jsx(TableRow, {
|
|
6608
6617
|
"data-state": e.getIsSelected && e.getIsSelected() ? "selected" : void 0,
|
|
6609
6618
|
...n,
|
|
6610
|
-
children:
|
|
6619
|
+
children: st(e, 0)
|
|
6611
6620
|
}, e.id);
|
|
6612
|
-
},
|
|
6621
|
+
}, ut = /* @__PURE__ */ jsx("div", {
|
|
6613
6622
|
className: cn("relative", pe?.x && "overflow-x-auto", pe?.y && "overflow-y-auto", o?.container),
|
|
6614
6623
|
children: /* @__PURE__ */ jsx("div", {
|
|
6615
6624
|
className: cn("rounded-md", m && "border", o?.wrapper),
|
|
@@ -6619,12 +6628,12 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6619
6628
|
maxHeight: pe?.y ? `${pe.y}px` : void 0
|
|
6620
6629
|
},
|
|
6621
6630
|
children: /* @__PURE__ */ jsx(DndContext, {
|
|
6622
|
-
sensors:
|
|
6631
|
+
sensors: Ue,
|
|
6623
6632
|
collisionDetection: closestCenter,
|
|
6624
6633
|
modifiers: [restrictToVerticalAxis],
|
|
6625
|
-
onDragEnd:
|
|
6634
|
+
onDragEnd: We,
|
|
6626
6635
|
children: /* @__PURE__ */ jsxs(Table, {
|
|
6627
|
-
className: cn(
|
|
6636
|
+
className: cn(at[ze], me && "sticky-header", o?.table),
|
|
6628
6637
|
style: {
|
|
6629
6638
|
...u,
|
|
6630
6639
|
width: "100%",
|
|
@@ -6640,7 +6649,7 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6640
6649
|
zIndex: 10
|
|
6641
6650
|
} : void 0,
|
|
6642
6651
|
children: k.getHeaderGroups().map((e) => /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
6643
|
-
|
|
6652
|
+
Oe && D?.showExpandColumn !== !1 && /* @__PURE__ */ jsx(TableHead, {
|
|
6644
6653
|
className: "w-8",
|
|
6645
6654
|
style: { width: `${D?.expandColumnWidth || 50}px` }
|
|
6646
6655
|
}),
|
|
@@ -6654,7 +6663,7 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6654
6663
|
})
|
|
6655
6664
|
}),
|
|
6656
6665
|
e.headers.map((e, t) => {
|
|
6657
|
-
let n =
|
|
6666
|
+
let n = ye.find((t) => (t.key || String(t.dataIndex)) === e.column.id), r = getFixedStyle(e.column), i = n?.headerEllipsis ?? n?.ellipsis, a = n?.headerTooltip ?? n?.tooltip, o = n?.width || e.column.getSize(), s = e.column.getIsPinned();
|
|
6658
6667
|
return /* @__PURE__ */ jsx(TableHead, {
|
|
6659
6668
|
style: {
|
|
6660
6669
|
...r,
|
|
@@ -6691,7 +6700,7 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6691
6700
|
let e = typeof a == "object" ? a : {};
|
|
6692
6701
|
if (e.disabled) return o;
|
|
6693
6702
|
let i;
|
|
6694
|
-
return i = typeof a == "object" && e.content !== void 0 ? typeof e.content == "function" ? e.content(r, n || {}, t) : e.content : r, /* @__PURE__ */ jsxs(Tooltip, {
|
|
6703
|
+
return i = typeof a == "object" && e.content !== void 0 ? typeof e.content == "function" ? e.content(r, n || {}, t) : e.content : r, shouldShowTooltip(i) ? /* @__PURE__ */ jsxs(Tooltip, {
|
|
6695
6704
|
delayDuration: e.delayDuration,
|
|
6696
6705
|
children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
6697
6706
|
asChild: !0,
|
|
@@ -6701,7 +6710,7 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6701
6710
|
align: e.align,
|
|
6702
6711
|
children: i
|
|
6703
6712
|
})]
|
|
6704
|
-
});
|
|
6713
|
+
}) : o;
|
|
6705
6714
|
}
|
|
6706
6715
|
return o;
|
|
6707
6716
|
})(), /* @__PURE__ */ jsxs("div", {
|
|
@@ -6724,8 +6733,8 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6724
6733
|
filters: n.filters
|
|
6725
6734
|
},
|
|
6726
6735
|
value: Array.isArray(k.getColumn(n.key || String(n.dataIndex))?.getFilterValue()) ? k.getColumn(n.key || String(n.dataIndex))?.getFilterValue() : [],
|
|
6727
|
-
onChange: (e) =>
|
|
6728
|
-
onClear: () =>
|
|
6736
|
+
onChange: (e) => nt(n.key || String(n.dataIndex), e),
|
|
6737
|
+
onClear: () => it(n.key || String(n.dataIndex))
|
|
6729
6738
|
})]
|
|
6730
6739
|
})]
|
|
6731
6740
|
})
|
|
@@ -6735,42 +6744,42 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6735
6744
|
}), /* @__PURE__ */ jsx(TableBody, {
|
|
6736
6745
|
className: cn(o?.tableBody),
|
|
6737
6746
|
children: h ? /* @__PURE__ */ jsx(LoadingState, {
|
|
6738
|
-
columnCount:
|
|
6747
|
+
columnCount: ye.length,
|
|
6739
6748
|
draggable: !!b,
|
|
6740
6749
|
rowSelection: !!y,
|
|
6741
6750
|
rowCount: A.pageSize
|
|
6742
6751
|
}) : A.data.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
|
|
6743
|
-
colSpan:
|
|
6752
|
+
colSpan: ot,
|
|
6744
6753
|
emptyRender: ue
|
|
6745
6754
|
}) : b ? /* @__PURE__ */ jsx(SortableContext, {
|
|
6746
6755
|
items: k.getRowModel().rows.map((e) => e.id),
|
|
6747
6756
|
strategy: verticalListSortingStrategy,
|
|
6748
|
-
children: k.getRowModel().rows.map((e, t) =>
|
|
6749
|
-
}) :
|
|
6750
|
-
let t =
|
|
6751
|
-
return /* @__PURE__ */ jsx(Fragment, { children: t },
|
|
6752
|
-
}) }) : k.getRowModel().rows.map((e, t) =>
|
|
6757
|
+
children: k.getRowModel().rows.map((e, t) => lt(e, t))
|
|
6758
|
+
}) : Oe ? /* @__PURE__ */ jsx(Fragment$1, { children: A.data.map((e) => {
|
|
6759
|
+
let t = ct(e, 0);
|
|
6760
|
+
return /* @__PURE__ */ jsx(Fragment, { children: t }, Ae(e));
|
|
6761
|
+
}) }) : k.getRowModel().rows.map((e, t) => lt(e, t))
|
|
6753
6762
|
})]
|
|
6754
6763
|
})
|
|
6755
6764
|
})
|
|
6756
6765
|
})
|
|
6757
|
-
}),
|
|
6766
|
+
}), dt = ce ? ce(e, ut, {
|
|
6758
6767
|
toolbar: g !== !1,
|
|
6759
6768
|
search: E !== !1,
|
|
6760
6769
|
table: !0
|
|
6761
|
-
}) :
|
|
6770
|
+
}) : ut, ft = cn("flex flex-col gap-4 transition-all duration-300 ease-in-out", Ve ? "fixed inset-0 z-50 bg-background p-4 transform scale-100" : "transform scale-100", i), pt = /* @__PURE__ */ jsx(LocaleProvider, {
|
|
6762
6771
|
locale: ge,
|
|
6763
6772
|
children: /* @__PURE__ */ jsxs("div", {
|
|
6764
|
-
className:
|
|
6773
|
+
className: ft,
|
|
6765
6774
|
style: l,
|
|
6766
6775
|
children: [
|
|
6767
6776
|
E !== !1 && (() => {
|
|
6768
|
-
let e = extractSearchColumns(
|
|
6777
|
+
let e = extractSearchColumns(ye);
|
|
6769
6778
|
return e.length > 0 || typeof E == "object" && E ? /* @__PURE__ */ jsx(Search, {
|
|
6770
6779
|
...typeof E == "object" ? E : {},
|
|
6771
6780
|
columns: e,
|
|
6772
|
-
onSearch:
|
|
6773
|
-
onReset:
|
|
6781
|
+
onSearch: Ke,
|
|
6782
|
+
onReset: et,
|
|
6774
6783
|
loading: A.loading
|
|
6775
6784
|
}) : null;
|
|
6776
6785
|
})(),
|
|
@@ -6779,27 +6788,27 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6779
6788
|
title: S,
|
|
6780
6789
|
subTitle: C,
|
|
6781
6790
|
table: k,
|
|
6782
|
-
columns:
|
|
6791
|
+
columns: ye,
|
|
6783
6792
|
loading: A.loading,
|
|
6784
|
-
onReload: () =>
|
|
6785
|
-
fullScreen:
|
|
6786
|
-
onFullScreenChange:
|
|
6787
|
-
density:
|
|
6788
|
-
onDensityChange:
|
|
6789
|
-
visibleColumns:
|
|
6790
|
-
onVisibleColumnsChange:
|
|
6791
|
-
columnSettings:
|
|
6792
|
-
onColumnSettingsChange:
|
|
6793
|
+
onReload: () => xe.reload(),
|
|
6794
|
+
fullScreen: Ve,
|
|
6795
|
+
onFullScreenChange: He,
|
|
6796
|
+
density: ze,
|
|
6797
|
+
onDensityChange: Be,
|
|
6798
|
+
visibleColumns: we,
|
|
6799
|
+
onVisibleColumnsChange: Te,
|
|
6800
|
+
columnSettings: Ee,
|
|
6801
|
+
onColumnSettingsChange: j
|
|
6793
6802
|
}),
|
|
6794
6803
|
y && /* @__PURE__ */ jsx(BatchActions, {
|
|
6795
6804
|
selectedCount: k.getFilteredSelectedRowModel().rows.length,
|
|
6796
6805
|
selectedRows: k.getFilteredSelectedRowModel().rows.map((e) => e.original),
|
|
6797
|
-
onClear:
|
|
6806
|
+
onClear: Ge,
|
|
6798
6807
|
alwaysShow: y.alwaysShowAlert,
|
|
6799
6808
|
batchActions: y.batchActions
|
|
6800
6809
|
}),
|
|
6801
6810
|
le?.(e, A.data),
|
|
6802
|
-
|
|
6811
|
+
dt,
|
|
6803
6812
|
ne && /* @__PURE__ */ jsx("div", {
|
|
6804
6813
|
className: "px-4",
|
|
6805
6814
|
children: ne(A.data)
|
|
@@ -6810,7 +6819,7 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6810
6819
|
current: A.current,
|
|
6811
6820
|
pageSize: A.pageSize,
|
|
6812
6821
|
total: A.total,
|
|
6813
|
-
onPaginationChange:
|
|
6822
|
+
onPaginationChange: Se.handlePaginationChange
|
|
6814
6823
|
});
|
|
6815
6824
|
return v ? v({
|
|
6816
6825
|
pagination: {
|
|
@@ -6820,7 +6829,7 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6820
6829
|
total: A.total
|
|
6821
6830
|
},
|
|
6822
6831
|
onChange: (t, n) => {
|
|
6823
|
-
e.onChange?.(t, n),
|
|
6832
|
+
e.onChange?.(t, n), Se.handlePaginationChange(t, n);
|
|
6824
6833
|
},
|
|
6825
6834
|
defaultDom: t
|
|
6826
6835
|
}) : t;
|
|
@@ -6831,8 +6840,8 @@ const ProTable = forwardRef((e, t) => {
|
|
|
6831
6840
|
return re ? /* @__PURE__ */ jsx(Card, {
|
|
6832
6841
|
...ie,
|
|
6833
6842
|
className: cn(ie?.className),
|
|
6834
|
-
children: /* @__PURE__ */ jsx(CardContent, { children:
|
|
6835
|
-
}) :
|
|
6843
|
+
children: /* @__PURE__ */ jsx(CardContent, { children: pt })
|
|
6844
|
+
}) : pt;
|
|
6836
6845
|
});
|
|
6837
6846
|
var cache = /* @__PURE__ */ new Map();
|
|
6838
6847
|
function useRequest(e, t = {}) {
|