@devtable/dashboard 4.1.0 → 4.1.1
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/contexts/layout-state-context.d.ts +0 -1
- package/dist/contexts/model-context.d.ts +1384 -1384
- package/dist/dashboard.es.js +9871 -7245
- package/dist/dashboard.umd.js +17 -17
- package/dist/definition-editor/query-editor/form.d.ts +1 -0
- package/dist/definition-editor/select-data-source.d.ts +14 -0
- package/dist/filter/filter-query-field/index.d.ts +2 -2
- 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/model/dashboard.d.ts +916 -916
- 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 +224 -224
- package/dist/panel/settings/common/data-field-selector.d.ts +1 -0
- package/dist/panel/settings/common/numbro-format-selector.d.ts +1 -0
- 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 +2 -2
- 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/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 +0 -0
- 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 +0 -0
- package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/series/fields.bar.d.ts +0 -0
- package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/series/fields.line.d.ts +0 -0
- package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/series/fields.scatter.d.ts +0 -0
- package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/series/index.d.ts +2 -3
- package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/series/series-item.d.ts +0 -0
- package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/stats/index.d.ts +0 -0
- package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/stats/variable.d.ts +0 -0
- package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/y-axes.d.ts +0 -0
- 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 +1 -1
- package/dist/{panel/viz → plugins/viz-components}/stats/panel/variables.d.ts +1 -1
- 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 +2 -1
- 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 +3 -3
- 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/utils/aggregation.d.ts +9 -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/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
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import { PluginStorage } from '
|
|
1
|
+
import { IWatchOptions, PluginStorage } from '~/types/plugin';
|
|
2
2
|
export declare class JsonPluginStorage implements PluginStorage {
|
|
3
3
|
protected rootRef: {
|
|
4
4
|
current: Record<string, any>;
|
|
@@ -8,5 +8,5 @@ export declare class JsonPluginStorage implements PluginStorage {
|
|
|
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;
|
|
@@ -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: any) => any): 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, any>;
|
|
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, any>;
|
|
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, any>;
|
|
6
|
+
watch: UseFormWatch<IBoxplotChartConf>;
|
|
7
|
+
data: any[];
|
|
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, 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 {};
|
|
File without changes
|
|
@@ -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: any) => 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: any) => string>): {
|
|
3
|
+
axisLabel: {
|
|
4
|
+
show: boolean;
|
|
5
|
+
formatter: (p: any) => 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, any>;
|
|
6
|
+
watch: UseFormWatch<ICartesianChartConf>;
|
|
7
|
+
data: any[];
|
|
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
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/series/fields.scatter.d.ts
RENAMED
|
File without changes
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Control,
|
|
2
|
+
import { Control, UseFormWatch } from 'react-hook-form';
|
|
3
3
|
import { ICartesianChartConf } from '../../type';
|
|
4
4
|
interface ISeriesField {
|
|
5
5
|
control: Control<ICartesianChartConf, any>;
|
|
6
6
|
watch: UseFormWatch<ICartesianChartConf>;
|
|
7
|
-
getValues: UseFormGetValues<ICartesianChartConf>;
|
|
8
7
|
data: any[];
|
|
9
8
|
}
|
|
10
|
-
export declare function SeriesField({ control, watch,
|
|
9
|
+
export declare function SeriesField({ control, watch, data }: ISeriesField): JSX.Element;
|
|
11
10
|
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -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;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IRadarChartConf } from '../type';
|
|
2
|
+
export declare function getOption(conf: IRadarChartConf, data: any[]): {
|
|
3
|
+
legend: {
|
|
4
|
+
show: boolean;
|
|
5
|
+
bottom: number;
|
|
6
|
+
left: number;
|
|
7
|
+
};
|
|
8
|
+
tooltip: {
|
|
9
|
+
trigger: string;
|
|
10
|
+
};
|
|
11
|
+
} & {
|
|
12
|
+
radar: {
|
|
13
|
+
indicator: {
|
|
14
|
+
name: string;
|
|
15
|
+
max: number;
|
|
16
|
+
color: string | undefined;
|
|
17
|
+
}[];
|
|
18
|
+
};
|
|
19
|
+
series: {
|
|
20
|
+
type: string;
|
|
21
|
+
data: {
|
|
22
|
+
value: any[];
|
|
23
|
+
name: any;
|
|
24
|
+
}[];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Control, UseFormWatch } from 'react-hook-form';
|
|
3
|
+
import { IRadarChartConf } from '../type';
|
|
4
|
+
interface IDimensionsField {
|
|
5
|
+
control: Control<IRadarChartConf, any>;
|
|
6
|
+
watch: UseFormWatch<IRadarChartConf>;
|
|
7
|
+
data: any[];
|
|
8
|
+
}
|
|
9
|
+
export declare function DimensionsField({ control, watch, data }: IDimensionsField): JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface IRadarChartDimension {
|
|
2
|
+
name: string;
|
|
3
|
+
data_key: string;
|
|
4
|
+
max: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IRadarChartConf {
|
|
8
|
+
series_name_key: string;
|
|
9
|
+
dimensions: IRadarChartDimension[];
|
|
10
|
+
}
|
|
11
|
+
export declare const DEFAULT_CONFIG: IRadarChartConf;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IRegressionChartConf } from '../type';
|
|
3
|
+
export declare function getRegressionDescription(data: any[], conf?: IRegressionChartConf): {
|
|
4
|
+
expression: JSX.Element;
|
|
5
|
+
rSquared: any;
|
|
6
|
+
adjustedRSquared: number;
|
|
7
|
+
} | {
|
|
8
|
+
expression: string;
|
|
9
|
+
rSquared: any;
|
|
10
|
+
adjustedRSquared: number;
|
|
11
|
+
} | {
|
|
12
|
+
expression: string;
|
|
13
|
+
rSquared: number;
|
|
14
|
+
adjustedRSquared?: undefined;
|
|
15
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IRegressionLineConf } from '../../cartesian/type';
|
|
2
|
+
import { IRegressionChartConf } from '../type';
|
|
3
|
+
interface IRegressionSeriesItem extends IRegressionLineConf {
|
|
4
|
+
data: number[][];
|
|
5
|
+
name: string;
|
|
6
|
+
showSymbol: boolean;
|
|
7
|
+
tooltip: Record<string, any>;
|
|
8
|
+
smooth: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function getRegressionConf({ regression }: IRegressionChartConf, data: number[][]): {
|
|
11
|
+
regressionSeries: IRegressionSeriesItem[];
|
|
12
|
+
regressionXAxes: Record<string, any>[];
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE: this file is almost a duplicate of cartesian/panel/regressions/regression-item.tsx
|
|
3
|
+
* FIXME: extract common input widgets & configs, then improve this file
|
|
4
|
+
*/
|
|
5
|
+
/// <reference types="react" />
|
|
6
|
+
import { Control, UseFormWatch } from 'react-hook-form';
|
|
7
|
+
import { IRegressionChartConf } from './type';
|
|
8
|
+
interface IRegressionField {
|
|
9
|
+
control: Control<IRegressionChartConf, any>;
|
|
10
|
+
watch: UseFormWatch<IRegressionChartConf>;
|
|
11
|
+
data: any[];
|
|
12
|
+
}
|
|
13
|
+
export declare function RegressionField({ control, watch, data }: IRegressionField): JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IRegressionConf } from '../cartesian/type';
|
|
2
|
+
export interface IRegressionChartConf {
|
|
3
|
+
x_axis: {
|
|
4
|
+
name: string;
|
|
5
|
+
data_key: string;
|
|
6
|
+
};
|
|
7
|
+
y_axis: {
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
regression: IRegressionConf;
|
|
11
|
+
}
|
|
12
|
+
export declare const DEFAULT_CONFIG: IRegressionChartConf;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Editor } from '@mantine/rte';
|
|
3
|
+
/**
|
|
4
|
+
* Sync external changes to the editor
|
|
5
|
+
* see also https://github.com/mantinedev/mantine/issues/1625#issuecomment-1154506482
|
|
6
|
+
* @param content
|
|
7
|
+
*/
|
|
8
|
+
export declare function useSyncEditorContent(content?: string): import("react").RefObject<Editor>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Control, UseFieldArrayRemove } from 'react-hook-form';
|
|
3
|
-
import { IVizStatsConf } from '../
|
|
3
|
+
import { IVizStatsConf } from '../type';
|
|
4
4
|
interface VariableField {
|
|
5
5
|
control: Control<IVizStatsConf, any>;
|
|
6
6
|
index: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Control, UseFormWatch } from 'react-hook-form';
|
|
3
|
-
import { IVizStatsConf } from '../
|
|
3
|
+
import { IVizStatsConf } from '../type';
|
|
4
4
|
interface IVariablesField {
|
|
5
5
|
control: Control<IVizStatsConf, any>;
|
|
6
6
|
watch: UseFormWatch<IVizStatsConf>;
|