@gravity-ui/page-constructor 1.14.0-alpha.2 → 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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.13.1](https://github.com/gravity-ui/page-constructor/compare/v1.13.0...v1.13.1) (2023-01-19)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **Navigation:** logo and button specifity styles ([#116](https://github.com/gravity-ui/page-constructor/issues/116)) ([dbe0c39](https://github.com/gravity-ui/page-constructor/commit/dbe0c39aa88aac8a3e84c079d7de400e9a9b3d2f))
9
+
3
10
  ## [1.13.0](https://github.com/gravity-ui/page-constructor/compare/v1.12.1...v1.13.0) (2023-01-18)
4
11
 
5
12
 
@@ -1,25 +1,55 @@
1
- export declare const NavigationProps: {
1
+ export declare const LogoProps: {
2
+ type: string;
2
3
  additionalProperties: boolean;
3
- required: never[];
4
+ required: string[];
4
5
  properties: {
5
- logo: {
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
- icon: {
12
- oneOf: ({
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,342 +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: import("..").Theme[];
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
- 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: {
76
+ enum: string[];
77
+ };
78
+ items: {
207
79
  type: string;
208
- additionalProperties: boolean;
209
- required: never[];
210
- properties: {
211
- type: {
212
- type: string;
213
- enum: string[];
214
- };
215
- additionalProperties: boolean;
80
+ items: {
81
+ type: string;
216
82
  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: {
83
+ when: {
346
84
  type: string;
347
- enum: string[];
348
- };
349
- };
350
- if: {
351
- properties: {
352
- theme: {
353
- enum: string[];
354
- };
355
85
  };
356
86
  };
357
- then: {
358
- required: string[];
359
- };
360
- else: {
361
- required: string[];
362
- };
363
87
  };
364
- }[];
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
+ };
365
100
  };
366
- };
101
+ }[];
367
102
  };
368
103
  };
369
104
  };
@@ -1,14 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NavigationProps = void 0;
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");
7
+ const utils_1 = require("../schema/validators/utils");
7
8
  const NavigationItemType = {
8
9
  type: 'string',
9
10
  enum: ['link', 'button', 'dropdown'],
10
11
  };
11
- const LogoProps = {
12
+ exports.LogoProps = {
12
13
  type: 'object',
13
14
  additionalProperties: false,
14
15
  required: ['icon'],
@@ -24,28 +25,23 @@ const LogoProps = {
24
25
  },
25
26
  };
26
27
  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
- },
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,
42
38
  },
43
39
  };
44
40
  const NavigationItemBaseLinkProps = (0, lodash_1.omit)(NavigationItemBaseProps, ['url']);
45
41
  const NavigationLinkItemProps = {
46
42
  type: 'object',
47
43
  additionalProperties: false,
48
- required: [],
44
+ required: ['type', 'text'],
49
45
  properties: Object.assign(Object.assign({}, NavigationItemBaseLinkProps), { type: Object.assign({}, NavigationItemType), url: {
50
46
  type: 'string',
51
47
  }, target: {
@@ -57,33 +53,26 @@ const NavigationLinkItemProps = {
57
53
  const NavigationButtonItemProps = {
58
54
  type: 'object',
59
55
  additionalProperties: false,
60
- required: [],
61
- properties: Object.assign(Object.assign({}, common_1.ButtonBlock), { type: Object.assign({}, NavigationItemType) }),
56
+ required: ['type', 'text', 'url'],
57
+ properties: Object.assign(Object.assign({}, common_1.ButtonProps), { type: Object.assign({}, NavigationItemType) }),
62
58
  };
63
59
  const NavigationDropdownItemProps = {
64
60
  type: 'object',
65
61
  additionalProperties: false,
66
- required: [],
67
- properties: Object.assign(Object.assign({}, common_1.ButtonBlock), { type: Object.assign({}, NavigationItemType) }),
62
+ required: ['type', 'items'],
63
+ properties: Object.assign(Object.assign({}, NavigationItemBaseProps), { type: Object.assign({}, NavigationItemType), items: (0, utils_1.filteredArray)(NavigationLinkItemProps) }),
68
64
  };
69
65
  const NavigationItemProps = {
70
66
  oneOf: [
71
67
  Object.assign(Object.assign(Object.assign({}, NavigationLinkItemProps), NavigationButtonItemProps), NavigationDropdownItemProps),
72
68
  ],
73
69
  };
74
- exports.NavigationProps = {
70
+ exports.NavigationHeaderProps = {
71
+ type: 'object',
75
72
  additionalProperties: false,
76
- required: [],
73
+ required: ['leftItems'],
77
74
  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
- },
75
+ leftItems: NavigationItemProps,
76
+ rightItems: NavigationItemProps,
88
77
  },
89
78
  };