@gravity-ui/page-constructor 1.14.0-alpha.0 → 1.14.0-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/Banner/schema.d.ts +0 -321
- package/build/cjs/blocks/Media/schema.d.ts +0 -107
- package/build/cjs/components/Button/Button.js +2 -5
- package/build/cjs/components/CardBase/CardBase.d.ts +0 -2
- package/build/cjs/components/CardBase/CardBase.js +1 -4
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -4
- package/build/cjs/components/Link/Link.js +1 -4
- package/build/cjs/components/YandexForm/YandexForm.d.ts +0 -2
- package/build/cjs/components/YandexForm/YandexForm.js +2 -13
- package/build/cjs/context/metrikaContext/metrikaContext.d.ts +0 -6
- 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 -30
- package/build/cjs/models/common.js +0 -3
- package/build/cjs/models/constructor-items/common.d.ts +1 -4
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -2
- package/build/cjs/models/navigation.d.ts +1 -3
- package/build/cjs/navigation/components/Header/Header.css +5 -3
- package/build/cjs/navigation/components/Logo/Logo.css +5 -6
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.css +1 -0
- package/build/cjs/navigation/schema.d.ts +369 -0
- package/build/cjs/navigation/schema.js +89 -0
- package/build/cjs/schema/index.d.ts +367 -0
- package/build/cjs/schema/index.js +2 -1
- package/build/cjs/schema/validators/common.d.ts +0 -226
- package/build/cjs/schema/validators/common.js +0 -10
- package/build/cjs/schema/validators/index.d.ts +2 -0
- package/build/cjs/schema/validators/index.js +2 -0
- package/build/cjs/schema/validators/navigation.d.ts +1 -0
- package/build/cjs/{context/analyticsContext/index.js → schema/validators/navigation.js} +1 -1
- package/build/cjs/sub-blocks/HubspotForm/index.js +2 -14
- package/build/esm/blocks/Banner/schema.d.ts +0 -321
- package/build/esm/blocks/Media/schema.d.ts +0 -107
- package/build/esm/components/Button/Button.js +2 -5
- package/build/esm/components/CardBase/CardBase.d.ts +0 -2
- package/build/esm/components/CardBase/CardBase.js +1 -4
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -4
- package/build/esm/components/Link/Link.js +1 -4
- package/build/esm/components/YandexForm/YandexForm.d.ts +0 -2
- package/build/esm/components/YandexForm/YandexForm.js +2 -13
- package/build/esm/context/metrikaContext/metrikaContext.d.ts +0 -6
- 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 -30
- package/build/esm/models/common.js +0 -3
- package/build/esm/models/constructor-items/common.d.ts +1 -4
- package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -2
- package/build/esm/models/navigation.d.ts +1 -3
- package/build/esm/navigation/components/Header/Header.css +5 -3
- package/build/esm/navigation/components/Logo/Logo.css +5 -6
- package/build/esm/navigation/components/NavigationItem/NavigationItem.css +1 -0
- package/build/esm/navigation/schema.d.ts +369 -0
- package/build/esm/navigation/schema.js +86 -0
- package/build/esm/schema/index.d.ts +367 -0
- package/build/esm/schema/index.js +2 -1
- package/build/esm/schema/validators/common.d.ts +0 -226
- package/build/esm/schema/validators/common.js +0 -10
- package/build/esm/schema/validators/index.d.ts +2 -0
- package/build/esm/schema/validators/index.js +2 -0
- package/build/esm/schema/validators/navigation.d.ts +1 -0
- package/build/esm/schema/validators/navigation.js +1 -0
- package/build/esm/sub-blocks/HubspotForm/index.js +2 -14
- package/package.json +1 -4
- package/server/models/common.d.ts +0 -30
- package/server/models/common.js +0 -3
- package/server/models/constructor-items/common.d.ts +1 -4
- package/server/models/constructor-items/sub-blocks.d.ts +1 -2
- package/server/models/navigation.d.ts +1 -3
- 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/hooks/useAnalytics.d.ts +0 -2
- package/build/cjs/hooks/useAnalytics.js +0 -15
- package/build/cjs/schema/validators/event.d.ts +0 -50
- package/build/cjs/schema/validators/event.js +0 -53
- 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 -11
- package/build/esm/schema/validators/event.d.ts +0 -50
- package/build/esm/schema/validators/event.js +0 -50
|
@@ -5,20 +5,12 @@ const react_1 = require("react");
|
|
|
5
5
|
const metrikaContext_1 = require("../context/metrikaContext");
|
|
6
6
|
const models_1 = require("../models");
|
|
7
7
|
const guards_1 = require("../models/guards");
|
|
8
|
-
// eslint-disable-next-line valid-jsdoc
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated Metrika will be deleted, which uses this logic
|
|
11
|
-
*/
|
|
12
8
|
function isButtonPixel(pixelEvents) {
|
|
13
9
|
if (Array.isArray(pixelEvents) && pixelEvents.length && 'name' in pixelEvents) {
|
|
14
10
|
return true;
|
|
15
11
|
}
|
|
16
12
|
return false;
|
|
17
13
|
}
|
|
18
|
-
// eslint-disable-next-line valid-jsdoc
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated useMetrika will be deleted
|
|
21
|
-
*/
|
|
22
14
|
const useMetrika = () => {
|
|
23
15
|
const { metrika, pixel } = (0, react_1.useContext)(metrikaContext_1.MetrikaContext);
|
|
24
16
|
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 {};
|
|
@@ -6,9 +6,6 @@ var Theme;
|
|
|
6
6
|
Theme["Light"] = "light";
|
|
7
7
|
Theme["Dark"] = "dark";
|
|
8
8
|
})(Theme = exports.Theme || (exports.Theme = {}));
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated Pixel will be deleted from package
|
|
11
|
-
*/
|
|
12
9
|
var PixelEventType;
|
|
13
10
|
(function (PixelEventType) {
|
|
14
11
|
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 {
|
|
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 {
|
|
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-
|
|
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
|
}
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
export declare const NavigationProps: {
|
|
2
|
+
additionalProperties: boolean;
|
|
3
|
+
required: never[];
|
|
4
|
+
properties: {
|
|
5
|
+
logo: {
|
|
6
|
+
oneOf: ({
|
|
7
|
+
type: string;
|
|
8
|
+
additionalProperties: boolean;
|
|
9
|
+
required: string[];
|
|
10
|
+
properties: {
|
|
11
|
+
icon: {
|
|
12
|
+
oneOf: ({
|
|
13
|
+
type: string;
|
|
14
|
+
properties: {
|
|
15
|
+
when: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
} | {
|
|
20
|
+
type: string;
|
|
21
|
+
pattern: string;
|
|
22
|
+
})[];
|
|
23
|
+
};
|
|
24
|
+
text: {
|
|
25
|
+
type: string;
|
|
26
|
+
contentType: string;
|
|
27
|
+
};
|
|
28
|
+
url: {
|
|
29
|
+
type: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
} | {
|
|
33
|
+
type: string;
|
|
34
|
+
additionalProperties: boolean;
|
|
35
|
+
required: import("..").Theme[];
|
|
36
|
+
properties: {};
|
|
37
|
+
})[];
|
|
38
|
+
};
|
|
39
|
+
header: {
|
|
40
|
+
type: string;
|
|
41
|
+
additionalProperties: boolean;
|
|
42
|
+
required: string[];
|
|
43
|
+
properties: {
|
|
44
|
+
leftItems: {
|
|
45
|
+
oneOf: {
|
|
46
|
+
type: string;
|
|
47
|
+
additionalProperties: boolean;
|
|
48
|
+
required: never[];
|
|
49
|
+
properties: {
|
|
50
|
+
type: {
|
|
51
|
+
type: string;
|
|
52
|
+
enum: string[];
|
|
53
|
+
};
|
|
54
|
+
additionalProperties: boolean;
|
|
55
|
+
properties: {
|
|
56
|
+
text: {
|
|
57
|
+
type: string;
|
|
58
|
+
contentType: string;
|
|
59
|
+
};
|
|
60
|
+
url: {
|
|
61
|
+
type: string;
|
|
62
|
+
};
|
|
63
|
+
primary: {
|
|
64
|
+
type: string;
|
|
65
|
+
};
|
|
66
|
+
size: {
|
|
67
|
+
type: string;
|
|
68
|
+
enum: string[];
|
|
69
|
+
};
|
|
70
|
+
theme: {
|
|
71
|
+
type: string;
|
|
72
|
+
enum: string[];
|
|
73
|
+
};
|
|
74
|
+
img: {
|
|
75
|
+
anyOf: ({
|
|
76
|
+
type: string;
|
|
77
|
+
additionalProperties?: undefined;
|
|
78
|
+
required?: undefined;
|
|
79
|
+
properties?: undefined;
|
|
80
|
+
} | {
|
|
81
|
+
type: string;
|
|
82
|
+
additionalProperties: boolean;
|
|
83
|
+
required: string[];
|
|
84
|
+
properties: {
|
|
85
|
+
data: {
|
|
86
|
+
type: string;
|
|
87
|
+
};
|
|
88
|
+
position: {
|
|
89
|
+
type: string;
|
|
90
|
+
enum: string[];
|
|
91
|
+
};
|
|
92
|
+
alt: {
|
|
93
|
+
type: string;
|
|
94
|
+
contentType: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
})[];
|
|
98
|
+
};
|
|
99
|
+
metrikaGoals: {
|
|
100
|
+
anyOf: ({
|
|
101
|
+
type: string;
|
|
102
|
+
items?: undefined;
|
|
103
|
+
} | {
|
|
104
|
+
type: string;
|
|
105
|
+
items: {
|
|
106
|
+
type: string;
|
|
107
|
+
additionalProperties?: undefined;
|
|
108
|
+
required?: undefined;
|
|
109
|
+
properties?: undefined;
|
|
110
|
+
};
|
|
111
|
+
} | {
|
|
112
|
+
type: string;
|
|
113
|
+
items: {
|
|
114
|
+
type: string;
|
|
115
|
+
additionalProperties: boolean;
|
|
116
|
+
required: string[];
|
|
117
|
+
properties: {
|
|
118
|
+
name: {
|
|
119
|
+
type: string;
|
|
120
|
+
};
|
|
121
|
+
isCrossSite: {
|
|
122
|
+
type: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
})[];
|
|
127
|
+
};
|
|
128
|
+
pixelEvents: {
|
|
129
|
+
type: string;
|
|
130
|
+
items: {
|
|
131
|
+
type: string;
|
|
132
|
+
required: string[];
|
|
133
|
+
additionalProperties: boolean;
|
|
134
|
+
properties: {
|
|
135
|
+
name: {
|
|
136
|
+
type: string;
|
|
137
|
+
enum: import("..").PixelEventType[];
|
|
138
|
+
};
|
|
139
|
+
data: {};
|
|
140
|
+
};
|
|
141
|
+
select: {
|
|
142
|
+
$data: string;
|
|
143
|
+
};
|
|
144
|
+
selectCases: {
|
|
145
|
+
SubmitApplication: {
|
|
146
|
+
additionalProperties: boolean;
|
|
147
|
+
properties: {
|
|
148
|
+
name: {};
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
Contact: {
|
|
152
|
+
additionalProperties: boolean;
|
|
153
|
+
properties: {
|
|
154
|
+
name: {};
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
Lead: {
|
|
158
|
+
additionalProperties: boolean;
|
|
159
|
+
properties: {
|
|
160
|
+
name: {};
|
|
161
|
+
data: {
|
|
162
|
+
type: string;
|
|
163
|
+
additionalProperties: boolean;
|
|
164
|
+
properties: {
|
|
165
|
+
content_category: {
|
|
166
|
+
type: string;
|
|
167
|
+
};
|
|
168
|
+
content_name: {
|
|
169
|
+
type: string;
|
|
170
|
+
};
|
|
171
|
+
currency: {
|
|
172
|
+
type: string;
|
|
173
|
+
};
|
|
174
|
+
value: {
|
|
175
|
+
type: string;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
target: {
|
|
185
|
+
type: string;
|
|
186
|
+
enum: string[];
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
if: {
|
|
190
|
+
properties: {
|
|
191
|
+
theme: {
|
|
192
|
+
enum: string[];
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
then: {
|
|
197
|
+
required: string[];
|
|
198
|
+
};
|
|
199
|
+
else: {
|
|
200
|
+
required: string[];
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
}[];
|
|
204
|
+
};
|
|
205
|
+
rightItems: {
|
|
206
|
+
oneOf: {
|
|
207
|
+
type: string;
|
|
208
|
+
additionalProperties: boolean;
|
|
209
|
+
required: never[];
|
|
210
|
+
properties: {
|
|
211
|
+
type: {
|
|
212
|
+
type: string;
|
|
213
|
+
enum: string[];
|
|
214
|
+
};
|
|
215
|
+
additionalProperties: boolean;
|
|
216
|
+
properties: {
|
|
217
|
+
text: {
|
|
218
|
+
type: string;
|
|
219
|
+
contentType: string;
|
|
220
|
+
};
|
|
221
|
+
url: {
|
|
222
|
+
type: string;
|
|
223
|
+
};
|
|
224
|
+
primary: {
|
|
225
|
+
type: string;
|
|
226
|
+
};
|
|
227
|
+
size: {
|
|
228
|
+
type: string;
|
|
229
|
+
enum: string[];
|
|
230
|
+
};
|
|
231
|
+
theme: {
|
|
232
|
+
type: string;
|
|
233
|
+
enum: string[];
|
|
234
|
+
};
|
|
235
|
+
img: {
|
|
236
|
+
anyOf: ({
|
|
237
|
+
type: string;
|
|
238
|
+
additionalProperties?: undefined;
|
|
239
|
+
required?: undefined;
|
|
240
|
+
properties?: undefined;
|
|
241
|
+
} | {
|
|
242
|
+
type: string;
|
|
243
|
+
additionalProperties: boolean;
|
|
244
|
+
required: string[];
|
|
245
|
+
properties: {
|
|
246
|
+
data: {
|
|
247
|
+
type: string;
|
|
248
|
+
};
|
|
249
|
+
position: {
|
|
250
|
+
type: string;
|
|
251
|
+
enum: string[];
|
|
252
|
+
};
|
|
253
|
+
alt: {
|
|
254
|
+
type: string;
|
|
255
|
+
contentType: string;
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
})[];
|
|
259
|
+
};
|
|
260
|
+
metrikaGoals: {
|
|
261
|
+
anyOf: ({
|
|
262
|
+
type: string;
|
|
263
|
+
items?: undefined;
|
|
264
|
+
} | {
|
|
265
|
+
type: string;
|
|
266
|
+
items: {
|
|
267
|
+
type: string;
|
|
268
|
+
additionalProperties?: undefined;
|
|
269
|
+
required?: undefined;
|
|
270
|
+
properties?: undefined;
|
|
271
|
+
};
|
|
272
|
+
} | {
|
|
273
|
+
type: string;
|
|
274
|
+
items: {
|
|
275
|
+
type: string;
|
|
276
|
+
additionalProperties: boolean;
|
|
277
|
+
required: string[];
|
|
278
|
+
properties: {
|
|
279
|
+
name: {
|
|
280
|
+
type: string;
|
|
281
|
+
};
|
|
282
|
+
isCrossSite: {
|
|
283
|
+
type: string;
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
})[];
|
|
288
|
+
};
|
|
289
|
+
pixelEvents: {
|
|
290
|
+
type: string;
|
|
291
|
+
items: {
|
|
292
|
+
type: string;
|
|
293
|
+
required: string[];
|
|
294
|
+
additionalProperties: boolean;
|
|
295
|
+
properties: {
|
|
296
|
+
name: {
|
|
297
|
+
type: string;
|
|
298
|
+
enum: import("..").PixelEventType[];
|
|
299
|
+
};
|
|
300
|
+
data: {};
|
|
301
|
+
};
|
|
302
|
+
select: {
|
|
303
|
+
$data: string;
|
|
304
|
+
};
|
|
305
|
+
selectCases: {
|
|
306
|
+
SubmitApplication: {
|
|
307
|
+
additionalProperties: boolean;
|
|
308
|
+
properties: {
|
|
309
|
+
name: {};
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
Contact: {
|
|
313
|
+
additionalProperties: boolean;
|
|
314
|
+
properties: {
|
|
315
|
+
name: {};
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
Lead: {
|
|
319
|
+
additionalProperties: boolean;
|
|
320
|
+
properties: {
|
|
321
|
+
name: {};
|
|
322
|
+
data: {
|
|
323
|
+
type: string;
|
|
324
|
+
additionalProperties: boolean;
|
|
325
|
+
properties: {
|
|
326
|
+
content_category: {
|
|
327
|
+
type: string;
|
|
328
|
+
};
|
|
329
|
+
content_name: {
|
|
330
|
+
type: string;
|
|
331
|
+
};
|
|
332
|
+
currency: {
|
|
333
|
+
type: string;
|
|
334
|
+
};
|
|
335
|
+
value: {
|
|
336
|
+
type: string;
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
target: {
|
|
346
|
+
type: string;
|
|
347
|
+
enum: string[];
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
if: {
|
|
351
|
+
properties: {
|
|
352
|
+
theme: {
|
|
353
|
+
enum: string[];
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
then: {
|
|
358
|
+
required: string[];
|
|
359
|
+
};
|
|
360
|
+
else: {
|
|
361
|
+
required: string[];
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
}[];
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NavigationProps = void 0;
|
|
4
|
+
const common_1 = require("../schema/validators/common");
|
|
5
|
+
const schema_1 = require("../components/Image/schema");
|
|
6
|
+
const lodash_1 = require("lodash");
|
|
7
|
+
const NavigationItemType = {
|
|
8
|
+
type: 'string',
|
|
9
|
+
enum: ['link', 'button', 'dropdown'],
|
|
10
|
+
};
|
|
11
|
+
const LogoProps = {
|
|
12
|
+
type: 'object',
|
|
13
|
+
additionalProperties: false,
|
|
14
|
+
required: ['icon'],
|
|
15
|
+
properties: {
|
|
16
|
+
icon: schema_1.ImageProps,
|
|
17
|
+
text: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
contentType: 'text',
|
|
20
|
+
},
|
|
21
|
+
url: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
const NavigationItemBaseProps = {
|
|
27
|
+
type: 'object',
|
|
28
|
+
additionalProperties: false,
|
|
29
|
+
required: ['text'],
|
|
30
|
+
properties: {
|
|
31
|
+
text: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
contentType: 'text',
|
|
34
|
+
},
|
|
35
|
+
url: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
},
|
|
38
|
+
icon: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
pattern: schema_1.urlPattern,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
const NavigationItemBaseLinkProps = (0, lodash_1.omit)(NavigationItemBaseProps, ['url']);
|
|
45
|
+
const NavigationLinkItemProps = {
|
|
46
|
+
type: 'object',
|
|
47
|
+
additionalProperties: false,
|
|
48
|
+
required: [],
|
|
49
|
+
properties: Object.assign(Object.assign({}, NavigationItemBaseLinkProps), { type: Object.assign({}, NavigationItemType), url: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
}, target: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
}, arrow: {
|
|
54
|
+
type: 'boolean',
|
|
55
|
+
} }),
|
|
56
|
+
};
|
|
57
|
+
const NavigationButtonItemProps = {
|
|
58
|
+
type: 'object',
|
|
59
|
+
additionalProperties: false,
|
|
60
|
+
required: [],
|
|
61
|
+
properties: Object.assign(Object.assign({}, common_1.ButtonBlock), { type: Object.assign({}, NavigationItemType) }),
|
|
62
|
+
};
|
|
63
|
+
const NavigationDropdownItemProps = {
|
|
64
|
+
type: 'object',
|
|
65
|
+
additionalProperties: false,
|
|
66
|
+
required: [],
|
|
67
|
+
properties: Object.assign(Object.assign({}, common_1.ButtonBlock), { type: Object.assign({}, NavigationItemType) }),
|
|
68
|
+
};
|
|
69
|
+
const NavigationItemProps = {
|
|
70
|
+
oneOf: [
|
|
71
|
+
Object.assign(Object.assign(Object.assign({}, NavigationLinkItemProps), NavigationButtonItemProps), NavigationDropdownItemProps),
|
|
72
|
+
],
|
|
73
|
+
};
|
|
74
|
+
exports.NavigationProps = {
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
required: [],
|
|
77
|
+
properties: {
|
|
78
|
+
logo: (0, common_1.withTheme)(LogoProps),
|
|
79
|
+
header: {
|
|
80
|
+
type: 'object',
|
|
81
|
+
additionalProperties: false,
|
|
82
|
+
required: ['leftItems'],
|
|
83
|
+
properties: {
|
|
84
|
+
leftItems: NavigationItemProps,
|
|
85
|
+
rightItems: NavigationItemProps,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
};
|