@gravity-ui/blog-constructor 4.2.0 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/build/cjs/components/FeedHeader/components/Controls/customRenders.d.ts +2 -1
- package/build/cjs/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.d.ts +1 -1
- package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.d.ts +2 -1
- package/build/cjs/components/Paginator/Paginator.d.ts +2 -1
- package/build/cjs/components/Paginator/components/NavigationButton.d.ts +2 -1
- package/build/cjs/components/Paginator/components/PaginatorItem.d.ts +2 -1
- package/build/cjs/components/Prompt/Prompt.d.ts +2 -1
- package/build/cjs/components/Prompt/Prompt.js +5 -2
- package/build/cjs/components/PromptSignIn/PromptSignIn.d.ts +1 -1
- package/build/cjs/containers/BlogPage/BlogPage.d.ts +1 -1
- package/build/cjs/containers/BlogPage/BlogPage.js +14 -15
- package/build/cjs/containers/BlogPostPage/BlogPostPage.d.ts +3 -1
- package/build/cjs/containers/BlogPostPage/BlogPostPage.js +48 -7
- package/build/cjs/contexts/theme/ThemeProvider.d.ts +1 -1
- package/build/cjs/demo/DocsDecorator/DocsDecorator.css +11 -0
- package/build/cjs/hooks/useHover.d.ts +5 -0
- package/build/cjs/hooks/useHover.js +35 -0
- package/build/esm/components/FeedHeader/components/Controls/customRenders.d.ts +2 -1
- package/build/esm/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.d.ts +1 -1
- package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.d.ts +2 -1
- package/build/esm/components/Paginator/Paginator.d.ts +2 -1
- package/build/esm/components/Paginator/components/NavigationButton.d.ts +2 -1
- package/build/esm/components/Paginator/components/PaginatorItem.d.ts +2 -1
- package/build/esm/components/Prompt/Prompt.d.ts +2 -1
- package/build/esm/components/Prompt/Prompt.js +5 -2
- package/build/esm/components/PromptSignIn/PromptSignIn.d.ts +1 -1
- package/build/esm/containers/BlogPage/BlogPage.d.ts +1 -1
- package/build/esm/containers/BlogPage/BlogPage.js +15 -16
- package/build/esm/containers/BlogPostPage/BlogPostPage.d.ts +3 -1
- package/build/esm/containers/BlogPostPage/BlogPostPage.js +25 -7
- package/build/esm/contexts/theme/ThemeProvider.d.ts +1 -1
- package/build/esm/demo/DocsDecorator/DocsDecorator.css +11 -0
- package/build/esm/hooks/useHover.d.ts +5 -0
- package/build/esm/hooks/useHover.js +28 -0
- package/package.json +14 -17
- package/CHANGELOG.md +0 -216
@@ -1,3 +1,4 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { SelectOption, SelectProps } from '@gravity-ui/uikit';
|
2
3
|
import { CustomSwitcherProps } from '../CustomSwitcher/CustomSwitcher';
|
3
4
|
type RenderSwitcherType = ({ initial, list, defaultLabel, }: {
|
@@ -7,5 +8,5 @@ type RenderSwitcherType = ({ initial, list, defaultLabel, }: {
|
|
7
8
|
}) => SelectProps['renderControl'];
|
8
9
|
export declare const renderSwitcher: RenderSwitcherType;
|
9
10
|
export declare const renderFilter: SelectProps['renderFilter'];
|
10
|
-
export declare const renderOption: (option: SelectOption) => JSX.Element;
|
11
|
+
export declare const renderOption: (option: SelectOption) => React.JSX.Element;
|
11
12
|
export {};
|
package/build/cjs/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.d.ts
CHANGED
@@ -5,4 +5,4 @@ export type CustomSelectOptionProps = {
|
|
5
5
|
icon?: React.ReactElement;
|
6
6
|
} & SelectOptionType;
|
7
7
|
};
|
8
|
-
export declare const CustomSelectOption: ({ data }: CustomSelectOptionProps) => JSX.Element;
|
8
|
+
export declare const CustomSelectOption: ({ data }: CustomSelectOptionProps) => React.JSX.Element;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { SelectProps } from '@gravity-ui/uikit';
|
2
3
|
import { SelectItem } from '../Controls/Controls';
|
3
4
|
type RenderControlParameters = Partial<Parameters<Required<SelectProps>['renderControl']>[0]>;
|
@@ -7,5 +8,5 @@ export type CustomSwitcherProps = {
|
|
7
8
|
list: SelectItem[];
|
8
9
|
controlRef: RenderControlParameters['ref'];
|
9
10
|
} & Omit<RenderControlParameters, 'ref'>;
|
10
|
-
export declare const CustomSwitcher: ({ initial, defaultLabel, list, onClick, controlRef, }: CustomSwitcherProps) => JSX.Element;
|
11
|
+
export declare const CustomSwitcher: ({ initial, defaultLabel, list, onClick, controlRef, }: CustomSwitcherProps) => React.JSX.Element;
|
11
12
|
export {};
|
@@ -1,2 +1,3 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { PaginatorProps } from './types';
|
2
|
-
export declare const Paginator: ({ itemsPerPage, totalItems, maxPages, page, className, onPageChange, pageCountForShowSupportButtons, }: PaginatorProps) => JSX.Element | null;
|
3
|
+
export declare const Paginator: ({ itemsPerPage, totalItems, maxPages, page, className, onPageChange, pageCountForShowSupportButtons, }: PaginatorProps) => React.JSX.Element | null;
|
@@ -1,6 +1,7 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { ArrowType } from '../types';
|
2
3
|
export type NavigationButtonProps = {
|
3
4
|
arrowType: ArrowType;
|
4
5
|
disabled?: boolean;
|
5
6
|
};
|
6
|
-
export declare const NavigationButton: ({ arrowType, disabled }: NavigationButtonProps) => JSX.Element | null;
|
7
|
+
export declare const NavigationButton: ({ arrowType, disabled }: NavigationButtonProps) => React.JSX.Element | null;
|
@@ -1,2 +1,3 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { PaginatorItemProps } from '../types';
|
2
|
-
export declare const PaginatorItem: ({ dataKey, mods, content, onClick, loading, index, }: PaginatorItemProps) => JSX.Element;
|
3
|
+
export declare const PaginatorItem: ({ dataKey, mods, content, onClick, loading, index, }: PaginatorItemProps) => React.JSX.Element;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { ButtonProps } from '@gravity-ui/uikit';
|
2
3
|
export interface PromptProps {
|
3
4
|
text: string;
|
@@ -14,4 +15,4 @@ export interface PromptProps {
|
|
14
15
|
* - `openTimestamp` (`Date.now()`) resets the visible duration
|
15
16
|
* @returns {JSX|null}
|
16
17
|
*/
|
17
|
-
export declare const Prompt: ({ text, actions, className, openTimestamp, openDuration, theme, }: PromptProps) => JSX.Element;
|
18
|
+
export declare const Prompt: ({ text, actions, className, openTimestamp, openDuration, theme, }: PromptProps) => React.JSX.Element;
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.Prompt = void 0;
|
18
18
|
const react_1 = __importDefault(require("react"));
|
19
19
|
const uikit_1 = require("@gravity-ui/uikit");
|
20
|
+
const useHover_1 = require("../../hooks/useHover");
|
20
21
|
const useOpenCloseTimer_1 = require("../../hooks/useOpenCloseTimer");
|
21
22
|
const cn_1 = require("../../utils/cn");
|
22
23
|
const b = (0, cn_1.block)('prompt');
|
@@ -28,10 +29,12 @@ const b = (0, cn_1.block)('prompt');
|
|
28
29
|
* @returns {JSX|null}
|
29
30
|
*/
|
30
31
|
const Prompt = ({ text, actions, className, openTimestamp = 0, openDuration, theme, }) => {
|
31
|
-
const
|
32
|
+
const [ref, hovering] = (0, useHover_1.useHover)();
|
33
|
+
const { open: isOpen } = (0, useOpenCloseTimer_1.useOpenCloseTimer)(openTimestamp, openDuration);
|
34
|
+
const open = isOpen || hovering;
|
32
35
|
const mounted = openTimestamp > 0;
|
33
36
|
return (react_1.default.createElement("div", { className: b({ theme, open, close: !open, mounted }, className) },
|
34
|
-
react_1.default.createElement("div", { className: b('content') },
|
37
|
+
react_1.default.createElement("div", { className: b('content'), ref: ref },
|
35
38
|
react_1.default.createElement("span", { className: b('text') }, text),
|
36
39
|
react_1.default.createElement("div", { className: b('actions') }, actions.map((_a, i) => {
|
37
40
|
var { view = 'action', className: btnClass } = _a, btnProps = __rest(_a, ["view", "className"]);
|
@@ -7,4 +7,4 @@ export interface PromptSignInProps extends Partial<PromptProps> {
|
|
7
7
|
* Authentication Popup that appears when user action requires login
|
8
8
|
* @returns {JSX|null}
|
9
9
|
*/
|
10
|
-
export declare const PromptSignIn: ({ text, onClickSignIn, actions, ...props }: PromptSignInProps) => JSX.Element;
|
10
|
+
export declare const PromptSignIn: ({ text, onClickSignIn, actions, ...props }: PromptSignInProps) => React.JSX.Element;
|
@@ -17,4 +17,4 @@ export type BlogPageProps = {
|
|
17
17
|
isSignedInUser?: boolean;
|
18
18
|
onClickSignIn?: React.EventHandler<SyntheticEvent>;
|
19
19
|
};
|
20
|
-
export declare const BlogPage: ({ content, posts, tags, services, getPosts, metaData, hasLikes, toggleLike, navigation, settings, pageCountForShowSupportButtons, isSignedInUser, onClickSignIn, }: BlogPageProps) => JSX.Element;
|
20
|
+
export declare const BlogPage: ({ content, posts, tags, services, getPosts, metaData, hasLikes, toggleLike, navigation, settings, pageCountForShowSupportButtons, isSignedInUser, onClickSignIn, }: BlogPageProps) => React.JSX.Element;
|
@@ -48,21 +48,20 @@ const FeedContext_1 = require("../../contexts/FeedContext");
|
|
48
48
|
const LikesContext_1 = require("../../contexts/LikesContext");
|
49
49
|
const BlogPage = ({ content, posts, tags, services, getPosts, metaData, hasLikes = false, toggleLike, navigation, settings, pageCountForShowSupportButtons, isSignedInUser = false, onClickSignIn, }) => {
|
50
50
|
const _a = (0, usePromptSignInProps_1.usePromptSignInProps)(onClickSignIn), { requireSignIn } = _a, promptSignInProps = __rest(_a, ["requireSignIn"]);
|
51
|
-
const
|
52
|
-
return (react_1.default.createElement(
|
53
|
-
react_1.default.createElement(
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
react_1.default.createElement(
|
64
|
-
|
65
|
-
react_1.default.createElement(page_constructor_1.PageConstructor, { content: content, custom: blocksMap_1.default, navigation: navigation })))),
|
51
|
+
const likesContextData = (0, react_1.useMemo)(() => ({ toggleLike, hasLikes, isSignedInUser, requireSignIn }), [toggleLike, hasLikes, isSignedInUser, requireSignIn]);
|
52
|
+
return (react_1.default.createElement(LikesContext_1.LikesContext.Provider, { value: likesContextData },
|
53
|
+
react_1.default.createElement(FeedContext_1.FeedContext.Provider, { value: {
|
54
|
+
posts: posts.posts,
|
55
|
+
pinnedPost: posts.pinnedPost,
|
56
|
+
totalCount: posts.count,
|
57
|
+
tags,
|
58
|
+
services: services !== null && services !== void 0 ? services : [],
|
59
|
+
getPosts,
|
60
|
+
pageCountForShowSupportButtons,
|
61
|
+
} },
|
62
|
+
react_1.default.createElement(page_constructor_1.PageConstructorProvider, Object.assign({}, settings),
|
63
|
+
metaData ? react_1.default.createElement(MetaWrapper_1.MetaWrapper, Object.assign({}, metaData)) : null,
|
64
|
+
react_1.default.createElement(page_constructor_1.PageConstructor, { content: content, custom: blocksMap_1.default, navigation: navigation }))),
|
66
65
|
react_1.default.createElement(PromptSignIn_1.PromptSignIn, Object.assign({}, promptSignInProps))));
|
67
66
|
};
|
68
67
|
exports.BlogPage = BlogPage;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { SyntheticEvent } from 'react';
|
2
2
|
import { NavigationData, PageConstructorProviderProps, PageContent } from '@gravity-ui/page-constructor';
|
3
3
|
import { ShareOptions } from '@gravity-ui/uikit';
|
4
4
|
import { MetaProps, PostData, ToggleLikeCallbackType } from '../../models/common';
|
@@ -15,5 +15,7 @@ export interface BlogPostPageProps {
|
|
15
15
|
settings?: PageConstructorProviderProps;
|
16
16
|
navigation?: NavigationData;
|
17
17
|
shareOptions?: ShareOptions[];
|
18
|
+
isSignedInUser?: boolean;
|
19
|
+
onClickSignIn?: React.EventHandler<SyntheticEvent>;
|
18
20
|
}
|
19
21
|
export declare const BlogPostPage: React.FC<BlogPostPageProps>;
|
@@ -1,27 +1,67 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
+
if (mod && mod.__esModule) return mod;
|
20
|
+
var result = {};
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
+
__setModuleDefault(result, mod);
|
23
|
+
return result;
|
24
|
+
};
|
25
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
26
|
+
var t = {};
|
27
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
28
|
+
t[p] = s[p];
|
29
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
30
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
31
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
32
|
+
t[p[i]] = s[p[i]];
|
33
|
+
}
|
34
|
+
return t;
|
35
|
+
};
|
2
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
38
|
};
|
5
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
40
|
exports.BlogPostPage = void 0;
|
7
|
-
const react_1 =
|
41
|
+
const react_1 = __importStar(require("react"));
|
8
42
|
const page_constructor_1 = require("@gravity-ui/page-constructor");
|
9
43
|
const MetaWrapper_1 = require("../../components/MetaWrapper/MetaWrapper");
|
44
|
+
const PromptSignIn_1 = require("../../components/PromptSignIn/PromptSignIn");
|
45
|
+
const usePromptSignInProps_1 = require("../../components/PromptSignIn/hooks/usePromptSignInProps");
|
10
46
|
const blocksMap_1 = __importDefault(require("../../constructor/blocksMap"));
|
11
47
|
const LikesContext_1 = require("../../contexts/LikesContext");
|
12
48
|
const PostPageContext_1 = require("../../contexts/PostPageContext");
|
13
49
|
const useLikes_1 = require("../../hooks/useLikes");
|
14
|
-
const BlogPostPage = ({ metaData, suggestedPosts, likes, content, post, settings, navigation, shareOptions, }) => {
|
50
|
+
const BlogPostPage = ({ metaData, suggestedPosts, likes, content, post, settings, navigation, shareOptions, isSignedInUser = false, onClickSignIn, }) => {
|
15
51
|
const { hasUserLike, likesCount, handleLike } = (0, useLikes_1.useLikes)({
|
16
52
|
hasLike: likes === null || likes === void 0 ? void 0 : likes.hasUserLike,
|
17
53
|
count: likes === null || likes === void 0 ? void 0 : likes.likesCount,
|
18
54
|
toggleLikeCallback: likes === null || likes === void 0 ? void 0 : likes.toggleLike,
|
19
55
|
postId: post === null || post === void 0 ? void 0 : post.blogPostId,
|
20
56
|
});
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
57
|
+
const _a = (0, usePromptSignInProps_1.usePromptSignInProps)(onClickSignIn), { requireSignIn } = _a, promptSignInProps = __rest(_a, ["requireSignIn"]);
|
58
|
+
const likesContextData = (0, react_1.useMemo)(() => ({
|
59
|
+
toggleLike: likes === null || likes === void 0 ? void 0 : likes.toggleLike,
|
60
|
+
hasLikes: Boolean(likes),
|
61
|
+
isSignedInUser,
|
62
|
+
requireSignIn,
|
63
|
+
}), [likes, isSignedInUser, requireSignIn]);
|
64
|
+
return (react_1.default.createElement(LikesContext_1.LikesContext.Provider, { value: likesContextData },
|
25
65
|
react_1.default.createElement(PostPageContext_1.PostPageContext.Provider, { value: {
|
26
66
|
post,
|
27
67
|
suggestedPosts,
|
@@ -36,6 +76,7 @@ const BlogPostPage = ({ metaData, suggestedPosts, likes, content, post, settings
|
|
36
76
|
} },
|
37
77
|
react_1.default.createElement(page_constructor_1.PageConstructorProvider, Object.assign({}, settings),
|
38
78
|
metaData ? react_1.default.createElement(MetaWrapper_1.MetaWrapper, Object.assign({}, metaData)) : null,
|
39
|
-
react_1.default.createElement(page_constructor_1.PageConstructor, { content: content, custom: blocksMap_1.default, navigation: navigation })))
|
79
|
+
react_1.default.createElement(page_constructor_1.PageConstructor, { content: content, custom: blocksMap_1.default, navigation: navigation }))),
|
80
|
+
react_1.default.createElement(PromptSignIn_1.PromptSignIn, Object.assign({}, promptSignInProps))));
|
40
81
|
};
|
41
82
|
exports.BlogPostPage = BlogPostPage;
|
@@ -17,7 +17,7 @@ export declare class ThemeProvider extends React.Component<ThemeProviderExternal
|
|
17
17
|
state: ThemeProviderState;
|
18
18
|
componentDidMount(): void;
|
19
19
|
componentDidUpdate(prevProps: ThemeProviderProps, prevState: ThemeProviderState): void;
|
20
|
-
render(): JSX.Element;
|
20
|
+
render(): React.JSX.Element;
|
21
21
|
private updateBodyClassName;
|
22
22
|
}
|
23
23
|
export {};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
2
|
+
unpredictable css rules order in build */
|
3
|
+
.docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .sbdocs-wrapper {
|
4
|
+
padding: 0 40px;
|
5
|
+
}
|
6
|
+
.docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .sbdocs-content {
|
7
|
+
max-width: 1680px;
|
8
|
+
}
|
9
|
+
.docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .innerZoomElementWrapper {
|
10
|
+
overflow: hidden;
|
11
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.useHover = void 0;
|
7
|
+
const react_1 = __importDefault(require("react"));
|
8
|
+
/*
|
9
|
+
* Source code copied from https://github.com/uidotdev/usehooks | MIT License
|
10
|
+
* @see https://usehooks.com/usehover
|
11
|
+
*/
|
12
|
+
function useHover() {
|
13
|
+
const [hovering, setHovering] = react_1.default.useState(false);
|
14
|
+
const ref = react_1.default.useRef(null);
|
15
|
+
react_1.default.useEffect(() => {
|
16
|
+
const node = ref.current;
|
17
|
+
if (!node)
|
18
|
+
return;
|
19
|
+
const handleMouseEnter = () => {
|
20
|
+
setHovering(true);
|
21
|
+
};
|
22
|
+
const handleMouseLeave = () => {
|
23
|
+
setHovering(false);
|
24
|
+
};
|
25
|
+
node.addEventListener('mouseenter', handleMouseEnter);
|
26
|
+
node.addEventListener('mouseleave', handleMouseLeave);
|
27
|
+
// eslint-disable-next-line consistent-return
|
28
|
+
return () => {
|
29
|
+
node.removeEventListener('mouseenter', handleMouseEnter);
|
30
|
+
node.removeEventListener('mouseleave', handleMouseLeave);
|
31
|
+
};
|
32
|
+
}, []);
|
33
|
+
return [ref, hovering];
|
34
|
+
}
|
35
|
+
exports.useHover = useHover;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { SelectOption, SelectProps } from '@gravity-ui/uikit';
|
2
3
|
import { CustomSwitcherProps } from '../CustomSwitcher/CustomSwitcher';
|
3
4
|
import './Controls.css';
|
@@ -8,5 +9,5 @@ type RenderSwitcherType = ({ initial, list, defaultLabel, }: {
|
|
8
9
|
}) => SelectProps['renderControl'];
|
9
10
|
export declare const renderSwitcher: RenderSwitcherType;
|
10
11
|
export declare const renderFilter: SelectProps['renderFilter'];
|
11
|
-
export declare const renderOption: (option: SelectOption) => JSX.Element;
|
12
|
+
export declare const renderOption: (option: SelectOption) => React.JSX.Element;
|
12
13
|
export {};
|
package/build/esm/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.d.ts
CHANGED
@@ -6,4 +6,4 @@ export type CustomSelectOptionProps = {
|
|
6
6
|
icon?: React.ReactElement;
|
7
7
|
} & SelectOptionType;
|
8
8
|
};
|
9
|
-
export declare const CustomSelectOption: ({ data }: CustomSelectOptionProps) => JSX.Element;
|
9
|
+
export declare const CustomSelectOption: ({ data }: CustomSelectOptionProps) => React.JSX.Element;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { SelectProps } from '@gravity-ui/uikit';
|
2
3
|
import { SelectItem } from '../Controls/Controls';
|
3
4
|
import './CustomSwitcher.css';
|
@@ -8,5 +9,5 @@ export type CustomSwitcherProps = {
|
|
8
9
|
list: SelectItem[];
|
9
10
|
controlRef: RenderControlParameters['ref'];
|
10
11
|
} & Omit<RenderControlParameters, 'ref'>;
|
11
|
-
export declare const CustomSwitcher: ({ initial, defaultLabel, list, onClick, controlRef, }: CustomSwitcherProps) => JSX.Element;
|
12
|
+
export declare const CustomSwitcher: ({ initial, defaultLabel, list, onClick, controlRef, }: CustomSwitcherProps) => React.JSX.Element;
|
12
13
|
export {};
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { PaginatorProps } from './types';
|
2
3
|
import './Paginator.css';
|
3
|
-
export declare const Paginator: ({ itemsPerPage, totalItems, maxPages, page, className, onPageChange, pageCountForShowSupportButtons, }: PaginatorProps) => JSX.Element | null;
|
4
|
+
export declare const Paginator: ({ itemsPerPage, totalItems, maxPages, page, className, onPageChange, pageCountForShowSupportButtons, }: PaginatorProps) => React.JSX.Element | null;
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { ArrowType } from '../types';
|
2
3
|
import '../Paginator.css';
|
3
4
|
export type NavigationButtonProps = {
|
4
5
|
arrowType: ArrowType;
|
5
6
|
disabled?: boolean;
|
6
7
|
};
|
7
|
-
export declare const NavigationButton: ({ arrowType, disabled }: NavigationButtonProps) => JSX.Element | null;
|
8
|
+
export declare const NavigationButton: ({ arrowType, disabled }: NavigationButtonProps) => React.JSX.Element | null;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { PaginatorItemProps } from '../types';
|
2
3
|
import '../Paginator.css';
|
3
|
-
export declare const PaginatorItem: ({ dataKey, mods, content, onClick, loading, index, }: PaginatorItemProps) => JSX.Element;
|
4
|
+
export declare const PaginatorItem: ({ dataKey, mods, content, onClick, loading, index, }: PaginatorItemProps) => React.JSX.Element;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import React from 'react';
|
1
2
|
import { ButtonProps } from '@gravity-ui/uikit';
|
2
3
|
import './Prompt.css';
|
3
4
|
export interface PromptProps {
|
@@ -15,4 +16,4 @@ export interface PromptProps {
|
|
15
16
|
* - `openTimestamp` (`Date.now()`) resets the visible duration
|
16
17
|
* @returns {JSX|null}
|
17
18
|
*/
|
18
|
-
export declare const Prompt: ({ text, actions, className, openTimestamp, openDuration, theme, }: PromptProps) => JSX.Element;
|
19
|
+
export declare const Prompt: ({ text, actions, className, openTimestamp, openDuration, theme, }: PromptProps) => React.JSX.Element;
|
@@ -11,6 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
11
11
|
};
|
12
12
|
import React from 'react';
|
13
13
|
import { Button } from '@gravity-ui/uikit';
|
14
|
+
import { useHover } from '../../hooks/useHover';
|
14
15
|
import { useOpenCloseTimer } from '../../hooks/useOpenCloseTimer';
|
15
16
|
import { block } from '../../utils/cn';
|
16
17
|
import './Prompt.css';
|
@@ -23,10 +24,12 @@ const b = block('prompt');
|
|
23
24
|
* @returns {JSX|null}
|
24
25
|
*/
|
25
26
|
export const Prompt = ({ text, actions, className, openTimestamp = 0, openDuration, theme, }) => {
|
26
|
-
const
|
27
|
+
const [ref, hovering] = useHover();
|
28
|
+
const { open: isOpen } = useOpenCloseTimer(openTimestamp, openDuration);
|
29
|
+
const open = isOpen || hovering;
|
27
30
|
const mounted = openTimestamp > 0;
|
28
31
|
return (React.createElement("div", { className: b({ theme, open, close: !open, mounted }, className) },
|
29
|
-
React.createElement("div", { className: b('content') },
|
32
|
+
React.createElement("div", { className: b('content'), ref: ref },
|
30
33
|
React.createElement("span", { className: b('text') }, text),
|
31
34
|
React.createElement("div", { className: b('actions') }, actions.map((_a, i) => {
|
32
35
|
var { view = 'action', className: btnClass } = _a, btnProps = __rest(_a, ["view", "className"]);
|
@@ -7,4 +7,4 @@ export interface PromptSignInProps extends Partial<PromptProps> {
|
|
7
7
|
* Authentication Popup that appears when user action requires login
|
8
8
|
* @returns {JSX|null}
|
9
9
|
*/
|
10
|
-
export declare const PromptSignIn: ({ text, onClickSignIn, actions, ...props }: PromptSignInProps) => JSX.Element;
|
10
|
+
export declare const PromptSignIn: ({ text, onClickSignIn, actions, ...props }: PromptSignInProps) => React.JSX.Element;
|
@@ -18,4 +18,4 @@ export type BlogPageProps = {
|
|
18
18
|
isSignedInUser?: boolean;
|
19
19
|
onClickSignIn?: React.EventHandler<SyntheticEvent>;
|
20
20
|
};
|
21
|
-
export declare const BlogPage: ({ content, posts, tags, services, getPosts, metaData, hasLikes, toggleLike, navigation, settings, pageCountForShowSupportButtons, isSignedInUser, onClickSignIn, }: BlogPageProps) => JSX.Element;
|
21
|
+
export declare const BlogPage: ({ content, posts, tags, services, getPosts, metaData, hasLikes, toggleLike, navigation, settings, pageCountForShowSupportButtons, isSignedInUser, onClickSignIn, }: BlogPageProps) => React.JSX.Element;
|
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
9
9
|
}
|
10
10
|
return t;
|
11
11
|
};
|
12
|
-
import React, {
|
12
|
+
import React, { useMemo } from 'react';
|
13
13
|
import { PageConstructor, PageConstructorProvider, } from '@gravity-ui/page-constructor';
|
14
14
|
import { MetaWrapper } from '../../components/MetaWrapper/MetaWrapper';
|
15
15
|
import { PromptSignIn } from '../../components/PromptSignIn/PromptSignIn';
|
@@ -20,20 +20,19 @@ import { LikesContext } from '../../contexts/LikesContext';
|
|
20
20
|
import './BlogPage.css';
|
21
21
|
export const BlogPage = ({ content, posts, tags, services, getPosts, metaData, hasLikes = false, toggleLike, navigation, settings, pageCountForShowSupportButtons, isSignedInUser = false, onClickSignIn, }) => {
|
22
22
|
const _a = usePromptSignInProps(onClickSignIn), { requireSignIn } = _a, promptSignInProps = __rest(_a, ["requireSignIn"]);
|
23
|
-
const
|
24
|
-
return (React.createElement(
|
25
|
-
React.createElement(
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
React.createElement(
|
36
|
-
|
37
|
-
React.createElement(PageConstructor, { content: content, custom: componentMap, navigation: navigation })))),
|
23
|
+
const likesContextData = useMemo(() => ({ toggleLike, hasLikes, isSignedInUser, requireSignIn }), [toggleLike, hasLikes, isSignedInUser, requireSignIn]);
|
24
|
+
return (React.createElement(LikesContext.Provider, { value: likesContextData },
|
25
|
+
React.createElement(FeedContext.Provider, { value: {
|
26
|
+
posts: posts.posts,
|
27
|
+
pinnedPost: posts.pinnedPost,
|
28
|
+
totalCount: posts.count,
|
29
|
+
tags,
|
30
|
+
services: services !== null && services !== void 0 ? services : [],
|
31
|
+
getPosts,
|
32
|
+
pageCountForShowSupportButtons,
|
33
|
+
} },
|
34
|
+
React.createElement(PageConstructorProvider, Object.assign({}, settings),
|
35
|
+
metaData ? React.createElement(MetaWrapper, Object.assign({}, metaData)) : null,
|
36
|
+
React.createElement(PageConstructor, { content: content, custom: componentMap, navigation: navigation }))),
|
38
37
|
React.createElement(PromptSignIn, Object.assign({}, promptSignInProps))));
|
39
38
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, { SyntheticEvent } from 'react';
|
2
2
|
import { NavigationData, PageConstructorProviderProps, PageContent } from '@gravity-ui/page-constructor';
|
3
3
|
import { ShareOptions } from '@gravity-ui/uikit';
|
4
4
|
import { MetaProps, PostData, ToggleLikeCallbackType } from '../../models/common';
|
@@ -16,5 +16,7 @@ export interface BlogPostPageProps {
|
|
16
16
|
settings?: PageConstructorProviderProps;
|
17
17
|
navigation?: NavigationData;
|
18
18
|
shareOptions?: ShareOptions[];
|
19
|
+
isSignedInUser?: boolean;
|
20
|
+
onClickSignIn?: React.EventHandler<SyntheticEvent>;
|
19
21
|
}
|
20
22
|
export declare const BlogPostPage: React.FC<BlogPostPageProps>;
|
@@ -1,22 +1,39 @@
|
|
1
|
-
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
2
|
+
var t = {};
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4
|
+
t[p] = s[p];
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
8
|
+
t[p[i]] = s[p[i]];
|
9
|
+
}
|
10
|
+
return t;
|
11
|
+
};
|
12
|
+
import React, { useMemo } from 'react';
|
2
13
|
import { PageConstructor, PageConstructorProvider, } from '@gravity-ui/page-constructor';
|
3
14
|
import { MetaWrapper } from '../../components/MetaWrapper/MetaWrapper';
|
15
|
+
import { PromptSignIn } from '../../components/PromptSignIn/PromptSignIn';
|
16
|
+
import { usePromptSignInProps } from '../../components/PromptSignIn/hooks/usePromptSignInProps';
|
4
17
|
import componentMap from '../../constructor/blocksMap';
|
5
18
|
import { LikesContext } from '../../contexts/LikesContext';
|
6
19
|
import { PostPageContext } from '../../contexts/PostPageContext';
|
7
20
|
import { useLikes } from '../../hooks/useLikes';
|
8
21
|
import './BlogPostPage.css';
|
9
|
-
export const BlogPostPage = ({ metaData, suggestedPosts, likes, content, post, settings, navigation, shareOptions, }) => {
|
22
|
+
export const BlogPostPage = ({ metaData, suggestedPosts, likes, content, post, settings, navigation, shareOptions, isSignedInUser = false, onClickSignIn, }) => {
|
10
23
|
const { hasUserLike, likesCount, handleLike } = useLikes({
|
11
24
|
hasLike: likes === null || likes === void 0 ? void 0 : likes.hasUserLike,
|
12
25
|
count: likes === null || likes === void 0 ? void 0 : likes.likesCount,
|
13
26
|
toggleLikeCallback: likes === null || likes === void 0 ? void 0 : likes.toggleLike,
|
14
27
|
postId: post === null || post === void 0 ? void 0 : post.blogPostId,
|
15
28
|
});
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
29
|
+
const _a = usePromptSignInProps(onClickSignIn), { requireSignIn } = _a, promptSignInProps = __rest(_a, ["requireSignIn"]);
|
30
|
+
const likesContextData = useMemo(() => ({
|
31
|
+
toggleLike: likes === null || likes === void 0 ? void 0 : likes.toggleLike,
|
32
|
+
hasLikes: Boolean(likes),
|
33
|
+
isSignedInUser,
|
34
|
+
requireSignIn,
|
35
|
+
}), [likes, isSignedInUser, requireSignIn]);
|
36
|
+
return (React.createElement(LikesContext.Provider, { value: likesContextData },
|
20
37
|
React.createElement(PostPageContext.Provider, { value: {
|
21
38
|
post,
|
22
39
|
suggestedPosts,
|
@@ -31,5 +48,6 @@ export const BlogPostPage = ({ metaData, suggestedPosts, likes, content, post, s
|
|
31
48
|
} },
|
32
49
|
React.createElement(PageConstructorProvider, Object.assign({}, settings),
|
33
50
|
metaData ? React.createElement(MetaWrapper, Object.assign({}, metaData)) : null,
|
34
|
-
React.createElement(PageConstructor, { content: content, custom: componentMap, navigation: navigation })))
|
51
|
+
React.createElement(PageConstructor, { content: content, custom: componentMap, navigation: navigation }))),
|
52
|
+
React.createElement(PromptSignIn, Object.assign({}, promptSignInProps))));
|
35
53
|
};
|
@@ -17,7 +17,7 @@ export declare class ThemeProvider extends React.Component<ThemeProviderExternal
|
|
17
17
|
state: ThemeProviderState;
|
18
18
|
componentDidMount(): void;
|
19
19
|
componentDidUpdate(prevProps: ThemeProviderProps, prevState: ThemeProviderState): void;
|
20
|
-
render(): JSX.Element;
|
20
|
+
render(): React.JSX.Element;
|
21
21
|
private updateBodyClassName;
|
22
22
|
}
|
23
23
|
export {};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
2
|
+
unpredictable css rules order in build */
|
3
|
+
.docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .sbdocs-wrapper {
|
4
|
+
padding: 0 40px;
|
5
|
+
}
|
6
|
+
.docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .sbdocs-content {
|
7
|
+
max-width: 1680px;
|
8
|
+
}
|
9
|
+
.docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .innerZoomElementWrapper {
|
10
|
+
overflow: hidden;
|
11
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
/*
|
3
|
+
* Source code copied from https://github.com/uidotdev/usehooks | MIT License
|
4
|
+
* @see https://usehooks.com/usehover
|
5
|
+
*/
|
6
|
+
export function useHover() {
|
7
|
+
const [hovering, setHovering] = React.useState(false);
|
8
|
+
const ref = React.useRef(null);
|
9
|
+
React.useEffect(() => {
|
10
|
+
const node = ref.current;
|
11
|
+
if (!node)
|
12
|
+
return;
|
13
|
+
const handleMouseEnter = () => {
|
14
|
+
setHovering(true);
|
15
|
+
};
|
16
|
+
const handleMouseLeave = () => {
|
17
|
+
setHovering(false);
|
18
|
+
};
|
19
|
+
node.addEventListener('mouseenter', handleMouseEnter);
|
20
|
+
node.addEventListener('mouseleave', handleMouseLeave);
|
21
|
+
// eslint-disable-next-line consistent-return
|
22
|
+
return () => {
|
23
|
+
node.removeEventListener('mouseenter', handleMouseEnter);
|
24
|
+
node.removeEventListener('mouseleave', handleMouseLeave);
|
25
|
+
};
|
26
|
+
}, []);
|
27
|
+
return [ref, hovering];
|
28
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gravity-ui/blog-constructor",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.3.0",
|
4
4
|
"description": "Gravity UI Blog Constructor",
|
5
5
|
"license": "MIT",
|
6
6
|
"repository": {
|
@@ -35,8 +35,8 @@
|
|
35
35
|
"start": "node dist",
|
36
36
|
"clean": "gulp clean",
|
37
37
|
"build": "npm run clean && gulp",
|
38
|
-
"storybook:start": "TS_NODE_PROJECT=.storybook/tsconfig.json
|
39
|
-
"storybook:build": "TS_NODE_PROJECT=.storybook/tsconfig.json build
|
38
|
+
"storybook:start": "TS_NODE_PROJECT=.storybook/tsconfig.json sb dev -p 7010",
|
39
|
+
"storybook:build": "TS_NODE_PROJECT=.storybook/tsconfig.json sb build -c .storybook -o storybook-static",
|
40
40
|
"prepublishOnly": "npm run lint && npm run build",
|
41
41
|
"prepare": "husky install",
|
42
42
|
"svgo": "svgo --config svgo.config.js",
|
@@ -64,12 +64,14 @@
|
|
64
64
|
},
|
65
65
|
"peerDependencies": {
|
66
66
|
"@doc-tools/transform": "^2.9.0",
|
67
|
-
"@gravity-ui/uikit": "^4.1.0",
|
68
67
|
"@gravity-ui/page-constructor": "^3.1.1",
|
68
|
+
"@gravity-ui/uikit": "^4.1.0",
|
69
69
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0"
|
70
70
|
},
|
71
71
|
"devDependencies": {
|
72
|
-
"@babel/
|
72
|
+
"@babel/preset-env": "^7.22.9",
|
73
|
+
"@babel/preset-react": "^7.22.5",
|
74
|
+
"@babel/preset-typescript": "^7.22.5",
|
73
75
|
"@commitlint/config-conventional": "^17.4.3",
|
74
76
|
"@doc-tools/transform": "^2.9.0",
|
75
77
|
"@gravity-ui/eslint-config": "^2.0.0",
|
@@ -78,12 +80,11 @@
|
|
78
80
|
"@gravity-ui/stylelint-config": "^1.0.0",
|
79
81
|
"@gravity-ui/tsconfig": "^1.0.0",
|
80
82
|
"@gravity-ui/uikit": "^4.4.0",
|
81
|
-
"@storybook/addon-
|
82
|
-
"@storybook/
|
83
|
-
"@storybook/addon-essentials": "^6.5.10",
|
84
|
-
"@storybook/addon-viewport": "^6.3.12",
|
83
|
+
"@storybook/addon-essentials": "^7.0.27",
|
84
|
+
"@storybook/cli": "^7.0.27",
|
85
85
|
"@storybook/preset-scss": "^1.0.3",
|
86
|
-
"@storybook/react": "^
|
86
|
+
"@storybook/react": "^7.0.27",
|
87
|
+
"@storybook/react-webpack5": "^7.0.27",
|
87
88
|
"@testing-library/jest-dom": "^5.16.5",
|
88
89
|
"@testing-library/react": "^14.0.0",
|
89
90
|
"@testing-library/user-event": "^14.4.3",
|
@@ -112,8 +113,6 @@
|
|
112
113
|
"jest-transform-css": "^6.0.1",
|
113
114
|
"js-yaml": "^3.14.1",
|
114
115
|
"lint-staged": "^11.2.6",
|
115
|
-
"markdown-loader": "^6.0.0",
|
116
|
-
"move-file-cli": "^3.0.0",
|
117
116
|
"npm-run-all": "^4.1.5",
|
118
117
|
"postcss": "^8.4.14",
|
119
118
|
"prettier": "2.4.1",
|
@@ -121,13 +120,11 @@
|
|
121
120
|
"react-dom": "^18.2.0",
|
122
121
|
"rimraf": "^3.0.2",
|
123
122
|
"sass": "^1.54.4",
|
124
|
-
"sass-loader": "^
|
123
|
+
"sass-loader": "^13.3.1",
|
124
|
+
"storybook": "^7.0.27",
|
125
125
|
"stylelint": "^14.11.0",
|
126
|
-
"stylelint-scss": "^4.0.0",
|
127
|
-
"svg-sprite-loader": "^6.0.11",
|
128
126
|
"ts-jest": "^29.0.5",
|
129
|
-
"typescript": "^4.9.3"
|
130
|
-
"webpack": "^4.46.0"
|
127
|
+
"typescript": "^4.9.3"
|
131
128
|
},
|
132
129
|
"lint-staged": {
|
133
130
|
"*.{css,scss}": [
|
package/CHANGELOG.md
DELETED
@@ -1,216 +0,0 @@
|
|
1
|
-
# Changelog
|
2
|
-
|
3
|
-
## [4.2.0](https://github.com/gravity-ui/blog-constructor/compare/v4.1.2...v4.2.0) (2023-06-28)
|
4
|
-
|
5
|
-
|
6
|
-
### Features
|
7
|
-
|
8
|
-
* update page constructor version ([#73](https://github.com/gravity-ui/blog-constructor/issues/73)) ([2d46b27](https://github.com/gravity-ui/blog-constructor/commit/2d46b27c1e2550ebaa9da4c2eb7a873cdda66ca6))
|
9
|
-
|
10
|
-
## [4.1.2](https://github.com/gravity-ui/blog-constructor/compare/v4.1.1...v4.1.2) (2023-06-23)
|
11
|
-
|
12
|
-
|
13
|
-
### Bug Fixes
|
14
|
-
|
15
|
-
* semantic markup ([#71](https://github.com/gravity-ui/blog-constructor/issues/71)) ([fb18afd](https://github.com/gravity-ui/blog-constructor/commit/fb18afd3d38d2bdb81b71e83608f54b90874f9e1))
|
16
|
-
|
17
|
-
## [4.1.1](https://github.com/gravity-ui/blog-constructor/compare/v4.1.0...v4.1.1) (2023-06-14)
|
18
|
-
|
19
|
-
|
20
|
-
### Bug Fixes
|
21
|
-
|
22
|
-
* fix react peer ([#69](https://github.com/gravity-ui/blog-constructor/issues/69)) ([26cf1b1](https://github.com/gravity-ui/blog-constructor/commit/26cf1b1df1d49455b764841c6b3065dc7f64858d))
|
23
|
-
|
24
|
-
## [4.1.0](https://github.com/gravity-ui/blog-constructor/compare/v4.0.0...v4.1.0) (2023-06-08)
|
25
|
-
|
26
|
-
|
27
|
-
### Features
|
28
|
-
|
29
|
-
* Prompt Sign In on Post Like ([#57](https://github.com/gravity-ui/blog-constructor/issues/57)) ([216cd9b](https://github.com/gravity-ui/blog-constructor/commit/216cd9b1accab047a46d7404f007623f56f1590e))
|
30
|
-
|
31
|
-
|
32
|
-
### Bug Fixes
|
33
|
-
|
34
|
-
* update peer ([#67](https://github.com/gravity-ui/blog-constructor/issues/67)) ([da2cbac](https://github.com/gravity-ui/blog-constructor/commit/da2cbac4d02017c4d3f9ff49108ba163b9a7867b))
|
35
|
-
|
36
|
-
## [4.0.0](https://github.com/gravity-ui/blog-constructor/compare/v3.5.0...v4.0.0) (2023-06-07)
|
37
|
-
|
38
|
-
|
39
|
-
### ⚠ BREAKING CHANGES
|
40
|
-
|
41
|
-
* install page-constructor@3 and refactor transform content ([#54](https://github.com/gravity-ui/blog-constructor/issues/54)) (#60)
|
42
|
-
|
43
|
-
### Features
|
44
|
-
|
45
|
-
* install page-constructor@3 and refactor transform content ([#54](https://github.com/gravity-ui/blog-constructor/issues/54)) ([#60](https://github.com/gravity-ui/blog-constructor/issues/60)) ([26bf452](https://github.com/gravity-ui/blog-constructor/commit/26bf452419f9c01bd0e550fa857715665fe38cd2))
|
46
|
-
|
47
|
-
## [3.5.0](https://github.com/gravity-ui/blog-constructor/compare/v3.4.1...v3.5.0) (2023-06-07)
|
48
|
-
|
49
|
-
|
50
|
-
### Features
|
51
|
-
|
52
|
-
* update page-constructor in second major ([#63](https://github.com/gravity-ui/blog-constructor/issues/63)) ([95d2fb8](https://github.com/gravity-ui/blog-constructor/commit/95d2fb88a13e4371bc4d6e603a3835790f1ffb4f))
|
53
|
-
|
54
|
-
## [3.4.1](https://github.com/gravity-ui/blog-constructor/compare/v3.4.0...v3.4.1) (2023-05-30)
|
55
|
-
|
56
|
-
|
57
|
-
### Bug Fixes
|
58
|
-
|
59
|
-
* return js, jsx files to gulpfile.js ([#58](https://github.com/gravity-ui/blog-constructor/issues/58)) ([d5e4c42](https://github.com/gravity-ui/blog-constructor/commit/d5e4c428e8eae56fd7ab381c2969c04955adc45b))
|
60
|
-
|
61
|
-
## [3.4.0](https://github.com/gravity-ui/blog-constructor/compare/v3.3.0...v3.4.0) (2023-05-24)
|
62
|
-
|
63
|
-
|
64
|
-
### Features
|
65
|
-
|
66
|
-
* new loading UI (shimmer) ([#50](https://github.com/gravity-ui/blog-constructor/issues/50)) ([ccdf08c](https://github.com/gravity-ui/blog-constructor/commit/ccdf08ccc62dd9930ab8c994601c787b03897f05))
|
67
|
-
|
68
|
-
## [3.3.0](https://github.com/gravity-ui/blog-constructor/compare/v3.2.1...v3.3.0) (2023-05-16)
|
69
|
-
|
70
|
-
|
71
|
-
### Features
|
72
|
-
|
73
|
-
* add md breackpoint to cta-block ([#45](https://github.com/gravity-ui/blog-constructor/issues/45)) ([e859b0b](https://github.com/gravity-ui/blog-constructor/commit/e859b0b02e80b20eb0b4496e2c4834fb2de74922))
|
74
|
-
|
75
|
-
## [3.2.1](https://github.com/gravity-ui/blog-constructor/compare/v3.2.0...v3.2.1) (2023-05-16)
|
76
|
-
|
77
|
-
|
78
|
-
### Bug Fixes
|
79
|
-
|
80
|
-
* add settings context to add a tag for pagination ([#47](https://github.com/gravity-ui/blog-constructor/issues/47)) ([0856675](https://github.com/gravity-ui/blog-constructor/commit/0856675316425c9a690664a99d30d2af63e116ca))
|
81
|
-
|
82
|
-
## [3.2.0](https://github.com/gravity-ui/blog-constructor/compare/v3.1.1...v3.2.0) (2023-05-15)
|
83
|
-
|
84
|
-
|
85
|
-
### Features
|
86
|
-
|
87
|
-
* create schemas ([#41](https://github.com/gravity-ui/blog-constructor/issues/41)) ([f4f28f3](https://github.com/gravity-ui/blog-constructor/commit/f4f28f367db6d18588602d734623863ccfea1a01))
|
88
|
-
|
89
|
-
## [3.1.1](https://github.com/gravity-ui/blog-constructor/compare/v3.1.0...v3.1.1) (2023-05-11)
|
90
|
-
|
91
|
-
|
92
|
-
### Bug Fixes
|
93
|
-
|
94
|
-
* add specificity to headings ([#43](https://github.com/gravity-ui/blog-constructor/issues/43)) ([de53d0b](https://github.com/gravity-ui/blog-constructor/commit/de53d0bb9a697f520626e8c0b1d8c48c8e4d8a64))
|
95
|
-
* change href 'prev' to 'blog' and 'next' to page+1 ([#42](https://github.com/gravity-ui/blog-constructor/issues/42)) ([cb8b810](https://github.com/gravity-ui/blog-constructor/commit/cb8b8102d59368cfa0d285d63604a8e9f1ab6619))
|
96
|
-
|
97
|
-
## [3.1.0](https://github.com/gravity-ui/blog-constructor/compare/v3.0.2...v3.1.0) (2023-04-25)
|
98
|
-
|
99
|
-
|
100
|
-
### Features
|
101
|
-
|
102
|
-
* remove user context ([#35](https://github.com/gravity-ui/blog-constructor/issues/35)) ([36e7112](https://github.com/gravity-ui/blog-constructor/commit/36e71123b515886f28722b08552d538b8f038a87))
|
103
|
-
|
104
|
-
## [3.0.2](https://github.com/gravity-ui/blog-constructor/compare/v3.0.1...v3.0.2) (2023-04-25)
|
105
|
-
|
106
|
-
|
107
|
-
### Bug Fixes
|
108
|
-
|
109
|
-
* dump other queries when toggle savedOnly button ([#37](https://github.com/gravity-ui/blog-constructor/issues/37)) ([57ca01a](https://github.com/gravity-ui/blog-constructor/commit/57ca01a35736d7bd94711ed70887e7eb8cbaf0f4))
|
110
|
-
|
111
|
-
## [3.0.1](https://github.com/gravity-ui/blog-constructor/compare/v3.0.0...v3.0.1) (2023-04-24)
|
112
|
-
|
113
|
-
|
114
|
-
### Bug Fixes
|
115
|
-
|
116
|
-
* rewrap pagination item ([#36](https://github.com/gravity-ui/blog-constructor/issues/36)) ([a3a56b2](https://github.com/gravity-ui/blog-constructor/commit/a3a56b2d4519871427de1e42267ce18736f7f7b1))
|
117
|
-
|
118
|
-
## [3.0.0](https://github.com/gravity-ui/blog-constructor/compare/v2.3.0...v3.0.0) (2023-04-10)
|
119
|
-
|
120
|
-
|
121
|
-
### ⚠ BREAKING CHANGES
|
122
|
-
|
123
|
-
* add callback prop for blog page ([#25](https://github.com/gravity-ui/blog-constructor/issues/25))
|
124
|
-
|
125
|
-
### Features
|
126
|
-
|
127
|
-
* add callback prop for blog page ([#25](https://github.com/gravity-ui/blog-constructor/issues/25)) ([7b1ab2c](https://github.com/gravity-ui/blog-constructor/commit/7b1ab2c12aa9ef4f8e5a11853508a9b439a196d7))
|
128
|
-
|
129
|
-
## [2.3.0](https://github.com/gravity-ui/blog-constructor/compare/v2.2.0...v2.3.0) (2023-04-10)
|
130
|
-
|
131
|
-
|
132
|
-
### Features
|
133
|
-
|
134
|
-
* analytics refactoring ([#13](https://github.com/gravity-ui/blog-constructor/issues/13)) ([a95c55b](https://github.com/gravity-ui/blog-constructor/commit/a95c55bd1ff98f86a110f33ac3275b590ee5db8e))
|
135
|
-
|
136
|
-
|
137
|
-
### Bug Fixes
|
138
|
-
|
139
|
-
* margin-top of header ([#31](https://github.com/gravity-ui/blog-constructor/issues/31)) ([97ed974](https://github.com/gravity-ui/blog-constructor/commit/97ed974ab0ce0546010d60587b21b8c0eee3279c))
|
140
|
-
|
141
|
-
## [2.2.0](https://github.com/gravity-ui/blog-constructor/compare/v2.1.0...v2.2.0) (2023-04-06)
|
142
|
-
|
143
|
-
|
144
|
-
### Features
|
145
|
-
|
146
|
-
* update linters ([#24](https://github.com/gravity-ui/blog-constructor/issues/24)) ([bc5aa0f](https://github.com/gravity-ui/blog-constructor/commit/bc5aa0f72e64b916acaf692874482ccdae3f94e9))
|
147
|
-
|
148
|
-
## [2.1.0](https://github.com/gravity-ui/blog-constructor/compare/v2.0.2...v2.1.0) (2023-04-06)
|
149
|
-
|
150
|
-
|
151
|
-
### Features
|
152
|
-
|
153
|
-
* 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))
|
154
|
-
|
155
|
-
## [2.0.2](https://github.com/gravity-ui/blog-constructor/compare/v2.0.1...v2.0.2) (2023-04-05)
|
156
|
-
|
157
|
-
|
158
|
-
### Bug Fixes
|
159
|
-
|
160
|
-
* covering pagination buttons into 'a' tag ([#23](https://github.com/gravity-ui/blog-constructor/issues/23)) ([e603f2e](https://github.com/gravity-ui/blog-constructor/commit/e603f2e2b0f86d492132174a1c8172786e7a09a1))
|
161
|
-
|
162
|
-
## [2.0.1](https://github.com/gravity-ui/blog-constructor/compare/v2.0.0...v2.0.1) (2023-04-04)
|
163
|
-
|
164
|
-
|
165
|
-
### Bug Fixes
|
166
|
-
|
167
|
-
* throw virtualization threshold prop in Select ([#26](https://github.com/gravity-ui/blog-constructor/issues/26)) ([ccb0f19](https://github.com/gravity-ui/blog-constructor/commit/ccb0f19a904e54fd43ca66195da9e94925d0a26f))
|
168
|
-
* throw virtualization threshold prop in Select ([#26](https://github.com/gravity-ui/blog-constructor/issues/26)) ([0aa5aed](https://github.com/gravity-ui/blog-constructor/commit/0aa5aeda9a0afd99ae8590c6b666c033a12b7fba))
|
169
|
-
|
170
|
-
## [2.0.0](https://github.com/gravity-ui/blog-constructor/compare/v1.1.2...v2.0.0) (2023-04-03)
|
171
|
-
|
172
|
-
|
173
|
-
### ⚠ BREAKING CHANGES
|
174
|
-
|
175
|
-
* update uikit up to 4 ([#11](https://github.com/gravity-ui/blog-constructor/issues/11))
|
176
|
-
|
177
|
-
### Features
|
178
|
-
|
179
|
-
* update uikit up to 4 ([#11](https://github.com/gravity-ui/blog-constructor/issues/11)) ([5d6f3d5](https://github.com/gravity-ui/blog-constructor/commit/5d6f3d51daf111a240871dbad721bbdd250d6b46))
|
180
|
-
|
181
|
-
## [1.1.2](https://github.com/gravity-ui/blog-constructor/compare/v1.1.1...v1.1.2) (2023-03-28)
|
182
|
-
|
183
|
-
|
184
|
-
### Bug Fixes
|
185
|
-
|
186
|
-
* add info about release ([#19](https://github.com/gravity-ui/blog-constructor/issues/19)) ([8a5824f](https://github.com/gravity-ui/blog-constructor/commit/8a5824f24c4ad85f0f122111f8f5c1e7c36becc5))
|
187
|
-
|
188
|
-
## [1.1.1](https://github.com/gravity-ui/blog-constructor/compare/v1.1.0...v1.1.1) (2023-03-28)
|
189
|
-
|
190
|
-
|
191
|
-
### Bug Fixes
|
192
|
-
|
193
|
-
* add info about ci in readme ([#17](https://github.com/gravity-ui/blog-constructor/issues/17)) ([b6cffaa](https://github.com/gravity-ui/blog-constructor/commit/b6cffaa1c255c53cd00d06d4fbe0330e117f42a0))
|
194
|
-
|
195
|
-
## 1.1.0 (2023-03-28)
|
196
|
-
|
197
|
-
### Features
|
198
|
-
|
199
|
-
- add workflows, update @types/react, small refactors, update Select ([#2](https://github.com/gravity-ui/blog-constructor/issues/2)) ([326247a](https://github.com/gravity-ui/blog-constructor/commit/326247abe9411b50c82ed2cfa516ac6cd341bfa7))
|
200
|
-
- Brush up stories, add content for CTA, Layout, Feed blocks. ([#4](https://github.com/gravity-ui/blog-constructor/issues/4)) ([0b73537](https://github.com/gravity-ui/blog-constructor/commit/0b73537b3bae35eca10610963369f3f5d8f9ecbd))
|
201
|
-
- export author type ([9e5ee34](https://github.com/gravity-ui/blog-constructor/commit/9e5ee34c6b4d1b3288cda1258160e22073f9ad9d))
|
202
|
-
- fix button savedOnly color ([#9](https://github.com/gravity-ui/blog-constructor/issues/9)) ([ef3b1ca](https://github.com/gravity-ui/blog-constructor/commit/ef3b1ca9048f1218817ec5c9c6a5b3e05492f062))
|
203
|
-
- init tests ([#1](https://github.com/gravity-ui/blog-constructor/issues/1)) ([f8df32f](https://github.com/gravity-ui/blog-constructor/commit/f8df32f3eccb97abc7bfef222aca1ea56421619b))
|
204
|
-
- **navigation:** pass the PageConstructor's navigation prop ([cb875ff](https://github.com/gravity-ui/blog-constructor/commit/cb875ff708832f5dd9e121d67cfccb387ae2499f))
|
205
|
-
- uninstall doctools/components ([#14](https://github.com/gravity-ui/blog-constructor/issues/14)) ([16dc64c](https://github.com/gravity-ui/blog-constructor/commit/16dc64c3002b614831880dbe5b250c5637031c7d))
|
206
|
-
- update license ([#3](https://github.com/gravity-ui/blog-constructor/issues/3)) ([aa4ee5b](https://github.com/gravity-ui/blog-constructor/commit/aa4ee5bdd01a7db5f6c6c457836658761eee1099))
|
207
|
-
- update readme ([#15](https://github.com/gravity-ui/blog-constructor/issues/15)) ([3dbdf78](https://github.com/gravity-ui/blog-constructor/commit/3dbdf78b35f93024bebbcf64a6f06fb01509ae3e))
|
208
|
-
|
209
|
-
### Bug Fixes
|
210
|
-
|
211
|
-
- **general:** better deps ([8c22384](https://github.com/gravity-ui/blog-constructor/commit/8c223848e47faf8b9beee6700afce317359ee226))
|
212
|
-
- search input width ([051c145](https://github.com/gravity-ui/blog-constructor/commit/051c14502110306964c4ec9a2bea47cea9364db5))
|
213
|
-
|
214
|
-
## 1.0.0
|
215
|
-
|
216
|
-
Create public access for blog-constructor library for creating blog format web pages.
|