pb-sxp-ui 1.6.5 → 1.7.0

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.
Files changed (35) hide show
  1. package/dist/index.cjs +114 -51
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +114 -51
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +3 -3
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +3 -3
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +114 -51
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +3 -3
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/SxpPageRender/ExpandableText.js +3 -1
  14. package/es/core/components/SxpPageRender/VideoWidget/index.js +25 -21
  15. package/es/core/components/SxpPageRender/WaterFall/index.js +6 -1
  16. package/es/core/components/SxpPageRender/index.d.ts +1 -0
  17. package/es/core/components/SxpPageRender/index.js +7 -11
  18. package/es/core/context/SxpDataSourceProvider.d.ts +2 -4
  19. package/es/core/context/SxpDataSourceProvider.js +52 -11
  20. package/es/materials/sxp/popup/CommodityDetail/index.js +6 -1
  21. package/es/materials/sxp/popup/CommodityDetailDiro/index.js +6 -1
  22. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +6 -1
  23. package/es/materials/sxp/popup/CommodityList/index.js +7 -2
  24. package/lib/core/components/SxpPageRender/ExpandableText.js +3 -1
  25. package/lib/core/components/SxpPageRender/VideoWidget/index.js +25 -21
  26. package/lib/core/components/SxpPageRender/WaterFall/index.js +6 -1
  27. package/lib/core/components/SxpPageRender/index.d.ts +1 -0
  28. package/lib/core/components/SxpPageRender/index.js +7 -11
  29. package/lib/core/context/SxpDataSourceProvider.d.ts +2 -4
  30. package/lib/core/context/SxpDataSourceProvider.js +52 -11
  31. package/lib/materials/sxp/popup/CommodityDetail/index.js +6 -1
  32. package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +6 -1
  33. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +6 -1
  34. package/lib/materials/sxp/popup/CommodityList/index.js +6 -1
  35. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -819,23 +819,64 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
819
819
  type: 'beacon'
820
820
  });
821
821
  }, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
822
- const bffFbReport = React.useCallback((_a) => {
823
- var _b, _c, _d;
824
- var { eventName, actionSource = 'website', eventSourceUrl = (_b = window === null || window === void 0 ? void 0 : window.location) === null || _b === void 0 ? void 0 : _b.href, externalId } = _a;
822
+ const bffFbReport = React.useCallback(({ eventName, product }) => {
823
+ var _a, _b, _c, _d;
825
824
  if (!enableReportEvent || !enabledMetaConversionApi || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
826
825
  return;
827
826
  }
828
- const fakeUserId = storeAndLoadFeUserId();
827
+ let jsonParams = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _a === void 0 ? void 0 : _a[eventName];
829
828
  const urlParams = new URLSearchParams(window.location.search);
830
- const fbclid = urlParams.get('fbclid');
829
+ const fbclid = urlParams === null || urlParams === void 0 ? void 0 : urlParams.get('fbclid');
830
+ const fix_par = {
831
+ event_source_url: (_b = window === null || window === void 0 ? void 0 : window.location) === null || _b === void 0 ? void 0 : _b.href,
832
+ external_id: storeAndLoadFeUserId(),
833
+ client_user_agent: (_d = (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent) !== null && _d !== void 0 ? _d : '',
834
+ fbc: fbclid ? `fb.2.${new Date().getTime()}.${fbclid}` : '',
835
+ fbp: getCookie('_fbp') ? `fb.2.${new Date().getTime()}.${getCookie('_fbp')}` : '',
836
+ time: new Date().getTime()
837
+ };
838
+ const regex = /\{\{(.*?)\}\}/g;
839
+ const getEventParams = (obj) => {
840
+ if (!obj)
841
+ return;
842
+ if (obj instanceof Array) {
843
+ obj === null || obj === void 0 ? void 0 : obj.map((item) => getEventParams(item));
844
+ }
845
+ else {
846
+ for (const key in obj) {
847
+ if (obj.hasOwnProperty(key)) {
848
+ const value = obj === null || obj === void 0 ? void 0 : obj[key];
849
+ if (typeof value === 'object') {
850
+ getEventParams(value);
851
+ }
852
+ else if (typeof value === 'string') {
853
+ const matches = value === null || value === void 0 ? void 0 : value.match(regex);
854
+ if (matches) {
855
+ matches.forEach((match) => {
856
+ const prop = match.substring(2, match.length - 2);
857
+ try {
858
+ const replaceValue = new Function('fix_par', 'product', `return ${prop}`)(fix_par, product);
859
+ if (replaceValue) {
860
+ obj[key] = replaceValue;
861
+ }
862
+ else {
863
+ delete obj[key];
864
+ }
865
+ }
866
+ catch (error) {
867
+ console.error('An error occurred:', error === null || error === void 0 ? void 0 : error.message);
868
+ }
869
+ });
870
+ }
871
+ }
872
+ }
873
+ }
874
+ }
875
+ };
876
+ getEventParams(jsonParams);
831
877
  return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/fb/events', {
832
878
  method: 'POST',
833
- body: {
834
- eventName,
835
- actionSource,
836
- eventSourceUrl,
837
- userData: Object.assign(Object.assign(Object.assign({ externalId: fakeUserId }, (fbclid && { fbc: `fb.2.${new Date().getTime()}.${fbclid}` })), (getCookie('_fbp') && { fbp: `fb.2.${new Date().getTime()}.${getCookie('_fbp')}` })), { clientUserAgent: (_d = (_c = window === null || window === void 0 ? void 0 : window.navigator) === null || _c === void 0 ? void 0 : _c.userAgent) !== null && _d !== void 0 ? _d : '' })
838
- },
879
+ body: jsonParams,
839
880
  type: 'beacon'
840
881
  });
841
882
  }, [bffFetch, enableReportEvent, enabledMetaConversionApi, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
@@ -9082,7 +9123,7 @@ var Modal$1 = React.memo(Modal);
9082
9123
  * @Author: binruan@chatlabs.com
9083
9124
  * @Date: 2023-12-26 16:11:34
9084
9125
  * @LastEditors: binruan@chatlabs.com
9085
- * @LastEditTime: 2024-06-28 15:17:10
9126
+ * @LastEditTime: 2024-10-18 14:52:42
9086
9127
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
9087
9128
  *
9088
9129
  */
@@ -9119,6 +9160,8 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
9119
9160
  }, [text, maxStr, isShowMore]);
9120
9161
  React.useEffect(() => {
9121
9162
  var _a, _b;
9163
+ if (multiRowCopy === null || multiRowCopy === void 0 ? void 0 : multiRowCopy.current)
9164
+ multiRowCopy.current.style.display = 'block';
9122
9165
  if (((_a = multiRowCopy === null || multiRowCopy === void 0 ? void 0 : multiRowCopy.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) > ((_b = multiRow === null || multiRow === void 0 ? void 0 : multiRow.current) === null || _b === void 0 ? void 0 : _b.offsetHeight) && isPost) {
9123
9166
  setIsShow(true);
9124
9167
  }
@@ -9126,7 +9169,7 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
9126
9169
  setIsShow(false);
9127
9170
  }
9128
9171
  multiRowCopy.current.style.display = 'none';
9129
- }, [isPost]);
9172
+ }, [isPost, text]);
9130
9173
  return (React.createElement("div", { className: className, style: Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' }), hidden: !text || text === '' },
9131
9174
  React.createElement("div", { ref: multiRow, style: {
9132
9175
  overflow: 'hidden',
@@ -9362,9 +9405,14 @@ const CommodityDetail$1 = (_a) => {
9362
9405
  React.useEffect(() => {
9363
9406
  if (!isPost) {
9364
9407
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
9365
- eventName: 'ProductView'
9408
+ eventName: 'ProductView',
9409
+ product
9366
9410
  });
9367
9411
  }
9412
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
9413
+ eventName: 'PageView',
9414
+ product
9415
+ });
9368
9416
  }, [isPost, bffFbReport]);
9369
9417
  React.useEffect(() => {
9370
9418
  const initTime = () => {
@@ -10243,7 +10291,12 @@ const CommodityDetailDiroNew$1 = (_a) => {
10243
10291
  React.useEffect(() => {
10244
10292
  if (!isPost) {
10245
10293
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
10246
- eventName: 'ProductView'
10294
+ eventName: 'ProductView',
10295
+ product
10296
+ });
10297
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
10298
+ eventName: 'PageView',
10299
+ product
10247
10300
  });
10248
10301
  }
10249
10302
  }, [isPost, bffFbReport]);
@@ -10868,7 +10921,7 @@ var Img$1 = React.memo(Img);
10868
10921
  const CommodityList$1 = (_a) => {
10869
10922
  var _b, _c, _d;
10870
10923
  var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, translateY = 0, commodityPicture, isExternalLink, onClick } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "translateY", "commodityPicture", "isExternalLink", "onClick"]);
10871
- const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent, globalConfig } = useSxpDataSource();
10924
+ const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent, globalConfig, bffFbReport } = useSxpDataSource();
10872
10925
  const { jumpToWeb } = useEventReport();
10873
10926
  const { popup } = useEditor();
10874
10927
  const recData = isPost ? rec : popupDetailData;
@@ -10898,6 +10951,11 @@ const CommodityList$1 = (_a) => {
10898
10951
  onClick === null || onClick === void 0 ? void 0 : onClick();
10899
10952
  }
10900
10953
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
10954
+ React.useEffect(() => {
10955
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
10956
+ eventName: 'PageView'
10957
+ });
10958
+ }, []);
10901
10959
  return (React.createElement("div", { className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px', boxSizing: 'border-box' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
10902
10960
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
10903
10961
  return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement("div", Object.assign({ key: index }, props, { className: css.css({
@@ -14415,17 +14473,22 @@ function WaterfallList(_a) {
14415
14473
  * @Author: binruan@chatlabs.com
14416
14474
  * @Date: 2024-01-10 10:58:24
14417
14475
  * @LastEditors: binruan@chatlabs.com
14418
- * @LastEditTime: 2024-10-11 13:43:22
14476
+ * @LastEditTime: 2024-10-18 18:59:47
14419
14477
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
14420
14478
  *
14421
14479
  */
14422
14480
  const WaterFall = (props) => {
14423
14481
  var _a;
14424
- const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag, selectTag } = useSxpDataSource();
14482
+ const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag, selectTag, bffFbReport } = useSxpDataSource();
14425
14483
  const { backMainFeed } = useEventReport();
14426
14484
  React.useRef(null);
14427
14485
  const modalEleRef = React.useRef(null);
14428
14486
  const [viewTime, setViewTime] = React.useState();
14487
+ React.useEffect(() => {
14488
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
14489
+ eventName: 'PageView'
14490
+ });
14491
+ }, []);
14429
14492
  React.useEffect(() => {
14430
14493
  const parentNode = document.getElementById('sxp-render');
14431
14494
  const node = document.getElementById('water-fall');
@@ -15579,6 +15642,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
15579
15642
  const videoRef = React.useRef();
15580
15643
  const videoId = `pb-cache-video-${index}`;
15581
15644
  const videoEleRef = React.useRef(null);
15645
+ const hlsRef = React.useRef(null);
15582
15646
  const blur = React.useMemo(() => {
15583
15647
  return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
15584
15648
  }, [videoPostConfig]);
@@ -15757,12 +15821,12 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
15757
15821
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
15758
15822
  return;
15759
15823
  const Hls = window === null || window === void 0 ? void 0 : window.Hls;
15760
- let hls = null;
15824
+ let hls = hlsRef === null || hlsRef === void 0 ? void 0 : hlsRef.current;
15761
15825
  if (videoSrc.includes('.m3u8') && Hls && Hls.isSupported()) {
15762
15826
  hls = new Hls();
15763
- hls.loadSource(videoSrc);
15764
- hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
15765
- hls.on(Hls.Events.MANIFEST_PARSED, function () {
15827
+ hls === null || hls === void 0 ? void 0 : hls.loadSource(videoSrc);
15828
+ hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
15829
+ hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
15766
15830
  var _a;
15767
15831
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
15768
15832
  });
@@ -15781,35 +15845,36 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
15781
15845
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
15782
15846
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
15783
15847
  return () => {
15784
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15848
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
15785
15849
  const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
15786
15850
  if (!isPause)
15787
15851
  handlePause();
15788
- if (hls)
15789
- hls === null || hls === void 0 ? void 0 : hls.destroy();
15852
+ if (hlsRef === null || hlsRef === void 0 ? void 0 : hlsRef.current)
15853
+ (_b = hlsRef === null || hlsRef === void 0 ? void 0 : hlsRef.current) === null || _b === void 0 ? void 0 : _b.destroy();
15790
15854
  setIsLoadFinish(false);
15791
- (_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadedmetadata', handleLoadedmetadata);
15792
- (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadeddata', handLoadeddata);
15793
- (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('play', handleStartPlay);
15794
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('playing', handlePlaying);
15795
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('pause', handlePause);
15796
- (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('ended', handlePlay);
15797
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('canplay', handlePlay);
15798
- (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('waiting', handleWaiting);
15855
+ (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadedmetadata', handleLoadedmetadata);
15856
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
15857
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
15858
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
15859
+ (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
15860
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
15861
+ (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
15862
+ (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
15799
15863
  };
15800
- }, [isActive, videoId, rec, handlePause]);
15864
+ }, [isActive]);
15801
15865
  React.useEffect(() => {
15802
- var _a, _b;
15866
+ var _a, _b, _c, _d;
15803
15867
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
15804
15868
  return;
15805
15869
  if (isActive) {
15806
15870
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
15807
- eventName: 'ViewContent'
15871
+ eventName: 'ViewContent',
15872
+ product: (_b = (_a = data === null || data === void 0 ? void 0 : data[index]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.bindProduct
15808
15873
  });
15809
- (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
15874
+ (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.play();
15810
15875
  }
15811
15876
  else {
15812
- (_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.pause();
15877
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.pause();
15813
15878
  }
15814
15879
  }, [isActive, isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
15815
15880
  /*
@@ -15831,9 +15896,11 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
15831
15896
  if (!isActive)
15832
15897
  return;
15833
15898
  const onShow = () => {
15899
+ var _a, _b;
15834
15900
  handleClickVideo('start')();
15835
15901
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
15836
- eventName: 'ViewContent'
15902
+ eventName: 'ViewContent',
15903
+ product: (_b = (_a = data === null || data === void 0 ? void 0 : data[index]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.bindProduct
15837
15904
  });
15838
15905
  };
15839
15906
  const onHide = handleClickVideo('pause');
@@ -16320,7 +16387,7 @@ var Tagbar$1 = React.memo(Tagbar);
16320
16387
  * @Author: binruan@chatlabs.com
16321
16388
  * @Date: 2024-01-15 19:03:09
16322
16389
  * @LastEditors: binruan@chatlabs.com
16323
- * @LastEditTime: 2024-10-17 17:16:42
16390
+ * @LastEditTime: 2024-10-18 18:54:40
16324
16391
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
16325
16392
  *
16326
16393
  */
@@ -16350,9 +16417,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16350
16417
  if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
16351
16418
  const now = new Date();
16352
16419
  viewTime.current = now;
16353
- bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
16354
- eventName: 'PageView'
16355
- });
16356
16420
  }
16357
16421
  }, [data === null || data === void 0 ? void 0 : data.length]);
16358
16422
  const handleH5EnterLink = React.useCallback(() => {
@@ -16361,11 +16425,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16361
16425
  if (data.length > 0) {
16362
16426
  const now = new Date();
16363
16427
  viewTime.current = now;
16364
- bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
16365
- eventName: 'PageView'
16366
- });
16367
16428
  }
16368
- }, [data.length, bffFbReport, h5EnterLink]);
16429
+ }, [data.length, h5EnterLink]);
16369
16430
  React.useEffect(() => {
16370
16431
  var _a;
16371
16432
  if (!ctaType || (ctaType === null || ctaType === void 0 ? void 0 : ctaType.length) < 1)
@@ -16670,7 +16731,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16670
16731
  }
16671
16732
  };
16672
16733
  const handleScrollEvent = (swiper) => {
16673
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
16734
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
16674
16735
  const item = data[swiper.previousIndex];
16675
16736
  if (!item)
16676
16737
  return;
@@ -16717,7 +16778,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16717
16778
  const curItem = data[swiper.activeIndex];
16718
16779
  if (!((_r = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _r === void 0 ? void 0 : _r.url) && !((_s = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _s === void 0 ? void 0 : _s.imgUrls) && (curItem === null || curItem === void 0 ? void 0 : curItem.product)) {
16719
16780
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
16720
- eventName: 'ProductView'
16781
+ eventName: 'ProductView',
16782
+ product: (_t = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _t === void 0 ? void 0 : _t.bindProduct
16721
16783
  });
16722
16784
  }
16723
16785
  viewTime.current = new Date();
@@ -16738,7 +16800,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16738
16800
  }
16739
16801
  }, [openHashtag, data, activeIndex]);
16740
16802
  const handleViewImageStartEvent = (activeIndex) => {
16741
- var _a, _b, _c, _d, _e, _f;
16803
+ var _a, _b, _c, _d, _e, _f, _g;
16742
16804
  const item = data[activeIndex];
16743
16805
  // 如果是图片集则上报事件
16744
16806
  if (!((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) && ((_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls)) {
@@ -16758,7 +16820,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16758
16820
  }
16759
16821
  });
16760
16822
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
16761
- eventName: 'ViewContent'
16823
+ eventName: 'ViewContent',
16824
+ product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProduct
16762
16825
  });
16763
16826
  }
16764
16827
  };