pb-sxp-ui 1.0.7 → 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 +72 -69
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +72 -69
  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 +72 -69
  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 +6 -6
  39. package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
  40. package/es/materials/sxp/template/MultiCommodityDiro/index.js +6 -6
  41. package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
  42. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +6 -6
  43. package/es/materials/sxp/template/components/EventProvider.d.ts +1 -0
  44. package/es/materials/sxp/template/components/EventProvider.js +8 -7
  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 +6 -6
  73. package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +1 -0
  74. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +6 -6
  75. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +1 -0
  76. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +6 -6
  77. package/lib/materials/sxp/template/components/EventProvider.d.ts +1 -0
  78. package/lib/materials/sxp/template/components/EventProvider.js +8 -7
  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,23 +9207,24 @@ 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
- var _a, _b, _c, _d, _e, _f, _g, _h;
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;
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);
9225
9228
  }
9226
9229
  }
9227
9230
  else {
@@ -9390,18 +9393,18 @@ var styles$5 = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__nkBlU"};
9390
9393
 
9391
9394
  const Link$1 = (_a) => {
9392
9395
  var _b, _c, _d, _e, _f;
9393
- 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"]);
9394
9397
  const { sxpParameter, bffEventReport } = useSxpDataSource();
9395
9398
  const { jumpToWeb } = useEventReport();
9396
9399
  const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
9397
9400
  const product = (_c = recData === null || recData === void 0 ? void 0 : recData.video) === null || _c === void 0 ? void 0 : _c.bindProduct;
9398
9401
  const handleTo = () => {
9399
9402
  if (cta === null || cta === void 0 ? void 0 : cta.link) {
9400
- jumpToWeb(recData, product, cta);
9403
+ jumpToWeb(recData, product, cta, index);
9401
9404
  window.location.href = window.getJointUtmLink(cta.link);
9402
9405
  }
9403
9406
  };
9404
- 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 }),
9405
9408
  React.createElement("div", { className: css.css(Object.assign({ backgroundColor: '#f2f2f2', overflow: 'hidden', flexShrink: 0 }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9406
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: '' })),
9407
9410
  React.createElement("div", { className: css.css({
@@ -9669,11 +9672,11 @@ var Scroll$1 = React.memo(Scroll);
9669
9672
  * @Author: binruan@chatlabs.com
9670
9673
  * @Date: 2024-01-16 14:50:13
9671
9674
  * @LastEditors: binruan@chatlabs.com
9672
- * @LastEditTime: 2024-03-11 15:46:24
9675
+ * @LastEditTime: 2024-04-11 18:24:15
9673
9676
  * @FilePath: \pb-sxp-ui\src\materials\sxp\template\components\Img.tsx
9674
9677
  *
9675
9678
  */
9676
- const Img = ({ src, rec, item }) => {
9679
+ const Img = ({ src, rec, item, index }) => {
9677
9680
  const ref = React.useRef(null);
9678
9681
  const isOnScreen = useOnScreen(ref);
9679
9682
  const { ctaEvent } = useSxpDataSource();
@@ -9682,9 +9685,9 @@ const Img = ({ src, rec, item }) => {
9682
9685
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9683
9686
  eventSubject: 'ctaExposure',
9684
9687
  eventDescription: 'The cta was shown to the user'
9685
- }, rec, item);
9688
+ }, rec, item, index);
9686
9689
  }
9687
- }, [isOnScreen, src, ref, rec, ctaEvent, item]);
9690
+ }, [isOnScreen, src, ref, rec, ctaEvent, item, index]);
9688
9691
  return (React.createElement("img", { ref: ref, hidden: !src, className: css.css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, alt: '' }));
9689
9692
  };
9690
9693
  var Img$1 = React.memo(Img);
@@ -9693,7 +9696,7 @@ var styles$2 = {"two-line-ellipsis":"index-module_two-line-ellipsis__SFQwJ"};
9693
9696
 
9694
9697
  const MultiCommodityDiro$1 = (_a) => {
9695
9698
  var _b, _c;
9696
- 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"]);
9697
9700
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9698
9701
  const { popup } = useEditor();
9699
9702
  const { jumpToWeb } = useEventReport();
@@ -9702,12 +9705,12 @@ const MultiCommodityDiro$1 = (_a) => {
9702
9705
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9703
9706
  eventSubject: 'clickCta',
9704
9707
  eventDescription: 'User clicked the CTA'
9705
- }, recData, item);
9706
- 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 }));
9707
9710
  if (isExternalLink) {
9708
9711
  if (item === null || item === void 0 ? void 0 : item.link) {
9709
- jumpToWeb(recData, item, item.bindCta);
9710
- window.location.href = item.link;
9712
+ jumpToWeb(recData, item, item.bindCta, index);
9713
+ window.location.href = window.getJointUtmLink(item.link);
9711
9714
  }
9712
9715
  }
9713
9716
  else {
@@ -9718,7 +9721,7 @@ const MultiCommodityDiro$1 = (_a) => {
9718
9721
  var _a, _b, _c, _d, _e, _f;
9719
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) }),
9720
9723
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9721
- 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 })),
9722
9725
  React.createElement("div", { className: css.css({
9723
9726
  color: '#000',
9724
9727
  display: 'flex',
@@ -9805,7 +9808,7 @@ var styles$1 = {"two-line-ellipsis":"index-module_two-line-ellipsis__mdzn0"};
9805
9808
 
9806
9809
  const MultiCommodity$1 = (_a) => {
9807
9810
  var _b, _c;
9808
- 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"]);
9809
9812
  const { sxpParameter } = useSxpDataSource();
9810
9813
  const { ctaEvent, setPopupDetailData } = useSxpDataSource();
9811
9814
  const { popup } = useEditor();
@@ -9815,12 +9818,12 @@ const MultiCommodity$1 = (_a) => {
9815
9818
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9816
9819
  eventSubject: 'clickCta',
9817
9820
  eventDescription: 'User clicked the CTA'
9818
- }, recData, item);
9819
- 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 }));
9820
9823
  if (isExternalLink) {
9821
9824
  if (item === null || item === void 0 ? void 0 : item.link) {
9822
- jumpToWeb(recData, item, item.bindCta);
9823
- window.location.href = item.link;
9825
+ jumpToWeb(recData, item, item.bindCta, index);
9826
+ window.location.href = window.getJointUtmLink(item.link);
9824
9827
  }
9825
9828
  }
9826
9829
  else {
@@ -9831,7 +9834,7 @@ const MultiCommodity$1 = (_a) => {
9831
9834
  var _a, _b, _c, _d, _e, _f;
9832
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) }),
9833
9836
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9834
- 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 })),
9835
9838
  React.createElement("div", { className: css.css({
9836
9839
  color: '#fff',
9837
9840
  display: 'flex',
@@ -9918,7 +9921,7 @@ var styles = {"tow-line-ellipsis":"index-module_tow-line-ellipsis__fselR"};
9918
9921
 
9919
9922
  const MultiCommodityDiroNew$1 = (_a) => {
9920
9923
  var _b, _c;
9921
- 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"]);
9922
9925
  const { ctaEvent, setPopupDetailData, sxpParameter } = useSxpDataSource();
9923
9926
  const { popup } = useEditor();
9924
9927
  const { jumpToWeb } = useEventReport();
@@ -9927,12 +9930,12 @@ const MultiCommodityDiroNew$1 = (_a) => {
9927
9930
  ctaEvent === null || ctaEvent === void 0 ? void 0 : ctaEvent({
9928
9931
  eventSubject: 'clickCta',
9929
9932
  eventDescription: 'User clicked the CTA'
9930
- }, recData, item);
9931
- 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 }));
9932
9935
  if (isExternalLink) {
9933
9936
  if (item === null || item === void 0 ? void 0 : item.link) {
9934
- jumpToWeb(recData, item, item.bindCta);
9935
- window.location.href = item.link;
9937
+ jumpToWeb(recData, item, item.bindCta, index);
9938
+ window.location.href = window.getJointUtmLink(item.link);
9936
9939
  }
9937
9940
  }
9938
9941
  else {
@@ -9943,7 +9946,7 @@ const MultiCommodityDiroNew$1 = (_a) => {
9943
9946
  var _a, _b, _c, _d, _e, _f;
9944
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) }),
9945
9948
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
9946
- 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 })),
9947
9950
  React.createElement("div", { className: css.css({
9948
9951
  color: '#fff',
9949
9952
  display: 'flex',
@@ -11589,7 +11592,7 @@ const WaterfallFlowItem = (props) => {
11589
11592
  };
11590
11593
  }, [src, showVideo]);
11591
11594
  const handleClickToDetail = () => {
11592
- reportTagsView();
11595
+ reportTagsView(index);
11593
11596
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(list);
11594
11597
  setTimeout(() => {
11595
11598
  var _a;
@@ -11697,7 +11700,7 @@ var img$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeA
11697
11700
  * @Author: binruan@chatlabs.com
11698
11701
  * @Date: 2024-01-10 10:58:24
11699
11702
  * @LastEditors: binruan@chatlabs.com
11700
- * @LastEditTime: 2024-04-12 11:29:01
11703
+ * @LastEditTime: 2024-04-15 09:58:50
11701
11704
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\WaterFall\index.tsx
11702
11705
  *
11703
11706
  */
@@ -11724,7 +11727,7 @@ const WaterFall = (props) => {
11724
11727
  if (!isEq && cacheRtcList && (cacheRtcList === null || cacheRtcList === void 0 ? void 0 : cacheRtcList.length)) {
11725
11728
  setRtcList === null || setRtcList === void 0 ? void 0 : setRtcList(cacheRtcList);
11726
11729
  }
11727
- reportTagsView();
11730
+ reportTagsView(0);
11728
11731
  setWaterFallData === null || setWaterFallData === void 0 ? void 0 : setWaterFallData(undefined);
11729
11732
  setIsFromHashtag === null || setIsFromHashtag === void 0 ? void 0 : setIsFromHashtag(false);
11730
11733
  setTimeout(() => {
@@ -11741,7 +11744,7 @@ const WaterFall = (props) => {
11741
11744
  setRecData(waterFallData);
11742
11745
  }
11743
11746
  }, [waterFallData]);
11744
- const reportTagsView = React.useCallback(() => {
11747
+ const reportTagsView = React.useCallback((index) => {
11745
11748
  var _a, _b, _c, _d, _e, _f;
11746
11749
  const rec = recData === null || recData === void 0 ? void 0 : recData.rec;
11747
11750
  if (!rec)
@@ -11759,7 +11762,7 @@ const WaterFall = (props) => {
11759
11762
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
11760
11763
  eventInfo: {
11761
11764
  relatedContentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
11762
- position: rec === null || rec === void 0 ? void 0 : rec.position,
11765
+ position: index + '',
11763
11766
  contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
11764
11767
  traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
11765
11768
  hashTags: JSON.stringify([recData === null || recData === void 0 ? void 0 : recData.hashTag]),
@@ -11894,7 +11897,7 @@ var _materials_ = /*#__PURE__*/Object.freeze({
11894
11897
  const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
11895
11898
  const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
11896
11899
  const LikeButton = (_a) => {
11897
- 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"]);
11898
11901
  const { mutateLike, mutateUnlike, bffEventReport } = useSxpDataSource();
11899
11902
  const [state, setState] = React.useState(active);
11900
11903
  const likeIcon = useIconLink(defaultLikeIconPath);
@@ -11912,7 +11915,7 @@ const LikeButton = (_a) => {
11912
11915
  contentId: (_f = (_e = recData.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
11913
11916
  contentName: (_h = (_g = recData.video) === null || _g === void 0 ? void 0 : _g.title) !== null && _h !== void 0 ? _h : '',
11914
11917
  contentTags: JSON.stringify((_k = (_j = recData.video) === null || _j === void 0 ? void 0 : _j.tags) !== null && _k !== void 0 ? _k : []),
11915
- position: recData.position,
11918
+ position: position + '',
11916
11919
  contentFormat: ((_l = recData.video) === null || _l === void 0 ? void 0 : _l.url) ? 'video' : 'image',
11917
11920
  traceInfo: (_m = recData.video) === null || _m === void 0 ? void 0 : _m.traceInfo
11918
11921
  }
@@ -11932,7 +11935,7 @@ const LikeButton = (_a) => {
11932
11935
  contentId: (_q = (_p = recData.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
11933
11936
  contentName: (_s = (_r = recData.video) === null || _r === void 0 ? void 0 : _r.title) !== null && _s !== void 0 ? _s : '',
11934
11937
  contentTags: JSON.stringify((_u = (_t = recData.video) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []),
11935
- position: recData.position,
11938
+ position: position + '',
11936
11939
  contentFormat: ((_v = recData.video) === null || _v === void 0 ? void 0 : _v.url) ? 'video' : 'image',
11937
11940
  traceInfo: (_w = recData.video) === null || _w === void 0 ? void 0 : _w.traceInfo
11938
11941
  }
@@ -11990,7 +11993,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
11990
11993
  startTime: videoCurrentTime,
11991
11994
  videoDuration,
11992
11995
  contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
11993
- position: item.position,
11996
+ position: index + '',
11994
11997
  contentFormat: 'video',
11995
11998
  traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
11996
11999
  }
@@ -12018,7 +12021,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
12018
12021
  startTime: videoCurrentTime,
12019
12022
  videoDuration,
12020
12023
  contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
12021
- position: item.position,
12024
+ position: index + '',
12022
12025
  contentFormat: 'video',
12023
12026
  traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
12024
12027
  }
@@ -12078,7 +12081,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex }) => {
12078
12081
  videoDuration,
12079
12082
  playDuration,
12080
12083
  contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
12081
- position: item.position,
12084
+ position: index + '',
12082
12085
  contentFormat: 'video',
12083
12086
  traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
12084
12087
  }
@@ -12426,7 +12429,7 @@ function withBindDataSource(Component) {
12426
12429
  * @Author: binruan@chatlabs.com
12427
12430
  * @Date: 2023-12-26 16:11:34
12428
12431
  * @LastEditors: binruan@chatlabs.com
12429
- * @LastEditTime: 2024-04-10 16:49:34
12432
+ * @LastEditTime: 2024-04-11 18:14:05
12430
12433
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\RenderCard.tsx
12431
12434
  *
12432
12435
  */
@@ -12460,7 +12463,7 @@ const RenderCard = ({ rec, index, tempMap, resolver }) => {
12460
12463
  const Component = withBindDataSource(t);
12461
12464
  const defaulSetting = (_x = t === null || t === void 0 ? void 0 : t.extend) === null || _x === void 0 ? void 0 : _x.defaulSetting;
12462
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';
12463
- 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 })));
12464
12467
  }
12465
12468
  else {
12466
12469
  return null;
@@ -12486,7 +12489,7 @@ const Nudge = ({ nudge }) => {
12486
12489
  * @Author: binruan@chatlabs.com
12487
12490
  * @Date: 2024-01-15 19:03:09
12488
12491
  * @LastEditors: binruan@chatlabs.com
12489
- * @LastEditTime: 2024-04-10 10:13:48
12492
+ * @LastEditTime: 2024-04-11 18:45:44
12490
12493
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12491
12494
  *
12492
12495
  */
@@ -12614,7 +12617,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12614
12617
  eventDescription: 'Session completed',
12615
12618
  relatedContentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
12616
12619
  relatedProductId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
12617
- position: item === null || item === void 0 ? void 0 : item.position,
12620
+ position: activeIndex,
12618
12621
  fromKName,
12619
12622
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
12620
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 : ''
@@ -12657,7 +12660,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12657
12660
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
12658
12661
  const Component = withBindDataSource(t);
12659
12662
  const defaulSetting = (_b = t === null || t === void 0 ? void 0 : t.extend) === null || _b === void 0 ? void 0 : _b.defaulSetting;
12660
- 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 })));
12661
12664
  });
12662
12665
  }
12663
12666
  return null;
@@ -12676,7 +12679,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12676
12679
  }
12677
12680
  return null;
12678
12681
  }, [descStyle, activeIndex, tempMap, resolver, tipText, nudge, hashTagStyle]);
12679
- const renderLikeButton = React.useCallback((rec) => {
12682
+ const renderLikeButton = React.useCallback((rec, index) => {
12680
12683
  var _a, _b;
12681
12684
  if (!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLike))
12682
12685
  return;
@@ -12688,7 +12691,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12688
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: {
12689
12692
  top,
12690
12693
  right: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _b !== void 0 ? _b : 0
12691
- } }));
12694
+ }, position: index }));
12692
12695
  }
12693
12696
  return null;
12694
12697
  }, [globalConfig, waterFallData]);
@@ -12706,7 +12709,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12706
12709
  imageEndTime: `${endTime}`,
12707
12710
  playDuration: `${duration}`,
12708
12711
  contentTags: JSON.stringify((_f = item.video.tags) !== null && _f !== void 0 ? _f : []),
12709
- position: item.position,
12712
+ position: activeIndex,
12710
12713
  contentFormat: 'image',
12711
12714
  traceInfo: item.video.traceInfo
12712
12715
  }
@@ -12751,7 +12754,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12751
12754
  const handleReportProductView = (item) => {
12752
12755
  var _a, _b, _c;
12753
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)) {
12754
- 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);
12755
12758
  }
12756
12759
  };
12757
12760
  React.useEffect(() => {
@@ -12774,7 +12777,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12774
12777
  contentName: (_e = item.video.title) !== null && _e !== void 0 ? _e : '',
12775
12778
  imageStartTime: `${startTime}`,
12776
12779
  contentTags: JSON.stringify((_f = item.video.tags) !== null && _f !== void 0 ? _f : []),
12777
- position: item.position,
12780
+ position: activeIndex,
12778
12781
  contentFormat: 'image',
12779
12782
  traceInfo: item.video.traceInfo
12780
12783
  }
@@ -12808,7 +12811,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12808
12811
  React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement(React.Fragment, null,
12809
12812
  renderContent(rec, index),
12810
12813
  renderBottom(rec, index),
12811
- renderLikeButton(rec)))))));
12814
+ renderLikeButton(rec, index)))))));
12812
12815
  });
12813
12816
  }, [containerWidth, data, height, loading, renderBottom, renderContent, visList, loadingImage]);
12814
12817
  const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png');
@@ -12865,7 +12868,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
12865
12868
  * @Author: binruan@chatlabs.com
12866
12869
  * @Date: 2023-10-31 10:56:01
12867
12870
  * @LastEditors: binruan@chatlabs.com
12868
- * @LastEditTime: 2024-04-12 09:50:58
12871
+ * @LastEditTime: 2024-04-15 09:39:17
12869
12872
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
12870
12873
  *
12871
12874
  */
@@ -12901,7 +12904,7 @@ const Popup = () => {
12901
12904
  const product = (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
12902
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;
12903
12906
  if (product && cta) {
12904
- productView(data, product, cta, curTimeRef.current);
12907
+ productView(data, product, cta, curTimeRef.current, popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.index);
12905
12908
  }
12906
12909
  setTimeout(() => {
12907
12910
  window === null || window === void 0 ? void 0 : window.sxpPopup('');