@gravity-ui/page-constructor 4.1.2 → 4.3.12-alpha.3
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/README.md +4 -0
- package/build/cjs/blocks/CardLayout/CardLayout.d.ts +2 -2
- package/build/cjs/blocks/CardLayout/CardLayout.js +1 -1
- package/build/cjs/blocks/ContentLayout/schema.d.ts +38 -0
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +7 -3
- package/build/cjs/blocks/Header/Header.css +0 -6
- package/build/cjs/blocks/Icons/Icons.js +7 -1
- package/build/cjs/blocks/Icons/schema.d.ts +162 -0
- package/build/cjs/blocks/Icons/schema.js +11 -0
- package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +1 -1
- package/build/cjs/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +50 -0
- package/build/cjs/blocks/Questions/QuestionBlockItem/QuestionBlockItem.d.ts +2 -0
- package/build/cjs/blocks/Questions/QuestionBlockItem/QuestionBlockItem.js +27 -0
- package/build/cjs/blocks/Questions/Questions.css +0 -48
- package/build/cjs/blocks/Questions/Questions.js +7 -27
- package/build/cjs/blocks/Questions/models.d.ts +10 -0
- package/build/cjs/blocks/Questions/models.js +13 -0
- package/build/cjs/blocks/Slider/Arrow/Arrow.js +2 -1
- package/build/cjs/blocks/Slider/Slider.css +4 -1
- package/build/cjs/blocks/Slider/Slider.js +32 -6
- package/build/cjs/blocks/Slider/i18n/en.json +4 -0
- package/build/cjs/blocks/Slider/i18n/index.d.ts +2 -0
- package/build/cjs/blocks/Slider/i18n/index.js +8 -0
- package/build/cjs/blocks/Slider/i18n/ru.json +4 -0
- package/build/cjs/components/BackLink/BackLink.d.ts +2 -1
- package/build/cjs/components/BackLink/BackLink.js +2 -2
- package/build/cjs/components/BackgroundImage/BackgroundImage.d.ts +1 -0
- package/build/cjs/components/BackgroundImage/BackgroundImage.js +5 -2
- package/build/cjs/components/BackgroundMedia/BackgroundMedia.d.ts +1 -1
- package/build/cjs/components/BackgroundMedia/BackgroundMedia.js +4 -3
- package/build/cjs/components/ButtonTabs/ButtonTabs.js +6 -1
- package/build/cjs/components/CardBase/CardBase.css +4 -4
- package/build/cjs/components/FileLink/FileLink.js +2 -2
- package/build/cjs/components/FullscreenImage/FullscreenImage.js +1 -1
- package/build/cjs/components/FullscreenImage/i18n/en.json +2 -1
- package/build/cjs/components/FullscreenImage/i18n/ru.json +2 -1
- package/build/cjs/components/HTML/HTML.d.ts +5 -1
- package/build/cjs/components/HTML/HTML.js +3 -1
- package/build/cjs/components/Image/Image.js +7 -5
- package/build/cjs/components/Image/i18n/en.json +1 -1
- package/build/cjs/components/Image/i18n/ru.json +1 -1
- package/build/cjs/components/Image/schema.d.ts +19 -0
- package/build/cjs/components/Image/schema.js +12 -1
- package/build/cjs/components/Link/Link.d.ts +3 -2
- package/build/cjs/components/Link/Link.js +8 -6
- package/build/cjs/components/Media/Image/Image.d.ts +3 -2
- package/build/cjs/components/Media/Image/Image.js +8 -5
- package/build/cjs/components/Media/Media.d.ts +2 -2
- package/build/cjs/components/Media/Media.js +9 -7
- package/build/cjs/components/Media/Video/Video.d.ts +2 -2
- package/build/cjs/components/Media/Video/Video.js +15 -6
- package/build/cjs/components/MetaInfo/MetaInfo.css +0 -2
- package/build/cjs/components/MetaInfo/MetaInfo.js +2 -1
- package/build/cjs/components/ReactPlayer/CustomBarControls.css +46 -14
- package/build/cjs/components/ReactPlayer/CustomBarControls.d.ts +4 -1
- package/build/cjs/components/ReactPlayer/CustomBarControls.js +33 -9
- package/build/cjs/components/ReactPlayer/ReactPlayer.css +12 -0
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +52 -27
- package/build/cjs/components/ReactPlayer/i18n/en.json +6 -0
- package/build/cjs/components/ReactPlayer/i18n/index.d.ts +2 -0
- package/build/cjs/components/ReactPlayer/i18n/index.js +8 -0
- package/build/cjs/components/ReactPlayer/i18n/ru.json +6 -0
- package/build/cjs/components/Table/Table.js +11 -5
- package/build/cjs/components/VideoBlock/VideoBlock.js +7 -6
- package/build/cjs/components/YFMWrapper/YFMWrapper.d.ts +4 -3
- package/build/cjs/components/YFMWrapper/YFMWrapper.js +3 -3
- package/build/cjs/components/constants.d.ts +0 -4
- package/build/cjs/components/constants.js +1 -5
- package/build/cjs/constructor-items.d.ts +10 -3
- package/build/cjs/constructor-items.js +11 -1
- package/build/cjs/containers/Loadable/Loadable.js +2 -2
- package/build/cjs/containers/PageConstructor/PageConstructor.css +4 -0
- package/build/cjs/containers/PageConstructor/PageConstructor.d.ts +2 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.js +10 -6
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +38 -0
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +3 -2
- package/build/cjs/context/innerContext/InnerContext.d.ts +3 -1
- package/build/cjs/context/innerContext/InnerContext.js +2 -0
- package/build/cjs/editor/components/AddBlock/AddBlock.css +1 -1
- package/build/cjs/editor/components/EditBlock/EditBlock.css +1 -0
- package/build/cjs/editor/components/Layout/Layout.css +2 -1
- package/build/cjs/editor/containers/Form/Form.css +14 -35
- package/build/cjs/editor/store/index.js +1 -1
- package/build/cjs/editor/styles/root.css +2 -1
- package/build/cjs/editor/utils/index.d.ts +1 -0
- package/build/cjs/grid/Col/Col.d.ts +3 -4
- package/build/cjs/grid/Col/Col.js +2 -2
- package/build/cjs/icons/Mute.d.ts +2 -0
- package/build/cjs/icons/Mute.js +12 -0
- package/build/cjs/icons/MuteSmall.d.ts +2 -0
- package/build/cjs/icons/MuteSmall.js +15 -0
- package/build/cjs/icons/Unmute.d.ts +2 -0
- package/build/cjs/icons/Unmute.js +12 -0
- package/build/cjs/icons/UnmuteSmall.d.ts +2 -0
- package/build/cjs/icons/UnmuteSmall.js +17 -0
- package/build/cjs/icons/VideoControlPause.d.ts +2 -0
- package/build/cjs/icons/VideoControlPause.js +16 -0
- package/build/cjs/icons/VideoControlPlay.d.ts +2 -0
- package/build/cjs/icons/VideoControlPlay.js +12 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +16 -5
- package/build/cjs/models/constructor-items/common.d.ts +22 -36
- package/build/cjs/models/constructor-items/common.js +6 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +4 -4
- package/build/cjs/models/constructor.d.ts +7 -1
- package/build/cjs/models/navigation.d.ts +1 -0
- package/build/cjs/models/navigation.js +2 -1
- package/build/cjs/navigation/components/MobileMenuButton/MobileMenuButton.js +1 -0
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.css +1 -1
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +4 -16
- package/build/cjs/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js +1 -1
- package/build/cjs/navigation/components/NavigationItem/index.d.ts +6 -0
- package/build/cjs/navigation/components/NavigationItem/index.js +14 -0
- package/build/cjs/navigation/components/NavigationListItem/NavigationListItem.js +1 -1
- package/build/cjs/navigation/components/NavigationPopup/NavigationPopup.js +1 -1
- package/build/cjs/navigation/components/SocialIcon/SocialIcon.js +2 -1
- package/build/cjs/schema/constants.d.ts +181 -78
- package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +2 -3
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +100 -0
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +10 -0
- package/build/cjs/sub-blocks/Content/Content.d.ts +3 -1
- package/build/cjs/sub-blocks/Content/Content.js +7 -5
- package/build/cjs/sub-blocks/Content/ContentList/ContentList.d.ts +2 -1
- package/build/cjs/sub-blocks/Content/ContentList/ContentList.js +17 -5
- package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +2 -2
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +3 -3
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +81 -0
- package/build/cjs/sub-blocks/LayoutItem/schema.js +10 -0
- package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +1 -0
- package/build/cjs/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
- package/build/cjs/sub-blocks/MediaCard/MediaCard.js +2 -2
- package/build/cjs/sub-blocks/MediaCard/schema.d.ts +81 -78
- package/build/cjs/sub-blocks/MediaCard/schema.js +11 -1
- package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.d.ts +2 -2
- package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.js +2 -2
- package/build/cjs/sub-blocks/PriceDetailed/SeparatePriceDetailed/SeparatePriceDetailed.js +7 -4
- package/build/cjs/sub-blocks/PriceDetailed/schema.js +11 -1
- package/build/cjs/sub-blocks/Quote/Quote.css +0 -3
- package/build/cjs/text-transform/common.d.ts +7 -2
- package/build/cjs/text-transform/common.js +8 -2
- package/build/cjs/text-transform/config.js +1 -1
- package/build/cjs/text-transform/transformers.d.ts +2 -0
- package/build/cjs/text-transform/transformers.js +11 -8
- package/build/cjs/utils/blocks.d.ts +4 -7
- package/build/cjs/utils/blocks.js +27 -18
- package/build/cjs/utils/cn.d.ts +3 -3
- package/build/cjs/utils/cn.js +4 -7
- package/build/esm/blocks/CardLayout/CardLayout.d.ts +2 -2
- package/build/esm/blocks/CardLayout/CardLayout.js +1 -1
- package/build/esm/blocks/ContentLayout/schema.d.ts +38 -0
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +7 -3
- package/build/esm/blocks/Header/Header.css +0 -6
- package/build/esm/blocks/Icons/Icons.js +8 -2
- package/build/esm/blocks/Icons/schema.d.ts +162 -0
- package/build/esm/blocks/Icons/schema.js +11 -0
- package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +1 -1
- package/build/esm/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +50 -0
- package/build/esm/blocks/Questions/QuestionBlockItem/QuestionBlockItem.d.ts +3 -0
- package/build/esm/blocks/Questions/QuestionBlockItem/QuestionBlockItem.js +23 -0
- package/build/esm/blocks/Questions/Questions.css +0 -48
- package/build/esm/blocks/Questions/Questions.js +6 -26
- package/build/esm/blocks/Questions/models.d.ts +10 -0
- package/build/esm/blocks/Questions/models.js +10 -0
- package/build/esm/blocks/Slider/Arrow/Arrow.js +2 -1
- package/build/esm/blocks/Slider/Slider.css +4 -1
- package/build/esm/blocks/Slider/Slider.js +33 -7
- package/build/esm/blocks/Slider/i18n/en.json +4 -0
- package/build/esm/blocks/Slider/i18n/index.d.ts +2 -0
- package/build/esm/blocks/Slider/i18n/index.js +5 -0
- package/build/esm/blocks/Slider/i18n/ru.json +4 -0
- package/build/esm/components/BackLink/BackLink.d.ts +2 -1
- package/build/esm/components/BackLink/BackLink.js +2 -2
- package/build/esm/components/BackgroundImage/BackgroundImage.d.ts +1 -0
- package/build/esm/components/BackgroundImage/BackgroundImage.js +5 -3
- package/build/esm/components/BackgroundMedia/BackgroundMedia.d.ts +1 -1
- package/build/esm/components/BackgroundMedia/BackgroundMedia.js +5 -4
- package/build/esm/components/ButtonTabs/ButtonTabs.js +6 -1
- package/build/esm/components/CardBase/CardBase.css +4 -4
- package/build/esm/components/FileLink/FileLink.js +2 -2
- package/build/esm/components/FullscreenImage/FullscreenImage.js +1 -1
- package/build/esm/components/FullscreenImage/i18n/en.json +2 -1
- package/build/esm/components/FullscreenImage/i18n/ru.json +2 -1
- package/build/esm/components/HTML/HTML.d.ts +5 -1
- package/build/esm/components/HTML/HTML.js +3 -1
- package/build/esm/components/Image/Image.js +7 -5
- package/build/esm/components/Image/i18n/en.json +1 -1
- package/build/esm/components/Image/i18n/ru.json +1 -1
- package/build/esm/components/Image/schema.d.ts +19 -0
- package/build/esm/components/Image/schema.js +12 -1
- package/build/esm/components/Link/Link.d.ts +3 -2
- package/build/esm/components/Link/Link.js +9 -7
- package/build/esm/components/Media/Image/Image.d.ts +3 -2
- package/build/esm/components/Media/Image/Image.js +8 -6
- package/build/esm/components/Media/Media.d.ts +2 -2
- package/build/esm/components/Media/Media.js +10 -8
- package/build/esm/components/Media/Video/Video.d.ts +2 -2
- package/build/esm/components/Media/Video/Video.js +16 -7
- package/build/esm/components/MetaInfo/MetaInfo.css +0 -2
- package/build/esm/components/MetaInfo/MetaInfo.js +2 -1
- package/build/esm/components/ReactPlayer/CustomBarControls.css +46 -14
- package/build/esm/components/ReactPlayer/CustomBarControls.d.ts +4 -1
- package/build/esm/components/ReactPlayer/CustomBarControls.js +34 -10
- package/build/esm/components/ReactPlayer/ReactPlayer.css +12 -0
- package/build/esm/components/ReactPlayer/ReactPlayer.js +55 -30
- package/build/esm/components/ReactPlayer/i18n/en.json +6 -0
- package/build/esm/components/ReactPlayer/i18n/index.d.ts +2 -0
- package/build/esm/components/ReactPlayer/i18n/index.js +5 -0
- package/build/esm/components/ReactPlayer/i18n/ru.json +6 -0
- package/build/esm/components/Table/Table.js +11 -5
- package/build/esm/components/VideoBlock/VideoBlock.js +7 -6
- package/build/esm/components/YFMWrapper/YFMWrapper.d.ts +4 -3
- package/build/esm/components/YFMWrapper/YFMWrapper.js +3 -3
- package/build/esm/components/constants.d.ts +0 -4
- package/build/esm/components/constants.js +0 -4
- package/build/esm/constructor-items.d.ts +10 -3
- package/build/esm/constructor-items.js +10 -1
- package/build/esm/containers/Loadable/Loadable.js +1 -1
- package/build/esm/containers/PageConstructor/PageConstructor.css +4 -0
- package/build/esm/containers/PageConstructor/PageConstructor.d.ts +2 -1
- package/build/esm/containers/PageConstructor/PageConstructor.js +12 -8
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +38 -0
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.d.ts +1 -0
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +4 -2
- package/build/esm/context/innerContext/InnerContext.d.ts +3 -1
- package/build/esm/context/innerContext/InnerContext.js +2 -0
- package/build/esm/editor/components/AddBlock/AddBlock.css +1 -1
- package/build/esm/editor/components/EditBlock/EditBlock.css +1 -0
- package/build/esm/editor/components/Layout/Layout.css +2 -1
- package/build/esm/editor/containers/Form/Form.css +14 -35
- package/build/esm/editor/store/index.js +2 -2
- package/build/esm/editor/styles/root.css +2 -1
- package/build/esm/editor/utils/index.d.ts +1 -0
- package/build/esm/grid/Col/Col.d.ts +3 -4
- package/build/esm/grid/Col/Col.js +2 -2
- package/build/esm/icons/Mute.d.ts +2 -0
- package/build/esm/icons/Mute.js +7 -0
- package/build/esm/icons/MuteSmall.d.ts +2 -0
- package/build/esm/icons/MuteSmall.js +10 -0
- package/build/esm/icons/Unmute.d.ts +2 -0
- package/build/esm/icons/Unmute.js +7 -0
- package/build/esm/icons/UnmuteSmall.d.ts +2 -0
- package/build/esm/icons/UnmuteSmall.js +12 -0
- package/build/esm/icons/VideoControlPause.d.ts +2 -0
- package/build/esm/icons/VideoControlPause.js +11 -0
- package/build/esm/icons/VideoControlPlay.d.ts +2 -0
- package/build/esm/icons/VideoControlPlay.js +7 -0
- package/build/esm/models/constructor-items/blocks.d.ts +16 -5
- package/build/esm/models/constructor-items/common.d.ts +22 -36
- package/build/esm/models/constructor-items/common.js +5 -0
- package/build/esm/models/constructor-items/sub-blocks.d.ts +4 -4
- package/build/esm/models/constructor.d.ts +7 -1
- package/build/esm/models/navigation.d.ts +1 -0
- package/build/esm/models/navigation.js +1 -0
- package/build/esm/navigation/components/MobileMenuButton/MobileMenuButton.js +1 -0
- package/build/esm/navigation/components/NavigationItem/NavigationItem.css +1 -1
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js +5 -17
- package/build/esm/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js +1 -1
- package/build/esm/navigation/components/NavigationItem/index.d.ts +6 -0
- package/build/esm/navigation/components/NavigationItem/index.js +6 -0
- package/build/esm/navigation/components/NavigationListItem/NavigationListItem.js +1 -1
- package/build/esm/navigation/components/NavigationPopup/NavigationPopup.js +1 -1
- package/build/esm/navigation/components/SocialIcon/SocialIcon.js +2 -1
- package/build/esm/schema/constants.d.ts +181 -78
- package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +2 -3
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +100 -0
- package/build/esm/sub-blocks/BackgroundCard/schema.js +10 -0
- package/build/esm/sub-blocks/Content/Content.d.ts +3 -1
- package/build/esm/sub-blocks/Content/Content.js +7 -5
- package/build/esm/sub-blocks/Content/ContentList/ContentList.d.ts +2 -1
- package/build/esm/sub-blocks/Content/ContentList/ContentList.js +17 -5
- package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +2 -2
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +3 -3
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +81 -0
- package/build/esm/sub-blocks/LayoutItem/schema.js +10 -0
- package/build/esm/sub-blocks/LayoutItem/utils.d.ts +1 -0
- package/build/esm/sub-blocks/MediaCard/MediaCard.d.ts +1 -1
- package/build/esm/sub-blocks/MediaCard/MediaCard.js +2 -2
- package/build/esm/sub-blocks/MediaCard/schema.d.ts +81 -78
- package/build/esm/sub-blocks/MediaCard/schema.js +11 -1
- package/build/esm/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.d.ts +2 -2
- package/build/esm/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.js +2 -2
- package/build/esm/sub-blocks/PriceDetailed/SeparatePriceDetailed/SeparatePriceDetailed.js +8 -4
- package/build/esm/sub-blocks/PriceDetailed/schema.js +11 -1
- package/build/esm/sub-blocks/Quote/Quote.css +0 -3
- package/build/esm/text-transform/common.d.ts +7 -2
- package/build/esm/text-transform/common.js +7 -2
- package/build/esm/text-transform/config.js +1 -1
- package/build/esm/text-transform/transformers.d.ts +2 -0
- package/build/esm/text-transform/transformers.js +11 -8
- package/build/esm/utils/blocks.d.ts +4 -7
- package/build/esm/utils/blocks.js +23 -13
- package/build/esm/utils/cn.d.ts +3 -3
- package/build/esm/utils/cn.js +3 -4
- package/package.json +7 -7
- package/server/components/constants.d.ts +0 -4
- package/server/components/constants.js +1 -5
- package/server/models/constructor-items/blocks.d.ts +16 -5
- package/server/models/constructor-items/common.d.ts +22 -36
- package/server/models/constructor-items/common.js +6 -1
- package/server/models/constructor-items/sub-blocks.d.ts +4 -4
- package/server/models/constructor.d.ts +7 -1
- package/server/models/navigation.d.ts +1 -0
- package/server/models/navigation.js +2 -1
- package/server/text-transform/common.d.ts +7 -2
- package/server/text-transform/common.js +10 -2
- package/server/text-transform/config.js +1 -1
- package/server/text-transform/transformers.d.ts +2 -0
- package/server/text-transform/transformers.js +11 -8
- package/server/utils/blocks.d.ts +4 -7
- package/server/utils/blocks.js +27 -18
- package/server/utils/cn.d.ts +3 -3
- package/server/utils/cn.js +4 -9
- package/styles/mixins.scss +4 -1
- package/styles/storybook/common.scss +2 -0
- package/styles/styles.css +4 -0
- package/styles/yfm.scss +7 -0
- package/widget/index.js +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MediaVideoControlsType = exports.MediaVideoType = exports.PlayButtonThemes = exports.PlayButtonType = exports.PriceLabelColor = exports.PriceDetailsType = exports.AuthorType = void 0;
|
|
3
|
+
exports.MediaVideoControlsType = exports.MediaVideoType = exports.CustomControlsType = exports.PlayButtonThemes = exports.PlayButtonType = exports.PriceLabelColor = exports.PriceDetailsType = exports.AuthorType = void 0;
|
|
4
4
|
// enums
|
|
5
5
|
var AuthorType;
|
|
6
6
|
(function (AuthorType) {
|
|
@@ -30,6 +30,11 @@ var PlayButtonThemes;
|
|
|
30
30
|
PlayButtonThemes["Blue"] = "blue";
|
|
31
31
|
PlayButtonThemes["Grey"] = "grey";
|
|
32
32
|
})(PlayButtonThemes = exports.PlayButtonThemes || (exports.PlayButtonThemes = {}));
|
|
33
|
+
var CustomControlsType;
|
|
34
|
+
(function (CustomControlsType) {
|
|
35
|
+
CustomControlsType["WithMuteButton"] = "with-mute-button";
|
|
36
|
+
CustomControlsType["WithPlayPauseButton"] = "with-play-pause-button";
|
|
37
|
+
})(CustomControlsType = exports.CustomControlsType || (exports.CustomControlsType = {}));
|
|
33
38
|
var MediaVideoType;
|
|
34
39
|
(function (MediaVideoType) {
|
|
35
40
|
MediaVideoType["Default"] = "default";
|
|
@@ -71,13 +71,13 @@ export interface QuoteProps extends Themable, CardBaseProps {
|
|
|
71
71
|
buttonText?: string;
|
|
72
72
|
theme?: TextTheme;
|
|
73
73
|
}
|
|
74
|
-
export interface BackgroundCardProps extends CardBaseProps, Omit<ContentBlockProps, 'colSizes' | 'centered'> {
|
|
74
|
+
export interface BackgroundCardProps extends CardBaseProps, AnalyticsEventsBase, Omit<ContentBlockProps, 'colSizes' | 'centered'> {
|
|
75
75
|
url?: string;
|
|
76
76
|
background?: ThemeSupporting<ImageObjectProps>;
|
|
77
77
|
paddingBottom?: 's' | 'm' | 'l' | 'xl';
|
|
78
78
|
backgroundColor?: string;
|
|
79
79
|
}
|
|
80
|
-
export interface BasicCardProps extends CardBaseProps, Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {
|
|
80
|
+
export interface BasicCardProps extends CardBaseProps, AnalyticsEventsBase, Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {
|
|
81
81
|
url: string;
|
|
82
82
|
icon?: ImageProps;
|
|
83
83
|
target?: string;
|
|
@@ -92,9 +92,9 @@ export interface BannerCardProps {
|
|
|
92
92
|
theme?: TextTheme;
|
|
93
93
|
button: Pick<ButtonProps, 'text' | 'url' | 'target'>;
|
|
94
94
|
}
|
|
95
|
-
export interface MediaCardProps extends MediaProps, CardBaseProps {
|
|
95
|
+
export interface MediaCardProps extends MediaProps, AnalyticsEventsBase, CardBaseProps {
|
|
96
96
|
}
|
|
97
|
-
export interface LayoutItemProps extends ClassNameProps {
|
|
97
|
+
export interface LayoutItemProps extends ClassNameProps, AnalyticsEventsBase {
|
|
98
98
|
content: Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size'>;
|
|
99
99
|
media: MediaProps;
|
|
100
100
|
metaInfo?: string[];
|
|
@@ -6,7 +6,12 @@ export interface PageData {
|
|
|
6
6
|
export interface Menu {
|
|
7
7
|
title: string;
|
|
8
8
|
}
|
|
9
|
-
export type ConstructorBlock = ConstructorItem | CustomBlock
|
|
9
|
+
export type ConstructorBlock = (ConstructorItem | CustomBlock) & {
|
|
10
|
+
indent?: {
|
|
11
|
+
top?: string;
|
|
12
|
+
bottom?: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
10
15
|
export interface PageContent extends Animatable {
|
|
11
16
|
blocks: ConstructorBlock[];
|
|
12
17
|
menu?: Menu;
|
|
@@ -39,6 +44,7 @@ export interface CustomConfig {
|
|
|
39
44
|
blocks?: CustomItems;
|
|
40
45
|
subBlocks?: CustomItems;
|
|
41
46
|
headers?: CustomItems;
|
|
47
|
+
navigation?: CustomItems;
|
|
42
48
|
loadable?: LoadableConfig;
|
|
43
49
|
decorators?: {
|
|
44
50
|
block?: ((props: BlockDecorationProps) => React.ReactElement)[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NavigationGithubButtonIcon = exports.NavigationItemType = void 0;
|
|
3
|
+
exports.NavigationGithubButtonIcon = exports.NavigationItemTypes = exports.NavigationItemType = void 0;
|
|
4
4
|
var NavigationItemType;
|
|
5
5
|
(function (NavigationItemType) {
|
|
6
6
|
NavigationItemType["Link"] = "link";
|
|
@@ -9,6 +9,7 @@ var NavigationItemType;
|
|
|
9
9
|
NavigationItemType["Social"] = "social";
|
|
10
10
|
NavigationItemType["GithubButton"] = "github-button";
|
|
11
11
|
})(NavigationItemType = exports.NavigationItemType || (exports.NavigationItemType = {}));
|
|
12
|
+
exports.NavigationItemTypes = Object.values(NavigationItemType);
|
|
12
13
|
var NavigationGithubButtonIcon;
|
|
13
14
|
(function (NavigationGithubButtonIcon) {
|
|
14
15
|
NavigationGithubButtonIcon["heart"] = "octicon-heart";
|
|
@@ -10,6 +10,7 @@ const b = (0, utils_1.block)('mobile-menu-button');
|
|
|
10
10
|
const ICON_SIZE = 36;
|
|
11
11
|
const MobileMenuButton = ({ isSidebarOpened, onSidebarOpenedChange, }) => (react_1.default.createElement(components_1.Control, { className: b(), onClick: (e) => {
|
|
12
12
|
e.stopPropagation();
|
|
13
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
13
14
|
onSidebarOpenedChange(!isSidebarOpened);
|
|
14
15
|
}, size: "l", icon: isSidebarOpened ? icons_1.NavigationClose : icons_1.NavigationOpen, iconSize: ICON_SIZE }));
|
|
15
16
|
exports.MobileMenuButton = MobileMenuButton;
|
|
@@ -12,7 +12,7 @@ unpredictable css rules order in build */
|
|
|
12
12
|
.utilityfocus .pc-navigation-item:focus {
|
|
13
13
|
outline: 2px solid #ffdb4d;
|
|
14
14
|
}
|
|
15
|
-
.pc-navigation-item__content:hover, .pc-navigation-item__content:active {
|
|
15
|
+
.pc-navigation-item__content:not(.pc-navigation-item__content_type_button):hover, .pc-navigation-item__content:not(.pc-navigation-item__content_type_button):active {
|
|
16
16
|
color: var(--g-color-text-link);
|
|
17
17
|
}
|
|
18
18
|
.pc-navigation-item_menu-layout_desktop {
|
|
@@ -4,28 +4,16 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
5
|
const lodash_1 = require("lodash");
|
|
6
6
|
const blockIdContext_1 = require("../../../context/blockIdContext");
|
|
7
|
+
const innerContext_1 = require("../../../context/innerContext");
|
|
7
8
|
const models_1 = require("../../../models");
|
|
8
9
|
const utils_1 = require("../../../utils");
|
|
9
|
-
const SocialIcon_1 = tslib_1.__importDefault(require("../SocialIcon/SocialIcon"));
|
|
10
|
-
const GithubButton_1 = require("./components/GithubButton/GithubButton");
|
|
11
|
-
const NavigationButton_1 = require("./components/NavigationButton/NavigationButton");
|
|
12
|
-
const NavigationDropdown_1 = require("./components/NavigationDropdown/NavigationDropdown");
|
|
13
|
-
const NavigationLink_1 = require("./components/NavigationLink/NavigationLink");
|
|
14
10
|
const b = (0, utils_1.block)('navigation-item');
|
|
15
11
|
const ANALYTICS_ID = 'navigation';
|
|
16
|
-
//todo: add types support form component in map
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
-
const NavigationItemsMap = {
|
|
19
|
-
[models_1.NavigationItemType.Button]: NavigationButton_1.NavigationButton,
|
|
20
|
-
[models_1.NavigationItemType.Social]: SocialIcon_1.default,
|
|
21
|
-
[models_1.NavigationItemType.Dropdown]: NavigationDropdown_1.NavigationDropdown,
|
|
22
|
-
[models_1.NavigationItemType.Link]: NavigationLink_1.NavigationLink,
|
|
23
|
-
[models_1.NavigationItemType.GithubButton]: GithubButton_1.GithubButton,
|
|
24
|
-
};
|
|
25
12
|
const NavigationItem = (_a) => {
|
|
26
13
|
var { data, className, menuLayout } = _a, props = tslib_1.__rest(_a, ["data", "className", "menuLayout"]);
|
|
27
14
|
const { type = models_1.NavigationItemType.Link } = data;
|
|
28
|
-
const
|
|
15
|
+
const { navItemMap } = (0, react_1.useContext)(innerContext_1.InnerContext);
|
|
16
|
+
const Component = navItemMap[type];
|
|
29
17
|
const componentProps = (0, react_1.useMemo)(() => {
|
|
30
18
|
const componentProperties = Object.assign(Object.assign({}, data), props);
|
|
31
19
|
if (type !== models_1.NavigationItemType.Dropdown) {
|
|
@@ -35,6 +23,6 @@ const NavigationItem = (_a) => {
|
|
|
35
23
|
}, [data, props, type]);
|
|
36
24
|
return (react_1.default.createElement(blockIdContext_1.BlockIdContext.Provider, { value: ANALYTICS_ID },
|
|
37
25
|
react_1.default.createElement("li", { className: b({ 'menu-layout': menuLayout }, className) },
|
|
38
|
-
react_1.default.createElement(Component, Object.assign({}, componentProps, { className: b('content') })))));
|
|
26
|
+
react_1.default.createElement(Component, Object.assign({}, componentProps, { className: b('content', { type }) })))));
|
|
39
27
|
};
|
|
40
28
|
exports.default = NavigationItem;
|
package/build/cjs/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.js
CHANGED
|
@@ -24,7 +24,7 @@ const NavigationLink = (props) => {
|
|
|
24
24
|
}
|
|
25
25
|
else {
|
|
26
26
|
return (react_1.default.createElement(components_1.RouterLink, { href: url, passHref: true },
|
|
27
|
-
react_1.default.createElement("a", Object.assign({}, rest, { className: classes }), content)));
|
|
27
|
+
react_1.default.createElement("a", Object.assign({ title: text }, rest, { className: classes }), content)));
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
exports.NavigationLink = NavigationLink;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { GithubButton } from './components/GithubButton/GithubButton';
|
|
2
|
+
export { NavigationButton } from './components/NavigationButton/NavigationButton';
|
|
3
|
+
export { NavigationDropdown } from './components/NavigationDropdown/NavigationDropdown';
|
|
4
|
+
export { NavigationLink } from './components/NavigationLink/NavigationLink';
|
|
5
|
+
import NavigationItem from './NavigationItem';
|
|
6
|
+
export default NavigationItem;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NavigationLink = exports.NavigationDropdown = exports.NavigationButton = exports.GithubButton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
var GithubButton_1 = require("./components/GithubButton/GithubButton");
|
|
6
|
+
Object.defineProperty(exports, "GithubButton", { enumerable: true, get: function () { return GithubButton_1.GithubButton; } });
|
|
7
|
+
var NavigationButton_1 = require("./components/NavigationButton/NavigationButton");
|
|
8
|
+
Object.defineProperty(exports, "NavigationButton", { enumerable: true, get: function () { return NavigationButton_1.NavigationButton; } });
|
|
9
|
+
var NavigationDropdown_1 = require("./components/NavigationDropdown/NavigationDropdown");
|
|
10
|
+
Object.defineProperty(exports, "NavigationDropdown", { enumerable: true, get: function () { return NavigationDropdown_1.NavigationDropdown; } });
|
|
11
|
+
var NavigationLink_1 = require("./components/NavigationLink/NavigationLink");
|
|
12
|
+
Object.defineProperty(exports, "NavigationLink", { enumerable: true, get: function () { return NavigationLink_1.NavigationLink; } });
|
|
13
|
+
const NavigationItem_1 = tslib_1.__importDefault(require("./NavigationItem"));
|
|
14
|
+
exports.default = NavigationItem_1.default;
|
|
@@ -3,7 +3,7 @@ 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 NavigationItem_1 = tslib_1.__importDefault(require("../NavigationItem
|
|
6
|
+
const NavigationItem_1 = tslib_1.__importDefault(require("../NavigationItem"));
|
|
7
7
|
const NavigationListItem = (_a) => {
|
|
8
8
|
var { column, index, activeItemId, onActiveItemChange } = _a, props = tslib_1.__rest(_a, ["column", "index", "activeItemId", "onActiveItemChange"]);
|
|
9
9
|
const id = `${column}-${index}`;
|
|
@@ -6,7 +6,7 @@ const react_1 = tslib_1.__importDefault(require("react"));
|
|
|
6
6
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
7
7
|
const utils_1 = require("../../../utils");
|
|
8
8
|
const models_1 = require("../../models");
|
|
9
|
-
const NavigationItem_1 = tslib_1.__importDefault(require("../NavigationItem
|
|
9
|
+
const NavigationItem_1 = tslib_1.__importDefault(require("../NavigationItem"));
|
|
10
10
|
const b = (0, utils_1.block)('navigation-popup');
|
|
11
11
|
const OFFSET_RESET = [0, 0];
|
|
12
12
|
const NavigationPopup = ({ anchorRef, items, onClose, className, open, }) => (react_1.default.createElement(uikit_1.Popup
|
|
@@ -8,7 +8,8 @@ const utils_2 = require("../../../utils");
|
|
|
8
8
|
const b = (0, utils_2.block)('social-icon');
|
|
9
9
|
const SocialIcon = ({ icon, url, className }) => {
|
|
10
10
|
const iconData = (0, utils_1.getMediaImage)(icon);
|
|
11
|
-
|
|
11
|
+
const { alt } = iconData;
|
|
12
|
+
return (react_1.default.createElement("a", { href: url, "aria-label": alt, title: alt, target: "_blank", rel: "noopener noreferrer", className: b(null, className) },
|
|
12
13
|
react_1.default.createElement(components_1.Image, Object.assign({ className: b('icon') }, iconData))));
|
|
13
14
|
};
|
|
14
15
|
exports.default = SocialIcon;
|
|
@@ -205,6 +205,25 @@ export declare const cardSchemas: {
|
|
|
205
205
|
type: string;
|
|
206
206
|
pattern: string;
|
|
207
207
|
};
|
|
208
|
+
style: {
|
|
209
|
+
type: string;
|
|
210
|
+
additionalProperties: boolean;
|
|
211
|
+
required: never[];
|
|
212
|
+
properties: {
|
|
213
|
+
backgroundColor: {
|
|
214
|
+
type: string;
|
|
215
|
+
};
|
|
216
|
+
height: {
|
|
217
|
+
type: string[];
|
|
218
|
+
};
|
|
219
|
+
width: {
|
|
220
|
+
type: string[];
|
|
221
|
+
};
|
|
222
|
+
color: {
|
|
223
|
+
type: string;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
};
|
|
208
227
|
alt: {
|
|
209
228
|
type: string;
|
|
210
229
|
contentType: string;
|
|
@@ -230,6 +249,87 @@ export declare const cardSchemas: {
|
|
|
230
249
|
type: string;
|
|
231
250
|
enum: string[];
|
|
232
251
|
};
|
|
252
|
+
analyticsEvents: {
|
|
253
|
+
oneOf: ({
|
|
254
|
+
optionName: string;
|
|
255
|
+
type: string;
|
|
256
|
+
additionalProperties: {
|
|
257
|
+
type: string;
|
|
258
|
+
};
|
|
259
|
+
required: string[];
|
|
260
|
+
properties: {
|
|
261
|
+
name: {
|
|
262
|
+
type: string;
|
|
263
|
+
};
|
|
264
|
+
type: {
|
|
265
|
+
type: string;
|
|
266
|
+
};
|
|
267
|
+
counters: {
|
|
268
|
+
type: string;
|
|
269
|
+
additionalProperties: boolean;
|
|
270
|
+
required: never[];
|
|
271
|
+
properties: {
|
|
272
|
+
include: {
|
|
273
|
+
type: string;
|
|
274
|
+
items: {
|
|
275
|
+
type: string;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
exclude: {
|
|
279
|
+
type: string;
|
|
280
|
+
items: {
|
|
281
|
+
type: string;
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
context: {
|
|
287
|
+
type: string;
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
items?: undefined;
|
|
291
|
+
} | {
|
|
292
|
+
type: string;
|
|
293
|
+
items: {
|
|
294
|
+
type: string;
|
|
295
|
+
additionalProperties: {
|
|
296
|
+
type: string;
|
|
297
|
+
};
|
|
298
|
+
required: string[];
|
|
299
|
+
properties: {
|
|
300
|
+
name: {
|
|
301
|
+
type: string;
|
|
302
|
+
};
|
|
303
|
+
type: {
|
|
304
|
+
type: string;
|
|
305
|
+
};
|
|
306
|
+
counters: {
|
|
307
|
+
type: string;
|
|
308
|
+
additionalProperties: boolean;
|
|
309
|
+
required: never[];
|
|
310
|
+
properties: {
|
|
311
|
+
include: {
|
|
312
|
+
type: string;
|
|
313
|
+
items: {
|
|
314
|
+
type: string;
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
exclude: {
|
|
318
|
+
type: string;
|
|
319
|
+
items: {
|
|
320
|
+
type: string;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
context: {
|
|
326
|
+
type: string;
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
optionName: string;
|
|
331
|
+
})[];
|
|
332
|
+
};
|
|
233
333
|
title: {
|
|
234
334
|
oneOf: ({
|
|
235
335
|
type: string;
|
|
@@ -708,6 +808,87 @@ export declare const cardSchemas: {
|
|
|
708
808
|
additionalProperties: boolean;
|
|
709
809
|
required: never[];
|
|
710
810
|
properties: {
|
|
811
|
+
analyticsEvents: {
|
|
812
|
+
oneOf: ({
|
|
813
|
+
optionName: string;
|
|
814
|
+
type: string;
|
|
815
|
+
additionalProperties: {
|
|
816
|
+
type: string;
|
|
817
|
+
};
|
|
818
|
+
required: string[];
|
|
819
|
+
properties: {
|
|
820
|
+
name: {
|
|
821
|
+
type: string;
|
|
822
|
+
};
|
|
823
|
+
type: {
|
|
824
|
+
type: string;
|
|
825
|
+
};
|
|
826
|
+
counters: {
|
|
827
|
+
type: string;
|
|
828
|
+
additionalProperties: boolean;
|
|
829
|
+
required: never[];
|
|
830
|
+
properties: {
|
|
831
|
+
include: {
|
|
832
|
+
type: string;
|
|
833
|
+
items: {
|
|
834
|
+
type: string;
|
|
835
|
+
};
|
|
836
|
+
};
|
|
837
|
+
exclude: {
|
|
838
|
+
type: string;
|
|
839
|
+
items: {
|
|
840
|
+
type: string;
|
|
841
|
+
};
|
|
842
|
+
};
|
|
843
|
+
};
|
|
844
|
+
};
|
|
845
|
+
context: {
|
|
846
|
+
type: string;
|
|
847
|
+
};
|
|
848
|
+
};
|
|
849
|
+
items?: undefined;
|
|
850
|
+
} | {
|
|
851
|
+
type: string;
|
|
852
|
+
items: {
|
|
853
|
+
type: string;
|
|
854
|
+
additionalProperties: {
|
|
855
|
+
type: string;
|
|
856
|
+
};
|
|
857
|
+
required: string[];
|
|
858
|
+
properties: {
|
|
859
|
+
name: {
|
|
860
|
+
type: string;
|
|
861
|
+
};
|
|
862
|
+
type: {
|
|
863
|
+
type: string;
|
|
864
|
+
};
|
|
865
|
+
counters: {
|
|
866
|
+
type: string;
|
|
867
|
+
additionalProperties: boolean;
|
|
868
|
+
required: never[];
|
|
869
|
+
properties: {
|
|
870
|
+
include: {
|
|
871
|
+
type: string;
|
|
872
|
+
items: {
|
|
873
|
+
type: string;
|
|
874
|
+
};
|
|
875
|
+
};
|
|
876
|
+
exclude: {
|
|
877
|
+
type: string;
|
|
878
|
+
items: {
|
|
879
|
+
type: string;
|
|
880
|
+
};
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
};
|
|
884
|
+
context: {
|
|
885
|
+
type: string;
|
|
886
|
+
};
|
|
887
|
+
};
|
|
888
|
+
};
|
|
889
|
+
optionName: string;
|
|
890
|
+
})[];
|
|
891
|
+
};
|
|
711
892
|
animated: {
|
|
712
893
|
type: string;
|
|
713
894
|
};
|
|
@@ -852,84 +1033,6 @@ export declare const cardSchemas: {
|
|
|
852
1033
|
fullscreen: {
|
|
853
1034
|
type: string;
|
|
854
1035
|
};
|
|
855
|
-
analyticsEvents: {
|
|
856
|
-
anyOf: ({
|
|
857
|
-
type: string;
|
|
858
|
-
additionalProperties: {
|
|
859
|
-
type: string;
|
|
860
|
-
};
|
|
861
|
-
required: string[];
|
|
862
|
-
properties: {
|
|
863
|
-
name: {
|
|
864
|
-
type: string;
|
|
865
|
-
};
|
|
866
|
-
type: {
|
|
867
|
-
type: string;
|
|
868
|
-
};
|
|
869
|
-
counters: {
|
|
870
|
-
type: string;
|
|
871
|
-
additionalProperties: boolean;
|
|
872
|
-
required: never[];
|
|
873
|
-
properties: {
|
|
874
|
-
include: {
|
|
875
|
-
type: string;
|
|
876
|
-
items: {
|
|
877
|
-
type: string;
|
|
878
|
-
};
|
|
879
|
-
};
|
|
880
|
-
exclude: {
|
|
881
|
-
type: string;
|
|
882
|
-
items: {
|
|
883
|
-
type: string;
|
|
884
|
-
};
|
|
885
|
-
};
|
|
886
|
-
};
|
|
887
|
-
};
|
|
888
|
-
context: {
|
|
889
|
-
type: string;
|
|
890
|
-
};
|
|
891
|
-
};
|
|
892
|
-
} | {
|
|
893
|
-
type: string;
|
|
894
|
-
items: {
|
|
895
|
-
type: string;
|
|
896
|
-
additionalProperties: {
|
|
897
|
-
type: string;
|
|
898
|
-
};
|
|
899
|
-
required: string[];
|
|
900
|
-
properties: {
|
|
901
|
-
name: {
|
|
902
|
-
type: string;
|
|
903
|
-
};
|
|
904
|
-
type: {
|
|
905
|
-
type: string;
|
|
906
|
-
};
|
|
907
|
-
counters: {
|
|
908
|
-
type: string;
|
|
909
|
-
additionalProperties: boolean;
|
|
910
|
-
required: never[];
|
|
911
|
-
properties: {
|
|
912
|
-
include: {
|
|
913
|
-
type: string;
|
|
914
|
-
items: {
|
|
915
|
-
type: string;
|
|
916
|
-
};
|
|
917
|
-
};
|
|
918
|
-
exclude: {
|
|
919
|
-
type: string;
|
|
920
|
-
items: {
|
|
921
|
-
type: string;
|
|
922
|
-
};
|
|
923
|
-
};
|
|
924
|
-
};
|
|
925
|
-
};
|
|
926
|
-
context: {
|
|
927
|
-
type: string;
|
|
928
|
-
};
|
|
929
|
-
};
|
|
930
|
-
};
|
|
931
|
-
})[];
|
|
932
|
-
};
|
|
933
1036
|
border: {
|
|
934
1037
|
type: string;
|
|
935
1038
|
enum: string[];
|
|
@@ -8,12 +8,11 @@ const utils_1 = require("../../utils");
|
|
|
8
8
|
const Content_1 = tslib_1.__importDefault(require("../Content/Content"));
|
|
9
9
|
const b = (0, utils_1.block)('background-card');
|
|
10
10
|
const BackgroundCard = (props) => {
|
|
11
|
-
const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, } = props;
|
|
11
|
+
const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, analyticsEvents, } = props;
|
|
12
12
|
const theme = (0, theme_1.useTheme)();
|
|
13
13
|
const hasBackgroundColor = backgroundColor || cardTheme !== 'default';
|
|
14
|
-
const link = hasBackgroundColor || border === 'line' ? undefined : url;
|
|
15
14
|
const borderType = hasBackgroundColor ? 'none' : border;
|
|
16
|
-
return (react_1.default.createElement(components_1.CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), url:
|
|
15
|
+
return (react_1.default.createElement(components_1.CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), url: url, border: borderType, analyticsEvents: analyticsEvents },
|
|
17
16
|
react_1.default.createElement(components_1.CardBase.Content, null,
|
|
18
17
|
react_1.default.createElement(components_1.BackgroundImage, Object.assign({ className: b('image') }, (0, utils_1.getThemedValue)(background, theme), { style: { backgroundColor } })),
|
|
19
18
|
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 } }))));
|
|
@@ -16,6 +16,25 @@ export declare const BackgroundCard: {
|
|
|
16
16
|
type: string;
|
|
17
17
|
pattern: string;
|
|
18
18
|
};
|
|
19
|
+
style: {
|
|
20
|
+
type: string;
|
|
21
|
+
additionalProperties: boolean;
|
|
22
|
+
required: never[];
|
|
23
|
+
properties: {
|
|
24
|
+
backgroundColor: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
height: {
|
|
28
|
+
type: string[];
|
|
29
|
+
};
|
|
30
|
+
width: {
|
|
31
|
+
type: string[];
|
|
32
|
+
};
|
|
33
|
+
color: {
|
|
34
|
+
type: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
19
38
|
alt: {
|
|
20
39
|
type: string;
|
|
21
40
|
contentType: string;
|
|
@@ -41,6 +60,87 @@ export declare const BackgroundCard: {
|
|
|
41
60
|
type: string;
|
|
42
61
|
enum: string[];
|
|
43
62
|
};
|
|
63
|
+
analyticsEvents: {
|
|
64
|
+
oneOf: ({
|
|
65
|
+
optionName: string;
|
|
66
|
+
type: string;
|
|
67
|
+
additionalProperties: {
|
|
68
|
+
type: string;
|
|
69
|
+
};
|
|
70
|
+
required: string[];
|
|
71
|
+
properties: {
|
|
72
|
+
name: {
|
|
73
|
+
type: string;
|
|
74
|
+
};
|
|
75
|
+
type: {
|
|
76
|
+
type: string;
|
|
77
|
+
};
|
|
78
|
+
counters: {
|
|
79
|
+
type: string;
|
|
80
|
+
additionalProperties: boolean;
|
|
81
|
+
required: never[];
|
|
82
|
+
properties: {
|
|
83
|
+
include: {
|
|
84
|
+
type: string;
|
|
85
|
+
items: {
|
|
86
|
+
type: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
exclude: {
|
|
90
|
+
type: string;
|
|
91
|
+
items: {
|
|
92
|
+
type: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
context: {
|
|
98
|
+
type: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
items?: undefined;
|
|
102
|
+
} | {
|
|
103
|
+
type: string;
|
|
104
|
+
items: {
|
|
105
|
+
type: string;
|
|
106
|
+
additionalProperties: {
|
|
107
|
+
type: string;
|
|
108
|
+
};
|
|
109
|
+
required: string[];
|
|
110
|
+
properties: {
|
|
111
|
+
name: {
|
|
112
|
+
type: string;
|
|
113
|
+
};
|
|
114
|
+
type: {
|
|
115
|
+
type: string;
|
|
116
|
+
};
|
|
117
|
+
counters: {
|
|
118
|
+
type: string;
|
|
119
|
+
additionalProperties: boolean;
|
|
120
|
+
required: never[];
|
|
121
|
+
properties: {
|
|
122
|
+
include: {
|
|
123
|
+
type: string;
|
|
124
|
+
items: {
|
|
125
|
+
type: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
exclude: {
|
|
129
|
+
type: string;
|
|
130
|
+
items: {
|
|
131
|
+
type: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
context: {
|
|
137
|
+
type: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
optionName: string;
|
|
142
|
+
})[];
|
|
143
|
+
};
|
|
44
144
|
title: {
|
|
45
145
|
oneOf: ({
|
|
46
146
|
type: string;
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
6
6
|
const schema_1 = require("../../components/Image/schema");
|
|
7
7
|
const common_1 = require("../../schema/validators/common");
|
|
8
|
+
const event_1 = require("../../schema/validators/event");
|
|
8
9
|
const schema_2 = require("../Content/schema");
|
|
9
10
|
const BackgroundCardContentProps = lodash_1.default.omit(schema_2.ContentBase, ['size']);
|
|
10
11
|
exports.BackgroundCard = {
|
|
@@ -18,6 +19,15 @@ exports.BackgroundCard = {
|
|
|
18
19
|
}, paddingBottom: {
|
|
19
20
|
type: 'string',
|
|
20
21
|
enum: ['s', 'm', 'l', 'xl'],
|
|
22
|
+
}, analyticsEvents: {
|
|
23
|
+
oneOf: [
|
|
24
|
+
Object.assign(Object.assign({}, event_1.AnalyticsEventSchema), { optionName: 'single' }),
|
|
25
|
+
{
|
|
26
|
+
type: 'array',
|
|
27
|
+
items: event_1.AnalyticsEventSchema,
|
|
28
|
+
optionName: 'list',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
21
31
|
} }),
|
|
22
32
|
},
|
|
23
33
|
};
|