@gravity-ui/blog-constructor 2.1.2-alpha.2 → 2.2.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 +14 -0
- package/build/cjs/blocks/Author/Author.js +3 -3
- package/build/cjs/blocks/Banner/Banner.js +4 -7
- package/build/cjs/blocks/CTA/CTA.js +3 -6
- package/build/cjs/blocks/ColoredText/ColoredText.js +1 -1
- package/build/cjs/blocks/Feed/Feed.js +12 -28
- package/build/cjs/blocks/Feed/reducer.d.ts +1 -1
- package/build/cjs/blocks/Header/Header.js +3 -7
- package/build/cjs/blocks/Meta/Meta.js +5 -9
- package/build/cjs/blocks/Suggest/Suggest.js +4 -8
- 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 +4 -28
- 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 +2 -26
- 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 -4
- package/build/cjs/components/PostCard/PostCard.js +1 -1
- package/build/cjs/components/PostInfo/PostInfo.d.ts +0 -4
- 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 -4
- package/build/cjs/components/PostInfo/components/Save.js +4 -8
- package/build/cjs/components/PostInfo/components/Sharing.d.ts +0 -4
- package/build/cjs/components/PostInfo/components/Sharing.js +5 -12
- 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 -3
- package/build/cjs/constructor/BlogConstructorProvider.js +4 -6
- 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.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 -4
- package/build/cjs/counters/metrika.js +0 -4
- package/build/cjs/models/blocks.d.ts +1 -1
- package/build/cjs/models/common.d.ts +2 -12
- package/build/cjs/models/common.js +2 -14
- 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 -7
- package/build/esm/blocks/CTA/CTA.js +3 -6
- package/build/esm/blocks/ColoredText/ColoredText.js +1 -1
- package/build/esm/blocks/Feed/Feed.js +8 -24
- package/build/esm/blocks/Feed/reducer.d.ts +1 -1
- package/build/esm/blocks/Header/Header.js +3 -7
- package/build/esm/blocks/Meta/Meta.js +5 -9
- package/build/esm/blocks/Suggest/Suggest.js +4 -8
- 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 +6 -30
- 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 +3 -27
- 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 -4
- package/build/esm/components/PostCard/PostCard.js +3 -3
- package/build/esm/components/PostInfo/PostInfo.d.ts +0 -4
- 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 -4
- package/build/esm/components/PostInfo/components/Save.js +2 -6
- package/build/esm/components/PostInfo/components/Sharing.d.ts +0 -4
- package/build/esm/components/PostInfo/components/Sharing.js +4 -11
- 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 -3
- package/build/esm/constructor/BlogConstructorProvider.js +4 -6
- 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.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 -4
- package/build/esm/counters/metrika.js +0 -4
- 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 -12
- package/build/esm/models/common.js +1 -13
- package/build/esm/utils/common.d.ts +1 -1
- package/build/esm/utils/common.js +3 -3
- package/package.json +5 -7
- 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 -12
- package/server/models/common.js +2 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.2.0](https://github.com/gravity-ui/blog-constructor/compare/v2.1.0...v2.2.0) (2023-04-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* update linters ([#24](https://github.com/gravity-ui/blog-constructor/issues/24)) ([bc5aa0f](https://github.com/gravity-ui/blog-constructor/commit/bc5aa0f72e64b916acaf692874482ccdae3f94e9))
|
|
9
|
+
|
|
10
|
+
## [2.1.0](https://github.com/gravity-ui/blog-constructor/compare/v2.0.2...v2.1.0) (2023-04-06)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* 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))
|
|
16
|
+
|
|
3
17
|
## [2.0.2](https://github.com/gravity-ui/blog-constructor/compare/v2.0.1...v2.0.2) (2023-04-05)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -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;
|
|
@@ -31,15 +31,12 @@ const Banner = (_a) => {
|
|
|
31
31
|
contentStyle.backgroundColor = color;
|
|
32
32
|
}
|
|
33
33
|
const contentData = (0, common_1.updateContentSizes)(content);
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
36
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
37
|
-
*/
|
|
38
34
|
const metrikaGoal = {
|
|
39
35
|
name: constants_1.BlogMetrikaGoalIds.bannerCommon,
|
|
40
36
|
isCrossSite: true,
|
|
41
37
|
};
|
|
42
38
|
(_b = contentData.buttons) === null || _b === void 0 ? void 0 : _b.forEach((button) => {
|
|
39
|
+
// eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
|
|
43
40
|
button.metrikaGoals = (0, common_1.getBlogElementMetrika)(metrikaGoal, button.metrikaGoals);
|
|
44
41
|
});
|
|
45
42
|
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 }) => {
|
|
@@ -21,10 +21,6 @@ const CTA = ({ items, paddingTop, paddingBottom }) => {
|
|
|
21
21
|
else if (count > MAX_COLUMN_COUNT) {
|
|
22
22
|
count = MAX_COLUMN_COUNT;
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
26
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
27
|
-
*/
|
|
28
24
|
const metrikaGoal = {
|
|
29
25
|
name: constants_1.BlogMetrikaGoalIds.cta,
|
|
30
26
|
isCrossSite: true,
|
|
@@ -36,6 +32,7 @@ const CTA = ({ items, paddingTop, paddingBottom }) => {
|
|
|
36
32
|
var _a;
|
|
37
33
|
const contentData = (0, common_1.updateContentSizes)(content);
|
|
38
34
|
(_a = contentData.links) === null || _a === void 0 ? void 0 : _a.forEach((link) => {
|
|
35
|
+
// eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
|
|
39
36
|
link.metrikaGoals = (0, common_1.getBlogElementMetrika)(metrikaGoal, link.metrikaGoals);
|
|
40
37
|
});
|
|
41
38
|
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"]);
|
|
@@ -29,27 +29,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.Feed = void 0;
|
|
30
30
|
const react_1 = __importStar(require("react"));
|
|
31
31
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
32
|
-
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
|
-
/**
|
|
38
|
-
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
39
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
40
|
-
*/
|
|
41
|
-
const constants_2 = require("../../constants");
|
|
42
|
-
const common_1 = require("../../utils/common");
|
|
43
32
|
const FeedHeader_1 = require("../../components/FeedHeader/FeedHeader");
|
|
44
|
-
const PostsError_1 = require("../../components/PostsError/PostsError");
|
|
45
33
|
const Posts_1 = require("../../components/Posts/Posts");
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
const PostsError_1 = require("../../components/PostsError/PostsError");
|
|
35
|
+
const constants_1 = require("../../constants");
|
|
36
|
+
const FeedContext_1 = require("../../contexts/FeedContext");
|
|
37
|
+
const LocaleContext_1 = require("../../contexts/LocaleContext");
|
|
38
|
+
const RouterContext_1 = require("../../contexts/RouterContext");
|
|
50
39
|
const metrika_js_1 = __importDefault(require("../../counters/metrika.js"));
|
|
51
40
|
const utils_1 = require("../../counters/utils");
|
|
52
|
-
const
|
|
41
|
+
const common_1 = require("../../utils/common");
|
|
42
|
+
const constants_2 = require("../constants");
|
|
53
43
|
const reducer_1 = require("./reducer");
|
|
54
44
|
const CONTAINER_ID = 'blog-cards';
|
|
55
45
|
const PAGE_QUERY = 'page';
|
|
@@ -59,7 +49,6 @@ const Feed = ({ image }) => {
|
|
|
59
49
|
const { posts, totalCount, tags, services, pinnedPost, getPosts, pageCountForShowSupportButtons, } = (0, react_1.useContext)(FeedContext_1.FeedContext);
|
|
60
50
|
const router = (0, react_1.useContext)(RouterContext_1.RouterContext);
|
|
61
51
|
const { locale } = (0, react_1.useContext)(LocaleContext_1.LocaleContext);
|
|
62
|
-
const handleAnalytics = (0, page_constructor_1.useAnalytics)(common_2.DefaultEventNames.ShowMore);
|
|
63
52
|
const [{ errorLoad, errorShowMore, isFetching, isShowMoreFetching, isShowMoreVisible, lastLoadedCount, postCountOnPage, postsOnPage, pinnedPostOnPage, currentPage, queryParams, }, dispatch,] = (0, react_1.useReducer)(reducer_1.reducer, {
|
|
64
53
|
errorLoad: false,
|
|
65
54
|
errorShowMore: false,
|
|
@@ -70,12 +59,12 @@ const Feed = ({ image }) => {
|
|
|
70
59
|
postCountOnPage: totalCount || 0,
|
|
71
60
|
postsOnPage: posts,
|
|
72
61
|
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) :
|
|
62
|
+
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
63
|
queryParams: router.query || {},
|
|
75
64
|
});
|
|
76
65
|
const perPageInQuery = (queryParams === null || queryParams === void 0 ? void 0 : queryParams.perPage)
|
|
77
66
|
? Number(queryParams.perPage)
|
|
78
|
-
:
|
|
67
|
+
: constants_2.DEFAULT_ROWS_PER_PAGE;
|
|
79
68
|
const pageChange = (value) => {
|
|
80
69
|
dispatch({ type: reducer_1.ActionTypes.PageChange, payload: value });
|
|
81
70
|
};
|
|
@@ -123,12 +112,7 @@ const Feed = ({ image }) => {
|
|
|
123
112
|
}, [fetchData]);
|
|
124
113
|
const handleShowMore = async () => {
|
|
125
114
|
dispatch({ type: reducer_1.ActionTypes.SetIsShowMoreFetching, payload: true });
|
|
126
|
-
|
|
127
|
-
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
128
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
129
|
-
*/
|
|
130
|
-
metrika_js_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_2.BlogMetrikaGoalIds.showMore);
|
|
131
|
-
handleAnalytics();
|
|
115
|
+
metrika_js_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.showMore);
|
|
132
116
|
try {
|
|
133
117
|
const fetchedData = await fetchData(currentPage + 1);
|
|
134
118
|
handleChangeQueryParams({
|
|
@@ -153,7 +137,7 @@ const Feed = ({ image }) => {
|
|
|
153
137
|
};
|
|
154
138
|
(0, react_1.useEffect)(() => {
|
|
155
139
|
if (isFetching) {
|
|
156
|
-
fetchAndReplaceData(Number(queryParams.page ||
|
|
140
|
+
fetchAndReplaceData(Number(queryParams.page || constants_2.DEFAULT_PAGE));
|
|
157
141
|
}
|
|
158
142
|
}, [fetchAndReplaceData, isFetching, queryParams.page]);
|
|
159
143
|
(0, react_1.useEffect)(() => {
|
|
@@ -194,6 +178,6 @@ const Feed = ({ image }) => {
|
|
|
194
178
|
url: image,
|
|
195
179
|
disableCompress: true,
|
|
196
180
|
} }),
|
|
197
|
-
errorLoad ? (react_1.default.createElement(PostsError_1.PostsError, { onButtonClick: () => fetchAndReplaceData(Number(queryParams.page ||
|
|
181
|
+
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
182
|
};
|
|
199
183
|
exports.Feed = Feed;
|
|
@@ -26,17 +26,13 @@ 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
|
-
/**
|
|
37
|
-
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
38
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
39
|
-
*/
|
|
40
36
|
const metrikaGoals = {
|
|
41
37
|
sharing: constants_1.BlogMetrikaGoalIds.shareTop,
|
|
42
38
|
save: constants_1.BlogMetrikaGoalIds.saveTop,
|
|
@@ -26,19 +26,15 @@ 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
|
-
/**
|
|
39
|
-
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
40
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
41
|
-
*/
|
|
42
38
|
const metrikaGoals = {
|
|
43
39
|
sharing: constants_1.BlogMetrikaGoalIds.shareBottom,
|
|
44
40
|
save: constants_1.BlogMetrikaGoalIds.saveBottom,
|
|
@@ -26,16 +26,12 @@ 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");
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
*/
|
|
32
|
+
const PostPageContext_1 = require("../../contexts/PostPageContext");
|
|
33
|
+
const i18n_1 = require("../../i18n");
|
|
34
|
+
const paddings_1 = require("../../models/paddings");
|
|
39
35
|
const metrikaGoals = [
|
|
40
36
|
{
|
|
41
37
|
name: constants_1.BlogMetrikaGoalIds.suggest,
|
|
@@ -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;
|
|
@@ -28,37 +28,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Controls = void 0;
|
|
30
30
|
const react_1 = __importStar(require("react"));
|
|
31
|
-
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
32
31
|
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
|
-
/**
|
|
37
|
-
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
38
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
39
|
-
*/
|
|
40
32
|
const constants_1 = require("../../../../constants");
|
|
33
|
+
const LikesContext_1 = require("../../../../contexts/LikesContext");
|
|
41
34
|
const metrika_js_1 = __importDefault(require("../../../../counters/metrika.js"));
|
|
42
35
|
const utils_1 = require("../../../../counters/utils");
|
|
43
|
-
const Save_1 = require("../../../../icons/Save");
|
|
44
36
|
const i18n_1 = require("../../../../i18n");
|
|
37
|
+
const Save_1 = require("../../../../icons/Save");
|
|
45
38
|
const cn_1 = require("../../../../utils/cn");
|
|
46
|
-
const
|
|
39
|
+
const Search_1 = require("../../../Search/Search");
|
|
40
|
+
const customRenders_1 = require("./customRenders");
|
|
47
41
|
const b = (0, cn_1.block)('feed-controls');
|
|
48
42
|
const ICON_SIZE = 16;
|
|
49
43
|
const DEFAULT_PAGE = 1;
|
|
50
44
|
const VIRTUALIZATION_THRESHOLD = 1000;
|
|
51
45
|
const Controls = ({ setIsFetching, tags = [], services = [], handleChangeQuery, queryParams, }) => {
|
|
52
46
|
const { hasLikes } = (0, react_1.useContext)(LikesContext_1.LikesContext);
|
|
53
|
-
const handleAnalyticsTag = (0, page_constructor_1.useAnalytics)(common_1.DefaultEventNames.Tag);
|
|
54
|
-
const handleAnalyticsService = (0, page_constructor_1.useAnalytics)(common_1.DefaultEventNames.Service);
|
|
55
|
-
const handleAnalyticsSaveOnly = (0, page_constructor_1.useAnalytics)(common_1.DefaultEventNames.SaveOnly);
|
|
56
47
|
const { savedOnly: savedOnlyInitial, search: searchInitial, tags: tagInitial, services: servicesInitial, } = queryParams || {};
|
|
57
48
|
const [savedOnly, setSavedOnly] = (0, react_1.useState)(savedOnlyInitial === 'true');
|
|
58
49
|
const [search, setSearch] = (0, react_1.useState)(searchInitial);
|
|
59
50
|
const handleSavedOnly = () => {
|
|
60
51
|
handleChangeQuery({ savedOnly: savedOnly ? '' : 'true' });
|
|
61
|
-
handleAnalyticsSaveOnly();
|
|
62
52
|
setSavedOnly(!savedOnly);
|
|
63
53
|
setIsFetching(true);
|
|
64
54
|
};
|
|
@@ -68,16 +58,9 @@ const Controls = ({ setIsFetching, tags = [], services = [], handleChangeQuery,
|
|
|
68
58
|
setIsFetching(true);
|
|
69
59
|
};
|
|
70
60
|
const handleTagSelect = (selectedTags) => {
|
|
71
|
-
/**
|
|
72
|
-
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
73
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
74
|
-
*/
|
|
75
61
|
metrika_js_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.tag, {
|
|
76
62
|
theme: selectedTags[0],
|
|
77
63
|
});
|
|
78
|
-
handleAnalyticsTag(null, {
|
|
79
|
-
theme: selectedTags[0],
|
|
80
|
-
});
|
|
81
64
|
const isEmptyTag = selectedTags.some((tag) => tag === 'empty');
|
|
82
65
|
handleChangeQuery({
|
|
83
66
|
tags: isEmptyTag ? '' : selectedTags[0],
|
|
@@ -90,16 +73,9 @@ const Controls = ({ setIsFetching, tags = [], services = [], handleChangeQuery,
|
|
|
90
73
|
return selectedServices.includes(service.value);
|
|
91
74
|
});
|
|
92
75
|
const metrikaAsString = forMetrikaServices.map((service) => service.content).join(',');
|
|
93
|
-
/**
|
|
94
|
-
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
95
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
96
|
-
*/
|
|
97
76
|
metrika_js_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.service, {
|
|
98
77
|
service: metrikaAsString,
|
|
99
78
|
});
|
|
100
|
-
handleAnalyticsService(null, {
|
|
101
|
-
service: metrikaAsString,
|
|
102
|
-
});
|
|
103
79
|
const servicesAsString = selectedServices.join(',');
|
|
104
80
|
handleChangeQuery({ services: servicesAsString, page: DEFAULT_PAGE });
|
|
105
81
|
setIsFetching(true);
|
|
@@ -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
|
|
@@ -39,20 +39,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
exports.Paginator = void 0;
|
|
41
41
|
const react_1 = __importStar(require("react"));
|
|
42
|
-
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
|
43
42
|
const constants_1 = require("../../constants");
|
|
44
|
-
/**
|
|
45
|
-
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
46
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
47
|
-
*/
|
|
48
43
|
const metrika_js_1 = __importDefault(require("../../counters/metrika.js"));
|
|
49
44
|
const utils_1 = require("../../counters/utils");
|
|
50
|
-
const utils_2 = require("./utils");
|
|
51
|
-
const types_1 = require("./types");
|
|
52
45
|
const cn_1 = require("../../utils/cn");
|
|
53
46
|
const NavigationButton_1 = require("./components/NavigationButton");
|
|
54
47
|
const PaginatorItem_1 = require("./components/PaginatorItem");
|
|
55
|
-
const
|
|
48
|
+
const types_1 = require("./types");
|
|
49
|
+
const utils_2 = require("./utils");
|
|
56
50
|
const b = (0, cn_1.block)('paginator');
|
|
57
51
|
const DEFAULT_PAGE_COUNT_FOR_SHOW_SUPPORT_BUTTONS = 6;
|
|
58
52
|
const Paginator = ({ itemsPerPage, totalItems, maxPages, page, className, loading, onPageChange, pageCountForShowSupportButtons = DEFAULT_PAGE_COUNT_FOR_SHOW_SUPPORT_BUTTONS, }) => {
|
|
@@ -63,29 +57,16 @@ const Paginator = ({ itemsPerPage, totalItems, maxPages, page, className, loadin
|
|
|
63
57
|
}, [itemsPerPage, totalItems, maxPages]);
|
|
64
58
|
const handlePageChange = (pageIndex) => onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(pageIndex);
|
|
65
59
|
const isShowSupportButtons = (0, react_1.useMemo)(() => pagesCount > pageCountForShowSupportButtons, [pageCountForShowSupportButtons, pagesCount]);
|
|
66
|
-
const handleAnalyticsHome = (0, page_constructor_1.useAnalytics)(common_1.DefaultEventNames.PaginatorHome);
|
|
67
|
-
const handleAnalyticsNext = (0, page_constructor_1.useAnalytics)(common_1.DefaultEventNames.PaginatorNext);
|
|
68
|
-
const handleAnalyticsPage = (0, page_constructor_1.useAnalytics)(common_1.DefaultEventNames.PaginatorPage);
|
|
69
60
|
if (pagesCount <= 1) {
|
|
70
61
|
return null;
|
|
71
62
|
}
|
|
72
63
|
const handleArrowClick = (type) => {
|
|
73
64
|
let newPage = page;
|
|
74
65
|
if (type === 'prev' && page > 1) {
|
|
75
|
-
/**
|
|
76
|
-
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
77
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
78
|
-
*/
|
|
79
66
|
metrika_js_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.home);
|
|
80
|
-
handleAnalyticsHome();
|
|
81
67
|
newPage = 1;
|
|
82
68
|
}
|
|
83
69
|
else if (type === 'next' && page < pagesCount) {
|
|
84
|
-
/**
|
|
85
|
-
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
86
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
87
|
-
*/
|
|
88
|
-
handleAnalyticsNext();
|
|
89
70
|
metrika_js_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.next);
|
|
90
71
|
newPage = page + 1;
|
|
91
72
|
}
|
|
@@ -95,12 +76,7 @@ const Paginator = ({ itemsPerPage, totalItems, maxPages, page, className, loadin
|
|
|
95
76
|
};
|
|
96
77
|
const handlePageClick = (index) => {
|
|
97
78
|
if (index !== page && typeof index === 'number') {
|
|
98
|
-
/**
|
|
99
|
-
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
100
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
101
|
-
*/
|
|
102
79
|
metrika_js_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, constants_1.BlogMetrikaGoalIds.page, { page: index });
|
|
103
|
-
handleAnalyticsPage(null, { page: String(index) });
|
|
104
80
|
handlePageChange(index);
|
|
105
81
|
}
|
|
106
82
|
};
|
|
@@ -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);
|
|
@@ -6,10 +6,6 @@ type PostCardProps = {
|
|
|
6
6
|
fullWidth?: boolean;
|
|
7
7
|
showTag?: boolean;
|
|
8
8
|
size?: 's' | 'm';
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
11
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
12
|
-
*/
|
|
13
9
|
metrikaGoals?: MetrikaGoal;
|
|
14
10
|
};
|
|
15
11
|
export declare const PostCard: React.FC<PostCardProps>;
|
|
@@ -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;
|
|
@@ -9,10 +9,6 @@ type PostInfoProps = {
|
|
|
9
9
|
readingTime: PostData['readingTime'];
|
|
10
10
|
date: PostData['date'];
|
|
11
11
|
theme?: 'light' | 'dark';
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
14
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
15
|
-
*/
|
|
16
12
|
metrikaGoals?: BlogMetrikaGoals;
|
|
17
13
|
dataQa?: string;
|
|
18
14
|
};
|
|
@@ -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);
|
|
@@ -5,10 +5,6 @@ type SaveProps = {
|
|
|
5
5
|
hasUserLike: boolean;
|
|
6
6
|
handleUserLike: () => void;
|
|
7
7
|
theme?: 'light' | 'dark';
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated Metrika will be deleted after launch of analyticsEvents
|
|
10
|
-
* https://st.yandex-team.ru/PAGECTR-7
|
|
11
|
-
*/
|
|
12
8
|
metrikaGoal?: string;
|
|
13
9
|
dataQa?: string;
|
|
14
10
|
size?: 's' | 'm';
|