pb-sxp-ui 1.0.47 → 1.0.49

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.css CHANGED
@@ -62,6 +62,7 @@
62
62
 
63
63
  .pb-commondity {
64
64
  position: relative;
65
+ height: 100%;
65
66
  }
66
67
  .pb-commondity-content {
67
68
  padding: 21px 19px 80px;
@@ -659,6 +660,7 @@
659
660
  position: absolute;
660
661
  top: 0;
661
662
  width: 100%;
663
+ height: 100%;
662
664
  overflow: auto;
663
665
  }
664
666
  .list-info {
package/dist/index.js CHANGED
@@ -466,20 +466,20 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
466
466
  }, [bffDataSource]);
467
467
  // 获取推荐视频数据
468
468
  const getRecommendVideos = useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
469
- var _a, _b, _c, _d;
469
+ var _a, _b, _c, _d, _e;
470
470
  query = {
471
- maxSize,
472
- defaultSize: (_a = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _a !== void 0 ? _a : defaultSize,
471
+ maxSize: (_a = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _a !== void 0 ? _a : maxSize,
472
+ defaultSize: (_b = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _b !== void 0 ? _b : defaultSize,
473
473
  'itemFilter.itemId': query === null || query === void 0 ? void 0 : query['itemFilter.itemId'],
474
474
  'itemFilter.itemType': query === null || query === void 0 ? void 0 : query['itemFilter.itemType'],
475
475
  hashTag: query === null || query === void 0 ? void 0 : query.hashTag,
476
476
  traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo
477
477
  };
478
478
  if (utmVal) {
479
- const val = (_d = (_c = (_b = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _b === void 0 ? void 0 : _b.filter((val) => {
479
+ const val = (_e = (_d = (_c = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _c === void 0 ? void 0 : _c.filter((val) => {
480
480
  const key = val.split('=')[0];
481
481
  return UTM_KEYS.includes(key);
482
- })) === null || _c === void 0 ? void 0 : _c.join('&')) !== null && _d !== void 0 ? _d : '';
482
+ })) === null || _d === void 0 ? void 0 : _d.join('&')) !== null && _e !== void 0 ? _e : '';
483
483
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
484
484
  }
485
485
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/recommend/list', { method: 'GET', query }));
@@ -491,7 +491,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
491
491
  return result === null || result === void 0 ? void 0 : result.data;
492
492
  }), [bffFetch, utmVal, maxSize, defaultSize]);
493
493
  const loadVideos = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
494
- var _e, _f;
494
+ var _f, _g;
495
495
  if (rtcList.length <= 0) {
496
496
  return;
497
497
  }
@@ -500,8 +500,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
500
500
  'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
501
501
  'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType
502
502
  });
503
- setRtcList(rtcList.concat((_e = data === null || data === void 0 ? void 0 : data.recList) !== null && _e !== void 0 ? _e : []));
504
- setCacheRtcList(cacheRtcList.concat((_f = data === null || data === void 0 ? void 0 : data.recList) !== null && _f !== void 0 ? _f : []));
503
+ setRtcList(rtcList.concat((_f = data === null || data === void 0 ? void 0 : data.recList) !== null && _f !== void 0 ? _f : []));
504
+ setCacheRtcList(cacheRtcList.concat((_g = data === null || data === void 0 ? void 0 : data.recList) !== null && _g !== void 0 ? _g : []));
505
505
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
506
506
  const bffEventReport = useCallback(({ userInfo, eventInfo }) => {
507
507
  // 关闭 BFF 事件上报
@@ -545,12 +545,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
545
545
  }), [bffFetch]);
546
546
  // 获取 Tag
547
547
  const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
548
- var _g, _h;
548
+ var _h, _j;
549
549
  if (!utmVal)
550
550
  return;
551
551
  try {
552
552
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: utmVal } }));
553
- setTagList((_h = (_g = result === null || result === void 0 ? void 0 : result.data) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []);
553
+ setTagList((_j = (_h = result === null || result === void 0 ? void 0 : result.data) === null || _h === void 0 ? void 0 : _h.tags) !== null && _j !== void 0 ? _j : []);
554
554
  }
555
555
  catch (e) {
556
556
  console.log('e', e);
@@ -8394,10 +8394,10 @@ const CommodityDetail$1 = (_a) => {
8394
8394
  React.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
8395
8395
  React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
8396
8396
  React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8397
- React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8398
- bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8399
- collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8400
- necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8397
+ React.createElement(ExpandableText$1, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
8398
+ bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
8399
+ collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
8400
+ necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
8401
8401
  18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
8402
8402
  };
8403
8403
  const renderBtn = () => {
@@ -8848,7 +8848,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
8848
8848
  const productInfoText = ({ isPost }) => {
8849
8849
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8850
8850
  React.createElement(ExpandableText$1, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
8851
- `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8851
+ `Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
8852
8852
  Made in Italy` })));
8853
8853
  };
8854
8854
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
@@ -11676,7 +11676,7 @@ const WaterfallFlowItem = (props) => {
11676
11676
  React.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.price, hidden: !priceText }, priceText))));
11677
11677
  };
11678
11678
  function WaterfallList(_a) {
11679
- var _b, _c, _d, _e, _f, _g, _h, _j, _k;
11679
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
11680
11680
  var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
11681
11681
  const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
11682
11682
  const [list, setList] = useState();
@@ -11707,7 +11707,8 @@ function WaterfallList(_a) {
11707
11707
  hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag,
11708
11708
  'itemFilter.itemId': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemId,
11709
11709
  'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
11710
- defaultSize: hashTagSize
11710
+ defaultSize: hashTagSize,
11711
+ maxSize: hashTagSize
11711
11712
  }).then((res) => {
11712
11713
  var _a, _b;
11713
11714
  setData(res);
@@ -11753,16 +11754,12 @@ function WaterfallList(_a) {
11753
11754
  return (React.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, reportTagsView: reportTagsView }, props)));
11754
11755
  })),
11755
11756
  React.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading..."),
11756
- React.createElement("div", {
11757
- // hidden={!data?.tag?.link}
11758
- style: {
11759
- height: ((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link) ? ((_h = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _h === void 0 ? void 0 : _h.height) || ((_j = props === null || props === void 0 ? void 0 : props.buttonStyle) === null || _j === void 0 ? void 0 : _j.height) || '100px' : 0
11757
+ React.createElement("div", { hidden: !((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link), style: {
11758
+ height: ((_h = data === null || data === void 0 ? void 0 : data.tag) === null || _h === void 0 ? void 0 : _h.link) ? ((_j = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _j === void 0 ? void 0 : _j.height) || ((_k = props === null || props === void 0 ? void 0 : props.buttonStyle) === null || _k === void 0 ? void 0 : _k.height) || '100px' : 0
11760
11759
  } })),
11761
- React.createElement("div", { className: 'list-bottom', style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
11762
- React.createElement("div", {
11763
- // hidden={!data?.tag?.link}
11764
- className: 'list-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
11765
- React.createElement("button", { className: 'list-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_k = data === null || data === void 0 ? void 0 : data.tag) === null || _k === void 0 ? void 0 : _k.linkTitle) || 'Shop the collection'))))));
11760
+ React.createElement("div", { className: 'list-bottom', hidden: !((_l = data === null || data === void 0 ? void 0 : data.tag) === null || _l === void 0 ? void 0 : _l.link), style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
11761
+ React.createElement("div", { hidden: !((_m = data === null || data === void 0 ? void 0 : data.tag) === null || _m === void 0 ? void 0 : _m.link), className: 'list-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
11762
+ React.createElement("button", { className: 'list-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_o = data === null || data === void 0 ? void 0 : data.tag) === null || _o === void 0 ? void 0 : _o.linkTitle) || 'Shop the collection'))))));
11766
11763
  }
11767
11764
 
11768
11765
  var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAaZJREFUeF7t2jFKBEEQRuG3mSJeQTARURDMTL2EqXfwAnoKD6FHMDEzNVIw2tzQC2gFggyDrExX1V92T7wz9PumFnqbXdH5teq8nwEwJqBzgfEVKDYAW8Ae8NZq3ZUm4Aa4AnaBR+C8BUIVAIu/ngSfAs9LESoAWLgB/LzWwP7SeLtfHWAu3tZ9Adz/dwD3eOUJCIlXBQiLVwQIjVcDCI9XAkiJVwFIi1cASI3PBpjb3jbd5GyyUcraCUrEZ02ATHwGgFR8NIBcfCSAZHwUgGx8BIB0vDeAfLwnQIl4L4Ay8R4ApeJbA2wD78DOZA/e7ABzk739Xz/T8rfAIfA6WYCd3BqA7NUSwCKfgLNKCK0BjoC7rzP74yoIrQGsuxSCB0ApBC+AMgieACUQvAHkESIApBGiAGQRIgEkEaIB5BAyAKQQsgBkEDIBJBCyAdIRFABSEVQA0hCUAFIQ1ADCERQBQhFUAcIQlAFCENQBfkOwg9eXpeftFQDmEOzv8ifARy8A3wiXwAHwANwujbf7q0xAi9bZZwwAN9oiDx4TUORFuS2z+wn4BAiAaEHnKChjAAAAAElFTkSuQmCC";
@@ -12053,6 +12050,33 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12053
12050
  const [firstFrameSrc, setFirstFrameSrc] = useState('');
12054
12051
  const videoId = `pb-cache-video-${index}`;
12055
12052
  const videoEleRef = useRef(null);
12053
+ const blur = useMemo(() => {
12054
+ return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
12055
+ }, [videoPostConfig]);
12056
+ const translateY = useMemo(() => {
12057
+ var _a;
12058
+ return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2'
12059
+ ? `translateY(-${50 + ((_a = videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%) translate3d(0px, 0px, 0px)`
12060
+ : 'translateY(-50%)';
12061
+ }, [videoPostConfig]);
12062
+ const blurBgSrc = useMemo(() => {
12063
+ var _a;
12064
+ return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
12065
+ }, [firstFrameSrc, rec]);
12066
+ const blurStyle = useMemo(() => {
12067
+ return blur
12068
+ ? {
12069
+ filter: 'blur(10px)',
12070
+ transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
12071
+ }
12072
+ : {};
12073
+ }, [blur]);
12074
+ const isBgColor = useMemo(() => {
12075
+ return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgWay) === '1';
12076
+ }, [videoPostConfig]);
12077
+ const bgStyle = useMemo(() => {
12078
+ return isBgColor && (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor) ? { backgroundColor: videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor } : {};
12079
+ }, [videoPostConfig, isBgColor]);
12056
12080
  useEffect(() => {
12057
12081
  if (!videoRef)
12058
12082
  return;
@@ -12093,15 +12117,40 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12093
12117
  setIsFirstPlay(false);
12094
12118
  }
12095
12119
  }, [bffEventReport, data, index, isFirstPlay, videoRef]);
12120
+ const handLoadeddata = useCallback(() => {
12121
+ var _a;
12122
+ if (!videoRef || isBgColor || firstFrameSrc || !blur)
12123
+ return;
12124
+ const videoDomRef = document.getElementById('player-container-id_html5_api');
12125
+ if (((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || !canvasRef || !videoDomRef || !canvasRef.current)
12126
+ return;
12127
+ const setFrameImg = () => {
12128
+ videoDomRef.style.objectFit = 'contain';
12129
+ const video = videoDomRef;
12130
+ const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
12131
+ const ctx = canvas.getContext('2d');
12132
+ const targetWidth = window === null || window === void 0 ? void 0 : window.innerWidth;
12133
+ const targetHeight = window === null || window === void 0 ? void 0 : window.innerHeight;
12134
+ canvas.height = targetHeight;
12135
+ canvas.width = targetWidth;
12136
+ ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
12137
+ setFirstFrameSrc(canvas.toDataURL());
12138
+ };
12139
+ setFrameImg();
12140
+ setTimeout(() => {
12141
+ setFrameImg();
12142
+ }, 500);
12143
+ }, [videoRef, isBgColor, rec, firstFrameSrc, blur]);
12096
12144
  const handleLoadedmetadata = useCallback(() => {
12097
12145
  if (!videoRef)
12098
12146
  return;
12099
- if (activeIndex !== index) {
12100
- videoRef === null || videoRef === void 0 ? void 0 : videoRef.play();
12101
- videoRef === null || videoRef === void 0 ? void 0 : videoRef.pause();
12102
- }
12147
+ handLoadeddata();
12148
+ // if (activeIndex !== index) {
12149
+ // videoRef?.play();
12150
+ // videoRef?.pause();
12151
+ // }
12103
12152
  setIsLoadFinish(true);
12104
- }, [activeIndex, index, videoRef]);
12153
+ }, [videoRef, handLoadeddata]);
12105
12154
  const handleCanplay = useCallback(() => {
12106
12155
  setIsLoadFinish(true);
12107
12156
  }, []);
@@ -12162,57 +12211,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12162
12211
  }
12163
12212
  });
12164
12213
  }
12165
- }, [data, index, bffEventReport, videoRef]);
12166
- const blur = useMemo(() => {
12167
- return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
12168
- }, [videoPostConfig]);
12169
- const translateY = useMemo(() => {
12170
- var _a;
12171
- return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2'
12172
- ? `translateY(-${50 + ((_a = videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%) translate3d(0px, 0px, 0px)`
12173
- : 'translateY(-50%)';
12174
- }, [videoPostConfig]);
12175
- const blurBgSrc = useMemo(() => {
12176
- var _a;
12177
- return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
12178
- }, [firstFrameSrc, rec]);
12179
- const blurStyle = useMemo(() => {
12180
- return blur
12181
- ? {
12182
- filter: 'blur(10px)',
12183
- transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
12184
- }
12185
- : {};
12186
- }, [blur]);
12187
- const isBgColor = useMemo(() => {
12188
- return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgWay) === '1';
12189
- }, [videoPostConfig]);
12190
- const bgStyle = useMemo(() => {
12191
- return isBgColor && (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor) ? { backgroundColor: videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor } : {};
12192
- }, [videoPostConfig, isBgColor]);
12193
- const handLoadeddata = useCallback(() => {
12194
- var _a;
12195
- if (!videoRef || isBgColor)
12196
- return;
12197
- const videoDomRef = document.getElementById('player-container-id_html5_api');
12198
- if (((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || !canvasRef || !videoDomRef || !canvasRef.current)
12199
- return;
12200
- const setFrameImg = () => {
12201
- const video = videoDomRef;
12202
- const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
12203
- const ctx = canvas.getContext('2d');
12204
- const targetWidth = window === null || window === void 0 ? void 0 : window.innerWidth;
12205
- const targetHeight = window === null || window === void 0 ? void 0 : window.innerHeight;
12206
- canvas.height = targetHeight;
12207
- canvas.width = targetWidth;
12208
- ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
12209
- setFirstFrameSrc(canvas.toDataURL());
12210
- };
12211
- setFrameImg();
12212
- setTimeout(() => {
12213
- setFrameImg();
12214
- }, 500);
12215
- }, [videoRef, isBgColor, rec]);
12214
+ }, [data, index, bffEventReport, videoRef, activeIndex]);
12216
12215
  useEffect(() => {
12217
12216
  if (!isActive || !videoRef)
12218
12217
  return;
@@ -12226,6 +12225,7 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12226
12225
  if (!dom && !dom2)
12227
12226
  return;
12228
12227
  videoPlayerWrapperNode === null || videoPlayerWrapperNode === void 0 ? void 0 : videoPlayerWrapperNode.appendChild(dom || dom2);
12228
+ videoRef.poster('https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240218/fsTan2fgYKJWrCpJtGZPogm0NnvdT1708239153661.jpeg');
12229
12229
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
12230
12230
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadedmetadata', handleLoadedmetadata);
12231
12231
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadeddata', handLoadeddata);
@@ -12633,47 +12633,11 @@ const Nudge = ({ nudge }) => {
12633
12633
  React.createElement("p", { style: Object.assign({}, nudge === null || nudge === void 0 ? void 0 : nudge.textStyle) }, (_g = nudge === null || nudge === void 0 ? void 0 : nudge.content) !== null && _g !== void 0 ? _g : '')))));
12634
12634
  };
12635
12635
 
12636
- const DEFAULT_TAG = 'FOR U';
12637
- const Tagbar = ({ tagList = [], setActiveIndex }) => {
12638
- const [selectTag, setSelectTag] = useState(DEFAULT_TAG);
12639
- const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef } = useSxpDataSource();
12640
- const realTagList = useMemo(() => {
12641
- return [DEFAULT_TAG, ...tagList];
12642
- }, [tagList]);
12643
- const handleSelectTag = (tag) => () => {
12644
- if (tag === selectTag)
12645
- return;
12646
- let hashTag;
12647
- if (tag !== DEFAULT_TAG) {
12648
- hashTag = tag;
12649
- }
12650
- setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
12651
- getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({ hashTag }).then((res) => {
12652
- var _a, _b, _c, _d;
12653
- setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []);
12654
- setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList((_b = res === null || res === void 0 ? void 0 : res.recList) !== null && _b !== void 0 ? _b : []);
12655
- setActiveIndex === null || setActiveIndex === void 0 ? void 0 : setActiveIndex(0);
12656
- setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(0);
12657
- (_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slideTo(0);
12658
- }).finally(() => {
12659
- setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
12660
- });
12661
- setSelectTag(tag);
12662
- };
12663
- if (tagList.length <= 0)
12664
- return null;
12665
- return (React.createElement("div", { className: 'clc-sxp-tagbar' },
12666
- React.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
12667
- return (React.createElement("li", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, onClick: handleSelectTag(tag) }, tag));
12668
- }))));
12669
- };
12670
- var Tagbar$1 = memo(Tagbar);
12671
-
12672
12636
  /*
12673
12637
  * @Author: binruan@chatlabs.com
12674
12638
  * @Date: 2024-01-15 19:03:09
12675
12639
  * @LastEditors: binruan@chatlabs.com
12676
- * @LastEditTime: 2024-04-29 16:55:16
12640
+ * @LastEditTime: 2024-04-30 15:43:40
12677
12641
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12678
12642
  *
12679
12643
  */
@@ -13073,7 +13037,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13073
13037
  setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
13074
13038
  } })),
13075
13039
  renderLogo,
13076
- React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex }),
13077
13040
  isShowFingerTip ? React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon }) : null,
13078
13041
  React.createElement(Swiper, { ref: swiperRef, onSlideChange: () => {
13079
13042
  swiperRef.current.swiper.allowTouchMove = false;
@@ -13134,6 +13097,42 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
13134
13097
  React.createElement("div", { id: 'player-container-id-copy' }))));
13135
13098
  };
13136
13099
 
13100
+ const DEFAULT_TAG = 'FOR U';
13101
+ const Tagbar = ({ tagList = [], setActiveIndex }) => {
13102
+ const [selectTag, setSelectTag] = useState(DEFAULT_TAG);
13103
+ const { getRecommendVideos, setRtcList, setCacheRtcList, setCacheActiveIndex, setLoading, swiperRef } = useSxpDataSource();
13104
+ const realTagList = useMemo(() => {
13105
+ return [DEFAULT_TAG, ...tagList];
13106
+ }, [tagList]);
13107
+ const handleSelectTag = (tag) => () => {
13108
+ if (tag === selectTag)
13109
+ return;
13110
+ let hashTag;
13111
+ if (tag !== DEFAULT_TAG) {
13112
+ hashTag = tag;
13113
+ }
13114
+ setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
13115
+ getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({ hashTag }).then((res) => {
13116
+ var _a, _b, _c, _d;
13117
+ setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []);
13118
+ setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList((_b = res === null || res === void 0 ? void 0 : res.recList) !== null && _b !== void 0 ? _b : []);
13119
+ setActiveIndex === null || setActiveIndex === void 0 ? void 0 : setActiveIndex(0);
13120
+ setCacheActiveIndex === null || setCacheActiveIndex === void 0 ? void 0 : setCacheActiveIndex(0);
13121
+ (_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slideTo(0);
13122
+ }).finally(() => {
13123
+ setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
13124
+ });
13125
+ setSelectTag(tag);
13126
+ };
13127
+ if (tagList.length <= 0)
13128
+ return null;
13129
+ return (React.createElement("div", { className: 'clc-sxp-tagbar' },
13130
+ React.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
13131
+ return (React.createElement("li", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, onClick: handleSelectTag(tag) }, tag));
13132
+ }))));
13133
+ };
13134
+ var Tagbar$1 = memo(Tagbar);
13135
+
13137
13136
  const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
13138
13137
  return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: { clickable: true, bulletActiveClass: 'swipe-item-active-bullet' }, height: height, style: { width }, loop: true, autoplay: false }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url) => {
13139
13138
  return (React.createElement(SwiperSlide, { key: url },