@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,3 +1,4 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
1
2
|
import React, { Fragment } from 'react';
|
|
2
3
|
import { CardBase } from '../../../components';
|
|
3
4
|
import { block } from '../../../utils';
|
|
@@ -5,9 +6,12 @@ import './SeparatePriceDetailed.css';
|
|
|
5
6
|
const b = block('separate-price-detailed-block');
|
|
6
7
|
const SeparatePriceDetailed = (props) => {
|
|
7
8
|
const { items, border, getDescriptionComponent, getDetailsComponent } = props;
|
|
8
|
-
return (React.createElement(Fragment, null, items.map((
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
return (React.createElement(Fragment, null, items.map((_a, id) => {
|
|
10
|
+
var { analyticsEvents } = _a, item = __rest(_a, ["analyticsEvents"]);
|
|
11
|
+
return (React.createElement(CardBase, { key: id, className: b(), border: border, analyticsEvents: analyticsEvents },
|
|
12
|
+
React.createElement(CardBase.Content, null,
|
|
13
|
+
getDescriptionComponent(item),
|
|
14
|
+
getDetailsComponent(item.items))));
|
|
15
|
+
})));
|
|
12
16
|
};
|
|
13
17
|
export default SeparatePriceDetailed;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AnimatableProps, BaseProps, textSize } from '../../schema/validators/common';
|
|
2
|
+
import { AnalyticsEventSchema } from '../../schema/validators/event';
|
|
2
3
|
import { filteredArray } from '../../schema/validators/utils';
|
|
3
4
|
const PriceDetailedDetailsType = ['marked-list', 'settings'];
|
|
4
5
|
const PriceDetailedDescriptionColor = ['cornflower', 'black'];
|
|
@@ -134,7 +135,16 @@ const PriceItem = {
|
|
|
134
135
|
type: 'object',
|
|
135
136
|
additionalProperties: false,
|
|
136
137
|
required: ['title', 'description'],
|
|
137
|
-
properties: Object.assign(Object.assign({}, PriceDetailsProps), PriceDescriptionProps),
|
|
138
|
+
properties: Object.assign(Object.assign(Object.assign({}, PriceDetailsProps), PriceDescriptionProps), { analyticsEvents: {
|
|
139
|
+
oneOf: [
|
|
140
|
+
Object.assign(Object.assign({}, AnalyticsEventSchema), { optionName: 'single' }),
|
|
141
|
+
{
|
|
142
|
+
type: 'array',
|
|
143
|
+
items: AnalyticsEventSchema,
|
|
144
|
+
optionName: 'list',
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
} }),
|
|
138
148
|
};
|
|
139
149
|
export const PriceDetailedBlock = {
|
|
140
150
|
'price-detailed': {
|
|
@@ -31,9 +31,6 @@ unpredictable css rules order in build */
|
|
|
31
31
|
.pc-quote_border_line {
|
|
32
32
|
border: 1px solid var(--g-color-line-generic);
|
|
33
33
|
}
|
|
34
|
-
.pc-quote_border_line, .pc-quote_border_none {
|
|
35
|
-
cursor: default;
|
|
36
|
-
}
|
|
37
34
|
@media (min-width: 577px) {
|
|
38
35
|
.slick-slide:not(.slick-active) .pc-quote {
|
|
39
36
|
box-shadow: none;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
import { MarkdownItPluginCb } from '@doc-tools/transform/lib/plugins/typings';
|
|
1
2
|
import { Lang } from '../utils/configure';
|
|
2
3
|
export type ComplexItem = {
|
|
3
4
|
[key: string]: string;
|
|
4
5
|
};
|
|
5
6
|
export type Item = string | null | ComplexItem;
|
|
6
7
|
export type Transformer = (text: string) => string;
|
|
7
|
-
export type TransformerRaw = (lang: Lang, content: string
|
|
8
|
+
export type TransformerRaw = (lang: Lang, content: string, options: {
|
|
9
|
+
plugins: MarkdownItPluginCb[];
|
|
10
|
+
}) => string;
|
|
8
11
|
export type Parser<T = any> = (transformer: Transformer, block: T) => T;
|
|
9
12
|
export declare const createItemsParser: (fields: string[]) => (transformer: Transformer, items: Item[]) => (string | {
|
|
10
13
|
[x: string]: string;
|
|
11
14
|
} | null)[];
|
|
12
|
-
export declare function yfmTransformer(lang: Lang, content: string
|
|
15
|
+
export declare function yfmTransformer(lang: Lang, content: string, options?: {
|
|
16
|
+
plugins?: MarkdownItPluginCb[];
|
|
17
|
+
}): string;
|
|
13
18
|
export declare function typografTransformer(lang: Lang, content: string): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import defaultPlugins from '@doc-tools/transform/lib/plugins';
|
|
1
2
|
import { fullTransform, typografToHTML } from './utils';
|
|
2
3
|
export const createItemsParser = (fields) => (transformer, items) => items.map((item) => {
|
|
3
4
|
if (!item) {
|
|
@@ -16,8 +17,12 @@ export const createItemsParser = (fields) => (transformer, items) => items.map((
|
|
|
16
17
|
}, {}));
|
|
17
18
|
}
|
|
18
19
|
});
|
|
19
|
-
export function yfmTransformer(lang, content) {
|
|
20
|
-
const {
|
|
20
|
+
export function yfmTransformer(lang, content, options = {}) {
|
|
21
|
+
const { plugins = [] } = options;
|
|
22
|
+
const { html } = fullTransform(content, {
|
|
23
|
+
lang,
|
|
24
|
+
plugins: [...defaultPlugins, ...plugins],
|
|
25
|
+
});
|
|
21
26
|
return html;
|
|
22
27
|
}
|
|
23
28
|
export function typografTransformer(lang, content) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MarkdownItPluginCb } from '@doc-tools/transform/lib/plugins/typings';
|
|
1
2
|
import { ConstructorBlock } from '../models/constructor';
|
|
2
3
|
import { Lang } from '../utils/configure';
|
|
3
4
|
export type ContentVariables = Record<string, string>;
|
|
@@ -9,6 +10,7 @@ export type ContentTransformerProps = {
|
|
|
9
10
|
lang: Lang;
|
|
10
11
|
customConfig?: {};
|
|
11
12
|
vars?: ContentVariables;
|
|
13
|
+
plugins?: MarkdownItPluginCb[];
|
|
12
14
|
};
|
|
13
15
|
};
|
|
14
16
|
export declare const contentTransformer: ({ content, options }: ContentTransformerProps) => {
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
/* eslint-disable no-param-reassign */
|
|
2
|
-
/* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */
|
|
3
1
|
import _ from 'lodash';
|
|
4
2
|
import { config } from './config';
|
|
5
3
|
import { filterContent } from './filter';
|
|
6
|
-
function transformBlocks(blocks, lang, customConfig = {}) {
|
|
4
|
+
function transformBlocks(blocks, lang, customConfig = {}, options = {}) {
|
|
7
5
|
const fullConfig = Object.assign(Object.assign({}, config), customConfig);
|
|
6
|
+
const { plugins = [] } = options;
|
|
8
7
|
const clonedBlocks = _.cloneDeep(blocks);
|
|
9
|
-
return clonedBlocks.map((block) => transformBlock(lang, fullConfig, block));
|
|
8
|
+
return clonedBlocks.map((block) => transformBlock(lang, fullConfig, block, plugins));
|
|
10
9
|
}
|
|
11
|
-
function transformBlock(lang, blocksConfig, block) {
|
|
10
|
+
function transformBlock(lang, blocksConfig, block, plugins) {
|
|
12
11
|
const blockConfig = blocksConfig[block.type];
|
|
13
12
|
if (block) {
|
|
14
13
|
if ('randomOrder' in block && block.randomOrder && 'children' in block && block.children) {
|
|
@@ -19,7 +18,9 @@ function transformBlock(lang, blocksConfig, block) {
|
|
|
19
18
|
const configs = Array.isArray(blockConfig) ? blockConfig : [blockConfig];
|
|
20
19
|
configs.forEach((transformConfig) => {
|
|
21
20
|
const { fields, transformer: transformerRaw, parser } = transformConfig;
|
|
22
|
-
const transformer =
|
|
21
|
+
const transformer = (content) =>
|
|
22
|
+
// eslint-disable-next-line no-useless-call
|
|
23
|
+
transformerRaw.call(null, lang, content, { plugins });
|
|
23
24
|
if (fields) {
|
|
24
25
|
fields.forEach((field) => {
|
|
25
26
|
if (block[field]) {
|
|
@@ -43,9 +44,11 @@ function transformBlock(lang, blocksConfig, block) {
|
|
|
43
44
|
return block;
|
|
44
45
|
}
|
|
45
46
|
export const contentTransformer = ({ content, options }) => {
|
|
46
|
-
const { lang, customConfig = {}, vars } = options;
|
|
47
|
+
const { lang, customConfig = {}, vars, plugins = [] } = options;
|
|
47
48
|
const { blocks = [] } = (vars ? filterContent(content, vars) : content);
|
|
48
|
-
const transformedBlocks = transformBlocks(blocks, lang, customConfig
|
|
49
|
+
const transformedBlocks = transformBlocks(blocks, lang, customConfig, {
|
|
50
|
+
plugins,
|
|
51
|
+
});
|
|
49
52
|
return {
|
|
50
53
|
blocks: transformedBlocks,
|
|
51
54
|
};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { ConstructorBlock, CustomConfig, PCShareSocialNetwork, TextSize } from '../models';
|
|
2
|
-
export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "
|
|
2
|
+
export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h3" | "h4";
|
|
3
3
|
export declare function hasBlockTag(content: string): boolean;
|
|
4
4
|
export declare function getBlockKey(block: ConstructorBlock, index: number): string;
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
[x: string]: any;
|
|
8
|
-
};
|
|
9
|
-
export declare const getCustomSubBlockTypes: (customBlocks?: CustomConfig) => string[];
|
|
10
|
-
export declare const getCustomHeaderTypes: (customBlocks?: CustomConfig) => string[];
|
|
5
|
+
export declare const getCustomItems: (types: (keyof CustomConfig)[], customBlocks?: CustomConfig) => {};
|
|
6
|
+
export declare const getCustomTypes: (types: (keyof CustomConfig)[], customBlocks?: CustomConfig) => string[];
|
|
11
7
|
export declare const getOrderedBlocks: (blocks: ConstructorBlock[], headerBlockTypes?: string[]) => ConstructorBlock[];
|
|
12
8
|
export declare const getHeaderBlock: (blocks: ConstructorBlock[], headerBlockTypes?: string[]) => ConstructorBlock | undefined;
|
|
13
9
|
export declare const getShareLink: (url: string, type: PCShareSocialNetwork, title?: string, text?: string) => string | undefined;
|
|
10
|
+
export declare const getQaAttrubutes: (qa?: string, ...customKeys: (string | Array<string>)[]) => Record<string, string>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { camelCase, flatten } from 'lodash';
|
|
1
2
|
import { PCShareSocialNetwork } from '../models';
|
|
2
3
|
const BLOCK_ELEMENTS = [
|
|
3
4
|
'div',
|
|
@@ -36,14 +37,15 @@ const BLOCK_ELEMENTS = [
|
|
|
36
37
|
'td',
|
|
37
38
|
];
|
|
38
39
|
const BLOCK_ELEMENTS_REGEX = `<(${BLOCK_ELEMENTS.join('|')})[^>]*>`;
|
|
40
|
+
const QA_ATTRIBUTES_KEYS = ['container', 'content', 'wrapper', 'image', 'button', 'animate'];
|
|
39
41
|
export function getHeaderTag(size) {
|
|
40
42
|
switch (size) {
|
|
41
43
|
case 'l':
|
|
42
44
|
return 'h1';
|
|
43
45
|
case 's':
|
|
44
|
-
return '
|
|
46
|
+
return 'h3';
|
|
45
47
|
case 'xs':
|
|
46
|
-
return '
|
|
48
|
+
return 'h4';
|
|
47
49
|
case 'm':
|
|
48
50
|
default:
|
|
49
51
|
return 'h2';
|
|
@@ -56,18 +58,15 @@ export function hasBlockTag(content) {
|
|
|
56
58
|
export function getBlockKey(block, index) {
|
|
57
59
|
return `${block.type}-${index}`;
|
|
58
60
|
}
|
|
59
|
-
export const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
export const getCustomItems = ({ blocks = {}, headers = {}, subBlocks = {} } = {}) => (Object.assign(Object.assign(Object.assign({}, blocks), headers), subBlocks));
|
|
64
|
-
export const getCustomSubBlockTypes = (customBlocks = {}) => {
|
|
65
|
-
const { subBlocks = {} } = customBlocks;
|
|
66
|
-
return Object.keys(subBlocks);
|
|
61
|
+
export const getCustomItems = (types, customBlocks = {}) => {
|
|
62
|
+
return types.reduce((result, type) => {
|
|
63
|
+
return Object.assign(result, customBlocks[type] || {});
|
|
64
|
+
}, {});
|
|
67
65
|
};
|
|
68
|
-
export const
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
export const getCustomTypes = (types, customBlocks = {}) => {
|
|
67
|
+
return types.reduce((result, type) => {
|
|
68
|
+
return result.concat(Object.keys(customBlocks[type] || {}));
|
|
69
|
+
}, []);
|
|
71
70
|
};
|
|
72
71
|
const getShareUrlWithParams = (url, params = {}) => {
|
|
73
72
|
const result = new URL(url);
|
|
@@ -112,3 +111,14 @@ export const getShareLink = (url, type, title, text) => {
|
|
|
112
111
|
return undefined;
|
|
113
112
|
}
|
|
114
113
|
};
|
|
114
|
+
export const getQaAttrubutes = (qa, ...customKeys) => {
|
|
115
|
+
const attributes = {};
|
|
116
|
+
if (qa) {
|
|
117
|
+
const keys = QA_ATTRIBUTES_KEYS.concat(flatten(customKeys));
|
|
118
|
+
keys.forEach((key) => {
|
|
119
|
+
attributes[camelCase(key)] = `${qa}-${key}`;
|
|
120
|
+
});
|
|
121
|
+
attributes.default = qa;
|
|
122
|
+
}
|
|
123
|
+
return attributes;
|
|
124
|
+
};
|
package/build/esm/utils/cn.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import blockOrigin from 'bem-cn-lite';
|
|
2
1
|
export declare const NAMESPACE = "pc-";
|
|
3
|
-
export
|
|
4
|
-
export declare
|
|
2
|
+
export declare const cn: import("@bem-react/classname").ClassNameInitilizer;
|
|
3
|
+
export declare const block: import("@bem-react/classname").ClassNameInitilizer;
|
|
4
|
+
export type CnBlock = ReturnType<typeof cn>;
|
package/build/esm/utils/cn.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { withNaming } from '@bem-react/classname';
|
|
2
2
|
export const NAMESPACE = 'pc-';
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
}
|
|
3
|
+
export const cn = withNaming({ e: '__', m: '_' });
|
|
4
|
+
export const block = withNaming({ n: NAMESPACE, e: '__', m: '_' });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/page-constructor",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.12-alpha.3",
|
|
4
4
|
"description": "Gravity UI Page Constructor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
"test:watch": "jest --watchAll"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@
|
|
84
|
-
"@gravity-ui/
|
|
83
|
+
"@bem-react/classname": "^1.6.0",
|
|
84
|
+
"@gravity-ui/components": "^2.4.0",
|
|
85
|
+
"@gravity-ui/dynamic-forms": "^2.3.0",
|
|
85
86
|
"@gravity-ui/i18n": "^1.0.0",
|
|
86
87
|
"ajv": "^8.12.0",
|
|
87
|
-
"bem-cn-lite": "^4.0.0",
|
|
88
88
|
"final-form": "^4.20.9",
|
|
89
89
|
"github-buttons": "2.23.0",
|
|
90
90
|
"lodash": "^4.17.21",
|
|
@@ -99,11 +99,12 @@
|
|
|
99
99
|
"sanitize-html": "2.6.1",
|
|
100
100
|
"snakecase-keys": "^5.1.0",
|
|
101
101
|
"typograf": "^6.14.0",
|
|
102
|
+
"utility-types": "^3.10.0",
|
|
102
103
|
"uuid": "^9.0.0"
|
|
103
104
|
},
|
|
104
105
|
"peerDependencies": {
|
|
105
106
|
"@doc-tools/transform": "^3.3.2",
|
|
106
|
-
"@gravity-ui/uikit": "^5.1
|
|
107
|
+
"@gravity-ui/uikit": "^5.4.1",
|
|
107
108
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0"
|
|
108
109
|
},
|
|
109
110
|
"devDependencies": {
|
|
@@ -119,7 +120,7 @@
|
|
|
119
120
|
"@gravity-ui/prettier-config": "^1.0.1",
|
|
120
121
|
"@gravity-ui/stylelint-config": "^1.0.0",
|
|
121
122
|
"@gravity-ui/tsconfig": "^1.0.0",
|
|
122
|
-
"@gravity-ui/uikit": "^5.1
|
|
123
|
+
"@gravity-ui/uikit": "^5.9.1",
|
|
123
124
|
"@storybook/addon-actions": "^7.1.0",
|
|
124
125
|
"@storybook/addon-essentials": "^7.1.0",
|
|
125
126
|
"@storybook/addon-knobs": "^7.0.2",
|
|
@@ -146,7 +147,6 @@
|
|
|
146
147
|
"css-loader": "^5.2.7",
|
|
147
148
|
"es5-ext": "0.10.53",
|
|
148
149
|
"eslint": "^8.34.0",
|
|
149
|
-
"eslint-plugin-local": "./eslint-plugin-local",
|
|
150
150
|
"eslint-plugin-no-not-accumulator-reassign": "^0.1.0",
|
|
151
151
|
"eslint-plugin-react": "^7.33.0",
|
|
152
152
|
"eslint-plugin-testing-library": "^5.9.1",
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HEADER_HEIGHT = exports.
|
|
3
|
+
exports.HEADER_HEIGHT = exports.UIKIT_ROOT_CLASS = exports.DEFAULT_THEME = void 0;
|
|
4
4
|
const models_1 = require("../models");
|
|
5
5
|
exports.DEFAULT_THEME = models_1.Theme.Light;
|
|
6
6
|
exports.UIKIT_ROOT_CLASS = 'g-root';
|
|
7
|
-
exports.KEY = {
|
|
8
|
-
ENTER: 'Enter',
|
|
9
|
-
TAB: 'Tab',
|
|
10
|
-
};
|
|
11
7
|
exports.HEADER_HEIGHT = 64;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { ButtonSize } from '@gravity-ui/uikit';
|
|
3
3
|
import { GridColumnSize, GridColumnSizesType } from '../../grid/types';
|
|
4
4
|
import { ThemeSupporting } from '../../utils';
|
|
5
|
+
import { AnalyticsEventsBase } from '../common';
|
|
5
6
|
import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps } from './common';
|
|
6
7
|
import { BannerCardProps, SubBlock, SubBlockModels } from './sub-blocks';
|
|
7
8
|
export declare enum BlockType {
|
|
@@ -32,6 +33,7 @@ export interface Childable {
|
|
|
32
33
|
export interface BlockBaseProps {
|
|
33
34
|
anchor?: AnchorProps;
|
|
34
35
|
visible?: GridColumnSize;
|
|
36
|
+
/** @deprecated */
|
|
35
37
|
resetPaddings?: boolean;
|
|
36
38
|
qa?: string;
|
|
37
39
|
}
|
|
@@ -141,6 +143,10 @@ export interface QuestionItem {
|
|
|
141
143
|
export interface QuestionsProps extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {
|
|
142
144
|
items: QuestionItem[];
|
|
143
145
|
}
|
|
146
|
+
export interface QuestionBlockItemProps extends QuestionItem {
|
|
147
|
+
isOpened: boolean;
|
|
148
|
+
onClick: () => void;
|
|
149
|
+
}
|
|
144
150
|
export interface BannerBlockProps extends BannerCardProps, Animatable {
|
|
145
151
|
}
|
|
146
152
|
export interface CompaniesBlockProps extends Animatable {
|
|
@@ -185,6 +191,10 @@ export interface TableProps {
|
|
|
185
191
|
legend?: string[];
|
|
186
192
|
justify?: Justify[];
|
|
187
193
|
marker?: LegendTableMarkerType;
|
|
194
|
+
/**
|
|
195
|
+
* Only as accessible name, not displayed explicitly
|
|
196
|
+
*/
|
|
197
|
+
caption?: string;
|
|
188
198
|
}
|
|
189
199
|
export interface TableBlockProps {
|
|
190
200
|
title: string;
|
|
@@ -232,14 +242,15 @@ export interface FilterBlockProps extends Animatable, LoadableChildren {
|
|
|
232
242
|
colSizes?: GridColumnSizesType;
|
|
233
243
|
centered?: boolean;
|
|
234
244
|
}
|
|
245
|
+
export interface IconsBlockItemProps extends AnalyticsEventsBase {
|
|
246
|
+
url: string;
|
|
247
|
+
text: string;
|
|
248
|
+
src: string;
|
|
249
|
+
}
|
|
235
250
|
export interface IconsBlockProps {
|
|
236
251
|
title?: string;
|
|
237
252
|
size?: 's' | 'm' | 'l';
|
|
238
|
-
items:
|
|
239
|
-
url: string;
|
|
240
|
-
text: string;
|
|
241
|
-
src: string;
|
|
242
|
-
}[];
|
|
253
|
+
items: IconsBlockItemProps[];
|
|
243
254
|
}
|
|
244
255
|
interface ContentLayoutBlockParams {
|
|
245
256
|
size?: ContentSize;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
1
|
+
import React, { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { ButtonView, ButtonProps as UikitButtonProps } from '@gravity-ui/uikit';
|
|
3
|
-
import { ThemeSupporting } from '../../utils
|
|
3
|
+
import { ThemeSupporting } from '../../utils';
|
|
4
4
|
import { AnalyticsEventsBase, ClassNameProps, PixelEventType, QAProps } from '../common';
|
|
5
5
|
export declare enum AuthorType {
|
|
6
6
|
Column = "column",
|
|
@@ -25,6 +25,10 @@ export declare enum PlayButtonThemes {
|
|
|
25
25
|
Blue = "blue",
|
|
26
26
|
Grey = "grey"
|
|
27
27
|
}
|
|
28
|
+
export declare enum CustomControlsType {
|
|
29
|
+
WithMuteButton = "with-mute-button",
|
|
30
|
+
WithPlayPauseButton = "with-play-pause-button"
|
|
31
|
+
}
|
|
28
32
|
export declare enum MediaVideoType {
|
|
29
33
|
Default = "default",
|
|
30
34
|
Player = "player"
|
|
@@ -61,6 +65,12 @@ export interface Stylable {
|
|
|
61
65
|
export interface Animatable {
|
|
62
66
|
animated?: boolean;
|
|
63
67
|
}
|
|
68
|
+
export interface Tabbable {
|
|
69
|
+
tabIndex?: number;
|
|
70
|
+
}
|
|
71
|
+
export interface Roleable {
|
|
72
|
+
role?: React.AriaRole;
|
|
73
|
+
}
|
|
64
74
|
export interface Background {
|
|
65
75
|
image?: string;
|
|
66
76
|
color?: string;
|
|
@@ -104,9 +114,11 @@ export interface MediaVideoProps extends AnalyticsEventsBase {
|
|
|
104
114
|
elapsedTime?: number;
|
|
105
115
|
playButton?: PlayButtonProps;
|
|
106
116
|
controls?: MediaVideoControlsType;
|
|
117
|
+
customControlsOptions?: CustomControlsOptions;
|
|
107
118
|
metrika?: MetrikaVideo;
|
|
119
|
+
ariaLabel?: string;
|
|
108
120
|
}
|
|
109
|
-
export interface LinkProps extends AnalyticsEventsBase, Stylable {
|
|
121
|
+
export interface LinkProps extends AnalyticsEventsBase, Stylable, Tabbable {
|
|
110
122
|
url: string;
|
|
111
123
|
text?: string;
|
|
112
124
|
textSize?: TextSize;
|
|
@@ -117,7 +129,7 @@ export interface LinkProps extends AnalyticsEventsBase, Stylable {
|
|
|
117
129
|
metrikaGoals?: MetrikaGoal;
|
|
118
130
|
pixelEvents?: ButtonPixel;
|
|
119
131
|
}
|
|
120
|
-
export interface FileLinkProps extends ClassNameProps {
|
|
132
|
+
export interface FileLinkProps extends ClassNameProps, Tabbable {
|
|
121
133
|
href: string;
|
|
122
134
|
text: ReactNode;
|
|
123
135
|
type?: FileLinkType;
|
|
@@ -126,7 +138,7 @@ export interface FileLinkProps extends ClassNameProps {
|
|
|
126
138
|
onClick?: () => void;
|
|
127
139
|
}
|
|
128
140
|
export type ButtonTheme = ButtonView | 'github' | 'app-store' | 'google-play' | 'scale' | 'monochrome';
|
|
129
|
-
export interface ButtonProps extends AnalyticsEventsBase, Pick<UikitButtonProps, 'size' | 'width'> {
|
|
141
|
+
export interface ButtonProps extends AnalyticsEventsBase, Pick<UikitButtonProps, 'size' | 'width' | 'extraProps'> {
|
|
130
142
|
text: string;
|
|
131
143
|
url: string;
|
|
132
144
|
primary?: boolean;
|
|
@@ -142,22 +154,14 @@ export interface ButtonImageProps {
|
|
|
142
154
|
position?: ButtonImagePosition;
|
|
143
155
|
alt?: string;
|
|
144
156
|
}
|
|
157
|
+
export interface CustomControlsOptions {
|
|
158
|
+
type?: CustomControlsType;
|
|
159
|
+
}
|
|
145
160
|
export interface PlayButtonProps extends ClassNameProps {
|
|
146
161
|
type?: PlayButtonType;
|
|
147
162
|
theme?: PlayButtonThemes;
|
|
148
163
|
text?: string;
|
|
149
164
|
}
|
|
150
|
-
export interface MediaVideoProps {
|
|
151
|
-
src: string[];
|
|
152
|
-
type?: MediaVideoType;
|
|
153
|
-
loop?: LoopProps | boolean;
|
|
154
|
-
muted?: boolean;
|
|
155
|
-
autoplay?: boolean;
|
|
156
|
-
elapsedTime?: number;
|
|
157
|
-
playButton?: PlayButtonProps;
|
|
158
|
-
controls?: MediaVideoControlsType;
|
|
159
|
-
metrika?: MetrikaVideo;
|
|
160
|
-
}
|
|
161
165
|
export type ThemedMediaVideoProps = ThemeSupporting<MediaVideoProps>;
|
|
162
166
|
export interface MediaComponentVideoProps extends AnalyticsEventsBase {
|
|
163
167
|
video: MediaVideoProps;
|
|
@@ -182,7 +186,7 @@ export interface MediaComponentDataLensProps {
|
|
|
182
186
|
export interface MediaProps extends Animatable, Partial<MediaComponentDataLensProps>, Partial<MediaComponentYoutubeProps>, Partial<MediaComponentImageProps>, Partial<MediaComponentVideoProps> {
|
|
183
187
|
color?: string;
|
|
184
188
|
}
|
|
185
|
-
export interface BackgroundMediaProps extends MediaProps, Animatable {
|
|
189
|
+
export interface BackgroundMediaProps extends MediaProps, Animatable, QAProps {
|
|
186
190
|
fullWidthMedia?: boolean;
|
|
187
191
|
className?: string;
|
|
188
192
|
mediaClassName?: string;
|
|
@@ -283,7 +287,7 @@ export interface PriceDetailsListProps {
|
|
|
283
287
|
export interface PriceDetailsProps {
|
|
284
288
|
items?: PriceDetailsSettingsProps[] | PriceDetailsListProps[];
|
|
285
289
|
}
|
|
286
|
-
export interface PriceItemProps extends PriceDetailsProps, PriceDescriptionProps {
|
|
290
|
+
export interface PriceItemProps extends PriceDetailsProps, PriceDescriptionProps, AnalyticsEventsBase {
|
|
287
291
|
}
|
|
288
292
|
export interface PriceFoldableDetailsProps {
|
|
289
293
|
title: string;
|
|
@@ -308,24 +312,6 @@ export interface PriceDetailedProps extends CardBaseProps {
|
|
|
308
312
|
foldable?: PriceFoldableDetailsProps;
|
|
309
313
|
labelsDefaultText?: Record<PriceLabelColor, string>;
|
|
310
314
|
}
|
|
311
|
-
export interface PriceDetailedProps extends CardBaseProps {
|
|
312
|
-
items: PriceItemProps[];
|
|
313
|
-
description?: {
|
|
314
|
-
titleSize?: TextSize;
|
|
315
|
-
descriptionSize?: TextSize;
|
|
316
|
-
titleColor?: PriceDescriptionColor;
|
|
317
|
-
};
|
|
318
|
-
details?: {
|
|
319
|
-
titleSize?: TextSize;
|
|
320
|
-
descriptionSize?: TextSize;
|
|
321
|
-
};
|
|
322
|
-
priceType?: PriceDetailsType;
|
|
323
|
-
numberGroupItems?: 3 | 4 | 5;
|
|
324
|
-
isCombined?: boolean;
|
|
325
|
-
useMixedView?: boolean;
|
|
326
|
-
foldable?: PriceFoldableDetailsProps;
|
|
327
|
-
labelsDefaultText?: Record<PriceLabelColor, string>;
|
|
328
|
-
}
|
|
329
315
|
export interface AuthorProps extends QAProps {
|
|
330
316
|
author: AuthorItem;
|
|
331
317
|
className?: string;
|
|
@@ -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";
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
import { MarkdownItPluginCb } from '@doc-tools/transform/lib/plugins/typings';
|
|
1
2
|
import { Lang } from '../utils/configure';
|
|
2
3
|
export type ComplexItem = {
|
|
3
4
|
[key: string]: string;
|
|
4
5
|
};
|
|
5
6
|
export type Item = string | null | ComplexItem;
|
|
6
7
|
export type Transformer = (text: string) => string;
|
|
7
|
-
export type TransformerRaw = (lang: Lang, content: string
|
|
8
|
+
export type TransformerRaw = (lang: Lang, content: string, options: {
|
|
9
|
+
plugins: MarkdownItPluginCb[];
|
|
10
|
+
}) => string;
|
|
8
11
|
export type Parser<T = any> = (transformer: Transformer, block: T) => T;
|
|
9
12
|
export declare const createItemsParser: (fields: string[]) => (transformer: Transformer, items: Item[]) => (string | {
|
|
10
13
|
[x: string]: string;
|
|
11
14
|
} | null)[];
|
|
12
|
-
export declare function yfmTransformer(lang: Lang, content: string
|
|
15
|
+
export declare function yfmTransformer(lang: Lang, content: string, options?: {
|
|
16
|
+
plugins?: MarkdownItPluginCb[];
|
|
17
|
+
}): string;
|
|
13
18
|
export declare function typografTransformer(lang: Lang, content: string): string;
|