doui-react 1.0.2 → 2.0.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/es/api/component/common.d.ts +2 -2
- package/es/api/component/common.js +3 -0
- package/es/api/component/global-style.d.ts +0 -1
- package/es/api/component/global-style.js +2 -3
- package/es/api/component/react-dom.js +9 -21
- package/es/button/component/index.js +8 -9
- package/es/button/type/index.d.ts +3 -7
- package/es/checkbox/type/index.d.ts +1 -1
- package/es/date-picker/component/index.js +13 -17
- package/es/date-picker/type/index.d.ts +5 -14
- package/es/form/component/constant.js +2 -2
- package/es/form/component/form-item-map.d.ts +2 -1
- package/es/form/component/form-item-map.js +2 -1
- package/es/form/component/form-item.js +1 -3
- package/es/form/component/form-list.d.ts +2 -2
- package/es/form/component/utils.d.ts +35 -25
- package/es/form/component/utils.js +2 -2
- package/es/form/style/form-item.d.ts +1 -1
- package/es/form/style/form-item.js +4 -11
- package/es/form/style/index.js +2 -2
- package/es/form/type/form-item.d.ts +5 -6
- package/es/form/type/form-list.d.ts +2 -2
- package/es/form/type/index.d.ts +3 -3
- package/es/grid/component/pagination.d.ts +72 -15
- package/es/hooks/hook/use-fetch.js +5 -12
- package/es/icon/hook/index.d.ts +195 -190
- package/es/input/component/number.d.ts +1 -1
- package/es/input/component/number.js +8 -30
- package/es/input/component/utils.d.ts +0 -1
- package/es/input/component/utils.js +0 -3
- package/es/input/type/index.d.ts +3 -3
- package/es/modal-prompt/component/utils.js +2 -1
- package/es/modal-prompt/type/index.d.ts +2 -2
- package/es/open-modal/component/footer.d.ts +1 -1
- package/es/open-modal/component/footer.js +2 -4
- package/es/open-modal/component/index.js +16 -1
- package/es/open-modal/component/modal.js +14 -6
- package/es/open-modal/component/utils.js +2 -6
- package/es/open-modal/hook/use-modal.js +1 -1
- package/es/open-modal/style/index.js +1 -2
- package/es/open-modal/style/wrap.js +1 -1
- package/es/open-modal/type/index.d.ts +6 -1
- package/es/radio/component/abstract-box.d.ts +72 -100
- package/es/radio/component/abstract-box.js +1 -5
- package/es/radio/component/use-radio.d.ts +7 -5
- package/es/radio/component/utils.js +1 -1
- package/es/radio/type/index.d.ts +2 -2
- package/es/select/component/use-select-options.d.ts +1 -1
- package/es/select/component/use-select-options.js +5 -2
- package/es/select/component/use-select.js +4 -7
- package/es/select/component/utils.d.ts +1 -2
- package/es/select/type/index.d.ts +3 -2
- package/es/stack/style/index.d.ts +2 -1
- package/es/switch/type/index.d.ts +2 -2
- package/es/table/component/action-button.js +0 -1
- package/es/table/component/filter.d.ts +1 -1
- package/es/table/component/filter.js +1 -1
- package/es/table/component/sort.d.ts +1 -1
- package/es/table/component/time.js +2 -2
- package/es/table/component/utils.d.ts +3 -77
- package/es/table/component/utils.js +1 -3
- package/es/table/hook/search.d.ts +1 -1
- package/es/table/hook/search.js +8 -6
- package/es/table/type/action.d.ts +2 -7
- package/es/table/type/column.d.ts +3 -3
- package/es/tabs/component/utils.d.ts +8 -8
- package/es/tabs/type/index.d.ts +1 -1
- package/es/text/component/index.js +15 -16
- package/es/text/component/use-text.d.ts +3 -2
- package/es/text/component/use-text.js +12 -19
- package/es/text/component/utils.d.ts +1 -1
- package/es/text/style/index.js +1 -1
- package/es/text/type/index.d.ts +2 -2
- package/es/tooltip/component/index.d.ts +30 -20
- package/es/tooltip/component/index.js +6 -2
- package/es/tooltip/type/index.d.ts +1 -1
- package/es/tree/component/index.d.ts +1 -1
- package/es/tree/style/index.js +1 -1
- package/es/tree-select/component/use-tree-select.js +4 -4
- package/es/tree-select/style/index.js +1 -1
- package/es/virtual-list/type/index.d.ts +1 -1
- package/lib/api/component/common.d.ts +2 -2
- package/lib/api/component/common.js +3 -0
- package/lib/api/component/global-style.d.ts +0 -1
- package/lib/api/component/global-style.js +3 -4
- package/lib/api/component/react-dom.js +9 -21
- package/lib/button/component/index.js +8 -9
- package/lib/button/type/index.d.ts +3 -7
- package/lib/checkbox/type/index.d.ts +1 -1
- package/lib/date-picker/component/index.js +13 -17
- package/lib/date-picker/type/index.d.ts +5 -14
- package/lib/form/component/constant.js +2 -2
- package/lib/form/component/form-item-map.d.ts +2 -1
- package/lib/form/component/form-item-map.js +2 -1
- package/lib/form/component/form-item.js +1 -3
- package/lib/form/component/form-list.d.ts +2 -2
- package/lib/form/component/utils.d.ts +35 -25
- package/lib/form/component/utils.js +2 -2
- package/lib/form/style/form-item.d.ts +1 -1
- package/lib/form/style/form-item.js +4 -11
- package/lib/form/style/index.js +1 -1
- package/lib/form/type/form-item.d.ts +5 -6
- package/lib/form/type/form-list.d.ts +2 -2
- package/lib/form/type/index.d.ts +3 -3
- package/lib/grid/component/pagination.d.ts +72 -15
- package/lib/hooks/hook/use-fetch.js +5 -12
- package/lib/icon/hook/index.d.ts +195 -190
- package/lib/input/component/number.d.ts +1 -1
- package/lib/input/component/number.js +7 -28
- package/lib/input/component/utils.d.ts +0 -1
- package/lib/input/component/utils.js +0 -4
- package/lib/input/type/index.d.ts +3 -3
- package/lib/modal-prompt/component/utils.js +2 -1
- package/lib/modal-prompt/type/index.d.ts +2 -2
- package/lib/open-modal/component/footer.d.ts +1 -1
- package/lib/open-modal/component/footer.js +2 -4
- package/lib/open-modal/component/index.js +17 -1
- package/lib/open-modal/component/modal.js +12 -4
- package/lib/open-modal/component/utils.js +2 -6
- package/lib/open-modal/hook/use-modal.js +1 -1
- package/lib/open-modal/style/index.js +1 -2
- package/lib/open-modal/style/wrap.js +1 -1
- package/lib/open-modal/type/index.d.ts +6 -1
- package/lib/radio/component/abstract-box.d.ts +72 -100
- package/lib/radio/component/abstract-box.js +1 -5
- package/lib/radio/component/use-radio.d.ts +7 -5
- package/lib/radio/component/utils.js +1 -1
- package/lib/radio/type/index.d.ts +2 -2
- package/lib/select/component/use-select-options.d.ts +1 -1
- package/lib/select/component/use-select-options.js +5 -2
- package/lib/select/component/use-select.js +4 -7
- package/lib/select/component/utils.d.ts +1 -2
- package/lib/select/type/index.d.ts +3 -2
- package/lib/stack/style/index.d.ts +2 -1
- package/lib/switch/type/index.d.ts +2 -2
- package/lib/table/component/action-button.js +0 -1
- package/lib/table/component/filter.d.ts +1 -1
- package/lib/table/component/filter.js +1 -1
- package/lib/table/component/sort.d.ts +1 -1
- package/lib/table/component/time.js +2 -2
- package/lib/table/component/utils.d.ts +3 -77
- package/lib/table/component/utils.js +1 -3
- package/lib/table/hook/search.d.ts +1 -1
- package/lib/table/hook/search.js +8 -6
- package/lib/table/type/action.d.ts +2 -7
- package/lib/table/type/column.d.ts +3 -3
- package/lib/tabs/component/utils.d.ts +8 -8
- package/lib/tabs/type/index.d.ts +1 -1
- package/lib/text/component/index.js +15 -16
- package/lib/text/component/use-text.d.ts +3 -2
- package/lib/text/component/use-text.js +11 -18
- package/lib/text/component/utils.d.ts +1 -1
- package/lib/text/style/index.js +1 -1
- package/lib/text/type/index.d.ts +2 -2
- package/lib/tooltip/component/index.d.ts +30 -20
- package/lib/tooltip/component/index.js +6 -2
- package/lib/tooltip/type/index.d.ts +1 -1
- package/lib/tree/component/index.d.ts +1 -1
- package/lib/tree/style/index.js +1 -1
- package/lib/tree-select/component/use-tree-select.js +4 -4
- package/lib/tree-select/style/index.js +1 -1
- package/lib/virtual-list/type/index.d.ts +1 -1
- package/package.json +10 -13
|
@@ -24,9 +24,9 @@ var Modal = exports.Modal = function Modal(props) {
|
|
|
24
24
|
ok = context.ok,
|
|
25
25
|
close = context.close;
|
|
26
26
|
return (0, _jsxRuntime.jsx)(_hook.ModalProvider, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, context), {}, {
|
|
27
|
-
children: (0, _jsxRuntime.
|
|
27
|
+
children: (0, _jsxRuntime.jsxs)(_antd.Modal, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
28
28
|
open: open,
|
|
29
|
-
|
|
29
|
+
destroyOnHidden: true
|
|
30
30
|
}, modalProps), {}, {
|
|
31
31
|
title: (0, _jsxRuntime.jsx)(_text.Text, {
|
|
32
32
|
children: modalProps.title
|
|
@@ -34,9 +34,17 @@ var Modal = exports.Modal = function Modal(props) {
|
|
|
34
34
|
confirmLoading: confirmLoading,
|
|
35
35
|
onCancel: close,
|
|
36
36
|
onOk: ok,
|
|
37
|
-
children: (0, _jsxRuntime.jsx)(
|
|
37
|
+
children: [(0, _jsxRuntime.jsx)(_antd.Divider, {
|
|
38
|
+
style: {
|
|
39
|
+
margin: '15px 0 24px'
|
|
40
|
+
}
|
|
41
|
+
}), (0, _jsxRuntime.jsx)(_form.Form, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, formProps), {}, {
|
|
38
42
|
context: context
|
|
39
|
-
}))
|
|
43
|
+
})), (0, _jsxRuntime.jsx)(_antd.Divider, {
|
|
44
|
+
style: {
|
|
45
|
+
margin: '15px 0 20px'
|
|
46
|
+
}
|
|
47
|
+
})]
|
|
40
48
|
}))
|
|
41
49
|
}));
|
|
42
50
|
};
|
|
@@ -81,7 +81,7 @@ function getModalAndFormProps(props) {
|
|
|
81
81
|
footer: _lodash.default.isNull(formProps.footer) ? null : undefined,
|
|
82
82
|
// 为 null 时,不显示 footer
|
|
83
83
|
css: _style.default.wrapper({
|
|
84
|
-
bodyBottomMargin: getBodyBottomMargin(bodyBottomMargin
|
|
84
|
+
bodyBottomMargin: getBodyBottomMargin(bodyBottomMargin),
|
|
85
85
|
titleCenter: titleCenter
|
|
86
86
|
}),
|
|
87
87
|
style: modalProps.centered ? {} : {
|
|
@@ -94,14 +94,10 @@ function getModalAndFormProps(props) {
|
|
|
94
94
|
modalProps: mergedModalProps
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
function getBodyBottomMargin(bodyBottomMargin
|
|
98
|
-
var _formProps$items;
|
|
97
|
+
function getBodyBottomMargin(bodyBottomMargin) {
|
|
99
98
|
if (!_lodash.default.isNil(bodyBottomMargin)) {
|
|
100
99
|
return (0, _api.transformValueWithStyleUnit)(bodyBottomMargin);
|
|
101
100
|
}
|
|
102
|
-
if ((_formProps$items = formProps.items) !== null && _formProps$items !== void 0 && _formProps$items.length) {
|
|
103
|
-
return '10px';
|
|
104
|
-
}
|
|
105
101
|
}
|
|
106
102
|
function shouldEnableButton(_ref2) {
|
|
107
103
|
var _onValidate;
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.useModal = useModal;
|
|
8
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
-
var _usePatchElement3 = _interopRequireDefault(require("antd/
|
|
10
|
+
var _usePatchElement3 = _interopRequireDefault(require("antd/es/_util/hooks/usePatchElement"));
|
|
11
11
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
12
12
|
var _component = require("../component");
|
|
13
13
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
-
var _api = require("../../api");
|
|
10
9
|
var _react = require("@emotion/react");
|
|
11
10
|
var _templateObject, _templateObject2, _templateObject3;
|
|
12
11
|
function titleStyle(titleCenter) {
|
|
@@ -19,7 +18,7 @@ var style = {
|
|
|
19
18
|
wrapper: function wrapper(_ref) {
|
|
20
19
|
var bodyBottomMargin = _ref.bodyBottomMargin,
|
|
21
20
|
titleCenter = _ref.titleCenter;
|
|
22
|
-
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n
|
|
21
|
+
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n .ant-modal-title {\n font-size: 16px;\n ", "\n }\n\n .ant-modal-body {\n padding-bottom: ", ";\n }\n "])), titleStyle(titleCenter), bodyBottomMargin);
|
|
23
22
|
}
|
|
24
23
|
};
|
|
25
24
|
var _default = exports.default = style;
|
|
@@ -9,5 +9,5 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _css = require("@emotion/css");
|
|
10
10
|
var _templateObject;
|
|
11
11
|
function getWrapStyle(wrapStyle) {
|
|
12
|
-
return (0, _css.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n
|
|
12
|
+
return (0, _css.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n "])), wrapStyle);
|
|
13
13
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { FunctionReturn } from "../../api";
|
|
2
2
|
import { FormInstance, FormItemProps, FormProps, FormValues } from "../../form";
|
|
3
3
|
import { CSSObject } from '@emotion/react';
|
|
4
|
-
import {
|
|
4
|
+
import { ConfigProviderProps } from 'antd/es/config-provider';
|
|
5
|
+
import type { ModalProps as AntdModalProps } from 'antd/es/modal';
|
|
5
6
|
import { ReactNode } from 'react';
|
|
6
7
|
type AntdComponentProps = Omit<AntdModalProps, 'onOk' | 'children'> & Omit<FormProps, 'children' | 'content' | 'title'>;
|
|
7
8
|
/**
|
|
@@ -46,6 +47,10 @@ export interface OpenModalProps extends AntdComponentProps {
|
|
|
46
47
|
* @description 对话框外层容器的样式
|
|
47
48
|
*/
|
|
48
49
|
wrapStyle?: CSSObject;
|
|
50
|
+
/**
|
|
51
|
+
* @description Antd Provider Props
|
|
52
|
+
*/
|
|
53
|
+
configProviderProps?: Omit<ConfigProviderProps, 'children'>;
|
|
49
54
|
/**
|
|
50
55
|
* @description 点击取消按钮的回调
|
|
51
56
|
*/
|
|
@@ -1,92 +1,60 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BaseBoxProps } from "..";
|
|
3
3
|
import type { SerializedStyles } from '@emotion/utils';
|
|
4
|
-
import { CheckboxChangeEvent } from 'antd/
|
|
4
|
+
import { CheckboxChangeEvent } from 'antd/es/checkbox/Checkbox';
|
|
5
5
|
export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGroup, ...props }: BaseBoxProps): {
|
|
6
6
|
highlightTextProps: Partial<BaseBoxProps>;
|
|
7
7
|
tooltipProps: {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
color?: string | undefined;
|
|
9
|
+
title?: import("react").ReactNode | import("antd/es/_util/getRenderPropValue").RenderFunction;
|
|
10
|
+
overlay?: import("react").ReactNode | import("antd/es/_util/getRenderPropValue").RenderFunction;
|
|
11
|
+
styles?: Partial<Record<"body" | "root", import("react").CSSProperties>> | undefined;
|
|
12
|
+
classNames?: Partial<Record<"body" | "root", string>> | undefined;
|
|
10
13
|
style?: import("react").CSSProperties | undefined;
|
|
11
14
|
className?: string | undefined;
|
|
12
|
-
|
|
13
|
-
placement?: import("antd/
|
|
14
|
-
builtinPlacements?: import("rc-trigger").BuildInPlacements | undefined;
|
|
15
|
+
rootClassName?: string | undefined;
|
|
16
|
+
placement?: import("antd/es/tooltip").TooltipPlacement | undefined;
|
|
17
|
+
builtinPlacements?: import("@rc-component/trigger").BuildInPlacements | undefined;
|
|
15
18
|
openClassName?: string | undefined;
|
|
16
19
|
arrowPointAtCenter?: boolean | undefined;
|
|
17
|
-
|
|
20
|
+
arrow?: boolean | {
|
|
21
|
+
arrowPointAtCenter?: boolean | undefined;
|
|
22
|
+
pointAtCenter?: boolean | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
autoAdjustOverflow?: boolean | import("antd/es/tooltip").AdjustOverflow | undefined;
|
|
18
25
|
getPopupContainer?: ((triggerNode: HTMLElement) => HTMLElement) | undefined;
|
|
19
26
|
children?: import("react").ReactNode;
|
|
20
|
-
|
|
27
|
+
destroyTooltipOnHide?: boolean | {
|
|
28
|
+
keepParent?: boolean | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
destroyOnHidden?: boolean | undefined;
|
|
21
31
|
open?: boolean | undefined;
|
|
22
|
-
defaultVisible?: boolean | undefined;
|
|
23
32
|
defaultOpen?: boolean | undefined;
|
|
24
|
-
onVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
25
33
|
onOpenChange?: ((visible: boolean) => void) | undefined;
|
|
26
|
-
afterVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
27
34
|
afterOpenChange?: ((visible: boolean) => void) | undefined;
|
|
28
|
-
zIndex?: number | undefined;
|
|
29
|
-
animation?: string | undefined;
|
|
30
|
-
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
31
|
-
id?: string | undefined;
|
|
32
|
-
prefixCls?: string | undefined;
|
|
33
|
-
onPopupAlign?: ((element: HTMLElement, align: import("rc-trigger/lib/interface").AlignType) => void) | undefined;
|
|
34
|
-
trigger?: string | string[] | undefined;
|
|
35
|
-
transitionName?: string | undefined;
|
|
36
|
-
overlayStyle?: import("react").CSSProperties | undefined;
|
|
37
|
-
overlayClassName?: string | undefined;
|
|
38
|
-
mouseEnterDelay?: number | undefined;
|
|
39
|
-
mouseLeaveDelay?: number | undefined;
|
|
40
|
-
getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
|
|
41
|
-
destroyTooltipOnHide?: boolean | {
|
|
42
|
-
keepParent?: boolean | undefined;
|
|
43
|
-
} | undefined;
|
|
44
|
-
align: import("rc-trigger/lib/interface").AlignType;
|
|
45
|
-
showArrow?: boolean | undefined;
|
|
46
|
-
arrowContent?: import("react").ReactNode;
|
|
47
|
-
popupVisible?: boolean | undefined;
|
|
48
|
-
overlayInnerStyle?: import("react").CSSProperties | undefined;
|
|
49
|
-
} | {
|
|
50
|
-
title?: import("react").ReactNode | import("antd/lib/tooltip").RenderFunction;
|
|
51
|
-
overlay?: import("react").ReactNode | import("antd/lib/tooltip").RenderFunction;
|
|
52
|
-
style?: import("react").CSSProperties | undefined;
|
|
53
|
-
className?: string | undefined;
|
|
54
|
-
color?: string | undefined;
|
|
55
|
-
placement?: import("antd/lib/tooltip").TooltipPlacement | undefined;
|
|
56
|
-
builtinPlacements?: import("rc-trigger").BuildInPlacements | undefined;
|
|
57
|
-
openClassName?: string | undefined;
|
|
58
|
-
arrowPointAtCenter?: boolean | undefined;
|
|
59
|
-
autoAdjustOverflow?: boolean | import("antd/lib/tooltip").AdjustOverflow | undefined;
|
|
60
|
-
getPopupContainer?: ((triggerNode: HTMLElement) => HTMLElement) | undefined;
|
|
61
|
-
children?: import("react").ReactNode;
|
|
62
35
|
visible?: boolean | undefined;
|
|
63
|
-
open?: boolean | undefined;
|
|
64
36
|
defaultVisible?: boolean | undefined;
|
|
65
|
-
defaultOpen?: boolean | undefined;
|
|
66
37
|
onVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
67
|
-
onOpenChange?: ((visible: boolean) => void) | undefined;
|
|
68
38
|
afterVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
69
|
-
afterOpenChange?: ((visible: boolean) => void) | undefined;
|
|
70
|
-
zIndex?: number | undefined;
|
|
71
|
-
animation?: string | undefined;
|
|
72
|
-
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
73
|
-
id?: string | undefined;
|
|
74
39
|
prefixCls?: string | undefined;
|
|
75
|
-
|
|
76
|
-
|
|
40
|
+
id?: string | undefined;
|
|
41
|
+
animation?: string | undefined;
|
|
77
42
|
transitionName?: string | undefined;
|
|
43
|
+
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
44
|
+
zIndex?: number | undefined;
|
|
45
|
+
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
46
|
+
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
47
|
+
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
48
|
+
onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
|
|
49
|
+
fresh?: boolean | undefined;
|
|
50
|
+
mouseLeaveDelay?: number | undefined;
|
|
51
|
+
mouseEnterDelay?: number | undefined;
|
|
52
|
+
forceRender?: boolean | undefined;
|
|
53
|
+
popupVisible?: boolean | undefined;
|
|
78
54
|
overlayStyle?: import("react").CSSProperties | undefined;
|
|
79
55
|
overlayClassName?: string | undefined;
|
|
80
|
-
mouseEnterDelay?: number | undefined;
|
|
81
|
-
mouseLeaveDelay?: number | undefined;
|
|
82
56
|
getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
|
|
83
|
-
destroyTooltipOnHide?: boolean | {
|
|
84
|
-
keepParent?: boolean | undefined;
|
|
85
|
-
} | undefined;
|
|
86
|
-
align: import("rc-trigger/lib/interface").AlignType;
|
|
87
|
-
showArrow?: boolean | undefined;
|
|
88
57
|
arrowContent?: import("react").ReactNode;
|
|
89
|
-
popupVisible?: boolean | undefined;
|
|
90
58
|
overlayInnerStyle?: import("react").CSSProperties | undefined;
|
|
91
59
|
};
|
|
92
60
|
boxProps: {
|
|
@@ -97,51 +65,49 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
97
65
|
value?: any;
|
|
98
66
|
boxTooltip?: import("react").ReactNode | import("antd").TooltipProps;
|
|
99
67
|
inGroup?: boolean | undefined;
|
|
100
|
-
|
|
101
|
-
|
|
68
|
+
name?: string | undefined;
|
|
69
|
+
prefixCls?: string | undefined;
|
|
102
70
|
className?: string | undefined;
|
|
103
|
-
|
|
71
|
+
rootClassName?: string | undefined;
|
|
72
|
+
disabled?: boolean | undefined;
|
|
73
|
+
style?: import("react").CSSProperties | undefined;
|
|
74
|
+
indeterminate?: boolean | undefined;
|
|
104
75
|
defaultChecked?: boolean | undefined;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
onKeyDown?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
109
|
-
onKeyPress?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
76
|
+
checked?: boolean | undefined;
|
|
77
|
+
title?: string | undefined;
|
|
78
|
+
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
110
79
|
onMouseEnter?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
111
80
|
onMouseLeave?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
+
type?: string | undefined;
|
|
117
87
|
skipGroup?: boolean | undefined;
|
|
118
|
-
|
|
119
|
-
tooltip?: import("react").ReactNode | import("antd").TooltipProps;
|
|
120
|
-
autoShowTooltip?: boolean | undefined;
|
|
121
|
-
slot?: string | undefined;
|
|
122
|
-
title?: string | undefined;
|
|
123
|
-
accessKey?: string | undefined;
|
|
124
|
-
color?: string | undefined;
|
|
125
|
-
content?: string | undefined;
|
|
126
|
-
direction?: import("antd/lib/config-provider").DirectionType;
|
|
127
|
-
translate?: "yes" | "no" | undefined;
|
|
88
|
+
required?: boolean | undefined;
|
|
128
89
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
90
|
+
'aria-label'?: string | undefined;
|
|
91
|
+
direction?: import("antd/es/config-provider").DirectionType;
|
|
129
92
|
suppressContentEditableWarning?: boolean | undefined;
|
|
130
93
|
suppressHydrationWarning?: boolean | undefined;
|
|
131
|
-
|
|
132
|
-
|
|
94
|
+
accessKey?: string | undefined;
|
|
95
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | (string & {}) | undefined;
|
|
96
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
133
97
|
contextMenu?: string | undefined;
|
|
134
98
|
dir?: string | undefined;
|
|
135
99
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
136
|
-
enterKeyHint?: "search" | "
|
|
100
|
+
enterKeyHint?: "search" | "enter" | "done" | "go" | "next" | "previous" | "send" | undefined;
|
|
137
101
|
hidden?: boolean | undefined;
|
|
138
102
|
lang?: string | undefined;
|
|
139
103
|
nonce?: string | undefined;
|
|
140
|
-
|
|
104
|
+
slot?: string | undefined;
|
|
141
105
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
106
|
+
translate?: "yes" | "no" | undefined;
|
|
142
107
|
radioGroup?: string | undefined;
|
|
143
108
|
role?: import("react").AriaRole | undefined;
|
|
144
109
|
about?: string | undefined;
|
|
110
|
+
content?: string | undefined;
|
|
145
111
|
datatype?: string | undefined;
|
|
146
112
|
inlist?: any;
|
|
147
113
|
prefix?: string | undefined;
|
|
@@ -153,6 +119,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
153
119
|
vocab?: string | undefined;
|
|
154
120
|
autoCorrect?: string | undefined;
|
|
155
121
|
autoSave?: string | undefined;
|
|
122
|
+
color?: string | undefined;
|
|
156
123
|
itemProp?: string | undefined;
|
|
157
124
|
itemScope?: boolean | undefined;
|
|
158
125
|
itemType?: string | undefined;
|
|
@@ -161,19 +128,25 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
161
128
|
results?: number | undefined;
|
|
162
129
|
security?: string | undefined;
|
|
163
130
|
unselectable?: "off" | "on" | undefined;
|
|
164
|
-
inputMode?: "
|
|
131
|
+
inputMode?: "text" | "search" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
165
132
|
is?: string | undefined;
|
|
133
|
+
exportparts?: string | undefined;
|
|
134
|
+
part?: string | undefined;
|
|
166
135
|
"aria-activedescendant"?: string | undefined;
|
|
167
136
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
168
137
|
"aria-autocomplete"?: "none" | "list" | "inline" | "both" | undefined;
|
|
138
|
+
"aria-braillelabel"?: string | undefined;
|
|
139
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
169
140
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
170
141
|
"aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
171
142
|
"aria-colcount"?: number | undefined;
|
|
172
143
|
"aria-colindex"?: number | undefined;
|
|
144
|
+
"aria-colindextext"?: string | undefined;
|
|
173
145
|
"aria-colspan"?: number | undefined;
|
|
174
146
|
"aria-controls"?: string | undefined;
|
|
175
|
-
"aria-current"?: boolean | "
|
|
147
|
+
"aria-current"?: boolean | "true" | "false" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
176
148
|
"aria-describedby"?: string | undefined;
|
|
149
|
+
"aria-description"?: string | undefined;
|
|
177
150
|
"aria-details"?: string | undefined;
|
|
178
151
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
179
152
|
"aria-dropeffect"?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
@@ -181,11 +154,10 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
181
154
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
182
155
|
"aria-flowto"?: string | undefined;
|
|
183
156
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
184
|
-
"aria-haspopup"?: boolean | "
|
|
157
|
+
"aria-haspopup"?: boolean | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "tree" | undefined;
|
|
185
158
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
186
159
|
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
187
160
|
"aria-keyshortcuts"?: string | undefined;
|
|
188
|
-
"aria-label"?: string | undefined;
|
|
189
161
|
"aria-labelledby"?: string | undefined;
|
|
190
162
|
"aria-level"?: number | undefined;
|
|
191
163
|
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
@@ -198,11 +170,12 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
198
170
|
"aria-posinset"?: number | undefined;
|
|
199
171
|
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
200
172
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
201
|
-
"aria-relevant"?: "text" | "
|
|
173
|
+
"aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
202
174
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
203
175
|
"aria-roledescription"?: string | undefined;
|
|
204
176
|
"aria-rowcount"?: number | undefined;
|
|
205
177
|
"aria-rowindex"?: number | undefined;
|
|
178
|
+
"aria-rowindextext"?: string | undefined;
|
|
206
179
|
"aria-rowspan"?: number | undefined;
|
|
207
180
|
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
208
181
|
"aria-setsize"?: number | undefined;
|
|
@@ -226,12 +199,10 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
226
199
|
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
227
200
|
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
228
201
|
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
229
|
-
onFocus?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
230
202
|
onFocusCapture?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
231
|
-
onBlur?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
232
203
|
onBlurCapture?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
233
204
|
onChangeCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
234
|
-
onBeforeInput?: import("react").
|
|
205
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
235
206
|
onBeforeInputCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
236
207
|
onInput?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
237
208
|
onInputCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
@@ -345,9 +316,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
345
316
|
onPointerCancel?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
346
317
|
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
347
318
|
onPointerEnter?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
348
|
-
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
349
319
|
onPointerLeave?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
350
|
-
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
351
320
|
onPointerOver?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
352
321
|
onPointerOverCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
353
322
|
onPointerOut?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
@@ -368,6 +337,9 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
368
337
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
369
338
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
370
339
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
340
|
+
rows?: number | false | undefined;
|
|
341
|
+
tooltip?: import("react").ReactNode | import("antd").TooltipProps;
|
|
342
|
+
autoShowTooltip?: boolean | undefined;
|
|
371
343
|
refs?: import("../../api").Refs | undefined;
|
|
372
344
|
ref: import("../../api").Refs | undefined;
|
|
373
345
|
};
|
|
@@ -53,11 +53,7 @@ function useAbstractBox(_ref2) {
|
|
|
53
53
|
var _parseHighlightTextAn = (0, _utils.parseHighlightTextAndRestProps)(props),
|
|
54
54
|
highlightTextProps = _parseHighlightTextAn.highlightTextProps,
|
|
55
55
|
restProps = _parseHighlightTextAn.restProps;
|
|
56
|
-
var tooltipProps = (0, _objectSpread3.default)({
|
|
57
|
-
align: {
|
|
58
|
-
offset: [0, 1]
|
|
59
|
-
}
|
|
60
|
-
}, (0, _text.generateTooltip)(boxTooltip));
|
|
56
|
+
var tooltipProps = (0, _objectSpread3.default)({}, (0, _text.generateTooltip)(boxTooltip));
|
|
61
57
|
var boxProps = (0, _objectSpread3.default)((0, _objectSpread3.default)({
|
|
62
58
|
ref: refs
|
|
63
59
|
}, restProps), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, inGroup ? 'value' : 'checked', value), "onChange", function onChange(e) {
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { RadioProps } from "..";
|
|
3
|
-
import { RadioChangeEvent } from 'antd/
|
|
3
|
+
import { RadioChangeEvent } from 'antd/es/radio/interface';
|
|
4
4
|
export declare function useRadio({ onChange, ...props }: RadioProps): {
|
|
5
5
|
options: any[];
|
|
6
6
|
onChange: (e: RadioChangeEvent) => void;
|
|
7
7
|
defaultValue?: any;
|
|
8
8
|
value: any;
|
|
9
|
-
size?: import("antd/
|
|
10
|
-
disabled?:
|
|
9
|
+
size?: import("antd/es/button").ButtonSize;
|
|
10
|
+
disabled?: boolean | undefined;
|
|
11
11
|
onMouseEnter?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
12
12
|
onMouseLeave?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
13
13
|
name?: string | undefined;
|
|
14
14
|
children?: import("react").ReactNode;
|
|
15
15
|
id?: string | undefined;
|
|
16
|
-
optionType?: import("antd/
|
|
17
|
-
buttonStyle?: import("antd/
|
|
16
|
+
optionType?: import("antd/es/radio/interface").RadioGroupOptionType | undefined;
|
|
17
|
+
buttonStyle?: import("antd/es/radio/interface").RadioGroupButtonStyle | undefined;
|
|
18
18
|
onFocus?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
19
19
|
onBlur?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
20
|
+
block?: boolean | undefined;
|
|
20
21
|
prefixCls?: string | undefined;
|
|
21
22
|
className?: string | undefined;
|
|
23
|
+
rootClassName?: string | undefined;
|
|
22
24
|
style?: import("react").CSSProperties | undefined;
|
|
23
25
|
};
|
|
@@ -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
|
|
@@ -2,9 +2,9 @@ import { BaseComponentProps, BaseFlexProps } from "../../api";
|
|
|
2
2
|
import { BaseSelectProps } from "../../select";
|
|
3
3
|
import { TextProps } from "../../text";
|
|
4
4
|
import { RadioGroupProps } from 'antd';
|
|
5
|
-
import { CheckboxProps as AntdCheckboxProps } from 'antd/
|
|
5
|
+
import { CheckboxProps as AntdCheckboxProps } from 'antd/es/checkbox/Checkbox';
|
|
6
6
|
import { ReactNode } from 'react';
|
|
7
|
-
export interface BaseBoxProps extends Omit<AntdCheckboxProps, 'onChange'>, TextProps, BaseComponentProps {
|
|
7
|
+
export interface BaseBoxProps extends Omit<AntdCheckboxProps, 'onChange' | 'onBlur' | 'onFocus'>, Omit<TextProps, 'onBlur' | 'onFocus'>, BaseComponentProps {
|
|
8
8
|
children?: ReactNode;
|
|
9
9
|
text?: ReactNode;
|
|
10
10
|
/**
|
|
@@ -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
|
|
@@ -64,10 +64,7 @@ function renderMaxTag(omittedValues) {
|
|
|
64
64
|
return (0, _jsxRuntime.jsxs)(_text.Text, {
|
|
65
65
|
autoShowTooltip: false,
|
|
66
66
|
tooltip: {
|
|
67
|
-
title: tooltip
|
|
68
|
-
align: {
|
|
69
|
-
offset: [0, 0]
|
|
70
|
-
}
|
|
67
|
+
title: tooltip
|
|
71
68
|
},
|
|
72
69
|
children: ["+", omittedValues.length, "..."]
|
|
73
70
|
});
|
|
@@ -110,7 +107,7 @@ function useSelect(_ref3) {
|
|
|
110
107
|
})),
|
|
111
108
|
displayOptions = _useSelectOptions.displayOptions,
|
|
112
109
|
restSelectProps = (0, _objectWithoutProperties2.default)(_useSelectOptions, _excluded2);
|
|
113
|
-
function
|
|
110
|
+
function onOpenChange(open) {
|
|
114
111
|
setOpen(open);
|
|
115
112
|
setSearch('');
|
|
116
113
|
}
|
|
@@ -130,7 +127,7 @@ function useSelect(_ref3) {
|
|
|
130
127
|
optionFilterProp: 'originLabel',
|
|
131
128
|
optionLabelProp: 'originLabel',
|
|
132
129
|
getPopupContainer: _api.getPopupContainer,
|
|
133
|
-
|
|
130
|
+
popupRender: customRenderDropdown,
|
|
134
131
|
maxTagPlaceholder: renderMaxTag
|
|
135
132
|
}, (0, _utils.getComponentProps)(restSelectProps)), {}, {
|
|
136
133
|
placeholder: placeholder,
|
|
@@ -138,6 +135,6 @@ function useSelect(_ref3) {
|
|
|
138
135
|
loading: loading,
|
|
139
136
|
options: displayOptions,
|
|
140
137
|
onSearch: showSearch ? setSearch : undefined,
|
|
141
|
-
|
|
138
|
+
onOpenChange: onOpenChange
|
|
142
139
|
});
|
|
143
140
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { FormValues } from "../../form";
|
|
2
2
|
import { BaseSelectProps, SelectOptions } from "..";
|
|
3
|
-
import { DependencyList } from 'react';
|
|
4
3
|
export declare function generateOptions({ options, sort, ...rest }: BaseSelectProps): any[];
|
|
5
4
|
export declare function getOptionsValue(options?: SelectOptions): (string | number)[];
|
|
6
5
|
interface DependenciesProps {
|
|
7
6
|
values?: FormValues;
|
|
8
|
-
deps?:
|
|
7
|
+
deps?: string[];
|
|
9
8
|
search: string;
|
|
10
9
|
isFunctionOptions: boolean;
|
|
11
10
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseComponentProps, FunctionReturn } from "../../api";
|
|
2
2
|
import { UseFetchOptions } from "../../hooks";
|
|
3
3
|
import { TextProps } from "../../text";
|
|
4
|
-
import { SelectProps as AntdSelectProps } from 'antd/
|
|
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 {
|
|
@@ -12,7 +12,8 @@ export declare const alignMap: {
|
|
|
12
12
|
between: string;
|
|
13
13
|
};
|
|
14
14
|
export declare function getAlign(align: HStackProps['align']): string;
|
|
15
|
-
|
|
15
|
+
type WidthFlexStyle = Pick<HStackProps, 'width' | 'style' | 'flex'>;
|
|
16
|
+
export declare function getWidthAndFlex({ width, style, flex }: WidthFlexStyle): import("@emotion/react").SerializedStyles;
|
|
16
17
|
declare const style: {
|
|
17
18
|
hStack: (props: Partial<HStackProps>) => import("@emotion/react").SerializedStyles;
|
|
18
19
|
vStack: (props: Partial<VStackProps>) => import("@emotion/react").SerializedStyles;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseComponentProps, FunctionReturn } from "../../api";
|
|
2
|
-
import { SwitchProps as AntdSwitchProps } from 'antd/
|
|
3
|
-
import { EllipsisConfig } from 'antd/
|
|
2
|
+
import { SwitchProps as AntdSwitchProps } from 'antd/es/switch';
|
|
3
|
+
import { EllipsisConfig } from 'antd/es/typography/Base';
|
|
4
4
|
export interface SwitchProps extends AntdSwitchProps, BaseComponentProps {
|
|
5
5
|
/**
|
|
6
6
|
* @description 提示信息
|
|
@@ -24,7 +24,6 @@ function generateAction(action, params) {
|
|
|
24
24
|
disabled: (0, _api.executeFunction)(action.disabled, params),
|
|
25
25
|
tooltip: (0, _api.executeFunction)(action.tooltip, params),
|
|
26
26
|
confirm: (0, _api.executeFunction)(action.confirm, params),
|
|
27
|
-
confirmMessage: (0, _api.executeFunction)(action.confirmMessage, params),
|
|
28
27
|
onClick: function onClick() {
|
|
29
28
|
var _action$onClick;
|
|
30
29
|
return (_action$onClick = action.onClick) === null || _action$onClick === void 0 ? void 0 : _action$onClick.call(action, params);
|