@zat-design/sisyphus-react 3.11.14-beta.8 → 3.11.14-beta.9

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.
Files changed (140) hide show
  1. package/es/ProDrawerForm/components/ProDrawer/index.d.ts +2 -2
  2. package/es/ProDrawerForm/components/ProModal/index.d.ts +2 -2
  3. package/es/ProDrawerForm/index.d.ts +1 -2
  4. package/es/ProDrawerForm/propsType.d.ts +38 -27
  5. package/es/ProDrawerForm/utils/index.d.ts +2 -2
  6. package/es/ProEditLabel/propsType.d.ts +2 -2
  7. package/es/ProEditTable/components/Summary/index.d.ts +2 -2
  8. package/es/ProEditTable/index.d.ts +2 -2
  9. package/es/ProEditTable/propsType.d.ts +232 -93
  10. package/es/ProEnum/propsType.d.ts +2 -2
  11. package/es/ProForm/components/FormFooter/index.d.ts +2 -2
  12. package/es/ProForm/components/FormFooter/propsType.d.ts +8 -3
  13. package/es/ProForm/components/base/Checkbox/index.d.ts +2 -2
  14. package/es/ProForm/components/base/Input/index.d.ts +2 -2
  15. package/es/ProForm/components/base/Input/propsType.d.ts +8 -4
  16. package/es/ProForm/components/base/InputNumber/index.d.ts +2 -2
  17. package/es/ProForm/components/base/Radio/index.d.ts +2 -2
  18. package/es/ProForm/components/base/RangePicker/index.d.ts +2 -2
  19. package/es/ProForm/components/base/Select/index.d.ts +2 -2
  20. package/es/ProForm/components/base/Switch/index.d.ts +2 -2
  21. package/es/ProForm/components/base/SwitchCheckbox/index.d.ts +2 -2
  22. package/es/ProForm/components/base/TextArea/index.d.ts +2 -2
  23. package/es/ProForm/components/base/TimePicker/index.d.ts +2 -2
  24. package/es/ProForm/components/combination/Container/index.d.ts +2 -2
  25. package/es/ProForm/components/combination/Container/propsType.d.ts +9 -5
  26. package/es/ProForm/components/combination/FormList/components/ActionButton.d.ts +4 -4
  27. package/es/ProForm/components/combination/FormList/components/BlockFields.d.ts +4 -4
  28. package/es/ProForm/components/combination/FormList/components/LineFields.d.ts +4 -4
  29. package/es/ProForm/components/combination/FormList/components/ToolbarButton.d.ts +2 -2
  30. package/es/ProForm/components/combination/FormList/index.d.ts +2 -2
  31. package/es/ProForm/components/combination/FormList/propsType.d.ts +18 -10
  32. package/es/ProForm/components/combination/Group/index.d.ts +2 -2
  33. package/es/ProForm/components/combination/Group/propsType.d.ts +10 -5
  34. package/es/ProForm/components/combination/Group/utils.d.ts +4 -4
  35. package/es/ProForm/components/combination/ProCascader/index.d.ts +2 -1
  36. package/es/ProForm/components/combination/ProCascader/propsType.d.ts +6 -2
  37. package/es/ProForm/components/combination/ProCombination/index.d.ts +3 -3
  38. package/es/ProForm/components/combination/ProCombination/propsType.d.ts +10 -5
  39. package/es/ProForm/components/combination/ProModalSelect/index.d.ts +2 -2
  40. package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +60 -8
  41. package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +7 -3
  42. package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +14 -8
  43. package/es/ProForm/components/render/ChangedWrapper.d.ts +2 -2
  44. package/es/ProForm/components/render/Render.d.ts +2 -2
  45. package/es/ProForm/components/render/RenderFields.d.ts +4 -4
  46. package/es/ProForm/components/render/propsType.d.ts +54 -43
  47. package/es/ProForm/index.d.ts +2 -2
  48. package/es/ProForm/propsType.d.ts +22 -15
  49. package/es/ProForm/utils/transformValue.d.ts +2 -2
  50. package/es/ProForm/utils/useFieldProps.d.ts +3 -3
  51. package/es/ProForm/utils/useShouldUpdate.d.ts +3 -3
  52. package/es/ProSelect/propsType.d.ts +2 -2
  53. package/es/ProStep/components/Item/index.d.ts +2 -2
  54. package/es/ProStep/components/Step/index.d.ts +2 -2
  55. package/es/ProStep/index.d.ts +2 -2
  56. package/es/ProStep/index.js +12 -1
  57. package/es/ProStep/propsType.d.ts +60 -12
  58. package/es/ProStep/utils/index.d.ts +2 -2
  59. package/es/ProTable/components/FormatColumn/index.d.ts +2 -2
  60. package/es/ProTable/hooks/useAntdTable.d.ts +2 -2
  61. package/es/ProTable/index.d.ts +2 -2
  62. package/es/ProTable/propsType.d.ts +590 -39
  63. package/es/ProTooltip/index.d.ts +2 -2
  64. package/es/ProTooltip/propsType.d.ts +52 -9
  65. package/es/ProTree/components/ProTreeSelect/propsType.d.ts +2 -2
  66. package/es/ProTree/components/SearchTitle.d.ts +2 -2
  67. package/es/ProTree/propsType.d.ts +3 -3
  68. package/es/ProTreeModal/propsType.d.ts +2 -2
  69. package/es/ProUpload/propsType.d.ts +3 -3
  70. package/lib/ProDrawerForm/components/ProDrawer/index.d.ts +2 -2
  71. package/lib/ProDrawerForm/components/ProModal/index.d.ts +2 -2
  72. package/lib/ProDrawerForm/index.d.ts +1 -2
  73. package/lib/ProDrawerForm/propsType.d.ts +38 -27
  74. package/lib/ProDrawerForm/utils/index.d.ts +2 -2
  75. package/lib/ProEditLabel/propsType.d.ts +2 -2
  76. package/lib/ProEditTable/components/Summary/index.d.ts +2 -2
  77. package/lib/ProEditTable/index.d.ts +2 -2
  78. package/lib/ProEditTable/propsType.d.ts +232 -93
  79. package/lib/ProEnum/propsType.d.ts +2 -2
  80. package/lib/ProForm/components/FormFooter/index.d.ts +2 -2
  81. package/lib/ProForm/components/FormFooter/propsType.d.ts +8 -3
  82. package/lib/ProForm/components/base/Checkbox/index.d.ts +2 -2
  83. package/lib/ProForm/components/base/Input/index.d.ts +2 -2
  84. package/lib/ProForm/components/base/Input/propsType.d.ts +8 -4
  85. package/lib/ProForm/components/base/InputNumber/index.d.ts +2 -2
  86. package/lib/ProForm/components/base/Radio/index.d.ts +2 -2
  87. package/lib/ProForm/components/base/RangePicker/index.d.ts +2 -2
  88. package/lib/ProForm/components/base/Select/index.d.ts +2 -2
  89. package/lib/ProForm/components/base/Switch/index.d.ts +2 -2
  90. package/lib/ProForm/components/base/SwitchCheckbox/index.d.ts +2 -2
  91. package/lib/ProForm/components/base/TextArea/index.d.ts +2 -2
  92. package/lib/ProForm/components/base/TimePicker/index.d.ts +2 -2
  93. package/lib/ProForm/components/combination/Container/index.d.ts +2 -2
  94. package/lib/ProForm/components/combination/Container/propsType.d.ts +9 -5
  95. package/lib/ProForm/components/combination/FormList/components/ActionButton.d.ts +4 -4
  96. package/lib/ProForm/components/combination/FormList/components/BlockFields.d.ts +4 -4
  97. package/lib/ProForm/components/combination/FormList/components/LineFields.d.ts +4 -4
  98. package/lib/ProForm/components/combination/FormList/components/ToolbarButton.d.ts +2 -2
  99. package/lib/ProForm/components/combination/FormList/index.d.ts +2 -2
  100. package/lib/ProForm/components/combination/FormList/propsType.d.ts +18 -10
  101. package/lib/ProForm/components/combination/Group/index.d.ts +2 -2
  102. package/lib/ProForm/components/combination/Group/propsType.d.ts +10 -5
  103. package/lib/ProForm/components/combination/Group/utils.d.ts +4 -4
  104. package/lib/ProForm/components/combination/ProCascader/index.d.ts +2 -1
  105. package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +6 -2
  106. package/lib/ProForm/components/combination/ProCombination/index.d.ts +3 -3
  107. package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +10 -5
  108. package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +2 -2
  109. package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +60 -8
  110. package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +7 -3
  111. package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +14 -8
  112. package/lib/ProForm/components/render/ChangedWrapper.d.ts +2 -2
  113. package/lib/ProForm/components/render/Render.d.ts +2 -2
  114. package/lib/ProForm/components/render/RenderFields.d.ts +4 -4
  115. package/lib/ProForm/components/render/propsType.d.ts +54 -43
  116. package/lib/ProForm/index.d.ts +2 -2
  117. package/lib/ProForm/propsType.d.ts +22 -15
  118. package/lib/ProForm/utils/transformValue.d.ts +2 -2
  119. package/lib/ProForm/utils/useFieldProps.d.ts +3 -3
  120. package/lib/ProForm/utils/useShouldUpdate.d.ts +3 -3
  121. package/lib/ProSelect/propsType.d.ts +2 -2
  122. package/lib/ProStep/components/Item/index.d.ts +2 -2
  123. package/lib/ProStep/components/Step/index.d.ts +2 -2
  124. package/lib/ProStep/index.d.ts +2 -2
  125. package/lib/ProStep/index.js +12 -1
  126. package/lib/ProStep/propsType.d.ts +60 -12
  127. package/lib/ProStep/utils/index.d.ts +2 -2
  128. package/lib/ProTable/components/FormatColumn/index.d.ts +2 -2
  129. package/lib/ProTable/hooks/useAntdTable.d.ts +2 -2
  130. package/lib/ProTable/index.d.ts +2 -2
  131. package/lib/ProTable/propsType.d.ts +590 -39
  132. package/lib/ProTooltip/index.d.ts +2 -2
  133. package/lib/ProTooltip/propsType.d.ts +52 -9
  134. package/lib/ProTree/components/ProTreeSelect/propsType.d.ts +2 -2
  135. package/lib/ProTree/components/SearchTitle.d.ts +2 -2
  136. package/lib/ProTree/propsType.d.ts +3 -3
  137. package/lib/ProTreeModal/propsType.d.ts +2 -2
  138. package/lib/ProUpload/propsType.d.ts +3 -3
  139. package/package.json +1 -1
  140. package/.vscode/extensions.json +0 -5
@@ -4,33 +4,33 @@ import React from 'react';
4
4
  import { validate, regExp } from '@zat-design/utils';
5
5
  import { RuleObject } from 'antd/es/form';
6
6
  import * as componentMap from '../index';
7
- import { IProps as InputProps } from '../base/Input/propsType';
7
+ import { Props as InputProps } from '../base/Input/propsType';
8
8
  import { Props as InputNumberProps } from '../base/InputNumber';
9
9
  import { Props as RadioProps } from '../base/Radio';
10
10
  import { Props as CheckboxProps } from '../base/Checkbox';
11
11
  import { Props as DatePickerProps } from '../base/DatePicker';
12
12
  import { Props as RangePickerProps } from '../base/RangePicker';
13
- import { PropsWithRef as FormListProps } from '../combination/FormList/propsType';
13
+ import { TypeWithRef as FormListType } from '../combination/FormList/propsType';
14
14
  import { Props as SelectProps } from '../base/Select';
15
15
  import { Props as TimePickerProps } from '../base/TimePicker';
16
16
  import { Props as SwitchProps } from '../base/Switch';
17
17
  import { Props as SwitchCheckboxProps } from '../base/SwitchCheckbox';
18
18
  import { Props as TextAreaProps } from '../base/TextArea';
19
- import { ProCascaderProps } from '../combination/ProCascader/propsType';
20
- import { ProCombinationProps } from '../combination/ProCombination/propsType';
21
- import { ProModalSelectPropsType as ProModalSelectProps } from '../combination/ProModalSelect/propsType';
19
+ import { ProCascaderType } from '../combination/ProCascader/propsType';
20
+ import { ProCombinationType } from '../combination/ProCombination/propsType';
21
+ import { ProModalSelectType } from '../combination/ProModalSelect/propsType';
22
22
  import { ProNumberRangeProps } from '../combination/ProNumberRange/propsType';
23
23
  import { ProLimitProps } from '../combination/ProTimeLimit';
24
24
  import { Props as ProRangeLimitProps } from '../combination/ProRangeLimit';
25
25
  import { CheckboxPropsMap, ProEnum, PropProSelectsMap, PropRadioPropsMap } from '../../../ProEnum/propsType';
26
26
  import { PropSelectProps as ProSelectProps } from '../../../ProSelect/propsType';
27
- import { ProEditTableProps } from '../../../ProEditTable/propsType';
27
+ import { ProEditTableType } from '../../../ProEditTable/propsType';
28
28
  import { ProTreeModalProps } from '../../../ProTreeModal/propsType';
29
- import { ProUploadProps } from '../../../ProUpload/propsType';
29
+ import { ProUploadType } from '../../../ProUpload/propsType';
30
30
  import { ProTreeProps } from '../../../ProTree/propsType';
31
- import { GroupProps as GroupCopyProps } from '../combination/Group/propsType';
31
+ import { GroupType as GroupCopyProps } from '../combination/Group/propsType';
32
32
  import { ProCollapseProps } from '../../../ProLayout/components/ProCollapse/PropTypes';
33
- import { DistributiveOmit, DiffConfigProps } from '../../propsType';
33
+ import { DistributiveOmit, DiffConfigType } from '../../propsType';
34
34
  import { DiffOriginalParams } from '../../utils/diffOriginal';
35
35
  export type ComponentMap = keyof typeof componentMap;
36
36
  type ValidateKey = keyof typeof validate;
@@ -66,9 +66,9 @@ type TransformToFormField<T extends ControlProps, Values> = DistributiveOmit<T,
66
66
  /** ProForm disable时,是否完全受控 */
67
67
  disabledStrictly?: boolean;
68
68
  };
69
- type ProEnumFormProps<Values> = TransformToFormField<ProEnum, Values> | TransformToFormField<ProEnum & PropProSelectsMap, Values> | TransformToFormField<ProEnum & PropRadioPropsMap, Values> | TransformToFormField<ProEnum & CheckboxPropsMap, Values>;
70
- type ProEnumTableProps<Values> = TransformToTableField<ProEnum, Values> | TransformToTableField<ProEnum & PropProSelectsMap, Values> | TransformToTableField<ProEnum & PropRadioPropsMap, Values> | TransformToTableField<ProEnum & CheckboxPropsMap, Values>;
71
- type ProEnumFieldProps<Values, TT> = TT extends 'ProForm' ? ProEnumFormProps<Values> | ReactiveFunction<Values, ProEnumFormProps<Values>> : ProEnumTableProps<Values> | ((text: any, values: Values, index: number) => ProEnumTableProps<Values>);
69
+ type ProEnumFormType<Values> = TransformToFormField<ProEnum, Values> | TransformToFormField<ProEnum & PropProSelectsMap, Values> | TransformToFormField<ProEnum & PropRadioPropsMap, Values> | TransformToFormField<ProEnum & CheckboxPropsMap, Values>;
70
+ type ProEnumTableType<Values> = TransformToTableField<ProEnum, Values> | TransformToTableField<ProEnum & PropProSelectsMap, Values> | TransformToTableField<ProEnum & PropRadioPropsMap, Values> | TransformToTableField<ProEnum & CheckboxPropsMap, Values>;
71
+ type ProEnumFieldType<Values, TT> = TT extends 'ProForm' ? ProEnumFormType<Values> | ReactiveFunction<Values, ProEnumFormType<Values>> : ProEnumTableType<Values> | ((text: any, values: Values, index: number) => ProEnumTableType<Values>);
72
72
  type TransformToTableField<T extends ControlProps, Values> = Omit<T, 'onChange' | 'value' | 'onBlur'> & {
73
73
  value?: T['value'];
74
74
  onChange?: (value: Parameters<T['onChange']>[0], options: Parameters<T['onChange']>[1], record: any, index: number, form: FormInstance<Values>) => void;
@@ -81,83 +81,83 @@ export type ReactiveFunction<Values, R> = (values: Values, { form, index, namePa
81
81
  namePath?: NamePath;
82
82
  [key: string]: any;
83
83
  }) => R;
84
- type FieldProps<T extends ControlProps, Values, TT> = TT extends 'ProForm' ? TransformToFormField<T, Values> | ReactiveFunction<Values, TransformToFormField<T, Values>> : TransformToTableField<T, Values> | ((text: any, values: Values, index: number) => TransformToTableField<T, Values>);
84
+ type FieldType<T extends ControlProps, Values, TT> = TT extends 'ProForm' ? TransformToFormField<T, Values> | ReactiveFunction<Values, TransformToFormField<T, Values>> : TransformToTableField<T, Values> | ((text: any, values: Values, index: number) => TransformToTableField<T, Values>);
85
85
  /**
86
86
  * 值转换
87
87
  */
88
88
  export type ProFormValueType = 'percentage' | 'permillage' | 'thousandth' | 'datePicker' | 'enumName' | 'enumCodeName' | 'address' | 'thousandthCNY' | 'date' | 'dateTime' | 'dateStartTime' | 'dateEndTime' | 'dateStartEndTime' | 'switch' | 'desensitization';
89
- export type ColumnPropsMap<Values = any, T = 'ProForm'> = {
89
+ export type ColumnTypeMap<Values = any, T = 'ProForm'> = {
90
90
  type?: 'Input';
91
- fieldProps?: FieldProps<InputProps, Values, T>;
91
+ fieldProps?: FieldType<InputProps, Values, T>;
92
92
  } | {
93
93
  type?: 'InputNumber';
94
- fieldProps?: FieldProps<InputNumberProps, Values, T>;
94
+ fieldProps?: FieldType<InputNumberProps, Values, T>;
95
95
  } | {
96
96
  type?: 'Radio';
97
- fieldProps?: FieldProps<RadioProps, Values, T>;
97
+ fieldProps?: FieldType<RadioProps, Values, T>;
98
98
  } | {
99
99
  type?: 'Checkbox';
100
- fieldProps?: FieldProps<CheckboxProps, Values, T>;
100
+ fieldProps?: FieldType<CheckboxProps, Values, T>;
101
101
  } | {
102
102
  type?: 'DatePicker';
103
- fieldProps?: FieldProps<DatePickerProps, Values, T>;
103
+ fieldProps?: FieldType<DatePickerProps, Values, T>;
104
104
  } | {
105
105
  type?: 'RangePicker';
106
- fieldProps?: FieldProps<RangePickerProps, Values, T>;
106
+ fieldProps?: FieldType<RangePickerProps, Values, T>;
107
107
  } | {
108
108
  type?: 'FormList';
109
- fieldProps?: FieldProps<Omit<FormListProps, 'fields' | 'operation' | 'meta'>, Values, T>;
109
+ fieldProps?: FieldType<Omit<FormListType, 'fields' | 'operation' | 'meta'>, Values, T>;
110
110
  } | {
111
111
  type?: 'Select';
112
- fieldProps?: FieldProps<SelectProps, Values, T>;
112
+ fieldProps?: FieldType<SelectProps, Values, T>;
113
113
  } | {
114
114
  type?: 'TimePicker';
115
- fieldProps?: FieldProps<TimePickerProps, Values, T>;
115
+ fieldProps?: FieldType<TimePickerProps, Values, T>;
116
116
  } | {
117
117
  type?: 'Switch';
118
- fieldProps?: FieldProps<SwitchProps, Values, T>;
118
+ fieldProps?: FieldType<SwitchProps, Values, T>;
119
119
  } | {
120
120
  type?: 'SwitchCheckbox';
121
- fieldProps?: FieldProps<SwitchCheckboxProps, Values, T>;
121
+ fieldProps?: FieldType<SwitchCheckboxProps, Values, T>;
122
122
  } | {
123
123
  type?: 'TextArea';
124
- fieldProps?: FieldProps<TextAreaProps, Values, T>;
124
+ fieldProps?: FieldType<TextAreaProps, Values, T>;
125
125
  } | {
126
126
  type?: 'ProCascader';
127
- fieldProps?: FieldProps<ProCascaderProps, Values, T>;
127
+ fieldProps?: FieldType<ProCascaderType, Values, T>;
128
128
  } | {
129
129
  type?: 'ProCombination';
130
- fieldProps?: FieldProps<ProCombinationProps, Values, T>;
130
+ fieldProps?: FieldType<ProCombinationType, Values, T>;
131
131
  } | {
132
132
  type?: 'ProModalSelect';
133
- fieldProps?: FieldProps<ProModalSelectProps, Values, T>;
133
+ fieldProps?: FieldType<ProModalSelectType, Values, T>;
134
134
  } | {
135
135
  type?: 'ProNumberRange';
136
- fieldProps?: FieldProps<ProNumberRangeProps, Values, T>;
136
+ fieldProps?: FieldType<ProNumberRangeProps, Values, T>;
137
137
  } | {
138
138
  type?: 'ProRangeLimit';
139
- fieldProps?: FieldProps<ProRangeLimitProps, Values, T>;
139
+ fieldProps?: FieldType<ProRangeLimitProps, Values, T>;
140
140
  } | {
141
141
  type?: 'ProTimeLimit';
142
- fieldProps?: FieldProps<ProLimitProps, Values, T>;
142
+ fieldProps?: FieldType<ProLimitProps, Values, T>;
143
143
  } | {
144
144
  type?: 'ProEnum';
145
- fieldProps?: ProEnumFieldProps<Values, T>;
145
+ fieldProps?: ProEnumFieldType<Values, T>;
146
146
  } | {
147
147
  type?: 'ProSelect';
148
- fieldProps?: FieldProps<ProSelectProps, Values, T>;
148
+ fieldProps?: FieldType<ProSelectProps, Values, T>;
149
149
  } | {
150
150
  type?: 'ProEditTable';
151
- fieldProps?: FieldProps<ProEditTableProps, Values, T>;
151
+ fieldProps?: FieldType<ProEditTableType, Values, T>;
152
152
  } | {
153
153
  type?: 'ProTreeModal';
154
- fieldProps?: FieldProps<ProTreeModalProps, Values, T>;
154
+ fieldProps?: FieldType<ProTreeModalProps, Values, T>;
155
155
  } | {
156
156
  type?: 'ProUpload';
157
- fieldProps?: FieldProps<ProUploadProps, Values, T>;
157
+ fieldProps?: FieldType<ProUploadType, Values, T>;
158
158
  } | {
159
159
  type?: 'ProTree';
160
- fieldProps?: FieldProps<ProTreeProps, Values, T>;
160
+ fieldProps?: FieldType<ProTreeProps, Values, T>;
161
161
  } | {
162
162
  type?: 'Group';
163
163
  fieldProps?: GroupCopyProps | ReactiveFunction<Values, GroupCopyProps>;
@@ -168,7 +168,7 @@ export type ColumnPropsMap<Values = any, T = 'ProForm'> = {
168
168
  type?: 'Container';
169
169
  fieldProps?: any;
170
170
  };
171
- export interface ProFormColumnProps<Values = any> extends Omit<FormItemProps<Values>, 'rules' | 'required'> {
171
+ export interface ProFormColumnType<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,11 +233,11 @@ export interface ProFormColumnProps<Values = any> extends Omit<FormItemProps<Val
233
233
  /** 脱敏数据位置下标 */
234
234
  desensitization?: [number, number] | ReactiveFunction<Values, [number, number]>;
235
235
  }
236
- export type ProColumnProps<T = any> = ProFormColumnProps<T> & ColumnPropsMap<T, 'ProForm'>;
236
+ export type ProColumnType<T = any> = ProFormColumnType<T> & ColumnTypeMap<T, 'ProForm'>;
237
237
  /**
238
238
  * 表单渲染类型
239
239
  */
240
- export interface RenderProps<Values = any> {
240
+ export interface RenderType<Values = any> {
241
241
  formDisabled?: boolean;
242
242
  component: any;
243
243
  formItemProps: FormItemProps<Values> & {
@@ -278,10 +278,21 @@ export interface RenderProps<Values = any> {
278
278
  form: FormInstance<Values>;
279
279
  fieldProps?: ReactiveFunction<Values, React.ReactNode>;
280
280
  isSelect: boolean;
281
- diffConfig: DiffConfigProps;
281
+ diffConfig: DiffConfigType;
282
282
  requiredOnView?: boolean;
283
- confirm?: ProFormColumnProps['confirm'];
283
+ confirm?: ProFormColumnType['confirm'];
284
284
  globalControl?: boolean;
285
285
  [name: string]: any;
286
286
  }
287
+ /**
288
+ * 兼容旧命名导出
289
+ */
290
+ export type ProEnumFormProps<Values> = ProEnumFormType<Values>;
291
+ export type ProEnumTableProps<Values> = ProEnumTableType<Values>;
292
+ export type ProEnumFieldProps<Values, TT> = ProEnumFieldType<Values, TT>;
293
+ export type FieldProps<T extends ControlProps, Values, TT> = FieldType<T, Values, TT>;
294
+ export type ColumnPropsMap<Values = any, T = 'ProForm'> = ColumnTypeMap<Values, T>;
295
+ export type ProFormColumnProps<Values = any> = ProFormColumnType<Values>;
296
+ export type ProColumnProps<T = any> = ProColumnType<T>;
297
+ export type RenderProps<Values = any> = RenderType<Values>;
287
298
  export {};
@@ -1,10 +1,10 @@
1
1
  import { FormInstance } from 'antd';
2
2
  import React, { ForwardRefRenderFunction } from 'react';
3
3
  import { FormProviderProps } from 'antd/es/form/context';
4
- import { ProFormProps } from './propsType';
4
+ import { ProFormType } from './propsType';
5
5
  import { useForm } from './utils/useForm';
6
6
  import useWatch from './utils/useWatch';
7
- interface IProForm<T = any> extends ForwardRefRenderFunction<FormInstance<T>, ProFormProps<T>> {
7
+ interface IProForm<T = any> extends ForwardRefRenderFunction<FormInstance<T>, ProFormType<T>> {
8
8
  useForm: typeof useForm;
9
9
  useWatch: typeof useWatch;
10
10
  [key: string]: any;
@@ -4,27 +4,27 @@ 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, ProColumnProps, ViewType } from './components/render/propsType';
7
+ import { ComponentMap, ProColumnType, ViewType } from './components/render/propsType';
8
8
  export * from './components/render/propsType';
9
- export interface ButtonItem extends ButtonProps {
9
+ export interface ButtonType extends ButtonProps {
10
10
  children?: any;
11
11
  }
12
- export interface FooterButtonProps {
13
- okButtonProps?: ButtonItem;
14
- cancelButtonProps?: ButtonItem;
12
+ export interface FooterButtonType {
13
+ okButtonProps?: ButtonType;
14
+ cancelButtonProps?: ButtonType;
15
15
  }
16
- export interface ProFormItemChildProps {
16
+ export interface ProFormItemChildType {
17
17
  value?: any;
18
18
  onChange?: () => void;
19
19
  [key: string]: any;
20
20
  }
21
21
  export type ModeEnum = 'search' | 'drawer';
22
22
  type FooterType = ReactNode | {
23
- okButtonProps: ButtonItem;
24
- cancelButtonProps: ButtonItem;
23
+ okButtonProps: ButtonType;
24
+ cancelButtonProps: ButtonType;
25
25
  } | boolean;
26
26
  export declare const otherKeys: string[];
27
- export interface ProFormOtherProps {
27
+ export interface ProFormOtherType {
28
28
  isView?: boolean;
29
29
  viewEmpty?: React.ReactNode;
30
30
  label?: React.ReactNode;
@@ -45,10 +45,10 @@ export interface ProFormOtherProps {
45
45
  globalControl?: boolean;
46
46
  formDisabled?: boolean;
47
47
  isDiffChange?: boolean;
48
- diffConfig?: DiffConfigProps;
48
+ diffConfig?: DiffConfigType;
49
49
  desensitizationKey?: string;
50
50
  }
51
- export interface DiffConfigProps<Values = any> {
51
+ export interface DiffConfigType<Values = any> {
52
52
  /** 比对原始数据源 */
53
53
  originalValues: Values;
54
54
  /** 是否显示对比值气泡 */
@@ -60,7 +60,7 @@ export interface DiffConfigProps<Values = any> {
60
60
  /** 是否跟随父组件滚动 */
61
61
  scrollFollowParent?: string;
62
62
  }
63
- export interface ProFormProps<Values = any> extends FormProps<Values> {
63
+ export interface ProFormType<Values = any> extends FormProps<Values> {
64
64
  disabled?: boolean;
65
65
  /** 全局控制优先 */
66
66
  globalControl?: boolean;
@@ -69,7 +69,7 @@ export interface ProFormProps<Values = any> extends FormProps<Values> {
69
69
  /** 是否查看 */
70
70
  isView?: boolean;
71
71
  span?: number;
72
- columns?: ProColumnProps<Values>[];
72
+ columns?: ProColumnType<Values>[];
73
73
  rowProps?: RowProps;
74
74
  footer?: FooterType;
75
75
  expand?: boolean | number;
@@ -89,7 +89,7 @@ export interface ProFormProps<Values = any> extends FormProps<Values> {
89
89
  formId?: string;
90
90
  required?: boolean | boolean[];
91
91
  /** 表单比对配置 */
92
- diffConfig?: DiffConfigProps;
92
+ diffConfig?: DiffConfigType;
93
93
  scrollToError?: boolean;
94
94
  /** 性能模式,谨慎使用,默认不开启
95
95
  * 1. 开启不过滤names的中间态值
@@ -98,9 +98,16 @@ export interface ProFormProps<Values = any> extends FormProps<Values> {
98
98
  /** 全局脱敏开关的key、默认 zat-design-pro-component-desensitization */
99
99
  desensitizationKey?: string;
100
100
  }
101
- export interface Transform<T = any> {
101
+ export interface TransformType<T = any> {
102
102
  normalize?: (value: StoreValue, prevValue: StoreValue, allValues: Store) => StoreValue;
103
103
  getValueProps?: (value: StoreValue) => Record<string, unknown>;
104
104
  shouldUpdate?: ShouldUpdate<T>;
105
105
  }
106
106
  export type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
107
+ /**
108
+ * 兼容旧命名导出
109
+ */
110
+ export type FooterButtonProps = FooterButtonType;
111
+ export type ProFormOtherProps = ProFormOtherType;
112
+ export type DiffConfigProps = DiffConfigType;
113
+ export type Transform = TransformType;
@@ -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 { Transform } from '../propsType';
5
- export declare const transformValue: (names: NamePath[], form: FormInstance, fieldName: NamePath, normalize?: (value: StoreValue, prevValue: StoreValue, allValues: Store) => StoreValue, getValueProps?: FormItemProps['getValueProps']) => Transform;
4
+ import { TransformType } from '../propsType';
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,4 +1,4 @@
1
1
  import React from 'react';
2
- import { ProFormOtherProps } from '../propsType';
3
- export declare const FieldProvider: React.Provider<ProFormOtherProps>;
4
- export declare const useFieldProps: () => ProFormOtherProps;
2
+ import { ProFormOtherType } from '../propsType';
3
+ export declare const FieldProvider: React.Provider<ProFormOtherType>;
4
+ export declare const useFieldProps: () => ProFormOtherType;
@@ -1,5 +1,5 @@
1
1
  import { FormInstance, FormItemProps } from 'antd';
2
- import { ProColumnProps, ProRule } from '../components/render/propsType';
2
+ import { ProColumnType, 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?: ProColumnProps['show'];
13
- formItemProps?: ProColumnProps['formItemProps'] & {
12
+ show?: ProColumnType['show'];
13
+ formItemProps?: ProColumnType['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 { ProFormOtherProps } from '../ProForm/propsType';
4
+ import { ProFormOtherType } from '../ProForm/propsType';
5
5
  /**
6
6
  * @description 数据选项类型
7
7
  */
@@ -69,7 +69,7 @@ export interface PropSelectType extends Omit<SelectProps, 'onSearch'> {
69
69
  * @description 集成表单 form 的属性
70
70
  * @default -
71
71
  */
72
- otherProps?: ProFormOtherProps;
72
+ otherProps?: ProFormOtherType;
73
73
  /**
74
74
  * @description 下拉框滚动是否跟随父级
75
75
  * @default false
@@ -1,3 +1,3 @@
1
- import { ProStepItemPropsType } from '../../propsType';
2
- declare const ProStepItem: ({ id, title, collapse: collapseItem, children, lazyLoad: stepLazyLoad, ...restProps }: ProStepItemPropsType) => import("react/jsx-runtime").JSX.Element;
1
+ import { ProStepItemType } from '../../propsType';
2
+ declare const ProStepItem: ({ id, title, collapse: collapseItem, children, lazyLoad: stepLazyLoad, ...restProps }: ProStepItemType) => import("react/jsx-runtime").JSX.Element;
3
3
  export default ProStepItem;
@@ -1,5 +1,5 @@
1
- import { ProStepPropsType } from '../../propsType';
2
- export declare const Step: ({ fixedTop, dataSource, activeKey, errorCollection, style, targetOffset, scrollToError, }: ProStepPropsType & {
1
+ import { ProStepType } from '../../propsType';
2
+ export declare const Step: ({ fixedTop, dataSource, activeKey, errorCollection, style, targetOffset, scrollToError, }: import("../../propsType").ProStepPropsType & {
3
3
  errorCollection: object;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
5
5
  export default Step;
@@ -1,10 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { ProStepPropsType } from './propsType';
2
+ import { ProStepType } from './propsType';
3
3
  import './style/index.less';
4
4
  export declare const ProStepContext: import("react").Context<any>;
5
5
  export declare const useStep: () => any;
6
6
  declare const ProStep: {
7
- ({ children, ...resetProps }: ProStepPropsType): import("react/jsx-runtime").JSX.Element;
7
+ ({ children, ...resetProps }: ProStepType): import("react/jsx-runtime").JSX.Element;
8
8
  useStep: () => any;
9
9
  Item: ({ id, title, collapse: collapseItem, children, lazyLoad: stepLazyLoad, ...restProps }: import("./propsType").ProStepItemPropsType) => import("react/jsx-runtime").JSX.Element;
10
10
  Listener: ({ children, delayTime, excludes, ...props }: any) => import("react").DetailedReactHTMLElement<any, HTMLElement>;
@@ -140,6 +140,16 @@ var ProStep = function ProStep(_ref) {
140
140
  record.subEvent = subEvent;
141
141
  registerMap.current[id] = record;
142
142
  };
143
+ // 取消注册
144
+ var unNotify = function unNotify(keys) {
145
+ if (typeof keys === 'string') {
146
+ delete registerMap.current[keys];
147
+ } else if (Array.isArray(keys)) {
148
+ keys.forEach(function (key) {
149
+ delete registerMap.current[key];
150
+ });
151
+ }
152
+ };
143
153
  var handleScrollError = function handleScrollError(data) {
144
154
  var errorModuleKeys = Object.keys(data).reverse();
145
155
  if (errorModuleKeys === null || errorModuleKeys === void 0 ? void 0 : errorModuleKeys.length) {
@@ -244,7 +254,8 @@ var ProStep = function ProStep(_ref) {
244
254
  notify: notify,
245
255
  triggerTo: triggerTo,
246
256
  handleScroll: _utils.handleScroll,
247
- lazyLoad: lazyLoad
257
+ lazyLoad: lazyLoad,
258
+ unNotify: unNotify
248
259
  },
249
260
  children: (0, _jsxRuntime.jsxs)("div", {
250
261
  className: "pro-step-wrapper",
@@ -1,42 +1,90 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactNode, CSSProperties } from 'react';
2
2
  import { LazyLoadProps } from 'react-lazyload';
3
+ /**
4
+ * 步骤项基础类型定义
5
+ * @interface ItemType
6
+ */
3
7
  export interface ItemType {
8
+ /** 步骤名称 */
4
9
  name: string;
10
+ /** 步骤唯一标识码 */
5
11
  code: string;
12
+ /** 步骤排序值,越小越靠前 */
6
13
  order?: number;
7
14
  }
15
+ /**
16
+ * 已加载地图项属性类型
17
+ * @interface LoadedMapPropsType
18
+ */
8
19
  export interface LoadedMapPropsType {
20
+ /** 唯一标识符 */
9
21
  id: string;
22
+ /** 排序值 */
10
23
  order: number;
24
+ /** 标题文本 */
11
25
  title: string;
26
+ /** 是否已加载 */
12
27
  loaded: boolean;
13
28
  }
29
+ /**
30
+ * @type LoadedMapType
31
+ */
32
+ export type LoadedMapType = LoadedMapPropsType;
33
+ /**
34
+ * ProStep 组件属性类型
35
+ * @interface ProStepPropsType
36
+ */
14
37
  export interface ProStepPropsType {
15
- /** @name 步骤条配置项 */
38
+ /** 步骤条配置项 */
16
39
  dataSource?: ItemType[];
17
- /** @name 距离顶部的偏移量 */
40
+ /** 距离顶部的偏移量(单位:像素) */
18
41
  fixedTop: number;
19
- /** @name 当前已激活的key */
42
+ /** 当前激活的步骤标识 */
20
43
  activeKey?: string;
21
- /** @name 子组件 */
44
+ /** 子组件内容 */
22
45
  children?: ReactNode;
23
- /** @name 子组件 */
24
- style?: any;
25
- /** @name 滚动偏移量 */
46
+ /** 组件自定义样式 */
47
+ style?: CSSProperties;
48
+ /** 滚动偏移量(单位:像素) */
26
49
  targetOffset?: number;
27
- /** @name 是否使用折叠标题 */
50
+ /** 是否使用折叠标题 */
28
51
  collapse?: boolean;
29
- /** @name 是否滚动到第一个报错 */
52
+ /** 是否自动滚动到第一个报错的步骤 */
30
53
  scrollToError?: boolean;
31
- /** 模块可视区域懒加载 */
54
+ /**
55
+ * 模块可视区域懒加载
56
+ * @description 为true时使用默认配置,或传入自定义懒加载配置
57
+ */
32
58
  lazyLoad?: boolean | LazyLoadProps;
33
59
  }
60
+ /**
61
+ * ProStep 组件基础类型
62
+ * @type ProStepType
63
+ */
64
+ export type ProStepType = ProStepPropsType;
65
+ /**
66
+ * ProStep 子项组件属性类型
67
+ * @interface ProStepItemPropsType
68
+ */
34
69
  export interface ProStepItemPropsType {
70
+ /** 唯一标识符 */
35
71
  id: string;
72
+ /** 步骤标题 */
36
73
  title?: string;
74
+ /** 是否使用折叠模式 */
37
75
  collapse?: boolean;
76
+ /** 排序值,越小越靠前 */
38
77
  order?: number;
39
- /** 模块可视区域懒加载 */
78
+ /**
79
+ * 模块可视区域懒加载
80
+ * @description 为true时使用默认配置,或传入自定义懒加载配置
81
+ */
40
82
  lazyLoad?: boolean | LazyLoadProps;
83
+ /** 允许其他任意属性 */
41
84
  [key: string]: any;
42
85
  }
86
+ /**
87
+ * ProStep 子项组件基础类型
88
+ * @type ProStepItemType
89
+ */
90
+ export type ProStepItemType = ProStepItemPropsType;
@@ -1,5 +1,5 @@
1
- import type { LoadedMapPropsType } from '../propsType';
1
+ import type { LoadedMapType } from '../propsType';
2
2
  export declare const handleScroll: (id: any, options: any) => void;
3
3
  /** 获取加载模块数据信息 */
4
- export declare const getLoadedMap: (registerMap: any) => LoadedMapPropsType[];
4
+ export declare const getLoadedMap: (registerMap: any) => LoadedMapType[];
5
5
  export default handleScroll;
@@ -2,9 +2,9 @@
2
2
  * 调整点:
3
3
  */
4
4
  import React from 'react';
5
- import { ProTableColumn } from '../../propsType';
5
+ import { ProTableColumnType } from '../../propsType';
6
6
  export declare const formatColumn: ({ column, originalObj, rowKey, wrapToolTipProps, scroll, onUpdateMinWidth, isInNewRow, diffConfig, }: {
7
- column: ProTableColumn;
7
+ column: ProTableColumnType;
8
8
  originalObj: any;
9
9
  rowKey: any;
10
10
  wrapToolTipProps?: any;
@@ -1,7 +1,7 @@
1
1
  import { Key } from 'react';
2
2
  import { useRequest } from 'ahooks';
3
- import { RequestOptions, Service } from '../propsType';
4
- declare function useAntdTable<I, R extends Record<string, any>, S extends Service<I, R>>(service: S, options?: RequestOptions<I, R>, useRequestOptions?: Parameters<typeof useRequest>[1]): {
3
+ import { ProTableRequestOptionsType, ProTableServiceType } from '../propsType';
4
+ declare function useAntdTable<I, R extends Record<string, any>, S extends ProTableServiceType<I, R>>(service: S, options?: ProTableRequestOptionsType<I, R>, useRequestOptions?: Parameters<typeof useRequest>[1]): {
5
5
  data: R[];
6
6
  params: any;
7
7
  rowSelection: {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ProTableProps } from './propsType';
2
+ import { ProTableType } from './propsType';
3
3
  import useAntdTable from './hooks/useAntdTable';
4
4
  export declare const TableContext: import("react").Context<{}>;
5
5
  export declare const defaultPage: {
@@ -7,7 +7,7 @@ export declare const defaultPage: {
7
7
  pageSize: number;
8
8
  };
9
9
  declare const ProTable: {
10
- (props: ProTableProps): import("react/jsx-runtime").JSX.Element;
10
+ (props: ProTableType): import("react/jsx-runtime").JSX.Element;
11
11
  defaultProps: {
12
12
  quickConfig: boolean;
13
13
  stripe: boolean;