@gravity-ui/page-constructor 4.0.0-beta.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -7
- package/build/cjs/blocks/Banner/schema.d.ts +72 -24
- package/build/cjs/blocks/CardLayout/schema.d.ts +16 -6
- package/build/cjs/blocks/Companies/Companies.css +5 -5
- package/build/cjs/blocks/Companies/Companies.js +3 -3
- package/build/cjs/blocks/Companies/schema.d.ts +8 -3
- package/build/cjs/blocks/ContentLayout/ContentLayout.css +4 -7
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +1 -2
- package/build/cjs/blocks/ContentLayout/schema.d.ts +112 -59
- package/build/cjs/blocks/ContentLayout/schema.js +23 -18
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.css +16 -16
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +3 -3
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +37 -6
- package/build/cjs/blocks/ExtendedFeatures/schema.js +2 -3
- package/build/cjs/blocks/FilterBlock/schema.d.ts +19 -7
- package/build/cjs/blocks/FilterBlock/schema.js +13 -2
- package/build/cjs/blocks/Header/Header.css +28 -25
- package/build/cjs/blocks/Header/Header.js +6 -7
- package/build/cjs/blocks/Header/schema.d.ts +329 -37
- package/build/cjs/blocks/Header/schema.js +1 -0
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +129 -54
- package/build/cjs/blocks/HeaderSlider/schema.js +3 -1
- package/build/cjs/blocks/Icons/Icons.css +2 -2
- package/build/cjs/blocks/Icons/schema.d.ts +9 -3
- package/build/cjs/blocks/Icons/schema.js +2 -1
- package/build/cjs/blocks/Info/Info.css +1 -1
- package/build/cjs/blocks/Info/Info.js +3 -3
- package/build/cjs/blocks/Info/schema.d.ts +44 -9
- package/build/cjs/blocks/Map/schema.d.ts +31 -7
- package/build/cjs/blocks/Media/Media.js +2 -2
- package/build/cjs/blocks/Media/schema.d.ts +346 -112
- package/build/cjs/blocks/Media/schema.js +1 -1
- package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.css +13 -13
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +103 -9
- package/build/cjs/blocks/PromoFeaturesBlock/schema.js +1 -0
- package/build/cjs/blocks/Questions/Questions.css +12 -12
- package/build/cjs/blocks/Questions/schema.d.ts +21 -4
- package/build/cjs/blocks/Share/Share.css +14 -12
- package/build/cjs/blocks/Share/schema.d.ts +3 -1
- package/build/cjs/blocks/Slider/Arrow/Arrow.css +4 -4
- package/build/cjs/blocks/Slider/Arrow/Arrow.js +1 -1
- package/build/cjs/blocks/Slider/Slider.css +12 -12
- package/build/cjs/blocks/Slider/Slider.js +3 -3
- package/build/cjs/blocks/Slider/schema.d.ts +16 -19
- package/build/cjs/blocks/Slider/schema.js +4 -5
- package/build/cjs/blocks/Slider/utils.d.ts +2 -2
- package/build/cjs/blocks/Slider/utils.js +3 -1
- package/build/cjs/blocks/Table/Table.css +5 -5
- package/build/cjs/blocks/Table/schema.d.ts +11 -4
- package/build/cjs/blocks/Table/schema.js +12 -2
- package/build/cjs/blocks/Tabs/Tabs.css +6 -6
- package/build/cjs/blocks/Tabs/Tabs.d.ts +1 -1
- package/build/cjs/blocks/Tabs/Tabs.js +4 -4
- package/build/cjs/blocks/Tabs/schema.d.ts +142 -18
- package/build/cjs/blocks/Tabs/schema.js +4 -1
- package/build/cjs/components/Anchor/Anchor.d.ts +2 -3
- package/build/cjs/components/AnimateBlock/AnimateBlock.d.ts +2 -3
- package/build/cjs/components/Author/Author.css +8 -8
- package/build/cjs/components/Author/Author.js +2 -2
- package/build/cjs/components/Author/schema.d.ts +3 -1
- package/build/cjs/components/BlockBase/BlockBase.css +4 -1
- package/build/cjs/components/BlockBase/BlockBase.d.ts +3 -2
- package/build/cjs/components/BlockBase/BlockBase.js +3 -5
- package/build/cjs/components/Button/Button.css +4 -0
- package/build/cjs/components/Button/Button.d.ts +2 -3
- package/build/cjs/components/Button/Button.js +3 -2
- package/build/cjs/components/ButtonTabs/ButtonTabs.css +4 -0
- package/build/cjs/components/ButtonTabs/ButtonTabs.d.ts +2 -3
- package/build/cjs/components/CardBase/CardBase.css +6 -6
- package/build/cjs/components/Control/Control.css +9 -9
- package/build/cjs/components/ErrorWrapper/ErrorWrapper.css +3 -3
- package/build/cjs/components/FileLink/FileLink.css +16 -56
- package/build/cjs/components/FileLink/FileLink.js +18 -1
- package/build/cjs/components/FullWidthBackground/FullWidthBackground.css +1 -1
- package/build/cjs/components/FullscreenImage/FullscreenImage.css +3 -3
- package/build/cjs/components/FullscreenMedia/FullscreenMedia.css +3 -3
- package/build/cjs/components/HTML/HTML.js +2 -1
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.css +11 -11
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -1
- package/build/cjs/components/Image/Image.d.ts +2 -3
- package/build/cjs/components/Image/schema.d.ts +2 -1
- package/build/cjs/components/Image/schema.js +10 -9
- package/build/cjs/components/Link/Link.css +13 -13
- package/build/cjs/components/Media/Image/Image.js +4 -3
- package/build/cjs/components/Media/Media.js +1 -1
- package/build/cjs/components/Media/Video/Video.js +1 -0
- package/build/cjs/components/MediaBase/MediaBaseContent.js +2 -2
- package/build/cjs/components/MetaInfo/MetaInfo.css +2 -2
- package/build/cjs/components/MetaInfo/MetaInfo.js +1 -1
- package/build/cjs/components/OverflowScroller/OverflowScroller.css +1 -1
- package/build/cjs/components/ReactPlayer/CustomBarControls.css +1 -1
- package/build/cjs/components/ReactPlayer/ReactPlayer.css +2 -2
- package/build/cjs/components/Table/Table.css +8 -8
- package/build/cjs/components/Title/Title.css +4 -4
- package/build/cjs/components/Title/TitleItem.css +19 -19
- package/build/cjs/components/Title/TitleItem.d.ts +2 -3
- package/build/cjs/components/Title/TitleItem.js +2 -2
- package/build/cjs/components/UnpublishedLabel/UnpublishedLabel.css +5 -5
- package/build/cjs/components/VideoBlock/VideoBlock.css +2 -2
- package/build/cjs/components/VideoBlock/VideoBlock.d.ts +2 -1
- package/build/cjs/components/VideoBlock/VideoBlock.js +6 -2
- package/build/cjs/components/constants.d.ts +3 -1
- package/build/cjs/components/constants.js +4 -2
- package/build/cjs/constructor-items.d.ts +1 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.css +50 -30
- package/build/cjs/containers/PageConstructor/PageConstructor.js +6 -3
- package/build/cjs/containers/PageConstructor/Provider.d.ts +2 -3
- package/build/cjs/containers/PageConstructor/Provider.js +2 -2
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.d.ts +2 -2
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +8 -4
- package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.d.ts +1 -2
- package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +7 -4
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +5 -3
- package/build/cjs/containers/PageConstructor/components/index.d.ts +2 -0
- package/build/cjs/containers/PageConstructor/components/index.js +5 -0
- package/build/cjs/containers/PageConstructor/index.d.ts +1 -0
- package/build/cjs/containers/PageConstructor/index.js +2 -0
- package/build/cjs/context/theme/ThemeContext.d.ts +2 -3
- package/build/cjs/context/theme/ThemeContext.js +0 -1
- package/build/cjs/context/theme/index.d.ts +0 -1
- package/build/cjs/context/theme/index.js +0 -1
- package/build/cjs/context/theme/useTheme.d.ts +1 -1
- package/build/cjs/context/theme/useTheme.js +2 -2
- package/build/cjs/context/theme/withTheme.js +1 -1
- package/build/cjs/customization/BlockDecoration.d.ts +1 -1
- package/build/cjs/customization/BlockDecoration.js +8 -14
- package/build/cjs/editor/{Components → components}/AddBlock/AddBlock.css +7 -6
- package/build/cjs/editor/components/AddBlock/AddBlock.d.ts +7 -0
- package/build/cjs/editor/{Components → components}/AddBlock/AddBlock.js +3 -3
- package/build/cjs/editor/components/BlockForm/BlockForm.d.ts +12 -0
- package/build/cjs/editor/components/BlockForm/BlockForm.js +28 -0
- package/build/cjs/editor/components/ControlPanel/ControlPanel.css +34 -0
- package/build/cjs/editor/components/ControlPanel/ControlPanel.d.ts +10 -0
- package/build/cjs/editor/components/ControlPanel/ControlPanel.js +35 -0
- package/build/cjs/editor/components/ControlPanel/i18n/en.json +3 -0
- package/build/cjs/editor/components/ControlPanel/i18n/index.d.ts +2 -0
- package/build/cjs/editor/components/ControlPanel/i18n/index.js +8 -0
- package/build/cjs/editor/components/ControlPanel/i18n/ru.json +3 -0
- package/build/cjs/editor/components/DeviceEmulation/DeviceEmulation.d.ts +7 -0
- package/build/cjs/editor/components/DeviceEmulation/DeviceEmulation.js +10 -0
- package/build/cjs/editor/components/DeviceEmulation/DeviceEmulationMobile/DeviceEmulationMobile.css +33 -0
- package/build/cjs/editor/components/DeviceEmulation/DeviceEmulationMobile/DeviceEmulationMobile.d.ts +8 -0
- package/build/cjs/editor/components/DeviceEmulation/DeviceEmulationMobile/DeviceEmulationMobile.js +41 -0
- package/build/cjs/editor/components/DeviceEmulation/utils.d.ts +4 -0
- package/build/cjs/editor/components/DeviceEmulation/utils.js +7 -0
- package/build/{esm/editor/Components → cjs/editor/components}/EditBlock/EditBlock.css +22 -14
- package/build/cjs/editor/components/EditBlock/EditBlock.d.ts +13 -0
- package/build/cjs/editor/components/EditBlock/EditBlock.js +48 -0
- package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.css +27 -0
- package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.d.ts +13 -0
- package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.js +35 -0
- package/build/cjs/editor/components/ErrorBoundary/i18n/en.json +4 -0
- package/build/cjs/editor/components/ErrorBoundary/i18n/index.d.ts +2 -0
- package/build/cjs/editor/components/ErrorBoundary/i18n/index.js +8 -0
- package/build/cjs/editor/components/ErrorBoundary/i18n/ru.json +4 -0
- package/build/cjs/editor/components/Layout/Layout.css +44 -0
- package/build/cjs/editor/components/Layout/Layout.d.ts +19 -0
- package/build/cjs/editor/components/Layout/Layout.js +38 -0
- package/build/cjs/editor/components/NotFoundBlock/NotFoundBlock.css +21 -0
- package/build/cjs/editor/components/NotFoundBlock/NotFoundBlock.d.ts +2 -0
- package/build/cjs/editor/components/NotFoundBlock/NotFoundBlock.js +12 -0
- package/build/cjs/editor/components/NotFoundBlock/i18n/en.json +3 -0
- package/build/cjs/editor/components/NotFoundBlock/i18n/index.d.ts +2 -0
- package/build/cjs/editor/components/NotFoundBlock/i18n/index.js +8 -0
- package/build/cjs/editor/components/NotFoundBlock/i18n/ru.json +3 -0
- package/build/cjs/editor/components/PagePropsForm/PagePropsForm.d.ts +10 -0
- package/build/cjs/editor/components/PagePropsForm/PagePropsForm.js +17 -0
- package/build/cjs/editor/components/YamlEditor/YamlEditor.css +12 -0
- package/build/cjs/editor/components/YamlEditor/YamlEditor.d.ts +6 -0
- package/build/cjs/editor/components/YamlEditor/YamlEditor.js +34 -0
- package/build/cjs/editor/containers/Editor/Editor.d.ts +2 -0
- package/build/cjs/editor/containers/Editor/Editor.js +67 -0
- package/build/cjs/editor/containers/Form/Form.css +115 -0
- package/build/cjs/editor/containers/Form/Form.d.ts +11 -0
- package/build/cjs/editor/containers/Form/Form.js +54 -0
- package/build/cjs/editor/containers/Form/dynamic-form-custom.css +0 -0
- package/build/cjs/editor/context.d.ts +9 -0
- package/build/cjs/editor/context.js +6 -0
- package/build/cjs/editor/data/previews/default-preview.js +1 -1
- package/build/cjs/editor/data/previews/header-block.js +5 -5
- package/build/cjs/editor/data/templates/banner-block.json +25 -0
- package/build/cjs/editor/data/templates/card-layout-block.json +39 -0
- package/build/cjs/editor/data/templates/companies-block.json +20 -0
- package/build/cjs/editor/data/templates/content-layout-block.json +56 -0
- package/build/cjs/editor/data/templates/extended-features-block.json +56 -0
- package/build/cjs/editor/data/templates/filter-block.json +62 -0
- package/build/cjs/editor/data/templates/header-block.json +19 -0
- package/build/cjs/editor/data/templates/header-slider-block.json +69 -0
- package/build/cjs/editor/data/templates/icons-block.json +32 -0
- package/build/cjs/editor/data/templates/info-block.json +40 -0
- package/build/cjs/editor/data/templates/link-table-block.json +10 -0
- package/build/cjs/editor/data/templates/map-block.json +48 -0
- package/build/cjs/editor/data/templates/media-block.json +15 -0
- package/build/cjs/editor/data/templates/preview-block.json +38 -0
- package/build/cjs/editor/data/templates/promo-features-block.json +52 -0
- package/build/cjs/editor/data/templates/questions-block.json +105 -0
- package/build/cjs/editor/data/templates/security-block.json +36 -0
- package/build/cjs/editor/data/templates/share-block.json +6 -0
- package/build/cjs/editor/data/templates/simple-block.json +7 -0
- package/build/cjs/editor/data/templates/slider-block.json +46 -0
- package/build/cjs/editor/data/templates/table-block.json +18 -0
- package/build/cjs/editor/data/templates/tabs-block.json +90 -0
- package/build/cjs/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.css +27 -0
- package/build/cjs/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.d.ts +19 -0
- package/build/cjs/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.js +72 -0
- package/build/cjs/editor/dynamic-forms-custom/config.d.ts +2 -0
- package/build/cjs/editor/dynamic-forms-custom/config.js +13 -0
- package/build/cjs/editor/dynamic-forms-custom/hooks/useOneOf.d.ts +12 -0
- package/build/cjs/editor/dynamic-forms-custom/hooks/useOneOf.js +75 -0
- package/build/cjs/editor/dynamic-forms-custom/parser/detect.d.ts +9 -0
- package/build/cjs/editor/dynamic-forms-custom/parser/detect.js +36 -0
- package/build/cjs/editor/dynamic-forms-custom/parser/index.d.ts +28 -0
- package/build/cjs/editor/dynamic-forms-custom/parser/index.js +187 -0
- package/build/cjs/editor/dynamic-forms-custom/parser/types.d.ts +28 -0
- package/build/cjs/editor/dynamic-forms-custom/parser/types.js +2 -0
- package/build/cjs/editor/dynamic-forms-custom/parser/views.d.ts +37 -0
- package/build/cjs/editor/dynamic-forms-custom/parser/views.js +46 -0
- package/build/cjs/editor/hooks/useFormSpec.d.ts +2 -0
- package/build/cjs/editor/hooks/useFormSpec.js +13 -0
- package/build/cjs/editor/hooks/usePreviousValue.d.ts +1 -0
- package/build/cjs/editor/hooks/usePreviousValue.js +11 -0
- package/build/cjs/editor/icons/Tablet.d.ts +2 -0
- package/build/cjs/editor/icons/Tablet.js +9 -0
- package/build/cjs/editor/index.d.ts +1 -1
- package/build/cjs/editor/index.js +1 -1
- package/build/cjs/editor/store/index.d.ts +12 -11
- package/build/cjs/editor/store/index.js +70 -15
- package/build/cjs/editor/store/reducer.d.ts +30 -9
- package/build/cjs/editor/store/reducer.js +20 -31
- package/build/cjs/editor/store/utils.d.ts +1 -0
- package/build/cjs/editor/store/utils.js +6 -2
- package/build/cjs/editor/styles/root.css +7 -0
- package/build/cjs/editor/types/index.d.ts +30 -12
- package/build/cjs/editor/types/index.js +8 -0
- package/build/cjs/editor/utils/index.d.ts +6 -3
- package/build/cjs/editor/utils/index.js +9 -4
- package/build/cjs/editor/widget/constants.d.ts +4 -0
- package/build/cjs/editor/widget/constants.js +8 -0
- package/build/cjs/editor/widget/index.d.ts +21 -0
- package/build/cjs/editor/widget/index.js +76 -0
- package/build/cjs/editor/widget/utils.d.ts +1 -0
- package/build/cjs/editor/widget/utils.js +19 -0
- package/build/cjs/grid/Col/Col.d.ts +3 -4
- package/build/cjs/grid/Col/Col.js +2 -2
- package/build/cjs/grid/Grid/Grid.css +1 -1
- package/build/cjs/hooks/useHeightCalculator.js +1 -1
- package/build/cjs/models/common.d.ts +6 -1
- package/build/cjs/models/common.js +6 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +17 -13
- package/build/cjs/models/constructor-items/common.d.ts +3 -5
- package/build/cjs/models/constructor.d.ts +2 -2
- package/build/cjs/models/customization.d.ts +5 -7
- package/build/cjs/models/navigation.d.ts +4 -2
- package/build/cjs/navigation/components/DesktopNavigation/DesktopNavigation.css +92 -0
- package/build/cjs/navigation/components/DesktopNavigation/DesktopNavigation.d.ts +4 -0
- package/build/cjs/navigation/components/DesktopNavigation/DesktopNavigation.js +21 -0
- package/build/cjs/navigation/components/Logo/Logo.css +3 -3
- package/build/cjs/navigation/components/Logo/Logo.js +3 -3
- package/build/cjs/navigation/components/MobileMenuButton/MobileMenuButton.css +7 -0
- package/build/cjs/navigation/components/MobileMenuButton/MobileMenuButton.d.ts +3 -0
- package/build/cjs/navigation/components/MobileMenuButton/MobileMenuButton.js +15 -0
- package/build/cjs/navigation/components/MobileNavigation/MobileNavigation.css +17 -12
- package/build/cjs/navigation/components/MobileNavigation/MobileNavigation.d.ts +1 -10
- package/build/cjs/navigation/components/MobileNavigation/MobileNavigation.js +11 -31
- package/build/cjs/navigation/components/Navigation/Navigation.css +8 -13
- package/build/cjs/navigation/components/Navigation/Navigation.d.ts +4 -7
- package/build/cjs/navigation/components/Navigation/Navigation.js +37 -15
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.css +28 -0
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.d.ts +3 -9
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +15 -6
- package/build/cjs/navigation/components/NavigationItem/components/GithubButton/GithubButton.d.ts +1 -1
- package/build/cjs/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.d.ts +1 -1
- package/build/cjs/navigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.css +1 -1
- package/build/cjs/navigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.d.ts +5 -4
- package/build/cjs/navigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.js +12 -8
- package/build/cjs/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.css +2 -2
- package/build/cjs/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.d.ts +1 -1
- package/build/cjs/navigation/components/NavigationList/NavigationList.d.ts +3 -0
- package/build/cjs/navigation/components/NavigationList/NavigationList.js +11 -0
- package/build/cjs/navigation/components/NavigationListItem/NavigationListItem.d.ts +4 -13
- package/build/cjs/navigation/components/NavigationListItem/NavigationListItem.js +6 -13
- package/build/cjs/navigation/components/NavigationPopup/NavigationPopup.css +10 -9
- package/build/cjs/navigation/components/NavigationPopup/NavigationPopup.d.ts +1 -8
- package/build/cjs/navigation/components/NavigationPopup/NavigationPopup.js +6 -6
- package/build/cjs/navigation/components/SocialIcon/SocialIcon.css +3 -3
- package/build/cjs/navigation/containers/Layout/Layout.js +2 -2
- package/build/cjs/navigation/models.d.ts +63 -0
- package/build/cjs/navigation/{constants.js → models.js} +7 -1
- package/build/cjs/navigation/schema.d.ts +1 -0
- package/build/cjs/navigation/schema.js +1 -1
- package/build/cjs/navigation/utils.d.ts +11 -1
- package/build/cjs/navigation/utils.js +19 -1
- package/build/cjs/schema/constants.d.ts +941 -0
- package/build/cjs/schema/constants.js +42 -0
- package/build/cjs/schema/index.d.ts +9 -228
- package/build/cjs/schema/index.js +8 -46
- package/build/cjs/schema/validators/common.d.ts +158 -30
- package/build/cjs/schema/validators/common.js +57 -19
- package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.css +4 -4
- package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +3 -3
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +26 -6
- package/build/cjs/sub-blocks/BannerCard/BannerCard.css +16 -16
- package/build/cjs/sub-blocks/BannerCard/BannerCard.js +3 -3
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +22 -4
- package/build/cjs/sub-blocks/Content/Content.css +22 -22
- package/build/cjs/sub-blocks/Content/Content.js +3 -1
- package/build/cjs/sub-blocks/Content/ContentList/ContentList.css +48 -0
- package/build/cjs/sub-blocks/Content/ContentList/ContentList.d.ts +7 -0
- package/build/cjs/sub-blocks/Content/ContentList/ContentList.js +25 -0
- package/build/cjs/sub-blocks/Content/schema.d.ts +74 -6
- package/build/cjs/sub-blocks/Content/schema.js +27 -2
- package/build/cjs/sub-blocks/Divider/Divider.css +1 -1
- package/build/cjs/sub-blocks/Divider/schema.d.ts +3 -1
- package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +39 -39
- package/build/cjs/sub-blocks/HubspotForm/index.js +2 -2
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.css +1 -1
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +115 -10
- package/build/cjs/sub-blocks/MediaCard/schema.d.ts +100 -6
- package/build/cjs/sub-blocks/MediaCard/schema.js +1 -1
- package/build/cjs/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.css +2 -2
- package/build/cjs/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.css +17 -29
- package/build/cjs/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.js +18 -1
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/Details/Settings.css +7 -7
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +5 -5
- package/build/cjs/sub-blocks/PriceDetailed/schema.d.ts +4 -1
- package/build/cjs/sub-blocks/PriceDetailed/schema.js +5 -1
- package/build/cjs/sub-blocks/Quote/Quote.css +10 -10
- package/build/cjs/sub-blocks/Quote/Quote.js +2 -2
- package/build/cjs/sub-blocks/Quote/schema.d.ts +9 -4
- package/build/cjs/sub-blocks/Quote/schema.js +1 -2
- package/build/cjs/text-transform/config.js +19 -1
- package/build/cjs/text-transform/filter.d.ts +20 -0
- package/build/cjs/text-transform/filter.js +61 -0
- package/build/cjs/text-transform/index.d.ts +1 -0
- package/build/cjs/text-transform/index.js +1 -0
- package/build/cjs/text-transform/transformers.d.ts +2 -0
- package/build/cjs/text-transform/transformers.js +3 -2
- package/build/cjs/text-transform/utils.js +6 -1
- package/build/cjs/utils/blocks.d.ts +1 -1
- package/build/cjs/utils/blocks.js +43 -3
- package/build/cjs/utils/imageCompress.js +1 -1
- package/build/cjs/utils/theme.d.ts +1 -1
- package/build/esm/blocks/Banner/schema.d.ts +72 -24
- package/build/esm/blocks/CardLayout/schema.d.ts +16 -6
- package/build/esm/blocks/Companies/Companies.css +5 -5
- package/build/esm/blocks/Companies/Companies.js +3 -3
- package/build/esm/blocks/Companies/schema.d.ts +8 -3
- package/build/esm/blocks/ContentLayout/ContentLayout.css +4 -7
- package/build/esm/blocks/ContentLayout/ContentLayout.js +1 -2
- package/build/esm/blocks/ContentLayout/schema.d.ts +112 -59
- package/build/esm/blocks/ContentLayout/schema.js +23 -18
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.css +16 -16
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +3 -3
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +37 -6
- package/build/esm/blocks/ExtendedFeatures/schema.js +3 -4
- package/build/esm/blocks/FilterBlock/schema.d.ts +19 -7
- package/build/esm/blocks/FilterBlock/schema.js +13 -2
- package/build/esm/blocks/Header/Header.css +28 -25
- package/build/esm/blocks/Header/Header.js +6 -7
- package/build/esm/blocks/Header/schema.d.ts +329 -37
- package/build/esm/blocks/Header/schema.js +1 -0
- package/build/esm/blocks/HeaderSlider/schema.d.ts +129 -54
- package/build/esm/blocks/HeaderSlider/schema.js +2 -1
- package/build/esm/blocks/Icons/Icons.css +2 -2
- package/build/esm/blocks/Icons/schema.d.ts +9 -3
- package/build/esm/blocks/Icons/schema.js +2 -1
- package/build/esm/blocks/Info/Info.css +1 -1
- package/build/esm/blocks/Info/Info.js +3 -3
- package/build/esm/blocks/Info/schema.d.ts +44 -9
- package/build/esm/blocks/Map/schema.d.ts +31 -7
- package/build/esm/blocks/Media/Media.js +3 -3
- package/build/esm/blocks/Media/schema.d.ts +346 -112
- package/build/esm/blocks/Media/schema.js +2 -2
- package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.css +13 -13
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +103 -9
- package/build/esm/blocks/PromoFeaturesBlock/schema.js +1 -0
- package/build/esm/blocks/Questions/Questions.css +12 -12
- package/build/esm/blocks/Questions/schema.d.ts +21 -4
- package/build/esm/blocks/Share/Share.css +14 -12
- package/build/esm/blocks/Share/schema.d.ts +3 -1
- package/build/esm/blocks/Slider/Arrow/Arrow.css +4 -4
- package/build/esm/blocks/Slider/Arrow/Arrow.js +1 -1
- package/build/esm/blocks/Slider/Slider.css +12 -12
- package/build/esm/blocks/Slider/Slider.js +4 -4
- package/build/esm/blocks/Slider/schema.d.ts +16 -19
- package/build/esm/blocks/Slider/schema.js +4 -5
- package/build/esm/blocks/Slider/utils.d.ts +2 -2
- package/build/esm/blocks/Slider/utils.js +2 -1
- package/build/esm/blocks/Table/Table.css +5 -5
- package/build/esm/blocks/Table/schema.d.ts +11 -4
- package/build/esm/blocks/Table/schema.js +12 -2
- package/build/esm/blocks/Tabs/Tabs.css +6 -6
- package/build/esm/blocks/Tabs/Tabs.d.ts +1 -1
- package/build/esm/blocks/Tabs/Tabs.js +5 -5
- package/build/esm/blocks/Tabs/schema.d.ts +142 -18
- package/build/esm/blocks/Tabs/schema.js +5 -2
- package/build/esm/components/Anchor/Anchor.d.ts +2 -3
- package/build/esm/components/AnimateBlock/AnimateBlock.d.ts +2 -3
- package/build/esm/components/Author/Author.css +8 -8
- package/build/esm/components/Author/Author.js +2 -2
- package/build/esm/components/Author/schema.d.ts +3 -1
- package/build/esm/components/BlockBase/BlockBase.css +4 -1
- package/build/esm/components/BlockBase/BlockBase.d.ts +3 -2
- package/build/esm/components/BlockBase/BlockBase.js +3 -5
- package/build/esm/components/Button/Button.css +4 -0
- package/build/esm/components/Button/Button.d.ts +2 -3
- package/build/esm/components/Button/Button.js +4 -3
- package/build/esm/components/ButtonTabs/ButtonTabs.css +4 -0
- package/build/esm/components/ButtonTabs/ButtonTabs.d.ts +2 -3
- package/build/esm/components/CardBase/CardBase.css +6 -6
- package/build/esm/components/Control/Control.css +9 -9
- package/build/esm/components/ErrorWrapper/ErrorWrapper.css +3 -3
- package/build/esm/components/FileLink/FileLink.css +16 -56
- package/build/esm/components/FileLink/FileLink.js +18 -1
- package/build/esm/components/FullWidthBackground/FullWidthBackground.css +1 -1
- package/build/esm/components/FullscreenImage/FullscreenImage.css +3 -3
- package/build/esm/components/FullscreenMedia/FullscreenMedia.css +3 -3
- package/build/esm/components/HTML/HTML.js +2 -1
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.css +11 -11
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -1
- package/build/esm/components/Image/Image.d.ts +2 -3
- package/build/esm/components/Image/schema.d.ts +2 -1
- package/build/esm/components/Image/schema.js +9 -8
- package/build/esm/components/Link/Link.css +13 -13
- package/build/esm/components/Media/Image/Image.js +4 -3
- package/build/esm/components/Media/Media.js +1 -1
- package/build/esm/components/Media/Video/Video.js +1 -0
- package/build/esm/components/MediaBase/MediaBaseContent.js +2 -2
- package/build/esm/components/MetaInfo/MetaInfo.css +2 -2
- package/build/esm/components/MetaInfo/MetaInfo.js +1 -1
- package/build/esm/components/OverflowScroller/OverflowScroller.css +1 -1
- package/build/esm/components/ReactPlayer/CustomBarControls.css +1 -1
- package/build/esm/components/ReactPlayer/ReactPlayer.css +2 -2
- package/build/esm/components/Table/Table.css +8 -8
- package/build/esm/components/Title/Title.css +4 -4
- package/build/esm/components/Title/TitleItem.css +19 -19
- package/build/esm/components/Title/TitleItem.d.ts +2 -3
- package/build/esm/components/Title/TitleItem.js +2 -2
- package/build/esm/components/UnpublishedLabel/UnpublishedLabel.css +5 -5
- package/build/esm/components/VideoBlock/VideoBlock.css +2 -2
- package/build/esm/components/VideoBlock/VideoBlock.d.ts +2 -1
- package/build/esm/components/VideoBlock/VideoBlock.js +6 -2
- package/build/esm/components/constants.d.ts +3 -1
- package/build/esm/components/constants.js +3 -1
- package/build/esm/constructor-items.d.ts +1 -1
- package/build/esm/containers/PageConstructor/PageConstructor.css +50 -30
- package/build/esm/containers/PageConstructor/PageConstructor.js +7 -4
- package/build/esm/containers/PageConstructor/Provider.d.ts +2 -3
- package/build/esm/containers/PageConstructor/Provider.js +2 -2
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.d.ts +2 -2
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +8 -4
- package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.d.ts +1 -2
- package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +7 -4
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +5 -3
- package/build/esm/containers/PageConstructor/components/index.d.ts +2 -0
- package/build/esm/containers/PageConstructor/components/index.js +1 -0
- package/build/esm/containers/PageConstructor/index.d.ts +1 -0
- package/build/esm/containers/PageConstructor/index.js +1 -0
- package/build/esm/context/theme/ThemeContext.d.ts +2 -3
- package/build/esm/context/theme/ThemeContext.js +0 -1
- package/build/esm/context/theme/index.d.ts +0 -1
- package/build/esm/context/theme/index.js +0 -1
- package/build/esm/context/theme/useTheme.d.ts +1 -1
- package/build/esm/context/theme/useTheme.js +2 -2
- package/build/esm/context/theme/withTheme.js +1 -1
- package/build/esm/customization/BlockDecoration.d.ts +1 -1
- package/build/esm/customization/BlockDecoration.js +9 -14
- package/build/esm/editor/{Components → components}/AddBlock/AddBlock.css +7 -6
- package/build/esm/editor/components/AddBlock/AddBlock.d.ts +8 -0
- package/build/esm/editor/{Components → components}/AddBlock/AddBlock.js +3 -3
- package/build/esm/editor/components/BlockForm/BlockForm.d.ts +12 -0
- package/build/esm/editor/components/BlockForm/BlockForm.js +25 -0
- package/build/esm/editor/components/ControlPanel/ControlPanel.css +34 -0
- package/build/esm/editor/components/ControlPanel/ControlPanel.d.ts +11 -0
- package/build/esm/editor/components/ControlPanel/ControlPanel.js +33 -0
- package/build/esm/editor/components/ControlPanel/i18n/en.json +3 -0
- package/build/esm/editor/components/ControlPanel/i18n/index.d.ts +2 -0
- package/build/esm/editor/components/ControlPanel/i18n/index.js +5 -0
- package/build/esm/editor/components/ControlPanel/i18n/ru.json +3 -0
- package/build/esm/editor/components/DeviceEmulation/DeviceEmulation.d.ts +7 -0
- package/build/esm/editor/components/DeviceEmulation/DeviceEmulation.js +7 -0
- package/build/esm/editor/components/DeviceEmulation/DeviceEmulationMobile/DeviceEmulationMobile.css +33 -0
- package/build/esm/editor/components/DeviceEmulation/DeviceEmulationMobile/DeviceEmulationMobile.d.ts +9 -0
- package/build/esm/editor/components/DeviceEmulation/DeviceEmulationMobile/DeviceEmulationMobile.js +40 -0
- package/build/esm/editor/components/DeviceEmulation/utils.d.ts +4 -0
- package/build/esm/editor/components/DeviceEmulation/utils.js +3 -0
- package/build/{cjs/editor/Components → esm/editor/components}/EditBlock/EditBlock.css +22 -14
- package/build/esm/editor/components/EditBlock/EditBlock.d.ts +14 -0
- package/build/esm/editor/components/EditBlock/EditBlock.js +45 -0
- package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.css +27 -0
- package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.d.ts +14 -0
- package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.js +31 -0
- package/build/esm/editor/components/ErrorBoundary/i18n/en.json +4 -0
- package/build/esm/editor/components/ErrorBoundary/i18n/index.d.ts +2 -0
- package/build/esm/editor/components/ErrorBoundary/i18n/index.js +5 -0
- package/build/esm/editor/components/ErrorBoundary/i18n/ru.json +4 -0
- package/build/esm/editor/components/Layout/Layout.css +44 -0
- package/build/esm/editor/components/Layout/Layout.d.ts +20 -0
- package/build/esm/editor/components/Layout/Layout.js +36 -0
- package/build/esm/editor/components/NotFoundBlock/NotFoundBlock.css +21 -0
- package/build/esm/editor/components/NotFoundBlock/NotFoundBlock.d.ts +3 -0
- package/build/esm/editor/components/NotFoundBlock/NotFoundBlock.js +8 -0
- package/build/esm/editor/components/NotFoundBlock/i18n/en.json +3 -0
- package/build/esm/editor/components/NotFoundBlock/i18n/index.d.ts +2 -0
- package/build/esm/editor/components/NotFoundBlock/i18n/index.js +5 -0
- package/build/esm/editor/components/NotFoundBlock/i18n/ru.json +3 -0
- package/build/esm/editor/components/PagePropsForm/PagePropsForm.d.ts +10 -0
- package/build/esm/editor/components/PagePropsForm/PagePropsForm.js +13 -0
- package/build/esm/editor/components/YamlEditor/YamlEditor.css +12 -0
- package/build/esm/editor/components/YamlEditor/YamlEditor.d.ts +7 -0
- package/build/esm/editor/components/YamlEditor/YamlEditor.js +30 -0
- package/build/esm/editor/containers/Editor/Editor.d.ts +2 -0
- package/build/esm/editor/containers/Editor/Editor.js +63 -0
- package/build/esm/editor/containers/Form/Form.css +115 -0
- package/build/esm/editor/containers/Form/Form.d.ts +12 -0
- package/build/esm/editor/containers/Form/Form.js +52 -0
- package/build/esm/editor/containers/Form/dynamic-form-custom.css +0 -0
- package/build/esm/editor/context.d.ts +9 -0
- package/build/esm/editor/context.js +2 -0
- package/build/esm/editor/data/previews/default-preview.js +1 -1
- package/build/esm/editor/data/previews/header-block.js +5 -5
- package/build/esm/editor/data/templates/banner-block.json +25 -0
- package/build/esm/editor/data/templates/card-layout-block.json +39 -0
- package/build/esm/editor/data/templates/companies-block.json +20 -0
- package/build/esm/editor/data/templates/content-layout-block.json +56 -0
- package/build/esm/editor/data/templates/extended-features-block.json +56 -0
- package/build/esm/editor/data/templates/filter-block.json +62 -0
- package/build/esm/editor/data/templates/header-block.json +19 -0
- package/build/esm/editor/data/templates/header-slider-block.json +69 -0
- package/build/esm/editor/data/templates/icons-block.json +32 -0
- package/build/esm/editor/data/templates/info-block.json +40 -0
- package/build/esm/editor/data/templates/link-table-block.json +10 -0
- package/build/esm/editor/data/templates/map-block.json +48 -0
- package/build/esm/editor/data/templates/media-block.json +15 -0
- package/build/esm/editor/data/templates/preview-block.json +38 -0
- package/build/esm/editor/data/templates/promo-features-block.json +52 -0
- package/build/esm/editor/data/templates/questions-block.json +105 -0
- package/build/esm/editor/data/templates/security-block.json +36 -0
- package/build/esm/editor/data/templates/share-block.json +6 -0
- package/build/esm/editor/data/templates/simple-block.json +7 -0
- package/build/esm/editor/data/templates/slider-block.json +46 -0
- package/build/esm/editor/data/templates/table-block.json +18 -0
- package/build/esm/editor/data/templates/tabs-block.json +90 -0
- package/build/esm/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.css +27 -0
- package/build/esm/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.d.ts +20 -0
- package/build/esm/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.js +68 -0
- package/build/esm/editor/dynamic-forms-custom/config.d.ts +2 -0
- package/build/esm/editor/dynamic-forms-custom/config.js +9 -0
- package/build/esm/editor/dynamic-forms-custom/hooks/useOneOf.d.ts +12 -0
- package/build/esm/editor/dynamic-forms-custom/hooks/useOneOf.js +69 -0
- package/build/esm/editor/dynamic-forms-custom/parser/detect.d.ts +9 -0
- package/build/esm/editor/dynamic-forms-custom/parser/detect.js +32 -0
- package/build/esm/editor/dynamic-forms-custom/parser/index.d.ts +28 -0
- package/build/esm/editor/dynamic-forms-custom/parser/index.js +185 -0
- package/build/esm/editor/dynamic-forms-custom/parser/types.d.ts +28 -0
- package/build/esm/editor/dynamic-forms-custom/parser/types.js +1 -0
- package/build/esm/editor/dynamic-forms-custom/parser/views.d.ts +37 -0
- package/build/esm/editor/dynamic-forms-custom/parser/views.js +39 -0
- package/build/esm/editor/hooks/useFormSpec.d.ts +2 -0
- package/build/esm/editor/hooks/useFormSpec.js +9 -0
- package/build/esm/editor/hooks/usePreviousValue.d.ts +1 -0
- package/build/esm/editor/hooks/usePreviousValue.js +8 -0
- package/build/esm/editor/icons/Tablet.d.ts +2 -0
- package/build/esm/editor/icons/Tablet.js +4 -0
- package/build/esm/editor/index.d.ts +1 -1
- package/build/esm/editor/index.js +1 -1
- package/build/esm/editor/store/index.d.ts +12 -11
- package/build/esm/editor/store/index.js +72 -17
- package/build/esm/editor/store/reducer.d.ts +30 -9
- package/build/esm/editor/store/reducer.js +18 -29
- package/build/esm/editor/store/utils.d.ts +1 -0
- package/build/esm/editor/store/utils.js +3 -1
- package/build/esm/editor/styles/root.css +7 -0
- package/build/esm/editor/types/index.d.ts +30 -12
- package/build/esm/editor/types/index.js +7 -1
- package/build/esm/editor/utils/index.d.ts +6 -3
- package/build/esm/editor/utils/index.js +6 -3
- package/build/esm/editor/widget/constants.d.ts +4 -0
- package/build/esm/editor/widget/constants.js +5 -0
- package/build/esm/editor/widget/index.d.ts +21 -0
- package/build/esm/editor/widget/index.js +71 -0
- package/build/esm/editor/widget/utils.d.ts +1 -0
- package/build/esm/editor/widget/utils.js +15 -0
- package/build/esm/grid/Col/Col.d.ts +3 -4
- package/build/esm/grid/Col/Col.js +2 -2
- package/build/esm/grid/Grid/Grid.css +1 -1
- package/build/esm/hooks/useHeightCalculator.js +1 -1
- package/build/esm/models/common.d.ts +6 -1
- package/build/esm/models/common.js +5 -0
- package/build/esm/models/constructor-items/blocks.d.ts +17 -13
- package/build/esm/models/constructor-items/common.d.ts +3 -5
- package/build/esm/models/constructor.d.ts +2 -2
- package/build/esm/models/customization.d.ts +5 -7
- package/build/esm/models/navigation.d.ts +4 -2
- package/build/esm/navigation/components/DesktopNavigation/DesktopNavigation.css +92 -0
- package/build/esm/navigation/components/DesktopNavigation/DesktopNavigation.d.ts +5 -0
- package/build/esm/navigation/components/DesktopNavigation/DesktopNavigation.js +19 -0
- package/build/esm/navigation/components/Logo/Logo.css +3 -3
- package/build/esm/navigation/components/Logo/Logo.js +3 -3
- package/build/esm/navigation/components/MobileMenuButton/MobileMenuButton.css +7 -0
- package/build/esm/navigation/components/MobileMenuButton/MobileMenuButton.d.ts +4 -0
- package/build/esm/navigation/components/MobileMenuButton/MobileMenuButton.js +11 -0
- package/build/esm/navigation/components/MobileNavigation/MobileNavigation.css +17 -12
- package/build/esm/navigation/components/MobileNavigation/MobileNavigation.d.ts +1 -10
- package/build/esm/navigation/components/MobileNavigation/MobileNavigation.js +13 -32
- package/build/esm/navigation/components/Navigation/Navigation.css +8 -13
- package/build/esm/navigation/components/Navigation/Navigation.d.ts +4 -7
- package/build/esm/navigation/components/Navigation/Navigation.js +35 -15
- package/build/esm/navigation/components/NavigationItem/NavigationItem.css +28 -0
- package/build/esm/navigation/components/NavigationItem/NavigationItem.d.ts +4 -9
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js +16 -6
- package/build/esm/navigation/components/NavigationItem/components/GithubButton/GithubButton.d.ts +1 -1
- package/build/esm/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.d.ts +1 -1
- package/build/esm/navigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.css +1 -1
- package/build/esm/navigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.d.ts +5 -4
- package/build/esm/navigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.js +11 -8
- package/build/esm/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.css +2 -2
- package/build/esm/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.d.ts +1 -1
- package/build/esm/navigation/components/NavigationList/NavigationList.d.ts +3 -0
- package/build/esm/navigation/components/NavigationList/NavigationList.js +7 -0
- package/build/esm/navigation/components/NavigationListItem/NavigationListItem.d.ts +4 -14
- package/build/esm/navigation/components/NavigationListItem/NavigationListItem.js +5 -10
- package/build/esm/navigation/components/NavigationPopup/NavigationPopup.css +10 -9
- package/build/esm/navigation/components/NavigationPopup/NavigationPopup.d.ts +1 -8
- package/build/esm/navigation/components/NavigationPopup/NavigationPopup.js +6 -6
- package/build/esm/navigation/components/SocialIcon/SocialIcon.css +3 -3
- package/build/esm/navigation/containers/Layout/Layout.js +2 -2
- package/build/esm/navigation/models.d.ts +63 -0
- package/build/esm/navigation/{constants.js → models.js} +6 -0
- package/build/esm/navigation/schema.d.ts +1 -0
- package/build/esm/navigation/schema.js +2 -2
- package/build/esm/navigation/utils.d.ts +11 -1
- package/build/esm/navigation/utils.js +17 -0
- package/build/esm/schema/constants.d.ts +941 -0
- package/build/esm/schema/constants.js +39 -0
- package/build/esm/schema/index.d.ts +9 -228
- package/build/esm/schema/index.js +4 -42
- package/build/esm/schema/validators/common.d.ts +158 -30
- package/build/esm/schema/validators/common.js +57 -19
- package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.css +4 -4
- package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +3 -3
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +26 -6
- package/build/esm/sub-blocks/BannerCard/BannerCard.css +16 -16
- package/build/esm/sub-blocks/BannerCard/BannerCard.js +3 -3
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +22 -4
- package/build/esm/sub-blocks/Content/Content.css +22 -22
- package/build/esm/sub-blocks/Content/Content.js +3 -1
- package/build/esm/sub-blocks/Content/ContentList/ContentList.css +48 -0
- package/build/esm/sub-blocks/Content/ContentList/ContentList.d.ts +8 -0
- package/build/esm/sub-blocks/Content/ContentList/ContentList.js +23 -0
- package/build/esm/sub-blocks/Content/schema.d.ts +74 -6
- package/build/esm/sub-blocks/Content/schema.js +27 -2
- package/build/esm/sub-blocks/Divider/Divider.css +1 -1
- package/build/esm/sub-blocks/Divider/schema.d.ts +3 -1
- package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +39 -39
- package/build/esm/sub-blocks/HubspotForm/index.js +2 -2
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.css +1 -1
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +115 -10
- package/build/esm/sub-blocks/MediaCard/schema.d.ts +100 -6
- package/build/esm/sub-blocks/MediaCard/schema.js +2 -2
- package/build/esm/sub-blocks/PriceDetailed/CombinedPriceDetailed/CombinedPriceDetailed.css +2 -2
- package/build/esm/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.css +17 -29
- package/build/esm/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.js +18 -1
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/Details/Settings.css +7 -7
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +5 -5
- package/build/esm/sub-blocks/PriceDetailed/schema.d.ts +4 -1
- package/build/esm/sub-blocks/PriceDetailed/schema.js +5 -1
- package/build/esm/sub-blocks/Quote/Quote.css +10 -10
- package/build/esm/sub-blocks/Quote/Quote.js +3 -3
- package/build/esm/sub-blocks/Quote/schema.d.ts +9 -4
- package/build/esm/sub-blocks/Quote/schema.js +2 -3
- package/build/esm/text-transform/config.js +19 -1
- package/build/esm/text-transform/filter.d.ts +20 -0
- package/build/esm/text-transform/filter.js +56 -0
- package/build/esm/text-transform/index.d.ts +1 -0
- package/build/esm/text-transform/index.js +1 -0
- package/build/esm/text-transform/transformers.d.ts +2 -0
- package/build/esm/text-transform/transformers.js +3 -2
- package/build/esm/text-transform/utils.js +6 -1
- package/build/esm/utils/blocks.d.ts +1 -1
- package/build/esm/utils/blocks.js +41 -1
- package/build/esm/utils/imageCompress.js +1 -1
- package/build/esm/utils/theme.d.ts +1 -1
- package/package.json +87 -24
- package/server/components/constants.d.ts +3 -1
- package/server/components/constants.js +4 -2
- package/server/models/common.d.ts +6 -1
- package/server/models/common.js +6 -1
- package/server/models/constructor-items/blocks.d.ts +17 -13
- package/server/models/constructor-items/common.d.ts +3 -5
- package/server/models/constructor.d.ts +2 -2
- package/server/models/customization.d.ts +5 -7
- package/server/models/navigation.d.ts +4 -2
- package/server/text-transform/config.js +19 -1
- package/server/text-transform/filter.d.ts +20 -0
- package/server/text-transform/filter.js +63 -0
- package/server/text-transform/index.d.ts +1 -0
- package/server/text-transform/index.js +1 -0
- package/server/text-transform/transformers.d.ts +2 -0
- package/server/text-transform/transformers.js +3 -2
- package/server/text-transform/utils.js +6 -1
- package/server/utils/blocks.d.ts +1 -1
- package/server/utils/blocks.js +43 -3
- package/server/utils/theme.d.ts +1 -1
- package/styles/colors/dark.scss +6 -0
- package/styles/colors/light.scss +6 -0
- package/styles/colors/social.scss +10 -0
- package/styles/mixins.scss +27 -29
- package/styles/root.scss +28 -14
- package/styles/storybook/common.scss +6 -6
- package/styles/storybook/palette.scss +6 -6
- package/styles/storybook/typography.scss +46 -46
- package/styles/styles.css +15 -15
- package/styles/variables.scss +0 -8
- package/styles/yfm.scss +12 -12
- package/widget/index.js +1 -0
- package/CHANGELOG.md +0 -1266
- package/build/cjs/context/theme/ThemeProvider.d.ts +0 -22
- package/build/cjs/context/theme/ThemeProvider.js +0 -49
- package/build/cjs/context/theme/ThemeValueContext.d.ts +0 -7
- package/build/cjs/context/theme/ThemeValueContext.js +0 -9
- package/build/cjs/context/theme/useThemeValue.d.ts +0 -2
- package/build/cjs/context/theme/useThemeValue.js +0 -11
- package/build/cjs/editor/Components/AddBlock/AddBlock.d.ts +0 -7
- package/build/cjs/editor/Components/EditBlock/EditBlock.d.ts +0 -4
- package/build/cjs/editor/Components/EditBlock/EditBlock.js +0 -32
- package/build/cjs/editor/Containers/Editor.d.ts +0 -2
- package/build/cjs/editor/Containers/Editor.js +0 -24
- package/build/cjs/navigation/components/Header/Header.css +0 -98
- package/build/cjs/navigation/components/Header/Header.d.ts +0 -8
- package/build/cjs/navigation/components/Header/Header.js +0 -68
- package/build/cjs/navigation/components/NavigationDropdownItem/NavigationDropdownItem.d.ts +0 -11
- package/build/cjs/navigation/components/NavigationDropdownItem/NavigationDropdownItem.js +0 -15
- package/build/cjs/navigation/components/NavigationListItem/NavigationListItem.css +0 -27
- package/build/cjs/navigation/constants.d.ts +0 -6
- package/build/esm/context/theme/ThemeProvider.d.ts +0 -22
- package/build/esm/context/theme/ThemeProvider.js +0 -44
- package/build/esm/context/theme/ThemeValueContext.d.ts +0 -7
- package/build/esm/context/theme/ThemeValueContext.js +0 -5
- package/build/esm/context/theme/useThemeValue.d.ts +0 -2
- package/build/esm/context/theme/useThemeValue.js +0 -6
- package/build/esm/editor/Components/AddBlock/AddBlock.d.ts +0 -8
- package/build/esm/editor/Components/EditBlock/EditBlock.d.ts +0 -5
- package/build/esm/editor/Components/EditBlock/EditBlock.js +0 -30
- package/build/esm/editor/Containers/Editor.d.ts +0 -2
- package/build/esm/editor/Containers/Editor.js +0 -20
- package/build/esm/navigation/components/Header/Header.css +0 -98
- package/build/esm/navigation/components/Header/Header.d.ts +0 -9
- package/build/esm/navigation/components/Header/Header.js +0 -64
- package/build/esm/navigation/components/NavigationDropdownItem/NavigationDropdownItem.d.ts +0 -11
- package/build/esm/navigation/components/NavigationDropdownItem/NavigationDropdownItem.js +0 -13
- package/build/esm/navigation/components/NavigationListItem/NavigationListItem.css +0 -27
- package/build/esm/navigation/constants.d.ts +0 -6
|
@@ -10,14 +10,14 @@ unpredictable css rules order in build */
|
|
|
10
10
|
height: 100%;
|
|
11
11
|
overflow-x: hidden;
|
|
12
12
|
border-radius: var(--pc-border-radius);
|
|
13
|
-
background-color: var(--
|
|
13
|
+
background-color: var(--g-color-base-float);
|
|
14
14
|
transition: box-shadow 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
|
|
15
15
|
display: flex;
|
|
16
16
|
min-height: 400px;
|
|
17
17
|
height: 100%;
|
|
18
18
|
}
|
|
19
19
|
.pc-quote_theme_dark {
|
|
20
|
-
color: var(--
|
|
20
|
+
color: var(--g-color-text-light-primary);
|
|
21
21
|
}
|
|
22
22
|
.pc-quote_theme_dark h1,
|
|
23
23
|
.pc-quote_theme_dark h2,
|
|
@@ -26,10 +26,10 @@ unpredictable css rules order in build */
|
|
|
26
26
|
.pc-quote_theme_dark h5,
|
|
27
27
|
.pc-quote_theme_dark h6,
|
|
28
28
|
.pc-quote_theme_dark .yfm {
|
|
29
|
-
color: var(--
|
|
29
|
+
color: var(--g-color-text-light-primary);
|
|
30
30
|
}
|
|
31
31
|
.pc-quote_border_line {
|
|
32
|
-
border: 1px solid var(--
|
|
32
|
+
border: 1px solid var(--g-color-line-generic);
|
|
33
33
|
}
|
|
34
34
|
.pc-quote_border_line, .pc-quote_border_none {
|
|
35
35
|
cursor: default;
|
|
@@ -60,8 +60,8 @@ unpredictable css rules order in build */
|
|
|
60
60
|
.pc-quote__content {
|
|
61
61
|
margin-top: 24px;
|
|
62
62
|
position: relative;
|
|
63
|
-
font-size: var(--
|
|
64
|
-
line-height: var(--
|
|
63
|
+
font-size: var(--g-text-body-3-font-size);
|
|
64
|
+
line-height: var(--g-text-body-3-line-height);
|
|
65
65
|
}
|
|
66
66
|
.pc-quote__content::before {
|
|
67
67
|
position: absolute;
|
|
@@ -84,7 +84,7 @@ unpredictable css rules order in build */
|
|
|
84
84
|
margin-top: 20px;
|
|
85
85
|
}
|
|
86
86
|
.pc-quote__author_theme_dark, .pc-quote_theme_dark {
|
|
87
|
-
color: var(--
|
|
87
|
+
color: var(--g-color-text-light-primary);
|
|
88
88
|
}
|
|
89
89
|
.pc-quote__author_theme_dark h1,
|
|
90
90
|
.pc-quote__author_theme_dark h2,
|
|
@@ -99,7 +99,7 @@ unpredictable css rules order in build */
|
|
|
99
99
|
.pc-quote_theme_dark h5,
|
|
100
100
|
.pc-quote_theme_dark h6,
|
|
101
101
|
.pc-quote_theme_dark .yfm {
|
|
102
|
-
color: var(--
|
|
102
|
+
color: var(--g-color-text-light-primary);
|
|
103
103
|
}
|
|
104
104
|
.pc-quote__author {
|
|
105
105
|
max-width: calc(60% - 20px);
|
|
@@ -110,10 +110,10 @@ unpredictable css rules order in build */
|
|
|
110
110
|
/* stylelint-enable declaration-no-important */
|
|
111
111
|
}
|
|
112
112
|
.pc-quote__link-button_theme_dark {
|
|
113
|
-
color: var(--
|
|
113
|
+
color: var(--g-color-base-background) !important;
|
|
114
114
|
}
|
|
115
115
|
.pc-quote__link-button_theme_dark:before {
|
|
116
|
-
border-color: var(--
|
|
116
|
+
border-color: var(--g-color-base-background) !important;
|
|
117
117
|
}
|
|
118
118
|
@media (max-width: 1081px) {
|
|
119
119
|
.pc-quote__author-wrapper {
|
|
@@ -5,14 +5,14 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
5
5
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
6
6
|
const components_1 = require("../../components");
|
|
7
7
|
const utils_1 = require("../../components/Media/Image/utils");
|
|
8
|
-
const
|
|
8
|
+
const theme_1 = require("../../context/theme");
|
|
9
9
|
const hooks_1 = require("../../hooks");
|
|
10
10
|
const models_1 = require("../../models");
|
|
11
11
|
const utils_2 = require("../../utils");
|
|
12
12
|
const b = (0, utils_2.block)('quote');
|
|
13
13
|
const Quote = (props) => {
|
|
14
14
|
const { theme: textTheme = 'light', color, image, border = 'shadow', text, logo, author, url, buttonText, } = props;
|
|
15
|
-
const
|
|
15
|
+
const theme = (0, theme_1.useTheme)();
|
|
16
16
|
const imageThemed = (0, utils_2.getThemedValue)(image, theme);
|
|
17
17
|
const imageData = (0, utils_1.getMediaImage)(imageThemed);
|
|
18
18
|
const handleAnalytics = (0, hooks_1.useAnalytics)(models_1.DefaultEventNames.QuoteButton, url);
|
|
@@ -8,7 +8,7 @@ export declare const Quote: {
|
|
|
8
8
|
contentType: string;
|
|
9
9
|
};
|
|
10
10
|
image: {
|
|
11
|
-
oneOf: ({
|
|
11
|
+
oneOf: (({
|
|
12
12
|
oneOf: ({
|
|
13
13
|
type: string;
|
|
14
14
|
properties: {
|
|
@@ -19,12 +19,16 @@ export declare const Quote: {
|
|
|
19
19
|
} | {
|
|
20
20
|
type: string;
|
|
21
21
|
pattern: string;
|
|
22
|
+
optionName: string;
|
|
22
23
|
})[];
|
|
23
|
-
}
|
|
24
|
+
} & {
|
|
25
|
+
optionName: string;
|
|
26
|
+
}) | {
|
|
24
27
|
type: string;
|
|
25
28
|
additionalProperties: boolean;
|
|
26
29
|
required: import("../..").Theme[];
|
|
27
30
|
properties: {};
|
|
31
|
+
optionName: string;
|
|
28
32
|
})[];
|
|
29
33
|
};
|
|
30
34
|
logo: {
|
|
@@ -36,7 +40,6 @@ export declare const Quote: {
|
|
|
36
40
|
};
|
|
37
41
|
url: {
|
|
38
42
|
type: string;
|
|
39
|
-
pattern: string;
|
|
40
43
|
};
|
|
41
44
|
buttonText: {
|
|
42
45
|
type: string;
|
|
@@ -68,7 +71,9 @@ export declare const Quote: {
|
|
|
68
71
|
};
|
|
69
72
|
};
|
|
70
73
|
type: {};
|
|
71
|
-
when: {
|
|
74
|
+
when: {
|
|
75
|
+
type: string;
|
|
76
|
+
};
|
|
72
77
|
};
|
|
73
78
|
};
|
|
74
79
|
};
|
|
@@ -12,12 +12,11 @@ exports.Quote = {
|
|
|
12
12
|
contentType: 'text',
|
|
13
13
|
}, image: (0, common_1.withTheme)(schema_1.ImageProps), logo: {
|
|
14
14
|
type: 'string',
|
|
15
|
-
pattern: schema_1.
|
|
15
|
+
pattern: schema_1.imageUrlPattern,
|
|
16
16
|
}, color: {
|
|
17
17
|
type: 'string',
|
|
18
18
|
}, url: {
|
|
19
19
|
type: 'string',
|
|
20
|
-
pattern: schema_1.urlPattern,
|
|
21
20
|
}, buttonText: {
|
|
22
21
|
type: 'string',
|
|
23
22
|
}, theme: common_1.ThemeProps, author: common_1.authorItem }),
|
|
@@ -51,7 +51,7 @@ function parsePriceDetailedBlock(transformer, block) {
|
|
|
51
51
|
}
|
|
52
52
|
const parseContentLayout = (transformer, content) => {
|
|
53
53
|
if (content) {
|
|
54
|
-
const { text, additionalInfo } = content;
|
|
54
|
+
const { text, additionalInfo, list } = content;
|
|
55
55
|
/* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */
|
|
56
56
|
if (text) {
|
|
57
57
|
content.text = transformer(text);
|
|
@@ -59,6 +59,14 @@ const parseContentLayout = (transformer, content) => {
|
|
|
59
59
|
if (additionalInfo) {
|
|
60
60
|
content.additionalInfo = transformer(additionalInfo);
|
|
61
61
|
}
|
|
62
|
+
if (list) {
|
|
63
|
+
content.list = list.map((item) => {
|
|
64
|
+
if (item === null || item === void 0 ? void 0 : item.text) {
|
|
65
|
+
return Object.assign(Object.assign({}, item), { text: transformer(item.text) });
|
|
66
|
+
}
|
|
67
|
+
return item;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
62
70
|
/* eslint-enable no-not-accumulator-reassign/no-not-accumulator-reassign */
|
|
63
71
|
}
|
|
64
72
|
return content;
|
|
@@ -187,6 +195,11 @@ exports.config = {
|
|
|
187
195
|
fields: ['title', 'additionalInfo'],
|
|
188
196
|
transformer: common_1.yfmTransformer,
|
|
189
197
|
},
|
|
198
|
+
{
|
|
199
|
+
fields: ['list'],
|
|
200
|
+
transformer: common_1.yfmTransformer,
|
|
201
|
+
parser: (0, common_1.createItemsParser)(['text']),
|
|
202
|
+
},
|
|
190
203
|
],
|
|
191
204
|
[models_1.BlockType.MapBlock]: [
|
|
192
205
|
...exports.blockHeaderTransformer,
|
|
@@ -261,6 +274,11 @@ exports.config = {
|
|
|
261
274
|
transformer: common_1.typografTransformer,
|
|
262
275
|
parser: parseTitle,
|
|
263
276
|
},
|
|
277
|
+
{
|
|
278
|
+
fields: ['list'],
|
|
279
|
+
transformer: common_1.yfmTransformer,
|
|
280
|
+
parser: (0, common_1.createItemsParser)(['text']),
|
|
281
|
+
},
|
|
264
282
|
],
|
|
265
283
|
[models_1.BlockType.InfoBlock]: [
|
|
266
284
|
{
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ContentVariables } from './transformers';
|
|
2
|
+
type WhenValue = string | boolean | undefined;
|
|
3
|
+
type OrArray<T> = T | T[];
|
|
4
|
+
type OrArrayRecord<T> = Record<string, OrArray<T>>;
|
|
5
|
+
interface FilteredContentItem extends OrArrayRecord<FilteredContentItem> {
|
|
6
|
+
}
|
|
7
|
+
type FilteredContent = OrArray<FilteredContentItem>;
|
|
8
|
+
type FilterableContentItem = FilteredContentItem & {
|
|
9
|
+
when: WhenValue;
|
|
10
|
+
};
|
|
11
|
+
export type FilterableContent = OrArray<FilterableContentItem>;
|
|
12
|
+
/**
|
|
13
|
+
* Filters content recoursively by result of it's 'when' property evaluation applied to vars argument.
|
|
14
|
+
* e.g. property {..., when: 'someVar == "someValue"' } will be included in result only if vars.someVar === 'someValue'
|
|
15
|
+
* @param {FilterableContent} content
|
|
16
|
+
* @param {ContentVariables} vars
|
|
17
|
+
* @return {FilteredContent}
|
|
18
|
+
*/
|
|
19
|
+
export declare function filterContent(content: FilterableContent | FilteredContent, vars: ContentVariables): FilteredContent;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable no-param-reassign */
|
|
3
|
+
/* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.filterContent = void 0;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const evaluation_1 = tslib_1.__importDefault(require("@doc-tools/transform/lib/liquid/evaluation"));
|
|
8
|
+
function filterItems(items, vars, propertyName) {
|
|
9
|
+
if (!Array.isArray(items)) {
|
|
10
|
+
throw new Error(`Error while filtering: items has invalid key '${propertyName}' equals ${JSON.stringify(items)}`);
|
|
11
|
+
}
|
|
12
|
+
return items.reduce((result, item) => {
|
|
13
|
+
const passedFiltration = checkWhenCondition(item.when, vars);
|
|
14
|
+
if (passedFiltration) {
|
|
15
|
+
const property = propertyName && item[propertyName];
|
|
16
|
+
if (property === undefined) {
|
|
17
|
+
result.push(item);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
const filteredProperty = filterItems(property, vars, propertyName);
|
|
21
|
+
if (filteredProperty.length !== 0) {
|
|
22
|
+
result.push(Object.assign(Object.assign({}, item), { [propertyName]: filteredProperty }));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return result;
|
|
27
|
+
}, []);
|
|
28
|
+
}
|
|
29
|
+
function checkWhenCondition(whenValue, vars) {
|
|
30
|
+
return (whenValue === true ||
|
|
31
|
+
whenValue === undefined ||
|
|
32
|
+
(typeof whenValue === 'string' && (!whenValue || (0, evaluation_1.default)(whenValue, vars))));
|
|
33
|
+
}
|
|
34
|
+
function isItemArray(content) {
|
|
35
|
+
return Array.isArray(content);
|
|
36
|
+
}
|
|
37
|
+
function isItem(content) {
|
|
38
|
+
return content && typeof content === 'object' && !Array.isArray(content);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Filters content recoursively by result of it's 'when' property evaluation applied to vars argument.
|
|
42
|
+
* e.g. property {..., when: 'someVar == "someValue"' } will be included in result only if vars.someVar === 'someValue'
|
|
43
|
+
* @param {FilterableContent} content
|
|
44
|
+
* @param {ContentVariables} vars
|
|
45
|
+
* @return {FilteredContent}
|
|
46
|
+
*/
|
|
47
|
+
function filterContent(content, vars) {
|
|
48
|
+
if (isItemArray(content)) {
|
|
49
|
+
return filterItems(content, vars).map((item) => filterContent(item, vars));
|
|
50
|
+
}
|
|
51
|
+
else if (isItem(content)) {
|
|
52
|
+
return Object.entries(content).reduce((acc, [key, value]) => {
|
|
53
|
+
acc[key] = filterContent(value, vars);
|
|
54
|
+
return acc;
|
|
55
|
+
}, {});
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
return content;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.filterContent = filterContent;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ConstructorBlock } from '../models/constructor';
|
|
2
2
|
import { Lang } from '../utils/configure';
|
|
3
|
+
export type ContentVariables = Record<string, string>;
|
|
3
4
|
export type ContentTransformerProps = {
|
|
4
5
|
content: {
|
|
5
6
|
blocks?: ConstructorBlock[];
|
|
@@ -7,6 +8,7 @@ export type ContentTransformerProps = {
|
|
|
7
8
|
options: {
|
|
8
9
|
lang: Lang;
|
|
9
10
|
customConfig?: {};
|
|
11
|
+
vars?: ContentVariables;
|
|
10
12
|
};
|
|
11
13
|
};
|
|
12
14
|
export declare const contentTransformer: ({ content, options }: ContentTransformerProps) => {
|
|
@@ -6,6 +6,7 @@ const tslib_1 = require("tslib");
|
|
|
6
6
|
/* eslint-disable no-not-accumulator-reassign/no-not-accumulator-reassign */
|
|
7
7
|
const lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
8
8
|
const config_1 = require("./config");
|
|
9
|
+
const filter_1 = require("./filter");
|
|
9
10
|
function transformBlocks(blocks, lang, customConfig = {}) {
|
|
10
11
|
const fullConfig = Object.assign(Object.assign({}, config_1.config), customConfig);
|
|
11
12
|
const clonedBlocks = lodash_1.default.cloneDeep(blocks);
|
|
@@ -46,8 +47,8 @@ function transformBlock(lang, blocksConfig, block) {
|
|
|
46
47
|
return block;
|
|
47
48
|
}
|
|
48
49
|
const contentTransformer = ({ content, options }) => {
|
|
49
|
-
const { lang, customConfig = {} } = options;
|
|
50
|
-
const { blocks = [] } = content;
|
|
50
|
+
const { lang, customConfig = {}, vars } = options;
|
|
51
|
+
const { blocks = [] } = (vars ? (0, filter_1.filterContent)(content, vars) : content);
|
|
51
52
|
const transformedBlocks = transformBlocks(blocks, lang, customConfig);
|
|
52
53
|
return {
|
|
53
54
|
blocks: transformedBlocks,
|
|
@@ -26,7 +26,12 @@ exports.DEFAULT_ALLOWED_TAGS = [
|
|
|
26
26
|
];
|
|
27
27
|
exports.typografConfig = {
|
|
28
28
|
enabled: ['common/nbsp/afterNumber', 'common/nbsp/afterParagraphMark'],
|
|
29
|
-
disabled: [
|
|
29
|
+
disabled: [
|
|
30
|
+
'common/symbols/cf',
|
|
31
|
+
'ru/other/phone-number',
|
|
32
|
+
'common/space/afterColon',
|
|
33
|
+
'common/space/afterSemicolon',
|
|
34
|
+
],
|
|
30
35
|
};
|
|
31
36
|
exports.sanitizeStripOptions = {
|
|
32
37
|
allowedTags: [],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Block, CustomConfig, PCShareSocialNetwork, TextSize } from '../models';
|
|
2
2
|
import { ConstructorBlock } from '../models/constructor';
|
|
3
3
|
export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4" | "h5";
|
|
4
|
+
export declare function hasBlockTag(content: string): boolean;
|
|
4
5
|
export declare function getBlockKey(block: ConstructorBlock, index: number): string;
|
|
5
6
|
export declare const getCustomBlockTypes: ({ blocks, headers }?: CustomConfig) => string[];
|
|
6
7
|
export declare const getCustomItems: ({ blocks, headers, subBlocks }?: CustomConfig) => {
|
|
@@ -11,4 +12,3 @@ export declare const getCustomHeaderTypes: (customBlocks?: CustomConfig) => stri
|
|
|
11
12
|
export declare const getOrderedBlocks: (blocks: Block[], headerBlockTypes?: string[]) => Block[];
|
|
12
13
|
export declare const getHeaderBlock: (blocks: Block[], headerBlockTypes?: string[]) => Block | undefined;
|
|
13
14
|
export declare const getShareLink: (url: string, type: PCShareSocialNetwork, title?: string, text?: string) => string | undefined;
|
|
14
|
-
export declare const getBlockIndexFromId: (blockId?: string) => number;
|
|
@@ -1,7 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getShareLink = exports.getHeaderBlock = exports.getOrderedBlocks = exports.getCustomHeaderTypes = exports.getCustomSubBlockTypes = exports.getCustomItems = exports.getCustomBlockTypes = exports.getBlockKey = exports.hasBlockTag = exports.getHeaderTag = void 0;
|
|
4
4
|
const models_1 = require("../models");
|
|
5
|
+
const BLOCK_ELEMENTS = [
|
|
6
|
+
'div',
|
|
7
|
+
'p',
|
|
8
|
+
'h[1-6]',
|
|
9
|
+
'address',
|
|
10
|
+
'article',
|
|
11
|
+
'aside',
|
|
12
|
+
'blockquote',
|
|
13
|
+
'canvas',
|
|
14
|
+
'dd',
|
|
15
|
+
'dl',
|
|
16
|
+
'dt',
|
|
17
|
+
'fieldset',
|
|
18
|
+
'figcaption',
|
|
19
|
+
'footer',
|
|
20
|
+
'header',
|
|
21
|
+
'hr',
|
|
22
|
+
'main',
|
|
23
|
+
'nav',
|
|
24
|
+
'section',
|
|
25
|
+
'video',
|
|
26
|
+
'pre',
|
|
27
|
+
'figure',
|
|
28
|
+
'form',
|
|
29
|
+
'pre',
|
|
30
|
+
'ol',
|
|
31
|
+
'ul',
|
|
32
|
+
'li',
|
|
33
|
+
'table',
|
|
34
|
+
'thead',
|
|
35
|
+
'tbody',
|
|
36
|
+
'tfoot',
|
|
37
|
+
'tr',
|
|
38
|
+
'th',
|
|
39
|
+
'td',
|
|
40
|
+
];
|
|
41
|
+
const BLOCK_ELEMENTS_REGEX = `<(${BLOCK_ELEMENTS.join('|')})[^>]*>`;
|
|
5
42
|
function getHeaderTag(size) {
|
|
6
43
|
switch (size) {
|
|
7
44
|
case 'l':
|
|
@@ -16,6 +53,11 @@ function getHeaderTag(size) {
|
|
|
16
53
|
}
|
|
17
54
|
}
|
|
18
55
|
exports.getHeaderTag = getHeaderTag;
|
|
56
|
+
function hasBlockTag(content) {
|
|
57
|
+
const regex = new RegExp(BLOCK_ELEMENTS_REGEX, 'g');
|
|
58
|
+
return regex.test(content);
|
|
59
|
+
}
|
|
60
|
+
exports.hasBlockTag = hasBlockTag;
|
|
19
61
|
function getBlockKey(block, index) {
|
|
20
62
|
return `${block.type}-${index}`;
|
|
21
63
|
}
|
|
@@ -83,5 +125,3 @@ const getShareLink = (url, type, title, text) => {
|
|
|
83
125
|
}
|
|
84
126
|
};
|
|
85
127
|
exports.getShareLink = getShareLink;
|
|
86
|
-
const getBlockIndexFromId = (blockId) => { var _a; return Number((_a = blockId === null || blockId === void 0 ? void 0 : blockId.split('-')) === null || _a === void 0 ? void 0 : _a.slice(-1).pop()); };
|
|
87
|
-
exports.getBlockIndexFromId = getBlockIndexFromId;
|
|
@@ -7,5 +7,5 @@ var AvailableForCompressExtension;
|
|
|
7
7
|
AvailableForCompressExtension["JPG"] = "jpg";
|
|
8
8
|
AvailableForCompressExtension["JPEG"] = "jpeg";
|
|
9
9
|
})(AvailableForCompressExtension = exports.AvailableForCompressExtension || (exports.AvailableForCompressExtension = {}));
|
|
10
|
-
const isCompressible = (fileName) => Object.
|
|
10
|
+
const isCompressible = (fileName) => Object.values(AvailableForCompressExtension).some((ext) => fileName.toLowerCase().endsWith(`.${ext}`));
|
|
11
11
|
exports.isCompressible = isCompressible;
|
|
@@ -4,4 +4,4 @@ export interface ThemedValue<T> extends Partial<Record<string, T>> {
|
|
|
4
4
|
}
|
|
5
5
|
export type ThemeSupporting<T> = T | ThemedValue<T>;
|
|
6
6
|
export declare function isThemedValue<T>(value: ThemeSupporting<T>): value is ThemedValue<T>;
|
|
7
|
-
export declare function getThemedValue<T>(value: ThemeSupporting<T>, theme?:
|
|
7
|
+
export declare function getThemedValue<T>(value: ThemeSupporting<T>, theme?: import("..").Theme): T;
|