@gravity-ui/page-constructor 2.13.0-alpha.0 → 2.13.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/CHANGELOG.md +7 -0
- package/build/cjs/blocks/Security/Security.css +142 -0
- package/build/cjs/blocks/Security/Security.d.ts +3 -0
- package/build/cjs/blocks/Security/Security.js +29 -0
- package/build/cjs/blocks/Security/i18n/en.json +3 -0
- package/build/cjs/blocks/Security/i18n/index.d.ts +2 -0
- package/build/cjs/blocks/Security/i18n/index.js +8 -0
- package/build/cjs/blocks/Security/i18n/ru.json +3 -0
- package/build/cjs/blocks/Security/schema.d.ts +170 -0
- package/build/cjs/blocks/Security/schema.js +32 -0
- package/build/cjs/blocks/index.d.ts +1 -0
- package/build/cjs/blocks/index.js +3 -1
- package/build/cjs/blocks/validators.d.ts +1 -0
- package/build/cjs/blocks/validators.js +1 -0
- package/build/cjs/constructor-items.d.ts +1 -0
- package/build/cjs/constructor-items.js +1 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +20 -1
- package/build/cjs/models/constructor-items/blocks.js +1 -0
- package/build/cjs/schema/index.js +1 -1
- package/build/cjs/schema/validators/blocks.d.ts +1 -0
- package/build/cjs/schema/validators/blocks.js +1 -0
- package/build/cjs/schema/validators/components.d.ts +2 -0
- package/build/cjs/schema/validators/components.js +5 -0
- package/build/cjs/schema/validators/index.d.ts +2 -0
- package/build/cjs/schema/validators/index.js +2 -0
- package/build/esm/blocks/Security/Security.css +142 -0
- package/build/esm/blocks/Security/Security.d.ts +4 -0
- package/build/esm/blocks/Security/Security.js +25 -0
- package/build/esm/blocks/Security/i18n/en.json +3 -0
- package/build/esm/blocks/Security/i18n/index.d.ts +2 -0
- package/build/esm/blocks/Security/i18n/index.js +5 -0
- package/build/esm/blocks/Security/i18n/ru.json +3 -0
- package/build/esm/blocks/Security/schema.d.ts +170 -0
- package/build/esm/blocks/Security/schema.js +28 -0
- package/build/esm/blocks/index.d.ts +1 -0
- package/build/esm/blocks/index.js +1 -0
- package/build/esm/blocks/validators.d.ts +1 -0
- package/build/esm/blocks/validators.js +1 -0
- package/build/esm/constructor-items.d.ts +1 -0
- package/build/esm/constructor-items.js +2 -1
- package/build/esm/models/constructor-items/blocks.d.ts +20 -1
- package/build/esm/models/constructor-items/blocks.js +1 -0
- package/build/esm/schema/index.js +2 -2
- package/build/esm/schema/validators/blocks.d.ts +1 -0
- package/build/esm/schema/validators/blocks.js +1 -0
- package/build/esm/schema/validators/components.d.ts +2 -0
- package/build/esm/schema/validators/components.js +2 -0
- package/build/esm/schema/validators/index.d.ts +2 -0
- package/build/esm/schema/validators/index.js +2 -0
- package/package.json +1 -4
- package/server/models/constructor-items/blocks.d.ts +20 -1
- package/server/models/constructor-items/blocks.js +1 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
.pc-SecurityBlock__title {
|
|
2
|
+
margin: 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/* use this for style redefinitions to awoid problems with
|
|
6
|
+
unpredictable css rules order in build */
|
|
7
|
+
.pc-SecurityBlock_theme_dark {
|
|
8
|
+
color: var(--yc-color-text-light-primary);
|
|
9
|
+
}
|
|
10
|
+
.pc-SecurityBlock_theme_dark h1,
|
|
11
|
+
.pc-SecurityBlock_theme_dark h2,
|
|
12
|
+
.pc-SecurityBlock_theme_dark h3,
|
|
13
|
+
.pc-SecurityBlock_theme_dark h4,
|
|
14
|
+
.pc-SecurityBlock_theme_dark h5,
|
|
15
|
+
.pc-SecurityBlock_theme_dark h6,
|
|
16
|
+
.pc-SecurityBlock_theme_dark .yfm {
|
|
17
|
+
color: var(--yc-color-text-light-primary);
|
|
18
|
+
}
|
|
19
|
+
.pc-SecurityBlock_theme_light .pc-SecurityBlock__background {
|
|
20
|
+
background-color: var(--yc-color-base-background);
|
|
21
|
+
}
|
|
22
|
+
.pc-SecurityBlock_theme_light .pc-SecurityBlock__content {
|
|
23
|
+
padding: 0;
|
|
24
|
+
}
|
|
25
|
+
.pc-SecurityBlock_theme_light .pc-SecurityBlock__point-icon,
|
|
26
|
+
.pc-SecurityBlock_theme_light .pc-SecurityBlock__point-text {
|
|
27
|
+
color: var(--yc-color-text-primary);
|
|
28
|
+
}
|
|
29
|
+
.pc-SecurityBlock__title {
|
|
30
|
+
font-size: var(--yc-text-display-2-font-size);
|
|
31
|
+
line-height: var(--yc-text-display-2-line-height);
|
|
32
|
+
color: var(--pc-text-header-color);
|
|
33
|
+
font-weight: var(--yc-text-accent-font-weight);
|
|
34
|
+
}
|
|
35
|
+
@media (max-width: 576px) {
|
|
36
|
+
.pc-SecurityBlock__title {
|
|
37
|
+
font-size: var(--yc-text-display-1-font-size);
|
|
38
|
+
line-height: var(--yc-text-display-1-line-height);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
.pc-SecurityBlock__background {
|
|
42
|
+
background-color: var(--yc-color-promo-base-asphalt);
|
|
43
|
+
}
|
|
44
|
+
.pc-SecurityBlock__content {
|
|
45
|
+
padding: 96px 0 128px;
|
|
46
|
+
}
|
|
47
|
+
.pc-SecurityBlock__points {
|
|
48
|
+
padding-top: 20px;
|
|
49
|
+
}
|
|
50
|
+
.pc-SecurityBlock__point-icon {
|
|
51
|
+
width: 48px;
|
|
52
|
+
height: 48px;
|
|
53
|
+
}
|
|
54
|
+
.pc-SecurityBlock__point-text {
|
|
55
|
+
color: var(--yc-color-text-light-primary);
|
|
56
|
+
}
|
|
57
|
+
.pc-SecurityBlock__point-text a {
|
|
58
|
+
outline: none;
|
|
59
|
+
color: var(--yc-color-text-link);
|
|
60
|
+
text-decoration: none;
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
}
|
|
63
|
+
.utilityfocus .pc-SecurityBlock__point-text a:focus {
|
|
64
|
+
outline: 2px solid #ffdb4d;
|
|
65
|
+
}
|
|
66
|
+
.pc-SecurityBlock__point-text a:hover, .pc-SecurityBlock__point-text a:active {
|
|
67
|
+
--pc-text-header-color: var(--yc-color-text-link-hover);
|
|
68
|
+
color: var(--yc-color-text-link-hover);
|
|
69
|
+
}
|
|
70
|
+
.pc-SecurityBlock__point-text, .pc-SecurityBlock__point-link {
|
|
71
|
+
font-size: var(--yc-text-body-2-font-size);
|
|
72
|
+
line-height: var(--yc-text-body-2-line-height);
|
|
73
|
+
margin-top: 8px;
|
|
74
|
+
}
|
|
75
|
+
.pc-SecurityBlock__media {
|
|
76
|
+
margin-top: 48px;
|
|
77
|
+
border-radius: var(--pc-border-radius);
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
}
|
|
80
|
+
@media (max-width: 577px) {
|
|
81
|
+
.pc-SecurityBlock__content {
|
|
82
|
+
padding: 64px 0;
|
|
83
|
+
}
|
|
84
|
+
.pc-SecurityBlock__point + .pc-SecurityBlock__point {
|
|
85
|
+
margin-top: 20px;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
@media (min-width: 769px) {
|
|
89
|
+
.pc-SecurityBlock.pc-AnimateBlock .pc-SecurityBlock__point, .pc-AnimateBlock .pc-SecurityBlock .pc-SecurityBlock__point {
|
|
90
|
+
position: relative;
|
|
91
|
+
top: 100px;
|
|
92
|
+
opacity: 0;
|
|
93
|
+
}
|
|
94
|
+
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point, .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point {
|
|
95
|
+
top: 0;
|
|
96
|
+
opacity: 1;
|
|
97
|
+
transition: top 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
98
|
+
}
|
|
99
|
+
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(0), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(0) {
|
|
100
|
+
transition-delay: 0s;
|
|
101
|
+
}
|
|
102
|
+
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(1), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(1) {
|
|
103
|
+
transition-delay: 0.1s;
|
|
104
|
+
}
|
|
105
|
+
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(2), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(2) {
|
|
106
|
+
transition-delay: 0.2s;
|
|
107
|
+
}
|
|
108
|
+
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(3), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(3) {
|
|
109
|
+
transition-delay: 0.3s;
|
|
110
|
+
}
|
|
111
|
+
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(4), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(4) {
|
|
112
|
+
transition-delay: 0.4s;
|
|
113
|
+
}
|
|
114
|
+
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(5), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(5) {
|
|
115
|
+
transition-delay: 0.5s;
|
|
116
|
+
}
|
|
117
|
+
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(6), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(6) {
|
|
118
|
+
transition-delay: 0.6s;
|
|
119
|
+
}
|
|
120
|
+
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(7), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(7) {
|
|
121
|
+
transition-delay: 0.7s;
|
|
122
|
+
}
|
|
123
|
+
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(8), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(8) {
|
|
124
|
+
transition-delay: 0.8s;
|
|
125
|
+
}
|
|
126
|
+
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(9), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(9) {
|
|
127
|
+
transition-delay: 0.9s;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
@media (min-width: 769px) {
|
|
131
|
+
.pc-SecurityBlock.pc-AnimateBlock .pc-SecurityBlock__media, .pc-AnimateBlock .pc-SecurityBlock .pc-SecurityBlock__media {
|
|
132
|
+
position: relative;
|
|
133
|
+
top: 100px;
|
|
134
|
+
opacity: 0;
|
|
135
|
+
}
|
|
136
|
+
.pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__media, .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__media {
|
|
137
|
+
top: 0;
|
|
138
|
+
opacity: 1;
|
|
139
|
+
transition: top 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
140
|
+
transition-delay: 0.5s;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AnimateBlock, FullWidthBackground, HTML, ImageBase, Link, Media } from '../../components';
|
|
3
|
+
import { Col, Grid, Row } from '../../grid';
|
|
4
|
+
import { block } from '../../utils';
|
|
5
|
+
import i18n from './i18n';
|
|
6
|
+
import './Security.css';
|
|
7
|
+
const b = block('SecurityBlock');
|
|
8
|
+
export const SecurityBlock = (props) => {
|
|
9
|
+
const { backgroundColor, theme = 'dark', title, points, media, animated } = props;
|
|
10
|
+
return (React.createElement(AnimateBlock, { className: b({ theme }), offset: 200, animate: animated },
|
|
11
|
+
React.createElement("div", { className: b('content') },
|
|
12
|
+
React.createElement(FullWidthBackground, { className: b('background'), style: { backgroundColor } }),
|
|
13
|
+
React.createElement(Grid, null,
|
|
14
|
+
React.createElement(Row, null,
|
|
15
|
+
React.createElement(Col, null,
|
|
16
|
+
React.createElement("h2", { className: b('title') }, title))),
|
|
17
|
+
points && (React.createElement(Row, { className: b('points') }, points.map(({ text, link, img }, index) => (React.createElement(Col, { key: index, className: b('point'), sizes: { sm: 4, all: 12 } },
|
|
18
|
+
React.createElement(ImageBase, { className: b('point-icon'), src: img, alt: text || i18n('image-alt') }),
|
|
19
|
+
React.createElement(HTML, { className: b('point-text'), block: true }, text),
|
|
20
|
+
link && (React.createElement(Link, { className: b('point-link'), text: link.text, url: link.url, theme: 'normal', arrow: true }))))))),
|
|
21
|
+
media && (React.createElement(Row, { className: b('media') },
|
|
22
|
+
React.createElement(Col, null,
|
|
23
|
+
React.createElement(Media, Object.assign({ className: b('media') }, media)))))))));
|
|
24
|
+
};
|
|
25
|
+
export default SecurityBlock;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
export declare const SecurityBlock: {
|
|
2
|
+
'security-block': {
|
|
3
|
+
additionalProperties: boolean;
|
|
4
|
+
required: string[];
|
|
5
|
+
properties: {
|
|
6
|
+
theme: {
|
|
7
|
+
type: string;
|
|
8
|
+
enum: string[];
|
|
9
|
+
};
|
|
10
|
+
backgroundColor: {
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
title: {
|
|
14
|
+
type: string;
|
|
15
|
+
contentType: string;
|
|
16
|
+
};
|
|
17
|
+
media: {
|
|
18
|
+
type: string;
|
|
19
|
+
additionalProperties: boolean;
|
|
20
|
+
required: never[];
|
|
21
|
+
properties: {
|
|
22
|
+
color: {
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
image: {
|
|
26
|
+
anyOf: ({
|
|
27
|
+
oneOf: ({
|
|
28
|
+
type: string;
|
|
29
|
+
properties: {
|
|
30
|
+
when: {
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
} | {
|
|
35
|
+
type: string;
|
|
36
|
+
pattern: string;
|
|
37
|
+
})[];
|
|
38
|
+
} | {
|
|
39
|
+
type: string;
|
|
40
|
+
items: {
|
|
41
|
+
oneOf: ({
|
|
42
|
+
type: string;
|
|
43
|
+
properties: {
|
|
44
|
+
when: {
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
} | {
|
|
49
|
+
type: string;
|
|
50
|
+
pattern: string;
|
|
51
|
+
})[];
|
|
52
|
+
};
|
|
53
|
+
})[];
|
|
54
|
+
};
|
|
55
|
+
video: {
|
|
56
|
+
type: string;
|
|
57
|
+
additionalProperties: boolean;
|
|
58
|
+
required: string[];
|
|
59
|
+
properties: {
|
|
60
|
+
src: {
|
|
61
|
+
type: string;
|
|
62
|
+
items: {
|
|
63
|
+
type: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
loop: {
|
|
67
|
+
anyOf: ({
|
|
68
|
+
type: string;
|
|
69
|
+
additionalProperties: boolean;
|
|
70
|
+
required: string[];
|
|
71
|
+
properties: {
|
|
72
|
+
start: {
|
|
73
|
+
type: string;
|
|
74
|
+
};
|
|
75
|
+
end: {
|
|
76
|
+
type: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
} | {
|
|
80
|
+
type: string;
|
|
81
|
+
})[];
|
|
82
|
+
};
|
|
83
|
+
type: {
|
|
84
|
+
type: string;
|
|
85
|
+
enum: string[];
|
|
86
|
+
};
|
|
87
|
+
muted: {
|
|
88
|
+
type: string;
|
|
89
|
+
};
|
|
90
|
+
playing: {
|
|
91
|
+
type: string;
|
|
92
|
+
};
|
|
93
|
+
elapsedTime: {
|
|
94
|
+
type: string;
|
|
95
|
+
};
|
|
96
|
+
playIcon: {
|
|
97
|
+
type: string;
|
|
98
|
+
additionalProperties: boolean;
|
|
99
|
+
properties: {
|
|
100
|
+
type: {
|
|
101
|
+
type: string;
|
|
102
|
+
enum: string[];
|
|
103
|
+
};
|
|
104
|
+
theme: {
|
|
105
|
+
type: string;
|
|
106
|
+
enum: string[];
|
|
107
|
+
};
|
|
108
|
+
text: {
|
|
109
|
+
type: string;
|
|
110
|
+
contentType: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
controls: {
|
|
115
|
+
type: string;
|
|
116
|
+
enum: string[];
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
youtube: {
|
|
121
|
+
type: string;
|
|
122
|
+
};
|
|
123
|
+
parallax: {
|
|
124
|
+
type: string;
|
|
125
|
+
};
|
|
126
|
+
height: {
|
|
127
|
+
type: string;
|
|
128
|
+
};
|
|
129
|
+
previewImg: {
|
|
130
|
+
type: string;
|
|
131
|
+
};
|
|
132
|
+
dataLens: {
|
|
133
|
+
oneOf: ({
|
|
134
|
+
type: string;
|
|
135
|
+
additionalProperties: boolean;
|
|
136
|
+
required: string[];
|
|
137
|
+
properties: {
|
|
138
|
+
id: {
|
|
139
|
+
type: string;
|
|
140
|
+
};
|
|
141
|
+
theme: {
|
|
142
|
+
type: string;
|
|
143
|
+
enum: string[];
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
} | {
|
|
147
|
+
type: string;
|
|
148
|
+
})[];
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
points: {
|
|
153
|
+
type: string;
|
|
154
|
+
items: {
|
|
155
|
+
type: string;
|
|
156
|
+
properties: {
|
|
157
|
+
when: {
|
|
158
|
+
type: string;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
animated: {
|
|
164
|
+
type: string;
|
|
165
|
+
};
|
|
166
|
+
type: {};
|
|
167
|
+
when: {};
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
import { AnimatableProps, BaseProps, LinkProps, ThemeProps } from '../../schema/validators/common';
|
|
3
|
+
import { filteredArray } from '../../schema/validators/utils';
|
|
4
|
+
import { Media } from '../Media/schema';
|
|
5
|
+
export const SecurityBlock = {
|
|
6
|
+
'security-block': {
|
|
7
|
+
additionalProperties: false,
|
|
8
|
+
required: ['title', 'media'],
|
|
9
|
+
properties: Object.assign(Object.assign(Object.assign({}, BaseProps), AnimatableProps), { theme: ThemeProps, backgroundColor: {
|
|
10
|
+
type: 'string',
|
|
11
|
+
}, title: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
contentType: 'text',
|
|
14
|
+
}, media: Media, points: filteredArray({
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
img: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
},
|
|
20
|
+
text: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
contentType: 'text',
|
|
23
|
+
},
|
|
24
|
+
link: _.pick(LinkProps, ['text', 'url']),
|
|
25
|
+
},
|
|
26
|
+
}) }),
|
|
27
|
+
},
|
|
28
|
+
};
|
|
@@ -5,6 +5,7 @@ export { default as InfoBlock } from './Info/Info';
|
|
|
5
5
|
export { default as MediaBlock } from './Media/Media';
|
|
6
6
|
export { default as MapBlock } from './Map/Map';
|
|
7
7
|
export { default as PreviewBlock } from './Preview/Preview';
|
|
8
|
+
export { default as SecurityBlock } from './Security/Security';
|
|
8
9
|
export { default as SliderBlock } from './Slider/Slider';
|
|
9
10
|
export { default as ExtendedFeaturesBlock } from './ExtendedFeatures/ExtendedFeatures';
|
|
10
11
|
export { default as PromoFeaturesBlock } from './PromoFeaturesBlock/PromoFeaturesBlock';
|
|
@@ -5,6 +5,7 @@ export { default as InfoBlock } from './Info/Info';
|
|
|
5
5
|
export { default as MediaBlock } from './Media/Media';
|
|
6
6
|
export { default as MapBlock } from './Map/Map';
|
|
7
7
|
export { default as PreviewBlock } from './Preview/Preview';
|
|
8
|
+
export { default as SecurityBlock } from './Security/Security';
|
|
8
9
|
export { default as SliderBlock } from './Slider/Slider';
|
|
9
10
|
export { default as ExtendedFeaturesBlock } from './ExtendedFeatures/ExtendedFeatures';
|
|
10
11
|
export { default as PromoFeaturesBlock } from './PromoFeaturesBlock/PromoFeaturesBlock';
|
|
@@ -12,6 +12,7 @@ export * from './Media/schema';
|
|
|
12
12
|
export * from './Preview/schema';
|
|
13
13
|
export * from './PromoFeaturesBlock/schema';
|
|
14
14
|
export * from './Questions/schema';
|
|
15
|
+
export * from './Security/schema';
|
|
15
16
|
export * from './Simple/schema';
|
|
16
17
|
export * from './Slider/schema';
|
|
17
18
|
export * from './Table/schema';
|
|
@@ -12,6 +12,7 @@ export * from './Media/schema';
|
|
|
12
12
|
export * from './Preview/schema';
|
|
13
13
|
export * from './PromoFeaturesBlock/schema';
|
|
14
14
|
export * from './Questions/schema';
|
|
15
|
+
export * from './Security/schema';
|
|
15
16
|
export * from './Simple/schema';
|
|
16
17
|
export * from './Slider/schema';
|
|
17
18
|
export * from './Table/schema';
|
|
@@ -9,6 +9,7 @@ export declare const blockMap: {
|
|
|
9
9
|
"media-block": (props: import("./models").MediaBlockProps) => JSX.Element;
|
|
10
10
|
"preview-block": (props: import("./models").PreviewBlockProps) => JSX.Element;
|
|
11
11
|
"info-block": (props: import("./models").InfoBlockProps) => JSX.Element;
|
|
12
|
+
"security-block": (props: import("./models").SecurityBlockProps) => JSX.Element;
|
|
12
13
|
"table-block": (props: import("./models").TableBlockProps) => JSX.Element;
|
|
13
14
|
"tabs-block": ({ items, title, description, animated, tabsColSizes, centered, direction, }: import("./models").TabsBlockProps) => JSX.Element;
|
|
14
15
|
"link-table-block": ({ items, title, description, linkTheme }: import("./models").LinkTableBlockProps) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BannerBlock, CardLayoutBlock, CompaniesBlock, ContentLayoutBlock, ExtendedFeaturesBlock, FilterBlock, HeaderBlock, HeaderSliderBlock, IconsBlock, InfoBlock, LinkTableBlock, MapBlock, MediaBlock, PreviewBlock, PromoFeaturesBlock, QuestionsBlock, ShareBlock, SimpleBlock, SliderBlock, TableBlock, TabsBlock, } from './blocks';
|
|
1
|
+
import { BannerBlock, CardLayoutBlock, CompaniesBlock, ContentLayoutBlock, ExtendedFeaturesBlock, FilterBlock, HeaderBlock, HeaderSliderBlock, IconsBlock, InfoBlock, LinkTableBlock, MapBlock, MediaBlock, PreviewBlock, PromoFeaturesBlock, QuestionsBlock, SecurityBlock, ShareBlock, SimpleBlock, SliderBlock, TableBlock, TabsBlock, } from './blocks';
|
|
2
2
|
import { BlockType, SubBlockType } from './models';
|
|
3
3
|
import { BackgroundCard, BannerCard, BasicCard, CardWithImage, Content, Divider, LayoutItem, MediaCard, NewsCard, Partner, PriceDetailed, Quote, TutorialCard, } from './sub-blocks';
|
|
4
4
|
export const blockMap = {
|
|
@@ -12,6 +12,7 @@ export const blockMap = {
|
|
|
12
12
|
[BlockType.MediaBlock]: MediaBlock,
|
|
13
13
|
[BlockType.PreviewBlock]: PreviewBlock,
|
|
14
14
|
[BlockType.InfoBlock]: InfoBlock,
|
|
15
|
+
[BlockType.SecurityBlock]: SecurityBlock,
|
|
15
16
|
[BlockType.TableBlock]: TableBlock,
|
|
16
17
|
[BlockType.TabsBlock]: TabsBlock,
|
|
17
18
|
[BlockType.LinkTableBlock]: LinkTableBlock,
|
|
@@ -16,6 +16,7 @@ export declare enum BlockType {
|
|
|
16
16
|
MediaBlock = "media-block",
|
|
17
17
|
PreviewBlock = "preview-block",
|
|
18
18
|
InfoBlock = "info-block",
|
|
19
|
+
SecurityBlock = "security-block",
|
|
19
20
|
TableBlock = "table-block",
|
|
20
21
|
TabsBlock = "tabs-block",
|
|
21
22
|
SimpleBlock = "simple-block",
|
|
@@ -203,6 +204,21 @@ export interface InfoBlockProps {
|
|
|
203
204
|
leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;
|
|
204
205
|
rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;
|
|
205
206
|
}
|
|
207
|
+
export interface SecurityBlockPoint {
|
|
208
|
+
img: string;
|
|
209
|
+
text: string;
|
|
210
|
+
link: {
|
|
211
|
+
text: string;
|
|
212
|
+
url: string;
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
export interface SecurityBlockProps extends Animatable {
|
|
216
|
+
theme?: TextTheme;
|
|
217
|
+
backgroundColor?: string;
|
|
218
|
+
title: string;
|
|
219
|
+
points?: SecurityBlockPoint[];
|
|
220
|
+
media: MediaProps;
|
|
221
|
+
}
|
|
206
222
|
export interface TableProps {
|
|
207
223
|
content: string[][];
|
|
208
224
|
legend?: string[];
|
|
@@ -337,6 +353,9 @@ export type PreviewBlockModel = {
|
|
|
337
353
|
export type InfoBlockModel = {
|
|
338
354
|
type: BlockType.InfoBlock;
|
|
339
355
|
} & InfoBlockProps;
|
|
356
|
+
export type SecurityBlockModel = {
|
|
357
|
+
type: BlockType.SecurityBlock;
|
|
358
|
+
} & SecurityBlockProps;
|
|
340
359
|
export type TableBlockModel = {
|
|
341
360
|
type: BlockType.TableBlock;
|
|
342
361
|
} & TableBlockProps;
|
|
@@ -367,6 +386,6 @@ export type ContentLayoutBlockModel = {
|
|
|
367
386
|
export type ShareBLockModel = {
|
|
368
387
|
type: BlockType.ShareBlock;
|
|
369
388
|
} & ShareBlockProps;
|
|
370
|
-
type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel;
|
|
389
|
+
type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel;
|
|
371
390
|
export type Block = BlockModels & BlockBaseProps;
|
|
372
391
|
export {};
|
|
@@ -11,6 +11,7 @@ export var BlockType;
|
|
|
11
11
|
BlockType["MediaBlock"] = "media-block";
|
|
12
12
|
BlockType["PreviewBlock"] = "preview-block";
|
|
13
13
|
BlockType["InfoBlock"] = "info-block";
|
|
14
|
+
BlockType["SecurityBlock"] = "security-block";
|
|
14
15
|
BlockType["TableBlock"] = "table-block";
|
|
15
16
|
BlockType["TabsBlock"] = "tabs-block";
|
|
16
17
|
BlockType["SimpleBlock"] = "simple-block";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { validators } from './validators';
|
|
2
|
-
import { BannerBlock, BannerCard, CardLayoutBlock, CompaniesBlock, ContentLayoutBlock, ExtendedFeaturesBlock, FilterBlock, HeaderBlock, HeaderSliderBlock, IconsBlock, InfoBlock, LinkTableBlock, MapBlock, MediaBlock, PreviewBlock, PromoFeaturesBlock, QuestionsBlock, ShareBlock, SimpleBlock, SliderBlock, TableBlock, TabsBlock, } from './validators/blocks';
|
|
2
|
+
import { BannerBlock, BannerCard, CardLayoutBlock, CompaniesBlock, ContentLayoutBlock, ExtendedFeaturesBlock, FilterBlock, HeaderBlock, HeaderSliderBlock, IconsBlock, InfoBlock, LinkTableBlock, MapBlock, MediaBlock, PreviewBlock, PromoFeaturesBlock, QuestionsBlock, SecurityBlock, ShareBlock, SimpleBlock, SliderBlock, TableBlock, TabsBlock, } from './validators/blocks';
|
|
3
3
|
import { AnimatableProps, BackgroundProps, MenuProps, withTheme } from './validators/common';
|
|
4
4
|
import { LogoProps, NavigationHeaderProps } from './validators/navigation';
|
|
5
5
|
import { BackgroundCard, BasicCard, CardWithImage, Divider, MediaCardBlock, NewsCard, PartnerBlock, PriceDetailedBlock, Quote, TutorialCard, } from './validators/sub-blocks';
|
|
@@ -9,7 +9,7 @@ export const getBlocksCases = (blocks) => {
|
|
|
9
9
|
};
|
|
10
10
|
export function generateDefaultSchema(config) {
|
|
11
11
|
const { cards = {}, blocks = {}, extensions = {} } = config !== null && config !== void 0 ? config : {};
|
|
12
|
-
const blockValidators = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Divider), ExtendedFeaturesBlock), PromoFeaturesBlock), SliderBlock), QuestionsBlock), HeaderBlock), BannerBlock), CompaniesBlock), MediaBlock), MapBlock), InfoBlock), TableBlock), TabsBlock), SimpleBlock), LinkTableBlock), PreviewBlock), HeaderSliderBlock), IconsBlock), CardLayoutBlock), ContentLayoutBlock), ShareBlock), FilterBlock);
|
|
12
|
+
const blockValidators = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Divider), ExtendedFeaturesBlock), PromoFeaturesBlock), SliderBlock), QuestionsBlock), HeaderBlock), BannerBlock), CompaniesBlock), MediaBlock), MapBlock), InfoBlock), SecurityBlock), TableBlock), TabsBlock), SimpleBlock), LinkTableBlock), PreviewBlock), HeaderSliderBlock), IconsBlock), CardLayoutBlock), ContentLayoutBlock), ShareBlock), FilterBlock);
|
|
13
13
|
const cardValidators = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, PartnerBlock), MediaCardBlock), BannerCard), PriceDetailedBlock), TutorialCard), BackgroundCard), NewsCard), CardWithImage), Quote), BasicCard);
|
|
14
14
|
const constructorBlockSchemaNames = [
|
|
15
15
|
'divider',
|
|
@@ -8,6 +8,7 @@ export * from '../../blocks/Info/schema';
|
|
|
8
8
|
export * from '../../blocks/Media/schema';
|
|
9
9
|
export * from '../../blocks/Map/schema';
|
|
10
10
|
export * from '../../blocks/Questions/schema';
|
|
11
|
+
export * from '../../blocks/Security/schema';
|
|
11
12
|
export * from '../../blocks/Slider/schema';
|
|
12
13
|
export * from '../../blocks/Table/schema';
|
|
13
14
|
export * from '../../blocks/LinkTable/schema';
|
|
@@ -8,6 +8,7 @@ export * from '../../blocks/Info/schema';
|
|
|
8
8
|
export * from '../../blocks/Media/schema';
|
|
9
9
|
export * from '../../blocks/Map/schema';
|
|
10
10
|
export * from '../../blocks/Questions/schema';
|
|
11
|
+
export * from '../../blocks/Security/schema';
|
|
11
12
|
export * from '../../blocks/Slider/schema';
|
|
12
13
|
export * from '../../blocks/Table/schema';
|
|
13
14
|
export * from '../../blocks/LinkTable/schema';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as blocks from './blocks';
|
|
2
2
|
import * as common from './common';
|
|
3
|
+
import * as components from './components';
|
|
3
4
|
import * as navigation from './navigation';
|
|
4
5
|
import * as pixel from './pixel';
|
|
5
6
|
import * as subBlocks from './sub-blocks';
|
|
@@ -7,6 +8,7 @@ import * as utils from './utils';
|
|
|
7
8
|
export declare const validators: {
|
|
8
9
|
blocks: typeof blocks;
|
|
9
10
|
common: typeof common;
|
|
11
|
+
components: typeof components;
|
|
10
12
|
subBlocks: typeof subBlocks;
|
|
11
13
|
pixel: typeof pixel;
|
|
12
14
|
utils: typeof utils;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as blocks from './blocks';
|
|
2
2
|
import * as common from './common';
|
|
3
|
+
import * as components from './components';
|
|
3
4
|
import * as navigation from './navigation';
|
|
4
5
|
import * as pixel from './pixel';
|
|
5
6
|
import * as subBlocks from './sub-blocks';
|
|
@@ -7,6 +8,7 @@ import * as utils from './utils';
|
|
|
7
8
|
export const validators = {
|
|
8
9
|
blocks,
|
|
9
10
|
common,
|
|
11
|
+
components,
|
|
10
12
|
subBlocks,
|
|
11
13
|
pixel,
|
|
12
14
|
utils,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/page-constructor",
|
|
3
|
-
"version": "2.13.0
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"description": "Gravity UI Page Constructor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -138,8 +138,5 @@
|
|
|
138
138
|
"*.{json,yaml,yml,md}": [
|
|
139
139
|
"prettier --write"
|
|
140
140
|
]
|
|
141
|
-
},
|
|
142
|
-
"publishConfig": {
|
|
143
|
-
"tag": "alpha"
|
|
144
141
|
}
|
|
145
142
|
}
|
|
@@ -16,6 +16,7 @@ export declare enum BlockType {
|
|
|
16
16
|
MediaBlock = "media-block",
|
|
17
17
|
PreviewBlock = "preview-block",
|
|
18
18
|
InfoBlock = "info-block",
|
|
19
|
+
SecurityBlock = "security-block",
|
|
19
20
|
TableBlock = "table-block",
|
|
20
21
|
TabsBlock = "tabs-block",
|
|
21
22
|
SimpleBlock = "simple-block",
|
|
@@ -203,6 +204,21 @@ export interface InfoBlockProps {
|
|
|
203
204
|
leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;
|
|
204
205
|
rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;
|
|
205
206
|
}
|
|
207
|
+
export interface SecurityBlockPoint {
|
|
208
|
+
img: string;
|
|
209
|
+
text: string;
|
|
210
|
+
link: {
|
|
211
|
+
text: string;
|
|
212
|
+
url: string;
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
export interface SecurityBlockProps extends Animatable {
|
|
216
|
+
theme?: TextTheme;
|
|
217
|
+
backgroundColor?: string;
|
|
218
|
+
title: string;
|
|
219
|
+
points?: SecurityBlockPoint[];
|
|
220
|
+
media: MediaProps;
|
|
221
|
+
}
|
|
206
222
|
export interface TableProps {
|
|
207
223
|
content: string[][];
|
|
208
224
|
legend?: string[];
|
|
@@ -337,6 +353,9 @@ export type PreviewBlockModel = {
|
|
|
337
353
|
export type InfoBlockModel = {
|
|
338
354
|
type: BlockType.InfoBlock;
|
|
339
355
|
} & InfoBlockProps;
|
|
356
|
+
export type SecurityBlockModel = {
|
|
357
|
+
type: BlockType.SecurityBlock;
|
|
358
|
+
} & SecurityBlockProps;
|
|
340
359
|
export type TableBlockModel = {
|
|
341
360
|
type: BlockType.TableBlock;
|
|
342
361
|
} & TableBlockProps;
|
|
@@ -367,6 +386,6 @@ export type ContentLayoutBlockModel = {
|
|
|
367
386
|
export type ShareBLockModel = {
|
|
368
387
|
type: BlockType.ShareBlock;
|
|
369
388
|
} & ShareBlockProps;
|
|
370
|
-
type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel;
|
|
389
|
+
type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel;
|
|
371
390
|
export type Block = BlockModels & BlockBaseProps;
|
|
372
391
|
export {};
|