bitz-react-admin-ui 2.3.1 → 2.3.2

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