@gravity-ui/page-constructor 4.56.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/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/HubspotForm/HubspotForm.css +0 -1
- package/build/cjs/sub-blocks/HubspotForm/index.js +1 -6
- 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/HubspotForm/HubspotForm.css +0 -1
- package/build/esm/sub-blocks/HubspotForm/index.js +1 -6
- 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/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/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,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,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.i18n = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
|
-
const
|
|
5
|
+
const i18n_1 = require("@gravity-ui/uikit/i18n");
|
|
6
|
+
const cn_1 = require("../../../../utils/cn");
|
|
5
7
|
const en_json_1 = tslib_1.__importDefault(require("./en.json"));
|
|
6
8
|
const ru_json_1 = tslib_1.__importDefault(require("./ru.json"));
|
|
7
|
-
|
|
8
|
-
exports.default = (0, registerKeyset_1.registerKeyset)({ en: en_json_1.default, ru: ru_json_1.default }, COMPONENT);
|
|
9
|
+
exports.i18n = (0, i18n_1.addComponentKeysets)({ en: en_json_1.default, ru: ru_json_1.default }, `${cn_1.NAMESPACE}DataLens`);
|
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
5
|
const utils_1 = require("../../../utils");
|
|
6
|
-
const i18n_1 =
|
|
6
|
+
const i18n_1 = require("./i18n");
|
|
7
7
|
const b = (0, utils_1.block)('media-component-iframe');
|
|
8
8
|
const Iframe = (props) => {
|
|
9
9
|
const { iframe, margins = true } = props;
|
|
10
10
|
const { height = 400, src, width, name, title } = iframe;
|
|
11
11
|
return iframe ? (react_1.default.createElement("div", { className: b({ margins }), style: { height } },
|
|
12
|
-
react_1.default.createElement("iframe", { className: b('item'), loading: "lazy", title: title || (0, i18n_1.
|
|
12
|
+
react_1.default.createElement("iframe", { className: b('item'), loading: "lazy", title: title || (0, i18n_1.i18n)('iframe-title'), frameBorder: 0, src: src, width: width, height: height, name: name }))) : null;
|
|
13
13
|
};
|
|
14
14
|
exports.default = Iframe;
|
|
@@ -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,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.i18n = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
|
-
const
|
|
5
|
+
const i18n_1 = require("@gravity-ui/uikit/i18n");
|
|
6
|
+
const cn_1 = require("../../../../utils/cn");
|
|
5
7
|
const en_json_1 = tslib_1.__importDefault(require("./en.json"));
|
|
6
8
|
const ru_json_1 = tslib_1.__importDefault(require("./ru.json"));
|
|
7
|
-
|
|
8
|
-
exports.default = (0, registerKeyset_1.registerKeyset)({ en: en_json_1.default, ru: ru_json_1.default }, COMPONENT);
|
|
9
|
+
exports.i18n = (0, i18n_1.addComponentKeysets)({ en: en_json_1.default, ru: ru_json_1.default }, `${cn_1.NAMESPACE}Iframe`);
|
|
@@ -12,7 +12,7 @@ const Image_1 = tslib_1.__importDefault(require("./Image/Image"));
|
|
|
12
12
|
const Video_1 = tslib_1.__importDefault(require("./Video/Video"));
|
|
13
13
|
const b = (0, utils_1.block)('Media');
|
|
14
14
|
const Media = (props) => {
|
|
15
|
-
const { image, video, youtube, dataLens, color, height, previewImg, parallax = false,
|
|
15
|
+
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;
|
|
16
16
|
const [hasVideoFallback, setHasVideoFallback] = (0, react_1.useState)(false);
|
|
17
17
|
const qaAttributes = (0, utils_1.getQaAttrubutes)(qa, 'video');
|
|
18
18
|
const content = (0, react_1.useMemo)(() => {
|
|
@@ -26,7 +26,6 @@ const Media = (props) => {
|
|
|
26
26
|
video,
|
|
27
27
|
videoClassName,
|
|
28
28
|
height,
|
|
29
|
-
metrika,
|
|
30
29
|
analyticsEvents,
|
|
31
30
|
playVideo,
|
|
32
31
|
previewImg,
|
|
@@ -69,7 +68,6 @@ const Media = (props) => {
|
|
|
69
68
|
qaAttributes.video,
|
|
70
69
|
onImageLoad,
|
|
71
70
|
videoClassName,
|
|
72
|
-
metrika,
|
|
73
71
|
analyticsEvents,
|
|
74
72
|
playVideo,
|
|
75
73
|
previewImg,
|
|
@@ -8,7 +8,7 @@ const DefaultVideo_1 = require("../../DefaultVideo/DefaultVideo");
|
|
|
8
8
|
const ReactPlayer_1 = tslib_1.__importDefault(require("../../ReactPlayer/ReactPlayer"));
|
|
9
9
|
const b = (0, utils_1.block)('media-component-video');
|
|
10
10
|
const Video = (props) => {
|
|
11
|
-
const { video, height,
|
|
11
|
+
const { video, height, analyticsEvents, previewImg, playButton: commonPlayButton, customBarControlsClassName, videoClassName, playVideo, setHasVideoFallback, hasVideoFallback, qa, ratio, } = props;
|
|
12
12
|
const qaAttributes = (0, utils_1.getQaAttrubutes)(qa, 'source');
|
|
13
13
|
const ref = (0, react_1.useRef)(null);
|
|
14
14
|
(0, react_1.useEffect)(() => {
|
|
@@ -32,7 +32,7 @@ const Video = (props) => {
|
|
|
32
32
|
}, [playVideo, video, setHasVideoFallback]);
|
|
33
33
|
const reactPlayerBlock = (0, react_1.useMemo)(() => {
|
|
34
34
|
const { src, loop, controls, muted, autoplay = true, elapsedTime, playButton, ariaLabel, customControlsOptions, } = video;
|
|
35
|
-
return (react_1.default.createElement(ReactPlayer_1.default, { 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,
|
|
35
|
+
return (react_1.default.createElement(ReactPlayer_1.default, { 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 }));
|
|
36
36
|
}, [
|
|
37
37
|
video,
|
|
38
38
|
height,
|
|
@@ -41,7 +41,6 @@ const Video = (props) => {
|
|
|
41
41
|
playVideo,
|
|
42
42
|
commonPlayButton,
|
|
43
43
|
customBarControlsClassName,
|
|
44
|
-
metrika,
|
|
45
44
|
analyticsEvents,
|
|
46
45
|
ratio,
|
|
47
46
|
]);
|
|
@@ -5,7 +5,7 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
5
5
|
const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
|
|
6
6
|
const __1 = require("..");
|
|
7
7
|
const utils_1 = require("../../utils");
|
|
8
|
-
const i18n_1 =
|
|
8
|
+
const i18n_1 = require("./i18n");
|
|
9
9
|
const b = (0, utils_1.block)('overflow-scroller');
|
|
10
10
|
const TRANSITION_TIME = 300;
|
|
11
11
|
const PADDING_SIZE = 24;
|
|
@@ -85,7 +85,7 @@ class OverflowScroller extends react_1.default.Component {
|
|
|
85
85
|
}) },
|
|
86
86
|
react_1.default.createElement("div", { className: b(null, className), ref: this.containerRef },
|
|
87
87
|
react_1.default.createElement("div", { className: b('wrapper'), style: wrapperStyle, ref: this.wrapperRef }, children)),
|
|
88
|
-
arrows.map((direction) => (react_1.default.createElement("button", { key: direction, className: b('arrow', { type: direction }, arrowClassName), onClick: (e) => this.handleScrollClick(e, direction), "aria-label": (0, i18n_1.
|
|
88
|
+
arrows.map((direction) => (react_1.default.createElement("button", { key: direction, className: b('arrow', { type: direction }, arrowClassName), onClick: (e) => this.handleScrollClick(e, direction), "aria-label": (0, i18n_1.i18n)(direction) },
|
|
89
89
|
react_1.default.createElement(__1.ToggleArrow, { size: arrowSize, type: 'horizontal', iconType: "navigation" }))))));
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -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,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.i18n = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
|
-
const
|
|
5
|
+
const i18n_1 = require("@gravity-ui/uikit/i18n");
|
|
6
|
+
const cn_1 = require("../../../utils/cn");
|
|
5
7
|
const en_json_1 = tslib_1.__importDefault(require("./en.json"));
|
|
6
8
|
const ru_json_1 = tslib_1.__importDefault(require("./ru.json"));
|
|
7
|
-
|
|
8
|
-
exports.default = (0, registerKeyset_1.registerKeyset)({ en: en_json_1.default, ru: ru_json_1.default }, COMPONENT);
|
|
9
|
+
exports.i18n = (0, i18n_1.addComponentKeysets)({ en: en_json_1.default, ru: ru_json_1.default }, `${cn_1.NAMESPACE}OverflowScroller`);
|
|
@@ -4,12 +4,10 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
5
|
const icons_1 = require("@gravity-ui/icons");
|
|
6
6
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
7
|
-
const Mute_1 = require("../../icons/Mute");
|
|
8
|
-
const Unmute_1 = require("../../icons/Unmute");
|
|
9
7
|
const models_1 = require("../../models");
|
|
10
8
|
const utils_1 = require("../../utils");
|
|
11
9
|
const CircleProgress_1 = tslib_1.__importDefault(require("./CircleProgress"));
|
|
12
|
-
const i18n_1 =
|
|
10
|
+
const i18n_1 = require("./i18n");
|
|
13
11
|
const b = (0, utils_1.block)('CustomBarControls');
|
|
14
12
|
const playIconsMap = {
|
|
15
13
|
[models_1.CustomControlsType.WithMuteButton]: null,
|
|
@@ -20,11 +18,11 @@ const pauseIconsMap = {
|
|
|
20
18
|
[models_1.CustomControlsType.WithPlayPauseButton]: icons_1.Pause,
|
|
21
19
|
};
|
|
22
20
|
const muteIconsMap = {
|
|
23
|
-
[models_1.CustomControlsType.WithMuteButton]:
|
|
21
|
+
[models_1.CustomControlsType.WithMuteButton]: icons_1.VolumeFill,
|
|
24
22
|
[models_1.CustomControlsType.WithPlayPauseButton]: icons_1.VolumeLow,
|
|
25
23
|
};
|
|
26
24
|
const unmuteIconsMap = {
|
|
27
|
-
[models_1.CustomControlsType.WithMuteButton]:
|
|
25
|
+
[models_1.CustomControlsType.WithMuteButton]: icons_1.VolumeXmark,
|
|
28
26
|
[models_1.CustomControlsType.WithPlayPauseButton]: icons_1.VolumeXmark,
|
|
29
27
|
};
|
|
30
28
|
const CustomBarControls = (props) => {
|
|
@@ -38,7 +36,7 @@ const CustomBarControls = (props) => {
|
|
|
38
36
|
return null;
|
|
39
37
|
}
|
|
40
38
|
const { isMuted, changeMute } = mute;
|
|
41
|
-
return (react_1.default.createElement("button", { className: b('button', { type }), onClick: changeMute, "aria-label": (0, i18n_1.
|
|
39
|
+
return (react_1.default.createElement("button", { className: b('button', { type }), onClick: changeMute, "aria-label": (0, i18n_1.i18n)(isMuted ? 'unmute' : 'mute') },
|
|
42
40
|
react_1.default.createElement(uikit_1.Icon, { data: isMuted ? unmuteIcon : muteIcon, className: b('mute-icon', { type }) }),
|
|
43
41
|
type === models_1.CustomControlsType.WithMuteButton && !isMuted && (react_1.default.createElement(CircleProgress_1.default, { elapsedTime: elapsedTimePercent, strokeWidth: 5 }))));
|
|
44
42
|
}, [elapsedTimePercent, isMuteButtonShown, mute, muteIcon, type, unmuteIcon]);
|
|
@@ -47,7 +45,7 @@ const CustomBarControls = (props) => {
|
|
|
47
45
|
if (type === models_1.CustomControlsType.WithMuteButton || !icon) {
|
|
48
46
|
return null;
|
|
49
47
|
}
|
|
50
|
-
return (react_1.default.createElement("button", { onClick: onPlayClick, className: b('button', { type }), "aria-label": (0, i18n_1.
|
|
48
|
+
return (react_1.default.createElement("button", { onClick: onPlayClick, className: b('button', { type }), "aria-label": (0, i18n_1.i18n)(isPaused ? 'play' : 'pause') },
|
|
51
49
|
react_1.default.createElement(uikit_1.Icon, { data: icon, className: b('play-icon', { type }) })));
|
|
52
50
|
}, [isPaused, onPlayClick, type, playIcon, pauseIcon]);
|
|
53
51
|
return (react_1.default.createElement("div", { className: b('wrapper', { type, shown, positioning }, className) },
|
|
@@ -3,18 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ReactPlayerBlock = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const icons_1 = require("@gravity-ui/icons");
|
|
6
7
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
7
8
|
const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
|
|
8
9
|
const react_player_1 = tslib_1.__importDefault(require("react-player"));
|
|
9
|
-
const metrikaContext_1 = require("../../context/metrikaContext");
|
|
10
10
|
const mobileContext_1 = require("../../context/mobileContext");
|
|
11
11
|
const videoContext_1 = require("../../context/videoContext");
|
|
12
12
|
const hooks_1 = require("../../hooks");
|
|
13
|
-
const icons_1 = require("../../icons");
|
|
14
13
|
const models_1 = require("../../models");
|
|
15
14
|
const utils_1 = require("../../utils");
|
|
16
15
|
const CustomBarControls_1 = tslib_1.__importDefault(require("./CustomBarControls"));
|
|
17
|
-
const i18n_1 =
|
|
16
|
+
const i18n_1 = require("./i18n");
|
|
18
17
|
const utils_2 = require("./utils");
|
|
19
18
|
const youtube_1 = require("./utils/youtube");
|
|
20
19
|
const b = (0, utils_1.block)('ReactPlayer');
|
|
@@ -22,8 +21,7 @@ const FPS = 60;
|
|
|
22
21
|
// eslint-disable-next-line react/display-name
|
|
23
22
|
exports.ReactPlayerBlock = react_1.default.forwardRef((props, originRef) => {
|
|
24
23
|
const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
25
|
-
const {
|
|
26
|
-
const { src, previewImgUrl, loop = false, controls = models_1.MediaVideoControlsType.Default, customControlsOptions = {}, muted: initiallyMuted = false, elapsedTime, playButton, className, customBarControlsClassName, showPreview, onClickPreview, metrika: videoMetrika, analyticsEvents, height, ariaLabel, ratio, } = props;
|
|
24
|
+
const { src, previewImgUrl, loop = false, controls = models_1.MediaVideoControlsType.Default, customControlsOptions = {}, muted: initiallyMuted = false, elapsedTime, playButton, className, customBarControlsClassName, showPreview, onClickPreview, analyticsEvents, height, ariaLabel, ratio, } = props;
|
|
27
25
|
const { type = models_1.PlayButtonType.Default, theme = models_1.PlayButtonThemes.Blue, text, className: buttonClassName, } = playButton || {};
|
|
28
26
|
const { type: customControlsType = models_1.CustomControlsType.WithMuteButton, muteButtonShown, positioning = models_1.CustomControlsButtonPositioning.Center, } = customControlsOptions;
|
|
29
27
|
const autoPlay = Boolean(!isMobile && !previewImgUrl && props.autoplay);
|
|
@@ -124,10 +122,10 @@ exports.ReactPlayerBlock = react_1.default.forwardRef((props, originRef) => {
|
|
|
124
122
|
break;
|
|
125
123
|
case models_1.PlayButtonType.Default:
|
|
126
124
|
default:
|
|
127
|
-
playButtonContent = react_1.default.createElement(uikit_1.Icon, { className: b('icon'), data: icons_1.
|
|
125
|
+
playButtonContent = react_1.default.createElement(uikit_1.Icon, { className: b('icon'), data: icons_1.PlayFill, size: 24 });
|
|
128
126
|
break;
|
|
129
127
|
}
|
|
130
|
-
return (react_1.default.createElement("button", { className: b('button', { theme, text: Boolean(text) }, buttonClassName), "aria-label": (0, i18n_1.
|
|
128
|
+
return (react_1.default.createElement("button", { className: b('button', { theme, text: Boolean(text) }, buttonClassName), "aria-label": (0, i18n_1.i18n)('play') }, playButtonContent));
|
|
131
129
|
}, [type, theme, text, buttonClassName]);
|
|
132
130
|
const changeMute = (0, react_1.useCallback)((isMuted) => {
|
|
133
131
|
if (isMuted &&
|
|
@@ -136,13 +134,6 @@ exports.ReactPlayerBlock = react_1.default.forwardRef((props, originRef) => {
|
|
|
136
134
|
playerRef.seekTo(0);
|
|
137
135
|
setPlayedPercent(0);
|
|
138
136
|
}
|
|
139
|
-
if (metrika && videoMetrika) {
|
|
140
|
-
const { play, stop, counterName } = videoMetrika;
|
|
141
|
-
const goal = isMuted ? play : stop;
|
|
142
|
-
if (goal) {
|
|
143
|
-
metrika.reachGoals(goal, counterName);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
137
|
const events = isMuted ? playEvents : stopEvents;
|
|
147
138
|
handleAnalytics(events);
|
|
148
139
|
if (isMuted) {
|
|
@@ -150,27 +141,12 @@ exports.ReactPlayerBlock = react_1.default.forwardRef((props, originRef) => {
|
|
|
150
141
|
}
|
|
151
142
|
// In order to the progress bar to update (equals 0) before displaying
|
|
152
143
|
setTimeout(() => setMuted(!isMuted), 0);
|
|
153
|
-
}, [
|
|
154
|
-
playerRef,
|
|
155
|
-
customControlsType,
|
|
156
|
-
metrika,
|
|
157
|
-
videoMetrika,
|
|
158
|
-
playEvents,
|
|
159
|
-
stopEvents,
|
|
160
|
-
handleAnalytics,
|
|
161
|
-
setProps,
|
|
162
|
-
]);
|
|
144
|
+
}, [playerRef, customControlsType, playEvents, stopEvents, handleAnalytics, setProps]);
|
|
163
145
|
const handleClickPreview = (0, react_1.useCallback)(() => {
|
|
164
146
|
setIsPlaying(true);
|
|
165
147
|
onClickPreview === null || onClickPreview === void 0 ? void 0 : onClickPreview();
|
|
166
|
-
if (metrika && videoMetrika) {
|
|
167
|
-
const { play, counterName } = videoMetrika;
|
|
168
|
-
if (play) {
|
|
169
|
-
metrika.reachGoals(play, counterName);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
148
|
handleAnalytics(playEvents);
|
|
173
|
-
}, [onClickPreview,
|
|
149
|
+
}, [onClickPreview, handleAnalytics, playEvents]);
|
|
174
150
|
const onPause = (0, react_1.useCallback)(() => {
|
|
175
151
|
// For support correct state for youtube
|
|
176
152
|
if (controls !== models_1.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,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.i18n = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
|
-
const
|
|
5
|
+
const i18n_1 = require("@gravity-ui/uikit/i18n");
|
|
6
|
+
const cn_1 = require("../../../utils/cn");
|
|
5
7
|
const en_json_1 = tslib_1.__importDefault(require("./en.json"));
|
|
6
8
|
const ru_json_1 = tslib_1.__importDefault(require("./ru.json"));
|
|
7
|
-
|
|
8
|
-
exports.default = (0, registerKeyset_1.registerKeyset)({ en: en_json_1.default, ru: ru_json_1.default }, COMPONENT);
|
|
9
|
+
exports.i18n = (0, i18n_1.addComponentKeysets)({ en: en_json_1.default, ru: ru_json_1.default }, `${cn_1.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;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
+
const icons_1 = require("@gravity-ui/icons");
|
|
5
6
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
6
7
|
const __1 = require("../");
|
|
7
|
-
const icons_1 = require("../../icons");
|
|
8
8
|
const utils_1 = require("../../utils");
|
|
9
9
|
function getMarkerId(index) {
|
|
10
10
|
if (isNaN(index)) {
|
|
@@ -28,7 +28,7 @@ class Table extends react_1.default.Component {
|
|
|
28
28
|
return (react_1.default.createElement("div", { className: b('table'), role: 'rowgroup' }, content.map((row, i) => (react_1.default.createElement("div", { key: i, className: b('row'), role: 'row' }, row.map((cell, j) => (react_1.default.createElement("div", { key: j, className: b('cell', { justify: justify[j] }), role: 'cell' }, legend && i && j ? (this.renderMarker(marker, cell)) : (react_1.default.createElement(__1.HTML, null, cell))))))))));
|
|
29
29
|
}
|
|
30
30
|
renderMarker(type, cell) {
|
|
31
|
-
return (react_1.default.createElement("div", { "aria-labelledby": getMarkerId(Number(cell)), className: b('marker', { type, index: String(cell) }) }, type === 'tick' ? react_1.default.createElement(uikit_1.Icon, { data: Number(cell) === 1 ? icons_1.
|
|
31
|
+
return (react_1.default.createElement("div", { "aria-labelledby": getMarkerId(Number(cell)), className: b('marker', { type, index: String(cell) }) }, type === 'tick' ? (react_1.default.createElement(uikit_1.Icon, { size: 20, className: b('marker_tick', { check: Number(cell) === 1 }), data: Number(cell) === 1 ? icons_1.Check : icons_1.Minus })) : null));
|
|
32
32
|
}
|
|
33
33
|
renderLegend(legend, marker) {
|
|
34
34
|
return (react_1.default.createElement("div", { className: b('legend') }, legend.map((item, index) => (react_1.default.createElement("div", { key: item, className: b('legend-item') },
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
5
|
const utils_1 = require("../../utils");
|
|
6
|
-
const i18n_1 =
|
|
6
|
+
const i18n_1 = require("./i18n");
|
|
7
7
|
const b = (0, utils_1.block)('unpublished-label');
|
|
8
|
-
const UnpublishedLabel = ({ className, children, type = 'line', }) => (react_1.default.createElement("div", { className: b({ type }, className) }, children || (0, i18n_1.
|
|
8
|
+
const UnpublishedLabel = ({ className, children, type = 'line', }) => (react_1.default.createElement("div", { className: b({ type }, className) }, children || (0, i18n_1.i18n)('label_non_published')));
|
|
9
9
|
exports.default = UnpublishedLabel;
|
|
@@ -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,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.i18n = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
|
-
const
|
|
5
|
+
const i18n_1 = require("@gravity-ui/uikit/i18n");
|
|
6
|
+
const cn_1 = require("../../../utils/cn");
|
|
5
7
|
const en_json_1 = tslib_1.__importDefault(require("./en.json"));
|
|
6
8
|
const ru_json_1 = tslib_1.__importDefault(require("./ru.json"));
|
|
7
|
-
|
|
8
|
-
exports.default = (0, registerKeyset_1.registerKeyset)({ en: en_json_1.default, ru: ru_json_1.default }, COMPONENT);
|
|
9
|
+
exports.i18n = (0, i18n_1.addComponentKeysets)({ en: en_json_1.default, ru: ru_json_1.default }, `${cn_1.NAMESPACE}UnpublishedLabel`);
|
|
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getHeight = exports.AUTOPLAY_ATTRIBUTES = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const icons_1 = require("@gravity-ui/icons");
|
|
6
7
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
7
8
|
const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
|
|
8
9
|
const uuid_1 = require("uuid");
|
|
9
10
|
const useAnalytics_1 = require("../../hooks/useAnalytics");
|
|
10
|
-
const icons_1 = require("../../icons");
|
|
11
11
|
const common_1 = require("../../models/common");
|
|
12
12
|
const utils_1 = require("../../utils");
|
|
13
13
|
const Image_1 = tslib_1.__importDefault(require("../Image/Image"));
|
|
14
|
-
const i18n_1 =
|
|
14
|
+
const i18n_1 = require("./i18n");
|
|
15
15
|
const RECORD_URL = 'https://www.youtube.com/embed/';
|
|
16
16
|
const STREAM_URL = 'https://www.youtube.com/embed/live_stream?channel=';
|
|
17
17
|
const RECORD_RE = /[0-9A-Za-z_-]{11}/;
|
|
@@ -79,7 +79,7 @@ const VideoBlock = (props) => {
|
|
|
79
79
|
}
|
|
80
80
|
iframe.width = '100%';
|
|
81
81
|
iframe.height = '100%';
|
|
82
|
-
iframe.title = (0, i18n_1.
|
|
82
|
+
iframe.title = (0, i18n_1.i18n)('iframe-title');
|
|
83
83
|
iframe.frameBorder = '0';
|
|
84
84
|
iframe.setAttribute('allowfullscreen', 'true');
|
|
85
85
|
iframe.setAttribute('allow', 'autoplay');
|
|
@@ -97,6 +97,6 @@ const VideoBlock = (props) => {
|
|
|
97
97
|
return (react_1.default.createElement("div", { className: b(null, className), ref: ref, style: { height: currentHeight } }, previewImg && !hidePreview && !fullscreen && (react_1.default.createElement("div", { className: b('preview'), onClick: onPreviewClick },
|
|
98
98
|
react_1.default.createElement(Image_1.default, { src: previewImg, className: b('image'), containerClassName: b('image-wrapper'), onLoad: onImageLoad }),
|
|
99
99
|
playButton || (react_1.default.createElement("button", { title: "Play", className: b('button') },
|
|
100
|
-
react_1.default.createElement(uikit_1.Icon, { className: b('icon'), data: icons_1.
|
|
100
|
+
react_1.default.createElement(uikit_1.Icon, { className: b('icon'), data: icons_1.PlayFill, size: 24 })))))));
|
|
101
101
|
};
|
|
102
102
|
exports.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,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.i18n = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
|
-
const
|
|
5
|
+
const i18n_1 = require("@gravity-ui/uikit/i18n");
|
|
6
|
+
const cn_1 = require("../../../utils/cn");
|
|
5
7
|
const en_json_1 = tslib_1.__importDefault(require("./en.json"));
|
|
6
8
|
const ru_json_1 = tslib_1.__importDefault(require("./ru.json"));
|
|
7
|
-
|
|
8
|
-
exports.default = (0, registerKeyset_1.registerKeyset)({ en: en_json_1.default, ru: ru_json_1.default }, COMPONENT);
|
|
9
|
+
exports.i18n = (0, i18n_1.addComponentKeysets)({ en: en_json_1.default, ru: ru_json_1.default }, `${cn_1.NAMESPACE}VideoBlock`);
|
|
@@ -6,7 +6,6 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const localeContext_1 = require("../../context/localeContext");
|
|
7
7
|
const mobileContext_1 = require("../../context/mobileContext");
|
|
8
8
|
const hooks_1 = require("../../hooks");
|
|
9
|
-
const useMetrika_1 = require("../../hooks/useMetrika");
|
|
10
9
|
const common_1 = require("../../models/common");
|
|
11
10
|
const utils_1 = require("../../utils");
|
|
12
11
|
const constants_1 = require("../constants");
|
|
@@ -15,12 +14,11 @@ exports.YANDEX_FORM_SECTION = 'surveys';
|
|
|
15
14
|
const CONTAINER_ID = 'pc-yandex-form-container';
|
|
16
15
|
const b = (0, utils_1.block)('yandex-form');
|
|
17
16
|
const YandexForm = (props) => {
|
|
18
|
-
const { onLoad, id, params, className, theme, containerId = CONTAINER_ID, headerHeight = constants_1.HEADER_HEIGHT, onSubmit,
|
|
17
|
+
const { onLoad, id, params, className, theme, containerId = CONTAINER_ID, headerHeight = constants_1.HEADER_HEIGHT, onSubmit, analyticsEvents, customFormOrigin, customFormSection, } = props;
|
|
19
18
|
const formContainerRef = (0, react_1.useRef)(null);
|
|
20
19
|
const iframeRef = (0, react_1.useRef)();
|
|
21
20
|
const yaFormOrigin = customFormOrigin || exports.YANDEX_FORM_ORIGIN;
|
|
22
21
|
const yaFormSection = customFormSection || exports.YANDEX_FORM_SECTION;
|
|
23
|
-
const handleMetrika = (0, useMetrika_1.useMetrika)();
|
|
24
22
|
const handleAnalytics = (0, hooks_1.useAnalytics)(common_1.DefaultEventNames.YandexFormSubmit);
|
|
25
23
|
const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
26
24
|
const locale = (0, react_1.useContext)(localeContext_1.LocaleContext);
|
|
@@ -62,20 +60,11 @@ const YandexForm = (props) => {
|
|
|
62
60
|
const { top } = formContainerRef.current.getBoundingClientRect();
|
|
63
61
|
window.scrollBy(0, top - headerHeight);
|
|
64
62
|
}
|
|
65
|
-
handleMetrika({ metrikaGoals, pixelEvents });
|
|
66
63
|
handleAnalytics(analyticsEvents);
|
|
67
64
|
if (onSubmit) {
|
|
68
65
|
onSubmit();
|
|
69
66
|
}
|
|
70
|
-
}, [
|
|
71
|
-
handleMetrika,
|
|
72
|
-
metrikaGoals,
|
|
73
|
-
pixelEvents,
|
|
74
|
-
handleAnalytics,
|
|
75
|
-
analyticsEvents,
|
|
76
|
-
onSubmit,
|
|
77
|
-
headerHeight,
|
|
78
|
-
]);
|
|
67
|
+
}, [handleAnalytics, analyticsEvents, onSubmit, headerHeight]);
|
|
79
68
|
const handleMessage = (0, react_1.useCallback)(({ origin, data }) => {
|
|
80
69
|
if (origin !== yaFormOrigin) {
|
|
81
70
|
return;
|
|
@@ -5,7 +5,7 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
5
5
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
6
6
|
const ErrorWrapper_1 = tslib_1.__importDefault(require("../../components/ErrorWrapper/ErrorWrapper"));
|
|
7
7
|
const cn_1 = require("../../utils/cn");
|
|
8
|
-
const i18n_1 =
|
|
8
|
+
const i18n_1 = require("./i18n");
|
|
9
9
|
const b = (0, cn_1.block)('loadable-block');
|
|
10
10
|
const initData = {
|
|
11
11
|
loading: false,
|
|
@@ -39,7 +39,7 @@ const Loadable = (props) => {
|
|
|
39
39
|
return (react_1.default.createElement("div", { className: b('loader') },
|
|
40
40
|
react_1.default.createElement(uikit_1.Spin, { size: "xl" })));
|
|
41
41
|
}
|
|
42
|
-
return (react_1.default.createElement(ErrorWrapper_1.default, { isError: error, text: (0, i18n_1.
|
|
42
|
+
return (react_1.default.createElement(ErrorWrapper_1.default, { isError: error, text: (0, i18n_1.i18n)('loadable-load-error'), buttonText: (0, i18n_1.i18n)('loadable-try-again'), handler: onTryAgain },
|
|
43
43
|
react_1.default.createElement(Component, Object.assign({}, block), data &&
|
|
44
44
|
(Array.isArray(data) ? (data.map((componentData, index) => (react_1.default.createElement(ChildComponent, Object.assign({ key: componentData.id || index }, componentData))))) : (react_1.default.createElement(ChildComponent, Object.assign({}, data)))))));
|
|
45
45
|
};
|
|
@@ -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,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.i18n = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
|
-
const
|
|
5
|
+
const i18n_1 = require("@gravity-ui/uikit/i18n");
|
|
6
|
+
const cn_1 = require("../../../utils/cn");
|
|
5
7
|
const en_json_1 = tslib_1.__importDefault(require("./en.json"));
|
|
6
8
|
const ru_json_1 = tslib_1.__importDefault(require("./ru.json"));
|
|
7
|
-
|
|
8
|
-
exports.default = (0, registerKeyset_1.registerKeyset)({ en: en_json_1.default, ru: ru_json_1.default }, COMPONENT);
|
|
9
|
+
exports.i18n = (0, i18n_1.addComponentKeysets)({ en: en_json_1.default, ru: ru_json_1.default }, `${cn_1.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
|
export type ItemMap = typeof blockMap & typeof subBlockMap & CustomItems;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PageConstructor = exports.Constructor = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
require("@
|
|
6
|
+
require("@diplodoc/transform/dist/js/yfm");
|
|
7
7
|
const BackgroundMedia_1 = tslib_1.__importDefault(require("../../components/BackgroundMedia/BackgroundMedia"));
|
|
8
8
|
const RootCn_1 = tslib_1.__importDefault(require("../../components/RootCn"));
|
|
9
9
|
const constructor_items_1 = require("../../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;
|
|
@@ -9,13 +9,12 @@ const imageContext_1 = require("../../context/imageContext");
|
|
|
9
9
|
const localeContext_1 = require("../../context/localeContext");
|
|
10
10
|
const locationContext_1 = require("../../context/locationContext");
|
|
11
11
|
const mapsContext_1 = require("../../context/mapsContext/mapsContext");
|
|
12
|
-
const metrikaContext_1 = require("../../context/metrikaContext");
|
|
13
12
|
const mobileContext_1 = require("../../context/mobileContext");
|
|
14
13
|
const projectSettingsContext_1 = require("../../context/projectSettingsContext");
|
|
15
14
|
const ssrContext_1 = require("../../context/ssrContext");
|
|
16
15
|
const theme_1 = require("../../context/theme");
|
|
17
16
|
const PageConstructorProvider = (props) => {
|
|
18
|
-
const { isMobile, mapsContext = mapsContext_1.initialMapValue, locale = {}, location = {},
|
|
17
|
+
const { isMobile, mapsContext = mapsContext_1.initialMapValue, locale = {}, location = {}, analytics = {}, ssrConfig = {}, projectSettings = {}, theme = constants_1.DEFAULT_THEME, children, image = {}, } = props;
|
|
19
18
|
/* eslint-disable react/jsx-key */
|
|
20
19
|
const context = [
|
|
21
20
|
react_1.default.createElement(theme_1.ThemeContext.Provider, { value: { theme } }),
|
|
@@ -25,7 +24,6 @@ const PageConstructorProvider = (props) => {
|
|
|
25
24
|
react_1.default.createElement(locationContext_1.LocationContext.Provider, { value: location }),
|
|
26
25
|
react_1.default.createElement(mobileContext_1.MobileContext.Provider, { value: Boolean(isMobile) }),
|
|
27
26
|
react_1.default.createElement(mapsContext_1.MapsContext.Provider, { value: mapsContext }),
|
|
28
|
-
react_1.default.createElement(metrikaContext_1.MetrikaContext.Provider, { value: metrika }),
|
|
29
27
|
react_1.default.createElement(analyticsContext_1.AnalyticsContext.Provider, { value: analytics }),
|
|
30
28
|
react_1.default.createElement(ssrContext_1.SSRContext.Provider, { value: { isServer: ssrConfig === null || ssrConfig === void 0 ? void 0 : ssrConfig.isServer } }),
|
|
31
29
|
].reduceRight((prev, provider) => react_1.default.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>;
|
|
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LocaleContext = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
7
|
-
exports.LocaleContext = react_1.default.createContext({ lang:
|
|
6
|
+
const uikit_1 = require("@gravity-ui/uikit");
|
|
7
|
+
exports.LocaleContext = react_1.default.createContext({ lang: uikit_1.Lang.Ru, tld: '.ru' });
|