pb-sxp-ui 1.7.3 → 1.7.5

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 (33) hide show
  1. package/dist/index.cjs +60 -67
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +60 -67
  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 +60 -67
  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/Modal/index.d.ts +1 -0
  14. package/es/core/components/SxpPageRender/Modal/index.js +2 -2
  15. package/es/core/components/SxpPageRender/PictureGroup/index.d.ts +2 -3
  16. package/es/core/components/SxpPageRender/PictureGroup/index.js +5 -8
  17. package/es/core/components/SxpPageRender/RenderCard.js +2 -1
  18. package/es/core/components/SxpPageRender/VideoWidget/index.js +15 -17
  19. package/es/core/components/SxpPageRender/index.js +25 -20
  20. package/es/core/context/SxpDataSourceProvider.js +9 -6
  21. package/es/core/utils/tool.d.ts +1 -2
  22. package/es/core/utils/tool.js +1 -11
  23. package/lib/core/components/SxpPageRender/Modal/index.d.ts +1 -0
  24. package/lib/core/components/SxpPageRender/Modal/index.js +2 -2
  25. package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +2 -3
  26. package/lib/core/components/SxpPageRender/PictureGroup/index.js +5 -8
  27. package/lib/core/components/SxpPageRender/RenderCard.js +2 -1
  28. package/lib/core/components/SxpPageRender/VideoWidget/index.js +15 -17
  29. package/lib/core/components/SxpPageRender/index.js +25 -20
  30. package/lib/core/context/SxpDataSourceProvider.js +9 -6
  31. package/lib/core/utils/tool.d.ts +1 -2
  32. package/lib/core/utils/tool.js +1 -12
  33. package/package.json +1 -1
package/dist/pb-ui.js CHANGED
@@ -313,16 +313,6 @@
313
313
  });
314
314
  return value !== null && value !== void 0 ? value : '';
315
315
  }
316
- const getResFileSizeFromSrc = (imageSrc) => {
317
- if (!imageSrc)
318
- return '';
319
- return fetch(imageSrc)
320
- .then((response) => response.blob())
321
- .then((blob) => {
322
- const fileSizeInMB = blob.size / (1024 * 1024); // 将文件大小转换为 MB
323
- return fileSizeInMB.toFixed(2) + '';
324
- });
325
- };
326
316
 
327
317
  function unzip(b64Data) {
328
318
  const strData = atob(b64Data);
@@ -823,17 +813,20 @@
823
813
  });
824
814
  }, [bffFetch, curReqInfo, enableReportEvent, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview]);
825
815
  const bffFbReport = React.useCallback(({ eventName, product }) => {
826
- var _a, _b, _c, _d;
827
- if (!enableReportEvent || !enabledMetaConversionApi || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview)) {
816
+ var _a, _b, _c, _d, _e;
817
+ if (!enableReportEvent ||
818
+ !enabledMetaConversionApi ||
819
+ (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) ||
820
+ !((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _a === void 0 ? void 0 : _a[eventName])) {
828
821
  return;
829
822
  }
830
- let jsonParams = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _a === void 0 ? void 0 : _a[eventName];
823
+ let jsonParams = JSON.parse(JSON.stringify((_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.converApi) === null || _b === void 0 ? void 0 : _b[eventName]));
831
824
  const urlParams = new URLSearchParams(window.location.search);
832
825
  const fbclid = urlParams === null || urlParams === void 0 ? void 0 : urlParams.get('fbclid');
833
826
  const fix_par = {
834
- event_source_url: (_b = window === null || window === void 0 ? void 0 : window.location) === null || _b === void 0 ? void 0 : _b.href,
827
+ event_source_url: (_c = window === null || window === void 0 ? void 0 : window.location) === null || _c === void 0 ? void 0 : _c.href,
835
828
  external_id: storeAndLoadFeUserId(),
836
- 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 : '',
829
+ client_user_agent: (_e = (_d = window === null || window === void 0 ? void 0 : window.navigator) === null || _d === void 0 ? void 0 : _d.userAgent) !== null && _e !== void 0 ? _e : '',
837
830
  fbc: fbclid ? `fb.2.${new Date().getTime()}.${fbclid}` : '',
838
831
  fbp: getCookie('_fbp') ? `fb.2.${new Date().getTime()}.${getCookie('_fbp')}` : '',
839
832
  time: new Date().getTime()
@@ -858,7 +851,7 @@
858
851
  matches.forEach((match) => {
859
852
  const prop = match.substring(2, match.length - 2);
860
853
  try {
861
- const replaceValue = new Function('fix_par', 'product', `return ${prop}`)(fix_par, product);
854
+ let replaceValue = new Function('fix_par', 'product', `return ${prop}`)(fix_par, product);
862
855
  if (replaceValue) {
863
856
  obj[key] = replaceValue;
864
857
  }
@@ -8979,12 +8972,12 @@
8979
8972
  * @Author: binruan@chatlabs.com
8980
8973
  * @Date: 2023-11-02 18:34:34
8981
8974
  * @LastEditors: binruan@chatlabs.com
8982
- * @LastEditTime: 2024-10-23 16:44:34
8975
+ * @LastEditTime: 2024-10-30 19:22:59
8983
8976
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8984
8977
  *
8985
8978
  */
8986
8979
  const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8987
- const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
8980
+ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false, openState }) => {
8988
8981
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
8989
8982
  const touchRef = React.useRef(null);
8990
8983
  const fTouchRef = React.useRef(null);
@@ -9036,7 +9029,7 @@
9036
9029
  }, [isOpen, popup]);
9037
9030
  const child = React.useCallback(() => {
9038
9031
  return children;
9039
- }, [_popup]);
9032
+ }, [_popup, openState]);
9040
9033
  if (!modalEleRef.current)
9041
9034
  return null;
9042
9035
  const handleClose = lodash.debounce(() => {
@@ -15676,6 +15669,7 @@ Made in Italy` })));
15676
15669
  const videoEleRef = React.useRef(null);
15677
15670
  const hlsRef = React.useRef(null);
15678
15671
  const initTimeRef = React.useRef();
15672
+ const loadedTimeRef = React.useRef();
15679
15673
  const blur = React.useMemo(() => {
15680
15674
  return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
15681
15675
  }, [videoPostConfig]);
@@ -15722,7 +15716,7 @@ Made in Italy` })));
15722
15716
  setIsLoadFinish(true);
15723
15717
  }, []);
15724
15718
  const handleStartPlay = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
15725
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
15719
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
15726
15720
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
15727
15721
  return;
15728
15722
  setIsPauseVideo(false);
@@ -15732,22 +15726,20 @@ Made in Italy` })));
15732
15726
  const videoDuration = ((_d = (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.duration) !== null && _d !== void 0 ? _d : 0).toFixed(2);
15733
15727
  const videoCurrentTime = ((_f = (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime) !== null && _f !== void 0 ? _f : 0).toFixed(2);
15734
15728
  const playType = isFirstPlay ? '0' : '1';
15735
- const contentSize = yield getResFileSizeFromSrc((_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.url);
15736
15729
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
15737
15730
  eventInfo: {
15738
15731
  eventSubject: 'playVideo',
15739
15732
  eventDescription: 'User played the video',
15740
- contentId: (_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.itemId) !== null && _j !== void 0 ? _j : '',
15741
- contentName: (_l = (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.title) !== null && _l !== void 0 ? _l : '',
15733
+ contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
15734
+ contentName: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
15742
15735
  playType,
15743
15736
  startTime: videoCurrentTime,
15744
15737
  videoDuration,
15745
- contentTags: JSON.stringify((_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.tags) !== null && _o !== void 0 ? _o : []),
15738
+ contentTags: JSON.stringify((_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
15746
15739
  position: index + '',
15747
15740
  contentFormat: 'video',
15748
- traceInfo: (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.traceInfo,
15749
- contentSize,
15750
- loadTime: (new Date() - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current)).toFixed(2) + ''
15741
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo,
15742
+ loadTime: ((loadedTimeRef === null || loadedTimeRef === void 0 ? void 0 : loadedTimeRef.current) - (initTimeRef === null || initTimeRef === void 0 ? void 0 : initTimeRef.current)).toFixed(2) + ''
15751
15743
  }
15752
15744
  });
15753
15745
  setIsFirstPlay(false);
@@ -15778,6 +15770,7 @@ Made in Italy` })));
15778
15770
  const handleLoadedmetadata = React.useCallback(() => {
15779
15771
  if (!videoRef.current)
15780
15772
  return;
15773
+ loadedTimeRef.current = new Date();
15781
15774
  handleStartPlay();
15782
15775
  handLoadeddata();
15783
15776
  }, [videoRef.current, handLoadeddata, handleStartPlay]);
@@ -15900,7 +15893,7 @@ Made in Italy` })));
15900
15893
  };
15901
15894
  }, [isActive]);
15902
15895
  React.useEffect(() => {
15903
- var _a, _b, _c, _d;
15896
+ var _a, _b, _c, _d, _e, _f;
15904
15897
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
15905
15898
  return;
15906
15899
  if (isActive) {
@@ -15908,10 +15901,14 @@ Made in Italy` })));
15908
15901
  eventName: 'ViewContent',
15909
15902
  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
15910
15903
  });
15911
- (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.play();
15904
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
15905
+ eventName: 'PageView',
15906
+ product: (_d = (_c = data === null || data === void 0 ? void 0 : data[index]) === null || _c === void 0 ? void 0 : _c.video) === null || _d === void 0 ? void 0 : _d.bindProduct
15907
+ });
15908
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
15912
15909
  }
15913
15910
  else {
15914
- (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.pause();
15911
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.pause();
15915
15912
  }
15916
15913
  }, [isActive, isLoadFinish, videoRef === null || videoRef === void 0 ? void 0 : videoRef.current]);
15917
15914
  /*
@@ -15933,12 +15930,7 @@ Made in Italy` })));
15933
15930
  if (!isActive)
15934
15931
  return;
15935
15932
  const onShow = () => {
15936
- var _a, _b;
15937
15933
  handleClickVideo('start')();
15938
- bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
15939
- eventName: 'ViewContent',
15940
- 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
15941
- });
15942
15934
  };
15943
15935
  const onHide = handleClickVideo('pause');
15944
15936
  SXP_EVENT_BUS.on(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
@@ -16109,7 +16101,7 @@ Made in Italy` })));
16109
16101
  }, onLoad: onShowFirstImage }))));
16110
16102
  };
16111
16103
 
16112
- const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
16104
+ const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onViewImageEndEvent, onViewImageStartEvent, imgUrlsPostConfig }) => {
16113
16105
  var _a, _b;
16114
16106
  const ref = React.useRef();
16115
16107
  const { isActive } = useSwiperSlide();
@@ -16121,21 +16113,19 @@ Made in Italy` })));
16121
16113
  if (isLoad && isActive) {
16122
16114
  (ref === null || ref === void 0 ? void 0 : ref.current) && ref.current.swiper.autoplay.start();
16123
16115
  if (openHashtag) {
16124
- onReportViewImageEnd(rec);
16116
+ onViewImageEndEvent(rec);
16125
16117
  }
16126
16118
  else {
16127
- onViewImageStartEvent(index, imgInfo);
16119
+ onViewImageStartEvent(index, imgInfo, true);
16128
16120
  }
16129
16121
  }
16130
16122
  else {
16131
16123
  (ref === null || ref === void 0 ? void 0 : ref.current) && ref.current.swiper.autoplay.stop();
16132
16124
  }
16133
- }, [rec, isActive, onReportViewImageEnd, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
16125
+ }, [rec, isActive, onViewImageEndEvent, openHashtag, index, onViewImageStartEvent, isLoad, imgInfo]);
16134
16126
  const showFirstImageFn = React.useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
16135
16127
  if (!isLoad) {
16136
- const contentSize = yield getResFileSizeFromSrc(e.src);
16137
16128
  setImgInfo({
16138
- contentSize,
16139
16129
  loadTime: (new Date() - initTime).toFixed(2) + ''
16140
16130
  });
16141
16131
  setIsLoad(true);
@@ -16146,7 +16136,7 @@ Made in Italy` })));
16146
16136
  // }
16147
16137
  React.useEffect(() => {
16148
16138
  const onShow = () => onViewImageStartEvent(index, imgInfo);
16149
- const onHide = () => onReportViewImageEnd(rec);
16139
+ const onHide = () => onViewImageEndEvent(rec);
16150
16140
  SXP_EVENT_BUS.on(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
16151
16141
  SXP_EVENT_BUS.on(SXP_EVENT_TYPE.PAGE_DID_HIDE, onHide);
16152
16142
  return () => {
@@ -16292,7 +16282,7 @@ Made in Italy` })));
16292
16282
  * @Author: binruan@chatlabs.com
16293
16283
  * @Date: 2023-12-26 16:11:34
16294
16284
  * @LastEditors: binruan@chatlabs.com
16295
- * @LastEditTime: 2024-10-25 10:36:59
16285
+ * @LastEditTime: 2024-10-30 14:51:19
16296
16286
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
16297
16287
  *
16298
16288
  */
@@ -16341,7 +16331,7 @@ Made in Italy` })));
16341
16331
  const Component = withBindDataSource(t);
16342
16332
  const defaulSetting = (_z = t === null || t === void 0 ? void 0 : t.extend) === null || _z === void 0 ? void 0 : _z.defaulSetting;
16343
16333
  const isExternalLink = ((_2 = (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.event) === null || _1 === void 0 ? void 0 : _1.onClick) === null || _2 === void 0 ? void 0 : _2.linkType) === 'externalLink';
16344
- let style = (_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.style;
16334
+ let style = lodash.cloneDeep((_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.style);
16345
16335
  if (style.hasOwnProperty('backdropFilter')) {
16346
16336
  let sbf = style['backdropFilter'];
16347
16337
  style['backdropFilter'] = `blur(${sbf !== null && sbf !== void 0 ? sbf : 0}px)`;
@@ -16439,7 +16429,7 @@ Made in Italy` })));
16439
16429
  * @Author: binruan@chatlabs.com
16440
16430
  * @Date: 2024-01-15 19:03:09
16441
16431
  * @LastEditors: binruan@chatlabs.com
16442
- * @LastEditTime: 2024-10-25 15:41:58
16432
+ * @LastEditTime: 2024-10-28 16:36:22
16443
16433
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
16444
16434
  *
16445
16435
  */
@@ -16509,7 +16499,6 @@ Made in Italy` })));
16509
16499
  // 移动端h5直接杀掉浏览器或宿主app时不会触发,pc端直接杀掉标签页时能触发
16510
16500
  if (repCond) {
16511
16501
  SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.PAGE_DID_HIDE, item);
16512
- // handleReportViewImageEnd(item);
16513
16502
  handleReportProductView(item);
16514
16503
  }
16515
16504
  let fromKName = '';
@@ -16554,7 +16543,6 @@ Made in Italy` })));
16554
16543
  // 页面可见时触发,注意页面初始化时不会触发
16555
16544
  handleH5EnterLink();
16556
16545
  if (repCond) {
16557
- // handleViewImageStartEvent(activeIndex);
16558
16546
  SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.PAGE_DID_SHOW, item);
16559
16547
  backMainFeed('external', selectTag);
16560
16548
  }
@@ -16639,7 +16627,7 @@ Made in Italy` })));
16639
16627
  return (React.createElement(VideoWidget$3, { key: isReload, rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoPlayIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPlayIcon }));
16640
16628
  }
16641
16629
  if ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
16642
- return (React.createElement(PictureGroup$3, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
16630
+ return (React.createElement(PictureGroup$3, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onViewImageEndEvent: handleViewImageStartEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
16643
16631
  }
16644
16632
  if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
16645
16633
  return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, idx) => {
@@ -16713,7 +16701,7 @@ Made in Italy` })));
16713
16701
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike) || !visible)
16714
16702
  return;
16715
16703
  let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
16716
- if (waterFallData && top < 40) {
16704
+ if (waterFallData && top < 40 && globalConfig.likeIconYPosit === 'top') {
16717
16705
  top += 40;
16718
16706
  }
16719
16707
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
@@ -16725,7 +16713,7 @@ Made in Italy` })));
16725
16713
  }
16726
16714
  return null;
16727
16715
  }, [globalConfig, waterFallData]);
16728
- const handleReportViewImageEnd = (item) => {
16716
+ const handleViewImageStartEnd = (item) => {
16729
16717
  var _a, _b, _c, _d, _e, _f;
16730
16718
  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)) {
16731
16719
  const endTime = Date.now();
@@ -16808,7 +16796,7 @@ Made in Italy` })));
16808
16796
  }
16809
16797
  });
16810
16798
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
16811
- handleReportViewImageEnd(item);
16799
+ handleViewImageStartEnd(item);
16812
16800
  handleSlideSkip(item, swiper.previousIndex);
16813
16801
  }
16814
16802
  else {
@@ -16825,7 +16813,7 @@ Made in Italy` })));
16825
16813
  }
16826
16814
  });
16827
16815
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
16828
- handleReportViewImageEnd(item);
16816
+ handleViewImageStartEnd(item);
16829
16817
  }
16830
16818
  // 商品浏览事件
16831
16819
  handleReportProductView(item);
@@ -16846,7 +16834,7 @@ Made in Italy` })));
16846
16834
  viewTime.current = new Date();
16847
16835
  }
16848
16836
  }, [openHashtag, data, activeIndex]);
16849
- const handleViewImageStartEvent = (activeIndex, imgInfo) => {
16837
+ const handleViewImageStartEvent = (activeIndex, imgInfo, enableCapi) => {
16850
16838
  var _a, _b, _c, _d, _e, _f, _g, _h;
16851
16839
  const item = data[activeIndex];
16852
16840
  // 如果是图片集则上报事件
@@ -16864,33 +16852,38 @@ Made in Italy` })));
16864
16852
  position: activeIndex + '',
16865
16853
  contentFormat: 'image',
16866
16854
  traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo,
16867
- contentSize: imgInfo === null || imgInfo === void 0 ? void 0 : imgInfo.contentSize,
16868
16855
  loadTime: imgInfo === null || imgInfo === void 0 ? void 0 : imgInfo.loadTime
16869
16856
  }
16870
16857
  });
16871
- bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
16872
- eventName: 'ViewContent',
16873
- product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProduct
16874
- });
16875
- bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
16876
- eventName: 'PageView',
16877
- product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct
16878
- });
16858
+ if (enableCapi) {
16859
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
16860
+ eventName: 'ViewContent',
16861
+ product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProduct
16862
+ });
16863
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
16864
+ eventName: 'PageView',
16865
+ product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct
16866
+ });
16867
+ }
16879
16868
  }
16880
16869
  };
16881
16870
  const renderToggleButton = React.useCallback((visible) => {
16882
16871
  var _a, _b, _c, _d, _e, _f;
16883
16872
  if (!visible)
16884
16873
  return;
16874
+ let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _a !== void 0 ? _a : 23;
16875
+ if (waterFallData && top < 40 && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) === 'top') {
16876
+ top += 40;
16877
+ }
16885
16878
  return (((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (React.createElement(ToggleButton$1, { style: {
16886
16879
  position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
16887
- visibility: ((_b = (_a = visList === null || visList === void 0 ? void 0 : visList[activeIndex]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.url) ? 'visible' : 'hidden',
16880
+ visibility: ((_c = (_b = visList === null || visList === void 0 ? void 0 : visList[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
16888
16881
  zIndex: 999,
16889
16882
  transform: 'translate3d(0px,0px,0px)',
16890
- [(_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _c !== void 0 ? _c : 'right']: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _d !== void 0 ? _d : 0,
16891
- [(_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _e !== void 0 ? _e : 'bottom']: (_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _f !== void 0 ? _f : 23
16883
+ [(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _d !== void 0 ? _d : 'right']: (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _e !== void 0 ? _e : 0,
16884
+ [(_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _f !== void 0 ? _f : 'bottom']: top
16892
16885
  }, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted })));
16893
- }, [globalConfig, visList, activeIndex, isMuted]);
16886
+ }, [globalConfig, visList, activeIndex, isMuted, waterFallData]);
16894
16887
  const renderView = React.useMemo(() => {
16895
16888
  if (loading) {
16896
16889
  return (React.createElement("div", { style: { height, width: containerWidth, display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -16923,7 +16916,7 @@ Made in Italy` })));
16923
16916
  renderToggleButton
16924
16917
  ]);
16925
16918
  return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container', style: Object.assign({}, ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.textUnderlineOffset) && { textUnderlineOffset: `${globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.textUnderlineOffset}px` })) },
16926
- waterFallData && (React.createElement(Navbar$1, { icon: img, styles: { background: 'rgba(0,0,0,.3)', color: '#fff' }, textStyle: Object.assign(Object.assign({}, (_e = (_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagTitle), { color: '#fff' }), onClose: () => {
16919
+ waterFallData && (React.createElement(Navbar$1, { icon: img, styles: { background: 'rgba(0,0,0,.3)', color: '#fff', top: `${minusHeight}px` }, textStyle: Object.assign(Object.assign({}, (_e = (_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagTitle), { color: '#fff' }), onClose: () => {
16927
16920
  const isEq = lodash.isEqual(rtcList, cacheRtcList);
16928
16921
  if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
16929
16922
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);