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.
- package/dist/index.cjs +138 -107
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +138 -107
- 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 +141 -110
- 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 +9 -3
- package/es/core/components/SxpPageRender/LikeButton/index.js +11 -11
- package/es/core/components/SxpPageRender/Popup/index.js +2 -2
- package/es/core/components/SxpPageRender/VideoWidget/index.js +13 -13
- package/es/core/components/SxpPageRender/index.js +32 -26
- package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/es/core/context/SxpDataSourceProvider.js +3 -3
- package/es/materials/sxp/popup/AppointForm/index.js +3 -1
- package/es/materials/sxp/popup/AppointForm/settingRender.js +0 -5
- package/es/materials/sxp/popup/CommodityDetail/index.js +1 -1
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +1 -1
- package/es/materials/sxp/popup/CommodityDetailDiro/index.js +2 -3
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +1 -1
- package/es/materials/sxp/template/Commodity/index.js +1 -1
- package/es/materials/sxp/template/CommodityDiro/index.js +1 -1
- package/es/materials/sxp/template/CommodityDiroNew/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodity/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +1 -1
- package/es/materials/sxp/template/components/settingRender.js +1 -1
- 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 +8 -2
- package/lib/core/components/SxpPageRender/LikeButton/index.js +11 -11
- package/lib/core/components/SxpPageRender/Popup/index.js +2 -2
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +13 -13
- package/lib/core/components/SxpPageRender/index.js +32 -26
- package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
- package/lib/core/context/SxpDataSourceProvider.js +3 -3
- package/lib/materials/sxp/popup/AppointForm/index.js +3 -1
- package/lib/materials/sxp/popup/AppointForm/settingRender.js +0 -5
- package/lib/materials/sxp/popup/CommodityDetail/index.js +1 -1
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +1 -1
- package/lib/materials/sxp/popup/CommodityDetailDiro/index.js +2 -3
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +1 -1
- package/lib/materials/sxp/template/Commodity/index.js +1 -1
- package/lib/materials/sxp/template/CommodityDiro/index.js +1 -1
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodity/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +1 -1
- package/lib/materials/sxp/template/components/settingRender.js +1 -1
- package/package.json +3 -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,21 +284,21 @@ 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
|
}
|
@@ -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
|
}
|
@@ -356,13 +362,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
356
362
|
eventInfo: {
|
357
363
|
eventSubject: 'viewImageCarouselStart',
|
358
364
|
eventDescription: 'User start view the image carousel',
|
359
|
-
contentId: (_d = (_c = item.video) === null || _c === void 0 ? void 0 : _c.itemId) !== null && _d !== void 0 ? _d : '',
|
360
|
-
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 : '',
|
361
367
|
imageStartTime: `${startTime}`,
|
362
|
-
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 : []),
|
363
369
|
position: activeIndex + '',
|
364
370
|
contentFormat: 'image',
|
365
|
-
traceInfo: item.video.traceInfo
|
371
|
+
traceInfo: item === null || item === void 0 ? void 0 : item.video.traceInfo
|
366
372
|
}
|
367
373
|
});
|
368
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);
|
@@ -167,7 +167,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
167
167
|
}), [bffFetch]);
|
168
168
|
const bffGetTagList = (0, react_1.useCallback)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
169
169
|
var _h, _j, _k, _l, _m;
|
170
|
-
if (!utmVal)
|
170
|
+
if (!utmVal || !isShowTag)
|
171
171
|
return;
|
172
172
|
try {
|
173
173
|
const val = (_k = (_j = (_h = utmVal === null || utmVal === void 0 ? void 0 : utmVal.split('&')) === null || _h === void 0 ? void 0 : _h.filter((val) => {
|
@@ -180,7 +180,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
180
180
|
catch (e) {
|
181
181
|
console.log('e', e);
|
182
182
|
}
|
183
|
-
}), [bffFetch, utmVal]);
|
183
|
+
}), [bffFetch, utmVal, isShowTag]);
|
184
184
|
const ctaEvent = (0, react_1.useCallback)((eventInfo, rec, product, position) => {
|
185
185
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
186
186
|
const cta = product === null || product === void 0 ? void 0 : product.bindCta;
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
const css_1 = require("@emotion/css");
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
6
|
+
const pro_components_1 = require("@ant-design/pro-components");
|
6
7
|
const lodash_1 = require("lodash");
|
7
8
|
const hooks_1 = require("../../../../core/hooks");
|
8
9
|
require("./index.less");
|
@@ -82,7 +83,8 @@ const AppointForm = (_a) => {
|
|
82
83
|
return (react_1.default.createElement("div", { className: 'pb-appoint-form' },
|
83
84
|
react_1.default.createElement("div", { className: `pb-appoint-form-title ${(0, css_1.css)(Object.assign({}, textStyle))}` }, title),
|
84
85
|
react_1.default.createElement("div", Object.assign({ className: (0, css_1.css)(Object.assign({}, style)) }, props),
|
85
|
-
react_1.default.createElement("div", { className: 'pb-appoint-form-container' }
|
86
|
+
react_1.default.createElement("div", { className: 'pb-appoint-form-container' },
|
87
|
+
react_1.default.createElement(pro_components_1.BetaSchemaForm, { columns: columnsData, submitter: false, layout: layoutType, autoFocusFirstInput: false, size: 'large', formRef: formRef, className: 'panel-reset' }))),
|
86
88
|
react_1.default.createElement("div", { className: 'pb-appoint-form-btn-wrapper' },
|
87
89
|
react_1.default.createElement("button", { onClick: handleSubmit, className: 'pb-appoint-form-btn', style: Object.assign({ color: submitColor, background: submitBgColor }, submitButtonStyle) }, loading ? react_1.default.createElement(react_1.default.Fragment, null, "loading...") : submitText))));
|
88
90
|
};
|
@@ -100,7 +100,7 @@ const CommodityDetail = (_a) => {
|
|
100
100
|
width: '100%',
|
101
101
|
objectFit: 'cover',
|
102
102
|
display: 'block',
|
103
|
-
|
103
|
+
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
104
104
|
}, src: src }))));
|
105
105
|
}))),
|
106
106
|
!((_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)({
|
@@ -70,9 +70,8 @@ const CommodityDetailDiro = (_a) => {
|
|
70
70
|
setSpread(!spread);
|
71
71
|
};
|
72
72
|
(0, react_1.useEffect)(() => {
|
73
|
-
var _a
|
74
|
-
|
75
|
-
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) {
|
73
|
+
var _a;
|
74
|
+
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) {
|
76
75
|
setStopSlide(true);
|
77
76
|
}
|
78
77
|
}, [scrollRef]);
|
@@ -118,7 +118,7 @@ Made in Italy` })));
|
|
118
118
|
width: '100%',
|
119
119
|
objectFit: 'cover',
|
120
120
|
display: 'block',
|
121
|
-
|
121
|
+
objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
|
122
122
|
}, src: src }))));
|
123
123
|
}))),
|
124
124
|
!((_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)({
|
@@ -20,7 +20,7 @@ const Commodity = (_a) => {
|
|
20
20
|
objectFit: 'cover',
|
21
21
|
height: '100%',
|
22
22
|
display: 'block',
|
23
|
-
|
23
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
24
24
|
}), src: src })),
|
25
25
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
26
26
|
color: '#fff',
|
@@ -20,7 +20,7 @@ const CommodityDiro = (_a) => {
|
|
20
20
|
objectFit: 'cover',
|
21
21
|
height: '100%',
|
22
22
|
display: 'block',
|
23
|
-
|
23
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
24
24
|
}), src: src })),
|
25
25
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
26
26
|
color: '#fff',
|
@@ -20,7 +20,7 @@ const CommodityDiroNew = (_a) => {
|
|
20
20
|
objectFit: 'cover',
|
21
21
|
height: '100%',
|
22
22
|
display: 'block',
|
23
|
-
|
23
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
24
24
|
}), src: src })),
|
25
25
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
26
26
|
color: '#fff',
|
@@ -39,7 +39,7 @@ const MultiCommodity = (_a) => {
|
|
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
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
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
43
43
|
} })),
|
44
44
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
45
45
|
color: '#fff',
|
@@ -38,7 +38,7 @@ const MultiCommodityDiro = (_a) => {
|
|
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
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
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
42
42
|
} })),
|
43
43
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
44
44
|
color: '#000',
|
@@ -38,7 +38,7 @@ const MultiCommodityDiroNew = (_a) => {
|
|
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
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
|
+
objectPosition: `50% ${translateY ? -translateY + 50 : 50}%`
|
42
42
|
} })),
|
43
43
|
react_1.default.createElement("div", { className: (0, css_1.css)({
|
44
44
|
color: '#fff',
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "pb-sxp-ui",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.73",
|
4
4
|
"description": "React enterprise-class UI components",
|
5
5
|
"main": "dist/index.cjs",
|
6
6
|
"module": "dist/index.js",
|
@@ -37,10 +37,11 @@
|
|
37
37
|
"author": "frontend@chatlabs.cn",
|
38
38
|
"license": "MIT",
|
39
39
|
"dependencies": {
|
40
|
+
"@ant-design/pro-components": "^2.6.35",
|
40
41
|
"@emotion/css": "^11.11.2",
|
42
|
+
"antd": "^5.15.3",
|
41
43
|
"eslint": "^8.48.0",
|
42
44
|
"eventemitter3": "^5.0.1",
|
43
|
-
"hls.js": "^1.5.8",
|
44
45
|
"less": "^4.2.0",
|
45
46
|
"lodash": "^4.17.21",
|
46
47
|
"pako": "^2.1.0",
|