bitz-react-admin-ui 2.1.9 → 2.2.0

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 (61) hide show
  1. package/dist/_virtual/index.mjs +2 -2
  2. package/dist/_virtual/index2.mjs +2 -2
  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 +24 -21
  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 +5 -0
  19. package/dist/components/BitzTable/Table/index.mjs +265 -244
  20. package/dist/components/BitzTable/Table/utils.mjs +17 -16
  21. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.d.ts +1 -0
  22. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +84 -97
  23. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.d.ts +5 -4
  24. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +66 -60
  25. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +78 -72
  26. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.d.ts +1 -3
  27. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +190 -189
  28. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.d.ts +8 -0
  29. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +94 -0
  30. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.d.ts +10 -0
  31. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +58 -0
  32. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +13 -7
  33. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +119 -80
  34. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.d.ts +2 -2
  35. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +26 -29
  36. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.d.ts +3 -1
  37. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +53 -77
  38. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.d.ts +2 -2
  39. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.d.ts +12 -0
  40. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +61 -0
  41. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +50 -59
  42. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +27 -32
  43. package/dist/components/BitzTable/ToolBar/Modal/index.d.ts +18 -0
  44. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +50 -0
  45. package/dist/components/BitzTable/ToolBar/Modal/style.d.ts +2 -0
  46. package/dist/components/BitzTable/ToolBar/Modal/style.mjs +58 -0
  47. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +20 -20
  48. package/dist/components/BitzTable/ToolBar/index.d.ts +12 -11
  49. package/dist/components/BitzTable/index.d.ts +2 -0
  50. package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/MenuOutlined.mjs +5 -0
  51. package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/MenuOutlined.mjs +15 -0
  52. package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +1098 -753
  53. package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
  54. package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
  55. package/dist/style.css +1 -1
  56. package/dist/utils/findNode.d.ts +2 -2
  57. package/package.json +1 -1
  58. package/dist/components/BitzTable/Select/index.mjs +0 -11
  59. package/dist/components/BitzTable/Select/style.mjs +0 -66
  60. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.mjs +0 -78
  61. package/dist/components/BitzTable/ToolBar/ExportIcon/styles.mjs +0 -47
@@ -1,4 +1,4 @@
1
- var p = { exports: {} };
1
+ var s = { exports: {} };
2
2
  export {
3
- p as __module
3
+ s as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var s = { exports: {} };
1
+ var p = { exports: {} };
2
2
  export {
3
- s as __module
3
+ p as __module
4
4
  };
@@ -2,29 +2,29 @@ import { j as o } from "../../../node_modules/.store/react@18.2.0/node_modules/r
2
2
  import { useMemo as b } from "react";
3
3
  import { Space as u } from "antd";
4
4
  import f from "../../BitzButton/index.mjs";
5
- import c from "./style.mjs";
6
- import g from "../Dropdown/index.mjs";
7
- import w from "../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/PlusCircleFilled.mjs";
8
- import B from "../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/CaretDownOutlined.mjs";
9
- const G = ({
5
+ import E from "./style.mjs";
6
+ import c from "../Dropdown/index.mjs";
7
+ import g from "../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/PlusCircleFilled.mjs";
8
+ import w from "../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/CaretDownOutlined.mjs";
9
+ const F = ({
10
10
  size: h,
11
11
  add: i,
12
12
  excel: t,
13
- children: d
13
+ children: C
14
14
  }) => {
15
- const { blockCls: j, addBtnClassName: k, btnClassName: C } = c(h), y = b(() => {
16
- var s, r, n, m, a, l, p, e;
15
+ const { blockCls: d, addBtnClassName: j, btnClassName: k } = E(h), y = b(() => {
16
+ var n, r, s, m, a, e, l, p;
17
17
  return [
18
18
  {
19
- key: ((r = (s = t.menu) == null ? void 0 : s[0]) == null ? void 0 : r.key) || "download",
20
- label: ((m = (n = t.menu) == null ? void 0 : n[0]) == null ? void 0 : m.label) || "Excel模板下载"
19
+ key: ((r = (n = t.menu) == null ? void 0 : n[0]) == null ? void 0 : r.key) || "download",
20
+ label: ((m = (s = t.menu) == null ? void 0 : s[0]) == null ? void 0 : m.label) || "Excel模板下载"
21
21
  // icon: excel.menu?.[0]?.icon || (
22
22
  // <CloudDownloadOutlined style={{ fontSize: 14 }} />
23
23
  // ),
24
24
  },
25
25
  {
26
- key: ((l = (a = t.menu) == null ? void 0 : a[1]) == null ? void 0 : l.key) || "import",
27
- label: ((e = (p = t.menu) == null ? void 0 : p[1]) == null ? void 0 : e.label) || "Excel数据导入"
26
+ key: ((e = (a = t.menu) == null ? void 0 : a[1]) == null ? void 0 : e.key) || "import",
27
+ label: ((p = (l = t.menu) == null ? void 0 : l[1]) == null ? void 0 : p.label) || "Excel数据导入"
28
28
  // icon: excel.menu?.[1]?.icon || (
29
29
  // <CloudUploadOutlined style={{ fontSize: 14 }} />
30
30
  // ),
@@ -32,34 +32,38 @@ const G = ({
32
32
  ...(t == null ? void 0 : t.otherMenu) ?? []
33
33
  ];
34
34
  }, [t]);
35
- return /* @__PURE__ */ o.jsxs(u.Compact, { className: j, style: { height: "100%" }, children: [
35
+ return /* @__PURE__ */ o.jsxs(u.Compact, { className: d, style: { height: "100%" }, children: [
36
36
  i.show !== !1 && /* @__PURE__ */ o.jsx(
37
37
  f,
38
38
  {
39
39
  type: "primary",
40
- icon: /* @__PURE__ */ o.jsx(w, {}),
40
+ icon: /* @__PURE__ */ o.jsx(g, {}),
41
41
  onClick: i.onClick,
42
- className: k,
42
+ className: j,
43
43
  children: i.text
44
44
  }
45
45
  ),
46
- d,
46
+ C,
47
47
  t.show !== !1 && /* @__PURE__ */ o.jsx(
48
- g,
48
+ c,
49
49
  {
50
- menu: { items: y, onClick: ({ key: s }) => {
50
+ menu: { items: y, onClick: ({ key: n }) => {
51
51
  var r;
52
- return (r = t.onClick) == null ? void 0 : r.call(t, s);
52
+ return (r = t.onClick) == null ? void 0 : r.call(t, n);
53
53
  } },
54
54
  trigger: (t == null ? void 0 : t.trigger) || ["click"],
55
- children: /* @__PURE__ */ o.jsx(f, { className: C, type: "text", children: /* @__PURE__ */ o.jsxs(u, { size: 6, children: [
55
+ getPopupContainer: (n) => {
56
+ var r, s;
57
+ return (s = (r = n.parentElement) == null ? void 0 : r.parentElement) == null ? void 0 : s.parentElement;
58
+ },
59
+ children: /* @__PURE__ */ o.jsx(f, { className: k, type: "text", children: /* @__PURE__ */ o.jsxs(u, { size: 6, children: [
56
60
  /* @__PURE__ */ o.jsx("span", { children: t.text ?? "Excel文档导入" }),
57
- /* @__PURE__ */ o.jsx(B, {})
61
+ /* @__PURE__ */ o.jsx(w, {})
58
62
  ] }) })
59
63
  }
60
64
  )
61
65
  ] });
62
66
  };
63
67
  export {
64
- G as default
68
+ F as default
65
69
  };
@@ -1,5 +1,5 @@
1
1
  import { BitzTableActionProps, BitzTableColumnType, BitzTableActionColProps } from '..';
2
- export declare function BitzTableAction<T>({ loading, actionGroup, refInstance, }: BitzTableActionProps<T>): import("react/jsx-runtime").JSX.Element;
2
+ export declare function BitzTableAction<T>({ actionGroup, refInstance, }: BitzTableActionProps<T>): import("react/jsx-runtime").JSX.Element;
3
3
  /** 表格操作列 */
4
4
  declare function BitzTableActionCol<T>(props: BitzTableActionColProps<T>): BitzTableColumnType<T>;
5
5
  export default BitzTableActionCol;
@@ -1,21 +1,23 @@
1
1
  import { j as t } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import b from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
3
- import { Space as B, Skeleton as w } from "antd";
4
- import { useRef as y, useMemo as C } from "react";
2
+ import B from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
3
+ import { Space as w, Skeleton as y } from "antd";
4
+ import { useRef as z, useMemo as C, useContext as S } from "react";
5
5
  import p from "../../BitzButton/index.mjs";
6
- import k from "./style.mjs";
6
+ import b from "./style.mjs";
7
+ import "../index.mjs";
7
8
  import N from "../Dropdown/index.mjs";
8
- const g = ({
9
- skeletonCls: n,
10
- ...s
11
- }) => /* @__PURE__ */ t.jsxs(p, { type: "text", ...s, children: [
12
- /* @__PURE__ */ t.jsx("span", { children: s.children }),
9
+ import { BitzTableContext as I } from "../Store/index.mjs";
10
+ const k = ({
11
+ skeletonCls: s,
12
+ ...l
13
+ }) => /* @__PURE__ */ t.jsxs(p, { type: "text", ...l, children: [
14
+ /* @__PURE__ */ t.jsx("span", { children: l.children }),
13
15
  /* @__PURE__ */ t.jsx(
14
- w,
16
+ y,
15
17
  {
16
18
  active: !0,
17
19
  title: !1,
18
- className: n,
20
+ className: s,
19
21
  paragraph: {
20
22
  rows: 1,
21
23
  width: "100%"
@@ -23,74 +25,73 @@ const g = ({
23
25
  }
24
26
  )
25
27
  ] });
26
- function z({
27
- loading: n,
28
+ function R({
28
29
  actionGroup: s,
29
- refInstance: m
30
+ refInstance: l
30
31
  }) {
31
- const {
32
- gap: h,
33
- primaryBtnClassName: i,
34
- dangerBtnClassName: o,
35
- dropdownBtnClassName: l,
36
- maskClassName: d,
37
- skeletonBtnClassName: u,
38
- skeletonClassName: x
39
- } = k(), f = C(() => {
40
- const r = s.length >= 4 ? 2 : s.length, a = s.slice(0, r), c = [];
41
- if (a != null && a.length && a.forEach((e, j) => {
42
- c.push(
43
- n ? /* @__PURE__ */ t.jsx(
44
- g,
32
+ const { loading: r, fullscreen: h } = S(I), {
33
+ gap: a,
34
+ primaryBtnClassName: n,
35
+ dangerBtnClassName: i,
36
+ dropdownBtnClassName: j,
37
+ maskClassName: g,
38
+ skeletonBtnClassName: c,
39
+ skeletonClassName: m
40
+ } = b(), u = C(() => {
41
+ const o = s.length >= 4 ? 2 : s.length, d = s.slice(0, o), x = [];
42
+ if (d != null && d.length && d.forEach((e, f) => {
43
+ x.push(
44
+ r ? /* @__PURE__ */ t.jsx(
45
+ k,
45
46
  {
46
- className: u,
47
- skeletonCls: x,
47
+ className: c,
48
+ skeletonCls: m,
48
49
  children: e == null ? void 0 : e.label
49
50
  },
50
- j
51
+ f
51
52
  ) : e.children ? /* @__PURE__ */ t.jsx(N, { menu: { items: e.children }, children: /* @__PURE__ */ t.jsx(
52
53
  p,
53
54
  {
54
55
  type: "text",
55
- className: e.danger ? o : i,
56
+ className: e.danger ? i : n,
56
57
  children: e == null ? void 0 : e.label
57
58
  }
58
- ) }, j) : /* @__PURE__ */ t.jsx(
59
+ ) }, f) : /* @__PURE__ */ t.jsx(
59
60
  p,
60
61
  {
61
62
  type: "text",
62
- className: e.danger ? o : i,
63
+ className: e.danger ? i : n,
63
64
  onClick: e == null ? void 0 : e.onClick,
64
65
  children: e == null ? void 0 : e.label
65
66
  },
66
- j
67
+ f
67
68
  )
68
69
  );
69
- }), r === 2 && s.length >= 4) {
70
+ }), o === 2 && s.length >= 4) {
70
71
  const e = s.slice(2, s.length);
71
- c.push(
72
- n ? /* @__PURE__ */ t.jsx(
73
- g,
72
+ x.push(
73
+ r ? /* @__PURE__ */ t.jsx(
74
+ k,
74
75
  {
75
- className: u,
76
- skeletonCls: x,
76
+ className: c,
77
+ skeletonCls: m,
77
78
  children: "更多"
78
79
  },
79
80
  5
80
- ) : /* @__PURE__ */ t.jsx(N, { menu: { items: e }, children: /* @__PURE__ */ t.jsx(p, { type: "text", className: l, children: "更多" }) }, 5)
81
+ ) : /* @__PURE__ */ t.jsx(N, { menu: { items: e }, children: /* @__PURE__ */ t.jsx(p, { type: "text", className: j, children: "更多" }) }, 5)
81
82
  );
82
83
  }
83
- return c;
84
- }, [n, s]);
85
- return /* @__PURE__ */ t.jsxs("div", { onClick: (r) => r.stopPropagation(), children: [
86
- /* @__PURE__ */ t.jsx(B, { size: h, ref: m, className: "actionGroup", children: f }),
87
- /* @__PURE__ */ t.jsx("div", { className: d })
84
+ return x;
85
+ }, [r, s]);
86
+ return /* @__PURE__ */ t.jsxs("div", { onClick: (o) => o.stopPropagation(), children: [
87
+ /* @__PURE__ */ t.jsx(w, { size: a, ref: l, className: "actionGroup", children: u }),
88
+ /* @__PURE__ */ t.jsx("div", { className: g })
88
89
  ] });
89
90
  }
90
- function D(n) {
91
- const { actionGroup: s, loading: m, ...h } = n, { gap: i } = k(), o = y(null), l = b(o), d = C(() => l != null && l.width ? l.width + i * 2 + 1 : 181, [l, i]);
91
+ function q(s) {
92
+ const { actionGroup: l, ...r } = s, { gap: h } = b(), a = z(null), n = B(a), i = C(() => n != null && n.width ? n.width + h * 2 + 1 : 181, [n, h]);
92
93
  return C(() => ({
93
- width: Math.floor(d),
94
+ width: Math.floor(i),
94
95
  mobileHide: !0,
95
96
  isOperationCol: !0,
96
97
  title: "操作",
@@ -99,23 +100,22 @@ function D(n) {
99
100
  dataIndex: "operationCol",
100
101
  className: "operationCol",
101
102
  disabled: !0,
102
- render: (x, f, r) => {
103
- const a = s(f, r).filter(
104
- (c) => c.type != "detail"
103
+ render: (g, c, m) => {
104
+ const u = l(c, m).filter(
105
+ (o) => o.type != "detail"
105
106
  );
106
107
  return /* @__PURE__ */ t.jsx(
107
- z,
108
+ R,
108
109
  {
109
- loading: m,
110
- actionGroup: a,
111
- refInstance: o
110
+ actionGroup: u,
111
+ refInstance: a
112
112
  }
113
113
  );
114
114
  },
115
- ...h
116
- }), [d, o, m, s]);
115
+ ...r
116
+ }), [i, a, l]);
117
117
  }
118
118
  export {
119
- z as BitzTableAction,
120
- D as default
119
+ R as BitzTableAction,
120
+ q as default
121
121
  };
@@ -1,10 +1,9 @@
1
- import { BitzDropdownToButtonProps } from '@/components/BitzConvert';
2
- import { ButtonProps as AntButtonProps } from 'antd';
1
+ import { ButtonProps as AntButtonProps, DropdownProps } from 'antd';
3
2
  import { FC } from 'react';
4
3
  type BitzSelectionBarButtonProps = Omit<AntButtonProps, 'type' | 'className'>;
5
4
  /** SelectionBar的普通按钮 */
6
5
  declare const BitzSelectionBarButton: FC<BitzSelectionBarButtonProps>;
7
- interface BitzSelectionBarDropdownButtonProps extends BitzDropdownToButtonProps {
6
+ interface BitzSelectionBarDropdownButtonProps extends DropdownProps {
8
7
  }
9
8
  /** SelectionBar的下拉菜单按钮,当items的长度为 1 时自动转为普通按钮 */
10
9
  declare const BitzSelectionBarDropdownButton: FC<BitzSelectionBarDropdownButtonProps>;
@@ -1,40 +1,34 @@
1
1
  import { j as s } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import a from "../../BitzButton/index.mjs";
3
- import d from "../../BitzConvert/index.mjs";
4
- import { Space as x } from "antd";
5
- import { useMemo as h } from "react";
2
+ import n from "../../BitzButton/index.mjs";
3
+ import { Dropdown as p, Space as l } from "antd";
4
+ import { useMemo as m } from "react";
6
5
  import c from "./style.mjs";
7
- import j from "../Dropdown/style.mjs";
8
- import m from "../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/CaretDownOutlined.mjs";
9
- const l = (t, o) => t == null ? void 0 : t.map((e) => {
6
+ import d from "../Dropdown/style.mjs";
7
+ import x from "../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/CaretDownOutlined.mjs";
8
+ const a = (t, o) => t == null ? void 0 : t.map((e) => {
10
9
  const r = { ...e };
11
- return r != null && r.children && (r.children = l(r == null ? void 0 : r.children, o), r.popupClassName = o), r;
12
- }), b = ({
10
+ return r != null && r.children && (r.children = a(r == null ? void 0 : r.children, o), r.popupClassName = o), r;
11
+ }), y = ({
13
12
  ...t
14
13
  }) => {
15
14
  const { btnClassName: o } = c();
16
- return /* @__PURE__ */ s.jsx(a, { className: o, type: "text", ...t });
17
- }, w = ({ menu: t, children: o, showTootip: e, tipText: r }) => {
18
- const { btnClassName: p } = c(), { popupClassName: i } = j(), n = h(() => l(t == null ? void 0 : t.items, i), [t == null ? void 0 : t.items]);
15
+ return /* @__PURE__ */ s.jsx(n, { className: o, type: "text", ...t });
16
+ }, S = ({ menu: t, children: o }) => {
17
+ const { btnClassName: e } = c(), { popupClassName: r } = d(), i = m(() => a(t == null ? void 0 : t.items, r), [t == null ? void 0 : t.items]);
19
18
  return /* @__PURE__ */ s.jsx(
20
- d.DropdownToButton,
19
+ p,
21
20
  {
22
- menu: { ...t, items: n },
23
- overlayClassName: i,
21
+ menu: { ...t, items: i },
22
+ overlayClassName: r,
24
23
  trigger: ["click"],
25
- showTootip: e,
26
- tipText: r,
27
- children: /* @__PURE__ */ s.jsx(a, { className: p, type: "text", children: /* @__PURE__ */ s.jsxs(x, { size: 2, children: [
28
- (t == null ? void 0 : t.items) && t.items.length > 1 && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
29
- /* @__PURE__ */ s.jsx("span", { children: o }),
30
- /* @__PURE__ */ s.jsx(m, {})
31
- ] }),
32
- (t == null ? void 0 : t.items) && t.items.length === 1 && /* @__PURE__ */ s.jsx("span", { children: t.items[0].label })
24
+ children: /* @__PURE__ */ s.jsx(n, { className: e, type: "text", children: /* @__PURE__ */ s.jsxs(l, { size: 2, children: [
25
+ /* @__PURE__ */ s.jsx("span", { children: o }),
26
+ /* @__PURE__ */ s.jsx(x, {})
33
27
  ] }) })
34
28
  }
35
29
  );
36
30
  };
37
31
  export {
38
- b as BitzSelectionBarButton,
39
- w as BitzSelectionBarDropdownButton
32
+ y as BitzSelectionBarButton,
33
+ S as BitzSelectionBarDropdownButton
40
34
  };
@@ -1,11 +1,12 @@
1
- import { j as s } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import d from "../../BitzButton/index.mjs";
1
+ import { j as e } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import j from "../../BitzButton/index.mjs";
3
3
  import { Space as t, Flex as l } from "antd";
4
- import j from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
5
- import { useMemo as h } from "react";
6
- import C from "./style.mjs";
7
- const B = ({
8
- show: e,
4
+ import f from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
5
+ import { useContext as C, useMemo as h, useEffect as u } from "react";
6
+ import { BitzTableContext as N } from "../Store/index.mjs";
7
+ import g from "./style.mjs";
8
+ const E = ({
9
+ show: s,
9
10
  num: a,
10
11
  onClear: r,
11
12
  children: n
@@ -16,21 +17,23 @@ const B = ({
16
17
  btnClassName: c,
17
18
  batchOperationClassName: m,
18
19
  alertContentClassName: p
19
- } = C(), x = h(() => j(i, {
20
- [`${o}`]: e
21
- }), [e]);
22
- return /* @__PURE__ */ s.jsxs("div", { className: x, children: [
23
- /* @__PURE__ */ s.jsx(t.Compact, { className: m, children: n || /* @__PURE__ */ s.jsx("div", {}) }),
24
- /* @__PURE__ */ s.jsxs(l, { gap: 7, className: p, children: [
25
- /* @__PURE__ */ s.jsxs(l, { gap: 20, align: "center", children: [
26
- /* @__PURE__ */ s.jsxs(t, { size: 10, children: [
27
- /* @__PURE__ */ s.jsx("span", { children: "已选中" }),
28
- /* @__PURE__ */ s.jsx("strong", { children: a ?? 0 })
20
+ } = g(), { setSelected: x } = C(N), d = h(() => f(i, {
21
+ [`${o}`]: s
22
+ }), [s]);
23
+ return u(() => {
24
+ x(s ?? !1);
25
+ }, [s]), /* @__PURE__ */ e.jsxs("div", { className: d, children: [
26
+ /* @__PURE__ */ e.jsx(t.Compact, { className: m, children: n || /* @__PURE__ */ e.jsx("div", {}) }),
27
+ /* @__PURE__ */ e.jsxs(l, { gap: 7, className: p, children: [
28
+ /* @__PURE__ */ e.jsxs(l, { gap: 20, align: "center", children: [
29
+ /* @__PURE__ */ e.jsxs(t, { size: 10, children: [
30
+ /* @__PURE__ */ e.jsx("span", { children: "已选中" }),
31
+ /* @__PURE__ */ e.jsx("strong", { children: a ?? 0 })
29
32
  ] }),
30
- /* @__PURE__ */ s.jsx("span", { style: { verticalAlign: "-0.14em" }, children: "/" })
33
+ /* @__PURE__ */ e.jsx("span", { style: { verticalAlign: "-0.14em" }, children: "/" })
31
34
  ] }),
32
- /* @__PURE__ */ s.jsx(
33
- d,
35
+ /* @__PURE__ */ e.jsx(
36
+ j,
34
37
  {
35
38
  type: "text",
36
39
  className: c,
@@ -43,5 +46,5 @@ const B = ({
43
46
  ] });
44
47
  };
45
48
  export {
46
- B as default
49
+ E as default
47
50
  };
@@ -39,21 +39,36 @@ export interface StylesStateType<TableKey = any> {
39
39
  onlineChange?: (key: TableKey, state: StylesConfigOnChangeValue) => void;
40
40
  onlineGet?: (key: TableKey) => Promise<StylesConfigProps | null | undefined>;
41
41
  }
42
- export interface ExportConfigProps {
42
+ export interface ExportFieldsConfigProps extends Omit<ColumnsConfigProps, 'fixed' | 'order'> {
43
43
  field: string;
44
44
  title: string;
45
- show: boolean;
45
+ }
46
+ export type ExportResultConfigKeyType = 'current' | 'any' | 'all';
47
+ export type ExportResultExprotKeyType = ExportResultConfigKeyType | 'selectedRows';
48
+ export type ExportResultConfigType = 'config' | 'export';
49
+ export type ExportResultKeyType<T extends ExportResultConfigType> = T extends 'config' ? ExportResultConfigKeyType : ExportResultExprotKeyType;
50
+ export interface ExportResultConfigProps<T extends ExportResultConfigType> {
51
+ key: ExportResultKeyType<T>;
52
+ info?: {
53
+ type: 'page' | 'pieces';
54
+ value: number;
55
+ };
56
+ }
57
+ export interface ExportConfigProps<T extends ExportResultConfigType = 'config'> {
58
+ fields: ExportFieldsConfigProps[];
59
+ config: ExportResultConfigProps<T>;
46
60
  }
47
61
  export interface ExportColumnStateType<TableKey = any> {
48
62
  persistenceType?: 'localStorage' | 'sessionStorage' | 'online';
49
63
  persistenceKey?: TableKey;
50
- defaultValue?: ExportConfigProps[];
51
- value?: ExportConfigProps[];
52
- onChange?: (val: ExportConfigProps[]) => void;
53
- onlineChange?: (key: TableKey, state: ExportConfigProps[]) => void;
54
- onlineGet?: (key: TableKey) => Promise<ExportConfigProps[] | null | undefined>;
64
+ defaultValue?: ExportConfigProps;
65
+ value?: ExportConfigProps;
66
+ onChange?: (val: ExportConfigProps) => void;
67
+ onlineChange?: (key: TableKey, state: ExportConfigProps) => void;
68
+ onlineGet?: (key: TableKey) => Promise<ExportConfigProps | null | undefined>;
55
69
  }
56
70
  export type UseContainerProps<T = any> = {
71
+ loading?: boolean;
57
72
  /** 列配置 */
58
73
  columnsStateMap?: Record<string, ColumnsConfigProps>;
59
74
  onColumnsStateChange?: (map: Record<string, ColumnsConfigProps>) => void;
@@ -72,19 +87,22 @@ export type UseContainerProps<T = any> = {
72
87
  defaultBordered?: BitzTableBorderedType;
73
88
  /** 导出配置 */
74
89
  exportConfigState?: ExportColumnStateType;
75
- defaultExportConfig?: ExportConfigProps[];
76
- exportConfig?: ExportConfigProps[];
77
- onExportConfigChange?: (value: ExportConfigProps[]) => void;
90
+ defaultExportConfig?: ExportConfigProps;
91
+ exportConfig?: ExportConfigProps;
92
+ onExportConfigChange?: (value: ExportConfigProps) => void;
78
93
  rowHoverable?: boolean;
79
94
  };
80
95
  declare function useContainer(props: UseContainerProps): {
96
+ loading: boolean;
81
97
  uuid: string;
98
+ fullscreen: boolean;
99
+ setFullscreen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
100
+ selected: boolean;
101
+ setSelected: import("react").Dispatch<import("react").SetStateAction<boolean>>;
82
102
  columns: BitzTableColumnsType<any> | undefined;
83
103
  persistenceType: "online" | "localStorage" | "sessionStorage" | undefined;
84
104
  persistenceKey: any;
85
105
  onlineChange: ((key: any, ColumnsState: Record<string, ColumnsConfigProps>) => void) | undefined;
86
- sortKeyColumns: string[];
87
- setSortKeyColumns: (keys: string[]) => void;
88
106
  columnsMap: Record<string, ColumnsConfigProps>;
89
107
  setColumnsMap: (updater: Record<string, ColumnsConfigProps> | ((origin: Record<string, ColumnsConfigProps>) => Record<string, ColumnsConfigProps>), ignoreDestroy?: boolean | undefined) => void;
90
108
  defaultColumnKeyMap: Record<string, ColumnsConfigProps>;
@@ -98,12 +116,12 @@ declare function useContainer(props: UseContainerProps): {
98
116
  onlineStylesConfigChange: ((key: any, state: StylesConfigOnChangeValue) => void) | undefined;
99
117
  clearStylesConfigCache: () => void;
100
118
  defaultTableStylesConfig: StylesConfigProps;
101
- exportConfig: ExportConfigProps[];
102
- setTableExportConfig: (updater: ExportConfigProps[] | ((origin: ExportConfigProps[]) => ExportConfigProps[]), ignoreDestroy?: boolean | undefined) => void;
103
- defaultTableExportConfig: ExportConfigProps[];
119
+ exportConfig: ExportConfigProps<"config">;
120
+ setTableExportConfig: (updater: ExportConfigProps<"config"> | ((origin: ExportConfigProps<"config">) => ExportConfigProps<"config">), ignoreDestroy?: boolean | undefined) => void;
121
+ defaultTableExportConfig: ExportConfigProps<"config">;
104
122
  exportStorageType: "online" | "localStorage" | "sessionStorage" | undefined;
105
123
  exportStorageKey: any;
106
- onlineExportConfigChange: ((key: any, state: ExportConfigProps[]) => void) | undefined;
124
+ onlineExportConfigChange: ((key: any, state: ExportConfigProps<"config">) => void) | undefined;
107
125
  clearExportConfigCache: () => void;
108
126
  zebra: boolean | undefined;
109
127
  rowHoverable: boolean;
@@ -111,13 +129,16 @@ declare function useContainer(props: UseContainerProps): {
111
129
  hideRowBorder: boolean;
112
130
  };
113
131
  declare const BitzTableContext: import("react").Context<{
132
+ loading: boolean;
114
133
  uuid: string;
134
+ fullscreen: boolean;
135
+ setFullscreen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
136
+ selected: boolean;
137
+ setSelected: import("react").Dispatch<import("react").SetStateAction<boolean>>;
115
138
  columns: BitzTableColumnsType<any> | undefined;
116
139
  persistenceType: "online" | "localStorage" | "sessionStorage" | undefined;
117
140
  persistenceKey: any;
118
141
  onlineChange: ((key: any, ColumnsState: Record<string, ColumnsConfigProps>) => void) | undefined;
119
- sortKeyColumns: string[];
120
- setSortKeyColumns: (keys: string[]) => void;
121
142
  columnsMap: Record<string, ColumnsConfigProps>;
122
143
  setColumnsMap: (updater: Record<string, ColumnsConfigProps> | ((origin: Record<string, ColumnsConfigProps>) => Record<string, ColumnsConfigProps>), ignoreDestroy?: boolean | undefined) => void;
123
144
  defaultColumnKeyMap: Record<string, ColumnsConfigProps>;
@@ -131,12 +152,12 @@ declare const BitzTableContext: import("react").Context<{
131
152
  onlineStylesConfigChange: ((key: any, state: StylesConfigOnChangeValue) => void) | undefined;
132
153
  clearStylesConfigCache: () => void;
133
154
  defaultTableStylesConfig: StylesConfigProps;
134
- exportConfig: ExportConfigProps[];
135
- setTableExportConfig: (updater: ExportConfigProps[] | ((origin: ExportConfigProps[]) => ExportConfigProps[]), ignoreDestroy?: boolean | undefined) => void;
136
- defaultTableExportConfig: ExportConfigProps[];
155
+ exportConfig: ExportConfigProps<"config">;
156
+ setTableExportConfig: (updater: ExportConfigProps<"config"> | ((origin: ExportConfigProps<"config">) => ExportConfigProps<"config">), ignoreDestroy?: boolean | undefined) => void;
157
+ defaultTableExportConfig: ExportConfigProps<"config">;
137
158
  exportStorageType: "online" | "localStorage" | "sessionStorage" | undefined;
138
159
  exportStorageKey: any;
139
- onlineExportConfigChange: ((key: any, state: ExportConfigProps[]) => void) | undefined;
160
+ onlineExportConfigChange: ((key: any, state: ExportConfigProps) => void) | undefined;
140
161
  clearExportConfigCache: () => void;
141
162
  zebra: boolean | undefined;
142
163
  rowHoverable: boolean;