pb-sxp-ui 1.0.36 → 1.0.38

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 (44) hide show
  1. package/dist/index.cjs +106 -447
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +1 -6
  4. package/dist/index.js +106 -446
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +3 -3
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +3 -3
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +110 -450
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +3 -3
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/SxpPageRender/VideoWidget/index.js +63 -58
  15. package/es/core/components/SxpPageRender/WaterFall/index.js +1 -1
  16. package/es/core/components/SxpPageRender/index.js +7 -7
  17. package/es/core/context/SxpDataSourceProvider.js +1 -1
  18. package/es/core/hooks/useEventReport.js +4 -4
  19. package/es/index.d.ts +0 -1
  20. package/es/index.js +0 -1
  21. package/es/materials/sxp/popup/CommodityDetail/index.js +6 -6
  22. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +9 -9
  23. package/lib/core/components/SxpPageRender/VideoWidget/index.js +63 -58
  24. package/lib/core/components/SxpPageRender/WaterFall/index.js +1 -1
  25. package/lib/core/components/SxpPageRender/index.js +7 -7
  26. package/lib/core/context/SxpDataSourceProvider.js +1 -1
  27. package/lib/core/hooks/useEventReport.js +4 -4
  28. package/lib/index.d.ts +0 -1
  29. package/lib/index.js +1 -3
  30. package/lib/materials/sxp/popup/CommodityDetail/index.js +6 -6
  31. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +9 -9
  32. package/package.json +1 -2
  33. package/es/core/components/DiyPortalPreview/PictureGroup.d.ts +0 -13
  34. package/es/core/components/DiyPortalPreview/PictureGroup.js +0 -11
  35. package/es/core/components/DiyPortalPreview/VideoWidget.d.ts +0 -15
  36. package/es/core/components/DiyPortalPreview/VideoWidget.js +0 -236
  37. package/es/core/components/DiyPortalPreview/index.d.ts +0 -6
  38. package/es/core/components/DiyPortalPreview/index.js +0 -112
  39. package/lib/core/components/DiyPortalPreview/PictureGroup.d.ts +0 -13
  40. package/lib/core/components/DiyPortalPreview/PictureGroup.js +0 -14
  41. package/lib/core/components/DiyPortalPreview/VideoWidget.d.ts +0 -15
  42. package/lib/core/components/DiyPortalPreview/VideoWidget.js +0 -239
  43. package/lib/core/components/DiyPortalPreview/index.d.ts +0 -6
  44. package/lib/core/components/DiyPortalPreview/index.js +0 -115
package/dist/index.js CHANGED
@@ -6,7 +6,6 @@ import qs from 'qs';
6
6
  import { css } from '@emotion/css';
7
7
  import { BetaSchemaForm } from '@ant-design/pro-components';
8
8
  import * as ReactDOM from 'react-dom';
9
- import Hls from 'hls.js';
10
9
  import EventEmitter from 'eventemitter3';
11
10
 
12
11
  /******************************************************************************
@@ -555,7 +554,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
555
554
  fromKName = 'imagePage';
556
555
  }
557
556
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
558
- eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
557
+ eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', relatedContentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', relatedProductId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
559
558
  });
560
559
  }, [bffEventReport, isFromHashtag]);
561
560
  useEffect(() => {
@@ -842,7 +841,7 @@ const EditorCore = forwardRef(({ children, resolver, isSsr, schema, enableDataSo
842
841
  React.createElement(DataSourceProvider$1, { isSsr: isSsr, enable: enableDataSource }, children)));
843
842
  });
844
843
 
845
- var index$2 = /*#__PURE__*/Object.freeze({
844
+ var index$1 = /*#__PURE__*/Object.freeze({
846
845
  __proto__: null,
847
846
  EditorCore: EditorCore
848
847
  });
@@ -8128,8 +8127,8 @@ function useEventReport() {
8128
8127
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
8129
8128
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
8130
8129
  position: position + '',
8131
- contentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
8132
- ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
8130
+ relatedContentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
8131
+ relatedCtatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
8133
8132
  traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
8134
8133
  }
8135
8134
  });
@@ -8153,8 +8152,8 @@ function useEventReport() {
8153
8152
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
8154
8153
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
8155
8154
  position: position + '',
8156
- contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
8157
- ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
8155
+ relatedContentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
8156
+ relatedCtatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
8158
8157
  traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
8159
8158
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
8160
8159
  eventSubject: 'productView',
@@ -8317,7 +8316,7 @@ const FormatImage = forwardRef((props, ref) => {
8317
8316
  var FormatImage$1 = memo(FormatImage);
8318
8317
 
8319
8318
  const CommodityDetail$1 = (_a) => {
8320
- var _b, _c, _d, _e, _f, _g, _h, _j, _k;
8319
+ var _b, _c, _d, _e, _f, _g, _h, _j;
8321
8320
  var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index"]);
8322
8321
  const { sxpParameter } = useSxpDataSource();
8323
8322
  const { popupDetailData, bffEventReport, isPreview, waterFallData } = useSxpDataSource();
@@ -8358,7 +8357,7 @@ const CommodityDetail$1 = (_a) => {
8358
8357
  return '$7,000';
8359
8358
  }
8360
8359
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8361
- const width = isPreview ? 375 : (_f = style === null || style === void 0 ? void 0 : style.width) !== null && _f !== void 0 ? _f : window.innerWidth;
8360
+ const width = isPreview ? 375 : window.innerWidth;
8362
8361
  const renderContent = ({ isPost }) => {
8363
8362
  var _a, _b, _c;
8364
8363
  return (React.createElement("div", null,
@@ -8378,7 +8377,7 @@ const CommodityDetail$1 = (_a) => {
8378
8377
  };
8379
8378
  return (React.createElement("div", { className: 'pb-commondity' },
8380
8379
  React.createElement("div", Object.assign({ className: css(Object.assign({}, style)) }, props),
8381
- product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8380
+ product && ((_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8382
8381
  clickable: true,
8383
8382
  bulletActiveClass: 'swipe-item-active-bullet',
8384
8383
  clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
@@ -8386,7 +8385,7 @@ const CommodityDetail$1 = (_a) => {
8386
8385
  : 'commondityDetail-swiper-clickable-center'
8387
8386
  }, loop: true, autoplay: {
8388
8387
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8389
- } }, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
8388
+ } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
8390
8389
  return (React.createElement(SwiperSlide, { key: src },
8391
8390
  React.createElement("div", { style: {
8392
8391
  overflow: 'hidden',
@@ -8395,7 +8394,7 @@ const CommodityDetail$1 = (_a) => {
8395
8394
  } },
8396
8395
  React.createElement(FormatImage$1, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
8397
8396
  }))),
8398
- !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
8397
+ !((_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.length) && (React.createElement("div", { className: css({
8399
8398
  position: 'relative',
8400
8399
  height: 0,
8401
8400
  width: '100%',
@@ -8408,7 +8407,7 @@ const CommodityDetail$1 = (_a) => {
8408
8407
  top: 0,
8409
8408
  objectFit: 'cover',
8410
8409
  width: '100%'
8411
- }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: '' }))),
8410
+ }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8412
8411
  React.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
8413
8412
  renderBtn(),
8414
8413
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) },
@@ -8768,7 +8767,7 @@ var settingRender$2 = [
8768
8767
  ];
8769
8768
 
8770
8769
  const CommodityDetailDiroNew$1 = (_a) => {
8771
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
8770
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
8772
8771
  var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index"]);
8773
8772
  useState(true);
8774
8773
  const { sxpParameter } = useSxpDataSource();
@@ -8816,7 +8815,7 @@ const CommodityDetailDiroNew$1 = (_a) => {
8816
8815
  return '£102,300.00';
8817
8816
  }
8818
8817
  }, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
8819
- const width = isPreview ? 375 : (_f = style === null || style === void 0 ? void 0 : style.width) !== null && _f !== void 0 ? _f : window.innerWidth;
8818
+ const width = isPreview ? 375 : window.innerWidth;
8820
8819
  const productInfoText = ({ isPost }) => {
8821
8820
  return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
8822
8821
  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) ||
@@ -8825,7 +8824,7 @@ Made in Italy` })));
8825
8824
  };
8826
8825
  return (React.createElement("div", { className: 'pb-commondityDiroNew' },
8827
8826
  React.createElement("div", Object.assign({ ref: scrollRef, className: css(Object.assign({}, style)) }, props),
8828
- product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8827
+ product && ((_f = product === null || product === void 0 ? void 0 : product.homePage) === null || _f === void 0 ? void 0 : _f.length) > 0 && (React.createElement(Swiper, { height: width, modules: [Pagination, Autoplay], pagination: {
8829
8828
  clickable: true,
8830
8829
  bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
8831
8830
  clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
@@ -8833,7 +8832,7 @@ Made in Italy` })));
8833
8832
  : 'commondityDiroNew-swiper-clickable-center'
8834
8833
  }, loop: true, autoplay: {
8835
8834
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
8836
- } }, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
8835
+ } }, (_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.map((src) => {
8837
8836
  return (React.createElement(SwiperSlide, { key: src },
8838
8837
  React.createElement("div", { style: {
8839
8838
  overflow: 'hidden',
@@ -8842,7 +8841,7 @@ Made in Italy` })));
8842
8841
  } },
8843
8842
  React.createElement(FormatImage$1, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
8844
8843
  }))),
8845
- !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
8844
+ !((_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.length) && (React.createElement("div", { className: css({
8846
8845
  position: 'relative',
8847
8846
  height: 0,
8848
8847
  width: '100%',
@@ -8855,16 +8854,16 @@ Made in Italy` })));
8855
8854
  top: 0,
8856
8855
  objectFit: 'cover',
8857
8856
  width: '100%'
8858
- }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: '' }))),
8857
+ }), src: (_j = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _j !== void 0 ? _j : bottom_image, alt: '' }))),
8859
8858
  React.createElement("div", { className: 'pb-commondityDiroNew-content' },
8860
8859
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
8861
8860
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
8862
- React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_l = product === null || product === void 0 ? void 0 : product.title) !== null && _l !== void 0 ? _l : 'Large Dior Toujours Bag'),
8861
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-top-left-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title }, (_k = product === null || product === void 0 ? void 0 : product.title) !== null && _k !== void 0 ? _k : 'Large Dior Toujours Bag'),
8863
8862
  React.createElement("div", { className: 'pb-commondityDiroNew-content-collection', hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.collection) || (product === null || product === void 0 ? void 0 : product.collection) === ''), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection }, (product === null || product === void 0 ? void 0 : product.collection) || 'Black Macrocannage Calfskin')),
8864
8863
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right' },
8865
8864
  React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price }, priceText),
8866
- React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo }, (_m = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _m !== void 0 ? _m : '税费'))),
8867
- (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_o = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _o !== void 0 ? _o : 'Shop now')),
8865
+ React.createElement("div", { className: 'pb-commondityDiroNew-content-top-right-price', hidden: !!product && !(product === null || product === void 0 ? void 0 : product.taxInfo), style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.taxInfo }, (_l = product === null || product === void 0 ? void 0 : product.taxInfo) !== null && _l !== void 0 ? _l : '税费'))),
8866
+ (!product || (product === null || product === void 0 ? void 0 : product.link)) && (React.createElement("button", { onClick: handleLink, className: 'pb-commondityDiroNew-btn', style: buttonStyle }, (_m = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _m !== void 0 ? _m : 'Shop now')),
8868
8867
  productInfoText({ isPost }))),
8869
8868
  React.createElement(Modal$1, { visible: showModal, onClose: () => setShowModal(false) }, productInfoText({ isPost: false }))));
8870
8869
  };
@@ -11772,7 +11771,7 @@ const WaterFall = (props) => {
11772
11771
  }
11773
11772
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
11774
11773
  eventInfo: {
11775
- contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11774
+ relatedContentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11776
11775
  position: cacheActiveIndex + '',
11777
11776
  contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
11778
11777
  traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
@@ -11905,14 +11904,14 @@ var _materials_ = /*#__PURE__*/Object.freeze({
11905
11904
  Prompt: Prompt
11906
11905
  });
11907
11906
 
11908
- const defaultUnLikeIconPath$1 = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
11909
- const defaultLikeIconPath$1 = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
11907
+ const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
11908
+ const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
11910
11909
  const LikeButton = (_a) => {
11911
11910
  var { active, activeIcon, unActicveIcon, recData, position } = _a, props = __rest(_a, ["active", "activeIcon", "unActicveIcon", "recData", "position"]);
11912
11911
  const { mutateLike, mutateUnlike, bffEventReport } = useSxpDataSource();
11913
11912
  const [state, setState] = useState(active);
11914
- const likeIcon = useIconLink(defaultLikeIconPath$1);
11915
- const unlikeIcon = useIconLink(defaultUnLikeIconPath$1);
11913
+ const likeIcon = useIconLink(defaultLikeIconPath);
11914
+ const unlikeIcon = useIconLink(defaultUnLikeIconPath);
11916
11915
  const handleClick = debounce(() => __awaiter(void 0, void 0, void 0, function* () {
11917
11916
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
11918
11917
  if (state) {
@@ -11968,7 +11967,7 @@ var SXP_EVENT_TYPE;
11968
11967
  SXP_EVENT_TYPE["PAGE_DID_HIDE"] = "pageDidHide";
11969
11968
  })(SXP_EVENT_TYPE || (SXP_EVENT_TYPE = {}));
11970
11969
 
11971
- const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPostConfig }) => {
11970
+ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostConfig }) => {
11972
11971
  const [isPauseVideo, setIsPauseVideo] = useState(false);
11973
11972
  const videoRef = useRef(null);
11974
11973
  const { bffEventReport, sxpParameter, waterFallData, openHashtag } = useSxpDataSource();
@@ -11978,12 +11977,13 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
11978
11977
  const { isActive } = useSwiperSlide();
11979
11978
  const canvasRef = useRef(null);
11980
11979
  const [firstFrameSrc, setFirstFrameSrc] = useState('');
11980
+ const videoId = `pb-video-${index}`;
11981
11981
  useEffect(() => {
11982
11982
  if (!videoRef.current)
11983
11983
  return;
11984
- videoRef.current.muted = muted;
11984
+ videoRef.current.muted(muted);
11985
11985
  }, [muted]);
11986
- const handleVideoStart = useCallback(() => {
11986
+ const handleEnded = useCallback(() => {
11987
11987
  var _a;
11988
11988
  (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
11989
11989
  }, []);
@@ -11992,10 +11992,10 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
11992
11992
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
11993
11993
  setIsPauseVideo(false);
11994
11994
  const item = data[index];
11995
- if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
11996
- videoStartTime.current = ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.currentTime) || 0;
11997
- const videoDuration = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.duration) !== null && _d !== void 0 ? _d : 0).toFixed(2);
11998
- const videoCurrentTime = ((_f = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime) !== null && _f !== void 0 ? _f : 0).toFixed(2);
11995
+ if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration())) {
11996
+ videoStartTime.current = ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.currentTime()) || 0;
11997
+ const videoDuration = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.duration()) !== null && _d !== void 0 ? _d : 0).toFixed(2);
11998
+ const videoCurrentTime = ((_f = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime()) !== null && _f !== void 0 ? _f : 0).toFixed(2);
11999
11999
  const playType = isFirstPlay ? '0' : '1';
12000
12000
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
12001
12001
  eventInfo: {
@@ -12015,14 +12015,14 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12015
12015
  setIsFirstPlay(false);
12016
12016
  }
12017
12017
  }, [bffEventReport, data, index, isFirstPlay]);
12018
- const handleLoadedMetadata = useCallback(() => {
12018
+ const handleCanplay = useCallback(() => {
12019
12019
  setIsLoadFinish(true);
12020
12020
  }, []);
12021
12021
  const handleClickVideo = useCallback((type) => () => {
12022
12022
  var _a, _b, _c, _d, _e;
12023
12023
  if (!isLoadFinish)
12024
12024
  return;
12025
- const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
12025
+ const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused();
12026
12026
  switch (type) {
12027
12027
  case 'start':
12028
12028
  if (!isPause)
@@ -12047,13 +12047,13 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12047
12047
  break;
12048
12048
  }
12049
12049
  }, [isLoadFinish]);
12050
- const onPause = useCallback(() => {
12050
+ const handlePause = useCallback(() => {
12051
12051
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
12052
12052
  const item = data[index];
12053
- const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
12054
- const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
12055
- if ((_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.duration) {
12056
- const playDuration = (((_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.currentTime) - videoStartTime.current).toFixed(2);
12053
+ const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration()) !== null && _b !== void 0 ? _b : 0).toFixed(2);
12054
+ const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime()) !== null && _d !== void 0 ? _d : 0).toFixed(2);
12055
+ if ((_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.duration()) {
12056
+ const playDuration = (((_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.currentTime()) - videoStartTime.current).toFixed(2);
12057
12057
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
12058
12058
  eventInfo: {
12059
12059
  eventSubject: 'playOverVideo',
@@ -12085,9 +12085,10 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12085
12085
  return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
12086
12086
  }, [firstFrameSrc, rec]);
12087
12087
  const handLoadeddata = useCallback(() => {
12088
- if (!canvasRef || !videoRef || !videoRef.current || !canvasRef.current)
12088
+ const videoDomRef = document.getElementById(`${videoId}_html5_api`);
12089
+ if (!canvasRef || !videoDomRef || !canvasRef.current)
12089
12090
  return;
12090
- const video = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current;
12091
+ const video = videoDomRef;
12091
12092
  const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
12092
12093
  const ctx = canvas.getContext('2d');
12093
12094
  const targetWidth = window === null || window === void 0 ? void 0 : window.innerWidth;
@@ -12098,47 +12099,43 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12098
12099
  setFirstFrameSrc(canvas.toDataURL());
12099
12100
  }, []);
12100
12101
  useEffect(() => {
12101
- var _a, _b, _c, _d;
12102
- if (!videoRef.current)
12103
- return;
12102
+ var _a, _b, _c, _d, _e, _f;
12104
12103
  setIsPauseVideo(false);
12105
- if (!videoRef.current.src) {
12106
- const videoSrc = rec.video.url;
12107
- if (videoSrc.includes('.m3u8')) {
12108
- if (Hls.isSupported()) {
12109
- const hls = new Hls();
12110
- hls.loadSource(videoSrc);
12111
- hls.attachMedia(videoRef.current);
12112
- hls.on(Hls.Events.MANIFEST_PARSED, function () {
12113
- var _a;
12114
- (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
12115
- });
12116
- }
12117
- else if (videoRef.current.canPlayType('application/vnd.apple.mpegurl')) {
12118
- videoRef.current.src = videoSrc;
12119
- }
12120
- else {
12121
- videoRef.current.src = videoSrc;
12122
- }
12123
- }
12124
- else {
12125
- videoRef.current.src = videoSrc;
12126
- }
12127
- videoRef.current.setAttribute('x5-playsinline', 'true');
12128
- videoRef.current.setAttribute('webkit-playsinline', 'true');
12104
+ const videoSrc = rec.video.url;
12105
+ if (videoSrc && typeof TCPlayer === 'function') {
12106
+ videoRef.current = TCPlayer(videoId, {
12107
+ sources: [
12108
+ {
12109
+ src: videoSrc // 播放地址
12110
+ }
12111
+ ],
12112
+ licenseUrl: 'https://license.vod2.myqcloud.com/license/v2/1325816236_1/v_cube.license', // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
12113
+ controls: false,
12114
+ autoplay: false,
12115
+ loop: false,
12116
+ muted: true,
12117
+ preload: 'auto',
12118
+ posterImage: false,
12119
+ bigPlayButton: true
12120
+ });
12129
12121
  }
12130
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('loadedmetadata', handleLoadedMetadata);
12131
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('canplay', handleLoadedMetadata);
12132
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('playing', handlePlaying);
12133
- (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.addEventListener('loadeddata', handLoadeddata);
12122
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.on('loadedmetadata', handleCanplay);
12123
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.on('canplay', handleCanplay);
12124
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.on('playing', handlePlaying);
12125
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.on('loadeddata', handLoadeddata);
12126
+ (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.on('pause', handlePause);
12127
+ (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.on('ended', handleEnded);
12134
12128
  return () => {
12135
- var _a, _b, _c, _d;
12136
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('loadedmetadata', handleLoadedMetadata);
12137
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('canplay', handleLoadedMetadata);
12138
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('playing', handlePlaying);
12139
- (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
12129
+ var _a, _b, _c, _d, _e, _f;
12130
+ (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.off('loadedmetadata', handleCanplay);
12131
+ (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.off('canplay', handleCanplay);
12132
+ (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.off('playing', handlePlaying);
12133
+ (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.off('loadeddata', handLoadeddata);
12134
+ (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.off('pause', handlePause);
12135
+ (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.off('ended', handleEnded);
12136
+ videoRef.current.dispose();
12140
12137
  };
12141
- }, [handleLoadedMetadata, handlePlaying, rec.video, handLoadeddata]);
12138
+ }, []);
12142
12139
  useEffect(() => {
12143
12140
  var _a;
12144
12141
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
@@ -12224,23 +12221,31 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
12224
12221
  right: 0
12225
12222
  } },
12226
12223
  React.createElement("div", { style: { position: 'relative', width: '100%', height: '100%' } },
12227
- React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart, style: {
12224
+ React.createElement("video", { id: `pb-video-${index}`, playsInline: true, crossOrigin: 'anonymous', style: {
12228
12225
  width: '100%',
12229
12226
  height: '100%',
12230
- objectFit: 'contain'
12227
+ objectFit: 'contain',
12228
+ backgroundColor: 'transparent',
12229
+ pointerEvents: 'none'
12231
12230
  } }),
12232
12231
  React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
12233
- renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
12232
+ renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, style: {
12234
12233
  position: 'relative',
12235
12234
  width: '100%',
12236
12235
  height,
12237
12236
  overflow: 'hidden'
12238
- } },
12239
- React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart }),
12237
+ }, onClick: handleClickVideo() },
12238
+ React.createElement("video", { id: `pb-video-${index}`, playsInline: true, crossOrigin: 'anonymous', style: {
12239
+ backgroundColor: 'transparent',
12240
+ width: '100%',
12241
+ height: '100%',
12242
+ objectFit: 'cover',
12243
+ pointerEvents: 'none'
12244
+ } }),
12240
12245
  renderPoster,
12241
12246
  React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
12242
12247
  };
12243
- var VideoWidget$3 = memo(VideoWidget$2);
12248
+ var VideoWidget$1 = memo(VideoWidget);
12244
12249
 
12245
12250
  /*
12246
12251
  * @Author: binruan@chatlabs.com
@@ -12339,7 +12344,7 @@ const Picture = (props) => {
12339
12344
  * @LastEditTime: 2024-04-18 19:56:22
12340
12345
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
12341
12346
  */
12342
- const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
12347
+ const PictureGroup = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
12343
12348
  var _a;
12344
12349
  const ref = useRef();
12345
12350
  const { isActive } = useSwiperSlide();
@@ -12368,7 +12373,7 @@ const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageE
12368
12373
  React.createElement(Picture, { src: url, height: height, imgUrlsPostConfig: imgUrlsPostConfig })));
12369
12374
  })));
12370
12375
  };
12371
- var PictureGroup$3 = memo(PictureGroup$2);
12376
+ var PictureGroup$1 = memo(PictureGroup);
12372
12377
 
12373
12378
  /*
12374
12379
  * @Author: binruan@chatlabs.com
@@ -12547,7 +12552,7 @@ const Nudge = ({ nudge }) => {
12547
12552
  * @Author: binruan@chatlabs.com
12548
12553
  * @Date: 2024-01-15 19:03:09
12549
12554
  * @LastEditors: binruan@chatlabs.com
12550
- * @LastEditTime: 2024-04-23 15:48:32
12555
+ * @LastEditTime: 2024-04-18 19:27:03
12551
12556
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12552
12557
  *
12553
12558
  */
@@ -12629,8 +12634,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12629
12634
  // sessionDuration: Math.floor(((new Date() as any) - curTime) / 1000) + '',
12630
12635
  // eventSubject: 'sessionCompleted',
12631
12636
  // eventDescription: 'Session completed',
12632
- // contentId: item?.video?.itemId,
12633
- // productId: item?.product?.itemId,
12637
+ // relatedContentId: item?.video?.itemId,
12638
+ // relatedProductId: item?.product?.itemId,
12634
12639
  // position: item?.position
12635
12640
  // }
12636
12641
  // });
@@ -12674,12 +12679,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12674
12679
  sessionDuration: Math.floor((new Date() - curTime.current) / 1000) + '',
12675
12680
  eventSubject: 'sessionCompleted',
12676
12681
  eventDescription: 'Session completed',
12677
- contentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
12678
- productId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
12682
+ relatedContentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
12683
+ relatedProductId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
12679
12684
  position: activeIndex + '',
12680
12685
  fromKName,
12681
12686
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
12682
- ctatId: (_q = (_p = (_o = item.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : ''
12687
+ relatedCtatId: (_q = (_p = (_o = item.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : ''
12683
12688
  }
12684
12689
  });
12685
12690
  }
@@ -12708,10 +12713,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12708
12713
  const renderContent = useCallback((rec, index) => {
12709
12714
  var _a, _b, _c, _d;
12710
12715
  if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
12711
- return (React.createElement(VideoWidget$3, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost }));
12716
+ return (React.createElement(VideoWidget$1, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost }));
12712
12717
  }
12713
12718
  if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
12714
- return (React.createElement(PictureGroup$3, { key: rec.video.itemId, imgUrls: 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 }));
12719
+ return (React.createElement(PictureGroup$1, { key: rec.video.itemId, imgUrls: 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 }));
12715
12720
  }
12716
12721
  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) {
12717
12722
  return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, idx) => {
@@ -12813,8 +12818,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12813
12818
  eventInfo: {
12814
12819
  eventSubject: 'scrollDown',
12815
12820
  eventDescription: 'User scroll down',
12816
- contentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
12817
- productId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12821
+ relatedContentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
12822
+ relatedProductId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12818
12823
  requestId: null
12819
12824
  }
12820
12825
  });
@@ -12826,8 +12831,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12826
12831
  eventInfo: {
12827
12832
  eventSubject: 'scrollUp',
12828
12833
  eventDescription: 'User scroll up',
12829
- contentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12830
- productId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
12834
+ relatedContentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12835
+ relatedProductId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
12831
12836
  requestId: null
12832
12837
  }
12833
12838
  });
@@ -12950,351 +12955,6 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12950
12955
  React.createElement(WaterFall$1, Object.assign({}, (_g = (_f = (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.item) === null || _g === void 0 ? void 0 : _g.props))));
12951
12956
  };
12952
12957
 
12953
- const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
12954
- 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) => {
12955
- return (React.createElement(SwiperSlide, { key: url },
12956
- React.createElement(Picture, { src: url, height: height, imgUrlsPostConfig: imgUrlsPostConfig })));
12957
- })));
12958
- };
12959
- var PictureGroup$1 = memo(PictureGroup);
12960
-
12961
- const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostConfig, width }) => {
12962
- const [isPauseVideo, setIsPauseVideo] = useState(false);
12963
- const videoRef = useRef(null);
12964
- const { bffEventReport, sxpParameter, waterFallData, openHashtag } = useSxpDataSource();
12965
- const videoStartTime = useRef(0);
12966
- const [isLoadFinish, setIsLoadFinish] = useState(false);
12967
- const [isFirstPlay, setIsFirstPlay] = useState(true);
12968
- const canvasRef = useRef(null);
12969
- const [firstFrameSrc, setFirstFrameSrc] = useState('');
12970
- useEffect(() => {
12971
- if (!videoRef.current)
12972
- return;
12973
- videoRef.current.muted = muted;
12974
- }, [muted]);
12975
- const handleVideoStart = useCallback(() => {
12976
- var _a;
12977
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
12978
- }, []);
12979
- const PAUSE_ICON = useIconLink('/pb_static/06f28a2025c74c1cb49be6767316d827.png');
12980
- const handlePlaying = useCallback(() => {
12981
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
12982
- setIsPauseVideo(false);
12983
- const item = data[index];
12984
- if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
12985
- videoStartTime.current = ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.currentTime) || 0;
12986
- const videoDuration = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.duration) !== null && _d !== void 0 ? _d : 0).toFixed(2);
12987
- const videoCurrentTime = ((_f = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime) !== null && _f !== void 0 ? _f : 0).toFixed(2);
12988
- const playType = isFirstPlay ? '0' : '1';
12989
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
12990
- eventInfo: {
12991
- eventSubject: 'playVideo',
12992
- eventDescription: 'User played the video',
12993
- contentId: (_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
12994
- contentName: (_k = (_j = item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
12995
- playType,
12996
- startTime: videoCurrentTime,
12997
- videoDuration,
12998
- contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
12999
- position: index + '',
13000
- contentFormat: 'video',
13001
- traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13002
- }
13003
- });
13004
- setIsFirstPlay(false);
13005
- }
13006
- }, [bffEventReport, data, index, isFirstPlay]);
13007
- const handleLoadedMetadata = useCallback(() => {
13008
- setIsLoadFinish(true);
13009
- }, []);
13010
- const handleClickVideo = useCallback((type) => () => {
13011
- var _a, _b, _c, _d, _e;
13012
- if (!isLoadFinish)
13013
- return;
13014
- const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
13015
- switch (type) {
13016
- case 'start':
13017
- if (!isPause)
13018
- return;
13019
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.play();
13020
- setIsPauseVideo(false);
13021
- break;
13022
- case 'pause':
13023
- if (isPause)
13024
- return;
13025
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.pause();
13026
- setIsPauseVideo(true);
13027
- break;
13028
- default:
13029
- if (isPause) {
13030
- (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.play();
13031
- }
13032
- else {
13033
- (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.pause();
13034
- }
13035
- setIsPauseVideo(!isPause);
13036
- break;
13037
- }
13038
- }, [isLoadFinish]);
13039
- const onPause = useCallback(() => {
13040
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
13041
- const item = data[index];
13042
- const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
13043
- const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
13044
- if ((_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.duration) {
13045
- const playDuration = (((_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.currentTime) - videoStartTime.current).toFixed(2);
13046
- bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
13047
- eventInfo: {
13048
- eventSubject: 'playOverVideo',
13049
- eventDescription: 'User finished playing the video',
13050
- contentId: (_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13051
- contentName: (_k = (_j = item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13052
- endTime: videoCurrentTime,
13053
- videoDuration,
13054
- playDuration,
13055
- contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13056
- position: index + '',
13057
- contentFormat: 'video',
13058
- traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13059
- }
13060
- });
13061
- }
13062
- }, [data, index, bffEventReport]);
13063
- const blur = useMemo(() => {
13064
- return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2';
13065
- }, [videoPostConfig]);
13066
- const translateY = useMemo(() => {
13067
- var _a;
13068
- return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.mode) === '2'
13069
- ? `translateY(-${50 + ((_a = videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.offsetTop) !== null && _a !== void 0 ? _a : 0)}%) translate3d(0px, 0px, 0px)`
13070
- : 'translateY(-50%)';
13071
- }, [videoPostConfig]);
13072
- const blurBgSrc = useMemo(() => {
13073
- var _a;
13074
- return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
13075
- }, [firstFrameSrc, rec]);
13076
- const handLoadeddata = useCallback(() => {
13077
- if (!canvasRef || !videoRef || !videoRef.current || !canvasRef.current)
13078
- return;
13079
- const video = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current;
13080
- const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
13081
- const ctx = canvas.getContext('2d');
13082
- const targetWidth = window === null || window === void 0 ? void 0 : window.innerWidth;
13083
- const targetHeight = window === null || window === void 0 ? void 0 : window.innerHeight;
13084
- canvas.height = targetHeight;
13085
- canvas.width = targetWidth;
13086
- ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
13087
- setFirstFrameSrc(canvas.toDataURL());
13088
- }, []);
13089
- useEffect(() => {
13090
- var _a, _b, _c, _d;
13091
- if (!videoRef.current)
13092
- return;
13093
- setIsPauseVideo(false);
13094
- if (!videoRef.current.src) {
13095
- const videoSrc = rec.video.url;
13096
- if (videoSrc.includes('.m3u8')) {
13097
- if (Hls.isSupported()) {
13098
- const hls = new Hls();
13099
- hls.loadSource(videoSrc);
13100
- hls.attachMedia(videoRef.current);
13101
- }
13102
- else if (videoRef.current.canPlayType('application/vnd.apple.mpegurl')) {
13103
- videoRef.current.src = videoSrc;
13104
- }
13105
- else {
13106
- videoRef.current.src = videoSrc;
13107
- }
13108
- }
13109
- else {
13110
- videoRef.current.src = videoSrc;
13111
- }
13112
- videoRef.current.setAttribute('x5-playsinline', 'true');
13113
- videoRef.current.setAttribute('webkit-playsinline', 'true');
13114
- }
13115
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('loadedmetadata', handleLoadedMetadata);
13116
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('canplay', handleLoadedMetadata);
13117
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('playing', handlePlaying);
13118
- (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.addEventListener('loadeddata', handLoadeddata);
13119
- return () => {
13120
- var _a, _b, _c, _d;
13121
- (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('loadedmetadata', handleLoadedMetadata);
13122
- (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('canplay', handleLoadedMetadata);
13123
- (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('playing', handlePlaying);
13124
- (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
13125
- };
13126
- }, [handleLoadedMetadata, handlePlaying, rec.video, handLoadeddata]);
13127
- const renderPoster = useMemo(() => {
13128
- if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
13129
- return null;
13130
- }
13131
- return (React.createElement("img", { style: { position: 'absolute', left: 0, top: 0, width: '100%', height: '100%', objectFit: 'cover' }, src: sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image }));
13132
- }, [isLoadFinish, sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image]);
13133
- useEffect(() => {
13134
- const handleBeforeUnload = () => {
13135
- var _a, _b;
13136
- if (activeIndex === index && ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) && ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.src) && !isPauseVideo) {
13137
- handleClickVideo('pause')();
13138
- }
13139
- };
13140
- window.addEventListener('beforeunload', handleBeforeUnload);
13141
- return () => {
13142
- window.removeEventListener('beforeunload', handleBeforeUnload);
13143
- };
13144
- }, [activeIndex, index, rec, videoRef, handleClickVideo, isPauseVideo]);
13145
- const blurStyle = useMemo(() => {
13146
- return blur
13147
- ? {
13148
- filter: 'blur(10px)',
13149
- transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
13150
- }
13151
- : {};
13152
- }, [blur]);
13153
- if (!rec.video) {
13154
- return null;
13155
- }
13156
- return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
13157
- position: 'relative',
13158
- width,
13159
- height,
13160
- overflow: 'hidden'
13161
- } },
13162
- React.createElement(FormatImage$1, { src: blurBgSrc, style: Object.assign({ height,
13163
- width, objectFit: 'cover' }, blurStyle) }),
13164
- React.createElement("canvas", { ref: canvasRef, style: { display: 'none' } }),
13165
- React.createElement("div", { style: {
13166
- position: 'absolute',
13167
- width,
13168
- height,
13169
- top: '50%',
13170
- transform: translateY,
13171
- left: 0,
13172
- right: 0
13173
- } },
13174
- React.createElement("div", { style: { position: 'relative', width, height: '100%' } },
13175
- React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart, style: {
13176
- width: '100%',
13177
- height,
13178
- objectFit: 'contain'
13179
- } }),
13180
- React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
13181
- renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
13182
- position: 'relative',
13183
- width,
13184
- height,
13185
- overflow: 'hidden'
13186
- } },
13187
- React.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart }),
13188
- renderPoster,
13189
- React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
13190
- };
13191
- var VideoWidget$1 = memo(VideoWidget);
13192
-
13193
- const RESOLVER$1 = {};
13194
- Object.values(_materials_).forEach((v) => {
13195
- RESOLVER$1[v.extend.type] = v;
13196
- });
13197
- const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
13198
- const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
13199
- const DiyPortalPreview = ({ data, globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain }) => {
13200
- const height = useMemo(() => {
13201
- return (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo) ? containerHeight - 45 : containerHeight;
13202
- }, [globalConfig, containerHeight]);
13203
- const renderContent = (rec, index) => {
13204
- var _a, _b, _c, _d;
13205
- if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
13206
- return (React.createElement(VideoWidget$1, { rec: rec, index: index, muted: true, width: containerWidth, data: data !== null && data !== void 0 ? data : [], height: height, activeIndex: index, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost }));
13207
- }
13208
- if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
13209
- return (React.createElement(PictureGroup$1, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
13210
- }
13211
- if (rec.product) {
13212
- 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) {
13213
- return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, idx) => {
13214
- var _a, _b, _c, _d, _e, _f, _g, _h;
13215
- const t = RESOLVER$1[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
13216
- const Component = withBindDataSource(t);
13217
- const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
13218
- return (React.createElement(Component, Object.assign({ key: `${index}${idx}`, textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.textStyle), bindDatas: (_e = (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.bindDatas) !== null && _e !== void 0 ? _e : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.props, { event: ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.event) || {},
13219
- // schema={schema}
13220
- id: value === null || value === void 0 ? void 0 : value.id,
13221
- // viewTime={viewTime.current}
13222
- rec: rec, isPost: true, tipText: tipText, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.style), { width: containerWidth, height, overflow: 'auto' }), index: index })));
13223
- });
13224
- }
13225
- }
13226
- };
13227
- const renderLogo = useMemo(() => {
13228
- if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
13229
- return (React.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
13230
- React.createElement("img", { src: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl, alt: 'logo' })));
13231
- }
13232
- return null;
13233
- }, [globalConfig]);
13234
- const renderBottom = (rec, index) => {
13235
- var _a, _b, _c, _d, _e, _f, _g;
13236
- if (rec.video) {
13237
- return (React.createElement(React.Fragment, null,
13238
- ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13239
- React.createElement("div", { className: 'clc-sxp-bottom' },
13240
- React.createElement(Nudge, { nudge: nudge }),
13241
- React.createElement("div", { className: 'clc-sxp-bottom-card' },
13242
- React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER$1 })),
13243
- React.createElement("div", null,
13244
- React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) })),
13245
- React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
13246
- }
13247
- return null;
13248
- };
13249
- const likeIcon = useIconLink(defaultLikeIconPath, appDomain);
13250
- const unlikeIcon = useIconLink(defaultUnLikeIconPath, appDomain);
13251
- const renderLikeButton = (rec, index) => {
13252
- var _a, _b, _c, _d;
13253
- if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
13254
- return;
13255
- let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconY) !== null && _a !== void 0 ? _a : 400;
13256
- if (top < 40) {
13257
- top += 40;
13258
- }
13259
- if (rec.video) {
13260
- return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon) !== null && _b !== void 0 ? _b : likeIcon, unActicveIcon: (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon) !== null && _c !== void 0 ? _c : unlikeIcon, position: index, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
13261
- top,
13262
- right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0
13263
- } }));
13264
- }
13265
- return null;
13266
- };
13267
- const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png', appDomain);
13268
- const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png', appDomain);
13269
- const renderView = (rec, index) => {
13270
- var _a, _b, _c, _d;
13271
- return (React.createElement("div", { style: { position: 'relative' } },
13272
- renderLogo,
13273
- React.createElement(ToggleButton$1, { style: {
13274
- position: 'absolute',
13275
- right: (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _a !== void 0 ? _a : 0,
13276
- visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[index]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
13277
- bottom: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _d !== void 0 ? _d : 23,
13278
- zIndex: 999
13279
- }, defaultValue: true, 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 }),
13280
- renderContent(rec, index),
13281
- renderBottom(rec, index),
13282
- renderLikeButton(rec, index)));
13283
- };
13284
- return (React.createElement("div", { style: {
13285
- width: '100%',
13286
- height: containerHeight,
13287
- display: 'flex',
13288
- boxSizing: 'border-box',
13289
- gap: 16,
13290
- pointerEvents: 'none',
13291
- userSelect: 'none'
13292
- } }, data === null || data === void 0 ? void 0 : data.map((rec, index) => {
13293
- return renderView(rec, index);
13294
- })));
13295
- };
13296
- var index$1 = memo(DiyPortalPreview);
13297
-
13298
12958
  /*
13299
12959
  * @Author: binruan@chatlabs.com
13300
12960
  * @Date: 2023-10-31 10:56:01
@@ -13435,5 +13095,5 @@ function useEditorDataProvider() {
13435
13095
  * @FilePath: \pb-sxp-ui\src\index.ts
13436
13096
  */
13437
13097
 
13438
- export { index$1 as DiyPortalPreview, EditorDataProvider, Modal$1 as Modal, SxpDataSourceProvider$1 as SxpDataSourceProvider, index as SxpPageCore, SxpPageRender, index$2 as core, Pagebuilder as default, defaultSetting, _materials_ as materials, useEditorDataProvider };
13098
+ export { EditorDataProvider, Modal$1 as Modal, SxpDataSourceProvider$1 as SxpDataSourceProvider, index as SxpPageCore, SxpPageRender, index$1 as core, Pagebuilder as default, defaultSetting, _materials_ as materials, useEditorDataProvider };
13439
13099
  //# sourceMappingURL=index.js.map