@doyourjob/gravity-ui-page-constructor 5.31.141-dev.0 → 5.31.141-dev.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/Header.js +1 -2
- package/build/cjs/blocks/HeaderMinify/Button/Button.css +27 -0
- package/build/cjs/blocks/HeaderMinify/Button/Button.d.ts +3 -0
- package/build/cjs/blocks/HeaderMinify/Button/Button.js +17 -0
- package/build/cjs/blocks/HeaderMinify/HeaderMinify.css +35 -0
- package/build/cjs/blocks/HeaderMinify/HeaderMinify.d.ts +3 -0
- package/build/cjs/blocks/HeaderMinify/HeaderMinify.js +25 -0
- package/build/cjs/blocks/HeaderMinify/schema.d.ts +218 -0
- package/build/cjs/blocks/HeaderMinify/schema.js +41 -0
- package/build/cjs/blocks/index.d.ts +1 -0
- package/build/cjs/blocks/index.js +3 -1
- package/build/cjs/{blocks/Header → components}/BackgroundEffect/BackgroundEffect.css +1 -1
- package/build/cjs/{blocks/Header → components}/BackgroundEffect/BackgroundEffect.js +5 -5
- package/build/cjs/components/index.d.ts +1 -0
- package/build/cjs/components/index.js +3 -1
- 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 -2
- package/build/cjs/models/constructor-items/blocks.js +6 -1
- package/build/cjs/schema/constants.js +2 -1
- package/build/cjs/schema/validators/blocks.d.ts +1 -0
- package/build/cjs/schema/validators/blocks.js +1 -0
- package/build/cjs/text-transform/config.js +6 -0
- package/build/esm/blocks/Header/Header.js +1 -2
- package/build/esm/blocks/HeaderMinify/Button/Button.css +27 -0
- package/build/esm/blocks/HeaderMinify/Button/Button.d.ts +4 -0
- package/build/esm/blocks/HeaderMinify/Button/Button.js +13 -0
- package/build/esm/blocks/HeaderMinify/HeaderMinify.css +35 -0
- package/build/esm/blocks/HeaderMinify/HeaderMinify.d.ts +4 -0
- package/build/esm/blocks/HeaderMinify/HeaderMinify.js +21 -0
- package/build/esm/blocks/HeaderMinify/schema.d.ts +218 -0
- package/build/esm/blocks/HeaderMinify/schema.js +38 -0
- package/build/esm/blocks/index.d.ts +1 -0
- package/build/esm/blocks/index.js +1 -0
- package/build/esm/{blocks/Header → components}/BackgroundEffect/BackgroundEffect.css +1 -1
- package/build/esm/{blocks/Header → components}/BackgroundEffect/BackgroundEffect.js +2 -2
- package/build/esm/components/index.d.ts +1 -0
- package/build/esm/components/index.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 -2
- package/build/esm/models/constructor-items/blocks.js +6 -1
- package/build/esm/schema/constants.js +3 -2
- package/build/esm/schema/validators/blocks.d.ts +1 -0
- package/build/esm/schema/validators/blocks.js +1 -0
- package/build/esm/text-transform/config.js +6 -0
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +20 -2
- package/server/models/constructor-items/blocks.js +6 -1
- package/server/text-transform/config.js +6 -0
- package/widget/index.js +1 -1
- /package/build/cjs/{blocks/Header → components}/BackgroundEffect/BackgroundEffect.d.ts +0 -0
- /package/build/esm/{blocks/Header → components}/BackgroundEffect/BackgroundEffect.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useContext, useMemo, useRef } from 'react';
|
|
2
2
|
import { useUniqId } from '@gravity-ui/uikit';
|
|
3
|
-
import { HTML, Media } from '../../components';
|
|
3
|
+
import { BackgroundEffect, HTML, Media } from '../../components';
|
|
4
4
|
import { getMediaImage } from '../../components/Media/Image/utils';
|
|
5
5
|
import { HeaderContext } from '../../context/headerContext';
|
|
6
6
|
import { MobileContext } from '../../context/mobileContext';
|
|
@@ -8,7 +8,6 @@ import { useTheme } from '../../context/theme';
|
|
|
8
8
|
import { Col, Grid, Row } from '../../grid';
|
|
9
9
|
import { block, getThemedValue } from '../../utils';
|
|
10
10
|
import BackButton from './BackButton/BackButton';
|
|
11
|
-
import BackgroundEffect from './BackgroundEffect/BackgroundEffect';
|
|
12
11
|
import Breadcrumbs from './Breadcrumbs/Breadcrumbs';
|
|
13
12
|
import HeaderButtons from './HeaderButtons/HeaderButtons';
|
|
14
13
|
import HeaderDescription from './HeaderDescription/HeaderDescription';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-header-minify-button {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
padding: 16px 28px;
|
|
8
|
+
border-radius: 16px;
|
|
9
|
+
background: #001a2b;
|
|
10
|
+
color: #ffffff;
|
|
11
|
+
font-size: 24px;
|
|
12
|
+
line-height: 24px;
|
|
13
|
+
font-weight: 500;
|
|
14
|
+
letter-spacing: 0.01em;
|
|
15
|
+
text-decoration: none;
|
|
16
|
+
transition: opacity 0.3s ease;
|
|
17
|
+
}
|
|
18
|
+
.pc-header-minify-button__icon {
|
|
19
|
+
width: 24px;
|
|
20
|
+
height: 24px;
|
|
21
|
+
margin-right: 8px;
|
|
22
|
+
}
|
|
23
|
+
@media (hover: hover) and (pointer: fine) {
|
|
24
|
+
.pc-header-minify-button:hover {
|
|
25
|
+
opacity: 0.8;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ImageBase, RouterLink } from '../../../components';
|
|
3
|
+
import { block } from '../../../utils';
|
|
4
|
+
import './Button.css';
|
|
5
|
+
const b = block('header-minify-button');
|
|
6
|
+
export const Button = (props) => {
|
|
7
|
+
const { url, icon, text } = props;
|
|
8
|
+
return (React.createElement(RouterLink, { href: url },
|
|
9
|
+
React.createElement("a", { href: url, className: b('') },
|
|
10
|
+
icon ? (React.createElement(ImageBase, { className: b('icon'), src: icon, alt: "", "aria-hidden": "true" })) : null,
|
|
11
|
+
text)));
|
|
12
|
+
};
|
|
13
|
+
export default Button;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-header-minify-block {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
align-items: center;
|
|
7
|
+
position: relative;
|
|
8
|
+
z-index: 1;
|
|
9
|
+
color: #001a2b;
|
|
10
|
+
padding-top: 155px;
|
|
11
|
+
padding-bottom: 203px;
|
|
12
|
+
text-align: center;
|
|
13
|
+
}
|
|
14
|
+
.pc-header-minify-block__title {
|
|
15
|
+
font-size: 128px;
|
|
16
|
+
font-weight: 700;
|
|
17
|
+
line-height: 102px;
|
|
18
|
+
letter-spacing: -0.02em;
|
|
19
|
+
margin: 0;
|
|
20
|
+
position: relative;
|
|
21
|
+
}
|
|
22
|
+
.pc-header-minify-block__description {
|
|
23
|
+
margin-top: 24px;
|
|
24
|
+
position: relative;
|
|
25
|
+
opacity: 0.8;
|
|
26
|
+
max-width: 1024px;
|
|
27
|
+
}
|
|
28
|
+
.pc-header-minify-block__description .yfm {
|
|
29
|
+
font-size: var(--g-text-header-2-font-size, var(--pc-text-header-2-font-size));
|
|
30
|
+
line-height: var(--g-text-header-2-line-height, var(--pc-text-header-2-line-height));
|
|
31
|
+
}
|
|
32
|
+
.pc-header-minify-block__buttons {
|
|
33
|
+
position: relative;
|
|
34
|
+
margin-top: 48px;
|
|
35
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import { BackgroundEffect, HTML, YFMWrapper } from '../../components';
|
|
3
|
+
import { block } from '../../utils';
|
|
4
|
+
import Button from './Button/Button';
|
|
5
|
+
import './HeaderMinify.css';
|
|
6
|
+
const b = block('header-minify-block');
|
|
7
|
+
const modifiers = {
|
|
8
|
+
constructor: true,
|
|
9
|
+
};
|
|
10
|
+
export const HeaderMinifyBlock = (props) => {
|
|
11
|
+
const { title, description, button, backgroundEffect } = props;
|
|
12
|
+
const headerRef = useRef(null);
|
|
13
|
+
return (React.createElement("header", { ref: headerRef, className: b() },
|
|
14
|
+
backgroundEffect && backgroundEffect.firstSrc && backgroundEffect.secondSrc && (React.createElement(BackgroundEffect, Object.assign({}, backgroundEffect, { attachRef: headerRef }))),
|
|
15
|
+
React.createElement("h1", { className: b('title') },
|
|
16
|
+
React.createElement(HTML, null, title)),
|
|
17
|
+
description && (React.createElement("div", { className: b('description') },
|
|
18
|
+
React.createElement(YFMWrapper, { content: description, modifiers: modifiers }))),
|
|
19
|
+
React.createElement("div", { className: b('buttons') }, button && React.createElement(Button, Object.assign({}, button)))));
|
|
20
|
+
};
|
|
21
|
+
export default HeaderMinifyBlock;
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
export declare const HeaderMinifyProperties: {
|
|
2
|
+
title: {
|
|
3
|
+
type: string;
|
|
4
|
+
contentType: string;
|
|
5
|
+
};
|
|
6
|
+
description: {
|
|
7
|
+
type: string;
|
|
8
|
+
contentType: string;
|
|
9
|
+
inputType: string;
|
|
10
|
+
};
|
|
11
|
+
button: {
|
|
12
|
+
type: string;
|
|
13
|
+
additionalProperties: boolean;
|
|
14
|
+
required: string[];
|
|
15
|
+
properties: {
|
|
16
|
+
icon: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
text: {
|
|
20
|
+
type: string;
|
|
21
|
+
};
|
|
22
|
+
url: {
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
backgroundEffect: {
|
|
28
|
+
type: string;
|
|
29
|
+
additionalProperties: boolean;
|
|
30
|
+
required: string[];
|
|
31
|
+
properties: {
|
|
32
|
+
firstSrc: {
|
|
33
|
+
type: string;
|
|
34
|
+
};
|
|
35
|
+
secondSrc: {
|
|
36
|
+
type: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export declare const HeaderMinifyBlock: {
|
|
42
|
+
'header-minify-block': {
|
|
43
|
+
additionalProperties: boolean;
|
|
44
|
+
required: string[];
|
|
45
|
+
properties: {
|
|
46
|
+
title: {
|
|
47
|
+
type: string;
|
|
48
|
+
contentType: string;
|
|
49
|
+
};
|
|
50
|
+
description: {
|
|
51
|
+
type: string;
|
|
52
|
+
contentType: string;
|
|
53
|
+
inputType: string;
|
|
54
|
+
};
|
|
55
|
+
button: {
|
|
56
|
+
type: string;
|
|
57
|
+
additionalProperties: boolean;
|
|
58
|
+
required: string[];
|
|
59
|
+
properties: {
|
|
60
|
+
icon: {
|
|
61
|
+
type: string;
|
|
62
|
+
};
|
|
63
|
+
text: {
|
|
64
|
+
type: string;
|
|
65
|
+
};
|
|
66
|
+
url: {
|
|
67
|
+
type: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
backgroundEffect: {
|
|
72
|
+
type: string;
|
|
73
|
+
additionalProperties: boolean;
|
|
74
|
+
required: string[];
|
|
75
|
+
properties: {
|
|
76
|
+
firstSrc: {
|
|
77
|
+
type: string;
|
|
78
|
+
};
|
|
79
|
+
secondSrc: {
|
|
80
|
+
type: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
anchor: {
|
|
85
|
+
type: string;
|
|
86
|
+
additionalProperties: boolean;
|
|
87
|
+
required: string[];
|
|
88
|
+
properties: {
|
|
89
|
+
text: {
|
|
90
|
+
type: string;
|
|
91
|
+
contentType: string;
|
|
92
|
+
};
|
|
93
|
+
url: {
|
|
94
|
+
type: string;
|
|
95
|
+
};
|
|
96
|
+
urlTitle: {
|
|
97
|
+
type: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
visibility: {
|
|
102
|
+
oneOf: ({
|
|
103
|
+
type: string;
|
|
104
|
+
enum: string[];
|
|
105
|
+
additionalProperties?: undefined;
|
|
106
|
+
properties?: undefined;
|
|
107
|
+
} | {
|
|
108
|
+
type: string;
|
|
109
|
+
additionalProperties: boolean;
|
|
110
|
+
properties: {
|
|
111
|
+
xs: {
|
|
112
|
+
type: string;
|
|
113
|
+
};
|
|
114
|
+
sm: {
|
|
115
|
+
type: string;
|
|
116
|
+
};
|
|
117
|
+
md: {
|
|
118
|
+
type: string;
|
|
119
|
+
};
|
|
120
|
+
lg: {
|
|
121
|
+
type: string;
|
|
122
|
+
};
|
|
123
|
+
xl: {
|
|
124
|
+
type: string;
|
|
125
|
+
};
|
|
126
|
+
xxl: {
|
|
127
|
+
type: string;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
enum?: undefined;
|
|
131
|
+
})[];
|
|
132
|
+
};
|
|
133
|
+
visible: {
|
|
134
|
+
type: string;
|
|
135
|
+
enum: string[];
|
|
136
|
+
};
|
|
137
|
+
hidden: {
|
|
138
|
+
type: string;
|
|
139
|
+
enum: string[];
|
|
140
|
+
};
|
|
141
|
+
resetPaddings: {
|
|
142
|
+
type: string;
|
|
143
|
+
};
|
|
144
|
+
context: {
|
|
145
|
+
type: string;
|
|
146
|
+
};
|
|
147
|
+
indent: {
|
|
148
|
+
type: string;
|
|
149
|
+
additionalProperties: boolean;
|
|
150
|
+
properties: {
|
|
151
|
+
top: {
|
|
152
|
+
enum: string[];
|
|
153
|
+
};
|
|
154
|
+
bottom: {
|
|
155
|
+
enum: string[];
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
backgroundFull: {
|
|
160
|
+
type: string;
|
|
161
|
+
};
|
|
162
|
+
visibilityFilter: {
|
|
163
|
+
oneOf: ({
|
|
164
|
+
type: string;
|
|
165
|
+
items?: undefined;
|
|
166
|
+
} | {
|
|
167
|
+
type: string;
|
|
168
|
+
items: {
|
|
169
|
+
type: string;
|
|
170
|
+
};
|
|
171
|
+
})[];
|
|
172
|
+
};
|
|
173
|
+
blockBackground: {
|
|
174
|
+
oneOf: ({
|
|
175
|
+
type: string;
|
|
176
|
+
additionalProperties?: undefined;
|
|
177
|
+
properties?: undefined;
|
|
178
|
+
} | {
|
|
179
|
+
type: string;
|
|
180
|
+
additionalProperties: boolean;
|
|
181
|
+
properties: {
|
|
182
|
+
color: {
|
|
183
|
+
type: string;
|
|
184
|
+
};
|
|
185
|
+
image: {
|
|
186
|
+
type: string;
|
|
187
|
+
};
|
|
188
|
+
size: {
|
|
189
|
+
type: string;
|
|
190
|
+
};
|
|
191
|
+
repeat: {
|
|
192
|
+
type: string;
|
|
193
|
+
};
|
|
194
|
+
position: {
|
|
195
|
+
type: string;
|
|
196
|
+
};
|
|
197
|
+
attachment: {
|
|
198
|
+
type: string;
|
|
199
|
+
};
|
|
200
|
+
clip: {
|
|
201
|
+
type: string;
|
|
202
|
+
};
|
|
203
|
+
origin: {
|
|
204
|
+
type: string;
|
|
205
|
+
};
|
|
206
|
+
blendMode: {
|
|
207
|
+
type: string;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
})[];
|
|
211
|
+
};
|
|
212
|
+
type: {};
|
|
213
|
+
when: {
|
|
214
|
+
type: string;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { BlockBaseProps } from '../../schema/validators/common';
|
|
2
|
+
export const HeaderMinifyProperties = {
|
|
3
|
+
title: {
|
|
4
|
+
type: 'string',
|
|
5
|
+
contentType: 'text',
|
|
6
|
+
},
|
|
7
|
+
description: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
contentType: 'yfm',
|
|
10
|
+
inputType: 'textarea',
|
|
11
|
+
},
|
|
12
|
+
button: {
|
|
13
|
+
type: 'object',
|
|
14
|
+
additionalProperties: false,
|
|
15
|
+
required: ['text', 'url'],
|
|
16
|
+
properties: {
|
|
17
|
+
icon: { type: 'string' },
|
|
18
|
+
text: { type: 'string' },
|
|
19
|
+
url: { type: 'string' },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
backgroundEffect: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
additionalProperties: false,
|
|
25
|
+
required: ['firstSrc', 'secondSrc'],
|
|
26
|
+
properties: {
|
|
27
|
+
firstSrc: { type: 'string' },
|
|
28
|
+
secondSrc: { type: 'string' },
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
export const HeaderMinifyBlock = {
|
|
33
|
+
'header-minify-block': {
|
|
34
|
+
additionalProperties: false,
|
|
35
|
+
required: ['title'],
|
|
36
|
+
properties: Object.assign(Object.assign({}, BlockBaseProps), HeaderMinifyProperties),
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -15,6 +15,7 @@ export { default as TabsBlock } from './Tabs/Tabs';
|
|
|
15
15
|
export { default as TabsHighlightTableBlock } from './TabsHighlightTable/TabsHighlightTable';
|
|
16
16
|
export { default as TabLinksBlock } from './TabLinks/TabLinks';
|
|
17
17
|
export { default as HeaderBlock } from './Header/Header';
|
|
18
|
+
export { default as HeaderMinifyBlock } from './HeaderMinify/HeaderMinify';
|
|
18
19
|
export { default as IconsBlock } from './Icons/Icons';
|
|
19
20
|
export { default as HeaderSliderBlock } from './HeaderSlider/HeaderSlider';
|
|
20
21
|
export { default as CardLayoutBlock } from './CardLayout/CardLayout';
|
|
@@ -15,6 +15,7 @@ export { default as TabsBlock } from './Tabs/Tabs';
|
|
|
15
15
|
export { default as TabsHighlightTableBlock } from './TabsHighlightTable/TabsHighlightTable';
|
|
16
16
|
export { default as TabLinksBlock } from './TabLinks/TabLinks';
|
|
17
17
|
export { default as HeaderBlock } from './Header/Header';
|
|
18
|
+
export { default as HeaderMinifyBlock } from './HeaderMinify/HeaderMinify';
|
|
18
19
|
export { default as IconsBlock } from './Icons/Icons';
|
|
19
20
|
export { default as HeaderSliderBlock } from './HeaderSlider/HeaderSlider';
|
|
20
21
|
export { default as CardLayoutBlock } from './CardLayout/CardLayout';
|
|
@@ -18,7 +18,7 @@ unpredictable css rules order in build */
|
|
|
18
18
|
transition: clip-path 0.5s linear;
|
|
19
19
|
clip-path: inset(0 0 0 99.99%);
|
|
20
20
|
}
|
|
21
|
-
.pc-header-block:hover .pc-background-effect__right {
|
|
21
|
+
.pc-header-block:hover .pc-background-effect__right, .pc-header-minify-block:hover .pc-background-effect__right {
|
|
22
22
|
transition: none;
|
|
23
23
|
}
|
|
24
24
|
.pc-background-effect__video {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { block } from '../../utils';
|
|
3
|
+
import { parseVideoType } from '../Media/Video/utils';
|
|
4
4
|
import './BackgroundEffect.css';
|
|
5
5
|
const b = block('background-effect');
|
|
6
6
|
const SYNC_THRESHOLD = 0.03;
|
|
@@ -47,5 +47,6 @@ export { default as EmptyPlug } from './EmptyPlug/EmptyPlug';
|
|
|
47
47
|
export { default as ReportSection } from './ReportSection/ReportSection';
|
|
48
48
|
export { default as ReportItem } from './ReportItem/ReportItem';
|
|
49
49
|
export { default as Odometer } from './Odometer/Odometer';
|
|
50
|
+
export { default as BackgroundEffect } from './BackgroundEffect/BackgroundEffect';
|
|
50
51
|
export type { RouterLinkProps } from './RouterLink/RouterLink';
|
|
51
52
|
export type { ImageBaseProps } from './ImageBase/ImageBase';
|
|
@@ -47,3 +47,4 @@ export { default as EmptyPlug } from './EmptyPlug/EmptyPlug';
|
|
|
47
47
|
export { default as ReportSection } from './ReportSection/ReportSection';
|
|
48
48
|
export { default as ReportItem } from './ReportItem/ReportItem';
|
|
49
49
|
export { default as Odometer } from './Odometer/Odometer';
|
|
50
|
+
export { default as BackgroundEffect } from './BackgroundEffect/BackgroundEffect';
|
|
@@ -14,6 +14,7 @@ export declare const blockMap: {
|
|
|
14
14
|
"tabs-highlight-table-block": ({ items, title, description, animated, tabsColSizes, centered, }: import("./models").TabsHighlightTableBlockProps) => JSX.Element;
|
|
15
15
|
"tab-links-block": ({ items }: import("./models").TabLinksBlockProps) => JSX.Element;
|
|
16
16
|
"header-block": (props: import("react").PropsWithChildren<import("./models").HeaderBlockProps & import("./models").ClassNameProps>) => JSX.Element;
|
|
17
|
+
"header-minify-block": (props: import("./models").HeaderMinifyBlockProps) => JSX.Element;
|
|
17
18
|
"icons-block": ({ title, description, size, colSizes, items }: import("./models").IconsBlockProps) => JSX.Element;
|
|
18
19
|
"header-slider-block": ({ items, arrows, ...props }: import("./models").HeaderSliderBlockProps) => JSX.Element;
|
|
19
20
|
"card-layout-block": import("react").FC<import("./blocks/CardLayout/CardLayout").CardLayoutBlockProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdvantagesBlock, BannerBlock, BenchmarkBlock, BlogFeedBlock, CardLayoutBlock, CompaniesBlock, ContentLayoutBlock, EventsFeedBlock, EventsSectionBlock, ExtendedFeaturesBlock, FilterBlock, FilterCardLayoutBlock, FormBlock, FormWallBlock, HeaderBlock, HeaderSliderBlock, HighlightTableBlock, IconsBlock, InfoBlock, LinkTableBlock, LogoRotatorBlock, MapBlock, MarqueeLinksBlock, MediaBlock, MiniCaseBlock, PressReleasesBlock, PromoFeaturesBlock, QuestionsBlock, QuotesBlock, RelevantPostsBlock, RelevantReportsBlock, RelevantReportsCardsBlock, ReportsBlock, ReportsCardsBlock, ReportsSectionsBlock, ServicesBlock, ShareBlock, SliderBlock, SliderNewBlock, SolutionsBlock, TabLinksBlock, TableBlock, TabsBlock, TabsHighlightTableBlock, } from './blocks';
|
|
1
|
+
import { AdvantagesBlock, BannerBlock, BenchmarkBlock, BlogFeedBlock, CardLayoutBlock, CompaniesBlock, ContentLayoutBlock, EventsFeedBlock, EventsSectionBlock, ExtendedFeaturesBlock, FilterBlock, FilterCardLayoutBlock, FormBlock, FormWallBlock, HeaderBlock, HeaderMinifyBlock, HeaderSliderBlock, HighlightTableBlock, IconsBlock, InfoBlock, LinkTableBlock, LogoRotatorBlock, MapBlock, MarqueeLinksBlock, MediaBlock, MiniCaseBlock, PressReleasesBlock, PromoFeaturesBlock, QuestionsBlock, QuotesBlock, RelevantPostsBlock, RelevantReportsBlock, RelevantReportsCardsBlock, ReportsBlock, ReportsCardsBlock, ReportsSectionsBlock, ServicesBlock, ShareBlock, SliderBlock, SliderNewBlock, SolutionsBlock, TabLinksBlock, TableBlock, TabsBlock, TabsHighlightTableBlock, } from './blocks';
|
|
2
2
|
import { BlockType, NavigationItemType, SubBlockType } from './models';
|
|
3
3
|
import { GithubButton, NavigationButton, NavigationDropdown, NavigationLink, } from './navigation/components/NavigationItem';
|
|
4
4
|
import SocialIcon from './navigation/components/SocialIcon/SocialIcon';
|
|
@@ -19,6 +19,7 @@ export const blockMap = {
|
|
|
19
19
|
[BlockType.TabsHighlightTableBlock]: TabsHighlightTableBlock,
|
|
20
20
|
[BlockType.TabLinksBlock]: TabLinksBlock,
|
|
21
21
|
[BlockType.HeaderBlock]: HeaderBlock,
|
|
22
|
+
[BlockType.HeaderMinifyBlock]: HeaderMinifyBlock,
|
|
22
23
|
[BlockType.IconsBlock]: IconsBlock,
|
|
23
24
|
[BlockType.HeaderSliderBlock]: HeaderSliderBlock,
|
|
24
25
|
[BlockType.CardLayoutBlock]: CardLayoutBlock,
|
|
@@ -22,6 +22,7 @@ export declare enum BlockType {
|
|
|
22
22
|
TabLinksBlock = "tab-links-block",
|
|
23
23
|
HeaderSliderBlock = "header-slider-block",
|
|
24
24
|
HeaderBlock = "header-block",
|
|
25
|
+
HeaderMinifyBlock = "header-minify-block",
|
|
25
26
|
IconsBlock = "icons-block",
|
|
26
27
|
CardLayoutBlock = "card-layout-block",
|
|
27
28
|
ContentLayoutBlock = "content-layout-block",
|
|
@@ -176,7 +177,7 @@ export interface SwitchingTitleProps {
|
|
|
176
177
|
text: string;
|
|
177
178
|
switchingTime?: number;
|
|
178
179
|
}
|
|
179
|
-
export type HeaderButtonType = Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'size' | 'extraProps'>;
|
|
180
|
+
export type HeaderButtonType = Pick<ButtonProps, 'url' | 'text' | 'img' | 'theme' | 'primary' | 'size' | 'extraProps'>;
|
|
180
181
|
export interface HeaderBlockProps {
|
|
181
182
|
title: string;
|
|
182
183
|
switchingTitle?: SwitchingTitleProps;
|
|
@@ -211,6 +212,20 @@ export interface HeaderBlockProps {
|
|
|
211
212
|
};
|
|
212
213
|
headerSpace?: boolean;
|
|
213
214
|
}
|
|
215
|
+
export interface HeaderMinifyButtonProps {
|
|
216
|
+
url: string;
|
|
217
|
+
icon?: string;
|
|
218
|
+
text: string;
|
|
219
|
+
}
|
|
220
|
+
export interface HeaderMinifyBlockProps {
|
|
221
|
+
title: string;
|
|
222
|
+
description?: string;
|
|
223
|
+
button?: HeaderMinifyButtonProps;
|
|
224
|
+
backgroundEffect?: {
|
|
225
|
+
firstSrc: string;
|
|
226
|
+
secondSrc: string;
|
|
227
|
+
};
|
|
228
|
+
}
|
|
214
229
|
export interface ExtendedFeaturesItem extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {
|
|
215
230
|
title: Pick<TitleItemProps, 'text' | 'textSize'> | string;
|
|
216
231
|
label?: string;
|
|
@@ -654,6 +669,9 @@ export interface FormBlockProps {
|
|
|
654
669
|
export type HeaderBlockModel = {
|
|
655
670
|
type: BlockType.HeaderBlock;
|
|
656
671
|
} & HeaderBlockProps;
|
|
672
|
+
export type HeaderMinifyBlockModel = {
|
|
673
|
+
type: BlockType.HeaderMinifyBlock;
|
|
674
|
+
} & HeaderMinifyBlockProps;
|
|
657
675
|
export type SliderBlockModel = {
|
|
658
676
|
type: BlockType.SliderBlock;
|
|
659
677
|
} & SliderProps;
|
|
@@ -783,6 +801,6 @@ export type FormWallBlockModel = {
|
|
|
783
801
|
export type SliderNewBlockModel = {
|
|
784
802
|
type: BlockType.SliderNewBlock;
|
|
785
803
|
} & SliderNewProps;
|
|
786
|
-
type BlockModels = SliderBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | BannerBlockModel | LogoRotatorBlockModel | AdvantagesBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | TableBlockModel | HighlightTableBlockModel | MiniCaseBlockModel | TabsBlockModel | TabsHighlightTableBlockModel | TabLinksBlockModel | HeaderBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel | FilterCardLayoutBlockModel | FormBlockModel | MarqueeLinksBlockModel | SolutionsBlockModel | ServicesBlockModel | QuotesBlockModel | ReportsBlockModel | ReportsCardsBlockModel | ReportsSectionsBlockModel | LinkTableBlockModel | EventsFeedBlockModel | BenchmarkBlockModel | EventsSectionBlockModel | BlogFeedBlockModel | RelevantPostsBlockModel | RelevantReportsCardsBlockModel | RelevantReportsBlockModel | PressReleasesBlockModel | FormWallBlockModel | SliderNewBlockModel;
|
|
804
|
+
type BlockModels = SliderBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | BannerBlockModel | LogoRotatorBlockModel | AdvantagesBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | TableBlockModel | HighlightTableBlockModel | MiniCaseBlockModel | TabsBlockModel | TabsHighlightTableBlockModel | TabLinksBlockModel | HeaderBlockModel | HeaderMinifyBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel | FilterCardLayoutBlockModel | FormBlockModel | MarqueeLinksBlockModel | SolutionsBlockModel | ServicesBlockModel | QuotesBlockModel | ReportsBlockModel | ReportsCardsBlockModel | ReportsSectionsBlockModel | LinkTableBlockModel | EventsFeedBlockModel | BenchmarkBlockModel | EventsSectionBlockModel | BlogFeedBlockModel | RelevantPostsBlockModel | RelevantReportsCardsBlockModel | RelevantReportsBlockModel | PressReleasesBlockModel | FormWallBlockModel | SliderNewBlockModel;
|
|
787
805
|
export type Block = BlockModels & BlockBaseProps;
|
|
788
806
|
export {};
|
|
@@ -16,6 +16,7 @@ export var BlockType;
|
|
|
16
16
|
BlockType["TabLinksBlock"] = "tab-links-block";
|
|
17
17
|
BlockType["HeaderSliderBlock"] = "header-slider-block";
|
|
18
18
|
BlockType["HeaderBlock"] = "header-block";
|
|
19
|
+
BlockType["HeaderMinifyBlock"] = "header-minify-block";
|
|
19
20
|
BlockType["IconsBlock"] = "icons-block";
|
|
20
21
|
BlockType["CardLayoutBlock"] = "card-layout-block";
|
|
21
22
|
BlockType["ContentLayoutBlock"] = "content-layout-block";
|
|
@@ -46,7 +47,11 @@ export var BlockType;
|
|
|
46
47
|
BlockType["BenchmarkBlock"] = "benchmark-block";
|
|
47
48
|
})(BlockType || (BlockType = {}));
|
|
48
49
|
export const BlockTypes = Object.values(BlockType);
|
|
49
|
-
export const HeaderBlockTypes = [
|
|
50
|
+
export const HeaderBlockTypes = [
|
|
51
|
+
BlockType.HeaderBlock,
|
|
52
|
+
BlockType.HeaderSliderBlock,
|
|
53
|
+
BlockType.HeaderMinifyBlock,
|
|
54
|
+
];
|
|
50
55
|
export var SliderBreakpointNames;
|
|
51
56
|
(function (SliderBreakpointNames) {
|
|
52
57
|
SliderBreakpointNames["Sm"] = "sm";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AdvantagesBlock, BannerBlock, BannerCard, BenchmarkBlock, BlogFeedBlock, CardLayoutBlock, CompaniesBlock, ContentLayoutBlock, EventsFeedBlock, EventsSectionBlock, ExtendedFeaturesBlock, FilterBlock, FilterCardLayoutBlock, FormBlock, FormWallBlock, HeaderBlock, HeaderSliderBlock, HighlightTableBlock, IconsBlock, InfoBlock, LinkTableBlock, LogoRotatorBlock, MapBlock, MarqueeLinksBlock, MediaBlock, MiniCaseBlock, PressReleasesBlock, PromoFeaturesBlock, QuestionsBlock, QuotesBlock, RelevantPostsBlock, RelevantReportsBlock, RelevantReportsCardsBlock, ReportsBlock, ReportsCardsBlock, ReportsSectionsBlock, ServicesBlock, ShareBlock, SliderBlock, SliderNewBlock, SolutionsBlock, TabLinksBlock, TableBlock, TabsBlock, TabsHighlightTableBlock, } from './validators/blocks';
|
|
1
|
+
import { AdvantagesBlock, BannerBlock, BannerCard, BenchmarkBlock, BlogFeedBlock, CardLayoutBlock, CompaniesBlock, ContentLayoutBlock, EventsFeedBlock, EventsSectionBlock, ExtendedFeaturesBlock, FilterBlock, FilterCardLayoutBlock, FormBlock, FormWallBlock, HeaderBlock, HeaderMinifyBlock, HeaderSliderBlock, HighlightTableBlock, IconsBlock, InfoBlock, LinkTableBlock, LogoRotatorBlock, MapBlock, MarqueeLinksBlock, MediaBlock, MiniCaseBlock, PressReleasesBlock, PromoFeaturesBlock, QuestionsBlock, QuotesBlock, RelevantPostsBlock, RelevantReportsBlock, RelevantReportsCardsBlock, ReportsBlock, ReportsCardsBlock, ReportsSectionsBlock, ServicesBlock, ShareBlock, SliderBlock, SliderNewBlock, SolutionsBlock, TabLinksBlock, TableBlock, TabsBlock, TabsHighlightTableBlock, } from './validators/blocks';
|
|
2
2
|
import { AttachmentCard, BackgroundCard, BasicCard, Card, CaseStudyCard, ContentLayoutCard, Divider, EventPersonCard, FeedCard, ImageCard, MediaCardBlock, PostCard, PriceCardBlock, PriceDetailedBlock, Quote, StoryCard, } from './validators/sub-blocks';
|
|
3
|
-
export const blockSchemas = 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(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), AdvantagesBlock), SliderBlock), QuestionsBlock), HeaderBlock), BannerBlock), LogoRotatorBlock), CompaniesBlock), MediaBlock), MapBlock), InfoBlock), TableBlock), HighlightTableBlock), MiniCaseBlock), TabsBlock), TabsHighlightTableBlock), TabLinksBlock), HeaderSliderBlock), IconsBlock), CardLayoutBlock), ContentLayoutBlock), ShareBlock), FilterBlock), FilterCardLayoutBlock), FormBlock), SliderNewBlock), MarqueeLinksBlock), SolutionsBlock), ServicesBlock), QuotesBlock), ReportsBlock), ReportsCardsBlock), ReportsSectionsBlock), LinkTableBlock), EventsFeedBlock), BenchmarkBlock), EventsSectionBlock), BlogFeedBlock), RelevantPostsBlock), RelevantReportsCardsBlock), RelevantReportsBlock), PressReleasesBlock), FormWallBlock);
|
|
3
|
+
export const blockSchemas = 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(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), AdvantagesBlock), SliderBlock), QuestionsBlock), HeaderBlock), HeaderMinifyBlock), BannerBlock), LogoRotatorBlock), CompaniesBlock), MediaBlock), MapBlock), InfoBlock), TableBlock), HighlightTableBlock), MiniCaseBlock), TabsBlock), TabsHighlightTableBlock), TabLinksBlock), HeaderSliderBlock), IconsBlock), CardLayoutBlock), ContentLayoutBlock), ShareBlock), FilterBlock), FilterCardLayoutBlock), FormBlock), SliderNewBlock), MarqueeLinksBlock), SolutionsBlock), ServicesBlock), QuotesBlock), ReportsBlock), ReportsCardsBlock), ReportsSectionsBlock), LinkTableBlock), EventsFeedBlock), BenchmarkBlock), EventsSectionBlock), BlogFeedBlock), RelevantPostsBlock), RelevantReportsCardsBlock), RelevantReportsBlock), PressReleasesBlock), FormWallBlock);
|
|
4
4
|
export const cardSchemas = 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({}, MediaCardBlock), BannerCard), PriceDetailedBlock), BackgroundCard), Quote), BasicCard), PriceCardBlock), ImageCard), ContentLayoutCard), Card), PostCard), FeedCard), EventPersonCard), AttachmentCard), CaseStudyCard), StoryCard);
|
|
5
5
|
export const constructorBlockSchemaNames = [
|
|
6
6
|
'divider',
|
|
@@ -11,6 +11,7 @@ export const constructorBlockSchemaNames = [
|
|
|
11
11
|
'slider-new-block',
|
|
12
12
|
'questions-block',
|
|
13
13
|
'header-block',
|
|
14
|
+
'header-minify-block',
|
|
14
15
|
'banner-block',
|
|
15
16
|
'logo-rotator-block',
|
|
16
17
|
'companies-block',
|
|
@@ -358,6 +358,12 @@ export const config = {
|
|
|
358
358
|
transformer: yfmTransformer,
|
|
359
359
|
},
|
|
360
360
|
],
|
|
361
|
+
[BlockType.HeaderMinifyBlock]: [
|
|
362
|
+
{
|
|
363
|
+
fields: ['description'],
|
|
364
|
+
transformer: yfmTransformer,
|
|
365
|
+
},
|
|
366
|
+
],
|
|
361
367
|
[BlockType.ContentLayoutBlock]: [
|
|
362
368
|
{
|
|
363
369
|
fields: ['textContent'],
|