@gravity-ui/page-constructor 1.14.0-alpha.2 → 1.14.0-alpha.3

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
 
@@ -45,159 +45,33 @@ export declare const NavigationProps: {
45
45
  oneOf: {
46
46
  type: string;
47
47
  additionalProperties: boolean;
48
- required: never[];
48
+ required: string[];
49
49
  properties: {
50
50
  type: {
51
51
  type: string;
52
52
  enum: string[];
53
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: {
54
+ items: {
55
+ type: string;
56
+ items: {
71
57
  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: {
58
+ properties: {
59
+ when: {
106
60
  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
61
  };
182
62
  };
183
63
  };
184
- target: {
185
- type: string;
186
- enum: string[];
187
- };
188
64
  };
189
- if: {
190
- properties: {
191
- theme: {
192
- enum: string[];
193
- };
194
- };
65
+ text: {
66
+ type: string;
67
+ contentType: string;
195
68
  };
196
- then: {
197
- required: string[];
69
+ url: {
70
+ type: string;
198
71
  };
199
- else: {
200
- required: string[];
72
+ icon: {
73
+ type: string;
74
+ pattern: string;
201
75
  };
202
76
  };
203
77
  }[];
@@ -206,159 +80,33 @@ export declare const NavigationProps: {
206
80
  oneOf: {
207
81
  type: string;
208
82
  additionalProperties: boolean;
209
- required: never[];
83
+ required: string[];
210
84
  properties: {
211
85
  type: {
212
86
  type: string;
213
87
  enum: string[];
214
88
  };
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: {
89
+ items: {
90
+ type: string;
91
+ items: {
232
92
  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: {
93
+ properties: {
94
+ when: {
267
95
  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
96
  };
343
97
  };
344
98
  };
345
- target: {
346
- type: string;
347
- enum: string[];
348
- };
349
99
  };
350
- if: {
351
- properties: {
352
- theme: {
353
- enum: string[];
354
- };
355
- };
100
+ text: {
101
+ type: string;
102
+ contentType: string;
356
103
  };
357
- then: {
358
- required: string[];
104
+ url: {
105
+ type: string;
359
106
  };
360
- else: {
361
- required: string[];
107
+ icon: {
108
+ type: string;
109
+ pattern: string;
362
110
  };
363
111
  };
364
112
  }[];
@@ -4,6 +4,7 @@ exports.NavigationProps = 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'],
@@ -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,14 +53,14 @@ 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: [