@gravity-ui/page-constructor 4.35.0 → 4.36.0-alpha.0
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/build/cjs/blocks/Tabs/Tabs.css +3 -33
- package/build/cjs/blocks/Tabs/Tabs.js +21 -18
- package/build/cjs/blocks/Tabs/TabsTextContent/TabsTextContent.css +20 -0
- package/build/cjs/blocks/Tabs/TabsTextContent/TabsTextContent.d.ts +10 -0
- package/build/cjs/blocks/Tabs/TabsTextContent/TabsTextContent.js +17 -0
- package/build/cjs/components/Image/Image.d.ts +2 -1
- package/build/cjs/components/Image/Image.js +2 -2
- package/build/cjs/components/ImageBase/ImageBase.d.ts +2 -1
- package/build/cjs/components/Media/Image/Image.d.ts +1 -0
- package/build/cjs/components/Media/Image/Image.js +2 -2
- package/build/cjs/components/Media/Media.js +4 -3
- package/build/cjs/components/VideoBlock/VideoBlock.d.ts +1 -0
- package/build/cjs/components/VideoBlock/VideoBlock.js +2 -2
- package/build/esm/blocks/Tabs/Tabs.css +3 -33
- package/build/esm/blocks/Tabs/Tabs.js +22 -19
- package/build/esm/blocks/Tabs/TabsTextContent/TabsTextContent.css +20 -0
- package/build/esm/blocks/Tabs/TabsTextContent/TabsTextContent.d.ts +11 -0
- package/build/esm/blocks/Tabs/TabsTextContent/TabsTextContent.js +13 -0
- package/build/esm/components/Image/Image.d.ts +2 -1
- package/build/esm/components/Image/Image.js +3 -3
- package/build/esm/components/ImageBase/ImageBase.d.ts +2 -1
- package/build/esm/components/Media/Image/Image.d.ts +1 -0
- package/build/esm/components/Media/Image/Image.js +2 -2
- package/build/esm/components/Media/Media.js +4 -3
- package/build/esm/components/VideoBlock/VideoBlock.d.ts +1 -0
- package/build/esm/components/VideoBlock/VideoBlock.js +2 -2
- package/package.json +1 -1
- package/widget/index.js +1 -1
|
@@ -17,6 +17,7 @@ export interface VideoBlockProps extends AnalyticsEventsBase {
|
|
|
17
17
|
height?: number;
|
|
18
18
|
fullscreen?: boolean;
|
|
19
19
|
autoplay?: boolean;
|
|
20
|
+
handleImageLoad?: () => void;
|
|
20
21
|
}
|
|
21
22
|
declare const VideoBlock: (props: VideoBlockProps) => JSX.Element | null;
|
|
22
23
|
export default VideoBlock;
|
|
@@ -37,7 +37,7 @@ export function getHeight(width) {
|
|
|
37
37
|
return (width / 16) * 9;
|
|
38
38
|
}
|
|
39
39
|
const VideoBlock = (props) => {
|
|
40
|
-
const { stream, record, attributes, className, id, previewImg, playButton, height, fullscreen, analyticsEvents, autoplay, } = props;
|
|
40
|
+
const { stream, record, attributes, className, id, previewImg, playButton, height, fullscreen, analyticsEvents, autoplay, handleImageLoad, } = props;
|
|
41
41
|
const handleAnalytics = useAnalytics(DefaultEventNames.VideoPreview);
|
|
42
42
|
const src = getVideoSrc(stream, record);
|
|
43
43
|
const ref = useRef(null);
|
|
@@ -91,7 +91,7 @@ const VideoBlock = (props) => {
|
|
|
91
91
|
return null;
|
|
92
92
|
}
|
|
93
93
|
return (React.createElement("div", { className: b(null, className), ref: ref, style: { height: currentHeight } }, previewImg && !hidePreview && !fullscreen && (React.createElement("div", { className: b('preview'), onClick: onPreviewClick },
|
|
94
|
-
React.createElement(Image, { src: previewImg, className: b('image'), containerClassName: b('image-wrapper') }),
|
|
94
|
+
React.createElement(Image, { src: previewImg, className: b('image'), containerClassName: b('image-wrapper'), onLoad: handleImageLoad }),
|
|
95
95
|
playButton || (React.createElement("button", { title: "Play", className: b('button') },
|
|
96
96
|
React.createElement(Icon, { className: b('icon'), data: PlayVideo, size: 24 })))))));
|
|
97
97
|
};
|