@devtable/dashboard 6.15.1 → 6.17.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 (45) hide show
  1. package/dist/api-caller/index.d.ts +1 -7
  2. package/dist/api-caller/request.d.ts +1 -1
  3. package/dist/dashboard.es.js +9447 -7863
  4. package/dist/dashboard.umd.js +64 -42
  5. package/dist/main/use-panel-full-screen.d.ts +12 -0
  6. package/dist/model/queries/index.d.ts +15 -0
  7. package/dist/model/queries/query.d.ts +3 -0
  8. package/dist/model/views/view/index.d.ts +54 -0
  9. package/dist/model/views/view/panels/index.d.ts +18 -0
  10. package/dist/model/views/view/panels/panel.d.ts +6 -0
  11. package/dist/plugins/plugin-context.d.ts +12 -0
  12. package/dist/plugins/viz-components/button/type.d.ts +2 -0
  13. package/dist/plugins/viz-components/cartesian/panel/stats/index.d.ts +1 -1
  14. package/dist/plugins/viz-components/scatter-chart/editors/reference-lines/index.d.ts +11 -0
  15. package/dist/plugins/viz-components/scatter-chart/editors/reference-lines/reference-line.d.ts +15 -0
  16. package/dist/plugins/viz-components/scatter-chart/editors/scatter/index.d.ts +10 -0
  17. package/dist/plugins/viz-components/scatter-chart/editors/scatter/scatter-size-select/dynamic-size-function-editor.d.ts +8 -0
  18. package/dist/plugins/viz-components/scatter-chart/editors/scatter/scatter-size-select/dynamic.d.ts +9 -0
  19. package/dist/plugins/viz-components/scatter-chart/editors/scatter/scatter-size-select/get-echarts-symbol-size.d.ts +3 -0
  20. package/dist/plugins/viz-components/scatter-chart/editors/scatter/scatter-size-select/index.d.ts +11 -0
  21. package/dist/plugins/viz-components/scatter-chart/editors/scatter/scatter-size-select/static.d.ts +8 -0
  22. package/dist/plugins/viz-components/scatter-chart/editors/scatter/scatter-size-select/types.d.ts +13 -0
  23. package/dist/plugins/viz-components/scatter-chart/editors/stats/index.d.ts +10 -0
  24. package/dist/plugins/viz-components/scatter-chart/editors/x-axis/index.d.ts +10 -0
  25. package/dist/plugins/viz-components/scatter-chart/editors/x-axis/x-axis-label-formatter/function-editor.d.ts +8 -0
  26. package/dist/plugins/viz-components/scatter-chart/editors/x-axis/x-axis-label-formatter/get-echarts-x-axis-tick-label.d.ts +2 -0
  27. package/dist/plugins/viz-components/scatter-chart/editors/x-axis/x-axis-label-formatter/index.d.ts +10 -0
  28. package/dist/plugins/viz-components/scatter-chart/editors/x-axis/x-axis-label-formatter/types.d.ts +8 -0
  29. package/dist/plugins/viz-components/scatter-chart/editors/y-axes/index.d.ts +9 -0
  30. package/dist/plugins/viz-components/scatter-chart/editors/y-axes/y-axis.d.ts +10 -0
  31. package/dist/plugins/viz-components/scatter-chart/index.d.ts +2 -0
  32. package/dist/plugins/viz-components/scatter-chart/option/grid.d.ts +5 -0
  33. package/dist/plugins/viz-components/scatter-chart/option/index.d.ts +3 -0
  34. package/dist/plugins/viz-components/scatter-chart/option/legend.d.ts +1 -0
  35. package/dist/plugins/viz-components/scatter-chart/option/series.d.ts +4 -0
  36. package/dist/plugins/viz-components/scatter-chart/option/tooltip.d.ts +5 -0
  37. package/dist/plugins/viz-components/scatter-chart/option/x-axis.d.ts +15 -0
  38. package/dist/plugins/viz-components/scatter-chart/option/y-axis.d.ts +22 -0
  39. package/dist/plugins/viz-components/scatter-chart/triggers/click-scatter-chart.d.ts +7 -0
  40. package/dist/plugins/viz-components/scatter-chart/triggers/index.d.ts +1 -0
  41. package/dist/plugins/viz-components/scatter-chart/type.d.ts +30 -0
  42. package/dist/plugins/viz-components/scatter-chart/viz-scatter-chart-panel.d.ts +3 -0
  43. package/dist/plugins/viz-components/scatter-chart/viz-scatter-chart.d.ts +3 -0
  44. package/dist/plugins/viz-components/stats/viz-stats.d.ts +3 -1
  45. package/package.json +1 -1
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFieldArrayRemove, UseFormWatch } from 'react-hook-form';
3
+ import { IScatterChartConf } from '../../type';
4
+ interface IReferenceLineField {
5
+ control: Control<IScatterChartConf, $TSFixMe>;
6
+ index: number;
7
+ watch: UseFormWatch<IScatterChartConf>;
8
+ remove: UseFieldArrayRemove;
9
+ variableOptions: {
10
+ label: string;
11
+ value: string;
12
+ }[];
13
+ }
14
+ export declare function ReferenceLineField({ control, index, remove, watch, variableOptions }: IReferenceLineField): JSX.Element;
15
+ export {};
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { IScatterChartConf } from '../../type';
4
+ interface IScatterField {
5
+ control: Control<IScatterChartConf, $TSFixMe>;
6
+ watch: UseFormWatch<IScatterChartConf>;
7
+ data: $TSFixMe[];
8
+ }
9
+ export declare function ScatterField({ data, control, watch }: IScatterField): JSX.Element;
10
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { TScatterSize_Dynamic } from './types';
3
+ interface IDynamicSizeFunctionEditor {
4
+ value: TScatterSize_Dynamic['func_content'];
5
+ onChange: (v: TScatterSize_Dynamic['func_content']) => void;
6
+ }
7
+ export declare const DynamicSizeFunctionEditor: ({ value, onChange }: IDynamicSizeFunctionEditor) => JSX.Element;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { AnyObject } from '~/types';
3
+ import { TScatterSize } from './types';
4
+ export interface IDynamicScatterSizeField {
5
+ value: TScatterSize;
6
+ onChange: (v: TScatterSize) => void;
7
+ data: AnyObject[];
8
+ }
9
+ export declare const DynamicScatterSizeField: ({ value, onChange, data }: IDynamicScatterSizeField) => JSX.Element | null;
@@ -0,0 +1,3 @@
1
+ import { AnyObject } from '~/types';
2
+ import { TScatterSize } from './types';
3
+ export declare function getEchartsSymbolSize({ type, ...rest }: TScatterSize, data: AnyObject[], x_axis_data_key: string, variableValueMap: Record<string, string | number>): number | ((_value: number, params: $TSFixMe) => any);
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { AnyObject } from '~/types';
3
+ import { TScatterSize } from './types';
4
+ interface IScatterSizeSelect {
5
+ label?: string;
6
+ value: TScatterSize;
7
+ onChange: (v: TScatterSize) => void;
8
+ data: AnyObject[];
9
+ }
10
+ export declare const ScatterSizeSelect: import("react").ForwardRefExoticComponent<IScatterSizeSelect & import("react").RefAttributes<HTMLInputElement>>;
11
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { TScatterSize } from './types';
3
+ interface IStaticScatterSizeField {
4
+ value: TScatterSize;
5
+ onChange: (v: TScatterSize) => void;
6
+ }
7
+ export declare const StaticScatterSizeField: ({ value, onChange }: IStaticScatterSizeField) => JSX.Element | null;
8
+ export {};
@@ -0,0 +1,13 @@
1
+ export declare type TScatterSize_Static = {
2
+ type: 'static';
3
+ size: number;
4
+ };
5
+ export declare type TScatterSize_Dynamic = {
6
+ type: 'dynamic';
7
+ func_content: string;
8
+ };
9
+ export declare type TScatterSize = TScatterSize_Static | TScatterSize_Dynamic;
10
+ export declare const DEFAULT_SCATTER_SIZE: {
11
+ static: TScatterSize_Static;
12
+ dynamic: TScatterSize_Dynamic;
13
+ };
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { IScatterChartConf } from '../../type';
4
+ interface IVariablesField {
5
+ control: Control<IScatterChartConf, $TSFixMe>;
6
+ watch: UseFormWatch<IScatterChartConf>;
7
+ data: $TSFixMe[];
8
+ }
9
+ export declare function StatsField({ control, watch }: IVariablesField): JSX.Element;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { IScatterChartConf } from '../../type';
4
+ interface IXAxisField {
5
+ control: Control<IScatterChartConf, $TSFixMe>;
6
+ watch: UseFormWatch<IScatterChartConf>;
7
+ data: $TSFixMe[];
8
+ }
9
+ export declare function XAxisField({ data, control, watch }: IXAxisField): JSX.Element;
10
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ interface IXAxisLabelFormatterFunctionEditor {
3
+ disabled: boolean;
4
+ value: string;
5
+ onChange: (v: string) => void;
6
+ }
7
+ export declare const XAxisLabelFormatterFunctionEditor: ({ disabled, value, onChange, }: IXAxisLabelFormatterFunctionEditor) => JSX.Element;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ import { IXAxisLabelFormatter } from './types';
2
+ export declare function getEchartsXAxisLabel({ enabled, func_content }: IXAxisLabelFormatter): (value: number | string, index: number) => any;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { AnyObject } from '~/types';
3
+ import { IXAxisLabelFormatter } from './types';
4
+ interface IXAxisLabelFormatterField {
5
+ value: IXAxisLabelFormatter;
6
+ onChange: (v: IXAxisLabelFormatter) => void;
7
+ data: AnyObject[];
8
+ }
9
+ export declare const XAxisLabelFormatterField: ({ value, onChange, data }: IXAxisLabelFormatterField) => JSX.Element;
10
+ export {};
@@ -0,0 +1,8 @@
1
+ export interface IXAxisLabelFormatter {
2
+ enabled: boolean;
3
+ func_content: string;
4
+ }
5
+ export declare const DEFAULT_X_AXIS_LABEL_FORMATTER: {
6
+ enabled: boolean;
7
+ func_content: string;
8
+ };
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { IScatterChartConf } from '../../type';
4
+ interface IYAxesField {
5
+ control: Control<IScatterChartConf, $TSFixMe>;
6
+ watch: UseFormWatch<IScatterChartConf>;
7
+ }
8
+ export declare function YAxesField({ control, watch }: IYAxesField): JSX.Element;
9
+ export {};
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFieldArrayRemove } from 'react-hook-form';
3
+ import { IScatterChartConf } from '../../type';
4
+ interface IYAxisField {
5
+ control: Control<IScatterChartConf, $TSFixMe>;
6
+ index: number;
7
+ remove: UseFieldArrayRemove;
8
+ }
9
+ export declare function YAxisField({ control, index, remove }: IYAxisField): JSX.Element;
10
+ export {};
@@ -0,0 +1,2 @@
1
+ import { VizComponent } from '../../../types/plugin';
2
+ export declare const ScatterChartVizComponent: VizComponent;
@@ -0,0 +1,5 @@
1
+ import { IScatterChartConf } from '../type';
2
+ export declare function getGrid(conf: IScatterChartConf): {
3
+ bottom: number;
4
+ top: number;
5
+ };
@@ -0,0 +1,3 @@
1
+ import { IScatterChartConf } from '../type';
2
+ import { ITemplateVariable } from '~/utils/template';
3
+ export declare function getOption(conf: IScatterChartConf, data: $TSFixMe[], variables: ITemplateVariable[]): any;
@@ -0,0 +1 @@
1
+ export declare function getLegend(): Record<string, any>;
@@ -0,0 +1,4 @@
1
+ import { AnyObject } from '~/types';
2
+ import { ITemplateVariable } from '~/utils/template';
3
+ import { IScatterChartConf } from '../type';
4
+ export declare function getSeries(conf: IScatterChartConf, xAxisData: $TSFixMe[], valueTypedXAxis: boolean, data: $TSFixMe[], labelFormatters: Record<string, $TSFixMe>, variables: ITemplateVariable[], variableValueMap: Record<string, string | number>): AnyObject[];
@@ -0,0 +1,5 @@
1
+ import { TopLevelFormatterParams } from 'echarts/types/dist/shared';
2
+ import { IScatterChartConf } from '../type';
3
+ export declare function getTooltip(conf: IScatterChartConf, labelFormatters: Record<string, (p: $TSFixMe) => string>): {
4
+ formatter: (params: TopLevelFormatterParams) => string;
5
+ };
@@ -0,0 +1,15 @@
1
+ import { IScatterChartConf } from '../type';
2
+ export declare function getXAxes(conf: IScatterChartConf, xAxisData: $TSFixMe[]): {
3
+ data: any[];
4
+ name: string;
5
+ id: string;
6
+ axisTick: {
7
+ show: boolean;
8
+ alignWithLabel: boolean;
9
+ };
10
+ type: string;
11
+ axisLabel: {
12
+ formatter: (value: string | number, index: number) => any;
13
+ rotate: number;
14
+ };
15
+ }[];
@@ -0,0 +1,22 @@
1
+ import { IScatterChartConf } from '../type';
2
+ export declare function getYAxes(conf: IScatterChartConf, labelFormatters: Record<string, (p: $TSFixMe) => string>): {
3
+ position: "left" | "right";
4
+ axisLabel: {
5
+ show: boolean;
6
+ formatter: (p: $TSFixMe) => string;
7
+ };
8
+ axisLine: {
9
+ show: boolean;
10
+ };
11
+ nameTextStyle: {
12
+ fontWeight: string;
13
+ align: "left" | "right" | "center";
14
+ };
15
+ nameLocation: string;
16
+ nameGap: number;
17
+ splitLine: {
18
+ show: boolean;
19
+ };
20
+ name: string;
21
+ label_formatter: import("../../../../panel/settings/common/numbro-format-selector").TNumbroFormat;
22
+ }[];
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { ITriggerConfigProps, ITriggerSchema } from '~/types/plugin';
3
+ export declare const ClickScatterChartSeries: ITriggerSchema;
4
+ export interface IClickScatterChartSeriesConfig {
5
+ foo: '';
6
+ }
7
+ export declare function ClickScatterChartSeriesSettings(props: ITriggerConfigProps): JSX.Element;
@@ -0,0 +1 @@
1
+ export { ClickScatterChartSeries } from './click-scatter-chart';
@@ -0,0 +1,30 @@
1
+ import { ICartesianReferenceArea, ICartesianReferenceLine, IYAxisConf } from '../cartesian/type';
2
+ import { TScatterSize } from './editors/scatter/scatter-size-select/types';
3
+ import { IXAxisLabelFormatter } from './editors/x-axis/x-axis-label-formatter/types';
4
+ export interface IScatterChartConf {
5
+ x_axis: {
6
+ data_key: string;
7
+ name: string;
8
+ axisLabel: {
9
+ rotate: number;
10
+ formatter: IXAxisLabelFormatter;
11
+ };
12
+ };
13
+ y_axes: IYAxisConf[];
14
+ scatter: {
15
+ y_data_key: string;
16
+ name_data_key: string;
17
+ symbolSize: TScatterSize;
18
+ label_position: string;
19
+ color: string;
20
+ };
21
+ stats: {
22
+ templates: {
23
+ top: string;
24
+ bottom: string;
25
+ };
26
+ };
27
+ reference_lines: ICartesianReferenceLine[];
28
+ reference_areas: ICartesianReferenceArea[];
29
+ }
30
+ export declare const DEFAULT_CONFIG: IScatterChartConf;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizConfigProps } from '~/types/plugin';
3
+ export declare function VizScatterChartPanel({ context }: VizConfigProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizViewProps } from '~/types/plugin';
3
+ export declare function VizScatterChart({ context, instance }: VizViewProps): JSX.Element;
@@ -1,3 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { VizViewProps } from '~/types/plugin';
3
- export declare function VizStats({ context }: VizViewProps): JSX.Element;
3
+ export declare const VizStats: (({ context }: VizViewProps) => JSX.Element) & {
4
+ displayName: string;
5
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/dashboard",
3
- "version": "6.15.1",
3
+ "version": "6.17.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public",