pb-sxp-ui 1.2.0 → 1.2.2

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 (52) hide show
  1. package/dist/index.cjs +127 -83
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +63 -31
  4. package/dist/index.js +127 -83
  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 +127 -83
  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/FingerSwipeTip/index.d.ts +1 -0
  15. package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
  16. package/es/core/components/SxpPageRender/Hashtag/index.js +3 -1
  17. package/es/core/components/SxpPageRender/Navbar.js +1 -1
  18. package/es/core/components/SxpPageRender/VideoWidget/index.js +13 -10
  19. package/es/core/components/SxpPageRender/WaterFall/List.js +1 -1
  20. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
  21. package/es/core/components/SxpPageRender/index.d.ts +3 -0
  22. package/es/core/components/SxpPageRender/index.js +8 -8
  23. package/es/core/context/SxpDataSourceProvider.js +2 -3
  24. package/es/materials/sxp/HashTag/material.js +2 -1
  25. package/es/materials/sxp/cta/AniLink/index.js +29 -12
  26. package/es/materials/sxp/cta/AniLinkPopup/index.js +41 -23
  27. package/es/materials/sxp/popup/CommodityDetail/index.js +1 -1
  28. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
  29. package/es/materials/sxp/popup/CommodityList/index.js +10 -10
  30. package/es/materials/sxp/template/Link/index.js +2 -2
  31. package/es/materials/sxp/template/components/Img.js +1 -1
  32. package/es/materials/sxp/template/components/settingRender.js +5 -0
  33. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +1 -0
  34. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
  35. package/lib/core/components/SxpPageRender/Hashtag/index.js +3 -1
  36. package/lib/core/components/SxpPageRender/Navbar.js +1 -1
  37. package/lib/core/components/SxpPageRender/VideoWidget/index.js +13 -10
  38. package/lib/core/components/SxpPageRender/WaterFall/List.js +1 -1
  39. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
  40. package/lib/core/components/SxpPageRender/index.d.ts +3 -0
  41. package/lib/core/components/SxpPageRender/index.js +8 -8
  42. package/lib/core/context/SxpDataSourceProvider.js +2 -3
  43. package/lib/materials/sxp/HashTag/material.js +2 -1
  44. package/lib/materials/sxp/cta/AniLink/index.js +28 -11
  45. package/lib/materials/sxp/cta/AniLinkPopup/index.js +40 -22
  46. package/lib/materials/sxp/popup/CommodityDetail/index.js +1 -1
  47. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
  48. package/lib/materials/sxp/popup/CommodityList/index.js +9 -9
  49. package/lib/materials/sxp/template/Link/index.js +2 -2
  50. package/lib/materials/sxp/template/components/Img.js +1 -1
  51. package/lib/materials/sxp/template/components/settingRender.js +5 -0
  52. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -553,7 +553,6 @@ var DataSourceType;
553
553
  (function (DataSourceType) {
554
554
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
555
555
  })(DataSourceType || (DataSourceType = {}));
556
- const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
557
556
  const DEFAULT_TAG = 'FOR U';
558
557
  const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isShowTag = true, isOpenConsent = false, globalConfig, isEditor = false }) => {
559
558
  var _a, _b, _c;
@@ -637,7 +636,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
637
636
  const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
638
637
  var _a, _b;
639
638
  const key = val.split('=')[0];
640
- return (_b = ((_a = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.channels) !== null && _a !== void 0 ? _a : UTM_KEYS)) === null || _b === void 0 ? void 0 : _b.includes(key);
639
+ return (_b = ((_a = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
641
640
  })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
642
641
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
643
642
  }
@@ -732,7 +731,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
732
731
  const val = (_o = (_m = (_l = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _l === void 0 ? void 0 : _l.filter((val) => {
733
732
  var _a, _b;
734
733
  const key = val.split('=')[0];
735
- return (_b = ((_a = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.channels) !== null && _a !== void 0 ? _a : UTM_KEYS)) === null || _b === void 0 ? void 0 : _b.includes(key);
734
+ return (_b = ((_a = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
736
735
  })) === null || _m === void 0 ? void 0 : _m.join('&')) !== null && _o !== void 0 ? _o : '';
737
736
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
738
737
  setTagList((_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.tags) !== null && _q !== void 0 ? _q : []);
@@ -8989,7 +8988,7 @@ const CommodityDetail$1 = (_a) => {
8989
8988
  width: '100%',
8990
8989
  objectFit: 'cover',
8991
8990
  display: 'block',
8992
- objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
8991
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
8993
8992
  }, src: src }))));
8994
8993
  }))))),
8995
8994
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css.css({
@@ -9717,7 +9716,7 @@ Made in Italy` })));
9717
9716
  width: '100%',
9718
9717
  objectFit: 'cover',
9719
9718
  display: 'block',
9720
- objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9719
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9721
9720
  }, src: src }))));
9722
9721
  }))),
9723
9722
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css.css({
@@ -10103,7 +10102,7 @@ function useOnScreen(ref) {
10103
10102
  * @Author: binruan@chatlabs.com
10104
10103
  * @Date: 2024-01-16 14:50:13
10105
10104
  * @LastEditors: binruan@chatlabs.com
10106
- * @LastEditTime: 2024-06-24 18:13:14
10105
+ * @LastEditTime: 2024-07-04 18:13:23
10107
10106
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
10108
10107
  *
10109
10108
  */
@@ -10124,7 +10123,7 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle }) => {
10124
10123
  }, [src]);
10125
10124
  return (React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, imgStyle)) },
10126
10125
  React.createElement("div", { ref: ref, hidden: !src, className: css.css({ width: '100%', height: '100%' }) },
10127
- React.createElement(FormatImage$1, { className: css.css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block', objectPosition: `50% ${translateY ? -translateY + 50 : 50}%` }, style)), src: src }))));
10126
+ React.createElement(FormatImage$1, { className: css.css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block', objectPosition: `50% ${translateY ? translateY + 50 : 50}%` }, style)), src: src }))));
10128
10127
  };
10129
10128
  var Img$1 = React.memo(Img);
10130
10129
 
@@ -10163,7 +10162,6 @@ const CommodityList$1 = (_a) => {
10163
10162
  var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, index, translateY = 0, commodityPicture, isExternalLink } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "index", "translateY", "commodityPicture", "isExternalLink"]);
10164
10163
  const { sxpParameter } = useSxpDataSource();
10165
10164
  const { popupDetailData, bffEventReport, isPreview, swiperRef, bffFbReport } = useSxpDataSource();
10166
- React.useRef(null);
10167
10165
  const recData = isPost ? rec : popupDetailData;
10168
10166
  const product = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [null, null, null, null];
10169
10167
  const priceText = React.useCallback((product) => {
@@ -10183,13 +10181,14 @@ const CommodityList$1 = (_a) => {
10183
10181
  display: 'flex'
10184
10182
  }) }),
10185
10183
  React.createElement(Img$1, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: commodityPicture }),
10186
- React.createElement("div", null,
10187
- React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.title), dangerouslySetInnerHTML: {
10188
- __html: setFontForText((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
10189
- } }),
10190
- React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection, hidden: !!item && (!(item === null || item === void 0 ? void 0 : item.collection) || (item === null || item === void 0 ? void 0 : item.collection) === ''), dangerouslySetInnerHTML: {
10191
- __html: setFontForText((_f = item === null || item === void 0 ? void 0 : item.collection) !== null && _f !== void 0 ? _f : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
10192
- } }),
10184
+ React.createElement("div", { style: { flex: 1, display: 'flex', flexDirection: 'column', justifyContent: 'space-between' } },
10185
+ React.createElement("div", null,
10186
+ React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.title), dangerouslySetInnerHTML: {
10187
+ __html: setFontForText((_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
10188
+ } }),
10189
+ React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection, hidden: !!item && (!(item === null || item === void 0 ? void 0 : item.collection) || (item === null || item === void 0 ? void 0 : item.collection) === ''), dangerouslySetInnerHTML: {
10190
+ __html: setFontForText((_f = item === null || item === void 0 ? void 0 : item.collection) !== null && _f !== void 0 ? _f : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
10191
+ } })),
10193
10192
  React.createElement("div", { className: css.css({
10194
10193
  display: 'flex',
10195
10194
  alignItems: 'flex-end',
@@ -10200,7 +10199,7 @@ const CommodityList$1 = (_a) => {
10200
10199
  React.createElement("div", { style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.price), dangerouslySetInnerHTML: {
10201
10200
  __html: setFontForText(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
10202
10201
  } }),
10203
- React.createElement("div", { style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px' }), dangerouslySetInnerHTML: {
10202
+ React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px', maxWidth: '100px' }), dangerouslySetInnerHTML: {
10204
10203
  __html: setFontForText((_h = (_g = item === null || item === void 0 ? void 0 : item.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now', buttonStyle)
10205
10204
  } })))));
10206
10205
  })));
@@ -10294,7 +10293,7 @@ const CommodityList = createMaterial(CommodityListComponent, {
10294
10293
  * @Author: binruan@chatlabs.com
10295
10294
  * @Date: 2024-03-26 16:50:25
10296
10295
  * @LastEditors: binruan@chatlabs.com
10297
- * @LastEditTime: 2024-06-27 09:55:59
10296
+ * @LastEditTime: 2024-07-04 17:47:52
10298
10297
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\settingRender.tsx
10299
10298
  *
10300
10299
  */
@@ -10539,6 +10538,11 @@ var settingRender$4 = [
10539
10538
  label: '对齐',
10540
10539
  type: 'TextAlign',
10541
10540
  name: ['props', 'ctaTempStyles', 'ctaTitle']
10541
+ },
10542
+ {
10543
+ label: '间距',
10544
+ type: 'TextSpace',
10545
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
10542
10546
  }
10543
10547
  ]
10544
10548
  }
@@ -10851,7 +10855,7 @@ const Link$1 = (_a) => {
10851
10855
  overflow: 'hidden'
10852
10856
  }) },
10853
10857
  React.createElement("div", null,
10854
- React.createElement("div", { className: (customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) ? styles$7['one-line-ellipsis'] : styles$7['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
10858
+ React.createElement("div", { className: styles$7['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
10855
10859
  __html: setFontForText((_h = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _h !== void 0 ? _h : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
10856
10860
  } }),
10857
10861
  (customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) && (React.createElement("div", { style: Object.assign(Object.assign({}, customTitle === null || customTitle === void 0 ? void 0 : customTitle.style), { lineHeight: ((_j = customTitle === null || customTitle === void 0 ? void 0 : customTitle.style) === null || _j === void 0 ? void 0 : _j.height) + 'px' }), className: styles$7['one-line-ellipsis'], dangerouslySetInnerHTML: {
@@ -11679,7 +11683,7 @@ var settingRender$3 = [
11679
11683
  * @Author: binruan@chatlabs.com
11680
11684
  * @Date: 2023-12-26 16:11:34
11681
11685
  * @LastEditors: binruan@chatlabs.com
11682
- * @LastEditTime: 2024-06-27 10:19:28
11686
+ * @LastEditTime: 2024-07-04 18:34:18
11683
11687
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Navbar.tsx
11684
11688
  *
11685
11689
  */
@@ -11688,7 +11692,7 @@ const Navbar = ({ icon, styles, textStyle, onClose }) => {
11688
11692
  const { waterFallData, setOpenHashtag } = useSxpDataSource();
11689
11693
  return (React.createElement("div", { className: 'clc-sxp-nav', style: styles },
11690
11694
  React.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: 'back button', onClick: onClose }),
11691
- React.createElement("div", { className: 'clc-sxp-nav-title', style: textStyle, dangerouslySetInnerHTML: {
11695
+ 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: {
11692
11696
  __html: setFontForText(`#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`, textStyle)
11693
11697
  } })));
11694
11698
  };
@@ -13283,7 +13287,7 @@ function WaterfallList$1(_a) {
13283
13287
  var _a, _b;
13284
13288
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
13285
13289
  reportTagsView();
13286
- window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
13290
+ window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
13287
13291
  }
13288
13292
  };
13289
13293
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -13518,7 +13522,7 @@ function WaterfallList(_a) {
13518
13522
  var _a, _b;
13519
13523
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
13520
13524
  reportTagsView();
13521
- window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
13525
+ window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
13522
13526
  }
13523
13527
  };
13524
13528
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -13671,7 +13675,7 @@ var HashTagComponent = React.memo(HashTag$1);
13671
13675
  * @Author: binruan@chatlabs.com
13672
13676
  * @Date: 2023-07-28 18:29:57
13673
13677
  * @LastEditors: binruan@chatlabs.com
13674
- * @LastEditTime: 2024-04-30 10:13:13
13678
+ * @LastEditTime: 2024-07-04 18:38:10
13675
13679
  * @FilePath: \pb-sxp-ui\src\materials\sxp\HashTag\material.tsx
13676
13680
  *
13677
13681
  */
@@ -13691,7 +13695,8 @@ const HashTag = createMaterial(HashTagComponent, {
13691
13695
  textStyles: {
13692
13696
  hashTagTitle: {
13693
13697
  fontSize: 16,
13694
- color: '#000'
13698
+ color: '#000',
13699
+ textAlign: 'center'
13695
13700
  },
13696
13701
  hashTagDesc: {
13697
13702
  fontSize: 12,
@@ -13931,28 +13936,36 @@ var settingRender$1 = [
13931
13936
  var styles$1 = {"animated-button":"index-module_animated-button__lqTbg","gradientCover":"index-module_gradientCover__5iUag"};
13932
13937
 
13933
13938
  const AniLink$1 = (_a) => {
13934
- var _b, _c, _d, _e, _f, _g, _h, _j, _k;
13939
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
13935
13940
  var { style, recData, ctaTempStyles, index, event, onClick, isExternalLink = false } = _a, props = __rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "onClick", "isExternalLink"]);
13936
- const { ctaEvent } = useSxpDataSource();
13941
+ const { ctaEvent, setPopupDetailData } = useSxpDataSource();
13937
13942
  const { jumpToWeb } = useEventReport();
13943
+ const [visible, setVisible] = React.useState(false);
13938
13944
  const ref = React.useRef(null);
13939
13945
  const isOnScreen = useOnScreen(ref);
13940
13946
  const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
13941
13947
  const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
13942
13948
  const handleTo = () => {
13943
- var _a, _b, _c;
13949
+ var _a, _b, _c, _d;
13944
13950
  const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
13945
13951
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
13946
13952
  eventSubject: 'clickCta',
13947
13953
  eventDescription: 'User clicked the CTA'
13948
13954
  }, recData, item, index);
13955
+ setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { index }));
13949
13956
  if (isExternalLink) {
13950
- jumpToWeb(recData, product, cta, index);
13957
+ const link = (product === null || product === void 0 ? void 0 : product.link) || ((_d = item === null || item === void 0 ? void 0 : item.bindCta) === null || _d === void 0 ? void 0 : _d.link);
13958
+ if (link) {
13959
+ jumpToWeb(recData, product, cta, index);
13960
+ window.location.href = window.getJointUtmLink(link);
13961
+ }
13962
+ }
13963
+ else {
13964
+ onClick === null || onClick === void 0 ? void 0 : onClick();
13951
13965
  }
13952
- onClick === null || onClick === void 0 ? void 0 : onClick();
13953
13966
  };
13954
- const title = (cta === null || cta === void 0 ? void 0 : cta.title) || '查看详情 >';
13955
- const aniStyle = React.useMemo(() => {
13967
+ const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情 >';
13968
+ const aniTimStyle = React.useMemo(() => {
13956
13969
  var _a, _b;
13957
13970
  const ani = event === null || event === void 0 ? void 0 : event.animation;
13958
13971
  if (ani) {
@@ -13974,10 +13987,19 @@ const AniLink$1 = (_a) => {
13974
13987
  }, recData, product, index);
13975
13988
  }
13976
13989
  }, [isOnScreen]);
13977
- return (React.createElement("div", Object.assign({ ref: ref, style: Object.assign(Object.assign({}, style), { display: 'flex', alignItems: 'center' }) }, props, { className: `${styles$1['animated-button']} ${css.css(aniStyle)}`, onClick: handleTo }),
13978
- React.createElement("div", { className: 'one-line-ellipsis', style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
13979
- __html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
13980
- } })));
13990
+ React.useEffect(() => {
13991
+ if (isOnScreen) {
13992
+ setVisible(true);
13993
+ }
13994
+ }, [isOnScreen]);
13995
+ const aniNamStyle = React.useMemo(() => {
13996
+ if (!visible)
13997
+ return null;
13998
+ return styles$1['animated-button'];
13999
+ }, [visible]);
14000
+ return (React.createElement("div", Object.assign({ ref: ref, style: Object.assign(Object.assign(Object.assign({}, style), ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: `${(_l = style === null || style === void 0 ? void 0 : style.height) !== null && _l !== void 0 ? _l : 0}px` }) }, props, { className: `${aniNamStyle} ${css.css(aniTimStyle)} one-line-ellipsis`, onClick: handleTo, dangerouslySetInnerHTML: {
14001
+ __html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
14002
+ } })));
13981
14003
  };
13982
14004
  var AniLinkComponent = React.memo(AniLink$1);
13983
14005
 
@@ -14340,61 +14362,78 @@ var settingRender = [
14340
14362
  }
14341
14363
  ];
14342
14364
 
14343
- var styles = {"animated-button":"index-module_animated-button__qI1lz","gradientCover":"index-module_gradientCover__nD6d9","tow-line-ellipsis":"index-module_tow-line-ellipsis__GKFXr","modal-icon-wrapper":"index-module_modal-icon-wrapper__tu3BY","modal-icon-wrapper-img":"index-module_modal-icon-wrapper-img__4b7qZ"};
14365
+ var styles = {"aniLinkPopup":"index-module_aniLinkPopup__YT7kj","animated-fadeIn":"index-module_animated-fadeIn__8ZCbq","fadeIn":"index-module_fadeIn__2E-dk","animated-fadeOut":"index-module_animated-fadeOut__iK4oc","fadeOut":"index-module_fadeOut__MgevT","tow-line-ellipsis":"index-module_tow-line-ellipsis__GKFXr","modal-icon-wrapper":"index-module_modal-icon-wrapper__tu3BY","modal-icon-wrapper-img":"index-module_modal-icon-wrapper-img__4b7qZ"};
14344
14366
 
14345
14367
  const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
14346
14368
  const AniLinkPopup$1 = (_a) => {
14347
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
14369
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
14348
14370
  var { style, recData, ctaTempStyles, index, event, bottom_image, translateY, isTel, onClick, isExternalLink = false } = _a, props = __rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "bottom_image", "translateY", "isTel", "onClick", "isExternalLink"]);
14349
- const { sxpParameter, globalConfig, ctaEvent } = useSxpDataSource();
14371
+ style === null || style === void 0 ? true : delete style.transform;
14372
+ const { sxpParameter, globalConfig, ctaEvent, setPopupDetailData } = useSxpDataSource();
14350
14373
  const { jumpToWeb } = useEventReport();
14351
- const [visible, setVisible] = React.useState(true);
14374
+ const ref = React.useRef(null);
14375
+ const isOnScreen = useOnScreen(ref);
14376
+ const [visible, setVisible] = React.useState(false);
14377
+ const [startAni, setStartAni] = React.useState(true);
14352
14378
  const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
14353
14379
  const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
14354
14380
  const handleTo = () => {
14355
- var _a, _b, _c;
14381
+ var _a, _b, _c, _d;
14356
14382
  const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
14357
14383
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
14358
14384
  eventSubject: 'clickCta',
14359
14385
  eventDescription: 'User clicked the CTA'
14360
14386
  }, recData, item, index);
14387
+ setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { index }));
14361
14388
  if (isExternalLink) {
14362
- jumpToWeb(recData, product, cta, index);
14389
+ const link = (product === null || product === void 0 ? void 0 : product.link) || ((_d = item === null || item === void 0 ? void 0 : item.bindCta) === null || _d === void 0 ? void 0 : _d.link);
14390
+ if (link) {
14391
+ jumpToWeb(recData, product, cta, index);
14392
+ window.location.href = window.getJointUtmLink(link);
14393
+ }
14394
+ }
14395
+ else {
14396
+ onClick === null || onClick === void 0 ? void 0 : onClick();
14363
14397
  }
14364
- onClick === null || onClick === void 0 ? void 0 : onClick();
14365
14398
  };
14366
- const title = (cta === null || cta === void 0 ? void 0 : cta.title) || '查看详情 >';
14367
- const aniStyle = React.useMemo(() => {
14368
- var _a, _b;
14399
+ const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情 >';
14400
+ const aniTimStyle = React.useMemo(() => {
14369
14401
  const ani = event === null || event === void 0 ? void 0 : event.animation;
14370
14402
  if (ani) {
14371
- const { delay, duration, backgroundColor } = ani;
14403
+ const { delay, duration } = ani;
14372
14404
  return {
14373
- ':after': {
14374
- animationDelay: `${(_a = delay / 1000) !== null && _a !== void 0 ? _a : 0}s`,
14375
- animationDuration: `${(_b = duration / 1000) !== null && _b !== void 0 ? _b : 0}s`,
14376
- backgroundColor: `${backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'transparent'}`
14377
- }
14405
+ animationDelay: `${delay ? delay / 1000 : 0}s`,
14406
+ animationDuration: `${duration ? duration / 1000 : 0}s`
14378
14407
  };
14379
14408
  }
14380
14409
  }, [event === null || event === void 0 ? void 0 : event.animation]);
14381
14410
  const src = (_q = (_p = (_o = (_l = product === null || product === void 0 ? void 0 : product.cover) !== null && _l !== void 0 ? _l : (_m = product === null || product === void 0 ? void 0 : product.homePage) === null || _m === void 0 ? void 0 : _m[0]) !== null && _o !== void 0 ? _o : cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _p !== void 0 ? _p : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _q !== void 0 ? _q : bottom_image;
14382
14411
  const onClose = (event) => {
14383
14412
  event.stopPropagation();
14384
- setVisible(false);
14413
+ setStartAni(false);
14385
14414
  };
14415
+ React.useEffect(() => {
14416
+ if (isOnScreen) {
14417
+ setVisible(true);
14418
+ }
14419
+ }, [isOnScreen]);
14420
+ const aniNamStyle = React.useMemo(() => {
14421
+ if (!visible)
14422
+ return null;
14423
+ return startAni ? styles['animated-fadeIn'] : styles['animated-fadeOut'];
14424
+ }, [visible, startAni]);
14386
14425
  return (React.createElement(React.Fragment, null, isTel ? (React.createElement("div", { style: {
14387
14426
  height: '40px',
14388
14427
  lineHeight: '40px',
14389
14428
  paddingLeft: '6px'
14390
- } }, "Cta Title")) : (React.createElement("div", Object.assign({ style: Object.assign(Object.assign({}, style), { position: 'fixed', right: 0, bottom: 0, zIndex: 1000, display: visible ? 'block' : 'none' }) }, props, { className: `${styles['animated-button']} ${css.css(aniStyle)}`, onClick: handleTo }),
14391
- React.createElement("div", { onClick: onClose, className: styles['modal-icon-wrapper'], style: { padding: (_r = style === null || style === void 0 ? void 0 : style['padding']) !== null && _r !== void 0 ? _r : 0 } },
14392
- React.createElement("img", { src: (_s = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _s !== void 0 ? _s : closeIcon, alt: 'close', className: styles['modal-icon-wrapper-img'] })),
14393
- React.createElement(Img$1, { src: src, rec: recData, item: (_x = (_v = (_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.bindProducts) === null || _u === void 0 ? void 0 : _u[0]) !== null && _v !== void 0 ? _v : (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.bindProduct) !== null && _x !== void 0 ? _x : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
14429
+ } }, "Cta Title")) : (React.createElement("div", Object.assign({ ref: ref }, props, { className: `${css.css(Object.assign(Object.assign({}, style), { '--transY': `translateY(calc(100% + ${(_r = style === null || style === void 0 ? void 0 : style.margin) !== null && _r !== void 0 ? _r : 0}px))` }))} ${styles['aniLinkPopup']} ${aniNamStyle} ${css.css(aniTimStyle)}`, onClick: handleTo }),
14430
+ React.createElement("div", { onClick: onClose, className: styles['modal-icon-wrapper'], style: { padding: (_s = style === null || style === void 0 ? void 0 : style['padding']) !== null && _s !== void 0 ? _s : 0 } },
14431
+ React.createElement("img", { src: (_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _t !== void 0 ? _t : closeIcon, alt: 'close', className: styles['modal-icon-wrapper-img'] })),
14432
+ React.createElement(Img$1, { src: src, rec: recData, item: (_y = (_w = (_v = (_u = recData === null || recData === void 0 ? void 0 : recData.video) === null || _u === void 0 ? void 0 : _u.bindProducts) === null || _v === void 0 ? void 0 : _v[0]) !== null && _w !== void 0 ? _w : (_x = recData === null || recData === void 0 ? void 0 : recData.video) === null || _x === void 0 ? void 0 : _x.bindProduct) !== null && _y !== void 0 ? _y : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
14394
14433
  React.createElement("div", { hidden: !!recData && !(product === null || product === void 0 ? void 0 : product.title), className: styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
14395
- __html: setFontForText((_y = product === null || product === void 0 ? void 0 : product.title) !== null && _y !== void 0 ? _y : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
14434
+ __html: setFontForText((_z = product === null || product === void 0 ? void 0 : product.title) !== null && _z !== void 0 ? _z : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title)
14396
14435
  } }),
14397
- React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: ((_z = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _z === void 0 ? void 0 : _z.height) + 'px' }), dangerouslySetInnerHTML: {
14436
+ React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle), { lineHeight: ((_0 = ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle) === null || _0 === void 0 ? void 0 : _0.height) + 'px' }), dangerouslySetInnerHTML: {
14398
14437
  __html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
14399
14438
  } })))));
14400
14439
  };
@@ -14840,20 +14879,23 @@ const VideoWidget$2 = ({ rec, index, height, data, muted, activeIndex, videoPost
14840
14879
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
14841
14880
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
14842
14881
  return () => {
14843
- var _a, _b, _c, _d, _e, _f, _g, _h;
14882
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
14883
+ const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
14884
+ if (!isPause)
14885
+ handlePause();
14844
14886
  if (hls)
14845
14887
  hls === null || hls === void 0 ? void 0 : hls.destroy();
14846
14888
  setIsLoadFinish(false);
14847
- (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('loadedmetadata', handleLoadedmetadata);
14848
- (_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadeddata', handLoadeddata);
14849
- (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('play', handleStartPlay);
14850
- (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('playing', handlePlaying);
14851
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('pause', handlePause);
14852
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('ended', handlePlay);
14853
- (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('canplay', handlePlay);
14854
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('waiting', handleWaiting);
14889
+ (_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadedmetadata', handleLoadedmetadata);
14890
+ (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadeddata', handLoadeddata);
14891
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('play', handleStartPlay);
14892
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('playing', handlePlaying);
14893
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('pause', handlePause);
14894
+ (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('ended', handlePlay);
14895
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('canplay', handlePlay);
14896
+ (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('waiting', handleWaiting);
14855
14897
  };
14856
- }, [isActive, videoId, rec]);
14898
+ }, [isActive, videoId, rec, handlePause]);
14857
14899
  React.useEffect(() => {
14858
14900
  var _a, _b;
14859
14901
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
@@ -14999,23 +15041,23 @@ var ToggleButton$1 = React.memo(ToggleButton);
14999
15041
  * @Author: binruan@chatlabs.com
15000
15042
  * @Date: 2024-01-15 19:03:09
15001
15043
  * @LastEditors: binruan@chatlabs.com
15002
- * @LastEditTime: 2024-03-13 10:53:56
15044
+ * @LastEditTime: 2024-07-11 18:19:29
15003
15045
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FingerSwipeTip\index.tsx
15004
15046
  *
15005
15047
  */
15006
- const FingerSwipeTip = ({ imageUrl, style }) => {
15048
+ const FingerSwipeTip = ({ imageUrl, style, duration = 2000 }) => {
15007
15049
  const [show, setShow] = React.useState(true);
15008
15050
  useEditor();
15009
15051
  React.useEffect(() => {
15010
15052
  setTimeout(() => {
15011
15053
  setShow(false);
15012
- }, 2000);
15054
+ }, duration);
15013
15055
  }, []);
15014
15056
  const FINGER_SWIPE_ICON = useIconLink('/pb_static/finger-swipe-tip.29dc3a48a3c746c906ea..png');
15015
15057
  const animationCls = React.useMemo(() => {
15016
15058
  return show ? 'pb-fadeIn' : 'pb-fadeOut';
15017
15059
  }, [show]);
15018
- return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
15060
+ return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: Object.assign(Object.assign({}, style), { animationDuration: `${duration / 1000}s` }) },
15019
15061
  React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON, alt: 'finger swiper' })));
15020
15062
  };
15021
15063
 
@@ -15119,11 +15161,12 @@ var PictureGroup$3 = React.memo(PictureGroup$2);
15119
15161
  * @Author: binruan@chatlabs.com
15120
15162
  * @Date: 2024-01-15 19:03:09
15121
15163
  * @LastEditors: binruan@chatlabs.com
15122
- * @LastEditTime: 2024-06-26 18:52:46
15164
+ * @LastEditTime: 2024-07-09 18:47:05
15123
15165
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Hashtag\index.tsx
15124
15166
  *
15125
15167
  */
15126
15168
  const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
15169
+ var _a;
15127
15170
  const [isShowMore, setIsShowMore] = React.useState(false);
15128
15171
  const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
15129
15172
  const handleClickTag = (data) => {
@@ -15155,7 +15198,8 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
15155
15198
  }
15156
15199
  return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
15157
15200
  }, [isShowMore, tags]);
15158
- return (React.createElement("div", { className: 'clc-sxp-bottom-hashtag' },
15201
+ console.log(hashTagStyle, '111');
15202
+ 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` } },
15159
15203
  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) },
15160
15204
  React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
15161
15205
  };
@@ -15359,7 +15403,7 @@ var Tagbar$1 = React.memo(Tagbar);
15359
15403
  * @Author: binruan@chatlabs.com
15360
15404
  * @Date: 2024-01-15 19:03:09
15361
15405
  * @LastEditors: binruan@chatlabs.com
15362
- * @LastEditTime: 2024-07-22 15:57:31
15406
+ * @LastEditTime: 2024-07-24 14:59:23
15363
15407
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
15364
15408
  *
15365
15409
  */
@@ -15565,18 +15609,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15565
15609
  };
15566
15610
  }, [isShowMore]);
15567
15611
  const renderBottom = React.useCallback((rec, index) => {
15568
- var _a, _b, _c, _d, _e, _f, _g;
15612
+ var _a, _b, _c, _d, _e, _f, _g, _h;
15569
15613
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
15570
15614
  return (React.createElement(React.Fragment, null,
15571
15615
  ((_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' }),
15572
- React.createElement("div", { className: 'clc-sxp-bottom' },
15616
+ 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` } },
15573
15617
  React.createElement(Nudge, { nudge: nudge }),
15574
15618
  (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' },
15575
15619
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
15576
15620
  React.createElement("div", null,
15577
- 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 === null || rec === void 0 ? void 0 : 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' }), onChange: onExpandableChange }),
15621
+ 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: (_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.title) !== null && _d !== void 0 ? _d : '', 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' }), onChange: onExpandableChange }),
15578
15622
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
15579
- React.createElement(Hashtag$1, { index: activeIndex, 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 === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))),
15623
+ React.createElement(Hashtag$1, { index: activeIndex, tags: (_f = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.hashTags) !== null && _f !== void 0 ? _f : [], itemId: (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId, itemType: ((_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))),
15580
15624
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'] })));
15581
15625
  }
15582
15626
  return null;
@@ -15758,7 +15802,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15758
15802
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } })));
15759
15803
  }
15760
15804
  return visList === null || visList === void 0 ? void 0 : visList.map((rec, index) => {
15761
- return (React.createElement(SwiperSlide, { key: index, virtualIndex: index }, rec && (React.createElement(React.Fragment, null, (rec === null || rec === void 0 ? void 0 : rec.loading) ? (React.createElement("div", { style: {
15805
+ return (React.createElement(SwiperSlide, { key: index, virtualIndex: index, style: { overflow: 'hidden' } }, rec && (React.createElement(React.Fragment, null, (rec === null || rec === void 0 ? void 0 : rec.loading) ? (React.createElement("div", { style: {
15762
15806
  height,
15763
15807
  width: containerWidth,
15764
15808
  display: 'flex',
@@ -15781,7 +15825,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15781
15825
  React.createElement(Tagbar$1, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
15782
15826
  top: minusHeight
15783
15827
  } }),
15784
- isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 + ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` } })) : null,
15828
+ isShowFingerTip ? (React.createElement(FingerSwipeTip, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon, style: { top: `${50 - ((_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipOffset) !== null && _a !== void 0 ? _a : 0)}%` }, duration: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swiperTipAniDur })) : null,
15785
15829
  React.createElement(Swiper, { style: {
15786
15830
  marginTop: tagHeight
15787
15831
  }, ref: swiperRef, onSlideChange: () => {
@@ -15806,13 +15850,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
15806
15850
  }
15807
15851
  }
15808
15852
  }, direction: 'vertical', height: height },
15809
- React.createElement(ToggleButton$1, { style: {
15853
+ ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (React.createElement(ToggleButton$1, { style: {
15810
15854
  position: 'fixed',
15811
15855
  visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
15812
15856
  zIndex: 999,
15813
15857
  [(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _d !== void 0 ? _d : 'right']: (_e = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _e !== void 0 ? _e : 0,
15814
15858
  [(_f = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _f !== void 0 ? _f : 'bottom']: (_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _g !== void 0 ? _g : 23
15815
- }, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted }),
15859
+ }, defaultValue: isMuted, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon, onChange: setIsMuted })),
15816
15860
  renderView),
15817
15861
  React.createElement(WaterFall$1, Object.assign({}, (_k = (_j = (_h = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.item) === null || _k === void 0 ? void 0 : _k.props))));
15818
15862
  };