@gravity-ui/page-constructor 5.14.3 → 5.14.4-alpha.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/build/cjs/blocks/Banner/Banner.js +3 -1
- package/build/cjs/blocks/Banner/index.d.ts +3 -0
- package/build/cjs/blocks/Banner/index.js +22 -0
- package/build/cjs/blocks/CardLayout/CardLayout.css +1 -0
- package/build/cjs/blocks/CardLayout/CardLayout.js +11 -6
- package/build/cjs/blocks/CardLayout/index.d.ts +5 -0
- package/build/cjs/blocks/CardLayout/index.js +166 -0
- package/build/cjs/blocks/Companies/Companies.js +6 -4
- package/build/cjs/blocks/Companies/index.d.ts +3 -0
- package/build/cjs/blocks/Companies/index.js +18 -0
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +6 -5
- package/build/cjs/blocks/ContentLayout/index.d.ts +11 -0
- package/build/cjs/blocks/ContentLayout/index.js +17 -0
- package/build/cjs/blocks/ContentLayout/schema.d.ts +1 -0
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +22 -20
- package/build/cjs/blocks/ExtendedFeatures/index.d.ts +12 -0
- package/build/cjs/blocks/ExtendedFeatures/index.js +18 -0
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +1 -0
- package/build/cjs/blocks/ExtendedFeatures/schema.js +1 -0
- package/build/cjs/blocks/FilterBlock/FilterBlock.js +11 -10
- package/build/cjs/blocks/FilterBlock/index.d.ts +11 -0
- package/build/cjs/blocks/FilterBlock/index.js +17 -0
- package/build/cjs/blocks/Form/index.d.ts +12 -0
- package/build/cjs/blocks/Form/index.js +18 -0
- package/build/cjs/blocks/Header/dynamic-form.d.ts +2 -0
- package/build/cjs/blocks/Header/dynamic-form.js +730 -0
- package/build/cjs/blocks/Header/index.d.ts +8 -0
- package/build/cjs/blocks/Header/index.js +14 -0
- package/build/cjs/blocks/HeaderSlider/HeaderSlider.js +3 -2
- package/build/cjs/blocks/HeaderSlider/index.d.ts +31 -0
- package/build/cjs/blocks/HeaderSlider/index.js +38 -0
- package/build/cjs/blocks/Icons/Icons.js +9 -6
- package/build/cjs/blocks/Icons/index.d.ts +13 -0
- package/build/cjs/blocks/Icons/index.js +19 -0
- package/build/cjs/blocks/Info/index.d.ts +21 -0
- package/build/cjs/blocks/Info/index.js +41 -0
- package/build/cjs/blocks/Map/index.d.ts +11 -0
- package/build/cjs/blocks/Map/index.js +17 -0
- package/build/cjs/blocks/Media/index.d.ts +14 -0
- package/build/cjs/blocks/Media/index.js +20 -0
- package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +19 -16
- package/build/cjs/blocks/PromoFeaturesBlock/index.d.ts +12 -0
- package/build/cjs/blocks/PromoFeaturesBlock/index.js +18 -0
- package/build/cjs/blocks/Questions/Questions.js +12 -10
- package/build/cjs/blocks/Questions/index.d.ts +29 -0
- package/build/cjs/blocks/Questions/index.js +47 -0
- package/build/cjs/blocks/Share/Share.js +11 -10
- package/build/cjs/blocks/Share/index.d.ts +12 -0
- package/build/cjs/blocks/Share/index.js +18 -0
- package/build/cjs/blocks/Slider/Slider.js +22 -17
- package/build/cjs/blocks/Slider/dynamic-form.d.ts +3 -0
- package/build/cjs/blocks/Slider/dynamic-form.js +225 -0
- package/build/cjs/blocks/Slider/index.d.ts +8 -0
- package/build/cjs/blocks/Slider/index.js +14 -0
- package/build/cjs/blocks/Table/index.d.ts +8 -0
- package/build/cjs/blocks/Table/index.js +14 -0
- package/build/cjs/blocks/Table/schema.d.ts +1 -0
- package/build/cjs/blocks/Table/schema.js +1 -0
- package/build/cjs/blocks/Tabs/Tabs.js +9 -8
- package/build/cjs/blocks/Tabs/index.d.ts +16 -0
- package/build/cjs/blocks/Tabs/index.js +29 -0
- package/build/cjs/blocks/TestEditorBlock/TestEditorBlock.d.ts +5 -0
- package/build/cjs/blocks/TestEditorBlock/TestEditorBlock.js +12 -0
- package/build/cjs/blocks/TestEditorBlock/form.d.ts +3 -0
- package/build/cjs/blocks/TestEditorBlock/form.js +80 -0
- package/build/cjs/blocks/TestEditorBlock/index.d.ts +11 -0
- package/build/cjs/blocks/TestEditorBlock/index.js +17 -0
- package/build/cjs/components/BlockBase/BlockBase.css +8 -16
- package/build/cjs/components/Image/dynamic-form.d.ts +2 -0
- package/build/cjs/components/Image/dynamic-form.js +84 -0
- package/build/cjs/components/editor/ChildrenWrap/ChildrenWrap.css +5 -0
- package/build/cjs/components/editor/ChildrenWrap/ChildrenWrap.d.ts +6 -0
- package/build/cjs/components/editor/ChildrenWrap/ChildrenWrap.js +15 -0
- package/build/cjs/components/editor/ItemWrap/ItemWrap.css +9 -0
- package/build/cjs/components/editor/ItemWrap/ItemWrap.d.ts +6 -0
- package/build/cjs/components/editor/ItemWrap/ItemWrap.js +15 -0
- package/build/cjs/constructor-items.d.ts +18 -6
- package/build/cjs/constructor-items.js +67 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.js +16 -13
- package/build/cjs/containers/PageConstructor/Provider.js +4 -0
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +10 -6
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +5 -2
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/hooks/useEditorBlockMouseEvents.d.ts +8 -0
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/hooks/useEditorBlockMouseEvents.js +109 -0
- package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +7 -6
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorLoadable/ConstructorLoadable.js +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorRow/ConstructorRow.js +1 -3
- package/build/cjs/context/blockIdContext/blockIdContext.d.ts +2 -2
- package/build/cjs/context/blockIdContext/blockIdContext.js +1 -1
- package/build/cjs/context/editorContext/editorContext.d.ts +13 -0
- package/build/cjs/context/editorContext/editorContext.js +10 -0
- package/build/cjs/context/editorContext/editorProvider.d.ts +2 -0
- package/build/cjs/context/editorContext/editorProvider.js +20 -0
- package/build/cjs/context/editorContext/hooks/useEditorStore.d.ts +2 -0
- package/build/cjs/context/editorContext/hooks/useEditorStore.js +15 -0
- package/build/cjs/context/editorContext/index.d.ts +4 -0
- package/build/cjs/context/editorContext/index.js +7 -0
- package/build/cjs/context/editorContext/store.d.ts +24 -0
- package/build/cjs/context/editorContext/store.js +39 -0
- package/build/cjs/context/messagesContext/hooks/useMessageObserver.d.ts +4 -0
- package/build/cjs/context/messagesContext/hooks/useMessageObserver.js +16 -0
- package/build/cjs/context/messagesContext/hooks/useMessageSender.d.ts +2 -0
- package/build/cjs/context/messagesContext/hooks/useMessageSender.js +11 -0
- package/build/cjs/context/messagesContext/hooks/useMessagesStore.d.ts +2 -0
- package/build/cjs/context/messagesContext/hooks/useMessagesStore.js +15 -0
- package/build/cjs/context/messagesContext/index.d.ts +5 -0
- package/build/cjs/context/messagesContext/index.js +8 -0
- package/build/cjs/context/messagesContext/messagesContext.d.ts +14 -0
- package/build/cjs/context/messagesContext/messagesContext.js +12 -0
- package/build/cjs/context/messagesContext/messagesProvider.d.ts +2 -0
- package/build/cjs/context/messagesContext/messagesProvider.js +73 -0
- package/build/cjs/context/messagesContext/store.d.ts +25 -0
- package/build/cjs/context/messagesContext/store.js +17 -0
- package/build/cjs/context/messagesContext/types.d.ts +14 -0
- package/build/cjs/context/messagesContext/types.js +2 -0
- package/build/cjs/grid/Col/Col.d.ts +1 -1
- package/build/cjs/grid/Grid/Grid.css +2 -6
- package/build/cjs/hooks/useAnalytics.js +1 -1
- package/build/cjs/hooks/useEditorInitialize.d.ts +7 -0
- package/build/cjs/hooks/useEditorInitialize.js +90 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +2 -1
- package/build/cjs/models/constructor-items/blocks.js +1 -0
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -1
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +4 -1
- package/build/cjs/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.js +4 -1
- package/build/cjs/navigation/containers/Layout/Layout.css +0 -1
- package/build/cjs/schema/constants.d.ts +1 -1
- package/build/cjs/schema/constants.js +2 -1
- package/build/cjs/schema/index.d.ts +227 -0
- package/build/cjs/schema/index.js +7 -3
- package/build/cjs/sub-blocks/BackgroundCard/dynamic-form.d.ts +2 -0
- package/build/cjs/sub-blocks/BackgroundCard/dynamic-form.js +81 -0
- package/build/cjs/sub-blocks/BackgroundCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/BackgroundCard/index.js +19 -0
- package/build/cjs/sub-blocks/BannerCard/BannerCard.js +4 -3
- package/build/cjs/sub-blocks/BannerCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/BannerCard/index.js +22 -0
- package/build/cjs/sub-blocks/BasicCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/BasicCard/index.js +18 -0
- package/build/cjs/sub-blocks/Content/index.d.ts +3 -0
- package/build/cjs/sub-blocks/Content/index.js +18 -0
- package/build/cjs/sub-blocks/Content/schema.d.ts +1 -0
- package/build/cjs/sub-blocks/Content/schema.js +1 -0
- package/build/cjs/sub-blocks/Divider/index.d.ts +3 -0
- package/build/cjs/sub-blocks/Divider/index.js +15 -0
- package/build/cjs/sub-blocks/ImageCard/ImageCard.js +2 -2
- package/build/cjs/sub-blocks/ImageCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/ImageCard/index.js +18 -0
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +1 -1
- package/build/cjs/sub-blocks/LayoutItem/form.d.ts +8 -0
- package/build/cjs/sub-blocks/LayoutItem/form.js +14 -0
- package/build/cjs/sub-blocks/LayoutItem/index.d.ts +3 -0
- package/build/cjs/sub-blocks/LayoutItem/index.js +20 -0
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +254 -246
- package/build/cjs/sub-blocks/LayoutItem/schema.js +7 -3
- package/build/cjs/sub-blocks/MediaCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/MediaCard/index.js +20 -0
- package/build/cjs/sub-blocks/PriceCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/PriceCard/index.js +31 -0
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetailed.js +1 -1
- package/build/cjs/sub-blocks/PriceDetailed/index.d.ts +4 -0
- package/build/cjs/sub-blocks/PriceDetailed/index.js +33 -0
- package/build/cjs/sub-blocks/Quote/index.d.ts +3 -0
- package/build/cjs/sub-blocks/Quote/index.js +21 -0
- package/build/cjs/types/actions/codes.d.ts +16 -0
- package/build/cjs/types/actions/codes.js +26 -0
- package/build/cjs/types/actions/index.d.ts +20 -0
- package/build/cjs/types/actions/index.js +10 -0
- package/build/cjs/types/actions/initial.d.ts +23 -0
- package/build/cjs/types/actions/initial.js +2 -0
- package/build/cjs/types/actions/insert.d.ts +19 -0
- package/build/cjs/types/actions/insert.js +2 -0
- package/build/cjs/types/actions/other.d.ts +16 -0
- package/build/cjs/types/actions/other.js +2 -0
- package/build/cjs/types/actions/overlay.d.ts +16 -0
- package/build/cjs/types/actions/overlay.js +2 -0
- package/build/cjs/types/actions/reorder.d.ts +17 -0
- package/build/cjs/types/actions/reorder.js +2 -0
- package/build/cjs/types/actions/select.d.ts +16 -0
- package/build/cjs/types/actions/select.js +2 -0
- package/build/cjs/types/dynamic-form.d.ts +92 -0
- package/build/cjs/types/dynamic-form.js +2 -0
- package/build/cjs/types/index.d.ts +14 -0
- package/build/cjs/types/index.js +2 -0
- package/build/cjs/utils/editor.d.ts +2 -0
- package/build/cjs/utils/editor.js +24 -0
- package/build/cjs/utils/form-generator.d.ts +9 -0
- package/build/cjs/utils/form-generator.js +126 -0
- package/build/cjs/utils/store.d.ts +16 -0
- package/build/cjs/utils/store.js +9 -0
- package/build/esm/blocks/Banner/Banner.js +3 -1
- package/build/esm/blocks/Banner/index.d.ts +3 -0
- package/build/esm/blocks/Banner/index.js +19 -0
- package/build/esm/blocks/CardLayout/CardLayout.css +1 -0
- package/build/esm/blocks/CardLayout/CardLayout.js +12 -7
- package/build/esm/blocks/CardLayout/index.d.ts +5 -0
- package/build/esm/blocks/CardLayout/index.js +162 -0
- package/build/esm/blocks/Companies/Companies.js +6 -4
- package/build/esm/blocks/Companies/index.d.ts +3 -0
- package/build/esm/blocks/Companies/index.js +15 -0
- package/build/esm/blocks/ContentLayout/ContentLayout.js +7 -6
- package/build/esm/blocks/ContentLayout/index.d.ts +11 -0
- package/build/esm/blocks/ContentLayout/index.js +14 -0
- package/build/esm/blocks/ContentLayout/schema.d.ts +1 -0
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +23 -21
- package/build/esm/blocks/ExtendedFeatures/index.d.ts +12 -0
- package/build/esm/blocks/ExtendedFeatures/index.js +15 -0
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +1 -0
- package/build/esm/blocks/ExtendedFeatures/schema.js +1 -0
- package/build/esm/blocks/FilterBlock/FilterBlock.js +12 -11
- package/build/esm/blocks/FilterBlock/index.d.ts +11 -0
- package/build/esm/blocks/FilterBlock/index.js +14 -0
- package/build/esm/blocks/Form/index.d.ts +12 -0
- package/build/esm/blocks/Form/index.js +15 -0
- package/build/esm/blocks/Header/dynamic-form.d.ts +2 -0
- package/build/esm/blocks/Header/dynamic-form.js +727 -0
- package/build/esm/blocks/Header/index.d.ts +8 -0
- package/build/esm/blocks/Header/index.js +11 -0
- package/build/esm/blocks/HeaderSlider/HeaderSlider.js +3 -2
- package/build/esm/blocks/HeaderSlider/index.d.ts +31 -0
- package/build/esm/blocks/HeaderSlider/index.js +35 -0
- package/build/esm/blocks/Icons/Icons.js +9 -6
- package/build/esm/blocks/Icons/index.d.ts +13 -0
- package/build/esm/blocks/Icons/index.js +16 -0
- package/build/esm/blocks/Info/index.d.ts +21 -0
- package/build/esm/blocks/Info/index.js +38 -0
- package/build/esm/blocks/Map/index.d.ts +11 -0
- package/build/esm/blocks/Map/index.js +14 -0
- package/build/esm/blocks/Media/index.d.ts +14 -0
- package/build/esm/blocks/Media/index.js +17 -0
- package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +19 -16
- package/build/esm/blocks/PromoFeaturesBlock/index.d.ts +12 -0
- package/build/esm/blocks/PromoFeaturesBlock/index.js +15 -0
- package/build/esm/blocks/Questions/Questions.js +13 -11
- package/build/esm/blocks/Questions/index.d.ts +29 -0
- package/build/esm/blocks/Questions/index.js +44 -0
- package/build/esm/blocks/Share/Share.js +11 -10
- package/build/esm/blocks/Share/index.d.ts +12 -0
- package/build/esm/blocks/Share/index.js +15 -0
- package/build/esm/blocks/Slider/Slider.js +22 -17
- package/build/esm/blocks/Slider/dynamic-form.d.ts +3 -0
- package/build/esm/blocks/Slider/dynamic-form.js +222 -0
- package/build/esm/blocks/Slider/index.d.ts +8 -0
- package/build/esm/blocks/Slider/index.js +11 -0
- package/build/esm/blocks/Table/index.d.ts +8 -0
- package/build/esm/blocks/Table/index.js +11 -0
- package/build/esm/blocks/Table/schema.d.ts +1 -0
- package/build/esm/blocks/Table/schema.js +1 -0
- package/build/esm/blocks/Tabs/Tabs.js +10 -9
- package/build/esm/blocks/Tabs/index.d.ts +16 -0
- package/build/esm/blocks/Tabs/index.js +26 -0
- package/build/esm/blocks/TestEditorBlock/TestEditorBlock.d.ts +5 -0
- package/build/esm/blocks/TestEditorBlock/TestEditorBlock.js +7 -0
- package/build/esm/blocks/TestEditorBlock/form.d.ts +3 -0
- package/build/esm/blocks/TestEditorBlock/form.js +78 -0
- package/build/esm/blocks/TestEditorBlock/index.d.ts +11 -0
- package/build/esm/blocks/TestEditorBlock/index.js +13 -0
- package/build/esm/components/BlockBase/BlockBase.css +8 -16
- package/build/esm/components/Image/dynamic-form.d.ts +2 -0
- package/build/esm/components/Image/dynamic-form.js +80 -0
- package/build/esm/components/editor/ChildrenWrap/ChildrenWrap.css +5 -0
- package/build/esm/components/editor/ChildrenWrap/ChildrenWrap.d.ts +7 -0
- package/build/esm/components/editor/ChildrenWrap/ChildrenWrap.js +13 -0
- package/build/esm/components/editor/ItemWrap/ItemWrap.css +9 -0
- package/build/esm/components/editor/ItemWrap/ItemWrap.d.ts +7 -0
- package/build/esm/components/editor/ItemWrap/ItemWrap.js +13 -0
- package/build/esm/constructor-items.d.ts +18 -6
- package/build/esm/constructor-items.js +66 -0
- package/build/esm/containers/PageConstructor/PageConstructor.js +19 -16
- package/build/esm/containers/PageConstructor/Provider.js +4 -0
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +10 -6
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +5 -2
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/hooks/useEditorBlockMouseEvents.d.ts +8 -0
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/hooks/useEditorBlockMouseEvents.js +107 -0
- package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +7 -6
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorLoadable/ConstructorLoadable.js +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorRow/ConstructorRow.js +1 -3
- package/build/esm/context/blockIdContext/blockIdContext.d.ts +2 -2
- package/build/esm/context/blockIdContext/blockIdContext.js +1 -1
- package/build/esm/context/editorContext/editorContext.d.ts +13 -0
- package/build/esm/context/editorContext/editorContext.js +6 -0
- package/build/esm/context/editorContext/editorProvider.d.ts +2 -0
- package/build/esm/context/editorContext/editorProvider.js +15 -0
- package/build/esm/context/editorContext/hooks/useEditorStore.d.ts +2 -0
- package/build/esm/context/editorContext/hooks/useEditorStore.js +11 -0
- package/build/esm/context/editorContext/index.d.ts +4 -0
- package/build/esm/context/editorContext/index.js +4 -0
- package/build/esm/context/editorContext/store.d.ts +24 -0
- package/build/esm/context/editorContext/store.js +36 -0
- package/build/esm/context/messagesContext/hooks/useMessageObserver.d.ts +4 -0
- package/build/esm/context/messagesContext/hooks/useMessageObserver.js +12 -0
- package/build/esm/context/messagesContext/hooks/useMessageSender.d.ts +2 -0
- package/build/esm/context/messagesContext/hooks/useMessageSender.js +7 -0
- package/build/esm/context/messagesContext/hooks/useMessagesStore.d.ts +2 -0
- package/build/esm/context/messagesContext/hooks/useMessagesStore.js +11 -0
- package/build/esm/context/messagesContext/index.d.ts +5 -0
- package/build/esm/context/messagesContext/index.js +5 -0
- package/build/esm/context/messagesContext/messagesContext.d.ts +14 -0
- package/build/esm/context/messagesContext/messagesContext.js +8 -0
- package/build/esm/context/messagesContext/messagesProvider.d.ts +2 -0
- package/build/esm/context/messagesContext/messagesProvider.js +68 -0
- package/build/esm/context/messagesContext/store.d.ts +25 -0
- package/build/esm/context/messagesContext/store.js +14 -0
- package/build/esm/context/messagesContext/types.d.ts +14 -0
- package/build/esm/context/messagesContext/types.js +1 -0
- package/build/esm/grid/Col/Col.d.ts +1 -1
- package/build/esm/grid/Grid/Grid.css +2 -6
- package/build/esm/hooks/useAnalytics.js +1 -1
- package/build/esm/hooks/useEditorInitialize.d.ts +7 -0
- package/build/esm/hooks/useEditorInitialize.js +87 -0
- package/build/esm/models/constructor-items/blocks.d.ts +2 -1
- package/build/esm/models/constructor-items/blocks.js +1 -0
- package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -1
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js +4 -1
- package/build/esm/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.js +4 -1
- package/build/esm/navigation/containers/Layout/Layout.css +0 -1
- package/build/esm/schema/constants.d.ts +1 -1
- package/build/esm/schema/constants.js +2 -1
- package/build/esm/schema/index.d.ts +227 -0
- package/build/esm/schema/index.js +6 -2
- package/build/esm/sub-blocks/BackgroundCard/dynamic-form.d.ts +2 -0
- package/build/esm/sub-blocks/BackgroundCard/dynamic-form.js +78 -0
- package/build/esm/sub-blocks/BackgroundCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/BackgroundCard/index.js +16 -0
- package/build/esm/sub-blocks/BannerCard/BannerCard.js +4 -3
- package/build/esm/sub-blocks/BannerCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/BannerCard/index.js +19 -0
- package/build/esm/sub-blocks/BasicCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/BasicCard/index.js +15 -0
- package/build/esm/sub-blocks/Content/index.d.ts +3 -0
- package/build/esm/sub-blocks/Content/index.js +15 -0
- package/build/esm/sub-blocks/Content/schema.d.ts +1 -0
- package/build/esm/sub-blocks/Content/schema.js +1 -0
- package/build/esm/sub-blocks/Divider/index.d.ts +3 -0
- package/build/esm/sub-blocks/Divider/index.js +12 -0
- package/build/esm/sub-blocks/ImageCard/ImageCard.js +2 -2
- package/build/esm/sub-blocks/ImageCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/ImageCard/index.js +15 -0
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +1 -1
- package/build/esm/sub-blocks/LayoutItem/form.d.ts +8 -0
- package/build/esm/sub-blocks/LayoutItem/form.js +11 -0
- package/build/esm/sub-blocks/LayoutItem/index.d.ts +3 -0
- package/build/esm/sub-blocks/LayoutItem/index.js +17 -0
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +254 -246
- package/build/esm/sub-blocks/LayoutItem/schema.js +6 -2
- package/build/esm/sub-blocks/MediaCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/MediaCard/index.js +17 -0
- package/build/esm/sub-blocks/PriceCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/PriceCard/index.js +28 -0
- package/build/esm/sub-blocks/PriceDetailed/PriceDetailed.js +1 -1
- package/build/esm/sub-blocks/PriceDetailed/index.d.ts +4 -0
- package/build/esm/sub-blocks/PriceDetailed/index.js +30 -0
- package/build/esm/sub-blocks/Quote/index.d.ts +3 -0
- package/build/esm/sub-blocks/Quote/index.js +18 -0
- package/build/esm/types/actions/codes.d.ts +16 -0
- package/build/esm/types/actions/codes.js +23 -0
- package/build/esm/types/actions/index.d.ts +20 -0
- package/build/esm/types/actions/index.js +7 -0
- package/build/esm/types/actions/initial.d.ts +23 -0
- package/build/esm/types/actions/initial.js +1 -0
- package/build/esm/types/actions/insert.d.ts +19 -0
- package/build/esm/types/actions/insert.js +1 -0
- package/build/esm/types/actions/other.d.ts +16 -0
- package/build/esm/types/actions/other.js +1 -0
- package/build/esm/types/actions/overlay.d.ts +16 -0
- package/build/esm/types/actions/overlay.js +1 -0
- package/build/esm/types/actions/reorder.d.ts +17 -0
- package/build/esm/types/actions/reorder.js +1 -0
- package/build/esm/types/actions/select.d.ts +16 -0
- package/build/esm/types/actions/select.js +1 -0
- package/build/esm/types/dynamic-form.d.ts +92 -0
- package/build/esm/types/dynamic-form.js +1 -0
- package/build/esm/types/index.d.ts +14 -0
- package/build/esm/types/index.js +1 -0
- package/build/esm/utils/editor.d.ts +2 -0
- package/build/esm/utils/editor.js +20 -0
- package/build/esm/utils/form-generator.d.ts +9 -0
- package/build/esm/utils/form-generator.js +121 -0
- package/build/esm/utils/store.d.ts +16 -0
- package/build/esm/utils/store.js +5 -0
- package/package.json +5 -2
- package/server/models/constructor-items/blocks.d.ts +2 -1
- package/server/models/constructor-items/blocks.js +1 -0
- package/server/models/constructor-items/sub-blocks.d.ts +1 -1
- package/styles/mixins.scss +9 -9
- package/widget/index.js +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const HeaderBlockConfig: {
|
|
2
|
+
component: (props: import("../..").WithChildren<import("../..").HeaderBlockProps & import("../..").ClassNameProps>) => JSX.Element;
|
|
3
|
+
schema: {
|
|
4
|
+
name: string;
|
|
5
|
+
inputs: import("../../types/dynamic-form").ConfigInput[];
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export default HeaderBlockConfig;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import HeaderBlock from './Header';
|
|
3
|
+
import { HeaderBlock as HeaderBlockSchema } from './schema';
|
|
4
|
+
const HeaderBlockConfig = {
|
|
5
|
+
component: HeaderBlock,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Header Block',
|
|
8
|
+
inputs: generateFromAJV(HeaderBlockSchema['header-block']),
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
export default HeaderBlockConfig;
|
|
@@ -12,7 +12,8 @@ export const HeaderSliderBlock = (_a) => {
|
|
|
12
12
|
const isMobile = useContext(MobileContext);
|
|
13
13
|
const showArrows = isMobile ? false : arrows;
|
|
14
14
|
return (React.createElement("div", { className: b('wrapper'), "data-qa": "header-slider" },
|
|
15
|
-
React.createElement(SliderBlock, Object.assign({}, props, { arrows: showArrows, slidesToShow: 1, type: SliderType.HeaderCard, animated: false, blockClassName: b(), arrowSize: 20 }), items
|
|
16
|
-
|
|
15
|
+
React.createElement(SliderBlock, Object.assign({}, props, { arrows: showArrows, slidesToShow: 1, type: SliderType.HeaderCard, animated: false, blockClassName: b(), arrowSize: 20 }), items &&
|
|
16
|
+
items.map((item, index) => (React.createElement("div", { key: index, className: b('item'), "data-qa": `header-slider-item-${index + 1}` },
|
|
17
|
+
React.createElement(Header, Object.assign({}, item, { className: b('item-content') }))))))));
|
|
17
18
|
};
|
|
18
19
|
export default HeaderSliderBlock;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const HeaderSliderBlockConfig: {
|
|
2
|
+
component: ({ items, arrows, ...props }: import("../..").HeaderSliderBlockProps) => JSX.Element;
|
|
3
|
+
schema: {
|
|
4
|
+
name: string;
|
|
5
|
+
inputs: import("../../types/dynamic-form").ConfigInput[];
|
|
6
|
+
default: {
|
|
7
|
+
type: string;
|
|
8
|
+
items: ({
|
|
9
|
+
title: string;
|
|
10
|
+
overtitle: string;
|
|
11
|
+
description: string;
|
|
12
|
+
image?: undefined;
|
|
13
|
+
mediaView?: undefined;
|
|
14
|
+
width?: undefined;
|
|
15
|
+
buttons?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
image: string;
|
|
18
|
+
mediaView: string;
|
|
19
|
+
title: string;
|
|
20
|
+
overtitle: string;
|
|
21
|
+
description: string;
|
|
22
|
+
width: string;
|
|
23
|
+
buttons: {
|
|
24
|
+
text: string;
|
|
25
|
+
theme: string;
|
|
26
|
+
}[];
|
|
27
|
+
})[];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default HeaderSliderBlockConfig;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import HeaderSliderBlock from './HeaderSlider';
|
|
3
|
+
import { HeaderSliderBlock as HeaderSliderBlockSchema } from './schema';
|
|
4
|
+
const HeaderSliderBlockConfig = {
|
|
5
|
+
component: HeaderSliderBlock,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Header Slider Block',
|
|
8
|
+
inputs: generateFromAJV(HeaderSliderBlockSchema['header-slider-block']),
|
|
9
|
+
default: {
|
|
10
|
+
type: 'header-slider-block',
|
|
11
|
+
items: [
|
|
12
|
+
{
|
|
13
|
+
title: 'Header Slide 1',
|
|
14
|
+
overtitle: 'Header Slider Block presents',
|
|
15
|
+
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
image: 'https://storage.yandexcloud.net/cloud-www-assets/constructor/storybook/images/header-bg-video_light.png',
|
|
19
|
+
mediaView: 'fit',
|
|
20
|
+
title: 'Header Slide 2',
|
|
21
|
+
overtitle: 'Header Slider Block presents',
|
|
22
|
+
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
23
|
+
width: 'm',
|
|
24
|
+
buttons: [
|
|
25
|
+
{
|
|
26
|
+
text: 'Button',
|
|
27
|
+
theme: 'action',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
export default HeaderSliderBlockConfig;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { Fragment, useCallback, useContext } from 'react';
|
|
2
2
|
import { Image, Title } from '../../components';
|
|
3
3
|
import { LocationContext } from '../../context/locationContext';
|
|
4
|
+
import { Grid } from '../../grid';
|
|
4
5
|
import { useAnalytics } from '../../hooks';
|
|
5
6
|
import { block, getLinkProps } from '../../utils';
|
|
6
7
|
import './Icons.css';
|
|
@@ -15,11 +16,13 @@ const Icons = ({ title, description, size = 's', colSizes = { all: 12 }, items }
|
|
|
15
16
|
handleAnalytics(analyticsEvents, { url });
|
|
16
17
|
}, [handleAnalytics]);
|
|
17
18
|
return (React.createElement("div", { className: b({ size }) },
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
React.createElement(Grid, null,
|
|
20
|
+
(title || description) && (React.createElement(Title, { className: b('header'), title: title, subtitle: description, colSizes: colSizes })),
|
|
21
|
+
items &&
|
|
22
|
+
items.map((item) => {
|
|
23
|
+
const itemContent = getItemContent(item);
|
|
24
|
+
const { url, text } = item;
|
|
25
|
+
return url ? (React.createElement("a", Object.assign({ className: b('item'), key: url, href: url, "aria-label": text, title: text }, getLinkProps(url, hostname), { onClick: () => onClick(item) }), itemContent)) : (React.createElement("div", { className: b('item'), key: text }, itemContent));
|
|
26
|
+
}))));
|
|
24
27
|
};
|
|
25
28
|
export default Icons;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const IconsBlockConfig: {
|
|
2
|
+
component: ({ title, description, size, colSizes, items }: import("../..").IconsBlockProps) => JSX.Element;
|
|
3
|
+
schema: {
|
|
4
|
+
name: string;
|
|
5
|
+
inputs: import("../../types/dynamic-form").ConfigInput[];
|
|
6
|
+
default: {
|
|
7
|
+
type: string;
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default IconsBlockConfig;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import IconsBlock from './Icons';
|
|
3
|
+
import { IconsProps } from './schema';
|
|
4
|
+
const IconsBlockConfig = {
|
|
5
|
+
component: IconsBlock,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Icons Block',
|
|
8
|
+
inputs: generateFromAJV(IconsProps),
|
|
9
|
+
default: {
|
|
10
|
+
type: 'icons-block',
|
|
11
|
+
title: 'Icons Block',
|
|
12
|
+
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
export default IconsBlockConfig;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const InfoBlockConfig: {
|
|
2
|
+
component: (props: import("../..").InfoBlockProps) => JSX.Element;
|
|
3
|
+
schema: {
|
|
4
|
+
name: string;
|
|
5
|
+
inputs: import("../../types/dynamic-form").ConfigInput[];
|
|
6
|
+
default: {
|
|
7
|
+
type: string;
|
|
8
|
+
title: string;
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
sectionsTitle: string;
|
|
11
|
+
links: {
|
|
12
|
+
text: string;
|
|
13
|
+
}[];
|
|
14
|
+
buttons: {
|
|
15
|
+
text: string;
|
|
16
|
+
theme: string;
|
|
17
|
+
}[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default InfoBlockConfig;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import InfoBlock from './Info';
|
|
3
|
+
import { InfoBlock as InfoBlockSchema } from './schema';
|
|
4
|
+
const InfoBlockConfig = {
|
|
5
|
+
component: InfoBlock,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Info Block',
|
|
8
|
+
inputs: generateFromAJV(InfoBlockSchema['info-block']),
|
|
9
|
+
default: {
|
|
10
|
+
type: 'info-block',
|
|
11
|
+
title: 'Info Block',
|
|
12
|
+
backgroundColor: '#1c1c1c',
|
|
13
|
+
sectionsTitle: 'Other links',
|
|
14
|
+
links: [
|
|
15
|
+
{
|
|
16
|
+
text: 'Link 1',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
text: 'Link 2',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
text: 'Link 3',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
buttons: [
|
|
26
|
+
{
|
|
27
|
+
text: 'Read more',
|
|
28
|
+
theme: 'outlined-contrast',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
text: 'Go back',
|
|
32
|
+
theme: 'action',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
export default InfoBlockConfig;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const MapBlockConfig: {
|
|
2
|
+
component: ({ map, border, disableShadow, ...props }: import("../..").MapBlockProps) => JSX.Element;
|
|
3
|
+
schema: {
|
|
4
|
+
name: string;
|
|
5
|
+
inputs: import("../../types/dynamic-form").ConfigInput[];
|
|
6
|
+
default: {
|
|
7
|
+
title: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default MapBlockConfig;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import MapBlock from './Map';
|
|
3
|
+
import { MapBlock as MapBlockSchema } from './schema';
|
|
4
|
+
const MapBlockConfig = {
|
|
5
|
+
component: MapBlock,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Map Block',
|
|
8
|
+
inputs: generateFromAJV(MapBlockSchema['map-block']),
|
|
9
|
+
default: {
|
|
10
|
+
title: 'Map Block',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
export default MapBlockConfig;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const MediaBlockConfig: {
|
|
2
|
+
component: (props: import("../..").MediaBlockProps) => JSX.Element;
|
|
3
|
+
schema: {
|
|
4
|
+
name: string;
|
|
5
|
+
inputs: import("../../types/dynamic-form").ConfigInput[];
|
|
6
|
+
default: {
|
|
7
|
+
type: string;
|
|
8
|
+
title: string;
|
|
9
|
+
additionalInfo: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default MediaBlockConfig;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import MediaBlock from './Media';
|
|
3
|
+
import { MediaBlock as MediaBlockSchema } from './schema';
|
|
4
|
+
const MediaBlockConfig = {
|
|
5
|
+
component: MediaBlock,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Media Block',
|
|
8
|
+
inputs: generateFromAJV(MediaBlockSchema['media-block']),
|
|
9
|
+
default: {
|
|
10
|
+
type: 'media-block',
|
|
11
|
+
title: 'Media Block',
|
|
12
|
+
additionalInfo: 'Additional info',
|
|
13
|
+
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export default MediaBlockConfig;
|
|
@@ -6,6 +6,7 @@ import Media from '../../components/Media/Media';
|
|
|
6
6
|
import Title from '../../components/Title/Title';
|
|
7
7
|
import YFMWrapper from '../../components/YFMWrapper/YFMWrapper';
|
|
8
8
|
import { BREAKPOINTS } from '../../constants';
|
|
9
|
+
import { Grid } from '../../grid';
|
|
9
10
|
import { block } from '../../utils';
|
|
10
11
|
import './PromoFeaturesBlock.css';
|
|
11
12
|
const b = block('PromoFeaturesBlock');
|
|
@@ -17,21 +18,23 @@ const breakpointColumns = {
|
|
|
17
18
|
const PromoFeaturesBlock = (props) => {
|
|
18
19
|
const { items, title, description, theme, animated = true } = props;
|
|
19
20
|
const backgroundTheme = theme || 'default';
|
|
20
|
-
return (React.createElement(
|
|
21
|
-
React.createElement(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
'
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
21
|
+
return (React.createElement(Grid, null,
|
|
22
|
+
React.createElement(AnimateBlock, { className: b({ [backgroundTheme]: true }), animate: animated },
|
|
23
|
+
React.createElement(FullWidthBackground, { className: b('background', { [backgroundTheme]: true }) }),
|
|
24
|
+
React.createElement(Title, { title: title, subtitle: description, className: b('header') }),
|
|
25
|
+
React.createElement(BalancedMasonry, { breakpointCols: breakpointColumns, className: b('card-container'), columnClassName: b('card-container-column') }, items &&
|
|
26
|
+
items.map(({ title: cardTitle, text, media, theme: cardTheme }, index) => {
|
|
27
|
+
const blockModifier = backgroundTheme === 'default' ? 'default' : 'light';
|
|
28
|
+
const themeMod = cardTheme || blockModifier || '';
|
|
29
|
+
return (React.createElement("div", { key: index, className: b('card', {
|
|
30
|
+
'no-media': !media,
|
|
31
|
+
[themeMod]: Boolean(themeMod),
|
|
32
|
+
}) },
|
|
33
|
+
React.createElement("div", { className: b('card-info') },
|
|
34
|
+
React.createElement("h3", { className: b('card-title') }, cardTitle),
|
|
35
|
+
React.createElement("div", { className: b('card-text') },
|
|
36
|
+
React.createElement(YFMWrapper, { content: text, modifiers: { constructor: true } }))),
|
|
37
|
+
media && React.createElement(Media, Object.assign({ className: b('card-media') }, media))));
|
|
38
|
+
})))));
|
|
36
39
|
};
|
|
37
40
|
export default PromoFeaturesBlock;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const PromoFeaturesBlockConfig: {
|
|
2
|
+
component: (props: import("../..").PromoFeaturesProps) => JSX.Element;
|
|
3
|
+
schema: {
|
|
4
|
+
name: string;
|
|
5
|
+
inputs: import("../../types/dynamic-form").ConfigInput[];
|
|
6
|
+
default: {
|
|
7
|
+
title: string;
|
|
8
|
+
items: {}[];
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default PromoFeaturesBlockConfig;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import PromoFeaturesBlock from './PromoFeaturesBlock';
|
|
3
|
+
import { PromoFeaturesBlock as PromoFeaturesBlockSchema } from './schema';
|
|
4
|
+
const PromoFeaturesBlockConfig = {
|
|
5
|
+
component: PromoFeaturesBlock,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Promo Features Block',
|
|
8
|
+
inputs: generateFromAJV(PromoFeaturesBlockSchema['promo-features-block']),
|
|
9
|
+
default: {
|
|
10
|
+
title: 'Promo Features Block',
|
|
11
|
+
items: [{}],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export default PromoFeaturesBlockConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { Col, Row } from '../../grid';
|
|
2
|
+
import { Col, Grid, Row } from '../../grid';
|
|
3
3
|
import { Content } from '../../sub-blocks';
|
|
4
4
|
import { block } from '../../utils';
|
|
5
5
|
import { QuestionBlockItem } from './QuestionBlockItem/QuestionBlockItem';
|
|
@@ -19,15 +19,17 @@ const QuestionsBlock = (props) => {
|
|
|
19
19
|
}
|
|
20
20
|
setOpened(newState);
|
|
21
21
|
};
|
|
22
|
-
return (React.createElement(
|
|
23
|
-
React.createElement(
|
|
24
|
-
React.createElement(
|
|
25
|
-
React.createElement(
|
|
26
|
-
React.createElement(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
return (React.createElement(Grid, null,
|
|
23
|
+
React.createElement("div", { className: b(), itemScope: true, itemType: FaqMicrodataValues.PageType },
|
|
24
|
+
React.createElement(Row, null,
|
|
25
|
+
React.createElement(Col, { sizes: { all: 12, md: 4 } },
|
|
26
|
+
React.createElement("div", { className: b('title') },
|
|
27
|
+
React.createElement(Content, { title: title, text: text, additionalInfo: additionalInfo, links: links, list: list, buttons: buttons, colSizes: { all: 12, md: 12 } }))),
|
|
28
|
+
React.createElement(Col, { sizes: { all: 12, md: 8 }, role: 'list' }, items &&
|
|
29
|
+
items.map(({ title: itemTitle, text: itemText, link, listStyle = 'dash' }, index) => {
|
|
30
|
+
const isOpened = opened.includes(index);
|
|
31
|
+
const onClick = () => toggleItem(index);
|
|
32
|
+
return (React.createElement(QuestionBlockItem, { key: itemTitle, title: itemTitle, text: itemText, link: link, listStyle: listStyle, isOpened: isOpened, onClick: onClick }));
|
|
33
|
+
}))))));
|
|
32
34
|
};
|
|
33
35
|
export default QuestionsBlock;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare const QuestionsBlockConfig: {
|
|
2
|
+
component: (props: import("../..").QuestionsProps) => JSX.Element;
|
|
3
|
+
schema: {
|
|
4
|
+
name: string;
|
|
5
|
+
inputs: import("../../types/dynamic-form").ConfigInput[];
|
|
6
|
+
default: {
|
|
7
|
+
type: string;
|
|
8
|
+
title: string;
|
|
9
|
+
text: string;
|
|
10
|
+
links: {
|
|
11
|
+
text: string;
|
|
12
|
+
url: string;
|
|
13
|
+
}[];
|
|
14
|
+
buttons: {
|
|
15
|
+
text: string;
|
|
16
|
+
theme: string;
|
|
17
|
+
}[];
|
|
18
|
+
list: {
|
|
19
|
+
title: string;
|
|
20
|
+
text: string;
|
|
21
|
+
}[];
|
|
22
|
+
items: {
|
|
23
|
+
title: string;
|
|
24
|
+
text: string;
|
|
25
|
+
}[];
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export default QuestionsBlockConfig;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import QuestionsBlock from './Questions';
|
|
3
|
+
import { QuestionsBlock as QuestionsBlockSchema } from './schema';
|
|
4
|
+
const QuestionsBlockConfig = {
|
|
5
|
+
component: QuestionsBlock,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Questions Block',
|
|
8
|
+
inputs: generateFromAJV(QuestionsBlockSchema['questions-block']),
|
|
9
|
+
default: {
|
|
10
|
+
type: 'questions-block',
|
|
11
|
+
title: 'Questions Block',
|
|
12
|
+
text: 'Here you can find answers.',
|
|
13
|
+
links: [
|
|
14
|
+
{
|
|
15
|
+
text: 'Report for 2024',
|
|
16
|
+
url: 'file.doc',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
buttons: [
|
|
20
|
+
{
|
|
21
|
+
text: 'Get more',
|
|
22
|
+
theme: 'outlined-info',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
list: [
|
|
26
|
+
{
|
|
27
|
+
title: 'Report for 2024',
|
|
28
|
+
text: 'Some advice here',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
items: [
|
|
32
|
+
{
|
|
33
|
+
title: 'Question 1',
|
|
34
|
+
text: 'Answer for question 1',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
title: 'Question 2',
|
|
38
|
+
text: 'Answer for question 2',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
export default QuestionsBlockConfig;
|
|
@@ -25,15 +25,16 @@ const Share = ({ items, title }) => {
|
|
|
25
25
|
const handleButtonClick = useCallback(() => handleAnalytics(), [handleAnalytics]);
|
|
26
26
|
return (React.createElement("div", { className: b() },
|
|
27
27
|
React.createElement("h5", { className: b('title') }, title || i18n('constructor-share')),
|
|
28
|
-
React.createElement("div", { className: b('items') }, items
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
React.createElement("div", { className: b('items') }, items &&
|
|
29
|
+
items.map((type) => {
|
|
30
|
+
const url = getAbsolutePath(hostname, pathname);
|
|
31
|
+
const socialUrl = getShareLink(url, type);
|
|
32
|
+
const icon = icons[type];
|
|
33
|
+
const urlTitle = i18n(`${type}-title`);
|
|
34
|
+
const buttonLabel = i18n(`${type}-label`);
|
|
35
|
+
return (React.createElement(Button, { key: type, view: "flat", size: "l", target: "_blank", href: socialUrl, className: b('item', { type: type.toLowerCase() }), onClick: handleButtonClick, title: urlTitle, extraProps: {
|
|
36
|
+
'aria-label': buttonLabel,
|
|
37
|
+
} }, icon && (React.createElement(Icon, { data: icon, size: 24, className: b('icon', { type }) }))));
|
|
38
|
+
}))));
|
|
38
39
|
};
|
|
39
40
|
export default Share;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const ShareBlockConfig: {
|
|
2
|
+
component: ({ items, title }: import("../..").ShareBlockProps) => JSX.Element;
|
|
3
|
+
schema: {
|
|
4
|
+
name: string;
|
|
5
|
+
inputs: import("../../types/dynamic-form").ConfigInput[];
|
|
6
|
+
default: {
|
|
7
|
+
items: string[];
|
|
8
|
+
title: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default ShareBlockConfig;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import ShareBlock from './Share';
|
|
3
|
+
import { ShareBlock as ShareBlockSchema } from './schema';
|
|
4
|
+
const ShareBlockConfig = {
|
|
5
|
+
component: ShareBlock,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Share Block',
|
|
8
|
+
inputs: generateFromAJV(ShareBlockSchema['share-block']),
|
|
9
|
+
default: {
|
|
10
|
+
items: ['vk', 'telegram', 'facebook'],
|
|
11
|
+
title: 'Share Block',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export default ShareBlockConfig;
|
|
@@ -7,10 +7,13 @@ import Anchor from '../../components/Anchor/Anchor';
|
|
|
7
7
|
import AnimateBlock from '../../components/AnimateBlock/AnimateBlock';
|
|
8
8
|
import OutsideClick from '../../components/OutsideClick/OutsideClick';
|
|
9
9
|
import Title from '../../components/Title/Title';
|
|
10
|
+
import ChildrenWrap from '../../components/editor/ChildrenWrap/ChildrenWrap';
|
|
11
|
+
import ItemWrap from '../../components/editor/ItemWrap/ItemWrap';
|
|
10
12
|
import { BREAKPOINTS } from '../../constants';
|
|
11
13
|
import { MobileContext } from '../../context/mobileContext';
|
|
12
14
|
import { SSRContext } from '../../context/ssrContext';
|
|
13
15
|
import { StylesContext } from '../../context/stylesContext/StylesContext';
|
|
16
|
+
import { Grid } from '../../grid';
|
|
14
17
|
import useFocus from '../../hooks/useFocus';
|
|
15
18
|
import { SliderType, } from '../../models';
|
|
16
19
|
import { block } from '../../utils';
|
|
@@ -29,11 +32,11 @@ export const SliderBlock = (props) => {
|
|
|
29
32
|
const [breakpoint, setBreakpoint] = useState(BREAKPOINTS.xl);
|
|
30
33
|
const disclosedChildren = useMemo(() => discloseAllNestedChildren(children), [children]);
|
|
31
34
|
const childrenCount = disclosedChildren.length;
|
|
32
|
-
const
|
|
35
|
+
const slidesToShow = useMemo(() => getSlidesToShowWithDefaults({
|
|
33
36
|
contentLength: childrenCount,
|
|
34
37
|
breakpoints: props.slidesToShow,
|
|
35
38
|
mobileFullscreen: Boolean(props.type && Object.values(SliderType).includes(props.type)),
|
|
36
|
-
}));
|
|
39
|
+
}), [childrenCount, props.slidesToShow, props.type]);
|
|
37
40
|
const slidesToShowCount = getSlidesToShowCount(slidesToShow);
|
|
38
41
|
const slidesCountByBreakpoint = getSlidesCountByBreakpoint(breakpoint, slidesToShow);
|
|
39
42
|
const [currentIndex, setCurrentIndex] = useState(0);
|
|
@@ -201,23 +204,25 @@ export const SliderBlock = (props) => {
|
|
|
201
204
|
prevArrow: React.createElement(Arrow, { type: "left", handleClick: handleArrowClick, size: arrowSize }),
|
|
202
205
|
lazyLoad,
|
|
203
206
|
};
|
|
204
|
-
return (React.createElement(
|
|
205
|
-
React.createElement(
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
return (React.createElement(ChildrenWrap, null,
|
|
208
|
+
React.createElement(OutsideClick, { onOutsideClick: isMobile ? unsetFocus : noop },
|
|
209
|
+
React.createElement(SlickSlider, Object.assign({}, settings), React.Children.map(disclosedChildren, (child, index) => (React.createElement(ItemWrap, { index: index }, child)))),
|
|
210
|
+
React.createElement("div", { className: b('footer') },
|
|
211
|
+
renderDisclaimer(),
|
|
212
|
+
renderNavigation()))));
|
|
209
213
|
};
|
|
210
214
|
return (React.createElement(StylesContext.Provider, { value: Object.assign(Object.assign({}, childStyles), { setStyles: setChildStyles }) },
|
|
211
|
-
React.createElement(
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
215
|
+
React.createElement(Grid, null,
|
|
216
|
+
React.createElement("div", { className: b({
|
|
217
|
+
'align-left': childrenCount < slidesCountByBreakpoint,
|
|
218
|
+
'one-slide': childrenCount === 1,
|
|
219
|
+
'only-arrows': !(title === null || title === void 0 ? void 0 : title.text) && !description && arrows,
|
|
220
|
+
mobile: isMobile,
|
|
221
|
+
type,
|
|
222
|
+
}, blockClassName) },
|
|
223
|
+
anchorId && React.createElement(Anchor, { id: anchorId }),
|
|
224
|
+
React.createElement(Title, { title: title, subtitle: description, className: b('header', { 'no-description': !description }) }),
|
|
225
|
+
React.createElement(AnimateBlock, { className: b('animate-slides'), animate: animated }, renderSlider())))));
|
|
221
226
|
};
|
|
222
227
|
// TODO remove this and rework PriceDetailed CLOUDFRONT-12230
|
|
223
228
|
function discloseAllNestedChildren(children) {
|