@zat-design/sisyphus-react 3.11.14-beta.10 → 3.11.14-beta.11
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/coverage/lcov-report/src/.umi/core/devScripts.ts.html +241 -0
- package/coverage/lcov-report/src/.umi/core/history.ts.html +3 -3
- package/coverage/lcov-report/src/.umi/core/index.html +68 -8
- package/coverage/lcov-report/src/.umi/core/plugin.ts.html +3 -3
- package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +6 -6
- package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +2 -2
- package/coverage/lcov-report/src/.umi/core/routes.ts.html +26050 -0
- package/coverage/lcov-report/src/.umi/core/umiExports.ts.html +112 -0
- package/coverage/lcov-report/src/.umi/dumi/demos/index.html +116 -0
- package/coverage/lcov-report/src/.umi/dumi/demos/index.ts.html +6340 -0
- package/coverage/lcov-report/src/.umi/dumi/index.html +116 -0
- package/coverage/lcov-report/src/.umi/dumi/layout.tsx.html +109 -0
- package/coverage/lcov-report/src/.umi/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-antd/index.html +116 -0
- package/coverage/{src/.umi/core/pluginRegister.ts.html → lcov-report/src/.umi/plugin-antd/runtime.tsx.html} +46 -34
- package/coverage/{src/.umi/core/polyfill.ts.html → lcov-report/src/.umi/plugin-helmet/exports.ts.html} +7 -10
- package/coverage/lcov-report/src/.umi/plugin-helmet/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/Provider.tsx.html +196 -0
- package/coverage/{src/.umi/core/plugin.ts.html → lcov-report/src/.umi/plugin-initial-state/exports.ts.html} +10 -13
- package/coverage/{src/.umi/core → lcov-report/src/.umi/plugin-initial-state}/index.html +30 -30
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/initialState.ts.html +88 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/runtime.tsx.html +124 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/SelectLang.tsx.html +1246 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/index.html +161 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/locale.tsx.html +268 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/localeExports.ts.html +778 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/runtime.tsx.html +115 -0
- package/coverage/lcov-report/src/.umi/plugin-model/Provider.tsx.html +202 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/constant.tsx.html +97 -0
- package/coverage/{src/.umi/core/history.ts.html → lcov-report/src/.umi/plugin-model/helpers/dispatcher.tsx.html} +32 -38
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/executor.tsx.html +334 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-model/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-model/runtime.tsx.html +121 -0
- package/coverage/lcov-report/src/.umi/plugin-model/useModel.tsx.html +298 -0
- package/coverage/lcov-report/src/.umi/plugin-request/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-request/request.ts.html +919 -0
- package/coverage/lcov-report/src/.umi/umi.ts.html +268 -0
- package/es/ProConfigProvider/index.d.ts +4 -4
- package/es/ProDrawerForm/propsType.d.ts +1 -1
- package/es/ProEditLabel/propsType.d.ts +2 -2
- package/es/ProEditTable/propsType.d.ts +2 -2
- package/es/ProEnum/propsType.d.ts +2 -2
- package/es/ProForm/components/FormFooter/index.d.ts +1 -1
- package/es/ProForm/components/base/Checkbox/index.d.ts +1 -1
- package/es/ProForm/components/base/Input/propsType.d.ts +3 -3
- package/es/ProForm/components/base/InputNumber/index.d.ts +1 -1
- package/es/ProForm/components/base/Radio/index.d.ts +1 -1
- package/es/ProForm/components/base/RangePicker/index.d.ts +1 -1
- package/es/ProForm/components/base/Select/index.d.ts +1 -1
- package/es/ProForm/components/base/Switch/index.d.ts +1 -1
- package/es/ProForm/components/base/SwitchCheckbox/index.d.ts +1 -1
- package/es/ProForm/components/base/TextArea/index.d.ts +1 -1
- package/es/ProForm/components/base/TimePicker/index.d.ts +1 -1
- package/es/ProForm/components/combination/Container/propsType.d.ts +3 -3
- package/es/ProForm/components/combination/FormList/components/ActionButton.d.ts +1 -1
- package/es/ProForm/components/combination/FormList/components/BlockFields.d.ts +1 -1
- package/es/ProForm/components/combination/FormList/components/LineFields.d.ts +2 -2
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.d.ts +1 -1
- package/es/ProForm/components/combination/FormList/propsType.d.ts +2 -2
- package/es/ProForm/components/combination/Group/index.d.ts +1 -1
- package/es/ProForm/components/combination/Group/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/Group/utils.d.ts +3 -3
- package/es/ProForm/components/combination/ProCascader/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProCombination/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProCombination/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +3 -3
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +2 -2
- package/es/ProForm/components/old/EnumSelect/index.d.ts +1 -1
- package/es/ProForm/components/old/EnumSelect/interface.d.ts +2 -2
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +1 -1
- package/es/ProForm/components/old/ProCertNo/index.d.ts +1 -1
- package/es/ProForm/components/old/ProCertValidity/index.d.ts +1 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +1 -1
- package/es/ProForm/components/render/ChangedWrapper.d.ts +1 -1
- package/es/ProForm/components/render/ConfirmWrapper.d.ts +2 -2
- package/es/ProForm/components/render/RenderFields.d.ts +3 -3
- package/es/ProForm/components/render/propsType.d.ts +34 -35
- package/es/ProForm/index.d.ts +1 -1
- package/es/ProForm/propsType.d.ts +2 -2
- package/es/ProForm/utils/transformValue.d.ts +1 -1
- package/es/ProForm/utils/useFieldProps.d.ts +1 -1
- package/es/ProForm/utils/useShouldUpdate.d.ts +3 -3
- package/es/ProSelect/propsType.d.ts +1 -1
- package/es/ProTable/components/FormatColumn/index.js +1 -2
- package/es/ProTree/components/List.d.ts +2 -2
- package/es/ProTree/components/List.js +2 -2
- package/es/ProTree/components/ProTree.d.ts +2 -2
- package/es/ProTree/components/ProTreeSelect/index.d.ts +3 -3
- package/es/ProTree/components/ProTreeSelect/propsType.d.ts +378 -33
- package/es/ProTree/components/SearchTitle.d.ts +1 -1
- package/es/ProTree/components/Tree.d.ts +3 -3
- package/es/ProTree/index.d.ts +2 -2
- package/es/ProTree/index.js +1 -1
- package/es/ProTree/propsType.d.ts +55 -42
- package/es/ProTree/utils.d.ts +7 -7
- package/es/ProTreeModal/components/Cascader.d.ts +3 -3
- package/es/ProTreeModal/components/List.d.ts +3 -3
- package/es/ProTreeModal/components/Tree.d.ts +2 -2
- package/es/ProTreeModal/index.d.ts +2 -2
- package/es/ProTreeModal/index.js +2 -2
- package/es/ProTreeModal/propsType.d.ts +259 -48
- package/es/ProTreeModal/utils.d.ts +7 -7
- package/es/index.d.ts +4 -0
- package/es/index.js +4 -0
- package/lib/ProConfigProvider/index.d.ts +4 -4
- package/lib/ProDrawerForm/propsType.d.ts +1 -1
- package/lib/ProEditLabel/propsType.d.ts +2 -2
- package/lib/ProEditTable/propsType.d.ts +2 -2
- package/lib/ProEnum/propsType.d.ts +2 -2
- package/lib/ProForm/components/FormFooter/index.d.ts +1 -1
- package/lib/ProForm/components/base/Checkbox/index.d.ts +1 -1
- package/lib/ProForm/components/base/Input/propsType.d.ts +3 -3
- package/lib/ProForm/components/base/InputNumber/index.d.ts +1 -1
- package/lib/ProForm/components/base/Radio/index.d.ts +1 -1
- package/lib/ProForm/components/base/RangePicker/index.d.ts +1 -1
- package/lib/ProForm/components/base/Select/index.d.ts +1 -1
- package/lib/ProForm/components/base/Switch/index.d.ts +1 -1
- package/lib/ProForm/components/base/SwitchCheckbox/index.d.ts +1 -1
- package/lib/ProForm/components/base/TextArea/index.d.ts +1 -1
- package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -1
- package/lib/ProForm/components/combination/Container/propsType.d.ts +3 -3
- package/lib/ProForm/components/combination/FormList/components/ActionButton.d.ts +1 -1
- package/lib/ProForm/components/combination/FormList/components/BlockFields.d.ts +1 -1
- package/lib/ProForm/components/combination/FormList/components/LineFields.d.ts +2 -2
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.d.ts +1 -1
- package/lib/ProForm/components/combination/FormList/propsType.d.ts +2 -2
- package/lib/ProForm/components/combination/Group/index.d.ts +1 -1
- package/lib/ProForm/components/combination/Group/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/Group/utils.d.ts +3 -3
- package/lib/ProForm/components/combination/ProCascader/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCombination/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +3 -3
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +2 -2
- package/lib/ProForm/components/old/EnumSelect/index.d.ts +1 -1
- package/lib/ProForm/components/old/EnumSelect/interface.d.ts +2 -2
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProAddress/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProCertNo/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProCertValidity/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +1 -1
- package/lib/ProForm/components/render/ChangedWrapper.d.ts +1 -1
- package/lib/ProForm/components/render/ConfirmWrapper.d.ts +2 -2
- package/lib/ProForm/components/render/RenderFields.d.ts +3 -3
- package/lib/ProForm/components/render/propsType.d.ts +34 -35
- package/lib/ProForm/index.d.ts +1 -1
- package/lib/ProForm/propsType.d.ts +2 -2
- package/lib/ProForm/utils/transformValue.d.ts +1 -1
- package/lib/ProForm/utils/useFieldProps.d.ts +1 -1
- package/lib/ProForm/utils/useShouldUpdate.d.ts +3 -3
- package/lib/ProSelect/propsType.d.ts +1 -1
- package/lib/ProTable/components/FormatColumn/index.js +1 -2
- package/lib/ProTree/components/List.d.ts +2 -2
- package/lib/ProTree/components/List.js +2 -2
- package/lib/ProTree/components/ProTree.d.ts +2 -2
- package/lib/ProTree/components/ProTreeSelect/index.d.ts +3 -3
- package/lib/ProTree/components/ProTreeSelect/propsType.d.ts +378 -33
- package/lib/ProTree/components/SearchTitle.d.ts +1 -1
- package/lib/ProTree/components/Tree.d.ts +3 -3
- package/lib/ProTree/index.d.ts +2 -2
- package/lib/ProTree/index.js +1 -1
- package/lib/ProTree/propsType.d.ts +55 -42
- package/lib/ProTree/utils.d.ts +7 -7
- package/lib/ProTreeModal/components/Cascader.d.ts +3 -3
- package/lib/ProTreeModal/components/List.d.ts +3 -3
- package/lib/ProTreeModal/components/Tree.d.ts +2 -2
- package/lib/ProTreeModal/index.d.ts +2 -2
- package/lib/ProTreeModal/index.js +2 -2
- package/lib/ProTreeModal/propsType.d.ts +259 -48
- package/lib/ProTreeModal/utils.d.ts +7 -7
- package/lib/index.d.ts +4 -0
- package/lib/index.js +48 -0
- package/package.json +1 -1
- package/.vscode/extensions.json +0 -5
@@ -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 { ProFormColumnType, 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;
|
@@ -32,7 +32,7 @@ export interface ToolbarActionType extends Omit<ActionType, 'actionType' | 'onHa
|
|
32
32
|
}
|
33
33
|
export type FormListMode = 'block' | 'line' | 'less';
|
34
34
|
export interface FormListType {
|
35
|
-
columns:
|
35
|
+
columns: ProFormColumnType[];
|
36
36
|
otherProps?: ProFormOtherType;
|
37
37
|
form?: FormInstance;
|
38
38
|
min?: number;
|
@@ -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 { ColumnTypeMap, FunctionArgs, ProFormValueType, ReactiveFunction, ViewType } from '../../../propsType';
|
5
|
+
import type { ColumnTypeMap, FunctionArgs, ProFormValueType, ReactiveFunction, ViewType } from '../../../propsType';
|
6
6
|
export interface SpaceType extends SpaceProps {
|
7
7
|
/**
|
8
8
|
* 是否紧凑合并
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { InternalNamePath, NamePath } from 'antd/lib/form/interface';
|
3
3
|
import { FormInstance } from 'antd';
|
4
|
-
import { GroupColumnType, GroupType, SpaceType } from './propsType';
|
5
|
-
import {
|
4
|
+
import type { GroupColumnType, GroupType, SpaceType } from './propsType';
|
5
|
+
import type { ProFormColumnType, ReactiveFunction } from '../../render/propsType';
|
6
6
|
export type EventArgs = any[];
|
7
7
|
/**
|
8
8
|
* 插入间隔符
|
@@ -41,7 +41,7 @@ export declare const getReactiveProps: (params: Params) => {
|
|
41
41
|
fieldProps: boolean;
|
42
42
|
desensitization: [number, number];
|
43
43
|
};
|
44
|
-
type ValueTypeGetterParams = Pick<
|
44
|
+
type ValueTypeGetterParams = Pick<ProFormColumnType, 'valueType' | 'switchValue' | 'toISOString' | 'toCSTString' | 'disabled' | 'desensitization'> & {
|
45
45
|
type?: any;
|
46
46
|
mode?: string;
|
47
47
|
desensitizationKey?: string;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { ProCascaderType } from './propsType';
|
2
|
+
import type { ProCascaderType } from './propsType';
|
3
3
|
declare const _default: import("react").MemoExoticComponent<(props: ProCascaderType) => import("react/jsx-runtime").JSX.Element>;
|
4
4
|
export default _default;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { FC } from 'react';
|
2
|
-
import { ProCombinationType, ChildPropsItemType } from './propsType';
|
2
|
+
import type { ProCombinationType, ChildPropsItemType } from './propsType';
|
3
3
|
import './style/index.less';
|
4
4
|
export declare const ProCombination: FC<ProCombinationType>;
|
5
5
|
export declare const childPropsItemProps: FC<ChildPropsItemType>;
|
@@ -2,7 +2,7 @@ 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 { ProFormOtherType } from '../../../propsType';
|
5
|
+
import type { ProFormOtherType } from '../../../propsType';
|
6
6
|
export interface ChildPropsItemType {
|
7
7
|
/**
|
8
8
|
* @description 要显示什么组件,支持Input/Select
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { ProModalSelectType } from './propsType';
|
2
|
+
import type { ProModalSelectType } from './propsType';
|
3
3
|
declare const _default: React.ForwardRefExoticComponent<Omit<ProModalSelectType, "ref"> & React.RefAttributes<unknown>>;
|
4
4
|
export default _default;
|
@@ -1,8 +1,8 @@
|
|
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 { ProFormOtherType } from '../../../propsType';
|
4
|
+
import type { ProFormColumnType } from '../../render/propsType';
|
5
|
+
import type { ProFormOtherType } from '../../../propsType';
|
6
6
|
/**
|
7
7
|
* 模态框确认按钮回调函数类型
|
8
8
|
* @param list 选中的数据列表
|
@@ -27,7 +27,7 @@ interface ConfigOption {
|
|
27
27
|
initParams?: any;
|
28
28
|
};
|
29
29
|
/** 表单列配置项 */
|
30
|
-
formColumns?:
|
30
|
+
formColumns?: ProFormColumnType[];
|
31
31
|
/** 选择模式:单选(radio)或多选(checkbox) */
|
32
32
|
type?: 'radio' | 'checkbox';
|
33
33
|
/** 是否开启分页功能 */
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
declare const ProNumberRange: (props:
|
1
|
+
import type { ProNumberRangeType } from './propsType';
|
2
|
+
declare const ProNumberRange: (props: ProNumberRangeType) => any;
|
3
3
|
export default ProNumberRange;
|
@@ -2,9 +2,9 @@ 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 { ProFormOtherType } from '../../../propsType';
|
5
|
+
import type { ProFormOtherType } from '../../../propsType';
|
6
6
|
import { Props as ProRangeLimitType } from '../ProRangeLimit';
|
7
|
-
import { DistributiveOmit } from '../../../../ProForm/propsType';
|
7
|
+
import type { DistributiveOmit } from '../../../../ProForm/propsType';
|
8
8
|
export type DateType = DatePickerProps['value'];
|
9
9
|
export type ProTimeLimitType = DistributiveOmit<DatePickerProps, 'value' | 'onChange' | 'mode'> & {
|
10
10
|
value?: string;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { InputProps, ModalProps } from 'antd';
|
2
2
|
import React from 'react';
|
3
|
-
import {
|
3
|
+
import type { ProFormColumnType } from '../../render/propsType';
|
4
4
|
type RequestFunction<P = Record<string, any> | void, R = any> = (params: P, ...args: any[]) => Promise<R>;
|
5
5
|
type OnOkFunction = (list: Record<string, any>[]) => boolean;
|
6
6
|
interface IConfigOption {
|
@@ -8,7 +8,7 @@ interface IConfigOption {
|
|
8
8
|
fetchOptions: RequestFunction;
|
9
9
|
useRequestOptions: object;
|
10
10
|
conditionKey: string;
|
11
|
-
conditionColumns:
|
11
|
+
conditionColumns: ProFormColumnType[];
|
12
12
|
defaultParams: Record<string, any>;
|
13
13
|
withPagination: boolean;
|
14
14
|
paginationPosition: 'tableBottom' | 'modalBottom';
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { ProRangeBoxPropsType } from './propsType';
|
1
|
+
import type { ProRangeBoxPropsType } from './propsType';
|
2
2
|
export default function ProRangeBox({ configOption }: ProRangeBoxPropsType): import("react/jsx-runtime").JSX.Element;
|
@@ -2,7 +2,7 @@ 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 { DiffConfigType } from '../../propsType';
|
5
|
+
import type { DiffConfigType } from '../../propsType';
|
6
6
|
interface Props {
|
7
7
|
name?: NamePath;
|
8
8
|
names?: NamePath[];
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import type { ProFormColumnType } from '../../propsType';
|
3
3
|
interface Props<T = any> {
|
4
4
|
value?: T;
|
5
5
|
onChange?: (value: T, ...rest: any[]) => void;
|
6
|
-
confirm:
|
6
|
+
confirm: ProFormColumnType['confirm'];
|
7
7
|
[K: string]: any;
|
8
8
|
}
|
9
9
|
declare const ConfirmWrapper: React.FC<Props>;
|
@@ -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 { DiffConfigType } from '../../propsType';
|
4
|
+
import type { ProFormColumnType } from './propsType';
|
5
|
+
import type { DiffConfigType } from '../../propsType';
|
6
6
|
interface Props<T = any> {
|
7
7
|
isView?: boolean;
|
8
|
-
columns:
|
8
|
+
columns: ProFormColumnType[];
|
9
9
|
disabled?: boolean;
|
10
10
|
form: FormInstance<T>;
|
11
11
|
expand?: boolean | number;
|
@@ -1,37 +1,37 @@
|
|
1
1
|
import { ColProps, FormInstance, FormItemProps, ModalFuncProps } from 'antd';
|
2
|
-
import { NamePath } from 'antd/es/form/interface';
|
2
|
+
import type { NamePath } from 'antd/es/form/interface';
|
3
3
|
import React from 'react';
|
4
4
|
import { validate, regExp } from '@zat-design/utils';
|
5
|
-
import { RuleObject } from 'antd/es/form';
|
5
|
+
import type { RuleObject } from 'antd/es/form';
|
6
6
|
import * as componentMap from '../index';
|
7
|
-
import { Props as InputProps } from '../base/Input/propsType';
|
8
|
-
import { Props as InputNumberProps } from '../base/InputNumber';
|
9
|
-
import { Props as RadioProps } from '../base/Radio';
|
10
|
-
import { Props as CheckboxProps } from '../base/Checkbox';
|
11
|
-
import { Props as DatePickerProps } from '../base/DatePicker';
|
12
|
-
import { Props as RangePickerProps } from '../base/RangePicker';
|
13
|
-
import { TypeWithRef as FormListType } from '../combination/FormList/propsType';
|
14
|
-
import { Props as SelectProps } from '../base/Select';
|
15
|
-
import { Props as TimePickerProps } from '../base/TimePicker';
|
16
|
-
import { Props as SwitchProps } from '../base/Switch';
|
17
|
-
import { Props as SwitchCheckboxProps } from '../base/SwitchCheckbox';
|
18
|
-
import { Props as TextAreaProps } from '../base/TextArea';
|
19
|
-
import { ProCascaderType } from '../combination/ProCascader/propsType';
|
20
|
-
import { ProCombinationType } from '../combination/ProCombination/propsType';
|
21
|
-
import { ProModalSelectType } from '../combination/ProModalSelect/propsType';
|
22
|
-
import {
|
23
|
-
import { ProLimitProps } from '../combination/ProTimeLimit';
|
24
|
-
import { Props as ProRangeLimitProps } from '../combination/ProRangeLimit';
|
25
|
-
import { CheckboxPropsMap, ProEnum, PropProSelectsMap, PropRadioPropsMap } from '../../../ProEnum/propsType';
|
26
|
-
import { PropSelectProps as ProSelectProps } from '../../../ProSelect/propsType';
|
27
|
-
import { ProEditTableType } from '../../../ProEditTable/propsType';
|
28
|
-
import {
|
29
|
-
import { ProUploadType } from '../../../ProUpload/propsType';
|
30
|
-
import { ProTreeProps } from '../../../ProTree/propsType';
|
31
|
-
import { GroupType as GroupCopyProps } from '../combination/Group/propsType';
|
32
|
-
import { ProCollapseProps } from '../../../ProLayout/components/ProCollapse/PropTypes';
|
33
|
-
import { DistributiveOmit, DiffConfigType } from '../../propsType';
|
34
|
-
import { DiffOriginalParams } from '../../utils/diffOriginal';
|
7
|
+
import type { Props as InputProps } from '../base/Input/propsType';
|
8
|
+
import type { Props as InputNumberProps } from '../base/InputNumber';
|
9
|
+
import type { Props as RadioProps } from '../base/Radio';
|
10
|
+
import type { Props as CheckboxProps } from '../base/Checkbox';
|
11
|
+
import type { Props as DatePickerProps } from '../base/DatePicker';
|
12
|
+
import type { Props as RangePickerProps } from '../base/RangePicker';
|
13
|
+
import type { TypeWithRef as FormListType } from '../combination/FormList/propsType';
|
14
|
+
import type { Props as SelectProps } from '../base/Select';
|
15
|
+
import type { Props as TimePickerProps } from '../base/TimePicker';
|
16
|
+
import type { Props as SwitchProps } from '../base/Switch';
|
17
|
+
import type { Props as SwitchCheckboxProps } from '../base/SwitchCheckbox';
|
18
|
+
import type { Props as TextAreaProps } from '../base/TextArea';
|
19
|
+
import type { ProCascaderType } from '../combination/ProCascader/propsType';
|
20
|
+
import type { ProCombinationType } from '../combination/ProCombination/propsType';
|
21
|
+
import type { ProModalSelectType } from '../combination/ProModalSelect/propsType';
|
22
|
+
import type { ProNumberRangeType } from '../combination/ProNumberRange/propsType';
|
23
|
+
import type { ProLimitProps } from '../combination/ProTimeLimit';
|
24
|
+
import type { Props as ProRangeLimitProps } from '../combination/ProRangeLimit';
|
25
|
+
import type { CheckboxPropsMap, ProEnum, PropProSelectsMap, PropRadioPropsMap } from '../../../ProEnum/propsType';
|
26
|
+
import type { PropSelectProps as ProSelectProps } from '../../../ProSelect/propsType';
|
27
|
+
import type { ProEditTableType } from '../../../ProEditTable/propsType';
|
28
|
+
import type { ProTreeModalType } from '../../../ProTreeModal/propsType';
|
29
|
+
import type { ProUploadType } from '../../../ProUpload/propsType';
|
30
|
+
import type { ProTreeProps } from '../../../ProTree/propsType';
|
31
|
+
import type { GroupType as GroupCopyProps } from '../combination/Group/propsType';
|
32
|
+
import type { ProCollapseProps } from '../../../ProLayout/components/ProCollapse/PropTypes';
|
33
|
+
import type { DistributiveOmit, DiffConfigType } from '../../propsType';
|
34
|
+
import type { DiffOriginalParams } from '../../utils/diffOriginal';
|
35
35
|
export type ComponentMap = keyof typeof componentMap;
|
36
36
|
type ValidateKey = keyof typeof validate;
|
37
37
|
type RegExpKey = keyof typeof regExp;
|
@@ -133,7 +133,7 @@ export type ColumnTypeMap<Values = any, T = 'ProForm'> = {
|
|
133
133
|
fieldProps?: FieldType<ProModalSelectType, Values, T>;
|
134
134
|
} | {
|
135
135
|
type?: 'ProNumberRange';
|
136
|
-
fieldProps?: FieldType<
|
136
|
+
fieldProps?: FieldType<ProNumberRangeType, Values, T>;
|
137
137
|
} | {
|
138
138
|
type?: 'ProRangeLimit';
|
139
139
|
fieldProps?: FieldType<ProRangeLimitProps, Values, T>;
|
@@ -151,7 +151,7 @@ export type ColumnTypeMap<Values = any, T = 'ProForm'> = {
|
|
151
151
|
fieldProps?: FieldType<ProEditTableType, Values, T>;
|
152
152
|
} | {
|
153
153
|
type?: 'ProTreeModal';
|
154
|
-
fieldProps?: FieldType<
|
154
|
+
fieldProps?: FieldType<ProTreeModalType, Values, T>;
|
155
155
|
} | {
|
156
156
|
type?: 'ProUpload';
|
157
157
|
fieldProps?: FieldType<ProUploadType, Values, T>;
|
@@ -168,7 +168,7 @@ export type ColumnTypeMap<Values = any, T = 'ProForm'> = {
|
|
168
168
|
type?: 'Container';
|
169
169
|
fieldProps?: any;
|
170
170
|
};
|
171
|
-
export interface
|
171
|
+
export interface ProFormColumn<Values = any> extends Omit<FormItemProps<Values>, 'rules' | 'required'> {
|
172
172
|
component?: React.ReactNode | ReactiveFunction<Values, React.ReactNode>;
|
173
173
|
names?: NamePath[];
|
174
174
|
show?: boolean | ReactiveFunction<Values, boolean>;
|
@@ -233,7 +233,7 @@ export interface ProFormColumnType<Values = any> extends Omit<FormItemProps<Valu
|
|
233
233
|
/** 脱敏数据位置下标 */
|
234
234
|
desensitization?: [number, number] | ReactiveFunction<Values, [number, number]>;
|
235
235
|
}
|
236
|
-
export type
|
236
|
+
export type ProFormColumnType<T = any> = ProFormColumn<T> & ColumnTypeMap<T, 'ProForm'>;
|
237
237
|
/**
|
238
238
|
* 表单渲染类型
|
239
239
|
*/
|
@@ -293,6 +293,5 @@ export type ProEnumFieldProps<Values, TT> = ProEnumFieldType<Values, TT>;
|
|
293
293
|
export type FieldProps<T extends ControlProps, Values, TT> = FieldType<T, Values, TT>;
|
294
294
|
export type ColumnPropsMap<Values = any, T = 'ProForm'> = ColumnTypeMap<Values, T>;
|
295
295
|
export type ProFormColumnProps<Values = any> = ProFormColumnType<Values>;
|
296
|
-
export type ProColumnProps<T = any> = ProColumnType<T>;
|
297
296
|
export type RenderProps<Values = any> = RenderType<Values>;
|
298
297
|
export {};
|
package/lib/ProForm/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { FormInstance } from 'antd';
|
2
2
|
import React, { ForwardRefRenderFunction } from 'react';
|
3
3
|
import { FormProviderProps } from 'antd/es/form/context';
|
4
|
-
import { ProFormType } from './propsType';
|
4
|
+
import type { ProFormType } from './propsType';
|
5
5
|
import { useForm } from './utils/useForm';
|
6
6
|
import useWatch from './utils/useWatch';
|
7
7
|
interface IProForm<T = any> extends ForwardRefRenderFunction<FormInstance<T>, ProFormType<T>> {
|
@@ -4,7 +4,7 @@ import { NamePath } from 'antd/es/form/interface';
|
|
4
4
|
import { StoreValue, Store } from 'rc-field-form/es/interface.d';
|
5
5
|
import { ShouldUpdate } from 'rc-field-form/es/Field.d';
|
6
6
|
import React, { ReactNode } from 'react';
|
7
|
-
import { ComponentMap,
|
7
|
+
import type { ComponentMap, ProFormColumnType, ViewType } from './components/render/propsType';
|
8
8
|
export * from './components/render/propsType';
|
9
9
|
export interface ButtonType extends ButtonProps {
|
10
10
|
children?: any;
|
@@ -69,7 +69,7 @@ export interface ProFormType<Values = any> extends FormProps<Values> {
|
|
69
69
|
/** 是否查看 */
|
70
70
|
isView?: boolean;
|
71
71
|
span?: number;
|
72
|
-
columns?:
|
72
|
+
columns?: ProFormColumnType<Values>[];
|
73
73
|
rowProps?: RowProps;
|
74
74
|
footer?: FooterType;
|
75
75
|
expand?: boolean | number;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { FormInstance, FormItemProps } from 'antd';
|
2
2
|
import { NamePath } from 'antd/es/form/interface';
|
3
3
|
import { StoreValue, Store } from 'rc-field-form/es/interface.d';
|
4
|
-
import { TransformType } from '../propsType';
|
4
|
+
import type { TransformType } from '../propsType';
|
5
5
|
export declare const transformValue: (names: NamePath[], form: FormInstance, fieldName: NamePath, normalize?: (value: StoreValue, prevValue: StoreValue, allValues: Store) => StoreValue, getValueProps?: FormItemProps['getValueProps']) => TransformType;
|
6
6
|
export default transformValue;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { FormInstance, FormItemProps } from 'antd';
|
2
|
-
import {
|
2
|
+
import type { ProFormColumnType, ProRule } from '../components/render/propsType';
|
3
3
|
interface Result<Values> {
|
4
4
|
shouldUpdate?: FormItemProps<Values>['shouldUpdate'];
|
5
5
|
show?: boolean;
|
@@ -9,8 +9,8 @@ interface Result<Values> {
|
|
9
9
|
[key: string]: any;
|
10
10
|
}
|
11
11
|
interface UseShouldUpdateProps<Values> {
|
12
|
-
show?:
|
13
|
-
formItemProps?:
|
12
|
+
show?: ProFormColumnType['show'];
|
13
|
+
formItemProps?: ProFormColumnType['formItemProps'] & {
|
14
14
|
clearNotShow?: boolean;
|
15
15
|
names?: any[];
|
16
16
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
2
|
import type { SelectProps } from 'antd';
|
3
3
|
import { Service, Options, Result } from 'ahooks/lib/useRequest/src/types';
|
4
|
-
import { ProFormOtherType } from '../ProForm/propsType';
|
4
|
+
import type { ProFormOtherType } from '../ProForm/propsType';
|
5
5
|
/**
|
6
6
|
* @description 数据选项类型
|
7
7
|
*/
|
@@ -68,8 +68,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
68
68
|
valueType = column.valueType,
|
69
69
|
_column$format = column.format,
|
70
70
|
format = _column$format === void 0 ? 'YYYY-MM-DD HH:mm:ss' : _column$format,
|
71
|
-
|
72
|
-
precision = _column$precision === void 0 ? 0 : _column$precision,
|
71
|
+
precision = column.precision,
|
73
72
|
ellipsis = column.ellipsis,
|
74
73
|
code = column.code,
|
75
74
|
copyable = column.copyable,
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
|
-
import {
|
2
|
+
import type { ProTreeFieldNamesType } from '../propsType';
|
3
3
|
interface ListProps {
|
4
4
|
disabled?: boolean;
|
5
5
|
checkedValues?: any[];
|
6
6
|
treeData: any[];
|
7
7
|
searchStr?: string;
|
8
8
|
showCodeName?: boolean;
|
9
|
-
fieldNames:
|
9
|
+
fieldNames: ProTreeFieldNamesType;
|
10
10
|
mode?: 'render' | 'view';
|
11
11
|
handleOnChange?: (e: any, value: string) => void;
|
12
12
|
handleFilterClose?: (code: string) => void;
|
@@ -16,8 +16,8 @@ var _excluded = ["checkedValues", "disabled", "treeData", "searchStr", "showCode
|
|
16
16
|
/*
|
17
17
|
* @Author: ''
|
18
18
|
* @Date: 2024-07-03 11:02:19
|
19
|
-
* @LastEditors:
|
20
|
-
* @LastEditTime:
|
19
|
+
* @LastEditors: za-xuwenli xuwenli@zhongan.io
|
20
|
+
* @LastEditTime: 2025-03-20 10:44:39
|
21
21
|
* @FilePath: /za-material-warehouse/src/ProTree/components/List.tsx
|
22
22
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
23
23
|
*/
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import type { ProTreeType } from '../propsType';
|
2
2
|
import '../style/index.less';
|
3
|
-
declare const ProTree: (props:
|
3
|
+
declare const ProTree: (props: ProTreeType) => import("react/jsx-runtime").JSX.Element;
|
4
4
|
export default ProTree;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
3
|
-
export declare const ProTreeSelect: (props:
|
4
|
-
declare const _default: React.ForwardRefExoticComponent<
|
2
|
+
import type { ProTreeSelectType } from './propsType';
|
3
|
+
export declare const ProTreeSelect: (props: ProTreeSelectType, ref: React.Ref<unknown> | undefined) => import("react/jsx-runtime").JSX.Element;
|
4
|
+
declare const _default: React.ForwardRefExoticComponent<ProTreeSelectType & React.RefAttributes<unknown>>;
|
5
5
|
export default _default;
|