@zat-design/sisyphus-react 3.8.2 → 3.8.3-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) 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 +32 -8
  41. package/dist/less.esm.css +32 -8
  42. package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +22 -7
  43. package/es/ProEditTable/components/RenderField/index.js +9 -1
  44. package/es/ProEditTable/index.js +0 -1
  45. package/es/ProEditTable/propsType.d.ts +0 -1
  46. package/es/ProEditTable/utils/index.js +10 -3
  47. package/es/ProEnum/hooks/useEnumRequest.js +1 -1
  48. package/es/ProEnum/index.js +2 -2
  49. package/es/ProForm/components/base/InputNumber/index.js +1 -1
  50. package/es/ProForm/components/combination/FormList/components/BlockFields.d.ts +2 -0
  51. package/es/ProForm/components/combination/FormList/components/BlockFields.js +4 -2
  52. package/es/ProForm/components/combination/FormList/components/LineFields.d.ts +2 -0
  53. package/es/ProForm/components/combination/FormList/components/LineFields.js +4 -2
  54. package/es/ProForm/components/combination/FormList/index.js +14 -3
  55. package/es/ProForm/components/combination/Group/component/ComRender.d.ts +1 -0
  56. package/es/ProForm/components/combination/Group/component/ComRender.js +4 -2
  57. package/es/ProForm/components/combination/Group/index.js +6 -3
  58. package/es/ProForm/components/combination/ProCascader/index.js +20 -13
  59. package/es/ProForm/components/combination/ProModalSelect/index.js +17 -3
  60. package/es/ProForm/components/render/ChangedWrapper.js +20 -2
  61. package/es/ProForm/components/render/Render.js +6 -3
  62. package/es/ProForm/components/render/RenderFields.js +4 -2
  63. package/es/ProForm/components/render/propsType.d.ts +4 -0
  64. package/es/ProForm/propsType.d.ts +1 -0
  65. package/es/ProForm/style/index.less +22 -2
  66. package/es/ProForm/utils/diffOriginal.js +14 -2
  67. package/es/ProForm/utils/useShouldUpdate.js +20 -13
  68. package/es/ProTable/components/FormatColumn/index.d.ts +4 -1
  69. package/es/ProTable/components/FormatColumn/index.js +180 -30
  70. package/es/ProTable/components/RenderColumn/index.d.ts +2 -0
  71. package/es/ProTable/components/RenderColumn/index.js +28 -10
  72. package/es/ProTable/index.js +26 -10
  73. package/es/ProTable/propsType.d.ts +4 -0
  74. package/es/ProTable/style/index.less +22 -6
  75. package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +25 -10
  76. package/lib/ProEditTable/components/RenderField/index.js +9 -1
  77. package/lib/ProEditTable/index.js +0 -1
  78. package/lib/ProEditTable/propsType.d.ts +0 -1
  79. package/lib/ProEditTable/utils/index.js +10 -3
  80. package/lib/ProEnum/hooks/useEnumRequest.js +1 -1
  81. package/lib/ProEnum/index.js +2 -2
  82. package/lib/ProForm/components/base/InputNumber/index.js +1 -1
  83. package/lib/ProForm/components/combination/FormList/components/BlockFields.d.ts +2 -0
  84. package/lib/ProForm/components/combination/FormList/components/BlockFields.js +4 -2
  85. package/lib/ProForm/components/combination/FormList/components/LineFields.d.ts +2 -0
  86. package/lib/ProForm/components/combination/FormList/components/LineFields.js +4 -2
  87. package/lib/ProForm/components/combination/FormList/index.js +14 -3
  88. package/lib/ProForm/components/combination/Group/component/ComRender.d.ts +1 -0
  89. package/lib/ProForm/components/combination/Group/component/ComRender.js +4 -2
  90. package/lib/ProForm/components/combination/Group/index.js +6 -3
  91. package/lib/ProForm/components/combination/ProCascader/index.js +20 -13
  92. package/lib/ProForm/components/combination/ProModalSelect/index.js +17 -3
  93. package/lib/ProForm/components/render/ChangedWrapper.js +20 -2
  94. package/lib/ProForm/components/render/Render.js +6 -3
  95. package/lib/ProForm/components/render/RenderFields.js +4 -2
  96. package/lib/ProForm/components/render/propsType.d.ts +4 -0
  97. package/lib/ProForm/propsType.d.ts +1 -0
  98. package/lib/ProForm/style/index.less +22 -2
  99. package/lib/ProForm/utils/diffOriginal.js +13 -1
  100. package/lib/ProForm/utils/useShouldUpdate.js +18 -11
  101. package/lib/ProTable/components/FormatColumn/index.d.ts +4 -1
  102. package/lib/ProTable/components/FormatColumn/index.js +179 -29
  103. package/lib/ProTable/components/RenderColumn/index.d.ts +2 -0
  104. package/lib/ProTable/components/RenderColumn/index.js +27 -9
  105. package/lib/ProTable/index.js +26 -10
  106. package/lib/ProTable/propsType.d.ts +4 -0
  107. package/lib/ProTable/style/index.less +22 -6
  108. package/package.json +4 -3
  109. package/.vscode/extensions.json +0 -5
@@ -37,7 +37,7 @@ var defaultPage = exports.defaultPage = {
37
37
  pageSize: 10
38
38
  };
39
39
  function ProTable(props) {
40
- var _locale$ProTable, _curTableConfig$pathK;
40
+ var _locale$ProTable, _props$scroll, _curTableConfig$pathK;
41
41
  var _ref = (0, _index.useProConfig)('globalConfig') || {},
42
42
  configStorage = _ref.storage; // 获取全局缓存位置配置
43
43
  var _ref2 = (0, _index.useProConfig)('ProTable') || {},
@@ -65,6 +65,9 @@ function ProTable(props) {
65
65
  restProps = (0, _objectWithoutProperties2.default)(props, _excluded);
66
66
  var _props$scrollFollowPa = props.scrollFollowParent,
67
67
  scrollFollowParent = _props$scrollFollowPa === void 0 ? true : _props$scrollFollowPa;
68
+ var _scroll = (_props$scroll = props === null || props === void 0 ? void 0 : props.scroll) !== null && _props$scroll !== void 0 ? _props$scroll : {
69
+ x: 'max-content'
70
+ };
68
71
  var wrapToolTipProps = {
69
72
  getPopupContainer: scrollFollowParent ? function (triggerNode) {
70
73
  return triggerNode.parentNode;
@@ -187,6 +190,11 @@ function ProTable(props) {
187
190
  setCurColumns(nextColumns);
188
191
  };
189
192
  };
193
+ var _rowClassName = function _rowClassName(record, index) {
194
+ if (originalDataSource && !originalObj.hasOwnProperty((0, _lodash.get)(record, 'rowKey'))) {
195
+ return 'new-cell';
196
+ }
197
+ };
190
198
  var columns = (0, _react.useMemo)(function () {
191
199
  var newColumns = curColumns.map(function (item, index) {
192
200
  var _propsColumnObj$getCo2;
@@ -208,18 +216,23 @@ function ProTable(props) {
208
216
  }).filter(function (item) {
209
217
  return !(item === null || item === void 0 ? void 0 : item.delete);
210
218
  });
211
- newColumns === null || newColumns === void 0 ? void 0 : newColumns.forEach(function (item) {
219
+ newColumns === null || newColumns === void 0 ? void 0 : newColumns.forEach(function (item, index) {
212
220
  (0, _FormatColumn.formatColumn)({
213
221
  column: item,
214
222
  originalObj: originalObj,
215
223
  dataSourceObj: dataSourceObj,
216
224
  rowKey: 'rowKey',
217
225
  diffToolTip: toolTip,
218
- wrapToolTipProps: wrapToolTipProps
226
+ wrapToolTipProps: wrapToolTipProps,
227
+ scroll: _scroll,
228
+ onUpdateMinWidth: function onUpdateMinWidth(w) {
229
+ curColumns[index].minWidth = w;
230
+ },
231
+ isInNewRow: _rowClassName
219
232
  });
220
233
  });
221
234
  return newColumns;
222
- }, [curColumns, handleResize]);
235
+ }, [curColumns, handleResize, _scroll, originalDataSource, originalObj, _rowClassName]);
223
236
  var _columns = (0, _react.useMemo)(function () {
224
237
  return columns === null || columns === void 0 ? void 0 : columns.filter(function (item, index) {
225
238
  var show = item.show;
@@ -232,6 +245,13 @@ function ProTable(props) {
232
245
  return true;
233
246
  });
234
247
  }, [columns]);
248
+ var isExistPercentWidth = !!(_columns === null || _columns === void 0 ? void 0 : _columns.find(function (item) {
249
+ var _item$width;
250
+ return (item === null || item === void 0 ? void 0 : item.width) && typeof (item === null || item === void 0 ? void 0 : item.width) === 'string' && (item === null || item === void 0 ? void 0 : (_item$width = item.width) === null || _item$width === void 0 ? void 0 : _item$width.endsWith('%'));
251
+ }));
252
+ if (isExistPercentWidth) {
253
+ _scroll = props === null || props === void 0 ? void 0 : props.scroll;
254
+ }
235
255
  var handleColumnConfig = /*#__PURE__*/function () {
236
256
  var _ref6 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(checkList) {
237
257
  var newColumns, _columnConfig$onColum, catchColumns;
@@ -361,11 +381,6 @@ function ProTable(props) {
361
381
  return _ref7.apply(this, arguments);
362
382
  };
363
383
  }();
364
- var _rowClassName = function _rowClassName(record, index) {
365
- if (originalDataSource && !originalObj.hasOwnProperty((0, _lodash.get)(record, 'rowKey'))) {
366
- return 'new-cell';
367
- }
368
- };
369
384
  var TableComponent = draggable ? _RcTable.DraggableTable : _RcTable.BaseTable;
370
385
  // 标记样式
371
386
  var tagStyle = {
@@ -422,7 +437,8 @@ function ProTable(props) {
422
437
  summary: summary,
423
438
  dataSource: _dataSource
424
439
  },
425
- dataSource: _dataSource
440
+ dataSource: _dataSource,
441
+ scroll: _scroll
426
442
  })), (0, _jsxRuntime.jsx)("span", {
427
443
  className: "pro-table-resizable-line",
428
444
  style: {
@@ -41,6 +41,10 @@ export interface ProTableColumn extends Omit<ColumnType<any>, 'dataIndex'> {
41
41
  toolTipProps?: TooltipProps & React.RefAttributes<unknown>;
42
42
  transform?: (value: any, record?: any) => string[];
43
43
  show?: boolean | (() => boolean);
44
+ onDiff?: ({ value, originValue }: {
45
+ value: any;
46
+ originValue: any;
47
+ }) => boolean;
44
48
  }
45
49
  export interface CreateTreeFromArrayOptions {
46
50
  itemKey?: string;
@@ -257,12 +257,14 @@
257
257
  }
258
258
  }
259
259
 
260
- .@{ant-prefix}-table-body {
261
- .@{ant-prefix}-table-tbody .@{ant-prefix}-table-row:nth-child(odd).new-cell {
262
- background: #d2fff4 !important;
263
-
264
- td {
265
- background: #d2fff4 !important;
260
+ tbody.@{ant-prefix}-table-tbody {
261
+ tr.@{ant-prefix}-table-row.new-cell {
262
+ background: var(--zaui-contract-bg-add; #d2fff4) !important;
263
+ background-color: var(--zaui-contract-bg-add; #d2fff4) !important;
264
+
265
+ td.@{ant-prefix}-table-cell {
266
+ background: var(--zaui-contract-bg-add; #d2fff4) !important;
267
+ background-color: var(--zaui-contract-bg-add; #d2fff4) !important;
266
268
  border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
267
269
  }
268
270
  }
@@ -270,8 +272,22 @@
270
272
  .@{ant-prefix}-table-cell .varied-cell {
271
273
  margin-left: -8px;
272
274
  padding: var(--zaui-space-size-xs, 4px) var(--zaui-space-size-sm, 8px);
275
+
273
276
  background: var(--zaui-contract-bg; #fffaa1) !important;
274
277
  border-radius: var(--zaui-border-radius, 8px);
278
+ .pro-form-view-container {
279
+ overflow: hidden;
280
+ white-space: nowrap;
281
+ text-overflow: ellipsis;
282
+ }
283
+ }
284
+
285
+ .@{ant-prefix}-table-cell .@{ant-prefix}-typography-ellipsis {
286
+ .pro-form-view-container {
287
+ overflow: hidden;
288
+ white-space: nowrap;
289
+ text-overflow: ellipsis;
290
+ }
275
291
  }
276
292
 
277
293
  .varied-cell.empty-cell {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.8.2",
3
+ "version": "3.8.3-beta.10",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -49,7 +49,8 @@
49
49
  "Android >= 4"
50
50
  ],
51
51
  "resolutions": {
52
- "@types/react": "^17.0.53"
52
+ "@types/react": "^17.0.53",
53
+ "mockjs/commander": "9.2.0"
53
54
  },
54
55
  "dependencies": {
55
56
  "@ant-design/icons": "^4.2.2",
@@ -58,7 +59,7 @@
58
59
  "@dnd-kit/sortable": "^7.0.2",
59
60
  "@dnd-kit/utilities": "^3.2.1",
60
61
  "@pansy/react-watermark": "^3.1.13",
61
- "@zat-design/utils": "1.1.32",
62
+ "@zat-design/utils": "1.1.35",
62
63
  "ahooks": "3.7.4",
63
64
  "antd": "4.24.8",
64
65
  "big.js": "^6.2.1",
@@ -1,5 +0,0 @@
1
- {
2
- "recommendations": [
3
- "kisstkondoros.vscode-codemetrics"
4
- ]
5
- }