bitz-react-admin-ui 1.9.3 → 1.9.6

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.
@@ -1,38 +1,39 @@
1
1
  const u = ({
2
2
  height: v,
3
3
  evenRowBgColor: w,
4
- colorBgContainer: R,
4
+ colorBgContainer: e,
5
5
  table: o,
6
- gap: I
6
+ gap: I,
7
+ borderColor: R
7
8
  }) => {
8
- var h, i, g, r, x, n, T, d, p, s, $, H, m, C, S, k, f, z, B, c;
9
+ var h, i, g, x, r, n, T, p, s, d, $, H, m, S, C, k, f, z, B, c;
9
10
  return {
10
11
  height: v,
11
12
  "--toolbar-bgColor": o == null ? void 0 : o.toolbarBgColor,
12
13
  "--thead-bgColor": o == null ? void 0 : o.headerBg,
13
14
  "--thead-hoverBgColor": o == null ? void 0 : o.headerSortHoverBg,
14
15
  "--evenRow-BgColor": w,
15
- "--oddRow-BgColor": R,
16
+ "--oddRow-BgColor": e,
16
17
  "--radioCheckbox-borderColor": o == null ? void 0 : o.radioCheckboxBorderColor,
17
18
  "--expandIcon-borderColor": o == null ? void 0 : o.expandIconBorderColor,
18
19
  "--rowHover-bgColor": o == null ? void 0 : o.rowHoverBg,
19
- "--tbodyRow-borderColor": o == null ? void 0 : o.borderColor,
20
+ "--borderColor": R,
20
21
  "--container-gap": `${I}px`,
21
22
  "--xlTable-fontSize": `${(h = o == null ? void 0 : o.xlTable) == null ? void 0 : h.fontSize}px`,
22
23
  "--lgTable-fontSize": `${(i = o == null ? void 0 : o.lgTable) == null ? void 0 : i.fontSize}px`,
23
24
  "--mdTable-fontSize": `${(g = o == null ? void 0 : o.mdTable) == null ? void 0 : g.fontSize}px`,
24
- "--smTable-fontSize": `${(r = o == null ? void 0 : o.smTable) == null ? void 0 : r.fontSize}px`,
25
- "--xsTable-fontSize": `${(x = o == null ? void 0 : o.xsTable) == null ? void 0 : x.fontSize}px`,
25
+ "--smTable-fontSize": `${(x = o == null ? void 0 : o.smTable) == null ? void 0 : x.fontSize}px`,
26
+ "--xsTable-fontSize": `${(r = o == null ? void 0 : o.xsTable) == null ? void 0 : r.fontSize}px`,
26
27
  "--xlTable-height": `${(n = o == null ? void 0 : o.xlTable) == null ? void 0 : n.height}px`,
27
28
  "--lgTable-height": `${(T = o == null ? void 0 : o.lgTable) == null ? void 0 : T.height}px`,
28
- "--mdTable-height": `${(d = o == null ? void 0 : o.mdTable) == null ? void 0 : d.height}px`,
29
- "--smTable-height": `${(p = o == null ? void 0 : o.smTable) == null ? void 0 : p.height}px`,
30
- "--xsTable-height": `${(s = o == null ? void 0 : o.xsTable) == null ? void 0 : s.height}px`,
29
+ "--mdTable-height": `${(p = o == null ? void 0 : o.mdTable) == null ? void 0 : p.height}px`,
30
+ "--smTable-height": `${(s = o == null ? void 0 : o.smTable) == null ? void 0 : s.height}px`,
31
+ "--xsTable-height": `${(d = o == null ? void 0 : o.xsTable) == null ? void 0 : d.height}px`,
31
32
  "--xlTable-lineHeight": `${($ = o == null ? void 0 : o.xlTable) == null ? void 0 : $.lineHeight}px`,
32
33
  "--lgTable-lineHeight": `${(H = o == null ? void 0 : o.lgTable) == null ? void 0 : H.lineHeight}px`,
33
34
  "--mdTable-lineHeight": `${(m = o == null ? void 0 : o.mdTable) == null ? void 0 : m.lineHeight}px`,
34
- "--smTable-lineHeight": `${(C = o == null ? void 0 : o.smTable) == null ? void 0 : C.lineHeight}px`,
35
- "--xsTable-lineHeight": `${(S = o == null ? void 0 : o.xsTable) == null ? void 0 : S.lineHeight}px`,
35
+ "--smTable-lineHeight": `${(S = o == null ? void 0 : o.smTable) == null ? void 0 : S.lineHeight}px`,
36
+ "--xsTable-lineHeight": `${(C = o == null ? void 0 : o.xsTable) == null ? void 0 : C.lineHeight}px`,
36
37
  "--xlSkeleton-height": `${(k = o == null ? void 0 : o.xlTable) == null ? void 0 : k.skeletonHeight}px`,
37
38
  "--lgSkeleton-height": `${(f = o == null ? void 0 : o.lgTable) == null ? void 0 : f.skeletonHeight}px`,
38
39
  "--mdSkeleton-height": `${(z = o == null ? void 0 : o.mdTable) == null ? void 0 : z.skeletonHeight}px`,
@@ -0,0 +1,3 @@
1
+ import { BitzTableColumnsType } from '..';
2
+ /** 设置复选框列、展开列的位置 */
3
+ export declare function getColumnsWithTool<T>(sortCols: any, cols: any, rowSelection: any, expandable: any): BitzTableColumnsType<T>;
@@ -0,0 +1,18 @@
1
+ import { Table as e } from "antd";
2
+ const l = 0, t = 1;
3
+ function I(d, o, f, i) {
4
+ let x = l;
5
+ if (f) {
6
+ const n = d.indexOf(e.SELECTION_COLUMN);
7
+ n >= 0 && (x = n), o.splice(x, 0, e.SELECTION_COLUMN);
8
+ }
9
+ if (i) {
10
+ let n = 0;
11
+ const C = d.indexOf(e.EXPAND_COLUMN);
12
+ C >= 0 && (n = C), f && x === 0 && C === -1 && (n = t), o.splice(n, 0, e.EXPAND_COLUMN);
13
+ }
14
+ return o;
15
+ }
16
+ export {
17
+ I as getColumnsWithTool
18
+ };
@@ -7,8 +7,8 @@ import { TableContext as me } from "../../Store/index.mjs";
7
7
  import { genColumnKey as F, columnSort as de } from "../../Store/utils/index.mjs";
8
8
  import p from "../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
9
9
  import { DndContext as ue } from "../../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
10
- import { SortableContext as pe, verticalListSortingStrategy as he, arrayMove as xe } from "../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
11
- import fe from "./DndItem.mjs";
10
+ import { SortableContext as pe, verticalListSortingStrategy as fe, arrayMove as he } from "../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
11
+ import xe from "./DndItem.mjs";
12
12
  import { restrictToVerticalAxis as be, restrictToWindowEdges as ye } from "../../../../node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
13
13
  import P from "../../../BitzButton/index.mjs";
14
14
  import { useImmer as Ce } from "../../../../node_modules/.store/use-immer@0.9.0/node_modules/use-immer/dist/use-immer.module.mjs";
@@ -18,7 +18,7 @@ import "./index.less.mjs";
18
18
  import W from "../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
19
19
  import ke from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
20
20
  import ge from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
21
- const $e = oe(({ onChange: f }) => {
21
+ const $e = oe(({ onChange: x }) => {
22
22
  var _, E, z, H;
23
23
  const { token: i } = je.useToken(), b = se(), [j, k] = N(null), [$, K] = N(!1), [q, w] = N(!1), [a, y] = Ce({
24
24
  columnsMap: {},
@@ -43,7 +43,7 @@ const $e = oe(({ onChange: f }) => {
43
43
  y((e) => {
44
44
  e.columnsMap = { ...l.defaultColumnKeyMap };
45
45
  });
46
- }, []), h = M(() => {
46
+ }, []), f = M(() => {
47
47
  var s, n;
48
48
  const e = [];
49
49
  return (s = l == null ? void 0 : l.columns) != null && s.length && ((n = l == null ? void 0 : l.columns) == null || n.map(({ key: u, dataIndex: t, ...m }) => {
@@ -95,7 +95,7 @@ const $e = oe(({ onChange: f }) => {
95
95
  t.columnsMap = { ...n };
96
96
  });
97
97
  }, Z = (e, s) => {
98
- const n = { ...a.columnsMap }, u = xe(a.sortKeyColumns, e, s);
98
+ const n = { ...a.columnsMap }, u = he(a.sortKeyColumns, e, s);
99
99
  u.forEach((t, m) => {
100
100
  n[t] = { ...n[t] || {}, order: m };
101
101
  }), w(!0), y((t) => {
@@ -103,27 +103,28 @@ const $e = oe(({ onChange: f }) => {
103
103
  });
104
104
  }, ee = () => {
105
105
  var e;
106
- L(a.columnsMap), U(a.sortKeyColumns), G === "online" && B && (g == null || g(B, a.columnsMap)), f ? (K(!0), (e = f == null ? void 0 : f(a.columnsMap)) == null || e.finally(() => {
106
+ L(a.columnsMap), U(a.sortKeyColumns), G === "online" && B && (g == null || g(B, a.columnsMap)), x ? (K(!0), (e = x == null ? void 0 : x(a.columnsMap)) == null || e.finally(() => {
107
107
  K(!1), b.hide();
108
108
  })) : b.hide();
109
109
  }, I = () => {
110
110
  b.hide();
111
- }, x = M(() => i.mode === "dark", [i.mode]);
111
+ }, h = M(() => i.mode === "dark", [i.mode]);
112
112
  return /* @__PURE__ */ o.jsxs(
113
113
  le,
114
114
  {
115
115
  className: "tableColumnSettingModal",
116
116
  title: /* @__PURE__ */ o.jsx(ne.Title, { style: { fontSize: 16, margin: 0 }, children: "列设置" }),
117
+ getContainer: !1,
117
118
  ...te(b),
118
119
  style: {
119
120
  "--modalContent-bgColor": (_ = i.Modal) == null ? void 0 : _.contentBg,
120
121
  "--header-bgColor": (E = i.Modal) == null ? void 0 : E.headerBg,
121
122
  "--footer-bgColor": (z = i.Modal) == null ? void 0 : z.footerBg,
122
- "--blockTitle-colorBg": x ? "#333" : "#fff",
123
- "--leftBody-bgColor": x ? "#262626" : "#e0e0e0",
124
- "--rightBody-bgColor": x ? "#262626" : "#fff",
125
- "--checked": x ? "#303030" : "#eee",
126
- "--block-bgColor": x ? "#222" : "#fff",
123
+ "--blockTitle-colorBg": h ? "#333" : "#fff",
124
+ "--leftBody-bgColor": h ? "#262626" : "#e0e0e0",
125
+ "--rightBody-bgColor": h ? "#262626" : "#fff",
126
+ "--checked": h ? "#303030" : "#eee",
127
+ "--block-bgColor": h ? "#222" : "#fff",
127
128
  "--colorText": i.colorText,
128
129
  "--colorText-desc": i.colorTextDescription,
129
130
  "--colorBorder": i.colorBorder
@@ -228,9 +229,9 @@ const $e = oe(({ onChange: f }) => {
228
229
  children: /* @__PURE__ */ o.jsx(
229
230
  pe,
230
231
  {
231
- items: h == null ? void 0 : h.map((e) => e.key),
232
- strategy: he,
233
- children: /* @__PURE__ */ o.jsx("ul", { className: r.content, children: h == null ? void 0 : h.map((e) => /* @__PURE__ */ o.jsx(fe, { item: e }, e.key)) })
232
+ items: f == null ? void 0 : f.map((e) => e.key),
233
+ strategy: fe,
234
+ children: /* @__PURE__ */ o.jsx("ul", { className: r.content, children: f == null ? void 0 : f.map((e) => /* @__PURE__ */ o.jsx(xe, { item: e }, e.key)) })
234
235
  }
235
236
  )
236
237
  }
@@ -1,25 +1,24 @@
1
- import { j as o } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { memo as d, useContext as k } from "react";
3
- import { Tooltip as b } from "antd";
4
- import { TableContext as g } from "../../Store/index.mjs";
5
- import j from "../style.mjs";
6
- import h from "../../../BitzButton/index.mjs";
7
- import C from "../../Dropdown/index.mjs";
8
- import w from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/ColumnHeightOutlined.mjs";
9
- const z = (e) => {
10
- const { order: s, show: c = !0, icon: a = /* @__PURE__ */ o.jsx(w, {}) } = e, {
11
- sizeStorageType: y,
12
- sizeStorageKey: i,
13
- onlineSizeChange: l,
14
- tableSize: m,
15
- setTableSize: n
16
- } = k(g), { toolbarItemClassName: f } = j(), u = {
17
- selectedKeys: [m],
18
- onClick: (x) => {
19
- var r;
20
- const { key: t } = x;
21
- t !== m && (n == null || n(t), y === "online" && i && (l == null || l(i, t)), (r = e == null ? void 0 : e.onChange) == null || r.call(e, t));
22
- },
1
+ import { j as l } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { memo as k, useContext as g } from "react";
3
+ import { Tooltip as h } from "antd";
4
+ import { TableContext as j } from "../../Store/index.mjs";
5
+ import z from "../style.mjs";
6
+ import C from "../../../BitzButton/index.mjs";
7
+ import S from "../../Dropdown/index.mjs";
8
+ import D from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/ColumnHeightOutlined.mjs";
9
+ const I = ({ defaultSize: e, items: n }) => n.map((t) => t.key === e ? {
10
+ ...t,
11
+ label: `${t.label}(默认)`
12
+ } : t), w = (e) => {
13
+ const { order: n, show: t = !0, icon: c = /* @__PURE__ */ l.jsx(D, {}) } = e, {
14
+ sizeStorageType: u,
15
+ sizeStorageKey: m,
16
+ onlineSizeChange: i,
17
+ defaultTableSize: f,
18
+ tableSize: s,
19
+ setTableSize: r
20
+ } = g(j), { toolbarItemClassName: y } = z(), d = I({
21
+ defaultSize: f,
23
22
  items: [
24
23
  {
25
24
  key: "xl",
@@ -27,7 +26,7 @@ const z = (e) => {
27
26
  },
28
27
  {
29
28
  key: "lg",
30
- label: "宽松(默认)"
29
+ label: "宽松"
31
30
  },
32
31
  {
33
32
  key: "md",
@@ -42,18 +41,26 @@ const z = (e) => {
42
41
  label: "特紧凑"
43
42
  }
44
43
  ]
44
+ }), x = {
45
+ selectedKeys: [s],
46
+ onClick: (b) => {
47
+ var a;
48
+ const { key: o } = b;
49
+ o !== s && (r == null || r(o), u === "online" && m && (i == null || i(m, o)), (a = e == null ? void 0 : e.onChange) == null || a.call(e, o));
50
+ },
51
+ items: d
45
52
  };
46
- return c ? /* @__PURE__ */ o.jsx(C, { menu: u, trigger: ["click"], children: /* @__PURE__ */ o.jsx(b, { title: "表格密度", open: !1, children: /* @__PURE__ */ o.jsx(
47
- h,
53
+ return t ? /* @__PURE__ */ l.jsx(S, { menu: x, trigger: ["click"], children: /* @__PURE__ */ l.jsx(h, { title: "表格密度", open: !1, children: /* @__PURE__ */ l.jsx(
54
+ C,
48
55
  {
49
- style: { order: s },
56
+ style: { order: n },
50
57
  type: "text",
51
- className: f,
52
- icon: a,
58
+ className: y,
59
+ icon: c,
53
60
  children: "表格密度"
54
61
  }
55
62
  ) }) }) : null;
56
- }, G = d(z);
63
+ }, O = k(w);
57
64
  export {
58
- G as default
65
+ O as default
59
66
  };
@@ -1,56 +1,46 @@
1
- import { j as o } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { memo as p, useState as x, useMemo as b, useEffect as E } from "react";
3
- import { Tooltip as B } from "antd";
4
- import F from "../style.mjs";
5
- import j from "../../../BitzButton/index.mjs";
6
- import c from "../../../../node_modules/.store/screenfull@6.0.2/node_modules/screenfull/index.mjs";
7
- import h from "../../../BitzToast/index.mjs";
8
- import v from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/FullscreenExitOutlined.mjs";
9
- import z from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/FullscreenOutlined.mjs";
10
- function m(t, n) {
11
- if (t.classList.contains(n))
12
- return t;
13
- var r = t.parentNode;
14
- if (r) {
15
- var e = m(r, n);
16
- if (e)
17
- return e;
18
- }
19
- return null;
20
- }
21
- const L = ({
22
- order: t,
23
- show: n = !0
1
+ import { j as t } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { memo as d, useState as p, useMemo as x, useEffect as b } from "react";
3
+ import { Tooltip as E } from "antd";
4
+ import B from "../style.mjs";
5
+ import F from "../../../BitzButton/index.mjs";
6
+ import r from "../../../../node_modules/.store/screenfull@6.0.2/node_modules/screenfull/index.mjs";
7
+ import j from "../../../BitzToast/index.mjs";
8
+ import { findParentFirstNodeByClass as h } from "../../../../utils/findNode.mjs";
9
+ import z from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/FullscreenExitOutlined.mjs";
10
+ import T from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/FullscreenOutlined.mjs";
11
+ const g = ({
12
+ order: m,
13
+ show: u = !0
24
14
  }) => {
25
- const { toolbarItemClassName: r } = F(), [e, u] = x(!1), s = b(() => e ? {
15
+ const { toolbarItemClassName: a } = B(), [l, s] = p(!1), n = x(() => l ? {
26
16
  title: "退出全屏",
27
- icon: /* @__PURE__ */ o.jsx(v, {})
17
+ icon: /* @__PURE__ */ t.jsx(z, {})
28
18
  } : {
29
19
  title: "全屏",
30
- icon: /* @__PURE__ */ o.jsx(z, {})
31
- }, [e]);
32
- E(() => (document == null || document.addEventListener("fullscreenchange", (i) => {
33
- var l, a, f;
34
- (l = i.target) != null && l.classList.contains("bitzTableBlock") && (u(!!document.fullscreenElement), (f = (a = document.fullscreenElement) == null ? void 0 : a.classList) != null && f.contains("bitzTableBlock") || u(!1));
20
+ icon: /* @__PURE__ */ t.jsx(T, {})
21
+ }, [l]);
22
+ b(() => (document == null || document.addEventListener("fullscreenchange", (o) => {
23
+ var e, i, c;
24
+ (e = o.target) != null && e.classList.contains("bitzTableBlock") && (s(!!document.fullscreenElement), (c = (i = document.fullscreenElement) == null ? void 0 : i.classList) != null && c.contains("bitzTableBlock") || s(!1));
35
25
  }), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
36
26
  })), []);
37
- const d = (i) => {
38
- c.isEnabled || h.error("您的浏览器不支持全屏");
39
- const l = m(i.target, "bitzTableBlock");
40
- e ? c.exit() : c.request(l);
27
+ const f = (o) => {
28
+ r.isEnabled || j.error("您的浏览器不支持全屏");
29
+ const e = h(o.target, "bitzTableBlock");
30
+ l ? r.exit() : r.request(e);
41
31
  };
42
- return n ? /* @__PURE__ */ o.jsx(B, { title: s.title, open: !1, children: /* @__PURE__ */ o.jsx(
43
- j,
32
+ return u ? /* @__PURE__ */ t.jsx(E, { title: n.title, open: !1, children: /* @__PURE__ */ t.jsx(
33
+ F,
44
34
  {
45
35
  type: "text",
46
- className: r,
47
- onClick: d,
48
- icon: s.icon,
49
- style: { order: t },
50
- children: s.title
36
+ className: a,
37
+ onClick: f,
38
+ icon: n.icon,
39
+ style: { order: m },
40
+ children: n.title
51
41
  }
52
42
  ) }) : null;
53
- }, q = p(L);
43
+ }, G = d(g);
54
44
  export {
55
- q as default
45
+ G as default
56
46
  };
@@ -1,75 +1,79 @@
1
- import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { memo as w, useContext as x, useMemo as l } from "react";
3
- import { Space as a } from "antd";
1
+ import { j as s } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { memo as a, useContext as C, useMemo as h } from "react";
3
+ import { Space as g } from "antd";
4
4
  import u from "../RefreshIcon/index.mjs";
5
- import C from "../ColConfigIcon/index.mjs";
6
- import g from "../DensityIcon/index.mjs";
7
- import j from "../FullscreenIcon/index.mjs";
8
- import z from "../ExportIcon/index.mjs";
9
- import { BitzConfigContext as I } from "../../../BitzConfigProvider/context.mjs";
10
- const B = [
5
+ import x from "../ColConfigIcon/index.mjs";
6
+ import j from "../DensityIcon/index.mjs";
7
+ import z from "../FullscreenIcon/index.mjs";
8
+ import I from "../ExportIcon/index.mjs";
9
+ import { BitzConfigContext as B } from "../../../BitzConfigProvider/context.mjs";
10
+ const E = [
11
11
  "export",
12
12
  "refresh",
13
13
  "size",
14
14
  "fullscreen",
15
15
  "colConfig"
16
- ], E = ({
16
+ ], T = ({
17
17
  size: k,
18
- tools: c,
19
- loading: f,
20
- onExport: i,
21
- onRefresh: h,
22
- onSizeChange: m,
18
+ tools: l,
19
+ exclude: t,
20
+ loading: i,
21
+ onExport: m,
22
+ onRefresh: c,
23
+ onSizeChange: p,
23
24
  onColumnChange: d
24
25
  }) => {
25
- const { Table: r } = x(I), s = l(() => c || (r == null ? void 0 : r.toolbar) || B, [r == null ? void 0 : r.toolbar]), o = l(() => {
26
- const t = {
26
+ const { Table: r } = C(B), f = h(() => {
27
+ const e = l || (r == null ? void 0 : r.toolbar) || E;
28
+ return t != null && t.length ? e.filter((n) => !t.includes(n)) : e;
29
+ }, [r == null ? void 0 : r.toolbar, t]), o = h(() => {
30
+ const e = {
27
31
  export: { order: 1, show: !1 },
28
32
  refresh: { order: 2, show: !1 },
29
33
  size: { order: 3, show: !1 },
30
34
  fullscreen: { order: 4, show: !1 },
31
35
  colConfig: { order: 5, show: !1 }
32
36
  };
33
- return s.forEach((n, p) => {
34
- t[n].order = p + 1, t[n].show = s.includes(n);
35
- }), t;
36
- }, [s]);
37
- return /* @__PURE__ */ e.jsxs(a.Compact, { style: { height: "100%" }, children: [
38
- /* @__PURE__ */ e.jsx(
39
- z,
37
+ return f.forEach((n, w) => {
38
+ e[n].order = w + 1, e[n].show = f.includes(n);
39
+ }), e;
40
+ }, [f]);
41
+ return /* @__PURE__ */ s.jsxs(g.Compact, { style: { height: "100%" }, children: [
42
+ /* @__PURE__ */ s.jsx(
43
+ I,
40
44
  {
41
45
  order: o.export.order,
42
46
  show: o.export.show,
43
- loading: f,
44
- onClick: i
47
+ loading: i,
48
+ onClick: m
45
49
  }
46
50
  ),
47
- /* @__PURE__ */ e.jsx(
51
+ /* @__PURE__ */ s.jsx(
48
52
  u,
49
53
  {
50
54
  order: o.refresh.order,
51
55
  show: o.refresh.show,
52
- loading: f,
53
- onClick: h
56
+ loading: i,
57
+ onClick: c
54
58
  }
55
59
  ),
56
- /* @__PURE__ */ e.jsx(
57
- g,
60
+ /* @__PURE__ */ s.jsx(
61
+ j,
58
62
  {
59
63
  order: o.size.order,
60
64
  show: o.size.show,
61
- onChange: m
65
+ onChange: p
62
66
  }
63
67
  ),
64
- /* @__PURE__ */ e.jsx(
65
- j,
68
+ /* @__PURE__ */ s.jsx(
69
+ z,
66
70
  {
67
71
  order: o.fullscreen.order,
68
72
  show: o.fullscreen.show
69
73
  }
70
74
  ),
71
- /* @__PURE__ */ e.jsx(
72
- C,
75
+ /* @__PURE__ */ s.jsx(
76
+ x,
73
77
  {
74
78
  order: o.colConfig.order,
75
79
  show: o.colConfig.show,
@@ -77,7 +81,7 @@ const B = [
77
81
  }
78
82
  )
79
83
  ] });
80
- }, A = w(E);
84
+ }, G = a(T);
81
85
  export {
82
- A as default
86
+ G as default
83
87
  };
@@ -5,7 +5,7 @@ import ColConfigIcon from './ColConfigIcon';
5
5
  import { DensitySize } from '../Store';
6
6
  import { MouseEventHandler } from 'react';
7
7
  import FullscreenIcon from './FullscreenIcon';
8
- import { ToolEnum } from '@/components/BitzConfigProvider/context';
8
+ import { ToolEnum } from '../../../components/BitzConfigProvider/context';
9
9
  import { ColumnsConfigProps } from '..';
10
10
  export type MenuKeysType = 'excel';
11
11
  export type ExportEvent = (key: MenuKeysType) => void;
@@ -13,6 +13,8 @@ export interface BitzTableToolBarProps {
13
13
  size?: DensitySize;
14
14
  /** 控制tool按钮的排序和显隐,根据索引排序,不在tools数组中的不显示 */
15
15
  tools?: ToolEnum[];
16
+ /** 需要隐藏的tool按钮 */
17
+ exclude?: ToolEnum[];
16
18
  loading?: boolean;
17
19
  /**
18
20
  * 导出按钮下拉菜单的点击事件,通过key值判断是导出为excel或其他格式的文件