pb-sxp-ui 1.19.1 → 1.19.2
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 +17 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -15
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +4 -4
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +17 -15
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +4 -4
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/index.js +15 -13
- package/lib/core/components/SxpPageRender/index.js +15 -13
- package/package.json +1 -1
|
@@ -485,11 +485,23 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
485
485
|
useEffect(() => {
|
|
486
486
|
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting))
|
|
487
487
|
return;
|
|
488
|
+
function extractRootDomain(hostname) {
|
|
489
|
+
if (!hostname || hostname.indexOf('.') === -1) {
|
|
490
|
+
return '';
|
|
491
|
+
}
|
|
492
|
+
const parts = hostname.split('.');
|
|
493
|
+
if (parts.length >= 2) {
|
|
494
|
+
return '.' + parts.slice(-2).join('.');
|
|
495
|
+
}
|
|
496
|
+
return '';
|
|
497
|
+
}
|
|
488
498
|
window.OptanonWrapper = function () {
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
if ((window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups) && ((_a = window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups) === null || _a === void 0 ? void 0 : _a.length) > 2) {
|
|
499
|
+
const activeGroups = window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups;
|
|
500
|
+
if (activeGroups && (activeGroups === null || activeGroups === void 0 ? void 0 : activeGroups.length) > 2) {
|
|
492
501
|
setIsShowCookieSetting(true);
|
|
502
|
+
if (!(activeGroups === null || activeGroups === void 0 ? void 0 : activeGroups.includes('4'))) {
|
|
503
|
+
deleteCookie('_fbp', '/', extractRootDomain(window.location.hostname));
|
|
504
|
+
}
|
|
493
505
|
}
|
|
494
506
|
};
|
|
495
507
|
const handleClick = (event) => {
|
|
@@ -507,16 +519,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
507
519
|
}
|
|
508
520
|
else {
|
|
509
521
|
fbcRef.current = getCookie('_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
522
|
deleteCookie('_fbp', '/', extractRootDomain(window.location.hostname));
|
|
521
523
|
const item = data[activeIndex];
|
|
522
524
|
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) || '';
|
|
@@ -488,11 +488,23 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
488
488
|
(0, react_1.useEffect)(() => {
|
|
489
489
|
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting))
|
|
490
490
|
return;
|
|
491
|
+
function extractRootDomain(hostname) {
|
|
492
|
+
if (!hostname || hostname.indexOf('.') === -1) {
|
|
493
|
+
return '';
|
|
494
|
+
}
|
|
495
|
+
const parts = hostname.split('.');
|
|
496
|
+
if (parts.length >= 2) {
|
|
497
|
+
return '.' + parts.slice(-2).join('.');
|
|
498
|
+
}
|
|
499
|
+
return '';
|
|
500
|
+
}
|
|
491
501
|
window.OptanonWrapper = function () {
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
if ((window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups) && ((_a = window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups) === null || _a === void 0 ? void 0 : _a.length) > 2) {
|
|
502
|
+
const activeGroups = window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups;
|
|
503
|
+
if (activeGroups && (activeGroups === null || activeGroups === void 0 ? void 0 : activeGroups.length) > 2) {
|
|
495
504
|
setIsShowCookieSetting(true);
|
|
505
|
+
if (!(activeGroups === null || activeGroups === void 0 ? void 0 : activeGroups.includes('4'))) {
|
|
506
|
+
(0, tool_1.deleteCookie)('_fbp', '/', extractRootDomain(window.location.hostname));
|
|
507
|
+
}
|
|
496
508
|
}
|
|
497
509
|
};
|
|
498
510
|
const handleClick = (event) => {
|
|
@@ -510,16 +522,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
510
522
|
}
|
|
511
523
|
else {
|
|
512
524
|
fbcRef.current = (0, tool_1.getCookie)('_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
525
|
(0, tool_1.deleteCookie)('_fbp', '/', extractRootDomain(window.location.hostname));
|
|
524
526
|
const item = data[activeIndex];
|
|
525
527
|
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) || '';
|