@gravity-ui/dashkit 5.4.0 → 5.5.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 +7 -0
- package/build/cjs/typings/common.d.ts +2 -6
- package/build/cjs/typings/plugin.d.ts +2 -2
- package/build/cjs/utils/register-manager.d.ts +2 -17
- package/build/esm/typings/common.d.ts +2 -6
- package/build/esm/typings/plugin.d.ts +2 -2
- package/build/esm/utils/register-manager.d.ts +2 -17
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.5.0](https://github.com/gravity-ui/dashkit/compare/v5.4.0...v5.5.0) (2023-04-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* support all props from react-grid-layout ([#54](https://github.com/gravity-ui/dashkit/issues/54)) ([7e3d316](https://github.com/gravity-ui/dashkit/commit/7e3d316a4cc0fbbf24a23f52408c4fa10f69a4b5))
|
|
9
|
+
|
|
3
10
|
## [5.4.0](https://github.com/gravity-ui/dashkit/compare/v5.3.0...v5.4.0) (2023-04-13)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { OverlayCustomControlItem } from '../components/OverlayControls/OverlayControls';
|
|
2
2
|
import { MenuItems } from '../constants';
|
|
3
|
+
import type { ReactGridLayoutProps } from 'react-grid-layout';
|
|
3
4
|
export interface Settings {
|
|
4
|
-
gridLayout?:
|
|
5
|
-
margin?: [number, number];
|
|
6
|
-
rowHeight?: number;
|
|
7
|
-
cols?: number;
|
|
8
|
-
containerPadding?: [number, number];
|
|
9
|
-
};
|
|
5
|
+
gridLayout?: ReactGridLayoutProps;
|
|
10
6
|
theme?: string;
|
|
11
7
|
isMobile?: boolean;
|
|
12
8
|
menu?: Array<MenuItem>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ContextProps, SettingsProps, WidgetLayout } from './common';
|
|
3
3
|
import { StringParams, ConfigItem, ItemState, ItemStateAndParams, PluginBase } from '../shared';
|
|
4
|
-
import {
|
|
4
|
+
import type { ReactGridLayoutProps } from 'react-grid-layout';
|
|
5
5
|
export interface PluginWidgetProps {
|
|
6
6
|
id: string;
|
|
7
7
|
editMode: boolean;
|
|
@@ -16,7 +16,7 @@ export interface PluginWidgetProps {
|
|
|
16
16
|
settings: SettingsProps;
|
|
17
17
|
context: ContextProps;
|
|
18
18
|
layout: WidgetLayout[];
|
|
19
|
-
gridLayout:
|
|
19
|
+
gridLayout: ReactGridLayoutProps;
|
|
20
20
|
adjustWidgetLayout: (data: {
|
|
21
21
|
widgetId: string;
|
|
22
22
|
needSetDefault?: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Plugin, PluginDefaultLayout, Settings } from '../typings';
|
|
2
|
+
import type { ReactGridLayoutProps } from 'react-grid-layout';
|
|
2
3
|
interface RegisterManagerDefaultLayout {
|
|
3
4
|
x: number;
|
|
4
5
|
y: number;
|
|
@@ -11,12 +12,6 @@ export type RegisterManagerPluginLayout = RegisterManagerDefaultLayout & PluginD
|
|
|
11
12
|
export interface RegisterManagerPlugin extends Omit<Plugin, 'defaultLayout'> {
|
|
12
13
|
defaultLayout: RegisterManagerDefaultLayout & Plugin['defaultLayout'];
|
|
13
14
|
}
|
|
14
|
-
export type RegisterManagerGridLayout = {
|
|
15
|
-
margin: [number, number];
|
|
16
|
-
rowHeight: number;
|
|
17
|
-
cols: number;
|
|
18
|
-
containerPadding: [number, number];
|
|
19
|
-
} & Settings['gridLayout'];
|
|
20
15
|
export type RegisterManagerSettings = {
|
|
21
16
|
theme: string;
|
|
22
17
|
} & Settings;
|
|
@@ -28,17 +23,7 @@ export declare class RegisterManager {
|
|
|
28
23
|
registerPlugin(plugin: Plugin): void;
|
|
29
24
|
setSettings(settings?: Settings): void;
|
|
30
25
|
get settings(): RegisterManagerSettings;
|
|
31
|
-
get gridLayout():
|
|
32
|
-
margin: [number, number];
|
|
33
|
-
rowHeight: number;
|
|
34
|
-
cols: number;
|
|
35
|
-
containerPadding: [number, number];
|
|
36
|
-
} & {
|
|
37
|
-
margin?: [number, number] | undefined;
|
|
38
|
-
rowHeight?: number | undefined;
|
|
39
|
-
cols?: number | undefined;
|
|
40
|
-
containerPadding?: [number, number] | undefined;
|
|
41
|
-
};
|
|
26
|
+
get gridLayout(): ReactGridLayoutProps;
|
|
42
27
|
getPlugins(): RegisterManagerPlugin[];
|
|
43
28
|
getItem(type: string): RegisterManagerPlugin;
|
|
44
29
|
check(type: string): boolean;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { OverlayCustomControlItem } from '../components/OverlayControls/OverlayControls';
|
|
2
2
|
import { MenuItems } from '../constants';
|
|
3
|
+
import type { ReactGridLayoutProps } from 'react-grid-layout';
|
|
3
4
|
export interface Settings {
|
|
4
|
-
gridLayout?:
|
|
5
|
-
margin?: [number, number];
|
|
6
|
-
rowHeight?: number;
|
|
7
|
-
cols?: number;
|
|
8
|
-
containerPadding?: [number, number];
|
|
9
|
-
};
|
|
5
|
+
gridLayout?: ReactGridLayoutProps;
|
|
10
6
|
theme?: string;
|
|
11
7
|
isMobile?: boolean;
|
|
12
8
|
menu?: Array<MenuItem>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ContextProps, SettingsProps, WidgetLayout } from './common';
|
|
3
3
|
import { StringParams, ConfigItem, ItemState, ItemStateAndParams, PluginBase } from '../shared';
|
|
4
|
-
import {
|
|
4
|
+
import type { ReactGridLayoutProps } from 'react-grid-layout';
|
|
5
5
|
export interface PluginWidgetProps {
|
|
6
6
|
id: string;
|
|
7
7
|
editMode: boolean;
|
|
@@ -16,7 +16,7 @@ export interface PluginWidgetProps {
|
|
|
16
16
|
settings: SettingsProps;
|
|
17
17
|
context: ContextProps;
|
|
18
18
|
layout: WidgetLayout[];
|
|
19
|
-
gridLayout:
|
|
19
|
+
gridLayout: ReactGridLayoutProps;
|
|
20
20
|
adjustWidgetLayout: (data: {
|
|
21
21
|
widgetId: string;
|
|
22
22
|
needSetDefault?: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Plugin, PluginDefaultLayout, Settings } from '../typings';
|
|
2
|
+
import type { ReactGridLayoutProps } from 'react-grid-layout';
|
|
2
3
|
interface RegisterManagerDefaultLayout {
|
|
3
4
|
x: number;
|
|
4
5
|
y: number;
|
|
@@ -11,12 +12,6 @@ export type RegisterManagerPluginLayout = RegisterManagerDefaultLayout & PluginD
|
|
|
11
12
|
export interface RegisterManagerPlugin extends Omit<Plugin, 'defaultLayout'> {
|
|
12
13
|
defaultLayout: RegisterManagerDefaultLayout & Plugin['defaultLayout'];
|
|
13
14
|
}
|
|
14
|
-
export type RegisterManagerGridLayout = {
|
|
15
|
-
margin: [number, number];
|
|
16
|
-
rowHeight: number;
|
|
17
|
-
cols: number;
|
|
18
|
-
containerPadding: [number, number];
|
|
19
|
-
} & Settings['gridLayout'];
|
|
20
15
|
export type RegisterManagerSettings = {
|
|
21
16
|
theme: string;
|
|
22
17
|
} & Settings;
|
|
@@ -28,17 +23,7 @@ export declare class RegisterManager {
|
|
|
28
23
|
registerPlugin(plugin: Plugin): void;
|
|
29
24
|
setSettings(settings?: Settings): void;
|
|
30
25
|
get settings(): RegisterManagerSettings;
|
|
31
|
-
get gridLayout():
|
|
32
|
-
margin: [number, number];
|
|
33
|
-
rowHeight: number;
|
|
34
|
-
cols: number;
|
|
35
|
-
containerPadding: [number, number];
|
|
36
|
-
} & {
|
|
37
|
-
margin?: [number, number] | undefined;
|
|
38
|
-
rowHeight?: number | undefined;
|
|
39
|
-
cols?: number | undefined;
|
|
40
|
-
containerPadding?: [number, number] | undefined;
|
|
41
|
-
};
|
|
26
|
+
get gridLayout(): ReactGridLayoutProps;
|
|
42
27
|
getPlugins(): RegisterManagerPlugin[];
|
|
43
28
|
getItem(type: string): RegisterManagerPlugin;
|
|
44
29
|
check(type: string): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/dashkit",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"description": "Library for rendering dashboard grid layout",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"@types/jest": "^26.0.20",
|
|
61
61
|
"@types/lodash": "^4.14.170",
|
|
62
62
|
"@types/react": "^18.0.27",
|
|
63
|
+
"@types/react-grid-layout": "^1.3.2",
|
|
63
64
|
"babel-jest": "^26.6.3",
|
|
64
65
|
"bem-cn-lite": "^4.0.0",
|
|
65
66
|
"copyfiles": "^2.4.1",
|