doui-react 2.0.1 → 2.0.2
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/es/api/component/react-dom.js +11 -7
- package/es/checkbox/component/utils.js +1 -1
- package/es/form/component/utils.d.ts +7 -7
- package/es/grid/component/pagination.d.ts +10 -10
- package/es/icon/hook/index.d.ts +258 -258
- package/es/open-modal/component/modal.js +2 -0
- package/es/open-modal/style/index.js +2 -1
- package/es/radio/component/abstract-box.d.ts +29 -29
- package/es/table/component/table.js +9 -2
- package/es/table/component/utils.js +4 -5
- package/es/tabs/component/utils.d.ts +4 -4
- package/es/tooltip/component/index.d.ts +6 -6
- package/es/virtual-list/component/index.d.ts +1 -1
- package/es/virtual-list/component/index.js +4 -2
- package/es/virtual-list/type/index.d.ts +2 -1
- package/lib/api/component/react-dom.js +13 -9
- package/lib/checkbox/component/utils.js +1 -1
- package/lib/form/component/utils.d.ts +7 -7
- package/lib/grid/component/pagination.d.ts +10 -10
- package/lib/icon/hook/index.d.ts +258 -258
- package/lib/open-modal/component/modal.js +2 -0
- package/lib/open-modal/style/index.js +2 -1
- package/lib/radio/component/abstract-box.d.ts +35 -35
- package/lib/table/component/table.js +8 -1
- package/lib/table/component/utils.js +4 -5
- package/lib/tabs/component/utils.d.ts +4 -4
- package/lib/tooltip/component/index.d.ts +6 -6
- package/lib/virtual-list/component/index.d.ts +1 -1
- package/lib/virtual-list/component/index.js +4 -2
- package/lib/virtual-list/type/index.d.ts +2 -1
- package/package.json +2 -1
|
@@ -36,24 +36,24 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
36
36
|
defaultVisible?: boolean | undefined;
|
|
37
37
|
onVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
38
38
|
afterVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
39
|
-
prefixCls?: string | undefined;
|
|
40
|
-
id?: string | undefined;
|
|
41
39
|
animation?: string | undefined;
|
|
42
40
|
transitionName?: string | undefined;
|
|
43
|
-
|
|
41
|
+
prefixCls?: string | undefined;
|
|
44
42
|
zIndex?: number | undefined;
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
forceRender?: boolean | undefined;
|
|
44
|
+
id?: string | undefined;
|
|
47
45
|
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
48
|
-
|
|
49
|
-
fresh?: boolean | undefined;
|
|
50
|
-
mouseLeaveDelay?: number | undefined;
|
|
46
|
+
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
51
47
|
mouseEnterDelay?: number | undefined;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
overlayStyle?: import("react").CSSProperties | undefined;
|
|
48
|
+
mouseLeaveDelay?: number | undefined;
|
|
49
|
+
onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
|
|
55
50
|
overlayClassName?: string | undefined;
|
|
51
|
+
overlayStyle?: import("react").CSSProperties | undefined;
|
|
52
|
+
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
53
|
+
popupVisible?: boolean | undefined;
|
|
54
|
+
fresh?: boolean | undefined;
|
|
56
55
|
getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
|
|
56
|
+
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
57
57
|
arrowContent?: import("react").ReactNode;
|
|
58
58
|
overlayInnerStyle?: import("react").CSSProperties | undefined;
|
|
59
59
|
};
|
|
@@ -65,49 +65,48 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
65
65
|
value?: any;
|
|
66
66
|
boxTooltip?: import("react").ReactNode | import("antd").TooltipProps;
|
|
67
67
|
inGroup?: boolean | undefined;
|
|
68
|
-
name?: string | undefined;
|
|
69
|
-
prefixCls?: string | undefined;
|
|
70
68
|
className?: string | undefined;
|
|
69
|
+
style?: import("react").CSSProperties | undefined;
|
|
70
|
+
title?: string | undefined;
|
|
71
|
+
prefixCls?: string | undefined;
|
|
71
72
|
rootClassName?: string | undefined;
|
|
73
|
+
name?: string | undefined;
|
|
72
74
|
disabled?: boolean | undefined;
|
|
73
|
-
style?: import("react").CSSProperties | undefined;
|
|
74
|
-
indeterminate?: boolean | undefined;
|
|
75
75
|
defaultChecked?: boolean | undefined;
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
autoFocus?: boolean | undefined;
|
|
77
|
+
id?: string | undefined;
|
|
78
|
+
tabIndex?: number | undefined;
|
|
79
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
80
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
78
81
|
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
79
82
|
onMouseEnter?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
80
83
|
onMouseLeave?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
81
|
-
onKeyPress?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
82
|
-
onKeyDown?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
83
|
-
tabIndex?: number | undefined;
|
|
84
|
-
id?: string | undefined;
|
|
85
|
-
autoFocus?: boolean | undefined;
|
|
86
84
|
type?: string | undefined;
|
|
85
|
+
checked?: boolean | undefined;
|
|
86
|
+
indeterminate?: boolean | undefined;
|
|
87
87
|
skipGroup?: boolean | undefined;
|
|
88
88
|
required?: boolean | undefined;
|
|
89
|
+
slot?: string | undefined;
|
|
90
|
+
dir?: string | undefined;
|
|
91
|
+
content?: string | undefined;
|
|
92
|
+
onSubmit?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
89
93
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
90
|
-
'aria-label'?: string | undefined;
|
|
91
|
-
direction?: import("antd/es/config-provider").DirectionType;
|
|
92
94
|
suppressContentEditableWarning?: boolean | undefined;
|
|
93
95
|
suppressHydrationWarning?: boolean | undefined;
|
|
94
96
|
accessKey?: string | undefined;
|
|
95
|
-
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" |
|
|
97
|
+
autoCapitalize?: (string & {}) | "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
96
98
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
97
99
|
contextMenu?: string | undefined;
|
|
98
|
-
dir?: string | undefined;
|
|
99
100
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
100
101
|
enterKeyHint?: "search" | "enter" | "done" | "go" | "next" | "previous" | "send" | undefined;
|
|
101
102
|
hidden?: boolean | undefined;
|
|
102
103
|
lang?: string | undefined;
|
|
103
104
|
nonce?: string | undefined;
|
|
104
|
-
slot?: string | undefined;
|
|
105
105
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
106
106
|
translate?: "yes" | "no" | undefined;
|
|
107
107
|
radioGroup?: string | undefined;
|
|
108
108
|
role?: import("react").AriaRole | undefined;
|
|
109
109
|
about?: string | undefined;
|
|
110
|
-
content?: string | undefined;
|
|
111
110
|
datatype?: string | undefined;
|
|
112
111
|
inlist?: any;
|
|
113
112
|
prefix?: string | undefined;
|
|
@@ -128,13 +127,13 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
128
127
|
results?: number | undefined;
|
|
129
128
|
security?: string | undefined;
|
|
130
129
|
unselectable?: "off" | "on" | undefined;
|
|
131
|
-
inputMode?: "
|
|
130
|
+
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
132
131
|
is?: string | undefined;
|
|
133
132
|
exportparts?: string | undefined;
|
|
134
133
|
part?: string | undefined;
|
|
135
134
|
"aria-activedescendant"?: string | undefined;
|
|
136
135
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
137
|
-
"aria-autocomplete"?: "
|
|
136
|
+
"aria-autocomplete"?: "inline" | "none" | "list" | "both" | undefined;
|
|
138
137
|
"aria-braillelabel"?: string | undefined;
|
|
139
138
|
"aria-brailleroledescription"?: string | undefined;
|
|
140
139
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -144,27 +143,28 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
144
143
|
"aria-colindextext"?: string | undefined;
|
|
145
144
|
"aria-colspan"?: number | undefined;
|
|
146
145
|
"aria-controls"?: string | undefined;
|
|
147
|
-
"aria-current"?: boolean | "true" | "false" | "page" | "step" | "location" | "date" |
|
|
146
|
+
"aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
148
147
|
"aria-describedby"?: string | undefined;
|
|
149
148
|
"aria-description"?: string | undefined;
|
|
150
149
|
"aria-details"?: string | undefined;
|
|
151
150
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
152
|
-
"aria-dropeffect"?: "
|
|
151
|
+
"aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
153
152
|
"aria-errormessage"?: string | undefined;
|
|
154
153
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
155
154
|
"aria-flowto"?: string | undefined;
|
|
156
155
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
157
|
-
"aria-haspopup"?: boolean | "
|
|
156
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "tree" | "true" | "false" | "grid" | "listbox" | undefined;
|
|
158
157
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
159
158
|
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
160
159
|
"aria-keyshortcuts"?: string | undefined;
|
|
160
|
+
'aria-label'?: string | undefined;
|
|
161
161
|
"aria-labelledby"?: string | undefined;
|
|
162
162
|
"aria-level"?: number | undefined;
|
|
163
163
|
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
164
164
|
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
165
165
|
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
166
166
|
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
167
|
-
"aria-orientation"?: "
|
|
167
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
168
168
|
"aria-owns"?: string | undefined;
|
|
169
169
|
"aria-placeholder"?: string | undefined;
|
|
170
170
|
"aria-posinset"?: number | undefined;
|
|
@@ -208,7 +208,6 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
208
208
|
onInputCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
209
209
|
onReset?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
210
210
|
onResetCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
211
|
-
onSubmit?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
212
211
|
onSubmitCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
213
212
|
onInvalid?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
214
213
|
onInvalidCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
@@ -337,6 +336,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
337
336
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
338
337
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
339
338
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
339
|
+
direction?: import("antd/es/config-provider").DirectionType;
|
|
340
340
|
rows?: number | false | undefined;
|
|
341
341
|
tooltip?: import("react").ReactNode | import("antd").TooltipProps;
|
|
342
342
|
autoShowTooltip?: boolean | undefined;
|
|
@@ -106,12 +106,19 @@ function useInit(_ref2) {
|
|
|
106
106
|
selectedRowKeys: selectedRowKeys,
|
|
107
107
|
setSelectedRowKeys: function setSelectedRowKeys() {
|
|
108
108
|
var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
109
|
-
|
|
109
|
+
updateSelectedStatus(keys);
|
|
110
|
+
_setSelectedRowKeys(keys);
|
|
110
111
|
},
|
|
111
112
|
operation: operation,
|
|
112
113
|
rowKey: rowKey,
|
|
113
114
|
editorValueKey: editorValueKey
|
|
114
115
|
});
|
|
116
|
+
function updateSelectedStatus(keys) {
|
|
117
|
+
_lodash.default.forEach(dataSource, function (item) {
|
|
118
|
+
var checked = (0, _api.includesNonStrictMode)(keys, item[rowKey]);
|
|
119
|
+
_lodash.default.set(item, '__selected__', checked);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
115
122
|
function refresh() {
|
|
116
123
|
return _refresh.apply(this, arguments);
|
|
117
124
|
}
|
|
@@ -149,8 +149,7 @@ function getRowSelection(_ref3) {
|
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
151
|
var selectedRowKeys = context.selectedRowKeys,
|
|
152
|
-
setSelectedRowKeys = context.setSelectedRowKeys
|
|
153
|
-
dataSource = context.dataSource;
|
|
152
|
+
setSelectedRowKeys = context.setSelectedRowKeys;
|
|
154
153
|
var type = column.type,
|
|
155
154
|
disabled = column.disabled,
|
|
156
155
|
onClick = column.onClick,
|
|
@@ -173,14 +172,14 @@ function getRowSelection(_ref3) {
|
|
|
173
172
|
var rowKeys = keys || _lodash.default.map(selectedRows, rowKey);
|
|
174
173
|
setSelectedRowKeys(rowKeys);
|
|
175
174
|
},
|
|
176
|
-
onSelectAll: function onSelectAll(selected) {
|
|
175
|
+
onSelectAll: function onSelectAll(selected, selectedRows) {
|
|
177
176
|
if (selected) {
|
|
178
|
-
var
|
|
177
|
+
var _selected = _lodash.default.filter(selectedRows, function (record) {
|
|
179
178
|
return !(0, _api.executeFunction)(disabled, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, context), {}, {
|
|
180
179
|
record: record
|
|
181
180
|
}));
|
|
182
181
|
});
|
|
183
|
-
setSelectedRowKeys(_lodash.default.map(
|
|
182
|
+
setSelectedRowKeys(_lodash.default.map(_selected, rowKey));
|
|
184
183
|
return;
|
|
185
184
|
}
|
|
186
185
|
setSelectedRowKeys([]);
|
|
@@ -6,17 +6,17 @@ export declare function getRenderTabBar({ type, items, size, tabBarGutter, tabBa
|
|
|
6
6
|
export declare function generateTabItems({ items }: TabsProps): {
|
|
7
7
|
label: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
8
|
key: string;
|
|
9
|
-
prefixCls?: string | undefined;
|
|
10
9
|
className?: string | undefined;
|
|
11
10
|
style?: import("react").CSSProperties | undefined;
|
|
12
|
-
disabled?: boolean | undefined;
|
|
13
11
|
children?: import("react").ReactNode;
|
|
14
|
-
id?: string | undefined;
|
|
15
12
|
closable?: boolean | undefined;
|
|
13
|
+
prefixCls?: string | undefined;
|
|
16
14
|
closeIcon?: import("react").ReactNode;
|
|
15
|
+
forceRender?: boolean | undefined;
|
|
16
|
+
disabled?: boolean | undefined;
|
|
17
|
+
id?: string | undefined;
|
|
17
18
|
active?: boolean | undefined;
|
|
18
19
|
icon?: import("react").ReactNode;
|
|
19
|
-
forceRender?: boolean | undefined;
|
|
20
20
|
destroyInactiveTabPane?: boolean | undefined;
|
|
21
21
|
animated?: boolean | undefined;
|
|
22
22
|
tabKey?: string | undefined;
|
|
@@ -34,21 +34,21 @@ export declare function getTooltipProps(props: TooltipProps): {
|
|
|
34
34
|
defaultVisible?: boolean | undefined;
|
|
35
35
|
onVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
36
36
|
afterVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
37
|
-
zIndex?: number | undefined;
|
|
38
37
|
animation?: string | undefined;
|
|
39
|
-
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
40
|
-
id?: string | undefined;
|
|
41
|
-
prefixCls?: string | undefined;
|
|
42
38
|
transitionName?: string | undefined;
|
|
39
|
+
prefixCls?: string | undefined;
|
|
40
|
+
zIndex?: number | undefined;
|
|
41
|
+
forceRender?: boolean | undefined;
|
|
42
|
+
id?: string | undefined;
|
|
43
|
+
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
44
|
+
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
43
45
|
mouseEnterDelay?: number | undefined;
|
|
44
46
|
mouseLeaveDelay?: number | undefined;
|
|
45
47
|
onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
|
|
46
48
|
overlayClassName?: string | undefined;
|
|
47
|
-
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
48
49
|
overlayStyle?: import("react").CSSProperties | undefined;
|
|
49
50
|
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
50
51
|
popupVisible?: boolean | undefined;
|
|
51
|
-
forceRender?: boolean | undefined;
|
|
52
52
|
fresh?: boolean | undefined;
|
|
53
53
|
getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
|
|
54
54
|
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { VirtualListProps } from "..";
|
|
2
|
-
export declare function VirtualList({ data, emptyText, children, ...props }: VirtualListProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function VirtualList({ refs, data, emptyText, children, ...props }: VirtualListProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -11,9 +11,10 @@ var _empty = require("../../empty");
|
|
|
11
11
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
12
12
|
var _reactVirtuoso = require("react-virtuoso");
|
|
13
13
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
14
|
-
var _excluded = ["data", "emptyText", "children"];
|
|
14
|
+
var _excluded = ["refs", "data", "emptyText", "children"];
|
|
15
15
|
function VirtualList(_ref) {
|
|
16
|
-
var
|
|
16
|
+
var refs = _ref.refs,
|
|
17
|
+
data = _ref.data,
|
|
17
18
|
emptyText = _ref.emptyText,
|
|
18
19
|
children = _ref.children,
|
|
19
20
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -27,6 +28,7 @@ function VirtualList(_ref) {
|
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
30
|
return (0, _jsxRuntime.jsx)(_reactVirtuoso.Virtuoso, (0, _objectSpread2.default)({
|
|
31
|
+
ref: refs,
|
|
30
32
|
data: data,
|
|
31
33
|
itemContent: function itemContent(index, item, context) {
|
|
32
34
|
return children(item, index, context);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { BaseComponentProps } from "../../api";
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
import { VirtuosoProps } from 'react-virtuoso';
|
|
3
|
-
export interface VirtualListProps extends Omit<VirtuosoProps<any, any>, 'children'
|
|
4
|
+
export interface VirtualListProps extends Omit<VirtuosoProps<any, any>, 'children'>, BaseComponentProps {
|
|
4
5
|
/**
|
|
5
6
|
* @description 数据
|
|
6
7
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doui-react",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "A React UI library based on Ant Design",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"prepare": "if [ -z \"$SKIP_PREPARE\" ]; then yarn setup; fi",
|
|
22
22
|
"prepublishOnly": "yarn lint && yarn build",
|
|
23
23
|
"preview:docs": "dumi preview --port 3060",
|
|
24
|
+
"pub": "npm version patch && npm publish",
|
|
24
25
|
"setup": "husky && dumi setup && patch-package",
|
|
25
26
|
"test": "jest --coverage"
|
|
26
27
|
},
|