bitz-react-admin-ui 2.3.1 → 2.3.3

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