@zat-design/sisyphus-react 3.11.14-beta.1 → 3.11.14-beta.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/.vscode/extensions.json +5 -0
- package/coverage/lcov-report/src/.umi/core/history.ts.html +148 -0
- package/coverage/lcov-report/src/.umi/core/index.html +146 -0
- package/coverage/lcov-report/src/.umi/core/plugin.ts.html +109 -0
- package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +160 -0
- package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +97 -0
- package/coverage/src/.umi/core/history.ts.html +148 -0
- package/coverage/src/.umi/core/index.html +146 -0
- package/coverage/src/.umi/core/plugin.ts.html +109 -0
- package/coverage/src/.umi/core/pluginRegister.ts.html +160 -0
- package/coverage/src/.umi/core/polyfill.ts.html +97 -0
- package/dist/index.esm.css +26 -15
- package/dist/less.esm.css +26 -15
- package/es/ProAction/index.d.ts +2 -2
- package/es/ProAction/propsType.d.ts +16 -10
- package/es/ProConfigProvider/index.d.ts +6 -6
- package/es/ProDownload/index.d.ts +2 -2
- package/es/ProDownload/propsType.d.ts +2 -1
- package/es/ProDrawerForm/components/ProDrawer/index.d.ts +2 -2
- package/es/ProDrawerForm/components/ProModal/index.d.ts +2 -2
- package/es/ProDrawerForm/index.d.ts +1 -2
- package/es/ProDrawerForm/propsType.d.ts +38 -27
- package/es/ProDrawerForm/utils/index.d.ts +2 -2
- package/es/ProEditLabel/components/RenderProForm.d.ts +2 -2
- package/es/ProEditLabel/index.d.ts +2 -2
- package/es/ProEditLabel/propsType.d.ts +135 -8
- package/es/ProEditLabel/style/index.less +24 -25
- package/es/ProEditTable/components/Summary/index.d.ts +2 -2
- package/es/ProEditTable/index.d.ts +2 -2
- package/es/ProEditTable/index.js +6 -8
- package/es/ProEditTable/propsType.d.ts +232 -93
- package/es/ProEditTable/style/index.less +1 -0
- package/es/ProEnum/components/Group.d.ts +2 -2
- package/es/ProEnum/components/Tag.d.ts +2 -2
- package/es/ProEnum/hooks/useEnumRequest.d.ts +2 -2
- package/es/ProEnum/index.d.ts +2 -2
- package/es/ProEnum/propsType.d.ts +230 -41
- package/es/ProEnum/propsType.js +0 -6
- package/es/ProEnum/utils/index.d.ts +1 -1
- package/es/ProForm/components/FormFooter/index.d.ts +2 -2
- package/es/ProForm/components/FormFooter/propsType.d.ts +8 -3
- package/es/ProForm/components/base/Checkbox/index.d.ts +2 -2
- package/es/ProForm/components/base/Input/index.d.ts +2 -2
- package/es/ProForm/components/base/Input/propsType.d.ts +8 -4
- package/es/ProForm/components/base/InputNumber/index.d.ts +2 -2
- package/es/ProForm/components/base/Radio/index.d.ts +2 -2
- package/es/ProForm/components/base/RangePicker/index.d.ts +2 -2
- package/es/ProForm/components/base/Select/index.d.ts +2 -2
- package/es/ProForm/components/base/Switch/index.d.ts +2 -2
- package/es/ProForm/components/base/SwitchCheckbox/index.d.ts +2 -2
- package/es/ProForm/components/base/TextArea/index.d.ts +2 -2
- package/es/ProForm/components/base/TimePicker/index.d.ts +2 -2
- package/es/ProForm/components/combination/Container/index.d.ts +2 -2
- package/es/ProForm/components/combination/Container/propsType.d.ts +9 -5
- package/es/ProForm/components/combination/FormList/components/ActionButton.d.ts +4 -4
- package/es/ProForm/components/combination/FormList/components/BlockFields.d.ts +4 -4
- package/es/ProForm/components/combination/FormList/components/LineFields.d.ts +4 -4
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.d.ts +2 -2
- package/es/ProForm/components/combination/FormList/index.d.ts +2 -2
- package/es/ProForm/components/combination/FormList/propsType.d.ts +18 -10
- package/es/ProForm/components/combination/Group/index.d.ts +2 -2
- package/es/ProForm/components/combination/Group/propsType.d.ts +10 -5
- package/es/ProForm/components/combination/Group/utils.d.ts +4 -4
- package/es/ProForm/components/combination/ProCascader/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +8 -3
- package/es/ProForm/components/combination/ProCombination/index.d.ts +3 -3
- package/es/ProForm/components/combination/ProCombination/propsType.d.ts +10 -5
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +58 -5
- package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +7 -3
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +14 -8
- package/es/ProForm/components/render/ChangedWrapper.d.ts +2 -2
- package/es/ProForm/components/render/Render.d.ts +2 -2
- package/es/ProForm/components/render/RenderFields.d.ts +4 -4
- package/es/ProForm/components/render/propsType.d.ts +54 -43
- package/es/ProForm/index.d.ts +2 -2
- package/es/ProForm/propsType.d.ts +22 -15
- package/es/ProForm/utils/transformValue.d.ts +2 -2
- package/es/ProForm/utils/useFieldProps.d.ts +3 -3
- package/es/ProForm/utils/useShouldUpdate.d.ts +3 -3
- package/es/ProIcon/index.d.ts +2 -2
- package/es/ProIcon/propsTypes.d.ts +124 -49
- package/es/ProLayout/components/Layout/Header/index.d.ts +2 -2
- package/es/ProLayout/components/Layout/Menu/index.d.ts +2 -2
- package/es/ProLayout/components/Layout/Notice/index.d.ts +2 -2
- package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +9 -2
- package/es/ProLayout/components/ProCollapse/index.d.ts +2 -2
- package/es/ProLayout/components/ProCollapse/index.js +12 -4
- package/es/ProLayout/components/ProFooter/PropTypes.d.ts +18 -1
- package/es/ProLayout/components/ProFooter/index.d.ts +2 -2
- package/es/ProLayout/components/ProHeader/PropTypes.d.ts +121 -14
- package/es/ProLayout/components/ProHeader/index.d.ts +2 -2
- package/es/ProLayout/index.d.ts +5 -5
- package/es/ProLayout/index.js +6 -2
- package/es/ProLayout/propTypes.d.ts +182 -25
- package/es/ProLayout/utils/index.d.ts +2 -2
- package/es/ProSelect/index.d.ts +3 -3
- package/es/ProSelect/propsType.d.ts +141 -31
- package/es/ProStep/components/Item/index.d.ts +2 -2
- package/es/ProStep/components/Step/index.d.ts +2 -2
- package/es/ProStep/index.d.ts +2 -2
- package/es/ProStep/index.js +12 -1
- package/es/ProStep/propsType.d.ts +60 -12
- package/es/ProStep/utils/index.d.ts +2 -2
- package/es/ProTable/components/FormatColumn/index.d.ts +2 -2
- package/es/ProTable/components/FormatColumn/index.js +2 -2
- package/es/ProTable/hooks/useAntdTable.d.ts +2 -2
- package/es/ProTable/index.d.ts +2 -2
- package/es/ProTable/propsType.d.ts +590 -39
- package/es/ProTable/style/index.less +3 -0
- package/es/ProTabs/index.d.ts +2 -2
- package/es/ProTabs/index.js +4 -4
- package/es/ProTabs/propType.d.ts +66 -9
- package/es/ProThemeTools/index.d.ts +2 -2
- package/es/ProThemeTools/propsType.d.ts +136 -14
- package/es/ProTooltip/index.d.ts +2 -2
- package/es/ProTooltip/propsType.d.ts +52 -9
- package/es/ProTree/components/ProTreeSelect/propsType.d.ts +2 -2
- package/es/ProTree/components/SearchTitle.d.ts +2 -2
- package/es/ProTree/propsType.d.ts +651 -62
- package/es/ProTreeModal/propsType.d.ts +2 -2
- package/es/ProUpload/components/ButtonRender.d.ts +2 -2
- package/es/ProUpload/components/DraggableUploadListItem.d.ts +2 -2
- package/es/ProUpload/components/Example.d.ts +2 -2
- package/es/ProUpload/components/ImageRender.d.ts +2 -2
- package/es/ProUpload/index.d.ts +2 -2
- package/es/ProUpload/index.js +0 -7
- package/es/ProUpload/propsType.d.ts +59 -8
- package/es/ProWaterMark/index.d.ts +2 -2
- package/es/ProWaterMark/propsType.d.ts +2 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/lib/ProAction/index.d.ts +2 -2
- package/lib/ProAction/propsType.d.ts +16 -10
- package/lib/ProConfigProvider/index.d.ts +6 -6
- package/lib/ProDownload/index.d.ts +2 -2
- package/lib/ProDownload/propsType.d.ts +2 -1
- package/lib/ProDrawerForm/components/ProDrawer/index.d.ts +2 -2
- package/lib/ProDrawerForm/components/ProModal/index.d.ts +2 -2
- package/lib/ProDrawerForm/index.d.ts +1 -2
- package/lib/ProDrawerForm/propsType.d.ts +38 -27
- package/lib/ProDrawerForm/utils/index.d.ts +2 -2
- package/lib/ProEditLabel/components/RenderProForm.d.ts +2 -2
- package/lib/ProEditLabel/index.d.ts +2 -2
- package/lib/ProEditLabel/propsType.d.ts +135 -8
- package/lib/ProEditLabel/style/index.less +24 -25
- package/lib/ProEditTable/components/Summary/index.d.ts +2 -2
- package/lib/ProEditTable/index.d.ts +2 -2
- package/lib/ProEditTable/index.js +6 -8
- package/lib/ProEditTable/propsType.d.ts +232 -93
- package/lib/ProEditTable/style/index.less +1 -0
- package/lib/ProEnum/components/Group.d.ts +2 -2
- package/lib/ProEnum/components/Tag.d.ts +2 -2
- package/lib/ProEnum/hooks/useEnumRequest.d.ts +2 -2
- package/lib/ProEnum/index.d.ts +2 -2
- package/lib/ProEnum/propsType.d.ts +230 -41
- package/lib/ProEnum/propsType.js +1 -7
- package/lib/ProEnum/utils/index.d.ts +1 -1
- package/lib/ProForm/components/FormFooter/index.d.ts +2 -2
- package/lib/ProForm/components/FormFooter/propsType.d.ts +8 -3
- package/lib/ProForm/components/base/Checkbox/index.d.ts +2 -2
- package/lib/ProForm/components/base/Input/index.d.ts +2 -2
- package/lib/ProForm/components/base/Input/propsType.d.ts +8 -4
- package/lib/ProForm/components/base/InputNumber/index.d.ts +2 -2
- package/lib/ProForm/components/base/Radio/index.d.ts +2 -2
- package/lib/ProForm/components/base/RangePicker/index.d.ts +2 -2
- package/lib/ProForm/components/base/Select/index.d.ts +2 -2
- package/lib/ProForm/components/base/Switch/index.d.ts +2 -2
- package/lib/ProForm/components/base/SwitchCheckbox/index.d.ts +2 -2
- package/lib/ProForm/components/base/TextArea/index.d.ts +2 -2
- package/lib/ProForm/components/base/TimePicker/index.d.ts +2 -2
- package/lib/ProForm/components/combination/Container/index.d.ts +2 -2
- package/lib/ProForm/components/combination/Container/propsType.d.ts +9 -5
- package/lib/ProForm/components/combination/FormList/components/ActionButton.d.ts +4 -4
- package/lib/ProForm/components/combination/FormList/components/BlockFields.d.ts +4 -4
- package/lib/ProForm/components/combination/FormList/components/LineFields.d.ts +4 -4
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.d.ts +2 -2
- package/lib/ProForm/components/combination/FormList/index.d.ts +2 -2
- package/lib/ProForm/components/combination/FormList/propsType.d.ts +18 -10
- package/lib/ProForm/components/combination/Group/index.d.ts +2 -2
- package/lib/ProForm/components/combination/Group/propsType.d.ts +10 -5
- package/lib/ProForm/components/combination/Group/utils.d.ts +4 -4
- package/lib/ProForm/components/combination/ProCascader/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +8 -3
- package/lib/ProForm/components/combination/ProCombination/index.d.ts +3 -3
- package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +10 -5
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +58 -5
- package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +7 -3
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +14 -8
- package/lib/ProForm/components/render/ChangedWrapper.d.ts +2 -2
- package/lib/ProForm/components/render/Render.d.ts +2 -2
- package/lib/ProForm/components/render/RenderFields.d.ts +4 -4
- package/lib/ProForm/components/render/propsType.d.ts +54 -43
- package/lib/ProForm/index.d.ts +2 -2
- package/lib/ProForm/propsType.d.ts +22 -15
- package/lib/ProForm/utils/transformValue.d.ts +2 -2
- package/lib/ProForm/utils/useFieldProps.d.ts +3 -3
- package/lib/ProForm/utils/useShouldUpdate.d.ts +3 -3
- package/lib/ProIcon/index.d.ts +2 -2
- package/lib/ProIcon/propsTypes.d.ts +124 -49
- package/lib/ProLayout/components/Layout/Header/index.d.ts +2 -2
- package/lib/ProLayout/components/Layout/Menu/index.d.ts +2 -2
- package/lib/ProLayout/components/Layout/Notice/index.d.ts +2 -2
- package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +9 -2
- package/lib/ProLayout/components/ProCollapse/index.d.ts +2 -2
- package/lib/ProLayout/components/ProCollapse/index.js +12 -4
- package/lib/ProLayout/components/ProFooter/PropTypes.d.ts +18 -1
- package/lib/ProLayout/components/ProFooter/index.d.ts +2 -2
- package/lib/ProLayout/components/ProHeader/PropTypes.d.ts +121 -14
- package/lib/ProLayout/components/ProHeader/index.d.ts +2 -2
- package/lib/ProLayout/index.d.ts +5 -5
- package/lib/ProLayout/index.js +6 -2
- package/lib/ProLayout/propTypes.d.ts +182 -25
- package/lib/ProLayout/utils/index.d.ts +2 -2
- package/lib/ProSelect/index.d.ts +3 -3
- package/lib/ProSelect/propsType.d.ts +141 -31
- package/lib/ProStep/components/Item/index.d.ts +2 -2
- package/lib/ProStep/components/Step/index.d.ts +2 -2
- package/lib/ProStep/index.d.ts +2 -2
- package/lib/ProStep/index.js +12 -1
- package/lib/ProStep/propsType.d.ts +60 -12
- package/lib/ProStep/utils/index.d.ts +2 -2
- package/lib/ProTable/components/FormatColumn/index.d.ts +2 -2
- package/lib/ProTable/components/FormatColumn/index.js +2 -2
- package/lib/ProTable/hooks/useAntdTable.d.ts +2 -2
- package/lib/ProTable/index.d.ts +2 -2
- package/lib/ProTable/propsType.d.ts +590 -39
- package/lib/ProTable/style/index.less +3 -0
- package/lib/ProTabs/index.d.ts +2 -2
- package/lib/ProTabs/index.js +4 -4
- package/lib/ProTabs/propType.d.ts +66 -9
- package/lib/ProThemeTools/index.d.ts +2 -2
- package/lib/ProThemeTools/propsType.d.ts +136 -14
- package/lib/ProTooltip/index.d.ts +2 -2
- package/lib/ProTooltip/propsType.d.ts +52 -9
- package/lib/ProTree/components/ProTreeSelect/propsType.d.ts +2 -2
- package/lib/ProTree/components/SearchTitle.d.ts +2 -2
- package/lib/ProTree/propsType.d.ts +651 -62
- package/lib/ProTreeModal/propsType.d.ts +2 -2
- package/lib/ProUpload/components/ButtonRender.d.ts +2 -2
- package/lib/ProUpload/components/DraggableUploadListItem.d.ts +2 -2
- package/lib/ProUpload/components/Example.d.ts +2 -2
- package/lib/ProUpload/components/ImageRender.d.ts +2 -2
- package/lib/ProUpload/index.d.ts +2 -2
- package/lib/ProUpload/index.js +0 -7
- package/lib/ProUpload/propsType.d.ts +59 -8
- package/lib/ProWaterMark/index.d.ts +2 -2
- package/lib/ProWaterMark/propsType.d.ts +2 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +12 -0
- package/package.json +1 -1
@@ -3,7 +3,7 @@ import type { FormInstance } from 'antd/es/form/Form';
|
|
3
3
|
import type { ButtonProps, FormListFieldData, FormListOperation, PopconfirmProps } from 'antd';
|
4
4
|
import type { InternalNamePath } from 'antd/es/form/interface';
|
5
5
|
import type { levelType } from '../../../../ProLayout/components/ProCollapse/PropTypes';
|
6
|
-
import type {
|
6
|
+
import type { ProColumnType, ProFormOtherType } from '../../../propsType';
|
7
7
|
export type TitleRender = (record: Record<string, any>, index: number, form: FormInstance) => any;
|
8
8
|
export type TitleType = string | React.ReactNode | TitleRender;
|
9
9
|
type Callback = (record: any, option: Pick<Option, 'namePath' | 'index' | 'operation' | 'form'>) => any | void;
|
@@ -14,7 +14,7 @@ export interface Option {
|
|
14
14
|
form: FormInstance;
|
15
15
|
operation: FormListOperation;
|
16
16
|
}
|
17
|
-
export interface
|
17
|
+
export interface ActionType extends Omit<ButtonProps, 'onClick' | 'type'> {
|
18
18
|
type?: 'add' | 'delete' | 'copy' | 'moveUp' | 'moveDown';
|
19
19
|
onHandle?: Callback;
|
20
20
|
onClick?: Callback;
|
@@ -24,21 +24,21 @@ export interface ActionProps extends Omit<ButtonProps, 'onClick' | 'type'> {
|
|
24
24
|
title?: string;
|
25
25
|
show?: boolean | ((record: any, option: Pick<Option, 'index' | 'form' | 'namePath'>) => boolean);
|
26
26
|
}
|
27
|
-
export interface
|
27
|
+
export interface ToolbarActionType extends Omit<ActionType, 'actionType' | 'onHandle' | 'onClick' | 'show' | 'type'> {
|
28
28
|
type?: 'add';
|
29
29
|
onHandle?: ToolbarCallback;
|
30
30
|
onClick?: ToolbarCallback;
|
31
31
|
show?: boolean | ((record: any, option: Pick<Option, 'form' | 'namePath'>) => boolean);
|
32
32
|
}
|
33
33
|
export type FormListMode = 'block' | 'line' | 'less';
|
34
|
-
export interface
|
35
|
-
columns:
|
36
|
-
otherProps?:
|
34
|
+
export interface FormListType {
|
35
|
+
columns: ProColumnType[];
|
36
|
+
otherProps?: ProFormOtherType;
|
37
37
|
form?: FormInstance;
|
38
38
|
min?: number;
|
39
39
|
max?: number;
|
40
|
-
actionProps?:
|
41
|
-
toolbarProps?:
|
40
|
+
actionProps?: ActionType[] | false;
|
41
|
+
toolbarProps?: ToolbarActionType[] | false;
|
42
42
|
value?: any[];
|
43
43
|
onChange?: (record: any[], option: Pick<Option, 'namePath' | 'form'>) => void;
|
44
44
|
fields: FormListFieldData[];
|
@@ -56,8 +56,16 @@ export interface FormListProps {
|
|
56
56
|
draggable?: boolean;
|
57
57
|
id?: string;
|
58
58
|
}
|
59
|
-
export type
|
60
|
-
export interface
|
59
|
+
export type TypeWithRef = FormListType & React.RefAttributes<FormListRefType>;
|
60
|
+
export interface FormListRefType {
|
61
61
|
operation: FormListOperation;
|
62
62
|
}
|
63
|
+
/**
|
64
|
+
* 兼容旧命名导出
|
65
|
+
*/
|
66
|
+
export type ActionProps = ActionType;
|
67
|
+
export type ToolbarActionProps = ToolbarActionType;
|
68
|
+
export type FormListProps = FormListType;
|
69
|
+
export type PropsWithRef = TypeWithRef;
|
70
|
+
export type FormListRef = FormListRefType;
|
63
71
|
export {};
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import { GroupType } from './propsType';
|
3
3
|
/**
|
4
4
|
* 1. 外层过滤FormItem相关属性, 但是子元素上的 required [disabled] [show] rules [fieldProps] [component] 需要取到并
|
5
5
|
* 2.
|
6
6
|
*
|
7
7
|
* render内部能力 show, component, value, onChange, disabled, clearNotShow, fieldProps
|
8
8
|
*/
|
9
|
-
declare const Group: React.FC<
|
9
|
+
declare const Group: React.FC<GroupType>;
|
10
10
|
export default Group;
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
2
2
|
import { FormItemProps, ModalFuncProps, SpaceProps } from 'antd';
|
3
3
|
import { FormInstance } from 'antd/es/form/Form';
|
4
4
|
import { NamePath } from 'antd/lib/form/interface';
|
5
|
-
import {
|
5
|
+
import { ColumnTypeMap, FunctionArgs, ProFormValueType, ReactiveFunction, ViewType } from '../../../propsType';
|
6
6
|
export interface SpaceType extends SpaceProps {
|
7
7
|
/**
|
8
8
|
* 是否紧凑合并
|
@@ -17,8 +17,8 @@ export interface SpaceType extends SpaceProps {
|
|
17
17
|
/** 间隔距离 */
|
18
18
|
size?: number;
|
19
19
|
}
|
20
|
-
export interface
|
21
|
-
children?:
|
20
|
+
export interface GroupType {
|
21
|
+
children?: GroupColumnType[];
|
22
22
|
space?: SpaceType;
|
23
23
|
className?: string;
|
24
24
|
id?: string;
|
@@ -28,7 +28,7 @@ export interface GroupProps {
|
|
28
28
|
onChange?: (value: any[] | null, options?: any[]) => void;
|
29
29
|
otherProps?: any;
|
30
30
|
}
|
31
|
-
export type
|
31
|
+
export type GroupColumnType<Values = any> = {
|
32
32
|
component?: React.ReactNode | ReactiveFunction<Values, React.ReactNode>;
|
33
33
|
names?: NamePath[];
|
34
34
|
show?: boolean | ReactiveFunction<Values, boolean>;
|
@@ -51,4 +51,9 @@ export type GroupColumnProps<Values = any> = {
|
|
51
51
|
valuePropName?: string;
|
52
52
|
getValueProps?: (value: any) => Record<string, unknown>;
|
53
53
|
desensitization?: [number, number] | ReactiveFunction<Values, [number, number]>;
|
54
|
-
} &
|
54
|
+
} & ColumnTypeMap & FormItemProps;
|
55
|
+
/**
|
56
|
+
* 兼容旧命名导出
|
57
|
+
*/
|
58
|
+
export type GroupProps = GroupType;
|
59
|
+
export type GroupColumnProps<Values = any> = GroupColumnType<Values>;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { InternalNamePath, NamePath } from 'antd/lib/form/interface';
|
3
3
|
import { FormInstance } from 'antd';
|
4
|
-
import {
|
4
|
+
import { GroupColumnType, GroupType, SpaceType } from './propsType';
|
5
5
|
import { ProFormColumnProps, ReactiveFunction } from '../../render/propsType';
|
6
6
|
export type EventArgs = any[];
|
7
7
|
/**
|
@@ -9,7 +9,7 @@ export type EventArgs = any[];
|
|
9
9
|
* @param columns 表单配置数组
|
10
10
|
* @returns
|
11
11
|
*/
|
12
|
-
export declare const insertSeparator: (columns:
|
12
|
+
export declare const insertSeparator: (columns: GroupColumnType[], space?: SpaceType) => any[];
|
13
13
|
/** 带出event的组件默认取值方法 */
|
14
14
|
export declare function defaultGetValueFromEvent(valuePropName: string, ...args: EventArgs): any;
|
15
15
|
/** 转换names */
|
@@ -51,7 +51,7 @@ export declare const getValueTypeTrans: (params: ValueTypeGetterParams) => any;
|
|
51
51
|
/** 执行所有中间件 返回处理后的值 */
|
52
52
|
export declare const getValueMiddleware: (value: any, callbacks?: any[]) => any;
|
53
53
|
interface ColumnsTransformerParams {
|
54
|
-
columns:
|
54
|
+
columns: GroupColumnType[];
|
55
55
|
name?: NamePath;
|
56
56
|
names?: NamePath[];
|
57
57
|
value?: any[];
|
@@ -61,7 +61,7 @@ interface ColumnsTransformerParams {
|
|
61
61
|
index?: number;
|
62
62
|
formDisabled?: boolean;
|
63
63
|
desensitizationKey?: string;
|
64
|
-
groupProps:
|
64
|
+
groupProps: GroupType;
|
65
65
|
}
|
66
66
|
/** 转换columns */
|
67
67
|
export declare const useTransformColumns: (params: ColumnsTransformerParams) => any[];
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import {
|
3
|
-
declare const _default: import("react").MemoExoticComponent<(props:
|
2
|
+
import { ProCascaderType } from './propsType';
|
3
|
+
declare const _default: import("react").MemoExoticComponent<(props: ProCascaderType) => import("react/jsx-runtime").JSX.Element>;
|
4
4
|
export default _default;
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
2
|
import { DefaultOptionType } from 'rc-select/lib/Select';
|
3
3
|
import { Service } from 'ahooks/lib/useRequest/src/types';
|
4
|
-
export interface
|
4
|
+
export interface FieldNamesType {
|
5
5
|
label: string;
|
6
6
|
value: string;
|
7
7
|
children?: string;
|
8
8
|
[key: string]: string;
|
9
9
|
}
|
10
|
-
export interface
|
10
|
+
export interface ProCascaderType {
|
11
11
|
className?: string;
|
12
12
|
mode?: 'address' | 'default';
|
13
13
|
isView?: boolean;
|
@@ -16,7 +16,7 @@ export interface ProCascaderProps {
|
|
16
16
|
hasDetail?: boolean;
|
17
17
|
tooltip?: boolean | ReactNode;
|
18
18
|
detailMaxLength?: number;
|
19
|
-
fieldNames?:
|
19
|
+
fieldNames?: FieldNamesType;
|
20
20
|
dataSource?: DefaultOptionType[];
|
21
21
|
useRequest?: {
|
22
22
|
loadData?: boolean;
|
@@ -38,3 +38,8 @@ export interface ProCascaderProps {
|
|
38
38
|
scrollFollowParent?: boolean;
|
39
39
|
desensitization?: [number, number];
|
40
40
|
}
|
41
|
+
/**
|
42
|
+
* 兼容旧命名导出
|
43
|
+
*/
|
44
|
+
export type fieldNamesProps = FieldNamesType;
|
45
|
+
export type ProCascaderProps = ProCascaderType;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { FC } from 'react';
|
2
|
-
import {
|
2
|
+
import { ProCombinationType, ChildPropsItemType } from './propsType';
|
3
3
|
import './style/index.less';
|
4
|
-
export declare const ProCombination: FC<
|
5
|
-
export declare const childPropsItemProps: FC<
|
4
|
+
export declare const ProCombination: FC<ProCombinationType>;
|
5
|
+
export declare const childPropsItemProps: FC<ChildPropsItemType>;
|
6
6
|
export default ProCombination;
|
@@ -2,8 +2,8 @@ import { FieldNames } from 'rc-select/lib/Select';
|
|
2
2
|
import { FormInstance } from 'antd';
|
3
3
|
import React from 'react';
|
4
4
|
import * as componentMap from '../../index';
|
5
|
-
import {
|
6
|
-
export interface
|
5
|
+
import { ProFormOtherType } from '../../../propsType';
|
6
|
+
export interface ChildPropsItemType {
|
7
7
|
/**
|
8
8
|
* @description 要显示什么组件,支持Input/Select
|
9
9
|
* @default Input
|
@@ -22,7 +22,7 @@ export interface ChildPropsItemProps {
|
|
22
22
|
onChange?: (value: any, option: any, form: FormInstance) => void;
|
23
23
|
[name: string]: any;
|
24
24
|
}
|
25
|
-
export interface
|
25
|
+
export interface ProCombinationType {
|
26
26
|
/**
|
27
27
|
* @description 组件的值,[第一个组件的值,第二个组件的值,]
|
28
28
|
* @default []
|
@@ -42,7 +42,7 @@ export interface ProCombinationProps {
|
|
42
42
|
* @description 子组件内部组件可配置属性,按照数组顺序注入到内部组件中
|
43
43
|
* @default [{},{}]
|
44
44
|
*/
|
45
|
-
childProps?: Array<
|
45
|
+
childProps?: Array<ChildPropsItemType>;
|
46
46
|
/**
|
47
47
|
* @description 是否视图模式
|
48
48
|
* @default false
|
@@ -58,6 +58,11 @@ export interface ProCombinationProps {
|
|
58
58
|
* @default '-'
|
59
59
|
*/
|
60
60
|
separator?: string;
|
61
|
-
otherProps?:
|
61
|
+
otherProps?: ProFormOtherType;
|
62
62
|
id?: string;
|
63
63
|
}
|
64
|
+
/**
|
65
|
+
* 兼容旧命名导出
|
66
|
+
*/
|
67
|
+
export type ChildPropsItemProps = ChildPropsItemType;
|
68
|
+
export type ProCombinationProps = ProCombinationType;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<Omit<
|
2
|
+
import { ProModalSelectType } from './propsType';
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<ProModalSelectType, "ref"> & React.RefAttributes<unknown>>;
|
4
4
|
export default _default;
|
@@ -1,49 +1,102 @@
|
|
1
1
|
import { FormInstance, InputProps, SelectProps, ModalProps } from 'antd';
|
2
2
|
import { Service, Options } from 'ahooks/lib/useRequest/src/types';
|
3
3
|
import React from 'react';
|
4
|
-
import {
|
5
|
-
import {
|
4
|
+
import { ProColumnType } from '../../render/propsType';
|
5
|
+
import { ProFormOtherType } from '../../../propsType';
|
6
|
+
/**
|
7
|
+
* 模态框确认按钮回调函数类型
|
8
|
+
* @param list 选中的数据列表
|
9
|
+
* @returns 返回布尔值或Promise<布尔值>,用于控制模态框是否关闭
|
10
|
+
*/
|
6
11
|
type OnOkFunction = (list?: Record<string, any>[]) => boolean | void | Promise<boolean | void>;
|
12
|
+
/**
|
13
|
+
* 配置选项接口
|
14
|
+
*/
|
7
15
|
interface ConfigOption {
|
16
|
+
/** ahooks的useRequest参数配置 */
|
8
17
|
useRequest?: {
|
18
|
+
/** 请求服务 */
|
9
19
|
service?: Service<any, any>;
|
20
|
+
/** useRequest选项配置 */
|
10
21
|
options?: Options<any, any> & {
|
11
22
|
page?: any;
|
12
23
|
defaultParams?: any;
|
13
24
|
initParams?: any;
|
14
25
|
};
|
26
|
+
/** 初始化参数 */
|
15
27
|
initParams?: any;
|
16
28
|
};
|
17
|
-
|
29
|
+
/** 表单列配置项 */
|
30
|
+
formColumns?: ProColumnType[];
|
31
|
+
/** 选择模式:单选(radio)或多选(checkbox) */
|
18
32
|
type?: 'radio' | 'checkbox';
|
33
|
+
/** 是否开启分页功能 */
|
19
34
|
withPagination?: boolean;
|
35
|
+
/** 转换请求参数 */
|
20
36
|
transformParams?: (params: any) => any;
|
37
|
+
/** 转换响应数据 */
|
21
38
|
transformResponse?: (data: any[]) => any[];
|
39
|
+
/** 模态框属性配置 */
|
22
40
|
modalProps?: ModalProps & {
|
23
41
|
onOk?: OnOkFunction;
|
24
42
|
};
|
43
|
+
/** 表格属性配置 */
|
25
44
|
tableProps?: Record<string, any>;
|
26
45
|
}
|
46
|
+
/**
|
47
|
+
* 模态框选择器属性接口
|
48
|
+
*/
|
27
49
|
interface ProModalPropsType {
|
50
|
+
/** 配置选项 */
|
28
51
|
configOption: ConfigOption;
|
52
|
+
/** 值变更回调 */
|
29
53
|
onChange?: (value: number | string | undefined, option?: any) => void;
|
54
|
+
/** 弹框标题 */
|
30
55
|
title: ModalProps['title'];
|
56
|
+
/** 组件引用 */
|
31
57
|
ref?: React.MutableRefObject<any>;
|
58
|
+
/** 自定义格式化显示值 */
|
32
59
|
onFormat?: (value: any) => string;
|
60
|
+
/** 自定义选项渲染函数 */
|
33
61
|
optionRender?: (value: any) => string;
|
62
|
+
/** 自定义字段名映射 */
|
34
63
|
fieldNames?: any;
|
64
|
+
/** 是否为查看模式 */
|
35
65
|
isView?: boolean;
|
66
|
+
/** 自定义组件渲染 */
|
36
67
|
customRender?: React.ReactNode;
|
68
|
+
/** 自定义空数据展示组件 */
|
37
69
|
viewEmpty?: React.ReactNode;
|
38
|
-
|
70
|
+
/** ProForm中传递的其他参数 */
|
71
|
+
otherProps?: ProFormOtherType;
|
72
|
+
/**
|
73
|
+
* 是否将选项的label包装到value中
|
74
|
+
* 会将Select的value类型从string变为{value: string, label: ReactNode}格式
|
75
|
+
*/
|
39
76
|
labelInValue?: boolean;
|
77
|
+
/** 是否默认选择列表第一项 */
|
40
78
|
defaultOne?: boolean;
|
79
|
+
/** 打开弹框前的校验函数 */
|
41
80
|
beforeOpen?: any;
|
81
|
+
/** 打开弹框后的回调函数 */
|
42
82
|
afterOpen?: any;
|
43
|
-
|
83
|
+
/** 是否启用tooltip提示 */
|
84
|
+
isTooltip?: boolean;
|
85
|
+
/** 是否以"值-名称"形式展示 */
|
44
86
|
showCodeName?: boolean;
|
87
|
+
/** 查询表单实例,用于获取查询表单数据 */
|
45
88
|
searchForm?: FormInstance;
|
89
|
+
/** 模糊查询的字段名 */
|
46
90
|
searchKey?: string;
|
47
91
|
}
|
92
|
+
/** 模态框选择器属性类型(结合Select和Input属性) */
|
48
93
|
export declare type ProModalSelectPropsType = SelectProps & InputProps & ProModalPropsType;
|
94
|
+
/** 配置选项类型 */
|
95
|
+
export type ConfigOptionType = ConfigOption;
|
96
|
+
/** 模态框属性类型 */
|
97
|
+
export type ProModalType = Omit<ProModalPropsType, 'configOption'> & {
|
98
|
+
configOption: ConfigOptionType;
|
99
|
+
};
|
100
|
+
/** 模态框选择器类型(结合Select和Input属性) */
|
101
|
+
export type ProModalSelectType = SelectProps & InputProps & ProModalType;
|
49
102
|
export {};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
3
|
-
export interface
|
2
|
+
import { ProFormOtherType } from '../../../propsType';
|
3
|
+
export interface ProNumberRangeType {
|
4
4
|
/**
|
5
5
|
* @description 组件的值,[最小值,最大值]
|
6
6
|
* @default []
|
@@ -75,6 +75,10 @@ export interface ProNumberRangeProps {
|
|
75
75
|
*/
|
76
76
|
separator?: React.ReactNode | string;
|
77
77
|
childProps?: any[];
|
78
|
-
otherProps?:
|
78
|
+
otherProps?: ProFormOtherType;
|
79
79
|
id?: string;
|
80
80
|
}
|
81
|
+
/**
|
82
|
+
* 兼容旧命名导出
|
83
|
+
*/
|
84
|
+
export type ProNumberRangeProps = ProNumberRangeType;
|
@@ -2,20 +2,20 @@ import { DatePickerProps, TimePickerProps } from 'antd';
|
|
2
2
|
import { PickerPanelDateProps } from 'antd/lib/calendar/generateCalendar';
|
3
3
|
import { Moment } from 'moment';
|
4
4
|
import React from 'react';
|
5
|
-
import {
|
6
|
-
import { Props as
|
5
|
+
import { ProFormOtherType } from '../../../propsType';
|
6
|
+
import { Props as ProRangeLimitType } from '../ProRangeLimit';
|
7
7
|
import { DistributiveOmit } from '../../../../ProForm/propsType';
|
8
8
|
export type DateType = DatePickerProps['value'];
|
9
|
-
export type
|
9
|
+
export type ProTimeLimitType = DistributiveOmit<DatePickerProps, 'value' | 'onChange' | 'mode'> & {
|
10
10
|
value?: string;
|
11
|
-
onChange?: (value:
|
11
|
+
onChange?: (value: ProTimeLimitType['value'] | null, valueData: Moment) => void;
|
12
12
|
disabled?: boolean;
|
13
13
|
foreverDate?: string;
|
14
14
|
foreverText?: string;
|
15
15
|
viewEmpty?: React.ReactNode;
|
16
16
|
format?: string;
|
17
17
|
valueType?: 'moment' | 'format' | 'ISO' | 'dateTime' | 'dateStartEndTime';
|
18
|
-
otherProps?:
|
18
|
+
otherProps?: ProFormOtherType;
|
19
19
|
mode?: 'DatePicker';
|
20
20
|
isView?: boolean;
|
21
21
|
/**
|
@@ -26,9 +26,15 @@ export type ProTimeLimitProps = DistributiveOmit<DatePickerProps, 'value' | 'onC
|
|
26
26
|
showTime?: PickerPanelDateProps<Moment>['showTime'];
|
27
27
|
showNow?: boolean;
|
28
28
|
};
|
29
|
-
export declare const ProTimeLimit: React.FC<
|
30
|
-
export type
|
29
|
+
export declare const ProTimeLimit: React.FC<ProTimeLimitType>;
|
30
|
+
export type ProLimitType = ProTimeLimitType | (ProRangeLimitType & {
|
31
31
|
mode: 'RangePicker';
|
32
32
|
});
|
33
|
-
declare const LimitPick: React.FC<
|
33
|
+
declare const LimitPick: React.FC<ProLimitType>;
|
34
34
|
export default LimitPick;
|
35
|
+
/**
|
36
|
+
* 兼容旧命名导出
|
37
|
+
*/
|
38
|
+
export type ProTimeLimitProps = ProTimeLimitType;
|
39
|
+
export type ProLimitProps = ProLimitType;
|
40
|
+
export type Props = ProRangeLimitType;
|
@@ -2,12 +2,12 @@ import { FormInstance } from 'antd';
|
|
2
2
|
import { NamePath } from 'antd/lib/form/interface';
|
3
3
|
import React from 'react';
|
4
4
|
import { DiffOriginalParams } from '../../utils/diffOriginal';
|
5
|
-
import {
|
5
|
+
import { DiffConfigType } from '../../propsType';
|
6
6
|
interface Props {
|
7
7
|
name?: NamePath;
|
8
8
|
names?: NamePath[];
|
9
9
|
namesStr?: string;
|
10
|
-
diffConfig?:
|
10
|
+
diffConfig?: DiffConfigType;
|
11
11
|
form: FormInstance;
|
12
12
|
onDiff?: DiffOriginalParams['onDiff'];
|
13
13
|
valuePropName?: string;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { ColProps } from 'antd';
|
2
2
|
import { FormInstance } from 'antd/es/form/Form';
|
3
3
|
import React from 'react';
|
4
|
-
import {
|
5
|
-
import {
|
4
|
+
import { ProColumnType } from './propsType';
|
5
|
+
import { DiffConfigType } from '../../propsType';
|
6
6
|
interface Props<T = any> {
|
7
7
|
isView?: boolean;
|
8
|
-
columns:
|
8
|
+
columns: ProColumnType[];
|
9
9
|
disabled?: boolean;
|
10
10
|
form: FormInstance<T>;
|
11
11
|
expand?: boolean | number;
|
@@ -15,7 +15,7 @@ interface Props<T = any> {
|
|
15
15
|
viewEmpty?: React.ReactNode;
|
16
16
|
openState?: boolean;
|
17
17
|
labelWidth?: string | number;
|
18
|
-
diffConfig?:
|
18
|
+
diffConfig?: DiffConfigType;
|
19
19
|
clearNotShow?: boolean;
|
20
20
|
requiredOnView?: boolean;
|
21
21
|
required?: boolean | boolean[] | (() => boolean | boolean[]);
|