@zat-design/sisyphus-react 3.9.0-beta.1 → 3.9.0-beta.11
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 +10 -1
- package/dist/less.esm.css +10 -1
- 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/ProEnum/index.js +6 -4
- package/es/ProEnum/propsType.d.ts +1 -0
- package/es/ProForm/components/combination/Group/index.js +4 -3
- package/es/ProForm/components/combination/ProModalSelect/index.js +2 -1
- package/es/ProForm/components/render/ChangedWrapper.js +0 -1
- package/es/ProForm/style/index.less +0 -1
- package/es/ProTable/components/FormatColumn/index.d.ts +5 -3
- package/es/ProTable/components/FormatColumn/index.js +89 -71
- package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/es/ProTable/components/RenderColumn/index.js +28 -7
- 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 +10 -1
- 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/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/ProEnum/index.js +6 -4
- package/lib/ProEnum/propsType.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/index.js +4 -3
- package/lib/ProForm/components/combination/ProModalSelect/index.js +2 -1
- package/lib/ProForm/components/render/ChangedWrapper.js +0 -1
- package/lib/ProForm/style/index.less +0 -1
- package/lib/ProTable/components/FormatColumn/index.d.ts +5 -3
- package/lib/ProTable/components/FormatColumn/index.js +89 -71
- package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/lib/ProTable/components/RenderColumn/index.js +28 -7
- 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 +10 -1
- 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/utils/index.d.ts +1 -1
- package/lib/utils/index.js +4 -1
- package/package.json +1 -1
|
@@ -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) {
|
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
|
}
|