@zat-design/sisyphus-react 3.9.0 → 3.9.1-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/dist/index.esm.css +71 -37
- package/dist/less.esm.css +67 -35
- package/es/ProDrawerForm/components/ProDrawer/index.js +3 -1
- package/es/ProDrawerForm/components/ProModal/index.js +5 -3
- package/es/ProDrawerForm/propsType.d.ts +1 -0
- package/es/ProDrawerForm/style/index.less +3 -0
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +7 -3
- package/es/ProEditTable/components/RenderField/index.js +3 -2
- package/es/ProEditTable/index.js +23 -16
- package/es/ProEditTable/style/index.less +22 -3
- package/es/ProEnum/index.js +10 -5
- package/es/ProEnum/propsType.d.ts +1 -0
- package/es/ProForm/components/base/SwitchCheckbox/index.js +9 -2
- package/es/ProForm/components/combination/FormList/index.js +1 -1
- package/es/ProForm/components/combination/Group/component/ComRender.d.ts +1 -0
- package/es/ProForm/components/combination/Group/component/ComRender.js +12 -1
- package/es/ProForm/components/combination/Group/index.js +4 -3
- package/es/ProForm/components/combination/ProCascader/index.js +7 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +40 -38
- package/es/ProForm/components/render/ChangedWrapper.js +3 -3
- package/es/ProForm/components/render/RenderFields.js +3 -2
- package/es/ProForm/components/render/propsType.d.ts +1 -0
- package/es/ProForm/style/index.less +12 -8
- package/es/ProForm/utils/diffOriginal.js +18 -12
- package/es/ProTable/components/FormatColumn/index.d.ts +5 -3
- package/es/ProTable/components/FormatColumn/index.js +93 -72
- package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/es/ProTable/components/RenderColumn/index.js +41 -23
- package/es/ProTable/components/TableResizable/index.js +1 -5
- package/es/ProTable/index.d.ts +6 -5
- package/es/ProTable/index.js +4 -6
- package/es/ProTable/propsType.d.ts +2 -1
- package/es/ProTable/style/index.less +20 -6
- package/es/ProTable/utils/index.d.ts +5 -2
- package/es/ProTable/utils/index.js +13 -4
- package/es/ProTree/components/ProTreeSelect/index.js +32 -13
- package/es/style/theme/antd.less +4 -2
- package/es/utils/index.d.ts +1 -1
- package/es/utils/index.js +4 -1
- package/lib/ProDrawerForm/components/ProDrawer/index.js +3 -1
- package/lib/ProDrawerForm/components/ProModal/index.js +5 -3
- package/lib/ProDrawerForm/propsType.d.ts +1 -0
- package/lib/ProDrawerForm/style/index.less +3 -0
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +5 -1
- package/lib/ProEditTable/components/RenderField/index.js +3 -2
- package/lib/ProEditTable/index.js +23 -16
- package/lib/ProEditTable/style/index.less +22 -3
- package/lib/ProEnum/index.js +10 -5
- package/lib/ProEnum/propsType.d.ts +1 -0
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +9 -2
- package/lib/ProForm/components/combination/FormList/index.js +1 -1
- package/lib/ProForm/components/combination/Group/component/ComRender.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/component/ComRender.js +12 -1
- package/lib/ProForm/components/combination/Group/index.js +4 -3
- package/lib/ProForm/components/combination/ProCascader/index.js +7 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +39 -37
- package/lib/ProForm/components/render/ChangedWrapper.js +3 -3
- package/lib/ProForm/components/render/RenderFields.js +3 -2
- package/lib/ProForm/components/render/propsType.d.ts +1 -0
- package/lib/ProForm/style/index.less +12 -8
- package/lib/ProForm/utils/diffOriginal.js +18 -12
- package/lib/ProTable/components/FormatColumn/index.d.ts +5 -3
- package/lib/ProTable/components/FormatColumn/index.js +92 -71
- package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/lib/ProTable/components/RenderColumn/index.js +41 -23
- package/lib/ProTable/components/TableResizable/index.js +0 -4
- package/lib/ProTable/index.d.ts +6 -5
- package/lib/ProTable/index.js +4 -6
- package/lib/ProTable/propsType.d.ts +2 -1
- package/lib/ProTable/style/index.less +20 -6
- package/lib/ProTable/utils/index.d.ts +5 -2
- package/lib/ProTable/utils/index.js +13 -4
- package/lib/ProTree/components/ProTreeSelect/index.js +31 -12
- package/lib/style/theme/antd.less +4 -2
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +4 -1
- package/package.json +2 -2
@@ -257,15 +257,23 @@
|
|
257
257
|
}
|
258
258
|
}
|
259
259
|
|
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
260
|
|
265
|
-
|
266
|
-
|
261
|
+
.@{ant-prefix}-table table tbody.@{ant-prefix}-table-tbody,
|
262
|
+
.@{ant-prefix}-table.@{ant-prefix}-table-scroll-horizontal table tbody.@{ant-prefix}-table-tbody {
|
263
|
+
tr.@{ant-prefix}-table-row.new-cell,
|
264
|
+
tr.@{ant-prefix}-table-row.new-cell:hover {
|
265
|
+
background-color: var(--zaui-contract-bg-add; #d2fff4) !important;
|
266
|
+
td.@{ant-prefix}-table-cell{
|
267
267
|
background-color: var(--zaui-contract-bg-add; #d2fff4) !important;
|
268
268
|
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
269
|
+
&.@{ant-prefix}-table-cell-fix-right {
|
270
|
+
background-color: var(--zaui-contract-bg-add; #d2fff4) !important;
|
271
|
+
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
272
|
+
}
|
273
|
+
&.@{ant-prefix}-table-cell-fix-left {
|
274
|
+
background-color: var(--zaui-contract-bg-add; #d2fff4) !important;
|
275
|
+
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
276
|
+
}
|
269
277
|
}
|
270
278
|
}
|
271
279
|
|
@@ -574,3 +582,9 @@
|
|
574
582
|
}
|
575
583
|
}
|
576
584
|
}
|
585
|
+
|
586
|
+
.@{ant-prefix}-table{
|
587
|
+
.original-value-tooltip{
|
588
|
+
position: fixed;
|
589
|
+
}
|
590
|
+
}
|
@@ -11,9 +11,12 @@ export declare const getDecimalDigits: (num?: number) => number;
|
|
11
11
|
* @param any value
|
12
12
|
* @param any originalObj
|
13
13
|
* @param {any} dataIndex
|
14
|
-
* @return {any}
|
14
|
+
* @return {any} isChanged 返回bool值,表示存在比对
|
15
15
|
*/
|
16
|
-
export declare const getOriginalValue: (value: any, record: any, originalObj: any, rowKey: any, dataIndex: any) =>
|
16
|
+
export declare const getOriginalValue: (value: any, record: any, originalObj: any, rowKey: any, dataIndex: any) => {
|
17
|
+
originalValue: any;
|
18
|
+
isChanged: boolean;
|
19
|
+
};
|
17
20
|
export declare const getColumnDataIndex: (dataIndex: string | string[]) => string;
|
18
21
|
/**
|
19
22
|
* 判断数据是否为Response<List<any>>结构
|
@@ -22,18 +22,27 @@ var getDecimalDigits = exports.getDecimalDigits = function getDecimalDigits() {
|
|
22
22
|
* @param any value
|
23
23
|
* @param any originalObj
|
24
24
|
* @param {any} dataIndex
|
25
|
-
* @return {any}
|
25
|
+
* @return {any} isChanged 返回bool值,表示存在比对
|
26
26
|
*/
|
27
27
|
var getOriginalValue = exports.getOriginalValue = function getOriginalValue(value, record, originalObj, rowKey, dataIndex) {
|
28
28
|
if (!originalObj) {
|
29
|
-
return
|
29
|
+
return {
|
30
|
+
originalValue: null,
|
31
|
+
isChanged: null
|
32
|
+
};
|
30
33
|
}
|
31
34
|
var originalRecord = (0, _lodash.get)(originalObj, (0, _lodash.get)(record, rowKey));
|
32
35
|
var originalValue = (0, _lodash.get)(originalRecord, dataIndex);
|
33
36
|
if (!(0, _lodash.isEqual)(originalValue, value)) {
|
34
|
-
return
|
37
|
+
return {
|
38
|
+
originalValue: originalValue,
|
39
|
+
isChanged: true
|
40
|
+
};
|
35
41
|
}
|
36
|
-
return
|
42
|
+
return {
|
43
|
+
originalValue: null,
|
44
|
+
isChanged: false
|
45
|
+
};
|
37
46
|
};
|
38
47
|
var getColumnDataIndex = exports.getColumnDataIndex = function getColumnDataIndex(dataIndex) {
|
39
48
|
return typeof dataIndex === 'string' ? dataIndex : dataIndex === null || dataIndex === void 0 ? void 0 : dataIndex.join('-');
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
});
|
7
7
|
exports.default = exports.ProTreeSelect = void 0;
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
9
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
10
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
9
11
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
10
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
11
13
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
@@ -398,18 +400,35 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
398
400
|
sourceList = _filterData(sourceList);
|
399
401
|
return sourceList;
|
400
402
|
}
|
401
|
-
var searchTreeEvent = function
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
403
|
+
var searchTreeEvent = (0, _lodash.debounce)(/*#__PURE__*/function () {
|
404
|
+
var _ref5 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(searchVal) {
|
405
|
+
var result;
|
406
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
407
|
+
while (1) switch (_context.prev = _context.next) {
|
408
|
+
case 0:
|
409
|
+
if (searchVal) {
|
410
|
+
_context.next = 3;
|
411
|
+
break;
|
412
|
+
}
|
413
|
+
setState({
|
414
|
+
selectList: (0, _lodash.cloneDeep)(origDataSource || [])
|
415
|
+
});
|
416
|
+
return _context.abrupt("return", null);
|
417
|
+
case 3:
|
418
|
+
result = filterTree((0, _lodash.cloneDeep)(origDataSource || []), searchVal);
|
419
|
+
setState({
|
420
|
+
selectList: result || []
|
421
|
+
});
|
422
|
+
case 5:
|
423
|
+
case "end":
|
424
|
+
return _context.stop();
|
425
|
+
}
|
426
|
+
}, _callee);
|
427
|
+
}));
|
428
|
+
return function (_x) {
|
429
|
+
return _ref5.apply(this, arguments);
|
430
|
+
};
|
431
|
+
}(), 500);
|
413
432
|
function findTreeNode(treeList, nodeValue) {
|
414
433
|
var result = {};
|
415
434
|
var _filterData2 = function filterData(data) {
|
@@ -280,8 +280,10 @@
|
|
280
280
|
table {
|
281
281
|
.@{ant-prefix}-table-tbody {
|
282
282
|
.@{ant-prefix}-table-row:nth-child(even) {
|
283
|
-
&:hover td
|
284
|
-
|
283
|
+
&:hover td,
|
284
|
+
&:hover td.@{ant-prefix}-table-cell-fix-right,
|
285
|
+
&:hover td.@{ant-prefix}-table-cell-fix-left {
|
286
|
+
background-color: @zaui-table-hover-bg !important;
|
285
287
|
}
|
286
288
|
|
287
289
|
& td,
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.js
CHANGED
@@ -9,7 +9,10 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
9
9
|
var _react = require("react");
|
10
10
|
var EMPTY_VALUE = [undefined, null, ''];
|
11
11
|
/** 判断一个值是否是空值 */
|
12
|
-
var isEmpty = exports.isEmpty = function isEmpty(value) {
|
12
|
+
var isEmpty = exports.isEmpty = function isEmpty(value, emptyValue) {
|
13
|
+
if (emptyValue) {
|
14
|
+
EMPTY_VALUE.push(emptyValue);
|
15
|
+
}
|
13
16
|
if (EMPTY_VALUE.includes(value)) {
|
14
17
|
return true;
|
15
18
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@zat-design/sisyphus-react",
|
3
|
-
"version": "3.9.
|
3
|
+
"version": "3.9.1-beta.10",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"module": "es/index.js",
|
@@ -59,7 +59,7 @@
|
|
59
59
|
"@dnd-kit/sortable": "^7.0.2",
|
60
60
|
"@dnd-kit/utilities": "^3.2.1",
|
61
61
|
"@pansy/react-watermark": "^3.1.13",
|
62
|
-
"@zat-design/utils": "1.1.
|
62
|
+
"@zat-design/utils": "1.1.36",
|
63
63
|
"ahooks": "3.7.4",
|
64
64
|
"antd": "4.24.8",
|
65
65
|
"big.js": "^6.2.1",
|