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
@@ -68,9 +68,8 @@ const CommodityDetailDiro = (_a) => {
68
68
  setSpread(!spread);
69
69
  };
70
70
  useEffect(() => {
71
- var _a, _b;
72
- console.log((_a = scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight, window.innerHeight);
73
- if ((scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) && ((_b = scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) === null || _b === void 0 ? void 0 : _b.scrollHeight) > window.innerHeight) {
71
+ var _a;
72
+ if ((scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) && ((_a = scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight) > window.innerHeight) {
74
73
  setStopSlide(true);
75
74
  }
76
75
  }, [scrollRef]);
@@ -116,7 +116,7 @@ Made in Italy` })));
116
116
  width: '100%',
117
117
  objectFit: 'cover',
118
118
  display: 'block',
119
- transform: `translateY(${swiper === null || swiper === void 0 ? void 0 : swiper.translateY})%`
119
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
120
120
  }, src: src }))));
121
121
  }))),
122
122
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (React.createElement("div", { className: css({
@@ -31,7 +31,7 @@ export default [
31
31
  label: '居中垂直偏移',
32
32
  type: 'Number',
33
33
  name: ['props', 'swiper', 'translateY'],
34
- min: -100,
34
+ min: -1000,
35
35
  addonAfter: '%',
36
36
  initialValue: 0
37
37
  }
@@ -18,7 +18,7 @@ const Commodity = (_a) => {
18
18
  objectFit: 'cover',
19
19
  height: '100%',
20
20
  display: 'block',
21
- transform: `translateY(${translateY}%)`
21
+ objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
22
22
  }), src: src })),
23
23
  React.createElement("div", { className: css({
24
24
  color: '#fff',
@@ -18,7 +18,7 @@ const CommodityDiro = (_a) => {
18
18
  objectFit: 'cover',
19
19
  height: '100%',
20
20
  display: 'block',
21
- transform: `translateY(${translateY}%)`
21
+ objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
22
22
  }), src: src })),
23
23
  React.createElement("div", { className: css({
24
24
  color: '#fff',
@@ -18,7 +18,7 @@ const CommodityDiroNew = (_a) => {
18
18
  objectFit: 'cover',
19
19
  height: '100%',
20
20
  display: 'block',
21
- transform: `translateY(${translateY}%)`
21
+ objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
22
22
  }), src: src })),
23
23
  React.createElement("div", { className: css({
24
24
  color: '#fff',
@@ -37,7 +37,7 @@ const MultiCommodity = (_a) => {
37
37
  return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
38
38
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
39
39
  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, style: {
40
- transform: `translateY(${translateY}%)`
40
+ objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
41
41
  } })),
42
42
  React.createElement("div", { className: css({
43
43
  color: '#fff',
@@ -36,7 +36,7 @@ const MultiCommodityDiro = (_a) => {
36
36
  return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
37
37
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
38
38
  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, style: {
39
- transform: `translateY(${translateY}%)`
39
+ objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
40
40
  } })),
41
41
  React.createElement("div", { className: css({
42
42
  color: '#000',
@@ -36,7 +36,7 @@ const MultiCommodityDiroNew = (_a) => {
36
36
  return (React.createElement(SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item === null || item === void 0 ? void 0 : item.itemId, className: css(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
37
37
  React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
38
38
  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, style: {
39
- transform: `translateY(${translateY}%)`
39
+ objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
40
40
  } })),
41
41
  React.createElement("div", { className: css({
42
42
  color: '#fff',
@@ -102,7 +102,7 @@ export default [
102
102
  label: '居中垂直偏移',
103
103
  type: 'Number',
104
104
  name: ['props', 'translateY'],
105
- min: -100,
105
+ min: -1000,
106
106
  addonAfter: '%',
107
107
  initialValue: 0
108
108
  }
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importStar(require("react"));
5
- const hls_js_1 = tslib_1.__importDefault(require("hls.js"));
6
5
  const useIconLink_1 = require("../SxpPageRender/useIconLink");
7
6
  const FormatImage_1 = tslib_1.__importDefault(require("../SxpPageRender/FormatImage"));
8
7
  const hooks_1 = require("../../../core/hooks");
@@ -38,15 +37,15 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
38
37
  eventInfo: {
39
38
  eventSubject: 'playVideo',
40
39
  eventDescription: 'User played the video',
41
- contentId: (_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
42
- contentName: (_k = (_j = item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
40
+ 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 : '',
41
+ 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 : '',
43
42
  playType,
44
43
  startTime: videoCurrentTime,
45
44
  videoDuration,
46
- contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
45
+ 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 : []),
47
46
  position: index + '',
48
47
  contentFormat: 'video',
49
- traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
48
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
50
49
  }
51
50
  });
52
51
  setIsFirstPlay(false);
@@ -95,15 +94,15 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
95
94
  eventInfo: {
96
95
  eventSubject: 'playOverVideo',
97
96
  eventDescription: 'User finished playing the video',
98
- contentId: (_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
99
- contentName: (_k = (_j = item.video) === null || _j === void 0 ? void 0 : _j.title) !== null && _k !== void 0 ? _k : '',
97
+ 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 : '',
98
+ 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 : '',
100
99
  endTime: videoCurrentTime,
101
100
  videoDuration,
102
101
  playDuration,
103
- contentTags: JSON.stringify((_m = (_l = item.video) === null || _l === void 0 ? void 0 : _l.tags) !== null && _m !== void 0 ? _m : []),
102
+ 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 : []),
104
103
  position: index + '',
105
104
  contentFormat: 'video',
106
- traceInfo: (_o = item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
105
+ traceInfo: (_o = item === null || item === void 0 ? void 0 : item.video) === null || _o === void 0 ? void 0 : _o.traceInfo
107
106
  }
108
107
  });
109
108
  }
@@ -140,10 +139,10 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
140
139
  return;
141
140
  setIsPauseVideo(false);
142
141
  if (!videoRef.current.src) {
143
- const videoSrc = rec.video.url;
142
+ const videoSrc = rec === null || rec === void 0 ? void 0 : rec.video.url;
144
143
  if (videoSrc.includes('.m3u8')) {
145
- if (hls_js_1.default.isSupported()) {
146
- const hls = new hls_js_1.default();
144
+ if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.Hls.isSupported())) {
145
+ const hls = new window.Hls();
147
146
  hls.loadSource(videoSrc);
148
147
  hls.attachMedia(videoRef.current);
149
148
  }
@@ -171,7 +170,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
171
170
  (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('playing', handlePlaying);
172
171
  (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
173
172
  };
174
- }, [handleLoadedMetadata, handlePlaying, rec.video, handLoadeddata]);
173
+ }, [handleLoadedMetadata, handlePlaying, rec === null || rec === void 0 ? void 0 : rec.video, handLoadeddata]);
175
174
  const renderPoster = (0, react_1.useMemo)(() => {
176
175
  if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
177
176
  return null;
@@ -198,10 +197,10 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
198
197
  }
199
198
  : {};
200
199
  }, [blur]);
201
- if (!rec.video) {
200
+ if (!(rec === null || rec === void 0 ? void 0 : rec.video)) {
202
201
  return null;
203
202
  }
204
- return (react_1.default.createElement(react_1.default.Fragment, null, blur ? (react_1.default.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
203
+ return (react_1.default.createElement(react_1.default.Fragment, null, blur ? (react_1.default.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, onClick: handleClickVideo(), style: {
205
204
  position: 'relative',
206
205
  width,
207
206
  height,
@@ -226,7 +225,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
226
225
  objectFit: 'contain'
227
226
  } }),
228
227
  react_1.default.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
229
- renderPoster)) : (react_1.default.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
228
+ renderPoster)) : (react_1.default.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, onClick: handleClickVideo(), style: {
230
229
  position: 'relative',
231
230
  width,
232
231
  height,
@@ -34,11 +34,11 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
34
34
  }, [globalConfig, containerHeight, tagList]);
35
35
  const renderContent = (rec, index) => {
36
36
  var _a, _b, _c, _d;
37
- if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
37
+ if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
38
38
  return (react_1.default.createElement(VideoWidget_1.default, { 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 }));
39
39
  }
40
- if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
41
- return (react_1.default.createElement(PictureGroup_1.default, { 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 }));
40
+ if ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
41
+ return (react_1.default.createElement(PictureGroup_1.default, { 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 }));
42
42
  }
43
43
  if (rec.product) {
44
44
  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) {
@@ -68,15 +68,15 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
68
68
  };
69
69
  const renderBottom = (rec, index) => {
70
70
  var _a, _b, _c, _d, _e, _f, _g;
71
- if (rec.video) {
71
+ if (rec === null || rec === void 0 ? void 0 : rec.video) {
72
72
  return (react_1.default.createElement(react_1.default.Fragment, null,
73
- ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && react_1.default.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
73
+ ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && react_1.default.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
74
74
  react_1.default.createElement("div", { className: 'clc-sxp-bottom' },
75
75
  react_1.default.createElement(Nudge_1.default, { nudge: nudge }),
76
76
  CTA(rec, index),
77
77
  react_1.default.createElement("div", null,
78
- react_1.default.createElement(ExpandableText_1.default, { 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' }) })),
79
- react_1.default.createElement(Hashtag_1.default, { 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 }))));
78
+ react_1.default.createElement(ExpandableText_1.default, { 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' }) })),
79
+ react_1.default.createElement(Hashtag_1.default, { 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 }))));
80
80
  }
81
81
  return null;
82
82
  };
@@ -90,7 +90,7 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
90
90
  if (top < 40) {
91
91
  top += 40;
92
92
  }
93
- if (rec.video) {
93
+ if (rec === null || rec === void 0 ? void 0 : rec.video) {
94
94
  return (react_1.default.createElement(LikeButton_1.default, { 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: {
95
95
  top,
96
96
  right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0
@@ -12,14 +12,14 @@ Object.values(_materials_).forEach((v) => {
12
12
  RESOLVER[v.extend.type] = v;
13
13
  });
14
14
  const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl, enabledMetaConversionApi }) => {
15
- var _a, _b, _c, _d, _e, _f;
15
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
16
16
  const utmVal = (0, react_1.useMemo)(() => {
17
17
  var _a;
18
18
  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('?', '') : '';
19
19
  return searchParams;
20
20
  }, []);
21
21
  return (react_1.default.createElement(core_1.EditorCore, { resolver: RESOLVER, enableDataSource: false, schema: data === null || data === void 0 ? void 0 : data.data, utmVal: utmVal },
22
- react_1.default.createElement(SxpDataSourceProvider_1.default, { 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 }) => {
22
+ react_1.default.createElement(SxpDataSourceProvider_1.default, { 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 }) => {
23
23
  var _a;
24
24
  return (react_1.default.createElement(react_1.default.Fragment, null,
25
25
  react_1.default.createElement(SxpPageRender_1.default, 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 })),
@@ -2,17 +2,23 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importStar(require("react"));
5
+ const hooks_1 = require("../../../core/hooks");
5
6
  const FormatImage = (0, react_1.forwardRef)((props, ref) => {
6
7
  const { src, onLoad, style, className, loading } = props;
7
8
  const [imgSrc, setImgSrc] = (0, react_1.useState)();
9
+ const { swiperRef } = (0, hooks_1.useSxpDataSource)();
8
10
  (0, react_1.useImperativeHandle)(ref, () => ({
9
11
  setSrc: (v) => {
10
12
  setImgSrc(v);
11
13
  }
12
14
  }));
13
15
  (0, react_1.useEffect)(() => {
14
- setImgSrc(src);
15
- }, [src]);
16
+ var _a, _b;
17
+ 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;
18
+ if (index === 0 || index > 0)
19
+ setImgSrc(src);
20
+ }, [src, swiperRef]);
21
+ const imgRef = (0, react_1.useRef)(null);
16
22
  return (react_1.default.createElement(react_1.default.Fragment, null, (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (react_1.default.createElement("picture", null,
17
23
  react_1.default.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
18
24
  react_1.default.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),
@@ -17,17 +17,17 @@ const LikeButton = (_a) => {
17
17
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
18
18
  if (state) {
19
19
  setState(false);
20
- 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;
20
+ 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;
21
21
  bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
22
22
  eventInfo: {
23
23
  eventSubject: 'favoriteContentCanceled',
24
24
  eventDescription: 'This content was unfavorite by the user',
25
- contentId: (_f = (_e = recData.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
26
- contentName: (_h = (_g = recData.video) === null || _g === void 0 ? void 0 : _g.title) !== null && _h !== void 0 ? _h : '',
27
- contentTags: JSON.stringify((_k = (_j = recData.video) === null || _j === void 0 ? void 0 : _j.tags) !== null && _k !== void 0 ? _k : []),
25
+ 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 : '',
26
+ 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 : '',
27
+ 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 : []),
28
28
  position: position + '',
29
- contentFormat: ((_l = recData.video) === null || _l === void 0 ? void 0 : _l.url) ? 'video' : 'image',
30
- traceInfo: (_m = recData.video) === null || _m === void 0 ? void 0 : _m.traceInfo
29
+ contentFormat: ((_l = recData === null || recData === void 0 ? void 0 : recData.video) === null || _l === void 0 ? void 0 : _l.url) ? 'video' : 'image',
30
+ traceInfo: (_m = recData === null || recData === void 0 ? void 0 : recData.video) === null || _m === void 0 ? void 0 : _m.traceInfo
31
31
  }
32
32
  });
33
33
  if (!result) {
@@ -41,12 +41,12 @@ const LikeButton = (_a) => {
41
41
  eventInfo: {
42
42
  eventSubject: 'favoriteContent',
43
43
  eventDescription: 'This content was favorite by the user',
44
- contentId: (_q = (_p = recData.video) === null || _p === void 0 ? void 0 : _p.itemId) !== null && _q !== void 0 ? _q : '',
45
- contentName: (_s = (_r = recData.video) === null || _r === void 0 ? void 0 : _r.title) !== null && _s !== void 0 ? _s : '',
46
- contentTags: JSON.stringify((_u = (_t = recData.video) === null || _t === void 0 ? void 0 : _t.tags) !== null && _u !== void 0 ? _u : []),
44
+ 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 : '',
45
+ 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 : '',
46
+ 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 : []),
47
47
  position: position + '',
48
- contentFormat: ((_v = recData.video) === null || _v === void 0 ? void 0 : _v.url) ? 'video' : 'image',
49
- traceInfo: (_w = recData.video) === null || _w === void 0 ? void 0 : _w.traceInfo
48
+ contentFormat: ((_v = recData === null || recData === void 0 ? void 0 : recData.video) === null || _v === void 0 ? void 0 : _v.url) ? 'video' : 'image',
49
+ traceInfo: (_w = recData === null || recData === void 0 ? void 0 : recData.video) === null || _w === void 0 ? void 0 : _w.traceInfo
50
50
  }
51
51
  });
52
52
  if (!result) {
@@ -48,14 +48,14 @@ const Popup = () => {
48
48
  const renderPopupDetail = (0, react_1.useMemo)(() => {
49
49
  var _a, _b, _c;
50
50
  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) => {
51
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
51
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
52
52
  if ((value === null || value === void 0 ? void 0 : value.id) === (popup === null || popup === void 0 ? void 0 : popup.id)) {
53
53
  const t = resolver[(_a = value === null || value === void 0 ? void 0 : value.item) === null || _a === void 0 ? void 0 : _a.type];
54
54
  const Component = (0, withBindDataSource_1.default)(t);
55
55
  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';
56
56
  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';
57
57
  const defaulSetting = (_h = t === null || t === void 0 ? void 0 : t.extend) === null || _h === void 0 ? void 0 : _h.defaulSetting;
58
- return (react_1.default.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 })));
58
+ return (react_1.default.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 })));
59
59
  }
60
60
  else {
61
61
  return react_1.default.createElement(react_1.default.Fragment, null);
@@ -72,15 +72,15 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
72
72
  eventInfo: {
73
73
  eventSubject: 'playVideo',
74
74
  eventDescription: 'User played the video',
75
- contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
76
- contentName: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : '',
75
+ 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 : '',
76
+ 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 : '',
77
77
  playType,
78
78
  startTime: videoCurrentTime,
79
79
  videoDuration,
80
- contentTags: JSON.stringify((_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []),
80
+ 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 : []),
81
81
  position: index + '',
82
82
  contentFormat: 'video',
83
- traceInfo: (_j = item.video) === null || _j === void 0 ? void 0 : _j.traceInfo
83
+ traceInfo: (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.traceInfo
84
84
  }
85
85
  });
86
86
  setIsFirstPlay(false);
@@ -165,15 +165,15 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
165
165
  eventInfo: {
166
166
  eventSubject: 'playOverVideo',
167
167
  eventDescription: 'User finished playing the video',
168
- contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
169
- contentName: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : '',
168
+ 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 : '',
169
+ 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 : '',
170
170
  endTime: videoCurrentTime,
171
171
  videoDuration,
172
172
  playDuration,
173
- contentTags: JSON.stringify((_h = (_g = item.video) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []),
173
+ 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 : []),
174
174
  position: index + '',
175
175
  contentFormat: 'video',
176
- traceInfo: (_j = item.video) === null || _j === void 0 ? void 0 : _j.traceInfo
176
+ traceInfo: (_j = item === null || item === void 0 ? void 0 : item.video) === null || _j === void 0 ? void 0 : _j.traceInfo
177
177
  }
178
178
  });
179
179
  }
@@ -181,9 +181,10 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
181
181
  (0, react_1.useEffect)(() => {
182
182
  if (!isActive || !videoRef)
183
183
  return;
184
- const videoSrc = rec.video.url;
184
+ const videoSrc = rec === null || rec === void 0 ? void 0 : rec.video.url;
185
185
  if (!videoSrc)
186
186
  return;
187
+ videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
187
188
  setIsPauseVideo(false);
188
189
  const videoPlayerWrapperNode = document.querySelector(`#${videoId}`);
189
190
  const dom = document.querySelector('#player-container-id');
@@ -191,7 +192,6 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
191
192
  if (!dom && !dom2)
192
193
  return;
193
194
  videoPlayerWrapperNode === null || videoPlayerWrapperNode === void 0 ? void 0 : videoPlayerWrapperNode.appendChild(dom || dom2);
194
- videoRef === null || videoRef === void 0 ? void 0 : videoRef.src(videoSrc);
195
195
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadedmetadata', handleLoadedmetadata);
196
196
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('loadeddata', handLoadeddata);
197
197
  videoRef === null || videoRef === void 0 ? void 0 : videoRef.on('playing', handlePlaying);
@@ -267,10 +267,10 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
267
267
  window.removeEventListener('beforeunload', handleBeforeUnload);
268
268
  };
269
269
  }, [activeIndex, index, rec, videoRef, handleClickVideo, isPauseVideo]);
270
- if (!rec.video) {
270
+ if (!(rec === null || rec === void 0 ? void 0 : rec.video)) {
271
271
  return null;
272
272
  }
273
- return (react_1.default.createElement(react_1.default.Fragment, null, blur ? (react_1.default.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: Object.assign({ position: 'relative', width: '100%', height, overflow: 'hidden' }, bgStyle) },
273
+ return (react_1.default.createElement(react_1.default.Fragment, null, blur ? (react_1.default.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) },
274
274
  !isBgColor && (react_1.default.createElement(FormatImage_1.default, { src: blurBgSrc, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) })),
275
275
  react_1.default.createElement("canvas", { ref: canvasRef, style: { display: 'none' } }),
276
276
  react_1.default.createElement("div", { style: {
@@ -285,7 +285,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
285
285
  react_1.default.createElement("div", { style: { position: 'relative', width: '100%', height: '100%' } },
286
286
  react_1.default.createElement("div", { className: 'n-full-screen', ref: videoEleRef, id: videoId, style: { width: '100%', height: '100%' } }),
287
287
  react_1.default.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
288
- renderPoster)) : (react_1.default.createElement("div", { className: 'video-container', key: rec.video.itemId, style: {
288
+ renderPoster)) : (react_1.default.createElement("div", { className: 'video-container', key: rec === null || rec === void 0 ? void 0 : rec.video.itemId, style: {
289
289
  position: 'relative',
290
290
  width: '100%',
291
291
  height,