@gravity-ui/page-constructor 3.5.0-alpha.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/README.md +2 -0
- package/build/cjs/blocks/Banner/schema.d.ts +63 -21
- package/build/cjs/blocks/CardLayout/schema.d.ts +10 -4
- package/build/cjs/blocks/Companies/schema.d.ts +5 -2
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +3 -2
- package/build/cjs/blocks/ContentLayout/schema.d.ts +107 -61
- package/build/cjs/blocks/ContentLayout/schema.js +23 -18
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +31 -4
- package/build/cjs/blocks/ExtendedFeatures/schema.js +2 -3
- package/build/cjs/blocks/FilterBlock/schema.d.ts +13 -5
- package/build/cjs/blocks/FilterBlock/schema.js +13 -2
- package/build/cjs/blocks/Header/Header.css +6 -7
- package/build/cjs/blocks/Header/schema.d.ts +92 -36
- package/build/cjs/blocks/Header/schema.js +1 -0
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +48 -53
- package/build/cjs/blocks/HeaderSlider/schema.js +3 -1
- package/build/cjs/blocks/Icons/schema.d.ts +3 -1
- package/build/cjs/blocks/Icons/schema.js +2 -1
- package/build/cjs/blocks/Info/schema.d.ts +19 -8
- package/build/cjs/blocks/Map/schema.d.ts +17 -6
- package/build/cjs/blocks/Media/schema.d.ts +204 -152
- package/build/cjs/blocks/Media/schema.js +1 -1
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +22 -8
- package/build/cjs/blocks/PromoFeaturesBlock/schema.js +1 -0
- package/build/cjs/blocks/Questions/schema.d.ts +7 -3
- package/build/cjs/blocks/Slider/schema.d.ts +13 -18
- package/build/cjs/blocks/Slider/schema.js +4 -5
- package/build/cjs/blocks/Table/schema.d.ts +5 -2
- package/build/cjs/blocks/Table/schema.js +12 -2
- package/build/cjs/blocks/Tabs/schema.d.ts +43 -16
- package/build/cjs/components/BlockBase/BlockBase.js +2 -2
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -1
- package/build/cjs/components/Image/schema.d.ts +1 -0
- package/build/cjs/components/Image/schema.js +3 -2
- package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +1 -1
- package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +1 -1
- package/build/cjs/customization/BlockDecoration.d.ts +1 -1
- package/build/cjs/customization/BlockDecoration.js +5 -6
- package/build/cjs/editor/{Components → components}/AddBlock/AddBlock.css +1 -1
- package/build/cjs/editor/components/AddBlock/AddBlock.d.ts +7 -0
- package/build/cjs/editor/{Components → components}/AddBlock/AddBlock.js +2 -2
- package/build/cjs/editor/components/BlockForm/BlockForm.d.ts +12 -0
- package/build/cjs/editor/components/BlockForm/BlockForm.js +33 -0
- package/build/cjs/editor/components/ControlPanel/ControlPanel.css +26 -0
- package/build/cjs/editor/components/ControlPanel/ControlPanel.d.ts +8 -0
- package/build/cjs/editor/components/ControlPanel/ControlPanel.js +25 -0
- package/build/cjs/editor/components/ControlPanel/i18n/en.json +3 -0
- package/build/cjs/editor/components/ControlPanel/i18n/index.d.ts +2 -0
- package/build/cjs/editor/components/ControlPanel/i18n/index.js +8 -0
- package/build/cjs/editor/components/ControlPanel/i18n/ru.json +3 -0
- package/build/cjs/editor/components/EditBlock/EditBlock.d.ts +13 -0
- package/build/cjs/editor/components/EditBlock/EditBlock.js +44 -0
- package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.css +27 -0
- package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.d.ts +13 -0
- package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.js +35 -0
- package/build/cjs/editor/components/ErrorBoundary/i18n/en.json +4 -0
- package/build/cjs/editor/components/ErrorBoundary/i18n/index.d.ts +2 -0
- package/build/cjs/editor/components/ErrorBoundary/i18n/index.js +8 -0
- package/build/cjs/editor/components/ErrorBoundary/i18n/ru.json +4 -0
- package/build/cjs/editor/components/Layout/Layout.css +39 -0
- package/build/cjs/editor/components/Layout/Layout.d.ts +16 -0
- package/build/cjs/editor/components/Layout/Layout.js +34 -0
- package/build/cjs/editor/components/PagePropsForm/PagePropsForm.d.ts +10 -0
- package/build/cjs/editor/components/PagePropsForm/PagePropsForm.js +17 -0
- package/build/cjs/editor/containers/Editor/Editor.d.ts +2 -0
- package/build/cjs/editor/containers/Editor/Editor.js +40 -0
- package/build/cjs/editor/containers/Form/Form.css +94 -0
- package/build/cjs/editor/containers/Form/Form.d.ts +11 -0
- package/build/cjs/editor/containers/Form/Form.js +47 -0
- package/build/cjs/editor/containers/Form/dynamic-form-custom.css +0 -0
- package/build/cjs/editor/data/templates/banner-block.json +25 -0
- package/build/cjs/editor/data/templates/card-layout-block.json +39 -0
- package/build/cjs/editor/data/templates/companies-block.json +20 -0
- package/build/cjs/editor/data/templates/content-layout-block.json +56 -0
- package/build/cjs/editor/data/templates/extended-features-block.json +56 -0
- package/build/cjs/editor/data/templates/filter-block.json +62 -0
- package/build/cjs/editor/data/templates/header-block.json +19 -0
- package/build/cjs/editor/data/templates/header-slider-block.json +69 -0
- package/build/cjs/editor/data/templates/icons-block.json +32 -0
- package/build/cjs/editor/data/templates/info-block.json +40 -0
- package/build/cjs/editor/data/templates/link-table-block.json +10 -0
- package/build/cjs/editor/data/templates/map-block.json +48 -0
- package/build/cjs/editor/data/templates/media-block.json +15 -0
- package/build/cjs/editor/data/templates/preview-block.json +38 -0
- package/build/cjs/editor/data/templates/promo-features-block.json +52 -0
- package/build/cjs/editor/data/templates/questions-block.json +105 -0
- package/build/cjs/editor/data/templates/security-block.json +36 -0
- package/build/cjs/editor/data/templates/share-block.json +6 -0
- package/build/cjs/editor/data/templates/simple-block.json +7 -0
- package/build/cjs/editor/data/templates/slider-block.json +46 -0
- package/build/cjs/editor/data/templates/table-block.json +18 -0
- package/build/cjs/editor/data/templates/tabs-block.json +90 -0
- package/build/cjs/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.css +27 -0
- package/build/cjs/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.d.ts +19 -0
- package/build/cjs/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.js +72 -0
- package/build/cjs/editor/dynamic-forms-custom/config.d.ts +2 -0
- package/build/cjs/editor/dynamic-forms-custom/config.js +13 -0
- package/build/cjs/editor/dynamic-forms-custom/hooks/useOneOf.d.ts +12 -0
- package/build/cjs/editor/dynamic-forms-custom/hooks/useOneOf.js +75 -0
- package/build/cjs/editor/dynamic-forms-custom/parser/detect.d.ts +9 -0
- package/build/cjs/editor/dynamic-forms-custom/parser/detect.js +36 -0
- package/build/cjs/editor/dynamic-forms-custom/parser/index.d.ts +28 -0
- package/build/cjs/editor/dynamic-forms-custom/parser/index.js +188 -0
- package/build/cjs/editor/dynamic-forms-custom/parser/types.d.ts +29 -0
- package/build/cjs/editor/dynamic-forms-custom/parser/types.js +2 -0
- package/build/cjs/editor/dynamic-forms-custom/parser/views.d.ts +37 -0
- package/build/cjs/editor/dynamic-forms-custom/parser/views.js +46 -0
- package/build/cjs/editor/hooks/useFormSpec.d.ts +2 -0
- package/build/cjs/editor/hooks/useFormSpec.js +13 -0
- package/build/cjs/editor/hooks/usePreviousValue.d.ts +1 -0
- package/build/cjs/editor/hooks/usePreviousValue.js +11 -0
- package/build/cjs/editor/index.d.ts +1 -1
- package/build/cjs/editor/index.js +1 -1
- package/build/cjs/editor/store/index.d.ts +10 -11
- package/build/cjs/editor/store/index.js +66 -15
- package/build/cjs/editor/store/reducer.d.ts +24 -9
- package/build/cjs/editor/store/reducer.js +17 -31
- package/build/cjs/editor/store/utils.d.ts +1 -0
- package/build/cjs/editor/store/utils.js +3 -1
- package/build/cjs/editor/styles/root.css +5 -0
- package/build/cjs/editor/types/index.d.ts +15 -9
- package/build/cjs/editor/types/index.js +6 -0
- package/build/cjs/editor/utils/index.d.ts +4 -3
- package/build/cjs/editor/utils/index.js +6 -4
- package/build/cjs/grid/Col/Col.d.ts +1 -1
- package/build/cjs/models/constructor-items/blocks.d.ts +13 -8
- package/build/cjs/models/constructor.d.ts +2 -2
- package/build/cjs/models/customization.d.ts +3 -8
- package/build/cjs/models/navigation.d.ts +1 -0
- package/build/cjs/navigation/components/Header/Header.css +2 -0
- package/build/cjs/navigation/components/Header/Header.js +15 -4
- package/build/cjs/navigation/schema.d.ts +1 -0
- package/build/cjs/schema/constants.d.ts +908 -0
- package/build/cjs/schema/constants.js +42 -0
- package/build/cjs/schema/index.d.ts +9 -228
- package/build/cjs/schema/index.js +8 -46
- package/build/cjs/schema/validators/common.d.ts +71 -27
- package/build/cjs/schema/validators/common.js +50 -17
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +12 -5
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +8 -3
- package/build/cjs/sub-blocks/Content/schema.d.ts +14 -6
- package/build/cjs/sub-blocks/Content/schema.js +9 -1
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +23 -9
- package/build/cjs/sub-blocks/MediaCard/schema.d.ts +16 -6
- package/build/cjs/sub-blocks/PriceDetailed/schema.d.ts +1 -0
- package/build/cjs/sub-blocks/PriceDetailed/schema.js +5 -1
- package/build/cjs/sub-blocks/Quote/schema.d.ts +6 -2
- package/build/esm/blocks/Banner/schema.d.ts +63 -21
- package/build/esm/blocks/CardLayout/schema.d.ts +10 -4
- package/build/esm/blocks/Companies/schema.d.ts +5 -2
- package/build/esm/blocks/ContentLayout/ContentLayout.js +3 -2
- package/build/esm/blocks/ContentLayout/schema.d.ts +107 -61
- package/build/esm/blocks/ContentLayout/schema.js +23 -18
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +31 -4
- package/build/esm/blocks/ExtendedFeatures/schema.js +3 -4
- package/build/esm/blocks/FilterBlock/schema.d.ts +13 -5
- package/build/esm/blocks/FilterBlock/schema.js +13 -2
- package/build/esm/blocks/Header/Header.css +6 -7
- package/build/esm/blocks/Header/schema.d.ts +92 -36
- package/build/esm/blocks/Header/schema.js +1 -0
- package/build/esm/blocks/HeaderSlider/schema.d.ts +48 -53
- package/build/esm/blocks/HeaderSlider/schema.js +2 -1
- package/build/esm/blocks/Icons/schema.d.ts +3 -1
- package/build/esm/blocks/Icons/schema.js +2 -1
- package/build/esm/blocks/Info/schema.d.ts +19 -8
- package/build/esm/blocks/Map/schema.d.ts +17 -6
- package/build/esm/blocks/Media/schema.d.ts +204 -152
- package/build/esm/blocks/Media/schema.js +2 -2
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +22 -8
- package/build/esm/blocks/PromoFeaturesBlock/schema.js +1 -0
- package/build/esm/blocks/Questions/schema.d.ts +7 -3
- package/build/esm/blocks/Slider/schema.d.ts +13 -18
- package/build/esm/blocks/Slider/schema.js +4 -5
- package/build/esm/blocks/Table/schema.d.ts +5 -2
- package/build/esm/blocks/Table/schema.js +12 -2
- package/build/esm/blocks/Tabs/schema.d.ts +43 -16
- package/build/esm/components/BlockBase/BlockBase.js +2 -2
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +1 -1
- package/build/esm/components/Image/schema.d.ts +1 -0
- package/build/esm/components/Image/schema.js +3 -2
- package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +1 -1
- package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +1 -1
- package/build/esm/customization/BlockDecoration.d.ts +1 -1
- package/build/esm/customization/BlockDecoration.js +6 -6
- package/build/esm/editor/{Components → components}/AddBlock/AddBlock.css +1 -1
- package/build/esm/editor/components/AddBlock/AddBlock.d.ts +8 -0
- package/build/esm/editor/{Components → components}/AddBlock/AddBlock.js +2 -2
- package/build/esm/editor/components/BlockForm/BlockForm.d.ts +12 -0
- package/build/esm/editor/components/BlockForm/BlockForm.js +30 -0
- package/build/esm/editor/components/ControlPanel/ControlPanel.css +26 -0
- package/build/esm/editor/components/ControlPanel/ControlPanel.d.ts +9 -0
- package/build/esm/editor/components/ControlPanel/ControlPanel.js +23 -0
- package/build/esm/editor/components/ControlPanel/i18n/en.json +3 -0
- package/build/esm/editor/components/ControlPanel/i18n/index.d.ts +2 -0
- package/build/esm/editor/components/ControlPanel/i18n/index.js +5 -0
- package/build/esm/editor/components/ControlPanel/i18n/ru.json +3 -0
- package/build/esm/editor/components/EditBlock/EditBlock.d.ts +14 -0
- package/build/esm/editor/components/EditBlock/EditBlock.js +41 -0
- package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.css +27 -0
- package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.d.ts +14 -0
- package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.js +31 -0
- package/build/esm/editor/components/ErrorBoundary/i18n/en.json +4 -0
- package/build/esm/editor/components/ErrorBoundary/i18n/index.d.ts +2 -0
- package/build/esm/editor/components/ErrorBoundary/i18n/index.js +5 -0
- package/build/esm/editor/components/ErrorBoundary/i18n/ru.json +4 -0
- package/build/esm/editor/components/Layout/Layout.css +39 -0
- package/build/esm/editor/components/Layout/Layout.d.ts +17 -0
- package/build/esm/editor/components/Layout/Layout.js +32 -0
- package/build/esm/editor/components/PagePropsForm/PagePropsForm.d.ts +10 -0
- package/build/esm/editor/components/PagePropsForm/PagePropsForm.js +13 -0
- package/build/esm/editor/containers/Editor/Editor.d.ts +2 -0
- package/build/esm/editor/containers/Editor/Editor.js +36 -0
- package/build/esm/editor/containers/Form/Form.css +94 -0
- package/build/esm/editor/containers/Form/Form.d.ts +12 -0
- package/build/esm/editor/containers/Form/Form.js +45 -0
- package/build/esm/editor/containers/Form/dynamic-form-custom.css +0 -0
- package/build/esm/editor/data/templates/banner-block.json +25 -0
- package/build/esm/editor/data/templates/card-layout-block.json +39 -0
- package/build/esm/editor/data/templates/companies-block.json +20 -0
- package/build/esm/editor/data/templates/content-layout-block.json +56 -0
- package/build/esm/editor/data/templates/extended-features-block.json +56 -0
- package/build/esm/editor/data/templates/filter-block.json +62 -0
- package/build/esm/editor/data/templates/header-block.json +19 -0
- package/build/esm/editor/data/templates/header-slider-block.json +69 -0
- package/build/esm/editor/data/templates/icons-block.json +32 -0
- package/build/esm/editor/data/templates/info-block.json +40 -0
- package/build/esm/editor/data/templates/link-table-block.json +10 -0
- package/build/esm/editor/data/templates/map-block.json +48 -0
- package/build/esm/editor/data/templates/media-block.json +15 -0
- package/build/esm/editor/data/templates/preview-block.json +38 -0
- package/build/esm/editor/data/templates/promo-features-block.json +52 -0
- package/build/esm/editor/data/templates/questions-block.json +105 -0
- package/build/esm/editor/data/templates/security-block.json +36 -0
- package/build/esm/editor/data/templates/share-block.json +6 -0
- package/build/esm/editor/data/templates/simple-block.json +7 -0
- package/build/esm/editor/data/templates/slider-block.json +46 -0
- package/build/esm/editor/data/templates/table-block.json +18 -0
- package/build/esm/editor/data/templates/tabs-block.json +90 -0
- package/build/esm/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.css +27 -0
- package/build/esm/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.d.ts +20 -0
- package/build/esm/editor/dynamic-forms-custom/components/OneOfCustom/OneOfCustom.js +68 -0
- package/build/esm/editor/dynamic-forms-custom/config.d.ts +2 -0
- package/build/esm/editor/dynamic-forms-custom/config.js +9 -0
- package/build/esm/editor/dynamic-forms-custom/hooks/useOneOf.d.ts +12 -0
- package/build/esm/editor/dynamic-forms-custom/hooks/useOneOf.js +69 -0
- package/build/esm/editor/dynamic-forms-custom/parser/detect.d.ts +9 -0
- package/build/esm/editor/dynamic-forms-custom/parser/detect.js +32 -0
- package/build/esm/editor/dynamic-forms-custom/parser/index.d.ts +28 -0
- package/build/esm/editor/dynamic-forms-custom/parser/index.js +186 -0
- package/build/esm/editor/dynamic-forms-custom/parser/types.d.ts +29 -0
- package/build/esm/editor/dynamic-forms-custom/parser/types.js +1 -0
- package/build/esm/editor/dynamic-forms-custom/parser/views.d.ts +37 -0
- package/build/esm/editor/dynamic-forms-custom/parser/views.js +39 -0
- package/build/esm/editor/hooks/useFormSpec.d.ts +2 -0
- package/build/esm/editor/hooks/useFormSpec.js +9 -0
- package/build/esm/editor/hooks/usePreviousValue.d.ts +1 -0
- package/build/esm/editor/hooks/usePreviousValue.js +8 -0
- package/build/esm/editor/index.d.ts +1 -1
- package/build/esm/editor/index.js +1 -1
- package/build/esm/editor/store/index.d.ts +10 -11
- package/build/esm/editor/store/index.js +68 -17
- package/build/esm/editor/store/reducer.d.ts +24 -9
- package/build/esm/editor/store/reducer.js +15 -29
- package/build/esm/editor/store/utils.d.ts +1 -0
- package/build/esm/editor/store/utils.js +1 -0
- package/build/esm/editor/styles/root.css +5 -0
- package/build/esm/editor/types/index.d.ts +15 -9
- package/build/esm/editor/types/index.js +5 -1
- package/build/esm/editor/utils/index.d.ts +4 -3
- package/build/esm/editor/utils/index.js +4 -3
- package/build/esm/grid/Col/Col.d.ts +1 -1
- package/build/esm/models/constructor-items/blocks.d.ts +13 -8
- package/build/esm/models/constructor.d.ts +2 -2
- package/build/esm/models/customization.d.ts +3 -8
- package/build/esm/models/navigation.d.ts +1 -0
- package/build/esm/navigation/components/Header/Header.css +2 -0
- package/build/esm/navigation/components/Header/Header.js +16 -5
- package/build/esm/navigation/schema.d.ts +1 -0
- package/build/esm/schema/constants.d.ts +908 -0
- package/build/esm/schema/constants.js +39 -0
- package/build/esm/schema/index.d.ts +9 -228
- package/build/esm/schema/index.js +4 -42
- package/build/esm/schema/validators/common.d.ts +71 -27
- package/build/esm/schema/validators/common.js +49 -16
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +12 -5
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +8 -3
- package/build/esm/sub-blocks/Content/schema.d.ts +14 -6
- package/build/esm/sub-blocks/Content/schema.js +9 -1
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +23 -9
- package/build/esm/sub-blocks/MediaCard/schema.d.ts +16 -6
- package/build/esm/sub-blocks/PriceDetailed/schema.d.ts +1 -0
- package/build/esm/sub-blocks/PriceDetailed/schema.js +5 -1
- package/build/esm/sub-blocks/Quote/schema.d.ts +6 -2
- package/package.json +39 -7
- package/server/models/constructor-items/blocks.d.ts +13 -8
- package/server/models/constructor.d.ts +2 -2
- package/server/models/customization.d.ts +3 -8
- package/server/models/navigation.d.ts +1 -0
- package/build/cjs/editor/Components/AddBlock/AddBlock.d.ts +0 -7
- package/build/cjs/editor/Components/EditBlock/EditBlock.d.ts +0 -4
- package/build/cjs/editor/Components/EditBlock/EditBlock.js +0 -32
- package/build/cjs/editor/Containers/Editor.d.ts +0 -2
- package/build/cjs/editor/Containers/Editor.js +0 -24
- package/build/esm/editor/Components/AddBlock/AddBlock.d.ts +0 -8
- package/build/esm/editor/Components/EditBlock/EditBlock.d.ts +0 -5
- package/build/esm/editor/Components/EditBlock/EditBlock.js +0 -30
- package/build/esm/editor/Containers/Editor.d.ts +0 -2
- package/build/esm/editor/Containers/Editor.js +0 -20
- /package/build/cjs/editor/{Components → components}/EditBlock/EditBlock.css +0 -0
- /package/build/esm/editor/{Components → components}/EditBlock/EditBlock.css +0 -0
|
@@ -9,6 +9,7 @@ export declare const PromoFeaturesItem: {
|
|
|
9
9
|
text: {
|
|
10
10
|
type: string;
|
|
11
11
|
contentType: string;
|
|
12
|
+
inputType: string;
|
|
12
13
|
};
|
|
13
14
|
theme: {
|
|
14
15
|
enum: string[];
|
|
@@ -22,7 +23,8 @@ export declare const PromoFeaturesItem: {
|
|
|
22
23
|
type: string;
|
|
23
24
|
};
|
|
24
25
|
image: {
|
|
25
|
-
|
|
26
|
+
oneOf: ({
|
|
27
|
+
optionName: string;
|
|
26
28
|
oneOf: ({
|
|
27
29
|
type: string;
|
|
28
30
|
properties: {
|
|
@@ -33,7 +35,10 @@ export declare const PromoFeaturesItem: {
|
|
|
33
35
|
} | {
|
|
34
36
|
type: string;
|
|
35
37
|
pattern: string;
|
|
38
|
+
optionName: string;
|
|
36
39
|
})[];
|
|
40
|
+
type?: undefined;
|
|
41
|
+
items?: undefined;
|
|
37
42
|
} | {
|
|
38
43
|
type: string;
|
|
39
44
|
items: {
|
|
@@ -47,8 +52,10 @@ export declare const PromoFeaturesItem: {
|
|
|
47
52
|
} | {
|
|
48
53
|
type: string;
|
|
49
54
|
pattern: string;
|
|
55
|
+
optionName: string;
|
|
50
56
|
})[];
|
|
51
57
|
};
|
|
58
|
+
optionName: string;
|
|
52
59
|
})[];
|
|
53
60
|
};
|
|
54
61
|
video: {
|
|
@@ -63,7 +70,8 @@ export declare const PromoFeaturesItem: {
|
|
|
63
70
|
};
|
|
64
71
|
};
|
|
65
72
|
loop: {
|
|
66
|
-
|
|
73
|
+
oneOf: ({
|
|
74
|
+
optionName: string;
|
|
67
75
|
type: string;
|
|
68
76
|
additionalProperties: boolean;
|
|
69
77
|
required: string[];
|
|
@@ -77,6 +85,7 @@ export declare const PromoFeaturesItem: {
|
|
|
77
85
|
};
|
|
78
86
|
} | {
|
|
79
87
|
type: string;
|
|
88
|
+
optionName: string;
|
|
80
89
|
})[];
|
|
81
90
|
};
|
|
82
91
|
type: {
|
|
@@ -86,13 +95,13 @@ export declare const PromoFeaturesItem: {
|
|
|
86
95
|
muted: {
|
|
87
96
|
type: string;
|
|
88
97
|
};
|
|
89
|
-
|
|
98
|
+
autoplay: {
|
|
90
99
|
type: string;
|
|
91
100
|
};
|
|
92
101
|
elapsedTime: {
|
|
93
102
|
type: string;
|
|
94
103
|
};
|
|
95
|
-
|
|
104
|
+
playButton: {
|
|
96
105
|
type: string;
|
|
97
106
|
additionalProperties: boolean;
|
|
98
107
|
properties: {
|
|
@@ -130,6 +139,10 @@ export declare const PromoFeaturesItem: {
|
|
|
130
139
|
};
|
|
131
140
|
dataLens: {
|
|
132
141
|
oneOf: ({
|
|
142
|
+
type: string;
|
|
143
|
+
optionName: string;
|
|
144
|
+
} | {
|
|
145
|
+
optionName: string;
|
|
133
146
|
type: string;
|
|
134
147
|
additionalProperties: boolean;
|
|
135
148
|
required: string[];
|
|
@@ -142,8 +155,6 @@ export declare const PromoFeaturesItem: {
|
|
|
142
155
|
enum: string[];
|
|
143
156
|
};
|
|
144
157
|
};
|
|
145
|
-
} | {
|
|
146
|
-
type: string;
|
|
147
158
|
})[];
|
|
148
159
|
};
|
|
149
160
|
fullscreen: {
|
|
@@ -252,6 +263,10 @@ export declare const PromoFeaturesBlock: {
|
|
|
252
263
|
};
|
|
253
264
|
title: {
|
|
254
265
|
oneOf: ({
|
|
266
|
+
type: string;
|
|
267
|
+
optionName: string;
|
|
268
|
+
} | {
|
|
269
|
+
optionName: string;
|
|
255
270
|
type: string;
|
|
256
271
|
additionalProperties: boolean;
|
|
257
272
|
required: string[];
|
|
@@ -271,13 +286,12 @@ export declare const PromoFeaturesBlock: {
|
|
|
271
286
|
type: string;
|
|
272
287
|
};
|
|
273
288
|
};
|
|
274
|
-
} | {
|
|
275
|
-
type: string;
|
|
276
289
|
})[];
|
|
277
290
|
};
|
|
278
291
|
description: {
|
|
279
292
|
type: string;
|
|
280
293
|
contentType: string;
|
|
294
|
+
inputType: string;
|
|
281
295
|
};
|
|
282
296
|
animated: {
|
|
283
297
|
type: string;
|
|
@@ -16,6 +16,11 @@ export declare const QuestionsBlock: {
|
|
|
16
16
|
};
|
|
17
17
|
title: {
|
|
18
18
|
oneOf: ({
|
|
19
|
+
type: string;
|
|
20
|
+
contentType: string;
|
|
21
|
+
optionName: string;
|
|
22
|
+
} | {
|
|
23
|
+
optionName: string;
|
|
19
24
|
type: string;
|
|
20
25
|
additionalProperties: boolean;
|
|
21
26
|
required: string[];
|
|
@@ -35,14 +40,13 @@ export declare const QuestionsBlock: {
|
|
|
35
40
|
type: string;
|
|
36
41
|
};
|
|
37
42
|
};
|
|
38
|
-
|
|
39
|
-
type: string;
|
|
40
|
-
contentType: string;
|
|
43
|
+
contentType?: undefined;
|
|
41
44
|
})[];
|
|
42
45
|
};
|
|
43
46
|
text: {
|
|
44
47
|
type: string;
|
|
45
48
|
contentType: string;
|
|
49
|
+
inputType: string;
|
|
46
50
|
};
|
|
47
51
|
additionalInfo: {
|
|
48
52
|
type: string;
|
|
@@ -17,12 +17,14 @@ export declare const SliderProps: {
|
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
slidesToShow: {
|
|
20
|
-
|
|
20
|
+
oneOf: ({
|
|
21
21
|
type: string;
|
|
22
22
|
additionalProperties: boolean;
|
|
23
23
|
properties: {};
|
|
24
|
+
optionName: string;
|
|
24
25
|
} | {
|
|
25
26
|
type: string;
|
|
27
|
+
optionName: string;
|
|
26
28
|
additionalProperties?: undefined;
|
|
27
29
|
properties?: undefined;
|
|
28
30
|
})[];
|
|
@@ -47,7 +49,6 @@ export declare const SliderProps: {
|
|
|
47
49
|
properties: {
|
|
48
50
|
source: {
|
|
49
51
|
type: string;
|
|
50
|
-
enum: string[];
|
|
51
52
|
};
|
|
52
53
|
/**
|
|
53
54
|
* @deprecated
|
|
@@ -55,12 +56,6 @@ export declare const SliderProps: {
|
|
|
55
56
|
minCount: {
|
|
56
57
|
type: string;
|
|
57
58
|
};
|
|
58
|
-
/**
|
|
59
|
-
* @deprecated Will be moved to params
|
|
60
|
-
*/
|
|
61
|
-
serviceId: {
|
|
62
|
-
type: string;
|
|
63
|
-
};
|
|
64
59
|
params: {
|
|
65
60
|
type: string;
|
|
66
61
|
patternProperties: {
|
|
@@ -70,6 +65,7 @@ export declare const SliderProps: {
|
|
|
70
65
|
};
|
|
71
66
|
};
|
|
72
67
|
};
|
|
68
|
+
disabled: boolean;
|
|
73
69
|
};
|
|
74
70
|
children: {
|
|
75
71
|
type: string;
|
|
@@ -85,6 +81,10 @@ export declare const SliderBlock: {
|
|
|
85
81
|
properties: {
|
|
86
82
|
title: {
|
|
87
83
|
oneOf: ({
|
|
84
|
+
type: string;
|
|
85
|
+
optionName: string;
|
|
86
|
+
} | {
|
|
87
|
+
optionName: string;
|
|
88
88
|
type: string;
|
|
89
89
|
additionalProperties: boolean;
|
|
90
90
|
required: string[];
|
|
@@ -104,13 +104,12 @@ export declare const SliderBlock: {
|
|
|
104
104
|
type: string;
|
|
105
105
|
};
|
|
106
106
|
};
|
|
107
|
-
} | {
|
|
108
|
-
type: string;
|
|
109
107
|
})[];
|
|
110
108
|
};
|
|
111
109
|
description: {
|
|
112
110
|
type: string;
|
|
113
111
|
contentType: string;
|
|
112
|
+
inputType: string;
|
|
114
113
|
};
|
|
115
114
|
dots: {
|
|
116
115
|
type: string;
|
|
@@ -130,12 +129,14 @@ export declare const SliderBlock: {
|
|
|
130
129
|
};
|
|
131
130
|
};
|
|
132
131
|
slidesToShow: {
|
|
133
|
-
|
|
132
|
+
oneOf: ({
|
|
134
133
|
type: string;
|
|
135
134
|
additionalProperties: boolean;
|
|
136
135
|
properties: {};
|
|
136
|
+
optionName: string;
|
|
137
137
|
} | {
|
|
138
138
|
type: string;
|
|
139
|
+
optionName: string;
|
|
139
140
|
additionalProperties?: undefined;
|
|
140
141
|
properties?: undefined;
|
|
141
142
|
})[];
|
|
@@ -160,7 +161,6 @@ export declare const SliderBlock: {
|
|
|
160
161
|
properties: {
|
|
161
162
|
source: {
|
|
162
163
|
type: string;
|
|
163
|
-
enum: string[];
|
|
164
164
|
};
|
|
165
165
|
/**
|
|
166
166
|
* @deprecated
|
|
@@ -168,12 +168,6 @@ export declare const SliderBlock: {
|
|
|
168
168
|
minCount: {
|
|
169
169
|
type: string;
|
|
170
170
|
};
|
|
171
|
-
/**
|
|
172
|
-
* @deprecated Will be moved to params
|
|
173
|
-
*/
|
|
174
|
-
serviceId: {
|
|
175
|
-
type: string;
|
|
176
|
-
};
|
|
177
171
|
params: {
|
|
178
172
|
type: string;
|
|
179
173
|
patternProperties: {
|
|
@@ -183,6 +177,7 @@ export declare const SliderBlock: {
|
|
|
183
177
|
};
|
|
184
178
|
};
|
|
185
179
|
};
|
|
180
|
+
disabled: boolean;
|
|
186
181
|
};
|
|
187
182
|
children: {
|
|
188
183
|
type: string;
|
|
@@ -8,7 +8,8 @@ const LoadableProps = {
|
|
|
8
8
|
properties: {
|
|
9
9
|
source: {
|
|
10
10
|
type: 'string',
|
|
11
|
-
|
|
11
|
+
// add loadable sources here if you use it in your project
|
|
12
|
+
// enum: ['my-loadable-source-1', 'my-loadable-source-1'],
|
|
12
13
|
},
|
|
13
14
|
/**
|
|
14
15
|
* @deprecated
|
|
@@ -16,10 +17,6 @@ const LoadableProps = {
|
|
|
16
17
|
minCount: {
|
|
17
18
|
type: 'number',
|
|
18
19
|
},
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated Will be moved to params
|
|
21
|
-
*/
|
|
22
|
-
serviceId: { type: 'number' },
|
|
23
20
|
params: {
|
|
24
21
|
type: 'object',
|
|
25
22
|
patternProperties: {
|
|
@@ -29,6 +26,8 @@ const LoadableProps = {
|
|
|
29
26
|
},
|
|
30
27
|
},
|
|
31
28
|
},
|
|
29
|
+
// remove it in your custom validator schema if you use loadable
|
|
30
|
+
disabled: true,
|
|
32
31
|
};
|
|
33
32
|
const DisclaimerProps = {
|
|
34
33
|
additionalProperties: false,
|
|
@@ -17,8 +17,18 @@ exports.TableBlock = {
|
|
|
17
17
|
items: {
|
|
18
18
|
type: 'array',
|
|
19
19
|
items: {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
oneOf: [
|
|
21
|
+
{
|
|
22
|
+
type: 'string',
|
|
23
|
+
contentType: 'text',
|
|
24
|
+
optionName: 'text',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
type: 'number',
|
|
28
|
+
contentType: 'text',
|
|
29
|
+
optionName: 'number',
|
|
30
|
+
},
|
|
31
|
+
],
|
|
22
32
|
},
|
|
23
33
|
},
|
|
24
34
|
}, legend: {
|
|
@@ -11,14 +11,15 @@ export declare const tabsItem: {
|
|
|
11
11
|
contentType: string;
|
|
12
12
|
};
|
|
13
13
|
media: {
|
|
14
|
-
oneOf: ({
|
|
14
|
+
oneOf: (({
|
|
15
15
|
type: string;
|
|
16
16
|
properties: {
|
|
17
17
|
color: {
|
|
18
18
|
type: string;
|
|
19
19
|
};
|
|
20
20
|
image: {
|
|
21
|
-
|
|
21
|
+
oneOf: ({
|
|
22
|
+
optionName: string;
|
|
22
23
|
oneOf: ({
|
|
23
24
|
type: string;
|
|
24
25
|
properties: {
|
|
@@ -29,7 +30,10 @@ export declare const tabsItem: {
|
|
|
29
30
|
} | {
|
|
30
31
|
type: string;
|
|
31
32
|
pattern: string;
|
|
33
|
+
optionName: string;
|
|
32
34
|
})[];
|
|
35
|
+
type?: undefined;
|
|
36
|
+
items?: undefined;
|
|
33
37
|
} | {
|
|
34
38
|
type: string;
|
|
35
39
|
items: {
|
|
@@ -43,8 +47,10 @@ export declare const tabsItem: {
|
|
|
43
47
|
} | {
|
|
44
48
|
type: string;
|
|
45
49
|
pattern: string;
|
|
50
|
+
optionName: string;
|
|
46
51
|
})[];
|
|
47
52
|
};
|
|
53
|
+
optionName: string;
|
|
48
54
|
})[];
|
|
49
55
|
};
|
|
50
56
|
video: {
|
|
@@ -59,7 +65,8 @@ export declare const tabsItem: {
|
|
|
59
65
|
};
|
|
60
66
|
};
|
|
61
67
|
loop: {
|
|
62
|
-
|
|
68
|
+
oneOf: ({
|
|
69
|
+
optionName: string;
|
|
63
70
|
type: string;
|
|
64
71
|
additionalProperties: boolean;
|
|
65
72
|
required: string[];
|
|
@@ -73,6 +80,7 @@ export declare const tabsItem: {
|
|
|
73
80
|
};
|
|
74
81
|
} | {
|
|
75
82
|
type: string;
|
|
83
|
+
optionName: string;
|
|
76
84
|
})[];
|
|
77
85
|
};
|
|
78
86
|
type: {
|
|
@@ -82,13 +90,13 @@ export declare const tabsItem: {
|
|
|
82
90
|
muted: {
|
|
83
91
|
type: string;
|
|
84
92
|
};
|
|
85
|
-
|
|
93
|
+
autoplay: {
|
|
86
94
|
type: string;
|
|
87
95
|
};
|
|
88
96
|
elapsedTime: {
|
|
89
97
|
type: string;
|
|
90
98
|
};
|
|
91
|
-
|
|
99
|
+
playButton: {
|
|
92
100
|
type: string;
|
|
93
101
|
additionalProperties: boolean;
|
|
94
102
|
properties: {
|
|
@@ -126,6 +134,10 @@ export declare const tabsItem: {
|
|
|
126
134
|
};
|
|
127
135
|
dataLens: {
|
|
128
136
|
oneOf: ({
|
|
137
|
+
type: string;
|
|
138
|
+
optionName: string;
|
|
139
|
+
} | {
|
|
140
|
+
optionName: string;
|
|
129
141
|
type: string;
|
|
130
142
|
additionalProperties: boolean;
|
|
131
143
|
required: string[];
|
|
@@ -138,8 +150,6 @@ export declare const tabsItem: {
|
|
|
138
150
|
enum: string[];
|
|
139
151
|
};
|
|
140
152
|
};
|
|
141
|
-
} | {
|
|
142
|
-
type: string;
|
|
143
153
|
})[];
|
|
144
154
|
};
|
|
145
155
|
fullscreen: {
|
|
@@ -224,11 +234,14 @@ export declare const tabsItem: {
|
|
|
224
234
|
})[];
|
|
225
235
|
};
|
|
226
236
|
};
|
|
227
|
-
}
|
|
237
|
+
} & {
|
|
238
|
+
optionName: string;
|
|
239
|
+
}) | {
|
|
228
240
|
type: string;
|
|
229
241
|
additionalProperties: boolean;
|
|
230
242
|
required: import("../..").Theme[];
|
|
231
243
|
properties: {};
|
|
244
|
+
optionName: string;
|
|
232
245
|
})[];
|
|
233
246
|
};
|
|
234
247
|
link: {
|
|
@@ -259,7 +272,8 @@ export declare const tabsItem: {
|
|
|
259
272
|
enum: string[];
|
|
260
273
|
};
|
|
261
274
|
analyticsEvents: {
|
|
262
|
-
|
|
275
|
+
oneOf: ({
|
|
276
|
+
optionName: string;
|
|
263
277
|
type: string;
|
|
264
278
|
additionalProperties: {
|
|
265
279
|
type: string;
|
|
@@ -295,6 +309,7 @@ export declare const tabsItem: {
|
|
|
295
309
|
type: string;
|
|
296
310
|
};
|
|
297
311
|
};
|
|
312
|
+
items?: undefined;
|
|
298
313
|
} | {
|
|
299
314
|
type: string;
|
|
300
315
|
items: {
|
|
@@ -334,6 +349,7 @@ export declare const tabsItem: {
|
|
|
334
349
|
};
|
|
335
350
|
};
|
|
336
351
|
};
|
|
352
|
+
optionName: string;
|
|
337
353
|
})[];
|
|
338
354
|
};
|
|
339
355
|
type: {};
|
|
@@ -341,7 +357,7 @@ export declare const tabsItem: {
|
|
|
341
357
|
};
|
|
342
358
|
};
|
|
343
359
|
image: {
|
|
344
|
-
oneOf: ({
|
|
360
|
+
oneOf: (({
|
|
345
361
|
oneOf: ({
|
|
346
362
|
type: string;
|
|
347
363
|
properties: {
|
|
@@ -352,16 +368,25 @@ export declare const tabsItem: {
|
|
|
352
368
|
} | {
|
|
353
369
|
type: string;
|
|
354
370
|
pattern: string;
|
|
371
|
+
optionName: string;
|
|
355
372
|
})[];
|
|
356
|
-
}
|
|
373
|
+
} & {
|
|
374
|
+
optionName: string;
|
|
375
|
+
}) | {
|
|
357
376
|
type: string;
|
|
358
377
|
additionalProperties: boolean;
|
|
359
378
|
required: import("../..").Theme[];
|
|
360
379
|
properties: {};
|
|
380
|
+
optionName: string;
|
|
361
381
|
})[];
|
|
362
382
|
};
|
|
363
383
|
title?: {
|
|
364
384
|
oneOf: ({
|
|
385
|
+
type: string;
|
|
386
|
+
contentType: string;
|
|
387
|
+
optionName: string;
|
|
388
|
+
} | {
|
|
389
|
+
optionName: string;
|
|
365
390
|
type: string;
|
|
366
391
|
additionalProperties: boolean;
|
|
367
392
|
required: string[];
|
|
@@ -381,14 +406,13 @@ export declare const tabsItem: {
|
|
|
381
406
|
type: string;
|
|
382
407
|
};
|
|
383
408
|
};
|
|
384
|
-
|
|
385
|
-
type: string;
|
|
386
|
-
contentType: string;
|
|
409
|
+
contentType?: undefined;
|
|
387
410
|
})[];
|
|
388
411
|
} | undefined;
|
|
389
412
|
text?: {
|
|
390
413
|
type: string;
|
|
391
414
|
contentType: string;
|
|
415
|
+
inputType: string;
|
|
392
416
|
} | undefined;
|
|
393
417
|
additionalInfo?: {
|
|
394
418
|
type: string;
|
|
@@ -452,6 +476,10 @@ export declare const TabsBlock: {
|
|
|
452
476
|
};
|
|
453
477
|
title: {
|
|
454
478
|
oneOf: ({
|
|
479
|
+
type: string;
|
|
480
|
+
optionName: string;
|
|
481
|
+
} | {
|
|
482
|
+
optionName: string;
|
|
455
483
|
type: string;
|
|
456
484
|
additionalProperties: boolean;
|
|
457
485
|
required: string[];
|
|
@@ -471,13 +499,12 @@ export declare const TabsBlock: {
|
|
|
471
499
|
type: string;
|
|
472
500
|
};
|
|
473
501
|
};
|
|
474
|
-
} | {
|
|
475
|
-
type: string;
|
|
476
502
|
})[];
|
|
477
503
|
};
|
|
478
504
|
description: {
|
|
479
505
|
type: string;
|
|
480
506
|
contentType: string;
|
|
507
|
+
inputType: string;
|
|
481
508
|
};
|
|
482
509
|
anchor: {
|
|
483
510
|
type: string;
|
|
@@ -8,9 +8,9 @@ const utils_1 = require("../../utils");
|
|
|
8
8
|
const Anchor_1 = tslib_1.__importDefault(require("../Anchor/Anchor"));
|
|
9
9
|
const b = (0, utils_1.block)('block-base');
|
|
10
10
|
const BlockBase = (props) => {
|
|
11
|
-
const { anchor, visible, children, className, resetPaddings, qa, index
|
|
11
|
+
const { anchor, visible, children, className, resetPaddings, qa, type, index } = props;
|
|
12
12
|
return (react_1.default.createElement(grid_1.Col, { className: b({ ['reset-paddings']: resetPaddings }, className), visible: visible, reset: true, dataQa: qa },
|
|
13
|
-
react_1.default.createElement(BlockDecoration_1.BlockDecoration, {
|
|
13
|
+
react_1.default.createElement(BlockDecoration_1.BlockDecoration, { type: type, index: index },
|
|
14
14
|
anchor && react_1.default.createElement(Anchor_1.default, { id: anchor.url, className: b('anchor') }),
|
|
15
15
|
children)));
|
|
16
16
|
};
|
|
@@ -15,7 +15,7 @@ function HeaderBreadcrumbs(props) {
|
|
|
15
15
|
handleAnalytics();
|
|
16
16
|
handleMetrika({ metrikaGoals, pixelEvents });
|
|
17
17
|
}, [handleAnalytics, handleMetrika, metrikaGoals, pixelEvents]);
|
|
18
|
-
return (react_1.default.createElement("div", { className: b({ theme }, className) }, items.map((item) => (react_1.default.createElement("div", { className: b('item'), key: item.url },
|
|
18
|
+
return (react_1.default.createElement("div", { className: b({ theme }, className) }, items === null || items === void 0 ? void 0 : items.map((item) => (react_1.default.createElement("div", { className: b('item'), key: item.url },
|
|
19
19
|
react_1.default.createElement("a", { href: item.url, className: b('text'), onClick: onClick }, item.text))))));
|
|
20
20
|
}
|
|
21
21
|
exports.default = HeaderBreadcrumbs;
|
|
@@ -38,8 +38,9 @@ exports.ImageProps = {
|
|
|
38
38
|
{
|
|
39
39
|
type: 'string',
|
|
40
40
|
pattern: exports.urlPattern,
|
|
41
|
+
optionName: 'url',
|
|
41
42
|
},
|
|
42
|
-
(0, utils_1.filteredItem)(Object.assign({}, exports.ImageObjectProps)),
|
|
43
|
-
(0, utils_1.filteredItem)(Object.assign({}, exports.ImageDeviceProps)),
|
|
43
|
+
(0, utils_1.filteredItem)(Object.assign(Object.assign({}, exports.ImageObjectProps), { optionName: 'options' })),
|
|
44
|
+
(0, utils_1.filteredItem)(Object.assign(Object.assign({}, exports.ImageDeviceProps), { optionName: 'device options' })),
|
|
44
45
|
],
|
|
45
46
|
};
|
package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js
CHANGED
|
@@ -8,6 +8,6 @@ const utils_1 = require("../../../../utils");
|
|
|
8
8
|
const b = (0, utils_1.block)('constructor-block');
|
|
9
9
|
const ConstructorBlock = ({ index = 0, data, children, }) => {
|
|
10
10
|
const { anchor, visible, type } = data;
|
|
11
|
-
return (react_1.default.createElement(BlockBase_1.default, { index: index, className: b({ type }), anchor: anchor, visible: visible, resetPaddings: data.resetPaddings }, children));
|
|
11
|
+
return (react_1.default.createElement(BlockBase_1.default, { type: type, index: index, className: b({ type }), anchor: anchor, visible: visible, resetPaddings: data.resetPaddings }, children));
|
|
12
12
|
};
|
|
13
13
|
exports.ConstructorBlock = ConstructorBlock;
|
|
@@ -14,6 +14,6 @@ const ConstructorItem = ({ data, blockKey, children }) => {
|
|
|
14
14
|
react_1.default.createElement(Component, Object.assign({}, rest), children)));
|
|
15
15
|
};
|
|
16
16
|
exports.ConstructorItem = ConstructorItem;
|
|
17
|
-
const ConstructorHeader = ({ data, blockKey, }) => (react_1.default.createElement(BlockDecoration_1.BlockDecoration, {
|
|
17
|
+
const ConstructorHeader = ({ data, blockKey, }) => (react_1.default.createElement(BlockDecoration_1.BlockDecoration, { type: data.type },
|
|
18
18
|
react_1.default.createElement(exports.ConstructorItem, { data: data, key: data.type, blockKey: blockKey })));
|
|
19
19
|
exports.ConstructorHeader = ConstructorHeader;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { BlockDecorationProps } from '../models';
|
|
3
|
-
export declare const BlockDecoration: ({
|
|
3
|
+
export declare const BlockDecoration: ({ children: blockChildren, ...rest }: PropsWithChildren<BlockDecorationProps>) => JSX.Element;
|
|
@@ -4,15 +4,14 @@ exports.BlockDecoration = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const innerContext_1 = require("../context/innerContext");
|
|
7
|
-
const BlockDecoration = (
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
const isHeader = Boolean(typeof id === 'string' && headerBlockTypes.includes(id));
|
|
7
|
+
const BlockDecoration = (_a) => {
|
|
8
|
+
var _b, _c;
|
|
9
|
+
var { children: blockChildren } = _a, rest = tslib_1.__rest(_a, ["children"]);
|
|
11
10
|
const block = react_1.default.createElement(react_1.Fragment, null, blockChildren);
|
|
12
|
-
const blockDecorators = (
|
|
11
|
+
const blockDecorators = (_c = (_b = (0, react_1.useContext)(innerContext_1.InnerContext).customization) === null || _b === void 0 ? void 0 : _b.decorators) === null || _c === void 0 ? void 0 : _c.block;
|
|
13
12
|
if (!blockDecorators) {
|
|
14
13
|
return block;
|
|
15
14
|
}
|
|
16
|
-
return blockDecorators.reduce((children, decorator) => react_1.default.createElement(react_1.Fragment, null, decorator({ children
|
|
15
|
+
return blockDecorators.reduce((children, decorator) => react_1.default.createElement(react_1.Fragment, null, decorator(Object.assign({ children }, rest))), block);
|
|
17
16
|
};
|
|
18
17
|
exports.BlockDecoration = BlockDecoration;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { Block, ClassNameProps } from '../../../models';
|
|
3
|
+
export interface AddBlockProps extends ClassNameProps {
|
|
4
|
+
onAdd: (data: Block) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const AddBlock: ({ onAdd, className }: PropsWithChildren<AddBlockProps>) => JSX.Element;
|
|
7
|
+
export default AddBlock;
|
|
@@ -9,14 +9,14 @@ const utils_1 = require("../../../utils");
|
|
|
9
9
|
const data_1 = tslib_1.__importDefault(require("../../data"));
|
|
10
10
|
const b = (0, utils_1.block)('add-block');
|
|
11
11
|
const sortedBlockNames = Object.keys(constructor_items_1.blockMap).sort();
|
|
12
|
-
const AddBlock = ({ onAdd }) => {
|
|
12
|
+
const AddBlock = ({ onAdd, className }) => {
|
|
13
13
|
const [isOpened, setIsOpened] = (0, react_1.useState)(false);
|
|
14
14
|
const [search, setSearch] = (0, react_1.useState)('');
|
|
15
15
|
const ref = (0, react_1.useRef)(null);
|
|
16
16
|
const blocks = (0, react_1.useMemo)(() => sortedBlockNames.filter((blockName) => data_1.default[blockName].meta.title
|
|
17
17
|
.toLocaleLowerCase()
|
|
18
18
|
.startsWith(search.toLocaleLowerCase())), [search]);
|
|
19
|
-
return (react_1.default.createElement("div", { className: b(), ref: ref },
|
|
19
|
+
return (react_1.default.createElement("div", { className: b(null, className), ref: ref },
|
|
20
20
|
react_1.default.createElement("button", { className: b('button'), onClick: () => {
|
|
21
21
|
setIsOpened(!isOpened);
|
|
22
22
|
setSearch('');
|