@gravity-ui/page-constructor 1.15.0-alpha.8 → 1.15.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 +39 -0
- package/README.md +5 -75
- package/build/cjs/blocks/Banner/Banner.js +2 -3
- package/build/cjs/blocks/Banner/schema.d.ts +0 -243
- package/build/cjs/blocks/Banner/schema.js +1 -3
- package/build/cjs/blocks/CardLayout/schema.d.ts +0 -6
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +2 -3
- package/build/cjs/blocks/ContentLayout/schema.d.ts +0 -3
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.d.ts +1 -1
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -3
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +0 -3
- package/build/cjs/blocks/Header/Header.js +5 -6
- package/build/cjs/blocks/Header/schema.d.ts +0 -3
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +0 -3
- package/build/cjs/blocks/Icons/schema.d.ts +0 -6
- package/build/cjs/blocks/Info/Info.js +3 -4
- package/build/cjs/blocks/Info/schema.d.ts +0 -3
- package/build/cjs/blocks/Info/schema.js +0 -2
- package/build/cjs/blocks/LinkTable/schema.d.ts +0 -3
- package/build/cjs/blocks/Media/Media.js +2 -3
- package/build/cjs/blocks/Media/MediaContent.js +2 -3
- package/build/cjs/blocks/Media/schema.d.ts +0 -81
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +1 -2
- package/build/cjs/blocks/Preview/MediaContent/MediaContent.js +2 -3
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -1
- package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.js +2 -3
- package/build/cjs/blocks/Preview/Preview.js +2 -3
- package/build/cjs/blocks/Preview/schema.d.ts +0 -3
- package/build/cjs/blocks/Preview/schema.js +1 -3
- package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +2 -3
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +0 -3
- package/build/cjs/blocks/Questions/Questions.js +2 -3
- package/build/cjs/blocks/Questions/schema.d.ts +0 -3
- package/build/cjs/blocks/Security/Security.js +2 -3
- package/build/cjs/blocks/Security/schema.d.ts +0 -3
- package/build/cjs/blocks/Security/schema.js +1 -3
- package/build/cjs/blocks/Share/Share.d.ts +1 -1
- package/build/cjs/blocks/Share/Share.js +2 -11
- package/build/cjs/blocks/Simple/schema.d.ts +0 -3
- package/build/cjs/blocks/Slider/schema.d.ts +0 -3
- package/build/cjs/blocks/Table/schema.d.ts +0 -3
- package/build/cjs/blocks/Tabs/Tabs.d.ts +1 -1
- package/build/cjs/blocks/Tabs/Tabs.js +4 -5
- package/build/cjs/blocks/Tabs/schema.d.ts +0 -3
- package/build/cjs/components/BackLink/BackLink.d.ts +0 -1
- package/build/cjs/components/BackLink/BackLink.js +2 -11
- package/build/cjs/components/BackgroundMedia/BackgroundMedia.js +1 -2
- package/build/cjs/components/Button/Button.d.ts +0 -1
- package/build/cjs/components/Button/Button.js +2 -11
- package/build/cjs/components/ButtonTabs/ButtonTabs.d.ts +0 -1
- package/build/cjs/components/ButtonTabs/ButtonTabs.js +2 -11
- package/build/cjs/components/CardBase/CardBase.d.ts +0 -3
- package/build/cjs/components/CardBase/CardBase.js +1 -10
- package/build/cjs/components/FullscreenImage/FullscreenImage.js +8 -6
- package/build/cjs/components/FullscreenMedia/FullScreenMedia.css +70 -0
- package/build/cjs/components/FullscreenMedia/FullScreenMedia.d.ts +9 -0
- package/build/cjs/components/FullscreenMedia/FullScreenMedia.js +40 -0
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -10
- package/build/cjs/components/Link/Link.js +2 -11
- package/build/cjs/components/Media/Media.js +5 -7
- package/build/cjs/components/Media/Video/Video.js +3 -6
- package/build/cjs/components/MetaInfo/MetaInfo.css +13 -0
- package/build/cjs/components/MetaInfo/MetaInfo.d.ts +6 -0
- package/build/cjs/components/MetaInfo/MetaInfo.js +8 -0
- package/build/cjs/components/MetaInfo/schema.d.ts +8 -0
- package/build/cjs/components/MetaInfo/schema.js +10 -0
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +3 -16
- package/build/cjs/components/VideoBlock/VideoBlock.d.ts +1 -0
- package/build/cjs/components/VideoBlock/VideoBlock.js +6 -10
- package/build/cjs/components/YandexForm/YandexForm.d.ts +0 -3
- package/build/cjs/components/YandexForm/YandexForm.js +2 -19
- package/build/cjs/components/index.d.ts +2 -0
- package/build/cjs/components/index.js +5 -1
- package/build/cjs/constants.d.ts +0 -1
- package/build/cjs/constants.js +1 -2
- package/build/cjs/constructor-items.d.ts +9 -5
- package/build/cjs/constructor-items.js +4 -0
- package/build/cjs/containers/PageConstructor/PageConstructor.css +1 -0
- package/build/cjs/containers/PageConstructor/Provider.d.ts +0 -2
- package/build/cjs/containers/PageConstructor/Provider.js +1 -3
- package/build/cjs/context/metrikaContext/metrikaContext.d.ts +0 -6
- package/build/cjs/hooks/index.d.ts +0 -1
- package/build/cjs/hooks/index.js +0 -1
- package/build/cjs/hooks/useMetrika.d.ts +0 -6
- package/build/cjs/hooks/useMetrika.js +0 -8
- package/build/cjs/models/common.d.ts +0 -29
- package/build/cjs/models/common.js +0 -3
- package/build/cjs/models/constructor-items/blocks.d.ts +0 -11
- package/build/cjs/models/constructor-items/common.d.ts +2 -27
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +16 -6
- package/build/cjs/models/constructor-items/sub-blocks.js +4 -0
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +2 -3
- package/build/cjs/schema/index.js +1 -0
- package/build/cjs/schema/validators/common.d.ts +0 -171
- package/build/cjs/schema/validators/common.js +0 -12
- package/build/cjs/schema/validators/sub-blocks.d.ts +1 -0
- package/build/cjs/schema/validators/sub-blocks.js +1 -0
- package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +2 -3
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +0 -3
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +0 -2
- package/build/cjs/sub-blocks/BannerCard/BannerCard.js +2 -3
- package/build/cjs/sub-blocks/BasicCard/BasicCard.js +2 -3
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.d.ts +1 -1
- package/build/cjs/sub-blocks/CardWithImage/CardWithImage.js +2 -3
- package/build/cjs/sub-blocks/Content/Content.js +3 -4
- package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +2 -2
- package/build/cjs/sub-blocks/HubspotForm/index.js +3 -19
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.css +16 -0
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.d.ts +3 -0
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +21 -0
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +218 -0
- package/build/cjs/sub-blocks/LayoutItem/schema.js +18 -0
- package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +15 -0
- package/build/cjs/sub-blocks/LayoutItem/utils.js +12 -0
- package/build/cjs/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
- package/build/cjs/sub-blocks/MediaCard/MediaCard.js +2 -3
- package/build/cjs/sub-blocks/Quote/Quote.js +2 -10
- package/build/cjs/sub-blocks/Quote/schema.d.ts +0 -3
- package/build/cjs/sub-blocks/Quote/schema.js +1 -3
- package/build/cjs/sub-blocks/index.d.ts +1 -0
- package/build/cjs/sub-blocks/index.js +3 -1
- package/build/cjs/text-transform/blocks.js +17 -0
- package/build/cjs/utils/hubspot.d.ts +2 -1
- package/build/cjs/utils/hubspot.js +5 -1
- package/build/esm/blocks/Banner/Banner.js +2 -3
- package/build/esm/blocks/Banner/schema.d.ts +0 -243
- package/build/esm/blocks/Banner/schema.js +1 -3
- package/build/esm/blocks/CardLayout/schema.d.ts +0 -6
- package/build/esm/blocks/ContentLayout/ContentLayout.js +2 -3
- package/build/esm/blocks/ContentLayout/schema.d.ts +0 -3
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.d.ts +1 -1
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -3
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +0 -3
- package/build/esm/blocks/Header/Header.js +5 -6
- package/build/esm/blocks/Header/schema.d.ts +0 -3
- package/build/esm/blocks/HeaderSlider/schema.d.ts +0 -3
- package/build/esm/blocks/Icons/schema.d.ts +0 -6
- package/build/esm/blocks/Info/Info.js +3 -4
- package/build/esm/blocks/Info/schema.d.ts +0 -3
- package/build/esm/blocks/Info/schema.js +0 -2
- package/build/esm/blocks/LinkTable/schema.d.ts +0 -3
- package/build/esm/blocks/Media/Media.js +2 -3
- package/build/esm/blocks/Media/MediaContent.js +2 -3
- package/build/esm/blocks/Media/schema.d.ts +0 -81
- package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +1 -2
- package/build/esm/blocks/Preview/MediaContent/MediaContent.js +2 -3
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -1
- package/build/esm/blocks/Preview/MediaContent/PreviewMedia.js +2 -3
- package/build/esm/blocks/Preview/Preview.js +2 -3
- package/build/esm/blocks/Preview/schema.d.ts +0 -3
- package/build/esm/blocks/Preview/schema.js +1 -3
- package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +2 -3
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +0 -3
- package/build/esm/blocks/Questions/Questions.js +2 -3
- package/build/esm/blocks/Questions/schema.d.ts +0 -3
- package/build/esm/blocks/Security/Security.js +2 -3
- package/build/esm/blocks/Security/schema.d.ts +0 -3
- package/build/esm/blocks/Security/schema.js +1 -3
- package/build/esm/blocks/Share/Share.d.ts +1 -1
- package/build/esm/blocks/Share/Share.js +3 -12
- package/build/esm/blocks/Simple/schema.d.ts +0 -3
- package/build/esm/blocks/Slider/schema.d.ts +0 -3
- package/build/esm/blocks/Table/schema.d.ts +0 -3
- package/build/esm/blocks/Tabs/Tabs.d.ts +1 -1
- package/build/esm/blocks/Tabs/Tabs.js +4 -5
- package/build/esm/blocks/Tabs/schema.d.ts +0 -3
- package/build/esm/components/BackLink/BackLink.d.ts +0 -1
- package/build/esm/components/BackLink/BackLink.js +2 -11
- package/build/esm/components/BackgroundMedia/BackgroundMedia.js +1 -2
- package/build/esm/components/Button/Button.d.ts +0 -1
- package/build/esm/components/Button/Button.js +2 -11
- package/build/esm/components/ButtonTabs/ButtonTabs.d.ts +0 -1
- package/build/esm/components/ButtonTabs/ButtonTabs.js +2 -11
- package/build/esm/components/CardBase/CardBase.d.ts +0 -3
- package/build/esm/components/CardBase/CardBase.js +1 -10
- package/build/esm/components/FullscreenImage/FullscreenImage.js +9 -7
- package/build/esm/components/FullscreenMedia/FullScreenMedia.css +70 -0
- package/build/esm/components/FullscreenMedia/FullScreenMedia.d.ts +10 -0
- package/build/esm/components/FullscreenMedia/FullScreenMedia.js +38 -0
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -10
- package/build/esm/components/Link/Link.js +2 -11
- package/build/esm/components/Media/Media.js +5 -7
- package/build/esm/components/Media/Video/Video.js +3 -6
- package/build/esm/components/MetaInfo/MetaInfo.css +13 -0
- package/build/esm/components/MetaInfo/MetaInfo.d.ts +7 -0
- package/build/esm/components/MetaInfo/MetaInfo.js +6 -0
- package/build/esm/components/MetaInfo/schema.d.ts +8 -0
- package/build/esm/components/MetaInfo/schema.js +8 -0
- package/build/esm/components/ReactPlayer/ReactPlayer.js +3 -16
- package/build/esm/components/VideoBlock/VideoBlock.d.ts +1 -0
- package/build/esm/components/VideoBlock/VideoBlock.js +6 -10
- package/build/esm/components/YandexForm/YandexForm.d.ts +0 -3
- package/build/esm/components/YandexForm/YandexForm.js +2 -19
- package/build/esm/components/index.d.ts +2 -0
- package/build/esm/components/index.js +2 -0
- package/build/esm/constants.d.ts +0 -1
- package/build/esm/constants.js +0 -1
- package/build/esm/constructor-items.d.ts +9 -5
- package/build/esm/constructor-items.js +5 -1
- package/build/esm/containers/PageConstructor/PageConstructor.css +1 -0
- package/build/esm/containers/PageConstructor/Provider.d.ts +0 -2
- package/build/esm/containers/PageConstructor/Provider.js +1 -3
- package/build/esm/context/metrikaContext/metrikaContext.d.ts +0 -6
- package/build/esm/hooks/index.d.ts +0 -1
- package/build/esm/hooks/index.js +0 -1
- package/build/esm/hooks/useMetrika.d.ts +0 -6
- package/build/esm/hooks/useMetrika.js +0 -8
- package/build/esm/models/common.d.ts +0 -29
- package/build/esm/models/common.js +0 -3
- package/build/esm/models/constructor-items/blocks.d.ts +0 -11
- package/build/esm/models/constructor-items/common.d.ts +2 -27
- package/build/esm/models/constructor-items/sub-blocks.d.ts +16 -6
- package/build/esm/models/constructor-items/sub-blocks.js +4 -0
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js +2 -3
- package/build/esm/schema/index.js +1 -0
- package/build/esm/schema/validators/common.d.ts +0 -171
- package/build/esm/schema/validators/common.js +0 -12
- package/build/esm/schema/validators/sub-blocks.d.ts +1 -0
- package/build/esm/schema/validators/sub-blocks.js +1 -0
- package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +2 -3
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +0 -3
- package/build/esm/sub-blocks/BackgroundCard/schema.js +0 -2
- package/build/esm/sub-blocks/BannerCard/BannerCard.js +2 -3
- package/build/esm/sub-blocks/BasicCard/BasicCard.js +2 -3
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.d.ts +1 -1
- package/build/esm/sub-blocks/CardWithImage/CardWithImage.js +2 -3
- package/build/esm/sub-blocks/Content/Content.js +3 -4
- package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +2 -2
- package/build/esm/sub-blocks/HubspotForm/index.js +4 -20
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.css +16 -0
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.d.ts +4 -0
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +20 -0
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +218 -0
- package/build/esm/sub-blocks/LayoutItem/schema.js +14 -0
- package/build/esm/sub-blocks/LayoutItem/utils.d.ts +15 -0
- package/build/esm/sub-blocks/LayoutItem/utils.js +6 -0
- package/build/esm/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
- package/build/esm/sub-blocks/MediaCard/MediaCard.js +2 -3
- package/build/esm/sub-blocks/Quote/Quote.js +4 -12
- package/build/esm/sub-blocks/Quote/schema.d.ts +0 -3
- package/build/esm/sub-blocks/Quote/schema.js +1 -3
- package/build/esm/sub-blocks/index.d.ts +1 -0
- package/build/esm/sub-blocks/index.js +1 -0
- package/build/esm/text-transform/blocks.js +17 -0
- package/build/esm/utils/hubspot.d.ts +2 -1
- package/build/esm/utils/hubspot.js +5 -1
- package/package.json +4 -5
- package/server/models/common.d.ts +0 -29
- package/server/models/common.js +0 -3
- package/server/models/constructor-items/blocks.d.ts +0 -11
- package/server/models/constructor-items/common.d.ts +2 -27
- package/server/models/constructor-items/sub-blocks.d.ts +16 -6
- package/server/models/constructor-items/sub-blocks.js +4 -0
- package/server/text-transform/blocks.js +17 -0
- package/server/utils/hubspot.d.ts +2 -1
- package/server/utils/hubspot.js +5 -1
- package/styles/root.scss +1 -0
- package/build/cjs/context/analyticsContext/analyticsContext.d.ts +0 -6
- package/build/cjs/context/analyticsContext/analyticsContext.js +0 -6
- package/build/cjs/context/analyticsContext/index.d.ts +0 -1
- package/build/cjs/context/analyticsContext/index.js +0 -4
- package/build/cjs/hooks/useAnalytics.d.ts +0 -2
- package/build/cjs/hooks/useAnalytics.js +0 -23
- package/build/cjs/schema/validators/event.d.ts +0 -37
- package/build/cjs/schema/validators/event.js +0 -38
- package/build/esm/context/analyticsContext/analyticsContext.d.ts +0 -6
- package/build/esm/context/analyticsContext/analyticsContext.js +0 -2
- package/build/esm/context/analyticsContext/index.d.ts +0 -1
- package/build/esm/context/analyticsContext/index.js +0 -1
- package/build/esm/hooks/useAnalytics.d.ts +0 -2
- package/build/esm/hooks/useAnalytics.js +0 -19
- package/build/esm/schema/validators/event.d.ts +0 -37
- package/build/esm/schema/validators/event.js +0 -35
|
@@ -414,9 +414,6 @@ export declare const ButtonProps: {
|
|
|
414
414
|
};
|
|
415
415
|
})[];
|
|
416
416
|
};
|
|
417
|
-
/**
|
|
418
|
-
* @deprecated Metrika will be deleted
|
|
419
|
-
*/
|
|
420
417
|
metrikaGoals: {
|
|
421
418
|
anyOf: ({
|
|
422
419
|
type: string;
|
|
@@ -446,9 +443,6 @@ export declare const ButtonProps: {
|
|
|
446
443
|
};
|
|
447
444
|
})[];
|
|
448
445
|
};
|
|
449
|
-
/**
|
|
450
|
-
* @deprecated Pixel will be deleted
|
|
451
|
-
*/
|
|
452
446
|
pixelEvents: {
|
|
453
447
|
type: string;
|
|
454
448
|
items: {
|
|
@@ -505,84 +499,6 @@ export declare const ButtonProps: {
|
|
|
505
499
|
};
|
|
506
500
|
};
|
|
507
501
|
};
|
|
508
|
-
analyticsEvents: {
|
|
509
|
-
anyOf: ({
|
|
510
|
-
type: string;
|
|
511
|
-
additionalProperties: {
|
|
512
|
-
type: string;
|
|
513
|
-
};
|
|
514
|
-
required: string[];
|
|
515
|
-
properties: {
|
|
516
|
-
name: {
|
|
517
|
-
type: string;
|
|
518
|
-
};
|
|
519
|
-
type: {
|
|
520
|
-
type: string;
|
|
521
|
-
};
|
|
522
|
-
counters: {
|
|
523
|
-
type: string;
|
|
524
|
-
additionalProperties: boolean;
|
|
525
|
-
required: never[];
|
|
526
|
-
properties: {
|
|
527
|
-
include: {
|
|
528
|
-
type: string;
|
|
529
|
-
items: {
|
|
530
|
-
type: string;
|
|
531
|
-
};
|
|
532
|
-
};
|
|
533
|
-
exclude: {
|
|
534
|
-
type: string;
|
|
535
|
-
items: {
|
|
536
|
-
type: string;
|
|
537
|
-
};
|
|
538
|
-
};
|
|
539
|
-
};
|
|
540
|
-
};
|
|
541
|
-
blockName: {
|
|
542
|
-
type: string;
|
|
543
|
-
};
|
|
544
|
-
};
|
|
545
|
-
} | {
|
|
546
|
-
type: string;
|
|
547
|
-
items: {
|
|
548
|
-
type: string;
|
|
549
|
-
additionalProperties: {
|
|
550
|
-
type: string;
|
|
551
|
-
};
|
|
552
|
-
required: string[];
|
|
553
|
-
properties: {
|
|
554
|
-
name: {
|
|
555
|
-
type: string;
|
|
556
|
-
};
|
|
557
|
-
type: {
|
|
558
|
-
type: string;
|
|
559
|
-
};
|
|
560
|
-
counters: {
|
|
561
|
-
type: string;
|
|
562
|
-
additionalProperties: boolean;
|
|
563
|
-
required: never[];
|
|
564
|
-
properties: {
|
|
565
|
-
include: {
|
|
566
|
-
type: string;
|
|
567
|
-
items: {
|
|
568
|
-
type: string;
|
|
569
|
-
};
|
|
570
|
-
};
|
|
571
|
-
exclude: {
|
|
572
|
-
type: string;
|
|
573
|
-
items: {
|
|
574
|
-
type: string;
|
|
575
|
-
};
|
|
576
|
-
};
|
|
577
|
-
};
|
|
578
|
-
};
|
|
579
|
-
blockName: {
|
|
580
|
-
type: string;
|
|
581
|
-
};
|
|
582
|
-
};
|
|
583
|
-
};
|
|
584
|
-
})[];
|
|
585
|
-
};
|
|
586
502
|
target: {
|
|
587
503
|
type: string;
|
|
588
504
|
enum: string[];
|
|
@@ -642,9 +558,6 @@ export declare const BlockBaseProps: {
|
|
|
642
558
|
resetPaddings: {
|
|
643
559
|
type: string;
|
|
644
560
|
};
|
|
645
|
-
blockName: {
|
|
646
|
-
type: string;
|
|
647
|
-
};
|
|
648
561
|
type: {};
|
|
649
562
|
when: {};
|
|
650
563
|
};
|
|
@@ -716,9 +629,6 @@ export declare const ButtonBlock: {
|
|
|
716
629
|
};
|
|
717
630
|
})[];
|
|
718
631
|
};
|
|
719
|
-
/**
|
|
720
|
-
* @deprecated Metrika will be deleted
|
|
721
|
-
*/
|
|
722
632
|
metrikaGoals: {
|
|
723
633
|
anyOf: ({
|
|
724
634
|
type: string;
|
|
@@ -748,9 +658,6 @@ export declare const ButtonBlock: {
|
|
|
748
658
|
};
|
|
749
659
|
})[];
|
|
750
660
|
};
|
|
751
|
-
/**
|
|
752
|
-
* @deprecated Pixel will be deleted
|
|
753
|
-
*/
|
|
754
661
|
pixelEvents: {
|
|
755
662
|
type: string;
|
|
756
663
|
items: {
|
|
@@ -807,84 +714,6 @@ export declare const ButtonBlock: {
|
|
|
807
714
|
};
|
|
808
715
|
};
|
|
809
716
|
};
|
|
810
|
-
analyticsEvents: {
|
|
811
|
-
anyOf: ({
|
|
812
|
-
type: string;
|
|
813
|
-
additionalProperties: {
|
|
814
|
-
type: string;
|
|
815
|
-
};
|
|
816
|
-
required: string[];
|
|
817
|
-
properties: {
|
|
818
|
-
name: {
|
|
819
|
-
type: string;
|
|
820
|
-
};
|
|
821
|
-
type: {
|
|
822
|
-
type: string;
|
|
823
|
-
};
|
|
824
|
-
counters: {
|
|
825
|
-
type: string;
|
|
826
|
-
additionalProperties: boolean;
|
|
827
|
-
required: never[];
|
|
828
|
-
properties: {
|
|
829
|
-
include: {
|
|
830
|
-
type: string;
|
|
831
|
-
items: {
|
|
832
|
-
type: string;
|
|
833
|
-
};
|
|
834
|
-
};
|
|
835
|
-
exclude: {
|
|
836
|
-
type: string;
|
|
837
|
-
items: {
|
|
838
|
-
type: string;
|
|
839
|
-
};
|
|
840
|
-
};
|
|
841
|
-
};
|
|
842
|
-
};
|
|
843
|
-
blockName: {
|
|
844
|
-
type: string;
|
|
845
|
-
};
|
|
846
|
-
};
|
|
847
|
-
} | {
|
|
848
|
-
type: string;
|
|
849
|
-
items: {
|
|
850
|
-
type: string;
|
|
851
|
-
additionalProperties: {
|
|
852
|
-
type: string;
|
|
853
|
-
};
|
|
854
|
-
required: string[];
|
|
855
|
-
properties: {
|
|
856
|
-
name: {
|
|
857
|
-
type: string;
|
|
858
|
-
};
|
|
859
|
-
type: {
|
|
860
|
-
type: string;
|
|
861
|
-
};
|
|
862
|
-
counters: {
|
|
863
|
-
type: string;
|
|
864
|
-
additionalProperties: boolean;
|
|
865
|
-
required: never[];
|
|
866
|
-
properties: {
|
|
867
|
-
include: {
|
|
868
|
-
type: string;
|
|
869
|
-
items: {
|
|
870
|
-
type: string;
|
|
871
|
-
};
|
|
872
|
-
};
|
|
873
|
-
exclude: {
|
|
874
|
-
type: string;
|
|
875
|
-
items: {
|
|
876
|
-
type: string;
|
|
877
|
-
};
|
|
878
|
-
};
|
|
879
|
-
};
|
|
880
|
-
};
|
|
881
|
-
blockName: {
|
|
882
|
-
type: string;
|
|
883
|
-
};
|
|
884
|
-
};
|
|
885
|
-
};
|
|
886
|
-
})[];
|
|
887
|
-
};
|
|
888
717
|
target: {
|
|
889
718
|
type: string;
|
|
890
719
|
enum: string[];
|
|
@@ -4,7 +4,6 @@ exports.BlockHeaderProps = exports.CardBase = exports.MediaProps = exports.Butto
|
|
|
4
4
|
const pixel_1 = require("./pixel");
|
|
5
5
|
const models_1 = require("../../models");
|
|
6
6
|
const schema_1 = require("../../components/Image/schema");
|
|
7
|
-
const event_1 = require("./event");
|
|
8
7
|
exports.mediaDirection = ['media-content', 'content-media'];
|
|
9
8
|
exports.textSize = ['s', 'm', 'l'];
|
|
10
9
|
exports.containerSizesArray = ['sm', 'md', 'lg', 'xl', 'all'];
|
|
@@ -310,9 +309,6 @@ exports.ButtonProps = {
|
|
|
310
309
|
},
|
|
311
310
|
],
|
|
312
311
|
},
|
|
313
|
-
/**
|
|
314
|
-
* @deprecated Metrika will be deleted
|
|
315
|
-
*/
|
|
316
312
|
metrikaGoals: {
|
|
317
313
|
anyOf: [
|
|
318
314
|
{ type: 'string' },
|
|
@@ -335,13 +331,7 @@ exports.ButtonProps = {
|
|
|
335
331
|
},
|
|
336
332
|
],
|
|
337
333
|
},
|
|
338
|
-
/**
|
|
339
|
-
* @deprecated Pixel will be deleted
|
|
340
|
-
*/
|
|
341
334
|
pixelEvents: pixel_1.pixelEvents,
|
|
342
|
-
analyticsEvents: {
|
|
343
|
-
anyOf: [event_1.AnalyticsEventSchema, { type: 'array', items: event_1.AnalyticsEventSchema }],
|
|
344
|
-
},
|
|
345
335
|
target: {
|
|
346
336
|
type: 'string',
|
|
347
337
|
enum: ['_self', '_blank', '_parent', '_top'],
|
|
@@ -390,8 +380,6 @@ exports.BlockBaseProps = Object.assign(Object.assign({}, exports.BaseProps), { a
|
|
|
390
380
|
enum: exports.containerSizesArray,
|
|
391
381
|
}, resetPaddings: {
|
|
392
382
|
type: 'boolean',
|
|
393
|
-
}, blockName: {
|
|
394
|
-
type: 'string',
|
|
395
383
|
} });
|
|
396
384
|
exports.TitleProps = {
|
|
397
385
|
type: 'object',
|
|
@@ -6,6 +6,7 @@ export * from '../../sub-blocks/NewsCard/schema';
|
|
|
6
6
|
export * from '../../sub-blocks/Partner/schema';
|
|
7
7
|
export * from '../../sub-blocks/TutorialCard/schema';
|
|
8
8
|
export * from '../../sub-blocks/CardWithImage/schema';
|
|
9
|
+
export * from '../../sub-blocks/LayoutItem/schema';
|
|
9
10
|
export * from '../../sub-blocks/Quote/schema';
|
|
10
11
|
export * from '../../sub-blocks/Divider/schema';
|
|
11
12
|
export * from '../../sub-blocks/BasicCard/schema';
|
|
@@ -9,6 +9,7 @@ tslib_1.__exportStar(require("../../sub-blocks/NewsCard/schema"), exports);
|
|
|
9
9
|
tslib_1.__exportStar(require("../../sub-blocks/Partner/schema"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("../../sub-blocks/TutorialCard/schema"), exports);
|
|
11
11
|
tslib_1.__exportStar(require("../../sub-blocks/CardWithImage/schema"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("../../sub-blocks/LayoutItem/schema"), exports);
|
|
12
13
|
tslib_1.__exportStar(require("../../sub-blocks/Quote/schema"), exports);
|
|
13
14
|
tslib_1.__exportStar(require("../../sub-blocks/Divider/schema"), exports);
|
|
14
15
|
tslib_1.__exportStar(require("../../sub-blocks/BasicCard/schema"), exports);
|
|
@@ -4,12 +4,11 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
6
|
const components_1 = require("../../components/");
|
|
7
|
-
const models_1 = require("../../models");
|
|
8
7
|
const Content_1 = tslib_1.__importDefault(require("../Content/Content"));
|
|
9
8
|
const ThemeValueContext_1 = require("../../context/theme/ThemeValueContext");
|
|
10
9
|
const b = (0, utils_1.block)('background-card');
|
|
11
10
|
const BackgroundCard = (props) => {
|
|
12
|
-
const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons,
|
|
11
|
+
const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, } = props;
|
|
13
12
|
const { themeValue: theme } = (0, react_1.useContext)(ThemeValueContext_1.ThemeValueContext);
|
|
14
13
|
const hasBackgroundColor = backgroundColor || cardTheme !== 'default';
|
|
15
14
|
const link = hasBackgroundColor || border === 'line' ? undefined : url;
|
|
@@ -17,6 +16,6 @@ const BackgroundCard = (props) => {
|
|
|
17
16
|
return (react_1.default.createElement(components_1.CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), url: link, border: borderType },
|
|
18
17
|
react_1.default.createElement(components_1.CardBase.Content, null,
|
|
19
18
|
react_1.default.createElement(components_1.BackgroundImage, Object.assign({ className: b('image') }, (0, utils_1.getThemedValue)(background, theme), { style: { backgroundColor } })),
|
|
20
|
-
react_1.default.createElement(Content_1.default, { title: title, text: text, additionalInfo: additionalInfo, size: "s", theme: cardTheme, links: links, buttons: buttons, colSizes: { all: 12, md: 12 }
|
|
19
|
+
react_1.default.createElement(Content_1.default, { title: title, text: text, additionalInfo: additionalInfo, size: "s", theme: cardTheme, links: links, buttons: buttons, colSizes: { all: 12, md: 12 } }))));
|
|
21
20
|
};
|
|
22
21
|
exports.default = BackgroundCard;
|
|
@@ -4,12 +4,11 @@ exports.BannerCard = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const utils_1 = require("../../utils");
|
|
7
|
-
const models_1 = require("../../models");
|
|
8
7
|
const components_1 = require("../../components");
|
|
9
8
|
const ThemeValueContext_1 = require("../../context/theme/ThemeValueContext");
|
|
10
9
|
const b = (0, utils_1.block)('banner-card');
|
|
11
10
|
const BannerCard = (props) => {
|
|
12
|
-
const { title, subtitle, button: { url, text, target }, color, theme: textTheme = 'light', image, disableCompress,
|
|
11
|
+
const { title, subtitle, button: { url, text, target }, color, theme: textTheme = 'light', image, disableCompress, } = props;
|
|
13
12
|
const { themeValue: theme } = (0, react_1.useContext)(ThemeValueContext_1.ThemeValueContext);
|
|
14
13
|
const contentStyle = {};
|
|
15
14
|
if (color) {
|
|
@@ -22,7 +21,7 @@ const BannerCard = (props) => {
|
|
|
22
21
|
react_1.default.createElement("h2", { className: b('title') },
|
|
23
22
|
react_1.default.createElement(components_1.HTML, null, title)),
|
|
24
23
|
subtitle && (react_1.default.createElement(components_1.YFMWrapper, { className: b('subtitle'), content: subtitle, modifiers: { constructor: true } }))),
|
|
25
|
-
react_1.default.createElement(components_1.Button, { className: b('button'), theme: "raised", size: "xl", text: text, url: url, target: target
|
|
24
|
+
react_1.default.createElement(components_1.Button, { className: b('button'), theme: "raised", size: "xl", text: text, url: url, target: target })),
|
|
26
25
|
react_1.default.createElement(components_1.BackgroundImage, { className: b('image'), src: (0, utils_1.getThemedValue)(image, theme), disableCompress: disableCompress }))));
|
|
27
26
|
};
|
|
28
27
|
exports.BannerCard = BannerCard;
|
|
@@ -4,17 +4,16 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
6
|
const CardBase_1 = tslib_1.__importDefault(require("../../components/CardBase/CardBase"));
|
|
7
|
-
const models_1 = require("../../models");
|
|
8
7
|
const Image_1 = tslib_1.__importDefault(require("../../components/Image/Image"));
|
|
9
8
|
const __1 = require("../");
|
|
10
9
|
const utils_2 = require("../../components/Media/Image/utils");
|
|
11
10
|
const b = (0, utils_1.block)('basic-card');
|
|
12
11
|
const BasicCard = (props) => {
|
|
13
|
-
const { url, title, text, border, icon, additionalInfo, links, buttons
|
|
12
|
+
const { url, title, text, border, icon, additionalInfo, links, buttons } = props;
|
|
14
13
|
const iconProps = icon && (0, utils_2.getMediaImage)(icon);
|
|
15
14
|
return (react_1.default.createElement(CardBase_1.default, { className: b(), url: url, border: border },
|
|
16
15
|
react_1.default.createElement(CardBase_1.default.Content, null,
|
|
17
16
|
iconProps && react_1.default.createElement(Image_1.default, Object.assign({}, iconProps, { className: b('icon') })),
|
|
18
|
-
react_1.default.createElement(__1.Content, { title: title, text: text, additionalInfo: additionalInfo, links: links, buttons: buttons, colSizes: { all: 12, md: 12 }, size: "s"
|
|
17
|
+
react_1.default.createElement(__1.Content, { title: title, text: text, additionalInfo: additionalInfo, links: links, buttons: buttons, colSizes: { all: 12, md: 12 }, size: "s" }))));
|
|
19
18
|
};
|
|
20
19
|
exports.default = BasicCard;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CardWithImageProps } from '../../models';
|
|
2
|
-
declare const CardWithImage: ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons,
|
|
2
|
+
declare const CardWithImage: ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons, }: CardWithImageProps) => JSX.Element;
|
|
3
3
|
export default CardWithImage;
|
|
@@ -3,15 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
|
-
const models_1 = require("../../models");
|
|
7
6
|
const components_1 = require("../../components");
|
|
8
7
|
const __1 = require("../");
|
|
9
8
|
const b = (0, utils_1.block)('card-with-image');
|
|
10
|
-
const CardWithImage = ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons,
|
|
9
|
+
const CardWithImage = ({ title, description, image, disableCompress, links, border, fullScreen, className, additionalInfo, buttons, }) => {
|
|
11
10
|
const unifiedLinks = links === null || links === void 0 ? void 0 : links.map((link) => (Object.assign(Object.assign({ theme: 'normal' }, link), { text: link.title, url: link.link })));
|
|
12
11
|
return (react_1.default.createElement("div", { className: b(null, className) },
|
|
13
12
|
react_1.default.createElement("div", { className: b('image', { border }) }, fullScreen ? (react_1.default.createElement(components_1.FullscreenImage, { src: image, imageClassName: b('image-item'), disableCompress: disableCompress })) : (react_1.default.createElement(components_1.Image, { className: b('image-item'), src: image, alt: 'card-image', disableCompress: disableCompress }))),
|
|
14
13
|
react_1.default.createElement("div", { className: b('content') },
|
|
15
|
-
react_1.default.createElement(__1.Content, { title: title, text: description, links: unifiedLinks, additionalInfo: additionalInfo, buttons: buttons, size: "s", colSizes: { all: 12, md: 12 }
|
|
14
|
+
react_1.default.createElement(__1.Content, { title: title, text: description, links: unifiedLinks, additionalInfo: additionalInfo, buttons: buttons, size: "s", colSizes: { all: 12, md: 12 } }))));
|
|
16
15
|
};
|
|
17
16
|
exports.default = CardWithImage;
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
|
-
const models_1 = require("../../models");
|
|
7
6
|
const components_1 = require("../../components");
|
|
8
7
|
const Link_1 = tslib_1.__importDefault(require("../../components/Link/Link"));
|
|
9
8
|
const grid_1 = require("../../grid");
|
|
@@ -36,7 +35,7 @@ function getButtonSize(size) {
|
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
const Content = (props) => {
|
|
39
|
-
const { title, text, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className,
|
|
38
|
+
const { title, text, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, } = props;
|
|
40
39
|
const titleProps = tslib_1.__rest(!title || typeof title === 'string'
|
|
41
40
|
? { text: title, textSize: getTextSize(size) }
|
|
42
41
|
: title, []);
|
|
@@ -51,7 +50,7 @@ const Content = (props) => {
|
|
|
51
50
|
'constructor-notice': true,
|
|
52
51
|
[`constructor-size-${size}`]: true,
|
|
53
52
|
} }))),
|
|
54
|
-
links && (react_1.default.createElement("div", { className: b('links') }, links.map((link) => (react_1.default.createElement(Link_1.default, Object.assign({ className: b('link') }, link, { textSize: getLinkSize(size), key: link.url
|
|
55
|
-
buttons && (react_1.default.createElement("div", { className: b('buttons') }, buttons.map((item) => (react_1.default.createElement(components_1.Button, Object.assign({ className: b('button') }, item, { key: item.url, size: getButtonSize(size)
|
|
53
|
+
links && (react_1.default.createElement("div", { className: b('links') }, links.map((link) => (react_1.default.createElement(Link_1.default, Object.assign({ className: b('link') }, link, { textSize: getLinkSize(size), key: link.url })))))),
|
|
54
|
+
buttons && (react_1.default.createElement("div", { className: b('buttons') }, buttons.map((item) => (react_1.default.createElement(components_1.Button, Object.assign({ className: b('button') }, item, { key: item.url, size: getButtonSize(size) }))))))));
|
|
56
55
|
};
|
|
57
56
|
exports.default = Content;
|
|
@@ -46,7 +46,7 @@ unpredictable css rules order in build */
|
|
|
46
46
|
color: var(--yc-color-text-primary);
|
|
47
47
|
background-color: transparent;
|
|
48
48
|
border: 1px solid var(--yc-color-line-generic);
|
|
49
|
-
border-radius:
|
|
49
|
+
border-radius: var(--yc-border-radius-l);
|
|
50
50
|
}
|
|
51
51
|
.pc-hubspot-form .hs-form-field .input input[type=text]:hover,
|
|
52
52
|
.pc-hubspot-form .hs-form-field .input input[type=number]:hover,
|
|
@@ -276,7 +276,7 @@ unpredictable css rules order in build */
|
|
|
276
276
|
box-sizing: border-box;
|
|
277
277
|
height: 44px;
|
|
278
278
|
padding: 0 20px;
|
|
279
|
-
border-radius:
|
|
279
|
+
border-radius: var(--yc-border-radius-xl);
|
|
280
280
|
background-color: var(--yc-color-base-special);
|
|
281
281
|
color: var(--yc-my-color-brand-text-contrast);
|
|
282
282
|
line-height: 44px;
|
|
@@ -6,21 +6,14 @@ const utils_1 = require("../../utils");
|
|
|
6
6
|
const ThemeValueContext_1 = require("../../context/theme/ThemeValueContext");
|
|
7
7
|
const mobileContext_1 = require("../../context/mobileContext");
|
|
8
8
|
const useMetrika_1 = require("../../hooks/useMetrika");
|
|
9
|
-
const models_1 = require("../../models");
|
|
10
9
|
const hooks_1 = require("../../hooks");
|
|
11
10
|
const HubspotFormContainer_1 = tslib_1.__importDefault(require("./HubspotFormContainer"));
|
|
12
|
-
const constants_1 = require("../../constants");
|
|
13
11
|
const b = (0, utils_1.block)('hubspot-form');
|
|
14
12
|
const HubspotForm = (props) => {
|
|
15
13
|
const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName, pixelEvents,
|
|
16
14
|
// hubspotEvents, // TODO: decide how to handle them
|
|
17
|
-
|
|
15
|
+
onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, onSubmitError, } = props;
|
|
18
16
|
const handleMetrika = (0, useMetrika_1.useMetrika)();
|
|
19
|
-
const handleAnalytics = (0, hooks_1.useAnalytics)({
|
|
20
|
-
name: 'hubspot-form-submit',
|
|
21
|
-
type: constants_1.DEFAULT_EVENT_TYPE,
|
|
22
|
-
blockName: blockName,
|
|
23
|
-
});
|
|
24
17
|
const { themeValue } = (0, react_1.useContext)(ThemeValueContext_1.ThemeValueContext);
|
|
25
18
|
const isMobileValue = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
26
19
|
const theme = themeProp !== null && themeProp !== void 0 ? themeProp : themeValue;
|
|
@@ -29,21 +22,12 @@ const HubspotForm = (props) => {
|
|
|
29
22
|
onBeforeLoad,
|
|
30
23
|
onBeforeSubmit,
|
|
31
24
|
onLoad,
|
|
25
|
+
onSubmitError,
|
|
32
26
|
onSubmit: (e) => {
|
|
33
27
|
handleMetrika === null || handleMetrika === void 0 ? void 0 : handleMetrika({ pixelEvents });
|
|
34
|
-
handleAnalytics === null || handleAnalytics === void 0 ? void 0 : handleAnalytics(analyticsEvents);
|
|
35
28
|
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(e);
|
|
36
29
|
},
|
|
37
|
-
}), [
|
|
38
|
-
onBeforeLoad,
|
|
39
|
-
onBeforeSubmit,
|
|
40
|
-
onLoad,
|
|
41
|
-
handleMetrika,
|
|
42
|
-
pixelEvents,
|
|
43
|
-
handleAnalytics,
|
|
44
|
-
analyticsEvents,
|
|
45
|
-
onSubmit,
|
|
46
|
-
]);
|
|
30
|
+
}), [onBeforeLoad, onBeforeSubmit, onLoad, handleMetrika, pixelEvents, onSubmit, onSubmitError]);
|
|
47
31
|
(0, hooks_1.useHandleHubspotEvents)(handlers, formId);
|
|
48
32
|
return (react_1.default.createElement(HubspotFormContainer_1.default, { key: [formClassName, formId, formInstanceId, portalId, region].join(), className: b({ theme, mobile }, className), formClassName: formClassName, formId: formId, portalId: portalId, formInstanceId: formInstanceId, region: region }));
|
|
49
33
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-layout-item__media {
|
|
4
|
+
width: 100%;
|
|
5
|
+
display: block;
|
|
6
|
+
border-radius: var(--pc-border-radius);
|
|
7
|
+
}
|
|
8
|
+
.pc-layout-item__media_border {
|
|
9
|
+
border: 1px solid var(--yc-color-line-generic);
|
|
10
|
+
}
|
|
11
|
+
.pc-layout-item__meta-info {
|
|
12
|
+
margin: 16px 0 -8px 0;
|
|
13
|
+
}
|
|
14
|
+
.pc-layout-item__content {
|
|
15
|
+
margin: 16px 16px 0 0;
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
6
|
+
const components_1 = require("../../components");
|
|
7
|
+
const utils_2 = require("./utils");
|
|
8
|
+
const __1 = require("..");
|
|
9
|
+
const b = (0, utils_1.block)('layout-item');
|
|
10
|
+
const LayoutItem = (_a) => {
|
|
11
|
+
var _b = _a.content, { links } = _b, content = tslib_1.__rest(_b, ["links"]), { metaInfo, media, border, fullScreen, className } = _a;
|
|
12
|
+
return (react_1.default.createElement("div", { className: b(null, className) },
|
|
13
|
+
fullScreen && (0, utils_2.hasFullScreen)(media) ? (react_1.default.createElement(components_1.FullScreenMedia, { showFullScreenIcon: (0, utils_2.showFullScreenIcon)(media) }, (_a = {}) => {
|
|
14
|
+
var { className: mediaClassName } = _a, fullScreenMediaProps = tslib_1.__rest(_a, ["className"]);
|
|
15
|
+
return (react_1.default.createElement(components_1.Media, Object.assign({}, media, fullScreenMediaProps, { className: b('media', { border }, mediaClassName) })));
|
|
16
|
+
})) : (react_1.default.createElement(components_1.Media, Object.assign({}, media, { className: b('media', { border }) }))),
|
|
17
|
+
metaInfo && react_1.default.createElement(components_1.MetaInfo, { items: metaInfo, className: b('meta-info') }),
|
|
18
|
+
react_1.default.createElement("div", { className: b('content') },
|
|
19
|
+
react_1.default.createElement(__1.Content, Object.assign({}, content, { links: (0, utils_2.getLayoutItemLinks)(links), size: "s", colSizes: { all: 12, md: 12 } })))));
|
|
20
|
+
};
|
|
21
|
+
exports.default = LayoutItem;
|