pb-sxp-ui 1.15.35 → 1.15.37
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 +14 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -11
- 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 +14 -11
- 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/ExpandableText.js +2 -0
- package/es/core/context/SxpDataSourceProvider.js +12 -11
- package/lib/core/components/SxpPageRender/ExpandableText.js +2 -0
- package/lib/core/context/SxpDataSourceProvider.js +12 -11
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -993,6 +993,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
993
993
|
if (!enableReportEvent || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
|
994
994
|
return;
|
995
995
|
}
|
996
|
+
let isPushState = false;
|
996
997
|
const pixelEventParamsJson = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.pixel) === null || _a === void 0 ? void 0 : _a[eventName];
|
997
998
|
if ((pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.fbq) === 'function') {
|
998
999
|
function updateQueryStringParameter(uri, key, value) {
|
@@ -1013,24 +1014,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1013
1014
|
const currentUrl = window.location.href;
|
1014
1015
|
const newUrl = updateQueryStringParameter(currentUrl, 'timestamp', Date.now());
|
1015
1016
|
history.pushState({ path: newUrl }, '', newUrl);
|
1017
|
+
isPushState = true;
|
1016
1018
|
}
|
1017
1019
|
}
|
1018
1020
|
else {
|
1019
1021
|
const body = getEventParamsByJson(pixelEventParamsJson);
|
1020
1022
|
window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, body);
|
1021
|
-
if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
|
1022
|
-
window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
|
1023
|
-
}
|
1024
1023
|
}
|
1025
1024
|
}
|
1026
|
-
|
1027
|
-
window === null || window === void 0 ? void 0 : window.gtag
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1025
|
+
if (!isPushState) {
|
1026
|
+
if (eventName === 'PageView' && typeof (window === null || window === void 0 ? void 0 : window.gtag) === 'function') {
|
1027
|
+
window === null || window === void 0 ? void 0 : window.gtag('event', 'page_view');
|
1028
|
+
}
|
1029
|
+
const tiktokPixelEventParamsJson = (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.tiktokPixel) === null || _b === void 0 ? void 0 : _b[eventName];
|
1030
|
+
if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
|
1031
|
+
typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'object' &&
|
1032
|
+
typeof ((_c = window === null || window === void 0 ? void 0 : window.ttq) === null || _c === void 0 ? void 0 : _c.track) === 'function') {
|
1033
|
+
(_d = window === null || window === void 0 ? void 0 : window.ttq) === null || _d === void 0 ? void 0 : _d.track(tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name, tiktokPixelEventParamsJson);
|
1034
|
+
}
|
1034
1035
|
}
|
1035
1036
|
const snapchatPixelEventParamsJson = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.snapchatPixel) === null || _e === void 0 ? void 0 : _e[eventName];
|
1036
1037
|
if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
|
@@ -10245,6 +10246,8 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
10245
10246
|
contain: 'content',
|
10246
10247
|
visibility: 'hidden',
|
10247
10248
|
position: 'absolute',
|
10249
|
+
top: 0,
|
10250
|
+
bottom: 0,
|
10248
10251
|
opacity: 0,
|
10249
10252
|
clipPath: 'inset(100%)',
|
10250
10253
|
transform: 'translateX(-9999px)'
|