pb-sxp-ui 1.15.13-alpha.1 → 1.15.13-alpha.3
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 +356 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +354 -46
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +6 -6
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +6 -6
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +356 -48
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +6 -6
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/DiyStoryPreview/VideoWidget.js +5 -2
- package/es/core/components/DiyStoryPreview/index.d.ts +3 -0
- package/es/core/components/DiyStoryPreview/index.js +288 -22
- package/es/core/components/SxpPageCore/index.d.ts +1 -0
- package/es/core/components/SxpPageCore/index.js +3 -3
- package/es/core/components/SxpPageRender/ExpandableText.js +10 -2
- package/es/core/components/SxpPageRender/RenderCard.js +4 -4
- package/es/core/context/SxpDataSourceProvider.js +3 -3
- package/es/materials/sxp/template/MultiCommodity/index.js +1 -1
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -1
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -1
- package/es/materials/sxp/template/components/EventProvider.js +2 -2
- package/lib/core/components/DiyStoryPreview/VideoWidget.js +5 -2
- package/lib/core/components/DiyStoryPreview/index.d.ts +3 -0
- package/lib/core/components/DiyStoryPreview/index.js +287 -21
- package/lib/core/components/SxpPageCore/index.d.ts +1 -0
- package/lib/core/components/SxpPageCore/index.js +3 -3
- package/lib/core/components/SxpPageRender/ExpandableText.js +10 -2
- package/lib/core/components/SxpPageRender/RenderCard.js +4 -4
- package/lib/core/context/SxpDataSourceProvider.js +3 -3
- package/lib/materials/sxp/template/MultiCommodity/index.js +1 -1
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -1
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +2 -1
- package/lib/materials/sxp/template/components/EventProvider.js +2 -2
- package/package.json +1 -1
@@ -39,6 +39,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
39
39
|
}, [bffEventReport, data, index, isFirstPlay]);
|
40
40
|
const handleLoadedMetadata = useCallback(() => {
|
41
41
|
var _a;
|
42
|
+
videoRef.current.currentTime = rec === null || rec === void 0 ? void 0 : rec.startTime;
|
42
43
|
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
43
44
|
setIsLoadFinish(true);
|
44
45
|
}, []);
|
@@ -112,6 +113,8 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
112
113
|
}, []);
|
113
114
|
const handlePause = () => {
|
114
115
|
var _a, _b, _c, _d, _e, _f;
|
116
|
+
if (!videoRef.current || !isActive)
|
117
|
+
return;
|
115
118
|
if (!loopPlay)
|
116
119
|
return;
|
117
120
|
if (index === (data === null || data === void 0 ? void 0 : data.length) - 1) {
|
@@ -134,7 +137,6 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
134
137
|
if (!videoPlayerWrapperNode)
|
135
138
|
return;
|
136
139
|
videoRef.current = mountVideoPlayerAtNode === null || mountVideoPlayerAtNode === void 0 ? void 0 : mountVideoPlayerAtNode(videoPlayerWrapperNode);
|
137
|
-
videoRef.current.currentTime = rec === null || rec === void 0 ? void 0 : rec.startTime;
|
138
140
|
if (!(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current))
|
139
141
|
return;
|
140
142
|
const Hls = window === null || window === void 0 ? void 0 : window.Hls;
|
@@ -145,6 +147,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
145
147
|
hls === null || hls === void 0 ? void 0 : hls.attachMedia(videoRef === null || videoRef === void 0 ? void 0 : videoRef.current);
|
146
148
|
hls === null || hls === void 0 ? void 0 : hls.on(Hls.Events.MANIFEST_PARSED, function () {
|
147
149
|
var _a;
|
150
|
+
videoRef.current.currentTime = rec === null || rec === void 0 ? void 0 : rec.startTime;
|
148
151
|
(_a = videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
149
152
|
});
|
150
153
|
}
|
@@ -163,7 +166,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
163
166
|
(_c = videoRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('pause', handlePause);
|
164
167
|
(_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('timeupdate', handleTimeUpload);
|
165
168
|
};
|
166
|
-
}, [handleLoadedMetadata, handlePlaying, rec, handLoadeddata, isActive]);
|
169
|
+
}, [handleLoadedMetadata, handlePlaying, rec, handLoadeddata, isActive, loopPlay]);
|
167
170
|
const renderPoster = useMemo(() => {
|
168
171
|
if (!(sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.placeholder_image) || isLoadFinish) {
|
169
172
|
return null;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ISxpPageRenderProps } from '../SxpPageRender';
|
3
|
+
import '../SxpPageRender/index.less';
|
3
4
|
export interface IScene {
|
4
5
|
blueprintStep: number;
|
5
6
|
endTime: number;
|
@@ -13,6 +14,7 @@ export interface IScene {
|
|
13
14
|
sceneTag: string;
|
14
15
|
startTime: number;
|
15
16
|
traceInfo: string;
|
17
|
+
bindProducts?: any[];
|
16
18
|
}
|
17
19
|
export type ScenesType = IScene[];
|
18
20
|
export type DiyStoryPreviewType = ISxpPageRenderProps & {
|
@@ -21,6 +23,7 @@ export type DiyStoryPreviewType = ISxpPageRenderProps & {
|
|
21
23
|
activeIndex?: number;
|
22
24
|
onActiveChange?: (v: number) => void;
|
23
25
|
loopPlay?: boolean;
|
26
|
+
pointerEvents?: any;
|
24
27
|
};
|
25
28
|
declare const _default: React.NamedExoticComponent<DiyStoryPreviewType>;
|
26
29
|
export default _default;
|
@@ -1,21 +1,201 @@
|
|
1
|
-
import React, { memo, useEffect, useMemo, useRef } from 'react';
|
1
|
+
import React, { memo, useEffect, useMemo, useRef, useState } from 'react';
|
2
2
|
import { Swiper, SwiperSlide } from 'swiper/react';
|
3
|
-
import
|
3
|
+
import { cloneDeep } from 'lodash';
|
4
4
|
import RenderCard from '../SxpPageRender/RenderCard';
|
5
5
|
import ExpandableText from '../SxpPageRender/ExpandableText';
|
6
|
-
import Hashtag from '../SxpPageRender/Hashtag';
|
7
6
|
import LikeButton from '../SxpPageRender/LikeButton';
|
8
7
|
import { useIconLink } from '../SxpPageRender/useIconLink';
|
8
|
+
import ToggleButton from '../SxpPageRender/ToggleButton';
|
9
9
|
import PictureGroup from './PictureGroup';
|
10
10
|
import VideoWidget from './VideoWidget';
|
11
11
|
import * as _materials_ from '../../../materials';
|
12
|
+
import '../SxpPageRender/index.less';
|
13
|
+
const recData = {
|
14
|
+
position: 0,
|
15
|
+
isCollected: false,
|
16
|
+
product: null,
|
17
|
+
video: {
|
18
|
+
appId: null,
|
19
|
+
itemId: 'VIDEOSsRgI1695278974368',
|
20
|
+
title: '8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片8张尺寸不一样的图片',
|
21
|
+
enTitle: null,
|
22
|
+
icon: null,
|
23
|
+
cover: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20231017/fsJFWmW1dGyW7XmDspbJPTn5esL3U1697538777398.png',
|
24
|
+
link: null,
|
25
|
+
linkTitle: null,
|
26
|
+
linkType: null,
|
27
|
+
menuCategoryId: null,
|
28
|
+
remark: null,
|
29
|
+
tags: [
|
30
|
+
'Gift-Giving',
|
31
|
+
'Daily Wear',
|
32
|
+
'Business Formal',
|
33
|
+
'Sports/Casual',
|
34
|
+
'Anniversary Gifts',
|
35
|
+
'Wedding/Engagement',
|
36
|
+
'Formal Dinner/Party'
|
37
|
+
],
|
38
|
+
traceInfo: ':VIDEO:VIDEOSsRgI1695278974368:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
39
|
+
value: 385,
|
40
|
+
weight: null,
|
41
|
+
bindCta: null,
|
42
|
+
bindProduct: null,
|
43
|
+
bindProducts: [
|
44
|
+
{
|
45
|
+
appId: 'wx448578f8851f3dce',
|
46
|
+
itemId: 'test02178888',
|
47
|
+
title: 'christian dior小包包 新CDN',
|
48
|
+
enTitle: null,
|
49
|
+
icon: null,
|
50
|
+
cover: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fs2jqiurjftpoaba67iiwr9jt5sc31726213277754.avif',
|
51
|
+
link: '/pages/details/index?spu_id=1702262707659534338',
|
52
|
+
linkTitle: '',
|
53
|
+
linkType: 'MP',
|
54
|
+
menuCategoryId: null,
|
55
|
+
remark: null,
|
56
|
+
tags: [],
|
57
|
+
traceInfo: ':PRODUCT:test02178888:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
58
|
+
value: null,
|
59
|
+
weight: null,
|
60
|
+
bindCta: {
|
61
|
+
appId: 'wx448578f8851f3dce',
|
62
|
+
itemId: 'CTA3KofE1716186622249',
|
63
|
+
title: 'SHOP NOW 立即购买',
|
64
|
+
enTitle: 'BUY NOW立即购买,选择你所喜爱的;',
|
65
|
+
icon: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240520/fssfxbmiwghixmgblz9uriwennd2r1716186615574.avif',
|
66
|
+
cover: null,
|
67
|
+
link: '/pages/details/index?spu_id=1702262707659534338',
|
68
|
+
linkTitle: '',
|
69
|
+
linkType: 'MP',
|
70
|
+
menuCategoryId: '64b60b202caf0e1c1ce1e17d',
|
71
|
+
remark: null,
|
72
|
+
tags: [
|
73
|
+
"Woman's Perfumes",
|
74
|
+
'Plates & Bowls',
|
75
|
+
'Glasses',
|
76
|
+
'Multicolor',
|
77
|
+
'Carafes',
|
78
|
+
'Tea & Coffee',
|
79
|
+
'Green',
|
80
|
+
'Grey',
|
81
|
+
'Cutlery'
|
82
|
+
],
|
83
|
+
traceInfo: ':CTA:CTA3KofE1716186622249:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
84
|
+
value: null,
|
85
|
+
weight: null
|
86
|
+
},
|
87
|
+
collection: 'Ricco',
|
88
|
+
currency: 'INR-₹',
|
89
|
+
homePage: [
|
90
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fs2jqiurjftpoaba67iiwr9jt5sc31726213277754.avif',
|
91
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fsr9ttuzuljs85smqi6lsidovnyoy1726213285994.avif',
|
92
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fsknmfhx2lxukxews05guwwxr8rju1726213281108.avif',
|
93
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20240913/fs0acnua4f1clamdpwdsrh0v5dgc61726213289247.avif'
|
94
|
+
],
|
95
|
+
info: 'test',
|
96
|
+
price: 53200,
|
97
|
+
shippingInfo: null,
|
98
|
+
taxInfo: null
|
99
|
+
},
|
100
|
+
{
|
101
|
+
appId: null,
|
102
|
+
itemId: '113J631A0684_C520',
|
103
|
+
title: 'Sweatshirt à capuche Dior Oblique, coupe relax',
|
104
|
+
enTitle: null,
|
105
|
+
icon: null,
|
106
|
+
cover: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241115/fsaf0xq8vx8gkkl30y1h1swpinmbt1731661943891.avif',
|
107
|
+
link: 'https://www.dior.com/fr_fr/fashion/products/113J631A0684_C520',
|
108
|
+
linkTitle: null,
|
109
|
+
linkType: 'WEB',
|
110
|
+
menuCategoryId: null,
|
111
|
+
remark: null,
|
112
|
+
tags: [],
|
113
|
+
traceInfo: ':PRODUCT:113J631A0684_C520:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
114
|
+
value: null,
|
115
|
+
weight: null,
|
116
|
+
bindCta: {
|
117
|
+
appId: null,
|
118
|
+
itemId: 'CTAAfaKf1730796437032',
|
119
|
+
title: 'test',
|
120
|
+
enTitle: 'test',
|
121
|
+
icon: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241105/fsjblxoud2tmehpiqqomh0oktwqrd1730796431496.avif',
|
122
|
+
cover: null,
|
123
|
+
link: null,
|
124
|
+
linkTitle: null,
|
125
|
+
linkType: null,
|
126
|
+
menuCategoryId: '64b60b202caf0e1c1ce1e17d',
|
127
|
+
remark: '',
|
128
|
+
tags: [],
|
129
|
+
traceInfo: ':CTA:CTAAfaKf1730796437032:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
130
|
+
value: null,
|
131
|
+
weight: null
|
132
|
+
},
|
133
|
+
collection: 'Jacquard de coton éponge bleu',
|
134
|
+
currency: 'EUR-€',
|
135
|
+
homePage: [
|
136
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241115/fsaf0xq8vx8gkkl30y1h1swpinmbt1731661943891.avif',
|
137
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241115/fszxkdcjfjql2oiy90ffbal5tsfd81731661964913.avif',
|
138
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20241115/fs1jhd9jwxvfqmrbjwy5abfzb0fde1731661994996.avif'
|
139
|
+
],
|
140
|
+
info: "Le sweatshirt à capuche bleu met à l'honneur l'emblématique motif dior oblique. Confectionné en jacquard de coton éponge bleu, il présente une coupe relax très confortable. Doté de poches latérales fendues, ce sweatshirt à capuche s'associera à tous vos jeans ou pantalons de survêtement pour un look décontracté.. Sweatshirt à capuche dior oblique, coupe relax Jacquard de coton éponge bleu",
|
141
|
+
price: 1800,
|
142
|
+
shippingInfo: null,
|
143
|
+
taxInfo: null
|
144
|
+
},
|
145
|
+
{
|
146
|
+
appId: null,
|
147
|
+
itemId: 'S5573CRIW_M928',
|
148
|
+
title: 'Mini Dior Book Tote',
|
149
|
+
enTitle: null,
|
150
|
+
icon: null,
|
151
|
+
cover: 'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fsvewk9etrawxrzznmvvewgt1bctu1739415576729.avif',
|
152
|
+
link: 'https://www.dior.com/en_gb/fashion/products/S5573CRIW_M928',
|
153
|
+
linkTitle: null,
|
154
|
+
linkType: 'WEB',
|
155
|
+
menuCategoryId: null,
|
156
|
+
remark: null,
|
157
|
+
tags: ['ダイヤモンド'],
|
158
|
+
traceInfo: ':PRODUCT:S5573CRIW_M928:regular:1:VPRHSkRS1697701789894:main::0:EXPMW20250305155940:COMBTh20250305160047:',
|
159
|
+
value: null,
|
160
|
+
weight: null,
|
161
|
+
bindCta: null,
|
162
|
+
collection: null,
|
163
|
+
currency: 'GBP-£',
|
164
|
+
homePage: [
|
165
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fsvewk9etrawxrzznmvvewgt1bctu1739415576729.avif',
|
166
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fsngtlvhid7xwt5if0viw7vqanm831739415582147.avif',
|
167
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fs4hotdvyzjtnqb9vszlynuzplddc1739415586910.avif',
|
168
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fswffx9kwexf3z3vcnxisut1qxtez1739415591629.avif',
|
169
|
+
'https://graff-cdn.chatlabs.net/dev/img/8922b5b8-a954-4a61-9ffc-80edebdf02b4/sxp-portal/20250213/fsbfsi7tttx1hnzldoiw7eoea7fvh1739415597388.avif'
|
170
|
+
],
|
171
|
+
info: "The Dior Book Tote is a House classic and original design by Maria Grazia Chiuri, Creative Director of Christian Dior. The style is fully embroidered with the House's hallmark blue Dior Oblique motif and showcases the Christian Dior Paris signature. Exemplifying House savoir-faire, the miniature style features an adjustable and removable strap that allows it to be carried by hand, worn over the shoulder or crossbody.",
|
172
|
+
price: 1950,
|
173
|
+
shippingInfo: null,
|
174
|
+
taxInfo: null
|
175
|
+
}
|
176
|
+
],
|
177
|
+
url: null,
|
178
|
+
blockCta: 1,
|
179
|
+
blockProduct: 1,
|
180
|
+
hashTags: [
|
181
|
+
'Sports/Casual',
|
182
|
+
'Formal Dinner/Party',
|
183
|
+
'Business Formal',
|
184
|
+
'Wedding/Engagement',
|
185
|
+
'Gift-Giving',
|
186
|
+
'Daily Wear',
|
187
|
+
'Anniversary Gifts'
|
188
|
+
]
|
189
|
+
}
|
190
|
+
};
|
12
191
|
const RESOLVER = {};
|
13
192
|
Object.values(_materials_).forEach((v) => {
|
14
193
|
RESOLVER[v.extend.type] = v;
|
15
194
|
});
|
16
195
|
const defaultUnLikeIconPath = '/pb_static/f71266d2c64446c5ae6a5a7f5489cc0a.png';
|
17
196
|
const defaultLikeIconPath = '/pb_static/f07900fe3f0f4ae188ea1611d4801a44.png';
|
18
|
-
const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain, tagList = [], scenes, onActiveChange, activeIndex, loopPlay = false }) => {
|
197
|
+
const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, descStyle, hashTagStyle, containerHeight = 664, containerWidth = 375, appDomain, tagList = [], scenes, onActiveChange, activeIndex, loopPlay = false, pointerEvents = 'none' }) => {
|
198
|
+
const [loopPlaySwiper, setLooPlaySwiper] = useState(loopPlay);
|
19
199
|
const swiperRef = useRef(null);
|
20
200
|
const height = useMemo(() => {
|
21
201
|
let minusHeight = 0;
|
@@ -40,10 +220,10 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
40
220
|
const renderContent = (rec, index) => {
|
41
221
|
const isVideo = isVideoUrl(rec === null || rec === void 0 ? void 0 : rec.mediaUrl);
|
42
222
|
if (isVideo) {
|
43
|
-
return (React.createElement(VideoWidget, { rec: rec, index: index, muted: true, width: containerWidth, data: scenes !== null && scenes !== void 0 ? scenes : [], height: containerHeight, activeIndex: index, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, swiperRef: swiperRef, loopPlay:
|
223
|
+
return (React.createElement(VideoWidget, { rec: rec, index: index, muted: true, width: containerWidth, data: scenes !== null && scenes !== void 0 ? scenes : [], height: containerHeight, activeIndex: index, videoPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.videoPost, swiperRef: swiperRef, loopPlay: loopPlaySwiper }));
|
44
224
|
}
|
45
225
|
else {
|
46
|
-
return (React.createElement(PictureGroup, { key: rec.itemId, imgUrls: [rec === null || rec === void 0 ? void 0 : rec.mediaUrl], width: containerWidth, height: containerHeight, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost, data: scenes !== null && scenes !== void 0 ? scenes : [], swiperRef: swiperRef, loopPlay:
|
226
|
+
return (React.createElement(PictureGroup, { key: rec.itemId, imgUrls: [rec === null || rec === void 0 ? void 0 : rec.mediaUrl], width: containerWidth, height: containerHeight, rec: rec, index: index, imgUrlsPostConfig: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.imgUrlsPost, data: scenes !== null && scenes !== void 0 ? scenes : [], swiperRef: swiperRef, loopPlay: loopPlaySwiper }));
|
47
227
|
}
|
48
228
|
};
|
49
229
|
const renderLogo = useMemo(() => {
|
@@ -55,22 +235,52 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
55
235
|
}, [globalConfig]);
|
56
236
|
const CTA = (rec, index) => {
|
57
237
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA)) {
|
238
|
+
console.log(globalConfig, rec, '111');
|
58
239
|
return (React.createElement("div", { className: 'clc-sxp-bottom-card' },
|
59
240
|
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER })));
|
60
241
|
}
|
61
242
|
return null;
|
62
243
|
};
|
63
244
|
const renderBottom = (rec, index) => {
|
64
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
245
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
65
246
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
247
|
+
let cta = null;
|
248
|
+
if ((_b = (_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.bindProducts) === null || _b === void 0 ? void 0 : _b.length) {
|
249
|
+
cta = '多商品CTA';
|
250
|
+
}
|
251
|
+
else if ((_c = rec === null || rec === void 0 ? void 0 : rec.video) === null || _c === void 0 ? void 0 : _c.bindProduct) {
|
252
|
+
cta = '商品CTA';
|
253
|
+
}
|
254
|
+
else {
|
255
|
+
cta = (_e = (_d = rec === null || rec === void 0 ? void 0 : rec.video) === null || _d === void 0 ? void 0 : _d.bindCta) === null || _e === void 0 ? void 0 : _e.itemId;
|
256
|
+
}
|
257
|
+
const value = tempMap === null || tempMap === void 0 ? void 0 : tempMap[cta];
|
66
258
|
return (React.createElement(React.Fragment, null,
|
67
|
-
((
|
68
|
-
|
69
|
-
|
70
|
-
|
259
|
+
((_f = rec === null || rec === void 0 ? void 0 : rec.video) === null || _f === void 0 ? void 0 : _f.title) && (React.createElement("div", { style: {
|
260
|
+
background: 'repeating-linear-gradient(0deg, rgba(26, 26, 25, 0.7), hsla(0, 0%, 100%, 0))',
|
261
|
+
height: '130px',
|
262
|
+
position: 'absolute',
|
263
|
+
bottom: 0,
|
264
|
+
width: '100%',
|
265
|
+
willChange: 'transform',
|
266
|
+
zIndex: 2,
|
267
|
+
pointerEvents
|
268
|
+
} })),
|
269
|
+
React.createElement("div", { style: {
|
270
|
+
marginBottom: `${(_g = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.bottomInfoDist) !== null && _g !== void 0 ? _g : 40}px`,
|
271
|
+
zIndex: 999,
|
272
|
+
position: 'absolute',
|
273
|
+
bottom: 0,
|
274
|
+
left: 0,
|
275
|
+
right: 0,
|
276
|
+
paddingTop: '20px'
|
277
|
+
} },
|
278
|
+
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowCTA) ? (React.createElement("div", { style: {} },
|
279
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, isActive: index === activeIndex, value: value }))) : null,
|
71
280
|
React.createElement("div", null,
|
72
|
-
React.createElement(ExpandableText, {
|
73
|
-
|
281
|
+
React.createElement(ExpandableText, { isPost: true, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (_j = (_h = rec === null || rec === void 0 ? void 0 : rec.video) === null || _h === void 0 ? void 0 : _h.title) !== null && _j !== void 0 ? _j : '', 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', padding: '0 20px', fontSize: '12px' }) }),
|
282
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, includesCtaType: ['AniLink'], isActive: index === activeIndex, value: value }))),
|
283
|
+
React.createElement(RenderCard, { rec: rec, index: index, tempMap: tempMap, resolver: RESOLVER, includesCtaType: ['AniLinkPopup'], isActive: index === activeIndex, value: value })));
|
74
284
|
}
|
75
285
|
return null;
|
76
286
|
};
|
@@ -85,17 +295,66 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
85
295
|
top += 40;
|
86
296
|
}
|
87
297
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
88
|
-
return (React.createElement(LikeButton, { key: rec.position, activeIcon: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon) !== null && _b !== void 0 ? _b : likeIcon, unActicveIcon: (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon) !== null && _c !== void 0 ? _c : unlikeIcon, position: index, active: rec.isCollected, recData: rec,
|
298
|
+
return (React.createElement(LikeButton, { key: rec.position, activeIcon: (_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon) !== null && _b !== void 0 ? _b : likeIcon, unActicveIcon: (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon) !== null && _c !== void 0 ? _c : unlikeIcon, position: index, active: rec.isCollected, recData: rec, style: {
|
89
299
|
top,
|
90
|
-
right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0
|
300
|
+
right: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconX) !== null && _d !== void 0 ? _d : 0,
|
301
|
+
position: 'absolute',
|
302
|
+
zIndex: 999,
|
303
|
+
backgroundColor: 'transparent',
|
304
|
+
width: '50px',
|
305
|
+
height: '50px',
|
306
|
+
outline: 'none',
|
307
|
+
border: 'none',
|
308
|
+
boxSizing: 'content-box',
|
309
|
+
padding: 0,
|
310
|
+
transform: 'translate3d(0px, 0px, 0px)'
|
91
311
|
} }));
|
92
312
|
}
|
93
313
|
return null;
|
94
314
|
};
|
95
315
|
const mutedIcon = useIconLink('/pb_static/5beaaa5ce7f3477b99db3838619cc471.png', appDomain);
|
96
316
|
const unmutedIcon = useIconLink('/pb_static/fea8668a8a894e4aa3a86bcc775e895e.png', appDomain);
|
97
|
-
const
|
98
|
-
|
317
|
+
const renderToggleButton = (visible) => {
|
318
|
+
var _a, _b, _c, _d;
|
319
|
+
if (!visible)
|
320
|
+
return;
|
321
|
+
let top = (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _a !== void 0 ? _a : 23;
|
322
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) === 'top') {
|
323
|
+
top += 45;
|
324
|
+
}
|
325
|
+
return (((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (React.createElement(ToggleButton, { style: {
|
326
|
+
position: 'absolute',
|
327
|
+
visibility: 'visible',
|
328
|
+
zIndex: 999,
|
329
|
+
transform: 'translate3d(0px,0px,0px)',
|
330
|
+
[(_b = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconXPosit) !== null && _b !== void 0 ? _b : 'right']: (_c = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _c !== void 0 ? _c : 0,
|
331
|
+
[(_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== null && _d !== void 0 ? _d : 'bottom']: top,
|
332
|
+
backgroundColor: 'transparent',
|
333
|
+
width: '50px',
|
334
|
+
height: '50px',
|
335
|
+
outline: 'none',
|
336
|
+
border: 'none',
|
337
|
+
boxSizing: 'content-box',
|
338
|
+
padding: 0
|
339
|
+
}, defaultValue: true, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon })));
|
340
|
+
};
|
341
|
+
const renderView = (item, index) => {
|
342
|
+
var _a, _b, _c, _d;
|
343
|
+
const rec = cloneDeep(recData);
|
344
|
+
rec.video.bindProducts = item === null || item === void 0 ? void 0 : item.bindProducts;
|
345
|
+
return (React.createElement("div", { style: { position: 'relative' } },
|
346
|
+
React.createElement(SwiperSlide, { key: index, virtualIndex: index, style: { overflow: 'hidden', position: 'relative' } },
|
347
|
+
renderBottom(rec, index),
|
348
|
+
renderLikeButton(rec, index),
|
349
|
+
renderToggleButton(!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed)),
|
350
|
+
React.createElement(ToggleButton, { style: {
|
351
|
+
position: 'absolute',
|
352
|
+
right: (_a = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconX) !== null && _a !== void 0 ? _a : 0,
|
353
|
+
visibility: ((_c = (_b = data === null || data === void 0 ? void 0 : data[index]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
|
354
|
+
bottom: (_d = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconY) !== null && _d !== void 0 ? _d : 23,
|
355
|
+
zIndex: 999
|
356
|
+
}, defaultValue: true, activeIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unMuteIcon : mutedIcon, unactiveIcon: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon) ? globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIcon : unmutedIcon }),
|
357
|
+
renderContent(item, index))));
|
99
358
|
};
|
100
359
|
useEffect(() => {
|
101
360
|
var _a, _b;
|
@@ -109,10 +368,17 @@ const DiyStoryPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, des
|
|
109
368
|
return;
|
110
369
|
(_b = (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.slideTo(0);
|
111
370
|
}, [loopPlay]);
|
112
|
-
return (React.createElement(
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
371
|
+
return (React.createElement("div", { id: 'sxp-render', style: { height: containerHeight, position: 'relative', pointerEvents } },
|
372
|
+
React.createElement(Swiper, { ref: swiperRef, allowTouchMove: pointerEvents !== 'none', onSlideChange: () => {
|
373
|
+
setLooPlaySwiper(false);
|
374
|
+
swiperRef.current.swiper.allowTouchMove = false;
|
375
|
+
setTimeout(() => {
|
376
|
+
swiperRef.current.swiper.allowTouchMove = true;
|
377
|
+
}, 500);
|
378
|
+
}, onActiveIndexChange: (swiper) => {
|
379
|
+
onActiveChange === null || onActiveChange === void 0 ? void 0 : onActiveChange(swiper.activeIndex);
|
380
|
+
}, direction: 'vertical', style: { overflow: 'hidden', height: containerHeight }, height: containerHeight }, scenes === null || scenes === void 0 ? void 0 : scenes.map((rec, index) => {
|
381
|
+
return renderView(rec, index);
|
382
|
+
}))));
|
117
383
|
};
|
118
384
|
export default memo(DiyStoryPreview);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React, { memo, useMemo, useState } from 'react';
|
2
|
-
import SxpPageRender from '../SxpPageRender';
|
3
2
|
import Popup from '../SxpPageRender/Popup';
|
3
|
+
import DiyStoryPreview from '../DiyStoryPreview';
|
4
4
|
import * as _materials_ from '../../../materials';
|
5
5
|
import { EditorCore } from '../../../core';
|
6
6
|
import SxpDataSourceProvider from '../../../core/context/SxpDataSourceProvider';
|
@@ -8,7 +8,7 @@ const RESOLVER = {};
|
|
8
8
|
Object.values(_materials_).forEach((v) => {
|
9
9
|
RESOLVER[v.extend.type] = v;
|
10
10
|
});
|
11
|
-
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList }) => {
|
11
|
+
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, enabledMetaConversionApi, dataList, pointerEvents }) => {
|
12
12
|
var _a, _b, _c, _d, _e, _f;
|
13
13
|
const utmVal = useMemo(() => {
|
14
14
|
var _a;
|
@@ -21,7 +21,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
|
|
21
21
|
React.createElement(SxpDataSourceProvider, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, enabledMetaConversionApi: enabledMetaConversionApi, utmParameter: data === null || data === void 0 ? void 0 : data.utm_parameter, data: data, dataList: dataList, onUpdateSchema: (d) => setSchema(d), onUpdateChannel: (d) => setChannel(d), render: ({ rtcList, tagList, pageData }) => {
|
22
22
|
var _a;
|
23
23
|
return (React.createElement(React.Fragment, null,
|
24
|
-
React.createElement(
|
24
|
+
React.createElement(DiyStoryPreview, Object.assign({ defaultData: data }, (_a = pageData === null || pageData === void 0 ? void 0 : pageData.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, scenes: rtcList, resolver: RESOLVER, containerHeight: window === null || window === void 0 ? void 0 : window.innerHeight, pointerEvents: pointerEvents })),
|
25
25
|
React.createElement(Popup, null)));
|
26
26
|
} })));
|
27
27
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { setFontForText } from '../../../core/utils/tool';
|
2
1
|
import React, { memo, useMemo, useState, useCallback, useRef, useEffect } from 'react';
|
2
|
+
import { setFontForText } from '../../../core/utils/tool';
|
3
3
|
const limitTextLastWholeWord = (originalText = '', limit) => {
|
4
4
|
const chineseRegex = /[\u4e00-\u9fa5]+/;
|
5
5
|
if (chineseRegex.test(originalText)) {
|
@@ -50,7 +50,15 @@ const ExpandableText = ({ text, maxStr = 108, style, className, onClick, foldTex
|
|
50
50
|
wordBreak: 'break-word'
|
51
51
|
}, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), style) } }),
|
52
52
|
React.createElement("div", { ref: multiRowCopy, dangerouslySetInnerHTML: { __html: setFontForText(text === null || text === void 0 ? void 0 : text.replace(/\n/g, '</br>'), style) } }),
|
53
|
-
text && isPost && isShow && (React.createElement("button", { "aria-label": isShowMore ? unfoldText || 'show less' : foldText || 'show more', style: {
|
53
|
+
text && isPost && isShow && (React.createElement("button", { "aria-label": isShowMore ? unfoldText || 'show less' : foldText || 'show more', style: {
|
54
|
+
textDecoration: 'underline',
|
55
|
+
cursor: 'pointer',
|
56
|
+
outline: 'none',
|
57
|
+
border: 'none',
|
58
|
+
boxSizing: 'content-box',
|
59
|
+
padding: 0,
|
60
|
+
background: 'transparent'
|
61
|
+
}, onClick: onClick !== null && onClick !== void 0 ? onClick : handleClick, dangerouslySetInnerHTML: {
|
54
62
|
__html: setFontForText(isShowMore ? unfoldText || 'show less' : foldText || 'show more', style)
|
55
63
|
} }))));
|
56
64
|
};
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import React, { memo, useMemo } from 'react';
|
2
2
|
import './index.less';
|
3
|
+
import { cloneDeep } from 'lodash';
|
3
4
|
import withBindDataSource from '../../../core/hoc/withBindDataSource';
|
4
5
|
import { useEditor } from '../../../core/hooks';
|
5
|
-
import { cloneDeep } from 'lodash';
|
6
6
|
const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive, value }) => {
|
7
7
|
const { schema } = useEditor();
|
8
8
|
if (!(rec === null || rec === void 0 ? void 0 : rec.video))
|
@@ -26,10 +26,10 @@ const RenderCard = ({ rec, index, tempMap, resolver, includesCtaType, isActive,
|
|
26
26
|
const Component = withBindDataSource(t);
|
27
27
|
const defaulSetting = (_u = t === null || t === void 0 ? void 0 : t.extend) === null || _u === void 0 ? void 0 : _u.defaulSetting;
|
28
28
|
const isExternalLink = ((_x = (_w = (_v = value === null || value === void 0 ? void 0 : value.item) === null || _v === void 0 ? void 0 : _v.event) === null || _w === void 0 ? void 0 : _w.onClick) === null || _x === void 0 ? void 0 : _x.linkType) === 'externalLink';
|
29
|
-
|
29
|
+
const style = cloneDeep((_y = value === null || value === void 0 ? void 0 : value.item) === null || _y === void 0 ? void 0 : _y.style);
|
30
30
|
if (style.hasOwnProperty('backdropFilter')) {
|
31
|
-
|
32
|
-
style
|
31
|
+
const sbf = style.backdropFilter;
|
32
|
+
style.backdropFilter = `blur(${sbf !== null && sbf !== void 0 ? sbf : 0}px)`;
|
33
33
|
}
|
34
34
|
return (React.createElement(Component, Object.assign({ style: Object.assign(Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.style), style), { zIndex: 50, marginLeft: '20px', boxSizing: 'border-box', transform: 'translate3d(0px, 0px, 0px)' }), textStyle: Object.assign(Object.assign({}, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.textStyle), (_z = value === null || value === void 0 ? void 0 : value.item) === null || _z === void 0 ? void 0 : _z.textStyle), bindDatas: (_1 = (_0 = value === null || value === void 0 ? void 0 : value.item) === null || _0 === void 0 ? void 0 : _0.bindDatas) !== null && _1 !== void 0 ? _1 : [] }, defaulSetting === null || defaulSetting === void 0 ? void 0 : defaulSetting.props, (_2 = value === null || value === void 0 ? void 0 : value.item) === null || _2 === void 0 ? void 0 : _2.props, { event: ((_3 = value === null || value === void 0 ? void 0 : value.item) === null || _3 === void 0 ? void 0 : _3.event) || {}, schema: schema, id: value === null || value === void 0 ? void 0 : value.id, key: value === null || value === void 0 ? void 0 : value.id, recData: rec, isExternalLink: isExternalLink, index: index, isActive: isActive })));
|
35
35
|
}
|
@@ -151,9 +151,8 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
151
151
|
}
|
152
152
|
else if (utmVal) {
|
153
153
|
const val = (_k = (_j = (_h = splitUrlParams(utmVal)) === null || _h === void 0 ? void 0 : _h.filter((val) => {
|
154
|
-
var _a, _b;
|
155
154
|
const key = val.split('=')[0];
|
156
|
-
return
|
155
|
+
return key;
|
157
156
|
})) === null || _j === void 0 ? void 0 : _j.join('&')) !== null && _k !== void 0 ? _k : '';
|
158
157
|
if (val)
|
159
158
|
query = Object.assign(Object.assign({}, query), { channel: decodeURIComponent(val) });
|
@@ -194,7 +193,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
194
193
|
if (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enablePreview) {
|
195
194
|
query = Object.assign(Object.assign({}, query), { directPage: true, level: 1, pageNum: (_o = query === null || query === void 0 ? void 0 : query.pageNum) !== null && _o !== void 0 ? _o : 1 });
|
196
195
|
}
|
197
|
-
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('
|
196
|
+
const result = yield (bffFetch === null || bffFetch === void 0 ? void 0 : bffFetch('v3/recommend/direct', { method: 'POST', body: query }));
|
198
197
|
if (!(result === null || result === void 0 ? void 0 : result.success)) {
|
199
198
|
return undefined;
|
200
199
|
}
|
@@ -465,6 +464,7 @@ const SxpDataSourceProvider = ({ render, dataSources, utmVal, enableReportEvent
|
|
465
464
|
if (!isShowConsent)
|
466
465
|
h5EnterLink();
|
467
466
|
}, [isShowConsent]);
|
467
|
+
console.log(data, '111');
|
468
468
|
useEffect(() => {
|
469
469
|
if (isShowConsent || isPreview)
|
470
470
|
return;
|
@@ -4,10 +4,10 @@ import React, { memo, useState } from 'react';
|
|
4
4
|
import { SwiperSlide } from 'swiper/react';
|
5
5
|
import Img from '../components/Img';
|
6
6
|
import Scroll from '../components/Scroll';
|
7
|
+
import EventProvider from '../components/EventProvider';
|
7
8
|
import styles from './index.module.less';
|
8
9
|
import { useSxpDataSource } from '../../../../core/hooks';
|
9
10
|
import { setFontForText } from '../../../../core/utils/tool';
|
10
|
-
import EventProvider from '../components/EventProvider';
|
11
11
|
const MultiCommodity = (_a) => {
|
12
12
|
var _b, _c;
|
13
13
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
|
@@ -4,15 +4,16 @@ import React, { memo, useState } from 'react';
|
|
4
4
|
import { SwiperSlide } from 'swiper/react';
|
5
5
|
import Scroll from '../components/Scroll';
|
6
6
|
import Img from '../components/Img';
|
7
|
+
import EventProvider from '../components/EventProvider';
|
7
8
|
import styles from './index.module.less';
|
8
9
|
import { useSxpDataSource } from '../../../../core/hooks';
|
9
10
|
import { setFontForText } from '../../../../core/utils/tool';
|
10
|
-
import EventProvider from '../components/EventProvider';
|
11
11
|
const MultiCommodityDiro = (_a) => {
|
12
12
|
var _b, _c;
|
13
13
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
|
14
14
|
const { sxpParameter } = useSxpDataSource();
|
15
15
|
const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
16
|
+
console.log(recData, '222');
|
16
17
|
return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
17
18
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
18
19
|
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|
@@ -4,15 +4,16 @@ import React, { memo, useState } from 'react';
|
|
4
4
|
import { SwiperSlide } from 'swiper/react';
|
5
5
|
import Scroll from '../components/Scroll';
|
6
6
|
import Img from '../components/Img';
|
7
|
+
import EventProvider from '../components/EventProvider';
|
7
8
|
import styles from './index.module.less';
|
8
9
|
import { useSxpDataSource } from '../../../../core/hooks';
|
9
10
|
import { setFontForText } from '../../../../core/utils/tool';
|
10
|
-
import EventProvider from '../components/EventProvider';
|
11
11
|
const MultiCommodityDiroNew = (_a) => {
|
12
12
|
var _b, _c;
|
13
13
|
var { content, style, bgImg, recData, bottom_image, ctaTempStyles, translateY = 0, isActive, index } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles", "translateY", "isActive", "index"]);
|
14
14
|
const { sxpParameter } = useSxpDataSource();
|
15
15
|
const [products] = useState((_c = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProducts) !== null && _c !== void 0 ? _c : [1, 2]);
|
16
|
+
console.log(recData, '333');
|
16
17
|
return (React.createElement(Scroll, { isPadding: !!recData }, products === null || products === void 0 ? void 0 : products.map((item, itemIndex) => {
|
17
18
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
18
19
|
return (React.createElement(React.Fragment, null, recData && !(item === null || item === void 0 ? void 0 : item.bindCta) ? null : (React.createElement(SwiperSlide, { key: itemIndex, className: css(Object.assign(Object.assign({}, style), { flexShrink: 0, marginLeft: 0, marginRight: '8px' })), tag: 'li', role: 'listitem' },
|