doui-react 2.0.0 → 2.0.1-dev
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/form/component/form-item-map.d.ts +1 -0
- package/es/form/component/form-item-map.js +2 -1
- package/es/form/component/utils.d.ts +7 -7
- package/es/form/component/utils.js +1 -1
- package/es/grid/component/pagination.d.ts +10 -10
- package/es/hooks/hook/use-fetch.js +5 -12
- package/es/icon/hook/index.d.ts +258 -258
- package/es/open-modal/component/index.js +16 -1
- package/es/open-modal/component/modal.js +2 -0
- package/es/open-modal/style/index.js +2 -1
- package/es/open-modal/type/index.d.ts +5 -0
- package/es/radio/component/abstract-box.d.ts +61 -61
- package/es/radio/component/utils.js +1 -1
- package/es/select/component/use-select-options.d.ts +1 -1
- package/es/select/component/use-select-options.js +5 -2
- package/es/select/type/index.d.ts +2 -1
- package/es/table/component/utils.js +4 -5
- package/es/tabs/component/utils.d.ts +6 -6
- 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/form/component/form-item-map.d.ts +1 -0
- package/lib/form/component/form-item-map.js +2 -1
- package/lib/form/component/utils.d.ts +7 -7
- package/lib/form/component/utils.js +1 -1
- package/lib/grid/component/pagination.d.ts +10 -10
- package/lib/hooks/hook/use-fetch.js +5 -12
- package/lib/icon/hook/index.d.ts +258 -258
- package/lib/open-modal/component/index.js +17 -1
- package/lib/open-modal/component/modal.js +2 -0
- package/lib/open-modal/style/index.js +2 -1
- package/lib/open-modal/type/index.d.ts +5 -0
- package/lib/radio/component/abstract-box.d.ts +61 -61
- package/lib/radio/component/utils.js +1 -1
- package/lib/select/component/use-select-options.d.ts +1 -1
- package/lib/select/component/use-select-options.js +5 -2
- package/lib/select/type/index.d.ts +2 -1
- package/lib/table/component/utils.js +4 -5
- package/lib/tabs/component/utils.d.ts +6 -6
- 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 +1 -1
|
@@ -36,21 +36,21 @@ 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
|
-
zIndex?: number | undefined;
|
|
40
39
|
animation?: string | undefined;
|
|
41
|
-
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
42
|
-
id?: string | undefined;
|
|
43
|
-
prefixCls?: string | undefined;
|
|
44
40
|
transitionName?: string | undefined;
|
|
41
|
+
prefixCls?: string | undefined;
|
|
42
|
+
zIndex?: number | undefined;
|
|
43
|
+
forceRender?: boolean | undefined;
|
|
44
|
+
id?: string | undefined;
|
|
45
|
+
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
46
|
+
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
45
47
|
mouseEnterDelay?: number | undefined;
|
|
46
48
|
mouseLeaveDelay?: number | undefined;
|
|
47
49
|
onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
|
|
48
50
|
overlayClassName?: string | undefined;
|
|
49
|
-
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
50
51
|
overlayStyle?: import("react").CSSProperties | undefined;
|
|
51
52
|
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
52
53
|
popupVisible?: boolean | undefined;
|
|
53
|
-
forceRender?: boolean | undefined;
|
|
54
54
|
fresh?: boolean | undefined;
|
|
55
55
|
getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
|
|
56
56
|
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
@@ -65,40 +65,75 @@ 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
|
+
className?: string | undefined;
|
|
68
69
|
style?: import("react").CSSProperties | undefined;
|
|
69
70
|
title?: string | undefined;
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
prefixCls?: string | undefined;
|
|
72
|
+
rootClassName?: string | undefined;
|
|
72
73
|
name?: string | undefined;
|
|
73
|
-
|
|
74
|
+
disabled?: boolean | undefined;
|
|
75
|
+
defaultChecked?: boolean | undefined;
|
|
76
|
+
autoFocus?: boolean | undefined;
|
|
77
|
+
id?: string | undefined;
|
|
74
78
|
tabIndex?: number | undefined;
|
|
75
79
|
onKeyDown?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
76
80
|
onKeyPress?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
77
81
|
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
78
82
|
onMouseEnter?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
79
83
|
onMouseLeave?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
80
|
-
|
|
84
|
+
type?: string | undefined;
|
|
81
85
|
checked?: boolean | undefined;
|
|
82
|
-
required?: boolean | undefined;
|
|
83
|
-
defaultChecked?: boolean | undefined;
|
|
84
|
-
autoFocus?: boolean | undefined;
|
|
85
|
-
prefixCls?: string | undefined;
|
|
86
|
-
rootClassName?: string | undefined;
|
|
87
86
|
indeterminate?: boolean | undefined;
|
|
88
87
|
skipGroup?: boolean | undefined;
|
|
88
|
+
required?: boolean | undefined;
|
|
89
89
|
slot?: string | undefined;
|
|
90
|
-
accessKey?: string | undefined;
|
|
91
90
|
dir?: string | undefined;
|
|
92
|
-
color?: string | undefined;
|
|
93
91
|
content?: string | undefined;
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
onSubmit?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
93
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
94
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
96
95
|
suppressHydrationWarning?: boolean | undefined;
|
|
96
|
+
accessKey?: string | undefined;
|
|
97
|
+
autoCapitalize?: (string & {}) | "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
98
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
99
|
+
contextMenu?: string | undefined;
|
|
100
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
101
|
+
enterKeyHint?: "search" | "enter" | "done" | "go" | "next" | "previous" | "send" | undefined;
|
|
102
|
+
hidden?: boolean | undefined;
|
|
97
103
|
lang?: string | undefined;
|
|
104
|
+
nonce?: string | undefined;
|
|
105
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
106
|
+
translate?: "yes" | "no" | undefined;
|
|
107
|
+
radioGroup?: string | undefined;
|
|
98
108
|
role?: import("react").AriaRole | undefined;
|
|
109
|
+
about?: string | undefined;
|
|
110
|
+
datatype?: string | undefined;
|
|
111
|
+
inlist?: any;
|
|
112
|
+
prefix?: string | undefined;
|
|
113
|
+
property?: string | undefined;
|
|
114
|
+
rel?: string | undefined;
|
|
115
|
+
resource?: string | undefined;
|
|
116
|
+
rev?: string | undefined;
|
|
117
|
+
typeof?: string | undefined;
|
|
118
|
+
vocab?: string | undefined;
|
|
119
|
+
autoCorrect?: string | undefined;
|
|
120
|
+
autoSave?: string | undefined;
|
|
121
|
+
color?: string | undefined;
|
|
122
|
+
itemProp?: string | undefined;
|
|
123
|
+
itemScope?: boolean | undefined;
|
|
124
|
+
itemType?: string | undefined;
|
|
125
|
+
itemID?: string | undefined;
|
|
126
|
+
itemRef?: string | undefined;
|
|
127
|
+
results?: number | undefined;
|
|
128
|
+
security?: string | undefined;
|
|
129
|
+
unselectable?: "off" | "on" | undefined;
|
|
130
|
+
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
131
|
+
is?: string | undefined;
|
|
132
|
+
exportparts?: string | undefined;
|
|
133
|
+
part?: string | undefined;
|
|
99
134
|
"aria-activedescendant"?: string | undefined;
|
|
100
135
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
101
|
-
"aria-autocomplete"?: "
|
|
136
|
+
"aria-autocomplete"?: "inline" | "none" | "list" | "both" | undefined;
|
|
102
137
|
"aria-braillelabel"?: string | undefined;
|
|
103
138
|
"aria-brailleroledescription"?: string | undefined;
|
|
104
139
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -108,7 +143,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
108
143
|
"aria-colindextext"?: string | undefined;
|
|
109
144
|
"aria-colspan"?: number | undefined;
|
|
110
145
|
"aria-controls"?: string | undefined;
|
|
111
|
-
"aria-current"?: boolean | "time" | "
|
|
146
|
+
"aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
112
147
|
"aria-describedby"?: string | undefined;
|
|
113
148
|
"aria-description"?: string | undefined;
|
|
114
149
|
"aria-details"?: string | undefined;
|
|
@@ -118,7 +153,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
118
153
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
119
154
|
"aria-flowto"?: string | undefined;
|
|
120
155
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
121
|
-
"aria-haspopup"?: boolean | "dialog" | "menu" | "
|
|
156
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "tree" | "true" | "false" | "grid" | "listbox" | undefined;
|
|
122
157
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
123
158
|
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
124
159
|
"aria-keyshortcuts"?: string | undefined;
|
|
@@ -129,13 +164,13 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
129
164
|
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
130
165
|
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
131
166
|
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
132
|
-
"aria-orientation"?: "
|
|
167
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
133
168
|
"aria-owns"?: string | undefined;
|
|
134
169
|
"aria-placeholder"?: string | undefined;
|
|
135
170
|
"aria-posinset"?: number | undefined;
|
|
136
171
|
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
137
172
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
138
|
-
"aria-relevant"?: "text" | "
|
|
173
|
+
"aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
139
174
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
140
175
|
"aria-roledescription"?: string | undefined;
|
|
141
176
|
"aria-rowcount"?: number | undefined;
|
|
@@ -173,7 +208,6 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
173
208
|
onInputCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
174
209
|
onReset?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
175
210
|
onResetCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
176
|
-
onSubmit?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
177
211
|
onSubmitCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
178
212
|
onInvalid?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
179
213
|
onInvalidCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
@@ -302,43 +336,9 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
302
336
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
303
337
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
304
338
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
305
|
-
|
|
306
|
-
hidden?: boolean | undefined;
|
|
307
|
-
contextMenu?: string | undefined;
|
|
308
|
-
defaultValue?: string | number | readonly string[] | undefined;
|
|
309
|
-
prefix?: string | undefined;
|
|
310
|
-
suppressContentEditableWarning?: boolean | undefined;
|
|
311
|
-
autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
312
|
-
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
313
|
-
draggable?: (boolean | "true" | "false") | undefined;
|
|
314
|
-
enterKeyHint?: "search" | "done" | "enter" | "next" | "go" | "previous" | "send" | undefined;
|
|
315
|
-
nonce?: string | undefined;
|
|
316
|
-
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
317
|
-
radioGroup?: string | undefined;
|
|
318
|
-
about?: string | undefined;
|
|
319
|
-
datatype?: string | undefined;
|
|
320
|
-
inlist?: any;
|
|
321
|
-
property?: string | undefined;
|
|
322
|
-
rel?: string | undefined;
|
|
323
|
-
resource?: string | undefined;
|
|
324
|
-
rev?: string | undefined;
|
|
325
|
-
typeof?: string | undefined;
|
|
326
|
-
vocab?: string | undefined;
|
|
327
|
-
autoCorrect?: string | undefined;
|
|
328
|
-
autoSave?: string | undefined;
|
|
329
|
-
itemProp?: string | undefined;
|
|
330
|
-
itemScope?: boolean | undefined;
|
|
331
|
-
itemType?: string | undefined;
|
|
332
|
-
itemID?: string | undefined;
|
|
333
|
-
itemRef?: string | undefined;
|
|
334
|
-
results?: number | undefined;
|
|
335
|
-
security?: string | undefined;
|
|
336
|
-
unselectable?: "off" | "on" | undefined;
|
|
337
|
-
inputMode?: "search" | "text" | "none" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined;
|
|
338
|
-
is?: string | undefined;
|
|
339
|
-
exportparts?: string | undefined;
|
|
340
|
-
part?: string | undefined;
|
|
339
|
+
direction?: import("antd/es/config-provider").DirectionType;
|
|
341
340
|
rows?: number | false | undefined;
|
|
341
|
+
tooltip?: import("react").ReactNode | import("antd").TooltipProps;
|
|
342
342
|
autoShowTooltip?: boolean | undefined;
|
|
343
343
|
refs?: import("../../api").Refs | undefined;
|
|
344
344
|
ref: import("../../api").Refs | undefined;
|
|
@@ -13,7 +13,7 @@ var _constant = require("../../select/component/constant");
|
|
|
13
13
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
14
14
|
function parseHighlightTextAndRestProps(props) {
|
|
15
15
|
var highlightTextProps = _lodash.default.pick(props, _constant.highlightTextPropKeys);
|
|
16
|
-
var restProps = _lodash.default.omit(props, [].concat((0, _toConsumableArray2.default)(_constant.highlightTextPropKeys), ['__callback__', 'showAll', 'isNoMatchSearchText', 'shouldRerenderOptions', '__filterNotExistValue__']));
|
|
16
|
+
var restProps = _lodash.default.omit(props, [].concat((0, _toConsumableArray2.default)(_constant.highlightTextPropKeys), ['__callback__', '__callbackDeps__', 'showAll', 'isNoMatchSearchText', 'shouldRerenderOptions', '__filterNotExistValue__']));
|
|
17
17
|
return {
|
|
18
18
|
highlightTextProps: highlightTextProps,
|
|
19
19
|
restProps: restProps
|
|
@@ -3,7 +3,7 @@ interface DisplayValueProps extends Pick<BaseSelectProps, 'value' | 'options'> {
|
|
|
3
3
|
filterNotExistValue?: boolean;
|
|
4
4
|
}
|
|
5
5
|
export declare function getDisplayValue({ value, options, filterNotExistValue }: DisplayValueProps): any;
|
|
6
|
-
export declare function useSelectOptions<T = any>({ value, loading, options, __callback__, shouldRerenderOptions, __filterNotExistValue__: filterNotExistValue, ...props }: BaseSelectProps): T & {
|
|
6
|
+
export declare function useSelectOptions<T = any>({ value, loading, options, __callback__, __callbackDeps__, shouldRerenderOptions, __filterNotExistValue__: filterNotExistValue, ...props }: BaseSelectProps): T & {
|
|
7
7
|
value: any;
|
|
8
8
|
options: import("..").SelectOptions | undefined;
|
|
9
9
|
displayOptions: any[];
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.getDisplayValue = getDisplayValue;
|
|
8
8
|
exports.useSelectOptions = useSelectOptions;
|
|
9
9
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
12
|
var _form = require("../../form");
|
|
12
13
|
var _utils = require("../../form/component/utils");
|
|
@@ -14,7 +15,7 @@ var _hooks = require("../../hooks");
|
|
|
14
15
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
15
16
|
var _react = require("react");
|
|
16
17
|
var _utils2 = require("./utils");
|
|
17
|
-
var _excluded = ["value", "loading", "options", "__callback__", "shouldRerenderOptions", "__filterNotExistValue__"];
|
|
18
|
+
var _excluded = ["value", "loading", "options", "__callback__", "__callbackDeps__", "shouldRerenderOptions", "__filterNotExistValue__"];
|
|
18
19
|
var selectOptionsPropKeys = ['options', 'search', 'sort', 'renderLabel', 'presetProcessOption', 'finalProcessOption'];
|
|
19
20
|
function parseSelectOptionsAndRestProps(props) {
|
|
20
21
|
var selectOptionsProps = _lodash.default.pick(props, selectOptionsPropKeys);
|
|
@@ -44,6 +45,8 @@ function useSelectOptions(_ref2) {
|
|
|
44
45
|
loading = _ref2.loading,
|
|
45
46
|
options = _ref2.options,
|
|
46
47
|
__callback__ = _ref2.__callback__,
|
|
48
|
+
_ref2$__callbackDeps_ = _ref2.__callbackDeps__,
|
|
49
|
+
__callbackDeps__ = _ref2$__callbackDeps_ === void 0 ? [] : _ref2$__callbackDeps_,
|
|
47
50
|
shouldRerenderOptions = _ref2.shouldRerenderOptions,
|
|
48
51
|
filterNotExistValue = _ref2.__filterNotExistValue__,
|
|
49
52
|
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
@@ -69,7 +72,7 @@ function useSelectOptions(_ref2) {
|
|
|
69
72
|
};
|
|
70
73
|
__callback__ === null || __callback__ === void 0 || __callback__(params);
|
|
71
74
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
72
|
-
}, [memoValue, memoOptions, finalLoading]);
|
|
75
|
+
}, [memoValue, memoOptions, finalLoading].concat((0, _toConsumableArray2.default)(__callbackDeps__)));
|
|
73
76
|
var displayOptions = (0, _react.useMemo)(function () {
|
|
74
77
|
return (0, _utils2.generateOptions)((0, _objectSpread2.default)({
|
|
75
78
|
options: memoOptions
|
|
@@ -3,7 +3,7 @@ import { UseFetchOptions } from "../../hooks";
|
|
|
3
3
|
import { TextProps } from "../../text";
|
|
4
4
|
import { SelectProps as AntdSelectProps } from 'antd/es/select';
|
|
5
5
|
import { BaseOptionType, DefaultOptionType } from 'rc-select/lib/Select';
|
|
6
|
-
import { ReactNode } from 'react';
|
|
6
|
+
import { DependencyList, ReactNode } from 'react';
|
|
7
7
|
/**
|
|
8
8
|
* @noExtends
|
|
9
9
|
*/
|
|
@@ -54,6 +54,7 @@ export interface BaseSelectProps {
|
|
|
54
54
|
*/
|
|
55
55
|
__filterNotExistValue__?: boolean;
|
|
56
56
|
__callback__?(props: SelectCallbackProps): void;
|
|
57
|
+
__callbackDeps__?: DependencyList;
|
|
57
58
|
}
|
|
58
59
|
type UnionType = Omit<AntdSelectProps, 'options'> & Omit<BaseSelectProps, 'options'> & BaseComponentProps;
|
|
59
60
|
export interface SelectProps extends UnionType {
|
|
@@ -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
|
-
style?: import("react").CSSProperties | undefined;
|
|
10
9
|
className?: string | undefined;
|
|
11
|
-
|
|
10
|
+
style?: import("react").CSSProperties | undefined;
|
|
12
11
|
children?: import("react").ReactNode;
|
|
13
|
-
icon?: import("react").ReactNode;
|
|
14
12
|
closable?: boolean | undefined;
|
|
15
|
-
closeIcon?: import("react").ReactNode;
|
|
16
|
-
active?: boolean | undefined;
|
|
17
|
-
disabled?: boolean | undefined;
|
|
18
13
|
prefixCls?: string | undefined;
|
|
14
|
+
closeIcon?: import("react").ReactNode;
|
|
19
15
|
forceRender?: boolean | undefined;
|
|
16
|
+
disabled?: boolean | undefined;
|
|
17
|
+
id?: string | undefined;
|
|
18
|
+
active?: boolean | undefined;
|
|
19
|
+
icon?: import("react").ReactNode;
|
|
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
|
*/
|