ydb-components-material 0.1.144 → 0.1.146
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.152bba34.js → umi.b1ac739d.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.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/dist/BizComps.js +1 -1
- package/dist/BizComps.js.map +1 -1
- package/es/components/file-list/item.js +15 -10
- package/es/components/file-list/signUtil.js +3 -3
- package/lib/components/file-list/item.js +15 -10
- package/lib/components/file-list/signUtil.js +3 -3
- package/lowcode_es/meta.js +1 -1
- package/lowcode_lib/meta.js +1 -1
- package/package.json +3 -3
|
@@ -200,6 +200,7 @@ var FileItem = function FileItem(_ref) {
|
|
|
200
200
|
var _useState18 = useState(0),
|
|
201
201
|
signKey = _useState18[0],
|
|
202
202
|
setSignKey = _useState18[1];
|
|
203
|
+
var timerRef = useRef(null);
|
|
203
204
|
var originalUrlRef = useRef('');
|
|
204
205
|
var getSignedFile = /*#__PURE__*/function () {
|
|
205
206
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(documentIdVal, contractIdVal, nameVal) {
|
|
@@ -218,12 +219,13 @@ var FileItem = function FileItem(_ref) {
|
|
|
218
219
|
});
|
|
219
220
|
case 1:
|
|
220
221
|
newFile = _context.sent;
|
|
221
|
-
sessionStorage.removeItem(tokenTY);
|
|
222
|
-
localStorage.removeItem(tokenTY);
|
|
223
222
|
if (!newFile) {
|
|
224
223
|
_context.next = 2;
|
|
225
224
|
break;
|
|
226
225
|
}
|
|
226
|
+
clearInterval(timerRef.current);
|
|
227
|
+
timerRef.current = null;
|
|
228
|
+
localStorage.removeItem(fileId);
|
|
227
229
|
closeLoading();
|
|
228
230
|
getRes(_extends({}, file, {
|
|
229
231
|
fileId: newFile.fileId,
|
|
@@ -901,7 +903,7 @@ var FileItem = function FileItem(_ref) {
|
|
|
901
903
|
}, [fileId]);
|
|
902
904
|
useEffect(function () {
|
|
903
905
|
try {
|
|
904
|
-
var stored =
|
|
906
|
+
var stored = localStorage.getItem(fileId);
|
|
905
907
|
if (stored) {
|
|
906
908
|
console.log('stored---', stored);
|
|
907
909
|
var _JSON$parse = JSON.parse(stored),
|
|
@@ -911,19 +913,22 @@ var FileItem = function FileItem(_ref) {
|
|
|
911
913
|
storedFileId = _JSON$parse.fileId,
|
|
912
914
|
originalUrl = _JSON$parse.fileUrl;
|
|
913
915
|
console.log('docId', docId, contrId, nameVal);
|
|
914
|
-
|
|
916
|
+
localStorage.removeItem(storedFileId);
|
|
915
917
|
originalUrlRef.current = originalUrl || '';
|
|
916
918
|
if (docId && contrId && nameVal) {
|
|
917
919
|
openLoading();
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
_Message.error('签署失败,请重新签署');
|
|
922
|
-
}
|
|
923
|
-
});
|
|
920
|
+
timerRef.current = setInterval(function () {
|
|
921
|
+
getSignedFile(docId, contrId, nameVal);
|
|
922
|
+
}, 3000);
|
|
924
923
|
}
|
|
925
924
|
}
|
|
926
925
|
} catch (e) {}
|
|
926
|
+
return function () {
|
|
927
|
+
if (timerRef.current) {
|
|
928
|
+
clearInterval(timerRef.current);
|
|
929
|
+
timerRef.current = null;
|
|
930
|
+
}
|
|
931
|
+
};
|
|
927
932
|
}, []);
|
|
928
933
|
return /*#__PURE__*/React.createElement("div", {
|
|
929
934
|
className: "file_item",
|
|
@@ -213,8 +213,8 @@ function getContractSignUrl(contractIdVal, userInfo, config) {
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
// 保存签批信息
|
|
216
|
-
function setSignInfo(fileName,
|
|
217
|
-
|
|
216
|
+
function setSignInfo(fileName, fileId, fileUrl) {
|
|
217
|
+
localStorage.setItem(fileId, JSON.stringify({
|
|
218
218
|
contractId: contractId,
|
|
219
219
|
documentId: documentId,
|
|
220
220
|
fileName: fileName,
|
|
@@ -257,7 +257,7 @@ function getSignUrl(userInfo, config, fileName, fileId, fileUrl) {
|
|
|
257
257
|
console.log(res, '页面结果');
|
|
258
258
|
if (res.data.code == 0) {
|
|
259
259
|
if (config.fileList) {
|
|
260
|
-
setSignInfo(fileName,
|
|
260
|
+
setSignInfo(fileName, fileId, fileUrl);
|
|
261
261
|
localStorage.setItem(config.tokenTY, JSON.stringify(config.fileList));
|
|
262
262
|
}
|
|
263
263
|
resolve(res.data.signUrl);
|
|
@@ -206,6 +206,7 @@ var FileItem = function FileItem(_ref) {
|
|
|
206
206
|
var _useState18 = (0, _react.useState)(0),
|
|
207
207
|
signKey = _useState18[0],
|
|
208
208
|
setSignKey = _useState18[1];
|
|
209
|
+
var timerRef = (0, _react.useRef)(null);
|
|
209
210
|
var originalUrlRef = (0, _react.useRef)('');
|
|
210
211
|
var getSignedFile = /*#__PURE__*/function () {
|
|
211
212
|
var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(documentIdVal, contractIdVal, nameVal) {
|
|
@@ -224,12 +225,13 @@ var FileItem = function FileItem(_ref) {
|
|
|
224
225
|
});
|
|
225
226
|
case 1:
|
|
226
227
|
newFile = _context.sent;
|
|
227
|
-
sessionStorage.removeItem(tokenTY);
|
|
228
|
-
localStorage.removeItem(tokenTY);
|
|
229
228
|
if (!newFile) {
|
|
230
229
|
_context.next = 2;
|
|
231
230
|
break;
|
|
232
231
|
}
|
|
232
|
+
clearInterval(timerRef.current);
|
|
233
|
+
timerRef.current = null;
|
|
234
|
+
localStorage.removeItem(fileId);
|
|
233
235
|
closeLoading();
|
|
234
236
|
getRes((0, _extends3["default"])({}, file, {
|
|
235
237
|
fileId: newFile.fileId,
|
|
@@ -907,7 +909,7 @@ var FileItem = function FileItem(_ref) {
|
|
|
907
909
|
}, [fileId]);
|
|
908
910
|
(0, _react.useEffect)(function () {
|
|
909
911
|
try {
|
|
910
|
-
var stored =
|
|
912
|
+
var stored = localStorage.getItem(fileId);
|
|
911
913
|
if (stored) {
|
|
912
914
|
console.log('stored---', stored);
|
|
913
915
|
var _JSON$parse = JSON.parse(stored),
|
|
@@ -917,19 +919,22 @@ var FileItem = function FileItem(_ref) {
|
|
|
917
919
|
storedFileId = _JSON$parse.fileId,
|
|
918
920
|
originalUrl = _JSON$parse.fileUrl;
|
|
919
921
|
console.log('docId', docId, contrId, nameVal);
|
|
920
|
-
|
|
922
|
+
localStorage.removeItem(storedFileId);
|
|
921
923
|
originalUrlRef.current = originalUrl || '';
|
|
922
924
|
if (docId && contrId && nameVal) {
|
|
923
925
|
openLoading();
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
_message["default"].error('签署失败,请重新签署');
|
|
928
|
-
}
|
|
929
|
-
});
|
|
926
|
+
timerRef.current = setInterval(function () {
|
|
927
|
+
getSignedFile(docId, contrId, nameVal);
|
|
928
|
+
}, 3000);
|
|
930
929
|
}
|
|
931
930
|
}
|
|
932
931
|
} catch (e) {}
|
|
932
|
+
return function () {
|
|
933
|
+
if (timerRef.current) {
|
|
934
|
+
clearInterval(timerRef.current);
|
|
935
|
+
timerRef.current = null;
|
|
936
|
+
}
|
|
937
|
+
};
|
|
933
938
|
}, []);
|
|
934
939
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
935
940
|
className: "file_item",
|
|
@@ -217,8 +217,8 @@ function getContractSignUrl(contractIdVal, userInfo, config) {
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
// 保存签批信息
|
|
220
|
-
function setSignInfo(fileName,
|
|
221
|
-
|
|
220
|
+
function setSignInfo(fileName, fileId, fileUrl) {
|
|
221
|
+
localStorage.setItem(fileId, JSON.stringify({
|
|
222
222
|
contractId: contractId,
|
|
223
223
|
documentId: documentId,
|
|
224
224
|
fileName: fileName,
|
|
@@ -261,7 +261,7 @@ function getSignUrl(userInfo, config, fileName, fileId, fileUrl) {
|
|
|
261
261
|
console.log(res, '页面结果');
|
|
262
262
|
if (res.data.code == 0) {
|
|
263
263
|
if (config.fileList) {
|
|
264
|
-
setSignInfo(fileName,
|
|
264
|
+
setSignInfo(fileName, fileId, fileUrl);
|
|
265
265
|
localStorage.setItem(config.tokenTY, JSON.stringify(config.fileList));
|
|
266
266
|
}
|
|
267
267
|
resolve(res.data.signUrl);
|
package/lowcode_es/meta.js
CHANGED
|
@@ -98,7 +98,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
|
|
|
98
98
|
packageName = 'ydb-components-material';
|
|
99
99
|
}
|
|
100
100
|
if (version === void 0) {
|
|
101
|
-
version = '0.1.
|
|
101
|
+
version = '0.1.146';
|
|
102
102
|
}
|
|
103
103
|
if (basicLibraryVersion === void 0) {
|
|
104
104
|
basicLibraryVersion = {
|
package/lowcode_lib/meta.js
CHANGED
|
@@ -103,7 +103,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
|
|
|
103
103
|
packageName = 'ydb-components-material';
|
|
104
104
|
}
|
|
105
105
|
if (version === void 0) {
|
|
106
|
-
version = '0.1.
|
|
106
|
+
version = '0.1.146';
|
|
107
107
|
}
|
|
108
108
|
if (basicLibraryVersion === void 0) {
|
|
109
109
|
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.146",
|
|
4
4
|
"description": "ydb-components-material",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -102,10 +102,10 @@
|
|
|
102
102
|
},
|
|
103
103
|
"componentConfig": {
|
|
104
104
|
"isComponentLibrary": true,
|
|
105
|
-
"materialSchema": "https://unpkg.com/ydb-components-material@0.1.
|
|
105
|
+
"materialSchema": "https://unpkg.com/ydb-components-material@0.1.146/build/lowcode/assets-prod.json"
|
|
106
106
|
},
|
|
107
107
|
"lcMeta": {
|
|
108
108
|
"type": "component"
|
|
109
109
|
},
|
|
110
|
-
"homepage": "https://unpkg.com/ydb-components-material@0.1.
|
|
110
|
+
"homepage": "https://unpkg.com/ydb-components-material@0.1.146/build/index.html"
|
|
111
111
|
}
|