@doyourjob/gravity-ui-page-constructor 5.31.139 → 5.31.140
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 -0
- package/build/cjs/blocks/ContentLayout/schema.d.ts +11 -0
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +11 -0
- package/build/cjs/blocks/FilterBlock/schema.d.ts +22 -0
- package/build/cjs/blocks/FilterCardLayout/schema.d.ts +11 -0
- package/build/cjs/blocks/Form/schema.d.ts +11 -0
- package/build/cjs/blocks/Header/schema.d.ts +11 -0
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +11 -0
- package/build/cjs/blocks/HighlightTable/schema.d.ts +11 -0
- package/build/cjs/blocks/Icons/schema.d.ts +22 -0
- package/build/cjs/blocks/Map/schema.d.ts +11 -0
- package/build/cjs/blocks/Media/schema.d.ts +22 -0
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +11 -0
- package/build/cjs/blocks/Questions/schema.d.ts +11 -0
- package/build/cjs/blocks/Slider/schema.d.ts +11 -0
- package/build/cjs/blocks/SliderNew/schema.d.ts +11 -0
- package/build/cjs/blocks/TabLinks/schema.d.ts +11 -0
- package/build/cjs/blocks/Table/schema.d.ts +11 -0
- package/build/cjs/blocks/Tabs/schema.d.ts +11 -0
- package/build/cjs/blocks/TabsHighlightTable/schema.d.ts +11 -0
- package/build/cjs/components/BlockBase/BlockBase.d.ts +1 -1
- package/build/cjs/components/BlockBase/BlockBase.js +16 -1
- package/build/cjs/containers/PageConstructor/Provider.d.ts +1 -0
- package/build/cjs/containers/PageConstructor/Provider.js +3 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +1 -0
- package/build/cjs/context/visibilityFiltersContext/VisibilityFiltersContext.d.ts +2 -0
- package/build/cjs/context/visibilityFiltersContext/VisibilityFiltersContext.js +6 -0
- package/build/cjs/context/visibilityFiltersContext/index.d.ts +1 -0
- package/build/cjs/context/visibilityFiltersContext/index.js +4 -0
- package/build/cjs/editor/containers/Editor/hooks/useEditorState.d.ts +1 -0
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +1 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +1 -0
- package/build/cjs/schema/constants.d.ts +11 -0
- package/build/cjs/schema/validators/common.d.ts +11 -0
- package/build/cjs/schema/validators/common.js +12 -0
- package/build/cjs/sub-blocks/ContentLayoutCard/schema.d.ts +11 -0
- package/build/esm/blocks/CardLayout/schema.d.ts +22 -0
- package/build/esm/blocks/ContentLayout/schema.d.ts +11 -0
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +11 -0
- package/build/esm/blocks/FilterBlock/schema.d.ts +22 -0
- package/build/esm/blocks/FilterCardLayout/schema.d.ts +11 -0
- package/build/esm/blocks/Form/schema.d.ts +11 -0
- package/build/esm/blocks/Header/schema.d.ts +11 -0
- package/build/esm/blocks/HeaderSlider/schema.d.ts +11 -0
- package/build/esm/blocks/HighlightTable/schema.d.ts +11 -0
- package/build/esm/blocks/Icons/schema.d.ts +22 -0
- package/build/esm/blocks/Map/schema.d.ts +11 -0
- package/build/esm/blocks/Media/schema.d.ts +22 -0
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +11 -0
- package/build/esm/blocks/Questions/schema.d.ts +11 -0
- package/build/esm/blocks/Slider/schema.d.ts +11 -0
- package/build/esm/blocks/SliderNew/schema.d.ts +11 -0
- package/build/esm/blocks/TabLinks/schema.d.ts +11 -0
- package/build/esm/blocks/Table/schema.d.ts +11 -0
- package/build/esm/blocks/Tabs/schema.d.ts +11 -0
- package/build/esm/blocks/TabsHighlightTable/schema.d.ts +11 -0
- package/build/esm/components/BlockBase/BlockBase.d.ts +1 -1
- package/build/esm/components/BlockBase/BlockBase.js +17 -2
- package/build/esm/containers/PageConstructor/Provider.d.ts +1 -0
- package/build/esm/containers/PageConstructor/Provider.js +3 -1
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +1 -0
- package/build/esm/context/visibilityFiltersContext/VisibilityFiltersContext.d.ts +2 -0
- package/build/esm/context/visibilityFiltersContext/VisibilityFiltersContext.js +2 -0
- package/build/esm/context/visibilityFiltersContext/index.d.ts +1 -0
- package/build/esm/context/visibilityFiltersContext/index.js +1 -0
- package/build/esm/editor/containers/Editor/hooks/useEditorState.d.ts +1 -0
- package/build/esm/index.d.ts +1 -0
- package/build/esm/index.js +1 -0
- package/build/esm/models/constructor-items/blocks.d.ts +1 -0
- package/build/esm/schema/constants.d.ts +11 -0
- package/build/esm/schema/validators/common.d.ts +11 -0
- package/build/esm/schema/validators/common.js +12 -0
- package/build/esm/sub-blocks/ContentLayoutCard/schema.d.ts +11 -0
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +1 -0
- package/widget/index.js +1 -1
|
@@ -346,6 +346,17 @@ export declare const CardLayoutProps: {
|
|
|
346
346
|
backgroundFull: {
|
|
347
347
|
type: string;
|
|
348
348
|
};
|
|
349
|
+
visibilityFilter: {
|
|
350
|
+
oneOf: ({
|
|
351
|
+
type: string;
|
|
352
|
+
items?: undefined;
|
|
353
|
+
} | {
|
|
354
|
+
type: string;
|
|
355
|
+
items: {
|
|
356
|
+
type: string;
|
|
357
|
+
};
|
|
358
|
+
})[];
|
|
359
|
+
};
|
|
349
360
|
blockBackground: {
|
|
350
361
|
oneOf: ({
|
|
351
362
|
type: string;
|
|
@@ -740,6 +751,17 @@ export declare const CardLayoutBlock: {
|
|
|
740
751
|
backgroundFull: {
|
|
741
752
|
type: string;
|
|
742
753
|
};
|
|
754
|
+
visibilityFilter: {
|
|
755
|
+
oneOf: ({
|
|
756
|
+
type: string;
|
|
757
|
+
items?: undefined;
|
|
758
|
+
} | {
|
|
759
|
+
type: string;
|
|
760
|
+
items: {
|
|
761
|
+
type: string;
|
|
762
|
+
};
|
|
763
|
+
})[];
|
|
764
|
+
};
|
|
743
765
|
blockBackground: {
|
|
744
766
|
oneOf: ({
|
|
745
767
|
type: string;
|
|
@@ -523,6 +523,17 @@ export declare const ContentLayoutBlock: {
|
|
|
523
523
|
backgroundFull: {
|
|
524
524
|
type: string;
|
|
525
525
|
};
|
|
526
|
+
visibilityFilter: {
|
|
527
|
+
oneOf: ({
|
|
528
|
+
type: string;
|
|
529
|
+
items?: undefined;
|
|
530
|
+
} | {
|
|
531
|
+
type: string;
|
|
532
|
+
items: {
|
|
533
|
+
type: string;
|
|
534
|
+
};
|
|
535
|
+
})[];
|
|
536
|
+
};
|
|
526
537
|
blockBackground: {
|
|
527
538
|
oneOf: ({
|
|
528
539
|
type: string;
|
|
@@ -443,6 +443,17 @@ export declare const ExtendedFeaturesBlock: {
|
|
|
443
443
|
backgroundFull: {
|
|
444
444
|
type: string;
|
|
445
445
|
};
|
|
446
|
+
visibilityFilter: {
|
|
447
|
+
oneOf: ({
|
|
448
|
+
type: string;
|
|
449
|
+
items?: undefined;
|
|
450
|
+
} | {
|
|
451
|
+
type: string;
|
|
452
|
+
items: {
|
|
453
|
+
type: string;
|
|
454
|
+
};
|
|
455
|
+
})[];
|
|
456
|
+
};
|
|
446
457
|
blockBackground: {
|
|
447
458
|
oneOf: ({
|
|
448
459
|
type: string;
|
|
@@ -302,6 +302,17 @@ export declare const FilterProps: {
|
|
|
302
302
|
backgroundFull: {
|
|
303
303
|
type: string;
|
|
304
304
|
};
|
|
305
|
+
visibilityFilter: {
|
|
306
|
+
oneOf: ({
|
|
307
|
+
type: string;
|
|
308
|
+
items?: undefined;
|
|
309
|
+
} | {
|
|
310
|
+
type: string;
|
|
311
|
+
items: {
|
|
312
|
+
type: string;
|
|
313
|
+
};
|
|
314
|
+
})[];
|
|
315
|
+
};
|
|
305
316
|
blockBackground: {
|
|
306
317
|
oneOf: ({
|
|
307
318
|
type: string;
|
|
@@ -625,6 +636,17 @@ export declare const FilterBlock: {
|
|
|
625
636
|
backgroundFull: {
|
|
626
637
|
type: string;
|
|
627
638
|
};
|
|
639
|
+
visibilityFilter: {
|
|
640
|
+
oneOf: ({
|
|
641
|
+
type: string;
|
|
642
|
+
items?: undefined;
|
|
643
|
+
} | {
|
|
644
|
+
type: string;
|
|
645
|
+
items: {
|
|
646
|
+
type: string;
|
|
647
|
+
};
|
|
648
|
+
})[];
|
|
649
|
+
};
|
|
628
650
|
blockBackground: {
|
|
629
651
|
oneOf: ({
|
|
630
652
|
type: string;
|
|
@@ -271,6 +271,17 @@ export declare const FilterCardLayoutBlock: {
|
|
|
271
271
|
backgroundFull: {
|
|
272
272
|
type: string;
|
|
273
273
|
};
|
|
274
|
+
visibilityFilter: {
|
|
275
|
+
oneOf: ({
|
|
276
|
+
type: string;
|
|
277
|
+
items?: undefined;
|
|
278
|
+
} | {
|
|
279
|
+
type: string;
|
|
280
|
+
items: {
|
|
281
|
+
type: string;
|
|
282
|
+
};
|
|
283
|
+
})[];
|
|
284
|
+
};
|
|
274
285
|
blockBackground: {
|
|
275
286
|
oneOf: ({
|
|
276
287
|
type: string;
|
|
@@ -738,6 +738,17 @@ export declare const FormBlock: {
|
|
|
738
738
|
backgroundFull: {
|
|
739
739
|
type: string;
|
|
740
740
|
};
|
|
741
|
+
visibilityFilter: {
|
|
742
|
+
oneOf: ({
|
|
743
|
+
type: string;
|
|
744
|
+
items?: undefined;
|
|
745
|
+
} | {
|
|
746
|
+
type: string;
|
|
747
|
+
items: {
|
|
748
|
+
type: string;
|
|
749
|
+
};
|
|
750
|
+
})[];
|
|
751
|
+
};
|
|
741
752
|
blockBackground: {
|
|
742
753
|
oneOf: ({
|
|
743
754
|
type: string;
|
|
@@ -1766,6 +1766,17 @@ export declare const HeaderBlock: {
|
|
|
1766
1766
|
backgroundFull: {
|
|
1767
1767
|
type: string;
|
|
1768
1768
|
};
|
|
1769
|
+
visibilityFilter: {
|
|
1770
|
+
oneOf: ({
|
|
1771
|
+
type: string;
|
|
1772
|
+
items?: undefined;
|
|
1773
|
+
} | {
|
|
1774
|
+
type: string;
|
|
1775
|
+
items: {
|
|
1776
|
+
type: string;
|
|
1777
|
+
};
|
|
1778
|
+
})[];
|
|
1779
|
+
};
|
|
1769
1780
|
blockBackground: {
|
|
1770
1781
|
oneOf: ({
|
|
1771
1782
|
type: string;
|
|
@@ -821,6 +821,17 @@ export declare const HeaderSliderBlock: {
|
|
|
821
821
|
backgroundFull: {
|
|
822
822
|
type: string;
|
|
823
823
|
};
|
|
824
|
+
visibilityFilter: {
|
|
825
|
+
oneOf: ({
|
|
826
|
+
type: string;
|
|
827
|
+
items?: undefined;
|
|
828
|
+
} | {
|
|
829
|
+
type: string;
|
|
830
|
+
items: {
|
|
831
|
+
type: string;
|
|
832
|
+
};
|
|
833
|
+
})[];
|
|
834
|
+
};
|
|
824
835
|
blockBackground: {
|
|
825
836
|
oneOf: ({
|
|
826
837
|
type: string;
|
|
@@ -269,6 +269,17 @@ export declare const HighlightTableBlock: {
|
|
|
269
269
|
backgroundFull: {
|
|
270
270
|
type: string;
|
|
271
271
|
};
|
|
272
|
+
visibilityFilter: {
|
|
273
|
+
oneOf: ({
|
|
274
|
+
type: string;
|
|
275
|
+
items?: undefined;
|
|
276
|
+
} | {
|
|
277
|
+
type: string;
|
|
278
|
+
items: {
|
|
279
|
+
type: string;
|
|
280
|
+
};
|
|
281
|
+
})[];
|
|
282
|
+
};
|
|
272
283
|
blockBackground: {
|
|
273
284
|
oneOf: ({
|
|
274
285
|
type: string;
|
|
@@ -202,6 +202,17 @@ export declare const IconsProps: {
|
|
|
202
202
|
backgroundFull: {
|
|
203
203
|
type: string;
|
|
204
204
|
};
|
|
205
|
+
visibilityFilter: {
|
|
206
|
+
oneOf: ({
|
|
207
|
+
type: string;
|
|
208
|
+
items?: undefined;
|
|
209
|
+
} | {
|
|
210
|
+
type: string;
|
|
211
|
+
items: {
|
|
212
|
+
type: string;
|
|
213
|
+
};
|
|
214
|
+
})[];
|
|
215
|
+
};
|
|
205
216
|
blockBackground: {
|
|
206
217
|
oneOf: ({
|
|
207
218
|
type: string;
|
|
@@ -452,6 +463,17 @@ export declare const IconsBlock: {
|
|
|
452
463
|
backgroundFull: {
|
|
453
464
|
type: string;
|
|
454
465
|
};
|
|
466
|
+
visibilityFilter: {
|
|
467
|
+
oneOf: ({
|
|
468
|
+
type: string;
|
|
469
|
+
items?: undefined;
|
|
470
|
+
} | {
|
|
471
|
+
type: string;
|
|
472
|
+
items: {
|
|
473
|
+
type: string;
|
|
474
|
+
};
|
|
475
|
+
})[];
|
|
476
|
+
};
|
|
455
477
|
blockBackground: {
|
|
456
478
|
oneOf: ({
|
|
457
479
|
type: string;
|
|
@@ -590,6 +590,17 @@ export declare const MapBlock: {
|
|
|
590
590
|
backgroundFull: {
|
|
591
591
|
type: string;
|
|
592
592
|
};
|
|
593
|
+
visibilityFilter: {
|
|
594
|
+
oneOf: ({
|
|
595
|
+
type: string;
|
|
596
|
+
items?: undefined;
|
|
597
|
+
} | {
|
|
598
|
+
type: string;
|
|
599
|
+
items: {
|
|
600
|
+
type: string;
|
|
601
|
+
};
|
|
602
|
+
})[];
|
|
603
|
+
};
|
|
593
604
|
blockBackground: {
|
|
594
605
|
oneOf: ({
|
|
595
606
|
type: string;
|
|
@@ -793,6 +793,17 @@ export declare const MediaBlockBaseProps: {
|
|
|
793
793
|
backgroundFull: {
|
|
794
794
|
type: string;
|
|
795
795
|
};
|
|
796
|
+
visibilityFilter: {
|
|
797
|
+
oneOf: ({
|
|
798
|
+
type: string;
|
|
799
|
+
items?: undefined;
|
|
800
|
+
} | {
|
|
801
|
+
type: string;
|
|
802
|
+
items: {
|
|
803
|
+
type: string;
|
|
804
|
+
};
|
|
805
|
+
})[];
|
|
806
|
+
};
|
|
796
807
|
blockBackground: {
|
|
797
808
|
oneOf: ({
|
|
798
809
|
type: string;
|
|
@@ -1646,6 +1657,17 @@ export declare const MediaBlock: {
|
|
|
1646
1657
|
backgroundFull: {
|
|
1647
1658
|
type: string;
|
|
1648
1659
|
};
|
|
1660
|
+
visibilityFilter: {
|
|
1661
|
+
oneOf: ({
|
|
1662
|
+
type: string;
|
|
1663
|
+
items?: undefined;
|
|
1664
|
+
} | {
|
|
1665
|
+
type: string;
|
|
1666
|
+
items: {
|
|
1667
|
+
type: string;
|
|
1668
|
+
};
|
|
1669
|
+
})[];
|
|
1670
|
+
};
|
|
1649
1671
|
blockBackground: {
|
|
1650
1672
|
oneOf: ({
|
|
1651
1673
|
type: string;
|
|
@@ -578,6 +578,17 @@ export declare const PromoFeaturesBlock: {
|
|
|
578
578
|
backgroundFull: {
|
|
579
579
|
type: string;
|
|
580
580
|
};
|
|
581
|
+
visibilityFilter: {
|
|
582
|
+
oneOf: ({
|
|
583
|
+
type: string;
|
|
584
|
+
items?: undefined;
|
|
585
|
+
} | {
|
|
586
|
+
type: string;
|
|
587
|
+
items: {
|
|
588
|
+
type: string;
|
|
589
|
+
};
|
|
590
|
+
})[];
|
|
591
|
+
};
|
|
581
592
|
blockBackground: {
|
|
582
593
|
oneOf: ({
|
|
583
594
|
type: string;
|
|
@@ -304,6 +304,17 @@ export declare const QuestionsBlock: {
|
|
|
304
304
|
backgroundFull: {
|
|
305
305
|
type: string;
|
|
306
306
|
};
|
|
307
|
+
visibilityFilter: {
|
|
308
|
+
oneOf: ({
|
|
309
|
+
type: string;
|
|
310
|
+
items?: undefined;
|
|
311
|
+
} | {
|
|
312
|
+
type: string;
|
|
313
|
+
items: {
|
|
314
|
+
type: string;
|
|
315
|
+
};
|
|
316
|
+
})[];
|
|
317
|
+
};
|
|
307
318
|
blockBackground: {
|
|
308
319
|
oneOf: ({
|
|
309
320
|
type: string;
|
|
@@ -389,6 +389,17 @@ export declare const SliderBlock: {
|
|
|
389
389
|
backgroundFull: {
|
|
390
390
|
type: string;
|
|
391
391
|
};
|
|
392
|
+
visibilityFilter: {
|
|
393
|
+
oneOf: ({
|
|
394
|
+
type: string;
|
|
395
|
+
items?: undefined;
|
|
396
|
+
} | {
|
|
397
|
+
type: string;
|
|
398
|
+
items: {
|
|
399
|
+
type: string;
|
|
400
|
+
};
|
|
401
|
+
})[];
|
|
402
|
+
};
|
|
392
403
|
blockBackground: {
|
|
393
404
|
oneOf: ({
|
|
394
405
|
type: string;
|
|
@@ -425,6 +425,17 @@ export declare const SliderNewBlock: {
|
|
|
425
425
|
backgroundFull: {
|
|
426
426
|
type: string;
|
|
427
427
|
};
|
|
428
|
+
visibilityFilter: {
|
|
429
|
+
oneOf: ({
|
|
430
|
+
type: string;
|
|
431
|
+
items?: undefined;
|
|
432
|
+
} | {
|
|
433
|
+
type: string;
|
|
434
|
+
items: {
|
|
435
|
+
type: string;
|
|
436
|
+
};
|
|
437
|
+
})[];
|
|
438
|
+
};
|
|
428
439
|
blockBackground: {
|
|
429
440
|
oneOf: ({
|
|
430
441
|
type: string;
|
|
@@ -259,6 +259,17 @@ export declare const TabLinksBlock: {
|
|
|
259
259
|
backgroundFull: {
|
|
260
260
|
type: string;
|
|
261
261
|
};
|
|
262
|
+
visibilityFilter: {
|
|
263
|
+
oneOf: ({
|
|
264
|
+
type: string;
|
|
265
|
+
items?: undefined;
|
|
266
|
+
} | {
|
|
267
|
+
type: string;
|
|
268
|
+
items: {
|
|
269
|
+
type: string;
|
|
270
|
+
};
|
|
271
|
+
})[];
|
|
272
|
+
};
|
|
262
273
|
blockBackground: {
|
|
263
274
|
oneOf: ({
|
|
264
275
|
type: string;
|
|
@@ -157,6 +157,17 @@ export declare const TableBlock: {
|
|
|
157
157
|
backgroundFull: {
|
|
158
158
|
type: string;
|
|
159
159
|
};
|
|
160
|
+
visibilityFilter: {
|
|
161
|
+
oneOf: ({
|
|
162
|
+
type: string;
|
|
163
|
+
items?: undefined;
|
|
164
|
+
} | {
|
|
165
|
+
type: string;
|
|
166
|
+
items: {
|
|
167
|
+
type: string;
|
|
168
|
+
};
|
|
169
|
+
})[];
|
|
170
|
+
};
|
|
160
171
|
blockBackground: {
|
|
161
172
|
oneOf: ({
|
|
162
173
|
type: string;
|
|
@@ -966,6 +966,17 @@ export declare const TabsBlock: {
|
|
|
966
966
|
backgroundFull: {
|
|
967
967
|
type: string;
|
|
968
968
|
};
|
|
969
|
+
visibilityFilter: {
|
|
970
|
+
oneOf: ({
|
|
971
|
+
type: string;
|
|
972
|
+
items?: undefined;
|
|
973
|
+
} | {
|
|
974
|
+
type: string;
|
|
975
|
+
items: {
|
|
976
|
+
type: string;
|
|
977
|
+
};
|
|
978
|
+
})[];
|
|
979
|
+
};
|
|
969
980
|
blockBackground: {
|
|
970
981
|
oneOf: ({
|
|
971
982
|
type: string;
|
|
@@ -248,6 +248,17 @@ export declare const TabsHighlightTableBlock: {
|
|
|
248
248
|
backgroundFull: {
|
|
249
249
|
type: string;
|
|
250
250
|
};
|
|
251
|
+
visibilityFilter: {
|
|
252
|
+
oneOf: ({
|
|
253
|
+
type: string;
|
|
254
|
+
items?: undefined;
|
|
255
|
+
} | {
|
|
256
|
+
type: string;
|
|
257
|
+
items: {
|
|
258
|
+
type: string;
|
|
259
|
+
};
|
|
260
|
+
})[];
|
|
261
|
+
};
|
|
251
262
|
blockBackground: {
|
|
252
263
|
oneOf: ({
|
|
253
264
|
type: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { BlockBaseProps, ClassNameProps, QAProps } from '../../models';
|
|
3
3
|
export type BlockBaseFullProps = BlockBaseProps & ClassNameProps & PropsWithChildren & QAProps;
|
|
4
|
-
declare const BlockBase: (props: BlockBaseFullProps) => JSX.Element;
|
|
4
|
+
declare const BlockBase: (props: BlockBaseFullProps) => JSX.Element | null;
|
|
5
5
|
export default BlockBase;
|
|
@@ -2,16 +2,31 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
+
const visibilityFiltersContext_1 = require("../../context/visibilityFiltersContext");
|
|
5
6
|
const grid_1 = require("../../grid");
|
|
6
7
|
const utils_1 = require("../../utils");
|
|
7
8
|
const Anchor_1 = tslib_1.__importDefault(require("../Anchor/Anchor"));
|
|
8
9
|
const b = (0, utils_1.block)('block-base');
|
|
9
10
|
const BlockBase = (props) => {
|
|
10
|
-
const { anchor, visibility, indent, backgroundFull, selectionColor, visible, hidden, children, className, resetPaddings, qa, } = props;
|
|
11
|
+
const { anchor, visibility, indent, backgroundFull, selectionColor, visible, hidden, children, className, resetPaddings, qa, visibilityFilter, } = props;
|
|
12
|
+
const visibilityFilters = (0, react_1.useContext)(visibilityFiltersContext_1.VisibilityFiltersContext);
|
|
11
13
|
const { top, bottom } = indent || (resetPaddings ? { top: '0', bottom: '0' } : { top: 'l', bottom: 'l' });
|
|
12
14
|
const isBackgroundUrl = /^https?:\/\/[^\s/$.?#].[^\s]*$/i.test(backgroundFull || '');
|
|
13
15
|
const visibilityClasses = (0, utils_1.getBlockVisibilityClasses)(visibility);
|
|
14
16
|
const rootStyle = (0, react_1.useMemo)(() => selectionColor ? { ['--selection-bg']: selectionColor } : undefined, [selectionColor]);
|
|
17
|
+
if (visibilityFilters.length > 0 && visibilityFilter && visibilityFilter.length > 0) {
|
|
18
|
+
if (typeof visibilityFilter === 'string') {
|
|
19
|
+
if (!visibilityFilters.includes(visibilityFilter)) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
const hasFilter = visibilityFilter.some((filter) => visibilityFilters.includes(filter));
|
|
25
|
+
if (!hasFilter) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
15
30
|
return (react_1.default.createElement(grid_1.Col, { className: b(Object.assign({ ['reset-paddings']: resetPaddings, indentTop: top, indentBottom: bottom }, visibilityClasses), className), style: rootStyle, hidden: hidden, visible: visible, reset: true, qa: qa },
|
|
16
31
|
anchor && react_1.default.createElement(Anchor_1.default, { id: anchor.url, className: b('anchor') }),
|
|
17
32
|
backgroundFull && (react_1.default.createElement("div", { className: b('background-full', { top }), style: isBackgroundUrl
|
|
@@ -16,6 +16,7 @@ export interface PageConstructorProviderProps {
|
|
|
16
16
|
theme?: Theme;
|
|
17
17
|
mapsContext?: MapsContextType;
|
|
18
18
|
projectSettings?: ProjectSettingsContextProps;
|
|
19
|
+
visibilityFilters?: string[];
|
|
19
20
|
analytics?: AnalyticsContextProps;
|
|
20
21
|
forms?: FormsContextProps;
|
|
21
22
|
image?: ImageContextProps;
|
|
@@ -14,8 +14,9 @@ const mobileContext_1 = require("../../context/mobileContext");
|
|
|
14
14
|
const projectSettingsContext_1 = require("../../context/projectSettingsContext");
|
|
15
15
|
const ssrContext_1 = require("../../context/ssrContext");
|
|
16
16
|
const theme_1 = require("../../context/theme");
|
|
17
|
+
const visibilityFiltersContext_1 = require("../../context/visibilityFiltersContext");
|
|
17
18
|
const PageConstructorProvider = (props) => {
|
|
18
|
-
const { isMobile, mapsContext = mapsContext_1.initialMapValue, locale = {}, location = {}, analytics = {}, ssrConfig = {}, projectSettings = {}, theme = constants_1.DEFAULT_THEME, children, image = {}, forms = FormsContext_1.DEFAULT_FORMS_CONTEXT_VALUE, } = props;
|
|
19
|
+
const { isMobile, mapsContext = mapsContext_1.initialMapValue, locale = {}, location = {}, analytics = {}, ssrConfig = {}, projectSettings = {}, visibilityFilters = [], theme = constants_1.DEFAULT_THEME, children, image = {}, forms = FormsContext_1.DEFAULT_FORMS_CONTEXT_VALUE, } = props;
|
|
19
20
|
/* eslint-disable react/jsx-key */
|
|
20
21
|
const context = [
|
|
21
22
|
react_1.default.createElement(theme_1.ThemeContext.Provider, { value: { theme } }),
|
|
@@ -28,6 +29,7 @@ const PageConstructorProvider = (props) => {
|
|
|
28
29
|
react_1.default.createElement(analyticsContext_1.AnalyticsContext.Provider, { value: analytics }),
|
|
29
30
|
react_1.default.createElement(FormsContext_1.FormsContext.Provider, { value: forms }),
|
|
30
31
|
react_1.default.createElement(ssrContext_1.SSRContext.Provider, { value: { isServer: ssrConfig === null || ssrConfig === void 0 ? void 0 : ssrConfig.isServer } }),
|
|
32
|
+
react_1.default.createElement(visibilityFiltersContext_1.VisibilityFiltersContext.Provider, { value: visibilityFilters }),
|
|
31
33
|
].reduceRight((prev, provider) => react_1.default.cloneElement(provider, {}, prev), children);
|
|
32
34
|
/* eslint-enable react/jsx-key */
|
|
33
35
|
return react_1.default.createElement(react_1.Fragment, null, context);
|
package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js
CHANGED
|
@@ -19,6 +19,7 @@ const ConstructorBlock = ({ index = 0, data, children, }) => {
|
|
|
19
19
|
'indent',
|
|
20
20
|
'backgroundFull',
|
|
21
21
|
'selectionColor',
|
|
22
|
+
'visibilityFilter',
|
|
22
23
|
]), [data]);
|
|
23
24
|
return (react_1.default.createElement(BlockDecoration_1.BlockDecoration, Object.assign({ type: type, index: index }, blockBaseProps),
|
|
24
25
|
react_1.default.createElement(BlockBase_1.default, Object.assign({ className: b({ type }) }, blockBaseProps), children)));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VisibilityFiltersContext = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
exports.VisibilityFiltersContext = react_1.default.createContext([]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './VisibilityFiltersContext';
|
|
@@ -13,6 +13,7 @@ export declare const useEditorState: ({ customSchema, onChange, providerProps, t
|
|
|
13
13
|
ssrConfig?: import("../../../../context/ssrContext").SSRContextProps | undefined;
|
|
14
14
|
mapsContext?: import("../../../../context/mapsContext/mapsContext").MapsContextType | undefined;
|
|
15
15
|
projectSettings?: import("../../../../context/projectSettingsContext").ProjectSettingsContextProps | undefined;
|
|
16
|
+
visibilityFilters?: string[] | undefined;
|
|
16
17
|
analytics?: import("../../../..").AnalyticsContextProps | undefined;
|
|
17
18
|
forms?: import("../../../../context/formsContext").FormsContextProps | undefined;
|
|
18
19
|
image?: import("../../../../context/imageContext").ImageContextProps | undefined;
|
package/build/cjs/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from './context/reportsContext';
|
|
|
15
15
|
export * from './context/reportsCardsContext';
|
|
16
16
|
export * from './context/reportsSectionsContext';
|
|
17
17
|
export * from './context/miniCaseContext';
|
|
18
|
+
export * from './context/visibilityFiltersContext';
|
|
18
19
|
export * from './containers/PageConstructor';
|
|
19
20
|
export * from './grid';
|
|
20
21
|
export * from './blocks';
|
package/build/cjs/index.js
CHANGED
|
@@ -20,6 +20,7 @@ tslib_1.__exportStar(require("./context/reportsContext"), exports);
|
|
|
20
20
|
tslib_1.__exportStar(require("./context/reportsCardsContext"), exports);
|
|
21
21
|
tslib_1.__exportStar(require("./context/reportsSectionsContext"), exports);
|
|
22
22
|
tslib_1.__exportStar(require("./context/miniCaseContext"), exports);
|
|
23
|
+
tslib_1.__exportStar(require("./context/visibilityFiltersContext"), exports);
|
|
23
24
|
tslib_1.__exportStar(require("./containers/PageConstructor"), exports);
|
|
24
25
|
tslib_1.__exportStar(require("./grid"), exports);
|
|
25
26
|
tslib_1.__exportStar(require("./blocks"), exports);
|
|
@@ -1213,6 +1213,17 @@ export declare const cardSchemas: {
|
|
|
1213
1213
|
backgroundFull: {
|
|
1214
1214
|
type: string;
|
|
1215
1215
|
};
|
|
1216
|
+
visibilityFilter: {
|
|
1217
|
+
oneOf: ({
|
|
1218
|
+
type: string;
|
|
1219
|
+
items?: undefined;
|
|
1220
|
+
} | {
|
|
1221
|
+
type: string;
|
|
1222
|
+
items: {
|
|
1223
|
+
type: string;
|
|
1224
|
+
};
|
|
1225
|
+
})[];
|
|
1226
|
+
};
|
|
1216
1227
|
blockBackground: {
|
|
1217
1228
|
oneOf: ({
|
|
1218
1229
|
type: string;
|
|
@@ -836,6 +836,17 @@ export declare const BlockBaseProps: {
|
|
|
836
836
|
backgroundFull: {
|
|
837
837
|
type: string;
|
|
838
838
|
};
|
|
839
|
+
visibilityFilter: {
|
|
840
|
+
oneOf: ({
|
|
841
|
+
type: string;
|
|
842
|
+
items?: undefined;
|
|
843
|
+
} | {
|
|
844
|
+
type: string;
|
|
845
|
+
items: {
|
|
846
|
+
type: string;
|
|
847
|
+
};
|
|
848
|
+
})[];
|
|
849
|
+
};
|
|
839
850
|
blockBackground: {
|
|
840
851
|
oneOf: ({
|
|
841
852
|
type: string;
|
|
@@ -485,6 +485,18 @@ exports.BlockBaseProps = Object.assign(Object.assign({}, exports.BaseProps), { a
|
|
|
485
485
|
},
|
|
486
486
|
}, backgroundFull: {
|
|
487
487
|
type: 'string',
|
|
488
|
+
}, visibilityFilter: {
|
|
489
|
+
oneOf: [
|
|
490
|
+
{
|
|
491
|
+
type: 'string',
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
type: 'array',
|
|
495
|
+
items: {
|
|
496
|
+
type: 'string',
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
],
|
|
488
500
|
}, blockBackground: {
|
|
489
501
|
oneOf: [
|
|
490
502
|
{
|
|
@@ -520,6 +520,17 @@ export declare const ContentLayoutCard: {
|
|
|
520
520
|
backgroundFull: {
|
|
521
521
|
type: string;
|
|
522
522
|
};
|
|
523
|
+
visibilityFilter: {
|
|
524
|
+
oneOf: ({
|
|
525
|
+
type: string;
|
|
526
|
+
items?: undefined;
|
|
527
|
+
} | {
|
|
528
|
+
type: string;
|
|
529
|
+
items: {
|
|
530
|
+
type: string;
|
|
531
|
+
};
|
|
532
|
+
})[];
|
|
533
|
+
};
|
|
523
534
|
blockBackground: {
|
|
524
535
|
oneOf: ({
|
|
525
536
|
type: string;
|