doui-react 2.0.10 → 2.0.11
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/common.d.ts +1 -1
- package/es/api/component/common.js +55 -46
- package/es/form/component/utils.d.ts +14 -14
- package/es/grid/component/pagination.d.ts +10 -10
- package/es/icon/hook/index.d.ts +200 -200
- package/es/modal-prompt/component/utils.d.ts +1 -1
- package/es/open-modal/hook/use-modal.js +1 -1
- package/es/radio/component/abstract-box.d.ts +70 -70
- package/es/tabs/component/utils.d.ts +6 -6
- package/es/tooltip/component/index.d.ts +11 -10
- package/lib/api/component/common.d.ts +1 -1
- package/lib/api/component/common.js +55 -46
- package/lib/form/component/utils.d.ts +14 -14
- package/lib/grid/component/pagination.d.ts +10 -10
- package/lib/icon/hook/index.d.ts +200 -200
- package/lib/modal-prompt/component/utils.d.ts +1 -1
- package/lib/open-modal/hook/use-modal.js +2 -2
- package/lib/radio/component/abstract-box.d.ts +70 -70
- package/lib/tabs/component/utils.d.ts +6 -6
- package/lib/tooltip/component/index.d.ts +11 -10
- package/package.json +4 -2
|
@@ -18,5 +18,5 @@ export declare function includesNonStrictMode(options?: Array<OptionType>, value
|
|
|
18
18
|
export declare function mergeProps<T, U>(originProps: T, patchProps: U): {} & T & U;
|
|
19
19
|
export declare function mergeFunction(...fns: Array<FunctionType | undefined>): (...args: any[]) => void;
|
|
20
20
|
export declare function transformNullToUndefined<T>(value: T): T;
|
|
21
|
-
export declare function wait(fn: Function, timeout?: number): Promise<
|
|
21
|
+
export declare function wait(fn: Function, timeout?: number): Promise<boolean>;
|
|
22
22
|
export {};
|
|
@@ -2,8 +2,8 @@ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
4
|
import 'dayjs/locale/zh-cn';
|
|
5
|
-
import delay from 'delay';
|
|
6
5
|
import _ from 'lodash';
|
|
6
|
+
import pWaitFor from 'p-wait-for';
|
|
7
7
|
import { cloneElement, isValidElement } from 'react';
|
|
8
8
|
import { Fragment as _Fragment, jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
9
9
|
dayjs.locale('zh-cn');
|
|
@@ -99,49 +99,58 @@ export function transformNullToUndefined(value) {
|
|
|
99
99
|
}
|
|
100
100
|
return value;
|
|
101
101
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
102
|
+
function checkCondition(_x) {
|
|
103
|
+
return _checkCondition.apply(this, arguments);
|
|
104
|
+
}
|
|
105
|
+
function _checkCondition() {
|
|
106
|
+
_checkCondition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(fn) {
|
|
107
|
+
var result;
|
|
108
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
109
|
+
while (1) switch (_context.prev = _context.next) {
|
|
110
|
+
case 0:
|
|
111
|
+
_context.next = 2;
|
|
112
|
+
return fn();
|
|
113
|
+
case 2:
|
|
114
|
+
result = _context.sent;
|
|
115
|
+
return _context.abrupt("return", !!result);
|
|
116
|
+
case 4:
|
|
117
|
+
case "end":
|
|
118
|
+
return _context.stop();
|
|
119
|
+
}
|
|
120
|
+
}, _callee);
|
|
121
|
+
}));
|
|
122
|
+
return _checkCondition.apply(this, arguments);
|
|
123
|
+
}
|
|
124
|
+
export function wait(_x2) {
|
|
125
|
+
return _wait.apply(this, arguments);
|
|
126
|
+
}
|
|
127
|
+
function _wait() {
|
|
128
|
+
_wait = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(fn) {
|
|
129
|
+
var timeout,
|
|
130
|
+
_args2 = arguments;
|
|
131
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
132
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
133
|
+
case 0:
|
|
134
|
+
timeout = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : 30 * 1000;
|
|
135
|
+
_context2.prev = 1;
|
|
136
|
+
_context2.next = 4;
|
|
137
|
+
return pWaitFor(function () {
|
|
138
|
+
return checkCondition(fn);
|
|
139
|
+
}, {
|
|
140
|
+
interval: 300,
|
|
141
|
+
timeout: timeout
|
|
142
|
+
});
|
|
143
|
+
case 4:
|
|
144
|
+
return _context2.abrupt("return", true);
|
|
145
|
+
case 7:
|
|
146
|
+
_context2.prev = 7;
|
|
147
|
+
_context2.t0 = _context2["catch"](1);
|
|
148
|
+
return _context2.abrupt("return", false);
|
|
149
|
+
case 10:
|
|
150
|
+
case "end":
|
|
151
|
+
return _context2.stop();
|
|
152
|
+
}
|
|
153
|
+
}, _callee2, null, [[1, 7]]);
|
|
154
|
+
}));
|
|
155
|
+
return _wait.apply(this, arguments);
|
|
147
156
|
}
|
|
@@ -12,8 +12,8 @@ export declare function getFormItemProps(props: any): {
|
|
|
12
12
|
color?: string | undefined;
|
|
13
13
|
title?: import("react").ReactNode | import("antd/es/_util/getRenderPropValue").RenderFunction;
|
|
14
14
|
overlay?: import("react").ReactNode | import("antd/es/_util/getRenderPropValue").RenderFunction;
|
|
15
|
-
styles?: Partial<Record<"
|
|
16
|
-
classNames: Partial<Record<"
|
|
15
|
+
styles?: Partial<Record<"body" | "root", import("react").CSSProperties>> | undefined;
|
|
16
|
+
classNames: Partial<Record<"body" | "root", string>>;
|
|
17
17
|
rootClassName?: string | undefined;
|
|
18
18
|
placement?: import("antd/es/tooltip").TooltipPlacement | undefined;
|
|
19
19
|
builtinPlacements?: import("@rc-component/trigger").BuildInPlacements | undefined;
|
|
@@ -38,24 +38,24 @@ export declare function getFormItemProps(props: any): {
|
|
|
38
38
|
defaultVisible?: boolean | undefined;
|
|
39
39
|
onVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
40
40
|
afterVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
41
|
-
id?: string | undefined;
|
|
42
|
-
prefixCls?: string | undefined;
|
|
43
41
|
zIndex?: number | undefined;
|
|
44
42
|
animation?: string | undefined;
|
|
45
43
|
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
46
|
-
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
47
44
|
transitionName?: string | undefined;
|
|
48
|
-
|
|
49
|
-
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
50
|
-
onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
|
|
51
|
-
fresh?: boolean | undefined;
|
|
52
|
-
mouseLeaveDelay?: number | undefined;
|
|
53
|
-
mouseEnterDelay?: number | undefined;
|
|
45
|
+
prefixCls?: string | undefined;
|
|
54
46
|
forceRender?: boolean | undefined;
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
id?: string | undefined;
|
|
48
|
+
mouseEnterDelay?: number | undefined;
|
|
49
|
+
mouseLeaveDelay?: number | undefined;
|
|
50
|
+
onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
|
|
57
51
|
overlayClassName?: string | undefined;
|
|
52
|
+
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
53
|
+
overlayStyle?: import("react").CSSProperties | undefined;
|
|
54
|
+
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
55
|
+
popupVisible?: boolean | undefined;
|
|
56
|
+
fresh?: boolean | undefined;
|
|
58
57
|
getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
|
|
58
|
+
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
59
59
|
arrowContent?: import("react").ReactNode;
|
|
60
60
|
overlayInnerStyle?: import("react").CSSProperties | undefined;
|
|
61
61
|
icon: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -85,7 +85,7 @@ export declare function transformPathToName(path?: NamePath): string | undefined
|
|
|
85
85
|
export declare function transformKeyToPath(params?: Record<string, any>): Record<string, any>;
|
|
86
86
|
export declare function parseFormFailedError(error: ValidateErrorEntity): Record<string, string>;
|
|
87
87
|
export declare function noStyle(item: FormItemProps): boolean;
|
|
88
|
-
export declare function transformOptions(item: FormItemProps, values: FormValues, params: CommonParams): ((values: FormValues, params: import("..").OptionsParams) => import("../../api").FunctionReturn<SelectOptions>) | ((search?: string) => import("../../api").FunctionReturn<SelectOptions>) |
|
|
88
|
+
export declare function transformOptions(item: FormItemProps, values: FormValues, params: CommonParams): import("../../api").FunctionReturn<SelectOptions> | ((values: FormValues, params: import("..").OptionsParams) => import("../../api").FunctionReturn<SelectOptions>) | ((search?: string) => import("../../api").FunctionReturn<SelectOptions>) | undefined;
|
|
89
89
|
interface FocusFirstInputParams extends CommonParams {
|
|
90
90
|
focusFirstOnMount: FormProps['focusFirstOnMount'];
|
|
91
91
|
}
|
|
@@ -11,7 +11,7 @@ export declare function usePagination({ data, rows, column, pagination }: Pagina
|
|
|
11
11
|
current: number;
|
|
12
12
|
total: number;
|
|
13
13
|
onChange: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
14
|
-
position?: ("none" | "
|
|
14
|
+
position?: ("none" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "topCenter" | "bottomCenter")[] | undefined;
|
|
15
15
|
showQuickJumper?: boolean | {
|
|
16
16
|
goButton?: import("react").ReactNode;
|
|
17
17
|
} | undefined;
|
|
@@ -23,12 +23,12 @@ export declare function usePagination({ data, rows, column, pagination }: Pagina
|
|
|
23
23
|
showSizeChanger?: boolean | import("antd").SelectProps<any, import("rc-select/lib/Select").DefaultOptionType> | undefined;
|
|
24
24
|
selectComponentClass?: any;
|
|
25
25
|
pageSizeOptions?: (string | number)[] | undefined;
|
|
26
|
-
className?: string | undefined;
|
|
27
26
|
style?: import("react").CSSProperties | undefined;
|
|
27
|
+
className?: string | undefined;
|
|
28
28
|
prefixCls?: string | undefined;
|
|
29
29
|
"aria-activedescendant"?: string | undefined;
|
|
30
30
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
31
|
-
"aria-autocomplete"?: "
|
|
31
|
+
"aria-autocomplete"?: "none" | "list" | "inline" | "both" | undefined;
|
|
32
32
|
"aria-braillelabel"?: string | undefined;
|
|
33
33
|
"aria-brailleroledescription"?: string | undefined;
|
|
34
34
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -38,17 +38,17 @@ export declare function usePagination({ data, rows, column, pagination }: Pagina
|
|
|
38
38
|
"aria-colindextext"?: string | undefined;
|
|
39
39
|
"aria-colspan"?: number | undefined;
|
|
40
40
|
"aria-controls"?: string | undefined;
|
|
41
|
-
"aria-current"?: boolean | "page" | "true" | "false" | "step" | "location" | "date" |
|
|
41
|
+
"aria-current"?: boolean | "time" | "page" | "true" | "false" | "step" | "location" | "date" | undefined;
|
|
42
42
|
"aria-describedby"?: string | undefined;
|
|
43
43
|
"aria-description"?: string | undefined;
|
|
44
44
|
"aria-details"?: string | undefined;
|
|
45
45
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
46
|
-
"aria-dropeffect"?: "
|
|
46
|
+
"aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
47
47
|
"aria-errormessage"?: string | undefined;
|
|
48
48
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
49
49
|
"aria-flowto"?: string | undefined;
|
|
50
50
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
51
|
-
"aria-haspopup"?: boolean | "
|
|
51
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false" | undefined;
|
|
52
52
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
53
53
|
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
54
54
|
"aria-keyshortcuts"?: string | undefined;
|
|
@@ -65,7 +65,7 @@ export declare function usePagination({ data, rows, column, pagination }: Pagina
|
|
|
65
65
|
"aria-posinset"?: number | undefined;
|
|
66
66
|
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
67
67
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
68
|
-
"aria-relevant"?: "
|
|
68
|
+
"aria-relevant"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
69
69
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
70
70
|
"aria-roledescription"?: string | undefined;
|
|
71
71
|
"aria-rowcount"?: number | undefined;
|
|
@@ -80,10 +80,10 @@ export declare function usePagination({ data, rows, column, pagination }: Pagina
|
|
|
80
80
|
"aria-valuenow"?: number | undefined;
|
|
81
81
|
"aria-valuetext"?: string | undefined;
|
|
82
82
|
disabled?: boolean | undefined;
|
|
83
|
-
align?: "start" | "end" | "center" | undefined;
|
|
84
83
|
locale?: import("rc-pagination").PaginationLocale | undefined;
|
|
85
84
|
prevIcon?: import("react").ReactNode | import("react").ComponentType<{}>;
|
|
86
85
|
nextIcon?: import("react").ReactNode | import("react").ComponentType<{}>;
|
|
86
|
+
align?: "center" | "end" | "start" | undefined;
|
|
87
87
|
selectPrefixCls?: string | undefined;
|
|
88
88
|
defaultCurrent?: number | undefined;
|
|
89
89
|
defaultPageSize?: number | undefined;
|
|
@@ -98,9 +98,9 @@ export declare function usePagination({ data, rows, column, pagination }: Pagina
|
|
|
98
98
|
jumpPrevIcon?: import("react").ReactNode | import("react").ComponentType<{}>;
|
|
99
99
|
jumpNextIcon?: import("react").ReactNode | import("react").ComponentType<{}>;
|
|
100
100
|
onShowSizeChange?: ((current: number, size: number) => void) | undefined;
|
|
101
|
-
itemRender?: ((page: number, type: "page" | "
|
|
101
|
+
itemRender?: ((page: number, type: "page" | "prev" | "next" | "jump-prev" | "jump-next", element: import("react").ReactNode) => import("react").ReactNode) | undefined;
|
|
102
102
|
showTotal?: ((total: number, range: [number, number]) => import("react").ReactNode) | undefined;
|
|
103
|
-
justify?: "
|
|
103
|
+
justify?: "center" | "left" | "right" | "between" | undefined;
|
|
104
104
|
};
|
|
105
105
|
export type PaginationProps = TablePaginationConfig & Pick<HStackProps, 'justify'>;
|
|
106
106
|
export declare function Pagination({ justify, className, style, ...props }: PaginationProps): import("@emotion/react/jsx-runtime").JSX.Element;
|