@zat-design/sisyphus-react 3.8.0-beat.3 → 3.8.0-beat.4

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.
@@ -294,9 +294,19 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
294
294
  var _renderTreeNode = function renderTreeNode(node, grade) {
295
295
  var children = node.children,
296
296
  icon = node.icon;
297
- var labelText = node === null || node === void 0 ? void 0 : node.label;
298
- var value = node === null || node === void 0 ? void 0 : node.value;
297
+ var labelText = node[label];
298
+ var value = node[code];
299
299
  var key = node[uuidKey];
300
+ // 三无走默认
301
+ if (['undefined-undefined', 'undefined'].includes(labelText) && !value && !key) {
302
+ if (showCodeName) {
303
+ labelText = "".concat(node === null || node === void 0 ? void 0 : node.value, "-").concat(node === null || node === void 0 ? void 0 : node.label);
304
+ } else {
305
+ labelText = node === null || node === void 0 ? void 0 : node.label;
306
+ }
307
+ value = node === null || node === void 0 ? void 0 : node.value;
308
+ key = node === null || node === void 0 ? void 0 : node.value;
309
+ }
300
310
  var titleHtml = _jsx("span", {
301
311
  dangerouslySetInnerHTML: {
302
312
  __html: labelText
@@ -294,9 +294,19 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
294
294
  var _renderTreeNode = function renderTreeNode(node, grade) {
295
295
  var children = node.children,
296
296
  icon = node.icon;
297
- var labelText = node === null || node === void 0 ? void 0 : node.label;
298
- var value = node === null || node === void 0 ? void 0 : node.value;
297
+ var labelText = node[label];
298
+ var value = node[code];
299
299
  var key = node[uuidKey];
300
+ // 三无走默认
301
+ if (['undefined-undefined', 'undefined'].includes(labelText) && !value && !key) {
302
+ if (showCodeName) {
303
+ labelText = "".concat(node === null || node === void 0 ? void 0 : node.value, "-").concat(node === null || node === void 0 ? void 0 : node.label);
304
+ } else {
305
+ labelText = node === null || node === void 0 ? void 0 : node.label;
306
+ }
307
+ value = node === null || node === void 0 ? void 0 : node.value;
308
+ key = node === null || node === void 0 ? void 0 : node.value;
309
+ }
300
310
  var titleHtml = (0, _jsxRuntime.jsx)("span", {
301
311
  dangerouslySetInnerHTML: {
302
312
  __html: labelText
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.8.0-beat.3",
3
+ "version": "3.8.0-beat.4",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -96,7 +96,7 @@
96
96
  "@zat-design/login-react": "1.0.25",
97
97
  "babel-eslint": "10.0.3",
98
98
  "babel-plugin-import": "^1.13.3",
99
- "commander": "<=9.2.0",
99
+ "commander": "9.2.0",
100
100
  "cross-env": "^7.0.3",
101
101
  "dumi": "^1.0.9",
102
102
  "eslint": "7.10.0",
@@ -114,7 +114,6 @@
114
114
  "jest-canvas-mock": "^2.5.2",
115
115
  "lint-staged": "^10.0.0",
116
116
  "mockjs": "^1.1.0",
117
- "patch-package": "^8.0.0",
118
117
  "prettier": "^2.5.0",
119
118
  "pretty-quick": "^3.1.3",
120
119
  "react-json-view": "^1.21.3",
@@ -1,49 +0,0 @@
1
- diff --git a/node_modules/rc-table/es/Cell/index.js b/node_modules/rc-table/es/Cell/index.js
2
- index 4f49ea7..00de314 100644
3
- --- a/node_modules/rc-table/es/Cell/index.js
4
- +++ b/node_modules/rc-table/es/Cell/index.js
5
- @@ -8,6 +8,7 @@ var _excluded = ["colSpan", "rowSpan", "style", "className"];
6
- import * as React from 'react';
7
- import classNames from 'classnames';
8
- import shallowEqual from 'shallowequal';
9
- +import isEqual from 'rc-util/es/isEqual';
10
- import { supportRef } from "rc-util/es/ref";
11
- import { getPathValue, validateValue } from '../utils/valueUtil';
12
- import StickyContext from '../context/StickyContext';
13
- @@ -226,16 +227,29 @@ var RefCell = /*#__PURE__*/React.forwardRef(Cell);
14
- RefCell.displayName = 'Cell';
15
- var comparePropList = ['expanded', 'className', 'hovering'];
16
- var MemoCell = /*#__PURE__*/React.memo(RefCell, function (prev, next) {
17
- + // if (next.shouldCellUpdate) {
18
- + // return (// Additional handle of expanded logic
19
- + // comparePropList.every(function (propName) {
20
- + // return prev[propName] === next[propName];
21
- + // }) && // User control update logic
22
- + // !next.shouldCellUpdate(next.record, prev.record)
23
- + // );
24
- + // }
25
- +
26
- + // return shallowEqual(prev, next);
27
- +
28
- if (next.shouldCellUpdate) {
29
- - return (// Additional handle of expanded logic
30
- - comparePropList.every(function (propName) {
31
- - return prev[propName] === next[propName];
32
- - }) && // User control update logic
33
- - !next.shouldCellUpdate(next.record, prev.record)
34
- - );
35
- + const [, prevRecord] = prev;
36
- + const [, nextRecord] = next;
37
- + return next.shouldCellUpdate(nextRecord, prevRecord);
38
- }
39
-
40
- - return shallowEqual(prev, next);
41
- + // Legacy mode should always update
42
- + // if (perfRecord.renderWithProps) {
43
- + // return true;
44
- + // }
45
- +
46
- + return !isEqual(prev, next, true);
47
- });
48
- /** Inject hover data here, we still wish MemoCell keep simple `shouldCellUpdate` logic */
49
-