ydb-components-material 0.1.205 → 0.1.206
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/build/docs/404.html +3 -3
- package/build/docs/_demos/:uuid +3 -3
- package/build/docs/colorful-button.html +3 -3
- package/build/docs/colorful-input.html +3 -3
- package/build/docs/index.html +3 -3
- package/build/docs/{umi.e7085fcc.css → umi.8d01e385.css} +1 -1
- package/build/docs/{umi.8fad4777.js → umi.bead6541.js} +1 -1
- package/build/docs/~demos/:uuid.html +3 -3
- package/build/docs/~demos/colorful-button-demo.html +3 -3
- package/build/docs/~demos/colorful-input-demo.html +3 -3
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/dist/BizComps.css +1 -1
- package/dist/BizComps.js +1 -1
- package/dist/BizComps.js.map +1 -1
- package/es/components/file-list/item.js +26 -10
- package/es/components/file-list/item.scss +34 -0
- package/lib/components/file-list/item.js +26 -10
- package/lib/components/file-list/item.scss +34 -0
- package/lowcode_es/meta.js +1 -1
- package/lowcode_lib/meta.js +1 -1
- package/package.json +3 -3
|
@@ -65,7 +65,8 @@ var FileItem = function FileItem(_ref) {
|
|
|
65
65
|
fileId = file.fileId,
|
|
66
66
|
isSigned = file.isSigned,
|
|
67
67
|
isSealed = file.isSealed,
|
|
68
|
-
fileType = file.fileType
|
|
68
|
+
fileType = file.fileType,
|
|
69
|
+
loading = file.loading;
|
|
69
70
|
var materialName = fileConfig.materialName,
|
|
70
71
|
signatureEnable = fileConfig.signatureEnable,
|
|
71
72
|
signEnable = fileConfig.signEnable,
|
|
@@ -351,18 +352,25 @@ var FileItem = function FileItem(_ref) {
|
|
|
351
352
|
return _regeneratorRuntime.wrap(function (_context2) {
|
|
352
353
|
while (1) switch (_context2.prev = _context2.next) {
|
|
353
354
|
case 0:
|
|
354
|
-
if (
|
|
355
|
+
if (!loading) {
|
|
355
356
|
_context2.next = 1;
|
|
356
357
|
break;
|
|
357
358
|
}
|
|
359
|
+
_Message.warning('数据请求中,请稍后');
|
|
358
360
|
return _context2.abrupt("return");
|
|
359
361
|
case 1:
|
|
362
|
+
if (fileUrl) {
|
|
363
|
+
_context2.next = 2;
|
|
364
|
+
break;
|
|
365
|
+
}
|
|
366
|
+
return _context2.abrupt("return");
|
|
367
|
+
case 2:
|
|
360
368
|
// console.log('fileUrl', fileUrl, fileId);
|
|
361
369
|
captureComponentTop();
|
|
362
370
|
setPreviewIframeUrl(fileUrl);
|
|
363
371
|
setIsShowPreview(true);
|
|
364
372
|
// if (!fileId) return;
|
|
365
|
-
_context2.next =
|
|
373
|
+
_context2.next = 3;
|
|
366
374
|
return getUrlById({
|
|
367
375
|
id: fileId,
|
|
368
376
|
effectiveTime: 3600000
|
|
@@ -374,13 +382,13 @@ var FileItem = function FileItem(_ref) {
|
|
|
374
382
|
isPC: isPC,
|
|
375
383
|
accessToken: accessToken
|
|
376
384
|
});
|
|
377
|
-
case
|
|
385
|
+
case 3:
|
|
378
386
|
urlRes = _context2.sent;
|
|
379
387
|
if (!(urlRes.presignedUrlList && urlRes.presignedUrlList.length > 0)) {
|
|
380
|
-
_context2.next =
|
|
388
|
+
_context2.next = 5;
|
|
381
389
|
break;
|
|
382
390
|
}
|
|
383
|
-
_context2.next =
|
|
391
|
+
_context2.next = 4;
|
|
384
392
|
return onlinePreview({
|
|
385
393
|
url: urlRes.presignedUrlList[2]
|
|
386
394
|
}, {
|
|
@@ -391,11 +399,11 @@ var FileItem = function FileItem(_ref) {
|
|
|
391
399
|
isPC: isPC,
|
|
392
400
|
accessToken: accessToken
|
|
393
401
|
});
|
|
394
|
-
case
|
|
402
|
+
case 4:
|
|
395
403
|
res = _context2.sent;
|
|
396
404
|
setPreviewIframeUrl(res.url);
|
|
397
405
|
setIsShowPreview(true);
|
|
398
|
-
case
|
|
406
|
+
case 5:
|
|
399
407
|
case "end":
|
|
400
408
|
return _context2.stop();
|
|
401
409
|
}
|
|
@@ -899,6 +907,10 @@ var FileItem = function FileItem(_ref) {
|
|
|
899
907
|
};
|
|
900
908
|
}();
|
|
901
909
|
var onDownload = function onDownload() {
|
|
910
|
+
if (loading) {
|
|
911
|
+
_Message.warning('数据请求中,请稍后');
|
|
912
|
+
return;
|
|
913
|
+
}
|
|
902
914
|
if (disabled) return;
|
|
903
915
|
var format = getFileExtension(fileName);
|
|
904
916
|
download({
|
|
@@ -1117,7 +1129,7 @@ var FileItem = function FileItem(_ref) {
|
|
|
1117
1129
|
className: "error_msg",
|
|
1118
1130
|
src: errorMsgIcon,
|
|
1119
1131
|
alt: ""
|
|
1120
|
-
})) : /*#__PURE__*/React.createElement("div", {
|
|
1132
|
+
})) : !loading && /*#__PURE__*/React.createElement("div", {
|
|
1121
1133
|
className: "add",
|
|
1122
1134
|
onClick: function onClick() {
|
|
1123
1135
|
return upload();
|
|
@@ -1151,7 +1163,11 @@ var FileItem = function FileItem(_ref) {
|
|
|
1151
1163
|
}, /*#__PURE__*/React.createElement("img", {
|
|
1152
1164
|
src: CheckedIcon,
|
|
1153
1165
|
alt: ""
|
|
1154
|
-
}), "\u5DF2\u7B7E\u7AE0")))
|
|
1166
|
+
}), "\u5DF2\u7B7E\u7AE0"))), loading && /*#__PURE__*/React.createElement("div", {
|
|
1167
|
+
className: "loading_mask"
|
|
1168
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
1169
|
+
className: "loading_spinner"
|
|
1170
|
+
}))), isPC && /*#__PURE__*/React.createElement("div", {
|
|
1155
1171
|
className: "blocks"
|
|
1156
1172
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1157
1173
|
className: "status"
|
|
@@ -106,6 +106,30 @@
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
+
|
|
110
|
+
.loading_mask {
|
|
111
|
+
position: absolute;
|
|
112
|
+
top: 0;
|
|
113
|
+
left: 0;
|
|
114
|
+
width: 100%;
|
|
115
|
+
height: 100%;
|
|
116
|
+
z-index: 4;
|
|
117
|
+
display: flex;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
align-items: center;
|
|
120
|
+
border-radius: 8px;
|
|
121
|
+
background: rgba(255, 255, 255, 0.75);
|
|
122
|
+
cursor: wait;
|
|
123
|
+
|
|
124
|
+
.loading_spinner {
|
|
125
|
+
width: 20px;
|
|
126
|
+
height: 20px;
|
|
127
|
+
border: 2px solid #d6e4ff;
|
|
128
|
+
border-top-color: #1678ff;
|
|
129
|
+
border-radius: 50%;
|
|
130
|
+
animation: file_item_spin 0.8s linear infinite;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
109
133
|
}
|
|
110
134
|
|
|
111
135
|
.blocks {
|
|
@@ -498,3 +522,13 @@
|
|
|
498
522
|
}
|
|
499
523
|
|
|
500
524
|
}
|
|
525
|
+
|
|
526
|
+
@keyframes file_item_spin {
|
|
527
|
+
from {
|
|
528
|
+
transform: rotate(0deg);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
to {
|
|
532
|
+
transform: rotate(360deg);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
@@ -71,7 +71,8 @@ var FileItem = function FileItem(_ref) {
|
|
|
71
71
|
fileId = file.fileId,
|
|
72
72
|
isSigned = file.isSigned,
|
|
73
73
|
isSealed = file.isSealed,
|
|
74
|
-
fileType = file.fileType
|
|
74
|
+
fileType = file.fileType,
|
|
75
|
+
loading = file.loading;
|
|
75
76
|
var materialName = fileConfig.materialName,
|
|
76
77
|
signatureEnable = fileConfig.signatureEnable,
|
|
77
78
|
signEnable = fileConfig.signEnable,
|
|
@@ -357,18 +358,25 @@ var FileItem = function FileItem(_ref) {
|
|
|
357
358
|
return _regenerator["default"].wrap(function (_context2) {
|
|
358
359
|
while (1) switch (_context2.prev = _context2.next) {
|
|
359
360
|
case 0:
|
|
360
|
-
if (
|
|
361
|
+
if (!loading) {
|
|
361
362
|
_context2.next = 1;
|
|
362
363
|
break;
|
|
363
364
|
}
|
|
365
|
+
_message["default"].warning('数据请求中,请稍后');
|
|
364
366
|
return _context2.abrupt("return");
|
|
365
367
|
case 1:
|
|
368
|
+
if (fileUrl) {
|
|
369
|
+
_context2.next = 2;
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
return _context2.abrupt("return");
|
|
373
|
+
case 2:
|
|
366
374
|
// console.log('fileUrl', fileUrl, fileId);
|
|
367
375
|
captureComponentTop();
|
|
368
376
|
setPreviewIframeUrl(fileUrl);
|
|
369
377
|
setIsShowPreview(true);
|
|
370
378
|
// if (!fileId) return;
|
|
371
|
-
_context2.next =
|
|
379
|
+
_context2.next = 3;
|
|
372
380
|
return (0, _api.getUrlById)({
|
|
373
381
|
id: fileId,
|
|
374
382
|
effectiveTime: 3600000
|
|
@@ -380,13 +388,13 @@ var FileItem = function FileItem(_ref) {
|
|
|
380
388
|
isPC: isPC,
|
|
381
389
|
accessToken: accessToken
|
|
382
390
|
});
|
|
383
|
-
case
|
|
391
|
+
case 3:
|
|
384
392
|
urlRes = _context2.sent;
|
|
385
393
|
if (!(urlRes.presignedUrlList && urlRes.presignedUrlList.length > 0)) {
|
|
386
|
-
_context2.next =
|
|
394
|
+
_context2.next = 5;
|
|
387
395
|
break;
|
|
388
396
|
}
|
|
389
|
-
_context2.next =
|
|
397
|
+
_context2.next = 4;
|
|
390
398
|
return (0, _api.onlinePreview)({
|
|
391
399
|
url: urlRes.presignedUrlList[2]
|
|
392
400
|
}, {
|
|
@@ -397,11 +405,11 @@ var FileItem = function FileItem(_ref) {
|
|
|
397
405
|
isPC: isPC,
|
|
398
406
|
accessToken: accessToken
|
|
399
407
|
});
|
|
400
|
-
case
|
|
408
|
+
case 4:
|
|
401
409
|
res = _context2.sent;
|
|
402
410
|
setPreviewIframeUrl(res.url);
|
|
403
411
|
setIsShowPreview(true);
|
|
404
|
-
case
|
|
412
|
+
case 5:
|
|
405
413
|
case "end":
|
|
406
414
|
return _context2.stop();
|
|
407
415
|
}
|
|
@@ -905,6 +913,10 @@ var FileItem = function FileItem(_ref) {
|
|
|
905
913
|
};
|
|
906
914
|
}();
|
|
907
915
|
var onDownload = function onDownload() {
|
|
916
|
+
if (loading) {
|
|
917
|
+
_message["default"].warning('数据请求中,请稍后');
|
|
918
|
+
return;
|
|
919
|
+
}
|
|
908
920
|
if (disabled) return;
|
|
909
921
|
var format = (0, _file2.getFileExtension)(fileName);
|
|
910
922
|
download({
|
|
@@ -1123,7 +1135,7 @@ var FileItem = function FileItem(_ref) {
|
|
|
1123
1135
|
className: "error_msg",
|
|
1124
1136
|
src: _icon_errorMsg["default"],
|
|
1125
1137
|
alt: ""
|
|
1126
|
-
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
1138
|
+
})) : !loading && /*#__PURE__*/_react["default"].createElement("div", {
|
|
1127
1139
|
className: "add",
|
|
1128
1140
|
onClick: function onClick() {
|
|
1129
1141
|
return upload();
|
|
@@ -1157,7 +1169,11 @@ var FileItem = function FileItem(_ref) {
|
|
|
1157
1169
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
1158
1170
|
src: _checked["default"],
|
|
1159
1171
|
alt: ""
|
|
1160
|
-
}), "\u5DF2\u7B7E\u7AE0")))
|
|
1172
|
+
}), "\u5DF2\u7B7E\u7AE0"))), loading && /*#__PURE__*/_react["default"].createElement("div", {
|
|
1173
|
+
className: "loading_mask"
|
|
1174
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
1175
|
+
className: "loading_spinner"
|
|
1176
|
+
}))), isPC && /*#__PURE__*/_react["default"].createElement("div", {
|
|
1161
1177
|
className: "blocks"
|
|
1162
1178
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
1163
1179
|
className: "status"
|
|
@@ -106,6 +106,30 @@
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
+
|
|
110
|
+
.loading_mask {
|
|
111
|
+
position: absolute;
|
|
112
|
+
top: 0;
|
|
113
|
+
left: 0;
|
|
114
|
+
width: 100%;
|
|
115
|
+
height: 100%;
|
|
116
|
+
z-index: 4;
|
|
117
|
+
display: flex;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
align-items: center;
|
|
120
|
+
border-radius: 8px;
|
|
121
|
+
background: rgba(255, 255, 255, 0.75);
|
|
122
|
+
cursor: wait;
|
|
123
|
+
|
|
124
|
+
.loading_spinner {
|
|
125
|
+
width: 20px;
|
|
126
|
+
height: 20px;
|
|
127
|
+
border: 2px solid #d6e4ff;
|
|
128
|
+
border-top-color: #1678ff;
|
|
129
|
+
border-radius: 50%;
|
|
130
|
+
animation: file_item_spin 0.8s linear infinite;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
109
133
|
}
|
|
110
134
|
|
|
111
135
|
.blocks {
|
|
@@ -498,3 +522,13 @@
|
|
|
498
522
|
}
|
|
499
523
|
|
|
500
524
|
}
|
|
525
|
+
|
|
526
|
+
@keyframes file_item_spin {
|
|
527
|
+
from {
|
|
528
|
+
transform: rotate(0deg);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
to {
|
|
532
|
+
transform: rotate(360deg);
|
|
533
|
+
}
|
|
534
|
+
}
|
package/lowcode_es/meta.js
CHANGED
|
@@ -101,7 +101,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
|
|
|
101
101
|
packageName = 'ydb-components-material';
|
|
102
102
|
}
|
|
103
103
|
if (version === void 0) {
|
|
104
|
-
version = '0.1.
|
|
104
|
+
version = '0.1.206';
|
|
105
105
|
}
|
|
106
106
|
if (basicLibraryVersion === void 0) {
|
|
107
107
|
basicLibraryVersion = {
|
package/lowcode_lib/meta.js
CHANGED
|
@@ -106,7 +106,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
|
|
|
106
106
|
packageName = 'ydb-components-material';
|
|
107
107
|
}
|
|
108
108
|
if (version === void 0) {
|
|
109
|
-
version = '0.1.
|
|
109
|
+
version = '0.1.206';
|
|
110
110
|
}
|
|
111
111
|
if (basicLibraryVersion === void 0) {
|
|
112
112
|
basicLibraryVersion = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ydb-components-material",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.206",
|
|
4
4
|
"description": "ydb-components-material",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -103,10 +103,10 @@
|
|
|
103
103
|
},
|
|
104
104
|
"componentConfig": {
|
|
105
105
|
"isComponentLibrary": true,
|
|
106
|
-
"materialSchema": "https://unpkg.com/ydb-components-material@0.1.
|
|
106
|
+
"materialSchema": "https://unpkg.com/ydb-components-material@0.1.206/build/lowcode/assets-prod.json"
|
|
107
107
|
},
|
|
108
108
|
"lcMeta": {
|
|
109
109
|
"type": "component"
|
|
110
110
|
},
|
|
111
|
-
"homepage": "https://unpkg.com/ydb-components-material@0.1.
|
|
111
|
+
"homepage": "https://unpkg.com/ydb-components-material@0.1.206/build/index.html"
|
|
112
112
|
}
|