pb-sxp-ui 1.19.1 → 1.19.3
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 +21 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -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 +21 -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
package/dist/index.cjs
CHANGED
|
@@ -19465,11 +19465,26 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
19465
19465
|
React.useEffect(() => {
|
|
19466
19466
|
if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting))
|
|
19467
19467
|
return;
|
|
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
|
+
}
|
|
19468
19480
|
window.OptanonWrapper = function () {
|
|
19469
|
-
|
|
19470
|
-
|
|
19471
|
-
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) {
|
|
19481
|
+
const activeGroups = window === null || window === void 0 ? void 0 : window.OnetrustActiveGroups;
|
|
19482
|
+
if (activeGroups && (activeGroups === null || activeGroups === void 0 ? void 0 : activeGroups.length) > 2) {
|
|
19472
19483
|
setIsShowCookieSetting(true);
|
|
19484
|
+
// if (!activeGroups?.includes('4')) {
|
|
19485
|
+
// deleteCookie('_fbp', '/', extractRootDomain(window.location.hostname));
|
|
19486
|
+
// (window as any)?.fbq('consent', 'revoke');
|
|
19487
|
+
// }
|
|
19473
19488
|
}
|
|
19474
19489
|
};
|
|
19475
19490
|
const handleClick = (event) => {
|
|
@@ -19483,22 +19498,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
19483
19498
|
if (!activeGroups)
|
|
19484
19499
|
return;
|
|
19485
19500
|
if (activeGroups === null || activeGroups === void 0 ? void 0 : activeGroups.includes('4')) {
|
|
19501
|
+
window === null || window === void 0 ? void 0 : window.loadMetaPixel(false, SXP_CONFIG === null || SXP_CONFIG === void 0 ? void 0 : SXP_CONFIG.meta_conversion_api_pid);
|
|
19502
|
+
window === null || window === void 0 ? void 0 : window.fbq('consent', 'grant');
|
|
19486
19503
|
if (fbcRef.current && !(beForeactiveGroups === null || beForeactiveGroups === void 0 ? void 0 : beForeactiveGroups.includes('4'))) ;
|
|
19487
19504
|
}
|
|
19488
19505
|
else {
|
|
19506
|
+
window === null || window === void 0 ? void 0 : window.fbq('consent', 'revoke');
|
|
19489
19507
|
fbcRef.current = getCookie('_fbp');
|
|
19490
|
-
function extractRootDomain(hostname) {
|
|
19491
|
-
// 处理特殊情况
|
|
19492
|
-
if (!hostname || hostname.indexOf('.') === -1) {
|
|
19493
|
-
return '';
|
|
19494
|
-
}
|
|
19495
|
-
const parts = hostname.split('.');
|
|
19496
|
-
// 对于标准的域名格式(如 xxx.yyy.zzz)
|
|
19497
|
-
if (parts.length >= 2) {
|
|
19498
|
-
return '.' + parts.slice(-2).join('.');
|
|
19499
|
-
}
|
|
19500
|
-
return '';
|
|
19501
|
-
}
|
|
19502
19508
|
deleteCookie('_fbp', '/', extractRootDomain(window.location.hostname));
|
|
19503
19509
|
const item = data[activeIndex];
|
|
19504
19510
|
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) || '';
|