ydb-components-material 0.1.141 → 0.1.143
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.cd30b05c.js → umi.344a75b4.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/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +5 -5
- package/build/lowcode/render/default/1.js +1 -1
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.js +4 -4
- package/dist/1.js +1 -1
- package/dist/BizComps.js +8 -8
- package/dist/BizComps.js.map +1 -1
- package/es/components/file-list/item.js +23 -26
- package/es/components/file-list/sign.d.ts +1 -2
- package/es/components/file-list/sign.js +3 -14
- package/lib/components/file-list/item.js +23 -26
- package/lib/components/file-list/sign.d.ts +1 -2
- package/lib/components/file-list/sign.js +3 -15
- package/lowcode_es/meta.js +1 -1
- package/lowcode_lib/meta.js +1 -1
- package/package.json +3 -3
|
@@ -197,7 +197,6 @@ var FileItem = function FileItem(_ref) {
|
|
|
197
197
|
var _useState17 = useState(true),
|
|
198
198
|
showSignPageClose = _useState17[0],
|
|
199
199
|
setShowSignPageClose = _useState17[1];
|
|
200
|
-
var timerRef = useRef(null);
|
|
201
200
|
var originalUrlRef = useRef('');
|
|
202
201
|
var getSignedFile = /*#__PURE__*/function () {
|
|
203
202
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(documentIdVal, contractIdVal, nameVal) {
|
|
@@ -216,20 +215,24 @@ var FileItem = function FileItem(_ref) {
|
|
|
216
215
|
});
|
|
217
216
|
case 1:
|
|
218
217
|
newFile = _context.sent;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
getRes(_extends({}, file, {
|
|
225
|
-
fileId: newFile.fileId,
|
|
226
|
-
fileName: nameVal,
|
|
227
|
-
fileUrl: newFile.fileUrlList[2],
|
|
228
|
-
originalUrl: originalUrlRef.current,
|
|
229
|
-
isSigned: true
|
|
230
|
-
}));
|
|
218
|
+
sessionStorage.removeItem(tokenTY);
|
|
219
|
+
localStorage.removeItem(tokenTY);
|
|
220
|
+
if (!newFile) {
|
|
221
|
+
_context.next = 2;
|
|
222
|
+
break;
|
|
231
223
|
}
|
|
224
|
+
closeLoading();
|
|
225
|
+
getRes(_extends({}, file, {
|
|
226
|
+
fileId: newFile.fileId,
|
|
227
|
+
fileName: nameVal,
|
|
228
|
+
fileUrl: newFile.fileUrlList[2],
|
|
229
|
+
originalUrl: originalUrlRef.current,
|
|
230
|
+
isSigned: true
|
|
231
|
+
}));
|
|
232
|
+
return _context.abrupt("return", true);
|
|
232
233
|
case 2:
|
|
234
|
+
return _context.abrupt("return", false);
|
|
235
|
+
case 3:
|
|
233
236
|
case "end":
|
|
234
237
|
return _context.stop();
|
|
235
238
|
}
|
|
@@ -239,10 +242,6 @@ var FileItem = function FileItem(_ref) {
|
|
|
239
242
|
return _ref2.apply(this, arguments);
|
|
240
243
|
};
|
|
241
244
|
}();
|
|
242
|
-
var handleClearInterval = function handleClearInterval() {
|
|
243
|
-
clearInterval(timerRef.current);
|
|
244
|
-
timerRef.current = null;
|
|
245
|
-
};
|
|
246
245
|
var upload = function upload() {
|
|
247
246
|
if (disabled) return;
|
|
248
247
|
var inputEl = document.createElement('input');
|
|
@@ -908,19 +907,17 @@ var FileItem = function FileItem(_ref) {
|
|
|
908
907
|
console.log('docId', docId, contrId, nameVal);
|
|
909
908
|
if (storedFileId !== fileId) return;
|
|
910
909
|
originalUrlRef.current = originalUrl || '';
|
|
911
|
-
if (docId && contrId && nameVal
|
|
912
|
-
handleClearInterval();
|
|
910
|
+
if (docId && contrId && nameVal) {
|
|
913
911
|
openLoading();
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
912
|
+
getSignedFile(docId, contrId, nameVal).then(function (success) {
|
|
913
|
+
if (!success) {
|
|
914
|
+
closeLoading();
|
|
915
|
+
_Message.error('签署失败,请重新签署');
|
|
916
|
+
}
|
|
917
|
+
});
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
920
|
} catch (e) {}
|
|
921
|
-
return function () {
|
|
922
|
-
handleClearInterval();
|
|
923
|
-
};
|
|
924
921
|
}, []);
|
|
925
922
|
return /*#__PURE__*/React.createElement("div", {
|
|
926
923
|
className: "file_item",
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
-
import
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
4
|
import { initSignPageMethod } from "./signUtil";
|
|
5
|
-
import closeIcon from "./icon/close.svg";
|
|
6
5
|
function SignPage(props) {
|
|
7
6
|
var userInfo = props.userInfo,
|
|
8
7
|
file = props.file,
|
|
9
|
-
handleClose = props.handleClose,
|
|
10
8
|
fileList = props.fileList,
|
|
11
9
|
parentPageUrl = props.parentPageUrl,
|
|
12
10
|
toSign = props.toSign,
|
|
@@ -15,9 +13,7 @@ function SignPage(props) {
|
|
|
15
13
|
baseUrl = props.baseUrl,
|
|
16
14
|
env = props.env,
|
|
17
15
|
isPC = props.isPC,
|
|
18
|
-
closeLoading = props.closeLoading
|
|
19
|
-
_props$showClose = props.showClose,
|
|
20
|
-
showClose = _props$showClose === void 0 ? true : _props$showClose;
|
|
16
|
+
closeLoading = props.closeLoading;
|
|
21
17
|
var init = /*#__PURE__*/function () {
|
|
22
18
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
23
19
|
var fileObj, res, pageUrl;
|
|
@@ -62,13 +58,6 @@ function SignPage(props) {
|
|
|
62
58
|
useEffect(function () {
|
|
63
59
|
init();
|
|
64
60
|
}, []);
|
|
65
|
-
return
|
|
66
|
-
className: "sign_page"
|
|
67
|
-
}, showClose && /*#__PURE__*/React.createElement("img", {
|
|
68
|
-
className: "sign_close",
|
|
69
|
-
src: closeIcon,
|
|
70
|
-
alt: "",
|
|
71
|
-
onClick: handleClose
|
|
72
|
-
}));
|
|
61
|
+
return null;
|
|
73
62
|
}
|
|
74
63
|
export default SignPage;
|
|
@@ -203,7 +203,6 @@ var FileItem = function FileItem(_ref) {
|
|
|
203
203
|
var _useState17 = (0, _react.useState)(true),
|
|
204
204
|
showSignPageClose = _useState17[0],
|
|
205
205
|
setShowSignPageClose = _useState17[1];
|
|
206
|
-
var timerRef = (0, _react.useRef)(null);
|
|
207
206
|
var originalUrlRef = (0, _react.useRef)('');
|
|
208
207
|
var getSignedFile = /*#__PURE__*/function () {
|
|
209
208
|
var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(documentIdVal, contractIdVal, nameVal) {
|
|
@@ -222,20 +221,24 @@ var FileItem = function FileItem(_ref) {
|
|
|
222
221
|
});
|
|
223
222
|
case 1:
|
|
224
223
|
newFile = _context.sent;
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
getRes((0, _extends3["default"])({}, file, {
|
|
231
|
-
fileId: newFile.fileId,
|
|
232
|
-
fileName: nameVal,
|
|
233
|
-
fileUrl: newFile.fileUrlList[2],
|
|
234
|
-
originalUrl: originalUrlRef.current,
|
|
235
|
-
isSigned: true
|
|
236
|
-
}));
|
|
224
|
+
sessionStorage.removeItem(tokenTY);
|
|
225
|
+
localStorage.removeItem(tokenTY);
|
|
226
|
+
if (!newFile) {
|
|
227
|
+
_context.next = 2;
|
|
228
|
+
break;
|
|
237
229
|
}
|
|
230
|
+
closeLoading();
|
|
231
|
+
getRes((0, _extends3["default"])({}, file, {
|
|
232
|
+
fileId: newFile.fileId,
|
|
233
|
+
fileName: nameVal,
|
|
234
|
+
fileUrl: newFile.fileUrlList[2],
|
|
235
|
+
originalUrl: originalUrlRef.current,
|
|
236
|
+
isSigned: true
|
|
237
|
+
}));
|
|
238
|
+
return _context.abrupt("return", true);
|
|
238
239
|
case 2:
|
|
240
|
+
return _context.abrupt("return", false);
|
|
241
|
+
case 3:
|
|
239
242
|
case "end":
|
|
240
243
|
return _context.stop();
|
|
241
244
|
}
|
|
@@ -245,10 +248,6 @@ var FileItem = function FileItem(_ref) {
|
|
|
245
248
|
return _ref2.apply(this, arguments);
|
|
246
249
|
};
|
|
247
250
|
}();
|
|
248
|
-
var handleClearInterval = function handleClearInterval() {
|
|
249
|
-
clearInterval(timerRef.current);
|
|
250
|
-
timerRef.current = null;
|
|
251
|
-
};
|
|
252
251
|
var upload = function upload() {
|
|
253
252
|
if (disabled) return;
|
|
254
253
|
var inputEl = document.createElement('input');
|
|
@@ -914,19 +913,17 @@ var FileItem = function FileItem(_ref) {
|
|
|
914
913
|
console.log('docId', docId, contrId, nameVal);
|
|
915
914
|
if (storedFileId !== fileId) return;
|
|
916
915
|
originalUrlRef.current = originalUrl || '';
|
|
917
|
-
if (docId && contrId && nameVal
|
|
918
|
-
handleClearInterval();
|
|
916
|
+
if (docId && contrId && nameVal) {
|
|
919
917
|
openLoading();
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
918
|
+
getSignedFile(docId, contrId, nameVal).then(function (success) {
|
|
919
|
+
if (!success) {
|
|
920
|
+
closeLoading();
|
|
921
|
+
_message["default"].error('签署失败,请重新签署');
|
|
922
|
+
}
|
|
923
|
+
});
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
} catch (e) {}
|
|
927
|
-
return function () {
|
|
928
|
-
handleClearInterval();
|
|
929
|
-
};
|
|
930
927
|
}, []);
|
|
931
928
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
932
929
|
className: "file_item",
|
|
@@ -5,14 +5,11 @@ exports.__esModule = true;
|
|
|
5
5
|
exports["default"] = void 0;
|
|
6
6
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
7
7
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = require("react");
|
|
9
9
|
var _signUtil = require("./signUtil");
|
|
10
|
-
var _close = _interopRequireDefault(require("./icon/close.svg"));
|
|
11
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
12
10
|
function SignPage(props) {
|
|
13
11
|
var userInfo = props.userInfo,
|
|
14
12
|
file = props.file,
|
|
15
|
-
handleClose = props.handleClose,
|
|
16
13
|
fileList = props.fileList,
|
|
17
14
|
parentPageUrl = props.parentPageUrl,
|
|
18
15
|
toSign = props.toSign,
|
|
@@ -21,9 +18,7 @@ function SignPage(props) {
|
|
|
21
18
|
baseUrl = props.baseUrl,
|
|
22
19
|
env = props.env,
|
|
23
20
|
isPC = props.isPC,
|
|
24
|
-
closeLoading = props.closeLoading
|
|
25
|
-
_props$showClose = props.showClose,
|
|
26
|
-
showClose = _props$showClose === void 0 ? true : _props$showClose;
|
|
21
|
+
closeLoading = props.closeLoading;
|
|
27
22
|
var init = /*#__PURE__*/function () {
|
|
28
23
|
var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
29
24
|
var fileObj, res, pageUrl;
|
|
@@ -68,13 +63,6 @@ function SignPage(props) {
|
|
|
68
63
|
(0, _react.useEffect)(function () {
|
|
69
64
|
init();
|
|
70
65
|
}, []);
|
|
71
|
-
return
|
|
72
|
-
className: "sign_page"
|
|
73
|
-
}, showClose && /*#__PURE__*/_react["default"].createElement("img", {
|
|
74
|
-
className: "sign_close",
|
|
75
|
-
src: _close["default"],
|
|
76
|
-
alt: "",
|
|
77
|
-
onClick: handleClose
|
|
78
|
-
}));
|
|
66
|
+
return null;
|
|
79
67
|
}
|
|
80
68
|
var _default = exports["default"] = SignPage;
|
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.143';
|
|
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.143';
|
|
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.143",
|
|
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.143/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.143/build/index.html"
|
|
111
111
|
}
|