pb-sxp-ui 1.5.4 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/index.cjs +85 -42
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +17 -1
  4. package/dist/index.js +85 -42
  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 +85 -42
  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/DiyPortalPreview/PictureGroup.js +5 -1
  15. package/es/core/components/SxpPageRender/Hashtag/index.js +1 -1
  16. package/es/core/components/SxpPageRender/Modal/index.js +8 -7
  17. package/es/core/components/SxpPageRender/Navbar.js +2 -1
  18. package/es/core/components/SxpPageRender/PictureGroup/index.js +2 -1
  19. package/es/core/components/SxpPageRender/Tagbar.js +2 -2
  20. package/es/core/components/SxpPageRender/WaterFall/index.js +5 -1
  21. package/es/core/components/SxpPageRender/index.d.ts +8 -0
  22. package/es/core/components/SxpPageRender/index.js +46 -18
  23. package/es/core/context/SxpDataSourceProvider.js +4 -1
  24. package/es/materials/sxp/popup/CommodityDetail/index.js +2 -1
  25. package/es/materials/sxp/popup/CommodityDetailDiro/index.js +5 -1
  26. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -1
  27. package/lib/core/components/DiyPortalPreview/PictureGroup.js +5 -1
  28. package/lib/core/components/SxpPageRender/Hashtag/index.js +1 -1
  29. package/lib/core/components/SxpPageRender/Modal/index.js +8 -7
  30. package/lib/core/components/SxpPageRender/Navbar.js +2 -1
  31. package/lib/core/components/SxpPageRender/PictureGroup/index.js +2 -1
  32. package/lib/core/components/SxpPageRender/Tagbar.js +2 -2
  33. package/lib/core/components/SxpPageRender/WaterFall/index.js +5 -1
  34. package/lib/core/components/SxpPageRender/index.d.ts +8 -0
  35. package/lib/core/components/SxpPageRender/index.js +46 -18
  36. package/lib/core/context/SxpDataSourceProvider.js +4 -1
  37. package/lib/materials/sxp/popup/CommodityDetail/index.js +2 -1
  38. package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +5 -1
  39. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -1
  40. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -874,18 +874,21 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
874
874
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
875
875
  const isProd = ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) || (((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProducts) && ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProducts) === null || _d === void 0 ? void 0 : _d.length) > 0);
876
876
  let fromKName = '';
877
+ let contentFormat = null;
877
878
  if (isFromHashtag) {
878
879
  fromKName = 'hashTagPage';
879
880
  }
880
881
  else if ((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.url) {
881
882
  fromKName = 'videoPage';
883
+ contentFormat = 'video';
882
884
  }
883
885
  else if ((_g = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.imgUrls) === null || _g === void 0 ? void 0 : _g.length) {
884
886
  fromKName = 'imagePage';
887
+ contentFormat = 'image';
885
888
  }
886
889
  const contentTags = (_p = (_m = (_h = product === null || product === void 0 ? void 0 : product.tags) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : (_q = rec === null || rec === void 0 ? void 0 : rec.product) === null || _q === void 0 ? void 0 : _q.tags;
887
890
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
888
- eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_10 = (_7 = (_2 = (_y = (_v = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _v !== void 0 ? _v : (_x = (_w = rec === null || rec === void 0 ? void 0 : rec.video) === null || _w === void 0 ? void 0 : _w.bindCta) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_1 = (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindProduct) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : (_6 = (_5 = (_4 = (_3 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _3 === void 0 ? void 0 : _3.bindProducts) === null || _4 === void 0 ? void 0 : _4[0]) === null || _5 === void 0 ? void 0 : _5.bindCta) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_9 = (_8 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : '', fromKName, fromKPage: (_11 = location === null || location === void 0 ? void 0 : location.href) !== null && _11 !== void 0 ? _11 : '' })
891
+ eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_10 = (_7 = (_2 = (_y = (_v = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _v !== void 0 ? _v : (_x = (_w = rec === null || rec === void 0 ? void 0 : rec.video) === null || _w === void 0 ? void 0 : _w.bindCta) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_1 = (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindProduct) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : (_6 = (_5 = (_4 = (_3 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _3 === void 0 ? void 0 : _3.bindProducts) === null || _4 === void 0 ? void 0 : _4[0]) === null || _5 === void 0 ? void 0 : _5.bindCta) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_9 = (_8 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : '', fromKName, fromKPage: (_11 = location === null || location === void 0 ? void 0 : location.href) !== null && _11 !== void 0 ? _11 : '', contentFormat })
889
892
  });
890
893
  }, [bffEventReport, isFromHashtag]);
891
894
  const h5EnterLink = React.useCallback(() => {
@@ -8931,13 +8934,13 @@ SwiperSlide.displayName = 'SwiperSlide';
8931
8934
  * @Author: binruan@chatlabs.com
8932
8935
  * @Date: 2023-11-02 18:34:34
8933
8936
  * @LastEditors: binruan@chatlabs.com
8934
- * @LastEditTime: 2024-09-25 15:31:09
8937
+ * @LastEditTime: 2024-10-11 18:18:41
8935
8938
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8936
8939
  *
8937
8940
  */
8938
8941
  const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8939
8942
  const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
8940
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
8943
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
8941
8944
  const touchRef = React.useRef(null);
8942
8945
  const fTouchRef = React.useRef(null);
8943
8946
  const touchMoveRef = React.useRef(null);
@@ -9050,9 +9053,9 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
9050
9053
  width: `calc(100% - ${((_r = (_q = (_p = (_o = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _o === void 0 ? void 0 : _o.props) === null || _p === void 0 ? void 0 : _p.popupBg) === null || _q === void 0 ? void 0 : _q.horizontalMargin) !== null && _r !== void 0 ? _r : 0) * 2}px)`,
9051
9054
  height: '100%'
9052
9055
  } },
9053
- React.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, style: Object.assign(Object.assign({ padding, animationDuration: ((_s = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _s !== void 0 ? _s : 0) / 1000 + 's' }, (isScrollFullScreen && {
9056
+ React.createElement("div", Object.assign({ className: `modal-container ${isOpen ? 'modal-popIn' : 'modal-popOut'}`, role: 'dialog', "aria-label": (_s = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _s === void 0 ? void 0 : _s.displayName, "aria-modal": true, style: Object.assign(Object.assign({ padding, animationDuration: ((_t = popup === null || popup === void 0 ? void 0 : popup.duration) !== null && _t !== void 0 ? _t : 0) / 1000 + 's' }, (isScrollFullScreen && {
9054
9057
  transform: `translateY(${modalTrans}px)`
9055
- })), { overflow: 'hidden', borderRadius: `${(_w = (_v = (_u = (_t = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _t === void 0 ? void 0 : _t.props) === null || _u === void 0 ? void 0 : _u.popupBg) === null || _v === void 0 ? void 0 : _v.borderRadius) !== null && _w !== void 0 ? _w : 0}px` }), onClick: (e) => {
9058
+ })), { overflow: 'hidden', borderRadius: `${(_x = (_w = (_v = (_u = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _u === void 0 ? void 0 : _u.props) === null || _v === void 0 ? void 0 : _v.popupBg) === null || _w === void 0 ? void 0 : _w.borderRadius) !== null && _x !== void 0 ? _x : 0}px`, zIndex: 9 }), onClick: (e) => {
9056
9059
  e.stopPropagation();
9057
9060
  e.preventDefault();
9058
9061
  } }, (isScrollFullScreen && {
@@ -9060,12 +9063,13 @@ const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema,
9060
9063
  onTouchStart: handleTouchStart,
9061
9064
  onTouchEnd: handleTouchEnd
9062
9065
  })),
9063
- React.createElement("div", { className: 'modal-icon-wrapper', onClick: onClose, style: { top: scrollTop } },
9064
- React.createElement("img", { src: (_x = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _x !== void 0 ? _x : closeIcon$1, alt: 'close', className: 'modal-icon' })),
9066
+ React.createElement("button", { className: 'modal-icon-wrapper', role: 'button', "aria-label": 'close button', onClick: onClose, style: { top: scrollTop } },
9067
+ React.createElement("img", { src: (_y = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _y !== void 0 ? _y : closeIcon$1, alt: 'close button', className: 'modal-icon' })),
9065
9068
  React.createElement("div", Object.assign({ ref: ref, style: {
9066
9069
  height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
9067
- overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
9068
- } }, (((_z = (_y = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _y === void 0 ? void 0 : _y.props) === null || _z === void 0 ? void 0 : _z.enableFixedCloseButton) && {
9070
+ overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden',
9071
+ zIndex: 1
9072
+ } }, (((_0 = (_z = getPopupById === null || getPopupById === void 0 ? void 0 : getPopupById.item) === null || _z === void 0 ? void 0 : _z.props) === null || _0 === void 0 ? void 0 : _0.enableFixedCloseButton) && {
9069
9073
  onScroll: (e) => {
9070
9074
  var _a;
9071
9075
  setScrollTop(15 - ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.scrollTop));
@@ -9444,7 +9448,8 @@ const CommodityDetail$1 = (_a) => {
9444
9448
  product && ((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
9445
9449
  clickable: true,
9446
9450
  bulletActiveClass: 'swipe-item-active-bullet',
9447
- clickableClass: getDotsAlign
9451
+ clickableClass: getDotsAlign,
9452
+ bulletElement: 'button'
9448
9453
  }, loop: true, autoplay: {
9449
9454
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9450
9455
  }, ref: ref, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': { bottom: (_x = swiper === null || swiper === void 0 ? void 0 : swiper.dotsMarginBottom) !== null && _x !== void 0 ? _x : 0, fontSize: '14px' } }, ((swiper === null || swiper === void 0 ? void 0 : swiper.dotsBgColor) && {
@@ -10351,7 +10356,8 @@ Made in Italy` })));
10351
10356
  product && ((_w = product === null || product === void 0 ? void 0 : product.homePage) === null || _w === void 0 ? void 0 : _w.length) > 0 && (React.createElement(Swiper, { height: height, modules: [Pagination, Autoplay], pagination: {
10352
10357
  clickable: true,
10353
10358
  bulletActiveClass: 'swipe-item-active-bullet',
10354
- clickableClass: getDotsAlign
10359
+ clickableClass: getDotsAlign,
10360
+ bulletElement: 'button'
10355
10361
  }, loop: true, autoplay: {
10356
10362
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
10357
10363
  }, ref: ref, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
@@ -12541,7 +12547,7 @@ var settingRender$3 = [
12541
12547
  * @Author: binruan@chatlabs.com
12542
12548
  * @Date: 2023-12-26 16:11:34
12543
12549
  * @LastEditors: binruan@chatlabs.com
12544
- * @LastEditTime: 2024-07-04 18:34:18
12550
+ * @LastEditTime: 2024-10-11 18:22:21
12545
12551
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Navbar.tsx
12546
12552
  *
12547
12553
  */
@@ -12549,7 +12555,8 @@ const Navbar = ({ icon, styles, textStyle, onClose }) => {
12549
12555
  var _a;
12550
12556
  const { waterFallData, setOpenHashtag } = useSxpDataSource();
12551
12557
  return (React.createElement("div", { className: 'clc-sxp-nav', style: styles },
12552
- React.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: 'back button', onClick: onClose }),
12558
+ React.createElement("button", { className: 'clc-sxp-nav-left', role: 'button', "aria-label": 'back button', onClick: onClose },
12559
+ React.createElement("img", { src: icon, alt: 'back button' })),
12553
12560
  React.createElement("div", { className: 'clc-sxp-nav-title', style: Object.assign(Object.assign({}, textStyle), { paddingLeft: (textStyle === null || textStyle === void 0 ? void 0 : textStyle.textAlign) === 'left' ? '35px' : 0 }), dangerouslySetInnerHTML: {
12554
12561
  __html: setFontForText(`#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`, textStyle)
12555
12562
  } })));
@@ -14406,7 +14413,7 @@ function WaterfallList(_a) {
14406
14413
  * @Author: binruan@chatlabs.com
14407
14414
  * @Date: 2024-01-10 10:58:24
14408
14415
  * @LastEditors: binruan@chatlabs.com
14409
- * @LastEditTime: 2024-08-23 14:32:55
14416
+ * @LastEditTime: 2024-10-11 13:43:22
14410
14417
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
14411
14418
  *
14412
14419
  */
@@ -14458,14 +14465,17 @@ const WaterFall = (props) => {
14458
14465
  if (!rec)
14459
14466
  return;
14460
14467
  let fromKName = '';
14468
+ let contentFormat = null;
14461
14469
  if (isFromHashtag) {
14462
14470
  fromKName = 'hashTagPage';
14463
14471
  }
14464
14472
  else if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
14465
14473
  fromKName = 'videoPage';
14474
+ contentFormat = 'video';
14466
14475
  }
14467
14476
  else if ((_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) === null || _c === void 0 ? void 0 : _c.length) {
14468
14477
  fromKName = 'imagePage';
14478
+ contentFormat = 'image';
14469
14479
  }
14470
14480
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
14471
14481
  eventInfo: {
@@ -14478,7 +14488,8 @@ const WaterFall = (props) => {
14478
14488
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
14479
14489
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
14480
14490
  eventSubject: 'clickTagsViewContents',
14481
- eventDescription: 'User click tags view contents'
14491
+ eventDescription: 'User click tags view contents',
14492
+ contentFormat
14482
14493
  }
14483
14494
  });
14484
14495
  }, [recData, bffEventReport, viewTime, isFromHashtag, cacheActiveIndex]);
@@ -15996,7 +16007,7 @@ const Picture = (props) => {
15996
16007
  * @Author: lewinlu@chatlabs.com
15997
16008
  * @Date: 2024-01-03 14:39:09
15998
16009
  * @LastEditors: binruan@chatlabs.com
15999
- * @LastEditTime: 2024-08-30 13:58:51
16010
+ * @LastEditTime: 2024-10-10 17:53:30
16000
16011
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
16001
16012
  */
16002
16013
  const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
@@ -16029,7 +16040,8 @@ const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageE
16029
16040
  // }
16030
16041
  return (React.createElement(Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
16031
16042
  clickable: true,
16032
- bulletActiveClass: 'swipe-item-active-bullet'
16043
+ bulletActiveClass: 'swipe-item-active-bullet',
16044
+ bulletElement: 'button'
16033
16045
  }, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
16034
16046
  bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
16035
16047
  fontSize: '14px'
@@ -16054,7 +16066,7 @@ var PictureGroup$3 = React.memo(PictureGroup$2);
16054
16066
  * @Author: binruan@chatlabs.com
16055
16067
  * @Date: 2024-01-15 19:03:09
16056
16068
  * @LastEditors: binruan@chatlabs.com
16057
- * @LastEditTime: 2024-07-25 18:14:29
16069
+ * @LastEditTime: 2024-10-11 18:37:55
16058
16070
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
16059
16071
  *
16060
16072
  */
@@ -16092,7 +16104,7 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
16092
16104
  return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
16093
16105
  }, [isShowMore, tags]);
16094
16106
  return (React.createElement("div", { className: 'clc-sxp-bottom-hashtag', style: { marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px` } },
16095
- React.createElement(Scroll$1, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (React.createElement(SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item) },
16107
+ React.createElement(Scroll$1, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (React.createElement(SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item), tag: 'button', "aria-label": item },
16096
16108
  React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
16097
16109
  };
16098
16110
  var Hashtag$1 = React.memo(Hashtag);
@@ -16241,7 +16253,7 @@ const Nudge = ({ nudge }) => {
16241
16253
  * @Author: binruan@chatlabs.com
16242
16254
  * @Date: 2024-04-29 16:32:21
16243
16255
  * @LastEditors: binruan@chatlabs.com
16244
- * @LastEditTime: 2024-06-28 18:03:50
16256
+ * @LastEditTime: 2024-10-11 18:59:43
16245
16257
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Tagbar.tsx
16246
16258
  *
16247
16259
  */
@@ -16287,8 +16299,8 @@ const Tagbar = ({ tagList = [], setActiveIndex, style }) => {
16287
16299
  if (waterFallData || tagList.length <= 0)
16288
16300
  return null;
16289
16301
  return (React.createElement("div", { className: 'clc-sxp-tagbar', style: style },
16290
- React.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
16291
- return (React.createElement("li", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, onClick: handleSelectTag(tag) }, tag));
16302
+ React.createElement("div", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
16303
+ return (React.createElement("button", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, "aria-label": tag, onClick: handleSelectTag(tag) }, tag));
16292
16304
  }))));
16293
16305
  };
16294
16306
  var Tagbar$1 = React.memo(Tagbar);
@@ -16297,12 +16309,12 @@ var Tagbar$1 = React.memo(Tagbar);
16297
16309
  * @Author: binruan@chatlabs.com
16298
16310
  * @Date: 2024-01-15 19:03:09
16299
16311
  * @LastEditors: binruan@chatlabs.com
16300
- * @LastEditTime: 2024-09-11 15:36:28
16312
+ * @LastEditTime: 2024-10-11 18:16:31
16301
16313
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
16302
16314
  *
16303
16315
  */
16304
16316
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
16305
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
16317
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
16306
16318
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
16307
16319
  const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
16308
16320
  const { schema } = useEditor();
@@ -16548,7 +16560,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16548
16560
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
16549
16561
  return (React.createElement(React.Fragment, null,
16550
16562
  ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
16551
- React.createElement("div", { className: 'clc-sxp-bottom', style: { paddingBottom: `${(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _b !== void 0 ? _b : 40}px` } },
16563
+ React.createElement("div", { className: 'clc-sxp-bottom', style: { marginBottom: `${(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _b !== void 0 ? _b : 40}px` } },
16552
16564
  React.createElement(Nudge, { nudge: nudge }),
16553
16565
  (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
16554
16566
  React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
@@ -16611,7 +16623,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16611
16623
  }
16612
16624
  };
16613
16625
  const handleSlideSkip = (item, position) => {
16614
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
16626
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
16615
16627
  if (isPreview || waterFallData)
16616
16628
  return;
16617
16629
  const t = new Date() - curTime.current;
@@ -16619,18 +16631,26 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16619
16631
  const link = ((_d = (_c = (_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.link) || ((_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.link) || ((_g = item === null || item === void 0 ? void 0 : item.product) === null || _g === void 0 ? void 0 : _g.link);
16620
16632
  const product = (item === null || item === void 0 ? void 0 : item.product) || ((_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct) || ((_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]);
16621
16633
  if (link) {
16634
+ let contentFormat = null;
16635
+ if ((_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.url) {
16636
+ contentFormat = 'video';
16637
+ }
16638
+ else if ((_o = (_m = item === null || item === void 0 ? void 0 : item.video) === null || _m === void 0 ? void 0 : _m.imgUrls) === null || _o === void 0 ? void 0 : _o.length) {
16639
+ contentFormat = 'image';
16640
+ }
16622
16641
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
16623
16642
  eventInfo: {
16624
16643
  eventSubject: 'swipeToWeb',
16625
16644
  eventDescription: 'User swiped to web',
16626
- productId: (_l = product === null || product === void 0 ? void 0 : product.itemId) !== null && _l !== void 0 ? _l : '',
16627
- productName: (_m = product === null || product === void 0 ? void 0 : product.title) !== null && _m !== void 0 ? _m : '',
16645
+ productId: (_p = product === null || product === void 0 ? void 0 : product.itemId) !== null && _p !== void 0 ? _p : '',
16646
+ productName: (_q = product === null || product === void 0 ? void 0 : product.title) !== null && _q !== void 0 ? _q : '',
16628
16647
  price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
16629
- productCollection: (_o = product === null || product === void 0 ? void 0 : product.collection) !== null && _o !== void 0 ? _o : '',
16648
+ productCollection: (_r = product === null || product === void 0 ? void 0 : product.collection) !== null && _r !== void 0 ? _r : '',
16630
16649
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
16631
16650
  position: position + '',
16632
- contentId: (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
16633
- traceInfo: (_u = (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : (_t = item === null || item === void 0 ? void 0 : item.product) === null || _t === void 0 ? void 0 : _t.traceInfo) !== null && _u !== void 0 ? _u : ''
16651
+ contentId: (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.itemId) !== null && _t !== void 0 ? _t : '',
16652
+ traceInfo: (_x = (_v = (_u = item === null || item === void 0 ? void 0 : item.video) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : (_w = item === null || item === void 0 ? void 0 : item.product) === null || _w === void 0 ? void 0 : _w.traceInfo) !== null && _x !== void 0 ? _x : '',
16653
+ contentFormat
16634
16654
  }
16635
16655
  });
16636
16656
  skipLinkRef.current = true;
@@ -16639,19 +16659,27 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16639
16659
  }
16640
16660
  };
16641
16661
  const handleScrollEvent = (swiper) => {
16642
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
16662
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
16643
16663
  const item = data[swiper.previousIndex];
16644
16664
  if (!item)
16645
16665
  return;
16666
+ let contentFormat = null;
16667
+ if ((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) {
16668
+ contentFormat = 'video';
16669
+ }
16670
+ else if ((_c = (_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls) === null || _c === void 0 ? void 0 : _c.length) {
16671
+ contentFormat = 'image';
16672
+ }
16646
16673
  if (swiper.previousIndex - swiper.activeIndex < 0) {
16647
16674
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
16648
16675
  eventInfo: {
16649
16676
  eventSubject: 'scrollDown',
16650
16677
  eventDescription: 'User scroll down',
16651
- contentId: (_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
16652
- productId: (_d = (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
16678
+ contentId: (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.itemId) !== null && _e !== void 0 ? _e : '',
16679
+ productId: (_g = (_f = item === null || item === void 0 ? void 0 : item.product) === null || _f === void 0 ? void 0 : _f.itemId) !== null && _g !== void 0 ? _g : '',
16653
16680
  requestId: null,
16654
- traceInfo: (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.traceInfo) !== null && _f !== void 0 ? _f : ''
16681
+ traceInfo: (_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.traceInfo) !== null && _j !== void 0 ? _j : '',
16682
+ contentFormat
16655
16683
  }
16656
16684
  });
16657
16685
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -16663,10 +16691,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16663
16691
  eventInfo: {
16664
16692
  eventSubject: 'scrollUp',
16665
16693
  eventDescription: 'User scroll up',
16666
- contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
16667
- productId: (_k = (_j = item.product) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '',
16694
+ contentId: (_l = (_k = item === null || item === void 0 ? void 0 : item.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '',
16695
+ productId: (_o = (_m = item.product) === null || _m === void 0 ? void 0 : _m.itemId) !== null && _o !== void 0 ? _o : '',
16668
16696
  requestId: null,
16669
- traceInfo: (_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : ''
16697
+ traceInfo: (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.traceInfo) !== null && _q !== void 0 ? _q : '',
16698
+ contentFormat
16670
16699
  }
16671
16700
  });
16672
16701
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -16675,7 +16704,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16675
16704
  // 商品浏览事件
16676
16705
  handleReportProductView(item);
16677
16706
  const curItem = data[swiper.activeIndex];
16678
- if (!((_o = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _o === void 0 ? void 0 : _o.url) && !((_p = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _p === void 0 ? void 0 : _p.imgUrls) && (curItem === null || curItem === void 0 ? void 0 : curItem.product)) {
16707
+ if (!((_r = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _r === void 0 ? void 0 : _r.url) && !((_s = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _s === void 0 ? void 0 : _s.imgUrls) && (curItem === null || curItem === void 0 ? void 0 : curItem.product)) {
16679
16708
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
16680
16709
  eventName: 'ProductView'
16681
16710
  });
@@ -16778,7 +16807,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16778
16807
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
16779
16808
  top: minusHeight
16780
16809
  } }),
16781
- isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _f !== void 0 ? _f : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
16810
+ ((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _f === void 0 ? void 0 : _f.enable) && (React.createElement("button", { style: {
16811
+ position: 'absolute',
16812
+ [(_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _g === void 0 ? void 0 : _g.xPosit) !== null && _h !== void 0 ? _h : 'left']: (_k = (_j = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _j === void 0 ? void 0 : _j.x) !== null && _k !== void 0 ? _k : 0,
16813
+ [(_m = (_l = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _l === void 0 ? void 0 : _l.yPosit) !== null && _m !== void 0 ? _m : 'top']: (_p = (_o = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _o === void 0 ? void 0 : _o.y) !== null && _p !== void 0 ? _p : 0,
16814
+ zIndex: 10,
16815
+ border: 'none',
16816
+ padding: 0,
16817
+ background: 'transparent'
16818
+ }, role: 'button', "aria-label": 'back button', onClick: () => history === null || history === void 0 ? void 0 : history.back() },
16819
+ React.createElement("img", { src: (_r = (_q = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _q === void 0 ? void 0 : _q.icon) !== null && _r !== void 0 ? _r : img, alt: 'back button', width: 50, style: { objectFit: 'cover' } }))),
16820
+ isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_s = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _s !== void 0 ? _s : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
16782
16821
  React.createElement(Swiper, { style: {
16783
16822
  marginTop: tagHeight
16784
16823
  }, ref: swiperRef, onSlideChange: () => {
@@ -16810,11 +16849,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
16810
16849
  renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
16811
16850
  renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
16812
16851
  renderView),
16813
- React.createElement(WaterFall$1, Object.assign({}, (_j = (_h = (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.item) === null || _j === void 0 ? void 0 : _j.props))));
16852
+ React.createElement(WaterFall$1, Object.assign({}, (_v = (_u = (_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _t === void 0 ? void 0 : _t[0]) === null || _u === void 0 ? void 0 : _u.item) === null || _v === void 0 ? void 0 : _v.props))));
16814
16853
  };
16815
16854
 
16816
16855
  const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
16817
- 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) => {
16856
+ return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
16857
+ clickable: true,
16858
+ bulletActiveClass: 'swipe-item-active-bullet',
16859
+ bulletElement: 'button'
16860
+ }, height: height, style: { width }, loop: true, autoplay: false }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url) => {
16818
16861
  return (React.createElement(SwiperSlide, { key: url },
16819
16862
  React.createElement(Picture, { src: url, height: height, imgUrlsPostConfig: imgUrlsPostConfig })));
16820
16863
  })));