bitz-react-admin-ui 1.6.6 → 1.6.8

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 (83) hide show
  1. package/dist/bitz-ui.mjs +126 -120
  2. package/dist/components/BitzFluentInput/index.mjs +17 -14
  3. package/dist/components/BitzFluentSelect/index.mjs +17 -15
  4. package/dist/components/BitzList/List.mjs +14 -0
  5. package/dist/components/BitzList/LoadMore.mjs +60 -0
  6. package/dist/components/BitzList/index.less.mjs +4 -0
  7. package/dist/components/BitzList/index.mjs +6 -0
  8. package/dist/components/BitzPullRefresh/PullRefresh.mjs +84 -0
  9. package/dist/components/BitzPullRefresh/index.mjs +6 -0
  10. package/dist/components/BitzPullRefresh/style/index.less.mjs +4 -0
  11. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +86 -74
  12. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +36 -0
  13. package/dist/components/BitzTable/ActionBar/Button.mjs +10 -0
  14. package/dist/components/BitzTable/ActionBar/index.mjs +6 -34
  15. package/dist/components/BitzTable/ActionBar/style.mjs +36 -27
  16. package/dist/components/BitzTable/ActionCol/index.mjs +18 -17
  17. package/dist/components/BitzTable/Table/index.mjs +154 -92
  18. package/dist/components/BitzTable/TableSkeleton/index.mjs +36 -32
  19. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.mjs +88 -99
  20. package/dist/components/BitzTable/ToolBar/ColConfigIcon/DndItem.mjs +20 -18
  21. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +8 -8
  22. package/dist/components/BitzTable/ToolBar/DensityIcon/index.mjs +7 -7
  23. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +13 -13
  24. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +5 -5
  25. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +7 -3
  26. package/dist/components/BitzTable/ToolBar/style.mjs +29 -20
  27. package/dist/hooks/use-event-listener.mjs +31 -0
  28. package/dist/hooks/use-lock-fn.mjs +18 -0
  29. package/dist/hooks/use-scroll-parent.mjs +32 -0
  30. package/dist/hooks/use-touch.mjs +33 -0
  31. package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +751 -1050
  32. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSetState/index.mjs +16 -0
  33. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useThrottleFn/index.mjs +28 -0
  34. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useUpdateEffect/index.mjs +6 -0
  35. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_Symbol.mjs +5 -0
  36. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseGetTag.mjs +11 -0
  37. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseTrim.mjs +9 -0
  38. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_freeGlobal.mjs +5 -0
  39. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_getRawTag.mjs +16 -0
  40. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_objectToString.mjs +8 -0
  41. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_root.mjs +5 -0
  42. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.mjs +10 -0
  43. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/debounce.mjs +55 -0
  44. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObject.mjs +8 -0
  45. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObjectLike.mjs +7 -0
  46. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isSymbol.mjs +10 -0
  47. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/now.mjs +7 -0
  48. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/throttle.mjs +19 -0
  49. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/toNumber.mjs +23 -0
  50. package/dist/node_modules/.store/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs +48 -37
  51. package/dist/node_modules/_clsx@2.1.0@clsx/dist/clsx.mjs +23 -0
  52. package/dist/style.css +1 -1
  53. package/dist/type/bitz-ui.d.ts +2 -0
  54. package/dist/type/components/BitzList/List.d.ts +4 -0
  55. package/dist/type/components/BitzList/LoadMore.d.ts +4 -0
  56. package/dist/type/components/BitzList/PropsType.d.ts +35 -0
  57. package/dist/type/components/BitzList/index.d.ts +5 -0
  58. package/dist/type/components/BitzPagination/index.d.ts +8 -2
  59. package/dist/type/components/BitzPullRefresh/PropsType.d.ts +43 -0
  60. package/dist/type/components/BitzPullRefresh/PullRefresh.d.ts +4 -0
  61. package/dist/type/components/BitzPullRefresh/index.d.ts +5 -0
  62. package/dist/type/components/BitzSelect/component/BitzSelectMobile.d.ts +1 -0
  63. package/dist/type/components/BitzTable/ActionBar/ActionBar.d.ts +37 -0
  64. package/dist/type/components/BitzTable/ActionBar/Button.d.ts +6 -0
  65. package/dist/type/components/BitzTable/ActionBar/index.d.ts +6 -33
  66. package/dist/type/components/BitzTable/ActionBar/style.d.ts +2 -2
  67. package/dist/type/components/BitzTable/Store/index.d.ts +2 -3
  68. package/dist/type/components/BitzTable/Table/index.d.ts +2 -2
  69. package/dist/type/components/BitzTable/TableSkeleton/index.d.ts +1 -1
  70. package/dist/type/components/BitzTable/ToolBar/ExportIcon/index.d.ts +2 -1
  71. package/dist/type/components/BitzTable/ToolBar/style.d.ts +1 -2
  72. package/dist/type/components/BitzTable/index.d.ts +5 -1
  73. package/dist/type/hooks/use-event-listener.d.ts +11 -0
  74. package/dist/type/hooks/use-lock-fn.d.ts +2 -0
  75. package/dist/type/hooks/use-scroll-parent.d.ts +9 -0
  76. package/dist/type/hooks/use-touch.d.ts +18 -0
  77. package/dist/type/pages/Login2/useRowSelection.d.ts +6 -4
  78. package/dist/type/pages/Test/index.d.ts +3 -0
  79. package/dist/type/utils/get-default-props.d.ts +2 -0
  80. package/dist/type/utils/scroll.d.ts +6 -0
  81. package/dist/utils/get-default-props.mjs +12 -0
  82. package/dist/utils/scroll.mjs +15 -0
  83. package/package.json +2 -1
@@ -1,104 +1,116 @@
1
- import { j as t } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { useState as v, useRef as B, useEffect as V } from "react";
3
- import { BitzPickDrawer as M } from "../../BitzDrawer/index.mjs";
4
- import { Tag as S, Input as k, Space as R } from "antd";
5
- import C from "../../../node_modules/.store/@better-scroll_core@2.5.1/node_modules/@better-scroll/core/dist/core.esm.mjs";
6
- import F from "../../../node_modules/.store/@better-scroll_wheel@2.5.1/node_modules/@better-scroll/wheel/dist/wheel.esm.mjs";
7
- import s from "./index.module.less.mjs";
8
- import { useImmer as N } from "../../../node_modules/.store/use-immer@0.9.0/node_modules/use-immer/dist/use-immer.module.mjs";
9
- import I from "../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/DownOutlined.mjs";
10
- C.use(F);
11
- const { Search: H } = k, X = ({ ...n }) => {
12
- const o = n.mode === "multiple" || n.mode === "tags", u = n.options || [], j = n.filterOption, [b, g] = v(() => {
1
+ import { j as a } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { useState as w, useRef as P, useEffect as D } from "react";
3
+ import { BitzPickDrawer as U } from "../../BitzDrawer/index.mjs";
4
+ import { Tag as z, Input as E, Space as q } from "antd";
5
+ import O from "../../../node_modules/.store/@better-scroll_core@2.5.1/node_modules/@better-scroll/core/dist/core.esm.mjs";
6
+ import A from "../../../node_modules/.store/@better-scroll_wheel@2.5.1/node_modules/@better-scroll/wheel/dist/wheel.esm.mjs";
7
+ import n from "./index.module.less.mjs";
8
+ import { useImmer as T } from "../../../node_modules/.store/use-immer@0.9.0/node_modules/use-immer/dist/use-immer.module.mjs";
9
+ import y from "../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/DownOutlined.mjs";
10
+ O.use(A);
11
+ const { Search: G } = E, te = ({ ...e }) => {
12
+ var C, k, g;
13
+ const u = e.mode === "multiple" || e.mode === "tags";
14
+ let b = [];
15
+ if (e != null && e.options && ((C = e == null ? void 0 : e.options) != null && C.length) && (e != null && e.fieldNames)) {
16
+ const l = (k = e == null ? void 0 : e.fieldNames) == null ? void 0 : k.label, t = (g = e == null ? void 0 : e.fieldNames) == null ? void 0 : g.value;
17
+ (e == null ? void 0 : e.options).map((s) => {
18
+ const c = {};
19
+ c.label = s[l], c.value = s[t], b.push(c);
20
+ });
21
+ } else
22
+ b = (e == null ? void 0 : e.options) || [];
23
+ const i = b, W = (l, t) => ((t == null ? void 0 : t.label) ?? "").toLowerCase().includes(l.toLowerCase()), m = e.value ?? e.defaultValue, S = e.filterOption || W, [N, $] = w(() => {
24
+ const l = i == null ? void 0 : i.findIndex((t) => t.value === m);
25
+ return l === -1 ? 0 : l;
26
+ }), [r, h] = T(() => {
13
27
  var l;
14
- const e = (l = n.options) == null ? void 0 : l.findIndex((r) => r.value === n.defaultValue);
15
- return e === -1 ? 0 : e;
16
- }), [c, x] = N(() => {
17
- var e, l;
18
- return o ? n.defaultValue : ((l = (e = n.options) == null ? void 0 : e.find((r) => r.value === n.defaultValue)) == null ? void 0 : l.value) || "";
19
- }), w = B(null), [p, m] = v(!1), [D, z] = v(""), [d, h] = N([]), O = () => {
20
- m(!1);
21
- }, T = () => {
22
- const e = n.onChange;
23
- if (o)
24
- x(d.map((l) => l.value)), e == null || e(d.map((l) => l.value));
28
+ return u ? m : ((l = i == null ? void 0 : i.find((t) => t.value === m)) == null ? void 0 : l.value) || "";
29
+ }), I = P(null), [j, x] = w(!1), [B, L] = w(""), [f, v] = T([]), V = () => {
30
+ x(!1);
31
+ }, F = () => {
32
+ const l = e.onChange;
33
+ if (u)
34
+ h(f.map((t) => t.value)), l == null || l(f.map((t) => t.value));
25
35
  else {
26
- const l = u[b || 0];
27
- x(l.label), e == null || e(l.value, l);
36
+ const t = i[N || 0];
37
+ h(t.label), l == null || l(t.value, t);
28
38
  }
29
- m(!1);
39
+ x(!1);
30
40
  };
31
- V(() => {
32
- if (w.current)
33
- if (p) {
34
- let e = new C("." + s.wheel, {
41
+ D(() => {
42
+ if (I.current)
43
+ if (j) {
44
+ let l = new O("." + n.wheel, {
35
45
  click: !0,
36
46
  probeType: 3,
37
47
  preventDefaultException: {
38
48
  className: /wheel-item/
39
49
  },
40
50
  wheel: {
41
- selectedIndex: b,
42
- wheelWrapperClass: s["wheel-scroll"],
43
- wheelItemClass: s["wheel-item"],
44
- wheelDisabledItemClass: s["wheel-disabled-item"]
51
+ selectedIndex: N,
52
+ wheelWrapperClass: n["wheel-scroll"],
53
+ wheelItemClass: n["wheel-item"],
54
+ wheelDisabledItemClass: n["wheel-disabled-item"]
45
55
  },
46
56
  useTransition: !1
47
57
  });
48
- if (e.on("scrollEnd", () => {
49
- g(e.getSelectedIndex());
50
- }), o) {
51
- const l = u.filter((r) => c == null ? void 0 : c.find((a) => a === r.value));
52
- h(l);
58
+ if (l.on("scrollEnd", () => {
59
+ $(l.getSelectedIndex());
60
+ }), u) {
61
+ const t = i.filter((d) => r == null ? void 0 : r.find((s) => s === d.value));
62
+ v(t);
53
63
  }
54
64
  } else
55
- h((e) => {
56
- e.splice(0);
65
+ v((l) => {
66
+ l.splice(0);
57
67
  });
58
- }, [p]);
59
- function y() {
60
- return o ? t.jsxs("div", { className: s.textarea, onClick: () => m(!0), children: [t.jsx("div", { children: c == null ? void 0 : c.map((e, l) => {
61
- var r;
62
- return t.jsx(S, { bordered: !1, closable: !0, onClose: (a) => {
63
- a.preventDefault();
64
- const i = c.findIndex((f) => f === e);
65
- x((f) => {
66
- f.splice(i, 1);
68
+ }, [j]), D(() => {
69
+ h(m);
70
+ }, [m]);
71
+ function M() {
72
+ return u ? a.jsxs("div", { className: n.textarea, onClick: () => x(!0), children: [a.jsx("div", { children: r == null ? void 0 : r.map((l, t) => {
73
+ var d;
74
+ return a.jsx(z, { bordered: !1, closable: !0, onClose: (s) => {
75
+ s.preventDefault();
76
+ const c = r.findIndex((o) => o === l);
77
+ h((o) => {
78
+ o.splice(c, 1);
67
79
  });
68
- }, children: (r = u.find((a) => e === a.value)) == null ? void 0 : r.label }, l);
69
- }) }), t.jsx(I, { style: { color: "#d9d9d9" } })] }) : t.jsx(k, { placeholder: n.placeholder, onClick: () => m(!0), value: c, suffix: t.jsx(I, { style: { color: "#d9d9d9" } }) });
80
+ }, children: (d = i.find((s) => l === s.value)) == null ? void 0 : d.label }, t);
81
+ }) }), a.jsx(y, { style: { color: "#d9d9d9" } })] }) : a.jsx(E, { placeholder: e.placeholder, onClick: () => x(!0), value: r, suffix: a.jsx(y, { style: { color: "#d9d9d9" } }) });
70
82
  }
71
- function E() {
72
- return n.showSearch ? t.jsx("div", { className: s["search-input"], children: t.jsx(H, { onKeyUp: (e) => {
73
- if (n.onSearch) {
74
- n.onSearch(e.currentTarget.value);
83
+ function R() {
84
+ return e.showSearch ? a.jsx("div", { className: n["search-input"], children: a.jsx(G, { onKeyUp: (l) => {
85
+ if (e.onSearch) {
86
+ e.onSearch(l.currentTarget.value);
75
87
  return;
76
88
  }
77
- z(e.currentTarget.value);
89
+ L(l.currentTarget.value);
78
90
  } }) }) : null;
79
91
  }
80
- function W() {
81
- return o ? t.jsxs(t.Fragment, { children: [t.jsx("div", { className: s["select-label"], children: "已选择:" }), t.jsx(R, { size: [0, "small"], wrap: !0, className: s["tag-list"], children: d.map((e, l) => t.jsx(S, { bordered: !1, closable: !0, onClose: (r) => {
82
- r.preventDefault();
83
- const a = d.findIndex((i) => e.value === i.value);
84
- h((i) => {
85
- i.splice(a, 1);
92
+ function H() {
93
+ return u ? a.jsxs(a.Fragment, { children: [a.jsx("div", { className: n["select-label"], children: "已选择:" }), a.jsx(q, { size: [0, "small"], wrap: !0, className: n["tag-list"], children: f.map((l, t) => a.jsx(z, { bordered: !1, closable: !0, onClose: (d) => {
94
+ d.preventDefault();
95
+ const s = f.findIndex((c) => l.value === c.value);
96
+ v((c) => {
97
+ c.splice(s, 1);
86
98
  });
87
- }, children: e.label }, l)) })] }) : null;
99
+ }, children: l.label }, t)) })] }) : null;
88
100
  }
89
- function $() {
90
- return (j ? u.filter((l) => j(D, l)) : u).map((l, r) => t.jsx("li", { className: s["wheel-item"], onClick: () => {
91
- o && h((a) => {
92
- if (d.find((i) => i.value === l.value)) {
93
- const i = d.findIndex((f) => l.value === f.value);
94
- a.splice(i, 1);
101
+ function K() {
102
+ return (S ? i.filter((t) => S(B, t)) : i).map((t, d) => a.jsx("li", { className: n["wheel-item"], onClick: () => {
103
+ u && v((s) => {
104
+ if (f.find((c) => c.value === t.value)) {
105
+ const c = f.findIndex((o) => t.value === o.value);
106
+ s.splice(c, 1);
95
107
  } else
96
- a.push(l);
108
+ s.push(t);
97
109
  });
98
- }, children: l.label }, r));
110
+ }, children: t.label }, d));
99
111
  }
100
- return t.jsxs("div", { className: `bitzSelectMobileBlock ${n.className}`, children: [y(), t.jsx(M, { open: p, handleCancel: O, handleOk: T, height: n.drawerHeight || 273, children: t.jsxs("div", { ref: w, className: s.bitzSelectWrapper, children: [E(), W(), t.jsxs("div", { className: s["picker-content"], children: [t.jsx("div", { className: `${s["mask-top"]} ${s["border-bottom-1px"]}` }), t.jsx("div", { className: `${s["mask-bottom"]} ${s["border-top-1px"]}` }), t.jsx("div", { className: s["wheel-wrapper"], children: t.jsx("div", { className: s.wheel, children: t.jsx("ul", { className: s["wheel-scroll"], children: $() }) }) })] })] }) })] });
112
+ return a.jsxs("div", { className: `bitzSelectMobileBlock ${e.className}`, children: [M(), a.jsx(U, { open: j, handleCancel: V, handleOk: F, height: e.drawerHeight || 273, children: a.jsxs("div", { ref: I, className: n.bitzSelectWrapper, children: [R(), H(), a.jsxs("div", { className: n["picker-content"], children: [a.jsx("div", { className: `${n["mask-top"]} ${n["border-bottom-1px"]}` }), a.jsx("div", { className: `${n["mask-bottom"]} ${n["border-top-1px"]}` }), a.jsx("div", { className: n["wheel-wrapper"], children: a.jsx("div", { className: n.wheel, children: a.jsx("ul", { className: n["wheel-scroll"], children: K() }) }) })] })] }) })] });
101
113
  };
102
114
  export {
103
- X as default
115
+ te as default
104
116
  };
@@ -0,0 +1,36 @@
1
+ import { j as s } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { useMemo as b } from "react";
3
+ import { Space as u, Dropdown as c } from "antd";
4
+ import h from "../../BitzButton/index.mjs";
5
+ import g from "./style.mjs";
6
+ import w from "../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/PlusCircleFilled.mjs";
7
+ import B from "../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/CaretDownOutlined.mjs";
8
+ const F = ({ size: d, add: i, excel: t, children: f }) => {
9
+ const { blockCls: j, addBtnClassName: k, btnClassName: C } = g(d), y = b(() => {
10
+ var r, o, n, m, a, l, p, e;
11
+ return [
12
+ {
13
+ key: ((o = (r = t.menu) == null ? void 0 : r[0]) == null ? void 0 : o.key) || "download",
14
+ label: ((m = (n = t.menu) == null ? void 0 : n[0]) == null ? void 0 : m.label) || "Excel模板下载"
15
+ // icon: excel.menu?.[0]?.icon || (
16
+ // <CloudDownloadOutlined style={{ fontSize: 14 }} />
17
+ // ),
18
+ },
19
+ {
20
+ key: ((l = (a = t.menu) == null ? void 0 : a[1]) == null ? void 0 : l.key) || "import",
21
+ label: ((e = (p = t.menu) == null ? void 0 : p[1]) == null ? void 0 : e.label) || "Excel数据导入"
22
+ // icon: excel.menu?.[1]?.icon || (
23
+ // <CloudUploadOutlined style={{ fontSize: 14 }} />
24
+ // ),
25
+ },
26
+ ...(t == null ? void 0 : t.otherMenu) ?? []
27
+ ];
28
+ }, [t]);
29
+ return s.jsxs(u.Compact, { className: j, style: { height: "100%" }, children: [i.show !== !1 && s.jsx(h, { type: "primary", icon: s.jsx(w, {}), onClick: i.onClick, className: k, children: i.text }), f, t.show !== !1 && s.jsx(c, { menu: { items: y, onClick: ({ key: r }) => {
30
+ var o;
31
+ return (o = t.onClick) == null ? void 0 : o.call(t, r);
32
+ } }, trigger: (t == null ? void 0 : t.trigger) || ["click"], children: s.jsx(h, { className: C, type: "text", children: s.jsxs(u, { size: 6, children: [s.jsx("span", { children: t.text ?? "Excel文档导入" }), s.jsx(B, {})] }) }) })] });
33
+ };
34
+ export {
35
+ F as default
36
+ };
@@ -0,0 +1,10 @@
1
+ import { j as s } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import e from "../../BitzButton/index.mjs";
3
+ import r from "./style.mjs";
4
+ const i = ({ ...t }) => {
5
+ const { btnClassName: o } = r();
6
+ return s.jsx(e, { className: o, type: "text", ...t });
7
+ };
8
+ export {
9
+ i as default
10
+ };
@@ -1,36 +1,8 @@
1
- import { j as o } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { useMemo as y } from "react";
3
- import { Space as u, Dropdown as b } from "antd";
4
- import d from "../../BitzButton/index.mjs";
5
- import c from "./style.mjs";
6
- import w from "../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/PlusCircleFilled.mjs";
7
- import B from "../../../node_modules/.store/@ant-design_icons@5.3.1/node_modules/@ant-design/icons/es/icons/CaretDownOutlined.mjs";
8
- const A = ({ size: h, add: n, excel: t }) => {
9
- const { blockCls: f, addBtnClassName: j, dropdownBtnClassName: k } = c(h), C = y(() => {
10
- var s, r, i, m, a, l, p, e;
11
- return [
12
- {
13
- key: ((r = (s = t.menu) == null ? void 0 : s[0]) == null ? void 0 : r.key) || "download",
14
- label: ((m = (i = t.menu) == null ? void 0 : i[0]) == null ? void 0 : m.label) || "Excel模板下载"
15
- // icon: excel.menu?.[0]?.icon || (
16
- // <CloudDownloadOutlined style={{ fontSize: 14 }} />
17
- // ),
18
- },
19
- {
20
- key: ((l = (a = t.menu) == null ? void 0 : a[1]) == null ? void 0 : l.key) || "import",
21
- label: ((e = (p = t.menu) == null ? void 0 : p[1]) == null ? void 0 : e.label) || "Excel数据导入"
22
- // icon: excel.menu?.[1]?.icon || (
23
- // <CloudUploadOutlined style={{ fontSize: 14 }} />
24
- // ),
25
- },
26
- ...(t == null ? void 0 : t.otherMenu) ?? []
27
- ];
28
- }, [t]);
29
- return o.jsxs(u.Compact, { className: f, style: { height: "100%" }, children: [n.show !== !1 && o.jsx(d, { type: "primary", icon: o.jsx(w, {}), onClick: n.onClick, className: j, children: n.text }), t.show !== !1 && o.jsx(b, { menu: { items: C, onClick: ({ key: s }) => {
30
- var r;
31
- return (r = t.onClick) == null ? void 0 : r.call(t, s);
32
- } }, trigger: (t == null ? void 0 : t.trigger) || ["click"], children: o.jsx(d, { className: k, type: "text", children: o.jsxs(u, { size: 8, children: [o.jsx("span", { children: t.text ?? "Excel文档导入" }), o.jsx(B, {})] }) }) })] });
33
- };
1
+ import o from "./ActionBar.mjs";
2
+ import i from "./Button.mjs";
3
+ const t = o;
4
+ process.env.NODE_ENV !== "production" && (t.displayName = "BitzTableActionBar");
5
+ t.Button = i;
34
6
  export {
35
- A as default
7
+ t as default
36
8
  };
@@ -1,5 +1,5 @@
1
- import { useContext as f, useMemo as z } from "react";
2
- import { theme as y } from "antd";
1
+ import { useContext as b, useMemo as z } from "react";
2
+ import { theme as B } from "antd";
3
3
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/extractStyle.mjs";
4
4
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.mjs";
5
5
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/StyleContext.mjs";
@@ -9,49 +9,58 @@ import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@an
9
9
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.mjs";
10
10
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.mjs";
11
11
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useHMR.mjs";
12
- import w from "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.mjs";
12
+ import T from "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.mjs";
13
13
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/transformers/legacyLogicalProperties.mjs";
14
- import { TableContext as A } from "../Store/index.mjs";
15
- import d from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
16
- const E = (i) => {
17
- const { theme: l, hashId: r, token: a } = y.useToken(), { tableSize: p } = f(A), h = z(() => i ?? p ?? "lg", [i, p]), e = "bitzTableActionBarBlock", n = "actionBtn", s = "ActionBtn", c = "dropdownBtn", S = (t, m, o) => [
14
+ import { TableContext as x } from "../Store/index.mjs";
15
+ import $ from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
16
+ const F = (m) => {
17
+ const { theme: d, hashId: n, token: a } = B.useToken(), { tableSize: s } = b(x), h = z(() => m ?? s ?? "lg", [m, s]), e = "bitzTableActionBarBlock", r = "actionBtn", c = "ActionBtn", l = "dropdownBtn", S = (o, i, t) => [
18
18
  {
19
- [`.${t} .${m}`]: {
19
+ [`.${o} .${i}`]: {
20
20
  height: "100%",
21
21
  borderRadius: 0,
22
- paddingBlock: 0
22
+ paddingBlock: 0,
23
+ lineHeight: "normal",
24
+ ".ant-btn-icon .anticon": {
25
+ verticalAlign: "-0.14em"
26
+ }
23
27
  }
24
28
  },
25
- { [`.${t} .xl${o}`]: { fontSize: 14 } },
26
- { [`.${t} .lg${o}`]: { fontSize: 12 } },
27
- { [`.${t} .md${o}`]: { fontSize: 12 } },
28
- { [`.${t} .sm${o}`]: { fontSize: 12 } },
29
- { [`.${t} .xs${o}`]: { fontSize: 12 } }
30
- ], u = (t, m, o) => [
29
+ { [`.${o} .xl${t}`]: { fontSize: 14 } },
30
+ { [`.${o} .lg${t}`]: { fontSize: 12 } },
31
+ { [`.${o} .md${t}`]: { fontSize: 12 } },
32
+ { [`.${o} .sm${t}`]: { fontSize: 12 } },
33
+ { [`.${o} .xs${t}`]: { fontSize: 12 } }
34
+ ], g = (o, i, t) => [
31
35
  {
32
- [`.${t} .${m}`]: {
36
+ [`.${o} .${i}`]: {
33
37
  "&:hover": {
34
- color: `${o.colorPrimary} !important`,
35
- background: "inherit !important"
38
+ color: `${t.colorText} !important`
36
39
  },
37
40
  "&:focus": {
38
- color: `${o.colorPrimaryActive} !important`
41
+ color: `${t.colorText} !important`
42
+ },
43
+ "&:disabled:hover": {
44
+ color: `${t.colorTextDisabled} !important`
45
+ },
46
+ "&:disabled:focus": {
47
+ color: `${t.colorTextDisabled} !important`
39
48
  }
40
49
  }
41
50
  }
42
51
  ];
43
- w({
44
- theme: l,
52
+ T({
53
+ theme: d,
45
54
  token: a,
46
- hashId: r,
55
+ hashId: n,
47
56
  path: [e]
48
57
  }, () => [
49
- S(e, n, s),
50
- u(e, c, a)
58
+ S(e, r, c),
59
+ g(e, l, a)
51
60
  ]);
52
- const $ = `${h}${s}`, B = d(n, $, r), g = d(n, c, $, r);
53
- return { blockCls: e, addBtnClassName: B, dropdownBtnClassName: g };
61
+ const p = `${h}${c}`, u = $(r, p, n), f = $(r, l, p, n);
62
+ return { blockCls: e, addBtnClassName: u, btnClassName: f };
54
63
  };
55
64
  export {
56
- E as default
65
+ F as default
57
66
  };
@@ -1,45 +1,46 @@
1
1
  import { j as t } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
2
  import b from "../../../node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSize/index.mjs";
3
- import { Dropdown as g, Space as B, Skeleton as w } from "antd";
3
+ import { Dropdown as N, Space as B, Skeleton as w } from "antd";
4
4
  import { useRef as y, useMemo as C } from "react";
5
5
  import h from "../../BitzButton/index.mjs";
6
6
  import k from "./style.mjs";
7
- const N = ({ skeletonCls: n, ...s }) => t.jsxs(h, { type: "text", ...s, children: [t.jsx("span", { children: s.children }), t.jsx(w, { active: !0, title: !1, className: n, paragraph: {
7
+ const g = ({ skeletonCls: n, ...s }) => t.jsxs(h, { type: "text", ...s, children: [t.jsx("span", { children: s.children }), t.jsx(w, { active: !0, title: !1, className: n, paragraph: {
8
8
  rows: 1,
9
9
  width: "100%"
10
10
  } })] });
11
11
  function z({ loading: n, actionGroup: s, refInstance: d }) {
12
- const { gap: p, primaryBtnClassName: i, dangerBtnClassName: r, dropdownBtnClassName: l, maskClassName: m, skeletonBtnClassName: u, skeletonClassName: x } = k(), f = C(() => {
13
- const o = s.length >= 4 ? 2 : s.length, a = s.slice(0, o), c = [];
12
+ const { gap: p, primaryBtnClassName: i, dangerBtnClassName: o, dropdownBtnClassName: l, maskClassName: m, skeletonBtnClassName: u, skeletonClassName: x } = k(), f = C(() => {
13
+ const r = s.length >= 4 ? 2 : s.length, a = s.slice(0, r), c = [];
14
14
  if (a != null && a.length && a.forEach((e, j) => {
15
- c.push(n ? t.jsx(N, { className: u, skeletonCls: x, children: e == null ? void 0 : e.label }, j) : e.children ? t.jsx(g, { menu: { items: e.children }, children: t.jsx(h, { type: "text", className: e.danger ? r : i, children: e == null ? void 0 : e.label }) }, j) : t.jsx(h, { type: "text", className: e.danger ? r : i, onClick: e == null ? void 0 : e.onClick, children: e == null ? void 0 : e.label }, j));
16
- }), o === 2 && s.length >= 4) {
15
+ c.push(n ? t.jsx(g, { className: u, skeletonCls: x, children: e == null ? void 0 : e.label }, j) : e.children ? t.jsx(N, { menu: { items: e.children }, children: t.jsx(h, { type: "text", className: e.danger ? o : i, children: e == null ? void 0 : e.label }) }, j) : t.jsx(h, { type: "text", className: e.danger ? o : i, onClick: e == null ? void 0 : e.onClick, children: e == null ? void 0 : e.label }, j));
16
+ }), r === 2 && s.length >= 4) {
17
17
  const e = s.slice(2, s.length);
18
- c.push(n ? t.jsx(N, { className: u, skeletonCls: x, children: "更多" }, 5) : t.jsx(g, { menu: { items: e }, children: t.jsx(h, { type: "text", className: l, children: "更多" }) }, 5));
18
+ c.push(n ? t.jsx(g, { className: u, skeletonCls: x, children: "更多" }, 5) : t.jsx(N, { menu: { items: e }, children: t.jsx(h, { type: "text", className: l, children: "更多" }) }, 5));
19
19
  }
20
20
  return c;
21
21
  }, [n, s]);
22
- return t.jsxs("div", { onClick: (o) => o.stopPropagation(), children: [t.jsx(B, { size: p, ref: d, children: f }), t.jsx("div", { className: m })] });
22
+ return t.jsxs("div", { onClick: (r) => r.stopPropagation(), children: [t.jsx(B, { size: p, ref: d, className: "actionGroup", children: f }), t.jsx("div", { className: m })] });
23
23
  }
24
- function T(n) {
25
- const { actionGroup: s, loading: d, ...p } = n, { gap: i } = k(), r = y(null), l = b(r), m = C(() => l != null && l.width ? l.width + i * 2 + 1 : 181, [l, i]);
24
+ function M(n) {
25
+ const { actionGroup: s, loading: d, ...p } = n, { gap: i } = k(), o = y(null), l = b(o), m = C(() => l != null && l.width ? l.width + i * 2 + 1 : 181, [l, i]);
26
26
  return C(() => ({
27
- width: m,
28
- mobileHideRow: !0,
27
+ width: Math.floor(m),
28
+ mobileHide: !0,
29
29
  isOperationCol: !0,
30
30
  title: "操作",
31
31
  fixed: "right",
32
32
  key: "operationCol",
33
33
  dataIndex: "operationCol",
34
+ className: "operationCol",
34
35
  disable: !0,
35
- render: (x, f, o) => {
36
- const a = s(f, o).filter((c) => c.type != "detail");
37
- return t.jsx(z, { loading: d, actionGroup: a, refInstance: r });
36
+ render: (x, f, r) => {
37
+ const a = s(f, r).filter((c) => c.type != "detail");
38
+ return t.jsx(z, { loading: d, actionGroup: a, refInstance: o });
38
39
  },
39
40
  ...p
40
- }), [m, r, d, s]);
41
+ }), [m, o, d, s]);
41
42
  }
42
43
  export {
43
44
  z as BitzTableAction,
44
- T as default
45
+ M as default
45
46
  };