pb-sxp-ui 1.20.14 → 1.20.15
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 +940 -212
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +73 -72
- package/dist/index.js +940 -213
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +7 -7
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +7 -7
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +940 -212
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +7 -7
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/DiyStoryPreview/index.js +10 -4
- package/es/core/components/StructurePage/index.d.ts +89 -0
- package/es/core/components/StructurePage/index.js +700 -0
- package/es/core/components/SxpPageRender/fakeData.js +1 -1
- package/es/core/components/SxpPageRender/index.js +10 -4
- package/es/core/context/SxpDataSourceProvider.js +4 -1
- package/es/core/hooks/useVisibleHeight.js +7 -7
- package/es/core/index.d.ts +2 -0
- package/es/core/index.js +1 -0
- package/es/core/utils/materials.d.ts +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/materials/sxp/MultiPosts/index.js +4 -4
- package/es/materials/sxp/popup/CommodityDetail/index.js +4 -4
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/lib/core/components/DiyStoryPreview/index.js +10 -4
- package/lib/core/components/StructurePage/index.d.ts +89 -0
- package/lib/core/components/StructurePage/index.js +702 -0
- package/lib/core/components/SxpPageRender/fakeData.js +1 -1
- package/lib/core/components/SxpPageRender/index.js +10 -4
- package/lib/core/context/SxpDataSourceProvider.js +4 -1
- package/lib/core/hooks/useVisibleHeight.js +7 -7
- package/lib/core/index.d.ts +2 -0
- package/lib/core/index.js +6 -1
- package/lib/core/utils/materials.d.ts +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/materials/sxp/MultiPosts/index.js +4 -4
- package/lib/materials/sxp/popup/CommodityDetail/index.js +4 -4
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
- package/package.json +111 -111
|
@@ -207,10 +207,16 @@ const DiyStoryPreview = forwardRef(({ data = [], globalConfig, tipText, nudge, t
|
|
|
207
207
|
}, [handleSessionExpire, disabledListener]);
|
|
208
208
|
return (React.createElement("div", { id: 'sxp-render', style: { height: containerHeight, position: 'relative', pointerEvents } },
|
|
209
209
|
React.createElement(Swiper, { ref: swiperRef, allowTouchMove: pointerEvents !== 'none', onSlideChange: () => {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
swiperRef.current.swiper.allowTouchMove =
|
|
213
|
-
|
|
210
|
+
var _a;
|
|
211
|
+
if ((_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) {
|
|
212
|
+
swiperRef.current.swiper.allowTouchMove = false;
|
|
213
|
+
setTimeout(() => {
|
|
214
|
+
var _a;
|
|
215
|
+
if ((_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) {
|
|
216
|
+
swiperRef.current.swiper.allowTouchMove = true;
|
|
217
|
+
}
|
|
218
|
+
}, 500);
|
|
219
|
+
}
|
|
214
220
|
}, onActiveIndexChange: (swiper) => {
|
|
215
221
|
setCurIndex(swiper === null || swiper === void 0 ? void 0 : swiper.activeIndex);
|
|
216
222
|
onActiveChange === null || onActiveChange === void 0 ? void 0 : onActiveChange(swiper.activeIndex);
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { FC, CSSProperties } from 'react';
|
|
2
|
+
export interface IPostData {
|
|
3
|
+
traceInfo: string;
|
|
4
|
+
itemId: string;
|
|
5
|
+
tags?: string[] | null;
|
|
6
|
+
cover?: string | null;
|
|
7
|
+
url?: string | null;
|
|
8
|
+
title?: string | null;
|
|
9
|
+
imgUrls?: string[] | null;
|
|
10
|
+
text?: string;
|
|
11
|
+
bindCta?: {
|
|
12
|
+
title: string;
|
|
13
|
+
link?: string | null;
|
|
14
|
+
} | null;
|
|
15
|
+
bindProduct?: any;
|
|
16
|
+
bindProducts?: any[];
|
|
17
|
+
scene?: {
|
|
18
|
+
cta?: string;
|
|
19
|
+
position?: number;
|
|
20
|
+
type?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface IProductData {
|
|
24
|
+
traceInfo: string;
|
|
25
|
+
itemId: string;
|
|
26
|
+
title: string;
|
|
27
|
+
cover: string;
|
|
28
|
+
homePage: string[];
|
|
29
|
+
price: number;
|
|
30
|
+
currency: string;
|
|
31
|
+
link?: string | null;
|
|
32
|
+
info?: string;
|
|
33
|
+
description?: string | null;
|
|
34
|
+
text?: string | null;
|
|
35
|
+
landingImageUrl?: string;
|
|
36
|
+
position?: string | null;
|
|
37
|
+
bindCta?: {
|
|
38
|
+
title: string;
|
|
39
|
+
link?: string | null;
|
|
40
|
+
} | null;
|
|
41
|
+
}
|
|
42
|
+
export interface IMultiCtaData {
|
|
43
|
+
heroSection?: IPostData;
|
|
44
|
+
carouselSection?: IPostData[];
|
|
45
|
+
highlightRevealSection?: IProductData;
|
|
46
|
+
productGridSection?: IProductData[];
|
|
47
|
+
footerSection?: IProductData;
|
|
48
|
+
}
|
|
49
|
+
export interface IApiResponse {
|
|
50
|
+
code: string;
|
|
51
|
+
message: string;
|
|
52
|
+
data: {
|
|
53
|
+
recList?: Array<{
|
|
54
|
+
position: number;
|
|
55
|
+
video: any;
|
|
56
|
+
product: any;
|
|
57
|
+
multiCta: IMultiCtaData;
|
|
58
|
+
isCollected: boolean;
|
|
59
|
+
}>;
|
|
60
|
+
channel?: string;
|
|
61
|
+
productUserId?: string;
|
|
62
|
+
multiCta?: IMultiCtaData;
|
|
63
|
+
position?: number;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export interface IStructurePageProps {
|
|
67
|
+
containerStyle?: CSSProperties;
|
|
68
|
+
containerHeight?: number;
|
|
69
|
+
containerWidth?: number;
|
|
70
|
+
className?: string;
|
|
71
|
+
apiUrl?: string;
|
|
72
|
+
requestBody?: {
|
|
73
|
+
maxSize?: number;
|
|
74
|
+
defaultSize?: number;
|
|
75
|
+
type?: string;
|
|
76
|
+
channel?: string;
|
|
77
|
+
productUserId?: string;
|
|
78
|
+
[key: string]: any;
|
|
79
|
+
};
|
|
80
|
+
editorMode?: boolean;
|
|
81
|
+
multiCTAConfig?: Record<string, any>;
|
|
82
|
+
videoPlayIcon?: string;
|
|
83
|
+
isCmsMode?: boolean;
|
|
84
|
+
storyId?: string;
|
|
85
|
+
customHeaders?: Record<string, string>;
|
|
86
|
+
[key: string]: any;
|
|
87
|
+
}
|
|
88
|
+
declare const StructurePage: FC<IStructurePageProps>;
|
|
89
|
+
export default StructurePage;
|