@gravity-ui/page-constructor 1.15.0-alpha.8 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/README.md +5 -75
- package/build/cjs/blocks/Banner/Banner.js +2 -3
- package/build/cjs/blocks/Banner/schema.d.ts +0 -243
- package/build/cjs/blocks/Banner/schema.js +1 -3
- package/build/cjs/blocks/CardLayout/schema.d.ts +0 -6
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +2 -3
- package/build/cjs/blocks/ContentLayout/schema.d.ts +0 -3
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.d.ts +1 -1
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -3
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +0 -3
- package/build/cjs/blocks/Header/Header.js +5 -6
- package/build/cjs/blocks/Header/schema.d.ts +0 -3
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +0 -3
- package/build/cjs/blocks/Icons/schema.d.ts +0 -6
- package/build/cjs/blocks/Info/Info.js +3 -4
- package/build/cjs/blocks/Info/schema.d.ts +0 -3
- package/build/cjs/blocks/Info/schema.js +0 -2
- package/build/cjs/blocks/LinkTable/schema.d.ts +0 -3
- package/build/cjs/blocks/Media/Media.js +2 -3
- package/build/cjs/blocks/Media/MediaContent.js +2 -3
- package/build/cjs/blocks/Media/schema.d.ts +0 -81
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +1 -2
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.js +2 -3
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -1
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.js +2 -3
- package/build/cjs/blocks/Preview/Preview.js +2 -3
- package/build/cjs/blocks/Preview/schema.d.ts +0 -3
- package/build/cjs/blocks/Preview/schema.js +1 -3
- package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +2 -3
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +0 -3
- package/build/cjs/blocks/Questions/Questions.js +2 -3
- package/build/cjs/blocks/Questions/schema.d.ts +0 -3
- package/build/cjs/blocks/Security/Security.js +2 -3
- package/build/cjs/blocks/Security/schema.d.ts +0 -3
- package/build/cjs/blocks/Security/schema.js +1 -3
- package/build/cjs/blocks/Share/Share.d.ts +1 -1
- package/build/cjs/blocks/Share/Share.js +2 -11
- package/build/cjs/blocks/Simple/schema.d.ts +0 -3
- package/build/cjs/blocks/Slider/schema.d.ts +0 -3
- package/build/cjs/blocks/Table/schema.d.ts +0 -3
- package/build/cjs/blocks/Tabs/Tabs.d.ts +1 -1
- package/build/cjs/blocks/Tabs/Tabs.js +4 -5
- package/build/cjs/blocks/Tabs/schema.d.ts +0 -3
- package/build/cjs/components/BackLink/BackLink.d.ts +0 -1
- package/build/cjs/components/BackLink/BackLink.js +2 -11
- package/build/cjs/components/BackgroundMedia/BackgroundMedia.js +1 -2
- package/build/cjs/components/Button/Button.d.ts +0 -1
- package/build/cjs/components/Button/Button.js +2 -11
- package/build/cjs/components/ButtonTabs/ButtonTabs.d.ts +0 -1
- package/build/cjs/components/ButtonTabs/ButtonTabs.js +2 -11
- package/build/cjs/components/CardBase/CardBase.d.ts +0 -3
- package/build/cjs/components/CardBase/CardBase.js +1 -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.js +1 -10
- package/build/cjs/components/Link/Link.js +2 -11
- package/build/cjs/components/Media/Media.js +5 -7
- package/build/cjs/components/Media/Video/Video.js +3 -6
- 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 +3 -16
- 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 +0 -3
- package/build/cjs/components/YandexForm/YandexForm.js +2 -19
- package/build/cjs/components/index.d.ts +2 -0
- package/build/cjs/components/index.js +5 -1
- package/build/cjs/constants.d.ts +0 -1
- package/build/cjs/constants.js +1 -2
- package/build/cjs/constructor-items.d.ts +9 -5
- package/build/cjs/constructor-items.js +4 -0
- package/build/cjs/containers/PageConstructor/PageConstructor.css +1 -0
- package/build/cjs/containers/PageConstructor/Provider.d.ts +0 -2
- package/build/cjs/containers/PageConstructor/Provider.js +1 -3
- package/build/cjs/context/metrikaContext/metrikaContext.d.ts +0 -6
- package/build/cjs/hooks/index.d.ts +0 -1
- package/build/cjs/hooks/index.js +0 -1
- package/build/cjs/hooks/useMetrika.d.ts +0 -6
- package/build/cjs/hooks/useMetrika.js +0 -8
- package/build/cjs/models/common.d.ts +0 -29
- package/build/cjs/models/common.js +0 -3
- package/build/cjs/models/constructor-items/blocks.d.ts +0 -11
- package/build/cjs/models/constructor-items/common.d.ts +2 -27
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +16 -6
- package/build/cjs/models/constructor-items/sub-blocks.js +4 -0
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +2 -3
- package/build/cjs/schema/index.js +1 -0
- package/build/cjs/schema/validators/common.d.ts +0 -171
- package/build/cjs/schema/validators/common.js +0 -12
- 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/BackgroundCard.js +2 -3
- 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 -3
- package/build/cjs/sub-blocks/BasicCard/BasicCard.js +2 -3
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.d.ts +1 -1
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.js +2 -3
- package/build/cjs/sub-blocks/Content/Content.js +3 -4
- package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +2 -2
- package/build/cjs/sub-blocks/HubspotForm/index.js +3 -19
- 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 +15 -0
- package/build/cjs/sub-blocks/LayoutItem/utils.js +12 -0
- package/build/cjs/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
- package/build/cjs/sub-blocks/MediaCard/MediaCard.js +2 -3
- package/build/cjs/sub-blocks/Quote/Quote.js +2 -10
- 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/Banner.js +2 -3
- package/build/esm/blocks/Banner/schema.d.ts +0 -243
- package/build/esm/blocks/Banner/schema.js +1 -3
- package/build/esm/blocks/CardLayout/schema.d.ts +0 -6
- package/build/esm/blocks/ContentLayout/ContentLayout.js +2 -3
- package/build/esm/blocks/ContentLayout/schema.d.ts +0 -3
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.d.ts +1 -1
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -3
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +0 -3
- package/build/esm/blocks/Header/Header.js +5 -6
- package/build/esm/blocks/Header/schema.d.ts +0 -3
- package/build/esm/blocks/HeaderSlider/schema.d.ts +0 -3
- package/build/esm/blocks/Icons/schema.d.ts +0 -6
- package/build/esm/blocks/Info/Info.js +3 -4
- package/build/esm/blocks/Info/schema.d.ts +0 -3
- package/build/esm/blocks/Info/schema.js +0 -2
- package/build/esm/blocks/LinkTable/schema.d.ts +0 -3
- package/build/esm/blocks/Media/Media.js +2 -3
- package/build/esm/blocks/Media/MediaContent.js +2 -3
- package/build/esm/blocks/Media/schema.d.ts +0 -81
- package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +1 -2
- package/build/esm/blocks/Preview/MediaContent/MediaContent.js +2 -3
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -1
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.js +2 -3
- package/build/esm/blocks/Preview/Preview.js +2 -3
- package/build/esm/blocks/Preview/schema.d.ts +0 -3
- package/build/esm/blocks/Preview/schema.js +1 -3
- package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +2 -3
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +0 -3
- package/build/esm/blocks/Questions/Questions.js +2 -3
- package/build/esm/blocks/Questions/schema.d.ts +0 -3
- package/build/esm/blocks/Security/Security.js +2 -3
- package/build/esm/blocks/Security/schema.d.ts +0 -3
- package/build/esm/blocks/Security/schema.js +1 -3
- package/build/esm/blocks/Share/Share.d.ts +1 -1
- package/build/esm/blocks/Share/Share.js +3 -12
- package/build/esm/blocks/Simple/schema.d.ts +0 -3
- package/build/esm/blocks/Slider/schema.d.ts +0 -3
- package/build/esm/blocks/Table/schema.d.ts +0 -3
- package/build/esm/blocks/Tabs/Tabs.d.ts +1 -1
- package/build/esm/blocks/Tabs/Tabs.js +4 -5
- package/build/esm/blocks/Tabs/schema.d.ts +0 -3
- package/build/esm/components/BackLink/BackLink.d.ts +0 -1
- package/build/esm/components/BackLink/BackLink.js +2 -11
- package/build/esm/components/BackgroundMedia/BackgroundMedia.js +1 -2
- package/build/esm/components/Button/Button.d.ts +0 -1
- package/build/esm/components/Button/Button.js +2 -11
- package/build/esm/components/ButtonTabs/ButtonTabs.d.ts +0 -1
- package/build/esm/components/ButtonTabs/ButtonTabs.js +2 -11
- package/build/esm/components/CardBase/CardBase.d.ts +0 -3
- package/build/esm/components/CardBase/CardBase.js +1 -10
- 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.js +1 -10
- package/build/esm/components/Link/Link.js +2 -11
- package/build/esm/components/Media/Media.js +5 -7
- package/build/esm/components/Media/Video/Video.js +3 -6
- 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 +3 -16
- 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 +0 -3
- package/build/esm/components/YandexForm/YandexForm.js +2 -19
- package/build/esm/components/index.d.ts +2 -0
- package/build/esm/components/index.js +2 -0
- package/build/esm/constants.d.ts +0 -1
- package/build/esm/constants.js +0 -1
- package/build/esm/constructor-items.d.ts +9 -5
- package/build/esm/constructor-items.js +5 -1
- package/build/esm/containers/PageConstructor/PageConstructor.css +1 -0
- package/build/esm/containers/PageConstructor/Provider.d.ts +0 -2
- package/build/esm/containers/PageConstructor/Provider.js +1 -3
- package/build/esm/context/metrikaContext/metrikaContext.d.ts +0 -6
- package/build/esm/hooks/index.d.ts +0 -1
- package/build/esm/hooks/index.js +0 -1
- package/build/esm/hooks/useMetrika.d.ts +0 -6
- package/build/esm/hooks/useMetrika.js +0 -8
- package/build/esm/models/common.d.ts +0 -29
- package/build/esm/models/common.js +0 -3
- package/build/esm/models/constructor-items/blocks.d.ts +0 -11
- package/build/esm/models/constructor-items/common.d.ts +2 -27
- package/build/esm/models/constructor-items/sub-blocks.d.ts +16 -6
- package/build/esm/models/constructor-items/sub-blocks.js +4 -0
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js +2 -3
- package/build/esm/schema/index.js +1 -0
- package/build/esm/schema/validators/common.d.ts +0 -171
- package/build/esm/schema/validators/common.js +0 -12
- 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/BackgroundCard.js +2 -3
- 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 +2 -3
- package/build/esm/sub-blocks/BasicCard/BasicCard.js +2 -3
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.d.ts +1 -1
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.js +2 -3
- package/build/esm/sub-blocks/Content/Content.js +3 -4
- package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +2 -2
- package/build/esm/sub-blocks/HubspotForm/index.js +4 -20
- 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 +15 -0
- package/build/esm/sub-blocks/LayoutItem/utils.js +6 -0
- package/build/esm/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
- package/build/esm/sub-blocks/MediaCard/MediaCard.js +2 -3
- package/build/esm/sub-blocks/Quote/Quote.js +4 -12
- 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 +4 -5
- package/server/models/common.d.ts +0 -29
- package/server/models/common.js +0 -3
- package/server/models/constructor-items/blocks.d.ts +0 -11
- package/server/models/constructor-items/common.d.ts +2 -27
- package/server/models/constructor-items/sub-blocks.d.ts +16 -6
- 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/context/analyticsContext/analyticsContext.d.ts +0 -6
- package/build/cjs/context/analyticsContext/analyticsContext.js +0 -6
- package/build/cjs/context/analyticsContext/index.d.ts +0 -1
- package/build/cjs/context/analyticsContext/index.js +0 -4
- package/build/cjs/hooks/useAnalytics.d.ts +0 -2
- package/build/cjs/hooks/useAnalytics.js +0 -23
- package/build/cjs/schema/validators/event.d.ts +0 -37
- package/build/cjs/schema/validators/event.js +0 -38
- package/build/esm/context/analyticsContext/analyticsContext.d.ts +0 -6
- package/build/esm/context/analyticsContext/analyticsContext.js +0 -2
- package/build/esm/context/analyticsContext/index.d.ts +0 -1
- package/build/esm/context/analyticsContext/index.js +0 -1
- package/build/esm/hooks/useAnalytics.d.ts +0 -2
- package/build/esm/hooks/useAnalytics.js +0 -19
- package/build/esm/schema/validators/event.d.ts +0 -37
- package/build/esm/schema/validators/event.js +0 -35
|
@@ -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 { ClassNameProps, PixelEventType } from '../common';
|
|
5
5
|
export declare enum AuthorType {
|
|
6
6
|
Column = "column",
|
|
7
7
|
Line = "line"
|
|
@@ -110,8 +110,6 @@ export interface MediaVideoProps {
|
|
|
110
110
|
playButton?: PlayButtonProps;
|
|
111
111
|
controls?: MediaVideoControlsType;
|
|
112
112
|
metrika?: MetrikaVideo;
|
|
113
|
-
analyticsEvents?: AnalyticsEvent[];
|
|
114
|
-
blockName?: string;
|
|
115
113
|
}
|
|
116
114
|
export interface LinkProps extends Stylable {
|
|
117
115
|
url: string;
|
|
@@ -123,8 +121,6 @@ export interface LinkProps extends Stylable {
|
|
|
123
121
|
target?: string;
|
|
124
122
|
metrikaGoals?: MetrikaGoal;
|
|
125
123
|
pixelEvents?: ButtonPixel;
|
|
126
|
-
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
127
|
-
blockName?: string;
|
|
128
124
|
}
|
|
129
125
|
export interface FileLinkProps extends ClassNameProps {
|
|
130
126
|
href: string;
|
|
@@ -143,7 +139,6 @@ export interface ButtonProps {
|
|
|
143
139
|
img?: ButtonImageProps | string;
|
|
144
140
|
metrikaGoals?: MetrikaGoal;
|
|
145
141
|
pixelEvents?: ButtonPixel;
|
|
146
|
-
analyticsEvents?: AnalyticsEvent[];
|
|
147
142
|
target?: string;
|
|
148
143
|
}
|
|
149
144
|
export interface ButtonImageProps {
|
|
@@ -172,13 +167,12 @@ export interface MediaComponentVideoProps {
|
|
|
172
167
|
video: MediaVideoProps;
|
|
173
168
|
height?: number;
|
|
174
169
|
metrika?: MetrikaVideo;
|
|
175
|
-
analyticsEvents?: AnalyticsEvent[];
|
|
176
|
-
blockName?: string;
|
|
177
170
|
previewImg?: string;
|
|
178
171
|
}
|
|
179
172
|
export interface MediaComponentYoutubeProps {
|
|
180
173
|
youtube: string;
|
|
181
174
|
previewImg?: string;
|
|
175
|
+
fullScreen?: boolean;
|
|
182
176
|
}
|
|
183
177
|
export interface MediaComponentImageProps {
|
|
184
178
|
image: ImageProps | ImageProps[] | ImageDeviceProps;
|
|
@@ -229,8 +223,6 @@ export interface HeaderBreadCrumbsProps extends ClassNameProps {
|
|
|
229
223
|
theme?: TextTheme;
|
|
230
224
|
metrikaGoals?: MetrikaGoal;
|
|
231
225
|
pixelEvents?: ButtonPixel;
|
|
232
|
-
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
233
|
-
blockName?: string;
|
|
234
226
|
}
|
|
235
227
|
export interface PreviewContentItemProps {
|
|
236
228
|
title: string;
|
|
@@ -252,27 +244,10 @@ export interface TitleBaseProps {
|
|
|
252
244
|
custom?: string | ReactNode;
|
|
253
245
|
onClick?: () => void;
|
|
254
246
|
}
|
|
255
|
-
export interface CardData {
|
|
256
|
-
header?: CardHeader;
|
|
257
|
-
text?: string;
|
|
258
|
-
title?: string;
|
|
259
|
-
link?: LinkProps;
|
|
260
|
-
footer?: string;
|
|
261
|
-
url?: string;
|
|
262
|
-
service?: {
|
|
263
|
-
slug: string;
|
|
264
|
-
name: string;
|
|
265
|
-
};
|
|
266
|
-
links?: LinkProps[];
|
|
267
|
-
}
|
|
268
247
|
export type CardBorder = 'shadow' | 'line' | 'none';
|
|
269
248
|
export interface CardBaseProps {
|
|
270
249
|
border?: CardBorder;
|
|
271
250
|
}
|
|
272
|
-
export interface CardHeader {
|
|
273
|
-
title?: string;
|
|
274
|
-
image?: ImageProps;
|
|
275
|
-
}
|
|
276
251
|
export interface PriceDescriptionProps {
|
|
277
252
|
title: string;
|
|
278
253
|
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 { 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",
|
|
@@ -61,8 +65,6 @@ export interface HubspotFormProps extends HubspotEventHandlers {
|
|
|
61
65
|
onLoad?: (arg: HubspotEventData) => void;
|
|
62
66
|
pixelEvents?: string | string[] | PixelEvent | PixelEvent[] | ButtonPixel;
|
|
63
67
|
hubspotEvents?: string[];
|
|
64
|
-
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
65
|
-
blockName?: string;
|
|
66
68
|
}
|
|
67
69
|
export interface PartnerProps extends CardBaseProps {
|
|
68
70
|
text: string;
|
|
@@ -78,7 +80,6 @@ export interface QuoteProps extends Themable, CardBaseProps {
|
|
|
78
80
|
author?: AuthorItem;
|
|
79
81
|
buttonText?: string;
|
|
80
82
|
theme?: TextTheme;
|
|
81
|
-
blockName?: string;
|
|
82
83
|
}
|
|
83
84
|
export interface NewsCardData {
|
|
84
85
|
id: number;
|
|
@@ -113,7 +114,6 @@ export interface BannerCardProps {
|
|
|
113
114
|
color?: ThemeSupporting<string>;
|
|
114
115
|
theme?: TextTheme;
|
|
115
116
|
button: Pick<ButtonProps, 'text' | 'url' | 'target'>;
|
|
116
|
-
blockName?: string;
|
|
117
117
|
}
|
|
118
118
|
export interface MediaCardProps extends MediaProps, CardBaseProps {
|
|
119
119
|
}
|
|
@@ -121,7 +121,7 @@ export interface CardWithImageLinkProps extends Omit<LinkProps, 'text' | 'url'>
|
|
|
121
121
|
title: string;
|
|
122
122
|
link: string;
|
|
123
123
|
}
|
|
124
|
-
export interface CardWithImageProps extends ClassNameProps, Pick<ContentBlockProps, 'title' | 'additionalInfo' | 'buttons' | 'theme'
|
|
124
|
+
export interface CardWithImageProps extends ClassNameProps, Pick<ContentBlockProps, 'title' | 'additionalInfo' | 'buttons' | 'theme'> {
|
|
125
125
|
image: string;
|
|
126
126
|
description?: string;
|
|
127
127
|
disableCompress?: boolean;
|
|
@@ -129,6 +129,13 @@ export interface CardWithImageProps extends ClassNameProps, Pick<ContentBlockPro
|
|
|
129
129
|
fullScreen?: boolean;
|
|
130
130
|
links?: CardWithImageLinkProps[];
|
|
131
131
|
}
|
|
132
|
+
export interface LayoutItemProps extends ClassNameProps {
|
|
133
|
+
content: Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size'>;
|
|
134
|
+
media: MediaProps;
|
|
135
|
+
metaInfo?: string[];
|
|
136
|
+
border?: boolean;
|
|
137
|
+
fullScreen?: boolean;
|
|
138
|
+
}
|
|
132
139
|
export type DividerModel = {
|
|
133
140
|
type: SubBlockType.Divider;
|
|
134
141
|
} & DividerProps;
|
|
@@ -141,6 +148,9 @@ export type NewsCardModel = {
|
|
|
141
148
|
export type CardWithImageModel = {
|
|
142
149
|
type: SubBlockType.CardWithImage;
|
|
143
150
|
} & CardWithImageProps;
|
|
151
|
+
export type LayoutItemModel = {
|
|
152
|
+
type: SubBlockType.CardWithImage;
|
|
153
|
+
} & LayoutItemProps;
|
|
144
154
|
export type TutorialCardModel = {
|
|
145
155
|
type: SubBlockType.TutorialCard;
|
|
146
156
|
} & TutorialCardProps;
|
|
@@ -17,7 +17,11 @@ var SubBlockType;
|
|
|
17
17
|
* @deprecated Will be moved to params use BasicCard instead
|
|
18
18
|
*/
|
|
19
19
|
SubBlockType["TutorialCard"] = "tutoral-card";
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Use LayoutItem
|
|
22
|
+
*/
|
|
20
23
|
SubBlockType["CardWithImage"] = "card-with-image";
|
|
24
|
+
SubBlockType["LayoutItem"] = "layout-item";
|
|
21
25
|
SubBlockType["BackgroundCard"] = "background-card";
|
|
22
26
|
SubBlockType["BasicCard"] = "basic-card";
|
|
23
27
|
SubBlockType["Content"] = "content";
|
|
@@ -157,6 +157,23 @@ const config = {
|
|
|
157
157
|
transformer: typografTransformer,
|
|
158
158
|
},
|
|
159
159
|
],
|
|
160
|
+
[models_1.SubBlockType.LayoutItem]: [
|
|
161
|
+
{
|
|
162
|
+
fields: ['content'],
|
|
163
|
+
parser: parseContentLayout,
|
|
164
|
+
transformer: yfmTransformer,
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
fields: ['content'],
|
|
168
|
+
parser: parseContentLayoutTitle,
|
|
169
|
+
transformer: typografTransformer,
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
fields: ['metaInfo'],
|
|
173
|
+
parser: (0, exports.createItemsParser)([]),
|
|
174
|
+
transformer: typografTransformer,
|
|
175
|
+
},
|
|
176
|
+
],
|
|
160
177
|
[models_1.SubBlockType.Quote]: {
|
|
161
178
|
fields: ['text'],
|
|
162
179
|
transformer: typografTransformer,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type HubspotEventName = 'onBeforeFormInit' | 'onFormReady' | 'onFormSubmit' | 'onFormSubmitted' | `_${string}`;
|
|
1
|
+
export type HubspotEventName = 'onBeforeFormInit' | 'onFormReady' | 'onFormSubmit' | 'onFormSubmitted' | 'onFormError' | `_${string}`;
|
|
2
2
|
export interface HubspotEventData {
|
|
3
3
|
type: HubspotEventName | string;
|
|
4
4
|
eventName: HubspotEventName;
|
|
@@ -11,6 +11,7 @@ export interface HubspotEventHandlers {
|
|
|
11
11
|
onBeforeSubmit?: (arg: HubspotEventData) => void;
|
|
12
12
|
onSubmit?: (arg: HubspotEventData) => void;
|
|
13
13
|
onLoad?: (arg: HubspotEventData) => void;
|
|
14
|
+
onSubmitError?: (arg: HubspotEventData) => void;
|
|
14
15
|
}
|
|
15
16
|
export declare function loopBackHabspotEvents(formId: string): ({ data, source, origin }: MessageEvent) => void;
|
|
16
17
|
export declare function handleHubspotEvents(handlers: HubspotEventHandlers, formId: string): ({ data }: MessageEvent) => void;
|
package/server/utils/hubspot.js
CHANGED
|
@@ -25,7 +25,7 @@ function loopBackHabspotEvents(formId) {
|
|
|
25
25
|
exports.loopBackHabspotEvents = loopBackHabspotEvents;
|
|
26
26
|
function handleHubspotEvents(handlers, formId) {
|
|
27
27
|
return ({ data }) => {
|
|
28
|
-
var _a, _b, _c, _d;
|
|
28
|
+
var _a, _b, _c, _d, _e;
|
|
29
29
|
if (!isHubspotEventData(data)) {
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
@@ -49,6 +49,10 @@ function handleHubspotEvents(handlers, formId) {
|
|
|
49
49
|
(_d = handlers.onSubmit) === null || _d === void 0 ? void 0 : _d.call(handlers, data);
|
|
50
50
|
break;
|
|
51
51
|
}
|
|
52
|
+
case 'onFormError': {
|
|
53
|
+
(_e = handlers.onSubmitError) === null || _e === void 0 ? void 0 : _e.call(handlers, data);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
52
56
|
default:
|
|
53
57
|
break;
|
|
54
58
|
}
|
package/styles/root.scss
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
--pc-monochrome-button-background-color-hover: #393939;
|
|
18
18
|
--pc-monochrome-button-color: var(--yc-color-text-light-primary);
|
|
19
19
|
--pc-text-header-color: var(--yc-color-text-primary);
|
|
20
|
+
--pc-media-card-meta-info-color: var(--yc-color-text-secondary);
|
|
20
21
|
|
|
21
22
|
&.yc-root_theme_dark {
|
|
22
23
|
--pc-color-sfx-shadow: var(--yc-color-sfx-shadow);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AnalyticsContext = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
exports.AnalyticsContext = react_1.default.createContext({});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './analyticsContext';
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useAnalytics = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const analyticsContext_1 = require("../context/analyticsContext");
|
|
6
|
-
const useAnalytics = (defaultEvent) => {
|
|
7
|
-
const { sendEvents } = (0, react_1.useContext)(analyticsContext_1.AnalyticsContext);
|
|
8
|
-
if (!sendEvents) {
|
|
9
|
-
return undefined;
|
|
10
|
-
}
|
|
11
|
-
const defaultEvents = defaultEvent ? [defaultEvent] : [];
|
|
12
|
-
return (e) => {
|
|
13
|
-
let events = defaultEvents;
|
|
14
|
-
if (e) {
|
|
15
|
-
events = Array.isArray(e) ? [...events, ...e] : [...events, e];
|
|
16
|
-
}
|
|
17
|
-
if (!events) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
sendEvents(events);
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
exports.useAnalytics = useAnalytics;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export declare const AnalyticsEventSchema: {
|
|
2
|
-
type: string;
|
|
3
|
-
additionalProperties: {
|
|
4
|
-
type: string;
|
|
5
|
-
};
|
|
6
|
-
required: string[];
|
|
7
|
-
properties: {
|
|
8
|
-
name: {
|
|
9
|
-
type: string;
|
|
10
|
-
};
|
|
11
|
-
type: {
|
|
12
|
-
type: string;
|
|
13
|
-
};
|
|
14
|
-
counters: {
|
|
15
|
-
type: string;
|
|
16
|
-
additionalProperties: boolean;
|
|
17
|
-
required: never[];
|
|
18
|
-
properties: {
|
|
19
|
-
include: {
|
|
20
|
-
type: string;
|
|
21
|
-
items: {
|
|
22
|
-
type: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
exclude: {
|
|
26
|
-
type: string;
|
|
27
|
-
items: {
|
|
28
|
-
type: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
blockName: {
|
|
34
|
-
type: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AnalyticsEventSchema = void 0;
|
|
4
|
-
exports.AnalyticsEventSchema = {
|
|
5
|
-
type: 'object',
|
|
6
|
-
additionalProperties: { type: 'string' },
|
|
7
|
-
required: ['name'],
|
|
8
|
-
properties: {
|
|
9
|
-
name: {
|
|
10
|
-
type: 'string',
|
|
11
|
-
},
|
|
12
|
-
type: {
|
|
13
|
-
type: 'string',
|
|
14
|
-
},
|
|
15
|
-
counters: {
|
|
16
|
-
type: 'object',
|
|
17
|
-
additionalProperties: false,
|
|
18
|
-
required: [],
|
|
19
|
-
properties: {
|
|
20
|
-
include: {
|
|
21
|
-
type: 'array',
|
|
22
|
-
items: {
|
|
23
|
-
type: 'string',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
exclude: {
|
|
27
|
-
type: 'array',
|
|
28
|
-
items: {
|
|
29
|
-
type: 'string',
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
blockName: {
|
|
35
|
-
type: 'string',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './analyticsContext';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './analyticsContext';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { useContext } from 'react';
|
|
2
|
-
import { AnalyticsContext } from '../context/analyticsContext';
|
|
3
|
-
export const useAnalytics = (defaultEvent) => {
|
|
4
|
-
const { sendEvents } = useContext(AnalyticsContext);
|
|
5
|
-
if (!sendEvents) {
|
|
6
|
-
return undefined;
|
|
7
|
-
}
|
|
8
|
-
const defaultEvents = defaultEvent ? [defaultEvent] : [];
|
|
9
|
-
return (e) => {
|
|
10
|
-
let events = defaultEvents;
|
|
11
|
-
if (e) {
|
|
12
|
-
events = Array.isArray(e) ? [...events, ...e] : [...events, e];
|
|
13
|
-
}
|
|
14
|
-
if (!events) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
sendEvents(events);
|
|
18
|
-
};
|
|
19
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export declare const AnalyticsEventSchema: {
|
|
2
|
-
type: string;
|
|
3
|
-
additionalProperties: {
|
|
4
|
-
type: string;
|
|
5
|
-
};
|
|
6
|
-
required: string[];
|
|
7
|
-
properties: {
|
|
8
|
-
name: {
|
|
9
|
-
type: string;
|
|
10
|
-
};
|
|
11
|
-
type: {
|
|
12
|
-
type: string;
|
|
13
|
-
};
|
|
14
|
-
counters: {
|
|
15
|
-
type: string;
|
|
16
|
-
additionalProperties: boolean;
|
|
17
|
-
required: never[];
|
|
18
|
-
properties: {
|
|
19
|
-
include: {
|
|
20
|
-
type: string;
|
|
21
|
-
items: {
|
|
22
|
-
type: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
exclude: {
|
|
26
|
-
type: string;
|
|
27
|
-
items: {
|
|
28
|
-
type: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
blockName: {
|
|
34
|
-
type: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export const AnalyticsEventSchema = {
|
|
2
|
-
type: 'object',
|
|
3
|
-
additionalProperties: { type: 'string' },
|
|
4
|
-
required: ['name'],
|
|
5
|
-
properties: {
|
|
6
|
-
name: {
|
|
7
|
-
type: 'string',
|
|
8
|
-
},
|
|
9
|
-
type: {
|
|
10
|
-
type: 'string',
|
|
11
|
-
},
|
|
12
|
-
counters: {
|
|
13
|
-
type: 'object',
|
|
14
|
-
additionalProperties: false,
|
|
15
|
-
required: [],
|
|
16
|
-
properties: {
|
|
17
|
-
include: {
|
|
18
|
-
type: 'array',
|
|
19
|
-
items: {
|
|
20
|
-
type: 'string',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
exclude: {
|
|
24
|
-
type: 'array',
|
|
25
|
-
items: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
blockName: {
|
|
32
|
-
type: 'string',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
};
|