ydb-components-material 0.1.163 → 0.1.165
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.4e7950ae.js → umi.326b40a5.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/checkPoint.js +12 -5
- package/es/components/file-list/item.js +8 -3
- package/lib/components/file-list/checkPoint.js +12 -5
- package/lib/components/file-list/item.js +8 -3
- package/lowcode_es/meta.js +1 -1
- package/lowcode_lib/meta.js +1 -1
- package/package.json +3 -3
|
@@ -23,6 +23,14 @@ export default function CheckPoint(props) {
|
|
|
23
23
|
setContainerHeight = _useState5[1];
|
|
24
24
|
var imgRef = useRef();
|
|
25
25
|
var containerRef = useRef();
|
|
26
|
+
|
|
27
|
+
// 获取 PDF 实际渲染宽度:以容器宽度为准,而非视口宽度。
|
|
28
|
+
// 移动端容器通常占满视口(clientWidth 等于视口宽),但 PC 端 CheckPoint 可能嵌在 Dialog 里
|
|
29
|
+
// (如 width=90vw),容器宽度小于视口,若按视口算缩放系数会整体偏大、标注点位错位
|
|
30
|
+
var getRenderWidth = function getRenderWidth() {
|
|
31
|
+
var container = containerRef.current;
|
|
32
|
+
return container && container.clientWidth ? container.clientWidth : document.documentElement.clientWidth;
|
|
33
|
+
};
|
|
26
34
|
var initData = function initData() {
|
|
27
35
|
var fileUrl = checkPointData.fileUrl,
|
|
28
36
|
_checkPointData$annot = checkPointData.annotations,
|
|
@@ -36,11 +44,10 @@ export default function CheckPoint(props) {
|
|
|
36
44
|
setResultData(annotations.sort(function (a, b) {
|
|
37
45
|
return a.page - b.page;
|
|
38
46
|
}));
|
|
39
|
-
var clientWidth = document.documentElement.clientWidth;
|
|
40
47
|
var _annotations$ = annotations[0],
|
|
41
48
|
scrollWidth = _annotations$.scrollWidth,
|
|
42
49
|
scrollHeight = _annotations$.scrollHeight;
|
|
43
|
-
var scale =
|
|
50
|
+
var scale = getRenderWidth() / scrollWidth;
|
|
44
51
|
setPageHeight(scrollHeight * scale);
|
|
45
52
|
};
|
|
46
53
|
|
|
@@ -56,11 +63,11 @@ export default function CheckPoint(props) {
|
|
|
56
63
|
console.log(width, height, x, y);
|
|
57
64
|
var img = imgRef.current;
|
|
58
65
|
console.log(img, 'refs');
|
|
59
|
-
var
|
|
60
|
-
console.log('
|
|
66
|
+
var renderWidth = getRenderWidth();
|
|
67
|
+
console.log('renderWidth-----', renderWidth);
|
|
61
68
|
|
|
62
69
|
// 算出一个系数,来动态生成下面的边框样式
|
|
63
|
-
var scale =
|
|
70
|
+
var scale = renderWidth / scrollWidth;
|
|
64
71
|
|
|
65
72
|
// console.log('原始宽高', sourceImgWidth, sourceImgHeight);
|
|
66
73
|
console.log('原始宽高', scrollWidth, scrollHeight);
|
|
@@ -577,9 +577,14 @@ var FileItem = function FileItem(_ref) {
|
|
|
577
577
|
var safeSignatureAgentRole = signatureAgentRole !== null && signatureAgentRole !== void 0 ? signatureAgentRole : [];
|
|
578
578
|
var safeSignSelfRole = signSelfRole !== null && signSelfRole !== void 0 ? signSelfRole : [];
|
|
579
579
|
var safeSignAgentRole = signAgentRole !== null && signAgentRole !== void 0 ? signAgentRole : [];
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
580
|
+
// 区分自办/代办场景:代办(signerInfo 非空)看 AgentRole,自办看 SelfRole
|
|
581
|
+
var isAgent = Object.keys(signerInfo).length > 0;
|
|
582
|
+
var safeSignatureRole = isAgent ? safeSignatureAgentRole : safeSignatureSelfRole;
|
|
583
|
+
var safeSignRole = isAgent ? safeSignAgentRole : safeSignSelfRole;
|
|
584
|
+
// 自己不需要签署、但需要别人签署时,直接打开维护签署人信息
|
|
585
|
+
var notNeedSelfSign = !safeSignatureRole.includes(SELF) && !safeSignRole.includes(SELF);
|
|
586
|
+
var needOtherSignInScenario = safeSignatureRole.includes(OTHER) || safeSignRole.includes(OTHER);
|
|
587
|
+
if (notNeedSelfSign && needOtherSignInScenario) {
|
|
583
588
|
setShowSignerInfo(true);
|
|
584
589
|
return;
|
|
585
590
|
}
|
|
@@ -28,6 +28,14 @@ function CheckPoint(props) {
|
|
|
28
28
|
setContainerHeight = _useState5[1];
|
|
29
29
|
var imgRef = (0, _react.useRef)();
|
|
30
30
|
var containerRef = (0, _react.useRef)();
|
|
31
|
+
|
|
32
|
+
// 获取 PDF 实际渲染宽度:以容器宽度为准,而非视口宽度。
|
|
33
|
+
// 移动端容器通常占满视口(clientWidth 等于视口宽),但 PC 端 CheckPoint 可能嵌在 Dialog 里
|
|
34
|
+
// (如 width=90vw),容器宽度小于视口,若按视口算缩放系数会整体偏大、标注点位错位
|
|
35
|
+
var getRenderWidth = function getRenderWidth() {
|
|
36
|
+
var container = containerRef.current;
|
|
37
|
+
return container && container.clientWidth ? container.clientWidth : document.documentElement.clientWidth;
|
|
38
|
+
};
|
|
31
39
|
var initData = function initData() {
|
|
32
40
|
var fileUrl = checkPointData.fileUrl,
|
|
33
41
|
_checkPointData$annot = checkPointData.annotations,
|
|
@@ -41,11 +49,10 @@ function CheckPoint(props) {
|
|
|
41
49
|
setResultData(annotations.sort(function (a, b) {
|
|
42
50
|
return a.page - b.page;
|
|
43
51
|
}));
|
|
44
|
-
var clientWidth = document.documentElement.clientWidth;
|
|
45
52
|
var _annotations$ = annotations[0],
|
|
46
53
|
scrollWidth = _annotations$.scrollWidth,
|
|
47
54
|
scrollHeight = _annotations$.scrollHeight;
|
|
48
|
-
var scale =
|
|
55
|
+
var scale = getRenderWidth() / scrollWidth;
|
|
49
56
|
setPageHeight(scrollHeight * scale);
|
|
50
57
|
};
|
|
51
58
|
|
|
@@ -61,11 +68,11 @@ function CheckPoint(props) {
|
|
|
61
68
|
console.log(width, height, x, y);
|
|
62
69
|
var img = imgRef.current;
|
|
63
70
|
console.log(img, 'refs');
|
|
64
|
-
var
|
|
65
|
-
console.log('
|
|
71
|
+
var renderWidth = getRenderWidth();
|
|
72
|
+
console.log('renderWidth-----', renderWidth);
|
|
66
73
|
|
|
67
74
|
// 算出一个系数,来动态生成下面的边框样式
|
|
68
|
-
var scale =
|
|
75
|
+
var scale = renderWidth / scrollWidth;
|
|
69
76
|
|
|
70
77
|
// console.log('原始宽高', sourceImgWidth, sourceImgHeight);
|
|
71
78
|
console.log('原始宽高', scrollWidth, scrollHeight);
|
|
@@ -583,9 +583,14 @@ var FileItem = function FileItem(_ref) {
|
|
|
583
583
|
var safeSignatureAgentRole = signatureAgentRole !== null && signatureAgentRole !== void 0 ? signatureAgentRole : [];
|
|
584
584
|
var safeSignSelfRole = signSelfRole !== null && signSelfRole !== void 0 ? signSelfRole : [];
|
|
585
585
|
var safeSignAgentRole = signAgentRole !== null && signAgentRole !== void 0 ? signAgentRole : [];
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
586
|
+
// 区分自办/代办场景:代办(signerInfo 非空)看 AgentRole,自办看 SelfRole
|
|
587
|
+
var isAgent = Object.keys(signerInfo).length > 0;
|
|
588
|
+
var safeSignatureRole = isAgent ? safeSignatureAgentRole : safeSignatureSelfRole;
|
|
589
|
+
var safeSignRole = isAgent ? safeSignAgentRole : safeSignSelfRole;
|
|
590
|
+
// 自己不需要签署、但需要别人签署时,直接打开维护签署人信息
|
|
591
|
+
var notNeedSelfSign = !safeSignatureRole.includes(SELF) && !safeSignRole.includes(SELF);
|
|
592
|
+
var needOtherSignInScenario = safeSignatureRole.includes(OTHER) || safeSignRole.includes(OTHER);
|
|
593
|
+
if (notNeedSelfSign && needOtherSignInScenario) {
|
|
589
594
|
setShowSignerInfo(true);
|
|
590
595
|
return;
|
|
591
596
|
}
|
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.165';
|
|
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.165';
|
|
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.165",
|
|
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.165/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.165/build/index.html"
|
|
111
111
|
}
|