pb-sxp-ui 1.18.0 → 1.18.2

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 (82) hide show
  1. package/dist/index.cjs +322 -394
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +15 -7
  4. package/dist/index.js +322 -394
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.cjs +6 -6
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.js +6 -6
  9. package/dist/index.min.js.map +1 -1
  10. package/dist/pb-ui.js +322 -394
  11. package/dist/pb-ui.js.map +1 -1
  12. package/dist/pb-ui.min.js +6 -6
  13. package/dist/pb-ui.min.js.map +1 -1
  14. package/es/core/components/DiyPortalPreview/VideoWidget.js +8 -10
  15. package/es/core/components/DiyPortalPreview/index.js +5 -3
  16. package/es/core/components/DiyStoryPreview/index.js +7 -18
  17. package/es/core/components/SxpPageRender/LikeButton/index.js +16 -18
  18. package/es/core/components/SxpPageRender/PictureGroup/index.d.ts +0 -5
  19. package/es/core/components/SxpPageRender/PictureGroup/index.js +13 -39
  20. package/es/core/components/SxpPageRender/RenderCard.d.ts +0 -1
  21. package/es/core/components/SxpPageRender/RenderCard.js +14 -2
  22. package/es/core/components/SxpPageRender/VideoWidget/index.js +45 -32
  23. package/es/core/components/SxpPageRender/WaterFall/index.js +3 -4
  24. package/es/core/components/SxpPageRender/index.js +41 -57
  25. package/es/core/context/SxpDataSourceProvider.d.ts +12 -5
  26. package/es/core/context/SxpDataSourceProvider.js +35 -62
  27. package/es/core/hooks/useEventReport.js +5 -6
  28. package/es/materials/sxp/consentPopup/Display/index.js +1 -1
  29. package/es/materials/sxp/cta/AniLinkPopup/material.js +2 -3
  30. package/es/materials/sxp/popup/CommodityDetail/material.js +1 -2
  31. package/es/materials/sxp/popup/CommodityList/index.js +4 -5
  32. package/es/materials/sxp/popup/CommodityList/material.js +1 -1
  33. package/es/materials/sxp/popup/CommodityList/settingRender.js +1 -1
  34. package/es/materials/sxp/template/Appoint/material.js +1 -2
  35. package/es/materials/sxp/template/Commodity/material.js +2 -3
  36. package/es/materials/sxp/template/CommodityDiro/material.js +2 -3
  37. package/es/materials/sxp/template/CommodityDiroNew/material.js +2 -4
  38. package/es/materials/sxp/template/Link/material.js +2 -4
  39. package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
  40. package/es/materials/sxp/template/MultiCommodity/material.js +1 -2
  41. package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  42. package/es/materials/sxp/template/MultiCommodityDiro/material.js +2 -3
  43. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
  44. package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +2 -4
  45. package/es/materials/sxp/template/NineCommodity/material.js +2 -3
  46. package/es/materials/sxp/template/components/CommodityGroup.js +1 -1
  47. package/es/materials/sxp/template/components/settingRender.js +1 -1
  48. package/lib/core/components/DiyPortalPreview/VideoWidget.js +8 -10
  49. package/lib/core/components/DiyPortalPreview/index.js +5 -3
  50. package/lib/core/components/DiyStoryPreview/index.js +7 -18
  51. package/lib/core/components/SxpPageRender/LikeButton/index.js +16 -18
  52. package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +0 -5
  53. package/lib/core/components/SxpPageRender/PictureGroup/index.js +12 -38
  54. package/lib/core/components/SxpPageRender/RenderCard.d.ts +0 -1
  55. package/lib/core/components/SxpPageRender/RenderCard.js +14 -2
  56. package/lib/core/components/SxpPageRender/VideoWidget/index.js +45 -32
  57. package/lib/core/components/SxpPageRender/WaterFall/index.js +3 -4
  58. package/lib/core/components/SxpPageRender/index.js +41 -57
  59. package/lib/core/context/SxpDataSourceProvider.d.ts +12 -5
  60. package/lib/core/context/SxpDataSourceProvider.js +35 -62
  61. package/lib/core/hooks/useEventReport.js +5 -6
  62. package/lib/materials/sxp/consentPopup/Display/index.js +1 -1
  63. package/lib/materials/sxp/cta/AniLinkPopup/material.js +1 -2
  64. package/lib/materials/sxp/popup/CommodityDetail/material.js +1 -2
  65. package/lib/materials/sxp/popup/CommodityList/index.js +4 -5
  66. package/lib/materials/sxp/popup/CommodityList/material.js +1 -1
  67. package/lib/materials/sxp/popup/CommodityList/settingRender.js +1 -1
  68. package/lib/materials/sxp/template/Appoint/material.js +1 -2
  69. package/lib/materials/sxp/template/Commodity/material.js +2 -3
  70. package/lib/materials/sxp/template/CommodityDiro/material.js +2 -3
  71. package/lib/materials/sxp/template/CommodityDiroNew/material.js +2 -4
  72. package/lib/materials/sxp/template/Link/material.js +2 -4
  73. package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
  74. package/lib/materials/sxp/template/MultiCommodity/material.js +1 -2
  75. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  76. package/lib/materials/sxp/template/MultiCommodityDiro/material.js +2 -3
  77. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -2
  78. package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +2 -4
  79. package/lib/materials/sxp/template/NineCommodity/material.js +2 -3
  80. package/lib/materials/sxp/template/components/CommodityGroup.js +1 -1
  81. package/lib/materials/sxp/template/components/settingRender.js +1 -1
  82. package/package.json +1 -1
@@ -20,7 +20,6 @@ export const DEFAULT_TAG = 'FOR U';
20
20
  const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, consentHeight, consentWidth, isOpenConsent = false, isEditor = false, utmParameter, channelQueryList, data, dataList, isDiyH5, onUpdateSchema, onUpdateChannel }) => {
21
21
  var _a, _b, _c, _d, _e;
22
22
  const [rtcList, setRtcList] = useState([]);
23
- const [firstRtcList, setFirstRtcList] = useState([]);
24
23
  const [tagList, setTagList] = useState([]);
25
24
  const [loading, setLoading] = useState(true);
26
25
  const [curReqInfo, setCurReqInfo] = useState({ rtc: '', requestId: '' });
@@ -51,10 +50,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
51
50
  const [chatlabsId, setChatlabsId] = useState();
52
51
  const finalPageData = useMemo(() => pageData !== null && pageData !== void 0 ? pageData : data, [pageData, data]);
53
52
  const pixelPvStatusRef = useRef(false);
54
- const isDiyPage = useMemo(() => {
55
- var _a, _b, _c;
56
- return isDiyH5 && !((_c = (_b = (_a = finalPageData === null || finalPageData === void 0 ? void 0 : finalPageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf) === null || _b === void 0 ? void 0 : _b.globalConfig) === null || _c === void 0 ? void 0 : _c.enablePreview);
57
- }, [isDiyH5, finalPageData]);
58
53
  const isShowConsent = useMemo(() => {
59
54
  var _a, _b, _c, _d;
60
55
  return (((((_d = (_c = (_b = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.item) === null || _c === void 0 ? void 0 : _c.props) === null || _d === void 0 ? void 0 : _d.privacy_necessity) && !isAgreePolicy && !isEditor) || isOpenConsent) &&
@@ -111,7 +106,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
111
106
  return ((_a = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _a === void 0 ? void 0 : _a['x-app-id']) + storeAndLoadFeUserId();
112
107
  }, [bffDataSource]);
113
108
  const bffFetch = useCallback((path, options, isBota = true) => {
114
- var _a, _b;
109
+ var _a;
115
110
  if (!bffDataSource)
116
111
  return;
117
112
  const url = bffDataSource.url;
@@ -126,9 +121,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
126
121
  const value = val.split('=')[1];
127
122
  params[key] = value;
128
123
  });
129
- options.body = Object.assign(Object.assign({}, options.body), { productUserId: fakeUserId });
130
124
  return window
131
- .fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId, 'tenant-id': (_b = bffDataSource === null || bffDataSource === void 0 ? void 0 : bffDataSource.headers) === null || _b === void 0 ? void 0 : _b['x-app-id'] }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
125
+ .fetch(`${url}/api/${path}`, Object.assign({ headers: Object.assign({ 'Content-Type': 'application/json', 'x-user-id': fakeUserId }, bffDataSource.headers), method: options.method, body: options.type === 'beacon' && isBota
132
126
  ? JSON.stringify({
133
127
  body: btoa(encodeURIComponent(JSON.stringify(Object.assign(Object.assign(Object.assign({}, options.body), bffDataSource.headers), { 'x-user-id': fakeUserId }))))
134
128
  })
@@ -349,8 +343,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
349
343
  .catch((err) => Promise.reject(err));
350
344
  }, [bffDataSource]);
351
345
  const getRecommendVideos = useCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
352
- var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
353
- query = Object.assign(Object.assign({ maxSize: (_f = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _f !== void 0 ? _f : maxSize, defaultSize: (_g = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _g !== void 0 ? _g : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag, pageNum: query === null || query === void 0 ? void 0 : query.pageNum, contentFilter: query === null || query === void 0 ? void 0 : query.contentFilter, productFilter: query === null || query === void 0 ? void 0 : query.productFilter }, (chatlabsId && { chatlabsId })), (isDiyPage && { type: 'story' }));
346
+ var _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
347
+ query = Object.assign(Object.assign({ maxSize: (_f = query === null || query === void 0 ? void 0 : query.maxSize) !== null && _f !== void 0 ? _f : maxSize, defaultSize: (_g = query === null || query === void 0 ? void 0 : query.defaultSize) !== null && _g !== void 0 ? _g : defaultSize, hashTag: query === null || query === void 0 ? void 0 : query.hashTag, traceInfo: query === null || query === void 0 ? void 0 : query.traceInfo, themeTag: query === null || query === void 0 ? void 0 : query.themeTag, pageNum: query === null || query === void 0 ? void 0 : query.pageNum, contentFilter: query === null || query === void 0 ? void 0 : query.contentFilter, productFilter: query === null || query === void 0 ? void 0 : query.productFilter }, (chatlabsId && { chatlabsId })), (isDiyH5 && { type: 'story' }));
354
348
  if (channel) {
355
349
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(channel) });
356
350
  }
@@ -363,10 +357,9 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
363
357
  if (val)
364
358
  query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
365
359
  }
366
- const isDiy = isDiyH5 && ((_o = (_m = (_l = finalPageData === null || finalPageData === void 0 ? void 0 : finalPageData.data) === null || _l === void 0 ? void 0 : _l.sxpPageConf) === null || _m === void 0 ? void 0 : _m.globalConfig) === null || _o === void 0 ? void 0 : _o.enablePreview);
367
360
  if (isEditor) {
368
361
  let pageNum = 1;
369
- query = Object.assign(Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1 }), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] })), (isDiy && { maxRecs: query === null || query === void 0 ? void 0 : query.maxSize }));
362
+ query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1 }), (!utmVal && channelQueryList && (channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList.length) > 0 && { channel: channelQueryList === null || channelQueryList === void 0 ? void 0 : channelQueryList[0] }));
370
363
  if (!(query === null || query === void 0 ? void 0 : query.channel) || isInit.current) {
371
364
  return undefined;
372
365
  }
@@ -374,22 +367,19 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
374
367
  let list = [];
375
368
  let result = null;
376
369
  const recurveRecList = (query) => __awaiter(void 0, void 0, void 0, function* () {
377
- var _y, _z, _0, _1, _2, _3;
370
+ var _v, _w, _x, _y, _z, _0;
378
371
  query.pageNum = pageNum;
379
- result = isDiy ? yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct/page/view', { method: 'POST', body: query })) : yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('recommend/direct_page', { method: 'POST', body: query }));
372
+ result = yield (bffFetchAdmin === null || bffFetchAdmin === void 0 ? void 0 : bffFetchAdmin('recommend/direct_page', { method: 'POST', body: query }));
380
373
  if (!(result === null || result === void 0 ? void 0 : result.success)) {
381
374
  return undefined;
382
375
  }
383
376
  setLoading(false);
384
- list = list.concat((_1 = (_0 = (_z = (_y = result === null || result === void 0 ? void 0 : result.data) === null || _y === void 0 ? void 0 : _y.recList) === null || _z === void 0 ? void 0 : _z.filter) === null || _0 === void 0 ? void 0 : _0.call(_z, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _1 !== void 0 ? _1 : []);
377
+ list = list.concat((_y = (_x = (_w = (_v = result === null || result === void 0 ? void 0 : result.data) === null || _v === void 0 ? void 0 : _v.recList) === null || _w === void 0 ? void 0 : _w.filter) === null || _x === void 0 ? void 0 : _x.call(_w, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _y !== void 0 ? _y : []);
385
378
  if ((rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) === 0) {
386
379
  setRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
387
380
  setCacheRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
388
- if (isDiyPage) {
389
- setFirstRtcList(getFilterRecList(Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list })));
390
- }
391
381
  }
392
- const isNotNullList = (_3 = (_2 = result === null || result === void 0 ? void 0 : result.data) === null || _2 === void 0 ? void 0 : _2.recList) === null || _3 === void 0 ? void 0 : _3.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
382
+ const isNotNullList = (_0 = (_z = result === null || result === void 0 ? void 0 : result.data) === null || _z === void 0 ? void 0 : _z.recList) === null || _0 === void 0 ? void 0 : _0.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
393
383
  if (isNotNullList) {
394
384
  pageNum = pageNum + 1;
395
385
  yield recurveRecList(query);
@@ -397,13 +387,13 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
397
387
  });
398
388
  yield recurveRecList(query);
399
389
  if (!(query === null || query === void 0 ? void 0 : query.hashTag) && result)
400
- setCurReqInfo({ rtc: (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.rtc, requestId: (_q = result === null || result === void 0 ? void 0 : result.data) === null || _q === void 0 ? void 0 : _q.requestId });
390
+ setCurReqInfo({ rtc: (_l = result === null || result === void 0 ? void 0 : result.data) === null || _l === void 0 ? void 0 : _l.rtc, requestId: (_m = result === null || result === void 0 ? void 0 : result.data) === null || _m === void 0 ? void 0 : _m.requestId });
401
391
  return Object.assign(Object.assign({}, result === null || result === void 0 ? void 0 : result.data), { recList: list });
402
392
  }
403
393
  if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
404
- query = Object.assign(Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_r = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _r !== void 0 ? _r : 1 }), (isDiy && { maxRecs: query === null || query === void 0 ? void 0 : query.maxSize }));
394
+ query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_o = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _o !== void 0 ? _o : 1 });
405
395
  }
406
- const result = isDiy ? yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct/page/view', { method: 'POST', body: query })) : yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', {
396
+ const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/list', {
407
397
  method: 'POST',
408
398
  body: query
409
399
  }));
@@ -413,31 +403,26 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
413
403
  if (!(query === null || query === void 0 ? void 0 : query.hashTag))
414
404
  setCurReqInfo({ rtc: result.data.rtc, requestId: result.data.requestId });
415
405
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor) {
416
- const isNotNullList = (_t = (_s = result === null || result === void 0 ? void 0 : result.data) === null || _s === void 0 ? void 0 : _s.recList) === null || _t === void 0 ? void 0 : _t.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
406
+ const isNotNullList = (_q = (_p = result === null || result === void 0 ? void 0 : result.data) === null || _p === void 0 ? void 0 : _p.recList) === null || _q === void 0 ? void 0 : _q.some((item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video));
417
407
  if (!isNotNullList) {
418
408
  setIsNoMoreData(true);
419
409
  }
420
410
  }
421
411
  let list = [];
422
- list = list.concat((_x = (_w = (_v = (_u = result === null || result === void 0 ? void 0 : result.data) === null || _u === void 0 ? void 0 : _u.recList) === null || _v === void 0 ? void 0 : _v.filter) === null || _w === void 0 ? void 0 : _w.call(_v, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _x !== void 0 ? _x : []);
412
+ list = list.concat((_u = (_t = (_s = (_r = result === null || result === void 0 ? void 0 : result.data) === null || _r === void 0 ? void 0 : _r.recList) === null || _s === void 0 ? void 0 : _s.filter) === null || _t === void 0 ? void 0 : _t.call(_s, (item) => (item === null || item === void 0 ? void 0 : item.product) || (item === null || item === void 0 ? void 0 : item.video))) !== null && _u !== void 0 ? _u : []);
423
413
  return Object.assign(Object.assign({}, result.data), { recList: list });
424
- }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId, bffFetchAdmin, isDiyPage, finalPageData, isDiyH5]);
414
+ }), [bffFetch, utmVal, maxSize, defaultSize, channelQueryList, channel, chatlabsId, bffFetchAdmin]);
425
415
  const loadVideos = useCallback((pageNum) => __awaiter(void 0, void 0, void 0, function* () {
426
- var _4, _5, _6, _7;
416
+ var _1, _2, _3, _4;
427
417
  if (rtcList.length <= 0) {
428
418
  return;
429
419
  }
430
- if (isDiyPage && (firstRtcList === null || firstRtcList === void 0 ? void 0 : firstRtcList.length) > 0) {
431
- setRtcList(rtcList.concat(firstRtcList));
432
- setCacheRtcList(cacheRtcList.concat(firstRtcList));
433
- return;
434
- }
435
420
  const lastItem = rtcList === null || rtcList === void 0 ? void 0 : rtcList[(rtcList === null || rtcList === void 0 ? void 0 : rtcList.length) - 1];
436
- const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_4 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _4 === void 0 ? void 0 : _4.itemId) && { productFilter: [(_5 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _5 === void 0 ? void 0 : _5.itemId] })), (((_6 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _6 === void 0 ? void 0 : _6.itemId) && { contentFilter: [(_7 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _7 === void 0 ? void 0 : _7.itemId] })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
421
+ const data = yield getRecommendVideos(Object.assign(Object.assign(Object.assign(Object.assign({ hashTag: waterFallData === null || waterFallData === void 0 ? void 0 : waterFallData.hashTag }, (((_1 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _1 === void 0 ? void 0 : _1.itemId) && { productFilter: [(_2 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.product) === null || _2 === void 0 ? void 0 : _2.itemId] })), (((_3 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _3 === void 0 ? void 0 : _3.itemId) && { contentFilter: [(_4 = lastItem === null || lastItem === void 0 ? void 0 : lastItem.video) === null || _4 === void 0 ? void 0 : _4.itemId] })), { themeTag: themeTag.current }), ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) && !isEditor && { pageNum })));
437
422
  setRtcList(rtcList.concat(getFilterRecList(data)));
438
423
  setCacheRtcList(cacheRtcList.concat(getFilterRecList(data)));
439
424
  return data;
440
- }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList, isDiyPage, firstRtcList]);
425
+ }), [getRecommendVideos, rtcList, waterFallData, cacheRtcList]);
441
426
  const refreshFeSession = useCallback((enableReSid, event) => {
442
427
  var _a, _b, _c, _d, _e;
443
428
  let expire = false;
@@ -465,9 +450,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
465
450
  return;
466
451
  }
467
452
  if (!userInfo) {
468
- userInfo = {
469
- productUserId: fakeUserId
470
- };
453
+ userInfo = {};
471
454
  }
472
455
  const sessionID = storeAndLoadFeSessionId();
473
456
  const params = {};
@@ -500,8 +483,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
500
483
  layoutVariantId,
501
484
  globalConfig,
502
485
  playbookType,
503
- bffDataSource,
504
- fakeUserId
486
+ bffDataSource
505
487
  ]);
506
488
  const getEventParamsByJson = useCallback((json, product) => {
507
489
  var _a, _b, _c;
@@ -634,39 +616,37 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
634
616
  }
635
617
  }, [bffFetch, enableReportEvent, enabledMetaConversionApi, globalConfig, bffDataSource, getEventParamsByJson]);
636
618
  const bffMutateLike = useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
637
- body = Object.assign(Object.assign({}, body), { productUserId: fakeUserId });
638
619
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/like', { method: 'POST', body }));
639
620
  return res === null || res === void 0 ? void 0 : res.success;
640
- }), [bffFetch, fakeUserId]);
621
+ }), [bffFetch]);
641
622
  const bffMutateUnlike = useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
642
- body = Object.assign(Object.assign({}, body), { productUserId: fakeUserId });
643
623
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/recommend/unlike', { method: 'POST', body }));
644
624
  return res === null || res === void 0 ? void 0 : res.success;
645
- }), [bffFetch, fakeUserId]);
625
+ }), [bffFetch]);
646
626
  const bffSubmitForm = useCallback((body) => __awaiter(void 0, void 0, void 0, function* () {
647
627
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/customform', { method: 'POST', body }));
648
628
  return res === null || res === void 0 ? void 0 : res.success;
649
629
  }), [bffFetch]);
650
630
  const bffGetTagList = useCallback((data) => __awaiter(void 0, void 0, void 0, function* () {
651
- var _8, _9, _10, _11, _12, _13, _14, _15;
652
- const isShowTag = !!((_10 = (_9 = (_8 = data === null || data === void 0 ? void 0 : data.data) === null || _8 === void 0 ? void 0 : _8.sxpPageConf) === null || _9 === void 0 ? void 0 : _9.globalConfig) === null || _10 === void 0 ? void 0 : _10.isShowTag);
631
+ var _5, _6, _7, _8, _9, _10, _11, _12;
632
+ const isShowTag = !!((_7 = (_6 = (_5 = data === null || data === void 0 ? void 0 : data.data) === null || _5 === void 0 ? void 0 : _5.sxpPageConf) === null || _6 === void 0 ? void 0 : _6.globalConfig) === null || _7 === void 0 ? void 0 : _7.isShowTag);
653
633
  if (!utmVal || !isShowTag)
654
634
  return;
655
635
  try {
656
- const val = (_13 = (_12 = (_11 = splitUrlParams(utmVal)) === null || _11 === void 0 ? void 0 : _11.filter((val) => {
636
+ const val = (_10 = (_9 = (_8 = splitUrlParams(utmVal)) === null || _8 === void 0 ? void 0 : _8.filter((val) => {
657
637
  var _a, _b;
658
638
  const key = val.split('=')[0];
659
639
  return (_b = ((_a = utmParameter === null || utmParameter === void 0 ? void 0 : utmParameter.channels) !== null && _a !== void 0 ? _a : [])) === null || _b === void 0 ? void 0 : _b.includes(key);
660
- })) === null || _12 === void 0 ? void 0 : _12.join('&')) !== null && _13 !== void 0 ? _13 : '';
640
+ })) === null || _9 === void 0 ? void 0 : _9.join('&')) !== null && _10 !== void 0 ? _10 : '';
661
641
  const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/tag/list', { method: 'GET', query: { channel: decodeURIComponent(val) } }));
662
- setTagList((_15 = (_14 = result === null || result === void 0 ? void 0 : result.data) === null || _14 === void 0 ? void 0 : _14.tags) !== null && _15 !== void 0 ? _15 : []);
642
+ setTagList((_12 = (_11 = result === null || result === void 0 ? void 0 : result.data) === null || _11 === void 0 ? void 0 : _11.tags) !== null && _12 !== void 0 ? _12 : []);
663
643
  }
664
644
  catch (e) {
665
645
  console.log('e', e);
666
646
  }
667
647
  }), [bffFetch, utmVal]);
668
648
  const ctaEvent = useCallback((eventInfo, rec, product, position) => {
669
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14;
649
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
670
650
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
671
651
  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);
672
652
  let fromKName = '';
@@ -684,7 +664,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
684
664
  }
685
665
  const contentTags = (_p = (_m = (_h = product === null || product === void 0 ? void 0 : product.tags) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = rec === null || rec === void 0 ? void 0 : rec.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : (_o = rec === null || rec === void 0 ? void 0 : rec.video) === null || _o === void 0 ? void 0 : _o.tags) !== null && _p !== void 0 ? _p : (_q = rec === null || rec === void 0 ? void 0 : rec.product) === null || _q === void 0 ? void 0 : _q.tags;
686
666
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
687
- eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', sceneId: (_x = (_w = (_v = rec === null || rec === void 0 ? void 0 : rec.video) === null || _v === void 0 ? void 0 : _v.scene) === null || _w === void 0 ? void 0 : _w.sceneId) !== null && _x !== void 0 ? _x : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_13 = (_10 = (_5 = (_1 = (_y = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _y !== void 0 ? _y : (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindCta) === null || _0 === void 0 ? void 0 : _0.traceInfo) !== null && _1 !== void 0 ? _1 : (_4 = (_3 = (_2 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _2 === void 0 ? void 0 : _2.bindProduct) === null || _3 === void 0 ? void 0 : _3.bindCta) === null || _4 === void 0 ? void 0 : _4.traceInfo) !== null && _5 !== void 0 ? _5 : (_9 = (_8 = (_7 = (_6 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _6 === void 0 ? void 0 : _6.bindProducts) === null || _7 === void 0 ? void 0 : _7[0]) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : (_12 = (_11 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _11 === void 0 ? void 0 : _11.bindCta) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : '', fromKName, fromKPage: (_14 = location === null || location === void 0 ? void 0 : location.href) !== null && _14 !== void 0 ? _14 : '', contentFormat })
667
+ eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_r = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _r !== void 0 ? _r : '', ctaName: (_s = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _s !== void 0 ? _s : '', contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_u = (_t = rec === null || rec === void 0 ? void 0 : rec.video) === null || _t === void 0 ? void 0 : _t.itemId) !== null && _u !== void 0 ? _u : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_10 = (_7 = (_2 = (_y = (_v = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _v !== void 0 ? _v : (_x = (_w = rec === null || rec === void 0 ? void 0 : rec.video) === null || _w === void 0 ? void 0 : _w.bindCta) === null || _x === void 0 ? void 0 : _x.traceInfo) !== null && _y !== void 0 ? _y : (_1 = (_0 = (_z = rec === null || rec === void 0 ? void 0 : rec.video) === null || _z === void 0 ? void 0 : _z.bindProduct) === null || _0 === void 0 ? void 0 : _0.bindCta) === null || _1 === void 0 ? void 0 : _1.traceInfo) !== null && _2 !== void 0 ? _2 : (_6 = (_5 = (_4 = (_3 = rec === null || rec === void 0 ? void 0 : rec.video) === null || _3 === void 0 ? void 0 : _3.bindProducts) === null || _4 === void 0 ? void 0 : _4[0]) === null || _5 === void 0 ? void 0 : _5.bindCta) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_9 = (_8 = rec === null || rec === void 0 ? void 0 : rec.product) === null || _8 === void 0 ? void 0 : _8.bindCta) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : '', fromKName, fromKPage: (_11 = location === null || location === void 0 ? void 0 : location.href) !== null && _11 !== void 0 ? _11 : '', contentFormat })
688
668
  });
689
669
  }, [bffEventReport, isFromHashtag]);
690
670
  const h5EnterLink = useCallback(() => {
@@ -719,10 +699,10 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
719
699
  });
720
700
  }, [bffEventReport]);
721
701
  const getAccount = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
722
- var _16, _17;
702
+ var _13, _14;
723
703
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account', { method: 'GET' }));
724
- setChatlabsId((_16 = res === null || res === void 0 ? void 0 : res.data) === null || _16 === void 0 ? void 0 : _16.chatLabsId);
725
- return ((_17 = res === null || res === void 0 ? void 0 : res.data) === null || _17 === void 0 ? void 0 : _17.consentResult) === 'true';
704
+ setChatlabsId((_13 = res === null || res === void 0 ? void 0 : res.data) === null || _13 === void 0 ? void 0 : _13.chatLabsId);
705
+ return ((_14 = res === null || res === void 0 ? void 0 : res.data) === null || _14 === void 0 ? void 0 : _14.consentResult) === 'true';
726
706
  }), [bffFetch]);
727
707
  const accountSonsent = useCallback((consentResult) => __awaiter(void 0, void 0, void 0, function* () {
728
708
  const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v1/account/consent', {
@@ -786,9 +766,6 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
786
766
  }
787
767
  setRtcList(list);
788
768
  setCacheRtcList(list);
789
- if (isDiyPage) {
790
- setFirstRtcList(list);
791
- }
792
769
  bffGetTagList(curData !== null && curData !== void 0 ? curData : finalPageData);
793
770
  if (channel) {
794
771
  const item = list === null || list === void 0 ? void 0 : list[0];
@@ -808,7 +785,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
808
785
  });
809
786
  setLoading(false);
810
787
  });
811
- }, [isShowConsent, channel, isDiyPage]);
788
+ }, [isShowConsent, channel]);
812
789
  useEffect(() => {
813
790
  if (!isPreview)
814
791
  return;
@@ -823,15 +800,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
823
800
  }
824
801
  setRtcList(list);
825
802
  setCacheRtcList(list);
826
- if (isDiyPage) {
827
- setFirstRtcList(list);
828
- }
829
803
  }
830
804
  })
831
805
  .finally(() => {
832
806
  setLoading(false);
833
807
  });
834
- }, [getRecommendVideos, bffGetTagList, channel, isDiyPage]);
808
+ }, [getRecommendVideos, bffGetTagList, channel]);
835
809
  const defaultLoadingImage = useIconLink('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
836
810
  return (React.createElement(SxpDataSourceContext.Provider, { value: {
837
811
  rtcList,
@@ -889,8 +863,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
889
863
  refreshFeSession,
890
864
  getAccount,
891
865
  accountSonsent,
892
- isDiyH5: isDiyPage,
893
- firstRtcList
866
+ isDiyH5
894
867
  } }, isShowConsent ? (React.createElement(Consent, Object.assign({}, (_e = (_d = (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.consent) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.item) === null || _e === void 0 ? void 0 : _e.props))) : (render({
895
868
  rtcList,
896
869
  mutateLike: bffMutateLike,
@@ -1,10 +1,10 @@
1
1
  import { useCallback } from 'react';
2
- import { DEFAULT_TAG } from '../context/SxpDataSourceProvider';
3
2
  import { useSxpDataSource } from './useSxpDataSource';
3
+ import { DEFAULT_TAG } from '../context/SxpDataSourceProvider';
4
4
  export function useEventReport() {
5
5
  const { bffEventReport, popupDetailData, isFromHashtag, eventTimeList, setEventTimeList } = useSxpDataSource();
6
6
  const jumpToWeb = useCallback((e, data, product, cta, position, traceInfo) => {
7
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16;
7
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
8
8
  const i = eventTimeList === null || eventTimeList === void 0 ? void 0 : eventTimeList.findIndex((item) => item.target === (e === null || e === void 0 ? void 0 : e.target));
9
9
  if (i !== -1) {
10
10
  return;
@@ -37,11 +37,11 @@ export function useEventReport() {
37
37
  contentFormat = 'image';
38
38
  }
39
39
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
40
- eventInfo: Object.assign({ eventSubject: 'jumpToWeb', eventDescription: 'User jumped to website', productId: (_v = product === null || product === void 0 ? void 0 : product.itemId) !== null && _v !== void 0 ? _v : '', productName: (_w = product === null || product === void 0 ? void 0 : product.title) !== null && _w !== void 0 ? _w : '', price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0', productCollection: (_x = product === null || product === void 0 ? void 0 : product.collection) !== null && _x !== void 0 ? _x : '', fromKName, fromKPage: location === null || location === void 0 ? void 0 : location.href, contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.itemId) !== null && _z !== void 0 ? _z : '', sceneId: (_2 = (_1 = (_0 = data === null || data === void 0 ? void 0 : data.video) === null || _0 === void 0 ? void 0 : _0.scene) === null || _1 === void 0 ? void 0 : _1.sceneId) !== null && _2 !== void 0 ? _2 : '', ctatId: (_3 = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _3 !== void 0 ? _3 : '', traceInfo: (_16 = (_13 = (_11 = (_7 = (_4 = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _4 !== void 0 ? _4 : (_6 = (_5 = data === null || data === void 0 ? void 0 : data.video) === null || _5 === void 0 ? void 0 : _5.bindProduct) === null || _6 === void 0 ? void 0 : _6.traceInfo) !== null && _7 !== void 0 ? _7 : (_10 = (_9 = (_8 = data === null || data === void 0 ? void 0 : data.video) === null || _8 === void 0 ? void 0 : _8.bindProducts) === null || _9 === void 0 ? void 0 : _9[0]) === null || _10 === void 0 ? void 0 : _10.traceInfo) !== null && _11 !== void 0 ? _11 : (_12 = data === null || data === void 0 ? void 0 : data.product) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : (_15 = (_14 = data === null || data === void 0 ? void 0 : data.video) === null || _14 === void 0 ? void 0 : _14.bindCta) === null || _15 === void 0 ? void 0 : _15.traceInfo) !== null && _16 !== void 0 ? _16 : '' }, (contentFormat && { contentFormat }))
40
+ eventInfo: Object.assign({ eventSubject: 'jumpToWeb', eventDescription: 'User jumped to website', productId: (_v = product === null || product === void 0 ? void 0 : product.itemId) !== null && _v !== void 0 ? _v : '', productName: (_w = product === null || product === void 0 ? void 0 : product.title) !== null && _w !== void 0 ? _w : '', price: (product === null || product === void 0 ? void 0 : product.price) ? (product === null || product === void 0 ? void 0 : product.price) + '' : '0', productCollection: (_x = product === null || product === void 0 ? void 0 : product.collection) !== null && _x !== void 0 ? _x : '', fromKName, fromKPage: location === null || location === void 0 ? void 0 : location.href, contentTags: contentTags ? JSON.stringify(contentTags) : '', position: position + '', contentId: (_z = (_y = data === null || data === void 0 ? void 0 : data.video) === null || _y === void 0 ? void 0 : _y.itemId) !== null && _z !== void 0 ? _z : '', ctatId: (_0 = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _0 !== void 0 ? _0 : '', traceInfo: (_13 = (_10 = (_8 = (_4 = (_1 = traceInfo !== null && traceInfo !== void 0 ? traceInfo : product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _1 !== void 0 ? _1 : (_3 = (_2 = data === null || data === void 0 ? void 0 : data.video) === null || _2 === void 0 ? void 0 : _2.bindProduct) === null || _3 === void 0 ? void 0 : _3.traceInfo) !== null && _4 !== void 0 ? _4 : (_7 = (_6 = (_5 = data === null || data === void 0 ? void 0 : data.video) === null || _5 === void 0 ? void 0 : _5.bindProducts) === null || _6 === void 0 ? void 0 : _6[0]) === null || _7 === void 0 ? void 0 : _7.traceInfo) !== null && _8 !== void 0 ? _8 : (_9 = data === null || data === void 0 ? void 0 : data.product) === null || _9 === void 0 ? void 0 : _9.traceInfo) !== null && _10 !== void 0 ? _10 : (_12 = (_11 = data === null || data === void 0 ? void 0 : data.video) === null || _11 === void 0 ? void 0 : _11.bindCta) === null || _12 === void 0 ? void 0 : _12.traceInfo) !== null && _13 !== void 0 ? _13 : '' }, (contentFormat && { contentFormat }))
41
41
  });
42
42
  }, [bffEventReport, popupDetailData, isFromHashtag, eventTimeList]);
43
43
  const productView = useCallback((data, product, cta, viewTime, position) => {
44
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
44
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
45
45
  let fromKName = '';
46
46
  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))) {
47
47
  fromKName = 'pdpPage';
@@ -60,9 +60,8 @@ export function useEventReport() {
60
60
  contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
61
61
  position: position + '',
62
62
  contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
63
- sceneId: (_g = (_f = (_e = data === null || data === void 0 ? void 0 : data.video) === null || _e === void 0 ? void 0 : _e.scene) === null || _f === void 0 ? void 0 : _f.sceneId) !== null && _g !== void 0 ? _g : '',
64
63
  ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
65
- traceInfo: (_s = (_q = (_l = (_h = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _h !== void 0 ? _h : (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProduct) === null || _k === void 0 ? void 0 : _k.traceInfo) !== null && _l !== void 0 ? _l : (_p = (_o = (_m = data === null || data === void 0 ? void 0 : data.video) === null || _m === void 0 ? void 0 : _m.bindProducts) === null || _o === void 0 ? void 0 : _o[0]) === null || _p === void 0 ? void 0 : _p.traceInfo) !== null && _q !== void 0 ? _q : (_r = data === null || data === void 0 ? void 0 : data.product) === null || _r === void 0 ? void 0 : _r.traceInfo) !== null && _s !== void 0 ? _s : '',
64
+ traceInfo: (_p = (_m = (_h = (_e = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _e !== void 0 ? _e : (_g = (_f = data === null || data === void 0 ? void 0 : data.video) === null || _f === void 0 ? void 0 : _f.bindProduct) === null || _g === void 0 ? void 0 : _g.traceInfo) !== null && _h !== void 0 ? _h : (_l = (_k = (_j = data === null || data === void 0 ? void 0 : data.video) === null || _j === void 0 ? void 0 : _j.bindProducts) === null || _k === void 0 ? void 0 : _k[0]) === null || _l === void 0 ? void 0 : _l.traceInfo) !== null && _m !== void 0 ? _m : (_o = data === null || data === void 0 ? void 0 : data.product) === null || _o === void 0 ? void 0 : _o.traceInfo) !== null && _p !== void 0 ? _p : '',
66
65
  timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
67
66
  eventSubject: 'productView',
68
67
  eventDescription: 'User browsed the product'
@@ -26,7 +26,7 @@ const Display = (_a) => {
26
26
  React.createElement("span", { style: content === null || content === void 0 ? void 0 : content.style, dangerouslySetInnerHTML: {
27
27
  __html: setFontForText((_b = content === null || content === void 0 ? void 0 : content.text) === null || _b === void 0 ? void 0 : _b.replace(/\n/g, '</br>'), content === null || content === void 0 ? void 0 : content.style)
28
28
  } }),
29
- React.createElement("span", { style: Object.assign(Object.assign({}, interaction === null || interaction === void 0 ? void 0 : interaction.style), { marginLeft: '5px' }), dangerouslySetInnerHTML: {
29
+ React.createElement("span", { style: Object.assign(Object.assign({}, interaction === null || interaction === void 0 ? void 0 : interaction.style), { marginInlineStart: '5px' }), dangerouslySetInnerHTML: {
30
30
  __html: setFontForText((_c = interaction === null || interaction === void 0 ? void 0 : interaction.text) === null || _c === void 0 ? void 0 : _c.replace(/\n/g, '</br>'), interaction === null || interaction === void 0 ? void 0 : interaction.style)
31
31
  }, onClick: handleClick })),
32
32
  isShowClose && (React.createElement("button", { "aria-label": 'close', className: 'consentPopupDisplay-close', onClick: handleClickClose },
@@ -1,14 +1,14 @@
1
1
  import settingRender from './settingRender';
2
+ import interactionRender from './interactionRender';
2
3
  import AniLinkPopupComponent from '.';
3
4
  import { createMaterial } from '../../../../core/create';
4
- import interactionRender from './interactionRender';
5
5
  const AniLinkPopup = createMaterial(AniLinkPopupComponent, {
6
6
  displayName: '竖版弹窗CTA',
7
7
  icon: '',
8
8
  category: 'cta',
9
9
  type: 'AniLinkPopup',
10
10
  related: {
11
- settingRender: settingRender,
11
+ settingRender,
12
12
  bindableProps: [],
13
13
  interactionRender
14
14
  },
@@ -24,7 +24,6 @@ const AniLinkPopup = createMaterial(AniLinkPopupComponent, {
24
24
  title: {
25
25
  fontSize: 14,
26
26
  color: '#000',
27
- textAlign: 'left',
28
27
  lineHeight: 2.6
29
28
  },
30
29
  ctaTitle: {
@@ -1,7 +1,7 @@
1
1
  import settingRender from './settingRender';
2
+ import interactionRender from './interactionRender';
2
3
  import CommodityDetailComponent from '.';
3
4
  import { createMaterial } from '../../../../core/create';
4
- import interactionRender from './interactionRender';
5
5
  const CommodityDetail = createMaterial(CommodityDetailComponent, {
6
6
  displayName: '商品详情',
7
7
  icon: '',
@@ -40,7 +40,6 @@ const CommodityDetail = createMaterial(CommodityDetailComponent, {
40
40
  taxInfo: {
41
41
  color: '#000',
42
42
  fontSize: 13,
43
- textAlign: 'left',
44
43
  marginBottom: '10px'
45
44
  }
46
45
  },
@@ -1,12 +1,12 @@
1
1
  import { __rest } from "tslib";
2
2
  import { css } from '@emotion/css';
3
3
  import React, { memo, useCallback, useEffect } from 'react';
4
+ import { throttle } from 'lodash';
5
+ import Img from '../../template/components/Img';
4
6
  import { useEditor, useSxpDataSource } from '../../../../core/hooks';
5
7
  import './index.less';
6
8
  import { useEventReport } from '../../../../core/hooks/useEventReport';
7
9
  import { setFontForText } from '../../../../core/utils/tool';
8
- import Img from '../../template/components/Img';
9
- import { throttle } from 'lodash';
10
10
  import { getPriceText } from '../../../../core/utils/materials';
11
11
  const CommodityList = (_a) => {
12
12
  var _b, _c, _d;
@@ -53,12 +53,11 @@ const CommodityList = (_a) => {
53
53
  React.createElement("button", Object.assign({ role: 'button', "aria-label": item === null || item === void 0 ? void 0 : item.title, tabIndex: 0, className: css({
54
54
  display: 'flex',
55
55
  alignItems: 'normal',
56
- width: '100%',
57
- textAlign: 'left'
56
+ width: '100%'
58
57
  }) }, props),
59
58
  React.createElement(Img, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: commodityPicture, enableEventReport: false }),
60
59
  React.createElement("div", { style: {
61
- width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.marginRight) !== null && _f !== void 0 ? _f : 0}px)`,
60
+ width: `calc(100% - ${(_e = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.width) !== null && _e !== void 0 ? _e : 0}px - ${(_f = commodityPicture === null || commodityPicture === void 0 ? void 0 : commodityPicture.marginInlineEnd) !== null && _f !== void 0 ? _f : 0}px)`,
62
61
  display: 'flex',
63
62
  flexDirection: 'column',
64
63
  justifyContent: 'space-between'
@@ -16,7 +16,7 @@ const CommodityList = createMaterial(CommodityListComponent, {
16
16
  commodityPicture: {
17
17
  width: 100,
18
18
  height: 100,
19
- marginRight: 10
19
+ marginInlineEnd: 10
20
20
  },
21
21
  commodityStyles: {
22
22
  price: {
@@ -71,7 +71,7 @@ export default [
71
71
  type: 'Number',
72
72
  label: '与右侧边距',
73
73
  addonAfter: 'px',
74
- name: ['props', 'commodityPicture', 'marginRight']
74
+ name: ['props', 'commodityPicture', 'marginInlineEnd']
75
75
  },
76
76
  {
77
77
  label: '居中垂直偏移',
@@ -19,12 +19,11 @@ const Appoint = createMaterial(AppointComponent, {
19
19
  borderRadius: 3,
20
20
  width: 30,
21
21
  height: 30,
22
- marginRight: 8
22
+ marginInlineEnd: 8
23
23
  },
24
24
  ctaTitle: {
25
25
  fontSize: 12,
26
26
  color: '#fff',
27
- textAlign: 'left',
28
27
  width: 130,
29
28
  height: 20
30
29
  }
@@ -19,12 +19,11 @@ const Commodity = createMaterial(CommodityComponent, {
19
19
  borderRadius: 3,
20
20
  width: 60,
21
21
  height: 60,
22
- marginRight: 8
22
+ marginInlineEnd: 8
23
23
  },
24
24
  title: {
25
25
  fontSize: 12,
26
- color: '#fff',
27
- textAlign: 'left'
26
+ color: '#fff'
28
27
  },
29
28
  ctaTitle: {
30
29
  fontSize: 10,
@@ -19,12 +19,11 @@ const CommodityDiro = createMaterial(CommodityDiroComponent, {
19
19
  borderRadius: 3,
20
20
  width: 60,
21
21
  height: 60,
22
- marginRight: 8
22
+ marginInlineEnd: 8
23
23
  },
24
24
  title: {
25
25
  fontSize: 12,
26
- color: '#000',
27
- textAlign: 'left'
26
+ color: '#000'
28
27
  },
29
28
  ctaTitle: {
30
29
  fontSize: 10,
@@ -19,19 +19,17 @@ const CommodityDiroNew = createMaterial(CommodityDiroNewComponent, {
19
19
  borderRadius: 8,
20
20
  width: 78,
21
21
  height: 78,
22
- marginRight: 16
22
+ marginInlineEnd: 16
23
23
  },
24
24
  title: {
25
25
  fontSize: 13,
26
- color: '#000',
27
- textAlign: 'left'
26
+ color: '#000'
28
27
  },
29
28
  ctaTitle: {
30
29
  textDecoration: 'underline',
31
30
  fontSize: 14,
32
31
  fontWeight: 'bold',
33
32
  color: '#000',
34
- textAlign: 'left',
35
33
  width: 150,
36
34
  height: 20
37
35
  }
@@ -1,9 +1,9 @@
1
1
  var _a;
2
2
  import settingRender from '../components/settingRender';
3
3
  import linkSettingRender from './settingRender';
4
+ import interactionRender from './interactionRender';
4
5
  import LinkComponent from '.';
5
6
  import { createMaterial } from '../../../../core/create';
6
- import interactionRender from './interactionRender';
7
7
  const Link = createMaterial(LinkComponent, {
8
8
  displayName: '普通CTA',
9
9
  icon: '',
@@ -21,19 +21,17 @@ const Link = createMaterial(LinkComponent, {
21
21
  borderRadius: 3,
22
22
  width: 60,
23
23
  height: 60,
24
- marginRight: 8
24
+ marginInlineEnd: 8
25
25
  },
26
26
  ctaTitle: {
27
27
  fontSize: 12,
28
28
  color: '#fff',
29
- textAlign: 'left',
30
29
  width: 130,
31
30
  height: 20
32
31
  }
33
32
  },
34
33
  customTitle: {
35
34
  style: {
36
- textAlign: 'left',
37
35
  textDecoration: 'underline',
38
36
  fontWeight: 'bold',
39
37
  width: 130,
@@ -4,10 +4,10 @@ import React, { memo, useState } from 'react';
4
4
  import { SwiperSlide } from 'swiper/react';
5
5
  import Img from '../components/Img';
6
6
  import Scroll from '../components/Scroll';
7
+ import EventProvider from '../components/EventProvider';
7
8
  import styles from './index.module.less';
8
9
  import { useSxpDataSource } from '../../../../core/hooks';
9
10
  import { setFontForText } from '../../../../core/utils/tool';
10
- import EventProvider from '../components/EventProvider';
11
11
  const MultiCommodity = (_a) => {
12
12
  var _b, _c;
13
13
  var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
@@ -15,7 +15,7 @@ const MultiCommodity = (_a) => {
15
15
  const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
16
16
  return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
17
17
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
18
- return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
18
+ return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginInlineStart: 0, marginInlineEnd: '8px' })), tag: 'li', role: 'listitem' },
19
19
  React.createElement(EventProvider, Object.assign({ rec: recData, multItem: item, multiCheckIndex: itemIndex, index: index }, props),
20
20
  React.createElement(Img, { src: (_d = (_c = (_a = item === null || item === void 0 ? void 0 : item.cover) !== null && _a !== void 0 ? _a : (_b = item === null || item === void 0 ? void 0 : item.homePage) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, rec: recData, item: item, index: index, translateY: translateY, imgStyle: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img, isActive: isActive }),
21
21
  React.createElement("div", { className: css({
@@ -19,12 +19,11 @@ const MultiCommodity = createMaterial(MultiCommodityComponent, {
19
19
  borderRadius: 3,
20
20
  width: 60,
21
21
  height: 60,
22
- marginRight: 8
22
+ marginInlineEnd: 8
23
23
  },
24
24
  title: {
25
25
  fontSize: 12,
26
26
  color: '#fff',
27
- textAlign: 'left'
28
27
  },
29
28
  ctaTitle: {
30
29
  fontSize: 10,