@devtable/dashboard 13.2.1 → 13.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.
@@ -0,0 +1,3 @@
1
+ export * from './visual-map-editor';
2
+ export * from './types';
3
+ export * from './utils';
@@ -0,0 +1,82 @@
1
+ import { TNumberOrDynamic } from '../number-or-dynamic-value';
2
+ import { ChartingOrientation } from '../orientation';
3
+ export type VisualMapType = 'continuous' | 'piecewise';
4
+ export type VisualMapHorizontalAlign = 'left' | 'center' | 'right' | number;
5
+ export type VisualMapVerticalAlign = 'top' | 'center' | 'bottom' | number;
6
+ export type VisualMapSkipRange = {
7
+ min: string | '';
8
+ lt_min: string | '';
9
+ max: string | '';
10
+ gt_max: string | '';
11
+ };
12
+ export type ContinuousVisualMap = {
13
+ type: 'continuous';
14
+ id: string;
15
+ min: TNumberOrDynamic;
16
+ max: TNumberOrDynamic;
17
+ orient: ChartingOrientation;
18
+ left: VisualMapHorizontalAlign;
19
+ top: VisualMapVerticalAlign;
20
+ text: [string, string];
21
+ calculable: boolean;
22
+ itemWidth: number;
23
+ itemHeight: number;
24
+ show: boolean;
25
+ inRange: {
26
+ color: string[];
27
+ };
28
+ skipRange: VisualMapSkipRange;
29
+ };
30
+ export type PiecewiseVisualMap = {
31
+ type: 'piecewise';
32
+ id: string;
33
+ min: TNumberOrDynamic;
34
+ max: TNumberOrDynamic;
35
+ orient: ChartingOrientation;
36
+ left: VisualMapHorizontalAlign;
37
+ top: VisualMapVerticalAlign;
38
+ text: [string, string];
39
+ calculable: boolean;
40
+ itemWidth: number;
41
+ itemHeight: number;
42
+ show: boolean;
43
+ inRange: {
44
+ color: string[];
45
+ };
46
+ };
47
+ export type VisualMap = ContinuousVisualMap | PiecewiseVisualMap;
48
+ export type ContinuousVisualMapOption = {
49
+ type: 'continuous';
50
+ id: string;
51
+ min: number;
52
+ max: number;
53
+ orient: ChartingOrientation;
54
+ left: VisualMapHorizontalAlign;
55
+ top: VisualMapVerticalAlign;
56
+ text: [string, string];
57
+ calculable: boolean;
58
+ itemWidth: number;
59
+ itemHeight: number;
60
+ show: boolean;
61
+ inRange: {
62
+ color: string[];
63
+ };
64
+ };
65
+ export type PiecewiseVisualMapOption = {
66
+ type: 'piecewise';
67
+ id: string;
68
+ min: TNumberOrDynamic;
69
+ max: TNumberOrDynamic;
70
+ orient: ChartingOrientation;
71
+ left: VisualMapHorizontalAlign;
72
+ top: VisualMapVerticalAlign;
73
+ text: [string, string];
74
+ calculable: boolean;
75
+ itemWidth: number;
76
+ itemHeight: number;
77
+ show: boolean;
78
+ inRange: {
79
+ color: string[];
80
+ };
81
+ };
82
+ export type VisualMapOption = ContinuousVisualMapOption | PiecewiseVisualMapOption;
@@ -0,0 +1,48 @@
1
+ import { VisualMap } from './types';
2
+ export declare function getDefaultDepthVisualMap(): VisualMap;
3
+ export declare function getVisualMapPalettes(): {
4
+ compared: string[];
5
+ level: string[];
6
+ depth: string[];
7
+ yellow_blue: string[];
8
+ blue: string[];
9
+ darkgreen_pink: string[];
10
+ spectrum: string[];
11
+ };
12
+ export declare function getVisualMap(visualMap: VisualMap, variableValueMap: Record<string, string | number>): {
13
+ min: any;
14
+ max: any;
15
+ type: "continuous";
16
+ id: string;
17
+ orient: import("../orientation").ChartingOrientation;
18
+ left: import("./types").VisualMapHorizontalAlign;
19
+ top: import("./types").VisualMapVerticalAlign;
20
+ text: [string, string];
21
+ calculable: boolean;
22
+ itemWidth: number;
23
+ itemHeight: number;
24
+ show: boolean;
25
+ inRange: {
26
+ color: string[];
27
+ };
28
+ } | {
29
+ min: any;
30
+ max: any;
31
+ type: "piecewise";
32
+ id: string;
33
+ orient: import("../orientation").ChartingOrientation;
34
+ left: import("./types").VisualMapHorizontalAlign;
35
+ top: import("./types").VisualMapVerticalAlign;
36
+ text: [string, string];
37
+ calculable: boolean;
38
+ itemWidth: number;
39
+ itemHeight: number;
40
+ show: boolean;
41
+ inRange: {
42
+ color: string[];
43
+ };
44
+ };
45
+ export declare function getSkipRangeColor(value: number, min: number, max: number, visualMap: VisualMap): {
46
+ followVisualMap: boolean;
47
+ color: string;
48
+ };
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ value: string[];
3
+ onChange: (v: string[]) => void;
4
+ };
5
+ export declare const GrandientEditor: ({ value, onChange }: Props) => import('./react/jsx-runtime').JSX.Element;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import { UseFormReturn } from 'react-hook-form';
2
+ import { VisualMapPartialForm } from './types';
3
+ type Props = {
4
+ form: UseFormReturn<VisualMapPartialForm>;
5
+ };
6
+ export declare const VisualMapEditor: ({ form }: Props) => import('./react/jsx-runtime').JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ colors: string[];
3
+ applyPalette: (colors: string[]) => void;
4
+ };
5
+ export declare const PreviewGradientAndApplyPalette: ({ colors, applyPalette }: Props) => import('./react/jsx-runtime').JSX.Element;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ import { VisualMap } from '../types';
2
+ export declare const PreviewVisualMap: ({ visualMap, variableValueMap, }: {
3
+ visualMap: VisualMap;
4
+ variableValueMap: Record<string, any>;
5
+ }) => import('./react/jsx-runtime').JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { UseFormReturn } from 'react-hook-form';
2
+ import { VisualMapPartialForm } from './types';
3
+ type Props = {
4
+ form: UseFormReturn<VisualMapPartialForm>;
5
+ };
6
+ export declare const SkipRangeEditor: ({ form }: Props) => import('./react/jsx-runtime').JSX.Element;
7
+ export {};
@@ -0,0 +1,4 @@
1
+ import { VisualMap } from '../types';
2
+ export type VisualMapPartialForm = {
3
+ visualMap: VisualMap;
4
+ };
@@ -0,0 +1,6 @@
1
+ import { IMigrationEnv } from '../../../../../components/plugins/plugin-data-migrator';
2
+ import { IHeatmapConf } from '../type';
3
+ export declare function v2(legacyConf: any, { panelModel }: IMigrationEnv): IHeatmapConf;
4
+ export declare function v3(legacyConf: any): IHeatmapConf;
5
+ export declare function v4(legacyConf: any): IHeatmapConf;
6
+ export declare function v5(legacyConf: any): IHeatmapConf;
@@ -1,9 +1,9 @@
1
1
  import { IAxisLabelOverflow } from '../../../../components/plugins/common-echarts-fields/axis-label-overflow';
2
- import { TNumberOrDynamic } from '../../../../components/plugins/common-echarts-fields/number-or-dynamic-value/types';
3
2
  import { IEchartsTooltipMetric } from '../../../../components/plugins/common-echarts-fields/tooltip-metric';
4
3
  import { TNumberFormat } from '../../../../utils';
5
4
  import { EChartsNameTextAlign } from '../../common-echarts-fields/name-text-align';
6
5
  import { IXAxisLabelFormatter } from '../../common-echarts-fields/x-axis-label-formatter';
6
+ import { VisualMap } from '../../common-echarts-fields/visual-map';
7
7
  export interface IHeatmapConf {
8
8
  x_axis: {
9
9
  name: string;
@@ -25,8 +25,6 @@ export interface IHeatmapConf {
25
25
  };
26
26
  };
27
27
  heat_block: {
28
- min: TNumberOrDynamic;
29
- max: TNumberOrDynamic;
30
28
  name: string;
31
29
  data_key: TDataKey;
32
30
  value_formatter: TNumberFormat;
@@ -38,5 +36,6 @@ export interface IHeatmapConf {
38
36
  tooltip: {
39
37
  metrics: IEchartsTooltipMetric[];
40
38
  };
39
+ visualMap: VisualMap;
41
40
  }
42
41
  export declare const DEFAULT_CONFIG: IHeatmapConf;
@@ -8,7 +8,7 @@ export type WidthAndHeight = {
8
8
  export type IViewComponentProps<TDebug = Record<string, unknown>> = {
9
9
  panel: IPanelInfo;
10
10
  measure: WidthAndHeight;
11
- data: $TSFixMe;
11
+ data: TPanelData;
12
12
  vizManager: IVizManager;
13
13
  variables: ITemplateVariable[];
14
14
  } & TDebug;
@@ -17,6 +17,6 @@ export type IConfigComponentProps<TDebug = Record<string, unknown>> = {
17
17
  panel: IPanelInfo;
18
18
  vizManager: IVizManager;
19
19
  variables: ITemplateVariable[];
20
- data: $TSFixMe;
20
+ data: TPanelData;
21
21
  } & TDebug;
22
22
  export declare const VizConfigComponent: <T>(props: IConfigComponentProps<T>) => import('./react/jsx-runtime').JSX.Element;