@gravity-ui/blog-constructor 7.0.0-alpha.1 → 7.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/blocks/Author/Author.d.ts +2 -3
- package/build/cjs/blocks/Author/Author.js +13 -13
- package/build/cjs/blocks/Author/Author.js.map +1 -0
- package/build/cjs/blocks/Author/schema.js +4 -3
- package/build/cjs/blocks/Author/schema.js.map +1 -0
- package/build/cjs/blocks/Banner/Banner.d.ts +2 -3
- package/build/cjs/blocks/Banner/Banner.js +11 -15
- package/build/cjs/blocks/Banner/Banner.js.map +1 -0
- package/build/cjs/blocks/Banner/schema.js +4 -3
- package/build/cjs/blocks/Banner/schema.js.map +1 -0
- package/build/cjs/blocks/CTA/CTA.d.ts +2 -3
- package/build/cjs/blocks/CTA/CTA.js +19 -20
- package/build/cjs/blocks/CTA/CTA.js.map +1 -0
- package/build/cjs/blocks/CTA/schema.js +4 -3
- package/build/cjs/blocks/CTA/schema.js.map +1 -0
- package/build/cjs/blocks/ColoredText/ColoredText.d.ts +2 -3
- package/build/cjs/blocks/ColoredText/ColoredText.js +9 -12
- package/build/cjs/blocks/ColoredText/ColoredText.js.map +1 -0
- package/build/cjs/blocks/ColoredText/schema.js +4 -3
- package/build/cjs/blocks/ColoredText/schema.js.map +1 -0
- package/build/cjs/blocks/Feed/Feed.d.ts +2 -3
- package/build/cjs/blocks/Feed/Feed.js +31 -31
- package/build/cjs/blocks/Feed/Feed.js.map +1 -0
- package/build/cjs/blocks/Feed/reducer.d.ts +1 -1
- package/build/cjs/blocks/Feed/reducer.js +3 -2
- package/build/cjs/blocks/Feed/reducer.js.map +1 -0
- package/build/cjs/blocks/Feed/schema.js +3 -2
- package/build/cjs/blocks/Feed/schema.js.map +1 -0
- package/build/cjs/blocks/Form/Form.d.ts +2 -3
- package/build/cjs/blocks/Form/Form.js +10 -10
- package/build/cjs/blocks/Form/Form.js.map +1 -0
- package/build/cjs/blocks/Form/schema.js +4 -3
- package/build/cjs/blocks/Form/schema.js.map +1 -0
- package/build/cjs/blocks/Header/Header.d.ts +2 -3
- package/build/cjs/blocks/Header/Header.js +18 -18
- package/build/cjs/blocks/Header/Header.js.map +1 -0
- package/build/cjs/blocks/Header/schema.d.ts +3 -0
- package/build/cjs/blocks/Header/schema.js +4 -3
- package/build/cjs/blocks/Header/schema.js.map +1 -0
- package/build/cjs/blocks/Layout/Layout.d.ts +3 -3
- package/build/cjs/blocks/Layout/Layout.js +12 -13
- package/build/cjs/blocks/Layout/Layout.js.map +1 -0
- package/build/cjs/blocks/Layout/schema.js +4 -3
- package/build/cjs/blocks/Layout/schema.js.map +1 -0
- package/build/cjs/blocks/Media/Media.d.ts +2 -3
- package/build/cjs/blocks/Media/Media.js +12 -15
- package/build/cjs/blocks/Media/Media.js.map +1 -0
- package/build/cjs/blocks/Media/schema.d.ts +3 -0
- package/build/cjs/blocks/Media/schema.js +4 -3
- package/build/cjs/blocks/Media/schema.js.map +1 -0
- package/build/cjs/blocks/Meta/Meta.d.ts +2 -3
- package/build/cjs/blocks/Meta/Meta.js +22 -23
- package/build/cjs/blocks/Meta/Meta.js.map +1 -0
- package/build/cjs/blocks/Meta/schema.js +4 -3
- package/build/cjs/blocks/Meta/schema.js.map +1 -0
- package/build/cjs/blocks/Suggest/Suggest.d.ts +2 -3
- package/build/cjs/blocks/Suggest/Suggest.js +15 -14
- package/build/cjs/blocks/Suggest/Suggest.js.map +1 -0
- package/build/cjs/blocks/Suggest/schema.js +4 -3
- package/build/cjs/blocks/Suggest/schema.js.map +1 -0
- package/build/cjs/blocks/YFM/YFM.d.ts +2 -3
- package/build/cjs/blocks/YFM/YFM.js +10 -11
- package/build/cjs/blocks/YFM/YFM.js.map +1 -0
- package/build/cjs/blocks/YFM/schema.js +4 -3
- package/build/cjs/blocks/YFM/schema.js.map +1 -0
- package/build/cjs/blocks/constants.js +2 -1
- package/build/cjs/blocks/constants.js.map +1 -0
- package/build/cjs/components/FeedHeader/FeedHeader.d.ts +3 -4
- package/build/cjs/components/FeedHeader/FeedHeader.js +10 -14
- package/build/cjs/components/FeedHeader/FeedHeader.js.map +1 -0
- package/build/cjs/components/FeedHeader/components/Controls/Controls.d.ts +4 -4
- package/build/cjs/components/FeedHeader/components/Controls/Controls.js +30 -40
- package/build/cjs/components/FeedHeader/components/Controls/Controls.js.map +1 -0
- package/build/cjs/components/FeedHeader/components/Controls/customRenders.d.ts +2 -3
- package/build/cjs/components/FeedHeader/components/Controls/customRenders.js +13 -9
- package/build/cjs/components/FeedHeader/components/Controls/customRenders.js.map +1 -0
- package/build/cjs/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.d.ts +2 -2
- package/build/cjs/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.js +5 -7
- package/build/cjs/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.js.map +1 -0
- package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.css +1 -1
- package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.d.ts +2 -3
- package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.js +13 -17
- package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.js.map +1 -0
- package/build/cjs/components/MetaWrapper/MetaWrapper.d.ts +1 -1
- package/build/cjs/components/MetaWrapper/MetaWrapper.js +4 -4
- package/build/cjs/components/MetaWrapper/MetaWrapper.js.map +1 -0
- package/build/cjs/components/Paginator/Paginator.d.ts +2 -3
- package/build/cjs/components/Paginator/Paginator.js +25 -29
- package/build/cjs/components/Paginator/Paginator.js.map +1 -0
- package/build/cjs/components/Paginator/components/NavigationButton.d.ts +2 -3
- package/build/cjs/components/Paginator/components/NavigationButton.js +7 -7
- package/build/cjs/components/Paginator/components/NavigationButton.js.map +1 -0
- package/build/cjs/components/Paginator/components/PaginatorItem.d.ts +2 -3
- package/build/cjs/components/Paginator/components/PaginatorItem.js +13 -11
- package/build/cjs/components/Paginator/components/PaginatorItem.js.map +1 -0
- package/build/cjs/components/Paginator/types.d.ts +3 -3
- package/build/cjs/components/Paginator/types.js +2 -1
- package/build/cjs/components/Paginator/types.js.map +1 -0
- package/build/cjs/components/Paginator/utils.d.ts +2 -2
- package/build/cjs/components/Paginator/utils.js +2 -1
- package/build/cjs/components/Paginator/utils.js.map +1 -0
- package/build/cjs/components/PostCard/PostCard.css +7 -8
- package/build/cjs/components/PostCard/PostCard.d.ts +2 -3
- package/build/cjs/components/PostCard/PostCard.js +16 -24
- package/build/cjs/components/PostCard/PostCard.js.map +1 -0
- package/build/cjs/components/PostInfo/PostInfo.d.ts +2 -3
- package/build/cjs/components/PostInfo/PostInfo.js +13 -15
- package/build/cjs/components/PostInfo/PostInfo.js.map +1 -0
- package/build/cjs/components/PostInfo/SuggestPostInfo.d.ts +2 -3
- package/build/cjs/components/PostInfo/SuggestPostInfo.js +12 -16
- package/build/cjs/components/PostInfo/SuggestPostInfo.js.map +1 -0
- package/build/cjs/components/PostInfo/components/Date.d.ts +2 -3
- package/build/cjs/components/PostInfo/components/Date.js +10 -8
- package/build/cjs/components/PostInfo/components/Date.js.map +1 -0
- package/build/cjs/components/PostInfo/components/ReadingTime.d.ts +2 -3
- package/build/cjs/components/PostInfo/components/ReadingTime.js +7 -10
- package/build/cjs/components/PostInfo/components/ReadingTime.js.map +1 -0
- package/build/cjs/components/PostInfo/components/Save.d.ts +2 -3
- package/build/cjs/components/PostInfo/components/Save.js +14 -16
- package/build/cjs/components/PostInfo/components/Save.js.map +1 -0
- package/build/cjs/components/PostInfo/components/Sharing.d.ts +1 -2
- package/build/cjs/components/PostInfo/components/Sharing.js +17 -17
- package/build/cjs/components/PostInfo/components/Sharing.js.map +1 -0
- package/build/cjs/components/Posts/Posts.d.ts +4 -4
- package/build/cjs/components/Posts/Posts.js +16 -28
- package/build/cjs/components/Posts/Posts.js.map +1 -0
- package/build/cjs/components/PostsEmpty/PostsEmpty.d.ts +1 -2
- package/build/cjs/components/PostsEmpty/PostsEmpty.js +6 -8
- package/build/cjs/components/PostsEmpty/PostsEmpty.js.map +1 -0
- package/build/cjs/components/PostsError/PostsError.d.ts +1 -2
- package/build/cjs/components/PostsError/PostsError.js +6 -10
- package/build/cjs/components/PostsError/PostsError.js.map +1 -0
- package/build/cjs/components/Prompt/Prompt.d.ts +1 -2
- package/build/cjs/components/Prompt/Prompt.js +10 -12
- package/build/cjs/components/Prompt/Prompt.js.map +1 -0
- package/build/cjs/components/PromptSignIn/PromptSignIn.d.ts +4 -4
- package/build/cjs/components/PromptSignIn/PromptSignIn.js +6 -5
- package/build/cjs/components/PromptSignIn/PromptSignIn.js.map +1 -0
- package/build/cjs/components/PromptSignIn/hooks/usePromptSignInProps.d.ts +2 -2
- package/build/cjs/components/PromptSignIn/hooks/usePromptSignInProps.js +6 -5
- package/build/cjs/components/PromptSignIn/hooks/usePromptSignInProps.js.map +1 -0
- package/build/cjs/components/Search/Search.d.ts +2 -3
- package/build/cjs/components/Search/Search.js +17 -17
- package/build/cjs/components/Search/Search.js.map +1 -0
- package/build/cjs/components/Wrapper/Wrapper.d.ts +3 -3
- package/build/cjs/components/Wrapper/Wrapper.js +7 -7
- package/build/cjs/components/Wrapper/Wrapper.js.map +1 -0
- package/build/cjs/constants.d.ts +2 -2
- package/build/cjs/constants.js +4 -3
- package/build/cjs/constants.js.map +1 -0
- package/build/cjs/constructor/BlogConstructorProvider.d.ts +7 -7
- package/build/cjs/constructor/BlogConstructorProvider.js +21 -19
- package/build/cjs/constructor/BlogConstructorProvider.js.map +1 -0
- package/build/cjs/constructor/blocksMap.d.ts +12 -12
- package/build/cjs/constructor/blocksMap.js +15 -14
- package/build/cjs/constructor/blocksMap.js.map +1 -0
- package/build/cjs/containers/BlogPage/BlogPage.d.ts +4 -4
- package/build/cjs/containers/BlogPage/BlogPage.js +22 -25
- package/build/cjs/containers/BlogPage/BlogPage.js.map +1 -0
- package/build/cjs/containers/BlogPostPage/BlogPostPage.css +0 -8
- package/build/cjs/containers/BlogPostPage/BlogPostPage.d.ts +6 -5
- package/build/cjs/containers/BlogPostPage/BlogPostPage.js +28 -30
- package/build/cjs/containers/BlogPostPage/BlogPostPage.js.map +1 -0
- package/build/cjs/contexts/DeviceContext.d.ts +2 -2
- package/build/cjs/contexts/DeviceContext.js +3 -2
- package/build/cjs/contexts/DeviceContext.js.map +1 -0
- package/build/cjs/contexts/FeedContext.d.ts +2 -2
- package/build/cjs/contexts/FeedContext.js +3 -2
- package/build/cjs/contexts/FeedContext.js.map +1 -0
- package/build/cjs/contexts/LikesContext.d.ts +2 -2
- package/build/cjs/contexts/LikesContext.js +3 -2
- package/build/cjs/contexts/LikesContext.js.map +1 -0
- package/build/cjs/contexts/LocaleContext.d.ts +2 -2
- package/build/cjs/contexts/LocaleContext.js +4 -3
- package/build/cjs/contexts/LocaleContext.js.map +1 -0
- package/build/cjs/contexts/MobileContext.d.ts +1 -1
- package/build/cjs/contexts/MobileContext.js +3 -2
- package/build/cjs/contexts/MobileContext.js.map +1 -0
- package/build/cjs/contexts/PostPageContext.d.ts +4 -2
- package/build/cjs/contexts/PostPageContext.js +3 -2
- package/build/cjs/contexts/PostPageContext.js.map +1 -0
- package/build/cjs/contexts/RouterContext.d.ts +2 -2
- package/build/cjs/contexts/RouterContext.js +3 -2
- package/build/cjs/contexts/RouterContext.js.map +1 -0
- package/build/cjs/contexts/SettingsContext.d.ts +1 -1
- package/build/cjs/contexts/SettingsContext.js +3 -2
- package/build/cjs/contexts/SettingsContext.js.map +1 -0
- package/build/cjs/contexts/theme/ThemeContext.d.ts +2 -2
- package/build/cjs/contexts/theme/ThemeContext.js +4 -3
- package/build/cjs/contexts/theme/ThemeContext.js.map +1 -0
- package/build/cjs/contexts/theme/ThemeProvider.d.ts +4 -4
- package/build/cjs/contexts/theme/ThemeProvider.js +9 -8
- package/build/cjs/contexts/theme/ThemeProvider.js.map +1 -0
- package/build/cjs/contexts/theme/ThemeValueContext.d.ts +1 -1
- package/build/cjs/contexts/theme/ThemeValueContext.js +3 -2
- package/build/cjs/contexts/theme/ThemeValueContext.js.map +1 -0
- package/build/cjs/contexts/theme/index.d.ts +6 -6
- package/build/cjs/contexts/theme/index.js +7 -6
- package/build/cjs/contexts/theme/index.js.map +1 -0
- package/build/cjs/contexts/theme/useTheme.d.ts +1 -1
- package/build/cjs/contexts/theme/useTheme.js +5 -5
- package/build/cjs/contexts/theme/useTheme.js.map +1 -0
- package/build/cjs/contexts/theme/useThemeValue.d.ts +1 -1
- package/build/cjs/contexts/theme/useThemeValue.js +5 -5
- package/build/cjs/contexts/theme/useThemeValue.js.map +1 -0
- package/build/cjs/contexts/theme/withTheme.d.ts +2 -2
- package/build/cjs/contexts/theme/withTheme.js +7 -6
- package/build/cjs/contexts/theme/withTheme.js.map +1 -0
- package/build/cjs/contexts/theme/withThemeValue.d.ts +2 -2
- package/build/cjs/contexts/theme/withThemeValue.js +7 -6
- package/build/cjs/contexts/theme/withThemeValue.js.map +1 -0
- package/build/cjs/counters/metrika.js +3 -3
- package/build/cjs/counters/metrika.js.map +1 -0
- package/build/cjs/counters/utils.js +2 -1
- package/build/cjs/counters/utils.js.map +1 -0
- package/build/cjs/hooks/useAriaAttributes.js +6 -4
- package/build/cjs/hooks/useAriaAttributes.js.map +1 -0
- package/build/cjs/hooks/useExtendedComponentMap.d.ts +18 -17
- package/build/cjs/hooks/useExtendedComponentMap.js +5 -4
- package/build/cjs/hooks/useExtendedComponentMap.js.map +1 -0
- package/build/cjs/hooks/useHover.d.ts +1 -1
- package/build/cjs/hooks/useHover.js +6 -6
- package/build/cjs/hooks/useHover.js.map +1 -0
- package/build/cjs/hooks/useIsIPhone.js +6 -4
- package/build/cjs/hooks/useIsIPhone.js.map +1 -0
- package/build/cjs/hooks/useLikes.d.ts +1 -1
- package/build/cjs/hooks/useLikes.js +8 -6
- package/build/cjs/hooks/useLikes.js.map +1 -0
- package/build/cjs/hooks/useOpenCloseTimer.js +6 -5
- package/build/cjs/hooks/useOpenCloseTimer.js.map +1 -0
- package/build/cjs/i18n/index.d.ts +5 -1
- package/build/cjs/i18n/index.js +3 -2
- package/build/cjs/i18n/index.js.map +1 -0
- package/build/cjs/icons/Close.d.ts +2 -2
- package/build/cjs/icons/Close.js +5 -6
- package/build/cjs/icons/Close.js.map +1 -0
- package/build/cjs/icons/DropdownArrow.d.ts +2 -2
- package/build/cjs/icons/DropdownArrow.js +5 -6
- package/build/cjs/icons/DropdownArrow.js.map +1 -0
- package/build/cjs/icons/Save.d.ts +2 -2
- package/build/cjs/icons/Save.js +5 -6
- package/build/cjs/icons/Save.js.map +1 -0
- package/build/cjs/icons/SaveFilled.d.ts +2 -2
- package/build/cjs/icons/SaveFilled.js +5 -6
- package/build/cjs/icons/SaveFilled.js.map +1 -0
- package/build/cjs/icons/SearchIcon.d.ts +2 -2
- package/build/cjs/icons/SearchIcon.js +5 -6
- package/build/cjs/icons/SearchIcon.js.map +1 -0
- package/build/cjs/icons/ShareArrowUp.d.ts +2 -2
- package/build/cjs/icons/ShareArrowUp.js +5 -6
- package/build/cjs/icons/ShareArrowUp.js.map +1 -0
- package/build/cjs/icons/Time.d.ts +2 -2
- package/build/cjs/icons/Time.js +5 -6
- package/build/cjs/icons/Time.js.map +1 -0
- package/build/cjs/index.d.ts +8 -7
- package/build/cjs/index.js +10 -8
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/models/blocks.d.ts +4 -4
- package/build/cjs/models/blocks.js +2 -1
- package/build/cjs/models/blocks.js.map +1 -0
- package/build/cjs/models/common.d.ts +3 -3
- package/build/cjs/models/common.js +6 -5
- package/build/cjs/models/common.js.map +1 -0
- package/build/cjs/models/locale.js +2 -1
- package/build/cjs/models/locale.js.map +1 -0
- package/build/cjs/models/paddings.js +2 -1
- package/build/cjs/models/paddings.js.map +1 -0
- package/build/cjs/package.json +1 -0
- package/build/cjs/schema/blocks.d.ts +10 -10
- package/build/cjs/schema/blocks.js +11 -10
- package/build/cjs/schema/blocks.js.map +1 -0
- package/build/cjs/schema/common.js +2 -1
- package/build/cjs/schema/common.js.map +1 -0
- package/build/cjs/schema/headers.d.ts +1 -1
- package/build/cjs/schema/headers.js +2 -1
- package/build/cjs/schema/headers.js.map +1 -0
- package/build/cjs/schema/index.d.ts +8 -2
- package/build/cjs/schema/index.js +5 -4
- package/build/cjs/schema/index.js.map +1 -0
- package/build/cjs/schema/utils.d.ts +1 -1
- package/build/cjs/schema/utils.js +2 -1
- package/build/cjs/schema/utils.js.map +1 -0
- package/build/cjs/utils/cn.js +2 -1
- package/build/cjs/utils/cn.js.map +1 -0
- package/build/cjs/utils/common.d.ts +17 -18
- package/build/cjs/utils/common.js +7 -6
- package/build/cjs/utils/common.js.map +1 -0
- package/build/cjs/utils/date.js +2 -1
- package/build/cjs/utils/date.js.map +1 -0
- package/build/cjs/utils/index.d.ts +1 -0
- package/build/cjs/utils/index.js +6 -0
- package/build/cjs/utils/index.js.map +1 -0
- package/build/cjs/utils/svg.js +2 -1
- package/build/cjs/utils/svg.js.map +1 -0
- package/build/esm/blocks/Author/Author.d.ts +2 -3
- package/build/esm/blocks/Author/Author.js +13 -13
- package/build/esm/blocks/Author/Author.js.map +1 -0
- package/build/esm/blocks/Author/schema.js +4 -3
- package/build/esm/blocks/Author/schema.js.map +1 -0
- package/build/esm/blocks/Banner/Banner.d.ts +2 -3
- package/build/esm/blocks/Banner/Banner.js +11 -15
- package/build/esm/blocks/Banner/Banner.js.map +1 -0
- package/build/esm/blocks/Banner/schema.js +4 -3
- package/build/esm/blocks/Banner/schema.js.map +1 -0
- package/build/esm/blocks/CTA/CTA.d.ts +2 -3
- package/build/esm/blocks/CTA/CTA.js +19 -19
- package/build/esm/blocks/CTA/CTA.js.map +1 -0
- package/build/esm/blocks/CTA/schema.js +4 -3
- package/build/esm/blocks/CTA/schema.js.map +1 -0
- package/build/esm/blocks/ColoredText/ColoredText.d.ts +2 -3
- package/build/esm/blocks/ColoredText/ColoredText.js +9 -12
- package/build/esm/blocks/ColoredText/ColoredText.js.map +1 -0
- package/build/esm/blocks/ColoredText/schema.js +4 -3
- package/build/esm/blocks/ColoredText/schema.js.map +1 -0
- package/build/esm/blocks/Feed/Feed.d.ts +2 -3
- package/build/esm/blocks/Feed/Feed.js +31 -31
- package/build/esm/blocks/Feed/Feed.js.map +1 -0
- package/build/esm/blocks/Feed/reducer.d.ts +1 -1
- package/build/esm/blocks/Feed/reducer.js +2 -1
- package/build/esm/blocks/Feed/reducer.js.map +1 -0
- package/build/esm/blocks/Feed/schema.js +3 -2
- package/build/esm/blocks/Feed/schema.js.map +1 -0
- package/build/esm/blocks/Form/Form.d.ts +2 -3
- package/build/esm/blocks/Form/Form.js +10 -10
- package/build/esm/blocks/Form/Form.js.map +1 -0
- package/build/esm/blocks/Form/schema.js +4 -3
- package/build/esm/blocks/Form/schema.js.map +1 -0
- package/build/esm/blocks/Header/Header.d.ts +2 -3
- package/build/esm/blocks/Header/Header.js +18 -18
- package/build/esm/blocks/Header/Header.js.map +1 -0
- package/build/esm/blocks/Header/schema.d.ts +3 -0
- package/build/esm/blocks/Header/schema.js +4 -3
- package/build/esm/blocks/Header/schema.js.map +1 -0
- package/build/esm/blocks/Layout/Layout.d.ts +3 -3
- package/build/esm/blocks/Layout/Layout.js +12 -13
- package/build/esm/blocks/Layout/Layout.js.map +1 -0
- package/build/esm/blocks/Layout/schema.js +4 -3
- package/build/esm/blocks/Layout/schema.js.map +1 -0
- package/build/esm/blocks/Media/Media.d.ts +2 -3
- package/build/esm/blocks/Media/Media.js +12 -15
- package/build/esm/blocks/Media/Media.js.map +1 -0
- package/build/esm/blocks/Media/schema.d.ts +3 -0
- package/build/esm/blocks/Media/schema.js +4 -3
- package/build/esm/blocks/Media/schema.js.map +1 -0
- package/build/esm/blocks/Meta/Meta.d.ts +2 -3
- package/build/esm/blocks/Meta/Meta.js +22 -23
- package/build/esm/blocks/Meta/Meta.js.map +1 -0
- package/build/esm/blocks/Meta/schema.js +4 -3
- package/build/esm/blocks/Meta/schema.js.map +1 -0
- package/build/esm/blocks/Suggest/Suggest.d.ts +2 -3
- package/build/esm/blocks/Suggest/Suggest.js +15 -14
- package/build/esm/blocks/Suggest/Suggest.js.map +1 -0
- package/build/esm/blocks/Suggest/schema.js +4 -3
- package/build/esm/blocks/Suggest/schema.js.map +1 -0
- package/build/esm/blocks/YFM/YFM.d.ts +2 -3
- package/build/esm/blocks/YFM/YFM.js +10 -10
- package/build/esm/blocks/YFM/YFM.js.map +1 -0
- package/build/esm/blocks/YFM/schema.js +4 -3
- package/build/esm/blocks/YFM/schema.js.map +1 -0
- package/build/esm/blocks/constants.js +2 -1
- package/build/esm/blocks/constants.js.map +1 -0
- package/build/esm/components/FeedHeader/FeedHeader.d.ts +3 -4
- package/build/esm/components/FeedHeader/FeedHeader.js +10 -13
- package/build/esm/components/FeedHeader/FeedHeader.js.map +1 -0
- package/build/esm/components/FeedHeader/components/Controls/Controls.d.ts +4 -4
- package/build/esm/components/FeedHeader/components/Controls/Controls.js +30 -40
- package/build/esm/components/FeedHeader/components/Controls/Controls.js.map +1 -0
- package/build/esm/components/FeedHeader/components/Controls/customRenders.d.ts +2 -3
- package/build/esm/components/FeedHeader/components/Controls/customRenders.js +12 -8
- package/build/esm/components/FeedHeader/components/Controls/customRenders.js.map +1 -0
- package/build/esm/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.d.ts +2 -2
- package/build/esm/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.js +4 -5
- package/build/esm/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.js.map +1 -0
- package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.css +1 -1
- package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.d.ts +2 -3
- package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.js +13 -17
- package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.js.map +1 -0
- package/build/esm/components/MetaWrapper/MetaWrapper.d.ts +1 -1
- package/build/esm/components/MetaWrapper/MetaWrapper.js +3 -2
- package/build/esm/components/MetaWrapper/MetaWrapper.js.map +1 -0
- package/build/esm/components/Paginator/Paginator.d.ts +2 -3
- package/build/esm/components/Paginator/Paginator.js +25 -29
- package/build/esm/components/Paginator/Paginator.js.map +1 -0
- package/build/esm/components/Paginator/components/NavigationButton.d.ts +2 -3
- package/build/esm/components/Paginator/components/NavigationButton.js +6 -5
- package/build/esm/components/Paginator/components/NavigationButton.js.map +1 -0
- package/build/esm/components/Paginator/components/PaginatorItem.d.ts +2 -3
- package/build/esm/components/Paginator/components/PaginatorItem.js +13 -11
- package/build/esm/components/Paginator/components/PaginatorItem.js.map +1 -0
- package/build/esm/components/Paginator/types.d.ts +3 -3
- package/build/esm/components/Paginator/types.js +2 -1
- package/build/esm/components/Paginator/types.js.map +1 -0
- package/build/esm/components/Paginator/utils.d.ts +2 -2
- package/build/esm/components/Paginator/utils.js +2 -1
- package/build/esm/components/Paginator/utils.js.map +1 -0
- package/build/esm/components/PostCard/PostCard.css +7 -8
- package/build/esm/components/PostCard/PostCard.d.ts +2 -3
- package/build/esm/components/PostCard/PostCard.js +17 -25
- package/build/esm/components/PostCard/PostCard.js.map +1 -0
- package/build/esm/components/PostInfo/PostInfo.d.ts +2 -3
- package/build/esm/components/PostInfo/PostInfo.js +13 -15
- package/build/esm/components/PostInfo/PostInfo.js.map +1 -0
- package/build/esm/components/PostInfo/SuggestPostInfo.d.ts +2 -3
- package/build/esm/components/PostInfo/SuggestPostInfo.js +12 -15
- package/build/esm/components/PostInfo/SuggestPostInfo.js.map +1 -0
- package/build/esm/components/PostInfo/components/Date.d.ts +2 -3
- package/build/esm/components/PostInfo/components/Date.js +10 -8
- package/build/esm/components/PostInfo/components/Date.js.map +1 -0
- package/build/esm/components/PostInfo/components/ReadingTime.d.ts +2 -3
- package/build/esm/components/PostInfo/components/ReadingTime.js +6 -8
- package/build/esm/components/PostInfo/components/ReadingTime.js.map +1 -0
- package/build/esm/components/PostInfo/components/Save.d.ts +2 -3
- package/build/esm/components/PostInfo/components/Save.js +14 -16
- package/build/esm/components/PostInfo/components/Save.js.map +1 -0
- package/build/esm/components/PostInfo/components/Sharing.d.ts +1 -2
- package/build/esm/components/PostInfo/components/Sharing.js +17 -17
- package/build/esm/components/PostInfo/components/Sharing.js.map +1 -0
- package/build/esm/components/Posts/Posts.d.ts +4 -4
- package/build/esm/components/Posts/Posts.js +15 -26
- package/build/esm/components/Posts/Posts.js.map +1 -0
- package/build/esm/components/PostsEmpty/PostsEmpty.d.ts +1 -2
- package/build/esm/components/PostsEmpty/PostsEmpty.js +5 -6
- package/build/esm/components/PostsEmpty/PostsEmpty.js.map +1 -0
- package/build/esm/components/PostsError/PostsError.d.ts +1 -2
- package/build/esm/components/PostsError/PostsError.js +6 -9
- package/build/esm/components/PostsError/PostsError.js.map +1 -0
- package/build/esm/components/Prompt/Prompt.d.ts +1 -2
- package/build/esm/components/Prompt/Prompt.js +10 -12
- package/build/esm/components/Prompt/Prompt.js.map +1 -0
- package/build/esm/components/PromptSignIn/PromptSignIn.d.ts +4 -4
- package/build/esm/components/PromptSignIn/PromptSignIn.js +6 -5
- package/build/esm/components/PromptSignIn/PromptSignIn.js.map +1 -0
- package/build/esm/components/PromptSignIn/hooks/usePromptSignInProps.d.ts +2 -2
- package/build/esm/components/PromptSignIn/hooks/usePromptSignInProps.js +5 -4
- package/build/esm/components/PromptSignIn/hooks/usePromptSignInProps.js.map +1 -0
- package/build/esm/components/Search/Search.d.ts +2 -3
- package/build/esm/components/Search/Search.js +17 -17
- package/build/esm/components/Search/Search.js.map +1 -0
- package/build/esm/components/Wrapper/Wrapper.d.ts +3 -3
- package/build/esm/components/Wrapper/Wrapper.js +6 -5
- package/build/esm/components/Wrapper/Wrapper.js.map +1 -0
- package/build/esm/constants.d.ts +2 -2
- package/build/esm/constants.js +3 -2
- package/build/esm/constants.js.map +1 -0
- package/build/esm/constructor/BlogConstructorProvider.d.ts +7 -7
- package/build/esm/constructor/BlogConstructorProvider.js +20 -18
- package/build/esm/constructor/BlogConstructorProvider.js.map +1 -0
- package/build/esm/constructor/blocksMap.d.ts +12 -12
- package/build/esm/constructor/blocksMap.js +15 -14
- package/build/esm/constructor/blocksMap.js.map +1 -0
- package/build/esm/containers/BlogPage/BlogPage.d.ts +4 -4
- package/build/esm/containers/BlogPage/BlogPage.js +22 -25
- package/build/esm/containers/BlogPage/BlogPage.js.map +1 -0
- package/build/esm/containers/BlogPostPage/BlogPostPage.css +0 -8
- package/build/esm/containers/BlogPostPage/BlogPostPage.d.ts +6 -5
- package/build/esm/containers/BlogPostPage/BlogPostPage.js +28 -30
- package/build/esm/containers/BlogPostPage/BlogPostPage.js.map +1 -0
- package/build/esm/contexts/DeviceContext.d.ts +2 -2
- package/build/esm/contexts/DeviceContext.js +3 -2
- package/build/esm/contexts/DeviceContext.js.map +1 -0
- package/build/esm/contexts/FeedContext.d.ts +2 -2
- package/build/esm/contexts/FeedContext.js +3 -2
- package/build/esm/contexts/FeedContext.js.map +1 -0
- package/build/esm/contexts/LikesContext.d.ts +2 -2
- package/build/esm/contexts/LikesContext.js +3 -2
- package/build/esm/contexts/LikesContext.js.map +1 -0
- package/build/esm/contexts/LocaleContext.d.ts +2 -2
- package/build/esm/contexts/LocaleContext.js +3 -2
- package/build/esm/contexts/LocaleContext.js.map +1 -0
- package/build/esm/contexts/MobileContext.d.ts +1 -1
- package/build/esm/contexts/MobileContext.js +3 -2
- package/build/esm/contexts/MobileContext.js.map +1 -0
- package/build/esm/contexts/PostPageContext.d.ts +4 -2
- package/build/esm/contexts/PostPageContext.js +3 -2
- package/build/esm/contexts/PostPageContext.js.map +1 -0
- package/build/esm/contexts/RouterContext.d.ts +2 -2
- package/build/esm/contexts/RouterContext.js +3 -2
- package/build/esm/contexts/RouterContext.js.map +1 -0
- package/build/esm/contexts/SettingsContext.d.ts +1 -1
- package/build/esm/contexts/SettingsContext.js +3 -2
- package/build/esm/contexts/SettingsContext.js.map +1 -0
- package/build/esm/contexts/theme/ThemeContext.d.ts +2 -2
- package/build/esm/contexts/theme/ThemeContext.js +4 -3
- package/build/esm/contexts/theme/ThemeContext.js.map +1 -0
- package/build/esm/contexts/theme/ThemeProvider.d.ts +4 -4
- package/build/esm/contexts/theme/ThemeProvider.js +8 -7
- package/build/esm/contexts/theme/ThemeProvider.js.map +1 -0
- package/build/esm/contexts/theme/ThemeValueContext.d.ts +1 -1
- package/build/esm/contexts/theme/ThemeValueContext.js +3 -2
- package/build/esm/contexts/theme/ThemeValueContext.js.map +1 -0
- package/build/esm/contexts/theme/index.d.ts +6 -6
- package/build/esm/contexts/theme/index.js +7 -6
- package/build/esm/contexts/theme/index.js.map +1 -0
- package/build/esm/contexts/theme/useTheme.d.ts +1 -1
- package/build/esm/contexts/theme/useTheme.js +4 -3
- package/build/esm/contexts/theme/useTheme.js.map +1 -0
- package/build/esm/contexts/theme/useThemeValue.d.ts +1 -1
- package/build/esm/contexts/theme/useThemeValue.js +4 -3
- package/build/esm/contexts/theme/useThemeValue.js.map +1 -0
- package/build/esm/contexts/theme/withTheme.d.ts +2 -2
- package/build/esm/contexts/theme/withTheme.js +6 -4
- package/build/esm/contexts/theme/withTheme.js.map +1 -0
- package/build/esm/contexts/theme/withThemeValue.d.ts +2 -2
- package/build/esm/contexts/theme/withThemeValue.js +6 -4
- package/build/esm/contexts/theme/withThemeValue.js.map +1 -0
- package/build/esm/counters/metrika.js +2 -1
- package/build/esm/counters/metrika.js.map +1 -0
- package/build/esm/counters/utils.js +2 -1
- package/build/esm/counters/utils.js.map +1 -0
- package/build/esm/hooks/useAriaAttributes.js +5 -4
- package/build/esm/hooks/useAriaAttributes.js.map +1 -0
- package/build/esm/hooks/useExtendedComponentMap.d.ts +18 -17
- package/build/esm/hooks/useExtendedComponentMap.js +4 -3
- package/build/esm/hooks/useExtendedComponentMap.js.map +1 -0
- package/build/esm/hooks/useHover.d.ts +1 -1
- package/build/esm/hooks/useHover.js +3 -2
- package/build/esm/hooks/useHover.js.map +1 -0
- package/build/esm/hooks/useIsIPhone.js +5 -4
- package/build/esm/hooks/useIsIPhone.js.map +1 -0
- package/build/esm/hooks/useLikes.d.ts +1 -1
- package/build/esm/hooks/useLikes.js +7 -6
- package/build/esm/hooks/useLikes.js.map +1 -0
- package/build/esm/hooks/useOpenCloseTimer.js +5 -4
- package/build/esm/hooks/useOpenCloseTimer.js.map +1 -0
- package/build/esm/i18n/index.d.ts +5 -1
- package/build/esm/i18n/index.js +2 -1
- package/build/esm/i18n/index.js.map +1 -0
- package/build/esm/icons/Close.d.ts +2 -2
- package/build/esm/icons/Close.js +4 -4
- package/build/esm/icons/Close.js.map +1 -0
- package/build/esm/icons/DropdownArrow.d.ts +2 -2
- package/build/esm/icons/DropdownArrow.js +4 -4
- package/build/esm/icons/DropdownArrow.js.map +1 -0
- package/build/esm/icons/Save.d.ts +2 -2
- package/build/esm/icons/Save.js +4 -4
- package/build/esm/icons/Save.js.map +1 -0
- package/build/esm/icons/SaveFilled.d.ts +2 -2
- package/build/esm/icons/SaveFilled.js +4 -4
- package/build/esm/icons/SaveFilled.js.map +1 -0
- package/build/esm/icons/SearchIcon.d.ts +2 -2
- package/build/esm/icons/SearchIcon.js +4 -4
- package/build/esm/icons/SearchIcon.js.map +1 -0
- package/build/esm/icons/ShareArrowUp.d.ts +2 -2
- package/build/esm/icons/ShareArrowUp.js +4 -4
- package/build/esm/icons/ShareArrowUp.js.map +1 -0
- package/build/esm/icons/Time.d.ts +2 -2
- package/build/esm/icons/Time.js +4 -4
- package/build/esm/icons/Time.js.map +1 -0
- package/build/esm/index.d.ts +8 -7
- package/build/esm/index.js +9 -7
- package/build/esm/index.js.map +1 -0
- package/build/esm/models/blocks.d.ts +4 -4
- package/build/esm/models/blocks.js +2 -1
- package/build/esm/models/blocks.js.map +1 -0
- package/build/esm/models/common.d.ts +3 -3
- package/build/esm/models/common.js +2 -1
- package/build/esm/models/common.js.map +1 -0
- package/build/esm/models/locale.js +2 -1
- package/build/esm/models/locale.js.map +1 -0
- package/build/esm/models/paddings.js +2 -1
- package/build/esm/models/paddings.js.map +1 -0
- package/build/esm/package.json +1 -0
- package/build/esm/schema/blocks.d.ts +10 -10
- package/build/esm/schema/blocks.js +11 -10
- package/build/esm/schema/blocks.js.map +1 -0
- package/build/esm/schema/common.js +2 -1
- package/build/esm/schema/common.js.map +1 -0
- package/build/esm/schema/headers.d.ts +1 -1
- package/build/esm/schema/headers.js +2 -1
- package/build/esm/schema/headers.js.map +1 -0
- package/build/esm/schema/index.d.ts +8 -2
- package/build/esm/schema/index.js +5 -4
- package/build/esm/schema/index.js.map +1 -0
- package/build/esm/schema/utils.d.ts +1 -1
- package/build/esm/schema/utils.js +2 -1
- package/build/esm/schema/utils.js.map +1 -0
- package/build/esm/utils/cn.js +2 -1
- package/build/esm/utils/cn.js.map +1 -0
- package/build/esm/utils/common.d.ts +17 -18
- package/build/esm/utils/common.js +5 -4
- package/build/esm/utils/common.js.map +1 -0
- package/build/esm/utils/date.js +2 -1
- package/build/esm/utils/date.js.map +1 -0
- package/build/esm/utils/index.d.ts +1 -0
- package/build/esm/utils/index.js +2 -0
- package/build/esm/utils/index.js.map +1 -0
- package/build/esm/utils/svg.js +2 -1
- package/build/esm/utils/svg.js.map +1 -0
- package/package.json +37 -24
- package/server/data/config.js +1 -1
- package/server/data/contentFilter.js +5 -3
- package/server/data/createReadableContent.js +1 -1
- package/server/data/sanitizeMeta.d.ts +5 -5
- package/server/data/sanitizeMeta.js +1 -1
- package/server/data/transformPageContent.js +5 -3
- package/server/data/transformPost.js +15 -4
- package/server/index.d.ts +4 -4
- package/server/models/blocks.d.ts +2 -2
- package/server/models/blocks.js +1 -1
- package/server/models/common.d.ts +2 -2
- package/server/models/common.js +5 -5
- package/server/models/locale.js +1 -1
- package/server/models/paddings.js +1 -1
- package/styles/storybook/common.scss +7 -0
- package/styles/styles.css +0 -8
- package/styles/yfm.css +0 -8
- package/styles/yfm.scss +0 -9
@@ -2,27 +2,27 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.Form = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
|
-
const
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
6
|
+
const React = tslib_1.__importStar(require("react"));
|
6
7
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
7
|
-
const Wrapper_1 = require("../../components/Wrapper/Wrapper");
|
8
|
-
const paddings_1 = require("../../models/paddings");
|
9
|
-
const cn_1 = require("../../utils/cn");
|
8
|
+
const Wrapper_1 = require("../../components/Wrapper/Wrapper.js");
|
9
|
+
const paddings_1 = require("../../models/paddings.js");
|
10
|
+
const cn_1 = require("../../utils/cn.js");
|
10
11
|
const b = (0, cn_1.block)('form-block');
|
11
12
|
const Form = (_a) => {
|
12
13
|
var { paddingTop, paddingBottom } = _a, props = tslib_1.__rest(_a, ["paddingTop", "paddingBottom"]);
|
13
14
|
const { formData, border = 'shadow' } = props;
|
14
|
-
const [contentLoaded, setContentLoaded] =
|
15
|
+
const [contentLoaded, setContentLoaded] = React.useState(false);
|
15
16
|
const onContentLoad = () => {
|
16
17
|
setContentLoaded(true);
|
17
18
|
};
|
18
19
|
if (!formData) {
|
19
20
|
return null;
|
20
21
|
}
|
21
|
-
return (
|
22
|
+
return ((0, jsx_runtime_1.jsx)(Wrapper_1.Wrapper, { paddings: {
|
22
23
|
[paddings_1.PaddingsDirections.top]: paddingTop,
|
23
24
|
[paddings_1.PaddingsDirections.bottom]: paddingBottom,
|
24
|
-
}, className: b('wrapper') },
|
25
|
-
react_1.default.createElement("div", { className: b('container', { hidden: !contentLoaded, border }) },
|
26
|
-
react_1.default.createElement(page_constructor_1.InnerForm, { className: b('form'), formData: formData, onContentLoad: onContentLoad }))));
|
25
|
+
}, className: b('wrapper'), children: (0, jsx_runtime_1.jsx)("div", { className: b('container', { hidden: !contentLoaded, border }), children: (0, jsx_runtime_1.jsx)(page_constructor_1.InnerForm, { className: b('form'), formData: formData, onContentLoad: onContentLoad }) }) }));
|
27
26
|
};
|
28
|
-
exports.Form = Form;
|
27
|
+
exports.Form = Form;
|
28
|
+
//# sourceMappingURL=Form.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Form.js","sourceRoot":"../../../../src","sources":["blocks/Form/Form.tsx"],"names":[],"mappings":";;;;;AAAA,qDAA+B;AAE/B,mEAAuD;AAEvD,iEAAyD;AAEzD,uDAAyD;AACzD,0CAAqC;AAIrC,MAAM,CAAC,GAAG,IAAA,UAAK,EAAC,YAAY,CAAC,CAAC;AAEvB,MAAM,IAAI,GAAG,CAAC,EAAgD,EAAE,EAAE;QAApD,EAAC,UAAU,EAAE,aAAa,OAAsB,EAAjB,KAAK,sBAApC,+BAAqC,CAAD;IACrD,MAAM,EAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAC,GAAG,KAAK,CAAC;IAC5C,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhE,MAAM,aAAa,GAAG,GAAG,EAAE;QACvB,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CACH,uBAAC,iBAAO,IACJ,QAAQ,EAAE;YACN,CAAC,6BAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,6BAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;SAC7C,EACD,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,YAEvB,gCAAK,SAAS,EAAE,CAAC,CAAC,WAAW,EAAE,EAAC,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,EAAC,CAAC,YAC5D,uBAAC,4BAAS,IACN,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,EACpB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,GAC9B,GACA,GACA,CACb,CAAC;AACN,CAAC,CAAC;AA7BW,QAAA,IAAI,QA6Bf","sourcesContent":["import * as React from 'react';\n\nimport {InnerForm} from '@gravity-ui/page-constructor';\n\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {FormProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './Form.scss';\n\nconst b = block('form-block');\n\nexport const Form = ({paddingTop, paddingBottom, ...props}: FormProps) => {\n const {formData, border = 'shadow'} = props;\n const [contentLoaded, setContentLoaded] = React.useState(false);\n\n const onContentLoad = () => {\n setContentLoaded(true);\n };\n\n if (!formData) {\n return null;\n }\n\n return (\n <Wrapper\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n }}\n className={b('wrapper')}\n >\n <div className={b('container', {hidden: !contentLoaded, border})}>\n <InnerForm\n className={b('form')}\n formData={formData}\n onContentLoad={onContentLoad}\n />\n </div>\n </Wrapper>\n );\n};\n"]}
|
@@ -2,8 +2,8 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.Media = void 0;
|
4
4
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
5
|
-
const common_1 = require("../../models/common");
|
6
|
-
const common_2 = require("../../schema/common");
|
5
|
+
const common_1 = require("../../models/common.js");
|
6
|
+
const common_2 = require("../../schema/common.js");
|
7
7
|
const { common: { BlockBaseProps }, components: { YandexFormProps }, subBlocks: { HubspotFormProps }, } = page_constructor_1.validators;
|
8
8
|
exports.Media = {
|
9
9
|
[common_1.BlockType.Media]: {
|
@@ -31,4 +31,5 @@ exports.Media = {
|
|
31
31
|
enum: ['shadow', 'line', 'none'],
|
32
32
|
} }),
|
33
33
|
},
|
34
|
-
};
|
34
|
+
};
|
35
|
+
//# sourceMappingURL=schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Form/schema.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,mDAA8C;AAC9C,mDAAkD;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,EACxB,UAAU,EAAE,EAAC,eAAe,EAAC,EAC7B,SAAS,EAAE,EAAC,gBAAgB,EAAC,GAChC,GAAG,6BAAU,CAAC;AAEF,QAAA,KAAK,GAAG;IACjB,CAAC,kBAAS,CAAC,KAAK,CAAC,EAAE;QACf,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,UAAU,gDACH,cAAc,GACd,sBAAa,KAChB,QAAQ,EAAE;gBACN,KAAK,EAAE;oBACH;wBACI,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE,QAAQ;wBACpB,UAAU,EAAE;4BACR,MAAM,EAAE,eAAe;yBAC1B;qBACJ;oBACD;wBACI,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE,SAAS;wBACrB,UAAU,EAAE;4BACR,OAAO,EAAE,gBAAgB;yBAC5B;qBACJ;iBACJ;aACJ,EACD,MAAM,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;aACnC,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nconst {\n common: {BlockBaseProps},\n components: {YandexFormProps},\n subBlocks: {HubspotFormProps},\n} = validators;\n\nexport const Media = {\n [BlockType.Media]: {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n formData: {\n oneOf: [\n {\n type: 'object',\n optionName: 'yandex',\n properties: {\n yandex: YandexFormProps,\n },\n },\n {\n type: 'object',\n optionName: 'hubspot',\n properties: {\n hubspot: HubspotFormProps,\n },\n },\n ],\n },\n border: {\n type: 'string',\n enum: ['shadow', 'line', 'none'],\n },\n },\n },\n};\n"]}
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
export declare const Header: (props: HeaderProps) => React.JSX.Element;
|
1
|
+
import { HeaderProps } from "../../models/blocks.js";
|
2
|
+
export declare const Header: (props: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -2,17 +2,18 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.Header = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
|
-
const
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
6
|
+
const React = tslib_1.__importStar(require("react"));
|
6
7
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
7
|
-
const PostInfo_1 = require("../../components/PostInfo/PostInfo");
|
8
|
-
const Wrapper_1 = require("../../components/Wrapper/Wrapper");
|
9
|
-
const constants_1 = require("../../constants");
|
10
|
-
const LocaleContext_1 = require("../../contexts/LocaleContext");
|
11
|
-
const PostPageContext_1 = require("../../contexts/PostPageContext");
|
12
|
-
const paddings_1 = require("../../models/paddings");
|
13
|
-
const common_1 = require("../../utils/common");
|
14
|
-
const SettingsContext_1 = require("../../contexts/SettingsContext");
|
15
|
-
const utils_1 = require("../../counters/utils");
|
8
|
+
const PostInfo_1 = require("../../components/PostInfo/PostInfo.js");
|
9
|
+
const Wrapper_1 = require("../../components/Wrapper/Wrapper.js");
|
10
|
+
const constants_1 = require("../../constants.js");
|
11
|
+
const LocaleContext_1 = require("../../contexts/LocaleContext.js");
|
12
|
+
const PostPageContext_1 = require("../../contexts/PostPageContext.js");
|
13
|
+
const paddings_1 = require("../../models/paddings.js");
|
14
|
+
const common_1 = require("../../utils/common.js");
|
15
|
+
const SettingsContext_1 = require("../../contexts/SettingsContext.js");
|
16
|
+
const utils_1 = require("../../counters/utils.js");
|
16
17
|
const analyticsEventsContainer = {
|
17
18
|
sharing: (0, common_1.prepareAnalyticsEvent)({ name: constants_1.DefaultGoalIds.shareTop }),
|
18
19
|
save: (0, common_1.prepareAnalyticsEvent)({ name: constants_1.DefaultGoalIds.saveTop }),
|
@@ -23,9 +24,9 @@ const breadcrumbsGoals = (0, common_1.prepareAnalyticsEvent)({
|
|
23
24
|
});
|
24
25
|
const Header = (props) => {
|
25
26
|
const { theme, paddingTop, paddingBottom } = props;
|
26
|
-
const { post } =
|
27
|
-
const { locale } =
|
28
|
-
const { getBlogPath = common_1.getBlogPath } =
|
27
|
+
const { post, breadcrumbs: customBreadcrumbs = {} } = React.useContext(PostPageContext_1.PostPageContext);
|
28
|
+
const { locale } = React.useContext(LocaleContext_1.LocaleContext);
|
29
|
+
const { getBlogPath = common_1.getBlogPath } = React.useContext(SettingsContext_1.SettingsContext);
|
29
30
|
const blogPath = getBlogPath(locale.pathPrefix || '');
|
30
31
|
const { description, title, id, date, readingTime, tags } = post;
|
31
32
|
const breadcrumbs = (0, common_1.getBreadcrumbs)({ tags, blogPath });
|
@@ -33,11 +34,10 @@ const Header = (props) => {
|
|
33
34
|
breadcrumbs.theme = 'dark';
|
34
35
|
}
|
35
36
|
breadcrumbs.analyticsEvents = breadcrumbsGoals;
|
36
|
-
return (
|
37
|
+
return ((0, jsx_runtime_1.jsx)(Wrapper_1.Wrapper, { paddings: {
|
37
38
|
[paddings_1.PaddingsDirections.top]: paddingTop,
|
38
39
|
[paddings_1.PaddingsDirections.bottom]: paddingBottom,
|
39
|
-
} },
|
40
|
-
react_1.default.createElement(page_constructor_1.HeaderBlock, Object.assign({}, props, { title: title, description: description, breadcrumbs: breadcrumbs }),
|
41
|
-
react_1.default.createElement(PostInfo_1.PostInfo, { postId: id, date: date, readingTime: readingTime, analyticsEventsContainer: analyticsEventsContainer, theme: theme, qa: "blog-header-meta-container" }))));
|
40
|
+
}, children: (0, jsx_runtime_1.jsx)(page_constructor_1.HeaderBlock, Object.assign({}, props, { title: title, description: description, breadcrumbs: Object.assign(Object.assign({}, breadcrumbs), customBreadcrumbs), children: (0, jsx_runtime_1.jsx)(PostInfo_1.PostInfo, { postId: id, date: date, readingTime: readingTime, analyticsEventsContainer: analyticsEventsContainer, theme: theme, qa: "blog-header-meta-container" }) })) }));
|
42
41
|
};
|
43
|
-
exports.Header = Header;
|
42
|
+
exports.Header = Header;
|
43
|
+
//# sourceMappingURL=Header.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Header.js","sourceRoot":"../../../../src","sources":["blocks/Header/Header.tsx"],"names":[],"mappings":";;;;;AAAA,qDAA+B;AAE/B,mEAA8E;AAE9E,oEAA4D;AAC5D,iEAAyD;AACzD,kDAA+C;AAC/C,mEAA2D;AAC3D,uEAA+D;AAE/D,uDAAyD;AACzD,kDAI4B;AAC5B,uEAA+D;AAC/D,mDAAsD;AAEtD,MAAM,wBAAwB,GAAwC;IAClE,OAAO,EAAE,IAAA,8BAAqB,EAAC,EAAC,IAAI,EAAE,0BAAc,CAAC,QAAQ,EAAC,CAAC;IAC/D,IAAI,EAAE,IAAA,8BAAqB,EAAC,EAAC,IAAI,EAAE,0BAAc,CAAC,OAAO,EAAC,CAAC;CAC9D,CAAC;AAEF,MAAM,gBAAgB,GAAG,IAAA,8BAAqB,EAAC;IAC3C,IAAI,EAAE,0BAAc,CAAC,cAAc;IACnC,OAAO,EAAE,wBAAgB,CAAC,SAAS;CACtC,CAAC,CAAC;AAEI,MAAM,MAAM,GAAG,CAAC,KAAkB,EAAE,EAAE;IACzC,MAAM,EAAC,KAAK,EAAE,UAAU,EAAE,aAAa,EAAC,GAAG,KAAK,CAAC;IACjD,MAAM,EAAC,IAAI,EAAE,WAAW,EAAE,iBAAiB,GAAG,EAAE,EAAC,GAAG,KAAK,CAAC,UAAU,CAAC,iCAAe,CAAC,CAAC;IACtF,MAAM,EAAC,MAAM,EAAC,GAAG,KAAK,CAAC,UAAU,CAAC,6BAAa,CAAC,CAAC;IACjD,MAAM,EAAC,WAAW,GAAG,oBAAkB,EAAC,GAAG,KAAK,CAAC,UAAU,CAAC,iCAAe,CAAC,CAAC;IAC7E,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;IAEtD,MAAM,EAAC,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAC,GAAG,IAAI,CAAC;IAE/D,MAAM,WAAW,GAAG,IAAA,uBAAc,EAAC,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC,CAAC;IAErD,IAAI,KAAK,KAAK,MAAM,IAAI,WAAW,EAAE,CAAC;QAClC,WAAW,CAAC,KAAK,GAAG,MAAM,CAAC;IAC/B,CAAC;IAED,WAAW,CAAC,eAAe,GAAG,gBAAgB,CAAC;IAE/C,OAAO,CACH,uBAAC,iBAAO,IACJ,QAAQ,EAAE;YACN,CAAC,6BAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,6BAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;SAC7C,YAED,uBAAC,8BAAW,oBACJ,KAAK,IACT,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,WAAW,kCAAM,WAAW,GAAK,iBAAiB,aAElD,uBAAC,mBAAQ,IACL,MAAM,EAAE,EAAE,EACV,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,EACxB,wBAAwB,EAAE,wBAAwB,EAClD,KAAK,EAAE,KAAK,EACZ,EAAE,EAAC,4BAA4B,GACjC,IACQ,GACR,CACb,CAAC;AACN,CAAC,CAAC;AAzCW,QAAA,MAAM,UAyCjB","sourcesContent":["import * as React from 'react';\n\nimport {AnalyticsEventsProp, HeaderBlock} from '@gravity-ui/page-constructor';\n\nimport {PostInfo} from '../../components/PostInfo/PostInfo';\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {DefaultGoalIds} from '../../constants';\nimport {LocaleContext} from '../../contexts/LocaleContext';\nimport {PostPageContext} from '../../contexts/PostPageContext';\nimport {HeaderProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {\n getBreadcrumbs,\n getBlogPath as getDefaultBlogPath,\n prepareAnalyticsEvent,\n} from '../../utils/common';\nimport {SettingsContext} from '../../contexts/SettingsContext';\nimport {AnalyticsCounter} from '../../counters/utils';\n\nconst analyticsEventsContainer: Record<string, AnalyticsEventsProp> = {\n sharing: prepareAnalyticsEvent({name: DefaultGoalIds.shareTop}),\n save: prepareAnalyticsEvent({name: DefaultGoalIds.saveTop}),\n};\n\nconst breadcrumbsGoals = prepareAnalyticsEvent({\n name: DefaultGoalIds.breadcrumbsTop,\n counter: AnalyticsCounter.CrossSite,\n});\n\nexport const Header = (props: HeaderProps) => {\n const {theme, paddingTop, paddingBottom} = props;\n const {post, breadcrumbs: customBreadcrumbs = {}} = React.useContext(PostPageContext);\n const {locale} = React.useContext(LocaleContext);\n const {getBlogPath = getDefaultBlogPath} = React.useContext(SettingsContext);\n const blogPath = getBlogPath(locale.pathPrefix || '');\n\n const {description, title, id, date, readingTime, tags} = post;\n\n const breadcrumbs = getBreadcrumbs({tags, blogPath});\n\n if (theme === 'dark' && breadcrumbs) {\n breadcrumbs.theme = 'dark';\n }\n\n breadcrumbs.analyticsEvents = breadcrumbsGoals;\n\n return (\n <Wrapper\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n }}\n >\n <HeaderBlock\n {...props}\n title={title}\n description={description}\n breadcrumbs={{...breadcrumbs, ...customBreadcrumbs}}\n >\n <PostInfo\n postId={id}\n date={date}\n readingTime={readingTime}\n analyticsEventsContainer={analyticsEventsContainer}\n theme={theme}\n qa=\"blog-header-meta-container\"\n />\n </HeaderBlock>\n </Wrapper>\n );\n};\n"]}
|
@@ -2,8 +2,8 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.Header = void 0;
|
4
4
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
5
|
-
const common_1 = require("../../models/common");
|
6
|
-
const common_2 = require("../../schema/common");
|
5
|
+
const common_1 = require("../../models/common.js");
|
6
|
+
const common_2 = require("../../schema/common.js");
|
7
7
|
const { blocks: { HeaderProperties }, common: { BlockBaseProps }, } = page_constructor_1.validators;
|
8
8
|
exports.Header = {
|
9
9
|
[common_1.BlockType.Header]: {
|
@@ -11,4 +11,5 @@ exports.Header = {
|
|
11
11
|
additionalProperties: false,
|
12
12
|
properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase), HeaderProperties),
|
13
13
|
},
|
14
|
-
};
|
14
|
+
};
|
15
|
+
//# sourceMappingURL=schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Header/schema.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,mDAA8C;AAC9C,mDAAkD;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,gBAAgB,EAAC,EAC1B,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,6BAAU,CAAC;AAEF,QAAA,MAAM,GAAG;IAClB,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE;QAChB,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,UAAU,gDACH,cAAc,GACd,sBAAa,GACb,gBAAgB,CACtB;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nconst {\n blocks: {HeaderProperties},\n common: {BlockBaseProps},\n} = validators;\n\nexport const Header = {\n [BlockType.Header]: {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n ...HeaderProperties,\n },\n },\n};\n"]}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import
|
2
|
-
import { LayoutProps } from
|
3
|
-
export declare const Layout: ({ fullWidth, mobileOrder, children, paddingTop, paddingBottom, }: PropsWithChildren<LayoutProps>) =>
|
1
|
+
import * as React from 'react';
|
2
|
+
import { LayoutProps } from "../../models/blocks.js";
|
3
|
+
export declare const Layout: ({ fullWidth, mobileOrder, children, paddingTop, paddingBottom, }: React.PropsWithChildren<LayoutProps>) => import("react/jsx-runtime").JSX.Element;
|
@@ -2,14 +2,15 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.Layout = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
|
-
const
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
6
|
+
const React = tslib_1.__importStar(require("react"));
|
6
7
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
7
|
-
const Wrapper_1 = require("../../components/Wrapper/Wrapper");
|
8
|
-
const paddings_1 = require("../../models/paddings");
|
9
|
-
const cn_1 = require("../../utils/cn");
|
8
|
+
const Wrapper_1 = require("../../components/Wrapper/Wrapper.js");
|
9
|
+
const paddings_1 = require("../../models/paddings.js");
|
10
|
+
const cn_1 = require("../../utils/cn.js");
|
10
11
|
const b = (0, cn_1.block)('layout');
|
11
12
|
const Layout = ({ fullWidth, mobileOrder, children, paddingTop = 'xs', paddingBottom = 'xs', }) => {
|
12
|
-
const layout =
|
13
|
+
const layout = React.useMemo(() => {
|
13
14
|
const layoutConfig = {
|
14
15
|
leftCol: {
|
15
16
|
sizes: { all: 12, lg: 8 },
|
@@ -34,8 +35,8 @@ const Layout = ({ fullWidth, mobileOrder, children, paddingTop = 'xs', paddingBo
|
|
34
35
|
}
|
35
36
|
return layoutConfig;
|
36
37
|
}, [fullWidth, mobileOrder]);
|
37
|
-
const renderChildren = (blockChildren) =>
|
38
|
-
const { left, right } =
|
38
|
+
const renderChildren = (blockChildren) => React.Children.map(blockChildren, (child, i) => ((0, jsx_runtime_1.jsx)("div", { className: b('item'), children: child }, i)));
|
39
|
+
const { left, right } = React.useMemo(() => children === null || children === void 0 ? void 0 : children.reduce((sortedChildren, child) => {
|
39
40
|
var _a, _b;
|
40
41
|
if (((_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.column) === 'left') {
|
41
42
|
sortedChildren.left.push(child);
|
@@ -45,12 +46,10 @@ const Layout = ({ fullWidth, mobileOrder, children, paddingTop = 'xs', paddingBo
|
|
45
46
|
}
|
46
47
|
return sortedChildren;
|
47
48
|
}, { left: [], right: [] }), [children]);
|
48
|
-
return (
|
49
|
+
return ((0, jsx_runtime_1.jsx)(Wrapper_1.Wrapper, { paddings: {
|
49
50
|
[paddings_1.PaddingsDirections.top]: paddingTop,
|
50
51
|
[paddings_1.PaddingsDirections.bottom]: paddingBottom,
|
51
|
-
} },
|
52
|
-
react_1.default.createElement(page_constructor_1.Row, { className: b('row'), noGutter: true },
|
53
|
-
react_1.default.createElement(page_constructor_1.Col, Object.assign({ className: b('left-col') }, layout.leftCol), left && renderChildren(left)),
|
54
|
-
react_1.default.createElement(page_constructor_1.Col, Object.assign({ className: b('right-col') }, layout.rightCol), right && renderChildren(right)))));
|
52
|
+
}, children: (0, jsx_runtime_1.jsxs)(page_constructor_1.Row, { className: b('row'), noGutter: true, children: [(0, jsx_runtime_1.jsx)(page_constructor_1.Col, Object.assign({ className: b('left-col') }, layout.leftCol, { children: left && renderChildren(left) })), (0, jsx_runtime_1.jsx)(page_constructor_1.Col, Object.assign({ className: b('right-col') }, layout.rightCol, { children: right && renderChildren(right) }))] }) }));
|
55
53
|
};
|
56
|
-
exports.Layout = Layout;
|
54
|
+
exports.Layout = Layout;
|
55
|
+
//# sourceMappingURL=Layout.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Layout.js","sourceRoot":"../../../../src","sources":["blocks/Layout/Layout.tsx"],"names":[],"mappings":";;;;;AAAA,qDAA+B;AAE/B,mEAKsC;AAEtC,iEAAyD;AAEzD,uDAAyD;AACzD,0CAAqC;AAIrC,MAAM,CAAC,GAAG,IAAA,UAAK,EAAC,QAAQ,CAAC,CAAC;AAkBnB,MAAM,MAAM,GAAG,CAAC,EACnB,SAAS,EACT,WAAW,EACX,QAAQ,EACR,UAAU,GAAG,IAAI,EACjB,aAAa,GAAG,IAAI,GACe,EAAE,EAAE;IACvC,MAAM,MAAM,GAAe,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QAC1C,MAAM,YAAY,GAAe;YAC7B,OAAO,EAAE;gBACL,KAAK,EAAE,EAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAC;gBACvB,MAAM,EAAE,EAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAC;aAC1B;YACD,QAAQ,EAAE;gBACN,KAAK,EAAE,EAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAC;gBACvB,OAAO,EAAE;oBACL,GAAG,EAAE,CAAC;oBACN,EAAE,EAAE,CAAC;iBACR;gBACD,MAAM,EAAE,EAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAC;aAC1B;SACJ,CAAC;QAEF,IAAI,SAAS,EAAE,CAAC;YACZ,YAAY,CAAC,OAAO,CAAC,KAAK,GAAG,EAAC,GAAG,EAAE,EAAE,EAAC,CAAC;YACvC,YAAY,CAAC,QAAQ,CAAC,KAAK,GAAG,EAAC,GAAG,EAAE,EAAE,EAAC,CAAC;YACxC,YAAY,CAAC,QAAQ,CAAC,OAAO,GAAG,EAAC,GAAG,EAAE,CAAC,EAAC,CAAC;QAC7C,CAAC;QAED,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC5B,YAAY,CAAC,OAAO,CAAC,MAAM,GAAG,EAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAC,CAAC;QAClD,CAAC;QAED,OAAO,YAAY,CAAC;IACxB,CAAC,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;IAE7B,MAAM,cAAc,GAAG,CAAC,aAAiC,EAAE,EAAE,CACzD,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAC5C,gCAAa,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,YAC5B,KAAK,IADA,CAAC,CAEL,CACT,CAAC,CAAC;IAEP,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,KAAK,CAAC,OAAO,CAC/B,GAAG,EAAE,CACD,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CACZ,CAAC,cAAiC,EAAE,KAAyB,EAAE,EAAE;;QAC7D,IAAI,CAAA,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,0CAAE,IAAI,0CAAE,MAAM,MAAK,MAAM,EAAE,CAAC;YACxC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;aAAM,CAAC;YACJ,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,cAAc,CAAC;IAC1B,CAAC,EACD,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAC,CACxB,EACL,CAAC,QAAQ,CAAC,CACb,CAAC;IAEF,OAAO,CACH,uBAAC,iBAAO,IACJ,QAAQ,EAAE;YACN,CAAC,6BAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,6BAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;SAC7C,YAED,wBAAC,sBAAG,IAAC,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,QAAQ,mBAC9B,uBAAC,sBAAG,kBAAC,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,IAAM,MAAM,CAAC,OAAO,cAC5C,IAAI,IAAI,cAAc,CAAC,IAAI,CAAC,IAC3B,EACN,uBAAC,sBAAG,kBAAC,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,IAAM,MAAM,CAAC,QAAQ,cAC9C,KAAK,IAAI,cAAc,CAAC,KAAK,CAAC,IAC7B,IACJ,GACA,CACb,CAAC;AACN,CAAC,CAAC;AA5EW,QAAA,MAAM,UA4EjB","sourcesContent":["import * as React from 'react';\n\nimport {\n Col,\n GridColumnOrderSizesType,\n GridColumnSizesType,\n Row,\n} from '@gravity-ui/page-constructor';\n\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {LayoutProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './Layout.scss';\n\nconst b = block('layout');\n\ntype ColLayouts = {\n sizes: GridColumnSizesType;\n offsets?: GridColumnSizesType;\n orders?: GridColumnOrderSizesType;\n};\n\ntype LayoutType = {\n leftCol: ColLayouts;\n rightCol: ColLayouts;\n};\n\ntype SortedLayoutItems = {\n left: React.ReactElement[];\n right: React.ReactElement[];\n};\n\nexport const Layout = ({\n fullWidth,\n mobileOrder,\n children,\n paddingTop = 'xs',\n paddingBottom = 'xs',\n}: React.PropsWithChildren<LayoutProps>) => {\n const layout: LayoutType = React.useMemo(() => {\n const layoutConfig: LayoutType = {\n leftCol: {\n sizes: {all: 12, lg: 8},\n orders: {all: 1, lg: 1},\n },\n rightCol: {\n sizes: {all: 12, lg: 3},\n offsets: {\n all: 0,\n lg: 1,\n },\n orders: {all: 2, lg: 2},\n },\n };\n\n if (fullWidth) {\n layoutConfig.leftCol.sizes = {all: 12};\n layoutConfig.rightCol.sizes = {all: 12};\n layoutConfig.rightCol.offsets = {all: 0};\n }\n\n if (mobileOrder === 'reverse') {\n layoutConfig.leftCol.orders = {all: 3, lg: 1};\n }\n\n return layoutConfig;\n }, [fullWidth, mobileOrder]);\n\n const renderChildren = (blockChildren: React.ReactChild[]) =>\n React.Children.map(blockChildren, (child, i) => (\n <div key={i} className={b('item')}>\n {child}\n </div>\n ));\n\n const {left, right} = React.useMemo(\n () =>\n children?.reduce(\n (sortedChildren: SortedLayoutItems, child: React.ReactElement) => {\n if (child?.props?.data?.column === 'left') {\n sortedChildren.left.push(child);\n } else {\n sortedChildren.right.push(child);\n }\n return sortedChildren;\n },\n {left: [], right: []},\n ),\n [children],\n );\n\n return (\n <Wrapper\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n }}\n >\n <Row className={b('row')} noGutter>\n <Col className={b('left-col')} {...layout.leftCol}>\n {left && renderChildren(left)}\n </Col>\n <Col className={b('right-col')} {...layout.rightCol}>\n {right && renderChildren(right)}\n </Col>\n </Row>\n </Wrapper>\n );\n};\n"]}
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Layout = void 0;
|
4
4
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
5
5
|
const { common: { BlockBaseProps, ChildrenProps }, } = page_constructor_1.validators;
|
6
|
-
const common_1 = require("../../models/common");
|
7
|
-
const common_2 = require("../../schema/common");
|
6
|
+
const common_1 = require("../../models/common.js");
|
7
|
+
const common_2 = require("../../schema/common.js");
|
8
8
|
exports.Layout = {
|
9
9
|
[common_1.BlockType.Layout]: {
|
10
10
|
type: 'object',
|
@@ -15,4 +15,5 @@ exports.Layout = {
|
|
15
15
|
enum: ['reverse', 'straight'],
|
16
16
|
} }),
|
17
17
|
},
|
18
|
-
};
|
18
|
+
};
|
19
|
+
//# sourceMappingURL=schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Layout/schema.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAE,aAAa,EAAC,GAC1C,GAAG,6BAAU,CAAC;AAEf,mDAA8C;AAC9C,mDAAkD;AAErC,QAAA,MAAM,GAAG;IAClB,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE;QAChB,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,UAAU,CAAC;QACtB,UAAU,gDACH,cAAc,GACd,sBAAa,KAChB,QAAQ,EAAE,aAAa,EACvB,WAAW,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;aAChC,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nconst {\n common: {BlockBaseProps, ChildrenProps},\n} = validators;\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nexport const Layout = {\n [BlockType.Layout]: {\n type: 'object',\n additionalProperties: false,\n required: ['children'],\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n children: ChildrenProps,\n mobileOrder: {\n type: 'string',\n enum: ['reverse', 'straight'],\n },\n },\n },\n};\n"]}
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
export declare const Media: ({ text, paddingTop, paddingBottom, ...mediaProps }: MediaProps) => React.JSX.Element;
|
1
|
+
import { MediaProps } from "../../models/blocks.js";
|
2
|
+
export declare const Media: ({ text, paddingTop, paddingBottom, ...mediaProps }: MediaProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -2,25 +2,22 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.Media = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
|
-
const
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
6
6
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
7
|
-
const Wrapper_1 = require("../../components/Wrapper/Wrapper");
|
8
|
-
const paddings_1 = require("../../models/paddings");
|
9
|
-
const cn_1 = require("../../utils/cn");
|
7
|
+
const Wrapper_1 = require("../../components/Wrapper/Wrapper.js");
|
8
|
+
const paddings_1 = require("../../models/paddings.js");
|
9
|
+
const cn_1 = require("../../utils/cn.js");
|
10
10
|
const b = (0, cn_1.block)('media');
|
11
11
|
const Media = (_a) => {
|
12
12
|
var { text, paddingTop, paddingBottom } = _a, mediaProps = tslib_1.__rest(_a, ["text", "paddingTop", "paddingBottom"]);
|
13
|
-
return (
|
13
|
+
return ((0, jsx_runtime_1.jsxs)(Wrapper_1.Wrapper, { paddings: {
|
14
14
|
[paddings_1.PaddingsDirections.top]: paddingTop,
|
15
15
|
[paddings_1.PaddingsDirections.bottom]: paddingBottom,
|
16
|
-
}, className: b('container') },
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
blog: true,
|
22
|
-
blogMedia: true,
|
23
|
-
resetPaddings: true,
|
24
|
-
} })))));
|
16
|
+
}, className: b('container'), children: [(0, jsx_runtime_1.jsx)("div", { className: b('border'), "data-qa": "blog-media-content", children: (0, jsx_runtime_1.jsx)(page_constructor_1.Media, Object.assign({ className: b('content'), videoClassName: b('video'), imageClassName: b('image') }, mediaProps)) }), text && ((0, jsx_runtime_1.jsx)("div", { className: b('text-content'), children: (0, jsx_runtime_1.jsx)(page_constructor_1.YFMWrapper, { content: text, modifiers: {
|
17
|
+
blog: true,
|
18
|
+
blogMedia: true,
|
19
|
+
resetPaddings: true,
|
20
|
+
} }) }))] }));
|
25
21
|
};
|
26
|
-
exports.Media = Media;
|
22
|
+
exports.Media = Media;
|
23
|
+
//# sourceMappingURL=Media.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Media.js","sourceRoot":"../../../../src","sources":["blocks/Media/Media.tsx"],"names":[],"mappings":";;;;;AAAA,mEAA0E;AAE1E,iEAAyD;AAEzD,uDAAyD;AACzD,0CAAqC;AAIrC,MAAM,CAAC,GAAG,IAAA,UAAK,EAAC,OAAO,CAAC,CAAC;AAElB,MAAM,KAAK,GAAG,CAAC,EAA4D,EAAE,EAAE;QAAhE,EAAC,IAAI,EAAE,UAAU,EAAE,aAAa,OAA4B,EAAvB,UAAU,sBAA/C,uCAAgD,CAAD;IAAkB,OAAA,CACnF,wBAAC,iBAAO,IACJ,QAAQ,EAAE;YACN,CAAC,6BAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,6BAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;SAC7C,EACD,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,aAEzB,gCAAK,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,aAAU,oBAAoB,YACrD,uBAAC,wBAAO,kBACJ,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,EACvB,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAC1B,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,IACtB,UAAU,EAChB,GACA,EACL,IAAI,IAAI,CACL,gCAAK,SAAS,EAAE,CAAC,CAAC,cAAc,CAAC,YAC7B,uBAAC,6BAAU,IACP,OAAO,EAAE,IAAI,EACb,SAAS,EAAE;wBACP,IAAI,EAAE,IAAI;wBACV,SAAS,EAAE,IAAI;wBACf,aAAa,EAAE,IAAI;qBACtB,GACH,GACA,CACT,IACK,CACb,CAAA;CAAA,CAAC;AA7BW,QAAA,KAAK,SA6BhB","sourcesContent":["import {Media as PCMedia, YFMWrapper} from '@gravity-ui/page-constructor';\n\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {MediaProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './Media.scss';\n\nconst b = block('media');\n\nexport const Media = ({text, paddingTop, paddingBottom, ...mediaProps}: MediaProps) => (\n <Wrapper\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n }}\n className={b('container')}\n >\n <div className={b('border')} data-qa=\"blog-media-content\">\n <PCMedia\n className={b('content')}\n videoClassName={b('video')}\n imageClassName={b('image')}\n {...mediaProps}\n />\n </div>\n {text && (\n <div className={b('text-content')}>\n <YFMWrapper\n content={text}\n modifiers={{\n blog: true,\n blogMedia: true,\n resetPaddings: true,\n }}\n />\n </div>\n )}\n </Wrapper>\n);\n"]}
|
@@ -2,8 +2,8 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.Media = void 0;
|
4
4
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
5
|
-
const common_1 = require("../../models/common");
|
6
|
-
const common_2 = require("../../schema/common");
|
5
|
+
const common_1 = require("../../models/common.js");
|
6
|
+
const common_2 = require("../../schema/common.js");
|
7
7
|
const { common: { BlockBaseProps, MediaProps }, } = page_constructor_1.validators;
|
8
8
|
exports.Media = {
|
9
9
|
[common_1.BlockType.Media]: {
|
@@ -14,4 +14,5 @@ exports.Media = {
|
|
14
14
|
contentType: 'text',
|
15
15
|
} }),
|
16
16
|
},
|
17
|
-
};
|
17
|
+
};
|
18
|
+
//# sourceMappingURL=schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Media/schema.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,mDAA8C;AAC9C,mDAAkD;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAE,UAAU,EAAC,GACvC,GAAG,6BAAU,CAAC;AAEF,QAAA,KAAK,GAAG;IACjB,CAAC,kBAAS,CAAC,KAAK,CAAC,EAAE;QACf,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,UAAU,8DACH,cAAc,GACd,sBAAa,GACb,UAAU,KACb,IAAI,EAAE;gBACF,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,MAAM;aACtB,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nconst {\n common: {BlockBaseProps, MediaProps},\n} = validators;\n\nexport const Media = {\n [BlockType.Media]: {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n ...MediaProps,\n text: {\n type: 'string',\n contentType: 'text',\n },\n },\n },\n};\n"]}
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
export declare const Meta: (props: MetaProps) => React.JSX.Element;
|
1
|
+
import { MetaProps } from "../../models/blocks.js";
|
2
|
+
export declare const Meta: (props: MetaProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -2,18 +2,19 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.Meta = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
|
-
const
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
6
|
+
const React = tslib_1.__importStar(require("react"));
|
6
7
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
7
|
-
const PostInfo_1 = require("../../components/PostInfo/PostInfo");
|
8
|
-
const Wrapper_1 = require("../../components/Wrapper/Wrapper");
|
9
|
-
const constants_1 = require("../../constants");
|
10
|
-
const LocaleContext_1 = require("../../contexts/LocaleContext");
|
11
|
-
const SettingsContext_1 = require("../../contexts/SettingsContext");
|
12
|
-
const PostPageContext_1 = require("../../contexts/PostPageContext");
|
13
|
-
const paddings_1 = require("../../models/paddings");
|
14
|
-
const cn_1 = require("../../utils/cn");
|
15
|
-
const common_1 = require("../../utils/common");
|
16
|
-
const utils_1 = require("../../counters/utils");
|
8
|
+
const PostInfo_1 = require("../../components/PostInfo/PostInfo.js");
|
9
|
+
const Wrapper_1 = require("../../components/Wrapper/Wrapper.js");
|
10
|
+
const constants_1 = require("../../constants.js");
|
11
|
+
const LocaleContext_1 = require("../../contexts/LocaleContext.js");
|
12
|
+
const SettingsContext_1 = require("../../contexts/SettingsContext.js");
|
13
|
+
const PostPageContext_1 = require("../../contexts/PostPageContext.js");
|
14
|
+
const paddings_1 = require("../../models/paddings.js");
|
15
|
+
const cn_1 = require("../../utils/cn.js");
|
16
|
+
const common_1 = require("../../utils/common.js");
|
17
|
+
const utils_1 = require("../../counters/utils.js");
|
17
18
|
const b = (0, cn_1.block)('meta');
|
18
19
|
const analyticsEventsContainer = {
|
19
20
|
sharing: (0, common_1.prepareAnalyticsEvent)({ name: constants_1.DefaultGoalIds.shareBottom }),
|
@@ -25,23 +26,21 @@ const breadcrumbsGoals = (0, common_1.prepareAnalyticsEvent)({
|
|
25
26
|
});
|
26
27
|
const Meta = (props) => {
|
27
28
|
const { paddingTop = 'l', paddingBottom = 'l', theme = 'light', qa } = props;
|
28
|
-
const { post } =
|
29
|
-
const { locale } =
|
29
|
+
const { post } = React.useContext(PostPageContext_1.PostPageContext);
|
30
|
+
const { locale } = React.useContext(LocaleContext_1.LocaleContext);
|
30
31
|
const qaAttributes = (0, common_1.getQaAttributes)(qa, 'post-info');
|
31
|
-
const { getBlogPath = common_1.getBlogPath } =
|
32
|
+
const { getBlogPath = common_1.getBlogPath } = React.useContext(SettingsContext_1.SettingsContext);
|
32
33
|
const blogPath = getBlogPath(locale.pathPrefix || '');
|
33
34
|
const { title, id, date, readingTime, tags } = post;
|
34
35
|
const breadcrumbs = (0, common_1.getBreadcrumbs)({ tags, blogPath });
|
35
36
|
breadcrumbs.analyticsEvents = (0, common_1.getMergedAnalyticsEvents)(breadcrumbsGoals);
|
36
|
-
return (
|
37
|
+
return ((0, jsx_runtime_1.jsxs)(Wrapper_1.Wrapper, { paddings: {
|
37
38
|
[paddings_1.PaddingsDirections.top]: paddingTop,
|
38
39
|
[paddings_1.PaddingsDirections.bottom]: paddingBottom,
|
39
|
-
}, qa: qaAttributes.wrapper },
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
resetPaddings: true,
|
44
|
-
} })),
|
45
|
-
post && (react_1.default.createElement(PostInfo_1.PostInfo, { postId: id, date: date, readingTime: readingTime, analyticsEventsContainer: analyticsEventsContainer, qa: qaAttributes.postInfo }))));
|
40
|
+
}, qa: qaAttributes.wrapper, children: [breadcrumbs && ((0, jsx_runtime_1.jsx)(page_constructor_1.HeaderBreadcrumbs, { items: breadcrumbs.items, className: b('breadcrumbs'), theme: theme })), title && ((0, jsx_runtime_1.jsx)(page_constructor_1.YFMWrapper, { content: title, modifiers: {
|
41
|
+
blogBreadcrumbs: true,
|
42
|
+
resetPaddings: true,
|
43
|
+
} })), post && ((0, jsx_runtime_1.jsx)(PostInfo_1.PostInfo, { postId: id, date: date, readingTime: readingTime, analyticsEventsContainer: analyticsEventsContainer, qa: qaAttributes.postInfo }))] }));
|
46
44
|
};
|
47
|
-
exports.Meta = Meta;
|
45
|
+
exports.Meta = Meta;
|
46
|
+
//# sourceMappingURL=Meta.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Meta.js","sourceRoot":"../../../../src","sources":["blocks/Meta/Meta.tsx"],"names":[],"mappings":";;;;;AAAA,qDAA+B;AAE/B,mEAAgG;AAEhG,oEAA4D;AAC5D,iEAAyD;AACzD,kDAA+C;AAC/C,mEAA2D;AAC3D,uEAA+D;AAC/D,uEAA+D;AAE/D,uDAAyD;AACzD,0CAAqC;AACrC,kDAM4B;AAC5B,mDAAsD;AAItD,MAAM,CAAC,GAAG,IAAA,UAAK,EAAC,MAAM,CAAC,CAAC;AAExB,MAAM,wBAAwB,GAAwC;IAClE,OAAO,EAAE,IAAA,8BAAqB,EAAC,EAAC,IAAI,EAAE,0BAAc,CAAC,WAAW,EAAC,CAAC;IAClE,IAAI,EAAE,IAAA,8BAAqB,EAAC,EAAC,IAAI,EAAE,0BAAc,CAAC,UAAU,EAAC,CAAC;CACjE,CAAC;AAEF,MAAM,gBAAgB,GAAG,IAAA,8BAAqB,EAAC;IAC3C,IAAI,EAAE,0BAAc,CAAC,iBAAiB;IACtC,OAAO,EAAE,wBAAgB,CAAC,SAAS;CACtC,CAAC,CAAC;AAEI,MAAM,IAAI,GAAG,CAAC,KAAgB,EAAE,EAAE;IACrC,MAAM,EAAC,UAAU,GAAG,GAAG,EAAE,aAAa,GAAG,GAAG,EAAE,KAAK,GAAG,OAAO,EAAE,EAAE,EAAC,GAAG,KAAK,CAAC;IAC3E,MAAM,EAAC,IAAI,EAAC,GAAG,KAAK,CAAC,UAAU,CAAC,iCAAe,CAAC,CAAC;IACjD,MAAM,EAAC,MAAM,EAAC,GAAG,KAAK,CAAC,UAAU,CAAC,6BAAa,CAAC,CAAC;IACjD,MAAM,YAAY,GAAG,IAAA,wBAAe,EAAC,EAAE,EAAE,WAAW,CAAC,CAAC;IACtD,MAAM,EAAC,WAAW,GAAG,oBAAkB,EAAC,GAAG,KAAK,CAAC,UAAU,CAAC,iCAAe,CAAC,CAAC;IAC7E,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;IAEtD,MAAM,EAAC,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAC,GAAG,IAAI,CAAC;IAElD,MAAM,WAAW,GAAG,IAAA,uBAAc,EAAC,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC,CAAC;IAErD,WAAW,CAAC,eAAe,GAAG,IAAA,iCAAwB,EAAC,gBAAgB,CAAC,CAAC;IAEzE,OAAO,CACH,wBAAC,iBAAO,IACJ,QAAQ,EAAE;YACN,CAAC,6BAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,6BAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;SAC7C,EACD,EAAE,EAAE,YAAY,CAAC,OAAO,aAEvB,WAAW,IAAI,CACZ,uBAAC,oCAAiB,IACd,KAAK,EAAE,WAAW,CAAC,KAAK,EACxB,SAAS,EAAE,CAAC,CAAC,aAAa,CAAC,EAC3B,KAAK,EAAE,KAAK,GACd,CACL,EACA,KAAK,IAAI,CACN,uBAAC,6BAAU,IACP,OAAO,EAAE,KAAK,EACd,SAAS,EAAE;oBACP,eAAe,EAAE,IAAI;oBACrB,aAAa,EAAE,IAAI;iBACtB,GACH,CACL,EACA,IAAI,IAAI,CACL,uBAAC,mBAAQ,IACL,MAAM,EAAE,EAAE,EACV,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,EACxB,wBAAwB,EAAE,wBAAwB,EAClD,EAAE,EAAE,YAAY,CAAC,QAAQ,GAC3B,CACL,IACK,CACb,CAAC;AACN,CAAC,CAAC;AAjDW,QAAA,IAAI,QAiDf","sourcesContent":["import * as React from 'react';\n\nimport {AnalyticsEventsProp, HeaderBreadcrumbs, YFMWrapper} from '@gravity-ui/page-constructor';\n\nimport {PostInfo} from '../../components/PostInfo/PostInfo';\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {DefaultGoalIds} from '../../constants';\nimport {LocaleContext} from '../../contexts/LocaleContext';\nimport {SettingsContext} from '../../contexts/SettingsContext';\nimport {PostPageContext} from '../../contexts/PostPageContext';\nimport {MetaProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\nimport {\n getBreadcrumbs,\n getBlogPath as getDefaultBlogPath,\n getMergedAnalyticsEvents,\n getQaAttributes,\n prepareAnalyticsEvent,\n} from '../../utils/common';\nimport {AnalyticsCounter} from '../../counters/utils';\n\nimport './Meta.scss';\n\nconst b = block('meta');\n\nconst analyticsEventsContainer: Record<string, AnalyticsEventsProp> = {\n sharing: prepareAnalyticsEvent({name: DefaultGoalIds.shareBottom}),\n save: prepareAnalyticsEvent({name: DefaultGoalIds.saveBottom}),\n};\n\nconst breadcrumbsGoals = prepareAnalyticsEvent({\n name: DefaultGoalIds.breadcrumbsBottom,\n counter: AnalyticsCounter.CrossSite,\n});\n\nexport const Meta = (props: MetaProps) => {\n const {paddingTop = 'l', paddingBottom = 'l', theme = 'light', qa} = props;\n const {post} = React.useContext(PostPageContext);\n const {locale} = React.useContext(LocaleContext);\n const qaAttributes = getQaAttributes(qa, 'post-info');\n const {getBlogPath = getDefaultBlogPath} = React.useContext(SettingsContext);\n const blogPath = getBlogPath(locale.pathPrefix || '');\n\n const {title, id, date, readingTime, tags} = post;\n\n const breadcrumbs = getBreadcrumbs({tags, blogPath});\n\n breadcrumbs.analyticsEvents = getMergedAnalyticsEvents(breadcrumbsGoals);\n\n return (\n <Wrapper\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n }}\n qa={qaAttributes.wrapper}\n >\n {breadcrumbs && (\n <HeaderBreadcrumbs\n items={breadcrumbs.items}\n className={b('breadcrumbs')}\n theme={theme}\n />\n )}\n {title && (\n <YFMWrapper\n content={title}\n modifiers={{\n blogBreadcrumbs: true,\n resetPaddings: true,\n }}\n />\n )}\n {post && (\n <PostInfo\n postId={id}\n date={date}\n readingTime={readingTime}\n analyticsEventsContainer={analyticsEventsContainer}\n qa={qaAttributes.postInfo}\n />\n )}\n </Wrapper>\n );\n};\n"]}
|
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Meta = void 0;
|
4
4
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
5
5
|
const { common: { BlockBaseProps }, } = page_constructor_1.validators;
|
6
|
-
const common_1 = require("../../models/common");
|
7
|
-
const common_2 = require("../../schema/common");
|
6
|
+
const common_1 = require("../../models/common.js");
|
7
|
+
const common_2 = require("../../schema/common.js");
|
8
8
|
exports.Meta = {
|
9
9
|
[common_1.BlockType.Meta]: {
|
10
10
|
type: 'object',
|
11
11
|
additionalProperties: false,
|
12
12
|
properties: Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase),
|
13
13
|
},
|
14
|
-
};
|
14
|
+
};
|
15
|
+
//# sourceMappingURL=schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Meta/schema.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,6BAAU,CAAC;AAEf,mDAA8C;AAC9C,mDAAkD;AAErC,QAAA,IAAI,GAAG;IAChB,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE;QACd,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,UAAU,kCACH,cAAc,GACd,sBAAa,CACnB;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nconst {\n common: {BlockBaseProps},\n} = validators;\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nexport const Meta = {\n [BlockType.Meta]: {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n },\n },\n};\n"]}
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import { SuggestProps } from '../../models/blocks';
|
1
|
+
import { SuggestProps } from "../../models/blocks.js";
|
3
2
|
/**
|
4
3
|
* Suggested posts block
|
5
4
|
*
|
@@ -9,4 +8,4 @@ import { SuggestProps } from '../../models/blocks';
|
|
9
8
|
*
|
10
9
|
* @returns -jsx
|
11
10
|
*/
|
12
|
-
export declare const Suggest: ({ paddingTop, paddingBottom }: SuggestProps) =>
|
11
|
+
export declare const Suggest: ({ paddingTop, paddingBottom }: SuggestProps) => import("react/jsx-runtime").JSX.Element | null;
|
@@ -2,16 +2,17 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.Suggest = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
|
-
const
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
6
|
+
const React = tslib_1.__importStar(require("react"));
|
6
7
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
7
|
-
const PostCard_1 = require("../../components/PostCard/PostCard");
|
8
|
-
const Wrapper_1 = require("../../components/Wrapper/Wrapper");
|
9
|
-
const PostPageContext_1 = require("../../contexts/PostPageContext");
|
10
|
-
const i18n_1 = require("../../i18n");
|
11
|
-
const paddings_1 = require("../../models/paddings");
|
12
|
-
const common_1 = require("../../utils/common");
|
13
|
-
const constants_1 = require("../../constants");
|
14
|
-
const utils_1 = require("../../counters/utils");
|
8
|
+
const PostCard_1 = require("../../components/PostCard/PostCard.js");
|
9
|
+
const Wrapper_1 = require("../../components/Wrapper/Wrapper.js");
|
10
|
+
const PostPageContext_1 = require("../../contexts/PostPageContext.js");
|
11
|
+
const i18n_1 = require("../../i18n/index.js");
|
12
|
+
const paddings_1 = require("../../models/paddings.js");
|
13
|
+
const common_1 = require("../../utils/common.js");
|
14
|
+
const constants_1 = require("../../constants.js");
|
15
|
+
const utils_1 = require("../../counters/utils.js");
|
15
16
|
const suggestGoals = (0, common_1.prepareAnalyticsEvent)({
|
16
17
|
name: constants_1.DefaultGoalIds.suggest,
|
17
18
|
counter: utils_1.AnalyticsCounter.CrossSite,
|
@@ -26,14 +27,14 @@ const suggestGoals = (0, common_1.prepareAnalyticsEvent)({
|
|
26
27
|
* @returns -jsx
|
27
28
|
*/
|
28
29
|
const Suggest = ({ paddingTop = 'l', paddingBottom = 'l' }) => {
|
29
|
-
const { suggestedPosts } =
|
30
|
+
const { suggestedPosts } = React.useContext(PostPageContext_1.PostPageContext);
|
30
31
|
if (suggestedPosts.length === 0) {
|
31
32
|
return null;
|
32
33
|
}
|
33
|
-
return (
|
34
|
+
return ((0, jsx_runtime_1.jsx)(Wrapper_1.Wrapper, { paddings: {
|
34
35
|
[paddings_1.PaddingsDirections.top]: paddingTop,
|
35
36
|
[paddings_1.PaddingsDirections.bottom]: paddingBottom,
|
36
|
-
} },
|
37
|
-
react_1.default.createElement(page_constructor_1.SliderBlock, { slidesToShow: { xl: 3, lg: 2, sm: 1 }, title: { text: (0, i18n_1.i18n)(i18n_1.Keyset.TitleSuggest) } }, suggestedPosts.map((post) => (react_1.default.createElement(PostCard_1.PostCard, { key: post.id, analyticsEvents: suggestGoals, post: post }))))));
|
37
|
+
}, children: (0, jsx_runtime_1.jsx)(page_constructor_1.SliderBlock, { slidesToShow: { xl: 3, lg: 2, sm: 1 }, title: { text: (0, i18n_1.i18n)(i18n_1.Keyset.TitleSuggest) }, lazyLoad: false, children: suggestedPosts.map((post) => ((0, jsx_runtime_1.jsx)(PostCard_1.PostCard, { analyticsEvents: suggestGoals, post: post }, post.id))) }) }));
|
38
38
|
};
|
39
|
-
exports.Suggest = Suggest;
|
39
|
+
exports.Suggest = Suggest;
|
40
|
+
//# sourceMappingURL=Suggest.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Suggest.js","sourceRoot":"../../../../src","sources":["blocks/Suggest/Suggest.tsx"],"names":[],"mappings":";;;;;AAAA,qDAA+B;AAE/B,mEAAyD;AAEzD,oEAA4D;AAC5D,iEAAyD;AACzD,uEAA+D;AAC/D,8CAAwC;AAExC,uDAAyD;AACzD,kDAAyD;AACzD,kDAA+C;AAC/C,mDAAsD;AAEtD,MAAM,YAAY,GAAG,IAAA,8BAAqB,EAAC;IACvC,IAAI,EAAE,0BAAc,CAAC,OAAO;IAC5B,OAAO,EAAE,wBAAgB,CAAC,SAAS;CACtC,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACI,MAAM,OAAO,GAAG,CAAC,EAAC,UAAU,GAAG,GAAG,EAAE,aAAa,GAAG,GAAG,EAAe,EAAE,EAAE;IAC7E,MAAM,EAAC,cAAc,EAAC,GAAG,KAAK,CAAC,UAAU,CAAC,iCAAe,CAAC,CAAC;IAE3D,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CACH,uBAAC,iBAAO,IACJ,QAAQ,EAAE;YACN,CAAC,6BAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,6BAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;SAC7C,YAED,uBAAC,8BAAW,IACR,YAAY,EAAE,EAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAC,EACnC,KAAK,EAAE,EAAC,IAAI,EAAE,IAAA,WAAI,EAAC,aAAM,CAAC,YAAY,CAAC,EAAC,EACxC,QAAQ,EAAE,KAAK,YAEd,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC1B,uBAAC,mBAAQ,IAAe,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,IAAlD,IAAI,CAAC,EAAE,CAA+C,CACxE,CAAC,GACQ,GACR,CACb,CAAC;AACN,CAAC,CAAC;AAzBW,QAAA,OAAO,WAyBlB","sourcesContent":["import * as React from 'react';\n\nimport {SliderBlock} from '@gravity-ui/page-constructor';\n\nimport {PostCard} from '../../components/PostCard/PostCard';\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {PostPageContext} from '../../contexts/PostPageContext';\nimport {Keyset, i18n} from '../../i18n';\nimport {SuggestProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {prepareAnalyticsEvent} from '../../utils/common';\nimport {DefaultGoalIds} from '../../constants';\nimport {AnalyticsCounter} from '../../counters/utils';\n\nconst suggestGoals = prepareAnalyticsEvent({\n name: DefaultGoalIds.suggest,\n counter: AnalyticsCounter.CrossSite,\n});\n\n/**\n * Suggested posts block\n *\n * @param posts - suggested posts list\n * @param paddingTop - padding top code\n * @param paddingBottom - padding bottom code\n *\n * @returns -jsx\n */\nexport const Suggest = ({paddingTop = 'l', paddingBottom = 'l'}: SuggestProps) => {\n const {suggestedPosts} = React.useContext(PostPageContext);\n\n if (suggestedPosts.length === 0) {\n return null;\n }\n\n return (\n <Wrapper\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n }}\n >\n <SliderBlock\n slidesToShow={{xl: 3, lg: 2, sm: 1}}\n title={{text: i18n(Keyset.TitleSuggest)}}\n lazyLoad={false}\n >\n {suggestedPosts.map((post) => (\n <PostCard key={post.id} analyticsEvents={suggestGoals} post={post} />\n ))}\n </SliderBlock>\n </Wrapper>\n );\n};\n"]}
|
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Suggest = void 0;
|
4
4
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
5
5
|
const { common: { BlockBaseProps }, } = page_constructor_1.validators;
|
6
|
-
const common_1 = require("../../models/common");
|
7
|
-
const common_2 = require("../../schema/common");
|
6
|
+
const common_1 = require("../../models/common.js");
|
7
|
+
const common_2 = require("../../schema/common.js");
|
8
8
|
exports.Suggest = {
|
9
9
|
[common_1.BlockType.Suggest]: {
|
10
10
|
type: 'object',
|
11
11
|
additionalProperties: false,
|
12
12
|
properties: Object.assign(Object.assign({}, BlockBaseProps), common_2.BlogBlockBase),
|
13
13
|
},
|
14
|
-
};
|
14
|
+
};
|
15
|
+
//# sourceMappingURL=schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Suggest/schema.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,6BAAU,CAAC;AAEf,mDAA8C;AAC9C,mDAAkD;AAErC,QAAA,OAAO,GAAG;IACnB,CAAC,kBAAS,CAAC,OAAO,CAAC,EAAE;QACjB,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,UAAU,kCACH,cAAc,GACd,sBAAa,CACnB;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nconst {\n common: {BlockBaseProps},\n} = validators;\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nexport const Suggest = {\n [BlockType.Suggest]: {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n },\n },\n};\n"]}
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
export declare const YFM: (props: YFMProps) => React.JSX.Element;
|
1
|
+
import { YFMProps } from "../../models/blocks.js";
|
2
|
+
export declare const YFM: (props: YFMProps) => import("react/jsx-runtime").JSX.Element;
|