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/pb-ui.js CHANGED
@@ -867,18 +867,21 @@
867
867
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
868
868
  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);
869
869
  let fromKName = '';
870
+ let contentFormat = null;
870
871
  if (isFromHashtag) {
871
872
  fromKName = 'hashTagPage';
872
873
  }
873
874
  else if ((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.url) {
874
875
  fromKName = 'videoPage';
876
+ contentFormat = 'video';
875
877
  }
876
878
  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) {
877
879
  fromKName = 'imagePage';
880
+ contentFormat = 'image';
878
881
  }
879
882
  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;
880
883
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
881
- 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 : '' })
884
+ 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 })
882
885
  });
883
886
  }, [bffEventReport, isFromHashtag]);
884
887
  const h5EnterLink = React.useCallback(() => {
@@ -8924,13 +8927,13 @@
8924
8927
  * @Author: binruan@chatlabs.com
8925
8928
  * @Date: 2023-11-02 18:34:34
8926
8929
  * @LastEditors: binruan@chatlabs.com
8927
- * @LastEditTime: 2024-09-25 15:31:09
8930
+ * @LastEditTime: 2024-10-11 18:18:41
8928
8931
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Modal\index.tsx
8929
8932
  *
8930
8933
  */
8931
8934
  const closeIcon$1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
8932
8935
  const Modal = ({ visible, onClose, children, modalStyle, padding, popup, schema, fullHeight = window.innerHeight, isFullScreen = false }) => {
8933
- 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;
8936
+ 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;
8934
8937
  const touchRef = React.useRef(null);
8935
8938
  const fTouchRef = React.useRef(null);
8936
8939
  const touchMoveRef = React.useRef(null);
@@ -9043,9 +9046,9 @@
9043
9046
  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)`,
9044
9047
  height: '100%'
9045
9048
  } },
9046
- 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 && {
9049
+ 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 && {
9047
9050
  transform: `translateY(${modalTrans}px)`
9048
- })), { 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) => {
9051
+ })), { 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) => {
9049
9052
  e.stopPropagation();
9050
9053
  e.preventDefault();
9051
9054
  } }, (isScrollFullScreen && {
@@ -9053,12 +9056,13 @@
9053
9056
  onTouchStart: handleTouchStart,
9054
9057
  onTouchEnd: handleTouchEnd
9055
9058
  })),
9056
- React.createElement("div", { className: 'modal-icon-wrapper', onClick: onClose, style: { top: scrollTop } },
9057
- 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' })),
9059
+ React.createElement("button", { className: 'modal-icon-wrapper', role: 'button', "aria-label": 'close button', onClick: onClose, style: { top: scrollTop } },
9060
+ 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' })),
9058
9061
  React.createElement("div", Object.assign({ ref: ref, style: {
9059
9062
  height: isScrollFullScreen ? fullHeight : MODAL_DEF_CON_H,
9060
- overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden'
9061
- } }, (((_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) && {
9063
+ overflow: (isScrollFullScreen && modalTrans <= 0) || !isScrollFullScreen ? 'auto' : 'hidden',
9064
+ zIndex: 1
9065
+ } }, (((_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) && {
9062
9066
  onScroll: (e) => {
9063
9067
  var _a;
9064
9068
  setScrollTop(15 - ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.scrollTop));
@@ -9437,7 +9441,8 @@
9437
9441
  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: {
9438
9442
  clickable: true,
9439
9443
  bulletActiveClass: 'swipe-item-active-bullet',
9440
- clickableClass: getDotsAlign
9444
+ clickableClass: getDotsAlign,
9445
+ bulletElement: 'button'
9441
9446
  }, loop: true, autoplay: {
9442
9447
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
9443
9448
  }, 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) && {
@@ -10344,7 +10349,8 @@ Made in Italy` })));
10344
10349
  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: {
10345
10350
  clickable: true,
10346
10351
  bulletActiveClass: 'swipe-item-active-bullet',
10347
- clickableClass: getDotsAlign
10352
+ clickableClass: getDotsAlign,
10353
+ bulletElement: 'button'
10348
10354
  }, loop: true, autoplay: {
10349
10355
  delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
10350
10356
  }, ref: ref, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
@@ -12534,7 +12540,7 @@ Made in Italy` })));
12534
12540
  * @Author: binruan@chatlabs.com
12535
12541
  * @Date: 2023-12-26 16:11:34
12536
12542
  * @LastEditors: binruan@chatlabs.com
12537
- * @LastEditTime: 2024-07-04 18:34:18
12543
+ * @LastEditTime: 2024-10-11 18:22:21
12538
12544
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Navbar.tsx
12539
12545
  *
12540
12546
  */
@@ -12542,7 +12548,8 @@ Made in Italy` })));
12542
12548
  var _a;
12543
12549
  const { waterFallData, setOpenHashtag } = useSxpDataSource();
12544
12550
  return (React.createElement("div", { className: 'clc-sxp-nav', style: styles },
12545
- React.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: 'back button', onClick: onClose }),
12551
+ React.createElement("button", { className: 'clc-sxp-nav-left', role: 'button', "aria-label": 'back button', onClick: onClose },
12552
+ React.createElement("img", { src: icon, alt: 'back button' })),
12546
12553
  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: {
12547
12554
  __html: setFontForText(`#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`, textStyle)
12548
12555
  } })));
@@ -14399,7 +14406,7 @@ Made in Italy` })));
14399
14406
  * @Author: binruan@chatlabs.com
14400
14407
  * @Date: 2024-01-10 10:58:24
14401
14408
  * @LastEditors: binruan@chatlabs.com
14402
- * @LastEditTime: 2024-08-23 14:32:55
14409
+ * @LastEditTime: 2024-10-11 13:43:22
14403
14410
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
14404
14411
  *
14405
14412
  */
@@ -14451,14 +14458,17 @@ Made in Italy` })));
14451
14458
  if (!rec)
14452
14459
  return;
14453
14460
  let fromKName = '';
14461
+ let contentFormat = null;
14454
14462
  if (isFromHashtag) {
14455
14463
  fromKName = 'hashTagPage';
14456
14464
  }
14457
14465
  else if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
14458
14466
  fromKName = 'videoPage';
14467
+ contentFormat = 'video';
14459
14468
  }
14460
14469
  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) {
14461
14470
  fromKName = 'imagePage';
14471
+ contentFormat = 'image';
14462
14472
  }
14463
14473
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
14464
14474
  eventInfo: {
@@ -14471,7 +14481,8 @@ Made in Italy` })));
14471
14481
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
14472
14482
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
14473
14483
  eventSubject: 'clickTagsViewContents',
14474
- eventDescription: 'User click tags view contents'
14484
+ eventDescription: 'User click tags view contents',
14485
+ contentFormat
14475
14486
  }
14476
14487
  });
14477
14488
  }, [recData, bffEventReport, viewTime, isFromHashtag, cacheActiveIndex]);
@@ -15989,7 +16000,7 @@ Made in Italy` })));
15989
16000
  * @Author: lewinlu@chatlabs.com
15990
16001
  * @Date: 2024-01-03 14:39:09
15991
16002
  * @LastEditors: binruan@chatlabs.com
15992
- * @LastEditTime: 2024-08-30 13:58:51
16003
+ * @LastEditTime: 2024-10-10 17:53:30
15993
16004
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\PictureGroup\index.tsx
15994
16005
  */
15995
16006
  const PictureGroup$2 = ({ imgUrls, width, height, rec, index, onReportViewImageEnd, onViewImageStartEvent, imgUrlsPostConfig }) => {
@@ -16022,7 +16033,8 @@ Made in Italy` })));
16022
16033
  // }
16023
16034
  return (React.createElement(Swiper, { ref: ref, defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
16024
16035
  clickable: true,
16025
- bulletActiveClass: 'swipe-item-active-bullet'
16036
+ bulletActiveClass: 'swipe-item-active-bullet',
16037
+ bulletElement: 'button'
16026
16038
  }, className: css.css(Object.assign(Object.assign({ '.swiper-pagination': {
16027
16039
  bottom: (_a = imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.marginBottom) !== null && _a !== void 0 ? _a : 0,
16028
16040
  fontSize: '14px'
@@ -16047,7 +16059,7 @@ Made in Italy` })));
16047
16059
  * @Author: binruan@chatlabs.com
16048
16060
  * @Date: 2024-01-15 19:03:09
16049
16061
  * @LastEditors: binruan@chatlabs.com
16050
- * @LastEditTime: 2024-07-25 18:14:29
16062
+ * @LastEditTime: 2024-10-11 18:37:55
16051
16063
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
16052
16064
  *
16053
16065
  */
@@ -16085,7 +16097,7 @@ Made in Italy` })));
16085
16097
  return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
16086
16098
  }, [isShowMore, tags]);
16087
16099
  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` } },
16088
- 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) },
16100
+ 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 },
16089
16101
  React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
16090
16102
  };
16091
16103
  var Hashtag$1 = React.memo(Hashtag);
@@ -16234,7 +16246,7 @@ Made in Italy` })));
16234
16246
  * @Author: binruan@chatlabs.com
16235
16247
  * @Date: 2024-04-29 16:32:21
16236
16248
  * @LastEditors: binruan@chatlabs.com
16237
- * @LastEditTime: 2024-06-28 18:03:50
16249
+ * @LastEditTime: 2024-10-11 18:59:43
16238
16250
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Tagbar.tsx
16239
16251
  *
16240
16252
  */
@@ -16280,8 +16292,8 @@ Made in Italy` })));
16280
16292
  if (waterFallData || tagList.length <= 0)
16281
16293
  return null;
16282
16294
  return (React.createElement("div", { className: 'clc-sxp-tagbar', style: style },
16283
- React.createElement("ul", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
16284
- return (React.createElement("li", { className: `clc-sxp-tagbar-list-item ${tag === selectTag ? 'clc-sxp-tagbar-list-item-active' : ''}`, key: tag, onClick: handleSelectTag(tag) }, tag));
16295
+ React.createElement("div", { className: 'clc-sxp-tagbar-list', style: { margin: 'auto', gap: 24 } }, realTagList.map((tag) => {
16296
+ 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));
16285
16297
  }))));
16286
16298
  };
16287
16299
  var Tagbar$1 = React.memo(Tagbar);
@@ -16290,12 +16302,12 @@ Made in Italy` })));
16290
16302
  * @Author: binruan@chatlabs.com
16291
16303
  * @Date: 2024-01-15 19:03:09
16292
16304
  * @LastEditors: binruan@chatlabs.com
16293
- * @LastEditTime: 2024-09-11 15:36:28
16305
+ * @LastEditTime: 2024-10-11 18:16:31
16294
16306
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
16295
16307
  *
16296
16308
  */
16297
16309
  const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
16298
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
16310
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
16299
16311
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
16300
16312
  const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
16301
16313
  const { schema } = useEditor();
@@ -16541,7 +16553,7 @@ Made in Italy` })));
16541
16553
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
16542
16554
  return (React.createElement(React.Fragment, null,
16543
16555
  ((_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' }),
16544
- 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` } },
16556
+ 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` } },
16545
16557
  React.createElement(Nudge, { nudge: nudge }),
16546
16558
  (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' },
16547
16559
  React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
@@ -16604,7 +16616,7 @@ Made in Italy` })));
16604
16616
  }
16605
16617
  };
16606
16618
  const handleSlideSkip = (item, position) => {
16607
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
16619
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
16608
16620
  if (isPreview || waterFallData)
16609
16621
  return;
16610
16622
  const t = new Date() - curTime.current;
@@ -16612,18 +16624,26 @@ Made in Italy` })));
16612
16624
  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);
16613
16625
  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]);
16614
16626
  if (link) {
16627
+ let contentFormat = null;
16628
+ if ((_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.url) {
16629
+ contentFormat = 'video';
16630
+ }
16631
+ 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) {
16632
+ contentFormat = 'image';
16633
+ }
16615
16634
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
16616
16635
  eventInfo: {
16617
16636
  eventSubject: 'swipeToWeb',
16618
16637
  eventDescription: 'User swiped to web',
16619
- productId: (_l = product === null || product === void 0 ? void 0 : product.itemId) !== null && _l !== void 0 ? _l : '',
16620
- productName: (_m = product === null || product === void 0 ? void 0 : product.title) !== null && _m !== void 0 ? _m : '',
16638
+ productId: (_p = product === null || product === void 0 ? void 0 : product.itemId) !== null && _p !== void 0 ? _p : '',
16639
+ productName: (_q = product === null || product === void 0 ? void 0 : product.title) !== null && _q !== void 0 ? _q : '',
16621
16640
  price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0',
16622
- productCollection: (_o = product === null || product === void 0 ? void 0 : product.collection) !== null && _o !== void 0 ? _o : '',
16641
+ productCollection: (_r = product === null || product === void 0 ? void 0 : product.collection) !== null && _r !== void 0 ? _r : '',
16623
16642
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
16624
16643
  position: position + '',
16625
- 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 : '',
16626
- 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 : ''
16644
+ 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 : '',
16645
+ 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 : '',
16646
+ contentFormat
16627
16647
  }
16628
16648
  });
16629
16649
  skipLinkRef.current = true;
@@ -16632,19 +16652,27 @@ Made in Italy` })));
16632
16652
  }
16633
16653
  };
16634
16654
  const handleScrollEvent = (swiper) => {
16635
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
16655
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
16636
16656
  const item = data[swiper.previousIndex];
16637
16657
  if (!item)
16638
16658
  return;
16659
+ let contentFormat = null;
16660
+ if ((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) {
16661
+ contentFormat = 'video';
16662
+ }
16663
+ 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) {
16664
+ contentFormat = 'image';
16665
+ }
16639
16666
  if (swiper.previousIndex - swiper.activeIndex < 0) {
16640
16667
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
16641
16668
  eventInfo: {
16642
16669
  eventSubject: 'scrollDown',
16643
16670
  eventDescription: 'User scroll down',
16644
- 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 : '',
16645
- 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 : '',
16671
+ 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 : '',
16672
+ 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 : '',
16646
16673
  requestId: null,
16647
- 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 : ''
16674
+ 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 : '',
16675
+ contentFormat
16648
16676
  }
16649
16677
  });
16650
16678
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -16656,10 +16684,11 @@ Made in Italy` })));
16656
16684
  eventInfo: {
16657
16685
  eventSubject: 'scrollUp',
16658
16686
  eventDescription: 'User scroll up',
16659
- 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 : '',
16660
- productId: (_k = (_j = item.product) === null || _j === void 0 ? void 0 : _j.itemId) !== null && _k !== void 0 ? _k : '',
16687
+ 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 : '',
16688
+ productId: (_o = (_m = item.product) === null || _m === void 0 ? void 0 : _m.itemId) !== null && _o !== void 0 ? _o : '',
16661
16689
  requestId: null,
16662
- 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 : ''
16690
+ 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 : '',
16691
+ contentFormat
16663
16692
  }
16664
16693
  });
16665
16694
  // 如果上一个商品是图片集,需上报 浏览图片集结结束 事件
@@ -16668,7 +16697,7 @@ Made in Italy` })));
16668
16697
  // 商品浏览事件
16669
16698
  handleReportProductView(item);
16670
16699
  const curItem = data[swiper.activeIndex];
16671
- 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)) {
16700
+ 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)) {
16672
16701
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
16673
16702
  eventName: 'ProductView'
16674
16703
  });
@@ -16771,7 +16800,17 @@ Made in Italy` })));
16771
16800
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
16772
16801
  top: minusHeight
16773
16802
  } }),
16774
- 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,
16803
+ ((_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.backButton) === null || _f === void 0 ? void 0 : _f.enable) && (React.createElement("button", { style: {
16804
+ position: 'absolute',
16805
+ [(_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,
16806
+ [(_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,
16807
+ zIndex: 10,
16808
+ border: 'none',
16809
+ padding: 0,
16810
+ background: 'transparent'
16811
+ }, role: 'button', "aria-label": 'back button', onClick: () => history === null || history === void 0 ? void 0 : history.back() },
16812
+ 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' } }))),
16813
+ 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,
16775
16814
  React.createElement(Swiper, { style: {
16776
16815
  marginTop: tagHeight
16777
16816
  }, ref: swiperRef, onSlideChange: () => {
@@ -16803,11 +16842,15 @@ Made in Italy` })));
16803
16842
  renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
16804
16843
  renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
16805
16844
  renderView),
16806
- 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))));
16845
+ 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))));
16807
16846
  };
16808
16847
 
16809
16848
  const PictureGroup = ({ imgUrls, width, height, imgUrlsPostConfig, rec, index }) => {
16810
- 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) => {
16849
+ return (React.createElement(Swiper, { defaultValue: 0, direction: 'horizontal', modules: [Pagination, Autoplay], pagination: {
16850
+ clickable: true,
16851
+ bulletActiveClass: 'swipe-item-active-bullet',
16852
+ bulletElement: 'button'
16853
+ }, height: height, style: { width }, loop: true, autoplay: false }, imgUrls === null || imgUrls === void 0 ? void 0 : imgUrls.map((url) => {
16811
16854
  return (React.createElement(SwiperSlide, { key: url },
16812
16855
  React.createElement(Picture, { src: url, height: height, imgUrlsPostConfig: imgUrlsPostConfig })));
16813
16856
  })));