@gravity-ui/page-constructor 5.8.0 → 5.9.1
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/Header/schema.d.ts +9 -0
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +3 -0
- package/build/cjs/blocks/Media/schema.d.ts +6 -0
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +3 -0
- package/build/cjs/blocks/Tabs/schema.d.ts +3 -0
- package/build/cjs/components/IconWrapper/IconWrapper.css +3 -0
- package/build/cjs/components/IconWrapper/IconWrapper.js +1 -1
- package/build/cjs/components/Media/Image/Image.js +4 -1
- package/build/cjs/components/Media/Media.js +3 -2
- package/build/cjs/models/constructor-items/common.d.ts +1 -0
- package/build/cjs/schema/constants.d.ts +3 -0
- package/build/cjs/schema/validators/common.d.ts +3 -0
- package/build/cjs/schema/validators/common.js +3 -0
- package/build/cjs/sub-blocks/Content/Content.css +2 -2
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +3 -0
- package/build/cjs/sub-blocks/MediaCard/schema.d.ts +3 -0
- package/build/esm/blocks/Header/schema.d.ts +9 -0
- package/build/esm/blocks/HeaderSlider/schema.d.ts +3 -0
- package/build/esm/blocks/Media/schema.d.ts +6 -0
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +3 -0
- package/build/esm/blocks/Tabs/schema.d.ts +3 -0
- package/build/esm/components/IconWrapper/IconWrapper.css +3 -0
- package/build/esm/components/IconWrapper/IconWrapper.js +1 -1
- package/build/esm/components/Media/Image/Image.js +4 -1
- package/build/esm/components/Media/Media.js +3 -2
- package/build/esm/models/constructor-items/common.d.ts +1 -0
- package/build/esm/schema/constants.d.ts +3 -0
- package/build/esm/schema/validators/common.d.ts +3 -0
- package/build/esm/schema/validators/common.js +3 -0
- package/build/esm/sub-blocks/Content/Content.css +2 -2
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +3 -0
- package/build/esm/sub-blocks/MediaCard/schema.d.ts +3 -0
- package/package.json +1 -1
- package/server/models/constructor-items/common.d.ts +1 -0
- package/widget/index.js +1 -1
|
@@ -48,6 +48,9 @@ export declare const HeaderBackgroundProps: {
|
|
|
48
48
|
optionName: string;
|
|
49
49
|
})[];
|
|
50
50
|
};
|
|
51
|
+
disableImageSliderForArrayInput: {
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
51
54
|
video: {
|
|
52
55
|
type: string;
|
|
53
56
|
additionalProperties: boolean;
|
|
@@ -508,6 +511,9 @@ export declare const HeaderProperties: {
|
|
|
508
511
|
optionName: string;
|
|
509
512
|
})[];
|
|
510
513
|
};
|
|
514
|
+
disableImageSliderForArrayInput: {
|
|
515
|
+
type: string;
|
|
516
|
+
};
|
|
511
517
|
video: {
|
|
512
518
|
type: string;
|
|
513
519
|
additionalProperties: boolean;
|
|
@@ -1017,6 +1023,9 @@ export declare const HeaderBlock: {
|
|
|
1017
1023
|
optionName: string;
|
|
1018
1024
|
})[];
|
|
1019
1025
|
};
|
|
1026
|
+
disableImageSliderForArrayInput: {
|
|
1027
|
+
type: string;
|
|
1028
|
+
};
|
|
1020
1029
|
video: {
|
|
1021
1030
|
type: string;
|
|
1022
1031
|
additionalProperties: boolean;
|
|
@@ -42,6 +42,9 @@ export declare const Media: {
|
|
|
42
42
|
optionName: string;
|
|
43
43
|
})[];
|
|
44
44
|
};
|
|
45
|
+
disableImageSliderForArrayInput: {
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
45
48
|
video: {
|
|
46
49
|
type: string;
|
|
47
50
|
additionalProperties: boolean;
|
|
@@ -632,6 +635,9 @@ export declare const MediaBlock: {
|
|
|
632
635
|
optionName: string;
|
|
633
636
|
})[];
|
|
634
637
|
};
|
|
638
|
+
disableImageSliderForArrayInput: {
|
|
639
|
+
type: string;
|
|
640
|
+
};
|
|
635
641
|
video: {
|
|
636
642
|
type: string;
|
|
637
643
|
additionalProperties: boolean;
|
|
@@ -14,7 +14,7 @@ const IconWrapper = (props) => {
|
|
|
14
14
|
const iconProps = (0, utils_2.getMediaImage)(icon.value);
|
|
15
15
|
const iconPosition = icon === null || icon === void 0 ? void 0 : icon.position;
|
|
16
16
|
return (react_1.default.createElement("div", { className: b({ ['icon-position']: iconPosition }) },
|
|
17
|
-
iconProps && (react_1.default.createElement(Image_1.default, Object.assign({}, iconProps, { className: b('icon', { ['icon-position']: iconPosition }) }))),
|
|
17
|
+
iconProps && (react_1.default.createElement(Image_1.default, Object.assign({}, iconProps, { containerClassName: b('icon-container'), className: b('icon', { ['icon-position']: iconPosition }) }))),
|
|
18
18
|
react_1.default.createElement("div", { className: b({ ['content']: iconPosition }) }, children)));
|
|
19
19
|
};
|
|
20
20
|
exports.default = IconWrapper;
|
|
@@ -15,7 +15,10 @@ const utils_2 = require("./utils");
|
|
|
15
15
|
const b = (0, utils_1.block)('media-component-image');
|
|
16
16
|
exports.defaultAnimatedDivQa = 'animated-div';
|
|
17
17
|
const Image = (props) => {
|
|
18
|
-
const { parallax,
|
|
18
|
+
const { parallax, height, imageClassName, isBackground, hasVideoFallback, video, fullscreen, disableImageSliderForArrayInput, qa, onLoad, } = props;
|
|
19
|
+
const image = Array.isArray(props.image) && disableImageSliderForArrayInput
|
|
20
|
+
? props.image[0]
|
|
21
|
+
: props.image;
|
|
19
22
|
const qaAttributes = (0, utils_1.getQaAttrubutes)(qa, 'fullscreen-image', 'animate', 'background-image', 'image-view', 'slider-block');
|
|
20
23
|
const [scrollY, setScrollY] = (0, react_1.useState)(0);
|
|
21
24
|
const [{ springScrollY }, springSetScrollY] = (0, web_1.useSpring)(() => ({
|
|
@@ -12,13 +12,13 @@ const Image_1 = tslib_1.__importDefault(require("./Image/Image"));
|
|
|
12
12
|
const Video_1 = tslib_1.__importDefault(require("./Video/Video"));
|
|
13
13
|
const b = (0, utils_1.block)('Media');
|
|
14
14
|
const Media = (props) => {
|
|
15
|
-
const { image, video, youtube, dataLens, color, height, previewImg, parallax = false, fullscreen, analyticsEvents, className, imageClassName, videoClassName, youtubeClassName, playVideo = true, isBackground, playButton, customBarControlsClassName, qa, ratio, autoplay, onImageLoad, iframe, margins, } = props;
|
|
15
|
+
const { image, video, youtube, dataLens, color, height, previewImg, parallax = false, fullscreen, analyticsEvents, className, imageClassName, videoClassName, youtubeClassName, disableImageSliderForArrayInput, playVideo = true, isBackground, playButton, customBarControlsClassName, qa, ratio, autoplay, onImageLoad, iframe, margins, } = props;
|
|
16
16
|
const [hasVideoFallback, setHasVideoFallback] = (0, react_1.useState)(false);
|
|
17
17
|
const qaAttributes = (0, utils_1.getQaAttrubutes)(qa, 'video');
|
|
18
18
|
const content = (0, react_1.useMemo)(() => {
|
|
19
19
|
let result = [];
|
|
20
20
|
if (image) {
|
|
21
|
-
result.push(react_1.default.createElement(Image_1.default, { key: "image", parallax: parallax, image: image, height: height, imageClassName: imageClassName, isBackground: isBackground, video: video, hasVideoFallback: hasVideoFallback, fullscreen: fullscreen, qa: qaAttributes.image, onLoad: onImageLoad }));
|
|
21
|
+
result.push(react_1.default.createElement(Image_1.default, { key: "image", parallax: parallax, image: image, disableImageSliderForArrayInput: disableImageSliderForArrayInput, height: height, imageClassName: imageClassName, isBackground: isBackground, video: video, hasVideoFallback: hasVideoFallback, fullscreen: fullscreen, qa: qaAttributes.image, onLoad: onImageLoad }));
|
|
22
22
|
}
|
|
23
23
|
if (video) {
|
|
24
24
|
const videoProps = {
|
|
@@ -59,6 +59,7 @@ const Media = (props) => {
|
|
|
59
59
|
dataLens,
|
|
60
60
|
iframe,
|
|
61
61
|
parallax,
|
|
62
|
+
disableImageSliderForArrayInput,
|
|
62
63
|
height,
|
|
63
64
|
imageClassName,
|
|
64
65
|
isBackground,
|
|
@@ -85,7 +85,7 @@ unpredictable css rules order in build */
|
|
|
85
85
|
.pc-content_theme_dark .pc-content__title *,
|
|
86
86
|
.pc-content_theme_dark .pc-content__text .yfm,
|
|
87
87
|
.pc-content_theme_dark .pc-content__text .yfm *,
|
|
88
|
-
.pc-content_theme_dark .pc-
|
|
88
|
+
.pc-content_theme_dark .pc-content__links a {
|
|
89
89
|
color: var(--g-color-text-light-primary);
|
|
90
90
|
}
|
|
91
91
|
.pc-content_theme_dark .pc-content__notice .yfm,
|
|
@@ -117,7 +117,7 @@ unpredictable css rules order in build */
|
|
|
117
117
|
.pc-content_theme_light .pc-content__title *,
|
|
118
118
|
.pc-content_theme_light .pc-content__text .yfm,
|
|
119
119
|
.pc-content_theme_light .pc-content__text .yfm *,
|
|
120
|
-
.pc-content_theme_light .pc-
|
|
120
|
+
.pc-content_theme_light .pc-content__links a {
|
|
121
121
|
color: var(--g-color-text-dark-primary);
|
|
122
122
|
}
|
|
123
123
|
.pc-content_theme_light .pc-content__notice .yfm,
|
|
@@ -48,6 +48,9 @@ export declare const HeaderBackgroundProps: {
|
|
|
48
48
|
optionName: string;
|
|
49
49
|
})[];
|
|
50
50
|
};
|
|
51
|
+
disableImageSliderForArrayInput: {
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
51
54
|
video: {
|
|
52
55
|
type: string;
|
|
53
56
|
additionalProperties: boolean;
|
|
@@ -508,6 +511,9 @@ export declare const HeaderProperties: {
|
|
|
508
511
|
optionName: string;
|
|
509
512
|
})[];
|
|
510
513
|
};
|
|
514
|
+
disableImageSliderForArrayInput: {
|
|
515
|
+
type: string;
|
|
516
|
+
};
|
|
511
517
|
video: {
|
|
512
518
|
type: string;
|
|
513
519
|
additionalProperties: boolean;
|
|
@@ -1017,6 +1023,9 @@ export declare const HeaderBlock: {
|
|
|
1017
1023
|
optionName: string;
|
|
1018
1024
|
})[];
|
|
1019
1025
|
};
|
|
1026
|
+
disableImageSliderForArrayInput: {
|
|
1027
|
+
type: string;
|
|
1028
|
+
};
|
|
1020
1029
|
video: {
|
|
1021
1030
|
type: string;
|
|
1022
1031
|
additionalProperties: boolean;
|
|
@@ -42,6 +42,9 @@ export declare const Media: {
|
|
|
42
42
|
optionName: string;
|
|
43
43
|
})[];
|
|
44
44
|
};
|
|
45
|
+
disableImageSliderForArrayInput: {
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
45
48
|
video: {
|
|
46
49
|
type: string;
|
|
47
50
|
additionalProperties: boolean;
|
|
@@ -632,6 +635,9 @@ export declare const MediaBlock: {
|
|
|
632
635
|
optionName: string;
|
|
633
636
|
})[];
|
|
634
637
|
};
|
|
638
|
+
disableImageSliderForArrayInput: {
|
|
639
|
+
type: string;
|
|
640
|
+
};
|
|
635
641
|
video: {
|
|
636
642
|
type: string;
|
|
637
643
|
additionalProperties: boolean;
|
|
@@ -12,7 +12,7 @@ const IconWrapper = (props) => {
|
|
|
12
12
|
const iconProps = getMediaImage(icon.value);
|
|
13
13
|
const iconPosition = icon === null || icon === void 0 ? void 0 : icon.position;
|
|
14
14
|
return (React.createElement("div", { className: b({ ['icon-position']: iconPosition }) },
|
|
15
|
-
iconProps && (React.createElement(Image, Object.assign({}, iconProps, { className: b('icon', { ['icon-position']: iconPosition }) }))),
|
|
15
|
+
iconProps && (React.createElement(Image, Object.assign({}, iconProps, { containerClassName: b('icon-container'), className: b('icon', { ['icon-position']: iconPosition }) }))),
|
|
16
16
|
React.createElement("div", { className: b({ ['content']: iconPosition }) }, children)));
|
|
17
17
|
};
|
|
18
18
|
export default IconWrapper;
|
|
@@ -12,7 +12,10 @@ 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,
|
|
15
|
+
const { parallax, height, imageClassName, isBackground, hasVideoFallback, video, fullscreen, disableImageSliderForArrayInput, qa, onLoad, } = props;
|
|
16
|
+
const image = Array.isArray(props.image) && disableImageSliderForArrayInput
|
|
17
|
+
? props.image[0]
|
|
18
|
+
: props.image;
|
|
16
19
|
const qaAttributes = getQaAttrubutes(qa, 'fullscreen-image', 'animate', 'background-image', 'image-view', 'slider-block');
|
|
17
20
|
const [scrollY, setScrollY] = useState(0);
|
|
18
21
|
const [{ springScrollY }, springSetScrollY] = useSpring(() => ({
|
|
@@ -9,13 +9,13 @@ import Video from './Video/Video';
|
|
|
9
9
|
import './Media.css';
|
|
10
10
|
const b = block('Media');
|
|
11
11
|
export const Media = (props) => {
|
|
12
|
-
const { image, video, youtube, dataLens, color, height, previewImg, parallax = false, fullscreen, analyticsEvents, className, imageClassName, videoClassName, youtubeClassName, playVideo = true, isBackground, playButton, customBarControlsClassName, qa, ratio, autoplay, onImageLoad, iframe, margins, } = props;
|
|
12
|
+
const { image, video, youtube, dataLens, color, height, previewImg, parallax = false, fullscreen, analyticsEvents, className, imageClassName, videoClassName, youtubeClassName, disableImageSliderForArrayInput, playVideo = true, isBackground, playButton, customBarControlsClassName, qa, ratio, autoplay, onImageLoad, iframe, margins, } = props;
|
|
13
13
|
const [hasVideoFallback, setHasVideoFallback] = useState(false);
|
|
14
14
|
const qaAttributes = getQaAttrubutes(qa, 'video');
|
|
15
15
|
const content = useMemo(() => {
|
|
16
16
|
let result = [];
|
|
17
17
|
if (image) {
|
|
18
|
-
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, onLoad: onImageLoad }));
|
|
18
|
+
result.push(React.createElement(Image, { key: "image", parallax: parallax, image: image, disableImageSliderForArrayInput: disableImageSliderForArrayInput, height: height, imageClassName: imageClassName, isBackground: isBackground, video: video, hasVideoFallback: hasVideoFallback, fullscreen: fullscreen, qa: qaAttributes.image, onLoad: onImageLoad }));
|
|
19
19
|
}
|
|
20
20
|
if (video) {
|
|
21
21
|
const videoProps = {
|
|
@@ -56,6 +56,7 @@ export const Media = (props) => {
|
|
|
56
56
|
dataLens,
|
|
57
57
|
iframe,
|
|
58
58
|
parallax,
|
|
59
|
+
disableImageSliderForArrayInput,
|
|
59
60
|
height,
|
|
60
61
|
imageClassName,
|
|
61
62
|
isBackground,
|
|
@@ -85,7 +85,7 @@ unpredictable css rules order in build */
|
|
|
85
85
|
.pc-content_theme_dark .pc-content__title *,
|
|
86
86
|
.pc-content_theme_dark .pc-content__text .yfm,
|
|
87
87
|
.pc-content_theme_dark .pc-content__text .yfm *,
|
|
88
|
-
.pc-content_theme_dark .pc-
|
|
88
|
+
.pc-content_theme_dark .pc-content__links a {
|
|
89
89
|
color: var(--g-color-text-light-primary);
|
|
90
90
|
}
|
|
91
91
|
.pc-content_theme_dark .pc-content__notice .yfm,
|
|
@@ -117,7 +117,7 @@ unpredictable css rules order in build */
|
|
|
117
117
|
.pc-content_theme_light .pc-content__title *,
|
|
118
118
|
.pc-content_theme_light .pc-content__text .yfm,
|
|
119
119
|
.pc-content_theme_light .pc-content__text .yfm *,
|
|
120
|
-
.pc-content_theme_light .pc-
|
|
120
|
+
.pc-content_theme_light .pc-content__links a {
|
|
121
121
|
color: var(--g-color-text-dark-primary);
|
|
122
122
|
}
|
|
123
123
|
.pc-content_theme_light .pc-content__notice .yfm,
|
package/package.json
CHANGED