pb-sxp-ui 1.19.19 → 1.20.0
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/dist/index.cjs +21 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -14
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +12 -5
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +12 -5
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +21 -14
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +12 -5
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/hooks/useVisibleHeight.js +21 -14
- package/lib/core/hooks/useVisibleHeight.js +21 -14
- package/package.json +1 -1
|
@@ -33,25 +33,32 @@ export function useVisibleHeight() {
|
|
|
33
33
|
const h = screenHeight >= 900 ? screenHeight * 0.8 : screenHeight * 0.79;
|
|
34
34
|
const isRatio = ratio >= threshold && ratio !== 1;
|
|
35
35
|
const finalHeight = isRatio ? Math.round(h) : visibleHeight;
|
|
36
|
+
const b = screenHeight - Math.round(h);
|
|
36
37
|
if (isRatio) {
|
|
37
|
-
|
|
38
|
+
const banner = document.querySelector('#onetrust-banner-sdk');
|
|
39
|
+
if (banner) {
|
|
40
|
+
banner.style.bottom = `${b}px`;
|
|
41
|
+
}
|
|
42
|
+
const styleElement = document.createElement('style');
|
|
43
|
+
styleElement.id = 'onetrust-pc-sdk';
|
|
44
|
+
styleElement.setAttribute('type', 'text/css');
|
|
45
|
+
document.head.appendChild(styleElement);
|
|
46
|
+
const css = `
|
|
47
|
+
#onetrust-pc-sdk {
|
|
48
|
+
height: ${finalHeight}px !important;
|
|
49
|
+
}
|
|
50
|
+
#onetrust-pc-sdk #ot-pc-content{
|
|
51
|
+
bottom: ${b}px !important;
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
styleElement.textContent = css;
|
|
55
|
+
}
|
|
56
|
+
if (isRatio) {
|
|
57
|
+
setBottomHeight(b);
|
|
38
58
|
}
|
|
39
59
|
else {
|
|
40
60
|
setBottomHeight(0);
|
|
41
61
|
}
|
|
42
|
-
if ('fundebug' in window) {
|
|
43
|
-
const systemInfo = {
|
|
44
|
-
ratio,
|
|
45
|
-
h,
|
|
46
|
-
finalHeight,
|
|
47
|
-
visibleHeight,
|
|
48
|
-
screenHeight,
|
|
49
|
-
isInstagram,
|
|
50
|
-
isFacebook,
|
|
51
|
-
ua
|
|
52
|
-
};
|
|
53
|
-
window === null || window === void 0 ? void 0 : window.fundebug.notify('Collect_Info', 'resize', { metaData: { systemInfo, otherInfo: {} } });
|
|
54
|
-
}
|
|
55
62
|
setVisibleHeight(finalHeight);
|
|
56
63
|
}, [getVisibleContentHeight]);
|
|
57
64
|
useEffect(() => {
|
|
@@ -36,25 +36,32 @@ function useVisibleHeight() {
|
|
|
36
36
|
const h = screenHeight >= 900 ? screenHeight * 0.8 : screenHeight * 0.79;
|
|
37
37
|
const isRatio = ratio >= threshold && ratio !== 1;
|
|
38
38
|
const finalHeight = isRatio ? Math.round(h) : visibleHeight;
|
|
39
|
+
const b = screenHeight - Math.round(h);
|
|
39
40
|
if (isRatio) {
|
|
40
|
-
|
|
41
|
+
const banner = document.querySelector('#onetrust-banner-sdk');
|
|
42
|
+
if (banner) {
|
|
43
|
+
banner.style.bottom = `${b}px`;
|
|
44
|
+
}
|
|
45
|
+
const styleElement = document.createElement('style');
|
|
46
|
+
styleElement.id = 'onetrust-pc-sdk';
|
|
47
|
+
styleElement.setAttribute('type', 'text/css');
|
|
48
|
+
document.head.appendChild(styleElement);
|
|
49
|
+
const css = `
|
|
50
|
+
#onetrust-pc-sdk {
|
|
51
|
+
height: ${finalHeight}px !important;
|
|
52
|
+
}
|
|
53
|
+
#onetrust-pc-sdk #ot-pc-content{
|
|
54
|
+
bottom: ${b}px !important;
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
styleElement.textContent = css;
|
|
58
|
+
}
|
|
59
|
+
if (isRatio) {
|
|
60
|
+
setBottomHeight(b);
|
|
41
61
|
}
|
|
42
62
|
else {
|
|
43
63
|
setBottomHeight(0);
|
|
44
64
|
}
|
|
45
|
-
if ('fundebug' in window) {
|
|
46
|
-
const systemInfo = {
|
|
47
|
-
ratio,
|
|
48
|
-
h,
|
|
49
|
-
finalHeight,
|
|
50
|
-
visibleHeight,
|
|
51
|
-
screenHeight,
|
|
52
|
-
isInstagram,
|
|
53
|
-
isFacebook,
|
|
54
|
-
ua
|
|
55
|
-
};
|
|
56
|
-
window === null || window === void 0 ? void 0 : window.fundebug.notify('Collect_Info', 'resize', { metaData: { systemInfo, otherInfo: {} } });
|
|
57
|
-
}
|
|
58
65
|
setVisibleHeight(finalHeight);
|
|
59
66
|
}, [getVisibleContentHeight]);
|
|
60
67
|
(0, react_1.useEffect)(() => {
|