pb-sxp-ui 1.19.0-alpha.6 → 1.19.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.
@@ -507,7 +507,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
507
507
  }
508
508
  else if (beForeactiveGroups === null || beForeactiveGroups === void 0 ? void 0 : beForeactiveGroups.includes('4')) {
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
523
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
@@ -672,7 +682,25 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
672
682
  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
683
  React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig }),
674
684
  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")))));
685
+ isShowCookieSetting && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting) && (React.createElement("div", { style: {
686
+ position: 'fixed',
687
+ bottom: 0,
688
+ left: 0,
689
+ right: 0,
690
+ width: '100%',
691
+ zIndex: 10,
692
+ backgroundColor: '#000',
693
+ fontSize: 0
694
+ } },
695
+ React.createElement("button", { id: 'ot-sdk-btn', className: 'ot-sdk-show-settings', style: {
696
+ textDecoration: 'underline',
697
+ width: 'fit-content',
698
+ border: 'none',
699
+ lineHeight: '24px',
700
+ fontSize: '10px',
701
+ color: '#fff',
702
+ padding: '0 20px',
703
+ fontFamily: 'Helvetica-light'
704
+ } }, "Cookie settings")))));
677
705
  };
678
706
  export default memo(SxpPageRender);
@@ -510,7 +510,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
510
510
  }
511
511
  else if (beForeactiveGroups === null || beForeactiveGroups === void 0 ? void 0 : beForeactiveGroups.includes('4')) {
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
526
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
@@ -675,7 +685,25 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
675
685
  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
686
  react_1.default.createElement(ConsentPopup_1.default, { resolver: resolver, globalConfig: globalConfig }),
677
687
  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")))));
688
+ isShowCookieSetting && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting) && (react_1.default.createElement("div", { style: {
689
+ position: 'fixed',
690
+ bottom: 0,
691
+ left: 0,
692
+ right: 0,
693
+ width: '100%',
694
+ zIndex: 10,
695
+ backgroundColor: '#000',
696
+ fontSize: 0
697
+ } },
698
+ react_1.default.createElement("button", { id: 'ot-sdk-btn', className: 'ot-sdk-show-settings', style: {
699
+ textDecoration: 'underline',
700
+ width: 'fit-content',
701
+ border: 'none',
702
+ lineHeight: '24px',
703
+ fontSize: '10px',
704
+ color: '#fff',
705
+ padding: '0 20px',
706
+ fontFamily: 'Helvetica-light'
707
+ } }, "Cookie settings")))));
680
708
  };
681
709
  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.0",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",