pb-sxp-ui 1.19.0-alpha.6 → 1.19.1

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.js CHANGED
@@ -19463,19 +19463,33 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19463
19463
  if (activeGroups === null || activeGroups === void 0 ? void 0 : activeGroups.includes('4')) {
19464
19464
  if (fbcRef.current && !(beForeactiveGroups === null || beForeactiveGroups === void 0 ? void 0 : beForeactiveGroups.includes('4'))) ;
19465
19465
  }
19466
- else if (beForeactiveGroups === null || beForeactiveGroups === void 0 ? void 0 : beForeactiveGroups.includes('4')) {
19466
+ else {
19467
19467
  fbcRef.current = getCookie('_fbp');
19468
- deleteCookie('_fbp');
19468
+ function extractRootDomain(hostname) {
19469
+ // 处理特殊情况
19470
+ if (!hostname || hostname.indexOf('.') === -1) {
19471
+ return '';
19472
+ }
19473
+ const parts = hostname.split('.');
19474
+ // 对于标准的域名格式(如 xxx.yyy.zzz)
19475
+ if (parts.length >= 2) {
19476
+ return '.' + parts.slice(-2).join('.');
19477
+ }
19478
+ return '';
19479
+ }
19480
+ deleteCookie('_fbp', '/', extractRootDomain(window.location.hostname));
19469
19481
  const item = data[activeIndex];
19470
19482
  const traceInfo = ((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.traceInfo) || ((_b = item === null || item === void 0 ? void 0 : item.product) === null || _b === void 0 ? void 0 : _b.traceInfo) || '';
19471
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
19472
- eventInfo: {
19473
- eventSubject: 'refuseCookie',
19474
- eventDescription: 'refuseCookie',
19475
- traceInfo
19476
- },
19477
- isActiveTargetingCookie: false
19478
- });
19483
+ if (beForeactiveGroups === null || beForeactiveGroups === void 0 ? void 0 : beForeactiveGroups.includes('4')) {
19484
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
19485
+ eventInfo: {
19486
+ eventSubject: 'refuseCookie',
19487
+ eventDescription: 'refuseCookie',
19488
+ traceInfo
19489
+ },
19490
+ isActiveTargetingCookie: false
19491
+ });
19492
+ }
19479
19493
  }
19480
19494
  };
19481
19495
  }
@@ -19632,8 +19646,26 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19632
19646
  React.createElement(WaterFall$1, Object.assign({}, (_u = (_t = (_s = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _s === void 0 ? void 0 : _s[0]) === null || _t === void 0 ? void 0 : _t.item) === null || _u === void 0 ? void 0 : _u.props)),
19633
19647
  React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig }),
19634
19648
  openMultiPosts && (React.createElement(MultiPosts$2, Object.assign({}, (_x = (_w = (_v = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.item) === null || _x === void 0 ? void 0 : _x.props, (_0 = (_z = (_y = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.item) === null || _0 === void 0 ? void 0 : _0.event, { style: { position: 'fixed', top: 0, left: 0, right: 0 } }))))),
19635
- isShowCookieSetting && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting) && (React.createElement("div", { style: { position: 'fixed', bottom: 0, left: 0, right: 0, width: '100%', zIndex: 10, backgroundColor: '#000', fontSize: 0 } },
19636
- React.createElement("button", { id: 'ot-sdk-btn', className: 'ot-sdk-show-settings', style: { textDecoration: 'underline', width: 'fit-content', border: 'none', lineHeight: '24px', fontSize: '10px', color: '#fff', padding: '0 20px' } }, "Cookie settings")))));
19649
+ isShowCookieSetting && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting) && (React.createElement("div", { style: {
19650
+ position: 'fixed',
19651
+ bottom: 0,
19652
+ left: 0,
19653
+ right: 0,
19654
+ width: '100%',
19655
+ zIndex: 10,
19656
+ backgroundColor: '#000',
19657
+ fontSize: 0
19658
+ } },
19659
+ React.createElement("button", { id: 'ot-sdk-btn', className: 'ot-sdk-show-settings', style: {
19660
+ textDecoration: 'underline',
19661
+ width: 'fit-content',
19662
+ border: 'none',
19663
+ lineHeight: '24px',
19664
+ fontSize: '10px',
19665
+ color: '#fff',
19666
+ padding: '0 20px',
19667
+ fontFamily: 'Helvetica-light'
19668
+ } }, "Cookie settings")))));
19637
19669
  };
19638
19670
  var SxpPageRender$1 = memo(SxpPageRender);
19639
19671