@gravity-ui/page-constructor 1.9.1-alpha.1 → 1.9.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/blocks/index.d.ts +0 -1
- package/build/cjs/blocks/index.js +1 -3
- package/build/cjs/blocks/validators.d.ts +0 -1
- package/build/cjs/blocks/validators.js +0 -1
- package/build/cjs/{blocks → components}/Share/Share.css +0 -0
- package/build/cjs/components/Share/Share.d.ts +7 -0
- package/build/cjs/{blocks → components}/Share/Share.js +0 -0
- package/build/cjs/{blocks → components}/Share/i18n/en.json +0 -0
- package/build/cjs/{blocks → components}/Share/i18n/index.d.ts +0 -0
- package/build/cjs/{blocks → components}/Share/i18n/index.js +0 -0
- package/build/cjs/{blocks → components}/Share/i18n/ru.json +0 -0
- package/build/cjs/components/index.d.ts +1 -2
- package/build/cjs/components/index.js +2 -4
- package/build/cjs/components/navigation/components/Header/Header.d.ts +3 -3
- package/build/cjs/components/navigation/components/Logo/Logo.d.ts +2 -2
- package/build/cjs/components/navigation/components/MobileNavigation/MobileNavigation.d.ts +1 -1
- package/build/cjs/components/navigation/components/Navigation/Navigation.d.ts +2 -2
- package/build/cjs/components/navigation/components/NavigationItem/NavigationItem.d.ts +2 -2
- package/build/cjs/components/navigation/components/NavigationPopup/NavigationPopup.d.ts +2 -2
- package/build/cjs/components/navigation/components/SocialIcon/SocialIcon.d.ts +3 -3
- package/build/cjs/components/navigation/containers/Layout/Layout.d.ts +2 -2
- package/build/cjs/constructor-items.d.ts +0 -1
- package/build/cjs/constructor-items.js +0 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.d.ts +2 -2
- package/build/cjs/models/components.d.ts +6 -0
- package/build/cjs/models/components.js +8 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +2 -16
- package/build/cjs/models/constructor-items/blocks.js +1 -9
- package/build/cjs/models/navigation.d.ts +25 -25
- package/build/cjs/schema/index.js +1 -1
- package/build/cjs/schema/validators/blocks.d.ts +0 -1
- package/build/cjs/schema/validators/blocks.js +0 -1
- package/build/cjs/text-transform/blocks.js +0 -6
- package/build/esm/blocks/index.d.ts +0 -1
- package/build/esm/blocks/index.js +0 -1
- package/build/esm/blocks/validators.d.ts +0 -1
- package/build/esm/blocks/validators.js +0 -1
- package/build/esm/{blocks → components}/Share/Share.css +0 -0
- package/build/esm/components/Share/Share.d.ts +8 -0
- package/build/esm/{blocks → components}/Share/Share.js +0 -0
- package/build/esm/{blocks → components}/Share/i18n/en.json +0 -0
- package/build/esm/{blocks → components}/Share/i18n/index.d.ts +0 -0
- package/build/esm/{blocks → components}/Share/i18n/index.js +0 -0
- package/build/esm/{blocks → components}/Share/i18n/ru.json +0 -0
- package/build/esm/components/index.d.ts +1 -2
- package/build/esm/components/index.js +1 -2
- package/build/esm/components/navigation/components/Header/Header.d.ts +3 -3
- package/build/esm/components/navigation/components/Logo/Logo.d.ts +2 -2
- package/build/esm/components/navigation/components/MobileNavigation/MobileNavigation.d.ts +1 -1
- package/build/esm/components/navigation/components/Navigation/Navigation.d.ts +2 -2
- package/build/esm/components/navigation/components/NavigationItem/NavigationItem.d.ts +2 -2
- package/build/esm/components/navigation/components/NavigationPopup/NavigationPopup.d.ts +2 -2
- package/build/esm/components/navigation/components/SocialIcon/SocialIcon.d.ts +3 -3
- package/build/esm/components/navigation/containers/Layout/Layout.d.ts +2 -2
- package/build/esm/constructor-items.d.ts +0 -1
- package/build/esm/constructor-items.js +1 -2
- package/build/esm/containers/PageConstructor/PageConstructor.d.ts +2 -2
- package/build/esm/models/components.d.ts +6 -0
- package/build/esm/models/components.js +7 -1
- package/build/esm/models/constructor-items/blocks.d.ts +2 -16
- package/build/esm/models/constructor-items/blocks.js +0 -8
- package/build/esm/models/navigation.d.ts +25 -25
- package/build/esm/schema/index.js +2 -2
- package/build/esm/schema/validators/blocks.d.ts +0 -1
- package/build/esm/schema/validators/blocks.js +0 -1
- package/build/esm/text-transform/blocks.js +0 -6
- package/package.json +1 -1
- package/server/models/components.d.ts +6 -0
- package/server/models/components.js +8 -0
- package/server/models/constructor-items/blocks.d.ts +2 -16
- package/server/models/constructor-items/blocks.js +1 -9
- package/server/models/navigation.d.ts +25 -25
- package/server/text-transform/blocks.js +0 -6
- package/build/cjs/blocks/Share/Share.d.ts +0 -3
- package/build/cjs/blocks/Share/schema.d.ts +0 -24
- package/build/cjs/blocks/Share/schema.js +0 -19
- package/build/esm/blocks/Share/Share.d.ts +0 -4
- package/build/esm/blocks/Share/schema.d.ts +0 -24
- package/build/esm/blocks/Share/schema.js +0 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BlockType, SubBlockType } from './models';
|
|
2
2
|
import { Partner, PriceDetailed, MediaCard, NewsCard, TutorialCard, CardWithImage, BackgroundCard, Content, Quote, Divider, BannerCard, BasicCard, } from './sub-blocks';
|
|
3
|
-
import { BannerBlock, CompaniesBlock, SimpleBlock, MediaBlock, PreviewBlock, InfoBlock, SecurityBlock, SliderBlock, ExtendedFeaturesBlock, PromoFeaturesBlock, QuestionsBlock, TableBlock, TabsBlock, LinkTableBlock, HeaderBlock, IconsBlock, HeaderSliderBlock, CardLayoutBlock, ContentLayoutBlock,
|
|
3
|
+
import { BannerBlock, CompaniesBlock, SimpleBlock, MediaBlock, PreviewBlock, InfoBlock, SecurityBlock, SliderBlock, ExtendedFeaturesBlock, PromoFeaturesBlock, QuestionsBlock, TableBlock, TabsBlock, LinkTableBlock, HeaderBlock, IconsBlock, HeaderSliderBlock, CardLayoutBlock, ContentLayoutBlock, } from './blocks';
|
|
4
4
|
export const blockMap = {
|
|
5
5
|
[BlockType.SliderBlock]: SliderBlock,
|
|
6
6
|
[BlockType.SimpleBlock]: SimpleBlock,
|
|
@@ -21,7 +21,6 @@ export const blockMap = {
|
|
|
21
21
|
[BlockType.HeaderSliderBlock]: HeaderSliderBlock,
|
|
22
22
|
[BlockType.CardLayoutBlock]: CardLayoutBlock,
|
|
23
23
|
[BlockType.ContentLayoutBlock]: ContentLayoutBlock,
|
|
24
|
-
[BlockType.ShareBlock]: ShareBlock,
|
|
25
24
|
};
|
|
26
25
|
export const subBlockMap = {
|
|
27
26
|
[SubBlockType.Divider]: Divider,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import '@doc-tools/transform/dist/js/yfm';
|
|
3
|
-
import { ShouldRenderBlock, CustomConfig, PageContent, CustomItems,
|
|
3
|
+
import { ShouldRenderBlock, CustomConfig, PageContent, CustomItems, NavigationDataProps } from '../../models';
|
|
4
4
|
import { blockMap, subBlockMap } from '../../constructor-items';
|
|
5
5
|
import './PageConstructor.css';
|
|
6
6
|
export declare type ItemMap = typeof blockMap & typeof subBlockMap & CustomItems;
|
|
@@ -9,7 +9,7 @@ export interface PageConstructorProps {
|
|
|
9
9
|
shouldRenderBlock?: ShouldRenderBlock;
|
|
10
10
|
custom?: CustomConfig;
|
|
11
11
|
renderMenu?: () => React.ReactNode;
|
|
12
|
-
navigation?:
|
|
12
|
+
navigation?: NavigationDataProps;
|
|
13
13
|
}
|
|
14
14
|
export declare const Constructor: (props: PageConstructorProps) => JSX.Element;
|
|
15
15
|
export declare const PageConstructor: (props: PageConstructorProps) => JSX.Element;
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var PCShareSocialNetwork;
|
|
2
|
+
(function (PCShareSocialNetwork) {
|
|
3
|
+
PCShareSocialNetwork["Vk"] = "vk";
|
|
4
|
+
PCShareSocialNetwork["Telegram"] = "telegram";
|
|
5
|
+
PCShareSocialNetwork["Twitter"] = "twitter";
|
|
6
|
+
PCShareSocialNetwork["Facebook"] = "facebook";
|
|
7
|
+
})(PCShareSocialNetwork || (PCShareSocialNetwork = {}));
|
|
@@ -24,8 +24,7 @@ export declare enum BlockType {
|
|
|
24
24
|
HeaderBlock = "header-block",
|
|
25
25
|
IconsBlock = "icons-block",
|
|
26
26
|
CardLayoutBlock = "card-layout-block",
|
|
27
|
-
ContentLayoutBlock = "content-layout-block"
|
|
28
|
-
ShareBlock = "share-block"
|
|
27
|
+
ContentLayoutBlock = "content-layout-block"
|
|
29
28
|
}
|
|
30
29
|
export declare const BlockTypes: BlockType[];
|
|
31
30
|
export declare const HeaderBlockTypes: BlockType[];
|
|
@@ -276,16 +275,6 @@ export interface ContentBlockProps {
|
|
|
276
275
|
centered?: boolean;
|
|
277
276
|
theme?: ContentTheme;
|
|
278
277
|
}
|
|
279
|
-
export declare enum PCShareSocialNetwork {
|
|
280
|
-
Vk = "vk",
|
|
281
|
-
Telegram = "telegram",
|
|
282
|
-
Twitter = "twitter",
|
|
283
|
-
Facebook = "facebook"
|
|
284
|
-
}
|
|
285
|
-
export interface ShareBlockProps {
|
|
286
|
-
items: PCShareSocialNetwork[];
|
|
287
|
-
title?: string;
|
|
288
|
-
}
|
|
289
278
|
export declare type HeaderBlockModel = {
|
|
290
279
|
type: BlockType.HeaderBlock;
|
|
291
280
|
} & HeaderBlockProps;
|
|
@@ -349,9 +338,6 @@ export declare type HeaderSliderBlockModel = {
|
|
|
349
338
|
export declare type ContentLayoutBlockModel = {
|
|
350
339
|
type: BlockType.ContentLayoutBlock;
|
|
351
340
|
} & ContentLayoutBlockProps;
|
|
352
|
-
|
|
353
|
-
type: BlockType.ShareBlock;
|
|
354
|
-
} & ShareBlockProps;
|
|
355
|
-
declare type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel;
|
|
341
|
+
declare type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel;
|
|
356
342
|
export declare type Block = BlockModels & BlockBaseProps;
|
|
357
343
|
export {};
|
|
@@ -21,7 +21,6 @@ export var BlockType;
|
|
|
21
21
|
BlockType["IconsBlock"] = "icons-block";
|
|
22
22
|
BlockType["CardLayoutBlock"] = "card-layout-block";
|
|
23
23
|
BlockType["ContentLayoutBlock"] = "content-layout-block";
|
|
24
|
-
BlockType["ShareBlock"] = "share-block";
|
|
25
24
|
})(BlockType || (BlockType = {}));
|
|
26
25
|
export const BlockTypes = Object.values(BlockType);
|
|
27
26
|
export const HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];
|
|
@@ -37,10 +36,3 @@ export var SliderType;
|
|
|
37
36
|
SliderType["MediaCard"] = "media-card";
|
|
38
37
|
SliderType["HeaderCard"] = "header-card";
|
|
39
38
|
})(SliderType || (SliderType = {}));
|
|
40
|
-
export var PCShareSocialNetwork;
|
|
41
|
-
(function (PCShareSocialNetwork) {
|
|
42
|
-
PCShareSocialNetwork["Vk"] = "vk";
|
|
43
|
-
PCShareSocialNetwork["Telegram"] = "telegram";
|
|
44
|
-
PCShareSocialNetwork["Twitter"] = "twitter";
|
|
45
|
-
PCShareSocialNetwork["Facebook"] = "facebook";
|
|
46
|
-
})(PCShareSocialNetwork || (PCShareSocialNetwork = {}));
|
|
@@ -5,58 +5,58 @@ export declare enum NavigationItemType {
|
|
|
5
5
|
Button = "button",
|
|
6
6
|
Social = "social"
|
|
7
7
|
}
|
|
8
|
-
export interface
|
|
8
|
+
export interface NavigationItemBaseProps {
|
|
9
9
|
text: string;
|
|
10
10
|
icon?: ImageProps;
|
|
11
11
|
url?: string;
|
|
12
12
|
}
|
|
13
|
-
export interface
|
|
13
|
+
export interface NavigationLinkItemProps extends NavigationItemBaseProps {
|
|
14
14
|
type: NavigationItemType.Link;
|
|
15
15
|
url: string;
|
|
16
16
|
arrow?: boolean;
|
|
17
17
|
target?: string;
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface NavigationButtonItemProps extends ButtonProps {
|
|
20
20
|
type: NavigationItemType.Button;
|
|
21
21
|
url: string;
|
|
22
22
|
target?: string;
|
|
23
23
|
}
|
|
24
|
-
export interface
|
|
24
|
+
export interface NavigationDropdownItemProps extends NavigationItemBaseProps {
|
|
25
25
|
type: NavigationItemType.Dropdown;
|
|
26
|
-
items:
|
|
26
|
+
items: NavigationLinkItemProps[];
|
|
27
27
|
}
|
|
28
|
-
export interface
|
|
28
|
+
export interface NavigationSocialItemProps extends Omit<NavigationItemBaseProps, 'text'> {
|
|
29
29
|
type: NavigationItemType.Social;
|
|
30
30
|
icon: ImageProps;
|
|
31
31
|
url: string;
|
|
32
32
|
}
|
|
33
|
-
export declare type
|
|
34
|
-
export declare type
|
|
35
|
-
export declare type
|
|
36
|
-
export interface
|
|
33
|
+
export declare type NavigationItemProps = NavigationLinkItemProps | NavigationButtonItemProps | NavigationDropdownItemProps;
|
|
34
|
+
export declare type NavigationItemDataProps = NavigationLinkItemProps | NavigationButtonItemProps | NavigationSocialItemProps | DropdownItemDataProps;
|
|
35
|
+
export declare type DropdownItemDataProps = Omit<NavigationDropdownItemProps, 'items'>;
|
|
36
|
+
export interface NavigationLogoProps {
|
|
37
37
|
icon: ImageProps;
|
|
38
38
|
text?: string;
|
|
39
39
|
url?: string;
|
|
40
40
|
}
|
|
41
|
-
export interface
|
|
42
|
-
leftItems:
|
|
43
|
-
rightItems?:
|
|
41
|
+
export interface HeaderDataProps {
|
|
42
|
+
leftItems: NavigationItemProps[];
|
|
43
|
+
rightItems?: NavigationItemProps[];
|
|
44
44
|
}
|
|
45
|
-
export interface
|
|
45
|
+
export interface FooterColumnProps {
|
|
46
46
|
title: string;
|
|
47
|
-
links:
|
|
47
|
+
links: NavigationItemProps[];
|
|
48
48
|
}
|
|
49
|
-
export interface
|
|
50
|
-
links?:
|
|
49
|
+
export interface FooterUnderlineProps {
|
|
50
|
+
links?: NavigationItemProps[];
|
|
51
51
|
copyright?: string;
|
|
52
52
|
}
|
|
53
|
-
export interface
|
|
54
|
-
columns:
|
|
55
|
-
social?:
|
|
56
|
-
underline?:
|
|
53
|
+
export interface FooterDataProps {
|
|
54
|
+
columns: FooterColumnProps[];
|
|
55
|
+
social?: NavigationSocialItemProps[];
|
|
56
|
+
underline?: FooterUnderlineProps;
|
|
57
57
|
}
|
|
58
|
-
export interface
|
|
59
|
-
logo:
|
|
60
|
-
header:
|
|
61
|
-
footer?:
|
|
58
|
+
export interface NavigationDataProps {
|
|
59
|
+
logo: NavigationLogoProps;
|
|
60
|
+
header: HeaderDataProps;
|
|
61
|
+
footer?: FooterDataProps;
|
|
62
62
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { validators } from './validators';
|
|
2
|
-
import { TabsBlock, BannerCard, SliderBlock, ExtendedFeaturesBlock, HeaderBlock, BannerBlock, CompaniesBlock, MediaBlock, InfoBlock, QuestionsBlock, SecurityBlock, TableBlock, SimpleBlock, LinkTableBlock, PromoFeaturesBlock, PreviewBlock, ContentLayoutBlock, HeaderSliderBlock, IconsBlock, CardLayoutBlock,
|
|
2
|
+
import { TabsBlock, BannerCard, SliderBlock, ExtendedFeaturesBlock, HeaderBlock, BannerBlock, CompaniesBlock, MediaBlock, InfoBlock, QuestionsBlock, SecurityBlock, TableBlock, SimpleBlock, LinkTableBlock, PromoFeaturesBlock, PreviewBlock, ContentLayoutBlock, HeaderSliderBlock, IconsBlock, CardLayoutBlock, } from './validators/blocks';
|
|
3
3
|
import { PartnerBlock, MediaCardBlock, TutorialCard, BackgroundCard, NewsCard, CardWithImage, PriceDetailedBlock, Quote, Divider, } from './validators/sub-blocks';
|
|
4
4
|
import { AnimatableProps, BackgroundProps, MenuProps, withTheme } from './validators/common';
|
|
5
5
|
import { filteredItem } from './validators/utils';
|
|
@@ -48,7 +48,7 @@ export function generateDefaultSchema(config) {
|
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
50
|
select: { $data: '0/type' },
|
|
51
|
-
selectCases: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(
|
|
51
|
+
selectCases: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, TabsBlock), SliderBlock), ExtendedFeaturesBlock), PromoFeaturesBlock), HeaderBlock), BannerBlock), CompaniesBlock), MediaBlock), InfoBlock), QuestionsBlock), SecurityBlock), TableBlock), SimpleBlock), LinkTableBlock), PreviewBlock), HeaderSliderBlock), IconsBlock), CardLayoutBlock), ContentLayoutBlock), Divider), getBlocksCases(blocks)),
|
|
52
52
|
}),
|
|
53
53
|
cards: filteredItem({
|
|
54
54
|
type: 'object',
|
package/package.json
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PCShareSocialNetwork = void 0;
|
|
4
|
+
var PCShareSocialNetwork;
|
|
5
|
+
(function (PCShareSocialNetwork) {
|
|
6
|
+
PCShareSocialNetwork["Vk"] = "vk";
|
|
7
|
+
PCShareSocialNetwork["Telegram"] = "telegram";
|
|
8
|
+
PCShareSocialNetwork["Twitter"] = "twitter";
|
|
9
|
+
PCShareSocialNetwork["Facebook"] = "facebook";
|
|
10
|
+
})(PCShareSocialNetwork = exports.PCShareSocialNetwork || (exports.PCShareSocialNetwork = {}));
|
|
@@ -24,8 +24,7 @@ export declare enum BlockType {
|
|
|
24
24
|
HeaderBlock = "header-block",
|
|
25
25
|
IconsBlock = "icons-block",
|
|
26
26
|
CardLayoutBlock = "card-layout-block",
|
|
27
|
-
ContentLayoutBlock = "content-layout-block"
|
|
28
|
-
ShareBlock = "share-block"
|
|
27
|
+
ContentLayoutBlock = "content-layout-block"
|
|
29
28
|
}
|
|
30
29
|
export declare const BlockTypes: BlockType[];
|
|
31
30
|
export declare const HeaderBlockTypes: BlockType[];
|
|
@@ -276,16 +275,6 @@ export interface ContentBlockProps {
|
|
|
276
275
|
centered?: boolean;
|
|
277
276
|
theme?: ContentTheme;
|
|
278
277
|
}
|
|
279
|
-
export declare enum PCShareSocialNetwork {
|
|
280
|
-
Vk = "vk",
|
|
281
|
-
Telegram = "telegram",
|
|
282
|
-
Twitter = "twitter",
|
|
283
|
-
Facebook = "facebook"
|
|
284
|
-
}
|
|
285
|
-
export interface ShareBlockProps {
|
|
286
|
-
items: PCShareSocialNetwork[];
|
|
287
|
-
title?: string;
|
|
288
|
-
}
|
|
289
278
|
export declare type HeaderBlockModel = {
|
|
290
279
|
type: BlockType.HeaderBlock;
|
|
291
280
|
} & HeaderBlockProps;
|
|
@@ -349,9 +338,6 @@ export declare type HeaderSliderBlockModel = {
|
|
|
349
338
|
export declare type ContentLayoutBlockModel = {
|
|
350
339
|
type: BlockType.ContentLayoutBlock;
|
|
351
340
|
} & ContentLayoutBlockProps;
|
|
352
|
-
|
|
353
|
-
type: BlockType.ShareBlock;
|
|
354
|
-
} & ShareBlockProps;
|
|
355
|
-
declare type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel;
|
|
341
|
+
declare type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel;
|
|
356
342
|
export declare type Block = BlockModels & BlockBaseProps;
|
|
357
343
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SliderType = exports.SliderBreakpointNames = exports.HeaderBlockTypes = exports.BlockTypes = exports.BlockType = void 0;
|
|
4
4
|
var BlockType;
|
|
5
5
|
(function (BlockType) {
|
|
6
6
|
BlockType["PromoFeaturesBlock"] = "promo-features-block";
|
|
@@ -24,7 +24,6 @@ var BlockType;
|
|
|
24
24
|
BlockType["IconsBlock"] = "icons-block";
|
|
25
25
|
BlockType["CardLayoutBlock"] = "card-layout-block";
|
|
26
26
|
BlockType["ContentLayoutBlock"] = "content-layout-block";
|
|
27
|
-
BlockType["ShareBlock"] = "share-block";
|
|
28
27
|
})(BlockType = exports.BlockType || (exports.BlockType = {}));
|
|
29
28
|
exports.BlockTypes = Object.values(BlockType);
|
|
30
29
|
exports.HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];
|
|
@@ -40,10 +39,3 @@ var SliderType;
|
|
|
40
39
|
SliderType["MediaCard"] = "media-card";
|
|
41
40
|
SliderType["HeaderCard"] = "header-card";
|
|
42
41
|
})(SliderType = exports.SliderType || (exports.SliderType = {}));
|
|
43
|
-
var PCShareSocialNetwork;
|
|
44
|
-
(function (PCShareSocialNetwork) {
|
|
45
|
-
PCShareSocialNetwork["Vk"] = "vk";
|
|
46
|
-
PCShareSocialNetwork["Telegram"] = "telegram";
|
|
47
|
-
PCShareSocialNetwork["Twitter"] = "twitter";
|
|
48
|
-
PCShareSocialNetwork["Facebook"] = "facebook";
|
|
49
|
-
})(PCShareSocialNetwork = exports.PCShareSocialNetwork || (exports.PCShareSocialNetwork = {}));
|
|
@@ -5,58 +5,58 @@ export declare enum NavigationItemType {
|
|
|
5
5
|
Button = "button",
|
|
6
6
|
Social = "social"
|
|
7
7
|
}
|
|
8
|
-
export interface
|
|
8
|
+
export interface NavigationItemBaseProps {
|
|
9
9
|
text: string;
|
|
10
10
|
icon?: ImageProps;
|
|
11
11
|
url?: string;
|
|
12
12
|
}
|
|
13
|
-
export interface
|
|
13
|
+
export interface NavigationLinkItemProps extends NavigationItemBaseProps {
|
|
14
14
|
type: NavigationItemType.Link;
|
|
15
15
|
url: string;
|
|
16
16
|
arrow?: boolean;
|
|
17
17
|
target?: string;
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface NavigationButtonItemProps extends ButtonProps {
|
|
20
20
|
type: NavigationItemType.Button;
|
|
21
21
|
url: string;
|
|
22
22
|
target?: string;
|
|
23
23
|
}
|
|
24
|
-
export interface
|
|
24
|
+
export interface NavigationDropdownItemProps extends NavigationItemBaseProps {
|
|
25
25
|
type: NavigationItemType.Dropdown;
|
|
26
|
-
items:
|
|
26
|
+
items: NavigationLinkItemProps[];
|
|
27
27
|
}
|
|
28
|
-
export interface
|
|
28
|
+
export interface NavigationSocialItemProps extends Omit<NavigationItemBaseProps, 'text'> {
|
|
29
29
|
type: NavigationItemType.Social;
|
|
30
30
|
icon: ImageProps;
|
|
31
31
|
url: string;
|
|
32
32
|
}
|
|
33
|
-
export declare type
|
|
34
|
-
export declare type
|
|
35
|
-
export declare type
|
|
36
|
-
export interface
|
|
33
|
+
export declare type NavigationItemProps = NavigationLinkItemProps | NavigationButtonItemProps | NavigationDropdownItemProps;
|
|
34
|
+
export declare type NavigationItemDataProps = NavigationLinkItemProps | NavigationButtonItemProps | NavigationSocialItemProps | DropdownItemDataProps;
|
|
35
|
+
export declare type DropdownItemDataProps = Omit<NavigationDropdownItemProps, 'items'>;
|
|
36
|
+
export interface NavigationLogoProps {
|
|
37
37
|
icon: ImageProps;
|
|
38
38
|
text?: string;
|
|
39
39
|
url?: string;
|
|
40
40
|
}
|
|
41
|
-
export interface
|
|
42
|
-
leftItems:
|
|
43
|
-
rightItems?:
|
|
41
|
+
export interface HeaderDataProps {
|
|
42
|
+
leftItems: NavigationItemProps[];
|
|
43
|
+
rightItems?: NavigationItemProps[];
|
|
44
44
|
}
|
|
45
|
-
export interface
|
|
45
|
+
export interface FooterColumnProps {
|
|
46
46
|
title: string;
|
|
47
|
-
links:
|
|
47
|
+
links: NavigationItemProps[];
|
|
48
48
|
}
|
|
49
|
-
export interface
|
|
50
|
-
links?:
|
|
49
|
+
export interface FooterUnderlineProps {
|
|
50
|
+
links?: NavigationItemProps[];
|
|
51
51
|
copyright?: string;
|
|
52
52
|
}
|
|
53
|
-
export interface
|
|
54
|
-
columns:
|
|
55
|
-
social?:
|
|
56
|
-
underline?:
|
|
53
|
+
export interface FooterDataProps {
|
|
54
|
+
columns: FooterColumnProps[];
|
|
55
|
+
social?: NavigationSocialItemProps[];
|
|
56
|
+
underline?: FooterUnderlineProps;
|
|
57
57
|
}
|
|
58
|
-
export interface
|
|
59
|
-
logo:
|
|
60
|
-
header:
|
|
61
|
-
footer?:
|
|
58
|
+
export interface NavigationDataProps {
|
|
59
|
+
logo: NavigationLogoProps;
|
|
60
|
+
header: HeaderDataProps;
|
|
61
|
+
footer?: FooterDataProps;
|
|
62
62
|
}
|
|
@@ -327,12 +327,6 @@ const config = {
|
|
|
327
327
|
parser: parseContentLayoutTitle,
|
|
328
328
|
},
|
|
329
329
|
],
|
|
330
|
-
[models_1.BlockType.ShareBlock]: [
|
|
331
|
-
{
|
|
332
|
-
fields: ['title'],
|
|
333
|
-
transformer: typografTransformer,
|
|
334
|
-
},
|
|
335
|
-
],
|
|
336
330
|
};
|
|
337
331
|
function addRandomOrder(block) {
|
|
338
332
|
if (block) {
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare const ShareBlock: {
|
|
2
|
-
'share-block': {
|
|
3
|
-
additionalProperties: boolean;
|
|
4
|
-
required: string[];
|
|
5
|
-
properties: {
|
|
6
|
-
title: {
|
|
7
|
-
type: string;
|
|
8
|
-
};
|
|
9
|
-
items: {
|
|
10
|
-
type: string;
|
|
11
|
-
items: {
|
|
12
|
-
type: string;
|
|
13
|
-
properties: {
|
|
14
|
-
when: {
|
|
15
|
-
type: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
type: {};
|
|
21
|
-
when: {};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ShareBlock = void 0;
|
|
4
|
-
const utils_1 = require("../../schema/validators/utils");
|
|
5
|
-
const common_1 = require("../../schema/validators/common");
|
|
6
|
-
exports.ShareBlock = {
|
|
7
|
-
'share-block': {
|
|
8
|
-
additionalProperties: false,
|
|
9
|
-
required: ['items'],
|
|
10
|
-
properties: Object.assign(Object.assign({}, common_1.BaseProps), { title: {
|
|
11
|
-
type: 'string',
|
|
12
|
-
}, items: (0, utils_1.filteredArray)({
|
|
13
|
-
properties: {
|
|
14
|
-
type: 'string',
|
|
15
|
-
enum: ['telegram', 'facebook', 'twitter', 'vk'],
|
|
16
|
-
},
|
|
17
|
-
}) }),
|
|
18
|
-
},
|
|
19
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare const ShareBlock: {
|
|
2
|
-
'share-block': {
|
|
3
|
-
additionalProperties: boolean;
|
|
4
|
-
required: string[];
|
|
5
|
-
properties: {
|
|
6
|
-
title: {
|
|
7
|
-
type: string;
|
|
8
|
-
};
|
|
9
|
-
items: {
|
|
10
|
-
type: string;
|
|
11
|
-
items: {
|
|
12
|
-
type: string;
|
|
13
|
-
properties: {
|
|
14
|
-
when: {
|
|
15
|
-
type: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
type: {};
|
|
21
|
-
when: {};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { filteredArray } from '../../schema/validators/utils';
|
|
2
|
-
import { BaseProps } from '../../schema/validators/common';
|
|
3
|
-
export const ShareBlock = {
|
|
4
|
-
'share-block': {
|
|
5
|
-
additionalProperties: false,
|
|
6
|
-
required: ['items'],
|
|
7
|
-
properties: Object.assign(Object.assign({}, BaseProps), { title: {
|
|
8
|
-
type: 'string',
|
|
9
|
-
}, items: filteredArray({
|
|
10
|
-
properties: {
|
|
11
|
-
type: 'string',
|
|
12
|
-
enum: ['telegram', 'facebook', 'twitter', 'vk'],
|
|
13
|
-
},
|
|
14
|
-
}) }),
|
|
15
|
-
},
|
|
16
|
-
};
|