pb-sxp-ui 1.0.71 → 1.0.73

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 (61) hide show
  1. package/dist/index.cjs +138 -107
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +138 -107
  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 +141 -110
  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/DiyPortalPreview/VideoWidget.js +15 -16
  14. package/es/core/components/DiyPortalPreview/index.js +8 -8
  15. package/es/core/components/SxpPageCore/index.js +2 -2
  16. package/es/core/components/SxpPageRender/FormatImage.js +9 -3
  17. package/es/core/components/SxpPageRender/LikeButton/index.js +11 -11
  18. package/es/core/components/SxpPageRender/Popup/index.js +2 -2
  19. package/es/core/components/SxpPageRender/VideoWidget/index.js +13 -13
  20. package/es/core/components/SxpPageRender/index.js +32 -26
  21. package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
  22. package/es/core/context/SxpDataSourceProvider.js +3 -3
  23. package/es/materials/sxp/popup/AppointForm/index.js +3 -1
  24. package/es/materials/sxp/popup/AppointForm/settingRender.js +0 -5
  25. package/es/materials/sxp/popup/CommodityDetail/index.js +1 -1
  26. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +1 -1
  27. package/es/materials/sxp/popup/CommodityDetailDiro/index.js +2 -3
  28. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
  29. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +1 -1
  30. package/es/materials/sxp/template/Commodity/index.js +1 -1
  31. package/es/materials/sxp/template/CommodityDiro/index.js +1 -1
  32. package/es/materials/sxp/template/CommodityDiroNew/index.js +1 -1
  33. package/es/materials/sxp/template/MultiCommodity/index.js +1 -1
  34. package/es/materials/sxp/template/MultiCommodityDiro/index.js +1 -1
  35. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +1 -1
  36. package/es/materials/sxp/template/components/settingRender.js +1 -1
  37. package/lib/core/components/DiyPortalPreview/VideoWidget.js +15 -16
  38. package/lib/core/components/DiyPortalPreview/index.js +8 -8
  39. package/lib/core/components/SxpPageCore/index.js +2 -2
  40. package/lib/core/components/SxpPageRender/FormatImage.js +8 -2
  41. package/lib/core/components/SxpPageRender/LikeButton/index.js +11 -11
  42. package/lib/core/components/SxpPageRender/Popup/index.js +2 -2
  43. package/lib/core/components/SxpPageRender/VideoWidget/index.js +13 -13
  44. package/lib/core/components/SxpPageRender/index.js +32 -26
  45. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
  46. package/lib/core/context/SxpDataSourceProvider.js +3 -3
  47. package/lib/materials/sxp/popup/AppointForm/index.js +3 -1
  48. package/lib/materials/sxp/popup/AppointForm/settingRender.js +0 -5
  49. package/lib/materials/sxp/popup/CommodityDetail/index.js +1 -1
  50. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +1 -1
  51. package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +2 -3
  52. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
  53. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +1 -1
  54. package/lib/materials/sxp/template/Commodity/index.js +1 -1
  55. package/lib/materials/sxp/template/CommodityDiro/index.js +1 -1
  56. package/lib/materials/sxp/template/CommodityDiroNew/index.js +1 -1
  57. package/lib/materials/sxp/template/MultiCommodity/index.js +1 -1
  58. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +1 -1
  59. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +1 -1
  60. package/lib/materials/sxp/template/components/settingRender.js +1 -1
  61. package/package.json +3 -2
package/dist/pb-ui.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('eventemitter3'), require('@emotion/css'), require('react-dom'), require('hls.js')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', 'eventemitter3', '@emotion/css', 'react-dom', 'hls.js'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.EventEmitter, global.css, global.ReactDOM, global.Hls));
5
- })(this, (function (exports, lodash, uuid$1, pako, React, qs, EventEmitter, css, ReactDOM, Hls) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('uuid'), require('pako'), require('react'), require('qs'), require('eventemitter3'), require('@emotion/css'), require('@ant-design/pro-components'), require('react-dom')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'uuid', 'pako', 'react', 'qs', 'eventemitter3', '@emotion/css', '@ant-design/pro-components', 'react-dom'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PUI = {}, global.lodash, global.uuid$1, global.pako, global.React, global.qs, global.EventEmitter, global.css, global.proComponents, global.ReactDOM));
5
+ })(this, (function (exports, lodash, uuid$1, pako, React, qs, EventEmitter, css, proComponents, ReactDOM) { 'use strict';
6
6
 
7
7
  function _interopNamespaceDefault(e) {
8
8
  var n = Object.create(null);
@@ -438,7 +438,7 @@
438
438
  DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
439
439
  })(DataSourceType || (DataSourceType = {}));
440
440
  const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
441
- const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false }) => {
441
+ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
442
442
  const [rtcList, setRtcList] = React.useState([]);
443
443
  const [tagList, setTagList] = React.useState([]);
444
444
  const [loading, setLoading] = React.useState(false);
@@ -600,7 +600,7 @@
600
600
  // 获取 Tag
601
601
  const bffGetTagList = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
602
602
  var _h, _j, _k, _l, _m;
603
- if (!utmVal)
603
+ if (!utmVal || !isShowTag)
604
604
  return;
605
605
  try {
606
606
  const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
@@ -613,7 +613,7 @@
613
613
  catch (e) {
614
614
  console.log('e', e);
615
615
  }
616
- }), [bffFetch, utmVal]);
616
+ }), [bffFetch, utmVal, isShowTag]);
617
617
  const ctaEvent = React.useCallback((eventInfo, rec, product, position) => {
618
618
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
619
619
  const cta = product === null || product === void 0 ? void 0 : product.bindCta;
@@ -965,7 +965,7 @@
965
965
  * @Author: binruan@chatlabs.com
966
966
  * @Date: 2023-07-28 18:29:57
967
967
  * @LastEditors: binruan@chatlabs.com
968
- * @LastEditTime: 2024-05-17 10:11:41
968
+ * @LastEditTime: 2024-05-27 11:48:04
969
969
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\AppointForm\settingRender.tsx
970
970
  *
971
971
  */
@@ -1070,11 +1070,6 @@
1070
1070
  type: 'TextAlign',
1071
1071
  name: ['props', 'submitButtonStyle']
1072
1072
  },
1073
- {
1074
- label: '提交文本颜色',
1075
- type: 'Color',
1076
- name: ['props', 'submitColor']
1077
- },
1078
1073
  {
1079
1074
  label: '提交按钮颜色',
1080
1075
  type: 'Color',
@@ -1221,7 +1216,7 @@
1221
1216
  key: '4'
1222
1217
  }
1223
1218
  ], []);
1224
- React.useMemo(() => {
1219
+ const columnsData = React.useMemo(() => {
1225
1220
  if (layoutType === undefined) {
1226
1221
  const list = lodash.cloneDeep(columns) || defaultColumns;
1227
1222
  return list === null || list === void 0 ? void 0 : list.map((obj) => (Object.assign(Object.assign({}, obj), { title: undefined, fieldProps: { placeholder: obj === null || obj === void 0 ? void 0 : obj.title } })));
@@ -1264,7 +1259,8 @@
1264
1259
  return (React.createElement("div", { className: 'pb-appoint-form' },
1265
1260
  React.createElement("div", { className: `pb-appoint-form-title ${css.css(Object.assign({}, textStyle))}` }, title),
1266
1261
  React.createElement("div", Object.assign({ className: css.css(Object.assign({}, style)) }, props),
1267
- React.createElement("div", { className: 'pb-appoint-form-container' })),
1262
+ React.createElement("div", { className: 'pb-appoint-form-container' },
1263
+ React.createElement(proComponents.BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
1268
1264
  React.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
1269
1265
  React.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: Object.assign({ color: submitColor, background: submitBgColor }, submitButtonStyle) }, loading ? React.createElement(React.Fragment, null, "loading...") : submitText))));
1270
1266
  };
@@ -1346,7 +1342,7 @@
1346
1342
  label: '居中垂直偏移',
1347
1343
  type: 'Number',
1348
1344
  name: ['props', 'swiper', 'translateY'],
1349
- min: -100,
1345
+ min: -1000,
1350
1346
  addonAfter: '%',
1351
1347
  initialValue: 0
1352
1348
  }
@@ -8439,21 +8435,50 @@
8439
8435
  * @Author: binruan@chatlabs.com
8440
8436
  * @Date: 2024-03-20 10:27:31
8441
8437
  * @LastEditors: binruan@chatlabs.com
8442
- * @LastEditTime: 2024-04-19 14:12:55
8438
+ * @LastEditTime: 2024-05-27 09:47:19
8443
8439
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\FormatImage.tsx
8444
8440
  *
8445
8441
  */
8446
8442
  const FormatImage = React.forwardRef((props, ref) => {
8447
8443
  const { src, onLoad, style, className, loading } = props;
8448
8444
  const [imgSrc, setImgSrc] = React.useState();
8445
+ const { swiperRef } = useSxpDataSource();
8449
8446
  React.useImperativeHandle(ref, () => ({
8450
8447
  setSrc: (v) => {
8451
8448
  setImgSrc(v);
8452
8449
  }
8453
8450
  }));
8454
8451
  React.useEffect(() => {
8455
- setImgSrc(src);
8456
- }, [src]);
8452
+ var _a, _b;
8453
+ // 首屏不加载第二屏之后的图片
8454
+ const index = (_b = (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.activeIndex;
8455
+ if (index === 0 || index > 0)
8456
+ setImgSrc(src);
8457
+ }, [src, swiperRef]);
8458
+ React.useRef(null);
8459
+ // useEffect(() => {
8460
+ // let observer: any = null;
8461
+ // const { current } = imgRef;
8462
+ // if (current) {
8463
+ // observer = new IntersectionObserver(
8464
+ // (entries) => {
8465
+ // entries.forEach((entry) => {
8466
+ // if (entry.isIntersecting) {
8467
+ // setImgSrc(src);
8468
+ // observer.unobserve(current);
8469
+ // }
8470
+ // });
8471
+ // },
8472
+ // { threshold: 0.1 } // 触发阈值,可根据需要调整
8473
+ // );
8474
+ // observer.observe(current);
8475
+ // }
8476
+ // return () => {
8477
+ // if (observer && current) {
8478
+ // observer.unobserve(current);
8479
+ // }
8480
+ // };
8481
+ // }, [src]);
8457
8482
  return (React.createElement(React.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
8458
8483
  React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
8459
8484
  React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
@@ -8555,7 +8580,7 @@
8555
8580
  width: '100%',
8556
8581
  objectFit: 'cover',
8557
8582
  display: 'block',
8558
- transform: `translateY(${swiper === null || swiper === void 0 ? void 0 : swiper.translateY})%`
8583
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
8559
8584
  }, src: src }))));
8560
8585
  }))),
8561
8586
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css.css({
@@ -8809,7 +8834,7 @@
8809
8834
  * @Author: binruan@chatlabs.com
8810
8835
  * @Date: 2024-03-26 16:50:25
8811
8836
  * @LastEditors: binruan@chatlabs.com
8812
- * @LastEditTime: 2024-04-12 17:37:19
8837
+ * @LastEditTime: 2024-05-27 17:31:27
8813
8838
  * @FilePath: \pb-sxp-ui\src\materials\sxp\popup\CommodityDetailDiroNew\settingRender.tsx
8814
8839
  *
8815
8840
  */
@@ -8844,7 +8869,7 @@
8844
8869
  label: '居中垂直偏移',
8845
8870
  type: 'Number',
8846
8871
  name: ['props', 'swiper', 'translateY'],
8847
- min: -100,
8872
+ min: -1000,
8848
8873
  addonAfter: '%',
8849
8874
  initialValue: 0
8850
8875
  }
@@ -9085,7 +9110,7 @@ Made in Italy` })));
9085
9110
  width: '100%',
9086
9111
  objectFit: 'cover',
9087
9112
  display: 'block',
9088
- transform: `translateY(${swiper === null || swiper === void 0 ? void 0 : swiper.translateY})%`
9113
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
9089
9114
  }, src: src }))));
9090
9115
  }))),
9091
9116
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css.css({
@@ -9293,7 +9318,7 @@ Made in Italy` })));
9293
9318
  label: '居中垂直偏移',
9294
9319
  type: 'Number',
9295
9320
  name: ['props', 'translateY'],
9296
- min: -100,
9321
+ min: -1000,
9297
9322
  addonAfter: '%',
9298
9323
  initialValue: 0
9299
9324
  }
@@ -9512,7 +9537,7 @@ Made in Italy` })));
9512
9537
  objectFit: 'cover',
9513
9538
  height: '100%',
9514
9539
  display: 'block',
9515
- transform: `translateY(${translateY}%)`
9540
+ objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
9516
9541
  }), src: src })),
9517
9542
  React.createElement("div", { className: css.css({
9518
9543
  color: '#fff',
@@ -9761,7 +9786,7 @@ Made in Italy` })));
9761
9786
  objectFit: 'cover',
9762
9787
  height: '100%',
9763
9788
  display: 'block',
9764
- transform: `translateY(${translateY}%)`
9789
+ objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
9765
9790
  }), src: src })),
9766
9791
  React.createElement("div", { className: css.css({
9767
9792
  color: '#fff',
@@ -9859,7 +9884,7 @@ Made in Italy` })));
9859
9884
  objectFit: 'cover',
9860
9885
  height: '100%',
9861
9886
  display: 'block',
9862
- transform: `translateY(${translateY}%)`
9887
+ objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
9863
9888
  }), src: src })),
9864
9889
  React.createElement("div", { className: css.css({
9865
9890
  color: '#fff',
@@ -10003,7 +10028,7 @@ Made in Italy` })));
10003
10028
  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) }),
10004
10029
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
10005
10030
  React.createElement(Img$1, { 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, style: {
10006
- transform: `translateY(${translateY}%)`
10031
+ objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
10007
10032
  } })),
10008
10033
  React.createElement("div", { className: css.css({
10009
10034
  color: '#000',
@@ -10118,7 +10143,7 @@ Made in Italy` })));
10118
10143
  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) }),
10119
10144
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
10120
10145
  React.createElement(Img$1, { 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, style: {
10121
- transform: `translateY(${translateY}%)`
10146
+ objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
10122
10147
  } })),
10123
10148
  React.createElement("div", { className: css.css({
10124
10149
  color: '#fff',
@@ -10232,7 +10257,7 @@ Made in Italy` })));
10232
10257
  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) }),
10233
10258
  React.createElement("div", { className: css.css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
10234
10259
  React.createElement(Img$1, { 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, style: {
10235
- transform: `translateY(${translateY}%)`
10260
+ objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
10236
10261
  } })),
10237
10262
  React.createElement("div", { className: css.css({
10238
10263
  color: '#fff',
@@ -12234,17 +12259,17 @@ Made in Italy` })));
12234
12259
  if (state) {
12235
12260
  // 先设置状态
12236
12261
  setState(false);
12237
- const result = (_d = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ videoItemId: (_c = (_b = recData.video) === null || _b === void 0 ? void 0 : _b.itemId) !== null && _c !== void 0 ? _c : '' })))) !== null && _d !== void 0 ? _d : false;
12262
+ const result = (_d = (yield (mutateUnlike === null || mutateUnlike === void 0 ? void 0 : mutateUnlike({ videoItemId: (_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.itemId) !== null && _c !== void 0 ? _c : '' })))) !== null && _d !== void 0 ? _d : false;
12238
12263
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
12239
12264
  eventInfo: {
12240
12265
  eventSubject: 'favoriteContentCanceled',
12241
12266
  eventDescription: 'This content was unfavorite by the user',
12242
- contentId: (_f = (_e = recData.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12243
- contentName: (_h = (_g = recData.video) === null || _g === void 0 ? void 0 : _g.title) !== null && _h !== void 0 ? _h : '',
12244
- contentTags: JSON.stringify((_k = (_j = recData.video) === null || _j === void 0 ? void 0 : _j.tags) !== null && _k !== void 0 ? _k : []),
12267
+ contentId: (_f = (_e = recData === null || recData === void 0 ? void 0 : recData.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
12268
+ contentName: (_h = (_g = recData === null || recData === void 0 ? void 0 : recData.video) === null || _g === void 0 ? void 0 : _g.title) !== null && _h !== void 0 ? _h : '',
12269
+ contentTags: JSON.stringify((_k = (_j = recData === null || recData === void 0 ? void 0 : recData.video) === null || _j === void 0 ? void 0 : _j.tags) !== null && _k !== void 0 ? _k : []),
12245
12270
  position: position + '',
12246
- contentFormat: ((_l = recData.video) === null || _l === void 0 ? void 0 : _l.url) ? 'video' : 'image',
12247
- traceInfo: (_m = recData.video) === null || _m === void 0 ? void 0 : _m.traceInfo
12271
+ contentFormat: ((_l = recData === null || recData === void 0 ? void 0 : recData.video) === null || _l === void 0 ? void 0 : _l.url) ? 'video' : 'image',
12272
+ traceInfo: (_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.traceInfo
12248
12273
  }
12249
12274
  });
12250
12275
  // 如果接口调用失败,则回滚状态
@@ -12259,12 +12284,12 @@ Made in Italy` })));
12259
12284
  eventInfo: {
12260
12285
  eventSubject: 'favoriteContent',
12261
12286
  eventDescription: 'This content was favorite by the user',
12262
- contentId: (_q = (_p = recData.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
12263
- contentName: (_s = (_r = recData.video) === null || _r === void 0 ? void 0 : _r.title) !== null && _s !== void 0 ? _s : '',
12264
- contentTags: JSON.stringify((_u = (_t = recData.video) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []),
12287
+ contentId: (_q = (_p = recData === null || recData === void 0 ? void 0 : recData.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
12288
+ contentName: (_s = (_r = recData === null || recData === void 0 ? void 0 : recData.video) === null || _r === void 0 ? void 0 : _r.title) !== null && _s !== void 0 ? _s : '',
12289
+ contentTags: JSON.stringify((_u = (_t = recData === null || recData === void 0 ? void 0 : recData.video) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []),
12265
12290
  position: position + '',
12266
- contentFormat: ((_v = recData.video) === null || _v === void 0 ? void 0 : _v.url) ? 'video' : 'image',
12267
- traceInfo: (_w = recData.video) === null || _w === void 0 ? void 0 : _w.traceInfo
12291
+ contentFormat: ((_v = recData === null || recData === void 0 ? void 0 : recData.video) === null || _v === void 0 ? void 0 : _v.url) ? 'video' : 'image',
12292
+ traceInfo: (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.traceInfo
12268
12293
  }
12269
12294
  });
12270
12295
  if (!result) {
@@ -12342,15 +12367,15 @@ Made in Italy` })));
12342
12367
  eventInfo: {
12343
12368
  eventSubject: 'playVideo',
12344
12369
  eventDescription: 'User played the video',
12345
- contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12346
- contentName: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : '',
12370
+ contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12371
+ contentName: (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : '',
12347
12372
  playType,
12348
12373
  startTime: videoCurrentTime,
12349
12374
  videoDuration,
12350
- contentTags: JSON.stringify((_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []),
12375
+ contentTags: JSON.stringify((_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []),
12351
12376
  position: index + '',
12352
12377
  contentFormat: 'video',
12353
- traceInfo: (_j = item.video) === null || _j === void 0 ? void 0 : _j.traceInfo
12378
+ traceInfo: (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.traceInfo
12354
12379
  }
12355
12380
  });
12356
12381
  setIsFirstPlay(false);
@@ -12440,15 +12465,15 @@ Made in Italy` })));
12440
12465
  eventInfo: {
12441
12466
  eventSubject: 'playOverVideo',
12442
12467
  eventDescription: 'User finished playing the video',
12443
- contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12444
- contentName: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : '',
12468
+ contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
12469
+ contentName: (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : '',
12445
12470
  endTime: videoCurrentTime,
12446
12471
  videoDuration,
12447
12472
  playDuration,
12448
- contentTags: JSON.stringify((_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []),
12473
+ contentTags: JSON.stringify((_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []),
12449
12474
  position: index + '',
12450
12475
  contentFormat: 'video',
12451
- traceInfo: (_j = item.video) === null || _j === void 0 ? void 0 : _j.traceInfo
12476
+ traceInfo: (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.traceInfo
12452
12477
  }
12453
12478
  });
12454
12479
  }
@@ -12456,9 +12481,10 @@ Made in Italy` })));
12456
12481
  React.useEffect(() => {
12457
12482
  if (!isActive || !videoRef)
12458
12483
  return;
12459
- const videoSrc = rec.video.url;
12484
+ const videoSrc = rec === null || rec === void 0 ? void 0 : rec.video.url;
12460
12485
  if (!videoSrc)
12461
12486
  return;
12487
+ videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
12462
12488
  setIsPauseVideo(false);
12463
12489
  const videoPlayerWrapperNode = document.querySelector(`#${videoId}`);
12464
12490
  const dom = document.querySelector('#player-container-id');
@@ -12466,7 +12492,6 @@ Made in Italy` })));
12466
12492
  if (!dom && !dom2)
12467
12493
  return;
12468
12494
  videoPlayerWrapperNode === null || videoPlayerWrapperNode === void 0 ? void 0 : videoPlayerWrapperNode.appendChild(dom || dom2);
12469
- videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
12470
12495
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadedmetadata', handleLoadedmetadata);
12471
12496
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadeddata', handLoadeddata);
12472
12497
  // videoRef?.on('canplay', handleCanplay);
@@ -12547,10 +12572,10 @@ Made in Italy` })));
12547
12572
  window.removeEventListener('beforeunload', handleBeforeUnload);
12548
12573
  };
12549
12574
  }, [activeIndex, index, rec, videoRef, handleClickVideo, isPauseVideo]);
12550
- if (!rec.video) {
12575
+ if (!(rec === null || rec === void 0 ? void 0 : rec.video)) {
12551
12576
  return null;
12552
12577
  }
12553
- return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: Object.assign({ position: 'relative', width: '100%', height, overflow: 'hidden' }, bgStyle) },
12578
+ return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, onClick: handleClickVideo(), style: Object.assign({ position: 'relative', width: '100%', height, overflow: 'hidden' }, bgStyle) },
12554
12579
  !isBgColor && (React.createElement(FormatImage$1, { src: blurBgSrc, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) })),
12555
12580
  React.createElement("canvas", { ref: canvasRef, style: { display: 'none' } }),
12556
12581
  React.createElement("div", { style: {
@@ -12565,7 +12590,7 @@ Made in Italy` })));
12565
12590
  React.createElement("div", { style: { position: 'relative', width: '100%', height: '100%' } },
12566
12591
  React.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
12567
12592
  React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
12568
- renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, style: {
12593
+ renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, style: {
12569
12594
  position: 'relative',
12570
12595
  width: '100%',
12571
12596
  height,
@@ -12922,7 +12947,7 @@ Made in Italy` })));
12922
12947
  * @Author: binruan@chatlabs.com
12923
12948
  * @Date: 2024-01-15 19:03:09
12924
12949
  * @LastEditors: binruan@chatlabs.com
12925
- * @LastEditTime: 2024-05-23 10:41:27
12950
+ * @LastEditTime: 2024-05-24 16:32:06
12926
12951
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\index.tsx
12927
12952
  *
12928
12953
  */
@@ -12982,23 +13007,29 @@ Made in Italy` })));
12982
13007
  };
12983
13008
  const firstRef = React.useRef();
12984
13009
  React.useEffect(() => {
12985
- if (!firstRef.current && !videoRef) {
13010
+ var _a, _b, _c;
13011
+ if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
12986
13012
  firstRef.current = true;
12987
13013
  const player = TCPlayer('player-container-id', {
12988
13014
  licenseUrl, // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
12989
13015
  controls: false,
12990
- autoplay: false,
12991
13016
  loop: false,
13017
+ autoplay: true,
12992
13018
  muted: true,
12993
13019
  preload: 'auto',
12994
13020
  posterImage: false,
12995
- bigPlayButton: true
13021
+ bigPlayButton: true,
13022
+ sources: [
13023
+ {
13024
+ src: (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data[0]) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.url) !== null && _c !== void 0 ? _c : ''
13025
+ }
13026
+ ]
12996
13027
  });
12997
13028
  player === null || player === void 0 ? void 0 : player.ready(() => {
12998
13029
  setVideoRef(player);
12999
13030
  });
13000
13031
  }
13001
- }, [videoRef, licenseUrl]);
13032
+ }, [videoRef, licenseUrl, data]);
13002
13033
  React.useEffect(() => {
13003
13034
  if (!isInit)
13004
13035
  handleH5EnterLink();
@@ -13053,7 +13084,7 @@ Made in Italy` })));
13053
13084
  if (popupDetailData && (((_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) || ((_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.bindProduct))) {
13054
13085
  fromKName = 'pdpPage';
13055
13086
  }
13056
- else if (popupDetailData && (tempMap === null || tempMap === void 0 ? void 0 : tempMap[(_f = (_e = (_d = item.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : ''].item.type) === 'Appoint') {
13087
+ else if (popupDetailData && (tempMap === null || tempMap === void 0 ? void 0 : tempMap[(_f = (_e = (_d = item === null || item === void 0 ? void 0 : item.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : ''].item.type) === 'Appoint') {
13057
13088
  fromKName = 'formPage';
13058
13089
  }
13059
13090
  else if (isFromHashtag) {
@@ -13078,7 +13109,7 @@ Made in Italy` })));
13078
13109
  position: activeIndex + '',
13079
13110
  fromKName,
13080
13111
  fromKPage: location === null || location === void 0 ? void 0 : location.href,
13081
- ctatId: (_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 : ''
13112
+ ctatId: (_q = (_p = (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.bindCta) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : ''
13082
13113
  }
13083
13114
  });
13084
13115
  }
@@ -13116,11 +13147,11 @@ Made in Italy` })));
13116
13147
  }, [globalConfig]);
13117
13148
  const renderContent = React.useCallback((rec, index) => {
13118
13149
  var _a, _b, _c, _d;
13119
- if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
13150
+ if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
13120
13151
  return (React.createElement(VideoWidget$3, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoRef: videoRef }));
13121
13152
  }
13122
- if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
13123
- return (React.createElement(PictureGroup$3, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
13153
+ if ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
13154
+ return (React.createElement(PictureGroup$3, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
13124
13155
  }
13125
13156
  if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
13126
13157
  return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, idx) => {
@@ -13161,16 +13192,16 @@ Made in Italy` })));
13161
13192
  }, [isShowMore]);
13162
13193
  const renderBottom = React.useCallback((rec, index) => {
13163
13194
  var _a, _b, _c, _d, _e, _f, _g;
13164
- if (rec.video) {
13195
+ if (rec === null || rec === void 0 ? void 0 : rec.video) {
13165
13196
  return (React.createElement(React.Fragment, null,
13166
- ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13197
+ ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13167
13198
  React.createElement("div", { className: 'clc-sxp-bottom' },
13168
13199
  React.createElement(Nudge, { nudge: nudge }),
13169
13200
  (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { className: 'clc-sxp-bottom-card' },
13170
13201
  React.createElement(RenderCard$1, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
13171
13202
  React.createElement("div", null,
13172
- React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
13173
- React.createElement(Hashtag$1, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })))));
13203
+ React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }), onChange: onExpandableChange }),
13204
+ React.createElement(Hashtag$1, { index: activeIndex, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })))));
13174
13205
  }
13175
13206
  return null;
13176
13207
  }, [
@@ -13194,7 +13225,7 @@ Made in Italy` })));
13194
13225
  if (waterFallData && top < 40) {
13195
13226
  top += 40;
13196
13227
  }
13197
- if (rec.video) {
13228
+ if (rec === null || rec === void 0 ? void 0 : rec.video) {
13198
13229
  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: {
13199
13230
  [(_b = globalConfig.likeIconXPosit) !== null && _b !== void 0 ? _b : 'right']: (_c = globalConfig.likeIconX) !== null && _c !== void 0 ? _c : 0,
13200
13231
  [(_d = globalConfig.likeIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top
@@ -13204,21 +13235,21 @@ Made in Italy` })));
13204
13235
  }, [globalConfig, waterFallData]);
13205
13236
  const handleReportViewImageEnd = (item) => {
13206
13237
  var _a, _b, _c, _d, _e, _f;
13207
- if (!((_a = item.video) === null || _a === void 0 ? void 0 : _a.url) && ((_b = item.video) === null || _b === void 0 ? void 0 : _b.imgUrls)) {
13238
+ 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)) {
13208
13239
  const endTime = Date.now();
13209
13240
  const duration = (endTime - viewImageStartTime.current) / 1000;
13210
13241
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
13211
13242
  eventInfo: {
13212
13243
  eventSubject: 'viewImageCarouselEnd',
13213
13244
  eventDescription: 'User end view the image carousel',
13214
- contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13215
- contentName: (_e = item.video.title) !== null && _e !== void 0 ? _e : '',
13245
+ contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13246
+ contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
13216
13247
  imageEndTime: `${endTime}`,
13217
13248
  playDuration: `${duration}`,
13218
- contentTags: JSON.stringify((_f = item.video.tags) !== null && _f !== void 0 ? _f : []),
13249
+ contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
13219
13250
  position: activeIndex + '',
13220
13251
  contentFormat: 'image',
13221
- traceInfo: item.video.traceInfo
13252
+ traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
13222
13253
  }
13223
13254
  });
13224
13255
  }
@@ -13234,8 +13265,8 @@ Made in Italy` })));
13234
13265
  eventInfo: {
13235
13266
  eventSubject: 'scrollDown',
13236
13267
  eventDescription: 'User scroll down',
13237
- contentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
13238
- productId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13268
+ contentId: (_b = (_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
13269
+ productId: (_d = (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13239
13270
  requestId: null
13240
13271
  }
13241
13272
  });
@@ -13247,7 +13278,7 @@ Made in Italy` })));
13247
13278
  eventInfo: {
13248
13279
  eventSubject: 'scrollUp',
13249
13280
  eventDescription: 'User scroll up',
13250
- contentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
13281
+ contentId: (_f = (_e = item === null || item === void 0 ? void 0 : item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
13251
13282
  productId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13252
13283
  requestId: null
13253
13284
  }
@@ -13286,13 +13317,13 @@ Made in Italy` })));
13286
13317
  eventInfo: {
13287
13318
  eventSubject: 'viewImageCarouselStart',
13288
13319
  eventDescription: 'User start view the image carousel',
13289
- contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13290
- contentName: (_e = item.video.title) !== null && _e !== void 0 ? _e : '',
13320
+ contentId: (_d = (_c = item === null || item === void 0 ? void 0 : item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
13321
+ contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
13291
13322
  imageStartTime: `${startTime}`,
13292
- contentTags: JSON.stringify((_f = item.video.tags) !== null && _f !== void 0 ? _f : []),
13323
+ contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
13293
13324
  position: activeIndex + '',
13294
13325
  contentFormat: 'image',
13295
- traceInfo: item.video.traceInfo
13326
+ traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
13296
13327
  }
13297
13328
  });
13298
13329
  bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
@@ -13438,15 +13469,15 @@ Made in Italy` })));
13438
13469
  eventInfo: {
13439
13470
  eventSubject: 'playVideo',
13440
13471
  eventDescription: 'User played the video',
13441
- contentId: (_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13442
- contentName: (_k = (_j = item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13472
+ contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13473
+ contentName: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13443
13474
  playType,
13444
13475
  startTime: videoCurrentTime,
13445
13476
  videoDuration,
13446
- contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13477
+ contentTags: JSON.stringify((_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13447
13478
  position: index + '',
13448
13479
  contentFormat: 'video',
13449
- traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13480
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13450
13481
  }
13451
13482
  });
13452
13483
  setIsFirstPlay(false);
@@ -13495,15 +13526,15 @@ Made in Italy` })));
13495
13526
  eventInfo: {
13496
13527
  eventSubject: 'playOverVideo',
13497
13528
  eventDescription: 'User finished playing the video',
13498
- contentId: (_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13499
- contentName: (_k = (_j = item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13529
+ contentId: (_h = (_g = item === null || item === void 0 ? void 0 : item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
13530
+ contentName: (_k = (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
13500
13531
  endTime: videoCurrentTime,
13501
13532
  videoDuration,
13502
13533
  playDuration,
13503
- contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13534
+ contentTags: JSON.stringify((_m = (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
13504
13535
  position: index + '',
13505
13536
  contentFormat: 'video',
13506
- traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13537
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
13507
13538
  }
13508
13539
  });
13509
13540
  }
@@ -13540,10 +13571,10 @@ Made in Italy` })));
13540
13571
  return;
13541
13572
  setIsPauseVideo(false);
13542
13573
  if (!videoRef.current.src) {
13543
- const videoSrc = rec.video.url;
13574
+ const videoSrc = rec === null || rec === void 0 ? void 0 : rec.video.url;
13544
13575
  if (videoSrc.includes('.m3u8')) {
13545
- if (Hls.isSupported()) {
13546
- const hls = new Hls();
13576
+ if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.Hls.isSupported())) {
13577
+ const hls = new window.Hls();
13547
13578
  hls.loadSource(videoSrc);
13548
13579
  hls.attachMedia(videoRef.current);
13549
13580
  }
@@ -13571,7 +13602,7 @@ Made in Italy` })));
13571
13602
  (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('playing', handlePlaying);
13572
13603
  (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
13573
13604
  };
13574
- }, [handleLoadedMetadata, handlePlaying, rec.video, handLoadeddata]);
13605
+ }, [handleLoadedMetadata, handlePlaying, rec === null || rec === void 0 ? void 0 : rec.video, handLoadeddata]);
13575
13606
  const renderPoster = React.useMemo(() => {
13576
13607
  if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
13577
13608
  return null;
@@ -13598,10 +13629,10 @@ Made in Italy` })));
13598
13629
  }
13599
13630
  : {};
13600
13631
  }, [blur]);
13601
- if (!rec.video) {
13632
+ if (!(rec === null || rec === void 0 ? void 0 : rec.video)) {
13602
13633
  return null;
13603
13634
  }
13604
- return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
13635
+ return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, onClick: handleClickVideo(), style: {
13605
13636
  position: 'relative',
13606
13637
  width,
13607
13638
  height,
@@ -13626,7 +13657,7 @@ Made in Italy` })));
13626
13657
  objectFit: 'contain'
13627
13658
  } }),
13628
13659
  React.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
13629
- renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
13660
+ renderPoster)) : (React.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, onClick: handleClickVideo(), style: {
13630
13661
  position: 'relative',
13631
13662
  width,
13632
13663
  height,
@@ -13657,11 +13688,11 @@ Made in Italy` })));
13657
13688
  }, [globalConfig, containerHeight, tagList]);
13658
13689
  const renderContent = (rec, index) => {
13659
13690
  var _a, _b, _c, _d;
13660
- if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
13691
+ if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
13661
13692
  return (React.createElement(VideoWidget$1, { rec: rec, index: index, muted: true, width: containerWidth, data: data !== null && data !== void 0 ? data : [], height: height, activeIndex: index, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost }));
13662
13693
  }
13663
- if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
13664
- return (React.createElement(PictureGroup$1, { key: rec.video.itemId, imgUrls: rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
13694
+ if ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
13695
+ return (React.createElement(PictureGroup$1, { key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, imgUrls: rec === null || rec === void 0 ? void 0 : rec.video.imgUrls, width: containerWidth, height: height, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
13665
13696
  }
13666
13697
  if (rec.product) {
13667
13698
  if (rec.product && Array.isArray(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) && ((_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _c === void 0 ? void 0 : _c.length) > 0) {
@@ -13695,15 +13726,15 @@ Made in Italy` })));
13695
13726
  };
13696
13727
  const renderBottom = (rec, index) => {
13697
13728
  var _a, _b, _c, _d, _e, _f, _g;
13698
- if (rec.video) {
13729
+ if (rec === null || rec === void 0 ? void 0 : rec.video) {
13699
13730
  return (React.createElement(React.Fragment, null,
13700
- ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13731
+ ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && React.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
13701
13732
  React.createElement("div", { className: 'clc-sxp-bottom' },
13702
13733
  React.createElement(Nudge, { nudge: nudge }),
13703
13734
  CTA(rec, index),
13704
13735
  React.createElement("div", null,
13705
- React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) })),
13706
- React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
13736
+ React.createElement(ExpandableText$1, { className: 'clc-sxp-bottom-text', isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_c = (_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : '', style: Object.assign(Object.assign({}, descStyle), { textShadow: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isOpenTextShadow) ? '2px 2px 4px rgba(0, 0, 0, 0.5)' : 'none' }) })),
13737
+ React.createElement(Hashtag$1, { index: index, tags: (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.hashTags) !== null && _e !== void 0 ? _e : [], itemId: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.itemId, itemType: ((_g = rec === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle }))));
13707
13738
  }
13708
13739
  return null;
13709
13740
  };
@@ -13717,7 +13748,7 @@ Made in Italy` })));
13717
13748
  if (top < 40) {
13718
13749
  top += 40;
13719
13750
  }
13720
- if (rec.video) {
13751
+ if (rec === null || rec === void 0 ? void 0 : rec.video) {
13721
13752
  return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon) !== null && _b !== void 0 ? _b : likeIcon, unActicveIcon: (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon) !== null && _c !== void 0 ? _c : unlikeIcon, position: index, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
13722
13753
  top,
13723
13754
  right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0
@@ -13762,7 +13793,7 @@ Made in Italy` })));
13762
13793
  * @Author: binruan@chatlabs.com
13763
13794
  * @Date: 2023-10-31 10:56:01
13764
13795
  * @LastEditors: binruan@chatlabs.com
13765
- * @LastEditTime: 2024-05-14 10:12:52
13796
+ * @LastEditTime: 2024-05-27 18:19:31
13766
13797
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageRender\Popup\index.tsx
13767
13798
  *
13768
13799
  */
@@ -13808,14 +13839,14 @@ Made in Italy` })));
13808
13839
  const renderPopupDetail = React.useMemo(() => {
13809
13840
  var _a, _b, _c;
13810
13841
  return (_c = (_b = (_a = schema === null || schema === void 0 ? void 0 : schema.sxpPageConf) === null || _a === void 0 ? void 0 : _a.globalConfig) === null || _b === void 0 ? void 0 : _b.popupList) === null || _c === void 0 ? void 0 : _c.map((value, index) => {
13811
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
13842
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
13812
13843
  if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
13813
13844
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
13814
13845
  const Component = withBindDataSource(t);
13815
13846
  const isExternalLink = ((_d = (_c = (_b = value === null || value === void 0 ? void 0 : value.item) === null || _b === void 0 ? void 0 : _b.event) === null || _c === void 0 ? void 0 : _c.onClick) === null || _d === void 0 ? void 0 : _d.linkType) === 'externalLink';
13816
13847
  const isPopup = ((_g = (_f = (_e = value === null || value === void 0 ? void 0 : value.item) === null || _e === void 0 ? void 0 : _e.event) === null || _f === void 0 ? void 0 : _f.onClick) === null || _g === void 0 ? void 0 : _g.linkType) === 'popup';
13817
13848
  const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
13818
- return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: '100%', height: '80vh', overflow: 'auto' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_k = value === null || value === void 0 ? void 0 : value.item) === null || _k === void 0 ? void 0 : _k.textStyle), bindDatas: (_m = (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.bindDatas) !== null && _m !== void 0 ? _m : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_o = value === null || value === void 0 ? void 0 : value.item) === null || _o === void 0 ? void 0 : _o.props, { event: ((_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
13849
+ return (React.createElement(Component, Object.assign({ key: index, style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), (_j = value === null || value === void 0 ? void 0 : value.item) === null || _j === void 0 ? void 0 : _j.style), { width: (_k = window.innerWidth) !== null && _k !== void 0 ? _k : '100vw', height: '80vh', overflow: 'auto' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_l = value === null || value === void 0 ? void 0 : value.item) === null || _l === void 0 ? void 0 : _l.textStyle), bindDatas: (_o = (_m = value === null || value === void 0 ? void 0 : value.item) === null || _m === void 0 ? void 0 : _m.bindDatas) !== null && _o !== void 0 ? _o : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_p = value === null || value === void 0 ? void 0 : value.item) === null || _p === void 0 ? void 0 : _p.props, { event: ((_q = value === null || value === void 0 ? void 0 : value.item) === null || _q === void 0 ? void 0 : _q.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, isExternalLink: isExternalLink, isPopup: isPopup, onClose: handleClose })));
13819
13850
  }
13820
13851
  else {
13821
13852
  return React.createElement(React.Fragment, null);
@@ -13829,7 +13860,7 @@ Made in Italy` })));
13829
13860
  * @Author: binruan@chatlabs.com
13830
13861
  * @Date: 2024-01-15 19:03:09
13831
13862
  * @LastEditors: binruan@chatlabs.com
13832
- * @LastEditTime: 2024-05-06 17:26:37
13863
+ * @LastEditTime: 2024-05-17 18:41:05
13833
13864
  * @FilePath: \pb-sxp-ui\src\core\components\SxpPageCore\index.tsx
13834
13865
  *
13835
13866
  */
@@ -13846,14 +13877,14 @@ Made in Italy` })));
13846
13877
  RESOLVER[v.extend.type] = v;
13847
13878
  });
13848
13879
  const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
13849
- var _a, _b, _c, _d, _e, _f;
13880
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13850
13881
  const utmVal = React.useMemo(() => {
13851
13882
  var _a;
13852
13883
  const searchParams = (location === null || location === void 0 ? void 0 : location.search) ? (_a = location === null || location === void 0 ? void 0 : location.search) === null || _a === void 0 ? void 0 : _a.replace('?', '') : '';
13853
13884
  return searchParams;
13854
13885
  }, []);
13855
13886
  return (React.createElement(EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
13856
- React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, render: ({ rtcList, tagList }) => {
13887
+ React.createElement(SxpDataSourceProvider$1, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, isShowTag: (_j = (_h = (_g = data === null || data === void 0 ? void 0 : data.data) === null || _g === void 0 ? void 0 : _g.sxpPageConf) === null || _h === void 0 ? void 0 : _h.globalConfig) === null || _j === void 0 ? void 0 : _j.isShowTag, render: ({ rtcList, tagList }) => {
13857
13888
  var _a;
13858
13889
  return (React.createElement(React.Fragment, null,
13859
13890
  React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER, licenseUrl: licenseUrl })),