pb-sxp-ui 1.0.45 → 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +111 -111
- package/dist/index.cjs +103 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +16 -2
- package/dist/index.js +103 -54
- 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 +103 -54
- 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/index.js +5 -3
- package/es/core/components/SxpPageCore/index.d.ts +1 -0
- package/es/core/components/SxpPageCore/index.js +2 -2
- package/es/core/components/SxpPageRender/PictureGroup/Picture.js +8 -7
- package/es/core/components/SxpPageRender/VideoWidget/index.js +19 -18
- package/es/core/components/SxpPageRender/WaterFall/List.js +11 -9
- package/es/core/components/SxpPageRender/index.d.ts +3 -0
- package/es/core/components/SxpPageRender/index.js +3 -3
- package/es/materials/sxp/HashTag/index.d.ts +2 -0
- package/es/materials/sxp/HashTag/material.js +14 -0
- package/es/materials/sxp/HashTag/settingRender.js +28 -2
- package/es/materials/sxp/popup/CommodityDetail/index.js +4 -4
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/lib/core/components/DiyPortalPreview/index.js +5 -3
- package/lib/core/components/SxpPageCore/index.d.ts +1 -0
- package/lib/core/components/SxpPageCore/index.js +2 -2
- package/lib/core/components/SxpPageRender/PictureGroup/Picture.js +8 -7
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +19 -18
- package/lib/core/components/SxpPageRender/WaterFall/List.js +11 -9
- package/lib/core/components/SxpPageRender/index.d.ts +3 -0
- package/lib/core/components/SxpPageRender/index.js +3 -3
- package/lib/materials/sxp/HashTag/index.d.ts +2 -0
- package/lib/materials/sxp/HashTag/material.js +14 -0
- package/lib/materials/sxp/HashTag/settingRender.js +28 -2
- package/lib/materials/sxp/popup/CommodityDetail/index.js +4 -4
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/package.json +115 -115
@@ -1,4 +1,5 @@
|
|
1
1
|
import React, { memo, useMemo } from 'react';
|
2
|
+
import { css } from '@emotion/css';
|
2
3
|
import Nudge from '../SxpPageRender/Nudge';
|
3
4
|
import RenderCard from '../SxpPageRender/RenderCard';
|
4
5
|
import ExpandableText from '../SxpPageRender/ExpandableText';
|
@@ -112,15 +113,16 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
|
|
112
113
|
renderBottom(rec, index),
|
113
114
|
renderLikeButton(rec, index)));
|
114
115
|
};
|
115
|
-
return (React.createElement("div", {
|
116
|
+
return (React.createElement("div", { className: css({
|
116
117
|
width: '100%',
|
117
118
|
height: containerHeight,
|
118
119
|
display: 'flex',
|
119
120
|
boxSizing: 'border-box',
|
120
121
|
gap: 16,
|
121
122
|
pointerEvents: 'none',
|
122
|
-
userSelect: 'none'
|
123
|
-
|
123
|
+
userSelect: 'none',
|
124
|
+
transform: 'scale(0.7) translateX(-22%) translateY(-140px)'
|
125
|
+
}) }, data === null || data === void 0 ? void 0 : data.map((rec, index) => {
|
124
126
|
return renderView(rec, index);
|
125
127
|
})));
|
126
128
|
};
|
@@ -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 }) => {
|
11
|
+
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl }) => {
|
12
12
|
var _a, _b, _c, _d, _e, _f;
|
13
13
|
const utmVal = useMemo(() => {
|
14
14
|
var _a;
|
@@ -19,7 +19,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
|
|
19
19
|
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, render: ({ rtcList, tagList }) => {
|
20
20
|
var _a;
|
21
21
|
return (React.createElement(React.Fragment, null,
|
22
|
-
React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER })),
|
22
|
+
React.createElement(SxpPageRender, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER, licenseUrl: licenseUrl })),
|
23
23
|
React.createElement(Popup, null)));
|
24
24
|
} })));
|
25
25
|
};
|
@@ -19,13 +19,14 @@ const Picture = (props) => {
|
|
19
19
|
}
|
20
20
|
: {};
|
21
21
|
}, [blur]);
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
22
|
+
const isBgColor = useMemo(() => {
|
23
|
+
return (imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.bgWay) === '1';
|
24
|
+
}, [imgUrlsPostConfig]);
|
25
|
+
const bgStyle = useMemo(() => {
|
26
|
+
return isBgColor && (imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.bgColor) ? { backgroundColor: imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.bgColor } : {};
|
27
|
+
}, [imgUrlsPostConfig, isBgColor]);
|
28
|
+
return (React.createElement("div", { style: Object.assign({ overflow: 'hidden', height, width: '100%', position: 'relative' }, bgStyle) },
|
29
|
+
!isBgColor && (React.createElement(FormatImage, { src: src, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) })),
|
29
30
|
blur && (React.createElement(FormatImage, { src: src, style: {
|
30
31
|
width: '100%',
|
31
32
|
height: '100%',
|
@@ -138,11 +138,25 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
138
138
|
var _a;
|
139
139
|
return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
|
140
140
|
}, [firstFrameSrc, rec]);
|
141
|
+
const blurStyle = useMemo(() => {
|
142
|
+
return blur
|
143
|
+
? {
|
144
|
+
filter: 'blur(10px)',
|
145
|
+
transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
|
146
|
+
}
|
147
|
+
: {};
|
148
|
+
}, [blur]);
|
149
|
+
const isBgColor = useMemo(() => {
|
150
|
+
return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgWay) === '1';
|
151
|
+
}, [videoPostConfig]);
|
152
|
+
const bgStyle = useMemo(() => {
|
153
|
+
return isBgColor && (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor) ? { backgroundColor: videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor } : {};
|
154
|
+
}, [videoPostConfig, isBgColor]);
|
141
155
|
const handLoadeddata = useCallback(() => {
|
142
156
|
var _a;
|
143
|
-
if (!videoRef)
|
157
|
+
if (!videoRef || isBgColor)
|
144
158
|
return;
|
145
|
-
const videoDomRef = document.getElementById(
|
159
|
+
const videoDomRef = document.getElementById('player-container-id_html5_api');
|
146
160
|
if (((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || !canvasRef || !videoDomRef || !canvasRef.current)
|
147
161
|
return;
|
148
162
|
const setFrameImg = () => {
|
@@ -160,7 +174,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
160
174
|
setTimeout(() => {
|
161
175
|
setFrameImg();
|
162
176
|
}, 500);
|
163
|
-
}, [videoRef]);
|
177
|
+
}, [videoRef, isBgColor, rec]);
|
164
178
|
useEffect(() => {
|
165
179
|
if (!isActive || !videoRef)
|
166
180
|
return;
|
@@ -244,24 +258,11 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
244
258
|
window.removeEventListener('beforeunload', handleBeforeUnload);
|
245
259
|
};
|
246
260
|
}, [activeIndex, index, rec, videoRef, handleClickVideo, isPauseVideo]);
|
247
|
-
const blurStyle = useMemo(() => {
|
248
|
-
return blur
|
249
|
-
? {
|
250
|
-
filter: 'blur(10px)',
|
251
|
-
transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
|
252
|
-
}
|
253
|
-
: {};
|
254
|
-
}, [blur]);
|
255
261
|
if (!rec.video) {
|
256
262
|
return null;
|
257
263
|
}
|
258
|
-
return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
|
259
|
-
|
260
|
-
width: '100%',
|
261
|
-
height,
|
262
|
-
overflow: 'hidden'
|
263
|
-
} },
|
264
|
-
React.createElement(FormatImage, { src: blurBgSrc, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) }),
|
264
|
+
return (React.createElement(React.Fragment, null, blur ? (React.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: Object.assign({ position: 'relative', width: '100%', height, overflow: 'hidden' }, bgStyle) },
|
265
|
+
!isBgColor && (React.createElement(FormatImage, { src: blurBgSrc, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) })),
|
265
266
|
React.createElement("canvas", { ref: canvasRef, style: { display: 'none' } }),
|
266
267
|
React.createElement("div", { style: {
|
267
268
|
position: 'absolute',
|
@@ -117,7 +117,7 @@ const WaterfallFlowItem = (props) => {
|
|
117
117
|
React.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.price, hidden: !priceText }, priceText))));
|
118
118
|
};
|
119
119
|
export default function WaterfallList(_a) {
|
120
|
-
var _b, _c, _d, _e, _f, _g, _h;
|
120
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
121
121
|
var { reportTagsView } = _a, props = __rest(_a, ["reportTagsView"]);
|
122
122
|
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = useSxpDataSource();
|
123
123
|
const [list, setList] = useState();
|
@@ -171,15 +171,17 @@ export default function WaterfallList(_a) {
|
|
171
171
|
};
|
172
172
|
return (React.createElement(React.Fragment, null, isLoadingData ? (React.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
173
173
|
React.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (React.createElement("div", { className: 'list' },
|
174
|
-
React.createElement("div", { className: 'list-scroll', ref: containerRef,
|
175
|
-
|
176
|
-
} },
|
177
|
-
React.createElement("div", { className: 'list-info', style: (_c = props === null || props === void 0 ? void 0 : props.textStyles) === null || _c === void 0 ? void 0 : _c.hashTagDesc }, (_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.info),
|
178
|
-
React.createElement("div", { hidden: !((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link), className: 'list-collection', onClick: handleClickLink, style: { marginBottom: props === null || props === void 0 ? void 0 : props.space } }, ((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.linkTitle) || 'Shop the collection'),
|
174
|
+
React.createElement("div", { className: 'list-scroll', ref: containerRef },
|
175
|
+
React.createElement("div", { className: 'list-info', style: (_b = props === null || props === void 0 ? void 0 : props.textStyles) === null || _b === void 0 ? void 0 : _b.hashTagDesc }, (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.info),
|
176
|
+
React.createElement("div", { hidden: !((_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.link), className: 'list-collection', onClick: handleClickLink, style: Object.assign(Object.assign({}, (_e = props === null || props === void 0 ? void 0 : props.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagLink), { marginBottom: props === null || props === void 0 ? void 0 : props.space }) }, ((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.linkTitle) || 'Shop the collection'),
|
179
177
|
React.createElement("div", { className: 'list-content' }, list === null || list === void 0 ? void 0 : list.map((item, ind) => {
|
180
178
|
return (React.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, reportTagsView: reportTagsView }, props)));
|
181
179
|
})),
|
182
|
-
React.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading...")
|
183
|
-
|
184
|
-
|
180
|
+
React.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading..."),
|
181
|
+
React.createElement("div", { style: {
|
182
|
+
height: ((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link) ? ((_h = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _h === void 0 ? void 0 : _h.height) || ((_j = props === null || props === void 0 ? void 0 : props.buttonStyle) === null || _j === void 0 ? void 0 : _j.height) || '100px' : 0
|
183
|
+
} })),
|
184
|
+
React.createElement("div", { className: 'list-bottom', style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
|
185
|
+
React.createElement("div", { className: 'list-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
|
186
|
+
React.createElement("button", { className: 'list-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_k = data === null || data === void 0 ? void 0 : data.tag) === null || _k === void 0 ? void 0 : _k.linkTitle) || 'Shop the collection'))))));
|
185
187
|
}
|
@@ -5,6 +5,8 @@ export type postConfigType = {
|
|
5
5
|
mode?: '1' | '2';
|
6
6
|
offsetTop?: number;
|
7
7
|
delay?: number;
|
8
|
+
bgWay?: '1' | '2';
|
9
|
+
bgColor?: string;
|
8
10
|
};
|
9
11
|
export interface ISxpPageRenderProps {
|
10
12
|
globalConfig?: {
|
@@ -61,6 +63,7 @@ export interface ISxpPageRenderProps {
|
|
61
63
|
ctaType?: string;
|
62
64
|
_schema?: any;
|
63
65
|
hashTagStyle?: CSSProperties;
|
66
|
+
licenseUrl?: String;
|
64
67
|
}
|
65
68
|
declare const SxpPageRender: FC<ISxpPageRenderProps>;
|
66
69
|
export default SxpPageRender;
|
@@ -22,7 +22,7 @@ import { useEventReport } from '../../../core/hooks/useEventReport';
|
|
22
22
|
import withBindDataSource from '../../../core/hoc/withBindDataSource';
|
23
23
|
import { getFeUserId } from '../../../core/utils/localStore';
|
24
24
|
import Tagbar from './Tagbar';
|
25
|
-
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [] }) => {
|
25
|
+
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
|
26
26
|
var _a, _b, _c, _d, _e, _f, _g;
|
27
27
|
const { schema } = useEditor();
|
28
28
|
const [activeIndex, setActiveIndex] = useState(0);
|
@@ -76,7 +76,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
76
76
|
if (!firstRef.current && !videoRef) {
|
77
77
|
firstRef.current = true;
|
78
78
|
const player = TCPlayer('player-container-id', {
|
79
|
-
licenseUrl
|
79
|
+
licenseUrl,
|
80
80
|
controls: false,
|
81
81
|
autoplay: false,
|
82
82
|
loop: false,
|
@@ -89,7 +89,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
89
89
|
setVideoRef(player);
|
90
90
|
});
|
91
91
|
}
|
92
|
-
}, [videoRef]);
|
92
|
+
}, [videoRef, licenseUrl]);
|
93
93
|
useEffect(() => {
|
94
94
|
if (!isInit)
|
95
95
|
handleH5EnterLink();
|
@@ -6,9 +6,11 @@ export interface IHashTagProps {
|
|
6
6
|
textStyles: {
|
7
7
|
hashTagTitle: CSSProperties;
|
8
8
|
hashTagDesc: CSSProperties;
|
9
|
+
hashTagLink: CSSProperties;
|
9
10
|
title: CSSProperties;
|
10
11
|
price: CSSProperties;
|
11
12
|
};
|
13
|
+
buttonBgStyle: CSSProperties;
|
12
14
|
}
|
13
15
|
declare const _default: React.NamedExoticComponent<IHashTagProps>;
|
14
16
|
export default _default;
|
@@ -24,6 +24,12 @@ const HashTag = createMaterial(HashTagComponent, {
|
|
24
24
|
textAlign: 'center',
|
25
25
|
color: '#000'
|
26
26
|
},
|
27
|
+
hashTagLink: {
|
28
|
+
textAlign: 'center',
|
29
|
+
color: '#757575',
|
30
|
+
fontSize: 12,
|
31
|
+
textDecoration: 'underline'
|
32
|
+
},
|
27
33
|
title: {
|
28
34
|
fontSize: 12,
|
29
35
|
color: '#000'
|
@@ -42,6 +48,14 @@ const HashTag = createMaterial(HashTagComponent, {
|
|
42
48
|
textAlign: 'center',
|
43
49
|
color: '#fff',
|
44
50
|
borderRadius: 25
|
51
|
+
},
|
52
|
+
buttonBgStyle: {
|
53
|
+
backgroundColor: '#fff',
|
54
|
+
height: 52,
|
55
|
+
paddingTop: 20,
|
56
|
+
paddingLeft: 20,
|
57
|
+
paddingRight: 20,
|
58
|
+
paddingBottom: 20
|
45
59
|
}
|
46
60
|
}
|
47
61
|
},
|
@@ -36,6 +36,10 @@ export default [
|
|
36
36
|
label: 'hashtag描述',
|
37
37
|
value: 'hashTagDesc'
|
38
38
|
},
|
39
|
+
{
|
40
|
+
label: 'hashtag描述超链',
|
41
|
+
value: 'hashTagLink'
|
42
|
+
},
|
39
43
|
{
|
40
44
|
label: '标题',
|
41
45
|
value: 'title'
|
@@ -119,8 +123,8 @@ export default [
|
|
119
123
|
]
|
120
124
|
},
|
121
125
|
{
|
122
|
-
type: '
|
123
|
-
name: ['props', '
|
126
|
+
type: 'TextPadding',
|
127
|
+
name: ['props', 'buttonBgStyle']
|
124
128
|
},
|
125
129
|
{
|
126
130
|
type: 'Group',
|
@@ -153,5 +157,27 @@ export default [
|
|
153
157
|
name: ['props', 'buttonStyle']
|
154
158
|
}
|
155
159
|
]
|
160
|
+
},
|
161
|
+
{
|
162
|
+
title: '按钮背景样式',
|
163
|
+
child: [
|
164
|
+
{
|
165
|
+
type: 'Color',
|
166
|
+
label: '背景色',
|
167
|
+
name: ['props', 'buttonBgStyle', 'backgroundColor'],
|
168
|
+
initialValue: '#fff'
|
169
|
+
},
|
170
|
+
{
|
171
|
+
type: 'Group',
|
172
|
+
label: '尺寸',
|
173
|
+
child: [
|
174
|
+
{
|
175
|
+
type: 'Number',
|
176
|
+
name: ['props', 'buttonBgStyle', 'height'],
|
177
|
+
addonAfter: 'H'
|
178
|
+
}
|
179
|
+
]
|
180
|
+
}
|
181
|
+
]
|
156
182
|
}
|
157
183
|
];
|
@@ -59,10 +59,10 @@ const CommodityDetail = (_a) => {
|
|
59
59
|
React.createElement("div", { className: 'pb-commondity-content-title', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.title, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.title) }, (_b = product === null || product === void 0 ? void 0 : product.title) !== null && _b !== void 0 ? _b : 'Pendant in Yellow Gold with Diamonds, Medium'),
|
60
60
|
React.createElement("div", { className: 'pb-commondity-content-price', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.price, hidden: !!product && !(product === null || product === void 0 ? void 0 : product.price) }, priceText),
|
61
61
|
React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
62
|
-
React.createElement(ExpandableText, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
|
63
|
-
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
64
|
-
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
65
|
-
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
62
|
+
React.createElement(ExpandableText, { foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, onClick: () => setShowModal(true), isPost: isPost, text: (_c = product === null || product === void 0 ? void 0 : product.info) !== null && _c !== void 0 ? _c : `The design inspiration of Tiffany Lock series comes from the power of connection and inclusiveness, and the
|
63
|
+
bold and avant-garde visual design interprets the emotional bond connecting my heart. The Tiffany Lock
|
64
|
+
collection is unisex and is inspired by the padlock pattern found in the Tiffany Antique Collection. This
|
65
|
+
necklace features a stylish and eye-catching oval clasp chain decorated with a lock pattern. Crafted from
|
66
66
|
18-karat gold, this necklace is embellished with hand-set diamonds.`, maxStr: 79, className: 'pb-commondity-content-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info }))));
|
67
67
|
};
|
68
68
|
const renderBtn = () => {
|
@@ -84,7 +84,7 @@ const CommodityDetailDiroNew = (_a) => {
|
|
84
84
|
const productInfoText = ({ isPost }) => {
|
85
85
|
return (React.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
|
86
86
|
React.createElement(ExpandableText, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
|
87
|
-
`Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
|
87
|
+
`Unveiled at the Spring-Summer 2023 fashion show, the Dior Toujours bag is distinguished by a casual and practical design. Crafted in black calfskin with Macrocannage topstitching, it showcases a spacious interior compartment with a matching pouch to organize essentials. Its leather strap closure keeps items secure while the D of the CD Lock closure twists to adjust the sides and enhance the bag's silhouette. The leather handles can be adjusted using the small notches in order to be able to carry the large bag by hand or wear it over the shoulder. CD Lock and strap closures D.I.O.R. charms Removable interior pouch Adjustable leather handles Dust bag included
|
88
88
|
Made in Italy` })));
|
89
89
|
};
|
90
90
|
return (React.createElement("div", { className: 'pb-commondityDiroNew' },
|
@@ -2,6 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
const tslib_1 = require("tslib");
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
5
|
+
const css_1 = require("@emotion/css");
|
5
6
|
const Nudge_1 = tslib_1.__importDefault(require("../SxpPageRender/Nudge"));
|
6
7
|
const RenderCard_1 = tslib_1.__importDefault(require("../SxpPageRender/RenderCard"));
|
7
8
|
const ExpandableText_1 = tslib_1.__importDefault(require("../SxpPageRender/ExpandableText"));
|
@@ -115,15 +116,16 @@ const DiyPortalPreview = ({ data = [], globalConfig, tipText, nudge, tempMap, de
|
|
115
116
|
renderBottom(rec, index),
|
116
117
|
renderLikeButton(rec, index)));
|
117
118
|
};
|
118
|
-
return (react_1.default.createElement("div", {
|
119
|
+
return (react_1.default.createElement("div", { className: (0, css_1.css)({
|
119
120
|
width: '100%',
|
120
121
|
height: containerHeight,
|
121
122
|
display: 'flex',
|
122
123
|
boxSizing: 'border-box',
|
123
124
|
gap: 16,
|
124
125
|
pointerEvents: 'none',
|
125
|
-
userSelect: 'none'
|
126
|
-
|
126
|
+
userSelect: 'none',
|
127
|
+
transform: 'scale(0.7) translateX(-22%) translateY(-140px)'
|
128
|
+
}) }, data === null || data === void 0 ? void 0 : data.map((rec, index) => {
|
127
129
|
return renderView(rec, index);
|
128
130
|
})));
|
129
131
|
};
|
@@ -11,7 +11,7 @@ const RESOLVER = {};
|
|
11
11
|
Object.values(_materials_).forEach((v) => {
|
12
12
|
RESOLVER[v.extend.type] = v;
|
13
13
|
});
|
14
|
-
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain }) => {
|
14
|
+
const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, loadingImage, appDomain, licenseUrl }) => {
|
15
15
|
var _a, _b, _c, _d, _e, _f;
|
16
16
|
const utmVal = (0, react_1.useMemo)(() => {
|
17
17
|
var _a;
|
@@ -22,7 +22,7 @@ const SxpPageCore = ({ data, maxSize = 10, defaultSize = 10, hashTagSize = 20, l
|
|
22
22
|
react_1.default.createElement(SxpDataSourceProvider_1.default, { utmVal: utmVal, dataSources: data === null || data === void 0 ? void 0 : data.data_sources, sxpParameter: data === null || data === void 0 ? void 0 : data.sxp_parameter, maxSize: (_b = (_a = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _a === void 0 ? void 0 : _a.personalized_recommend) !== null && _b !== void 0 ? _b : maxSize, defaultSize: (_d = (_c = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _c === void 0 ? void 0 : _c.default_recommend) !== null && _d !== void 0 ? _d : defaultSize, hashTagSize: (_f = (_e = data === null || data === void 0 ? void 0 : data.sxp_parameter) === null || _e === void 0 ? void 0 : _e.hash_tag_size) !== null && _f !== void 0 ? _f : hashTagSize, loadingImage: loadingImage, appDomain: appDomain, render: ({ rtcList, tagList }) => {
|
23
23
|
var _a;
|
24
24
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
25
|
-
react_1.default.createElement(SxpPageRender_1.default, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER })),
|
25
|
+
react_1.default.createElement(SxpPageRender_1.default, Object.assign({}, (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.sxpPageConf, { tagList: tagList, data: rtcList, resolver: RESOLVER, licenseUrl: licenseUrl })),
|
26
26
|
react_1.default.createElement(Popup_1.default, null)));
|
27
27
|
} })));
|
28
28
|
};
|
@@ -22,13 +22,14 @@ const Picture = (props) => {
|
|
22
22
|
}
|
23
23
|
: {};
|
24
24
|
}, [blur]);
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
25
|
+
const isBgColor = (0, react_1.useMemo)(() => {
|
26
|
+
return (imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.bgWay) === '1';
|
27
|
+
}, [imgUrlsPostConfig]);
|
28
|
+
const bgStyle = (0, react_1.useMemo)(() => {
|
29
|
+
return isBgColor && (imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.bgColor) ? { backgroundColor: imgUrlsPostConfig === null || imgUrlsPostConfig === void 0 ? void 0 : imgUrlsPostConfig.bgColor } : {};
|
30
|
+
}, [imgUrlsPostConfig, isBgColor]);
|
31
|
+
return (react_1.default.createElement("div", { style: Object.assign({ overflow: 'hidden', height, width: '100%', position: 'relative' }, bgStyle) },
|
32
|
+
!isBgColor && (react_1.default.createElement(FormatImage_1.default, { src: src, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) })),
|
32
33
|
blur && (react_1.default.createElement(FormatImage_1.default, { src: src, style: {
|
33
34
|
width: '100%',
|
34
35
|
height: '100%',
|
@@ -141,11 +141,25 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
141
141
|
var _a;
|
142
142
|
return ((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || firstFrameSrc;
|
143
143
|
}, [firstFrameSrc, rec]);
|
144
|
+
const blurStyle = (0, react_1.useMemo)(() => {
|
145
|
+
return blur
|
146
|
+
? {
|
147
|
+
filter: 'blur(10px)',
|
148
|
+
transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
|
149
|
+
}
|
150
|
+
: {};
|
151
|
+
}, [blur]);
|
152
|
+
const isBgColor = (0, react_1.useMemo)(() => {
|
153
|
+
return (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgWay) === '1';
|
154
|
+
}, [videoPostConfig]);
|
155
|
+
const bgStyle = (0, react_1.useMemo)(() => {
|
156
|
+
return isBgColor && (videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor) ? { backgroundColor: videoPostConfig === null || videoPostConfig === void 0 ? void 0 : videoPostConfig.bgColor } : {};
|
157
|
+
}, [videoPostConfig, isBgColor]);
|
144
158
|
const handLoadeddata = (0, react_1.useCallback)(() => {
|
145
159
|
var _a;
|
146
|
-
if (!videoRef)
|
160
|
+
if (!videoRef || isBgColor)
|
147
161
|
return;
|
148
|
-
const videoDomRef = document.getElementById(
|
162
|
+
const videoDomRef = document.getElementById('player-container-id_html5_api');
|
149
163
|
if (((_a = rec === null || rec === void 0 ? void 0 : rec.video) === null || _a === void 0 ? void 0 : _a.cover) || !canvasRef || !videoDomRef || !canvasRef.current)
|
150
164
|
return;
|
151
165
|
const setFrameImg = () => {
|
@@ -163,7 +177,7 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
163
177
|
setTimeout(() => {
|
164
178
|
setFrameImg();
|
165
179
|
}, 500);
|
166
|
-
}, [videoRef]);
|
180
|
+
}, [videoRef, isBgColor, rec]);
|
167
181
|
(0, react_1.useEffect)(() => {
|
168
182
|
if (!isActive || !videoRef)
|
169
183
|
return;
|
@@ -247,24 +261,11 @@ const VideoWidget = ({ rec, index, height, data, muted, activeIndex, videoPostCo
|
|
247
261
|
window.removeEventListener('beforeunload', handleBeforeUnload);
|
248
262
|
};
|
249
263
|
}, [activeIndex, index, rec, videoRef, handleClickVideo, isPauseVideo]);
|
250
|
-
const blurStyle = (0, react_1.useMemo)(() => {
|
251
|
-
return blur
|
252
|
-
? {
|
253
|
-
filter: 'blur(10px)',
|
254
|
-
transform: 'translate3d(0px, 0px, 0px) scale(1.2)'
|
255
|
-
}
|
256
|
-
: {};
|
257
|
-
}, [blur]);
|
258
264
|
if (!rec.video) {
|
259
265
|
return null;
|
260
266
|
}
|
261
|
-
return (react_1.default.createElement(react_1.default.Fragment, null, blur ? (react_1.default.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: {
|
262
|
-
|
263
|
-
width: '100%',
|
264
|
-
height,
|
265
|
-
overflow: 'hidden'
|
266
|
-
} },
|
267
|
-
react_1.default.createElement(FormatImage_1.default, { src: blurBgSrc, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) }),
|
267
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, blur ? (react_1.default.createElement("div", { className: 'video-container', key: rec.video.itemId, onClick: handleClickVideo(), style: Object.assign({ position: 'relative', width: '100%', height, overflow: 'hidden' }, bgStyle) },
|
268
|
+
!isBgColor && (react_1.default.createElement(FormatImage_1.default, { src: blurBgSrc, style: Object.assign({ height: '100%', width: '100%', objectFit: 'cover' }, blurStyle) })),
|
268
269
|
react_1.default.createElement("canvas", { ref: canvasRef, style: { display: 'none' } }),
|
269
270
|
react_1.default.createElement("div", { style: {
|
270
271
|
position: 'absolute',
|
@@ -119,7 +119,7 @@ const WaterfallFlowItem = (props) => {
|
|
119
119
|
react_1.default.createElement("div", { className: 'list-content-listItem-info-price', style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.price, hidden: !priceText }, priceText))));
|
120
120
|
};
|
121
121
|
function WaterfallList(_a) {
|
122
|
-
var _b, _c, _d, _e, _f, _g, _h;
|
122
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
123
123
|
var { reportTagsView } = _a, props = tslib_1.__rest(_a, ["reportTagsView"]);
|
124
124
|
const { waterFallData, getRecommendVideos, hashTagSize, loadingImage, isOpenHashTag } = (0, hooks_1.useSxpDataSource)();
|
125
125
|
const [list, setList] = (0, react_1.useState)();
|
@@ -173,16 +173,18 @@ function WaterfallList(_a) {
|
|
173
173
|
};
|
174
174
|
return (react_1.default.createElement(react_1.default.Fragment, null, isLoadingData ? (react_1.default.createElement("div", { style: { height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },
|
175
175
|
react_1.default.createElement("img", { width: 64, height: 64, src: loadingImage, alt: 'loading...', style: { objectFit: 'contain' } }))) : (react_1.default.createElement("div", { className: 'list' },
|
176
|
-
react_1.default.createElement("div", { className: 'list-scroll', ref: containerRef,
|
177
|
-
|
178
|
-
} },
|
179
|
-
react_1.default.createElement("div", { className: 'list-info', style: (_c = props === null || props === void 0 ? void 0 : props.textStyles) === null || _c === void 0 ? void 0 : _c.hashTagDesc }, (_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.info),
|
180
|
-
react_1.default.createElement("div", { hidden: !((_e = data === null || data === void 0 ? void 0 : data.tag) === null || _e === void 0 ? void 0 : _e.link), className: 'list-collection', onClick: handleClickLink, style: { marginBottom: props === null || props === void 0 ? void 0 : props.space } }, ((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.linkTitle) || 'Shop the collection'),
|
176
|
+
react_1.default.createElement("div", { className: 'list-scroll', ref: containerRef },
|
177
|
+
react_1.default.createElement("div", { className: 'list-info', style: (_b = props === null || props === void 0 ? void 0 : props.textStyles) === null || _b === void 0 ? void 0 : _b.hashTagDesc }, (_c = data === null || data === void 0 ? void 0 : data.tag) === null || _c === void 0 ? void 0 : _c.info),
|
178
|
+
react_1.default.createElement("div", { hidden: !((_d = data === null || data === void 0 ? void 0 : data.tag) === null || _d === void 0 ? void 0 : _d.link), className: 'list-collection', onClick: handleClickLink, style: Object.assign(Object.assign({}, (_e = props === null || props === void 0 ? void 0 : props.textStyles) === null || _e === void 0 ? void 0 : _e.hashTagLink), { marginBottom: props === null || props === void 0 ? void 0 : props.space }) }, ((_f = data === null || data === void 0 ? void 0 : data.tag) === null || _f === void 0 ? void 0 : _f.linkTitle) || 'Shop the collection'),
|
181
179
|
react_1.default.createElement("div", { className: 'list-content' }, list === null || list === void 0 ? void 0 : list.map((item, ind) => {
|
182
180
|
return (react_1.default.createElement(WaterfallFlowItem, Object.assign({ key: ind, index: ind, rec: item, list: list, reportTagsView: reportTagsView }, props)));
|
183
181
|
})),
|
184
|
-
react_1.default.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading...")
|
185
|
-
|
186
|
-
|
182
|
+
react_1.default.createElement("div", { hidden: !isLoadMore, style: { textAlign: 'center' } }, "loading..."),
|
183
|
+
react_1.default.createElement("div", { style: {
|
184
|
+
height: ((_g = data === null || data === void 0 ? void 0 : data.tag) === null || _g === void 0 ? void 0 : _g.link) ? ((_h = props === null || props === void 0 ? void 0 : props.buttonBgStyle) === null || _h === void 0 ? void 0 : _h.height) || ((_j = props === null || props === void 0 ? void 0 : props.buttonStyle) === null || _j === void 0 ? void 0 : _j.height) || '100px' : 0
|
185
|
+
} })),
|
186
|
+
react_1.default.createElement("div", { className: 'list-bottom', style: props === null || props === void 0 ? void 0 : props.buttonBgStyle }),
|
187
|
+
react_1.default.createElement("div", { className: 'list-btn-wrap', style: Object.assign(Object.assign({}, props === null || props === void 0 ? void 0 : props.buttonBgStyle), { height: 'auto', backgroundColor: 'transparent' }) },
|
188
|
+
react_1.default.createElement("button", { className: 'list-btn', style: props === null || props === void 0 ? void 0 : props.buttonStyle, onClick: handleClickLink }, ((_k = data === null || data === void 0 ? void 0 : data.tag) === null || _k === void 0 ? void 0 : _k.linkTitle) || 'Shop the collection'))))));
|
187
189
|
}
|
188
190
|
exports.default = WaterfallList;
|
@@ -5,6 +5,8 @@ export type postConfigType = {
|
|
5
5
|
mode?: '1' | '2';
|
6
6
|
offsetTop?: number;
|
7
7
|
delay?: number;
|
8
|
+
bgWay?: '1' | '2';
|
9
|
+
bgColor?: string;
|
8
10
|
};
|
9
11
|
export interface ISxpPageRenderProps {
|
10
12
|
globalConfig?: {
|
@@ -61,6 +63,7 @@ export interface ISxpPageRenderProps {
|
|
61
63
|
ctaType?: string;
|
62
64
|
_schema?: any;
|
63
65
|
hashTagStyle?: CSSProperties;
|
66
|
+
licenseUrl?: String;
|
64
67
|
}
|
65
68
|
declare const SxpPageRender: FC<ISxpPageRenderProps>;
|
66
69
|
export default SxpPageRender;
|
@@ -25,7 +25,7 @@ const useEventReport_1 = require("../../../core/hooks/useEventReport");
|
|
25
25
|
const withBindDataSource_1 = tslib_1.__importDefault(require("../../../core/hoc/withBindDataSource"));
|
26
26
|
const localStore_1 = require("../../../core/utils/localStore");
|
27
27
|
const Tagbar_1 = tslib_1.__importDefault(require("./Tagbar"));
|
28
|
-
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [] }) => {
|
28
|
+
const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.innerHeight, containerWidth = window.innerWidth, tempMap, resolver, data = [], ctaType, tipText, nudge, _schema, hashTagStyle, tagList = [], licenseUrl }) => {
|
29
29
|
var _a, _b, _c, _d, _e, _f, _g;
|
30
30
|
const { schema } = (0, hooks_1.useEditor)();
|
31
31
|
const [activeIndex, setActiveIndex] = (0, react_1.useState)(0);
|
@@ -79,7 +79,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
79
79
|
if (!firstRef.current && !videoRef) {
|
80
80
|
firstRef.current = true;
|
81
81
|
const player = TCPlayer('player-container-id', {
|
82
|
-
licenseUrl
|
82
|
+
licenseUrl,
|
83
83
|
controls: false,
|
84
84
|
autoplay: false,
|
85
85
|
loop: false,
|
@@ -92,7 +92,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
92
92
|
setVideoRef(player);
|
93
93
|
});
|
94
94
|
}
|
95
|
-
}, [videoRef]);
|
95
|
+
}, [videoRef, licenseUrl]);
|
96
96
|
(0, react_1.useEffect)(() => {
|
97
97
|
if (!isInit)
|
98
98
|
handleH5EnterLink();
|
@@ -6,9 +6,11 @@ export interface IHashTagProps {
|
|
6
6
|
textStyles: {
|
7
7
|
hashTagTitle: CSSProperties;
|
8
8
|
hashTagDesc: CSSProperties;
|
9
|
+
hashTagLink: CSSProperties;
|
9
10
|
title: CSSProperties;
|
10
11
|
price: CSSProperties;
|
11
12
|
};
|
13
|
+
buttonBgStyle: CSSProperties;
|
12
14
|
}
|
13
15
|
declare const _default: React.NamedExoticComponent<IHashTagProps>;
|
14
16
|
export default _default;
|