@gravity-ui/page-constructor 8.9.0 → 8.11.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/build/cjs/blocks/CardLayout/schema.d.ts +22 -4
- package/build/cjs/blocks/ContentLayout/schema.d.ts +11 -2
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +11 -2
- package/build/cjs/blocks/FilterBlock/schema.d.ts +22 -4
- package/build/cjs/blocks/FoldableList/schema.d.ts +11 -2
- package/build/cjs/blocks/Form/schema.d.ts +11 -2
- package/build/cjs/blocks/Header/schema.d.ts +11 -2
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +14 -5
- package/build/cjs/blocks/Hero/schema.d.ts +19 -10
- package/build/cjs/blocks/Icons/schema.d.ts +22 -4
- package/build/cjs/blocks/Map/schema.d.ts +11 -2
- package/build/cjs/blocks/Media/schema.d.ts +22 -4
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +11 -2
- package/build/cjs/blocks/Questions/schema.d.ts +11 -2
- package/build/cjs/blocks/Slider/schema.d.ts +11 -2
- package/build/cjs/blocks/SliderOld/schema.d.ts +11 -2
- package/build/cjs/blocks/Table/schema.d.ts +11 -2
- package/build/cjs/blocks/Tabs/schema.d.ts +11 -2
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +6 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js.map +1 -1
- package/build/cjs/grid/types.d.ts +1 -1
- package/build/cjs/grid/types.js.map +1 -1
- package/build/cjs/grid/utils.d.ts +1 -0
- package/build/cjs/grid/utils.js +36 -1
- package/build/cjs/grid/utils.js.map +1 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +1 -1
- package/build/cjs/models/constructor-items/blocks.js.map +1 -1
- package/build/cjs/models/constructor.d.ts +2 -1
- package/build/cjs/models/constructor.js.map +1 -1
- package/build/cjs/schema/constants.d.ts +9 -9
- package/build/cjs/schema/validators/common.d.ts +11 -2
- package/build/cjs/schema/validators/common.js +11 -2
- package/build/cjs/schema/validators/common.js.map +1 -1
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +5 -5
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +4 -4
- package/build/cjs/text-transform/transformers.js +2 -1
- package/build/cjs/text-transform/transformers.js.map +1 -1
- package/build/esm/blocks/CardLayout/schema.d.ts +22 -4
- package/build/esm/blocks/ContentLayout/schema.d.ts +11 -2
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +11 -2
- package/build/esm/blocks/FilterBlock/schema.d.ts +22 -4
- package/build/esm/blocks/FoldableList/schema.d.ts +11 -2
- package/build/esm/blocks/Form/schema.d.ts +11 -2
- package/build/esm/blocks/Header/schema.d.ts +11 -2
- package/build/esm/blocks/HeaderSlider/schema.d.ts +14 -5
- package/build/esm/blocks/Hero/schema.d.ts +19 -10
- package/build/esm/blocks/Icons/schema.d.ts +22 -4
- package/build/esm/blocks/Map/schema.d.ts +11 -2
- package/build/esm/blocks/Media/schema.d.ts +22 -4
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +11 -2
- package/build/esm/blocks/Questions/schema.d.ts +11 -2
- package/build/esm/blocks/Slider/schema.d.ts +11 -2
- package/build/esm/blocks/SliderOld/schema.d.ts +11 -2
- package/build/esm/blocks/Table/schema.d.ts +11 -2
- package/build/esm/blocks/Tabs/schema.d.ts +11 -2
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +6 -1
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js.map +1 -1
- package/build/esm/grid/types.d.ts +1 -1
- package/build/esm/grid/types.js.map +1 -1
- package/build/esm/grid/utils.d.ts +1 -0
- package/build/esm/grid/utils.js +35 -1
- package/build/esm/grid/utils.js.map +1 -1
- package/build/esm/models/constructor-items/blocks.d.ts +1 -1
- package/build/esm/models/constructor-items/blocks.js.map +1 -1
- package/build/esm/models/constructor.d.ts +2 -1
- package/build/esm/models/constructor.js.map +1 -1
- package/build/esm/schema/constants.d.ts +9 -9
- package/build/esm/schema/validators/common.d.ts +11 -2
- package/build/esm/schema/validators/common.js +11 -2
- package/build/esm/schema/validators/common.js.map +1 -1
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +5 -5
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +4 -4
- package/build/esm/text-transform/transformers.js +2 -1
- package/build/esm/text-transform/transformers.js.map +1 -1
- package/package.json +2 -2
- package/schema/index.js +1 -1
- package/server/grid/types.d.ts +1 -1
- package/server/models/constructor-items/blocks.d.ts +1 -1
- package/server/models/constructor.d.ts +2 -1
- package/server/text-transform/transformers.js +2 -1
|
@@ -274,8 +274,17 @@ export declare const CardLayoutProps: {
|
|
|
274
274
|
};
|
|
275
275
|
};
|
|
276
276
|
visible: {
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
oneOf: ({
|
|
278
|
+
type: string;
|
|
279
|
+
enum: string[];
|
|
280
|
+
additionalProperties?: undefined;
|
|
281
|
+
properties?: undefined;
|
|
282
|
+
} | {
|
|
283
|
+
type: string;
|
|
284
|
+
additionalProperties: boolean;
|
|
285
|
+
properties: {};
|
|
286
|
+
enum?: undefined;
|
|
287
|
+
})[];
|
|
279
288
|
};
|
|
280
289
|
resetPaddings: {
|
|
281
290
|
type: string;
|
|
@@ -578,8 +587,17 @@ export declare const CardLayoutBlock: {
|
|
|
578
587
|
};
|
|
579
588
|
};
|
|
580
589
|
visible: {
|
|
581
|
-
|
|
582
|
-
|
|
590
|
+
oneOf: ({
|
|
591
|
+
type: string;
|
|
592
|
+
enum: string[];
|
|
593
|
+
additionalProperties?: undefined;
|
|
594
|
+
properties?: undefined;
|
|
595
|
+
} | {
|
|
596
|
+
type: string;
|
|
597
|
+
additionalProperties: boolean;
|
|
598
|
+
properties: {};
|
|
599
|
+
enum?: undefined;
|
|
600
|
+
})[];
|
|
583
601
|
};
|
|
584
602
|
resetPaddings: {
|
|
585
603
|
type: string;
|
|
@@ -477,8 +477,17 @@ export declare const ContentLayoutBlock: {
|
|
|
477
477
|
};
|
|
478
478
|
};
|
|
479
479
|
visible: {
|
|
480
|
-
|
|
481
|
-
|
|
480
|
+
oneOf: ({
|
|
481
|
+
type: string;
|
|
482
|
+
enum: string[];
|
|
483
|
+
additionalProperties?: undefined;
|
|
484
|
+
properties?: undefined;
|
|
485
|
+
} | {
|
|
486
|
+
type: string;
|
|
487
|
+
additionalProperties: boolean;
|
|
488
|
+
properties: {};
|
|
489
|
+
enum?: undefined;
|
|
490
|
+
})[];
|
|
482
491
|
};
|
|
483
492
|
resetPaddings: {
|
|
484
493
|
type: string;
|
|
@@ -325,8 +325,17 @@ export declare const ExtendedFeaturesBlock: {
|
|
|
325
325
|
};
|
|
326
326
|
};
|
|
327
327
|
visible: {
|
|
328
|
-
|
|
329
|
-
|
|
328
|
+
oneOf: ({
|
|
329
|
+
type: string;
|
|
330
|
+
enum: string[];
|
|
331
|
+
additionalProperties?: undefined;
|
|
332
|
+
properties?: undefined;
|
|
333
|
+
} | {
|
|
334
|
+
type: string;
|
|
335
|
+
additionalProperties: boolean;
|
|
336
|
+
properties: {};
|
|
337
|
+
enum?: undefined;
|
|
338
|
+
})[];
|
|
330
339
|
};
|
|
331
340
|
resetPaddings: {
|
|
332
341
|
type: string;
|
|
@@ -291,8 +291,17 @@ export declare const FilterProps: {
|
|
|
291
291
|
};
|
|
292
292
|
};
|
|
293
293
|
visible: {
|
|
294
|
-
|
|
295
|
-
|
|
294
|
+
oneOf: ({
|
|
295
|
+
type: string;
|
|
296
|
+
enum: string[];
|
|
297
|
+
additionalProperties?: undefined;
|
|
298
|
+
properties?: undefined;
|
|
299
|
+
} | {
|
|
300
|
+
type: string;
|
|
301
|
+
additionalProperties: boolean;
|
|
302
|
+
properties: {};
|
|
303
|
+
enum?: undefined;
|
|
304
|
+
})[];
|
|
296
305
|
};
|
|
297
306
|
resetPaddings: {
|
|
298
307
|
type: string;
|
|
@@ -547,8 +556,17 @@ export declare const FilterBlock: {
|
|
|
547
556
|
};
|
|
548
557
|
};
|
|
549
558
|
visible: {
|
|
550
|
-
|
|
551
|
-
|
|
559
|
+
oneOf: ({
|
|
560
|
+
type: string;
|
|
561
|
+
enum: string[];
|
|
562
|
+
additionalProperties?: undefined;
|
|
563
|
+
properties?: undefined;
|
|
564
|
+
} | {
|
|
565
|
+
type: string;
|
|
566
|
+
additionalProperties: boolean;
|
|
567
|
+
properties: {};
|
|
568
|
+
enum?: undefined;
|
|
569
|
+
})[];
|
|
552
570
|
};
|
|
553
571
|
resetPaddings: {
|
|
554
572
|
type: string;
|
|
@@ -188,8 +188,17 @@ export declare const FoldableListBlock: {
|
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
190
|
visible: {
|
|
191
|
-
|
|
192
|
-
|
|
191
|
+
oneOf: ({
|
|
192
|
+
type: string;
|
|
193
|
+
enum: string[];
|
|
194
|
+
additionalProperties?: undefined;
|
|
195
|
+
properties?: undefined;
|
|
196
|
+
} | {
|
|
197
|
+
type: string;
|
|
198
|
+
additionalProperties: boolean;
|
|
199
|
+
properties: {};
|
|
200
|
+
enum?: undefined;
|
|
201
|
+
})[];
|
|
193
202
|
};
|
|
194
203
|
resetPaddings: {
|
|
195
204
|
type: string;
|
|
@@ -296,8 +296,17 @@ export declare const FormBlock: {
|
|
|
296
296
|
};
|
|
297
297
|
};
|
|
298
298
|
visible: {
|
|
299
|
-
|
|
300
|
-
|
|
299
|
+
oneOf: ({
|
|
300
|
+
type: string;
|
|
301
|
+
enum: string[];
|
|
302
|
+
additionalProperties?: undefined;
|
|
303
|
+
properties?: undefined;
|
|
304
|
+
} | {
|
|
305
|
+
type: string;
|
|
306
|
+
additionalProperties: boolean;
|
|
307
|
+
properties: {};
|
|
308
|
+
enum?: undefined;
|
|
309
|
+
})[];
|
|
301
310
|
};
|
|
302
311
|
resetPaddings: {
|
|
303
312
|
type: string;
|
|
@@ -1551,8 +1551,17 @@ export declare const HeaderBlock: {
|
|
|
1551
1551
|
};
|
|
1552
1552
|
};
|
|
1553
1553
|
visible: {
|
|
1554
|
-
|
|
1555
|
-
|
|
1554
|
+
oneOf: ({
|
|
1555
|
+
type: string;
|
|
1556
|
+
enum: string[];
|
|
1557
|
+
additionalProperties?: undefined;
|
|
1558
|
+
properties?: undefined;
|
|
1559
|
+
} | {
|
|
1560
|
+
type: string;
|
|
1561
|
+
additionalProperties: boolean;
|
|
1562
|
+
properties: {};
|
|
1563
|
+
enum?: undefined;
|
|
1564
|
+
})[];
|
|
1556
1565
|
};
|
|
1557
1566
|
resetPaddings: {
|
|
1558
1567
|
type: string;
|
|
@@ -608,9 +608,6 @@ export declare const HeaderSliderBlock: {
|
|
|
608
608
|
};
|
|
609
609
|
};
|
|
610
610
|
};
|
|
611
|
-
type: {
|
|
612
|
-
type: string;
|
|
613
|
-
};
|
|
614
611
|
dots: {
|
|
615
612
|
type: string;
|
|
616
613
|
};
|
|
@@ -656,6 +653,9 @@ export declare const HeaderSliderBlock: {
|
|
|
656
653
|
animated: {
|
|
657
654
|
type: string;
|
|
658
655
|
};
|
|
656
|
+
type: {
|
|
657
|
+
type: string;
|
|
658
|
+
};
|
|
659
659
|
arrowSize: {
|
|
660
660
|
type: string;
|
|
661
661
|
};
|
|
@@ -677,8 +677,17 @@ export declare const HeaderSliderBlock: {
|
|
|
677
677
|
};
|
|
678
678
|
};
|
|
679
679
|
visible: {
|
|
680
|
-
|
|
681
|
-
|
|
680
|
+
oneOf: ({
|
|
681
|
+
type: string;
|
|
682
|
+
enum: string[];
|
|
683
|
+
additionalProperties?: undefined;
|
|
684
|
+
properties?: undefined;
|
|
685
|
+
} | {
|
|
686
|
+
type: string;
|
|
687
|
+
additionalProperties: boolean;
|
|
688
|
+
properties: {};
|
|
689
|
+
enum?: undefined;
|
|
690
|
+
})[];
|
|
682
691
|
};
|
|
683
692
|
resetPaddings: {
|
|
684
693
|
type: string;
|
|
@@ -1135,15 +1135,15 @@ export declare const HeroBlockProps: {
|
|
|
1135
1135
|
contentType?: undefined;
|
|
1136
1136
|
})[];
|
|
1137
1137
|
};
|
|
1138
|
+
theme: {
|
|
1139
|
+
type: string;
|
|
1140
|
+
enum: string[];
|
|
1141
|
+
};
|
|
1138
1142
|
text: {
|
|
1139
1143
|
type: string;
|
|
1140
1144
|
contentType: string;
|
|
1141
1145
|
inputType: string;
|
|
1142
1146
|
};
|
|
1143
|
-
theme: {
|
|
1144
|
-
type: string;
|
|
1145
|
-
enum: string[];
|
|
1146
|
-
};
|
|
1147
1147
|
additionalInfo: {
|
|
1148
1148
|
type: string;
|
|
1149
1149
|
contentType: string;
|
|
@@ -1993,15 +1993,15 @@ export declare const HeroBlock: {
|
|
|
1993
1993
|
contentType?: undefined;
|
|
1994
1994
|
})[];
|
|
1995
1995
|
};
|
|
1996
|
+
theme: {
|
|
1997
|
+
type: string;
|
|
1998
|
+
enum: string[];
|
|
1999
|
+
};
|
|
1996
2000
|
text: {
|
|
1997
2001
|
type: string;
|
|
1998
2002
|
contentType: string;
|
|
1999
2003
|
inputType: string;
|
|
2000
2004
|
};
|
|
2001
|
-
theme: {
|
|
2002
|
-
type: string;
|
|
2003
|
-
enum: string[];
|
|
2004
|
-
};
|
|
2005
2005
|
additionalInfo: {
|
|
2006
2006
|
type: string;
|
|
2007
2007
|
contentType: string;
|
|
@@ -2046,8 +2046,17 @@ export declare const HeroBlock: {
|
|
|
2046
2046
|
};
|
|
2047
2047
|
};
|
|
2048
2048
|
visible: {
|
|
2049
|
-
|
|
2050
|
-
|
|
2049
|
+
oneOf: ({
|
|
2050
|
+
type: string;
|
|
2051
|
+
enum: string[];
|
|
2052
|
+
additionalProperties?: undefined;
|
|
2053
|
+
properties?: undefined;
|
|
2054
|
+
} | {
|
|
2055
|
+
type: string;
|
|
2056
|
+
additionalProperties: boolean;
|
|
2057
|
+
properties: {};
|
|
2058
|
+
enum?: undefined;
|
|
2059
|
+
})[];
|
|
2051
2060
|
};
|
|
2052
2061
|
resetPaddings: {
|
|
2053
2062
|
type: string;
|
|
@@ -142,8 +142,17 @@ export declare const IconsProps: {
|
|
|
142
142
|
};
|
|
143
143
|
};
|
|
144
144
|
visible: {
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
oneOf: ({
|
|
146
|
+
type: string;
|
|
147
|
+
enum: string[];
|
|
148
|
+
additionalProperties?: undefined;
|
|
149
|
+
properties?: undefined;
|
|
150
|
+
} | {
|
|
151
|
+
type: string;
|
|
152
|
+
additionalProperties: boolean;
|
|
153
|
+
properties: {};
|
|
154
|
+
enum?: undefined;
|
|
155
|
+
})[];
|
|
147
156
|
};
|
|
148
157
|
resetPaddings: {
|
|
149
158
|
type: string;
|
|
@@ -314,8 +323,17 @@ export declare const IconsBlock: {
|
|
|
314
323
|
};
|
|
315
324
|
};
|
|
316
325
|
visible: {
|
|
317
|
-
|
|
318
|
-
|
|
326
|
+
oneOf: ({
|
|
327
|
+
type: string;
|
|
328
|
+
enum: string[];
|
|
329
|
+
additionalProperties?: undefined;
|
|
330
|
+
properties?: undefined;
|
|
331
|
+
} | {
|
|
332
|
+
type: string;
|
|
333
|
+
additionalProperties: boolean;
|
|
334
|
+
properties: {};
|
|
335
|
+
enum?: undefined;
|
|
336
|
+
})[];
|
|
319
337
|
};
|
|
320
338
|
resetPaddings: {
|
|
321
339
|
type: string;
|
|
@@ -561,8 +561,17 @@ export declare const MapBlock: {
|
|
|
561
561
|
};
|
|
562
562
|
};
|
|
563
563
|
visible: {
|
|
564
|
-
|
|
565
|
-
|
|
564
|
+
oneOf: ({
|
|
565
|
+
type: string;
|
|
566
|
+
enum: string[];
|
|
567
|
+
additionalProperties?: undefined;
|
|
568
|
+
properties?: undefined;
|
|
569
|
+
} | {
|
|
570
|
+
type: string;
|
|
571
|
+
additionalProperties: boolean;
|
|
572
|
+
properties: {};
|
|
573
|
+
enum?: undefined;
|
|
574
|
+
})[];
|
|
566
575
|
};
|
|
567
576
|
resetPaddings: {
|
|
568
577
|
type: string;
|
|
@@ -677,8 +677,17 @@ export declare const MediaBlockBaseProps: {
|
|
|
677
677
|
};
|
|
678
678
|
};
|
|
679
679
|
visible: {
|
|
680
|
-
|
|
681
|
-
|
|
680
|
+
oneOf: ({
|
|
681
|
+
type: string;
|
|
682
|
+
enum: string[];
|
|
683
|
+
additionalProperties?: undefined;
|
|
684
|
+
properties?: undefined;
|
|
685
|
+
} | {
|
|
686
|
+
type: string;
|
|
687
|
+
additionalProperties: boolean;
|
|
688
|
+
properties: {};
|
|
689
|
+
enum?: undefined;
|
|
690
|
+
})[];
|
|
682
691
|
};
|
|
683
692
|
resetPaddings: {
|
|
684
693
|
type: string;
|
|
@@ -1396,8 +1405,17 @@ export declare const MediaBlock: {
|
|
|
1396
1405
|
};
|
|
1397
1406
|
};
|
|
1398
1407
|
visible: {
|
|
1399
|
-
|
|
1400
|
-
|
|
1408
|
+
oneOf: ({
|
|
1409
|
+
type: string;
|
|
1410
|
+
enum: string[];
|
|
1411
|
+
additionalProperties?: undefined;
|
|
1412
|
+
properties?: undefined;
|
|
1413
|
+
} | {
|
|
1414
|
+
type: string;
|
|
1415
|
+
additionalProperties: boolean;
|
|
1416
|
+
properties: {};
|
|
1417
|
+
enum?: undefined;
|
|
1418
|
+
})[];
|
|
1401
1419
|
};
|
|
1402
1420
|
resetPaddings: {
|
|
1403
1421
|
type: string;
|
|
@@ -482,8 +482,17 @@ export declare const PromoFeaturesBlock: {
|
|
|
482
482
|
};
|
|
483
483
|
};
|
|
484
484
|
visible: {
|
|
485
|
-
|
|
486
|
-
|
|
485
|
+
oneOf: ({
|
|
486
|
+
type: string;
|
|
487
|
+
enum: string[];
|
|
488
|
+
additionalProperties?: undefined;
|
|
489
|
+
properties?: undefined;
|
|
490
|
+
} | {
|
|
491
|
+
type: string;
|
|
492
|
+
additionalProperties: boolean;
|
|
493
|
+
properties: {};
|
|
494
|
+
enum?: undefined;
|
|
495
|
+
})[];
|
|
487
496
|
};
|
|
488
497
|
resetPaddings: {
|
|
489
498
|
type: string;
|
|
@@ -188,8 +188,17 @@ export declare const QuestionsBlock: {
|
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
190
|
visible: {
|
|
191
|
-
|
|
192
|
-
|
|
191
|
+
oneOf: ({
|
|
192
|
+
type: string;
|
|
193
|
+
enum: string[];
|
|
194
|
+
additionalProperties?: undefined;
|
|
195
|
+
properties?: undefined;
|
|
196
|
+
} | {
|
|
197
|
+
type: string;
|
|
198
|
+
additionalProperties: boolean;
|
|
199
|
+
properties: {};
|
|
200
|
+
enum?: undefined;
|
|
201
|
+
})[];
|
|
193
202
|
};
|
|
194
203
|
resetPaddings: {
|
|
195
204
|
type: string;
|
|
@@ -316,8 +316,17 @@ export declare const SliderBlock: {
|
|
|
316
316
|
};
|
|
317
317
|
};
|
|
318
318
|
visible: {
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
oneOf: ({
|
|
320
|
+
type: string;
|
|
321
|
+
enum: string[];
|
|
322
|
+
additionalProperties?: undefined;
|
|
323
|
+
properties?: undefined;
|
|
324
|
+
} | {
|
|
325
|
+
type: string;
|
|
326
|
+
additionalProperties: boolean;
|
|
327
|
+
properties: {};
|
|
328
|
+
enum?: undefined;
|
|
329
|
+
})[];
|
|
321
330
|
};
|
|
322
331
|
resetPaddings: {
|
|
323
332
|
type: string;
|
|
@@ -299,8 +299,17 @@ export declare const SliderOldBlock: {
|
|
|
299
299
|
};
|
|
300
300
|
};
|
|
301
301
|
visible: {
|
|
302
|
-
|
|
303
|
-
|
|
302
|
+
oneOf: ({
|
|
303
|
+
type: string;
|
|
304
|
+
enum: string[];
|
|
305
|
+
additionalProperties?: undefined;
|
|
306
|
+
properties?: undefined;
|
|
307
|
+
} | {
|
|
308
|
+
type: string;
|
|
309
|
+
additionalProperties: boolean;
|
|
310
|
+
properties: {};
|
|
311
|
+
enum?: undefined;
|
|
312
|
+
})[];
|
|
304
313
|
};
|
|
305
314
|
resetPaddings: {
|
|
306
315
|
type: string;
|
|
@@ -72,8 +72,17 @@ export declare const TableBlock: {
|
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
74
|
visible: {
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
oneOf: ({
|
|
76
|
+
type: string;
|
|
77
|
+
enum: string[];
|
|
78
|
+
additionalProperties?: undefined;
|
|
79
|
+
properties?: undefined;
|
|
80
|
+
} | {
|
|
81
|
+
type: string;
|
|
82
|
+
additionalProperties: boolean;
|
|
83
|
+
properties: {};
|
|
84
|
+
enum?: undefined;
|
|
85
|
+
})[];
|
|
77
86
|
};
|
|
78
87
|
resetPaddings: {
|
|
79
88
|
type: string;
|
|
@@ -814,8 +814,17 @@ export declare const TabsBlock: {
|
|
|
814
814
|
};
|
|
815
815
|
};
|
|
816
816
|
visible: {
|
|
817
|
-
|
|
818
|
-
|
|
817
|
+
oneOf: ({
|
|
818
|
+
type: string;
|
|
819
|
+
enum: string[];
|
|
820
|
+
additionalProperties?: undefined;
|
|
821
|
+
properties?: undefined;
|
|
822
|
+
} | {
|
|
823
|
+
type: string;
|
|
824
|
+
additionalProperties: boolean;
|
|
825
|
+
properties: {};
|
|
826
|
+
enum?: undefined;
|
|
827
|
+
})[];
|
|
819
828
|
};
|
|
820
829
|
resetPaddings: {
|
|
821
830
|
type: string;
|
|
@@ -7,6 +7,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
7
7
|
const blockIdContext_1 = require("../../../../context/blockIdContext/index.js");
|
|
8
8
|
const innerContext_1 = require("../../../../context/innerContext/index.js");
|
|
9
9
|
const BlockDecoration_1 = require("../../../../customization/BlockDecoration.js");
|
|
10
|
+
const utils_1 = require("../../../../grid/utils.js");
|
|
10
11
|
const ConstructorItem = ({ data, blockKey, children, }) => {
|
|
11
12
|
const { itemMap } = React.useContext(innerContext_1.InnerContext);
|
|
12
13
|
const { type, ...rest } = data;
|
|
@@ -14,6 +15,10 @@ const ConstructorItem = ({ data, blockKey, children, }) => {
|
|
|
14
15
|
return ((0, jsx_runtime_1.jsx)(blockIdContext_1.BlockIdContext.Provider, { value: blockKey, children: (0, jsx_runtime_1.jsx)(Component, { ...rest, children: children }) }));
|
|
15
16
|
};
|
|
16
17
|
exports.ConstructorItem = ConstructorItem;
|
|
17
|
-
const ConstructorHeader = ({ data, blockKey, }) =>
|
|
18
|
+
const ConstructorHeader = ({ data, blockKey, }) => {
|
|
19
|
+
const { visible } = data;
|
|
20
|
+
const visibilityClasses = visible ? (0, utils_1.getVisibleClasses)(visible) : '';
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: visibilityClasses, children: (0, jsx_runtime_1.jsx)(BlockDecoration_1.BlockDecoration, { type: data.type, children: (0, jsx_runtime_1.jsx)(exports.ConstructorItem, { data: data, blockKey: blockKey }, data.type) }) }));
|
|
22
|
+
};
|
|
18
23
|
exports.ConstructorHeader = ConstructorHeader;
|
|
19
24
|
//# sourceMappingURL=ConstructorItem.js.map
|
package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConstructorItem.js","sourceRoot":"../../../../../../src","sources":["containers/PageConstructor/components/ConstructorItem/ConstructorItem.tsx"],"names":[],"mappings":";;;;;AAAA,qDAA+B;AAE/B,gFAAkE;AAClE,4EAA8D;AAC9D,kFAA0E;
|
|
1
|
+
{"version":3,"file":"ConstructorItem.js","sourceRoot":"../../../../../../src","sources":["containers/PageConstructor/components/ConstructorItem/ConstructorItem.tsx"],"names":[],"mappings":";;;;;AAAA,qDAA+B;AAE/B,gFAAkE;AAClE,4EAA8D;AAC9D,kFAA0E;AAC1E,qDAAyD;AAQlD,MAAM,eAAe,GAAG,CAAC,EAC5B,IAAI,EACJ,QAAQ,EACR,QAAQ,GACoC,EAAE,EAAE;IAChD,MAAM,EAAC,OAAO,EAAC,GAAG,KAAK,CAAC,UAAU,CAAC,2BAAY,CAAC,CAAC;IACjD,MAAM,EAAC,IAAI,EAAE,GAAG,IAAI,EAAC,GAAG,IAAI,CAAC;IAE7B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAE7B,CAAC;IAEF,OAAO,CACH,uBAAC,+BAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,YACpC,uBAAC,SAAS,OAAK,IAAI,YAAG,QAAQ,GAAa,GACrB,CAC7B,CAAC;AACN,CAAC,CAAC;AAjBW,QAAA,eAAe,mBAiB1B;AAEK,MAAM,iBAAiB,GAAG,CAAC,EAC9B,IAAI,EACJ,QAAQ,GACsC,EAAE,EAAE;IAClD,MAAM,EAAC,OAAO,EAAC,GAAG,IAAI,CAAC;IAEvB,MAAM,iBAAiB,GAAG,OAAO,CAAC,CAAC,CAAC,IAAA,yBAAiB,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEpE,OAAO,CACH,gCAAK,SAAS,EAAE,iBAAiB,YAC7B,uBAAC,iCAAe,IAAC,IAAI,EAAE,IAAI,CAAC,IAAiB,YACzC,uBAAC,uBAAe,IAAC,IAAI,EAAE,IAAI,EAAkB,QAAQ,EAAE,QAAQ,IAA7B,IAAI,CAAC,IAAI,CAAwB,GACrD,GAChB,CACT,CAAC;AACN,CAAC,CAAC;AAfW,QAAA,iBAAiB,qBAe5B","sourcesContent":["import * as React from 'react';\n\nimport {BlockIdContext} from '../../../../context/blockIdContext';\nimport {InnerContext} from '../../../../context/innerContext';\nimport {BlockDecoration} from '../../../../customization/BlockDecoration';\nimport {getVisibleClasses} from '../../../../grid/utils';\nimport {BlockType, ConstructorBlock} from '../../../../models';\n\nexport interface ConstructorItemProps {\n data: ConstructorBlock;\n blockKey: string;\n}\n\nexport const ConstructorItem = ({\n data,\n blockKey,\n children,\n}: React.PropsWithChildren<ConstructorItemProps>) => {\n const {itemMap} = React.useContext(InnerContext);\n const {type, ...rest} = data;\n\n const Component = itemMap[type] as React.ComponentType<\n React.ComponentProps<(typeof itemMap)[typeof type]>\n >;\n\n return (\n <BlockIdContext.Provider value={blockKey}>\n <Component {...rest}>{children}</Component>\n </BlockIdContext.Provider>\n );\n};\n\nexport const ConstructorHeader = ({\n data,\n blockKey,\n}: Pick<ConstructorItemProps, 'data' | 'blockKey'>) => {\n const {visible} = data;\n\n const visibilityClasses = visible ? getVisibleClasses(visible) : '';\n\n return (\n <div className={visibilityClasses}>\n <BlockDecoration type={data.type as BlockType}>\n <ConstructorItem data={data} key={data.type} blockKey={blockKey} />\n </BlockDecoration>\n </div>\n );\n};\n"]}
|
|
@@ -43,7 +43,7 @@ export interface GridColumnClassParams {
|
|
|
43
43
|
offsets?: GridColumnSizesType;
|
|
44
44
|
orders?: GridColumnOrderSizesType;
|
|
45
45
|
hidden?: GridColumnSize;
|
|
46
|
-
visible?: GridColumnSize
|
|
46
|
+
visible?: GridColumnSize | Partial<Record<GridColumnSize, boolean>>;
|
|
47
47
|
alignSelf?: GridColumnAlignSelf;
|
|
48
48
|
justifyContent?: GridJustifyContent;
|
|
49
49
|
reset?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"../../../src","sources":["grid/types.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC1B,qDAA+B,CAAA;IAC/B,uDAAiC,CAAA;IACjC,iDAA2B,CAAA;IAC3B,uDAAiC,CAAA;IACjC,yDAAmC,CAAA;AACvC,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B;AAED,IAAY,cAIX;AAJD,WAAY,cAAc;IACtB,6CAA2B,CAAA;IAC3B,+CAA6B,CAAA;IAC7B,yCAAuB,CAAA;AAC3B,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB;AAED,IAAY,cAMX;AAND,WAAY,cAAc;IACtB,2BAAS,CAAA;IACT,2BAAS,CAAA;IACT,2BAAS,CAAA;IACT,2BAAS,CAAA;IACT,6BAAW,CAAA;AACf,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB;AAED,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC3B,iDAA0B,CAAA;IAC1B,mDAA4B,CAAA;IAC5B,6CAAsB,CAAA;AAC1B,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B;AAED,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC7B,oCAAW,CAAA;IACX,0CAAiB,CAAA;IACjB,wCAAe,CAAA;AACnB,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC;AAED,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACjC,0CAAa,CAAA;IACb,4CAAe,CAAA;AACnB,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC;AAED,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAC9B,yCAAe,CAAA;IACf,uCAAa,CAAA;AACjB,CAAC,EAHW,sBAAsB,sCAAtB,sBAAsB,QAGjC","sourcesContent":["export enum GridJustifyContent {\n Start = 'justify-content-start',\n Center = 'justify-content-center',\n End = 'justify-content-end',\n Around = 'justify-content-around',\n Between = 'justify-content-between',\n}\n\nexport enum GridAlignItems {\n Start = 'align-items-start',\n Center = 'align-items-center',\n End = 'align-items-end',\n}\n\nexport enum GridColumnSize {\n Sm = 'sm',\n Md = 'md',\n Lg = 'lg',\n Xl = 'xl',\n All = 'all',\n}\n\nexport enum GridColumnAlignSelf {\n Start = 'align-self-start',\n Center = 'align-self-center',\n End = 'align-self-end',\n}\n\nexport enum GridColumnClassPrefix {\n Col = 'col',\n Offset = 'offset',\n Order = 'order',\n}\n\nexport enum GridColumnVisibilityClass {\n None = 'none',\n Block = 'block',\n}\n\nexport enum GridColumnOrderClasses {\n First = 'first',\n Last = 'last',\n}\n\nexport type GridColumnSizesType = Partial<Record<GridColumnSize, number>>;\nexport type GridColumnOrderSizesType = Partial<\n Record<GridColumnSize, number | GridColumnOrderClasses>\n>;\n\nexport interface GridColumnClassParams {\n className?: string;\n sizes?: GridColumnSizesType | number;\n offsets?: GridColumnSizesType;\n orders?: GridColumnOrderSizesType;\n hidden?: GridColumnSize;\n visible?: GridColumnSize
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"../../../src","sources":["grid/types.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC1B,qDAA+B,CAAA;IAC/B,uDAAiC,CAAA;IACjC,iDAA2B,CAAA;IAC3B,uDAAiC,CAAA;IACjC,yDAAmC,CAAA;AACvC,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B;AAED,IAAY,cAIX;AAJD,WAAY,cAAc;IACtB,6CAA2B,CAAA;IAC3B,+CAA6B,CAAA;IAC7B,yCAAuB,CAAA;AAC3B,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB;AAED,IAAY,cAMX;AAND,WAAY,cAAc;IACtB,2BAAS,CAAA;IACT,2BAAS,CAAA;IACT,2BAAS,CAAA;IACT,2BAAS,CAAA;IACT,6BAAW,CAAA;AACf,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB;AAED,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC3B,iDAA0B,CAAA;IAC1B,mDAA4B,CAAA;IAC5B,6CAAsB,CAAA;AAC1B,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B;AAED,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC7B,oCAAW,CAAA;IACX,0CAAiB,CAAA;IACjB,wCAAe,CAAA;AACnB,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC;AAED,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACjC,0CAAa,CAAA;IACb,4CAAe,CAAA;AACnB,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC;AAED,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAC9B,yCAAe,CAAA;IACf,uCAAa,CAAA;AACjB,CAAC,EAHW,sBAAsB,sCAAtB,sBAAsB,QAGjC","sourcesContent":["export enum GridJustifyContent {\n Start = 'justify-content-start',\n Center = 'justify-content-center',\n End = 'justify-content-end',\n Around = 'justify-content-around',\n Between = 'justify-content-between',\n}\n\nexport enum GridAlignItems {\n Start = 'align-items-start',\n Center = 'align-items-center',\n End = 'align-items-end',\n}\n\nexport enum GridColumnSize {\n Sm = 'sm',\n Md = 'md',\n Lg = 'lg',\n Xl = 'xl',\n All = 'all',\n}\n\nexport enum GridColumnAlignSelf {\n Start = 'align-self-start',\n Center = 'align-self-center',\n End = 'align-self-end',\n}\n\nexport enum GridColumnClassPrefix {\n Col = 'col',\n Offset = 'offset',\n Order = 'order',\n}\n\nexport enum GridColumnVisibilityClass {\n None = 'none',\n Block = 'block',\n}\n\nexport enum GridColumnOrderClasses {\n First = 'first',\n Last = 'last',\n}\n\nexport type GridColumnSizesType = Partial<Record<GridColumnSize, number>>;\nexport type GridColumnOrderSizesType = Partial<\n Record<GridColumnSize, number | GridColumnOrderClasses>\n>;\n\nexport interface GridColumnClassParams {\n className?: string;\n sizes?: GridColumnSizesType | number;\n offsets?: GridColumnSizesType;\n orders?: GridColumnOrderSizesType;\n hidden?: GridColumnSize;\n visible?: GridColumnSize | Partial<Record<GridColumnSize, boolean>>;\n alignSelf?: GridColumnAlignSelf;\n justifyContent?: GridJustifyContent;\n reset?: boolean;\n}\n\nexport type IndentValue = '0' | 'xs' | 's' | 'm' | 'l' | 'xl';\n"]}
|
|
@@ -3,6 +3,7 @@ export declare function getClasses(items: GridColumnSizesType | GridColumnOrderS
|
|
|
3
3
|
export declare function getOffsetClass(offsets: GridColumnSizesType): string;
|
|
4
4
|
export declare function getOrderClass(orders: GridColumnOrderSizesType): string;
|
|
5
5
|
export declare function getVisibilityClasses(size: GridColumnSize, type: GridColumnVisibilityClass): string;
|
|
6
|
+
export declare function getVisibleClasses(visible: GridColumnSize | Partial<Record<GridColumnSize, boolean>>): string;
|
|
6
7
|
export declare function getSizeClass(sizes: GridColumnSizesType | number): string;
|
|
7
8
|
export declare function getJustifyClass(justifyContent: GridJustifyContent): string;
|
|
8
9
|
export declare function getResetClass(): string;
|
package/build/cjs/grid/utils.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.getClasses = getClasses;
|
|
|
4
4
|
exports.getOffsetClass = getOffsetClass;
|
|
5
5
|
exports.getOrderClass = getOrderClass;
|
|
6
6
|
exports.getVisibilityClasses = getVisibilityClasses;
|
|
7
|
+
exports.getVisibleClasses = getVisibleClasses;
|
|
7
8
|
exports.getSizeClass = getSizeClass;
|
|
8
9
|
exports.getJustifyClass = getJustifyClass;
|
|
9
10
|
exports.getResetClass = getResetClass;
|
|
@@ -27,11 +28,45 @@ function getOrderClass(orders) {
|
|
|
27
28
|
return getClasses(orders, types_1.GridColumnClassPrefix.Order);
|
|
28
29
|
}
|
|
29
30
|
function getVisibilityClasses(size, type) {
|
|
31
|
+
if (size === types_1.GridColumnSize.All) {
|
|
32
|
+
return getVisibilityClass(type);
|
|
33
|
+
}
|
|
30
34
|
const [oppositeClass, mainClass] = type === types_1.GridColumnVisibilityClass.None
|
|
31
35
|
? [types_1.GridColumnVisibilityClass.None, types_1.GridColumnVisibilityClass.Block]
|
|
32
36
|
: [types_1.GridColumnVisibilityClass.Block, types_1.GridColumnVisibilityClass.None];
|
|
33
37
|
return `${getVisibilityClass(mainClass)} ${getVisibilityClass(oppositeClass, size)}`;
|
|
34
38
|
}
|
|
39
|
+
function getVisibleClasses(visible) {
|
|
40
|
+
if (typeof visible === 'string') {
|
|
41
|
+
return getVisibilityClasses(visible, types_1.GridColumnVisibilityClass.Block);
|
|
42
|
+
}
|
|
43
|
+
const breakpoints = [
|
|
44
|
+
types_1.GridColumnSize.Sm,
|
|
45
|
+
types_1.GridColumnSize.Md,
|
|
46
|
+
types_1.GridColumnSize.Lg,
|
|
47
|
+
types_1.GridColumnSize.Xl,
|
|
48
|
+
];
|
|
49
|
+
const classes = [];
|
|
50
|
+
const hasAnyFalse = breakpoints.some((bp) => visible[bp] === false);
|
|
51
|
+
if (!hasAnyFalse) {
|
|
52
|
+
return '';
|
|
53
|
+
}
|
|
54
|
+
const baseVisible = visible[types_1.GridColumnSize.Sm] !== false;
|
|
55
|
+
classes.push(baseVisible
|
|
56
|
+
? getVisibilityClass(types_1.GridColumnVisibilityClass.Block)
|
|
57
|
+
: getVisibilityClass(types_1.GridColumnVisibilityClass.None));
|
|
58
|
+
let prevVisible = baseVisible;
|
|
59
|
+
for (const bp of breakpoints) {
|
|
60
|
+
const bpVisible = visible[bp] ?? prevVisible;
|
|
61
|
+
if (bpVisible !== prevVisible) {
|
|
62
|
+
classes.push(bpVisible
|
|
63
|
+
? getVisibilityClass(types_1.GridColumnVisibilityClass.Block, bp)
|
|
64
|
+
: getVisibilityClass(types_1.GridColumnVisibilityClass.None, bp));
|
|
65
|
+
}
|
|
66
|
+
prevVisible = bpVisible;
|
|
67
|
+
}
|
|
68
|
+
return classes.join(' ');
|
|
69
|
+
}
|
|
35
70
|
function getSizeClass(sizes) {
|
|
36
71
|
if (typeof sizes === 'number') {
|
|
37
72
|
return `${types_1.GridColumnClassPrefix.Col}-${sizes.toString()}`;
|
|
@@ -54,7 +89,7 @@ function getColClass(params) {
|
|
|
54
89
|
offsets && getOffsetClass(offsets),
|
|
55
90
|
orders && getOrderClass(orders),
|
|
56
91
|
hidden && getVisibilityClasses(hidden, types_1.GridColumnVisibilityClass.None),
|
|
57
|
-
visible &&
|
|
92
|
+
visible && getVisibleClasses(visible),
|
|
58
93
|
reset && getResetClass(),
|
|
59
94
|
className,
|
|
60
95
|
]
|