pb-sxp-ui 1.0.70 → 1.0.72
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/dist/index.cjs +167 -131
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +167 -131
- 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 +171 -134
- 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/VideoWidget.js +15 -16
- package/es/core/components/DiyPortalPreview/index.js +8 -8
- package/es/core/components/SxpPageCore/index.js +2 -2
- package/es/core/components/SxpPageRender/FormatImage.js +2 -1
- package/es/core/components/SxpPageRender/LikeButton/index.js +11 -11
- package/es/core/components/SxpPageRender/Nudge/index.js +2 -2
- package/es/core/components/SxpPageRender/VideoWidget/index.js +13 -13
- package/es/core/components/SxpPageRender/WaterFall/List.js +5 -9
- package/es/core/components/SxpPageRender/index.js +39 -30
- package/es/core/components/SxpPageRender/typing.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.js +12 -4
- package/es/materials/sxp/HashTag/settingRender.d.ts +2 -7
- package/es/materials/sxp/HashTag/settingRender.js +0 -5
- package/es/materials/sxp/defaultSetting.js +1 -1
- package/es/materials/sxp/template/Commodity/index.js +4 -4
- package/es/materials/sxp/template/CommodityDiro/index.js +4 -4
- package/es/materials/sxp/template/CommodityDiroNew/index.js +4 -4
- package/es/materials/sxp/template/MultiCommodity/index.js +4 -4
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +4 -4
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +4 -4
- package/lib/core/components/DiyPortalPreview/VideoWidget.js +15 -16
- package/lib/core/components/DiyPortalPreview/index.js +8 -8
- package/lib/core/components/SxpPageCore/index.js +2 -2
- package/lib/core/components/SxpPageRender/FormatImage.js +1 -0
- package/lib/core/components/SxpPageRender/LikeButton/index.js +11 -11
- package/lib/core/components/SxpPageRender/Nudge/index.js +2 -2
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +13 -13
- package/lib/core/components/SxpPageRender/WaterFall/List.js +5 -9
- package/lib/core/components/SxpPageRender/index.js +39 -30
- package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.js +12 -4
- package/lib/materials/sxp/HashTag/settingRender.d.ts +2 -7
- package/lib/materials/sxp/HashTag/settingRender.js +0 -5
- package/lib/materials/sxp/defaultSetting.js +1 -1
- package/lib/materials/sxp/template/Commodity/index.js +4 -4
- package/lib/materials/sxp/template/CommodityDiro/index.js +4 -4
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +4 -4
- package/lib/materials/sxp/template/MultiCommodity/index.js +4 -4
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +4 -4
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +4 -4
- package/package.json +1 -2
@@ -79,23 +79,29 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
79
79
|
};
|
80
80
|
const firstRef = (0, react_1.useRef)();
|
81
81
|
(0, react_1.useEffect)(() => {
|
82
|
-
|
82
|
+
var _a, _b, _c;
|
83
|
+
if (!firstRef.current && !videoRef && (playerRef === null || playerRef === void 0 ? void 0 : playerRef.current) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
|
83
84
|
firstRef.current = true;
|
84
85
|
const player = TCPlayer('player-container-id', {
|
85
86
|
licenseUrl,
|
86
87
|
controls: false,
|
87
|
-
autoplay: false,
|
88
88
|
loop: false,
|
89
|
+
autoplay: true,
|
89
90
|
muted: true,
|
90
91
|
preload: 'auto',
|
91
92
|
posterImage: false,
|
92
|
-
bigPlayButton: true
|
93
|
+
bigPlayButton: true,
|
94
|
+
sources: [
|
95
|
+
{
|
96
|
+
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 : ''
|
97
|
+
}
|
98
|
+
]
|
93
99
|
});
|
94
100
|
player === null || player === void 0 ? void 0 : player.ready(() => {
|
95
101
|
setVideoRef(player);
|
96
102
|
});
|
97
103
|
}
|
98
|
-
}, [videoRef, licenseUrl]);
|
104
|
+
}, [videoRef, licenseUrl, data]);
|
99
105
|
(0, react_1.useEffect)(() => {
|
100
106
|
if (!isInit)
|
101
107
|
handleH5EnterLink();
|
@@ -128,7 +134,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
128
134
|
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))) {
|
129
135
|
fromKName = 'pdpPage';
|
130
136
|
}
|
131
|
-
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') {
|
137
|
+
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') {
|
132
138
|
fromKName = 'formPage';
|
133
139
|
}
|
134
140
|
else if (isFromHashtag) {
|
@@ -153,7 +159,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
153
159
|
position: activeIndex + '',
|
154
160
|
fromKName,
|
155
161
|
fromKPage: location === null || location === void 0 ? void 0 : location.href,
|
156
|
-
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 : ''
|
162
|
+
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 : ''
|
157
163
|
}
|
158
164
|
});
|
159
165
|
}
|
@@ -190,11 +196,11 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
190
196
|
}, [globalConfig]);
|
191
197
|
const renderContent = (0, react_1.useCallback)((rec, index) => {
|
192
198
|
var _a, _b, _c, _d;
|
193
|
-
if ((_a = rec.video) === null || _a === void 0 ? void 0 : _a.url) {
|
199
|
+
if ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.url) {
|
194
200
|
return (react_1.default.createElement(VideoWidget_1.default, { rec: rec, index: index, muted: isMuted, data: data, height: height, activeIndex: activeIndex, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, videoRef: videoRef }));
|
195
201
|
}
|
196
|
-
if ((_b = rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
|
197
|
-
return (react_1.default.createElement(PictureGroup_1.default, { 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 }));
|
202
|
+
if ((_b = rec === null || rec === void 0 ? void 0 : rec.video) === null || _b === void 0 ? void 0 : _b.imgUrls) {
|
203
|
+
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, onReportViewImageEnd: handleReportViewImageEnd, onViewImageStartEvent: handleViewImageStartEvent, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost }));
|
198
204
|
}
|
199
205
|
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) {
|
200
206
|
return (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.productPost) === null || _d === void 0 ? void 0 : _d.map((value, idx) => {
|
@@ -235,16 +241,16 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
235
241
|
}, [isShowMore]);
|
236
242
|
const renderBottom = (0, react_1.useCallback)((rec, index) => {
|
237
243
|
var _a, _b, _c, _d, _e, _f, _g;
|
238
|
-
if (rec.video) {
|
244
|
+
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
239
245
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
240
|
-
((_a = rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && react_1.default.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
|
246
|
+
((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.title) && !isShowMore && react_1.default.createElement("div", { className: 'clc-sxp-bottom-shadow' }),
|
241
247
|
react_1.default.createElement("div", { className: 'clc-sxp-bottom' },
|
242
248
|
react_1.default.createElement(Nudge_1.default, { nudge: nudge }),
|
243
249
|
(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' },
|
244
250
|
react_1.default.createElement(RenderCard_1.default, { rec: rec, index: index, tempMap: tempMap, resolver: resolver }))) : null,
|
245
251
|
react_1.default.createElement("div", null,
|
246
|
-
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 }),
|
247
|
-
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 })))));
|
252
|
+
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' }), onChange: onExpandableChange }),
|
253
|
+
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 === null || rec === void 0 ? void 0 : rec.video) === null || _g === void 0 ? void 0 : _g.itemId) ? 'VIDEO' : null, rec: rec, hashTagStyle: hashTagStyle })))));
|
248
254
|
}
|
249
255
|
return null;
|
250
256
|
}, [
|
@@ -268,7 +274,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
268
274
|
if (waterFallData && top < 40) {
|
269
275
|
top += 40;
|
270
276
|
}
|
271
|
-
if (rec.video) {
|
277
|
+
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
272
278
|
return (react_1.default.createElement(LikeButton_1.default, { 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: {
|
273
279
|
[(_b = globalConfig.likeIconXPosit) !== null && _b !== void 0 ? _b : 'right']: (_c = globalConfig.likeIconX) !== null && _c !== void 0 ? _c : 0,
|
274
280
|
[(_d = globalConfig.likeIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top
|
@@ -278,27 +284,27 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
278
284
|
}, [globalConfig, waterFallData]);
|
279
285
|
const handleReportViewImageEnd = (item) => {
|
280
286
|
var _a, _b, _c, _d, _e, _f;
|
281
|
-
if (!((_a = item.video) === null || _a === void 0 ? void 0 : _a.url) && ((_b = item.video) === null || _b === void 0 ? void 0 : _b.imgUrls)) {
|
287
|
+
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)) {
|
282
288
|
const endTime = Date.now();
|
283
289
|
const duration = (endTime - viewImageStartTime.current) / 1000;
|
284
290
|
bffEventReport === null || bffEventReport === void 0 ? void 0 : bffEventReport({
|
285
291
|
eventInfo: {
|
286
292
|
eventSubject: 'viewImageCarouselEnd',
|
287
293
|
eventDescription: 'User end view the image carousel',
|
288
|
-
contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
|
289
|
-
contentName: (_e = item.video.title) !== null && _e !== void 0 ? _e : '',
|
294
|
+
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 : '',
|
295
|
+
contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
|
290
296
|
imageEndTime: `${endTime}`,
|
291
297
|
playDuration: `${duration}`,
|
292
|
-
contentTags: JSON.stringify((_f = item.video.tags) !== null && _f !== void 0 ? _f : []),
|
298
|
+
contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
|
293
299
|
position: activeIndex + '',
|
294
300
|
contentFormat: 'image',
|
295
|
-
traceInfo: item.video.traceInfo
|
301
|
+
traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
|
296
302
|
}
|
297
303
|
});
|
298
304
|
}
|
299
305
|
};
|
300
306
|
const handleScrollEvent = (swiper) => {
|
301
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
307
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
302
308
|
viewTime.current = new Date();
|
303
309
|
const item = data[swiper.previousIndex];
|
304
310
|
if (!item)
|
@@ -308,8 +314,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
308
314
|
eventInfo: {
|
309
315
|
eventSubject: 'scrollDown',
|
310
316
|
eventDescription: 'User scroll down',
|
311
|
-
contentId: (_b = (_a = item.video) === null || _a === void 0 ? void 0 : _a.itemId) !== null && _b !== void 0 ? _b : '',
|
312
|
-
productId: (_d = (_c = item.product) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
|
317
|
+
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 : '',
|
318
|
+
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 : '',
|
313
319
|
requestId: null
|
314
320
|
}
|
315
321
|
});
|
@@ -320,7 +326,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
320
326
|
eventInfo: {
|
321
327
|
eventSubject: 'scrollUp',
|
322
328
|
eventDescription: 'User scroll up',
|
323
|
-
contentId: (_f = (_e = item.video) === null || _e === void 0 ? void 0 : _e.itemId) !== null && _f !== void 0 ? _f : '',
|
329
|
+
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 : '',
|
324
330
|
productId: (_h = (_g = item.product) === null || _g === void 0 ? void 0 : _g.itemId) !== null && _h !== void 0 ? _h : '',
|
325
331
|
requestId: null
|
326
332
|
}
|
@@ -328,14 +334,17 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
328
334
|
handleReportViewImageEnd(item);
|
329
335
|
}
|
330
336
|
handleReportProductView(item);
|
337
|
+
const curItem = data[swiper.activeIndex];
|
338
|
+
if (!((_j = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _j === void 0 ? void 0 : _j.url) && !((_k = curItem === null || curItem === void 0 ? void 0 : curItem.video) === null || _k === void 0 ? void 0 : _k.imgUrls) && (curItem === null || curItem === void 0 ? void 0 : curItem.product)) {
|
339
|
+
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
340
|
+
eventName: 'ProductView'
|
341
|
+
});
|
342
|
+
}
|
331
343
|
};
|
332
344
|
const handleReportProductView = (item) => {
|
333
345
|
var _a, _b, _c;
|
334
346
|
if (!((_a = item === null || item === void 0 ? void 0 : item.video) === null || _a === void 0 ? void 0 : _a.url) && !((_b = item === null || item === void 0 ? void 0 : item.video) === null || _b === void 0 ? void 0 : _b.imgUrls) && (item === null || item === void 0 ? void 0 : item.product)) {
|
335
347
|
productView(item, item.product, (_c = item === null || item === void 0 ? void 0 : item.product) === null || _c === void 0 ? void 0 : _c.bindCta, viewTime.current, activeIndex);
|
336
|
-
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
337
|
-
eventName: 'ProductView'
|
338
|
-
});
|
339
348
|
}
|
340
349
|
};
|
341
350
|
(0, react_1.useEffect)(() => {
|
@@ -353,13 +362,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
353
362
|
eventInfo: {
|
354
363
|
eventSubject: 'viewImageCarouselStart',
|
355
364
|
eventDescription: 'User start view the image carousel',
|
356
|
-
contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
|
357
|
-
contentName: (_e = item.video.title) !== null && _e !== void 0 ? _e : '',
|
365
|
+
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 : '',
|
366
|
+
contentName: (_e = item === null || item === void 0 ? void 0 : item.video.title) !== null && _e !== void 0 ? _e : '',
|
358
367
|
imageStartTime: `${startTime}`,
|
359
|
-
contentTags: JSON.stringify((_f = item.video.tags) !== null && _f !== void 0 ? _f : []),
|
368
|
+
contentTags: JSON.stringify((_f = item === null || item === void 0 ? void 0 : item.video.tags) !== null && _f !== void 0 ? _f : []),
|
360
369
|
position: activeIndex + '',
|
361
370
|
contentFormat: 'image',
|
362
|
-
traceInfo: item.video.traceInfo
|
371
|
+
traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
|
363
372
|
}
|
364
373
|
});
|
365
374
|
bffFbReport === null || bffFbReport === void 0 ? void 0 : bffFbReport({
|
@@ -102,6 +102,7 @@ export interface SxpDataSourceProviderProps {
|
|
102
102
|
loadingImage?: string;
|
103
103
|
isOpenHashTag?: boolean;
|
104
104
|
enabledMetaConversionApi?: boolean;
|
105
|
+
isShowTag?: boolean;
|
105
106
|
}
|
106
107
|
declare const _default: React.NamedExoticComponent<SxpDataSourceProviderProps>;
|
107
108
|
export default _default;
|
@@ -17,7 +17,7 @@ var DataSourceType;
|
|
17
17
|
DataSourceType[DataSourceType["BFF"] = 5] = "BFF";
|
18
18
|
})(DataSourceType || (DataSourceType = {}));
|
19
19
|
const UTM_KEYS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_id', 'utm_content', 'cl_source'];
|
20
|
-
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false }) => {
|
20
|
+
const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent = true, maxSize, defaultSize, isPreview = false, sxpParameter, appDomain, hashTagSize, loadingImage, isOpenHashTag = false, enabledMetaConversionApi = false, isShowTag = true }) => {
|
21
21
|
const [rtcList, setRtcList] = (0, react_1.useState)([]);
|
22
22
|
const [tagList, setTagList] = (0, react_1.useState)([]);
|
23
23
|
const [loading, setLoading] = (0, react_1.useState)(false);
|
@@ -139,9 +139,17 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
139
139
|
if (!enableReportEvent || !enabledMetaConversionApi) {
|
140
140
|
return;
|
141
141
|
}
|
142
|
+
const fakeUserId = (0, localStore_1.storeAndLoadFeUserId)();
|
142
143
|
return bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('/fb/events', {
|
143
144
|
method: 'POST',
|
144
|
-
body: {
|
145
|
+
body: {
|
146
|
+
eventName,
|
147
|
+
actionSource,
|
148
|
+
eventSourceUrl,
|
149
|
+
userData: {
|
150
|
+
externalId: fakeUserId
|
151
|
+
}
|
152
|
+
},
|
145
153
|
type: 'beacon'
|
146
154
|
});
|
147
155
|
}, [bffFetch, enableReportEvent, enabledMetaConversionApi]);
|
@@ -159,7 +167,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
159
167
|
}), [bffFetch]);
|
160
168
|
const bffGetTagList = (0, react_1.useCallback)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
161
169
|
var _h, _j, _k, _l, _m;
|
162
|
-
if (!utmVal)
|
170
|
+
if (!utmVal || !isShowTag)
|
163
171
|
return;
|
164
172
|
try {
|
165
173
|
const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
|
@@ -172,7 +180,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
172
180
|
catch (e) {
|
173
181
|
console.log('e', e);
|
174
182
|
}
|
175
|
-
}), [bffFetch, utmVal]);
|
183
|
+
}), [bffFetch, utmVal, isShowTag]);
|
176
184
|
const ctaEvent = (0, react_1.useCallback)((eventInfo, rec, product, position) => {
|
177
185
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
178
186
|
const cta = product === null || product === void 0 ? void 0 : product.bindCta;
|
@@ -1,16 +1,11 @@
|
|
1
1
|
declare const _default: ({
|
2
2
|
title: string;
|
3
|
-
child:
|
4
|
-
type: string;
|
5
|
-
label: string;
|
6
|
-
name: string[];
|
7
|
-
addonAfter?: undefined;
|
8
|
-
} | {
|
3
|
+
child: {
|
9
4
|
type: string;
|
10
5
|
label: string;
|
11
6
|
name: string[];
|
12
7
|
addonAfter: string;
|
13
|
-
}
|
8
|
+
}[];
|
14
9
|
} | {
|
15
10
|
title: string;
|
16
11
|
child: {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.fontOptions = void 0;
|
4
|
-
exports.fontOptions = [{ label: '
|
4
|
+
exports.fontOptions = [{ label: 'defalut', value: 'appFont' }];
|
5
5
|
const sxpFonts = typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.localStorage.getItem('sxp_font_links'));
|
6
6
|
const data = sxpFonts && sxpFonts !== '' ? JSON.parse(sxpFonts) : [];
|
7
7
|
exports.default = {
|
@@ -8,11 +8,11 @@ const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less
|
|
8
8
|
const hooks_1 = require("../../../../core/hooks");
|
9
9
|
const FormatImage_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/FormatImage"));
|
10
10
|
const Commodity = (_a) => {
|
11
|
-
var _b, _c, _d, _e, _f, _g, _h;
|
11
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
12
12
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
13
13
|
const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
|
14
14
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
15
|
-
const src = (
|
15
|
+
const src = (_g = (_f = (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.product) === null || _c === void 0 ? void 0 : _c.cover) !== null && _d !== void 0 ? _d : (_e = product === null || product === void 0 ? void 0 : product.homePage) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _g !== void 0 ? _g : bottom_image;
|
16
16
|
return (react_1.default.createElement(EventProvider_1.default, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: (0, css_1.css)(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
17
17
|
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
18
18
|
react_1.default.createElement(FormatImage_1.default, { className: (0, css_1.css)({
|
@@ -30,7 +30,7 @@ const Commodity = (_a) => {
|
|
30
30
|
width: '100%',
|
31
31
|
overflow: 'hidden'
|
32
32
|
}) },
|
33
|
-
react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
34
|
-
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
33
|
+
react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_h = product === null || product === void 0 ? void 0 : product.title) !== null && _h !== void 0 ? _h : 'Product Name'),
|
34
|
+
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_k = (_j = product === null || product === void 0 ? void 0 : product.bindCta) === null || _j === void 0 ? void 0 : _j.enTitle) !== null && _k !== void 0 ? _k : 'Shop Now'))));
|
35
35
|
};
|
36
36
|
exports.default = (0, react_1.memo)(Commodity);
|
@@ -8,11 +8,11 @@ const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less
|
|
8
8
|
const hooks_1 = require("../../../../core/hooks");
|
9
9
|
const FormatImage_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/FormatImage"));
|
10
10
|
const CommodityDiro = (_a) => {
|
11
|
-
var _b, _c, _d, _e, _f, _g, _h;
|
11
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
12
12
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
13
13
|
const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
|
14
14
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
15
|
-
const src = (
|
15
|
+
const src = (_g = (_f = (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.product) === null || _c === void 0 ? void 0 : _c.cover) !== null && _d !== void 0 ? _d : (_e = product === null || product === void 0 ? void 0 : product.homePage) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _g !== void 0 ? _g : bottom_image;
|
16
16
|
return (react_1.default.createElement(EventProvider_1.default, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: (0, css_1.css)(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
17
17
|
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
18
18
|
react_1.default.createElement(FormatImage_1.default, { className: (0, css_1.css)({
|
@@ -30,7 +30,7 @@ const CommodityDiro = (_a) => {
|
|
30
30
|
width: '100%',
|
31
31
|
overflow: 'hidden'
|
32
32
|
}) },
|
33
|
-
react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
34
|
-
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
33
|
+
react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_h = product === null || product === void 0 ? void 0 : product.title) !== null && _h !== void 0 ? _h : 'Product Name'),
|
34
|
+
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_k = (_j = product === null || product === void 0 ? void 0 : product.bindCta) === null || _j === void 0 ? void 0 : _j.enTitle) !== null && _k !== void 0 ? _k : 'Shop Now'))));
|
35
35
|
};
|
36
36
|
exports.default = (0, react_1.memo)(CommodityDiro);
|
@@ -8,11 +8,11 @@ const index_module_less_1 = tslib_1.__importDefault(require("./index.module.less
|
|
8
8
|
const hooks_1 = require("../../../../core/hooks");
|
9
9
|
const FormatImage_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/FormatImage"));
|
10
10
|
const CommodityDiroNew = (_a) => {
|
11
|
-
var _b, _c, _d, _e, _f, _g, _h;
|
11
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
12
12
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, isExternalLink, translateY = 0 } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "isExternalLink", "translateY"]);
|
13
13
|
const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
|
14
14
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
15
|
-
const src = (
|
15
|
+
const src = (_g = (_f = (_d = (_c = recData === null || recData === void 0 ? void 0 : recData.product) === null || _c === void 0 ? void 0 : _c.cover) !== null && _d !== void 0 ? _d : (_e = product === null || product === void 0 ? void 0 : product.homePage) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _g !== void 0 ? _g : bottom_image;
|
16
16
|
return (react_1.default.createElement(EventProvider_1.default, Object.assign({ isExternalLink: isExternalLink, rec: recData, className: (0, css_1.css)(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
17
17
|
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
18
18
|
react_1.default.createElement(FormatImage_1.default, { className: (0, css_1.css)({
|
@@ -30,7 +30,7 @@ const CommodityDiroNew = (_a) => {
|
|
30
30
|
width: '100%',
|
31
31
|
overflow: 'hidden'
|
32
32
|
}) },
|
33
|
-
react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
34
|
-
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
33
|
+
react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_h = product === null || product === void 0 ? void 0 : product.title) !== null && _h !== void 0 ? _h : 'Product Name'),
|
34
|
+
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_k = (_j = product === null || product === void 0 ? void 0 : product.bindCta) === null || _j === void 0 ? void 0 : _j.enTitle) !== null && _k !== void 0 ? _k : 'Shop now'))));
|
35
35
|
};
|
36
36
|
exports.default = (0, react_1.memo)(CommodityDiroNew);
|
@@ -35,10 +35,10 @@ const MultiCommodity = (_a) => {
|
|
35
35
|
}
|
36
36
|
}, popup === null || popup === void 0 ? void 0 : popup.duration);
|
37
37
|
return (react_1.default.createElement(Scroll_1.default, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
|
38
|
-
var _a, _b, _c, _d, _e, _f;
|
38
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
39
39
|
return (react_1.default.createElement(react_2.SwiperSlide, Object.assign({ hidden: recData && !(item === null || item === void 0 ? void 0 : item.bindCta), key: item.itemId, className: (0, css_1.css)(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
40
40
|
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
41
|
-
react_1.default.createElement(Img_1.default, { src: (
|
41
|
+
react_1.default.createElement(Img_1.default, { 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: {
|
42
42
|
transform: `translateY(${translateY}%)`
|
43
43
|
} })),
|
44
44
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
@@ -49,8 +49,8 @@ const MultiCommodity = (_a) => {
|
|
49
49
|
width: '100%',
|
50
50
|
overflow: 'hidden'
|
51
51
|
}) },
|
52
|
-
react_1.default.createElement("div", { className: index_module_less_1.default['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
53
|
-
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
52
|
+
react_1.default.createElement("div", { className: index_module_less_1.default['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name'),
|
53
|
+
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_g = (_f = item === null || item === void 0 ? void 0 : item.bindCta) === null || _f === void 0 ? void 0 : _f.enTitle) !== null && _g !== void 0 ? _g : 'Shop Now'))));
|
54
54
|
})));
|
55
55
|
};
|
56
56
|
exports.default = (0, react_1.memo)(MultiCommodity);
|
@@ -34,10 +34,10 @@ const MultiCommodityDiro = (_a) => {
|
|
34
34
|
}
|
35
35
|
}, popup === null || popup === void 0 ? void 0 : popup.duration);
|
36
36
|
return (react_1.default.createElement(Scroll_1.default, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
|
37
|
-
var _a, _b, _c, _d, _e, _f;
|
37
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
38
38
|
return (react_1.default.createElement(react_2.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: (0, css_1.css)(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
39
39
|
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
40
|
-
react_1.default.createElement(Img_1.default, { src: (
|
40
|
+
react_1.default.createElement(Img_1.default, { 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: {
|
41
41
|
transform: `translateY(${translateY}%)`
|
42
42
|
} })),
|
43
43
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
@@ -48,8 +48,8 @@ const MultiCommodityDiro = (_a) => {
|
|
48
48
|
width: '100%',
|
49
49
|
overflow: 'hidden'
|
50
50
|
}) },
|
51
|
-
react_1.default.createElement("div", { className: index_module_less_1.default['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
52
|
-
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
51
|
+
react_1.default.createElement("div", { className: index_module_less_1.default['two-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name'),
|
52
|
+
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_g = (_f = item === null || item === void 0 ? void 0 : item.bindCta) === null || _f === void 0 ? void 0 : _f.enTitle) !== null && _g !== void 0 ? _g : 'Shop Now'))));
|
53
53
|
})));
|
54
54
|
};
|
55
55
|
exports.default = (0, react_1.memo)(MultiCommodityDiro);
|
@@ -34,10 +34,10 @@ const MultiCommodityDiroNew = (_a) => {
|
|
34
34
|
}
|
35
35
|
}, popup === null || popup === void 0 ? void 0 : popup.duration);
|
36
36
|
return (react_1.default.createElement(Scroll_1.default, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item) => {
|
37
|
-
var _a, _b, _c, _d, _e, _f;
|
37
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
38
38
|
return (react_1.default.createElement(react_2.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: (0, css_1.css)(Object.assign(Object.assign({}, style), { display: 'flex', flexShrink: 0, marginLeft: 0, marginRight: '8px' })) }, props, { onClick: () => handleClick(item) }),
|
39
39
|
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
40
|
-
react_1.default.createElement(Img_1.default, { src: (
|
40
|
+
react_1.default.createElement(Img_1.default, { 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: {
|
41
41
|
transform: `translateY(${translateY}%)`
|
42
42
|
} })),
|
43
43
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
@@ -49,8 +49,8 @@ const MultiCommodityDiroNew = (_a) => {
|
|
49
49
|
overflow: 'hidden',
|
50
50
|
lineHeight: '20px'
|
51
51
|
}) },
|
52
|
-
react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (
|
53
|
-
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (
|
52
|
+
react_1.default.createElement("div", { className: index_module_less_1.default['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_e = item === null || item === void 0 ? void 0 : item.title) !== null && _e !== void 0 ? _e : 'Product Name'),
|
53
|
+
react_1.default.createElement("div", { className: (0, css_1.css)(Object.assign({ textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_g = (_f = item === null || item === void 0 ? void 0 : item.bindCta) === null || _f === void 0 ? void 0 : _f.enTitle) !== null && _g !== void 0 ? _g : 'Shop now'))));
|
54
54
|
})));
|
55
55
|
};
|
56
56
|
exports.default = (0, react_1.memo)(MultiCommodityDiroNew);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "pb-sxp-ui",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.72",
|
4
4
|
"description": "React enterprise-class UI components",
|
5
5
|
"main": "dist/index.cjs",
|
6
6
|
"module": "dist/index.js",
|
@@ -40,7 +40,6 @@
|
|
40
40
|
"@emotion/css": "^11.11.2",
|
41
41
|
"eslint": "^8.48.0",
|
42
42
|
"eventemitter3": "^5.0.1",
|
43
|
-
"hls.js": "^1.5.8",
|
44
43
|
"less": "^4.2.0",
|
45
44
|
"lodash": "^4.17.21",
|
46
45
|
"pako": "^2.1.0",
|