@zat-design/sisyphus-react 4.0.15 → 4.0.16
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/ProAction/propsType.d.ts +0 -1
- package/es/ProDownload/propsType.d.ts +0 -1
- package/es/ProEditLabel/propsType.d.ts +0 -5
- package/es/ProEnum/hooks/useEnum.d.ts +5 -5
- package/es/ProEnum/propsType.d.ts +2 -9
- package/es/ProEnum/utils/index.d.ts +3 -3
- package/es/ProForm/components/FormFooter/propsType.d.ts +0 -5
- package/es/ProForm/components/combination/Container/propsType.d.ts +0 -4
- package/es/ProForm/components/combination/FormList/propsType.d.ts +0 -8
- package/es/ProForm/components/combination/Group/propsType.d.ts +0 -5
- package/es/ProForm/components/combination/Group/utils/index.d.ts +14 -14
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +0 -5
- package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +0 -4
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +0 -6
- package/es/ProForm/components/combination/ProTimeLimit/index.js +1 -5
- package/es/ProForm/components/render/propsType.d.ts +10 -10
- package/es/ProForm/propsType.d.ts +0 -8
- package/es/ProForm/propsType.js +0 -4
- package/es/ProIcon/propsTypes.d.ts +0 -1
- package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +1 -3
- package/es/ProLayout/components/ProFooter/PropTypes.d.ts +0 -1
- package/es/ProLayout/components/ProHeader/PropTypes.d.ts +0 -4
- package/es/ProLayout/components/TabsManager/hooks/useTabsCache.js +1 -1
- package/es/ProLayout/components/TabsManager/propTypes.d.ts +0 -1
- package/es/ProLayout/components/TabsManager/propTypes.js +1 -2
- package/es/ProLayout/components/TabsManager/utils/index.d.ts +4 -1
- package/es/ProLayout/components/TabsManager/utils/index.js +7 -0
- package/es/ProLayout/propTypes.d.ts +0 -4
- package/es/ProLayout/propTypes.js +0 -2
- package/es/ProSelect/index.js +45 -7
- package/es/ProSelect/propsType.d.ts +0 -4
- package/es/ProTable/propsType.d.ts +0 -4
- package/es/ProTabs/components/Card/index.d.ts +2 -2
- package/es/ProTabs/propType.d.ts +0 -4
- package/es/ProThemeTools/propsType.d.ts +0 -2
- package/es/ProTooltip/propsType.d.ts +0 -1
- package/es/ProTree/components/ProTreeSelect/propsType.d.ts +0 -2
- package/es/ProTree/propsType.d.ts +0 -2
- package/es/ProTreeModal/propsType.d.ts +0 -2
- package/es/ProUpload/propsType.d.ts +0 -5
- package/es/index.d.ts +14 -14
- package/es/index.js +27 -1
- package/lib/ProAction/propsType.d.ts +0 -1
- package/lib/ProDownload/propsType.d.ts +0 -1
- package/lib/ProEditLabel/propsType.d.ts +0 -5
- package/lib/ProEnum/hooks/useEnum.d.ts +5 -5
- package/lib/ProEnum/propsType.d.ts +2 -9
- package/lib/ProEnum/utils/index.d.ts +3 -3
- package/lib/ProForm/components/FormFooter/propsType.d.ts +0 -5
- package/lib/ProForm/components/combination/Container/propsType.d.ts +0 -4
- package/lib/ProForm/components/combination/FormList/propsType.d.ts +0 -8
- package/lib/ProForm/components/combination/Group/propsType.d.ts +0 -5
- package/lib/ProForm/components/combination/Group/utils/index.d.ts +14 -14
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +0 -5
- package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +0 -4
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +0 -6
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +1 -4
- package/lib/ProForm/components/render/propsType.d.ts +10 -10
- package/lib/ProForm/propsType.d.ts +0 -8
- package/lib/ProForm/propsType.js +0 -4
- package/lib/ProIcon/propsTypes.d.ts +0 -1
- package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +1 -3
- package/lib/ProLayout/components/ProFooter/PropTypes.d.ts +0 -1
- package/lib/ProLayout/components/ProHeader/PropTypes.d.ts +0 -4
- package/lib/ProLayout/components/TabsManager/hooks/useTabsCache.js +1 -1
- package/lib/ProLayout/components/TabsManager/propTypes.d.ts +0 -1
- package/lib/ProLayout/components/TabsManager/propTypes.js +1 -2
- package/lib/ProLayout/components/TabsManager/utils/index.d.ts +4 -1
- package/lib/ProLayout/components/TabsManager/utils/index.js +7 -0
- package/lib/ProLayout/propTypes.d.ts +0 -4
- package/lib/ProLayout/propTypes.js +0 -2
- package/lib/ProSelect/index.js +45 -7
- package/lib/ProSelect/propsType.d.ts +0 -4
- package/lib/ProTable/propsType.d.ts +0 -4
- package/lib/ProTabs/components/Card/index.d.ts +2 -2
- package/lib/ProTabs/propType.d.ts +0 -4
- package/lib/ProThemeTools/propsType.d.ts +0 -2
- package/lib/ProTooltip/propsType.d.ts +0 -1
- package/lib/ProTree/components/ProTreeSelect/propsType.d.ts +0 -2
- package/lib/ProTree/propsType.d.ts +0 -2
- package/lib/ProTreeModal/propsType.d.ts +0 -2
- package/lib/ProUpload/propsType.d.ts +0 -5
- package/lib/index.d.ts +14 -14
- package/package.json +1 -1
|
@@ -262,8 +262,3 @@ export interface DraggableUploadListItemType {
|
|
|
262
262
|
*/
|
|
263
263
|
children: React.ReactNode;
|
|
264
264
|
}
|
|
265
|
-
export type UploadFileRes = UploadFileResType;
|
|
266
|
-
export type ExampleModalProps = ExampleModalType;
|
|
267
|
-
export type fieldNamesProps = FieldNamesType;
|
|
268
|
-
export type ProUploadProps = ProUploadType;
|
|
269
|
-
export type DraggableUploadListItemProps = DraggableUploadListItemType;
|
package/es/index.d.ts
CHANGED
|
@@ -28,20 +28,20 @@ export * from './ProConfigProvider';
|
|
|
28
28
|
export * from './locale';
|
|
29
29
|
export { default as ProBackBtn } from './ProLayout/components/ProHeader/components/ProBackBtn';
|
|
30
30
|
export type { ProConfigProviderType } from './ProConfigProvider';
|
|
31
|
-
export type { ProFormType,
|
|
31
|
+
export type { ProFormType, ProFormColumnType } from './ProForm/propsType';
|
|
32
32
|
export type { ProFormComponentType } from './ProForm/components';
|
|
33
|
-
export type { ProTableType, ProTableColumnType, ProTableSummaryType, ProTableUseAntdTableType
|
|
34
|
-
export type { ProUploadType
|
|
35
|
-
export type { ProTabsType, ProTabsItemType
|
|
36
|
-
export type { BreadcrumbColumnType, SubDescribeColumnType, DescribeColumnType, ProHeaderType,
|
|
37
|
-
export type {
|
|
38
|
-
export type { ProTooltipType
|
|
39
|
-
export type { ProIconType
|
|
40
|
-
export type { ProTreeType, ProTreeSelectType
|
|
41
|
-
export type { ProTreeModalType, ProTreeModalActionType
|
|
42
|
-
export type { ProEditTableType, ProEditTableColumnType, ProEditTableSummaryColumnType, ProEditTableSummaryConfigType, ProEditTableActionType,
|
|
43
|
-
export type { ProStepType, ProStepContextType, ProStepItemType
|
|
44
|
-
export type { ProDrawerFormType
|
|
45
|
-
export type { ProModalSelectType, ProModalSelectConfigType
|
|
33
|
+
export type { ProTableType, ProTableColumnType, ProTableSummaryType, ProTableUseAntdTableType } from './ProTable/propsType';
|
|
34
|
+
export type { ProUploadType } from './ProUpload/propsType';
|
|
35
|
+
export type { ProTabsType, ProTabsItemType } from './ProTabs/propType';
|
|
36
|
+
export type { BreadcrumbColumnType, SubDescribeColumnType, DescribeColumnType, ProHeaderType, } from './ProLayout/components/ProHeader/PropTypes';
|
|
37
|
+
export type { ProLayoutType } from './ProLayout/propTypes';
|
|
38
|
+
export type { ProTooltipType } from './ProTooltip/propsType';
|
|
39
|
+
export type { ProIconType } from './ProIcon/propsTypes';
|
|
40
|
+
export type { ProTreeType, ProTreeSelectType } from './ProTree/propsType';
|
|
41
|
+
export type { ProTreeModalType, ProTreeModalActionType } from './ProTreeModal/propsType';
|
|
42
|
+
export type { ProEditTableType, ProEditTableColumnType, ProEditTableSummaryColumnType, ProEditTableSummaryConfigType, ProEditTableActionType, } from './ProEditTable/propsType';
|
|
43
|
+
export type { ProStepType, ProStepContextType, ProStepItemType } from './ProStep/propsType';
|
|
44
|
+
export type { ProDrawerFormType } from './ProDrawerForm/propsType';
|
|
45
|
+
export type { ProModalSelectType, ProModalSelectConfigType } from './ProForm/components/combination/ProModalSelect/propsType';
|
|
46
46
|
export type { ProStepTabType, ProStepTabResultType } from './ProStepTab/propsType';
|
|
47
47
|
export * from './tokens';
|
package/es/index.js
CHANGED
|
@@ -39,7 +39,33 @@ export * from "./ProConfigProvider";
|
|
|
39
39
|
export * from "./locale";
|
|
40
40
|
export { default as ProBackBtn } from "./ProLayout/components/ProHeader/components/ProBackBtn";
|
|
41
41
|
|
|
42
|
-
// TS类型导出
|
|
42
|
+
// TS类型导出 (统一以 Type 结尾,只暴露最外层组件类型)
|
|
43
|
+
|
|
44
|
+
// ProForm 相关类型
|
|
45
|
+
|
|
46
|
+
// ProTable 相关类型
|
|
47
|
+
|
|
48
|
+
// ProUpload 类型
|
|
49
|
+
|
|
50
|
+
// ProTabs 类型
|
|
51
|
+
|
|
52
|
+
// ProLayout 相关类型
|
|
53
|
+
|
|
54
|
+
// ProTooltip 类型
|
|
55
|
+
|
|
56
|
+
// ProIcon 类型
|
|
57
|
+
|
|
58
|
+
// ProTree 相关类型
|
|
59
|
+
|
|
60
|
+
// ProEditTable 相关类型
|
|
61
|
+
|
|
62
|
+
// ProStep 相关类型
|
|
63
|
+
|
|
64
|
+
// ProDrawerForm 类型
|
|
65
|
+
|
|
66
|
+
// ProModalSelect 类型
|
|
67
|
+
|
|
68
|
+
// ProStepTab 类型
|
|
43
69
|
|
|
44
70
|
// token导出
|
|
45
71
|
export * from "./tokens";
|
|
@@ -161,8 +161,3 @@ export interface ProEditLabelType extends Partial<PopconfirmProps> {
|
|
|
161
161
|
*/
|
|
162
162
|
[key: string]: any;
|
|
163
163
|
}
|
|
164
|
-
export type ContainerProps = ContainerType;
|
|
165
|
-
export type StateProps = StateType;
|
|
166
|
-
export type PopupProps = PopupType;
|
|
167
|
-
export type LabelProps = LabelType;
|
|
168
|
-
export type PopupConfirmProps = ProEditLabelType;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataOptionType } from '../propsType';
|
|
2
2
|
/**
|
|
3
3
|
* input code output [DataOption[],getEnumLabel]
|
|
4
4
|
* @param code
|
|
5
5
|
* const [options,fn] = useEnum("code")
|
|
6
6
|
*/
|
|
7
|
-
declare function useEnum(code: string): [
|
|
7
|
+
declare function useEnum(code: string): [DataOptionType[], (val: string, showCodeName?: boolean) => string];
|
|
8
8
|
/**
|
|
9
9
|
* input codes output { code1:DataOption[],code2:DataOption[] }
|
|
10
10
|
* @param codes
|
|
11
11
|
* const dicsMap = useEnum(["code1","code2"])
|
|
12
12
|
*/
|
|
13
|
-
declare function useEnum(codes: string[]): Record<string,
|
|
13
|
+
declare function useEnum(codes: string[]): Record<string, DataOptionType[]>;
|
|
14
14
|
/**
|
|
15
15
|
* input code、value output label
|
|
16
16
|
* @param code
|
|
17
17
|
* @param value
|
|
18
18
|
* @param compose 展示 value-label
|
|
19
19
|
*/
|
|
20
|
-
declare function useEnum(code: string, value?: string, compose?: boolean): [string,
|
|
20
|
+
declare function useEnum(code: string, value?: string, compose?: boolean): [string, DataOptionType];
|
|
21
21
|
/**
|
|
22
22
|
* input code、values array output [labels array, options array]
|
|
23
23
|
* @param code
|
|
@@ -25,5 +25,5 @@ declare function useEnum(code: string, value?: string, compose?: boolean): [stri
|
|
|
25
25
|
* @param compose 展示 value-label
|
|
26
26
|
* @returns [标签数组, 选项数组]
|
|
27
27
|
*/
|
|
28
|
-
declare function useEnum(code: string, values: (string | number)[], compose?: boolean): [string[],
|
|
28
|
+
declare function useEnum(code: string, values: (string | number)[], compose?: boolean): [string[], DataOptionType[]];
|
|
29
29
|
export default useEnum;
|
|
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
|
|
|
2
2
|
import { RadioProps, CheckboxProps } from 'antd';
|
|
3
3
|
import { Service, Options } from 'ahooks/lib/useRequest/src/types';
|
|
4
4
|
import type { ProFormOtherType } from '../ProForm/propsType';
|
|
5
|
-
import type {
|
|
5
|
+
import type { PropSelectType } from '../ProSelect/propsType';
|
|
6
6
|
/**
|
|
7
7
|
* @description 数据选项类型
|
|
8
8
|
*/
|
|
@@ -272,7 +272,7 @@ export type PropProSelectsMapType = {
|
|
|
272
272
|
* @default "ProSelect"
|
|
273
273
|
*/
|
|
274
274
|
type?: 'ProSelect';
|
|
275
|
-
} &
|
|
275
|
+
} & PropSelectType;
|
|
276
276
|
/**
|
|
277
277
|
* @description Radio类型映射
|
|
278
278
|
*/
|
|
@@ -307,11 +307,4 @@ export interface TagPropsMapType {
|
|
|
307
307
|
* @description ProEnum组件属性类型
|
|
308
308
|
*/
|
|
309
309
|
export type ProEnumType = Omit<ProEnumBaseType, 'type'> & (PropProSelectsMapType | PropRadioPropsMapType | CheckboxPropsMapType | TagPropsMapType);
|
|
310
|
-
export type DataOption = DataOptionType;
|
|
311
|
-
export type ProEnum = ProEnumBaseType;
|
|
312
|
-
export type PropProSelectsMap = PropProSelectsMapType;
|
|
313
|
-
export type PropRadioPropsMap = PropRadioPropsMapType;
|
|
314
|
-
export type CheckboxPropsMap = CheckboxPropsMapType;
|
|
315
|
-
export type TagPropsMap = TagPropsMapType;
|
|
316
|
-
export type ProEnumProps = ProEnumBaseType;
|
|
317
310
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DataOptionType } from '../propsType';
|
|
2
2
|
type StorageType = 'localStorage' | 'sessionStorage' | 'indexedDB';
|
|
3
3
|
export declare const baseCacheKey = "zat-design-pro-component-cacheKey";
|
|
4
4
|
interface EnumRes {
|
|
5
|
-
data: Record<string,
|
|
5
|
+
data: Record<string, DataOptionType[]>;
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
@@ -33,7 +33,7 @@ export declare function removeEnumData(storage: StorageType, cacheKey: string):
|
|
|
33
33
|
* @param code
|
|
34
34
|
* @returns
|
|
35
35
|
*/
|
|
36
|
-
export declare function hasEnumList(storage: StorageType, cacheKey: any, code: string): false |
|
|
36
|
+
export declare function hasEnumList(storage: StorageType, cacheKey: any, code: string): false | DataOptionType[];
|
|
37
37
|
/**
|
|
38
38
|
* 判断是否是对象
|
|
39
39
|
* @param obj
|
|
@@ -66,12 +66,4 @@ export type TypeWithRef = FormListType & React.RefAttributes<FormListRefType>;
|
|
|
66
66
|
export interface FormListRefType {
|
|
67
67
|
operation: FormListOperation;
|
|
68
68
|
}
|
|
69
|
-
/**
|
|
70
|
-
* 兼容旧命名导出
|
|
71
|
-
*/
|
|
72
|
-
export type ActionProps = ActionType;
|
|
73
|
-
export type ToolbarActionProps = ToolbarActionType;
|
|
74
|
-
export type FormListProps = FormListType;
|
|
75
|
-
export type PropsWithRef = TypeWithRef;
|
|
76
|
-
export type FormListRef = FormListRefType;
|
|
77
69
|
export {};
|
|
@@ -97,8 +97,3 @@ export interface FlexibleGroupColumnType<Values = any> extends Omit<GroupColumnT
|
|
|
97
97
|
/** 字段属性,支持函数化 */
|
|
98
98
|
fieldProps?: any | ReactiveFunction<Values, any>;
|
|
99
99
|
}
|
|
100
|
-
/**
|
|
101
|
-
* 兼容旧命名导出
|
|
102
|
-
*/
|
|
103
|
-
export type GroupProps = GroupType;
|
|
104
|
-
export type GroupColumnProps<Values = any> = GroupColumnType<Values>;
|
|
@@ -75,25 +75,24 @@ export declare const useFormItemProps: (column: FlexibleGroupColumnType, context
|
|
|
75
75
|
confirm?: boolean | import("antd").ModalFuncProps | import("../../../render/propsType").FunctionArgs<any, boolean | import("antd").ModalFuncProps>;
|
|
76
76
|
show?: boolean | ReactiveFunction<any, boolean>;
|
|
77
77
|
component?: React.ReactNode | ReactiveFunction<any, React.ReactNode>;
|
|
78
|
-
children?: React.ReactNode | ((form: FormInstance<any>) => React.ReactNode);
|
|
79
|
-
style?: React.CSSProperties;
|
|
80
|
-
className?: string;
|
|
81
|
-
rootClassName?: string;
|
|
82
78
|
trim?: boolean;
|
|
83
79
|
normalize?: (value: any, prevValue: any, allValues: import("@rc-component/form/lib/interface").Store) => any;
|
|
84
|
-
|
|
85
|
-
layout?: import("antd/es/form/Form").FormItemLayout;
|
|
86
|
-
help?: React.ReactNode;
|
|
80
|
+
children?: React.ReactNode | ((form: FormInstance<any>) => React.ReactNode);
|
|
87
81
|
vertical?: boolean;
|
|
88
|
-
preserve?: boolean;
|
|
89
82
|
id?: string;
|
|
83
|
+
className?: string;
|
|
84
|
+
hidden?: boolean;
|
|
85
|
+
style?: React.CSSProperties;
|
|
90
86
|
onReset?: () => void;
|
|
91
87
|
prefixCls?: string;
|
|
92
|
-
|
|
88
|
+
rootClassName?: string;
|
|
89
|
+
status?: "" | "success" | "error" | "warning" | "validating";
|
|
93
90
|
trigger?: string;
|
|
94
|
-
status?: "" | "warning" | "error" | "success" | "validating";
|
|
95
|
-
isView?: boolean;
|
|
96
91
|
colon?: boolean;
|
|
92
|
+
isView?: boolean;
|
|
93
|
+
desensitization?: [number, number] | ReactiveFunction<any, [number, number]>;
|
|
94
|
+
getValueProps?: ((value: any) => Record<string, unknown>) & ((value: any) => Record<string, unknown>);
|
|
95
|
+
htmlFor?: string;
|
|
97
96
|
labelAlign?: import("antd/es/form/interface").FormLabelAlign;
|
|
98
97
|
labelCol?: import("antd").ColProps;
|
|
99
98
|
getValueFromEvent?: (...args: import("@rc-component/form/lib/interface").EventArgs) => any;
|
|
@@ -101,18 +100,20 @@ export declare const useFormItemProps: (column: FlexibleGroupColumnType, context
|
|
|
101
100
|
validateTrigger?: string | false | string[];
|
|
102
101
|
validateDebounce?: number;
|
|
103
102
|
valuePropName?: string;
|
|
104
|
-
getValueProps?: ((value: any) => Record<string, unknown>) & ((value: any) => Record<string, unknown>);
|
|
105
103
|
messageVariables?: Record<string, string>;
|
|
106
104
|
initialValue?: any;
|
|
107
105
|
onMetaChange?: (meta: import("@rc-component/form/lib/Field").MetaEvent) => void;
|
|
106
|
+
preserve?: boolean;
|
|
108
107
|
isListField?: boolean;
|
|
109
108
|
isList?: boolean;
|
|
110
109
|
noStyle?: boolean;
|
|
111
110
|
hasFeedback?: boolean | {
|
|
112
111
|
icons: import("antd/es/form/FormItem").FeedbackIcons;
|
|
113
112
|
};
|
|
114
|
-
validateStatus?: "" | "
|
|
113
|
+
validateStatus?: "" | "success" | "error" | "warning" | "validating";
|
|
114
|
+
layout?: import("antd/es/form/Form").FormItemLayout;
|
|
115
115
|
wrapperCol?: import("antd").ColProps;
|
|
116
|
+
help?: React.ReactNode;
|
|
116
117
|
fieldId?: string;
|
|
117
118
|
valueType?: import("../../../render/propsType").ProFormValueType;
|
|
118
119
|
switchValue?: [any, any];
|
|
@@ -126,7 +127,6 @@ export declare const useFormItemProps: (column: FlexibleGroupColumnType, context
|
|
|
126
127
|
toISOString?: boolean;
|
|
127
128
|
toCSTString?: boolean;
|
|
128
129
|
clearNotShow?: boolean;
|
|
129
|
-
desensitization?: [number, number] | ReactiveFunction<any, [number, number]>;
|
|
130
130
|
name: any;
|
|
131
131
|
dependencies: any[];
|
|
132
132
|
tooltip: string | {
|
|
@@ -31,9 +31,3 @@ export type ProLimitType = ProTimeLimitType | (ProRangeLimitType & {
|
|
|
31
31
|
});
|
|
32
32
|
declare const LimitPick: React.FC<ProLimitType>;
|
|
33
33
|
export default LimitPick;
|
|
34
|
-
/**
|
|
35
|
-
* 兼容旧命名导出
|
|
36
|
-
*/
|
|
37
|
-
export type ProTimeLimitProps = ProTimeLimitType;
|
|
38
|
-
export type ProLimitProps = ProLimitType;
|
|
39
|
-
export type Props = ProRangeLimitType;
|
|
@@ -18,16 +18,16 @@ import type { Props as TextAreaProps } from '../base/TextArea';
|
|
|
18
18
|
import type { ProCascaderType } from '../combination/ProCascader/propsType';
|
|
19
19
|
import type { ProModalSelectType } from '../combination/ProModalSelect/propsType';
|
|
20
20
|
import type { ProNumberRangeType } from '../combination/ProNumberRange/propsType';
|
|
21
|
-
import type {
|
|
21
|
+
import type { ProLimitType } from '../combination/ProTimeLimit';
|
|
22
22
|
import type { ProRangeLimitType } from '../combination/ProRangeLimit/propsType';
|
|
23
|
-
import type {
|
|
24
|
-
import type {
|
|
23
|
+
import type { CheckboxPropsMapType, ProEnumType, PropProSelectsMapType, PropRadioPropsMapType } from '../../../ProEnum/propsType';
|
|
24
|
+
import type { PropSelectType as ProSelectProps } from '../../../ProSelect/propsType';
|
|
25
25
|
import type { ProEditTableType } from '../../../ProEditTable/propsType';
|
|
26
26
|
import type { ProTreeModalType } from '../../../ProTreeModal/propsType';
|
|
27
27
|
import type { ProUploadType } from '../../../ProUpload/propsType';
|
|
28
|
-
import type {
|
|
28
|
+
import type { ProTreeType } from '../../../ProTree/propsType';
|
|
29
29
|
import type { GroupType as GroupCopyProps } from '../combination/Group/propsType';
|
|
30
|
-
import type {
|
|
30
|
+
import type { ProCollapseType } from '../../../ProLayout/components/ProCollapse/PropTypes';
|
|
31
31
|
import type { DistributiveOmit, DiffConfigType } from '../../propsType';
|
|
32
32
|
import type { DiffOriginalParams } from '../../utils/diffOriginal';
|
|
33
33
|
import { NamePathsDependencyType } from '../../utils/processDependencies';
|
|
@@ -63,8 +63,8 @@ type TransformToFormField<T extends ControlProps, Values> = DistributiveOmit<T,
|
|
|
63
63
|
/** ProForm disable时,是否完全受控 */
|
|
64
64
|
disabledStrictly?: boolean;
|
|
65
65
|
};
|
|
66
|
-
type ProEnumFormType<Values> = TransformToFormField<
|
|
67
|
-
type ProEnumTableType<Values> = TransformToTableField<
|
|
66
|
+
type ProEnumFormType<Values> = TransformToFormField<ProEnumType, Values> | TransformToFormField<ProEnumType & PropProSelectsMapType, Values> | TransformToFormField<ProEnumType & PropRadioPropsMapType, Values> | TransformToFormField<ProEnumType & CheckboxPropsMapType, Values>;
|
|
67
|
+
type ProEnumTableType<Values> = TransformToTableField<ProEnumType, Values> | TransformToTableField<ProEnumType & PropProSelectsMapType, Values> | TransformToTableField<ProEnumType & PropRadioPropsMapType, Values> | TransformToTableField<ProEnumType & CheckboxPropsMapType, Values>;
|
|
68
68
|
type ProEnumFieldType<Values, TT> = TT extends 'ProForm' ? ProEnumFormType<Values> | ReactiveFunction<Values, ProEnumFormType<Values>> : ProEnumTableType<Values> | ((text: any, values: Values, index: number) => ProEnumTableType<Values>);
|
|
69
69
|
type TransformToTableField<T extends ControlProps, Values> = Omit<T, 'onChange' | 'value' | 'onBlur' | 'role'> & {
|
|
70
70
|
value?: T['value'];
|
|
@@ -133,7 +133,7 @@ export type ColumnTypeMap<Values = any, T = 'ProForm'> = {
|
|
|
133
133
|
fieldProps?: FieldType<ProRangeLimitType, Values, T>;
|
|
134
134
|
} | {
|
|
135
135
|
type?: 'ProTimeLimit';
|
|
136
|
-
fieldProps?: FieldType<
|
|
136
|
+
fieldProps?: FieldType<ProLimitType, Values, T>;
|
|
137
137
|
} | {
|
|
138
138
|
type?: 'ProEnum';
|
|
139
139
|
fieldProps?: ProEnumFieldType<Values, T>;
|
|
@@ -151,13 +151,13 @@ export type ColumnTypeMap<Values = any, T = 'ProForm'> = {
|
|
|
151
151
|
fieldProps?: FieldType<ProUploadType, Values, T>;
|
|
152
152
|
} | {
|
|
153
153
|
type?: 'ProTree';
|
|
154
|
-
fieldProps?: FieldType<
|
|
154
|
+
fieldProps?: FieldType<ProTreeType, Values, T>;
|
|
155
155
|
} | {
|
|
156
156
|
type?: 'Group';
|
|
157
157
|
fieldProps?: GroupCopyProps | ReactiveFunction<Values, GroupCopyProps>;
|
|
158
158
|
} | {
|
|
159
159
|
type?: 'ProCollapse';
|
|
160
|
-
fieldProps?:
|
|
160
|
+
fieldProps?: ProCollapseType | ReactiveFunction<Values, ProCollapseType>;
|
|
161
161
|
} | {
|
|
162
162
|
type?: 'Container';
|
|
163
163
|
fieldProps?: any;
|
|
@@ -128,12 +128,4 @@ export interface ProFormInstanceType<T = any> extends React.ForwardRefExoticComp
|
|
|
128
128
|
useFormInstances: any;
|
|
129
129
|
[key: string]: any;
|
|
130
130
|
}
|
|
131
|
-
/**
|
|
132
|
-
* 兼容旧命名导出
|
|
133
|
-
*/
|
|
134
|
-
export type FooterButtonProps = FooterButtonType;
|
|
135
|
-
export type ProFormOtherProps = ProFormOtherType;
|
|
136
|
-
export type DiffConfigProps = DiffConfigType;
|
|
137
|
-
export type Transform = TransformType;
|
|
138
131
|
export type { ProFormColumnType } from './components/render/propsType';
|
|
139
|
-
export type { ProColumnProps } from './components/render/propsType';
|
package/lib/ProForm/propsType.js
CHANGED
|
@@ -38,7 +38,7 @@ export interface ProCollapseType {
|
|
|
38
38
|
* @description 折叠头部多个标题
|
|
39
39
|
* @default []
|
|
40
40
|
*/
|
|
41
|
-
titleList?:
|
|
41
|
+
titleList?: TitleListType[];
|
|
42
42
|
/**
|
|
43
43
|
* @description id用于锚点定位
|
|
44
44
|
* @default -
|
|
@@ -96,5 +96,3 @@ export interface ProCollapseType {
|
|
|
96
96
|
collapsePanelProps?: CollapsePanelProps;
|
|
97
97
|
[key: string]: any;
|
|
98
98
|
}
|
|
99
|
-
export type ProCollapseProps = ProCollapseType;
|
|
100
|
-
export type TitleListProps = TitleListType;
|
|
@@ -204,7 +204,3 @@ export interface ProHeaderType {
|
|
|
204
204
|
onBack?: () => void;
|
|
205
205
|
[key: string]: any;
|
|
206
206
|
}
|
|
207
|
-
export type ProHeaderProps = ProHeaderType;
|
|
208
|
-
export type BreadcrumbColumnsProps = BreadcrumbColumnType;
|
|
209
|
-
export type SubDescribeColumnsProps = SubDescribeColumnType;
|
|
210
|
-
export type DescribeColumnsProps = DescribeColumnType;
|
|
@@ -17,7 +17,7 @@ class SimpleTabsCache {
|
|
|
17
17
|
constructor(keyPrefix, strategy) {
|
|
18
18
|
_defineProperty(this, "cacheKey", void 0);
|
|
19
19
|
_defineProperty(this, "storage", void 0);
|
|
20
|
-
this.cacheKey =
|
|
20
|
+
this.cacheKey = keyPrefix;
|
|
21
21
|
this.storage = strategy === 'localStorage' ? localStorage : sessionStorage;
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -17,8 +17,11 @@ export declare const shouldOpenExternal: (menuItem: MenusType, target?: string)
|
|
|
17
17
|
export declare const handleExternalOpen: (menuItem: MenusType) => void;
|
|
18
18
|
/**
|
|
19
19
|
* 检查是否超出最大标签页限制
|
|
20
|
+
* @param currentTabs 当前标签页列表
|
|
21
|
+
* @param maxTabs 最大标签页数量,如果为 undefined 或 null,表示无限制
|
|
22
|
+
* @returns 如果超出限制返回 true,否则返回 false
|
|
20
23
|
*/
|
|
21
|
-
export declare const checkTabLimit: (currentTabs: TabItem[], maxTabs
|
|
24
|
+
export declare const checkTabLimit: (currentTabs: TabItem[], maxTabs?: number | null) => boolean;
|
|
22
25
|
/**
|
|
23
26
|
* 移除最旧的标签页(根据访问时间或创建时间)
|
|
24
27
|
*/
|
|
@@ -58,9 +58,16 @@ var handleExternalOpen = menuItem => {
|
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* 检查是否超出最大标签页限制
|
|
61
|
+
* @param currentTabs 当前标签页列表
|
|
62
|
+
* @param maxTabs 最大标签页数量,如果为 undefined 或 null,表示无限制
|
|
63
|
+
* @returns 如果超出限制返回 true,否则返回 false
|
|
61
64
|
*/
|
|
62
65
|
exports.handleExternalOpen = handleExternalOpen;
|
|
63
66
|
var checkTabLimit = (currentTabs, maxTabs) => {
|
|
67
|
+
// 如果 maxTabs 为 undefined 或 null,表示无限制
|
|
68
|
+
if (maxTabs === undefined || maxTabs === null) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
64
71
|
return currentTabs.length >= maxTabs;
|
|
65
72
|
};
|
|
66
73
|
|
|
@@ -235,8 +235,6 @@ export interface ProLayoutStatesType {
|
|
|
235
235
|
*/
|
|
236
236
|
[key: string]: any;
|
|
237
237
|
}
|
|
238
|
-
export type MenusProps = MenusType;
|
|
239
|
-
export type DataSourceProps = DataSourceType;
|
|
240
238
|
export interface TabItem {
|
|
241
239
|
/**
|
|
242
240
|
* @description 标签唯一标识
|
|
@@ -373,8 +371,6 @@ export interface ProLayoutNormalProps extends ProLayoutBaseProps {
|
|
|
373
371
|
tabs?: never;
|
|
374
372
|
}
|
|
375
373
|
export type ProLayoutType = ProLayoutTabsProps | ProLayoutNormalProps;
|
|
376
|
-
export type ProLayoutProps = ProLayoutType;
|
|
377
|
-
export type ProLayoutStates = ProLayoutStatesType;
|
|
378
374
|
export declare const isTabsMode: (props: ProLayoutType) => props is ProLayoutTabsProps;
|
|
379
375
|
export declare const validateTabsProps: (mode?: ProLayoutMode, tabs?: TabsConfig) => void;
|
|
380
376
|
export {};
|