@devtable/dashboard 2.2.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.
- package/dist/dashboard.es.js +8052 -4307
- package/dist/dashboard.umd.js +41 -5
- package/package.json +22 -5
- package/dist/api-caller/index.d.ts +0 -20
- package/dist/api-caller/request.d.ts +0 -5
- package/dist/api-caller/types.d.ts +0 -11
- package/dist/contexts/context-info-context.d.ts +0 -5
- package/dist/contexts/dashboard-action-context.d.ts +0 -9
- package/dist/contexts/definition-context.d.ts +0 -7
- package/dist/contexts/filter-values-context.d.ts +0 -4
- package/dist/contexts/index.d.ts +0 -5
- package/dist/contexts/layout-state-context.d.ts +0 -11
- package/dist/contexts/panel-context.d.ts +0 -17
- package/dist/definition-editor/data-editor-modal.d.ts +0 -7
- package/dist/definition-editor/global-variables-guide.d.ts +0 -8
- package/dist/definition-editor/index.d.ts +0 -1
- package/dist/definition-editor/query-editor/data-preview.d.ts +0 -4
- package/dist/definition-editor/query-editor/editor.d.ts +0 -7
- package/dist/definition-editor/query-editor/form.d.ts +0 -8
- package/dist/definition-editor/query-editor/index.d.ts +0 -5
- package/dist/definition-editor/query-editor/preview-sql.d.ts +0 -6
- package/dist/definition-editor/query-editor/select-or-add-query.d.ts +0 -7
- package/dist/definition-editor/sql-snippet-editor/editor.d.ts +0 -5
- package/dist/definition-editor/sql-snippet-editor/index.d.ts +0 -5
- package/dist/definition-editor/sql-snippet-editor/preview-snippet.d.ts +0 -6
- package/dist/filter/filter-checkbox/editor.d.ts +0 -10
- package/dist/filter/filter-checkbox/render.d.ts +0 -9
- package/dist/filter/filter-date-range/editor.d.ts +0 -10
- package/dist/filter/filter-date-range/render.d.ts +0 -9
- package/dist/filter/filter-multi-select/editor.d.ts +0 -11
- package/dist/filter/filter-multi-select/render.d.ts +0 -9
- package/dist/filter/filter-query-field/index.d.ts +0 -8
- package/dist/filter/filter-query-field/select-data-source.d.ts +0 -8
- package/dist/filter/filter-select/editor.d.ts +0 -11
- package/dist/filter/filter-select/render.d.ts +0 -9
- package/dist/filter/filter-settings/filter-setting.d.ts +0 -11
- package/dist/filter/filter-settings/filter-settings.d.ts +0 -8
- package/dist/filter/filter-settings/index.d.ts +0 -10
- package/dist/filter/filter-settings/preview-filter.d.ts +0 -11
- package/dist/filter/filter-settings/types.d.ts +0 -4
- package/dist/filter/filter-text-input/editor.d.ts +0 -10
- package/dist/filter/filter-text-input/render.d.ts +0 -9
- package/dist/filter/filter.d.ts +0 -9
- package/dist/filter/index.d.ts +0 -9
- package/dist/index.d.ts +0 -5
- package/dist/layout/index.d.ts +0 -12
- package/dist/layout/read-only.d.ts +0 -9
- package/dist/main/actions.d.ts +0 -14
- package/dist/main/full-screen-panel.d.ts +0 -6
- package/dist/main/index.d.ts +0 -2
- package/dist/main/main.d.ts +0 -12
- package/dist/main/read-only.d.ts +0 -11
- package/dist/main/toggle-mode.d.ts +0 -8
- package/dist/main/use-filters.d.ts +0 -8
- package/dist/main/use-panel-full-screen.d.ts +0 -7
- package/dist/main/view-schema-modal.d.ts +0 -8
- package/dist/panel/error-boundary.d.ts +0 -13
- package/dist/panel/index.d.ts +0 -7
- package/dist/panel/panel-description.d.ts +0 -5
- package/dist/panel/settings/common/aggregation-selector.d.ts +0 -9
- package/dist/panel/settings/common/color-array-input.d.ts +0 -8
- package/dist/panel/settings/common/data-field-selector.d.ts +0 -12
- package/dist/panel/settings/common/mantine-color.d.ts +0 -7
- package/dist/panel/settings/common/mantine-font-weight.d.ts +0 -8
- package/dist/panel/settings/common/numbro-format-selector.d.ts +0 -13
- package/dist/panel/settings/common/text-array-input.d.ts +0 -8
- package/dist/panel/settings/index.d.ts +0 -7
- package/dist/panel/settings/panel-config/description.d.ts +0 -2
- package/dist/panel/settings/panel-config/index.d.ts +0 -5
- package/dist/panel/settings/panel-config/preview-panel.d.ts +0 -2
- package/dist/panel/settings/panel-config/title.d.ts +0 -2
- package/dist/panel/settings/pick-query/index.d.ts +0 -5
- package/dist/panel/settings/viz-config/index.d.ts +0 -5
- package/dist/panel/settings/viz-config/preview-viz.d.ts +0 -5
- package/dist/panel/settings/viz-config/viz-conf.d.ts +0 -2
- package/dist/panel/title-bar.d.ts +0 -5
- package/dist/panel/viz/bar-3d/index.d.ts +0 -9
- package/dist/panel/viz/bar-3d/panel.d.ts +0 -3
- package/dist/panel/viz/cartesian/index.d.ts +0 -10
- package/dist/panel/viz/cartesian/option/regression.d.ts +0 -20
- package/dist/panel/viz/cartesian/panel/index.d.ts +0 -3
- package/dist/panel/viz/cartesian/panel/regressions/index.d.ts +0 -11
- package/dist/panel/viz/cartesian/panel/regressions/regression-item.d.ts +0 -16
- package/dist/panel/viz/cartesian/panel/series/fields.bar.d.ts +0 -9
- package/dist/panel/viz/cartesian/panel/series/fields.line.d.ts +0 -9
- package/dist/panel/viz/cartesian/panel/series/fields.scatter.d.ts +0 -9
- package/dist/panel/viz/cartesian/panel/series/index.d.ts +0 -11
- package/dist/panel/viz/cartesian/panel/series/series-item.d.ts +0 -16
- package/dist/panel/viz/cartesian/panel/stats/index.d.ts +0 -10
- package/dist/panel/viz/cartesian/panel/stats/variable.d.ts +0 -11
- package/dist/panel/viz/cartesian/panel/y-axes.d.ts +0 -9
- package/dist/panel/viz/cartesian/type.d.ts +0 -58
- package/dist/panel/viz/index.d.ts +0 -9
- package/dist/panel/viz/pie/index.d.ts +0 -9
- package/dist/panel/viz/pie/panel.d.ts +0 -3
- package/dist/panel/viz/rich-text/index.d.ts +0 -10
- package/dist/panel/viz/rich-text/panel.d.ts +0 -3
- package/dist/panel/viz/rich-text/type.d.ts +0 -8
- package/dist/panel/viz/stats/index.d.ts +0 -10
- package/dist/panel/viz/stats/panel/index.d.ts +0 -10
- package/dist/panel/viz/stats/panel/variable.d.ts +0 -11
- package/dist/panel/viz/stats/panel/variables.d.ts +0 -10
- package/dist/panel/viz/stats/types.d.ts +0 -6
- package/dist/panel/viz/stats/update/index.d.ts +0 -15
- package/dist/panel/viz/sunburst/index.d.ts +0 -9
- package/dist/panel/viz/sunburst/panel.d.ts +0 -3
- package/dist/panel/viz/table/index.d.ts +0 -10
- package/dist/panel/viz/table/panel.d.ts +0 -3
- package/dist/panel/viz/table/type.d.ts +0 -21
- package/dist/panel/viz/table/value-type-selector.d.ts +0 -10
- package/dist/panel/viz/table/value.d.ts +0 -8
- package/dist/types/dashboard.d.ts +0 -49
- package/dist/types/filter.d.ts +0 -39
- package/dist/types/index.d.ts +0 -3
- package/dist/types/viz-panel.d.ts +0 -6
- package/dist/utils/aggregation.d.ts +0 -2
- package/dist/utils/color-mapping.d.ts +0 -9
- package/dist/utils/sql.d.ts +0 -8
- package/dist/utils/template/editor.d.ts +0 -16
- package/dist/utils/template/render.d.ts +0 -3
- package/dist/utils/template/types.d.ts +0 -21
- package/dist/vite-env.d.ts +0 -1
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { IDashboardFilter } from "./filter";
|
|
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: IDashboardFilter[];
|
|
46
|
-
}
|
|
47
|
-
export interface IDashboardConfig {
|
|
48
|
-
apiBaseURL: string;
|
|
49
|
-
}
|
package/dist/types/filter.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export interface IDashboardFilterOption {
|
|
2
|
-
label: string;
|
|
3
|
-
value: string;
|
|
4
|
-
}
|
|
5
|
-
export interface IDashboardFilterOptionQuery {
|
|
6
|
-
type: 'postgresql';
|
|
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;
|
|
39
|
-
}
|
package/dist/types/index.d.ts
DELETED
|
@@ -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
|
-
}
|
package/dist/utils/sql.d.ts
DELETED
|
@@ -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,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
|
-
}
|
package/dist/vite-env.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|