@gravity-ui/page-constructor 5.14.3 → 5.14.4-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/blocks/Banner/Banner.js +3 -1
- package/build/cjs/blocks/Banner/index.d.ts +3 -0
- package/build/cjs/blocks/Banner/index.js +22 -0
- package/build/cjs/blocks/CardLayout/CardLayout.css +1 -0
- package/build/cjs/blocks/CardLayout/CardLayout.js +11 -6
- package/build/cjs/blocks/CardLayout/index.d.ts +5 -0
- package/build/cjs/blocks/CardLayout/index.js +166 -0
- package/build/cjs/blocks/Companies/Companies.js +6 -4
- package/build/cjs/blocks/Companies/index.d.ts +3 -0
- package/build/cjs/blocks/Companies/index.js +18 -0
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +6 -5
- package/build/cjs/blocks/ContentLayout/index.d.ts +11 -0
- package/build/cjs/blocks/ContentLayout/index.js +17 -0
- package/build/cjs/blocks/ContentLayout/schema.d.ts +1 -0
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +22 -20
- package/build/cjs/blocks/ExtendedFeatures/index.d.ts +12 -0
- package/build/cjs/blocks/ExtendedFeatures/index.js +18 -0
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +1 -0
- package/build/cjs/blocks/ExtendedFeatures/schema.js +1 -0
- package/build/cjs/blocks/FilterBlock/FilterBlock.js +11 -10
- package/build/cjs/blocks/FilterBlock/index.d.ts +11 -0
- package/build/cjs/blocks/FilterBlock/index.js +17 -0
- package/build/cjs/blocks/Form/index.d.ts +12 -0
- package/build/cjs/blocks/Form/index.js +18 -0
- package/build/cjs/blocks/Header/dynamic-form.d.ts +2 -0
- package/build/cjs/blocks/Header/dynamic-form.js +730 -0
- package/build/cjs/blocks/Header/index.d.ts +8 -0
- package/build/cjs/blocks/Header/index.js +14 -0
- package/build/cjs/blocks/HeaderSlider/HeaderSlider.js +3 -2
- package/build/cjs/blocks/HeaderSlider/index.d.ts +31 -0
- package/build/cjs/blocks/HeaderSlider/index.js +38 -0
- package/build/cjs/blocks/Icons/Icons.js +9 -6
- package/build/cjs/blocks/Icons/index.d.ts +13 -0
- package/build/cjs/blocks/Icons/index.js +19 -0
- package/build/cjs/blocks/Info/index.d.ts +21 -0
- package/build/cjs/blocks/Info/index.js +41 -0
- package/build/cjs/blocks/Map/index.d.ts +11 -0
- package/build/cjs/blocks/Map/index.js +17 -0
- package/build/cjs/blocks/Media/index.d.ts +14 -0
- package/build/cjs/blocks/Media/index.js +20 -0
- package/build/cjs/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +19 -16
- package/build/cjs/blocks/PromoFeaturesBlock/index.d.ts +12 -0
- package/build/cjs/blocks/PromoFeaturesBlock/index.js +18 -0
- package/build/cjs/blocks/Questions/Questions.js +12 -10
- package/build/cjs/blocks/Questions/index.d.ts +29 -0
- package/build/cjs/blocks/Questions/index.js +47 -0
- package/build/cjs/blocks/Share/Share.js +11 -10
- package/build/cjs/blocks/Share/index.d.ts +12 -0
- package/build/cjs/blocks/Share/index.js +18 -0
- package/build/cjs/blocks/Slider/Slider.js +22 -17
- package/build/cjs/blocks/Slider/dynamic-form.d.ts +3 -0
- package/build/cjs/blocks/Slider/dynamic-form.js +225 -0
- package/build/cjs/blocks/Slider/index.d.ts +8 -0
- package/build/cjs/blocks/Slider/index.js +14 -0
- package/build/cjs/blocks/Table/index.d.ts +8 -0
- package/build/cjs/blocks/Table/index.js +14 -0
- package/build/cjs/blocks/Table/schema.d.ts +1 -0
- package/build/cjs/blocks/Table/schema.js +1 -0
- package/build/cjs/blocks/Tabs/Tabs.js +9 -8
- package/build/cjs/blocks/Tabs/index.d.ts +16 -0
- package/build/cjs/blocks/Tabs/index.js +29 -0
- package/build/cjs/blocks/TestEditorBlock/TestEditorBlock.d.ts +5 -0
- package/build/cjs/blocks/TestEditorBlock/TestEditorBlock.js +12 -0
- package/build/cjs/blocks/TestEditorBlock/form.d.ts +3 -0
- package/build/cjs/blocks/TestEditorBlock/form.js +80 -0
- package/build/cjs/blocks/TestEditorBlock/index.d.ts +11 -0
- package/build/cjs/blocks/TestEditorBlock/index.js +17 -0
- package/build/cjs/components/BlockBase/BlockBase.css +8 -16
- package/build/cjs/components/Image/dynamic-form.d.ts +2 -0
- package/build/cjs/components/Image/dynamic-form.js +84 -0
- package/build/cjs/components/editor/ChildrenWrap/ChildrenWrap.css +5 -0
- package/build/cjs/components/editor/ChildrenWrap/ChildrenWrap.d.ts +6 -0
- package/build/cjs/components/editor/ChildrenWrap/ChildrenWrap.js +15 -0
- package/build/cjs/components/editor/ItemWrap/ItemWrap.css +9 -0
- package/build/cjs/components/editor/ItemWrap/ItemWrap.d.ts +6 -0
- package/build/cjs/components/editor/ItemWrap/ItemWrap.js +15 -0
- package/build/cjs/constructor-items.d.ts +18 -6
- package/build/cjs/constructor-items.js +67 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.js +16 -13
- package/build/cjs/containers/PageConstructor/Provider.js +4 -0
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +10 -6
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +5 -2
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/hooks/useEditorBlockMouseEvents.d.ts +8 -0
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/hooks/useEditorBlockMouseEvents.js +109 -0
- package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +7 -6
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorLoadable/ConstructorLoadable.js +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorRow/ConstructorRow.js +1 -3
- package/build/cjs/context/blockIdContext/blockIdContext.d.ts +2 -2
- package/build/cjs/context/blockIdContext/blockIdContext.js +1 -1
- package/build/cjs/context/editorContext/editorContext.d.ts +13 -0
- package/build/cjs/context/editorContext/editorContext.js +10 -0
- package/build/cjs/context/editorContext/editorProvider.d.ts +2 -0
- package/build/cjs/context/editorContext/editorProvider.js +20 -0
- package/build/cjs/context/editorContext/hooks/useEditorStore.d.ts +2 -0
- package/build/cjs/context/editorContext/hooks/useEditorStore.js +15 -0
- package/build/cjs/context/editorContext/index.d.ts +4 -0
- package/build/cjs/context/editorContext/index.js +7 -0
- package/build/cjs/context/editorContext/store.d.ts +24 -0
- package/build/cjs/context/editorContext/store.js +39 -0
- package/build/cjs/context/messagesContext/hooks/useMessageObserver.d.ts +4 -0
- package/build/cjs/context/messagesContext/hooks/useMessageObserver.js +16 -0
- package/build/cjs/context/messagesContext/hooks/useMessageSender.d.ts +2 -0
- package/build/cjs/context/messagesContext/hooks/useMessageSender.js +11 -0
- package/build/cjs/context/messagesContext/hooks/useMessagesStore.d.ts +2 -0
- package/build/cjs/context/messagesContext/hooks/useMessagesStore.js +15 -0
- package/build/cjs/context/messagesContext/index.d.ts +5 -0
- package/build/cjs/context/messagesContext/index.js +8 -0
- package/build/cjs/context/messagesContext/messagesContext.d.ts +14 -0
- package/build/cjs/context/messagesContext/messagesContext.js +12 -0
- package/build/cjs/context/messagesContext/messagesProvider.d.ts +2 -0
- package/build/cjs/context/messagesContext/messagesProvider.js +73 -0
- package/build/cjs/context/messagesContext/store.d.ts +25 -0
- package/build/cjs/context/messagesContext/store.js +17 -0
- package/build/cjs/context/messagesContext/types.d.ts +14 -0
- package/build/cjs/context/messagesContext/types.js +2 -0
- package/build/cjs/grid/Col/Col.d.ts +1 -1
- package/build/cjs/grid/Grid/Grid.css +2 -6
- package/build/cjs/hooks/useAnalytics.js +1 -1
- package/build/cjs/hooks/useEditorInitialize.d.ts +7 -0
- package/build/cjs/hooks/useEditorInitialize.js +90 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +2 -1
- package/build/cjs/models/constructor-items/blocks.js +1 -0
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -1
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +4 -1
- package/build/cjs/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.js +4 -1
- package/build/cjs/navigation/containers/Layout/Layout.css +0 -1
- package/build/cjs/schema/constants.d.ts +1 -1
- package/build/cjs/schema/constants.js +2 -1
- package/build/cjs/schema/index.d.ts +227 -0
- package/build/cjs/schema/index.js +7 -3
- package/build/cjs/sub-blocks/BackgroundCard/dynamic-form.d.ts +2 -0
- package/build/cjs/sub-blocks/BackgroundCard/dynamic-form.js +81 -0
- package/build/cjs/sub-blocks/BackgroundCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/BackgroundCard/index.js +19 -0
- package/build/cjs/sub-blocks/BannerCard/BannerCard.js +4 -3
- package/build/cjs/sub-blocks/BannerCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/BannerCard/index.js +22 -0
- package/build/cjs/sub-blocks/BasicCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/BasicCard/index.js +18 -0
- package/build/cjs/sub-blocks/Content/index.d.ts +3 -0
- package/build/cjs/sub-blocks/Content/index.js +18 -0
- package/build/cjs/sub-blocks/Content/schema.d.ts +1 -0
- package/build/cjs/sub-blocks/Content/schema.js +1 -0
- package/build/cjs/sub-blocks/Divider/index.d.ts +3 -0
- package/build/cjs/sub-blocks/Divider/index.js +15 -0
- package/build/cjs/sub-blocks/ImageCard/ImageCard.js +2 -2
- package/build/cjs/sub-blocks/ImageCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/ImageCard/index.js +18 -0
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +1 -1
- package/build/cjs/sub-blocks/LayoutItem/form.d.ts +8 -0
- package/build/cjs/sub-blocks/LayoutItem/form.js +14 -0
- package/build/cjs/sub-blocks/LayoutItem/index.d.ts +3 -0
- package/build/cjs/sub-blocks/LayoutItem/index.js +20 -0
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +254 -246
- package/build/cjs/sub-blocks/LayoutItem/schema.js +7 -3
- package/build/cjs/sub-blocks/MediaCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/MediaCard/index.js +20 -0
- package/build/cjs/sub-blocks/PriceCard/index.d.ts +3 -0
- package/build/cjs/sub-blocks/PriceCard/index.js +31 -0
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetailed.js +1 -1
- package/build/cjs/sub-blocks/PriceDetailed/index.d.ts +4 -0
- package/build/cjs/sub-blocks/PriceDetailed/index.js +33 -0
- package/build/cjs/sub-blocks/Quote/index.d.ts +3 -0
- package/build/cjs/sub-blocks/Quote/index.js +21 -0
- package/build/cjs/types/actions/codes.d.ts +16 -0
- package/build/cjs/types/actions/codes.js +26 -0
- package/build/cjs/types/actions/index.d.ts +20 -0
- package/build/cjs/types/actions/index.js +10 -0
- package/build/cjs/types/actions/initial.d.ts +23 -0
- package/build/cjs/types/actions/initial.js +2 -0
- package/build/cjs/types/actions/insert.d.ts +19 -0
- package/build/cjs/types/actions/insert.js +2 -0
- package/build/cjs/types/actions/other.d.ts +16 -0
- package/build/cjs/types/actions/other.js +2 -0
- package/build/cjs/types/actions/overlay.d.ts +16 -0
- package/build/cjs/types/actions/overlay.js +2 -0
- package/build/cjs/types/actions/reorder.d.ts +17 -0
- package/build/cjs/types/actions/reorder.js +2 -0
- package/build/cjs/types/actions/select.d.ts +16 -0
- package/build/cjs/types/actions/select.js +2 -0
- package/build/cjs/types/dynamic-form.d.ts +92 -0
- package/build/cjs/types/dynamic-form.js +2 -0
- package/build/cjs/types/index.d.ts +14 -0
- package/build/cjs/types/index.js +2 -0
- package/build/cjs/utils/editor.d.ts +2 -0
- package/build/cjs/utils/editor.js +24 -0
- package/build/cjs/utils/form-generator.d.ts +9 -0
- package/build/cjs/utils/form-generator.js +126 -0
- package/build/cjs/utils/store.d.ts +16 -0
- package/build/cjs/utils/store.js +9 -0
- package/build/esm/blocks/Banner/Banner.js +3 -1
- package/build/esm/blocks/Banner/index.d.ts +3 -0
- package/build/esm/blocks/Banner/index.js +19 -0
- package/build/esm/blocks/CardLayout/CardLayout.css +1 -0
- package/build/esm/blocks/CardLayout/CardLayout.js +12 -7
- package/build/esm/blocks/CardLayout/index.d.ts +5 -0
- package/build/esm/blocks/CardLayout/index.js +162 -0
- package/build/esm/blocks/Companies/Companies.js +6 -4
- package/build/esm/blocks/Companies/index.d.ts +3 -0
- package/build/esm/blocks/Companies/index.js +15 -0
- package/build/esm/blocks/ContentLayout/ContentLayout.js +7 -6
- package/build/esm/blocks/ContentLayout/index.d.ts +11 -0
- package/build/esm/blocks/ContentLayout/index.js +14 -0
- package/build/esm/blocks/ContentLayout/schema.d.ts +1 -0
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +23 -21
- package/build/esm/blocks/ExtendedFeatures/index.d.ts +12 -0
- package/build/esm/blocks/ExtendedFeatures/index.js +15 -0
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +1 -0
- package/build/esm/blocks/ExtendedFeatures/schema.js +1 -0
- package/build/esm/blocks/FilterBlock/FilterBlock.js +12 -11
- package/build/esm/blocks/FilterBlock/index.d.ts +11 -0
- package/build/esm/blocks/FilterBlock/index.js +14 -0
- package/build/esm/blocks/Form/index.d.ts +12 -0
- package/build/esm/blocks/Form/index.js +15 -0
- package/build/esm/blocks/Header/dynamic-form.d.ts +2 -0
- package/build/esm/blocks/Header/dynamic-form.js +727 -0
- package/build/esm/blocks/Header/index.d.ts +8 -0
- package/build/esm/blocks/Header/index.js +11 -0
- package/build/esm/blocks/HeaderSlider/HeaderSlider.js +3 -2
- package/build/esm/blocks/HeaderSlider/index.d.ts +31 -0
- package/build/esm/blocks/HeaderSlider/index.js +35 -0
- package/build/esm/blocks/Icons/Icons.js +9 -6
- package/build/esm/blocks/Icons/index.d.ts +13 -0
- package/build/esm/blocks/Icons/index.js +16 -0
- package/build/esm/blocks/Info/index.d.ts +21 -0
- package/build/esm/blocks/Info/index.js +38 -0
- package/build/esm/blocks/Map/index.d.ts +11 -0
- package/build/esm/blocks/Map/index.js +14 -0
- package/build/esm/blocks/Media/index.d.ts +14 -0
- package/build/esm/blocks/Media/index.js +17 -0
- package/build/esm/blocks/PromoFeaturesBlock/PromoFeaturesBlock.js +19 -16
- package/build/esm/blocks/PromoFeaturesBlock/index.d.ts +12 -0
- package/build/esm/blocks/PromoFeaturesBlock/index.js +15 -0
- package/build/esm/blocks/Questions/Questions.js +13 -11
- package/build/esm/blocks/Questions/index.d.ts +29 -0
- package/build/esm/blocks/Questions/index.js +44 -0
- package/build/esm/blocks/Share/Share.js +11 -10
- package/build/esm/blocks/Share/index.d.ts +12 -0
- package/build/esm/blocks/Share/index.js +15 -0
- package/build/esm/blocks/Slider/Slider.js +22 -17
- package/build/esm/blocks/Slider/dynamic-form.d.ts +3 -0
- package/build/esm/blocks/Slider/dynamic-form.js +222 -0
- package/build/esm/blocks/Slider/index.d.ts +8 -0
- package/build/esm/blocks/Slider/index.js +11 -0
- package/build/esm/blocks/Table/index.d.ts +8 -0
- package/build/esm/blocks/Table/index.js +11 -0
- package/build/esm/blocks/Table/schema.d.ts +1 -0
- package/build/esm/blocks/Table/schema.js +1 -0
- package/build/esm/blocks/Tabs/Tabs.js +10 -9
- package/build/esm/blocks/Tabs/index.d.ts +16 -0
- package/build/esm/blocks/Tabs/index.js +26 -0
- package/build/esm/blocks/TestEditorBlock/TestEditorBlock.d.ts +5 -0
- package/build/esm/blocks/TestEditorBlock/TestEditorBlock.js +7 -0
- package/build/esm/blocks/TestEditorBlock/form.d.ts +3 -0
- package/build/esm/blocks/TestEditorBlock/form.js +78 -0
- package/build/esm/blocks/TestEditorBlock/index.d.ts +11 -0
- package/build/esm/blocks/TestEditorBlock/index.js +13 -0
- package/build/esm/components/BlockBase/BlockBase.css +8 -16
- package/build/esm/components/Image/dynamic-form.d.ts +2 -0
- package/build/esm/components/Image/dynamic-form.js +80 -0
- package/build/esm/components/editor/ChildrenWrap/ChildrenWrap.css +5 -0
- package/build/esm/components/editor/ChildrenWrap/ChildrenWrap.d.ts +7 -0
- package/build/esm/components/editor/ChildrenWrap/ChildrenWrap.js +13 -0
- package/build/esm/components/editor/ItemWrap/ItemWrap.css +9 -0
- package/build/esm/components/editor/ItemWrap/ItemWrap.d.ts +7 -0
- package/build/esm/components/editor/ItemWrap/ItemWrap.js +13 -0
- package/build/esm/constructor-items.d.ts +18 -6
- package/build/esm/constructor-items.js +66 -0
- package/build/esm/containers/PageConstructor/PageConstructor.js +19 -16
- package/build/esm/containers/PageConstructor/Provider.js +4 -0
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +10 -6
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +5 -2
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/hooks/useEditorBlockMouseEvents.d.ts +8 -0
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/hooks/useEditorBlockMouseEvents.js +107 -0
- package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +7 -6
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorLoadable/ConstructorLoadable.js +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorRow/ConstructorRow.js +1 -3
- package/build/esm/context/blockIdContext/blockIdContext.d.ts +2 -2
- package/build/esm/context/blockIdContext/blockIdContext.js +1 -1
- package/build/esm/context/editorContext/editorContext.d.ts +13 -0
- package/build/esm/context/editorContext/editorContext.js +6 -0
- package/build/esm/context/editorContext/editorProvider.d.ts +2 -0
- package/build/esm/context/editorContext/editorProvider.js +15 -0
- package/build/esm/context/editorContext/hooks/useEditorStore.d.ts +2 -0
- package/build/esm/context/editorContext/hooks/useEditorStore.js +11 -0
- package/build/esm/context/editorContext/index.d.ts +4 -0
- package/build/esm/context/editorContext/index.js +4 -0
- package/build/esm/context/editorContext/store.d.ts +24 -0
- package/build/esm/context/editorContext/store.js +36 -0
- package/build/esm/context/messagesContext/hooks/useMessageObserver.d.ts +4 -0
- package/build/esm/context/messagesContext/hooks/useMessageObserver.js +12 -0
- package/build/esm/context/messagesContext/hooks/useMessageSender.d.ts +2 -0
- package/build/esm/context/messagesContext/hooks/useMessageSender.js +7 -0
- package/build/esm/context/messagesContext/hooks/useMessagesStore.d.ts +2 -0
- package/build/esm/context/messagesContext/hooks/useMessagesStore.js +11 -0
- package/build/esm/context/messagesContext/index.d.ts +5 -0
- package/build/esm/context/messagesContext/index.js +5 -0
- package/build/esm/context/messagesContext/messagesContext.d.ts +14 -0
- package/build/esm/context/messagesContext/messagesContext.js +8 -0
- package/build/esm/context/messagesContext/messagesProvider.d.ts +2 -0
- package/build/esm/context/messagesContext/messagesProvider.js +68 -0
- package/build/esm/context/messagesContext/store.d.ts +25 -0
- package/build/esm/context/messagesContext/store.js +14 -0
- package/build/esm/context/messagesContext/types.d.ts +14 -0
- package/build/esm/context/messagesContext/types.js +1 -0
- package/build/esm/grid/Col/Col.d.ts +1 -1
- package/build/esm/grid/Grid/Grid.css +2 -6
- package/build/esm/hooks/useAnalytics.js +1 -1
- package/build/esm/hooks/useEditorInitialize.d.ts +7 -0
- package/build/esm/hooks/useEditorInitialize.js +87 -0
- package/build/esm/models/constructor-items/blocks.d.ts +2 -1
- package/build/esm/models/constructor-items/blocks.js +1 -0
- package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -1
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js +4 -1
- package/build/esm/navigation/components/NavigationItem/components/NavigationButton/NavigationButton.js +4 -1
- package/build/esm/navigation/containers/Layout/Layout.css +0 -1
- package/build/esm/schema/constants.d.ts +1 -1
- package/build/esm/schema/constants.js +2 -1
- package/build/esm/schema/index.d.ts +227 -0
- package/build/esm/schema/index.js +6 -2
- package/build/esm/sub-blocks/BackgroundCard/dynamic-form.d.ts +2 -0
- package/build/esm/sub-blocks/BackgroundCard/dynamic-form.js +78 -0
- package/build/esm/sub-blocks/BackgroundCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/BackgroundCard/index.js +16 -0
- package/build/esm/sub-blocks/BannerCard/BannerCard.js +4 -3
- package/build/esm/sub-blocks/BannerCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/BannerCard/index.js +19 -0
- package/build/esm/sub-blocks/BasicCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/BasicCard/index.js +15 -0
- package/build/esm/sub-blocks/Content/index.d.ts +3 -0
- package/build/esm/sub-blocks/Content/index.js +15 -0
- package/build/esm/sub-blocks/Content/schema.d.ts +1 -0
- package/build/esm/sub-blocks/Content/schema.js +1 -0
- package/build/esm/sub-blocks/Divider/index.d.ts +3 -0
- package/build/esm/sub-blocks/Divider/index.js +12 -0
- package/build/esm/sub-blocks/ImageCard/ImageCard.js +2 -2
- package/build/esm/sub-blocks/ImageCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/ImageCard/index.js +15 -0
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +1 -1
- package/build/esm/sub-blocks/LayoutItem/form.d.ts +8 -0
- package/build/esm/sub-blocks/LayoutItem/form.js +11 -0
- package/build/esm/sub-blocks/LayoutItem/index.d.ts +3 -0
- package/build/esm/sub-blocks/LayoutItem/index.js +17 -0
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +254 -246
- package/build/esm/sub-blocks/LayoutItem/schema.js +6 -2
- package/build/esm/sub-blocks/MediaCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/MediaCard/index.js +17 -0
- package/build/esm/sub-blocks/PriceCard/index.d.ts +3 -0
- package/build/esm/sub-blocks/PriceCard/index.js +28 -0
- package/build/esm/sub-blocks/PriceDetailed/PriceDetailed.js +1 -1
- package/build/esm/sub-blocks/PriceDetailed/index.d.ts +4 -0
- package/build/esm/sub-blocks/PriceDetailed/index.js +30 -0
- package/build/esm/sub-blocks/Quote/index.d.ts +3 -0
- package/build/esm/sub-blocks/Quote/index.js +18 -0
- package/build/esm/types/actions/codes.d.ts +16 -0
- package/build/esm/types/actions/codes.js +23 -0
- package/build/esm/types/actions/index.d.ts +20 -0
- package/build/esm/types/actions/index.js +7 -0
- package/build/esm/types/actions/initial.d.ts +23 -0
- package/build/esm/types/actions/initial.js +1 -0
- package/build/esm/types/actions/insert.d.ts +19 -0
- package/build/esm/types/actions/insert.js +1 -0
- package/build/esm/types/actions/other.d.ts +16 -0
- package/build/esm/types/actions/other.js +1 -0
- package/build/esm/types/actions/overlay.d.ts +16 -0
- package/build/esm/types/actions/overlay.js +1 -0
- package/build/esm/types/actions/reorder.d.ts +17 -0
- package/build/esm/types/actions/reorder.js +1 -0
- package/build/esm/types/actions/select.d.ts +16 -0
- package/build/esm/types/actions/select.js +1 -0
- package/build/esm/types/dynamic-form.d.ts +92 -0
- package/build/esm/types/dynamic-form.js +1 -0
- package/build/esm/types/index.d.ts +14 -0
- package/build/esm/types/index.js +1 -0
- package/build/esm/utils/editor.d.ts +2 -0
- package/build/esm/utils/editor.js +20 -0
- package/build/esm/utils/form-generator.d.ts +9 -0
- package/build/esm/utils/form-generator.js +121 -0
- package/build/esm/utils/store.d.ts +16 -0
- package/build/esm/utils/store.js +5 -0
- package/package.json +5 -2
- package/server/models/constructor-items/blocks.d.ts +2 -1
- package/server/models/constructor-items/blocks.js +1 -0
- package/server/models/constructor-items/sub-blocks.d.ts +1 -1
- package/styles/mixins.scss +9 -9
- package/widget/index.js +1 -1
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { sliderSizesArray, textSize } from '../../schema/validators/common';
|
|
2
|
+
const textSizeEnum = textSize.map((size) => ({ value: size, content: size }));
|
|
3
|
+
export const blockConfig = {
|
|
4
|
+
name: 'Slider Block',
|
|
5
|
+
inputs: [
|
|
6
|
+
{
|
|
7
|
+
type: 'oneOf',
|
|
8
|
+
name: 'title',
|
|
9
|
+
title: 'Title Object',
|
|
10
|
+
options: [
|
|
11
|
+
{
|
|
12
|
+
title: 'Simple',
|
|
13
|
+
value: 'simple',
|
|
14
|
+
properties: [
|
|
15
|
+
{
|
|
16
|
+
type: 'text',
|
|
17
|
+
name: '',
|
|
18
|
+
title: 'Title',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: 'Complex',
|
|
24
|
+
value: 'complex',
|
|
25
|
+
properties: [
|
|
26
|
+
{
|
|
27
|
+
type: 'text',
|
|
28
|
+
name: 'text',
|
|
29
|
+
title: 'Title',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: 'select',
|
|
33
|
+
name: 'textSize',
|
|
34
|
+
title: 'Text Size',
|
|
35
|
+
enum: textSizeEnum,
|
|
36
|
+
view: 'select',
|
|
37
|
+
mode: 'single',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: 'text',
|
|
41
|
+
name: 'url',
|
|
42
|
+
title: 'Url',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: 'text',
|
|
46
|
+
name: 'urlTitle',
|
|
47
|
+
title: 'Url',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: 'boolean',
|
|
51
|
+
name: 'resetMargin',
|
|
52
|
+
title: 'Reset Margin',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: 'textarea',
|
|
60
|
+
name: 'description',
|
|
61
|
+
title: 'Description',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
type: 'boolean',
|
|
65
|
+
name: 'dots',
|
|
66
|
+
title: 'With dots',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
type: 'boolean',
|
|
70
|
+
name: 'arrows',
|
|
71
|
+
title: 'With Arrows',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
type: 'boolean',
|
|
75
|
+
name: 'randomOrder',
|
|
76
|
+
title: 'Random Order',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: 'number',
|
|
80
|
+
name: 'autoplay',
|
|
81
|
+
title: 'Autoplay',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'object',
|
|
85
|
+
name: 'disclaimer',
|
|
86
|
+
title: 'Disclaimer',
|
|
87
|
+
properties: [
|
|
88
|
+
{
|
|
89
|
+
type: 'text',
|
|
90
|
+
name: 'text',
|
|
91
|
+
title: 'Text',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: 'select',
|
|
95
|
+
name: 'size',
|
|
96
|
+
title: 'Size',
|
|
97
|
+
enum: textSizeEnum,
|
|
98
|
+
view: 'select',
|
|
99
|
+
mode: 'single',
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
type: 'oneOf',
|
|
105
|
+
name: 'slidesToShow',
|
|
106
|
+
title: 'Slides to Show',
|
|
107
|
+
options: [
|
|
108
|
+
{
|
|
109
|
+
title: 'Simple',
|
|
110
|
+
value: 'simple',
|
|
111
|
+
properties: [
|
|
112
|
+
{
|
|
113
|
+
type: 'number',
|
|
114
|
+
name: '',
|
|
115
|
+
title: 'Slides',
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
title: 'Complex',
|
|
121
|
+
value: 'complex',
|
|
122
|
+
properties: sliderSizesArray.reduce((acc, size) => {
|
|
123
|
+
acc.push({ type: 'number', name: size, title: size });
|
|
124
|
+
return acc;
|
|
125
|
+
}, []),
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
type: 'array',
|
|
131
|
+
name: 'array',
|
|
132
|
+
title: 'Array Properties',
|
|
133
|
+
buttonText: 'Add new',
|
|
134
|
+
arrayType: 'object',
|
|
135
|
+
properties: [
|
|
136
|
+
{
|
|
137
|
+
type: 'text',
|
|
138
|
+
name: 'text',
|
|
139
|
+
title: 'Property',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
type: 'boolean',
|
|
143
|
+
name: 'boolean',
|
|
144
|
+
title: 'Property',
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
};
|
|
150
|
+
export const exampleConfig = {
|
|
151
|
+
name: 'Slider Block',
|
|
152
|
+
inputs: [
|
|
153
|
+
{
|
|
154
|
+
type: 'text',
|
|
155
|
+
name: 'title',
|
|
156
|
+
title: 'Text Property',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
type: 'boolean',
|
|
160
|
+
name: '<ID>',
|
|
161
|
+
title: 'Boolean Property',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'number',
|
|
165
|
+
name: '<ID>',
|
|
166
|
+
title: 'Number Property',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
type: 'textarea',
|
|
170
|
+
name: '<ID>',
|
|
171
|
+
title: 'TextArea Property',
|
|
172
|
+
showIf: `block.description === 'Test'`,
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
type: 'select',
|
|
176
|
+
name: 'select',
|
|
177
|
+
title: 'Select Property',
|
|
178
|
+
enum: [
|
|
179
|
+
{ content: 'Option 1', value: 'option-1' },
|
|
180
|
+
{ content: 'Option 2', value: 'option-2' },
|
|
181
|
+
],
|
|
182
|
+
mode: 'single',
|
|
183
|
+
view: 'select',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
type: 'object',
|
|
187
|
+
name: 'object_data',
|
|
188
|
+
title: 'Object Property',
|
|
189
|
+
properties: [
|
|
190
|
+
{
|
|
191
|
+
type: 'text',
|
|
192
|
+
name: 'text',
|
|
193
|
+
title: 'Property',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
type: 'boolean',
|
|
197
|
+
name: 'boolean',
|
|
198
|
+
title: 'Property',
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
type: 'array',
|
|
204
|
+
name: 'array',
|
|
205
|
+
title: 'Array Properties',
|
|
206
|
+
buttonText: 'Add new',
|
|
207
|
+
arrayType: 'object',
|
|
208
|
+
properties: [
|
|
209
|
+
{
|
|
210
|
+
type: 'text',
|
|
211
|
+
name: 'text',
|
|
212
|
+
title: 'Property',
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
type: 'boolean',
|
|
216
|
+
name: 'boolean',
|
|
217
|
+
title: 'Property',
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const SliderBlockConfig: {
|
|
2
|
+
component: (props: import("../..").WithChildren<import("./Slider").SliderProps>) => JSX.Element;
|
|
3
|
+
schema: {
|
|
4
|
+
name: string;
|
|
5
|
+
inputs: import("../../types/dynamic-form").ConfigInput[];
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export default SliderBlockConfig;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import SliderBlock from './Slider';
|
|
3
|
+
import { SliderBlock as SliderBlockSchema } from './schema';
|
|
4
|
+
const SliderBlockConfig = {
|
|
5
|
+
component: SliderBlock,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Slider Block',
|
|
8
|
+
inputs: generateFromAJV(SliderBlockSchema['slider-block']),
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
export default SliderBlockConfig;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import TableBlock from './Table';
|
|
3
|
+
import { TableBlock as TableBlockSchema } from './schema';
|
|
4
|
+
const TableBlockConfig = {
|
|
5
|
+
component: TableBlock,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Table Block',
|
|
8
|
+
inputs: generateFromAJV(TableBlockSchema['table-block']),
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
export default TableBlockConfig;
|
|
@@ -9,7 +9,7 @@ import Title from '../../components/Title/Title';
|
|
|
9
9
|
import { getHeight } from '../../components/VideoBlock/VideoBlock';
|
|
10
10
|
import YFMWrapper from '../../components/YFMWrapper/YFMWrapper';
|
|
11
11
|
import { useTheme } from '../../context/theme';
|
|
12
|
-
import { Col, GridColumnOrderClasses, Row } from '../../grid';
|
|
12
|
+
import { Col, Grid, GridColumnOrderClasses, Row } from '../../grid';
|
|
13
13
|
import { block, getThemedValue } from '../../utils';
|
|
14
14
|
import TabsTextContent from './TabsTextContent/TabsTextContent';
|
|
15
15
|
import './Tabs.css';
|
|
@@ -72,13 +72,14 @@ export const TabsBlock = ({ items, title, description, animated, tabsColSizes, c
|
|
|
72
72
|
React.createElement(FullscreenImage, Object.assign({}, imageProps, { imageClassName: b('image', { border }) })))),
|
|
73
73
|
(activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.caption) && (React.createElement("p", { className: b('caption'), id: captionId },
|
|
74
74
|
React.createElement(YFMWrapper, { content: activeTabData.caption, modifiers: { constructor: true }, id: captionId })))));
|
|
75
|
-
return (React.createElement(
|
|
76
|
-
React.createElement(
|
|
77
|
-
|
|
78
|
-
React.createElement(
|
|
79
|
-
React.createElement(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
return (React.createElement(Grid, null,
|
|
76
|
+
React.createElement(AnimateBlock, { className: b(), onScroll: () => setPlay(true), animate: animated },
|
|
77
|
+
React.createElement(Title, { title: title, subtitle: description, className: b('title', { centered: centered }) }),
|
|
78
|
+
React.createElement(Row, null,
|
|
79
|
+
React.createElement(Col, { sizes: tabsColSizes },
|
|
80
|
+
React.createElement(ButtonTabs, { items: tabs, onSelectTab: onSelectTab, activeTab: activeTab, className: b('tabs', { centered: centered }) }))),
|
|
81
|
+
activeTabData && (React.createElement(Row, { className: b('row', { reverse: isReverse }) },
|
|
82
|
+
mediaContent,
|
|
83
|
+
textContent)))));
|
|
83
84
|
};
|
|
84
85
|
export default TabsBlock;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const TabsBlockConfig: {
|
|
2
|
+
component: ({ items, title, description, animated, tabsColSizes, centered, direction, contentSize, }: import("../..").TabsBlockProps) => JSX.Element;
|
|
3
|
+
schema: {
|
|
4
|
+
name: string;
|
|
5
|
+
inputs: import("../../types/dynamic-form").ConfigInput[];
|
|
6
|
+
default: {
|
|
7
|
+
title: string;
|
|
8
|
+
items: {
|
|
9
|
+
tabName: string;
|
|
10
|
+
text: string;
|
|
11
|
+
title: string;
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default TabsBlockConfig;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { generateFromAJV } from '../../utils/form-generator';
|
|
2
|
+
import TabsBlock from './Tabs';
|
|
3
|
+
import { TabsBlock as TabsBlockSchema } from './schema';
|
|
4
|
+
const TabsBlockConfig = {
|
|
5
|
+
component: TabsBlock,
|
|
6
|
+
schema: {
|
|
7
|
+
name: 'Tabs Block',
|
|
8
|
+
inputs: generateFromAJV(TabsBlockSchema['tabs-block']),
|
|
9
|
+
default: {
|
|
10
|
+
title: 'Tabs Block',
|
|
11
|
+
items: [
|
|
12
|
+
{
|
|
13
|
+
tabName: 'First Tab',
|
|
14
|
+
text: 'First Tab Content',
|
|
15
|
+
title: 'First Tab Title',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
text: 'Second Tab Content',
|
|
19
|
+
title: 'Second Tab Title',
|
|
20
|
+
tabName: 'Second Tab',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
export default TabsBlockConfig;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { block } from '../../utils';
|
|
3
|
+
const b = block('test-editor-block');
|
|
4
|
+
export const TestEditorBlock = (props) => {
|
|
5
|
+
return React.createElement("div", { className: b() }, JSON.stringify(props, null, 2));
|
|
6
|
+
};
|
|
7
|
+
export default TestEditorBlock;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ArrayObjectInput, ArrayTextInput, BooleanInput, NumberInput, ObjectInput, OneOfInput, SelectMultipleInput, SelectSingleInput, TextAreaInput, TextInput } from '../../types/dynamic-form';
|
|
2
|
+
declare const _default: (TextInput | BooleanInput | NumberInput | TextAreaInput | SelectSingleInput | SelectMultipleInput | ObjectInput | ArrayTextInput | ArrayObjectInput | OneOfInput)[];
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
const textInput = {
|
|
2
|
+
type: 'text',
|
|
3
|
+
name: 'text',
|
|
4
|
+
title: 'Text Input',
|
|
5
|
+
};
|
|
6
|
+
const textAreaInput = {
|
|
7
|
+
type: 'textarea',
|
|
8
|
+
name: 'textarea',
|
|
9
|
+
title: 'TextArea Input',
|
|
10
|
+
};
|
|
11
|
+
const booleanInput = {
|
|
12
|
+
type: 'boolean',
|
|
13
|
+
name: 'boolean',
|
|
14
|
+
title: 'Boolean Input',
|
|
15
|
+
};
|
|
16
|
+
const numberInput = {
|
|
17
|
+
type: 'number',
|
|
18
|
+
name: 'number',
|
|
19
|
+
title: 'Number Input',
|
|
20
|
+
};
|
|
21
|
+
const selectInput = {
|
|
22
|
+
type: 'select',
|
|
23
|
+
name: 'selectSingle',
|
|
24
|
+
title: 'Select Single Input',
|
|
25
|
+
mode: 'single',
|
|
26
|
+
view: 'select',
|
|
27
|
+
enum: [
|
|
28
|
+
{ value: 'id_1', content: 'Option 1' },
|
|
29
|
+
{ value: 'id_2', content: 'Option 2' },
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
const radioButtonsViewSingleInput = Object.assign(Object.assign({}, selectInput), { name: 'radioButtons', title: 'Radio Button Input', view: 'radiobutton' });
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
const selectMultipleModeInput = Object.assign(Object.assign({}, selectInput), { name: 'selectMultiple', title: 'Select Multiple Input', mode: 'multiple' });
|
|
35
|
+
const objectInput = {
|
|
36
|
+
type: 'object',
|
|
37
|
+
name: 'object',
|
|
38
|
+
title: 'Object Input',
|
|
39
|
+
properties: [textInput, textAreaInput, selectInput],
|
|
40
|
+
};
|
|
41
|
+
const arrayTextInput = {
|
|
42
|
+
type: 'array',
|
|
43
|
+
name: 'arrayText',
|
|
44
|
+
title: 'Array Text Input',
|
|
45
|
+
buttonText: 'Add Array Item',
|
|
46
|
+
arrayType: 'text',
|
|
47
|
+
};
|
|
48
|
+
const arrayObjectInput = {
|
|
49
|
+
type: 'array',
|
|
50
|
+
name: 'arrayObject',
|
|
51
|
+
title: 'Array Object Input',
|
|
52
|
+
buttonText: 'Add Array Item',
|
|
53
|
+
arrayType: 'object',
|
|
54
|
+
properties: [textInput, textAreaInput, selectInput],
|
|
55
|
+
};
|
|
56
|
+
const oneOfInput = {
|
|
57
|
+
type: 'oneOf',
|
|
58
|
+
name: 'oneOf',
|
|
59
|
+
key: 'oneOfKey',
|
|
60
|
+
title: 'Array Text Input',
|
|
61
|
+
options: [
|
|
62
|
+
{ value: 'text', title: 'Text', properties: [textInput] },
|
|
63
|
+
{ value: 'textarea', title: 'TextArea', properties: [textAreaInput] },
|
|
64
|
+
],
|
|
65
|
+
};
|
|
66
|
+
export default [
|
|
67
|
+
textInput,
|
|
68
|
+
textAreaInput,
|
|
69
|
+
booleanInput,
|
|
70
|
+
numberInput,
|
|
71
|
+
selectInput,
|
|
72
|
+
radioButtonsViewSingleInput,
|
|
73
|
+
selectMultipleModeInput,
|
|
74
|
+
objectInput,
|
|
75
|
+
arrayTextInput,
|
|
76
|
+
arrayObjectInput,
|
|
77
|
+
oneOfInput,
|
|
78
|
+
];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const TestEditorBlockConfig: {
|
|
2
|
+
component: (props: import("./TestEditorBlock").TestEditorBlockProps) => JSX.Element;
|
|
3
|
+
schema: {
|
|
4
|
+
name: string;
|
|
5
|
+
inputs: (import("../../types/dynamic-form").TextInput | import("../../types/dynamic-form").BooleanInput | import("../../types/dynamic-form").NumberInput | import("../../types/dynamic-form").TextAreaInput | import("../../types/dynamic-form").SelectSingleInput | import("../../types/dynamic-form").SelectMultipleInput | import("../../types/dynamic-form").ObjectInput | import("../../types/dynamic-form").ArrayTextInput | import("../../types/dynamic-form").ArrayObjectInput | import("../../types/dynamic-form").OneOfInput)[];
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export declare const TestEditorBlockSchema: {
|
|
9
|
+
"test-editor-block": {};
|
|
10
|
+
};
|
|
11
|
+
export default TestEditorBlockConfig;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import TestEditorBlock from './TestEditorBlock';
|
|
2
|
+
import testEditorBlockInputs from './form';
|
|
3
|
+
const TestEditorBlockConfig = {
|
|
4
|
+
component: TestEditorBlock,
|
|
5
|
+
schema: {
|
|
6
|
+
name: 'Test Editor Block',
|
|
7
|
+
inputs: testEditorBlockInputs,
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
export const TestEditorBlockSchema = {
|
|
11
|
+
['test-editor-block']: {},
|
|
12
|
+
};
|
|
13
|
+
export default TestEditorBlockConfig;
|
|
@@ -4,30 +4,25 @@ unpredictable css rules order in build */
|
|
|
4
4
|
--anchor-offset: 48px;
|
|
5
5
|
}
|
|
6
6
|
.pc-block-base.pc-block-base {
|
|
7
|
-
|
|
8
|
-
padding: 0 0 48px;
|
|
7
|
+
padding: 48px 0;
|
|
9
8
|
}
|
|
10
|
-
.pc-block-base.pc-block-base:first-child {
|
|
11
|
-
margin-top: var(--pc-first-block-indent, 96px);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
9
|
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_0 {
|
|
15
|
-
|
|
10
|
+
padding-top: 0;
|
|
16
11
|
}
|
|
17
12
|
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_xs {
|
|
18
|
-
|
|
13
|
+
padding-top: 16px;
|
|
19
14
|
}
|
|
20
15
|
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_s {
|
|
21
|
-
|
|
16
|
+
padding-top: 24px;
|
|
22
17
|
}
|
|
23
18
|
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_m {
|
|
24
|
-
|
|
19
|
+
padding-top: 32px;
|
|
25
20
|
}
|
|
26
21
|
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_l {
|
|
27
|
-
|
|
22
|
+
padding-top: 48px;
|
|
28
23
|
}
|
|
29
24
|
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentTop_xl {
|
|
30
|
-
|
|
25
|
+
padding-top: 64px;
|
|
31
26
|
}
|
|
32
27
|
.pc-block-base.pc-block-base.pc-block-base.pc-block-base_indentBottom_0 {
|
|
33
28
|
padding-bottom: 0;
|
|
@@ -50,12 +45,9 @@ unpredictable css rules order in build */
|
|
|
50
45
|
|
|
51
46
|
@media only screen and (max-width: 577px) {
|
|
52
47
|
.pc-block-base.pc-block-base {
|
|
53
|
-
|
|
48
|
+
padding-top: 32px;
|
|
54
49
|
padding-bottom: 32px;
|
|
55
50
|
}
|
|
56
|
-
.pc-block-base.pc-block-base:first-child {
|
|
57
|
-
margin-top: var(--pc-first-block-mobile-indent, 64px);
|
|
58
|
-
}
|
|
59
51
|
}
|
|
60
52
|
|
|
61
53
|
.pc-block-base_reset-paddings.pc-block-base.pc-block-base_reset-paddings.pc-block-base {
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
const devices = ['desktop', 'tablet', 'mobile'];
|
|
3
|
+
const imageBaseInputs = [
|
|
4
|
+
{
|
|
5
|
+
type: 'text',
|
|
6
|
+
name: 'alt',
|
|
7
|
+
title: 'Alternative',
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
type: 'boolean',
|
|
11
|
+
name: 'disableCompress',
|
|
12
|
+
title: 'Disable Compress',
|
|
13
|
+
},
|
|
14
|
+
];
|
|
15
|
+
const imageStyleInputs = [
|
|
16
|
+
{
|
|
17
|
+
type: 'text',
|
|
18
|
+
name: 'style.backgroundColor',
|
|
19
|
+
title: 'Background Color',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
type: 'text',
|
|
23
|
+
name: 'style.height',
|
|
24
|
+
title: 'Height',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
type: 'text',
|
|
28
|
+
name: 'style.width',
|
|
29
|
+
title: 'Width',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: 'text',
|
|
33
|
+
name: 'style.color',
|
|
34
|
+
title: 'Color',
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
const devicesInputs = devices.map((device) => ({
|
|
38
|
+
type: 'text',
|
|
39
|
+
title: _.capitalize(device),
|
|
40
|
+
name: `${device}`,
|
|
41
|
+
}));
|
|
42
|
+
export const imageInputs = [
|
|
43
|
+
{
|
|
44
|
+
type: 'oneOf',
|
|
45
|
+
name: '',
|
|
46
|
+
key: 'imageType',
|
|
47
|
+
title: 'Image Type',
|
|
48
|
+
options: [
|
|
49
|
+
{
|
|
50
|
+
title: 'Simple',
|
|
51
|
+
value: 'simple',
|
|
52
|
+
properties: [
|
|
53
|
+
{
|
|
54
|
+
type: 'text',
|
|
55
|
+
name: '',
|
|
56
|
+
title: 'Image URL',
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
title: 'Complex',
|
|
62
|
+
value: 'complex',
|
|
63
|
+
properties: [
|
|
64
|
+
{
|
|
65
|
+
type: 'text',
|
|
66
|
+
name: 'src',
|
|
67
|
+
title: 'Source',
|
|
68
|
+
},
|
|
69
|
+
...imageStyleInputs,
|
|
70
|
+
...imageBaseInputs,
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: 'Device Based',
|
|
75
|
+
value: 'deviseBased',
|
|
76
|
+
properties: [...devicesInputs, ...imageBaseInputs],
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import './ChildrenWrap.css';
|
|
3
|
+
export interface ChildrenWrapProps extends PropsWithChildren {
|
|
4
|
+
checkChildren?: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const ChildrenWrap: (props: ChildrenWrapProps) => JSX.Element;
|
|
7
|
+
export default ChildrenWrap;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import useEditorBlockMouseEvents from '../../../containers/PageConstructor/components/ConstructorBlock/hooks/useEditorBlockMouseEvents';
|
|
3
|
+
import { BlockIdContext } from '../../../context/blockIdContext';
|
|
4
|
+
import { block } from '../../../utils';
|
|
5
|
+
import './ChildrenWrap.css';
|
|
6
|
+
const b = block('children-wrap');
|
|
7
|
+
const ChildrenWrap = (props) => {
|
|
8
|
+
const { children } = props;
|
|
9
|
+
const parentBlockId = useContext(BlockIdContext);
|
|
10
|
+
const { onMouseUp, onMouseMove } = useEditorBlockMouseEvents([parentBlockId, 0]);
|
|
11
|
+
return (React.createElement("div", { className: b(), onMouseMove: onMouseMove, onMouseUp: onMouseUp }, children));
|
|
12
|
+
};
|
|
13
|
+
export default ChildrenWrap;
|