@gravity-ui/page-constructor 1.2.3-alpha.3 → 1.2.4
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/CHANGELOG.md +6 -0
- package/build/cjs/blocks/Companies/Companies.js +6 -2
- package/build/cjs/blocks/ContentLayout/schema.js +1 -2
- package/build/cjs/blocks/Header/Header.css +9 -2
- package/build/cjs/blocks/Header/Header.js +9 -6
- package/build/cjs/blocks/Header/schema.d.ts +244 -196
- package/build/cjs/blocks/Header/schema.js +23 -3
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +122 -98
- package/build/cjs/blocks/Tabs/Tabs.js +2 -3
- package/build/cjs/blocks/Tabs/schema.js +1 -2
- package/build/cjs/components/BackgroundImage/BackgroundImage.js +2 -2
- package/build/cjs/components/FullscreenImage/FullscreenImage.d.ts +2 -2
- package/build/cjs/components/Image/Image.d.ts +5 -3
- package/build/cjs/components/Image/Image.js +5 -9
- package/build/cjs/components/Media/Image/Image.js +3 -3
- package/build/cjs/components/Media/Image/utils.d.ts +2 -2
- package/build/cjs/models/constructor-items/blocks.d.ts +9 -5
- package/build/cjs/models/constructor-items/common.d.ts +7 -11
- package/build/cjs/models/guards.d.ts +3 -2
- package/build/cjs/models/guards.js +5 -1
- package/build/cjs/schema/validators/common.d.ts +31 -0
- package/build/cjs/schema/validators/common.js +32 -5
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +1 -2
- package/build/cjs/sub-blocks/BasicCard/BasicCard.js +1 -1
- package/build/cjs/sub-blocks/BasicCard/schema.js +1 -2
- package/build/cjs/sub-blocks/Content/Content.css +2 -1
- package/build/cjs/sub-blocks/Partner/Partner.js +1 -1
- package/build/cjs/sub-blocks/Partner/schema.js +1 -2
- package/build/cjs/sub-blocks/Quote/Quote.js +2 -3
- package/build/cjs/sub-blocks/Quote/schema.js +3 -4
- package/build/cjs/sub-blocks/TutorialCard/TutorialCard.js +2 -2
- package/build/cjs/sub-blocks/TutorialCard/schema.js +1 -2
- package/build/esm/blocks/Companies/Companies.js +6 -2
- package/build/esm/blocks/ContentLayout/schema.js +1 -2
- package/build/esm/blocks/Header/Header.css +9 -2
- package/build/esm/blocks/Header/Header.js +10 -7
- package/build/esm/blocks/Header/schema.d.ts +244 -196
- package/build/esm/blocks/Header/schema.js +23 -3
- package/build/esm/blocks/HeaderSlider/schema.d.ts +122 -98
- package/build/esm/blocks/Tabs/Tabs.js +2 -3
- package/build/esm/blocks/Tabs/schema.js +1 -2
- package/build/esm/components/BackgroundImage/BackgroundImage.js +2 -2
- package/build/esm/components/FullscreenImage/FullscreenImage.d.ts +2 -2
- package/build/esm/components/Image/Image.d.ts +5 -3
- package/build/esm/components/Image/Image.js +5 -9
- package/build/esm/components/Media/Image/Image.js +3 -3
- package/build/esm/components/Media/Image/utils.d.ts +2 -2
- package/build/esm/models/constructor-items/blocks.d.ts +9 -5
- package/build/esm/models/constructor-items/common.d.ts +7 -11
- package/build/esm/models/guards.d.ts +3 -2
- package/build/esm/models/guards.js +3 -0
- package/build/esm/schema/validators/common.d.ts +31 -0
- package/build/esm/schema/validators/common.js +28 -1
- package/build/esm/sub-blocks/BackgroundCard/schema.js +1 -2
- package/build/esm/sub-blocks/BasicCard/BasicCard.js +1 -1
- package/build/esm/sub-blocks/BasicCard/schema.js +1 -2
- package/build/esm/sub-blocks/Content/Content.css +2 -1
- package/build/esm/sub-blocks/Partner/Partner.js +1 -1
- package/build/esm/sub-blocks/Partner/schema.js +1 -2
- package/build/esm/sub-blocks/Quote/Quote.js +2 -3
- package/build/esm/sub-blocks/Quote/schema.js +1 -2
- package/build/esm/sub-blocks/TutorialCard/TutorialCard.js +2 -2
- package/build/esm/sub-blocks/TutorialCard/schema.js +1 -2
- package/package.json +1 -4
- package/server/models/constructor-items/blocks.d.ts +9 -5
- package/server/models/constructor-items/common.d.ts +7 -11
- package/server/models/guards.d.ts +3 -2
- package/server/models/guards.js +5 -1
- package/build/cjs/components/Image/schema.d.ts +0 -56
- package/build/cjs/components/Image/schema.js +0 -54
- package/build/esm/components/Image/schema.d.ts +0 -56
- package/build/esm/components/Image/schema.js +0 -51
|
@@ -4,14 +4,13 @@ import { block, getThemedValue } from '../../utils';
|
|
|
4
4
|
import { AuthorType } from '../../models';
|
|
5
5
|
import { Author, Image, HTML } from '../../components';
|
|
6
6
|
import { ThemeValueContext } from '../../context/theme/ThemeValueContext';
|
|
7
|
-
import { getMediaImage } from '../../components/Media/Image/utils';
|
|
8
7
|
import './Quote.css';
|
|
9
8
|
const b = block('quote');
|
|
10
9
|
const Quote = (props) => {
|
|
11
10
|
const { theme: textTheme = 'light', color, image, border = 'shadow', text, logo, author, url, buttonText, } = props;
|
|
12
11
|
const { themeValue: theme } = useContext(ThemeValueContext);
|
|
13
12
|
const imageThemed = getThemedValue(image, theme);
|
|
14
|
-
const imageData =
|
|
13
|
+
const imageData = typeof imageThemed === 'string' ? { src: imageThemed } : imageThemed;
|
|
15
14
|
const renderFooter = Boolean(author || url) && (React.createElement("div", { className: b('author-wrapper') },
|
|
16
15
|
author && (React.createElement(Author, { className: b('author', { theme: textTheme }), author: author, type: AuthorType.Line })),
|
|
17
16
|
url && buttonText && (React.createElement(Button, { view: "outlined", size: "xl", href: url, className: b('link-button', { theme: textTheme }) }, buttonText))));
|
|
@@ -24,6 +23,6 @@ const Quote = (props) => {
|
|
|
24
23
|
React.createElement(HTML, null, text)))),
|
|
25
24
|
renderFooter),
|
|
26
25
|
React.createElement("div", { className: b('image-wrapper') },
|
|
27
|
-
React.createElement(Image,
|
|
26
|
+
React.createElement(Image, { src: imageData.src, alt: imageData.alt, className: b('image') }))));
|
|
28
27
|
};
|
|
29
28
|
export default Quote;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { authorItem, BaseProps, ThemeProps, withTheme } from '../../schema/validators/common';
|
|
2
|
-
import { ImageProps, urlPattern } from '../../components/Image/schema';
|
|
1
|
+
import { authorItem, BaseProps, ImageProps, ThemeProps, withTheme, urlPattern, } from '../../schema/validators/common';
|
|
3
2
|
export const Quote = {
|
|
4
3
|
quote: {
|
|
5
4
|
additionalProperties: false,
|
|
@@ -6,8 +6,8 @@ import { getMediaImage } from '../../components/Media/Image/utils';
|
|
|
6
6
|
import './TutorialCard.css';
|
|
7
7
|
const b = block('tutorial-card');
|
|
8
8
|
function iconElement(icon, title) {
|
|
9
|
-
const
|
|
10
|
-
return React.createElement(Image,
|
|
9
|
+
const { src, alt = title, disableCompress } = getMediaImage(icon !== null && icon !== void 0 ? icon : {});
|
|
10
|
+
return React.createElement(Image, { src: src, alt: alt, className: b('icon'), disableCompress: disableCompress });
|
|
11
11
|
}
|
|
12
12
|
const TutorialCard = (props) => {
|
|
13
13
|
const { url, title, text, border, icon } = props;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BaseProps } from '../../schema/validators/common';
|
|
2
|
-
import { ImageProps } from '../../components/Image/schema';
|
|
1
|
+
import { BaseProps, ImageProps } from '../../schema/validators/common';
|
|
3
2
|
export const TutorialCard = {
|
|
4
3
|
'tutorial-card': {
|
|
5
4
|
additionalProperties: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/page-constructor",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "Gravity UI Page Constructor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -121,8 +121,5 @@
|
|
|
121
121
|
"*.{json,yaml,yml,md}": [
|
|
122
122
|
"prettier --write"
|
|
123
123
|
]
|
|
124
|
-
},
|
|
125
|
-
"publishConfig": {
|
|
126
|
-
"tag": "alpha"
|
|
127
124
|
}
|
|
128
125
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, Justify, LinkProps, LinkTheme, MediaDirection, MediaProps, PreviewItemProps, PreviewRatioMediaContent, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleProps, LegendTableMarkerType, AnchorProps, TitleBaseProps, Animatable, BlockHeaderProps
|
|
2
|
+
import { BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, Justify, LinkProps, LinkTheme, MediaDirection, MediaProps, PreviewItemProps, PreviewRatioMediaContent, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleProps, LegendTableMarkerType, AnchorProps, TitleBaseProps, Animatable, BlockHeaderProps } from './common';
|
|
3
3
|
import { ThemeSupporting } from '../../utils';
|
|
4
4
|
import { GridColumnSize, GridColumnSizesType } from '../../grid/types';
|
|
5
5
|
import { BannerCardProps, SubBlock } from './sub-blocks';
|
|
@@ -78,9 +78,8 @@ export interface HeaderSliderBlockProps extends Omit<SliderProps, 'title' | 'des
|
|
|
78
78
|
items: HeaderBlockProps[];
|
|
79
79
|
}
|
|
80
80
|
interface HeaderBackgroundProps {
|
|
81
|
-
|
|
82
|
-
url?:
|
|
83
|
-
/** @deprecated replaced by Media Props image */
|
|
81
|
+
color?: string;
|
|
82
|
+
url?: string;
|
|
84
83
|
disableCompress?: boolean;
|
|
85
84
|
}
|
|
86
85
|
export interface HeaderBlockBackground extends Partial<HeaderBackgroundProps>, Partial<MediaProps> {
|
|
@@ -152,7 +151,12 @@ export interface BannerBlockProps extends BannerCardProps, Animatable {
|
|
|
152
151
|
}
|
|
153
152
|
export interface CompaniesBlockProps extends Animatable {
|
|
154
153
|
title: string;
|
|
155
|
-
images: ThemeSupporting<
|
|
154
|
+
images: ThemeSupporting<{
|
|
155
|
+
desktop: string;
|
|
156
|
+
tablet: string;
|
|
157
|
+
mobile: string;
|
|
158
|
+
alt?: string;
|
|
159
|
+
}>;
|
|
156
160
|
}
|
|
157
161
|
export interface MediaContentProps {
|
|
158
162
|
title: string;
|
|
@@ -81,21 +81,17 @@ interface LoopProps {
|
|
|
81
81
|
start: number;
|
|
82
82
|
end?: number;
|
|
83
83
|
}
|
|
84
|
-
export interface
|
|
84
|
+
export interface ImageObjectProps {
|
|
85
|
+
src: string;
|
|
85
86
|
alt?: string;
|
|
86
87
|
disableCompress?: boolean;
|
|
87
88
|
}
|
|
88
|
-
export
|
|
89
|
-
src: string;
|
|
90
|
-
}
|
|
91
|
-
export interface ImageDeviceProps extends ImageInfoProps {
|
|
92
|
-
desktop: string;
|
|
93
|
-
mobile: string;
|
|
94
|
-
tablet?: string;
|
|
95
|
-
}
|
|
96
|
-
export declare type ImageProps = string | ImageObjectProps | ImageDeviceProps;
|
|
89
|
+
export declare type ImageProps = string | ImageObjectProps;
|
|
97
90
|
export declare type ThemedImage = ThemeSupporting<ImageProps>;
|
|
98
|
-
export interface BackgroundImageProps extends React.HTMLProps<HTMLDivElement
|
|
91
|
+
export interface BackgroundImageProps extends React.HTMLProps<HTMLDivElement> {
|
|
92
|
+
src?: string;
|
|
93
|
+
alt?: string;
|
|
94
|
+
disableCompress?: boolean;
|
|
99
95
|
style?: CSSProperties;
|
|
100
96
|
imageClassName?: string;
|
|
101
97
|
hide?: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Block, ConstructorItem } from './';
|
|
2
|
-
import { MetrikaGoal, NewMetrikaGoal } from './index';
|
|
1
|
+
import { Block, ConstructorItem, HeaderBlockBackground } from './';
|
|
2
|
+
import { MediaProps, MetrikaGoal, NewMetrikaGoal } from './index';
|
|
3
3
|
export declare function isBlock(block: ConstructorItem): block is Block;
|
|
4
4
|
export declare function isNewMetrikaFormat(metrika: MetrikaGoal): metrika is NewMetrikaGoal[];
|
|
5
|
+
export declare function headerHasMediaBackground(background: HeaderBlockBackground): background is MediaProps;
|
package/server/models/guards.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isNewMetrikaFormat = exports.isBlock = void 0;
|
|
3
|
+
exports.headerHasMediaBackground = exports.isNewMetrikaFormat = exports.isBlock = void 0;
|
|
4
4
|
const _1 = require("./");
|
|
5
5
|
function isBlock(block) {
|
|
6
6
|
return block.type in _1.BlockTypes;
|
|
@@ -10,3 +10,7 @@ function isNewMetrikaFormat(metrika) {
|
|
|
10
10
|
return Boolean(Array.isArray(metrika) && metrika.length && typeof metrika[0] === 'object');
|
|
11
11
|
}
|
|
12
12
|
exports.isNewMetrikaFormat = isNewMetrikaFormat;
|
|
13
|
+
function headerHasMediaBackground(background) {
|
|
14
|
+
return 'image' in background || 'video' in background || 'youtube' in background;
|
|
15
|
+
}
|
|
16
|
+
exports.headerHasMediaBackground = headerHasMediaBackground;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export declare const urlPattern = "^((http[s]?|ftp):\\/)?\\/?([^:\\/\\s]+)((\\/\\w+)*\\/)([\\w\\-\\.]+[^#?\\s]+)(.*)?(#[\\w\\-]+)?$";
|
|
2
|
-
export declare const ImageDeviceProps: {
|
|
3
|
-
type: string;
|
|
4
|
-
additionalProperties: boolean;
|
|
5
|
-
required: string[];
|
|
6
|
-
properties: {
|
|
7
|
-
desktop: {
|
|
8
|
-
type: string;
|
|
9
|
-
pattern: string;
|
|
10
|
-
};
|
|
11
|
-
tablet: {
|
|
12
|
-
type: string;
|
|
13
|
-
pattern: string;
|
|
14
|
-
};
|
|
15
|
-
mobile: {
|
|
16
|
-
type: string;
|
|
17
|
-
pattern: string;
|
|
18
|
-
};
|
|
19
|
-
alt: {
|
|
20
|
-
type: string;
|
|
21
|
-
};
|
|
22
|
-
disableCompress: {
|
|
23
|
-
type: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export declare const ImageObjectProps: {
|
|
28
|
-
type: string;
|
|
29
|
-
additionalProperties: boolean;
|
|
30
|
-
required: string[];
|
|
31
|
-
properties: {
|
|
32
|
-
src: {
|
|
33
|
-
type: string;
|
|
34
|
-
pattern: string;
|
|
35
|
-
};
|
|
36
|
-
alt: {
|
|
37
|
-
type: string;
|
|
38
|
-
};
|
|
39
|
-
disableCompress: {
|
|
40
|
-
type: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
export declare const ImageProps: {
|
|
45
|
-
oneOf: ({
|
|
46
|
-
type: string;
|
|
47
|
-
properties: {
|
|
48
|
-
when: {
|
|
49
|
-
type: string;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
} | {
|
|
53
|
-
type: string;
|
|
54
|
-
pattern: string;
|
|
55
|
-
})[];
|
|
56
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ImageProps = exports.ImageObjectProps = exports.ImageDeviceProps = exports.urlPattern = void 0;
|
|
4
|
-
const utils_1 = require("../../schema/validators/utils");
|
|
5
|
-
exports.urlPattern = '^((http[s]?|ftp):\\/)?\\/?([^:\\/\\s]+)((\\/\\w+)*\\/)([\\w\\-\\.]+[^#?\\s]+)(.*)?(#[\\w\\-]+)?$';
|
|
6
|
-
exports.ImageDeviceProps = {
|
|
7
|
-
type: 'object',
|
|
8
|
-
additionalProperties: false,
|
|
9
|
-
required: ['desktop', 'mobile'],
|
|
10
|
-
properties: {
|
|
11
|
-
desktop: { type: 'string', pattern: exports.urlPattern },
|
|
12
|
-
tablet: {
|
|
13
|
-
type: 'string',
|
|
14
|
-
pattern: exports.urlPattern,
|
|
15
|
-
},
|
|
16
|
-
mobile: {
|
|
17
|
-
type: 'string',
|
|
18
|
-
pattern: exports.urlPattern,
|
|
19
|
-
},
|
|
20
|
-
alt: {
|
|
21
|
-
type: 'string',
|
|
22
|
-
},
|
|
23
|
-
disableCompress: {
|
|
24
|
-
type: 'boolean',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
exports.ImageObjectProps = {
|
|
29
|
-
type: 'object',
|
|
30
|
-
additionalProperties: false,
|
|
31
|
-
required: ['src'],
|
|
32
|
-
properties: {
|
|
33
|
-
src: {
|
|
34
|
-
type: 'string',
|
|
35
|
-
pattern: exports.urlPattern,
|
|
36
|
-
},
|
|
37
|
-
alt: {
|
|
38
|
-
type: 'string',
|
|
39
|
-
},
|
|
40
|
-
disableCompress: {
|
|
41
|
-
type: 'boolean',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
exports.ImageProps = {
|
|
46
|
-
oneOf: [
|
|
47
|
-
{
|
|
48
|
-
type: 'string',
|
|
49
|
-
pattern: exports.urlPattern,
|
|
50
|
-
},
|
|
51
|
-
(0, utils_1.filteredItem)(Object.assign({}, exports.ImageObjectProps)),
|
|
52
|
-
(0, utils_1.filteredItem)(Object.assign({}, exports.ImageDeviceProps)),
|
|
53
|
-
],
|
|
54
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export declare const urlPattern = "^((http[s]?|ftp):\\/)?\\/?([^:\\/\\s]+)((\\/\\w+)*\\/)([\\w\\-\\.]+[^#?\\s]+)(.*)?(#[\\w\\-]+)?$";
|
|
2
|
-
export declare const ImageDeviceProps: {
|
|
3
|
-
type: string;
|
|
4
|
-
additionalProperties: boolean;
|
|
5
|
-
required: string[];
|
|
6
|
-
properties: {
|
|
7
|
-
desktop: {
|
|
8
|
-
type: string;
|
|
9
|
-
pattern: string;
|
|
10
|
-
};
|
|
11
|
-
tablet: {
|
|
12
|
-
type: string;
|
|
13
|
-
pattern: string;
|
|
14
|
-
};
|
|
15
|
-
mobile: {
|
|
16
|
-
type: string;
|
|
17
|
-
pattern: string;
|
|
18
|
-
};
|
|
19
|
-
alt: {
|
|
20
|
-
type: string;
|
|
21
|
-
};
|
|
22
|
-
disableCompress: {
|
|
23
|
-
type: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export declare const ImageObjectProps: {
|
|
28
|
-
type: string;
|
|
29
|
-
additionalProperties: boolean;
|
|
30
|
-
required: string[];
|
|
31
|
-
properties: {
|
|
32
|
-
src: {
|
|
33
|
-
type: string;
|
|
34
|
-
pattern: string;
|
|
35
|
-
};
|
|
36
|
-
alt: {
|
|
37
|
-
type: string;
|
|
38
|
-
};
|
|
39
|
-
disableCompress: {
|
|
40
|
-
type: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
export declare const ImageProps: {
|
|
45
|
-
oneOf: ({
|
|
46
|
-
type: string;
|
|
47
|
-
properties: {
|
|
48
|
-
when: {
|
|
49
|
-
type: string;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
} | {
|
|
53
|
-
type: string;
|
|
54
|
-
pattern: string;
|
|
55
|
-
})[];
|
|
56
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { filteredItem } from '../../schema/validators/utils';
|
|
2
|
-
export const urlPattern = '^((http[s]?|ftp):\\/)?\\/?([^:\\/\\s]+)((\\/\\w+)*\\/)([\\w\\-\\.]+[^#?\\s]+)(.*)?(#[\\w\\-]+)?$';
|
|
3
|
-
export const ImageDeviceProps = {
|
|
4
|
-
type: 'object',
|
|
5
|
-
additionalProperties: false,
|
|
6
|
-
required: ['desktop', 'mobile'],
|
|
7
|
-
properties: {
|
|
8
|
-
desktop: { type: 'string', pattern: urlPattern },
|
|
9
|
-
tablet: {
|
|
10
|
-
type: 'string',
|
|
11
|
-
pattern: urlPattern,
|
|
12
|
-
},
|
|
13
|
-
mobile: {
|
|
14
|
-
type: 'string',
|
|
15
|
-
pattern: urlPattern,
|
|
16
|
-
},
|
|
17
|
-
alt: {
|
|
18
|
-
type: 'string',
|
|
19
|
-
},
|
|
20
|
-
disableCompress: {
|
|
21
|
-
type: 'boolean',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
export const ImageObjectProps = {
|
|
26
|
-
type: 'object',
|
|
27
|
-
additionalProperties: false,
|
|
28
|
-
required: ['src'],
|
|
29
|
-
properties: {
|
|
30
|
-
src: {
|
|
31
|
-
type: 'string',
|
|
32
|
-
pattern: urlPattern,
|
|
33
|
-
},
|
|
34
|
-
alt: {
|
|
35
|
-
type: 'string',
|
|
36
|
-
},
|
|
37
|
-
disableCompress: {
|
|
38
|
-
type: 'boolean',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
export const ImageProps = {
|
|
43
|
-
oneOf: [
|
|
44
|
-
{
|
|
45
|
-
type: 'string',
|
|
46
|
-
pattern: urlPattern,
|
|
47
|
-
},
|
|
48
|
-
filteredItem(Object.assign({}, ImageObjectProps)),
|
|
49
|
-
filteredItem(Object.assign({}, ImageDeviceProps)),
|
|
50
|
-
],
|
|
51
|
-
};
|