@gravity-ui/page-constructor 3.0.0-alpha.6 → 3.1.0
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 +59 -0
- package/README.md +16 -1
- package/build/cjs/blocks/CardLayout/CardLayout.js +1 -1
- package/build/cjs/blocks/CardLayout/schema.d.ts +2 -2
- package/build/cjs/blocks/CardLayout/schema.js +1 -1
- package/build/cjs/blocks/FilterBlock/FilterBlock.js +9 -13
- package/build/cjs/blocks/Header/schema.d.ts +243 -0
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +81 -0
- package/build/cjs/blocks/Media/schema.d.ts +162 -0
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +81 -0
- package/build/cjs/blocks/Slider/Slider.js +1 -1
- package/build/cjs/blocks/Tabs/schema.d.ts +81 -0
- package/build/cjs/components/FullscreenImage/{FullScreenImage.css → FullscreenImage.css} +13 -13
- package/build/cjs/components/FullscreenImage/FullscreenImage.d.ts +3 -3
- package/build/cjs/components/FullscreenImage/FullscreenImage.js +7 -7
- package/build/cjs/components/FullscreenImage/i18n/index.js +1 -1
- package/build/cjs/components/FullscreenMedia/FullscreenMedia.d.ts +9 -0
- package/build/cjs/components/FullscreenMedia/{FullScreenMedia.js → FullscreenMedia.js} +5 -5
- package/build/cjs/components/Media/FullscreenVideo/FullscreenVideo.d.ts +4 -0
- package/build/cjs/components/Media/FullscreenVideo/FullscreenVideo.js +10 -0
- package/build/cjs/components/Media/Image/Image.d.ts +1 -0
- package/build/cjs/components/Media/Image/Image.js +10 -3
- package/build/cjs/components/Media/Media.js +25 -5
- package/build/cjs/components/Media/Video/Video.d.ts +1 -1
- package/build/cjs/components/VideoBlock/VideoBlock.d.ts +3 -2
- package/build/cjs/components/VideoBlock/VideoBlock.js +8 -4
- package/build/cjs/components/index.d.ts +1 -1
- package/build/cjs/components/index.js +3 -3
- package/build/cjs/constructor-items.d.ts +1 -1
- package/build/cjs/grid/Col/Col.d.ts +1 -1
- package/build/cjs/icons/Fullscreen.d.ts +2 -0
- package/build/cjs/icons/{FullScreen.js → Fullscreen.js} +3 -3
- package/build/cjs/icons/index.d.ts +1 -1
- package/build/cjs/icons/index.js +1 -1
- package/build/cjs/models/common.d.ts +2 -1
- package/build/cjs/models/common.js +1 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +1 -1
- package/build/cjs/models/constructor-items/common.d.ts +1 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -1
- package/build/cjs/schema/validators/common.d.ts +81 -0
- package/build/cjs/schema/validators/common.js +6 -0
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +4 -4
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +82 -1
- package/build/cjs/sub-blocks/LayoutItem/schema.js +1 -1
- package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +2 -2
- package/build/cjs/sub-blocks/LayoutItem/utils.js +6 -6
- package/build/cjs/sub-blocks/MediaCard/schema.d.ts +85 -0
- package/build/cjs/sub-blocks/MediaCard/schema.js +1 -1
- package/build/esm/blocks/CardLayout/CardLayout.js +1 -1
- package/build/esm/blocks/CardLayout/schema.d.ts +2 -2
- package/build/esm/blocks/CardLayout/schema.js +1 -1
- package/build/esm/blocks/FilterBlock/FilterBlock.js +10 -14
- package/build/esm/blocks/Header/schema.d.ts +243 -0
- package/build/esm/blocks/HeaderSlider/schema.d.ts +81 -0
- package/build/esm/blocks/Media/schema.d.ts +162 -0
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +81 -0
- package/build/esm/blocks/Slider/Slider.js +2 -2
- package/build/esm/blocks/Tabs/Tabs.js +2 -2
- package/build/esm/blocks/Tabs/schema.d.ts +81 -0
- package/build/esm/components/FullscreenImage/{FullScreenImage.css → FullscreenImage.css} +13 -13
- package/build/esm/components/FullscreenImage/FullscreenImage.d.ts +4 -4
- package/build/esm/components/FullscreenImage/FullscreenImage.js +9 -9
- package/build/esm/components/FullscreenImage/i18n/index.js +1 -1
- package/build/esm/components/FullscreenMedia/FullscreenMedia.d.ts +10 -0
- package/build/esm/components/FullscreenMedia/{FullScreenMedia.js → FullscreenMedia.js} +7 -7
- package/build/esm/components/Media/FullscreenVideo/FullscreenVideo.d.ts +4 -0
- package/build/esm/components/Media/FullscreenVideo/FullscreenVideo.js +7 -0
- package/build/esm/components/Media/Image/Image.d.ts +1 -0
- package/build/esm/components/Media/Image/Image.js +12 -5
- package/build/esm/components/Media/Media.js +25 -5
- package/build/esm/components/Media/Video/Video.d.ts +1 -1
- package/build/esm/components/VideoBlock/VideoBlock.d.ts +3 -2
- package/build/esm/components/VideoBlock/VideoBlock.js +8 -4
- package/build/esm/components/index.d.ts +1 -1
- package/build/esm/components/index.js +1 -1
- package/build/esm/constructor-items.d.ts +1 -1
- package/build/esm/grid/Col/Col.d.ts +1 -1
- package/build/esm/icons/Fullscreen.d.ts +2 -0
- package/build/esm/icons/{FullScreen.js → Fullscreen.js} +1 -1
- package/build/esm/icons/index.d.ts +1 -1
- package/build/esm/icons/index.js +1 -1
- package/build/esm/models/common.d.ts +2 -1
- package/build/esm/models/common.js +1 -0
- package/build/esm/models/constructor-items/blocks.d.ts +1 -1
- package/build/esm/models/constructor-items/common.d.ts +1 -1
- package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -1
- package/build/esm/schema/validators/common.d.ts +81 -0
- package/build/esm/schema/validators/common.js +6 -0
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +6 -6
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +82 -1
- package/build/esm/sub-blocks/LayoutItem/schema.js +1 -1
- package/build/esm/sub-blocks/LayoutItem/utils.d.ts +2 -2
- package/build/esm/sub-blocks/LayoutItem/utils.js +3 -3
- package/build/esm/sub-blocks/MediaCard/schema.d.ts +85 -0
- package/build/esm/sub-blocks/MediaCard/schema.js +2 -2
- package/package.json +1 -4
- package/server/models/common.d.ts +2 -1
- package/server/models/common.js +1 -0
- package/server/models/constructor-items/blocks.d.ts +1 -1
- package/server/models/constructor-items/common.d.ts +1 -1
- package/server/models/constructor-items/sub-blocks.d.ts +1 -1
- package/build/cjs/components/FullscreenMedia/FullScreenMedia.d.ts +0 -9
- package/build/cjs/icons/FullScreen.d.ts +0 -2
- package/build/esm/components/FullscreenMedia/FullScreenMedia.d.ts +0 -10
- package/build/esm/icons/FullScreen.d.ts +0 -2
- /package/build/cjs/components/FullscreenMedia/{FullScreenMedia.css → FullscreenMedia.css} +0 -0
- /package/build/esm/components/FullscreenMedia/{FullScreenMedia.css → FullscreenMedia.css} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useMemo, useState } from 'react';
|
|
2
|
+
import { CardLayoutBlock } from '..';
|
|
2
3
|
import { AnimateBlock, Title } from '../../components';
|
|
3
4
|
import ButtonTabs from '../../components/ButtonTabs/ButtonTabs';
|
|
4
|
-
import {
|
|
5
|
+
import { ConstructorItem } from '../../containers/PageConstructor/components/ConstructorItem';
|
|
5
6
|
import { Col, Row } from '../../grid';
|
|
6
|
-
import {
|
|
7
|
-
import { block } from '../../utils';
|
|
7
|
+
import { block, getBlockKey } from '../../utils';
|
|
8
8
|
import i18n from './i18n';
|
|
9
9
|
import './FilterBlock.css';
|
|
10
10
|
const b = block('filter-block');
|
|
@@ -22,25 +22,21 @@ const FilterBlock = ({ title, description, tags, tagButtonSize, allTag, items, c
|
|
|
22
22
|
? tabButtons[0].id
|
|
23
23
|
: selectedTag;
|
|
24
24
|
}, [tabButtons, selectedTag]);
|
|
25
|
-
const
|
|
25
|
+
const cards = useMemo(() => {
|
|
26
26
|
const itemsToShow = actualTag
|
|
27
27
|
? items.filter((item) => item.tags.includes(actualTag))
|
|
28
28
|
: items;
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
type: BlockType.CardLayoutBlock,
|
|
32
|
-
title: '',
|
|
33
|
-
colSizes: colSizes,
|
|
34
|
-
children: itemsToShow.map((item) => item.card),
|
|
35
|
-
},
|
|
36
|
-
];
|
|
37
|
-
}, [actualTag, items, colSizes]);
|
|
29
|
+
return itemsToShow.map((item) => item.card);
|
|
30
|
+
}, [actualTag, items]);
|
|
38
31
|
return (React.createElement(AnimateBlock, { className: b(), animate: animated },
|
|
39
32
|
title && (React.createElement(Title, { className: b('title', { centered: centered }), title: title, subtitle: description })),
|
|
40
33
|
tabButtons.length && (React.createElement(Row, null,
|
|
41
34
|
React.createElement(Col, null,
|
|
42
35
|
React.createElement(ButtonTabs, { className: b('tabs', { centered: centered }), items: tabButtons, activeTab: selectedTag, onSelectTab: setSelectedTag, tabSize: tagButtonSize })))),
|
|
43
36
|
React.createElement(Row, { className: b('block-container') },
|
|
44
|
-
React.createElement(
|
|
37
|
+
React.createElement(CardLayoutBlock, { title: "", colSizes: colSizes }, cards.map((card, index) => {
|
|
38
|
+
const key = getBlockKey(card, index);
|
|
39
|
+
return React.createElement(ConstructorItem, { data: card, blockKey: key, key: key });
|
|
40
|
+
})))));
|
|
45
41
|
};
|
|
46
42
|
export default FilterBlock;
|
|
@@ -137,6 +137,87 @@ export declare const HeaderBackgroundProps: {
|
|
|
137
137
|
type: string;
|
|
138
138
|
})[];
|
|
139
139
|
};
|
|
140
|
+
fullscreen: {
|
|
141
|
+
type: string;
|
|
142
|
+
};
|
|
143
|
+
analyticsEvents: {
|
|
144
|
+
anyOf: ({
|
|
145
|
+
type: string;
|
|
146
|
+
additionalProperties: {
|
|
147
|
+
type: string;
|
|
148
|
+
};
|
|
149
|
+
required: string[];
|
|
150
|
+
properties: {
|
|
151
|
+
name: {
|
|
152
|
+
type: string;
|
|
153
|
+
};
|
|
154
|
+
type: {
|
|
155
|
+
type: string;
|
|
156
|
+
};
|
|
157
|
+
counters: {
|
|
158
|
+
type: string;
|
|
159
|
+
additionalProperties: boolean;
|
|
160
|
+
required: never[];
|
|
161
|
+
properties: {
|
|
162
|
+
include: {
|
|
163
|
+
type: string;
|
|
164
|
+
items: {
|
|
165
|
+
type: string;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
exclude: {
|
|
169
|
+
type: string;
|
|
170
|
+
items: {
|
|
171
|
+
type: string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
context: {
|
|
177
|
+
type: string;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
} | {
|
|
181
|
+
type: string;
|
|
182
|
+
items: {
|
|
183
|
+
type: string;
|
|
184
|
+
additionalProperties: {
|
|
185
|
+
type: string;
|
|
186
|
+
};
|
|
187
|
+
required: string[];
|
|
188
|
+
properties: {
|
|
189
|
+
name: {
|
|
190
|
+
type: string;
|
|
191
|
+
};
|
|
192
|
+
type: {
|
|
193
|
+
type: string;
|
|
194
|
+
};
|
|
195
|
+
counters: {
|
|
196
|
+
type: string;
|
|
197
|
+
additionalProperties: boolean;
|
|
198
|
+
required: never[];
|
|
199
|
+
properties: {
|
|
200
|
+
include: {
|
|
201
|
+
type: string;
|
|
202
|
+
items: {
|
|
203
|
+
type: string;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
exclude: {
|
|
207
|
+
type: string;
|
|
208
|
+
items: {
|
|
209
|
+
type: string;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
context: {
|
|
215
|
+
type: string;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
})[];
|
|
220
|
+
};
|
|
140
221
|
};
|
|
141
222
|
};
|
|
142
223
|
export declare const HeaderProperties: {
|
|
@@ -424,6 +505,87 @@ export declare const HeaderProperties: {
|
|
|
424
505
|
type: string;
|
|
425
506
|
})[];
|
|
426
507
|
};
|
|
508
|
+
fullscreen: {
|
|
509
|
+
type: string;
|
|
510
|
+
};
|
|
511
|
+
analyticsEvents: {
|
|
512
|
+
anyOf: ({
|
|
513
|
+
type: string;
|
|
514
|
+
additionalProperties: {
|
|
515
|
+
type: string;
|
|
516
|
+
};
|
|
517
|
+
required: string[];
|
|
518
|
+
properties: {
|
|
519
|
+
name: {
|
|
520
|
+
type: string;
|
|
521
|
+
};
|
|
522
|
+
type: {
|
|
523
|
+
type: string;
|
|
524
|
+
};
|
|
525
|
+
counters: {
|
|
526
|
+
type: string;
|
|
527
|
+
additionalProperties: boolean;
|
|
528
|
+
required: never[];
|
|
529
|
+
properties: {
|
|
530
|
+
include: {
|
|
531
|
+
type: string;
|
|
532
|
+
items: {
|
|
533
|
+
type: string;
|
|
534
|
+
};
|
|
535
|
+
};
|
|
536
|
+
exclude: {
|
|
537
|
+
type: string;
|
|
538
|
+
items: {
|
|
539
|
+
type: string;
|
|
540
|
+
};
|
|
541
|
+
};
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
context: {
|
|
545
|
+
type: string;
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
} | {
|
|
549
|
+
type: string;
|
|
550
|
+
items: {
|
|
551
|
+
type: string;
|
|
552
|
+
additionalProperties: {
|
|
553
|
+
type: string;
|
|
554
|
+
};
|
|
555
|
+
required: string[];
|
|
556
|
+
properties: {
|
|
557
|
+
name: {
|
|
558
|
+
type: string;
|
|
559
|
+
};
|
|
560
|
+
type: {
|
|
561
|
+
type: string;
|
|
562
|
+
};
|
|
563
|
+
counters: {
|
|
564
|
+
type: string;
|
|
565
|
+
additionalProperties: boolean;
|
|
566
|
+
required: never[];
|
|
567
|
+
properties: {
|
|
568
|
+
include: {
|
|
569
|
+
type: string;
|
|
570
|
+
items: {
|
|
571
|
+
type: string;
|
|
572
|
+
};
|
|
573
|
+
};
|
|
574
|
+
exclude: {
|
|
575
|
+
type: string;
|
|
576
|
+
items: {
|
|
577
|
+
type: string;
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
};
|
|
582
|
+
context: {
|
|
583
|
+
type: string;
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
})[];
|
|
588
|
+
};
|
|
427
589
|
};
|
|
428
590
|
} | {
|
|
429
591
|
type: string;
|
|
@@ -757,6 +919,87 @@ export declare const HeaderBlock: {
|
|
|
757
919
|
type: string;
|
|
758
920
|
})[];
|
|
759
921
|
};
|
|
922
|
+
fullscreen: {
|
|
923
|
+
type: string;
|
|
924
|
+
};
|
|
925
|
+
analyticsEvents: {
|
|
926
|
+
anyOf: ({
|
|
927
|
+
type: string;
|
|
928
|
+
additionalProperties: {
|
|
929
|
+
type: string;
|
|
930
|
+
};
|
|
931
|
+
required: string[];
|
|
932
|
+
properties: {
|
|
933
|
+
name: {
|
|
934
|
+
type: string;
|
|
935
|
+
};
|
|
936
|
+
type: {
|
|
937
|
+
type: string;
|
|
938
|
+
};
|
|
939
|
+
counters: {
|
|
940
|
+
type: string;
|
|
941
|
+
additionalProperties: boolean;
|
|
942
|
+
required: never[];
|
|
943
|
+
properties: {
|
|
944
|
+
include: {
|
|
945
|
+
type: string;
|
|
946
|
+
items: {
|
|
947
|
+
type: string;
|
|
948
|
+
};
|
|
949
|
+
};
|
|
950
|
+
exclude: {
|
|
951
|
+
type: string;
|
|
952
|
+
items: {
|
|
953
|
+
type: string;
|
|
954
|
+
};
|
|
955
|
+
};
|
|
956
|
+
};
|
|
957
|
+
};
|
|
958
|
+
context: {
|
|
959
|
+
type: string;
|
|
960
|
+
};
|
|
961
|
+
};
|
|
962
|
+
} | {
|
|
963
|
+
type: string;
|
|
964
|
+
items: {
|
|
965
|
+
type: string;
|
|
966
|
+
additionalProperties: {
|
|
967
|
+
type: string;
|
|
968
|
+
};
|
|
969
|
+
required: string[];
|
|
970
|
+
properties: {
|
|
971
|
+
name: {
|
|
972
|
+
type: string;
|
|
973
|
+
};
|
|
974
|
+
type: {
|
|
975
|
+
type: string;
|
|
976
|
+
};
|
|
977
|
+
counters: {
|
|
978
|
+
type: string;
|
|
979
|
+
additionalProperties: boolean;
|
|
980
|
+
required: never[];
|
|
981
|
+
properties: {
|
|
982
|
+
include: {
|
|
983
|
+
type: string;
|
|
984
|
+
items: {
|
|
985
|
+
type: string;
|
|
986
|
+
};
|
|
987
|
+
};
|
|
988
|
+
exclude: {
|
|
989
|
+
type: string;
|
|
990
|
+
items: {
|
|
991
|
+
type: string;
|
|
992
|
+
};
|
|
993
|
+
};
|
|
994
|
+
};
|
|
995
|
+
};
|
|
996
|
+
context: {
|
|
997
|
+
type: string;
|
|
998
|
+
};
|
|
999
|
+
};
|
|
1000
|
+
};
|
|
1001
|
+
})[];
|
|
1002
|
+
};
|
|
760
1003
|
};
|
|
761
1004
|
} | {
|
|
762
1005
|
type: string;
|
|
@@ -294,6 +294,87 @@ export declare const HeaderSliderBlock: {
|
|
|
294
294
|
type: string;
|
|
295
295
|
})[];
|
|
296
296
|
};
|
|
297
|
+
fullscreen: {
|
|
298
|
+
type: string;
|
|
299
|
+
};
|
|
300
|
+
analyticsEvents: {
|
|
301
|
+
anyOf: ({
|
|
302
|
+
type: string;
|
|
303
|
+
additionalProperties: {
|
|
304
|
+
type: string;
|
|
305
|
+
};
|
|
306
|
+
required: string[];
|
|
307
|
+
properties: {
|
|
308
|
+
name: {
|
|
309
|
+
type: string;
|
|
310
|
+
};
|
|
311
|
+
type: {
|
|
312
|
+
type: string;
|
|
313
|
+
};
|
|
314
|
+
counters: {
|
|
315
|
+
type: string;
|
|
316
|
+
additionalProperties: boolean;
|
|
317
|
+
required: never[];
|
|
318
|
+
properties: {
|
|
319
|
+
include: {
|
|
320
|
+
type: string;
|
|
321
|
+
items: {
|
|
322
|
+
type: string;
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
exclude: {
|
|
326
|
+
type: string;
|
|
327
|
+
items: {
|
|
328
|
+
type: string;
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
context: {
|
|
334
|
+
type: string;
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
} | {
|
|
338
|
+
type: string;
|
|
339
|
+
items: {
|
|
340
|
+
type: string;
|
|
341
|
+
additionalProperties: {
|
|
342
|
+
type: string;
|
|
343
|
+
};
|
|
344
|
+
required: string[];
|
|
345
|
+
properties: {
|
|
346
|
+
name: {
|
|
347
|
+
type: string;
|
|
348
|
+
};
|
|
349
|
+
type: {
|
|
350
|
+
type: string;
|
|
351
|
+
};
|
|
352
|
+
counters: {
|
|
353
|
+
type: string;
|
|
354
|
+
additionalProperties: boolean;
|
|
355
|
+
required: never[];
|
|
356
|
+
properties: {
|
|
357
|
+
include: {
|
|
358
|
+
type: string;
|
|
359
|
+
items: {
|
|
360
|
+
type: string;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
exclude: {
|
|
364
|
+
type: string;
|
|
365
|
+
items: {
|
|
366
|
+
type: string;
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
context: {
|
|
372
|
+
type: string;
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
})[];
|
|
377
|
+
};
|
|
297
378
|
};
|
|
298
379
|
} | {
|
|
299
380
|
type: string;
|
|
@@ -131,6 +131,87 @@ export declare const Media: {
|
|
|
131
131
|
type: string;
|
|
132
132
|
})[];
|
|
133
133
|
};
|
|
134
|
+
fullscreen: {
|
|
135
|
+
type: string;
|
|
136
|
+
};
|
|
137
|
+
analyticsEvents: {
|
|
138
|
+
anyOf: ({
|
|
139
|
+
type: string;
|
|
140
|
+
additionalProperties: {
|
|
141
|
+
type: string;
|
|
142
|
+
};
|
|
143
|
+
required: string[];
|
|
144
|
+
properties: {
|
|
145
|
+
name: {
|
|
146
|
+
type: string;
|
|
147
|
+
};
|
|
148
|
+
type: {
|
|
149
|
+
type: string;
|
|
150
|
+
};
|
|
151
|
+
counters: {
|
|
152
|
+
type: string;
|
|
153
|
+
additionalProperties: boolean;
|
|
154
|
+
required: never[];
|
|
155
|
+
properties: {
|
|
156
|
+
include: {
|
|
157
|
+
type: string;
|
|
158
|
+
items: {
|
|
159
|
+
type: string;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
exclude: {
|
|
163
|
+
type: string;
|
|
164
|
+
items: {
|
|
165
|
+
type: string;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
context: {
|
|
171
|
+
type: string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
} | {
|
|
175
|
+
type: string;
|
|
176
|
+
items: {
|
|
177
|
+
type: string;
|
|
178
|
+
additionalProperties: {
|
|
179
|
+
type: string;
|
|
180
|
+
};
|
|
181
|
+
required: string[];
|
|
182
|
+
properties: {
|
|
183
|
+
name: {
|
|
184
|
+
type: string;
|
|
185
|
+
};
|
|
186
|
+
type: {
|
|
187
|
+
type: string;
|
|
188
|
+
};
|
|
189
|
+
counters: {
|
|
190
|
+
type: string;
|
|
191
|
+
additionalProperties: boolean;
|
|
192
|
+
required: never[];
|
|
193
|
+
properties: {
|
|
194
|
+
include: {
|
|
195
|
+
type: string;
|
|
196
|
+
items: {
|
|
197
|
+
type: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
exclude: {
|
|
201
|
+
type: string;
|
|
202
|
+
items: {
|
|
203
|
+
type: string;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
context: {
|
|
209
|
+
type: string;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
})[];
|
|
214
|
+
};
|
|
134
215
|
};
|
|
135
216
|
};
|
|
136
217
|
export declare const MediaBlockBaseProps: {
|
|
@@ -608,6 +689,87 @@ export declare const MediaBlock: {
|
|
|
608
689
|
type: string;
|
|
609
690
|
})[];
|
|
610
691
|
};
|
|
692
|
+
fullscreen: {
|
|
693
|
+
type: string;
|
|
694
|
+
};
|
|
695
|
+
analyticsEvents: {
|
|
696
|
+
anyOf: ({
|
|
697
|
+
type: string;
|
|
698
|
+
additionalProperties: {
|
|
699
|
+
type: string;
|
|
700
|
+
};
|
|
701
|
+
required: string[];
|
|
702
|
+
properties: {
|
|
703
|
+
name: {
|
|
704
|
+
type: string;
|
|
705
|
+
};
|
|
706
|
+
type: {
|
|
707
|
+
type: string;
|
|
708
|
+
};
|
|
709
|
+
counters: {
|
|
710
|
+
type: string;
|
|
711
|
+
additionalProperties: boolean;
|
|
712
|
+
required: never[];
|
|
713
|
+
properties: {
|
|
714
|
+
include: {
|
|
715
|
+
type: string;
|
|
716
|
+
items: {
|
|
717
|
+
type: string;
|
|
718
|
+
};
|
|
719
|
+
};
|
|
720
|
+
exclude: {
|
|
721
|
+
type: string;
|
|
722
|
+
items: {
|
|
723
|
+
type: string;
|
|
724
|
+
};
|
|
725
|
+
};
|
|
726
|
+
};
|
|
727
|
+
};
|
|
728
|
+
context: {
|
|
729
|
+
type: string;
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
} | {
|
|
733
|
+
type: string;
|
|
734
|
+
items: {
|
|
735
|
+
type: string;
|
|
736
|
+
additionalProperties: {
|
|
737
|
+
type: string;
|
|
738
|
+
};
|
|
739
|
+
required: string[];
|
|
740
|
+
properties: {
|
|
741
|
+
name: {
|
|
742
|
+
type: string;
|
|
743
|
+
};
|
|
744
|
+
type: {
|
|
745
|
+
type: string;
|
|
746
|
+
};
|
|
747
|
+
counters: {
|
|
748
|
+
type: string;
|
|
749
|
+
additionalProperties: boolean;
|
|
750
|
+
required: never[];
|
|
751
|
+
properties: {
|
|
752
|
+
include: {
|
|
753
|
+
type: string;
|
|
754
|
+
items: {
|
|
755
|
+
type: string;
|
|
756
|
+
};
|
|
757
|
+
};
|
|
758
|
+
exclude: {
|
|
759
|
+
type: string;
|
|
760
|
+
items: {
|
|
761
|
+
type: string;
|
|
762
|
+
};
|
|
763
|
+
};
|
|
764
|
+
};
|
|
765
|
+
};
|
|
766
|
+
context: {
|
|
767
|
+
type: string;
|
|
768
|
+
};
|
|
769
|
+
};
|
|
770
|
+
};
|
|
771
|
+
})[];
|
|
772
|
+
};
|
|
611
773
|
};
|
|
612
774
|
};
|
|
613
775
|
description: {
|
|
@@ -146,6 +146,87 @@ export declare const PromoFeaturesItem: {
|
|
|
146
146
|
type: string;
|
|
147
147
|
})[];
|
|
148
148
|
};
|
|
149
|
+
fullscreen: {
|
|
150
|
+
type: string;
|
|
151
|
+
};
|
|
152
|
+
analyticsEvents: {
|
|
153
|
+
anyOf: ({
|
|
154
|
+
type: string;
|
|
155
|
+
additionalProperties: {
|
|
156
|
+
type: string;
|
|
157
|
+
};
|
|
158
|
+
required: string[];
|
|
159
|
+
properties: {
|
|
160
|
+
name: {
|
|
161
|
+
type: string;
|
|
162
|
+
};
|
|
163
|
+
type: {
|
|
164
|
+
type: string;
|
|
165
|
+
};
|
|
166
|
+
counters: {
|
|
167
|
+
type: string;
|
|
168
|
+
additionalProperties: boolean;
|
|
169
|
+
required: never[];
|
|
170
|
+
properties: {
|
|
171
|
+
include: {
|
|
172
|
+
type: string;
|
|
173
|
+
items: {
|
|
174
|
+
type: string;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
exclude: {
|
|
178
|
+
type: string;
|
|
179
|
+
items: {
|
|
180
|
+
type: string;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
context: {
|
|
186
|
+
type: string;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
} | {
|
|
190
|
+
type: string;
|
|
191
|
+
items: {
|
|
192
|
+
type: string;
|
|
193
|
+
additionalProperties: {
|
|
194
|
+
type: string;
|
|
195
|
+
};
|
|
196
|
+
required: string[];
|
|
197
|
+
properties: {
|
|
198
|
+
name: {
|
|
199
|
+
type: string;
|
|
200
|
+
};
|
|
201
|
+
type: {
|
|
202
|
+
type: string;
|
|
203
|
+
};
|
|
204
|
+
counters: {
|
|
205
|
+
type: string;
|
|
206
|
+
additionalProperties: boolean;
|
|
207
|
+
required: never[];
|
|
208
|
+
properties: {
|
|
209
|
+
include: {
|
|
210
|
+
type: string;
|
|
211
|
+
items: {
|
|
212
|
+
type: string;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
exclude: {
|
|
216
|
+
type: string;
|
|
217
|
+
items: {
|
|
218
|
+
type: string;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
context: {
|
|
224
|
+
type: string;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
})[];
|
|
229
|
+
};
|
|
149
230
|
};
|
|
150
231
|
};
|
|
151
232
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';
|
|
1
|
+
import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import _ from 'lodash';
|
|
3
3
|
import SlickSlider from 'react-slick';
|
|
4
4
|
import Anchor from '../../components/Anchor/Anchor';
|
|
@@ -25,7 +25,7 @@ export const SliderBlock = (props) => {
|
|
|
25
25
|
const { isServer } = useContext(SSRContext);
|
|
26
26
|
const isMobile = useContext(MobileContext);
|
|
27
27
|
const [breakpoint, setBreakpoint] = useState(BREAKPOINTS.xl);
|
|
28
|
-
const
|
|
28
|
+
const disclosedChildren = useMemo(() => discloseAllNestedChildren(children), [children]);
|
|
29
29
|
const childrenCount = disclosedChildren.length;
|
|
30
30
|
const [slidesToShow] = useState(getSlidesToShowWithDefaults({
|
|
31
31
|
contentLength: childrenCount,
|