@devtable/dashboard 14.51.0 → 14.53.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 (36) hide show
  1. package/dist/components/panel/settings/common/data-field-selector.d.ts +4 -0
  2. package/dist/components/plugins/hooks/index.d.ts +1 -0
  3. package/dist/components/plugins/hooks/use-handle-chart-render-finished.d.ts +5 -0
  4. package/dist/components/plugins/plugin-context.d.ts +4 -4
  5. package/dist/components/plugins/viz-components/cartesian/editors/stats/index.d.ts +2 -3
  6. package/dist/components/plugins/viz-components/horizontal-bar-chart/editors/stats/index.d.ts +9 -0
  7. package/dist/components/plugins/viz-components/horizontal-bar-chart/type.d.ts +4 -0
  8. package/dist/components/plugins/viz-components/horizontal-bar-chart/viz-horizontal-bar-chart.d.ts +1 -1
  9. package/dist/components/plugins/viz-components/merico-linear-gauge/editor/index.d.ts +1 -0
  10. package/dist/components/plugins/viz-components/merico-linear-gauge/editor/sections-editor/add-a-row.d.ts +6 -0
  11. package/dist/components/plugins/viz-components/merico-linear-gauge/editor/sections-editor/index.d.ts +1 -0
  12. package/dist/components/plugins/viz-components/merico-linear-gauge/editor/sections-editor/palette.d.ts +5 -0
  13. package/dist/components/plugins/viz-components/merico-linear-gauge/editor/sections-editor/row-editor.d.ts +13 -0
  14. package/dist/components/plugins/viz-components/merico-linear-gauge/editor/sections-editor/sections-editor.d.ts +10 -0
  15. package/dist/components/plugins/viz-components/merico-linear-gauge/editor/sections-editor/select-palette.d.ts +7 -0
  16. package/dist/components/plugins/viz-components/merico-linear-gauge/editor/viz-merico-linear-gauge-editor.d.ts +2 -0
  17. package/dist/components/plugins/viz-components/merico-linear-gauge/index.d.ts +2 -0
  18. package/dist/components/plugins/viz-components/merico-linear-gauge/migrator/index.d.ts +5 -0
  19. package/dist/components/plugins/viz-components/merico-linear-gauge/render/chart.d.ts +9 -0
  20. package/dist/components/plugins/viz-components/merico-linear-gauge/render/index.d.ts +1 -0
  21. package/dist/components/plugins/viz-components/merico-linear-gauge/render/option.d.ts +11 -0
  22. package/dist/components/plugins/viz-components/merico-linear-gauge/render/viz-merico-linear-gauge.d.ts +2 -0
  23. package/dist/components/plugins/viz-components/merico-linear-gauge/translation.d.ts +2 -0
  24. package/dist/components/plugins/viz-components/merico-linear-gauge/type.d.ts +14 -0
  25. package/dist/components/plugins/viz-components/regression-chart/render/toolbox/data-key-selector/data-key-selector.d.ts +1 -0
  26. package/dist/contexts/panel-context.d.ts +8 -8
  27. package/dist/dashboard-editor/model/panels/panel.d.ts +2 -2
  28. package/dist/dashboard.es.js +15840 -15411
  29. package/dist/dashboard.umd.js +216 -216
  30. package/dist/i18n/en.d.ts +8 -0
  31. package/dist/i18n/zh.d.ts +8 -0
  32. package/dist/model/render-model/dashboard/content/panels/panel.d.ts +2 -2
  33. package/dist/stats.html +1 -1
  34. package/dist/style.css +1 -1
  35. package/dist/version.json +2 -2
  36. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import { MantineSize } from '@mantine/core';
1
2
  import { EmotionSx } from '@mantine/emotion';
2
3
  import React from './react';
3
4
  interface IDataFieldSelector {
@@ -7,8 +8,11 @@ interface IDataFieldSelector {
7
8
  onChange: (v: string) => void;
8
9
  clearable?: boolean;
9
10
  sx?: EmotionSx;
11
+ size?: MantineSize;
10
12
  queryID?: string;
11
13
  description?: string;
14
+ placeholder?: string;
15
+ unsetKey?: string;
12
16
  }
13
17
  export declare const DataFieldSelector: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<IDataFieldSelector & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>>;
14
18
  export {};
@@ -1,2 +1,3 @@
1
1
  export * from './use-channel-event';
2
2
  export * from './use-storage-data';
3
+ export * from './use-handle-chart-render-finished';
@@ -0,0 +1,5 @@
1
+ import { VizInstance, VizViewContext } from '../../../types/plugin';
2
+ export declare function useHandleChartRenderFinished(statsConf: {
3
+ top: string;
4
+ bottom: string;
5
+ }, context: VizViewContext, instance: VizInstance): (chartOptions: unknown) => void;
@@ -7498,14 +7498,14 @@ export declare const tokens: {
7498
7498
  group_id: string;
7499
7499
  disabled: boolean;
7500
7500
  }[];
7501
- dataFieldOptions(selected: string, clearable: boolean, queryID?: string | undefined): {
7501
+ dataFieldOptions(selected: string, clearable: boolean, unsetKey: string, queryID?: string | undefined): {
7502
7502
  label: string;
7503
7503
  value: string;
7504
7504
  group: string;
7505
7505
  group_id: string;
7506
7506
  disabled: boolean;
7507
7507
  }[];
7508
- dataFieldOptionGroups(selected: string, clearable: boolean, queryID?: string | undefined): {
7508
+ dataFieldOptionGroups(selected: string, clearable: boolean, unsetKey: string, queryID?: string | undefined): {
7509
7509
  group: string;
7510
7510
  items: {
7511
7511
  label: string;
@@ -14940,14 +14940,14 @@ export declare const tokens: {
14940
14940
  group_id: string;
14941
14941
  disabled: boolean;
14942
14942
  }[];
14943
- dataFieldOptions(selected: string, clearable: boolean, queryID?: string | undefined): {
14943
+ dataFieldOptions(selected: string, clearable: boolean, unsetKey: string, queryID?: string | undefined): {
14944
14944
  label: string;
14945
14945
  value: string;
14946
14946
  group: string;
14947
14947
  group_id: string;
14948
14948
  disabled: boolean;
14949
14949
  }[];
14950
- dataFieldOptionGroups(selected: string, clearable: boolean, queryID?: string | undefined): {
14950
+ dataFieldOptionGroups(selected: string, clearable: boolean, unsetKey: string, queryID?: string | undefined): {
14951
14951
  group: string;
14952
14952
  items: {
14953
14953
  label: string;
@@ -1,10 +1,9 @@
1
- import { Control, UseFormWatch } from 'react-hook-form';
1
+ import { Control } from 'react-hook-form';
2
2
  import { ICartesianChartConf } from '../../type';
3
3
  type Props = {
4
4
  control: Control<ICartesianChartConf, $TSFixMe>;
5
- watch: UseFormWatch<ICartesianChartConf>;
6
5
  };
7
- export declare const StatsField: (({ control, watch }: Props) => import('./react/jsx-runtime').JSX.Element) & {
6
+ export declare const StatsField: (({ control }: Props) => import('./react/jsx-runtime').JSX.Element) & {
8
7
  displayName: string;
9
8
  };
10
9
  export {};
@@ -0,0 +1,9 @@
1
+ import { Control } from 'react-hook-form';
2
+ import { IHorizontalBarChartConf } from '../../type';
3
+ type Props = {
4
+ control: Control<IHorizontalBarChartConf, $TSFixMe>;
5
+ };
6
+ export declare const StatsField: (({ control }: Props) => import('./react/jsx-runtime').JSX.Element) & {
7
+ displayName: string;
8
+ };
9
+ export {};
@@ -63,6 +63,10 @@ export interface IHorizontalBarChartConf {
63
63
  nameAlignment: EChartsNameTextAlign;
64
64
  };
65
65
  series: IHorizontalBarChartSeriesItem[];
66
+ stats: {
67
+ top: string;
68
+ bottom: string;
69
+ };
66
70
  tooltip: {
67
71
  metrics: IEchartsTooltipMetric[];
68
72
  };
@@ -1,2 +1,2 @@
1
1
  import { VizViewProps } from '../../../../types/plugin';
2
- export declare function VizHorizontalBarChart({ context, instance }: VizViewProps): import('./react/jsx-runtime').JSX.Element | null;
2
+ export declare function VizHorizontalBarChart({ context, instance }: VizViewProps): import('./react/jsx-runtime').JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './viz-merico-linear-gauge-editor';
@@ -0,0 +1,6 @@
1
+ import { MericoLinearGaugeSection } from '../../type';
2
+ type AddARowProps = {
3
+ append: (v: MericoLinearGaugeSection) => void;
4
+ };
5
+ export declare const AddARow: ({ append }: AddARowProps) => import('./react/jsx-runtime').JSX.Element;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ export type PieChartPaletteOption = {
2
+ name: string;
3
+ colors: string[];
4
+ };
5
+ export declare const PieChartPalettes: PieChartPaletteOption[];
@@ -0,0 +1,13 @@
1
+ import { MericoLinearGaugeSection } from '../../type';
2
+ type RowFieldItem = {
3
+ id: string;
4
+ } & MericoLinearGaugeSection;
5
+ type Props = {
6
+ row: RowFieldItem;
7
+ handleChange: (v: RowFieldItem) => void;
8
+ handleRemove: () => void;
9
+ index: number;
10
+ data: TPanelData;
11
+ };
12
+ export declare const RowEditor: ({ row, index, handleChange, handleRemove, data }: Props) => import('./react/jsx-runtime').JSX.Element;
13
+ export {};
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { MericoLinearGaugeSection } from '../../type';
3
+ type Props = {
4
+ value: MericoLinearGaugeSection[];
5
+ onChange: (v: MericoLinearGaugeSection[]) => void;
6
+ zIndex?: number;
7
+ data: TPanelData;
8
+ };
9
+ export declare const SectionsEditor: import('./react').ForwardRefExoticComponent<Props & import('./react').RefAttributes<HTMLDivElement>>;
10
+ export {};
@@ -0,0 +1,7 @@
1
+ import { MericoLinearGaugeSection } from '../../type';
2
+ type Props = {
3
+ value: MericoLinearGaugeSection[];
4
+ onChange: (v: MericoLinearGaugeSection[]) => void;
5
+ };
6
+ export declare const SelectPalette: ({ value, onChange }: Props) => import('./react/jsx-runtime').JSX.Element;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ import { VizConfigProps } from '../../../../../types/plugin';
2
+ export declare function VizMericoLinearGaugeEditor({ context }: VizConfigProps): import('./react/jsx-runtime').JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { VizComponent } from '../../../../types/plugin';
2
+ export declare const VizMericoLinearGaugeVizComponent: VizComponent;
@@ -0,0 +1,5 @@
1
+ import { VersionBasedMigrator } from '../../../../../components/plugins/plugin-data-migrator';
2
+ export declare class VizMericoLinearGaugeMigrator extends VersionBasedMigrator {
3
+ configVersions(): void;
4
+ readonly VERSION = 1;
5
+ }
@@ -0,0 +1,9 @@
1
+ import { IMericoLinearGaugeConf } from '../type';
2
+ type Props = {
3
+ conf: IMericoLinearGaugeConf;
4
+ data: TPanelData;
5
+ width: number;
6
+ height: number;
7
+ };
8
+ export declare function Chart({ conf, data, width, height }: Props): import('./react/jsx-runtime').JSX.Element | null;
9
+ export {};
@@ -0,0 +1 @@
1
+ export * from './viz-merico-linear-gauge';
@@ -0,0 +1,11 @@
1
+ import { IMericoLinearGaugeConf } from '../type';
2
+ export declare const getOption: (conf: IMericoLinearGaugeConf, data: TPanelData) => {
3
+ value: any;
4
+ sections: {
5
+ name: string;
6
+ color: string;
7
+ min: any;
8
+ pointer: boolean;
9
+ pointer_equal: boolean;
10
+ }[];
11
+ };
@@ -0,0 +1,2 @@
1
+ import { VizViewProps } from '../../../../../types/plugin';
2
+ export declare function VizMericoLinearGauge({ context }: VizViewProps): import('./react/jsx-runtime').JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { TranslationPatch } from '../../../../types/plugin';
2
+ export declare const translation: TranslationPatch;
@@ -0,0 +1,14 @@
1
+ export type MericoLinearGaugeSection = {
2
+ name: string;
3
+ color: string;
4
+ minKey: string;
5
+ };
6
+ export interface IMericoLinearGaugeConf {
7
+ value: string;
8
+ sections: MericoLinearGaugeSection[];
9
+ stats: {
10
+ top: string;
11
+ bottom: string;
12
+ };
13
+ }
14
+ export declare const getDefaultConfig: () => IMericoLinearGaugeConf;
@@ -5,4 +5,5 @@ export declare const DataKeySelector: React.MemoExoticComponent<React.ForwardRef
5
5
  onChange: (v: string) => void;
6
6
  clearable?: boolean | undefined;
7
7
  queryID?: string | undefined;
8
+ unsetKey?: string | undefined;
8
9
  } & React.RefAttributes<HTMLSelectElement>, "ref"> & React.RefAttributes<HTMLSelectElement>>>;
@@ -7482,14 +7482,14 @@ export declare const useRenderPanelContext: () => {
7482
7482
  group_id: string;
7483
7483
  disabled: boolean;
7484
7484
  }[];
7485
- dataFieldOptions(selected: string, clearable: boolean, queryID?: string | undefined): {
7485
+ dataFieldOptions(selected: string, clearable: boolean, unsetKey: string, queryID?: string | undefined): {
7486
7486
  label: string;
7487
7487
  value: string;
7488
7488
  group: string;
7489
7489
  group_id: string;
7490
7490
  disabled: boolean;
7491
7491
  }[];
7492
- dataFieldOptionGroups(selected: string, clearable: boolean, queryID?: string | undefined): {
7492
+ dataFieldOptionGroups(selected: string, clearable: boolean, unsetKey: string, queryID?: string | undefined): {
7493
7493
  group: string;
7494
7494
  items: {
7495
7495
  label: string;
@@ -14886,14 +14886,14 @@ export declare const useRenderPanelContext: () => {
14886
14886
  group_id: string;
14887
14887
  disabled: boolean;
14888
14888
  }[];
14889
- dataFieldOptions(selected: string, clearable: boolean, queryID?: string | undefined): {
14889
+ dataFieldOptions(selected: string, clearable: boolean, unsetKey: string, queryID?: string | undefined): {
14890
14890
  label: string;
14891
14891
  value: string;
14892
14892
  group: string;
14893
14893
  group_id: string;
14894
14894
  disabled: boolean;
14895
14895
  }[];
14896
- dataFieldOptionGroups(selected: string, clearable: boolean, queryID?: string | undefined): {
14896
+ dataFieldOptionGroups(selected: string, clearable: boolean, unsetKey: string, queryID?: string | undefined): {
14897
14897
  group: string;
14898
14898
  items: {
14899
14899
  label: string;
@@ -22853,14 +22853,14 @@ export declare const useEditPanelContext: () => {
22853
22853
  group_id: string;
22854
22854
  disabled: boolean;
22855
22855
  }[];
22856
- dataFieldOptions(selected: string, clearable: boolean, queryID?: string | undefined): {
22856
+ dataFieldOptions(selected: string, clearable: boolean, unsetKey: string, queryID?: string | undefined): {
22857
22857
  label: string;
22858
22858
  value: string;
22859
22859
  group: string;
22860
22860
  group_id: string;
22861
22861
  disabled: boolean;
22862
22862
  }[];
22863
- dataFieldOptionGroups(selected: string, clearable: boolean, queryID?: string | undefined): {
22863
+ dataFieldOptionGroups(selected: string, clearable: boolean, unsetKey: string, queryID?: string | undefined): {
22864
22864
  group: string;
22865
22865
  items: {
22866
22866
  label: string;
@@ -30295,14 +30295,14 @@ export declare const useEditPanelContext: () => {
30295
30295
  group_id: string;
30296
30296
  disabled: boolean;
30297
30297
  }[];
30298
- dataFieldOptions(selected: string, clearable: boolean, queryID?: string | undefined): {
30298
+ dataFieldOptions(selected: string, clearable: boolean, unsetKey: string, queryID?: string | undefined): {
30299
30299
  label: string;
30300
30300
  value: string;
30301
30301
  group: string;
30302
30302
  group_id: string;
30303
30303
  disabled: boolean;
30304
30304
  }[];
30305
- dataFieldOptionGroups(selected: string, clearable: boolean, queryID?: string | undefined): {
30305
+ dataFieldOptionGroups(selected: string, clearable: boolean, unsetKey: string, queryID?: string | undefined): {
30306
30306
  group: string;
30307
30307
  items: {
30308
30308
  label: string;
@@ -6916,14 +6916,14 @@ export declare const PanelModel: import("mobx-state-tree").IModelType<{
6916
6916
  group_id: string;
6917
6917
  disabled: boolean;
6918
6918
  }[];
6919
- dataFieldOptions(selected: string, clearable: boolean, queryID?: string | undefined): {
6919
+ dataFieldOptions(selected: string, clearable: boolean, unsetKey: string, queryID?: string | undefined): {
6920
6920
  label: string;
6921
6921
  value: string;
6922
6922
  group: string;
6923
6923
  group_id: string;
6924
6924
  disabled: boolean;
6925
6925
  }[];
6926
- dataFieldOptionGroups(selected: string, clearable: boolean, queryID?: string | undefined): {
6926
+ dataFieldOptionGroups(selected: string, clearable: boolean, unsetKey: string, queryID?: string | undefined): {
6927
6927
  group: string;
6928
6928
  items: {
6929
6929
  label: string;