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.cjs CHANGED
@@ -554,7 +554,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
554
554
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/customform', { method: 'POST', body }));
555
555
  return res === null || res === void 0 ? void 0 : res.success;
556
556
  }), [bffFetch]);
557
- const ctaEvent = React.useCallback((eventInfo, rec, product) => {
557
+ const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
558
558
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
559
559
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
560
560
  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);
@@ -569,7 +569,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
569
569
  fromKName = 'imagePage';
570
570
  }
571
571
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
572
- 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 })
572
+ 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 })
573
573
  });
574
574
  }, [bffEventReport, isFromHashtag]);
575
575
  React.useEffect(() => {
@@ -8106,13 +8106,13 @@ SwiperSlide.displayName = 'SwiperSlide';
8106
8106
  * @Author: binruan@chatlabs.com
8107
8107
  * @Date: 2024-03-12 10:59:06
8108
8108
  * @LastEditors: binruan@chatlabs.com
8109
- * @LastEditTime: 2024-04-12 15:10:39
8109
+ * @LastEditTime: 2024-04-15 09:47:08
8110
8110
  * @FilePath: \pb-sxp-ui\src\core\hooks\useEventReport.ts
8111
8111
  *
8112
8112
  */
8113
8113
  function useEventReport() {
8114
8114
  const { bffEventReport, popupDetailData, waterFallData, isFromHashtag } = useSxpDataSource();
8115
- const jumpToWeb = React.useCallback((data, product, cta) => {
8115
+ const jumpToWeb = React.useCallback((data, product, cta, position) => {
8116
8116
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
8117
8117
  let fromKName = '';
8118
8118
  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))) {
@@ -8141,14 +8141,14 @@ function useEventReport() {
8141
8141
  fromKName,
8142
8142
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
8143
8143
  contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
8144
- position: (data === null || data === void 0 ? void 0 : data.position) + '',
8144
+ position: position + '',
8145
8145
  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 : '',
8146
8146
  relatedCtatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
8147
8147
  traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
8148
8148
  }
8149
8149
  });
8150
8150
  }, [bffEventReport, popupDetailData, isFromHashtag]);
8151
- const productView = React.useCallback((data, product, cta, viewTime) => {
8151
+ const productView = React.useCallback((data, product, cta, viewTime, position) => {
8152
8152
  var _a, _b, _c, _d;
8153
8153
  let fromKName = '';
8154
8154
  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))) {
@@ -8166,7 +8166,7 @@ function useEventReport() {
8166
8166
  fromKName,
8167
8167
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
8168
8168
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
8169
- position: (data === null || data === void 0 ? void 0 : data.position) + '',
8169
+ position: position + '',
8170
8170
  relatedContentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
8171
8171
  relatedCtatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
8172
8172
  traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
@@ -8309,7 +8309,7 @@ var ExpandableText$1 = React.memo(ExpandableText);
8309
8309
 
8310
8310
  const CommodityDetail$1 = (_a) => {
8311
8311
  var _b, _c, _d, _e, _f, _g, _h, _j;
8312
- 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"]);
8312
+ 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"]);
8313
8313
  const { sxpParameter } = useSxpDataSource();
8314
8314
  const { popupDetailData, bffEventReport, isPreview, waterFallData } = useSxpDataSource();
8315
8315
  const { jumpToWeb, productView } = useEventReport();
@@ -8318,11 +8318,12 @@ const CommodityDetail$1 = (_a) => {
8318
8318
  const data = isPost ? rec : popupDetailData;
8319
8319
  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;
8320
8320
  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;
8321
+ const position = isPost ? index : popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
8321
8322
  const handleLink = () => {
8322
8323
  if (product === null || product === void 0 ? void 0 : product.link) {
8323
- jumpToWeb(popupDetailData, product, cta);
8324
+ jumpToWeb(popupDetailData, product, cta, position);
8324
8325
  if (!isPost) {
8325
- productView(data, product, cta, viewTime || curTimeRef.current);
8326
+ productView(data, product, cta, viewTime || curTimeRef.current, position);
8326
8327
  }
8327
8328
  window.location.href = window.getJointUtmLink(product.link);
8328
8329
  }
@@ -8759,7 +8760,7 @@ var settingRender$2 = [
8759
8760
 
8760
8761
  const CommodityDetailDiroNew$1 = (_a) => {
8761
8762
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
8762
- 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"]);
8763
+ 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"]);
8763
8764
  React.useState(true);
8764
8765
  const { sxpParameter } = useSxpDataSource();
8765
8766
  const { popupDetailData, bffEventReport, isPreview, swiperRef, waterFallData } = useSxpDataSource();
@@ -8775,11 +8776,12 @@ const CommodityDetailDiroNew$1 = (_a) => {
8775
8776
  const data = isPost ? rec : popupDetailData;
8776
8777
  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;
8777
8778
  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;
8779
+ const position = isPost ? index : popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index;
8778
8780
  const handleLink = () => {
8779
8781
  if (product === null || product === void 0 ? void 0 : product.link) {
8780
- jumpToWeb(data, product, cta);
8782
+ jumpToWeb(data, product, cta, position);
8781
8783
  if (!isPost) {
8782
- productView(data, product, cta, viewTime || curTimeRef.current);
8784
+ productView(data, product, cta, viewTime || curTimeRef.current, position);
8783
8785
  }
8784
8786
  window.location.href = window.getJointUtmLink(product.link);
8785
8787
  }
@@ -9192,7 +9194,7 @@ function useOnScreen(ref) {
9192
9194
  }
9193
9195
 
9194
9196
  const EventProvider = (_a) => {
9195
- var { rec, children, className, onClick, style, isExternalLink = false } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink"]);
9197
+ var { rec, children, className, onClick, style, isExternalLink = false, index } = _a; __rest(_a, ["rec", "children", "className", "onClick", "style", "isExternalLink", "index"]);
9196
9198
  const ref = React.useRef(null);
9197
9199
  const isOnScreen = useOnScreen(ref);
9198
9200
  const { popup } = useEditor();
@@ -9205,22 +9207,22 @@ const EventProvider = (_a) => {
9205
9207
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9206
9208
  eventSubject: 'ctaExposure',
9207
9209
  eventDescription: 'The cta was shown to the user'
9208
- }, rec, item);
9210
+ }, rec, item, index);
9209
9211
  }
9210
- }, [isOnScreen, ref, rec, ctaEvent]);
9212
+ }, [isOnScreen, ref, rec, ctaEvent, index]);
9211
9213
  const handleClick = lodash.throttle(() => {
9212
9214
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
9213
9215
  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;
9214
9216
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9215
9217
  eventSubject: 'clickCta',
9216
9218
  eventDescription: 'User clicked the CTA'
9217
- }, rec, item);
9218
- setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(rec);
9219
+ }, rec, item, index);
9220
+ setPopupDetailData === null || setPopupDetailData === void 0 ? void 0 : setPopupDetailData(Object.assign(Object.assign({}, rec), { index }));
9219
9221
  if (isExternalLink) {
9220
9222
  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) {
9221
9223
  const cta = (_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.bindCta;
9222
9224
  const product = (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.bindProduct;
9223
- jumpToWeb(rec, product, cta);
9225
+ jumpToWeb(rec, product, cta, index);
9224
9226
  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;
9225
9227
  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);
9226
9228
  }
@@ -9391,18 +9393,18 @@ var styles$5 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU"};
9391
9393
 
9392
9394
  const Link$1 = (_a) => {
9393
9395
  var _b, _c, _d, _e, _f;
9394
- var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
9396
+ var { content, style, bgImg, recData, bottom_image, ctaTempStyles, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "index"]);
9395
9397
  const { sxpParameter, bffEventReport } = useSxpDataSource();
9396
9398
  const { jumpToWeb } = useEventReport();
9397
9399
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
9398
9400
  const product = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
9399
9401
  const handleTo = () => {
9400
9402
  if (cta === null || cta === void 0 ? void 0 : cta.link) {
9401
- jumpToWeb(recData, product, cta);
9403
+ jumpToWeb(recData, product, cta, index);
9402
9404
  window.location.href = window.getJointUtmLink(cta.link);
9403
9405
  }
9404
9406
  };
9405
- return (React.createElement(EventProvider$1, Object.assign({ rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { onClick: handleTo }),
9407
+ return (React.createElement(EventProvider$1, Object.assign({ index: index, rec: recData, className: css.css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props, { onClick: handleTo }),
9406
9408
  React.createElement("div", { className: css.css(Object.assign({ backgroundColor: '#f2f2f2', overflow: 'hidden', flexShrink: 0 }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9407
9409
  React.createElement("img", { className: css.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: '' })),
9408
9410
  React.createElement("div", { className: css.css({
@@ -9670,11 +9672,11 @@ var Scroll$1 = React.memo(Scroll);
9670
9672
  * @Author: binruan@chatlabs.com
9671
9673
  * @Date: 2024-01-16 14:50:13
9672
9674
  * @LastEditors: binruan@chatlabs.com
9673
- * @LastEditTime: 2024-03-11 15:46:24
9675
+ * @LastEditTime: 2024-04-11 18:24:15
9674
9676
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
9675
9677
  *
9676
9678
  */
9677
- const Img = ({ src, rec, item }) => {
9679
+ const Img = ({ src, rec, item, index }) => {
9678
9680
  const ref = React.useRef(null);
9679
9681
  const isOnScreen = useOnScreen(ref);
9680
9682
  const { ctaEvent } = useSxpDataSource();
@@ -9683,9 +9685,9 @@ const Img = ({ src, rec, item }) => {
9683
9685
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9684
9686
  eventSubject: 'ctaExposure',
9685
9687
  eventDescription: 'The cta was shown to the user'
9686
- }, rec, item);
9688
+ }, rec, item, index);
9687
9689
  }
9688
- }, [isOnScreen, src, ref, rec, ctaEvent, item]);
9690
+ }, [isOnScreen, src, ref, rec, ctaEvent, item, index]);
9689
9691
  return (React.createElement("img", { ref: ref, hidden: !src, className: css.css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, alt: '' }));
9690
9692
  };
9691
9693
  var Img$1 = React.memo(Img);
@@ -9694,7 +9696,7 @@ var styles$2 = {"two-line-ellipsis":"index-module_two-line-ellipsis__SFQwJ"};
9694
9696
 
9695
9697
  const MultiCommodityDiro$1 = (_a) => {
9696
9698
  var _b, _c;
9697
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9699
+ 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"]);
9698
9700
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9699
9701
  const { popup } = useEditor();
9700
9702
  const { jumpToWeb } = useEventReport();
@@ -9703,11 +9705,11 @@ const MultiCommodityDiro$1 = (_a) => {
9703
9705
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9704
9706
  eventSubject: 'clickCta',
9705
9707
  eventDescription: 'User clicked the CTA'
9706
- }, recData, item);
9707
- 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 }) }));
9708
+ }, recData, item, index);
9709
+ 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 }));
9708
9710
  if (isExternalLink) {
9709
9711
  if (item === null || item === void 0 ? void 0 : item.link) {
9710
- jumpToWeb(recData, item, item.bindCta);
9712
+ jumpToWeb(recData, item, item.bindCta, index);
9711
9713
  window.location.href = window.getJointUtmLink(item.link);
9712
9714
  }
9713
9715
  }
@@ -9719,7 +9721,7 @@ const MultiCommodityDiro$1 = (_a) => {
9719
9721
  var _a, _b, _c, _d, _e, _f;
9720
9722
  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.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
9721
9723
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9722
- 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 })),
9724
+ 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 })),
9723
9725
  React.createElement("div", { className: css.css({
9724
9726
  color: '#000',
9725
9727
  display: 'flex',
@@ -9806,7 +9808,7 @@ var styles$1 = {"two-line-ellipsis":"index-module_two-line-ellipsis__mdzn0"};
9806
9808
 
9807
9809
  const MultiCommodity$1 = (_a) => {
9808
9810
  var _b, _c;
9809
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9811
+ 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"]);
9810
9812
  const { sxpParameter } = useSxpDataSource();
9811
9813
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
9812
9814
  const { popup } = useEditor();
@@ -9816,11 +9818,11 @@ const MultiCommodity$1 = (_a) => {
9816
9818
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9817
9819
  eventSubject: 'clickCta',
9818
9820
  eventDescription: 'User clicked the CTA'
9819
- }, recData, item);
9820
- 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 }) }));
9821
+ }, recData, item, index);
9822
+ 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 }));
9821
9823
  if (isExternalLink) {
9822
9824
  if (item === null || item === void 0 ? void 0 : item.link) {
9823
- jumpToWeb(recData, item, item.bindCta);
9825
+ jumpToWeb(recData, item, item.bindCta, index);
9824
9826
  window.location.href = window.getJointUtmLink(item.link);
9825
9827
  }
9826
9828
  }
@@ -9832,7 +9834,7 @@ const MultiCommodity$1 = (_a) => {
9832
9834
  var _a, _b, _c, _d, _e, _f;
9833
9835
  return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: css.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
9834
9836
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9835
- 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 })),
9837
+ 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 })),
9836
9838
  React.createElement("div", { className: css.css({
9837
9839
  color: '#fff',
9838
9840
  display: 'flex',
@@ -9919,7 +9921,7 @@ var styles = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__fselR"};
9919
9921
 
9920
9922
  const MultiCommodityDiroNew$1 = (_a) => {
9921
9923
  var _b, _c;
9922
- var { content, style, bgImg, recData, onClick, bottom_image, ctaTempStyles, isExternalLink } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "onClick", "bottom_image", "ctaTempStyles", "isExternalLink"]);
9924
+ 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"]);
9923
9925
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9924
9926
  const { popup } = useEditor();
9925
9927
  const { jumpToWeb } = useEventReport();
@@ -9928,11 +9930,11 @@ const MultiCommodityDiroNew$1 = (_a) => {
9928
9930
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9929
9931
  eventSubject: 'clickCta',
9930
9932
  eventDescription: 'User clicked the CTA'
9931
- }, recData, item);
9932
- 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 }) }));
9933
+ }, recData, item, index);
9934
+ 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 }));
9933
9935
  if (isExternalLink) {
9934
9936
  if (item === null || item === void 0 ? void 0 : item.link) {
9935
- jumpToWeb(recData, item, item.bindCta);
9937
+ jumpToWeb(recData, item, item.bindCta, index);
9936
9938
  window.location.href = window.getJointUtmLink(item.link);
9937
9939
  }
9938
9940
  }
@@ -9944,7 +9946,7 @@ const MultiCommodityDiroNew$1 = (_a) => {
9944
9946
  var _a, _b, _c, _d, _e, _f;
9945
9947
  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.css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
9946
9948
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9947
- 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 })),
9949
+ 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 })),
9948
9950
  React.createElement("div", { className: css.css({
9949
9951
  color: '#fff',
9950
9952
  display: 'flex',
@@ -11590,7 +11592,7 @@ const WaterfallFlowItem = (props) => {
11590
11592
  };
11591
11593
  }, [src, showVideo]);
11592
11594
  const handleClickToDetail = () => {
11593
- reportTagsView();
11595
+ reportTagsView(index);
11594
11596
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(list);
11595
11597
  setTimeout(() => {
11596
11598
  var _a;
@@ -11698,7 +11700,7 @@ var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
11698
11700
  * @Author: binruan@chatlabs.com
11699
11701
  * @Date: 2024-01-10 10:58:24
11700
11702
  * @LastEditors: binruan@chatlabs.com
11701
- * @LastEditTime: 2024-04-12 11:29:01
11703
+ * @LastEditTime: 2024-04-15 09:58:50
11702
11704
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
11703
11705
  *
11704
11706
  */
@@ -11725,7 +11727,7 @@ const WaterFall = (props) => {
11725
11727
  if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
11726
11728
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
11727
11729
  }
11728
- reportTagsView();
11730
+ reportTagsView(0);
11729
11731
  setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
11730
11732
  setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
11731
11733
  setTimeout(() => {
@@ -11742,7 +11744,7 @@ const WaterFall = (props) => {
11742
11744
  setRecData(waterFallData);
11743
11745
  }
11744
11746
  }, [waterFallData]);
11745
- const reportTagsView = React.useCallback(() => {
11747
+ const reportTagsView = React.useCallback((index) => {
11746
11748
  var _a, _b, _c, _d, _e, _f;
11747
11749
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
11748
11750
  if (!rec)
@@ -11760,7 +11762,7 @@ const WaterFall = (props) => {
11760
11762
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
11761
11763
  eventInfo: {
11762
11764
  relatedContentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11763
- position: rec === null || rec === void 0 ? void 0 : rec.position,
11765
+ position: index + '',
11764
11766
  contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
11765
11767
  traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
11766
11768
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
@@ -11895,7 +11897,7 @@ var _materials_ = /*#__PURE__*/Object.freeze({
11895
11897
  const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
11896
11898
  const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
11897
11899
  const LikeButton = (_a) => {
11898
- var { active, activeIcon, unActicveIcon, recData } = _a, props = __rest(_a, ["active", "activeIcon", "unActicveIcon", "recData"]);
11900
+ var { active, activeIcon, unActicveIcon, recData, position } = _a, props = __rest(_a, ["active", "activeIcon", "unActicveIcon", "recData", "position"]);
11899
11901
  const { mutateLike, mutateUnlike, bffEventReport } = useSxpDataSource();
11900
11902
  const [state, setState] = React.useState(active);
11901
11903
  const likeIcon = useIconLink(defaultLikeIconPath);
@@ -11913,7 +11915,7 @@ const LikeButton = (_a) => {
11913
11915
  contentId: (_f = (_e = recData.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
11914
11916
  contentName: (_h = (_g = recData.video) === null || _g === void 0 ? void 0 : _g.title) !== null && _h !== void 0 ? _h : '',
11915
11917
  contentTags: JSON.stringify((_k = (_j = recData.video) === null || _j === void 0 ? void 0 : _j.tags) !== null && _k !== void 0 ? _k : []),
11916
- position: recData.position,
11918
+ position: position + '',
11917
11919
  contentFormat: ((_l = recData.video) === null || _l === void 0 ? void 0 : _l.url) ? 'video' : 'image',
11918
11920
  traceInfo: (_m = recData.video) === null || _m === void 0 ? void 0 : _m.traceInfo
11919
11921
  }
@@ -11933,7 +11935,7 @@ const LikeButton = (_a) => {
11933
11935
  contentId: (_q = (_p = recData.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
11934
11936
  contentName: (_s = (_r = recData.video) === null || _r === void 0 ? void 0 : _r.title) !== null && _s !== void 0 ? _s : '',
11935
11937
  contentTags: JSON.stringify((_u = (_t = recData.video) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []),
11936
- position: recData.position,
11938
+ position: position + '',
11937
11939
  contentFormat: ((_v = recData.video) === null || _v === void 0 ? void 0 : _v.url) ? 'video' : 'image',
11938
11940
  traceInfo: (_w = recData.video) === null || _w === void 0 ? void 0 : _w.traceInfo
11939
11941
  }
@@ -11991,7 +11993,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
11991
11993
  startTime: videoCurrentTime,
11992
11994
  videoDuration,
11993
11995
  contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
11994
- position: item.position,
11996
+ position: index + '',
11995
11997
  contentFormat: 'video',
11996
11998
  traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
11997
11999
  }
@@ -12019,7 +12021,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
12019
12021
  startTime: videoCurrentTime,
12020
12022
  videoDuration,
12021
12023
  contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
12022
- position: item.position,
12024
+ position: index + '',
12023
12025
  contentFormat: 'video',
12024
12026
  traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
12025
12027
  }
@@ -12079,7 +12081,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
12079
12081
  videoDuration,
12080
12082
  playDuration,
12081
12083
  contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
12082
- position: item.position,
12084
+ position: index + '',
12083
12085
  contentFormat: 'video',
12084
12086
  traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
12085
12087
  }
@@ -12427,7 +12429,7 @@ function withBindDataSource(Component) {
12427
12429
  * @Author: binruan@chatlabs.com
12428
12430
  * @Date: 2023-12-26 16:11:34
12429
12431
  * @LastEditors: binruan@chatlabs.com
12430
- * @LastEditTime: 2024-04-10 16:49:34
12432
+ * @LastEditTime: 2024-04-11 18:14:05
12431
12433
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
12432
12434
  *
12433
12435
  */
@@ -12461,7 +12463,7 @@ const RenderCard = ({ rec, index, tempMap, resolver }) => {
12461
12463
  const Component = withBindDataSource(t);
12462
12464
  const defaulSetting = (_x = t === null || t === void 0 ? void 0 : t.extend) === null || _x === void 0 ? void 0 : _x.defaulSetting;
12463
12465
  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';
12464
- 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 })));
12466
+ 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 })));
12465
12467
  }
12466
12468
  else {
12467
12469
  return null;
@@ -12487,7 +12489,7 @@ const Nudge = ({ nudge }) => {
12487
12489
  * @Author: binruan@chatlabs.com
12488
12490
  * @Date: 2024-01-15 19:03:09
12489
12491
  * @LastEditors: binruan@chatlabs.com
12490
- * @LastEditTime: 2024-04-10 10:13:48
12492
+ * @LastEditTime: 2024-04-11 18:45:44
12491
12493
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12492
12494
  *
12493
12495
  */
@@ -12615,7 +12617,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12615
12617
  eventDescription: 'Session completed',
12616
12618
  relatedContentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
12617
12619
  relatedProductId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
12618
- position: item === null || item === void 0 ? void 0 : item.position,
12620
+ position: activeIndex,
12619
12621
  fromKName,
12620
12622
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
12621
12623
  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 : ''
@@ -12658,7 +12660,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12658
12660
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
12659
12661
  const Component = withBindDataSource(t);
12660
12662
  const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
12661
- 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' }) })));
12663
+ 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 })));
12662
12664
  });
12663
12665
  }
12664
12666
  return null;
@@ -12677,7 +12679,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12677
12679
  }
12678
12680
  return null;
12679
12681
  }, [descStyle, activeIndex, tempMap, resolver, tipText, nudge, hashTagStyle]);
12680
- const renderLikeButton = React.useCallback((rec) => {
12682
+ const renderLikeButton = React.useCallback((rec, index) => {
12681
12683
  var _a, _b;
12682
12684
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
12683
12685
  return;
@@ -12689,7 +12691,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12689
12691
  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: {
12690
12692
  top,
12691
12693
  right: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _b !== void 0 ? _b : 0
12692
- } }));
12694
+ }, position: index }));
12693
12695
  }
12694
12696
  return null;
12695
12697
  }, [globalConfig, waterFallData]);
@@ -12707,7 +12709,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12707
12709
  imageEndTime: `${endTime}`,
12708
12710
  playDuration: `${duration}`,
12709
12711
  contentTags: JSON.stringify((_f = item.video.tags) !== null && _f !== void 0 ? _f : []),
12710
- position: item.position,
12712
+ position: activeIndex,
12711
12713
  contentFormat: 'image',
12712
12714
  traceInfo: item.video.traceInfo
12713
12715
  }
@@ -12752,7 +12754,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12752
12754
  const handleReportProductView = (item) => {
12753
12755
  var _a, _b, _c;
12754
12756
  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)) {
12755
- productView(item, item.product, (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.bindCta, viewTime.current);
12757
+ 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);
12756
12758
  }
12757
12759
  };
12758
12760
  React.useEffect(() => {
@@ -12775,7 +12777,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12775
12777
  contentName: (_e = item.video.title) !== null && _e !== void 0 ? _e : '',
12776
12778
  imageStartTime: `${startTime}`,
12777
12779
  contentTags: JSON.stringify((_f = item.video.tags) !== null && _f !== void 0 ? _f : []),
12778
- position: item.position,
12780
+ position: activeIndex,
12779
12781
  contentFormat: 'image',
12780
12782
  traceInfo: item.video.traceInfo
12781
12783
  }
@@ -12809,7 +12811,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12809
12811
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
12810
12812
  renderContent(rec, index),
12811
12813
  renderBottom(rec, index),
12812
- renderLikeButton(rec)))))));
12814
+ renderLikeButton(rec, index)))))));
12813
12815
  });
12814
12816
  }, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage]);
12815
12817
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
@@ -12866,7 +12868,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12866
12868
  * @Author: binruan@chatlabs.com
12867
12869
  * @Date: 2023-10-31 10:56:01
12868
12870
  * @LastEditors: binruan@chatlabs.com
12869
- * @LastEditTime: 2024-04-12 09:50:58
12871
+ * @LastEditTime: 2024-04-15 09:39:17
12870
12872
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
12871
12873
  *
12872
12874
  */
@@ -12902,7 +12904,7 @@ const Popup = () => {
12902
12904
  const product = (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
12903
12905
  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;
12904
12906
  if (product && cta) {
12905
- productView(data, product, cta, curTimeRef.current);
12907
+ productView(data, product, cta, curTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
12906
12908
  }
12907
12909
  setTimeout(() => {
12908
12910
  window === null || window === void 0 ? void 0 : window.sxpPopup('');