@gravity-ui/page-constructor 1.14.0-alpha.8 → 1.14.1

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 (91) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/build/cjs/blocks/Banner/schema.d.ts +0 -336
  3. package/build/cjs/blocks/Media/schema.d.ts +0 -112
  4. package/build/cjs/components/Button/Button.js +2 -5
  5. package/build/cjs/components/CardBase/CardBase.d.ts +0 -2
  6. package/build/cjs/components/CardBase/CardBase.js +1 -4
  7. package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -4
  8. package/build/cjs/components/Link/Link.js +1 -4
  9. package/build/cjs/components/YandexForm/YandexForm.d.ts +0 -2
  10. package/build/cjs/components/YandexForm/YandexForm.js +2 -13
  11. package/build/cjs/containers/PageConstructor/Provider.d.ts +0 -2
  12. package/build/cjs/containers/PageConstructor/Provider.js +1 -3
  13. package/build/cjs/context/metrikaContext/metrikaContext.d.ts +0 -6
  14. package/build/cjs/hooks/useMetrika.d.ts +0 -6
  15. package/build/cjs/hooks/useMetrika.js +0 -8
  16. package/build/cjs/models/common.d.ts +0 -30
  17. package/build/cjs/models/common.js +0 -3
  18. package/build/cjs/models/constructor-items/common.d.ts +1 -4
  19. package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -2
  20. package/build/cjs/models/navigation.d.ts +1 -3
  21. package/build/cjs/navigation/components/Header/Header.css +5 -3
  22. package/build/cjs/navigation/components/Logo/Logo.css +5 -6
  23. package/build/cjs/navigation/components/NavigationItem/NavigationItem.css +1 -0
  24. package/build/cjs/navigation/schema.d.ts +60 -0
  25. package/build/cjs/navigation/schema.js +80 -0
  26. package/build/cjs/schema/index.d.ts +67 -0
  27. package/build/cjs/schema/index.js +2 -1
  28. package/build/cjs/schema/validators/common.d.ts +0 -236
  29. package/build/cjs/schema/validators/common.js +0 -10
  30. package/build/cjs/schema/validators/index.d.ts +2 -0
  31. package/build/cjs/schema/validators/index.js +2 -0
  32. package/build/cjs/schema/validators/navigation.d.ts +1 -0
  33. package/build/cjs/{context/analyticsContext/index.js → schema/validators/navigation.js} +1 -1
  34. package/build/cjs/sub-blocks/HubspotForm/index.js +2 -14
  35. package/build/cjs/text-transform/blocks.js +1 -10
  36. package/build/esm/blocks/Banner/schema.d.ts +0 -336
  37. package/build/esm/blocks/Media/schema.d.ts +0 -112
  38. package/build/esm/components/Button/Button.js +2 -5
  39. package/build/esm/components/CardBase/CardBase.d.ts +0 -2
  40. package/build/esm/components/CardBase/CardBase.js +1 -4
  41. package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -4
  42. package/build/esm/components/Link/Link.js +1 -4
  43. package/build/esm/components/YandexForm/YandexForm.d.ts +0 -2
  44. package/build/esm/components/YandexForm/YandexForm.js +2 -13
  45. package/build/esm/containers/PageConstructor/Provider.d.ts +0 -2
  46. package/build/esm/containers/PageConstructor/Provider.js +1 -3
  47. package/build/esm/context/metrikaContext/metrikaContext.d.ts +0 -6
  48. package/build/esm/hooks/useMetrika.d.ts +0 -6
  49. package/build/esm/hooks/useMetrika.js +0 -8
  50. package/build/esm/models/common.d.ts +0 -30
  51. package/build/esm/models/common.js +0 -3
  52. package/build/esm/models/constructor-items/common.d.ts +1 -4
  53. package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -2
  54. package/build/esm/models/navigation.d.ts +1 -3
  55. package/build/esm/navigation/components/Header/Header.css +5 -3
  56. package/build/esm/navigation/components/Logo/Logo.css +5 -6
  57. package/build/esm/navigation/components/NavigationItem/NavigationItem.css +1 -0
  58. package/build/esm/navigation/schema.d.ts +60 -0
  59. package/build/esm/navigation/schema.js +77 -0
  60. package/build/esm/schema/index.d.ts +67 -0
  61. package/build/esm/schema/index.js +2 -1
  62. package/build/esm/schema/validators/common.d.ts +0 -236
  63. package/build/esm/schema/validators/common.js +0 -10
  64. package/build/esm/schema/validators/index.d.ts +2 -0
  65. package/build/esm/schema/validators/index.js +2 -0
  66. package/build/esm/schema/validators/navigation.d.ts +1 -0
  67. package/build/esm/schema/validators/navigation.js +1 -0
  68. package/build/esm/sub-blocks/HubspotForm/index.js +2 -14
  69. package/build/esm/text-transform/blocks.js +1 -10
  70. package/package.json +1 -4
  71. package/server/models/common.d.ts +0 -30
  72. package/server/models/common.js +0 -3
  73. package/server/models/constructor-items/common.d.ts +1 -4
  74. package/server/models/constructor-items/sub-blocks.d.ts +1 -2
  75. package/server/models/navigation.d.ts +1 -3
  76. package/server/text-transform/blocks.js +1 -10
  77. package/build/cjs/context/analyticsContext/analyticsContext.d.ts +0 -6
  78. package/build/cjs/context/analyticsContext/analyticsContext.js +0 -6
  79. package/build/cjs/context/analyticsContext/index.d.ts +0 -1
  80. package/build/cjs/hooks/useAnalytics.d.ts +0 -2
  81. package/build/cjs/hooks/useAnalytics.js +0 -15
  82. package/build/cjs/schema/validators/event.d.ts +0 -54
  83. package/build/cjs/schema/validators/event.js +0 -57
  84. package/build/esm/context/analyticsContext/analyticsContext.d.ts +0 -6
  85. package/build/esm/context/analyticsContext/analyticsContext.js +0 -2
  86. package/build/esm/context/analyticsContext/index.d.ts +0 -1
  87. package/build/esm/context/analyticsContext/index.js +0 -1
  88. package/build/esm/hooks/useAnalytics.d.ts +0 -2
  89. package/build/esm/hooks/useAnalytics.js +0 -11
  90. package/build/esm/schema/validators/event.d.ts +0 -54
  91. package/build/esm/schema/validators/event.js +0 -54
@@ -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 = {}, analytics = {}, ssrConfig = {}, projectSettings = {}, theme = DEFAULT_THEME, children, } = props;
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>;
@@ -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,19 +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;
70
- };
71
- export type AnalyticsEvent = {
72
- name: string;
73
- type?: string;
74
- counters?: {
75
- include?: string[];
76
- exclude?: string[];
77
- };
78
- category?: string;
79
- label?: string;
80
- params?: AnalyticsParameter[];
81
- };
82
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";
@@ -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 { AnalyticsEvent, ClassNameProps, PixelEventType } from '../common';
4
+ import { ClassNameProps, PixelEventType } from '../common';
5
5
  export declare enum AuthorType {
6
6
  Column = "column",
7
7
  Line = "line"
@@ -121,7 +121,6 @@ export interface LinkProps extends Stylable {
121
121
  target?: string;
122
122
  metrikaGoals?: MetrikaGoal;
123
123
  pixelEvents?: ButtonPixel;
124
- analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
125
124
  }
126
125
  export interface FileLinkProps extends ClassNameProps {
127
126
  href: string;
@@ -140,7 +139,6 @@ export interface ButtonProps {
140
139
  img?: ButtonImageProps | string;
141
140
  metrikaGoals?: MetrikaGoal;
142
141
  pixelEvents?: ButtonPixel;
143
- analyticsEvents?: AnalyticsEvent[];
144
142
  target?: string;
145
143
  }
146
144
  export interface ButtonImageProps {
@@ -224,7 +222,6 @@ export interface HeaderBreadCrumbsProps extends ClassNameProps {
224
222
  theme?: TextTheme;
225
223
  metrikaGoals?: MetrikaGoal;
226
224
  pixelEvents?: ButtonPixel;
227
- analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
228
225
  }
229
226
  export interface PreviewContentItemProps {
230
227
  title: 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 { AnalyticsEvent, PixelEvent } from '../common';
6
+ import { PixelEvent } from '../common';
7
7
  export declare enum SubBlockType {
8
8
  Divider = "divider",
9
9
  Quote = "quote",
@@ -61,7 +61,6 @@ export interface HubspotFormProps extends HubspotEventHandlers {
61
61
  onLoad?: (arg: HubspotEventData) => void;
62
62
  pixelEvents?: string | string[] | PixelEvent | PixelEvent[] | ButtonPixel;
63
63
  hubspotEvents?: string[];
64
- analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
65
64
  }
66
65
  export interface PartnerProps extends CardBaseProps {
67
66
  text: string;
@@ -11,7 +11,7 @@ export interface NavigationItemBase {
11
11
  icon?: ImageProps;
12
12
  url?: string;
13
13
  }
14
- export interface NavigationLinkItem extends NavigationItemBase {
14
+ export interface NavigationLinkItem extends Omit<NavigationItemBase, 'url'> {
15
15
  type: NavigationItemType.Link;
16
16
  url: string;
17
17
  arrow?: boolean;
@@ -19,8 +19,6 @@ export interface NavigationLinkItem extends NavigationItemBase {
19
19
  }
20
20
  export interface NavigationButtonItem extends ButtonProps {
21
21
  type: NavigationItemType.Button;
22
- url: string;
23
- target?: string;
24
22
  }
25
23
  export interface NavigationDropdownItem extends NavigationItemBase {
26
24
  type: NavigationItemType.Dropdown;
@@ -18,25 +18,27 @@ unpredictable css rules order in build */
18
18
  height: var(--header-height);
19
19
  }
20
20
  @media (min-width: 769px) {
21
- .pc-header__mobile-menu-button {
21
+ .pc-header__mobile-menu-button.pc-header__mobile-menu-button {
22
22
  display: none;
23
23
  }
24
24
  }
25
+
25
26
  .pc-header__navigation, .pc-header__left, .pc-header__right {
26
27
  display: flex;
27
28
  align-items: center;
28
29
  }
29
- .pc-header__navigation {
30
+ .pc-header__navigation.pc-header__navigation {
30
31
  position: relative;
31
32
  margin-right: 20px;
32
33
  flex: 1 0 0;
33
34
  justify-content: flex-start;
34
35
  }
35
36
  @media (max-width: 768px) {
36
- .pc-header__navigation {
37
+ .pc-header__navigation.pc-header__navigation {
37
38
  display: none;
38
39
  }
39
40
  }
41
+
40
42
  .pc-header__right {
41
43
  flex: 0;
42
44
  justify-content: flex-end;
@@ -1,4 +1,4 @@
1
- .pc-logo {
1
+ .pc-logo__text {
2
2
  margin: 0;
3
3
  }
4
4
 
@@ -7,11 +7,6 @@ unpredictable css rules order in build */
7
7
  .pc-logo {
8
8
  display: flex;
9
9
  align-items: center;
10
- font-weight: var(--yc-text-accent-font-weight);
11
- font-size: var(--yc-text-header-1-font-size);
12
- line-height: var(--yc-text-header-1-line-height);
13
- color: var(--pc-text-header-color);
14
- font-weight: var(--yc-text-accent-font-weight);
15
10
  }
16
11
  .pc-logo__icon {
17
12
  display: flex;
@@ -19,5 +14,9 @@ unpredictable css rules order in build */
19
14
  object-fit: contain;
20
15
  }
21
16
  .pc-logo__text {
17
+ font-size: var(--yc-text-header-1-font-size);
18
+ line-height: var(--yc-text-header-1-line-height);
19
+ color: var(--pc-text-header-color);
20
+ font-weight: var(--yc-text-accent-font-weight);
22
21
  white-space: nowrap;
23
22
  }
@@ -4,6 +4,7 @@ unpredictable css rules order in build */
4
4
  position: relative;
5
5
  display: flex;
6
6
  align-items: center;
7
+ white-space: nowrap;
7
8
  }
8
9
  .pc-navigation-item_type_link {
9
10
  color: var(--yc-color-text-primary);
@@ -0,0 +1,60 @@
1
+ export declare const LogoProps: {
2
+ type: string;
3
+ additionalProperties: boolean;
4
+ required: string[];
5
+ properties: {
6
+ icon: {
7
+ oneOf: ({
8
+ type: string;
9
+ properties: {
10
+ when: {
11
+ type: string;
12
+ };
13
+ };
14
+ } | {
15
+ type: string;
16
+ pattern: string;
17
+ })[];
18
+ };
19
+ text: {
20
+ type: string;
21
+ contentType: string;
22
+ };
23
+ url: {
24
+ type: string;
25
+ };
26
+ };
27
+ };
28
+ export declare const NavigationHeaderProps: {
29
+ type: string;
30
+ additionalProperties: boolean;
31
+ required: string[];
32
+ properties: {
33
+ leftItems: {
34
+ oneOf: {
35
+ type: string;
36
+ items: {
37
+ type: string;
38
+ properties: {
39
+ when: {
40
+ type: string;
41
+ };
42
+ };
43
+ };
44
+ }[];
45
+ };
46
+ rightItems: {
47
+ oneOf: {
48
+ type: string;
49
+ items: {
50
+ type: string;
51
+ properties: {
52
+ when: {
53
+ type: string;
54
+ };
55
+ };
56
+ };
57
+ }[];
58
+ };
59
+ };
60
+ };
@@ -0,0 +1,77 @@
1
+ import { ButtonProps } from '../schema/validators/common';
2
+ import { ImageProps, urlPattern } from '../components/Image/schema';
3
+ import { omit } from 'lodash';
4
+ import { filteredArray } from '../schema/validators/utils';
5
+ const NavigationItemType = {
6
+ type: 'string',
7
+ enum: ['link', 'button', 'dropdown'],
8
+ };
9
+ export const LogoProps = {
10
+ type: 'object',
11
+ additionalProperties: false,
12
+ required: ['icon'],
13
+ properties: {
14
+ icon: ImageProps,
15
+ text: {
16
+ type: 'string',
17
+ contentType: 'text',
18
+ },
19
+ url: {
20
+ type: 'string',
21
+ },
22
+ },
23
+ };
24
+ const NavigationItemBaseProps = {
25
+ text: {
26
+ type: 'string',
27
+ contentType: 'text',
28
+ },
29
+ url: {
30
+ type: 'string',
31
+ },
32
+ icon: {
33
+ type: 'string',
34
+ pattern: urlPattern,
35
+ },
36
+ };
37
+ const NavigationItemBaseLinkProps = omit(NavigationItemBaseProps, ['url']);
38
+ const NavigationLinkItemProps = {
39
+ type: 'object',
40
+ additionalProperties: false,
41
+ required: ['type', 'text'],
42
+ properties: Object.assign(Object.assign({}, NavigationItemBaseLinkProps), { type: Object.assign({}, NavigationItemType), url: {
43
+ type: 'string',
44
+ }, target: {
45
+ type: 'string',
46
+ }, arrow: {
47
+ type: 'boolean',
48
+ } }),
49
+ };
50
+ const NavigationButtonItemProps = {
51
+ type: 'object',
52
+ additionalProperties: false,
53
+ required: ['type', 'text', 'url'],
54
+ properties: Object.assign(Object.assign({}, ButtonProps), { type: Object.assign({}, NavigationItemType) }),
55
+ };
56
+ const NavigationDropdownItemProps = {
57
+ type: 'object',
58
+ additionalProperties: false,
59
+ required: ['type', 'items'],
60
+ properties: Object.assign(Object.assign({}, NavigationItemBaseProps), { type: Object.assign({}, NavigationItemType), items: filteredArray(NavigationLinkItemProps) }),
61
+ };
62
+ const NavigationItemProps = {
63
+ oneOf: [
64
+ filteredArray(NavigationLinkItemProps),
65
+ filteredArray(NavigationButtonItemProps),
66
+ filteredArray(NavigationDropdownItemProps),
67
+ ],
68
+ };
69
+ export const NavigationHeaderProps = {
70
+ type: 'object',
71
+ additionalProperties: false,
72
+ required: ['leftItems'],
73
+ properties: {
74
+ leftItems: NavigationItemProps,
75
+ rightItems: NavigationItemProps,
76
+ },
77
+ };
@@ -31,6 +31,73 @@ export declare function generateDefaultSchema(config?: SchemaCustomConfig): {
31
31
  additionalProperties: boolean;
32
32
  required: string[];
33
33
  properties: {
34
+ logo: {
35
+ oneOf: ({
36
+ type: string;
37
+ additionalProperties: boolean;
38
+ required: string[];
39
+ properties: {
40
+ icon: {
41
+ oneOf: ({
42
+ type: string;
43
+ properties: {
44
+ when: {
45
+ type: string;
46
+ };
47
+ };
48
+ } | {
49
+ type: string;
50
+ pattern: string;
51
+ })[];
52
+ };
53
+ text: {
54
+ type: string;
55
+ contentType: string;
56
+ };
57
+ url: {
58
+ type: string;
59
+ };
60
+ };
61
+ } | {
62
+ type: string;
63
+ additionalProperties: boolean;
64
+ required: import("..").Theme[];
65
+ properties: {};
66
+ })[];
67
+ };
68
+ header: {
69
+ type: string;
70
+ additionalProperties: boolean;
71
+ required: string[];
72
+ properties: {
73
+ leftItems: {
74
+ oneOf: {
75
+ type: string;
76
+ items: {
77
+ type: string;
78
+ properties: {
79
+ when: {
80
+ type: string;
81
+ };
82
+ };
83
+ };
84
+ }[];
85
+ };
86
+ rightItems: {
87
+ oneOf: {
88
+ type: string;
89
+ items: {
90
+ type: string;
91
+ properties: {
92
+ when: {
93
+ type: string;
94
+ };
95
+ };
96
+ };
97
+ }[];
98
+ };
99
+ };
100
+ };
34
101
  blocks: {
35
102
  type: string;
36
103
  items: {
@@ -3,6 +3,7 @@ import { TabsBlock, BannerCard, SliderBlock, ExtendedFeaturesBlock, HeaderBlock,
3
3
  import { PartnerBlock, MediaCardBlock, TutorialCard, BackgroundCard, NewsCard, CardWithImage, PriceDetailedBlock, Quote, Divider, BasicCard, } from './validators/sub-blocks';
4
4
  import { AnimatableProps, BackgroundProps, MenuProps, withTheme } from './validators/common';
5
5
  import { filteredItem } from './validators/utils';
6
+ import { LogoProps, NavigationHeaderProps } from './validators/navigation';
6
7
  export const getBlocksCases = (blocks) => {
7
8
  return Object.values(blocks).reduce((acc, block) => (Object.assign(Object.assign({}, acc), block)));
8
9
  };
@@ -83,7 +84,7 @@ export function generateDefaultSchema(config) {
83
84
  type: 'object',
84
85
  additionalProperties: false,
85
86
  required: ['blocks'],
86
- properties: Object.assign(Object.assign(Object.assign({}, AnimatableProps), { blocks: {
87
+ properties: Object.assign(Object.assign(Object.assign({}, AnimatableProps), { logo: withTheme(LogoProps), header: NavigationHeaderProps, blocks: {
87
88
  type: 'array',
88
89
  items: {
89
90
  $ref: '#/definitions/children',