pb-sxp-ui 1.15.37 → 1.15.39
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 +6 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -7
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +6 -7
- 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 -3
- package/es/core/context/SxpDataSourceProvider.js +3 -4
- package/lib/core/components/SxpPageRender/ExpandableText.js +2 -3
- package/lib/core/context/SxpDataSourceProvider.js +3 -4
- package/package.json +1 -1
@@ -16,10 +16,12 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
16
16
|
if (!realRef.current || !clampRef.current || !isPost || !text || isShowMore)
|
17
17
|
return;
|
18
18
|
requestAnimationFrame(() => {
|
19
|
+
realRef.current.style.position = 'relative';
|
19
20
|
const realHeight = realRef.current.getBoundingClientRect().height;
|
20
21
|
const clampHeight = clampRef.current.getBoundingClientRect().height;
|
21
22
|
const isActuallyClamped = realHeight > clampHeight + 1;
|
22
23
|
setIsShow(isActuallyClamped);
|
24
|
+
realRef.current.style.position = 'absolute';
|
23
25
|
});
|
24
26
|
}, [isPost, text, isShowMore]);
|
25
27
|
useEffect(() => {
|
@@ -51,9 +53,6 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
51
53
|
boxSizing: 'border-box',
|
52
54
|
contain: 'content',
|
53
55
|
visibility: 'hidden',
|
54
|
-
position: 'absolute',
|
55
|
-
top: 0,
|
56
|
-
bottom: 0,
|
57
56
|
opacity: 0,
|
58
57
|
clipPath: 'inset(100%)',
|
59
58
|
transform: 'translateX(-9999px)'
|
@@ -382,8 +382,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
382
382
|
}
|
383
383
|
}
|
384
384
|
else {
|
385
|
-
|
386
|
-
window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, body);
|
385
|
+
window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, getEventParamsByJson(pixelEventParamsJson, product));
|
387
386
|
}
|
388
387
|
}
|
389
388
|
if (!isPushState) {
|
@@ -394,12 +393,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
394
393
|
if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
|
395
394
|
typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'object' &&
|
396
395
|
typeof ((_c = window === null || window === void 0 ? void 0 : window.ttq) === null || _c === void 0 ? void 0 : _c.track) === 'function') {
|
397
|
-
(_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);
|
396
|
+
(_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, getEventParamsByJson(tiktokPixelEventParamsJson, product));
|
398
397
|
}
|
399
398
|
}
|
400
399
|
const snapchatPixelEventParamsJson = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.snapchatPixel) === null || _e === void 0 ? void 0 : _e[eventName];
|
401
400
|
if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
|
402
|
-
window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, snapchatPixelEventParamsJson);
|
401
|
+
window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, getEventParamsByJson(snapchatPixelEventParamsJson, product));
|
403
402
|
}
|
404
403
|
const converApiEventParamsJson = (_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _f === void 0 ? void 0 : _f[eventName];
|
405
404
|
if (enabledMetaConversionApi && converApiEventParamsJson) {
|
@@ -18,10 +18,12 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
18
18
|
if (!realRef.current || !clampRef.current || !isPost || !text || isShowMore)
|
19
19
|
return;
|
20
20
|
requestAnimationFrame(() => {
|
21
|
+
realRef.current.style.position = 'relative';
|
21
22
|
const realHeight = realRef.current.getBoundingClientRect().height;
|
22
23
|
const clampHeight = clampRef.current.getBoundingClientRect().height;
|
23
24
|
const isActuallyClamped = realHeight > clampHeight + 1;
|
24
25
|
setIsShow(isActuallyClamped);
|
26
|
+
realRef.current.style.position = 'absolute';
|
25
27
|
});
|
26
28
|
}, [isPost, text, isShowMore]);
|
27
29
|
(0, react_1.useEffect)(() => {
|
@@ -53,9 +55,6 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
53
55
|
boxSizing: 'border-box',
|
54
56
|
contain: 'content',
|
55
57
|
visibility: 'hidden',
|
56
|
-
position: 'absolute',
|
57
|
-
top: 0,
|
58
|
-
bottom: 0,
|
59
58
|
opacity: 0,
|
60
59
|
clipPath: 'inset(100%)',
|
61
60
|
transform: 'translateX(-9999px)'
|
@@ -385,8 +385,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
385
385
|
}
|
386
386
|
}
|
387
387
|
else {
|
388
|
-
|
389
|
-
window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, body);
|
388
|
+
window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, getEventParamsByJson(pixelEventParamsJson, product));
|
390
389
|
}
|
391
390
|
}
|
392
391
|
if (!isPushState) {
|
@@ -397,12 +396,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
397
396
|
if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
|
398
397
|
typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'object' &&
|
399
398
|
typeof ((_c = window === null || window === void 0 ? void 0 : window.ttq) === null || _c === void 0 ? void 0 : _c.track) === 'function') {
|
400
|
-
(_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);
|
399
|
+
(_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, getEventParamsByJson(tiktokPixelEventParamsJson, product));
|
401
400
|
}
|
402
401
|
}
|
403
402
|
const snapchatPixelEventParamsJson = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.snapchatPixel) === null || _e === void 0 ? void 0 : _e[eventName];
|
404
403
|
if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
|
405
|
-
window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, snapchatPixelEventParamsJson);
|
404
|
+
window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, getEventParamsByJson(snapchatPixelEventParamsJson, product));
|
406
405
|
}
|
407
406
|
const converApiEventParamsJson = (_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _f === void 0 ? void 0 : _f[eventName];
|
408
407
|
if (enabledMetaConversionApi && converApiEventParamsJson) {
|