pb-sxp-ui 1.20.2 → 1.20.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 (47) hide show
  1. package/dist/index.cjs +252 -119
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +252 -119
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.cjs +6 -6
  6. package/dist/index.min.cjs.map +1 -1
  7. package/dist/index.min.js +6 -6
  8. package/dist/index.min.js.map +1 -1
  9. package/dist/pb-ui.js +252 -119
  10. package/dist/pb-ui.js.map +1 -1
  11. package/dist/pb-ui.min.js +6 -6
  12. package/dist/pb-ui.min.js.map +1 -1
  13. package/es/core/components/SxpPageRender/LikeButton/index.js +12 -4
  14. package/es/core/components/SxpPageRender/VideoWidget/index.js +6 -2
  15. package/es/core/components/SxpPageRender/WaterFall/List.js +15 -16
  16. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +14 -2
  17. package/es/core/components/SxpPageRender/WaterFall/index.d.ts +2 -0
  18. package/es/core/components/SxpPageRender/WaterFall/index.js +1 -4
  19. package/es/core/components/SxpPageRender/index.js +61 -17
  20. package/es/core/context/SxpDataSourceProvider.d.ts +8 -3
  21. package/es/core/context/SxpDataSourceProvider.js +76 -43
  22. package/es/core/utils/tool.d.ts +2 -1
  23. package/es/core/utils/tool.js +15 -1
  24. package/es/materials/sxp/cta/AniLink/index.js +7 -7
  25. package/es/materials/sxp/cta/AniLinkPopup/index.js +10 -10
  26. package/es/materials/sxp/popup/CommodityDetail/index.js +9 -3
  27. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +9 -3
  28. package/es/materials/sxp/popup/CommodityList/index.js +10 -6
  29. package/es/materials/sxp/template/components/EventProvider.js +9 -9
  30. package/lib/core/components/SxpPageRender/LikeButton/index.js +12 -4
  31. package/lib/core/components/SxpPageRender/VideoWidget/index.js +6 -2
  32. package/lib/core/components/SxpPageRender/WaterFall/List.js +14 -15
  33. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +14 -2
  34. package/lib/core/components/SxpPageRender/WaterFall/index.d.ts +2 -0
  35. package/lib/core/components/SxpPageRender/WaterFall/index.js +1 -4
  36. package/lib/core/components/SxpPageRender/index.js +61 -17
  37. package/lib/core/context/SxpDataSourceProvider.d.ts +8 -3
  38. package/lib/core/context/SxpDataSourceProvider.js +74 -41
  39. package/lib/core/utils/tool.d.ts +2 -1
  40. package/lib/core/utils/tool.js +16 -1
  41. package/lib/materials/sxp/cta/AniLink/index.js +7 -7
  42. package/lib/materials/sxp/cta/AniLinkPopup/index.js +10 -10
  43. package/lib/materials/sxp/popup/CommodityDetail/index.js +9 -3
  44. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +9 -3
  45. package/lib/materials/sxp/popup/CommodityList/index.js +10 -6
  46. package/lib/materials/sxp/template/components/EventProvider.js +9 -9
  47. package/package.json +1 -1
@@ -219,4 +219,18 @@ function setCookie(name, value, days = 0, path = '/', domain = '', secure = fals
219
219
  }
220
220
  document.cookie = cookieString;
221
221
  }
222
- export { uuid, getIndexByblockType, getBrowserInfo, getDevice, getSystem, getCookie, getScreenReader, splitUrlParams, deleteCookie, setCookie };
222
+ function getUrlParamByKey(key) {
223
+ var _a, _b;
224
+ const queryString = location.search.slice(1);
225
+ const params = {};
226
+ (_a = splitUrlParams(queryString.replace(/\+/g, '%2B'))) === null || _a === void 0 ? void 0 : _a.map((val) => {
227
+ const key = val.split('=')[0];
228
+ const value = val.split('=')[1];
229
+ params[key] = value;
230
+ });
231
+ for (const key in params) {
232
+ params[key] = params[key].replace(/%2B/g, '+');
233
+ }
234
+ return (_b = params[key]) !== null && _b !== void 0 ? _b : '';
235
+ }
236
+ export { uuid, getIndexByblockType, getBrowserInfo, getDevice, getSystem, getCookie, getScreenReader, splitUrlParams, deleteCookie, setCookie, getUrlParamByKey };
@@ -1,10 +1,10 @@
1
1
  import { __rest } from "tslib";
2
2
  import { css } from '@emotion/css';
3
3
  import React, { memo, useEffect, useMemo, useRef, useState } from 'react';
4
+ import styles from './index.module.less';
4
5
  import { useSxpDataSource } from '../../../../core/hooks';
5
6
  import { useEventReport } from '../../../../core/hooks/useEventReport';
6
7
  import { setFontForText } from '../../../../core/utils/tool';
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;
@@ -19,17 +19,17 @@ const AniLink = (_a) => {
19
19
  const handleTo = (e) => {
20
20
  var _a, _b, _c, _d;
21
21
  const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
22
+ 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);
22
23
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
23
24
  eventSubject: 'clickCta',
24
25
  eventDescription: 'User clicked the CTA'
25
- }, recData, item, index);
26
+ }, recData, item, index, (isExternalLink && !!link) ? 'open_external_link' : 'open_internal_popup', link);
26
27
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { index }));
27
28
  if (isExternalLink) {
28
- const link = (product === null || product === void 0 ? void 0 : product.link) || ((_d = item === null || item === void 0 ? void 0 : item.bindCta) === null || _d === void 0 ? void 0 : _d.link);
29
- if (link) {
30
- jumpToWeb(e, recData, product, cta, index);
31
- window.location.href = window.getJointUtmLink(link);
32
- }
29
+ if (!link)
30
+ return;
31
+ jumpToWeb(e, recData, product, cta, index);
32
+ window.location.href = window.getJointUtmLink(link);
33
33
  }
34
34
  else {
35
35
  onClick === null || onClick === void 0 ? void 0 : onClick();
@@ -1,11 +1,11 @@
1
1
  import { __rest } from "tslib";
2
2
  import { css } from '@emotion/css';
3
3
  import React, { memo, useEffect, useMemo, useState } from 'react';
4
+ import Img from '../../template/components/Img';
5
+ import styles from './index.module.less';
4
6
  import { useSxpDataSource } from '../../../../core/hooks';
5
7
  import { useEventReport } from '../../../../core/hooks/useEventReport';
6
- import Img from '../../template/components/Img';
7
8
  import { setFontForText } from '../../../../core/utils/tool';
8
- import styles from './index.module.less';
9
9
  const closeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAjhJREFUWEfFlztOw0AQhmeWiJ4CCmpQ5DiRQsIJyAWg5A0lR0AIChDiCJS8ER0cADgBeRSxt4CCDgkaKiq8i+zYeWx2413HEWmiJJv9v535Z2aN8M8vFPT9z3zETD0aAUChUJjwvPFHAJhBhB3Hqd6OAsK2yyucwykAvP38eJX398Z3AJDLlVYR8ToU9Rhj25TWr9KEsKy5dULIGQCMtfZly45TvwsAstm56UwG6wA4FUFwzrdctxZBDcWSy5XWEPG8I84/GcMipdWPtgcsaz5PCHtKG0IuTiqUvjT9U/WYMG2IOPE+AP+LtCB0xKUAAyA2Xbd2o2OG0NQXvTnvhL17D7EPtH9TRCIWwkRcGYGIQgYBABuqPuHXOQBc6pw80lBGwBQiiXhsBHQhkoprA6iM6acjhDQKu5YJZW6XeOI3XJdpvfsdTu52VfXEekD8owQiXGIubpSCbhDbLu8DwKEAd+A41SOdPpE4BS0viFOtvV2iKWqUgn5x/tmS70xR01GuDSCKc86/OCcLgTyyZ0ScDGNhFAktAJV4NFJ9YyaFiAWIE+9uVkkgBgLoig8DMWAa9ro9ynkUdlW5maZDCmB6clmz0k1HH4Cs1Ezbq2p2yEpUuBOKTSZZex00RUWIrltxuuK6EOGDSbGIOPZicpMx6fny650377qNRgBgWeVFQuA+6UjVgREhGIMlSqsPUQqIbZdOOIdZQmCv2axRnU1N1+TzJYsxOEaEV8ep7frPZ7Gd0FTEdP0ft0/kMNdg0eoAAAAASUVORK5CYII=';
10
10
  const AniLinkPopup = (_a) => {
11
11
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
@@ -19,17 +19,17 @@ const AniLinkPopup = (_a) => {
19
19
  const handleTo = (e) => {
20
20
  var _a, _b, _c, _d;
21
21
  const item = ((_b = (_a = recData === null || recData === void 0 ? void 0 : recData.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b[0]) || ((_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct) || (recData === null || recData === void 0 ? void 0 : recData.video);
22
+ 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);
22
23
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
23
24
  eventSubject: 'clickCta',
24
25
  eventDescription: 'User clicked the CTA'
25
- }, recData, item, index);
26
+ }, recData, item, index, (isExternalLink && !!link) ? 'open_external_link' : 'open_internal_popup', link);
26
27
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, recData), { index }));
27
28
  if (isExternalLink) {
28
- const link = (product === null || product === void 0 ? void 0 : product.link) || ((_d = item === null || item === void 0 ? void 0 : item.bindCta) === null || _d === void 0 ? void 0 : _d.link);
29
- if (link) {
30
- jumpToWeb(e, recData, product, cta, index);
31
- window.location.href = window.getJointUtmLink(link);
32
- }
29
+ if (!link)
30
+ return;
31
+ jumpToWeb(e, recData, product, cta, index);
32
+ window.location.href = window.getJointUtmLink(link);
33
33
  }
34
34
  else {
35
35
  onClick === null || onClick === void 0 ? void 0 : onClick();
@@ -63,8 +63,8 @@ const AniLinkPopup = (_a) => {
63
63
  height: '40px',
64
64
  lineHeight: '40px',
65
65
  paddingLeft: '6px'
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
- 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 } },
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
+ 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: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.popupCloseIcon) || closeIcon, alt: 'close', className: styles['modal-icon-wrapper-img'] })),
69
69
  React.createElement(Img, { src: src, rec: recData, item: (_x = (_v = (_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.bindProducts) === null || _u === void 0 ? void 0 : _u[0]) !== null && _v !== void 0 ? _v : (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.bindProduct) !== null && _x !== void 0 ? _x : recData === null || recData === void 0 ? void 0 : recData.video, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, 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: {
@@ -45,7 +45,7 @@ const CommodityDetail = (_a) => {
45
45
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
46
46
  eventSubject: 'clickCta',
47
47
  eventDescription: 'User clicked the CTA'
48
- }, data, product, position);
48
+ }, data, product, position, 'open_external_link', product.link, 'product');
49
49
  }
50
50
  window.location.href = window.getJointUtmLink(product.link);
51
51
  }
@@ -55,11 +55,17 @@ const CommodityDetail = (_a) => {
55
55
  return;
56
56
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
57
57
  eventName: 'ProductView',
58
- product
58
+ product: product ? [product] : undefined,
59
+ contentType: 'product',
60
+ rec: data,
61
+ position
59
62
  });
60
63
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
61
64
  eventName: 'PageView',
62
- product
65
+ product: product ? [product] : undefined,
66
+ contentType: 'product',
67
+ rec: data,
68
+ position
63
69
  });
64
70
  }, [isActive, bffFbReport]);
65
71
  useEffect(() => {
@@ -49,7 +49,7 @@ const CommodityDetailDiroNew = (_a) => {
49
49
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
50
50
  eventSubject: 'clickCta',
51
51
  eventDescription: 'User clicked the CTA'
52
- }, data, product, position);
52
+ }, data, product, position, 'open_external_link', product.link, 'product');
53
53
  }
54
54
  window.location.href = window.getJointUtmLink(product.link);
55
55
  }
@@ -59,11 +59,17 @@ const CommodityDetailDiroNew = (_a) => {
59
59
  return;
60
60
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
61
61
  eventName: 'ProductView',
62
- product
62
+ product: product ? [product] : undefined,
63
+ contentType: 'product',
64
+ rec: data,
65
+ position
63
66
  });
64
67
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
65
68
  eventName: 'PageView',
66
- product
69
+ product: product ? [product] : undefined,
70
+ contentType: 'product',
71
+ rec: data,
72
+ position
67
73
  });
68
74
  }, [isActive, bffFbReport]);
69
75
  useEffect(() => {
@@ -30,13 +30,13 @@ const CommodityList = (_a) => {
30
30
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
31
31
  eventSubject: 'clickCta',
32
32
  eventDescription: 'User clicked the CTA'
33
- }, recData, item, index);
33
+ }, recData, item, index, isExternalLink && !!(item === null || item === void 0 ? void 0 : item.link) ? 'open_external_link' : 'open_internal_popup', item.link, 'product');
34
34
  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 }));
35
35
  if (isExternalLink) {
36
- if (item === null || item === void 0 ? void 0 : item.link) {
37
- jumpToWeb(e, recData, item, item.bindCta, index);
38
- window.location.href = window.getJointUtmLink(item.link);
39
- }
36
+ if (!(item === null || item === void 0 ? void 0 : item.link))
37
+ return;
38
+ jumpToWeb(e, recData, item, item.bindCta, index);
39
+ window.location.href = window.getJointUtmLink(item.link);
40
40
  }
41
41
  else {
42
42
  onClick === null || onClick === void 0 ? void 0 : onClick();
@@ -44,7 +44,11 @@ const CommodityList = (_a) => {
44
44
  }, popup === null || popup === void 0 ? void 0 : popup.duration);
45
45
  useEffect(() => {
46
46
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
47
- eventName: 'PageView'
47
+ eventName: 'PageView',
48
+ product: (product !== null && product !== void 0 ? product : []),
49
+ contentType: 'product',
50
+ rec: recData,
51
+ position: index
48
52
  });
49
53
  }, []);
50
54
  return (React.createElement("ul", { role: 'list', className: 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) => {
@@ -13,22 +13,22 @@ const EventProvider = (_a) => {
13
13
  const handleClick = throttle((e) => {
14
14
  var _a, _b, _c, _d, _e, _f;
15
15
  e.preventDefault();
16
- 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;
16
+ const item = 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);
17
+ const link = ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.link) || (multItem === null || multItem === void 0 ? void 0 : multItem.link);
17
18
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
18
19
  eventSubject: 'clickCta',
19
20
  eventDescription: 'User clicked the CTA'
20
- }, rec, item, index);
21
+ }, rec, item, index, isExternalLink && (jumpLink || !!link) ? 'open_external_link' : 'open_internal_popup', link);
21
22
  setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(multItem && multiCheckIndex !== undefined && multiCheckIndex >= 0
22
23
  ? Object.assign(Object.assign({}, rec), { video: Object.assign(Object.assign({}, rec === null || rec === void 0 ? void 0 : rec.video), { bindProduct: multItem }), index, multiCheckIndex }) : Object.assign(Object.assign({}, rec), { index }));
23
24
  setElement(ref === null || ref === void 0 ? void 0 : ref.current);
24
25
  if (isExternalLink) {
25
- const link = ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.link) || (multItem === null || multItem === void 0 ? void 0 : multItem.link);
26
- if (jumpLink || link) {
27
- 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);
28
- const product = ((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct) || multItem;
29
- jumpToWeb(e, rec, product, cta, index);
30
- window.location.href = window.getJointUtmLink(jumpLink || link || '');
31
- }
26
+ if (!jumpLink && !link)
27
+ return;
28
+ 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);
29
+ const product = ((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct) || multItem;
30
+ jumpToWeb(e, rec, product, cta, index);
31
+ window.location.href = window.getJointUtmLink(link);
32
32
  }
33
33
  else {
34
34
  onClick === null || onClick === void 0 ? void 0 : onClick();
@@ -10,12 +10,12 @@ const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
10
10
  const LikeButton = (_a) => {
11
11
  var _b;
12
12
  var { active, activeIcon, unActicveIcon, recData, position } = _a, props = tslib_1.__rest(_a, ["active", "activeIcon", "unActicveIcon", "recData", "position"]);
13
- const { mutateLike, mutateUnlike, bffEventReport, setCacheRtcList, cacheRtcList } = (0, hooks_1.useSxpDataSource)();
13
+ const { mutateLike, mutateUnlike, bffEventReport, setCacheRtcList, cacheRtcList, bffFbReport } = (0, hooks_1.useSxpDataSource)();
14
14
  const [state, setState] = (0, react_1.useState)((_b = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList[position]) === null || _b === void 0 ? void 0 : _b.isCollected);
15
15
  const likeIcon = (0, useIconLink_1.useIconLink)(defaultLikeIconPath);
16
16
  const unlikeIcon = (0, useIconLink_1.useIconLink)(defaultUnLikeIconPath);
17
17
  const handleClick = (0, lodash_1.debounce)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
18
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
18
+ var _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;
19
19
  if (state) {
20
20
  setState(false);
21
21
  const result = (_e = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ videoItemId: (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '' })))) !== null && _e !== void 0 ? _e : false;
@@ -59,16 +59,24 @@ const LikeButton = (_a) => {
59
59
  traceInfo: (_y = recData === null || recData === void 0 ? void 0 : recData.video) === null || _y === void 0 ? void 0 : _y.traceInfo
60
60
  }
61
61
  });
62
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
63
+ eventName: 'Engagement',
64
+ product: (_z = recData === null || recData === void 0 ? void 0 : recData.video) === null || _z === void 0 ? void 0 : _z.bindProducts,
65
+ rec: recData,
66
+ position,
67
+ content_id: (_1 = (_0 = recData === null || recData === void 0 ? void 0 : recData.video) === null || _0 === void 0 ? void 0 : _0.itemId) !== null && _1 !== void 0 ? _1 : '',
68
+ engagement_type: 'like'
69
+ });
62
70
  if (!result) {
63
71
  setState(false);
64
72
  }
65
73
  else {
66
- const nRtcList = (_z = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
74
+ const nRtcList = (_2 = cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.map((item, index) => {
67
75
  if (index === position) {
68
76
  item.isCollected = true;
69
77
  }
70
78
  return item;
71
- })) !== null && _z !== void 0 ? _z : [];
79
+ })) !== null && _2 !== void 0 ? _2 : [];
72
80
  setCacheRtcList === null || setCacheRtcList === void 0 ? void 0 : setCacheRtcList(nRtcList);
73
81
  }
74
82
  }
@@ -287,11 +287,15 @@ const VideoWidget = (0, react_1.forwardRef)(({ rec, index, height, data, muted,
287
287
  if (isActive) {
288
288
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
289
289
  eventName: 'ViewContent',
290
- product: (_b = (_a = data === null || data === void 0 ? void 0 : data[index]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.bindProduct
290
+ product: (_b = (_a = data === null || data === void 0 ? void 0 : data[index]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.bindProducts,
291
+ rec: data === null || data === void 0 ? void 0 : data[index],
292
+ position: index
291
293
  });
292
294
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
293
295
  eventName: 'PageView',
294
- product: (_d = (_c = data === null || data === void 0 ? void 0 : data[index]) === null || _c === void 0 ? void 0 : _c.video) === null || _d === void 0 ? void 0 : _d.bindProduct
296
+ product: (_d = (_c = data === null || data === void 0 ? void 0 : data[index]) === null || _c === void 0 ? void 0 : _c.video) === null || _d === void 0 ? void 0 : _d.bindProducts,
297
+ rec: data === null || data === void 0 ? void 0 : data[index],
298
+ position: index
295
299
  });
296
300
  (_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.play();
297
301
  }
@@ -122,26 +122,13 @@ const WaterfallFlowItem = (props) => {
122
122
  function WaterfallList(_a) {
123
123
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
124
124
  var { reportTagsView, showBanner } = _a, props = tslib_1.__rest(_a, ["reportTagsView", "showBanner"]);
125
- const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = (0, hooks_1.useSxpDataSource)();
125
+ const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex, bffFbReport } = (0, hooks_1.useSxpDataSource)();
126
126
  const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
127
127
  const [list, setList] = (0, react_1.useState)();
128
128
  const [data, setData] = (0, react_1.useState)();
129
129
  const [isLoadingData, setIsLoadingData] = (0, react_1.useState)(false);
130
130
  const containerRef = (0, react_1.useRef)(null);
131
131
  const [isLoadMore, setIsLoadMore] = (0, react_1.useState)(false);
132
- const loadMoreData = (0, react_1.useCallback)(() => {
133
- if (isLoadMore)
134
- return;
135
- setIsLoadMore(true);
136
- waterFallData &&
137
- (getRecommendVideos === null || getRecommendVideos === void 0 ? void 0 : getRecommendVideos({
138
- hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag
139
- }).then((res) => {
140
- var _a;
141
- setList(list === null || list === void 0 ? void 0 : list.concat((_a = res === null || res === void 0 ? void 0 : res.recList) !== null && _a !== void 0 ? _a : []));
142
- setIsLoadMore(false);
143
- }));
144
- }, [waterFallData, getRecommendVideos, list, isLoadMore]);
145
132
  (0, react_1.useEffect)(() => {
146
133
  var _a, _b;
147
134
  setIsLoadingData(true);
@@ -153,8 +140,20 @@ function WaterfallList(_a) {
153
140
  }).then((res) => {
154
141
  var _a, _b;
155
142
  setData(res);
156
- setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
143
+ const list = (_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : [];
144
+ setList(list);
157
145
  setIsLoadingData(false);
146
+ const products = [];
147
+ list === null || list === void 0 ? void 0 : list.forEach((item) => {
148
+ var _a, _b;
149
+ products.push(...((_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) !== null && _b !== void 0 ? _b : []));
150
+ });
151
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
152
+ eventName: 'PageView',
153
+ product: products,
154
+ rec: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec,
155
+ position: cacheActiveIndex
156
+ });
158
157
  }));
159
158
  if (isOpenHashTag) {
160
159
  const res = preview_json_1.default;
@@ -114,7 +114,7 @@ const WaterfallFlowItem = (props) => {
114
114
  function WaterfallList(_a) {
115
115
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
116
116
  var { reportTagsView, showBanner } = _a, props = tslib_1.__rest(_a, ["reportTagsView", "showBanner"]);
117
- const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex } = (0, hooks_1.useSxpDataSource)();
117
+ const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag, cacheActiveIndex, bffFbReport } = (0, hooks_1.useSxpDataSource)();
118
118
  const { jumpToWeb } = (0, useEventReport_1.useEventReport)();
119
119
  const scrollParent = (0, react_1.useRef)(null);
120
120
  const [scrollTop, setScrollTop] = (0, react_1.useState)(0);
@@ -219,8 +219,20 @@ function WaterfallList(_a) {
219
219
  }).then((res) => {
220
220
  var _a, _b;
221
221
  setData(res);
222
- setList((_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : []);
222
+ const list = (_b = (_a = res === null || res === void 0 ? void 0 : res.recList) === null || _a === void 0 ? void 0 : _a.filter((item) => (item === null || item === void 0 ? void 0 : item.video) !== null || (item === null || item === void 0 ? void 0 : item.product) !== null)) !== null && _b !== void 0 ? _b : [];
223
+ setList(list);
223
224
  setIsLoadingData(false);
225
+ const products = [];
226
+ list === null || list === void 0 ? void 0 : list.forEach((item) => {
227
+ var _a, _b;
228
+ products.push(...((_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) !== null && _b !== void 0 ? _b : []));
229
+ });
230
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
231
+ eventName: 'PageView',
232
+ product: products,
233
+ rec: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.rec,
234
+ position: cacheActiveIndex
235
+ });
224
236
  }));
225
237
  if (isOpenHashTag) {
226
238
  const res = preview_json_1.default;
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  import './index.less';
3
+ import { RecItemType } from '../typing';
3
4
  import { IHashTagProps } from '../../../../materials/sxp/HashTag';
4
5
  interface IWaterFallProps {
6
+ rec?: RecItemType;
5
7
  }
6
8
  declare const _default: React.NamedExoticComponent<IWaterFallProps & IHashTagProps>;
7
9
  export default _default;
@@ -80,11 +80,8 @@ const WaterFall = (props) => {
80
80
  (0, react_1.useEffect)(() => {
81
81
  if (openHashtag) {
82
82
  setViewTime(new Date());
83
- bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
84
- eventName: 'PageView'
85
- });
86
83
  }
87
- }, [openHashtag, bffFbReport]);
84
+ }, [openHashtag]);
88
85
  (0, react_1.useEffect)(() => {
89
86
  const initTime = () => {
90
87
  setViewTime(new Date());
@@ -97,7 +97,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
97
97
  (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(index);
98
98
  }, [data, ctaType, swiperRef]);
99
99
  const handleSessionCompleted = (0, react_1.useCallback)((fk) => {
100
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
100
+ 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;
101
101
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
102
102
  let fromKName = '';
103
103
  if (popupDetailData && (((_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
@@ -132,7 +132,16 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
132
132
  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 : ''
133
133
  }
134
134
  });
135
- }, [data, bffEventReport, activeIndex, popupDetailData, tempMap, isFromHashtag, curTime]);
135
+ const isPostType = ((_w = item === null || item === void 0 ? void 0 : item.video) === null || _w === void 0 ? void 0 : _w.url) || ((_y = (_x = item === null || item === void 0 ? void 0 : item.video) === null || _x === void 0 ? void 0 : _x.imgUrls) === null || _y === void 0 ? void 0 : _y.length);
136
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
137
+ eventName: 'ExitFeed',
138
+ product: isPostType ? (_z = item === null || item === void 0 ? void 0 : item.video) === null || _z === void 0 ? void 0 : _z.bindProducts : (item === null || item === void 0 ? void 0 : item.product) ? [item === null || item === void 0 ? void 0 : item.product] : [],
139
+ rec: item,
140
+ position: activeIndex,
141
+ content_id: isPostType ? (_1 = (_0 = item === null || item === void 0 ? void 0 : item.video) === null || _0 === void 0 ? void 0 : _0.itemId) !== null && _1 !== void 0 ? _1 : '' : (_3 = (_2 = item === null || item === void 0 ? void 0 : item.product) === null || _2 === void 0 ? void 0 : _2.itemId) !== null && _3 !== void 0 ? _3 : '',
142
+ view_time: new Date() - viewTime.current
143
+ });
144
+ }, [data, bffEventReport, activeIndex, popupDetailData, tempMap, isFromHashtag, curTime, bffFbReport]);
136
145
  (0, react_1.useEffect)(() => {
137
146
  const item = data === null || data === void 0 ? void 0 : data[activeIndex];
138
147
  const visibleChange = () => {
@@ -432,48 +441,79 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
432
441
  }
433
442
  };
434
443
  const handleScrollEvent = (swiper) => {
435
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
444
+ 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;
436
445
  const item = data[swiper.previousIndex];
446
+ const activeItem = data[swiper.activeIndex];
437
447
  if (!item)
438
448
  return;
439
449
  let contentFormat = null;
440
- if ((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) {
450
+ let previousContentType = 'post';
451
+ let previousContentId = (_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '';
452
+ let previousProduct = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.bindProducts;
453
+ let previousContentsName = (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.title) !== null && _e !== void 0 ? _e : '';
454
+ let previousDirection = '';
455
+ let contentId = (_g = (_f = activeItem === null || activeItem === void 0 ? void 0 : activeItem.video) === null || _f === void 0 ? void 0 : _f.itemId) !== null && _g !== void 0 ? _g : '';
456
+ if ((_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.url) {
441
457
  contentFormat = 'video';
442
458
  }
443
- else if ((_c = (_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls) === null || _c === void 0 ? void 0 : _c.length) {
459
+ else if ((_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.imgUrls) === null || _k === void 0 ? void 0 : _k.length) {
444
460
  contentFormat = 'image';
445
461
  }
462
+ else {
463
+ previousContentType = 'product';
464
+ previousContentId = (_m = (_l = item === null || item === void 0 ? void 0 : item.product) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '';
465
+ previousProduct = (item === null || item === void 0 ? void 0 : item.product) ? [item === null || item === void 0 ? void 0 : item.product] : [];
466
+ previousContentsName = (_p = (_o = item === null || item === void 0 ? void 0 : item.product) === null || _o === void 0 ? void 0 : _o.title) !== null && _p !== void 0 ? _p : '';
467
+ }
468
+ if (!((_q = activeItem === null || activeItem === void 0 ? void 0 : activeItem.video) === null || _q === void 0 ? void 0 : _q.url) && !((_s = (_r = activeItem === null || activeItem === void 0 ? void 0 : activeItem.video) === null || _r === void 0 ? void 0 : _r.imgUrls) === null || _s === void 0 ? void 0 : _s.length)) {
469
+ contentId = (_u = (_t = activeItem === null || activeItem === void 0 ? void 0 : activeItem.product) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '';
470
+ }
446
471
  if (swiper.previousIndex - swiper.activeIndex < 0) {
447
472
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
448
473
  eventInfo: {
449
474
  eventSubject: 'scrollDown',
450
475
  eventDescription: 'User scroll down',
451
- contentId: (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.itemId) !== null && _e !== void 0 ? _e : '',
452
- productId: (_g = (_f = item === null || item === void 0 ? void 0 : item.product) === null || _f === void 0 ? void 0 : _f.itemId) !== null && _g !== void 0 ? _g : '',
476
+ contentId: (_w = (_v = item === null || item === void 0 ? void 0 : item.video) === null || _v === void 0 ? void 0 : _v.itemId) !== null && _w !== void 0 ? _w : '',
477
+ productId: (_y = (_x = item === null || item === void 0 ? void 0 : item.product) === null || _x === void 0 ? void 0 : _x.itemId) !== null && _y !== void 0 ? _y : '',
453
478
  requestId: null,
454
- traceInfo: (_l = (_j = (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.traceInfo) !== null && _j !== void 0 ? _j : (_k = item === null || item === void 0 ? void 0 : item.product) === null || _k === void 0 ? void 0 : _k.traceInfo) !== null && _l !== void 0 ? _l : '',
479
+ traceInfo: (_2 = (_0 = (_z = item === null || item === void 0 ? void 0 : item.video) === null || _z === void 0 ? void 0 : _z.traceInfo) !== null && _0 !== void 0 ? _0 : (_1 = item === null || item === void 0 ? void 0 : item.product) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : '',
455
480
  contentFormat,
456
- position: ((_m = swiper.previousIndex) !== null && _m !== void 0 ? _m : 0) + ''
481
+ position: ((_3 = swiper.previousIndex) !== null && _3 !== void 0 ? _3 : 0) + ''
457
482
  }
458
483
  });
459
484
  handleViewImageStartEnd(item);
460
485
  handleSlideSkip(item, swiper.previousIndex);
486
+ previousDirection = 'up';
461
487
  }
462
488
  else {
463
489
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
464
490
  eventInfo: {
465
491
  eventSubject: 'scrollUp',
466
492
  eventDescription: 'User scroll up',
467
- contentId: (_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.itemId) !== null && _p !== void 0 ? _p : '',
468
- productId: (_r = (_q = item.product) === null || _q === void 0 ? void 0 : _q.itemId) !== null && _r !== void 0 ? _r : '',
493
+ contentId: (_5 = (_4 = item === null || item === void 0 ? void 0 : item.video) === null || _4 === void 0 ? void 0 : _4.itemId) !== null && _5 !== void 0 ? _5 : '',
494
+ productId: (_7 = (_6 = item.product) === null || _6 === void 0 ? void 0 : _6.itemId) !== null && _7 !== void 0 ? _7 : '',
469
495
  requestId: null,
470
- 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 : '',
496
+ traceInfo: (_11 = (_9 = (_8 = item === null || item === void 0 ? void 0 : item.video) === null || _8 === void 0 ? void 0 : _8.traceInfo) !== null && _9 !== void 0 ? _9 : (_10 = item === null || item === void 0 ? void 0 : item.product) === null || _10 === void 0 ? void 0 : _10.traceInfo) !== null && _11 !== void 0 ? _11 : '',
471
497
  contentFormat,
472
- position: ((_w = swiper.previousIndex) !== null && _w !== void 0 ? _w : 0) + ''
498
+ position: ((_12 = swiper.previousIndex) !== null && _12 !== void 0 ? _12 : 0) + ''
473
499
  }
474
500
  });
475
501
  handleViewImageStartEnd(item);
476
- }
502
+ previousDirection = 'down';
503
+ }
504
+ bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
505
+ eventName: 'ContentSwipe',
506
+ product: previousProduct,
507
+ rec: activeItem,
508
+ position: swiper.activeIndex,
509
+ previous_content_id: previousContentId,
510
+ previous_content_type: previousContentType,
511
+ previous_contents_name: previousContentsName,
512
+ previosu_position: swiper.previousIndex,
513
+ swipe_direction: previousDirection,
514
+ view_time: new Date() - viewTime.current,
515
+ content_id: contentId
516
+ });
477
517
  handleReportProductView(item);
478
518
  viewTime.current = new Date();
479
519
  };
@@ -574,11 +614,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
574
614
  if (enableCapi) {
575
615
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
576
616
  eventName: 'ViewContent',
577
- product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProduct
617
+ product: (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.bindProducts,
618
+ rec: item,
619
+ position: activeIndex
578
620
  });
579
621
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
580
622
  eventName: 'PageView',
581
- product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProduct
623
+ product: (_h = item === null || item === void 0 ? void 0 : item.video) === null || _h === void 0 ? void 0 : _h.bindProducts,
624
+ rec: item,
625
+ position: activeIndex
582
626
  });
583
627
  }
584
628
  }
@@ -696,7 +740,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight, containerWidt
696
740
  renderView,
697
741
  renderLikeButton(visList[activeIndex], activeIndex, !!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed)),
698
742
  renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))),
699
- react_1.default.createElement(WaterFall_1.default, Object.assign({}, (_u = (_t = (_s = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _s === void 0 ? void 0 : _s[0]) === null || _t === void 0 ? void 0 : _t.item) === null || _u === void 0 ? void 0 : _u.props)),
743
+ react_1.default.createElement(WaterFall_1.default, Object.assign({}, (_u = (_t = (_s = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _s === void 0 ? void 0 : _s[0]) === null || _t === void 0 ? void 0 : _t.item) === null || _u === void 0 ? void 0 : _u.props, { rec: visList[activeIndex] })),
700
744
  react_1.default.createElement(ConsentPopup_1.default, { resolver: resolver, globalConfig: globalConfig }),
701
745
  openMultiPosts && (react_1.default.createElement(MultiPosts_1.default, Object.assign({}, (_x = (_w = (_v = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.item) === null || _x === void 0 ? void 0 : _x.props, (_0 = (_z = (_y = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.item) === null || _0 === void 0 ? void 0 : _0.event, { style: { position: 'fixed', top: 0, left: 0, right: 0, bottom: bottomHeight + 'px' } }))))),
702
746
  (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting) && (react_1.default.createElement("div", { style: {
@@ -12,6 +12,7 @@ export interface IEventTimeType {
12
12
  time: Date;
13
13
  target: EventTarget;
14
14
  }
15
+ export type ICapiEventNameType = 'PageView' | 'ProductView' | 'ViewContent' | 'ClickCTA' | 'ContentSwipe' | 'Engagement' | 'ExitFeed';
15
16
  export interface ISxpDataSourceContext {
16
17
  rtcList: RecItemType[];
17
18
  setRtcList?: React.Dispatch<React.SetStateAction<RecItemType[]>>;
@@ -51,7 +52,7 @@ export interface ISxpDataSourceContext {
51
52
  sxpParameter?: PageData['sxp_parameter'];
52
53
  waterFallData?: IWaterFallDataType;
53
54
  setWaterFallData?: React.Dispatch<React.SetStateAction<IWaterFallDataType | undefined>>;
54
- ctaEvent?: (eventInfo: any, rec?: RecItemType, product?: ProductInfoType | VideoInfoType | null, number?: number) => void;
55
+ ctaEvent?: (eventInfo: any, rec?: RecItemType, product?: ProductInfoType | VideoInfoType | null, number?: number, ctaActionType?: 'open_internal_popup' | 'open_external_link', targetUrl?: string | null, contentType?: 'product' | 'post') => void;
55
56
  swiperRef?: any;
56
57
  openHashtag?: boolean;
57
58
  setOpenHashtag?: React.Dispatch<React.SetStateAction<boolean>>;
@@ -72,8 +73,12 @@ export interface ISxpDataSourceContext {
72
73
  videoRef?: any;
73
74
  setVideoRef?: React.Dispatch<React.SetStateAction<any>>;
74
75
  bffFbReport?: (body: {
75
- eventName: 'PageView' | 'ProductView' | 'ViewContent';
76
- product?: any;
76
+ eventName: ICapiEventNameType;
77
+ product?: ProductInfoType[];
78
+ contentType?: 'product' | 'post';
79
+ rec?: RecItemType;
80
+ position?: number;
81
+ [key: string]: any;
77
82
  }) => void;
78
83
  curTime?: any;
79
84
  h5EnterLink?: () => void;