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.js
CHANGED
@@ -996,8 +996,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
996
996
|
}
|
997
997
|
}
|
998
998
|
else {
|
999
|
-
|
1000
|
-
window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, body);
|
999
|
+
window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, getEventParamsByJson(pixelEventParamsJson, product));
|
1001
1000
|
}
|
1002
1001
|
}
|
1003
1002
|
if (!isPushState) {
|
@@ -1008,12 +1007,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
1008
1007
|
if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
|
1009
1008
|
typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'object' &&
|
1010
1009
|
typeof ((_c = window === null || window === void 0 ? void 0 : window.ttq) === null || _c === void 0 ? void 0 : _c.track) === 'function') {
|
1011
|
-
(_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);
|
1010
|
+
(_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));
|
1012
1011
|
}
|
1013
1012
|
}
|
1014
1013
|
const snapchatPixelEventParamsJson = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.snapchatPixel) === null || _e === void 0 ? void 0 : _e[eventName];
|
1015
1014
|
if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
|
1016
|
-
window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, snapchatPixelEventParamsJson);
|
1015
|
+
window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, getEventParamsByJson(snapchatPixelEventParamsJson, product));
|
1017
1016
|
}
|
1018
1017
|
const converApiEventParamsJson = (_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _f === void 0 ? void 0 : _f[eventName];
|
1019
1018
|
if (enabledMetaConversionApi && converApiEventParamsJson) {
|
@@ -10187,10 +10186,12 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
10187
10186
|
if (!realRef.current || !clampRef.current || !isPost || !text || isShowMore)
|
10188
10187
|
return;
|
10189
10188
|
requestAnimationFrame(() => {
|
10189
|
+
realRef.current.style.position = 'relative';
|
10190
10190
|
const realHeight = realRef.current.getBoundingClientRect().height;
|
10191
10191
|
const clampHeight = clampRef.current.getBoundingClientRect().height;
|
10192
10192
|
const isActuallyClamped = realHeight > clampHeight + 1;
|
10193
10193
|
setIsShow(isActuallyClamped);
|
10194
|
+
realRef.current.style.position = 'absolute';
|
10194
10195
|
});
|
10195
10196
|
}, [isPost, text, isShowMore]);
|
10196
10197
|
// 增强版监听(同时监听字体加载)
|
@@ -10223,12 +10224,10 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
10223
10224
|
boxSizing: 'border-box',
|
10224
10225
|
contain: 'content',
|
10225
10226
|
visibility: 'hidden',
|
10226
|
-
position: 'absolute',
|
10227
|
-
top: 0,
|
10228
|
-
bottom: 0,
|
10229
10227
|
opacity: 0,
|
10230
10228
|
clipPath: 'inset(100%)',
|
10231
10229
|
transform: 'translateX(-9999px)'
|
10230
|
+
// position: 'absolute'
|
10232
10231
|
}, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), textStyle) } }),
|
10233
10232
|
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: {
|
10234
10233
|
__html: setFontForText(isShowMore ? unfoldText || 'show less' : foldText || 'show more', textStyle)
|