@zat-design/sisyphus-react 4.1.1 → 4.1.2-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/.claudeignore +40 -0
  2. package/dist/index.esm.css +1 -1
  3. package/dist/less.esm.css +1 -1
  4. package/es/ProDrawerForm/components/ProDrawer/index.js +5 -2
  5. package/es/ProEditTable/components/RcTable/BaseTable.js +12 -16
  6. package/es/ProEditTable/components/RcTable/DraggableTable.js +17 -17
  7. package/es/ProEditTable/components/RenderField/index.js +298 -96
  8. package/es/ProEditTable/index.js +86 -69
  9. package/es/ProEditTable/propsType.d.ts +6 -1
  10. package/es/ProEditTable/style/index.less +8 -0
  11. package/es/ProEditTable/utils/config.d.ts +1 -1
  12. package/es/ProEditTable/utils/config.js +16 -9
  13. package/es/ProEditTable/utils/index.js +77 -22
  14. package/es/ProEditTable/utils/useShouldUpdateForTable.d.ts +1 -0
  15. package/es/ProEditTable/utils/useShouldUpdateForTable.js +37 -10
  16. package/es/ProForm/components/base/DatePicker/index.js +1 -7
  17. package/es/ProForm/components/base/RangePicker/index.js +62 -8
  18. package/es/ProForm/components/combination/Container/index.js +2 -1
  19. package/es/ProForm/components/combination/Group/component/ComRender.d.ts +2 -0
  20. package/es/ProForm/components/combination/Group/component/ComRender.js +15 -11
  21. package/es/ProForm/components/combination/Group/component/FlexibleGroup.js +61 -7
  22. package/es/ProForm/components/combination/Group/style/index.less +26 -1
  23. package/es/ProForm/components/combination/Group/utils/index.d.ts +10 -10
  24. package/es/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
  25. package/es/ProForm/propsType.d.ts +3 -3
  26. package/es/ProForm/utils/transformValue.d.ts +1 -1
  27. package/es/ProForm/utils/useForm.d.ts +1 -1
  28. package/es/ProForm/utils/useWatch.d.ts +2 -1
  29. package/es/ProForm/utils/useWatch.js +3 -1
  30. package/es/ProLayout/components/ProCollapse/index.js +4 -3
  31. package/es/ProSelect/index.js +117 -62
  32. package/es/ProUpload/propsType.d.ts +1 -1
  33. package/es/ProUpload/style/index.less +3 -3
  34. package/lib/ProDrawerForm/components/ProDrawer/index.js +5 -2
  35. package/lib/ProEditTable/components/RcTable/BaseTable.js +11 -15
  36. package/lib/ProEditTable/components/RcTable/DraggableTable.js +17 -17
  37. package/lib/ProEditTable/components/RenderField/index.js +298 -96
  38. package/lib/ProEditTable/index.js +86 -69
  39. package/lib/ProEditTable/propsType.d.ts +6 -1
  40. package/lib/ProEditTable/style/index.less +8 -0
  41. package/lib/ProEditTable/utils/config.d.ts +1 -1
  42. package/lib/ProEditTable/utils/config.js +16 -9
  43. package/lib/ProEditTable/utils/index.js +78 -21
  44. package/lib/ProEditTable/utils/useShouldUpdateForTable.d.ts +1 -0
  45. package/lib/ProEditTable/utils/useShouldUpdateForTable.js +37 -10
  46. package/lib/ProForm/components/base/DatePicker/index.js +1 -7
  47. package/lib/ProForm/components/base/RangePicker/index.js +62 -8
  48. package/lib/ProForm/components/combination/Container/index.js +2 -1
  49. package/lib/ProForm/components/combination/Group/component/ComRender.d.ts +2 -0
  50. package/lib/ProForm/components/combination/Group/component/ComRender.js +15 -11
  51. package/lib/ProForm/components/combination/Group/component/FlexibleGroup.js +61 -7
  52. package/lib/ProForm/components/combination/Group/style/index.less +26 -1
  53. package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
  54. package/lib/ProForm/propsType.d.ts +3 -3
  55. package/lib/ProForm/utils/transformValue.d.ts +1 -1
  56. package/lib/ProForm/utils/useForm.d.ts +1 -1
  57. package/lib/ProForm/utils/useWatch.d.ts +2 -1
  58. package/lib/ProForm/utils/useWatch.js +3 -1
  59. package/lib/ProLayout/components/ProCollapse/index.js +6 -3
  60. package/lib/ProSelect/index.js +115 -61
  61. package/lib/ProUpload/propsType.d.ts +1 -1
  62. package/lib/ProUpload/style/index.less +3 -3
  63. package/package.json +4 -2
@@ -19,6 +19,22 @@ import { useDateRange } from "./useDateRange";
19
19
  import { jsx as _jsx } from "react/jsx-runtime";
20
20
  var AntRangePicker = DatePicker.RangePicker;
21
21
 
22
+ /** 与 DatePicker 一致:无 valueType 时按 picker 决定默认展示格式 */
23
+ var getDefaultFormat = picker => {
24
+ switch (picker) {
25
+ case 'week':
26
+ return 'YYYY-ww';
27
+ case 'month':
28
+ return 'YYYY-MM';
29
+ case 'quarter':
30
+ return 'YYYY-[Q]Q';
31
+ case 'year':
32
+ return 'YYYY';
33
+ default:
34
+ return 'YYYY-MM-DD';
35
+ }
36
+ };
37
+
22
38
  // 获取默认快捷选项(presets 格式)
23
39
  var getDefaultPresets = () => {
24
40
  var _locale$RangePicker;
@@ -47,8 +63,7 @@ var getDefaultPresets = () => {
47
63
  }];
48
64
  };
49
65
  var RangePicker = props => {
50
- var _props$format = props.format,
51
- format = _props$format === void 0 ? 'YYYY-MM-DD' : _props$format,
66
+ var format = props.format,
52
67
  otherProps = props.otherProps,
53
68
  _props$separator = props.separator,
54
69
  separator = _props$separator === void 0 ? '~' : _props$separator,
@@ -61,6 +76,22 @@ var RangePicker = props => {
61
76
  viewEmpty = _ref.viewEmpty,
62
77
  valueType = _ref.valueType;
63
78
 
79
+ // 优先级:valueType > format > picker 默认(与 DatePicker 一致)
80
+ var nextFormat;
81
+ if (valueType === 'dateTime') {
82
+ nextFormat = 'YYYY-MM-DD HH:mm:ss';
83
+ } else if (valueType === 'date' || valueType === 'dateStartEndTime') {
84
+ nextFormat = 'YYYY-MM-DD';
85
+ } else if (isFunction(format)) {
86
+ nextFormat = undefined;
87
+ } else if (Array.isArray(format) && format.length && !isFunction(format[0])) {
88
+ nextFormat = format[0];
89
+ } else if (typeof format === 'string') {
90
+ nextFormat = format;
91
+ } else {
92
+ nextFormat = getDefaultFormat(rest.picker);
93
+ }
94
+
64
95
  // 返回函数管理起止时间可选范围
65
96
  var rangeRegulator = useDateRange({
66
97
  range,
@@ -89,16 +120,35 @@ var RangePicker = props => {
89
120
  }
90
121
  }
91
122
 
92
- // 字符串时间格式兼容
123
+ // 字符串时间格式兼容(与 DatePicker 一致:优先按 nextFormat 严格解析)
93
124
  if (Array.isArray(_rest.value) && isString(_rest.value[0]) && isString(_rest.value[1])) {
94
- _rest.value = [dayjs(_rest.value[0]), dayjs(_rest.value[1])];
125
+ var parseRangeString = s => {
126
+ if (nextFormat && !isFunction(format)) {
127
+ var parsed = dayjs(s, nextFormat, true);
128
+ if (parsed.isValid()) return parsed;
129
+ }
130
+ return dayjs(s);
131
+ };
132
+ _rest.value = [parseRangeString(_rest.value[0]), parseRangeString(_rest.value[1])];
95
133
  }
96
- var _viewFormat = Array.isArray(format) ? format[0] : format;
97
- var tempFormat = Array.isArray(format) ? format : [format];
134
+ var tempFormat;
98
135
  if (isFunction(format)) {
99
136
  tempFormat = [];
137
+ } else if (valueType === 'dateTime') {
138
+ tempFormat = ['YYYY-MM-DD HH:mm:ss'];
139
+ } else if (valueType === 'date' || valueType === 'dateStartEndTime') {
140
+ tempFormat = ['YYYY-MM-DD'];
141
+ } else if (Array.isArray(format)) {
142
+ tempFormat = format.filter(f => typeof f === 'string') || [];
143
+ if (!tempFormat.length) {
144
+ tempFormat = [getDefaultFormat(rest.picker)];
145
+ }
146
+ } else if (typeof format === 'string') {
147
+ tempFormat = [format];
148
+ } else {
149
+ tempFormat = [getDefaultFormat(rest.picker)];
100
150
  }
101
- var _format = uniq([...tempFormat, 'YYYY-MM-DD', 'YYYYMMDD', 'YYYY/MM/DD', 'YYYY_MM_DD', 'YYYY.MM.DD']).filter(formatKey => !!formatKey);
151
+ var _format = uniq([...tempFormat, 'YYYY-MM-DD HH:mm:ss', 'YYYY-MM-DD', 'YYYYMMDD', 'YYYY/MM/DD', 'YYYY_MM_DD', 'YYYY.MM.DD']).filter(formatKey => !!formatKey);
102
152
  var _defaultShowTime = {
103
153
  format: 'HH:mm:ss'
104
154
  };
@@ -108,6 +158,9 @@ var RangePicker = props => {
108
158
  var viewChildren = null;
109
159
  if (!value || !value[0] || !value[1]) {
110
160
  viewChildren = null;
161
+ } else if (valueType === 'dateTime' || valueType === 'date' || valueType === 'dateStartEndTime') {
162
+ var vf = nextFormat || 'YYYY-MM-DD';
163
+ viewChildren = `${value[0].format(vf)} ${separator} ${value[1].format(vf)}`;
111
164
  } else if (Array.isArray(format)) {
112
165
  var formattedList = format.map((formatItem, index) => {
113
166
  var _format2, _ref2;
@@ -120,7 +173,8 @@ var RangePicker = props => {
120
173
  } else if (isFunction(format)) {
121
174
  viewChildren = `${format(value[0])} ${separator} ${format(value[1])}`;
122
175
  } else {
123
- viewChildren = `${value[0].format(_viewFormat)} ${separator} ${value[1].format(_viewFormat)}`;
176
+ var _vf = (typeof format === 'string' ? format : nextFormat) || 'YYYY-MM-DD';
177
+ viewChildren = `${value[0].format(_vf)} ${separator} ${value[1].format(_vf)}`;
124
178
  }
125
179
  return /*#__PURE__*/_jsx(Container, {
126
180
  viewEmpty: viewEmpty,
@@ -49,8 +49,9 @@ var Container = props => {
49
49
  diffConfig: diffConfig
50
50
  }, otherProps));
51
51
  if (type === 'ProCollapse') {
52
+ var hasFieldChildren = Array.isArray(children) && children.length > 0;
52
53
  return /*#__PURE__*/_jsx(ProCollapse, _objectSpread(_objectSpread({}, omit(props, ['otherProps', 'children', 'onBlur', 'onChange', 'placeholder', 'className'])), {}, {
53
- children: child
54
+ children: hasFieldChildren ? child : null
54
55
  }));
55
56
  }
56
57
  if (type === 'Container') {
@@ -20,6 +20,8 @@ interface Props {
20
20
  formItemClassName?: string;
21
21
  formItemStyle?: React.CSSProperties;
22
22
  dependencies?: NamePath[];
23
+ required?: boolean;
24
+ rules?: any[];
23
25
  }
24
26
  /** 渲染组件 */
25
27
  declare const ComRender: React.FC<Props>;
@@ -89,6 +89,16 @@ var ComRender = props => {
89
89
  // 传统模式 compact 模式:需要 Form.Item 包装并应用宽度样式
90
90
  // 通过 formItemClassName 和 formItemStyle 来判断是否需要 Form.Item 包装
91
91
  if (formItemClassName && name) {
92
+ // 从 rest 中提取 required 和 rules,在非编辑态时移除校验
93
+ var formItemProps = _objectSpread({
94
+ name,
95
+ className: formItemClassName,
96
+ style: formItemStyle
97
+ }, isView ? {} : {
98
+ required: rest === null || rest === void 0 ? void 0 : rest.required,
99
+ rules: rest === null || rest === void 0 ? void 0 : rest.rules
100
+ });
101
+
92
102
  // 如果有依赖字段,使用 shouldUpdate 来实时更新错误状态
93
103
  if (dependencies && dependencies.length > 0) {
94
104
  return /*#__PURE__*/_jsx(Form.Item, {
@@ -102,7 +112,7 @@ var ComRender = props => {
102
112
  });
103
113
  var hasChanged = currentFieldChanged || dependenciesChanged;
104
114
  // 当检测到变化时,触发字段校验以更新错误状态
105
- if (hasChanged && contextProps !== null && contextProps !== void 0 && contextProps.form && name) {
115
+ if (hasChanged && contextProps !== null && contextProps !== void 0 && contextProps.form && name && !isView) {
106
116
  setTimeout(() => {
107
117
  contextProps.form.validateFields([name]).catch(() => {});
108
118
  }, 0);
@@ -110,10 +120,7 @@ var ComRender = props => {
110
120
  return hasChanged;
111
121
  },
112
122
  noStyle: true,
113
- children: () => /*#__PURE__*/_jsx(Form.Item, {
114
- name: name,
115
- className: formItemClassName,
116
- style: formItemStyle,
123
+ children: () => /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({}, formItemProps), {}, {
117
124
  children: /*#__PURE__*/_jsx(FieldProvider, {
118
125
  value: _objectSpread(_objectSpread({}, contextProps), {}, {
119
126
  valueType,
@@ -122,14 +129,11 @@ var ComRender = props => {
122
129
  }),
123
130
  children: renderComponent
124
131
  })
125
- })
132
+ }))
126
133
  });
127
134
  }
128
135
  // 没有依赖字段,直接渲染 Form.Item
129
- return /*#__PURE__*/_jsx(Form.Item, {
130
- name: name,
131
- className: formItemClassName,
132
- style: formItemStyle,
136
+ return /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({}, formItemProps), {}, {
133
137
  children: /*#__PURE__*/_jsx(FieldProvider, {
134
138
  value: _objectSpread(_objectSpread({}, contextProps), {}, {
135
139
  valueType,
@@ -138,7 +142,7 @@ var ComRender = props => {
138
142
  }),
139
143
  children: renderComponent
140
144
  })
141
- });
145
+ }));
142
146
  }
143
147
 
144
148
  // 非传统模式 compact 模式:直接渲染组件
@@ -118,16 +118,16 @@ var FlexibleGroupRender = props => {
118
118
  var childDisabled = typeof child.disabled === 'function' ? false : child.disabled;
119
119
  var finalDisabled = groupDisabled || childDisabled;
120
120
 
121
- // 构建 formItemProps
121
+ // 构建 formItemProps - 在非编辑态时移除校验规则
122
122
  var formItemProps = {
123
123
  name: fullName,
124
124
  label: child.label,
125
- rules: child.rules,
125
+ rules: isView ? undefined : child.rules,
126
126
  dependencies: processedDependencies,
127
127
  extra: child.extra,
128
128
  before: child.before,
129
129
  after: child.after,
130
- required: child.required,
130
+ required: isView ? undefined : child.required,
131
131
  disabled: finalDisabled,
132
132
  validateFirst: child.validateFirst
133
133
  };
@@ -148,13 +148,40 @@ var FlexibleGroupRender = props => {
148
148
  formItemProps.tooltip = child.tooltip;
149
149
  }
150
150
 
151
+ // 在ProEditTable场景下,如果同组其他字段有值,则当前字段空值不显示 -
152
+ var childViewEmpty = otherProps === null || otherProps === void 0 ? void 0 : otherProps.viewEmpty;
153
+ if (isView && (otherProps === null || otherProps === void 0 ? void 0 : otherProps.source) === 'ProEditTable' && form && children.length > 1) {
154
+ // 检查同组其他字段是否有值
155
+ var hasOtherValues = children.some(otherChild => {
156
+ if (otherChild === child) return false; // 跳过当前字段
157
+
158
+ var otherChildNamePath = otherChild.namePath || contextProps.namePath;
159
+ var otherFullName = (() => {
160
+ if (otherChildNamePath && Array.isArray(otherChild.name) && otherChild.name.length > 1) {
161
+ return [...otherChildNamePath, ...otherChild.name];
162
+ }
163
+ if (otherChildNamePath) {
164
+ return [...otherChildNamePath, otherChild.name];
165
+ }
166
+ return otherChild.name;
167
+ })();
168
+ var value = form.getFieldValue(otherFullName);
169
+ return value !== undefined && value !== null && value !== '';
170
+ });
171
+
172
+ // 如果有其他字段有值,当前字段空值显示为空字符串
173
+ if (hasOtherValues) {
174
+ childViewEmpty = '';
175
+ }
176
+ }
177
+
151
178
  // 构建 otherProps
152
179
  var renderOtherProps = {
153
180
  label: child.label,
154
181
  name: fullName,
155
182
  disabled: finalDisabled,
156
183
  isView,
157
- viewEmpty: otherProps === null || otherProps === void 0 ? void 0 : otherProps.viewEmpty,
184
+ viewEmpty: childViewEmpty,
158
185
  valueType: child.valueType,
159
186
  form,
160
187
  type,
@@ -268,12 +295,16 @@ var FlexibleGroupRender = props => {
268
295
  elements.push(formElement);
269
296
 
270
297
  // 添加分隔符
271
- if (index < visibleChildren.length - 1 && space !== null && space !== void 0 && space.separator) {
298
+ // 查看模式下,如果没有配置separator,使用默认的 finalSeparator
299
+ var separatorToUse = isView ? (space === null || space === void 0 ? void 0 : space.separator) || finalSeparator : space === null || space === void 0 ? void 0 : space.separator;
300
+ if (index < visibleChildren.length - 1 && separatorToUse) {
272
301
  var shouldAddSeparator = space.separatorIndex ? Array.isArray(space.separatorIndex) ? space.separatorIndex.includes(originalIndex) : space.separatorIndex === originalIndex : true;
273
302
  if (shouldAddSeparator) {
303
+ // 查看模式下使用不同的className,避免显示边框
304
+ var separatorClassName = isView ? 'pro-group-separator-compact pro-group-separator-view' : 'pro-group-separator-compact';
274
305
  elements.push( /*#__PURE__*/_jsx("span", {
275
- className: "pro-group-separator-compact",
276
- children: space.separator
306
+ className: separatorClassName,
307
+ children: separatorToUse
277
308
  }, child.name ? `separator-${child.name}` : `separator-${originalIndex}`));
278
309
  }
279
310
  }
@@ -303,6 +334,29 @@ var FlexibleGroupRender = props => {
303
334
  return (otherProps === null || otherProps === void 0 ? void 0 : otherProps.viewEmpty) || '-';
304
335
  }
305
336
 
337
+ // 查看模式下,检查所有children的值是否都为空
338
+ if (isView && form && children.length > 0) {
339
+ var allValuesEmpty = children.every(child => {
340
+ var childNamePath = child.namePath || contextProps.namePath;
341
+ var fullName = (() => {
342
+ if (childNamePath && Array.isArray(child.name) && child.name.length > 1) {
343
+ return [...childNamePath, ...child.name];
344
+ }
345
+ if (childNamePath) {
346
+ return [...childNamePath, child.name];
347
+ }
348
+ return child.name;
349
+ })();
350
+ var value = form.getFieldValue(fullName);
351
+ return value === undefined || value === null || value === '';
352
+ });
353
+
354
+ // 如果所有值都为空,显示一个 -
355
+ if (allValuesEmpty) {
356
+ return (otherProps === null || otherProps === void 0 ? void 0 : otherProps.viewEmpty) || '-';
357
+ }
358
+ }
359
+
306
360
  // 渲染内容
307
361
  var renderContent = () => {
308
362
  return /*#__PURE__*/_jsx("div", {
@@ -4,6 +4,15 @@
4
4
  display: flex;
5
5
  width: unset !important;
6
6
 
7
+ &.pro-group-view {
8
+ .pro-group-form-item {
9
+ flex: 0 0 auto !important;
10
+
11
+ }
12
+ .@{ant-prefix}-space-compact .pro-group-separator-compact{
13
+ color: #333 !important;
14
+ }
15
+ }
7
16
 
8
17
 
9
18
  &.pro-group-view {
@@ -385,6 +394,13 @@
385
394
  // margin: 0 !important;
386
395
  }
387
396
 
397
+ // 查看模式下,Form.Item不平分空间,而是根据内容自适应
398
+ &.pro-group-view {
399
+ .pro-group-form-item {
400
+ flex: 0 0 auto;
401
+ }
402
+ }
403
+
388
404
  // 当有自定义宽度时,只有设置了宽度的 Form.Item 不使用 flex:1
389
405
  &.pro-group-diy-width {
390
406
  // 覆盖 Space.Compact 内设置了宽度的 Form.Item
@@ -430,7 +446,7 @@
430
446
  }
431
447
 
432
448
  .@{ant-prefix}-input-number-input {
433
- border-left: 1px solid #ff4d4f !important;
449
+ border-left: 0 !important;
434
450
  }
435
451
  }
436
452
 
@@ -467,6 +483,15 @@
467
483
  margin-left: -1px;
468
484
  }
469
485
 
486
+ // 查看模式下的分隔符样式 - 移除边框,使用简洁样式
487
+ .pro-group-separator-view {
488
+ border: none !important;
489
+ background: transparent !important;
490
+ padding: 0 2px !important;
491
+ margin-inline-start: 0 !important;
492
+ color: #999 !important;
493
+ }
494
+
470
495
 
471
496
  /* 1. 处理第一个子元素:左上、左下圆角 */
472
497
  > .pro-group-form-item:first-child{
@@ -75,31 +75,29 @@ 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
- trim?: boolean;
79
- normalize?: (value: any, prevValue: any, allValues: import("@rc-component/form/lib/interface").Store) => any;
80
- children?: React.ReactNode | ((form: FormInstance<any>) => React.ReactNode);
81
- vertical?: boolean;
82
78
  id?: string;
83
79
  className?: string;
84
80
  hidden?: boolean;
85
81
  style?: React.CSSProperties;
82
+ children?: React.ReactNode | ((form: FormInstance<any>) => React.ReactNode);
86
83
  onReset?: () => void;
87
84
  prefixCls?: string;
85
+ status?: "" | "warning" | "error" | "success" | "validating";
88
86
  rootClassName?: string;
89
- status?: "" | "success" | "error" | "warning" | "validating";
90
- trigger?: string;
91
- colon?: boolean;
92
87
  isView?: boolean;
93
- desensitization?: [number, number] | ReactiveFunction<any, [number, number]>;
94
- getValueProps?: ((value: any) => Record<string, unknown>) & ((value: any) => Record<string, unknown>);
88
+ colon?: boolean;
95
89
  htmlFor?: string;
96
90
  labelAlign?: import("antd/es/form/interface").FormLabelAlign;
97
91
  labelCol?: import("antd").ColProps;
92
+ vertical?: boolean;
98
93
  getValueFromEvent?: (...args: import("@rc-component/form/lib/interface").EventArgs) => any;
94
+ normalize?: (value: any, prevValue: any, allValues: import("@rc-component/form/lib/interface").Store) => any;
99
95
  shouldUpdate?: import("@rc-component/form/lib/Field").ShouldUpdate<any>;
96
+ trigger?: string;
100
97
  validateTrigger?: string | false | string[];
101
98
  validateDebounce?: number;
102
99
  valuePropName?: string;
100
+ getValueProps?: ((value: any) => Record<string, unknown>) & ((value: any) => Record<string, unknown>);
103
101
  messageVariables?: Record<string, string>;
104
102
  initialValue?: any;
105
103
  onMetaChange?: (meta: import("@rc-component/form/lib/Field").MetaEvent) => void;
@@ -110,7 +108,7 @@ export declare const useFormItemProps: (column: FlexibleGroupColumnType, context
110
108
  hasFeedback?: boolean | {
111
109
  icons: import("antd/es/form/FormItem").FeedbackIcons;
112
110
  };
113
- validateStatus?: "" | "success" | "error" | "warning" | "validating";
111
+ validateStatus?: "" | "warning" | "error" | "success" | "validating";
114
112
  layout?: import("antd/es/form/Form").FormItemLayout;
115
113
  wrapperCol?: import("antd").ColProps;
116
114
  help?: React.ReactNode;
@@ -123,10 +121,12 @@ export declare const useFormItemProps: (column: FlexibleGroupColumnType, context
123
121
  index?: number;
124
122
  }) => string | React.ReactElement<any, any>;
125
123
  viewType?: import("../../../render/propsType").ViewType;
124
+ trim?: boolean;
126
125
  upperCase?: boolean;
127
126
  toISOString?: boolean;
128
127
  toCSTString?: boolean;
129
128
  clearNotShow?: boolean;
129
+ desensitization?: [number, number] | ReactiveFunction<any, [number, number]>;
130
130
  name: any;
131
131
  dependencies: any[];
132
132
  tooltip: string | {
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { DefaultOptionType } from 'rc-select/lib/Select';
2
+ import { DefaultOptionType } from '@rc-component/select/es/Select';
3
3
  import { Service, Options } from 'ahooks/lib/useRequest/src/types';
4
4
  export interface FieldNamesType {
5
5
  label: string;
@@ -1,9 +1,9 @@
1
+ import React, { ReactNode } from 'react';
1
2
  import { ButtonProps, ColProps, RowProps } from 'antd';
2
3
  import { FormProps, FormInstance } from 'antd/es/form/Form';
3
4
  import { NamePath } from 'antd/es/form/interface';
4
- import { StoreValue, Store } from 'rc-field-form/es/interface.d';
5
- import { ShouldUpdate } from 'rc-field-form/es/Field.d';
6
- import React, { ReactNode } from 'react';
5
+ import type { StoreValue, Store } from '@rc-component/form/es/interface';
6
+ import type { ShouldUpdate } from '@rc-component/form/es/Field';
7
7
  import type { ProFormColumnType, ViewType } from './components/render/propsType';
8
8
  import type { ProFormComponentType } from './components';
9
9
  export interface ButtonType extends ButtonProps {
@@ -1,6 +1,6 @@
1
1
  import { FormInstance, FormItemProps } from 'antd';
2
2
  import { NamePath } from 'antd/es/form/interface';
3
- import { StoreValue, Store } from 'rc-field-form/es/interface.d';
3
+ import type { StoreValue, Store } from '@rc-component/form/es/interface';
4
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,6 +1,6 @@
1
1
  import { FormInstance } from 'antd';
2
2
  import { NamePath } from 'antd/es/form/interface';
3
- import { ValuedNotifyInfo } from 'rc-field-form/es/interface';
3
+ import type { ValuedNotifyInfo } from '@rc-component/form/es/interface';
4
4
  export type ModifiedFormInstanceType<T> = FormInstance<T> & {
5
5
  isModified?: boolean;
6
6
  /** 默认清空设置值的报错状态 */
@@ -1,4 +1,5 @@
1
- import { FormInstance, NamePath } from 'rc-field-form/es/interface';
1
+ import { FormInstance } from 'antd/es/form/Form';
2
+ import { NamePath } from 'antd/es/form/interface';
2
3
  export declare function toArray<T>(value?: T | T[] | null): T[];
3
4
  /**
4
5
  * ProForm的useWatch hook,用于监听表单字段变化
@@ -112,7 +112,9 @@ function useWatch(dependencies, form, wait) {
112
112
  }
113
113
  }
114
114
  return paths;
115
- }, [/* dependencies 故意忽略,与原实现一致 */]);
115
+ }, [
116
+ /* dependencies 故意忽略,与原实现一致 */
117
+ ]);
116
118
 
117
119
  // 保存防抖函数引用,避免重复创建
118
120
  var debouncedFn = useMemo(() => {
@@ -3,7 +3,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
3
3
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
4
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
5
5
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
- import { useLayoutEffect } from 'react';
6
+ import React, { useLayoutEffect } from 'react';
7
7
  import { Collapse, Descriptions, Space } from 'antd';
8
8
  import { CaretRightOutlined } from '@ant-design/icons';
9
9
  import classNames from 'classnames';
@@ -55,11 +55,12 @@ var ProCollapse = props => {
55
55
  'pro-collapse-no-level1-title': !title && level !== '2' && level !== '3',
56
56
  [`${className}`]: className
57
57
  });
58
- var content = /*#__PURE__*/_jsx("div", {
58
+ var shouldRenderContent = children !== null && children !== undefined;
59
+ var content = shouldRenderContent ? /*#__PURE__*/_jsx("div", {
59
60
  className: "pro-collapse-content",
60
61
  style: contentStyle,
61
62
  children: children
62
- });
63
+ }) : null;
63
64
 
64
65
  // 生成 Collapse items 配置
65
66
  var getCollapseItems = () => {