@gravity-ui/page-constructor 4.36.0-alpha.1 → 4.36.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/Companies/Companies.css +0 -16
- package/build/cjs/blocks/Companies/Companies.d.ts +1 -1
- package/build/cjs/blocks/Companies/Companies.js +2 -2
- package/build/cjs/blocks/Tabs/Tabs.css +37 -3
- package/build/cjs/blocks/Tabs/Tabs.js +18 -21
- package/build/cjs/components/Image/Image.d.ts +1 -2
- package/build/cjs/components/Image/Image.js +2 -2
- package/build/cjs/components/ImageBase/ImageBase.d.ts +1 -2
- package/build/cjs/components/Media/Image/Image.d.ts +0 -1
- package/build/cjs/components/Media/Image/Image.js +2 -2
- package/build/cjs/components/Media/Media.js +3 -4
- package/build/cjs/components/VideoBlock/VideoBlock.d.ts +0 -1
- package/build/cjs/components/VideoBlock/VideoBlock.js +2 -2
- package/build/cjs/constructor-items.d.ts +1 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +1 -0
- package/build/cjs/text-transform/config.js +1 -0
- package/build/esm/blocks/Companies/Companies.css +0 -16
- package/build/esm/blocks/Companies/Companies.d.ts +1 -1
- package/build/esm/blocks/Companies/Companies.js +3 -3
- package/build/esm/blocks/Tabs/Tabs.css +37 -3
- package/build/esm/blocks/Tabs/Tabs.js +19 -22
- package/build/esm/components/Image/Image.d.ts +1 -2
- package/build/esm/components/Image/Image.js +3 -3
- package/build/esm/components/ImageBase/ImageBase.d.ts +1 -2
- package/build/esm/components/Media/Image/Image.d.ts +0 -1
- package/build/esm/components/Media/Image/Image.js +2 -2
- package/build/esm/components/Media/Media.js +3 -4
- package/build/esm/components/VideoBlock/VideoBlock.d.ts +0 -1
- package/build/esm/components/VideoBlock/VideoBlock.js +2 -2
- package/build/esm/constructor-items.d.ts +1 -1
- package/build/esm/models/constructor-items/blocks.d.ts +1 -0
- package/build/esm/text-transform/config.js +1 -0
- package/package.json +1 -1
- package/server/models/constructor-items/blocks.d.ts +1 -0
- package/server/text-transform/config.js +1 -0
- package/widget/index.js +1 -1
- package/build/cjs/blocks/Tabs/TabsTextContent/TabsTextContent.css +0 -24
- package/build/cjs/blocks/Tabs/TabsTextContent/TabsTextContent.d.ts +0 -10
- package/build/cjs/blocks/Tabs/TabsTextContent/TabsTextContent.js +0 -17
- package/build/esm/blocks/Tabs/TabsTextContent/TabsTextContent.css +0 -24
- package/build/esm/blocks/Tabs/TabsTextContent/TabsTextContent.d.ts +0 -11
- package/build/esm/blocks/Tabs/TabsTextContent/TabsTextContent.js +0 -13
|
@@ -12,7 +12,7 @@ import './Image.css';
|
|
|
12
12
|
const b = block('media-component-image');
|
|
13
13
|
export const defaultAnimatedDivQa = 'animated-div';
|
|
14
14
|
const Image = (props) => {
|
|
15
|
-
const { parallax, image, height, imageClassName, isBackground, hasVideoFallback, video, fullscreen, qa,
|
|
15
|
+
const { parallax, image, height, imageClassName, isBackground, hasVideoFallback, video, fullscreen, qa, } = props;
|
|
16
16
|
const qaAttributes = getQaAttrubutes(qa, 'fullscreen-image', 'animate', 'background-image', 'image-view', 'slider-block');
|
|
17
17
|
const [scrollY, setScrollY] = useState(0);
|
|
18
18
|
const [{ springScrollY }, springSetScrollY] = useSpring(() => ({
|
|
@@ -46,7 +46,7 @@ const Image = (props) => {
|
|
|
46
46
|
};
|
|
47
47
|
const imageOnly = (oneImage) => {
|
|
48
48
|
const imageData = getMediaImage(oneImage);
|
|
49
|
-
return (React.createElement(ImageView, Object.assign({}, imageData, { className: imageClass, style: { height }, qa: qaAttributes.imageView
|
|
49
|
+
return (React.createElement(ImageView, Object.assign({}, imageData, { className: imageClass, style: { height }, qa: qaAttributes.imageView })));
|
|
50
50
|
};
|
|
51
51
|
const imageSlider = (imageArray) => {
|
|
52
52
|
const fullscreenItem = fullscreen === undefined || fullscreen;
|
|
@@ -8,13 +8,13 @@ import Video from './Video/Video';
|
|
|
8
8
|
import './Media.css';
|
|
9
9
|
const b = block('Media');
|
|
10
10
|
export const Media = (props) => {
|
|
11
|
-
const { image, video, youtube, dataLens, color, height, previewImg, parallax = false, metrika, fullscreen, analyticsEvents, className, imageClassName, videoClassName, youtubeClassName, playVideo = true, isBackground, playButton, customBarControlsClassName, qa, ratio, autoplay,
|
|
11
|
+
const { image, video, youtube, dataLens, color, height, previewImg, parallax = false, metrika, fullscreen, analyticsEvents, className, imageClassName, videoClassName, youtubeClassName, playVideo = true, isBackground, playButton, customBarControlsClassName, qa, ratio, autoplay, } = props;
|
|
12
12
|
const [hasVideoFallback, setHasVideoFallback] = useState(false);
|
|
13
13
|
const qaAttributes = getQaAttrubutes(qa, 'video');
|
|
14
14
|
const content = useMemo(() => {
|
|
15
15
|
let result = [];
|
|
16
16
|
if (image) {
|
|
17
|
-
result.push(React.createElement(Image, { key: "image", parallax: parallax, image: image, height: height, imageClassName: imageClassName, isBackground: isBackground, video: video, hasVideoFallback: hasVideoFallback, fullscreen: fullscreen, qa: qaAttributes.image
|
|
17
|
+
result.push(React.createElement(Image, { key: "image", parallax: parallax, image: image, height: height, imageClassName: imageClassName, isBackground: isBackground, video: video, hasVideoFallback: hasVideoFallback, fullscreen: fullscreen, qa: qaAttributes.image }));
|
|
18
18
|
}
|
|
19
19
|
if (video) {
|
|
20
20
|
const videoProps = {
|
|
@@ -40,7 +40,7 @@ export const Media = (props) => {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
if (youtube) {
|
|
43
|
-
result = (React.createElement(YoutubeBlock, { className: b('youtube', youtubeClassName), record: youtube, attributes: { color: 'white', rel: '0' }, previewImg: previewImg, height: height, fullscreen: fullscreen, analyticsEvents: analyticsEvents, autoplay: autoplay
|
|
43
|
+
result = (React.createElement(YoutubeBlock, { className: b('youtube', youtubeClassName), record: youtube, attributes: { color: 'white', rel: '0' }, previewImg: previewImg, height: height, fullscreen: fullscreen, analyticsEvents: analyticsEvents, autoplay: autoplay }));
|
|
44
44
|
}
|
|
45
45
|
if (dataLens) {
|
|
46
46
|
result = React.createElement(DataLens, { dataLens: dataLens });
|
|
@@ -69,7 +69,6 @@ export const Media = (props) => {
|
|
|
69
69
|
ratio,
|
|
70
70
|
youtubeClassName,
|
|
71
71
|
autoplay,
|
|
72
|
-
handleImageLoad,
|
|
73
72
|
]);
|
|
74
73
|
return (React.createElement("div", { className: b(null, className), style: { backgroundColor: color }, "data-qa": qa }, content));
|
|
75
74
|
};
|
|
@@ -17,7 +17,6 @@ export interface VideoBlockProps extends AnalyticsEventsBase {
|
|
|
17
17
|
height?: number;
|
|
18
18
|
fullscreen?: boolean;
|
|
19
19
|
autoplay?: boolean;
|
|
20
|
-
handleImageLoad?: () => void;
|
|
21
20
|
}
|
|
22
21
|
declare const VideoBlock: (props: VideoBlockProps) => JSX.Element | null;
|
|
23
22
|
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,
|
|
40
|
+
const { stream, record, attributes, className, id, previewImg, playButton, height, fullscreen, analyticsEvents, autoplay, } = 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') }),
|
|
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
|
};
|
|
@@ -4,7 +4,7 @@ export declare const blockMap: {
|
|
|
4
4
|
"promo-features-block": (props: import("./models").PromoFeaturesProps) => JSX.Element;
|
|
5
5
|
"questions-block": (props: import("./models").QuestionsProps) => JSX.Element;
|
|
6
6
|
"banner-block": (props: import("./models").BannerBlockProps) => JSX.Element;
|
|
7
|
-
"companies-block": ({ title, images, animated }: import("./models").CompaniesBlockProps) => JSX.Element;
|
|
7
|
+
"companies-block": ({ title, description, images, animated }: import("./models").CompaniesBlockProps) => JSX.Element;
|
|
8
8
|
"media-block": (props: import("./models").MediaBlockProps) => JSX.Element;
|
|
9
9
|
"info-block": (props: import("./models").InfoBlockProps) => JSX.Element;
|
|
10
10
|
"table-block": (props: import("./models").TableBlockProps) => JSX.Element;
|
|
@@ -154,6 +154,7 @@ export interface BannerBlockProps extends BannerCardProps, Animatable {
|
|
|
154
154
|
}
|
|
155
155
|
export interface CompaniesBlockProps extends Animatable {
|
|
156
156
|
title: string;
|
|
157
|
+
description?: string;
|
|
157
158
|
images: ThemeSupporting<ImageDeviceProps>;
|
|
158
159
|
}
|
|
159
160
|
export interface MediaBaseBlockProps extends Animatable, MediaContentProps {
|
package/package.json
CHANGED
|
@@ -154,6 +154,7 @@ export interface BannerBlockProps extends BannerCardProps, Animatable {
|
|
|
154
154
|
}
|
|
155
155
|
export interface CompaniesBlockProps extends Animatable {
|
|
156
156
|
title: string;
|
|
157
|
+
description?: string;
|
|
157
158
|
images: ThemeSupporting<ImageDeviceProps>;
|
|
158
159
|
}
|
|
159
160
|
export interface MediaBaseBlockProps extends Animatable, MediaContentProps {
|