@zat-design/sisyphus-react 3.4.2 → 3.4.3

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 (204) hide show
  1. package/dist/index.esm.css +286 -240
  2. package/dist/less.esm.css +5022 -0
  3. package/dist/less.esm.js +3 -0
  4. package/es/ProConfigProvider/index.js +2 -1
  5. package/es/ProEditLabel/style/index.less +1 -1
  6. package/es/ProEditTable/components/RenderField/index.js +28 -20
  7. package/es/ProEditTable/index.js +3 -3
  8. package/es/ProEditTable/propsType.d.ts +1 -1
  9. package/es/ProEditTable/style/index.less +1 -1
  10. package/es/ProEditTable/utils/config.js +5 -5
  11. package/es/ProEditTable/utils/index.js +67 -30
  12. package/es/ProEditTable/utils/tools.js +3 -1
  13. package/es/ProEnum/components/Group.d.ts +2 -0
  14. package/es/ProEnum/components/Group.js +26 -8
  15. package/es/ProEnum/index.js +4 -3
  16. package/es/ProEnum/style/index.less +12 -3
  17. package/es/ProForm/components/base/DatePicker/index.js +2 -2
  18. package/es/ProForm/components/combination/FormList/index.js +6 -3
  19. package/es/ProForm/components/combination/FormList/utils.d.ts +2 -1
  20. package/es/ProForm/components/combination/FormList/utils.js +5 -3
  21. package/es/ProForm/components/combination/Group/index.js +28 -15
  22. package/es/ProForm/components/combination/Group/propsType.d.ts +6 -0
  23. package/es/ProForm/components/combination/Group/style/index.less +4 -4
  24. package/es/ProForm/components/combination/Group/utils.d.ts +2 -0
  25. package/es/ProForm/components/combination/Group/utils.js +10 -0
  26. package/es/ProForm/components/combination/ProTimeLimit/index.js +8 -2
  27. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
  28. package/es/ProForm/components/index.d.ts +0 -1
  29. package/es/ProForm/components/index.js +1 -1
  30. package/es/ProForm/components/render/ConfirmWrapper.js +1 -1
  31. package/es/ProForm/components/render/Render.js +21 -13
  32. package/es/ProForm/components/render/RenderFields.d.ts +2 -1
  33. package/es/ProForm/components/render/RenderFields.js +7 -3
  34. package/es/ProForm/components/render/propsType.d.ts +1 -4
  35. package/es/ProForm/index.js +8 -6
  36. package/es/ProForm/propsType.d.ts +5 -1
  37. package/es/ProForm/style/index.less +17 -13
  38. package/es/ProForm/utils/{contrastOriginal.d.ts → diffOriginal.d.ts} +2 -1
  39. package/es/ProForm/utils/diffOriginal.js +61 -0
  40. package/es/ProForm/utils/index.d.ts +1 -1
  41. package/es/ProForm/utils/index.js +1 -1
  42. package/es/ProForm/utils/transformNames.d.ts +1 -1
  43. package/es/ProForm/utils/transformNames.js +11 -4
  44. package/es/ProForm/utils/transformValue.js +2 -2
  45. package/es/ProForm/utils/useChanged.js +4 -3
  46. package/es/ProForm/utils/useListChanged.d.ts +1 -1
  47. package/es/ProForm/utils/useListChanged.js +5 -3
  48. package/es/ProForm/utils/valueType.d.ts +10 -5
  49. package/es/ProForm/utils/valueType.js +20 -10
  50. package/es/ProIcon/config/index.d.ts +2 -1
  51. package/es/ProIcon/config/index.js +191 -133
  52. package/es/ProIcon/index.d.ts +0 -1
  53. package/es/ProIcon/index.js +21 -36
  54. package/es/ProIcon/propsTypes.d.ts +2 -1
  55. package/es/ProLayout/components/Layout/Header/style/index.less +1 -1
  56. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +58 -55
  57. package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +25 -20
  58. package/es/ProLayout/components/Layout/Menu/style/index.less +52 -56
  59. package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +5 -0
  60. package/es/ProLayout/components/ProCollapse/index.js +22 -3
  61. package/es/ProLayout/components/ProCollapse/style/index.less +29 -11
  62. package/es/ProLayout/components/ProFooter/index.js +1 -1
  63. package/es/ProLayout/components/ProFooter/style/index.less +1 -1
  64. package/es/ProLayout/components/ProHeader/style/index.less +6 -5
  65. package/es/ProLayout/style/index.less +176 -88
  66. package/es/ProStep/components/Item/index.js +2 -1
  67. package/es/ProStep/style/index.less +71 -70
  68. package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
  69. package/es/ProTable/components/RenderColumn/index.js +3 -3
  70. package/es/ProTable/propsType.d.ts +1 -1
  71. package/es/ProTable/style/index.less +2 -2
  72. package/es/ProTable/utils.js +9 -9
  73. package/es/ProTabs/style/index.less +3 -1
  74. package/es/ProThemeTools/component/PrdTools/index.d.ts +1 -1
  75. package/es/ProThemeTools/component/PrdTools/index.js +2 -2
  76. package/es/ProThemeTools/component/PrdTools/style/index.less +1 -1
  77. package/es/ProThemeTools/index.js +21 -28
  78. package/es/ProThemeTools/propsType.d.ts +1 -1
  79. package/es/ProThemeTools/style/index.less +25 -8
  80. package/es/{ProTreeSelect → ProTree/components/ProTreeSelect}/index.js +7 -11
  81. package/es/{ProTreeSelect → ProTree/components/ProTreeSelect}/propsType.d.ts +1 -1
  82. package/es/ProTree/index.js +1 -1
  83. package/es/ProTreeModal/style/index.less +2 -2
  84. package/es/ProUpload/style/fileItem.less +2 -2
  85. package/es/ProUpload/style/index.less +2 -2
  86. package/es/assets/catalog.svg +30 -1
  87. package/es/assets/fold.svg +27 -0
  88. package/es/assets/setting.svg +14 -0
  89. package/es/locale/en_US.d.ts +3 -0
  90. package/es/locale/en_US.js +3 -0
  91. package/es/locale/zh_CN.d.ts +3 -0
  92. package/es/locale/zh_CN.js +3 -0
  93. package/es/style/components.less +0 -1
  94. package/es/style/less.less +2 -0
  95. package/es/style/theme/antd.less +1 -2
  96. package/es/style/theme/index.less +2 -2
  97. package/es/style/theme/tokens.less +2 -2
  98. package/es/tokens.js +2 -2
  99. package/lib/ProConfigProvider/index.js +2 -1
  100. package/lib/ProEditLabel/style/index.less +1 -1
  101. package/lib/ProEditTable/components/RenderField/index.js +27 -19
  102. package/lib/ProEditTable/index.js +3 -3
  103. package/lib/ProEditTable/propsType.d.ts +1 -1
  104. package/lib/ProEditTable/style/index.less +1 -1
  105. package/lib/ProEditTable/utils/config.js +5 -5
  106. package/lib/ProEditTable/utils/index.js +67 -30
  107. package/lib/ProEditTable/utils/tools.js +3 -1
  108. package/lib/ProEnum/components/Group.d.ts +2 -0
  109. package/lib/ProEnum/components/Group.js +26 -8
  110. package/lib/ProEnum/index.js +4 -3
  111. package/lib/ProEnum/style/index.less +12 -3
  112. package/lib/ProForm/components/base/DatePicker/index.js +1 -1
  113. package/lib/ProForm/components/combination/FormList/index.js +6 -3
  114. package/lib/ProForm/components/combination/FormList/utils.d.ts +2 -1
  115. package/lib/ProForm/components/combination/FormList/utils.js +5 -3
  116. package/lib/ProForm/components/combination/Group/index.js +25 -12
  117. package/lib/ProForm/components/combination/Group/propsType.d.ts +6 -0
  118. package/lib/ProForm/components/combination/Group/style/index.less +4 -4
  119. package/lib/ProForm/components/combination/Group/utils.d.ts +2 -0
  120. package/lib/ProForm/components/combination/Group/utils.js +11 -1
  121. package/lib/ProForm/components/combination/ProTimeLimit/index.js +7 -1
  122. package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
  123. package/lib/ProForm/components/index.d.ts +0 -1
  124. package/lib/ProForm/components/index.js +0 -7
  125. package/lib/ProForm/components/render/ConfirmWrapper.js +1 -1
  126. package/lib/ProForm/components/render/Render.js +21 -13
  127. package/lib/ProForm/components/render/RenderFields.d.ts +2 -1
  128. package/lib/ProForm/components/render/RenderFields.js +7 -3
  129. package/lib/ProForm/components/render/propsType.d.ts +1 -4
  130. package/lib/ProForm/index.js +7 -5
  131. package/lib/ProForm/propsType.d.ts +5 -1
  132. package/lib/ProForm/style/index.less +17 -13
  133. package/lib/ProForm/utils/{contrastOriginal.d.ts → diffOriginal.d.ts} +2 -1
  134. package/lib/ProForm/utils/diffOriginal.js +68 -0
  135. package/lib/ProForm/utils/index.d.ts +1 -1
  136. package/lib/ProForm/utils/index.js +2 -2
  137. package/lib/ProForm/utils/transformNames.d.ts +1 -1
  138. package/lib/ProForm/utils/transformNames.js +10 -3
  139. package/lib/ProForm/utils/transformValue.js +1 -1
  140. package/lib/ProForm/utils/useChanged.js +4 -3
  141. package/lib/ProForm/utils/useListChanged.d.ts +1 -1
  142. package/lib/ProForm/utils/useListChanged.js +5 -3
  143. package/lib/ProForm/utils/valueType.d.ts +10 -5
  144. package/lib/ProForm/utils/valueType.js +20 -10
  145. package/lib/ProIcon/config/index.d.ts +2 -1
  146. package/lib/ProIcon/config/index.js +191 -133
  147. package/lib/ProIcon/index.d.ts +0 -1
  148. package/lib/ProIcon/index.js +21 -37
  149. package/lib/ProIcon/propsTypes.d.ts +2 -1
  150. package/lib/ProLayout/components/Layout/Header/style/index.less +1 -1
  151. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +58 -55
  152. package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +25 -20
  153. package/lib/ProLayout/components/Layout/Menu/style/index.less +52 -56
  154. package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +5 -0
  155. package/lib/ProLayout/components/ProCollapse/index.js +20 -3
  156. package/lib/ProLayout/components/ProCollapse/style/index.less +29 -11
  157. package/lib/ProLayout/components/ProFooter/index.js +1 -1
  158. package/lib/ProLayout/components/ProFooter/style/index.less +1 -1
  159. package/lib/ProLayout/components/ProHeader/style/index.less +6 -5
  160. package/lib/ProLayout/style/index.less +176 -88
  161. package/lib/ProStep/components/Item/index.js +2 -1
  162. package/lib/ProStep/style/index.less +71 -70
  163. package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
  164. package/lib/ProTable/components/RenderColumn/index.js +3 -3
  165. package/lib/ProTable/propsType.d.ts +1 -1
  166. package/lib/ProTable/style/index.less +2 -2
  167. package/lib/ProTable/utils.js +9 -9
  168. package/lib/ProTabs/style/index.less +3 -1
  169. package/lib/ProThemeTools/component/PrdTools/index.d.ts +1 -1
  170. package/lib/ProThemeTools/component/PrdTools/index.js +2 -2
  171. package/lib/ProThemeTools/component/PrdTools/style/index.less +1 -1
  172. package/lib/ProThemeTools/index.js +19 -27
  173. package/lib/ProThemeTools/propsType.d.ts +1 -1
  174. package/lib/ProThemeTools/style/index.less +25 -8
  175. package/lib/{ProTreeSelect → ProTree/components/ProTreeSelect}/index.js +7 -11
  176. package/lib/{ProTreeSelect → ProTree/components/ProTreeSelect}/propsType.d.ts +1 -1
  177. package/lib/ProTree/index.js +1 -1
  178. package/lib/ProTreeModal/style/index.less +2 -2
  179. package/lib/ProUpload/style/fileItem.less +2 -2
  180. package/lib/ProUpload/style/index.less +2 -2
  181. package/lib/assets/catalog.svg +30 -1
  182. package/lib/assets/fold.svg +27 -0
  183. package/lib/assets/setting.svg +14 -0
  184. package/lib/locale/en_US.d.ts +3 -0
  185. package/lib/locale/en_US.js +3 -0
  186. package/lib/locale/zh_CN.d.ts +3 -0
  187. package/lib/locale/zh_CN.js +3 -0
  188. package/lib/style/components.less +0 -1
  189. package/lib/style/less.less +2 -0
  190. package/lib/style/theme/antd.less +1 -2
  191. package/lib/style/theme/index.less +2 -2
  192. package/lib/style/theme/tokens.less +2 -2
  193. package/lib/tokens.js +2 -2
  194. package/package.json +1 -1
  195. package/es/ProForm/utils/contrastOriginal.js +0 -24
  196. package/es/ProIcon/symbolIcon.js +0 -43
  197. package/lib/ProForm/utils/contrastOriginal.js +0 -30
  198. package/lib/ProIcon/symbolIcon.js +0 -45
  199. /package/es/{ProTreeSelect → ProTree/components/ProTreeSelect}/index.d.ts +0 -0
  200. /package/es/{ProTreeSelect → ProTree/components/ProTreeSelect}/propsType.js +0 -0
  201. /package/es/{ProTreeSelect → ProTree/components/ProTreeSelect}/style/index.less +0 -0
  202. /package/lib/{ProTreeSelect → ProTree/components/ProTreeSelect}/index.d.ts +0 -0
  203. /package/lib/{ProTreeSelect → ProTree/components/ProTreeSelect}/propsType.js +0 -0
  204. /package/lib/{ProTreeSelect → ProTree/components/ProTreeSelect}/style/index.less +0 -0
@@ -39,9 +39,13 @@ export interface ProFormOtherProps {
39
39
  disabled: boolean;
40
40
  show?: boolean | (() => boolean);
41
41
  required?: boolean | (() => boolean);
42
+ mode?: string;
43
+ namePath?: any[] | string | number;
42
44
  }
43
45
  export interface ProFormProps<Values = any> extends FormProps<Values> {
44
46
  disabled?: boolean;
47
+ /** 全局控制优先 */
48
+ globalControl?: boolean;
45
49
  mode?: ModeEnum;
46
50
  formKey?: string;
47
51
  /** 是否查看 */
@@ -67,7 +71,7 @@ export interface ProFormProps<Values = any> extends FormProps<Values> {
67
71
  requiredOnView?: boolean;
68
72
  formId?: string;
69
73
  required?: boolean;
70
- originalTip?: boolean;
74
+ originalDiffTip?: boolean;
71
75
  }
72
76
  export interface Transform<T = any> {
73
77
  normalize?: (value: StoreValue, prevValue: StoreValue, allValues: Store) => StoreValue;
@@ -31,16 +31,6 @@
31
31
  }
32
32
  }
33
33
 
34
- &.@{ant-prefix}-form {
35
- margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
36
- }
37
-
38
- .pro-collapse-level2 {
39
- .@{ant-prefix}-collapse-item {
40
- margin-bottom: 0 !important;
41
- }
42
- }
43
-
44
34
  .@{ant-prefix}-form-item-control-input {
45
35
  flex-grow: 1;
46
36
  max-width: 100%;
@@ -135,7 +125,7 @@
135
125
  background: @zaui-contract-bg !important;
136
126
 
137
127
  input {
138
- background: @zaui-contract-bg;
128
+ background: transparent;
139
129
  }
140
130
  .@{ant-prefix}-select-selection-placeholder {
141
131
  z-index: 9;
@@ -147,8 +137,22 @@
147
137
  border-radius: 4px;
148
138
  }
149
139
 
150
- // 查看模式 修改容器样式
151
- .@{ant-prefix}-form-item-control-input-content > span, // 地址组件
140
+ // 地址组件
141
+ .@{ant-prefix}-form-item-control-input-content {
142
+ & > .pro-address {
143
+ .ant-select-selector,
144
+ .ant-input-affix-wrapper,
145
+ .ant-input-disabled {
146
+ background: @zaui-contract-bg;
147
+ }
148
+ }
149
+ & > .ant-input-group {
150
+ .forever-checkbox {
151
+ background: @zaui-contract-bg;
152
+ }
153
+ }
154
+ }
155
+
152
156
  .pro-form-view-container {
153
157
  padding: 4px 8px;
154
158
  background: @zaui-contract-bg;
@@ -3,7 +3,8 @@ interface Params {
3
3
  originalValue: any;
4
4
  value: any;
5
5
  form: FormInstance;
6
+ name?: string | any[];
6
7
  equalWith?: (originalValue: any, currentValue: any) => boolean;
7
8
  }
8
- export declare const contrastOriginal: (params: Params) => boolean;
9
+ export declare const diffOriginal: (params: Params) => boolean;
9
10
  export {};
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.diffOriginal = void 0;
8
+ var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
9
+ var _lodash = require("lodash");
10
+ var nullValue = [null, undefined, '']; // 输入框空值时可能存在的三种值 视为相等
11
+ var extractValue = function extractValue(obj, path) {
12
+ var value = obj || {};
13
+ if (!Object.keys(obj)) {
14
+ return [];
15
+ }
16
+ var _iterator = (0, _createForOfIteratorHelper2.default)(path),
17
+ _step;
18
+ try {
19
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
20
+ var key = _step.value;
21
+ if (value && value.hasOwnProperty(key)) {
22
+ value = value[key];
23
+ } else {
24
+ return undefined;
25
+ }
26
+ }
27
+ } catch (err) {
28
+ _iterator.e(err);
29
+ } finally {
30
+ _iterator.f();
31
+ }
32
+ return Object.values(value);
33
+ };
34
+ /** 将解构后的name值,反向转回names,例如 formData {a:1, b:2} names ['a', 'b'] 返回 [1,2] */
35
+ var extractValues = function extractValues(data, pathString) {
36
+ if (pathString.includes('_')) {
37
+ var namePrefixes = pathString.split('-')[0].split('_').slice(0, -1);
38
+ return extractValue(data, namePrefixes);
39
+ }
40
+ return pathString.split('-').map(function (item) {
41
+ return data[item];
42
+ });
43
+ };
44
+ var diffOriginal = exports.diffOriginal = function diffOriginal(params) {
45
+ var originalValue = params.originalValue,
46
+ _value = params.value,
47
+ equalWith = params.equalWith,
48
+ form = params.form,
49
+ name = params.name;
50
+ var value = !(name === null || name === void 0 ? void 0 : name.includes('-')) ? _value : extractValues(form.getFieldsValue(), name);
51
+ // 支持传入自定义比较事件
52
+ if ((0, _lodash.isFunction)(equalWith)) {
53
+ return !equalWith(originalValue, value);
54
+ }
55
+ if (Array.isArray(originalValue)) {
56
+ return originalValue.some(function (valueItem, index) {
57
+ // 如果两个值有一个不是空值, 则进行深比较
58
+ if (!nullValue.includes(value === null || value === void 0 ? void 0 : value[index]) || !nullValue.includes(valueItem)) {
59
+ return !(0, _lodash.isEqual)(value === null || value === void 0 ? void 0 : value[index], valueItem);
60
+ }
61
+ return false;
62
+ });
63
+ }
64
+ if (!nullValue.includes(value) || !nullValue.includes(originalValue)) {
65
+ return !(0, _lodash.isEqual)(value, originalValue);
66
+ }
67
+ return false;
68
+ };
@@ -26,7 +26,7 @@ export declare const isTrim: (type: string, trim: boolean, configData: any) => a
26
26
  */
27
27
  export declare const isUpperCase: (type: string, upperCase: boolean) => any;
28
28
  export declare const weedOutProps: (data: Record<string, any>, keys: string[]) => {}[];
29
- export declare const contrast: (prevValues: any, curValues: any, names: NamePath[]) => boolean;
29
+ export declare const diffField: (prevValues: any, curValues: any, names: NamePath[]) => boolean;
30
30
  export declare const splitNameStr: (name: string) => NamePath[];
31
31
  export declare const filterInternalFields: (values: any) => any;
32
32
  export declare const getAllNamePath: (object: Record<string, any>, currentPath?: InternalNamePath) => InternalNamePath[];
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.getAllNamePath = exports.findOptionByValue = exports.filterInternalFields = exports.equalDependencies = exports.deleteForPath = exports.customEqualForFun = exports.contrast = void 0;
8
+ exports.getAllNamePath = exports.findOptionByValue = exports.filterInternalFields = exports.equalDependencies = exports.diffField = exports.deleteForPath = exports.customEqualForFun = void 0;
9
9
  exports.getArrayBeforeNumber = getArrayBeforeNumber;
10
10
  exports.hasRowKey = exports.getLayout = exports.getDecimalDigits = void 0;
11
11
  exports.initialValuesToNames = initialValuesToNames;
@@ -124,7 +124,7 @@ var weedOutProps = exports.weedOutProps = function weedOutProps(data, keys) {
124
124
  return [obj, weedOut];
125
125
  };
126
126
  // 对比字段变化
127
- var contrast = exports.contrast = function contrast(prevValues, curValues, names) {
127
+ var diffField = exports.diffField = function diffField(prevValues, curValues, names) {
128
128
  return names.some(function (name) {
129
129
  return _lodash.default.get(prevValues, name) !== _lodash.default.get(curValues, name);
130
130
  });
@@ -6,5 +6,5 @@ interface TransformProps extends FormItemProps {
6
6
  namePath: any[];
7
7
  }
8
8
  type TransformFun = 'normalize' | 'getValueProps' | 'shouldUpdate' | 'name';
9
- declare const transformNames: (formItem: TransformProps, form: FormInstance, names: NamePath[], fieldName: string) => Pick<TransformProps, TransformFun>;
9
+ declare const transformNames: (formItem: TransformProps, form: FormInstance, names: NamePath[], fieldName: string, type?: string) => Pick<TransformProps, TransformFun>;
10
10
  export default transformNames;
@@ -6,17 +6,24 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _lodash = require("lodash");
8
8
  var _transformValue2 = require("./transformValue");
9
- var transformNames = function transformNames(formItem, form, names, fieldName) {
9
+ var transformNames = function transformNames(formItem, form, names, fieldName, type) {
10
+ var _names2, _names3, _names3$;
10
11
  var _ref = formItem || {},
11
12
  normalize = _ref.normalize,
12
13
  getValueProps = _ref.getValueProps,
13
14
  _shouldUpdate2 = _ref.shouldUpdate;
14
- if (!(names === null || names === void 0 ? void 0 : names.length)) {
15
+ var _names = names;
16
+ if (!((_names2 = _names) === null || _names2 === void 0 ? void 0 : _names2.length)) {
15
17
  return {};
16
18
  }
17
19
  // 当在formList场景下,给transformValue函数的setFiledProps的name, 需要全namePath
18
20
  var _fieldName = Array.isArray(formItem === null || formItem === void 0 ? void 0 : formItem.name) ? (0, _lodash.union)(formItem === null || formItem === void 0 ? void 0 : formItem.namePath, formItem === null || formItem === void 0 ? void 0 : formItem.name) : fieldName;
19
- var _transformValue = (0, _transformValue2.transformValue)(names, form, _fieldName, normalize, getValueProps),
21
+ if (type === 'Group' && (0, _lodash.isNumber)((_names3 = _names) === null || _names3 === void 0 ? void 0 : (_names3$ = _names3[0]) === null || _names3$ === void 0 ? void 0 : _names3$[0])) {
22
+ _names = _names.map(function (item) {
23
+ return (0, _lodash.union)(formItem === null || formItem === void 0 ? void 0 : formItem.namePath, item);
24
+ });
25
+ }
26
+ var _transformValue = (0, _transformValue2.transformValue)(_names, form, _fieldName, normalize, getValueProps),
20
27
  _normalize = _transformValue.normalize,
21
28
  _getValueProps = _transformValue.getValueProps,
22
29
  _shouldUpdate = _transformValue.shouldUpdate;
@@ -48,7 +48,7 @@ var transformValue = exports.transformValue = function transformValue(names, for
48
48
  }, cusRest);
49
49
  },
50
50
  shouldUpdate: function shouldUpdate(prevValues, curValues) {
51
- return (0, _utils.contrast)(prevValues, curValues, names);
51
+ return (0, _utils.diffField)(prevValues, curValues, names);
52
52
  }
53
53
  };
54
54
  };
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useChanged = void 0;
7
7
  var _antd = require("antd");
8
8
  var _lodash = require("lodash");
9
- var _contrastOriginal = require("./contrastOriginal");
9
+ var _diffOriginal = require("./diffOriginal");
10
10
  var useChanged = exports.useChanged = function useChanged(_ref) {
11
11
  var name = _ref.name,
12
12
  names = _ref.names,
@@ -21,11 +21,12 @@ var useChanged = exports.useChanged = function useChanged(_ref) {
21
21
  if (notWatch) form = [];
22
22
  var value = _antd.Form.useWatch(namesStr || name, form);
23
23
  if (notWatch) return [false];
24
- var changed = (0, _contrastOriginal.contrastOriginal)({
24
+ var changed = (0, _diffOriginal.diffOriginal)({
25
25
  originalValue: originalValue,
26
26
  value: value,
27
27
  form: form,
28
- equalWith: equalWith
28
+ equalWith: equalWith,
29
+ name: namesStr || name
29
30
  });
30
31
  return [changed, originalValue];
31
32
  };
@@ -1,7 +1,7 @@
1
1
  import { FormInstance } from 'antd';
2
2
  import { InternalNamePath, NamePath } from 'antd/lib/form/interface';
3
3
  interface Params {
4
- name?: NamePath;
4
+ name?: any;
5
5
  names?: NamePath[];
6
6
  namesStr?: NamePath;
7
7
  originalName?: NamePath;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useListChanged = void 0;
7
7
  var _antd = require("antd");
8
8
  var _lodash = require("lodash");
9
- var _contrastOriginal = require("./contrastOriginal");
9
+ var _diffOriginal = require("./diffOriginal");
10
10
  var toNamePath = function toNamePath(name) {
11
11
  if (Array.isArray(name)) {
12
12
  return name;
@@ -32,6 +32,7 @@ var getOriginalValue = function getOriginalValue(_ref) {
32
32
  var rowValueNamePath = namePath.slice(0, rowKeyPath.length - 1); // 表单中变动值所在行
33
33
  var rowKeyName = rowKeyPath[rowKeyPath.length - 1]; // rowKey在行内的name
34
34
  var rowValue = form.getFieldValue(rowValueNamePath);
35
+ if (!rowValue) return undefined;
35
36
  var keyValue = rowValue[rowKeyName]; // 获取表单中rowKey值
36
37
  if (!keyValue) return undefined;
37
38
  var originalValueList = (0, _lodash.get)(originalValues, originalName.slice(0, rowKeyPath.length - 2));
@@ -88,11 +89,12 @@ var useListChanged = exports.useListChanged = function useListChanged(params) {
88
89
  if (notWatch) _form = [];
89
90
  var value = _antd.Form.useWatch(namePath, _form);
90
91
  if (notWatch || noChange) return [false];
91
- var changed = (0, _contrastOriginal.contrastOriginal)({
92
+ var changed = (0, _diffOriginal.diffOriginal)({
92
93
  value: value,
93
94
  originalValue: originalValue,
94
95
  form: form,
95
- equalWith: equalWith
96
+ equalWith: equalWith,
97
+ name: namesStr || name
96
98
  });
97
99
  return [changed, originalValue];
98
100
  };
@@ -1,28 +1,33 @@
1
1
  declare const _default: {
2
2
  /** 年月日 */
3
- date: ({ type, toISOString }: {
3
+ date: ({ type, toISOString, mode }: {
4
4
  type: any;
5
5
  toISOString: any;
6
+ mode: any;
6
7
  }) => {};
7
8
  /** 年月日 时分秒 */
8
- dateTime: ({ type, toISOString }: {
9
+ dateTime: ({ type, toISOString, mode }: {
9
10
  type: any;
10
11
  toISOString: any;
12
+ mode: any;
11
13
  }) => {};
12
14
  /** 年月日 00:00:00 */
13
- dateStartTime: ({ type, toISOString }: {
15
+ dateStartTime: ({ type, toISOString, mode }: {
14
16
  type: any;
15
17
  toISOString: any;
18
+ mode: any;
16
19
  }) => {};
17
20
  /** 年月日 23:59:59 */
18
- dateEndTime: ({ type, toISOString }: {
21
+ dateEndTime: ({ type, toISOString, mode }: {
19
22
  type: any;
20
23
  toISOString: any;
24
+ mode: any;
21
25
  }) => {};
22
26
  /** 年月日 00:00:00 ~ 年月日 23:59:59 */
23
- dateStartEndTime: ({ type, toISOString }: {
27
+ dateStartEndTime: ({ type, toISOString, mode }: {
24
28
  type: any;
25
29
  toISOString: any;
30
+ mode: any;
26
31
  }) => {};
27
32
  /** 百分比 */
28
33
  percentage: ({ type, valueType }: {
@@ -160,51 +160,61 @@ var _default = exports.default = {
160
160
  /** 年月日 */
161
161
  date: function date(_ref3) {
162
162
  var type = _ref3.type,
163
- toISOString = _ref3.toISOString;
163
+ toISOString = _ref3.toISOString,
164
+ mode = _ref3.mode;
164
165
  return dateTransform({
165
166
  type: type,
166
167
  _valueType: 'date',
167
- toISOString: toISOString
168
+ toISOString: toISOString,
169
+ mode: mode
168
170
  });
169
171
  },
170
172
  /** 年月日 时分秒 */
171
173
  dateTime: function dateTime(_ref4) {
172
174
  var type = _ref4.type,
173
- toISOString = _ref4.toISOString;
175
+ toISOString = _ref4.toISOString,
176
+ mode = _ref4.mode;
174
177
  return dateTransform({
175
178
  type: type,
176
179
  _valueType: 'dateTime',
177
- toISOString: toISOString
180
+ toISOString: toISOString,
181
+ mode: mode
178
182
  });
179
183
  },
180
184
  /** 年月日 00:00:00 */
181
185
  dateStartTime: function dateStartTime(_ref5) {
182
186
  var type = _ref5.type,
183
- toISOString = _ref5.toISOString;
187
+ toISOString = _ref5.toISOString,
188
+ mode = _ref5.mode;
184
189
  return dateTransform({
185
190
  type: type,
186
191
  _valueType: 'dateStartTime',
187
- toISOString: toISOString
192
+ toISOString: toISOString,
193
+ mode: mode
188
194
  });
189
195
  },
190
196
  /** 年月日 23:59:59 */
191
197
  dateEndTime: function dateEndTime(_ref6) {
192
198
  var type = _ref6.type,
193
- toISOString = _ref6.toISOString;
199
+ toISOString = _ref6.toISOString,
200
+ mode = _ref6.mode;
194
201
  return dateTransform({
195
202
  type: type,
196
203
  _valueType: 'dateEndTime',
197
- toISOString: toISOString
204
+ toISOString: toISOString,
205
+ mode: mode
198
206
  });
199
207
  },
200
208
  /** 年月日 00:00:00 ~ 年月日 23:59:59 */
201
209
  dateStartEndTime: function dateStartEndTime(_ref7) {
202
210
  var type = _ref7.type,
203
- toISOString = _ref7.toISOString;
211
+ toISOString = _ref7.toISOString,
212
+ mode = _ref7.mode;
204
213
  return dateTransform({
205
214
  type: type,
206
215
  _valueType: 'dateStartEndTime',
207
- toISOString: toISOString
216
+ toISOString: toISOString,
217
+ mode: mode
208
218
  });
209
219
  },
210
220
  /** 百分比 */
@@ -1,4 +1,5 @@
1
1
  export declare const iconMap: {
2
2
  type: string;
3
- text: string;
3
+ 'text-cn': string;
4
+ 'text-en': string;
4
5
  }[];