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.
@@ -505,19 +505,31 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
505
505
  if (fbcRef.current && !(beForeactiveGroups === null || beForeactiveGroups === void 0 ? void 0 : beForeactiveGroups.includes('4'))) {
506
506
  }
507
507
  }
508
- else if (beForeactiveGroups === null || beForeactiveGroups === void 0 ? void 0 : beForeactiveGroups.includes('4')) {
508
+ else {
509
509
  fbcRef.current = getCookie('_fbp');
510
- deleteCookie('_fbp');
510
+ function extractRootDomain(hostname) {
511
+ if (!hostname || hostname.indexOf('.') === -1) {
512
+ return '';
513
+ }
514
+ const parts = hostname.split('.');
515
+ if (parts.length >= 2) {
516
+ return '.' + parts.slice(-2).join('.');
517
+ }
518
+ return '';
519
+ }
520
+ deleteCookie('_fbp', '/', extractRootDomain(window.location.hostname));
511
521
  const item = data[activeIndex];
512
522
  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) || '';
513
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
514
- eventInfo: {
515
- eventSubject: 'refuseCookie',
516
- eventDescription: 'refuseCookie',
517
- traceInfo
518
- },
519
- isActiveTargetingCookie: false
520
- });
523
+ if (beForeactiveGroups === null || beForeactiveGroups === void 0 ? void 0 : beForeactiveGroups.includes('4')) {
524
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
525
+ eventInfo: {
526
+ eventSubject: 'refuseCookie',
527
+ eventDescription: 'refuseCookie',
528
+ traceInfo
529
+ },
530
+ isActiveTargetingCookie: false
531
+ });
532
+ }
521
533
  }
522
534
  };
523
535
  }
@@ -672,7 +684,25 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
672
684
  React.createElement(WaterFall, 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)),
673
685
  React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig }),
674
686
  openMultiPosts && (React.createElement(MultiPosts, 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 } }))))),
675
- 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 } },
676
- 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")))));
687
+ isShowCookieSetting && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting) && (React.createElement("div", { style: {
688
+ position: 'fixed',
689
+ bottom: 0,
690
+ left: 0,
691
+ right: 0,
692
+ width: '100%',
693
+ zIndex: 10,
694
+ backgroundColor: '#000',
695
+ fontSize: 0
696
+ } },
697
+ React.createElement("button", { id: 'ot-sdk-btn', className: 'ot-sdk-show-settings', style: {
698
+ textDecoration: 'underline',
699
+ width: 'fit-content',
700
+ border: 'none',
701
+ lineHeight: '24px',
702
+ fontSize: '10px',
703
+ color: '#fff',
704
+ padding: '0 20px',
705
+ fontFamily: 'Helvetica-light'
706
+ } }, "Cookie settings")))));
677
707
  };
678
708
  export default memo(SxpPageRender);
@@ -508,19 +508,31 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
508
508
  if (fbcRef.current && !(beForeactiveGroups === null || beForeactiveGroups === void 0 ? void 0 : beForeactiveGroups.includes('4'))) {
509
509
  }
510
510
  }
511
- else if (beForeactiveGroups === null || beForeactiveGroups === void 0 ? void 0 : beForeactiveGroups.includes('4')) {
511
+ else {
512
512
  fbcRef.current = (0, tool_1.getCookie)('_fbp');
513
- (0, tool_1.deleteCookie)('_fbp');
513
+ function extractRootDomain(hostname) {
514
+ if (!hostname || hostname.indexOf('.') === -1) {
515
+ return '';
516
+ }
517
+ const parts = hostname.split('.');
518
+ if (parts.length >= 2) {
519
+ return '.' + parts.slice(-2).join('.');
520
+ }
521
+ return '';
522
+ }
523
+ (0, tool_1.deleteCookie)('_fbp', '/', extractRootDomain(window.location.hostname));
514
524
  const item = data[activeIndex];
515
525
  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) || '';
516
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
517
- eventInfo: {
518
- eventSubject: 'refuseCookie',
519
- eventDescription: 'refuseCookie',
520
- traceInfo
521
- },
522
- isActiveTargetingCookie: false
523
- });
526
+ if (beForeactiveGroups === null || beForeactiveGroups === void 0 ? void 0 : beForeactiveGroups.includes('4')) {
527
+ bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
528
+ eventInfo: {
529
+ eventSubject: 'refuseCookie',
530
+ eventDescription: 'refuseCookie',
531
+ traceInfo
532
+ },
533
+ isActiveTargetingCookie: false
534
+ });
535
+ }
524
536
  }
525
537
  };
526
538
  }
@@ -675,7 +687,25 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
675
687
  react_1.default.createElement(WaterFall_1.default, 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)),
676
688
  react_1.default.createElement(ConsentPopup_1.default, { resolver: resolver, globalConfig: globalConfig }),
677
689
  openMultiPosts && (react_1.default.createElement(MultiPosts_1.default, 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 } }))))),
678
- isShowCookieSetting && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting) && (react_1.default.createElement("div", { style: { position: 'fixed', bottom: 0, left: 0, right: 0, width: '100%', zIndex: 10, backgroundColor: '#000', fontSize: 0 } },
679
- react_1.default.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")))));
690
+ isShowCookieSetting && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting) && (react_1.default.createElement("div", { style: {
691
+ position: 'fixed',
692
+ bottom: 0,
693
+ left: 0,
694
+ right: 0,
695
+ width: '100%',
696
+ zIndex: 10,
697
+ backgroundColor: '#000',
698
+ fontSize: 0
699
+ } },
700
+ react_1.default.createElement("button", { id: 'ot-sdk-btn', className: 'ot-sdk-show-settings', style: {
701
+ textDecoration: 'underline',
702
+ width: 'fit-content',
703
+ border: 'none',
704
+ lineHeight: '24px',
705
+ fontSize: '10px',
706
+ color: '#fff',
707
+ padding: '0 20px',
708
+ fontFamily: 'Helvetica-light'
709
+ } }, "Cookie settings")))));
680
710
  };
681
711
  exports.default = (0, react_1.memo)(SxpPageRender);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.19.0-alpha.6",
3
+ "version": "1.19.1",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",