@zat-design/sisyphus-react 3.6.10 → 3.7.0-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 (77) hide show
  1. package/dist/index.esm.css +52 -54
  2. package/dist/less.esm.css +52 -54
  3. package/es/ProEditTable/components/RenderField/ListChanged.d.ts +16 -0
  4. package/es/ProEditTable/components/RenderField/ListChanged.js +124 -0
  5. package/es/ProEditTable/components/RenderField/index.js +27 -46
  6. package/es/ProEditTable/style/index.less +2 -1
  7. package/es/ProEditTable/utils/index.d.ts +1 -1
  8. package/es/ProEditTable/utils/index.js +19 -13
  9. package/es/ProEditTable/utils/tools.d.ts +6 -0
  10. package/es/ProEditTable/utils/tools.js +15 -2
  11. package/es/ProEnum/hooks/useEnumRequest.js +3 -0
  12. package/es/ProEnum/utils/index.js +1 -1
  13. package/es/ProForm/components/combination/FormList/components/BlockFields.js +4 -2
  14. package/es/ProForm/components/combination/FormList/components/LineFields.js +4 -1
  15. package/es/ProForm/components/combination/FormList/utils.d.ts +1 -0
  16. package/es/ProForm/components/combination/FormList/utils.js +13 -0
  17. package/es/ProForm/components/combination/ProCascader/index.js +8 -14
  18. package/es/ProForm/components/render/Changed.d.ts +14 -0
  19. package/es/ProForm/components/render/Changed.js +64 -0
  20. package/es/ProForm/components/render/Render.js +17 -37
  21. package/es/ProForm/style/index.less +52 -52
  22. package/es/ProForm/utils/diffOriginal.d.ts +0 -1
  23. package/es/ProForm/utils/diffOriginal.js +4 -27
  24. package/es/ProForm/utils/useChanged.js +1 -2
  25. package/es/ProForm/utils/useListChanged.js +3 -3
  26. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.d.ts +3 -1
  27. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +108 -41
  28. package/es/ProTable/components/RcTable/components/DraggableTable/index.js +14 -1
  29. package/es/ProTable/index.js +6 -2
  30. package/es/ProTable/propsType.d.ts +22 -0
  31. package/es/ProTable/style/index.less +27 -32
  32. package/es/ProThemeTools/component/{PrdTools → ProTools}/index.d.ts +2 -2
  33. package/es/ProThemeTools/component/{PrdTools → ProTools}/index.js +2 -2
  34. package/es/ProThemeTools/component/index.d.ts +1 -2
  35. package/es/ProThemeTools/component/index.js +1 -2
  36. package/es/ProThemeTools/index.js +2 -2
  37. package/es/ProThemeTools/style/index.less +1 -1
  38. package/es/ProTreeModal/components/List.js +30 -4
  39. package/lib/ProEditTable/components/RenderField/ListChanged.d.ts +16 -0
  40. package/lib/ProEditTable/components/RenderField/ListChanged.js +129 -0
  41. package/lib/ProEditTable/components/RenderField/index.js +26 -41
  42. package/lib/ProEditTable/style/index.less +2 -1
  43. package/lib/ProEditTable/utils/index.d.ts +1 -1
  44. package/lib/ProEditTable/utils/index.js +17 -11
  45. package/lib/ProEditTable/utils/tools.d.ts +6 -0
  46. package/lib/ProEditTable/utils/tools.js +15 -1
  47. package/lib/ProEnum/hooks/useEnumRequest.js +3 -0
  48. package/lib/ProEnum/utils/index.js +1 -1
  49. package/lib/ProForm/components/combination/FormList/components/BlockFields.js +5 -2
  50. package/lib/ProForm/components/combination/FormList/components/LineFields.js +4 -1
  51. package/lib/ProForm/components/combination/FormList/utils.d.ts +1 -0
  52. package/lib/ProForm/components/combination/FormList/utils.js +15 -1
  53. package/lib/ProForm/components/combination/ProCascader/index.js +6 -12
  54. package/lib/ProForm/components/render/Changed.d.ts +14 -0
  55. package/lib/ProForm/components/render/Changed.js +69 -0
  56. package/lib/ProForm/components/render/Render.js +17 -35
  57. package/lib/ProForm/style/index.less +52 -52
  58. package/lib/ProForm/utils/diffOriginal.d.ts +0 -1
  59. package/lib/ProForm/utils/diffOriginal.js +3 -27
  60. package/lib/ProForm/utils/useChanged.js +1 -2
  61. package/lib/ProForm/utils/useListChanged.js +2 -2
  62. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.d.ts +3 -1
  63. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +108 -41
  64. package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +13 -1
  65. package/lib/ProTable/index.js +6 -2
  66. package/lib/ProTable/propsType.d.ts +22 -0
  67. package/lib/ProTable/style/index.less +27 -32
  68. package/lib/ProThemeTools/component/{PrdTools → ProTools}/index.d.ts +2 -2
  69. package/lib/ProThemeTools/component/{PrdTools → ProTools}/index.js +2 -2
  70. package/lib/ProThemeTools/component/index.d.ts +1 -2
  71. package/lib/ProThemeTools/component/index.js +3 -3
  72. package/lib/ProThemeTools/index.js +1 -1
  73. package/lib/ProThemeTools/style/index.less +1 -1
  74. package/lib/ProTreeModal/components/List.js +30 -4
  75. package/package.json +1 -1
  76. /package/es/ProThemeTools/component/{PrdTools → ProTools}/style/index.less +0 -0
  77. /package/lib/ProThemeTools/component/{PrdTools → ProTools}/style/index.less +0 -0
@@ -2,17 +2,17 @@
2
2
  @import (reference) '~antd/es/style/themes/index.less';
3
3
 
4
4
  .pro-table {
5
- &.pro-table-draggable-only{
6
- .ant-table-tbody{
5
+ &.pro-table-draggable-only {
6
+ .ant-table-tbody {
7
7
  .anticon {
8
8
  margin-right: 0;
9
9
  }
10
10
  }
11
11
  }
12
12
  .@{ant-prefix}-table-cell-with-append {
13
- white-space: nowrap;
14
13
  position: relative;
15
14
  z-index: 100;
15
+ white-space: nowrap;
16
16
  }
17
17
  .@{ant-prefix}-table-row-expand-icon {
18
18
  position: absolute;
@@ -20,16 +20,15 @@
20
20
  }
21
21
 
22
22
  .@{ant-prefix}-table-content {
23
- >table {
23
+ > table {
24
24
  .@{ant-prefix}-table-summary {
25
+ color: var(--zaui-text, #343434);
26
+ font-weight: 600;
25
27
  background-color: var(--zaui-table-header-bg, #f2f3f5);
26
- color : var(--zaui-text, #343434);
27
- font-weight : 600;
28
28
 
29
29
  .@{ant-prefix}-table-cell-fix-left,
30
30
  .@{ant-prefix}-table-cell-fix-right {
31
31
  background-color: var(--zaui-table-header-bg, #f2f3f5);
32
-
33
32
  }
34
33
  }
35
34
 
@@ -43,33 +42,37 @@
43
42
  }
44
43
  }
45
44
 
46
- .@{ant-prefix}-table-thead>tr>th:not(.@{ant-prefix}-table-selection-column):not(.@{ant-prefix}-table-row-expand-icon-cell):not([colspan]).is-required {
45
+ .@{ant-prefix}-table-thead
46
+ > tr
47
+ > th:not(.@{ant-prefix}-table-selection-column):not(
48
+ .@{ant-prefix}-table-row-expand-icon-cell
49
+ ):not([colspan]).is-required {
47
50
  &.is-required-right {
48
51
  .pro-edit-table-title {
49
52
  &::before {
50
- position : static;
51
- top : 0;
52
- display : inline-block;
53
- text-indent: -8px;
54
- color : #ff5050;
55
- font-size : var(--zaui-font-size-md, 14px);
53
+ position: static;
54
+ top: 0;
55
+ display: inline-block;
56
+ color: #ff5050;
57
+ font-size: var(--zaui-font-size-md, 14px);
56
58
  line-height: 1;
57
- content : "*";
59
+ text-indent: -8px;
60
+ content: '*';
58
61
  }
59
62
  }
60
63
  }
61
64
  &.is-required-left {
62
65
  .pro-edit-table-title {
63
66
  &::after {
67
+ position: static;
68
+ top: 0;
69
+ display: inline-block;
64
70
  width: auto;
65
- position : static;
66
- top : 0;
67
- display : inline-block;
68
71
  margin-left: var(--zaui-space-size-xs, 4px);
69
- color : #ff5050;
70
- font-size : 14px;
72
+ color: #ff5050;
73
+ font-size: 14px;
71
74
  line-height: 1;
72
- content : "*";
75
+ content: '*';
73
76
  }
74
77
  }
75
78
  }
@@ -80,9 +83,9 @@
80
83
  display: flex;
81
84
  width: 20px;
82
85
  .anticon {
83
- cursor: pointer;
84
86
  margin-right: 12px;
85
- .drag-icon{
87
+ cursor: pointer;
88
+ .drag-icon {
86
89
  margin-right: 0;
87
90
  }
88
91
  }
@@ -93,8 +96,6 @@
93
96
  }
94
97
  }
95
98
 
96
-
97
-
98
99
  &.pro-table-bordered {
99
100
  .@{ant-prefix}-table .@{ant-prefix}-table-thead > tr > th {
100
101
  border-bottom: 1px solid #f0f0f0;
@@ -557,10 +558,4 @@
557
558
  }
558
559
  }
559
560
  }
560
- }
561
-
562
- .pro-edit-table-drag {
563
- table tr th.@{ant-prefix}-table-selection-column.@{ant-prefix}-table-cell-fix-left{
564
- text-align: right;
565
- }
566
- }
561
+ }
@@ -1,3 +1,3 @@
1
1
  import type { DevToolsPropsType } from '../../propsType';
2
- declare const PrdTools: ({ onReset, onClose, setState, open, state, tableBorder, tableStripe, }: DevToolsPropsType) => import("react/jsx-runtime").JSX.Element;
3
- export default PrdTools;
2
+ declare const ProTools: ({ onReset, onClose, setState, open, state, tableBorder, tableStripe, }: DevToolsPropsType) => import("react/jsx-runtime").JSX.Element;
3
+ export default ProTools;
@@ -21,7 +21,7 @@ var connect = function connect(Component) {
21
21
  return ComponentWrapper;
22
22
  };
23
23
  var NewDrawer = connect(_antd.Drawer);
24
- var PrdTools = function PrdTools(_ref) {
24
+ var ProTools = function ProTools(_ref) {
25
25
  var onReset = _ref.onReset,
26
26
  onClose = _ref.onClose,
27
27
  setState = _ref.setState,
@@ -266,4 +266,4 @@ var PrdTools = function PrdTools(_ref) {
266
266
  })]
267
267
  });
268
268
  };
269
- var _default = exports.default = PrdTools;
269
+ var _default = exports.default = ProTools;
@@ -1,2 +1 @@
1
- /// <reference types="typings" />
2
- export { default as PrdTools } from './PrdTools';
1
+ export { default as ProTools } from './ProTools';
@@ -4,10 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- Object.defineProperty(exports, "PrdTools", {
7
+ Object.defineProperty(exports, "ProTools", {
8
8
  enumerable: true,
9
9
  get: function get() {
10
- return _PrdTools.default;
10
+ return _ProTools.default;
11
11
  }
12
12
  });
13
- var _PrdTools = _interopRequireDefault(require("./PrdTools"));
13
+ var _ProTools = _interopRequireDefault(require("./ProTools"));
@@ -186,7 +186,7 @@ var ProThemeTools = function ProThemeTools(_ref) {
186
186
  className: "setting-icon",
187
187
  src: _setting.default
188
188
  })
189
- }), (0, _jsxRuntime.jsx)(_component.PrdTools, {
189
+ }), (0, _jsxRuntime.jsx)(_component.ProTools, {
190
190
  prefixCls: prefixCls,
191
191
  onReset: onReset,
192
192
  onClose: toggle,
@@ -1,7 +1,7 @@
1
1
  @root-entry-name: 'default';
2
2
  @import (reference) '~antd/es/style/themes/index.less';
3
3
 
4
- @import '../component/PrdTools/style/index.less';
4
+ @import '../component/ProTools/style/index.less';
5
5
 
6
6
  .pro-theme-tools {
7
7
  display: flex;
@@ -125,11 +125,32 @@ function List(props, ref) {
125
125
  document.body.removeChild(temp);
126
126
  return len * 20;
127
127
  }
128
+ var handleCommonTitle = function handleCommonTitle(item) {
129
+ if (isCASCADER) {
130
+ return item === null || item === void 0 ? void 0 : item.title;
131
+ }
132
+ return item[fieldNameLabel];
133
+ };
134
+ var handleGetTitle = function handleGetTitle(item) {
135
+ if (showCodeName) {
136
+ if (isCASCADER) {
137
+ if (item[fieldNameValue] && (item === null || item === void 0 ? void 0 : item.title)) {
138
+ return "".concat(item[fieldNameValue], "-").concat(item.title);
139
+ }
140
+ return handleCommonTitle(item);
141
+ }
142
+ if (item[fieldNameValue] && item[fieldNameValue]) {
143
+ return "".concat(item[fieldNameValue], "-").concat(item[fieldNameLabel]);
144
+ }
145
+ return handleCommonTitle(item);
146
+ }
147
+ return handleCommonTitle(item);
148
+ };
128
149
  var _useVirtualList = (0, _ahooks.useVirtualList)(originalList, {
129
150
  containerTarget: containerRef,
130
151
  wrapperTarget: wrapperRef,
131
152
  itemHeight: function itemHeight(index, item) {
132
- var title = showCodeName ? "".concat(item[fieldNameValue], "-").concat(isCASCADER ? item === null || item === void 0 ? void 0 : item.title : item[fieldNameLabel]) : "".concat(isCASCADER ? item === null || item === void 0 ? void 0 : item.title : item[fieldNameLabel]);
153
+ var title = handleGetTitle(item);
133
154
  return Math.floor(getLineHeight(title, 406)) + 12;
134
155
  }
135
156
  }),
@@ -185,7 +206,7 @@ function List(props, ref) {
185
206
  children: (0, _jsxRuntime.jsx)(_antd.Row, {
186
207
  children: list.map(function (_item) {
187
208
  var item = _item.data;
188
- var title = showCodeName ? "".concat(item[fieldNameValue], "-").concat(isCASCADER ? item === null || item === void 0 ? void 0 : item.title : item[fieldNameLabel]) : "".concat(isCASCADER ? item === null || item === void 0 ? void 0 : item.title : item[fieldNameLabel]);
209
+ var title = handleGetTitle(item);
189
210
  var content = optionRender ? optionRender(item, searchStr) : (0, _jsxRuntime.jsx)(_SearchTitle.default, {
190
211
  label: title,
191
212
  searchStr: searchStr
@@ -223,7 +244,7 @@ function List(props, ref) {
223
244
  value: checkedValues,
224
245
  children: (0, _jsxRuntime.jsx)(_antd.Row, {
225
246
  children: treeData.map(function (item) {
226
- var title = showCodeName ? "".concat(item[fieldNameValue], "-").concat(isCASCADER ? item === null || item === void 0 ? void 0 : item.title : item[fieldNameLabel]) : "".concat(isCASCADER ? item === null || item === void 0 ? void 0 : item.title : item[fieldNameLabel]);
247
+ var title = handleGetTitle(item);
227
248
  var content = optionRender ? optionRender(item, searchStr) : (0, _jsxRuntime.jsx)(_SearchTitle.default, {
228
249
  label: title,
229
250
  searchStr: searchStr
@@ -260,7 +281,12 @@ function List(props, ref) {
260
281
  ref: wrapperRef,
261
282
  children: list.map(function (_item) {
262
283
  var item = _item.data;
263
- var title = showCodeName ? "".concat(item[fieldNameValue], "-").concat(item[fieldNameLabel]) : item[fieldNameLabel];
284
+ var title = item[fieldNameLabel];
285
+ if (showCodeName) {
286
+ if (item[fieldNameValue] && item[fieldNameLabel]) {
287
+ title = "".concat(item[fieldNameValue], "-").concat(item[fieldNameLabel]);
288
+ }
289
+ }
264
290
  return (0, _jsxRuntime.jsxs)("div", {
265
291
  className: "pro-tree-modal-checkbox-content",
266
292
  children: [(0, _jsxRuntime.jsx)("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.6.10",
3
+ "version": "3.7.0-beta.1",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",