ydb-components-material 0.1.140 → 0.1.141
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.eb9ae16b.js → umi.cd30b05c.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/index.d.ts +2 -0
- package/es/components/file-list/index.js +7 -1
- package/es/components/file-list/item.d.ts +2 -0
- package/es/components/file-list/item.js +5 -1
- package/es/components/file-list/sign.js +7 -2
- package/es/components/file-list/signUtil.js +4 -4
- package/lib/components/file-list/index.d.ts +2 -0
- package/lib/components/file-list/index.js +7 -1
- package/lib/components/file-list/item.d.ts +2 -0
- package/lib/components/file-list/item.js +5 -1
- package/lib/components/file-list/sign.js +7 -2
- package/lib/components/file-list/signUtil.js +4 -4
- package/lowcode/file-list/meta.ts +29 -0
- package/lowcode_es/file-list/meta.js +27 -0
- package/lowcode_es/meta.js +1 -1
- package/lowcode_lib/file-list/meta.js +27 -0
- package/lowcode_lib/meta.js +1 -1
- package/package.json +3 -3
|
@@ -48,7 +48,9 @@ var FileList = function FileList(_ref) {
|
|
|
48
48
|
valChange = _ref.valChange,
|
|
49
49
|
saveSignerInfo = _ref.saveSignerInfo,
|
|
50
50
|
applySeal = _ref.applySeal,
|
|
51
|
-
signInfoMap = _ref.signInfoMap
|
|
51
|
+
signInfoMap = _ref.signInfoMap,
|
|
52
|
+
parentPageUrl = _ref.parentPageUrl,
|
|
53
|
+
toSign = _ref.toSign;
|
|
52
54
|
var _useState = useState(fileList),
|
|
53
55
|
fileArray = _useState[0],
|
|
54
56
|
setFileArray = _useState[1];
|
|
@@ -316,6 +318,8 @@ var FileList = function FileList(_ref) {
|
|
|
316
318
|
valChange: handleChange,
|
|
317
319
|
openLoading: openLoading,
|
|
318
320
|
closeLoading: closeLoading,
|
|
321
|
+
parentPageUrl: parentPageUrl,
|
|
322
|
+
toSign: toSign,
|
|
319
323
|
saveSignerInfo: saveSignerInfo,
|
|
320
324
|
style: {
|
|
321
325
|
marginBottom: '12px'
|
|
@@ -343,12 +347,14 @@ var FileList = function FileList(_ref) {
|
|
|
343
347
|
baseUrl: baseUrl,
|
|
344
348
|
env: env,
|
|
345
349
|
isPC: isPC,
|
|
350
|
+
toSign: toSign,
|
|
346
351
|
disabled: disabled,
|
|
347
352
|
download: download,
|
|
348
353
|
applySeal: applySeal,
|
|
349
354
|
valChange: handleChange,
|
|
350
355
|
openLoading: openLoading,
|
|
351
356
|
closeLoading: closeLoading,
|
|
357
|
+
parentPageUrl: parentPageUrl,
|
|
352
358
|
saveSignerInfo: saveSignerInfo,
|
|
353
359
|
style: {
|
|
354
360
|
marginBottom: '12px'
|
|
@@ -53,7 +53,9 @@ var FileItem = function FileItem(_ref) {
|
|
|
53
53
|
closeLoading = _ref.closeLoading,
|
|
54
54
|
saveSignerInfo = _ref.saveSignerInfo,
|
|
55
55
|
signInfoMap = _ref.signInfoMap,
|
|
56
|
-
applySeal = _ref.applySeal
|
|
56
|
+
applySeal = _ref.applySeal,
|
|
57
|
+
parentPageUrl = _ref.parentPageUrl,
|
|
58
|
+
toSign = _ref.toSign;
|
|
57
59
|
console.log('fileItem', file, maxFileSize);
|
|
58
60
|
var fileName = file.fileName,
|
|
59
61
|
fileUrl = file.fileUrl,
|
|
@@ -1113,6 +1115,8 @@ var FileItem = function FileItem(_ref) {
|
|
|
1113
1115
|
userInfo: userInfo,
|
|
1114
1116
|
file: sealedFile || file,
|
|
1115
1117
|
fileList: fileList,
|
|
1118
|
+
parentPageUrl: parentPageUrl,
|
|
1119
|
+
toSign: toSign,
|
|
1116
1120
|
token: token,
|
|
1117
1121
|
tokenTY: tokenTY,
|
|
1118
1122
|
baseUrl: baseUrl,
|
|
@@ -8,6 +8,8 @@ function SignPage(props) {
|
|
|
8
8
|
file = props.file,
|
|
9
9
|
handleClose = props.handleClose,
|
|
10
10
|
fileList = props.fileList,
|
|
11
|
+
parentPageUrl = props.parentPageUrl,
|
|
12
|
+
toSign = props.toSign,
|
|
11
13
|
token = props.token,
|
|
12
14
|
tokenTY = props.tokenTY,
|
|
13
15
|
baseUrl = props.baseUrl,
|
|
@@ -36,13 +38,16 @@ function SignPage(props) {
|
|
|
36
38
|
baseUrl: baseUrl,
|
|
37
39
|
env: env,
|
|
38
40
|
isPC: isPC,
|
|
39
|
-
fileList: fileList
|
|
41
|
+
fileList: fileList,
|
|
42
|
+
parentPageUrl: parentPageUrl
|
|
40
43
|
});
|
|
41
44
|
case 1:
|
|
42
45
|
res = _context.sent;
|
|
43
46
|
pageUrl = res.pageUrl;
|
|
44
47
|
closeLoading();
|
|
45
|
-
|
|
48
|
+
if (toSign) {
|
|
49
|
+
toSign(pageUrl);
|
|
50
|
+
}
|
|
46
51
|
console.log(res);
|
|
47
52
|
case 2:
|
|
48
53
|
case "end":
|
|
@@ -212,8 +212,8 @@ function getContractSignUrl(contractIdVal, userInfo, config) {
|
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
//
|
|
216
|
-
function
|
|
215
|
+
// 保存签批信息
|
|
216
|
+
function setSignInfo(fileName, tokenTY, fileId, fileUrl) {
|
|
217
217
|
sessionStorage.setItem(tokenTY, JSON.stringify({
|
|
218
218
|
contractId: contractId,
|
|
219
219
|
documentId: documentId,
|
|
@@ -221,7 +221,6 @@ function getCallbackPageUrl(fileName, tokenTY, fileId, fileUrl) {
|
|
|
221
221
|
fileId: fileId,
|
|
222
222
|
fileUrl: fileUrl
|
|
223
223
|
}));
|
|
224
|
-
return window.location.href;
|
|
225
224
|
}
|
|
226
225
|
|
|
227
226
|
// 【第 4 步】获取签 pi 页面
|
|
@@ -250,7 +249,7 @@ function getSignUrl(userInfo, config, fileName, fileId, fileUrl) {
|
|
|
250
249
|
autoClosePage: true,
|
|
251
250
|
// 操作完成自动关闭页面
|
|
252
251
|
language: 'ZH_CN',
|
|
253
|
-
callbackPage:
|
|
252
|
+
callbackPage: config.parentPageUrl,
|
|
254
253
|
deviceType: config.isPC || 'H5' // 取值范围:PC(返回 PC 页面),H5(返回 H5 页面);不传值默认为:根据请求的 UserAgent 自动判断返回的页面类型。
|
|
255
254
|
};
|
|
256
255
|
return new Promise(function (resolve) {
|
|
@@ -258,6 +257,7 @@ function getSignUrl(userInfo, config, fileName, fileId, fileUrl) {
|
|
|
258
257
|
console.log(res, '页面结果');
|
|
259
258
|
if (res.data.code == 0) {
|
|
260
259
|
if (config.fileList) {
|
|
260
|
+
setSignInfo(fileName, config.tokenTY, fileId, fileUrl);
|
|
261
261
|
localStorage.setItem(config.tokenTY, JSON.stringify(config.fileList));
|
|
262
262
|
}
|
|
263
263
|
resolve(res.data.signUrl);
|
|
@@ -54,7 +54,9 @@ var FileList = function FileList(_ref) {
|
|
|
54
54
|
valChange = _ref.valChange,
|
|
55
55
|
saveSignerInfo = _ref.saveSignerInfo,
|
|
56
56
|
applySeal = _ref.applySeal,
|
|
57
|
-
signInfoMap = _ref.signInfoMap
|
|
57
|
+
signInfoMap = _ref.signInfoMap,
|
|
58
|
+
parentPageUrl = _ref.parentPageUrl,
|
|
59
|
+
toSign = _ref.toSign;
|
|
58
60
|
var _useState = (0, _react.useState)(fileList),
|
|
59
61
|
fileArray = _useState[0],
|
|
60
62
|
setFileArray = _useState[1];
|
|
@@ -322,6 +324,8 @@ var FileList = function FileList(_ref) {
|
|
|
322
324
|
valChange: handleChange,
|
|
323
325
|
openLoading: openLoading,
|
|
324
326
|
closeLoading: closeLoading,
|
|
327
|
+
parentPageUrl: parentPageUrl,
|
|
328
|
+
toSign: toSign,
|
|
325
329
|
saveSignerInfo: saveSignerInfo,
|
|
326
330
|
style: {
|
|
327
331
|
marginBottom: '12px'
|
|
@@ -349,12 +353,14 @@ var FileList = function FileList(_ref) {
|
|
|
349
353
|
baseUrl: baseUrl,
|
|
350
354
|
env: env,
|
|
351
355
|
isPC: isPC,
|
|
356
|
+
toSign: toSign,
|
|
352
357
|
disabled: disabled,
|
|
353
358
|
download: download,
|
|
354
359
|
applySeal: applySeal,
|
|
355
360
|
valChange: handleChange,
|
|
356
361
|
openLoading: openLoading,
|
|
357
362
|
closeLoading: closeLoading,
|
|
363
|
+
parentPageUrl: parentPageUrl,
|
|
358
364
|
saveSignerInfo: saveSignerInfo,
|
|
359
365
|
style: {
|
|
360
366
|
marginBottom: '12px'
|
|
@@ -59,7 +59,9 @@ var FileItem = function FileItem(_ref) {
|
|
|
59
59
|
closeLoading = _ref.closeLoading,
|
|
60
60
|
saveSignerInfo = _ref.saveSignerInfo,
|
|
61
61
|
signInfoMap = _ref.signInfoMap,
|
|
62
|
-
applySeal = _ref.applySeal
|
|
62
|
+
applySeal = _ref.applySeal,
|
|
63
|
+
parentPageUrl = _ref.parentPageUrl,
|
|
64
|
+
toSign = _ref.toSign;
|
|
63
65
|
console.log('fileItem', file, maxFileSize);
|
|
64
66
|
var fileName = file.fileName,
|
|
65
67
|
fileUrl = file.fileUrl,
|
|
@@ -1119,6 +1121,8 @@ var FileItem = function FileItem(_ref) {
|
|
|
1119
1121
|
userInfo: userInfo,
|
|
1120
1122
|
file: sealedFile || file,
|
|
1121
1123
|
fileList: fileList,
|
|
1124
|
+
parentPageUrl: parentPageUrl,
|
|
1125
|
+
toSign: toSign,
|
|
1122
1126
|
token: token,
|
|
1123
1127
|
tokenTY: tokenTY,
|
|
1124
1128
|
baseUrl: baseUrl,
|
|
@@ -14,6 +14,8 @@ function SignPage(props) {
|
|
|
14
14
|
file = props.file,
|
|
15
15
|
handleClose = props.handleClose,
|
|
16
16
|
fileList = props.fileList,
|
|
17
|
+
parentPageUrl = props.parentPageUrl,
|
|
18
|
+
toSign = props.toSign,
|
|
17
19
|
token = props.token,
|
|
18
20
|
tokenTY = props.tokenTY,
|
|
19
21
|
baseUrl = props.baseUrl,
|
|
@@ -42,13 +44,16 @@ function SignPage(props) {
|
|
|
42
44
|
baseUrl: baseUrl,
|
|
43
45
|
env: env,
|
|
44
46
|
isPC: isPC,
|
|
45
|
-
fileList: fileList
|
|
47
|
+
fileList: fileList,
|
|
48
|
+
parentPageUrl: parentPageUrl
|
|
46
49
|
});
|
|
47
50
|
case 1:
|
|
48
51
|
res = _context.sent;
|
|
49
52
|
pageUrl = res.pageUrl;
|
|
50
53
|
closeLoading();
|
|
51
|
-
|
|
54
|
+
if (toSign) {
|
|
55
|
+
toSign(pageUrl);
|
|
56
|
+
}
|
|
52
57
|
console.log(res);
|
|
53
58
|
case 2:
|
|
54
59
|
case "end":
|
|
@@ -216,8 +216,8 @@ function getContractSignUrl(contractIdVal, userInfo, config) {
|
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
//
|
|
220
|
-
function
|
|
219
|
+
// 保存签批信息
|
|
220
|
+
function setSignInfo(fileName, tokenTY, fileId, fileUrl) {
|
|
221
221
|
sessionStorage.setItem(tokenTY, JSON.stringify({
|
|
222
222
|
contractId: contractId,
|
|
223
223
|
documentId: documentId,
|
|
@@ -225,7 +225,6 @@ function getCallbackPageUrl(fileName, tokenTY, fileId, fileUrl) {
|
|
|
225
225
|
fileId: fileId,
|
|
226
226
|
fileUrl: fileUrl
|
|
227
227
|
}));
|
|
228
|
-
return window.location.href;
|
|
229
228
|
}
|
|
230
229
|
|
|
231
230
|
// 【第 4 步】获取签 pi 页面
|
|
@@ -254,7 +253,7 @@ function getSignUrl(userInfo, config, fileName, fileId, fileUrl) {
|
|
|
254
253
|
autoClosePage: true,
|
|
255
254
|
// 操作完成自动关闭页面
|
|
256
255
|
language: 'ZH_CN',
|
|
257
|
-
callbackPage:
|
|
256
|
+
callbackPage: config.parentPageUrl,
|
|
258
257
|
deviceType: config.isPC || 'H5' // 取值范围:PC(返回 PC 页面),H5(返回 H5 页面);不传值默认为:根据请求的 UserAgent 自动判断返回的页面类型。
|
|
259
258
|
};
|
|
260
259
|
return new Promise(function (resolve) {
|
|
@@ -262,6 +261,7 @@ function getSignUrl(userInfo, config, fileName, fileId, fileUrl) {
|
|
|
262
261
|
console.log(res, '页面结果');
|
|
263
262
|
if (res.data.code == 0) {
|
|
264
263
|
if (config.fileList) {
|
|
264
|
+
setSignInfo(fileName, config.tokenTY, fileId, fileUrl);
|
|
265
265
|
localStorage.setItem(config.tokenTY, JSON.stringify(config.fileList));
|
|
266
266
|
}
|
|
267
267
|
resolve(res.data.signUrl);
|
|
@@ -117,6 +117,21 @@ const FileListMeta: IPublicTypeComponentMetadata = {
|
|
|
117
117
|
"initialValue": ""
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
|
+
{
|
|
121
|
+
"title": {
|
|
122
|
+
"label": {
|
|
123
|
+
"type": "i18n",
|
|
124
|
+
"en-US": "parentPageUrl",
|
|
125
|
+
"zh-CN": "parentPageUrl"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"name": "parentPageUrl",
|
|
129
|
+
"setter": {
|
|
130
|
+
"componentName": "StringSetter",
|
|
131
|
+
"isRequired": true,
|
|
132
|
+
"initialValue": ""
|
|
133
|
+
}
|
|
134
|
+
},
|
|
120
135
|
{
|
|
121
136
|
"title": {
|
|
122
137
|
"label": {
|
|
@@ -245,6 +260,20 @@ const FileListMeta: IPublicTypeComponentMetadata = {
|
|
|
245
260
|
"isRequired": true
|
|
246
261
|
}
|
|
247
262
|
},
|
|
263
|
+
{
|
|
264
|
+
"title": {
|
|
265
|
+
"label": {
|
|
266
|
+
"type": "i18n",
|
|
267
|
+
"en-US": "toSign",
|
|
268
|
+
"zh-CN": "toSign"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"name": "toSign",
|
|
272
|
+
"setter": {
|
|
273
|
+
"componentName": "FunctionSetter",
|
|
274
|
+
"isRequired": true
|
|
275
|
+
}
|
|
276
|
+
},
|
|
248
277
|
{
|
|
249
278
|
"title": {
|
|
250
279
|
"label": {
|
|
@@ -110,6 +110,20 @@ var FileListMeta = {
|
|
|
110
110
|
"isRequired": true,
|
|
111
111
|
"initialValue": ""
|
|
112
112
|
}
|
|
113
|
+
}, {
|
|
114
|
+
"title": {
|
|
115
|
+
"label": {
|
|
116
|
+
"type": "i18n",
|
|
117
|
+
"en-US": "parentPageUrl",
|
|
118
|
+
"zh-CN": "parentPageUrl"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"name": "parentPageUrl",
|
|
122
|
+
"setter": {
|
|
123
|
+
"componentName": "StringSetter",
|
|
124
|
+
"isRequired": true,
|
|
125
|
+
"initialValue": ""
|
|
126
|
+
}
|
|
113
127
|
}, {
|
|
114
128
|
"title": {
|
|
115
129
|
"label": {
|
|
@@ -230,6 +244,19 @@ var FileListMeta = {
|
|
|
230
244
|
"componentName": "FunctionSetter",
|
|
231
245
|
"isRequired": true
|
|
232
246
|
}
|
|
247
|
+
}, {
|
|
248
|
+
"title": {
|
|
249
|
+
"label": {
|
|
250
|
+
"type": "i18n",
|
|
251
|
+
"en-US": "toSign",
|
|
252
|
+
"zh-CN": "toSign"
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"name": "toSign",
|
|
256
|
+
"setter": {
|
|
257
|
+
"componentName": "FunctionSetter",
|
|
258
|
+
"isRequired": true
|
|
259
|
+
}
|
|
233
260
|
}, {
|
|
234
261
|
"title": {
|
|
235
262
|
"label": {
|
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.141';
|
|
102
102
|
}
|
|
103
103
|
if (basicLibraryVersion === void 0) {
|
|
104
104
|
basicLibraryVersion = {
|
|
@@ -115,6 +115,20 @@ var FileListMeta = {
|
|
|
115
115
|
"isRequired": true,
|
|
116
116
|
"initialValue": ""
|
|
117
117
|
}
|
|
118
|
+
}, {
|
|
119
|
+
"title": {
|
|
120
|
+
"label": {
|
|
121
|
+
"type": "i18n",
|
|
122
|
+
"en-US": "parentPageUrl",
|
|
123
|
+
"zh-CN": "parentPageUrl"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"name": "parentPageUrl",
|
|
127
|
+
"setter": {
|
|
128
|
+
"componentName": "StringSetter",
|
|
129
|
+
"isRequired": true,
|
|
130
|
+
"initialValue": ""
|
|
131
|
+
}
|
|
118
132
|
}, {
|
|
119
133
|
"title": {
|
|
120
134
|
"label": {
|
|
@@ -235,6 +249,19 @@ var FileListMeta = {
|
|
|
235
249
|
"componentName": "FunctionSetter",
|
|
236
250
|
"isRequired": true
|
|
237
251
|
}
|
|
252
|
+
}, {
|
|
253
|
+
"title": {
|
|
254
|
+
"label": {
|
|
255
|
+
"type": "i18n",
|
|
256
|
+
"en-US": "toSign",
|
|
257
|
+
"zh-CN": "toSign"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"name": "toSign",
|
|
261
|
+
"setter": {
|
|
262
|
+
"componentName": "FunctionSetter",
|
|
263
|
+
"isRequired": true
|
|
264
|
+
}
|
|
238
265
|
}, {
|
|
239
266
|
"title": {
|
|
240
267
|
"label": {
|
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.141';
|
|
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.141",
|
|
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.141/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.141/build/index.html"
|
|
111
111
|
}
|