@gravity-ui/page-constructor 1.20.0 → 1.20.1
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 +7 -0
- package/build/cjs/models/navigation.d.ts +3 -9
- package/build/cjs/models/navigation.js +0 -1
- package/build/cjs/navigation/components/NavigationItem/NavigationItem.js +1 -4
- package/build/esm/models/navigation.d.ts +3 -9
- package/build/esm/models/navigation.js +0 -1
- package/build/esm/navigation/components/NavigationItem/NavigationItem.js +1 -4
- package/package.json +1 -2
- package/server/models/navigation.d.ts +3 -9
- package/server/models/navigation.js +0 -1
- package/build/cjs/navigation/components/NavigationItem/components/GithubStars/GithubStars.css +0 -14
- package/build/cjs/navigation/components/NavigationItem/components/GithubStars/GithubStars.d.ts +0 -5
- package/build/cjs/navigation/components/NavigationItem/components/GithubStars/GithubStars.js +0 -11
- package/build/esm/navigation/components/NavigationItem/components/GithubStars/GithubStars.css +0 -14
- package/build/esm/navigation/components/NavigationItem/components/GithubStars/GithubStars.d.ts +0 -6
- package/build/esm/navigation/components/NavigationItem/components/GithubStars/GithubStars.js +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.20.1](https://github.com/gravity-ui/page-constructor/compare/v1.20.0...v1.20.1) (2023-03-01)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* uninstall react-github-btn because is hot support cjs ([#188](https://github.com/gravity-ui/page-constructor/issues/188)) ([e32a51a](https://github.com/gravity-ui/page-constructor/commit/e32a51ae17a31dea8037a89a30f4b080e2aacb2e))
|
|
9
|
+
|
|
3
10
|
## [1.20.0](https://github.com/gravity-ui/page-constructor/compare/v1.19.1...v1.20.0) (2023-03-01)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -4,19 +4,13 @@ export declare enum NavigationItemType {
|
|
|
4
4
|
Link = "link",
|
|
5
5
|
Dropdown = "dropdown",
|
|
6
6
|
Button = "button",
|
|
7
|
-
Social = "social"
|
|
8
|
-
GithubStars = "github-stars"
|
|
7
|
+
Social = "social"
|
|
9
8
|
}
|
|
10
9
|
export interface NavigationItemBase {
|
|
11
10
|
text: string;
|
|
12
11
|
icon?: ImageProps;
|
|
13
12
|
url?: string;
|
|
14
13
|
}
|
|
15
|
-
export interface NavigationGithubButton extends Omit<NavigationItemBase, 'icon'> {
|
|
16
|
-
type: NavigationItemType.GithubStars;
|
|
17
|
-
url: string;
|
|
18
|
-
label?: string;
|
|
19
|
-
}
|
|
20
14
|
export interface NavigationLinkItem extends Omit<NavigationItemBase, 'url'> {
|
|
21
15
|
type: NavigationItemType.Link;
|
|
22
16
|
url: string;
|
|
@@ -35,8 +29,8 @@ export interface NavigationSocialItem extends Omit<NavigationItemBase, 'text'> {
|
|
|
35
29
|
icon: ImageProps;
|
|
36
30
|
url: string;
|
|
37
31
|
}
|
|
38
|
-
export type NavigationItemModel = NavigationLinkItem | NavigationButtonItem | NavigationDropdownItem
|
|
39
|
-
export type NavigationItemData = NavigationLinkItem | NavigationButtonItem | NavigationSocialItem | DropdownItemData
|
|
32
|
+
export type NavigationItemModel = NavigationLinkItem | NavigationButtonItem | NavigationDropdownItem;
|
|
33
|
+
export type NavigationItemData = NavigationLinkItem | NavigationButtonItem | NavigationSocialItem | DropdownItemData;
|
|
40
34
|
export type DropdownItemData = Omit<NavigationDropdownItem, 'items'>;
|
|
41
35
|
export interface NavigationLogoData {
|
|
42
36
|
icon: ImageProps;
|
|
@@ -7,5 +7,4 @@ var NavigationItemType;
|
|
|
7
7
|
NavigationItemType["Dropdown"] = "dropdown";
|
|
8
8
|
NavigationItemType["Button"] = "button";
|
|
9
9
|
NavigationItemType["Social"] = "social";
|
|
10
|
-
NavigationItemType["GithubStars"] = "github-stars";
|
|
11
10
|
})(NavigationItemType = exports.NavigationItemType || (exports.NavigationItemType = {}));
|
|
@@ -8,7 +8,6 @@ const blockIdContext_1 = require("../../../context/blockIdContext");
|
|
|
8
8
|
const NavigationButton_1 = require("./components/NavigationButton/NavigationButton");
|
|
9
9
|
const NavigationDropdown_1 = require("./components/NavigationDropdown/NavigationDropdown");
|
|
10
10
|
const NavigationLink_1 = require("./components/NavigationLink/NavigationLink");
|
|
11
|
-
const GithubStars_1 = require("./components/GithubStars/GithubStars");
|
|
12
11
|
const ANALYTICS_ID = 'navigation';
|
|
13
12
|
//todo: add types support form component in map
|
|
14
13
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -17,7 +16,6 @@ const NavigationItemsMap = {
|
|
|
17
16
|
[models_1.NavigationItemType.Social]: SocialIcon_1.default,
|
|
18
17
|
[models_1.NavigationItemType.Dropdown]: NavigationDropdown_1.NavigationDropdown,
|
|
19
18
|
[models_1.NavigationItemType.Link]: NavigationLink_1.NavigationLink,
|
|
20
|
-
[models_1.NavigationItemType.GithubStars]: GithubStars_1.GithubStars,
|
|
21
19
|
};
|
|
22
20
|
const NavigationItem = (_a) => {
|
|
23
21
|
var { data, className } = _a, props = tslib_1.__rest(_a, ["data", "className"]);
|
|
@@ -25,7 +23,6 @@ const NavigationItem = (_a) => {
|
|
|
25
23
|
const Component = NavigationItemsMap[type];
|
|
26
24
|
const componentProps = (0, react_1.useMemo)(() => (Object.assign(Object.assign({ className }, data), props)), [className, data, props]);
|
|
27
25
|
return (react_1.default.createElement(blockIdContext_1.BlockIdContext.Provider, { value: ANALYTICS_ID },
|
|
28
|
-
react_1.default.createElement(Component, Object.assign({}, componentProps))
|
|
29
|
-
";"));
|
|
26
|
+
react_1.default.createElement(Component, Object.assign({}, componentProps))));
|
|
30
27
|
};
|
|
31
28
|
exports.default = NavigationItem;
|
|
@@ -4,19 +4,13 @@ export declare enum NavigationItemType {
|
|
|
4
4
|
Link = "link",
|
|
5
5
|
Dropdown = "dropdown",
|
|
6
6
|
Button = "button",
|
|
7
|
-
Social = "social"
|
|
8
|
-
GithubStars = "github-stars"
|
|
7
|
+
Social = "social"
|
|
9
8
|
}
|
|
10
9
|
export interface NavigationItemBase {
|
|
11
10
|
text: string;
|
|
12
11
|
icon?: ImageProps;
|
|
13
12
|
url?: string;
|
|
14
13
|
}
|
|
15
|
-
export interface NavigationGithubButton extends Omit<NavigationItemBase, 'icon'> {
|
|
16
|
-
type: NavigationItemType.GithubStars;
|
|
17
|
-
url: string;
|
|
18
|
-
label?: string;
|
|
19
|
-
}
|
|
20
14
|
export interface NavigationLinkItem extends Omit<NavigationItemBase, 'url'> {
|
|
21
15
|
type: NavigationItemType.Link;
|
|
22
16
|
url: string;
|
|
@@ -35,8 +29,8 @@ export interface NavigationSocialItem extends Omit<NavigationItemBase, 'text'> {
|
|
|
35
29
|
icon: ImageProps;
|
|
36
30
|
url: string;
|
|
37
31
|
}
|
|
38
|
-
export type NavigationItemModel = NavigationLinkItem | NavigationButtonItem | NavigationDropdownItem
|
|
39
|
-
export type NavigationItemData = NavigationLinkItem | NavigationButtonItem | NavigationSocialItem | DropdownItemData
|
|
32
|
+
export type NavigationItemModel = NavigationLinkItem | NavigationButtonItem | NavigationDropdownItem;
|
|
33
|
+
export type NavigationItemData = NavigationLinkItem | NavigationButtonItem | NavigationSocialItem | DropdownItemData;
|
|
40
34
|
export type DropdownItemData = Omit<NavigationDropdownItem, 'items'>;
|
|
41
35
|
export interface NavigationLogoData {
|
|
42
36
|
icon: ImageProps;
|
|
@@ -6,7 +6,6 @@ import { BlockIdContext } from '../../../context/blockIdContext';
|
|
|
6
6
|
import { NavigationButton } from './components/NavigationButton/NavigationButton';
|
|
7
7
|
import { NavigationDropdown } from './components/NavigationDropdown/NavigationDropdown';
|
|
8
8
|
import { NavigationLink } from './components/NavigationLink/NavigationLink';
|
|
9
|
-
import { GithubStars } from './components/GithubStars/GithubStars';
|
|
10
9
|
const ANALYTICS_ID = 'navigation';
|
|
11
10
|
//todo: add types support form component in map
|
|
12
11
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -15,7 +14,6 @@ const NavigationItemsMap = {
|
|
|
15
14
|
[NavigationItemType.Social]: SocialIcon,
|
|
16
15
|
[NavigationItemType.Dropdown]: NavigationDropdown,
|
|
17
16
|
[NavigationItemType.Link]: NavigationLink,
|
|
18
|
-
[NavigationItemType.GithubStars]: GithubStars,
|
|
19
17
|
};
|
|
20
18
|
const NavigationItem = (_a) => {
|
|
21
19
|
var { data, className } = _a, props = __rest(_a, ["data", "className"]);
|
|
@@ -23,7 +21,6 @@ const NavigationItem = (_a) => {
|
|
|
23
21
|
const Component = NavigationItemsMap[type];
|
|
24
22
|
const componentProps = useMemo(() => (Object.assign(Object.assign({ className }, data), props)), [className, data, props]);
|
|
25
23
|
return (React.createElement(BlockIdContext.Provider, { value: ANALYTICS_ID },
|
|
26
|
-
React.createElement(Component, Object.assign({}, componentProps))
|
|
27
|
-
";"));
|
|
24
|
+
React.createElement(Component, Object.assign({}, componentProps))));
|
|
28
25
|
};
|
|
29
26
|
export default NavigationItem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/page-constructor",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.1",
|
|
4
4
|
"description": "Gravity UI Page Constructor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"@gravity-ui/i18n": "^1.0.0",
|
|
50
50
|
"bem-cn-lite": "^4.0.0",
|
|
51
51
|
"lodash": "^4.17.21",
|
|
52
|
-
"react-github-btn": "^1.4.0",
|
|
53
52
|
"react-player": "^2.9.0",
|
|
54
53
|
"react-slick": "^0.28.1",
|
|
55
54
|
"react-spring": "^9.3.0",
|
|
@@ -4,19 +4,13 @@ export declare enum NavigationItemType {
|
|
|
4
4
|
Link = "link",
|
|
5
5
|
Dropdown = "dropdown",
|
|
6
6
|
Button = "button",
|
|
7
|
-
Social = "social"
|
|
8
|
-
GithubStars = "github-stars"
|
|
7
|
+
Social = "social"
|
|
9
8
|
}
|
|
10
9
|
export interface NavigationItemBase {
|
|
11
10
|
text: string;
|
|
12
11
|
icon?: ImageProps;
|
|
13
12
|
url?: string;
|
|
14
13
|
}
|
|
15
|
-
export interface NavigationGithubButton extends Omit<NavigationItemBase, 'icon'> {
|
|
16
|
-
type: NavigationItemType.GithubStars;
|
|
17
|
-
url: string;
|
|
18
|
-
label?: string;
|
|
19
|
-
}
|
|
20
14
|
export interface NavigationLinkItem extends Omit<NavigationItemBase, 'url'> {
|
|
21
15
|
type: NavigationItemType.Link;
|
|
22
16
|
url: string;
|
|
@@ -35,8 +29,8 @@ export interface NavigationSocialItem extends Omit<NavigationItemBase, 'text'> {
|
|
|
35
29
|
icon: ImageProps;
|
|
36
30
|
url: string;
|
|
37
31
|
}
|
|
38
|
-
export type NavigationItemModel = NavigationLinkItem | NavigationButtonItem | NavigationDropdownItem
|
|
39
|
-
export type NavigationItemData = NavigationLinkItem | NavigationButtonItem | NavigationSocialItem | DropdownItemData
|
|
32
|
+
export type NavigationItemModel = NavigationLinkItem | NavigationButtonItem | NavigationDropdownItem;
|
|
33
|
+
export type NavigationItemData = NavigationLinkItem | NavigationButtonItem | NavigationSocialItem | DropdownItemData;
|
|
40
34
|
export type DropdownItemData = Omit<NavigationDropdownItem, 'items'>;
|
|
41
35
|
export interface NavigationLogoData {
|
|
42
36
|
icon: ImageProps;
|
|
@@ -7,5 +7,4 @@ var NavigationItemType;
|
|
|
7
7
|
NavigationItemType["Dropdown"] = "dropdown";
|
|
8
8
|
NavigationItemType["Button"] = "button";
|
|
9
9
|
NavigationItemType["Social"] = "social";
|
|
10
|
-
NavigationItemType["GithubStars"] = "github-stars";
|
|
11
10
|
})(NavigationItemType = exports.NavigationItemType || (exports.NavigationItemType = {}));
|
package/build/cjs/navigation/components/NavigationItem/components/GithubStars/GithubStars.css
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
.pc-github-stars {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
white-space: nowrap;
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
height: 100%;
|
|
9
|
-
}
|
|
10
|
-
.pc-github-stars span {
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
}
|
package/build/cjs/navigation/components/NavigationItem/components/GithubStars/GithubStars.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { NavigationItemProps } from '../../NavigationItem';
|
|
2
|
-
import { NavigationGithubButton } from '../../../../../models';
|
|
3
|
-
type NavigationGithubButtonProps = NavigationItemProps & NavigationGithubButton;
|
|
4
|
-
export declare const GithubStars: ({ text, url, className, label }: NavigationGithubButtonProps) => JSX.Element;
|
|
5
|
-
export {};
|
package/build/cjs/navigation/components/NavigationItem/components/GithubStars/GithubStars.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GithubStars = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const react_github_btn_1 = tslib_1.__importDefault(require("react-github-btn"));
|
|
7
|
-
const utils_1 = require("../../../../../utils");
|
|
8
|
-
const b = (0, utils_1.block)('github-stars');
|
|
9
|
-
const GithubStars = ({ text, url, className, label }) => (react_1.default.createElement("div", { className: b(null, className) },
|
|
10
|
-
react_1.default.createElement(react_github_btn_1.default, { href: url, "data-show-count": "true", "aria-label": label || 'Stars on GitHub' }, text)));
|
|
11
|
-
exports.GithubStars = GithubStars;
|
package/build/esm/navigation/components/NavigationItem/components/GithubStars/GithubStars.css
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
.pc-github-stars {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
white-space: nowrap;
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
height: 100%;
|
|
9
|
-
}
|
|
10
|
-
.pc-github-stars span {
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
}
|
package/build/esm/navigation/components/NavigationItem/components/GithubStars/GithubStars.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { NavigationItemProps } from '../../NavigationItem';
|
|
2
|
-
import { NavigationGithubButton } from '../../../../../models';
|
|
3
|
-
import './GithubStars.css';
|
|
4
|
-
type NavigationGithubButtonProps = NavigationItemProps & NavigationGithubButton;
|
|
5
|
-
export declare const GithubStars: ({ text, url, className, label }: NavigationGithubButtonProps) => JSX.Element;
|
|
6
|
-
export {};
|
package/build/esm/navigation/components/NavigationItem/components/GithubStars/GithubStars.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import GitHubButton from 'react-github-btn';
|
|
3
|
-
import { block } from '../../../../../utils';
|
|
4
|
-
import './GithubStars.css';
|
|
5
|
-
const b = block('github-stars');
|
|
6
|
-
export const GithubStars = ({ text, url, className, label }) => (React.createElement("div", { className: b(null, className) },
|
|
7
|
-
React.createElement(GitHubButton, { href: url, "data-show-count": "true", "aria-label": label || 'Stars on GitHub' }, text)));
|