@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 { AnyObject } from '../types/utils';
2
- import { ITemplateVariable } from '../utils/template';
2
+ import { ITemplateVariable } from '../utils';
3
3
  import { EViewComponentType, FilterMetaSnapshotOut, QueryMetaSnapshotIn, SQLSnippetMetaSnapshotIn } from '../model';
4
4
  export interface IVizConfig {
5
5
  type: string;
@@ -82,5 +82,4 @@ export type DashboardContentDBType = {
82
82
  create_time: string;
83
83
  update_time: string;
84
84
  };
85
- export declare const initialDashboardContent: TDashboardContent;
86
85
  export {};
@@ -3,7 +3,7 @@ import React from './react';
3
3
  import { IVizManager } from '../../components/plugins';
4
4
  import { PanelModelInstance } from '../../dashboard-editor/model/panels';
5
5
  import { AnyObject } from '../../types';
6
- import { ITemplateVariable } from '../../utils/template';
6
+ import { ITemplateVariable } from '../../utils';
7
7
  /**
8
8
  * Basic information of a viz component instance
9
9
  */
@@ -1,9 +1,9 @@
1
1
  import CryptoJS from 'crypto-js';
2
+ import * as d3Array from 'd3-array';
2
3
  import dayjs from 'dayjs';
3
4
  import lodash from 'lodash';
4
- import numbro from 'numbro';
5
- import * as d3Array from 'd3-array';
6
5
  import * as mathjs from 'mathjs';
6
+ import numbro from 'numbro';
7
7
  export declare const functionUtils: {
8
8
  CryptoJS: typeof CryptoJS;
9
9
  d3Array: typeof d3Array;
@@ -0,0 +1,15 @@
1
+ export * from './template';
2
+ export * from './aggregation';
3
+ export * from './color-feed';
4
+ export * from './color-mapping';
5
+ export * from './dashboard-state';
6
+ export * from './data';
7
+ export * from './diff-json';
8
+ export * from './download';
9
+ export * from './error-boundary';
10
+ export * from './function-utils';
11
+ export * from './http-query';
12
+ export * from './number';
13
+ export * from './shallow-to-js';
14
+ export * from './sql';
15
+ export * from './usage';
@@ -0,0 +1,12 @@
1
+ export type TNumbroFormat = {
2
+ mantissa: number;
3
+ output: 'percent' | 'number';
4
+ average?: boolean;
5
+ trimMantissa?: boolean;
6
+ thousandSeparated?: boolean;
7
+ };
8
+ export type TNumberFormat = TNumbroFormat & {
9
+ absolute: boolean;
10
+ };
11
+ export declare const defaultNumberFormat: TNumberFormat;
12
+ export declare function formatNumber(number: string | number | null, { absolute, ...format }: TNumberFormat): string;
@@ -1,4 +1,4 @@
1
- import { TNumbroFormat } from '../../components/panel/settings/common/numbro-format-selector';
1
+ import { TNumberFormat } from '../../utils';
2
2
  import { AggregationType } from '../aggregation';
3
3
  export type ColorConfType = {
4
4
  type: 'static';
@@ -14,7 +14,7 @@ export interface ITemplateVariable {
14
14
  name: string;
15
15
  data_field: string;
16
16
  aggregation: AggregationType;
17
- formatter: TNumbroFormat;
17
+ formatter: TNumberFormat;
18
18
  color: ColorConfType;
19
19
  size: string;
20
20
  weight: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/dashboard",
3
- "version": "10.58.2",
3
+ "version": "10.60.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public",