doui-react 2.0.8 → 2.0.10
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/form/component/utils.d.ts +10 -10
- package/es/form/style/index.js +1 -1
- package/es/input/component/text-area.d.ts +1 -1
- package/es/input/component/text-area.js +6 -2
- package/es/radio/component/abstract-box.d.ts +29 -29
- package/es/table/component/table.js +56 -62
- package/es/tabs/component/utils.d.ts +8 -8
- package/lib/form/component/utils.d.ts +10 -10
- package/lib/form/style/index.js +1 -1
- package/lib/input/component/text-area.d.ts +1 -1
- package/lib/input/component/text-area.js +6 -2
- package/lib/radio/component/abstract-box.d.ts +29 -29
- package/lib/table/component/table.js +55 -61
- package/lib/tabs/component/utils.d.ts +8 -8
- package/package.json +1 -1
|
@@ -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,26 +38,26 @@ 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;
|
|
41
42
|
prefixCls?: string | undefined;
|
|
43
|
+
zIndex?: number | undefined;
|
|
44
|
+
animation?: string | undefined;
|
|
45
|
+
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
46
|
+
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
47
|
+
transitionName?: string | undefined;
|
|
48
|
+
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
49
|
+
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
42
50
|
onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
|
|
43
51
|
fresh?: boolean | undefined;
|
|
44
52
|
mouseLeaveDelay?: number | undefined;
|
|
45
53
|
mouseEnterDelay?: number | undefined;
|
|
46
54
|
forceRender?: boolean | undefined;
|
|
47
55
|
popupVisible?: boolean | undefined;
|
|
48
|
-
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
49
|
-
transitionName?: string | undefined;
|
|
50
|
-
animation?: string | undefined;
|
|
51
|
-
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
52
56
|
overlayStyle?: import("react").CSSProperties | undefined;
|
|
53
57
|
overlayClassName?: string | undefined;
|
|
54
58
|
getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
|
|
55
|
-
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
56
|
-
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
57
59
|
arrowContent?: import("react").ReactNode;
|
|
58
|
-
id?: string | undefined;
|
|
59
60
|
overlayInnerStyle?: import("react").CSSProperties | undefined;
|
|
60
|
-
zIndex?: number | undefined;
|
|
61
61
|
icon: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
62
62
|
} | undefined;
|
|
63
63
|
initialValue: any;
|
|
@@ -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>) | ((search?: string) => import("../../api").FunctionReturn<SelectOptions>) | import("../../api").FunctionReturn<SelectOptions> | undefined;
|
|
89
89
|
interface FocusFirstInputParams extends CommonParams {
|
|
90
90
|
focusFirstOnMount: FormProps['focusFirstOnMount'];
|
|
91
91
|
}
|
package/es/form/style/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var style = {
|
|
|
7
7
|
wrapper: function wrapper(_ref) {
|
|
8
8
|
var labelWidth = _ref.labelWidth,
|
|
9
9
|
formItemMarginBottom = _ref.formItemMarginBottom;
|
|
10
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-form-item {\n margin-bottom: ", ";\n }\n\n .ant-form-item-label {\n width: ", ";\n }\n\n .ant-form-item-with-help .ant-form-item-explain {\n line-height: 1.1;\n padding: 4px 0;\n\n .ant-form-item-explain-error + .ant-form-item-explain-error {\n margin-top: 2px;\n }\n }\n\n &.ant-form-horizontal {\n .ant-form-item-required::before {\n position: absolute;\n left: -10px;\n }\n }\n\n &.ant-form-vertical {\n .ant-form-item-label {\n padding-bottom: 5px;\n }\n }\n "])), transformValueWithStyleUnit(formItemMarginBottom), transformValueWithStyleUnit(labelWidth));
|
|
10
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-form-item {\n margin-bottom: ", ";\n }\n\n .ant-form-item-label {\n width: ", ";\n }\n\n .ant-form-item-with-help .ant-form-item-explain {\n line-height: 1.1;\n padding: 4px 0;\n\n .ant-form-item-explain-error + .ant-form-item-explain-error {\n margin-top: 2px;\n }\n }\n\n &.ant-form-horizontal {\n .ant-form-item-label {\n padding-left: 10px;\n }\n\n .ant-form-item-required::before {\n position: absolute;\n left: -10px;\n }\n }\n\n &.ant-form-vertical {\n .ant-form-item-label {\n padding-bottom: 5px;\n }\n }\n "])), transformValueWithStyleUnit(formItemMarginBottom), transformValueWithStyleUnit(labelWidth));
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
export default style;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { InputProps } from '../type';
|
|
2
|
-
export declare function Textarea({ resize, ...props }: InputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function Textarea({ resize, maxLength, ...props }: InputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["resize"];
|
|
3
|
+
var _excluded = ["resize", "maxLength"];
|
|
4
4
|
import { Input } from 'antd';
|
|
5
5
|
import style from "../style";
|
|
6
6
|
import { useInputValidate } from "./utils";
|
|
@@ -8,8 +8,12 @@ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
|
8
8
|
export function Textarea(_ref) {
|
|
9
9
|
var _ref$resize = _ref.resize,
|
|
10
10
|
resize = _ref$resize === void 0 ? true : _ref$resize,
|
|
11
|
+
_ref$maxLength = _ref.maxLength,
|
|
12
|
+
maxLength = _ref$maxLength === void 0 ? 1000 : _ref$maxLength,
|
|
11
13
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
-
var params = useInputValidate(
|
|
14
|
+
var params = useInputValidate(_objectSpread({
|
|
15
|
+
maxLength: maxLength
|
|
16
|
+
}, props));
|
|
13
17
|
return _jsx(Input.TextArea, _objectSpread({
|
|
14
18
|
css: style.textArea(resize)
|
|
15
19
|
}, params));
|
|
@@ -36,26 +36,26 @@ 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
|
+
id?: string | undefined;
|
|
39
40
|
prefixCls?: string | undefined;
|
|
41
|
+
zIndex?: number | undefined;
|
|
42
|
+
animation?: string | undefined;
|
|
43
|
+
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
44
|
+
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
45
|
+
transitionName?: string | undefined;
|
|
46
|
+
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
47
|
+
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
40
48
|
onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
|
|
41
49
|
fresh?: boolean | undefined;
|
|
42
50
|
mouseLeaveDelay?: number | undefined;
|
|
43
51
|
mouseEnterDelay?: number | undefined;
|
|
44
52
|
forceRender?: boolean | undefined;
|
|
45
53
|
popupVisible?: boolean | undefined;
|
|
46
|
-
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
47
|
-
transitionName?: string | undefined;
|
|
48
|
-
animation?: string | undefined;
|
|
49
|
-
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
50
54
|
overlayStyle?: import("react").CSSProperties | undefined;
|
|
51
55
|
overlayClassName?: string | undefined;
|
|
52
56
|
getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
|
|
53
|
-
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
54
|
-
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
55
57
|
arrowContent?: import("react").ReactNode;
|
|
56
|
-
id?: string | undefined;
|
|
57
58
|
overlayInnerStyle?: import("react").CSSProperties | undefined;
|
|
58
|
-
zIndex?: number | undefined;
|
|
59
59
|
};
|
|
60
60
|
boxProps: {
|
|
61
61
|
onChange(e: CheckboxChangeEvent): void;
|
|
@@ -65,18 +65,12 @@ 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
|
-
prefixCls?: string | undefined;
|
|
69
|
-
disabled?: boolean | undefined;
|
|
70
|
-
className?: string | undefined;
|
|
71
|
-
style?: import("react").CSSProperties | undefined;
|
|
72
|
-
id?: string | undefined;
|
|
73
|
-
rootClassName?: string | undefined;
|
|
74
|
-
checked?: boolean | undefined;
|
|
75
68
|
name?: string | undefined;
|
|
76
|
-
required?: boolean | undefined;
|
|
77
|
-
type?: string | undefined;
|
|
78
69
|
defaultChecked?: boolean | undefined;
|
|
79
70
|
autoFocus?: boolean | undefined;
|
|
71
|
+
className?: string | undefined;
|
|
72
|
+
id?: string | undefined;
|
|
73
|
+
style?: import("react").CSSProperties | undefined;
|
|
80
74
|
tabIndex?: number | undefined;
|
|
81
75
|
title?: string | undefined;
|
|
82
76
|
onKeyDown?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
@@ -84,20 +78,25 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
84
78
|
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
85
79
|
onMouseEnter?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
86
80
|
onMouseLeave?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
81
|
+
prefixCls?: string | undefined;
|
|
82
|
+
disabled?: boolean | undefined;
|
|
83
|
+
rootClassName?: string | undefined;
|
|
84
|
+
required?: boolean | undefined;
|
|
85
|
+
type?: string | undefined;
|
|
86
|
+
checked?: boolean | undefined;
|
|
87
87
|
indeterminate?: boolean | undefined;
|
|
88
88
|
skipGroup?: boolean | undefined;
|
|
89
|
+
onSubmit?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
89
90
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
90
|
-
color?: string | undefined;
|
|
91
|
-
rows?: number | false | undefined;
|
|
92
91
|
suppressContentEditableWarning?: boolean | undefined;
|
|
93
92
|
suppressHydrationWarning?: boolean | undefined;
|
|
94
93
|
accessKey?: string | undefined;
|
|
95
|
-
autoCapitalize?: (string & {}) | "
|
|
96
|
-
contentEditable?:
|
|
94
|
+
autoCapitalize?: (string & {}) | "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
95
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
97
96
|
contextMenu?: string | undefined;
|
|
98
97
|
dir?: string | undefined;
|
|
99
98
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
100
|
-
enterKeyHint?: "
|
|
99
|
+
enterKeyHint?: "done" | "enter" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
101
100
|
hidden?: boolean | undefined;
|
|
102
101
|
lang?: string | undefined;
|
|
103
102
|
nonce?: string | undefined;
|
|
@@ -119,6 +118,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
119
118
|
vocab?: string | undefined;
|
|
120
119
|
autoCorrect?: string | undefined;
|
|
121
120
|
autoSave?: string | undefined;
|
|
121
|
+
color?: string | undefined;
|
|
122
122
|
itemProp?: string | undefined;
|
|
123
123
|
itemScope?: boolean | undefined;
|
|
124
124
|
itemType?: string | undefined;
|
|
@@ -127,13 +127,13 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
127
127
|
results?: number | undefined;
|
|
128
128
|
security?: string | undefined;
|
|
129
129
|
unselectable?: "off" | "on" | undefined;
|
|
130
|
-
inputMode?: "
|
|
130
|
+
inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
131
131
|
is?: string | undefined;
|
|
132
132
|
exportparts?: string | undefined;
|
|
133
133
|
part?: string | undefined;
|
|
134
134
|
"aria-activedescendant"?: string | undefined;
|
|
135
135
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
136
|
-
"aria-autocomplete"?: "
|
|
136
|
+
"aria-autocomplete"?: "inline" | "none" | "list" | "both" | undefined;
|
|
137
137
|
"aria-braillelabel"?: string | undefined;
|
|
138
138
|
"aria-brailleroledescription"?: string | undefined;
|
|
139
139
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -143,17 +143,17 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
143
143
|
"aria-colindextext"?: string | undefined;
|
|
144
144
|
"aria-colspan"?: number | undefined;
|
|
145
145
|
"aria-controls"?: string | undefined;
|
|
146
|
-
"aria-current"?: boolean | "
|
|
146
|
+
"aria-current"?: boolean | "page" | "true" | "false" | "step" | "location" | "date" | "time" | undefined;
|
|
147
147
|
"aria-describedby"?: string | undefined;
|
|
148
148
|
"aria-description"?: string | undefined;
|
|
149
149
|
"aria-details"?: string | undefined;
|
|
150
150
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
151
|
-
"aria-dropeffect"?: "
|
|
151
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
152
152
|
"aria-errormessage"?: string | undefined;
|
|
153
153
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
154
154
|
"aria-flowto"?: string | undefined;
|
|
155
155
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
156
|
-
"aria-haspopup"?: boolean | "
|
|
156
|
+
"aria-haspopup"?: boolean | "grid" | "true" | "false" | "dialog" | "listbox" | "menu" | "tree" | undefined;
|
|
157
157
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
158
158
|
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
159
159
|
"aria-keyshortcuts"?: string | undefined;
|
|
@@ -170,7 +170,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
170
170
|
"aria-posinset"?: number | undefined;
|
|
171
171
|
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
172
172
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
173
|
-
"aria-relevant"?: "
|
|
173
|
+
"aria-relevant"?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
174
174
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
175
175
|
"aria-roledescription"?: string | undefined;
|
|
176
176
|
"aria-rowcount"?: number | undefined;
|
|
@@ -208,7 +208,6 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
208
208
|
onInputCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
209
209
|
onReset?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
210
210
|
onResetCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
211
|
-
onSubmit?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
212
211
|
onSubmitCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
213
212
|
onInvalid?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
214
213
|
onInvalidCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
@@ -339,6 +338,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
339
338
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
340
339
|
direction?: import("antd/es/config-provider").DirectionType;
|
|
341
340
|
tooltip?: import("react").ReactNode | import("antd").TooltipProps;
|
|
341
|
+
rows?: number | false | undefined;
|
|
342
342
|
autoShowTooltip?: boolean | undefined;
|
|
343
343
|
refs?: import("../../api").Refs | undefined;
|
|
344
344
|
ref: import("../../api").Refs | undefined;
|
|
@@ -10,7 +10,7 @@ var _excluded = ["rowKey", "loading", "columns", "dataSource", "editorValueKey"]
|
|
|
10
10
|
import { executeFunction, getClassName, includesNonStrictMode } from "../../api";
|
|
11
11
|
import { Empty } from "../../empty";
|
|
12
12
|
import { Form, useFormContext } from "../../form";
|
|
13
|
-
import { useListOperation } from "../../hooks";
|
|
13
|
+
import { useListOperation, useMemoFn } from "../../hooks";
|
|
14
14
|
import { TableProvider, useSearchColumn } from "./..";
|
|
15
15
|
import { cx } from '@emotion/css';
|
|
16
16
|
import _ from 'lodash';
|
|
@@ -87,11 +87,51 @@ function useInit(_ref2) {
|
|
|
87
87
|
value: dataSource,
|
|
88
88
|
onChange: setDataSource
|
|
89
89
|
});
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
var updateSelectedStatus = useMemoFn(function (keys) {
|
|
91
|
+
var data = _.map(dataSource, function (item) {
|
|
92
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
93
|
+
__selected__: includesNonStrictMode(keys, item[rowKey])
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
setDataSource(data);
|
|
97
|
+
});
|
|
98
|
+
var refresh = useMemoFn( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
99
|
+
var _ref4,
|
|
100
|
+
onlyLoading,
|
|
101
|
+
params,
|
|
102
|
+
_yield$Promise$all,
|
|
103
|
+
_yield$Promise$all2,
|
|
104
|
+
res,
|
|
105
|
+
_args2 = arguments;
|
|
106
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
107
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
108
|
+
case 0:
|
|
109
|
+
_ref4 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, onlyLoading = _ref4.onlyLoading, params = _objectWithoutProperties(_ref4, _excluded2);
|
|
110
|
+
setLoading(true);
|
|
111
|
+
if (!onlyLoading) {
|
|
112
|
+
_context2.next = 4;
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
return _context2.abrupt("return");
|
|
116
|
+
case 4:
|
|
117
|
+
_context2.prev = 4;
|
|
118
|
+
_context2.next = 7;
|
|
119
|
+
return Promise.all([executeFunction(data, params), getInitialContext(params)]);
|
|
120
|
+
case 7:
|
|
121
|
+
_yield$Promise$all = _context2.sent;
|
|
122
|
+
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 1);
|
|
123
|
+
res = _yield$Promise$all2[0];
|
|
124
|
+
setDataSource(res || []);
|
|
125
|
+
case 11:
|
|
126
|
+
_context2.prev = 11;
|
|
127
|
+
setLoading(false);
|
|
128
|
+
return _context2.finish(11);
|
|
129
|
+
case 14:
|
|
130
|
+
case "end":
|
|
131
|
+
return _context2.stop();
|
|
132
|
+
}
|
|
133
|
+
}, _callee2, null, [[4,, 11, 14]]);
|
|
134
|
+
})));
|
|
95
135
|
var context = _objectSpread(_objectSpread({}, contexts), {}, {
|
|
96
136
|
refresh: refresh,
|
|
97
137
|
dataSource: dataSource,
|
|
@@ -107,57 +147,11 @@ function useInit(_ref2) {
|
|
|
107
147
|
columns: columns,
|
|
108
148
|
editorValueKey: editorValueKey
|
|
109
149
|
});
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
});
|
|
116
|
-
setDataSource(data);
|
|
117
|
-
}
|
|
118
|
-
function refresh() {
|
|
119
|
-
return _refresh.apply(this, arguments);
|
|
120
|
-
}
|
|
121
|
-
function _refresh() {
|
|
122
|
-
_refresh = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
123
|
-
var _ref3,
|
|
124
|
-
onlyLoading,
|
|
125
|
-
params,
|
|
126
|
-
_yield$Promise$all,
|
|
127
|
-
_yield$Promise$all2,
|
|
128
|
-
res,
|
|
129
|
-
_args2 = arguments;
|
|
130
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
131
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
132
|
-
case 0:
|
|
133
|
-
_ref3 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, onlyLoading = _ref3.onlyLoading, params = _objectWithoutProperties(_ref3, _excluded2);
|
|
134
|
-
setLoading(true);
|
|
135
|
-
if (!onlyLoading) {
|
|
136
|
-
_context2.next = 4;
|
|
137
|
-
break;
|
|
138
|
-
}
|
|
139
|
-
return _context2.abrupt("return");
|
|
140
|
-
case 4:
|
|
141
|
-
_context2.prev = 4;
|
|
142
|
-
_context2.next = 7;
|
|
143
|
-
return Promise.all([executeFunction(data, params), getInitialContext(params)]);
|
|
144
|
-
case 7:
|
|
145
|
-
_yield$Promise$all = _context2.sent;
|
|
146
|
-
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 1);
|
|
147
|
-
res = _yield$Promise$all2[0];
|
|
148
|
-
setDataSource(res || []);
|
|
149
|
-
case 11:
|
|
150
|
-
_context2.prev = 11;
|
|
151
|
-
setLoading(false);
|
|
152
|
-
return _context2.finish(11);
|
|
153
|
-
case 14:
|
|
154
|
-
case "end":
|
|
155
|
-
return _context2.stop();
|
|
156
|
-
}
|
|
157
|
-
}, _callee2, null, [[4,, 11, 14]]);
|
|
158
|
-
}));
|
|
159
|
-
return _refresh.apply(this, arguments);
|
|
160
|
-
}
|
|
150
|
+
|
|
151
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
152
|
+
useEffect(function () {
|
|
153
|
+
return void refresh();
|
|
154
|
+
}, [data]);
|
|
161
155
|
var rowSelection = getRowSelection({
|
|
162
156
|
rowKey: rowKey,
|
|
163
157
|
columns: columns,
|
|
@@ -177,11 +171,11 @@ function useInit(_ref2) {
|
|
|
177
171
|
useFormWrapper: useFormWrapper
|
|
178
172
|
};
|
|
179
173
|
}
|
|
180
|
-
export function useTable(
|
|
181
|
-
var onRowClick =
|
|
182
|
-
width =
|
|
183
|
-
emptyText =
|
|
184
|
-
restProps = _objectWithoutProperties(
|
|
174
|
+
export function useTable(_ref5) {
|
|
175
|
+
var onRowClick = _ref5.onRowClick,
|
|
176
|
+
width = _ref5.width,
|
|
177
|
+
emptyText = _ref5.emptyText,
|
|
178
|
+
restProps = _objectWithoutProperties(_ref5, _excluded3);
|
|
185
179
|
var params = useInit(restProps);
|
|
186
180
|
var _useSearchColumn = useSearchColumn(),
|
|
187
181
|
getSearchColumn = _useSearchColumn.getSearchColumn;
|
|
@@ -6,19 +6,19 @@ 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
|
-
|
|
10
|
-
disabled?: boolean | undefined;
|
|
9
|
+
children?: import("react").ReactNode;
|
|
11
10
|
className?: string | undefined;
|
|
11
|
+
id?: string | undefined;
|
|
12
12
|
style?: import("react").CSSProperties | undefined;
|
|
13
|
-
|
|
13
|
+
prefixCls?: string | undefined;
|
|
14
|
+
disabled?: boolean | undefined;
|
|
14
15
|
forceRender?: boolean | undefined;
|
|
15
|
-
|
|
16
|
-
destroyInactiveTabPane?: boolean | undefined;
|
|
17
|
-
animated?: boolean | undefined;
|
|
16
|
+
icon?: import("react").ReactNode;
|
|
18
17
|
closable?: boolean | undefined;
|
|
19
18
|
closeIcon?: import("react").ReactNode;
|
|
20
|
-
icon?: import("react").ReactNode;
|
|
21
|
-
tabKey?: string | undefined;
|
|
22
19
|
active?: boolean | undefined;
|
|
20
|
+
destroyInactiveTabPane?: boolean | undefined;
|
|
21
|
+
animated?: boolean | undefined;
|
|
22
|
+
tabKey?: string | undefined;
|
|
23
23
|
}[];
|
|
24
24
|
export {};
|
|
@@ -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,26 +38,26 @@ 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;
|
|
41
42
|
prefixCls?: string | undefined;
|
|
43
|
+
zIndex?: number | undefined;
|
|
44
|
+
animation?: string | undefined;
|
|
45
|
+
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
46
|
+
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
47
|
+
transitionName?: string | undefined;
|
|
48
|
+
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
49
|
+
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
42
50
|
onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
|
|
43
51
|
fresh?: boolean | undefined;
|
|
44
52
|
mouseLeaveDelay?: number | undefined;
|
|
45
53
|
mouseEnterDelay?: number | undefined;
|
|
46
54
|
forceRender?: boolean | undefined;
|
|
47
55
|
popupVisible?: boolean | undefined;
|
|
48
|
-
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
49
|
-
transitionName?: string | undefined;
|
|
50
|
-
animation?: string | undefined;
|
|
51
|
-
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
52
56
|
overlayStyle?: import("react").CSSProperties | undefined;
|
|
53
57
|
overlayClassName?: string | undefined;
|
|
54
58
|
getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
|
|
55
|
-
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
56
|
-
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
57
59
|
arrowContent?: import("react").ReactNode;
|
|
58
|
-
id?: string | undefined;
|
|
59
60
|
overlayInnerStyle?: import("react").CSSProperties | undefined;
|
|
60
|
-
zIndex?: number | undefined;
|
|
61
61
|
icon: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
62
62
|
} | undefined;
|
|
63
63
|
initialValue: any;
|
|
@@ -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>) | ((search?: string) => import("../../api").FunctionReturn<SelectOptions>) | import("../../api").FunctionReturn<SelectOptions> | undefined;
|
|
89
89
|
interface FocusFirstInputParams extends CommonParams {
|
|
90
90
|
focusFirstOnMount: FormProps['focusFirstOnMount'];
|
|
91
91
|
}
|
package/lib/form/style/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var style = {
|
|
|
26
26
|
wrapper: function wrapper(_ref) {
|
|
27
27
|
var labelWidth = _ref.labelWidth,
|
|
28
28
|
formItemMarginBottom = _ref.formItemMarginBottom;
|
|
29
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ant-form-item {\n margin-bottom: ", ";\n }\n\n .ant-form-item-label {\n width: ", ";\n }\n\n .ant-form-item-with-help .ant-form-item-explain {\n line-height: 1.1;\n padding: 4px 0;\n\n .ant-form-item-explain-error + .ant-form-item-explain-error {\n margin-top: 2px;\n }\n }\n\n &.ant-form-horizontal {\n .ant-form-item-required::before {\n position: absolute;\n left: -10px;\n }\n }\n\n &.ant-form-vertical {\n .ant-form-item-label {\n padding-bottom: 5px;\n }\n }\n "])), (0, _api.transformValueWithStyleUnit)(formItemMarginBottom), (0, _api.transformValueWithStyleUnit)(labelWidth));
|
|
29
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ant-form-item {\n margin-bottom: ", ";\n }\n\n .ant-form-item-label {\n width: ", ";\n }\n\n .ant-form-item-with-help .ant-form-item-explain {\n line-height: 1.1;\n padding: 4px 0;\n\n .ant-form-item-explain-error + .ant-form-item-explain-error {\n margin-top: 2px;\n }\n }\n\n &.ant-form-horizontal {\n .ant-form-item-label {\n padding-left: 10px;\n }\n\n .ant-form-item-required::before {\n position: absolute;\n left: -10px;\n }\n }\n\n &.ant-form-vertical {\n .ant-form-item-label {\n padding-bottom: 5px;\n }\n }\n "])), (0, _api.transformValueWithStyleUnit)(formItemMarginBottom), (0, _api.transformValueWithStyleUnit)(labelWidth));
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
var _default = exports.default = style;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { InputProps } from '../type';
|
|
2
|
-
export declare function Textarea({ resize, ...props }: InputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function Textarea({ resize, maxLength, ...props }: InputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -11,12 +11,16 @@ var _antd = require("antd");
|
|
|
11
11
|
var _style = _interopRequireDefault(require("../style"));
|
|
12
12
|
var _utils = require("./utils");
|
|
13
13
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
14
|
-
var _excluded = ["resize"];
|
|
14
|
+
var _excluded = ["resize", "maxLength"];
|
|
15
15
|
function Textarea(_ref) {
|
|
16
16
|
var _ref$resize = _ref.resize,
|
|
17
17
|
resize = _ref$resize === void 0 ? true : _ref$resize,
|
|
18
|
+
_ref$maxLength = _ref.maxLength,
|
|
19
|
+
maxLength = _ref$maxLength === void 0 ? 1000 : _ref$maxLength,
|
|
18
20
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
19
|
-
var params = (0, _utils.useInputValidate)(
|
|
21
|
+
var params = (0, _utils.useInputValidate)((0, _objectSpread2.default)({
|
|
22
|
+
maxLength: maxLength
|
|
23
|
+
}, props));
|
|
20
24
|
return (0, _jsxRuntime.jsx)(_antd.Input.TextArea, (0, _objectSpread2.default)({
|
|
21
25
|
css: _style.default.textArea(resize)
|
|
22
26
|
}, params));
|
|
@@ -36,26 +36,26 @@ 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
|
+
id?: string | undefined;
|
|
39
40
|
prefixCls?: string | undefined;
|
|
41
|
+
zIndex?: number | undefined;
|
|
42
|
+
animation?: string | undefined;
|
|
43
|
+
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
44
|
+
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
45
|
+
transitionName?: string | undefined;
|
|
46
|
+
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
47
|
+
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
40
48
|
onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
|
|
41
49
|
fresh?: boolean | undefined;
|
|
42
50
|
mouseLeaveDelay?: number | undefined;
|
|
43
51
|
mouseEnterDelay?: number | undefined;
|
|
44
52
|
forceRender?: boolean | undefined;
|
|
45
53
|
popupVisible?: boolean | undefined;
|
|
46
|
-
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
47
|
-
transitionName?: string | undefined;
|
|
48
|
-
animation?: string | undefined;
|
|
49
|
-
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
50
54
|
overlayStyle?: import("react").CSSProperties | undefined;
|
|
51
55
|
overlayClassName?: string | undefined;
|
|
52
56
|
getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
|
|
53
|
-
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
54
|
-
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
55
57
|
arrowContent?: import("react").ReactNode;
|
|
56
|
-
id?: string | undefined;
|
|
57
58
|
overlayInnerStyle?: import("react").CSSProperties | undefined;
|
|
58
|
-
zIndex?: number | undefined;
|
|
59
59
|
};
|
|
60
60
|
boxProps: {
|
|
61
61
|
onChange(e: CheckboxChangeEvent): void;
|
|
@@ -65,18 +65,12 @@ 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
|
-
prefixCls?: string | undefined;
|
|
69
|
-
disabled?: boolean | undefined;
|
|
70
|
-
className?: string | undefined;
|
|
71
|
-
style?: import("react").CSSProperties | undefined;
|
|
72
|
-
id?: string | undefined;
|
|
73
|
-
rootClassName?: string | undefined;
|
|
74
|
-
checked?: boolean | undefined;
|
|
75
68
|
name?: string | undefined;
|
|
76
|
-
required?: boolean | undefined;
|
|
77
|
-
type?: string | undefined;
|
|
78
69
|
defaultChecked?: boolean | undefined;
|
|
79
70
|
autoFocus?: boolean | undefined;
|
|
71
|
+
className?: string | undefined;
|
|
72
|
+
id?: string | undefined;
|
|
73
|
+
style?: import("react").CSSProperties | undefined;
|
|
80
74
|
tabIndex?: number | undefined;
|
|
81
75
|
title?: string | undefined;
|
|
82
76
|
onKeyDown?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
@@ -84,20 +78,25 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
84
78
|
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
85
79
|
onMouseEnter?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
86
80
|
onMouseLeave?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
81
|
+
prefixCls?: string | undefined;
|
|
82
|
+
disabled?: boolean | undefined;
|
|
83
|
+
rootClassName?: string | undefined;
|
|
84
|
+
required?: boolean | undefined;
|
|
85
|
+
type?: string | undefined;
|
|
86
|
+
checked?: boolean | undefined;
|
|
87
87
|
indeterminate?: boolean | undefined;
|
|
88
88
|
skipGroup?: boolean | undefined;
|
|
89
|
+
onSubmit?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
89
90
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
90
|
-
color?: string | undefined;
|
|
91
|
-
rows?: number | false | undefined;
|
|
92
91
|
suppressContentEditableWarning?: boolean | undefined;
|
|
93
92
|
suppressHydrationWarning?: boolean | undefined;
|
|
94
93
|
accessKey?: string | undefined;
|
|
95
|
-
autoCapitalize?: (string & {}) | "
|
|
96
|
-
contentEditable?:
|
|
94
|
+
autoCapitalize?: (string & {}) | "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
95
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
97
96
|
contextMenu?: string | undefined;
|
|
98
97
|
dir?: string | undefined;
|
|
99
98
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
100
|
-
enterKeyHint?: "
|
|
99
|
+
enterKeyHint?: "done" | "enter" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
101
100
|
hidden?: boolean | undefined;
|
|
102
101
|
lang?: string | undefined;
|
|
103
102
|
nonce?: string | undefined;
|
|
@@ -119,6 +118,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
119
118
|
vocab?: string | undefined;
|
|
120
119
|
autoCorrect?: string | undefined;
|
|
121
120
|
autoSave?: string | undefined;
|
|
121
|
+
color?: string | undefined;
|
|
122
122
|
itemProp?: string | undefined;
|
|
123
123
|
itemScope?: boolean | undefined;
|
|
124
124
|
itemType?: string | undefined;
|
|
@@ -127,13 +127,13 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
127
127
|
results?: number | undefined;
|
|
128
128
|
security?: string | undefined;
|
|
129
129
|
unselectable?: "off" | "on" | undefined;
|
|
130
|
-
inputMode?: "
|
|
130
|
+
inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
131
131
|
is?: string | undefined;
|
|
132
132
|
exportparts?: string | undefined;
|
|
133
133
|
part?: string | undefined;
|
|
134
134
|
"aria-activedescendant"?: string | undefined;
|
|
135
135
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
136
|
-
"aria-autocomplete"?: "
|
|
136
|
+
"aria-autocomplete"?: "inline" | "none" | "list" | "both" | undefined;
|
|
137
137
|
"aria-braillelabel"?: string | undefined;
|
|
138
138
|
"aria-brailleroledescription"?: string | undefined;
|
|
139
139
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -143,17 +143,17 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
143
143
|
"aria-colindextext"?: string | undefined;
|
|
144
144
|
"aria-colspan"?: number | undefined;
|
|
145
145
|
"aria-controls"?: string | undefined;
|
|
146
|
-
"aria-current"?: boolean | "
|
|
146
|
+
"aria-current"?: boolean | "page" | "true" | "false" | "step" | "location" | "date" | "time" | undefined;
|
|
147
147
|
"aria-describedby"?: string | undefined;
|
|
148
148
|
"aria-description"?: string | undefined;
|
|
149
149
|
"aria-details"?: string | undefined;
|
|
150
150
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
151
|
-
"aria-dropeffect"?: "
|
|
151
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
152
152
|
"aria-errormessage"?: string | undefined;
|
|
153
153
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
154
154
|
"aria-flowto"?: string | undefined;
|
|
155
155
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
156
|
-
"aria-haspopup"?: boolean | "
|
|
156
|
+
"aria-haspopup"?: boolean | "grid" | "true" | "false" | "dialog" | "listbox" | "menu" | "tree" | undefined;
|
|
157
157
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
158
158
|
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
159
159
|
"aria-keyshortcuts"?: string | undefined;
|
|
@@ -170,7 +170,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
170
170
|
"aria-posinset"?: number | undefined;
|
|
171
171
|
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
172
172
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
173
|
-
"aria-relevant"?: "
|
|
173
|
+
"aria-relevant"?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
174
174
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
175
175
|
"aria-roledescription"?: string | undefined;
|
|
176
176
|
"aria-rowcount"?: number | undefined;
|
|
@@ -208,7 +208,6 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
208
208
|
onInputCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
209
209
|
onReset?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
210
210
|
onResetCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
211
|
-
onSubmit?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
212
211
|
onSubmitCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
213
212
|
onInvalid?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
214
213
|
onInvalidCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
@@ -339,6 +338,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
339
338
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
340
339
|
direction?: import("antd/es/config-provider").DirectionType;
|
|
341
340
|
tooltip?: import("react").ReactNode | import("antd").TooltipProps;
|
|
341
|
+
rows?: number | false | undefined;
|
|
342
342
|
autoShowTooltip?: boolean | undefined;
|
|
343
343
|
refs?: import("../../api").Refs | undefined;
|
|
344
344
|
ref: import("../../api").Refs | undefined;
|
|
@@ -95,11 +95,51 @@ function useInit(_ref2) {
|
|
|
95
95
|
value: dataSource,
|
|
96
96
|
onChange: setDataSource
|
|
97
97
|
});
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
var updateSelectedStatus = (0, _hooks.useMemoFn)(function (keys) {
|
|
99
|
+
var data = _lodash.default.map(dataSource, function (item) {
|
|
100
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
101
|
+
__selected__: (0, _api.includesNonStrictMode)(keys, item[rowKey])
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
setDataSource(data);
|
|
105
|
+
});
|
|
106
|
+
var refresh = (0, _hooks.useMemoFn)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2() {
|
|
107
|
+
var _ref4,
|
|
108
|
+
onlyLoading,
|
|
109
|
+
params,
|
|
110
|
+
_yield$Promise$all,
|
|
111
|
+
_yield$Promise$all2,
|
|
112
|
+
res,
|
|
113
|
+
_args2 = arguments;
|
|
114
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
|
115
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
116
|
+
case 0:
|
|
117
|
+
_ref4 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, onlyLoading = _ref4.onlyLoading, params = (0, _objectWithoutProperties2.default)(_ref4, _excluded2);
|
|
118
|
+
setLoading(true);
|
|
119
|
+
if (!onlyLoading) {
|
|
120
|
+
_context2.next = 4;
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
return _context2.abrupt("return");
|
|
124
|
+
case 4:
|
|
125
|
+
_context2.prev = 4;
|
|
126
|
+
_context2.next = 7;
|
|
127
|
+
return Promise.all([(0, _api.executeFunction)(data, params), getInitialContext(params)]);
|
|
128
|
+
case 7:
|
|
129
|
+
_yield$Promise$all = _context2.sent;
|
|
130
|
+
_yield$Promise$all2 = (0, _slicedToArray2.default)(_yield$Promise$all, 1);
|
|
131
|
+
res = _yield$Promise$all2[0];
|
|
132
|
+
setDataSource(res || []);
|
|
133
|
+
case 11:
|
|
134
|
+
_context2.prev = 11;
|
|
135
|
+
setLoading(false);
|
|
136
|
+
return _context2.finish(11);
|
|
137
|
+
case 14:
|
|
138
|
+
case "end":
|
|
139
|
+
return _context2.stop();
|
|
140
|
+
}
|
|
141
|
+
}, _callee2, null, [[4,, 11, 14]]);
|
|
142
|
+
})));
|
|
103
143
|
var context = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, contexts), {}, {
|
|
104
144
|
refresh: refresh,
|
|
105
145
|
dataSource: dataSource,
|
|
@@ -115,57 +155,11 @@ function useInit(_ref2) {
|
|
|
115
155
|
columns: columns,
|
|
116
156
|
editorValueKey: editorValueKey
|
|
117
157
|
});
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
});
|
|
124
|
-
setDataSource(data);
|
|
125
|
-
}
|
|
126
|
-
function refresh() {
|
|
127
|
-
return _refresh.apply(this, arguments);
|
|
128
|
-
}
|
|
129
|
-
function _refresh() {
|
|
130
|
-
_refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2() {
|
|
131
|
-
var _ref3,
|
|
132
|
-
onlyLoading,
|
|
133
|
-
params,
|
|
134
|
-
_yield$Promise$all,
|
|
135
|
-
_yield$Promise$all2,
|
|
136
|
-
res,
|
|
137
|
-
_args2 = arguments;
|
|
138
|
-
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
|
139
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
140
|
-
case 0:
|
|
141
|
-
_ref3 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, onlyLoading = _ref3.onlyLoading, params = (0, _objectWithoutProperties2.default)(_ref3, _excluded2);
|
|
142
|
-
setLoading(true);
|
|
143
|
-
if (!onlyLoading) {
|
|
144
|
-
_context2.next = 4;
|
|
145
|
-
break;
|
|
146
|
-
}
|
|
147
|
-
return _context2.abrupt("return");
|
|
148
|
-
case 4:
|
|
149
|
-
_context2.prev = 4;
|
|
150
|
-
_context2.next = 7;
|
|
151
|
-
return Promise.all([(0, _api.executeFunction)(data, params), getInitialContext(params)]);
|
|
152
|
-
case 7:
|
|
153
|
-
_yield$Promise$all = _context2.sent;
|
|
154
|
-
_yield$Promise$all2 = (0, _slicedToArray2.default)(_yield$Promise$all, 1);
|
|
155
|
-
res = _yield$Promise$all2[0];
|
|
156
|
-
setDataSource(res || []);
|
|
157
|
-
case 11:
|
|
158
|
-
_context2.prev = 11;
|
|
159
|
-
setLoading(false);
|
|
160
|
-
return _context2.finish(11);
|
|
161
|
-
case 14:
|
|
162
|
-
case "end":
|
|
163
|
-
return _context2.stop();
|
|
164
|
-
}
|
|
165
|
-
}, _callee2, null, [[4,, 11, 14]]);
|
|
166
|
-
}));
|
|
167
|
-
return _refresh.apply(this, arguments);
|
|
168
|
-
}
|
|
158
|
+
|
|
159
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
160
|
+
(0, _react.useEffect)(function () {
|
|
161
|
+
return void refresh();
|
|
162
|
+
}, [data]);
|
|
169
163
|
var rowSelection = (0, _utils.getRowSelection)({
|
|
170
164
|
rowKey: rowKey,
|
|
171
165
|
columns: columns,
|
|
@@ -185,11 +179,11 @@ function useInit(_ref2) {
|
|
|
185
179
|
useFormWrapper: useFormWrapper
|
|
186
180
|
};
|
|
187
181
|
}
|
|
188
|
-
function useTable(
|
|
189
|
-
var onRowClick =
|
|
190
|
-
width =
|
|
191
|
-
emptyText =
|
|
192
|
-
restProps = (0, _objectWithoutProperties2.default)(
|
|
182
|
+
function useTable(_ref5) {
|
|
183
|
+
var onRowClick = _ref5.onRowClick,
|
|
184
|
+
width = _ref5.width,
|
|
185
|
+
emptyText = _ref5.emptyText,
|
|
186
|
+
restProps = (0, _objectWithoutProperties2.default)(_ref5, _excluded3);
|
|
193
187
|
var params = useInit(restProps);
|
|
194
188
|
var _useSearchColumn = (0, _2.useSearchColumn)(),
|
|
195
189
|
getSearchColumn = _useSearchColumn.getSearchColumn;
|
|
@@ -6,19 +6,19 @@ 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
|
-
|
|
10
|
-
disabled?: boolean | undefined;
|
|
9
|
+
children?: import("react").ReactNode;
|
|
11
10
|
className?: string | undefined;
|
|
11
|
+
id?: string | undefined;
|
|
12
12
|
style?: import("react").CSSProperties | undefined;
|
|
13
|
-
|
|
13
|
+
prefixCls?: string | undefined;
|
|
14
|
+
disabled?: boolean | undefined;
|
|
14
15
|
forceRender?: boolean | undefined;
|
|
15
|
-
|
|
16
|
-
destroyInactiveTabPane?: boolean | undefined;
|
|
17
|
-
animated?: boolean | undefined;
|
|
16
|
+
icon?: import("react").ReactNode;
|
|
18
17
|
closable?: boolean | undefined;
|
|
19
18
|
closeIcon?: import("react").ReactNode;
|
|
20
|
-
icon?: import("react").ReactNode;
|
|
21
|
-
tabKey?: string | undefined;
|
|
22
19
|
active?: boolean | undefined;
|
|
20
|
+
destroyInactiveTabPane?: boolean | undefined;
|
|
21
|
+
animated?: boolean | undefined;
|
|
22
|
+
tabKey?: string | undefined;
|
|
23
23
|
}[];
|
|
24
24
|
export {};
|