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 CHANGED
@@ -10373,25 +10373,32 @@ function useVisibleHeight() {
10373
10373
  // 否则使用实际内容高度
10374
10374
  const isRatio = ratio >= threshold && ratio !== 1;
10375
10375
  const finalHeight = isRatio ? Math.round(h) : visibleHeight;
10376
+ const b = screenHeight - Math.round(h);
10376
10377
  if (isRatio) {
10377
- setBottomHeight(screenHeight - Math.round(h));
10378
+ const banner = document.querySelector('#onetrust-banner-sdk');
10379
+ if (banner) {
10380
+ banner.style.bottom = `${b}px`;
10381
+ }
10382
+ const styleElement = document.createElement('style');
10383
+ styleElement.id = 'onetrust-pc-sdk';
10384
+ styleElement.setAttribute('type', 'text/css');
10385
+ document.head.appendChild(styleElement);
10386
+ const css = `
10387
+ #onetrust-pc-sdk {
10388
+ height: ${finalHeight}px !important;
10389
+ }
10390
+ #onetrust-pc-sdk #ot-pc-content{
10391
+ bottom: ${b}px !important;
10392
+ }
10393
+ `;
10394
+ styleElement.textContent = css;
10395
+ }
10396
+ if (isRatio) {
10397
+ setBottomHeight(b);
10378
10398
  }
10379
10399
  else {
10380
10400
  setBottomHeight(0);
10381
10401
  }
10382
- if ('fundebug' in window) {
10383
- const systemInfo = {
10384
- ratio,
10385
- h,
10386
- finalHeight,
10387
- visibleHeight,
10388
- screenHeight,
10389
- isInstagram,
10390
- isFacebook,
10391
- ua
10392
- };
10393
- window === null || window === void 0 ? void 0 : window.fundebug.notify('Collect_Info', 'resize', { metaData: { systemInfo, otherInfo: {} } });
10394
- }
10395
10402
  setVisibleHeight(finalHeight);
10396
10403
  }, [getVisibleContentHeight]);
10397
10404
  React.useEffect(() => {