@zat-design/sisyphus-react 3.3.0 → 3.3.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 (55) hide show
  1. package/dist/index.esm.css +13 -2
  2. package/es/ProDownload/utils.js +0 -2
  3. package/es/ProEditTable/components/RenderField/index.js +6 -4
  4. package/es/ProEditTable/index.js +29 -18
  5. package/es/ProEnum/index.js +7 -18
  6. package/es/ProEnum/propsType.d.ts +1 -0
  7. package/es/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
  8. package/es/ProForm/components/combination/FormList/index.js +1 -1
  9. package/es/ProForm/components/combination/ProModalSelect/index.js +22 -25
  10. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +9 -2
  11. package/es/ProForm/components/render/Render.js +17 -24
  12. package/es/ProForm/components/render/RenderFields.js +7 -3
  13. package/es/ProForm/utils/rulesCreator.js +2 -1
  14. package/es/ProForm/utils/useForm.js +15 -7
  15. package/es/ProForm/utils/useRules.js +6 -5
  16. package/es/ProStep/index.js +2 -2
  17. package/es/ProTable/style/index.less +6 -6
  18. package/es/ProTreeModal/components/Trigger.js +2 -0
  19. package/es/ProTreeModal/index.js +3 -3
  20. package/es/ProTreeModal/style/index.less +85 -84
  21. package/es/ProUpload/components/DragRender.js +2 -1
  22. package/es/ProUpload/components/ImageRender.js +4 -5
  23. package/lib/ProEditTable/components/RenderField/index.js +6 -6
  24. package/lib/ProEditTable/index.js +29 -18
  25. package/lib/ProEnum/index.js +6 -17
  26. package/lib/ProEnum/propsType.d.ts +1 -0
  27. package/lib/ProForm/components/base/RangePicker/index.js +1 -1
  28. package/lib/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
  29. package/lib/ProForm/components/combination/FormList/index.js +1 -1
  30. package/lib/ProForm/components/combination/ProModalSelect/index.js +22 -25
  31. package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +9 -2
  32. package/lib/ProForm/components/old/InputRange/index.js +1 -0
  33. package/lib/ProForm/components/old/ProCertValidity/index.js +1 -1
  34. package/lib/ProForm/components/render/Render.js +17 -25
  35. package/lib/ProForm/components/render/RenderFields.js +6 -2
  36. package/lib/ProForm/utils/rulesCreator.js +2 -1
  37. package/lib/ProForm/utils/useForm.js +15 -7
  38. package/lib/ProForm/utils/useRules.js +5 -4
  39. package/lib/ProStep/index.js +1 -1
  40. package/lib/ProTable/components/TableResizable/index.js +0 -8
  41. package/lib/ProTable/style/index.less +6 -6
  42. package/lib/ProTabs/index.js +0 -1
  43. package/lib/ProThemeTools/index.js +0 -1
  44. package/lib/ProTree/components/Tree.js +0 -7
  45. package/lib/ProTree/index.js +1 -0
  46. package/lib/ProTreeModal/components/Tree.js +0 -1
  47. package/lib/ProTreeModal/components/Trigger.js +2 -0
  48. package/lib/ProTreeModal/index.js +3 -3
  49. package/lib/ProTreeModal/style/index.less +85 -84
  50. package/lib/ProUpload/components/DragRender.js +2 -1
  51. package/lib/ProUpload/components/ImageRender.js +4 -5
  52. package/lib/ProUpload/index.js +0 -7
  53. package/lib/ProViewer/index.js +0 -1
  54. package/lib/old/ProCertValidity/index.js +1 -1
  55. package/package.json +1 -1
@@ -11,31 +11,31 @@
11
11
  }
12
12
 
13
13
  &-content {
14
- display : flex;
14
+ display: flex;
15
15
  flex-direction: row;
16
- height : 482px;
17
- margin-bottom : calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
16
+ height: 482px;
17
+ margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
18
18
 
19
19
  .@{ant-prefix}-tree-checkbox {
20
20
  margin-top: 2px;
21
21
  }
22
22
 
23
23
  .@{ant-prefix}-tree-switcher {
24
- width : 20px;
24
+ width: 20px;
25
25
  line-height: 20px;
26
26
  }
27
27
 
28
28
  .@{ant-prefix}-tree-treenode {
29
- width : 100%;
30
- padding : 0;
29
+ width: 100%;
30
+ padding: 0;
31
31
  padding-bottom: var(--zaui-font-size-sm, 12px);
32
- color : var(--zaui-text);
33
- font-size : var(--zaui-font-size, 14px);
34
- line-height : 20px;
32
+ color: var(--zaui-text);
33
+ font-size: var(--zaui-font-size, 14px);
34
+ line-height: 20px;
35
35
  }
36
36
 
37
37
  .@{ant-prefix}-tree-node-content-wrapper {
38
- min-height : 20px;
38
+ min-height: 20px;
39
39
  line-height: 20px;
40
40
  }
41
41
 
@@ -45,27 +45,27 @@
45
45
  }
46
46
 
47
47
  &-box {
48
- display : flex;
48
+ display: flex;
49
49
  flex-direction: column;
50
- width : 456px;
51
- height : 100%;
52
- color : var(--zaui-text);
53
- font-size : var(--zaui-font-size, 14px);
54
- line-height : 20px;
55
- border : 1px solid #e6e6e6;
56
- border-radius : var(--zaui-border-radius, 4px);
50
+ width: 456px;
51
+ height: 100%;
52
+ color: var(--zaui-text);
53
+ font-size: var(--zaui-font-size, 14px);
54
+ line-height: 20px;
55
+ border: 1px solid #e6e6e6;
56
+ border-radius: var(--zaui-border-radius, 4px);
57
57
 
58
58
  &:first-child {
59
59
  margin-right: var(--zaui-space-size-md, 16px);
60
60
  }
61
61
 
62
- .viewSvg>div {
62
+ .viewSvg > div {
63
63
  display: flex;
64
64
  }
65
65
 
66
66
  /* 修改滚动条样式 */
67
67
  ::-webkit-scrollbar {
68
- width : 0;
68
+ width: 0;
69
69
  height: 0;
70
70
  }
71
71
  }
@@ -79,38 +79,38 @@
79
79
  }
80
80
 
81
81
  &-search {
82
- width : auto;
82
+ width: auto;
83
83
  margin: var(--zaui-space-size-sm, 8px) var(--zaui-space-size-md, 16px) 0;
84
84
  }
85
85
 
86
86
  &-cascader-flex {
87
- display : flex;
87
+ display: flex;
88
88
  flex-direction: row;
89
- height : 100%;
90
- overflow : hidden;
89
+ height: 100%;
90
+ overflow: hidden;
91
91
  }
92
92
 
93
93
  &-cascader-warp {
94
- display : flex;
94
+ display: flex;
95
95
  flex-direction: column;
96
- width : 350px;
97
- margin-left : var(--zaui-space-size-md, 16px);
98
- overflow : auto;
96
+ width: 350px;
97
+ margin-left: var(--zaui-space-size-md, 16px);
98
+ overflow: auto;
99
99
 
100
100
  &:first-child {
101
- width : 192px;
102
- margin-left : 0;
101
+ width: 192px;
102
+ margin-left: 0;
103
103
  border-right: 1px solid #e6e6e6;
104
104
  }
105
105
  }
106
106
 
107
107
  &-box-header {
108
- display : flex;
109
- align-items : center;
108
+ display: flex;
109
+ align-items: center;
110
110
  justify-content: space-between;
111
- height : 40px;
112
- padding : 0 var(--zaui-space-size-md, 16px);
113
- background : #fafafa;
111
+ height: 40px;
112
+ padding: 0 var(--zaui-space-size-md, 16px);
113
+ background: #fafafa;
114
114
 
115
115
  &:first-child {
116
116
  color: #616161;
@@ -122,20 +122,20 @@
122
122
  }
123
123
 
124
124
  &-tree-warp {
125
- flex : 1;
126
- margin : 0 var(--zaui-space-size-md, 16px);
125
+ flex: 1;
126
+ margin: 0 var(--zaui-space-size-md, 16px);
127
127
  padding-top: var(--zaui-space-size-sm, 8px);
128
- overflow-y : auto;
128
+ overflow-y: auto;
129
129
  }
130
130
 
131
131
  &-checkbox-content {
132
- display : flex;
133
- flex-direction : row;
134
- align-items : center;
132
+ display: flex;
133
+ flex-direction: row;
134
+ align-items: center;
135
135
  justify-content: space-between;
136
- margin-bottom : calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
137
- line-height : 20px;
138
- cursor : pointer;
136
+ margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
137
+ line-height: 20px;
138
+ cursor: pointer;
139
139
 
140
140
  &-look {
141
141
  color: #333;
@@ -148,16 +148,16 @@
148
148
 
149
149
  &-cascader-content {
150
150
  margin-bottom: 0;
151
- padding : 6px;
151
+ padding: 6px;
152
152
  }
153
153
 
154
154
  &-check-cascader-content {
155
- color : var(--zaui-brand);
155
+ color: var(--zaui-brand);
156
156
  background: rgba(0, 106, 255, 0.1);
157
157
  }
158
158
 
159
159
  &-isView {
160
- display : flex;
160
+ display: flex;
161
161
  align-items: center;
162
162
 
163
163
  .viewSvg {
@@ -175,11 +175,12 @@
175
175
 
176
176
  &-checkbox-close {
177
177
  padding-left: var(--zaui-space-size-sm, 8px);
178
- font-size : var(--zaui-font-size-sm, 12px);
178
+ color: #c5c7cd;
179
+ font-size: var(--zaui-font-size-sm, 12px);
179
180
  }
180
181
 
181
182
  &-tree-node {
182
- display : flex;
183
+ display: flex;
183
184
  flex-direction: row;
184
185
 
185
186
  &:last-child {
@@ -188,34 +189,34 @@
188
189
  }
189
190
 
190
191
  &-tree-node-tag {
191
- display : flex;
192
- align-items : center;
192
+ display: flex;
193
+ align-items: center;
193
194
  justify-content: center;
194
- height : 20px;
195
- margin-right : var(--zaui-space-size-sm, 8px);
196
- padding : 0 var(--zaui-space-size-xs);
197
- font-weight : 400;
198
- line-height : 24px;
199
- white-space : nowrap;
200
- border-radius : var(--zaui-border-radius-card);
195
+ height: 20px;
196
+ margin-right: var(--zaui-space-size-sm, 8px);
197
+ padding: 0 var(--zaui-space-size-xs);
198
+ font-weight: 400;
199
+ line-height: 24px;
200
+ white-space: nowrap;
201
+ border-radius: var(--zaui-border-radius-card);
201
202
 
202
203
  span {
203
- font-size : var(--zaui-font-size-sm, 12px);
204
+ font-size: var(--zaui-font-size-sm, 12px);
204
205
  line-height: 20px;
205
- text-align : center;
206
- transform : scale(0.83, 0.83);
206
+ text-align: center;
207
+ transform: scale(0.83, 0.83);
207
208
  }
208
209
  }
209
210
  }
210
211
 
211
212
  .pro-tree-modal-no-checks {
212
- display : flex;
213
- align-items : center;
213
+ display: flex;
214
+ align-items: center;
214
215
  justify-content: center;
215
- height : 100%;
216
- color : #939599;
217
- font-weight : 400;
218
- font-size : var(--zaui-font-size, 14px);
216
+ height: 100%;
217
+ color: #939599;
218
+ font-weight: 400;
219
+ font-size: var(--zaui-font-size, 14px);
219
220
  }
220
221
 
221
222
  .pro-transfer-right {
@@ -227,37 +228,37 @@
227
228
  }
228
229
 
229
230
  .@{ant-prefix}-tag {
230
- display : flex;
231
- align-items : center;
231
+ display: flex;
232
+ align-items: center;
232
233
  justify-content: space-between;
233
- width : 100%;
234
- height : 32px;
235
- padding : 2px var(--zaui-space-size-sm, 8px);
236
- color : var(--zaui-text, #343434);
237
- font-size : var(--zaui-font-size, 14px);
238
- background : #f2f2f2;
239
- border : none;
240
- border-radius : var(--zaui-border-radius, 4px);
234
+ width: 100%;
235
+ height: 32px;
236
+ padding: 2px var(--zaui-space-size-sm, 8px);
237
+ color: var(--zaui-text, #343434);
238
+ font-size: var(--zaui-font-size, 14px);
239
+ background: #f2f2f2;
240
+ border: none;
241
+ border-radius: var(--zaui-border-radius, 4px);
241
242
 
242
243
  .drag-icon {
243
- height : 20px;
244
+ height: 20px;
244
245
  margin-right: var(--zaui-space-size-xs, 4px);
245
- cursor : move;
246
+ cursor: move;
246
247
  }
247
248
 
248
249
  .pro-tooltip {
249
- flex : 1;
250
+ flex: 1;
250
251
  max-width: calc(100% - 42px);
251
252
  }
252
253
 
253
254
  .disabled-icon {
254
- height : 20px;
255
+ height: 20px;
255
256
  margin-right: var(--zaui-space-size-xs, 4px);
256
257
  }
257
258
 
258
259
  .anticon-close {
259
- margin : 0;
260
- color : #999;
260
+ margin: 0;
261
+ color: #999;
261
262
  font-size: var(--zaui-font-size-sm, 12px);
262
263
  }
263
264
  }
@@ -265,7 +266,7 @@
265
266
  &.dragable {
266
267
  .anticon-close {
267
268
  position: relative;
268
- left : -4px;
269
+ left: -4px;
269
270
  }
270
271
  }
271
272
 
@@ -58,7 +58,8 @@ var DragRender = function DragRender(props) {
58
58
  */
59
59
  var handleReSelect = function handleReSelect(file) {
60
60
  if (disabled) return;
61
- handleDelFile(file);
61
+ // handleDelFile(file);
62
+ setFileList([]);
62
63
  setTimeout(function () {
63
64
  refReSelect.current.click();
64
65
  }, 1);
@@ -27,7 +27,7 @@ var _locale = _interopRequireDefault(require("../../locale"));
27
27
  * @Author: wangshengqiang
28
28
  * @Date: 2023-07-27 20:13:07
29
29
  * @LastEditors: wangshengqiang
30
- * @LastEditTime: 2023-11-15 17:57:53
30
+ * @LastEditTime: 2023-11-21 15:24:56
31
31
  * @Description: 图片类型
32
32
  *
33
33
  */
@@ -95,11 +95,11 @@ var ImageRender = function ImageRender(props) {
95
95
  disabled: disabled || isView,
96
96
  itemRender: function itemRender(originNode, file, fileList, actions) {
97
97
  var _file$url, _locale$ProUpload, _locale$ProUpload2, _locale$ProUpload3;
98
- var _showPreview = file.status === 'done';
99
98
  var _isShowDownload = !!onDownload && file.status === 'done';
100
99
  var _fileExt = (0, _FileItem.getFileExt)(file.name || (file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('?')[0]));
101
100
  var _fileIcon = (0, _FileItem.getFileIcon)(_fileExt);
102
101
  var isImg = ['.PNG', '.JPG', '.JPEG', '.GIF', '.BMP', '.JPE'].includes(_fileExt.toLocaleUpperCase());
102
+ var _showPreview = isImg;
103
103
  return (0, _jsxRuntime.jsx)(_DraggableUploadListItem.DraggableUploadListItem, {
104
104
  file: file,
105
105
  children: (0, _jsxRuntime.jsxs)("div", {
@@ -253,8 +253,7 @@ var ImageRender = function ImageRender(props) {
253
253
  style: {
254
254
  width: '400px'
255
255
  },
256
- open: !!(previewImg === null || previewImg === void 0 ? void 0 : previewImg.url),
257
- // showType="Modal"
256
+ open: (previewImg === null || previewImg === void 0 ? void 0 : previewImg.url) || (previewImg === null || previewImg === void 0 ? void 0 : previewImg.thumbUrl),
258
257
  wrapClassName: "proupload-modal-preview",
259
258
  onCancel: handlePreviewCancel,
260
259
  footer: false,
@@ -263,7 +262,7 @@ var ImageRender = function ImageRender(props) {
263
262
  style: {
264
263
  width: '100%'
265
264
  },
266
- src: previewImg === null || previewImg === void 0 ? void 0 : previewImg.url
265
+ src: (previewImg === null || previewImg === void 0 ? void 0 : previewImg.url) || previewImg.thumbUrl
267
266
  })
268
267
  })]
269
268
  });
@@ -22,13 +22,6 @@ var _ImageRender = _interopRequireDefault(require("./components/ImageRender"));
22
22
  var _uitls = require("./uitls");
23
23
  var _locale = _interopRequireDefault(require("../locale"));
24
24
  var _excluded = ["value", "size", "action", "maxCount", "headerRender", "footerRender", "disabled", "uploadType", "buttonProps", "accept", "extraTipText", "beforeUpload", "onChange", "onDownload", "onPreview", "onRemove", "method", "className", "dataParams", "name", "showExampleContent", "showUploadList", "otherProps", "transformResponse", "exampleTitle", "exampleContent", "exampleModalProps", "buttonText", "afterRender", "fieldNames"];
25
- /*
26
- * @Author: wangshengqiang
27
- * @Date: 2023-02-03 14:18:59
28
- * @LastEditTime: 2023-11-14 18:32:13
29
- * @LastEditors: wangshengqiang
30
- * @Description: 上传控件
31
- */
32
25
  var ProUpload = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
33
26
  var _locale$ProUpload;
34
27
  var _useState = (0, _react.useState)([]),
@@ -16,7 +16,6 @@ var _antd = require("antd");
16
16
  var _react = _interopRequireWildcard(require("react"));
17
17
  var _locale = _interopRequireDefault(require("../locale"));
18
18
  var _locale$ProViewer;
19
- /* eslint-disable jsx-a11y/iframe-has-title */
20
19
  // 用于解析word | excel
21
20
  var officeApp = 'https://view.officeapps.live.com/op/view.aspx?src=';
22
21
  // 文件MIME类型
@@ -11,7 +11,7 @@ var _jsxRuntime = require("react/jsx-runtime");
11
11
  var _antd = require("antd");
12
12
  var _moment = _interopRequireDefault(require("moment"));
13
13
  var _react = require("react");
14
- var _excluded = ["value", "onChange", "disabled", "isRange", "getPopupContainer", "showForever", "proformmode"]; // @ts-nocheck
14
+ var _excluded = ["value", "onChange", "disabled", "isRange", "getPopupContainer", "showForever", "proformmode"];
15
15
  var RangePicker = _antd.DatePicker.RangePicker;
16
16
  var defaultFormatDate = 'YYYY-MM-DD';
17
17
  var defaultPopupContainer = function defaultPopupContainer(triggerNode) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",