@zat-design/sisyphus-react 3.8.3 → 3.9.0-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/.vscode/extensions.json +5 -0
- package/dist/index.esm.css +48 -3
- package/dist/less.esm.css +47 -2
- 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/ProEditTable/components/RenderField/ListChangedWrapper.js +83 -20
- package/es/ProEditTable/components/RenderField/index.js +6 -2
- package/es/ProEditTable/index.js +18 -9
- package/es/ProEditTable/propsType.d.ts +3 -6
- package/es/ProEditTable/style/index.less +0 -1
- package/es/ProEditTable/utils/index.js +10 -3
- package/es/ProEnum/index.js +1 -1
- 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/index.js +5 -5
- package/es/ProForm/components/combination/ProCascader/index.js +21 -14
- package/es/ProForm/components/combination/ProModalSelect/index.js +19 -4
- package/es/ProForm/components/render/ChangedWrapper.js +30 -11
- package/es/ProForm/components/render/Render.js +3 -1
- package/es/ProForm/components/render/RenderFields.js +4 -2
- package/es/ProForm/propsType.d.ts +3 -0
- package/es/ProForm/style/index.less +35 -9
- package/es/ProForm/utils/diffOriginal.js +14 -2
- package/es/ProForm/utils/useShouldUpdate.js +1 -9
- package/es/ProTable/components/FormatColumn/index.d.ts +3 -2
- package/es/ProTable/components/FormatColumn/index.js +143 -62
- package/es/ProTable/components/RenderColumn/index.d.ts +2 -0
- package/es/ProTable/components/RenderColumn/index.js +50 -19
- package/es/ProTable/index.d.ts +6 -5
- package/es/ProTable/index.js +12 -12
- package/es/ProTable/propsType.d.ts +6 -0
- package/es/ProTable/style/index.less +24 -1
- package/es/ProTable/utils/index.js +2 -2
- package/es/ProTree/components/ProTreeSelect/index.js +32 -13
- package/es/style/theme/antd.less +1 -1
- package/es/utils/index.d.ts +2 -1
- package/es/utils/index.js +30 -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/ProEditTable/components/RenderField/ListChangedWrapper.js +82 -21
- package/lib/ProEditTable/components/RenderField/index.js +6 -2
- package/lib/ProEditTable/index.js +18 -9
- package/lib/ProEditTable/propsType.d.ts +3 -6
- package/lib/ProEditTable/style/index.less +0 -1
- package/lib/ProEditTable/utils/index.js +10 -3
- package/lib/ProEnum/index.js +1 -1
- 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/index.js +5 -5
- package/lib/ProForm/components/combination/ProCascader/index.js +21 -14
- package/lib/ProForm/components/combination/ProModalSelect/index.js +19 -4
- package/lib/ProForm/components/render/ChangedWrapper.js +30 -11
- package/lib/ProForm/components/render/Render.js +3 -1
- package/lib/ProForm/components/render/RenderFields.js +4 -2
- package/lib/ProForm/propsType.d.ts +3 -0
- package/lib/ProForm/style/index.less +35 -9
- package/lib/ProForm/utils/diffOriginal.js +13 -1
- package/lib/ProForm/utils/useShouldUpdate.js +1 -9
- package/lib/ProTable/components/FormatColumn/index.d.ts +3 -2
- package/lib/ProTable/components/FormatColumn/index.js +143 -62
- package/lib/ProTable/components/RenderColumn/index.d.ts +2 -0
- package/lib/ProTable/components/RenderColumn/index.js +47 -18
- package/lib/ProTable/index.d.ts +6 -5
- package/lib/ProTable/index.js +12 -12
- package/lib/ProTable/propsType.d.ts +6 -0
- package/lib/ProTable/style/index.less +24 -1
- package/lib/ProTable/utils/index.js +2 -2
- package/lib/ProTree/components/ProTreeSelect/index.js +31 -12
- package/lib/style/theme/antd.less +1 -1
- package/lib/utils/index.d.ts +2 -1
- package/lib/utils/index.js +32 -2
- package/package.json +1 -1
|
@@ -261,19 +261,42 @@
|
|
|
261
261
|
tr.@{ant-prefix}-table-row.new-cell {
|
|
262
262
|
background: var(--zaui-contract-bg-add; #d2fff4) !important;
|
|
263
263
|
background-color: var(--zaui-contract-bg-add; #d2fff4) !important;
|
|
264
|
-
|
|
265
264
|
td.@{ant-prefix}-table-cell {
|
|
266
265
|
background: var(--zaui-contract-bg-add; #d2fff4) !important;
|
|
267
266
|
background-color: var(--zaui-contract-bg-add; #d2fff4) !important;
|
|
268
267
|
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
|
268
|
+
&.@{ant-prefix}-table-cell-fix-right {
|
|
269
|
+
background: var(--zaui-contract-bg-add; #d2fff4) !important;
|
|
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: var(--zaui-contract-bg-add; #d2fff4) !important;
|
|
275
|
+
background-color: var(--zaui-contract-bg-add; #d2fff4) !important;
|
|
276
|
+
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
|
277
|
+
}
|
|
269
278
|
}
|
|
270
279
|
}
|
|
271
280
|
|
|
272
281
|
.@{ant-prefix}-table-cell .varied-cell {
|
|
273
282
|
margin-left: -8px;
|
|
274
283
|
padding: var(--zaui-space-size-xs, 4px) var(--zaui-space-size-sm, 8px);
|
|
284
|
+
|
|
275
285
|
background: var(--zaui-contract-bg; #fffaa1) !important;
|
|
276
286
|
border-radius: var(--zaui-border-radius, 8px);
|
|
287
|
+
.pro-form-view-container {
|
|
288
|
+
overflow: hidden;
|
|
289
|
+
white-space: nowrap;
|
|
290
|
+
text-overflow: ellipsis;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.@{ant-prefix}-table-cell .@{ant-prefix}-typography-ellipsis {
|
|
295
|
+
.pro-form-view-container {
|
|
296
|
+
overflow: hidden;
|
|
297
|
+
white-space: nowrap;
|
|
298
|
+
text-overflow: ellipsis;
|
|
299
|
+
}
|
|
277
300
|
}
|
|
278
301
|
|
|
279
302
|
.varied-cell.empty-cell {
|
|
@@ -26,14 +26,14 @@ var getDecimalDigits = exports.getDecimalDigits = function getDecimalDigits() {
|
|
|
26
26
|
*/
|
|
27
27
|
var getOriginalValue = exports.getOriginalValue = function getOriginalValue(value, record, originalObj, rowKey, dataIndex) {
|
|
28
28
|
if (!originalObj) {
|
|
29
|
-
return
|
|
29
|
+
return null;
|
|
30
30
|
}
|
|
31
31
|
var originalRecord = (0, _lodash.get)(originalObj, (0, _lodash.get)(record, rowKey));
|
|
32
32
|
var originalValue = (0, _lodash.get)(originalRecord, dataIndex);
|
|
33
33
|
if (!(0, _lodash.isEqual)(originalValue, value)) {
|
|
34
34
|
return originalValue;
|
|
35
35
|
}
|
|
36
|
-
return
|
|
36
|
+
return null;
|
|
37
37
|
};
|
|
38
38
|
var getColumnDataIndex = exports.getColumnDataIndex = function getColumnDataIndex(dataIndex) {
|
|
39
39
|
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) {
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.isEmpty = void 0;
|
|
7
|
+
exports.useFocus = exports.isEmpty = void 0;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
var _react = require("react");
|
|
7
10
|
var EMPTY_VALUE = [undefined, null, ''];
|
|
8
11
|
/** 判断一个值是否是空值 */
|
|
9
|
-
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
|
+
}
|
|
10
16
|
if (EMPTY_VALUE.includes(value)) {
|
|
11
17
|
return true;
|
|
12
18
|
}
|
|
@@ -16,4 +22,28 @@ var isEmpty = exports.isEmpty = function isEmpty(value) {
|
|
|
16
22
|
});
|
|
17
23
|
}
|
|
18
24
|
return false;
|
|
25
|
+
};
|
|
26
|
+
var useFocus = exports.useFocus = function useFocus(element) {
|
|
27
|
+
var _useState = (0, _react.useState)(false),
|
|
28
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
29
|
+
focus = _useState2[0],
|
|
30
|
+
setFocus = _useState2[1];
|
|
31
|
+
(0, _react.useEffect)(function () {
|
|
32
|
+
if (!element) return;
|
|
33
|
+
element.addEventListener('focus', function () {
|
|
34
|
+
setFocus(true);
|
|
35
|
+
}, true);
|
|
36
|
+
element.addEventListener('blur', function () {
|
|
37
|
+
setFocus(false);
|
|
38
|
+
}, true);
|
|
39
|
+
return function () {
|
|
40
|
+
element.removeEventListener('focus', function () {
|
|
41
|
+
setFocus(true);
|
|
42
|
+
}, true);
|
|
43
|
+
element.removeEventListener('blur', function () {
|
|
44
|
+
setFocus(false);
|
|
45
|
+
}, true);
|
|
46
|
+
};
|
|
47
|
+
}, [element]);
|
|
48
|
+
return focus;
|
|
19
49
|
};
|