pb-sxp-ui 1.6.1 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/index.cjs +19 -19
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +19 -19
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +3 -3
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +3 -3
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +19 -19
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +3 -3
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/SxpPageRender/index.js +1 -1
  14. package/es/materials/sxp/cta/AniLink/index.d.ts +1 -0
  15. package/es/materials/sxp/cta/AniLink/index.js +3 -3
  16. package/es/materials/sxp/cta/AniLinkPopup/index.js +1 -1
  17. package/es/materials/sxp/template/Appoint/index.d.ts +1 -0
  18. package/es/materials/sxp/template/Appoint/index.js +2 -2
  19. package/es/materials/sxp/template/Commodity/index.d.ts +1 -0
  20. package/es/materials/sxp/template/Commodity/index.js +2 -2
  21. package/es/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
  22. package/es/materials/sxp/template/CommodityDiro/index.js +2 -2
  23. package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
  24. package/es/materials/sxp/template/CommodityDiroNew/index.js +2 -2
  25. package/es/materials/sxp/template/Link/index.d.ts +1 -0
  26. package/es/materials/sxp/template/Link/index.js +2 -2
  27. package/es/materials/sxp/template/components/Img.js +2 -2
  28. package/lib/core/components/SxpPageRender/index.js +1 -1
  29. package/lib/materials/sxp/cta/AniLink/index.d.ts +1 -0
  30. package/lib/materials/sxp/cta/AniLink/index.js +3 -3
  31. package/lib/materials/sxp/cta/AniLinkPopup/index.js +1 -1
  32. package/lib/materials/sxp/template/Appoint/index.d.ts +1 -0
  33. package/lib/materials/sxp/template/Appoint/index.js +2 -2
  34. package/lib/materials/sxp/template/Commodity/index.d.ts +1 -0
  35. package/lib/materials/sxp/template/Commodity/index.js +2 -2
  36. package/lib/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
  37. package/lib/materials/sxp/template/CommodityDiro/index.js +2 -2
  38. package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
  39. package/lib/materials/sxp/template/CommodityDiroNew/index.js +2 -2
  40. package/lib/materials/sxp/template/Link/index.d.ts +1 -0
  41. package/lib/materials/sxp/template/Link/index.js +2 -2
  42. package/lib/materials/sxp/template/components/Img.js +2 -2
  43. package/package.json +1 -1
@@ -272,7 +272,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
272
272
  React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex }))) : null,
273
273
  React.createElement("div", null,
274
274
  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 }),
275
- React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
275
+ React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex }),
276
276
  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 }))),
277
277
  React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
278
278
  }
@@ -9,6 +9,7 @@ export interface IAniLinkProps {
9
9
  event?: any;
10
10
  onClick?: () => void;
11
11
  isExternalLink?: boolean;
12
+ isActive?: boolean;
12
13
  }
13
14
  declare const _default: React.NamedExoticComponent<IAniLinkProps>;
14
15
  export default _default;
@@ -8,7 +8,7 @@ import styles from './index.module.less';
8
8
  import useOnScreen from '../../../../core/hooks/useOnScreen';
9
9
  const AniLink = (_a) => {
10
10
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
11
- var { style, recData, ctaTempStyles, index, event, onClick, isExternalLink = false } = _a, props = __rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "onClick", "isExternalLink"]);
11
+ var { style, recData, ctaTempStyles, index, event, onClick, isExternalLink = false, isActive } = _a, props = __rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "onClick", "isExternalLink", "isActive"]);
12
12
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
13
13
  const { jumpToWeb } = useEventReport();
14
14
  const [visible, setVisible] = useState(false);
@@ -52,13 +52,13 @@ const AniLink = (_a) => {
52
52
  }, [event === null || event === void 0 ? void 0 : event.animation]);
53
53
  useEffect(() => {
54
54
  var _a, _b, _c;
55
- if (isOnScreen && (ref === null || ref === void 0 ? void 0 : ref.current)) {
55
+ if (isOnScreen && (ref === null || ref === void 0 ? void 0 : ref.current) && isActive) {
56
56
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
57
57
  eventSubject: 'ctaExposure',
58
58
  eventDescription: 'The cta was shown to the user'
59
59
  }, recData, ((_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), index);
60
60
  }
61
- }, [isOnScreen]);
61
+ }, [isOnScreen, isActive]);
62
62
  useEffect(() => {
63
63
  if (isOnScreen) {
64
64
  setVisible(true);
@@ -66,7 +66,7 @@ const AniLinkPopup = (_a) => {
66
66
  } }, "Cta Title")) : (React.createElement("div", Object.assign({}, 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 }),
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
- 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 }),
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, isActive: isActive }),
70
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
  } })),
@@ -10,6 +10,7 @@ export interface IAppointProps {
10
10
  ctaTempStyles?: ICtaTempStylesType;
11
11
  isExternalLink?: boolean;
12
12
  index?: number;
13
+ isActive?: boolean;
13
14
  }
14
15
  declare const _default: React.NamedExoticComponent<IAppointProps>;
15
16
  export default _default;
@@ -7,12 +7,12 @@ import Img from '../components/Img';
7
7
  import { setFontForText } from '../../../../core/utils/tool';
8
8
  const Appoint = (_a) => {
9
9
  var _b, _c, _d, _e, _f, _g;
10
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
10
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, index, isActive } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "index", "isActive"]);
11
11
  const { sxpParameter } = useSxpDataSource();
12
12
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
13
13
  const src = (_d = (_c = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image;
14
14
  return (React.createElement(EventProvider, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' }, index: index }, props),
15
- React.createElement(Img, { src: src, rec: recData, item: (_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) !== null && _f !== void 0 ? _f : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
15
+ React.createElement(Img, { src: src, rec: recData, item: (_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) !== null && _f !== void 0 ? _f : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
16
16
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
17
17
  __html: setFontForText((_g = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _g !== void 0 ? _g : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
18
18
  } })));
@@ -11,6 +11,7 @@ export interface ICommodityProps {
11
11
  isExternalLink?: boolean;
12
12
  index?: number;
13
13
  translateY?: number;
14
+ isActive?: boolean;
14
15
  }
15
16
  declare const _default: React.NamedExoticComponent<ICommodityProps>;
16
17
  export default _default;
@@ -8,12 +8,12 @@ import Img from '../components/Img';
8
8
  import { setFontForText } from '../../../../core/utils/tool';
9
9
  const Commodity = (_a) => {
10
10
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
11
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index"]);
11
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index, isActive } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index", "isActive"]);
12
12
  const { sxpParameter } = useSxpDataSource();
13
13
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
14
14
  const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
15
15
  return (React.createElement(EventProvider, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' }, index: index }, props),
16
- React.createElement(Img, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
16
+ React.createElement(Img, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
17
17
  React.createElement("div", { className: css({
18
18
  color: '#fff',
19
19
  display: 'flex',
@@ -11,6 +11,7 @@ export interface ICommodityDiroProps {
11
11
  isExternalLink?: boolean;
12
12
  index?: number;
13
13
  translateY?: number;
14
+ isActive?: boolean;
14
15
  }
15
16
  declare const _default: React.NamedExoticComponent<ICommodityDiroProps>;
16
17
  export default _default;
@@ -8,12 +8,12 @@ import Img from '../components/Img';
8
8
  import { setFontForText } from '../../../../core/utils/tool';
9
9
  const CommodityDiro = (_a) => {
10
10
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
11
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index"]);
11
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index, isActive } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index", "isActive"]);
12
12
  const { sxpParameter } = useSxpDataSource();
13
13
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
14
14
  const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
15
15
  return (React.createElement(EventProvider, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' }, index: index }, props),
16
- React.createElement(Img, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
16
+ React.createElement(Img, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
17
17
  React.createElement("div", { className: css({
18
18
  color: '#fff',
19
19
  display: 'flex',
@@ -11,6 +11,7 @@ export interface ICommodityDiroNewProps {
11
11
  isExternalLink?: boolean;
12
12
  index?: number;
13
13
  translateY?: number;
14
+ isActive?: boolean;
14
15
  }
15
16
  declare const _default: React.NamedExoticComponent<ICommodityDiroNewProps>;
16
17
  export default _default;
@@ -8,12 +8,12 @@ import Img from '../components/Img';
8
8
  import { setFontForText } from '../../../../core/utils/tool';
9
9
  const CommodityDiroNew = (_a) => {
10
10
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
11
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index"]);
11
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index, isActive } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index", "isActive"]);
12
12
  const { sxpParameter } = useSxpDataSource();
13
13
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
14
14
  const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
15
15
  return (React.createElement(EventProvider, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' }, index: index }, props),
16
- React.createElement(Img, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
16
+ React.createElement(Img, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
17
17
  React.createElement("div", { className: css({
18
18
  color: '#fff',
19
19
  display: 'flex',
@@ -14,6 +14,7 @@ export interface ILinkProps {
14
14
  display?: boolean;
15
15
  text?: string;
16
16
  };
17
+ isActive?: boolean;
17
18
  }
18
19
  declare const _default: React.NamedExoticComponent<ILinkProps>;
19
20
  export default _default;
@@ -9,14 +9,14 @@ import { setFontForText } from '../../../../core/utils/tool';
9
9
  import styles from './index.module.less';
10
10
  const Link = (_a) => {
11
11
  var _b, _c, _d, _e, _f, _g, _h, _j, _k;
12
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
12
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle, isActive } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle", "isActive"]);
13
13
  const { sxpParameter, bffEventReport } = useSxpDataSource();
14
14
  const { jumpToWeb } = useEventReport();
15
15
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
16
16
  const product = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
17
17
  const src = (_e = (_d = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
18
18
  return (React.createElement(EventProvider, Object.assign({ index: index, rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { jumpLink: (_f = cta === null || cta === void 0 ? void 0 : cta.link) !== null && _f !== void 0 ? _f : '' }),
19
- React.createElement(Img, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
19
+ React.createElement(Img, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
20
20
  React.createElement("div", { className: css({
21
21
  display: 'flex',
22
22
  alignItems: 'center',
@@ -9,14 +9,14 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle, enableEventRe
9
9
  const { ctaEvent } = useSxpDataSource();
10
10
  const [visible, setVisible] = useState(false);
11
11
  useEffect(() => {
12
- if (isOnScreen && src && (ref === null || ref === void 0 ? void 0 : ref.current) && enableEventReport && !visible) {
12
+ if (isOnScreen && src && (ref === null || ref === void 0 ? void 0 : ref.current) && enableEventReport && !visible && isActive) {
13
13
  setVisible(true);
14
14
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
15
15
  eventSubject: 'ctaExposure',
16
16
  eventDescription: 'The cta was shown to the user'
17
17
  }, rec, item, index);
18
18
  }
19
- }, [isOnScreen, src, ref, rec, ctaEvent, item, index, enableEventReport, visible]);
19
+ }, [isOnScreen, src, ref, rec, ctaEvent, item, index, enableEventReport, visible, isActive]);
20
20
  const imgSrc = useMemo(() => {
21
21
  return (src === null || src === void 0 ? void 0 : src.includes('.avif')) ? src : `${src}?imrquality/rquality/20`;
22
22
  }, [src]);
@@ -275,7 +275,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
275
275
  react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, isActive: index === activeIndex }))) : null,
276
276
  react_1.default.createElement("div", null,
277
277
  react_1.default.createElement(ExpandableText_1.default, { 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 }),
278
- react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'] }),
278
+ react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLink'], isActive: index === activeIndex }),
279
279
  react_1.default.createElement(Hashtag_1.default, { 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 }))),
280
280
  react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex })));
281
281
  }
@@ -9,6 +9,7 @@ export interface IAniLinkProps {
9
9
  event?: any;
10
10
  onClick?: () => void;
11
11
  isExternalLink?: boolean;
12
+ isActive?: boolean;
12
13
  }
13
14
  declare const _default: React.NamedExoticComponent<IAniLinkProps>;
14
15
  export default _default;
@@ -10,7 +10,7 @@ const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less
10
10
  const useOnScreen_1 = tslib_1.__importDefault(require("../../../../core/hooks/useOnScreen"));
11
11
  const AniLink = (_a) => {
12
12
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
13
- var { style, recData, ctaTempStyles, index, event, onClick, isExternalLink = false } = _a, props = tslib_1.__rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "onClick", "isExternalLink"]);
13
+ var { style, recData, ctaTempStyles, index, event, onClick, isExternalLink = false, isActive } = _a, props = tslib_1.__rest(_a, ["style", "recData", "ctaTempStyles", "index", "event", "onClick", "isExternalLink", "isActive"]);
14
14
  const { ctaEvent, setPopupDetailData } = (0, hooks_1.useSxpDataSource)();
15
15
  const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
16
16
  const [visible, setVisible] = (0, react_1.useState)(false);
@@ -54,13 +54,13 @@ const AniLink = (_a) => {
54
54
  }, [event === null || event === void 0 ? void 0 : event.animation]);
55
55
  (0, react_1.useEffect)(() => {
56
56
  var _a, _b, _c;
57
- if (isOnScreen && (ref === null || ref === void 0 ? void 0 : ref.current)) {
57
+ if (isOnScreen && (ref === null || ref === void 0 ? void 0 : ref.current) && isActive) {
58
58
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
59
59
  eventSubject: 'ctaExposure',
60
60
  eventDescription: 'The cta was shown to the user'
61
61
  }, recData, ((_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), index);
62
62
  }
63
- }, [isOnScreen]);
63
+ }, [isOnScreen, isActive]);
64
64
  (0, react_1.useEffect)(() => {
65
65
  if (isOnScreen) {
66
66
  setVisible(true);
@@ -68,7 +68,7 @@ const AniLinkPopup = (_a) => {
68
68
  } }, "Cta Title")) : (react_1.default.createElement("div", Object.assign({}, props, { className: `${(0, css_1.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))` }))} ${index_module_less_1.default['aniLinkPopup']} ${aniNamStyle} ${(0, css_1.css)(aniTimStyle)}`, onClick: handleTo }),
69
69
  react_1.default.createElement("div", { onClick: onClose, className: index_module_less_1.default['modal-icon-wrapper'], style: { padding: (_s = style === null || style === void 0 ? void 0 : style['padding']) !== null && _s !== void 0 ? _s : 0 } },
70
70
  react_1.default.createElement("img", { src: (_t = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) !== null && _t !== void 0 ? _t : closeIcon, alt: 'close', className: index_module_less_1.default['modal-icon-wrapper-img'] })),
71
- react_1.default.createElement(Img_1.default, { 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 }),
71
+ react_1.default.createElement(Img_1.default, { 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, isActive: isActive }),
72
72
  (!recData || (product === null || product === void 0 ? void 0 : product.title)) && (react_1.default.createElement("div", { className: index_module_less_1.default['one-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title, dangerouslySetInnerHTML: {
73
73
  __html: (0, tool_1.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)
74
74
  } })),
@@ -10,6 +10,7 @@ export interface IAppointProps {
10
10
  ctaTempStyles?: ICtaTempStylesType;
11
11
  isExternalLink?: boolean;
12
12
  index?: number;
13
+ isActive?: boolean;
13
14
  }
14
15
  declare const _default: React.NamedExoticComponent<IAppointProps>;
15
16
  export default _default;
@@ -9,12 +9,12 @@ const Img_1 = tslib_1.__importDefault(require("../components/Img"));
9
9
  const tool_1 = require("../../../../core/utils/tool");
10
10
  const Appoint = (_a) => {
11
11
  var _b, _c, _d, _e, _f, _g;
12
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
12
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, index, isActive } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "index", "isActive"]);
13
13
  const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
14
14
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
15
15
  const src = (_d = (_c = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image;
16
16
  return (react_1.default.createElement(EventProvider_1.default, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: (0, css_1.css)(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' }, index: index }, props),
17
- react_1.default.createElement(Img_1.default, { src: src, rec: recData, item: (_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) !== null && _f !== void 0 ? _f : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
17
+ react_1.default.createElement(Img_1.default, { src: src, rec: recData, item: (_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) !== null && _f !== void 0 ? _f : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
18
18
  react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)), dangerouslySetInnerHTML: {
19
19
  __html: (0, tool_1.setFontForText)((_g = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _g !== void 0 ? _g : 'Product Name', ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)
20
20
  } })));
@@ -11,6 +11,7 @@ export interface ICommodityProps {
11
11
  isExternalLink?: boolean;
12
12
  index?: number;
13
13
  translateY?: number;
14
+ isActive?: boolean;
14
15
  }
15
16
  declare const _default: React.NamedExoticComponent<ICommodityProps>;
16
17
  export default _default;
@@ -10,12 +10,12 @@ const Img_1 = tslib_1.__importDefault(require("../components/Img"));
10
10
  const tool_1 = require("../../../../core/utils/tool");
11
11
  const Commodity = (_a) => {
12
12
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
13
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index"]);
13
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index, isActive } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index", "isActive"]);
14
14
  const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
15
15
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
16
16
  const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
17
17
  return (react_1.default.createElement(EventProvider_1.default, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: (0, css_1.css)(Object.assign({}, style)), style: { display: 'flex' }, index: index }, props),
18
- react_1.default.createElement(Img_1.default, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
18
+ react_1.default.createElement(Img_1.default, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
19
19
  react_1.default.createElement("div", { className: (0, css_1.css)({
20
20
  color: '#fff',
21
21
  display: 'flex',
@@ -11,6 +11,7 @@ export interface ICommodityDiroProps {
11
11
  isExternalLink?: boolean;
12
12
  index?: number;
13
13
  translateY?: number;
14
+ isActive?: boolean;
14
15
  }
15
16
  declare const _default: React.NamedExoticComponent<ICommodityDiroProps>;
16
17
  export default _default;
@@ -10,12 +10,12 @@ const Img_1 = tslib_1.__importDefault(require("../components/Img"));
10
10
  const tool_1 = require("../../../../core/utils/tool");
11
11
  const CommodityDiro = (_a) => {
12
12
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
13
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index"]);
13
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index, isActive } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index", "isActive"]);
14
14
  const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
15
15
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
16
16
  const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
17
17
  return (react_1.default.createElement(EventProvider_1.default, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: (0, css_1.css)(Object.assign({}, style)), style: { display: 'flex' }, index: index }, props),
18
- react_1.default.createElement(Img_1.default, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
18
+ react_1.default.createElement(Img_1.default, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
19
19
  react_1.default.createElement("div", { className: (0, css_1.css)({
20
20
  color: '#fff',
21
21
  display: 'flex',
@@ -11,6 +11,7 @@ export interface ICommodityDiroNewProps {
11
11
  isExternalLink?: boolean;
12
12
  index?: number;
13
13
  translateY?: number;
14
+ isActive?: boolean;
14
15
  }
15
16
  declare const _default: React.NamedExoticComponent<ICommodityDiroNewProps>;
16
17
  export default _default;
@@ -10,12 +10,12 @@ const Img_1 = tslib_1.__importDefault(require("../components/Img"));
10
10
  const tool_1 = require("../../../../core/utils/tool");
11
11
  const CommodityDiroNew = (_a) => {
12
12
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
13
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index"]);
13
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0, index, isActive } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY", "index", "isActive"]);
14
14
  const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
15
15
  const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
16
16
  const src = (_f = (_e = (_c = product === null || product === void 0 ? void 0 : product.cover) !== null && _c !== void 0 ? _c : (_d = product === null || product === void 0 ? void 0 : product.homePage) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _f !== void 0 ? _f : bottom_image;
17
17
  return (react_1.default.createElement(EventProvider_1.default, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: (0, css_1.css)(Object.assign({}, style)), style: { display: 'flex' }, index: index }, props),
18
- react_1.default.createElement(Img_1.default, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
18
+ react_1.default.createElement(Img_1.default, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
19
19
  react_1.default.createElement("div", { className: (0, css_1.css)({
20
20
  color: '#fff',
21
21
  display: 'flex',
@@ -14,6 +14,7 @@ export interface ILinkProps {
14
14
  display?: boolean;
15
15
  text?: string;
16
16
  };
17
+ isActive?: boolean;
17
18
  }
18
19
  declare const _default: React.NamedExoticComponent<ILinkProps>;
19
20
  export default _default;
@@ -11,14 +11,14 @@ const tool_1 = require("../../../../core/utils/tool");
11
11
  const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
12
12
  const Link = (_a) => {
13
13
  var _b, _c, _d, _e, _f, _g, _h, _j, _k;
14
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle"]);
14
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index, customTitle, isActive } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index", "customTitle", "isActive"]);
15
15
  const { sxpParameter, bffEventReport } = (0, hooks_1.useSxpDataSource)();
16
16
  const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
17
17
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
18
18
  const product = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
19
19
  const src = (_e = (_d = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
20
20
  return (react_1.default.createElement(EventProvider_1.default, Object.assign({ index: index, rec: recData, className: (0, css_1.css)(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { jumpLink: (_f = cta === null || cta === void 0 ? void 0 : cta.link) !== null && _f !== void 0 ? _f : '' }),
21
- react_1.default.createElement(Img_1.default, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img }),
21
+ react_1.default.createElement(Img_1.default, { src: src, rec: recData, item: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindProduct) !== null && _h !== void 0 ? _h : recData === null || recData === void 0 ? void 0 : recData.video, index: index, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
22
22
  react_1.default.createElement("div", { className: (0, css_1.css)({
23
23
  display: 'flex',
24
24
  alignItems: 'center',
@@ -12,14 +12,14 @@ const Img = ({ src, rec, item, index, style, translateY, imgStyle, enableEventRe
12
12
  const { ctaEvent } = (0, hooks_1.useSxpDataSource)();
13
13
  const [visible, setVisible] = (0, react_1.useState)(false);
14
14
  (0, react_1.useEffect)(() => {
15
- if (isOnScreen && src && (ref === null || ref === void 0 ? void 0 : ref.current) && enableEventReport && !visible) {
15
+ if (isOnScreen && src && (ref === null || ref === void 0 ? void 0 : ref.current) && enableEventReport && !visible && isActive) {
16
16
  setVisible(true);
17
17
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
18
18
  eventSubject: 'ctaExposure',
19
19
  eventDescription: 'The cta was shown to the user'
20
20
  }, rec, item, index);
21
21
  }
22
- }, [isOnScreen, src, ref, rec, ctaEvent, item, index, enableEventReport, visible]);
22
+ }, [isOnScreen, src, ref, rec, ctaEvent, item, index, enableEventReport, visible, isActive]);
23
23
  const imgSrc = (0, react_1.useMemo)(() => {
24
24
  return (src === null || src === void 0 ? void 0 : src.includes('.avif')) ? src : `${src}?imrquality/rquality/20`;
25
25
  }, [src]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",