bitz-react-admin-ui 2.4.1 → 2.4.3
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/_virtual/index.mjs +2 -2
- package/dist/_virtual/index2.mjs +2 -2
- package/dist/components/BitzConfigProvider/index.d.ts +2 -0
- package/dist/components/BitzTable/ActionCol/index.d.ts +2 -1
- package/dist/components/BitzTable/ActionCol/index.mjs +127 -94
- package/dist/components/BitzTable/ActionCol/style.d.ts +1 -1
- package/dist/components/BitzTable/ActionCol/style.mjs +14 -14
- package/dist/components/BitzTable/Table/index.d.ts +3 -1
- package/dist/components/BitzTable/Table/index.mjs +341 -322
- package/dist/components/BitzTable/index.d.ts +21 -6
- package/dist/components/BitzTableSelect/Select/index.d.ts +1 -1
- package/dist/components/BitzTableSelect/Select/index.mjs +70 -69
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +145 -147
- package/dist/components/BitzTableSelect/SingleSelect/index.d.ts +1 -1
- package/dist/components/BitzTableSelect/SingleSelect/index.mjs +73 -72
- package/dist/components/BitzTableSelect/TableCell/index.mjs +8 -7
- package/dist/components/BitzTableSelect/index.d.ts +3 -1
- package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
- package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/_virtual/index.mjs
CHANGED
package/dist/_virtual/index2.mjs
CHANGED
|
@@ -33,6 +33,8 @@ export interface BitzTableComponentToken extends TableComponentToken {
|
|
|
33
33
|
expandIconBorderColor?: string;
|
|
34
34
|
/** table与分页组件的纵向间隙距离 */
|
|
35
35
|
tableSpaceBetweenPage?: number;
|
|
36
|
+
/** minHeight */
|
|
37
|
+
minHeight?: number;
|
|
36
38
|
/** xl */
|
|
37
39
|
xlTable?: TableConfigBySize;
|
|
38
40
|
/** lg */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { BitzTableActionProps, BitzTableColumnType, BitzTableActionColProps } from '..';
|
|
2
|
-
export declare
|
|
3
|
+
export declare const BitzTableAction: import("react").ForwardRefExoticComponent<BitzTableActionProps<any> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
4
|
/** 表格操作列 */
|
|
4
5
|
declare function BitzTableActionCol<T>(props: BitzTableActionColProps<T>): BitzTableColumnType<T>;
|
|
5
6
|
export default BitzTableActionCol;
|
|
@@ -1,99 +1,132 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { j as n } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import T from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
|
|
3
|
+
import { Space as I, Skeleton as R, theme as P } from "antd";
|
|
4
|
+
import { forwardRef as E, useContext as L, useMemo as f, Fragment as M, useRef as D } from "react";
|
|
5
|
+
import x from "../../BitzButton/index.mjs";
|
|
6
|
+
import F, { actionColBtnGap as H } from "./style.mjs";
|
|
7
7
|
import "../index.mjs";
|
|
8
|
-
import
|
|
9
|
-
import { tablePaddingInline as
|
|
10
|
-
import { BitzTableContext as
|
|
11
|
-
const
|
|
12
|
-
skeletonCls:
|
|
13
|
-
...
|
|
14
|
-
}) => /* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
|
|
8
|
+
import w from "../Dropdown/index.mjs";
|
|
9
|
+
import { tablePaddingInline as O } from "../../BitzConfigProvider/context.mjs";
|
|
10
|
+
import { BitzTableContext as _ } from "../Store/index.mjs";
|
|
11
|
+
const B = ({
|
|
12
|
+
skeletonCls: c,
|
|
13
|
+
...l
|
|
14
|
+
}) => /* @__PURE__ */ n.jsxs(x, { type: "text", ...l, children: [
|
|
15
|
+
/* @__PURE__ */ n.jsx("span", { children: l.children }),
|
|
16
|
+
/* @__PURE__ */ n.jsx(
|
|
17
|
+
R,
|
|
18
18
|
{
|
|
19
19
|
active: !0,
|
|
20
20
|
title: !1,
|
|
21
|
-
className:
|
|
21
|
+
className: c,
|
|
22
22
|
paragraph: {
|
|
23
23
|
rows: 1,
|
|
24
24
|
width: "100%"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
)
|
|
28
|
-
] })
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
28
|
+
] }), q = E(
|
|
29
|
+
({ loading: c, actionGroup: l, customActions: s }, d) => {
|
|
30
|
+
const { loading: u, fullscreen: k } = L(_), r = f(() => c ?? u, [c, u]), {
|
|
31
|
+
primaryBtnClassName: o,
|
|
32
|
+
dangerBtnClassName: m,
|
|
33
|
+
secondaryBtnClassName: N,
|
|
34
|
+
maskClassName: C,
|
|
35
|
+
skeletonBtnClassName: g,
|
|
36
|
+
skeletonClassName: p
|
|
37
|
+
} = F(), j = f(() => {
|
|
38
|
+
const i = l.length >= 4 ? 2 : l.length, a = l.slice(0, i), t = [];
|
|
39
|
+
if (a != null && a.length && a.forEach((e, h) => {
|
|
40
|
+
t.push(
|
|
41
|
+
r ? /* @__PURE__ */ n.jsx(
|
|
42
|
+
B,
|
|
43
|
+
{
|
|
44
|
+
className: g,
|
|
45
|
+
skeletonCls: p,
|
|
46
|
+
children: e == null ? void 0 : e.label
|
|
47
|
+
},
|
|
48
|
+
h
|
|
49
|
+
) : e.children ? /* @__PURE__ */ n.jsx(w, { menu: { items: e.children }, children: /* @__PURE__ */ n.jsx(
|
|
50
|
+
x,
|
|
51
|
+
{
|
|
52
|
+
type: "text",
|
|
53
|
+
className: e.danger ? m : o,
|
|
54
|
+
children: e == null ? void 0 : e.label
|
|
55
|
+
}
|
|
56
|
+
) }, h) : /* @__PURE__ */ n.jsx(
|
|
57
|
+
x,
|
|
58
|
+
{
|
|
59
|
+
type: "text",
|
|
60
|
+
className: e.danger ? m : o,
|
|
61
|
+
onClick: e == null ? void 0 : e.onClick,
|
|
62
|
+
children: e == null ? void 0 : e.label
|
|
63
|
+
},
|
|
64
|
+
h
|
|
65
|
+
)
|
|
66
|
+
);
|
|
67
|
+
}), i === 2 && l.length >= 4) {
|
|
68
|
+
const e = l.slice(2, l.length);
|
|
69
|
+
t.push(
|
|
70
|
+
r ? /* @__PURE__ */ n.jsx(
|
|
71
|
+
B,
|
|
72
|
+
{
|
|
73
|
+
className: g,
|
|
74
|
+
skeletonCls: p,
|
|
75
|
+
children: "更多"
|
|
76
|
+
},
|
|
77
|
+
5
|
|
78
|
+
) : /* @__PURE__ */ n.jsx(w, { menu: { items: e }, children: /* @__PURE__ */ n.jsx(x, { type: "text", className: N, children: "更多" }) }, 5)
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
return t;
|
|
82
|
+
}, [r, l]), b = f(() => {
|
|
83
|
+
if (!(s != null && s.length))
|
|
84
|
+
return;
|
|
85
|
+
const i = s.map((t, e) => /* @__PURE__ */ n.jsx(
|
|
86
|
+
B,
|
|
87
|
+
{
|
|
88
|
+
className: g,
|
|
89
|
+
skeletonCls: p,
|
|
90
|
+
children: t == null ? void 0 : t.label
|
|
91
|
+
},
|
|
92
|
+
e
|
|
93
|
+
)), a = s.map((t, e) => {
|
|
94
|
+
let h = /* @__PURE__ */ n.jsx(
|
|
95
|
+
x,
|
|
62
96
|
{
|
|
63
97
|
type: "text",
|
|
64
|
-
className:
|
|
65
|
-
onClick:
|
|
66
|
-
children:
|
|
98
|
+
className: t.danger ? m : o,
|
|
99
|
+
onClick: t.onClick,
|
|
100
|
+
children: t == null ? void 0 : t.label
|
|
67
101
|
},
|
|
68
|
-
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const e = n.slice(2, n.length);
|
|
73
|
-
C.push(
|
|
74
|
-
o ? /* @__PURE__ */ t.jsx(
|
|
75
|
-
b,
|
|
102
|
+
e
|
|
103
|
+
);
|
|
104
|
+
t.type === "secondary" && (h = /* @__PURE__ */ n.jsx(
|
|
105
|
+
x,
|
|
76
106
|
{
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
107
|
+
type: "text",
|
|
108
|
+
className: N,
|
|
109
|
+
onClick: t.onClick,
|
|
110
|
+
children: t == null ? void 0 : t.label
|
|
80
111
|
},
|
|
81
|
-
|
|
82
|
-
)
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
112
|
+
e
|
|
113
|
+
));
|
|
114
|
+
const y = t.render ?? ((z, S) => /* @__PURE__ */ n.jsx(M, { children: z }, S));
|
|
115
|
+
return y == null ? void 0 : y(h, e);
|
|
116
|
+
});
|
|
117
|
+
return r ? i : a;
|
|
118
|
+
}, [r, s]);
|
|
119
|
+
return /* @__PURE__ */ n.jsxs("div", { onClick: (i) => i.stopPropagation(), children: [
|
|
120
|
+
/* @__PURE__ */ n.jsx(I, { size: H, ref: d, className: "actionGroup", children: b ?? j }),
|
|
121
|
+
/* @__PURE__ */ n.jsx("div", { className: C })
|
|
122
|
+
] });
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
function $(c) {
|
|
126
|
+
var C;
|
|
127
|
+
const { actionGroup: l, loading: s, customActions: d, ...u } = c, k = ((C = P.useToken().token.Table) == null ? void 0 : C.cellPaddingInline) ?? O, r = D(null), o = T(r), m = f(() => o != null && o.width ? o.width + k * 2 + 1 : 141, [o, k]);
|
|
128
|
+
return f(() => ({
|
|
129
|
+
width: Math.floor(m),
|
|
97
130
|
mobileHide: !0,
|
|
98
131
|
isOperationCol: !0,
|
|
99
132
|
title: "操作",
|
|
@@ -102,23 +135,23 @@ function K(l) {
|
|
|
102
135
|
dataIndex: "operationCol",
|
|
103
136
|
className: "operationCol",
|
|
104
137
|
disabled: !0,
|
|
105
|
-
render: (
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
E,
|
|
138
|
+
render: (g, p, j) => {
|
|
139
|
+
var a, t;
|
|
140
|
+
const b = ((a = d == null ? void 0 : d(p, j)) == null ? void 0 : a.filter((e) => e.type != "detail")) ?? [], i = ((t = l == null ? void 0 : l(p, j)) == null ? void 0 : t.filter((e) => e.type != "detail")) ?? [];
|
|
141
|
+
return /* @__PURE__ */ n.jsx(
|
|
142
|
+
q,
|
|
111
143
|
{
|
|
112
|
-
actionGroup:
|
|
113
|
-
|
|
114
|
-
|
|
144
|
+
actionGroup: i,
|
|
145
|
+
customActions: b,
|
|
146
|
+
loading: s,
|
|
147
|
+
ref: r
|
|
115
148
|
}
|
|
116
149
|
);
|
|
117
150
|
},
|
|
118
|
-
...
|
|
119
|
-
}), [
|
|
151
|
+
...u
|
|
152
|
+
}), [m, r, s, l, d]);
|
|
120
153
|
}
|
|
121
154
|
export {
|
|
122
|
-
|
|
123
|
-
|
|
155
|
+
q as BitzTableAction,
|
|
156
|
+
$ as default
|
|
124
157
|
};
|
|
@@ -2,7 +2,7 @@ declare const useGenStyle: () => {
|
|
|
2
2
|
defaultCls: string;
|
|
3
3
|
primaryBtnClassName: string;
|
|
4
4
|
dangerBtnClassName: string;
|
|
5
|
-
|
|
5
|
+
secondaryBtnClassName: string;
|
|
6
6
|
skeletonBtnClassName: string;
|
|
7
7
|
skeletonClassName: string;
|
|
8
8
|
maskClassName: string;
|
|
@@ -14,9 +14,9 @@ import { BitzTableContext as T } from "../Store/index.mjs";
|
|
|
14
14
|
import n from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
15
15
|
import E from "../../BitzTheme/index.mjs";
|
|
16
16
|
const O = () => {
|
|
17
|
-
const { tableSize:
|
|
18
|
-
H(() =>
|
|
19
|
-
const { theme:
|
|
17
|
+
const { tableSize: a } = z(T);
|
|
18
|
+
H(() => a ?? "lg", [a]);
|
|
19
|
+
const { theme: h, hashId: r, token: s } = E.useToken(), e = "actionTextBtn", i = "primaryBtn", l = "dangerBtn", c = "secondaryBtn", m = "skeletonBtn", p = "skeleton", B = "actionColMask", u = (t, o) => [
|
|
20
20
|
{
|
|
21
21
|
[`.${t}`]: {
|
|
22
22
|
fontSize: "inherit",
|
|
@@ -43,7 +43,7 @@ const O = () => {
|
|
|
43
43
|
zIndex: 1
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
],
|
|
46
|
+
], d = (t, o) => [
|
|
47
47
|
{
|
|
48
48
|
[`.${t}`]: {
|
|
49
49
|
color: o.colorPrimary,
|
|
@@ -67,7 +67,7 @@ const O = () => {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
],
|
|
70
|
+
], y = (t, o) => [
|
|
71
71
|
{
|
|
72
72
|
[`.${t}`]: {
|
|
73
73
|
color: o.colorText,
|
|
@@ -79,7 +79,7 @@ const O = () => {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
],
|
|
82
|
+
], C = (t, o) => [
|
|
83
83
|
{
|
|
84
84
|
[`.${t}`]: {
|
|
85
85
|
fontSize: "inherit",
|
|
@@ -101,25 +101,25 @@ const O = () => {
|
|
|
101
101
|
];
|
|
102
102
|
N(
|
|
103
103
|
{
|
|
104
|
-
theme:
|
|
104
|
+
theme: h,
|
|
105
105
|
token: s,
|
|
106
106
|
hashId: r,
|
|
107
107
|
path: [e]
|
|
108
108
|
},
|
|
109
109
|
() => [
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
u(e, B),
|
|
111
|
+
d(i, s),
|
|
112
112
|
g(l, s),
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
y(c, s),
|
|
114
|
+
C(m, p)
|
|
115
115
|
]
|
|
116
116
|
);
|
|
117
|
-
const
|
|
117
|
+
const v = n(e, i, r), $ = n(e, l, r), f = n(e, c, r), S = n(e, m, r), x = n(p, r), b = n(B, r);
|
|
118
118
|
return {
|
|
119
119
|
defaultCls: e,
|
|
120
|
-
primaryBtnClassName:
|
|
120
|
+
primaryBtnClassName: v,
|
|
121
121
|
dangerBtnClassName: $,
|
|
122
|
-
|
|
122
|
+
secondaryBtnClassName: f,
|
|
123
123
|
skeletonBtnClassName: S,
|
|
124
124
|
skeletonClassName: x,
|
|
125
125
|
maskClassName: b
|
|
@@ -5,7 +5,7 @@ import { AnyObject } from 'antd/es/_util/type';
|
|
|
5
5
|
import type { RowClassName } from 'rc-table/es/interface';
|
|
6
6
|
import { ColumnStateType, DensitySize, StylesStateType, ExportColumnStateType } from '../Store';
|
|
7
7
|
import { ActionsFunType, BitzTableColumnsType, SelelctionAlertProps } from '..';
|
|
8
|
-
import { BitzTableBorderedType } from '
|
|
8
|
+
import { BitzTableBorderedType } from '../../BitzConfigProvider/context';
|
|
9
9
|
import './index.less';
|
|
10
10
|
export interface BitzTableProps<RecordType = any> extends Omit<TableProps<RecordType>, 'size' | 'pagination' | 'bordered'> {
|
|
11
11
|
/** 是否开启rowHover样式 */
|
|
@@ -18,6 +18,8 @@ export interface BitzTableProps<RecordType = any> extends Omit<TableProps<Record
|
|
|
18
18
|
showPagination?: boolean;
|
|
19
19
|
/** PC端:BitzTable组件的整体高度,由外部通过视口高度减去其他元素高度和间隙的结果 */
|
|
20
20
|
height?: number;
|
|
21
|
+
/** PC端:当height小于minHeight时使用minHeight */
|
|
22
|
+
minHeight?: number;
|
|
21
23
|
/** table可滚动区域的最大宽高的值 */
|
|
22
24
|
scroll?: {
|
|
23
25
|
x?: number;
|