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/pb-ui.js CHANGED
@@ -812,23 +812,64 @@
812
812
  type: 'beacon'
813
813
  });
814
814
  }, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
815
- const bffFbReport = React.useCallback((_a) => {
816
- var _b, _c, _d;
817
- 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;
815
+ const bffFbReport = React.useCallback(({ eventName, product }) => {
816
+ var _a, _b, _c, _d;
818
817
  if (!enableReportEvent || !enabledMetaConversionApi || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
819
818
  return;
820
819
  }
821
- const fakeUserId = storeAndLoadFeUserId();
820
+ let jsonParams = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _a === void 0 ? void 0 : _a[eventName];
822
821
  const urlParams = new URLSearchParams(window.location.search);
823
- const fbclid = urlParams.get('fbclid');
822
+ const fbclid = urlParams === null || urlParams === void 0 ? void 0 : urlParams.get('fbclid');
823
+ const fix_par = {
824
+ event_source_url: (_b = window === null || window === void 0 ? void 0 : window.location) === null || _b === void 0 ? void 0 : _b.href,
825
+ external_id: storeAndLoadFeUserId(),
826
+ 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 : '',
827
+ fbc: fbclid ? `fb.2.${new Date().getTime()}.${fbclid}` : '',
828
+ fbp: getCookie('_fbp') ? `fb.2.${new Date().getTime()}.${getCookie('_fbp')}` : '',
829
+ time: new Date().getTime()
830
+ };
831
+ const regex = /\{\{(.*?)\}\}/g;
832
+ const getEventParams = (obj) => {
833
+ if (!obj)
834
+ return;
835
+ if (obj instanceof Array) {
836
+ obj === null || obj === void 0 ? void 0 : obj.map((item) => getEventParams(item));
837
+ }
838
+ else {
839
+ for (const key in obj) {
840
+ if (obj.hasOwnProperty(key)) {
841
+ const value = obj === null || obj === void 0 ? void 0 : obj[key];
842
+ if (typeof value === 'object') {
843
+ getEventParams(value);
844
+ }
845
+ else if (typeof value === 'string') {
846
+ const matches = value === null || value === void 0 ? void 0 : value.match(regex);
847
+ if (matches) {
848
+ matches.forEach((match) => {
849
+ const prop = match.substring(2, match.length - 2);
850
+ try {
851
+ const replaceValue = new Function('fix_par', 'product', `return ${prop}`)(fix_par, product);
852
+ if (replaceValue) {
853
+ obj[key] = replaceValue;
854
+ }
855
+ else {
856
+ delete obj[key];
857
+ }
858
+ }
859
+ catch (error) {
860
+ console.error('An error occurred:', error === null || error === void 0 ? void 0 : error.message);
861
+ }
862
+ });
863
+ }
864
+ }
865
+ }
866
+ }
867
+ }
868
+ };
869
+ getEventParams(jsonParams);
824
870
  return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/fb/events', {
825
871
  method: 'POST',
826
- body: {
827
- eventName,
828
- actionSource,
829
- eventSourceUrl,
830
- 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 : '' })
831
- },
872
+ body: jsonParams,
832
873
  type: 'beacon'
833
874
  });
834
875
  }, [bffFetch, enableReportEvent, enabledMetaConversionApi, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
@@ -9075,7 +9116,7 @@
9075
9116
  * @Author: binruan@chatlabs.com
9076
9117
  * @Date: 2023-12-26 16:11:34
9077
9118
  * @LastEditors: binruan@chatlabs.com
9078
- * @LastEditTime: 2024-06-28 15:17:10
9119
+ * @LastEditTime: 2024-10-18 14:52:42
9079
9120
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\ExpandableText.tsx
9080
9121
  *
9081
9122
  */
@@ -9112,6 +9153,8 @@
9112
9153
  }, [text, maxStr, isShowMore]);
9113
9154
  React.useEffect(() => {
9114
9155
  var _a, _b;
9156
+ if (multiRowCopy === null || multiRowCopy === void 0 ? void 0 : multiRowCopy.current)
9157
+ multiRowCopy.current.style.display = 'block';
9115
9158
  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) {
9116
9159
  setIsShow(true);
9117
9160
  }
@@ -9119,7 +9162,7 @@
9119
9162
  setIsShow(false);
9120
9163
  }
9121
9164
  multiRowCopy.current.style.display = 'none';
9122
- }, [isPost]);
9165
+ }, [isPost, text]);
9123
9166
  return (React.createElement("div", { className: className, style: Object.assign(Object.assign({}, style), { transform: 'translate3d(0px, 0px, 0px)' }), hidden: !text || text === '' },
9124
9167
  React.createElement("div", { ref: multiRow, style: {
9125
9168
  overflow: 'hidden',
@@ -9355,9 +9398,14 @@
9355
9398
  React.useEffect(() => {
9356
9399
  if (!isPost) {
9357
9400
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
9358
- eventName: 'ProductView'
9401
+ eventName: 'ProductView',
9402
+ product
9359
9403
  });
9360
9404
  }
9405
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
9406
+ eventName: 'PageView',
9407
+ product
9408
+ });
9361
9409
  }, [isPost, bffFbReport]);
9362
9410
  React.useEffect(() => {
9363
9411
  const initTime = () => {
@@ -10236,7 +10284,12 @@
10236
10284
  React.useEffect(() => {
10237
10285
  if (!isPost) {
10238
10286
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
10239
- eventName: 'ProductView'
10287
+ eventName: 'ProductView',
10288
+ product
10289
+ });
10290
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
10291
+ eventName: 'PageView',
10292
+ product
10240
10293
  });
10241
10294
  }
10242
10295
  }, [isPost, bffFbReport]);
@@ -10861,7 +10914,7 @@ Made in Italy` })));
10861
10914
  const CommodityList$1 = (_a) => {
10862
10915
  var _b, _c, _d;
10863
10916
  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"]);
10864
- const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent, globalConfig } = useSxpDataSource();
10917
+ const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent, globalConfig, bffFbReport } = useSxpDataSource();
10865
10918
  const { jumpToWeb } = useEventReport();
10866
10919
  const { popup } = useEditor();
10867
10920
  const recData = isPost ? rec : popupDetailData;
@@ -10891,6 +10944,11 @@ Made in Italy` })));
10891
10944
  onClick === null || onClick === void 0 ? void 0 : onClick();
10892
10945
  }
10893
10946
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
10947
+ React.useEffect(() => {
10948
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
10949
+ eventName: 'PageView'
10950
+ });
10951
+ }, []);
10894
10952
  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) => {
10895
10953
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
10896
10954
  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({
@@ -14408,17 +14466,22 @@ Made in Italy` })));
14408
14466
  * @Author: binruan@chatlabs.com
14409
14467
  * @Date: 2024-01-10 10:58:24
14410
14468
  * @LastEditors: binruan@chatlabs.com
14411
- * @LastEditTime: 2024-10-11 13:43:22
14469
+ * @LastEditTime: 2024-10-18 18:59:47
14412
14470
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
14413
14471
  *
14414
14472
  */
14415
14473
  const WaterFall = (props) => {
14416
14474
  var _a;
14417
- const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag, selectTag } = useSxpDataSource();
14475
+ const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag, selectTag, bffFbReport } = useSxpDataSource();
14418
14476
  const { backMainFeed } = useEventReport();
14419
14477
  React.useRef(null);
14420
14478
  const modalEleRef = React.useRef(null);
14421
14479
  const [viewTime, setViewTime] = React.useState();
14480
+ React.useEffect(() => {
14481
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
14482
+ eventName: 'PageView'
14483
+ });
14484
+ }, []);
14422
14485
  React.useEffect(() => {
14423
14486
  const parentNode = document.getElementById('sxp-render');
14424
14487
  const node = document.getElementById('water-fall');
@@ -15572,6 +15635,7 @@ Made in Italy` })));
15572
15635
  const videoRef = React.useRef();
15573
15636
  const videoId = `pb-cache-video-${index}`;
15574
15637
  const videoEleRef = React.useRef(null);
15638
+ const hlsRef = React.useRef(null);
15575
15639
  const blur = React.useMemo(() => {
15576
15640
  return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
15577
15641
  }, [videoPostConfig]);
@@ -15750,12 +15814,12 @@ Made in Italy` })));
15750
15814
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
15751
15815
  return;
15752
15816
  const Hls = window === null || window === void 0 ? void 0 : window.Hls;
15753
- let hls = null;
15817
+ let hls = hlsRef === null || hlsRef === void 0 ? void 0 : hlsRef.current;
15754
15818
  if (videoSrc.includes('.m3u8') && Hls && Hls.isSupported()) {
15755
15819
  hls = new Hls();
15756
- hls.loadSource(videoSrc);
15757
- hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
15758
- hls.on(Hls.Events.MANIFEST_PARSED, function () {
15820
+ hls === null || hls === void 0 ? void 0 : hls.loadSource(videoSrc);
15821
+ hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
15822
+ hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
15759
15823
  var _a;
15760
15824
  (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
15761
15825
  });
@@ -15774,35 +15838,36 @@ Made in Italy` })));
15774
15838
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
15775
15839
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
15776
15840
  return () => {
15777
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15841
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
15778
15842
  const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
15779
15843
  if (!isPause)
15780
15844
  handlePause();
15781
- if (hls)
15782
- hls === null || hls === void 0 ? void 0 : hls.destroy();
15845
+ if (hlsRef === null || hlsRef === void 0 ? void 0 : hlsRef.current)
15846
+ (_b = hlsRef === null || hlsRef === void 0 ? void 0 : hlsRef.current) === null || _b === void 0 ? void 0 : _b.destroy();
15783
15847
  setIsLoadFinish(false);
15784
- (_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadedmetadata', handleLoadedmetadata);
15785
- (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadeddata', handLoadeddata);
15786
- (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('play', handleStartPlay);
15787
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('playing', handlePlaying);
15788
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('pause', handlePause);
15789
- (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('ended', handlePlay);
15790
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('canplay', handlePlay);
15791
- (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('waiting', handleWaiting);
15848
+ (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadedmetadata', handleLoadedmetadata);
15849
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
15850
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('play', handleStartPlay);
15851
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('playing', handlePlaying);
15852
+ (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('pause', handlePause);
15853
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('ended', handlePlay);
15854
+ (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('canplay', handlePlay);
15855
+ (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.removeEventListener('waiting', handleWaiting);
15792
15856
  };
15793
- }, [isActive, videoId, rec, handlePause]);
15857
+ }, [isActive]);
15794
15858
  React.useEffect(() => {
15795
- var _a, _b;
15859
+ var _a, _b, _c, _d;
15796
15860
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
15797
15861
  return;
15798
15862
  if (isActive) {
15799
15863
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
15800
- eventName: 'ViewContent'
15864
+ eventName: 'ViewContent',
15865
+ 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
15801
15866
  });
15802
- (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
15867
+ (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.play();
15803
15868
  }
15804
15869
  else {
15805
- (_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.pause();
15870
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.pause();
15806
15871
  }
15807
15872
  }, [isActive, isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
15808
15873
  /*
@@ -15824,9 +15889,11 @@ Made in Italy` })));
15824
15889
  if (!isActive)
15825
15890
  return;
15826
15891
  const onShow = () => {
15892
+ var _a, _b;
15827
15893
  handleClickVideo('start')();
15828
15894
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
15829
- eventName: 'ViewContent'
15895
+ eventName: 'ViewContent',
15896
+ 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
15830
15897
  });
15831
15898
  };
15832
15899
  const onHide = handleClickVideo('pause');
@@ -16313,7 +16380,7 @@ Made in Italy` })));
16313
16380
  * @Author: binruan@chatlabs.com
16314
16381
  * @Date: 2024-01-15 19:03:09
16315
16382
  * @LastEditors: binruan@chatlabs.com
16316
- * @LastEditTime: 2024-10-17 17:16:42
16383
+ * @LastEditTime: 2024-10-18 18:54:40
16317
16384
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
16318
16385
  *
16319
16386
  */
@@ -16343,9 +16410,6 @@ Made in Italy` })));
16343
16410
  if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
16344
16411
  const now = new Date();
16345
16412
  viewTime.current = now;
16346
- bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
16347
- eventName: 'PageView'
16348
- });
16349
16413
  }
16350
16414
  }, [data === null || data === void 0 ? void 0 : data.length]);
16351
16415
  const handleH5EnterLink = React.useCallback(() => {
@@ -16354,11 +16418,8 @@ Made in Italy` })));
16354
16418
  if (data.length > 0) {
16355
16419
  const now = new Date();
16356
16420
  viewTime.current = now;
16357
- bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
16358
- eventName: 'PageView'
16359
- });
16360
16421
  }
16361
- }, [data.length, bffFbReport, h5EnterLink]);
16422
+ }, [data.length, h5EnterLink]);
16362
16423
  React.useEffect(() => {
16363
16424
  var _a;
16364
16425
  if (!ctaType || (ctaType === null || ctaType === void 0 ? void 0 : ctaType.length) < 1)
@@ -16663,7 +16724,7 @@ Made in Italy` })));
16663
16724
  }
16664
16725
  };
16665
16726
  const handleScrollEvent = (swiper) => {
16666
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
16727
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
16667
16728
  const item = data[swiper.previousIndex];
16668
16729
  if (!item)
16669
16730
  return;
@@ -16710,7 +16771,8 @@ Made in Italy` })));
16710
16771
  const curItem = data[swiper.activeIndex];
16711
16772
  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)) {
16712
16773
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
16713
- eventName: 'ProductView'
16774
+ eventName: 'ProductView',
16775
+ product: (_t = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _t === void 0 ? void 0 : _t.bindProduct
16714
16776
  });
16715
16777
  }
16716
16778
  viewTime.current = new Date();
@@ -16731,7 +16793,7 @@ Made in Italy` })));
16731
16793
  }
16732
16794
  }, [openHashtag, data, activeIndex]);
16733
16795
  const handleViewImageStartEvent = (activeIndex) => {
16734
- var _a, _b, _c, _d, _e, _f;
16796
+ var _a, _b, _c, _d, _e, _f, _g;
16735
16797
  const item = data[activeIndex];
16736
16798
  // 如果是图片集则上报事件
16737
16799
  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)) {
@@ -16751,7 +16813,8 @@ Made in Italy` })));
16751
16813
  }
16752
16814
  });
16753
16815
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
16754
- eventName: 'ViewContent'
16816
+ eventName: 'ViewContent',
16817
+ product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProduct
16755
16818
  });
16756
16819
  }
16757
16820
  };