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
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["hideBodyScroll"];
|
|
4
|
-
import { hideBodyScroll } from "./..";
|
|
3
|
+
var _excluded = ["hideBodyScroll", "getContainer"];
|
|
4
|
+
import { $, executeFunction, hideBodyScroll } from "./..";
|
|
5
|
+
import _ from 'lodash';
|
|
5
6
|
import { createRoot } from 'react-dom/client';
|
|
6
7
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
7
8
|
function getContainer() {
|
|
9
|
+
var to = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body;
|
|
8
10
|
var container = document.createElement('div');
|
|
9
|
-
|
|
11
|
+
var root = _.isString(to) ? $(to) : executeFunction(to);
|
|
12
|
+
root.append(container);
|
|
10
13
|
return container;
|
|
11
14
|
}
|
|
12
15
|
// 处理React17和18版本的兼容性
|
|
@@ -29,7 +32,11 @@ function getReactDOM() {
|
|
|
29
32
|
var closeFunctionSet = new Set();
|
|
30
33
|
export function mountComponent(Component) {
|
|
31
34
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
32
|
-
var
|
|
35
|
+
var _props$hideBodyScroll = props.hideBodyScroll,
|
|
36
|
+
hide = _props$hideBodyScroll === void 0 ? false : _props$hideBodyScroll,
|
|
37
|
+
outerContainer = props.getContainer,
|
|
38
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
39
|
+
var container = getContainer(outerContainer);
|
|
33
40
|
var _getReactDOM = getReactDOM(),
|
|
34
41
|
render = _getReactDOM.render,
|
|
35
42
|
unmount = _getReactDOM.unmount;
|
|
@@ -39,9 +46,6 @@ export function mountComponent(Component) {
|
|
|
39
46
|
closeFunctionSet.delete(close);
|
|
40
47
|
!closeFunctionSet.size && hideBodyScroll(false);
|
|
41
48
|
};
|
|
42
|
-
var _props$hideBodyScroll = props.hideBodyScroll,
|
|
43
|
-
hide = _props$hideBodyScroll === void 0 ? false : _props$hideBodyScroll,
|
|
44
|
-
restProps = _objectWithoutProperties(props, _excluded);
|
|
45
49
|
hide && hideBodyScroll();
|
|
46
50
|
render(_jsx(Component, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
47
51
|
unmount: close,
|
|
@@ -24,7 +24,7 @@ export declare function getFormItemProps(props: any): {
|
|
|
24
24
|
pointAtCenter?: boolean | undefined;
|
|
25
25
|
};
|
|
26
26
|
autoAdjustOverflow?: boolean | import("antd/es/tooltip").AdjustOverflow | undefined;
|
|
27
|
-
getPopupContainer: (
|
|
27
|
+
getPopupContainer: typeof import("../../api").getPopupContainer;
|
|
28
28
|
children?: import("react").ReactNode;
|
|
29
29
|
destroyTooltipOnHide?: boolean | {
|
|
30
30
|
keepParent?: boolean | 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
|
-
prefixCls?: string | undefined;
|
|
42
|
-
id?: string | undefined;
|
|
43
41
|
animation?: string | undefined;
|
|
44
42
|
transitionName?: string | undefined;
|
|
45
|
-
|
|
43
|
+
prefixCls?: string | undefined;
|
|
46
44
|
zIndex?: number | undefined;
|
|
45
|
+
forceRender?: boolean | undefined;
|
|
46
|
+
id?: string | undefined;
|
|
47
|
+
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
47
48
|
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
48
49
|
mouseEnterDelay?: number | undefined;
|
|
49
50
|
mouseLeaveDelay?: number | undefined;
|
|
50
51
|
onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
|
|
51
52
|
overlayClassName?: string | undefined;
|
|
52
|
-
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
53
53
|
overlayStyle?: import("react").CSSProperties | undefined;
|
|
54
54
|
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
55
55
|
popupVisible?: boolean | undefined;
|
|
56
|
-
forceRender?: boolean | undefined;
|
|
57
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):
|
|
88
|
+
export declare function transformOptions(item: FormItemProps, values: FormValues, params: CommonParams): ((values: FormValues, params: import("..").OptionsParams) => import("../../api").FunctionReturn<SelectOptions>) | import("../../api").FunctionReturn<SelectOptions> | ((search?: string) => import("../../api").FunctionReturn<SelectOptions>) | undefined;
|
|
89
89
|
interface FocusFirstInputParams extends CommonParams {
|
|
90
90
|
focusFirstOnMount: FormProps['focusFirstOnMount'];
|
|
91
91
|
}
|
|
@@ -23,11 +23,13 @@ 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
|
-
style?: import("react").CSSProperties | undefined;
|
|
27
26
|
className?: string | undefined;
|
|
27
|
+
style?: import("react").CSSProperties | undefined;
|
|
28
|
+
prefixCls?: string | undefined;
|
|
29
|
+
disabled?: boolean | undefined;
|
|
28
30
|
"aria-activedescendant"?: string | undefined;
|
|
29
31
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
30
|
-
"aria-autocomplete"?: "
|
|
32
|
+
"aria-autocomplete"?: "inline" | "none" | "list" | "both" | undefined;
|
|
31
33
|
"aria-braillelabel"?: string | undefined;
|
|
32
34
|
"aria-brailleroledescription"?: string | undefined;
|
|
33
35
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -37,7 +39,7 @@ export declare function usePagination({ data, rows, column, pagination }: Pagina
|
|
|
37
39
|
"aria-colindextext"?: string | undefined;
|
|
38
40
|
"aria-colspan"?: number | undefined;
|
|
39
41
|
"aria-controls"?: string | undefined;
|
|
40
|
-
"aria-current"?: boolean | "time" | "
|
|
42
|
+
"aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
41
43
|
"aria-describedby"?: string | undefined;
|
|
42
44
|
"aria-description"?: string | undefined;
|
|
43
45
|
"aria-details"?: string | undefined;
|
|
@@ -47,7 +49,7 @@ export declare function usePagination({ data, rows, column, pagination }: Pagina
|
|
|
47
49
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
48
50
|
"aria-flowto"?: string | undefined;
|
|
49
51
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
50
|
-
"aria-haspopup"?: boolean | "dialog" | "menu" | "
|
|
52
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "tree" | "true" | "false" | "grid" | "listbox" | undefined;
|
|
51
53
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
52
54
|
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
53
55
|
"aria-keyshortcuts"?: string | undefined;
|
|
@@ -58,13 +60,13 @@ export declare function usePagination({ data, rows, column, pagination }: Pagina
|
|
|
58
60
|
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
59
61
|
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
60
62
|
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
61
|
-
"aria-orientation"?: "
|
|
63
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
62
64
|
"aria-owns"?: string | undefined;
|
|
63
65
|
"aria-placeholder"?: string | undefined;
|
|
64
66
|
"aria-posinset"?: number | undefined;
|
|
65
67
|
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
66
68
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
67
|
-
"aria-relevant"?: "text" | "
|
|
69
|
+
"aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
68
70
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
69
71
|
"aria-roledescription"?: string | undefined;
|
|
70
72
|
"aria-rowcount"?: number | undefined;
|
|
@@ -78,12 +80,10 @@ export declare function usePagination({ data, rows, column, pagination }: Pagina
|
|
|
78
80
|
"aria-valuemin"?: number | undefined;
|
|
79
81
|
"aria-valuenow"?: number | undefined;
|
|
80
82
|
"aria-valuetext"?: string | undefined;
|
|
81
|
-
disabled?: boolean | undefined;
|
|
82
83
|
locale?: import("rc-pagination").PaginationLocale | undefined;
|
|
84
|
+
align?: "center" | "start" | "end" | undefined;
|
|
83
85
|
prevIcon?: import("react").ReactNode | import("react").ComponentType<{}>;
|
|
84
86
|
nextIcon?: import("react").ReactNode | import("react").ComponentType<{}>;
|
|
85
|
-
prefixCls?: string | undefined;
|
|
86
|
-
align?: "center" | "end" | "start" | undefined;
|
|
87
87
|
selectPrefixCls?: string | undefined;
|
|
88
88
|
defaultCurrent?: number | undefined;
|
|
89
89
|
defaultPageSize?: number | undefined;
|
|
@@ -98,7 +98,7 @@ 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: "
|
|
101
|
+
itemRender?: ((page: number, type: "next" | "page" | "prev" | "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
103
|
justify?: "center" | "left" | "right" | "between" | undefined;
|
|
104
104
|
};
|