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/pb-ui.js CHANGED
@@ -1011,8 +1011,7 @@
1011
1011
  }
1012
1012
  }
1013
1013
  else {
1014
- const body = getEventParamsByJson(pixelEventParamsJson);
1015
- window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, body);
1014
+ window === null || window === void 0 ? void 0 : window.fbq('track', pixelEventParamsJson === null || pixelEventParamsJson === void 0 ? void 0 : pixelEventParamsJson.event_name, getEventParamsByJson(pixelEventParamsJson, product));
1016
1015
  }
1017
1016
  }
1018
1017
  if (!isPushState) {
@@ -1023,12 +1022,12 @@
1023
1022
  if ((tiktokPixelEventParamsJson === null || tiktokPixelEventParamsJson === void 0 ? void 0 : tiktokPixelEventParamsJson.event_name) &&
1024
1023
  typeof (window === null || window === void 0 ? void 0 : window.ttq) === 'object' &&
1025
1024
  typeof ((_c = window === null || window === void 0 ? void 0 : window.ttq) === null || _c === void 0 ? void 0 : _c.track) === 'function') {
1026
- (_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);
1025
+ (_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));
1027
1026
  }
1028
1027
  }
1029
1028
  const snapchatPixelEventParamsJson = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.snapchatPixel) === null || _e === void 0 ? void 0 : _e[eventName];
1030
1029
  if ((snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name) && typeof (window === null || window === void 0 ? void 0 : window.snaptr) === 'function') {
1031
- window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, snapchatPixelEventParamsJson);
1030
+ window === null || window === void 0 ? void 0 : window.snaptr('track', snapchatPixelEventParamsJson === null || snapchatPixelEventParamsJson === void 0 ? void 0 : snapchatPixelEventParamsJson.event_name, getEventParamsByJson(snapchatPixelEventParamsJson, product));
1032
1031
  }
1033
1032
  const converApiEventParamsJson = (_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _f === void 0 ? void 0 : _f[eventName];
1034
1033
  if (enabledMetaConversionApi && converApiEventParamsJson) {
@@ -10202,10 +10201,12 @@
10202
10201
  if (!realRef.current || !clampRef.current || !isPost || !text || isShowMore)
10203
10202
  return;
10204
10203
  requestAnimationFrame(() => {
10204
+ realRef.current.style.position = 'relative';
10205
10205
  const realHeight = realRef.current.getBoundingClientRect().height;
10206
10206
  const clampHeight = clampRef.current.getBoundingClientRect().height;
10207
10207
  const isActuallyClamped = realHeight > clampHeight + 1;
10208
10208
  setIsShow(isActuallyClamped);
10209
+ realRef.current.style.position = 'absolute';
10209
10210
  });
10210
10211
  }, [isPost, text, isShowMore]);
10211
10212
  // 增强版监听(同时监听字体加载)
@@ -10238,12 +10239,10 @@
10238
10239
  boxSizing: 'border-box',
10239
10240
  contain: 'content',
10240
10241
  visibility: 'hidden',
10241
- position: 'absolute',
10242
- top: 0,
10243
- bottom: 0,
10244
10242
  opacity: 0,
10245
10243
  clipPath: 'inset(100%)',
10246
10244
  transform: 'translateX(-9999px)'
10245
+ // position: 'absolute'
10247
10246
  }, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), textStyle) } }),
10248
10247
  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: {
10249
10248
  __html: setFontForText(isShowMore ? unfoldText || 'show less' : foldText || 'show more', textStyle)