@zat-design/sisyphus-react 3.9.1 → 3.9.2-beta.1

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 (47) hide show
  1. package/dist/index.esm.css +70 -29
  2. package/dist/less.esm.css +70 -29
  3. package/es/ProDrawerForm/style/index.less +3 -0
  4. package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +2 -1
  5. package/es/ProEditTable/propsType.d.ts +2 -0
  6. package/es/ProEditTable/style/index.less +11 -4
  7. package/es/ProEnum/index.js +5 -3
  8. package/es/ProForm/components/combination/FormList/index.js +1 -1
  9. package/es/ProForm/components/combination/Group/index.js +15 -8
  10. package/es/ProForm/components/combination/Group/propsType.d.ts +2 -0
  11. package/es/ProForm/components/combination/Group/style/index.less +15 -0
  12. package/es/ProForm/components/combination/Group/utils.js +43 -9
  13. package/es/ProForm/components/combination/ProCascader/index.js +7 -1
  14. package/es/ProForm/components/combination/ProModalSelect/index.js +14 -13
  15. package/es/ProForm/components/render/ChangedWrapper.js +2 -1
  16. package/es/ProForm/style/index.less +2 -2
  17. package/es/ProLayout/style/index.less +5 -0
  18. package/es/ProTable/components/FormatColumn/index.js +69 -29
  19. package/es/ProTable/components/RenderColumn/index.d.ts +2 -0
  20. package/es/ProTable/components/RenderColumn/index.js +3 -5
  21. package/es/ProTable/propsType.d.ts +4 -5
  22. package/es/ProTable/style/index.less +35 -17
  23. package/es/ProTable/utils/index.d.ts +2 -0
  24. package/es/ProTable/utils/index.js +16 -3
  25. package/lib/ProDrawerForm/style/index.less +3 -0
  26. package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +2 -1
  27. package/lib/ProEditTable/propsType.d.ts +2 -0
  28. package/lib/ProEditTable/style/index.less +11 -4
  29. package/lib/ProEnum/index.js +5 -3
  30. package/lib/ProForm/components/combination/FormList/index.js +1 -1
  31. package/lib/ProForm/components/combination/Group/index.js +15 -8
  32. package/lib/ProForm/components/combination/Group/propsType.d.ts +2 -0
  33. package/lib/ProForm/components/combination/Group/style/index.less +15 -0
  34. package/lib/ProForm/components/combination/Group/utils.js +44 -9
  35. package/lib/ProForm/components/combination/ProCascader/index.js +7 -1
  36. package/lib/ProForm/components/combination/ProModalSelect/index.js +14 -13
  37. package/lib/ProForm/components/render/ChangedWrapper.js +2 -1
  38. package/lib/ProForm/style/index.less +2 -2
  39. package/lib/ProLayout/style/index.less +5 -0
  40. package/lib/ProTable/components/FormatColumn/index.js +69 -29
  41. package/lib/ProTable/components/RenderColumn/index.d.ts +2 -0
  42. package/lib/ProTable/components/RenderColumn/index.js +3 -5
  43. package/lib/ProTable/propsType.d.ts +4 -5
  44. package/lib/ProTable/style/index.less +35 -17
  45. package/lib/ProTable/utils/index.d.ts +2 -0
  46. package/lib/ProTable/utils/index.js +16 -3
  47. package/package.json +2 -2
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.isListResult = exports.getRowKey = exports.getOriginalValue = exports.getDecimalDigits = exports.getColumnDataIndex = void 0;
7
7
  var _lodash = require("lodash");
8
+ var _utils = require("@zat-design/utils");
9
+ var isEmpty = _utils.validate.isEmpty;
8
10
  /**
9
11
  * 获取小数点后的位数
10
12
  * @param num 数字
@@ -23,25 +25,36 @@ var getDecimalDigits = exports.getDecimalDigits = function getDecimalDigits() {
23
25
  * @param any originalObj
24
26
  * @param {any} dataIndex
25
27
  * @return {any} isChanged 返回bool值,表示存在比对
28
+ * @return {any} isAddCell 返回bool值,表示存在比对
26
29
  */
27
30
  var getOriginalValue = exports.getOriginalValue = function getOriginalValue(value, record, originalObj, rowKey, dataIndex) {
28
31
  if (!originalObj) {
29
32
  return {
30
33
  originalValue: null,
31
- isChanged: null
34
+ isChanged: null,
35
+ isAddCell: null
32
36
  };
33
37
  }
34
38
  var originalRecord = (0, _lodash.get)(originalObj, (0, _lodash.get)(record, rowKey));
35
39
  var originalValue = (0, _lodash.get)(originalRecord, dataIndex);
40
+ if (isEmpty(originalValue) && !isEmpty(value)) {
41
+ return {
42
+ originalValue: originalValue,
43
+ isAddCell: true,
44
+ isChanged: false
45
+ };
46
+ }
36
47
  if (!(0, _lodash.isEqual)(originalValue, value)) {
37
48
  return {
38
49
  originalValue: originalValue,
39
- isChanged: true
50
+ isChanged: true,
51
+ isAddCell: false
40
52
  };
41
53
  }
42
54
  return {
43
55
  originalValue: null,
44
- isChanged: false
56
+ isChanged: false,
57
+ isAddCell: false
45
58
  };
46
59
  };
47
60
  var getColumnDataIndex = exports.getColumnDataIndex = function getColumnDataIndex(dataIndex) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.9.1",
3
+ "version": "3.9.2-beta.1",
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.35",
62
+ "@zat-design/utils": "1.1.37",
63
63
  "ahooks": "3.7.4",
64
64
  "antd": "4.24.8",
65
65
  "big.js": "^6.2.1",