pb-sxp-ui 1.2.1 → 1.2.3

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 (58) hide show
  1. package/dist/index.cjs +132 -83
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +99 -32
  4. package/dist/index.js +132 -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 +132 -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/Pagebuilder/type.d.ts +1 -0
  15. package/es/core/components/SxpPageCore/index.js +1 -1
  16. package/es/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +1 -0
  17. package/es/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
  18. package/es/core/components/SxpPageRender/Hashtag/index.js +3 -1
  19. package/es/core/components/SxpPageRender/Navbar.js +1 -1
  20. package/es/core/components/SxpPageRender/VideoWidget/index.js +13 -10
  21. package/es/core/components/SxpPageRender/WaterFall/List.js +1 -1
  22. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
  23. package/es/core/components/SxpPageRender/index.d.ts +3 -0
  24. package/es/core/components/SxpPageRender/index.js +8 -8
  25. package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
  26. package/es/core/context/SxpDataSourceProvider.js +3 -3
  27. package/es/materials/sxp/HashTag/material.js +2 -1
  28. package/es/materials/sxp/cta/AniLink/index.js +27 -11
  29. package/es/materials/sxp/cta/AniLinkPopup/index.js +40 -23
  30. package/es/materials/sxp/popup/CommodityDetail/index.js +1 -1
  31. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
  32. package/es/materials/sxp/popup/CommodityList/index.js +13 -7
  33. package/es/materials/sxp/template/Link/index.js +2 -2
  34. package/es/materials/sxp/template/components/Img.js +1 -1
  35. package/es/materials/sxp/template/components/settingRender.js +5 -0
  36. package/lib/core/Pagebuilder/type.d.ts +1 -0
  37. package/lib/core/components/SxpPageCore/index.js +1 -1
  38. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.d.ts +1 -0
  39. package/lib/core/components/SxpPageRender/FingerSwipeTip/index.js +3 -3
  40. package/lib/core/components/SxpPageRender/Hashtag/index.js +3 -1
  41. package/lib/core/components/SxpPageRender/Navbar.js +1 -1
  42. package/lib/core/components/SxpPageRender/VideoWidget/index.js +13 -10
  43. package/lib/core/components/SxpPageRender/WaterFall/List.js +1 -1
  44. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
  45. package/lib/core/components/SxpPageRender/index.d.ts +3 -0
  46. package/lib/core/components/SxpPageRender/index.js +8 -8
  47. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
  48. package/lib/core/context/SxpDataSourceProvider.js +3 -3
  49. package/lib/materials/sxp/HashTag/material.js +2 -1
  50. package/lib/materials/sxp/cta/AniLink/index.js +26 -10
  51. package/lib/materials/sxp/cta/AniLinkPopup/index.js +39 -22
  52. package/lib/materials/sxp/popup/CommodityDetail/index.js +1 -1
  53. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
  54. package/lib/materials/sxp/popup/CommodityList/index.js +13 -7
  55. package/lib/materials/sxp/template/Link/index.js +2 -2
  56. package/lib/materials/sxp/template/components/Img.js +1 -1
  57. package/lib/materials/sxp/template/components/settingRender.js +5 -0
  58. package/package.json +1 -1
@@ -53,6 +53,7 @@ export interface UtmParameter {
53
53
  utm_source: string;
54
54
  utm_medium: string;
55
55
  utm_campaign: string;
56
+ channels?: string[];
56
57
  }
57
58
  interface PagebuilderProps {
58
59
  init: (e: initParams) => void;
@@ -16,7 +16,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
16
16
  return searchParams;
17
17
  }, []);
18
18
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
19
- React.createElement(SxpDataSourceProvider, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, globalConfig: (_l = (_k = data === null || data === void 0 ? void 0 : data.data) === null || _k === void 0 ? void 0 : _k.sxpPageConf) === null || _l === void 0 ? void 0 : _l.globalConfig, render: ({ rtcList, tagList }) => {
19
+ React.createElement(SxpDataSourceProvider, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, globalConfig: (_l = (_k = data === null || data === void 0 ? void 0 : data.data) === null || _k === void 0 ? void 0 : _k.sxpPageConf) === null || _l === void 0 ? void 0 : _l.globalConfig, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, render: ({ rtcList, tagList }) => {
20
20
  var _a;
21
21
  return (React.createElement(React.Fragment, null,
22
22
  React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER, licenseUrl: licenseUrl })),
@@ -2,6 +2,7 @@ import { CSSProperties, FC } from 'react';
2
2
  interface IProps {
3
3
  imageUrl?: string;
4
4
  style?: CSSProperties;
5
+ duration?: number;
5
6
  }
6
7
  declare const FingerSwipeTip: FC<IProps>;
7
8
  export default FingerSwipeTip;
@@ -1,19 +1,19 @@
1
1
  import React, { useEffect, useMemo, useState } from 'react';
2
2
  import { useIconLink } from '../useIconLink';
3
3
  import { useEditor } from '../../../../core/hooks';
4
- const FingerSwipeTip = ({ imageUrl, style }) => {
4
+ const FingerSwipeTip = ({ imageUrl, style, duration = 2000 }) => {
5
5
  const [show, setShow] = useState(true);
6
6
  const { schema: { sxpPageConf } } = useEditor();
7
7
  useEffect(() => {
8
8
  setTimeout(() => {
9
9
  setShow(false);
10
- }, 2000);
10
+ }, duration);
11
11
  }, []);
12
12
  const FINGER_SWIPE_ICON = useIconLink('/pb_static/finger-swipe-tip.29dc3a48a3c746c906ea..png');
13
13
  const animationCls = useMemo(() => {
14
14
  return show ? 'pb-fadeIn' : 'pb-fadeOut';
15
15
  }, [show]);
16
- return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: style },
16
+ return (React.createElement("div", { hidden: !show, className: `pb-finger-wrap ${animationCls}`, style: Object.assign(Object.assign({}, style), { animationDuration: `${duration / 1000}s` }) },
17
17
  React.createElement("img", { src: imageUrl || FINGER_SWIPE_ICON, alt: 'finger swiper' })));
18
18
  };
19
19
  export default FingerSwipeTip;
@@ -4,6 +4,7 @@ import { useSxpDataSource } from '../../../../core/hooks';
4
4
  import Scroll from '../../../../materials/sxp/template/components/Scroll';
5
5
  import { setFontForText } from '../../../../core/utils/tool';
6
6
  const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
7
+ var _a;
7
8
  const [isShowMore, setIsShowMore] = useState(false);
8
9
  const { setWaterFallData, setOpenHashtag, setCacheActiveIndex, waterFallData, setIsFromHashtag } = useSxpDataSource();
9
10
  const handleClickTag = (data) => {
@@ -35,7 +36,8 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle }) => {
35
36
  }
36
37
  return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
37
38
  }, [isShowMore, tags]);
38
- return (React.createElement("div", { className: 'clc-sxp-bottom-hashtag' },
39
+ console.log(hashTagStyle, '111');
40
+ 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` } },
39
41
  React.createElement(Scroll, 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) },
40
42
  React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
41
43
  };
@@ -6,7 +6,7 @@ const Navbar = ({ icon, styles, textStyle, onClose }) => {
6
6
  const { waterFallData, setOpenHashtag } = useSxpDataSource();
7
7
  return (React.createElement("div", { className: 'clc-sxp-nav', style: styles },
8
8
  React.createElement("img", { className: 'clc-sxp-nav-left', src: icon, alt: 'back button', onClick: onClose }),
9
- React.createElement("div", { className: 'clc-sxp-nav-title', style: textStyle, dangerouslySetInnerHTML: {
9
+ 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: {
10
10
  __html: setFontForText(`#${(_a = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag) !== null && _a !== void 0 ? _a : '标题'}`, textStyle)
11
11
  } })));
12
12
  };
@@ -221,20 +221,23 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
221
221
  (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.addEventListener('canplay', handlePlay);
222
222
  (_k = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _k === void 0 ? void 0 : _k.addEventListener('waiting', handleWaiting);
223
223
  return () => {
224
- var _a, _b, _c, _d, _e, _f, _g, _h;
224
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
225
+ const isPause = (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
226
+ if (!isPause)
227
+ handlePause();
225
228
  if (hls)
226
229
  hls === null || hls === void 0 ? void 0 : hls.destroy();
227
230
  setIsLoadFinish(false);
228
- (_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('loadedmetadata', handleLoadedmetadata);
229
- (_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadeddata', handLoadeddata);
230
- (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('play', handleStartPlay);
231
- (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('playing', handlePlaying);
232
- (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('pause', handlePause);
233
- (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('ended', handlePlay);
234
- (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('canplay', handlePlay);
235
- (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('waiting', handleWaiting);
231
+ (_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('loadedmetadata', handleLoadedmetadata);
232
+ (_c = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('loadeddata', handLoadeddata);
233
+ (_d = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('play', handleStartPlay);
234
+ (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.removeEventListener('playing', handlePlaying);
235
+ (_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.removeEventListener('pause', handlePause);
236
+ (_g = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _g === void 0 ? void 0 : _g.removeEventListener('ended', handlePlay);
237
+ (_h = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _h === void 0 ? void 0 : _h.removeEventListener('canplay', handlePlay);
238
+ (_j = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _j === void 0 ? void 0 : _j.removeEventListener('waiting', handleWaiting);
236
239
  };
237
- }, [isActive, videoId, rec]);
240
+ }, [isActive, videoId, rec, handlePause]);
238
241
  useEffect(() => {
239
242
  var _a, _b;
240
243
  if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
@@ -169,7 +169,7 @@ export default function WaterfallList(_a) {
169
169
  var _a, _b;
170
170
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
171
171
  reportTagsView();
172
- window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
172
+ window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
173
173
  }
174
174
  };
175
175
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -277,7 +277,7 @@ export default function WaterfallList(_a) {
277
277
  var _a, _b;
278
278
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
279
279
  reportTagsView();
280
- window.location.href = (_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link;
280
+ window.location.href = window.getJointUtmLink((_b = data === null || data === void 0 ? void 0 : data.tag) === null || _b === void 0 ? void 0 : _b.link);
281
281
  }
282
282
  };
283
283
  return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
@@ -37,6 +37,9 @@ export interface ISxpPageRenderProps {
37
37
  swipeTipOffset?: number;
38
38
  consent?: any[];
39
39
  videoPlayIcon?: string;
40
+ isShowMute?: boolean;
41
+ bottomInfoDist?: number;
42
+ swiperTipAniDur?: number;
40
43
  popupCloseIcon?: string;
41
44
  openSlideSkip?: boolean;
42
45
  slideSkipStartTime?: number;
@@ -220,18 +220,18 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
220
220
  };
221
221
  }, [isShowMore]);
222
222
  const renderBottom = useCallback((rec, index) => {
223
- var _a, _b, _c, _d, _e, _f, _g;
223
+ var _a, _b, _c, _d, _e, _f, _g, _h;
224
224
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
225
225
  return (React.createElement(React.Fragment, null,
226
226
  ((_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' }),
227
- React.createElement("div", { className: 'clc-sxp-bottom' },
227
+ 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` } },
228
228
  React.createElement(Nudge, { nudge: nudge }),
229
229
  (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' },
230
230
  React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
231
231
  React.createElement("div", null,
232
- React.createElement(ExpandableText, { 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 }),
232
+ React.createElement(ExpandableText, { 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 }),
233
233
  React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
234
- React.createElement(Hashtag, { 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 }))),
234
+ React.createElement(Hashtag, { 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 }))),
235
235
  React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'] })));
236
236
  }
237
237
  return null;
@@ -409,7 +409,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
409
409
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } })));
410
410
  }
411
411
  return visList === null || visList === void 0 ? void 0 : visList.map((rec, index) => {
412
- 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: {
412
+ 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: {
413
413
  height,
414
414
  width: containerWidth,
415
415
  display: 'flex',
@@ -432,7 +432,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
432
432
  React.createElement(Tagbar, { tagList: tagList, setActiveIndex: setActiveIndex, style: {
433
433
  top: minusHeight
434
434
  } }),
435
- 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,
435
+ 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,
436
436
  React.createElement(Swiper, { style: {
437
437
  marginTop: tagHeight
438
438
  }, ref: swiperRef, onSlideChange: () => {
@@ -456,13 +456,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
456
456
  }
457
457
  }
458
458
  }, direction: 'vertical', height: height },
459
- React.createElement(ToggleButton, { style: {
459
+ ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (React.createElement(ToggleButton, { style: {
460
460
  position: 'fixed',
461
461
  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',
462
462
  zIndex: 999,
463
463
  [(_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,
464
464
  [(_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
465
- }, 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 }),
465
+ }, 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 })),
466
466
  renderView),
467
467
  React.createElement(WaterFall, 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))));
468
468
  };
@@ -118,6 +118,7 @@ export interface SxpDataSourceProviderProps {
118
118
  isOpenConsent?: boolean;
119
119
  globalConfig?: ISxpPageRenderProps['globalConfig'];
120
120
  isEditor?: boolean;
121
+ utmParameter?: PageData['utm_parameter'];
121
122
  }
122
123
  export declare const DEFAULT_TAG = "FOR U";
123
124
  declare const _default: React.NamedExoticComponent<SxpDataSourceProviderProps>;
@@ -15,7 +15,7 @@ var DataSourceType;
15
15
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
16
16
  })(DataSourceType || (DataSourceType = {}));
17
17
  export const DEFAULT_TAG = 'FOR U';
18
- 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 }) => {
18
+ 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, utmParameter }) => {
19
19
  var _a, _b, _c;
20
20
  const [rtcList, setRtcList] = useState([]);
21
21
  const [tagList, setTagList] = useState([]);
@@ -91,7 +91,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
91
91
  const val = (_h = (_g = (_f = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _f === void 0 ? void 0 : _f.filter((val) => {
92
92
  var _a, _b;
93
93
  const key = val.split('=')[0];
94
- 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);
94
+ return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
95
95
  })) === null || _g === void 0 ? void 0 : _g.join('&')) !== null && _h !== void 0 ? _h : '';
96
96
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
97
97
  }
@@ -180,7 +180,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
180
180
  const val = (_o = (_m = (_l = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _l === void 0 ? void 0 : _l.filter((val) => {
181
181
  var _a, _b;
182
182
  const key = val.split('=')[0];
183
- 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);
183
+ return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
184
184
  })) === null || _m === void 0 ? void 0 : _m.join('&')) !== null && _o !== void 0 ? _o : '';
185
185
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
186
186
  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 : []);
@@ -17,7 +17,8 @@ const HashTag = createMaterial(HashTagComponent, {
17
17
  textStyles: {
18
18
  hashTagTitle: {
19
19
  fontSize: 16,
20
- color: '#000'
20
+ color: '#000',
21
+ textAlign: 'center'
21
22
  },
22
23
  hashTagDesc: {
23
24
  fontSize: 12,
@@ -1,22 +1,23 @@
1
1
  import { __rest } from "tslib";
2
2
  import { css } from '@emotion/css';
3
- import React, { memo, useEffect, useMemo, useRef } from 'react';
3
+ import React, { memo, useEffect, useMemo, useRef, useState } from 'react';
4
4
  import { useSxpDataSource } from '../../../../core/hooks';
5
5
  import { useEventReport } from '../../../../core/hooks/useEventReport';
6
6
  import { setFontForText } from '../../../../core/utils/tool';
7
7
  import styles from './index.module.less';
8
8
  import useOnScreen from '../../../../core/hooks/useOnScreen';
9
9
  const AniLink = (_a) => {
10
- var _b, _c, _d, _e, _f, _g, _h, _j, _k;
10
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
11
11
  var { style, recData, ctaTempStyles, index, event, onClick, isExternalLink = false } = _a, props = __rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "onClick", "isExternalLink"]);
12
12
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
13
13
  const { jumpToWeb } = useEventReport();
14
+ const [visible, setVisible] = useState(false);
14
15
  const ref = useRef(null);
15
16
  const isOnScreen = useOnScreen(ref);
16
17
  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);
17
18
  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);
18
19
  const handleTo = () => {
19
- var _a, _b, _c;
20
+ var _a, _b, _c, _d;
20
21
  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);
21
22
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
22
23
  eventSubject: 'clickCta',
@@ -24,12 +25,18 @@ const AniLink = (_a) => {
24
25
  }, recData, item, index);
25
26
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { index }));
26
27
  if (isExternalLink) {
27
- jumpToWeb(recData, product, cta, index);
28
+ 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);
29
+ if (link) {
30
+ jumpToWeb(recData, product, cta, index);
31
+ window.location.href = window.getJointUtmLink(link);
32
+ }
33
+ }
34
+ else {
35
+ onClick === null || onClick === void 0 ? void 0 : onClick();
28
36
  }
29
- onClick === null || onClick === void 0 ? void 0 : onClick();
30
37
  };
31
- const title = (cta === null || cta === void 0 ? void 0 : cta.title) || '查看详情 >';
32
- const aniStyle = useMemo(() => {
38
+ const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情 >';
39
+ const aniTimStyle = useMemo(() => {
33
40
  var _a, _b;
34
41
  const ani = event === null || event === void 0 ? void 0 : event.animation;
35
42
  if (ani) {
@@ -51,9 +58,18 @@ const AniLink = (_a) => {
51
58
  }, recData, product, index);
52
59
  }
53
60
  }, [isOnScreen]);
54
- return (React.createElement("div", Object.assign({ ref: ref, style: Object.assign(Object.assign({}, style), { display: 'flex', alignItems: 'center' }) }, props, { className: `${styles['animated-button']} ${css(aniStyle)}`, onClick: handleTo }),
55
- React.createElement("div", { className: 'one-line-ellipsis', style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
56
- __html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
57
- } })));
61
+ useEffect(() => {
62
+ if (isOnScreen) {
63
+ setVisible(true);
64
+ }
65
+ }, [isOnScreen]);
66
+ const aniNamStyle = useMemo(() => {
67
+ if (!visible)
68
+ return null;
69
+ return styles['animated-button'];
70
+ }, [visible]);
71
+ 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(aniTimStyle)} ${styles['one-line-ellipsis']}`, onClick: handleTo, dangerouslySetInnerHTML: {
72
+ __html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
73
+ } })));
58
74
  };
59
75
  export default memo(AniLink);
@@ -1,22 +1,27 @@
1
1
  import { __rest } from "tslib";
2
2
  import { css } from '@emotion/css';
3
- import React, { memo, useMemo, useState } from 'react';
3
+ import React, { memo, useEffect, useMemo, useRef, useState } from 'react';
4
4
  import { useSxpDataSource } from '../../../../core/hooks';
5
5
  import { useEventReport } from '../../../../core/hooks/useEventReport';
6
6
  import Img from '../../template/components/Img';
7
7
  import { setFontForText } from '../../../../core/utils/tool';
8
8
  import styles from './index.module.less';
9
+ import useOnScreen from '../../../../core/hooks/useOnScreen';
9
10
  const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
10
11
  const AniLinkPopup = (_a) => {
11
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
12
+ 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;
12
13
  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"]);
14
+ style === null || style === void 0 ? true : delete style.transform;
13
15
  const { sxpParameter, globalConfig, ctaEvent, setPopupDetailData } = useSxpDataSource();
14
16
  const { jumpToWeb } = useEventReport();
15
- const [visible, setVisible] = useState(true);
17
+ const ref = useRef(null);
18
+ const isOnScreen = useOnScreen(ref);
19
+ const [visible, setVisible] = useState(false);
20
+ const [startAni, setStartAni] = useState(true);
16
21
  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);
17
22
  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);
18
23
  const handleTo = () => {
19
- var _a, _b, _c;
24
+ var _a, _b, _c, _d;
20
25
  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);
21
26
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
22
27
  eventSubject: 'clickCta',
@@ -24,42 +29,54 @@ const AniLinkPopup = (_a) => {
24
29
  }, recData, item, index);
25
30
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { index }));
26
31
  if (isExternalLink) {
27
- jumpToWeb(recData, product, cta, index);
32
+ 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);
33
+ if (link) {
34
+ jumpToWeb(recData, product, cta, index);
35
+ window.location.href = window.getJointUtmLink(link);
36
+ }
37
+ }
38
+ else {
39
+ onClick === null || onClick === void 0 ? void 0 : onClick();
28
40
  }
29
- onClick === null || onClick === void 0 ? void 0 : onClick();
30
41
  };
31
- const title = (cta === null || cta === void 0 ? void 0 : cta.title) || '查看详情 >';
32
- const aniStyle = useMemo(() => {
33
- var _a, _b;
42
+ const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情 >';
43
+ const aniTimStyle = useMemo(() => {
34
44
  const ani = event === null || event === void 0 ? void 0 : event.animation;
35
45
  if (ani) {
36
- const { delay, duration, backgroundColor } = ani;
46
+ const { delay, duration } = ani;
37
47
  return {
38
- ':after': {
39
- animationDelay: `${(_a = delay / 1000) !== null && _a !== void 0 ? _a : 0}s`,
40
- animationDuration: `${(_b = duration / 1000) !== null && _b !== void 0 ? _b : 0}s`,
41
- backgroundColor: `${backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'transparent'}`
42
- }
48
+ animationDelay: `${delay ? delay / 1000 : 0}s`,
49
+ animationDuration: `${duration ? duration / 1000 : 0}s`
43
50
  };
44
51
  }
45
52
  }, [event === null || event === void 0 ? void 0 : event.animation]);
46
53
  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;
47
54
  const onClose = (event) => {
48
55
  event.stopPropagation();
49
- setVisible(false);
56
+ setStartAni(false);
50
57
  };
58
+ useEffect(() => {
59
+ if (isOnScreen) {
60
+ setVisible(true);
61
+ }
62
+ }, [isOnScreen]);
63
+ const aniNamStyle = useMemo(() => {
64
+ if (!visible)
65
+ return null;
66
+ return startAni ? styles['animated-fadeIn'] : null;
67
+ }, [visible, startAni]);
51
68
  return (React.createElement(React.Fragment, null, isTel ? (React.createElement("div", { style: {
52
69
  height: '40px',
53
70
  lineHeight: '40px',
54
71
  paddingLeft: '6px'
55
- } }, "Cta Title")) : (React.createElement("div", Object.assign({ style: Object.assign(Object.assign({}, style), { position: 'absolute', right: 0, bottom: 0, zIndex: 1000, display: visible ? 'block' : 'none' }) }, props, { className: `${styles['animated-button']} ${css(aniStyle)}`, onClick: handleTo }),
56
- 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 } },
57
- 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'] })),
58
- React.createElement(Img, { 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 }),
59
- 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: {
60
- __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)
72
+ } }, "Cta Title")) : (React.createElement("div", Object.assign({ ref: ref }, props, { className: `${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(aniTimStyle)}`, onClick: handleTo }),
73
+ 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 } },
74
+ 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'] })),
75
+ React.createElement(Img, { 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 }),
76
+ React.createElement("div", { hidden: !!recData && !(product === null || product === void 0 ? void 0 : product.title), className: styles['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
77
+ __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)
61
78
  } }),
62
- 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: {
79
+ React.createElement("div", { className: styles['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: {
63
80
  __html: setFontForText(title, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
64
81
  } })))));
65
82
  };
@@ -124,7 +124,7 @@ const CommodityDetail = (_a) => {
124
124
  width: '100%',
125
125
  objectFit: 'cover',
126
126
  display: 'block',
127
- objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
127
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
128
128
  }, src: src }))));
129
129
  }))))),
130
130
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
@@ -108,7 +108,7 @@ Made in Italy` })));
108
108
  width: '100%',
109
109
  objectFit: 'cover',
110
110
  display: 'block',
111
- objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
111
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
112
112
  }, src: src }))));
113
113
  }))),
114
114
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
@@ -25,18 +25,24 @@ const CommodityList = (_a) => {
25
25
  }
26
26
  }, []);
27
27
  return (React.createElement("div", { className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
28
- var _a, _b, _c, _d, _e, _f, _g, _h;
28
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
29
29
  return (React.createElement(EventProvider, Object.assign({ key: index, isExternalLink: isExternalLink, rec: recData, index: index }, props, { className: css({
30
30
  display: 'flex'
31
31
  }) }),
32
32
  React.createElement(Img, { 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 }),
33
- React.createElement("div", { style: { flex: 1, display: 'flex', flexDirection: 'column', justifyContent: 'space-between' } },
33
+ React.createElement("div", { style: {
34
+ flex: 1,
35
+ width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.marginRight) !== null && _f !== void 0 ? _f : 0}px - ${(_g = style === null || style === void 0 ? void 0 : style.padding) !== null && _g !== void 0 ? _g : 0}px)`,
36
+ display: 'flex',
37
+ flexDirection: 'column',
38
+ justifyContent: 'space-between'
39
+ } },
34
40
  React.createElement("div", null,
35
- 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: {
36
- __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)
41
+ React.createElement("div", { className: 'one-line-ellipsis', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!item && !(item === null || item === void 0 ? void 0 : item.title), dangerouslySetInnerHTML: {
42
+ __html: setFontForText((_h = item === null || item === void 0 ? void 0 : item.title) !== null && _h !== void 0 ? _h : 'Pendant in Yellow Gold with Diamonds, Medium', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title)
37
43
  } }),
38
- 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: {
39
- __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)
44
+ React.createElement("div", { className: 'two-line-ellipsis', 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: {
45
+ __html: setFontForText((_j = item === null || item === void 0 ? void 0 : item.collection) !== null && _j !== void 0 ? _j : 'Tiffany Lock', commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.collection)
40
46
  } })),
41
47
  React.createElement("div", { className: css({
42
48
  display: 'flex',
@@ -49,7 +55,7 @@ const CommodityList = (_a) => {
49
55
  __html: setFontForText(priceText(item), commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price)
50
56
  } }),
51
57
  React.createElement("div", { className: 'one-line-ellipsis', style: Object.assign(Object.assign({}, buttonStyle), { padding: '0 15px', maxWidth: '100px' }), dangerouslySetInnerHTML: {
52
- __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)
58
+ __html: setFontForText((_l = (_k = item === null || item === void 0 ? void 0 : item.bindCta) === null || _k === void 0 ? void 0 : _k.enTitle) !== null && _l !== void 0 ? _l : 'Shop Now', buttonStyle)
53
59
  } })))));
54
60
  })));
55
61
  };
@@ -2,11 +2,11 @@ import { __rest } from "tslib";
2
2
  import { css } from '@emotion/css';
3
3
  import React, { memo } from 'react';
4
4
  import EventProvider from '../components/EventProvider';
5
- import styles from './index.module.less';
6
5
  import { useSxpDataSource } from '../../../../core/hooks';
7
6
  import { useEventReport } from '../../../../core/hooks/useEventReport';
8
7
  import Img from '../components/Img';
9
8
  import { setFontForText } from '../../../../core/utils/tool';
9
+ import styles from './index.module.less';
10
10
  const Link = (_a) => {
11
11
  var _b, _c, _d, _e, _f, _g, _h, _j;
12
12
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
@@ -30,7 +30,7 @@ const Link = (_a) => {
30
30
  overflow: 'hidden'
31
31
  }) },
32
32
  React.createElement("div", null,
33
- React.createElement("div", { className: (customTitle === null || customTitle === void 0 ? void 0 : customTitle.display) ? styles['one-line-ellipsis'] : styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
33
+ React.createElement("div", { className: styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle, dangerouslySetInnerHTML: {
34
34
  __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)
35
35
  } }),
36
36
  (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['one-line-ellipsis'], dangerouslySetInnerHTML: {
@@ -20,6 +20,6 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle }) => {
20
20
  }, [src]);
21
21
  return (React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, imgStyle)) },
22
22
  React.createElement("div", { ref: ref, hidden: !src, className: css({ width: '100%', height: '100%' }) },
23
- React.createElement(FormatImage, { className: css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block', objectPosition: `50% ${translateY ? -translateY + 50 : 50}%` }, style)), src: src }))));
23
+ React.createElement(FormatImage, { className: css(Object.assign({ width: '100%', objectFit: 'cover', height: '100%', display: 'block', objectPosition: `50% ${translateY ? translateY + 50 : 50}%` }, style)), src: src }))));
24
24
  };
25
25
  export default memo(Img);
@@ -239,6 +239,11 @@ export default [
239
239
  label: '对齐',
240
240
  type: 'TextAlign',
241
241
  name: ['props', 'ctaTempStyles', 'ctaTitle']
242
+ },
243
+ {
244
+ label: '间距',
245
+ type: 'TextSpace',
246
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
242
247
  }
243
248
  ]
244
249
  }
@@ -53,6 +53,7 @@ export interface UtmParameter {
53
53
  utm_source: string;
54
54
  utm_medium: string;
55
55
  utm_campaign: string;
56
+ channels?: string[];
56
57
  }
57
58
  interface PagebuilderProps {
58
59
  init: (e: initParams) => void;