@gravity-ui/page-constructor 1.15.0-alpha.21 → 1.15.0-alpha.23
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 +88 -0
- package/README.md +3 -15
- 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/Slider/Arrow/Arrow.js +2 -2
- package/build/cjs/blocks/Slider/Slider.css +0 -4
- 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/Foldable/Foldable.css +4 -1
- package/build/cjs/components/Foldable/Foldable.js +7 -10
- package/build/cjs/components/FullscreenImage/FullscreenImage.js +8 -6
- package/build/cjs/components/FullscreenMedia/FullScreenMedia.css +70 -0
- package/build/cjs/components/FullscreenMedia/FullScreenMedia.d.ts +9 -0
- package/build/cjs/components/FullscreenMedia/FullScreenMedia.js +40 -0
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.css +30 -0
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +7 -2
- package/build/cjs/components/HeightCalculator/HeightCalculator.d.ts +4 -0
- package/build/cjs/components/HeightCalculator/HeightCalculator.js +4 -0
- package/build/cjs/components/Link/Link.js +1 -1
- package/build/cjs/components/Media/Media.js +3 -2
- package/build/cjs/components/MetaInfo/MetaInfo.css +13 -0
- package/build/cjs/components/MetaInfo/MetaInfo.d.ts +6 -0
- package/build/cjs/components/MetaInfo/MetaInfo.js +8 -0
- package/build/cjs/components/MetaInfo/schema.d.ts +8 -0
- package/build/cjs/components/MetaInfo/schema.js +10 -0
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +1 -1
- package/build/cjs/components/VideoBlock/VideoBlock.d.ts +1 -0
- package/build/cjs/components/VideoBlock/VideoBlock.js +6 -10
- package/build/cjs/components/YandexForm/YandexForm.d.ts +2 -4
- package/build/cjs/components/YandexForm/YandexForm.js +2 -2
- package/build/cjs/components/index.d.ts +2 -0
- package/build/cjs/components/index.js +5 -1
- package/build/cjs/constructor-items.d.ts +4 -0
- package/build/cjs/constructor-items.js +4 -0
- package/build/cjs/containers/PageConstructor/PageConstructor.css +1 -0
- package/build/cjs/hooks/useHeightCalculator.d.ts +6 -0
- package/build/cjs/hooks/useHeightCalculator.js +27 -0
- 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 +6 -30
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +18 -7
- package/build/cjs/models/constructor-items/sub-blocks.js +4 -0
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +5 -3
- package/build/cjs/schema/index.js +1 -0
- package/build/cjs/schema/validators/common.d.ts +78 -0
- package/build/cjs/schema/validators/common.js +2 -0
- package/build/cjs/schema/validators/sub-blocks.d.ts +1 -0
- package/build/cjs/schema/validators/sub-blocks.js +1 -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/BannerCard/BannerCard.js +2 -1
- package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +14 -9
- package/build/cjs/sub-blocks/HubspotForm/HubspotFormContainer.d.ts +1 -1
- package/build/cjs/sub-blocks/HubspotForm/HubspotFormContainer.js +26 -8
- package/build/cjs/sub-blocks/HubspotForm/index.js +5 -3
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.css +16 -0
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.d.ts +3 -0
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +21 -0
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +218 -0
- package/build/cjs/sub-blocks/LayoutItem/schema.js +18 -0
- package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +29 -0
- package/build/cjs/sub-blocks/LayoutItem/utils.js +12 -0
- 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/cjs/sub-blocks/index.d.ts +1 -0
- package/build/cjs/sub-blocks/index.js +3 -1
- package/build/cjs/text-transform/blocks.js +17 -0
- package/build/cjs/utils/hubspot.d.ts +2 -1
- package/build/cjs/utils/hubspot.js +5 -1
- 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/Slider/Arrow/Arrow.js +2 -2
- package/build/esm/blocks/Slider/Slider.css +0 -4
- 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/Foldable/Foldable.css +4 -1
- package/build/esm/components/Foldable/Foldable.js +8 -11
- package/build/esm/components/FullscreenImage/FullscreenImage.js +9 -7
- package/build/esm/components/FullscreenMedia/FullScreenMedia.css +70 -0
- package/build/esm/components/FullscreenMedia/FullScreenMedia.d.ts +10 -0
- package/build/esm/components/FullscreenMedia/FullScreenMedia.js +38 -0
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.css +30 -0
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +7 -2
- package/build/esm/components/HeightCalculator/HeightCalculator.d.ts +4 -0
- package/build/esm/components/HeightCalculator/HeightCalculator.js +4 -0
- package/build/esm/components/Link/Link.js +1 -1
- package/build/esm/components/Media/Media.js +3 -2
- package/build/esm/components/MetaInfo/MetaInfo.css +13 -0
- package/build/esm/components/MetaInfo/MetaInfo.d.ts +7 -0
- package/build/esm/components/MetaInfo/MetaInfo.js +6 -0
- package/build/esm/components/MetaInfo/schema.d.ts +8 -0
- package/build/esm/components/MetaInfo/schema.js +8 -0
- package/build/esm/components/ReactPlayer/ReactPlayer.js +1 -1
- package/build/esm/components/VideoBlock/VideoBlock.d.ts +1 -0
- package/build/esm/components/VideoBlock/VideoBlock.js +6 -10
- package/build/esm/components/YandexForm/YandexForm.d.ts +2 -4
- package/build/esm/components/YandexForm/YandexForm.js +2 -2
- package/build/esm/components/index.d.ts +2 -0
- package/build/esm/components/index.js +2 -0
- package/build/esm/constructor-items.d.ts +4 -0
- package/build/esm/constructor-items.js +5 -1
- package/build/esm/containers/PageConstructor/PageConstructor.css +1 -0
- package/build/esm/hooks/useHeightCalculator.d.ts +6 -0
- package/build/esm/hooks/useHeightCalculator.js +24 -0
- 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 +6 -30
- package/build/esm/models/constructor-items/sub-blocks.d.ts +18 -7
- package/build/esm/models/constructor-items/sub-blocks.js +4 -0
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js +5 -3
- package/build/esm/schema/index.js +1 -0
- package/build/esm/schema/validators/common.d.ts +78 -0
- package/build/esm/schema/validators/common.js +2 -0
- package/build/esm/schema/validators/sub-blocks.d.ts +1 -0
- package/build/esm/schema/validators/sub-blocks.js +1 -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/BannerCard/BannerCard.js +3 -2
- package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +14 -9
- package/build/esm/sub-blocks/HubspotForm/HubspotFormContainer.d.ts +1 -1
- package/build/esm/sub-blocks/HubspotForm/HubspotFormContainer.js +26 -8
- package/build/esm/sub-blocks/HubspotForm/index.js +5 -3
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.css +16 -0
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.d.ts +4 -0
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +20 -0
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +218 -0
- package/build/esm/sub-blocks/LayoutItem/schema.js +14 -0
- package/build/esm/sub-blocks/LayoutItem/utils.d.ts +29 -0
- package/build/esm/sub-blocks/LayoutItem/utils.js +6 -0
- 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/build/esm/sub-blocks/index.d.ts +1 -0
- package/build/esm/sub-blocks/index.js +1 -0
- package/build/esm/text-transform/blocks.js +17 -0
- package/build/esm/utils/hubspot.d.ts +2 -1
- package/build/esm/utils/hubspot.js +5 -1
- package/package.json +5 -2
- 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 +6 -30
- package/server/models/constructor-items/sub-blocks.d.ts +18 -7
- package/server/models/constructor-items/sub-blocks.js +4 -0
- package/server/text-transform/blocks.js +17 -0
- package/server/utils/hubspot.d.ts +2 -1
- package/server/utils/hubspot.js +5 -1
- package/styles/root.scss +1 -0
- 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
|
@@ -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,17 +165,16 @@ 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 {
|
|
181
175
|
youtube: string;
|
|
182
176
|
previewImg?: string;
|
|
177
|
+
fullScreen?: boolean;
|
|
183
178
|
}
|
|
184
179
|
export interface MediaComponentImageProps {
|
|
185
180
|
image: ImageProps | ImageProps[] | ImageDeviceProps;
|
|
@@ -226,12 +221,10 @@ export interface HeaderBreadCrumbsProps extends ClassNameProps {
|
|
|
226
221
|
items: {
|
|
227
222
|
url: string;
|
|
228
223
|
text: ReactNode;
|
|
229
|
-
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
230
224
|
}[];
|
|
231
225
|
theme?: TextTheme;
|
|
232
226
|
metrikaGoals?: MetrikaGoal;
|
|
233
227
|
pixelEvents?: ButtonPixel;
|
|
234
|
-
context?: string;
|
|
235
228
|
}
|
|
236
229
|
export interface PreviewContentItemProps {
|
|
237
230
|
title: string;
|
|
@@ -253,27 +246,10 @@ export interface TitleBaseProps {
|
|
|
253
246
|
custom?: string | ReactNode;
|
|
254
247
|
onClick?: () => void;
|
|
255
248
|
}
|
|
256
|
-
export interface CardData {
|
|
257
|
-
header?: CardHeader;
|
|
258
|
-
text?: string;
|
|
259
|
-
title?: string;
|
|
260
|
-
link?: LinkProps;
|
|
261
|
-
footer?: string;
|
|
262
|
-
url?: string;
|
|
263
|
-
service?: {
|
|
264
|
-
slug: string;
|
|
265
|
-
name: string;
|
|
266
|
-
};
|
|
267
|
-
links?: LinkProps[];
|
|
268
|
-
}
|
|
269
249
|
export type CardBorder = 'shadow' | 'line' | 'none';
|
|
270
250
|
export interface CardBaseProps {
|
|
271
251
|
border?: CardBorder;
|
|
272
252
|
}
|
|
273
|
-
export interface CardHeader {
|
|
274
|
-
title?: string;
|
|
275
|
-
image?: ImageProps;
|
|
276
|
-
}
|
|
277
253
|
export interface PriceDescriptionProps {
|
|
278
254
|
title: string;
|
|
279
255
|
detailedTitle?: 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",
|
|
@@ -19,7 +19,11 @@ export declare enum SubBlockType {
|
|
|
19
19
|
* @deprecated Will be moved to params use BasicCard instead
|
|
20
20
|
*/
|
|
21
21
|
TutorialCard = "tutoral-card",
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Use LayoutItem
|
|
24
|
+
*/
|
|
22
25
|
CardWithImage = "card-with-image",
|
|
26
|
+
LayoutItem = "layout-item",
|
|
23
27
|
BackgroundCard = "background-card",
|
|
24
28
|
BasicCard = "basic-card",
|
|
25
29
|
Content = "content",
|
|
@@ -34,7 +38,7 @@ export interface DividerProps {
|
|
|
34
38
|
size?: DividerSize;
|
|
35
39
|
border?: boolean;
|
|
36
40
|
}
|
|
37
|
-
export interface HubspotFormProps extends HubspotEventHandlers {
|
|
41
|
+
export interface HubspotFormProps extends HubspotEventHandlers, AnalyticsEventsBase {
|
|
38
42
|
className?: string;
|
|
39
43
|
theme?: ContentTheme;
|
|
40
44
|
isMobile?: boolean;
|
|
@@ -61,8 +65,7 @@ export interface HubspotFormProps extends HubspotEventHandlers {
|
|
|
61
65
|
onLoad?: (arg: HubspotEventData) => void;
|
|
62
66
|
pixelEvents?: string | string[] | PixelEvent | PixelEvent[] | ButtonPixel;
|
|
63
67
|
hubspotEvents?: string[];
|
|
64
|
-
|
|
65
|
-
context?: string;
|
|
68
|
+
createDOMElement?: boolean;
|
|
66
69
|
}
|
|
67
70
|
export interface PartnerProps extends CardBaseProps {
|
|
68
71
|
text: string;
|
|
@@ -78,7 +81,6 @@ export interface QuoteProps extends Themable, CardBaseProps {
|
|
|
78
81
|
author?: AuthorItem;
|
|
79
82
|
buttonText?: string;
|
|
80
83
|
theme?: TextTheme;
|
|
81
|
-
context?: string;
|
|
82
84
|
}
|
|
83
85
|
export interface NewsCardData {
|
|
84
86
|
id: number;
|
|
@@ -113,7 +115,6 @@ export interface BannerCardProps {
|
|
|
113
115
|
color?: ThemeSupporting<string>;
|
|
114
116
|
theme?: TextTheme;
|
|
115
117
|
button: Pick<ButtonProps, 'text' | 'url' | 'target'>;
|
|
116
|
-
context?: string;
|
|
117
118
|
}
|
|
118
119
|
export interface MediaCardProps extends MediaProps, CardBaseProps {
|
|
119
120
|
}
|
|
@@ -121,7 +122,7 @@ export interface CardWithImageLinkProps extends Omit<LinkProps, 'text' | 'url'>
|
|
|
121
122
|
title: string;
|
|
122
123
|
link: string;
|
|
123
124
|
}
|
|
124
|
-
export interface CardWithImageProps extends ClassNameProps, Pick<ContentBlockProps, 'title' | 'additionalInfo' | 'buttons' | 'theme'
|
|
125
|
+
export interface CardWithImageProps extends ClassNameProps, Pick<ContentBlockProps, 'title' | 'additionalInfo' | 'buttons' | 'theme'> {
|
|
125
126
|
image: string;
|
|
126
127
|
description?: string;
|
|
127
128
|
disableCompress?: boolean;
|
|
@@ -129,6 +130,13 @@ export interface CardWithImageProps extends ClassNameProps, Pick<ContentBlockPro
|
|
|
129
130
|
fullScreen?: boolean;
|
|
130
131
|
links?: CardWithImageLinkProps[];
|
|
131
132
|
}
|
|
133
|
+
export interface LayoutItemProps extends ClassNameProps {
|
|
134
|
+
content: Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size'>;
|
|
135
|
+
media: MediaProps;
|
|
136
|
+
metaInfo?: string[];
|
|
137
|
+
border?: boolean;
|
|
138
|
+
fullScreen?: boolean;
|
|
139
|
+
}
|
|
132
140
|
export type DividerModel = {
|
|
133
141
|
type: SubBlockType.Divider;
|
|
134
142
|
} & DividerProps;
|
|
@@ -141,6 +149,9 @@ export type NewsCardModel = {
|
|
|
141
149
|
export type CardWithImageModel = {
|
|
142
150
|
type: SubBlockType.CardWithImage;
|
|
143
151
|
} & CardWithImageProps;
|
|
152
|
+
export type LayoutItemModel = {
|
|
153
|
+
type: SubBlockType.CardWithImage;
|
|
154
|
+
} & LayoutItemProps;
|
|
144
155
|
export type TutorialCardModel = {
|
|
145
156
|
type: SubBlockType.TutorialCard;
|
|
146
157
|
} & TutorialCardProps;
|
|
@@ -14,7 +14,11 @@ export var SubBlockType;
|
|
|
14
14
|
* @deprecated Will be moved to params use BasicCard instead
|
|
15
15
|
*/
|
|
16
16
|
SubBlockType["TutorialCard"] = "tutoral-card";
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use LayoutItem
|
|
19
|
+
*/
|
|
17
20
|
SubBlockType["CardWithImage"] = "card-with-image";
|
|
21
|
+
SubBlockType["LayoutItem"] = "layout-item";
|
|
18
22
|
SubBlockType["BackgroundCard"] = "background-card";
|
|
19
23
|
SubBlockType["BasicCard"] = "basic-card";
|
|
20
24
|
SubBlockType["Content"] = "content";
|
|
@@ -9,7 +9,6 @@ import SocialIcon from '../SocialIcon/SocialIcon';
|
|
|
9
9
|
import { getMediaImage } from '../../../components/Media/Image/utils';
|
|
10
10
|
import './NavigationItem.css';
|
|
11
11
|
const b = block('navigation-item');
|
|
12
|
-
const BLOCK_NAME = 'navigation';
|
|
13
12
|
const Content = ({ text, icon }) => (React.createElement(Fragment, null,
|
|
14
13
|
icon && typeof icon !== 'string' && React.createElement(Image, Object.assign({ className: b('icon') }, icon)),
|
|
15
14
|
React.createElement("span", { className: b('text') }, text)));
|
|
@@ -38,8 +37,11 @@ const NavigationLink = (props) => {
|
|
|
38
37
|
};
|
|
39
38
|
const NavigationButton = (props) => {
|
|
40
39
|
const { url, target } = props;
|
|
41
|
-
return target ? (
|
|
42
|
-
|
|
40
|
+
return target ? (
|
|
41
|
+
// discuss how to be with this component
|
|
42
|
+
// <Button {...props} url={url} context={BLOCK_NAME} />
|
|
43
|
+
React.createElement(Button, Object.assign({}, props, { url: url }))) : (React.createElement(RouterLink, { href: url },
|
|
44
|
+
React.createElement(Button, Object.assign({}, props, { url: url }))));
|
|
43
45
|
};
|
|
44
46
|
//todo: add types support form component in map
|
|
45
47
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -50,6 +50,7 @@ export function generateDefaultSchema(config) {
|
|
|
50
50
|
'card-with-image',
|
|
51
51
|
'quote',
|
|
52
52
|
'basic-card',
|
|
53
|
+
'layout-item',
|
|
53
54
|
];
|
|
54
55
|
const configBlockSchemaNames = Object.keys(blocks).filter((item) => !constructorBlockSchemaNames.includes(item));
|
|
55
56
|
const configCardSchemaNames = Object.keys(cards).filter((item) => !constructorCardSchemaNames.includes(item));
|
|
@@ -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
|
};
|
|
@@ -175,6 +175,8 @@ export const LinkProps = {
|
|
|
175
175
|
}, target: {
|
|
176
176
|
type: 'string',
|
|
177
177
|
enum: ['_blank', '_parent', '_top', '_self'],
|
|
178
|
+
}, analyticsEvents: {
|
|
179
|
+
anyOf: [AnalyticsEventSchema, { type: 'array', items: AnalyticsEventSchema }],
|
|
178
180
|
} }),
|
|
179
181
|
};
|
|
180
182
|
export const FileLinkProps = {
|
|
@@ -6,6 +6,7 @@ export * from '../../sub-blocks/NewsCard/schema';
|
|
|
6
6
|
export * from '../../sub-blocks/Partner/schema';
|
|
7
7
|
export * from '../../sub-blocks/TutorialCard/schema';
|
|
8
8
|
export * from '../../sub-blocks/CardWithImage/schema';
|
|
9
|
+
export * from '../../sub-blocks/LayoutItem/schema';
|
|
9
10
|
export * from '../../sub-blocks/Quote/schema';
|
|
10
11
|
export * from '../../sub-blocks/Divider/schema';
|
|
11
12
|
export * from '../../sub-blocks/BasicCard/schema';
|
|
@@ -6,6 +6,7 @@ export * from '../../sub-blocks/NewsCard/schema';
|
|
|
6
6
|
export * from '../../sub-blocks/Partner/schema';
|
|
7
7
|
export * from '../../sub-blocks/TutorialCard/schema';
|
|
8
8
|
export * from '../../sub-blocks/CardWithImage/schema';
|
|
9
|
+
export * from '../../sub-blocks/LayoutItem/schema';
|
|
9
10
|
export * from '../../sub-blocks/Quote/schema';
|
|
10
11
|
export * from '../../sub-blocks/Divider/schema';
|
|
11
12
|
export * from '../../sub-blocks/BasicCard/schema';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import { block, getThemedValue } from '../../utils';
|
|
3
|
-
import { Button, YFMWrapper, BackgroundImage, HTML } from '../../components';
|
|
3
|
+
import { Button, YFMWrapper, BackgroundImage, HTML, RouterLink } from '../../components';
|
|
4
4
|
import { ThemeValueContext } from '../../context/theme/ThemeValueContext';
|
|
5
5
|
import './BannerCard.css';
|
|
6
6
|
const b = block('banner-card');
|
|
@@ -18,7 +18,8 @@ export const BannerCard = (props) => {
|
|
|
18
18
|
React.createElement("h2", { className: b('title') },
|
|
19
19
|
React.createElement(HTML, null, title)),
|
|
20
20
|
subtitle && (React.createElement(YFMWrapper, { className: b('subtitle'), content: subtitle, modifiers: { constructor: true } }))),
|
|
21
|
-
React.createElement(
|
|
21
|
+
React.createElement(RouterLink, { href: url },
|
|
22
|
+
React.createElement(Button, { className: b('button'), theme: "raised", size: "xl", text: text, url: url, target: target }))),
|
|
22
23
|
React.createElement(BackgroundImage, { className: b('image'), src: getThemedValue(image, theme), disableCompress: disableCompress }))));
|
|
23
24
|
};
|
|
24
25
|
export default BannerCard;
|
|
@@ -46,7 +46,7 @@ unpredictable css rules order in build */
|
|
|
46
46
|
color: var(--yc-color-text-primary);
|
|
47
47
|
background-color: transparent;
|
|
48
48
|
border: 1px solid var(--yc-color-line-generic);
|
|
49
|
-
border-radius:
|
|
49
|
+
border-radius: var(--yc-border-radius-l);
|
|
50
50
|
}
|
|
51
51
|
.pc-hubspot-form .hs-form-field .input input[type=text]:hover,
|
|
52
52
|
.pc-hubspot-form .hs-form-field .input input[type=number]:hover,
|
|
@@ -126,9 +126,9 @@ unpredictable css rules order in build */
|
|
|
126
126
|
opacity: 0;
|
|
127
127
|
flex-shrink: 0;
|
|
128
128
|
}
|
|
129
|
-
.pc-hubspot-form .hs-form-field .hs-form-checkbox-display span,
|
|
130
|
-
.pc-hubspot-form .hs-form-field .hs-form-booleancheckbox-display span,
|
|
131
|
-
.pc-hubspot-form .hs-form-field .hs-form-radio-display span {
|
|
129
|
+
.pc-hubspot-form .hs-form-field .hs-form-checkbox-display span:not(.hs-form-required),
|
|
130
|
+
.pc-hubspot-form .hs-form-field .hs-form-booleancheckbox-display span:not(.hs-form-required),
|
|
131
|
+
.pc-hubspot-form .hs-form-field .hs-form-radio-display span:not(.hs-form-required) {
|
|
132
132
|
color: var(--yc-color-text-primary);
|
|
133
133
|
font-size: var(--yc-text-body-2-font-size);
|
|
134
134
|
line-height: 16px;
|
|
@@ -136,12 +136,17 @@ unpredictable css rules order in build */
|
|
|
136
136
|
margin: 0;
|
|
137
137
|
flex-grow: 1;
|
|
138
138
|
}
|
|
139
|
+
.pc-hubspot-form .hs-form-field .hs-form-checkbox-display .hs-form-required,
|
|
140
|
+
.pc-hubspot-form .hs-form-field .hs-form-booleancheckbox-display .hs-form-required,
|
|
141
|
+
.pc-hubspot-form .hs-form-field .hs-form-radio-display .hs-form-required {
|
|
142
|
+
top: 0;
|
|
143
|
+
}
|
|
139
144
|
.pc-hubspot-form .hs-form-field .hs-form-booleancheckbox-display,
|
|
140
145
|
.pc-hubspot-form .hs-form-field .hs-form-checkbox-display {
|
|
141
146
|
position: relative;
|
|
142
147
|
}
|
|
143
|
-
.pc-hubspot-form .hs-form-field .hs-form-booleancheckbox-display span:before,
|
|
144
|
-
.pc-hubspot-form .hs-form-field .hs-form-checkbox-display span:before {
|
|
148
|
+
.pc-hubspot-form .hs-form-field .hs-form-booleancheckbox-display span:not(.hs-form-required):before,
|
|
149
|
+
.pc-hubspot-form .hs-form-field .hs-form-checkbox-display span:not(.hs-form-required):before {
|
|
145
150
|
content: "";
|
|
146
151
|
position: absolute;
|
|
147
152
|
top: 0;
|
|
@@ -153,8 +158,8 @@ unpredictable css rules order in build */
|
|
|
153
158
|
border: 1px solid var(--yc-color-line-generic-accent);
|
|
154
159
|
transition: background-color 0.1s linear;
|
|
155
160
|
}
|
|
156
|
-
.pc-hubspot-form .hs-form-field .hs-form-booleancheckbox-display span:after,
|
|
157
|
-
.pc-hubspot-form .hs-form-field .hs-form-checkbox-display span:after {
|
|
161
|
+
.pc-hubspot-form .hs-form-field .hs-form-booleancheckbox-display span:not(.hs-form-required):after,
|
|
162
|
+
.pc-hubspot-form .hs-form-field .hs-form-checkbox-display span:not(.hs-form-required):after {
|
|
158
163
|
content: "";
|
|
159
164
|
position: absolute;
|
|
160
165
|
top: -10px;
|
|
@@ -276,7 +281,7 @@ unpredictable css rules order in build */
|
|
|
276
281
|
box-sizing: border-box;
|
|
277
282
|
height: 44px;
|
|
278
283
|
padding: 0 20px;
|
|
279
|
-
border-radius:
|
|
284
|
+
border-radius: var(--yc-border-radius-xl);
|
|
280
285
|
background-color: var(--yc-color-base-special);
|
|
281
286
|
color: var(--yc-my-color-brand-text-contrast);
|
|
282
287
|
line-height: 44px;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HubspotFormProps } from '../../models';
|
|
2
|
-
type HubspotFormContainerPropsKeys = 'className' | 'formId' | 'formInstanceId' | 'portalId' | 'region' | 'formClassName';
|
|
2
|
+
type HubspotFormContainerPropsKeys = 'className' | 'formId' | 'formInstanceId' | 'portalId' | 'region' | 'formClassName' | 'createDOMElement';
|
|
3
3
|
type HubspotFormContainerProps = Pick<HubspotFormProps, HubspotFormContainerPropsKeys>;
|
|
4
4
|
declare const HubspotFormContainer: (props: HubspotFormContainerProps) => JSX.Element;
|
|
5
5
|
export default HubspotFormContainer;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
2
|
import loadHubspotScript from './loadHubspotScript';
|
|
3
3
|
import { useMount } from '../../hooks';
|
|
4
4
|
const HubspotFormContainer = (props) => {
|
|
5
|
-
const { className, formId, formInstanceId, portalId, region, formClassName, } = props;
|
|
5
|
+
const { className, formId, formInstanceId, portalId, region, formClassName, createDOMElement, } = props;
|
|
6
|
+
const containerRef = useRef(null);
|
|
7
|
+
const hsContainerRef = useRef();
|
|
6
8
|
const containerId = formInstanceId
|
|
7
9
|
? `hubspot-form-${formId}-${formInstanceId}`
|
|
8
10
|
: `hubspot-form-${formId}`;
|
|
9
|
-
|
|
10
|
-
(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
const createForm = () => {
|
|
12
|
+
if (containerRef.current && !hsContainerRef.current && createDOMElement) {
|
|
13
|
+
hsContainerRef.current = document.createElement('div');
|
|
14
|
+
containerRef.current.id = '';
|
|
15
|
+
hsContainerRef.current.id = containerId;
|
|
16
|
+
containerRef.current.appendChild(hsContainerRef.current);
|
|
17
|
+
}
|
|
18
|
+
if (!createDOMElement || hsContainerRef.current) {
|
|
14
19
|
if (window.hbspt) {
|
|
15
20
|
window.hbspt.forms.create({
|
|
16
21
|
region,
|
|
@@ -21,8 +26,21 @@ const HubspotFormContainer = (props) => {
|
|
|
21
26
|
formInstanceId,
|
|
22
27
|
});
|
|
23
28
|
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
useMount(() => {
|
|
32
|
+
(async () => {
|
|
33
|
+
if (!window.hbspt) {
|
|
34
|
+
await loadHubspotScript();
|
|
35
|
+
}
|
|
36
|
+
createForm();
|
|
24
37
|
})();
|
|
38
|
+
return () => {
|
|
39
|
+
if (createDOMElement && containerRef.current && containerRef.current.lastChild) {
|
|
40
|
+
containerRef.current.removeChild(containerRef.current.lastChild);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
25
43
|
});
|
|
26
|
-
return React.createElement("div", { className: className, id: containerId });
|
|
44
|
+
return React.createElement("div", { className: className, id: containerId, ref: containerRef });
|
|
27
45
|
};
|
|
28
46
|
export default HubspotFormContainer;
|
|
@@ -2,17 +2,17 @@ import React, { useContext, useMemo } from 'react';
|
|
|
2
2
|
import { block } from '../../utils';
|
|
3
3
|
import { ThemeValueContext } from '../../context/theme/ThemeValueContext';
|
|
4
4
|
import { MobileContext } from '../../context/mobileContext';
|
|
5
|
+
import { BlockPositionContext } from '../../context/blockPositionContext';
|
|
5
6
|
import { useMetrika } from '../../hooks/useMetrika';
|
|
6
7
|
import { PredefinedEventTypes } from '../../models';
|
|
7
8
|
import { useHandleHubspotEvents, useAnalytics } from '../../hooks';
|
|
8
9
|
import HubspotFormContainer from './HubspotFormContainer';
|
|
9
|
-
import { BlockPositionContext } from '../../context/blockPositionContext';
|
|
10
10
|
import './HubspotForm.css';
|
|
11
11
|
const b = block('hubspot-form');
|
|
12
12
|
const HubspotForm = (props) => {
|
|
13
13
|
const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName, pixelEvents,
|
|
14
14
|
// hubspotEvents, // TODO: decide how to handle them
|
|
15
|
-
analyticsEvents, onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, } = props;
|
|
15
|
+
analyticsEvents, onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, createDOMElement, onSubmitError, } = props;
|
|
16
16
|
const handleMetrika = useMetrika();
|
|
17
17
|
const context = useContext(BlockPositionContext);
|
|
18
18
|
const defaultEvent = useMemo(() => ({
|
|
@@ -29,6 +29,7 @@ const HubspotForm = (props) => {
|
|
|
29
29
|
onBeforeLoad,
|
|
30
30
|
onBeforeSubmit,
|
|
31
31
|
onLoad,
|
|
32
|
+
onSubmitError,
|
|
32
33
|
onSubmit: (e) => {
|
|
33
34
|
handleMetrika === null || handleMetrika === void 0 ? void 0 : handleMetrika({ pixelEvents });
|
|
34
35
|
handleAnalytics(analyticsEvents);
|
|
@@ -43,8 +44,9 @@ const HubspotForm = (props) => {
|
|
|
43
44
|
handleAnalytics,
|
|
44
45
|
analyticsEvents,
|
|
45
46
|
onSubmit,
|
|
47
|
+
onSubmitError,
|
|
46
48
|
]);
|
|
47
49
|
useHandleHubspotEvents(handlers, formId);
|
|
48
|
-
return (React.createElement(HubspotFormContainer, { key: [formClassName, formId, formInstanceId, portalId, region].join(), className: b({ theme, mobile }, className), formClassName: formClassName, formId: formId, portalId: portalId, formInstanceId: formInstanceId, region: region }));
|
|
50
|
+
return (React.createElement(HubspotFormContainer, { createDOMElement: createDOMElement, key: [formClassName, formId, formInstanceId, portalId, region].join(), className: b({ theme, mobile }, className), formClassName: formClassName, formId: formId, portalId: portalId, formInstanceId: formInstanceId, region: region }));
|
|
49
51
|
};
|
|
50
52
|
export default HubspotForm;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-layout-item__media {
|
|
4
|
+
width: 100%;
|
|
5
|
+
display: block;
|
|
6
|
+
border-radius: var(--pc-border-radius);
|
|
7
|
+
}
|
|
8
|
+
.pc-layout-item__media_border {
|
|
9
|
+
border: 1px solid var(--yc-color-line-generic);
|
|
10
|
+
}
|
|
11
|
+
.pc-layout-item__meta-info {
|
|
12
|
+
margin: 16px 0 -8px 0;
|
|
13
|
+
}
|
|
14
|
+
.pc-layout-item__content {
|
|
15
|
+
margin: 16px 16px 0 0;
|
|
16
|
+
}
|