@gravity-ui/page-constructor 1.14.0-alpha.3 → 1.14.0-alpha.4
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/navigation/schema.d.ts +70 -83
- package/build/cjs/navigation/schema.js +7 -14
- package/build/cjs/schema/index.d.ts +111 -115
- package/build/cjs/schema/index.js +1 -1
- package/build/esm/navigation/schema.d.ts +70 -83
- package/build/esm/navigation/schema.js +7 -14
- package/build/esm/schema/index.d.ts +111 -115
- package/build/esm/schema/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,25 +1,55 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const LogoProps: {
|
|
2
|
+
type: string;
|
|
2
3
|
additionalProperties: boolean;
|
|
3
|
-
required:
|
|
4
|
+
required: string[];
|
|
4
5
|
properties: {
|
|
5
|
-
|
|
6
|
+
icon: {
|
|
6
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: {
|
|
7
35
|
type: string;
|
|
8
36
|
additionalProperties: boolean;
|
|
9
37
|
required: string[];
|
|
10
38
|
properties: {
|
|
11
|
-
|
|
12
|
-
|
|
39
|
+
type: {
|
|
40
|
+
type: string;
|
|
41
|
+
enum: string[];
|
|
42
|
+
};
|
|
43
|
+
items: {
|
|
44
|
+
type: string;
|
|
45
|
+
items: {
|
|
13
46
|
type: string;
|
|
14
47
|
properties: {
|
|
15
48
|
when: {
|
|
16
49
|
type: string;
|
|
17
50
|
};
|
|
18
51
|
};
|
|
19
|
-
}
|
|
20
|
-
type: string;
|
|
21
|
-
pattern: string;
|
|
22
|
-
})[];
|
|
52
|
+
};
|
|
23
53
|
};
|
|
24
54
|
text: {
|
|
25
55
|
type: string;
|
|
@@ -28,90 +58,47 @@ export declare const NavigationProps: {
|
|
|
28
58
|
url: {
|
|
29
59
|
type: string;
|
|
30
60
|
};
|
|
61
|
+
icon: {
|
|
62
|
+
type: string;
|
|
63
|
+
pattern: string;
|
|
64
|
+
};
|
|
31
65
|
};
|
|
32
|
-
}
|
|
66
|
+
}[];
|
|
67
|
+
};
|
|
68
|
+
rightItems: {
|
|
69
|
+
oneOf: {
|
|
33
70
|
type: string;
|
|
34
71
|
additionalProperties: boolean;
|
|
35
|
-
required:
|
|
36
|
-
properties: {
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
header: {
|
|
40
|
-
type: string;
|
|
41
|
-
additionalProperties: boolean;
|
|
42
|
-
required: string[];
|
|
43
|
-
properties: {
|
|
44
|
-
leftItems: {
|
|
45
|
-
oneOf: {
|
|
72
|
+
required: string[];
|
|
73
|
+
properties: {
|
|
74
|
+
type: {
|
|
46
75
|
type: string;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
type: {
|
|
51
|
-
type: string;
|
|
52
|
-
enum: string[];
|
|
53
|
-
};
|
|
54
|
-
items: {
|
|
55
|
-
type: string;
|
|
56
|
-
items: {
|
|
57
|
-
type: string;
|
|
58
|
-
properties: {
|
|
59
|
-
when: {
|
|
60
|
-
type: string;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
text: {
|
|
66
|
-
type: string;
|
|
67
|
-
contentType: string;
|
|
68
|
-
};
|
|
69
|
-
url: {
|
|
70
|
-
type: string;
|
|
71
|
-
};
|
|
72
|
-
icon: {
|
|
73
|
-
type: string;
|
|
74
|
-
pattern: string;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
}[];
|
|
78
|
-
};
|
|
79
|
-
rightItems: {
|
|
80
|
-
oneOf: {
|
|
76
|
+
enum: string[];
|
|
77
|
+
};
|
|
78
|
+
items: {
|
|
81
79
|
type: string;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
type: string;
|
|
87
|
-
enum: string[];
|
|
88
|
-
};
|
|
89
|
-
items: {
|
|
90
|
-
type: string;
|
|
91
|
-
items: {
|
|
80
|
+
items: {
|
|
81
|
+
type: string;
|
|
82
|
+
properties: {
|
|
83
|
+
when: {
|
|
92
84
|
type: string;
|
|
93
|
-
properties: {
|
|
94
|
-
when: {
|
|
95
|
-
type: string;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
85
|
};
|
|
99
86
|
};
|
|
100
|
-
text: {
|
|
101
|
-
type: string;
|
|
102
|
-
contentType: string;
|
|
103
|
-
};
|
|
104
|
-
url: {
|
|
105
|
-
type: string;
|
|
106
|
-
};
|
|
107
|
-
icon: {
|
|
108
|
-
type: string;
|
|
109
|
-
pattern: string;
|
|
110
|
-
};
|
|
111
87
|
};
|
|
112
|
-
}
|
|
88
|
+
};
|
|
89
|
+
text: {
|
|
90
|
+
type: string;
|
|
91
|
+
contentType: string;
|
|
92
|
+
};
|
|
93
|
+
url: {
|
|
94
|
+
type: string;
|
|
95
|
+
};
|
|
96
|
+
icon: {
|
|
97
|
+
type: string;
|
|
98
|
+
pattern: string;
|
|
99
|
+
};
|
|
113
100
|
};
|
|
114
|
-
};
|
|
101
|
+
}[];
|
|
115
102
|
};
|
|
116
103
|
};
|
|
117
104
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.NavigationHeaderProps = exports.LogoProps = void 0;
|
|
4
4
|
const common_1 = require("../schema/validators/common");
|
|
5
5
|
const schema_1 = require("../components/Image/schema");
|
|
6
6
|
const lodash_1 = require("lodash");
|
|
@@ -9,7 +9,7 @@ const NavigationItemType = {
|
|
|
9
9
|
type: 'string',
|
|
10
10
|
enum: ['link', 'button', 'dropdown'],
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
exports.LogoProps = {
|
|
13
13
|
type: 'object',
|
|
14
14
|
additionalProperties: false,
|
|
15
15
|
required: ['icon'],
|
|
@@ -67,19 +67,12 @@ const NavigationItemProps = {
|
|
|
67
67
|
Object.assign(Object.assign(Object.assign({}, NavigationLinkItemProps), NavigationButtonItemProps), NavigationDropdownItemProps),
|
|
68
68
|
],
|
|
69
69
|
};
|
|
70
|
-
exports.
|
|
70
|
+
exports.NavigationHeaderProps = {
|
|
71
|
+
type: 'object',
|
|
71
72
|
additionalProperties: false,
|
|
72
|
-
required: [],
|
|
73
|
+
required: ['leftItems'],
|
|
73
74
|
properties: {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
type: 'object',
|
|
77
|
-
additionalProperties: false,
|
|
78
|
-
required: ['leftItems'],
|
|
79
|
-
properties: {
|
|
80
|
-
leftItems: NavigationItemProps,
|
|
81
|
-
rightItems: NavigationItemProps,
|
|
82
|
-
},
|
|
83
|
-
},
|
|
75
|
+
leftItems: NavigationItemProps,
|
|
76
|
+
rightItems: NavigationItemProps,
|
|
84
77
|
},
|
|
85
78
|
};
|
|
@@ -31,6 +31,117 @@ 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
|
+
};
|
|
34
145
|
blocks: {
|
|
35
146
|
type: string;
|
|
36
147
|
items: {
|
|
@@ -159,121 +270,6 @@ export declare function generateDefaultSchema(config?: SchemaCustomConfig): {
|
|
|
159
270
|
type: string;
|
|
160
271
|
};
|
|
161
272
|
};
|
|
162
|
-
additionalProperties: boolean;
|
|
163
|
-
required: never[];
|
|
164
|
-
properties: {
|
|
165
|
-
logo: {
|
|
166
|
-
oneOf: ({
|
|
167
|
-
type: string;
|
|
168
|
-
additionalProperties: boolean;
|
|
169
|
-
required: string[];
|
|
170
|
-
properties: {
|
|
171
|
-
icon: {
|
|
172
|
-
oneOf: ({
|
|
173
|
-
type: string;
|
|
174
|
-
properties: {
|
|
175
|
-
when: {
|
|
176
|
-
type: string;
|
|
177
|
-
};
|
|
178
|
-
};
|
|
179
|
-
} | {
|
|
180
|
-
type: string;
|
|
181
|
-
pattern: string;
|
|
182
|
-
})[];
|
|
183
|
-
};
|
|
184
|
-
text: {
|
|
185
|
-
type: string;
|
|
186
|
-
contentType: string;
|
|
187
|
-
};
|
|
188
|
-
url: {
|
|
189
|
-
type: string;
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
|
-
} | {
|
|
193
|
-
type: string;
|
|
194
|
-
additionalProperties: boolean;
|
|
195
|
-
required: import("..").Theme[];
|
|
196
|
-
properties: {};
|
|
197
|
-
})[];
|
|
198
|
-
};
|
|
199
|
-
header: {
|
|
200
|
-
type: string;
|
|
201
|
-
additionalProperties: boolean;
|
|
202
|
-
required: string[];
|
|
203
|
-
properties: {
|
|
204
|
-
leftItems: {
|
|
205
|
-
oneOf: {
|
|
206
|
-
type: string;
|
|
207
|
-
additionalProperties: boolean;
|
|
208
|
-
required: string[];
|
|
209
|
-
properties: {
|
|
210
|
-
type: {
|
|
211
|
-
type: string;
|
|
212
|
-
enum: string[];
|
|
213
|
-
};
|
|
214
|
-
items: {
|
|
215
|
-
type: string;
|
|
216
|
-
items: {
|
|
217
|
-
type: string;
|
|
218
|
-
properties: {
|
|
219
|
-
when: {
|
|
220
|
-
type: string;
|
|
221
|
-
};
|
|
222
|
-
};
|
|
223
|
-
};
|
|
224
|
-
};
|
|
225
|
-
text: {
|
|
226
|
-
type: string;
|
|
227
|
-
contentType: string;
|
|
228
|
-
};
|
|
229
|
-
url: {
|
|
230
|
-
type: string;
|
|
231
|
-
};
|
|
232
|
-
icon: {
|
|
233
|
-
type: string;
|
|
234
|
-
pattern: string;
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
}[];
|
|
238
|
-
};
|
|
239
|
-
rightItems: {
|
|
240
|
-
oneOf: {
|
|
241
|
-
type: string;
|
|
242
|
-
additionalProperties: boolean;
|
|
243
|
-
required: string[];
|
|
244
|
-
properties: {
|
|
245
|
-
type: {
|
|
246
|
-
type: string;
|
|
247
|
-
enum: string[];
|
|
248
|
-
};
|
|
249
|
-
items: {
|
|
250
|
-
type: string;
|
|
251
|
-
items: {
|
|
252
|
-
type: string;
|
|
253
|
-
properties: {
|
|
254
|
-
when: {
|
|
255
|
-
type: string;
|
|
256
|
-
};
|
|
257
|
-
};
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
|
-
text: {
|
|
261
|
-
type: string;
|
|
262
|
-
contentType: string;
|
|
263
|
-
};
|
|
264
|
-
url: {
|
|
265
|
-
type: string;
|
|
266
|
-
};
|
|
267
|
-
icon: {
|
|
268
|
-
type: string;
|
|
269
|
-
pattern: string;
|
|
270
|
-
};
|
|
271
|
-
};
|
|
272
|
-
}[];
|
|
273
|
-
};
|
|
274
|
-
};
|
|
275
|
-
};
|
|
276
|
-
};
|
|
277
273
|
animated: {
|
|
278
274
|
type: string;
|
|
279
275
|
};
|
|
@@ -89,7 +89,7 @@ function generateDefaultSchema(config) {
|
|
|
89
89
|
type: 'object',
|
|
90
90
|
additionalProperties: false,
|
|
91
91
|
required: ['blocks'],
|
|
92
|
-
properties: Object.assign(Object.assign(Object.assign(
|
|
92
|
+
properties: Object.assign(Object.assign(Object.assign({}, common_1.AnimatableProps), { logo: (0, common_1.withTheme)(navigation_1.LogoProps), header: navigation_1.NavigationHeaderProps, blocks: {
|
|
93
93
|
type: 'array',
|
|
94
94
|
items: {
|
|
95
95
|
$ref: '#/definitions/children',
|
|
@@ -1,25 +1,55 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const LogoProps: {
|
|
2
|
+
type: string;
|
|
2
3
|
additionalProperties: boolean;
|
|
3
|
-
required:
|
|
4
|
+
required: string[];
|
|
4
5
|
properties: {
|
|
5
|
-
|
|
6
|
+
icon: {
|
|
6
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: {
|
|
7
35
|
type: string;
|
|
8
36
|
additionalProperties: boolean;
|
|
9
37
|
required: string[];
|
|
10
38
|
properties: {
|
|
11
|
-
|
|
12
|
-
|
|
39
|
+
type: {
|
|
40
|
+
type: string;
|
|
41
|
+
enum: string[];
|
|
42
|
+
};
|
|
43
|
+
items: {
|
|
44
|
+
type: string;
|
|
45
|
+
items: {
|
|
13
46
|
type: string;
|
|
14
47
|
properties: {
|
|
15
48
|
when: {
|
|
16
49
|
type: string;
|
|
17
50
|
};
|
|
18
51
|
};
|
|
19
|
-
}
|
|
20
|
-
type: string;
|
|
21
|
-
pattern: string;
|
|
22
|
-
})[];
|
|
52
|
+
};
|
|
23
53
|
};
|
|
24
54
|
text: {
|
|
25
55
|
type: string;
|
|
@@ -28,90 +58,47 @@ export declare const NavigationProps: {
|
|
|
28
58
|
url: {
|
|
29
59
|
type: string;
|
|
30
60
|
};
|
|
61
|
+
icon: {
|
|
62
|
+
type: string;
|
|
63
|
+
pattern: string;
|
|
64
|
+
};
|
|
31
65
|
};
|
|
32
|
-
}
|
|
66
|
+
}[];
|
|
67
|
+
};
|
|
68
|
+
rightItems: {
|
|
69
|
+
oneOf: {
|
|
33
70
|
type: string;
|
|
34
71
|
additionalProperties: boolean;
|
|
35
|
-
required:
|
|
36
|
-
properties: {
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
header: {
|
|
40
|
-
type: string;
|
|
41
|
-
additionalProperties: boolean;
|
|
42
|
-
required: string[];
|
|
43
|
-
properties: {
|
|
44
|
-
leftItems: {
|
|
45
|
-
oneOf: {
|
|
72
|
+
required: string[];
|
|
73
|
+
properties: {
|
|
74
|
+
type: {
|
|
46
75
|
type: string;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
type: {
|
|
51
|
-
type: string;
|
|
52
|
-
enum: string[];
|
|
53
|
-
};
|
|
54
|
-
items: {
|
|
55
|
-
type: string;
|
|
56
|
-
items: {
|
|
57
|
-
type: string;
|
|
58
|
-
properties: {
|
|
59
|
-
when: {
|
|
60
|
-
type: string;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
text: {
|
|
66
|
-
type: string;
|
|
67
|
-
contentType: string;
|
|
68
|
-
};
|
|
69
|
-
url: {
|
|
70
|
-
type: string;
|
|
71
|
-
};
|
|
72
|
-
icon: {
|
|
73
|
-
type: string;
|
|
74
|
-
pattern: string;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
}[];
|
|
78
|
-
};
|
|
79
|
-
rightItems: {
|
|
80
|
-
oneOf: {
|
|
76
|
+
enum: string[];
|
|
77
|
+
};
|
|
78
|
+
items: {
|
|
81
79
|
type: string;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
type: string;
|
|
87
|
-
enum: string[];
|
|
88
|
-
};
|
|
89
|
-
items: {
|
|
90
|
-
type: string;
|
|
91
|
-
items: {
|
|
80
|
+
items: {
|
|
81
|
+
type: string;
|
|
82
|
+
properties: {
|
|
83
|
+
when: {
|
|
92
84
|
type: string;
|
|
93
|
-
properties: {
|
|
94
|
-
when: {
|
|
95
|
-
type: string;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
85
|
};
|
|
99
86
|
};
|
|
100
|
-
text: {
|
|
101
|
-
type: string;
|
|
102
|
-
contentType: string;
|
|
103
|
-
};
|
|
104
|
-
url: {
|
|
105
|
-
type: string;
|
|
106
|
-
};
|
|
107
|
-
icon: {
|
|
108
|
-
type: string;
|
|
109
|
-
pattern: string;
|
|
110
|
-
};
|
|
111
87
|
};
|
|
112
|
-
}
|
|
88
|
+
};
|
|
89
|
+
text: {
|
|
90
|
+
type: string;
|
|
91
|
+
contentType: string;
|
|
92
|
+
};
|
|
93
|
+
url: {
|
|
94
|
+
type: string;
|
|
95
|
+
};
|
|
96
|
+
icon: {
|
|
97
|
+
type: string;
|
|
98
|
+
pattern: string;
|
|
99
|
+
};
|
|
113
100
|
};
|
|
114
|
-
};
|
|
101
|
+
}[];
|
|
115
102
|
};
|
|
116
103
|
};
|
|
117
104
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonProps
|
|
1
|
+
import { ButtonProps } from '../schema/validators/common';
|
|
2
2
|
import { ImageProps, urlPattern } from '../components/Image/schema';
|
|
3
3
|
import { omit } from 'lodash';
|
|
4
4
|
import { filteredArray } from '../schema/validators/utils';
|
|
@@ -6,7 +6,7 @@ const NavigationItemType = {
|
|
|
6
6
|
type: 'string',
|
|
7
7
|
enum: ['link', 'button', 'dropdown'],
|
|
8
8
|
};
|
|
9
|
-
const LogoProps = {
|
|
9
|
+
export const LogoProps = {
|
|
10
10
|
type: 'object',
|
|
11
11
|
additionalProperties: false,
|
|
12
12
|
required: ['icon'],
|
|
@@ -64,19 +64,12 @@ const NavigationItemProps = {
|
|
|
64
64
|
Object.assign(Object.assign(Object.assign({}, NavigationLinkItemProps), NavigationButtonItemProps), NavigationDropdownItemProps),
|
|
65
65
|
],
|
|
66
66
|
};
|
|
67
|
-
export const
|
|
67
|
+
export const NavigationHeaderProps = {
|
|
68
|
+
type: 'object',
|
|
68
69
|
additionalProperties: false,
|
|
69
|
-
required: [],
|
|
70
|
+
required: ['leftItems'],
|
|
70
71
|
properties: {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
type: 'object',
|
|
74
|
-
additionalProperties: false,
|
|
75
|
-
required: ['leftItems'],
|
|
76
|
-
properties: {
|
|
77
|
-
leftItems: NavigationItemProps,
|
|
78
|
-
rightItems: NavigationItemProps,
|
|
79
|
-
},
|
|
80
|
-
},
|
|
72
|
+
leftItems: NavigationItemProps,
|
|
73
|
+
rightItems: NavigationItemProps,
|
|
81
74
|
},
|
|
82
75
|
};
|
|
@@ -31,6 +31,117 @@ 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
|
+
};
|
|
34
145
|
blocks: {
|
|
35
146
|
type: string;
|
|
36
147
|
items: {
|
|
@@ -159,121 +270,6 @@ export declare function generateDefaultSchema(config?: SchemaCustomConfig): {
|
|
|
159
270
|
type: string;
|
|
160
271
|
};
|
|
161
272
|
};
|
|
162
|
-
additionalProperties: boolean;
|
|
163
|
-
required: never[];
|
|
164
|
-
properties: {
|
|
165
|
-
logo: {
|
|
166
|
-
oneOf: ({
|
|
167
|
-
type: string;
|
|
168
|
-
additionalProperties: boolean;
|
|
169
|
-
required: string[];
|
|
170
|
-
properties: {
|
|
171
|
-
icon: {
|
|
172
|
-
oneOf: ({
|
|
173
|
-
type: string;
|
|
174
|
-
properties: {
|
|
175
|
-
when: {
|
|
176
|
-
type: string;
|
|
177
|
-
};
|
|
178
|
-
};
|
|
179
|
-
} | {
|
|
180
|
-
type: string;
|
|
181
|
-
pattern: string;
|
|
182
|
-
})[];
|
|
183
|
-
};
|
|
184
|
-
text: {
|
|
185
|
-
type: string;
|
|
186
|
-
contentType: string;
|
|
187
|
-
};
|
|
188
|
-
url: {
|
|
189
|
-
type: string;
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
|
-
} | {
|
|
193
|
-
type: string;
|
|
194
|
-
additionalProperties: boolean;
|
|
195
|
-
required: import("..").Theme[];
|
|
196
|
-
properties: {};
|
|
197
|
-
})[];
|
|
198
|
-
};
|
|
199
|
-
header: {
|
|
200
|
-
type: string;
|
|
201
|
-
additionalProperties: boolean;
|
|
202
|
-
required: string[];
|
|
203
|
-
properties: {
|
|
204
|
-
leftItems: {
|
|
205
|
-
oneOf: {
|
|
206
|
-
type: string;
|
|
207
|
-
additionalProperties: boolean;
|
|
208
|
-
required: string[];
|
|
209
|
-
properties: {
|
|
210
|
-
type: {
|
|
211
|
-
type: string;
|
|
212
|
-
enum: string[];
|
|
213
|
-
};
|
|
214
|
-
items: {
|
|
215
|
-
type: string;
|
|
216
|
-
items: {
|
|
217
|
-
type: string;
|
|
218
|
-
properties: {
|
|
219
|
-
when: {
|
|
220
|
-
type: string;
|
|
221
|
-
};
|
|
222
|
-
};
|
|
223
|
-
};
|
|
224
|
-
};
|
|
225
|
-
text: {
|
|
226
|
-
type: string;
|
|
227
|
-
contentType: string;
|
|
228
|
-
};
|
|
229
|
-
url: {
|
|
230
|
-
type: string;
|
|
231
|
-
};
|
|
232
|
-
icon: {
|
|
233
|
-
type: string;
|
|
234
|
-
pattern: string;
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
}[];
|
|
238
|
-
};
|
|
239
|
-
rightItems: {
|
|
240
|
-
oneOf: {
|
|
241
|
-
type: string;
|
|
242
|
-
additionalProperties: boolean;
|
|
243
|
-
required: string[];
|
|
244
|
-
properties: {
|
|
245
|
-
type: {
|
|
246
|
-
type: string;
|
|
247
|
-
enum: string[];
|
|
248
|
-
};
|
|
249
|
-
items: {
|
|
250
|
-
type: string;
|
|
251
|
-
items: {
|
|
252
|
-
type: string;
|
|
253
|
-
properties: {
|
|
254
|
-
when: {
|
|
255
|
-
type: string;
|
|
256
|
-
};
|
|
257
|
-
};
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
|
-
text: {
|
|
261
|
-
type: string;
|
|
262
|
-
contentType: string;
|
|
263
|
-
};
|
|
264
|
-
url: {
|
|
265
|
-
type: string;
|
|
266
|
-
};
|
|
267
|
-
icon: {
|
|
268
|
-
type: string;
|
|
269
|
-
pattern: string;
|
|
270
|
-
};
|
|
271
|
-
};
|
|
272
|
-
}[];
|
|
273
|
-
};
|
|
274
|
-
};
|
|
275
|
-
};
|
|
276
|
-
};
|
|
277
273
|
animated: {
|
|
278
274
|
type: string;
|
|
279
275
|
};
|
|
@@ -3,7 +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 {
|
|
6
|
+
import { LogoProps, NavigationHeaderProps } from './validators/navigation';
|
|
7
7
|
export const getBlocksCases = (blocks) => {
|
|
8
8
|
return Object.values(blocks).reduce((acc, block) => (Object.assign(Object.assign({}, acc), block)));
|
|
9
9
|
};
|
|
@@ -84,7 +84,7 @@ export function generateDefaultSchema(config) {
|
|
|
84
84
|
type: 'object',
|
|
85
85
|
additionalProperties: false,
|
|
86
86
|
required: ['blocks'],
|
|
87
|
-
properties: Object.assign(Object.assign(Object.assign(
|
|
87
|
+
properties: Object.assign(Object.assign(Object.assign({}, AnimatableProps), { logo: withTheme(LogoProps), header: NavigationHeaderProps, blocks: {
|
|
88
88
|
type: 'array',
|
|
89
89
|
items: {
|
|
90
90
|
$ref: '#/definitions/children',
|