@zat-design/sisyphus-react 3.8.0 → 3.8.2

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 (110) hide show
  1. package/.vscode/extensions.json +5 -0
  2. package/dist/index.esm.css +8 -52
  3. package/dist/less.esm.css +8 -52
  4. package/es/ProAction/index.js +1 -1
  5. package/es/ProDownload/index.js +3 -3
  6. package/es/ProDownload/utils.js +3 -3
  7. package/es/ProDrawerForm/components/ProDrawer/index.js +4 -4
  8. package/es/ProDrawerForm/components/ProModal/index.js +3 -3
  9. package/es/ProEditLabel/index.js +3 -3
  10. package/es/ProEditTable/components/ActionButton/index.js +3 -3
  11. package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -5
  12. package/es/ProEditTable/components/RenderField/index.js +9 -9
  13. package/es/ProEditTable/components/RenderToolbar/index.js +1 -1
  14. package/es/ProEditTable/index.js +9 -5
  15. package/es/ProEditTable/style/index.less +2 -1
  16. package/es/ProEditTable/utils/config.js +2 -2
  17. package/es/ProEditTable/utils/index.js +5 -5
  18. package/es/ProEditTable/utils/tools.js +1 -1
  19. package/es/ProEnum/hooks/useEnumRequest.js +2 -2
  20. package/es/ProEnum/index.js +1 -1
  21. package/es/ProForm/components/FormFooter/index.js +6 -4
  22. package/es/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
  23. package/es/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
  24. package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +1 -1
  25. package/es/ProForm/components/combination/FormList/utils.js +1 -1
  26. package/es/ProForm/components/combination/Group/component/ComRender.js +1 -1
  27. package/es/ProForm/components/combination/Group/utils.js +8 -1
  28. package/es/ProForm/components/combination/ProCascader/index.js +6 -3
  29. package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +1 -1
  30. package/es/ProForm/components/combination/ProModalSelect/index.js +12 -6
  31. package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +1 -0
  32. package/es/ProForm/components/combination/ProNumberRange/index.js +51 -47
  33. package/es/ProForm/components/combination/ProNumberRange/style/index.less +51 -56
  34. package/es/ProForm/components/old/ProAddress/index.js +1 -1
  35. package/es/ProForm/components/render/ChangedWrapper.js +5 -3
  36. package/es/ProForm/components/render/ConfirmWrapper.js +1 -1
  37. package/es/ProForm/components/render/Render.js +4 -3
  38. package/es/ProForm/components/render/propsType.d.ts +1 -1
  39. package/es/ProForm/index.js +1 -1
  40. package/es/ProForm/utils/useForm.js +1 -1
  41. package/es/ProForm/utils/useShouldUpdate.d.ts +2 -2
  42. package/es/ProForm/utils/useShouldUpdate.js +1 -1
  43. package/es/ProStep/components/Listener/index.js +1 -1
  44. package/es/ProStep/index.js +3 -3
  45. package/es/ProTable/components/FormatColumn/index.d.ts +2 -1
  46. package/es/ProTable/components/FormatColumn/index.js +12 -9
  47. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +2 -2
  48. package/es/ProTable/hooks/useAntdTable.js +3 -3
  49. package/es/ProTable/index.js +13 -3
  50. package/es/ProTable/propsType.d.ts +4 -0
  51. package/es/ProTree/components/ProTree.js +1 -1
  52. package/es/ProTree/components/ProTreeSelect/index.js +10 -0
  53. package/es/ProTree/components/Tree.js +1 -1
  54. package/es/ProUpload/components/ImageRender.js +1 -1
  55. package/es/ProViewer/index.js +2 -2
  56. package/es/old/ProEditableTable/index.js +4 -4
  57. package/lib/ProAction/index.js +1 -1
  58. package/lib/ProDownload/index.js +3 -3
  59. package/lib/ProDownload/utils.js +3 -3
  60. package/lib/ProDrawerForm/components/ProDrawer/index.js +4 -4
  61. package/lib/ProDrawerForm/components/ProModal/index.js +3 -3
  62. package/lib/ProEditLabel/index.js +3 -3
  63. package/lib/ProEditTable/components/ActionButton/index.js +3 -3
  64. package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -5
  65. package/lib/ProEditTable/components/RenderField/index.js +9 -9
  66. package/lib/ProEditTable/components/RenderToolbar/index.js +1 -1
  67. package/lib/ProEditTable/index.js +9 -5
  68. package/lib/ProEditTable/style/index.less +2 -1
  69. package/lib/ProEditTable/utils/config.js +2 -2
  70. package/lib/ProEditTable/utils/index.js +5 -5
  71. package/lib/ProEditTable/utils/tools.js +1 -1
  72. package/lib/ProEnum/hooks/useEnumRequest.js +2 -2
  73. package/lib/ProEnum/index.js +1 -1
  74. package/lib/ProForm/components/FormFooter/index.js +5 -3
  75. package/lib/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
  76. package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
  77. package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +1 -1
  78. package/lib/ProForm/components/combination/FormList/utils.js +1 -1
  79. package/lib/ProForm/components/combination/Group/component/ComRender.js +1 -1
  80. package/lib/ProForm/components/combination/Group/utils.js +8 -1
  81. package/lib/ProForm/components/combination/ProCascader/index.js +6 -3
  82. package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +1 -1
  83. package/lib/ProForm/components/combination/ProModalSelect/index.js +12 -6
  84. package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +1 -0
  85. package/lib/ProForm/components/combination/ProNumberRange/index.js +45 -45
  86. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +51 -56
  87. package/lib/ProForm/components/old/ProAddress/index.js +1 -1
  88. package/lib/ProForm/components/render/ChangedWrapper.js +5 -3
  89. package/lib/ProForm/components/render/ConfirmWrapper.js +1 -1
  90. package/lib/ProForm/components/render/Render.js +4 -3
  91. package/lib/ProForm/components/render/propsType.d.ts +1 -1
  92. package/lib/ProForm/index.js +1 -1
  93. package/lib/ProForm/utils/useForm.js +1 -1
  94. package/lib/ProForm/utils/useShouldUpdate.d.ts +2 -2
  95. package/lib/ProForm/utils/useShouldUpdate.js +1 -1
  96. package/lib/ProStep/components/Listener/index.js +1 -1
  97. package/lib/ProStep/index.js +3 -3
  98. package/lib/ProTable/components/FormatColumn/index.d.ts +2 -1
  99. package/lib/ProTable/components/FormatColumn/index.js +12 -9
  100. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +2 -2
  101. package/lib/ProTable/hooks/useAntdTable.js +3 -3
  102. package/lib/ProTable/index.js +13 -3
  103. package/lib/ProTable/propsType.d.ts +4 -0
  104. package/lib/ProTree/components/ProTree.js +1 -1
  105. package/lib/ProTree/components/ProTreeSelect/index.js +10 -0
  106. package/lib/ProTree/components/Tree.js +1 -1
  107. package/lib/ProUpload/components/ImageRender.js +1 -1
  108. package/lib/ProViewer/index.js +2 -2
  109. package/lib/old/ProEditableTable/index.js +4 -4
  110. package/package.json +4 -5
@@ -0,0 +1,5 @@
1
+ {
2
+ "recommendations": [
3
+ "kisstkondoros.vscode-codemetrics"
4
+ ]
5
+ }
@@ -2339,8 +2339,6 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
2339
2339
  .pro-number-range .range-split {
2340
2340
  width: 32px !important;
2341
2341
  text-align: center !important;
2342
- border-right: 0px;
2343
- border-left: 0px;
2344
2342
  pointer-events: none;
2345
2343
  }
2346
2344
  .pro-number-range .range-split.ant-input[disabled] {
@@ -2349,60 +2347,18 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
2349
2347
  .pro-number-range .ant-input-number-status-error:not(.ant-input-number-disabled):not( .ant-input-number-borderless).ant-input-number {
2350
2348
  border-color: var(--zaui-danger, #ff5050) !important;
2351
2349
  }
2352
- .pro-number-range .ant-input-status-error.range-split {
2353
- color: var(--zaui-danger, #ff5050) !important;
2350
+ .pro-number-range:has(.ant-input-status-error):not(.pro-number-range-disabled) .range-split,
2351
+ .pro-number-range:has(.ant-input-status-error):not(.pro-number-range-disabled) .range-addon-before,
2352
+ .pro-number-range:has(.ant-input-status-error):not(.pro-number-range-disabled) .range-addon-after {
2354
2353
  border-color: var(--zaui-danger, #ff5050);
2355
2354
  }
2356
- .pro-number-range .ant-input-rtl.range-right {
2357
- border-right-width: 0;
2358
- }
2359
- .pro-number-range .ant-input-rtl.range-right:hover,
2360
- .pro-number-range .ant-input-rtl.range-right:focus {
2361
- border-right-width: 1px;
2362
- }
2363
2355
  .pro-number-range .ant-form-item {
2364
2356
  margin-bottom: 0;
2365
2357
  }
2366
- .pro-number-range .range-left,
2367
- .pro-number-range .range-right {
2368
- width: calc(50% - 16px);
2369
- text-align: center;
2370
- -webkit-transition: none;
2371
- transition: none;
2372
- }
2373
- .pro-number-range .range-left .range-left,
2374
- .pro-number-range .range-right .range-left {
2375
- width: calc(100% + 2px) !important;
2376
- }
2377
- .pro-number-range .range-left .ant-input-number {
2378
- border-right: none;
2379
- }
2380
- .pro-number-range .range-right .ant-input-number {
2381
- border-left: none;
2382
- }
2383
- .pro-number-range .range-right .range-right {
2384
- width: 100%;
2385
- border-top-left-radius: 0;
2386
- border-bottom-left-radius: 0;
2387
- }
2388
- .pro-number-range.ant-input-group.ant-input-group-compact > *:not(:last-child) {
2389
- margin-right: 0;
2390
- }
2391
- .pro-number-range > *:first-child {
2392
- border-top-right-radius: 0 !important;
2393
- border-bottom-right-radius: 0 !important;
2394
- }
2395
- .pro-number-range > *:first-child > .ant-select-selector {
2396
- border-top-right-radius: 0 !important;
2397
- border-bottom-right-radius: 0 !important;
2398
- }
2399
- .pro-number-range > *:last-child {
2400
- border-top-left-radius: 0 !important;
2401
- border-bottom-left-radius: 0 !important;
2402
- }
2403
- .pro-number-range > *:last-child > .ant-select-selector {
2404
- border-top-left-radius: 0 !important;
2405
- border-bottom-left-radius: 0 !important;
2358
+ .pro-number-range .range-addon-before,
2359
+ .pro-number-range .range-addon-after {
2360
+ color: var(--zaui-disabled-text);
2361
+ pointer-events: none;
2406
2362
  }
2407
2363
  .pro-modal-select .ant-input-group-wrapper .close-icon,
2408
2364
  .pro-tree-modal .ant-input-group-wrapper .close-icon {
@@ -4605,7 +4561,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
4605
4561
  .pro-edit-table .is-new-row.ant-table-row:hover td,
4606
4562
  .pro-edit-table .is-new-row .ant-table-cell-row-hover,
4607
4563
  .pro-edit-table .is-new-row.ant-table-row:hover .ant-table-cell-row-hover {
4608
- background: var(--ant-primary-2) !important;
4564
+ background: var(--zaui-contract-bg-add, #d2fff4) !important;
4609
4565
  }
4610
4566
  .pro-edit-table-footer {
4611
4567
  margin-top: 12px;
package/dist/less.esm.css CHANGED
@@ -2339,8 +2339,6 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
2339
2339
  .pro-number-range .range-split {
2340
2340
  width: 32px !important;
2341
2341
  text-align: center !important;
2342
- border-right: 0px;
2343
- border-left: 0px;
2344
2342
  pointer-events: none;
2345
2343
  }
2346
2344
  .pro-number-range .range-split.ant-input[disabled] {
@@ -2349,60 +2347,18 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
2349
2347
  .pro-number-range .ant-input-number-status-error:not(.ant-input-number-disabled):not( .ant-input-number-borderless).ant-input-number {
2350
2348
  border-color: var(--zaui-danger, #ff5050) !important;
2351
2349
  }
2352
- .pro-number-range .ant-input-status-error.range-split {
2353
- color: var(--zaui-danger, #ff5050) !important;
2350
+ .pro-number-range:has(.ant-input-status-error):not(.pro-number-range-disabled) .range-split,
2351
+ .pro-number-range:has(.ant-input-status-error):not(.pro-number-range-disabled) .range-addon-before,
2352
+ .pro-number-range:has(.ant-input-status-error):not(.pro-number-range-disabled) .range-addon-after {
2354
2353
  border-color: var(--zaui-danger, #ff5050);
2355
2354
  }
2356
- .pro-number-range .ant-input-rtl.range-right {
2357
- border-right-width: 0;
2358
- }
2359
- .pro-number-range .ant-input-rtl.range-right:hover,
2360
- .pro-number-range .ant-input-rtl.range-right:focus {
2361
- border-right-width: 1px;
2362
- }
2363
2355
  .pro-number-range .ant-form-item {
2364
2356
  margin-bottom: 0;
2365
2357
  }
2366
- .pro-number-range .range-left,
2367
- .pro-number-range .range-right {
2368
- width: calc(50% - 16px);
2369
- text-align: center;
2370
- -webkit-transition: none;
2371
- transition: none;
2372
- }
2373
- .pro-number-range .range-left .range-left,
2374
- .pro-number-range .range-right .range-left {
2375
- width: calc(100% + 2px) !important;
2376
- }
2377
- .pro-number-range .range-left .ant-input-number {
2378
- border-right: none;
2379
- }
2380
- .pro-number-range .range-right .ant-input-number {
2381
- border-left: none;
2382
- }
2383
- .pro-number-range .range-right .range-right {
2384
- width: 100%;
2385
- border-top-left-radius: 0;
2386
- border-bottom-left-radius: 0;
2387
- }
2388
- .pro-number-range.ant-input-group.ant-input-group-compact > *:not(:last-child) {
2389
- margin-right: 0;
2390
- }
2391
- .pro-number-range > *:first-child {
2392
- border-top-right-radius: 0 !important;
2393
- border-bottom-right-radius: 0 !important;
2394
- }
2395
- .pro-number-range > *:first-child > .ant-select-selector {
2396
- border-top-right-radius: 0 !important;
2397
- border-bottom-right-radius: 0 !important;
2398
- }
2399
- .pro-number-range > *:last-child {
2400
- border-top-left-radius: 0 !important;
2401
- border-bottom-left-radius: 0 !important;
2402
- }
2403
- .pro-number-range > *:last-child > .ant-select-selector {
2404
- border-top-left-radius: 0 !important;
2405
- border-bottom-left-radius: 0 !important;
2358
+ .pro-number-range .range-addon-before,
2359
+ .pro-number-range .range-addon-after {
2360
+ color: var(--zaui-disabled-text);
2361
+ pointer-events: none;
2406
2362
  }
2407
2363
  .pro-modal-select .ant-input-group-wrapper .close-icon,
2408
2364
  .pro-tree-modal .ant-input-group-wrapper .close-icon {
@@ -4605,7 +4561,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
4605
4561
  .pro-edit-table .is-new-row.ant-table-row:hover td,
4606
4562
  .pro-edit-table .is-new-row .ant-table-cell-row-hover,
4607
4563
  .pro-edit-table .is-new-row.ant-table-row:hover .ant-table-cell-row-hover {
4608
- background: var(--ant-primary-2) !important;
4564
+ background: var(--zaui-contract-bg-add, #d2fff4) !important;
4609
4565
  }
4610
4566
  .pro-edit-table-footer {
4611
4567
  margin-top: 12px;
@@ -40,7 +40,7 @@ var ProAction = function ProAction(props) {
40
40
  servicesArray = state.servicesArray;
41
41
  var length = config.length;
42
42
  var _onActionRun = /*#__PURE__*/function () {
43
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(currentIndex, array) {
43
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(currentIndex, array) {
44
44
  var _actionProps$useReque, _options$onSuccess, _newServicesArray$cur, _newServicesArray$cur2, _newServicesArray$cur3, _actionProps$onAction, _actionProps$continue;
45
45
  var actionProps, newServicesArray, _ref2, service, options, transformResponse, res, data, open, _newServicesArray$cur4, _newServicesArray$cur5, _newServicesArray$cur6, list, errorTitle, isContinue;
46
46
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -37,7 +37,7 @@ var ProDownload = function ProDownload(props) {
37
37
  onErrorConfig = _ref.onError;
38
38
  defaultProps.headers = _objectSpread(_objectSpread({}, headers), defaultProps.headers);
39
39
  var handDownload = /*#__PURE__*/function () {
40
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
40
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
41
41
  var _params;
42
42
  return _regeneratorRuntime().wrap(function _callee$(_context) {
43
43
  while (1) switch (_context.prev = _context.next) {
@@ -131,7 +131,7 @@ var ProDownload = function ProDownload(props) {
131
131
  return _jsx(_Button, _objectSpread(_objectSpread({
132
132
  className: cls,
133
133
  onClick: function () {
134
- var _onClick = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
134
+ var _onClick = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
135
135
  var res;
136
136
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
137
137
  while (1) switch (_context3.prev = _context3.next) {
@@ -146,7 +146,7 @@ var ProDownload = function ProDownload(props) {
146
146
  _context3.next = 13;
147
147
  break;
148
148
  }
149
- if (!(beforeDownload instanceof /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
149
+ if (!(beforeDownload instanceof /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
150
150
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
151
151
  while (1) switch (_context2.prev = _context2.next) {
152
152
  case 0:
@@ -70,7 +70,7 @@ export function getFilenameFromContentDisposition(contentDisposition) {
70
70
  }
71
71
  // 发起请求获取下载文件
72
72
  export var DownloadRequest = /*#__PURE__*/function () {
73
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref2) {
73
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref2) {
74
74
  var url, _ref2$method, method, params, headers, transformResponse, fileName, onFinish, onError, config, res, fileBlob, data, contentFileName;
75
75
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
76
76
  while (1) switch (_context2.prev = _context2.next) {
@@ -97,8 +97,8 @@ export var DownloadRequest = /*#__PURE__*/function () {
97
97
  config.headers = _objectSpread(_objectSpread({}, config.headers), headers);
98
98
  }
99
99
  _context2.next = 7;
100
- return fetch(url, config).then( /*#__PURE__*/function () {
101
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(response) {
100
+ return fetch(url, config).then(/*#__PURE__*/function () {
101
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(response) {
102
102
  var _data, errorMsg;
103
103
  return _regeneratorRuntime().wrap(function _callee$(_context) {
104
104
  while (1) switch (_context.prev = _context.next) {
@@ -46,7 +46,7 @@ var ProDrawer = function ProDrawer(_ref) {
46
46
  loading = _useState2[0],
47
47
  toggleLoading = _useState2[1];
48
48
  var noRenderFooter = isView || footer === false || footer === null;
49
- var onConfirm = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
49
+ var onConfirm = useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
50
50
  var _locale$ProDrawerForm, _locale$ProDrawerForm2, _locale$ProDrawerForm3, _locale$ProDrawerForm4;
51
51
  return _regeneratorRuntime().wrap(function _callee$(_context) {
52
52
  while (1) switch (_context.prev = _context.next) {
@@ -74,7 +74,7 @@ var ProDrawer = function ProDrawer(_ref) {
74
74
  }
75
75
  }, _callee);
76
76
  })), [onCancel, modalRef.current]);
77
- var handleFinish = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
77
+ var handleFinish = useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
78
78
  var values, _error$errorFields, _error$errorFields$;
79
79
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
80
80
  while (1) switch (_context2.prev = _context2.next) {
@@ -166,7 +166,7 @@ var ProDrawer = function ProDrawer(_ref) {
166
166
  if (noRenderFooter) {
167
167
  return null;
168
168
  }
169
- if ( /*#__PURE__*/React.isValidElement(footer)) {
169
+ if (/*#__PURE__*/React.isValidElement(footer)) {
170
170
  return _jsx("div", {
171
171
  className: "pro-drawer-footer",
172
172
  children: footer
@@ -176,7 +176,7 @@ var ProDrawer = function ProDrawer(_ref) {
176
176
  return _jsx("div", {
177
177
  className: "pro-drawer-footer",
178
178
  children: footer.map(function (item) {
179
- if ( /*#__PURE__*/React.isValidElement(item)) {
179
+ if (/*#__PURE__*/React.isValidElement(item)) {
180
180
  return item;
181
181
  }
182
182
  return false;
@@ -52,7 +52,7 @@ var ProModal = function ProModal(_ref) {
52
52
  'pro-modal-no-footer': noRenderFooter,
53
53
  'pro-modal-footer-shadow': height >= 450
54
54
  }]);
55
- var handleFinish = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
55
+ var handleFinish = useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
56
56
  var values, _error$errorFields, _error$errorFields$;
57
57
  return _regeneratorRuntime().wrap(function _callee$(_context) {
58
58
  while (1) switch (_context.prev = _context.next) {
@@ -146,7 +146,7 @@ var ProModal = function ProModal(_ref) {
146
146
  if (noRenderFooter) {
147
147
  return null;
148
148
  }
149
- if ( /*#__PURE__*/React.isValidElement(footer)) {
149
+ if (/*#__PURE__*/React.isValidElement(footer)) {
150
150
  return _jsx("div", {
151
151
  className: "pro-drawer-footer",
152
152
  children: footer
@@ -156,7 +156,7 @@ var ProModal = function ProModal(_ref) {
156
156
  return _jsx("div", {
157
157
  className: "pro-drawer-footer",
158
158
  children: footer.map(function (item) {
159
- if ( /*#__PURE__*/React.isValidElement(item)) {
159
+ if (/*#__PURE__*/React.isValidElement(item)) {
160
160
  return item;
161
161
  }
162
162
  return false;
@@ -134,7 +134,7 @@ var ProEditLabel = function ProEditLabel(_ref) {
134
134
  * pop确认回调
135
135
  */
136
136
  var onConfirmHandle = /*#__PURE__*/function () {
137
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
137
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
138
138
  var res, value;
139
139
  return _regeneratorRuntime().wrap(function _callee$(_context) {
140
140
  while (1) switch (_context.prev = _context.next) {
@@ -221,7 +221,7 @@ var ProEditLabel = function ProEditLabel(_ref) {
221
221
  })
222
222
  });
223
223
  if (disabled) {
224
- if ( /*#__PURE__*/React.isValidElement(children)) {
224
+ if (/*#__PURE__*/React.isValidElement(children)) {
225
225
  return children;
226
226
  }
227
227
  if (props.value && !popupProps) {
@@ -253,7 +253,7 @@ var ProEditLabel = function ProEditLabel(_ref) {
253
253
  if (mode === 'popup') {
254
254
  // 查看时内容渲染
255
255
  var labelRender = function labelRender() {
256
- if ( /*#__PURE__*/React.isValidElement(children)) {
256
+ if (/*#__PURE__*/React.isValidElement(children)) {
257
257
  return children;
258
258
  }
259
259
  return TextNode;
@@ -82,7 +82,7 @@ var ActionButton = function ActionButton(_ref) {
82
82
  disabled: isDisabled,
83
83
  okText: locale.ProEditTable.confirm,
84
84
  cancelText: locale.ProEditTable.cancel,
85
- children: /*#__PURE__*/React.isValidElement(btnConfig.label) ? ( /*#__PURE__*/React.cloneElement(btnConfig.label, _objectSpread(_objectSpread({}, omit(delBtnProps, ['buttonProps', 'isEditable', 'onEvent'])), {}, {
85
+ children: /*#__PURE__*/React.isValidElement(btnConfig.label) ? (/*#__PURE__*/React.cloneElement(btnConfig.label, _objectSpread(_objectSpread({}, omit(delBtnProps, ['buttonProps', 'isEditable', 'onEvent'])), {}, {
86
86
  record: record,
87
87
  index: index,
88
88
  disabled: isDisabled
@@ -92,7 +92,7 @@ var ActionButton = function ActionButton(_ref) {
92
92
  children: btnConfig.label
93
93
  }))
94
94
  }) : _jsx(_Fragment, {
95
- children: /*#__PURE__*/React.isValidElement(btnConfig.label) ? ( /*#__PURE__*/React.cloneElement(btnConfig.label, _objectSpread(_objectSpread({}, omit(delBtnProps, ['buttonProps', 'isEditable', 'onEvent'])), {}, {
95
+ children: /*#__PURE__*/React.isValidElement(btnConfig.label) ? (/*#__PURE__*/React.cloneElement(btnConfig.label, _objectSpread(_objectSpread({}, omit(delBtnProps, ['buttonProps', 'isEditable', 'onEvent'])), {}, {
96
96
  record: record,
97
97
  index: index,
98
98
  disabled: isDisabled,
@@ -109,7 +109,7 @@ var ActionButton = function ActionButton(_ref) {
109
109
  }))
110
110
  })
111
111
  }) : _jsx(_Fragment, {
112
- children: /*#__PURE__*/React.isValidElement(btnConfig.label) ? ( /*#__PURE__*/React.cloneElement(btnConfig.label, _objectSpread(_objectSpread({}, omit(actionBtnProps, ['buttonProps', 'isEditable', 'onEvent'])), {}, {
112
+ children: /*#__PURE__*/React.isValidElement(btnConfig.label) ? (/*#__PURE__*/React.cloneElement(btnConfig.label, _objectSpread(_objectSpread({}, omit(actionBtnProps, ['buttonProps', 'isEditable', 'onEvent'])), {}, {
113
113
  record: record,
114
114
  index: index
115
115
  }))) : _jsx(_Button, _objectSpread(_objectSpread({
@@ -4,7 +4,7 @@ import "antd/es/tooltip/style";
4
4
  import _Tooltip from "antd/es/tooltip";
5
5
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
6
6
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
7
- var _excluded = ["name", "names", "namesStr", "originalName", "originalNames", "originalValues", "form", "equalWith", "rowKeyPath", "children", "type"];
7
+ var _excluded = ["name", "names", "namesStr", "originalName", "originalNames", "originalValues", "form", "equalWith", "rowKeyPath", "children", "type", "normalize", "valuePropName"];
8
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  import React, { useMemo } from 'react';
10
10
  import classNames from 'classnames';
@@ -41,7 +41,7 @@ var getOriginalValue = function getOriginalValue(_ref) {
41
41
  var keyValue = rowValue[rowKeyName]; // 获取表单中rowKey值
42
42
  if (!keyValue) return undefined;
43
43
  var originalValueList = get(originalValues, originalName.slice(0, rowKeyPath.length - 2));
44
- var originalValueRow = originalValueList.find(function (item) {
44
+ var originalValueRow = originalValueList === null || originalValueList === void 0 ? void 0 : originalValueList.find(function (item) {
45
45
  return item[rowKeyPath[rowKeyPath.length - 1]] === keyValue;
46
46
  });
47
47
  var originalValue;
@@ -78,13 +78,16 @@ var ListChangedWrapper = function ListChangedWrapper(props) {
78
78
  rowKeyPath = props.rowKeyPath,
79
79
  children = props.children,
80
80
  type = props.type,
81
+ normalize = props.normalize,
82
+ _props$valuePropName = props.valuePropName,
83
+ valuePropName = _props$valuePropName === void 0 ? 'value' : _props$valuePropName,
81
84
  rest = _objectWithoutProperties(props, _excluded);
82
85
  var _ref2 = useProConfig('ProEditTable') || {},
83
86
  isDiffAll = _ref2.isDiffAll;
84
87
  var namePath = toNamePath(namesStr || name);
85
88
  var originalNamePath = toNamePath(originalName);
86
89
  var originalNamePaths = originalNames && toNamePaths(originalNames);
87
- var isWatch = originalValues && !['FormList', 'ProEditTable'].includes(type);
90
+ var isWatch = Boolean(originalValues);
88
91
  var originalValue = isWatch ? getOriginalValue({
89
92
  namePath: namePath,
90
93
  originalName: originalNamePath,
@@ -96,14 +99,15 @@ var ListChangedWrapper = function ListChangedWrapper(props) {
96
99
  var noChange = !equalWith && (!originalValues || isDiffAll ? false : isEmpty(originalValue));
97
100
  var diffType = useMemo(function () {
98
101
  if (!isWatch || noChange) return 'same';
102
+ var _value = normalize ? normalize(props[valuePropName]) : props[valuePropName];
99
103
  return diffOriginal({
100
- value: props.value,
104
+ value: _value,
101
105
  originalValue: originalValue,
102
106
  form: form,
103
107
  equalWith: equalWith
104
108
  // name: isString(namesStr) ? namesStr : originalName || name,
105
109
  });
106
- }, [props.value, originalValue]);
110
+ }, [props[valuePropName], originalValue]);
107
111
  var isAdd = diffType === 'add';
108
112
  var isChanged = diffType === 'changed';
109
113
  if (!isWatch || noChange) {
@@ -70,8 +70,6 @@ var RenderField = function RenderField(_ref) {
70
70
  viewEmpty = config.viewEmpty,
71
71
  originalValues = config.originalValues,
72
72
  formNamePath = config.namePath,
73
- _config$originalDiffT = config.originalDiffTip,
74
- originalDiffTip = _config$originalDiffT === void 0 ? true : _config$originalDiffT,
75
73
  rowDisabled = config.rowDisabled,
76
74
  _config$validateTrigg = config.validateTrigger,
77
75
  validateTrigger = _config$validateTrigg === void 0 ? ['onChange', 'onBlur', 'onSubmit'] : _config$validateTrigg,
@@ -216,10 +214,10 @@ var RenderField = function RenderField(_ref) {
216
214
  var originalNames = names;
217
215
  if (virtualKey) {
218
216
  var _cellName$slice, _names2, _names2$map;
219
- originalName = [].concat(_toConsumableArray(name), _toConsumableArray(cellName === null || cellName === void 0 ? void 0 : (_cellName$slice = cellName.slice) === null || _cellName$slice === void 0 ? void 0 : _cellName$slice.call(cellName, 1)));
217
+ originalName = [].concat(_toConsumableArray(name), _toConsumableArray(cellName === null || cellName === void 0 ? void 0 : (_cellName$slice = cellName.slice) === null || _cellName$slice === void 0 ? void 0 : _cellName$slice.call(cellName, name.length)));
220
218
  originalNames = (_names2 = names) === null || _names2 === void 0 ? void 0 : (_names2$map = _names2.map) === null || _names2$map === void 0 ? void 0 : _names2$map.call(_names2, function (item) {
221
219
  var _item$slice;
222
- return [].concat(_toConsumableArray(name), _toConsumableArray(item === null || item === void 0 ? void 0 : (_item$slice = item.slice) === null || _item$slice === void 0 ? void 0 : _item$slice.call(item, 1)));
220
+ return [].concat(_toConsumableArray(name), _toConsumableArray(item === null || item === void 0 ? void 0 : (_item$slice = item.slice) === null || _item$slice === void 0 ? void 0 : _item$slice.call(item, name.length)));
223
221
  });
224
222
  }
225
223
  /**
@@ -246,7 +244,7 @@ var RenderField = function RenderField(_ref) {
246
244
  if (typeof _editRender === 'function') {
247
245
  TargetComponent = _editRender.apply(void 0, rowParams);
248
246
  }
249
- if ( /*#__PURE__*/React.isValidElement(_editRender)) {
247
+ if (/*#__PURE__*/React.isValidElement(_editRender)) {
250
248
  TargetComponent = _editRender;
251
249
  }
252
250
  }
@@ -262,7 +260,7 @@ var RenderField = function RenderField(_ref) {
262
260
  children: View
263
261
  });
264
262
  }
265
- if ( /*#__PURE__*/React.isValidElement(viewRender)) {
263
+ if (/*#__PURE__*/React.isValidElement(viewRender)) {
266
264
  TargetComponent = viewRender;
267
265
  }
268
266
  }
@@ -305,7 +303,7 @@ var RenderField = function RenderField(_ref) {
305
303
  }, 100);
306
304
  };
307
305
  // 单元格更新数据时,加个防抖,防止更新频率过快,卡顿
308
- var _onChange = debounce( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
306
+ var _onChange = debounce(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
309
307
  var _len2,
310
308
  args,
311
309
  _key2,
@@ -409,7 +407,7 @@ var RenderField = function RenderField(_ref) {
409
407
  }, _callee);
410
408
  })), 300);
411
409
  var _onblur = /*#__PURE__*/function () {
412
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
410
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
413
411
  var _TargetComponent3, _TargetComponent3$pro, _TargetComponent$prop4;
414
412
  var _len3,
415
413
  args,
@@ -545,7 +543,7 @@ var RenderField = function RenderField(_ref) {
545
543
  var getFieldItem = function getFieldItem() {
546
544
  var _componentProps;
547
545
  var FormItem = null;
548
- var FieldComponent = /*#__PURE__*/React.isValidElement(TargetComponent) ? ( /*#__PURE__*/React.cloneElement(TargetComponent, componentProps)) : _jsx(TargetComponent, _objectSpread({}, componentProps));
546
+ var FieldComponent = /*#__PURE__*/React.isValidElement(TargetComponent) ? (/*#__PURE__*/React.cloneElement(TargetComponent, componentProps)) : _jsx(TargetComponent, _objectSpread({}, componentProps));
549
547
  if (originalValues) {
550
548
  FieldComponent = _jsx(ListChangedWrapper, {
551
549
  name: cellName,
@@ -559,6 +557,8 @@ var RenderField = function RenderField(_ref) {
559
557
  equalWith: equalWith,
560
558
  type: type,
561
559
  onChange: _onChange,
560
+ valuePropName: _formItemProps.valuePropName,
561
+ normalize: _formItemProps.normalize,
562
562
  children: FieldComponent
563
563
  });
564
564
  }
@@ -76,7 +76,7 @@ var RenderToolbar = function RenderToolbar(config) {
76
76
  toolbar.show = show !== null && show !== void 0 ? show : true;
77
77
  toolbar.needConfirm = needConfirm !== null && needConfirm !== void 0 ? needConfirm : true;
78
78
  toolbar.onEvent = /*#__PURE__*/function () {
79
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(record, index) {
79
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(record, index) {
80
80
  var onEvent, result;
81
81
  return _regeneratorRuntime().wrap(function _callee$(_context) {
82
82
  while (1) switch (_context.prev = _context.next) {
@@ -177,7 +177,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
177
177
  var isEdit = !virtualKey || editingKeys.includes(record.rowKey);
178
178
  var className = isEdit ? 'is-editing' : '';
179
179
  var originalArr = get(originalValues, name);
180
- if (!isEdit && IsNew(originalArr, record)) {
180
+ if (IsNew(originalArr, record)) {
181
181
  return "is-new-row ".concat(className);
182
182
  }
183
183
  return className;
@@ -276,19 +276,23 @@ var ProEditTable = function ProEditTable(_ref, ref) {
276
276
  return transformColumns(columns, config);
277
277
  }, [valueChangeRef.current, disabled, forceUpdate, columns, page, actionProps, editingKeys, cellNamePath]);
278
278
  useEffect(function () {
279
- var _value$every;
279
+ var _value$every, _originalArr$every;
280
280
  var isAllHasKey = value === null || value === void 0 ? void 0 : (_value$every = value.every) === null || _value$every === void 0 ? void 0 : _value$every.call(value, function (item) {
281
281
  return item.rowKey;
282
282
  });
283
+ // 原始值也需要设置对应的rowkey,后续比对通过rowkey对比
284
+ var originalArr = get(originalValues, name);
285
+ var isOriginalAllHasKey = originalArr ? originalArr === null || originalArr === void 0 ? void 0 : (_originalArr$every = originalArr.every) === null || _originalArr$every === void 0 ? void 0 : _originalArr$every.call(originalArr, function (item) {
286
+ return item.rowKey;
287
+ }) : true;
283
288
  // 初始化默认生成row-key
284
- if ((value === null || value === void 0 ? void 0 : value.length) && !isAllHasKey) {
289
+ if ((value === null || value === void 0 ? void 0 : value.length) && !isAllHasKey || (originalArr === null || originalArr === void 0 ? void 0 : originalArr.length) && !isOriginalAllHasKey) {
285
290
  var _originalArr$forEach;
286
291
  var nextValues = value === null || value === void 0 ? void 0 : value.map(function (item) {
287
292
  return _objectSpread(_objectSpread({}, item), {}, {
288
293
  rowKey: getRowKey(item)
289
294
  });
290
295
  });
291
- var originalArr = get(originalValues, name);
292
296
  originalArr === null || originalArr === void 0 ? void 0 : (_originalArr$forEach = originalArr.forEach) === null || _originalArr$forEach === void 0 ? void 0 : _originalArr$forEach.call(originalArr, function (item) {
293
297
  item.rowKey = getRowKey(item);
294
298
  });
@@ -297,7 +301,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
297
301
  form.setFieldValue(virtualRowName, nextValues);
298
302
  }
299
303
  }
300
- }, [value]);
304
+ }, [value, originalValues]);
301
305
  useImperativeHandle((resetProps === null || resetProps === void 0 ? void 0 : resetProps.ref) || ref, function () {
302
306
  return {
303
307
  getInternalState: function getInternalState() {
@@ -283,7 +283,8 @@
283
283
 
284
284
  .is-new-row, .is-new-row.@{ant-prefix}-table-row:hover {
285
285
  td, .@{ant-prefix}-table-cell-row-hover {
286
- background: var(--ant-primary-2) !important;
286
+ background: var(--zaui-contract-bg-add, #d2fff4) !important;
287
+
287
288
  }
288
289
  }
289
290
  }
@@ -63,7 +63,7 @@ export var actions = {
63
63
  });
64
64
  },
65
65
  save: function () {
66
- var _save = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref2) {
66
+ var _save = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref2) {
67
67
  var record, editingKeys, setState, form, rowName, virtualRowName, result, updateData, nextEditingKeys, values;
68
68
  return _regeneratorRuntime().wrap(function _callee$(_context) {
69
69
  while (1) switch (_context.prev = _context.next) {
@@ -166,7 +166,7 @@ export var actions = {
166
166
  }
167
167
  },
168
168
  add: function () {
169
- var _add = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref5) {
169
+ var _add = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref5) {
170
170
  var _tableRef$current$que, _tableRef$current$que2;
171
171
  var result, insertType, editingKeys, setState, form, name, virtualName, virtualKey, onlyOneLineMsg, tableRef, _ref5$prefixCls, prefixCls, nextData, rowKey, addData, nextEditingKeys;
172
172
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
@@ -26,7 +26,7 @@ import locale from '../../locale';
26
26
  // 渲染操作栏
27
27
  var getActionColumn = function getActionColumn(config) {
28
28
  var _cloneDeepWith = cloneDeepWith(config, function (value) {
29
- if ( /*#__PURE__*/React.isValidElement(value)) {
29
+ if (/*#__PURE__*/React.isValidElement(value)) {
30
30
  return value;
31
31
  }
32
32
  }),
@@ -83,7 +83,7 @@ var getActionColumn = function getActionColumn(config) {
83
83
  action.show = show !== null && show !== void 0 ? show : true;
84
84
  action.needConfirm = needConfirm !== null && needConfirm !== void 0 ? needConfirm : true;
85
85
  action.onEvent = /*#__PURE__*/function () {
86
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(record, index) {
86
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(record, index) {
87
87
  var _form$getFieldValue;
88
88
  var rowName, _record, onEvent, result;
89
89
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -234,7 +234,7 @@ export var transformColumns = function transformColumns() {
234
234
  children: [before, columnTitle, _jsx(_Tooltip, _objectSpread(_objectSpread({
235
235
  title: tooltipTitle !== null && tooltipTitle !== void 0 ? tooltipTitle : tooltip
236
236
  }, resetProps), {}, {
237
- children: icon ? ( /*#__PURE__*/React.cloneElement(icon, {
237
+ children: icon ? (/*#__PURE__*/React.cloneElement(icon, {
238
238
  className: 'icon-tip'
239
239
  })) : _jsx(ReactSVG, {
240
240
  className: "icon-tip",
@@ -380,8 +380,8 @@ export var transformColumns = function transformColumns() {
380
380
  }
381
381
  // cacheMap 用来存储缓存值,若有值后不再请求
382
382
  if (JSON.stringify(cacheMap.current) === '{}') {
383
- Promise.all(Object.entries(_cacheMap).map( /*#__PURE__*/function () {
384
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(item) {
383
+ Promise.all(Object.entries(_cacheMap).map(/*#__PURE__*/function () {
384
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(item) {
385
385
  var _item, key, value, _ref4, service, option;
386
386
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
387
387
  while (1) switch (_context2.prev = _context2.next) {
@@ -191,7 +191,7 @@ export var handleScrollToError = function handleScrollToError() {
191
191
  */
192
192
  export function cloneDeepFilterNode(value) {
193
193
  return cloneDeepWith(value, function (val) {
194
- if ( /*#__PURE__*/React.isValidElement(val)) {
194
+ if (/*#__PURE__*/React.isValidElement(val)) {
195
195
  return val;
196
196
  }
197
197
  });
@@ -52,7 +52,7 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
52
52
  staleTime: 6e4 * 60
53
53
  }, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options), {}, {
54
54
  setCache: function () {
55
- var _setCache = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
55
+ var _setCache = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
56
56
  var response, _locale$ProEnum2, _useRequest$options, ignoreCodes, cacheData;
57
57
  return _regeneratorRuntime().wrap(function _callee$(_context) {
58
58
  while (1) switch (_context.prev = _context.next) {
@@ -162,7 +162,7 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
162
162
  }
163
163
  }));
164
164
  var mergeData = /*#__PURE__*/function () {
165
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
165
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
166
166
  var cacheData, _useRequest$options2, _useRequest$options3, enumData, cacheCodes, codes, ignoreCodes, diff, response, res, _locale$ProEnum6;
167
167
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
168
168
  while (1) switch (_context2.prev = _context2.next) {
@@ -153,7 +153,7 @@ var ProEnum = function ProEnum(props) {
153
153
  list = [];
154
154
  }
155
155
  }
156
- if ( /*#__PURE__*/React.isValidElement(component)) {
156
+ if (/*#__PURE__*/React.isValidElement(component)) {
157
157
  var Component = component;
158
158
  return _jsx(Component, _objectSpread(_objectSpread({}, enumProps), {}, {
159
159
  dataSource: list,