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
package/dist/index.cjs
CHANGED
@@ -1018,8 +1018,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1018
1018
|
}
|
1019
1019
|
}
|
1020
1020
|
else {
|
1021
|
-
|
1022
|
-
window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, body);
|
1021
|
+
window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, getEventParamsByJson(pixelEventParamsJson, product));
|
1023
1022
|
}
|
1024
1023
|
}
|
1025
1024
|
if (!isPushState) {
|
@@ -1030,12 +1029,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1030
1029
|
if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
|
1031
1030
|
typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'object' &&
|
1032
1031
|
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);
|
1032
|
+
(_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));
|
1034
1033
|
}
|
1035
1034
|
}
|
1036
1035
|
const snapchatPixelEventParamsJson = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.snapchatPixel) === null || _e === void 0 ? void 0 : _e[eventName];
|
1037
1036
|
if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
|
1038
|
-
window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, snapchatPixelEventParamsJson);
|
1037
|
+
window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, getEventParamsByJson(snapchatPixelEventParamsJson, product));
|
1039
1038
|
}
|
1040
1039
|
const converApiEventParamsJson = (_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _f === void 0 ? void 0 : _f[eventName];
|
1041
1040
|
if (enabledMetaConversionApi && converApiEventParamsJson) {
|
@@ -10209,10 +10208,12 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
10209
10208
|
if (!realRef.current || !clampRef.current || !isPost || !text || isShowMore)
|
10210
10209
|
return;
|
10211
10210
|
requestAnimationFrame(() => {
|
10211
|
+
realRef.current.style.position = 'relative';
|
10212
10212
|
const realHeight = realRef.current.getBoundingClientRect().height;
|
10213
10213
|
const clampHeight = clampRef.current.getBoundingClientRect().height;
|
10214
10214
|
const isActuallyClamped = realHeight > clampHeight + 1;
|
10215
10215
|
setIsShow(isActuallyClamped);
|
10216
|
+
realRef.current.style.position = 'absolute';
|
10216
10217
|
});
|
10217
10218
|
}, [isPost, text, isShowMore]);
|
10218
10219
|
// 增强版监听(同时监听字体加载)
|
@@ -10245,12 +10246,10 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
10245
10246
|
boxSizing: 'border-box',
|
10246
10247
|
contain: 'content',
|
10247
10248
|
visibility: 'hidden',
|
10248
|
-
position: 'absolute',
|
10249
|
-
top: 0,
|
10250
|
-
bottom: 0,
|
10251
10249
|
opacity: 0,
|
10252
10250
|
clipPath: 'inset(100%)',
|
10253
10251
|
transform: 'translateX(-9999px)'
|
10252
|
+
// position: 'absolute'
|
10254
10253
|
}, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), textStyle) } }),
|
10255
10254
|
text && isPost && isShow && (React.createElement("button", { "aria-label": isShowMore ? unfoldText || 'show less' : foldText || 'show more', style: { textDecoration: 'underline', cursor: 'pointer' }, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick, dangerouslySetInnerHTML: {
|
10256
10255
|
__html: setFontForText(isShowMore ? unfoldText || 'show less' : foldText || 'show more', textStyle)
|