@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
|
@@ -11,4 +11,231 @@ export interface SchemaCustomConfig {
|
|
|
11
11
|
extensions?: object;
|
|
12
12
|
}
|
|
13
13
|
export declare const getBlocksCases: (blocks: Schema) => any;
|
|
14
|
+
export declare const defaultComponentsConfigurationSchema: {
|
|
15
|
+
type: string;
|
|
16
|
+
properties: {
|
|
17
|
+
logo: {
|
|
18
|
+
oneOf: (({
|
|
19
|
+
type: string;
|
|
20
|
+
additionalProperties: boolean;
|
|
21
|
+
required: string[];
|
|
22
|
+
properties: {
|
|
23
|
+
icon: {
|
|
24
|
+
oneOf: ({
|
|
25
|
+
type: string;
|
|
26
|
+
properties: {
|
|
27
|
+
when: {
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
} | {
|
|
32
|
+
type: string;
|
|
33
|
+
pattern: string;
|
|
34
|
+
optionName: string;
|
|
35
|
+
})[];
|
|
36
|
+
};
|
|
37
|
+
text: {
|
|
38
|
+
type: string;
|
|
39
|
+
contentType: string;
|
|
40
|
+
};
|
|
41
|
+
url: {
|
|
42
|
+
type: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
} & {
|
|
46
|
+
optionName: string;
|
|
47
|
+
}) | {
|
|
48
|
+
type: string;
|
|
49
|
+
additionalProperties: boolean;
|
|
50
|
+
required: import("..").Theme[];
|
|
51
|
+
properties: {};
|
|
52
|
+
optionName: string;
|
|
53
|
+
})[];
|
|
54
|
+
};
|
|
55
|
+
header: {
|
|
56
|
+
type: string;
|
|
57
|
+
additionalProperties: boolean;
|
|
58
|
+
required: string[];
|
|
59
|
+
properties: {
|
|
60
|
+
leftItems: {
|
|
61
|
+
oneOf: {
|
|
62
|
+
type: string;
|
|
63
|
+
items: {
|
|
64
|
+
type: string;
|
|
65
|
+
properties: {
|
|
66
|
+
when: {
|
|
67
|
+
type: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
}[];
|
|
72
|
+
};
|
|
73
|
+
rightItems: {
|
|
74
|
+
oneOf: {
|
|
75
|
+
type: string;
|
|
76
|
+
items: {
|
|
77
|
+
type: string;
|
|
78
|
+
properties: {
|
|
79
|
+
when: {
|
|
80
|
+
type: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
}[];
|
|
85
|
+
};
|
|
86
|
+
iconSize: {
|
|
87
|
+
type: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
menu: {
|
|
92
|
+
type: string;
|
|
93
|
+
additionalProperties: boolean;
|
|
94
|
+
properties: {
|
|
95
|
+
title: {
|
|
96
|
+
type: string;
|
|
97
|
+
contentType: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
background: {
|
|
102
|
+
oneOf: (({
|
|
103
|
+
additionalProperties: boolean;
|
|
104
|
+
properties: {
|
|
105
|
+
image: {
|
|
106
|
+
oneOf: ({
|
|
107
|
+
type: string;
|
|
108
|
+
properties: {
|
|
109
|
+
when: {
|
|
110
|
+
type: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
} | {
|
|
114
|
+
type: string;
|
|
115
|
+
pattern: string;
|
|
116
|
+
optionName: string;
|
|
117
|
+
})[];
|
|
118
|
+
};
|
|
119
|
+
color: {
|
|
120
|
+
type: string;
|
|
121
|
+
};
|
|
122
|
+
video: {
|
|
123
|
+
type: string;
|
|
124
|
+
additionalProperties: boolean;
|
|
125
|
+
required: string[];
|
|
126
|
+
properties: {
|
|
127
|
+
src: {
|
|
128
|
+
type: string;
|
|
129
|
+
items: {
|
|
130
|
+
type: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
loop: {
|
|
134
|
+
oneOf: ({
|
|
135
|
+
optionName: string;
|
|
136
|
+
type: string;
|
|
137
|
+
additionalProperties: boolean;
|
|
138
|
+
required: string[];
|
|
139
|
+
properties: {
|
|
140
|
+
start: {
|
|
141
|
+
type: string;
|
|
142
|
+
};
|
|
143
|
+
end: {
|
|
144
|
+
type: string;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
} | {
|
|
148
|
+
type: string;
|
|
149
|
+
optionName: string;
|
|
150
|
+
})[];
|
|
151
|
+
};
|
|
152
|
+
type: {
|
|
153
|
+
type: string;
|
|
154
|
+
enum: string[];
|
|
155
|
+
};
|
|
156
|
+
muted: {
|
|
157
|
+
type: string;
|
|
158
|
+
};
|
|
159
|
+
autoplay: {
|
|
160
|
+
type: string;
|
|
161
|
+
};
|
|
162
|
+
elapsedTime: {
|
|
163
|
+
type: string;
|
|
164
|
+
};
|
|
165
|
+
playButton: {
|
|
166
|
+
type: string;
|
|
167
|
+
additionalProperties: boolean;
|
|
168
|
+
properties: {
|
|
169
|
+
type: {
|
|
170
|
+
type: string;
|
|
171
|
+
enum: string[];
|
|
172
|
+
};
|
|
173
|
+
theme: {
|
|
174
|
+
type: string;
|
|
175
|
+
enum: string[];
|
|
176
|
+
};
|
|
177
|
+
text: {
|
|
178
|
+
type: string;
|
|
179
|
+
contentType: string;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
controls: {
|
|
184
|
+
type: string;
|
|
185
|
+
enum: import("..").MediaVideoControlsType[];
|
|
186
|
+
};
|
|
187
|
+
customControlsOptions: {
|
|
188
|
+
type: string;
|
|
189
|
+
additionalProperties: boolean;
|
|
190
|
+
properties: {
|
|
191
|
+
type: {
|
|
192
|
+
type: string;
|
|
193
|
+
enum: import("..").CustomControlsType[];
|
|
194
|
+
};
|
|
195
|
+
muteButtonShown: {
|
|
196
|
+
type: string;
|
|
197
|
+
};
|
|
198
|
+
positioning: {
|
|
199
|
+
type: string;
|
|
200
|
+
enum: import("..").CustomControlsButtonPositioning[];
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
ariaLabel: {
|
|
205
|
+
type: string;
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
height: {
|
|
210
|
+
type: string;
|
|
211
|
+
};
|
|
212
|
+
size: {
|
|
213
|
+
type: string;
|
|
214
|
+
enum: string[];
|
|
215
|
+
};
|
|
216
|
+
parallax: {
|
|
217
|
+
type: string;
|
|
218
|
+
};
|
|
219
|
+
fullWidthMedia: {
|
|
220
|
+
type: string;
|
|
221
|
+
};
|
|
222
|
+
animated: {
|
|
223
|
+
type: string;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
} & {
|
|
227
|
+
optionName: string;
|
|
228
|
+
}) | {
|
|
229
|
+
type: string;
|
|
230
|
+
additionalProperties: boolean;
|
|
231
|
+
required: import("..").Theme[];
|
|
232
|
+
properties: {};
|
|
233
|
+
optionName: string;
|
|
234
|
+
})[];
|
|
235
|
+
};
|
|
236
|
+
animated: {
|
|
237
|
+
type: string;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
};
|
|
14
241
|
export declare function generateDefaultSchema(config?: SchemaCustomConfig): JSONSchema4;
|
|
@@ -6,6 +6,10 @@ import { filteredItem } from './validators/utils';
|
|
|
6
6
|
export const getBlocksCases = (blocks) => {
|
|
7
7
|
return Object.values(blocks).reduce((acc, block) => (Object.assign(Object.assign({}, acc), block)), {});
|
|
8
8
|
};
|
|
9
|
+
export const defaultComponentsConfigurationSchema = {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: Object.assign(Object.assign({}, AnimatableProps), { logo: withTheme(LogoProps), header: NavigationHeaderProps, menu: MenuProps, background: withTheme(BackgroundProps) }),
|
|
12
|
+
};
|
|
9
13
|
export function generateDefaultSchema(config) {
|
|
10
14
|
const { cards = {}, blocks = {}, extensions = {} } = config !== null && config !== void 0 ? config : {};
|
|
11
15
|
const configBlockSchemaNames = Object.keys(blocks).filter((item) => !constructorBlockSchemaNames.includes(item));
|
|
@@ -41,11 +45,11 @@ export function generateDefaultSchema(config) {
|
|
|
41
45
|
type: 'object',
|
|
42
46
|
additionalProperties: false,
|
|
43
47
|
required: ['blocks'],
|
|
44
|
-
properties: Object.assign(Object.assign(Object.assign({},
|
|
48
|
+
properties: Object.assign(Object.assign(Object.assign({}, defaultComponentsConfigurationSchema.properties), { blocks: {
|
|
45
49
|
type: 'array',
|
|
46
50
|
items: {
|
|
47
51
|
$ref: '#/definitions/children',
|
|
48
52
|
},
|
|
49
|
-
}
|
|
53
|
+
} }), extensions),
|
|
50
54
|
};
|
|
51
55
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { contentThemes, textSize } from '../../schema/validators/common';
|
|
2
|
+
const textSizeEnum = textSize.map((size) => ({ value: size, content: size }));
|
|
3
|
+
const contentThemesEnum = contentThemes.map((size) => ({ value: size, content: size }));
|
|
4
|
+
export const blockConfig = {
|
|
5
|
+
name: 'Background Card',
|
|
6
|
+
inputs: [
|
|
7
|
+
{
|
|
8
|
+
type: 'oneOf',
|
|
9
|
+
name: 'title',
|
|
10
|
+
title: 'Title Object',
|
|
11
|
+
options: [
|
|
12
|
+
{
|
|
13
|
+
title: 'Simple',
|
|
14
|
+
value: 'simple',
|
|
15
|
+
properties: [
|
|
16
|
+
{
|
|
17
|
+
type: 'text',
|
|
18
|
+
name: '',
|
|
19
|
+
title: 'Title',
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: 'Complex',
|
|
25
|
+
value: 'complex',
|
|
26
|
+
properties: [
|
|
27
|
+
{
|
|
28
|
+
type: 'text',
|
|
29
|
+
name: 'text',
|
|
30
|
+
title: 'Title',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: 'select',
|
|
34
|
+
name: 'textSize',
|
|
35
|
+
title: 'Text Size',
|
|
36
|
+
enum: textSizeEnum,
|
|
37
|
+
view: 'select',
|
|
38
|
+
mode: 'single',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: 'text',
|
|
42
|
+
name: 'url',
|
|
43
|
+
title: 'Url',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: 'text',
|
|
47
|
+
name: 'urlTitle',
|
|
48
|
+
title: 'Url',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: 'boolean',
|
|
52
|
+
name: 'resetMargin',
|
|
53
|
+
title: 'Reset Margin',
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
type: 'textarea',
|
|
61
|
+
name: 'text',
|
|
62
|
+
title: 'Description',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
type: 'textarea',
|
|
66
|
+
name: 'additionalInfo',
|
|
67
|
+
title: 'Additional Info',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: 'select',
|
|
71
|
+
name: 'size',
|
|
72
|
+
title: 'Size',
|
|
73
|
+
enum: contentThemesEnum,
|
|
74
|
+
view: 'select',
|
|
75
|
+
mode: 'single',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import BackgroundCard from './BackgroundCard';
|
|
3
|
+
import { BackgroundCard as BackgroundCardSchema } from './schema';
|
|
4
|
+
const BackgroundCardConfig = {
|
|
5
|
+
component: BackgroundCard,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Background Card',
|
|
8
|
+
inputs: generateFromAJV(BackgroundCardSchema['background-card']),
|
|
9
|
+
default: {
|
|
10
|
+
title: 'Background Card',
|
|
11
|
+
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
12
|
+
additionalInfo: 'Additional info',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
export default BackgroundCardConfig;
|
|
@@ -5,9 +5,10 @@ import { block, getThemedValue } from '../../utils';
|
|
|
5
5
|
import './BannerCard.css';
|
|
6
6
|
const b = block('banner-card');
|
|
7
7
|
export const BannerCard = (props) => {
|
|
8
|
-
const { title, subtitle, button
|
|
8
|
+
const { title, subtitle, button, color, theme: textTheme = 'light', image, disableCompress, mediaView = 'full', } = props;
|
|
9
9
|
const theme = useTheme();
|
|
10
10
|
const contentStyle = {};
|
|
11
|
+
const { url, text, target, theme: buttonTheme = 'raised' } = button || {};
|
|
11
12
|
if (color) {
|
|
12
13
|
contentStyle.backgroundColor = getThemedValue(color, theme);
|
|
13
14
|
}
|
|
@@ -18,8 +19,8 @@ export const BannerCard = (props) => {
|
|
|
18
19
|
React.createElement("h2", { className: b('title') },
|
|
19
20
|
React.createElement(HTML, null, title)),
|
|
20
21
|
subtitle && (React.createElement(YFMWrapper, { className: b('subtitle'), content: subtitle, modifiers: { constructor: true } }))),
|
|
21
|
-
React.createElement(RouterLink, { href: url },
|
|
22
|
-
React.createElement(Button, { className: b('button'), theme: buttonTheme, size: "xl", text: text, url: url, target: target }))),
|
|
22
|
+
text && (React.createElement(RouterLink, { href: url || '' },
|
|
23
|
+
React.createElement(Button, { className: b('button'), theme: buttonTheme, size: "xl", text: text, url: url, target: target })))),
|
|
23
24
|
React.createElement(BackgroundImage, { className: b('image'), src: getThemedValue(image, theme), disableCompress: disableCompress }))));
|
|
24
25
|
};
|
|
25
26
|
export default BannerCard;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BannerCardProps } from '../../blocks/Banner/schema';
|
|
2
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
3
|
+
import BannerCard from './BannerCard';
|
|
4
|
+
const BannerCardConfig = {
|
|
5
|
+
component: BannerCard,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Banner Card',
|
|
8
|
+
inputs: generateFromAJV(BannerCardProps),
|
|
9
|
+
default: {
|
|
10
|
+
color: 'rgba(54, 151, 241, 0.4)',
|
|
11
|
+
title: 'Banner Card',
|
|
12
|
+
subtitle: 'Some sort of description.',
|
|
13
|
+
button: {
|
|
14
|
+
text: 'Read more',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
export default BannerCardConfig;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import BasicCard from './BasicCard';
|
|
3
|
+
import { BasicCard as BasicCardSchema } from './schema';
|
|
4
|
+
const BasicCardConfig = {
|
|
5
|
+
component: BasicCard,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Basic Card',
|
|
8
|
+
inputs: generateFromAJV(BasicCardSchema['basic-card']),
|
|
9
|
+
default: {
|
|
10
|
+
title: 'Basic Card',
|
|
11
|
+
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export default BasicCardConfig;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import Content from './Content';
|
|
3
|
+
import { ContentBlock } from './schema';
|
|
4
|
+
const ContentConfig = {
|
|
5
|
+
component: Content,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Content',
|
|
8
|
+
inputs: generateFromAJV(ContentBlock['content']),
|
|
9
|
+
default: {
|
|
10
|
+
title: 'Content',
|
|
11
|
+
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export default ContentConfig;
|
|
@@ -54,6 +54,7 @@ export const ContentBase = {
|
|
|
54
54
|
};
|
|
55
55
|
export const ContentBlock = {
|
|
56
56
|
content: {
|
|
57
|
+
type: 'object',
|
|
57
58
|
additionalProperties: false,
|
|
58
59
|
properties: Object.assign(Object.assign({}, ContentBase), { colSizes: containerSizesArray.reduce((acc, size) => (Object.assign(Object.assign({}, acc), { [size]: sizeNumber })), {}), centered: {
|
|
59
60
|
type: 'boolean',
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import Divider from './Divider';
|
|
3
|
+
import { Divider as DividerSchema } from './schema';
|
|
4
|
+
const DividerConfig = {
|
|
5
|
+
component: Divider,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Divider',
|
|
8
|
+
inputs: generateFromAJV(DividerSchema['divider']),
|
|
9
|
+
default: {},
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
export default DividerConfig;
|
|
@@ -15,8 +15,8 @@ const ImageCard = (props) => {
|
|
|
15
15
|
const imageProps = getMediaImage(image);
|
|
16
16
|
const titleId = useUniqId();
|
|
17
17
|
const cardContent = (React.createElement(React.Fragment, null,
|
|
18
|
-
React.createElement("div", { className: b('image', { margins }) },
|
|
19
|
-
React.createElement(Image, Object.assign({ className: b('image_inner', { radius: enableImageBorderRadius }) }, imageProps))),
|
|
18
|
+
image && (React.createElement("div", { className: b('image', { margins }) },
|
|
19
|
+
React.createElement(Image, Object.assign({ className: b('image_inner', { radius: enableImageBorderRadius }) }, imageProps)))),
|
|
20
20
|
hasContent && (React.createElement("div", { className: b('content') },
|
|
21
21
|
React.createElement(Content, { titleId: titleId, title: title, text: text, links: links, buttons: buttons, list: list, theme: cardTheme, additionalInfo: additionalInfo, size: size, colSizes: CONTENT_COL_SIZES, controlPosition: areControlsInFooter ? 'bottom' : 'default' })))));
|
|
22
22
|
return url ? (React.createElement(Link, { href: url, target: target, rel: target === '_blank' ? 'noopener noreferrer' : undefined, className: b({ border, 'with-content': hasContent, direction }), title: urlTitle, extraProps: {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import ImageCard from './ImageCard';
|
|
3
|
+
import { ImageCard as ImageCardSchema } from './schema';
|
|
4
|
+
const ImageCardConfig = {
|
|
5
|
+
component: ImageCard,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Image Card',
|
|
8
|
+
inputs: generateFromAJV(ImageCardSchema['image-card']),
|
|
9
|
+
default: {
|
|
10
|
+
title: 'Image Card',
|
|
11
|
+
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export default ImageCardConfig;
|
|
@@ -9,7 +9,7 @@ import { getLayoutItemLinks, hasFullscreen, showFullscreenIcon } from './utils';
|
|
|
9
9
|
import './LayoutItem.css';
|
|
10
10
|
const b = block('layout-item');
|
|
11
11
|
const LayoutItem = (_a) => {
|
|
12
|
-
var _b = _a.content, { links } =
|
|
12
|
+
var _b = _a.content, _c = _b === void 0 ? {} : _b, { links = [] } = _c, content = __rest(_c, ["links"]), { metaInfo, media, border, fullscreen, icon, className, analyticsEvents, controlPosition = 'content' } = _a;
|
|
13
13
|
const normalizedLinks = useMemo(() => getLayoutItemLinks(links), [links]);
|
|
14
14
|
const areControlsInFooter = controlPosition === 'footer';
|
|
15
15
|
const theme = useTheme();
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const LayoutItemConfig: {
|
|
2
|
+
component: ({ content: { links, ...content }, metaInfo, media, border, fullscreen, icon, className, analyticsEvents, controlPosition, }: import("../..").LayoutItemProps) => JSX.Element;
|
|
3
|
+
schema: {
|
|
4
|
+
name: string;
|
|
5
|
+
inputs: import("../../types/dynamic-form").ConfigInput[];
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export default LayoutItemConfig;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import LayoutItem from './LayoutItem';
|
|
3
|
+
import { LayoutItem as LayoutItemSchema } from './schema';
|
|
4
|
+
const LayoutItemConfig = {
|
|
5
|
+
component: LayoutItem,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Layout Item',
|
|
8
|
+
inputs: generateFromAJV(LayoutItemSchema),
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
export default LayoutItemConfig;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import LayoutItem from './LayoutItem';
|
|
3
|
+
import { LayoutItem as LayoutItemSchema } from './schema';
|
|
4
|
+
const LayoutItemConfig = {
|
|
5
|
+
component: LayoutItem,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Layout Item',
|
|
8
|
+
inputs: generateFromAJV(LayoutItemSchema),
|
|
9
|
+
default: {
|
|
10
|
+
content: {
|
|
11
|
+
title: 'Layout Item',
|
|
12
|
+
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export default LayoutItemConfig;
|