@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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { useContext, useState } from 'react';
|
|
2
|
+
import { ChevronsExpandUpRight, Xmark } from '@gravity-ui/icons';
|
|
2
3
|
import { Button, Icon, Modal } from '@gravity-ui/uikit';
|
|
3
4
|
import { MobileContext } from '../../context/mobileContext';
|
|
4
|
-
import { Fullscreen, PreviewClose } from '../../icons';
|
|
5
5
|
import { block } from '../../utils';
|
|
6
6
|
import './FullscreenMedia.css';
|
|
7
7
|
const b = block('full-screen-media');
|
|
8
8
|
const FULL_SCREEN_ICON_SIZE = 18;
|
|
9
|
-
const CLOSE_ICON_SIZE =
|
|
9
|
+
const CLOSE_ICON_SIZE = 24;
|
|
10
10
|
const getMediaClass = (type) => b('modal-media', { type });
|
|
11
11
|
const FullscreenMedia = ({ children, showFullscreenIcon = true }) => {
|
|
12
12
|
const [isOpened, setIsOpened] = useState(false);
|
|
@@ -23,18 +23,17 @@ const FullscreenMedia = ({ children, showFullscreenIcon = true }) => {
|
|
|
23
23
|
React.createElement("div", { className: b('media-wrapper'), onClickCapture: openModal },
|
|
24
24
|
children({ className: b('inline-media') }),
|
|
25
25
|
showFullscreenIcon && (React.createElement(Button, { className: b('icon-wrapper'), extraProps: { onClickCapture: openModal }, size: 'l' },
|
|
26
|
-
React.createElement(Icon, { data:
|
|
27
|
-
isOpened && (React.createElement(Modal, { open: isOpened, onClose: closeModal, className: b('modal') },
|
|
28
|
-
React.createElement(
|
|
29
|
-
React.createElement(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}))))));
|
|
26
|
+
React.createElement(Icon, { data: ChevronsExpandUpRight, width: FULL_SCREEN_ICON_SIZE, height: FULL_SCREEN_ICON_SIZE, className: b('icon') })))),
|
|
27
|
+
isOpened && (React.createElement(Modal, { open: isOpened, onClose: closeModal, className: b('modal'), contentClassName: b('modal-content') },
|
|
28
|
+
React.createElement(Button, { className: b('icon-wrapper', { visible: true }), onClick: closeModal, size: 'l' },
|
|
29
|
+
React.createElement(Icon, { data: Xmark, width: CLOSE_ICON_SIZE, height: CLOSE_ICON_SIZE, className: b('icon', { hover: true }) })),
|
|
30
|
+
children({
|
|
31
|
+
imageClassName: getMediaClass('image'),
|
|
32
|
+
videoClassName: getMediaClass('video'),
|
|
33
|
+
youtubeClassName: getMediaClass('youtube'),
|
|
34
|
+
fullscreen: true,
|
|
35
|
+
previewImg: undefined,
|
|
36
|
+
autoplay: true,
|
|
37
|
+
})))));
|
|
39
38
|
};
|
|
40
39
|
export default FullscreenMedia;
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useAnalytics } from '../../hooks';
|
|
3
|
-
import { useMetrika } from '../../hooks/useMetrika';
|
|
4
3
|
import { DefaultEventNames } from '../../models';
|
|
5
4
|
import { block } from '../../utils';
|
|
6
5
|
import './HeaderBreadcrumbs.css';
|
|
7
6
|
const b = block('header-breadcrumbs');
|
|
8
7
|
export default function HeaderBreadcrumbs(props) {
|
|
9
|
-
const { items,
|
|
10
|
-
const handleMetrika = useMetrika();
|
|
8
|
+
const { items, theme = 'light', className, analyticsEvents } = props;
|
|
11
9
|
const handleAnalytics = useAnalytics(DefaultEventNames.Breadcrumb);
|
|
12
10
|
const onClick = useCallback(() => {
|
|
13
|
-
handleAnalytics();
|
|
14
|
-
|
|
15
|
-
}, [handleAnalytics, handleMetrika, metrikaGoals, pixelEvents]);
|
|
11
|
+
handleAnalytics(analyticsEvents);
|
|
12
|
+
}, [analyticsEvents, handleAnalytics]);
|
|
16
13
|
return (React.createElement("div", { className: b({ theme }, className) }, items === null || items === void 0 ? void 0 : items.map((item) => (React.createElement("div", { className: b('item'), key: item.url },
|
|
17
14
|
React.createElement("a", { href: item.url, className: b('text'), onClick: onClick }, item.text))))));
|
|
18
15
|
}
|
|
@@ -44,7 +44,7 @@ unpredictable css rules order in build */
|
|
|
44
44
|
white-space: normal;
|
|
45
45
|
}
|
|
46
46
|
.pc-link-block__link:hover .pc-link-block__arrow {
|
|
47
|
-
transform: translateX(5px)
|
|
47
|
+
transform: translateX(5px);
|
|
48
48
|
}
|
|
49
49
|
.pc-link-block__link.pc-link-block__link_has-arrow.pc-link-block__link_theme_dark:hover {
|
|
50
50
|
color: var(--g-color-text-light-primary);
|
|
@@ -53,7 +53,6 @@ unpredictable css rules order in build */
|
|
|
53
53
|
position: relative;
|
|
54
54
|
top: 2px;
|
|
55
55
|
transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
|
|
56
|
-
transform: rotate(-90deg);
|
|
57
56
|
}
|
|
58
57
|
.pc-link-block_size_l {
|
|
59
58
|
font-size: var(--g-text-body-3-font-size);
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React, { Fragment, useContext } from 'react';
|
|
2
|
+
import { ChevronRight } from '@gravity-ui/icons';
|
|
2
3
|
import { Icon } from '@gravity-ui/uikit';
|
|
3
4
|
import { LocaleContext } from '../../context/localeContext';
|
|
4
5
|
import { LocationContext } from '../../context/locationContext';
|
|
5
6
|
import { useAnalytics } from '../../hooks';
|
|
6
|
-
import { useMetrika } from '../../hooks/useMetrika';
|
|
7
|
-
import { Chevron } from '../../icons';
|
|
8
7
|
import { DefaultEventNames, } from '../../models';
|
|
9
8
|
import { block, getLinkProps, setUrlTld } from '../../utils';
|
|
10
9
|
import { getQaAttrubutes } from '../../utils/index';
|
|
@@ -26,16 +25,14 @@ function getArrowSize(size) {
|
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
const LinkBlock = (props) => {
|
|
29
|
-
const { text, url, arrow,
|
|
28
|
+
const { text, url, arrow, analyticsEvents, theme = 'file-link', colorTheme = 'light', textSize = 'm', className, target, children, tabIndex, qa, urlTitle, extraProps, } = props;
|
|
30
29
|
const qaAttributes = getQaAttrubutes(qa, ['normal']);
|
|
31
|
-
const handleMetrika = useMetrika();
|
|
32
30
|
const handleAnalytics = useAnalytics(DefaultEventNames.Link, url);
|
|
33
31
|
const { hostname } = useContext(LocationContext);
|
|
34
32
|
const { tld } = useContext(LocaleContext);
|
|
35
33
|
const href = setUrlTld(props.url, tld);
|
|
36
34
|
const defaultTextSize = theme === 'back' ? 'l' : 'm';
|
|
37
35
|
const onClick = () => {
|
|
38
|
-
handleMetrika({ metrikaGoals, pixelEvents });
|
|
39
36
|
handleAnalytics(analyticsEvents);
|
|
40
37
|
};
|
|
41
38
|
const getLinkByType = () => {
|
|
@@ -51,7 +48,7 @@ const LinkBlock = (props) => {
|
|
|
51
48
|
return (React.createElement("a", Object.assign({ className: b('link', { theme: colorTheme, 'has-arrow': arrow }), href: href, onClick: onClick, tabIndex: tabIndex, title: urlTitle }, linkProps, { "data-qa": qaAttributes.normal }, extraProps), arrow ? (React.createElement(Fragment, null,
|
|
52
49
|
React.createElement("span", { className: b('content') }, content),
|
|
53
50
|
WORD_JOINER_SYM,
|
|
54
|
-
React.createElement(Icon, { className: b('arrow'), data:
|
|
51
|
+
React.createElement(Icon, { className: b('arrow'), data: ChevronRight, size: getArrowSize(textSize) }))) : (content)));
|
|
55
52
|
}
|
|
56
53
|
default:
|
|
57
54
|
return null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ContentSize, LinkProps } from '../../models';
|
|
3
|
+
import './Links.css';
|
|
4
|
+
type LinksProps = {
|
|
5
|
+
className?: string;
|
|
6
|
+
titleId?: string;
|
|
7
|
+
links?: LinkProps[];
|
|
8
|
+
size?: ContentSize;
|
|
9
|
+
qa?: string;
|
|
10
|
+
linkQa?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const Links: React.FC<LinksProps>;
|
|
13
|
+
export default Links;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { block } from '../../utils';
|
|
3
|
+
import Link from '../Link/Link';
|
|
4
|
+
import './Links.css';
|
|
5
|
+
const b = block('links');
|
|
6
|
+
function getLinkSize(size) {
|
|
7
|
+
switch (size) {
|
|
8
|
+
case 's':
|
|
9
|
+
return 'm';
|
|
10
|
+
case 'l':
|
|
11
|
+
default:
|
|
12
|
+
return 'l';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const Links = ({ className, titleId, links, size = 's', qa, linkQa }) => links ? (React.createElement("div", { className: b({ size }, className), "data-qa": qa }, links === null || links === void 0 ? void 0 : links.map((link) => (React.createElement(Link, Object.assign({ className: b('link') }, link, { textSize: getLinkSize(size), key: link.url, qa: linkQa, extraProps: Object.assign({ 'aria-describedby': link.urlTitle ? undefined : titleId }, link.extraProps) })))))) : null;
|
|
16
|
+
export default Links;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
+
import { Lang } from '@gravity-ui/uikit';
|
|
2
3
|
import debounce from 'lodash/debounce';
|
|
3
4
|
import { LocaleContext } from '../../context/localeContext/localeContext';
|
|
4
5
|
import { MapsContext } from '../../context/mapsContext/mapsContext';
|
|
5
6
|
import { MobileContext } from '../../context/mobileContext';
|
|
6
7
|
import { block } from '../../utils';
|
|
7
|
-
import { Lang } from '../../utils/configure';
|
|
8
8
|
import { getMapHeight } from './helpers';
|
|
9
9
|
const b = block('map');
|
|
10
10
|
function getScriptSrc(params) {
|
|
@@ -9,7 +9,7 @@ import ErrorWrapper from '../../ErrorWrapper/ErrorWrapper';
|
|
|
9
9
|
import { getMapHeight } from '../helpers';
|
|
10
10
|
import { YMap } from './YMap';
|
|
11
11
|
import { MapApiStatus, YMapsApiLoader } from './YandexMapApiLoader';
|
|
12
|
-
import i18n from './i18n';
|
|
12
|
+
import { i18n } from './i18n';
|
|
13
13
|
const b = block('map');
|
|
14
14
|
const DEFAULT_CONTAINER_ID = 'ymap';
|
|
15
15
|
const DEFAULT_ZOOM = 9;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const i18n: (key: "map-load-error" | "map-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}Map`);
|
|
@@ -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}DataLens`);
|
|
@@ -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}Iframe`);
|
|
@@ -9,7 +9,7 @@ import Video from './Video/Video';
|
|
|
9
9
|
import './Media.css';
|
|
10
10
|
const b = block('Media');
|
|
11
11
|
export const Media = (props) => {
|
|
12
|
-
const { image, video, youtube, dataLens, color, height, previewImg, parallax = false,
|
|
12
|
+
const { image, video, youtube, dataLens, color, height, previewImg, parallax = false, fullscreen, analyticsEvents, className, imageClassName, videoClassName, youtubeClassName, playVideo = true, isBackground, playButton, customBarControlsClassName, qa, ratio, autoplay, onImageLoad, iframe, margins, } = props;
|
|
13
13
|
const [hasVideoFallback, setHasVideoFallback] = useState(false);
|
|
14
14
|
const qaAttributes = getQaAttrubutes(qa, 'video');
|
|
15
15
|
const content = useMemo(() => {
|
|
@@ -23,7 +23,6 @@ export const Media = (props) => {
|
|
|
23
23
|
video,
|
|
24
24
|
videoClassName,
|
|
25
25
|
height,
|
|
26
|
-
metrika,
|
|
27
26
|
analyticsEvents,
|
|
28
27
|
playVideo,
|
|
29
28
|
previewImg,
|
|
@@ -66,7 +65,6 @@ export const Media = (props) => {
|
|
|
66
65
|
qaAttributes.video,
|
|
67
66
|
onImageLoad,
|
|
68
67
|
videoClassName,
|
|
69
|
-
metrika,
|
|
70
68
|
analyticsEvents,
|
|
71
69
|
playVideo,
|
|
72
70
|
previewImg,
|
|
@@ -6,7 +6,7 @@ import ReactPlayerBlock from '../../ReactPlayer/ReactPlayer';
|
|
|
6
6
|
import './Video.css';
|
|
7
7
|
const b = block('media-component-video');
|
|
8
8
|
const Video = (props) => {
|
|
9
|
-
const { video, height,
|
|
9
|
+
const { video, height, analyticsEvents, previewImg, playButton: commonPlayButton, customBarControlsClassName, videoClassName, playVideo, setHasVideoFallback, hasVideoFallback, qa, ratio, } = props;
|
|
10
10
|
const qaAttributes = getQaAttrubutes(qa, 'source');
|
|
11
11
|
const ref = useRef(null);
|
|
12
12
|
useEffect(() => {
|
|
@@ -30,7 +30,7 @@ const Video = (props) => {
|
|
|
30
30
|
}, [playVideo, video, setHasVideoFallback]);
|
|
31
31
|
const reactPlayerBlock = useMemo(() => {
|
|
32
32
|
const { src, loop, controls, muted, autoplay = true, elapsedTime, playButton, ariaLabel, customControlsOptions, } = video;
|
|
33
|
-
return (React.createElement(ReactPlayerBlock, { ref: ref, className: b('react-player', videoClassName), src: src, previewImgUrl: previewImg, loop: Boolean(loop), controls: controls, muted: muted, autoplay: autoplay && playVideo, elapsedTime: elapsedTime, playButton: playButton || commonPlayButton, customBarControlsClassName: customBarControlsClassName,
|
|
33
|
+
return (React.createElement(ReactPlayerBlock, { ref: ref, className: b('react-player', videoClassName), src: src, previewImgUrl: previewImg, loop: Boolean(loop), controls: controls, muted: muted, autoplay: autoplay && playVideo, elapsedTime: elapsedTime, playButton: playButton || commonPlayButton, customBarControlsClassName: customBarControlsClassName, analyticsEvents: analyticsEvents, height: height, ariaLabel: ariaLabel, customControlsOptions: customControlsOptions, ratio: ratio }));
|
|
34
34
|
}, [
|
|
35
35
|
video,
|
|
36
36
|
height,
|
|
@@ -39,7 +39,6 @@ const Video = (props) => {
|
|
|
39
39
|
playVideo,
|
|
40
40
|
commonPlayButton,
|
|
41
41
|
customBarControlsClassName,
|
|
42
|
-
metrika,
|
|
43
42
|
analyticsEvents,
|
|
44
43
|
ratio,
|
|
45
44
|
]);
|
|
@@ -2,7 +2,7 @@ import React, { createRef } from 'react';
|
|
|
2
2
|
import debounce from 'lodash/debounce';
|
|
3
3
|
import { ToggleArrow } from '..';
|
|
4
4
|
import { block } from '../../utils';
|
|
5
|
-
import i18n from './i18n';
|
|
5
|
+
import { i18n } from './i18n';
|
|
6
6
|
import './OverflowScroller.css';
|
|
7
7
|
const b = block('overflow-scroller');
|
|
8
8
|
const TRANSITION_TIME = 300;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default _default;
|
|
1
|
+
export declare const i18n: (key: "left" | "right", 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}OverflowScroller`);
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import { Pause, Play, VolumeLow, VolumeXmark } from '@gravity-ui/icons';
|
|
2
|
+
import { Pause, Play, VolumeFill, VolumeLow, VolumeXmark } from '@gravity-ui/icons';
|
|
3
3
|
import { Icon } from '@gravity-ui/uikit';
|
|
4
|
-
import { Mute } from '../../icons/Mute';
|
|
5
|
-
import { Unmute } from '../../icons/Unmute';
|
|
6
4
|
import { CustomControlsType } from '../../models';
|
|
7
5
|
import { block } from '../../utils';
|
|
8
6
|
import CircleProgress from './CircleProgress';
|
|
9
|
-
import i18n from './i18n';
|
|
7
|
+
import { i18n } from './i18n';
|
|
10
8
|
import './CustomBarControls.css';
|
|
11
9
|
const b = block('CustomBarControls');
|
|
12
10
|
const playIconsMap = {
|
|
@@ -18,11 +16,11 @@ const pauseIconsMap = {
|
|
|
18
16
|
[CustomControlsType.WithPlayPauseButton]: Pause,
|
|
19
17
|
};
|
|
20
18
|
const muteIconsMap = {
|
|
21
|
-
[CustomControlsType.WithMuteButton]:
|
|
19
|
+
[CustomControlsType.WithMuteButton]: VolumeFill,
|
|
22
20
|
[CustomControlsType.WithPlayPauseButton]: VolumeLow,
|
|
23
21
|
};
|
|
24
22
|
const unmuteIconsMap = {
|
|
25
|
-
[CustomControlsType.WithMuteButton]:
|
|
23
|
+
[CustomControlsType.WithMuteButton]: VolumeXmark,
|
|
26
24
|
[CustomControlsType.WithPlayPauseButton]: VolumeXmark,
|
|
27
25
|
};
|
|
28
26
|
const CustomBarControls = (props) => {
|
|
@@ -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`);
|