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.
- package/dist/bitz-ui.mjs +126 -120
- package/dist/components/BitzFluentInput/index.mjs +17 -14
- package/dist/components/BitzFluentSelect/index.mjs +17 -15
- package/dist/components/BitzList/List.mjs +14 -0
- package/dist/components/BitzList/LoadMore.mjs +60 -0
- package/dist/components/BitzList/index.less.mjs +4 -0
- package/dist/components/BitzList/index.mjs +6 -0
- package/dist/components/BitzPullRefresh/PullRefresh.mjs +84 -0
- package/dist/components/BitzPullRefresh/index.mjs +6 -0
- package/dist/components/BitzPullRefresh/style/index.less.mjs +4 -0
- package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +86 -74
- package/dist/components/BitzTable/ActionBar/ActionBar.mjs +36 -0
- package/dist/components/BitzTable/ActionBar/Button.mjs +10 -0
- package/dist/components/BitzTable/ActionBar/index.mjs +6 -34
- package/dist/components/BitzTable/ActionBar/style.mjs +36 -27
- package/dist/components/BitzTable/ActionCol/index.mjs +18 -17
- package/dist/components/BitzTable/Table/index.mjs +154 -92
- package/dist/components/BitzTable/TableSkeleton/index.mjs +36 -32
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.mjs +88 -99
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/DndItem.mjs +20 -18
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +8 -8
- package/dist/components/BitzTable/ToolBar/DensityIcon/index.mjs +7 -7
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +13 -13
- package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +5 -5
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +7 -3
- package/dist/components/BitzTable/ToolBar/style.mjs +29 -20
- package/dist/hooks/use-event-listener.mjs +31 -0
- package/dist/hooks/use-lock-fn.mjs +18 -0
- package/dist/hooks/use-scroll-parent.mjs +32 -0
- package/dist/hooks/use-touch.mjs +33 -0
- package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +751 -1050
- package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSetState/index.mjs +16 -0
- package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useThrottleFn/index.mjs +28 -0
- package/dist/node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useUpdateEffect/index.mjs +6 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_Symbol.mjs +5 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseGetTag.mjs +11 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_baseTrim.mjs +9 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_freeGlobal.mjs +5 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_getRawTag.mjs +16 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_objectToString.mjs +8 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_root.mjs +5 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.mjs +10 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/debounce.mjs +55 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObject.mjs +8 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isObjectLike.mjs +7 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/isSymbol.mjs +10 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/now.mjs +7 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/throttle.mjs +19 -0
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/toNumber.mjs +23 -0
- package/dist/node_modules/.store/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs +48 -37
- package/dist/node_modules/_clsx@2.1.0@clsx/dist/clsx.mjs +23 -0
- package/dist/style.css +1 -1
- package/dist/type/bitz-ui.d.ts +2 -0
- package/dist/type/components/BitzList/List.d.ts +4 -0
- package/dist/type/components/BitzList/LoadMore.d.ts +4 -0
- package/dist/type/components/BitzList/PropsType.d.ts +35 -0
- package/dist/type/components/BitzList/index.d.ts +5 -0
- package/dist/type/components/BitzPagination/index.d.ts +8 -2
- package/dist/type/components/BitzPullRefresh/PropsType.d.ts +43 -0
- package/dist/type/components/BitzPullRefresh/PullRefresh.d.ts +4 -0
- package/dist/type/components/BitzPullRefresh/index.d.ts +5 -0
- package/dist/type/components/BitzSelect/component/BitzSelectMobile.d.ts +1 -0
- package/dist/type/components/BitzTable/ActionBar/ActionBar.d.ts +37 -0
- package/dist/type/components/BitzTable/ActionBar/Button.d.ts +6 -0
- package/dist/type/components/BitzTable/ActionBar/index.d.ts +6 -33
- package/dist/type/components/BitzTable/ActionBar/style.d.ts +2 -2
- package/dist/type/components/BitzTable/Store/index.d.ts +2 -3
- package/dist/type/components/BitzTable/Table/index.d.ts +2 -2
- package/dist/type/components/BitzTable/TableSkeleton/index.d.ts +1 -1
- package/dist/type/components/BitzTable/ToolBar/ExportIcon/index.d.ts +2 -1
- package/dist/type/components/BitzTable/ToolBar/style.d.ts +1 -2
- package/dist/type/components/BitzTable/index.d.ts +5 -1
- package/dist/type/hooks/use-event-listener.d.ts +11 -0
- package/dist/type/hooks/use-lock-fn.d.ts +2 -0
- package/dist/type/hooks/use-scroll-parent.d.ts +9 -0
- package/dist/type/hooks/use-touch.d.ts +18 -0
- package/dist/type/pages/Login2/useRowSelection.d.ts +6 -4
- package/dist/type/pages/Test/index.d.ts +3 -0
- package/dist/type/utils/get-default-props.d.ts +2 -0
- package/dist/type/utils/scroll.d.ts +6 -0
- package/dist/utils/get-default-props.mjs +12 -0
- package/dist/utils/scroll.mjs +15 -0
- package/package.json +2 -1
|
@@ -1,104 +1,116 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { BitzPickDrawer as
|
|
4
|
-
import { Tag as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { useImmer as
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
const { Search:
|
|
12
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
|
27
|
-
|
|
36
|
+
const t = i[N || 0];
|
|
37
|
+
h(t.label), l == null || l(t.value, t);
|
|
28
38
|
}
|
|
29
|
-
|
|
39
|
+
x(!1);
|
|
30
40
|
};
|
|
31
|
-
|
|
32
|
-
if (
|
|
33
|
-
if (
|
|
34
|
-
let
|
|
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:
|
|
42
|
-
wheelWrapperClass:
|
|
43
|
-
wheelItemClass:
|
|
44
|
-
wheelDisabledItemClass:
|
|
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 (
|
|
49
|
-
|
|
50
|
-
}),
|
|
51
|
-
const
|
|
52
|
-
|
|
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
|
-
|
|
56
|
-
|
|
65
|
+
v((l) => {
|
|
66
|
+
l.splice(0);
|
|
57
67
|
});
|
|
58
|
-
}, [
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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: (
|
|
69
|
-
}) }),
|
|
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
|
|
72
|
-
return
|
|
73
|
-
if (
|
|
74
|
-
|
|
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
|
-
|
|
89
|
+
L(l.currentTarget.value);
|
|
78
90
|
} }) }) : null;
|
|
79
91
|
}
|
|
80
|
-
function
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
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:
|
|
99
|
+
}, children: l.label }, t)) })] }) : null;
|
|
88
100
|
}
|
|
89
|
-
function
|
|
90
|
-
return (
|
|
91
|
-
|
|
92
|
-
if (
|
|
93
|
-
const
|
|
94
|
-
|
|
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
|
-
|
|
108
|
+
s.push(t);
|
|
97
109
|
});
|
|
98
|
-
}, children:
|
|
110
|
+
}, children: t.label }, d));
|
|
99
111
|
}
|
|
100
|
-
return
|
|
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
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
7
|
+
t as default
|
|
36
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useContext as
|
|
2
|
-
import { theme as
|
|
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
|
|
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
|
|
15
|
-
import
|
|
16
|
-
const
|
|
17
|
-
const { theme:
|
|
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
|
-
[`.${
|
|
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
|
-
{ [`.${
|
|
26
|
-
{ [`.${
|
|
27
|
-
{ [`.${
|
|
28
|
-
{ [`.${
|
|
29
|
-
{ [`.${
|
|
30
|
-
],
|
|
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
|
-
[`.${
|
|
36
|
+
[`.${o} .${i}`]: {
|
|
33
37
|
"&:hover": {
|
|
34
|
-
color: `${
|
|
35
|
-
background: "inherit !important"
|
|
38
|
+
color: `${t.colorText} !important`
|
|
36
39
|
},
|
|
37
40
|
"&:focus": {
|
|
38
|
-
color: `${
|
|
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
|
-
|
|
44
|
-
theme:
|
|
52
|
+
T({
|
|
53
|
+
theme: d,
|
|
45
54
|
token: a,
|
|
46
|
-
hashId:
|
|
55
|
+
hashId: n,
|
|
47
56
|
path: [e]
|
|
48
57
|
}, () => [
|
|
49
|
-
S(e,
|
|
50
|
-
|
|
58
|
+
S(e, r, c),
|
|
59
|
+
g(e, l, a)
|
|
51
60
|
]);
|
|
52
|
-
const
|
|
53
|
-
return { blockCls: e, addBtnClassName:
|
|
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
|
-
|
|
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
|
|
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
|
|
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:
|
|
13
|
-
const
|
|
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(
|
|
16
|
-
}),
|
|
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(
|
|
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: (
|
|
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
|
|
25
|
-
const { actionGroup: s, loading: d, ...p } = n, { gap: i } = k(),
|
|
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
|
-
|
|
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,
|
|
36
|
-
const a = s(f,
|
|
37
|
-
return t.jsx(z, { loading: d, actionGroup: a, refInstance:
|
|
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,
|
|
41
|
+
}), [m, o, d, s]);
|
|
41
42
|
}
|
|
42
43
|
export {
|
|
43
44
|
z as BitzTableAction,
|
|
44
|
-
|
|
45
|
+
M as default
|
|
45
46
|
};
|