@gravity-ui/page-constructor 8.5.0-alpha.1 → 8.5.0-alpha.12
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 +1 -1
- package/build/cjs/blocks/Banner/Banner.js.map +1 -1
- package/build/cjs/blocks/Banner/form.d.ts +8 -5
- package/build/cjs/blocks/Banner/form.js +12 -16
- package/build/cjs/blocks/Banner/form.js.map +1 -1
- package/build/cjs/blocks/Banner/index.js +3 -12
- package/build/cjs/blocks/Banner/index.js.map +1 -1
- package/build/cjs/blocks/Banner/index_deprecated.js +5 -11
- package/build/cjs/blocks/Banner/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/CardLayout/CardLayout.js +2 -2
- package/build/cjs/blocks/CardLayout/CardLayout.js.map +1 -1
- package/build/cjs/blocks/CardLayout/form.d.ts +11 -0
- package/build/cjs/blocks/CardLayout/form.js +30 -0
- package/build/cjs/blocks/CardLayout/form.js.map +1 -0
- package/build/cjs/blocks/CardLayout/index.js +5 -43
- package/build/cjs/blocks/CardLayout/index.js.map +1 -1
- package/build/cjs/blocks/CardLayout/index_deprecated.js +5 -26
- package/build/cjs/blocks/CardLayout/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/Companies/form.d.ts +5 -0
- package/build/cjs/blocks/Companies/form.js +12 -0
- package/build/cjs/blocks/Companies/form.js.map +1 -0
- package/build/cjs/blocks/Companies/index.js +4 -9
- package/build/cjs/blocks/Companies/index.js.map +1 -1
- package/build/cjs/blocks/Companies/index_deprecated.js +3 -7
- package/build/cjs/blocks/Companies/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/ContentLayout/form.d.ts +34 -0
- package/build/cjs/blocks/ContentLayout/form.js +511 -0
- package/build/cjs/blocks/ContentLayout/form.js.map +1 -0
- package/build/cjs/blocks/ContentLayout/index.d.ts +1 -2
- package/build/cjs/blocks/ContentLayout/index.js +3 -511
- package/build/cjs/blocks/ContentLayout/index.js.map +1 -1
- package/build/cjs/blocks/ContentLayout/index_deprecated.d.ts +1 -1
- package/build/cjs/blocks/ContentLayout/index_deprecated.js +3 -68
- package/build/cjs/blocks/ContentLayout/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/ExtendedFeatures/form.d.ts +50 -0
- package/build/cjs/blocks/ExtendedFeatures/form.js +68 -0
- package/build/cjs/blocks/ExtendedFeatures/form.js.map +1 -0
- package/build/cjs/blocks/ExtendedFeatures/index.js +3 -65
- package/build/cjs/blocks/ExtendedFeatures/index.js.map +1 -1
- package/build/cjs/blocks/ExtendedFeatures/index_deprecated.d.ts +2 -1
- package/build/cjs/blocks/ExtendedFeatures/index_deprecated.js +5 -64
- package/build/cjs/blocks/ExtendedFeatures/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/FilterBlock/form.d.ts +21 -0
- package/build/cjs/blocks/FilterBlock/form.js +90 -0
- package/build/cjs/blocks/FilterBlock/form.js.map +1 -0
- package/build/cjs/blocks/FilterBlock/index.d.ts +1 -1
- package/build/cjs/blocks/FilterBlock/index.js +4 -87
- package/build/cjs/blocks/FilterBlock/index.js.map +1 -1
- package/build/cjs/blocks/FilterBlock/index_deprecated.d.ts +1 -1
- package/build/cjs/blocks/FilterBlock/index_deprecated.js +3 -85
- package/build/cjs/blocks/FilterBlock/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/FoldableList/form.d.ts +8 -0
- package/build/cjs/blocks/FoldableList/form.js +20 -0
- package/build/cjs/blocks/FoldableList/form.js.map +1 -0
- package/build/cjs/blocks/FoldableList/index.d.ts +3 -0
- package/build/cjs/blocks/FoldableList/index.js +17 -0
- package/build/cjs/blocks/FoldableList/index.js.map +1 -0
- package/build/cjs/blocks/FoldableList/index_deprecated.d.ts +3 -0
- package/build/cjs/blocks/FoldableList/index_deprecated.js +18 -0
- package/build/cjs/blocks/FoldableList/index_deprecated.js.map +1 -0
- package/build/cjs/blocks/FoldableList/schema.d.ts +5 -5
- package/build/cjs/blocks/Form/formConfig.d.ts +5 -0
- package/build/cjs/blocks/Form/formConfig.js +12 -0
- package/build/cjs/blocks/Form/formConfig.js.map +1 -0
- package/build/cjs/blocks/Form/index.d.ts +1 -1
- package/build/cjs/blocks/Form/index.js +4 -9
- package/build/cjs/blocks/Form/index.js.map +1 -1
- package/build/cjs/blocks/Form/index_deprecated.d.ts +1 -1
- package/build/cjs/blocks/Form/index_deprecated.js +3 -7
- package/build/cjs/blocks/Form/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/Header/form.d.ts +12 -0
- package/build/cjs/blocks/Header/form.js +337 -0
- package/build/cjs/blocks/Header/form.js.map +1 -0
- package/build/cjs/blocks/Header/index.js +3 -333
- package/build/cjs/blocks/Header/index.js.map +1 -1
- package/build/cjs/blocks/Header/index_deprecated.js +3 -20
- package/build/cjs/blocks/Header/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/HeaderSlider/form.d.ts +24 -0
- package/build/cjs/blocks/HeaderSlider/form.js +32 -0
- package/build/cjs/blocks/HeaderSlider/form.js.map +1 -0
- package/build/cjs/blocks/HeaderSlider/index.d.ts +1 -1
- package/build/cjs/blocks/HeaderSlider/index.js +4 -29
- package/build/cjs/blocks/HeaderSlider/index.js.map +1 -1
- package/build/cjs/blocks/HeaderSlider/index_deprecated.d.ts +1 -1
- package/build/cjs/blocks/HeaderSlider/index_deprecated.js +3 -27
- package/build/cjs/blocks/HeaderSlider/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +3 -3
- package/build/cjs/blocks/Hero/form.d.ts +9 -0
- package/build/cjs/blocks/Hero/form.js +17 -0
- package/build/cjs/blocks/Hero/form.js.map +1 -0
- package/build/cjs/blocks/Hero/index.d.ts +3 -0
- package/build/cjs/blocks/Hero/index.js +17 -0
- package/build/cjs/blocks/Hero/index.js.map +1 -0
- package/build/cjs/blocks/Hero/index_deprecated.d.ts +3 -0
- package/build/cjs/blocks/Hero/index_deprecated.js +18 -0
- package/build/cjs/blocks/Hero/index_deprecated.js.map +1 -0
- package/build/cjs/blocks/Hero/schema.d.ts +10 -10
- package/build/cjs/blocks/Icons/form.d.ts +12 -0
- package/build/cjs/blocks/Icons/form.js +56 -0
- package/build/cjs/blocks/Icons/form.js.map +1 -0
- package/build/cjs/blocks/Icons/index.d.ts +1 -1
- package/build/cjs/blocks/Icons/index.js +4 -53
- package/build/cjs/blocks/Icons/index.js.map +1 -1
- package/build/cjs/blocks/Icons/index_deprecated.d.ts +1 -1
- package/build/cjs/blocks/Icons/index_deprecated.js +3 -51
- package/build/cjs/blocks/Icons/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/Info/form.d.ts +14 -0
- package/build/cjs/blocks/Info/form.js +35 -0
- package/build/cjs/blocks/Info/form.js.map +1 -0
- package/build/cjs/blocks/Info/index.d.ts +1 -1
- package/build/cjs/blocks/Info/index.js +3 -31
- package/build/cjs/blocks/Info/index.js.map +1 -1
- package/build/cjs/blocks/Info/index_deprecated.d.ts +2 -1
- package/build/cjs/blocks/Info/index_deprecated.js +5 -30
- package/build/cjs/blocks/Info/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/Map/form.d.ts +4 -0
- package/build/cjs/blocks/Map/form.js +11 -0
- package/build/cjs/blocks/Map/form.js.map +1 -0
- package/build/cjs/blocks/Map/index.d.ts +1 -1
- package/build/cjs/blocks/Map/index.js +4 -8
- package/build/cjs/blocks/Map/index.js.map +1 -1
- package/build/cjs/blocks/Map/index_deprecated.d.ts +1 -1
- package/build/cjs/blocks/Map/index_deprecated.js +3 -6
- package/build/cjs/blocks/Map/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/Media/form.d.ts +35 -0
- package/build/cjs/blocks/Media/form.js +480 -0
- package/build/cjs/blocks/Media/form.js.map +1 -0
- package/build/cjs/blocks/Media/index.d.ts +1 -2
- package/build/cjs/blocks/Media/index.js +3 -481
- package/build/cjs/blocks/Media/index.js.map +1 -1
- package/build/cjs/blocks/Media/index_deprecated.d.ts +6 -2
- package/build/cjs/blocks/Media/index_deprecated.js +3 -43
- package/build/cjs/blocks/Media/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/PromoFeaturesBlock/form.d.ts +14 -0
- package/build/cjs/blocks/PromoFeaturesBlock/form.js +41 -0
- package/build/cjs/blocks/PromoFeaturesBlock/form.js.map +1 -0
- package/build/cjs/blocks/PromoFeaturesBlock/index.js +4 -38
- package/build/cjs/blocks/PromoFeaturesBlock/index.js.map +1 -1
- package/build/cjs/blocks/PromoFeaturesBlock/index_deprecated.d.ts +1 -1
- package/build/cjs/blocks/PromoFeaturesBlock/index_deprecated.js +3 -36
- package/build/cjs/blocks/PromoFeaturesBlock/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/Questions/form.d.ts +22 -0
- package/build/cjs/blocks/Questions/form.js +41 -0
- package/build/cjs/blocks/Questions/form.js.map +1 -0
- package/build/cjs/blocks/Questions/index.js +3 -37
- package/build/cjs/blocks/Questions/index.js.map +1 -1
- package/build/cjs/blocks/Questions/index_deprecated.d.ts +2 -1
- package/build/cjs/blocks/Questions/index_deprecated.js +5 -36
- package/build/cjs/blocks/Questions/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/Questions/schema.d.ts +5 -5
- package/build/cjs/blocks/Share/form.d.ts +5 -0
- package/build/cjs/blocks/Share/form.js +12 -0
- package/build/cjs/blocks/Share/form.js.map +1 -0
- package/build/cjs/blocks/Share/index.d.ts +1 -1
- package/build/cjs/blocks/Share/index.js +4 -9
- package/build/cjs/blocks/Share/index.js.map +1 -1
- package/build/cjs/blocks/Share/index_deprecated.d.ts +1 -1
- package/build/cjs/blocks/Share/index_deprecated.js +3 -7
- package/build/cjs/blocks/Share/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/Slider/form.d.ts +19 -0
- package/build/cjs/blocks/Slider/form.js +38 -0
- package/build/cjs/blocks/Slider/form.js.map +1 -0
- package/build/cjs/blocks/Slider/index.d.ts +1 -1
- package/build/cjs/blocks/Slider/index.js +3 -34
- package/build/cjs/blocks/Slider/index.js.map +1 -1
- package/build/cjs/blocks/Slider/index_deprecated.d.ts +1 -1
- package/build/cjs/blocks/Slider/index_deprecated.js +5 -34
- package/build/cjs/blocks/Slider/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/SliderOld/form.d.ts +5 -0
- package/build/cjs/blocks/SliderOld/form.js +11 -0
- package/build/cjs/blocks/SliderOld/form.js.map +1 -0
- package/build/cjs/blocks/SliderOld/index.d.ts +3 -0
- package/build/cjs/blocks/SliderOld/index.js +17 -0
- package/build/cjs/blocks/SliderOld/index.js.map +1 -0
- package/build/cjs/blocks/SliderOld/index_deprecated.d.ts +3 -0
- package/build/cjs/blocks/SliderOld/index_deprecated.js +18 -0
- package/build/cjs/blocks/SliderOld/index_deprecated.js.map +1 -0
- package/build/cjs/blocks/Table/form.d.ts +10 -0
- package/build/cjs/blocks/Table/form.js +24 -0
- package/build/cjs/blocks/Table/form.js.map +1 -0
- package/build/cjs/blocks/Table/index.d.ts +1 -1
- package/build/cjs/blocks/Table/index.js +4 -21
- package/build/cjs/blocks/Table/index.js.map +1 -1
- package/build/cjs/blocks/Table/index_deprecated.d.ts +1 -1
- package/build/cjs/blocks/Table/index_deprecated.js +3 -19
- package/build/cjs/blocks/Table/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/Tabs/form.d.ts +9 -0
- package/build/cjs/blocks/Tabs/form.js +22 -0
- package/build/cjs/blocks/Tabs/form.js.map +1 -0
- package/build/cjs/blocks/Tabs/index.d.ts +1 -1
- package/build/cjs/blocks/Tabs/index.js +3 -18
- package/build/cjs/blocks/Tabs/index.js.map +1 -1
- package/build/cjs/blocks/Tabs/index_deprecated.d.ts +2 -1
- package/build/cjs/blocks/Tabs/index_deprecated.js +5 -18
- package/build/cjs/blocks/Tabs/index_deprecated.js.map +1 -1
- package/build/cjs/blocks/index.js +78 -72
- package/build/cjs/blocks/index.js.map +1 -1
- package/build/cjs/common/constants.d.ts +1 -0
- package/build/cjs/common/constants.js +5 -0
- package/build/cjs/common/constants.js.map +1 -0
- package/build/cjs/common/postMessage.d.ts +1 -0
- package/build/cjs/common/postMessage.js +13 -5
- package/build/cjs/common/postMessage.js.map +1 -1
- package/build/cjs/common/types/messages.d.ts +3 -0
- package/build/cjs/common/types/messages.js.map +1 -1
- package/build/cjs/components/editor/ChildrenItemWrap/ChildrenItemWrap.d.ts +3 -2
- package/build/cjs/components/editor/ChildrenItemWrap/ChildrenItemWrap.js +2 -2
- package/build/cjs/components/editor/ChildrenItemWrap/ChildrenItemWrap.js.map +1 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.d.ts +0 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.js +0 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.js.map +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +0 -4
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.css +6 -0
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +3 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js.map +1 -1
- package/build/cjs/context/editorStoreContext/PCEditorStoreProvider.js +5 -3
- package/build/cjs/context/editorStoreContext/PCEditorStoreProvider.js.map +1 -1
- package/build/cjs/editor-v2/components/BlockCard/BlockCard.js +2 -2
- package/build/cjs/editor-v2/components/BlockCard/BlockCard.js.map +1 -1
- package/build/cjs/editor-v2/components/BlockCard/defaultIcon.d.ts +1 -0
- package/build/cjs/editor-v2/components/BlockCard/defaultIcon.js +11 -0
- package/build/cjs/editor-v2/components/BlockCard/defaultIcon.js.map +1 -0
- package/build/cjs/editor-v2/containers/MiddleScreen/MiddleScreen.css +18 -3
- package/build/cjs/editor-v2/containers/MiddleScreen/MiddleScreen.js +13 -2
- package/build/cjs/editor-v2/containers/MiddleScreen/MiddleScreen.js.map +1 -1
- package/build/cjs/editor-v2/context/editorStore/MainEditorStoreProvider.js +2 -0
- package/build/cjs/editor-v2/context/editorStore/MainEditorStoreProvider.js.map +1 -1
- package/build/cjs/form-builder-v2/CanvasContentContext.d.ts +18 -0
- package/build/cjs/form-builder-v2/CanvasContentContext.js +21 -0
- package/build/cjs/form-builder-v2/CanvasContentContext.js.map +1 -0
- package/build/cjs/form-builder-v2/FormBuilderV2.css +93 -0
- package/build/cjs/form-builder-v2/FormBuilderV2.d.ts +10 -0
- package/build/cjs/form-builder-v2/FormBuilderV2.js +123 -0
- package/build/cjs/form-builder-v2/FormBuilderV2.js.map +1 -0
- package/build/cjs/form-builder-v2/components/Canvas/Canvas.css +15 -0
- package/build/cjs/form-builder-v2/components/Canvas/Canvas.d.ts +8 -0
- package/build/cjs/form-builder-v2/components/Canvas/Canvas.js +17 -0
- package/build/cjs/form-builder-v2/components/Canvas/Canvas.js.map +1 -0
- package/build/cjs/form-builder-v2/components/CanvasCard/CanvasCard.css +133 -0
- package/build/cjs/form-builder-v2/components/CanvasCard/CanvasCard.d.ts +9 -0
- package/build/cjs/form-builder-v2/components/CanvasCard/CanvasCard.js +72 -0
- package/build/cjs/form-builder-v2/components/CanvasCard/CanvasCard.js.map +1 -0
- package/build/cjs/form-builder-v2/components/CanvasCard/components/FieldPreview.d.ts +6 -0
- package/build/cjs/form-builder-v2/components/CanvasCard/components/FieldPreview.js +44 -0
- package/build/cjs/form-builder-v2/components/CanvasCard/components/FieldPreview.js.map +1 -0
- package/build/cjs/form-builder-v2/components/CanvasCard/components/SectionChildrenDropZone.d.ts +9 -0
- package/build/cjs/form-builder-v2/components/CanvasCard/components/SectionChildrenDropZone.js +20 -0
- package/build/cjs/form-builder-v2/components/CanvasCard/components/SectionChildrenDropZone.js.map +1 -0
- package/build/cjs/form-builder-v2/components/ContentTab/ContentTab.css +22 -0
- package/build/cjs/form-builder-v2/components/ContentTab/ContentTab.d.ts +1 -0
- package/build/cjs/form-builder-v2/components/ContentTab/ContentTab.js +21 -0
- package/build/cjs/form-builder-v2/components/ContentTab/ContentTab.js.map +1 -0
- package/build/cjs/form-builder-v2/components/DragOverlayPreview/DragOverlayPreview.css +13 -0
- package/build/cjs/form-builder-v2/components/DragOverlayPreview/DragOverlayPreview.d.ts +7 -0
- package/build/cjs/form-builder-v2/components/DragOverlayPreview/DragOverlayPreview.js +24 -0
- package/build/cjs/form-builder-v2/components/DragOverlayPreview/DragOverlayPreview.js.map +1 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/FieldSettings.css +30 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/FieldSettings.d.ts +6 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/FieldSettings.js +49 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/FieldSettings.js.map +1 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/ColorInputSettings.d.ts +12 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/ColorInputSettings.js +11 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/ColorInputSettings.js.map +1 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/OptionsSettings.d.ts +12 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/OptionsSettings.js +38 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/OptionsSettings.js.map +1 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/Row.d.ts +7 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/Row.js +9 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/Row.js.map +1 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/SectionSettings.d.ts +9 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/SectionSettings.js +40 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/SectionSettings.js.map +1 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/SwitchSettings.d.ts +12 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/SwitchSettings.js +11 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/SwitchSettings.js.map +1 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/TextFieldSettings.d.ts +12 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/TextFieldSettings.js +11 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/TextFieldSettings.js.map +1 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/TextSettings.d.ts +11 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/TextSettings.js +53 -0
- package/build/cjs/form-builder-v2/components/FieldSettings/fields/TextSettings.js.map +1 -0
- package/build/cjs/form-builder-v2/components/Inspector/Inspector.css +20 -0
- package/build/cjs/form-builder-v2/components/Inspector/Inspector.d.ts +1 -0
- package/build/cjs/form-builder-v2/components/Inspector/Inspector.js +20 -0
- package/build/cjs/form-builder-v2/components/Inspector/Inspector.js.map +1 -0
- package/build/cjs/form-builder-v2/components/Palette/Palette.css +56 -0
- package/build/cjs/form-builder-v2/components/Palette/Palette.d.ts +4 -0
- package/build/cjs/form-builder-v2/components/Palette/Palette.js +62 -0
- package/build/cjs/form-builder-v2/components/Palette/Palette.js.map +1 -0
- package/build/cjs/form-builder-v2/components/ResizeHandle/ResizeHandle.css +29 -0
- package/build/cjs/form-builder-v2/components/ResizeHandle/ResizeHandle.d.ts +9 -0
- package/build/cjs/form-builder-v2/components/ResizeHandle/ResizeHandle.js +98 -0
- package/build/cjs/form-builder-v2/components/ResizeHandle/ResizeHandle.js.map +1 -0
- package/build/cjs/form-builder-v2/components/SchemaPopup/SchemaPopup.css +49 -0
- package/build/cjs/form-builder-v2/components/SchemaPopup/SchemaPopup.d.ts +11 -0
- package/build/cjs/form-builder-v2/components/SchemaPopup/SchemaPopup.js +82 -0
- package/build/cjs/form-builder-v2/components/SchemaPopup/SchemaPopup.js.map +1 -0
- package/build/cjs/form-builder-v2/components/WhenEditor/WhenEditor.css +24 -0
- package/build/cjs/form-builder-v2/components/WhenEditor/WhenEditor.d.ts +8 -0
- package/build/cjs/form-builder-v2/components/WhenEditor/WhenEditor.js +50 -0
- package/build/cjs/form-builder-v2/components/WhenEditor/WhenEditor.js.map +1 -0
- package/build/cjs/form-builder-v2/components/WhenEditor/utils.d.ts +24 -0
- package/build/cjs/form-builder-v2/components/WhenEditor/utils.js +83 -0
- package/build/cjs/form-builder-v2/components/WhenEditor/utils.js.map +1 -0
- package/build/cjs/form-builder-v2/hooks/FormContext.d.ts +11 -0
- package/build/cjs/form-builder-v2/hooks/FormContext.js +22 -0
- package/build/cjs/form-builder-v2/hooks/FormContext.js.map +1 -0
- package/build/cjs/form-builder-v2/hooks/useFormFields.d.ts +23 -0
- package/build/cjs/form-builder-v2/hooks/useFormFields.js +144 -0
- package/build/cjs/form-builder-v2/hooks/useFormFields.js.map +1 -0
- package/build/cjs/form-builder-v2/index.d.ts +2 -0
- package/build/cjs/form-builder-v2/index.js +6 -0
- package/build/cjs/form-builder-v2/index.js.map +1 -0
- package/build/cjs/form-builder-v2/styles/variables.css +0 -0
- package/build/cjs/form-builder-v2/types.d.ts +32 -0
- package/build/cjs/form-builder-v2/types.js +3 -0
- package/build/cjs/form-builder-v2/types.js.map +1 -0
- package/build/cjs/form-builder-v2/utils/cn.d.ts +2 -0
- package/build/cjs/form-builder-v2/utils/cn.js +7 -0
- package/build/cjs/form-builder-v2/utils/cn.js.map +1 -0
- package/build/cjs/form-builder-v2/utils/dragData.d.ts +18 -0
- package/build/cjs/form-builder-v2/utils/dragData.js +18 -0
- package/build/cjs/form-builder-v2/utils/dragData.js.map +1 -0
- package/build/cjs/form-builder-v2/utils/fieldDefaults.d.ts +2 -0
- package/build/cjs/form-builder-v2/utils/fieldDefaults.js +51 -0
- package/build/cjs/form-builder-v2/utils/fieldDefaults.js.map +1 -0
- package/build/cjs/form-builder-v2/utils/fieldGroups.d.ts +3 -0
- package/build/cjs/form-builder-v2/utils/fieldGroups.js +26 -0
- package/build/cjs/form-builder-v2/utils/fieldGroups.js.map +1 -0
- package/build/cjs/form-builder-v2/utils/fieldMeta.d.ts +6 -0
- package/build/cjs/form-builder-v2/utils/fieldMeta.js +45 -0
- package/build/cjs/form-builder-v2/utils/fieldMeta.js.map +1 -0
- package/build/cjs/form-builder-v2/utils/fieldNames.d.ts +8 -0
- package/build/cjs/form-builder-v2/utils/fieldNames.js +75 -0
- package/build/cjs/form-builder-v2/utils/fieldNames.js.map +1 -0
- package/build/cjs/form-builder-v2/utils/fieldTree.d.ts +2 -0
- package/build/cjs/form-builder-v2/utils/fieldTree.js +7 -0
- package/build/cjs/form-builder-v2/utils/fieldTree.js.map +1 -0
- package/build/cjs/form-builder-v2/utils/fieldTreeOps.d.ts +13 -0
- package/build/cjs/form-builder-v2/utils/fieldTreeOps.js +80 -0
- package/build/cjs/form-builder-v2/utils/fieldTreeOps.js.map +1 -0
- package/build/cjs/form-builder-v2/utils/parseSchema.d.ts +9 -0
- package/build/cjs/form-builder-v2/utils/parseSchema.js +102 -0
- package/build/cjs/form-builder-v2/utils/parseSchema.js.map +1 -0
- package/build/cjs/form-builder-v2/utils/stripIds.d.ts +3 -0
- package/build/cjs/form-builder-v2/utils/stripIds.js +12 -0
- package/build/cjs/form-builder-v2/utils/stripIds.js.map +1 -0
- package/build/cjs/form-builder-v2/utils/treeWalk.d.ts +4 -0
- package/build/cjs/form-builder-v2/utils/treeWalk.js +45 -0
- package/build/cjs/form-builder-v2/utils/treeWalk.js.map +1 -0
- package/build/cjs/form-generator-v2/components/constants.d.ts +11 -11
- package/build/cjs/form-generator-v2/index.d.ts +2 -0
- package/build/cjs/form-generator-v2/index.js +8 -0
- package/build/cjs/form-generator-v2/index.js.map +1 -0
- package/build/cjs/gravity-blocks/extensions/BlockBaseExtension.js +7 -1
- package/build/cjs/gravity-blocks/extensions/BlockBaseExtension.js.map +1 -1
- package/build/cjs/gravity-blocks/extensions/GravityBlocksExtension.d.ts +3 -9
- package/build/cjs/gravity-blocks/extensions/GravityBlocksExtension.js +5 -3
- package/build/cjs/gravity-blocks/extensions/GravityBlocksExtension.js.map +1 -1
- package/build/cjs/gravity-blocks/index.d.ts +1 -0
- package/build/cjs/gravity-blocks/index.js +1 -0
- package/build/cjs/gravity-blocks/index.js.map +1 -1
- package/build/cjs/gravity-blocks/schema/constants.d.ts +10 -10
- package/build/cjs/hooks/usePCEditorInitializeEvents.js +2 -2
- package/build/cjs/hooks/usePCEditorInitializeEvents.js.map +1 -1
- package/build/cjs/hooks/usePostMessageAPI.js +8 -5
- package/build/cjs/hooks/usePostMessageAPI.js.map +1 -1
- package/build/cjs/sub-blocks/BackgroundCard/form.d.ts +7 -0
- package/build/cjs/sub-blocks/BackgroundCard/form.js +14 -0
- package/build/cjs/sub-blocks/BackgroundCard/form.js.map +1 -0
- package/build/cjs/sub-blocks/BackgroundCard/icon.d.ts +2 -0
- package/build/cjs/sub-blocks/BackgroundCard/icon.js +11 -0
- package/build/cjs/sub-blocks/BackgroundCard/icon.js.map +1 -0
- package/build/cjs/sub-blocks/BackgroundCard/index.js +5 -10
- package/build/cjs/sub-blocks/BackgroundCard/index.js.map +1 -1
- package/build/cjs/sub-blocks/BackgroundCard/index_deprecated.js +5 -9
- package/build/cjs/sub-blocks/BackgroundCard/index_deprecated.js.map +1 -1
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +5 -5
- package/build/cjs/sub-blocks/BannerCard/form.d.ts +9 -0
- package/build/cjs/sub-blocks/BannerCard/form.js +16 -0
- package/build/cjs/sub-blocks/BannerCard/form.js.map +1 -0
- package/build/cjs/sub-blocks/BannerCard/icon.d.ts +2 -0
- package/build/cjs/sub-blocks/BannerCard/icon.js +11 -0
- package/build/cjs/sub-blocks/BannerCard/icon.js.map +1 -0
- package/build/cjs/sub-blocks/BannerCard/index.js +5 -12
- package/build/cjs/sub-blocks/BannerCard/index.js.map +1 -1
- package/build/cjs/sub-blocks/BannerCard/index_deprecated.js +5 -11
- package/build/cjs/sub-blocks/BannerCard/index_deprecated.js.map +1 -1
- package/build/cjs/sub-blocks/BasicCard/form.d.ts +5 -0
- package/build/cjs/sub-blocks/BasicCard/form.js +12 -0
- package/build/cjs/sub-blocks/BasicCard/form.js.map +1 -0
- package/build/cjs/sub-blocks/BasicCard/icon.d.ts +2 -0
- package/build/cjs/sub-blocks/BasicCard/icon.js +11 -0
- package/build/cjs/sub-blocks/BasicCard/icon.js.map +1 -0
- package/build/cjs/sub-blocks/BasicCard/index.js +5 -8
- package/build/cjs/sub-blocks/BasicCard/index.js.map +1 -1
- package/build/cjs/sub-blocks/BasicCard/index_deprecated.js +5 -7
- package/build/cjs/sub-blocks/BasicCard/index_deprecated.js.map +1 -1
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +5 -5
- package/build/cjs/sub-blocks/Content/form.d.ts +5 -0
- package/build/cjs/sub-blocks/Content/form.js +12 -0
- package/build/cjs/sub-blocks/Content/form.js.map +1 -0
- package/build/cjs/sub-blocks/Content/icon.d.ts +2 -0
- package/build/cjs/sub-blocks/Content/icon.js +11 -0
- package/build/cjs/sub-blocks/Content/icon.js.map +1 -0
- package/build/cjs/sub-blocks/Content/index.js +5 -8
- package/build/cjs/sub-blocks/Content/index.js.map +1 -1
- package/build/cjs/sub-blocks/Content/index_deprecated.js +5 -7
- package/build/cjs/sub-blocks/Content/index_deprecated.js.map +1 -1
- package/build/cjs/sub-blocks/Divider/form.d.ts +2 -0
- package/build/cjs/sub-blocks/Divider/form.js +9 -0
- package/build/cjs/sub-blocks/Divider/form.js.map +1 -0
- package/build/cjs/sub-blocks/Divider/icon.d.ts +2 -0
- package/build/cjs/sub-blocks/Divider/icon.js +11 -0
- package/build/cjs/sub-blocks/Divider/icon.js.map +1 -0
- package/build/cjs/sub-blocks/Divider/index.js +5 -5
- package/build/cjs/sub-blocks/Divider/index.js.map +1 -1
- package/build/cjs/sub-blocks/Divider/index_deprecated.js +5 -4
- package/build/cjs/sub-blocks/Divider/index_deprecated.js.map +1 -1
- package/build/cjs/sub-blocks/ImageCard/form.d.ts +5 -0
- package/build/cjs/sub-blocks/ImageCard/form.js +12 -0
- package/build/cjs/sub-blocks/ImageCard/form.js.map +1 -0
- package/build/cjs/sub-blocks/ImageCard/index.js +3 -8
- package/build/cjs/sub-blocks/ImageCard/index.js.map +1 -1
- package/build/cjs/sub-blocks/ImageCard/index_deprecated.js +5 -7
- package/build/cjs/sub-blocks/ImageCard/index_deprecated.js.map +1 -1
- package/build/cjs/sub-blocks/LayoutItem/form.d.ts +11 -0
- package/build/cjs/sub-blocks/LayoutItem/form.js +18 -0
- package/build/cjs/sub-blocks/LayoutItem/form.js.map +1 -0
- package/build/cjs/sub-blocks/LayoutItem/icon.d.ts +2 -0
- package/build/cjs/sub-blocks/LayoutItem/icon.js +11 -0
- package/build/cjs/sub-blocks/LayoutItem/icon.js.map +1 -0
- package/build/cjs/sub-blocks/LayoutItem/index.js +5 -14
- package/build/cjs/sub-blocks/LayoutItem/index.js.map +1 -1
- package/build/cjs/sub-blocks/LayoutItem/index_deprecated.js +5 -13
- package/build/cjs/sub-blocks/LayoutItem/index_deprecated.js.map +1 -1
- package/build/cjs/sub-blocks/MediaCard/form.d.ts +8 -0
- package/build/cjs/sub-blocks/MediaCard/form.js +15 -0
- package/build/cjs/sub-blocks/MediaCard/form.js.map +1 -0
- package/build/cjs/sub-blocks/MediaCard/index.js +3 -11
- package/build/cjs/sub-blocks/MediaCard/index.js.map +1 -1
- package/build/cjs/sub-blocks/MediaCard/index_deprecated.js +5 -10
- package/build/cjs/sub-blocks/MediaCard/index_deprecated.js.map +1 -1
- package/build/cjs/sub-blocks/PriceCard/form.d.ts +16 -0
- package/build/cjs/sub-blocks/PriceCard/form.js +25 -0
- package/build/cjs/sub-blocks/PriceCard/form.js.map +1 -0
- package/build/cjs/sub-blocks/PriceCard/icon.d.ts +2 -0
- package/build/cjs/sub-blocks/PriceCard/icon.js +11 -0
- package/build/cjs/sub-blocks/PriceCard/icon.js.map +1 -0
- package/build/cjs/sub-blocks/PriceCard/index.js +5 -21
- package/build/cjs/sub-blocks/PriceCard/index.js.map +1 -1
- package/build/cjs/sub-blocks/PriceCard/index_deprecated.js +5 -20
- package/build/cjs/sub-blocks/PriceCard/index_deprecated.js.map +1 -1
- package/build/cjs/sub-blocks/PriceDetailed/form.d.ts +12 -0
- package/build/cjs/sub-blocks/PriceDetailed/form.js +26 -0
- package/build/cjs/sub-blocks/PriceDetailed/form.js.map +1 -0
- package/build/cjs/sub-blocks/PriceDetailed/icon.d.ts +2 -0
- package/build/cjs/sub-blocks/PriceDetailed/icon.js +11 -0
- package/build/cjs/sub-blocks/PriceDetailed/icon.js.map +1 -0
- package/build/cjs/sub-blocks/PriceDetailed/index.js +5 -22
- package/build/cjs/sub-blocks/PriceDetailed/index.js.map +1 -1
- package/build/cjs/sub-blocks/PriceDetailed/index_deprecated.js +3 -21
- package/build/cjs/sub-blocks/PriceDetailed/index_deprecated.js.map +1 -1
- package/build/cjs/sub-blocks/Quote/form.d.ts +8 -0
- package/build/cjs/sub-blocks/Quote/form.js +15 -0
- package/build/cjs/sub-blocks/Quote/form.js.map +1 -0
- package/build/cjs/sub-blocks/Quote/icon.d.ts +2 -0
- package/build/cjs/sub-blocks/Quote/icon.js +11 -0
- package/build/cjs/sub-blocks/Quote/icon.js.map +1 -0
- package/build/cjs/sub-blocks/Quote/index.js +5 -11
- package/build/cjs/sub-blocks/Quote/index.js.map +1 -1
- package/build/cjs/sub-blocks/Quote/index_deprecated.js +5 -10
- package/build/cjs/sub-blocks/Quote/index_deprecated.js.map +1 -1
- package/build/esm/blocks/Banner/Banner.js +2 -2
- package/build/esm/blocks/Banner/Banner.js.map +1 -1
- package/build/esm/blocks/Banner/form.d.ts +8 -5
- package/build/esm/blocks/Banner/form.js +11 -16
- package/build/esm/blocks/Banner/form.js.map +1 -1
- package/build/esm/blocks/Banner/index.js +3 -12
- package/build/esm/blocks/Banner/index.js.map +1 -1
- package/build/esm/blocks/Banner/index_deprecated.js +5 -11
- package/build/esm/blocks/Banner/index_deprecated.js.map +1 -1
- package/build/esm/blocks/CardLayout/CardLayout.js +2 -2
- package/build/esm/blocks/CardLayout/CardLayout.js.map +1 -1
- package/build/esm/blocks/CardLayout/form.d.ts +11 -0
- package/build/esm/blocks/CardLayout/form.js +27 -0
- package/build/esm/blocks/CardLayout/form.js.map +1 -0
- package/build/esm/blocks/CardLayout/index.js +4 -42
- package/build/esm/blocks/CardLayout/index.js.map +1 -1
- package/build/esm/blocks/CardLayout/index_deprecated.js +5 -26
- package/build/esm/blocks/CardLayout/index_deprecated.js.map +1 -1
- package/build/esm/blocks/Companies/form.d.ts +5 -0
- package/build/esm/blocks/Companies/form.js +9 -0
- package/build/esm/blocks/Companies/form.js.map +1 -0
- package/build/esm/blocks/Companies/index.js +4 -9
- package/build/esm/blocks/Companies/index.js.map +1 -1
- package/build/esm/blocks/Companies/index_deprecated.js +3 -7
- package/build/esm/blocks/Companies/index_deprecated.js.map +1 -1
- package/build/esm/blocks/ContentLayout/form.d.ts +34 -0
- package/build/esm/blocks/ContentLayout/form.js +508 -0
- package/build/esm/blocks/ContentLayout/form.js.map +1 -0
- package/build/esm/blocks/ContentLayout/index.d.ts +1 -2
- package/build/esm/blocks/ContentLayout/index.js +3 -511
- package/build/esm/blocks/ContentLayout/index.js.map +1 -1
- package/build/esm/blocks/ContentLayout/index_deprecated.d.ts +1 -1
- package/build/esm/blocks/ContentLayout/index_deprecated.js +3 -68
- package/build/esm/blocks/ContentLayout/index_deprecated.js.map +1 -1
- package/build/esm/blocks/ExtendedFeatures/form.d.ts +50 -0
- package/build/esm/blocks/ExtendedFeatures/form.js +65 -0
- package/build/esm/blocks/ExtendedFeatures/form.js.map +1 -0
- package/build/esm/blocks/ExtendedFeatures/index.js +3 -65
- package/build/esm/blocks/ExtendedFeatures/index.js.map +1 -1
- package/build/esm/blocks/ExtendedFeatures/index_deprecated.d.ts +2 -1
- package/build/esm/blocks/ExtendedFeatures/index_deprecated.js +5 -64
- package/build/esm/blocks/ExtendedFeatures/index_deprecated.js.map +1 -1
- package/build/esm/blocks/FilterBlock/form.d.ts +21 -0
- package/build/esm/blocks/FilterBlock/form.js +87 -0
- package/build/esm/blocks/FilterBlock/form.js.map +1 -0
- package/build/esm/blocks/FilterBlock/index.d.ts +1 -1
- package/build/esm/blocks/FilterBlock/index.js +4 -87
- package/build/esm/blocks/FilterBlock/index.js.map +1 -1
- package/build/esm/blocks/FilterBlock/index_deprecated.d.ts +1 -1
- package/build/esm/blocks/FilterBlock/index_deprecated.js +3 -85
- package/build/esm/blocks/FilterBlock/index_deprecated.js.map +1 -1
- package/build/esm/blocks/FoldableList/form.d.ts +8 -0
- package/build/esm/blocks/FoldableList/form.js +17 -0
- package/build/esm/blocks/FoldableList/form.js.map +1 -0
- package/build/esm/blocks/FoldableList/index.d.ts +3 -0
- package/build/esm/blocks/FoldableList/index.js +14 -0
- package/build/esm/blocks/FoldableList/index.js.map +1 -0
- package/build/esm/blocks/FoldableList/index_deprecated.d.ts +3 -0
- package/build/esm/blocks/FoldableList/index_deprecated.js +15 -0
- package/build/esm/blocks/FoldableList/index_deprecated.js.map +1 -0
- package/build/esm/blocks/FoldableList/schema.d.ts +5 -5
- package/build/esm/blocks/Form/formConfig.d.ts +5 -0
- package/build/esm/blocks/Form/formConfig.js +9 -0
- package/build/esm/blocks/Form/formConfig.js.map +1 -0
- package/build/esm/blocks/Form/index.d.ts +1 -1
- package/build/esm/blocks/Form/index.js +4 -9
- package/build/esm/blocks/Form/index.js.map +1 -1
- package/build/esm/blocks/Form/index_deprecated.d.ts +1 -1
- package/build/esm/blocks/Form/index_deprecated.js +3 -7
- package/build/esm/blocks/Form/index_deprecated.js.map +1 -1
- package/build/esm/blocks/Header/form.d.ts +12 -0
- package/build/esm/blocks/Header/form.js +334 -0
- package/build/esm/blocks/Header/form.js.map +1 -0
- package/build/esm/blocks/Header/index.js +3 -333
- package/build/esm/blocks/Header/index.js.map +1 -1
- package/build/esm/blocks/Header/index_deprecated.js +3 -20
- package/build/esm/blocks/Header/index_deprecated.js.map +1 -1
- package/build/esm/blocks/HeaderSlider/form.d.ts +24 -0
- package/build/esm/blocks/HeaderSlider/form.js +29 -0
- package/build/esm/blocks/HeaderSlider/form.js.map +1 -0
- package/build/esm/blocks/HeaderSlider/index.d.ts +1 -1
- package/build/esm/blocks/HeaderSlider/index.js +4 -29
- package/build/esm/blocks/HeaderSlider/index.js.map +1 -1
- package/build/esm/blocks/HeaderSlider/index_deprecated.d.ts +1 -1
- package/build/esm/blocks/HeaderSlider/index_deprecated.js +3 -27
- package/build/esm/blocks/HeaderSlider/index_deprecated.js.map +1 -1
- package/build/esm/blocks/HeaderSlider/schema.d.ts +3 -3
- package/build/esm/blocks/Hero/form.d.ts +9 -0
- package/build/esm/blocks/Hero/form.js +14 -0
- package/build/esm/blocks/Hero/form.js.map +1 -0
- package/build/esm/blocks/Hero/index.d.ts +3 -0
- package/build/esm/blocks/Hero/index.js +14 -0
- package/build/esm/blocks/Hero/index.js.map +1 -0
- package/build/esm/blocks/Hero/index_deprecated.d.ts +3 -0
- package/build/esm/blocks/Hero/index_deprecated.js +15 -0
- package/build/esm/blocks/Hero/index_deprecated.js.map +1 -0
- package/build/esm/blocks/Hero/schema.d.ts +10 -10
- package/build/esm/blocks/Icons/form.d.ts +12 -0
- package/build/esm/blocks/Icons/form.js +53 -0
- package/build/esm/blocks/Icons/form.js.map +1 -0
- package/build/esm/blocks/Icons/index.d.ts +1 -1
- package/build/esm/blocks/Icons/index.js +4 -53
- package/build/esm/blocks/Icons/index.js.map +1 -1
- package/build/esm/blocks/Icons/index_deprecated.d.ts +1 -1
- package/build/esm/blocks/Icons/index_deprecated.js +3 -51
- package/build/esm/blocks/Icons/index_deprecated.js.map +1 -1
- package/build/esm/blocks/Info/form.d.ts +14 -0
- package/build/esm/blocks/Info/form.js +32 -0
- package/build/esm/blocks/Info/form.js.map +1 -0
- package/build/esm/blocks/Info/index.d.ts +1 -1
- package/build/esm/blocks/Info/index.js +3 -31
- package/build/esm/blocks/Info/index.js.map +1 -1
- package/build/esm/blocks/Info/index_deprecated.d.ts +2 -1
- package/build/esm/blocks/Info/index_deprecated.js +5 -30
- package/build/esm/blocks/Info/index_deprecated.js.map +1 -1
- package/build/esm/blocks/Map/form.d.ts +4 -0
- package/build/esm/blocks/Map/form.js +8 -0
- package/build/esm/blocks/Map/form.js.map +1 -0
- package/build/esm/blocks/Map/index.d.ts +1 -1
- package/build/esm/blocks/Map/index.js +4 -8
- package/build/esm/blocks/Map/index.js.map +1 -1
- package/build/esm/blocks/Map/index_deprecated.d.ts +1 -1
- package/build/esm/blocks/Map/index_deprecated.js +3 -6
- package/build/esm/blocks/Map/index_deprecated.js.map +1 -1
- package/build/esm/blocks/Media/form.d.ts +35 -0
- package/build/esm/blocks/Media/form.js +477 -0
- package/build/esm/blocks/Media/form.js.map +1 -0
- package/build/esm/blocks/Media/index.d.ts +1 -2
- package/build/esm/blocks/Media/index.js +3 -481
- package/build/esm/blocks/Media/index.js.map +1 -1
- package/build/esm/blocks/Media/index_deprecated.d.ts +6 -2
- package/build/esm/blocks/Media/index_deprecated.js +3 -43
- package/build/esm/blocks/Media/index_deprecated.js.map +1 -1
- package/build/esm/blocks/PromoFeaturesBlock/form.d.ts +14 -0
- package/build/esm/blocks/PromoFeaturesBlock/form.js +38 -0
- package/build/esm/blocks/PromoFeaturesBlock/form.js.map +1 -0
- package/build/esm/blocks/PromoFeaturesBlock/index.js +4 -38
- package/build/esm/blocks/PromoFeaturesBlock/index.js.map +1 -1
- package/build/esm/blocks/PromoFeaturesBlock/index_deprecated.d.ts +1 -1
- package/build/esm/blocks/PromoFeaturesBlock/index_deprecated.js +3 -36
- package/build/esm/blocks/PromoFeaturesBlock/index_deprecated.js.map +1 -1
- package/build/esm/blocks/Questions/form.d.ts +22 -0
- package/build/esm/blocks/Questions/form.js +38 -0
- package/build/esm/blocks/Questions/form.js.map +1 -0
- package/build/esm/blocks/Questions/index.js +3 -37
- package/build/esm/blocks/Questions/index.js.map +1 -1
- package/build/esm/blocks/Questions/index_deprecated.d.ts +2 -1
- package/build/esm/blocks/Questions/index_deprecated.js +5 -36
- package/build/esm/blocks/Questions/index_deprecated.js.map +1 -1
- package/build/esm/blocks/Questions/schema.d.ts +5 -5
- package/build/esm/blocks/Share/form.d.ts +5 -0
- package/build/esm/blocks/Share/form.js +9 -0
- package/build/esm/blocks/Share/form.js.map +1 -0
- package/build/esm/blocks/Share/index.d.ts +1 -1
- package/build/esm/blocks/Share/index.js +4 -9
- package/build/esm/blocks/Share/index.js.map +1 -1
- package/build/esm/blocks/Share/index_deprecated.d.ts +1 -1
- package/build/esm/blocks/Share/index_deprecated.js +3 -7
- package/build/esm/blocks/Share/index_deprecated.js.map +1 -1
- package/build/esm/blocks/Slider/form.d.ts +19 -0
- package/build/esm/blocks/Slider/form.js +35 -0
- package/build/esm/blocks/Slider/form.js.map +1 -0
- package/build/esm/blocks/Slider/index.d.ts +1 -1
- package/build/esm/blocks/Slider/index.js +3 -34
- package/build/esm/blocks/Slider/index.js.map +1 -1
- package/build/esm/blocks/Slider/index_deprecated.d.ts +1 -1
- package/build/esm/blocks/Slider/index_deprecated.js +5 -34
- package/build/esm/blocks/Slider/index_deprecated.js.map +1 -1
- package/build/esm/blocks/SliderOld/form.d.ts +5 -0
- package/build/esm/blocks/SliderOld/form.js +8 -0
- package/build/esm/blocks/SliderOld/form.js.map +1 -0
- package/build/esm/blocks/SliderOld/index.d.ts +3 -0
- package/build/esm/blocks/SliderOld/index.js +14 -0
- package/build/esm/blocks/SliderOld/index.js.map +1 -0
- package/build/esm/blocks/SliderOld/index_deprecated.d.ts +3 -0
- package/build/esm/blocks/SliderOld/index_deprecated.js +15 -0
- package/build/esm/blocks/SliderOld/index_deprecated.js.map +1 -0
- package/build/esm/blocks/Table/form.d.ts +10 -0
- package/build/esm/blocks/Table/form.js +21 -0
- package/build/esm/blocks/Table/form.js.map +1 -0
- package/build/esm/blocks/Table/index.d.ts +1 -1
- package/build/esm/blocks/Table/index.js +4 -21
- package/build/esm/blocks/Table/index.js.map +1 -1
- package/build/esm/blocks/Table/index_deprecated.d.ts +1 -1
- package/build/esm/blocks/Table/index_deprecated.js +3 -19
- package/build/esm/blocks/Table/index_deprecated.js.map +1 -1
- package/build/esm/blocks/Tabs/form.d.ts +9 -0
- package/build/esm/blocks/Tabs/form.js +19 -0
- package/build/esm/blocks/Tabs/form.js.map +1 -0
- package/build/esm/blocks/Tabs/index.d.ts +1 -1
- package/build/esm/blocks/Tabs/index.js +3 -18
- package/build/esm/blocks/Tabs/index.js.map +1 -1
- package/build/esm/blocks/Tabs/index_deprecated.d.ts +2 -1
- package/build/esm/blocks/Tabs/index_deprecated.js +5 -18
- package/build/esm/blocks/Tabs/index_deprecated.js.map +1 -1
- package/build/esm/blocks/index.js +63 -57
- package/build/esm/blocks/index.js.map +1 -1
- package/build/esm/common/constants.d.ts +1 -0
- package/build/esm/common/constants.js +2 -0
- package/build/esm/common/constants.js.map +1 -0
- package/build/esm/common/postMessage.d.ts +1 -0
- package/build/esm/common/postMessage.js +12 -5
- package/build/esm/common/postMessage.js.map +1 -1
- package/build/esm/common/types/messages.d.ts +3 -0
- package/build/esm/common/types/messages.js.map +1 -1
- package/build/esm/components/editor/ChildrenItemWrap/ChildrenItemWrap.d.ts +3 -2
- package/build/esm/components/editor/ChildrenItemWrap/ChildrenItemWrap.js +2 -2
- package/build/esm/components/editor/ChildrenItemWrap/ChildrenItemWrap.js.map +1 -1
- package/build/esm/containers/PageConstructor/PageConstructor.d.ts +0 -1
- package/build/esm/containers/PageConstructor/PageConstructor.js +0 -1
- package/build/esm/containers/PageConstructor/PageConstructor.js.map +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.css +0 -4
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.css +6 -0
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +1 -0
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +4 -1
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js.map +1 -1
- package/build/esm/context/editorStoreContext/PCEditorStoreProvider.js +5 -3
- package/build/esm/context/editorStoreContext/PCEditorStoreProvider.js.map +1 -1
- package/build/esm/editor-v2/components/BlockCard/BlockCard.js +3 -3
- package/build/esm/editor-v2/components/BlockCard/BlockCard.js.map +1 -1
- package/build/esm/editor-v2/components/BlockCard/defaultIcon.d.ts +1 -0
- package/build/esm/editor-v2/components/BlockCard/defaultIcon.js +8 -0
- package/build/esm/editor-v2/components/BlockCard/defaultIcon.js.map +1 -0
- package/build/esm/editor-v2/containers/MiddleScreen/MiddleScreen.css +18 -3
- package/build/esm/editor-v2/containers/MiddleScreen/MiddleScreen.js +14 -3
- package/build/esm/editor-v2/containers/MiddleScreen/MiddleScreen.js.map +1 -1
- package/build/esm/editor-v2/context/editorStore/MainEditorStoreProvider.js +2 -0
- package/build/esm/editor-v2/context/editorStore/MainEditorStoreProvider.js.map +1 -1
- package/build/esm/form-builder-v2/CanvasContentContext.d.ts +18 -0
- package/build/esm/form-builder-v2/CanvasContentContext.js +15 -0
- package/build/esm/form-builder-v2/CanvasContentContext.js.map +1 -0
- package/build/esm/form-builder-v2/FormBuilderV2.css +93 -0
- package/build/esm/form-builder-v2/FormBuilderV2.d.ts +11 -0
- package/build/esm/form-builder-v2/FormBuilderV2.js +119 -0
- package/build/esm/form-builder-v2/FormBuilderV2.js.map +1 -0
- package/build/esm/form-builder-v2/components/Canvas/Canvas.css +15 -0
- package/build/esm/form-builder-v2/components/Canvas/Canvas.d.ts +9 -0
- package/build/esm/form-builder-v2/components/Canvas/Canvas.js +14 -0
- package/build/esm/form-builder-v2/components/Canvas/Canvas.js.map +1 -0
- package/build/esm/form-builder-v2/components/CanvasCard/CanvasCard.css +133 -0
- package/build/esm/form-builder-v2/components/CanvasCard/CanvasCard.d.ts +10 -0
- package/build/esm/form-builder-v2/components/CanvasCard/CanvasCard.js +68 -0
- package/build/esm/form-builder-v2/components/CanvasCard/CanvasCard.js.map +1 -0
- package/build/esm/form-builder-v2/components/CanvasCard/components/FieldPreview.d.ts +6 -0
- package/build/esm/form-builder-v2/components/CanvasCard/components/FieldPreview.js +39 -0
- package/build/esm/form-builder-v2/components/CanvasCard/components/FieldPreview.js.map +1 -0
- package/build/esm/form-builder-v2/components/CanvasCard/components/SectionChildrenDropZone.d.ts +9 -0
- package/build/esm/form-builder-v2/components/CanvasCard/components/SectionChildrenDropZone.js +16 -0
- package/build/esm/form-builder-v2/components/CanvasCard/components/SectionChildrenDropZone.js.map +1 -0
- package/build/esm/form-builder-v2/components/ContentTab/ContentTab.css +22 -0
- package/build/esm/form-builder-v2/components/ContentTab/ContentTab.d.ts +2 -0
- package/build/esm/form-builder-v2/components/ContentTab/ContentTab.js +17 -0
- package/build/esm/form-builder-v2/components/ContentTab/ContentTab.js.map +1 -0
- package/build/esm/form-builder-v2/components/DragOverlayPreview/DragOverlayPreview.css +13 -0
- package/build/esm/form-builder-v2/components/DragOverlayPreview/DragOverlayPreview.d.ts +8 -0
- package/build/esm/form-builder-v2/components/DragOverlayPreview/DragOverlayPreview.js +21 -0
- package/build/esm/form-builder-v2/components/DragOverlayPreview/DragOverlayPreview.js.map +1 -0
- package/build/esm/form-builder-v2/components/FieldSettings/FieldSettings.css +30 -0
- package/build/esm/form-builder-v2/components/FieldSettings/FieldSettings.d.ts +7 -0
- package/build/esm/form-builder-v2/components/FieldSettings/FieldSettings.js +45 -0
- package/build/esm/form-builder-v2/components/FieldSettings/FieldSettings.js.map +1 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/ColorInputSettings.d.ts +12 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/ColorInputSettings.js +6 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/ColorInputSettings.js.map +1 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/OptionsSettings.d.ts +12 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/OptionsSettings.js +33 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/OptionsSettings.js.map +1 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/Row.d.ts +7 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/Row.js +5 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/Row.js.map +1 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/SectionSettings.d.ts +9 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/SectionSettings.js +35 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/SectionSettings.js.map +1 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/SwitchSettings.d.ts +12 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/SwitchSettings.js +6 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/SwitchSettings.js.map +1 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/TextFieldSettings.d.ts +12 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/TextFieldSettings.js +6 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/TextFieldSettings.js.map +1 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/TextSettings.d.ts +11 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/TextSettings.js +48 -0
- package/build/esm/form-builder-v2/components/FieldSettings/fields/TextSettings.js.map +1 -0
- package/build/esm/form-builder-v2/components/Inspector/Inspector.css +20 -0
- package/build/esm/form-builder-v2/components/Inspector/Inspector.d.ts +2 -0
- package/build/esm/form-builder-v2/components/Inspector/Inspector.js +16 -0
- package/build/esm/form-builder-v2/components/Inspector/Inspector.js.map +1 -0
- package/build/esm/form-builder-v2/components/Palette/Palette.css +56 -0
- package/build/esm/form-builder-v2/components/Palette/Palette.d.ts +5 -0
- package/build/esm/form-builder-v2/components/Palette/Palette.js +58 -0
- package/build/esm/form-builder-v2/components/Palette/Palette.js.map +1 -0
- package/build/esm/form-builder-v2/components/ResizeHandle/ResizeHandle.css +29 -0
- package/build/esm/form-builder-v2/components/ResizeHandle/ResizeHandle.d.ts +10 -0
- package/build/esm/form-builder-v2/components/ResizeHandle/ResizeHandle.js +94 -0
- package/build/esm/form-builder-v2/components/ResizeHandle/ResizeHandle.js.map +1 -0
- package/build/esm/form-builder-v2/components/SchemaPopup/SchemaPopup.css +49 -0
- package/build/esm/form-builder-v2/components/SchemaPopup/SchemaPopup.d.ts +12 -0
- package/build/esm/form-builder-v2/components/SchemaPopup/SchemaPopup.js +78 -0
- package/build/esm/form-builder-v2/components/SchemaPopup/SchemaPopup.js.map +1 -0
- package/build/esm/form-builder-v2/components/WhenEditor/WhenEditor.css +24 -0
- package/build/esm/form-builder-v2/components/WhenEditor/WhenEditor.d.ts +9 -0
- package/build/esm/form-builder-v2/components/WhenEditor/WhenEditor.js +46 -0
- package/build/esm/form-builder-v2/components/WhenEditor/WhenEditor.js.map +1 -0
- package/build/esm/form-builder-v2/components/WhenEditor/utils.d.ts +24 -0
- package/build/esm/form-builder-v2/components/WhenEditor/utils.js +76 -0
- package/build/esm/form-builder-v2/components/WhenEditor/utils.js.map +1 -0
- package/build/esm/form-builder-v2/hooks/FormContext.d.ts +11 -0
- package/build/esm/form-builder-v2/hooks/FormContext.js +16 -0
- package/build/esm/form-builder-v2/hooks/FormContext.js.map +1 -0
- package/build/esm/form-builder-v2/hooks/useFormFields.d.ts +23 -0
- package/build/esm/form-builder-v2/hooks/useFormFields.js +139 -0
- package/build/esm/form-builder-v2/hooks/useFormFields.js.map +1 -0
- package/build/esm/form-builder-v2/index.d.ts +2 -0
- package/build/esm/form-builder-v2/index.js +3 -0
- package/build/esm/form-builder-v2/index.js.map +1 -0
- package/build/esm/form-builder-v2/styles/variables.css +0 -0
- package/build/esm/form-builder-v2/types.d.ts +32 -0
- package/build/esm/form-builder-v2/types.js +2 -0
- package/build/esm/form-builder-v2/types.js.map +1 -0
- package/build/esm/form-builder-v2/utils/cn.d.ts +2 -0
- package/build/esm/form-builder-v2/utils/cn.js +4 -0
- package/build/esm/form-builder-v2/utils/cn.js.map +1 -0
- package/build/esm/form-builder-v2/utils/dragData.d.ts +18 -0
- package/build/esm/form-builder-v2/utils/dragData.js +11 -0
- package/build/esm/form-builder-v2/utils/dragData.js.map +1 -0
- package/build/esm/form-builder-v2/utils/fieldDefaults.d.ts +2 -0
- package/build/esm/form-builder-v2/utils/fieldDefaults.js +47 -0
- package/build/esm/form-builder-v2/utils/fieldDefaults.js.map +1 -0
- package/build/esm/form-builder-v2/utils/fieldGroups.d.ts +3 -0
- package/build/esm/form-builder-v2/utils/fieldGroups.js +21 -0
- package/build/esm/form-builder-v2/utils/fieldGroups.js.map +1 -0
- package/build/esm/form-builder-v2/utils/fieldMeta.d.ts +6 -0
- package/build/esm/form-builder-v2/utils/fieldMeta.js +42 -0
- package/build/esm/form-builder-v2/utils/fieldMeta.js.map +1 -0
- package/build/esm/form-builder-v2/utils/fieldNames.d.ts +8 -0
- package/build/esm/form-builder-v2/utils/fieldNames.js +66 -0
- package/build/esm/form-builder-v2/utils/fieldNames.js.map +1 -0
- package/build/esm/form-builder-v2/utils/fieldTree.d.ts +2 -0
- package/build/esm/form-builder-v2/utils/fieldTree.js +3 -0
- package/build/esm/form-builder-v2/utils/fieldTree.js.map +1 -0
- package/build/esm/form-builder-v2/utils/fieldTreeOps.d.ts +13 -0
- package/build/esm/form-builder-v2/utils/fieldTreeOps.js +69 -0
- package/build/esm/form-builder-v2/utils/fieldTreeOps.js.map +1 -0
- package/build/esm/form-builder-v2/utils/parseSchema.d.ts +9 -0
- package/build/esm/form-builder-v2/utils/parseSchema.js +98 -0
- package/build/esm/form-builder-v2/utils/parseSchema.js.map +1 -0
- package/build/esm/form-builder-v2/utils/stripIds.d.ts +3 -0
- package/build/esm/form-builder-v2/utils/stripIds.js +8 -0
- package/build/esm/form-builder-v2/utils/stripIds.js.map +1 -0
- package/build/esm/form-builder-v2/utils/treeWalk.d.ts +4 -0
- package/build/esm/form-builder-v2/utils/treeWalk.js +39 -0
- package/build/esm/form-builder-v2/utils/treeWalk.js.map +1 -0
- package/build/esm/form-generator-v2/components/constants.d.ts +11 -11
- package/build/esm/form-generator-v2/index.d.ts +2 -0
- package/build/esm/form-generator-v2/index.js +3 -0
- package/build/esm/form-generator-v2/index.js.map +1 -0
- package/build/esm/gravity-blocks/extensions/BlockBaseExtension.js +7 -1
- package/build/esm/gravity-blocks/extensions/BlockBaseExtension.js.map +1 -1
- package/build/esm/gravity-blocks/extensions/GravityBlocksExtension.d.ts +3 -9
- package/build/esm/gravity-blocks/extensions/GravityBlocksExtension.js +5 -3
- package/build/esm/gravity-blocks/extensions/GravityBlocksExtension.js.map +1 -1
- package/build/esm/gravity-blocks/index.d.ts +1 -0
- package/build/esm/gravity-blocks/index.js +1 -0
- package/build/esm/gravity-blocks/index.js.map +1 -1
- package/build/esm/gravity-blocks/schema/constants.d.ts +10 -10
- package/build/esm/hooks/usePCEditorInitializeEvents.js +2 -2
- package/build/esm/hooks/usePCEditorInitializeEvents.js.map +1 -1
- package/build/esm/hooks/usePostMessageAPI.js +8 -5
- package/build/esm/hooks/usePostMessageAPI.js.map +1 -1
- package/build/esm/sub-blocks/BackgroundCard/form.d.ts +7 -0
- package/build/esm/sub-blocks/BackgroundCard/form.js +11 -0
- package/build/esm/sub-blocks/BackgroundCard/form.js.map +1 -0
- package/build/esm/sub-blocks/BackgroundCard/icon.d.ts +2 -0
- package/build/esm/sub-blocks/BackgroundCard/icon.js +9 -0
- package/build/esm/sub-blocks/BackgroundCard/icon.js.map +1 -0
- package/build/esm/sub-blocks/BackgroundCard/index.js +5 -10
- package/build/esm/sub-blocks/BackgroundCard/index.js.map +1 -1
- package/build/esm/sub-blocks/BackgroundCard/index_deprecated.js +5 -9
- package/build/esm/sub-blocks/BackgroundCard/index_deprecated.js.map +1 -1
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +5 -5
- package/build/esm/sub-blocks/BannerCard/form.d.ts +9 -0
- package/build/esm/sub-blocks/BannerCard/form.js +13 -0
- package/build/esm/sub-blocks/BannerCard/form.js.map +1 -0
- package/build/esm/sub-blocks/BannerCard/icon.d.ts +2 -0
- package/build/esm/sub-blocks/BannerCard/icon.js +9 -0
- package/build/esm/sub-blocks/BannerCard/icon.js.map +1 -0
- package/build/esm/sub-blocks/BannerCard/index.js +5 -12
- package/build/esm/sub-blocks/BannerCard/index.js.map +1 -1
- package/build/esm/sub-blocks/BannerCard/index_deprecated.js +5 -11
- package/build/esm/sub-blocks/BannerCard/index_deprecated.js.map +1 -1
- package/build/esm/sub-blocks/BasicCard/form.d.ts +5 -0
- package/build/esm/sub-blocks/BasicCard/form.js +9 -0
- package/build/esm/sub-blocks/BasicCard/form.js.map +1 -0
- package/build/esm/sub-blocks/BasicCard/icon.d.ts +2 -0
- package/build/esm/sub-blocks/BasicCard/icon.js +9 -0
- package/build/esm/sub-blocks/BasicCard/icon.js.map +1 -0
- package/build/esm/sub-blocks/BasicCard/index.js +5 -8
- package/build/esm/sub-blocks/BasicCard/index.js.map +1 -1
- package/build/esm/sub-blocks/BasicCard/index_deprecated.js +5 -7
- package/build/esm/sub-blocks/BasicCard/index_deprecated.js.map +1 -1
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +5 -5
- package/build/esm/sub-blocks/Content/form.d.ts +5 -0
- package/build/esm/sub-blocks/Content/form.js +9 -0
- package/build/esm/sub-blocks/Content/form.js.map +1 -0
- package/build/esm/sub-blocks/Content/icon.d.ts +2 -0
- package/build/esm/sub-blocks/Content/icon.js +9 -0
- package/build/esm/sub-blocks/Content/icon.js.map +1 -0
- package/build/esm/sub-blocks/Content/index.js +5 -8
- package/build/esm/sub-blocks/Content/index.js.map +1 -1
- package/build/esm/sub-blocks/Content/index_deprecated.js +5 -7
- package/build/esm/sub-blocks/Content/index_deprecated.js.map +1 -1
- package/build/esm/sub-blocks/Divider/form.d.ts +2 -0
- package/build/esm/sub-blocks/Divider/form.js +6 -0
- package/build/esm/sub-blocks/Divider/form.js.map +1 -0
- package/build/esm/sub-blocks/Divider/icon.d.ts +2 -0
- package/build/esm/sub-blocks/Divider/icon.js +9 -0
- package/build/esm/sub-blocks/Divider/icon.js.map +1 -0
- package/build/esm/sub-blocks/Divider/index.js +5 -5
- package/build/esm/sub-blocks/Divider/index.js.map +1 -1
- package/build/esm/sub-blocks/Divider/index_deprecated.js +5 -4
- package/build/esm/sub-blocks/Divider/index_deprecated.js.map +1 -1
- package/build/esm/sub-blocks/ImageCard/form.d.ts +5 -0
- package/build/esm/sub-blocks/ImageCard/form.js +9 -0
- package/build/esm/sub-blocks/ImageCard/form.js.map +1 -0
- package/build/esm/sub-blocks/ImageCard/index.js +3 -8
- package/build/esm/sub-blocks/ImageCard/index.js.map +1 -1
- package/build/esm/sub-blocks/ImageCard/index_deprecated.js +5 -7
- package/build/esm/sub-blocks/ImageCard/index_deprecated.js.map +1 -1
- package/build/esm/sub-blocks/LayoutItem/form.d.ts +11 -0
- package/build/esm/sub-blocks/LayoutItem/form.js +15 -0
- package/build/esm/sub-blocks/LayoutItem/form.js.map +1 -0
- package/build/esm/sub-blocks/LayoutItem/icon.d.ts +2 -0
- package/build/esm/sub-blocks/LayoutItem/icon.js +9 -0
- package/build/esm/sub-blocks/LayoutItem/icon.js.map +1 -0
- package/build/esm/sub-blocks/LayoutItem/index.js +5 -14
- package/build/esm/sub-blocks/LayoutItem/index.js.map +1 -1
- package/build/esm/sub-blocks/LayoutItem/index_deprecated.js +5 -13
- package/build/esm/sub-blocks/LayoutItem/index_deprecated.js.map +1 -1
- package/build/esm/sub-blocks/MediaCard/form.d.ts +8 -0
- package/build/esm/sub-blocks/MediaCard/form.js +12 -0
- package/build/esm/sub-blocks/MediaCard/form.js.map +1 -0
- package/build/esm/sub-blocks/MediaCard/index.js +3 -11
- package/build/esm/sub-blocks/MediaCard/index.js.map +1 -1
- package/build/esm/sub-blocks/MediaCard/index_deprecated.js +5 -10
- package/build/esm/sub-blocks/MediaCard/index_deprecated.js.map +1 -1
- package/build/esm/sub-blocks/PriceCard/form.d.ts +16 -0
- package/build/esm/sub-blocks/PriceCard/form.js +22 -0
- package/build/esm/sub-blocks/PriceCard/form.js.map +1 -0
- package/build/esm/sub-blocks/PriceCard/icon.d.ts +2 -0
- package/build/esm/sub-blocks/PriceCard/icon.js +9 -0
- package/build/esm/sub-blocks/PriceCard/icon.js.map +1 -0
- package/build/esm/sub-blocks/PriceCard/index.js +5 -21
- package/build/esm/sub-blocks/PriceCard/index.js.map +1 -1
- package/build/esm/sub-blocks/PriceCard/index_deprecated.js +5 -20
- package/build/esm/sub-blocks/PriceCard/index_deprecated.js.map +1 -1
- package/build/esm/sub-blocks/PriceDetailed/form.d.ts +12 -0
- package/build/esm/sub-blocks/PriceDetailed/form.js +23 -0
- package/build/esm/sub-blocks/PriceDetailed/form.js.map +1 -0
- package/build/esm/sub-blocks/PriceDetailed/icon.d.ts +2 -0
- package/build/esm/sub-blocks/PriceDetailed/icon.js +9 -0
- package/build/esm/sub-blocks/PriceDetailed/icon.js.map +1 -0
- package/build/esm/sub-blocks/PriceDetailed/index.js +5 -22
- package/build/esm/sub-blocks/PriceDetailed/index.js.map +1 -1
- package/build/esm/sub-blocks/PriceDetailed/index_deprecated.js +3 -21
- package/build/esm/sub-blocks/PriceDetailed/index_deprecated.js.map +1 -1
- package/build/esm/sub-blocks/Quote/form.d.ts +8 -0
- package/build/esm/sub-blocks/Quote/form.js +12 -0
- package/build/esm/sub-blocks/Quote/form.js.map +1 -0
- package/build/esm/sub-blocks/Quote/icon.d.ts +2 -0
- package/build/esm/sub-blocks/Quote/icon.js +9 -0
- package/build/esm/sub-blocks/Quote/icon.js.map +1 -0
- package/build/esm/sub-blocks/Quote/index.js +5 -11
- package/build/esm/sub-blocks/Quote/index.js.map +1 -1
- package/build/esm/sub-blocks/Quote/index_deprecated.js +5 -10
- package/build/esm/sub-blocks/Quote/index_deprecated.js.map +1 -1
- package/package.json +21 -1
- package/widget/index.js +1 -1
- package/build/cjs/blocks/extensions/GeneralExtension.d.ts +0 -20
- package/build/cjs/blocks/extensions/GeneralExtension.js +0 -42
- package/build/cjs/blocks/extensions/GeneralExtension.js.map +0 -1
- package/build/esm/blocks/extensions/GeneralExtension.d.ts +0 -20
- package/build/esm/blocks/extensions/GeneralExtension.js +0 -36
- package/build/esm/blocks/extensions/GeneralExtension.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseSchema.js","sourceRoot":"../../../../src","sources":["form-builder-v2/utils/parseSchema.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IACxB,WAAW;IACX,UAAU;IACV,QAAQ;IACR,qBAAqB;IACrB,QAAQ;IACR,YAAY;IACZ,MAAM;IACN,SAAS;CACZ,CAAC,CAAC;AAIH,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC;IACjC,WAAW;IACX,UAAU;IACV,QAAQ;IACR,qBAAqB;IACrB,QAAQ;IACR,YAAY;CACf,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC,CAAC;AAEtE,MAAM,aAAa,GAAG,CAAC,GAA4B,EAAE,IAAY,EAAQ,EAAE;IACvE,MAAM,IAAI,GAAG,GAAG,CAAC,IAAc,CAAC;IAEhC,IAAI,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QACjE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,oBAAoB,IAAI,mBAAmB,CAAC,CAAC;IACxE,CAAC;IAED,IAAI,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1D,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,oBAAoB,IAAI,sCAAsC,CAAC,CAAC;QAC3F,CAAC;QACD,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAY,EAAE,CAAC,EAAE,EAAE;YACpC,IAAI,CAAC,GAAG,IAAI,OAA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AAC;QACT,OAAO,EAAC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,qBAAsB,CAAW,CAAC,OAAO,EAAE,EAAC,CAAC;IAC3E,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,OAAO,EAAC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,uCAAuC,EAAC,CAAC;IACvE,CAAC;IACD,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,MAAM,MAAM,GAAG,GAAG,EAAE;QAChB,OAAO,IAAI,CAAC,CAAC;QACb,OAAO,OAAO,OAAO,EAAE,CAAC;IAC5B,CAAC,CAAC;IACF,IAAI,CAAC;QACD,MAAM,MAAM,GAAG,oBAAoB,CAAC,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;QACxD,OAAO,EAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAC,CAAC;IAC9B,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACT,OAAO,EAAC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAG,CAAW,CAAC,OAAO,EAAC,CAAC;IACpD,CAAC;AACL,CAAC,CAAC","sourcesContent":["import type {FormField} from '../types';\n\nconst VALID_TYPES = new Set([\n 'textInput',\n 'textArea',\n 'select',\n 'segmentedRadioGroup',\n 'switch',\n 'colorInput',\n 'text',\n 'section',\n]);\n\nexport type ParseSchemaResult = {ok: true; fields: FormField[]} | {ok: false; error: string};\n\nconst TYPES_REQUIRING_NAME = new Set([\n 'textInput',\n 'textArea',\n 'select',\n 'segmentedRadioGroup',\n 'switch',\n 'colorInput',\n]);\n\nconst TYPES_WITH_OPTIONS = new Set(['select', 'segmentedRadioGroup']);\n\nconst validateField = (obj: Record<string, unknown>, here: string): void => {\n const type = obj.type as string;\n\n if (TYPES_REQUIRING_NAME.has(type) && typeof obj.name !== 'string') {\n throw new Error(`${here}: field of type \"${type}\" requires \"name\"`);\n }\n\n if (TYPES_WITH_OPTIONS.has(type)) {\n if (!Array.isArray(obj.options) || obj.options.length === 0) {\n throw new Error(`${here}: field of type \"${type}\" requires non-empty \"options\" array`);\n }\n obj.options.forEach((opt: unknown, i) => {\n if (!opt || typeof opt !== 'object') {\n throw new Error(`${here}.options[${i}]: expected object`);\n }\n const o = opt as Record<string, unknown>;\n if (typeof o.value !== 'string' || typeof o.content !== 'string') {\n throw new Error(`${here}.options[${i}]: \"value\" and \"content\" must be strings`);\n }\n });\n }\n\n if (type === 'text' && typeof obj.text !== 'string') {\n throw new Error(`${here}: field of type \"text\" requires \"text\" string`);\n }\n};\n\nconst validateAndAssignIds = (raw: unknown[], path: string, nextId: () => string): FormField[] => {\n const seenNames = new Set<string>();\n return raw.map((item, i) => {\n const here = `${path}[${i}]`;\n if (!item || typeof item !== 'object') {\n throw new Error(`${here}: expected object, got ${typeof item}`);\n }\n const obj = item as Record<string, unknown>;\n if (typeof obj.type !== 'string' || !VALID_TYPES.has(obj.type)) {\n throw new Error(`${here}: unknown field type \"${String(obj.type)}\"`);\n }\n validateField(obj, here);\n if (typeof obj.name === 'string') {\n if (seenNames.has(obj.name)) {\n throw new Error(`${here}: duplicate name \"${obj.name}\"`);\n }\n seenNames.add(obj.name);\n }\n if (obj.type === 'section') {\n const nested = Array.isArray(obj.fields)\n ? validateAndAssignIds(obj.fields, `${here}.fields`, nextId)\n : [];\n return {...obj, id: nextId(), fields: nested} as FormField;\n }\n return {...obj, id: nextId()} as FormField;\n });\n};\n\nexport const parseSchema = (input: string): ParseSchemaResult => {\n const trimmed = input.trim();\n if (!trimmed) {\n return {ok: false, error: 'Schema is empty'};\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(trimmed);\n } catch (e) {\n return {ok: false, error: `JSON parse error: ${(e as Error).message}`};\n }\n if (!Array.isArray(parsed)) {\n return {ok: false, error: 'Schema must be a JSON array of fields'};\n }\n let counter = 0;\n const nextId = () => {\n counter += 1;\n return `imp_${counter}`;\n };\n try {\n const fields = validateAndAssignIds(parsed, '', nextId);\n return {ok: true, fields};\n } catch (e) {\n return {ok: false, error: (e as Error).message};\n }\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stripIds.js","sourceRoot":"../../../../src","sources":["form-builder-v2/utils/stripIds.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,MAAmB,EAAU,EAAE,CACpD,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;IACjB,MAAM,EAAC,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,EAAC,GAAG,KAAK,CAAC;IACjC,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,EAAC,GAAG,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAC,CAAC;IACpD,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC,CAAW,CAAC","sourcesContent":["import type {Fields} from '../../form-generator-v2/types';\nimport type {FormField} from '../types';\n\nexport const stripIds = (fields: FormField[]): Fields =>\n fields.map((field) => {\n const {id: _id, ...rest} = field;\n if (rest.type === 'section') {\n return {...rest, fields: stripIds(rest.fields)};\n }\n return rest;\n }) as Fields;\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BuilderSectionField, FormField } from "../types.js";
|
|
2
|
+
export declare const walkFields: (fields: FormField[], visit: (field: FormField) => void) => void;
|
|
3
|
+
export declare const findField: (fields: FormField[], predicate: (field: FormField) => boolean) => FormField | null;
|
|
4
|
+
export declare const transformAtId: (fields: FormField[], id: string, handler: (siblings: FormField[], index: number, parent: BuilderSectionField | null) => FormField[], parent?: BuilderSectionField | null) => FormField[] | null;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export const walkFields = (fields, visit) => {
|
|
2
|
+
for (const field of fields) {
|
|
3
|
+
visit(field);
|
|
4
|
+
if (field.type === 'section') {
|
|
5
|
+
walkFields(field.fields, visit);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
export const findField = (fields, predicate) => {
|
|
10
|
+
for (const field of fields) {
|
|
11
|
+
if (predicate(field))
|
|
12
|
+
return field;
|
|
13
|
+
if (field.type === 'section') {
|
|
14
|
+
const nested = findField(field.fields, predicate);
|
|
15
|
+
if (nested)
|
|
16
|
+
return nested;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
};
|
|
21
|
+
export const transformAtId = (fields, id, handler, parent = null) => {
|
|
22
|
+
const index = fields.findIndex((field) => field.id === id);
|
|
23
|
+
if (index !== -1) {
|
|
24
|
+
return handler(fields, index, parent);
|
|
25
|
+
}
|
|
26
|
+
for (let i = 0; i < fields.length; i += 1) {
|
|
27
|
+
const field = fields[i];
|
|
28
|
+
if (field.type === 'section') {
|
|
29
|
+
const result = transformAtId(field.fields, id, handler, field);
|
|
30
|
+
if (result !== null) {
|
|
31
|
+
const next = [...fields];
|
|
32
|
+
next[i] = { ...field, fields: result };
|
|
33
|
+
return next;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=treeWalk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treeWalk.js","sourceRoot":"../../../../src","sources":["form-builder-v2/utils/treeWalk.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAmB,EAAE,KAAiC,EAAQ,EAAE;IACvF,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QACzB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC3B,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACpC,CAAC;IACL,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MA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AE,MAAM,EAAE,MAAM,EAAC,CAAC;gBACrC,OAAO,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;IACL,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC","sourcesContent":["import {BuilderSectionField, FormField} from '../types';\n\nexport const walkFields = (fields: FormField[], visit: (field: FormField) => void): void => {\n for (const field of fields) {\n visit(field);\n if (field.type === 'section') {\n walkFields(field.fields, visit);\n }\n }\n};\n\nexport const findField = (\n fields: FormField[],\n predicate: (field: FormField) => boolean,\n): FormField | null => {\n for (const field of fields) {\n if (predicate(field)) return field;\n if (field.type === 'section') {\n const nested = findField(field.fields, predicate);\n if (nested) return nested;\n }\n }\n return null;\n};\n\nexport const transformAtId = (\n fields: FormField[],\n id: string,\n handler: (\n siblings: FormField[],\n index: number,\n parent: BuilderSectionField | null,\n ) => FormField[],\n parent: BuilderSectionField | null = null,\n): FormField[] | null => {\n const index = fields.findIndex((field) => field.id === id);\n if (index !== -1) {\n return handler(fields, index, parent);\n }\n for (let i = 0; i < fields.length; i += 1) {\n const field = fields[i];\n if (field.type === 'section') {\n const result = transformAtId(field.fields, id, handler, field);\n if (result !== null) {\n const next = [...fields];\n next[i] = {...field, fields: result};\n return next;\n }\n }\n }\n return null;\n};\n"]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export declare const componentMap: {
|
|
2
|
-
section: ({ title, opened, fields, when, content, onUpdate, className, index, withAddButton, itemTitle, itemView, }: import("../../index.js").ClassNameProps & import("../
|
|
3
|
-
select: ({ title, name, options, when, content, onUpdate, hasClear, defaultValue, }: import("../
|
|
4
|
-
textInput: ({ title, name, when, content, onUpdate, defaultValue }: import("../
|
|
5
|
-
segmentedRadioGroup: ({ title, name, options, when, content, onUpdate, defaultValue, }: import("../
|
|
6
|
-
colorInput: ({ title, name, when, content, onUpdate, className, defaultValue, }: import("../../index.js").ClassNameProps & import("../
|
|
2
|
+
section: ({ title, opened, fields, when, content, onUpdate, className, index, withAddButton, itemTitle, itemView, }: import("../../index.js").ClassNameProps & import("../index.js").CommonProps & import("../index.js").SectionField) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
select: ({ title, name, options, when, content, onUpdate, hasClear, defaultValue, }: import("../index.js").CommonProps & import("../index.js").SelectField) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
textInput: ({ title, name, when, content, onUpdate, defaultValue }: import("../index.js").CommonProps & import("../index.js").TextField) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
segmentedRadioGroup: ({ title, name, options, when, content, onUpdate, defaultValue, }: import("../index.js").CommonProps & import("../index.js").SegmentedRadioGroupField) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
colorInput: ({ title, name, when, content, onUpdate, className, defaultValue, }: import("../../index.js").ClassNameProps & import("../index.js").CommonProps & import("../index.js").ColorField) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
text: ({ text, level, color, when, content, className }: import("../../index.js").ClassNameProps & {
|
|
8
8
|
text: string;
|
|
9
|
-
level?: import("../
|
|
10
|
-
color?: import("../
|
|
11
|
-
when?: import("../
|
|
12
|
-
content: import("../
|
|
9
|
+
level?: import("../index.js").Text["level"];
|
|
10
|
+
color?: import("../index.js").Text["color"];
|
|
11
|
+
when?: import("../index.js").When;
|
|
12
|
+
content: import("../index.js").Content;
|
|
13
13
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
textArea: ({ when, title, content, name, onUpdate, defaultValue }: import("../
|
|
15
|
-
switch: ({ title, when, name, content, onUpdate, className, defaultValue }: import("../../index.js").ClassNameProps & import("../
|
|
14
|
+
textArea: ({ when, title, content, name, onUpdate, defaultValue }: import("../index.js").CommonProps & import("../index.js").TextField) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
switch: ({ title, when, name, content, onUpdate, className, defaultValue }: import("../../index.js").ClassNameProps & import("../index.js").SwitchField & import("../index.js").CommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["form-generator-v2/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,2BAAwB;AAC3D,2BAAwB","sourcesContent":["export {default as FormGeneratorV2} from './FormGenerator';\nexport * from './types';\n"]}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import BlockBase from "../../components/BlockBase/BlockBase.js";
|
|
3
|
-
export const BlockBaseExtensionBlockWrapper = ({ props, content, children }) =>
|
|
3
|
+
export const BlockBaseExtensionBlockWrapper = ({ props, content, children, index }) => {
|
|
4
|
+
let defaultIndent;
|
|
5
|
+
if (index === 0) {
|
|
6
|
+
defaultIndent = { top: '0', bottom: 'l' };
|
|
7
|
+
}
|
|
8
|
+
return (_jsx(BlockBase, { anchor: content?.anchor ?? props?.anchor, indent: content?.indent ?? props?.indent ?? defaultIndent, visible: content?.visible ?? props?.visible, resetPaddings: content?.resetPaddings ?? props?.resetPaddings, qa: content?.qa ?? props?.qa, children: children }));
|
|
9
|
+
};
|
|
4
10
|
export const blockBaseExtension = () => ({
|
|
5
11
|
name: 'Block Base',
|
|
6
12
|
id: '@gravity-ui/page-constructor/block-base',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockBaseExtension.js","sourceRoot":"../../../../src","sources":["gravity-blocks/extensions/BlockBaseExtension.tsx"],"names":[],"mappings":";AAEA,OAAO,SAAS,gDAA6C;
|
|
1
|
+
{"version":3,"file":"BlockBaseExtension.js","sourceRoot":"../../../../src","sources":["gravity-blocks/extensions/BlockBaseExtension.tsx"],"names":[],"mappings":";AAEA,OAAO,SAAS,gDAA6C;AAK7D,MAAM,CAAC,MAAM,8BAA8B,GAEvC,CAAC,EAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAC,EAAE,EAAE;IACtC,IAAI,aAAa,CAAC;IAElB,IAA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,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,IAAI,EAAC;yBAChB;qBACJ;oBACD;wBACI,IAAI,EAAE,QAAQ;wBACd,KAAK,EAAE,eAAe;wBACtB,IAAI,EAAE,eAAe;wBACrB,QAAQ,EAAE,IAAI;wBACd,OAAO,EAAE;4BACL,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,IAAI,EAAC;4BACb,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,GAAG,EAAC;4BACZ,EAAC,KAAK,EAAE,IAAI,EAAC;yBAChB;qBACJ;oBACD;wBACI,IAAI,EAAE,QAAQ;wBACd,KAAK,EAAE,oBAAoB;wBAC3B,IAAI,EAAE,SAAS;wBACf,QAAQ,EAAE,IAAI;wBACd,OAAO,EAAE;4BACL,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAC;4BACjC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC;4BACrC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC;4BACrC,EAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC;yBACxC;qBACJ;iBACJ;aACJ;SACJ;KACJ;CACJ,CAAC,CAAC","sourcesContent":["import * as React from 'react';\n\nimport BlockBase from '../../components/BlockBase/BlockBase';\nimport type {PageConstructorExtension} from '../../containers/PageConstructor/PageConstructor';\nimport type {BlockBaseProps, BlockWrapperDataProps} from '../../models';\nimport {IndentValue} from '../grid';\n\nexport const BlockBaseExtensionBlockWrapper: React.FC<\n BlockWrapperDataProps<BlockBaseProps> & React.PropsWithChildren\n> = ({props, content, children, index}) => {\n let defaultIndent;\n\n if (index === 0) {\n defaultIndent = {top: '0' as IndentValue, bottom: 'l' as IndentValue};\n }\n\n return (\n <BlockBase\n anchor={content?.anchor ?? props?.anchor}\n indent={content?.indent ?? props?.indent ?? defaultIndent}\n visible={content?.visible ?? props?.visible}\n resetPaddings={content?.resetPaddings ?? props?.resetPaddings}\n qa={content?.qa ?? props?.qa}\n >\n {children}\n </BlockBase>\n );\n};\n\nexport const blockBaseExtension = (): PageConstructorExtension<{}, {}, BlockBaseProps> => ({\n name: 'Block Base',\n id: '@gravity-ui/page-constructor/block-base',\n settings: {\n blockWrapper: BlockBaseExtensionBlockWrapper,\n blockInputs: [\n {\n type: 'section',\n title: 'Block Base',\n fields: [\n {\n type: 'textInput',\n title: 'Anchor',\n name: 'anchor.url',\n },\n {\n type: 'textInput',\n title: 'Anchor text',\n name: 'anchor.text',\n },\n {\n type: 'select',\n title: 'Top indent',\n name: 'indent.top',\n hasClear: true,\n options: [\n {value: '0'},\n {value: 'xs'},\n {value: 's'},\n {value: 'm'},\n {value: 'l'},\n {value: 'xl'},\n ],\n },\n {\n type: 'select',\n title: 'Bottom indent',\n name: 'indent.bottom',\n hasClear: true,\n options: [\n {value: '0'},\n {value: 'xs'},\n {value: 's'},\n {value: 'm'},\n {value: 'l'},\n {value: 'xl'},\n ],\n },\n {\n type: 'select',\n title: 'Hide on breakpoint',\n name: 'visible',\n hasClear: true,\n options: [\n {value: 'sm', content: 'SM only'},\n {value: 'md', content: 'MD and down'},\n {value: 'lg', content: 'LG and down'},\n {value: 'xl', content: 'XL and down'},\n ],\n },\n ],\n },\n ],\n },\n});\n"]}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import type { PageConstructorExtension } from "../../containers/PageConstructor/PageConstructor.js";
|
|
2
2
|
import { MediaProps, NavigationData, PageContent } from "../../models/index.js";
|
|
3
3
|
export { GravityBlocksProvider, type GravityBlocksProviderProps, } from "../context/GravityBlocksProvider.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
animated?: boolean;
|
|
4
|
+
import { GeneralExtensionGlobalConfig, GeneralExtensionWrapperProps } from "./GeneralExtension.js";
|
|
5
|
+
export interface GravityBlocksWrapperProps extends GeneralExtensionWrapperProps {
|
|
7
6
|
renderMenu?: () => React.ReactNode;
|
|
8
|
-
microdata?: {
|
|
9
|
-
contentUpdatedDate?: string;
|
|
10
|
-
};
|
|
11
7
|
}
|
|
12
|
-
export interface GravityBlocksGlobalConfig {
|
|
8
|
+
export interface GravityBlocksGlobalConfig extends GeneralExtensionGlobalConfig {
|
|
13
9
|
background?: MediaProps;
|
|
14
10
|
navigation?: NavigationData;
|
|
15
|
-
isBranded?: boolean;
|
|
16
|
-
animated?: boolean;
|
|
17
11
|
}
|
|
18
12
|
export interface GravityPageContent extends PageContent, GravityBlocksGlobalConfig {
|
|
19
13
|
}
|
|
@@ -2,16 +2,18 @@ export { GravityBlocksProvider, } from "../context/GravityBlocksProvider.js";
|
|
|
2
2
|
import { backgroundExtension, blockBaseExtension, generalExtension, navigationExtension } from "./index.js";
|
|
3
3
|
/** @returns Array of PageConstructorExtension instances for gravity-blocks. */
|
|
4
4
|
export const gravityBlocksExtension = ({ wrapperProps = {}, globalDefaults = {}, }) => {
|
|
5
|
-
const { background, navigation,
|
|
5
|
+
const { background, navigation, ...generalGlobalDefaults } = globalDefaults;
|
|
6
|
+
const { renderMenu, ...generalWrapperProps } = wrapperProps;
|
|
6
7
|
return [
|
|
7
8
|
generalExtension({
|
|
8
|
-
|
|
9
|
+
wrapperProps: generalWrapperProps,
|
|
10
|
+
globalDefaults: generalGlobalDefaults,
|
|
9
11
|
}),
|
|
10
12
|
backgroundExtension({
|
|
11
13
|
globalDefaults: { background },
|
|
12
14
|
}),
|
|
13
15
|
navigationExtension({
|
|
14
|
-
wrapperProps,
|
|
16
|
+
wrapperProps: { renderMenu },
|
|
15
17
|
globalDefaults: { navigation },
|
|
16
18
|
}),
|
|
17
19
|
blockBaseExtension(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GravityBlocksExtension.js","sourceRoot":"../../../../src","sources":["gravity-blocks/extensions/GravityBlocksExtension.tsx"],"names":[],"mappings":"AAGA,OAAO,EACH,qBAAqB,GAExB,4CAAyC;
|
|
1
|
+
{"version":3,"file":"GravityBlocksExtension.js","sourceRoot":"../../../../src","sources":["gravity-blocks/extensions/GravityBlocksExtension.tsx"],"names":[],"mappings":"AAGA,OAAO,EACH,qBAAqB,GAExB,4CAAyC;AAI1C,OAAO,EAAC,mBAAmB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,mBAAmB,EAAC,mBAAU;AAajG,+EAA+E;AAC/E,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACnC,YAAY,GAAG,EAAE,EACjB,cAAc,GAAG,EAAE,GAItB,EAAoF,EAAE;IACnF,MAAM,EAAC,UAAU,EAAE,UAAU,EAAE,GAAG,qBAAqB,EAAC,GAAG,cAAc,CAAC;IAC1E,MAAM,EAAC,UAAU,EAAE,GAAG,mBAAmB,EAAC,GAAG,YAAY,CAAC;IAE1D,OAAO;QACH,gBAAgB,CAAC;YACb,YAAY,EAAE,mBAAmB;YACjC,cAAc,EAAE,qBAAqB;SACxC,CAAC;QACF,mBAAmB,CAAC;YAChB,cAAc,EAAE,EAAC,UAAU,EAAC;SAC/B,CAAC;QACF,mBAAmB,CAAC;YAChB,YAAY,EAAE,EAAC,UAAU,EAAC;YAC1B,cAAc,EAAE,EAAC,UAAU,EAAC;SAC/B,CAAC;QACF,kBAAkB,EAAE;KACvB,CAAC;AACN,CAAC,CAAC","sourcesContent":["import type {PageConstructorExtension} from '../../containers/PageConstructor/PageConstructor';\nimport {MediaProps, NavigationData, PageContent} from '../../models';\n\nexport {\n GravityBlocksProvider,\n type GravityBlocksProviderProps,\n} from '../context/GravityBlocksProvider';\n\nimport {GeneralExtensionGlobalConfig, GeneralExtensionWrapperProps} from './GeneralExtension';\n\nimport {backgroundExtension, blockBaseExtension, generalExtension, navigationExtension} from '.';\n\nexport interface GravityBlocksWrapperProps extends GeneralExtensionWrapperProps {\n renderMenu?: () => React.ReactNode;\n}\n\nexport interface GravityBlocksGlobalConfig extends GeneralExtensionGlobalConfig {\n background?: MediaProps;\n navigation?: NavigationData;\n}\n\nexport interface GravityPageContent extends PageContent, GravityBlocksGlobalConfig {}\n\n/** @returns Array of PageConstructorExtension instances for gravity-blocks. */\nexport const gravityBlocksExtension = ({\n wrapperProps = {},\n globalDefaults = {},\n}: {\n wrapperProps?: GravityBlocksWrapperProps;\n globalDefaults?: GravityBlocksGlobalConfig;\n}): PageConstructorExtension<GravityBlocksGlobalConfig, GravityBlocksWrapperProps>[] => {\n const {background, navigation, ...generalGlobalDefaults} = globalDefaults;\n const {renderMenu, ...generalWrapperProps} = wrapperProps;\n\n return [\n generalExtension({\n wrapperProps: generalWrapperProps,\n globalDefaults: generalGlobalDefaults,\n }),\n backgroundExtension({\n globalDefaults: {background},\n }),\n navigationExtension({\n wrapperProps: {renderMenu},\n globalDefaults: {navigation},\n }),\n blockBaseExtension(),\n ];\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["gravity-blocks/index.ts"],"names":[],"mappings":"AAAA,sCAA6B;AAC7B,kCAAyB;AACzB,iCAAwB;AACxB,sCAA6B;AAC7B,gCAAuB;AACvB,mCAA0B","sourcesContent":["export * from './extensions';\nexport * from './schema';\nexport * from './hooks';\nexport * from './navigation';\nexport * from './grid';\nexport * from '../blocks';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["gravity-blocks/index.ts"],"names":[],"mappings":"AAAA,sCAA6B;AAC7B,kCAAyB;AACzB,iCAAwB;AACxB,sCAA6B;AAC7B,gCAAuB;AACvB,mCAA0B;AAC1B,gCAA6B","sourcesContent":["export * from './extensions';\nexport * from './schema';\nexport * from './hooks';\nexport * from './navigation';\nexport * from './grid';\nexport * from '../blocks';\nexport * from '../utils/svg';\n"]}
|
|
@@ -621,11 +621,6 @@ export declare const cardSchemas: {
|
|
|
621
621
|
hoverBackgroundColor: {
|
|
622
622
|
type: string;
|
|
623
623
|
};
|
|
624
|
-
text: {
|
|
625
|
-
type: string;
|
|
626
|
-
contentType: string;
|
|
627
|
-
inputType: string;
|
|
628
|
-
};
|
|
629
624
|
title: {
|
|
630
625
|
oneOf: ({
|
|
631
626
|
type: string;
|
|
@@ -736,6 +731,11 @@ export declare const cardSchemas: {
|
|
|
736
731
|
contentType?: undefined;
|
|
737
732
|
})[];
|
|
738
733
|
};
|
|
734
|
+
text: {
|
|
735
|
+
type: string;
|
|
736
|
+
contentType: string;
|
|
737
|
+
inputType: string;
|
|
738
|
+
};
|
|
739
739
|
size: {
|
|
740
740
|
type: string;
|
|
741
741
|
enum: string[];
|
|
@@ -1115,11 +1115,6 @@ export declare const cardSchemas: {
|
|
|
1115
1115
|
additionalProperties: boolean;
|
|
1116
1116
|
properties: {};
|
|
1117
1117
|
};
|
|
1118
|
-
text: {
|
|
1119
|
-
type: string;
|
|
1120
|
-
contentType: string;
|
|
1121
|
-
inputType: string;
|
|
1122
|
-
};
|
|
1123
1118
|
title: {
|
|
1124
1119
|
oneOf: ({
|
|
1125
1120
|
type: string;
|
|
@@ -1230,6 +1225,11 @@ export declare const cardSchemas: {
|
|
|
1230
1225
|
contentType?: undefined;
|
|
1231
1226
|
})[];
|
|
1232
1227
|
};
|
|
1228
|
+
text: {
|
|
1229
|
+
type: string;
|
|
1230
|
+
contentType: string;
|
|
1231
|
+
inputType: string;
|
|
1232
|
+
};
|
|
1233
1233
|
size: {
|
|
1234
1234
|
type: string;
|
|
1235
1235
|
enum: string[];
|
|
@@ -35,7 +35,7 @@ export const usePCEditorInitializeEvents = ({ initialContent, setContent, blocks
|
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
37
|
const onResize = React.useCallback(() => {
|
|
38
|
-
const height = document.
|
|
38
|
+
const height = document.body.scrollHeight;
|
|
39
39
|
sendEventPostMessage('ON_RESIZE', { height });
|
|
40
40
|
}, []);
|
|
41
41
|
React.useEffect(() => {
|
|
@@ -79,7 +79,7 @@ export const usePCEditorInitializeEvents = ({ initialContent, setContent, blocks
|
|
|
79
79
|
};
|
|
80
80
|
}, [onResize]);
|
|
81
81
|
React.useEffect(() => {
|
|
82
|
-
const height = document.
|
|
82
|
+
const height = document.body.scrollHeight;
|
|
83
83
|
sendEventPostMessage('ON_INIT', { height });
|
|
84
84
|
}, []);
|
|
85
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePCEditorInitializeEvents.js","sourceRoot":"../../../src","sources":["hooks/usePCEditorInitializeEvents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,CAAC,MAAM,QAAQ,CAAC;AAEvB,OAAO,EAAC,kBAAkB,EAAC,gCAA6B;AAMxD,OAAO,EAAC,gBAAgB,EAAC,8BAA2B;AACpD,OAAO,EAAC,oBAAoB,EAAE,iCAAiC,EAAC,+BAA4B;AAW5F,SAAS,cAAc,CAAC,QAAuB;IAC3C,OAAO,QAAQ,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAC,EAAE,EAAE;QAC3D,MAAM,IAAI,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;QACjF,OAAO,EAAC,IAAI,EAAE,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EACxC,cAAc,EACd,UAAU,EACV,MAAM,EACN,MAAM,EACN,WAAW,EACX,QAAQ,GACe,EAAE,EAAE;IAC3B,MAAM,EAAC,WAAW,EAAE,OAAO,EAAC,GAAG,gBAAgB,EAAE,CAAC;IAElD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,IAAI,WAAW,EAAE,CAAC;YACd,UAAU,CAAC,OAA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,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEhC,uCAAuC;QACvC,iBAAiB,EAAE,CAAC;QAEpB,OAAO,GAAG,EAAE;YACR,iBAAiB,CAAC,MAAM,EAAE,CAAC;YAC3B,WAAW,EAAE,CAAC;YACd,QAAQ,CAAC,UAAU,EAAE,CAAC;YACtB,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBACjB,oBAAoB,CAAC,KAAK,CAAC,CAAC;YAChC,CAAC;QACL,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC5C,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,QAAQ,CAAC,CAAC;QAC9C,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QAC3C,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEhC,OAAO,GAAG,EAAE;YACR,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YAC/C,QAAQ,CAAC,UAAU,EAAE,CAAC;QAC1B,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC;QAC1C,oBAAoB,CAAC,SAAS,EAAE,EAAC,MAAM,EAAC,CAAC,CAAC;IAC9C,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC,CAAC","sourcesContent":["import * as React from 'react';\n\nimport _ from 'lodash';\n\nimport {toSerializableRect} from '../common/types/rect';\nimport {BlockData} from '../constructor-items';\nimport {BlockRegistry} from '../context/blockRegistryContext';\nimport {Fields} from '../form-generator-v2/types';\nimport {PageContent} from '../models';\n\nimport {usePCEditorStore} from './usePCEditorStore';\nimport {sendEventPostMessage, useInternalPostMessageAPIListener} from './usePostMessageAPI';\n\ninterface UseEditorInitializeProps {\n initialContent: PageContent;\n setContent: (content: PageContent) => void;\n blocks: Array<BlockData>;\n global?: Fields;\n blockInputs?: Fields;\n registry: BlockRegistry | null;\n}\n\nfunction collectRectMap(registry: BlockRegistry) {\n return registry.getEntries().map(({path, element, dropZone}) => {\n const rect = element.getClientRects().item(0) ?? element.getBoundingClientRect();\n return {path, rect: toSerializableRect(rect), dropZone};\n });\n}\n\nexport const usePCEditorInitializeEvents = ({\n initialContent,\n setContent,\n blocks,\n global,\n blockInputs,\n registry,\n}: UseEditorInitializeProps) => {\n const {initialized, content} = usePCEditorStore();\n\n React.useEffect(() => {\n if (initialized) {\n setContent(content);\n }\n }, [content, initialized, setContent]);\n\n useInternalPostMessageAPIListener('GET_INITIAL_CONTENT', () => {\n sendEventPostMessage('ON_INITIAL_CONTENT', initialContent);\n });\n\n useInternalPostMessageAPIListener('GET_SUPPORTED_BLOCKS', () => {\n sendEventPostMessage('ON_SUPPORTED_BLOCKS', {\n blocks: blocks.map((block) => ({\n type: block.type,\n schema: blockInputs?.length\n ? {\n ...block.schema,\n inputs: [...blockInputs, ...(block.schema?.inputs || [])],\n }\n : block.schema,\n })),\n subBlocks: [],\n global: global || [],\n });\n });\n\n const onResize = React.useCallback(() => {\n const height = document.body.scrollHeight;\n sendEventPostMessage('ON_RESIZE', {height});\n }, []);\n\n React.useEffect(() => {\n if (!registry) {\n return undefined;\n }\n\n let frame: number | null = null;\n\n const sendRectMap = () => {\n frame = null;\n sendEventPostMessage('ON_UPDATE_RECT_MAP', {rects: collectRectMap(registry)});\n };\n\n const scheduleSend = () => {\n if (frame !== null) {\n return;\n }\n frame = requestAnimationFrame(sendRectMap);\n };\n\n const throttledSchedule = _.throttle(scheduleSend, 100, {leading: true, trailing: true});\n\n const unsubscribe = registry.subscribe(throttledSchedule);\n const observer = new ResizeObserver(throttledSchedule);\n observer.observe(document.body);\n\n // Initial push once registry is ready.\n throttledSchedule();\n\n return () => {\n throttledSchedule.cancel();\n unsubscribe();\n observer.disconnect();\n if (frame !== null) {\n cancelAnimationFrame(frame);\n }\n };\n }, [registry]);\n\n React.useEffect(() => {\n window.addEventListener('resize', onResize);\n const observer = new ResizeObserver(onResize);\n observer.observe(document.documentElement);\n observer.observe(document.body);\n\n return () => {\n window.removeEventListener('resize', onResize);\n observer.disconnect();\n };\n }, [onResize]);\n\n React.useEffect(() => {\n const height = document.body.scrollHeight;\n sendEventPostMessage('ON_INIT', {height});\n }, []);\n};\n"]}
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { POST_MESSAGE_SOURCE } from "../common/constants.js";
|
|
3
|
+
import { isValidPostMessage } from "../common/postMessage.js";
|
|
2
4
|
export function sendEventPostMessage(action, data) {
|
|
3
|
-
const message = { action, data };
|
|
5
|
+
const message = { action, data, source: POST_MESSAGE_SOURCE };
|
|
4
6
|
window.parent.postMessage(message, '*');
|
|
5
7
|
}
|
|
6
8
|
export function listenPostMessageActions(action, callback) {
|
|
7
9
|
const onMessage = (e) => {
|
|
10
|
+
if (!isValidPostMessage(e.data)) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
8
13
|
const message = e.data;
|
|
9
|
-
if (
|
|
14
|
+
if (message.action === action) {
|
|
10
15
|
return callback(message.data);
|
|
11
16
|
}
|
|
12
17
|
return undefined;
|
|
13
18
|
};
|
|
14
19
|
window.addEventListener('message', onMessage);
|
|
15
|
-
return () =>
|
|
16
|
-
window.removeEventListener('message', onMessage);
|
|
17
|
-
};
|
|
20
|
+
return () => window.removeEventListener('message', onMessage);
|
|
18
21
|
}
|
|
19
22
|
export function useInternalPostMessageAPIListener(action, callback) {
|
|
20
23
|
React.useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePostMessageAPI.js","sourceRoot":"../../../src","sources":["hooks/usePostMessageAPI.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"usePostMessageAPI.js","sourceRoot":"../../../src","sources":["hooks/usePostMessageAPI.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,mBAAmB,EAAC,+BAA4B;AACxD,OAAO,EAAC,kBAAkB,EAAC,iCAA8B;AAIzD,MAAM,UAAU,oBAAoB,CAChC,MAAS,EACT,IAA0B;IAE1B,MAAM,OAAO,GAAG,EAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,mBAAmB,EAA6B,CAAC;IACxF,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,wBAAwB,CACpC,MAAS,EACT,QAA+C;IAE/C,MAAM,SAAS,GAAG,CAAC,CAAe,EAAE,EAAE;QAClC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;YAC9B,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,MAAM,OAAO,GAAG,CAAC,CAAC,IAAgC,CAAC;QACnD,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YAC5B,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,SAAS,CAAC;IACrB,CAAC,CAAC;IAEF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC9C,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC7C,MAAS,EACT,QAA+C;IAE/C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,OAAO,wBAAwB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC3B,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {POST_MESSAGE_SOURCE} from '../common/constants';\nimport {isValidPostMessage} from '../common/postMessage';\nimport {PostMessageAPIMessage} from '../common/types';\nimport {ActionMessageTypes, EventMessageTypes} from '../common/types/actions';\n\nexport function sendEventPostMessage<K extends keyof EventMessageTypes>(\n action: K,\n data: EventMessageTypes[K],\n) {\n const message = {action, data, source: POST_MESSAGE_SOURCE} as PostMessageAPIMessage<K>;\n window.parent.postMessage(message, '*');\n}\n\nexport function listenPostMessageActions<K extends keyof ActionMessageTypes>(\n action: K,\n callback: (data: ActionMessageTypes[K]) => void,\n) {\n const onMessage = (e: MessageEvent) => {\n if (!isValidPostMessage(e.data)) {\n return undefined;\n }\n\n const message = e.data as PostMessageAPIMessage<K>;\n if (message.action === action) {\n return callback(message.data);\n }\n\n return undefined;\n };\n\n window.addEventListener('message', onMessage);\n return () => window.removeEventListener('message', onMessage);\n}\n\nexport function useInternalPostMessageAPIListener<K extends keyof ActionMessageTypes>(\n action: K,\n callback: (data: ActionMessageTypes[K]) => void,\n) {\n React.useEffect(() => {\n return listenPostMessageActions(action, callback);\n }, [action, callback]);\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { generateFormFieldsFromAjvSchema } from "../../form-generator-v2/utils/generateFormFieldsFromAjv.js";
|
|
2
|
+
import { BackgroundCard as BackgroundCardSchema } from "./schema.js";
|
|
3
|
+
// TODO: change to custom block schema
|
|
4
|
+
export const form = generateFormFieldsFromAjvSchema(BackgroundCardSchema['background-card']);
|
|
5
|
+
export const defaultValue = {
|
|
6
|
+
title: 'Background Card',
|
|
7
|
+
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
8
|
+
additionalInfo: 'Additional info',
|
|
9
|
+
backgroundColor: '#F0F0F0',
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.js","sourceRoot":"../../../../src","sources":["sub-blocks/BackgroundCard/form.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,+BAA+B,EAAC,mEAAgE;AAExG,OAAO,EAAC,cAAc,IAAI,oBAAoB,EAAC,oBAAiB;AAEhE,sCAAsC;AACtC,MAAM,CAAC,MAAM,IAAI,GAAG,+BAA+B,CAC/C,oBAAoB,CAAC,iBAAiB,CAAkC,CAC3E,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,KAAK,EAAE,iBAAiB;IACxB,IAAI,EAAE,6HAA6H;IACnI,cAAc,EAAE,iBAAiB;IACjC,eAAe,EAAE,SAAS;CAC7B,CAAC","sourcesContent":["import {JSONSchemaType} from 'ajv';\n\nimport {generateFormFieldsFromAjvSchema} from '../../form-generator-v2/utils/generateFormFieldsFromAjv';\n\nimport {BackgroundCard as BackgroundCardSchema} from './schema';\n\n// TODO: change to custom block schema\nexport const form = generateFormFieldsFromAjvSchema(\n BackgroundCardSchema['background-card'] as unknown as JSONSchemaType<{}>,\n);\n\nexport const defaultValue = {\n title: 'Background Card',\n text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',\n additionalInfo: 'Additional info',\n backgroundColor: '#F0F0F0',\n};\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { svgToDataUri } from "../../utils/svg.js";
|
|
2
|
+
export default svgToDataUri(`<svg width="100" height="50" viewBox="0 0 100 50" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<rect width="100" height="50" rx="7.81395" fill="white"/>
|
|
4
|
+
<rect x="37" y="10.2906" width="26" height="29.4186" rx="3.34884" fill="#C0C8DB"/>
|
|
5
|
+
<rect x="37" y="10.2906" width="26" height="14.5116" rx="3.34884" fill="#262626"/>
|
|
6
|
+
<rect x="40.3488" y="28.593" width="19.3023" height="2" rx="0.55814" fill="#262626"/>
|
|
7
|
+
<rect x="40.3488" y="31.7094" width="9" height="2" rx="0.55814" fill="#262626"/>
|
|
8
|
+
</svg>`);
|
|
9
|
+
//# sourceMappingURL=icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.js","sourceRoot":"../../../../src","sources":["sub-blocks/BackgroundCard/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,2BAAwB;AAE7C,eAAe,YAAY,CACvB;;;;;;OAMG,CACN,CAAC","sourcesContent":["import {svgToDataUri} from '../../utils/svg';\n\nexport default svgToDataUri(\n `<svg width=\"100\" height=\"50\" viewBox=\"0 0 100 50\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<rect width=\"100\" height=\"50\" rx=\"7.81395\" fill=\"white\"/>\n<rect x=\"37\" y=\"10.2906\" width=\"26\" height=\"29.4186\" rx=\"3.34884\" fill=\"#C0C8DB\"/>\n<rect x=\"37\" y=\"10.2906\" width=\"26\" height=\"14.5116\" rx=\"3.34884\" fill=\"#262626\"/>\n<rect x=\"40.3488\" y=\"28.593\" width=\"19.3023\" height=\"2\" rx=\"0.55814\" fill=\"#262626\"/>\n<rect x=\"40.3488\" y=\"31.7094\" width=\"9\" height=\"2\" rx=\"0.55814\" fill=\"#262626\"/>\n</svg>`,\n);\n"]}
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import { generateFormFieldsFromAjvSchema } from "../../form-generator-v2/utils/generateFormFieldsFromAjv.js";
|
|
2
1
|
import BackgroundCard from "./BackgroundCard.js";
|
|
3
|
-
import {
|
|
2
|
+
import { defaultValue, form } from "./form.js";
|
|
3
|
+
import icon from "./icon.js";
|
|
4
4
|
const BackgroundCardConfig = {
|
|
5
5
|
type: '@gravity-ui/page-constructor/background-card',
|
|
6
6
|
component: BackgroundCard,
|
|
7
7
|
schema: {
|
|
8
8
|
name: 'Background Card',
|
|
9
9
|
group: '@gravity-ui/page-constructor/Cards',
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
title: 'Background Card',
|
|
14
|
-
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
15
|
-
additionalInfo: 'Additional info',
|
|
16
|
-
backgroundColor: '#F0F0F0',
|
|
17
|
-
},
|
|
10
|
+
inputs: form,
|
|
11
|
+
default: defaultValue,
|
|
12
|
+
previewImg: icon,
|
|
18
13
|
},
|
|
19
14
|
};
|
|
20
15
|
export default BackgroundCardConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../../../../src","sources":["sub-blocks/BackgroundCard/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../../src","sources":["sub-blocks/BackgroundCard/index.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,4BAAyB;AAC9C,OAAO,EAAC,YAAY,EAAE,IAAI,EAAC,kBAAe;AAC1C,OAAO,IAAI,kBAAe;AAE1B,MAAM,oBAAoB,GAAc;IACpC,IAAI,EAAE,8CAA8C;IACpD,SAAS,EAAE,cAAc;IACzB,MAAM,EAAE;QACJ,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,oCAAoC;QAC3C,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,YAAY;QACrB,UAAU,EAAE,IAAI;KACnB;CACJ,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["import {BlockData} from '../../constructor-items';\n\nimport BackgroundCard from './BackgroundCard';\nimport {defaultValue, form} from './form';\nimport icon from './icon';\n\nconst BackgroundCardConfig: BlockData = {\n type: '@gravity-ui/page-constructor/background-card',\n component: BackgroundCard,\n schema: {\n name: 'Background Card',\n group: '@gravity-ui/page-constructor/Cards',\n inputs: form,\n default: defaultValue,\n previewImg: icon,\n },\n};\n\nexport default BackgroundCardConfig;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { generateFormFieldsFromAjvSchema } from "../../form-generator-v2/utils/generateFormFieldsFromAjv.js";
|
|
2
1
|
import BackgroundCard from "./BackgroundCard.js";
|
|
3
|
-
import {
|
|
2
|
+
import { defaultValue, form } from "./form.js";
|
|
3
|
+
import icon from "./icon.js";
|
|
4
4
|
const BackgroundCardConfig = {
|
|
5
5
|
type: 'background-card',
|
|
6
6
|
component: BackgroundCard,
|
|
@@ -8,13 +8,9 @@ const BackgroundCardConfig = {
|
|
|
8
8
|
name: 'Background Card',
|
|
9
9
|
group: '@deprecated',
|
|
10
10
|
hidden: true,
|
|
11
|
-
inputs:
|
|
12
|
-
default:
|
|
13
|
-
|
|
14
|
-
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
15
|
-
additionalInfo: 'Additional info',
|
|
16
|
-
backgroundColor: '#F0F0F0',
|
|
17
|
-
},
|
|
11
|
+
inputs: form,
|
|
12
|
+
default: defaultValue,
|
|
13
|
+
previewImg: icon,
|
|
18
14
|
},
|
|
19
15
|
};
|
|
20
16
|
export default BackgroundCardConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index_deprecated.js","sourceRoot":"../../../../src","sources":["sub-blocks/BackgroundCard/index_deprecated.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index_deprecated.js","sourceRoot":"../../../../src","sources":["sub-blocks/BackgroundCard/index_deprecated.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,4BAAyB;AAC9C,OAAO,EAAC,YAAY,EAAE,IAAI,EAAC,kBAAe;AAC1C,OAAO,IAAI,kBAAe;AAE1B,MAAM,oBAAoB,GAAc;IACpC,IAAI,EAAE,iBAAiB;IACvB,SAAS,EAAE,cAAc;IACzB,MAAM,EAAE;QACJ,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,aAAa;QACpB,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,YAAY;QACrB,UAAU,EAAE,IAAI;KACnB;CACJ,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["import {BlockData} from '../../constructor-items';\n\nimport BackgroundCard from './BackgroundCard';\nimport {defaultValue, form} from './form';\nimport icon from './icon';\n\nconst BackgroundCardConfig: BlockData = {\n type: 'background-card',\n component: BackgroundCard,\n schema: {\n name: 'Background Card',\n group: '@deprecated',\n hidden: true,\n inputs: form,\n default: defaultValue,\n previewImg: icon,\n },\n};\n\nexport default BackgroundCardConfig;\n"]}
|
|
@@ -180,11 +180,6 @@ export declare const BackgroundCard: {
|
|
|
180
180
|
additionalProperties: boolean;
|
|
181
181
|
properties: {};
|
|
182
182
|
};
|
|
183
|
-
text: {
|
|
184
|
-
type: string;
|
|
185
|
-
contentType: string;
|
|
186
|
-
inputType: string;
|
|
187
|
-
};
|
|
188
183
|
title: {
|
|
189
184
|
oneOf: ({
|
|
190
185
|
type: string;
|
|
@@ -295,6 +290,11 @@ export declare const BackgroundCard: {
|
|
|
295
290
|
contentType?: undefined;
|
|
296
291
|
})[];
|
|
297
292
|
};
|
|
293
|
+
text: {
|
|
294
|
+
type: string;
|
|
295
|
+
contentType: string;
|
|
296
|
+
inputType: string;
|
|
297
|
+
};
|
|
298
298
|
size: {
|
|
299
299
|
type: string;
|
|
300
300
|
enum: string[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BannerCardProps } from "../../blocks/Banner/schema.js";
|
|
2
|
+
import { generateFormFieldsFromAjvSchema } from "../../form-generator-v2/utils/generateFormFieldsFromAjv.js";
|
|
3
|
+
// TODO: change to custom block schema
|
|
4
|
+
export const form = generateFormFieldsFromAjvSchema(BannerCardProps);
|
|
5
|
+
export const defaultValue = {
|
|
6
|
+
color: 'rgba(54, 151, 241, 0.4)',
|
|
7
|
+
title: 'Banner Card',
|
|
8
|
+
subtitle: 'Some sort of description.',
|
|
9
|
+
button: {
|
|
10
|
+
text: 'Read more',
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.js","sourceRoot":"../../../../src","sources":["sub-blocks/BannerCard/form.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,eAAe,EAAC,sCAAmC;AAC3D,OAAO,EAAC,+BAA+B,EAAC,mEAAgE;AAExG,sCAAsC;AACtC,MAAM,CAAC,MAAM,IAAI,GAAG,+BAA+B,CAC/C,eAAgD,CACnD,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,KAAK,EAAE,yBAAyB;IAChC,KAAK,EAAE,aAAa;IACpB,QAAQ,EAAE,2BAA2B;IACrC,MAAM,EAAE;QACJ,IAAI,EAAE,WAAW;KACpB;CACJ,CAAC","sourcesContent":["import {JSONSchemaType} from 'ajv';\n\nimport {BannerCardProps} from '../../blocks/Banner/schema';\nimport {generateFormFieldsFromAjvSchema} from '../../form-generator-v2/utils/generateFormFieldsFromAjv';\n\n// TODO: change to custom block schema\nexport const form = generateFormFieldsFromAjvSchema(\n BannerCardProps as unknown as JSONSchemaType<{}>,\n);\n\nexport const defaultValue = {\n color: 'rgba(54, 151, 241, 0.4)',\n title: 'Banner Card',\n subtitle: 'Some sort of description.',\n button: {\n text: 'Read more',\n },\n};\n"]}
|