bitz-react-admin-ui 1.6.5 → 1.6.7

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 (84) hide show
  1. package/README.md +2 -2
  2. package/dist/bitz-ui.mjs +126 -120
  3. package/dist/components/BitzFluentInput/index.mjs +20 -17
  4. package/dist/components/BitzFluentSelect/index.mjs +20 -18
  5. package/dist/components/BitzList/List.mjs +28 -0
  6. package/dist/components/BitzList/LoadMore.mjs +69 -0
  7. package/dist/components/BitzList/index.less.mjs +4 -0
  8. package/dist/components/BitzList/index.mjs +6 -0
  9. package/dist/components/BitzPullRefresh/PullRefresh.mjs +113 -0
  10. package/dist/components/BitzPullRefresh/index.mjs +6 -0
  11. package/dist/components/BitzPullRefresh/style/index.less.mjs +4 -0
  12. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +133 -94
  13. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +64 -0
  14. package/dist/components/BitzTable/ActionBar/Button.mjs +10 -0
  15. package/dist/components/BitzTable/ActionBar/index.mjs +6 -60
  16. package/dist/components/BitzTable/ActionBar/style.mjs +36 -32
  17. package/dist/components/BitzTable/ActionCol/index.mjs +29 -28
  18. package/dist/components/BitzTable/Table/index.mjs +302 -253
  19. package/dist/components/BitzTable/TableSkeleton/index.mjs +46 -42
  20. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.mjs +179 -173
  21. package/dist/components/BitzTable/ToolBar/ColConfigIcon/DndItem.mjs +28 -26
  22. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +10 -9
  23. package/dist/components/BitzTable/ToolBar/DensityIcon/index.mjs +1 -1
  24. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +28 -25
  25. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +3 -2
  26. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +23 -14
  27. package/dist/components/BitzTable/ToolBar/style.mjs +29 -20
  28. package/dist/hooks/use-event-listener.mjs +40 -0
  29. package/dist/hooks/use-lock-fn.mjs +21 -0
  30. package/dist/hooks/use-scroll-parent.mjs +34 -0
  31. package/dist/hooks/use-touch.mjs +33 -0
  32. package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +751 -1050
  33. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSetState/index.mjs +16 -0
  34. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useThrottleFn/index.mjs +28 -0
  35. package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useUpdateEffect/index.mjs +6 -0
  36. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_Symbol.mjs +5 -0
  37. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseGetTag.mjs +11 -0
  38. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseTrim.mjs +9 -0
  39. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_freeGlobal.mjs +5 -0
  40. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_getRawTag.mjs +16 -0
  41. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_objectToString.mjs +8 -0
  42. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_root.mjs +5 -0
  43. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.mjs +10 -0
  44. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/debounce.mjs +55 -0
  45. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObject.mjs +8 -0
  46. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObjectLike.mjs +7 -0
  47. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isSymbol.mjs +10 -0
  48. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/now.mjs +7 -0
  49. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/throttle.mjs +19 -0
  50. package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/toNumber.mjs +23 -0
  51. package/dist/node_modules/.store/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs +48 -37
  52. package/dist/node_modules/_clsx@2.1.0@clsx/dist/clsx.mjs +23 -0
  53. package/dist/style.css +1 -1
  54. package/dist/type/bitz-ui.d.ts +2 -0
  55. package/dist/type/components/BitzList/List.d.ts +4 -0
  56. package/dist/type/components/BitzList/LoadMore.d.ts +4 -0
  57. package/dist/type/components/BitzList/PropsType.d.ts +35 -0
  58. package/dist/type/components/BitzList/index.d.ts +5 -0
  59. package/dist/type/components/BitzPagination/index.d.ts +8 -2
  60. package/dist/type/components/BitzPullRefresh/PropsType.d.ts +43 -0
  61. package/dist/type/components/BitzPullRefresh/PullRefresh.d.ts +4 -0
  62. package/dist/type/components/BitzPullRefresh/index.d.ts +5 -0
  63. package/dist/type/components/BitzSelect/component/BitzSelectMobile.d.ts +1 -0
  64. package/dist/type/components/BitzTable/ActionBar/ActionBar.d.ts +37 -0
  65. package/dist/type/components/BitzTable/ActionBar/Button.d.ts +6 -0
  66. package/dist/type/components/BitzTable/ActionBar/index.d.ts +6 -33
  67. package/dist/type/components/BitzTable/ActionBar/style.d.ts +2 -2
  68. package/dist/type/components/BitzTable/Store/index.d.ts +2 -3
  69. package/dist/type/components/BitzTable/Table/index.d.ts +2 -2
  70. package/dist/type/components/BitzTable/TableSkeleton/index.d.ts +1 -1
  71. package/dist/type/components/BitzTable/ToolBar/ExportIcon/index.d.ts +2 -1
  72. package/dist/type/components/BitzTable/ToolBar/style.d.ts +1 -2
  73. package/dist/type/components/BitzTable/index.d.ts +6 -7
  74. package/dist/type/hooks/use-event-listener.d.ts +11 -0
  75. package/dist/type/hooks/use-lock-fn.d.ts +2 -0
  76. package/dist/type/hooks/use-scroll-parent.d.ts +9 -0
  77. package/dist/type/hooks/use-touch.d.ts +18 -0
  78. package/dist/type/pages/Login2/useRowSelection.d.ts +6 -4
  79. package/dist/type/pages/Test/index.d.ts +3 -0
  80. package/dist/type/utils/get-default-props.d.ts +2 -0
  81. package/dist/type/utils/scroll.d.ts +6 -0
  82. package/dist/utils/get-default-props.mjs +12 -0
  83. package/dist/utils/scroll.mjs +15 -0
  84. package/package.json +2 -1
@@ -1,152 +1,191 @@
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 E, 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 g 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
- g.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, C] = 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 W, Space as q } from "antd";
5
+ import $ 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
+ $.use(A);
11
+ const { Search: G } = W, te = ({ ...e }) => {
12
+ var C, g, k;
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 = (g = e == null ? void 0 : e.fieldNames) == null ? void 0 : g.label, t = (k = e == null ? void 0 : e.fieldNames) == null ? void 0 : k.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, B = (l, t) => ((t == null ? void 0 : t.label) ?? "").toLowerCase().includes(l.toLowerCase()), m = e.value ?? e.defaultValue, S = e.filterOption || B, [N, E] = w(() => {
24
+ const l = i == null ? void 0 : i.findIndex((t) => t.value === m);
25
+ return l === -1 ? 0 : l;
26
+ }), [d, 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 = E(null), [p, m] = v(!1), [z, D] = v(""), [d, h] = N([]), T = () => {
20
- m(!1);
21
- }, y = () => {
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), [L, O] = w(""), [f, v] = T([]), V = () => {
30
+ x(!1);
31
+ }, M = () => {
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 g("." + s.wheel, {
41
+ D(() => {
42
+ if (I.current)
43
+ if (j) {
44
+ let l = new $("." + 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
- C(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
+ E(l.getSelectedIndex());
60
+ }), u) {
61
+ const t = i.filter((r) => d == null ? void 0 : d.find((s) => s === r.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 O() {
60
- return o ? /* @__PURE__ */ t.jsxs("div", { className: s.textarea, onClick: () => m(!0), children: [
61
- /* @__PURE__ */ t.jsx("div", { children: c == null ? void 0 : c.map((e, l) => {
68
+ }, [j]), D(() => {
69
+ h(m);
70
+ }, [m]);
71
+ function R() {
72
+ return u ? /* @__PURE__ */ a.jsxs("div", { className: n.textarea, onClick: () => x(!0), children: [
73
+ /* @__PURE__ */ a.jsx("div", { children: d == null ? void 0 : d.map((l, t) => {
62
74
  var r;
63
- return /* @__PURE__ */ t.jsx(
64
- S,
75
+ return /* @__PURE__ */ a.jsx(
76
+ z,
65
77
  {
66
78
  bordered: !1,
67
79
  closable: !0,
68
- onClose: (a) => {
69
- a.preventDefault();
70
- const i = c.findIndex((f) => f === e);
71
- x((f) => {
72
- f.splice(i, 1);
80
+ onClose: (s) => {
81
+ s.preventDefault();
82
+ const c = d.findIndex((o) => o === l);
83
+ h((o) => {
84
+ o.splice(c, 1);
73
85
  });
74
86
  },
75
- children: (r = u.find((a) => e === a.value)) == null ? void 0 : r.label
87
+ children: (r = i.find((s) => l === s.value)) == null ? void 0 : r.label
76
88
  },
77
- l
89
+ t
78
90
  );
79
91
  }) }),
80
- /* @__PURE__ */ t.jsx(I, { style: { color: "#d9d9d9" } })
81
- ] }) : /* @__PURE__ */ t.jsx(k, { placeholder: n.placeholder, onClick: () => m(!0), value: c, suffix: /* @__PURE__ */ t.jsx(I, { style: { color: "#d9d9d9" } }) });
92
+ /* @__PURE__ */ a.jsx(y, { style: { color: "#d9d9d9" } })
93
+ ] }) : /* @__PURE__ */ a.jsx(
94
+ W,
95
+ {
96
+ placeholder: e.placeholder,
97
+ onClick: () => x(!0),
98
+ value: d,
99
+ suffix: /* @__PURE__ */ a.jsx(y, { style: { color: "#d9d9d9" } })
100
+ }
101
+ );
82
102
  }
83
- function W() {
84
- return n.showSearch ? /* @__PURE__ */ t.jsx("div", { className: s["search-input"], children: /* @__PURE__ */ t.jsx(
85
- H,
103
+ function F() {
104
+ return e.showSearch ? /* @__PURE__ */ a.jsx("div", { className: n["search-input"], children: /* @__PURE__ */ a.jsx(
105
+ G,
86
106
  {
87
- onKeyUp: (e) => {
88
- if (n.onSearch) {
89
- n.onSearch(e.currentTarget.value);
107
+ onKeyUp: (l) => {
108
+ if (e.onSearch) {
109
+ e.onSearch(l.currentTarget.value);
90
110
  return;
91
111
  }
92
- D(e.currentTarget.value);
112
+ O(l.currentTarget.value);
93
113
  }
94
114
  }
95
115
  ) }) : null;
96
116
  }
97
- function $() {
98
- return o ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
99
- /* @__PURE__ */ t.jsx("div", { className: s["select-label"], children: "已选择:" }),
100
- /* @__PURE__ */ t.jsx(R, { size: [0, "small"], wrap: !0, className: s["tag-list"], children: d.map((e, l) => /* @__PURE__ */ t.jsx(
101
- S,
117
+ function H() {
118
+ return u ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
119
+ /* @__PURE__ */ a.jsx("div", { className: n["select-label"], children: "已选择:" }),
120
+ /* @__PURE__ */ a.jsx(q, { size: [0, "small"], wrap: !0, className: n["tag-list"], children: f.map((l, t) => /* @__PURE__ */ a.jsx(
121
+ z,
102
122
  {
103
123
  bordered: !1,
104
124
  closable: !0,
105
125
  onClose: (r) => {
106
126
  r.preventDefault();
107
- const a = d.findIndex((i) => e.value === i.value);
108
- h((i) => {
109
- i.splice(a, 1);
127
+ const s = f.findIndex((c) => l.value === c.value);
128
+ v((c) => {
129
+ c.splice(s, 1);
110
130
  });
111
131
  },
112
- children: e.label
132
+ children: l.label
113
133
  },
114
- l
134
+ t
115
135
  )) })
116
136
  ] }) : null;
117
137
  }
118
- function B() {
119
- return (j ? u.filter((l) => j(z, l)) : u).map((l, r) => /* @__PURE__ */ t.jsx(
138
+ function K() {
139
+ return (S ? i.filter((t) => S(L, t)) : i).map((t, r) => /* @__PURE__ */ a.jsx(
120
140
  "li",
121
141
  {
122
- className: s["wheel-item"],
142
+ className: n["wheel-item"],
123
143
  onClick: () => {
124
- o && h((a) => {
125
- if (d.find((i) => i.value === l.value)) {
126
- const i = d.findIndex((f) => l.value === f.value);
127
- a.splice(i, 1);
144
+ u && v((s) => {
145
+ if (f.find((c) => c.value === t.value)) {
146
+ const c = f.findIndex((o) => t.value === o.value);
147
+ s.splice(c, 1);
128
148
  } else
129
- a.push(l);
149
+ s.push(t);
130
150
  });
131
151
  },
132
- children: l.label
152
+ children: t.label
133
153
  },
134
154
  r
135
155
  ));
136
156
  }
137
- return /* @__PURE__ */ t.jsxs("div", { className: `bitzSelectMobileBlock ${n.className}`, children: [
138
- O(),
139
- /* @__PURE__ */ t.jsx(M, { open: p, handleCancel: T, handleOk: y, height: n.drawerHeight || 273, children: /* @__PURE__ */ t.jsxs("div", { ref: w, className: s.bitzSelectWrapper, children: [
140
- W(),
141
- $(),
142
- /* @__PURE__ */ t.jsxs("div", { className: s["picker-content"], children: [
143
- /* @__PURE__ */ t.jsx("div", { className: `${s["mask-top"]} ${s["border-bottom-1px"]}` }),
144
- /* @__PURE__ */ t.jsx("div", { className: `${s["mask-bottom"]} ${s["border-top-1px"]}` }),
145
- /* @__PURE__ */ t.jsx("div", { className: s["wheel-wrapper"], children: /* @__PURE__ */ t.jsx("div", { className: s.wheel, children: /* @__PURE__ */ t.jsx("ul", { className: s["wheel-scroll"], children: B() }) }) })
146
- ] })
147
- ] }) })
157
+ return /* @__PURE__ */ a.jsxs("div", { className: `bitzSelectMobileBlock ${e.className}`, children: [
158
+ R(),
159
+ /* @__PURE__ */ a.jsx(
160
+ U,
161
+ {
162
+ open: j,
163
+ handleCancel: V,
164
+ handleOk: M,
165
+ height: e.drawerHeight || 273,
166
+ children: /* @__PURE__ */ a.jsxs("div", { ref: I, className: n.bitzSelectWrapper, children: [
167
+ F(),
168
+ H(),
169
+ /* @__PURE__ */ a.jsxs("div", { className: n["picker-content"], children: [
170
+ /* @__PURE__ */ a.jsx(
171
+ "div",
172
+ {
173
+ className: `${n["mask-top"]} ${n["border-bottom-1px"]}`
174
+ }
175
+ ),
176
+ /* @__PURE__ */ a.jsx(
177
+ "div",
178
+ {
179
+ className: `${n["mask-bottom"]} ${n["border-top-1px"]}`
180
+ }
181
+ ),
182
+ /* @__PURE__ */ a.jsx("div", { className: n["wheel-wrapper"], children: /* @__PURE__ */ a.jsx("div", { className: n.wheel, children: /* @__PURE__ */ a.jsx("ul", { className: n["wheel-scroll"], children: K() }) }) })
183
+ ] })
184
+ ] })
185
+ }
186
+ )
148
187
  ] });
149
188
  };
150
189
  export {
151
- X as default
190
+ te as default
152
191
  };
@@ -0,0 +1,64 @@
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 = ({
9
+ size: d,
10
+ add: i,
11
+ excel: t,
12
+ children: f
13
+ }) => {
14
+ const { blockCls: j, addBtnClassName: k, btnClassName: C } = g(d), y = b(() => {
15
+ var r, o, n, m, a, l, p, e;
16
+ return [
17
+ {
18
+ key: ((o = (r = t.menu) == null ? void 0 : r[0]) == null ? void 0 : o.key) || "download",
19
+ label: ((m = (n = t.menu) == null ? void 0 : n[0]) == null ? void 0 : m.label) || "Excel模板下载"
20
+ // icon: excel.menu?.[0]?.icon || (
21
+ // <CloudDownloadOutlined style={{ fontSize: 14 }} />
22
+ // ),
23
+ },
24
+ {
25
+ key: ((l = (a = t.menu) == null ? void 0 : a[1]) == null ? void 0 : l.key) || "import",
26
+ label: ((e = (p = t.menu) == null ? void 0 : p[1]) == null ? void 0 : e.label) || "Excel数据导入"
27
+ // icon: excel.menu?.[1]?.icon || (
28
+ // <CloudUploadOutlined style={{ fontSize: 14 }} />
29
+ // ),
30
+ },
31
+ ...(t == null ? void 0 : t.otherMenu) ?? []
32
+ ];
33
+ }, [t]);
34
+ return /* @__PURE__ */ s.jsxs(u.Compact, { className: j, style: { height: "100%" }, children: [
35
+ i.show !== !1 && /* @__PURE__ */ s.jsx(
36
+ h,
37
+ {
38
+ type: "primary",
39
+ icon: /* @__PURE__ */ s.jsx(w, {}),
40
+ onClick: i.onClick,
41
+ className: k,
42
+ children: i.text
43
+ }
44
+ ),
45
+ f,
46
+ t.show !== !1 && /* @__PURE__ */ s.jsx(
47
+ c,
48
+ {
49
+ menu: { items: y, onClick: ({ key: r }) => {
50
+ var o;
51
+ return (o = t.onClick) == null ? void 0 : o.call(t, r);
52
+ } },
53
+ trigger: (t == null ? void 0 : t.trigger) || ["click"],
54
+ children: /* @__PURE__ */ s.jsx(h, { className: C, type: "text", children: /* @__PURE__ */ s.jsxs(u, { size: 6, children: [
55
+ /* @__PURE__ */ s.jsx("span", { children: t.text ?? "Excel文档导入" }),
56
+ /* @__PURE__ */ s.jsx(B, {})
57
+ ] }) })
58
+ }
59
+ )
60
+ ] });
61
+ };
62
+ export {
63
+ F as default
64
+ };
@@ -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 /* @__PURE__ */ s.jsx(e, { className: o, type: "text", ...t });
7
+ };
8
+ export {
9
+ i as default
10
+ };
@@ -1,62 +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 = ({
9
- size: h,
10
- add: n,
11
- excel: t
12
- }) => {
13
- const { blockCls: f, addBtnClassName: j, dropdownBtnClassName: k } = c(h), C = y(() => {
14
- var s, r, i, m, a, l, p, e;
15
- return [
16
- {
17
- key: ((r = (s = t.menu) == null ? void 0 : s[0]) == null ? void 0 : r.key) || "download",
18
- label: ((m = (i = t.menu) == null ? void 0 : i[0]) == null ? void 0 : m.label) || "Excel模板下载"
19
- // icon: excel.menu?.[0]?.icon || (
20
- // <CloudDownloadOutlined style={{ fontSize: 14 }} />
21
- // ),
22
- },
23
- {
24
- key: ((l = (a = t.menu) == null ? void 0 : a[1]) == null ? void 0 : l.key) || "import",
25
- label: ((e = (p = t.menu) == null ? void 0 : p[1]) == null ? void 0 : e.label) || "Excel数据导入"
26
- // icon: excel.menu?.[1]?.icon || (
27
- // <CloudUploadOutlined style={{ fontSize: 14 }} />
28
- // ),
29
- },
30
- ...(t == null ? void 0 : t.otherMenu) ?? []
31
- ];
32
- }, [t]);
33
- return /* @__PURE__ */ o.jsxs(u.Compact, { className: f, style: { height: "100%" }, children: [
34
- n.show !== !1 && /* @__PURE__ */ o.jsx(
35
- d,
36
- {
37
- type: "primary",
38
- icon: /* @__PURE__ */ o.jsx(w, {}),
39
- onClick: n.onClick,
40
- className: j,
41
- children: n.text
42
- }
43
- ),
44
- t.show !== !1 && /* @__PURE__ */ o.jsx(
45
- b,
46
- {
47
- menu: { items: C, onClick: ({ key: s }) => {
48
- var r;
49
- return (r = t.onClick) == null ? void 0 : r.call(t, s);
50
- } },
51
- trigger: (t == null ? void 0 : t.trigger) || ["click"],
52
- children: /* @__PURE__ */ o.jsx(d, { className: k, type: "text", children: /* @__PURE__ */ o.jsxs(u, { size: 8, children: [
53
- /* @__PURE__ */ o.jsx("span", { children: t.text ?? "Excel文档导入" }),
54
- /* @__PURE__ */ o.jsx(B, {})
55
- ] }) })
56
- }
57
- )
58
- ] });
59
- };
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;
60
6
  export {
61
- A as default
7
+ t as default
62
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,57 +9,61 @@ 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(
52
+ T(
44
53
  {
45
- theme: l,
54
+ theme: d,
46
55
  token: a,
47
- hashId: r,
56
+ hashId: n,
48
57
  path: [e]
49
58
  },
50
59
  () => [
51
- S(e, n, s),
52
- u(e, c, a)
60
+ S(e, r, c),
61
+ g(e, l, a)
53
62
  ]
54
63
  );
55
- const $ = `${h}${s}`, B = d(n, $, r), g = d(
56
- n,
57
- c,
58
- $,
59
- r
60
- );
61
- return { blockCls: e, addBtnClassName: B, dropdownBtnClassName: g };
64
+ const p = `${h}${c}`, u = $(r, p, n), f = $(r, l, p, n);
65
+ return { blockCls: e, addBtnClassName: u, btnClassName: f };
62
66
  };
63
67
  export {
64
- E as default
68
+ F as default
65
69
  };