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