@gravity-ui/blog-constructor 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +7 -0
- package/README.md +2 -0
- package/build/cjs/components/Paginator/Paginator.css +2 -0
- package/build/cjs/components/Paginator/components/PaginatorItem.js +2 -2
- package/build/cjs/contexts/UserContext.d.ts +2 -14
- package/build/esm/components/Paginator/Paginator.css +2 -0
- package/build/esm/components/Paginator/components/PaginatorItem.js +2 -2
- package/build/esm/contexts/UserContext.d.ts +2 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [3.0.1](https://github.com/gravity-ui/blog-constructor/compare/v3.0.0...v3.0.1) (2023-04-24)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* rewrap pagination item ([#36](https://github.com/gravity-ui/blog-constructor/issues/36)) ([a3a56b2](https://github.com/gravity-ui/blog-constructor/commit/a3a56b2d4519871427de1e42267ce18736f7f7b1))
|
9
|
+
|
3
10
|
## [3.0.0](https://github.com/gravity-ui/blog-constructor/compare/v2.3.0...v3.0.0) (2023-04-10)
|
4
11
|
|
5
12
|
|
package/README.md
CHANGED
@@ -47,6 +47,8 @@ import {BlogPostPage, BlogConstructorProvider} from '@gravity-ui/blog-constructo
|
|
47
47
|
|
48
48
|
```
|
49
49
|
|
50
|
+
Documentation about [providerProps](./src/constructor/README.md).
|
51
|
+
|
50
52
|
Also blog-constructor have server components to help you transform your data if you need
|
51
53
|
|
52
54
|
```jsx
|
@@ -36,7 +36,7 @@ const PaginatorItem = ({ dataKey, mods, content, onClick, loading = false, }) =>
|
|
36
36
|
const itemKey = Number(dataKey) > 0 ? Number(dataKey) : dataKey;
|
37
37
|
const navTag = itemKey > 0 ? `${mods.type || 'page'}=${itemKey}` : itemKey;
|
38
38
|
const navigationLink = `${urlPath || ''}?${navTag}`;
|
39
|
-
return (react_1.default.createElement(
|
40
|
-
react_1.default.createElement(
|
39
|
+
return (react_1.default.createElement(uikit_1.Button, { view: "flat", size: "xl", className: b('item', mods), onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(itemKey), loading: loading && Boolean(mods.active) },
|
40
|
+
react_1.default.createElement("a", { href: navigationLink, className: b('link'), onClick: (event) => event.preventDefault() }, content)));
|
41
41
|
};
|
42
42
|
exports.PaginatorItem = PaginatorItem;
|
@@ -1,18 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
export interface UserAccount {
|
3
3
|
uid: string;
|
4
|
-
login: string;
|
5
|
-
avatarId: string;
|
6
|
-
displayName?: string;
|
7
|
-
lang?: string;
|
8
|
-
hasStaffLogin?: boolean;
|
9
4
|
}
|
10
|
-
export
|
11
|
-
|
12
|
-
passportHost: string;
|
13
|
-
avatarHost: string;
|
14
|
-
status: string;
|
15
|
-
yandexuid: string;
|
16
|
-
}
|
17
|
-
export type UserContextProps = Partial<User>;
|
18
|
-
export declare const UserContext: React.Context<Partial<User>>;
|
5
|
+
export type UserContextProps = Partial<UserAccount>;
|
6
|
+
export declare const UserContext: React.Context<Partial<UserAccount>>;
|
@@ -11,6 +11,6 @@ export const PaginatorItem = ({ dataKey, mods, content, onClick, loading = false
|
|
11
11
|
const itemKey = Number(dataKey) > 0 ? Number(dataKey) : dataKey;
|
12
12
|
const navTag = itemKey > 0 ? `${mods.type || 'page'}=${itemKey}` : itemKey;
|
13
13
|
const navigationLink = `${urlPath || ''}?${navTag}`;
|
14
|
-
return (React.createElement(
|
15
|
-
React.createElement(
|
14
|
+
return (React.createElement(Button, { view: "flat", size: "xl", className: b('item', mods), onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(itemKey), loading: loading && Boolean(mods.active) },
|
15
|
+
React.createElement("a", { href: navigationLink, className: b('link'), onClick: (event) => event.preventDefault() }, content)));
|
16
16
|
};
|
@@ -1,18 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
export interface UserAccount {
|
3
3
|
uid: string;
|
4
|
-
login: string;
|
5
|
-
avatarId: string;
|
6
|
-
displayName?: string;
|
7
|
-
lang?: string;
|
8
|
-
hasStaffLogin?: boolean;
|
9
4
|
}
|
10
|
-
export
|
11
|
-
|
12
|
-
passportHost: string;
|
13
|
-
avatarHost: string;
|
14
|
-
status: string;
|
15
|
-
yandexuid: string;
|
16
|
-
}
|
17
|
-
export type UserContextProps = Partial<User>;
|
18
|
-
export declare const UserContext: React.Context<Partial<User>>;
|
5
|
+
export type UserContextProps = Partial<UserAccount>;
|
6
|
+
export declare const UserContext: React.Context<Partial<UserAccount>>;
|