@devtable/dashboard 2.4.0 → 2.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.
Files changed (131) hide show
  1. package/dist/dashboard.es.js +8251 -14258
  2. package/dist/dashboard.umd.js +38 -19
  3. package/package.json +18 -4
  4. package/dist/api-caller/index.d.ts +0 -20
  5. package/dist/api-caller/request.d.ts +0 -5
  6. package/dist/api-caller/types.d.ts +0 -11
  7. package/dist/contexts/context-info-context.d.ts +0 -5
  8. package/dist/contexts/dashboard-action-context.d.ts +0 -9
  9. package/dist/contexts/definition-context.d.ts +0 -7
  10. package/dist/contexts/filter-values-context.d.ts +0 -4
  11. package/dist/contexts/index.d.ts +0 -5
  12. package/dist/contexts/layout-state-context.d.ts +0 -11
  13. package/dist/contexts/panel-context.d.ts +0 -17
  14. package/dist/definition-editor/data-editor-modal.d.ts +0 -7
  15. package/dist/definition-editor/global-variables-guide.d.ts +0 -8
  16. package/dist/definition-editor/index.d.ts +0 -1
  17. package/dist/definition-editor/query-editor/data-preview.d.ts +0 -4
  18. package/dist/definition-editor/query-editor/editor.d.ts +0 -7
  19. package/dist/definition-editor/query-editor/form.d.ts +0 -8
  20. package/dist/definition-editor/query-editor/index.d.ts +0 -5
  21. package/dist/definition-editor/query-editor/preview-sql.d.ts +0 -6
  22. package/dist/definition-editor/query-editor/select-or-add-query.d.ts +0 -7
  23. package/dist/definition-editor/sql-snippet-editor/editor.d.ts +0 -5
  24. package/dist/definition-editor/sql-snippet-editor/index.d.ts +0 -5
  25. package/dist/definition-editor/sql-snippet-editor/preview-snippet.d.ts +0 -6
  26. package/dist/filter/filter-checkbox/editor.d.ts +0 -8
  27. package/dist/filter/filter-checkbox/render.d.ts +0 -10
  28. package/dist/filter/filter-date-range/editor.d.ts +0 -7
  29. package/dist/filter/filter-date-range/render.d.ts +0 -10
  30. package/dist/filter/filter-multi-select/editor.d.ts +0 -7
  31. package/dist/filter/filter-multi-select/render.d.ts +0 -10
  32. package/dist/filter/filter-query-field/index.d.ts +0 -8
  33. package/dist/filter/filter-query-field/select-data-source.d.ts +0 -8
  34. package/dist/filter/filter-query-field/test-query.d.ts +0 -7
  35. package/dist/filter/filter-select/editor.d.ts +0 -7
  36. package/dist/filter/filter-select/render.d.ts +0 -10
  37. package/dist/filter/filter-settings/filter-setting.d.ts +0 -8
  38. package/dist/filter/filter-settings/filter-settings.d.ts +0 -7
  39. package/dist/filter/filter-settings/index.d.ts +0 -9
  40. package/dist/filter/filter-settings/preview-filter.d.ts +0 -7
  41. package/dist/filter/filter-text-input/editor.d.ts +0 -7
  42. package/dist/filter/filter-text-input/render.d.ts +0 -10
  43. package/dist/filter/filter.d.ts +0 -9
  44. package/dist/filter/index.d.ts +0 -9
  45. package/dist/index.d.ts +0 -5
  46. package/dist/layout/index.d.ts +0 -12
  47. package/dist/layout/read-only.d.ts +0 -9
  48. package/dist/main/actions.d.ts +0 -14
  49. package/dist/main/full-screen-panel.d.ts +0 -6
  50. package/dist/main/index.d.ts +0 -2
  51. package/dist/main/main.d.ts +0 -12
  52. package/dist/main/read-only.d.ts +0 -11
  53. package/dist/main/toggle-mode.d.ts +0 -8
  54. package/dist/main/use-filters.d.ts +0 -2128
  55. package/dist/main/use-panel-full-screen.d.ts +0 -7
  56. package/dist/main/view-schema-modal.d.ts +0 -8
  57. package/dist/model/dashboard.d.ts +0 -8103
  58. package/dist/model/filter/checkbox.d.ts +0 -16
  59. package/dist/model/filter/common.d.ts +0 -14
  60. package/dist/model/filter/date-range.d.ts +0 -28
  61. package/dist/model/filter/index.d.ts +0 -172
  62. package/dist/model/filter/multi-select.d.ts +0 -81
  63. package/dist/model/filter/select.d.ts +0 -95
  64. package/dist/model/filter/text-input.d.ts +0 -22
  65. package/dist/model/index.d.ts +0 -2
  66. package/dist/panel/error-boundary.d.ts +0 -13
  67. package/dist/panel/index.d.ts +0 -7
  68. package/dist/panel/panel-description.d.ts +0 -5
  69. package/dist/panel/settings/common/aggregation-selector.d.ts +0 -9
  70. package/dist/panel/settings/common/color-array-input.d.ts +0 -8
  71. package/dist/panel/settings/common/data-field-selector.d.ts +0 -12
  72. package/dist/panel/settings/common/mantine-color.d.ts +0 -7
  73. package/dist/panel/settings/common/mantine-font-weight.d.ts +0 -8
  74. package/dist/panel/settings/common/numbro-format-selector.d.ts +0 -13
  75. package/dist/panel/settings/common/text-array-input.d.ts +0 -8
  76. package/dist/panel/settings/index.d.ts +0 -7
  77. package/dist/panel/settings/panel-config/description.d.ts +0 -2
  78. package/dist/panel/settings/panel-config/index.d.ts +0 -5
  79. package/dist/panel/settings/panel-config/preview-panel.d.ts +0 -2
  80. package/dist/panel/settings/panel-config/title.d.ts +0 -2
  81. package/dist/panel/settings/pick-query/index.d.ts +0 -5
  82. package/dist/panel/settings/viz-config/index.d.ts +0 -5
  83. package/dist/panel/settings/viz-config/preview-viz.d.ts +0 -5
  84. package/dist/panel/settings/viz-config/viz-conf.d.ts +0 -2
  85. package/dist/panel/title-bar.d.ts +0 -5
  86. package/dist/panel/viz/bar-3d/index.d.ts +0 -9
  87. package/dist/panel/viz/bar-3d/panel.d.ts +0 -3
  88. package/dist/panel/viz/cartesian/index.d.ts +0 -10
  89. package/dist/panel/viz/cartesian/option/regression.d.ts +0 -20
  90. package/dist/panel/viz/cartesian/panel/index.d.ts +0 -3
  91. package/dist/panel/viz/cartesian/panel/regressions/index.d.ts +0 -11
  92. package/dist/panel/viz/cartesian/panel/regressions/regression-item.d.ts +0 -16
  93. package/dist/panel/viz/cartesian/panel/series/fields.bar.d.ts +0 -9
  94. package/dist/panel/viz/cartesian/panel/series/fields.line.d.ts +0 -9
  95. package/dist/panel/viz/cartesian/panel/series/fields.scatter.d.ts +0 -9
  96. package/dist/panel/viz/cartesian/panel/series/index.d.ts +0 -11
  97. package/dist/panel/viz/cartesian/panel/series/series-item.d.ts +0 -16
  98. package/dist/panel/viz/cartesian/panel/stats/index.d.ts +0 -10
  99. package/dist/panel/viz/cartesian/panel/stats/variable.d.ts +0 -11
  100. package/dist/panel/viz/cartesian/panel/y-axes.d.ts +0 -9
  101. package/dist/panel/viz/cartesian/type.d.ts +0 -58
  102. package/dist/panel/viz/index.d.ts +0 -9
  103. package/dist/panel/viz/pie/index.d.ts +0 -9
  104. package/dist/panel/viz/pie/panel.d.ts +0 -3
  105. package/dist/panel/viz/rich-text/index.d.ts +0 -10
  106. package/dist/panel/viz/rich-text/panel.d.ts +0 -3
  107. package/dist/panel/viz/rich-text/type.d.ts +0 -8
  108. package/dist/panel/viz/stats/index.d.ts +0 -10
  109. package/dist/panel/viz/stats/panel/index.d.ts +0 -10
  110. package/dist/panel/viz/stats/panel/variable.d.ts +0 -11
  111. package/dist/panel/viz/stats/panel/variables.d.ts +0 -10
  112. package/dist/panel/viz/stats/types.d.ts +0 -6
  113. package/dist/panel/viz/stats/update/index.d.ts +0 -15
  114. package/dist/panel/viz/sunburst/index.d.ts +0 -9
  115. package/dist/panel/viz/sunburst/panel.d.ts +0 -3
  116. package/dist/panel/viz/table/index.d.ts +0 -10
  117. package/dist/panel/viz/table/panel.d.ts +0 -3
  118. package/dist/panel/viz/table/type.d.ts +0 -21
  119. package/dist/panel/viz/table/value-type-selector.d.ts +0 -10
  120. package/dist/panel/viz/table/value.d.ts +0 -8
  121. package/dist/types/dashboard.d.ts +0 -49
  122. package/dist/types/filter.d.ts +0 -7
  123. package/dist/types/index.d.ts +0 -3
  124. package/dist/types/viz-panel.d.ts +0 -6
  125. package/dist/utils/aggregation.d.ts +0 -2
  126. package/dist/utils/color-mapping.d.ts +0 -9
  127. package/dist/utils/sql.d.ts +0 -8
  128. package/dist/utils/template/editor.d.ts +0 -16
  129. package/dist/utils/template/render.d.ts +0 -3
  130. package/dist/utils/template/types.d.ts +0 -21
  131. package/dist/vite-env.d.ts +0 -1
@@ -1,10 +0,0 @@
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 {};
@@ -1,20 +0,0 @@
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 {};
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { IVizCartesianChartPanel } from '../type';
3
- export declare function VizCartesianChartPanel({ conf, setConf, data }: IVizCartesianChartPanel): JSX.Element;
@@ -1,11 +0,0 @@
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 {};
@@ -1,16 +0,0 @@
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 {};
@@ -1,9 +0,0 @@
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 {};
@@ -1,9 +0,0 @@
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 {};
@@ -1,9 +0,0 @@
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 {};
@@ -1,11 +0,0 @@
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 {};
@@ -1,16 +0,0 @@
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 {};
@@ -1,10 +0,0 @@
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 {};
@@ -1,11 +0,0 @@
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 {};
@@ -1,9 +0,0 @@
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 {};
@@ -1,58 +0,0 @@
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
- }
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { IVizConfig } from '../../types/dashboard';
3
- interface IViz {
4
- viz: IVizConfig;
5
- data: any;
6
- loading: boolean;
7
- }
8
- export declare function Viz({ viz, data, loading }: IViz): JSX.Element;
9
- export {};
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- interface IVizPie {
3
- conf: any;
4
- data: any[];
5
- width: number;
6
- height: number;
7
- }
8
- export declare function VizPie({ conf, data, width, height }: IVizPie): JSX.Element;
9
- export {};
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { IVizPanelProps } from '../../../types/viz-panel';
3
- export declare function VizPiePanel({ conf: { label_field, value_field }, setConf, data }: IVizPanelProps): JSX.Element;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { IRichTextConf } from './type';
3
- interface IRichText {
4
- conf: IRichTextConf;
5
- data: any[];
6
- width: number;
7
- height: number;
8
- }
9
- export declare function VizRichText({ conf, width, height }: IRichText): JSX.Element | null;
10
- export {};
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { IVizRichTextPanel } from './type';
3
- export declare function VizRichTextPanel({ conf, setConf }: IVizRichTextPanel): JSX.Element;
@@ -1,8 +0,0 @@
1
- import { IVizPanelProps } from '../../../types';
2
- export interface IRichTextConf {
3
- content: '';
4
- }
5
- export interface IVizRichTextPanel extends Omit<IVizPanelProps, 'conf' | 'setConf'> {
6
- conf: IRichTextConf;
7
- setConf: (values: IRichTextConf) => void;
8
- }
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { IVizStatsConf } from './types';
3
- interface IVizStats {
4
- conf: IVizStatsConf;
5
- data: any;
6
- width: number;
7
- height: number;
8
- }
9
- export declare function VizStats({ conf: { template, variables, align }, data }: IVizStats): JSX.Element;
10
- export {};
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { IVizPanelProps } from '../../../../types/viz-panel';
3
- import { IVizStatsConf } from '../types';
4
- import { ILegacyStatsConf } from '../update';
5
- interface IVizStatsPanel extends Omit<IVizPanelProps, 'conf' | 'setConf'> {
6
- conf: IVizStatsConf | ILegacyStatsConf;
7
- setConf: (conf: IVizStatsConf) => void;
8
- }
9
- export declare function VizStatsPanel({ conf, setConf, data }: IVizStatsPanel): JSX.Element;
10
- export {};
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- import { Control, UseFieldArrayRemove } from 'react-hook-form';
3
- import { IVizStatsConf } from '../types';
4
- interface VariableField {
5
- control: Control<IVizStatsConf, 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 {};
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { Control, UseFormWatch } from 'react-hook-form';
3
- import { IVizStatsConf } from '../types';
4
- interface IVariablesField {
5
- control: Control<IVizStatsConf, any>;
6
- watch: UseFormWatch<IVizStatsConf>;
7
- data: any[];
8
- }
9
- export declare function VariablesField({ control, watch, data }: IVariablesField): JSX.Element;
10
- export {};
@@ -1,6 +0,0 @@
1
- import { ITemplateVariable } from '../../../utils/template/types';
2
- export interface IVizStatsConf {
3
- align: 'center';
4
- template: string;
5
- variables: ITemplateVariable[];
6
- }
@@ -1,15 +0,0 @@
1
- import { TNumbroFormat } from '../../../settings/common/numbro-format-selector';
2
- import { IVizStatsConf } from '../types';
3
- export interface ILegacyStatsConf {
4
- align: 'center';
5
- size: string;
6
- weight: string;
7
- color: any;
8
- content: {
9
- prefix: string;
10
- data_field: string;
11
- formatter: TNumbroFormat;
12
- postfix: string;
13
- };
14
- }
15
- export declare function updateSchema(legacyConf: IVizStatsConf | ILegacyStatsConf): IVizStatsConf;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- interface ISunbrust {
3
- conf: any;
4
- data: any[];
5
- width: number;
6
- height: number;
7
- }
8
- export declare function Sunbrust({ conf, data, width, height }: ISunbrust): JSX.Element;
9
- export {};
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { IVizPanelProps } from '../../../types/viz-panel';
3
- export declare function SunburstPanel({ conf: { label_field, value_field }, setConf, data }: IVizPanelProps): JSX.Element;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { ITableConf } from './type';
3
- interface IVizTable {
4
- conf: ITableConf;
5
- data: any;
6
- width: number;
7
- height: number;
8
- }
9
- export declare function VizTable({ conf, data, width, height }: IVizTable): JSX.Element;
10
- export {};
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { IVizPanelProps } from '../../../types/viz-panel';
3
- export declare function VizTablePanel({ conf: { columns, ...restConf }, setConf, data }: IVizPanelProps): JSX.Element;
@@ -1,21 +0,0 @@
1
- export declare enum ValueType {
2
- string = "string",
3
- number = "number",
4
- eloc = "eloc",
5
- percentage = "percentage"
6
- }
7
- export interface IColumnConf {
8
- label: string;
9
- value_field: string;
10
- value_type: ValueType;
11
- }
12
- export interface ITableConf {
13
- id_field: string;
14
- use_raw_columns: boolean;
15
- columns: IColumnConf[];
16
- fontSize: string;
17
- horizontalSpacing: string;
18
- verticalSpacing: string;
19
- striped: boolean;
20
- highlightOnHover: boolean;
21
- }
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { Sx } from '@mantine/core';
3
- interface IValueTypeSelector {
4
- label: string;
5
- value: string;
6
- onChange: (value: string) => void;
7
- sx?: Sx;
8
- }
9
- export declare function ValueTypeSelector({ label, value, onChange, sx }: IValueTypeSelector): JSX.Element;
10
- export {};
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import { ValueType } from './type';
3
- interface ICellValue {
4
- value: any;
5
- type: ValueType;
6
- }
7
- export declare function CellValue({ value, type }: ICellValue): JSX.Element;
8
- export {};
@@ -1,49 +0,0 @@
1
- import { FilterModelInstance } from '../model';
2
- export interface IVizConfig {
3
- type: string;
4
- conf: Record<string, any>;
5
- }
6
- export interface IQuery {
7
- type: 'postgresql';
8
- key: string;
9
- sql: string;
10
- id: string;
11
- }
12
- export interface IDashboardPanel {
13
- id: string;
14
- title: string;
15
- description: string;
16
- layout: {
17
- x: number;
18
- y: number;
19
- w: number;
20
- h: number;
21
- moved?: boolean;
22
- static?: boolean;
23
- };
24
- queryID: string;
25
- viz: IVizConfig;
26
- }
27
- export declare enum DashboardMode {
28
- Use = "use",
29
- Layout = "layout",
30
- Edit = "edit"
31
- }
32
- export interface ISQLSnippet {
33
- key: string;
34
- value: string;
35
- }
36
- export interface IDashboardDefinition {
37
- sqlSnippets: ISQLSnippet[];
38
- queries: IQuery[];
39
- }
40
- export interface IDashboard {
41
- id: string;
42
- name: string;
43
- definition: IDashboardDefinition;
44
- panels: IDashboardPanel[];
45
- filters: FilterModelInstance[];
46
- }
47
- export interface IDashboardConfig {
48
- apiBaseURL: string;
49
- }
@@ -1,7 +0,0 @@
1
- export declare enum DashboardFilterType {
2
- Select = "select",
3
- MultiSelect = "multi-select",
4
- TextInput = "text-input",
5
- Checkbox = "checkbox",
6
- DateRange = "date-range"
7
- }
@@ -1,3 +0,0 @@
1
- export * from './dashboard';
2
- export * from './filter';
3
- export * from './viz-panel';
@@ -1,6 +0,0 @@
1
- import { IVizConfig } from './dashboard';
2
- export interface IVizPanelProps {
3
- conf: IVizConfig['conf'];
4
- setConf: (conf: IVizConfig['conf']) => void;
5
- data: any[];
6
- }
@@ -1,2 +0,0 @@
1
- export declare type AggregationType = 'none' | 'sum' | 'mean' | 'median' | 'max' | 'min';
2
- export declare function aggregateValue(data: Record<string, number>[], data_field: string, aggregation: AggregationType): number;
@@ -1,9 +0,0 @@
1
- export interface InterpolateColorOption {
2
- valueRange: number[];
3
- colorRange: string[];
4
- }
5
- export declare class InterpolateColor {
6
- mapper: (v: number) => string;
7
- constructor({ valueRange, colorRange }: InterpolateColorOption);
8
- getColor(value: number): string;
9
- }
@@ -1,8 +0,0 @@
1
- import { ContextInfoContextType, FilterValuesContextType } from '../contexts';
2
- import { IDashboardDefinition } from '../types';
3
- export declare function explainSQLSnippet(snippet: string, context: ContextInfoContextType): any;
4
- export declare function formatSQL(sql: string, params: Record<string, any>): any;
5
- export declare function getSQLParams(context: ContextInfoContextType, definitions: IDashboardDefinition, filterValues: FilterValuesContextType): Record<string, any> & ContextInfoContextType & {
6
- filters: FilterValuesContextType;
7
- };
8
- export declare function explainSQL(sql: string, context: ContextInfoContextType, definitions: IDashboardDefinition, filterValues: FilterValuesContextType): any;
@@ -1,16 +0,0 @@
1
- import { TextInputProps } from '@mantine/core';
2
- import React, { ChangeEventHandler } from 'react';
3
- import { ITemplateVariable } from './types';
4
- export declare function getANewVariable(): ITemplateVariable;
5
- interface ITemplateInput extends Omit<TextInputProps, 'value' | 'onChange'> {
6
- value: string;
7
- onChange: ChangeEventHandler<HTMLInputElement>;
8
- }
9
- export declare const TemplateInput: React.ForwardRefExoticComponent<ITemplateInput & React.RefAttributes<unknown>>;
10
- interface ITemplateVariableField {
11
- value: ITemplateVariable;
12
- onChange: (v: ITemplateVariable) => void;
13
- data: any[];
14
- }
15
- export declare const TemplateVariableField: React.ForwardRefExoticComponent<ITemplateVariableField & React.RefAttributes<unknown>>;
16
- export {};
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { ITemplateVariable } from './types';
3
- export declare function templateToJSX(template: string, variables: ITemplateVariable[], data: Record<string, number>[]): (JSX.Element | import("react").ReactNode[])[];
@@ -1,21 +0,0 @@
1
- import { TNumbroFormat } from '../../panel/settings/common/numbro-format-selector';
2
- import { AggregationType } from '../aggregation';
3
- export declare type ColorConfType = {
4
- type: 'static';
5
- staticColor: string;
6
- } | {
7
- type: 'continuous';
8
- valueRange: number[];
9
- colorRange: string[];
10
- } | {
11
- type: 'piecewise';
12
- };
13
- export interface ITemplateVariable {
14
- name: string;
15
- data_field: string;
16
- aggregation: AggregationType;
17
- formatter: TNumbroFormat;
18
- color: ColorConfType;
19
- size: string;
20
- weight: string;
21
- }
@@ -1 +0,0 @@
1
- /// <reference types="vite/client" />