@devtable/dashboard 10.58.2 → 10.60.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.
Files changed (77) hide show
  1. package/dist/components/panel/panel-render/full-screen-render/use-panel-full-screen.d.ts +41 -8
  2. package/dist/components/panel/settings/common/aggregation-selector.d.ts +1 -1
  3. package/dist/components/panel/settings/common/numbro-format-selector.d.ts +3 -9
  4. package/dist/components/plugins/controls/color-mapping-editor/index.d.ts +2 -2
  5. package/dist/components/plugins/plugin-context.d.ts +67 -34
  6. package/dist/components/plugins/viz-components/boxplot-chart/editors/reference-lines/index.d.ts +1 -1
  7. package/dist/components/plugins/viz-components/boxplot-chart/option/index.d.ts +1 -1
  8. package/dist/components/plugins/viz-components/boxplot-chart/option/reference-line.d.ts +1 -1
  9. package/dist/components/plugins/viz-components/boxplot-chart/option/tooltip/additional-metrics.d.ts +1 -1
  10. package/dist/components/plugins/viz-components/boxplot-chart/type.d.ts +2 -2
  11. package/dist/components/plugins/viz-components/calendar-heatmap/option/index.d.ts +1 -1
  12. package/dist/components/plugins/viz-components/calendar-heatmap/type.d.ts +2 -2
  13. package/dist/components/plugins/viz-components/cartesian/editors/reference-areas/index.d.ts +1 -1
  14. package/dist/components/plugins/viz-components/cartesian/editors/reference-lines/index.d.ts +1 -1
  15. package/dist/components/plugins/viz-components/cartesian/migrators/index.d.ts +1 -1
  16. package/dist/components/plugins/viz-components/cartesian/option/index.d.ts +1 -1
  17. package/dist/components/plugins/viz-components/cartesian/option/series/data.d.ts +1 -1
  18. package/dist/components/plugins/viz-components/cartesian/option/series/index.d.ts +1 -1
  19. package/dist/components/plugins/viz-components/cartesian/option/series/reference_lines.d.ts +1 -1
  20. package/dist/components/plugins/viz-components/cartesian/option/utils/variables.d.ts +1 -1
  21. package/dist/components/plugins/viz-components/cartesian/type.d.ts +3 -3
  22. package/dist/components/plugins/viz-components/heatmap/option/index.d.ts +1 -1
  23. package/dist/components/plugins/viz-components/heatmap/type.d.ts +2 -2
  24. package/dist/components/plugins/viz-components/horizontal-bar-chart/editors/reference-lines/index.d.ts +1 -1
  25. package/dist/components/plugins/viz-components/horizontal-bar-chart/option/index.d.ts +1 -1
  26. package/dist/components/plugins/viz-components/horizontal-bar-chart/option/series/data.d.ts +1 -1
  27. package/dist/components/plugins/viz-components/horizontal-bar-chart/option/series/index.d.ts +1 -1
  28. package/dist/components/plugins/viz-components/horizontal-bar-chart/option/series/reference_lines.d.ts +1 -1
  29. package/dist/components/plugins/viz-components/horizontal-bar-chart/option/utils/variables.d.ts +1 -1
  30. package/dist/components/plugins/viz-components/horizontal-bar-chart/type.d.ts +3 -3
  31. package/dist/components/plugins/viz-components/merico-heatmap/render/option/index.d.ts +1 -1
  32. package/dist/components/plugins/viz-components/merico-heatmap/type.d.ts +2 -2
  33. package/dist/components/plugins/viz-components/merico-stats/editors/metrics/index.d.ts +1 -1
  34. package/dist/components/plugins/viz-components/merico-stats/type.d.ts +2 -2
  35. package/dist/components/plugins/viz-components/pareto-chart/option/index.d.ts +1 -1
  36. package/dist/components/plugins/viz-components/pareto-chart/type.d.ts +2 -2
  37. package/dist/components/plugins/viz-components/radar-chart/option/formatter.d.ts +2 -2
  38. package/dist/components/plugins/viz-components/radar-chart/type.d.ts +2 -2
  39. package/dist/components/plugins/viz-components/regression-chart/type.d.ts +3 -3
  40. package/dist/components/plugins/viz-components/rich-text/parse-rich-text-content.d.ts +1 -1
  41. package/dist/components/plugins/viz-components/scatter-chart/editors/reference-areas/index.d.ts +1 -1
  42. package/dist/components/plugins/viz-components/scatter-chart/editors/reference-lines/index.d.ts +1 -1
  43. package/dist/components/plugins/viz-components/scatter-chart/option/index.d.ts +1 -1
  44. package/dist/components/plugins/viz-components/scatter-chart/option/series.d.ts +1 -1
  45. package/dist/components/plugins/viz-components/sunburst/option/index.d.ts +1 -1
  46. package/dist/components/plugins/viz-manager/components.d.ts +1 -1
  47. package/dist/contexts/panel-context.d.ts +82 -16
  48. package/dist/dashboard-editor/model/datasources/datasource.d.ts +1 -1
  49. package/dist/dashboard-editor/model/filters/index.d.ts +1 -0
  50. package/dist/dashboard-editor/model/panels/panel.d.ts +19 -4
  51. package/dist/dashboard-editor/model/queries/index.d.ts +8 -7
  52. package/dist/dashboard-editor/model/sql-snippets/index.d.ts +1 -0
  53. package/dist/dashboard-editor/model/views/index.d.ts +3 -0
  54. package/dist/dashboard-editor/model/views/view.d.ts +1 -0
  55. package/dist/dashboard-editor/ui/settings/content/edit-panel/variable-config/model.d.ts +6 -0
  56. package/dist/dashboard-editor/ui/settings/content/edit-panel/variable-config/variable-field.d.ts +1 -1
  57. package/dist/dashboard.es.js +5325 -5194
  58. package/dist/dashboard.umd.js +72 -72
  59. package/dist/index.d.ts +1 -0
  60. package/dist/model/meta-model/dashboard/content/index.d.ts +1 -0
  61. package/dist/model/meta-model/dashboard/content/initial-content.d.ts +3 -0
  62. package/dist/model/meta-model/dashboard/content/panel/panel.d.ts +5 -0
  63. package/dist/model/meta-model/dashboard/content/panel/variable.d.ts +3 -0
  64. package/dist/model/render-model/dashboard/content/filters/filters.d.ts +1 -0
  65. package/dist/model/render-model/dashboard/content/panels/panel.d.ts +32 -17
  66. package/dist/model/render-model/dashboard/content/queries/mute-query.d.ts +1 -1
  67. package/dist/model/render-model/dashboard/content/queries/queries.d.ts +6 -5
  68. package/dist/model/render-model/dashboard/content/queries/query.d.ts +1 -1
  69. package/dist/model/render-model/dashboard/content/sql-snippets/sql-snippets.d.ts +1 -0
  70. package/dist/stats.html +1 -1
  71. package/dist/types/dashboard.d.ts +1 -2
  72. package/dist/types/plugin/index.d.ts +1 -1
  73. package/dist/utils/function-utils.d.ts +2 -2
  74. package/dist/utils/index.d.ts +15 -0
  75. package/dist/utils/number.d.ts +12 -0
  76. package/dist/utils/template/types.d.ts +2 -2
  77. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { Control, UseFormWatch } from 'react-hook-form';
2
- import { ITemplateVariable } from '../../../../../../utils/template';
2
+ import { ITemplateVariable } from '../../../../../../utils';
3
3
  import { ICartesianChartConf } from '../../type';
4
4
  interface IReferenceLinesField {
5
5
  control: Control<ICartesianChartConf, $TSFixMe>;
@@ -1,5 +1,5 @@
1
1
  import { AnyObject } from '../../../../../types';
2
- import { ITemplateVariable } from '../../../../../utils/template';
2
+ import { ITemplateVariable } from '../../../../../utils';
3
3
  import { ICartesianChartConf } from '../type';
4
4
  import { IMigrationEnv } from '../../../../../components/plugins';
5
5
  export declare function updateSchema2(legacyConf: ICartesianChartConf & {
@@ -1,3 +1,3 @@
1
- import { ITemplateVariable } from '../../../../../utils/template';
1
+ import { ITemplateVariable } from '../../../../../utils';
2
2
  import { ICartesianChartConf } from '../type';
3
3
  export declare function getOption(conf: ICartesianChartConf, data: TPanelData, variables: ITemplateVariable[]): any;
@@ -1,5 +1,5 @@
1
1
  import _ from 'lodash';
2
- import { AggregationType } from '../../../../../../utils/aggregation';
2
+ import { AggregationType } from '../../../../../../utils';
3
3
  import { DataTemplateType } from './types';
4
4
  interface IMakeOneSeriesData {
5
5
  dataTemplate: DataTemplateType[];
@@ -1,3 +1,3 @@
1
- import { ITemplateVariable } from '../../../../../../utils/template';
1
+ import { ITemplateVariable } from '../../../../../../utils';
2
2
  import { ICartesianChartConf } from '../../type';
3
3
  export declare function getSeries(conf: ICartesianChartConf, xAxisData: string[], data: TPanelData, labelFormatters: Record<string, $TSFixMe>, variables: ITemplateVariable[], variableValueMap: Record<string, string | number>): any[];
@@ -1,4 +1,4 @@
1
- import { ITemplateVariable } from '../../../../../../utils/template';
1
+ import { ITemplateVariable } from '../../../../../../utils';
2
2
  import { ICartesianChartConf, ICartesianReferenceLine } from '../../type';
3
3
  export declare function getReferenceLines(reference_lines: ICartesianReferenceLine[], variables: ITemplateVariable[], variableValueMap: Record<string, string | number>, data: TPanelData, xAxisData: string[], xAxisType: ICartesianChartConf['x_axis']['type']): {
4
4
  name: string;
@@ -1,2 +1,2 @@
1
- import { ITemplateVariable } from '../../../../../../utils/template';
1
+ import { ITemplateVariable } from '../../../../../../utils';
2
2
  export declare function getVariableValueMap(data: TPanelData, variables: ITemplateVariable[]): Record<string, string | number>;
@@ -1,7 +1,7 @@
1
- import { TNumbroFormat } from '../../../../components/panel/settings/common/numbro-format-selector';
1
+ import { TNumberFormat } from '../../../../utils';
2
2
  import { IAxisLabelOverflow } from '../../../../components/plugins/common-echarts-fields/axis-label-overflow';
3
3
  import { IRegressionLineConf, IRegressionTransform } from '../../../../components/plugins/common-echarts-fields/regression-line';
4
- import { AggregationType } from '../../../../utils/aggregation';
4
+ import { AggregationType } from '../../../../utils';
5
5
  import { TEchartsDataZoomConfig } from './editors/echarts-zooming-field/types';
6
6
  import { TScatterSize } from './editors/scatter-size-select/types';
7
7
  import { IXAxisLabelFormatter } from './editors/x-axis/x-axis-label-formatter/types';
@@ -37,7 +37,7 @@ export interface IYAxisConf {
37
37
  show: boolean;
38
38
  position: 'left' | 'right';
39
39
  nameAlignment: 'left' | 'center' | 'right';
40
- label_formatter: TNumbroFormat;
40
+ label_formatter: TNumberFormat;
41
41
  }
42
42
  export interface IRegressionConf {
43
43
  transform: IRegressionTransform;
@@ -1,3 +1,3 @@
1
- import { ITemplateVariable } from '../../../../../utils/template';
1
+ import { ITemplateVariable } from '../../../../../utils';
2
2
  import { IHeatmapConf } from '../type';
3
3
  export declare function getOption(conf: IHeatmapConf, data: TPanelData, variables: ITemplateVariable[], width: number, height: number): {};
@@ -1,4 +1,4 @@
1
- import { TNumbroFormat } from '../../../../components/panel/settings/common/numbro-format-selector';
1
+ import { TNumberFormat } from '../../../../utils';
2
2
  import { IAxisLabelOverflow } from '../../../../components/plugins/common-echarts-fields/axis-label-overflow';
3
3
  import { IEchartsTooltipMetric } from '../../../../components/plugins/common-echarts-fields/tooltip-metric';
4
4
  import { IXAxisLabelFormatter } from '../cartesian/editors/x-axis/x-axis-label-formatter/types';
@@ -28,7 +28,7 @@ export interface IHeatmapConf {
28
28
  max: TNumberOrDynamic;
29
29
  name: string;
30
30
  data_key: TDataKey;
31
- value_formatter: TNumbroFormat;
31
+ value_formatter: TNumberFormat;
32
32
  label: {
33
33
  show: boolean;
34
34
  fontSize: number;
@@ -1,5 +1,5 @@
1
1
  import { Control, UseFormWatch } from 'react-hook-form';
2
- import { ITemplateVariable } from '../../../../../../utils/template';
2
+ import { ITemplateVariable } from '../../../../../../utils';
3
3
  import { IHorizontalBarChartConf } from '../../type';
4
4
  interface IReferenceLinesField {
5
5
  control: Control<IHorizontalBarChartConf, $TSFixMe>;
@@ -1,3 +1,3 @@
1
- import { ITemplateVariable } from '../../../../../utils/template';
1
+ import { ITemplateVariable } from '../../../../../utils';
2
2
  import { IHorizontalBarChartConf } from '../type';
3
3
  export declare function getOption(conf: IHorizontalBarChartConf, data: TPanelData, variables: ITemplateVariable[]): {};
@@ -1,5 +1,5 @@
1
1
  import _ from 'lodash';
2
- import { AggregationType } from '../../../../../../utils/aggregation';
2
+ import { AggregationType } from '../../../../../../utils';
3
3
  import { DataTemplateType } from './types';
4
4
  interface IMakeOneSeriesData {
5
5
  dataTemplate: DataTemplateType[];
@@ -1,3 +1,3 @@
1
- import { ITemplateVariable } from '../../../../../../utils/template';
1
+ import { ITemplateVariable } from '../../../../../../utils';
2
2
  import { IHorizontalBarChartConf } from '../../type';
3
3
  export declare function getSeries(conf: IHorizontalBarChartConf, xAxisData: string[], valueTypedXAxis: boolean, data: TPanelData, labelFormatters: Record<string, $TSFixMe>, variables: ITemplateVariable[], variableValueMap: Record<string, string | number>): any[];
@@ -1,4 +1,4 @@
1
- import { ITemplateVariable } from '../../../../../../utils/template';
1
+ import { ITemplateVariable } from '../../../../../../utils';
2
2
  import { IHorizontalBarChartReferenceLine } from '../../type';
3
3
  export declare function getReferenceLines(reference_lines: IHorizontalBarChartReferenceLine[], variables: ITemplateVariable[], variableValueMap: Record<string, string | number>, data: TPanelData): {
4
4
  name: string;
@@ -1,2 +1,2 @@
1
- import { ITemplateVariable } from '../../../../../../utils/template';
1
+ import { ITemplateVariable } from '../../../../../../utils';
2
2
  export declare function getVariableValueMap(data: TPanelData, variables: ITemplateVariable[]): Record<string, string | number>;
@@ -1,7 +1,7 @@
1
- import { TNumbroFormat } from '../../../../components/panel/settings/common/numbro-format-selector';
1
+ import { TNumberFormat } from '../../../../utils';
2
2
  import { IAxisLabelOverflow } from '../../../../components/plugins/common-echarts-fields/axis-label-overflow';
3
3
  import { IEchartsTooltipMetric } from '../../../../components/plugins/common-echarts-fields/tooltip-metric';
4
- import { AggregationType } from '../../../../utils/aggregation';
4
+ import { AggregationType } from '../../../../utils';
5
5
  import { IXAxisLabelFormatter } from '../cartesian/editors/x-axis/x-axis-label-formatter/types';
6
6
  export interface IHorizontalBarChartReferenceLine {
7
7
  id: string;
@@ -42,7 +42,7 @@ export interface IHorizontalBarChartXAxis {
42
42
  name: string;
43
43
  data_key: TDataKey;
44
44
  position: 'top' | 'bottom';
45
- label_formatter: TNumbroFormat;
45
+ label_formatter: TNumberFormat;
46
46
  show: boolean;
47
47
  }
48
48
  export interface IHorizontalBarChartConf {
@@ -1,3 +1,3 @@
1
- import { ITemplateVariable } from '../../../../../../utils/template';
1
+ import { ITemplateVariable } from '../../../../../../utils';
2
2
  import { TMericoHeatmapConf } from '../../type';
3
3
  export declare function getOption(conf: TMericoHeatmapConf, data: TPanelData, variables: ITemplateVariable[]): {};
@@ -1,4 +1,4 @@
1
- import { TNumbroFormat } from '../../../../components/panel/settings/common/numbro-format-selector';
1
+ import { TNumberFormat } from '../../../../utils';
2
2
  import { IAxisLabelOverflow } from '../../../../components/plugins/common-echarts-fields/axis-label-overflow';
3
3
  import { IEchartsTooltipMetric } from '../../../../components/plugins/common-echarts-fields/tooltip-metric';
4
4
  import { IXAxisLabelFormatter } from '../cartesian/editors/x-axis/x-axis-label-formatter/types';
@@ -28,7 +28,7 @@ export type TMericoHeatmapConf = {
28
28
  max: TNumberOrDynamic;
29
29
  name: string;
30
30
  data_key: TDataKey;
31
- value_formatter: TNumbroFormat;
31
+ value_formatter: TNumberFormat;
32
32
  label: {
33
33
  show: boolean;
34
34
  fontSize: number;
@@ -1,5 +1,5 @@
1
1
  import { Control, UseFormWatch } from 'react-hook-form';
2
- import { ITemplateVariable } from '../../../../../../utils/template';
2
+ import { ITemplateVariable } from '../../../../../../utils';
3
3
  import { TMericoStatsConf } from '../../type';
4
4
  interface IProps {
5
5
  control: Control<TMericoStatsConf, $TSFixMe>;
@@ -1,5 +1,5 @@
1
1
  import { TAlignItems, TJustifyContent } from '../../../../components/panel/settings/common/css-types';
2
- import { TNumbroFormat } from '../../../../components/panel/settings/common/numbro-format-selector';
2
+ import { TNumberFormat } from '../../../../utils';
3
3
  export type TMetricPostfix = {
4
4
  type: 'filter-option-label' | 'text';
5
5
  value: string;
@@ -14,7 +14,7 @@ export type TMericoStatsMetric = {
14
14
  value: TDataKey;
15
15
  basis: TDataKey;
16
16
  };
17
- formatter: TNumbroFormat;
17
+ formatter: TNumberFormat;
18
18
  postfix: TMetricPostfix;
19
19
  };
20
20
  export type TMericoStatsStyle = {
@@ -1,4 +1,4 @@
1
- import { ITemplateVariable } from '../../../../../utils/template';
1
+ import { ITemplateVariable } from '../../../../../utils';
2
2
  import { IParetoChartConf } from '../type';
3
3
  export declare function getOption(conf: IParetoChartConf, data: TPanelData, _variables: ITemplateVariable[]): {
4
4
  dataZoom: ({
@@ -1,4 +1,4 @@
1
- import { TNumbroFormat } from '../../../../components/panel/settings/common/numbro-format-selector';
1
+ import { TNumberFormat } from '../../../../utils';
2
2
  import { IAxisLabelOverflow } from '../../../../components/plugins/common-echarts-fields/axis-label-overflow';
3
3
  import { TEchartsDataZoomConfig } from '../cartesian/editors/echarts-zooming-field/types';
4
4
  import { IXAxisLabelFormatter } from '../cartesian/editors/x-axis/x-axis-label-formatter/types';
@@ -21,7 +21,7 @@ export interface IParetoChartConf {
21
21
  name: string;
22
22
  nameAlignment: 'left' | 'center' | 'right';
23
23
  color: string;
24
- label_formatter: TNumbroFormat;
24
+ label_formatter: TNumberFormat;
25
25
  };
26
26
  line: {
27
27
  name: string;
@@ -1,2 +1,2 @@
1
- import { TNumbroFormat } from '../../../../../components/panel/settings/common/numbro-format-selector';
2
- export declare function getFormatter(formatter: TNumbroFormat): (value: number) => string | number;
1
+ import { TNumberFormat } from '../../../../../utils';
2
+ export declare function getFormatter(formatter: TNumberFormat): (value: number) => string | number;
@@ -1,4 +1,4 @@
1
- import { TNumbroFormat } from '../../../../components/panel/settings/common/numbro-format-selector';
1
+ import { TNumberFormat } from '../../../../utils';
2
2
  export type TAdditionalSeriesItem = {
3
3
  id: string;
4
4
  name_key: TDataKey;
@@ -9,7 +9,7 @@ export interface IRadarChartDimension {
9
9
  name: string;
10
10
  data_key: TDataKey;
11
11
  max: string;
12
- formatter: TNumbroFormat;
12
+ formatter: TNumberFormat;
13
13
  }
14
14
  export interface IRadarChartConf {
15
15
  series_name_key: TDataKey;
@@ -1,14 +1,14 @@
1
+ import { IAxisLabelOverflow } from '../../../../components/plugins/common-echarts-fields/axis-label-overflow';
1
2
  import { IXAxisLabelFormatter } from '../../../../components/plugins/common-echarts-fields/x-axis-label-formatter/types';
3
+ import { TNumberFormat } from '../../../../utils';
2
4
  import { IRegressionConf } from '../cartesian/type';
3
- import { IAxisLabelOverflow } from '../../../../components/plugins/common-echarts-fields/axis-label-overflow';
4
- import { TNumbroFormat } from '../../../../components/panel/settings/common/numbro-format-selector';
5
5
  export interface IRegressionChartConf {
6
6
  x_axis: {
7
7
  name: string;
8
8
  data_key: TDataKey;
9
9
  axisLabel: {
10
10
  rotate: number;
11
- format: TNumbroFormat;
11
+ format: TNumberFormat;
12
12
  overflow: IAxisLabelOverflow;
13
13
  formatter: IXAxisLabelFormatter;
14
14
  };
@@ -1,3 +1,3 @@
1
1
  import { TPayloadForViz } from '../../../../model';
2
- import { ITemplateVariable } from '../../../../utils/template';
2
+ import { ITemplateVariable } from '../../../../utils';
3
3
  export declare function parseRichTextContent(rawContent: string, variables: ITemplateVariable[], payload: TPayloadForViz, data: TPanelData): string;
@@ -1,5 +1,5 @@
1
1
  import { Control, UseFormWatch } from 'react-hook-form';
2
- import { ITemplateVariable } from '../../../../../../utils/template';
2
+ import { ITemplateVariable } from '../../../../../../utils';
3
3
  import { IScatterChartConf } from '../../type';
4
4
  interface IReferenceAreasField {
5
5
  control: Control<IScatterChartConf, $TSFixMe>;
@@ -1,5 +1,5 @@
1
1
  import { Control, UseFormWatch } from 'react-hook-form';
2
- import { ITemplateVariable } from '../../../../../../utils/template';
2
+ import { ITemplateVariable } from '../../../../../../utils';
3
3
  import { IScatterChartConf } from '../../type';
4
4
  interface IReferenceLinesField {
5
5
  control: Control<IScatterChartConf, $TSFixMe>;
@@ -1,3 +1,3 @@
1
- import { ITemplateVariable } from '../../../../../utils/template';
1
+ import { ITemplateVariable } from '../../../../../utils';
2
2
  import { IScatterChartConf } from '../type';
3
3
  export declare function getOption(conf: IScatterChartConf, data: TPanelData, variables: ITemplateVariable[]): any;
@@ -1,4 +1,4 @@
1
1
  import { AnyObject } from '../../../../../types';
2
- import { ITemplateVariable } from '../../../../../utils/template';
2
+ import { ITemplateVariable } from '../../../../../utils';
3
3
  import { IScatterChartConf } from '../type';
4
4
  export declare function getSeries(conf: IScatterChartConf, data: TPanelData, variables: ITemplateVariable[], variableValueMap: Record<string, string | number>): AnyObject[];
@@ -1,3 +1,3 @@
1
- import { ITemplateVariable } from '../../../../../utils/template';
1
+ import { ITemplateVariable } from '../../../../../utils';
2
2
  import { ISunburstConf } from '../type';
3
3
  export declare function getOption(conf: ISunburstConf, data: TPanelData, variables: ITemplateVariable[]): any;
@@ -1,4 +1,4 @@
1
- import { ITemplateVariable } from '../../../utils/template';
1
+ import { ITemplateVariable } from '../../../utils';
2
2
  import { IPanelInfo, IVizManager } from './types';
3
3
  export type IViewPanelInfo = IPanelInfo & {
4
4
  layout: {