pb-sxp-ui 1.0.8 → 1.0.9

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 (81) hide show
  1. package/dist/index.cjs +67 -65
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +67 -65
  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 +67 -65
  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/LikeButton/index.d.ts +1 -0
  14. package/es/core/components/SxpPageRender/LikeButton/index.js +3 -3
  15. package/es/core/components/SxpPageRender/Popup/index.js +1 -1
  16. package/es/core/components/SxpPageRender/RenderCard.js +1 -1
  17. package/es/core/components/SxpPageRender/VideoWidget/index.js +3 -3
  18. package/es/core/components/SxpPageRender/WaterFall/List.js +1 -1
  19. package/es/core/components/SxpPageRender/WaterFall/index.js +3 -3
  20. package/es/core/components/SxpPageRender/index.js +8 -8
  21. package/es/core/context/SxpDataSourceProvider.d.ts +4 -2
  22. package/es/core/context/SxpDataSourceProvider.js +2 -2
  23. package/es/core/hooks/useEventReport.d.ts +2 -2
  24. package/es/core/hooks/useEventReport.js +4 -4
  25. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  26. package/es/materials/sxp/popup/CommodityDetail/index.js +4 -3
  27. package/es/materials/sxp/popup/CommodityDetailDiro/index.d.ts +1 -0
  28. package/es/materials/sxp/popup/CommodityDetailDiro/index.js +4 -3
  29. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
  30. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +4 -3
  31. package/es/materials/sxp/template/Appoint/index.d.ts +1 -0
  32. package/es/materials/sxp/template/Commodity/index.d.ts +1 -0
  33. package/es/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
  34. package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
  35. package/es/materials/sxp/template/Link/index.d.ts +1 -0
  36. package/es/materials/sxp/template/Link/index.js +3 -3
  37. package/es/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
  38. package/es/materials/sxp/template/MultiCommodity/index.js +5 -5
  39. package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
  40. package/es/materials/sxp/template/MultiCommodityDiro/index.js +5 -5
  41. package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
  42. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +5 -5
  43. package/es/materials/sxp/template/components/EventProvider.d.ts +1 -0
  44. package/es/materials/sxp/template/components/EventProvider.js +6 -6
  45. package/es/materials/sxp/template/components/Img.d.ts +1 -0
  46. package/es/materials/sxp/template/components/Img.js +3 -3
  47. package/lib/core/components/SxpPageRender/LikeButton/index.d.ts +1 -0
  48. package/lib/core/components/SxpPageRender/LikeButton/index.js +3 -3
  49. package/lib/core/components/SxpPageRender/Popup/index.js +1 -1
  50. package/lib/core/components/SxpPageRender/RenderCard.js +1 -1
  51. package/lib/core/components/SxpPageRender/VideoWidget/index.js +3 -3
  52. package/lib/core/components/SxpPageRender/WaterFall/List.js +1 -1
  53. package/lib/core/components/SxpPageRender/WaterFall/index.js +3 -3
  54. package/lib/core/components/SxpPageRender/index.js +8 -8
  55. package/lib/core/context/SxpDataSourceProvider.d.ts +4 -2
  56. package/lib/core/context/SxpDataSourceProvider.js +2 -2
  57. package/lib/core/hooks/useEventReport.d.ts +2 -2
  58. package/lib/core/hooks/useEventReport.js +4 -4
  59. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +1 -0
  60. package/lib/materials/sxp/popup/CommodityDetail/index.js +4 -3
  61. package/lib/materials/sxp/popup/CommodityDetailDiro/index.d.ts +1 -0
  62. package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +4 -3
  63. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +1 -0
  64. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +4 -3
  65. package/lib/materials/sxp/template/Appoint/index.d.ts +1 -0
  66. package/lib/materials/sxp/template/Commodity/index.d.ts +1 -0
  67. package/lib/materials/sxp/template/CommodityDiro/index.d.ts +1 -0
  68. package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +1 -0
  69. package/lib/materials/sxp/template/Link/index.d.ts +1 -0
  70. package/lib/materials/sxp/template/Link/index.js +3 -3
  71. package/lib/materials/sxp/template/MultiCommodity/index.d.ts +1 -0
  72. package/lib/materials/sxp/template/MultiCommodity/index.js +5 -5
  73. package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
  74. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +5 -5
  75. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
  76. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +5 -5
  77. package/lib/materials/sxp/template/components/EventProvider.d.ts +1 -0
  78. package/lib/materials/sxp/template/components/EventProvider.js +6 -6
  79. package/lib/materials/sxp/template/components/Img.d.ts +1 -0
  80. package/lib/materials/sxp/template/components/Img.js +3 -3
  81. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -531,7 +531,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
531
531
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/customform', { method: 'POST', body }));
532
532
  return res === null || res === void 0 ? void 0 : res.success;
533
533
  }), [bffFetch]);
534
- const ctaEvent = useCallback((eventInfo, rec, product) => {
534
+ const ctaEvent = useCallback((eventInfo, rec, product, position) => {
535
535
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
536
536
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
537
537
  const isProd = ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProduct) || (((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.bindProducts) && ((_d = (_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProducts) === null || _d === void 0 ? void 0 : _d.length) > 0);
@@ -546,7 +546,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
546
546
  fromKName = 'imagePage';
547
547
  }
548
548
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
549
- eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: rec === null || rec === void 0 ? void 0 : rec.position, relatedContentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', relatedProductId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
549
+ eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', relatedContentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', relatedProductId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
550
550
  });
551
551
  }, [bffEventReport, isFromHashtag]);
552
552
  useEffect(() => {
@@ -8083,13 +8083,13 @@ SwiperSlide.displayName = 'SwiperSlide';
8083
8083
  * @Author: binruan@chatlabs.com
8084
8084
  * @Date: 2024-03-12 10:59:06
8085
8085
  * @LastEditors: binruan@chatlabs.com
8086
- * @LastEditTime: 2024-04-12 15:10:39
8086
+ * @LastEditTime: 2024-04-15 09:47:08
8087
8087
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
8088
8088
  *
8089
8089
  */
8090
8090
  function useEventReport() {
8091
8091
  const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
8092
- const jumpToWeb = useCallback((data, product, cta) => {
8092
+ const jumpToWeb = useCallback((data, product, cta, position) => {
8093
8093
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
8094
8094
  let fromKName = '';
8095
8095
  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))) {
@@ -8118,14 +8118,14 @@ function useEventReport() {
8118
8118
  fromKName,
8119
8119
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
8120
8120
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
8121
- position: (data === null || data === void 0 ? void 0 : data.position) + '',
8121
+ position: position + '',
8122
8122
  relatedContentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
8123
8123
  relatedCtatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
8124
8124
  traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
8125
8125
  }
8126
8126
  });
8127
8127
  }, [bffEventReport, popupDetailData, isFromHashtag]);
8128
- const productView = useCallback((data, product, cta, viewTime) => {
8128
+ const productView = useCallback((data, product, cta, viewTime, position) => {
8129
8129
  var _a, _b, _c, _d;
8130
8130
  let fromKName = '';
8131
8131
  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))) {
@@ -8143,7 +8143,7 @@ function useEventReport() {
8143
8143
  fromKName,
8144
8144
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
8145
8145
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
8146
- position: (data === null || data === void 0 ? void 0 : data.position) + '',
8146
+ position: position + '',
8147
8147
  relatedContentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
8148
8148
  relatedCtatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
8149
8149
  traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
@@ -8286,7 +8286,7 @@ var ExpandableText$1 = memo(ExpandableText);
8286
8286
 
8287
8287
  const CommodityDetail$1 = (_a) => {
8288
8288
  var _b, _c, _d, _e, _f, _g, _h, _j;
8289
- var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle"]);
8289
+ var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index"]);
8290
8290
  const { sxpParameter } = useSxpDataSource();
8291
8291
  const { popupDetailData, bffEventReport, isPreview, waterFallData } = useSxpDataSource();
8292
8292
  const { jumpToWeb, productView } = useEventReport();
@@ -8295,11 +8295,12 @@ const CommodityDetail$1 = (_a) => {
8295
8295
  const data = isPost ? rec : popupDetailData;
8296
8296
  const product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8297
8297
  const cta = isPost ? (_c = data === null || data === void 0 ? void 0 : data.product) === null || _c === void 0 ? void 0 : _c.bindCta : (_e = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.bindCta;
8298
+ const position = isPost ? index : popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
8298
8299
  const handleLink = () => {
8299
8300
  if (product === null || product === void 0 ? void 0 : product.link) {
8300
- jumpToWeb(popupDetailData, product, cta);
8301
+ jumpToWeb(popupDetailData, product, cta, position);
8301
8302
  if (!isPost) {
8302
- productView(data, product, cta, viewTime || curTimeRef.current);
8303
+ productView(data, product, cta, viewTime || curTimeRef.current, position);
8303
8304
  }
8304
8305
  window.location.href = window.getJointUtmLink(product.link);
8305
8306
  }
@@ -8736,7 +8737,7 @@ var settingRender$2 = [
8736
8737
 
8737
8738
  const CommodityDetailDiroNew$1 = (_a) => {
8738
8739
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
8739
- var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle"]);
8740
+ var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index } = _a, props = __rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index"]);
8740
8741
  useState(true);
8741
8742
  const { sxpParameter } = useSxpDataSource();
8742
8743
  const { popupDetailData, bffEventReport, isPreview, swiperRef, waterFallData } = useSxpDataSource();
@@ -8752,11 +8753,12 @@ const CommodityDetailDiroNew$1 = (_a) => {
8752
8753
  const data = isPost ? rec : popupDetailData;
8753
8754
  const product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
8754
8755
  const cta = isPost ? (_c = data === null || data === void 0 ? void 0 : data.product) === null || _c === void 0 ? void 0 : _c.bindCta : (_e = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.bindCta;
8756
+ const position = isPost ? index : popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
8755
8757
  const handleLink = () => {
8756
8758
  if (product === null || product === void 0 ? void 0 : product.link) {
8757
- jumpToWeb(data, product, cta);
8759
+ jumpToWeb(data, product, cta, position);
8758
8760
  if (!isPost) {
8759
- productView(data, product, cta, viewTime || curTimeRef.current);
8761
+ productView(data, product, cta, viewTime || curTimeRef.current, position);
8760
8762
  }
8761
8763
  window.location.href = window.getJointUtmLink(product.link);
8762
8764
  }
@@ -9169,7 +9171,7 @@ function useOnScreen(ref) {
9169
9171
  }
9170
9172
 
9171
9173
  const EventProvider = (_a) => {
9172
- var { rec, children, className, onClick, style, isExternalLink = false } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink"]);
9174
+ var { rec, children, className, onClick, style, isExternalLink = false, index } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index"]);
9173
9175
  const ref = useRef(null);
9174
9176
  const isOnScreen = useOnScreen(ref);
9175
9177
  const { popup } = useEditor();
@@ -9182,22 +9184,22 @@ const EventProvider = (_a) => {
9182
9184
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9183
9185
  eventSubject: 'ctaExposure',
9184
9186
  eventDescription: 'The cta was shown to the user'
9185
- }, rec, item);
9187
+ }, rec, item, index);
9186
9188
  }
9187
- }, [isOnScreen, ref, rec, ctaEvent]);
9189
+ }, [isOnScreen, ref, rec, ctaEvent, index]);
9188
9190
  const handleClick = throttle(() => {
9189
9191
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
9190
9192
  const item = (_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;
9191
9193
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9192
9194
  eventSubject: 'clickCta',
9193
9195
  eventDescription: 'User clicked the CTA'
9194
- }, rec, item);
9195
- setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(rec);
9196
+ }, rec, item, index);
9197
+ setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, rec), { index }));
9196
9198
  if (isExternalLink) {
9197
9199
  if ((_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) {
9198
9200
  const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
9199
9201
  const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
9200
- jumpToWeb(rec, product, cta);
9202
+ jumpToWeb(rec, product, cta, index);
9201
9203
  window.location.href = (_h = (_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.bindProduct) === null || _h === void 0 ? void 0 : _h.link;
9202
9204
  window.location.href = window.getJointUtmLink((_k = (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProduct) === null || _k === void 0 ? void 0 : _k.link);
9203
9205
  }
@@ -9368,18 +9370,18 @@ var styles$5 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU"};
9368
9370
 
9369
9371
  const Link$1 = (_a) => {
9370
9372
  var _b, _c, _d, _e, _f;
9371
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
9373
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index"]);
9372
9374
  const { sxpParameter, bffEventReport } = useSxpDataSource();
9373
9375
  const { jumpToWeb } = useEventReport();
9374
9376
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
9375
9377
  const product = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
9376
9378
  const handleTo = () => {
9377
9379
  if (cta === null || cta === void 0 ? void 0 : cta.link) {
9378
- jumpToWeb(recData, product, cta);
9380
+ jumpToWeb(recData, product, cta, index);
9379
9381
  window.location.href = window.getJointUtmLink(cta.link);
9380
9382
  }
9381
9383
  };
9382
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { onClick: handleTo }),
9384
+ return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { onClick: handleTo }),
9383
9385
  React.createElement("div", { className: css(Object.assign({ backgroundColor: '#f2f2f2', overflow: 'hidden', flexShrink: 0 }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9384
9386
  React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), 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, alt: '' })),
9385
9387
  React.createElement("div", { className: css({
@@ -9647,11 +9649,11 @@ var Scroll$1 = memo(Scroll);
9647
9649
  * @Author: binruan@chatlabs.com
9648
9650
  * @Date: 2024-01-16 14:50:13
9649
9651
  * @LastEditors: binruan@chatlabs.com
9650
- * @LastEditTime: 2024-03-11 15:46:24
9652
+ * @LastEditTime: 2024-04-11 18:24:15
9651
9653
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
9652
9654
  *
9653
9655
  */
9654
- const Img = ({ src, rec, item }) => {
9656
+ const Img = ({ src, rec, item, index }) => {
9655
9657
  const ref = useRef(null);
9656
9658
  const isOnScreen = useOnScreen(ref);
9657
9659
  const { ctaEvent } = useSxpDataSource();
@@ -9660,9 +9662,9 @@ const Img = ({ src, rec, item }) => {
9660
9662
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9661
9663
  eventSubject: 'ctaExposure',
9662
9664
  eventDescription: 'The cta was shown to the user'
9663
- }, rec, item);
9665
+ }, rec, item, index);
9664
9666
  }
9665
- }, [isOnScreen, src, ref, rec, ctaEvent, item]);
9667
+ }, [isOnScreen, src, ref, rec, ctaEvent, item, index]);
9666
9668
  return (React.createElement("img", { ref: ref, hidden: !src, className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, alt: '' }));
9667
9669
  };
9668
9670
  var Img$1 = memo(Img);
@@ -9671,7 +9673,7 @@ var styles$2 = {"two-line-ellipsis":"index-module_two-line-ellipsis__SFQwJ"};
9671
9673
 
9672
9674
  const MultiCommodityDiro$1 = (_a) => {
9673
9675
  var _b, _c;
9674
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9676
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
9675
9677
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9676
9678
  const { popup } = useEditor();
9677
9679
  const { jumpToWeb } = useEventReport();
@@ -9680,11 +9682,11 @@ const MultiCommodityDiro$1 = (_a) => {
9680
9682
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9681
9683
  eventSubject: 'clickCta',
9682
9684
  eventDescription: 'User clicked the CTA'
9683
- }, recData, item);
9684
- 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 }) }));
9685
+ }, recData, item, index);
9686
+ 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 }));
9685
9687
  if (isExternalLink) {
9686
9688
  if (item === null || item === void 0 ? void 0 : item.link) {
9687
- jumpToWeb(recData, item, item.bindCta);
9689
+ jumpToWeb(recData, item, item.bindCta, index);
9688
9690
  window.location.href = window.getJointUtmLink(item.link);
9689
9691
  }
9690
9692
  }
@@ -9696,7 +9698,7 @@ const MultiCommodityDiro$1 = (_a) => {
9696
9698
  var _a, _b, _c, _d, _e, _f;
9697
9699
  return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
9698
9700
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9699
- React.createElement(Img$1, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item })),
9701
+ React.createElement(Img$1, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index })),
9700
9702
  React.createElement("div", { className: css({
9701
9703
  color: '#000',
9702
9704
  display: 'flex',
@@ -9783,7 +9785,7 @@ var styles$1 = {"two-line-ellipsis":"index-module_two-line-ellipsis__mdzn0"};
9783
9785
 
9784
9786
  const MultiCommodity$1 = (_a) => {
9785
9787
  var _b, _c;
9786
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9788
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
9787
9789
  const { sxpParameter } = useSxpDataSource();
9788
9790
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
9789
9791
  const { popup } = useEditor();
@@ -9793,11 +9795,11 @@ const MultiCommodity$1 = (_a) => {
9793
9795
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9794
9796
  eventSubject: 'clickCta',
9795
9797
  eventDescription: 'User clicked the CTA'
9796
- }, recData, item);
9797
- 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 }) }));
9798
+ }, recData, item, index);
9799
+ 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 }));
9798
9800
  if (isExternalLink) {
9799
9801
  if (item === null || item === void 0 ? void 0 : item.link) {
9800
- jumpToWeb(recData, item, item.bindCta);
9802
+ jumpToWeb(recData, item, item.bindCta, index);
9801
9803
  window.location.href = window.getJointUtmLink(item.link);
9802
9804
  }
9803
9805
  }
@@ -9809,7 +9811,7 @@ const MultiCommodity$1 = (_a) => {
9809
9811
  var _a, _b, _c, _d, _e, _f;
9810
9812
  return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
9811
9813
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9812
- React.createElement(Img$1, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item })),
9814
+ React.createElement(Img$1, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index })),
9813
9815
  React.createElement("div", { className: css({
9814
9816
  color: '#fff',
9815
9817
  display: 'flex',
@@ -9896,7 +9898,7 @@ var styles = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__fselR"};
9896
9898
 
9897
9899
  const MultiCommodityDiroNew$1 = (_a) => {
9898
9900
  var _b, _c;
9899
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9901
+ var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink", "index"]);
9900
9902
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9901
9903
  const { popup } = useEditor();
9902
9904
  const { jumpToWeb } = useEventReport();
@@ -9905,11 +9907,11 @@ const MultiCommodityDiroNew$1 = (_a) => {
9905
9907
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9906
9908
  eventSubject: 'clickCta',
9907
9909
  eventDescription: 'User clicked the CTA'
9908
- }, recData, item);
9909
- 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 }) }));
9910
+ }, recData, item, index);
9911
+ 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 }));
9910
9912
  if (isExternalLink) {
9911
9913
  if (item === null || item === void 0 ? void 0 : item.link) {
9912
- jumpToWeb(recData, item, item.bindCta);
9914
+ jumpToWeb(recData, item, item.bindCta, index);
9913
9915
  window.location.href = window.getJointUtmLink(item.link);
9914
9916
  }
9915
9917
  }
@@ -9921,7 +9923,7 @@ const MultiCommodityDiroNew$1 = (_a) => {
9921
9923
  var _a, _b, _c, _d, _e, _f;
9922
9924
  return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
9923
9925
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9924
- React.createElement(Img$1, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item })),
9926
+ React.createElement(Img$1, { src: (_c = (_b = (_a = item === null || item === void 0 ? void 0 : item.homePage) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _c !== void 0 ? _c : bottom_image, rec: recData, item: item, index: index })),
9925
9927
  React.createElement("div", { className: css({
9926
9928
  color: '#fff',
9927
9929
  display: 'flex',
@@ -11567,7 +11569,7 @@ const WaterfallFlowItem = (props) => {
11567
11569
  };
11568
11570
  }, [src, showVideo]);
11569
11571
  const handleClickToDetail = () => {
11570
- reportTagsView();
11572
+ reportTagsView(index);
11571
11573
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(list);
11572
11574
  setTimeout(() => {
11573
11575
  var _a;
@@ -11675,7 +11677,7 @@ var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
11675
11677
  * @Author: binruan@chatlabs.com
11676
11678
  * @Date: 2024-01-10 10:58:24
11677
11679
  * @LastEditors: binruan@chatlabs.com
11678
- * @LastEditTime: 2024-04-12 11:29:01
11680
+ * @LastEditTime: 2024-04-15 09:58:50
11679
11681
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
11680
11682
  *
11681
11683
  */
@@ -11702,7 +11704,7 @@ const WaterFall = (props) => {
11702
11704
  if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
11703
11705
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
11704
11706
  }
11705
- reportTagsView();
11707
+ reportTagsView(0);
11706
11708
  setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
11707
11709
  setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
11708
11710
  setTimeout(() => {
@@ -11719,7 +11721,7 @@ const WaterFall = (props) => {
11719
11721
  setRecData(waterFallData);
11720
11722
  }
11721
11723
  }, [waterFallData]);
11722
- const reportTagsView = useCallback(() => {
11724
+ const reportTagsView = useCallback((index) => {
11723
11725
  var _a, _b, _c, _d, _e, _f;
11724
11726
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
11725
11727
  if (!rec)
@@ -11737,7 +11739,7 @@ const WaterFall = (props) => {
11737
11739
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
11738
11740
  eventInfo: {
11739
11741
  relatedContentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11740
- position: rec === null || rec === void 0 ? void 0 : rec.position,
11742
+ position: index + '',
11741
11743
  contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
11742
11744
  traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
11743
11745
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
@@ -11872,7 +11874,7 @@ var _materials_ = /*#__PURE__*/Object.freeze({
11872
11874
  const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
11873
11875
  const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
11874
11876
  const LikeButton = (_a) => {
11875
- var { active, activeIcon, unActicveIcon, recData } = _a, props = __rest(_a, ["active", "activeIcon", "unActicveIcon", "recData"]);
11877
+ var { active, activeIcon, unActicveIcon, recData, position } = _a, props = __rest(_a, ["active", "activeIcon", "unActicveIcon", "recData", "position"]);
11876
11878
  const { mutateLike, mutateUnlike, bffEventReport } = useSxpDataSource();
11877
11879
  const [state, setState] = useState(active);
11878
11880
  const likeIcon = useIconLink(defaultLikeIconPath);
@@ -11890,7 +11892,7 @@ const LikeButton = (_a) => {
11890
11892
  contentId: (_f = (_e = recData.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
11891
11893
  contentName: (_h = (_g = recData.video) === null || _g === void 0 ? void 0 : _g.title) !== null && _h !== void 0 ? _h : '',
11892
11894
  contentTags: JSON.stringify((_k = (_j = recData.video) === null || _j === void 0 ? void 0 : _j.tags) !== null && _k !== void 0 ? _k : []),
11893
- position: recData.position,
11895
+ position: position + '',
11894
11896
  contentFormat: ((_l = recData.video) === null || _l === void 0 ? void 0 : _l.url) ? 'video' : 'image',
11895
11897
  traceInfo: (_m = recData.video) === null || _m === void 0 ? void 0 : _m.traceInfo
11896
11898
  }
@@ -11910,7 +11912,7 @@ const LikeButton = (_a) => {
11910
11912
  contentId: (_q = (_p = recData.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
11911
11913
  contentName: (_s = (_r = recData.video) === null || _r === void 0 ? void 0 : _r.title) !== null && _s !== void 0 ? _s : '',
11912
11914
  contentTags: JSON.stringify((_u = (_t = recData.video) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []),
11913
- position: recData.position,
11915
+ position: position + '',
11914
11916
  contentFormat: ((_v = recData.video) === null || _v === void 0 ? void 0 : _v.url) ? 'video' : 'image',
11915
11917
  traceInfo: (_w = recData.video) === null || _w === void 0 ? void 0 : _w.traceInfo
11916
11918
  }
@@ -11968,7 +11970,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
11968
11970
  startTime: videoCurrentTime,
11969
11971
  videoDuration,
11970
11972
  contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
11971
- position: item.position,
11973
+ position: index + '',
11972
11974
  contentFormat: 'video',
11973
11975
  traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
11974
11976
  }
@@ -11996,7 +11998,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
11996
11998
  startTime: videoCurrentTime,
11997
11999
  videoDuration,
11998
12000
  contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
11999
- position: item.position,
12001
+ position: index + '',
12000
12002
  contentFormat: 'video',
12001
12003
  traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
12002
12004
  }
@@ -12056,7 +12058,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
12056
12058
  videoDuration,
12057
12059
  playDuration,
12058
12060
  contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
12059
- position: item.position,
12061
+ position: index + '',
12060
12062
  contentFormat: 'video',
12061
12063
  traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
12062
12064
  }
@@ -12404,7 +12406,7 @@ function withBindDataSource(Component) {
12404
12406
  * @Author: binruan@chatlabs.com
12405
12407
  * @Date: 2023-12-26 16:11:34
12406
12408
  * @LastEditors: binruan@chatlabs.com
12407
- * @LastEditTime: 2024-04-10 16:49:34
12409
+ * @LastEditTime: 2024-04-11 18:14:05
12408
12410
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
12409
12411
  *
12410
12412
  */
@@ -12438,7 +12440,7 @@ const RenderCard = ({ rec, index, tempMap, resolver }) => {
12438
12440
  const Component = withBindDataSource(t);
12439
12441
  const defaulSetting = (_x = t === null || t === void 0 ? void 0 : t.extend) === null || _x === void 0 ? void 0 : _x.defaulSetting;
12440
12442
  const isExternalLink = ((_0 = (_z = (_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.event) === null || _z === void 0 ? void 0 : _z.onClick) === null || _0 === void 0 ? void 0 : _0.linkType) === 'externalLink';
12441
- return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_1 = value === null || value === void 0 ? void 0 : value.item) === null || _1 === void 0 ? void 0 : _1.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.textStyle), bindDatas: (_4 = (_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.bindDatas) !== null && _4 !== void 0 ? _4 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_5 = value === null || value === void 0 ? void 0 : value.item) === null || _5 === void 0 ? void 0 : _5.props, { event: ((_6 = value === null || value === void 0 ? void 0 : value.item) === null || _6 === void 0 ? void 0 : _6.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink })));
12443
+ return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_1 = value === null || value === void 0 ? void 0 : value.item) === null || _1 === void 0 ? void 0 : _1.style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.textStyle), bindDatas: (_4 = (_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.bindDatas) !== null && _4 !== void 0 ? _4 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_5 = value === null || value === void 0 ? void 0 : value.item) === null || _5 === void 0 ? void 0 : _5.props, { event: ((_6 = value === null || value === void 0 ? void 0 : value.item) === null || _6 === void 0 ? void 0 : _6.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index })));
12442
12444
  }
12443
12445
  else {
12444
12446
  return null;
@@ -12464,7 +12466,7 @@ const Nudge = ({ nudge }) => {
12464
12466
  * @Author: binruan@chatlabs.com
12465
12467
  * @Date: 2024-01-15 19:03:09
12466
12468
  * @LastEditors: binruan@chatlabs.com
12467
- * @LastEditTime: 2024-04-10 10:13:48
12469
+ * @LastEditTime: 2024-04-11 18:45:44
12468
12470
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12469
12471
  *
12470
12472
  */
@@ -12592,7 +12594,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12592
12594
  eventDescription: 'Session completed',
12593
12595
  relatedContentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
12594
12596
  relatedProductId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
12595
- position: item === null || item === void 0 ? void 0 : item.position,
12597
+ position: activeIndex,
12596
12598
  fromKName,
12597
12599
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
12598
12600
  relatedCtatId: (_q = (_p = (_o = item.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : ''
@@ -12635,7 +12637,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12635
12637
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
12636
12638
  const Component = withBindDataSource(t);
12637
12639
  const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
12638
- return (React.createElement(Component, Object.assign({ key: index, textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.textStyle), bindDatas: (_e = (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.bindDatas) !== null && _e !== void 0 ? _e : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.props, { event: ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.style), { height: '100%', overflow: 'auto' }) })));
12640
+ return (React.createElement(Component, Object.assign({ key: index, textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_c = value === null || value === void 0 ? void 0 : value.item) === null || _c === void 0 ? void 0 : _c.textStyle), bindDatas: (_e = (_d = value === null || value === void 0 ? void 0 : value.item) === null || _d === void 0 ? void 0 : _d.bindDatas) !== null && _e !== void 0 ? _e : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_f = value === null || value === void 0 ? void 0 : value.item) === null || _f === void 0 ? void 0 : _f.props, { event: ((_g = value === null || value === void 0 ? void 0 : value.item) === null || _g === void 0 ? void 0 : _g.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, viewTime: viewTime.current, rec: rec, isPost: true, tipText: tipText, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_h = value === null || value === void 0 ? void 0 : value.item) === null || _h === void 0 ? void 0 : _h.style), { height: '100%', overflow: 'auto' }), index: index })));
12639
12641
  });
12640
12642
  }
12641
12643
  return null;
@@ -12654,7 +12656,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12654
12656
  }
12655
12657
  return null;
12656
12658
  }, [descStyle, activeIndex, tempMap, resolver, tipText, nudge, hashTagStyle]);
12657
- const renderLikeButton = useCallback((rec) => {
12659
+ const renderLikeButton = useCallback((rec, index) => {
12658
12660
  var _a, _b;
12659
12661
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
12660
12662
  return;
@@ -12666,7 +12668,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12666
12668
  return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon, unActicveIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
12667
12669
  top,
12668
12670
  right: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _b !== void 0 ? _b : 0
12669
- } }));
12671
+ }, position: index }));
12670
12672
  }
12671
12673
  return null;
12672
12674
  }, [globalConfig, waterFallData]);
@@ -12684,7 +12686,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12684
12686
  imageEndTime: `${endTime}`,
12685
12687
  playDuration: `${duration}`,
12686
12688
  contentTags: JSON.stringify((_f = item.video.tags) !== null && _f !== void 0 ? _f : []),
12687
- position: item.position,
12689
+ position: activeIndex,
12688
12690
  contentFormat: 'image',
12689
12691
  traceInfo: item.video.traceInfo
12690
12692
  }
@@ -12729,7 +12731,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12729
12731
  const handleReportProductView = (item) => {
12730
12732
  var _a, _b, _c;
12731
12733
  if (!((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) && !((_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls) && (item === null || item === void 0 ? void 0 : item.product)) {
12732
- productView(item, item.product, (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.bindCta, viewTime.current);
12734
+ productView(item, item.product, (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.bindCta, viewTime.current, activeIndex);
12733
12735
  }
12734
12736
  };
12735
12737
  useEffect(() => {
@@ -12752,7 +12754,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12752
12754
  contentName: (_e = item.video.title) !== null && _e !== void 0 ? _e : '',
12753
12755
  imageStartTime: `${startTime}`,
12754
12756
  contentTags: JSON.stringify((_f = item.video.tags) !== null && _f !== void 0 ? _f : []),
12755
- position: item.position,
12757
+ position: activeIndex,
12756
12758
  contentFormat: 'image',
12757
12759
  traceInfo: item.video.traceInfo
12758
12760
  }
@@ -12786,7 +12788,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12786
12788
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
12787
12789
  renderContent(rec, index),
12788
12790
  renderBottom(rec, index),
12789
- renderLikeButton(rec)))))));
12791
+ renderLikeButton(rec, index)))))));
12790
12792
  });
12791
12793
  }, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage]);
12792
12794
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
@@ -12843,7 +12845,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12843
12845
  * @Author: binruan@chatlabs.com
12844
12846
  * @Date: 2023-10-31 10:56:01
12845
12847
  * @LastEditors: binruan@chatlabs.com
12846
- * @LastEditTime: 2024-04-12 09:50:58
12848
+ * @LastEditTime: 2024-04-15 09:39:17
12847
12849
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
12848
12850
  *
12849
12851
  */
@@ -12879,7 +12881,7 @@ const Popup = () => {
12879
12881
  const product = (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
12880
12882
  const cta = (_d = (_c = data === null || data === void 0 ? void 0 : data.video) === null || _c === void 0 ? void 0 : _c.bindProduct) === null || _d === void 0 ? void 0 : _d.bindCta;
12881
12883
  if (product && cta) {
12882
- productView(data, product, cta, curTimeRef.current);
12884
+ productView(data, product, cta, curTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
12883
12885
  }
12884
12886
  setTimeout(() => {
12885
12887
  window === null || window === void 0 ? void 0 : window.sxpPopup('');