@devtable/dashboard 2.5.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 (148) hide show
  1. package/dist/api-caller/index.d.ts +26 -0
  2. package/dist/api-caller/request.d.ts +5 -0
  3. package/dist/api-caller/types.d.ts +11 -0
  4. package/dist/contexts/dashboard-action-context.d.ts +9 -0
  5. package/dist/contexts/index.d.ts +3 -0
  6. package/dist/contexts/layout-state-context.d.ts +11 -0
  7. package/dist/contexts/model-context.d.ts +24165 -0
  8. package/dist/contexts/panel-context.d.ts +16 -0
  9. package/dist/dashboard.es.js +1696 -1644
  10. package/dist/dashboard.umd.js +16 -16
  11. package/dist/definition-editor/data-editor-modal.d.ts +7 -0
  12. package/dist/definition-editor/global-variables-guide.d.ts +8 -0
  13. package/dist/definition-editor/index.d.ts +1 -0
  14. package/dist/definition-editor/query-editor/data-preview.d.ts +4 -0
  15. package/dist/definition-editor/query-editor/editor.d.ts +7 -0
  16. package/dist/definition-editor/query-editor/form.d.ts +7 -0
  17. package/dist/definition-editor/query-editor/index.d.ts +5 -0
  18. package/dist/definition-editor/query-editor/preview-sql.d.ts +6 -0
  19. package/dist/definition-editor/query-editor/select-or-add-query.d.ts +7 -0
  20. package/dist/definition-editor/sql-snippet-editor/editor.d.ts +5 -0
  21. package/dist/definition-editor/sql-snippet-editor/index.d.ts +5 -0
  22. package/dist/definition-editor/sql-snippet-editor/preview-snippet.d.ts +6 -0
  23. package/dist/filter/filter-checkbox/editor.d.ts +8 -0
  24. package/dist/filter/filter-checkbox/render.d.ts +10 -0
  25. package/dist/filter/filter-date-range/editor.d.ts +7 -0
  26. package/dist/filter/filter-date-range/render.d.ts +10 -0
  27. package/dist/filter/filter-multi-select/editor.d.ts +7 -0
  28. package/dist/filter/filter-multi-select/render.d.ts +10 -0
  29. package/dist/filter/filter-query-field/index.d.ts +8 -0
  30. package/dist/filter/filter-query-field/select-data-source.d.ts +8 -0
  31. package/dist/filter/filter-query-field/test-query.d.ts +7 -0
  32. package/dist/filter/filter-select/editor.d.ts +7 -0
  33. package/dist/filter/filter-select/render.d.ts +10 -0
  34. package/dist/filter/filter-settings/filter-setting.d.ts +8 -0
  35. package/dist/filter/filter-settings/filter-settings.d.ts +5 -0
  36. package/dist/filter/filter-settings/index.d.ts +7 -0
  37. package/dist/filter/filter-settings/preview-filter.d.ts +7 -0
  38. package/dist/filter/filter-text-input/editor.d.ts +7 -0
  39. package/dist/filter/filter-text-input/render.d.ts +10 -0
  40. package/dist/filter/filter.d.ts +9 -0
  41. package/dist/filter/index.d.ts +5 -0
  42. package/dist/index.d.ts +6 -0
  43. package/dist/layout/index.d.ts +12 -0
  44. package/dist/layout/read-only.d.ts +9 -0
  45. package/dist/main/actions.d.ts +12 -0
  46. package/dist/main/full-screen-panel.d.ts +6 -0
  47. package/dist/main/index.d.ts +2 -0
  48. package/dist/main/main.d.ts +12 -0
  49. package/dist/main/read-only.d.ts +11 -0
  50. package/dist/main/toggle-mode.d.ts +8 -0
  51. package/dist/main/use-panel-full-screen.d.ts +7 -0
  52. package/dist/main/use-sticky-area-style.d.ts +1 -0
  53. package/dist/main/view-schema-modal.d.ts +8 -0
  54. package/dist/model/context.d.ts +11 -0
  55. package/dist/model/dashboard.d.ts +15998 -0
  56. package/dist/model/filters/filter/checkbox.d.ts +16 -0
  57. package/dist/model/filters/filter/common.d.ts +14 -0
  58. package/dist/model/filters/filter/date-range.d.ts +28 -0
  59. package/dist/model/filters/filter/index.d.ts +172 -0
  60. package/dist/model/filters/filter/multi-select.d.ts +81 -0
  61. package/dist/model/filters/filter/select.d.ts +95 -0
  62. package/dist/model/filters/filter/text-input.d.ts +22 -0
  63. package/dist/model/filters/index.d.ts +3542 -0
  64. package/dist/model/index.d.ts +5 -0
  65. package/dist/model/queries/index.d.ts +116 -0
  66. package/dist/model/queries/mute-query.d.ts +17 -0
  67. package/dist/model/queries/query.d.ts +31 -0
  68. package/dist/model/queries/types.d.ts +5 -0
  69. package/dist/model/sql-snippets/index.d.ts +26 -0
  70. package/dist/model/sql-snippets/sql-snippet.d.ts +9 -0
  71. package/dist/panel/error-boundary.d.ts +13 -0
  72. package/dist/panel/index.d.ts +7 -0
  73. package/dist/panel/panel-description.d.ts +5 -0
  74. package/dist/panel/settings/common/aggregation-selector.d.ts +9 -0
  75. package/dist/panel/settings/common/color-array-input.d.ts +8 -0
  76. package/dist/panel/settings/common/data-field-selector.d.ts +12 -0
  77. package/dist/panel/settings/common/mantine-color.d.ts +7 -0
  78. package/dist/panel/settings/common/mantine-font-weight.d.ts +8 -0
  79. package/dist/panel/settings/common/numbro-format-selector.d.ts +13 -0
  80. package/dist/panel/settings/common/text-array-input.d.ts +8 -0
  81. package/dist/panel/settings/index.d.ts +7 -0
  82. package/dist/panel/settings/panel-config/description.d.ts +2 -0
  83. package/dist/panel/settings/panel-config/index.d.ts +5 -0
  84. package/dist/panel/settings/panel-config/preview-panel.d.ts +2 -0
  85. package/dist/panel/settings/panel-config/title.d.ts +2 -0
  86. package/dist/panel/settings/pick-query/index.d.ts +5 -0
  87. package/dist/panel/settings/viz-config/index.d.ts +5 -0
  88. package/dist/panel/settings/viz-config/preview-viz.d.ts +5 -0
  89. package/dist/panel/settings/viz-config/viz-conf.d.ts +2 -0
  90. package/dist/panel/title-bar.d.ts +5 -0
  91. package/dist/panel/viz/bar-3d/index.d.ts +9 -0
  92. package/dist/panel/viz/bar-3d/panel.d.ts +3 -0
  93. package/dist/panel/viz/cartesian/index.d.ts +10 -0
  94. package/dist/panel/viz/cartesian/option/regression.d.ts +20 -0
  95. package/dist/panel/viz/cartesian/panel/index.d.ts +3 -0
  96. package/dist/panel/viz/cartesian/panel/regressions/index.d.ts +11 -0
  97. package/dist/panel/viz/cartesian/panel/regressions/regression-item.d.ts +16 -0
  98. package/dist/panel/viz/cartesian/panel/series/fields.bar.d.ts +9 -0
  99. package/dist/panel/viz/cartesian/panel/series/fields.line.d.ts +9 -0
  100. package/dist/panel/viz/cartesian/panel/series/fields.scatter.d.ts +9 -0
  101. package/dist/panel/viz/cartesian/panel/series/index.d.ts +11 -0
  102. package/dist/panel/viz/cartesian/panel/series/series-item.d.ts +16 -0
  103. package/dist/panel/viz/cartesian/panel/stats/index.d.ts +10 -0
  104. package/dist/panel/viz/cartesian/panel/stats/variable.d.ts +11 -0
  105. package/dist/panel/viz/cartesian/panel/y-axes.d.ts +9 -0
  106. package/dist/panel/viz/cartesian/type.d.ts +58 -0
  107. package/dist/panel/viz/index.d.ts +9 -0
  108. package/dist/panel/viz/pie/index.d.ts +9 -0
  109. package/dist/panel/viz/pie/panel.d.ts +3 -0
  110. package/dist/panel/viz/rich-text/index.d.ts +10 -0
  111. package/dist/panel/viz/rich-text/panel.d.ts +3 -0
  112. package/dist/panel/viz/rich-text/type.d.ts +8 -0
  113. package/dist/panel/viz/stats/index.d.ts +10 -0
  114. package/dist/panel/viz/stats/panel/index.d.ts +10 -0
  115. package/dist/panel/viz/stats/panel/variable.d.ts +11 -0
  116. package/dist/panel/viz/stats/panel/variables.d.ts +10 -0
  117. package/dist/panel/viz/stats/types.d.ts +6 -0
  118. package/dist/panel/viz/stats/update/index.d.ts +15 -0
  119. package/dist/panel/viz/sunburst/index.d.ts +9 -0
  120. package/dist/panel/viz/sunburst/panel.d.ts +3 -0
  121. package/dist/panel/viz/table/index.d.ts +10 -0
  122. package/dist/panel/viz/table/panel.d.ts +3 -0
  123. package/dist/panel/viz/table/type.d.ts +21 -0
  124. package/dist/panel/viz/table/value-type-selector.d.ts +10 -0
  125. package/dist/panel/viz/table/value.d.ts +8 -0
  126. package/dist/plugins/json-plugin-storage.d.ts +8 -0
  127. package/dist/plugins/message-channels.d.ts +8 -0
  128. package/dist/plugins/plugin-context.d.ts +12 -0
  129. package/dist/plugins/plugin-manager.d.ts +18 -0
  130. package/dist/plugins/viz-manager/components.d.ts +23 -0
  131. package/dist/plugins/viz-manager/impl.d.ts +10 -0
  132. package/dist/plugins/viz-manager/index.d.ts +3 -0
  133. package/dist/plugins/viz-manager/types.d.ts +12 -0
  134. package/dist/style.css +1 -1
  135. package/dist/types/dashboard.d.ts +41 -0
  136. package/dist/types/filter.d.ts +7 -0
  137. package/dist/types/index.d.ts +3 -0
  138. package/dist/types/plugin/index.d.ts +97 -0
  139. package/dist/types/viz-panel.d.ts +6 -0
  140. package/dist/utils/aggregation.d.ts +2 -0
  141. package/dist/utils/color-mapping.d.ts +9 -0
  142. package/dist/utils/download.d.ts +6 -0
  143. package/dist/utils/sql.d.ts +9 -0
  144. package/dist/utils/template/editor.d.ts +16 -0
  145. package/dist/utils/template/render.d.ts +3 -0
  146. package/dist/utils/template/types.d.ts +21 -0
  147. package/dist/vite-env.d.ts +1 -0
  148. package/package.json +3 -2
@@ -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>;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ declare type PropType = {
3
+ children: React.ReactNode;
4
+ };
5
+ declare type StateType = {
6
+ error: null | any;
7
+ };
8
+ export declare class ErrorBoundary extends React.Component<PropType, StateType> {
9
+ constructor(props: PropType);
10
+ componentDidCatch(error: any): void;
11
+ render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
12
+ }
13
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { IDashboardPanel } from '../types/dashboard';
3
+ interface IPanel extends IDashboardPanel {
4
+ update?: (panel: IDashboardPanel) => void;
5
+ }
6
+ export declare const Panel: React.FunctionComponent<IPanel>;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ interface IDescriptionPopover {
3
+ }
4
+ export declare function DescriptionPopover({}: IDescriptionPopover): JSX.Element | null;
5
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { AggregationType } from '../../../utils/aggregation';
3
+ interface IAggregationSelector {
4
+ value: AggregationType;
5
+ onChange: (v: AggregationType) => void;
6
+ label: string;
7
+ }
8
+ export declare const AggregationSelector: React.ForwardRefExoticComponent<IAggregationSelector & React.RefAttributes<unknown>>;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface IColorArrayInput {
3
+ label: React.ReactNode;
4
+ value: string[];
5
+ onChange: (value: string[]) => void;
6
+ }
7
+ export declare const ColorArrayInput: React.ForwardRefExoticComponent<IColorArrayInput & React.RefAttributes<unknown>>;
8
+ export {};
@@ -0,0 +1,12 @@
1
+ import { Sx } from '@mantine/core';
2
+ import React from 'react';
3
+ interface IDataFieldSelector {
4
+ label: string;
5
+ required?: boolean;
6
+ value: string;
7
+ onChange: (v: string) => void;
8
+ data: any[];
9
+ sx?: Sx;
10
+ }
11
+ export declare const DataFieldSelector: React.ForwardRefExoticComponent<IDataFieldSelector & React.RefAttributes<unknown>>;
12
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface IMantineColorSelector {
3
+ value?: string;
4
+ onChange: (value: string) => void;
5
+ }
6
+ export declare const MantineColorSelector: React.ForwardRefExoticComponent<IMantineColorSelector & React.RefAttributes<unknown>>;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface IMantineFontWeightSlider {
3
+ label: string;
4
+ value: string;
5
+ onChange: (value: string) => void;
6
+ }
7
+ export declare const MantineFontWeightSlider: React.ForwardRefExoticComponent<IMantineFontWeightSlider & React.RefAttributes<unknown>>;
8
+ export {};
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ export declare type TNumbroFormat = {
3
+ mantissa: number;
4
+ output: 'percent' | 'number';
5
+ trimMantissa?: boolean;
6
+ };
7
+ export declare const defaultNumbroFormat: TNumbroFormat;
8
+ interface INumbroFormatSelector {
9
+ value: TNumbroFormat;
10
+ onChange: (v: TNumbroFormat) => void;
11
+ }
12
+ export declare const NumbroFormatSelector: React.ForwardRefExoticComponent<INumbroFormatSelector & React.RefAttributes<unknown>>;
13
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface ITextArrayInput {
3
+ label: React.ReactNode;
4
+ value: string[] | number[];
5
+ onChange: (value: string[] | number[]) => void;
6
+ }
7
+ export declare const TextArrayInput: React.ForwardRefExoticComponent<ITextArrayInput & React.RefAttributes<unknown>>;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface IPanelSettingsModal {
3
+ opened: boolean;
4
+ close: () => void;
5
+ }
6
+ export declare const PanelSettingsModal: React.FunctionComponent<IPanelSettingsModal>;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function EditDescription(): JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ interface IPanelConfig {
3
+ }
4
+ export declare function PanelConfig({}: IPanelConfig): JSX.Element;
5
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function PreviewPanel(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function EditTitle(): JSX.Element;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ interface IPickQuery {
3
+ }
4
+ export declare const PickQuery: React.FunctionComponent<IPickQuery>;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ interface IVizConfig {
3
+ }
4
+ export declare function VizConfig({}: IVizConfig): JSX.Element;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ interface IPreviewViz {
3
+ }
4
+ export declare function PreviewViz({}: IPreviewViz): JSX.Element;
5
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function EditVizConf(): JSX.Element;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ interface IPanelTitleBar {
3
+ }
4
+ export declare const PanelTitleBar: React.FunctionComponent<IPanelTitleBar>;
5
+ export {};
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ interface IVizBar3D {
3
+ conf: any;
4
+ data: any[];
5
+ width: number;
6
+ height: number;
7
+ }
8
+ export declare function VizBar3D({ conf, data, width, height }: IVizBar3D): JSX.Element;
9
+ export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { IVizPanelProps } from '../../../types';
3
+ export declare function VizBar3DPanel({ conf, setConf, data }: IVizPanelProps): JSX.Element;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { ICartesianChartConf } from './type';
3
+ interface ICartesianChart {
4
+ conf: ICartesianChartConf;
5
+ data: any[];
6
+ width: number;
7
+ height: number;
8
+ }
9
+ export declare function VizCartesianChart({ conf, data, width, height }: ICartesianChart): JSX.Element;
10
+ export {};
@@ -0,0 +1,20 @@
1
+ import { ICartesianChartConf, IRegressionLineConf, IRegressionTransform } from '../type';
2
+ interface IRegressionDataSetItem {
3
+ id: string;
4
+ fromDatasetId?: string;
5
+ source?: number[][];
6
+ transform?: IRegressionTransform;
7
+ }
8
+ interface IRegressionSeriesItem extends IRegressionLineConf {
9
+ datasetId: string;
10
+ xAxisId: string;
11
+ name: string;
12
+ showSymbol: boolean;
13
+ tooltip: Record<string, any>;
14
+ }
15
+ export declare function getRegressionConfs({ regressions }: ICartesianChartConf, data: any[]): {
16
+ regressionDataSets: IRegressionDataSetItem[];
17
+ regressionSeries: IRegressionSeriesItem[];
18
+ regressionXAxes: Record<string, any>[];
19
+ };
20
+ export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { IVizCartesianChartPanel } from '../type';
3
+ export declare function VizCartesianChartPanel({ conf, setConf, data }: IVizCartesianChartPanel): JSX.Element;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormGetValues, UseFormWatch } from 'react-hook-form';
3
+ import { ICartesianChartConf } from '../../type';
4
+ interface IRegressionsField {
5
+ control: Control<ICartesianChartConf, any>;
6
+ watch: UseFormWatch<ICartesianChartConf>;
7
+ getValues: UseFormGetValues<ICartesianChartConf>;
8
+ data: any[];
9
+ }
10
+ export declare function RegressionsField({ control, watch, getValues, data }: IRegressionsField): JSX.Element;
11
+ export {};
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFieldArrayRemove } from 'react-hook-form';
3
+ import { ICartesianChartConf, IRegressionConf } from '../../type';
4
+ interface IRegressionField {
5
+ control: Control<ICartesianChartConf, any>;
6
+ regressionItem: IRegressionConf;
7
+ index: number;
8
+ remove: UseFieldArrayRemove;
9
+ yAxisOptions: {
10
+ label: string;
11
+ value: string;
12
+ }[];
13
+ data: any[];
14
+ }
15
+ export declare function RegressionField({ control, regressionItem, index, remove, yAxisOptions, data }: IRegressionField): JSX.Element;
16
+ export {};
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { Control } from 'react-hook-form';
3
+ import { ICartesianChartConf } from '../../type';
4
+ interface IBarFields {
5
+ control: Control<ICartesianChartConf, any>;
6
+ index: number;
7
+ }
8
+ export declare function BarFields({ control, index }: IBarFields): JSX.Element;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { Control } from 'react-hook-form';
3
+ import { ICartesianChartConf } from '../../type';
4
+ interface ILineFields {
5
+ control: Control<ICartesianChartConf, any>;
6
+ index: number;
7
+ }
8
+ export declare function LineFields({ control, index }: ILineFields): JSX.Element;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { Control } from 'react-hook-form';
3
+ import { ICartesianChartConf } from '../../type';
4
+ interface IScatterFields {
5
+ control: Control<ICartesianChartConf, any>;
6
+ index: number;
7
+ }
8
+ export declare function ScatterFields({ control, index }: IScatterFields): JSX.Element;
9
+ export {};
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormGetValues, UseFormWatch } from 'react-hook-form';
3
+ import { ICartesianChartConf } from '../../type';
4
+ interface ISeriesField {
5
+ control: Control<ICartesianChartConf, any>;
6
+ watch: UseFormWatch<ICartesianChartConf>;
7
+ getValues: UseFormGetValues<ICartesianChartConf>;
8
+ data: any[];
9
+ }
10
+ export declare function SeriesField({ control, watch, getValues, data }: ISeriesField): JSX.Element;
11
+ export {};
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFieldArrayRemove } from 'react-hook-form';
3
+ import { ICartesianChartConf, ICartesianChartSeriesItem } from '../../type';
4
+ interface ISeriesItemField {
5
+ control: Control<ICartesianChartConf, any>;
6
+ index: number;
7
+ remove: UseFieldArrayRemove;
8
+ seriesItem: ICartesianChartSeriesItem;
9
+ yAxisOptions: {
10
+ label: string;
11
+ value: string;
12
+ }[];
13
+ data: any[];
14
+ }
15
+ export declare function SeriesItemField({ control, index, remove, seriesItem, yAxisOptions, data }: ISeriesItemField): JSX.Element;
16
+ export {};
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { ICartesianChartConf } from '../../type';
4
+ interface IVariablesField {
5
+ control: Control<ICartesianChartConf, any>;
6
+ watch: UseFormWatch<ICartesianChartConf>;
7
+ data: any[];
8
+ }
9
+ export declare function StatsField({ control, watch, data }: IVariablesField): JSX.Element;
10
+ export {};
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFieldArrayRemove } from 'react-hook-form';
3
+ import { ICartesianChartConf } from '../../type';
4
+ interface VariableField {
5
+ control: Control<ICartesianChartConf, any>;
6
+ index: number;
7
+ remove: UseFieldArrayRemove;
8
+ data: any[];
9
+ }
10
+ export declare function VariableField({ control, index, remove, data }: VariableField): JSX.Element;
11
+ export {};
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { ICartesianChartConf } from '../type';
4
+ interface IYAxesField {
5
+ control: Control<ICartesianChartConf, any>;
6
+ watch: UseFormWatch<ICartesianChartConf>;
7
+ }
8
+ export declare function YAxesField({ control, watch }: IYAxesField): JSX.Element;
9
+ export {};
@@ -0,0 +1,58 @@
1
+ import { IVizPanelProps } from '../../../types';
2
+ import { ITemplateVariable } from '../../../utils/template/types';
3
+ import { TNumbroFormat } from '../../settings/common/numbro-format-selector';
4
+ export interface ICartesianChartSeriesItem {
5
+ type: 'line' | 'bar' | 'scatter';
6
+ name: string;
7
+ showSymbol: false;
8
+ symbolSize: number;
9
+ y_axis_data_key: string;
10
+ yAxisIndex: number;
11
+ label_position?: string;
12
+ stack: string;
13
+ color?: string;
14
+ barWidth: string;
15
+ smooth: boolean;
16
+ step: false | 'start' | 'middle' | 'end';
17
+ }
18
+ export interface IYAxisConf {
19
+ name: string;
20
+ label_formatter: TNumbroFormat;
21
+ }
22
+ export interface IRegressionTransform {
23
+ type: 'ecStat:regression';
24
+ config: {
25
+ method: 'linear' | 'exponential' | 'logarithmic' | 'polynomial';
26
+ order: number;
27
+ formulaOn: 'end';
28
+ };
29
+ }
30
+ export interface IRegressionLineConf {
31
+ type: 'line';
32
+ yAxisIndex: number;
33
+ color: string;
34
+ }
35
+ export interface IRegressionConf {
36
+ transform: IRegressionTransform;
37
+ plot: IRegressionLineConf;
38
+ name: string;
39
+ y_axis_data_key: string;
40
+ }
41
+ export interface ICartesianChartConf {
42
+ x_axis_data_key: string;
43
+ x_axis_name: string;
44
+ y_axes: IYAxisConf[];
45
+ series: ICartesianChartSeriesItem[];
46
+ regressions: IRegressionConf[];
47
+ stats: {
48
+ templates: {
49
+ top: string;
50
+ bottom: string;
51
+ };
52
+ variables: ITemplateVariable[];
53
+ };
54
+ }
55
+ export interface IVizCartesianChartPanel extends Omit<IVizPanelProps, 'conf' | 'setConf'> {
56
+ conf: ICartesianChartConf;
57
+ setConf: (values: ICartesianChartConf) => void;
58
+ }
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { IVizConfig } from '../../types/dashboard';
3
+ interface IViz {
4
+ viz: IVizConfig;
5
+ data: any;
6
+ loading: boolean;
7
+ }
8
+ export declare const Viz: React.FunctionComponent<IViz>;
9
+ export {};