@devtable/dashboard 2.1.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-caller/index.d.ts +3 -3
- package/dist/contexts/context-info-context.d.ts +1 -1
- package/dist/contexts/dashboard-action-context.d.ts +1 -1
- package/dist/contexts/definition-context.d.ts +2 -2
- package/dist/contexts/filter-values-context.d.ts +1 -1
- package/dist/contexts/layout-state-context.d.ts +2 -2
- package/dist/contexts/panel-context.d.ts +2 -2
- package/dist/dashboard.es.js +10465 -713
- package/dist/dashboard.umd.js +22 -5
- package/dist/definition-editor/global-variables-guide.d.ts +1 -1
- package/dist/definition-editor/query-editor/editor.d.ts +1 -1
- package/dist/definition-editor/query-editor/form.d.ts +1 -1
- package/dist/definition-editor/query-editor/select-or-add-query.d.ts +1 -1
- package/dist/filter/filter-checkbox/editor.d.ts +3 -5
- package/dist/filter/filter-checkbox/render.d.ts +3 -2
- package/dist/filter/filter-date-range/editor.d.ts +3 -6
- package/dist/filter/filter-date-range/render.d.ts +3 -2
- package/dist/filter/filter-multi-select/editor.d.ts +3 -7
- package/dist/filter/filter-multi-select/render.d.ts +4 -3
- package/dist/filter/filter-query-field/index.d.ts +5 -5
- package/dist/filter/filter-query-field/select-data-source.d.ts +5 -5
- package/dist/filter/filter-query-field/test-query.d.ts +7 -0
- package/dist/filter/filter-select/editor.d.ts +3 -7
- package/dist/filter/filter-select/render.d.ts +3 -2
- package/dist/filter/filter-settings/filter-setting.d.ts +4 -7
- package/dist/filter/filter-settings/filter-settings.d.ts +4 -5
- package/dist/filter/filter-settings/index.d.ts +3 -4
- package/dist/filter/filter-settings/preview-filter.d.ts +4 -8
- package/dist/filter/filter-text-input/editor.d.ts +3 -6
- package/dist/filter/filter-text-input/render.d.ts +3 -2
- package/dist/filter/filter.d.ts +3 -3
- package/dist/filter/index.d.ts +2 -2
- package/dist/layout/index.d.ts +2 -2
- package/dist/layout/read-only.d.ts +2 -2
- package/dist/main/actions.d.ts +5 -5
- package/dist/main/full-screen-panel.d.ts +1 -1
- package/dist/main/main.d.ts +4 -4
- package/dist/main/read-only.d.ts +3 -3
- package/dist/main/toggle-mode.d.ts +2 -2
- package/dist/main/use-filters.d.ts +2124 -4
- package/dist/main/use-panel-full-screen.d.ts +1 -1
- package/dist/model/dashboard.d.ts +8103 -0
- package/dist/model/filter/checkbox.d.ts +16 -0
- package/dist/model/filter/common.d.ts +14 -0
- package/dist/model/filter/date-range.d.ts +28 -0
- package/dist/model/filter/index.d.ts +172 -0
- package/dist/model/filter/multi-select.d.ts +81 -0
- package/dist/model/filter/select.d.ts +95 -0
- package/dist/model/filter/text-input.d.ts +22 -0
- package/dist/model/index.d.ts +2 -0
- package/dist/panel/error-boundary.d.ts +1 -1
- package/dist/panel/settings/common/aggregation-selector.d.ts +2 -2
- package/dist/panel/settings/common/color-array-input.d.ts +1 -1
- package/dist/panel/settings/common/data-field-selector.d.ts +2 -2
- package/dist/panel/settings/common/mantine-color.d.ts +1 -1
- package/dist/panel/settings/common/mantine-font-weight.d.ts +1 -1
- package/dist/panel/settings/common/numbro-format-selector.d.ts +1 -1
- package/dist/panel/settings/common/text-array-input.d.ts +1 -1
- package/dist/panel/viz/bar-3d/panel.d.ts +1 -1
- package/dist/panel/viz/cartesian/panel/index.d.ts +1 -1
- package/dist/panel/viz/cartesian/panel/regressions/index.d.ts +2 -2
- package/dist/panel/viz/cartesian/panel/regressions/regression-item.d.ts +2 -2
- package/dist/panel/viz/cartesian/panel/series/fields.bar.d.ts +3 -3
- package/dist/panel/viz/cartesian/panel/series/index.d.ts +2 -2
- package/dist/panel/viz/cartesian/panel/series/series-item.d.ts +2 -2
- package/dist/panel/viz/cartesian/panel/stats/index.d.ts +2 -2
- package/dist/panel/viz/cartesian/panel/stats/variable.d.ts +2 -2
- package/dist/panel/viz/cartesian/panel/y-axes.d.ts +2 -2
- package/dist/panel/viz/cartesian/type.d.ts +3 -3
- package/dist/panel/viz/index.d.ts +1 -1
- package/dist/panel/viz/pie/panel.d.ts +1 -1
- package/dist/panel/viz/rich-text/panel.d.ts +1 -1
- package/dist/panel/viz/rich-text/type.d.ts +1 -1
- package/dist/panel/viz/stats/panel/index.d.ts +3 -3
- package/dist/panel/viz/stats/panel/variable.d.ts +2 -2
- package/dist/panel/viz/stats/panel/variables.d.ts +2 -2
- package/dist/panel/viz/stats/types.d.ts +1 -1
- package/dist/panel/viz/stats/update/index.d.ts +2 -2
- package/dist/panel/viz/sunburst/panel.d.ts +1 -1
- package/dist/panel/viz/table/index.d.ts +1 -1
- package/dist/panel/viz/table/panel.d.ts +1 -1
- package/dist/panel/viz/table/value-type-selector.d.ts +1 -1
- package/dist/panel/viz/table/value.d.ts +1 -1
- package/dist/types/dashboard.d.ts +2 -2
- package/dist/types/filter.d.ts +6 -38
- package/dist/types/viz-panel.d.ts +1 -1
- package/dist/utils/sql.d.ts +2 -2
- package/dist/utils/template/editor.d.ts +3 -3
- package/dist/utils/template/render.d.ts +1 -1
- package/dist/utils/template/types.d.ts +2 -2
- package/package.json +5 -2
- package/dist/filter/filter-settings/types.d.ts +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { IVizPanelProps } from
|
|
3
|
-
import { IVizStatsConf } from
|
|
4
|
-
import { ILegacyStatsConf } from
|
|
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
|
|
3
|
-
import { IVizStatsConf } from
|
|
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
|
|
3
|
-
import { IVizStatsConf } from
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import { TNumbroFormat } from
|
|
2
|
-
import { IVizStatsConf } from
|
|
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
|
|
2
|
+
import { IVizPanelProps } from '../../../types/viz-panel';
|
|
3
3
|
export declare function SunburstPanel({ conf: { label_field, value_field }, setConf, data }: IVizPanelProps): JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { IVizPanelProps } from
|
|
2
|
+
import { IVizPanelProps } from '../../../types/viz-panel';
|
|
3
3
|
export declare function VizTablePanel({ conf: { columns, ...restConf }, setConf, data }: IVizPanelProps): JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FilterModelInstance } from '../model';
|
|
2
2
|
export interface IVizConfig {
|
|
3
3
|
type: string;
|
|
4
4
|
conf: Record<string, any>;
|
|
@@ -42,7 +42,7 @@ export interface IDashboard {
|
|
|
42
42
|
name: string;
|
|
43
43
|
definition: IDashboardDefinition;
|
|
44
44
|
panels: IDashboardPanel[];
|
|
45
|
-
filters:
|
|
45
|
+
filters: FilterModelInstance[];
|
|
46
46
|
}
|
|
47
47
|
export interface IDashboardConfig {
|
|
48
48
|
apiBaseURL: string;
|
package/dist/types/filter.d.ts
CHANGED
|
@@ -1,39 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
key: string;
|
|
8
|
-
sql: string;
|
|
9
|
-
}
|
|
10
|
-
export interface IFilterConfig_Select {
|
|
11
|
-
required: boolean;
|
|
12
|
-
default_value: string;
|
|
13
|
-
static_options: IDashboardFilterOption[];
|
|
14
|
-
options_query: IDashboardFilterOptionQuery;
|
|
15
|
-
}
|
|
16
|
-
export interface IFilterConfig_MultiSelect {
|
|
17
|
-
default_value: string[];
|
|
18
|
-
static_options: IDashboardFilterOption[];
|
|
19
|
-
options_query: IDashboardFilterOptionQuery;
|
|
20
|
-
}
|
|
21
|
-
export interface IFilterConfig_TextInput {
|
|
22
|
-
required: boolean;
|
|
23
|
-
default_value: string;
|
|
24
|
-
}
|
|
25
|
-
export interface IFilterConfig_DateRange {
|
|
26
|
-
inputFormat: 'YYYY' | 'YYYY-MM' | 'YYYY-MM-DD';
|
|
27
|
-
clearable: boolean;
|
|
28
|
-
required: boolean;
|
|
29
|
-
}
|
|
30
|
-
export interface IFilterConfig_Checkbox {
|
|
31
|
-
default_value: boolean;
|
|
32
|
-
}
|
|
33
|
-
export interface IDashboardFilter {
|
|
34
|
-
key: string;
|
|
35
|
-
label: string;
|
|
36
|
-
order: number;
|
|
37
|
-
type: 'select' | 'multi-select' | 'text-input' | 'checkbox' | 'date-range';
|
|
38
|
-
config: IFilterConfig_Select | IFilterConfig_MultiSelect | IFilterConfig_TextInput | IFilterConfig_DateRange | IFilterConfig_Checkbox;
|
|
1
|
+
export declare enum DashboardFilterType {
|
|
2
|
+
Select = "select",
|
|
3
|
+
MultiSelect = "multi-select",
|
|
4
|
+
TextInput = "text-input",
|
|
5
|
+
Checkbox = "checkbox",
|
|
6
|
+
DateRange = "date-range"
|
|
39
7
|
}
|
package/dist/utils/sql.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ContextInfoContextType, FilterValuesContextType } from
|
|
2
|
-
import { IDashboardDefinition } from
|
|
1
|
+
import { ContextInfoContextType, FilterValuesContextType } from '../contexts';
|
|
2
|
+
import { IDashboardDefinition } from '../types';
|
|
3
3
|
export declare function explainSQLSnippet(snippet: string, context: ContextInfoContextType): any;
|
|
4
4
|
export declare function formatSQL(sql: string, params: Record<string, any>): any;
|
|
5
5
|
export declare function getSQLParams(context: ContextInfoContextType, definitions: IDashboardDefinition, filterValues: FilterValuesContextType): Record<string, any> & ContextInfoContextType & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TextInputProps } from
|
|
2
|
-
import React, { ChangeEventHandler } from
|
|
3
|
-
import { ITemplateVariable } from
|
|
1
|
+
import { TextInputProps } from '@mantine/core';
|
|
2
|
+
import React, { ChangeEventHandler } from 'react';
|
|
3
|
+
import { ITemplateVariable } from './types';
|
|
4
4
|
export declare function getANewVariable(): ITemplateVariable;
|
|
5
5
|
interface ITemplateInput extends Omit<TextInputProps, 'value' | 'onChange'> {
|
|
6
6
|
value: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ITemplateVariable } from
|
|
2
|
+
import { ITemplateVariable } from './types';
|
|
3
3
|
export declare function templateToJSX(template: string, variables: ITemplateVariable[], data: Record<string, number>[]): (JSX.Element | import("react").ReactNode[])[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TNumbroFormat } from
|
|
2
|
-
import { AggregationType } from
|
|
1
|
+
import { TNumbroFormat } from '../../panel/settings/common/numbro-format-selector';
|
|
2
|
+
import { AggregationType } from '../aggregation';
|
|
3
3
|
export declare type ColorConfType = {
|
|
4
4
|
type: 'static';
|
|
5
5
|
staticColor: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devtable/dashboard",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -76,6 +76,9 @@
|
|
|
76
76
|
"echarts-gl": "^2.0.9",
|
|
77
77
|
"echarts-stat": "1.2.0",
|
|
78
78
|
"lodash": "^4.17.21",
|
|
79
|
+
"mobx": "^6.6.1",
|
|
80
|
+
"mobx-react-lite": "^3.4.0",
|
|
81
|
+
"mobx-state-tree": "^5.1.5",
|
|
79
82
|
"numbro": "^2.3.6",
|
|
80
83
|
"react": "^16.8.0 || 17.x || 18.x",
|
|
81
84
|
"react-dom": "^16.8.0 || 17.x || 18.x",
|
|
@@ -83,4 +86,4 @@
|
|
|
83
86
|
"react-hook-form": "^7.31.2",
|
|
84
87
|
"tabler-icons-react": "^1.48.0"
|
|
85
88
|
}
|
|
86
|
-
}
|
|
89
|
+
}
|