pb-sxp-ui 1.2.6 → 1.2.8

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 +119 -107
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +1 -3
  4. package/dist/index.js +119 -107
  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 +119 -107
  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/FormatImage.d.ts +1 -0
  15. package/es/core/components/SxpPageRender/FormatImage.js +23 -5
  16. package/es/core/components/SxpPageRender/Popup/index.js +5 -5
  17. package/es/core/components/SxpPageRender/VideoWidget/index.js +2 -2
  18. package/es/core/components/SxpPageRender/index.js +12 -6
  19. package/es/core/context/SxpDataSourceProvider.js +25 -15
  20. package/es/core/hooks/useEventReport.js +4 -4
  21. package/es/materials/sxp/cta/AniLink/index.js +1 -1
  22. package/es/materials/sxp/cta/AniLink/interactionRender.d.ts +0 -3
  23. package/es/materials/sxp/cta/AniLink/interactionRender.js +1 -2
  24. package/es/materials/sxp/cta/AniLink/material.js +9 -1
  25. package/es/materials/sxp/cta/AniLinkPopup/index.js +2 -2
  26. package/es/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +0 -10
  27. package/es/materials/sxp/cta/AniLinkPopup/interactionRender.js +1 -7
  28. package/es/materials/sxp/cta/AniLinkPopup/material.js +17 -10
  29. package/es/materials/sxp/popup/CommodityList/index.d.ts +0 -1
  30. package/es/materials/sxp/popup/CommodityList/index.js +2 -1
  31. package/es/materials/sxp/template/components/CommodityGroup.d.ts +1 -1
  32. package/es/materials/sxp/template/components/CommodityGroup.js +2 -1
  33. package/lib/core/components/SxpPageRender/FormatImage.d.ts +1 -0
  34. package/lib/core/components/SxpPageRender/FormatImage.js +23 -5
  35. package/lib/core/components/SxpPageRender/Popup/index.js +5 -5
  36. package/lib/core/components/SxpPageRender/VideoWidget/index.js +2 -2
  37. package/lib/core/components/SxpPageRender/index.js +12 -6
  38. package/lib/core/context/SxpDataSourceProvider.js +25 -15
  39. package/lib/core/hooks/useEventReport.js +4 -4
  40. package/lib/materials/sxp/cta/AniLink/index.js +1 -1
  41. package/lib/materials/sxp/cta/AniLink/interactionRender.d.ts +0 -3
  42. package/lib/materials/sxp/cta/AniLink/interactionRender.js +1 -2
  43. package/lib/materials/sxp/cta/AniLink/material.js +9 -1
  44. package/lib/materials/sxp/cta/AniLinkPopup/index.js +2 -2
  45. package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +0 -10
  46. package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.js +1 -7
  47. package/lib/materials/sxp/cta/AniLinkPopup/material.js +17 -10
  48. package/lib/materials/sxp/popup/CommodityList/index.d.ts +0 -1
  49. package/lib/materials/sxp/popup/CommodityList/index.js +2 -1
  50. package/lib/materials/sxp/template/components/CommodityGroup.d.ts +1 -1
  51. package/lib/materials/sxp/template/components/CommodityGroup.js +2 -1
  52. package/package.json +1 -1
@@ -5,6 +5,7 @@ interface IFormatImageProps {
5
5
  style?: CSSProperties;
6
6
  className?: any;
7
7
  loading?: 'eager' | 'lazy';
8
+ alt?: string;
8
9
  }
9
10
  interface IFormatImageRefProps {
10
11
  setSrc: (v: string) => void;
@@ -1,7 +1,9 @@
1
+ import SXP_EVENT_BUS, { SXP_EVENT_TYPE } from '../../../core/utils/event';
1
2
  import React, { forwardRef, memo, useEffect, useImperativeHandle, useRef, useState } from 'react';
2
3
  const FormatImage = forwardRef((props, ref) => {
3
- const { src, onLoad, style, className, loading } = props;
4
+ const { src, onLoad, style, className, loading, alt = 'image' } = props;
4
5
  const [imgSrc, setImgSrc] = useState();
6
+ const imgRef = useRef(null);
5
7
  useImperativeHandle(ref, () => ({
6
8
  setSrc: (v) => {
7
9
  setImgSrc(v);
@@ -10,15 +12,31 @@ const FormatImage = forwardRef((props, ref) => {
10
12
  useEffect(() => {
11
13
  setImgSrc(src);
12
14
  }, [src]);
13
- const imgRef = useRef(null);
15
+ useEffect(() => {
16
+ const onShow = () => {
17
+ var _a, _b;
18
+ if (src && ((_b = (_a = imgRef === null || imgRef === void 0 ? void 0 : imgRef.current) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.display) === 'none') {
19
+ imgRef.current.src = '';
20
+ imgRef.current.src = src;
21
+ }
22
+ };
23
+ SXP_EVENT_BUS.on(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
24
+ return () => {
25
+ SXP_EVENT_BUS.off(SXP_EVENT_TYPE.PAGE_DID_SHOW, onShow);
26
+ };
27
+ }, [src]);
14
28
  return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
15
29
  React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
16
30
  React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
17
31
  React.createElement("source", { type: 'image/jpeg', srcSet: `${imgSrc}?imageMogr2/format/jpg` }),
18
- React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
32
+ React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign(Object.assign({}, style), { display: 'none' }), loading: loading, onLoad: (e) => {
33
+ if (imgRef.current)
34
+ imgRef.current.style.display = 'block';
19
35
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
20
- }, alt: 'image' }))) : (React.createElement("img", { className: className, src: imgSrc, style: style, loading: loading, onLoad: (e) => {
36
+ }, alt: alt }))) : (React.createElement("img", { ref: imgRef, className: className, src: imgSrc, style: Object.assign(Object.assign({}, style), { display: 'none' }), loading: loading, onLoad: (e) => {
37
+ if (imgRef.current)
38
+ imgRef.current.style.display = 'block';
21
39
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(e.target);
22
- }, alt: 'image' }))));
40
+ }, alt: alt }))));
23
41
  });
24
42
  export default memo(FormatImage);
@@ -25,7 +25,7 @@ const Popup = () => {
25
25
  }
26
26
  }, [popup]);
27
27
  const handleClose = () => {
28
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
28
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
29
29
  if (!popup ||
30
30
  (popup === null || popup === void 0 ? void 0 : popup.id) === '' ||
31
31
  !visible ||
@@ -36,10 +36,10 @@ const Popup = () => {
36
36
  const value = (_d = (_c = (_b = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _b === void 0 ? void 0 : _b.globalConfig) === null || _c === void 0 ? void 0 : _c.popupList) === null || _d === void 0 ? void 0 : _d.find((item) => (item === null || item === void 0 ? void 0 : item.id) === (popup === null || popup === void 0 ? void 0 : popup.id));
37
37
  if (((_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.type) === 'CommodityDetail' || ((_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.type) === 'CommodityDetailDiroNew') {
38
38
  const data = popupDetailData;
39
- let product = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct;
40
- let cta = (_j = (_h = data === null || data === void 0 ? void 0 : data.video) === null || _h === void 0 ? void 0 : _h.bindProduct) === null || _j === void 0 ? void 0 : _j.bindCta;
39
+ let product = (_h = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0];
40
+ let cta = (_o = (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.bindProduct) === null || _m === void 0 ? void 0 : _m.bindCta) !== null && _o !== void 0 ? _o : (_r = (_q = (_p = data === null || data === void 0 ? void 0 : data.video) === null || _p === void 0 ? void 0 : _p.bindProducts) === null || _q === void 0 ? void 0 : _q[0]) === null || _r === void 0 ? void 0 : _r.bindCta;
41
41
  if ((checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current) >= 0) {
42
- const p = (_l = (_k = data === null || data === void 0 ? void 0 : data.video) === null || _k === void 0 ? void 0 : _k.bindProducts) === null || _l === void 0 ? void 0 : _l[checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current];
42
+ const p = (_t = (_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.bindProducts) === null || _t === void 0 ? void 0 : _t[checkCommodityIndexRef === null || checkCommodityIndexRef === void 0 ? void 0 : checkCommodityIndexRef.current];
43
43
  if (p) {
44
44
  product = p;
45
45
  cta = p === null || p === void 0 ? void 0 : p.bindCta;
@@ -65,7 +65,7 @@ const Popup = () => {
65
65
  const isExternalLink = ((_d = (_c = (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.event) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
66
66
  const isPopup = ((_g = (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.event) === null || _f === void 0 ? void 0 : _f.onClick) === null || _g === void 0 ? void 0 : _g.linkType) === 'popup';
67
67
  const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
68
- return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw', height: '100%' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose, index: index })));
68
+ return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw', height: '100%' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
69
69
  }
70
70
  else {
71
71
  return React.createElement(React.Fragment, null);
@@ -340,7 +340,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
340
340
  } },
341
341
  React.createElement("div", { style: { position: 'relative', width: '100%', height: '100%' } },
342
342
  React.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
343
- React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', alt: 'pause', src: videoPlayIcon !== null && videoPlayIcon !== void 0 ? videoPlayIcon : PAUSE_ICON }))),
343
+ isPauseVideo && (React.createElement(FormatImage, { className: 'clc-pb-video-pause', src: videoPlayIcon !== null && videoPlayIcon !== void 0 ? videoPlayIcon : PAUSE_ICON, alt: 'pause' })))),
344
344
  renderPoster,
345
345
  renderLoading)) : (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, style: {
346
346
  position: 'relative',
@@ -351,6 +351,6 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
351
351
  React.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
352
352
  renderPoster,
353
353
  renderLoading,
354
- React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: videoPlayIcon !== null && videoPlayIcon !== void 0 ? videoPlayIcon : PAUSE_ICON, alt: 'pause' })))));
354
+ isPauseVideo && React.createElement(FormatImage, { className: 'clc-pb-video-pause', src: videoPlayIcon !== null && videoPlayIcon !== void 0 ? videoPlayIcon : PAUSE_ICON, alt: 'pause' })))));
355
355
  };
356
356
  export default memo(VideoWidget);
@@ -30,6 +30,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
30
30
  const viewTime = useRef();
31
31
  const [isLoadMore, setIsLoadMore] = useState(false);
32
32
  const [isShowMore, setIsShowMore] = useState(false);
33
+ const [isReload, setIsReload] = useState(false);
34
+ const skipLinkRef = useRef(false);
33
35
  const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview } = useSxpDataSource();
34
36
  const { backMainFeed } = useEventReport();
35
37
  const { productView } = useEventReport();
@@ -78,7 +80,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
78
80
  useEffect(() => {
79
81
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
80
82
  const visibleChange = () => {
81
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
83
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
82
84
  const repCond = !openHashtag && !isShowConsent;
83
85
  if (document.visibilityState === 'hidden') {
84
86
  if (repCond) {
@@ -116,11 +118,14 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
116
118
  fromKName,
117
119
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
118
120
  ctatId: (_r = (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.bindCta) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
119
- traceInfo: (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : ''
121
+ traceInfo: (_v = (_t = (_s = item === null || item === void 0 ? void 0 : item.video) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_u = item === null || item === void 0 ? void 0 : item.product) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : ''
120
122
  }
121
123
  });
122
124
  }
123
125
  else if (document.visibilityState === 'visible') {
126
+ if (skipLinkRef.current === true) {
127
+ setIsReload(true);
128
+ }
124
129
  handleH5EnterLink();
125
130
  if (repCond) {
126
131
  handleViewImageStartEvent(activeIndex);
@@ -160,7 +165,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
160
165
  const minusHeight = useMemo(() => {
161
166
  let minusHeight = 0;
162
167
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
163
- minusHeight += 45;
168
+ minusHeight += 56;
164
169
  }
165
170
  return minusHeight;
166
171
  }, []);
@@ -286,7 +291,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
286
291
  }
287
292
  };
288
293
  const handleSlideSkip = (item, position) => {
289
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
294
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
290
295
  if (isPreview || waterFallData)
291
296
  return;
292
297
  const t = new Date() - curTime.current;
@@ -305,10 +310,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
305
310
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
306
311
  position: position + '',
307
312
  contentId: (_q = (_p = item === null || item === void 0 ? void 0 : item.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
308
- traceInfo: (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : ''
313
+ traceInfo: (_u = (_s = (_r = item === null || item === void 0 ? void 0 : item.video) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : (_t = item === null || item === void 0 ? void 0 : item.product) === null || _t === void 0 ? void 0 : _t.traceInfo) !== null && _u !== void 0 ? _u : ''
309
314
  }
310
315
  });
311
316
  setSlideSkipState();
317
+ skipLinkRef.current = true;
312
318
  window.location.href = window.getJointUtmLink(link);
313
319
  }
314
320
  }
@@ -421,7 +427,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
421
427
  renderBottom(rec, index),
422
428
  renderLikeButton(rec, index)))))));
423
429
  });
424
- }, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage]);
430
+ }, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage, isReload]);
425
431
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
426
432
  const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png');
427
433
  return (React.createElement("div", { id: 'sxp-render', className: 'clc-sxp-container' },
@@ -40,6 +40,19 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
40
40
  var _a, _b, _c, _d;
41
41
  return (((_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.privacy_necessity) && !isAgreePolicy && !isEditor) || isOpenConsent;
42
42
  }, [isAgreePolicy, globalConfig, isOpenConsent, isEditor]);
43
+ const getFilterRecList = useCallback((data) => {
44
+ var _a;
45
+ const recList = data === null || data === void 0 ? void 0 : data.recList;
46
+ const nList = (_a = recList === null || recList === void 0 ? void 0 : recList.map((item) => {
47
+ var _a, _b, _c, _d, _e, _f;
48
+ if (((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) && ((_c = (_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c.length) > 0) {
49
+ const bindProducts = (_f = (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindProducts) === null || _e === void 0 ? void 0 : _e.filter((item) => !!(item === null || item === void 0 ? void 0 : item.bindCta))) !== null && _f !== void 0 ? _f : [];
50
+ return Object.assign(Object.assign({}, item), { video: Object.assign(Object.assign({}, item === null || item === void 0 ? void 0 : item.video), { bindProducts }) });
51
+ }
52
+ return item;
53
+ })) !== null && _a !== void 0 ? _a : [];
54
+ return nList;
55
+ }, []);
43
56
  useEffect(() => {
44
57
  const handleChangeThemeTag = (tag) => {
45
58
  themeTag.current = tag;
@@ -106,7 +119,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
106
119
  return result === null || result === void 0 ? void 0 : result.data;
107
120
  }), [bffFetch, utmVal, maxSize, defaultSize]);
108
121
  const loadVideos = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
109
- var _j, _k;
110
122
  if (rtcList.length <= 0) {
111
123
  return;
112
124
  }
@@ -116,8 +128,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
116
128
  'itemFilter.itemType': waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.itemType,
117
129
  themeTag: themeTag.current
118
130
  });
119
- setRtcList(rtcList.concat((_j = data === null || data === void 0 ? void 0 : data.recList) !== null && _j !== void 0 ? _j : []));
120
- setCacheRtcList(cacheRtcList.concat((_k = data === null || data === void 0 ? void 0 : data.recList) !== null && _k !== void 0 ? _k : []));
131
+ setRtcList(rtcList.concat(getFilterRecList(data)));
132
+ setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
121
133
  }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
122
134
  const bffEventReport = useCallback(({ userInfo, eventInfo }) => {
123
135
  if (!enableReportEvent) {
@@ -175,24 +187,24 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
175
187
  return res === null || res === void 0 ? void 0 : res.success;
176
188
  }), [bffFetch]);
177
189
  const bffGetTagList = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
178
- var _l, _m, _o, _p, _q;
190
+ var _j, _k, _l, _m, _o;
179
191
  if (!utmVal || !isShowTag)
180
192
  return;
181
193
  try {
182
- const val = (_o = (_m = (_l = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _l === void 0 ? void 0 : _l.filter((val) => {
194
+ const val = (_l = (_k = (_j = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _j === void 0 ? void 0 : _j.filter((val) => {
183
195
  var _a, _b;
184
196
  const key = val.split('=')[0];
185
197
  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);
186
- })) === null || _m === void 0 ? void 0 : _m.join('&')) !== null && _o !== void 0 ? _o : '';
198
+ })) === null || _k === void 0 ? void 0 : _k.join('&')) !== null && _l !== void 0 ? _l : '';
187
199
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
188
- 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 : []);
200
+ setTagList((_o = (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.tags) !== null && _o !== void 0 ? _o : []);
189
201
  }
190
202
  catch (e) {
191
203
  console.log('e', e);
192
204
  }
193
205
  }), [bffFetch, utmVal, isShowTag]);
194
206
  const ctaEvent = useCallback((eventInfo, rec, product, position) => {
195
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
207
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
196
208
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
197
209
  const isProd = ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) || (((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProducts) && ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProducts) === null || _d === void 0 ? void 0 : _d.length) > 0);
198
210
  let fromKName = '';
@@ -206,7 +218,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
206
218
  fromKName = 'imagePage';
207
219
  }
208
220
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
209
- eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_1 = (_y = (_t = (_p = (_o = (_m = rec === null || rec === void 0 ? void 0 : rec.video) === null || _m === void 0 ? void 0 : _m.bindCta) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : (_s = (_r = (_q = rec === null || rec === void 0 ? void 0 : rec.video) === null || _q === void 0 ? void 0 : _q.bindProduct) === null || _r === void 0 ? void 0 : _r.bindCta) === null || _s === void 0 ? void 0 : _s.traceInfo) !== null && _t !== void 0 ? _t : (_x = (_w = (_v = (_u = rec === null || rec === void 0 ? void 0 : rec.video) === null || _u === void 0 ? void 0 : _u.bindProducts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.bindCta) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.product) === null || _z === void 0 ? void 0 : _z.bindCta) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : '', fromKName, fromKPage: (_2 = location === null || location === void 0 ? void 0 : location.href) !== null && _2 !== void 0 ? _2 : '' })
221
+ eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_2 = (_z = (_u = (_q = (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : (_p = (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.traceInfo) !== null && _q !== void 0 ? _q : (_t = (_s = (_r = rec === null || rec === void 0 ? void 0 : rec.video) === null || _r === void 0 ? void 0 : _r.bindProduct) === null || _s === void 0 ? void 0 : _s.bindCta) === null || _t === void 0 ? void 0 : _t.traceInfo) !== null && _u !== void 0 ? _u : (_y = (_x = (_w = (_v = rec === null || rec === void 0 ? void 0 : rec.video) === null || _v === void 0 ? void 0 : _v.bindProducts) === null || _w === void 0 ? void 0 : _w[0]) === null || _x === void 0 ? void 0 : _x.bindCta) === null || _y === void 0 ? void 0 : _y.traceInfo) !== null && _z !== void 0 ? _z : (_1 = (_0 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : '', fromKName, fromKPage: (_3 = location === null || location === void 0 ? void 0 : location.href) !== null && _3 !== void 0 ? _3 : '' })
210
222
  });
211
223
  }, [bffEventReport, isFromHashtag]);
212
224
  const h5EnterLink = useCallback(() => {
@@ -246,9 +258,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
246
258
  bffGetTagList();
247
259
  getRecommendVideos()
248
260
  .then((data) => {
249
- var _a, _b;
250
- setRtcList((_a = data === null || data === void 0 ? void 0 : data.recList) !== null && _a !== void 0 ? _a : []);
251
- setCacheRtcList((_b = data === null || data === void 0 ? void 0 : data.recList) !== null && _b !== void 0 ? _b : []);
261
+ setRtcList(getFilterRecList(data));
262
+ setCacheRtcList(getFilterRecList(data));
252
263
  })
253
264
  .finally(() => {
254
265
  bffEventReport({
@@ -268,9 +279,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
268
279
  bffGetTagList();
269
280
  getRecommendVideos()
270
281
  .then((data) => {
271
- var _a, _b;
272
- setRtcList((_a = data === null || data === void 0 ? void 0 : data.recList) !== null && _a !== void 0 ? _a : []);
273
- setCacheRtcList((_b = data === null || data === void 0 ? void 0 : data.recList) !== null && _b !== void 0 ? _b : []);
282
+ setRtcList(getFilterRecList(data));
283
+ setCacheRtcList(getFilterRecList(data));
274
284
  })
275
285
  .finally(() => {
276
286
  setLoading(false);
@@ -4,7 +4,7 @@ import { DEFAULT_TAG } from '../context/SxpDataSourceProvider';
4
4
  export function useEventReport() {
5
5
  const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
6
6
  const jumpToWeb = useCallback((data, product, cta, position) => {
7
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
7
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
8
8
  let fromKName = '';
9
9
  if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
10
10
  fromKName = 'pdpPage';
@@ -35,12 +35,12 @@ export function useEventReport() {
35
35
  position: position + '',
36
36
  contentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
37
37
  ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
38
- traceInfo: (_0 = (_x = (_v = (_r = (_q = (_p = data === null || data === void 0 ? void 0 : data.video) === null || _p === void 0 ? void 0 : _p.bindProduct) === null || _q === void 0 ? void 0 : _q.traceInfo) !== null && _r !== void 0 ? _r : (_u = (_t = (_s = data === null || data === void 0 ? void 0 : data.video) === null || _s === void 0 ? void 0 : _s.bindProducts) === null || _t === void 0 ? void 0 : _t[0]) === null || _u === void 0 ? void 0 : _u.traceInfo) !== null && _v !== void 0 ? _v : (_w = data === null || data === void 0 ? void 0 : data.product) === null || _w === void 0 ? void 0 : _w.traceInfo) !== null && _x !== void 0 ? _x : (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.bindCta) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : ''
38
+ traceInfo: (_1 = (_y = (_w = (_s = (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : (_r = (_q = data === null || data === void 0 ? void 0 : data.video) === null || _q === void 0 ? void 0 : _q.bindProduct) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : (_v = (_u = (_t = data === null || data === void 0 ? void 0 : data.video) === null || _t === void 0 ? void 0 : _t.bindProducts) === null || _u === void 0 ? void 0 : _u[0]) === null || _v === void 0 ? void 0 : _v.traceInfo) !== null && _w !== void 0 ? _w : (_x = data === null || data === void 0 ? void 0 : data.product) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_0 = (_z = data === null || data === void 0 ? void 0 : data.video) === null || _z === void 0 ? void 0 : _z.bindCta) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : ''
39
39
  }
40
40
  });
41
41
  }, [bffEventReport, popupDetailData, isFromHashtag]);
42
42
  const productView = useCallback((data, product, cta, viewTime, position) => {
43
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
43
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
44
44
  let fromKName = '';
45
45
  if (popupDetailData && (((_b = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
46
46
  fromKName = 'pdpPage';
@@ -60,7 +60,7 @@ export function useEventReport() {
60
60
  position: position + '',
61
61
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
62
62
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
63
- traceInfo: (_o = (_l = (_g = (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.traceInfo) !== null && _g !== void 0 ? _g : (_k = (_j = (_h = data === null || data === void 0 ? void 0 : data.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) === null || _k === void 0 ? void 0 : _k.traceInfo) !== null && _l !== void 0 ? _l : (_m = data === null || data === void 0 ? void 0 : data.product) === null || _m === void 0 ? void 0 : _m.traceInfo) !== null && _o !== void 0 ? _o : '',
63
+ traceInfo: (_p = (_m = (_h = (_e = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _e !== void 0 ? _e : (_g = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct) === null || _g === void 0 ? void 0 : _g.traceInfo) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : (_o = data === null || data === void 0 ? void 0 : data.product) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : '',
64
64
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
65
65
  eventSubject: 'productView',
66
66
  eventDescription: 'User browsed the product'
@@ -35,7 +35,7 @@ const AniLink = (_a) => {
35
35
  onClick === null || onClick === void 0 ? void 0 : onClick();
36
36
  }
37
37
  };
38
- const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情 >';
38
+ const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情';
39
39
  const aniTimStyle = useMemo(() => {
40
40
  var _a, _b;
41
41
  const ani = event === null || event === void 0 ? void 0 : event.animation;
@@ -11,7 +11,6 @@ declare const _default: ({
11
11
  name: string[];
12
12
  label: string;
13
13
  options?: undefined;
14
- initialValue?: undefined;
15
14
  fieldProps?: undefined;
16
15
  addonAfter?: undefined;
17
16
  } | {
@@ -22,7 +21,6 @@ declare const _default: ({
22
21
  label: string;
23
22
  value: number;
24
23
  }[];
25
- initialValue: number;
26
24
  fieldProps: {
27
25
  style: {
28
26
  width: string;
@@ -35,7 +33,6 @@ declare const _default: ({
35
33
  name: string[];
36
34
  addonAfter: string;
37
35
  options?: undefined;
38
- initialValue?: undefined;
39
36
  fieldProps?: undefined;
40
37
  })[];
41
38
  })[];
@@ -22,11 +22,10 @@ export default [
22
22
  label: '动画',
23
23
  options: [
24
24
  {
25
- label: '由左向右/中间扩散',
25
+ label: '默认',
26
26
  value: 1
27
27
  }
28
28
  ],
29
- initialValue: 1,
30
29
  fieldProps: {
31
30
  style: {
32
31
  width: '100%'
@@ -18,7 +18,15 @@ const AniLink = createMaterial(AniLinkComponent, {
18
18
  ctaTitle: {
19
19
  fontSize: 15,
20
20
  color: '#fff',
21
- textAlign: 'left'
21
+ textAlign: 'center'
22
+ }
23
+ },
24
+ event: {
25
+ animation: {
26
+ backgroundColor: '#F40082',
27
+ name: 1,
28
+ delay: 1000,
29
+ duration: 2000
22
30
  }
23
31
  }
24
32
  },
@@ -35,7 +35,7 @@ const AniLinkPopup = (_a) => {
35
35
  onClick === null || onClick === void 0 ? void 0 : onClick();
36
36
  }
37
37
  };
38
- const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情 >';
38
+ const title = (cta === null || cta === void 0 ? void 0 : cta.enTitle) || '查看详情';
39
39
  const aniTimStyle = useMemo(() => {
40
40
  const ani = event === null || event === void 0 ? void 0 : event.animation;
41
41
  if (ani) {
@@ -67,7 +67,7 @@ const AniLinkPopup = (_a) => {
67
67
  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 } },
68
68
  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'] })),
69
69
  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 }),
70
- (!recData || (product === null || product === void 0 ? void 0 : product.title)) && (React.createElement("div", { className: styles['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
70
+ (!recData || (product === null || product === void 0 ? void 0 : product.title)) && (React.createElement("div", { className: styles['one-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
71
71
  __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)
72
72
  } })),
73
73
  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: {
@@ -7,14 +7,6 @@ declare const _default: ({
7
7
  } | {
8
8
  title: string;
9
9
  child: ({
10
- type: string;
11
- name: string[];
12
- label: string;
13
- options?: undefined;
14
- initialValue?: undefined;
15
- fieldProps?: undefined;
16
- addonAfter?: undefined;
17
- } | {
18
10
  type: string;
19
11
  name: string[];
20
12
  label: string;
@@ -22,7 +14,6 @@ declare const _default: ({
22
14
  label: string;
23
15
  value: number;
24
16
  }[];
25
- initialValue: number;
26
17
  fieldProps: {
27
18
  style: {
28
19
  width: string;
@@ -35,7 +26,6 @@ declare const _default: ({
35
26
  name: string[];
36
27
  addonAfter: string;
37
28
  options?: undefined;
38
- initialValue?: undefined;
39
29
  fieldProps?: undefined;
40
30
  })[];
41
31
  })[];
@@ -11,22 +11,16 @@ export default [
11
11
  {
12
12
  title: '动画效果',
13
13
  child: [
14
- {
15
- type: 'Color',
16
- name: ['animation', 'backgroundColor'],
17
- label: '动画颜色'
18
- },
19
14
  {
20
15
  type: 'Select',
21
16
  name: ['animation', 'name'],
22
17
  label: '动画',
23
18
  options: [
24
19
  {
25
- label: '由左向右/中间扩散',
20
+ label: '默认',
26
21
  value: 1
27
22
  }
28
23
  ],
29
- initialValue: 1,
30
24
  fieldProps: {
31
25
  style: {
32
26
  width: '100%'
@@ -17,32 +17,39 @@ const AniLinkPopup = createMaterial(AniLinkPopupComponent, {
17
17
  ctaTempStyles: {
18
18
  img: {
19
19
  borderRadius: 3,
20
- width: 76,
21
- height: 76,
22
- marginBottom: 10
20
+ width: 108,
21
+ height: 108,
22
+ marginBottom: 0
23
23
  },
24
24
  title: {
25
- fontSize: 12,
25
+ fontSize: 14,
26
26
  color: '#000',
27
27
  textAlign: 'left'
28
28
  },
29
29
  ctaTitle: {
30
- fontSize: 10,
30
+ width: 108,
31
+ height: 22,
32
+ fontSize: 12,
31
33
  color: '#fff',
32
34
  textAlign: 'center',
33
- width: 76,
34
- height: 20,
35
35
  backgroundColor: 'rgba(0,0,0,1)'
36
36
  }
37
+ },
38
+ event: {
39
+ animation: {
40
+ name: 1,
41
+ delay: 1000,
42
+ duration: 2000
43
+ }
37
44
  }
38
45
  },
39
46
  style: {
40
- width: 90,
41
- height: 160,
47
+ width: 120,
48
+ height: 185,
42
49
  borderRadius: 3,
43
50
  backgroundColor: 'rgba(255,255,255,1)',
44
51
  padding: 7,
45
- margin: 10
52
+ margin: 15
46
53
  }
47
54
  },
48
55
  w: 100,
@@ -19,7 +19,6 @@ export interface ICommodityListProps {
19
19
  price: CSSProperties;
20
20
  };
21
21
  buttonStyle?: CSSProperties;
22
- index?: number;
23
22
  translateY?: number;
24
23
  commodityPicture?: CSSProperties;
25
24
  isExternalLink?: boolean;
@@ -9,12 +9,13 @@ import Img from '../../template/components/Img';
9
9
  import { throttle } from 'lodash';
10
10
  const CommodityList = (_a) => {
11
11
  var _b, _c;
12
- var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, index, translateY = 0, commodityPicture, isExternalLink, onClick } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "index", "translateY", "commodityPicture", "isExternalLink", "onClick"]);
12
+ var { style, isDefault, rec, viewTime, isPost, bottom_image, commodityStyles, buttonStyle, translateY = 0, commodityPicture, isExternalLink, onClick } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "commodityStyles", "buttonStyle", "translateY", "commodityPicture", "isExternalLink", "onClick"]);
13
13
  const { sxpParameter, popupDetailData, setPopupDetailData, ctaEvent } = useSxpDataSource();
14
14
  const { jumpToWeb } = useEventReport();
15
15
  const { popup } = useEditor();
16
16
  const recData = isPost ? rec : popupDetailData;
17
17
  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];
18
+ const index = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
18
19
  const priceText = useCallback((product) => {
19
20
  var _a, _b, _c, _d, _e;
20
21
  if ((product === null || product === void 0 ? void 0 : product.currency) && (product === null || product === void 0 ? void 0 : product.price)) {
@@ -12,7 +12,7 @@ interface ICommodityGroupProps {
12
12
  style?: CSSProperties;
13
13
  onCLick?: (i: number) => void;
14
14
  popupDetailData?: ISxpDataSourceContext['popupDetailData'];
15
- check?: number;
15
+ check: number;
16
16
  }
17
17
  declare const _default: React.NamedExoticComponent<ICommodityGroupProps>;
18
18
  export default _default;
@@ -12,7 +12,8 @@ const CommodityGroup = ({ products, data, defImg, style, onCLick, popupDetailDat
12
12
  const handleClick = (item, index) => {
13
13
  if (check === index)
14
14
  return;
15
- productView(popupDetailData, item, item === null || item === void 0 ? void 0 : item.bindCta, popupCurTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
15
+ const prevItem = products === null || products === void 0 ? void 0 : products[check];
16
+ productView(popupDetailData, prevItem, prevItem === null || prevItem === void 0 ? void 0 : prevItem.bindCta, popupCurTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
16
17
  onCLick === null || onCLick === void 0 ? void 0 : onCLick(index);
17
18
  };
18
19
  return (React.createElement(React.Fragment, null, (data === null || data === void 0 ? void 0 : data.open) && ((products && (products === null || products === void 0 ? void 0 : products.length) > 1) || !popupDetailData) && (React.createElement(Scroll, { enableSlideActive: true, isPadding: false, style: Object.assign(Object.assign({}, style), data === null || data === void 0 ? void 0 : data.style) }, (_a = (popupDetailData ? products : [0, 1, 2, 3])) === null || _a === void 0 ? void 0 : _a.map((item, index) => {
@@ -5,6 +5,7 @@ interface IFormatImageProps {
5
5
  style?: CSSProperties;
6
6
  className?: any;
7
7
  loading?: 'eager' | 'lazy';
8
+ alt?: string;
8
9
  }
9
10
  interface IFormatImageRefProps {
10
11
  setSrc: (v: string) => void;