@gravity-ui/page-constructor 4.0.0-beta.0 → 4.0.1
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/Loadable/Loadable.d.ts +2 -2
- 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 +3 -3
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +8 -4
- package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.d.ts +3 -4
- package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +7 -4
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +3 -3
- 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 +6 -5
- 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 +4 -4
- 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 +4 -5
- 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/Loadable/Loadable.d.ts +2 -2
- 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 +3 -3
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +8 -4
- package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.d.ts +3 -4
- package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +7 -4
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +3 -3
- 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 +6 -5
- 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 +4 -4
- 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 +4 -5
- 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 +4 -4
- 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 +4 -5
- 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
|
@@ -6,48 +6,68 @@ unpredictable css rules order in build */
|
|
|
6
6
|
--header-height: 64px;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.
|
|
10
|
-
--
|
|
9
|
+
.g-root {
|
|
10
|
+
--pc-color-telegram: #51a4db;
|
|
11
|
+
--pc-color-facebook: #4968ad;
|
|
12
|
+
--pc-color-twitter: #4aa0eb;
|
|
13
|
+
--pc-color-vk: #436eab;
|
|
14
|
+
--pc-color-youtube: #eb3323;
|
|
15
|
+
--pc-color-github: #25292e;
|
|
16
|
+
--pc-color-rss: #f29c39;
|
|
17
|
+
--pc-color-linkedin: #0a66c2;
|
|
18
|
+
--g-text-accent-font-weight: 500;
|
|
11
19
|
--pc-transparent: rgba(255, 255, 255, 0);
|
|
12
20
|
--pc-border-radius: 24px;
|
|
13
21
|
--pc-image-padding: 4px;
|
|
14
|
-
--pc-color-sfx-shadow: var(--
|
|
22
|
+
--pc-color-sfx-shadow: var(--g-color-base-simple-hover);
|
|
15
23
|
--pc-color-line-generic-active-solid: #b3b3b3;
|
|
16
|
-
--pc-color-base-float-hover: var(--
|
|
24
|
+
--pc-color-base-float-hover: var(--g-color-base-float);
|
|
17
25
|
--pc-monochrome-button-background-color: #262626;
|
|
18
26
|
--pc-monochrome-button-background-color-hover: #393939;
|
|
19
|
-
--pc-monochrome-button-color: var(--
|
|
20
|
-
--pc-text-header-color: var(--
|
|
21
|
-
--pc-media-card-meta-info-color: var(--
|
|
22
|
-
--pc-tab-item-color: var(--
|
|
23
|
-
--pc-tab-item-background-color: var(--
|
|
24
|
-
--pc-tab-item-background-color-hover: var(--
|
|
27
|
+
--pc-monochrome-button-color: var(--g-color-text-light-primary);
|
|
28
|
+
--pc-text-header-color: var(--g-color-text-primary);
|
|
29
|
+
--pc-media-card-meta-info-color: var(--g-color-text-secondary);
|
|
30
|
+
--pc-tab-item-color: var(--g-color-text-primary);
|
|
31
|
+
--pc-tab-item-background-color: var(--g-color-base-generic);
|
|
32
|
+
--pc-tab-item-background-color-hover: var(--g-color-base-generic-hover);
|
|
25
33
|
--pc-selected-tab-item-color: var(--pc-monochrome-button-color);
|
|
26
34
|
--pc-selected-tab-item-background-color: var(--pc-monochrome-button-background-color);
|
|
27
35
|
--pc-selected-tab-item-background-color-hover: var(
|
|
28
36
|
--pc-monochrome-button-background-color-hover
|
|
29
37
|
);
|
|
30
38
|
}
|
|
31
|
-
.
|
|
32
|
-
--pc-color-
|
|
39
|
+
.g-root_theme_light {
|
|
40
|
+
--pc-color-base-silver: #eff2f8;
|
|
41
|
+
--pc-color-base-gold: #ffdb4d;
|
|
42
|
+
--pc-color-base-asphalt: #313538;
|
|
43
|
+
--pc-color-base-copper: #ffe6c4;
|
|
44
|
+
}
|
|
45
|
+
.g-root_theme_dark {
|
|
46
|
+
--pc-color-base-silver: #bcc0c4;
|
|
47
|
+
--pc-color-base-gold: #ffde5d;
|
|
48
|
+
--pc-color-base-asphalt: #474d52;
|
|
49
|
+
--pc-color-base-copper: #7f7262;
|
|
50
|
+
}
|
|
51
|
+
.g-root.g-root_theme_dark {
|
|
52
|
+
--pc-color-sfx-shadow: var(--g-color-sfx-shadow);
|
|
33
53
|
--pc-color-line-generic-active-solid: #6c6c70;
|
|
34
|
-
--pc-color-base-float-hover: var(--
|
|
54
|
+
--pc-color-base-float-hover: var(--g-color-base-float-hover);
|
|
35
55
|
--pc-monochrome-button-background-color: #ffffff;
|
|
36
56
|
--pc-monochrome-button-background-color-hover: #e9e9e9;
|
|
37
|
-
--pc-monochrome-button-color: var(--
|
|
57
|
+
--pc-monochrome-button-color: var(--g-color-text-dark-primary);
|
|
38
58
|
}
|
|
39
59
|
|
|
40
60
|
/* use this for style redefinitions to awoid problems with
|
|
41
61
|
unpredictable css rules order in build */
|
|
42
62
|
.yfm_constructor {
|
|
43
|
-
font-family: var(--
|
|
44
|
-
color: var(--
|
|
63
|
+
font-family: var(--g-font-family-sans);
|
|
64
|
+
color: var(--g-color-text-primary);
|
|
45
65
|
}
|
|
46
66
|
.yfm_constructor code,
|
|
47
67
|
.yfm_constructor kbd,
|
|
48
68
|
.yfm_constructor pre {
|
|
49
|
-
font-family: var(--
|
|
50
|
-
color: var(--
|
|
69
|
+
font-family: var(--g-font-family-monospace);
|
|
70
|
+
color: var(--g-color-text-primary);
|
|
51
71
|
}
|
|
52
72
|
.yfm_constructor.yfm_constructor h1,
|
|
53
73
|
.yfm_constructor.yfm_constructor h2,
|
|
@@ -58,11 +78,11 @@ unpredictable css rules order in build */
|
|
|
58
78
|
.yfm_constructor.yfm_constructor span,
|
|
59
79
|
.yfm_constructor.yfm_constructor p,
|
|
60
80
|
.yfm_constructor.yfm_constructor li {
|
|
61
|
-
color: var(--
|
|
81
|
+
color: var(--g-color-text-primary);
|
|
62
82
|
}
|
|
63
83
|
.yfm_constructor.yfm_constructor_notice li,
|
|
64
84
|
.yfm_constructor.yfm_constructor_notice p {
|
|
65
|
-
color: var(--
|
|
85
|
+
color: var(--g-color-text-secondary);
|
|
66
86
|
}
|
|
67
87
|
.yfm_constructor.yfm_constructor ul,
|
|
68
88
|
.yfm_constructor.yfm_constructor ol,
|
|
@@ -81,7 +101,7 @@ unpredictable css rules order in build */
|
|
|
81
101
|
}
|
|
82
102
|
|
|
83
103
|
.yfm_constructor_theme_dark p {
|
|
84
|
-
color: var(--
|
|
104
|
+
color: var(--g-color-text-light-primary);
|
|
85
105
|
}
|
|
86
106
|
.yfm_constructor_list_style ul {
|
|
87
107
|
padding-left: 20px;
|
|
@@ -97,7 +117,7 @@ unpredictable css rules order in build */
|
|
|
97
117
|
}
|
|
98
118
|
.yfm_constructor a {
|
|
99
119
|
outline: none;
|
|
100
|
-
color: var(--
|
|
120
|
+
color: var(--g-color-text-link);
|
|
101
121
|
text-decoration: none;
|
|
102
122
|
cursor: pointer;
|
|
103
123
|
}
|
|
@@ -105,17 +125,17 @@ unpredictable css rules order in build */
|
|
|
105
125
|
outline: 2px solid #ffdb4d;
|
|
106
126
|
}
|
|
107
127
|
.yfm_constructor a:hover, .yfm_constructor a:active {
|
|
108
|
-
--pc-text-header-color: var(--
|
|
109
|
-
color: var(--
|
|
128
|
+
--pc-text-header-color: var(--g-color-text-link-hover);
|
|
129
|
+
color: var(--g-color-text-link-hover);
|
|
110
130
|
}
|
|
111
131
|
.yfm_constructor table {
|
|
112
|
-
color: var(--
|
|
113
|
-
border: 1px solid var(--
|
|
114
|
-
background: var(--
|
|
132
|
+
color: var(--g-color-text-primary);
|
|
133
|
+
border: 1px solid var(--g-color-line-generic);
|
|
134
|
+
background: var(--g-color-base-background);
|
|
115
135
|
}
|
|
116
136
|
.yfm_constructor thead,
|
|
117
137
|
.yfm_constructor table tr:nth-child(2n) {
|
|
118
|
-
background-color: var(--
|
|
138
|
+
background-color: var(--g-color-base-generic);
|
|
119
139
|
}
|
|
120
140
|
|
|
121
141
|
.yfm_constructor_table {
|
|
@@ -131,7 +151,7 @@ unpredictable css rules order in build */
|
|
|
131
151
|
background-color: transparent !important;
|
|
132
152
|
}
|
|
133
153
|
.yfm_constructor_table tbody tr {
|
|
134
|
-
border-top: 1px solid var(--
|
|
154
|
+
border-top: 1px solid var(--g-color-line-generic);
|
|
135
155
|
}
|
|
136
156
|
.yfm_constructor_table td,
|
|
137
157
|
.yfm_constructor_table th {
|
|
@@ -152,7 +172,7 @@ unpredictable css rules order in build */
|
|
|
152
172
|
.pc-page-constructor {
|
|
153
173
|
font-feature-settings: "liga", "kern", "pnum" on, "lnum" on, "ss03" on;
|
|
154
174
|
margin-top: 0;
|
|
155
|
-
background-color: var(--
|
|
175
|
+
background-color: var(--g-color-base-background);
|
|
156
176
|
z-index: 10;
|
|
157
177
|
}
|
|
158
178
|
.pc-page-constructor__wrapper {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import React, {
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
3
|
import '@doc-tools/transform/dist/js/yfm';
|
|
4
|
+
import blockOrigin from 'bem-cn-lite';
|
|
4
5
|
import BackgroundMedia from '../../components/BackgroundMedia/BackgroundMedia';
|
|
6
|
+
import { UIKIT_ROOT_CLASS } from '../../components/constants';
|
|
5
7
|
import { blockMap, subBlockMap } from '../../constructor-items';
|
|
6
8
|
import { AnimateContext } from '../../context/animateContext';
|
|
7
9
|
import { InnerContext } from '../../context/innerContext';
|
|
8
|
-
import {
|
|
10
|
+
import { useTheme } from '../../context/theme';
|
|
9
11
|
import { Grid } from '../../grid';
|
|
10
12
|
import { BlockType, BlockTypes, HeaderBlockTypes, SubBlockTypes, } from '../../models';
|
|
11
13
|
import Layout from '../../navigation/containers/Layout/Layout';
|
|
@@ -15,6 +17,7 @@ import { ConstructorHeader } from './components/ConstructorItem';
|
|
|
15
17
|
import { ConstructorRow } from './components/ConstructorRow';
|
|
16
18
|
import './PageConstructor.css';
|
|
17
19
|
const b = cnBlock('page-constructor');
|
|
20
|
+
const ycr = blockOrigin(UIKIT_ROOT_CLASS);
|
|
18
21
|
export const Constructor = (props) => {
|
|
19
22
|
const { content: { blocks = [], background = {} } = {}, renderMenu, shouldRenderBlock, navigation, custom, } = props;
|
|
20
23
|
const { context } = useMemo(() => ({
|
|
@@ -30,12 +33,12 @@ export const Constructor = (props) => {
|
|
|
30
33
|
},
|
|
31
34
|
},
|
|
32
35
|
}), [custom, shouldRenderBlock]);
|
|
33
|
-
const
|
|
36
|
+
const theme = useTheme();
|
|
34
37
|
const header = getHeaderBlock(blocks, context.headerBlockTypes);
|
|
35
38
|
const restBlocks = getOrderedBlocks(blocks, context.headerBlockTypes);
|
|
36
39
|
const themedBackground = getThemedValue(background, theme);
|
|
37
40
|
return (React.createElement(InnerContext.Provider, { value: context },
|
|
38
|
-
React.createElement("div", { className: b() },
|
|
41
|
+
React.createElement("div", { className: b(null, ycr({ theme })) },
|
|
39
42
|
React.createElement("div", { className: b('wrapper') },
|
|
40
43
|
themedBackground && (React.createElement(BackgroundMedia, Object.assign({}, themedBackground, { className: b('background') }))),
|
|
41
44
|
React.createElement(Layout, { navigation: navigation },
|
|
@@ -6,15 +6,14 @@ import { MapsContextType } from '../../context/mapsContext/mapsContext';
|
|
|
6
6
|
import { MetrikaContextProps } from '../../context/metrikaContext';
|
|
7
7
|
import { ProjectSettingsContextProps } from '../../context/projectSettingsContext';
|
|
8
8
|
import { SSRContextProps } from '../../context/ssrContext';
|
|
9
|
-
import {
|
|
10
|
-
import { WithChildren } from '../../models';
|
|
9
|
+
import { Theme, WithChildren } from '../../models';
|
|
11
10
|
export interface PageConstructorProviderProps {
|
|
12
11
|
isMobile?: boolean;
|
|
13
12
|
locale?: LocaleContextProps;
|
|
14
13
|
location?: LocationContextProps;
|
|
15
14
|
metrika?: MetrikaContextProps;
|
|
16
15
|
ssrConfig?: SSRContextProps;
|
|
17
|
-
theme?:
|
|
16
|
+
theme?: Theme;
|
|
18
17
|
mapsContext?: MapsContextType;
|
|
19
18
|
projectSettings?: ProjectSettingsContextProps;
|
|
20
19
|
analytics?: AnalyticsContextProps;
|
|
@@ -9,12 +9,12 @@ import { MetrikaContext } from '../../context/metrikaContext';
|
|
|
9
9
|
import { MobileContext } from '../../context/mobileContext';
|
|
10
10
|
import { ProjectSettingsContext, } from '../../context/projectSettingsContext';
|
|
11
11
|
import { SSRContext } from '../../context/ssrContext';
|
|
12
|
-
import {
|
|
12
|
+
import { ThemeContext } from '../../context/theme';
|
|
13
13
|
export const PageConstructorProvider = (props) => {
|
|
14
14
|
const { isMobile, mapsContext = initialMapValue, locale = {}, location = {}, metrika = {}, analytics = {}, ssrConfig = {}, projectSettings = {}, theme = DEFAULT_THEME, children, image = {}, } = props;
|
|
15
15
|
/* eslint-disable react/jsx-key */
|
|
16
16
|
const context = [
|
|
17
|
-
React.createElement(
|
|
17
|
+
React.createElement(ThemeContext.Provider, { value: { theme } }),
|
|
18
18
|
React.createElement(ProjectSettingsContext.Provider, { value: projectSettings }),
|
|
19
19
|
React.createElement(LocaleContext.Provider, { value: locale }),
|
|
20
20
|
React.createElement(ImageContext.Provider, { value: image }),
|
package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
interface ConstructorBlockProps {
|
|
4
|
-
data:
|
|
2
|
+
import { BlockDecorationProps, ConstructorBlock as ConstructorBlockType, WithChildren } from '../../../../models';
|
|
3
|
+
interface ConstructorBlockProps extends Pick<BlockDecorationProps, 'index'> {
|
|
4
|
+
data: ConstructorBlockType;
|
|
5
5
|
}
|
|
6
6
|
export declare const ConstructorBlock: React.FC<WithChildren<ConstructorBlockProps>>;
|
|
7
7
|
export {};
|
package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import _ from 'lodash';
|
|
2
3
|
import BlockBase from '../../../../components/BlockBase/BlockBase';
|
|
4
|
+
import { BlockDecoration } from '../../../../customization/BlockDecoration';
|
|
3
5
|
import { block } from '../../../../utils';
|
|
4
6
|
const b = block('constructor-block');
|
|
5
|
-
export const ConstructorBlock = ({ data, children, }) => {
|
|
6
|
-
const {
|
|
7
|
-
|
|
7
|
+
export const ConstructorBlock = ({ index = 0, data, children, }) => {
|
|
8
|
+
const { type } = data;
|
|
9
|
+
const blockBaseProps = useMemo(() => _.pick(data, ['anchor', 'visible', 'resetPaddings']), [data]);
|
|
10
|
+
return (React.createElement(BlockDecoration, Object.assign({ type: type, index: index }, blockBaseProps),
|
|
11
|
+
React.createElement(BlockBase, Object.assign({ className: b({ type }) }, blockBaseProps), children)));
|
|
8
12
|
};
|
package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
interface ConstructorBlocksProps {
|
|
4
|
-
items:
|
|
2
|
+
import { ConstructorBlock as ConstructorBlockType } from '../../../../models';
|
|
3
|
+
export interface ConstructorBlocksProps {
|
|
4
|
+
items: ConstructorBlockType[];
|
|
5
5
|
}
|
|
6
6
|
export declare const ConstructorBlocks: React.FC<ConstructorBlocksProps>;
|
|
7
|
-
export {};
|
package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Fragment, useContext } from 'react';
|
|
2
2
|
import _ from 'lodash';
|
|
3
|
-
import { BlockIdContext } from '../../../../context/blockIdContext';
|
|
4
3
|
import { InnerContext } from '../../../../context/innerContext';
|
|
4
|
+
import { BlockDecoration } from '../../../../customization/BlockDecoration';
|
|
5
5
|
import { getBlockKey } from '../../../../utils';
|
|
6
6
|
import { ConstructorBlock } from '../ConstructorBlock/ConstructorBlock';
|
|
7
7
|
import { ConstructorItem } from '../ConstructorItem';
|
|
@@ -10,7 +10,7 @@ export const ConstructorBlocks = ({ items }) => {
|
|
|
10
10
|
const { blockTypes, loadables, itemMap, shouldRenderBlock } = useContext(InnerContext);
|
|
11
11
|
const renderer = (parentId = '', item, index) => {
|
|
12
12
|
if (!itemMap[item.type]) {
|
|
13
|
-
return null;
|
|
13
|
+
return parentId ? null : (React.createElement(BlockDecoration, { type: item.type, index: index }, null));
|
|
14
14
|
}
|
|
15
15
|
let itemElement;
|
|
16
16
|
const key = getBlockKey(item, index);
|
|
@@ -31,9 +31,12 @@ export const ConstructorBlocks = ({ items }) => {
|
|
|
31
31
|
if ('children' in item && item.children) {
|
|
32
32
|
children = item.children.map(renderer.bind(null, blockId));
|
|
33
33
|
}
|
|
34
|
-
itemElement = (React.createElement(ConstructorItem, { data: item, blockKey: blockId }, children));
|
|
34
|
+
itemElement = (React.createElement(ConstructorItem, { data: item, key: blockId, blockKey: blockId }, children));
|
|
35
35
|
}
|
|
36
|
-
return
|
|
36
|
+
return blockTypes.includes(item.type) ? (
|
|
37
|
+
//TODO: replace ConstructorBlock (and delete it) with BlockBase when all
|
|
38
|
+
// components relying on constructor inner structure like Slider or blog-constructor will be refactored
|
|
39
|
+
React.createElement(ConstructorBlock, { data: item, key: blockId, index: index }, itemElement)) : (itemElement);
|
|
37
40
|
};
|
|
38
41
|
return React.createElement(Fragment, null, items.map(renderer.bind(null, '')));
|
|
39
42
|
};
|
package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ConstructorBlock, WithChildren } from '../../../../models';
|
|
2
2
|
export interface ConstructorItemProps {
|
|
3
|
-
data:
|
|
3
|
+
data: ConstructorBlock;
|
|
4
4
|
blockKey: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const ConstructorItem: ({ data, children }: WithChildren<ConstructorItemProps>) => JSX.Element;
|
|
6
|
+
export declare const ConstructorItem: ({ data, blockKey, children }: WithChildren<ConstructorItemProps>) => JSX.Element;
|
|
7
7
|
export declare const ConstructorHeader: ({ data, blockKey, }: Pick<ConstructorItemProps, 'data' | 'blockKey'>) => JSX.Element;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React, { useContext } from 'react';
|
|
3
|
+
import { BlockIdContext } from '../../../../context/blockIdContext';
|
|
3
4
|
import { InnerContext } from '../../../../context/innerContext';
|
|
4
5
|
import { BlockDecoration } from '../../../../customization/BlockDecoration';
|
|
5
|
-
export const ConstructorItem = ({ data, children }) => {
|
|
6
|
+
export const ConstructorItem = ({ data, blockKey, children }) => {
|
|
6
7
|
const { itemMap } = useContext(InnerContext);
|
|
7
8
|
const { type } = data, rest = __rest(data, ["type"]);
|
|
8
9
|
const Component = itemMap[type];
|
|
9
|
-
return React.createElement(
|
|
10
|
+
return (React.createElement(BlockIdContext.Provider, { value: blockKey },
|
|
11
|
+
React.createElement(Component, Object.assign({}, rest), children)));
|
|
10
12
|
};
|
|
11
|
-
export const ConstructorHeader = ({ data, blockKey, }) => (React.createElement(BlockDecoration, {
|
|
13
|
+
export const ConstructorHeader = ({ data, blockKey, }) => (React.createElement(BlockDecoration, { type: data.type },
|
|
12
14
|
React.createElement(ConstructorItem, { data: data, key: data.type, blockKey: blockKey })));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ConstructorBlocks } from './ConstructorBlocks';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Theme } from '../../models';
|
|
3
3
|
export interface ThemeContextProps {
|
|
4
|
-
theme:
|
|
5
|
-
setTheme: (newTheme: ConstructorTheme) => void;
|
|
4
|
+
theme: Theme;
|
|
6
5
|
}
|
|
7
6
|
export declare const initialValue: ThemeContextProps;
|
|
8
7
|
export declare const ThemeContext: React.Context<ThemeContextProps>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ThemeContextProps } from './ThemeContext';
|
|
2
|
-
export declare function useTheme():
|
|
2
|
+
export declare function useTheme(): ThemeContextProps['theme'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ThemeContext } from './ThemeContext';
|
|
3
3
|
export function useTheme() {
|
|
4
|
-
const { theme
|
|
5
|
-
return
|
|
4
|
+
const { theme } = React.useContext(ThemeContext);
|
|
5
|
+
return theme;
|
|
6
6
|
}
|
|
@@ -5,7 +5,7 @@ export function withTheme(WrappedComponent) {
|
|
|
5
5
|
const componentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
|
6
6
|
return _a = class WithThemeComponent extends React.Component {
|
|
7
7
|
render() {
|
|
8
|
-
return
|
|
8
|
+
return React.createElement(WrappedComponent, Object.assign({}, this.props, { theme: this.context.theme }));
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
_a.displayName = `withTheme(${componentName})`,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { BlockDecorationProps } from '../models';
|
|
3
|
-
export declare const BlockDecoration: (
|
|
3
|
+
export declare const BlockDecoration: ({ children: blockChildren, ...rest }: PropsWithChildren<BlockDecorationProps>) => JSX.Element;
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
1
2
|
import React, { Fragment, useContext } from 'react';
|
|
2
|
-
import { BlockIdContext } from '../context/blockIdContext';
|
|
3
3
|
import { InnerContext } from '../context/innerContext';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _a,
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const blockDecorators = (_b = (_a = useContext(InnerContext).customization) === null || _a === void 0 ? void 0 : _a.decorators) === null || _b === void 0 ? void 0 : _b.block;
|
|
13
|
-
if (!blockDecorators) {
|
|
14
|
-
return block;
|
|
15
|
-
}
|
|
16
|
-
return blockDecorators.reduce((children, decorator) => (React.createElement(Fragment, null, decorator({ children, id: blockId, isHeader }))), block);
|
|
4
|
+
export const BlockDecoration = (_a) => {
|
|
5
|
+
var _b, _c;
|
|
6
|
+
var { children: blockChildren } = _a, rest = __rest(_a, ["children"]);
|
|
7
|
+
const blockDecorators = (_c = (_b = useContext(InnerContext).customization) === null || _b === void 0 ? void 0 : _b.decorators) === null || _c === void 0 ? void 0 : _c.block;
|
|
8
|
+
const content = blockDecorators
|
|
9
|
+
? blockDecorators.reduce((children, decorator) => decorator(Object.assign({ children }, rest)), blockChildren)
|
|
10
|
+
: blockChildren;
|
|
11
|
+
return React.createElement(Fragment, null, content);
|
|
17
12
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* use this for style redefinitions to awoid problems with
|
|
2
2
|
unpredictable css rules order in build */
|
|
3
3
|
.pc-add-block {
|
|
4
|
-
position:
|
|
4
|
+
position: absolute;
|
|
5
5
|
bottom: 32px;
|
|
6
|
-
left: 50
|
|
6
|
+
left: calc(50% + var(--pc-editor-left-column-width) / 2);
|
|
7
7
|
transform: translateX(-50%);
|
|
8
8
|
z-index: 110;
|
|
9
9
|
}
|
|
@@ -23,8 +23,8 @@ unpredictable css rules order in build */
|
|
|
23
23
|
transition: transform 0.2s;
|
|
24
24
|
width: 76px;
|
|
25
25
|
height: 40px;
|
|
26
|
-
color: var(--
|
|
27
|
-
background-color: var(--
|
|
26
|
+
color: var(--g-color-text-primary);
|
|
27
|
+
background-color: var(--pc-editor-base-color);
|
|
28
28
|
border-radius: 8px;
|
|
29
29
|
}
|
|
30
30
|
.pc-add-block__button:hover {
|
|
@@ -71,10 +71,11 @@ unpredictable css rules order in build */
|
|
|
71
71
|
height: 74px;
|
|
72
72
|
border-radius: var(--pc-border-radius);
|
|
73
73
|
margin-right: 16px;
|
|
74
|
+
color: var(--pc-editor-base-color);
|
|
74
75
|
}
|
|
75
76
|
.pc-add-block__popup .pc-add-block__title {
|
|
76
|
-
font-size: var(--
|
|
77
|
-
line-height: var(--
|
|
77
|
+
font-size: var(--g-text-body-2-font-size);
|
|
78
|
+
line-height: var(--g-text-body-2-line-height);
|
|
78
79
|
}
|
|
79
80
|
.pc-add-block__popup .pc-add-block__title,
|
|
80
81
|
.pc-add-block__popup .pc-add-block__description {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { Block, ClassNameProps } from '../../../models';
|
|
3
|
+
import './AddBlock.css';
|
|
4
|
+
export interface AddBlockProps extends ClassNameProps {
|
|
5
|
+
onAdd: (data: Block) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const AddBlock: ({ onAdd, className }: PropsWithChildren<AddBlockProps>) => JSX.Element;
|
|
8
|
+
export default AddBlock;
|
|
@@ -7,20 +7,20 @@ import EditorBlocksData from '../../data';
|
|
|
7
7
|
import './AddBlock.css';
|
|
8
8
|
const b = block('add-block');
|
|
9
9
|
const sortedBlockNames = Object.keys(blockMap).sort();
|
|
10
|
-
const AddBlock = ({ onAdd }) => {
|
|
10
|
+
const AddBlock = ({ onAdd, className }) => {
|
|
11
11
|
const [isOpened, setIsOpened] = useState(false);
|
|
12
12
|
const [search, setSearch] = useState('');
|
|
13
13
|
const ref = useRef(null);
|
|
14
14
|
const blocks = useMemo(() => sortedBlockNames.filter((blockName) => EditorBlocksData[blockName].meta.title
|
|
15
15
|
.toLocaleLowerCase()
|
|
16
16
|
.startsWith(search.toLocaleLowerCase())), [search]);
|
|
17
|
-
return (React.createElement("div", { className: b(), ref: ref },
|
|
17
|
+
return (React.createElement("div", { className: b(null, className), ref: ref },
|
|
18
18
|
React.createElement("button", { className: b('button'), onClick: () => {
|
|
19
19
|
setIsOpened(!isOpened);
|
|
20
20
|
setSearch('');
|
|
21
21
|
} },
|
|
22
22
|
React.createElement(Plus, { className: b('icon') })),
|
|
23
|
-
isOpened && (React.createElement(Popup, { anchorRef: ref, open: isOpened,
|
|
23
|
+
isOpened && (React.createElement(Popup, { anchorRef: ref, open: isOpened, contentClassName: b('popup'), placement: "top", offset: [0, 24], onOutsideClick: () => setIsOpened(false) },
|
|
24
24
|
React.createElement("div", { className: b('search') },
|
|
25
25
|
React.createElement(TextInput, { placeholder: "search", type: "text", value: search, size: "l", onUpdate: (value) => setSearch(value) })),
|
|
26
26
|
React.createElement("div", { className: b('blocks') }, blocks.map((blockName) => {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Block, ConstructorBlock } from '../../../models';
|
|
3
|
+
import { CustomSpec } from '../../dynamic-forms-custom/parser/types';
|
|
4
|
+
interface BlockFormProps {
|
|
5
|
+
data: ConstructorBlock;
|
|
6
|
+
spec: CustomSpec;
|
|
7
|
+
onChange: (data: Block) => void;
|
|
8
|
+
onSelect: () => void;
|
|
9
|
+
active?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const BlockForm: React.MemoExoticComponent<({ data: { type, ...content }, onChange, onSelect, active, spec: specRaw }: BlockFormProps) => JSX.Element>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import React, { Fragment, memo, useMemo } from 'react';
|
|
3
|
+
import { DynamicField, SimpleVerticalAccordeon } from '@gravity-ui/dynamic-forms';
|
|
4
|
+
import _ from 'lodash';
|
|
5
|
+
import { Form as FinalForm, FormSpy } from 'react-final-form';
|
|
6
|
+
import { dynamicConfig } from '../../dynamic-forms-custom/config';
|
|
7
|
+
import usePreviousValue from '../../hooks/usePreviousValue';
|
|
8
|
+
export const BlockForm = memo((_a) => {
|
|
9
|
+
var _b = _a.data, { type } = _b, content = __rest(_b, ["type"]), { onChange, onSelect, active, spec: specRaw } = _a;
|
|
10
|
+
const initialValues = useMemo(() => ({ content }), [content]);
|
|
11
|
+
const prevContent = usePreviousValue(content);
|
|
12
|
+
const spec = useMemo(() => (Object.assign(Object.assign({}, specRaw), { viewSpec: Object.assign(Object.assign({}, specRaw.viewSpec), { layoutOpen: active }) })), [specRaw, active]);
|
|
13
|
+
if (!active) {
|
|
14
|
+
return (React.createElement(SimpleVerticalAccordeon, { open: false, name: type, title: spec.viewSpec.layoutTitle || type, onOpenChange: onSelect }, ' '));
|
|
15
|
+
}
|
|
16
|
+
return (React.createElement(FinalForm, { initialValues: initialValues, onSubmit: _.noop }, () => (React.createElement(Fragment, null,
|
|
17
|
+
React.createElement(FormSpy, { onChange: ({ values }) => {
|
|
18
|
+
// fix for FormSpy onChange called twice without content changes
|
|
19
|
+
if (!_.isEqual(values.content, prevContent)) {
|
|
20
|
+
onChange(Object.assign({ type }, values.content));
|
|
21
|
+
}
|
|
22
|
+
}, subscription: { values: true } }),
|
|
23
|
+
React.createElement(DynamicField, { name: "content", spec: spec, config: dynamicConfig, withoutInsertFFDebounce: true })))));
|
|
24
|
+
});
|
|
25
|
+
BlockForm.displayName = 'BlockForm';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
3
|
+
.pc-control-panel {
|
|
4
|
+
display: grid;
|
|
5
|
+
grid-template-columns: repeat(3, 1fr);
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: var(--pc-editor-header-height);
|
|
8
|
+
padding: 8px 20px;
|
|
9
|
+
background-color: var(--g-color-base-background);
|
|
10
|
+
border: 1px var(--g-color-line-generic);
|
|
11
|
+
border-style: solid none;
|
|
12
|
+
}
|
|
13
|
+
.pc-control-panel__icon {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
}
|
|
17
|
+
.pc-control-panel__radio-button {
|
|
18
|
+
margin-left: 12px;
|
|
19
|
+
}
|
|
20
|
+
.pc-control-panel__radio-button .yc-radio-button__option {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
}
|
|
24
|
+
.pc-control-panel__mode-switch {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
place-self: center;
|
|
28
|
+
}
|
|
29
|
+
.pc-control-panel__theme-switch {
|
|
30
|
+
place-self: center end;
|
|
31
|
+
display: flex;
|
|
32
|
+
gap: 12px;
|
|
33
|
+
align-items: center;
|
|
34
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ClassNameProps, Theme } from '../../../models';
|
|
2
|
+
import { ViewModeItem } from '../../types';
|
|
3
|
+
import './ControlPanel.css';
|
|
4
|
+
export interface ControlPanelProps extends ClassNameProps {
|
|
5
|
+
viewMode?: ViewModeItem;
|
|
6
|
+
onViewModeChange: (viewMode: ViewModeItem) => void;
|
|
7
|
+
theme: Theme;
|
|
8
|
+
onThemeChange: (theme: Theme) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const ControlPanel: ({ viewMode, onViewModeChange, className, theme, onThemeChange, }: ControlPanelProps) => JSX.Element;
|
|
11
|
+
export default ControlPanel;
|