@gravity-ui/page-constructor 1.15.0-alpha.9 → 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 -10
- 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 -15
- 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/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 -34
- package/build/cjs/models/common.js +1 -10
- 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 -18
- 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 -9
- 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 -11
- 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 +4 -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/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 -34
- package/build/esm/models/common.js +0 -9
- 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 -19
- 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 -11
- 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 -34
- package/server/models/common.js +1 -10
- 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
|
export declare const blockMap: {
|
|
2
2
|
"slider-block": (props: import("./models").WithChildren<import("./blocks/Slider/Slider").SliderProps>) => JSX.Element;
|
|
3
3
|
"simple-block": (props: import("./models").WithChildren<import("./models").SimpleBlockProps>) => JSX.Element;
|
|
4
|
-
"extended-features-block": ({ title, description, items, colSizes, animated,
|
|
4
|
+
"extended-features-block": ({ title, description, items, colSizes, animated, }: import("./models").ExtendedFeaturesProps) => JSX.Element;
|
|
5
5
|
"promo-features-block": (props: import("./models").PromoFeaturesProps) => JSX.Element;
|
|
6
6
|
"questions-block": (props: import("./models").QuestionsProps) => JSX.Element;
|
|
7
7
|
"banner-block": (props: import("./models").BannerBlockProps) => JSX.Element;
|
|
@@ -11,14 +11,14 @@ export declare const blockMap: {
|
|
|
11
11
|
"info-block": (props: import("./models").InfoBlockProps) => JSX.Element;
|
|
12
12
|
"security-block": (props: import("./models").SecurityBlockProps) => JSX.Element;
|
|
13
13
|
"table-block": (props: import("./models").TableBlockProps) => JSX.Element;
|
|
14
|
-
"tabs-block": ({ items, title, description, animated, tabsColSizes, centered, direction,
|
|
14
|
+
"tabs-block": ({ items, title, description, animated, tabsColSizes, centered, direction, }: import("./models").TabsBlockProps) => JSX.Element;
|
|
15
15
|
"link-table-block": ({ items, title, description, linkTheme }: import("./models").LinkTableBlockProps) => JSX.Element;
|
|
16
16
|
"header-block": (props: import("./models").WithChildren<import("./models").HeaderBlockProps & import("./models").ClassNameProps>) => JSX.Element;
|
|
17
17
|
"icons-block": ({ title, size, items }: import("./models").IconsBlockProps) => JSX.Element;
|
|
18
18
|
"header-slider-block": ({ items, arrows, ...props }: import("./models").HeaderSliderBlockProps) => JSX.Element;
|
|
19
19
|
"card-layout-block": ({ title, description, animated, colSizes, children, }: import("./blocks/CardLayout/CardLayout").CardLayoutBlockProps) => JSX.Element;
|
|
20
20
|
"content-layout-block": (props: import("./models").ContentLayoutBlockProps) => JSX.Element;
|
|
21
|
-
"share-block": ({ items, title
|
|
21
|
+
"share-block": ({ items, title }: import("./models").ShareBlockProps) => JSX.Element;
|
|
22
22
|
};
|
|
23
23
|
export declare const subBlockMap: {
|
|
24
24
|
divider: ({ size, border }: import("./models").DividerProps) => JSX.Element;
|
|
@@ -31,10 +31,14 @@ export declare const subBlockMap: {
|
|
|
31
31
|
*/
|
|
32
32
|
partner: ({ text, logo, url, border }: import("./models").PartnerProps) => JSX.Element;
|
|
33
33
|
"price-detailed": (props: import("./models").PriceDetailedProps) => JSX.Element;
|
|
34
|
-
"media-card": ({ border,
|
|
34
|
+
"media-card": ({ border, ...mediaProps }: import("./models").MediaCardProps) => JSX.Element;
|
|
35
35
|
"banner-card": (props: import("./models").BannerCardProps) => JSX.Element;
|
|
36
36
|
"news-card": (props: import("./models").NewsCardProps) => JSX.Element;
|
|
37
|
-
"
|
|
37
|
+
"layout-item": ({ content: { links, ...content }, metaInfo, media, border, fullScreen, className, }: import("./models").LayoutItemProps) => JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Use LayoutItem
|
|
40
|
+
*/
|
|
41
|
+
"card-with-image": ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons, }: import("./models").CardWithImageProps) => JSX.Element;
|
|
38
42
|
"background-card": (props: import("./models").BackgroundCardProps) => JSX.Element;
|
|
39
43
|
"basic-card": (props: import("./models").BasicCardProps) => JSX.Element;
|
|
40
44
|
content: (props: import("./models").ContentBlockProps & import("./models").ClassNameProps) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BlockType, SubBlockType } from './models';
|
|
2
|
-
import { Partner, PriceDetailed, MediaCard, NewsCard, TutorialCard, CardWithImage, BackgroundCard, Content, Quote, Divider, BannerCard, BasicCard, } from './sub-blocks';
|
|
2
|
+
import { Partner, PriceDetailed, MediaCard, NewsCard, TutorialCard, CardWithImage, LayoutItem, BackgroundCard, Content, Quote, Divider, BannerCard, BasicCard, } from './sub-blocks';
|
|
3
3
|
import { BannerBlock, CompaniesBlock, SimpleBlock, MediaBlock, PreviewBlock, InfoBlock, SecurityBlock, SliderBlock, ExtendedFeaturesBlock, PromoFeaturesBlock, QuestionsBlock, TableBlock, TabsBlock, LinkTableBlock, HeaderBlock, IconsBlock, HeaderSliderBlock, CardLayoutBlock, ContentLayoutBlock, ShareBlock, } from './blocks';
|
|
4
4
|
export const blockMap = {
|
|
5
5
|
[BlockType.SliderBlock]: SliderBlock,
|
|
@@ -37,6 +37,10 @@ export const subBlockMap = {
|
|
|
37
37
|
[SubBlockType.MediaCard]: MediaCard,
|
|
38
38
|
[SubBlockType.BannerCard]: BannerCard,
|
|
39
39
|
[SubBlockType.NewsCard]: NewsCard,
|
|
40
|
+
[SubBlockType.LayoutItem]: LayoutItem,
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated Use LayoutItem
|
|
43
|
+
*/
|
|
40
44
|
[SubBlockType.CardWithImage]: CardWithImage,
|
|
41
45
|
[SubBlockType.BackgroundCard]: BackgroundCard,
|
|
42
46
|
[SubBlockType.BasicCard]: BasicCard,
|
|
@@ -18,6 +18,7 @@ unpredictable css rules order in build */
|
|
|
18
18
|
--pc-monochrome-button-background-color-hover: #393939;
|
|
19
19
|
--pc-monochrome-button-color: var(--yc-color-text-light-primary);
|
|
20
20
|
--pc-text-header-color: var(--yc-color-text-primary);
|
|
21
|
+
--pc-media-card-meta-info-color: var(--yc-color-text-secondary);
|
|
21
22
|
}
|
|
22
23
|
.yc-root.yc-root_theme_dark {
|
|
23
24
|
--pc-color-sfx-shadow: var(--yc-color-sfx-shadow);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MetrikaContextProps } from '../../context/metrikaContext';
|
|
2
|
-
import { AnalyticsContextProps } from '../../context/analyticsContext';
|
|
3
2
|
import { ProjectSettingsContextProps } from '../../context/projectSettingsContext';
|
|
4
3
|
import { SSRContextProps } from '../../context/ssrContext';
|
|
5
4
|
import { LocaleContextProps } from '../../context/localeContext';
|
|
@@ -14,6 +13,5 @@ export interface PageConstructorProviderProps {
|
|
|
14
13
|
ssrConfig?: SSRContextProps;
|
|
15
14
|
theme?: ConstructorTheme;
|
|
16
15
|
projectSettings?: ProjectSettingsContextProps;
|
|
17
|
-
analytics?: AnalyticsContextProps;
|
|
18
16
|
}
|
|
19
17
|
export declare const PageConstructorProvider: (props: WithChildren<PageConstructorProviderProps>) => JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { Fragment } from 'react';
|
|
2
2
|
import { MetrikaContext } from '../../context/metrikaContext';
|
|
3
|
-
import { AnalyticsContext } from '../../context/analyticsContext';
|
|
4
3
|
import { MobileContext } from '../../context/mobileContext';
|
|
5
4
|
import { ProjectSettingsContext, } from '../../context/projectSettingsContext';
|
|
6
5
|
import { SSRContext } from '../../context/ssrContext';
|
|
@@ -9,7 +8,7 @@ import { LocationContext } from '../../context/locationContext';
|
|
|
9
8
|
import { ThemeValueContext } from '../../context/theme/ThemeValueContext';
|
|
10
9
|
import { DEFAULT_THEME } from '../../components/constants';
|
|
11
10
|
export const PageConstructorProvider = (props) => {
|
|
12
|
-
const { isMobile, locale = {}, location = {}, metrika = {},
|
|
11
|
+
const { isMobile, locale = {}, location = {}, metrika = {}, ssrConfig = {}, projectSettings = {}, theme = DEFAULT_THEME, children, } = props;
|
|
13
12
|
/* eslint-disable react/jsx-key */
|
|
14
13
|
const context = [
|
|
15
14
|
React.createElement(ThemeValueContext.Provider, { value: { themeValue: theme } }),
|
|
@@ -18,7 +17,6 @@ export const PageConstructorProvider = (props) => {
|
|
|
18
17
|
React.createElement(LocationContext.Provider, { value: location }),
|
|
19
18
|
React.createElement(MobileContext.Provider, { value: Boolean(isMobile) }),
|
|
20
19
|
React.createElement(MetrikaContext.Provider, { value: metrika }),
|
|
21
|
-
React.createElement(AnalyticsContext.Provider, { value: analytics }),
|
|
22
20
|
React.createElement(SSRContext.Provider, { value: { isServer: ssrConfig === null || ssrConfig === void 0 ? void 0 : ssrConfig.isServer } }),
|
|
23
21
|
].reduceRight((prev, provider) => React.cloneElement(provider, {}, prev), children);
|
|
24
22
|
/* eslint-enable react/jsx-key */
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Metrika, Pixel } from '../../models';
|
|
3
3
|
export interface MetrikaContextProps {
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated Metrika will be deleted
|
|
6
|
-
*/
|
|
7
4
|
metrika?: Metrika;
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated Metrika will be deleted
|
|
10
|
-
*/
|
|
11
5
|
pixel?: Pixel;
|
|
12
6
|
}
|
|
13
7
|
export declare const MetrikaContext: React.Context<MetrikaContextProps>;
|
|
@@ -2,5 +2,4 @@ export { default as useFocus } from './useFocus';
|
|
|
2
2
|
export { default as useWindowBreakpoint } from './useWindowBreakpoint';
|
|
3
3
|
export { useIntersection } from './useIntersection';
|
|
4
4
|
export { default as useMount } from './useMount';
|
|
5
|
-
export * from './useAnalytics';
|
|
6
5
|
export * from './hubspot';
|
package/build/esm/hooks/index.js
CHANGED
|
@@ -2,5 +2,4 @@ export { default as useFocus } from './useFocus';
|
|
|
2
2
|
export { default as useWindowBreakpoint } from './useWindowBreakpoint';
|
|
3
3
|
export { useIntersection } from './useIntersection';
|
|
4
4
|
export { default as useMount } from './useMount';
|
|
5
|
-
export * from './useAnalytics';
|
|
6
5
|
export * from './hubspot';
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { ButtonPixel, MetrikaGoal, PixelEvent } from '../models';
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated Metrika will be deleted
|
|
4
|
-
*/
|
|
5
2
|
type UseMetrikaProps = {
|
|
6
3
|
metrikaGoals?: MetrikaGoal;
|
|
7
4
|
pixelEvents?: string | string[] | PixelEvent | PixelEvent[] | ButtonPixel;
|
|
8
5
|
};
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated useMetrika will be deleted
|
|
11
|
-
*/
|
|
12
6
|
export declare const useMetrika: () => ({ metrikaGoals, pixelEvents }: UseMetrikaProps) => void;
|
|
13
7
|
export {};
|
|
@@ -2,20 +2,12 @@ import { useContext } from 'react';
|
|
|
2
2
|
import { MetrikaContext } from '../context/metrikaContext';
|
|
3
3
|
import { PixelEventType } from '../models';
|
|
4
4
|
import { isNewMetrikaFormat } from '../models/guards';
|
|
5
|
-
// eslint-disable-next-line valid-jsdoc
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated Metrika will be deleted, which uses this logic
|
|
8
|
-
*/
|
|
9
5
|
function isButtonPixel(pixelEvents) {
|
|
10
6
|
if (Array.isArray(pixelEvents) && pixelEvents.length && 'name' in pixelEvents) {
|
|
11
7
|
return true;
|
|
12
8
|
}
|
|
13
9
|
return false;
|
|
14
10
|
}
|
|
15
|
-
// eslint-disable-next-line valid-jsdoc
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated useMetrika will be deleted
|
|
18
|
-
*/
|
|
19
11
|
export const useMetrika = () => {
|
|
20
12
|
const { metrika, pixel } = useContext(MetrikaContext);
|
|
21
13
|
return ({ metrikaGoals, pixelEvents }) => {
|
|
@@ -7,21 +7,12 @@ export declare enum Theme {
|
|
|
7
7
|
Light = "light",
|
|
8
8
|
Dark = "dark"
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated Pixel will be deleted
|
|
12
|
-
*/
|
|
13
10
|
type PixelCommand = 'track' | 'trackCustom';
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated Pixel will be deleted
|
|
16
|
-
*/
|
|
17
11
|
export interface PixelEvent {
|
|
18
12
|
command: PixelCommand;
|
|
19
13
|
event: PixelEventType | string;
|
|
20
14
|
data?: Object;
|
|
21
15
|
}
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated Pixel will be deleted from package
|
|
24
|
-
*/
|
|
25
16
|
export declare enum PixelEventType {
|
|
26
17
|
AddPaymentInfo = "AddPaymentInfo",
|
|
27
18
|
AddToCart = "AddToCart",
|
|
@@ -45,17 +36,11 @@ export declare enum PixelEventType {
|
|
|
45
36
|
export type Modifiers = {
|
|
46
37
|
[name: string]: string | boolean | undefined;
|
|
47
38
|
};
|
|
48
|
-
/**
|
|
49
|
-
* @deprecated Pixel will be deleted
|
|
50
|
-
*/
|
|
51
39
|
export interface Pixel<TEvent = string> {
|
|
52
40
|
trackStandard: (event: TEvent, data?: Object) => void;
|
|
53
41
|
trackCustom: (event: string, data?: Object) => void;
|
|
54
42
|
track: (trackEvents: string | string[] | PixelEvent[] | PixelEvent) => void;
|
|
55
43
|
}
|
|
56
|
-
/**
|
|
57
|
-
* @deprecated Metrika will be deleted
|
|
58
|
-
*/
|
|
59
44
|
export interface Metrika {
|
|
60
45
|
reachGoal: (counterName: string, ...args: any) => void;
|
|
61
46
|
reachGoals: (goals: MetrikaGoal, counterName?: string) => void;
|
|
@@ -64,23 +49,4 @@ export interface ClassNameProps {
|
|
|
64
49
|
className?: string;
|
|
65
50
|
}
|
|
66
51
|
export type Timeout = ReturnType<typeof setTimeout> | undefined;
|
|
67
|
-
export type AnalyticsParameter = {
|
|
68
|
-
key: string;
|
|
69
|
-
value: string | number | boolean;
|
|
70
|
-
};
|
|
71
|
-
export declare enum PredefinedEventTypes {
|
|
72
|
-
Default = "default-event",
|
|
73
|
-
Play = "play",
|
|
74
|
-
Stop = "stop"
|
|
75
|
-
}
|
|
76
|
-
export type AnalyticsCounters = {
|
|
77
|
-
include?: string[];
|
|
78
|
-
exclude?: string[];
|
|
79
|
-
};
|
|
80
|
-
export type AnalyticsEvent<T = {}> = T & {
|
|
81
|
-
name: string;
|
|
82
|
-
type?: string;
|
|
83
|
-
counters?: AnalyticsCounters;
|
|
84
|
-
blockName?: string;
|
|
85
|
-
};
|
|
86
52
|
export {};
|
|
@@ -3,9 +3,6 @@ export var Theme;
|
|
|
3
3
|
Theme["Light"] = "light";
|
|
4
4
|
Theme["Dark"] = "dark";
|
|
5
5
|
})(Theme || (Theme = {}));
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated Pixel will be deleted from package
|
|
8
|
-
*/
|
|
9
6
|
export var PixelEventType;
|
|
10
7
|
(function (PixelEventType) {
|
|
11
8
|
PixelEventType["AddPaymentInfo"] = "AddPaymentInfo";
|
|
@@ -27,9 +24,3 @@ export var PixelEventType;
|
|
|
27
24
|
PixelEventType["Subscribe"] = "Subscribe";
|
|
28
25
|
PixelEventType["ViewContent"] = "ViewContent";
|
|
29
26
|
})(PixelEventType || (PixelEventType = {}));
|
|
30
|
-
export var PredefinedEventTypes;
|
|
31
|
-
(function (PredefinedEventTypes) {
|
|
32
|
-
PredefinedEventTypes["Default"] = "default-event";
|
|
33
|
-
PredefinedEventTypes["Play"] = "play";
|
|
34
|
-
PredefinedEventTypes["Stop"] = "stop";
|
|
35
|
-
})(PredefinedEventTypes || (PredefinedEventTypes = {}));
|
|
@@ -109,7 +109,6 @@ export interface HeaderBlockProps {
|
|
|
109
109
|
verticalOffset?: 's' | 'm' | 'l' | 'xl';
|
|
110
110
|
breadcrumbs?: HeaderBreadCrumbsProps;
|
|
111
111
|
status?: JSX.Element;
|
|
112
|
-
blockName?: 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
|
-
blockName?: 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
|
-
blockName?: 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
|
-
blockName?: 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
|
-
blockName?: 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
|
-
blockName?: 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
|
-
blockName?: 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
|
-
blockName?: 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
|
-
blockName?: 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
|
-
blockName?: string;
|
|
288
278
|
}
|
|
289
279
|
export declare enum PCShareSocialNetwork {
|
|
290
280
|
Vk = "vk",
|
|
@@ -296,7 +286,6 @@ export declare enum PCShareSocialNetwork {
|
|
|
296
286
|
export interface ShareBlockProps {
|
|
297
287
|
items: PCShareSocialNetwork[];
|
|
298
288
|
title?: string;
|
|
299
|
-
blockName?: string;
|
|
300
289
|
}
|
|
301
290
|
export type HeaderBlockModel = {
|
|
302
291
|
type: BlockType.HeaderBlock;
|
|
@@ -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;
|
|
@@ -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,8 @@ const NavigationLink = (props) => {
|
|
|
38
37
|
};
|
|
39
38
|
const NavigationButton = (props) => {
|
|
40
39
|
const { url, target } = props;
|
|
41
|
-
return target ? (React.createElement(Button, Object.assign({}, props, { url: url
|
|
42
|
-
React.createElement(Button, Object.assign({}, props, { url: url
|
|
40
|
+
return target ? (React.createElement(Button, Object.assign({}, props, { url: url }))) : (React.createElement(RouterLink, { href: url },
|
|
41
|
+
React.createElement(Button, Object.assign({}, props, { url: url }))));
|
|
43
42
|
};
|
|
44
43
|
//todo: add types support form component in map
|
|
45
44
|
// 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));
|