@gravity-ui/blog-constructor 2.1.2-alpha.2 → 2.3.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.
Files changed (110) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/build/cjs/blocks/Author/Author.js +3 -3
  3. package/build/cjs/blocks/Banner/Banner.js +4 -4
  4. package/build/cjs/blocks/CTA/CTA.js +3 -3
  5. package/build/cjs/blocks/ColoredText/ColoredText.js +1 -1
  6. package/build/cjs/blocks/Feed/Feed.js +17 -20
  7. package/build/cjs/blocks/Feed/reducer.d.ts +1 -1
  8. package/build/cjs/blocks/Header/Header.js +3 -4
  9. package/build/cjs/blocks/Meta/Meta.js +5 -6
  10. package/build/cjs/blocks/Suggest/Suggest.js +4 -5
  11. package/build/cjs/blocks/YFM/YFM.js +1 -1
  12. package/build/cjs/components/FeedHeader/FeedHeader.d.ts +1 -1
  13. package/build/cjs/components/FeedHeader/FeedHeader.js +1 -1
  14. package/build/cjs/components/FeedHeader/components/Controls/Controls.d.ts +1 -1
  15. package/build/cjs/components/FeedHeader/components/Controls/Controls.js +5 -8
  16. package/build/cjs/components/FeedHeader/components/Controls/customRenders.d.ts +1 -1
  17. package/build/cjs/components/FeedHeader/components/Controls/customRenders.js +1 -1
  18. package/build/cjs/components/Paginator/Paginator.js +3 -7
  19. package/build/cjs/components/Paginator/components/NavigationButton.js +1 -1
  20. package/build/cjs/components/Paginator/components/PaginatorItem.js +1 -1
  21. package/build/cjs/components/PostCard/PostCard.d.ts +0 -1
  22. package/build/cjs/components/PostCard/PostCard.js +1 -1
  23. package/build/cjs/components/PostInfo/PostInfo.d.ts +0 -1
  24. package/build/cjs/components/PostInfo/PostInfo.js +2 -2
  25. package/build/cjs/components/PostInfo/SuggestPostInfo.js +1 -1
  26. package/build/cjs/components/PostInfo/components/Date.js +1 -1
  27. package/build/cjs/components/PostInfo/components/Save.d.ts +0 -1
  28. package/build/cjs/components/PostInfo/components/Save.js +1 -2
  29. package/build/cjs/components/PostInfo/components/Sharing.d.ts +0 -1
  30. package/build/cjs/components/PostInfo/components/Sharing.js +1 -2
  31. package/build/cjs/components/Posts/Posts.js +1 -1
  32. package/build/cjs/components/PostsEmpty/PostsEmpty.js +1 -1
  33. package/build/cjs/components/Search/Search.js +2 -2
  34. package/build/cjs/components/Wrapper/Wrapper.js +1 -1
  35. package/build/cjs/constructor/BlogConstructorProvider.d.ts +1 -1
  36. package/build/cjs/constructor/BlogConstructorProvider.js +3 -3
  37. package/build/cjs/constructor/blocksMap.js +8 -8
  38. package/build/cjs/containers/BlogPage/BlogPage.d.ts +2 -2
  39. package/build/cjs/containers/BlogPage/BlogPage.js +2 -2
  40. package/build/cjs/containers/BlogPostPage/BlogPostPage.css +1 -1
  41. package/build/cjs/containers/BlogPostPage/BlogPostPage.d.ts +2 -2
  42. package/build/cjs/containers/BlogPostPage/BlogPostPage.js +2 -2
  43. package/build/cjs/contexts/FeedContext.d.ts +1 -1
  44. package/build/cjs/contexts/theme/ThemeProvider.js +1 -1
  45. package/build/cjs/counters/metrika.d.ts +0 -1
  46. package/build/cjs/counters/metrika.js +0 -1
  47. package/build/cjs/models/blocks.d.ts +1 -1
  48. package/build/cjs/models/common.d.ts +2 -1
  49. package/build/cjs/utils/common.d.ts +1 -1
  50. package/build/cjs/utils/common.js +1 -1
  51. package/build/esm/blocks/Author/Author.js +5 -5
  52. package/build/esm/blocks/Banner/Banner.js +4 -4
  53. package/build/esm/blocks/CTA/CTA.js +3 -3
  54. package/build/esm/blocks/ColoredText/ColoredText.js +1 -1
  55. package/build/esm/blocks/Feed/Feed.js +9 -12
  56. package/build/esm/blocks/Feed/reducer.d.ts +1 -1
  57. package/build/esm/blocks/Header/Header.js +3 -4
  58. package/build/esm/blocks/Meta/Meta.js +5 -6
  59. package/build/esm/blocks/Suggest/Suggest.js +4 -5
  60. package/build/esm/blocks/YFM/YFM.js +1 -1
  61. package/build/esm/components/FeedHeader/FeedHeader.d.ts +1 -1
  62. package/build/esm/components/FeedHeader/FeedHeader.js +2 -2
  63. package/build/esm/components/FeedHeader/components/Controls/Controls.d.ts +1 -1
  64. package/build/esm/components/FeedHeader/components/Controls/Controls.js +7 -10
  65. package/build/esm/components/FeedHeader/components/Controls/customRenders.d.ts +1 -1
  66. package/build/esm/components/FeedHeader/components/Controls/customRenders.js +2 -2
  67. package/build/esm/components/Paginator/Paginator.js +4 -8
  68. package/build/esm/components/Paginator/components/NavigationButton.js +2 -2
  69. package/build/esm/components/Paginator/components/PaginatorItem.js +1 -1
  70. package/build/esm/components/PostCard/PostCard.d.ts +0 -1
  71. package/build/esm/components/PostCard/PostCard.js +3 -3
  72. package/build/esm/components/PostInfo/PostInfo.d.ts +0 -1
  73. package/build/esm/components/PostInfo/PostInfo.js +2 -2
  74. package/build/esm/components/PostInfo/SuggestPostInfo.js +1 -1
  75. package/build/esm/components/PostInfo/components/Date.js +1 -1
  76. package/build/esm/components/PostInfo/components/ReadingTime.js +1 -1
  77. package/build/esm/components/PostInfo/components/Save.d.ts +0 -1
  78. package/build/esm/components/PostInfo/components/Save.js +1 -2
  79. package/build/esm/components/PostInfo/components/Sharing.d.ts +0 -1
  80. package/build/esm/components/PostInfo/components/Sharing.js +1 -2
  81. package/build/esm/components/Posts/Posts.js +2 -2
  82. package/build/esm/components/PostsEmpty/PostsEmpty.js +1 -1
  83. package/build/esm/components/PostsError/PostsError.js +1 -1
  84. package/build/esm/components/Search/Search.js +3 -3
  85. package/build/esm/components/Wrapper/Wrapper.js +1 -1
  86. package/build/esm/constructor/BlogConstructorProvider.d.ts +1 -1
  87. package/build/esm/constructor/BlogConstructorProvider.js +3 -3
  88. package/build/esm/constructor/blocksMap.js +8 -8
  89. package/build/esm/containers/BlogPage/BlogPage.d.ts +2 -2
  90. package/build/esm/containers/BlogPage/BlogPage.js +2 -2
  91. package/build/esm/containers/BlogPostPage/BlogPostPage.css +1 -1
  92. package/build/esm/containers/BlogPostPage/BlogPostPage.d.ts +2 -2
  93. package/build/esm/containers/BlogPostPage/BlogPostPage.js +2 -2
  94. package/build/esm/contexts/FeedContext.d.ts +1 -1
  95. package/build/esm/contexts/theme/ThemeProvider.js +1 -1
  96. package/build/esm/counters/metrika.d.ts +0 -1
  97. package/build/esm/counters/metrika.js +0 -1
  98. package/build/esm/hooks/useLikes.js +1 -1
  99. package/build/esm/models/blocks.d.ts +1 -1
  100. package/build/esm/models/common.d.ts +2 -1
  101. package/build/esm/utils/common.d.ts +1 -1
  102. package/build/esm/utils/common.js +3 -3
  103. package/package.json +4 -6
  104. package/server/data/contentFilter.js +1 -0
  105. package/server/data/createReadableContent.js +1 -1
  106. package/server/data/transformPost.d.ts +1 -1
  107. package/server/models/blocks.d.ts +1 -1
  108. package/server/models/common.d.ts +2 -1
  109. package/styles/yfm.css +1 -1
  110. package/styles/yfm.scss +1 -1
@@ -27,12 +27,12 @@ exports.Search = void 0;
27
27
  const react_1 = __importStar(require("react"));
28
28
  const lodash_1 = require("lodash");
29
29
  const uikit_1 = require("@gravity-ui/uikit");
30
- const ButtonWithIcon_1 = require("../ButtonWithIcon/ButtonWithIcon");
31
30
  const useIsIPhone_1 = require("../../hooks/useIsIPhone");
31
+ const i18n_1 = require("../../i18n");
32
32
  const Close_1 = require("../../icons/Close");
33
33
  const SearchIcon_1 = require("../../icons/SearchIcon");
34
- const i18n_1 = require("../../i18n");
35
34
  const cn_1 = require("../../utils/cn");
35
+ const ButtonWithIcon_1 = require("../ButtonWithIcon/ButtonWithIcon");
36
36
  const b = (0, cn_1.block)('search');
37
37
  const SEARCH_ICON_SIZE = 16;
38
38
  const CLOSE_ICON_SIZE = 12;
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Wrapper = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
- const cn_1 = require("../../utils/cn");
9
8
  const constants_1 = require("../../constants");
9
+ const cn_1 = require("../../utils/cn");
10
10
  const b = (0, cn_1.block)('wrapper');
11
11
  const Wrapper = ({ children, paddings = constants_1.DEFAULT_PADDINGS, className, dataQa, }) => (react_1.default.createElement("section", { className: b({
12
12
  ['padding-top']: (paddings === null || paddings === void 0 ? void 0 : paddings.top) || 'xs',
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { AnalyticsContextProps } from '@gravity-ui/page-constructor';
3
+ import { DeviceContextProps } from '../contexts/DeviceContext';
3
4
  import { RouterContextProps } from '../contexts/RouterContext';
4
5
  import { UserContextProps } from '../contexts/UserContext';
5
- import { DeviceContextProps } from '../contexts/DeviceContext';
6
6
  import { ThemeValueType } from '../contexts/theme/ThemeValueContext';
7
7
  import { Locale } from '../models/locale';
8
8
  export interface BlogConstructorProviderProps {
@@ -26,13 +26,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.BlogConstructorProvider = void 0;
27
27
  const react_1 = __importStar(require("react"));
28
28
  const page_constructor_1 = require("@gravity-ui/page-constructor");
29
- const MobileContext_1 = require("../contexts/MobileContext");
29
+ const constants_1 = require("../constants");
30
+ const DeviceContext_1 = require("../contexts/DeviceContext");
30
31
  const LocaleContext_1 = require("../contexts/LocaleContext");
32
+ const MobileContext_1 = require("../contexts/MobileContext");
31
33
  const RouterContext_1 = require("../contexts/RouterContext");
32
34
  const UserContext_1 = require("../contexts/UserContext");
33
- const DeviceContext_1 = require("../contexts/DeviceContext");
34
35
  const ThemeValueContext_1 = require("../contexts/theme/ThemeValueContext");
35
- const constants_1 = require("../constants");
36
36
  const BlogConstructorProvider = ({ isMobile, locale = {}, router = {}, theme = constants_1.DEFAULT_THEME, user = {}, device = {}, analytics = {}, children, }) => {
37
37
  const context = [
38
38
  react_1.default.createElement(ThemeValueContext_1.ThemeValueContext.Provider, { value: { themeValue: theme }, key: "theme-context" }),
@@ -1,17 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const common_1 = require("../models/common");
3
+ const Author_1 = require("../blocks/Author/Author");
4
+ const Banner_1 = require("../blocks/Banner/Banner");
5
+ const CTA_1 = require("../blocks/CTA/CTA");
6
+ const ColoredText_1 = require("../blocks/ColoredText/ColoredText");
7
+ const Feed_1 = require("../blocks/Feed/Feed");
4
8
  const Header_1 = require("../blocks/Header/Header");
5
- const YFM_1 = require("../blocks/YFM/YFM");
6
9
  const Layout_1 = require("../blocks/Layout/Layout");
7
10
  const Media_1 = require("../blocks/Media/Media");
8
- const CTA_1 = require("../blocks/CTA/CTA");
9
- const ColoredText_1 = require("../blocks/ColoredText/ColoredText");
10
- const Author_1 = require("../blocks/Author/Author");
11
- const Suggest_1 = require("../blocks/Suggest/Suggest");
12
- const Banner_1 = require("../blocks/Banner/Banner");
13
11
  const Meta_1 = require("../blocks/Meta/Meta");
14
- const Feed_1 = require("../blocks/Feed/Feed");
12
+ const Suggest_1 = require("../blocks/Suggest/Suggest");
13
+ const YFM_1 = require("../blocks/YFM/YFM");
14
+ const common_1 = require("../models/common");
15
15
  const blocks = {
16
16
  [common_1.BlockType.YFM]: YFM_1.YFM,
17
17
  [common_1.BlockType.Layout]: Layout_1.Layout,
@@ -1,5 +1,5 @@
1
- import { PageContent, PageConstructorProviderProps, NavigationData } from '@gravity-ui/page-constructor';
2
- import { Tag, PostsProps, ToggleLikeCallbackType, MetaProps, GetPostsType, SetQueryType, Service } from '../../models/common';
1
+ import { NavigationData, PageConstructorProviderProps, PageContent } from '@gravity-ui/page-constructor';
2
+ import { GetPostsType, MetaProps, PostsProps, Service, SetQueryType, Tag, ToggleLikeCallbackType } from '../../models/common';
3
3
  export type BlogPageProps = {
4
4
  content: PageContent;
5
5
  posts: PostsProps;
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.BlogPage = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const page_constructor_1 = require("@gravity-ui/page-constructor");
9
- const FeedContext_1 = require("../../contexts/FeedContext");
10
- const LikesContext_1 = require("../../contexts/LikesContext");
11
9
  const MetaWrapper_1 = require("../../components/MetaWrapper/MetaWrapper");
12
10
  const blocksMap_1 = __importDefault(require("../../constructor/blocksMap"));
11
+ const FeedContext_1 = require("../../contexts/FeedContext");
12
+ const LikesContext_1 = require("../../contexts/LikesContext");
13
13
  const BlogPage = ({ content, posts, tags, services, getPosts, metaData, toggleLike, navigation, settings, pageCountForShowSupportButtons, }) => (react_1.default.createElement("main", null,
14
14
  react_1.default.createElement(LikesContext_1.LikesContext.Provider, { value: {
15
15
  toggleLike: toggleLike,
@@ -56,7 +56,7 @@ unpredictable css rules order in build */
56
56
  .yfm_blog h5,
57
57
  .yfm_blog h6 {
58
58
  margin-bottom: 16px;
59
- margin-top: 48px;
59
+ margin-top: 32px;
60
60
  padding-top: 0;
61
61
  font-weight: var(--yc-text-header-font-weight);
62
62
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { PageContent, PageConstructorProviderProps, NavigationData } from '@gravity-ui/page-constructor';
2
+ import { NavigationData, PageConstructorProviderProps, PageContent } from '@gravity-ui/page-constructor';
3
3
  import { ShareOptions } from '@gravity-ui/uikit';
4
- import { PostData, ToggleLikeCallbackType, MetaProps } from '../../models/common';
4
+ import { MetaProps, PostData, ToggleLikeCallbackType } from '../../models/common';
5
5
  export interface BlogPostPageProps {
6
6
  suggestedPosts: PostData[];
7
7
  metaData?: MetaProps;
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.BlogPostPage = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const page_constructor_1 = require("@gravity-ui/page-constructor");
9
+ const MetaWrapper_1 = require("../../components/MetaWrapper/MetaWrapper");
9
10
  const blocksMap_1 = __importDefault(require("../../constructor/blocksMap"));
10
- const PostPageContext_1 = require("../../contexts/PostPageContext");
11
11
  const LikesContext_1 = require("../../contexts/LikesContext");
12
+ const PostPageContext_1 = require("../../contexts/PostPageContext");
12
13
  const useLikes_1 = require("../../hooks/useLikes");
13
- const MetaWrapper_1 = require("../../components/MetaWrapper/MetaWrapper");
14
14
  const BlogPostPage = ({ metaData, suggestedPosts, likes, content, post, settings, navigation, shareOptions, }) => {
15
15
  const { hasUserLike, likesCount, handleLike } = (0, useLikes_1.useLikes)({
16
16
  hasLike: likes === null || likes === void 0 ? void 0 : likes.hasUserLike,
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { PostData, Tag, SetQueryType, GetPostsType, Service } from '../models/common';
2
+ import { GetPostsType, PostData, Service, SetQueryType, Tag } from '../models/common';
3
3
  export interface FeedContextProps {
4
4
  posts?: PostData[];
5
5
  pinnedPost?: PostData;
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ThemeProvider = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
+ const constants_1 = require("../../constants");
8
9
  const ThemeContext_1 = require("./ThemeContext");
9
10
  const ThemeValueContext_1 = require("./ThemeValueContext");
10
- const constants_1 = require("../../constants");
11
11
  class ThemeProvider extends react_1.default.Component {
12
12
  constructor() {
13
13
  super(...arguments);
@@ -23,7 +23,6 @@ declare function reachGoal(counterName: any, ...args: any[]): void;
23
23
  declare function reachGoals(goals: any, counterName?: string): void;
24
24
  /**
25
25
  * @deprecated Metrika will be deleted after launch of analyticsEvents
26
- * https://st.yandex-team.ru/PAGECTR-7
27
26
  */
28
27
  declare const Goal: {
29
28
  SUPPORT_OPEN_FORM: string;
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.initCounters = void 0;
4
4
  /**
5
5
  * @deprecated Metrika will be deleted after launch of analyticsEvents
6
- * https://st.yandex-team.ru/PAGECTR-7
7
6
  */
8
7
  const Goal = {
9
8
  SUPPORT_OPEN_FORM: 'SUPPORTOPENFORM',
@@ -1,7 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { ContentBlockProps, HeaderBlockProps, MediaProps as PCMediaProps, TextTheme } from '@gravity-ui/page-constructor';
3
+ import { BlockType, ClassNameProps, PostData } from './common';
3
4
  import { PaddingsYFMProps } from './paddings';
4
- import { ClassNameProps, PostData, BlockType } from './common';
5
5
  export type AuthorProps = ClassNameProps & {
6
6
  authorId: number;
7
7
  image: string;
@@ -1,5 +1,5 @@
1
- import { IDevice, IBrowser } from 'ua-parser-js';
2
1
  import { ReactNode } from 'react';
2
+ import { IBrowser, IDevice } from 'ua-parser-js';
3
3
  import { HeaderBlockProps as PageConstructorHeaderBlockProps } from '@gravity-ui/page-constructor';
4
4
  import { Locale } from '../models/locale';
5
5
  export declare enum Theme {
@@ -18,6 +18,7 @@ export type Author = {
18
18
  secondName: string | null;
19
19
  description: string | null;
20
20
  fullDescription: string | null;
21
+ shortDescription: string | null;
21
22
  } & {
22
23
  [x: string]: string | null;
23
24
  };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="lodash" />
2
2
  import { ContentBlockProps, HeaderBreadCrumbsProps, MetrikaGoal, NewMetrikaGoal } from '@gravity-ui/page-constructor';
3
3
  import { RouterContextProps } from '../contexts/RouterContext';
4
- import { Tag, GetPostsRequest, Query } from '../models/common';
4
+ import { GetPostsRequest, Query, Tag } from '../models/common';
5
5
  export interface QueryParam {
6
6
  name: string;
7
7
  value?: string | number | null;
@@ -15,8 +15,8 @@ exports.scrollOnPageChange = exports.getFeedQueryParams = exports.getBlogElement
15
15
  const url_1 = require("url");
16
16
  const lodash_1 = require("lodash");
17
17
  const page_constructor_1 = require("@gravity-ui/page-constructor");
18
- const i18n_1 = require("../i18n");
19
18
  const constants_1 = require("../blocks/constants");
19
+ const i18n_1 = require("../i18n");
20
20
  function getAbsolutePath(router, url) {
21
21
  if (!router || !router.pathname) {
22
22
  return url !== null && url !== void 0 ? url : '';
@@ -1,7 +1,7 @@
1
- import React, { useMemo, useContext } from 'react';
2
- import { Author as PCAuthor, AuthorType } from '@gravity-ui/page-constructor';
3
- import { PostPageContext } from '../../contexts/PostPageContext';
1
+ import React, { useContext, useMemo } from 'react';
2
+ import { AuthorType, Author as PCAuthor } from '@gravity-ui/page-constructor';
4
3
  import { Wrapper } from '../../components/Wrapper/Wrapper';
4
+ import { PostPageContext } from '../../contexts/PostPageContext';
5
5
  import { PaddingsDirections } from '../../models/paddings';
6
6
  import { block } from '../../utils/cn';
7
7
  import './Author.css';
@@ -18,10 +18,10 @@ export const Author = (props) => {
18
18
  return {
19
19
  firstName: (author === null || author === void 0 ? void 0 : author.firstName) || '',
20
20
  secondName: (author === null || author === void 0 ? void 0 : author.secondName) || '',
21
- description: (author === null || author === void 0 ? void 0 : author.fullDescription) || '',
21
+ description: (author === null || author === void 0 ? void 0 : author.shortDescription) || '',
22
22
  avatar: authorAvatar,
23
23
  };
24
- }, [author === null || author === void 0 ? void 0 : author.avatar, author === null || author === void 0 ? void 0 : author.firstName, author === null || author === void 0 ? void 0 : author.fullDescription, author === null || author === void 0 ? void 0 : author.secondName, image]);
24
+ }, [author === null || author === void 0 ? void 0 : author.avatar, author === null || author === void 0 ? void 0 : author.firstName, author === null || author === void 0 ? void 0 : author.shortDescription, author === null || author === void 0 ? void 0 : author.secondName, image]);
25
25
  if (!(authorItem === null || authorItem === void 0 ? void 0 : authorItem.firstName) || !(authorItem === null || authorItem === void 0 ? void 0 : authorItem.secondName)) {
26
26
  return null;
27
27
  }
@@ -12,10 +12,10 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import React from 'react';
13
13
  import { Content, Image } from '@gravity-ui/page-constructor';
14
14
  import { Wrapper } from '../../components/Wrapper/Wrapper';
15
- import { getBlogElementMetrika, updateContentSizes } from '../../utils/common';
16
- import { block } from '../../utils/cn';
17
- import { PaddingsDirections } from '../../models/paddings';
18
15
  import { BlogMetrikaGoalIds } from '../../constants';
16
+ import { PaddingsDirections } from '../../models/paddings';
17
+ import { block } from '../../utils/cn';
18
+ import { getBlogElementMetrika, updateContentSizes } from '../../utils/common';
19
19
  import './Banner.css';
20
20
  const b = block('banner');
21
21
  export const Banner = (_a) => {
@@ -28,13 +28,13 @@ export const Banner = (_a) => {
28
28
  const contentData = updateContentSizes(content);
29
29
  /**
30
30
  * @deprecated Metrika will be deleted after launch of analyticsEvents
31
- * https://st.yandex-team.ru/PAGECTR-7
32
31
  */
33
32
  const metrikaGoal = {
34
33
  name: BlogMetrikaGoalIds.bannerCommon,
35
34
  isCrossSite: true,
36
35
  };
37
36
  (_b = contentData.buttons) === null || _b === void 0 ? void 0 : _b.forEach((button) => {
37
+ // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
38
38
  button.metrikaGoals = getBlogElementMetrika(metrikaGoal, button.metrikaGoals);
39
39
  });
40
40
  return (React.createElement(Wrapper, { paddings: {
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import { Content } from '@gravity-ui/page-constructor';
3
3
  import { Wrapper } from '../../components/Wrapper/Wrapper';
4
- import { getBlogElementMetrika, updateContentSizes } from '../../utils/common';
5
- import { PaddingsDirections } from '../../models/paddings';
6
4
  import { BlogMetrikaGoalIds } from '../../constants';
5
+ import { PaddingsDirections } from '../../models/paddings';
7
6
  import { block } from '../../utils/cn';
7
+ import { getBlogElementMetrika, updateContentSizes } from '../../utils/common';
8
8
  import './CTA.css';
9
9
  const b = block('cta');
10
10
  const MAX_COLUMN_COUNT = 4, MIN_COLUMN_COUNT = 2, DEFAULT_COLUMN_COUNT = 3;
@@ -18,7 +18,6 @@ export const CTA = ({ items, paddingTop, paddingBottom }) => {
18
18
  }
19
19
  /**
20
20
  * @deprecated Metrika will be deleted after launch of analyticsEvents
21
- * https://st.yandex-team.ru/PAGECTR-7
22
21
  */
23
22
  const metrikaGoal = {
24
23
  name: BlogMetrikaGoalIds.cta,
@@ -31,6 +30,7 @@ export const CTA = ({ items, paddingTop, paddingBottom }) => {
31
30
  var _a;
32
31
  const contentData = updateContentSizes(content);
33
32
  (_a = contentData.links) === null || _a === void 0 ? void 0 : _a.forEach((link) => {
33
+ // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
34
34
  link.metrikaGoals = getBlogElementMetrika(metrikaGoal, link.metrikaGoals);
35
35
  });
36
36
  return (React.createElement("div", { key: index, className: b('button', {
@@ -13,8 +13,8 @@ import React from 'react';
13
13
  import { BackgroundImage, Content } from '@gravity-ui/page-constructor';
14
14
  import { Wrapper } from '../../components/Wrapper/Wrapper';
15
15
  import { PaddingsDirections } from '../../models/paddings';
16
- import { updateContentSizes } from '../../utils/common';
17
16
  import { block } from '../../utils/cn';
17
+ import { updateContentSizes } from '../../utils/common';
18
18
  import './ColoredText.css';
19
19
  const b = block('colored-text');
20
20
  export const ColoredText = (_a) => {
@@ -1,26 +1,24 @@
1
- import React, { useEffect, useCallback, useReducer, useMemo, useContext } from 'react';
2
- import { Icon } from '@gravity-ui/uikit';
1
+ import React, { useCallback, useContext, useEffect, useMemo, useReducer } from 'react';
3
2
  import { useAnalytics } from '@gravity-ui/page-constructor';
4
- import { FeedContext } from '../../contexts/FeedContext';
5
- import { RouterContext } from '../../contexts/RouterContext';
6
- import { LocaleContext } from '../../contexts/LocaleContext';
7
- import { DEFAULT_PAGE, DEFAULT_ROWS_PER_PAGE } from '../constants';
8
3
  /**
9
4
  * @deprecated Metrika will be deleted after launch of analyticsEvents
10
- * https://st.yandex-team.ru/PAGECTR-7
11
5
  */
12
- import { BlogMetrikaGoalIds } from '../../constants';
13
- import { getFeedQueryParams, scrollOnPageChange } from '../../utils/common';
6
+ import { Icon } from '@gravity-ui/uikit';
14
7
  import { FeedHeader } from '../../components/FeedHeader/FeedHeader';
15
- import { PostsError } from '../../components/PostsError/PostsError';
16
8
  import { Posts } from '../../components/Posts/Posts';
9
+ import { PostsError } from '../../components/PostsError/PostsError';
10
+ import { BlogMetrikaGoalIds } from '../../constants';
11
+ import { FeedContext } from '../../contexts/FeedContext';
12
+ import { LocaleContext } from '../../contexts/LocaleContext';
13
+ import { RouterContext } from '../../contexts/RouterContext';
17
14
  /**
18
15
  * @deprecated Metrika will be deleted after launch of analyticsEvents
19
- * https://st.yandex-team.ru/PAGECTR-7
20
16
  */
21
17
  import metrika from '../../counters/metrika.js';
22
18
  import { MetrikaCounter } from '../../counters/utils';
23
19
  import { DefaultEventNames } from '../../models/common';
20
+ import { getFeedQueryParams, scrollOnPageChange } from '../../utils/common';
21
+ import { DEFAULT_PAGE, DEFAULT_ROWS_PER_PAGE } from '../constants';
24
22
  import { ActionTypes, reducer } from './reducer';
25
23
  const CONTAINER_ID = 'blog-cards';
26
24
  const PAGE_QUERY = 'page';
@@ -96,7 +94,6 @@ export const Feed = ({ image }) => {
96
94
  dispatch({ type: ActionTypes.SetIsShowMoreFetching, payload: true });
97
95
  /**
98
96
  * @deprecated Metrika will be deleted after launch of analyticsEvents
99
- * https://st.yandex-team.ru/PAGECTR-7
100
97
  */
101
98
  metrika.reachGoal(MetrikaCounter.CrossSite, BlogMetrikaGoalIds.showMore);
102
99
  handleAnalytics();
@@ -1,4 +1,4 @@
1
- import { Query, PostData } from '../../models/common';
1
+ import { PostData, Query } from '../../models/common';
2
2
  export declare enum ActionTypes {
3
3
  SetErrorLoad = "setErrorLoad",
4
4
  SetErrorShowMore = "setErrorShowMore",
@@ -1,15 +1,14 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { HeaderBlock } from '@gravity-ui/page-constructor';
3
- import { PostPageContext } from '../../contexts/PostPageContext';
4
- import { LocaleContext } from '../../contexts/LocaleContext';
5
3
  import { PostInfo } from '../../components/PostInfo/PostInfo';
6
4
  import { Wrapper } from '../../components/Wrapper/Wrapper';
5
+ import { BlogMetrikaGoalIds } from '../../constants';
6
+ import { LocaleContext } from '../../contexts/LocaleContext';
7
+ import { PostPageContext } from '../../contexts/PostPageContext';
7
8
  import { PaddingsDirections } from '../../models/paddings';
8
9
  import { getBreadcrumbs } from '../../utils/common';
9
- import { BlogMetrikaGoalIds } from '../../constants';
10
10
  /**
11
11
  * @deprecated Metrika will be deleted after launch of analyticsEvents
12
- * https://st.yandex-team.ru/PAGECTR-7
13
12
  */
14
13
  const metrikaGoals = {
15
14
  sharing: BlogMetrikaGoalIds.shareTop,
@@ -1,18 +1,17 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { HeaderBreadcrumbs, YFMWrapper } from '@gravity-ui/page-constructor';
3
- import { PostPageContext } from '../../contexts/PostPageContext';
4
- import { LocaleContext } from '../../contexts/LocaleContext';
5
- import { Wrapper } from '../../components/Wrapper/Wrapper';
6
3
  import { PostInfo } from '../../components/PostInfo/PostInfo';
7
- import { PaddingsDirections } from '../../models/paddings';
8
- import { getBreadcrumbs } from '../../utils/common';
4
+ import { Wrapper } from '../../components/Wrapper/Wrapper';
9
5
  import { BlogMetrikaGoalIds } from '../../constants';
6
+ import { LocaleContext } from '../../contexts/LocaleContext';
7
+ import { PostPageContext } from '../../contexts/PostPageContext';
8
+ import { PaddingsDirections } from '../../models/paddings';
10
9
  import { block } from '../../utils/cn';
10
+ import { getBreadcrumbs } from '../../utils/common';
11
11
  import './Meta.css';
12
12
  const b = block('meta');
13
13
  /**
14
14
  * @deprecated Metrika will be deleted after launch of analyticsEvents
15
- * https://st.yandex-team.ru/PAGECTR-7
16
15
  */
17
16
  const metrikaGoals = {
18
17
  sharing: BlogMetrikaGoalIds.shareBottom,
@@ -1,14 +1,13 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { SliderBlock } from '@gravity-ui/page-constructor';
3
- import { i18, Keyset } from '../../i18n';
4
- import { Wrapper } from '../../components/Wrapper/Wrapper';
5
3
  import { PostCard } from '../../components/PostCard/PostCard';
6
- import { PaddingsDirections } from '../../models/paddings';
7
- import { PostPageContext } from '../../contexts/PostPageContext';
4
+ import { Wrapper } from '../../components/Wrapper/Wrapper';
8
5
  import { BlogMetrikaGoalIds } from '../../constants';
6
+ import { PostPageContext } from '../../contexts/PostPageContext';
7
+ import { Keyset, i18 } from '../../i18n';
8
+ import { PaddingsDirections } from '../../models/paddings';
9
9
  /**
10
10
  * @deprecated Metrika will be deleted after launch of analyticsEvents
11
- * https://st.yandex-team.ru/PAGECTR-7
12
11
  */
13
12
  const metrikaGoals = [
14
13
  {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { YFMWrapper } from '@gravity-ui/page-constructor';
3
2
  import block from 'bem-cn-lite';
3
+ import { YFMWrapper } from '@gravity-ui/page-constructor';
4
4
  import { Wrapper } from '../../components/Wrapper/Wrapper';
5
5
  import { PaddingsDirections } from '../../models/paddings';
6
6
  const b = block('yfm');
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { HeaderBlockProps, ClassNameProps } from '../../models/common';
2
+ import { ClassNameProps, HeaderBlockProps } from '../../models/common';
3
3
  import { ControlsProps } from './components/Controls/Controls';
4
4
  import './FeedHeader.css';
5
5
  type HeaderProps = Pick<HeaderBlockProps, 'background' | 'offset' | 'theme' | 'verticalOffset'>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { BackgroundImage, Grid, getThemedValue, FullWidthBackground, } from '@gravity-ui/page-constructor';
3
- import { Controls } from './components/Controls/Controls';
2
+ import { BackgroundImage, FullWidthBackground, Grid, getThemedValue, } from '@gravity-ui/page-constructor';
4
3
  import { block } from '../../utils/cn';
4
+ import { Controls } from './components/Controls/Controls';
5
5
  import './FeedHeader.css';
6
6
  const b = block('feed-header');
7
7
  export const FeedHeader = ({ tags, services, setIsFetching, offset = 'default', background, theme = 'default', verticalOffset = 'l', className, handleChangeQuery, queryParams, }) => {
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { HandleChangeQueryParams, SetQueryType, Query } from '../../../../models/common';
2
+ import { HandleChangeQueryParams, Query, SetQueryType } from '../../../../models/common';
3
3
  import './Controls.css';
4
4
  export type SelectItem = {
5
5
  content: string;
@@ -1,20 +1,19 @@
1
- import React, { useState, useContext, useMemo } from 'react';
1
+ import React, { useContext, useMemo, useState } from 'react';
2
2
  import { useAnalytics } from '@gravity-ui/page-constructor';
3
- import { Icon, Button, Select } from '@gravity-ui/uikit';
4
- import { Search } from '../../../Search/Search';
5
- import { renderSwitcher, renderFilter, renderOption } from './customRenders';
6
- import { LikesContext } from '../../../../contexts/LikesContext';
3
+ import { Button, Icon, Select } from '@gravity-ui/uikit';
7
4
  /**
8
5
  * @deprecated Metrika will be deleted after launch of analyticsEvents
9
- * https://st.yandex-team.ru/PAGECTR-7
10
6
  */
11
7
  import { BlogMetrikaGoalIds } from '../../../../constants';
8
+ import { LikesContext } from '../../../../contexts/LikesContext';
12
9
  import metrika from '../../../../counters/metrika.js';
13
10
  import { MetrikaCounter } from '../../../../counters/utils';
11
+ import { Keyset, i18 } from '../../../../i18n';
14
12
  import { Save } from '../../../../icons/Save';
15
- import { i18, Keyset } from '../../../../i18n';
16
- import { block } from '../../../../utils/cn';
17
13
  import { DefaultEventNames, } from '../../../../models/common';
14
+ import { block } from '../../../../utils/cn';
15
+ import { Search } from '../../../Search/Search';
16
+ import { renderFilter, renderOption, renderSwitcher } from './customRenders';
18
17
  import './Controls.css';
19
18
  const b = block('feed-controls');
20
19
  const ICON_SIZE = 16;
@@ -42,7 +41,6 @@ export const Controls = ({ setIsFetching, tags = [], services = [], handleChange
42
41
  const handleTagSelect = (selectedTags) => {
43
42
  /**
44
43
  * @deprecated Metrika will be deleted after launch of analyticsEvents
45
- * https://st.yandex-team.ru/PAGECTR-7
46
44
  */
47
45
  metrika.reachGoal(MetrikaCounter.CrossSite, BlogMetrikaGoalIds.tag, {
48
46
  theme: selectedTags[0],
@@ -64,7 +62,6 @@ export const Controls = ({ setIsFetching, tags = [], services = [], handleChange
64
62
  const metrikaAsString = forMetrikaServices.map((service) => service.content).join(',');
65
63
  /**
66
64
  * @deprecated Metrika will be deleted after launch of analyticsEvents
67
- * https://st.yandex-team.ru/PAGECTR-7
68
65
  */
69
66
  metrika.reachGoal(MetrikaCounter.CrossSite, BlogMetrikaGoalIds.service, {
70
67
  service: metrikaAsString,
@@ -1,4 +1,4 @@
1
- import { SelectProps, SelectOption } from '@gravity-ui/uikit';
1
+ import { SelectOption, SelectProps } from '@gravity-ui/uikit';
2
2
  import { CustomSwitcherProps } from '../CustomSwitcher/CustomSwitcher';
3
3
  import './Controls.css';
4
4
  type RenderSwitcherType = ({ initial, list, defaultLabel, }: {
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { TextInput } from '@gravity-ui/uikit';
3
- import { i18, Keyset } from '../../../../i18n';
3
+ import { Keyset, i18 } from '../../../../i18n';
4
4
  import { block } from '../../../../utils/cn';
5
- import { CustomSwitcher } from '../CustomSwitcher/CustomSwitcher';
6
5
  import { CustomSelectOption, } from '../CustomSelectOption/CustomSelectOption';
6
+ import { CustomSwitcher } from '../CustomSwitcher/CustomSwitcher';
7
7
  import './Controls.css';
8
8
  const b = block('feed-controls');
9
9
  export const renderSwitcher = ({ initial, list, defaultLabel }) =>
@@ -9,21 +9,20 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import React, { useEffect, useState, useMemo } from 'react';
12
+ import React, { useEffect, useMemo, useState } from 'react';
13
13
  import { useAnalytics } from '@gravity-ui/page-constructor';
14
14
  import { BlogMetrikaGoalIds } from '../../constants';
15
15
  /**
16
16
  * @deprecated Metrika will be deleted after launch of analyticsEvents
17
- * https://st.yandex-team.ru/PAGECTR-7
18
17
  */
19
18
  import metrika from '../../counters/metrika.js';
20
19
  import { MetrikaCounter } from '../../counters/utils';
21
- import { getPageConfigs, getPagesCount } from './utils';
22
- import { ArrowType } from './types';
20
+ import { DefaultEventNames } from '../../models/common';
23
21
  import { block } from '../../utils/cn';
24
22
  import { NavigationButton } from './components/NavigationButton';
25
23
  import { PaginatorItem } from './components/PaginatorItem';
26
- import { DefaultEventNames } from '../../models/common';
24
+ import { ArrowType } from './types';
25
+ import { getPageConfigs, getPagesCount } from './utils';
27
26
  import './Paginator.css';
28
27
  const b = block('paginator');
29
28
  const DEFAULT_PAGE_COUNT_FOR_SHOW_SUPPORT_BUTTONS = 6;
@@ -46,7 +45,6 @@ export const Paginator = ({ itemsPerPage, totalItems, maxPages, page, className,
46
45
  if (type === 'prev' && page > 1) {
47
46
  /**
48
47
  * @deprecated Metrika will be deleted after launch of analyticsEvents
49
- * https://st.yandex-team.ru/PAGECTR-7
50
48
  */
51
49
  metrika.reachGoal(MetrikaCounter.CrossSite, BlogMetrikaGoalIds.home);
52
50
  handleAnalyticsHome();
@@ -55,7 +53,6 @@ export const Paginator = ({ itemsPerPage, totalItems, maxPages, page, className,
55
53
  else if (type === 'next' && page < pagesCount) {
56
54
  /**
57
55
  * @deprecated Metrika will be deleted after launch of analyticsEvents
58
- * https://st.yandex-team.ru/PAGECTR-7
59
56
  */
60
57
  handleAnalyticsNext();
61
58
  metrika.reachGoal(MetrikaCounter.CrossSite, BlogMetrikaGoalIds.next);
@@ -69,7 +66,6 @@ export const Paginator = ({ itemsPerPage, totalItems, maxPages, page, className,
69
66
  if (index !== page && typeof index === 'number') {
70
67
  /**
71
68
  * @deprecated Metrika will be deleted after launch of analyticsEvents
72
- * https://st.yandex-team.ru/PAGECTR-7
73
69
  */
74
70
  metrika.reachGoal(MetrikaCounter.CrossSite, BlogMetrikaGoalIds.page, { page: index });
75
71
  handleAnalyticsPage(null, { page: String(index) });
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { ArrowType } from '../types';
3
- import { i18, Keyset } from '../../../i18n';
2
+ import { Keyset, i18 } from '../../../i18n';
4
3
  import { block } from '../../../utils/cn';
4
+ import { ArrowType } from '../types';
5
5
  import '../Paginator.css';
6
6
  const b = block('paginator');
7
7
  export const NavigationButton = ({ arrowType, disabled }) => disabled ? null : (React.createElement("div", { className: b('icon') }, arrowType === ArrowType.Prev ? i18(Keyset.ButtonBegin) : i18(Keyset.ButtonFarther)));
@@ -1,8 +1,8 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { Button } from '@gravity-ui/uikit';
3
3
  import { LocaleContext } from '../../../contexts/LocaleContext';
4
- import { getBlogPath } from '../../../utils/common';
5
4
  import { block } from '../../../utils/cn';
5
+ import { getBlogPath } from '../../../utils/common';
6
6
  import '../Paginator.css';
7
7
  const b = block('paginator');
8
8
  export const PaginatorItem = ({ dataKey, mods, content, onClick, loading = false, }) => {