@gravity-ui/page-constructor 1.14.0-alpha.5 → 1.14.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -7
- package/build/cjs/blocks/Banner/schema.d.ts +312 -0
- package/build/cjs/blocks/Media/schema.d.ts +104 -0
- package/build/cjs/components/Button/Button.js +5 -2
- package/build/cjs/components/CardBase/CardBase.d.ts +2 -0
- package/build/cjs/components/CardBase/CardBase.js +4 -1
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +4 -1
- package/build/cjs/components/Link/Link.js +4 -1
- package/build/cjs/components/YandexForm/YandexForm.d.ts +2 -0
- package/build/cjs/components/YandexForm/YandexForm.js +13 -2
- package/build/cjs/containers/PageConstructor/Provider.d.ts +2 -0
- package/build/cjs/containers/PageConstructor/Provider.js +3 -1
- package/build/cjs/context/analyticsContext/analyticsContext.d.ts +6 -0
- package/build/cjs/context/analyticsContext/analyticsContext.js +6 -0
- package/build/cjs/context/analyticsContext/index.d.ts +1 -0
- package/build/cjs/{schema/validators/navigation.js → context/analyticsContext/index.js} +1 -1
- package/build/cjs/context/metrikaContext/metrikaContext.d.ts +6 -0
- package/build/cjs/hooks/useAnalytics.d.ts +2 -0
- package/build/cjs/hooks/useAnalytics.js +15 -0
- package/build/cjs/hooks/useMetrika.d.ts +6 -0
- package/build/cjs/hooks/useMetrika.js +8 -0
- package/build/cjs/models/common.d.ts +30 -0
- package/build/cjs/models/common.js +3 -0
- package/build/cjs/models/constructor-items/common.d.ts +4 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +2 -1
- package/build/cjs/models/navigation.d.ts +3 -1
- package/build/cjs/navigation/components/Header/Header.css +3 -5
- package/build/cjs/navigation/components/Logo/Logo.css +6 -5
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.css +0 -1
- package/build/cjs/schema/index.d.ts +0 -67
- package/build/cjs/schema/index.js +1 -2
- package/build/cjs/schema/validators/common.d.ts +220 -0
- package/build/cjs/schema/validators/common.js +10 -0
- package/build/cjs/schema/validators/event.d.ts +50 -0
- package/build/cjs/schema/validators/event.js +53 -0
- package/build/cjs/schema/validators/index.d.ts +0 -2
- package/build/cjs/schema/validators/index.js +0 -2
- package/build/cjs/sub-blocks/HubspotForm/index.js +14 -2
- package/build/esm/blocks/Banner/schema.d.ts +312 -0
- package/build/esm/blocks/Media/schema.d.ts +104 -0
- package/build/esm/components/Button/Button.js +5 -2
- package/build/esm/components/CardBase/CardBase.d.ts +2 -0
- package/build/esm/components/CardBase/CardBase.js +4 -1
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +4 -1
- package/build/esm/components/Link/Link.js +4 -1
- package/build/esm/components/YandexForm/YandexForm.d.ts +2 -0
- package/build/esm/components/YandexForm/YandexForm.js +13 -2
- package/build/esm/containers/PageConstructor/Provider.d.ts +2 -0
- package/build/esm/containers/PageConstructor/Provider.js +3 -1
- package/build/esm/context/analyticsContext/analyticsContext.d.ts +6 -0
- package/build/esm/context/analyticsContext/analyticsContext.js +2 -0
- package/build/esm/context/analyticsContext/index.d.ts +1 -0
- package/build/esm/context/analyticsContext/index.js +1 -0
- package/build/esm/context/metrikaContext/metrikaContext.d.ts +6 -0
- package/build/esm/hooks/useAnalytics.d.ts +2 -0
- package/build/esm/hooks/useAnalytics.js +11 -0
- package/build/esm/hooks/useMetrika.d.ts +6 -0
- package/build/esm/hooks/useMetrika.js +8 -0
- package/build/esm/models/common.d.ts +30 -0
- package/build/esm/models/common.js +3 -0
- package/build/esm/models/constructor-items/common.d.ts +4 -1
- package/build/esm/models/constructor-items/sub-blocks.d.ts +2 -1
- package/build/esm/models/navigation.d.ts +3 -1
- package/build/esm/navigation/components/Header/Header.css +3 -5
- package/build/esm/navigation/components/Logo/Logo.css +6 -5
- package/build/esm/navigation/components/NavigationItem/NavigationItem.css +0 -1
- package/build/esm/schema/index.d.ts +0 -67
- package/build/esm/schema/index.js +1 -2
- package/build/esm/schema/validators/common.d.ts +220 -0
- package/build/esm/schema/validators/common.js +10 -0
- package/build/esm/schema/validators/event.d.ts +50 -0
- package/build/esm/schema/validators/event.js +50 -0
- package/build/esm/schema/validators/index.d.ts +0 -2
- package/build/esm/schema/validators/index.js +0 -2
- package/build/esm/sub-blocks/HubspotForm/index.js +14 -2
- package/package.json +1 -1
- package/server/models/common.d.ts +30 -0
- package/server/models/common.js +3 -0
- package/server/models/constructor-items/common.d.ts +4 -1
- package/server/models/constructor-items/sub-blocks.d.ts +2 -1
- package/server/models/navigation.d.ts +3 -1
- package/build/cjs/navigation/schema.d.ts +0 -60
- package/build/cjs/navigation/schema.js +0 -80
- package/build/cjs/schema/validators/navigation.d.ts +0 -1
- package/build/esm/navigation/schema.d.ts +0 -60
- package/build/esm/navigation/schema.js +0 -77
- package/build/esm/schema/validators/navigation.d.ts +0 -1
- package/build/esm/schema/validators/navigation.js +0 -1
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NavigationHeaderProps = exports.LogoProps = 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 utils_1 = require("../schema/validators/utils");
|
|
8
|
-
const NavigationItemType = {
|
|
9
|
-
type: 'string',
|
|
10
|
-
enum: ['link', 'button', 'dropdown'],
|
|
11
|
-
};
|
|
12
|
-
exports.LogoProps = {
|
|
13
|
-
type: 'object',
|
|
14
|
-
additionalProperties: false,
|
|
15
|
-
required: ['icon'],
|
|
16
|
-
properties: {
|
|
17
|
-
icon: schema_1.ImageProps,
|
|
18
|
-
text: {
|
|
19
|
-
type: 'string',
|
|
20
|
-
contentType: 'text',
|
|
21
|
-
},
|
|
22
|
-
url: {
|
|
23
|
-
type: 'string',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
const NavigationItemBaseProps = {
|
|
28
|
-
text: {
|
|
29
|
-
type: 'string',
|
|
30
|
-
contentType: 'text',
|
|
31
|
-
},
|
|
32
|
-
url: {
|
|
33
|
-
type: 'string',
|
|
34
|
-
},
|
|
35
|
-
icon: {
|
|
36
|
-
type: 'string',
|
|
37
|
-
pattern: schema_1.urlPattern,
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
const NavigationItemBaseLinkProps = (0, lodash_1.omit)(NavigationItemBaseProps, ['url']);
|
|
41
|
-
const NavigationLinkItemProps = {
|
|
42
|
-
type: 'object',
|
|
43
|
-
additionalProperties: false,
|
|
44
|
-
required: ['type', 'text'],
|
|
45
|
-
properties: Object.assign(Object.assign({}, NavigationItemBaseLinkProps), { type: Object.assign({}, NavigationItemType), url: {
|
|
46
|
-
type: 'string',
|
|
47
|
-
}, target: {
|
|
48
|
-
type: 'string',
|
|
49
|
-
}, arrow: {
|
|
50
|
-
type: 'boolean',
|
|
51
|
-
} }),
|
|
52
|
-
};
|
|
53
|
-
const NavigationButtonItemProps = {
|
|
54
|
-
type: 'object',
|
|
55
|
-
additionalProperties: false,
|
|
56
|
-
required: ['type', 'text', 'url'],
|
|
57
|
-
properties: Object.assign(Object.assign({}, common_1.ButtonProps), { type: Object.assign({}, NavigationItemType) }),
|
|
58
|
-
};
|
|
59
|
-
const NavigationDropdownItemProps = {
|
|
60
|
-
type: 'object',
|
|
61
|
-
additionalProperties: false,
|
|
62
|
-
required: ['type', 'items'],
|
|
63
|
-
properties: Object.assign(Object.assign({}, NavigationItemBaseProps), { type: Object.assign({}, NavigationItemType), items: (0, utils_1.filteredArray)(NavigationLinkItemProps) }),
|
|
64
|
-
};
|
|
65
|
-
const NavigationItemProps = {
|
|
66
|
-
oneOf: [
|
|
67
|
-
(0, utils_1.filteredArray)(NavigationLinkItemProps),
|
|
68
|
-
(0, utils_1.filteredArray)(NavigationButtonItemProps),
|
|
69
|
-
(0, utils_1.filteredArray)(NavigationDropdownItemProps),
|
|
70
|
-
],
|
|
71
|
-
};
|
|
72
|
-
exports.NavigationHeaderProps = {
|
|
73
|
-
type: 'object',
|
|
74
|
-
additionalProperties: false,
|
|
75
|
-
required: ['leftItems'],
|
|
76
|
-
properties: {
|
|
77
|
-
leftItems: NavigationItemProps,
|
|
78
|
-
rightItems: NavigationItemProps,
|
|
79
|
-
},
|
|
80
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../navigation/schema';
|
|
@@ -1,60 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../navigation/schema';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../../navigation/schema';
|