@gravity-ui/page-constructor 6.3.0 → 6.3.2-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/README.md +31 -1
- package/build/cjs/blocks/Banner/Banner.js +2 -1
- package/build/cjs/blocks/Banner/Banner.js.map +1 -1
- package/build/cjs/blocks/Banner/index.d.ts +3 -0
- package/build/cjs/blocks/Banner/index.js +24 -0
- package/build/cjs/blocks/Banner/index.js.map +1 -0
- package/build/cjs/blocks/CardLayout/CardLayout.css +1 -0
- package/build/cjs/blocks/CardLayout/CardLayout.js +4 -3
- package/build/cjs/blocks/CardLayout/CardLayout.js.map +1 -1
- package/build/cjs/blocks/CardLayout/index.d.ts +5 -0
- package/build/cjs/blocks/CardLayout/index.js +186 -0
- package/build/cjs/blocks/CardLayout/index.js.map +1 -0
- package/build/cjs/blocks/Companies/Companies.js +2 -1
- package/build/cjs/blocks/Companies/Companies.js.map +1 -1
- package/build/cjs/blocks/Companies/index.d.ts +3 -0
- package/build/cjs/blocks/Companies/index.js +20 -0
- package/build/cjs/blocks/Companies/index.js.map +1 -0
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +1 -1
- package/build/cjs/blocks/ContentLayout/ContentLayout.js.map +1 -1
- package/build/cjs/blocks/ContentLayout/index.d.ts +41 -0
- package/build/cjs/blocks/ContentLayout/index.js +81 -0
- package/build/cjs/blocks/ContentLayout/index.js.map +1 -0
- package/build/cjs/blocks/ContentLayout/schema.d.ts +1 -0
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +13 -12
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js.map +1 -1
- package/build/cjs/blocks/ExtendedFeatures/index.d.ts +58 -0
- package/build/cjs/blocks/ExtendedFeatures/index.js +77 -0
- package/build/cjs/blocks/ExtendedFeatures/index.js.map +1 -0
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +1 -0
- package/build/cjs/blocks/ExtendedFeatures/schema.js +1 -0
- package/build/cjs/blocks/ExtendedFeatures/schema.js.map +1 -1
- package/build/cjs/blocks/FilterBlock/FilterBlock.js +5 -5
- package/build/cjs/blocks/FilterBlock/FilterBlock.js.map +1 -1
- package/build/cjs/blocks/FilterBlock/index.d.ts +29 -0
- package/build/cjs/blocks/FilterBlock/index.js +98 -0
- package/build/cjs/blocks/FilterBlock/index.js.map +1 -0
- package/build/cjs/blocks/Form/index.d.ts +13 -0
- package/build/cjs/blocks/Form/index.js +20 -0
- package/build/cjs/blocks/Form/index.js.map +1 -0
- package/build/cjs/blocks/Header/dynamic-form.d.ts +2 -0
- package/build/cjs/blocks/Header/dynamic-form.js +731 -0
- package/build/cjs/blocks/Header/dynamic-form.js.map +1 -0
- package/build/cjs/blocks/Header/index.d.ts +20 -0
- package/build/cjs/blocks/Header/index.js +34 -0
- package/build/cjs/blocks/Header/index.js.map +1 -0
- package/build/cjs/blocks/HeaderSlider/HeaderSlider.js +2 -1
- package/build/cjs/blocks/HeaderSlider/HeaderSlider.js.map +1 -1
- package/build/cjs/blocks/HeaderSlider/index.d.ts +32 -0
- package/build/cjs/blocks/HeaderSlider/index.js +40 -0
- package/build/cjs/blocks/HeaderSlider/index.js.map +1 -0
- package/build/cjs/blocks/Icons/Icons.js +8 -6
- package/build/cjs/blocks/Icons/Icons.js.map +1 -1
- package/build/cjs/blocks/Icons/index.d.ts +20 -0
- package/build/cjs/blocks/Icons/index.js +64 -0
- package/build/cjs/blocks/Icons/index.js.map +1 -0
- package/build/cjs/blocks/Info/index.d.ts +22 -0
- package/build/cjs/blocks/Info/index.js +43 -0
- package/build/cjs/blocks/Info/index.js.map +1 -0
- package/build/cjs/blocks/Map/index.d.ts +12 -0
- package/build/cjs/blocks/Map/index.js +19 -0
- package/build/cjs/blocks/Map/index.js.map +1 -0
- package/build/cjs/blocks/Media/index.d.ts +39 -0
- package/build/cjs/blocks/Media/index.js +57 -0
- package/build/cjs/blocks/Media/index.js.map +1 -0
- package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +15 -13
- package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js.map +1 -1
- package/build/cjs/blocks/PromoFeaturesBlock/index.d.ts +22 -0
- package/build/cjs/blocks/PromoFeaturesBlock/index.js +49 -0
- package/build/cjs/blocks/PromoFeaturesBlock/index.js.map +1 -0
- package/build/cjs/blocks/Questions/Questions.js +6 -5
- package/build/cjs/blocks/Questions/Questions.js.map +1 -1
- package/build/cjs/blocks/Questions/index.d.ts +30 -0
- package/build/cjs/blocks/Questions/index.js +49 -0
- package/build/cjs/blocks/Questions/index.js.map +1 -0
- package/build/cjs/blocks/Share/Share.js +11 -10
- package/build/cjs/blocks/Share/Share.js.map +1 -1
- package/build/cjs/blocks/Share/index.d.ts +13 -0
- package/build/cjs/blocks/Share/index.js +20 -0
- package/build/cjs/blocks/Share/index.js.map +1 -0
- package/build/cjs/blocks/Slider/Slider.js +12 -10
- package/build/cjs/blocks/Slider/Slider.js.map +1 -1
- package/build/cjs/blocks/Slider/dynamic-form.d.ts +3 -0
- package/build/cjs/blocks/Slider/dynamic-form.js +226 -0
- package/build/cjs/blocks/Slider/dynamic-form.js.map +1 -0
- package/build/cjs/blocks/Slider/index.d.ts +28 -0
- package/build/cjs/blocks/Slider/index.js +47 -0
- package/build/cjs/blocks/Slider/index.js.map +1 -0
- package/build/cjs/blocks/Table/index.d.ts +18 -0
- package/build/cjs/blocks/Table/index.js +32 -0
- package/build/cjs/blocks/Table/index.js.map +1 -0
- package/build/cjs/blocks/Table/schema.d.ts +1 -0
- package/build/cjs/blocks/Table/schema.js +1 -0
- package/build/cjs/blocks/Table/schema.js.map +1 -1
- package/build/cjs/blocks/Tabs/Tabs.js +4 -4
- package/build/cjs/blocks/Tabs/Tabs.js.map +1 -1
- package/build/cjs/blocks/Tabs/index.d.ts +17 -0
- package/build/cjs/blocks/Tabs/index.js +31 -0
- package/build/cjs/blocks/Tabs/index.js.map +1 -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/TestEditorBlock.js.map +1 -0
- package/build/cjs/blocks/TestEditorBlock/form.d.ts +3 -0
- package/build/cjs/blocks/TestEditorBlock/form.js +91 -0
- package/build/cjs/blocks/TestEditorBlock/form.js.map +1 -0
- package/build/cjs/blocks/TestEditorBlock/index.d.ts +11 -0
- package/build/cjs/blocks/TestEditorBlock/index.js +18 -0
- package/build/cjs/blocks/TestEditorBlock/index.js.map +1 -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 +85 -0
- package/build/cjs/components/Image/dynamic-form.js.map +1 -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 +12 -0
- package/build/cjs/components/editor/ItemWrap/ItemWrap.js.map +1 -0
- package/build/cjs/constructor-items.d.ts +22 -6
- package/build/cjs/constructor-items.js +80 -6
- package/build/cjs/constructor-items.js.map +1 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.d.ts +1 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.js +18 -10
- package/build/cjs/containers/PageConstructor/PageConstructor.js.map +1 -1
- package/build/cjs/containers/PageConstructor/Provider.js +2 -0
- package/build/cjs/containers/PageConstructor/Provider.js.map +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +10 -6
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +3 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js.map +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +7 -6
- package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js.map +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +2 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js.map +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorLoadable/ConstructorLoadable.js +2 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorLoadable/ConstructorLoadable.js.map +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorRow/ConstructorRow.js +1 -2
- package/build/cjs/containers/PageConstructor/components/ConstructorRow/ConstructorRow.js.map +1 -1
- package/build/cjs/context/blockIdContext/blockIdContext.d.ts +2 -2
- package/build/cjs/context/blockIdContext/blockIdContext.js +1 -1
- package/build/cjs/context/blockIdContext/blockIdContext.js.map +1 -1
- package/build/cjs/context/editorStoreContext/PCEditorStoreContext.d.ts +7 -0
- package/build/cjs/context/editorStoreContext/PCEditorStoreContext.js +10 -0
- package/build/cjs/context/editorStoreContext/PCEditorStoreContext.js.map +1 -0
- package/build/cjs/context/editorStoreContext/PCEditorStoreProvider.d.ts +5 -0
- package/build/cjs/context/editorStoreContext/PCEditorStoreProvider.js +34 -0
- package/build/cjs/context/editorStoreContext/PCEditorStoreProvider.js.map +1 -0
- package/build/cjs/context/editorStoreContext/index.d.ts +2 -0
- package/build/cjs/context/editorStoreContext/index.js +6 -0
- package/build/cjs/context/editorStoreContext/index.js.map +1 -0
- package/build/cjs/editor/components/CodeEditor/CodeEditor.d.ts +1 -2
- package/build/cjs/editor/components/CodeEditor/CodeEditor.js +5 -6
- package/build/cjs/editor/components/CodeEditor/CodeEditor.js.map +1 -1
- package/build/cjs/editor/data/templates/test-editor-block.json +18 -0
- package/build/cjs/grid/Grid/Grid.css +2 -6
- package/build/cjs/hooks/useAnalytics.js +1 -1
- package/build/cjs/hooks/useAnalytics.js.map +1 -1
- package/build/cjs/hooks/usePCEditorBlockMouseEvents.d.ts +8 -0
- package/build/cjs/hooks/usePCEditorBlockMouseEvents.js +50 -0
- package/build/cjs/hooks/usePCEditorBlockMouseEvents.js.map +1 -0
- package/build/cjs/hooks/usePCEditorBlockSelection.d.ts +2 -0
- package/build/cjs/hooks/usePCEditorBlockSelection.js +30 -0
- package/build/cjs/hooks/usePCEditorBlockSelection.js.map +1 -0
- package/build/cjs/hooks/usePCEditorInitializeEvents.d.ts +7 -0
- package/build/cjs/hooks/usePCEditorInitializeEvents.js +63 -0
- package/build/cjs/hooks/usePCEditorInitializeEvents.js.map +1 -0
- package/build/cjs/hooks/usePCEditorItemWrap.d.ts +10 -0
- package/build/cjs/hooks/usePCEditorItemWrap.js +21 -0
- package/build/cjs/hooks/usePCEditorItemWrap.js.map +1 -0
- package/build/cjs/hooks/usePCEditorStore.d.ts +1 -0
- package/build/cjs/hooks/usePCEditorStore.js +13 -0
- package/build/cjs/hooks/usePCEditorStore.js.map +1 -0
- package/build/cjs/hooks/usePostMessageAPI.d.ts +4 -0
- package/build/cjs/hooks/usePostMessageAPI.js +30 -0
- package/build/cjs/hooks/usePostMessageAPI.js.map +1 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +1 -0
- package/build/cjs/models/constructor-items/blocks.js +1 -0
- package/build/cjs/models/constructor-items/blocks.js.map +1 -1
- package/build/cjs/models/constructor.d.ts +4 -1
- package/build/cjs/models/constructor.js.map +1 -1
- package/build/cjs/models/navigation.d.ts +2 -2
- package/build/cjs/models/navigation.js.map +1 -1
- package/build/cjs/navigation/components/DesktopNavigation/DesktopNavigation.js +1 -1
- package/build/cjs/navigation/components/DesktopNavigation/DesktopNavigation.js.map +1 -1
- package/build/cjs/navigation/components/Navigation/Navigation.d.ts +2 -2
- package/build/cjs/navigation/components/Navigation/Navigation.js +1 -1
- package/build/cjs/navigation/components/Navigation/Navigation.js.map +1 -1
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +4 -1
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js.map +1 -1
- package/build/cjs/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.js +4 -1
- package/build/cjs/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.js.map +1 -1
- package/build/cjs/navigation/components/NavigationPopup/NavigationPopup.css +2 -0
- package/build/cjs/navigation/components/NavigationPopup/NavigationPopup.js +13 -5
- package/build/cjs/navigation/components/NavigationPopup/NavigationPopup.js.map +1 -1
- package/build/cjs/navigation/containers/Layout/Layout.css +0 -1
- package/build/cjs/navigation/containers/Layout/Layout.js +1 -0
- package/build/cjs/navigation/containers/Layout/Layout.js.map +1 -1
- package/build/cjs/navigation/models.d.ts +1 -1
- package/build/cjs/navigation/models.js.map +1 -1
- package/build/cjs/schema/constants.js +2 -0
- package/build/cjs/schema/constants.js.map +1 -1
- package/build/cjs/schema/index.d.ts +256 -0
- package/build/cjs/schema/index.js +12 -6
- package/build/cjs/schema/index.js.map +1 -1
- package/build/cjs/sub-blocks/BackgroundCard/dynamic-form.d.ts +2 -0
- package/build/cjs/sub-blocks/BackgroundCard/dynamic-form.js +82 -0
- package/build/cjs/sub-blocks/BackgroundCard/dynamic-form.js.map +1 -0
- package/build/cjs/sub-blocks/BackgroundCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/BackgroundCard/index.js +22 -0
- package/build/cjs/sub-blocks/BackgroundCard/index.js.map +1 -0
- package/build/cjs/sub-blocks/BannerCard/BannerCard.js +2 -1
- package/build/cjs/sub-blocks/BannerCard/BannerCard.js.map +1 -1
- package/build/cjs/sub-blocks/BannerCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/BannerCard/index.js +24 -0
- package/build/cjs/sub-blocks/BannerCard/index.js.map +1 -0
- package/build/cjs/sub-blocks/BasicCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/BasicCard/index.js +20 -0
- package/build/cjs/sub-blocks/BasicCard/index.js.map +1 -0
- package/build/cjs/sub-blocks/Content/index.d.ts +3 -0
- package/build/cjs/sub-blocks/Content/index.js +20 -0
- package/build/cjs/sub-blocks/Content/index.js.map +1 -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/Content/schema.js.map +1 -1
- package/build/cjs/sub-blocks/Divider/index.d.ts +3 -0
- package/build/cjs/sub-blocks/Divider/index.js +16 -0
- package/build/cjs/sub-blocks/Divider/index.js.map +1 -0
- package/build/cjs/sub-blocks/ImageCard/ImageCard.js +1 -1
- package/build/cjs/sub-blocks/ImageCard/ImageCard.js.map +1 -1
- package/build/cjs/sub-blocks/ImageCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/ImageCard/index.js +20 -0
- package/build/cjs/sub-blocks/ImageCard/index.js.map +1 -0
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +1 -1
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js.map +1 -1
- package/build/cjs/sub-blocks/LayoutItem/index.d.ts +3 -0
- package/build/cjs/sub-blocks/LayoutItem/index.js +26 -0
- package/build/cjs/sub-blocks/LayoutItem/index.js.map +1 -0
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +211 -206
- package/build/cjs/sub-blocks/LayoutItem/schema.js +6 -5
- package/build/cjs/sub-blocks/LayoutItem/schema.js.map +1 -1
- package/build/cjs/sub-blocks/MediaCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/MediaCard/index.js +23 -0
- package/build/cjs/sub-blocks/MediaCard/index.js.map +1 -0
- package/build/cjs/sub-blocks/PriceCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/PriceCard/index.js +33 -0
- package/build/cjs/sub-blocks/PriceCard/index.js.map +1 -0
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetailed.js +1 -1
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetailed.js.map +1 -1
- package/build/cjs/sub-blocks/PriceDetailed/index.d.ts +4 -0
- package/build/cjs/sub-blocks/PriceDetailed/index.js +35 -0
- package/build/cjs/sub-blocks/PriceDetailed/index.js.map +1 -0
- package/build/cjs/sub-blocks/Quote/index.d.ts +3 -0
- package/build/cjs/sub-blocks/Quote/index.js +23 -0
- package/build/cjs/sub-blocks/Quote/index.js.map +1 -0
- package/build/cjs/utils/editor.d.ts +2 -0
- package/build/cjs/utils/editor.js +25 -0
- package/build/cjs/utils/editor.js.map +1 -0
- package/build/cjs/utils/form-generator.d.ts +9 -0
- package/build/cjs/utils/form-generator.js +131 -0
- package/build/cjs/utils/form-generator.js.map +1 -0
- package/build/cjs/utils/index.d.ts +1 -0
- package/build/cjs/utils/index.js +1 -0
- package/build/cjs/utils/index.js.map +1 -1
- package/build/cjs/utils/navigation.d.ts +3 -0
- package/build/cjs/utils/navigation.js +14 -0
- package/build/cjs/utils/navigation.js.map +1 -0
- package/build/esm/blocks/Banner/Banner.js +2 -1
- package/build/esm/blocks/Banner/Banner.js.map +1 -1
- package/build/esm/blocks/Banner/index.d.ts +3 -0
- package/build/esm/blocks/Banner/index.js +21 -0
- package/build/esm/blocks/Banner/index.js.map +1 -0
- package/build/esm/blocks/CardLayout/CardLayout.css +1 -0
- package/build/esm/blocks/CardLayout/CardLayout.js +5 -4
- package/build/esm/blocks/CardLayout/CardLayout.js.map +1 -1
- package/build/esm/blocks/CardLayout/index.d.ts +5 -0
- package/build/esm/blocks/CardLayout/index.js +182 -0
- package/build/esm/blocks/CardLayout/index.js.map +1 -0
- package/build/esm/blocks/Companies/Companies.js +2 -1
- package/build/esm/blocks/Companies/Companies.js.map +1 -1
- package/build/esm/blocks/Companies/index.d.ts +3 -0
- package/build/esm/blocks/Companies/index.js +17 -0
- package/build/esm/blocks/Companies/index.js.map +1 -0
- package/build/esm/blocks/ContentLayout/ContentLayout.js +2 -2
- package/build/esm/blocks/ContentLayout/ContentLayout.js.map +1 -1
- package/build/esm/blocks/ContentLayout/index.d.ts +41 -0
- package/build/esm/blocks/ContentLayout/index.js +78 -0
- package/build/esm/blocks/ContentLayout/index.js.map +1 -0
- package/build/esm/blocks/ContentLayout/schema.d.ts +1 -0
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +14 -13
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js.map +1 -1
- package/build/esm/blocks/ExtendedFeatures/index.d.ts +58 -0
- package/build/esm/blocks/ExtendedFeatures/index.js +74 -0
- package/build/esm/blocks/ExtendedFeatures/index.js.map +1 -0
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +1 -0
- package/build/esm/blocks/ExtendedFeatures/schema.js +1 -0
- package/build/esm/blocks/ExtendedFeatures/schema.js.map +1 -1
- package/build/esm/blocks/FilterBlock/FilterBlock.js +6 -6
- package/build/esm/blocks/FilterBlock/FilterBlock.js.map +1 -1
- package/build/esm/blocks/FilterBlock/index.d.ts +29 -0
- package/build/esm/blocks/FilterBlock/index.js +95 -0
- package/build/esm/blocks/FilterBlock/index.js.map +1 -0
- package/build/esm/blocks/Form/index.d.ts +13 -0
- package/build/esm/blocks/Form/index.js +17 -0
- package/build/esm/blocks/Form/index.js.map +1 -0
- package/build/esm/blocks/Header/dynamic-form.d.ts +2 -0
- package/build/esm/blocks/Header/dynamic-form.js +728 -0
- package/build/esm/blocks/Header/dynamic-form.js.map +1 -0
- package/build/esm/blocks/Header/index.d.ts +20 -0
- package/build/esm/blocks/Header/index.js +31 -0
- package/build/esm/blocks/Header/index.js.map +1 -0
- package/build/esm/blocks/HeaderSlider/HeaderSlider.js +2 -1
- package/build/esm/blocks/HeaderSlider/HeaderSlider.js.map +1 -1
- package/build/esm/blocks/HeaderSlider/index.d.ts +32 -0
- package/build/esm/blocks/HeaderSlider/index.js +37 -0
- package/build/esm/blocks/HeaderSlider/index.js.map +1 -0
- package/build/esm/blocks/Icons/Icons.js +8 -6
- package/build/esm/blocks/Icons/Icons.js.map +1 -1
- package/build/esm/blocks/Icons/index.d.ts +20 -0
- package/build/esm/blocks/Icons/index.js +61 -0
- package/build/esm/blocks/Icons/index.js.map +1 -0
- package/build/esm/blocks/Info/index.d.ts +22 -0
- package/build/esm/blocks/Info/index.js +40 -0
- package/build/esm/blocks/Info/index.js.map +1 -0
- package/build/esm/blocks/Map/index.d.ts +12 -0
- package/build/esm/blocks/Map/index.js +16 -0
- package/build/esm/blocks/Map/index.js.map +1 -0
- package/build/esm/blocks/Media/index.d.ts +39 -0
- package/build/esm/blocks/Media/index.js +54 -0
- package/build/esm/blocks/Media/index.js.map +1 -0
- package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +15 -13
- package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js.map +1 -1
- package/build/esm/blocks/PromoFeaturesBlock/index.d.ts +22 -0
- package/build/esm/blocks/PromoFeaturesBlock/index.js +46 -0
- package/build/esm/blocks/PromoFeaturesBlock/index.js.map +1 -0
- package/build/esm/blocks/Questions/Questions.js +7 -6
- package/build/esm/blocks/Questions/Questions.js.map +1 -1
- package/build/esm/blocks/Questions/index.d.ts +30 -0
- package/build/esm/blocks/Questions/index.js +46 -0
- package/build/esm/blocks/Questions/index.js.map +1 -0
- package/build/esm/blocks/Share/Share.js +11 -10
- package/build/esm/blocks/Share/Share.js.map +1 -1
- package/build/esm/blocks/Share/index.d.ts +13 -0
- package/build/esm/blocks/Share/index.js +17 -0
- package/build/esm/blocks/Share/index.js.map +1 -0
- package/build/esm/blocks/Slider/Slider.js +12 -10
- package/build/esm/blocks/Slider/Slider.js.map +1 -1
- package/build/esm/blocks/Slider/dynamic-form.d.ts +3 -0
- package/build/esm/blocks/Slider/dynamic-form.js +223 -0
- package/build/esm/blocks/Slider/dynamic-form.js.map +1 -0
- package/build/esm/blocks/Slider/index.d.ts +28 -0
- package/build/esm/blocks/Slider/index.js +44 -0
- package/build/esm/blocks/Slider/index.js.map +1 -0
- package/build/esm/blocks/Table/index.d.ts +18 -0
- package/build/esm/blocks/Table/index.js +29 -0
- package/build/esm/blocks/Table/index.js.map +1 -0
- package/build/esm/blocks/Table/schema.d.ts +1 -0
- package/build/esm/blocks/Table/schema.js +1 -0
- package/build/esm/blocks/Table/schema.js.map +1 -1
- package/build/esm/blocks/Tabs/Tabs.js +5 -5
- package/build/esm/blocks/Tabs/Tabs.js.map +1 -1
- package/build/esm/blocks/Tabs/index.d.ts +17 -0
- package/build/esm/blocks/Tabs/index.js +28 -0
- package/build/esm/blocks/Tabs/index.js.map +1 -0
- package/build/esm/blocks/TestEditorBlock/TestEditorBlock.d.ts +5 -0
- package/build/esm/blocks/TestEditorBlock/TestEditorBlock.js +8 -0
- package/build/esm/blocks/TestEditorBlock/TestEditorBlock.js.map +1 -0
- package/build/esm/blocks/TestEditorBlock/form.d.ts +3 -0
- package/build/esm/blocks/TestEditorBlock/form.js +89 -0
- package/build/esm/blocks/TestEditorBlock/form.js.map +1 -0
- package/build/esm/blocks/TestEditorBlock/index.d.ts +11 -0
- package/build/esm/blocks/TestEditorBlock/index.js +14 -0
- package/build/esm/blocks/TestEditorBlock/index.js.map +1 -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 +81 -0
- package/build/esm/components/Image/dynamic-form.js.map +1 -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 +11 -0
- package/build/esm/components/editor/ItemWrap/ItemWrap.js.map +1 -0
- package/build/esm/constructor-items.d.ts +22 -6
- package/build/esm/constructor-items.js +75 -1
- package/build/esm/constructor-items.js.map +1 -1
- package/build/esm/containers/PageConstructor/PageConstructor.d.ts +1 -1
- package/build/esm/containers/PageConstructor/PageConstructor.js +20 -12
- package/build/esm/containers/PageConstructor/PageConstructor.js.map +1 -1
- package/build/esm/containers/PageConstructor/Provider.js +2 -0
- package/build/esm/containers/PageConstructor/Provider.js.map +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +10 -6
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +3 -1
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js.map +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +7 -6
- package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js.map +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +2 -1
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js.map +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorLoadable/ConstructorLoadable.js +2 -1
- package/build/esm/containers/PageConstructor/components/ConstructorLoadable/ConstructorLoadable.js.map +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorRow/ConstructorRow.js +1 -2
- package/build/esm/containers/PageConstructor/components/ConstructorRow/ConstructorRow.js.map +1 -1
- package/build/esm/context/blockIdContext/blockIdContext.d.ts +2 -2
- package/build/esm/context/blockIdContext/blockIdContext.js +1 -1
- package/build/esm/context/blockIdContext/blockIdContext.js.map +1 -1
- package/build/esm/context/editorStoreContext/PCEditorStoreContext.d.ts +7 -0
- package/build/esm/context/editorStoreContext/PCEditorStoreContext.js +6 -0
- package/build/esm/context/editorStoreContext/PCEditorStoreContext.js.map +1 -0
- package/build/esm/context/editorStoreContext/PCEditorStoreProvider.d.ts +5 -0
- package/build/esm/context/editorStoreContext/PCEditorStoreProvider.js +29 -0
- package/build/esm/context/editorStoreContext/PCEditorStoreProvider.js.map +1 -0
- package/build/esm/context/editorStoreContext/index.d.ts +2 -0
- package/build/esm/context/editorStoreContext/index.js +3 -0
- package/build/esm/context/editorStoreContext/index.js.map +1 -0
- package/build/esm/editor/components/CodeEditor/CodeEditor.d.ts +1 -2
- package/build/esm/editor/components/CodeEditor/CodeEditor.js +4 -6
- package/build/esm/editor/components/CodeEditor/CodeEditor.js.map +1 -1
- package/build/esm/editor/data/templates/test-editor-block.json +18 -0
- package/build/esm/grid/Grid/Grid.css +2 -6
- package/build/esm/hooks/useAnalytics.js +1 -1
- package/build/esm/hooks/useAnalytics.js.map +1 -1
- package/build/esm/hooks/usePCEditorBlockMouseEvents.d.ts +8 -0
- package/build/esm/hooks/usePCEditorBlockMouseEvents.js +47 -0
- package/build/esm/hooks/usePCEditorBlockMouseEvents.js.map +1 -0
- package/build/esm/hooks/usePCEditorBlockSelection.d.ts +2 -0
- package/build/esm/hooks/usePCEditorBlockSelection.js +27 -0
- package/build/esm/hooks/usePCEditorBlockSelection.js.map +1 -0
- package/build/esm/hooks/usePCEditorInitializeEvents.d.ts +7 -0
- package/build/esm/hooks/usePCEditorInitializeEvents.js +58 -0
- package/build/esm/hooks/usePCEditorInitializeEvents.js.map +1 -0
- package/build/esm/hooks/usePCEditorItemWrap.d.ts +10 -0
- package/build/esm/hooks/usePCEditorItemWrap.js +17 -0
- package/build/esm/hooks/usePCEditorItemWrap.js.map +1 -0
- package/build/esm/hooks/usePCEditorStore.d.ts +1 -0
- package/build/esm/hooks/usePCEditorStore.js +8 -0
- package/build/esm/hooks/usePCEditorStore.js.map +1 -0
- package/build/esm/hooks/usePostMessageAPI.d.ts +4 -0
- package/build/esm/hooks/usePostMessageAPI.js +24 -0
- package/build/esm/hooks/usePostMessageAPI.js.map +1 -0
- package/build/esm/models/constructor-items/blocks.d.ts +1 -0
- package/build/esm/models/constructor-items/blocks.js +1 -0
- package/build/esm/models/constructor-items/blocks.js.map +1 -1
- package/build/esm/models/constructor.d.ts +4 -1
- package/build/esm/models/constructor.js.map +1 -1
- package/build/esm/models/navigation.d.ts +2 -2
- package/build/esm/models/navigation.js.map +1 -1
- package/build/esm/navigation/components/DesktopNavigation/DesktopNavigation.js +2 -2
- package/build/esm/navigation/components/DesktopNavigation/DesktopNavigation.js.map +1 -1
- package/build/esm/navigation/components/Navigation/Navigation.d.ts +2 -2
- package/build/esm/navigation/components/Navigation/Navigation.js +1 -1
- package/build/esm/navigation/components/Navigation/Navigation.js.map +1 -1
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js +4 -1
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js.map +1 -1
- package/build/esm/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.js +4 -1
- package/build/esm/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.js.map +1 -1
- package/build/esm/navigation/components/NavigationPopup/NavigationPopup.css +2 -0
- package/build/esm/navigation/components/NavigationPopup/NavigationPopup.js +13 -5
- package/build/esm/navigation/components/NavigationPopup/NavigationPopup.js.map +1 -1
- package/build/esm/navigation/containers/Layout/Layout.css +0 -1
- package/build/esm/navigation/containers/Layout/Layout.js +2 -1
- package/build/esm/navigation/containers/Layout/Layout.js.map +1 -1
- package/build/esm/navigation/models.d.ts +1 -1
- package/build/esm/navigation/models.js.map +1 -1
- package/build/esm/schema/constants.js +2 -0
- package/build/esm/schema/constants.js.map +1 -1
- package/build/esm/schema/index.d.ts +256 -0
- package/build/esm/schema/index.js +11 -5
- package/build/esm/schema/index.js.map +1 -1
- package/build/esm/sub-blocks/BackgroundCard/dynamic-form.d.ts +2 -0
- package/build/esm/sub-blocks/BackgroundCard/dynamic-form.js +79 -0
- package/build/esm/sub-blocks/BackgroundCard/dynamic-form.js.map +1 -0
- package/build/esm/sub-blocks/BackgroundCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/BackgroundCard/index.js +19 -0
- package/build/esm/sub-blocks/BackgroundCard/index.js.map +1 -0
- package/build/esm/sub-blocks/BannerCard/BannerCard.js +2 -1
- package/build/esm/sub-blocks/BannerCard/BannerCard.js.map +1 -1
- package/build/esm/sub-blocks/BannerCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/BannerCard/index.js +21 -0
- package/build/esm/sub-blocks/BannerCard/index.js.map +1 -0
- package/build/esm/sub-blocks/BasicCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/BasicCard/index.js +17 -0
- package/build/esm/sub-blocks/BasicCard/index.js.map +1 -0
- package/build/esm/sub-blocks/Content/index.d.ts +3 -0
- package/build/esm/sub-blocks/Content/index.js +17 -0
- package/build/esm/sub-blocks/Content/index.js.map +1 -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/Content/schema.js.map +1 -1
- package/build/esm/sub-blocks/Divider/index.d.ts +3 -0
- package/build/esm/sub-blocks/Divider/index.js +13 -0
- package/build/esm/sub-blocks/Divider/index.js.map +1 -0
- package/build/esm/sub-blocks/ImageCard/ImageCard.js +1 -1
- package/build/esm/sub-blocks/ImageCard/ImageCard.js.map +1 -1
- package/build/esm/sub-blocks/ImageCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/ImageCard/index.js +17 -0
- package/build/esm/sub-blocks/ImageCard/index.js.map +1 -0
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +1 -1
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.js.map +1 -1
- package/build/esm/sub-blocks/LayoutItem/index.d.ts +3 -0
- package/build/esm/sub-blocks/LayoutItem/index.js +23 -0
- package/build/esm/sub-blocks/LayoutItem/index.js.map +1 -0
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +211 -206
- package/build/esm/sub-blocks/LayoutItem/schema.js +3 -2
- package/build/esm/sub-blocks/LayoutItem/schema.js.map +1 -1
- package/build/esm/sub-blocks/MediaCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/MediaCard/index.js +20 -0
- package/build/esm/sub-blocks/MediaCard/index.js.map +1 -0
- package/build/esm/sub-blocks/PriceCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/PriceCard/index.js +30 -0
- package/build/esm/sub-blocks/PriceCard/index.js.map +1 -0
- package/build/esm/sub-blocks/PriceDetailed/PriceDetailed.js +1 -1
- package/build/esm/sub-blocks/PriceDetailed/PriceDetailed.js.map +1 -1
- package/build/esm/sub-blocks/PriceDetailed/index.d.ts +4 -0
- package/build/esm/sub-blocks/PriceDetailed/index.js +32 -0
- package/build/esm/sub-blocks/PriceDetailed/index.js.map +1 -0
- package/build/esm/sub-blocks/Quote/index.d.ts +3 -0
- package/build/esm/sub-blocks/Quote/index.js +20 -0
- package/build/esm/sub-blocks/Quote/index.js.map +1 -0
- package/build/esm/utils/editor.d.ts +2 -0
- package/build/esm/utils/editor.js +21 -0
- package/build/esm/utils/editor.js.map +1 -0
- package/build/esm/utils/form-generator.d.ts +9 -0
- package/build/esm/utils/form-generator.js +126 -0
- package/build/esm/utils/form-generator.js.map +1 -0
- package/build/esm/utils/index.d.ts +1 -0
- package/build/esm/utils/index.js +1 -0
- package/build/esm/utils/index.js.map +1 -1
- package/build/esm/utils/navigation.d.ts +3 -0
- package/build/esm/utils/navigation.js +9 -0
- package/build/esm/utils/navigation.js.map +1 -0
- package/package.json +15 -3
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +1 -0
- package/server/models/constructor-items/blocks.js +1 -0
- package/server/models/constructor.d.ts +4 -1
- package/server/models/navigation.d.ts +2 -2
- package/server/utils/index.d.ts +1 -0
- package/server/utils/index.js +1 -0
- package/server/utils/navigation.d.ts +3 -0
- package/server/utils/navigation.js +15 -0
- package/styles/mixins.scss +9 -9
package/README.md
CHANGED
|
@@ -438,7 +438,7 @@ If you want to release a new version in previous major after commit it to the ma
|
|
|
438
438
|
7. Check your changes in CHANGELOG.md and approve robot's PR.
|
|
439
439
|
8. Squash and merge PR. You can see release process on [the Actions tab](https://github.com/gravity-ui/page-constructor/actions).
|
|
440
440
|
|
|
441
|
-
## Page
|
|
441
|
+
## Page Constructor Editor v1
|
|
442
442
|
|
|
443
443
|
Editor provides user interface for page content management with realtime preview.
|
|
444
444
|
|
|
@@ -458,6 +458,36 @@ export const MyAppEditor = ({initialContent, onChange, transformContent}: MyAppE
|
|
|
458
458
|
);
|
|
459
459
|
```
|
|
460
460
|
|
|
461
|
+
## Page Constructor Editor v2
|
|
462
|
+
|
|
463
|
+
Editor provides user interface for page content management with realtime preview.
|
|
464
|
+
|
|
465
|
+
Based on Iframe postMessage communication.
|
|
466
|
+
|
|
467
|
+
How to use:
|
|
468
|
+
|
|
469
|
+
```tsx
|
|
470
|
+
import {Editor} from '@gravity-ui/page-constructor/editor-v2';
|
|
471
|
+
|
|
472
|
+
export const MyAppEditor = ({initialContent, onUpdate, disableUrlField}: MyAppEditorProps) => (
|
|
473
|
+
<Editor
|
|
474
|
+
initialUrl={'https://url-to-page-with-page-constructor.com'}
|
|
475
|
+
content={initialContent}
|
|
476
|
+
disableUrlField={disableUrlField}
|
|
477
|
+
onUpdate={onUpdate}
|
|
478
|
+
/>
|
|
479
|
+
);
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
### How to develop
|
|
483
|
+
|
|
484
|
+
```shell
|
|
485
|
+
npm run deps:install
|
|
486
|
+
npm run dev:playground
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
Directory `/playground` contains NextJS service with integrated PC and Editor for development purposes.
|
|
490
|
+
|
|
461
491
|
## Tests
|
|
462
492
|
|
|
463
493
|
Comprehensive documentation is available at the provided [link](./test-utils/docs/README.md).
|
|
@@ -4,12 +4,13 @@ exports.BannerBlock = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const AnimateBlock_1 = tslib_1.__importDefault(require("../../components/AnimateBlock/AnimateBlock.js"));
|
|
7
|
+
const grid_1 = require("../../grid/index.js");
|
|
7
8
|
const sub_blocks_1 = require("../../sub-blocks/index.js");
|
|
8
9
|
const utils_1 = require("../../utils/index.js");
|
|
9
10
|
const b = (0, utils_1.block)('banner-block');
|
|
10
11
|
const BannerBlock = (props) => {
|
|
11
12
|
const { animated, className, ...bannerProps } = props;
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(AnimateBlock_1.default, { className: b(null, className), animate: animated, children: (0, jsx_runtime_1.jsx)(sub_blocks_1.BannerCard, { ...bannerProps }) }));
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(AnimateBlock_1.default, { className: b(null, className), animate: animated, children: (0, jsx_runtime_1.jsx)(grid_1.Grid, { children: (0, jsx_runtime_1.jsx)(sub_blocks_1.BannerCard, { ...bannerProps }) }) }));
|
|
13
14
|
};
|
|
14
15
|
exports.BannerBlock = BannerBlock;
|
|
15
16
|
exports.default = exports.BannerBlock;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.js","sourceRoot":"../../../../src","sources":["blocks/Banner/Banner.tsx"],"names":[],"mappings":";;;;;AAAA,yGAAsE;
|
|
1
|
+
{"version":3,"file":"Banner.js","sourceRoot":"../../../../src","sources":["blocks/Banner/Banner.tsx"],"names":[],"mappings":";;;;;AAAA,yGAAsE;AACtE,8CAAgC;AAEhC,0DAA4C;AAC5C,gDAAkC;AAIlC,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,cAAc,CAAC,CAAC;AAEzB,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAE,EAAE;IACnD,MAAM,EAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,WAAW,EAAC,GAAG,KAAK,CAAC;IAEpD,OAAO,CACH,uBAAC,sBAAY,IAAC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,YAC1D,uBAAC,WAAI,cACD,uBAAC,uBAAU,OAAK,WAAW,GAAI,GAC5B,GACI,CAClB,CAAC;AACN,CAAC,CAAC;AAVW,QAAA,WAAW,eAUtB;AAEF,kBAAe,mBAAW,CAAC","sourcesContent":["import AnimateBlock from '../../components/AnimateBlock/AnimateBlock';\nimport {Grid} from '../../grid';\nimport {BannerBlockProps} from '../../models';\nimport {BannerCard} from '../../sub-blocks';\nimport {block} from '../../utils';\n\nimport './Banner.scss';\n\nconst b = block('banner-block');\n\nexport const BannerBlock = (props: BannerBlockProps) => {\n const {animated, className, ...bannerProps} = props;\n\n return (\n <AnimateBlock className={b(null, className)} animate={animated}>\n <Grid>\n <BannerCard {...bannerProps} />\n </Grid>\n </AnimateBlock>\n );\n};\n\nexport default BannerBlock;\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const form_generator_1 = require("../../utils/form-generator.js");
|
|
5
|
+
const Banner_1 = tslib_1.__importDefault(require("./Banner.js"));
|
|
6
|
+
const schema_1 = require("./schema.js");
|
|
7
|
+
const BannerBlockConfig = {
|
|
8
|
+
component: Banner_1.default,
|
|
9
|
+
schema: {
|
|
10
|
+
name: 'Banner Block',
|
|
11
|
+
group: 'block',
|
|
12
|
+
inputs: (0, form_generator_1.generateFromAJV)(schema_1.BannerCardProps),
|
|
13
|
+
default: {
|
|
14
|
+
color: 'rgba(54, 151, 241, 0.4)',
|
|
15
|
+
title: 'Banner Block',
|
|
16
|
+
subtitle: 'Some sort of description.',
|
|
17
|
+
button: {
|
|
18
|
+
text: 'Read more',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
exports.default = BannerBlockConfig;
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../../src","sources":["blocks/Banner/index.tsx"],"names":[],"mappings":";;;AAGA,kEAA2D;AAE3D,iEAAmC;AACnC,wCAAyC;AAEzC,MAAM,iBAAiB,GAAc;IACjC,SAAS,EAAE,gBAAW;IACtB,MAAM,EAAE;QACJ,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAA,gCAAe,EAAC,wBAAgD,CAAC;QACzE,OAAO,EAAE;YACL,KAAK,EAAE,yBAAyB;YAChC,KAAK,EAAE,cAAc;YACrB,QAAQ,EAAE,2BAA2B;YACrC,MAAM,EAAE;gBACJ,IAAI,EAAE,WAAW;aACpB;SACJ;KACJ;CACJ,CAAC;AAEF,kBAAe,iBAAiB,CAAC","sourcesContent":["import {JSONSchemaType} from 'ajv';\n\nimport {BlockData} from '../../constructor-items';\nimport {generateFromAJV} from '../../utils/form-generator';\n\nimport BannerBlock from './Banner';\nimport {BannerCardProps} from './schema';\n\nconst BannerBlockConfig: BlockData = {\n component: BannerBlock,\n schema: {\n name: 'Banner Block',\n group: 'block',\n inputs: generateFromAJV(BannerCardProps as unknown as JSONSchemaType<{}>),\n default: {\n color: 'rgba(54, 151, 241, 0.4)',\n title: 'Banner Block',\n subtitle: 'Some sort of description.',\n button: {\n text: 'Read more',\n },\n },\n },\n};\n\nexport default BannerBlockConfig;\n"]}
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const isEmpty_1 = tslib_1.__importDefault(require("lodash/isEmpty.js"));
|
|
7
7
|
const components_1 = require("../../components/index.js");
|
|
8
|
+
const ItemWrap_1 = tslib_1.__importDefault(require("../../components/editor/ItemWrap/ItemWrap.js"));
|
|
8
9
|
const theme_1 = require("../../context/theme/index.js");
|
|
9
10
|
const grid_1 = require("../../grid/index.js");
|
|
10
11
|
const utils_1 = require("../../utils/index.js");
|
|
@@ -17,9 +18,9 @@ const b = (0, utils_1.block)('card-layout-block');
|
|
|
17
18
|
const CardLayout = ({ title, description, animated, colSizes = DEFAULT_SIZES, children, className, titleClassName, background, }) => {
|
|
18
19
|
const theme = (0, theme_1.useTheme)();
|
|
19
20
|
const { border, ...backgroundImageProps } = (0, utils_1.getThemedValue)(background || {}, theme);
|
|
20
|
-
return ((0, jsx_runtime_1.
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(components_1.AnimateBlock, { className: b(null, className), animate: animated, children: (0, jsx_runtime_1.jsxs)(grid_1.Grid, { children: [(title || description) && ((0, jsx_runtime_1.jsx)(components_1.Title, { title: title, subtitle: description, className: titleClassName })), (0, jsx_runtime_1.jsxs)("div", { className: b('content', {
|
|
22
|
+
'with-background': !(0, isEmpty_1.default)(background),
|
|
23
|
+
}), children: [(0, jsx_runtime_1.jsx)(components_1.BackgroundImage, { className: b('image', { border }), ...backgroundImageProps }), (0, jsx_runtime_1.jsx)(grid_1.Row, { children: React.Children.map(children, (child, index) => ((0, jsx_runtime_1.jsx)(grid_1.Col, { sizes: colSizes, className: b('item'), children: (0, jsx_runtime_1.jsx)(ItemWrap_1.default, { index: index, children: child }) }, index))) })] })] }) }));
|
|
23
24
|
};
|
|
24
25
|
exports.default = CardLayout;
|
|
25
26
|
//# sourceMappingURL=CardLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardLayout.js","sourceRoot":"../../../../src","sources":["blocks/CardLayout/CardLayout.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,wEAAqC;AAErC,0DAAsE;AACtE,wDAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"CardLayout.js","sourceRoot":"../../../../src","sources":["blocks/CardLayout/CardLayout.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,wEAAqC;AAErC,0DAAsE;AACtE,oGAAiE;AACjE,wDAA6C;AAC7C,8CAA+D;AAE/D,gDAAkD;AAIlD,MAAM,aAAa,GAAwB;IACvC,GAAG,EAAE,EAAE;IACP,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;CACR,CAAC;AAMF,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,mBAAmB,CAAC,CAAC;AAErC,MAAM,UAAU,GAAmC,CAAC,EAChD,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,GAAG,aAAa,EACxB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,UAAU,GACb,EAAE,EAAE;IACD,MAAM,KAAK,GAAG,IAAA,gBAAQ,GAAE,CAAC;IACzB,MAAM,EAAC,MAAM,EAAE,GAAG,oBAAoB,EAAC,GAAG,IAAA,sBAAc,EAAC,UAAU,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;IAClF,OAAO,CACH,uBAAC,yBAAY,IAAC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,YAC1D,wBAAC,WAAI,eACA,CAAC,KAAK,IAAI,WAAW,CAAC,IAAI,CACvB,uBAAC,kBAAK,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,GAAI,CAC5E,EACD,iCACI,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE;wBACpB,iBAAiB,EAAE,CAAC,IAAA,iBAAO,EAAC,UAAU,CAAC;qBAC1C,CAAC,aAEF,uBAAC,4BAAe,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,MAAM,EAAC,CAAC,KAAM,oBAAoB,GAAI,EAE9E,uBAAC,UAAG,cACC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5C,uBAAC,UAAG,IAAa,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,YAClD,uBAAC,kBAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,KAAK,GAAY,IADpC,KAAK,CAET,CACT,CAAC,GACA,IACJ,IACH,GACI,CAClB,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC","sourcesContent":["import * as React from 'react';\nimport isEmpty from 'lodash/isEmpty';\n\nimport {AnimateBlock, BackgroundImage, Title} from '../../components';\nimport ItemWrap from '../../components/editor/ItemWrap/ItemWrap';\nimport {useTheme} from '../../context/theme';\nimport {Col, Grid, GridColumnSizesType, Row} from '../../grid';\nimport {CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps} from '../../models';\nimport {block, getThemedValue} from '../../utils';\n\nimport './CardLayout.scss';\n\nconst DEFAULT_SIZES: GridColumnSizesType = {\n all: 12,\n sm: 6,\n md: 4,\n};\nexport type CardLayoutBlockProps = React.PropsWithChildren<\n Omit<CardLayoutBlockParams, 'children'>\n> &\n ClassNameProps;\n\nconst b = block('card-layout-block');\n\nconst CardLayout: React.FC<CardLayoutBlockProps> = ({\n title,\n description,\n animated,\n colSizes = DEFAULT_SIZES,\n children,\n className,\n titleClassName,\n background,\n}) => {\n const theme = useTheme();\n const {border, ...backgroundImageProps} = getThemedValue(background || {}, theme);\n return (\n <AnimateBlock className={b(null, className)} animate={animated}>\n <Grid>\n {(title || description) && (\n <Title title={title} subtitle={description} className={titleClassName} />\n )}\n <div\n className={b('content', {\n 'with-background': !isEmpty(background),\n })}\n >\n <BackgroundImage className={b('image', {border})} {...backgroundImageProps} />\n\n <Row>\n {React.Children.map(children, (child, index) => (\n <Col key={index} sizes={colSizes} className={b('item')}>\n <ItemWrap index={index}>{child}</ItemWrap>\n </Col>\n ))}\n </Row>\n </div>\n </Grid>\n </AnimateBlock>\n );\n};\n\nexport default CardLayout;\n"]}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.blockConfig = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("../../schema/validators/common.js");
|
|
6
|
+
const form_generator_1 = require("../../utils/form-generator.js");
|
|
7
|
+
const CardLayout_1 = tslib_1.__importDefault(require("./CardLayout.js"));
|
|
8
|
+
const schema_1 = require("./schema.js");
|
|
9
|
+
const textSizeEnum = common_1.textSize.map((size) => ({ value: size, content: size }));
|
|
10
|
+
exports.blockConfig = [
|
|
11
|
+
{
|
|
12
|
+
type: 'oneOf',
|
|
13
|
+
name: 'title',
|
|
14
|
+
title: 'Title Object',
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
title: 'Simple',
|
|
18
|
+
value: 'simple',
|
|
19
|
+
properties: [
|
|
20
|
+
{
|
|
21
|
+
type: 'text',
|
|
22
|
+
name: '',
|
|
23
|
+
title: 'Title',
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
title: 'Complex',
|
|
29
|
+
value: 'complex',
|
|
30
|
+
properties: [
|
|
31
|
+
{
|
|
32
|
+
type: 'text',
|
|
33
|
+
name: 'text',
|
|
34
|
+
title: 'Title',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
type: 'select',
|
|
38
|
+
name: 'textSize',
|
|
39
|
+
title: 'Text Size',
|
|
40
|
+
enum: textSizeEnum,
|
|
41
|
+
view: 'select',
|
|
42
|
+
mode: 'single',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: 'text',
|
|
46
|
+
name: 'url',
|
|
47
|
+
title: 'Url',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: 'text',
|
|
51
|
+
name: 'urlTitle',
|
|
52
|
+
title: 'Url',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
type: 'boolean',
|
|
56
|
+
name: 'resetMargin',
|
|
57
|
+
title: 'Reset Margin',
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
type: 'textarea',
|
|
65
|
+
name: 'description',
|
|
66
|
+
title: 'Description',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
type: 'boolean',
|
|
70
|
+
name: 'dots',
|
|
71
|
+
title: 'With dots',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
type: 'boolean',
|
|
75
|
+
name: 'arrows',
|
|
76
|
+
title: 'With Arrows',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: 'boolean',
|
|
80
|
+
name: 'randomOrder',
|
|
81
|
+
title: 'Random Order',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'number',
|
|
85
|
+
name: 'autoplay',
|
|
86
|
+
title: 'Autoplay',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
type: 'object',
|
|
90
|
+
name: 'disclaimer',
|
|
91
|
+
title: 'Disclaimer',
|
|
92
|
+
properties: [
|
|
93
|
+
{
|
|
94
|
+
type: 'text',
|
|
95
|
+
name: 'text',
|
|
96
|
+
title: 'Text',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
type: 'select',
|
|
100
|
+
name: 'size',
|
|
101
|
+
title: 'Size',
|
|
102
|
+
enum: textSizeEnum,
|
|
103
|
+
view: 'select',
|
|
104
|
+
mode: 'single',
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
type: 'oneOf',
|
|
110
|
+
name: 'slidesToShow',
|
|
111
|
+
title: 'Slides to Show',
|
|
112
|
+
options: [
|
|
113
|
+
{
|
|
114
|
+
title: 'Simple',
|
|
115
|
+
value: 'simple',
|
|
116
|
+
properties: [
|
|
117
|
+
{
|
|
118
|
+
type: 'number',
|
|
119
|
+
name: '',
|
|
120
|
+
title: 'Slides',
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
title: 'Complex',
|
|
126
|
+
value: 'complex',
|
|
127
|
+
properties: common_1.sliderSizesArray.reduce((acc, size) => {
|
|
128
|
+
acc.push({ type: 'number', name: size, title: size });
|
|
129
|
+
return acc;
|
|
130
|
+
}, []),
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
type: 'array',
|
|
136
|
+
name: 'array',
|
|
137
|
+
title: 'Array Properties',
|
|
138
|
+
buttonText: 'Add new',
|
|
139
|
+
arrayType: 'object',
|
|
140
|
+
properties: [
|
|
141
|
+
{
|
|
142
|
+
type: 'text',
|
|
143
|
+
name: 'text',
|
|
144
|
+
title: 'Property',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
type: 'boolean',
|
|
148
|
+
name: 'boolean',
|
|
149
|
+
title: 'Property',
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
];
|
|
154
|
+
const CardLayoutBlockConfig = {
|
|
155
|
+
component: CardLayout_1.default,
|
|
156
|
+
schema: {
|
|
157
|
+
name: 'Card Layout Block',
|
|
158
|
+
group: 'card-containers',
|
|
159
|
+
inputs: (0, form_generator_1.generateFromAJV)(schema_1.CardLayoutProps),
|
|
160
|
+
default: {
|
|
161
|
+
type: 'card-layout-block',
|
|
162
|
+
children: [
|
|
163
|
+
{
|
|
164
|
+
type: 'background-card',
|
|
165
|
+
title: 'Tell a story and build a narrative',
|
|
166
|
+
text: 'We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future.',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
type: 'background-card',
|
|
170
|
+
title: 'Tell a story and build a narrative',
|
|
171
|
+
text: 'We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future.',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
type: 'background-card',
|
|
175
|
+
title: 'Tell a story and build a narrative',
|
|
176
|
+
text: 'We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future.',
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
title: 'Card Layout Block',
|
|
180
|
+
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
181
|
+
},
|
|
182
|
+
previewImg: 'https://storage.cloud-preprod.yandex.net/qradle-test/card-layout-block.svg',
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
exports.default = CardLayoutBlockConfig;
|
|
186
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../../src","sources":["blocks/CardLayout/index.ts"],"names":[],"mappings":";;;;AAIA,8DAA0E;AAC1E,kEAA2D;AAE3D,yEAAsC;AACtC,wCAAyC;AAEzC,MAAM,YAAY,GAAG,iBAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;AAE/D,QAAA,WAAW,GAAkB;IACtC;QACI,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,cAAc;QACrB,OAAO,EAAE;YACL;gBACI,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,QAAQ;gBACf,UAAU,EAAE;oBACR;wBACI,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,EAAE;wBACR,KAAK,EAAE,OAAO;qBACjB;iBACJ;aACJ;YACD;gBACI,KAAK,EAAE,SAAS;gBAChB,KAAK,EAAE,SAAS;gBAChB,UAAU,EAAE;oBACR;wBACI,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,MAAM;wBACZ,KAAK,EAAE,OAAO;qBACjB;oBACD;wBACI,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,UAAU;wBAChB,KAAK,EAAE,WAAW;wBAClB,IAAI,EAAE,YAAY;wBAClB,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,QAAQ;qBACjB;oBACD;wBACI,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,KAAK;wBACX,KAAK,EAAE,KAAK;qBACf;oBACD;wBACI,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,UAAU;wBAChB,KAAK,EAAE,KAAK;qBACf;oBACD;wBACI,IAAI,EAAE,SAAS;wBACf,IAAI,EAAE,aAAa;wBACnB,KAAK,EAAE,cAAc;qBACxB;iBACJ;aACJ;SACJ;KACJ;IACD;QACI,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,aAAa;KACvB;IACD;QACI,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,WAAW;KACrB;IACD;QACI,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,aAAa;KACvB;IACD;QACI,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,cAAc;KACxB;IACD;QACI,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,UAAU;KACpB;IACD;QACI,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,YAAY;QACnB,UAAU,EAAE;YACR;gBACI,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;aAChB;YACD;gBACI,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;aACjB;SACJ;KACJ;IACD;QACI,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,gBAAgB;QACvB,OAAO,EAAE;YACL;gBACI,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,QAAQ;gBACf,UAAU,EAAE;oBACR;wBACI,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,EAAE;wBACR,KAAK,EAAE,QAAQ;qBAClB;iBACJ;aACJ;YACD;gBACI,KAAK,EAAE,SAAS;gBAChB,KAAK,EAAE,SAAS;gBAChB,UAAU,EAAE,yBAAgB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;oBAC9C,GAAG,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC;oBACpD,OAAO,GAAG,CAAC;gBACf,CAAC,EAAE,EAAwB,CAAC;aAC/B;SACJ;KACJ;IACD;QACI,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,kBAAkB;QACzB,UAAU,EAAE,SAAS;QACrB,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE;YACR;gBACI,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,UAAU;aACpB;YACD;gBACI,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,UAAU;aACpB;SACJ;KACJ;CACJ,CAAC;AAEF,MAAM,qBAAqB,GAAc;IACrC,SAAS,EAAE,oBAAU;IACrB,MAAM,EAAE;QACJ,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,iBAAiB;QACxB,MAAM,EAAE,IAAA,gCAAe,EAAC,wBAAgD,CAAC;QACzE,OAAO,EAAE;YACL,IAAI,EAAE,mBAAmB;YACzB,QAAQ,EAAE;gBACN;oBACI,IAAI,EAAE,iBAAiB;oBACvB,KAAK,EAAE,oCAAoC;oBAC3C,IAAI,EAAE,qOAAqO;iBAC9O;gBACD;oBACI,IAAI,EAAE,iBAAiB;oBACvB,KAAK,EAAE,oCAAoC;oBAC3C,IAAI,EAAE,qOAAqO;iBAC9O;gBACD;oBACI,IAAI,EAAE,iBAAiB;oBACvB,KAAK,EAAE,oCAAoC;oBAC3C,IAAI,EAAE,qOAAqO;iBAC9O;aACJ;YACD,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EACP,6HAA6H;SACpI;QACD,UAAU,EAAE,4EAA4E;KAC3F;CACJ,CAAC;AAEF,kBAAe,qBAAqB,CAAC","sourcesContent":["import {JSONSchemaType} from 'ajv';\n\nimport {ConfigInput} from '../../../common/types';\nimport {BlockData} from '../../constructor-items';\nimport {sliderSizesArray, textSize} from '../../schema/validators/common';\nimport {generateFromAJV} from '../../utils/form-generator';\n\nimport CardLayout from './CardLayout';\nimport {CardLayoutProps} from './schema';\n\nconst textSizeEnum = textSize.map((size) => ({value: size, content: size}));\n\nexport const blockConfig: ConfigInput[] = [\n {\n type: 'oneOf',\n name: 'title',\n title: 'Title Object',\n options: [\n {\n title: 'Simple',\n value: 'simple',\n properties: [\n {\n type: 'text',\n name: '',\n title: 'Title',\n },\n ],\n },\n {\n title: 'Complex',\n value: 'complex',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Title',\n },\n {\n type: 'select',\n name: 'textSize',\n title: 'Text Size',\n enum: textSizeEnum,\n view: 'select',\n mode: 'single',\n },\n {\n type: 'text',\n name: 'url',\n title: 'Url',\n },\n {\n type: 'text',\n name: 'urlTitle',\n title: 'Url',\n },\n {\n type: 'boolean',\n name: 'resetMargin',\n title: 'Reset Margin',\n },\n ],\n },\n ],\n },\n {\n type: 'textarea',\n name: 'description',\n title: 'Description',\n },\n {\n type: 'boolean',\n name: 'dots',\n title: 'With dots',\n },\n {\n type: 'boolean',\n name: 'arrows',\n title: 'With Arrows',\n },\n {\n type: 'boolean',\n name: 'randomOrder',\n title: 'Random Order',\n },\n {\n type: 'number',\n name: 'autoplay',\n title: 'Autoplay',\n },\n {\n type: 'object',\n name: 'disclaimer',\n title: 'Disclaimer',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Text',\n },\n {\n type: 'select',\n name: 'size',\n title: 'Size',\n enum: textSizeEnum,\n view: 'select',\n mode: 'single',\n },\n ],\n },\n {\n type: 'oneOf',\n name: 'slidesToShow',\n title: 'Slides to Show',\n options: [\n {\n title: 'Simple',\n value: 'simple',\n properties: [\n {\n type: 'number',\n name: '',\n title: 'Slides',\n },\n ],\n },\n {\n title: 'Complex',\n value: 'complex',\n properties: sliderSizesArray.reduce((acc, size) => {\n acc.push({type: 'number', name: size, title: size});\n return acc;\n }, [] as Array<ConfigInput>),\n },\n ],\n },\n {\n type: 'array',\n name: 'array',\n title: 'Array Properties',\n buttonText: 'Add new',\n arrayType: 'object',\n properties: [\n {\n type: 'text',\n name: 'text',\n title: 'Property',\n },\n {\n type: 'boolean',\n name: 'boolean',\n title: 'Property',\n },\n ],\n },\n];\n\nconst CardLayoutBlockConfig: BlockData = {\n component: CardLayout,\n schema: {\n name: 'Card Layout Block',\n group: 'card-containers',\n inputs: generateFromAJV(CardLayoutProps as unknown as JSONSchemaType<{}>),\n default: {\n type: 'card-layout-block',\n children: [\n {\n type: 'background-card',\n title: 'Tell a story and build a narrative',\n text: 'We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future.',\n },\n {\n type: 'background-card',\n title: 'Tell a story and build a narrative',\n text: 'We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future.',\n },\n {\n type: 'background-card',\n title: 'Tell a story and build a narrative',\n text: 'We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future.',\n },\n ],\n title: 'Card Layout Block',\n description:\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',\n },\n previewImg: 'https://storage.cloud-preprod.yandex.net/qradle-test/card-layout-block.svg',\n },\n};\n\nexport default CardLayoutBlockConfig;\n"]}
|
|
@@ -6,12 +6,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
6
6
|
const components_1 = require("../../components/index.js");
|
|
7
7
|
const AnimateBlock_1 = tslib_1.__importDefault(require("../../components/AnimateBlock/AnimateBlock.js"));
|
|
8
8
|
const theme_1 = require("../../context/theme/index.js");
|
|
9
|
+
const grid_1 = require("../../grid/index.js");
|
|
9
10
|
const utils_1 = require("../../utils/index.js");
|
|
10
11
|
const b = (0, utils_1.block)('companies-block');
|
|
11
12
|
const CompaniesBlock = ({ title, description, images, animated }) => {
|
|
12
13
|
const theme = (0, theme_1.useTheme)();
|
|
13
14
|
const themedImages = (0, utils_1.getThemedValue)(images, theme) || {};
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)(AnimateBlock_1.default, { className: b(), offset: 150, animate: animated, children: (0, jsx_runtime_1.jsxs)("div", { className: b('content'), children: [(0, jsx_runtime_1.jsx)(components_1.Title, { title: title, subtitle: description, colSizes: { all: 12, sm: 12 } }), (0, jsx_runtime_1.jsx)("div", { className: b('images'), children: (0, jsx_runtime_1.jsx)(components_1.Image, { ...themedImages, className: b('image') }) })] }) }));
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(AnimateBlock_1.default, { className: b(), offset: 150, animate: animated, children: (0, jsx_runtime_1.jsx)(grid_1.Grid, { children: (0, jsx_runtime_1.jsxs)("div", { className: b('content'), children: [(0, jsx_runtime_1.jsx)(components_1.Title, { title: title, subtitle: description, colSizes: { all: 12, sm: 12 } }), (0, jsx_runtime_1.jsx)("div", { className: b('images'), children: (0, jsx_runtime_1.jsx)(components_1.Image, { ...themedImages, className: b('image') }) })] }) }) }));
|
|
15
16
|
};
|
|
16
17
|
exports.CompaniesBlock = CompaniesBlock;
|
|
17
18
|
exports.default = exports.CompaniesBlock;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Companies.js","sourceRoot":"../../../../src","sources":["blocks/Companies/Companies.tsx"],"names":[],"mappings":";;;;;AAAA,0DAA8C;AAC9C,yGAAsE;AACtE,wDAA6C;
|
|
1
|
+
{"version":3,"file":"Companies.js","sourceRoot":"../../../../src","sources":["blocks/Companies/Companies.tsx"],"names":[],"mappings":";;;;;AAAA,0DAA8C;AAC9C,yGAAsE;AACtE,wDAA6C;AAC7C,8CAAgC;AAEhC,gDAAkD;AAIlD,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,iBAAiB,CAAC,CAAC;AAE5B,MAAM,cAAc,GAAG,CAAC,EAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAsB,EAAE,EAAE;IAC1F,MAAM,KAAK,GAAG,IAAA,gBAAQ,GAAE,CAAC;IACzB,MAAM,YAAY,GAAG,IAAA,sBAAc,EAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;IAEzD,OAAO,CACH,uBAAC,sBAAY,IAAC,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,YACxD,uBAAC,WAAI,cACD,iCAAK,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,aACxB,uBAAC,kBAAK,IACF,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,WAAW,EACrB,QAAQ,EAAE,EAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAC,GACtB,EACT,gCAAK,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,YACvB,uBAAC,kBAAK,OAAK,YAAY,EAAE,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,GAAI,GAChD,IACJ,GACH,GACI,CAClB,CAAC;AACN,CAAC,CAAC;AApBW,QAAA,cAAc,kBAoBzB;AAEF,kBAAe,sBAAc,CAAC","sourcesContent":["import {Image, Title} from '../../components';\nimport AnimateBlock from '../../components/AnimateBlock/AnimateBlock';\nimport {useTheme} from '../../context/theme';\nimport {Grid} from '../../grid';\nimport {CompaniesBlockProps} from '../../models';\nimport {block, getThemedValue} from '../../utils';\n\nimport './Companies.scss';\n\nconst b = block('companies-block');\n\nexport const CompaniesBlock = ({title, description, images, animated}: CompaniesBlockProps) => {\n const theme = useTheme();\n const themedImages = getThemedValue(images, theme) || {};\n\n return (\n <AnimateBlock className={b()} offset={150} animate={animated}>\n <Grid>\n <div className={b('content')}>\n <Title\n title={title}\n subtitle={description}\n colSizes={{all: 12, sm: 12}}\n ></Title>\n <div className={b('images')}>\n <Image {...themedImages} className={b('image')} />\n </div>\n </div>\n </Grid>\n </AnimateBlock>\n );\n};\n\nexport default CompaniesBlock;\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const form_generator_1 = require("../../utils/form-generator.js");
|
|
5
|
+
const Companies_1 = tslib_1.__importDefault(require("./Companies.js"));
|
|
6
|
+
const schema_1 = require("./schema.js");
|
|
7
|
+
const CompaniesBlockConfig = {
|
|
8
|
+
component: Companies_1.default,
|
|
9
|
+
schema: {
|
|
10
|
+
name: 'Companies Block',
|
|
11
|
+
group: 'block',
|
|
12
|
+
inputs: (0, form_generator_1.generateFromAJV)(schema_1.CompaniesBlock['companies-block']),
|
|
13
|
+
default: {
|
|
14
|
+
title: 'Companies Block',
|
|
15
|
+
description: 'Here is the list',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
exports.default = CompaniesBlockConfig;
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../../src","sources":["blocks/Companies/index.ts"],"names":[],"mappings":";;;AAGA,kEAA2D;AAE3D,uEAAyC;AACzC,wCAAgE;AAEhE,MAAM,oBAAoB,GAAc;IACpC,SAAS,EAAE,mBAAc;IACzB,MAAM,EAAE;QACJ,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAA,gCAAe,EACnB,uBAAoB,CAAC,iBAAiB,CAAkC,CAC3E;QACD,OAAO,EAAE;YACL,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,kBAAkB;SAClC;KACJ;CACJ,CAAC;AAEF,kBAAe,oBAAoB,CAAC","sourcesContent":["import {JSONSchemaType} from 'ajv';\n\nimport {BlockData} from '../../constructor-items';\nimport {generateFromAJV} from '../../utils/form-generator';\n\nimport CompaniesBlock from './Companies';\nimport {CompaniesBlock as CompaniesBlockSchema} from './schema';\n\nconst CompaniesBlockConfig: BlockData = {\n component: CompaniesBlock,\n schema: {\n name: 'Companies Block',\n group: 'block',\n inputs: generateFromAJV(\n CompaniesBlockSchema['companies-block'] as unknown as JSONSchemaType<{}>,\n ),\n default: {\n title: 'Companies Block',\n description: 'Here is the list',\n },\n },\n};\n\nexport default CompaniesBlockConfig;\n"]}
|
|
@@ -38,7 +38,7 @@ const ContentLayoutBlock = (props) => {
|
|
|
38
38
|
const colSizes = React.useMemo(() => getTextWidth(textWidth), [textWidth]);
|
|
39
39
|
const globalTheme = (0, theme_1.useTheme)();
|
|
40
40
|
const themedBackground = (0, utils_1.getThemedValue)(background, globalTheme);
|
|
41
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: b({ size, theme, background: Boolean(background) }), children: [(0, jsx_runtime_1.jsx)(sub_blocks_1.Content, { className: b('content'), ...textContent, size: size, centered: centered, colSizes: colSizes, theme: theme }), fileContent && ((0, jsx_runtime_1.jsx)(grid_1.Col, { className: b('files', { size, centered }), reset: true, sizes: colSizes, children: fileContent.map((file) => ((0, react_1.createElement)(components_1.FileLink, { className: b('file'), ...file, key: file.href, type: "horizontal", textSize: getFileTextSize(size), theme: theme }))) })), background && ((0, jsx_runtime_1.jsx)("div", { className: b('background'), children: (0, jsx_runtime_1.jsx)(components_1.BackgroundImage, { className: b('background-item'), ...themedBackground, hide: isMobile }) }))] }));
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(grid_1.Grid, { children: (0, jsx_runtime_1.jsxs)("div", { className: b({ size, theme, background: Boolean(background) }), children: [(0, jsx_runtime_1.jsx)(sub_blocks_1.Content, { className: b('content'), ...textContent, size: size, centered: centered, colSizes: colSizes, theme: theme }), fileContent && ((0, jsx_runtime_1.jsx)(grid_1.Col, { className: b('files', { size, centered }), reset: true, sizes: colSizes, children: fileContent.map((file) => ((0, react_1.createElement)(components_1.FileLink, { className: b('file'), ...file, key: file.href, type: "horizontal", textSize: getFileTextSize(size), theme: theme }))) })), background && ((0, jsx_runtime_1.jsx)("div", { className: b('background'), children: (0, jsx_runtime_1.jsx)(components_1.BackgroundImage, { className: b('background-item'), ...themedBackground, hide: isMobile }) }))] }) }));
|
|
42
42
|
};
|
|
43
43
|
exports.ContentLayoutBlock = ContentLayoutBlock;
|
|
44
44
|
exports.default = exports.ContentLayoutBlock;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentLayout.js","sourceRoot":"../../../../src","sources":["blocks/ContentLayout/ContentLayout.tsx"],"names":[],"mappings":";;;;;;AAAA,qDAA+B;AAE/B,0DAA2D;AAC3D,wEAA0D;AAC1D,wDAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"ContentLayout.js","sourceRoot":"../../../../src","sources":["blocks/ContentLayout/ContentLayout.tsx"],"names":[],"mappings":";;;;;;AAAA,qDAA+B;AAE/B,0DAA2D;AAC3D,wEAA0D;AAC1D,wDAA6C;AAC7C,8CAAqC;AAErC,0DAAyC;AACzC,gDAAkD;AAIlD,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,sBAAsB,CAAC,CAAC;AAExC,SAAS,eAAe,CAAC,IAAiB;IACtC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,GAAG,CAAC;QACf,KAAK,GAAG,CAAC;QACT;YACI,OAAO,GAAG,CAAC;IACnB,CAAC;AACL,CAAC;AAED,SAAS,YAAY,CAAC,IAAqB;IACvC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,EAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAC,CAAC;QAC5B,KAAK,GAAG;YACJ,OAAO,EAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAC,CAAC;QAC7B,KAAK,GAAG,CAAC;QACT;YACI,OAAO,EAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAC,CAAC;IAChC,CAAC;AACL,CAAC;AAEM,MAAM,kBAAkB,GAAG,CAAC,KAA8B,EAAE,EAAE;IACjE,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,6BAAa,CAAC,CAAC;IACjD,MAAM,EACF,WAAW,EACX,WAAW,EACX,IAAI,GAAG,GAAG,EACV,UAAU,EACV,QAAQ,EACR,KAAK,GAAG,SAAS,EACjB,SAAS,GAAG,GAAG,GAClB,GAAG,KAAK,CAAC;IAEV,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAC3E,MAAM,WAAW,GAAG,IAAA,gBAAQ,GAAE,CAAC;IAC/B,MAAM,gBAAgB,GAAG,IAAA,sBAAc,EAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAEjE,OAAO,CACH,uBAAC,WAAI,cACD,iCAAK,SAAS,EAAE,CAAC,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,EAAC,CAAC,aAC7D,uBAAC,oBAAO,IACJ,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,KACnB,WAAW,EACf,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,GACd,EACD,WAAW,IAAI,CACZ,uBAAC,UAAG,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC,EAAE,KAAK,QAAC,KAAK,EAAE,QAAQ,YAC9D,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACvB,2BAAC,qBAAQ,IACL,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAChB,IAAI,EACR,GAAG,EAAE,IAAI,CAAC,IAAI,EACd,IAAI,EAAC,YAAY,EACjB,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,EAC/B,KAAK,EAAE,KAAK,GACd,CACL,CAAC,GACA,CACT,EACA,UAAU,IAAI,CACX,gCAAK,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,YAC3B,uBAAC,4BAAe,IACZ,SAAS,EAAE,CAAC,CAAC,iBAAiB,CAAC,KAC3B,gBAAgB,EACpB,IAAI,EAAE,QAAQ,GAChB,GACA,CACT,IACC,GACH,CACV,CAAC;AACN,CAAC,CAAC;AArDW,QAAA,kBAAkB,sBAqD7B;AACF,kBAAe,0BAAkB,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {BackgroundImage, FileLink} from '../../components';\nimport {MobileContext} from '../../context/mobileContext';\nimport {useTheme} from '../../context/theme';\nimport {Col, Grid} from '../../grid';\nimport {ContentLayoutBlockProps, ContentSize, ContentTextSize} from '../../models';\nimport {Content} from '../../sub-blocks';\nimport {block, getThemedValue} from '../../utils';\n\nimport './ContentLayout.scss';\n\nconst b = block('content-layout-block');\n\nfunction getFileTextSize(size: ContentSize) {\n switch (size) {\n case 's':\n return 's';\n case 'l':\n default:\n return 'l';\n }\n}\n\nfunction getTextWidth(size: ContentTextSize) {\n switch (size) {\n case 's':\n return {all: 12, md: 6};\n case 'l':\n return {all: 12, md: 12};\n case 'm':\n default:\n return {all: 12, md: 8};\n }\n}\n\nexport const ContentLayoutBlock = (props: ContentLayoutBlockProps) => {\n const isMobile = React.useContext(MobileContext);\n const {\n textContent,\n fileContent,\n size = 'l',\n background,\n centered,\n theme = 'default',\n textWidth = 'm',\n } = props;\n\n const colSizes = React.useMemo(() => getTextWidth(textWidth), [textWidth]);\n const globalTheme = useTheme();\n const themedBackground = getThemedValue(background, globalTheme);\n\n return (\n <Grid>\n <div className={b({size, theme, background: Boolean(background)})}>\n <Content\n className={b('content')}\n {...textContent}\n size={size}\n centered={centered}\n colSizes={colSizes}\n theme={theme}\n />\n {fileContent && (\n <Col className={b('files', {size, centered})} reset sizes={colSizes}>\n {fileContent.map((file) => (\n <FileLink\n className={b('file')}\n {...file}\n key={file.href}\n type=\"horizontal\"\n textSize={getFileTextSize(size)}\n theme={theme}\n />\n ))}\n </Col>\n )}\n {background && (\n <div className={b('background')}>\n <BackgroundImage\n className={b('background-item')}\n {...themedBackground}\n hide={isMobile}\n />\n </div>\n )}\n </div>\n </Grid>\n );\n};\nexport default ContentLayoutBlock;\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare const ContentLayoutBlockConfig: {
|
|
2
|
+
component: (props: import("../../index.js").ContentLayoutBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
schema: {
|
|
4
|
+
name: string;
|
|
5
|
+
group: string;
|
|
6
|
+
inputs: import("../../../common/types/index.js").ConfigInput[];
|
|
7
|
+
default: {
|
|
8
|
+
textContent: {
|
|
9
|
+
title: string;
|
|
10
|
+
text: string;
|
|
11
|
+
};
|
|
12
|
+
additionalInfo: string;
|
|
13
|
+
buttons: {
|
|
14
|
+
text: string;
|
|
15
|
+
theme: string;
|
|
16
|
+
url: string;
|
|
17
|
+
}[];
|
|
18
|
+
links: {
|
|
19
|
+
url: string;
|
|
20
|
+
text: string;
|
|
21
|
+
theme: string;
|
|
22
|
+
arrow: boolean;
|
|
23
|
+
}[];
|
|
24
|
+
fileContent: {
|
|
25
|
+
href: string;
|
|
26
|
+
text: string;
|
|
27
|
+
}[];
|
|
28
|
+
list: ({
|
|
29
|
+
title: string;
|
|
30
|
+
text: string;
|
|
31
|
+
} | {
|
|
32
|
+
text: string;
|
|
33
|
+
title?: undefined;
|
|
34
|
+
} | {
|
|
35
|
+
title: string;
|
|
36
|
+
text?: undefined;
|
|
37
|
+
})[];
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export default ContentLayoutBlockConfig;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const form_generator_1 = require("../../utils/form-generator.js");
|
|
5
|
+
const ContentLayout_1 = tslib_1.__importDefault(require("./ContentLayout.js"));
|
|
6
|
+
const schema_1 = require("./schema.js");
|
|
7
|
+
const ContentLayoutBlockConfig = {
|
|
8
|
+
component: ContentLayout_1.default,
|
|
9
|
+
schema: {
|
|
10
|
+
name: 'Content Layout Block',
|
|
11
|
+
group: 'block',
|
|
12
|
+
inputs: (0, form_generator_1.generateFromAJV)(schema_1.ContentLayoutBlock['content-layout-block']),
|
|
13
|
+
default: {
|
|
14
|
+
textContent: {
|
|
15
|
+
title: 'Lorem ipsum dolor sit amet',
|
|
16
|
+
text: 'Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
|
|
17
|
+
},
|
|
18
|
+
additionalInfo: 'Duis aute irure dolor in reprehenderit n voluptate velit esse cillum dolore eu fugiat nulla pariatur.',
|
|
19
|
+
buttons: [
|
|
20
|
+
{
|
|
21
|
+
text: 'Button',
|
|
22
|
+
theme: 'action',
|
|
23
|
+
url: 'https://example.com',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
text: 'Button',
|
|
27
|
+
theme: 'outlined',
|
|
28
|
+
url: 'https://example.com',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
links: [
|
|
32
|
+
{
|
|
33
|
+
url: 'https://example.com',
|
|
34
|
+
text: 'Link',
|
|
35
|
+
theme: 'normal',
|
|
36
|
+
arrow: true,
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
fileContent: [
|
|
40
|
+
{
|
|
41
|
+
href: 'https://example.xls',
|
|
42
|
+
text: 'File xls',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
href: 'https://example.fig',
|
|
46
|
+
text: 'File PNG, JPG, and SVG format',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
href: 'https://example.pdf',
|
|
50
|
+
text: 'Pdf file',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
href: 'https://example.zip',
|
|
54
|
+
text: 'Archive file',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
href: 'https://example.doc',
|
|
58
|
+
text: 'Microsoft Word document',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
href: 'https://example.ppt',
|
|
62
|
+
text: 'PPT file',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
list: [
|
|
66
|
+
{
|
|
67
|
+
title: 'Lorem ipsum',
|
|
68
|
+
text: 'Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
text: 'Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: 'Lorem ipsum ipsum',
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
exports.default = ContentLayoutBlockConfig;
|
|
81
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../../src","sources":["blocks/ContentLayout/index.ts"],"names":[],"mappings":";;;AAEA,kEAA2D;AAE3D,+EAAiD;AACjD,wCAAwE;AAExE,MAAM,wBAAwB,GAAG;IAC7B,SAAS,EAAE,uBAAkB;IAC7B,MAAM,EAAE;QACJ,IAAI,EAAE,sBAAsB;QAC5B,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,IAAA,gCAAe,EACnB,2BAAwB,CAAC,sBAAsB,CAAkC,CACpF;QACD,OAAO,EAAE;YACL,WAAW,EAAE;gBACT,KAAK,EAAE,4BAA4B;gBACnC,IAAI,EAAE,kUAAkU;aAC3U;YACD,cAAc,EACV,uGAAuG;YAC3G,OAAO,EAAE;gBACL;oBACI,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,QAAQ;oBACf,GAAG,EAAE,qBAAqB;iBAC7B;gBACD;oBACI,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,UAAU;oBACjB,GAAG,EAAE,qBAAqB;iBAC7B;aACJ;YACD,KAAK,EAAE;gBACH;oBACI,GAAG,EAAE,qBAAqB;oBAC1B,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,QAAQ;oBACf,KAAK,EAAE,IAAI;iBACd;aACJ;YACD,WAAW,EAAE;gBACT;oBACI,IAAI,EAAE,qBAAqB;oBAC3B,IAAI,EAAE,UAAU;iBACnB;gBACD;oBACI,IAAI,EAAE,qBAAqB;oBAC3B,IAAI,EAAE,+BAA+B;iBACxC;gBACD;oBACI,IAAI,EAAE,qBAAqB;oBAC3B,IAAI,EAAE,UAAU;iBACnB;gBACD;oBACI,IAAI,EAAE,qBAAqB;oBAC3B,IAAI,EAAE,cAAc;iBACvB;gBACD;oBACI,IAAI,EAAE,qBAAqB;oBAC3B,IAAI,EAAE,yBAAyB;iBAClC;gBACD;oBACI,IAAI,EAAE,qBAAqB;oBAC3B,IAAI,EAAE,UAAU;iBACnB;aACJ;YACD,IAAI,EAAE;gBACF;oBACI,KAAK,EAAE,aAAa;oBACpB,IAAI,EAAE,kUAAkU;iBAC3U;gBACD;oBACI,IAAI,EAAE,kUAAkU;iBAC3U;gBACD;oBACI,KAAK,EAAE,mBAAmB;iBAC7B;aACJ;SACJ;KACJ;CACJ,CAAC;AAEF,kBAAe,wBAAwB,CAAC","sourcesContent":["import {JSONSchemaType} from 'ajv';\n\nimport {generateFromAJV} from '../../utils/form-generator';\n\nimport ContentLayoutBlock from './ContentLayout';\nimport {ContentLayoutBlock as ContentLayoutBlockSchema} from './schema';\n\nconst ContentLayoutBlockConfig = {\n component: ContentLayoutBlock,\n schema: {\n name: 'Content Layout Block',\n group: 'block',\n inputs: generateFromAJV(\n ContentLayoutBlockSchema['content-layout-block'] as unknown as JSONSchemaType<{}>,\n ),\n default: {\n textContent: {\n title: 'Lorem ipsum dolor sit amet',\n text: 'Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',\n },\n additionalInfo:\n 'Duis aute irure dolor in reprehenderit n voluptate velit esse cillum dolore eu fugiat nulla pariatur.',\n buttons: [\n {\n text: 'Button',\n theme: 'action',\n url: 'https://example.com',\n },\n {\n text: 'Button',\n theme: 'outlined',\n url: 'https://example.com',\n },\n ],\n links: [\n {\n url: 'https://example.com',\n text: 'Link',\n theme: 'normal',\n arrow: true,\n },\n ],\n fileContent: [\n {\n href: 'https://example.xls',\n text: 'File xls',\n },\n {\n href: 'https://example.fig',\n text: 'File PNG, JPG, and SVG format',\n },\n {\n href: 'https://example.pdf',\n text: 'Pdf file',\n },\n {\n href: 'https://example.zip',\n text: 'Archive file',\n },\n {\n href: 'https://example.doc',\n text: 'Microsoft Word document',\n },\n {\n href: 'https://example.ppt',\n text: 'PPT file',\n },\n ],\n list: [\n {\n title: 'Lorem ipsum',\n text: 'Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',\n },\n {\n text: 'Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',\n },\n {\n title: 'Lorem ipsum ipsum',\n },\n ],\n },\n },\n};\n\nexport default ContentLayoutBlockConfig;\n"]}
|