@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.
- package/CHANGELOG.md +26 -0
- package/build/cjs/blocks/Author/Author.js +3 -3
- package/build/cjs/blocks/Banner/Banner.js +4 -4
- package/build/cjs/blocks/CTA/CTA.js +3 -3
- package/build/cjs/blocks/ColoredText/ColoredText.js +1 -1
- package/build/cjs/blocks/Feed/Feed.js +17 -20
- package/build/cjs/blocks/Feed/reducer.d.ts +1 -1
- package/build/cjs/blocks/Header/Header.js +3 -4
- package/build/cjs/blocks/Meta/Meta.js +5 -6
- package/build/cjs/blocks/Suggest/Suggest.js +4 -5
- package/build/cjs/blocks/YFM/YFM.js +1 -1
- package/build/cjs/components/FeedHeader/FeedHeader.d.ts +1 -1
- package/build/cjs/components/FeedHeader/FeedHeader.js +1 -1
- package/build/cjs/components/FeedHeader/components/Controls/Controls.d.ts +1 -1
- package/build/cjs/components/FeedHeader/components/Controls/Controls.js +5 -8
- package/build/cjs/components/FeedHeader/components/Controls/customRenders.d.ts +1 -1
- package/build/cjs/components/FeedHeader/components/Controls/customRenders.js +1 -1
- package/build/cjs/components/Paginator/Paginator.js +3 -7
- package/build/cjs/components/Paginator/components/NavigationButton.js +1 -1
- package/build/cjs/components/Paginator/components/PaginatorItem.js +1 -1
- package/build/cjs/components/PostCard/PostCard.d.ts +0 -1
- package/build/cjs/components/PostCard/PostCard.js +1 -1
- package/build/cjs/components/PostInfo/PostInfo.d.ts +0 -1
- package/build/cjs/components/PostInfo/PostInfo.js +2 -2
- package/build/cjs/components/PostInfo/SuggestPostInfo.js +1 -1
- package/build/cjs/components/PostInfo/components/Date.js +1 -1
- package/build/cjs/components/PostInfo/components/Save.d.ts +0 -1
- package/build/cjs/components/PostInfo/components/Save.js +1 -2
- package/build/cjs/components/PostInfo/components/Sharing.d.ts +0 -1
- package/build/cjs/components/PostInfo/components/Sharing.js +1 -2
- package/build/cjs/components/Posts/Posts.js +1 -1
- package/build/cjs/components/PostsEmpty/PostsEmpty.js +1 -1
- package/build/cjs/components/Search/Search.js +2 -2
- package/build/cjs/components/Wrapper/Wrapper.js +1 -1
- package/build/cjs/constructor/BlogConstructorProvider.d.ts +1 -1
- package/build/cjs/constructor/BlogConstructorProvider.js +3 -3
- package/build/cjs/constructor/blocksMap.js +8 -8
- package/build/cjs/containers/BlogPage/BlogPage.d.ts +2 -2
- package/build/cjs/containers/BlogPage/BlogPage.js +2 -2
- package/build/cjs/containers/BlogPostPage/BlogPostPage.css +1 -1
- package/build/cjs/containers/BlogPostPage/BlogPostPage.d.ts +2 -2
- package/build/cjs/containers/BlogPostPage/BlogPostPage.js +2 -2
- package/build/cjs/contexts/FeedContext.d.ts +1 -1
- package/build/cjs/contexts/theme/ThemeProvider.js +1 -1
- package/build/cjs/counters/metrika.d.ts +0 -1
- package/build/cjs/counters/metrika.js +0 -1
- package/build/cjs/models/blocks.d.ts +1 -1
- package/build/cjs/models/common.d.ts +2 -1
- package/build/cjs/utils/common.d.ts +1 -1
- package/build/cjs/utils/common.js +1 -1
- package/build/esm/blocks/Author/Author.js +5 -5
- package/build/esm/blocks/Banner/Banner.js +4 -4
- package/build/esm/blocks/CTA/CTA.js +3 -3
- package/build/esm/blocks/ColoredText/ColoredText.js +1 -1
- package/build/esm/blocks/Feed/Feed.js +9 -12
- package/build/esm/blocks/Feed/reducer.d.ts +1 -1
- package/build/esm/blocks/Header/Header.js +3 -4
- package/build/esm/blocks/Meta/Meta.js +5 -6
- package/build/esm/blocks/Suggest/Suggest.js +4 -5
- package/build/esm/blocks/YFM/YFM.js +1 -1
- package/build/esm/components/FeedHeader/FeedHeader.d.ts +1 -1
- package/build/esm/components/FeedHeader/FeedHeader.js +2 -2
- package/build/esm/components/FeedHeader/components/Controls/Controls.d.ts +1 -1
- package/build/esm/components/FeedHeader/components/Controls/Controls.js +7 -10
- package/build/esm/components/FeedHeader/components/Controls/customRenders.d.ts +1 -1
- package/build/esm/components/FeedHeader/components/Controls/customRenders.js +2 -2
- package/build/esm/components/Paginator/Paginator.js +4 -8
- package/build/esm/components/Paginator/components/NavigationButton.js +2 -2
- package/build/esm/components/Paginator/components/PaginatorItem.js +1 -1
- package/build/esm/components/PostCard/PostCard.d.ts +0 -1
- package/build/esm/components/PostCard/PostCard.js +3 -3
- package/build/esm/components/PostInfo/PostInfo.d.ts +0 -1
- package/build/esm/components/PostInfo/PostInfo.js +2 -2
- package/build/esm/components/PostInfo/SuggestPostInfo.js +1 -1
- package/build/esm/components/PostInfo/components/Date.js +1 -1
- package/build/esm/components/PostInfo/components/ReadingTime.js +1 -1
- package/build/esm/components/PostInfo/components/Save.d.ts +0 -1
- package/build/esm/components/PostInfo/components/Save.js +1 -2
- package/build/esm/components/PostInfo/components/Sharing.d.ts +0 -1
- package/build/esm/components/PostInfo/components/Sharing.js +1 -2
- package/build/esm/components/Posts/Posts.js +2 -2
- package/build/esm/components/PostsEmpty/PostsEmpty.js +1 -1
- package/build/esm/components/PostsError/PostsError.js +1 -1
- package/build/esm/components/Search/Search.js +3 -3
- package/build/esm/components/Wrapper/Wrapper.js +1 -1
- package/build/esm/constructor/BlogConstructorProvider.d.ts +1 -1
- package/build/esm/constructor/BlogConstructorProvider.js +3 -3
- package/build/esm/constructor/blocksMap.js +8 -8
- package/build/esm/containers/BlogPage/BlogPage.d.ts +2 -2
- package/build/esm/containers/BlogPage/BlogPage.js +2 -2
- package/build/esm/containers/BlogPostPage/BlogPostPage.css +1 -1
- package/build/esm/containers/BlogPostPage/BlogPostPage.d.ts +2 -2
- package/build/esm/containers/BlogPostPage/BlogPostPage.js +2 -2
- package/build/esm/contexts/FeedContext.d.ts +1 -1
- package/build/esm/contexts/theme/ThemeProvider.js +1 -1
- package/build/esm/counters/metrika.d.ts +0 -1
- package/build/esm/counters/metrika.js +0 -1
- package/build/esm/hooks/useLikes.js +1 -1
- package/build/esm/models/blocks.d.ts +1 -1
- package/build/esm/models/common.d.ts +2 -1
- package/build/esm/utils/common.d.ts +1 -1
- package/build/esm/utils/common.js +3 -3
- package/package.json +4 -6
- package/server/data/contentFilter.js +1 -0
- package/server/data/createReadableContent.js +1 -1
- package/server/data/transformPost.d.ts +1 -1
- package/server/models/blocks.d.ts +1 -1
- package/server/models/common.d.ts +2 -1
- package/styles/yfm.css +1 -1
- package/styles/yfm.scss +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.3.0](https://github.com/gravity-ui/blog-constructor/compare/v2.2.0...v2.3.0) (2023-04-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* analytics refactoring ([#13](https://github.com/gravity-ui/blog-constructor/issues/13)) ([a95c55b](https://github.com/gravity-ui/blog-constructor/commit/a95c55bd1ff98f86a110f33ac3275b590ee5db8e))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* margin-top of header ([#31](https://github.com/gravity-ui/blog-constructor/issues/31)) ([97ed974](https://github.com/gravity-ui/blog-constructor/commit/97ed974ab0ce0546010d60587b21b8c0eee3279c))
|
|
14
|
+
|
|
15
|
+
## [2.2.0](https://github.com/gravity-ui/blog-constructor/compare/v2.1.0...v2.2.0) (2023-04-06)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* update linters ([#24](https://github.com/gravity-ui/blog-constructor/issues/24)) ([bc5aa0f](https://github.com/gravity-ui/blog-constructor/commit/bc5aa0f72e64b916acaf692874482ccdae3f94e9))
|
|
21
|
+
|
|
22
|
+
## [2.1.0](https://github.com/gravity-ui/blog-constructor/compare/v2.0.2...v2.1.0) (2023-04-06)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* change source field with author description ([#5](https://github.com/gravity-ui/blog-constructor/issues/5)) ([fb7151c](https://github.com/gravity-ui/blog-constructor/commit/fb7151ceac39b2e4407c7110da0314b87c4db72b))
|
|
28
|
+
|
|
3
29
|
## [2.0.2](https://github.com/gravity-ui/blog-constructor/compare/v2.0.1...v2.0.2) (2023-04-05)
|
|
4
30
|
|
|
5
31
|
|
|
@@ -26,8 +26,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.Author = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
29
|
-
const PostPageContext_1 = require("../../contexts/PostPageContext");
|
|
30
29
|
const Wrapper_1 = require("../../components/Wrapper/Wrapper");
|
|
30
|
+
const PostPageContext_1 = require("../../contexts/PostPageContext");
|
|
31
31
|
const paddings_1 = require("../../models/paddings");
|
|
32
32
|
const cn_1 = require("../../utils/cn");
|
|
33
33
|
const b = (0, cn_1.block)('author');
|
|
@@ -43,10 +43,10 @@ const Author = (props) => {
|
|
|
43
43
|
return {
|
|
44
44
|
firstName: (author === null || author === void 0 ? void 0 : author.firstName) || '',
|
|
45
45
|
secondName: (author === null || author === void 0 ? void 0 : author.secondName) || '',
|
|
46
|
-
description: (author === null || author === void 0 ? void 0 : author.
|
|
46
|
+
description: (author === null || author === void 0 ? void 0 : author.shortDescription) || '',
|
|
47
47
|
avatar: authorAvatar,
|
|
48
48
|
};
|
|
49
|
-
}, [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.
|
|
49
|
+
}, [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]);
|
|
50
50
|
if (!(authorItem === null || authorItem === void 0 ? void 0 : authorItem.firstName) || !(authorItem === null || authorItem === void 0 ? void 0 : authorItem.secondName)) {
|
|
51
51
|
return null;
|
|
52
52
|
}
|
|
@@ -18,10 +18,10 @@ exports.Banner = void 0;
|
|
|
18
18
|
const react_1 = __importDefault(require("react"));
|
|
19
19
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
20
20
|
const Wrapper_1 = require("../../components/Wrapper/Wrapper");
|
|
21
|
-
const common_1 = require("../../utils/common");
|
|
22
|
-
const cn_1 = require("../../utils/cn");
|
|
23
|
-
const paddings_1 = require("../../models/paddings");
|
|
24
21
|
const constants_1 = require("../../constants");
|
|
22
|
+
const paddings_1 = require("../../models/paddings");
|
|
23
|
+
const cn_1 = require("../../utils/cn");
|
|
24
|
+
const common_1 = require("../../utils/common");
|
|
25
25
|
const b = (0, cn_1.block)('banner');
|
|
26
26
|
const Banner = (_a) => {
|
|
27
27
|
var _b;
|
|
@@ -33,13 +33,13 @@ const Banner = (_a) => {
|
|
|
33
33
|
const contentData = (0, common_1.updateContentSizes)(content);
|
|
34
34
|
/**
|
|
35
35
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
36
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
37
36
|
*/
|
|
38
37
|
const metrikaGoal = {
|
|
39
38
|
name: constants_1.BlogMetrikaGoalIds.bannerCommon,
|
|
40
39
|
isCrossSite: true,
|
|
41
40
|
};
|
|
42
41
|
(_b = contentData.buttons) === null || _b === void 0 ? void 0 : _b.forEach((button) => {
|
|
42
|
+
// eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
|
|
43
43
|
button.metrikaGoals = (0, common_1.getBlogElementMetrika)(metrikaGoal, button.metrikaGoals);
|
|
44
44
|
});
|
|
45
45
|
return (react_1.default.createElement(Wrapper_1.Wrapper, { paddings: {
|
|
@@ -7,10 +7,10 @@ exports.CTA = void 0;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
9
9
|
const Wrapper_1 = require("../../components/Wrapper/Wrapper");
|
|
10
|
-
const common_1 = require("../../utils/common");
|
|
11
|
-
const paddings_1 = require("../../models/paddings");
|
|
12
10
|
const constants_1 = require("../../constants");
|
|
11
|
+
const paddings_1 = require("../../models/paddings");
|
|
13
12
|
const cn_1 = require("../../utils/cn");
|
|
13
|
+
const common_1 = require("../../utils/common");
|
|
14
14
|
const b = (0, cn_1.block)('cta');
|
|
15
15
|
const MAX_COLUMN_COUNT = 4, MIN_COLUMN_COUNT = 2, DEFAULT_COLUMN_COUNT = 3;
|
|
16
16
|
const CTA = ({ items, paddingTop, paddingBottom }) => {
|
|
@@ -23,7 +23,6 @@ const CTA = ({ items, paddingTop, paddingBottom }) => {
|
|
|
23
23
|
}
|
|
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
|
const metrikaGoal = {
|
|
29
28
|
name: constants_1.BlogMetrikaGoalIds.cta,
|
|
@@ -36,6 +35,7 @@ const CTA = ({ items, paddingTop, paddingBottom }) => {
|
|
|
36
35
|
var _a;
|
|
37
36
|
const contentData = (0, common_1.updateContentSizes)(content);
|
|
38
37
|
(_a = contentData.links) === null || _a === void 0 ? void 0 : _a.forEach((link) => {
|
|
38
|
+
// eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
|
|
39
39
|
link.metrikaGoals = (0, common_1.getBlogElementMetrika)(metrikaGoal, link.metrikaGoals);
|
|
40
40
|
});
|
|
41
41
|
return (react_1.default.createElement("div", { key: index, className: b('button', {
|
|
@@ -19,8 +19,8 @@ const react_1 = __importDefault(require("react"));
|
|
|
19
19
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
20
20
|
const Wrapper_1 = require("../../components/Wrapper/Wrapper");
|
|
21
21
|
const paddings_1 = require("../../models/paddings");
|
|
22
|
-
const common_1 = require("../../utils/common");
|
|
23
22
|
const cn_1 = require("../../utils/cn");
|
|
23
|
+
const common_1 = require("../../utils/common");
|
|
24
24
|
const b = (0, cn_1.block)('colored-text');
|
|
25
25
|
const ColoredText = (_a) => {
|
|
26
26
|
var { background, paddingTop, paddingBottom } = _a, content = __rest(_a, ["background", "paddingTop", "paddingBottom"]);
|
|
@@ -28,28 +28,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Feed = void 0;
|
|
30
30
|
const react_1 = __importStar(require("react"));
|
|
31
|
-
const uikit_1 = require("@gravity-ui/uikit");
|
|
32
31
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
33
|
-
const FeedContext_1 = require("../../contexts/FeedContext");
|
|
34
|
-
const RouterContext_1 = require("../../contexts/RouterContext");
|
|
35
|
-
const LocaleContext_1 = require("../../contexts/LocaleContext");
|
|
36
|
-
const constants_1 = require("../constants");
|
|
37
32
|
/**
|
|
38
33
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
39
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
40
34
|
*/
|
|
41
|
-
const
|
|
42
|
-
const common_1 = require("../../utils/common");
|
|
35
|
+
const uikit_1 = require("@gravity-ui/uikit");
|
|
43
36
|
const FeedHeader_1 = require("../../components/FeedHeader/FeedHeader");
|
|
44
|
-
const PostsError_1 = require("../../components/PostsError/PostsError");
|
|
45
37
|
const Posts_1 = require("../../components/Posts/Posts");
|
|
38
|
+
const PostsError_1 = require("../../components/PostsError/PostsError");
|
|
39
|
+
const constants_1 = require("../../constants");
|
|
40
|
+
const FeedContext_1 = require("../../contexts/FeedContext");
|
|
41
|
+
const LocaleContext_1 = require("../../contexts/LocaleContext");
|
|
42
|
+
const RouterContext_1 = require("../../contexts/RouterContext");
|
|
46
43
|
/**
|
|
47
44
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
48
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
49
45
|
*/
|
|
50
46
|
const metrika_js_1 = __importDefault(require("../../counters/metrika.js"));
|
|
51
47
|
const utils_1 = require("../../counters/utils");
|
|
52
|
-
const
|
|
48
|
+
const common_1 = require("../../models/common");
|
|
49
|
+
const common_2 = require("../../utils/common");
|
|
50
|
+
const constants_2 = require("../constants");
|
|
53
51
|
const reducer_1 = require("./reducer");
|
|
54
52
|
const CONTAINER_ID = 'blog-cards';
|
|
55
53
|
const PAGE_QUERY = 'page';
|
|
@@ -59,7 +57,7 @@ const Feed = ({ image }) => {
|
|
|
59
57
|
const { posts, totalCount, tags, services, pinnedPost, getPosts, pageCountForShowSupportButtons, } = (0, react_1.useContext)(FeedContext_1.FeedContext);
|
|
60
58
|
const router = (0, react_1.useContext)(RouterContext_1.RouterContext);
|
|
61
59
|
const { locale } = (0, react_1.useContext)(LocaleContext_1.LocaleContext);
|
|
62
|
-
const handleAnalytics = (0, page_constructor_1.useAnalytics)(
|
|
60
|
+
const handleAnalytics = (0, page_constructor_1.useAnalytics)(common_1.DefaultEventNames.ShowMore);
|
|
63
61
|
const [{ errorLoad, errorShowMore, isFetching, isShowMoreFetching, isShowMoreVisible, lastLoadedCount, postCountOnPage, postsOnPage, pinnedPostOnPage, currentPage, queryParams, }, dispatch,] = (0, react_1.useReducer)(reducer_1.reducer, {
|
|
64
62
|
errorLoad: false,
|
|
65
63
|
errorShowMore: false,
|
|
@@ -70,12 +68,12 @@ const Feed = ({ image }) => {
|
|
|
70
68
|
postCountOnPage: totalCount || 0,
|
|
71
69
|
postsOnPage: posts,
|
|
72
70
|
pinnedPostOnPage: pinnedPost,
|
|
73
|
-
currentPage: ((_a = router === null || router === void 0 ? void 0 : router.query) === null || _a === void 0 ? void 0 : _a.page) ? Number(router.query.page) :
|
|
71
|
+
currentPage: ((_a = router === null || router === void 0 ? void 0 : router.query) === null || _a === void 0 ? void 0 : _a.page) ? Number(router.query.page) : constants_2.DEFAULT_PAGE,
|
|
74
72
|
queryParams: router.query || {},
|
|
75
73
|
});
|
|
76
74
|
const perPageInQuery = (queryParams === null || queryParams === void 0 ? void 0 : queryParams.perPage)
|
|
77
75
|
? Number(queryParams.perPage)
|
|
78
|
-
:
|
|
76
|
+
: constants_2.DEFAULT_ROWS_PER_PAGE;
|
|
79
77
|
const pageChange = (value) => {
|
|
80
78
|
dispatch({ type: reducer_1.ActionTypes.PageChange, payload: value });
|
|
81
79
|
};
|
|
@@ -88,7 +86,7 @@ const Feed = ({ image }) => {
|
|
|
88
86
|
};
|
|
89
87
|
const fetchData = (0, react_1.useCallback)(async (pageNumber) => {
|
|
90
88
|
if (queryParams && getPosts) {
|
|
91
|
-
const query = (0,
|
|
89
|
+
const query = (0, common_2.getFeedQueryParams)(queryParams, pageNumber);
|
|
92
90
|
const data = await getPosts(query);
|
|
93
91
|
return data;
|
|
94
92
|
}
|
|
@@ -118,16 +116,15 @@ const Feed = ({ image }) => {
|
|
|
118
116
|
catch (err) {
|
|
119
117
|
dispatch({ type: reducer_1.ActionTypes.SetErrorLoad, payload: true });
|
|
120
118
|
}
|
|
121
|
-
(0,
|
|
119
|
+
(0, common_2.scrollOnPageChange)(CONTAINER_ID);
|
|
122
120
|
setIsFetching(false);
|
|
123
121
|
}, [fetchData]);
|
|
124
122
|
const handleShowMore = async () => {
|
|
125
123
|
dispatch({ type: reducer_1.ActionTypes.SetIsShowMoreFetching, payload: true });
|
|
126
124
|
/**
|
|
127
125
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
128
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
129
126
|
*/
|
|
130
|
-
metrika_js_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite,
|
|
127
|
+
metrika_js_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.showMore);
|
|
131
128
|
handleAnalytics();
|
|
132
129
|
try {
|
|
133
130
|
const fetchedData = await fetchData(currentPage + 1);
|
|
@@ -153,7 +150,7 @@ const Feed = ({ image }) => {
|
|
|
153
150
|
};
|
|
154
151
|
(0, react_1.useEffect)(() => {
|
|
155
152
|
if (isFetching) {
|
|
156
|
-
fetchAndReplaceData(Number(queryParams.page ||
|
|
153
|
+
fetchAndReplaceData(Number(queryParams.page || constants_2.DEFAULT_PAGE));
|
|
157
154
|
}
|
|
158
155
|
}, [fetchAndReplaceData, isFetching, queryParams.page]);
|
|
159
156
|
(0, react_1.useEffect)(() => {
|
|
@@ -194,6 +191,6 @@ const Feed = ({ image }) => {
|
|
|
194
191
|
url: image,
|
|
195
192
|
disableCompress: true,
|
|
196
193
|
} }),
|
|
197
|
-
errorLoad ? (react_1.default.createElement(PostsError_1.PostsError, { onButtonClick: () => fetchAndReplaceData(Number(queryParams.page ||
|
|
194
|
+
errorLoad ? (react_1.default.createElement(PostsError_1.PostsError, { onButtonClick: () => fetchAndReplaceData(Number(queryParams.page || constants_2.DEFAULT_PAGE)) })) : (react_1.default.createElement(Posts_1.Posts, { containerId: CONTAINER_ID, currentPage: currentPage, isShowMoreVisible: isShowMoreVisible, errorShowMore: errorShowMore, postCountOnPage: postCountOnPage, perPageInQuery: perPageInQuery, handleShowMore: handleShowMore, handlePageChange: handlePageChange, postsOnPage: postsOnPage, pinnedPostOnPage: pinnedPostOnPage, isFetching: isFetching, isShowMoreFetching: isShowMoreFetching, pageCountForShowSupportButtons: pageCountForShowSupportButtons }))));
|
|
198
195
|
};
|
|
199
196
|
exports.Feed = Feed;
|
|
@@ -26,16 +26,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.Header = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
29
|
-
const PostPageContext_1 = require("../../contexts/PostPageContext");
|
|
30
|
-
const LocaleContext_1 = require("../../contexts/LocaleContext");
|
|
31
29
|
const PostInfo_1 = require("../../components/PostInfo/PostInfo");
|
|
32
30
|
const Wrapper_1 = require("../../components/Wrapper/Wrapper");
|
|
31
|
+
const constants_1 = require("../../constants");
|
|
32
|
+
const LocaleContext_1 = require("../../contexts/LocaleContext");
|
|
33
|
+
const PostPageContext_1 = require("../../contexts/PostPageContext");
|
|
33
34
|
const paddings_1 = require("../../models/paddings");
|
|
34
35
|
const common_1 = require("../../utils/common");
|
|
35
|
-
const constants_1 = require("../../constants");
|
|
36
36
|
/**
|
|
37
37
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
38
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
39
38
|
*/
|
|
40
39
|
const metrikaGoals = {
|
|
41
40
|
sharing: constants_1.BlogMetrikaGoalIds.shareTop,
|
|
@@ -26,18 +26,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.Meta = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
29
|
-
const PostPageContext_1 = require("../../contexts/PostPageContext");
|
|
30
|
-
const LocaleContext_1 = require("../../contexts/LocaleContext");
|
|
31
|
-
const Wrapper_1 = require("../../components/Wrapper/Wrapper");
|
|
32
29
|
const PostInfo_1 = require("../../components/PostInfo/PostInfo");
|
|
33
|
-
const
|
|
34
|
-
const common_1 = require("../../utils/common");
|
|
30
|
+
const Wrapper_1 = require("../../components/Wrapper/Wrapper");
|
|
35
31
|
const constants_1 = require("../../constants");
|
|
32
|
+
const LocaleContext_1 = require("../../contexts/LocaleContext");
|
|
33
|
+
const PostPageContext_1 = require("../../contexts/PostPageContext");
|
|
34
|
+
const paddings_1 = require("../../models/paddings");
|
|
36
35
|
const cn_1 = require("../../utils/cn");
|
|
36
|
+
const common_1 = require("../../utils/common");
|
|
37
37
|
const b = (0, cn_1.block)('meta');
|
|
38
38
|
/**
|
|
39
39
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
40
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
41
40
|
*/
|
|
42
41
|
const metrikaGoals = {
|
|
43
42
|
sharing: constants_1.BlogMetrikaGoalIds.shareBottom,
|
|
@@ -26,15 +26,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.Suggest = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
29
|
-
const i18n_1 = require("../../i18n");
|
|
30
|
-
const Wrapper_1 = require("../../components/Wrapper/Wrapper");
|
|
31
29
|
const PostCard_1 = require("../../components/PostCard/PostCard");
|
|
32
|
-
const
|
|
33
|
-
const PostPageContext_1 = require("../../contexts/PostPageContext");
|
|
30
|
+
const Wrapper_1 = require("../../components/Wrapper/Wrapper");
|
|
34
31
|
const constants_1 = require("../../constants");
|
|
32
|
+
const PostPageContext_1 = require("../../contexts/PostPageContext");
|
|
33
|
+
const i18n_1 = require("../../i18n");
|
|
34
|
+
const paddings_1 = require("../../models/paddings");
|
|
35
35
|
/**
|
|
36
36
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
37
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
38
37
|
*/
|
|
39
38
|
const metrikaGoals = [
|
|
40
39
|
{
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.YFM = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
9
8
|
const bem_cn_lite_1 = __importDefault(require("bem-cn-lite"));
|
|
9
|
+
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
10
10
|
const Wrapper_1 = require("../../components/Wrapper/Wrapper");
|
|
11
11
|
const paddings_1 = require("../../models/paddings");
|
|
12
12
|
const b = (0, bem_cn_lite_1.default)('yfm');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ClassNameProps, HeaderBlockProps } from '../../models/common';
|
|
3
3
|
import { ControlsProps } from './components/Controls/Controls';
|
|
4
4
|
type HeaderProps = Pick<HeaderBlockProps, 'background' | 'offset' | 'theme' | 'verticalOffset'>;
|
|
5
5
|
type FeedHeaderProps = HeaderProps & ControlsProps;
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.FeedHeader = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
9
|
-
const Controls_1 = require("./components/Controls/Controls");
|
|
10
9
|
const cn_1 = require("../../utils/cn");
|
|
10
|
+
const Controls_1 = require("./components/Controls/Controls");
|
|
11
11
|
const b = (0, cn_1.block)('feed-header');
|
|
12
12
|
const FeedHeader = ({ tags, services, setIsFetching, offset = 'default', background, theme = 'default', verticalOffset = 'l', className, handleChangeQuery, queryParams, }) => {
|
|
13
13
|
const backgroundThemed = background && (0, page_constructor_1.getThemedValue)(background, theme);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { HandleChangeQueryParams,
|
|
2
|
+
import { HandleChangeQueryParams, Query, SetQueryType } from '../../../../models/common';
|
|
3
3
|
export type SelectItem = {
|
|
4
4
|
content: string;
|
|
5
5
|
value: string;
|
|
@@ -30,20 +30,19 @@ exports.Controls = void 0;
|
|
|
30
30
|
const react_1 = __importStar(require("react"));
|
|
31
31
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
32
32
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
33
|
-
const Search_1 = require("../../../Search/Search");
|
|
34
|
-
const customRenders_1 = require("./customRenders");
|
|
35
|
-
const LikesContext_1 = require("../../../../contexts/LikesContext");
|
|
36
33
|
/**
|
|
37
34
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
38
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
39
35
|
*/
|
|
40
36
|
const constants_1 = require("../../../../constants");
|
|
37
|
+
const LikesContext_1 = require("../../../../contexts/LikesContext");
|
|
41
38
|
const metrika_js_1 = __importDefault(require("../../../../counters/metrika.js"));
|
|
42
39
|
const utils_1 = require("../../../../counters/utils");
|
|
43
|
-
const Save_1 = require("../../../../icons/Save");
|
|
44
40
|
const i18n_1 = require("../../../../i18n");
|
|
45
|
-
const
|
|
41
|
+
const Save_1 = require("../../../../icons/Save");
|
|
46
42
|
const common_1 = require("../../../../models/common");
|
|
43
|
+
const cn_1 = require("../../../../utils/cn");
|
|
44
|
+
const Search_1 = require("../../../Search/Search");
|
|
45
|
+
const customRenders_1 = require("./customRenders");
|
|
47
46
|
const b = (0, cn_1.block)('feed-controls');
|
|
48
47
|
const ICON_SIZE = 16;
|
|
49
48
|
const DEFAULT_PAGE = 1;
|
|
@@ -70,7 +69,6 @@ const Controls = ({ setIsFetching, tags = [], services = [], handleChangeQuery,
|
|
|
70
69
|
const handleTagSelect = (selectedTags) => {
|
|
71
70
|
/**
|
|
72
71
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
73
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
74
72
|
*/
|
|
75
73
|
metrika_js_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.tag, {
|
|
76
74
|
theme: selectedTags[0],
|
|
@@ -92,7 +90,6 @@ const Controls = ({ setIsFetching, tags = [], services = [], handleChangeQuery,
|
|
|
92
90
|
const metrikaAsString = forMetrikaServices.map((service) => service.content).join(',');
|
|
93
91
|
/**
|
|
94
92
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
95
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
96
93
|
*/
|
|
97
94
|
metrika_js_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.service, {
|
|
98
95
|
service: metrikaAsString,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SelectOption, SelectProps } from '@gravity-ui/uikit';
|
|
2
2
|
import { CustomSwitcherProps } from '../CustomSwitcher/CustomSwitcher';
|
|
3
3
|
type RenderSwitcherType = ({ initial, list, defaultLabel, }: {
|
|
4
4
|
initial: CustomSwitcherProps['initial'];
|
|
@@ -8,8 +8,8 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
9
9
|
const i18n_1 = require("../../../../i18n");
|
|
10
10
|
const cn_1 = require("../../../../utils/cn");
|
|
11
|
-
const CustomSwitcher_1 = require("../CustomSwitcher/CustomSwitcher");
|
|
12
11
|
const CustomSelectOption_1 = require("../CustomSelectOption/CustomSelectOption");
|
|
12
|
+
const CustomSwitcher_1 = require("../CustomSwitcher/CustomSwitcher");
|
|
13
13
|
const b = (0, cn_1.block)('feed-controls');
|
|
14
14
|
const renderSwitcher = ({ initial, list, defaultLabel }) =>
|
|
15
15
|
// eslint-disable-next-line react/display-name
|
|
@@ -43,16 +43,15 @@ const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
|
43
43
|
const constants_1 = require("../../constants");
|
|
44
44
|
/**
|
|
45
45
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
46
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
47
46
|
*/
|
|
48
47
|
const metrika_js_1 = __importDefault(require("../../counters/metrika.js"));
|
|
49
48
|
const utils_1 = require("../../counters/utils");
|
|
50
|
-
const
|
|
51
|
-
const types_1 = require("./types");
|
|
49
|
+
const common_1 = require("../../models/common");
|
|
52
50
|
const cn_1 = require("../../utils/cn");
|
|
53
51
|
const NavigationButton_1 = require("./components/NavigationButton");
|
|
54
52
|
const PaginatorItem_1 = require("./components/PaginatorItem");
|
|
55
|
-
const
|
|
53
|
+
const types_1 = require("./types");
|
|
54
|
+
const utils_2 = require("./utils");
|
|
56
55
|
const b = (0, cn_1.block)('paginator');
|
|
57
56
|
const DEFAULT_PAGE_COUNT_FOR_SHOW_SUPPORT_BUTTONS = 6;
|
|
58
57
|
const Paginator = ({ itemsPerPage, totalItems, maxPages, page, className, loading, onPageChange, pageCountForShowSupportButtons = DEFAULT_PAGE_COUNT_FOR_SHOW_SUPPORT_BUTTONS, }) => {
|
|
@@ -74,7 +73,6 @@ const Paginator = ({ itemsPerPage, totalItems, maxPages, page, className, loadin
|
|
|
74
73
|
if (type === 'prev' && page > 1) {
|
|
75
74
|
/**
|
|
76
75
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
77
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
78
76
|
*/
|
|
79
77
|
metrika_js_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.home);
|
|
80
78
|
handleAnalyticsHome();
|
|
@@ -83,7 +81,6 @@ const Paginator = ({ itemsPerPage, totalItems, maxPages, page, className, loadin
|
|
|
83
81
|
else if (type === 'next' && page < pagesCount) {
|
|
84
82
|
/**
|
|
85
83
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
86
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
87
84
|
*/
|
|
88
85
|
handleAnalyticsNext();
|
|
89
86
|
metrika_js_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.next);
|
|
@@ -97,7 +94,6 @@ const Paginator = ({ itemsPerPage, totalItems, maxPages, page, className, loadin
|
|
|
97
94
|
if (index !== page && typeof index === 'number') {
|
|
98
95
|
/**
|
|
99
96
|
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
100
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
101
97
|
*/
|
|
102
98
|
metrika_js_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.page, { page: index });
|
|
103
99
|
handleAnalyticsPage(null, { page: String(index) });
|
|
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.NavigationButton = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const types_1 = require("../types");
|
|
9
8
|
const i18n_1 = require("../../../i18n");
|
|
10
9
|
const cn_1 = require("../../../utils/cn");
|
|
10
|
+
const types_1 = require("../types");
|
|
11
11
|
const b = (0, cn_1.block)('paginator');
|
|
12
12
|
const NavigationButton = ({ arrowType, disabled }) => disabled ? null : (react_1.default.createElement("div", { className: b('icon') }, arrowType === types_1.ArrowType.Prev ? (0, i18n_1.i18)(i18n_1.Keyset.ButtonBegin) : (0, i18n_1.i18)(i18n_1.Keyset.ButtonFarther)));
|
|
13
13
|
exports.NavigationButton = NavigationButton;
|
|
@@ -27,8 +27,8 @@ exports.PaginatorItem = void 0;
|
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
29
29
|
const LocaleContext_1 = require("../../../contexts/LocaleContext");
|
|
30
|
-
const common_1 = require("../../../utils/common");
|
|
31
30
|
const cn_1 = require("../../../utils/cn");
|
|
31
|
+
const common_1 = require("../../../utils/common");
|
|
32
32
|
const b = (0, cn_1.block)('paginator');
|
|
33
33
|
const PaginatorItem = ({ dataKey, mods, content, onClick, loading = false, }) => {
|
|
34
34
|
const { locale } = (0, react_1.useContext)(LocaleContext_1.LocaleContext);
|
|
@@ -27,8 +27,8 @@ exports.PostCard = void 0;
|
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
29
29
|
const LikesContext_1 = require("../../contexts/LikesContext");
|
|
30
|
-
const SuggestPostInfo_1 = require("../PostInfo/SuggestPostInfo");
|
|
31
30
|
const cn_1 = require("../../utils/cn");
|
|
31
|
+
const SuggestPostInfo_1 = require("../PostInfo/SuggestPostInfo");
|
|
32
32
|
const b = (0, cn_1.block)('post-card');
|
|
33
33
|
const PostCard = ({ post, metrikaGoals, fullWidth = false, size = 's', showTag = false, }) => {
|
|
34
34
|
var _a;
|
|
@@ -26,11 +26,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.PostInfo = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const PostPageContext_1 = require("../../contexts/PostPageContext");
|
|
29
|
+
const cn_1 = require("../../utils/cn");
|
|
29
30
|
const Date_1 = require("./components/Date");
|
|
30
31
|
const ReadingTime_1 = require("./components/ReadingTime");
|
|
31
|
-
const Sharing_1 = require("./components/Sharing");
|
|
32
32
|
const Save_1 = require("./components/Save");
|
|
33
|
-
const
|
|
33
|
+
const Sharing_1 = require("./components/Sharing");
|
|
34
34
|
const b = (0, cn_1.block)('post-info');
|
|
35
35
|
/**
|
|
36
36
|
* Blog post info panel component
|
|
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.SuggestPostInfo = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const useLikes_1 = require("../../hooks/useLikes");
|
|
9
|
+
const cn_1 = require("../../utils/cn");
|
|
9
10
|
const Date_1 = require("./components/Date");
|
|
10
11
|
const ReadingTime_1 = require("./components/ReadingTime");
|
|
11
12
|
const Save_1 = require("./components/Save");
|
|
12
|
-
const cn_1 = require("../../utils/cn");
|
|
13
13
|
const b = (0, cn_1.block)('post-info');
|
|
14
14
|
/**
|
|
15
15
|
* Suggest blog card info component
|
|
@@ -26,8 +26,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.Date = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const LocaleContext_1 = require("../../../contexts/LocaleContext");
|
|
29
|
-
const date_1 = require("../../../utils/date");
|
|
30
29
|
const cn_1 = require("../../../utils/cn");
|
|
30
|
+
const date_1 = require("../../../utils/date");
|
|
31
31
|
const b = (0, cn_1.block)('post-info');
|
|
32
32
|
const Date = ({ date, size = 's' }) => {
|
|
33
33
|
const { locale } = (0, react_1.useContext)(LocaleContext_1.LocaleContext);
|
|
@@ -27,13 +27,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Save = void 0;
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
30
31
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
31
32
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
32
|
-
const react_1 = __importStar(require("react"));
|
|
33
33
|
const UserContext_1 = require("../../../contexts/UserContext");
|
|
34
34
|
const metrika_js_1 = __importDefault(require("../../../counters/metrika.js"));
|
|
35
35
|
const utils_1 = require("../../../counters/utils");
|
|
36
|
-
// @ts-ignore
|
|
37
36
|
const Save_1 = require("../../../icons/Save");
|
|
38
37
|
const SaveFilled_1 = require("../../../icons/SaveFilled");
|
|
39
38
|
const common_1 = require("../../../models/common");
|
|
@@ -27,9 +27,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Sharing = void 0;
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
30
31
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
31
32
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
32
|
-
const react_1 = __importStar(require("react"));
|
|
33
33
|
const MobileContext_1 = require("../../../contexts/MobileContext");
|
|
34
34
|
const PostPageContext_1 = require("../../../contexts/PostPageContext");
|
|
35
35
|
const RouterContext_1 = require("../../../contexts/RouterContext");
|
|
@@ -40,7 +40,6 @@ const ShareArrowUp_1 = require("../../../icons/ShareArrowUp");
|
|
|
40
40
|
const common_1 = require("../../../models/common");
|
|
41
41
|
const cn_1 = require("../../../utils/cn");
|
|
42
42
|
const common_2 = require("../../../utils/common");
|
|
43
|
-
// @ts-ignore
|
|
44
43
|
const b = (0, cn_1.block)('post-info');
|
|
45
44
|
const Sharing = ({ theme, metrikaGoal }) => {
|
|
46
45
|
const router = (0, react_1.useContext)(RouterContext_1.RouterContext);
|
|
@@ -8,10 +8,10 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
9
9
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
10
10
|
const i18n_1 = require("../../i18n");
|
|
11
|
+
const cn_1 = require("../../utils/cn");
|
|
11
12
|
const Paginator_1 = require("../Paginator/Paginator");
|
|
12
13
|
const PostCard_1 = require("../PostCard/PostCard");
|
|
13
14
|
const PostsEmpty_1 = require("../PostsEmpty/PostsEmpty");
|
|
14
|
-
const cn_1 = require("../../utils/cn");
|
|
15
15
|
const b = (0, cn_1.block)('posts');
|
|
16
16
|
const Posts = ({ containerId, pinnedPostOnPage, currentPage, postsOnPage, isShowMoreVisible, errorShowMore, postCountOnPage, perPageInQuery, isFetching, isShowMoreFetching, handleShowMore, handlePageChange, pageCountForShowSupportButtons, }) => (react_1.default.createElement("div", { className: b() },
|
|
17
17
|
react_1.default.createElement("div", { id: containerId, className: b('cards-container') },
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.PostsEmpty = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const cn_1 = require("../../utils/cn");
|
|
9
8
|
const i18n_1 = require("../../i18n");
|
|
9
|
+
const cn_1 = require("../../utils/cn");
|
|
10
10
|
const b = (0, cn_1.block)('posts-empty');
|
|
11
11
|
const PostsEmpty = () => (react_1.default.createElement("div", { className: b('container') },
|
|
12
12
|
react_1.default.createElement("div", { className: b('title') }, (0, i18n_1.i18)(i18n_1.Keyset.TitleEmptyContainer)),
|