@gravity-ui/page-constructor 1.15.0-alpha.21 → 1.15.0-alpha.22
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/Banner/schema.d.ts +0 -9
- package/build/cjs/blocks/Banner/schema.js +1 -3
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +78 -0
- package/build/cjs/blocks/Header/schema.d.ts +0 -156
- package/build/cjs/blocks/Header/schema.js +0 -4
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +0 -78
- package/build/cjs/blocks/Info/schema.d.ts +0 -3
- package/build/cjs/blocks/Info/schema.js +0 -2
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +1 -2
- package/build/cjs/blocks/Preview/schema.d.ts +0 -3
- package/build/cjs/blocks/Preview/schema.js +1 -3
- package/build/cjs/blocks/Security/schema.d.ts +0 -3
- package/build/cjs/blocks/Security/schema.js +1 -3
- package/build/cjs/blocks/Tabs/schema.d.ts +78 -0
- package/build/cjs/components/BackLink/BackLink.d.ts +0 -1
- package/build/cjs/components/BackLink/BackLink.js +4 -2
- package/build/cjs/components/Button/Button.js +1 -4
- package/build/cjs/components/ButtonTabs/ButtonTabs.d.ts +0 -1
- package/build/cjs/components/CardBase/CardBase.d.ts +2 -4
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.css +30 -0
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +7 -2
- package/build/cjs/components/Link/Link.js +1 -1
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +1 -1
- package/build/cjs/components/YandexForm/YandexForm.d.ts +2 -4
- package/build/cjs/components/YandexForm/YandexForm.js +2 -2
- package/build/cjs/models/common.d.ts +3 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +0 -10
- package/build/cjs/models/constructor-items/common.d.ts +5 -13
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +3 -7
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +5 -3
- package/build/cjs/schema/validators/common.d.ts +78 -0
- package/build/cjs/schema/validators/common.js +2 -0
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +0 -3
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +0 -2
- package/build/cjs/sub-blocks/HubspotForm/index.js +1 -1
- package/build/cjs/sub-blocks/Quote/Quote.js +2 -2
- package/build/cjs/sub-blocks/Quote/schema.d.ts +0 -3
- package/build/cjs/sub-blocks/Quote/schema.js +1 -3
- package/build/esm/blocks/Banner/schema.d.ts +0 -9
- package/build/esm/blocks/Banner/schema.js +1 -3
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +78 -0
- package/build/esm/blocks/Header/schema.d.ts +0 -156
- package/build/esm/blocks/Header/schema.js +0 -4
- package/build/esm/blocks/HeaderSlider/schema.d.ts +0 -78
- package/build/esm/blocks/Info/schema.d.ts +0 -3
- package/build/esm/blocks/Info/schema.js +0 -2
- package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +1 -2
- package/build/esm/blocks/Preview/schema.d.ts +0 -3
- package/build/esm/blocks/Preview/schema.js +1 -3
- package/build/esm/blocks/Security/schema.d.ts +0 -3
- package/build/esm/blocks/Security/schema.js +1 -3
- package/build/esm/blocks/Tabs/schema.d.ts +78 -0
- package/build/esm/components/BackLink/BackLink.d.ts +0 -1
- package/build/esm/components/BackLink/BackLink.js +4 -2
- package/build/esm/components/Button/Button.js +1 -4
- package/build/esm/components/ButtonTabs/ButtonTabs.d.ts +0 -1
- package/build/esm/components/CardBase/CardBase.d.ts +2 -4
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.css +30 -0
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +7 -2
- package/build/esm/components/Link/Link.js +1 -1
- package/build/esm/components/ReactPlayer/ReactPlayer.js +1 -1
- package/build/esm/components/YandexForm/YandexForm.d.ts +2 -4
- package/build/esm/components/YandexForm/YandexForm.js +2 -2
- package/build/esm/models/common.d.ts +3 -0
- package/build/esm/models/constructor-items/blocks.d.ts +0 -10
- package/build/esm/models/constructor-items/common.d.ts +5 -13
- package/build/esm/models/constructor-items/sub-blocks.d.ts +3 -7
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js +5 -3
- package/build/esm/schema/validators/common.d.ts +78 -0
- package/build/esm/schema/validators/common.js +2 -0
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +0 -3
- package/build/esm/sub-blocks/BackgroundCard/schema.js +0 -2
- package/build/esm/sub-blocks/HubspotForm/index.js +1 -1
- package/build/esm/sub-blocks/Quote/Quote.js +2 -2
- package/build/esm/sub-blocks/Quote/schema.d.ts +0 -3
- package/build/esm/sub-blocks/Quote/schema.js +1 -3
- package/package.json +1 -1
- package/server/models/common.d.ts +3 -0
- package/server/models/constructor-items/blocks.d.ts +0 -10
- package/server/models/constructor-items/common.d.ts +5 -13
- package/server/models/constructor-items/sub-blocks.d.ts +3 -7
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.css +0 -30
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.d.ts +0 -12
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.js +0 -28
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.css +0 -30
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.d.ts +0 -13
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbsItem.js +0 -25
|
@@ -1,6 +1,36 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* use this for style redefinitions to awoid problems with
|
|
3
|
+
unpredictable css rules order in build */
|
|
1
4
|
.pc-header-breadcrumbs {
|
|
2
5
|
z-index: 11;
|
|
3
6
|
}
|
|
7
|
+
.pc-header-breadcrumbs__item {
|
|
8
|
+
display: inline-block;
|
|
9
|
+
}
|
|
10
|
+
.pc-header-breadcrumbs__text {
|
|
11
|
+
font-size: var(--yc-text-body-2-font-size);
|
|
12
|
+
line-height: var(--yc-text-body-2-line-height);
|
|
13
|
+
outline: none;
|
|
14
|
+
color: var(--yc-color-text-link);
|
|
15
|
+
text-decoration: none;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
color: var(--yc-color-text-secondary);
|
|
18
|
+
}
|
|
19
|
+
.utilityfocus .pc-header-breadcrumbs__text:focus {
|
|
20
|
+
outline: 2px solid #ffdb4d;
|
|
21
|
+
}
|
|
22
|
+
.pc-header-breadcrumbs__text:hover, .pc-header-breadcrumbs__text:active {
|
|
23
|
+
--pc-text-header-color: var(--yc-color-text-link-hover);
|
|
24
|
+
color: var(--yc-color-text-link-hover);
|
|
25
|
+
}
|
|
26
|
+
.pc-header-breadcrumbs__text:after {
|
|
27
|
+
content: " / ";
|
|
28
|
+
margin: 0 8px 0 6px;
|
|
29
|
+
color: var(--yc-color-text-secondary);
|
|
30
|
+
}
|
|
31
|
+
.pc-header-breadcrumbs__text:hover {
|
|
32
|
+
color: var(--yc-color-text-primary);
|
|
33
|
+
}
|
|
4
34
|
.pc-header-breadcrumbs_theme_dark .pc-header-breadcrumbs__text {
|
|
5
35
|
color: var(--yc-color-text-light-secondary);
|
|
6
36
|
}
|
|
@@ -3,10 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
|
-
const
|
|
6
|
+
const useMetrika_1 = require("../../hooks/useMetrika");
|
|
7
7
|
const b = (0, utils_1.block)('header-breadcrumbs');
|
|
8
8
|
function HeaderBreadcrumbs(props) {
|
|
9
9
|
const { items, metrikaGoals, pixelEvents, theme = 'light', className } = props;
|
|
10
|
-
|
|
10
|
+
const handleMetrika = (0, useMetrika_1.useMetrika)();
|
|
11
|
+
const onClick = () => {
|
|
12
|
+
handleMetrika({ metrikaGoals, pixelEvents });
|
|
13
|
+
};
|
|
14
|
+
return (react_1.default.createElement("div", { className: b({ theme }, className) }, items.map((item) => (react_1.default.createElement("div", { className: b('item'), key: item.url },
|
|
15
|
+
react_1.default.createElement("a", { href: item.url, className: b('text'), onClick: onClick }, item.text))))));
|
|
11
16
|
}
|
|
12
17
|
exports.default = HeaderBreadcrumbs;
|
|
@@ -10,9 +10,9 @@ const FileLink_1 = tslib_1.__importDefault(require("../FileLink/FileLink"));
|
|
|
10
10
|
const BackLink_1 = tslib_1.__importDefault(require("../BackLink/BackLink"));
|
|
11
11
|
const localeContext_1 = require("../../context/localeContext/localeContext");
|
|
12
12
|
const locationContext_1 = require("../../context/locationContext/locationContext");
|
|
13
|
+
const blockPositionContext_1 = require("../../context/blockPositionContext");
|
|
13
14
|
const useMetrika_1 = require("../../hooks/useMetrika");
|
|
14
15
|
const hooks_1 = require("../../hooks");
|
|
15
|
-
const blockPositionContext_1 = require("../../context/blockPositionContext");
|
|
16
16
|
const b = (0, utils_1.block)('link-block');
|
|
17
17
|
const WORD_JOINER_SYM = '\u200b';
|
|
18
18
|
function getArrowSize(size) {
|
|
@@ -46,7 +46,7 @@ exports.ReactPlayerBlock = react_1.default.forwardRef((props, originRef) => {
|
|
|
46
46
|
const defaultEvent = (0, react_1.useMemo)(() => ({
|
|
47
47
|
name: 'react-player-controls-click',
|
|
48
48
|
type: models_1.PredefinedEventTypes.Default,
|
|
49
|
-
context
|
|
49
|
+
context,
|
|
50
50
|
}), [context]);
|
|
51
51
|
const handleAnalytics = (0, hooks_1.useAnalytics)(defaultEvent);
|
|
52
52
|
(0, react_1.useImperativeHandle)(originRef, () => ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PixelEvent } from '../../models';
|
|
2
|
-
import {
|
|
2
|
+
import { AnalyticsEventsBase } from '../../models/common';
|
|
3
3
|
export declare const YANDEX_FORM_ORIGIN = "https://forms.yandex.ru";
|
|
4
|
-
export interface YandexFormProps {
|
|
4
|
+
export interface YandexFormProps extends AnalyticsEventsBase {
|
|
5
5
|
id: number | string;
|
|
6
6
|
containerId?: string;
|
|
7
7
|
theme?: string;
|
|
@@ -15,8 +15,6 @@ export interface YandexFormProps {
|
|
|
15
15
|
onLoad?: () => void;
|
|
16
16
|
metrikaGoals?: string | string[];
|
|
17
17
|
pixelEvents?: string | string[] | PixelEvent | PixelEvent[];
|
|
18
|
-
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
19
|
-
context?: string;
|
|
20
18
|
}
|
|
21
19
|
declare const YandexForm: (props: YandexFormProps) => JSX.Element;
|
|
22
20
|
export default YandexForm;
|
|
@@ -6,11 +6,11 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const constants_1 = require("../constants");
|
|
7
7
|
const localeContext_1 = require("../../context/localeContext");
|
|
8
8
|
const mobileContext_1 = require("../../context/mobileContext");
|
|
9
|
+
const blockPositionContext_1 = require("../../context/blockPositionContext");
|
|
9
10
|
const utils_1 = require("../../utils");
|
|
10
|
-
const useMetrika_1 = require("../../hooks/useMetrika");
|
|
11
11
|
const common_1 = require("../../models/common");
|
|
12
|
+
const useMetrika_1 = require("../../hooks/useMetrika");
|
|
12
13
|
const hooks_1 = require("../../hooks");
|
|
13
|
-
const blockPositionContext_1 = require("../../context/blockPositionContext");
|
|
14
14
|
exports.YANDEX_FORM_ORIGIN = 'https://forms.yandex.ru';
|
|
15
15
|
const CONTAINER_ID = 'pc-yandex-form-container';
|
|
16
16
|
const b = (0, utils_1.block)('yandex-form');
|
|
@@ -109,7 +109,6 @@ export interface HeaderBlockProps {
|
|
|
109
109
|
verticalOffset?: 's' | 'm' | 'l' | 'xl';
|
|
110
110
|
breadcrumbs?: HeaderBreadCrumbsProps;
|
|
111
111
|
status?: JSX.Element;
|
|
112
|
-
context?: string;
|
|
113
112
|
}
|
|
114
113
|
export type CalculatorProps = Animatable;
|
|
115
114
|
export interface SimpleBlockProps extends Animatable, Childable {
|
|
@@ -128,7 +127,6 @@ export interface ExtendedFeaturesProps extends Animatable {
|
|
|
128
127
|
title?: TitleProps | string;
|
|
129
128
|
description?: string;
|
|
130
129
|
colSizes?: GridColumnSizesType;
|
|
131
|
-
context?: string;
|
|
132
130
|
}
|
|
133
131
|
export interface PromoFeaturesItem {
|
|
134
132
|
title: string;
|
|
@@ -141,7 +139,6 @@ export interface PromoFeaturesProps extends Animatable {
|
|
|
141
139
|
title?: TitleProps | string;
|
|
142
140
|
description?: string;
|
|
143
141
|
theme?: 'grey' | 'default';
|
|
144
|
-
context?: string;
|
|
145
142
|
}
|
|
146
143
|
export interface QuestionItem {
|
|
147
144
|
title: string;
|
|
@@ -166,7 +163,6 @@ export interface MediaContentProps {
|
|
|
166
163
|
links?: LinkProps[];
|
|
167
164
|
buttons?: ButtonProps[];
|
|
168
165
|
size?: ContentSize;
|
|
169
|
-
context?: string;
|
|
170
166
|
}
|
|
171
167
|
export interface MediaBlockProps extends Animatable, MediaContentProps {
|
|
172
168
|
media: ThemeSupporting<MediaProps>;
|
|
@@ -184,7 +180,6 @@ export interface PreviewBlockProps extends Animatable {
|
|
|
184
180
|
ratioMediaContent?: PreviewRatioMediaContent;
|
|
185
181
|
stopVideo?: boolean;
|
|
186
182
|
showImmediately?: boolean;
|
|
187
|
-
context?: string;
|
|
188
183
|
}
|
|
189
184
|
export interface InfoBlockProps {
|
|
190
185
|
theme?: TextTheme;
|
|
@@ -199,7 +194,6 @@ export interface InfoBlockProps {
|
|
|
199
194
|
links?: Pick<LinkProps, 'text' | 'url'>[];
|
|
200
195
|
leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;
|
|
201
196
|
rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;
|
|
202
|
-
context?: string;
|
|
203
197
|
}
|
|
204
198
|
export interface SecurityBlockPoint {
|
|
205
199
|
img: string;
|
|
@@ -215,7 +209,6 @@ export interface SecurityBlockProps extends Animatable {
|
|
|
215
209
|
title: string;
|
|
216
210
|
points?: SecurityBlockPoint[];
|
|
217
211
|
media: MediaProps;
|
|
218
|
-
context?: string;
|
|
219
212
|
}
|
|
220
213
|
export interface TableProps {
|
|
221
214
|
content: string[][];
|
|
@@ -242,7 +235,6 @@ export interface TabsBlockProps extends BlockHeaderProps, Animatable {
|
|
|
242
235
|
centered?: boolean;
|
|
243
236
|
direction?: MediaDirection;
|
|
244
237
|
items: TabsBlockItem[];
|
|
245
|
-
context?: string;
|
|
246
238
|
}
|
|
247
239
|
export interface LinkTableBlockProps extends BlockHeaderProps {
|
|
248
240
|
items: LinkProps[][];
|
|
@@ -272,7 +264,6 @@ export interface ContentLayoutBlockProps {
|
|
|
272
264
|
};
|
|
273
265
|
textContent: ContentBlockProps;
|
|
274
266
|
fileContent?: FileLinkProps[];
|
|
275
|
-
context?: string;
|
|
276
267
|
}
|
|
277
268
|
export interface ContentBlockProps {
|
|
278
269
|
title?: TitleBaseProps | string;
|
|
@@ -284,7 +275,6 @@ export interface ContentBlockProps {
|
|
|
284
275
|
colSizes?: GridColumnSizesType;
|
|
285
276
|
centered?: boolean;
|
|
286
277
|
theme?: ContentTheme;
|
|
287
|
-
context?: string;
|
|
288
278
|
}
|
|
289
279
|
export declare enum PCShareSocialNetwork {
|
|
290
280
|
Vk = "vk",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { ButtonSize, ButtonView } from '@gravity-ui/uikit';
|
|
3
3
|
import { ThemeSupporting } from '../../utils/theme';
|
|
4
|
-
import {
|
|
4
|
+
import { AnalyticsEventsBase, ClassNameProps, PixelEventType } from '../common';
|
|
5
5
|
export declare enum AuthorType {
|
|
6
6
|
Column = "column",
|
|
7
7
|
Line = "line"
|
|
@@ -100,7 +100,7 @@ export interface BackgroundImageProps extends React.HTMLProps<HTMLDivElement>, P
|
|
|
100
100
|
imageClassName?: string;
|
|
101
101
|
hide?: boolean;
|
|
102
102
|
}
|
|
103
|
-
export interface MediaVideoProps {
|
|
103
|
+
export interface MediaVideoProps extends AnalyticsEventsBase {
|
|
104
104
|
src: string[];
|
|
105
105
|
type?: MediaVideoType;
|
|
106
106
|
loop?: LoopProps | boolean;
|
|
@@ -110,10 +110,8 @@ export interface MediaVideoProps {
|
|
|
110
110
|
playButton?: PlayButtonProps;
|
|
111
111
|
controls?: MediaVideoControlsType;
|
|
112
112
|
metrika?: MetrikaVideo;
|
|
113
|
-
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
114
|
-
context?: string;
|
|
115
113
|
}
|
|
116
|
-
export interface LinkProps extends Stylable {
|
|
114
|
+
export interface LinkProps extends AnalyticsEventsBase, Stylable {
|
|
117
115
|
url: string;
|
|
118
116
|
text?: string;
|
|
119
117
|
textSize?: TextSize;
|
|
@@ -123,7 +121,6 @@ export interface LinkProps extends Stylable {
|
|
|
123
121
|
target?: string;
|
|
124
122
|
metrikaGoals?: MetrikaGoal;
|
|
125
123
|
pixelEvents?: ButtonPixel;
|
|
126
|
-
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
127
124
|
context?: string;
|
|
128
125
|
}
|
|
129
126
|
export interface FileLinkProps extends ClassNameProps {
|
|
@@ -134,7 +131,7 @@ export interface FileLinkProps extends ClassNameProps {
|
|
|
134
131
|
theme?: ContentTheme;
|
|
135
132
|
onClick?: () => void;
|
|
136
133
|
}
|
|
137
|
-
export interface ButtonProps {
|
|
134
|
+
export interface ButtonProps extends AnalyticsEventsBase {
|
|
138
135
|
text: string;
|
|
139
136
|
url: string;
|
|
140
137
|
primary?: boolean;
|
|
@@ -143,7 +140,6 @@ export interface ButtonProps {
|
|
|
143
140
|
img?: ButtonImageProps | string;
|
|
144
141
|
metrikaGoals?: MetrikaGoal;
|
|
145
142
|
pixelEvents?: ButtonPixel;
|
|
146
|
-
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
147
143
|
target?: string;
|
|
148
144
|
context?: string;
|
|
149
145
|
}
|
|
@@ -169,12 +165,10 @@ export interface MediaVideoProps {
|
|
|
169
165
|
metrika?: MetrikaVideo;
|
|
170
166
|
}
|
|
171
167
|
export type ThemedMediaVideoProps = ThemeSupporting<MediaVideoProps>;
|
|
172
|
-
export interface MediaComponentVideoProps {
|
|
168
|
+
export interface MediaComponentVideoProps extends AnalyticsEventsBase {
|
|
173
169
|
video: MediaVideoProps;
|
|
174
170
|
height?: number;
|
|
175
171
|
metrika?: MetrikaVideo;
|
|
176
|
-
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
177
|
-
context?: string;
|
|
178
172
|
previewImg?: string;
|
|
179
173
|
}
|
|
180
174
|
export interface MediaComponentYoutubeProps {
|
|
@@ -226,12 +220,10 @@ export interface HeaderBreadCrumbsProps extends ClassNameProps {
|
|
|
226
220
|
items: {
|
|
227
221
|
url: string;
|
|
228
222
|
text: ReactNode;
|
|
229
|
-
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
230
223
|
}[];
|
|
231
224
|
theme?: TextTheme;
|
|
232
225
|
metrikaGoals?: MetrikaGoal;
|
|
233
226
|
pixelEvents?: ButtonPixel;
|
|
234
|
-
context?: string;
|
|
235
227
|
}
|
|
236
228
|
export interface PreviewContentItemProps {
|
|
237
229
|
title: string;
|
|
@@ -3,7 +3,7 @@ import { ThemeSupporting } from '../../utils';
|
|
|
3
3
|
import { HubspotEventData, HubspotEventHandlers } from '../../utils/hubspot';
|
|
4
4
|
import { AuthorItem, ButtonPixel, ButtonProps, CardBaseProps, ContentTheme, DividerSize, ImageObjectProps, ImageProps, LinkProps, MediaProps, PriceDetailedProps, TextTheme, Themable, ThemedImage } from './common';
|
|
5
5
|
import { ContentBlockProps } from './blocks';
|
|
6
|
-
import {
|
|
6
|
+
import { AnalyticsEventsBase, PixelEvent } from '../common';
|
|
7
7
|
export declare enum SubBlockType {
|
|
8
8
|
Divider = "divider",
|
|
9
9
|
Quote = "quote",
|
|
@@ -34,7 +34,7 @@ export interface DividerProps {
|
|
|
34
34
|
size?: DividerSize;
|
|
35
35
|
border?: boolean;
|
|
36
36
|
}
|
|
37
|
-
export interface HubspotFormProps extends HubspotEventHandlers {
|
|
37
|
+
export interface HubspotFormProps extends HubspotEventHandlers, AnalyticsEventsBase {
|
|
38
38
|
className?: string;
|
|
39
39
|
theme?: ContentTheme;
|
|
40
40
|
isMobile?: boolean;
|
|
@@ -61,8 +61,6 @@ export interface HubspotFormProps extends HubspotEventHandlers {
|
|
|
61
61
|
onLoad?: (arg: HubspotEventData) => void;
|
|
62
62
|
pixelEvents?: string | string[] | PixelEvent | PixelEvent[] | ButtonPixel;
|
|
63
63
|
hubspotEvents?: string[];
|
|
64
|
-
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
65
|
-
context?: string;
|
|
66
64
|
}
|
|
67
65
|
export interface PartnerProps extends CardBaseProps {
|
|
68
66
|
text: string;
|
|
@@ -78,7 +76,6 @@ export interface QuoteProps extends Themable, CardBaseProps {
|
|
|
78
76
|
author?: AuthorItem;
|
|
79
77
|
buttonText?: string;
|
|
80
78
|
theme?: TextTheme;
|
|
81
|
-
context?: string;
|
|
82
79
|
}
|
|
83
80
|
export interface NewsCardData {
|
|
84
81
|
id: number;
|
|
@@ -113,7 +110,6 @@ export interface BannerCardProps {
|
|
|
113
110
|
color?: ThemeSupporting<string>;
|
|
114
111
|
theme?: TextTheme;
|
|
115
112
|
button: Pick<ButtonProps, 'text' | 'url' | 'target'>;
|
|
116
|
-
context?: string;
|
|
117
113
|
}
|
|
118
114
|
export interface MediaCardProps extends MediaProps, CardBaseProps {
|
|
119
115
|
}
|
|
@@ -121,7 +117,7 @@ export interface CardWithImageLinkProps extends Omit<LinkProps, 'text' | 'url'>
|
|
|
121
117
|
title: string;
|
|
122
118
|
link: string;
|
|
123
119
|
}
|
|
124
|
-
export interface CardWithImageProps extends ClassNameProps, Pick<ContentBlockProps, 'title' | 'additionalInfo' | 'buttons' | 'theme'
|
|
120
|
+
export interface CardWithImageProps extends ClassNameProps, Pick<ContentBlockProps, 'title' | 'additionalInfo' | 'buttons' | 'theme'> {
|
|
125
121
|
image: string;
|
|
126
122
|
description?: string;
|
|
127
123
|
disableCompress?: boolean;
|
|
@@ -10,7 +10,6 @@ const icons_1 = require("../../../icons");
|
|
|
10
10
|
const SocialIcon_1 = tslib_1.__importDefault(require("../SocialIcon/SocialIcon"));
|
|
11
11
|
const utils_2 = require("../../../components/Media/Image/utils");
|
|
12
12
|
const b = (0, utils_1.block)('navigation-item');
|
|
13
|
-
const BLOCK_NAME = 'navigation';
|
|
14
13
|
const Content = ({ text, icon }) => (react_1.default.createElement(react_1.Fragment, null,
|
|
15
14
|
icon && typeof icon !== 'string' && react_1.default.createElement(components_1.Image, Object.assign({ className: b('icon') }, icon)),
|
|
16
15
|
react_1.default.createElement("span", { className: b('text') }, text)));
|
|
@@ -39,8 +38,11 @@ const NavigationLink = (props) => {
|
|
|
39
38
|
};
|
|
40
39
|
const NavigationButton = (props) => {
|
|
41
40
|
const { url, target } = props;
|
|
42
|
-
return target ? (
|
|
43
|
-
|
|
41
|
+
return target ? (
|
|
42
|
+
// discuss how to be with this component
|
|
43
|
+
// <Button {...props} url={url} context={BLOCK_NAME} />
|
|
44
|
+
react_1.default.createElement(components_1.Button, Object.assign({}, props, { url: url }))) : (react_1.default.createElement(components_1.RouterLink, { href: url },
|
|
45
|
+
react_1.default.createElement(components_1.Button, Object.assign({}, props, { url: url }))));
|
|
44
46
|
};
|
|
45
47
|
//todo: add types support form component in map
|
|
46
48
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -318,6 +318,84 @@ export declare const LinkProps: {
|
|
|
318
318
|
type: string;
|
|
319
319
|
enum: string[];
|
|
320
320
|
};
|
|
321
|
+
analyticsEvents: {
|
|
322
|
+
anyOf: ({
|
|
323
|
+
type: string;
|
|
324
|
+
additionalProperties: {
|
|
325
|
+
type: string;
|
|
326
|
+
};
|
|
327
|
+
required: string[];
|
|
328
|
+
properties: {
|
|
329
|
+
name: {
|
|
330
|
+
type: string;
|
|
331
|
+
};
|
|
332
|
+
type: {
|
|
333
|
+
type: string;
|
|
334
|
+
};
|
|
335
|
+
counters: {
|
|
336
|
+
type: string;
|
|
337
|
+
additionalProperties: boolean;
|
|
338
|
+
required: never[];
|
|
339
|
+
properties: {
|
|
340
|
+
include: {
|
|
341
|
+
type: string;
|
|
342
|
+
items: {
|
|
343
|
+
type: string;
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
exclude: {
|
|
347
|
+
type: string;
|
|
348
|
+
items: {
|
|
349
|
+
type: string;
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
context: {
|
|
355
|
+
type: string;
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
} | {
|
|
359
|
+
type: string;
|
|
360
|
+
items: {
|
|
361
|
+
type: string;
|
|
362
|
+
additionalProperties: {
|
|
363
|
+
type: string;
|
|
364
|
+
};
|
|
365
|
+
required: string[];
|
|
366
|
+
properties: {
|
|
367
|
+
name: {
|
|
368
|
+
type: string;
|
|
369
|
+
};
|
|
370
|
+
type: {
|
|
371
|
+
type: string;
|
|
372
|
+
};
|
|
373
|
+
counters: {
|
|
374
|
+
type: string;
|
|
375
|
+
additionalProperties: boolean;
|
|
376
|
+
required: never[];
|
|
377
|
+
properties: {
|
|
378
|
+
include: {
|
|
379
|
+
type: string;
|
|
380
|
+
items: {
|
|
381
|
+
type: string;
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
exclude: {
|
|
385
|
+
type: string;
|
|
386
|
+
items: {
|
|
387
|
+
type: string;
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
context: {
|
|
393
|
+
type: string;
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
})[];
|
|
398
|
+
};
|
|
321
399
|
type: {};
|
|
322
400
|
when: {};
|
|
323
401
|
};
|
|
@@ -178,6 +178,8 @@ exports.LinkProps = {
|
|
|
178
178
|
}, target: {
|
|
179
179
|
type: 'string',
|
|
180
180
|
enum: ['_blank', '_parent', '_top', '_self'],
|
|
181
|
+
}, analyticsEvents: {
|
|
182
|
+
anyOf: [event_1.AnalyticsEventSchema, { type: 'array', items: event_1.AnalyticsEventSchema }],
|
|
181
183
|
} }),
|
|
182
184
|
};
|
|
183
185
|
exports.FileLinkProps = {
|
|
@@ -5,11 +5,11 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
6
|
const ThemeValueContext_1 = require("../../context/theme/ThemeValueContext");
|
|
7
7
|
const mobileContext_1 = require("../../context/mobileContext");
|
|
8
|
+
const blockPositionContext_1 = require("../../context/blockPositionContext");
|
|
8
9
|
const useMetrika_1 = require("../../hooks/useMetrika");
|
|
9
10
|
const models_1 = require("../../models");
|
|
10
11
|
const hooks_1 = require("../../hooks");
|
|
11
12
|
const HubspotFormContainer_1 = tslib_1.__importDefault(require("./HubspotFormContainer"));
|
|
12
|
-
const blockPositionContext_1 = require("../../context/blockPositionContext");
|
|
13
13
|
const b = (0, utils_1.block)('hubspot-form');
|
|
14
14
|
const HubspotForm = (props) => {
|
|
15
15
|
const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName, pixelEvents,
|
|
@@ -7,16 +7,16 @@ const utils_1 = require("../../utils");
|
|
|
7
7
|
const models_1 = require("../../models");
|
|
8
8
|
const components_1 = require("../../components");
|
|
9
9
|
const ThemeValueContext_1 = require("../../context/theme/ThemeValueContext");
|
|
10
|
+
const blockPositionContext_1 = require("../../context/blockPositionContext");
|
|
10
11
|
const utils_2 = require("../../components/Media/Image/utils");
|
|
11
12
|
const hooks_1 = require("../../hooks");
|
|
12
|
-
const blockPositionContext_1 = require("../../context/blockPositionContext");
|
|
13
13
|
const b = (0, utils_1.block)('quote');
|
|
14
14
|
const Quote = (props) => {
|
|
15
15
|
const { theme: textTheme = 'light', color, image, border = 'shadow', text, logo, author, url, buttonText, } = props;
|
|
16
16
|
const { themeValue: theme } = (0, react_1.useContext)(ThemeValueContext_1.ThemeValueContext);
|
|
17
|
+
const context = (0, react_1.useContext)(blockPositionContext_1.BlockPositionContext);
|
|
17
18
|
const imageThemed = (0, utils_1.getThemedValue)(image, theme);
|
|
18
19
|
const imageData = (0, utils_2.getMediaImage)(imageThemed);
|
|
19
|
-
const context = (0, react_1.useContext)(blockPositionContext_1.BlockPositionContext);
|
|
20
20
|
const defaultEvent = (0, react_1.useMemo)(() => ({
|
|
21
21
|
name: 'quote-button-click',
|
|
22
22
|
type: models_1.PredefinedEventTypes.Default,
|
|
@@ -18,8 +18,6 @@ exports.Quote = {
|
|
|
18
18
|
}, url: {
|
|
19
19
|
type: 'string',
|
|
20
20
|
pattern: schema_1.urlPattern,
|
|
21
|
-
}, theme: common_1.ThemeProps, author: common_1.authorItem,
|
|
22
|
-
type: 'string',
|
|
23
|
-
} }),
|
|
21
|
+
}, theme: common_1.ThemeProps, author: common_1.authorItem }),
|
|
24
22
|
},
|
|
25
23
|
};
|
|
@@ -270,9 +270,6 @@ export declare const BannerCardProps: {
|
|
|
270
270
|
required: string[];
|
|
271
271
|
};
|
|
272
272
|
};
|
|
273
|
-
context: {
|
|
274
|
-
type: string;
|
|
275
|
-
};
|
|
276
273
|
animated: {
|
|
277
274
|
type: string;
|
|
278
275
|
};
|
|
@@ -553,9 +550,6 @@ export declare const BannerBlock: {
|
|
|
553
550
|
required: string[];
|
|
554
551
|
};
|
|
555
552
|
};
|
|
556
|
-
context: {
|
|
557
|
-
type: string;
|
|
558
|
-
};
|
|
559
553
|
animated: {
|
|
560
554
|
type: string;
|
|
561
555
|
};
|
|
@@ -837,9 +831,6 @@ export declare const BannerCard: {
|
|
|
837
831
|
required: string[];
|
|
838
832
|
};
|
|
839
833
|
};
|
|
840
|
-
context: {
|
|
841
|
-
type: string;
|
|
842
|
-
};
|
|
843
834
|
animated: {
|
|
844
835
|
type: string;
|
|
845
836
|
};
|
|
@@ -17,9 +17,7 @@ export const BannerCardProps = {
|
|
|
17
17
|
}), theme: ThemeProps, width: {
|
|
18
18
|
type: 'string',
|
|
19
19
|
enum: ['s', 'm', 'l'],
|
|
20
|
-
}, button: ButtonBlock,
|
|
21
|
-
type: 'string',
|
|
22
|
-
} }),
|
|
20
|
+
}, button: ButtonBlock }),
|
|
23
21
|
};
|
|
24
22
|
export const BannerBlock = {
|
|
25
23
|
'banner-block': BannerCardProps,
|
|
@@ -41,6 +41,84 @@ export declare const ExtendedFeaturesItem: {
|
|
|
41
41
|
type: string;
|
|
42
42
|
enum: string[];
|
|
43
43
|
};
|
|
44
|
+
analyticsEvents: {
|
|
45
|
+
anyOf: ({
|
|
46
|
+
type: string;
|
|
47
|
+
additionalProperties: {
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
required: string[];
|
|
51
|
+
properties: {
|
|
52
|
+
name: {
|
|
53
|
+
type: string;
|
|
54
|
+
};
|
|
55
|
+
type: {
|
|
56
|
+
type: string;
|
|
57
|
+
};
|
|
58
|
+
counters: {
|
|
59
|
+
type: string;
|
|
60
|
+
additionalProperties: boolean;
|
|
61
|
+
required: never[];
|
|
62
|
+
properties: {
|
|
63
|
+
include: {
|
|
64
|
+
type: string;
|
|
65
|
+
items: {
|
|
66
|
+
type: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
exclude: {
|
|
70
|
+
type: string;
|
|
71
|
+
items: {
|
|
72
|
+
type: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
context: {
|
|
78
|
+
type: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
} | {
|
|
82
|
+
type: string;
|
|
83
|
+
items: {
|
|
84
|
+
type: string;
|
|
85
|
+
additionalProperties: {
|
|
86
|
+
type: string;
|
|
87
|
+
};
|
|
88
|
+
required: string[];
|
|
89
|
+
properties: {
|
|
90
|
+
name: {
|
|
91
|
+
type: string;
|
|
92
|
+
};
|
|
93
|
+
type: {
|
|
94
|
+
type: string;
|
|
95
|
+
};
|
|
96
|
+
counters: {
|
|
97
|
+
type: string;
|
|
98
|
+
additionalProperties: boolean;
|
|
99
|
+
required: never[];
|
|
100
|
+
properties: {
|
|
101
|
+
include: {
|
|
102
|
+
type: string;
|
|
103
|
+
items: {
|
|
104
|
+
type: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
exclude: {
|
|
108
|
+
type: string;
|
|
109
|
+
items: {
|
|
110
|
+
type: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
context: {
|
|
116
|
+
type: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
})[];
|
|
121
|
+
};
|
|
44
122
|
type: {};
|
|
45
123
|
when: {};
|
|
46
124
|
};
|