@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.
Files changed (79) hide show
  1. package/build/cjs/blocks/index.d.ts +0 -1
  2. package/build/cjs/blocks/index.js +1 -3
  3. package/build/cjs/blocks/validators.d.ts +0 -1
  4. package/build/cjs/blocks/validators.js +0 -1
  5. package/build/cjs/{blocks → components}/Share/Share.css +0 -0
  6. package/build/cjs/components/Share/Share.d.ts +7 -0
  7. package/build/cjs/{blocks → components}/Share/Share.js +0 -0
  8. package/build/cjs/{blocks → components}/Share/i18n/en.json +0 -0
  9. package/build/cjs/{blocks → components}/Share/i18n/index.d.ts +0 -0
  10. package/build/cjs/{blocks → components}/Share/i18n/index.js +0 -0
  11. package/build/cjs/{blocks → components}/Share/i18n/ru.json +0 -0
  12. package/build/cjs/components/index.d.ts +1 -2
  13. package/build/cjs/components/index.js +2 -4
  14. package/build/cjs/components/navigation/components/Header/Header.d.ts +3 -3
  15. package/build/cjs/components/navigation/components/Logo/Logo.d.ts +2 -2
  16. package/build/cjs/components/navigation/components/MobileNavigation/MobileNavigation.d.ts +1 -1
  17. package/build/cjs/components/navigation/components/Navigation/Navigation.d.ts +2 -2
  18. package/build/cjs/components/navigation/components/NavigationItem/NavigationItem.d.ts +2 -2
  19. package/build/cjs/components/navigation/components/NavigationPopup/NavigationPopup.d.ts +2 -2
  20. package/build/cjs/components/navigation/components/SocialIcon/SocialIcon.d.ts +3 -3
  21. package/build/cjs/components/navigation/containers/Layout/Layout.d.ts +2 -2
  22. package/build/cjs/constructor-items.d.ts +0 -1
  23. package/build/cjs/constructor-items.js +0 -1
  24. package/build/cjs/containers/PageConstructor/PageConstructor.d.ts +2 -2
  25. package/build/cjs/models/components.d.ts +6 -0
  26. package/build/cjs/models/components.js +8 -0
  27. package/build/cjs/models/constructor-items/blocks.d.ts +2 -16
  28. package/build/cjs/models/constructor-items/blocks.js +1 -9
  29. package/build/cjs/models/navigation.d.ts +25 -25
  30. package/build/cjs/schema/index.js +1 -1
  31. package/build/cjs/schema/validators/blocks.d.ts +0 -1
  32. package/build/cjs/schema/validators/blocks.js +0 -1
  33. package/build/cjs/text-transform/blocks.js +0 -6
  34. package/build/esm/blocks/index.d.ts +0 -1
  35. package/build/esm/blocks/index.js +0 -1
  36. package/build/esm/blocks/validators.d.ts +0 -1
  37. package/build/esm/blocks/validators.js +0 -1
  38. package/build/esm/{blocks → components}/Share/Share.css +0 -0
  39. package/build/esm/components/Share/Share.d.ts +8 -0
  40. package/build/esm/{blocks → components}/Share/Share.js +0 -0
  41. package/build/esm/{blocks → components}/Share/i18n/en.json +0 -0
  42. package/build/esm/{blocks → components}/Share/i18n/index.d.ts +0 -0
  43. package/build/esm/{blocks → components}/Share/i18n/index.js +0 -0
  44. package/build/esm/{blocks → components}/Share/i18n/ru.json +0 -0
  45. package/build/esm/components/index.d.ts +1 -2
  46. package/build/esm/components/index.js +1 -2
  47. package/build/esm/components/navigation/components/Header/Header.d.ts +3 -3
  48. package/build/esm/components/navigation/components/Logo/Logo.d.ts +2 -2
  49. package/build/esm/components/navigation/components/MobileNavigation/MobileNavigation.d.ts +1 -1
  50. package/build/esm/components/navigation/components/Navigation/Navigation.d.ts +2 -2
  51. package/build/esm/components/navigation/components/NavigationItem/NavigationItem.d.ts +2 -2
  52. package/build/esm/components/navigation/components/NavigationPopup/NavigationPopup.d.ts +2 -2
  53. package/build/esm/components/navigation/components/SocialIcon/SocialIcon.d.ts +3 -3
  54. package/build/esm/components/navigation/containers/Layout/Layout.d.ts +2 -2
  55. package/build/esm/constructor-items.d.ts +0 -1
  56. package/build/esm/constructor-items.js +1 -2
  57. package/build/esm/containers/PageConstructor/PageConstructor.d.ts +2 -2
  58. package/build/esm/models/components.d.ts +6 -0
  59. package/build/esm/models/components.js +7 -1
  60. package/build/esm/models/constructor-items/blocks.d.ts +2 -16
  61. package/build/esm/models/constructor-items/blocks.js +0 -8
  62. package/build/esm/models/navigation.d.ts +25 -25
  63. package/build/esm/schema/index.js +2 -2
  64. package/build/esm/schema/validators/blocks.d.ts +0 -1
  65. package/build/esm/schema/validators/blocks.js +0 -1
  66. package/build/esm/text-transform/blocks.js +0 -6
  67. package/package.json +1 -1
  68. package/server/models/components.d.ts +6 -0
  69. package/server/models/components.js +8 -0
  70. package/server/models/constructor-items/blocks.d.ts +2 -16
  71. package/server/models/constructor-items/blocks.js +1 -9
  72. package/server/models/navigation.d.ts +25 -25
  73. package/server/text-transform/blocks.js +0 -6
  74. package/build/cjs/blocks/Share/Share.d.ts +0 -3
  75. package/build/cjs/blocks/Share/schema.d.ts +0 -24
  76. package/build/cjs/blocks/Share/schema.js +0 -19
  77. package/build/esm/blocks/Share/Share.d.ts +0 -4
  78. package/build/esm/blocks/Share/schema.d.ts +0 -24
  79. 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, ShareBlock, } from './blocks';
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, NavigationData } from '../../models';
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?: NavigationData;
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;
@@ -2,3 +2,9 @@ export declare type ArrowDirection = 'left' | 'right';
2
2
  export interface ReactPlayerBlockHandler {
3
3
  pause: () => void;
4
4
  }
5
+ export declare enum PCShareSocialNetwork {
6
+ Vk = "vk",
7
+ Telegram = "telegram",
8
+ Twitter = "twitter",
9
+ Facebook = "facebook"
10
+ }
@@ -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
- export declare type ShareBLockModel = {
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 NavigationItemBase {
8
+ export interface NavigationItemBaseProps {
9
9
  text: string;
10
10
  icon?: ImageProps;
11
11
  url?: string;
12
12
  }
13
- export interface NavigationLinkItem extends NavigationItemBase {
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 NavigationButtonItem extends ButtonProps {
19
+ export interface NavigationButtonItemProps extends ButtonProps {
20
20
  type: NavigationItemType.Button;
21
21
  url: string;
22
22
  target?: string;
23
23
  }
24
- export interface NavigationDropdownItem extends NavigationItemBase {
24
+ export interface NavigationDropdownItemProps extends NavigationItemBaseProps {
25
25
  type: NavigationItemType.Dropdown;
26
- items: NavigationLinkItem[];
26
+ items: NavigationLinkItemProps[];
27
27
  }
28
- export interface NavigationSocialItem extends Omit<NavigationItemBase, 'text'> {
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 NavigationItem = NavigationLinkItem | NavigationButtonItem | NavigationDropdownItem;
34
- export declare type NavigationItemData = NavigationLinkItem | NavigationButtonItem | NavigationSocialItem | DropdownItemData;
35
- export declare type DropdownItemData = Omit<NavigationDropdownItem, 'items'>;
36
- export interface NavigationLogo {
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 HeaderData {
42
- leftItems: NavigationItem[];
43
- rightItems?: NavigationItem[];
41
+ export interface HeaderDataProps {
42
+ leftItems: NavigationItemProps[];
43
+ rightItems?: NavigationItemProps[];
44
44
  }
45
- export interface FooterColumn {
45
+ export interface FooterColumnProps {
46
46
  title: string;
47
- links: NavigationItem[];
47
+ links: NavigationItemProps[];
48
48
  }
49
- export interface FooterUnderline {
50
- links?: NavigationItem[];
49
+ export interface FooterUnderlineProps {
50
+ links?: NavigationItemProps[];
51
51
  copyright?: string;
52
52
  }
53
- export interface FooterData {
54
- columns: FooterColumn[];
55
- social?: NavigationSocialItem[];
56
- underline?: FooterUnderline;
53
+ export interface FooterDataProps {
54
+ columns: FooterColumnProps[];
55
+ social?: NavigationSocialItemProps[];
56
+ underline?: FooterUnderlineProps;
57
57
  }
58
- export interface NavigationData {
59
- logo: NavigationLogo;
60
- header: HeaderData;
61
- footer?: FooterData;
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, ShareBlock, } from './validators/blocks';
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(Object.assign({}, TabsBlock), SliderBlock), ExtendedFeaturesBlock), PromoFeaturesBlock), HeaderBlock), BannerBlock), CompaniesBlock), MediaBlock), InfoBlock), QuestionsBlock), SecurityBlock), TableBlock), SimpleBlock), LinkTableBlock), PreviewBlock), HeaderSliderBlock), IconsBlock), CardLayoutBlock), ContentLayoutBlock), Divider), ShareBlock), getBlocksCases(blocks)),
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',
@@ -17,4 +17,3 @@ export * from '../../blocks/HeaderSlider/schema';
17
17
  export * from '../../blocks/Icons/schema';
18
18
  export * from '../../blocks/CardLayout/schema';
19
19
  export * from '../../blocks/ContentLayout/schema';
20
- export * from '../../blocks/Share/schema';
@@ -17,4 +17,3 @@ export * from '../../blocks/HeaderSlider/schema';
17
17
  export * from '../../blocks/Icons/schema';
18
18
  export * from '../../blocks/CardLayout/schema';
19
19
  export * from '../../blocks/ContentLayout/schema';
20
- export * from '../../blocks/Share/schema';
@@ -308,12 +308,6 @@ const config = {
308
308
  parser: parseContentLayoutTitle,
309
309
  },
310
310
  ],
311
- [BlockType.ShareBlock]: [
312
- {
313
- fields: ['title'],
314
- transformer: typografTransformer,
315
- },
316
- ],
317
311
  };
318
312
  function addRandomOrder(block) {
319
313
  if (block) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "1.9.1-alpha.1",
3
+ "version": "1.9.1-alpha.2",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -2,3 +2,9 @@ export declare type ArrowDirection = 'left' | 'right';
2
2
  export interface ReactPlayerBlockHandler {
3
3
  pause: () => void;
4
4
  }
5
+ export declare enum PCShareSocialNetwork {
6
+ Vk = "vk",
7
+ Telegram = "telegram",
8
+ Twitter = "twitter",
9
+ Facebook = "facebook"
10
+ }
@@ -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
- export declare type ShareBLockModel = {
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.PCShareSocialNetwork = exports.SliderType = exports.SliderBreakpointNames = exports.HeaderBlockTypes = exports.BlockTypes = exports.BlockType = void 0;
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 NavigationItemBase {
8
+ export interface NavigationItemBaseProps {
9
9
  text: string;
10
10
  icon?: ImageProps;
11
11
  url?: string;
12
12
  }
13
- export interface NavigationLinkItem extends NavigationItemBase {
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 NavigationButtonItem extends ButtonProps {
19
+ export interface NavigationButtonItemProps extends ButtonProps {
20
20
  type: NavigationItemType.Button;
21
21
  url: string;
22
22
  target?: string;
23
23
  }
24
- export interface NavigationDropdownItem extends NavigationItemBase {
24
+ export interface NavigationDropdownItemProps extends NavigationItemBaseProps {
25
25
  type: NavigationItemType.Dropdown;
26
- items: NavigationLinkItem[];
26
+ items: NavigationLinkItemProps[];
27
27
  }
28
- export interface NavigationSocialItem extends Omit<NavigationItemBase, 'text'> {
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 NavigationItem = NavigationLinkItem | NavigationButtonItem | NavigationDropdownItem;
34
- export declare type NavigationItemData = NavigationLinkItem | NavigationButtonItem | NavigationSocialItem | DropdownItemData;
35
- export declare type DropdownItemData = Omit<NavigationDropdownItem, 'items'>;
36
- export interface NavigationLogo {
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 HeaderData {
42
- leftItems: NavigationItem[];
43
- rightItems?: NavigationItem[];
41
+ export interface HeaderDataProps {
42
+ leftItems: NavigationItemProps[];
43
+ rightItems?: NavigationItemProps[];
44
44
  }
45
- export interface FooterColumn {
45
+ export interface FooterColumnProps {
46
46
  title: string;
47
- links: NavigationItem[];
47
+ links: NavigationItemProps[];
48
48
  }
49
- export interface FooterUnderline {
50
- links?: NavigationItem[];
49
+ export interface FooterUnderlineProps {
50
+ links?: NavigationItemProps[];
51
51
  copyright?: string;
52
52
  }
53
- export interface FooterData {
54
- columns: FooterColumn[];
55
- social?: NavigationSocialItem[];
56
- underline?: FooterUnderline;
53
+ export interface FooterDataProps {
54
+ columns: FooterColumnProps[];
55
+ social?: NavigationSocialItemProps[];
56
+ underline?: FooterUnderlineProps;
57
57
  }
58
- export interface NavigationData {
59
- logo: NavigationLogo;
60
- header: HeaderData;
61
- footer?: FooterData;
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,3 +0,0 @@
1
- import { ShareBlockProps } from '../../models';
2
- declare const Share: ({ items, title }: ShareBlockProps) => JSX.Element;
3
- export default Share;
@@ -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,4 +0,0 @@
1
- import { ShareBlockProps } from '../../models';
2
- import './Share.css';
3
- declare const Share: ({ items, title }: ShareBlockProps) => JSX.Element;
4
- export default Share;
@@ -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
- };