@gravity-ui/page-constructor 4.55.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/build/cjs/blocks/Banner/schema.d.ts +0 -264
- package/build/cjs/blocks/FilterBlock/FilterBlock.js +2 -2
- package/build/cjs/blocks/FilterBlock/i18n/index.d.ts +1 -2
- package/build/cjs/blocks/FilterBlock/i18n/index.js +4 -3
- package/build/cjs/blocks/Map/schema.d.ts +0 -88
- package/build/cjs/blocks/Media/schema.d.ts +0 -176
- package/build/cjs/blocks/Security/i18n/index.d.ts +1 -2
- package/build/cjs/blocks/Security/i18n/index.js +4 -3
- package/build/cjs/blocks/Share/Share.css +2 -1
- package/build/cjs/blocks/Share/Share.js +4 -4
- package/build/cjs/blocks/Share/i18n/index.d.ts +1 -2
- package/build/cjs/blocks/Share/i18n/index.js +4 -3
- package/build/cjs/blocks/Slider/Arrow/Arrow.js +2 -2
- package/build/cjs/blocks/Slider/i18n/index.d.ts +1 -2
- package/build/cjs/blocks/Slider/i18n/index.js +4 -3
- package/build/cjs/components/BackLink/BackLink.js +2 -2
- package/build/cjs/components/Button/Button.css +1 -5
- package/build/cjs/components/Button/Button.js +4 -7
- package/build/cjs/components/Button/i18n/index.d.ts +1 -2
- package/build/cjs/components/Button/i18n/index.js +4 -3
- package/build/cjs/components/ButtonTabs/ButtonTabs.css +0 -4
- package/build/cjs/components/Buttons/Buttons.css +11 -0
- package/build/cjs/components/Buttons/Buttons.d.ts +12 -0
- package/build/cjs/components/Buttons/Buttons.js +18 -0
- package/build/cjs/components/CardBase/CardBase.d.ts +3 -6
- package/build/cjs/components/CardBase/CardBase.js +6 -10
- package/build/cjs/components/Control/Control.js +2 -2
- package/build/cjs/components/Control/i18n/index.d.ts +1 -2
- package/build/cjs/components/Control/i18n/index.js +4 -3
- package/build/cjs/components/FileLink/FileLink.css +4 -5
- package/build/cjs/components/FullscreenImage/FullscreenImage.css +1 -0
- package/build/cjs/components/FullscreenImage/FullscreenImage.js +9 -10
- package/build/cjs/components/FullscreenImage/i18n/index.d.ts +1 -2
- package/build/cjs/components/FullscreenImage/i18n/index.js +4 -3
- package/build/cjs/components/FullscreenMedia/FullscreenMedia.css +1 -0
- package/build/cjs/components/FullscreenMedia/FullscreenMedia.js +14 -15
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +3 -6
- package/build/cjs/components/Link/Link.css +1 -2
- package/build/cjs/components/Link/Link.js +3 -6
- package/build/cjs/components/Links/Links.css +14 -0
- package/build/cjs/components/Links/Links.d.ts +12 -0
- package/build/cjs/components/Links/Links.js +18 -0
- package/build/cjs/components/Map/GoogleMap.js +2 -2
- package/build/cjs/components/Map/YMap/YandexMap.js +2 -2
- package/build/cjs/components/Map/YMap/i18n/index.d.ts +1 -2
- package/build/cjs/components/Map/YMap/i18n/index.js +4 -3
- package/build/cjs/components/Media/DataLens/DataLens.js +2 -2
- package/build/cjs/components/Media/DataLens/i18n/index.d.ts +1 -2
- package/build/cjs/components/Media/DataLens/i18n/index.js +4 -3
- package/build/cjs/components/Media/Iframe/Iframe.js +2 -2
- package/build/cjs/components/Media/Iframe/i18n/index.d.ts +1 -2
- package/build/cjs/components/Media/Iframe/i18n/index.js +4 -3
- package/build/cjs/components/Media/Media.js +1 -3
- package/build/cjs/components/Media/Video/Video.js +2 -3
- package/build/cjs/components/OverflowScroller/OverflowScroller.js +2 -2
- package/build/cjs/components/OverflowScroller/i18n/index.d.ts +1 -2
- package/build/cjs/components/OverflowScroller/i18n/index.js +4 -3
- package/build/cjs/components/ReactPlayer/CustomBarControls.js +5 -7
- package/build/cjs/components/ReactPlayer/ReactPlayer.css +1 -1
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +7 -31
- package/build/cjs/components/ReactPlayer/i18n/index.d.ts +1 -2
- package/build/cjs/components/ReactPlayer/i18n/index.js +4 -3
- package/build/cjs/components/Table/Table.css +6 -0
- package/build/cjs/components/Table/Table.js +2 -2
- package/build/cjs/components/UnpublishedLabel/UnpublishedLabel.js +2 -2
- package/build/cjs/components/UnpublishedLabel/i18n/index.d.ts +1 -2
- package/build/cjs/components/UnpublishedLabel/i18n/index.js +4 -3
- package/build/cjs/components/VideoBlock/VideoBlock.css +1 -1
- package/build/cjs/components/VideoBlock/VideoBlock.js +4 -4
- package/build/cjs/components/VideoBlock/i18n/index.d.ts +1 -2
- package/build/cjs/components/VideoBlock/i18n/index.js +4 -3
- package/build/cjs/components/YandexForm/YandexForm.js +2 -13
- package/build/cjs/components/index.d.ts +2 -1
- package/build/cjs/components/index.js +4 -2
- package/build/cjs/constructor-items.d.ts +1 -1
- package/build/cjs/containers/Loadable/Loadable.js +2 -2
- package/build/cjs/containers/Loadable/i18n/index.d.ts +1 -2
- package/build/cjs/containers/Loadable/i18n/index.js +4 -3
- package/build/cjs/containers/PageConstructor/PageConstructor.css +1 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.d.ts +1 -1
- package/build/cjs/containers/PageConstructor/PageConstructor.js +1 -1
- package/build/cjs/containers/PageConstructor/Provider.d.ts +0 -2
- package/build/cjs/containers/PageConstructor/Provider.js +1 -3
- package/build/cjs/context/localeContext/localeContext.d.ts +2 -2
- package/build/cjs/context/localeContext/localeContext.js +2 -2
- package/build/cjs/editor/components/ControlPanel/ControlPanel.js +3 -3
- package/build/cjs/editor/components/ControlPanel/i18n/en.json +2 -1
- package/build/cjs/editor/components/ControlPanel/i18n/index.d.ts +1 -2
- package/build/cjs/editor/components/ControlPanel/i18n/index.js +4 -3
- package/build/cjs/editor/components/ControlPanel/i18n/ru.json +2 -1
- package/build/cjs/editor/components/ErrorBoundary/ErrorBoundary.js +3 -3
- package/build/cjs/editor/components/ErrorBoundary/i18n/index.d.ts +1 -2
- package/build/cjs/editor/components/ErrorBoundary/i18n/index.js +4 -3
- package/build/cjs/editor/components/NotFoundBlock/NotFoundBlock.js +2 -2
- package/build/cjs/editor/components/NotFoundBlock/i18n/index.d.ts +1 -2
- package/build/cjs/editor/components/NotFoundBlock/i18n/index.js +4 -3
- package/build/cjs/editor/containers/Form/Form.css +1 -1
- package/build/cjs/editor/dynamic-forms-custom/hooks/useOneOf.d.ts +1 -1
- package/build/cjs/hooks/useAnalytics.d.ts +2 -2
- package/build/cjs/hooks/useMetrika.d.ts +1 -13
- package/build/cjs/hooks/useMetrika.js +0 -41
- package/build/cjs/icons/index.d.ts +0 -9
- package/build/cjs/icons/index.js +0 -9
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -1
- package/build/cjs/models/common.d.ts +2 -53
- package/build/cjs/models/common.js +1 -25
- package/build/cjs/models/constructor-items/common.d.ts +7 -28
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +6 -6
- package/build/cjs/models/guards.d.ts +0 -2
- package/build/cjs/models/guards.js +1 -5
- package/build/cjs/navigation/components/MobileMenuButton/MobileMenuButton.js +3 -3
- package/build/cjs/schema/constants.d.ts +12 -176
- package/build/cjs/schema/constants.js +2 -0
- package/build/cjs/schema/validators/common.d.ts +0 -188
- package/build/cjs/schema/validators/common.js +0 -31
- package/build/cjs/schema/validators/index.d.ts +0 -2
- package/build/cjs/schema/validators/index.js +0 -2
- package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +15 -3
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +4 -0
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +3 -0
- package/build/cjs/sub-blocks/BasicCard/BasicCard.js +17 -8
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +4 -0
- package/build/cjs/sub-blocks/BasicCard/schema.js +3 -0
- package/build/cjs/sub-blocks/Content/Content.css +0 -22
- package/build/cjs/sub-blocks/Content/Content.js +10 -21
- package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +0 -1
- package/build/cjs/sub-blocks/HubspotForm/index.js +1 -6
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.css +6 -0
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +16 -4
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +4 -0
- package/build/cjs/sub-blocks/LayoutItem/schema.js +3 -0
- package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +1 -15
- package/build/cjs/sub-blocks/PriceCard/PriceCard.css +2 -5
- package/build/cjs/sub-blocks/PriceCard/PriceCard.js +3 -3
- package/build/cjs/sub-blocks/PriceCard/schema.d.ts +4 -88
- package/build/cjs/sub-blocks/PriceCard/schema.js +3 -0
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetailed.d.ts +1 -0
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetailed.js +2 -0
- package/build/cjs/sub-blocks/PriceDetailed/schema.d.ts +1 -0
- package/build/cjs/sub-blocks/PriceDetailed/schema.js +1 -0
- package/build/cjs/sub-blocks/renderCardFooterControlsContainer/CardFooterControlsContainer.css +3 -0
- package/build/cjs/sub-blocks/renderCardFooterControlsContainer/renderCardFooterControlsContainer.d.ts +3 -0
- package/build/cjs/sub-blocks/renderCardFooterControlsContainer/renderCardFooterControlsContainer.js +9 -0
- package/build/cjs/text-transform/common.d.ts +5 -5
- package/build/cjs/text-transform/common.js +1 -1
- package/build/cjs/text-transform/filter.js +1 -1
- package/build/cjs/text-transform/transformers.d.ts +3 -3
- package/build/cjs/text-transform/utils.d.ts +7 -7
- package/build/cjs/text-transform/utils.js +6 -6
- package/build/cjs/utils/index.d.ts +0 -1
- package/build/cjs/utils/index.js +1 -4
- package/build/cjs/utils/renderContentControls/ContentControls.css +6 -0
- package/build/cjs/utils/renderContentControls/renderContentControls.d.ts +11 -0
- package/build/cjs/utils/renderContentControls/renderContentControls.js +16 -0
- package/build/esm/blocks/Banner/schema.d.ts +0 -264
- package/build/esm/blocks/FilterBlock/FilterBlock.js +1 -1
- package/build/esm/blocks/FilterBlock/i18n/index.d.ts +1 -2
- package/build/esm/blocks/FilterBlock/i18n/index.js +3 -3
- package/build/esm/blocks/Map/schema.d.ts +0 -88
- package/build/esm/blocks/Media/schema.d.ts +0 -176
- package/build/esm/blocks/Security/i18n/index.d.ts +1 -2
- package/build/esm/blocks/Security/i18n/index.js +3 -3
- package/build/esm/blocks/Share/Share.css +2 -1
- package/build/esm/blocks/Share/Share.js +1 -1
- package/build/esm/blocks/Share/i18n/index.d.ts +1 -2
- package/build/esm/blocks/Share/i18n/index.js +3 -3
- package/build/esm/blocks/Slider/Arrow/Arrow.js +1 -1
- package/build/esm/blocks/Slider/i18n/index.d.ts +1 -2
- package/build/esm/blocks/Slider/i18n/index.js +3 -3
- package/build/esm/components/BackLink/BackLink.js +2 -2
- package/build/esm/components/Button/Button.css +1 -5
- package/build/esm/components/Button/Button.js +3 -6
- package/build/esm/components/Button/i18n/index.d.ts +1 -2
- package/build/esm/components/Button/i18n/index.js +3 -3
- package/build/esm/components/ButtonTabs/ButtonTabs.css +0 -4
- package/build/esm/components/Buttons/Buttons.css +11 -0
- package/build/esm/components/Buttons/Buttons.d.ts +13 -0
- package/build/esm/components/Buttons/Buttons.js +16 -0
- package/build/esm/components/CardBase/CardBase.d.ts +3 -6
- package/build/esm/components/CardBase/CardBase.js +7 -11
- package/build/esm/components/Control/Control.js +1 -1
- package/build/esm/components/Control/i18n/index.d.ts +1 -2
- package/build/esm/components/Control/i18n/index.js +3 -3
- package/build/esm/components/FileLink/FileLink.css +4 -5
- package/build/esm/components/FullscreenImage/FullscreenImage.css +1 -0
- package/build/esm/components/FullscreenImage/FullscreenImage.js +8 -9
- package/build/esm/components/FullscreenImage/i18n/index.d.ts +1 -2
- package/build/esm/components/FullscreenImage/i18n/index.js +3 -3
- package/build/esm/components/FullscreenMedia/FullscreenMedia.css +1 -0
- package/build/esm/components/FullscreenMedia/FullscreenMedia.js +14 -15
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +3 -6
- package/build/esm/components/Link/Link.css +1 -2
- package/build/esm/components/Link/Link.js +3 -6
- package/build/esm/components/Links/Links.css +14 -0
- package/build/esm/components/Links/Links.d.ts +13 -0
- package/build/esm/components/Links/Links.js +16 -0
- package/build/esm/components/Map/GoogleMap.js +1 -1
- package/build/esm/components/Map/YMap/YandexMap.js +1 -1
- package/build/esm/components/Map/YMap/i18n/index.d.ts +1 -2
- package/build/esm/components/Map/YMap/i18n/index.js +3 -3
- package/build/esm/components/Media/DataLens/DataLens.js +1 -1
- package/build/esm/components/Media/DataLens/i18n/index.d.ts +1 -2
- package/build/esm/components/Media/DataLens/i18n/index.js +3 -3
- package/build/esm/components/Media/Iframe/Iframe.js +1 -1
- package/build/esm/components/Media/Iframe/i18n/index.d.ts +1 -2
- package/build/esm/components/Media/Iframe/i18n/index.js +3 -3
- package/build/esm/components/Media/Media.js +1 -3
- package/build/esm/components/Media/Video/Video.js +2 -3
- package/build/esm/components/OverflowScroller/OverflowScroller.js +1 -1
- package/build/esm/components/OverflowScroller/i18n/index.d.ts +1 -2
- package/build/esm/components/OverflowScroller/i18n/index.js +3 -3
- package/build/esm/components/ReactPlayer/CustomBarControls.js +4 -6
- package/build/esm/components/ReactPlayer/ReactPlayer.css +1 -1
- package/build/esm/components/ReactPlayer/ReactPlayer.js +6 -30
- package/build/esm/components/ReactPlayer/i18n/index.d.ts +1 -2
- package/build/esm/components/ReactPlayer/i18n/index.js +3 -3
- package/build/esm/components/Table/Table.css +6 -0
- package/build/esm/components/Table/Table.js +2 -2
- package/build/esm/components/UnpublishedLabel/UnpublishedLabel.js +1 -1
- package/build/esm/components/UnpublishedLabel/i18n/index.d.ts +1 -2
- package/build/esm/components/UnpublishedLabel/i18n/index.js +3 -3
- package/build/esm/components/VideoBlock/VideoBlock.css +1 -1
- package/build/esm/components/VideoBlock/VideoBlock.js +3 -3
- package/build/esm/components/VideoBlock/i18n/index.d.ts +1 -2
- package/build/esm/components/VideoBlock/i18n/index.js +3 -3
- package/build/esm/components/YandexForm/YandexForm.js +2 -13
- package/build/esm/components/index.d.ts +2 -1
- package/build/esm/components/index.js +2 -1
- package/build/esm/constructor-items.d.ts +1 -1
- package/build/esm/containers/Loadable/Loadable.js +1 -1
- package/build/esm/containers/Loadable/i18n/index.d.ts +1 -2
- package/build/esm/containers/Loadable/i18n/index.js +3 -3
- package/build/esm/containers/PageConstructor/PageConstructor.css +1 -1
- package/build/esm/containers/PageConstructor/PageConstructor.d.ts +1 -1
- package/build/esm/containers/PageConstructor/PageConstructor.js +1 -1
- package/build/esm/containers/PageConstructor/Provider.d.ts +0 -2
- package/build/esm/containers/PageConstructor/Provider.js +1 -3
- package/build/esm/context/localeContext/localeContext.d.ts +2 -2
- package/build/esm/context/localeContext/localeContext.js +1 -1
- package/build/esm/editor/components/ControlPanel/ControlPanel.js +2 -2
- package/build/esm/editor/components/ControlPanel/i18n/en.json +2 -1
- package/build/esm/editor/components/ControlPanel/i18n/index.d.ts +1 -2
- package/build/esm/editor/components/ControlPanel/i18n/index.js +3 -3
- package/build/esm/editor/components/ControlPanel/i18n/ru.json +2 -1
- package/build/esm/editor/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/build/esm/editor/components/ErrorBoundary/i18n/index.d.ts +1 -2
- package/build/esm/editor/components/ErrorBoundary/i18n/index.js +3 -3
- package/build/esm/editor/components/NotFoundBlock/NotFoundBlock.js +1 -1
- package/build/esm/editor/components/NotFoundBlock/i18n/index.d.ts +1 -2
- package/build/esm/editor/components/NotFoundBlock/i18n/index.js +3 -3
- package/build/esm/editor/containers/Form/Form.css +1 -1
- package/build/esm/editor/dynamic-forms-custom/hooks/useOneOf.d.ts +1 -1
- package/build/esm/hooks/useAnalytics.d.ts +2 -2
- package/build/esm/hooks/useMetrika.d.ts +1 -13
- package/build/esm/hooks/useMetrika.js +1 -38
- package/build/esm/icons/index.d.ts +0 -9
- package/build/esm/icons/index.js +0 -9
- package/build/esm/index.d.ts +0 -1
- package/build/esm/index.js +0 -1
- package/build/esm/models/common.d.ts +2 -53
- package/build/esm/models/common.js +0 -24
- package/build/esm/models/constructor-items/common.d.ts +7 -28
- package/build/esm/models/constructor-items/sub-blocks.d.ts +6 -6
- package/build/esm/models/guards.d.ts +0 -2
- package/build/esm/models/guards.js +0 -3
- package/build/esm/navigation/components/MobileMenuButton/MobileMenuButton.js +3 -3
- package/build/esm/schema/constants.d.ts +12 -176
- package/build/esm/schema/constants.js +2 -0
- package/build/esm/schema/validators/common.d.ts +0 -188
- package/build/esm/schema/validators/common.js +0 -31
- package/build/esm/schema/validators/index.d.ts +0 -2
- package/build/esm/schema/validators/index.js +0 -2
- package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +15 -3
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +4 -0
- package/build/esm/sub-blocks/BackgroundCard/schema.js +3 -0
- package/build/esm/sub-blocks/BasicCard/BasicCard.js +14 -5
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +4 -0
- package/build/esm/sub-blocks/BasicCard/schema.js +3 -0
- package/build/esm/sub-blocks/Content/Content.css +0 -22
- package/build/esm/sub-blocks/Content/Content.js +11 -22
- package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +0 -1
- package/build/esm/sub-blocks/HubspotForm/index.js +1 -6
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.css +6 -0
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +16 -4
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +4 -0
- package/build/esm/sub-blocks/LayoutItem/schema.js +3 -0
- package/build/esm/sub-blocks/LayoutItem/utils.d.ts +1 -15
- package/build/esm/sub-blocks/PriceCard/PriceCard.css +2 -5
- package/build/esm/sub-blocks/PriceCard/PriceCard.js +4 -4
- package/build/esm/sub-blocks/PriceCard/schema.d.ts +4 -88
- package/build/esm/sub-blocks/PriceCard/schema.js +3 -0
- package/build/esm/sub-blocks/PriceDetailed/PriceDetailed.d.ts +1 -0
- package/build/esm/sub-blocks/PriceDetailed/PriceDetailed.js +2 -0
- package/build/esm/sub-blocks/PriceDetailed/schema.d.ts +1 -0
- package/build/esm/sub-blocks/PriceDetailed/schema.js +1 -0
- package/build/esm/sub-blocks/renderCardFooterControlsContainer/CardFooterControlsContainer.css +3 -0
- package/build/esm/sub-blocks/renderCardFooterControlsContainer/renderCardFooterControlsContainer.d.ts +3 -0
- package/build/esm/sub-blocks/renderCardFooterControlsContainer/renderCardFooterControlsContainer.js +6 -0
- package/build/esm/text-transform/common.d.ts +5 -5
- package/build/esm/text-transform/common.js +1 -1
- package/build/esm/text-transform/filter.js +1 -1
- package/build/esm/text-transform/transformers.d.ts +3 -3
- package/build/esm/text-transform/utils.d.ts +7 -7
- package/build/esm/text-transform/utils.js +2 -2
- package/build/esm/utils/index.d.ts +0 -1
- package/build/esm/utils/index.js +0 -1
- package/build/esm/utils/renderContentControls/ContentControls.css +6 -0
- package/build/esm/utils/renderContentControls/renderContentControls.d.ts +12 -0
- package/build/esm/utils/renderContentControls/renderContentControls.js +14 -0
- package/package.json +16 -15
- package/server/models/common.d.ts +2 -53
- package/server/models/common.js +1 -25
- package/server/models/constructor-items/common.d.ts +7 -28
- package/server/models/constructor-items/sub-blocks.d.ts +6 -6
- package/server/models/guards.d.ts +0 -2
- package/server/models/guards.js +1 -5
- package/server/text-transform/common.d.ts +5 -5
- package/server/text-transform/common.js +1 -1
- package/server/text-transform/filter.js +1 -1
- package/server/text-transform/transformers.d.ts +3 -3
- package/server/text-transform/utils.d.ts +7 -7
- package/server/text-transform/utils.js +6 -6
- package/server/utils/index.d.ts +0 -1
- package/server/utils/index.js +1 -4
- package/styles/mixins.scss +0 -4
- package/styles/storybook/index.scss +1 -1
- package/styles/styles.css +1 -1
- package/styles/yfm.scss +1 -1
- package/widget/index.js +1 -1
- package/build/cjs/components/Link/Links.d.ts +0 -6
- package/build/cjs/components/Link/Links.js +0 -13
- package/build/cjs/context/metrikaContext/index.d.ts +0 -1
- package/build/cjs/context/metrikaContext/index.js +0 -4
- package/build/cjs/context/metrikaContext/metrikaContext.d.ts +0 -13
- package/build/cjs/context/metrikaContext/metrikaContext.js +0 -6
- package/build/cjs/i18n.d.ts +0 -2
- package/build/cjs/i18n.js +0 -12
- package/build/cjs/icons/ArrowConstructor.d.ts +0 -2
- package/build/cjs/icons/ArrowConstructor.js +0 -9
- package/build/cjs/icons/ArrowSidebar.d.ts +0 -2
- package/build/cjs/icons/ArrowSidebar.js +0 -9
- package/build/cjs/icons/Fullscreen.d.ts +0 -2
- package/build/cjs/icons/Fullscreen.js +0 -9
- package/build/cjs/icons/Minus.d.ts +0 -2
- package/build/cjs/icons/Minus.js +0 -9
- package/build/cjs/icons/Mute.d.ts +0 -2
- package/build/cjs/icons/Mute.js +0 -12
- package/build/cjs/icons/NavigationClose.d.ts +0 -2
- package/build/cjs/icons/NavigationClose.js +0 -9
- package/build/cjs/icons/NavigationOpen.d.ts +0 -2
- package/build/cjs/icons/NavigationOpen.js +0 -11
- package/build/cjs/icons/PlayVideo.d.ts +0 -2
- package/build/cjs/icons/PlayVideo.js +0 -9
- package/build/cjs/icons/PreviewClose.d.ts +0 -2
- package/build/cjs/icons/PreviewClose.js +0 -9
- package/build/cjs/icons/Tick.d.ts +0 -2
- package/build/cjs/icons/Tick.js +0 -13
- package/build/cjs/icons/Unmute.d.ts +0 -2
- package/build/cjs/icons/Unmute.js +0 -12
- package/build/cjs/schema/validators/pixel.d.ts +0 -57
- package/build/cjs/schema/validators/pixel.js +0 -63
- package/build/cjs/utils/configure.d.ts +0 -12
- package/build/cjs/utils/configure.js +0 -26
- package/build/cjs/utils/registerKeyset.d.ts +0 -5
- package/build/cjs/utils/registerKeyset.js +0 -9
- package/build/esm/components/Link/Links.d.ts +0 -6
- package/build/esm/components/Link/Links.js +0 -10
- package/build/esm/context/metrikaContext/index.d.ts +0 -1
- package/build/esm/context/metrikaContext/index.js +0 -1
- package/build/esm/context/metrikaContext/metrikaContext.d.ts +0 -13
- package/build/esm/context/metrikaContext/metrikaContext.js +0 -2
- package/build/esm/i18n.d.ts +0 -2
- package/build/esm/i18n.js +0 -9
- package/build/esm/icons/ArrowConstructor.d.ts +0 -2
- package/build/esm/icons/ArrowConstructor.js +0 -4
- package/build/esm/icons/ArrowSidebar.d.ts +0 -2
- package/build/esm/icons/ArrowSidebar.js +0 -4
- package/build/esm/icons/Fullscreen.d.ts +0 -2
- package/build/esm/icons/Fullscreen.js +0 -4
- package/build/esm/icons/Minus.d.ts +0 -2
- package/build/esm/icons/Minus.js +0 -4
- package/build/esm/icons/Mute.d.ts +0 -2
- package/build/esm/icons/Mute.js +0 -7
- package/build/esm/icons/NavigationClose.d.ts +0 -2
- package/build/esm/icons/NavigationClose.js +0 -4
- package/build/esm/icons/NavigationOpen.d.ts +0 -2
- package/build/esm/icons/NavigationOpen.js +0 -6
- package/build/esm/icons/PlayVideo.d.ts +0 -2
- package/build/esm/icons/PlayVideo.js +0 -4
- package/build/esm/icons/PreviewClose.d.ts +0 -2
- package/build/esm/icons/PreviewClose.js +0 -4
- package/build/esm/icons/Tick.d.ts +0 -2
- package/build/esm/icons/Tick.js +0 -8
- package/build/esm/icons/Unmute.d.ts +0 -2
- package/build/esm/icons/Unmute.js +0 -7
- package/build/esm/schema/validators/pixel.d.ts +0 -57
- package/build/esm/schema/validators/pixel.js +0 -60
- package/build/esm/utils/configure.d.ts +0 -12
- package/build/esm/utils/configure.js +0 -20
- package/build/esm/utils/registerKeyset.d.ts +0 -5
- package/build/esm/utils/registerKeyset.js +0 -5
- package/server/utils/configure.d.ts +0 -12
- package/server/utils/configure.js +0 -26
|
@@ -2,7 +2,6 @@ import * as blocks from './blocks';
|
|
|
2
2
|
import * as common from './common';
|
|
3
3
|
import * as components from './components';
|
|
4
4
|
import * as navigation from './navigation';
|
|
5
|
-
import * as pixel from './pixel';
|
|
6
5
|
import * as subBlocks from './sub-blocks';
|
|
7
6
|
import * as utils from './utils';
|
|
8
7
|
export declare const validators: {
|
|
@@ -10,7 +9,6 @@ export declare const validators: {
|
|
|
10
9
|
common: typeof common;
|
|
11
10
|
components: typeof components;
|
|
12
11
|
subBlocks: typeof subBlocks;
|
|
13
|
-
pixel: typeof pixel;
|
|
14
12
|
utils: typeof utils;
|
|
15
13
|
navigation: typeof navigation;
|
|
16
14
|
};
|
|
@@ -6,7 +6,6 @@ const blocks = tslib_1.__importStar(require("./blocks"));
|
|
|
6
6
|
const common = tslib_1.__importStar(require("./common"));
|
|
7
7
|
const components = tslib_1.__importStar(require("./components"));
|
|
8
8
|
const navigation = tslib_1.__importStar(require("./navigation"));
|
|
9
|
-
const pixel = tslib_1.__importStar(require("./pixel"));
|
|
10
9
|
const subBlocks = tslib_1.__importStar(require("./sub-blocks"));
|
|
11
10
|
const utils = tslib_1.__importStar(require("./utils"));
|
|
12
11
|
exports.validators = {
|
|
@@ -14,7 +13,6 @@ exports.validators = {
|
|
|
14
13
|
common,
|
|
15
14
|
components,
|
|
16
15
|
subBlocks,
|
|
17
|
-
pixel,
|
|
18
16
|
utils,
|
|
19
17
|
navigation,
|
|
20
18
|
};
|
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 = tslib_1.
|
|
4
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
+
const uikit_1 = require("@gravity-ui/uikit");
|
|
5
6
|
const components_1 = require("../../components/");
|
|
6
7
|
const theme_1 = require("../../context/theme");
|
|
7
8
|
const utils_1 = require("../../utils");
|
|
9
|
+
const renderContentControls_1 = tslib_1.__importDefault(require("../../utils/renderContentControls/renderContentControls"));
|
|
8
10
|
const Content_1 = tslib_1.__importDefault(require("../Content/Content"));
|
|
11
|
+
const renderCardFooterControlsContainer_1 = tslib_1.__importDefault(require("../renderCardFooterControlsContainer/renderCardFooterControlsContainer"));
|
|
9
12
|
const b = (0, utils_1.block)('background-card');
|
|
10
13
|
const BackgroundCard = (props) => {
|
|
11
|
-
const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, analyticsEvents, urlTitle, } = props;
|
|
14
|
+
const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, analyticsEvents, urlTitle, controlPosition = 'content', } = props;
|
|
15
|
+
const titleId = (0, uikit_1.useUniqId)();
|
|
12
16
|
const theme = (0, theme_1.useTheme)();
|
|
13
17
|
const hasBackgroundColor = backgroundColor || cardTheme !== 'default';
|
|
14
18
|
const borderType = hasBackgroundColor ? 'none' : border;
|
|
19
|
+
const areControlsInFooter = !paddingBottom && controlPosition === 'footer';
|
|
20
|
+
const footerControls = (0, react_1.useMemo)(() => (0, renderContentControls_1.default)({
|
|
21
|
+
links: areControlsInFooter ? links : undefined,
|
|
22
|
+
buttons: areControlsInFooter ? buttons : undefined,
|
|
23
|
+
size: 's',
|
|
24
|
+
titleId,
|
|
25
|
+
}, renderCardFooterControlsContainer_1.default), [areControlsInFooter, links, buttons, titleId]);
|
|
15
26
|
return (react_1.default.createElement(components_1.CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), url: url, border: borderType, analyticsEvents: analyticsEvents, urlTitle: urlTitle },
|
|
16
27
|
react_1.default.createElement(components_1.CardBase.Content, null,
|
|
17
28
|
react_1.default.createElement(components_1.BackgroundImage, Object.assign({ className: b('image') }, (0, utils_1.getThemedValue)(background, theme), { style: { backgroundColor } })),
|
|
18
|
-
react_1.default.createElement(Content_1.default, { title: title, text: text, additionalInfo: additionalInfo, size: "s", theme: cardTheme, links: links, buttons: buttons, colSizes: { all: 12, md: 12 } }))
|
|
29
|
+
react_1.default.createElement(Content_1.default, { titleId: titleId, title: title, text: text, additionalInfo: additionalInfo, size: "s", theme: cardTheme, links: areControlsInFooter ? undefined : links, buttons: areControlsInFooter ? undefined : buttons, colSizes: { all: 12, md: 12 } })),
|
|
30
|
+
footerControls));
|
|
19
31
|
};
|
|
20
32
|
exports.default = BackgroundCard;
|
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 = tslib_1.
|
|
4
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
5
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
6
|
-
const
|
|
7
|
-
const IconWrapper_1 = tslib_1.__importDefault(require("../../components/IconWrapper/IconWrapper"));
|
|
6
|
+
const components_1 = require("../../components");
|
|
8
7
|
const sub_blocks_1 = require("../../models/constructor-items/sub-blocks");
|
|
9
8
|
const utils_1 = require("../../utils");
|
|
9
|
+
const renderContentControls_1 = tslib_1.__importDefault(require("../../utils/renderContentControls/renderContentControls"));
|
|
10
10
|
const Content_1 = tslib_1.__importDefault(require("../Content/Content"));
|
|
11
|
+
const renderCardFooterControlsContainer_1 = tslib_1.__importDefault(require("../renderCardFooterControlsContainer/renderCardFooterControlsContainer"));
|
|
11
12
|
const b = (0, utils_1.block)('basic-card');
|
|
12
13
|
const BasicCard = (props) => {
|
|
13
|
-
const { title, text, icon, additionalInfo, links, list, buttons, iconPosition = sub_blocks_1.IconPosition.Top } = props, cardParams = tslib_1.__rest(props, ["title", "text", "icon", "additionalInfo", "links", "list", "buttons", "iconPosition"]);
|
|
14
|
+
const { title, text, icon, additionalInfo, links, list, buttons, iconPosition = sub_blocks_1.IconPosition.Top, controlPosition = 'content' } = props, cardParams = tslib_1.__rest(props, ["title", "text", "icon", "additionalInfo", "links", "list", "buttons", "iconPosition", "controlPosition"]);
|
|
14
15
|
const titleId = (0, uikit_1.useUniqId)();
|
|
15
16
|
const descriptionId = (0, uikit_1.useUniqId)();
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
const areControlsInFooter = controlPosition === 'footer';
|
|
18
|
+
const footerControls = (0, react_1.useMemo)(() => (0, renderContentControls_1.default)({
|
|
19
|
+
links: areControlsInFooter ? links : undefined,
|
|
20
|
+
buttons: areControlsInFooter ? buttons : undefined,
|
|
21
|
+
size: 's',
|
|
22
|
+
titleId,
|
|
23
|
+
}, renderCardFooterControlsContainer_1.default), [areControlsInFooter, links, buttons, titleId]);
|
|
24
|
+
return (react_1.default.createElement(components_1.CardBase, Object.assign({ className: b() }, cardParams, { extraProps: { 'aria-describedby': descriptionId, 'aria-labelledby': titleId } }),
|
|
25
|
+
react_1.default.createElement(components_1.CardBase.Content, null,
|
|
26
|
+
react_1.default.createElement(components_1.IconWrapper, { icon: icon ? { value: icon, position: iconPosition } : undefined },
|
|
27
|
+
react_1.default.createElement(Content_1.default, { title: title, titleId: titleId, text: text, textId: descriptionId, additionalInfo: additionalInfo, links: areControlsInFooter ? undefined : links, list: list, buttons: areControlsInFooter ? undefined : buttons, size: "s", colSizes: { all: 12, md: 12 } }))),
|
|
28
|
+
footerControls));
|
|
20
29
|
};
|
|
21
30
|
exports.default = BasicCard;
|
|
@@ -27,16 +27,6 @@ unpredictable css rules order in build */
|
|
|
27
27
|
color: var(--g-color-text-primary);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.pc-content__buttons {
|
|
31
|
-
display: flex;
|
|
32
|
-
flex-wrap: wrap;
|
|
33
|
-
column-gap: 12px;
|
|
34
|
-
}
|
|
35
|
-
.pc-content__links {
|
|
36
|
-
display: flex;
|
|
37
|
-
flex-direction: column;
|
|
38
|
-
align-items: baseline;
|
|
39
|
-
}
|
|
40
30
|
.pc-content__link {
|
|
41
31
|
display: block;
|
|
42
32
|
}
|
|
@@ -67,12 +57,6 @@ unpredictable css rules order in build */
|
|
|
67
57
|
.pc-content_size_s .pc-content__text_without-title {
|
|
68
58
|
margin-top: 0;
|
|
69
59
|
}
|
|
70
|
-
.pc-content_size_s .pc-content__links,
|
|
71
|
-
.pc-content_size_s .pc-content__link,
|
|
72
|
-
.pc-content_size_s .pc-content__buttons,
|
|
73
|
-
.pc-content_size_s .pc-content__button {
|
|
74
|
-
margin-top: 8px;
|
|
75
|
-
}
|
|
76
60
|
.pc-content_size_s .pc-content__list {
|
|
77
61
|
margin-top: 16px;
|
|
78
62
|
}
|
|
@@ -88,12 +72,6 @@ unpredictable css rules order in build */
|
|
|
88
72
|
font-size: var(--g-text-body-3-font-size);
|
|
89
73
|
line-height: var(--g-text-body-3-line-height);
|
|
90
74
|
}
|
|
91
|
-
.pc-content_size_l .pc-content__links,
|
|
92
|
-
.pc-content_size_l .pc-content__link,
|
|
93
|
-
.pc-content_size_l .pc-content__buttons,
|
|
94
|
-
.pc-content_size_l .pc-content__button {
|
|
95
|
-
margin-top: 12px;
|
|
96
|
-
}
|
|
97
75
|
.pc-content_size_l .pc-content__list {
|
|
98
76
|
margin-top: 24px;
|
|
99
77
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 = tslib_1.
|
|
4
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
5
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
6
6
|
const components_1 = require("../../components");
|
|
7
7
|
const grid_1 = require("../../grid");
|
|
8
8
|
const utils_1 = require("../../utils");
|
|
9
9
|
const blocks_1 = require("../../utils/blocks");
|
|
10
|
+
const renderContentControls_1 = tslib_1.__importDefault(require("../../utils/renderContentControls/renderContentControls"));
|
|
10
11
|
const b = (0, utils_1.block)('content');
|
|
11
12
|
function getTextSize(size) {
|
|
12
13
|
switch (size) {
|
|
@@ -17,24 +18,6 @@ function getTextSize(size) {
|
|
|
17
18
|
return 'm';
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
|
-
function getLinkSize(size) {
|
|
21
|
-
switch (size) {
|
|
22
|
-
case 's':
|
|
23
|
-
return 'm';
|
|
24
|
-
case 'l':
|
|
25
|
-
default:
|
|
26
|
-
return 'l';
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function getButtonSize(size) {
|
|
30
|
-
switch (size) {
|
|
31
|
-
case 's':
|
|
32
|
-
return 'm';
|
|
33
|
-
case 'l':
|
|
34
|
-
default:
|
|
35
|
-
return 'xl';
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
21
|
const Content = (props) => {
|
|
39
22
|
const { title, titleId: titleIdFromProps, text, textId, additionalInfo, size = 'l', links, buttons, colSizes = { all: 12, sm: 8 }, centered, theme, className, list, qa, } = props;
|
|
40
23
|
const qaAttributes = (0, blocks_1.getQaAttrubutes)(qa, ['links', 'link', 'buttons', 'button', 'list']);
|
|
@@ -44,6 +27,13 @@ const Content = (props) => {
|
|
|
44
27
|
const hasTitle = Boolean(title);
|
|
45
28
|
const defaultTitleId = (0, uikit_1.useUniqId)();
|
|
46
29
|
const titleId = titleIdFromProps || defaultTitleId;
|
|
30
|
+
const controls = (0, react_1.useMemo)(() => (0, renderContentControls_1.default)({
|
|
31
|
+
size,
|
|
32
|
+
links,
|
|
33
|
+
buttons,
|
|
34
|
+
titleId,
|
|
35
|
+
qa: qaAttributes,
|
|
36
|
+
}), [size, links, buttons, titleId, qaAttributes]);
|
|
47
37
|
return (react_1.default.createElement(grid_1.Col, { className: b({ size, centered, theme }, className), reset: true, sizes: colSizes, qa: qaAttributes.container },
|
|
48
38
|
title && (react_1.default.createElement(components_1.Title, { className: b('title'), title: titleProps, colSizes: { all: 12 }, id: titleId })),
|
|
49
39
|
text && (react_1.default.createElement("div", { className: b('text', { ['without-title']: !hasTitle }) },
|
|
@@ -56,7 +46,6 @@ const Content = (props) => {
|
|
|
56
46
|
'constructor-notice': true,
|
|
57
47
|
[`constructor-size-${size}`]: true,
|
|
58
48
|
} }))),
|
|
59
|
-
|
|
60
|
-
buttons && (react_1.default.createElement("div", { className: b('buttons'), "data-qa": qaAttributes.buttons }, buttons.map((item) => (react_1.default.createElement(components_1.Button, Object.assign({ className: b('button') }, item, { key: item.url, size: getButtonSize(size), qa: qaAttributes.button, extraProps: Object.assign({ 'aria-describedby': item.urlTitle ? undefined : titleId }, item.extraProps) }))))))));
|
|
49
|
+
controls));
|
|
61
50
|
};
|
|
62
51
|
exports.default = Content;
|
|
@@ -5,16 +5,14 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
5
5
|
const mobileContext_1 = require("../../context/mobileContext");
|
|
6
6
|
const theme_1 = require("../../context/theme");
|
|
7
7
|
const hooks_1 = require("../../hooks");
|
|
8
|
-
const useMetrika_1 = require("../../hooks/useMetrika");
|
|
9
8
|
const models_1 = require("../../models");
|
|
10
9
|
const utils_1 = require("../../utils");
|
|
11
10
|
const HubspotFormContainer_1 = tslib_1.__importDefault(require("./HubspotFormContainer"));
|
|
12
11
|
const b = (0, utils_1.block)('hubspot-form');
|
|
13
12
|
const HubspotForm = (0, react_1.forwardRef)((props, ref) => {
|
|
14
|
-
const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName,
|
|
13
|
+
const { className, theme: themeProp, isMobile: isMobileProp, formId, formInstanceId, portalId, region, formClassName,
|
|
15
14
|
// hubspotEvents, // TODO: decide how to handle them
|
|
16
15
|
analyticsEvents, onBeforeSubmit, onSubmit, onBeforeLoad, onLoad, createDOMElement, onSubmitError, } = props;
|
|
17
|
-
const handleMetrika = (0, useMetrika_1.useMetrika)();
|
|
18
16
|
const themeValue = (0, theme_1.useTheme)();
|
|
19
17
|
const handleAnalytics = (0, hooks_1.useAnalytics)(models_1.DefaultEventNames.HubspotFormSubmit);
|
|
20
18
|
const isMobileValue = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
@@ -26,7 +24,6 @@ const HubspotForm = (0, react_1.forwardRef)((props, ref) => {
|
|
|
26
24
|
onLoad,
|
|
27
25
|
onSubmitError,
|
|
28
26
|
onSubmit: (event) => {
|
|
29
|
-
handleMetrika === null || handleMetrika === void 0 ? void 0 : handleMetrika({ pixelEvents });
|
|
30
27
|
handleAnalytics(analyticsEvents);
|
|
31
28
|
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(event);
|
|
32
29
|
},
|
|
@@ -34,8 +31,6 @@ const HubspotForm = (0, react_1.forwardRef)((props, ref) => {
|
|
|
34
31
|
onBeforeLoad,
|
|
35
32
|
onBeforeSubmit,
|
|
36
33
|
onLoad,
|
|
37
|
-
handleMetrika,
|
|
38
|
-
pixelEvents,
|
|
39
34
|
handleAnalytics,
|
|
40
35
|
analyticsEvents,
|
|
41
36
|
onSubmit,
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/* use this for style redefinitions to awoid problems with
|
|
2
2
|
unpredictable css rules order in build */
|
|
3
|
+
.pc-layout-item {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
height: 100%;
|
|
7
|
+
}
|
|
3
8
|
.pc-layout-item__media {
|
|
4
9
|
width: 100%;
|
|
5
10
|
display: block;
|
|
@@ -12,6 +17,7 @@ unpredictable css rules order in build */
|
|
|
12
17
|
margin: 16px 0 -8px 0;
|
|
13
18
|
}
|
|
14
19
|
.pc-layout-item__content {
|
|
20
|
+
flex: auto;
|
|
15
21
|
margin: 16px 16px 0 0;
|
|
16
22
|
}
|
|
17
23
|
.pc-layout-item__content_no-media {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { LayoutItemProps } from '../../models';
|
|
2
|
-
declare const LayoutItem: ({ content: { links, ...content }, metaInfo, media, border, fullscreen, icon, className, analyticsEvents, }: LayoutItemProps) => JSX.Element;
|
|
2
|
+
declare const LayoutItem: ({ content: { links, buttons, ...content }, metaInfo, media, border, fullscreen, icon, className, analyticsEvents, controlPosition, }: LayoutItemProps) => JSX.Element;
|
|
3
3
|
export default LayoutItem;
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 = tslib_1.
|
|
4
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
+
const uikit_1 = require("@gravity-ui/uikit");
|
|
5
6
|
const components_1 = require("../../components");
|
|
6
7
|
const utils_1 = require("../../utils");
|
|
8
|
+
const renderContentControls_1 = tslib_1.__importDefault(require("../../utils/renderContentControls/renderContentControls"));
|
|
7
9
|
const Content_1 = tslib_1.__importDefault(require("../Content/Content"));
|
|
8
10
|
const utils_2 = require("./utils");
|
|
9
11
|
const b = (0, utils_1.block)('layout-item');
|
|
10
12
|
const LayoutItem = (_a) => {
|
|
11
|
-
var _b = _a.content, { links } = _b, content = tslib_1.__rest(_b, ["links"]), { metaInfo, media, border, fullscreen, icon, className, analyticsEvents } = _a;
|
|
12
|
-
const
|
|
13
|
+
var _b = _a.content, { links, buttons } = _b, content = tslib_1.__rest(_b, ["links", "buttons"]), { metaInfo, media, border, fullscreen, icon, className, analyticsEvents, controlPosition = 'content' } = _a;
|
|
14
|
+
const normalizedLinks = (0, react_1.useMemo)(() => (0, utils_2.getLayoutItemLinks)(links), [links]);
|
|
15
|
+
const areControlsInFooter = controlPosition === 'footer';
|
|
16
|
+
const contentProps = Object.assign(Object.assign(Object.assign({}, content), (areControlsInFooter ? {} : { links: normalizedLinks, buttons })), { size: 's', colSizes: { all: 12, md: 12 } });
|
|
17
|
+
const titleId = (0, uikit_1.useUniqId)();
|
|
18
|
+
const footerControls = (0, react_1.useMemo)(() => (0, renderContentControls_1.default)({
|
|
19
|
+
links: areControlsInFooter ? links : undefined,
|
|
20
|
+
buttons: areControlsInFooter ? buttons : undefined,
|
|
21
|
+
size: 's',
|
|
22
|
+
titleId,
|
|
23
|
+
}), [areControlsInFooter, links, buttons, titleId]);
|
|
13
24
|
const renderMedia = () => {
|
|
14
25
|
if (!media) {
|
|
15
26
|
return null;
|
|
@@ -24,6 +35,7 @@ const LayoutItem = (_a) => {
|
|
|
24
35
|
metaInfo && react_1.default.createElement(components_1.MetaInfo, { items: metaInfo, className: b('meta-info') }),
|
|
25
36
|
react_1.default.createElement("div", { className: b('content', { 'no-media': !media }) },
|
|
26
37
|
react_1.default.createElement(components_1.IconWrapper, { icon: icon },
|
|
27
|
-
react_1.default.createElement(Content_1.default, Object.assign({}, contentProps))))
|
|
38
|
+
react_1.default.createElement(Content_1.default, Object.assign({}, contentProps, { titleId: titleId })))),
|
|
39
|
+
footerControls));
|
|
28
40
|
};
|
|
29
41
|
exports.default = LayoutItem;
|
|
@@ -8,22 +8,8 @@ export declare const getLayoutItemLinks: (links: LayoutItemProps['content']['lin
|
|
|
8
8
|
colorTheme?: import("../../models").TextTheme | undefined;
|
|
9
9
|
arrow?: boolean | undefined;
|
|
10
10
|
target?: string | undefined;
|
|
11
|
-
metrikaGoals?: import("../../models").MetrikaGoal | undefined;
|
|
12
|
-
pixelEvents?: import("../../models").ButtonPixel | undefined;
|
|
13
11
|
extraProps?: import("react").HTMLProps<HTMLAnchorElement> | undefined;
|
|
14
|
-
analyticsEvents?:
|
|
15
|
-
name: string;
|
|
16
|
-
type?: string | undefined;
|
|
17
|
-
counters?: import("../../models").AnalyticsCounters | undefined;
|
|
18
|
-
context?: string | undefined;
|
|
19
|
-
target?: string | undefined;
|
|
20
|
-
} | {
|
|
21
|
-
name: string;
|
|
22
|
-
type?: string | undefined;
|
|
23
|
-
counters?: import("../../models").AnalyticsCounters | undefined;
|
|
24
|
-
context?: string | undefined;
|
|
25
|
-
target?: string | undefined;
|
|
26
|
-
}[] | undefined;
|
|
12
|
+
analyticsEvents?: import("../../models").AnalyticsEventsProp | undefined;
|
|
27
13
|
className?: string | undefined;
|
|
28
14
|
tabIndex?: number | undefined;
|
|
29
15
|
}[] | undefined;
|
|
@@ -86,11 +86,8 @@ unpredictable css rules order in build */
|
|
|
86
86
|
.pc-price-card__links, .pc-price-card__buttons {
|
|
87
87
|
margin-top: 24px;
|
|
88
88
|
}
|
|
89
|
-
.pc-price-
|
|
90
|
-
margin-
|
|
91
|
-
}
|
|
92
|
-
.pc-price-card__link {
|
|
93
|
-
margin-top: 0;
|
|
89
|
+
.pc-price-card__footer {
|
|
90
|
+
margin-top: 0px;
|
|
94
91
|
}
|
|
95
92
|
@media (max-width: 769px) {
|
|
96
93
|
.pc-price-card__title, .pc-price-card__price {
|
|
@@ -9,7 +9,7 @@ const b = (0, utils_1.block)('price-card');
|
|
|
9
9
|
const PriceCard = (props) => {
|
|
10
10
|
const { border, title, price, pricePeriod, priceDetails, theme, description, list, buttons, links, backgroundColor, } = props;
|
|
11
11
|
return (react_1.default.createElement(components_1.CardBase, { className: b({ theme }), border: border },
|
|
12
|
-
react_1.default.createElement(components_1.CardBase.Content,
|
|
12
|
+
react_1.default.createElement(components_1.CardBase.Content, { key: "content" },
|
|
13
13
|
react_1.default.createElement(components_1.BackgroundImage, { className: b('background'), style: { backgroundColor } }),
|
|
14
14
|
react_1.default.createElement("div", { className: b('content', { theme }) },
|
|
15
15
|
react_1.default.createElement("div", { className: b('info') },
|
|
@@ -27,7 +27,7 @@ const PriceCard = (props) => {
|
|
|
27
27
|
icon: Check_1.default,
|
|
28
28
|
text: item,
|
|
29
29
|
})), size: "l" }))) : null),
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
react_1.default.createElement(components_1.Buttons, { className: b('buttons'), buttons: buttons, size: "s" }),
|
|
31
|
+
react_1.default.createElement(components_1.Links, { className: b('links'), links: links, size: "s" })))));
|
|
32
32
|
};
|
|
33
33
|
exports.default = PriceCard;
|
|
@@ -76,94 +76,6 @@ export declare const PriceCardBlock: {
|
|
|
76
76
|
optionName: string;
|
|
77
77
|
})[];
|
|
78
78
|
};
|
|
79
|
-
metrikaGoals: {
|
|
80
|
-
oneOf: ({
|
|
81
|
-
type: string;
|
|
82
|
-
optionName: string;
|
|
83
|
-
items?: undefined;
|
|
84
|
-
} | {
|
|
85
|
-
type: string;
|
|
86
|
-
items: {
|
|
87
|
-
type: string;
|
|
88
|
-
additionalProperties?: undefined;
|
|
89
|
-
required?: undefined;
|
|
90
|
-
properties?: undefined;
|
|
91
|
-
};
|
|
92
|
-
optionName: string;
|
|
93
|
-
} | {
|
|
94
|
-
type: string;
|
|
95
|
-
items: {
|
|
96
|
-
type: string;
|
|
97
|
-
additionalProperties: boolean;
|
|
98
|
-
required: string[];
|
|
99
|
-
properties: {
|
|
100
|
-
name: {
|
|
101
|
-
type: string;
|
|
102
|
-
};
|
|
103
|
-
isCrossSite: {
|
|
104
|
-
type: string;
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
optionName: string;
|
|
109
|
-
})[];
|
|
110
|
-
};
|
|
111
|
-
pixelEvents: {
|
|
112
|
-
type: string;
|
|
113
|
-
items: {
|
|
114
|
-
type: string;
|
|
115
|
-
required: string[];
|
|
116
|
-
additionalProperties: boolean;
|
|
117
|
-
properties: {
|
|
118
|
-
name: {
|
|
119
|
-
type: string;
|
|
120
|
-
enum: import("../..").PixelEventType[];
|
|
121
|
-
};
|
|
122
|
-
data: {};
|
|
123
|
-
};
|
|
124
|
-
select: {
|
|
125
|
-
$data: string;
|
|
126
|
-
};
|
|
127
|
-
selectCases: {
|
|
128
|
-
SubmitApplication: {
|
|
129
|
-
additionalProperties: boolean;
|
|
130
|
-
properties: {
|
|
131
|
-
name: {};
|
|
132
|
-
};
|
|
133
|
-
};
|
|
134
|
-
Contact: {
|
|
135
|
-
additionalProperties: boolean;
|
|
136
|
-
properties: {
|
|
137
|
-
name: {};
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
Lead: {
|
|
141
|
-
additionalProperties: boolean;
|
|
142
|
-
properties: {
|
|
143
|
-
name: {};
|
|
144
|
-
data: {
|
|
145
|
-
type: string;
|
|
146
|
-
additionalProperties: boolean;
|
|
147
|
-
properties: {
|
|
148
|
-
content_category: {
|
|
149
|
-
type: string;
|
|
150
|
-
};
|
|
151
|
-
content_name: {
|
|
152
|
-
type: string;
|
|
153
|
-
};
|
|
154
|
-
currency: {
|
|
155
|
-
type: string;
|
|
156
|
-
};
|
|
157
|
-
value: {
|
|
158
|
-
type: string;
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
};
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
79
|
analyticsEvents: {
|
|
168
80
|
oneOf: ({
|
|
169
81
|
optionName: string;
|
|
@@ -398,6 +310,10 @@ export declare const PriceCardBlock: {
|
|
|
398
310
|
type: string;
|
|
399
311
|
};
|
|
400
312
|
};
|
|
313
|
+
controlPosition: {
|
|
314
|
+
type: string;
|
|
315
|
+
enum: string[];
|
|
316
|
+
};
|
|
401
317
|
border: {
|
|
402
318
|
type: string;
|
|
403
319
|
enum: string[];
|
|
@@ -7,6 +7,8 @@ const CombinedPriceDetailed_1 = tslib_1.__importDefault(require("./CombinedPrice
|
|
|
7
7
|
const PriceDescription_1 = tslib_1.__importDefault(require("./PriceDescription/PriceDescription"));
|
|
8
8
|
const PriceDetails_1 = tslib_1.__importDefault(require("./PriceDetails/PriceDetails"));
|
|
9
9
|
const SeparatePriceDetailed_1 = tslib_1.__importDefault(require("./SeparatePriceDetailed/SeparatePriceDetailed"));
|
|
10
|
+
// eslint-disable-next-line valid-jsdoc
|
|
11
|
+
/** @deprecated */
|
|
10
12
|
const PriceDetailed = (props) => {
|
|
11
13
|
const { priceType = models_1.PriceDetailsType.SETTINGS, items, numberGroupItems = 1, description, details, foldable, labelsDefaultText, isCombined = false, useMixedView = false, border, } = props;
|
|
12
14
|
const { titleSize: descriptionTitleSize = 'l', descriptionSize = 'm', titleColor: descriptionTitleColor = 'cornflower', } = description || {};
|
package/build/cjs/sub-blocks/renderCardFooterControlsContainer/renderCardFooterControlsContainer.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
+
const components_1 = require("../../components");
|
|
6
|
+
const utils_1 = require("../../utils");
|
|
7
|
+
const b = (0, utils_1.block)('card-footer-controls-containe');
|
|
8
|
+
const renderCardFooterControlsContainer = (children) => (react_1.default.createElement(components_1.CardBase.Footer, { className: b() }, children));
|
|
9
|
+
exports.default = renderCardFooterControlsContainer;
|