@devtable/dashboard 4.1.0 → 4.1.2
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 +1 -1
- package/dist/api-caller/request.d.ts +1 -1
- package/dist/contexts/layout-state-context.d.ts +0 -1
- package/dist/contexts/model-context.d.ts +1444 -1444
- package/dist/contexts/panel-context.d.ts +1 -1
- package/dist/dashboard.es.js +11033 -8417
- package/dist/dashboard.umd.js +26 -26
- package/dist/definition-editor/query-editor/form.d.ts +1 -0
- package/dist/definition-editor/query-editor/index.d.ts +1 -4
- package/dist/definition-editor/select-data-source.d.ts +14 -0
- package/dist/definition-editor/sql-snippet-editor/editor.d.ts +2 -5
- package/dist/definition-editor/sql-snippet-editor/index.d.ts +1 -4
- package/dist/filter/filter-checkbox/render.d.ts +3 -3
- package/dist/filter/filter-date-range/render.d.ts +2 -2
- package/dist/filter/filter-multi-select/render.d.ts +2 -2
- package/dist/filter/filter-query-field/index.d.ts +2 -2
- package/dist/filter/filter-select/render.d.ts +2 -2
- package/dist/filter/filter-settings/filter-settings.d.ts +2 -5
- package/dist/filter/filter-text-input/render.d.ts +2 -2
- package/dist/filter/filter.d.ts +2 -2
- package/dist/filter/index.d.ts +2 -5
- package/dist/global.d.ts +2 -0
- package/dist/interactions/attachment-instance-manager.d.ts +14 -0
- package/dist/interactions/components/interaction-settings.d.ts +13 -0
- package/dist/interactions/components/operation-select.d.ts +11 -0
- package/dist/interactions/components/trigger-config-model.d.ts +18 -0
- package/dist/interactions/components/trigger-select.d.ts +8 -0
- package/dist/interactions/components/variable-list.d.ts +7 -0
- package/dist/interactions/hooks/use-current-interaction-manager.d.ts +6 -0
- package/dist/interactions/hooks/use-watch-triggers.d.ts +2 -0
- package/dist/interactions/interaction-manager.d.ts +14 -0
- package/dist/interactions/operation/operation-manager-impl.d.ts +13 -0
- package/dist/interactions/operation/operations/console-log.d.ts +5 -0
- package/dist/interactions/operation/operations/index.d.ts +2 -0
- package/dist/interactions/operation/operations/open-link.d.ts +6 -0
- package/dist/interactions/trigger/trigger-manager-impl.d.ts +18 -0
- package/dist/layout/read-only.d.ts +2 -2
- package/dist/main/actions.d.ts +1 -1
- package/dist/main/main.d.ts +1 -1
- package/dist/main/view-schema-modal.d.ts +1 -1
- package/dist/model/context.d.ts +3 -3
- package/dist/model/dashboard.d.ts +956 -956
- package/dist/model/filters/filter/common.d.ts +2 -1
- package/dist/model/filters/filter/index.d.ts +10 -10
- package/dist/model/filters/filter/multi-select.d.ts +5 -4
- package/dist/model/filters/filter/select.d.ts +5 -4
- package/dist/model/filters/index.d.ts +227 -227
- package/dist/model/queries/index.d.ts +3 -3
- package/dist/model/queries/query.d.ts +1 -1
- package/dist/panel/error-boundary.d.ts +2 -2
- package/dist/panel/panel-description.d.ts +1 -4
- package/dist/panel/settings/common/data-field-selector.d.ts +2 -1
- package/dist/panel/settings/common/numbro-format-selector.d.ts +1 -0
- package/dist/panel/settings/panel-config/index.d.ts +1 -4
- package/dist/panel/settings/pick-query/index.d.ts +1 -4
- package/dist/panel/settings/viz-config/index.d.ts +1 -4
- package/dist/panel/settings/viz-config/preview-viz.d.ts +1 -4
- package/dist/panel/title-bar.d.ts +1 -4
- package/dist/panel/viz/index.d.ts +1 -1
- package/dist/plugins/color-manager/color-manager.d.ts +7 -0
- package/dist/plugins/color-manager/impl.d.ts +10 -0
- package/dist/plugins/color-manager/index.d.ts +2 -0
- package/dist/plugins/hooks/use-storage-data.d.ts +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/json-plugin-storage.d.ts +4 -4
- package/dist/plugins/message-channels.d.ts +1 -1
- package/dist/plugins/plugin-context.d.ts +3 -1
- package/dist/plugins/plugin-data-migrator/index.d.ts +1 -0
- package/dist/plugins/plugin-data-migrator/plugin-data-migrator.d.ts +3 -3
- package/dist/plugins/plugin-data-migrator/version-based-migrator.d.ts +18 -0
- package/dist/plugins/plugin-manager.d.ts +1 -2
- package/dist/plugins/sub-tree-json-plugin-storage.d.ts +10 -0
- package/dist/plugins/viz-components/bar-3d-chart/index.d.ts +2 -0
- package/dist/plugins/viz-components/bar-3d-chart/type.d.ts +13 -0
- package/dist/plugins/viz-components/bar-3d-chart/viz-bar-3d-chart-panel.d.ts +3 -0
- package/dist/plugins/viz-components/bar-3d-chart/viz-bar-3d-chart.d.ts +3 -0
- package/dist/plugins/viz-components/boxplot-chart/index.d.ts +2 -0
- package/dist/plugins/viz-components/boxplot-chart/reference-lines/index.d.ts +9 -0
- package/dist/plugins/viz-components/boxplot-chart/reference-lines/reference-line.d.ts +14 -0
- package/dist/plugins/viz-components/boxplot-chart/type.d.ts +20 -0
- package/dist/plugins/viz-components/boxplot-chart/variables/index.d.ts +10 -0
- package/dist/plugins/viz-components/boxplot-chart/variables/variable.d.ts +11 -0
- package/dist/plugins/viz-components/boxplot-chart/viz-boxplot-chart-panel.d.ts +3 -0
- package/dist/plugins/viz-components/boxplot-chart/viz-boxplot-chart.d.ts +3 -0
- package/dist/plugins/viz-components/cartesian/index.d.ts +2 -0
- package/dist/plugins/viz-components/cartesian/option/grid.d.ts +5 -0
- package/dist/plugins/viz-components/cartesian/option/index.d.ts +2 -0
- package/dist/{panel/viz → plugins/viz-components}/cartesian/option/regression.d.ts +2 -2
- package/dist/plugins/viz-components/cartesian/option/series.d.ts +2 -0
- package/dist/plugins/viz-components/cartesian/option/tooltip.d.ts +5 -0
- package/dist/plugins/viz-components/cartesian/option/x-axis.d.ts +2 -0
- package/dist/plugins/viz-components/cartesian/option/y-axis.d.ts +15 -0
- package/dist/plugins/viz-components/cartesian/panel/regressions/index.d.ts +10 -0
- package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/regressions/regression-item.d.ts +2 -2
- package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/series/fields.bar.d.ts +1 -1
- package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/series/fields.line.d.ts +1 -1
- package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/series/fields.scatter.d.ts +1 -1
- package/dist/plugins/viz-components/cartesian/panel/series/index.d.ts +10 -0
- package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/series/series-item.d.ts +2 -2
- package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/stats/index.d.ts +2 -2
- package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/stats/variable.d.ts +2 -2
- package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/y-axes.d.ts +1 -1
- package/dist/{panel/viz → plugins/viz-components}/cartesian/type.d.ts +5 -7
- package/dist/plugins/viz-components/cartesian/viz-cartesian-chart.d.ts +3 -0
- package/dist/plugins/viz-components/cartesian/viz-cartesian-panel.d.ts +3 -0
- package/dist/plugins/viz-components/pie-chart/index.d.ts +2 -0
- package/dist/plugins/viz-components/pie-chart/type.d.ts +5 -0
- package/dist/plugins/viz-components/pie-chart/viz-pie-chart-panel.d.ts +3 -0
- package/dist/plugins/viz-components/pie-chart/viz-pie-chart.d.ts +3 -0
- package/dist/plugins/viz-components/radar-chart/index.d.ts +2 -0
- package/dist/plugins/viz-components/radar-chart/option/index.d.ts +26 -0
- package/dist/plugins/viz-components/radar-chart/panel/dimensions.d.ts +10 -0
- package/dist/plugins/viz-components/radar-chart/type.d.ts +11 -0
- package/dist/plugins/viz-components/radar-chart/viz-radar-chart-panel.d.ts +3 -0
- package/dist/plugins/viz-components/radar-chart/viz-radar-chart.d.ts +3 -0
- package/dist/plugins/viz-components/regression-chart/index.d.ts +2 -0
- package/dist/plugins/viz-components/regression-chart/option/index.d.ts +2 -0
- package/dist/plugins/viz-components/regression-chart/option/regression-expression.d.ts +15 -0
- package/dist/plugins/viz-components/regression-chart/option/regression-series.d.ts +14 -0
- package/dist/plugins/viz-components/regression-chart/regression-item.d.ts +14 -0
- package/dist/plugins/viz-components/regression-chart/type.d.ts +12 -0
- package/dist/plugins/viz-components/regression-chart/viz-regression-chart-panel.d.ts +3 -0
- package/dist/plugins/viz-components/regression-chart/viz-regression-chart.d.ts +3 -0
- package/dist/plugins/viz-components/rich-text/hooks.d.ts +8 -0
- package/dist/plugins/viz-components/rich-text/index.d.ts +2 -0
- package/dist/plugins/viz-components/rich-text/type.d.ts +4 -0
- package/dist/plugins/viz-components/rich-text/viz-rich-text-panel.d.ts +3 -0
- package/dist/plugins/viz-components/rich-text/viz-rich-text.d.ts +3 -0
- package/dist/plugins/viz-components/stats/index.d.ts +2 -0
- package/dist/{panel/viz → plugins/viz-components}/stats/panel/variable.d.ts +3 -3
- package/dist/{panel/viz → plugins/viz-components}/stats/panel/variables.d.ts +3 -3
- package/dist/{panel/viz/stats/types.d.ts → plugins/viz-components/stats/type.d.ts} +2 -1
- package/dist/plugins/viz-components/stats/update/index.d.ts +5 -0
- package/dist/plugins/viz-components/stats/viz-stats-panel.d.ts +3 -0
- package/dist/plugins/viz-components/stats/viz-stats.d.ts +3 -0
- package/dist/plugins/viz-components/sunburst/index.d.ts +2 -0
- package/dist/plugins/viz-components/sunburst/type.d.ts +5 -0
- package/dist/plugins/viz-components/sunburst/viz-sunburst-panel.d.ts +3 -0
- package/dist/plugins/viz-components/sunburst/viz-sunburst.d.ts +3 -0
- package/dist/plugins/viz-components/table/index.d.ts +1 -1
- package/dist/plugins/viz-components/table/triggers/click-cell-content.d.ts +11 -0
- package/dist/plugins/viz-components/table/triggers/index.d.ts +1 -0
- package/dist/plugins/viz-components/table/value.d.ts +3 -2
- package/dist/plugins/viz-components/table/viz-table-panel.d.ts +1 -1
- package/dist/plugins/viz-components/table/viz-table.d.ts +2 -2
- package/dist/plugins/viz-manager/components.d.ts +5 -5
- package/dist/plugins/viz-manager/impl.d.ts +3 -3
- package/dist/plugins/viz-manager/types.d.ts +3 -7
- package/dist/types/dashboard.d.ts +2 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/plugin/index.d.ts +94 -8
- package/dist/types/utils.d.ts +4 -0
- package/dist/types/viz-panel.d.ts +1 -1
- package/dist/utils/aggregation.d.ts +9 -1
- package/dist/utils/download.d.ts +2 -2
- package/dist/utils/sql.d.ts +1 -1
- package/dist/utils/template/editor/index.d.ts +3 -0
- package/dist/utils/template/editor/template-input.d.ts +8 -0
- package/dist/utils/template/editor/utils.d.ts +2 -0
- package/dist/utils/template/editor/variable-field.d.ts +10 -0
- package/dist/utils/template/editor/variable-style.d.ts +8 -0
- package/dist/utils/template/index.d.ts +4 -0
- package/dist/utils/template/render/index.d.ts +2 -0
- package/dist/utils/template/{render.d.ts → render/render-jsx.d.ts} +1 -1
- package/dist/utils/template/render/render-string.d.ts +2 -0
- package/dist/utils/template/utils.d.ts +4 -0
- package/package.json +1 -1
- package/dist/filter/filter-query-field/select-data-source.d.ts +0 -8
- 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/panel/index.d.ts +0 -3
- package/dist/panel/viz/cartesian/panel/regressions/index.d.ts +0 -11
- package/dist/panel/viz/cartesian/panel/series/index.d.ts +0 -11
- 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/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/utils/template/editor.d.ts +0 -16
|
@@ -21,7 +21,7 @@ export declare const QueriesModel: import("mobx-state-tree").IModelType<{
|
|
|
21
21
|
sql: import("mobx-state-tree").ISimpleType<string>;
|
|
22
22
|
} & {
|
|
23
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<
|
|
24
|
+
data: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<string[] | number[], string[] | number[], string[] | number[]>>, [undefined]>;
|
|
25
25
|
error: import("mobx-state-tree").IType<any, any, any>;
|
|
26
26
|
}, {
|
|
27
27
|
readonly valid: string;
|
|
@@ -51,7 +51,7 @@ export declare const QueriesModel: import("mobx-state-tree").IModelType<{
|
|
|
51
51
|
key: string;
|
|
52
52
|
sql: string;
|
|
53
53
|
state: "idle" | "loading" | "error";
|
|
54
|
-
data: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IType<
|
|
54
|
+
data: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IType<string[] | number[], string[] | number[], string[] | number[]>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<string[] | number[], string[] | number[], string[] | number[]>>, [undefined]>>;
|
|
55
55
|
error: any;
|
|
56
56
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
57
57
|
readonly valid: string;
|
|
@@ -78,7 +78,7 @@ export declare const QueriesModel: import("mobx-state-tree").IModelType<{
|
|
|
78
78
|
sql: import("mobx-state-tree").ISimpleType<string>;
|
|
79
79
|
} & {
|
|
80
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<
|
|
81
|
+
data: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<string[] | number[], string[] | number[], string[] | number[]>>, [undefined]>;
|
|
82
82
|
error: import("mobx-state-tree").IType<any, any, any>;
|
|
83
83
|
}, {
|
|
84
84
|
readonly valid: string;
|
|
@@ -7,7 +7,7 @@ export declare const QueryModel: import("mobx-state-tree").IModelType<{
|
|
|
7
7
|
sql: import("mobx-state-tree").ISimpleType<string>;
|
|
8
8
|
} & {
|
|
9
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<
|
|
10
|
+
data: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IType<string[] | number[], string[] | number[], string[] | number[]>>, [undefined]>;
|
|
11
11
|
error: import("mobx-state-tree").IType<any, any, any>;
|
|
12
12
|
}, {
|
|
13
13
|
readonly valid: string;
|
|
@@ -3,11 +3,11 @@ declare type PropType = {
|
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
};
|
|
5
5
|
declare type StateType = {
|
|
6
|
-
error: null |
|
|
6
|
+
error: null | $TSFixMe;
|
|
7
7
|
};
|
|
8
8
|
export declare class ErrorBoundary extends React.Component<PropType, StateType> {
|
|
9
9
|
constructor(props: PropType);
|
|
10
|
-
componentDidCatch(error:
|
|
10
|
+
componentDidCatch(error: $TSFixMe): void;
|
|
11
11
|
render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
|
|
12
12
|
}
|
|
13
13
|
export {};
|
|
@@ -5,7 +5,8 @@ interface IDataFieldSelector {
|
|
|
5
5
|
required?: boolean;
|
|
6
6
|
value: string;
|
|
7
7
|
onChange: (v: string) => void;
|
|
8
|
-
data:
|
|
8
|
+
data: $TSFixMe[];
|
|
9
|
+
clearable?: boolean;
|
|
9
10
|
sx?: Sx;
|
|
10
11
|
}
|
|
11
12
|
export declare const DataFieldSelector: React.ForwardRefExoticComponent<IDataFieldSelector & React.RefAttributes<unknown>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IColorPaletteItem, ISingleColor } from '~/types/plugin';
|
|
2
|
+
export interface IColorManager {
|
|
3
|
+
getStaticColors(): ISingleColor[];
|
|
4
|
+
register<T extends IColorPaletteItem>(paletteItem: T): void;
|
|
5
|
+
decodeStaticColor(key: string): ISingleColor | undefined;
|
|
6
|
+
encodeColor(color: ISingleColor): string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IColorPaletteItem, IPluginManager, ISingleColor } from '~/types/plugin';
|
|
2
|
+
import { IColorManager } from '~/plugins/color-manager';
|
|
3
|
+
export declare class ColorManager implements IColorManager {
|
|
4
|
+
protected staticColors: Map<string, ISingleColor>;
|
|
5
|
+
constructor(pluginManager: IPluginManager);
|
|
6
|
+
getStaticColors(): ISingleColor[];
|
|
7
|
+
register<T extends IColorPaletteItem>(paletteItem: T): void;
|
|
8
|
+
decodeStaticColor(key: string): ISingleColor | undefined;
|
|
9
|
+
encodeColor(color: IColorPaletteItem): string;
|
|
10
|
+
}
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { PluginStorage } from '
|
|
1
|
+
import { IWatchOptions, PluginStorage } from '~/types/plugin';
|
|
2
2
|
export declare class JsonPluginStorage implements PluginStorage {
|
|
3
3
|
protected rootRef: {
|
|
4
|
-
current: Record<string,
|
|
4
|
+
current: Record<string, $TSFixMe>;
|
|
5
5
|
};
|
|
6
|
-
constructor(initValue: Record<string,
|
|
6
|
+
constructor(initValue: Record<string, $TSFixMe>);
|
|
7
7
|
deleteItem(key: string): Promise<void>;
|
|
8
8
|
getItem<T>(key: string | null): Promise<T>;
|
|
9
9
|
private getValueFromRoot;
|
|
10
10
|
setItem<T>(key: string | null, item: T): Promise<T>;
|
|
11
|
-
watchItem<T>(key: string | null, callback: (value: T, previous?: T) => void): () => void;
|
|
11
|
+
watchItem<T>(key: string | null, callback: (value: T, previous?: T) => void, options?: IWatchOptions): () => void;
|
|
12
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import EventEmitter2 from 'eventemitter2';
|
|
2
|
-
import { IMessageChannels } from '
|
|
2
|
+
import { IMessageChannels } from '~/types/plugin';
|
|
3
3
|
export declare class MessageChannels implements IMessageChannels {
|
|
4
4
|
private channels;
|
|
5
5
|
globalChannel: EventEmitter2;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { IPluginManager } from '
|
|
2
|
+
import { IPluginManager } from '~/types/plugin';
|
|
3
|
+
import { IColorManager } from './color-manager';
|
|
3
4
|
import { PluginManager } from './plugin-manager';
|
|
4
5
|
import { VizManager } from './viz-manager';
|
|
5
6
|
interface IPluginContextProps {
|
|
6
7
|
pluginManager: IPluginManager;
|
|
7
8
|
vizManager: VizManager;
|
|
9
|
+
colorManager: IColorManager;
|
|
8
10
|
}
|
|
9
11
|
export declare const pluginManager: PluginManager;
|
|
10
12
|
export declare const createPluginContext: () => IPluginContextProps;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
interface IMigration {
|
|
2
2
|
version: number;
|
|
3
|
-
handler: (data:
|
|
3
|
+
handler: (data: $TSFixMe) => $TSFixMe;
|
|
4
4
|
}
|
|
5
5
|
export declare class PluginDataMigrator {
|
|
6
6
|
protected migrations: IMigration[];
|
|
7
|
-
version(version: number, handler: (data:
|
|
7
|
+
version(version: number, handler: (data: $TSFixMe) => $TSFixMe): PluginDataMigrator;
|
|
8
8
|
run(migrationTarget: {
|
|
9
9
|
from: number;
|
|
10
10
|
to: number;
|
|
11
|
-
}, val:
|
|
11
|
+
}, val: $TSFixMe): any;
|
|
12
12
|
}
|
|
13
13
|
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IVizComponentMigrator, VizComponentMigrationContext } from '~/types/plugin';
|
|
2
|
+
import { PluginDataMigrator } from './plugin-data-migrator';
|
|
3
|
+
/**
|
|
4
|
+
* Instance version is read from the `instanceData.version` field.
|
|
5
|
+
* Current version is read from the `VERSION` field.
|
|
6
|
+
* If the instance version is less than the current version,
|
|
7
|
+
* the migrator will run.
|
|
8
|
+
* You can implement the `configVersions` method to
|
|
9
|
+
* specify how migrations are performed.
|
|
10
|
+
*/
|
|
11
|
+
export declare abstract class VersionBasedMigrator extends PluginDataMigrator implements IVizComponentMigrator {
|
|
12
|
+
abstract readonly VERSION: number;
|
|
13
|
+
abstract configVersions(): void;
|
|
14
|
+
constructor();
|
|
15
|
+
version(version: number, handler: (data: $TSFixMe) => $TSFixMe): PluginDataMigrator;
|
|
16
|
+
migrate({ instanceData }: VizComponentMigrationContext): Promise<void>;
|
|
17
|
+
needMigration({ instanceData }: VizComponentMigrationContext): Promise<boolean>;
|
|
18
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDashboardPlugin, IPluginManager, VizComponent } from '
|
|
1
|
+
import { IDashboardPlugin, IPluginManager, VizComponent } from '~/types/plugin';
|
|
2
2
|
export declare class PluginManager implements IPluginManager {
|
|
3
3
|
/**
|
|
4
4
|
* Id to plugin map
|
|
@@ -9,7 +9,6 @@ export declare class PluginManager implements IPluginManager {
|
|
|
9
9
|
* Name to component map
|
|
10
10
|
*/
|
|
11
11
|
private vizComponents;
|
|
12
|
-
constructor();
|
|
13
12
|
factory: {
|
|
14
13
|
viz: (name: string) => VizComponent;
|
|
15
14
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IWatchOptions, PluginStorage } from '~/types/plugin';
|
|
2
|
+
export declare class SubTreeJsonPluginStorage implements PluginStorage {
|
|
3
|
+
protected root: PluginStorage;
|
|
4
|
+
protected path: string;
|
|
5
|
+
constructor(root: PluginStorage, path: string);
|
|
6
|
+
deleteItem(key: string): Promise<void>;
|
|
7
|
+
getItem<T>(key: string | null): Promise<T>;
|
|
8
|
+
setItem<T>(key: string | null, item: T): Promise<T>;
|
|
9
|
+
watchItem<T>(key: string | null, callback: (value: T, previous?: T) => void, options?: IWatchOptions): () => void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface Axis3DType {
|
|
2
|
+
type: string;
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
|
+
export interface IBar3dChartConf {
|
|
6
|
+
x_axis_data_key: string;
|
|
7
|
+
y_axis_data_key: string;
|
|
8
|
+
z_axis_data_key: string;
|
|
9
|
+
xAxis3D: Axis3DType;
|
|
10
|
+
yAxis3D: Axis3DType;
|
|
11
|
+
zAxis3D: Axis3DType;
|
|
12
|
+
}
|
|
13
|
+
export declare const DEFAULT_CONFIG: IBar3dChartConf;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Control, UseFormWatch } from 'react-hook-form';
|
|
3
|
+
import { IBoxplotChartConf } from '../type';
|
|
4
|
+
interface IReferenceLinesField {
|
|
5
|
+
control: Control<IBoxplotChartConf, $TSFixMe>;
|
|
6
|
+
watch: UseFormWatch<IBoxplotChartConf>;
|
|
7
|
+
}
|
|
8
|
+
export declare function ReferenceLinesField({ control, watch }: IReferenceLinesField): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Control, UseFieldArrayRemove } from 'react-hook-form';
|
|
3
|
+
import { IBoxplotChartConf } from '../type';
|
|
4
|
+
interface IReferenceLineField {
|
|
5
|
+
control: Control<IBoxplotChartConf, $TSFixMe>;
|
|
6
|
+
index: number;
|
|
7
|
+
remove: UseFieldArrayRemove;
|
|
8
|
+
variableOptions: {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}[];
|
|
12
|
+
}
|
|
13
|
+
export declare function ReferenceLineField({ control, index, remove, variableOptions }: IReferenceLineField): JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ITemplateVariable } from '~/utils/template';
|
|
2
|
+
export interface IBoxplotReferenceLine {
|
|
3
|
+
name: string;
|
|
4
|
+
template: string;
|
|
5
|
+
variable_key: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IBoxplotChartConf {
|
|
8
|
+
x_axis: {
|
|
9
|
+
name: string;
|
|
10
|
+
data_key: string;
|
|
11
|
+
};
|
|
12
|
+
y_axis: {
|
|
13
|
+
name: string;
|
|
14
|
+
data_key: string;
|
|
15
|
+
};
|
|
16
|
+
color: string;
|
|
17
|
+
variables: ITemplateVariable[];
|
|
18
|
+
reference_lines: IBoxplotReferenceLine[];
|
|
19
|
+
}
|
|
20
|
+
export declare const DEFAULT_CONFIG: IBoxplotChartConf;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Control, UseFormWatch } from 'react-hook-form';
|
|
3
|
+
import { IBoxplotChartConf } from '../type';
|
|
4
|
+
interface IVariablesField {
|
|
5
|
+
control: Control<IBoxplotChartConf, $TSFixMe>;
|
|
6
|
+
watch: UseFormWatch<IBoxplotChartConf>;
|
|
7
|
+
data: $TSFixMe[];
|
|
8
|
+
}
|
|
9
|
+
export declare function VariablesField({ 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 { IBoxplotChartConf } from '../type';
|
|
4
|
+
interface VariableField {
|
|
5
|
+
control: Control<IBoxplotChartConf, $TSFixMe>;
|
|
6
|
+
index: number;
|
|
7
|
+
remove: UseFieldArrayRemove;
|
|
8
|
+
data: $TSFixMe[];
|
|
9
|
+
}
|
|
10
|
+
export declare function VariableField({ control, index, remove, data }: VariableField): JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -10,9 +10,9 @@ interface IRegressionSeriesItem extends IRegressionLineConf {
|
|
|
10
10
|
xAxisId: string;
|
|
11
11
|
name: string;
|
|
12
12
|
showSymbol: boolean;
|
|
13
|
-
tooltip: Record<string,
|
|
13
|
+
tooltip: Record<string, $TSFixMe>;
|
|
14
14
|
}
|
|
15
|
-
export declare function getRegressionConfs({ regressions }: ICartesianChartConf, data:
|
|
15
|
+
export declare function getRegressionConfs({ regressions }: ICartesianChartConf, data: $TSFixMe[]): {
|
|
16
16
|
regressionDataSets: IRegressionDataSetItem[];
|
|
17
17
|
regressionSeries: IRegressionSeriesItem[];
|
|
18
18
|
regressionXAxes: Record<string, any>[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TopLevelFormatterParams } from 'echarts/types/dist/shared';
|
|
2
|
+
import { ICartesianChartConf } from '../type';
|
|
3
|
+
export declare function getTooltip(conf: ICartesianChartConf, labelFormatters: Record<string, (p: $TSFixMe) => string>): {
|
|
4
|
+
formatter: (params: TopLevelFormatterParams) => string;
|
|
5
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ICartesianChartConf } from '../type';
|
|
2
|
+
export declare function getYAxes(conf: ICartesianChartConf, labelFormatters: Record<string, (p: $TSFixMe) => string>): {
|
|
3
|
+
axisLabel: {
|
|
4
|
+
show: boolean;
|
|
5
|
+
formatter: (p: $TSFixMe) => string;
|
|
6
|
+
};
|
|
7
|
+
nameTextStyle: {
|
|
8
|
+
fontWeight: string;
|
|
9
|
+
align: string;
|
|
10
|
+
};
|
|
11
|
+
nameLocation: string;
|
|
12
|
+
nameGap: number;
|
|
13
|
+
name: string;
|
|
14
|
+
label_formatter: import("../../../../panel/settings/common/numbro-format-selector").TNumbroFormat;
|
|
15
|
+
}[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Control, UseFormWatch } from 'react-hook-form';
|
|
3
|
+
import { ICartesianChartConf } from '../../type';
|
|
4
|
+
interface IRegressionsField {
|
|
5
|
+
control: Control<ICartesianChartConf, $TSFixMe>;
|
|
6
|
+
watch: UseFormWatch<ICartesianChartConf>;
|
|
7
|
+
data: $TSFixMe[];
|
|
8
|
+
}
|
|
9
|
+
export declare function RegressionsField({ control, watch, data }: IRegressionsField): JSX.Element;
|
|
10
|
+
export {};
|
package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/regressions/regression-item.d.ts
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Control, UseFieldArrayRemove } from 'react-hook-form';
|
|
3
3
|
import { ICartesianChartConf, IRegressionConf } from '../../type';
|
|
4
4
|
interface IRegressionField {
|
|
5
|
-
control: Control<ICartesianChartConf,
|
|
5
|
+
control: Control<ICartesianChartConf, $TSFixMe>;
|
|
6
6
|
regressionItem: IRegressionConf;
|
|
7
7
|
index: number;
|
|
8
8
|
remove: UseFieldArrayRemove;
|
|
@@ -10,7 +10,7 @@ interface IRegressionField {
|
|
|
10
10
|
label: string;
|
|
11
11
|
value: string;
|
|
12
12
|
}[];
|
|
13
|
-
data:
|
|
13
|
+
data: $TSFixMe[];
|
|
14
14
|
}
|
|
15
15
|
export declare function RegressionField({ control, regressionItem, index, remove, yAxisOptions, data }: IRegressionField): JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Control } from 'react-hook-form';
|
|
3
3
|
import { ICartesianChartConf } from '../../type';
|
|
4
4
|
interface IBarFields {
|
|
5
|
-
control: Control<ICartesianChartConf,
|
|
5
|
+
control: Control<ICartesianChartConf, $TSFixMe>;
|
|
6
6
|
index: number;
|
|
7
7
|
}
|
|
8
8
|
export declare function BarFields({ control, index }: IBarFields): JSX.Element;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Control } from 'react-hook-form';
|
|
3
3
|
import { ICartesianChartConf } from '../../type';
|
|
4
4
|
interface ILineFields {
|
|
5
|
-
control: Control<ICartesianChartConf,
|
|
5
|
+
control: Control<ICartesianChartConf, $TSFixMe>;
|
|
6
6
|
index: number;
|
|
7
7
|
}
|
|
8
8
|
export declare function LineFields({ control, index }: ILineFields): JSX.Element;
|
package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/series/fields.scatter.d.ts
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Control } from 'react-hook-form';
|
|
3
3
|
import { ICartesianChartConf } from '../../type';
|
|
4
4
|
interface IScatterFields {
|
|
5
|
-
control: Control<ICartesianChartConf,
|
|
5
|
+
control: Control<ICartesianChartConf, $TSFixMe>;
|
|
6
6
|
index: number;
|
|
7
7
|
}
|
|
8
8
|
export declare function ScatterFields({ control, index }: IScatterFields): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Control, UseFormWatch } from 'react-hook-form';
|
|
3
|
+
import { ICartesianChartConf } from '../../type';
|
|
4
|
+
interface ISeriesField {
|
|
5
|
+
control: Control<ICartesianChartConf, $TSFixMe>;
|
|
6
|
+
watch: UseFormWatch<ICartesianChartConf>;
|
|
7
|
+
data: $TSFixMe[];
|
|
8
|
+
}
|
|
9
|
+
export declare function SeriesField({ control, watch, data }: ISeriesField): JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Control, UseFieldArrayRemove } from 'react-hook-form';
|
|
3
3
|
import { ICartesianChartConf, ICartesianChartSeriesItem } from '../../type';
|
|
4
4
|
interface ISeriesItemField {
|
|
5
|
-
control: Control<ICartesianChartConf,
|
|
5
|
+
control: Control<ICartesianChartConf, $TSFixMe>;
|
|
6
6
|
index: number;
|
|
7
7
|
remove: UseFieldArrayRemove;
|
|
8
8
|
seriesItem: ICartesianChartSeriesItem;
|
|
@@ -10,7 +10,7 @@ interface ISeriesItemField {
|
|
|
10
10
|
label: string;
|
|
11
11
|
value: string;
|
|
12
12
|
}[];
|
|
13
|
-
data:
|
|
13
|
+
data: $TSFixMe[];
|
|
14
14
|
}
|
|
15
15
|
export declare function SeriesItemField({ control, index, remove, seriesItem, yAxisOptions, data }: ISeriesItemField): JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { Control, UseFormWatch } from 'react-hook-form';
|
|
3
3
|
import { ICartesianChartConf } from '../../type';
|
|
4
4
|
interface IVariablesField {
|
|
5
|
-
control: Control<ICartesianChartConf,
|
|
5
|
+
control: Control<ICartesianChartConf, $TSFixMe>;
|
|
6
6
|
watch: UseFormWatch<ICartesianChartConf>;
|
|
7
|
-
data:
|
|
7
|
+
data: $TSFixMe[];
|
|
8
8
|
}
|
|
9
9
|
export declare function StatsField({ control, watch, data }: IVariablesField): JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { Control, UseFieldArrayRemove } from 'react-hook-form';
|
|
3
3
|
import { ICartesianChartConf } from '../../type';
|
|
4
4
|
interface VariableField {
|
|
5
|
-
control: Control<ICartesianChartConf,
|
|
5
|
+
control: Control<ICartesianChartConf, $TSFixMe>;
|
|
6
6
|
index: number;
|
|
7
7
|
remove: UseFieldArrayRemove;
|
|
8
|
-
data:
|
|
8
|
+
data: $TSFixMe[];
|
|
9
9
|
}
|
|
10
10
|
export declare function VariableField({ control, index, remove, data }: VariableField): JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Control, UseFormWatch } from 'react-hook-form';
|
|
3
3
|
import { ICartesianChartConf } from '../type';
|
|
4
4
|
interface IYAxesField {
|
|
5
|
-
control: Control<ICartesianChartConf,
|
|
5
|
+
control: Control<ICartesianChartConf, $TSFixMe>;
|
|
6
6
|
watch: UseFormWatch<ICartesianChartConf>;
|
|
7
7
|
}
|
|
8
8
|
export declare function YAxesField({ control, watch }: IYAxesField): JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ITemplateVariable } from '
|
|
3
|
-
import { TNumbroFormat } from '../../settings/common/numbro-format-selector';
|
|
1
|
+
import { TNumbroFormat } from '~/panel/settings/common/numbro-format-selector';
|
|
2
|
+
import { ITemplateVariable } from '~/utils/template';
|
|
4
3
|
export interface ICartesianChartSeriesItem {
|
|
5
4
|
type: 'line' | 'bar' | 'scatter';
|
|
6
5
|
name: string;
|
|
@@ -12,8 +11,10 @@ export interface ICartesianChartSeriesItem {
|
|
|
12
11
|
stack: string;
|
|
13
12
|
color?: string;
|
|
14
13
|
barWidth: string;
|
|
14
|
+
barGap?: string;
|
|
15
15
|
smooth: boolean;
|
|
16
16
|
step: false | 'start' | 'middle' | 'end';
|
|
17
|
+
group_by_key: string;
|
|
17
18
|
}
|
|
18
19
|
export interface IYAxisConf {
|
|
19
20
|
name: string;
|
|
@@ -52,7 +53,4 @@ export interface ICartesianChartConf {
|
|
|
52
53
|
variables: ITemplateVariable[];
|
|
53
54
|
};
|
|
54
55
|
}
|
|
55
|
-
export
|
|
56
|
-
conf: ICartesianChartConf;
|
|
57
|
-
setConf: (values: ICartesianChartConf) => void;
|
|
58
|
-
}
|
|
56
|
+
export declare const DEFAULT_CONFIG: ICartesianChartConf;
|