@gravity-ui/page-constructor 4.47.0-beta.0 → 4.47.2

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.
Files changed (123) hide show
  1. package/README.md +2 -2
  2. package/build/cjs/blocks/CardLayout/CardLayout.css +278 -1
  3. package/build/cjs/blocks/CardLayout/CardLayout.js +2 -1
  4. package/build/cjs/blocks/CardLayout/schema.d.ts +134 -62
  5. package/build/cjs/blocks/CardLayout/schema.js +6 -1
  6. package/build/cjs/blocks/ContentLayout/schema.d.ts +123 -65
  7. package/build/cjs/blocks/ContentLayout/schema.js +1 -1
  8. package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.css +270 -0
  9. package/build/cjs/blocks/Form/Form.css +4 -2
  10. package/build/cjs/blocks/Header/schema.d.ts +3 -33
  11. package/build/cjs/blocks/HeaderSlider/schema.d.ts +1 -11
  12. package/build/cjs/blocks/Map/Map.css +14 -0
  13. package/build/cjs/blocks/Map/Map.d.ts +1 -1
  14. package/build/cjs/blocks/Map/Map.js +9 -2
  15. package/build/cjs/blocks/Map/schema.d.ts +4 -0
  16. package/build/cjs/blocks/Media/Media.css +14 -0
  17. package/build/cjs/blocks/Media/Media.js +8 -2
  18. package/build/cjs/blocks/Media/schema.d.ts +16 -22
  19. package/build/cjs/blocks/Media/schema.js +9 -2
  20. package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.css +270 -0
  21. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +1 -11
  22. package/build/cjs/blocks/Slider/Slider.css +270 -0
  23. package/build/cjs/blocks/Tabs/schema.d.ts +1 -11
  24. package/build/cjs/components/BalancedMasonry/BalancedMasonry.js +1 -1
  25. package/build/cjs/components/Image/schema.d.ts +102 -1
  26. package/build/cjs/components/Image/schema.js +9 -3
  27. package/build/cjs/components/Map/GoogleMap.js +2 -2
  28. package/build/cjs/components/Map/YMap/YandexMap.js +2 -2
  29. package/build/cjs/components/Media/Iframe/Iframe.css +4 -0
  30. package/build/cjs/components/Media/Iframe/Iframe.js +4 -64
  31. package/build/cjs/components/MediaBase/MediaBase.css +6 -0
  32. package/build/cjs/components/MediaBase/MediaBase.js +2 -2
  33. package/build/cjs/constructor-items.d.ts +1 -1
  34. package/build/cjs/editor/data/templates/banner-block.json +1 -2
  35. package/build/cjs/editor/data/templates/card-layout-block.json +3 -3
  36. package/build/cjs/editor/data/templates/companies-block.json +3 -9
  37. package/build/cjs/editor/data/templates/extended-features-block.json +3 -6
  38. package/build/cjs/editor/data/templates/filter-block.json +3 -3
  39. package/build/cjs/editor/data/templates/form-block.json +1 -1
  40. package/build/cjs/editor/data/templates/header-slider-block.json +2 -12
  41. package/build/cjs/editor/data/templates/icons-block.json +5 -5
  42. package/build/cjs/editor/data/templates/media-block.json +1 -4
  43. package/build/cjs/editor/data/templates/promo-features-block.json +5 -5
  44. package/build/cjs/editor/data/templates/slider-block.json +5 -5
  45. package/build/cjs/editor/data/templates/tabs-block.json +9 -42
  46. package/build/cjs/grid/Col/Col.d.ts +1 -1
  47. package/build/cjs/models/constructor-items/blocks.d.ts +6 -5
  48. package/build/cjs/models/constructor-items/common.d.ts +12 -5
  49. package/build/cjs/schema/constants.d.ts +2 -12
  50. package/build/cjs/schema/validators/common.d.ts +5 -11
  51. package/build/cjs/schema/validators/common.js +7 -10
  52. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +1 -1
  53. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +1 -11
  54. package/build/cjs/sub-blocks/MediaCard/schema.d.ts +1 -11
  55. package/build/cjs/utils/borderSelector.d.ts +7 -0
  56. package/build/cjs/utils/borderSelector.js +18 -0
  57. package/build/esm/blocks/CardLayout/CardLayout.css +278 -1
  58. package/build/esm/blocks/CardLayout/CardLayout.js +3 -1
  59. package/build/esm/blocks/CardLayout/schema.d.ts +134 -62
  60. package/build/esm/blocks/CardLayout/schema.js +8 -3
  61. package/build/esm/blocks/ContentLayout/schema.d.ts +123 -65
  62. package/build/esm/blocks/ContentLayout/schema.js +2 -2
  63. package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.css +270 -0
  64. package/build/esm/blocks/Form/Form.css +4 -2
  65. package/build/esm/blocks/Header/schema.d.ts +3 -33
  66. package/build/esm/blocks/HeaderSlider/schema.d.ts +1 -11
  67. package/build/esm/blocks/Map/Map.css +14 -0
  68. package/build/esm/blocks/Map/Map.d.ts +2 -1
  69. package/build/esm/blocks/Map/Map.js +10 -2
  70. package/build/esm/blocks/Map/schema.d.ts +4 -0
  71. package/build/esm/blocks/Media/Media.css +14 -0
  72. package/build/esm/blocks/Media/Media.d.ts +1 -0
  73. package/build/esm/blocks/Media/Media.js +10 -3
  74. package/build/esm/blocks/Media/schema.d.ts +16 -22
  75. package/build/esm/blocks/Media/schema.js +9 -2
  76. package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.css +270 -0
  77. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +1 -11
  78. package/build/esm/blocks/Slider/Slider.css +270 -0
  79. package/build/esm/blocks/Tabs/schema.d.ts +1 -11
  80. package/build/esm/components/BalancedMasonry/BalancedMasonry.js +1 -1
  81. package/build/esm/components/Image/schema.d.ts +102 -1
  82. package/build/esm/components/Image/schema.js +8 -2
  83. package/build/esm/components/Map/GoogleMap.js +2 -2
  84. package/build/esm/components/Map/YMap/YandexMap.js +2 -2
  85. package/build/esm/components/Media/Iframe/Iframe.css +4 -0
  86. package/build/esm/components/Media/Iframe/Iframe.js +4 -64
  87. package/build/esm/components/MediaBase/MediaBase.css +6 -0
  88. package/build/esm/components/MediaBase/MediaBase.js +2 -2
  89. package/build/esm/constructor-items.d.ts +1 -1
  90. package/build/esm/editor/data/templates/banner-block.json +1 -2
  91. package/build/esm/editor/data/templates/card-layout-block.json +3 -3
  92. package/build/esm/editor/data/templates/companies-block.json +3 -9
  93. package/build/esm/editor/data/templates/extended-features-block.json +3 -6
  94. package/build/esm/editor/data/templates/filter-block.json +3 -3
  95. package/build/esm/editor/data/templates/form-block.json +1 -1
  96. package/build/esm/editor/data/templates/header-slider-block.json +2 -12
  97. package/build/esm/editor/data/templates/icons-block.json +5 -5
  98. package/build/esm/editor/data/templates/media-block.json +1 -4
  99. package/build/esm/editor/data/templates/promo-features-block.json +5 -5
  100. package/build/esm/editor/data/templates/slider-block.json +5 -5
  101. package/build/esm/editor/data/templates/tabs-block.json +9 -42
  102. package/build/esm/grid/Col/Col.d.ts +1 -1
  103. package/build/esm/models/constructor-items/blocks.d.ts +6 -5
  104. package/build/esm/models/constructor-items/common.d.ts +12 -5
  105. package/build/esm/schema/constants.d.ts +2 -12
  106. package/build/esm/schema/validators/common.d.ts +5 -11
  107. package/build/esm/schema/validators/common.js +6 -9
  108. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +1 -1
  109. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +1 -11
  110. package/build/esm/sub-blocks/MediaCard/schema.d.ts +1 -11
  111. package/build/esm/utils/borderSelector.d.ts +7 -0
  112. package/build/esm/utils/borderSelector.js +14 -0
  113. package/package.json +2 -4
  114. package/server/models/constructor-items/blocks.d.ts +6 -5
  115. package/server/models/constructor-items/common.d.ts +12 -5
  116. package/styles/mixins.scss +30 -10
  117. package/widget/index.js +1 -1
  118. package/build/cjs/editor/data/templates/preview-block.json +0 -38
  119. package/build/cjs/editor/data/templates/security-block.json +0 -36
  120. package/build/cjs/editor/data/templates/simple-block.json +0 -7
  121. package/build/esm/editor/data/templates/preview-block.json +0 -38
  122. package/build/esm/editor/data/templates/security-block.json +0 -36
  123. package/build/esm/editor/data/templates/simple-block.json +0 -7
@@ -8,41 +8,77 @@ export declare const CardLayoutProps: {
8
8
  properties: {};
9
9
  };
10
10
  background: {
11
- type: string;
12
- additionalProperties: boolean;
13
- required: string[];
14
- properties: {
15
- src: {
16
- type: string;
17
- pattern: string;
18
- };
19
- style: {
20
- type: string;
21
- additionalProperties: boolean;
22
- required: never[];
23
- properties: {
24
- backgroundColor: {
25
- type: string;
26
- };
27
- height: {
28
- type: string[];
29
- };
30
- width: {
31
- type: string[];
32
- };
33
- color: {
34
- type: string;
11
+ anyOf: ({
12
+ properties: {
13
+ border: {
14
+ type: string;
15
+ enum: string[];
16
+ };
17
+ src: {
18
+ type: string;
19
+ pattern: string;
20
+ };
21
+ style: {
22
+ type: string;
23
+ additionalProperties: boolean;
24
+ required: never[];
25
+ properties: {
26
+ backgroundColor: {
27
+ type: string;
28
+ };
29
+ height: {
30
+ type: string[];
31
+ };
32
+ width: {
33
+ type: string[];
34
+ };
35
+ color: {
36
+ type: string;
37
+ };
35
38
  };
36
39
  };
40
+ alt: {
41
+ type: string;
42
+ contentType: string;
43
+ };
44
+ disableCompress: {
45
+ type: string;
46
+ };
37
47
  };
38
- alt: {
39
- type: string;
40
- contentType: string;
41
- };
42
- disableCompress: {
43
- type: string;
48
+ optionName: string;
49
+ type: string;
50
+ additionalProperties: boolean;
51
+ } | {
52
+ properties: {
53
+ border: {
54
+ type: string;
55
+ enum: string[];
56
+ };
57
+ desktop: {
58
+ type: string;
59
+ pattern: string;
60
+ };
61
+ tablet: {
62
+ type: string;
63
+ pattern: string;
64
+ };
65
+ mobile: {
66
+ type: string;
67
+ pattern: string;
68
+ };
69
+ alt: {
70
+ type: string;
71
+ contentType: string;
72
+ };
73
+ disableCompress: {
74
+ type: string;
75
+ };
44
76
  };
45
- };
77
+ optionName: string;
78
+ type: string;
79
+ additionalProperties: boolean;
80
+ required: string[];
81
+ })[];
46
82
  };
47
83
  children: {
48
84
  type: string;
@@ -144,41 +180,77 @@ export declare const CardLayoutBlock: {
144
180
  properties: {};
145
181
  };
146
182
  background: {
147
- type: string;
148
- additionalProperties: boolean;
149
- required: string[];
150
- properties: {
151
- src: {
152
- type: string;
153
- pattern: string;
154
- };
155
- style: {
156
- type: string;
157
- additionalProperties: boolean;
158
- required: never[];
159
- properties: {
160
- backgroundColor: {
161
- type: string;
162
- };
163
- height: {
164
- type: string[];
165
- };
166
- width: {
167
- type: string[];
168
- };
169
- color: {
170
- type: string;
183
+ anyOf: ({
184
+ properties: {
185
+ border: {
186
+ type: string;
187
+ enum: string[];
188
+ };
189
+ src: {
190
+ type: string;
191
+ pattern: string;
192
+ };
193
+ style: {
194
+ type: string;
195
+ additionalProperties: boolean;
196
+ required: never[];
197
+ properties: {
198
+ backgroundColor: {
199
+ type: string;
200
+ };
201
+ height: {
202
+ type: string[];
203
+ };
204
+ width: {
205
+ type: string[];
206
+ };
207
+ color: {
208
+ type: string;
209
+ };
171
210
  };
172
211
  };
212
+ alt: {
213
+ type: string;
214
+ contentType: string;
215
+ };
216
+ disableCompress: {
217
+ type: string;
218
+ };
173
219
  };
174
- alt: {
175
- type: string;
176
- contentType: string;
177
- };
178
- disableCompress: {
179
- type: string;
220
+ optionName: string;
221
+ type: string;
222
+ additionalProperties: boolean;
223
+ } | {
224
+ properties: {
225
+ border: {
226
+ type: string;
227
+ enum: string[];
228
+ };
229
+ desktop: {
230
+ type: string;
231
+ pattern: string;
232
+ };
233
+ tablet: {
234
+ type: string;
235
+ pattern: string;
236
+ };
237
+ mobile: {
238
+ type: string;
239
+ pattern: string;
240
+ };
241
+ alt: {
242
+ type: string;
243
+ contentType: string;
244
+ };
245
+ disableCompress: {
246
+ type: string;
247
+ };
180
248
  };
181
- };
249
+ optionName: string;
250
+ type: string;
251
+ additionalProperties: boolean;
252
+ required: string[];
253
+ })[];
182
254
  };
183
255
  children: {
184
256
  type: string;
@@ -1,9 +1,14 @@
1
- import { ImageObjectProps } from '../../components/Image/schema';
2
- import { AnimatableProps, BlockBaseProps, BlockHeaderProps, ChildrenCardsProps, containerSizesObject, } from '../../schema/validators/common';
1
+ import { ImageBaseObjectProps, ImageDeviceProps } from '../../components/Image/schema';
2
+ import { AnimatableProps, BlockBaseProps, BlockHeaderProps, BorderProps, ChildrenCardsProps, containerSizesObject, } from '../../schema/validators/common';
3
3
  export const CardLayoutProps = {
4
4
  additionalProperties: false,
5
5
  required: [],
6
- properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), BlockHeaderProps), { colSizes: containerSizesObject, background: ImageObjectProps, children: ChildrenCardsProps }),
6
+ properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), BlockHeaderProps), { colSizes: containerSizesObject, background: {
7
+ anyOf: [
8
+ Object.assign(Object.assign({}, ImageBaseObjectProps), { properties: Object.assign(Object.assign({}, ImageBaseObjectProps.properties), { border: BorderProps }), optionName: 'options' }),
9
+ Object.assign(Object.assign({}, ImageDeviceProps), { properties: Object.assign(Object.assign({}, ImageDeviceProps.properties), { border: BorderProps }), optionName: 'device options' }),
10
+ ],
11
+ }, children: ChildrenCardsProps }),
7
12
  };
8
13
  export const CardLayoutBlock = {
9
14
  'card-layout-block': CardLayoutProps,
@@ -7,41 +7,71 @@ export declare const ContentLayoutBlock: {
7
7
  enum: string[];
8
8
  };
9
9
  background: {
10
- type: string;
11
- additionalProperties: boolean;
12
- required: string[];
13
- properties: {
14
- src: {
15
- type: string;
16
- pattern: string;
17
- };
18
- style: {
19
- type: string;
20
- additionalProperties: boolean;
21
- required: never[];
22
- properties: {
23
- backgroundColor: {
24
- type: string;
25
- };
26
- height: {
27
- type: string[];
28
- };
29
- width: {
30
- type: string[];
31
- };
32
- color: {
33
- type: string;
10
+ anyOf: ({
11
+ optionName: string;
12
+ type: string;
13
+ additionalProperties: boolean;
14
+ properties: {
15
+ src: {
16
+ type: string;
17
+ pattern: string;
18
+ };
19
+ style: {
20
+ type: string;
21
+ additionalProperties: boolean;
22
+ required: never[];
23
+ properties: {
24
+ backgroundColor: {
25
+ type: string;
26
+ };
27
+ height: {
28
+ type: string[];
29
+ };
30
+ width: {
31
+ type: string[];
32
+ };
33
+ color: {
34
+ type: string;
35
+ };
34
36
  };
35
37
  };
38
+ alt: {
39
+ type: string;
40
+ contentType: string;
41
+ };
42
+ disableCompress: {
43
+ type: string;
44
+ };
36
45
  };
37
- alt: {
38
- type: string;
39
- contentType: string;
40
- };
41
- disableCompress: {
42
- type: string;
46
+ } | {
47
+ optionName: string;
48
+ type: string;
49
+ additionalProperties: boolean;
50
+ required: string[];
51
+ properties: {
52
+ desktop: {
53
+ type: string;
54
+ pattern: string;
55
+ };
56
+ tablet: {
57
+ type: string;
58
+ pattern: string;
59
+ }; /**
60
+ * @deprecated Use params on top level instead
61
+ */
62
+ mobile: {
63
+ type: string;
64
+ pattern: string;
65
+ };
66
+ alt: {
67
+ type: string;
68
+ contentType: string;
69
+ };
70
+ disableCompress: {
71
+ type: string;
72
+ };
43
73
  };
44
- };
74
+ })[];
45
75
  };
46
76
  centered: {
47
77
  type: string;
@@ -92,9 +122,7 @@ export declare const ContentLayoutBlock: {
92
122
  };
93
123
  contentType?: undefined;
94
124
  })[];
95
- }; /**
96
- * @deprecated Use params on top level instead
97
- */
125
+ };
98
126
  text: {
99
127
  type: string;
100
128
  contentType: string;
@@ -167,41 +195,71 @@ export declare const ContentLayoutBlock: {
167
195
  enum: string[];
168
196
  };
169
197
  background: {
170
- type: string;
171
- additionalProperties: boolean;
172
- required: string[];
173
- properties: {
174
- src: {
175
- type: string;
176
- pattern: string;
177
- };
178
- style: {
179
- type: string;
180
- additionalProperties: boolean;
181
- required: never[];
182
- properties: {
183
- backgroundColor: {
184
- type: string;
185
- };
186
- height: {
187
- type: string[];
188
- };
189
- width: {
190
- type: string[];
191
- };
192
- color: {
193
- type: string;
198
+ anyOf: ({
199
+ optionName: string;
200
+ type: string;
201
+ additionalProperties: boolean;
202
+ properties: {
203
+ src: {
204
+ type: string;
205
+ pattern: string;
206
+ };
207
+ style: {
208
+ type: string;
209
+ additionalProperties: boolean;
210
+ required: never[];
211
+ properties: {
212
+ backgroundColor: {
213
+ type: string;
214
+ };
215
+ height: {
216
+ type: string[];
217
+ };
218
+ width: {
219
+ type: string[];
220
+ };
221
+ color: {
222
+ type: string;
223
+ };
194
224
  };
195
225
  };
226
+ alt: {
227
+ type: string;
228
+ contentType: string;
229
+ };
230
+ disableCompress: {
231
+ type: string;
232
+ };
196
233
  };
197
- alt: {
198
- type: string;
199
- contentType: string;
200
- };
201
- disableCompress: {
202
- type: string;
234
+ } | {
235
+ optionName: string;
236
+ type: string;
237
+ additionalProperties: boolean;
238
+ required: string[];
239
+ properties: {
240
+ desktop: {
241
+ type: string;
242
+ pattern: string;
243
+ };
244
+ tablet: {
245
+ type: string;
246
+ pattern: string;
247
+ }; /**
248
+ * @deprecated Use params on top level instead
249
+ */
250
+ mobile: {
251
+ type: string;
252
+ pattern: string;
253
+ };
254
+ alt: {
255
+ type: string;
256
+ contentType: string;
257
+ };
258
+ disableCompress: {
259
+ type: string;
260
+ };
203
261
  };
204
- };
262
+ })[];
205
263
  };
206
264
  centered: {
207
265
  type: string;
@@ -1,4 +1,4 @@
1
- import { ImageObjectProps } from '../../components/Image/schema';
1
+ import { BackgroundImageProps } from '../../components/Image/schema';
2
2
  import { BlockBaseProps, FileLinkProps, contentSizes, contentTextWidth, contentThemes, } from '../../schema/validators/common';
3
3
  import { filteredArray } from '../../schema/validators/utils';
4
4
  import { ContentBlock } from '../../sub-blocks/Content/schema';
@@ -7,7 +7,7 @@ const ContentLayoutBlockProperties = {
7
7
  type: 'string',
8
8
  enum: contentSizes,
9
9
  },
10
- background: ImageObjectProps,
10
+ background: BackgroundImageProps,
11
11
  centered: {
12
12
  type: 'boolean',
13
13
  },