@gravity-ui/page-constructor 4.56.0 → 5.0.1
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/CardBase/CardBase.d.ts +1 -3
- package/build/cjs/components/CardBase/CardBase.js +1 -4
- 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/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/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 +3 -28
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +3 -3
- 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 +0 -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.css +6 -0
- package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +4 -10
- package/build/cjs/sub-blocks/BasicCard/BasicCard.css +7 -0
- package/build/cjs/sub-blocks/BasicCard/BasicCard.js +4 -10
- package/build/cjs/sub-blocks/Content/Content.css +6 -2
- package/build/cjs/sub-blocks/Content/Content.js +3 -10
- 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 +3 -0
- package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +2 -8
- package/build/cjs/sub-blocks/LayoutItem/utils.d.ts +1 -15
- package/build/cjs/sub-blocks/PriceCard/schema.d.ts +0 -88
- 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/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/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/CardBase/CardBase.d.ts +1 -3
- package/build/esm/components/CardBase/CardBase.js +1 -4
- 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/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/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 +3 -28
- package/build/esm/models/constructor-items/sub-blocks.d.ts +3 -3
- 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 +0 -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.css +6 -0
- package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +5 -11
- package/build/esm/sub-blocks/BasicCard/BasicCard.css +7 -0
- package/build/esm/sub-blocks/BasicCard/BasicCard.js +5 -11
- package/build/esm/sub-blocks/Content/Content.css +6 -2
- package/build/esm/sub-blocks/Content/Content.js +4 -11
- 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 +3 -0
- package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +3 -9
- package/build/esm/sub-blocks/LayoutItem/utils.d.ts +1 -15
- package/build/esm/sub-blocks/PriceCard/schema.d.ts +0 -88
- 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/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/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 +3 -28
- package/server/models/constructor-items/sub-blocks.d.ts +3 -3
- 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/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/sub-blocks/renderCardFooterControlsContainer/CardFooterControlsContainer.css +0 -3
- package/build/cjs/sub-blocks/renderCardFooterControlsContainer/renderCardFooterControlsContainer.d.ts +0 -3
- package/build/cjs/sub-blocks/renderCardFooterControlsContainer/renderCardFooterControlsContainer.js +0 -9
- 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/cjs/utils/renderContentControls/ContentControls.css +0 -6
- package/build/cjs/utils/renderContentControls/renderContentControls.d.ts +0 -11
- package/build/cjs/utils/renderContentControls/renderContentControls.js +0 -16
- 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/sub-blocks/renderCardFooterControlsContainer/CardFooterControlsContainer.css +0 -3
- package/build/esm/sub-blocks/renderCardFooterControlsContainer/renderCardFooterControlsContainer.d.ts +0 -3
- package/build/esm/sub-blocks/renderCardFooterControlsContainer/renderCardFooterControlsContainer.js +0 -6
- 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/build/esm/utils/renderContentControls/ContentControls.css +0 -6
- package/build/esm/utils/renderContentControls/renderContentControls.d.ts +0 -12
- package/build/esm/utils/renderContentControls/renderContentControls.js +0 -14
- package/server/utils/configure.d.ts +0 -12
- package/server/utils/configure.js +0 -26
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import React, { Fragment, useCallback, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState, } from 'react';
|
|
2
|
+
import { PlayFill } from '@gravity-ui/icons';
|
|
2
3
|
import { Icon } from '@gravity-ui/uikit';
|
|
3
4
|
import debounce from 'lodash/debounce';
|
|
4
5
|
import ReactPlayer from 'react-player';
|
|
5
|
-
import { MetrikaContext } from '../../context/metrikaContext';
|
|
6
6
|
import { MobileContext } from '../../context/mobileContext';
|
|
7
7
|
import { VideoContext } from '../../context/videoContext';
|
|
8
8
|
import { useAnalytics, useMount } from '../../hooks';
|
|
9
|
-
import { PlayVideo } from '../../icons';
|
|
10
9
|
import { CustomControlsButtonPositioning, CustomControlsType, DefaultEventNames, MediaVideoControlsType, PlayButtonThemes, PlayButtonType, PredefinedEventTypes, } from '../../models';
|
|
11
10
|
import { block } from '../../utils';
|
|
12
11
|
import CustomBarControls from './CustomBarControls';
|
|
13
|
-
import i18n from './i18n';
|
|
12
|
+
import { i18n } from './i18n';
|
|
14
13
|
import { checkYoutubeVideos } from './utils';
|
|
15
14
|
import { isYoutubePlayerInstance } from './utils/youtube';
|
|
16
15
|
import './ReactPlayer.css';
|
|
@@ -19,8 +18,7 @@ const FPS = 60;
|
|
|
19
18
|
// eslint-disable-next-line react/display-name
|
|
20
19
|
export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
|
|
21
20
|
const isMobile = useContext(MobileContext);
|
|
22
|
-
const {
|
|
23
|
-
const { src, previewImgUrl, loop = false, controls = MediaVideoControlsType.Default, customControlsOptions = {}, muted: initiallyMuted = false, elapsedTime, playButton, className, customBarControlsClassName, showPreview, onClickPreview, metrika: videoMetrika, analyticsEvents, height, ariaLabel, ratio, } = props;
|
|
21
|
+
const { src, previewImgUrl, loop = false, controls = MediaVideoControlsType.Default, customControlsOptions = {}, muted: initiallyMuted = false, elapsedTime, playButton, className, customBarControlsClassName, showPreview, onClickPreview, analyticsEvents, height, ariaLabel, ratio, } = props;
|
|
24
22
|
const { type = PlayButtonType.Default, theme = PlayButtonThemes.Blue, text, className: buttonClassName, } = playButton || {};
|
|
25
23
|
const { type: customControlsType = CustomControlsType.WithMuteButton, muteButtonShown, positioning = CustomControlsButtonPositioning.Center, } = customControlsOptions;
|
|
26
24
|
const autoPlay = Boolean(!isMobile && !previewImgUrl && props.autoplay);
|
|
@@ -121,7 +119,7 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
|
|
|
121
119
|
break;
|
|
122
120
|
case PlayButtonType.Default:
|
|
123
121
|
default:
|
|
124
|
-
playButtonContent = React.createElement(Icon, { className: b('icon'), data:
|
|
122
|
+
playButtonContent = React.createElement(Icon, { className: b('icon'), data: PlayFill, size: 24 });
|
|
125
123
|
break;
|
|
126
124
|
}
|
|
127
125
|
return (React.createElement("button", { className: b('button', { theme, text: Boolean(text) }, buttonClassName), "aria-label": i18n('play') }, playButtonContent));
|
|
@@ -133,13 +131,6 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
|
|
|
133
131
|
playerRef.seekTo(0);
|
|
134
132
|
setPlayedPercent(0);
|
|
135
133
|
}
|
|
136
|
-
if (metrika && videoMetrika) {
|
|
137
|
-
const { play, stop, counterName } = videoMetrika;
|
|
138
|
-
const goal = isMuted ? play : stop;
|
|
139
|
-
if (goal) {
|
|
140
|
-
metrika.reachGoals(goal, counterName);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
134
|
const events = isMuted ? playEvents : stopEvents;
|
|
144
135
|
handleAnalytics(events);
|
|
145
136
|
if (isMuted) {
|
|
@@ -147,27 +138,12 @@ export const ReactPlayerBlock = React.forwardRef((props, originRef) => {
|
|
|
147
138
|
}
|
|
148
139
|
// In order to the progress bar to update (equals 0) before displaying
|
|
149
140
|
setTimeout(() => setMuted(!isMuted), 0);
|
|
150
|
-
}, [
|
|
151
|
-
playerRef,
|
|
152
|
-
customControlsType,
|
|
153
|
-
metrika,
|
|
154
|
-
videoMetrika,
|
|
155
|
-
playEvents,
|
|
156
|
-
stopEvents,
|
|
157
|
-
handleAnalytics,
|
|
158
|
-
setProps,
|
|
159
|
-
]);
|
|
141
|
+
}, [playerRef, customControlsType, playEvents, stopEvents, handleAnalytics, setProps]);
|
|
160
142
|
const handleClickPreview = useCallback(() => {
|
|
161
143
|
setIsPlaying(true);
|
|
162
144
|
onClickPreview === null || onClickPreview === void 0 ? void 0 : onClickPreview();
|
|
163
|
-
if (metrika && videoMetrika) {
|
|
164
|
-
const { play, counterName } = videoMetrika;
|
|
165
|
-
if (play) {
|
|
166
|
-
metrika.reachGoals(play, counterName);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
145
|
handleAnalytics(playEvents);
|
|
170
|
-
}, [onClickPreview,
|
|
146
|
+
}, [onClickPreview, handleAnalytics, playEvents]);
|
|
171
147
|
const onPause = useCallback(() => {
|
|
172
148
|
// For support correct state for youtube
|
|
173
149
|
if (controls !== MediaVideoControlsType.Custom ||
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const i18n: (key: "play" | "pause" | "mute" | "unmute", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addComponentKeysets } from '@gravity-ui/uikit/i18n';
|
|
2
|
+
import { NAMESPACE } from '../../../utils/cn';
|
|
2
3
|
import en from './en.json';
|
|
3
4
|
import ru from './ru.json';
|
|
4
|
-
const
|
|
5
|
-
export default registerKeyset({ en, ru }, COMPONENT);
|
|
5
|
+
export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}ReactPlayer`);
|
|
@@ -56,6 +56,12 @@ unpredictable css rules order in build */
|
|
|
56
56
|
.pc-table__marker_type_disk.pc-table__marker_index_2 {
|
|
57
57
|
border: 1px solid var(--g-color-text-hint);
|
|
58
58
|
}
|
|
59
|
+
.pc-table__marker_tick {
|
|
60
|
+
color: var(--g-color-base-generic-medium);
|
|
61
|
+
}
|
|
62
|
+
.pc-table__marker_tick_check {
|
|
63
|
+
color: var(--g-color-base-brand);
|
|
64
|
+
}
|
|
59
65
|
.pc-table__legend {
|
|
60
66
|
display: flex;
|
|
61
67
|
margin-top: 20px;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { Check, Minus } from '@gravity-ui/icons';
|
|
2
3
|
import { Icon } from '@gravity-ui/uikit';
|
|
3
4
|
import { HTML, YFMWrapper } from '../';
|
|
4
|
-
import { Minus, Tick } from '../../icons';
|
|
5
5
|
import { block } from '../../utils';
|
|
6
6
|
import './Table.css';
|
|
7
7
|
function getMarkerId(index) {
|
|
@@ -26,7 +26,7 @@ export default class Table extends React.Component {
|
|
|
26
26
|
return (React.createElement("div", { className: b('table'), role: 'rowgroup' }, content.map((row, i) => (React.createElement("div", { key: i, className: b('row'), role: 'row' }, row.map((cell, j) => (React.createElement("div", { key: j, className: b('cell', { justify: justify[j] }), role: 'cell' }, legend && i && j ? (this.renderMarker(marker, cell)) : (React.createElement(HTML, null, cell))))))))));
|
|
27
27
|
}
|
|
28
28
|
renderMarker(type, cell) {
|
|
29
|
-
return (React.createElement("div", { "aria-labelledby": getMarkerId(Number(cell)), className: b('marker', { type, index: String(cell) }) }, type === 'tick' ? React.createElement(Icon, { data: Number(cell) === 1 ?
|
|
29
|
+
return (React.createElement("div", { "aria-labelledby": getMarkerId(Number(cell)), className: b('marker', { type, index: String(cell) }) }, type === 'tick' ? (React.createElement(Icon, { size: 20, className: b('marker_tick', { check: Number(cell) === 1 }), data: Number(cell) === 1 ? Check : Minus })) : null));
|
|
30
30
|
}
|
|
31
31
|
renderLegend(legend, marker) {
|
|
32
32
|
return (React.createElement("div", { className: b('legend') }, legend.map((item, index) => (React.createElement("div", { key: item, className: b('legend-item') },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { block } from '../../utils';
|
|
3
|
-
import i18n from './i18n';
|
|
3
|
+
import { i18n } from './i18n';
|
|
4
4
|
import './UnpublishedLabel.css';
|
|
5
5
|
const b = block('unpublished-label');
|
|
6
6
|
const UnpublishedLabel = ({ className, children, type = 'line', }) => (React.createElement("div", { className: b({ type }, className) }, children || i18n('label_non_published')));
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const i18n: (key: "label_non_published", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addComponentKeysets } from '@gravity-ui/uikit/i18n';
|
|
2
|
+
import { NAMESPACE } from '../../../utils/cn';
|
|
2
3
|
import en from './en.json';
|
|
3
4
|
import ru from './ru.json';
|
|
4
|
-
const
|
|
5
|
-
export default registerKeyset({ en, ru }, COMPONENT);
|
|
5
|
+
export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}UnpublishedLabel`);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { PlayFill } from '@gravity-ui/icons';
|
|
2
3
|
import { Icon } from '@gravity-ui/uikit';
|
|
3
4
|
import debounce from 'lodash/debounce';
|
|
4
5
|
import { v4 as uuidv4 } from 'uuid';
|
|
5
6
|
import { useAnalytics } from '../../hooks/useAnalytics';
|
|
6
|
-
import { PlayVideo } from '../../icons';
|
|
7
7
|
import { DefaultEventNames } from '../../models/common';
|
|
8
8
|
import { block, getPageSearchParams } from '../../utils';
|
|
9
9
|
import Image from '../Image/Image';
|
|
10
|
-
import i18n from './i18n';
|
|
10
|
+
import { i18n } from './i18n';
|
|
11
11
|
import './VideoBlock.css';
|
|
12
12
|
const RECORD_URL = 'https://www.youtube.com/embed/';
|
|
13
13
|
const STREAM_URL = 'https://www.youtube.com/embed/live_stream?channel=';
|
|
@@ -93,6 +93,6 @@ const VideoBlock = (props) => {
|
|
|
93
93
|
return (React.createElement("div", { className: b(null, className), ref: ref, style: { height: currentHeight } }, previewImg && !hidePreview && !fullscreen && (React.createElement("div", { className: b('preview'), onClick: onPreviewClick },
|
|
94
94
|
React.createElement(Image, { src: previewImg, className: b('image'), containerClassName: b('image-wrapper'), onLoad: onImageLoad }),
|
|
95
95
|
playButton || (React.createElement("button", { title: "Play", className: b('button') },
|
|
96
|
-
React.createElement(Icon, { className: b('icon'), data:
|
|
96
|
+
React.createElement(Icon, { className: b('icon'), data: PlayFill, size: 24 })))))));
|
|
97
97
|
};
|
|
98
98
|
export default VideoBlock;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const i18n: (key: "iframe-title", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addComponentKeysets } from '@gravity-ui/uikit/i18n';
|
|
2
|
+
import { NAMESPACE } from '../../../utils/cn';
|
|
2
3
|
import en from './en.json';
|
|
3
4
|
import ru from './ru.json';
|
|
4
|
-
const
|
|
5
|
-
export default registerKeyset({ en, ru }, COMPONENT);
|
|
5
|
+
export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}VideoBlock`);
|
|
@@ -2,7 +2,6 @@ import React, { useCallback, useContext, useEffect, useRef } from 'react';
|
|
|
2
2
|
import { LocaleContext } from '../../context/localeContext';
|
|
3
3
|
import { MobileContext } from '../../context/mobileContext';
|
|
4
4
|
import { useAnalytics } from '../../hooks';
|
|
5
|
-
import { useMetrika } from '../../hooks/useMetrika';
|
|
6
5
|
import { DefaultEventNames } from '../../models/common';
|
|
7
6
|
import { block } from '../../utils';
|
|
8
7
|
import { HEADER_HEIGHT } from '../constants';
|
|
@@ -11,12 +10,11 @@ export const YANDEX_FORM_SECTION = 'surveys';
|
|
|
11
10
|
const CONTAINER_ID = 'pc-yandex-form-container';
|
|
12
11
|
const b = block('yandex-form');
|
|
13
12
|
const YandexForm = (props) => {
|
|
14
|
-
const { onLoad, id, params, className, theme, containerId = CONTAINER_ID, headerHeight = HEADER_HEIGHT, onSubmit,
|
|
13
|
+
const { onLoad, id, params, className, theme, containerId = CONTAINER_ID, headerHeight = HEADER_HEIGHT, onSubmit, analyticsEvents, customFormOrigin, customFormSection, } = props;
|
|
15
14
|
const formContainerRef = useRef(null);
|
|
16
15
|
const iframeRef = useRef();
|
|
17
16
|
const yaFormOrigin = customFormOrigin || YANDEX_FORM_ORIGIN;
|
|
18
17
|
const yaFormSection = customFormSection || YANDEX_FORM_SECTION;
|
|
19
|
-
const handleMetrika = useMetrika();
|
|
20
18
|
const handleAnalytics = useAnalytics(DefaultEventNames.YandexFormSubmit);
|
|
21
19
|
const isMobile = useContext(MobileContext);
|
|
22
20
|
const locale = useContext(LocaleContext);
|
|
@@ -58,20 +56,11 @@ const YandexForm = (props) => {
|
|
|
58
56
|
const { top } = formContainerRef.current.getBoundingClientRect();
|
|
59
57
|
window.scrollBy(0, top - headerHeight);
|
|
60
58
|
}
|
|
61
|
-
handleMetrika({ metrikaGoals, pixelEvents });
|
|
62
59
|
handleAnalytics(analyticsEvents);
|
|
63
60
|
if (onSubmit) {
|
|
64
61
|
onSubmit();
|
|
65
62
|
}
|
|
66
|
-
}, [
|
|
67
|
-
handleMetrika,
|
|
68
|
-
metrikaGoals,
|
|
69
|
-
pixelEvents,
|
|
70
|
-
handleAnalytics,
|
|
71
|
-
analyticsEvents,
|
|
72
|
-
onSubmit,
|
|
73
|
-
headerHeight,
|
|
74
|
-
]);
|
|
63
|
+
}, [handleAnalytics, analyticsEvents, onSubmit, headerHeight]);
|
|
75
64
|
const handleMessage = useCallback(({ origin, data }) => {
|
|
76
65
|
if (origin !== yaFormOrigin) {
|
|
77
66
|
return;
|
|
@@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useState } from 'react';
|
|
|
2
2
|
import { Spin } from '@gravity-ui/uikit';
|
|
3
3
|
import ErrorWrapper from '../../components/ErrorWrapper/ErrorWrapper';
|
|
4
4
|
import { block as blockCn } from '../../utils/cn';
|
|
5
|
-
import i18n from './i18n';
|
|
5
|
+
import { i18n } from './i18n';
|
|
6
6
|
import './Loadable.css';
|
|
7
7
|
const b = blockCn('loadable-block');
|
|
8
8
|
const initData = {
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const i18n: (key: "loadable-load-error" | "loadable-try-again", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addComponentKeysets } from '@gravity-ui/uikit/i18n';
|
|
2
|
+
import { NAMESPACE } from '../../../utils/cn';
|
|
2
3
|
import en from './en.json';
|
|
3
4
|
import ru from './ru.json';
|
|
4
|
-
const
|
|
5
|
-
export default registerKeyset({ en, ru }, COMPONENT);
|
|
5
|
+
export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}Loadable`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import '@
|
|
2
|
+
import '@diplodoc/transform/dist/js/yfm';
|
|
3
3
|
import { blockMap, navItemMap, subBlockMap } from '../../constructor-items';
|
|
4
4
|
import { CustomConfig, CustomItems, NavigationData, PageContent, ShouldRenderBlock } from '../../models';
|
|
5
5
|
import './PageConstructor.css';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
|
-
import '@
|
|
3
|
+
import '@diplodoc/transform/dist/js/yfm';
|
|
4
4
|
import BackgroundMedia from '../../components/BackgroundMedia/BackgroundMedia';
|
|
5
5
|
import RootCn from '../../components/RootCn';
|
|
6
6
|
import { blockMap, navItemMap, subBlockMap } from '../../constructor-items';
|
|
@@ -3,7 +3,6 @@ import { ImageContextProps } from '../../context/imageContext';
|
|
|
3
3
|
import { LocaleContextProps } from '../../context/localeContext';
|
|
4
4
|
import { LocationContextProps } from '../../context/locationContext';
|
|
5
5
|
import { MapsContextType } from '../../context/mapsContext/mapsContext';
|
|
6
|
-
import { MetrikaContextProps } from '../../context/metrikaContext';
|
|
7
6
|
import { ProjectSettingsContextProps } from '../../context/projectSettingsContext';
|
|
8
7
|
import { SSRContextProps } from '../../context/ssrContext';
|
|
9
8
|
import { Theme, WithChildren } from '../../models';
|
|
@@ -11,7 +10,6 @@ export interface PageConstructorProviderProps {
|
|
|
11
10
|
isMobile?: boolean;
|
|
12
11
|
locale?: LocaleContextProps;
|
|
13
12
|
location?: LocationContextProps;
|
|
14
|
-
metrika?: MetrikaContextProps;
|
|
15
13
|
ssrConfig?: SSRContextProps;
|
|
16
14
|
theme?: Theme;
|
|
17
15
|
mapsContext?: MapsContextType;
|
|
@@ -5,13 +5,12 @@ import { ImageContext } from '../../context/imageContext';
|
|
|
5
5
|
import { LocaleContext } from '../../context/localeContext';
|
|
6
6
|
import { LocationContext } from '../../context/locationContext';
|
|
7
7
|
import { MapsContext, initialMapValue } from '../../context/mapsContext/mapsContext';
|
|
8
|
-
import { MetrikaContext } from '../../context/metrikaContext';
|
|
9
8
|
import { MobileContext } from '../../context/mobileContext';
|
|
10
9
|
import { ProjectSettingsContext, } from '../../context/projectSettingsContext';
|
|
11
10
|
import { SSRContext } from '../../context/ssrContext';
|
|
12
11
|
import { ThemeContext } from '../../context/theme';
|
|
13
12
|
export const PageConstructorProvider = (props) => {
|
|
14
|
-
const { isMobile, mapsContext = initialMapValue, locale = {}, location = {},
|
|
13
|
+
const { isMobile, mapsContext = initialMapValue, locale = {}, location = {}, analytics = {}, ssrConfig = {}, projectSettings = {}, theme = DEFAULT_THEME, children, image = {}, } = props;
|
|
15
14
|
/* eslint-disable react/jsx-key */
|
|
16
15
|
const context = [
|
|
17
16
|
React.createElement(ThemeContext.Provider, { value: { theme } }),
|
|
@@ -21,7 +20,6 @@ export const PageConstructorProvider = (props) => {
|
|
|
21
20
|
React.createElement(LocationContext.Provider, { value: location }),
|
|
22
21
|
React.createElement(MobileContext.Provider, { value: Boolean(isMobile) }),
|
|
23
22
|
React.createElement(MapsContext.Provider, { value: mapsContext }),
|
|
24
|
-
React.createElement(MetrikaContext.Provider, { value: metrika }),
|
|
25
23
|
React.createElement(AnalyticsContext.Provider, { value: analytics }),
|
|
26
24
|
React.createElement(SSRContext.Provider, { value: { isServer: ssrConfig === null || ssrConfig === void 0 ? void 0 : ssrConfig.isServer } }),
|
|
27
25
|
].reduceRight((prev, provider) => React.cloneElement(provider, {}, prev), children);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Lang } from '
|
|
2
|
+
import { Lang } from '@gravity-ui/uikit';
|
|
3
3
|
export type LocaleContextProps = {
|
|
4
|
-
lang?: Lang
|
|
4
|
+
lang?: `${Lang}`;
|
|
5
5
|
tld?: string;
|
|
6
6
|
};
|
|
7
7
|
export declare const LocaleContext: React.Context<LocaleContextProps>;
|
|
@@ -5,7 +5,7 @@ import { Theme, themeNames } from '../../../models';
|
|
|
5
5
|
import { block } from '../../../utils';
|
|
6
6
|
import { Tablet } from '../../icons/Tablet';
|
|
7
7
|
import { ViewModeItem } from '../../types';
|
|
8
|
-
import i18n from './i18n';
|
|
8
|
+
import { i18n } from './i18n';
|
|
9
9
|
import './ControlPanel.css';
|
|
10
10
|
const ICON_SIZE = 14;
|
|
11
11
|
const b = block('control-panel');
|
|
@@ -27,7 +27,7 @@ const ControlPanel = ({ viewMode = ViewModeItem.Edititng, onViewModeChange, clas
|
|
|
27
27
|
React.createElement(Icon, { width: ICON_SIZE, height: ICON_SIZE }))));
|
|
28
28
|
}))),
|
|
29
29
|
React.createElement("div", { className: b('theme-switch') },
|
|
30
|
-
React.createElement("span", null, i18n('
|
|
30
|
+
React.createElement("span", null, i18n('theme')),
|
|
31
31
|
React.createElement(Select, { value: [theme], onUpdate: (value) => onThemeChange(value[0]) }, Object.values(Theme).map((item) => (React.createElement(Select.Option, { key: item, value: item }, themeNames[item])))))));
|
|
32
32
|
};
|
|
33
33
|
export default ControlPanel;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const i18n: (key: "theme" | "mode", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addComponentKeysets } from '@gravity-ui/uikit/i18n';
|
|
2
|
+
import { NAMESPACE } from '../../../../utils/cn';
|
|
2
3
|
import en from './en.json';
|
|
3
4
|
import ru from './ru.json';
|
|
4
|
-
const
|
|
5
|
-
export default registerKeyset({ en, ru }, COMPONENT);
|
|
5
|
+
export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}ControlPanel`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { block } from '../../../utils';
|
|
3
3
|
import { getBlockId } from '../../utils';
|
|
4
|
-
import i18n from './i18n';
|
|
4
|
+
import { i18n } from './i18n';
|
|
5
5
|
import './ErrorBoundary.css';
|
|
6
6
|
const b = block('error-boundary');
|
|
7
7
|
export class ErrorBoundary extends React.Component {
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const i18n: (key: "error-block-header" | "error-page-header", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addComponentKeysets } from '@gravity-ui/uikit/i18n';
|
|
2
|
+
import { NAMESPACE } from '../../../../utils/cn';
|
|
2
3
|
import en from './en.json';
|
|
3
4
|
import ru from './ru.json';
|
|
4
|
-
const
|
|
5
|
-
export default registerKeyset({ en, ru }, COMPONENT);
|
|
5
|
+
export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}ErrorBoundary`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Fragment } from 'react';
|
|
2
2
|
import { BlockBase } from '../../../components';
|
|
3
3
|
import { block } from '../../../utils';
|
|
4
|
-
import i18n from './i18n';
|
|
4
|
+
import { i18n } from './i18n';
|
|
5
5
|
import './NotFoundBlock.css';
|
|
6
6
|
const b = block('not-found-block');
|
|
7
7
|
export const NotFoundBlock = ({ type, children }) => children ? (React.createElement(Fragment, null, children)) : (React.createElement(BlockBase, null,
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const i18n: (key: "message", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addComponentKeysets } from '@gravity-ui/uikit/i18n';
|
|
2
|
+
import { NAMESPACE } from '../../../../utils/cn';
|
|
2
3
|
import en from './en.json';
|
|
3
4
|
import ru from './ru.json';
|
|
4
|
-
const
|
|
5
|
-
export default registerKeyset({ en, ru }, COMPONENT);
|
|
5
|
+
export const i18n = addComponentKeysets({ en, ru }, `${NAMESPACE}NotFoundBlock`);
|
|
@@ -42,7 +42,7 @@ unpredictable css rules order in build */
|
|
|
42
42
|
line-height: var(--header-line-height);
|
|
43
43
|
}
|
|
44
44
|
.pc-editor-form .df-simple-vertical-accordeon__header .yc-button {
|
|
45
|
-
--
|
|
45
|
+
--g-button-height: var(--button-height);
|
|
46
46
|
display: flex;
|
|
47
47
|
justify-content: center;
|
|
48
48
|
align-items: center;
|
|
@@ -6,7 +6,7 @@ export interface UseOneOfParams {
|
|
|
6
6
|
export declare const getSpecTypeDefaultValue: (type: SpecTypes) => {} | undefined;
|
|
7
7
|
export declare const useOneOf: ({ props, onTogglerChange }: UseOneOfParams) => {
|
|
8
8
|
oneOfValue: string;
|
|
9
|
-
specProperties: Record<string, Spec
|
|
9
|
+
specProperties: Record<string, Spec<any, undefined, undefined>>;
|
|
10
10
|
toggler: JSX.Element;
|
|
11
11
|
togglerInput: JSX.Element;
|
|
12
12
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const useAnalytics: (name?: string, target?: string) => (e?:
|
|
1
|
+
import { AnalyticsEventsProp } from '../models';
|
|
2
|
+
export declare const useAnalytics: (name?: string, target?: string) => (e?: AnalyticsEventsProp | null, additionalContext?: Record<string, string>) => void;
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated Metrika will be deleted
|
|
4
|
-
*/
|
|
5
|
-
type UseMetrikaProps = {
|
|
6
|
-
metrikaGoals?: MetrikaGoal;
|
|
7
|
-
pixelEvents?: string | string[] | PixelEvent | PixelEvent[] | ButtonPixel;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated useMetrika will be deleted
|
|
11
|
-
*/
|
|
12
|
-
export declare const useMetrika: () => ({ metrikaGoals, pixelEvents }: UseMetrikaProps) => void;
|
|
13
|
-
export {};
|
|
1
|
+
|
|
@@ -1,38 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { MetrikaContext } from '../context/metrikaContext';
|
|
3
|
-
import { isNewMetrikaFormat } from '../models/guards';
|
|
4
|
-
// eslint-disable-next-line valid-jsdoc
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated Metrika will be deleted, which uses this logic
|
|
7
|
-
*/
|
|
8
|
-
function isButtonPixel(pixelEvents) {
|
|
9
|
-
if (Array.isArray(pixelEvents) && pixelEvents.length && 'name' in pixelEvents) {
|
|
10
|
-
return true;
|
|
11
|
-
}
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
// eslint-disable-next-line valid-jsdoc
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated useMetrika will be deleted
|
|
17
|
-
*/
|
|
18
|
-
export const useMetrika = () => {
|
|
19
|
-
const { metrika, pixel } = useContext(MetrikaContext);
|
|
20
|
-
return ({ metrikaGoals, pixelEvents }) => {
|
|
21
|
-
if (metrika && metrikaGoals) {
|
|
22
|
-
if (isNewMetrikaFormat(metrikaGoals)) {
|
|
23
|
-
metrikaGoals.forEach(({ name, isCrossSite }) => metrika.reachGoal(isCrossSite ? 'cross-site' : 'main', name));
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
metrika.reachGoals(metrikaGoals);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
if (pixel && pixelEvents) {
|
|
30
|
-
if (isButtonPixel(pixelEvents)) {
|
|
31
|
-
pixelEvents.forEach(({ name, data }) => pixel.trackStandard(name, data));
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
pixel.track(pixelEvents);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
};
|
|
1
|
+
"use strict";
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
export * from './ArrowConstructor';
|
|
2
|
-
export * from './ArrowSidebar';
|
|
3
1
|
export * from './Chevron';
|
|
4
|
-
export * from './Fullscreen';
|
|
5
2
|
export * from './Github';
|
|
6
3
|
export * from './NavigationChevron';
|
|
7
|
-
export * from './PlayVideo';
|
|
8
|
-
export * from './PreviewClose';
|
|
9
|
-
export * from './NavigationClose';
|
|
10
|
-
export * from './NavigationOpen';
|
|
11
4
|
export * from './NavigationArrow';
|
|
12
|
-
export * from './Tick';
|
|
13
|
-
export * from './Minus';
|
package/build/esm/icons/index.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
export * from './ArrowConstructor';
|
|
2
|
-
export * from './ArrowSidebar';
|
|
3
1
|
export * from './Chevron';
|
|
4
|
-
export * from './Fullscreen';
|
|
5
2
|
export * from './Github';
|
|
6
3
|
export * from './NavigationChevron';
|
|
7
|
-
export * from './PlayVideo';
|
|
8
|
-
export * from './PreviewClose';
|
|
9
|
-
export * from './NavigationClose';
|
|
10
|
-
export * from './NavigationOpen';
|
|
11
4
|
export * from './NavigationArrow';
|
|
12
|
-
export * from './Tick';
|
|
13
|
-
export * from './Minus';
|
package/build/esm/index.d.ts
CHANGED