pb-sxp-ui 1.20.13 → 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.
Files changed (62) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +111 -111
  3. package/dist/index.cjs +1187 -383
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.css +73 -72
  6. package/dist/index.js +1187 -384
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.min.cjs +7 -7
  9. package/dist/index.min.cjs.map +1 -1
  10. package/dist/index.min.js +7 -7
  11. package/dist/index.min.js.map +1 -1
  12. package/dist/pb-ui.js +1187 -383
  13. package/dist/pb-ui.js.map +1 -1
  14. package/dist/pb-ui.min.js +7 -7
  15. package/dist/pb-ui.min.js.map +1 -1
  16. package/es/core/components/DiyPortalPreview/VideoWidget.js +10 -8
  17. package/es/core/components/DiyStoryPreview/index.js +10 -4
  18. package/es/core/components/StructurePage/index.d.ts +89 -0
  19. package/es/core/components/StructurePage/index.js +700 -0
  20. package/es/core/components/SxpPageRender/LikeButton/index.js +20 -18
  21. package/es/core/components/SxpPageRender/PictureGroup/index.d.ts +5 -0
  22. package/es/core/components/SxpPageRender/PictureGroup/index.js +39 -13
  23. package/es/core/components/SxpPageRender/VideoWidget/index.js +33 -46
  24. package/es/core/components/SxpPageRender/WaterFall/index.js +4 -3
  25. package/es/core/components/SxpPageRender/fakeData.js +1 -1
  26. package/es/core/components/SxpPageRender/index.js +66 -44
  27. package/es/core/context/SxpDataSourceProvider.d.ts +5 -12
  28. package/es/core/context/SxpDataSourceProvider.js +84 -38
  29. package/es/core/hooks/useEventReport.js +6 -5
  30. package/es/core/hooks/useVisibleHeight.js +7 -7
  31. package/es/core/index.d.ts +2 -0
  32. package/es/core/index.js +1 -0
  33. package/es/core/utils/materials.d.ts +1 -1
  34. package/es/index.d.ts +1 -0
  35. package/es/index.js +1 -0
  36. package/es/materials/sxp/MultiPosts/index.js +4 -4
  37. package/es/materials/sxp/popup/CommodityDetail/index.js +4 -4
  38. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
  39. package/lib/core/components/DiyPortalPreview/VideoWidget.js +10 -8
  40. package/lib/core/components/DiyStoryPreview/index.js +10 -4
  41. package/lib/core/components/StructurePage/index.d.ts +89 -0
  42. package/lib/core/components/StructurePage/index.js +702 -0
  43. package/lib/core/components/SxpPageRender/LikeButton/index.js +20 -18
  44. package/lib/core/components/SxpPageRender/PictureGroup/index.d.ts +5 -0
  45. package/lib/core/components/SxpPageRender/PictureGroup/index.js +38 -12
  46. package/lib/core/components/SxpPageRender/VideoWidget/index.js +33 -46
  47. package/lib/core/components/SxpPageRender/WaterFall/index.js +4 -3
  48. package/lib/core/components/SxpPageRender/fakeData.js +1 -1
  49. package/lib/core/components/SxpPageRender/index.js +66 -44
  50. package/lib/core/context/SxpDataSourceProvider.d.ts +5 -12
  51. package/lib/core/context/SxpDataSourceProvider.js +84 -38
  52. package/lib/core/hooks/useEventReport.js +6 -5
  53. package/lib/core/hooks/useVisibleHeight.js +7 -7
  54. package/lib/core/index.d.ts +2 -0
  55. package/lib/core/index.js +6 -1
  56. package/lib/core/utils/materials.d.ts +1 -1
  57. package/lib/index.d.ts +1 -0
  58. package/lib/index.js +3 -1
  59. package/lib/materials/sxp/MultiPosts/index.js +4 -4
  60. package/lib/materials/sxp/popup/CommodityDetail/index.js +4 -4
  61. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +1 -1
  62. package/package.json +111 -111
@@ -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;