bitz-react-admin-ui 2.1.9 → 2.2.1

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 (63) hide show
  1. package/dist/components/BitzPagination/index.d.ts +4 -0
  2. package/dist/components/BitzPagination/index.mjs +22 -21
  3. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +26 -22
  4. package/dist/components/BitzTable/ActionCol/index.d.ts +1 -1
  5. package/dist/components/BitzTable/ActionCol/index.mjs +61 -61
  6. package/dist/components/BitzTable/SelectionBar/Button.d.ts +2 -3
  7. package/dist/components/BitzTable/SelectionBar/Button.mjs +19 -25
  8. package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +19 -38
  9. package/dist/components/BitzTable/Store/index.d.ts +43 -22
  10. package/dist/components/BitzTable/Store/index.mjs +128 -125
  11. package/dist/components/BitzTable/Store/utils/index.d.ts +4 -5
  12. package/dist/components/BitzTable/Store/utils/index.mjs +31 -31
  13. package/dist/components/BitzTable/SubTable/index.mjs +90 -106
  14. package/dist/components/BitzTable/Table/SortTableContext.d.ts +12 -0
  15. package/dist/components/BitzTable/Table/SortTableContext.mjs +25 -0
  16. package/dist/components/BitzTable/Table/SortableRow.d.ts +7 -0
  17. package/dist/components/BitzTable/Table/SortableRow.mjs +54 -0
  18. package/dist/components/BitzTable/Table/index.d.ts +14 -1
  19. package/dist/components/BitzTable/Table/index.mjs +319 -273
  20. package/dist/components/BitzTable/Table/style.d.ts +2 -1
  21. package/dist/components/BitzTable/Table/style.mjs +17 -15
  22. package/dist/components/BitzTable/Table/utils.mjs +17 -16
  23. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.d.ts +1 -0
  24. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +84 -97
  25. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.d.ts +5 -4
  26. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +66 -60
  27. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +78 -72
  28. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.d.ts +1 -3
  29. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +190 -189
  30. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.d.ts +8 -0
  31. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +94 -0
  32. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.d.ts +10 -0
  33. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +58 -0
  34. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +13 -7
  35. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +119 -80
  36. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.d.ts +2 -2
  37. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +26 -29
  38. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.d.ts +3 -1
  39. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +53 -77
  40. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.d.ts +2 -2
  41. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.d.ts +12 -0
  42. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +61 -0
  43. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +50 -59
  44. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +22 -23
  45. package/dist/components/BitzTable/ToolBar/Modal/index.d.ts +18 -0
  46. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +50 -0
  47. package/dist/components/BitzTable/ToolBar/Modal/style.d.ts +2 -0
  48. package/dist/components/BitzTable/ToolBar/Modal/style.mjs +58 -0
  49. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +21 -21
  50. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +20 -22
  51. package/dist/components/BitzTable/ToolBar/index.d.ts +12 -11
  52. package/dist/components/BitzTable/ToolBar/style.mjs +41 -46
  53. package/dist/components/BitzTable/index.d.ts +4 -2
  54. package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/MenuOutlined.mjs +5 -0
  55. package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/MenuOutlined.mjs +15 -0
  56. package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +1098 -753
  57. package/dist/style.css +1 -1
  58. package/dist/utils/findNode.d.ts +2 -2
  59. package/package.json +1 -1
  60. package/dist/components/BitzTable/Select/index.mjs +0 -11
  61. package/dist/components/BitzTable/Select/style.mjs +0 -66
  62. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.mjs +0 -78
  63. package/dist/components/BitzTable/ToolBar/ExportIcon/styles.mjs +0 -47
@@ -1,91 +1,75 @@
1
- import { j as S } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { useContext as q, useRef as it, useMemo as r, useCallback as $ } from "react";
3
- import { Table as z } from "antd";
4
- import lt from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
5
- import { BitzTableContext as ct } from "../Store/index.mjs";
6
- import ut from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
7
- import mt from "../ActionCol/style.mjs";
8
- import ht from "../../BitzTheme/index.mjs";
9
- import dt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/table/ExpandIcon.mjs";
1
+ import { j as C } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { useContext as D, useRef as et, useMemo as o, useCallback as I } from "react";
3
+ import { Table as g } from "antd";
4
+ import nt from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
5
+ import { BitzTableContext as rt } from "../Store/index.mjs";
6
+ import ot from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
7
+ import st from "../ActionCol/style.mjs";
8
+ import at from "../../BitzTheme/index.mjs";
9
+ import lt from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/table/ExpandIcon.mjs";
10
10
  import "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/index.mjs";
11
- import ft from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/locale/en_US.mjs";
12
- import { getColumnsWithTool as bt, loopBuildSkeleton as yt } from "../Table/utils.mjs";
13
- import { ConfigContext as Ct } from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/context.mjs";
14
- const O = [z.SELECTION_COLUMN, z.EXPAND_COLUMN];
15
- function Nt({
16
- dataSource: f = [],
17
- columns: E,
18
- loading: i = !1,
11
+ import ct from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/locale/en_US.mjs";
12
+ import { getColumnsWithTool as it, loopBuildSkeleton as ut } from "../Table/utils.mjs";
13
+ import { ConfigContext as mt } from "../../../node_modules/.store/antd@5.16.2/node_modules/antd/es/config-provider/context.mjs";
14
+ const M = [g.SELECTION_COLUMN, g.EXPAND_COLUMN];
15
+ function Bt({
16
+ dataSource: u = [],
17
+ columns: x,
18
+ loading: l = !1,
19
19
  scroll: s,
20
- components: y,
21
- expandable: l,
22
- rowSelection: h,
20
+ components: f,
21
+ expandable: c,
22
+ rowSelection: m,
23
23
  ...a
24
24
  }) {
25
- var A, D;
26
- const { token: _ } = ht.useToken(), { gap: G } = mt(), { showColumnBorder: U, rowHoverable: V } = q(ct), d = it(null), R = ut((A = d.current) == null ? void 0 : A.nativeElement), C = r(() => {
25
+ var T, N;
26
+ const { token: j } = at.useToken(), { gap: K } = st(), { showColumnBorder: q, rowHoverable: P } = D(rt), h = et(null), y = ot((T = h.current) == null ? void 0 : T.nativeElement), A = o(() => {
27
27
  let t = (s == null ? void 0 : s.x) ?? 1e3;
28
28
  return s != null && s.x ? { x: t, y: s.y || 400 } : s != null && s.y ? { x: t, y: s.y } : { x: t, y: 400 };
29
- }, [s]), X = () => {
30
- var n, o;
31
- const t = (o = (n = d.current) == null ? void 0 : n.nativeElement) == null ? void 0 : o.querySelectorAll(
29
+ }, [s]), O = () => {
30
+ var r, n;
31
+ const t = (n = (r = h.current) == null ? void 0 : r.nativeElement) == null ? void 0 : n.querySelectorAll(
32
32
  "& > .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)"
33
33
  ), e = [];
34
- if (t == null || t.forEach((c) => {
35
- var u;
34
+ if (t == null || t.forEach((i) => {
35
+ var b;
36
36
  e.push(
37
- ((u = c.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : u.clientWidth) || 0
37
+ ((b = i.querySelector("& > .operationCol .actionGroup")) == null ? void 0 : b.clientWidth) || 0
38
38
  );
39
39
  }), e.length)
40
- return Math.ceil(Math.max(...e)) + G * 2;
41
- }, I = () => {
42
- var u, b, g, x, p;
43
- const t = (b = (u = d.current) == null ? void 0 : u.nativeElement) == null ? void 0 : b.querySelector(
40
+ return Math.ceil(Math.max(...e)) + K * 2;
41
+ }, _ = () => {
42
+ var b, p, W, L, v;
43
+ const t = (p = (b = h.current) == null ? void 0 : b.nativeElement) == null ? void 0 : p.querySelector(
44
44
  ".ant-table-body"
45
- ), e = t == null ? void 0 : t.clientWidth, o = ((t == null ? void 0 : t.offsetWidth) || 0) - e > 0, c = (p = (x = (g = d.current) == null ? void 0 : g.nativeElement) == null ? void 0 : x.querySelector(
45
+ ), e = t == null ? void 0 : t.clientWidth, n = ((t == null ? void 0 : t.offsetWidth) || 0) - e > 0, i = (v = (L = (W = h.current) == null ? void 0 : W.nativeElement) == null ? void 0 : L.querySelector(
46
46
  ".ant-table-cell-scrollbar"
47
- )) == null ? void 0 : p.offsetWidth;
48
- return { tbodyWidth: e, scrollbarSize: c, hasScrollBar: o };
49
- }, F = (t) => {
50
- var j, K;
51
- const e = t.length, n = t.filter((m) => m.width), c = n.map((m) => m.width).reduce((m, k) => m + k, 0);
52
- let u = 0;
53
- if ((j = d.current) != null && j.nativeElement) {
54
- const m = window.getComputedStyle((K = d.current) == null ? void 0 : K.nativeElement), k = parseInt(
55
- m.getPropertyValue("--toolCell-paddingInline")
56
- );
57
- u = parseInt(m.getPropertyValue("--fontSize")) + 4 + 2 * k;
58
- }
59
- let b = 0;
60
- h && (b += u), l && (b += u);
61
- const { tbodyWidth: g } = I(), x = parseInt(`${C == null ? void 0 : C.x}`) || 0, p = Math.max(x, g), P = (parseInt(`${p}`) || 0) - c - b;
62
- return P >= 0 ? P / (e - n.length) : void 0;
63
- }, { hasScrollBar: B, scrollbarSize: T } = r(() => {
64
- const { hasScrollBar: t, scrollbarSize: e } = I();
47
+ )) == null ? void 0 : v.offsetWidth;
48
+ return { tbodyWidth: e, scrollbarSize: i, hasScrollBar: n };
49
+ }, { hasScrollBar: R, scrollbarSize: S } = o(() => {
50
+ const { hasScrollBar: t, scrollbarSize: e } = _();
65
51
  return {
66
52
  hasScrollBar: t,
67
53
  scrollbarSize: e
68
54
  };
69
- }, [R == null ? void 0 : R.height]), w = r(() => {
70
- const t = E ?? [], e = t.filter((o) => !O.includes(o));
71
- F(e);
72
- const n = e.map((o) => ({
73
- ...o,
74
- width: o.useMaxWidth ? X() ?? o.width : o.width
55
+ }, [y == null ? void 0 : y.height]), d = o(() => {
56
+ const t = x ?? [], r = t.filter((n) => !M.includes(n)).map((n) => ({
57
+ ...n,
58
+ width: n.useMaxWidth ? O() ?? n.width : n.width
75
59
  }));
76
- return bt(t, n, h, l);
77
- }, [E]), v = r(() => yt(w, O), [w]), H = r(() => i ? v : w, [i, w, v]), N = r(() => {
78
- const t = f == null ? void 0 : f.length, e = t > 10 ? t >= 20 ? 20 : t : 10;
79
- return Array.from({ length: e }).map((o, c) => ({
80
- key: `${Date.now()}${c}`
60
+ return it(t, r, m, c);
61
+ }, [x]), k = o(() => ut(d, M), [d]), G = o(() => l ? k : d, [l, d, k]), z = o(() => {
62
+ const t = u == null ? void 0 : u.length, e = t > 4 ? t >= 8 ? 8 : t : 4;
63
+ return Array.from({ length: e }).map((n, i) => ({
64
+ key: `${Date.now()}${i}`
81
65
  }));
82
- }, [f]), J = r(() => i ? N : f, [i, f, N]), { table: W, locale: Q = ft } = q(Ct), Y = { ...Q.Table }, Z = ((D = W == null ? void 0 : W.expandable) == null ? void 0 : D.expandIcon) || (l == null ? void 0 : l.expandIcon) || dt(Y), L = r(() => {
83
- if (l)
66
+ }, [u]), U = o(() => l ? z : u, [l, u, z]), { table: w, locale: $ = ct } = D(mt), F = { ...$.Table }, H = ((N = w == null ? void 0 : w.expandable) == null ? void 0 : N.expandIcon) || (c == null ? void 0 : c.expandIcon) || lt(F), B = o(() => {
67
+ if (c)
84
68
  return {
85
- ...l,
86
- expandedRowRender: () => /* @__PURE__ */ S.jsx(S.Fragment, {}),
69
+ ...c,
70
+ expandedRowRender: () => /* @__PURE__ */ C.jsx(C.Fragment, {}),
87
71
  expandIcon: (t) => {
88
- const e = Z(t);
72
+ const e = H(t);
89
73
  return {
90
74
  ...e,
91
75
  props: {
@@ -93,73 +77,73 @@ function Nt({
93
77
  disabled: !0,
94
78
  style: {
95
79
  ...e.props.style,
96
- backgroundColor: _.colorBgContainerDisabled
80
+ backgroundColor: j.colorBgContainerDisabled
97
81
  }
98
82
  }
99
83
  };
100
84
  }
101
85
  };
102
- }, [l]), tt = r(() => i ? L : l, [i, l, L]), M = r(() => {
103
- if (h)
86
+ }, [c]), X = o(() => l ? B : c, [l, c, B]), E = o(() => {
87
+ if (m)
104
88
  return {
105
- ...h,
89
+ ...m,
106
90
  selectedRowKeys: [],
107
91
  getCheckboxProps: () => ({ disabled: !0 })
108
92
  };
109
- }, [h]), et = r(() => i ? M : h, [i, h, M]), nt = r(() => i ? void 0 : a.rowKey, [i, a.rowKey]), ot = $(
93
+ }, [m]), J = o(() => l ? E : m, [l, m, E]), Q = o(() => l ? void 0 : a.rowKey, [l, a.rowKey]), V = I(
110
94
  (t, e) => {
111
- var o;
95
+ var n;
112
96
  if (!a.onRow)
113
97
  return {};
114
- const n = (o = a.onRow) == null ? void 0 : o.call(a, t, e);
115
- return n.onClick && (n.className = "rowPointerCursor"), n;
98
+ const r = (n = a.onRow) == null ? void 0 : n.call(a, t, e);
99
+ return r.onClick && (r.className = "rowPointerCursor"), r;
116
100
  },
117
101
  [a.onRow]
118
- ), rt = $(
119
- (t, e, n) => {
120
- const o = e % 2 === 0 ? "oddRow" : "evenRow";
102
+ ), Y = I(
103
+ (t, e, r) => {
104
+ const n = e % 2 === 0 ? "oddRow" : "evenRow";
121
105
  if (a.rowClassName) {
122
- const c = a.rowClassName(t, e, n);
123
- return lt(o, c);
106
+ const i = a.rowClassName(t, e, r);
107
+ return nt(n, i);
124
108
  }
125
- return o;
109
+ return n;
126
110
  },
127
111
  [a.rowClassName]
128
- ), st = (t) => {
129
- var n;
112
+ ), Z = (t) => {
113
+ var r;
130
114
  const e = { ...t };
131
- return e.className.includes("ant-table-cell-fix-right") && !B && ((n = e.style) != null && n.right) && (e.style = {
115
+ return e.className.includes("ant-table-cell-fix-right") && !R && ((r = e.style) != null && r.right) && (e.style = {
132
116
  ...e.style,
133
- right: e.style.right - (T || 0)
134
- }), /* @__PURE__ */ S.jsx("th", { ...e });
135
- }, at = r(() => ({
136
- ...y,
117
+ right: e.style.right - (S || 0)
118
+ }), /* @__PURE__ */ C.jsx("th", { ...e });
119
+ }, tt = o(() => ({
120
+ ...f,
137
121
  header: {
138
- ...y == null ? void 0 : y.header,
139
- cell: st
122
+ ...f == null ? void 0 : f.header,
123
+ cell: Z
140
124
  }
141
- }), [y, B, T]);
142
- return /* @__PURE__ */ S.jsx(
143
- z,
125
+ }), [f, R, S]);
126
+ return /* @__PURE__ */ C.jsx(
127
+ g,
144
128
  {
145
129
  ...a,
146
- bordered: U,
147
- columns: H,
148
- dataSource: J,
130
+ bordered: q,
131
+ columns: G,
132
+ dataSource: U,
149
133
  loading: !1,
150
134
  pagination: !1,
151
- scroll: C,
152
- expandable: tt,
153
- rowSelection: et,
154
- onRow: ot,
155
- rowClassName: rt,
156
- components: at,
157
- rowKey: nt,
158
- rowHoverable: V,
159
- ref: d
135
+ scroll: A,
136
+ expandable: X,
137
+ rowSelection: J,
138
+ onRow: V,
139
+ rowClassName: Y,
140
+ components: tt,
141
+ rowKey: Q,
142
+ rowHoverable: P,
143
+ ref: h
160
144
  }
161
145
  );
162
146
  }
163
147
  export {
164
- Nt as default
148
+ Bt as default
165
149
  };
@@ -0,0 +1,12 @@
1
+ import { DragEndEvent } from "@dnd-kit/core";
2
+ import { ReactNode } from "react";
3
+ interface SortTableContextProps {
4
+ children?: ReactNode;
5
+ enabledRowDragSort?: boolean;
6
+ dataSource: any[];
7
+ mergeRowKey: string;
8
+ onDragEnd: (event: DragEndEvent) => void;
9
+ }
10
+ declare function SortTableContext({ children, enabledRowDragSort, dataSource, mergeRowKey, onDragEnd, }: SortTableContextProps): import("react/jsx-runtime").JSX.Element;
11
+ declare const _default: import("react").MemoExoticComponent<typeof SortTableContext>;
12
+ export default _default;
@@ -0,0 +1,25 @@
1
+ import { j as t } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { DndContext as a } from "../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
3
+ import { restrictToVerticalAxis as n } from "../../../node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
4
+ import { SortableContext as x, verticalListSortingStrategy as f } from "../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
5
+ import { memo as p } from "react";
6
+ function l({
7
+ children: r,
8
+ enabledRowDragSort: o,
9
+ dataSource: e,
10
+ mergeRowKey: m,
11
+ onDragEnd: i
12
+ }) {
13
+ return o ? /* @__PURE__ */ t.jsx(a, { modifiers: [n], onDragEnd: i, children: /* @__PURE__ */ t.jsx(
14
+ x,
15
+ {
16
+ items: e.map((s) => s[m]),
17
+ strategy: f,
18
+ children: r
19
+ }
20
+ ) }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: r });
21
+ }
22
+ const C = p(l);
23
+ export {
24
+ C as default
25
+ };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
3
+ 'data-row-key': string;
4
+ loading: 'true' | 'false';
5
+ }
6
+ declare const SortableRow: ({ children, loading, ...props }: RowProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SortableRow;
@@ -0,0 +1,54 @@
1
+ import { j as i } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { useSortable as R } from "../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
3
+ import { CSS as b } from "../../../node_modules/.store/@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
4
+ import { theme as h } from "antd";
5
+ import a from "react";
6
+ import j from "../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/MenuOutlined.mjs";
7
+ const T = ({ children: m, loading: t, ...e }) => {
8
+ const { token: l } = h.useToken(), {
9
+ attributes: f,
10
+ listeners: u,
11
+ setNodeRef: c,
12
+ setActivatorNodeRef: d,
13
+ transform: o,
14
+ transition: p,
15
+ isDragging: x
16
+ } = R({ id: e["data-row-key"] }), S = {
17
+ ...e.style,
18
+ transform: b.Transform.toString(o && { ...o, scaleY: 1 }),
19
+ transition: p,
20
+ ...x ? { position: "relative", zIndex: 9999 } : {}
21
+ };
22
+ return /* @__PURE__ */ i.jsx(
23
+ "tr",
24
+ {
25
+ ...e,
26
+ style: S,
27
+ ...f,
28
+ ...t === "true" ? {} : {
29
+ ref: c
30
+ },
31
+ children: a.Children.map(m, (r) => {
32
+ var n, s;
33
+ return ((s = (n = r.props) == null ? void 0 : n.additionalProps) == null ? void 0 : s["data-column-name"]) === "dragSortCell" ? a.cloneElement(r, {
34
+ children: /* @__PURE__ */ i.jsx(
35
+ j,
36
+ {
37
+ ref: d,
38
+ style: {
39
+ touchAction: "none",
40
+ cursor: t === "true" ? "default" : "move",
41
+ fontSize: "calc(var(--fontSize) + 3px)",
42
+ color: t === "true" ? l.colorTextDisabled : "inherit"
43
+ },
44
+ ...u
45
+ }
46
+ )
47
+ }) : r;
48
+ })
49
+ }
50
+ );
51
+ };
52
+ export {
53
+ T as default
54
+ };
@@ -6,8 +6,13 @@ import type { RowClassName } from 'rc-table/es/interface';
6
6
  import { ColumnStateType, DensitySize, StylesStateType, ExportColumnStateType } from '../Store';
7
7
  import { ActionsFunType, BitzTableColumnsType } from '..';
8
8
  import { BitzTableBorderedType } from '@/components/BitzConfigProvider/context';
9
+ import { TableRowSelection } from 'antd/es/table/interface';
10
+ import { DragEndEvent } from '@dnd-kit/core';
9
11
  import './index.less';
10
- export interface BitzTableProps<RecordType = any> extends Omit<TableProps<RecordType>, 'size' | 'pagination' | 'bordered'> {
12
+ export interface BitzTableRowSelectionProps<RecordType> extends TableRowSelection<RecordType> {
13
+ onClear?: () => void;
14
+ }
15
+ export interface BitzTableProps<RecordType = any> extends Omit<TableProps<RecordType>, 'size' | 'pagination' | 'bordered' | 'rowSelection'> {
11
16
  /** 是否开启rowHover样式 */
12
17
  rowHoverable?: boolean;
13
18
  /** 是否开启斑马纹样式 */
@@ -16,6 +21,8 @@ export interface BitzTableProps<RecordType = any> extends Omit<TableProps<Record
16
21
  bordered?: BitzTableBorderedType;
17
22
  /** PC端:是否显示分页 */
18
23
  showPagination?: boolean;
24
+ /** PC端:是否显示分页选中条数据 */
25
+ showSelected?: boolean;
19
26
  /** PC端:BitzTable组件的整体高度,由外部通过视口高度减去其他元素高度和间隙的结果 */
20
27
  height?: number;
21
28
  /** table可滚动区域的最大宽高的值 */
@@ -33,6 +40,8 @@ export interface BitzTableProps<RecordType = any> extends Omit<TableProps<Record
33
40
  operationFilter?: ActionsFunType<RecordType>;
34
41
  /** PC&移动端:请求加载状态 */
35
42
  loading?: boolean;
43
+ /** 多选/单选 */
44
+ rowSelection?: BitzTableRowSelectionProps<RecordType>;
36
45
  /** 骨架屏列表个数 */
37
46
  skeletonNum?: {
38
47
  pc?: number;
@@ -55,6 +64,10 @@ export interface BitzTableProps<RecordType = any> extends Omit<TableProps<Record
55
64
  };
56
65
  /** PC端:给父组件传值 page当前第几页 pageSize每页有多少 */
57
66
  paginationEmit?: (page: number, pageSize: number) => void;
67
+ /** 是否启用拖拽 */
68
+ enabledRowDragSort?: boolean;
69
+ /** 拖拽结束 */
70
+ onRowDragEnd?: (event: DragEndEvent) => void;
58
71
  /** 移动端:加载更多返回函数 */
59
72
  /** 移动端:下拉刷新 */
60
73
  mobileRefreshEmit?: () => Promise<unknown> | void;