@devtable/dashboard 4.8.0 → 4.9.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.
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
+ import { PanelModelInstance } from '~/model/views/view/panels';
2
3
  import { ViewModelInstance } from '..';
3
- import { IDashboardPanel } from '../types';
4
4
  export declare const FullScreenPanel: import("react").FunctionComponent<{
5
5
  view: ViewModelInstance;
6
- panel: IDashboardPanel;
6
+ panel: PanelModelInstance;
7
7
  exitFullScreen: () => void;
8
8
  }>;
@@ -1,7 +1,156 @@
1
- import { IDashboardPanel } from '../types';
2
- export declare function usePanelFullScreen(panels: IDashboardPanel[]): {
1
+ import { ViewModelInstance } from '..';
2
+ export declare function usePanelFullScreen(view: ViewModelInstance): {
3
3
  viewPanelInFullScreen: (id: string) => void;
4
4
  exitFullScreen: () => void;
5
5
  inFullScreen: boolean;
6
- fullScreenPanel: IDashboardPanel | undefined;
6
+ fullScreenPanel: ({
7
+ id: string;
8
+ title: string;
9
+ description: string;
10
+ layout: {
11
+ x: number;
12
+ y: number;
13
+ w: number;
14
+ h: number;
15
+ moved: boolean;
16
+ static: boolean;
17
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
18
+ readonly json: {
19
+ x: number;
20
+ y: number;
21
+ w: number;
22
+ h: number;
23
+ moved: boolean;
24
+ static: boolean;
25
+ };
26
+ } & {
27
+ set(layout: Omit<import("react-grid-layout").Layout, "i">): void;
28
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
29
+ x: import("mobx-state-tree").ISimpleType<number>;
30
+ y: import("mobx-state-tree").ISimpleType<number>;
31
+ w: import("mobx-state-tree").ISimpleType<number>;
32
+ h: import("mobx-state-tree").ISimpleType<number>;
33
+ moved: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
34
+ static: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
35
+ }, {
36
+ readonly json: {
37
+ x: number;
38
+ y: number;
39
+ w: number;
40
+ h: number;
41
+ moved: boolean;
42
+ static: boolean;
43
+ };
44
+ } & {
45
+ set(layout: Omit<import("react-grid-layout").Layout, "i">): void;
46
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
47
+ queryID: string;
48
+ viz: {
49
+ type: string;
50
+ conf: import("..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("..").AnyObject, import("..").AnyObject, import("..").AnyObject>>;
51
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
52
+ readonly json: {
53
+ type: string;
54
+ conf: import("..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("..").AnyObject, import("..").AnyObject, import("..").AnyObject>>;
55
+ };
56
+ } & {
57
+ setType(type: string): void;
58
+ setConf(conf: import("..").AnyObject): void;
59
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
60
+ type: import("mobx-state-tree").ISimpleType<string>;
61
+ conf: import("mobx-state-tree").IType<import("..").AnyObject, import("..").AnyObject, import("..").AnyObject>;
62
+ }, {
63
+ readonly json: {
64
+ type: string;
65
+ conf: import("..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("..").AnyObject, import("..").AnyObject, import("..").AnyObject>>;
66
+ };
67
+ } & {
68
+ setType(type: string): void;
69
+ setConf(conf: import("..").AnyObject): void;
70
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
71
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
72
+ readonly json: {
73
+ id: string;
74
+ title: string;
75
+ description: string;
76
+ layout: {
77
+ x: number;
78
+ y: number;
79
+ w: number;
80
+ h: number;
81
+ moved: boolean;
82
+ static: boolean;
83
+ };
84
+ queryID: string;
85
+ viz: {
86
+ type: string;
87
+ conf: import("..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("..").AnyObject, import("..").AnyObject, import("..").AnyObject>>;
88
+ };
89
+ };
90
+ } & {
91
+ setID(id: string): void;
92
+ setTitle(title: string): void;
93
+ setDescription(description: string): void;
94
+ setQueryID(queryID: string): void;
95
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
96
+ id: import("mobx-state-tree").ISimpleType<string>;
97
+ title: import("mobx-state-tree").ISimpleType<string>;
98
+ description: import("mobx-state-tree").ISimpleType<string>;
99
+ layout: import("mobx-state-tree").IModelType<{
100
+ x: import("mobx-state-tree").ISimpleType<number>;
101
+ y: import("mobx-state-tree").ISimpleType<number>;
102
+ w: import("mobx-state-tree").ISimpleType<number>;
103
+ h: import("mobx-state-tree").ISimpleType<number>;
104
+ moved: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
105
+ static: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
106
+ }, {
107
+ readonly json: {
108
+ x: number;
109
+ y: number;
110
+ w: number;
111
+ h: number;
112
+ moved: boolean;
113
+ static: boolean;
114
+ };
115
+ } & {
116
+ set(layout: Omit<import("react-grid-layout").Layout, "i">): void;
117
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
118
+ queryID: import("mobx-state-tree").ISimpleType<string>;
119
+ viz: import("mobx-state-tree").IModelType<{
120
+ type: import("mobx-state-tree").ISimpleType<string>;
121
+ conf: import("mobx-state-tree").IType<import("..").AnyObject, import("..").AnyObject, import("..").AnyObject>;
122
+ }, {
123
+ readonly json: {
124
+ type: string;
125
+ conf: import("..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("..").AnyObject, import("..").AnyObject, import("..").AnyObject>>;
126
+ };
127
+ } & {
128
+ setType(type: string): void;
129
+ setConf(conf: import("..").AnyObject): void;
130
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
131
+ }, {
132
+ readonly json: {
133
+ id: string;
134
+ title: string;
135
+ description: string;
136
+ layout: {
137
+ x: number;
138
+ y: number;
139
+ w: number;
140
+ h: number;
141
+ moved: boolean;
142
+ static: boolean;
143
+ };
144
+ queryID: string;
145
+ viz: {
146
+ type: string;
147
+ conf: import("..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("..").AnyObject, import("..").AnyObject, import("..").AnyObject>>;
148
+ };
149
+ };
150
+ } & {
151
+ setID(id: string): void;
152
+ setTitle(title: string): void;
153
+ setDescription(description: string): void;
154
+ setQueryID(queryID: string): void;
155
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | null | undefined;
7
156
  };
@@ -1,8 +1,9 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
+ import { PanelModelInstance } from '~/model/views/view/panels';
2
3
  import { ViewModelInstance } from '..';
3
- import { IDashboardPanel } from '../types/dashboard';
4
- interface IPanel extends IDashboardPanel {
4
+ interface IPanel {
5
5
  view: ViewModelInstance;
6
+ panel: PanelModelInstance;
6
7
  }
7
- export declare const Panel: React.FunctionComponent<IPanel>;
8
+ export declare const Panel: import("react").FunctionComponent<IPanel>;
8
9
  export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { ViewModelInstance } from '..';
3
+ export declare const PanelDropdownMenu: (({ view }: {
4
+ view: ViewModelInstance;
5
+ }) => JSX.Element) & {
6
+ displayName: string;
7
+ };
@@ -2,6 +2,6 @@ import React from 'react';
2
2
  import { IConfigComponentProps, IViewComponentProps } from '../plugins/viz-manager/components';
3
3
  import { IVizConfig } from '../types';
4
4
  export declare function PluginVizConfigComponent({ setVizConf, ...props }: IConfigComponentProps & {
5
- setVizConf: (val: React.SetStateAction<IVizConfig>) => void;
5
+ setVizConf: (val: React.SetStateAction<IVizConfig['conf']>) => void;
6
6
  }): JSX.Element;
7
7
  export declare function PluginVizViewComponent(props: IViewComponentProps): JSX.Element;
@@ -1,5 +1,2 @@
1
- import React from 'react';
2
- import { ViewModelInstance } from '..';
3
- export declare const PanelTitleBar: React.FunctionComponent<{
4
- view: ViewModelInstance;
5
- }>;
1
+ /// <reference types="react" />
2
+ export declare const PanelTitleBar: import("react").FunctionComponent<object>;
@@ -4,6 +4,7 @@ interface IViz {
4
4
  viz: IVizConfig;
5
5
  data: $TSFixMe;
6
6
  loading: boolean;
7
+ height: string;
7
8
  }
8
9
  export declare const Viz: React.FunctionComponent<IViz>;
9
10
  export {};
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .filter-settings-tabs{width:100%;height:100%}.filter-settings-tabs .mantine-Tabs-panel{height:calc(100% - 25px)}.filter-settings-tabs .mantine-Tabs-tabsListWrapper{flex:0}.filter-settings-tabs .mantine-Tabs-body{flex:1;overflow:scroll}.panel-root{padding:5px;height:100%;width:100%;max-width:100%;background:transparent;border-radius:4px;border:1px solid #ced4da}.panel-settings-tabs{width:100%;height:100%}.panel-settings-tabs .mantine-Tabs-panel{height:calc(100% - 25px)}.panel-settings-tabs .mantine-Tabs-tabsListWrapper{flex:0}.panel-settings-tabs .mantine-Tabs-body{flex:1;overflow:scroll}.viz-root{width:100%;overflow:scroll;padding-top:5px;height:calc(100% - 25px);background-color:#fff}.panel-title-wrapper{text-align:center;transition:background-color .3s ease}.panel-title-wrapper:hover{cursor:pointer;background-color:#6464640d}.react-grid-item{padding:0}.remove-panel{position:absolute;right:2px;top:0;cursor:pointer}.code-textarea textarea{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.dashboard-root{overflow:scroll;padding:0 10px 10px;height:100%}.dashboard-sticky-area{z-index:100;background:white;margin:0;padding:0 10px}
1
+ .filter-settings-tabs{width:100%;height:100%}.filter-settings-tabs .mantine-Tabs-panel{height:calc(100% - 25px)}.filter-settings-tabs .mantine-Tabs-tabsListWrapper{flex:0}.filter-settings-tabs .mantine-Tabs-body{flex:1;overflow:scroll}.panel-root{height:100%;width:100%;max-width:100%;background:transparent;border-radius:4px;border:1px solid #ced4da;position:relative}.panel-settings-tabs{width:100%;height:100%}.panel-settings-tabs .mantine-Tabs-panel{height:calc(100% - 25px)}.panel-settings-tabs .mantine-Tabs-tabsListWrapper{flex:0}.panel-settings-tabs .mantine-Tabs-body{flex:1;overflow:scroll}.viz-root{width:100%;overflow:scroll;flex-grow:1;background-color:#fff}.panel-dropdown-target{text-align:center;transition:background-color .3s ease}.panel-dropdown-target:hover{cursor:pointer;background-color:#6464640d}.react-grid-item{padding:0}.remove-panel{position:absolute;right:2px;top:0;cursor:pointer}.code-textarea textarea{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.dashboard-root{overflow:scroll;padding:0 10px 10px;height:100%}.dashboard-sticky-area{z-index:100;background:white;margin:0;padding:0 10px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/dashboard",
3
- "version": "4.8.0",
3
+ "version": "4.9.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public",