@devtable/dashboard 2.3.0 → 2.6.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.
Files changed (124) hide show
  1. package/dist/api-caller/index.d.ts +14 -8
  2. package/dist/api-caller/types.d.ts +1 -1
  3. package/dist/contexts/dashboard-action-context.d.ts +1 -1
  4. package/dist/contexts/index.d.ts +1 -3
  5. package/dist/contexts/layout-state-context.d.ts +2 -2
  6. package/dist/contexts/model-context.d.ts +24165 -0
  7. package/dist/contexts/panel-context.d.ts +2 -3
  8. package/dist/dashboard.es.js +8102 -4305
  9. package/dist/dashboard.umd.js +41 -5
  10. package/dist/definition-editor/data-editor-modal.d.ts +2 -2
  11. package/dist/definition-editor/global-variables-guide.d.ts +3 -3
  12. package/dist/definition-editor/query-editor/data-preview.d.ts +3 -3
  13. package/dist/definition-editor/query-editor/editor.d.ts +2 -2
  14. package/dist/definition-editor/query-editor/form.d.ts +4 -5
  15. package/dist/definition-editor/query-editor/index.d.ts +2 -2
  16. package/dist/definition-editor/query-editor/select-or-add-query.d.ts +2 -2
  17. package/dist/definition-editor/sql-snippet-editor/editor.d.ts +2 -2
  18. package/dist/filter/filter-checkbox/editor.d.ts +3 -5
  19. package/dist/filter/filter-checkbox/render.d.ts +3 -2
  20. package/dist/filter/filter-date-range/editor.d.ts +3 -6
  21. package/dist/filter/filter-date-range/render.d.ts +3 -2
  22. package/dist/filter/filter-multi-select/editor.d.ts +3 -7
  23. package/dist/filter/filter-multi-select/render.d.ts +4 -3
  24. package/dist/filter/filter-query-field/index.d.ts +5 -5
  25. package/dist/filter/filter-query-field/select-data-source.d.ts +5 -5
  26. package/dist/filter/filter-query-field/test-query.d.ts +7 -0
  27. package/dist/filter/filter-select/editor.d.ts +3 -7
  28. package/dist/filter/filter-select/render.d.ts +3 -2
  29. package/dist/filter/filter-settings/filter-setting.d.ts +4 -7
  30. package/dist/filter/filter-settings/filter-settings.d.ts +2 -5
  31. package/dist/filter/filter-settings/index.d.ts +2 -5
  32. package/dist/filter/filter-settings/preview-filter.d.ts +4 -8
  33. package/dist/filter/filter-text-input/editor.d.ts +3 -6
  34. package/dist/filter/filter-text-input/render.d.ts +3 -2
  35. package/dist/filter/filter.d.ts +3 -3
  36. package/dist/filter/index.d.ts +2 -6
  37. package/dist/index.d.ts +1 -0
  38. package/dist/layout/index.d.ts +3 -3
  39. package/dist/layout/read-only.d.ts +3 -3
  40. package/dist/main/actions.d.ts +3 -5
  41. package/dist/main/full-screen-panel.d.ts +3 -3
  42. package/dist/main/main.d.ts +5 -5
  43. package/dist/main/read-only.d.ts +4 -4
  44. package/dist/main/toggle-mode.d.ts +2 -2
  45. package/dist/main/use-panel-full-screen.d.ts +1 -1
  46. package/dist/main/use-sticky-area-style.d.ts +1 -0
  47. package/dist/model/context.d.ts +11 -0
  48. package/dist/model/dashboard.d.ts +15998 -0
  49. package/dist/model/filters/filter/checkbox.d.ts +16 -0
  50. package/dist/model/filters/filter/common.d.ts +14 -0
  51. package/dist/model/filters/filter/date-range.d.ts +28 -0
  52. package/dist/model/filters/filter/index.d.ts +172 -0
  53. package/dist/model/filters/filter/multi-select.d.ts +81 -0
  54. package/dist/model/filters/filter/select.d.ts +95 -0
  55. package/dist/model/filters/filter/text-input.d.ts +22 -0
  56. package/dist/model/filters/index.d.ts +3542 -0
  57. package/dist/model/index.d.ts +5 -0
  58. package/dist/model/queries/index.d.ts +116 -0
  59. package/dist/model/queries/mute-query.d.ts +17 -0
  60. package/dist/model/queries/query.d.ts +31 -0
  61. package/dist/model/queries/types.d.ts +5 -0
  62. package/dist/model/sql-snippets/index.d.ts +26 -0
  63. package/dist/model/sql-snippets/sql-snippet.d.ts +9 -0
  64. package/dist/panel/error-boundary.d.ts +1 -1
  65. package/dist/panel/index.d.ts +2 -2
  66. package/dist/panel/settings/common/aggregation-selector.d.ts +2 -2
  67. package/dist/panel/settings/common/color-array-input.d.ts +1 -1
  68. package/dist/panel/settings/common/data-field-selector.d.ts +2 -2
  69. package/dist/panel/settings/common/mantine-color.d.ts +1 -1
  70. package/dist/panel/settings/common/mantine-font-weight.d.ts +1 -1
  71. package/dist/panel/settings/common/numbro-format-selector.d.ts +1 -1
  72. package/dist/panel/settings/common/text-array-input.d.ts +1 -1
  73. package/dist/panel/settings/index.d.ts +2 -2
  74. package/dist/panel/settings/pick-query/index.d.ts +2 -2
  75. package/dist/panel/title-bar.d.ts +2 -2
  76. package/dist/panel/viz/bar-3d/panel.d.ts +1 -1
  77. package/dist/panel/viz/cartesian/panel/index.d.ts +1 -1
  78. package/dist/panel/viz/cartesian/panel/regressions/index.d.ts +2 -2
  79. package/dist/panel/viz/cartesian/panel/regressions/regression-item.d.ts +2 -2
  80. package/dist/panel/viz/cartesian/panel/series/fields.bar.d.ts +3 -3
  81. package/dist/panel/viz/cartesian/panel/series/index.d.ts +2 -2
  82. package/dist/panel/viz/cartesian/panel/series/series-item.d.ts +2 -2
  83. package/dist/panel/viz/cartesian/panel/stats/index.d.ts +2 -2
  84. package/dist/panel/viz/cartesian/panel/stats/variable.d.ts +2 -2
  85. package/dist/panel/viz/cartesian/panel/y-axes.d.ts +2 -2
  86. package/dist/panel/viz/cartesian/type.d.ts +3 -3
  87. package/dist/panel/viz/index.d.ts +3 -3
  88. package/dist/panel/viz/pie/panel.d.ts +1 -1
  89. package/dist/panel/viz/rich-text/panel.d.ts +1 -1
  90. package/dist/panel/viz/rich-text/type.d.ts +1 -1
  91. package/dist/panel/viz/stats/panel/index.d.ts +3 -3
  92. package/dist/panel/viz/stats/panel/variable.d.ts +2 -2
  93. package/dist/panel/viz/stats/panel/variables.d.ts +2 -2
  94. package/dist/panel/viz/stats/types.d.ts +1 -1
  95. package/dist/panel/viz/stats/update/index.d.ts +2 -2
  96. package/dist/panel/viz/sunburst/panel.d.ts +1 -1
  97. package/dist/panel/viz/table/index.d.ts +1 -1
  98. package/dist/panel/viz/table/panel.d.ts +1 -1
  99. package/dist/panel/viz/table/value-type-selector.d.ts +1 -1
  100. package/dist/panel/viz/table/value.d.ts +1 -1
  101. package/dist/plugins/json-plugin-storage.d.ts +8 -0
  102. package/dist/plugins/message-channels.d.ts +8 -0
  103. package/dist/plugins/plugin-context.d.ts +12 -0
  104. package/dist/plugins/plugin-manager.d.ts +18 -0
  105. package/dist/plugins/viz-manager/components.d.ts +23 -0
  106. package/dist/plugins/viz-manager/impl.d.ts +10 -0
  107. package/dist/plugins/viz-manager/index.d.ts +3 -0
  108. package/dist/plugins/viz-manager/types.d.ts +12 -0
  109. package/dist/style.css +1 -1
  110. package/dist/types/dashboard.d.ts +6 -14
  111. package/dist/types/filter.d.ts +6 -38
  112. package/dist/types/plugin/index.d.ts +97 -0
  113. package/dist/types/viz-panel.d.ts +1 -1
  114. package/dist/utils/download.d.ts +6 -0
  115. package/dist/utils/sql.d.ts +7 -6
  116. package/dist/utils/template/editor.d.ts +3 -3
  117. package/dist/utils/template/render.d.ts +1 -1
  118. package/dist/utils/template/types.d.ts +2 -2
  119. package/package.json +22 -4
  120. package/dist/contexts/context-info-context.d.ts +0 -5
  121. package/dist/contexts/definition-context.d.ts +0 -7
  122. package/dist/contexts/filter-values-context.d.ts +0 -4
  123. package/dist/filter/filter-settings/types.d.ts +0 -4
  124. package/dist/main/use-filters.d.ts +0 -8
@@ -0,0 +1,5 @@
1
+ export * from './filters';
2
+ export * from './queries';
3
+ export * from './sql-snippets';
4
+ export * from './context';
5
+ export * from './dashboard';
@@ -0,0 +1,116 @@
1
+ import { QueryModelInstance } from './query';
2
+ export declare const QueriesModel: import("mobx-state-tree").IModelType<{
3
+ original: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
4
+ id: import("mobx-state-tree").ISimpleType<string>;
5
+ type: import("mobx-state-tree").ISimpleType<import("./types").DataSourceType>;
6
+ key: import("mobx-state-tree").ISimpleType<string>;
7
+ sql: import("mobx-state-tree").ISimpleType<string>;
8
+ }, {
9
+ readonly valid: string;
10
+ readonly configurations: {
11
+ id: string;
12
+ type: import("./types").DataSourceType;
13
+ key: string;
14
+ sql: string;
15
+ };
16
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>, [undefined]>;
17
+ current: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
18
+ id: import("mobx-state-tree").ISimpleType<string>;
19
+ type: import("mobx-state-tree").ISimpleType<import("./types").DataSourceType>;
20
+ key: import("mobx-state-tree").ISimpleType<string>;
21
+ sql: import("mobx-state-tree").ISimpleType<string>;
22
+ } & {
23
+ state: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"idle" | "loading" | "error">, [undefined]>;
24
+ data: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<Object, Object, Object>>, [undefined]>;
25
+ error: import("mobx-state-tree").IType<any, any, any>;
26
+ }, {
27
+ readonly valid: string;
28
+ readonly configurations: {
29
+ id: string;
30
+ type: import("./types").DataSourceType;
31
+ key: string;
32
+ sql: string;
33
+ };
34
+ } & {
35
+ readonly formattedSQL: any;
36
+ } & {
37
+ setID(id: string): void;
38
+ setKey(key: string): void;
39
+ setType(type: import("./types").DataSourceType): void;
40
+ setSQL(sql: string): void;
41
+ fetchData: () => Promise<void>;
42
+ } & {
43
+ afterCreate(): void;
44
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>, [undefined]>;
45
+ }, {
46
+ readonly changed: boolean;
47
+ readonly firstID: string | undefined;
48
+ findByID(id: string): ({
49
+ id: string;
50
+ type: import("./types").DataSourceType;
51
+ key: string;
52
+ sql: string;
53
+ state: "idle" | "loading" | "error";
54
+ data: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IType<Object, Object, Object>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<Object, Object, Object>>, [undefined]>>;
55
+ error: any;
56
+ } & import("mobx-state-tree/dist/internal").NonEmptyObject & {
57
+ readonly valid: string;
58
+ readonly configurations: {
59
+ id: string;
60
+ type: import("./types").DataSourceType;
61
+ key: string;
62
+ sql: string;
63
+ };
64
+ } & {
65
+ readonly formattedSQL: any;
66
+ } & {
67
+ setID(id: string): void;
68
+ setKey(key: string): void;
69
+ setType(type: import("./types").DataSourceType): void;
70
+ setSQL(sql: string): void;
71
+ fetchData: () => Promise<void>;
72
+ } & {
73
+ afterCreate(): void;
74
+ } & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
75
+ id: import("mobx-state-tree").ISimpleType<string>;
76
+ type: import("mobx-state-tree").ISimpleType<import("./types").DataSourceType>;
77
+ key: import("mobx-state-tree").ISimpleType<string>;
78
+ sql: import("mobx-state-tree").ISimpleType<string>;
79
+ } & {
80
+ state: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"idle" | "loading" | "error">, [undefined]>;
81
+ data: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<Object, Object, Object>>, [undefined]>;
82
+ error: import("mobx-state-tree").IType<any, any, any>;
83
+ }, {
84
+ readonly valid: string;
85
+ readonly configurations: {
86
+ id: string;
87
+ type: import("./types").DataSourceType;
88
+ key: string;
89
+ sql: string;
90
+ };
91
+ } & {
92
+ readonly formattedSQL: any;
93
+ } & {
94
+ setID(id: string): void;
95
+ setKey(key: string): void;
96
+ setType(type: import("./types").DataSourceType): void;
97
+ setSQL(sql: string): void;
98
+ fetchData: () => Promise<void>;
99
+ } & {
100
+ afterCreate(): void;
101
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
102
+ readonly options: {
103
+ value: string;
104
+ label: string;
105
+ }[];
106
+ } & {
107
+ reset(): void;
108
+ replace(current: Array<QueryModelInstance>): void;
109
+ append(item: QueryModelInstance): void;
110
+ remove(index: number): void;
111
+ replaceByIndex(index: number, replacement: QueryModelInstance): void;
112
+ downloadAllData(): void;
113
+ downloadDataByQueryID(queryID: string): void;
114
+ refetchDataByQueryID(queryID: string): Promise<void> | undefined;
115
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
116
+ export * from './query';
@@ -0,0 +1,17 @@
1
+ import { Instance } from 'mobx-state-tree';
2
+ import { DataSourceType } from './types';
3
+ export declare const MuteQueryModel: import("mobx-state-tree").IModelType<{
4
+ id: import("mobx-state-tree").ISimpleType<string>;
5
+ type: import("mobx-state-tree").ISimpleType<DataSourceType>;
6
+ key: import("mobx-state-tree").ISimpleType<string>;
7
+ sql: import("mobx-state-tree").ISimpleType<string>;
8
+ }, {
9
+ readonly valid: string;
10
+ readonly configurations: {
11
+ id: string;
12
+ type: DataSourceType;
13
+ key: string;
14
+ sql: string;
15
+ };
16
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
17
+ export declare type MuteQueryModelInstance = Instance<typeof MuteQueryModel>;
@@ -0,0 +1,31 @@
1
+ import { Instance } from 'mobx-state-tree';
2
+ import { DataSourceType } from './types';
3
+ export declare const QueryModel: import("mobx-state-tree").IModelType<{
4
+ id: import("mobx-state-tree").ISimpleType<string>;
5
+ type: import("mobx-state-tree").ISimpleType<DataSourceType>;
6
+ key: import("mobx-state-tree").ISimpleType<string>;
7
+ sql: import("mobx-state-tree").ISimpleType<string>;
8
+ } & {
9
+ state: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"idle" | "loading" | "error">, [undefined]>;
10
+ data: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<Object, Object, Object>>, [undefined]>;
11
+ error: import("mobx-state-tree").IType<any, any, any>;
12
+ }, {
13
+ readonly valid: string;
14
+ readonly configurations: {
15
+ id: string;
16
+ type: DataSourceType;
17
+ key: string;
18
+ sql: string;
19
+ };
20
+ } & {
21
+ readonly formattedSQL: any;
22
+ } & {
23
+ setID(id: string): void;
24
+ setKey(key: string): void;
25
+ setType(type: DataSourceType): void;
26
+ setSQL(sql: string): void;
27
+ fetchData: () => Promise<void>;
28
+ } & {
29
+ afterCreate(): void;
30
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
31
+ export declare type QueryModelInstance = Instance<typeof QueryModel>;
@@ -0,0 +1,5 @@
1
+ export declare enum DataSourceType {
2
+ Postgresql = "postgresql",
3
+ MySQL = "mysql",
4
+ HTTP = "http"
5
+ }
@@ -0,0 +1,26 @@
1
+ import { SQLSnippetModelInstance } from './sql-snippet';
2
+ export declare const SQLSnippetsModel: import("mobx-state-tree").IModelType<{
3
+ original: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
4
+ key: import("mobx-state-tree").ISimpleType<string>;
5
+ value: import("mobx-state-tree").ISimpleType<string>;
6
+ }, {
7
+ setKey(key: string): void;
8
+ setValue(value: string): void;
9
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>, [undefined]>;
10
+ current: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
11
+ key: import("mobx-state-tree").ISimpleType<string>;
12
+ value: import("mobx-state-tree").ISimpleType<string>;
13
+ }, {
14
+ setKey(key: string): void;
15
+ setValue(value: string): void;
16
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>, [undefined]>;
17
+ }, {
18
+ readonly changed: boolean;
19
+ } & {
20
+ reset(): void;
21
+ replace(current: Array<SQLSnippetModelInstance>): void;
22
+ append(item: SQLSnippetModelInstance): void;
23
+ remove(index: number): void;
24
+ replaceByIndex(index: number, replacement: SQLSnippetModelInstance): void;
25
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
26
+ export * from './sql-snippet';
@@ -0,0 +1,9 @@
1
+ import { Instance } from 'mobx-state-tree';
2
+ export declare const SQLSnippetModel: import("mobx-state-tree").IModelType<{
3
+ key: import("mobx-state-tree").ISimpleType<string>;
4
+ value: import("mobx-state-tree").ISimpleType<string>;
5
+ }, {
6
+ setKey(key: string): void;
7
+ setValue(value: string): void;
8
+ }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
9
+ export declare type SQLSnippetModelInstance = Instance<typeof SQLSnippetModel>;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  declare type PropType = {
3
3
  children: React.ReactNode;
4
4
  };
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { IDashboardPanel } from '../types/dashboard';
3
3
  interface IPanel extends IDashboardPanel {
4
4
  update?: (panel: IDashboardPanel) => void;
5
5
  }
6
- export declare function Panel({ viz: initialViz, queryID: initialQueryID, title: initialTitle, description: initialDesc, update, layout, id, }: IPanel): JSX.Element;
6
+ export declare const Panel: React.FunctionComponent<IPanel>;
7
7
  export {};
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { AggregationType } from "../../../utils/aggregation";
1
+ import React from 'react';
2
+ import { AggregationType } from '../../../utils/aggregation';
3
3
  interface IAggregationSelector {
4
4
  value: AggregationType;
5
5
  onChange: (v: AggregationType) => void;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  interface IColorArrayInput {
3
3
  label: React.ReactNode;
4
4
  value: string[];
@@ -1,5 +1,5 @@
1
- import { Sx } from "@mantine/core";
2
- import React from "react";
1
+ import { Sx } from '@mantine/core';
2
+ import React from 'react';
3
3
  interface IDataFieldSelector {
4
4
  label: string;
5
5
  required?: boolean;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  interface IMantineColorSelector {
3
3
  value?: string;
4
4
  onChange: (value: string) => void;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  interface IMantineFontWeightSlider {
3
3
  label: string;
4
4
  value: string;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export declare type TNumbroFormat = {
3
3
  mantissa: number;
4
4
  output: 'percent' | 'number';
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  interface ITextArrayInput {
3
3
  label: React.ReactNode;
4
4
  value: string[] | number[];
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface IPanelSettingsModal {
3
3
  opened: boolean;
4
4
  close: () => void;
5
5
  }
6
- export declare function PanelSettingsModal({ opened, close }: IPanelSettingsModal): JSX.Element;
6
+ export declare const PanelSettingsModal: React.FunctionComponent<IPanelSettingsModal>;
7
7
  export {};
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface IPickQuery {
3
3
  }
4
- export declare function PickQuery({}: IPickQuery): JSX.Element;
4
+ export declare const PickQuery: React.FunctionComponent<IPickQuery>;
5
5
  export {};
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface IPanelTitleBar {
3
3
  }
4
- export declare function PanelTitleBar({}: IPanelTitleBar): JSX.Element;
4
+ export declare const PanelTitleBar: React.FunctionComponent<IPanelTitleBar>;
5
5
  export {};
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { IVizPanelProps } from "../../../types";
2
+ import { IVizPanelProps } from '../../../types';
3
3
  export declare function VizBar3DPanel({ conf, setConf, data }: IVizPanelProps): JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { IVizCartesianChartPanel } from "../type";
2
+ import { IVizCartesianChartPanel } from '../type';
3
3
  export declare function VizCartesianChartPanel({ conf, setConf, data }: IVizCartesianChartPanel): JSX.Element;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { Control, UseFormGetValues, UseFormWatch } from "react-hook-form";
3
- import { ICartesianChartConf } from "../../type";
2
+ import { Control, UseFormGetValues, UseFormWatch } from 'react-hook-form';
3
+ import { ICartesianChartConf } from '../../type';
4
4
  interface IRegressionsField {
5
5
  control: Control<ICartesianChartConf, any>;
6
6
  watch: UseFormWatch<ICartesianChartConf>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { Control, UseFieldArrayRemove } from "react-hook-form";
3
- import { ICartesianChartConf, IRegressionConf } from "../../type";
2
+ import { Control, UseFieldArrayRemove } from 'react-hook-form';
3
+ import { ICartesianChartConf, IRegressionConf } from '../../type';
4
4
  interface IRegressionField {
5
5
  control: Control<ICartesianChartConf, any>;
6
6
  regressionItem: IRegressionConf;
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { Control } from "react-hook-form";
3
- import { ICartesianChartConf } from "../../type";
2
+ import { Control } from 'react-hook-form';
3
+ import { ICartesianChartConf } from '../../type';
4
4
  interface IBarFields {
5
5
  control: Control<ICartesianChartConf, any>;
6
6
  index: number;
7
7
  }
8
- export declare function BarFields({ control, index, }: IBarFields): JSX.Element;
8
+ export declare function BarFields({ control, index }: IBarFields): JSX.Element;
9
9
  export {};
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { Control, UseFormGetValues, UseFormWatch } from "react-hook-form";
3
- import { ICartesianChartConf } from "../../type";
2
+ import { Control, UseFormGetValues, UseFormWatch } from 'react-hook-form';
3
+ import { ICartesianChartConf } from '../../type';
4
4
  interface ISeriesField {
5
5
  control: Control<ICartesianChartConf, any>;
6
6
  watch: UseFormWatch<ICartesianChartConf>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { Control, UseFieldArrayRemove } from "react-hook-form";
3
- import { ICartesianChartConf, ICartesianChartSeriesItem } from "../../type";
2
+ import { Control, UseFieldArrayRemove } from 'react-hook-form';
3
+ import { ICartesianChartConf, ICartesianChartSeriesItem } from '../../type';
4
4
  interface ISeriesItemField {
5
5
  control: Control<ICartesianChartConf, any>;
6
6
  index: number;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { Control, UseFormWatch } from "react-hook-form";
3
- import { ICartesianChartConf } from "../../type";
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { ICartesianChartConf } from '../../type';
4
4
  interface IVariablesField {
5
5
  control: Control<ICartesianChartConf, any>;
6
6
  watch: UseFormWatch<ICartesianChartConf>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { Control, UseFieldArrayRemove } from "react-hook-form";
3
- import { ICartesianChartConf } from "../../type";
2
+ import { Control, UseFieldArrayRemove } from 'react-hook-form';
3
+ import { ICartesianChartConf } from '../../type';
4
4
  interface VariableField {
5
5
  control: Control<ICartesianChartConf, any>;
6
6
  index: number;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { Control, UseFormWatch } from "react-hook-form";
3
- import { ICartesianChartConf } from "../type";
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { ICartesianChartConf } from '../type';
4
4
  interface IYAxesField {
5
5
  control: Control<ICartesianChartConf, any>;
6
6
  watch: UseFormWatch<ICartesianChartConf>;
@@ -1,6 +1,6 @@
1
- import { IVizPanelProps } from "../../../types";
2
- import { ITemplateVariable } from "../../../utils/template/types";
3
- import { TNumbroFormat } from "../../settings/common/numbro-format-selector";
1
+ import { IVizPanelProps } from '../../../types';
2
+ import { ITemplateVariable } from '../../../utils/template/types';
3
+ import { TNumbroFormat } from '../../settings/common/numbro-format-selector';
4
4
  export interface ICartesianChartSeriesItem {
5
5
  type: 'line' | 'bar' | 'scatter';
6
6
  name: string;
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
- import { IVizConfig } from "../../types/dashboard";
1
+ import React from 'react';
2
+ import { IVizConfig } from '../../types/dashboard';
3
3
  interface IViz {
4
4
  viz: IVizConfig;
5
5
  data: any;
6
6
  loading: boolean;
7
7
  }
8
- export declare function Viz({ viz, data, loading }: IViz): JSX.Element;
8
+ export declare const Viz: React.FunctionComponent<IViz>;
9
9
  export {};
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { IVizPanelProps } from "../../../types/viz-panel";
2
+ import { IVizPanelProps } from '../../../types/viz-panel';
3
3
  export declare function VizPiePanel({ conf: { label_field, value_field }, setConf, data }: IVizPanelProps): JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { IVizRichTextPanel } from "./type";
2
+ import { IVizRichTextPanel } from './type';
3
3
  export declare function VizRichTextPanel({ conf, setConf }: IVizRichTextPanel): JSX.Element;
@@ -1,4 +1,4 @@
1
- import { IVizPanelProps } from "../../../types";
1
+ import { IVizPanelProps } from '../../../types';
2
2
  export interface IRichTextConf {
3
3
  content: '';
4
4
  }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { IVizPanelProps } from "../../../../types/viz-panel";
3
- import { IVizStatsConf } from "../types";
4
- import { ILegacyStatsConf } from "../update";
2
+ import { IVizPanelProps } from '../../../../types/viz-panel';
3
+ import { IVizStatsConf } from '../types';
4
+ import { ILegacyStatsConf } from '../update';
5
5
  interface IVizStatsPanel extends Omit<IVizPanelProps, 'conf' | 'setConf'> {
6
6
  conf: IVizStatsConf | ILegacyStatsConf;
7
7
  setConf: (conf: IVizStatsConf) => void;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { Control, UseFieldArrayRemove } from "react-hook-form";
3
- import { IVizStatsConf } from "../types";
2
+ import { Control, UseFieldArrayRemove } from 'react-hook-form';
3
+ import { IVizStatsConf } from '../types';
4
4
  interface VariableField {
5
5
  control: Control<IVizStatsConf, any>;
6
6
  index: number;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { Control, UseFormWatch } from "react-hook-form";
3
- import { IVizStatsConf } from "../types";
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { IVizStatsConf } from '../types';
4
4
  interface IVariablesField {
5
5
  control: Control<IVizStatsConf, any>;
6
6
  watch: UseFormWatch<IVizStatsConf>;
@@ -1,4 +1,4 @@
1
- import { ITemplateVariable } from "../../../utils/template/types";
1
+ import { ITemplateVariable } from '../../../utils/template/types';
2
2
  export interface IVizStatsConf {
3
3
  align: 'center';
4
4
  template: string;
@@ -1,5 +1,5 @@
1
- import { TNumbroFormat } from "../../../settings/common/numbro-format-selector";
2
- import { IVizStatsConf } from "../types";
1
+ import { TNumbroFormat } from '../../../settings/common/numbro-format-selector';
2
+ import { IVizStatsConf } from '../types';
3
3
  export interface ILegacyStatsConf {
4
4
  align: 'center';
5
5
  size: string;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { IVizPanelProps } from "../../../types/viz-panel";
2
+ import { IVizPanelProps } from '../../../types/viz-panel';
3
3
  export declare function SunburstPanel({ conf: { label_field, value_field }, setConf, data }: IVizPanelProps): JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ITableConf } from "./type";
2
+ import { ITableConf } from './type';
3
3
  interface IVizTable {
4
4
  conf: ITableConf;
5
5
  data: any;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { IVizPanelProps } from "../../../types/viz-panel";
2
+ import { IVizPanelProps } from '../../../types/viz-panel';
3
3
  export declare function VizTablePanel({ conf: { columns, ...restConf }, setConf, data }: IVizPanelProps): JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { Sx } from "@mantine/core";
2
+ import { Sx } from '@mantine/core';
3
3
  interface IValueTypeSelector {
4
4
  label: string;
5
5
  value: string;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ValueType } from "./type";
2
+ import { ValueType } from './type';
3
3
  interface ICellValue {
4
4
  value: any;
5
5
  type: ValueType;
@@ -0,0 +1,8 @@
1
+ import { PluginStorage } from '../types/plugin';
2
+ export declare class JsonPluginStorage implements PluginStorage {
3
+ private root;
4
+ constructor(root: Record<string, any>);
5
+ deleteItem(key: string): Promise<void>;
6
+ getItem<T>(key: string): Promise<T>;
7
+ setItem<T>(key: string, item: T): Promise<T>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import EventEmitter2 from 'eventemitter2';
2
+ import { IMessageChannels } from '../types/plugin';
3
+ export declare class MessageChannels implements IMessageChannels {
4
+ private channels;
5
+ globalChannel: EventEmitter2;
6
+ getChannel(name: string): EventEmitter2;
7
+ close(name: string): void;
8
+ }
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { IPluginManager } from '../types/plugin';
3
+ import { PluginManager } from './plugin-manager';
4
+ import { VizManager } from './viz-manager';
5
+ interface IPluginContextProps {
6
+ pluginManager: IPluginManager;
7
+ vizManager: VizManager;
8
+ }
9
+ export declare const pluginManager: PluginManager;
10
+ export declare const createPluginContext: () => IPluginContextProps;
11
+ export declare const PluginContext: import("react").Context<IPluginContextProps>;
12
+ export {};
@@ -0,0 +1,18 @@
1
+ import { IDashboardPlugin, IPluginManager, VizComponent } from '../types/plugin';
2
+ export declare class PluginManager implements IPluginManager {
3
+ /**
4
+ * Id to plugin map
5
+ * @private
6
+ */
7
+ private plugins;
8
+ /**
9
+ * Name to component map
10
+ */
11
+ private vizComponents;
12
+ constructor();
13
+ factory: {
14
+ viz: (name: string) => VizComponent;
15
+ };
16
+ install(plugin: IDashboardPlugin): void;
17
+ get installedPlugins(): IDashboardPlugin[];
18
+ }