@zat-design/sisyphus-react 3.6.9-beta.6 → 3.6.10-beta.1

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 (98) hide show
  1. package/coverage/lcov-report/src/.umi/core/devScripts.ts.html +241 -0
  2. package/coverage/lcov-report/src/.umi/core/history.ts.html +148 -0
  3. package/coverage/lcov-report/src/.umi/core/index.html +206 -0
  4. package/coverage/lcov-report/src/.umi/core/plugin.ts.html +109 -0
  5. package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +160 -0
  6. package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +97 -0
  7. package/coverage/lcov-report/src/.umi/core/routes.ts.html +26050 -0
  8. package/coverage/lcov-report/src/.umi/core/umiExports.ts.html +112 -0
  9. package/coverage/lcov-report/src/.umi/dumi/demos/index.html +116 -0
  10. package/coverage/lcov-report/src/.umi/dumi/demos/index.ts.html +6340 -0
  11. package/coverage/lcov-report/src/.umi/dumi/index.html +116 -0
  12. package/coverage/lcov-report/src/.umi/dumi/layout.tsx.html +109 -0
  13. package/coverage/lcov-report/src/.umi/index.html +116 -0
  14. package/coverage/lcov-report/src/.umi/plugin-antd/index.html +116 -0
  15. package/coverage/lcov-report/src/.umi/plugin-antd/runtime.tsx.html +172 -0
  16. package/coverage/lcov-report/src/.umi/plugin-helmet/exports.ts.html +94 -0
  17. package/coverage/lcov-report/src/.umi/plugin-helmet/index.html +116 -0
  18. package/coverage/lcov-report/src/.umi/plugin-initial-state/Provider.tsx.html +196 -0
  19. package/coverage/lcov-report/src/.umi/plugin-initial-state/exports.ts.html +106 -0
  20. package/coverage/lcov-report/src/.umi/plugin-initial-state/index.html +146 -0
  21. package/coverage/lcov-report/src/.umi/plugin-initial-state/models/index.html +116 -0
  22. package/coverage/lcov-report/src/.umi/plugin-initial-state/models/initialState.ts.html +88 -0
  23. package/coverage/lcov-report/src/.umi/plugin-initial-state/runtime.tsx.html +124 -0
  24. package/coverage/lcov-report/src/.umi/plugin-locale/SelectLang.tsx.html +1246 -0
  25. package/coverage/lcov-report/src/.umi/plugin-locale/index.html +161 -0
  26. package/coverage/lcov-report/src/.umi/plugin-locale/locale.tsx.html +268 -0
  27. package/coverage/lcov-report/src/.umi/plugin-locale/localeExports.ts.html +778 -0
  28. package/coverage/lcov-report/src/.umi/plugin-locale/runtime.tsx.html +115 -0
  29. package/coverage/lcov-report/src/.umi/plugin-model/Provider.tsx.html +202 -0
  30. package/coverage/lcov-report/src/.umi/plugin-model/helpers/constant.tsx.html +97 -0
  31. package/coverage/lcov-report/src/.umi/plugin-model/helpers/dispatcher.tsx.html +142 -0
  32. package/coverage/lcov-report/src/.umi/plugin-model/helpers/executor.tsx.html +334 -0
  33. package/coverage/lcov-report/src/.umi/plugin-model/helpers/index.html +146 -0
  34. package/coverage/lcov-report/src/.umi/plugin-model/index.html +146 -0
  35. package/coverage/lcov-report/src/.umi/plugin-model/runtime.tsx.html +121 -0
  36. package/coverage/lcov-report/src/.umi/plugin-model/useModel.tsx.html +298 -0
  37. package/coverage/lcov-report/src/.umi/plugin-request/index.html +116 -0
  38. package/coverage/lcov-report/src/.umi/plugin-request/request.ts.html +919 -0
  39. package/coverage/lcov-report/src/.umi/umi.ts.html +268 -0
  40. package/dist/index.esm.css +41 -41
  41. package/dist/less.esm.css +41 -41
  42. package/es/ProEditTable/components/RenderField/index.js +46 -26
  43. package/es/ProForm/components/combination/ProCascader/index.js +14 -8
  44. package/es/ProForm/components/render/Render.js +39 -25
  45. package/es/ProForm/style/index.less +52 -52
  46. package/es/ProForm/utils/diffOriginal.d.ts +1 -0
  47. package/es/ProForm/utils/diffOriginal.js +27 -4
  48. package/es/ProForm/utils/index.d.ts +0 -6
  49. package/es/ProForm/utils/index.js +8 -57
  50. package/es/ProForm/utils/useChanged.js +2 -1
  51. package/es/ProForm/utils/useListChanged.js +3 -3
  52. package/es/ProTable/components/FormatColumn/index.js +16 -0
  53. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.d.ts +6 -1
  54. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +176 -40
  55. package/es/ProTable/components/RcTable/components/DraggableTable/index.js +20 -1
  56. package/es/ProTable/index.js +12 -2
  57. package/es/ProTable/propsType.d.ts +29 -0
  58. package/es/ProThemeTools/component/{ProTools → PrdTools}/index.d.ts +2 -2
  59. package/es/ProThemeTools/component/{ProTools → PrdTools}/index.js +2 -2
  60. package/es/ProThemeTools/component/index.d.ts +2 -1
  61. package/es/ProThemeTools/component/index.js +2 -1
  62. package/es/ProThemeTools/index.js +2 -2
  63. package/es/ProThemeTools/style/index.less +1 -1
  64. package/es/ProTreeModal/components/List.js +30 -4
  65. package/lib/ProEditTable/components/RenderField/index.js +41 -25
  66. package/lib/ProForm/components/combination/ProCascader/index.js +12 -6
  67. package/lib/ProForm/components/render/Render.js +37 -25
  68. package/lib/ProForm/style/index.less +52 -52
  69. package/lib/ProForm/utils/diffOriginal.d.ts +1 -0
  70. package/lib/ProForm/utils/diffOriginal.js +27 -3
  71. package/lib/ProForm/utils/index.d.ts +0 -6
  72. package/lib/ProForm/utils/index.js +8 -59
  73. package/lib/ProForm/utils/useChanged.js +2 -1
  74. package/lib/ProForm/utils/useListChanged.js +2 -2
  75. package/lib/ProTable/components/FormatColumn/index.js +16 -0
  76. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.d.ts +6 -1
  77. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +176 -40
  78. package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +19 -1
  79. package/lib/ProTable/index.js +12 -2
  80. package/lib/ProTable/propsType.d.ts +29 -0
  81. package/lib/ProThemeTools/component/{ProTools → PrdTools}/index.d.ts +2 -2
  82. package/lib/ProThemeTools/component/{ProTools → PrdTools}/index.js +2 -2
  83. package/lib/ProThemeTools/component/index.d.ts +2 -1
  84. package/lib/ProThemeTools/component/index.js +3 -3
  85. package/lib/ProThemeTools/index.js +1 -1
  86. package/lib/ProThemeTools/style/index.less +1 -1
  87. package/lib/ProTreeModal/components/List.js +30 -4
  88. package/package.json +1 -1
  89. package/es/ProEditTable/components/RenderField/ListChanged.d.ts +0 -16
  90. package/es/ProEditTable/components/RenderField/ListChanged.js +0 -124
  91. package/es/ProForm/components/render/Changed.d.ts +0 -14
  92. package/es/ProForm/components/render/Changed.js +0 -64
  93. package/lib/ProEditTable/components/RenderField/ListChanged.d.ts +0 -16
  94. package/lib/ProEditTable/components/RenderField/ListChanged.js +0 -129
  95. package/lib/ProForm/components/render/Changed.d.ts +0 -14
  96. package/lib/ProForm/components/render/Changed.js +0 -69
  97. /package/es/ProThemeTools/component/{ProTools → PrdTools}/style/index.less +0 -0
  98. /package/lib/ProThemeTools/component/{ProTools → PrdTools}/style/index.less +0 -0
@@ -1,5 +1,7 @@
1
1
  import "antd/es/col/style";
2
2
  import _Col from "antd/es/col";
3
+ import "antd/es/tooltip/style";
4
+ import _Tooltip from "antd/es/tooltip";
3
5
  import "antd/es/space/style";
4
6
  import _Space from "antd/es/space";
5
7
  import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
@@ -11,6 +13,7 @@ import "antd/es/form/style";
11
13
  import _Form from "antd/es/form";
12
14
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
13
15
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
16
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
14
17
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
15
18
  var _excluded = ["labelWidth", "hiddenNames", "trim", "upperCase", "className", "rules", "required", "labelRequired", "tooltip"];
16
19
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
@@ -25,10 +28,10 @@ import { isTrim, isUpperCase, findOptionByValue, parseNamePath } from '../../uti
25
28
  import { useProConfig } from '../../../ProConfigProvider';
26
29
  import transformNames from '../../utils/transformNames';
27
30
  import valueTypeMap from '../../utils/valueType';
31
+ import { useChanged } from '../../utils/useChanged';
28
32
  import tipSvg from '../../../assets/tip.svg';
29
33
  import useRules from '../../utils/useRules';
30
34
  import ConfirmWrapper from './ConfirmWrapper';
31
- import Changed from './Changed';
32
35
  // 这个组件只管渲染, 参数的整理在外部处理
33
36
  var Render = function Render(props) {
34
37
  var _ref2, _ref3, _ref4, _ref5, _otherProps$names2;
@@ -98,6 +101,18 @@ var Render = function Render(props) {
98
101
  return Array.isArray(name) ? name.join('_') : name;
99
102
  }).join('-');
100
103
  }, [otherProps === null || otherProps === void 0 ? void 0 : otherProps.names]);
104
+ // 判断当前字段是否变更
105
+ var _useChanged = useChanged({
106
+ name: formItemProps.name,
107
+ names: otherProps.names,
108
+ namesStr: namesStr,
109
+ originalValues: originalValues,
110
+ form: form,
111
+ equalWith: equalWith
112
+ }),
113
+ _useChanged2 = _slicedToArray(_useChanged, 2),
114
+ changed = _useChanged2[0],
115
+ originalValue = _useChanged2[1];
101
116
  var internalRule = useRules({
102
117
  names: otherProps.names,
103
118
  label: otherFormItemProps.label,
@@ -169,7 +184,7 @@ var Render = function Render(props) {
169
184
  var lastComponentProps = _objectSpread(_objectSpread(_objectSpread({}, componentProps), _fieldProps), {}, {
170
185
  disabled: lastDisabled
171
186
  });
172
- var _className = classNames(_defineProperty(_defineProperty({}, className, className), 'pro-form-item-width-auto', ['Switch'].includes(type)));
187
+ var _className = classNames(_defineProperty(_defineProperty(_defineProperty({}, className, className), 'pro-form-item-changed', changed), 'pro-form-item-width-auto', ['Switch'].includes(type)));
173
188
  if (formItemProps.hidden === true || _show === false) {
174
189
  // 为了监听shouldUpdate 必须存在一个FormItem, 空Input解决 【[antd: Form.Item] `name` is only used for validate React element】
175
190
  return _jsx(_Form.Item, {
@@ -431,17 +446,7 @@ var Render = function Render(props) {
431
446
  // @ts-ignore
432
447
  _internalItemRender: internalItemRender,
433
448
  className: _className,
434
- children: _jsx(Changed, {
435
- name: formItemProps.name,
436
- names: otherProps.names,
437
- namesStr: namesStr,
438
- originalValues: originalValues,
439
- form: form,
440
- equalWith: equalWith,
441
- originalDiffTip: originalDiffTip,
442
- type: type,
443
- children: child
444
- })
449
+ children: child
445
450
  }));
446
451
  var formItem = orgFormItem;
447
452
  // 当存在shouldUpdate时捕获所有form变更(防止表单onchange设置form值时无法更新的问题)
@@ -457,23 +462,32 @@ var Render = function Render(props) {
457
462
  // @ts-ignore
458
463
  _internalItemRender: internalItemRender,
459
464
  className: _className,
460
- children: _jsx(Changed, {
461
- name: formItemProps.name,
462
- names: otherProps.names,
463
- namesStr: namesStr,
464
- originalValues: originalValues,
465
- form: form,
466
- equalWith: equalWith,
467
- originalDiffTip: originalDiffTip,
468
- type: type,
469
- children: child
470
- })
465
+ children: child
471
466
  }));
472
467
  }
473
468
  })
474
469
  });
475
470
  }
476
- return formItem;
471
+ // 不渲染tooltip
472
+ if (!originalDiffTip || ['FormList', 'ProEditTable'].includes(type)) {
473
+ return formItem;
474
+ }
475
+ var title = _jsxs(_Space, {
476
+ children: ["\u521D\u59CB\u503C\uFF1A", /*#__PURE__*/React.cloneElement(child, _objectSpread(_objectSpread({}, child), {}, {
477
+ isView: true,
478
+ value: originalValue,
479
+ checked: type === 'Switch' ? originalValue : undefined
480
+ }))]
481
+ });
482
+ return _jsx(_Tooltip, {
483
+ title: title,
484
+ open: changed ? undefined : false,
485
+ // open={true}
486
+ getPopupContainer: function getPopupContainer(target) {
487
+ return target.parentElement;
488
+ },
489
+ children: formItem
490
+ });
477
491
  };
478
492
  var FormItem = _jsxs(_Fragment, {
479
493
  children: [renderItem(), (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$names2 = otherProps.names) === null || _otherProps$names2 === void 0 ? void 0 : _otherProps$names2.length) ? otherProps.names.map(function (name) {
@@ -116,6 +116,58 @@
116
116
  }
117
117
  }
118
118
 
119
+ // 比较原始值场景下 不同时的样式
120
+ &.pro-form-item-changed {
121
+ span.@{ant-prefix}-input-affix-wrapper,
122
+ .@{ant-prefix}-select .@{ant-prefix}-select-selector,
123
+ .@{ant-prefix}-picker,
124
+ .@{ant-prefix}-input-number {
125
+ background: @zaui-contract-bg !important;
126
+
127
+ input {
128
+ background: transparent;
129
+ }
130
+ .@{ant-prefix}-select-selection-placeholder {
131
+ z-index: 9;
132
+ }
133
+ }
134
+
135
+ .@{ant-prefix}-form-item-control:has(.@{ant-prefix}-switch-handle),
136
+ .@{ant-prefix}-form-item-control:has(.@{ant-prefix}-checkbox-wrapper-in-form-item) {
137
+ background: @zaui-contract-bg;
138
+ border-radius: 4px;
139
+ }
140
+
141
+ // 地址组件
142
+ .@{ant-prefix}-form-item-control-input-content {
143
+ // 查看模式
144
+ & > span {
145
+ border-radius: 4px;
146
+ padding: 5px 8px;
147
+ background: @zaui-contract-bg;
148
+ }
149
+
150
+ & > .pro-address {
151
+ .@{ant-prefix}-select-selector,
152
+ .@{ant-prefix}-input-affix-wrapper,
153
+ .@{ant-prefix}-input-disabled {
154
+ background: @zaui-contract-bg;
155
+ }
156
+ }
157
+ & > .@{ant-prefix}-input-group {
158
+ .forever-checkbox {
159
+ background: @zaui-contract-bg;
160
+ }
161
+ }
162
+ }
163
+
164
+ .pro-form-view-container {
165
+ padding: 4px 8px;
166
+ background: @zaui-contract-bg;
167
+ border-radius: 4px;
168
+ }
169
+ }
170
+
119
171
  .@{ant-prefix}-row {
120
172
  width: 100%;
121
173
  }
@@ -321,56 +373,4 @@
321
373
  }
322
374
  }
323
375
  }
324
-
325
- // 比较原始值场景下 不同时的样式
326
- .pro-form-item-changed {
327
- span.@{ant-prefix}-input-affix-wrapper,
328
- .@{ant-prefix}-select .@{ant-prefix}-select-selector,
329
- .@{ant-prefix}-picker,
330
- .@{ant-prefix}-input-number {
331
- background: @zaui-contract-bg !important;
332
-
333
- input {
334
- background: transparent !important;
335
- }
336
- .@{ant-prefix}-select-selection-placeholder {
337
- z-index: 9;
338
- }
339
- }
340
-
341
- .@{ant-prefix}-form-item-control:has(.@{ant-prefix}-switch-handle),
342
- .@{ant-prefix}-form-item-control:has(.@{ant-prefix}-checkbox-wrapper-in-form-item) {
343
- background: @zaui-contract-bg;
344
- border-radius: 4px;
345
- }
346
-
347
- // 地址组件
348
- .@{ant-prefix}-form-item-control-input-content {
349
- // 查看模式
350
- & > span {
351
- border-radius: 4px;
352
- padding: 5px 8px;
353
- background: @zaui-contract-bg;
354
- }
355
-
356
- & > .pro-address {
357
- .@{ant-prefix}-select-selector,
358
- .@{ant-prefix}-input-affix-wrapper,
359
- .@{ant-prefix}-input-disabled {
360
- background: @zaui-contract-bg;
361
- }
362
- }
363
- & > .@{ant-prefix}-input-group {
364
- .forever-checkbox {
365
- background: @zaui-contract-bg;
366
- }
367
- }
368
- }
369
-
370
- .pro-form-view-container {
371
- padding: 4px 8px;
372
- background: @zaui-contract-bg;
373
- border-radius: 4px;
374
- }
375
- }
376
376
  }
@@ -3,6 +3,7 @@ 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
9
  export declare const diffOriginal: (params: Params) => boolean;
@@ -1,9 +1,31 @@
1
- import { isEqual, isFunction } from 'lodash';
1
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
+ import { isEqual, isFunction, isString } from 'lodash';
2
3
  var nullValue = [null, undefined, '']; // 输入框空值时可能存在的三种值 视为相等
4
+ /** 将解构后的name值,反向转回names,例如 formData {a:1, b:2} names ['a', 'b'] 返回 [1,2] */
5
+ var extractValues = function extractValues(form, pathString) {
6
+ var _pathString;
7
+ var result = [];
8
+ var PrefixesName = isString(pathString) ? [] : pathString.slice(0, -1);
9
+ if (isString(pathString)) {
10
+ pathString.split('-').forEach(function (item) {
11
+ result.push(form.getFieldValue([].concat(_toConsumableArray(PrefixesName), [item])));
12
+ });
13
+ return result;
14
+ }
15
+ (_pathString = pathString[pathString.length - 1]) === null || _pathString === void 0 ? void 0 : _pathString.split('-').forEach(function (item) {
16
+ result.push(form.getFieldValue([].concat(_toConsumableArray(PrefixesName), [item])));
17
+ });
18
+ return result;
19
+ };
3
20
  export var diffOriginal = function diffOriginal(params) {
21
+ var _name$join;
4
22
  var originalValue = params.originalValue,
5
- value = params.value,
6
- equalWith = params.equalWith;
23
+ _value = params.value,
24
+ equalWith = params.equalWith,
25
+ form = params.form,
26
+ name = params.name;
27
+ var isNames = Array.isArray(name) && ((_name$join = name.join(',')) === null || _name$join === void 0 ? void 0 : _name$join.includes('-')) || (name === null || name === void 0 ? void 0 : name.includes('-'));
28
+ var value = !isNames ? _value : extractValues(form, name);
7
29
  // 支持传入自定义比较事件
8
30
  if (isFunction(equalWith)) {
9
31
  return !equalWith(originalValue, value);
@@ -18,7 +40,8 @@ export var diffOriginal = function diffOriginal(params) {
18
40
  });
19
41
  }
20
42
  if (!nullValue.includes(value) || !nullValue.includes(originalValue)) {
21
- return !isEqual(value, originalValue);
43
+ var res = !isEqual(value, originalValue);
44
+ return res;
22
45
  }
23
46
  return false;
24
47
  };
@@ -50,12 +50,6 @@ export declare const isNullArray: (arr: any) => boolean;
50
50
  */
51
51
  export declare const isEmptyArray: (arr: any) => boolean;
52
52
  export declare function toArray<T>(value?: T | T[] | null): T[];
53
- /**
54
- * names值合并
55
- * @param obj AnyObject
56
- * @returns AnyObject
57
- */
58
- export declare function processHyphenKeys(obj: AnyObject): AnyObject;
59
53
  /**
60
54
  * 初始化值names值合并
61
55
  * @param obj AnyObject
@@ -1,11 +1,10 @@
1
- import _typeof from "@babel/runtime/helpers/esm/typeof";
2
1
  import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
3
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _typeof from "@babel/runtime/helpers/esm/typeof";
4
3
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
5
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
6
5
  import React, { useState } from 'react';
7
6
  import moment from 'moment';
8
- import _, { isObject, isFunction, cloneDeep, get, set, omit, isNaN } from 'lodash';
7
+ import _, { isObject, isFunction, get, set, omit, isNaN } from 'lodash';
9
8
  export var getLayout = function getLayout(params) {
10
9
  var _params$span = params.span,
11
10
  span = _params$span === void 0 ? 8 : _params$span,
@@ -249,54 +248,6 @@ export function toArray(value) {
249
248
  }
250
249
  return Array.isArray(value) ? value : [value];
251
250
  }
252
- /**
253
- * names值合并
254
- * @param obj AnyObject
255
- * @returns AnyObject
256
- */
257
- export function processHyphenKeys(obj) {
258
- var newObj = _objectSpread({}, obj);
259
- var keys = Object.keys(obj);
260
- for (var _i = 0, _keys = keys; _i < _keys.length; _i++) {
261
- var key = _keys[_i];
262
- if (key.includes('-')) {
263
- var keyParts = key.split('-');
264
- var shouldCombine = true;
265
- var combinedArray = [];
266
- var _iterator = _createForOfIteratorHelper(keyParts),
267
- _step;
268
- try {
269
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
270
- var part = _step.value;
271
- if (obj.hasOwnProperty(part)) {
272
- combinedArray.push(obj[part]);
273
- } else {
274
- shouldCombine = false;
275
- break;
276
- }
277
- }
278
- } catch (err) {
279
- _iterator.e(err);
280
- } finally {
281
- _iterator.f();
282
- }
283
- if (shouldCombine) {
284
- newObj[key] = combinedArray;
285
- } else {
286
- newObj[key] = undefined;
287
- }
288
- }
289
- // 匹配数组的namePath,只匹配到1层
290
- if (key.includes('_')) {
291
- var _keyParts = key.split('_')[0];
292
- // 校验值是否存在,解决names多传额外空值报错
293
- newObj[key] = isObject(newObj[_keyParts]) ? Object.values(newObj[_keyParts]).filter(function (val) {
294
- return val !== null && val !== undefined && val !== '';
295
- }) : [];
296
- }
297
- }
298
- return cloneDeep(newObj);
299
- }
300
251
  /**
301
252
  * 初始化值names值合并
302
253
  * @param obj AnyObject
@@ -464,11 +415,11 @@ export var parseNamePath = function parseNamePath(input) {
464
415
  };
465
416
  /** 解析namePath */
466
417
  export function findNamesKeyInArray(arr, key) {
467
- var _iterator2 = _createForOfIteratorHelper(arr),
468
- _step2;
418
+ var _iterator = _createForOfIteratorHelper(arr),
419
+ _step;
469
420
  try {
470
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
471
- var item = _step2.value;
421
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
422
+ var item = _step.value;
472
423
  if (!item.includes('_')) {
473
424
  return null;
474
425
  }
@@ -477,9 +428,9 @@ export function findNamesKeyInArray(arr, key) {
477
428
  }
478
429
  }
479
430
  } catch (err) {
480
- _iterator2.e(err);
431
+ _iterator.e(err);
481
432
  } finally {
482
- _iterator2.f();
433
+ _iterator.f();
483
434
  }
484
435
  return null;
485
436
  }
@@ -19,7 +19,8 @@ export var useChanged = function useChanged(_ref) {
19
19
  originalValue: originalValue,
20
20
  value: value,
21
21
  form: form,
22
- equalWith: equalWith
22
+ equalWith: equalWith,
23
+ name: namesStr || name
23
24
  });
24
25
  return [changed, originalValue];
25
26
  };
@@ -1,6 +1,6 @@
1
1
  import "antd/es/form/style";
2
2
  import _Form from "antd/es/form";
3
- import { get } from 'lodash';
3
+ import { get, isString } from 'lodash';
4
4
  import { diffOriginal } from './diffOriginal';
5
5
  var toNamePath = function toNamePath(name) {
6
6
  if (Array.isArray(name)) {
@@ -86,8 +86,8 @@ export var useListChanged = function useListChanged(params) {
86
86
  value: value,
87
87
  originalValue: originalValue,
88
88
  form: form,
89
- equalWith: equalWith
90
- // name: isString(namesStr) ? namesStr : originalName || name,
89
+ equalWith: equalWith,
90
+ name: isString(namesStr) ? namesStr : originalName || name
91
91
  });
92
92
  return [changed, originalValue];
93
93
  };
@@ -191,6 +191,22 @@ export var formatColumn = function formatColumn(column, originalObj, dataSourceO
191
191
  var renderValue = getEnumLabel(realCode, value, valueType === 'enumCodeName');
192
192
  var originalValue = getOriginalValue(value, record, originalObj, rowKey, dataIndex);
193
193
  var originalRenderValue = getEnumLabel(realCode, originalValue, valueType === 'enumCodeName');
194
+ if (Array.isArray(column === null || column === void 0 ? void 0 : column.codeValues) && !realCode) {
195
+ var _column$codeValues$fi;
196
+ var labelName = column === null || column === void 0 ? void 0 : (_column$codeValues$fi = column.codeValues.find(function (item) {
197
+ return item.value === value;
198
+ })) === null || _column$codeValues$fi === void 0 ? void 0 : _column$codeValues$fi.label;
199
+ if (valueType === 'enumName') {
200
+ renderValue = _jsx(_Fragment, {
201
+ children: labelName || '-'
202
+ });
203
+ }
204
+ if (valueType === 'enumCodeName') {
205
+ renderValue = _jsx(_Fragment, {
206
+ children: labelName ? "".concat(value, "-").concat(labelName) : labelName
207
+ });
208
+ }
209
+ }
194
210
  var node = _jsxs(_Space, {
195
211
  size: 8,
196
212
  children: [prefixNode(value, record, index), renderValue, suffixNode(value, record, index)]
@@ -5,12 +5,17 @@ interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
5
5
  disabled?: boolean;
6
6
  }
7
7
  export declare const Row: FC<RowProps>;
8
- declare const DndWrapper: ({ draggable, value, onChange, disabled, children, rowKey }: {
8
+ declare const DndWrapper: ({ draggable, value, onChange, disabled, children, rowKey, onDragStartGuard, onDragMoveGuard, onDragOverGuard, onDragEndGuard, onDragCancelGuard, }: {
9
9
  draggable: any;
10
10
  value: any;
11
11
  onChange: any;
12
12
  disabled: any;
13
13
  children: any;
14
14
  rowKey: any;
15
+ onDragStartGuard: any;
16
+ onDragMoveGuard: any;
17
+ onDragOverGuard: any;
18
+ onDragEndGuard: any;
19
+ onDragCancelGuard: any;
15
20
  }) => any;
16
21
  export default DndWrapper;