bitz-react-admin-ui 1.7.9 → 1.8.1
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/components/BitzConfigProvider/index.d.ts +10 -5
- package/dist/components/BitzConfirmModal/index.d.ts +3 -6
- package/dist/components/BitzTable/ActionBar/style.mjs +57 -34
- package/dist/components/BitzTable/ActionCol/style.mjs +75 -72
- package/dist/components/BitzTable/Store/index.d.ts +2 -2
- package/dist/components/BitzTable/Store/index.mjs +89 -88
- package/dist/components/BitzTable/Table/index.mjs +204 -194
- package/dist/components/BitzTable/ToolBar/DensityIcon/index.mjs +15 -15
- package/dist/components/BitzTable/ToolBar/style.mjs +68 -35
- package/dist/components/BitzTable/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -4,6 +4,11 @@ import { AliasToken } from 'antd/es/theme/internal';
|
|
|
4
4
|
import { ComponentTokenMap } from 'antd/lib/theme/interface/components';
|
|
5
5
|
import { FC } from 'react';
|
|
6
6
|
import { BitzConfigProviderContextProps } from './context';
|
|
7
|
+
interface TableConfigBySize {
|
|
8
|
+
fontSize?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
lineHeight?: number;
|
|
11
|
+
}
|
|
7
12
|
/** 给ant table组件添加design token */
|
|
8
13
|
export interface BitzTableComponentToken extends TableComponentToken {
|
|
9
14
|
/** 工具栏背景颜色 */
|
|
@@ -15,15 +20,15 @@ export interface BitzTableComponentToken extends TableComponentToken {
|
|
|
15
20
|
/** 展开按钮border颜色 */
|
|
16
21
|
expandIconBorderColor?: string;
|
|
17
22
|
/** xl */
|
|
18
|
-
|
|
23
|
+
xlTable?: TableConfigBySize;
|
|
19
24
|
/** lg */
|
|
20
|
-
|
|
25
|
+
lgTable?: TableConfigBySize;
|
|
21
26
|
/** md */
|
|
22
|
-
|
|
27
|
+
mdTable?: TableConfigBySize;
|
|
23
28
|
/** sm */
|
|
24
|
-
|
|
29
|
+
smTable?: TableConfigBySize;
|
|
25
30
|
/** xs */
|
|
26
|
-
|
|
31
|
+
xsTable?: TableConfigBySize;
|
|
27
32
|
/** list背景颜色 移动端 */
|
|
28
33
|
mobileListBgColor?: string;
|
|
29
34
|
/** listItem背景颜色 移动端 */
|
|
@@ -3,11 +3,7 @@ import { ModalProps } from 'antd';
|
|
|
3
3
|
import { NiceModalHandler } from '@ebay/nice-modal-react';
|
|
4
4
|
import './index.less';
|
|
5
5
|
export interface BitzConfirmModalProps extends Omit<ModalProps, 'onOk' | 'onCancel'> {
|
|
6
|
-
|
|
7
|
-
okType: any;
|
|
8
|
-
/**
|
|
9
|
-
* 内容文字
|
|
10
|
-
*/
|
|
6
|
+
/** 内容文字 */
|
|
11
7
|
modalText?: ReactNode;
|
|
12
8
|
/** 点击ok按钮,返回'yes' */
|
|
13
9
|
onOk?: () => Promise<any>;
|
|
@@ -15,7 +11,8 @@ export interface BitzConfirmModalProps extends Omit<ModalProps, 'onOk' | 'onCanc
|
|
|
15
11
|
onCancel?: () => any;
|
|
16
12
|
}
|
|
17
13
|
export type BitzConfirmModalResolveType = 'ok' | 'cancel';
|
|
18
|
-
export interface BitzConfirmModalHandler extends Omit<NiceModalHandler
|
|
14
|
+
export interface BitzConfirmModalHandler extends Omit<NiceModalHandler<BitzConfirmModalProps>, 'resolve' | 'show'> {
|
|
15
|
+
show: (args?: BitzConfirmModalProps) => Promise<BitzConfirmModalResolveType>;
|
|
19
16
|
resolve: (args?: BitzConfirmModalResolveType) => void;
|
|
20
17
|
}
|
|
21
18
|
declare const _default: FC<BitzConfirmModalProps & import("@ebay/nice-modal-react").NiceModalHocProps>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { useContext as
|
|
2
|
-
import { theme as B } from "antd";
|
|
1
|
+
import { useContext as D, useMemo as v } from "react";
|
|
3
2
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/extractStyle.mjs";
|
|
4
3
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.mjs";
|
|
5
4
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/StyleContext.mjs";
|
|
@@ -9,32 +8,56 @@ import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@an
|
|
|
9
8
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.mjs";
|
|
10
9
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.mjs";
|
|
11
10
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useHMR.mjs";
|
|
12
|
-
import
|
|
11
|
+
import A from "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.mjs";
|
|
13
12
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
import { TableContext as N } from "../Store/index.mjs";
|
|
14
|
+
import z from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
15
|
+
import w from "../../BitzTheme/index.mjs";
|
|
16
|
+
const Q = (m) => {
|
|
17
|
+
const { theme: g, hashId: n, token: i } = w.useToken(), { tableSize: s } = D(N), h = v(() => m ?? s ?? "lg", [m, s]), r = "bitzTableActionBarBlock", a = "actionBtn", c = "ActionBtn", p = "dropdownBtn", u = (o, l, t, e) => {
|
|
18
|
+
var $, b, T, S, f;
|
|
19
|
+
return [
|
|
20
|
+
{
|
|
21
|
+
[`.${o} .${l}`]: {
|
|
22
|
+
height: "100%",
|
|
23
|
+
borderRadius: 0,
|
|
24
|
+
paddingBlock: 0,
|
|
25
|
+
borderColor: "transparent",
|
|
26
|
+
lineHeight: "normal",
|
|
27
|
+
".ant-btn-icon .anticon": {
|
|
28
|
+
verticalAlign: "-0.14em"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
[`.${o} .xl${t}`]: {
|
|
34
|
+
fontSize: ($ = e.Table.xlTable) == null ? void 0 : $.fontSize
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
[`.${o} .lg${t}`]: {
|
|
39
|
+
fontSize: (b = e.Table.lgTable) == null ? void 0 : b.fontSize
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
[`.${o} .md${t}`]: {
|
|
44
|
+
fontSize: (T = e.Table.mdTable) == null ? void 0 : T.fontSize
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
[`.${o} .sm${t}`]: {
|
|
49
|
+
fontSize: (S = e.Table.smTable) == null ? void 0 : S.fontSize
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
[`.${o} .xs${t}`]: {
|
|
54
|
+
fontSize: (f = e.Table.xsTable) == null ? void 0 : f.fontSize
|
|
27
55
|
}
|
|
28
56
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
{ [`.${o} .lg${t}`]: { fontSize: 12 } },
|
|
32
|
-
{ [`.${o} .md${t}`]: { fontSize: 12 } },
|
|
33
|
-
{ [`.${o} .sm${t}`]: { fontSize: 12 } },
|
|
34
|
-
{ [`.${o} .xs${t}`]: { fontSize: 12 } }
|
|
35
|
-
], g = (o, i, t) => [
|
|
57
|
+
];
|
|
58
|
+
}, B = (o, l, t) => [
|
|
36
59
|
{
|
|
37
|
-
[`.${o} .${
|
|
60
|
+
[`.${o} .${l}`]: {
|
|
38
61
|
"&:hover": {
|
|
39
62
|
color: `${t.colorText} !important`
|
|
40
63
|
},
|
|
@@ -50,21 +73,21 @@ const F = (m) => {
|
|
|
50
73
|
}
|
|
51
74
|
}
|
|
52
75
|
];
|
|
53
|
-
|
|
76
|
+
A(
|
|
54
77
|
{
|
|
55
|
-
theme:
|
|
56
|
-
token:
|
|
57
|
-
hashId:
|
|
58
|
-
path: [
|
|
78
|
+
theme: g,
|
|
79
|
+
token: i,
|
|
80
|
+
hashId: n,
|
|
81
|
+
path: [r]
|
|
59
82
|
},
|
|
60
83
|
() => [
|
|
61
|
-
|
|
62
|
-
|
|
84
|
+
u(r, a, c, i),
|
|
85
|
+
B(r, p, i)
|
|
63
86
|
]
|
|
64
87
|
);
|
|
65
|
-
const
|
|
66
|
-
return { blockCls:
|
|
88
|
+
const d = `${h}${c}`, x = z(a, d, n), y = z(a, p, d, n);
|
|
89
|
+
return { blockCls: r, addBtnClassName: x, btnClassName: y };
|
|
67
90
|
};
|
|
68
91
|
export {
|
|
69
|
-
|
|
92
|
+
Q as default
|
|
70
93
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useContext as
|
|
1
|
+
import { useContext as G, useMemo as R } from "react";
|
|
2
2
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/extractStyle.mjs";
|
|
3
3
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.mjs";
|
|
4
4
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/StyleContext.mjs";
|
|
@@ -8,43 +8,46 @@ import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@an
|
|
|
8
8
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.mjs";
|
|
9
9
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.mjs";
|
|
10
10
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useHMR.mjs";
|
|
11
|
-
import
|
|
11
|
+
import j from "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.mjs";
|
|
12
12
|
import "../../../node_modules/.store/@ant-design_cssinjs@1.18.4/node_modules/@ant-design/cssinjs/es/transformers/legacyLogicalProperties.mjs";
|
|
13
|
-
import { TableContext as
|
|
13
|
+
import { TableContext as q } from "../Store/index.mjs";
|
|
14
14
|
import n from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
15
|
-
import
|
|
16
|
-
const
|
|
17
|
-
const { tableSize:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
15
|
+
import F from "../../BitzTheme/index.mjs";
|
|
16
|
+
const eo = () => {
|
|
17
|
+
const { tableSize: a } = G(q), f = R(() => a ?? "lg", [a]), { theme: h, hashId: e, token: s } = F.useToken(), c = "ActionTextBtn", r = "actionTextBtn", m = "primaryBtn", p = "delBtn", d = "dropdownBtn", $ = "skeletonBtn", B = "skeleton", S = "actionColMask", u = 24, y = (t, o, A, i) => {
|
|
18
|
+
var T, b, g, z, v;
|
|
19
|
+
return [
|
|
20
|
+
{
|
|
21
|
+
[`.${t}`]: {
|
|
22
|
+
padding: 0,
|
|
23
|
+
margin: 0,
|
|
24
|
+
background: "inherit",
|
|
25
|
+
border: "none",
|
|
26
|
+
height: "auto",
|
|
27
|
+
zIndex: 2,
|
|
28
|
+
"&:hover": {
|
|
29
|
+
background: "inherit !important"
|
|
30
|
+
},
|
|
31
|
+
"&:active": {
|
|
32
|
+
background: "inherit !important"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{ [`.xl${o}`]: { fontSize: (T = i.Table.xlTable) == null ? void 0 : T.fontSize } },
|
|
37
|
+
{ [`.lg${o}`]: { fontSize: (b = i.Table.lgTable) == null ? void 0 : b.fontSize } },
|
|
38
|
+
{ [`.md${o}`]: { fontSize: (g = i.Table.mdTable) == null ? void 0 : g.fontSize } },
|
|
39
|
+
{ [`.sm${o}`]: { fontSize: (z = i.Table.smTable) == null ? void 0 : z.fontSize } },
|
|
40
|
+
{ [`.xs${o}`]: { fontSize: (v = i.Table.xsTable) == null ? void 0 : v.fontSize } },
|
|
41
|
+
{
|
|
42
|
+
[`.${A}`]: {
|
|
43
|
+
position: "absolute",
|
|
44
|
+
insetBlock: -1,
|
|
45
|
+
insetInline: 0,
|
|
46
|
+
zIndex: 1
|
|
31
47
|
}
|
|
32
48
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
{ [`.lg${o}`]: { fontSize: 12 } },
|
|
36
|
-
{ [`.md${o}`]: { fontSize: 12 } },
|
|
37
|
-
{ [`.sm${o}`]: { fontSize: 11 } },
|
|
38
|
-
{ [`.xs${o}`]: { fontSize: 11 } },
|
|
39
|
-
{
|
|
40
|
-
[`.${E}`]: {
|
|
41
|
-
position: "absolute",
|
|
42
|
-
insetBlock: -1,
|
|
43
|
-
insetInline: 0,
|
|
44
|
-
zIndex: 1
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
], y = (t, o) => [
|
|
49
|
+
];
|
|
50
|
+
}, C = (t, o) => [
|
|
48
51
|
{
|
|
49
52
|
[`.${t}`]: {
|
|
50
53
|
color: o.colorPrimary,
|
|
@@ -56,7 +59,7 @@ const X = () => {
|
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
|
-
],
|
|
62
|
+
], x = (t, o) => [
|
|
60
63
|
{
|
|
61
64
|
[`.${t}`]: {
|
|
62
65
|
color: o.colorError,
|
|
@@ -68,7 +71,7 @@ const X = () => {
|
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
73
|
}
|
|
71
|
-
],
|
|
74
|
+
], N = (t, o) => [
|
|
72
75
|
{
|
|
73
76
|
[`.${t}`]: {
|
|
74
77
|
color: o.colorText,
|
|
@@ -80,7 +83,7 @@ const X = () => {
|
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
85
|
}
|
|
83
|
-
],
|
|
86
|
+
], H = (t, o) => [
|
|
84
87
|
{
|
|
85
88
|
[`.${t}`]: {
|
|
86
89
|
pointerEvents: "none",
|
|
@@ -96,49 +99,49 @@ const X = () => {
|
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
101
|
];
|
|
99
|
-
|
|
102
|
+
j(
|
|
100
103
|
{
|
|
101
|
-
theme:
|
|
102
|
-
token:
|
|
103
|
-
hashId:
|
|
104
|
-
path: [
|
|
104
|
+
theme: h,
|
|
105
|
+
token: s,
|
|
106
|
+
hashId: e,
|
|
107
|
+
path: [r]
|
|
105
108
|
},
|
|
106
109
|
() => [
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
y(r, c, S, s),
|
|
111
|
+
C(m, s),
|
|
112
|
+
x(p, s),
|
|
113
|
+
N(d, s),
|
|
114
|
+
H($, B)
|
|
112
115
|
]
|
|
113
116
|
);
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
),
|
|
120
|
-
|
|
121
|
-
p,
|
|
122
|
-
s,
|
|
123
|
-
r
|
|
124
|
-
), b = n(
|
|
125
|
-
e,
|
|
117
|
+
const l = `${f}${c}`, E = n(
|
|
118
|
+
r,
|
|
119
|
+
m,
|
|
120
|
+
l,
|
|
121
|
+
e
|
|
122
|
+
), w = n(r, p, l, e), I = n(
|
|
123
|
+
r,
|
|
126
124
|
d,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
),
|
|
125
|
+
l,
|
|
126
|
+
e
|
|
127
|
+
), D = n(
|
|
128
|
+
r,
|
|
129
|
+
$,
|
|
130
|
+
l,
|
|
131
|
+
e
|
|
132
|
+
), P = n(B, e), M = n(S, e);
|
|
130
133
|
return {
|
|
131
|
-
gap:
|
|
132
|
-
defaultCls:
|
|
133
|
-
sizeCls:
|
|
134
|
-
primaryBtnClassName:
|
|
135
|
-
dangerBtnClassName:
|
|
136
|
-
dropdownBtnClassName:
|
|
137
|
-
skeletonBtnClassName:
|
|
138
|
-
skeletonClassName:
|
|
139
|
-
maskClassName:
|
|
134
|
+
gap: u,
|
|
135
|
+
defaultCls: r,
|
|
136
|
+
sizeCls: l,
|
|
137
|
+
primaryBtnClassName: E,
|
|
138
|
+
dangerBtnClassName: w,
|
|
139
|
+
dropdownBtnClassName: I,
|
|
140
|
+
skeletonBtnClassName: D,
|
|
141
|
+
skeletonClassName: P,
|
|
142
|
+
maskClassName: M
|
|
140
143
|
};
|
|
141
144
|
};
|
|
142
145
|
export {
|
|
143
|
-
|
|
146
|
+
eo as default
|
|
144
147
|
};
|
|
@@ -56,7 +56,7 @@ declare function useContainer(props: UseContainerProps): {
|
|
|
56
56
|
onlineSizeChange: ((key: any, sizeState: DensitySize) => void) | undefined;
|
|
57
57
|
columns: BitzTableColumnsType<any> | undefined;
|
|
58
58
|
clearPersistenceStorage: () => void;
|
|
59
|
-
defaultColumnKeyMap: Record<string,
|
|
59
|
+
defaultColumnKeyMap: Record<string, ColumnsConfigProps>;
|
|
60
60
|
};
|
|
61
61
|
declare const TableContext: import("react").Context<{
|
|
62
62
|
uuid: string;
|
|
@@ -74,7 +74,7 @@ declare const TableContext: import("react").Context<{
|
|
|
74
74
|
onlineSizeChange: ((key: any, sizeState: DensitySize) => void) | undefined;
|
|
75
75
|
columns: BitzTableColumnsType<any> | undefined;
|
|
76
76
|
clearPersistenceStorage: () => void;
|
|
77
|
-
defaultColumnKeyMap: Record<string,
|
|
77
|
+
defaultColumnKeyMap: Record<string, ColumnsConfigProps>;
|
|
78
78
|
}>;
|
|
79
79
|
export type ContainerType = typeof useContainer;
|
|
80
80
|
declare const Container: React.FC<{
|