pb-sxp-ui 1.0.40 → 1.0.42
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.
- package/LICENSE +21 -21
- package/README.md +111 -111
- package/dist/index.cjs +560 -156
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +56 -4
- package/dist/index.js +559 -156
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +563 -160
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/DiyPortalPreview/PictureGroup.d.ts +13 -0
- package/es/core/components/DiyPortalPreview/PictureGroup.js +11 -0
- package/es/core/components/DiyPortalPreview/VideoWidget.d.ts +15 -0
- package/es/core/components/DiyPortalPreview/VideoWidget.js +236 -0
- package/es/core/components/DiyPortalPreview/index.d.ts +6 -0
- package/es/core/components/DiyPortalPreview/index.js +127 -0
- package/es/core/components/SxpPageCore/index.js +2 -2
- package/es/core/components/SxpPageRender/Nudge/index.js +6 -5
- package/es/core/components/SxpPageRender/PictureGroup/Picture.js +1 -0
- package/es/core/components/SxpPageRender/Tagbar.d.ts +7 -0
- package/es/core/components/SxpPageRender/Tagbar.js +37 -0
- package/es/core/components/SxpPageRender/VideoWidget/index.js +46 -79
- package/es/core/components/SxpPageRender/WaterFall/index.js +1 -1
- package/es/core/components/SxpPageRender/index.d.ts +2 -0
- package/es/core/components/SxpPageRender/index.js +22 -18
- package/es/core/context/SxpDataSourceProvider.d.ts +3 -0
- package/es/core/context/SxpDataSourceProvider.js +29 -5
- package/es/core/hooks/useEventReport.js +4 -4
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/materials/sxp/popup/CommodityDetail/index.js +10 -10
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +10 -10
- package/lib/core/components/DiyPortalPreview/PictureGroup.d.ts +13 -0
- package/lib/core/components/DiyPortalPreview/PictureGroup.js +14 -0
- package/lib/core/components/DiyPortalPreview/VideoWidget.d.ts +15 -0
- package/lib/core/components/DiyPortalPreview/VideoWidget.js +239 -0
- package/lib/core/components/DiyPortalPreview/index.d.ts +6 -0
- package/lib/core/components/DiyPortalPreview/index.js +130 -0
- package/lib/core/components/SxpPageCore/index.js +2 -2
- package/lib/core/components/SxpPageRender/Nudge/index.js +6 -5
- package/lib/core/components/SxpPageRender/PictureGroup/Picture.js +1 -0
- package/lib/core/components/SxpPageRender/Tagbar.d.ts +7 -0
- package/lib/core/components/SxpPageRender/Tagbar.js +40 -0
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +46 -79
- package/lib/core/components/SxpPageRender/WaterFall/index.js +1 -1
- package/lib/core/components/SxpPageRender/index.d.ts +2 -0
- package/lib/core/components/SxpPageRender/index.js +22 -18
- package/lib/core/context/SxpDataSourceProvider.d.ts +3 -0
- package/lib/core/context/SxpDataSourceProvider.js +29 -5
- package/lib/core/hooks/useEventReport.js +4 -4
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.js +10 -10
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +10 -10
- package/package.json +115 -114
@@ -17,13 +17,12 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
17
17
|
const { isActive } = (0, react_2.useSwiperSlide)();
|
18
18
|
const canvasRef = (0, react_1.useRef)(null);
|
19
19
|
const [firstFrameSrc, setFirstFrameSrc] = (0, react_1.useState)('');
|
20
|
-
const videoId = `pb-video-${index}`;
|
21
20
|
(0, react_1.useEffect)(() => {
|
22
21
|
if (!videoRef.current)
|
23
22
|
return;
|
24
|
-
videoRef.current.muted
|
23
|
+
videoRef.current.muted = muted;
|
25
24
|
}, [muted]);
|
26
|
-
const
|
25
|
+
const handleVideoStart = (0, react_1.useCallback)(() => {
|
27
26
|
var _a;
|
28
27
|
(_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
29
28
|
}, []);
|
@@ -32,10 +31,10 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
32
31
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
33
32
|
setIsPauseVideo(false);
|
34
33
|
const item = data[index];
|
35
|
-
if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration
|
36
|
-
videoStartTime.current = ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.currentTime
|
37
|
-
const videoDuration = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.duration
|
38
|
-
const videoCurrentTime = ((_f = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime
|
34
|
+
if (item && ((_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.duration)) {
|
35
|
+
videoStartTime.current = ((_b = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _b === void 0 ? void 0 : _b.currentTime) || 0;
|
36
|
+
const videoDuration = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.duration) !== null && _d !== void 0 ? _d : 0).toFixed(2);
|
37
|
+
const videoCurrentTime = ((_f = (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.currentTime) !== null && _f !== void 0 ? _f : 0).toFixed(2);
|
39
38
|
const playType = isFirstPlay ? '0' : '1';
|
40
39
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
41
40
|
eventInfo: {
|
@@ -55,15 +54,14 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
55
54
|
setIsFirstPlay(false);
|
56
55
|
}
|
57
56
|
}, [bffEventReport, data, index, isFirstPlay]);
|
58
|
-
const
|
59
|
-
handLoadeddata();
|
57
|
+
const handleLoadedMetadata = (0, react_1.useCallback)(() => {
|
60
58
|
setIsLoadFinish(true);
|
61
59
|
}, []);
|
62
60
|
const handleClickVideo = (0, react_1.useCallback)((type) => () => {
|
63
61
|
var _a, _b, _c, _d, _e;
|
64
62
|
if (!isLoadFinish)
|
65
63
|
return;
|
66
|
-
const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused
|
64
|
+
const isPause = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.paused;
|
67
65
|
switch (type) {
|
68
66
|
case 'start':
|
69
67
|
if (!isPause)
|
@@ -88,13 +86,13 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
88
86
|
break;
|
89
87
|
}
|
90
88
|
}, [isLoadFinish]);
|
91
|
-
const
|
89
|
+
const onPause = (0, react_1.useCallback)(() => {
|
92
90
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
93
91
|
const item = data[index];
|
94
|
-
const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration
|
95
|
-
const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime
|
96
|
-
if ((_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.duration
|
97
|
-
const playDuration = (((_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.currentTime
|
92
|
+
const videoDuration = ((_b = (_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.duration) !== null && _b !== void 0 ? _b : 0).toFixed(2);
|
93
|
+
const videoCurrentTime = ((_d = (_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) !== null && _d !== void 0 ? _d : 0).toFixed(2);
|
94
|
+
if ((_e = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _e === void 0 ? void 0 : _e.duration) {
|
95
|
+
const playDuration = (((_f = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _f === void 0 ? void 0 : _f.currentTime) - videoStartTime.current).toFixed(2);
|
98
96
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
99
97
|
eventInfo: {
|
100
98
|
eventSubject: 'playOverVideo',
|
@@ -126,64 +124,41 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
126
124
|
return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
|
127
125
|
}, [firstFrameSrc, rec]);
|
128
126
|
const handLoadeddata = (0, react_1.useCallback)(() => {
|
129
|
-
|
130
|
-
const videoDomRef = document.getElementById(`${videoId}_html5_api`);
|
131
|
-
if (((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || !canvasRef || !videoDomRef || !canvasRef.current)
|
127
|
+
if (!canvasRef || !videoRef || !videoRef.current || !canvasRef.current)
|
132
128
|
return;
|
133
|
-
const
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
setFirstFrameSrc(canvas.toDataURL());
|
143
|
-
};
|
144
|
-
setFrameImg();
|
145
|
-
setTimeout(() => {
|
146
|
-
setFrameImg();
|
147
|
-
}, 500);
|
129
|
+
const video = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current;
|
130
|
+
const canvas = canvasRef === null || canvasRef === void 0 ? void 0 : canvasRef.current;
|
131
|
+
const ctx = canvas.getContext('2d');
|
132
|
+
const targetWidth = window === null || window === void 0 ? void 0 : window.innerWidth;
|
133
|
+
const targetHeight = window === null || window === void 0 ? void 0 : window.innerHeight;
|
134
|
+
canvas.height = targetHeight;
|
135
|
+
canvas.width = targetWidth;
|
136
|
+
ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
|
137
|
+
setFirstFrameSrc(canvas.toDataURL());
|
148
138
|
}, []);
|
149
139
|
(0, react_1.useEffect)(() => {
|
150
|
-
var _a, _b, _c, _d
|
140
|
+
var _a, _b, _c, _d;
|
141
|
+
if (!videoRef.current)
|
142
|
+
return;
|
151
143
|
setIsPauseVideo(false);
|
152
|
-
|
153
|
-
|
154
|
-
videoRef.current =
|
155
|
-
|
156
|
-
|
157
|
-
src: videoSrc
|
158
|
-
}
|
159
|
-
],
|
160
|
-
licenseUrl: 'https://license.vod2.myqcloud.com/license/v2/1325816236_1/v_cube.license',
|
161
|
-
controls: false,
|
162
|
-
autoplay: false,
|
163
|
-
loop: false,
|
164
|
-
muted: true,
|
165
|
-
preload: 'auto',
|
166
|
-
posterImage: false,
|
167
|
-
bigPlayButton: true
|
168
|
-
});
|
169
|
-
videoRef.current.play();
|
170
|
-
videoRef.current.pause();
|
144
|
+
if (!videoRef.current.src) {
|
145
|
+
const videoSrc = rec.video.url;
|
146
|
+
videoRef.current.src = videoSrc;
|
147
|
+
videoRef.current.setAttribute('x5-playsinline', 'true');
|
148
|
+
videoRef.current.setAttribute('webkit-playsinline', 'true');
|
171
149
|
}
|
172
|
-
(_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.
|
173
|
-
(_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.
|
174
|
-
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.
|
175
|
-
(_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.
|
176
|
-
(_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.on('ended', handleEnded);
|
150
|
+
(_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('loadedmetadata', handleLoadedMetadata);
|
151
|
+
(_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('canplay', handleLoadedMetadata);
|
152
|
+
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('playing', handlePlaying);
|
153
|
+
(_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.addEventListener('loadeddata', handLoadeddata);
|
177
154
|
return () => {
|
178
|
-
var _a, _b, _c, _d
|
179
|
-
(_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.
|
180
|
-
(_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.
|
181
|
-
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.
|
182
|
-
(_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.
|
183
|
-
(_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.off('ended', handleEnded);
|
184
|
-
videoRef.current.dispose();
|
155
|
+
var _a, _b, _c, _d;
|
156
|
+
(_a = videoRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('loadedmetadata', handleLoadedMetadata);
|
157
|
+
(_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('canplay', handleLoadedMetadata);
|
158
|
+
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('playing', handlePlaying);
|
159
|
+
(_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('loadeddata', handLoadeddata);
|
185
160
|
};
|
186
|
-
}, []);
|
161
|
+
}, [handleLoadedMetadata, handlePlaying, rec.video, handLoadeddata]);
|
187
162
|
(0, react_1.useEffect)(() => {
|
188
163
|
var _a;
|
189
164
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) || !isLoadFinish)
|
@@ -266,27 +241,19 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
266
241
|
right: 0
|
267
242
|
} },
|
268
243
|
react_1.default.createElement("div", { style: { position: 'relative', width: '100%', height: '100%' } },
|
269
|
-
react_1.default.createElement("video", { id: `pb-video-${index}`,
|
244
|
+
react_1.default.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart, style: {
|
270
245
|
width: '100%',
|
271
246
|
height: '100%',
|
272
|
-
objectFit: 'contain'
|
273
|
-
backgroundColor: 'transparent',
|
274
|
-
pointerEvents: 'none'
|
247
|
+
objectFit: 'contain'
|
275
248
|
} }),
|
276
249
|
react_1.default.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON }))),
|
277
|
-
renderPoster)) : (react_1.default.createElement("div", { className: 'video-container', key: rec.video.itemId, style: {
|
250
|
+
renderPoster)) : (react_1.default.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
|
278
251
|
position: 'relative',
|
279
252
|
width: '100%',
|
280
253
|
height,
|
281
254
|
overflow: 'hidden'
|
282
|
-
}
|
283
|
-
react_1.default.createElement("video", { id: `pb-video-${index}`,
|
284
|
-
backgroundColor: 'transparent',
|
285
|
-
width: '100%',
|
286
|
-
height: '100%',
|
287
|
-
objectFit: 'cover',
|
288
|
-
pointerEvents: 'none'
|
289
|
-
} }),
|
255
|
+
} },
|
256
|
+
react_1.default.createElement("video", { id: `pb-video-${index}`, className: 'clc-pb-video', ref: videoRef, crossOrigin: 'anonymous', muted: true, controls: false, playsInline: true, preload: 'auto', onPause: onPause, onEnded: handleVideoStart }),
|
290
257
|
renderPoster,
|
291
258
|
react_1.default.createElement("img", { hidden: !isPauseVideo, className: 'clc-pb-video-pause', src: PAUSE_ICON })))));
|
292
259
|
};
|
@@ -66,7 +66,7 @@ const WaterFall = (props) => {
|
|
66
66
|
}
|
67
67
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
68
68
|
eventInfo: {
|
69
|
-
|
69
|
+
contentId: (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.itemId,
|
70
70
|
position: cacheActiveIndex + '',
|
71
71
|
contentTags: JSON.stringify((_e = rec === null || rec === void 0 ? void 0 : rec.video) === null || _e === void 0 ? void 0 : _e.tags),
|
72
72
|
traceInfo: (_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.traceInfo,
|
@@ -9,6 +9,7 @@ export type postConfigType = {
|
|
9
9
|
export interface ISxpPageRenderProps {
|
10
10
|
globalConfig?: {
|
11
11
|
isShowLogo?: boolean;
|
12
|
+
isShowCTA?: boolean;
|
12
13
|
logoUrl?: string;
|
13
14
|
muteIcon?: string;
|
14
15
|
unMuteIcon?: string;
|
@@ -55,6 +56,7 @@ export interface ISxpPageRenderProps {
|
|
55
56
|
containerWidth?: number;
|
56
57
|
tempMap?: Record<string, any>;
|
57
58
|
data?: RecItemType[];
|
59
|
+
tagList?: string[];
|
58
60
|
resolver: any;
|
59
61
|
ctaType?: string;
|
60
62
|
_schema?: any;
|
@@ -24,7 +24,8 @@ require("./index.less");
|
|
24
24
|
const useEventReport_1 = require("../../../core/hooks/useEventReport");
|
25
25
|
const withBindDataSource_1 = tslib_1.__importDefault(require("../../../core/hoc/withBindDataSource"));
|
26
26
|
const localStore_1 = require("../../../core/utils/localStore");
|
27
|
-
const
|
27
|
+
const Tagbar_1 = tslib_1.__importDefault(require("./Tagbar"));
|
28
|
+
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [] }) => {
|
28
29
|
var _a, _b, _c, _d, _e, _f, _g;
|
29
30
|
const { schema } = (0, hooks_1.useEditor)();
|
30
31
|
const [activeIndex, setActiveIndex] = (0, react_1.useState)(0);
|
@@ -123,12 +124,12 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
123
124
|
sessionDuration: Math.floor((new Date() - curTime.current) / 1000) + '',
|
124
125
|
eventSubject: 'sessionCompleted',
|
125
126
|
eventDescription: 'Session completed',
|
126
|
-
|
127
|
-
|
127
|
+
contentId: (_l = item === null || item === void 0 ? void 0 : item.video) === null || _l === void 0 ? void 0 : _l.itemId,
|
128
|
+
productId: (_m = item === null || item === void 0 ? void 0 : item.product) === null || _m === void 0 ? void 0 : _m.itemId,
|
128
129
|
position: activeIndex + '',
|
129
130
|
fromKName,
|
130
131
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
131
|
-
|
132
|
+
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 : ''
|
132
133
|
}
|
133
134
|
});
|
134
135
|
}
|
@@ -144,8 +145,15 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
144
145
|
};
|
145
146
|
}, [activeIndex, bffEventReport, curTime, data, handleH5EnterLink, popupDetailData, isFromHashtag, tempMap]);
|
146
147
|
const height = (0, react_1.useMemo)(() => {
|
147
|
-
|
148
|
-
|
148
|
+
let minusHeight = 0;
|
149
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
150
|
+
minusHeight += 45;
|
151
|
+
}
|
152
|
+
if (tagList.length > 0) {
|
153
|
+
minusHeight += 45;
|
154
|
+
}
|
155
|
+
return containerHeight - minusHeight;
|
156
|
+
}, [globalConfig, containerHeight, tagList]);
|
149
157
|
const renderLogo = (0, react_1.useMemo)(() => {
|
150
158
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.logoUrl) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowLogo)) {
|
151
159
|
return (react_1.default.createElement("div", { className: 'clc-sxp-logo-banner', style: { backgroundColor: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.color } },
|
@@ -193,8 +201,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
193
201
|
((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && react_1.default.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
|
194
202
|
react_1.default.createElement("div", { className: 'clc-sxp-bottom' },
|
195
203
|
react_1.default.createElement(Nudge_1.default, { nudge: nudge }),
|
196
|
-
react_1.default.createElement("div", { className: 'clc-sxp-bottom-card' },
|
197
|
-
react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver })),
|
204
|
+
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (react_1.default.createElement("div", { className: 'clc-sxp-bottom-card' },
|
205
|
+
react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
198
206
|
react_1.default.createElement("div", null,
|
199
207
|
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' }), onChange: onExpandableChange }),
|
200
208
|
react_1.default.createElement(Hashtag_1.default, { 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 })))));
|
@@ -261,8 +269,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
261
269
|
eventInfo: {
|
262
270
|
eventSubject: 'scrollDown',
|
263
271
|
eventDescription: 'User scroll down',
|
264
|
-
|
265
|
-
|
272
|
+
contentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
|
273
|
+
productId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
|
266
274
|
requestId: null
|
267
275
|
}
|
268
276
|
});
|
@@ -273,8 +281,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
273
281
|
eventInfo: {
|
274
282
|
eventSubject: 'scrollUp',
|
275
283
|
eventDescription: 'User scroll up',
|
276
|
-
|
277
|
-
|
284
|
+
contentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
|
285
|
+
productId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
|
278
286
|
requestId: null
|
279
287
|
}
|
280
288
|
});
|
@@ -351,13 +359,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
351
359
|
setOpenHashtag === null || setOpenHashtag === void 0 ? void 0 : setOpenHashtag(true);
|
352
360
|
} })),
|
353
361
|
renderLogo,
|
362
|
+
react_1.default.createElement(Tagbar_1.default, { tagList: tagList, setActiveIndex: setActiveIndex }),
|
354
363
|
isShowFingerTip ? react_1.default.createElement(FingerSwipeTip_1.default, { imageUrl: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.swipeTipIcon }) : null,
|
355
|
-
react_1.default.createElement(react_2.Swiper, { ref: swiperRef,
|
356
|
-
swiperRef.current.swiper.allowTouchMove = false;
|
357
|
-
setTimeout(() => {
|
358
|
-
swiperRef.current.swiper.allowTouchMove = true;
|
359
|
-
}, 500);
|
360
|
-
}, onActiveIndexChange: (swiper) => {
|
364
|
+
react_1.default.createElement(react_2.Swiper, { ref: swiperRef, onActiveIndexChange: (swiper) => {
|
361
365
|
setActiveIndex(swiper.activeIndex);
|
362
366
|
if (openHashtag)
|
363
367
|
return;
|
@@ -60,12 +60,15 @@ export interface ISxpDataSourceContext {
|
|
60
60
|
hashTagSize?: number;
|
61
61
|
loadingImage?: string;
|
62
62
|
isOpenHashTag?: boolean;
|
63
|
+
tagList: string[];
|
64
|
+
setLoading?: React.Dispatch<React.SetStateAction<boolean>>;
|
63
65
|
}
|
64
66
|
export declare const SxpDataSourceContext: React.Context<ISxpDataSourceContext>;
|
65
67
|
export interface SxpDataSourceProviderProps {
|
66
68
|
dataSources?: DataSource[];
|
67
69
|
render: (data: {
|
68
70
|
rtcList: RecItemType[];
|
71
|
+
tagList: string[];
|
69
72
|
submitForm: (body: {
|
70
73
|
attributes: Array<{
|
71
74
|
name: string;
|
@@ -8,7 +8,8 @@ const sessionStore_1 = require("../utils/sessionStore");
|
|
8
8
|
const localStore_1 = require("../utils/localStore");
|
9
9
|
const useIconLink_1 = require("../components/SxpPageRender/useIconLink");
|
10
10
|
exports.SxpDataSourceContext = (0, react_1.createContext)({
|
11
|
-
rtcList: []
|
11
|
+
rtcList: [],
|
12
|
+
tagList: []
|
12
13
|
});
|
13
14
|
var DataSourceType;
|
14
15
|
(function (DataSourceType) {
|
@@ -17,6 +18,7 @@ var DataSourceType;
|
|
17
18
|
const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
|
18
19
|
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false }) => {
|
19
20
|
const [rtcList, setRtcList] = (0, react_1.useState)([]);
|
21
|
+
const [tagList, setTagList] = (0, react_1.useState)([]);
|
20
22
|
const [loading, setLoading] = (0, react_1.useState)(false);
|
21
23
|
const [curReqInfo, setCurReqInfo] = (0, react_1.useState)({ rtc: '', requestId: '' });
|
22
24
|
const swiperRef = (0, react_1.useRef)(null);
|
@@ -129,6 +131,18 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
129
131
|
const res = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/customform', { method: 'POST', body }));
|
130
132
|
return res === null || res === void 0 ? void 0 : res.success;
|
131
133
|
}), [bffFetch]);
|
134
|
+
const bffGetTagList = (0, react_1.useCallback)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
135
|
+
var _g, _h;
|
136
|
+
if (!utmVal)
|
137
|
+
return;
|
138
|
+
try {
|
139
|
+
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/tag/list', { method: 'GET', query: { channel: utmVal } }));
|
140
|
+
setTagList((_h = (_g = result === null || result === void 0 ? void 0 : result.data) === null || _g === void 0 ? void 0 : _g.tags) !== null && _h !== void 0 ? _h : []);
|
141
|
+
}
|
142
|
+
catch (e) {
|
143
|
+
console.log('e', e);
|
144
|
+
}
|
145
|
+
}), [bffFetch, utmVal]);
|
132
146
|
const ctaEvent = (0, react_1.useCallback)((eventInfo, rec, product, position) => {
|
133
147
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
134
148
|
const cta = product === null || product === void 0 ? void 0 : product.bindCta;
|
@@ -144,11 +158,12 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
144
158
|
fromKName = 'imagePage';
|
145
159
|
}
|
146
160
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
147
|
-
eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '',
|
161
|
+
eventInfo: Object.assign(Object.assign({}, eventInfo), { ctaId: (_h = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _h !== void 0 ? _h : '', ctaName: (_j = cta === null || cta === void 0 ? void 0 : cta.title) !== null && _j !== void 0 ? _j : '', contentTags: JSON.stringify(cta === null || cta === void 0 ? void 0 : cta.tags), position: position + '', contentId: (_l = (_k = rec === null || rec === void 0 ? void 0 : rec.video) === null || _k === void 0 ? void 0 : _k.itemId) !== null && _l !== void 0 ? _l : '', productId: isProd ? product === null || product === void 0 ? void 0 : product.itemId : '', traceInfo: (_m = cta === null || cta === void 0 ? void 0 : cta.traceInfo) !== null && _m !== void 0 ? _m : '', fromKName })
|
148
162
|
});
|
149
163
|
}, [bffEventReport, isFromHashtag]);
|
150
164
|
(0, react_1.useEffect)(() => {
|
151
165
|
setLoading(true);
|
166
|
+
bffGetTagList();
|
152
167
|
getRecommendVideos()
|
153
168
|
.then((data) => {
|
154
169
|
var _a, _b;
|
@@ -164,6 +179,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
164
179
|
if (!isInit.current)
|
165
180
|
return;
|
166
181
|
setLoading(true);
|
182
|
+
bffGetTagList();
|
167
183
|
getRecommendVideos()
|
168
184
|
.then((data) => {
|
169
185
|
var _a, _b;
|
@@ -173,7 +189,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
173
189
|
.finally(() => {
|
174
190
|
setLoading(false);
|
175
191
|
});
|
176
|
-
}, [getRecommendVideos]);
|
192
|
+
}, [getRecommendVideos, bffGetTagList]);
|
177
193
|
const defaultLoadingImage = (0, useIconLink_1.useIconLink)('/pb_static/a65d23c5893c49d7aaaa81681d3179e2.gif', appDomain);
|
178
194
|
return (react_1.default.createElement(exports.SxpDataSourceContext.Provider, { value: {
|
179
195
|
rtcList,
|
@@ -205,7 +221,15 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
205
221
|
appDomain,
|
206
222
|
hashTagSize,
|
207
223
|
loadingImage: loadingImage !== null && loadingImage !== void 0 ? loadingImage : defaultLoadingImage,
|
208
|
-
isOpenHashTag
|
209
|
-
|
224
|
+
isOpenHashTag,
|
225
|
+
tagList,
|
226
|
+
setLoading
|
227
|
+
} }, render({
|
228
|
+
rtcList,
|
229
|
+
mutateLike: bffMutateLike,
|
230
|
+
mutateUnlike: bffMutateUnlike,
|
231
|
+
submitForm: bffSubmitForm,
|
232
|
+
tagList
|
233
|
+
})));
|
210
234
|
};
|
211
235
|
exports.default = (0, react_1.memo)(SxpDataSourceProvider);
|
@@ -35,8 +35,8 @@ function useEventReport() {
|
|
35
35
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
36
36
|
contentTags: (product === null || product === void 0 ? void 0 : product.tags) ? JSON.stringify(product === null || product === void 0 ? void 0 : product.tags) : '',
|
37
37
|
position: position + '',
|
38
|
-
|
39
|
-
|
38
|
+
contentId: (_m = (_l = data === null || data === void 0 ? void 0 : data.video) === null || _l === void 0 ? void 0 : _l.itemId) !== null && _m !== void 0 ? _m : '',
|
39
|
+
ctatId: (_o = cta === null || cta === void 0 ? void 0 : cta.itemId) !== null && _o !== void 0 ? _o : '',
|
40
40
|
traceInfo: (_p = product === null || product === void 0 ? void 0 : product.traceInfo) !== null && _p !== void 0 ? _p : ''
|
41
41
|
}
|
42
42
|
});
|
@@ -60,8 +60,8 @@ function useEventReport() {
|
|
60
60
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
61
61
|
contentTags: JSON.stringify(product === null || product === void 0 ? void 0 : product.tags),
|
62
62
|
position: position + '',
|
63
|
-
|
64
|
-
|
63
|
+
contentId: (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.itemId,
|
64
|
+
ctatId: cta === null || cta === void 0 ? void 0 : cta.itemId,
|
65
65
|
traceInfo: product === null || product === void 0 ? void 0 : product.traceInfo,
|
66
66
|
timeOnSite: Math.floor((new Date() - viewTime) / 1000) + '',
|
67
67
|
eventSubject: 'productView',
|
package/lib/index.d.ts
CHANGED
@@ -2,6 +2,7 @@ import { Pagebuilder } from './core/Pagebuilder';
|
|
2
2
|
export * as core from './core';
|
3
3
|
export * as materials from './materials';
|
4
4
|
export { default as SxpPageRender } from './core/components/SxpPageRender';
|
5
|
+
export { default as DiyPortalPreview } from './core/components/DiyPortalPreview';
|
5
6
|
export { default as Modal } from './core/components/SxpPageRender/Modal';
|
6
7
|
export { default as SxpDataSourceProvider } from './core/context/SxpDataSourceProvider';
|
7
8
|
export { default as SxpPageCore } from './core/components/SxpPageCore';
|
package/lib/index.js
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.defaultSetting = exports.useEditorDataProvider = exports.EditorDataProvider = exports.SxpPageCore = exports.SxpDataSourceProvider = exports.Modal = exports.SxpPageRender = exports.materials = exports.core = void 0;
|
3
|
+
exports.defaultSetting = exports.useEditorDataProvider = exports.EditorDataProvider = exports.SxpPageCore = exports.SxpDataSourceProvider = exports.Modal = exports.DiyPortalPreview = exports.SxpPageRender = exports.materials = exports.core = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const Pagebuilder_1 = require("./core/Pagebuilder");
|
6
6
|
exports.core = tslib_1.__importStar(require("./core"));
|
7
7
|
exports.materials = tslib_1.__importStar(require("./materials"));
|
8
8
|
var SxpPageRender_1 = require("./core/components/SxpPageRender");
|
9
9
|
Object.defineProperty(exports, "SxpPageRender", { enumerable: true, get: function () { return tslib_1.__importDefault(SxpPageRender_1).default; } });
|
10
|
+
var DiyPortalPreview_1 = require("./core/components/DiyPortalPreview");
|
11
|
+
Object.defineProperty(exports, "DiyPortalPreview", { enumerable: true, get: function () { return tslib_1.__importDefault(DiyPortalPreview_1).default; } });
|
10
12
|
var Modal_1 = require("./core/components/SxpPageRender/Modal");
|
11
13
|
Object.defineProperty(exports, "Modal", { enumerable: true, get: function () { return tslib_1.__importDefault(Modal_1).default; } });
|
12
14
|
var SxpDataSourceProvider_1 = require("./core/context/SxpDataSourceProvider");
|
@@ -12,7 +12,7 @@ const Modal_1 = tslib_1.__importDefault(require("../../../../core/components/Sxp
|
|
12
12
|
const ExpandableText_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/ExpandableText"));
|
13
13
|
const FormatImage_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/FormatImage"));
|
14
14
|
const CommodityDetail = (_a) => {
|
15
|
-
var _b, _c, _d, _e, _f, _g, _h, _j;
|
15
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
16
16
|
var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index"]);
|
17
17
|
const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
|
18
18
|
const { popupDetailData, bffEventReport, isPreview, waterFallData } = (0, hooks_1.useSxpDataSource)();
|
@@ -53,7 +53,7 @@ const CommodityDetail = (_a) => {
|
|
53
53
|
return '$7,000';
|
54
54
|
}
|
55
55
|
}, [product === null || product === void 0 ? void 0 : product.price, product === null || product === void 0 ? void 0 : product.currency]);
|
56
|
-
const width = isPreview ? 375 : window.innerWidth;
|
56
|
+
const width = isPreview ? 375 : (_f = style === null || style === void 0 ? void 0 : style.width) !== null && _f !== void 0 ? _f : window.innerWidth;
|
57
57
|
const renderContent = ({ isPost }) => {
|
58
58
|
var _a, _b, _c;
|
59
59
|
return (react_1.default.createElement("div", null,
|
@@ -61,10 +61,10 @@ const CommodityDetail = (_a) => {
|
|
61
61
|
react_1.default.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
|
62
62
|
react_1.default.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
|
63
63
|
react_1.default.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
64
|
-
react_1.default.createElement(ExpandableText_1.default, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
|
65
|
-
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
66
|
-
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
67
|
-
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
64
|
+
react_1.default.createElement(ExpandableText_1.default, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
|
65
|
+
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
66
|
+
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
67
|
+
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
68
68
|
18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
|
69
69
|
};
|
70
70
|
const renderBtn = () => {
|
@@ -73,7 +73,7 @@ const CommodityDetail = (_a) => {
|
|
73
73
|
};
|
74
74
|
return (react_1.default.createElement("div", { className: 'pb-commondity' },
|
75
75
|
react_1.default.createElement("div", Object.assign({ className: (0, css_1.css)(Object.assign({}, style)) }, props),
|
76
|
-
product && ((
|
76
|
+
product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (react_1.default.createElement(react_2.Swiper, { height: width, modules: [modules_1.Pagination, modules_1.Autoplay], pagination: {
|
77
77
|
clickable: true,
|
78
78
|
bulletActiveClass: 'swipe-item-active-bullet',
|
79
79
|
clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
|
@@ -81,7 +81,7 @@ const CommodityDetail = (_a) => {
|
|
81
81
|
: 'commondityDetail-swiper-clickable-center'
|
82
82
|
}, loop: true, autoplay: {
|
83
83
|
delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
|
84
|
-
} }, (
|
84
|
+
} }, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
|
85
85
|
return (react_1.default.createElement(react_2.SwiperSlide, { key: src },
|
86
86
|
react_1.default.createElement("div", { style: {
|
87
87
|
overflow: 'hidden',
|
@@ -90,7 +90,7 @@ const CommodityDetail = (_a) => {
|
|
90
90
|
} },
|
91
91
|
react_1.default.createElement(FormatImage_1.default, { style: { height: '100%', width: '100%', objectFit: 'cover', display: 'block' }, src: src }))));
|
92
92
|
}))),
|
93
|
-
!((
|
93
|
+
!((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (react_1.default.createElement("div", { className: (0, css_1.css)({
|
94
94
|
position: 'relative',
|
95
95
|
height: 0,
|
96
96
|
width: '100%',
|
@@ -103,7 +103,7 @@ const CommodityDetail = (_a) => {
|
|
103
103
|
top: 0,
|
104
104
|
objectFit: 'cover',
|
105
105
|
width: '100%'
|
106
|
-
}), src: (
|
106
|
+
}), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: '' }))),
|
107
107
|
react_1.default.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
|
108
108
|
renderBtn(),
|
109
109
|
react_1.default.createElement(Modal_1.default, { visible: showModal, onClose: () => setShowModal(false) },
|