@gravity-ui/page-constructor 1.7.1-alpha.2 → 1.7.1-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.
@@ -6,12 +6,6 @@ export declare const tabsItem: {
6
6
  tabName: {
7
7
  type: string;
8
8
  };
9
- title: {
10
- type: string;
11
- };
12
- text: {
13
- type: string;
14
- };
15
9
  caption: {
16
10
  type: string;
17
11
  };
@@ -184,17 +178,6 @@ export declare const tabsItem: {
184
178
  when: {};
185
179
  };
186
180
  };
187
- links: {
188
- type: string;
189
- items: {
190
- type: string;
191
- properties: {
192
- when: {
193
- type: string;
194
- };
195
- };
196
- };
197
- };
198
181
  image: {
199
182
  oneOf: ({
200
183
  oneOf: ({
@@ -215,6 +198,66 @@ export declare const tabsItem: {
215
198
  properties: {};
216
199
  })[];
217
200
  };
201
+ title?: {
202
+ oneOf: ({
203
+ type: string;
204
+ additionalProperties: boolean;
205
+ required: string[];
206
+ properties: {
207
+ text: {
208
+ type: string;
209
+ };
210
+ textSize: {
211
+ type: string;
212
+ enum: string[];
213
+ };
214
+ url: {
215
+ type: string;
216
+ };
217
+ resetMargin: {
218
+ type: string;
219
+ };
220
+ };
221
+ } | {
222
+ type: string;
223
+ })[];
224
+ } | undefined;
225
+ text?: {
226
+ type: string;
227
+ } | undefined;
228
+ additionalInfo?: {
229
+ type: string;
230
+ } | undefined;
231
+ size?: {
232
+ type: string;
233
+ enum: string[];
234
+ } | undefined;
235
+ links?: {
236
+ type: string;
237
+ items: {
238
+ type: string;
239
+ properties: {
240
+ when: {
241
+ type: string;
242
+ };
243
+ };
244
+ };
245
+ } | undefined;
246
+ buttons?: {
247
+ type: string;
248
+ items: {
249
+ type: string;
250
+ properties: {
251
+ when: {
252
+ type: string;
253
+ };
254
+ };
255
+ };
256
+ } | undefined;
257
+ theme?: {
258
+ type: string;
259
+ enum: string[];
260
+ } | undefined;
218
261
  };
219
262
  };
220
263
  export declare const TabsBlock: {
@@ -245,7 +288,7 @@ export declare const TabsBlock: {
245
288
  description: {
246
289
  type: string;
247
290
  };
248
- colSizes: {};
291
+ tabsColSizes: {};
249
292
  direction: {
250
293
  type: string;
251
294
  enum: string[];
@@ -1,35 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TabsBlock = exports.tabsItem = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  const utils_1 = require("../../schema/validators/utils");
5
6
  const common_1 = require("../../schema/validators/common");
6
7
  const schema_1 = require("../../components/Image/schema");
8
+ const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
9
+ const schema_2 = require("../../sub-blocks/Content/schema");
10
+ const TabsItemContentProps = lodash_1.default.omit(schema_2.ContentBase, ['size', 'colSizes', 'centered', 'theme']);
7
11
  exports.tabsItem = {
8
12
  type: 'object',
9
13
  additionalProperties: false,
10
- required: ['tabName', 'text'],
11
- properties: {
12
- tabName: {
14
+ required: ['tabName'],
15
+ properties: Object.assign(Object.assign({}, TabsItemContentProps), { tabName: {
13
16
  type: 'string',
14
- },
15
- title: {
17
+ }, caption: {
16
18
  type: 'string',
17
- },
18
- text: {
19
- type: 'string',
20
- },
21
- caption: {
22
- type: 'string',
23
- },
24
- media: (0, common_1.withTheme)({
19
+ }, media: (0, common_1.withTheme)({
25
20
  type: 'object',
26
21
  properties: common_1.MediaProps,
27
- }),
22
+ }),
28
23
  //TODO deprecated
29
- link: common_1.LinkProps,
30
- links: (0, utils_1.filteredArray)(common_1.LinkProps),
31
- image: (0, common_1.withTheme)(schema_1.ImageProps),
32
- },
24
+ link: common_1.LinkProps, image: (0, common_1.withTheme)(schema_1.ImageProps) }),
33
25
  };
34
26
  exports.TabsBlock = {
35
27
  'tabs-block': {
@@ -37,7 +29,7 @@ exports.TabsBlock = {
37
29
  required: ['title', 'items'],
38
30
  properties: Object.assign(Object.assign({}, common_1.BlockBaseProps), { title: common_1.TitleProps, description: {
39
31
  type: 'string',
40
- }, colSizes: common_1.containerSizesArray.reduce((acc, size) => (Object.assign(Object.assign({}, acc), { [size]: common_1.sizeNumber })), {}), direction: {
32
+ }, tabsColSizes: common_1.containerSizesArray.reduce((acc, size) => (Object.assign(Object.assign({}, acc), { [size]: common_1.sizeNumber })), {}), direction: {
41
33
  type: 'string',
42
34
  enum: common_1.mediaDirection,
43
35
  }, centered: { type: 'boolean' }, items: (0, utils_1.filteredArray)(exports.tabsItem) }),
@@ -226,7 +226,6 @@ export interface TabsBlockItem extends Omit<ContentBlockProps, 'size' | 'colSize
226
226
  */
227
227
  link?: LinkProps;
228
228
  image?: ThemedImage;
229
- disableCompress?: boolean;
230
229
  caption?: string;
231
230
  media?: ThemedMediaProps;
232
231
  }
@@ -6,12 +6,6 @@ export declare const tabsItem: {
6
6
  tabName: {
7
7
  type: string;
8
8
  };
9
- title: {
10
- type: string;
11
- };
12
- text: {
13
- type: string;
14
- };
15
9
  caption: {
16
10
  type: string;
17
11
  };
@@ -184,17 +178,6 @@ export declare const tabsItem: {
184
178
  when: {};
185
179
  };
186
180
  };
187
- links: {
188
- type: string;
189
- items: {
190
- type: string;
191
- properties: {
192
- when: {
193
- type: string;
194
- };
195
- };
196
- };
197
- };
198
181
  image: {
199
182
  oneOf: ({
200
183
  oneOf: ({
@@ -215,6 +198,66 @@ export declare const tabsItem: {
215
198
  properties: {};
216
199
  })[];
217
200
  };
201
+ title?: {
202
+ oneOf: ({
203
+ type: string;
204
+ additionalProperties: boolean;
205
+ required: string[];
206
+ properties: {
207
+ text: {
208
+ type: string;
209
+ };
210
+ textSize: {
211
+ type: string;
212
+ enum: string[];
213
+ };
214
+ url: {
215
+ type: string;
216
+ };
217
+ resetMargin: {
218
+ type: string;
219
+ };
220
+ };
221
+ } | {
222
+ type: string;
223
+ })[];
224
+ } | undefined;
225
+ text?: {
226
+ type: string;
227
+ } | undefined;
228
+ additionalInfo?: {
229
+ type: string;
230
+ } | undefined;
231
+ size?: {
232
+ type: string;
233
+ enum: string[];
234
+ } | undefined;
235
+ links?: {
236
+ type: string;
237
+ items: {
238
+ type: string;
239
+ properties: {
240
+ when: {
241
+ type: string;
242
+ };
243
+ };
244
+ };
245
+ } | undefined;
246
+ buttons?: {
247
+ type: string;
248
+ items: {
249
+ type: string;
250
+ properties: {
251
+ when: {
252
+ type: string;
253
+ };
254
+ };
255
+ };
256
+ } | undefined;
257
+ theme?: {
258
+ type: string;
259
+ enum: string[];
260
+ } | undefined;
218
261
  };
219
262
  };
220
263
  export declare const TabsBlock: {
@@ -245,7 +288,7 @@ export declare const TabsBlock: {
245
288
  description: {
246
289
  type: string;
247
290
  };
248
- colSizes: {};
291
+ tabsColSizes: {};
249
292
  direction: {
250
293
  type: string;
251
294
  enum: string[];
@@ -1,32 +1,23 @@
1
1
  import { filteredArray } from '../../schema/validators/utils';
2
2
  import { LinkProps, withTheme, BlockBaseProps, TitleProps, MediaProps, containerSizesArray, sizeNumber, mediaDirection, } from '../../schema/validators/common';
3
3
  import { ImageProps } from '../../components/Image/schema';
4
+ import _ from 'lodash';
5
+ import { ContentBase } from '../../sub-blocks/Content/schema';
6
+ const TabsItemContentProps = _.omit(ContentBase, ['size', 'colSizes', 'centered', 'theme']);
4
7
  export const tabsItem = {
5
8
  type: 'object',
6
9
  additionalProperties: false,
7
- required: ['tabName', 'text'],
8
- properties: {
9
- tabName: {
10
+ required: ['tabName'],
11
+ properties: Object.assign(Object.assign({}, TabsItemContentProps), { tabName: {
10
12
  type: 'string',
11
- },
12
- title: {
13
+ }, caption: {
13
14
  type: 'string',
14
- },
15
- text: {
16
- type: 'string',
17
- },
18
- caption: {
19
- type: 'string',
20
- },
21
- media: withTheme({
15
+ }, media: withTheme({
22
16
  type: 'object',
23
17
  properties: MediaProps,
24
- }),
18
+ }),
25
19
  //TODO deprecated
26
- link: LinkProps,
27
- links: filteredArray(LinkProps),
28
- image: withTheme(ImageProps),
29
- },
20
+ link: LinkProps, image: withTheme(ImageProps) }),
30
21
  };
31
22
  export const TabsBlock = {
32
23
  'tabs-block': {
@@ -34,7 +25,7 @@ export const TabsBlock = {
34
25
  required: ['title', 'items'],
35
26
  properties: Object.assign(Object.assign({}, BlockBaseProps), { title: TitleProps, description: {
36
27
  type: 'string',
37
- }, colSizes: containerSizesArray.reduce((acc, size) => (Object.assign(Object.assign({}, acc), { [size]: sizeNumber })), {}), direction: {
28
+ }, tabsColSizes: containerSizesArray.reduce((acc, size) => (Object.assign(Object.assign({}, acc), { [size]: sizeNumber })), {}), direction: {
38
29
  type: 'string',
39
30
  enum: mediaDirection,
40
31
  }, centered: { type: 'boolean' }, items: filteredArray(tabsItem) }),
@@ -226,7 +226,6 @@ export interface TabsBlockItem extends Omit<ContentBlockProps, 'size' | 'colSize
226
226
  */
227
227
  link?: LinkProps;
228
228
  image?: ThemedImage;
229
- disableCompress?: boolean;
230
229
  caption?: string;
231
230
  media?: ThemedMediaProps;
232
231
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "1.7.1-alpha.2",
3
+ "version": "1.7.1-alpha.3",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -226,7 +226,6 @@ export interface TabsBlockItem extends Omit<ContentBlockProps, 'size' | 'colSize
226
226
  */
227
227
  link?: LinkProps;
228
228
  image?: ThemedImage;
229
- disableCompress?: boolean;
230
229
  caption?: string;
231
230
  media?: ThemedMediaProps;
232
231
  }