@gravity-ui/page-constructor 1.14.0-alpha.4 → 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 -111
- 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 -111
- 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 -104
- package/build/cjs/navigation/schema.js +0 -78
- package/build/cjs/schema/validators/navigation.d.ts +0 -1
- package/build/esm/navigation/schema.d.ts +0 -104
- package/build/esm/navigation/schema.js +0 -75
- package/build/esm/schema/validators/navigation.d.ts +0 -1
- package/build/esm/schema/validators/navigation.js +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AnalyticsContext = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
exports.AnalyticsContext = react_1.default.createContext({});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './analyticsContext';
|
|
@@ -1,7 +1,13 @@
|
|
|
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
|
+
*/
|
|
4
7
|
metrika?: Metrika;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Metrika will be deleted
|
|
10
|
+
*/
|
|
5
11
|
pixel?: Pixel;
|
|
6
12
|
}
|
|
7
13
|
export declare const MetrikaContext: React.Context<MetrikaContextProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useAnalytics = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const analyticsContext_1 = require("../context/analyticsContext");
|
|
6
|
+
const useAnalytics = () => {
|
|
7
|
+
const { sendEvents } = (0, react_1.useContext)(analyticsContext_1.AnalyticsContext);
|
|
8
|
+
return (e) => {
|
|
9
|
+
if (!e) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
sendEvents === null || sendEvents === void 0 ? void 0 : sendEvents(e);
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.useAnalytics = useAnalytics;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { ButtonPixel, MetrikaGoal, PixelEvent } from '../models';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Metrika will be deleted
|
|
4
|
+
*/
|
|
2
5
|
type UseMetrikaProps = {
|
|
3
6
|
metrikaGoals?: MetrikaGoal;
|
|
4
7
|
pixelEvents?: string | string[] | PixelEvent | PixelEvent[] | ButtonPixel;
|
|
5
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated useMetrika will be deleted
|
|
11
|
+
*/
|
|
6
12
|
export declare const useMetrika: () => ({ metrikaGoals, pixelEvents }: UseMetrikaProps) => void;
|
|
7
13
|
export {};
|
|
@@ -5,12 +5,20 @@ 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
|
+
*/
|
|
8
12
|
function isButtonPixel(pixelEvents) {
|
|
9
13
|
if (Array.isArray(pixelEvents) && pixelEvents.length && 'name' in pixelEvents) {
|
|
10
14
|
return true;
|
|
11
15
|
}
|
|
12
16
|
return false;
|
|
13
17
|
}
|
|
18
|
+
// eslint-disable-next-line valid-jsdoc
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated useMetrika will be deleted
|
|
21
|
+
*/
|
|
14
22
|
const useMetrika = () => {
|
|
15
23
|
const { metrika, pixel } = (0, react_1.useContext)(metrikaContext_1.MetrikaContext);
|
|
16
24
|
return ({ metrikaGoals, pixelEvents }) => {
|
|
@@ -7,12 +7,21 @@ export declare enum Theme {
|
|
|
7
7
|
Light = "light",
|
|
8
8
|
Dark = "dark"
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Pixel will be deleted
|
|
12
|
+
*/
|
|
10
13
|
type PixelCommand = 'track' | 'trackCustom';
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Pixel will be deleted
|
|
16
|
+
*/
|
|
11
17
|
export interface PixelEvent {
|
|
12
18
|
command: PixelCommand;
|
|
13
19
|
event: PixelEventType | string;
|
|
14
20
|
data?: Object;
|
|
15
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Pixel will be deleted from package
|
|
24
|
+
*/
|
|
16
25
|
export declare enum PixelEventType {
|
|
17
26
|
AddPaymentInfo = "AddPaymentInfo",
|
|
18
27
|
AddToCart = "AddToCart",
|
|
@@ -36,11 +45,17 @@ export declare enum PixelEventType {
|
|
|
36
45
|
export type Modifiers = {
|
|
37
46
|
[name: string]: string | boolean | undefined;
|
|
38
47
|
};
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated Pixel will be deleted
|
|
50
|
+
*/
|
|
39
51
|
export interface Pixel<TEvent = string> {
|
|
40
52
|
trackStandard: (event: TEvent, data?: Object) => void;
|
|
41
53
|
trackCustom: (event: string, data?: Object) => void;
|
|
42
54
|
track: (trackEvents: string | string[] | PixelEvent[] | PixelEvent) => void;
|
|
43
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated Metrika will be deleted
|
|
58
|
+
*/
|
|
44
59
|
export interface Metrika {
|
|
45
60
|
reachGoal: (counterName: string, ...args: any) => void;
|
|
46
61
|
reachGoals: (goals: MetrikaGoal, counterName?: string) => void;
|
|
@@ -49,4 +64,19 @@ export interface ClassNameProps {
|
|
|
49
64
|
className?: string;
|
|
50
65
|
}
|
|
51
66
|
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
|
+
};
|
|
52
82
|
export {};
|
|
@@ -6,6 +6,9 @@ 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
|
+
*/
|
|
9
12
|
var PixelEventType;
|
|
10
13
|
(function (PixelEventType) {
|
|
11
14
|
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 { ClassNameProps, PixelEventType } from '../common';
|
|
4
|
+
import { AnalyticsEvent, ClassNameProps, PixelEventType } from '../common';
|
|
5
5
|
export declare enum AuthorType {
|
|
6
6
|
Column = "column",
|
|
7
7
|
Line = "line"
|
|
@@ -121,6 +121,7 @@ export interface LinkProps extends Stylable {
|
|
|
121
121
|
target?: string;
|
|
122
122
|
metrikaGoals?: MetrikaGoal;
|
|
123
123
|
pixelEvents?: ButtonPixel;
|
|
124
|
+
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
124
125
|
}
|
|
125
126
|
export interface FileLinkProps extends ClassNameProps {
|
|
126
127
|
href: string;
|
|
@@ -139,6 +140,7 @@ export interface ButtonProps {
|
|
|
139
140
|
img?: ButtonImageProps | string;
|
|
140
141
|
metrikaGoals?: MetrikaGoal;
|
|
141
142
|
pixelEvents?: ButtonPixel;
|
|
143
|
+
analyticsEvents?: AnalyticsEvent[];
|
|
142
144
|
target?: string;
|
|
143
145
|
}
|
|
144
146
|
export interface ButtonImageProps {
|
|
@@ -222,6 +224,7 @@ export interface HeaderBreadCrumbsProps extends ClassNameProps {
|
|
|
222
224
|
theme?: TextTheme;
|
|
223
225
|
metrikaGoals?: MetrikaGoal;
|
|
224
226
|
pixelEvents?: ButtonPixel;
|
|
227
|
+
analyticsEvents?: AnalyticsEvent | AnalyticsEvent[];
|
|
225
228
|
}
|
|
226
229
|
export interface PreviewContentItemProps {
|
|
227
230
|
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 { PixelEvent } from '../common';
|
|
6
|
+
import { AnalyticsEvent, PixelEvent } from '../common';
|
|
7
7
|
export declare enum SubBlockType {
|
|
8
8
|
Divider = "divider",
|
|
9
9
|
Quote = "quote",
|
|
@@ -61,6 +61,7 @@ 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[];
|
|
64
65
|
}
|
|
65
66
|
export interface PartnerProps extends CardBaseProps {
|
|
66
67
|
text: string;
|
|
@@ -11,7 +11,7 @@ export interface NavigationItemBase {
|
|
|
11
11
|
icon?: ImageProps;
|
|
12
12
|
url?: string;
|
|
13
13
|
}
|
|
14
|
-
export interface NavigationLinkItem extends
|
|
14
|
+
export interface NavigationLinkItem extends NavigationItemBase {
|
|
15
15
|
type: NavigationItemType.Link;
|
|
16
16
|
url: string;
|
|
17
17
|
arrow?: boolean;
|
|
@@ -19,6 +19,8 @@ export interface NavigationLinkItem extends Omit<NavigationItemBase, 'url'> {
|
|
|
19
19
|
}
|
|
20
20
|
export interface NavigationButtonItem extends ButtonProps {
|
|
21
21
|
type: NavigationItemType.Button;
|
|
22
|
+
url: string;
|
|
23
|
+
target?: string;
|
|
22
24
|
}
|
|
23
25
|
export interface NavigationDropdownItem extends NavigationItemBase {
|
|
24
26
|
type: NavigationItemType.Dropdown;
|
|
@@ -18,27 +18,25 @@ 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 {
|
|
22
22
|
display: none;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
|
|
26
25
|
.pc-header__navigation, .pc-header__left, .pc-header__right {
|
|
27
26
|
display: flex;
|
|
28
27
|
align-items: center;
|
|
29
28
|
}
|
|
30
|
-
.pc-header__navigation
|
|
29
|
+
.pc-header__navigation {
|
|
31
30
|
position: relative;
|
|
32
31
|
margin-right: 20px;
|
|
33
32
|
flex: 1 0 0;
|
|
34
33
|
justify-content: flex-start;
|
|
35
34
|
}
|
|
36
35
|
@media (max-width: 768px) {
|
|
37
|
-
.pc-header__navigation
|
|
36
|
+
.pc-header__navigation {
|
|
38
37
|
display: none;
|
|
39
38
|
}
|
|
40
39
|
}
|
|
41
|
-
|
|
42
40
|
.pc-header__right {
|
|
43
41
|
flex: 0;
|
|
44
42
|
justify-content: flex-end;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.pc-
|
|
1
|
+
.pc-logo {
|
|
2
2
|
margin: 0;
|
|
3
3
|
}
|
|
4
4
|
|
|
@@ -7,6 +7,11 @@ 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);
|
|
10
15
|
}
|
|
11
16
|
.pc-logo__icon {
|
|
12
17
|
display: flex;
|
|
@@ -14,9 +19,5 @@ unpredictable css rules order in build */
|
|
|
14
19
|
object-fit: contain;
|
|
15
20
|
}
|
|
16
21
|
.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);
|
|
21
22
|
white-space: nowrap;
|
|
22
23
|
}
|
|
@@ -31,117 +31,6 @@ 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
|
-
additionalProperties: boolean;
|
|
77
|
-
required: string[];
|
|
78
|
-
properties: {
|
|
79
|
-
type: {
|
|
80
|
-
type: string;
|
|
81
|
-
enum: string[];
|
|
82
|
-
};
|
|
83
|
-
items: {
|
|
84
|
-
type: string;
|
|
85
|
-
items: {
|
|
86
|
-
type: string;
|
|
87
|
-
properties: {
|
|
88
|
-
when: {
|
|
89
|
-
type: string;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
text: {
|
|
95
|
-
type: string;
|
|
96
|
-
contentType: string;
|
|
97
|
-
};
|
|
98
|
-
url: {
|
|
99
|
-
type: string;
|
|
100
|
-
};
|
|
101
|
-
icon: {
|
|
102
|
-
type: string;
|
|
103
|
-
pattern: string;
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
}[];
|
|
107
|
-
};
|
|
108
|
-
rightItems: {
|
|
109
|
-
oneOf: {
|
|
110
|
-
type: string;
|
|
111
|
-
additionalProperties: boolean;
|
|
112
|
-
required: string[];
|
|
113
|
-
properties: {
|
|
114
|
-
type: {
|
|
115
|
-
type: string;
|
|
116
|
-
enum: string[];
|
|
117
|
-
};
|
|
118
|
-
items: {
|
|
119
|
-
type: string;
|
|
120
|
-
items: {
|
|
121
|
-
type: string;
|
|
122
|
-
properties: {
|
|
123
|
-
when: {
|
|
124
|
-
type: string;
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
text: {
|
|
130
|
-
type: string;
|
|
131
|
-
contentType: string;
|
|
132
|
-
};
|
|
133
|
-
url: {
|
|
134
|
-
type: string;
|
|
135
|
-
};
|
|
136
|
-
icon: {
|
|
137
|
-
type: string;
|
|
138
|
-
pattern: string;
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
}[];
|
|
142
|
-
};
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
34
|
blocks: {
|
|
146
35
|
type: string;
|
|
147
36
|
items: {
|
|
@@ -7,7 +7,6 @@ const blocks_1 = require("./validators/blocks");
|
|
|
7
7
|
const sub_blocks_1 = require("./validators/sub-blocks");
|
|
8
8
|
const common_1 = require("./validators/common");
|
|
9
9
|
const utils_1 = require("./validators/utils");
|
|
10
|
-
const navigation_1 = require("./validators/navigation");
|
|
11
10
|
const getBlocksCases = (blocks) => {
|
|
12
11
|
return Object.values(blocks).reduce((acc, block) => (Object.assign(Object.assign({}, acc), block)));
|
|
13
12
|
};
|
|
@@ -89,7 +88,7 @@ function generateDefaultSchema(config) {
|
|
|
89
88
|
type: 'object',
|
|
90
89
|
additionalProperties: false,
|
|
91
90
|
required: ['blocks'],
|
|
92
|
-
properties: Object.assign(Object.assign(Object.assign({}, common_1.AnimatableProps), {
|
|
91
|
+
properties: Object.assign(Object.assign(Object.assign({}, common_1.AnimatableProps), { blocks: {
|
|
93
92
|
type: 'array',
|
|
94
93
|
items: {
|
|
95
94
|
$ref: '#/definitions/children',
|