@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.
- package/coverage/lcov-report/src/.umi/core/devScripts.ts.html +241 -0
- package/coverage/lcov-report/src/.umi/core/history.ts.html +148 -0
- package/coverage/lcov-report/src/.umi/core/index.html +206 -0
- package/coverage/lcov-report/src/.umi/core/plugin.ts.html +109 -0
- package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +160 -0
- package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +97 -0
- package/coverage/lcov-report/src/.umi/core/routes.ts.html +26050 -0
- package/coverage/lcov-report/src/.umi/core/umiExports.ts.html +112 -0
- package/coverage/lcov-report/src/.umi/dumi/demos/index.html +116 -0
- package/coverage/lcov-report/src/.umi/dumi/demos/index.ts.html +6340 -0
- package/coverage/lcov-report/src/.umi/dumi/index.html +116 -0
- package/coverage/lcov-report/src/.umi/dumi/layout.tsx.html +109 -0
- package/coverage/lcov-report/src/.umi/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-antd/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-antd/runtime.tsx.html +172 -0
- package/coverage/lcov-report/src/.umi/plugin-helmet/exports.ts.html +94 -0
- package/coverage/lcov-report/src/.umi/plugin-helmet/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/Provider.tsx.html +196 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/exports.ts.html +106 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/initialState.ts.html +88 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/runtime.tsx.html +124 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/SelectLang.tsx.html +1246 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/index.html +161 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/locale.tsx.html +268 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/localeExports.ts.html +778 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/runtime.tsx.html +115 -0
- package/coverage/lcov-report/src/.umi/plugin-model/Provider.tsx.html +202 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/constant.tsx.html +97 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/dispatcher.tsx.html +142 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/executor.tsx.html +334 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-model/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-model/runtime.tsx.html +121 -0
- package/coverage/lcov-report/src/.umi/plugin-model/useModel.tsx.html +298 -0
- package/coverage/lcov-report/src/.umi/plugin-request/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-request/request.ts.html +919 -0
- package/coverage/lcov-report/src/.umi/umi.ts.html +268 -0
- package/dist/index.esm.css +32 -8
- package/dist/less.esm.css +32 -8
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +22 -7
- package/es/ProEditTable/components/RenderField/index.js +9 -1
- package/es/ProEditTable/index.js +0 -1
- package/es/ProEditTable/propsType.d.ts +0 -1
- package/es/ProEditTable/utils/index.js +10 -3
- package/es/ProEnum/hooks/useEnumRequest.js +1 -1
- package/es/ProEnum/index.js +2 -2
- package/es/ProForm/components/base/InputNumber/index.js +1 -1
- package/es/ProForm/components/combination/FormList/components/BlockFields.d.ts +2 -0
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +4 -2
- package/es/ProForm/components/combination/FormList/components/LineFields.d.ts +2 -0
- package/es/ProForm/components/combination/FormList/components/LineFields.js +4 -2
- package/es/ProForm/components/combination/FormList/index.js +14 -3
- package/es/ProForm/components/combination/Group/component/ComRender.d.ts +1 -0
- package/es/ProForm/components/combination/Group/component/ComRender.js +4 -2
- package/es/ProForm/components/combination/Group/index.js +6 -3
- package/es/ProForm/components/combination/ProCascader/index.js +20 -13
- package/es/ProForm/components/combination/ProModalSelect/index.js +17 -3
- package/es/ProForm/components/render/ChangedWrapper.js +20 -2
- package/es/ProForm/components/render/Render.js +6 -3
- package/es/ProForm/components/render/RenderFields.js +4 -2
- package/es/ProForm/components/render/propsType.d.ts +4 -0
- package/es/ProForm/propsType.d.ts +1 -0
- package/es/ProForm/style/index.less +22 -2
- package/es/ProForm/utils/diffOriginal.js +14 -2
- package/es/ProForm/utils/useShouldUpdate.js +20 -13
- package/es/ProTable/components/FormatColumn/index.d.ts +4 -1
- package/es/ProTable/components/FormatColumn/index.js +180 -30
- package/es/ProTable/components/RenderColumn/index.d.ts +2 -0
- package/es/ProTable/components/RenderColumn/index.js +28 -10
- package/es/ProTable/index.js +26 -10
- package/es/ProTable/propsType.d.ts +4 -0
- package/es/ProTable/style/index.less +22 -6
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +25 -10
- package/lib/ProEditTable/components/RenderField/index.js +9 -1
- package/lib/ProEditTable/index.js +0 -1
- package/lib/ProEditTable/propsType.d.ts +0 -1
- package/lib/ProEditTable/utils/index.js +10 -3
- package/lib/ProEnum/hooks/useEnumRequest.js +1 -1
- package/lib/ProEnum/index.js +2 -2
- package/lib/ProForm/components/base/InputNumber/index.js +1 -1
- package/lib/ProForm/components/combination/FormList/components/BlockFields.d.ts +2 -0
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +4 -2
- package/lib/ProForm/components/combination/FormList/components/LineFields.d.ts +2 -0
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +4 -2
- package/lib/ProForm/components/combination/FormList/index.js +14 -3
- package/lib/ProForm/components/combination/Group/component/ComRender.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/component/ComRender.js +4 -2
- package/lib/ProForm/components/combination/Group/index.js +6 -3
- package/lib/ProForm/components/combination/ProCascader/index.js +20 -13
- package/lib/ProForm/components/combination/ProModalSelect/index.js +17 -3
- package/lib/ProForm/components/render/ChangedWrapper.js +20 -2
- package/lib/ProForm/components/render/Render.js +6 -3
- package/lib/ProForm/components/render/RenderFields.js +4 -2
- package/lib/ProForm/components/render/propsType.d.ts +4 -0
- package/lib/ProForm/propsType.d.ts +1 -0
- package/lib/ProForm/style/index.less +22 -2
- package/lib/ProForm/utils/diffOriginal.js +13 -1
- package/lib/ProForm/utils/useShouldUpdate.js +18 -11
- package/lib/ProTable/components/FormatColumn/index.d.ts +4 -1
- package/lib/ProTable/components/FormatColumn/index.js +179 -29
- package/lib/ProTable/components/RenderColumn/index.d.ts +2 -0
- package/lib/ProTable/components/RenderColumn/index.js +27 -9
- package/lib/ProTable/index.js +26 -10
- package/lib/ProTable/propsType.d.ts +4 -0
- package/lib/ProTable/style/index.less +22 -6
- package/package.json +4 -3
- package/.vscode/extensions.json +0 -5
package/lib/ProTable/index.js
CHANGED
|
@@ -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-
|
|
261
|
-
.@{ant-prefix}-table-
|
|
262
|
-
background: #d2fff4 !important;
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
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.
|
|
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.
|
|
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",
|