pb-sxp-ui 1.10.2 → 1.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/index.cjs +58 -31
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +58 -31
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +4 -4
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +4 -4
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +58 -31
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +4 -4
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/SxpPageRender/WaterFall/List.js +2 -2
  14. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +2 -2
  15. package/es/core/components/SxpPageRender/index.js +2 -2
  16. package/es/core/context/SxpDataSourceProvider.d.ts +6 -0
  17. package/es/core/context/SxpDataSourceProvider.js +18 -1
  18. package/es/core/hooks/useEventReport.d.ts +1 -1
  19. package/es/core/hooks/useEventReport.js +10 -3
  20. package/es/materials/sxp/cta/AniLink/index.js +2 -2
  21. package/es/materials/sxp/cta/AniLinkPopup/index.js +2 -2
  22. package/es/materials/sxp/popup/AppointForm/index.js +2 -2
  23. package/es/materials/sxp/popup/CommodityDetail/index.js +2 -2
  24. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -2
  25. package/es/materials/sxp/popup/CommodityList/index.js +3 -3
  26. package/es/materials/sxp/popup/Prompt/index.js +2 -2
  27. package/es/materials/sxp/template/Link/index.js +1 -3
  28. package/es/materials/sxp/template/components/EventProvider.js +3 -3
  29. package/lib/core/components/SxpPageRender/WaterFall/List.js +2 -2
  30. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +2 -2
  31. package/lib/core/components/SxpPageRender/index.js +2 -2
  32. package/lib/core/context/SxpDataSourceProvider.d.ts +6 -0
  33. package/lib/core/context/SxpDataSourceProvider.js +18 -1
  34. package/lib/core/hooks/useEventReport.d.ts +1 -1
  35. package/lib/core/hooks/useEventReport.js +10 -3
  36. package/lib/materials/sxp/cta/AniLink/index.js +2 -2
  37. package/lib/materials/sxp/cta/AniLinkPopup/index.js +2 -2
  38. package/lib/materials/sxp/popup/AppointForm/index.js +2 -2
  39. package/lib/materials/sxp/popup/CommodityDetail/index.js +2 -2
  40. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +2 -2
  41. package/lib/materials/sxp/popup/CommodityList/index.js +3 -3
  42. package/lib/materials/sxp/popup/Prompt/index.js +2 -2
  43. package/lib/materials/sxp/template/Link/index.js +1 -3
  44. package/lib/materials/sxp/template/components/EventProvider.js +3 -3
  45. package/package.json +1 -1
package/dist/pb-ui.js CHANGED
@@ -674,6 +674,7 @@
674
674
  const [showConsent, setShowConsent] = React.useState(false);
675
675
  const [layoutVariantId, setLayoutVariantId] = React.useState();
676
676
  const [channel, setChannel] = React.useState();
677
+ const [eventTimeList, setEventTimeList] = React.useState([]);
677
678
  const isShowConsent = React.useMemo(() => {
678
679
  var _a, _b, _c, _d;
679
680
  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) &&
@@ -696,6 +697,24 @@
696
697
  })) !== null && _a !== void 0 ? _a : [];
697
698
  return nList;
698
699
  }, []);
700
+ React.useEffect(() => {
701
+ let intervalId;
702
+ if (eventTimeList.length > 0) {
703
+ // 定期检查数组中的时间
704
+ const checkTimes = () => {
705
+ const now = new Date(); // 获取当前时间
706
+ const threshold = 15 * 1000; // 15秒的毫秒数
707
+ // 过滤掉超过15秒的时间
708
+ setEventTimeList((prevArray) => prevArray.filter((item) => now - item.time <= threshold));
709
+ };
710
+ // 每秒检查一次
711
+ intervalId = setInterval(checkTimes, 1000);
712
+ }
713
+ // 清理函数
714
+ return () => {
715
+ clearInterval(intervalId);
716
+ };
717
+ }, [eventTimeList]); // 依赖于 timeArray
699
718
  React.useEffect(() => {
700
719
  const handleChangeThemeTag = (tag) => {
701
720
  themeTag.current = tag;
@@ -1125,7 +1144,9 @@
1125
1144
  isEditor,
1126
1145
  isNoMoreData,
1127
1146
  updateChannel,
1128
- channel
1147
+ channel,
1148
+ eventTimeList,
1149
+ setEventTimeList
1129
1150
  } }, isShowConsent ? (React.createElement(Consent$4, Object.assign({}, (_e = (_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.props))) : (render({
1130
1151
  rtcList,
1131
1152
  mutateLike: bffMutateLike,
@@ -1586,14 +1607,21 @@
1586
1607
  * @Author: binruan@chatlabs.com
1587
1608
  * @Date: 2024-03-12 10:59:06
1588
1609
  * @LastEditors: binruan@chatlabs.com
1589
- * @LastEditTime: 2024-08-28 17:51:37
1610
+ * @LastEditTime: 2024-11-28 11:17:16
1590
1611
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
1591
1612
  *
1592
1613
  */
1593
1614
  function useEventReport() {
1594
- const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
1595
- const jumpToWeb = React.useCallback((data, product, cta, position, traceInfo) => {
1615
+ const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
1616
+ const jumpToWeb = React.useCallback((e, data, product, cta, position, traceInfo) => {
1596
1617
  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, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
1618
+ const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
1619
+ if (i !== -1) {
1620
+ return;
1621
+ }
1622
+ else if (e) {
1623
+ setEventTimeList === null || setEventTimeList === void 0 ? void 0 : setEventTimeList((prev) => [...prev, { target: e === null || e === void 0 ? void 0 : e.target, time: new Date() }]);
1624
+ }
1597
1625
  let fromKName = '';
1598
1626
  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))) {
1599
1627
  fromKName = 'pdpPage';
@@ -1621,7 +1649,7 @@
1621
1649
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
1622
1650
  eventInfo: Object.assign({ eventSubject: 'jumpToWeb', eventDescription: 'User jumped to website', productId: (_v = product === null || product === void 0 ? void 0 : product.itemId) !== null && _v !== void 0 ? _v : '', productName: (_w = product === null || product === void 0 ? void 0 : product.title) !== null && _w !== void 0 ? _w : '', price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0', productCollection: (_x = product === null || product === void 0 ? void 0 : product.collection) !== null && _x !== void 0 ? _x : '', fromKName, fromKPage: location === null || location === void 0 ? void 0 : location.href, contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.itemId) !== null && _z !== void 0 ? _z : '', ctatId: (_0 = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _0 !== void 0 ? _0 : '', traceInfo: (_13 = (_10 = (_8 = (_4 = (_1 = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _1 !== void 0 ? _1 : (_3 = (_2 = data === null || data === void 0 ? void 0 : data.video) === null || _2 === void 0 ? void 0 : _2.bindProduct) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_7 = (_6 = (_5 = data === null || data === void 0 ? void 0 : data.video) === null || _5 === void 0 ? void 0 : _5.bindProducts) === null || _6 === void 0 ? void 0 : _6[0]) === null || _7 === void 0 ? void 0 : _7.traceInfo) !== null && _8 !== void 0 ? _8 : (_9 = data === null || data === void 0 ? void 0 : data.product) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : (_12 = (_11 = data === null || data === void 0 ? void 0 : data.video) === null || _11 === void 0 ? void 0 : _11.bindCta) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : '' }, (contentFormat && { contentFormat }))
1623
1651
  });
1624
- }, [bffEventReport, popupDetailData, isFromHashtag]);
1652
+ }, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
1625
1653
  const productView = React.useCallback((data, product, cta, viewTime, position) => {
1626
1654
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1627
1655
  let fromKName = '';
@@ -1727,7 +1755,7 @@
1727
1755
  const { name, value } = e.target;
1728
1756
  setFormData(Object.assign(Object.assign({}, formData), { [name]: value }));
1729
1757
  }, [formData]);
1730
- const handleSubmit = lodash.debounce(() => __awaiter(void 0, void 0, void 0, function* () {
1758
+ const handleSubmit = lodash.debounce((e) => __awaiter(void 0, void 0, void 0, function* () {
1731
1759
  var _d, _e, _f, _g, _h;
1732
1760
  const vals = formData;
1733
1761
  if (!vals)
@@ -1750,7 +1778,7 @@
1750
1778
  const product = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
1751
1779
  const cta = (_h = (_g = data === null || data === void 0 ? void 0 : data.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.bindCta;
1752
1780
  const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
1753
- jumpToWeb(data, product, cta, position);
1781
+ jumpToWeb(e, data, product, cta, position);
1754
1782
  }
1755
1783
  if (!isPopup) {
1756
1784
  onClose === null || onClose === void 0 ? void 0 : onClose();
@@ -10197,9 +10225,9 @@
10197
10225
  product = p;
10198
10226
  cta = p === null || p === void 0 ? void 0 : p.bindCta;
10199
10227
  }
10200
- const handleLink = () => {
10228
+ const handleLink = (e) => {
10201
10229
  if (product === null || product === void 0 ? void 0 : product.link) {
10202
- jumpToWeb(data, product, cta, position);
10230
+ jumpToWeb(e, data, product, cta, position);
10203
10231
  if (!isPost) {
10204
10232
  productView(data, product, cta, viewTime || curTimeRef.current, position);
10205
10233
  }
@@ -10659,14 +10687,14 @@
10659
10687
  const { popupDetailData } = useSxpDataSource();
10660
10688
  const { jumpToWeb } = useEventReport();
10661
10689
  const iconSrc = typeof icon === 'string' ? icon : getMediaValueByMode(icon);
10662
- const handleOk = () => {
10690
+ const handleOk = (e) => {
10663
10691
  var _a, _b, _c;
10664
10692
  if (isExternalLink) {
10665
10693
  const data = popupDetailData;
10666
10694
  const product = (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProduct;
10667
10695
  const cta = (_c = (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct) === null || _c === void 0 ? void 0 : _c.bindCta;
10668
10696
  const position = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
10669
- jumpToWeb(data, product, cta, position);
10697
+ jumpToWeb(e, data, product, cta, position);
10670
10698
  }
10671
10699
  if (!isPopup) {
10672
10700
  onClose === null || onClose === void 0 ? void 0 : onClose();
@@ -11108,9 +11136,9 @@
11108
11136
  product = p;
11109
11137
  cta = p === null || p === void 0 ? void 0 : p.bindCta;
11110
11138
  }
11111
- const handleLink = () => {
11139
+ const handleLink = (e) => {
11112
11140
  if (product === null || product === void 0 ? void 0 : product.link) {
11113
- jumpToWeb(data, product, cta, position);
11141
+ jumpToWeb(e, data, product, cta, position);
11114
11142
  if (!isPost) {
11115
11143
  productView(data, product, cta, viewTime || curTimeRef.current, position);
11116
11144
  }
@@ -11791,7 +11819,7 @@ Made in Italy` })));
11791
11819
  style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price
11792
11820
  });
11793
11821
  }, [(_d = commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price) === null || _d === void 0 ? void 0 : _d.enableFormattedPrice, globalConfig]);
11794
- const handleClick = lodash.throttle((item, multiCheckIndex) => {
11822
+ const handleClick = lodash.throttle((item, multiCheckIndex, e) => {
11795
11823
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
11796
11824
  eventSubject: 'clickCta',
11797
11825
  eventDescription: 'User clicked the CTA'
@@ -11799,7 +11827,7 @@ Made in Italy` })));
11799
11827
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { video: Object.assign(Object.assign({}, recData === null || recData === void 0 ? void 0 : recData.video), { bindProduct: item }), index, multiCheckIndex }));
11800
11828
  if (isExternalLink) {
11801
11829
  if (item === null || item === void 0 ? void 0 : item.link) {
11802
- jumpToWeb(recData, item, item.bindCta, index);
11830
+ jumpToWeb(e, recData, item, item.bindCta, index);
11803
11831
  window.location.href = window.getJointUtmLink(item.link);
11804
11832
  }
11805
11833
  }
@@ -11814,7 +11842,7 @@ Made in Italy` })));
11814
11842
  }, []);
11815
11843
  return (React.createElement("ul", { role: 'list', className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexDirection: 'column', gap: '10px', padding: '0 20px', marginTop: '50px', boxSizing: 'border-box' })) }, product === null || product === void 0 ? void 0 : product.map((item, index) => {
11816
11844
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
11817
- return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement("li", { role: 'listitem', key: index, onClick: () => handleClick(item, index) },
11845
+ return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement("li", { role: 'listitem', key: index, onClick: (e) => handleClick(item, index, e) },
11818
11846
  React.createElement("button", Object.assign({ role: 'button', "aria-label": item === null || item === void 0 ? void 0 : item.title, tabIndex: 0, className: css.css({
11819
11847
  display: 'flex',
11820
11848
  alignItems: 'normal',
@@ -12324,9 +12352,9 @@ Made in Italy` })));
12324
12352
  const { setPopupDetailData, ctaEvent } = useSxpDataSource();
12325
12353
  const { jumpToWeb } = useEventReport();
12326
12354
  const [element, setElement] = React.useState(null);
12327
- const handleClick = lodash.throttle((event) => {
12355
+ const handleClick = lodash.throttle((e) => {
12328
12356
  var _a, _b, _c, _d, _e, _f;
12329
- event.preventDefault();
12357
+ e.preventDefault();
12330
12358
  const item = multItem ? multItem : (_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) !== null && _b !== void 0 ? _b : rec === null || rec === void 0 ? void 0 : rec.video;
12331
12359
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
12332
12360
  eventSubject: 'clickCta',
@@ -12340,7 +12368,7 @@ Made in Italy` })));
12340
12368
  if (jumpLink || link) {
12341
12369
  const cta = ((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta) || (multItem === null || multItem === void 0 ? void 0 : multItem.bindCta);
12342
12370
  const product = ((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct) || multItem;
12343
- jumpToWeb(rec, product, cta, index);
12371
+ jumpToWeb(e, rec, product, cta, index);
12344
12372
  window.location.href = window.getJointUtmLink(jumpLink || link || '');
12345
12373
  }
12346
12374
  }
@@ -12639,8 +12667,7 @@ Made in Italy` })));
12639
12667
  const Link$1 = (_a) => {
12640
12668
  var _b, _c, _d, _e, _f, _g, _h, _j, _k;
12641
12669
  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"]);
12642
- const { sxpParameter, bffEventReport } = useSxpDataSource();
12643
- useEventReport();
12670
+ const { sxpParameter } = useSxpDataSource();
12644
12671
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
12645
12672
  (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
12646
12673
  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;
@@ -15074,12 +15101,12 @@ Made in Italy` })));
15074
15101
  (_a = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('scroll', onScroll);
15075
15102
  };
15076
15103
  }, [onScroll, scrollParent]);
15077
- const handleClickLink = () => {
15104
+ const handleClickLink = (e) => {
15078
15105
  var _a, _b, _c, _d, _e;
15079
15106
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
15080
15107
  reportTagsView();
15081
15108
  const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
15082
- jumpToWeb(rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
15109
+ jumpToWeb(e, rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
15083
15110
  window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
15084
15111
  }
15085
15112
  };
@@ -15305,12 +15332,12 @@ Made in Italy` })));
15305
15332
  // container?.removeEventListener('scroll', handleScroll); // 在组件卸载时移除事件监听器
15306
15333
  // };
15307
15334
  // }, [isLoadingData, containerRef, loadMoreData]);
15308
- const handleClickLink = () => {
15335
+ const handleClickLink = (e) => {
15309
15336
  var _a, _b, _c, _d, _e;
15310
15337
  if ((_a = data === null || data === void 0 ? void 0 : data.tag) === null || _a === void 0 ? void 0 : _a.link) {
15311
15338
  reportTagsView();
15312
15339
  const rec = waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec;
15313
- jumpToWeb(rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
15340
+ jumpToWeb(e, rec, (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProduct, (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindCta, cacheActiveIndex, (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo);
15314
15341
  window.location.href = window.getJointUtmLink((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link);
15315
15342
  }
15316
15343
  };
@@ -15750,7 +15777,7 @@ Made in Italy` })));
15750
15777
  const isOnScreen = useOnScreen(ref);
15751
15778
  const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
15752
15779
  const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
15753
- const handleTo = () => {
15780
+ const handleTo = (e) => {
15754
15781
  var _a, _b, _c, _d;
15755
15782
  const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
15756
15783
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
@@ -15761,7 +15788,7 @@ Made in Italy` })));
15761
15788
  if (isExternalLink) {
15762
15789
  const link = (product === null || product === void 0 ? void 0 : product.link) || ((_d = item === null || item === void 0 ? void 0 : item.bindCta) === null || _d === void 0 ? void 0 : _d.link);
15763
15790
  if (link) {
15764
- jumpToWeb(recData, product, cta, index);
15791
+ jumpToWeb(e, recData, product, cta, index);
15765
15792
  window.location.href = window.getJointUtmLink(link);
15766
15793
  }
15767
15794
  }
@@ -16197,7 +16224,7 @@ Made in Italy` })));
16197
16224
  const [visible, setVisible] = React.useState(true);
16198
16225
  const cta = ((_d = (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.bindCta) || ((_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.bindProduct) === null || _f === void 0 ? void 0 : _f.bindCta) || ((_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.bindCta);
16199
16226
  const product = ((_j = (_h = recData === null || recData === void 0 ? void 0 : recData.video) === null || _h === void 0 ? void 0 : _h.bindProducts) === null || _j === void 0 ? void 0 : _j[0]) || ((_k = recData === null || recData === void 0 ? void 0 : recData.video) === null || _k === void 0 ? void 0 : _k.bindProduct);
16200
- const handleTo = () => {
16227
+ const handleTo = (e) => {
16201
16228
  var _a, _b, _c, _d;
16202
16229
  const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
16203
16230
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
@@ -16208,7 +16235,7 @@ Made in Italy` })));
16208
16235
  if (isExternalLink) {
16209
16236
  const link = (product === null || product === void 0 ? void 0 : product.link) || ((_d = item === null || item === void 0 ? void 0 : item.bindCta) === null || _d === void 0 ? void 0 : _d.link);
16210
16237
  if (link) {
16211
- jumpToWeb(recData, product, cta, index);
16238
+ jumpToWeb(e, recData, product, cta, index);
16212
16239
  window.location.href = window.getJointUtmLink(link);
16213
16240
  }
16214
16241
  }
@@ -18109,10 +18136,10 @@ Made in Italy` })));
18109
18136
  const isExternalLink = ((_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoBar) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
18110
18137
  const rec = visList[activeIndex];
18111
18138
  return (React.createElement("div", Object.assign({ className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } }, (link && {
18112
- onClick: () => {
18139
+ onClick: (e) => {
18113
18140
  var _a, _b, _c, _d;
18114
18141
  if (isExternalLink) {
18115
- jumpToWeb(rec, (_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.bindCta, activeIndex, ((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.traceInfo) || ((_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo));
18142
+ jumpToWeb(e, rec, (_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.bindCta, activeIndex, ((_c = rec === null || rec === void 0 ? void 0 : rec.product) === null || _c === void 0 ? void 0 : _c.traceInfo) || ((_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.traceInfo));
18116
18143
  }
18117
18144
  new Function(link)();
18118
18145
  }