bitz-react-admin-ui 2.2.7 → 2.2.9

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.
Files changed (48) hide show
  1. package/dist/_virtual/Draggable.mjs +4 -0
  2. package/dist/_virtual/DraggableCore.mjs +4 -0
  3. package/dist/_virtual/Resizable.mjs +4 -0
  4. package/dist/_virtual/ResizableBox.mjs +4 -0
  5. package/dist/_virtual/_commonjsHelpers.mjs +26 -4
  6. package/dist/_virtual/cjs.mjs +4 -0
  7. package/dist/_virtual/clsx.m.mjs +6 -0
  8. package/dist/_virtual/domFns.mjs +4 -0
  9. package/dist/_virtual/getPrefix.mjs +4 -0
  10. package/dist/_virtual/index.mjs +2 -2
  11. package/dist/_virtual/index2.mjs +2 -2
  12. package/dist/_virtual/index6.mjs +4 -0
  13. package/dist/_virtual/log.mjs +4 -0
  14. package/dist/_virtual/positionFns.mjs +4 -0
  15. package/dist/_virtual/propTypes.mjs +4 -0
  16. package/dist/_virtual/shims.mjs +4 -0
  17. package/dist/_virtual/utils.mjs +4 -0
  18. package/dist/components/BitzTable/ActionBar/ActionBar.d.ts +21 -9
  19. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +84 -51
  20. package/dist/components/BitzTable/ActionCol/index.d.ts +1 -1
  21. package/dist/components/BitzTable/ActionCol/index.mjs +66 -58
  22. package/dist/components/BitzTable/Store/utils/index.d.ts +1 -1
  23. package/dist/components/BitzTable/Store/utils/index.mjs +21 -21
  24. package/dist/components/BitzTable/SubTable/index.mjs +7 -1
  25. package/dist/components/BitzTable/Table/ResizableTitle.d.ts +8 -0
  26. package/dist/components/BitzTable/Table/ResizableTitle.mjs +32 -0
  27. package/dist/components/BitzTable/Table/index.d.ts +1 -1
  28. package/dist/components/BitzTable/Table/index.mjs +319 -299
  29. package/dist/components/BitzTable/ToolBar/Modal/style.mjs +4 -0
  30. package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
  31. package/dist/node_modules/.store/clsx@1.2.1/node_modules/clsx/dist/clsx.m.mjs +22 -0
  32. package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +9 -8
  33. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/Draggable.mjs +343 -0
  34. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/DraggableCore.mjs +324 -0
  35. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/cjs.mjs +14 -0
  36. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/domFns.mjs +174 -0
  37. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/getPrefix.mjs +35 -0
  38. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/log.mjs +7 -0
  39. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/positionFns.mjs +107 -0
  40. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/shims.mjs +30 -0
  41. package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/Resizable.mjs +201 -0
  42. package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/ResizableBox.mjs +162 -0
  43. package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/propTypes.mjs +118 -0
  44. package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/utils.mjs +54 -0
  45. package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/index.mjs +13 -0
  46. package/dist/node_modules/.store/use-sync-external-store@1.2.0/node_modules/use-sync-external-store/shim/index.mjs +1 -1
  47. package/dist/style.css +1 -1
  48. package/package.json +1 -1
@@ -1,192 +1,219 @@
1
- import { j as o } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { useContext as ze, useRef as P, useState as O, useEffect as ut, useMemo as l, useCallback as te } from "react";
3
- import { isMobile as q } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
4
- import { Skeleton as ft, Typography as Te, Table as mt } from "antd";
5
- import re from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
6
- import bt from "../../BitzDrawer/index.mjs";
7
- import yt from "../../BitzPagination/index.mjs";
8
- import xt from "../../BitzNoData/index.mjs";
1
+ import { j as s } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { useContext as Se, useRef as q, useState as S, useEffect as Me, useMemo as l, useCallback as oe } from "react";
3
+ import { isMobile as D } from "../../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
4
+ import { Skeleton as wt, Typography as Le, Table as zt } from "antd";
5
+ import F from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
6
+ import Bt from "../../BitzDrawer/index.mjs";
7
+ import jt from "../../BitzPagination/index.mjs";
8
+ import Wt from "../../BitzNoData/index.mjs";
9
9
  import "../../BitzList/index.less.mjs";
10
- import Ct from "../../BitzList/List.mjs";
10
+ import Tt from "../../BitzList/List.mjs";
11
11
  import "../../BitzPullRefresh/style/index.less.mjs";
12
- import gt from "../../BitzPullRefresh/PullRefresh.mjs";
13
- import wt, { BitzTableContext as Bt, toolCols as jt } from "../Store/index.mjs";
14
- import { loopFilter as zt, columnSort as Tt } from "../Store/utils/index.mjs";
15
- import oe from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
16
- import Nt from "../ActionCol/style.mjs";
17
- import kt from "../../BitzTheme/index.mjs";
18
- import Ne from "../../BitzHighlight/index.mjs";
19
- import pt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/table/ExpandIcon.mjs";
12
+ import pt from "../../BitzPullRefresh/PullRefresh.mjs";
13
+ import Nt, { BitzTableContext as kt, toolCols as St } from "../Store/index.mjs";
14
+ import { loopFilter as Mt, columnSort as Lt } from "../Store/utils/index.mjs";
15
+ import se from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
16
+ import vt from "../ActionCol/style.mjs";
17
+ import Ht from "../../BitzTheme/index.mjs";
18
+ import ve from "../../BitzHighlight/index.mjs";
19
+ import Rt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/table/ExpandIcon.mjs";
20
20
  import "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/index.mjs";
21
- import St from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/locale/en_US.mjs";
22
- import { getColumnsWithTool as Wt, loopBuildSkeleton as Mt } from "./utils.mjs";
23
- import { getCssVar as Lt } from "./style.mjs";
24
- import vt from "./SortableRow.mjs";
25
- import Pt from "./SortTableContext.mjs";
21
+ import Pt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/locale/en_US.mjs";
22
+ import { getColumnsWithTool as $t, loopBuildSkeleton as Ot } from "./utils.mjs";
23
+ import { getCssVar as Vt } from "./style.mjs";
24
+ import Kt from "./SortableRow.mjs";
25
+ import qt from "./SortTableContext.mjs";
26
+ import Dt from "./ResizableTitle.mjs";
26
27
  import "./index.less.mjs";
27
- import { ConfigContext as Ht } from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/context.mjs";
28
- import $t from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
29
- function Rt({
30
- showPagination: W = !0,
31
- height: M,
32
- dataSource: b,
33
- total: B = 0,
34
- columns: T,
28
+ import { ConfigContext as Ft } from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/context.mjs";
29
+ import _t from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/at.mjs";
30
+ function Gt({
31
+ showPagination: H = !0,
32
+ height: R,
33
+ dataSource: m,
34
+ total: j = 0,
35
+ columns: P,
35
36
  loading: i,
36
- skeletonNum: F = {
37
+ skeletonNum: _ = {
37
38
  pc: 10,
38
39
  mobile: 10
39
40
  },
40
- skeletonRender: se,
41
- skeletonRowNum: ke = 4,
42
- skeletonRowsWidth: pe = ["35%", "100%", "100%", "60%"],
41
+ skeletonRender: ne,
42
+ skeletonRowNum: He = 4,
43
+ skeletonRowsWidth: Re = ["35%", "100%", "100%", "60%"],
43
44
  // mobileLoadEmit,
44
- mobileRefreshEmit: ne,
45
- operationFilter: D,
46
- enableControlPage: Se,
47
- pagination: x,
48
- paginationEmit: H = () => {
45
+ mobileRefreshEmit: ie,
46
+ operationFilter: G,
47
+ enableControlPage: Pe,
48
+ pagination: C,
49
+ paginationEmit: O = () => {
49
50
  },
50
- enabledRowDragSort: N,
51
- onRowDragEnd: G,
52
- mobilePageHeight: Vt = 500,
53
- mobileCancelText: We = "取消",
54
- noDataTitle: Me,
55
- noDataImg: Le,
56
- color: Kt,
57
- size: ie,
58
- showTableTool: ve = !0,
59
- tableAction: Pe,
60
- tableToolbar: He,
61
- selectionBar: $e,
51
+ enabledRowDragSort: M,
52
+ onRowDragEnd: E,
53
+ mobilePageHeight: Et = 500,
54
+ mobileCancelText: $e = "取消",
55
+ noDataTitle: Oe,
56
+ noDataImg: Ve,
57
+ color: Jt,
58
+ size: le,
59
+ showTableTool: Ke = !0,
60
+ tableAction: qe,
61
+ tableToolbar: De,
62
+ selectionBar: Fe,
62
63
  scroll: a,
63
- components: j,
64
- expandable: C,
65
- rowSelection: k,
66
- selelctionAlert: h,
67
- resetPage: Re,
68
- ...d
64
+ components: W,
65
+ expandable: y,
66
+ rowSelection: p,
67
+ selectionAlert: u,
68
+ resetPage: _e,
69
+ ...f
69
70
  }) {
70
- var je;
71
- const { token: g } = kt.useToken(), { Table: c } = g, { tableSpaceBetweenPage: le = 10 } = c, { gap: Ve } = Nt(), { showColumnBorder: Ke, hideRowBorder: ce, rowHoverable: Oe, ...u } = ze(Bt), $ = P(void 0), _ = P(0), [I, qe] = O(0), [Fe, J] = O(!1), [y, De] = O([]);
72
- ut(() => {
73
- let e = [...b ?? []];
74
- (x == null ? void 0 : x.page) !== 1 && (e = [...y, ...e]), De(e);
75
- }, [b]);
76
- const Ge = l(() => !!(y != null && y.length) && (y == null ? void 0 : y.length) >= B, [y, B]), [_e, Ie] = O([]), Je = (e, t) => {
77
- var s;
78
- const r = (s = D == null ? void 0 : D(e, t)) == null ? void 0 : s.filter(
71
+ var Ne;
72
+ const { token: x } = Ht.useToken(), { Table: c } = x, { tableSpaceBetweenPage: ae = 10 } = c, { gap: Ge } = vt(), { showColumnBorder: Ee, hideRowBorder: ce, rowHoverable: Je, ...d } = Se(kt), w = q(void 0), [J, Qe] = S(0), [Q, Ue] = S(0), [U, Xe] = S(0), [Ye, X] = S(!1), [b, Ze] = S([]);
73
+ Me(() => {
74
+ let e = [...m ?? []];
75
+ (C == null ? void 0 : C.page) !== 1 && (e = [...b, ...e]), Ze(e);
76
+ }, [m]);
77
+ const Ie = l(() => !!(b != null && b.length) && (b == null ? void 0 : b.length) >= j, [b, j]), [Ae, et] = S([]), tt = (e, t) => {
78
+ var o;
79
+ const r = (o = G == null ? void 0 : G(e, t)) == null ? void 0 : o.filter(
79
80
  (n) => n.type !== "divider"
80
81
  );
81
- r != null && r.length && (Ie(r), J(!0));
82
- }, ae = () => {
83
- J(!1);
84
- }, Qe = (e) => {
82
+ r != null && r.length && (et(r), X(!0));
83
+ }, he = () => {
84
+ X(!1);
85
+ }, rt = (e) => {
85
86
  var t;
86
- J(!1), (t = e.onClick) == null || t.call(e);
87
- }, w = P(null), Q = oe(w), he = P(null), U = oe(he), X = P(null), S = oe(X), Ue = () => {
87
+ X(!1), (t = e.onClick) == null || t.call(e);
88
+ }, z = q(null), Y = se(z), de = q(null), Z = se(de), I = q(null), L = se(I), ot = () => {
88
89
  var r;
89
- const e = (r = w.current) == null ? void 0 : r.querySelectorAll(
90
+ const e = (r = z.current) == null ? void 0 : r.querySelectorAll(
90
91
  "& > .bitzTableContainerBody > .ant-table-wrapper.bitzTable > .ant-spin-nested-loading > .ant-spin-container > .ant-table > .ant-table-container > .ant-table-body > table > .ant-table-tbody > tr:not(.ant-table-measure-row, .ant-table-expanded-row)"
91
92
  ), t = [];
92
- if (e == null || e.forEach((s) => {
93
+ if (e == null || e.forEach((o) => {
93
94
  var n;
94
95
  t.push(
95
- ((n = s.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : n.clientWidth) || 0
96
+ ((n = o.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : n.clientWidth) || 0
96
97
  );
97
98
  }), t.length)
98
- return Math.ceil(Math.max(...t)) + Ve * 2;
99
- }, de = () => {
100
- var m, f, v;
101
- const e = (m = w.current) == null ? void 0 : m.querySelector(
99
+ return Math.ceil(Math.max(...t)) + Ge * 2;
100
+ }, ue = () => {
101
+ var h, g, K;
102
+ const e = (h = z.current) == null ? void 0 : h.querySelector(
102
103
  ".ant-table-body"
103
- ), t = e == null ? void 0 : e.clientWidth, s = ((e == null ? void 0 : e.offsetWidth) || 0) - t > 0, n = (v = (f = w.current) == null ? void 0 : f.querySelector(
104
+ ), t = e == null ? void 0 : e.clientWidth, o = ((e == null ? void 0 : e.offsetWidth) || 0) - t > 0, n = (K = (g = z.current) == null ? void 0 : g.querySelector(
104
105
  ".ant-table-cell-scrollbar"
105
- )) == null ? void 0 : v.offsetWidth;
106
- return { tbodyWidth: t, hasScrollBar: s, scrollbarSize: n };
107
- }, { y: Y, tbodyWidth: Z, hasScrollBar: R, scrollbarSize: L } = l(() => {
108
- const { tbodyWidth: e, hasScrollBar: t, scrollbarSize: r } = de();
109
- if (typeof M > "u")
106
+ )) == null ? void 0 : K.offsetWidth;
107
+ return { tbodyWidth: t, hasScrollBar: o, scrollbarSize: n };
108
+ }, { y: A, tbodyWidth: v, hasScrollBar: V, scrollbarSize: $ } = l(() => {
109
+ const { tbodyWidth: e, hasScrollBar: t, scrollbarSize: r } = ue();
110
+ if (typeof R > "u")
110
111
  return {
111
112
  tbodyWidth: e,
112
113
  hasScrollBar: t,
113
114
  scrollbarSize: r
114
115
  };
115
- let s = 40, n = 40;
116
- if (w.current) {
117
- const K = window.getComputedStyle(w.current);
118
- s = parseInt(K.getPropertyValue("--cell-height")), n = parseInt(K.getPropertyValue("--toolbar-height"));
116
+ let o = 40, n = 40;
117
+ if (z.current) {
118
+ const T = window.getComputedStyle(z.current);
119
+ o = parseInt(T.getPropertyValue("--cell-height")), n = parseInt(T.getPropertyValue("--toolbar-height"));
119
120
  }
120
- const m = (S == null ? void 0 : S.height) || 0, f = m ? le : 0;
121
- return { y: (u.fullscreen ? window.innerHeight : M) - m - f - n - s, tbodyWidth: e, hasScrollBar: t, scrollbarSize: r };
121
+ const h = (L == null ? void 0 : L.height) || 0, g = h ? ae : 0;
122
+ return { y: (d.fullscreen ? window.innerHeight : R) - h - g - n - o, tbodyWidth: e, hasScrollBar: t, scrollbarSize: r };
122
123
  }, [
123
- u.fullscreen,
124
- M,
125
- S == null ? void 0 : S.height,
126
- Q == null ? void 0 : Q.height,
127
- U == null ? void 0 : U.height
128
- ]), Xe = l(() => {
124
+ d.fullscreen,
125
+ R,
126
+ L == null ? void 0 : L.height,
127
+ Y == null ? void 0 : Y.height,
128
+ Z == null ? void 0 : Z.height
129
+ ]), ee = l(() => {
129
130
  let e = (a == null ? void 0 : a.x) ?? 1e3;
130
- return _.current && (e -= _.current), I && $.current && (e -= I * $.current), Z && (e = Math.max(e, Z)), a != null && a.x ? { x: e, y: a.y || Y } : a != null && a.y ? { x: e, y: a.y } : { x: e, y: Y };
131
- }, [a, Y, Z, I]), Ye = (e) => {
132
- const t = e.length, r = e.filter((z) => z.width), n = r.map((z) => z.width).reduce((z, ee) => z + ee, 0);
133
- let m = 0;
134
- if (w.current) {
135
- const z = window.getComputedStyle(w.current), ee = parseInt(
136
- z.getPropertyValue("--toolCell-paddingInline")
131
+ return J && (e -= J), Q && w.current && (e -= Q * w.current), v && (a != null && a.x && e < v && (a == null ? void 0 : a.x) > v && Xe(v - e), e = Math.max(e, v)), a != null && a.x ? { x: e, y: a.y || A } : a != null && a.y ? { x: e, y: a.y } : { x: e, y: A };
132
+ }, [a, A, v, J, Q]), fe = () => {
133
+ let e = 0;
134
+ if (z.current) {
135
+ const r = window.getComputedStyle(z.current), o = parseInt(
136
+ r.getPropertyValue("--toolCell-paddingInline")
137
137
  );
138
- m = parseInt(z.getPropertyValue("--fontSize")) + 4 + 2 * ee;
138
+ e = parseInt(r.getPropertyValue("--fontSize")) + 4 + 2 * o;
139
139
  }
140
- let f = 0;
141
- k && (f += m), C && (f += m), N && (f += m);
142
- const { tbodyWidth: v } = de(), A = Math.max((a == null ? void 0 : a.x) ?? 0, v ?? 0) - n - f, K = t - r.length;
143
- return A >= 0 ? A / K : void 0;
144
- }, V = l(() => {
145
- const t = (T ?? []).filter((f) => !jt.includes(f)), { filterColumns: r, width: s, autoWidthColLength: n } = zt(
140
+ let t = 0;
141
+ return p && (t += e), y && (t += e), M && (t += e), t;
142
+ }, st = (e, t) => {
143
+ const r = e.length, o = e.filter((T) => T.width), h = o.map((T) => T.width).reduce((T, gt) => T + gt, 0), { tbodyWidth: g } = ue(), re = Math.max((a == null ? void 0 : a.x) ?? 0, g ?? 0) - h - t, ke = r - o.length;
144
+ return re >= 0 ? Math.floor(re / ke) : void 0;
145
+ }, me = l(() => {
146
+ var e;
147
+ return ((e = (P ?? []).find((t) => t.isOperationCol)) == null ? void 0 : e.width) ?? 0;
148
+ }, [P]), B = l(() => {
149
+ const t = (P ?? []).filter((g) => !St.includes(g)), { filterColumns: r, hiddenTotalWidth: o, autoWidthColLength: n } = Mt(
146
150
  t,
147
- u.columnsMap
148
- ), m = r.sort(Tt(u.columnsMap));
149
- if (!q) {
150
- const f = Ye(t);
151
- $.current = Math.ceil(f ?? 0), _.current = Math.ceil(s), qe(n);
151
+ d.columnsMap
152
+ ), h = r.sort(Lt(d.columnsMap));
153
+ if (!D) {
154
+ const g = fe();
155
+ w.current = st(t, g), Qe(o), Ue(n);
152
156
  }
153
- return m;
154
- }, [u.columnsMap]), p = l(() => {
155
- if (q)
156
- return V;
157
- const e = V.findIndex((s) => s == null ? void 0 : s.isOperationCol), t = V.slice();
158
- if (e >= 0) {
159
- const s = (T ?? []).findIndex((n) => n == null ? void 0 : n.isOperationCol);
160
- t.splice(e, 1, T == null ? void 0 : T[s]);
157
+ return h;
158
+ }, [d.columnsMap, me]), be = l(() => fe(), [d.columnsMap, me]), [N, Ce] = S([]);
159
+ Me(() => {
160
+ let e = 0;
161
+ if (U) {
162
+ const o = B == null ? void 0 : B.filter(
163
+ (n) => !n.width && !(n != null && n.isOperationCol)
164
+ ).length;
165
+ e = Math.floor(U / o);
161
166
  }
162
- const r = t.map((s) => ({
163
- ...s,
164
- ...s != null && s.width ? {
165
- width: s != null && s.useMaxWidth ? Ue() ?? s.width : s.width
166
- } : {
167
- // 给未设置width的列设置平均数
168
- width: $
169
- }
170
- }));
171
- return Wt(
172
- T,
173
- r,
174
- N,
175
- !!k,
176
- !!C
167
+ let t = 0;
168
+ const r = B.map((o, n) => {
169
+ let h = o.width;
170
+ return o != null && o.useMaxWidth && (o != null && o.isOperationCol) && (h = ot() ?? o.width), h || (h = ((w == null ? void 0 : w.current) || 0) + e), t += h, h;
171
+ });
172
+ if (t < ee.x - be) {
173
+ const o = ee.x - be - t;
174
+ r[0] = r[0] + o;
175
+ }
176
+ Ce(r);
177
+ }, [B, U]);
178
+ const k = l(() => {
179
+ if (D)
180
+ return B;
181
+ const e = B.map((t, r) => {
182
+ var o;
183
+ return {
184
+ ...t,
185
+ ...((o = B[r + 1]) == null ? void 0 : o.isOperationCol) && {
186
+ className: F(t.className, "disabledResize")
187
+ },
188
+ width: N.length ? N[r] : (w == null ? void 0 : w.current) ?? void 0,
189
+ onHeaderCell: (n) => ({
190
+ width: n.width,
191
+ onResize: nt(r)
192
+ })
193
+ };
194
+ });
195
+ return $t(
196
+ P,
197
+ e,
198
+ M,
199
+ !!p,
200
+ !!y
177
201
  );
178
- }, [T, V, N]), ue = l(() => Mt(p), [p]), Ze = l(() => i ? ue : p, [i, p, ue]), fe = l(() => {
179
- const e = (b ?? []).length, t = e > (F.pc ?? 10) ? e >= 20 ? 20 : e : F.pc ?? 10;
180
- return Array.from({ length: t }).map((s, n) => ({
202
+ }, [P, B, N]), nt = (e) => (t, { size: r }) => {
203
+ const o = [...N], n = e + 1, h = r.width - N[e];
204
+ o[e] = N[e] + h, o[n] = N[n] - h, o[e] > 48 && o[n] > 48 && Ce(o);
205
+ }, ye = l(() => Ot(k), [k]), it = l(() => i ? ye : k, [i, k, ye]), xe = l(() => {
206
+ const e = (m ?? []).length, t = e > (_.pc ?? 10) ? e >= 20 ? 20 : e : _.pc ?? 10;
207
+ return Array.from({ length: t }).map((o, n) => ({
181
208
  key: `${Date.now()}${n}`
182
209
  }));
183
- }, [b]), me = l(() => i ? fe : b ?? [], [i, b, fe]), { table: E, locale: Ee = St } = ze(Ht), Ae = { ...Ee.Table }, et = ((je = E == null ? void 0 : E.expandable) == null ? void 0 : je.expandIcon) || (C == null ? void 0 : C.expandIcon) || pt(Ae), be = l(() => {
184
- if (C)
210
+ }, [m]), ge = l(() => i ? xe : m ?? [], [i, m, xe]), { table: te, locale: lt = Pt } = Se(Ft), at = { ...lt.Table }, ct = ((Ne = te == null ? void 0 : te.expandable) == null ? void 0 : Ne.expandIcon) || (y == null ? void 0 : y.expandIcon) || Rt(at), we = l(() => {
211
+ if (y)
185
212
  return {
186
- ...C,
187
- expandedRowRender: () => /* @__PURE__ */ o.jsx(o.Fragment, {}),
213
+ ...y,
214
+ expandedRowRender: () => /* @__PURE__ */ s.jsx(s.Fragment, {}),
188
215
  expandIcon: (e) => {
189
- const t = et(e);
216
+ const t = ct(e);
190
217
  return {
191
218
  ...t,
192
219
  props: {
@@ -194,123 +221,123 @@ function Rt({
194
221
  disabled: !0,
195
222
  style: {
196
223
  ...t.props.style,
197
- backgroundColor: g.colorBgContainerDisabled
224
+ backgroundColor: x.colorBgContainerDisabled
198
225
  }
199
226
  }
200
227
  };
201
228
  }
202
229
  };
203
- }, [C]), tt = l(() => i ? be : C, [i, C, be]), ye = l(() => {
204
- if (k)
230
+ }, [y]), ht = l(() => i ? we : y, [i, y, we]), ze = l(() => {
231
+ if (p)
205
232
  return {
206
- ...k,
233
+ ...p,
207
234
  selectedRowKeys: [],
208
235
  getCheckboxProps: () => ({ disabled: !0 })
209
236
  };
210
- }, [k]), rt = l(() => i ? ye : k, [i, k, ye]), xe = l(() => i ? "key" : d.rowKey, [i, d.rowKey]), Ce = l(() => `${ie ?? u.stylesConfig.size}BitzTable`, [ie, u.stylesConfig.size]), ot = te(
237
+ }, [p]), dt = l(() => i ? ze : p, [i, p, ze]), Be = l(() => i ? "key" : f.rowKey, [i, f.rowKey]), je = l(() => `${le ?? d.stylesConfig.size}BitzTable`, [le, d.stylesConfig.size]), ut = oe(
211
238
  (e, t) => {
212
- var s;
213
- if (!d.onRow || i)
239
+ var o;
240
+ if (!f.onRow || i)
214
241
  return {};
215
- const r = (s = d.onRow) == null ? void 0 : s.call(d, e, t);
242
+ const r = (o = f.onRow) == null ? void 0 : o.call(f, e, t);
216
243
  return r.onClick && (r.className = "rowPointerCursor"), r;
217
244
  },
218
- [d.onRow, i]
219
- ), st = l(() => re(
245
+ [f.onRow, i]
246
+ ), ft = l(() => F(
220
247
  "bitzTableContainer",
221
248
  { hideBorder: ce },
222
- { hasScrollBar: R },
223
- Ce,
224
- d.className
249
+ { hasScrollBar: V },
250
+ je,
251
+ f.className
225
252
  ), [
226
- d.className,
227
- Ce,
228
- R,
229
- u.fullscreen,
253
+ f.className,
254
+ je,
255
+ V,
256
+ d.fullscreen,
230
257
  ce
231
- ]), nt = l(() => ({
232
- "--container-bgColor": g.colorBgContainer
233
- }), [g.colorBgContainer]), it = l(() => {
234
- const e = u.fullscreen ? "100%" : M;
258
+ ]), mt = l(() => ({
259
+ "--container-bgColor": x.colorBgContainer
260
+ }), [x.colorBgContainer]), bt = l(() => {
261
+ const e = d.fullscreen ? "100%" : R;
235
262
  let t;
236
- return (L ?? 0) > 0 && (t = L), Lt({
263
+ return ($ ?? 0) > 0 && (t = $), Vt({
237
264
  height: e,
238
- fontFamily: g.fontFamily,
239
- evenRowBgColor: u.zebra ? c == null ? void 0 : c.evenRowBgColor : g.colorBgContainer,
240
- colorBgContainer: g.colorBgContainer,
265
+ fontFamily: x.fontFamily,
266
+ evenRowBgColor: d.zebra ? c == null ? void 0 : c.evenRowBgColor : x.colorBgContainer,
267
+ colorBgContainer: x.colorBgContainer,
241
268
  table: c,
242
- gap: le,
243
- borderColor: (c == null ? void 0 : c.borderColor) || g.colorBorderSecondary,
269
+ gap: ae,
270
+ borderColor: (c == null ? void 0 : c.borderColor) || x.colorBorderSecondary,
244
271
  scrollbarWidth: t,
245
- other: d.style
272
+ other: f.style
246
273
  });
247
274
  }, [
248
- d.style,
249
- u.fullscreen,
250
- M,
275
+ f.style,
276
+ d.fullscreen,
277
+ R,
251
278
  c,
252
- u == null ? void 0 : u.zebra,
253
- L
254
- ]), lt = te(
279
+ d == null ? void 0 : d.zebra,
280
+ $
281
+ ]), Ct = oe(
255
282
  (e, t, r) => {
256
- const s = t % 2 === 0 ? "oddRow" : "evenRow";
257
- if (d.rowClassName) {
258
- const n = d.rowClassName(e, t, r);
259
- return re(s, n);
283
+ const o = t % 2 === 0 ? "oddRow" : "evenRow";
284
+ if (f.rowClassName) {
285
+ const n = f.rowClassName(e, t, r);
286
+ return F(o, n);
260
287
  }
261
- return s;
288
+ return o;
262
289
  },
263
- [d.rowClassName]
264
- ), ge = /* @__PURE__ */ o.jsx(
265
- Ct,
290
+ [f.rowClassName]
291
+ ), We = /* @__PURE__ */ s.jsx(
292
+ Tt,
266
293
  {
267
- finished: Ge,
294
+ finished: Ie,
268
295
  onLoad: async () => (
269
296
  // @ts-ignore
270
- !i && (H == null ? void 0 : H((x == null ? void 0 : x.page) + 1, x == null ? void 0 : x.size))
297
+ !i && (O == null ? void 0 : O((C == null ? void 0 : C.page) + 1, C == null ? void 0 : C.size))
271
298
  ),
272
299
  loadingText: "加载中...",
273
300
  finishedText: "没有更多了",
274
301
  errorText: "加载失败",
275
- children: /* @__PURE__ */ o.jsxs(
302
+ children: /* @__PURE__ */ s.jsxs(
276
303
  "div",
277
304
  {
278
305
  className: "mobileList",
279
306
  style: { backgroundColor: c == null ? void 0 : c.mobileListBgColor },
280
307
  children: [
281
- y == null ? void 0 : y.map((e, t) => /* @__PURE__ */ o.jsx(
308
+ b == null ? void 0 : b.map((e, t) => /* @__PURE__ */ s.jsx(
282
309
  "div",
283
310
  {
284
311
  className: "listItem",
285
312
  style: { backgroundColor: c == null ? void 0 : c.listItemBgColor },
286
- onClick: () => Je(e, t),
287
- children: p == null ? void 0 : p.map((r, s) => {
313
+ onClick: () => tt(e, t),
314
+ children: k == null ? void 0 : k.map((r, o) => {
288
315
  var n;
289
- return !(r != null && r.mobileHide) && /* @__PURE__ */ o.jsxs(
316
+ return !(r != null && r.mobileHide) && /* @__PURE__ */ s.jsxs(
290
317
  "div",
291
318
  {
292
319
  className: "row",
293
- style: { color: g.colorText },
320
+ style: { color: x.colorText },
294
321
  children: [
295
- !r.mobileHideLabel && /* @__PURE__ */ o.jsxs("div", { className: "label", children: [
322
+ !r.mobileHideLabel && /* @__PURE__ */ s.jsxs("div", { className: "label", children: [
296
323
  `${r.title}`,
297
324
  ":"
298
325
  ] }),
299
- /* @__PURE__ */ o.jsx("div", { className: "value", children: ((n = r == null ? void 0 : r.render) == null ? void 0 : n.call(
326
+ /* @__PURE__ */ s.jsx("div", { className: "value", children: ((n = r == null ? void 0 : r.render) == null ? void 0 : n.call(
300
327
  r,
301
- $t(e, (r == null ? void 0 : r.dataIndex) || ""),
328
+ _t(e, (r == null ? void 0 : r.dataIndex) || ""),
302
329
  e,
303
330
  t
304
331
  )) || (e == null ? void 0 : e[r.dataIndex]) })
305
332
  ]
306
333
  },
307
- s
334
+ o
308
335
  );
309
336
  })
310
337
  },
311
338
  t
312
339
  )),
313
- Array.from({ length: F.mobile ?? 2 }).map((e, t) => /* @__PURE__ */ o.jsx(
340
+ Array.from({ length: _.mobile ?? 2 }).map((e, t) => /* @__PURE__ */ s.jsx(
314
341
  "div",
315
342
  {
316
343
  className: "listItem",
@@ -318,13 +345,13 @@ function Rt({
318
345
  display: i ? "block" : "none",
319
346
  backgroundColor: c == null ? void 0 : c.listItemBgColor
320
347
  },
321
- children: /* @__PURE__ */ o.jsx("div", { className: "row", children: se ? se() : /* @__PURE__ */ o.jsx(
322
- ft,
348
+ children: /* @__PURE__ */ s.jsx("div", { className: "row", children: ne ? ne() : /* @__PURE__ */ s.jsx(
349
+ wt,
323
350
  {
324
351
  title: !1,
325
352
  paragraph: {
326
- rows: ke,
327
- width: pe
353
+ rows: He,
354
+ width: Re
328
355
  },
329
356
  active: !0
330
357
  }
@@ -336,157 +363,150 @@ function Rt({
336
363
  }
337
364
  )
338
365
  }
339
- ), we = l(() => /* @__PURE__ */ o.jsxs("div", { className: "alert", children: [
340
- /* @__PURE__ */ o.jsx(
341
- Ne,
366
+ ), Te = l(() => /* @__PURE__ */ s.jsxs("div", { className: "alert", children: [
367
+ /* @__PURE__ */ s.jsx(
368
+ ve,
342
369
  {
343
370
  highlightTag: "strong",
344
- keywords: `${B}`,
345
- sourceString: `共 ${B} 条`,
371
+ keywords: `${j}`,
372
+ sourceString: `共 ${j} 条`,
346
373
  tagClass: "totalText"
347
374
  }
348
375
  ),
349
- !!h && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
350
- /* @__PURE__ */ o.jsx(Te.Text, { className: "splitBorder", children: "/" }),
351
- /* @__PURE__ */ o.jsx(
352
- Ne,
376
+ !!u && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
377
+ /* @__PURE__ */ s.jsx(Le.Text, { className: "splitBorder", children: "/" }),
378
+ /* @__PURE__ */ s.jsx(
379
+ ve,
353
380
  {
354
381
  highlightTag: "strong",
355
- keywords: `${(h == null ? void 0 : h.num) ?? 0}`,
356
- sourceString: `已选中 ${(h == null ? void 0 : h.num) ?? 0} 条`
382
+ keywords: `${(u == null ? void 0 : u.num) ?? 0}`,
383
+ sourceString: `已选中 ${(u == null ? void 0 : u.num) ?? 0} 条`
357
384
  }
358
385
  ),
359
- !!(h != null && h.num) && /* @__PURE__ */ o.jsx(
360
- Te.Link,
386
+ !!(u != null && u.num) && /* @__PURE__ */ s.jsx(
387
+ Le.Link,
361
388
  {
362
389
  className: "cleanSelected",
363
- onClick: h == null ? void 0 : h.onClear,
390
+ onClick: u == null ? void 0 : u.onClear,
364
391
  children: "取消选中"
365
392
  }
366
393
  )
367
394
  ] })
368
- ] }), [B, h]), ct = (e) => {
369
- var r;
370
- const t = { ...e };
371
- return t.className.includes("ant-table-cell-fix-right") && !R && ((r = t.style) != null && r.right) && (t.style = {
372
- ...t.style,
373
- right: t.style.right - (L || 0)
374
- }), /* @__PURE__ */ o.jsx("th", { ...t });
375
- }, at = (e) => {
395
+ ] }), [j, u]), yt = (e) => {
376
396
  var t;
377
- i || e.active.id !== ((t = e.over) == null ? void 0 : t.id) && (G == null || G(e));
378
- }, Be = te(() => N ? {
379
- row: (e) => vt({ ...e, loading: i == null ? void 0 : i.toString() })
380
- } : {}, [N, N ? i : !1]), ht = l(() => ({
381
- ...j,
397
+ i || e.active.id !== ((t = e.over) == null ? void 0 : t.id) && (E == null || E(e));
398
+ }, pe = oe(() => M ? {
399
+ row: (e) => Kt({ ...e, loading: i == null ? void 0 : i.toString() })
400
+ } : {}, [M, M ? i : !1]), xt = l(() => ({
401
+ ...W,
382
402
  header: {
383
- ...j == null ? void 0 : j.header,
384
- cell: ct
403
+ ...W == null ? void 0 : W.header,
404
+ cell: (e) => Dt({ ...e, hasScrollBar: V, scrollbarSize: $ })
385
405
  },
386
406
  body: {
387
- ...j == null ? void 0 : j.body,
388
- ...Be()
407
+ ...W == null ? void 0 : W.body,
408
+ ...pe()
389
409
  }
390
- }), [j, R, L, Be]);
391
- return /* @__PURE__ */ o.jsxs(
410
+ }), [W, V, $, pe]);
411
+ return /* @__PURE__ */ s.jsxs(
392
412
  "div",
393
413
  {
394
- className: re("bitzTableBlock", {
395
- fullscreen: u.fullscreen
414
+ className: F("bitzTableBlock", {
415
+ fullscreen: d.fullscreen
396
416
  }),
397
- style: nt,
417
+ style: mt,
398
418
  children: [
399
- !q && /* @__PURE__ */ o.jsxs("div", { ref: w, className: st, style: it, children: [
400
- /* @__PURE__ */ o.jsxs("div", { className: "bitzTableContainerBody", ref: he, children: [
401
- ve && /* @__PURE__ */ o.jsxs("div", { className: "bitzTableToolbarBlock", children: [
402
- Pe || /* @__PURE__ */ o.jsx("div", {}),
403
- He,
404
- $e
419
+ !D && /* @__PURE__ */ s.jsxs("div", { ref: z, className: ft, style: bt, children: [
420
+ /* @__PURE__ */ s.jsxs("div", { className: "bitzTableContainerBody", ref: de, children: [
421
+ Ke && /* @__PURE__ */ s.jsxs("div", { className: "bitzTableToolbarBlock", children: [
422
+ qe || /* @__PURE__ */ s.jsx("div", {}),
423
+ De,
424
+ Fe
405
425
  ] }),
406
- /* @__PURE__ */ o.jsx(
407
- Pt,
426
+ /* @__PURE__ */ s.jsx(
427
+ qt,
408
428
  {
409
- enabledRowDragSort: N,
410
- dataSource: me,
411
- mergeRowKey: xe,
412
- onDragEnd: at,
413
- children: /* @__PURE__ */ o.jsx(
414
- mt,
429
+ enabledRowDragSort: M,
430
+ dataSource: ge,
431
+ mergeRowKey: Be,
432
+ onDragEnd: yt,
433
+ children: /* @__PURE__ */ s.jsx(
434
+ zt,
415
435
  {
416
- ...d,
417
- bordered: Ke,
418
- columns: Ze,
419
- dataSource: me,
436
+ ...f,
437
+ bordered: Ee,
438
+ columns: it,
439
+ dataSource: ge,
420
440
  loading: !1,
421
441
  pagination: !1,
422
- scroll: Xe,
423
- expandable: tt,
424
- rowSelection: rt,
425
- onRow: ot,
426
- rowHoverable: Oe,
427
- rowClassName: lt,
442
+ scroll: ee,
443
+ expandable: ht,
444
+ rowSelection: dt,
445
+ onRow: ut,
446
+ rowHoverable: Je,
447
+ rowClassName: Ct,
428
448
  className: "bitzTable",
429
- components: ht,
430
- rowKey: xe
449
+ components: xt,
450
+ rowKey: Be
431
451
  }
432
452
  )
433
453
  }
434
454
  )
435
455
  ] }),
436
- W && !!B && /* @__PURE__ */ o.jsxs("div", { className: "bitzTablePagination", ref: X, children: [
437
- we,
438
- /* @__PURE__ */ o.jsx(
439
- yt,
456
+ H && !!j && /* @__PURE__ */ s.jsxs("div", { className: "bitzTablePagination", ref: I, children: [
457
+ Te,
458
+ /* @__PURE__ */ s.jsx(
459
+ jt,
440
460
  {
441
461
  size: "small",
442
- enableControl: Se,
443
- pagination: x,
444
- total: B,
445
- dataSource: b,
446
- resetPage: Re,
462
+ enableControl: Pe,
463
+ pagination: C,
464
+ total: j,
465
+ dataSource: m,
466
+ resetPage: _e,
447
467
  hideTotalText: !0,
448
- paginationEmit: H
468
+ paginationEmit: O
449
469
  }
450
470
  )
451
471
  ] }),
452
- !W && !!h && !!B && /* @__PURE__ */ o.jsx("div", { className: "bitzTablePagination", ref: X, children: we })
472
+ !H && !!u && !!j && /* @__PURE__ */ s.jsx("div", { className: "bitzTablePagination", ref: I, children: Te })
453
473
  ] }),
454
- q && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
455
- (i || !!(b != null && b.length)) && /* @__PURE__ */ o.jsx(o.Fragment, { children: ne ? (
474
+ D && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
475
+ (i || !!(m != null && m.length)) && /* @__PURE__ */ s.jsx(s.Fragment, { children: ie ? (
456
476
  // @ts-ignore
457
- /* @__PURE__ */ o.jsx(
458
- gt,
477
+ /* @__PURE__ */ s.jsx(
478
+ pt,
459
479
  {
460
- onRefresh: async () => !i && ne(),
461
- children: ge
480
+ onRefresh: async () => !i && ie(),
481
+ children: We
462
482
  }
463
483
  )
464
- ) : ge }),
465
- !i && /* @__PURE__ */ o.jsx(xt, { data: b, title: Me, img: Le }),
466
- /* @__PURE__ */ o.jsx(
467
- bt,
484
+ ) : We }),
485
+ !i && /* @__PURE__ */ s.jsx(Wt, { data: m, title: Oe, img: Ve }),
486
+ /* @__PURE__ */ s.jsx(
487
+ Bt,
468
488
  {
469
489
  className: "tableMobileDrawer",
470
- open: Fe,
490
+ open: Ye,
471
491
  placement: "bottom",
472
492
  height: "auto",
473
493
  closable: !1,
474
- onClose: ae,
475
- children: /* @__PURE__ */ o.jsxs("div", { className: "drawerBox", children: [
476
- /* @__PURE__ */ o.jsx("div", { className: "boxBody", children: _e.map((e, t) => /* @__PURE__ */ o.jsx(
494
+ onClose: he,
495
+ children: /* @__PURE__ */ s.jsxs("div", { className: "drawerBox", children: [
496
+ /* @__PURE__ */ s.jsx("div", { className: "boxBody", children: Ae.map((e, t) => /* @__PURE__ */ s.jsx(
477
497
  "div",
478
498
  {
479
499
  className: "operaList",
480
- onClick: () => Qe(e),
500
+ onClick: () => rt(e),
481
501
  ...e.danger && {
482
- style: { color: g.colorError }
502
+ style: { color: x.colorError }
483
503
  },
484
504
  children: e.label
485
505
  },
486
506
  t
487
507
  )) }),
488
- /* @__PURE__ */ o.jsx("div", { className: "boxLine" }),
489
- /* @__PURE__ */ o.jsx("div", { className: "boxFooter", onClick: ae, children: We })
508
+ /* @__PURE__ */ s.jsx("div", { className: "boxLine" }),
509
+ /* @__PURE__ */ s.jsx("div", { className: "boxFooter", onClick: he, children: $e })
490
510
  ] })
491
511
  }
492
512
  )
@@ -495,7 +515,7 @@ function Rt({
495
515
  }
496
516
  );
497
517
  }
498
- const mr = (W) => /* @__PURE__ */ o.jsx(wt, { initValue: W, children: /* @__PURE__ */ o.jsx(Rt, { ...W }) });
518
+ const Br = (H) => /* @__PURE__ */ s.jsx(Nt, { initValue: H, children: /* @__PURE__ */ s.jsx(Gt, { ...H }) });
499
519
  export {
500
- mr as default
520
+ Br as default
501
521
  };