@devtable/dashboard 4.0.0 → 4.1.1

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 (151) hide show
  1. package/dist/api-caller/index.d.ts +1 -1
  2. package/dist/contexts/layout-state-context.d.ts +0 -1
  3. package/dist/contexts/model-context.d.ts +1384 -1384
  4. package/dist/dashboard.es.js +9871 -7245
  5. package/dist/dashboard.umd.js +17 -17
  6. package/dist/definition-editor/query-editor/form.d.ts +1 -0
  7. package/dist/definition-editor/select-data-source.d.ts +14 -0
  8. package/dist/filter/filter-query-field/index.d.ts +2 -2
  9. package/dist/interactions/attachment-instance-manager.d.ts +14 -0
  10. package/dist/interactions/components/interaction-settings.d.ts +13 -0
  11. package/dist/interactions/components/operation-select.d.ts +11 -0
  12. package/dist/interactions/components/trigger-config-model.d.ts +18 -0
  13. package/dist/interactions/components/trigger-select.d.ts +8 -0
  14. package/dist/interactions/components/variable-list.d.ts +7 -0
  15. package/dist/interactions/hooks/use-current-interaction-manager.d.ts +6 -0
  16. package/dist/interactions/hooks/use-watch-triggers.d.ts +2 -0
  17. package/dist/interactions/interaction-manager.d.ts +14 -0
  18. package/dist/interactions/operation/operation-manager-impl.d.ts +13 -0
  19. package/dist/interactions/operation/operations/console-log.d.ts +5 -0
  20. package/dist/interactions/operation/operations/index.d.ts +2 -0
  21. package/dist/interactions/operation/operations/open-link.d.ts +6 -0
  22. package/dist/interactions/trigger/trigger-manager-impl.d.ts +18 -0
  23. package/dist/model/dashboard.d.ts +916 -916
  24. package/dist/model/filters/filter/common.d.ts +2 -1
  25. package/dist/model/filters/filter/index.d.ts +10 -10
  26. package/dist/model/filters/filter/multi-select.d.ts +5 -4
  27. package/dist/model/filters/filter/select.d.ts +5 -4
  28. package/dist/model/filters/index.d.ts +224 -224
  29. package/dist/panel/settings/common/data-field-selector.d.ts +1 -0
  30. package/dist/panel/settings/common/numbro-format-selector.d.ts +1 -0
  31. package/dist/plugins/color-manager/color-manager.d.ts +7 -0
  32. package/dist/plugins/color-manager/impl.d.ts +10 -0
  33. package/dist/plugins/color-manager/index.d.ts +2 -0
  34. package/dist/plugins/hooks/use-storage-data.d.ts +1 -1
  35. package/dist/plugins/index.d.ts +1 -0
  36. package/dist/plugins/json-plugin-storage.d.ts +2 -2
  37. package/dist/plugins/message-channels.d.ts +1 -1
  38. package/dist/plugins/plugin-context.d.ts +3 -1
  39. package/dist/plugins/plugin-data-migrator/index.d.ts +1 -0
  40. package/dist/plugins/plugin-data-migrator/version-based-migrator.d.ts +18 -0
  41. package/dist/plugins/plugin-manager.d.ts +1 -2
  42. package/dist/plugins/sub-tree-json-plugin-storage.d.ts +10 -0
  43. package/dist/plugins/viz-components/bar-3d-chart/index.d.ts +2 -0
  44. package/dist/plugins/viz-components/bar-3d-chart/type.d.ts +13 -0
  45. package/dist/plugins/viz-components/bar-3d-chart/viz-bar-3d-chart-panel.d.ts +3 -0
  46. package/dist/plugins/viz-components/bar-3d-chart/viz-bar-3d-chart.d.ts +3 -0
  47. package/dist/plugins/viz-components/boxplot-chart/index.d.ts +2 -0
  48. package/dist/plugins/viz-components/boxplot-chart/reference-lines/index.d.ts +9 -0
  49. package/dist/plugins/viz-components/boxplot-chart/reference-lines/reference-line.d.ts +14 -0
  50. package/dist/plugins/viz-components/boxplot-chart/type.d.ts +20 -0
  51. package/dist/plugins/viz-components/boxplot-chart/variables/index.d.ts +10 -0
  52. package/dist/plugins/viz-components/boxplot-chart/variables/variable.d.ts +11 -0
  53. package/dist/plugins/viz-components/boxplot-chart/viz-boxplot-chart-panel.d.ts +3 -0
  54. package/dist/plugins/viz-components/boxplot-chart/viz-boxplot-chart.d.ts +3 -0
  55. package/dist/plugins/viz-components/cartesian/index.d.ts +2 -0
  56. package/dist/plugins/viz-components/cartesian/option/grid.d.ts +5 -0
  57. package/dist/plugins/viz-components/cartesian/option/index.d.ts +2 -0
  58. package/dist/{panel/viz → plugins/viz-components}/cartesian/option/regression.d.ts +0 -0
  59. package/dist/plugins/viz-components/cartesian/option/series.d.ts +2 -0
  60. package/dist/plugins/viz-components/cartesian/option/tooltip.d.ts +5 -0
  61. package/dist/plugins/viz-components/cartesian/option/x-axis.d.ts +2 -0
  62. package/dist/plugins/viz-components/cartesian/option/y-axis.d.ts +15 -0
  63. package/dist/plugins/viz-components/cartesian/panel/regressions/index.d.ts +10 -0
  64. package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/regressions/regression-item.d.ts +0 -0
  65. package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/series/fields.bar.d.ts +0 -0
  66. package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/series/fields.line.d.ts +0 -0
  67. package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/series/fields.scatter.d.ts +0 -0
  68. package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/series/index.d.ts +2 -3
  69. package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/series/series-item.d.ts +0 -0
  70. package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/stats/index.d.ts +0 -0
  71. package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/stats/variable.d.ts +0 -0
  72. package/dist/{panel/viz → plugins/viz-components}/cartesian/panel/y-axes.d.ts +0 -0
  73. package/dist/{panel/viz → plugins/viz-components}/cartesian/type.d.ts +5 -7
  74. package/dist/plugins/viz-components/cartesian/viz-cartesian-chart.d.ts +3 -0
  75. package/dist/plugins/viz-components/cartesian/viz-cartesian-panel.d.ts +3 -0
  76. package/dist/plugins/viz-components/pie-chart/index.d.ts +2 -0
  77. package/dist/plugins/viz-components/pie-chart/type.d.ts +5 -0
  78. package/dist/plugins/viz-components/pie-chart/viz-pie-chart-panel.d.ts +3 -0
  79. package/dist/plugins/viz-components/pie-chart/viz-pie-chart.d.ts +3 -0
  80. package/dist/plugins/viz-components/radar-chart/index.d.ts +2 -0
  81. package/dist/plugins/viz-components/radar-chart/option/index.d.ts +26 -0
  82. package/dist/plugins/viz-components/radar-chart/panel/dimensions.d.ts +10 -0
  83. package/dist/plugins/viz-components/radar-chart/type.d.ts +11 -0
  84. package/dist/plugins/viz-components/radar-chart/viz-radar-chart-panel.d.ts +3 -0
  85. package/dist/plugins/viz-components/radar-chart/viz-radar-chart.d.ts +3 -0
  86. package/dist/plugins/viz-components/regression-chart/index.d.ts +2 -0
  87. package/dist/plugins/viz-components/regression-chart/option/index.d.ts +2 -0
  88. package/dist/plugins/viz-components/regression-chart/option/regression-expression.d.ts +15 -0
  89. package/dist/plugins/viz-components/regression-chart/option/regression-series.d.ts +14 -0
  90. package/dist/plugins/viz-components/regression-chart/regression-item.d.ts +14 -0
  91. package/dist/plugins/viz-components/regression-chart/type.d.ts +12 -0
  92. package/dist/plugins/viz-components/regression-chart/viz-regression-chart-panel.d.ts +3 -0
  93. package/dist/plugins/viz-components/regression-chart/viz-regression-chart.d.ts +3 -0
  94. package/dist/plugins/viz-components/rich-text/hooks.d.ts +8 -0
  95. package/dist/plugins/viz-components/rich-text/index.d.ts +2 -0
  96. package/dist/plugins/viz-components/rich-text/type.d.ts +4 -0
  97. package/dist/plugins/viz-components/rich-text/viz-rich-text-panel.d.ts +3 -0
  98. package/dist/plugins/viz-components/rich-text/viz-rich-text.d.ts +3 -0
  99. package/dist/plugins/viz-components/stats/index.d.ts +2 -0
  100. package/dist/{panel/viz → plugins/viz-components}/stats/panel/variable.d.ts +1 -1
  101. package/dist/{panel/viz → plugins/viz-components}/stats/panel/variables.d.ts +1 -1
  102. package/dist/{panel/viz/stats/types.d.ts → plugins/viz-components/stats/type.d.ts} +2 -1
  103. package/dist/plugins/viz-components/stats/update/index.d.ts +5 -0
  104. package/dist/plugins/viz-components/stats/viz-stats-panel.d.ts +3 -0
  105. package/dist/plugins/viz-components/stats/viz-stats.d.ts +3 -0
  106. package/dist/plugins/viz-components/sunburst/index.d.ts +2 -0
  107. package/dist/plugins/viz-components/sunburst/type.d.ts +5 -0
  108. package/dist/plugins/viz-components/sunburst/viz-sunburst-panel.d.ts +3 -0
  109. package/dist/plugins/viz-components/sunburst/viz-sunburst.d.ts +3 -0
  110. package/dist/plugins/viz-components/table/index.d.ts +1 -1
  111. package/dist/plugins/viz-components/table/triggers/click-cell-content.d.ts +11 -0
  112. package/dist/plugins/viz-components/table/triggers/index.d.ts +1 -0
  113. package/dist/plugins/viz-components/table/value.d.ts +2 -1
  114. package/dist/plugins/viz-components/table/viz-table-panel.d.ts +1 -1
  115. package/dist/plugins/viz-components/table/viz-table.d.ts +2 -2
  116. package/dist/plugins/viz-manager/components.d.ts +3 -3
  117. package/dist/plugins/viz-manager/impl.d.ts +3 -3
  118. package/dist/plugins/viz-manager/types.d.ts +3 -7
  119. package/dist/types/dashboard.d.ts +2 -2
  120. package/dist/types/index.d.ts +1 -0
  121. package/dist/types/plugin/index.d.ts +94 -8
  122. package/dist/types/utils.d.ts +4 -0
  123. package/dist/utils/aggregation.d.ts +9 -1
  124. package/dist/utils/template/editor/index.d.ts +3 -0
  125. package/dist/utils/template/editor/template-input.d.ts +8 -0
  126. package/dist/utils/template/editor/utils.d.ts +2 -0
  127. package/dist/utils/template/editor/variable-field.d.ts +10 -0
  128. package/dist/utils/template/editor/variable-style.d.ts +8 -0
  129. package/dist/utils/template/index.d.ts +4 -0
  130. package/dist/utils/template/render/index.d.ts +2 -0
  131. package/dist/utils/template/{render.d.ts → render/render-jsx.d.ts} +1 -1
  132. package/dist/utils/template/render/render-string.d.ts +2 -0
  133. package/dist/utils/template/utils.d.ts +4 -0
  134. package/package.json +2 -1
  135. package/dist/filter/filter-query-field/select-data-source.d.ts +0 -8
  136. package/dist/panel/viz/bar-3d/index.d.ts +0 -9
  137. package/dist/panel/viz/bar-3d/panel.d.ts +0 -3
  138. package/dist/panel/viz/cartesian/index.d.ts +0 -10
  139. package/dist/panel/viz/cartesian/panel/index.d.ts +0 -3
  140. package/dist/panel/viz/cartesian/panel/regressions/index.d.ts +0 -11
  141. package/dist/panel/viz/pie/index.d.ts +0 -9
  142. package/dist/panel/viz/pie/panel.d.ts +0 -3
  143. package/dist/panel/viz/rich-text/index.d.ts +0 -10
  144. package/dist/panel/viz/rich-text/panel.d.ts +0 -3
  145. package/dist/panel/viz/rich-text/type.d.ts +0 -8
  146. package/dist/panel/viz/stats/index.d.ts +0 -10
  147. package/dist/panel/viz/stats/panel/index.d.ts +0 -10
  148. package/dist/panel/viz/stats/update/index.d.ts +0 -15
  149. package/dist/panel/viz/sunburst/index.d.ts +0 -9
  150. package/dist/panel/viz/sunburst/panel.d.ts +0 -3
  151. package/dist/utils/template/editor.d.ts +0 -16
@@ -6,6 +6,7 @@ interface IDataFieldSelector {
6
6
  value: string;
7
7
  onChange: (v: string) => void;
8
8
  data: any[];
9
+ clearable?: boolean;
9
10
  sx?: Sx;
10
11
  }
11
12
  export declare const DataFieldSelector: React.ForwardRefExoticComponent<IDataFieldSelector & React.RefAttributes<unknown>>;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  export declare type TNumbroFormat = {
3
3
  mantissa: number;
4
4
  output: 'percent' | 'number';
5
+ average?: boolean;
5
6
  trimMantissa?: boolean;
6
7
  };
7
8
  export declare const defaultNumbroFormat: TNumbroFormat;
@@ -0,0 +1,7 @@
1
+ import { IColorPaletteItem, ISingleColor } from '~/types/plugin';
2
+ export interface IColorManager {
3
+ getStaticColors(): ISingleColor[];
4
+ register<T extends IColorPaletteItem>(paletteItem: T): void;
5
+ decodeStaticColor(key: string): ISingleColor | undefined;
6
+ encodeColor(color: ISingleColor): string;
7
+ }
@@ -0,0 +1,10 @@
1
+ import { IColorPaletteItem, IPluginManager, ISingleColor } from '~/types/plugin';
2
+ import { IColorManager } from '~/plugins/color-manager';
3
+ export declare class ColorManager implements IColorManager {
4
+ protected staticColors: Map<string, ISingleColor>;
5
+ constructor(pluginManager: IPluginManager);
6
+ getStaticColors(): ISingleColor[];
7
+ register<T extends IColorPaletteItem>(paletteItem: T): void;
8
+ decodeStaticColor(key: string): ISingleColor | undefined;
9
+ encodeColor(color: IColorPaletteItem): string;
10
+ }
@@ -0,0 +1,2 @@
1
+ export * from './color-manager';
2
+ export * from './impl';
@@ -1,4 +1,4 @@
1
- import { PluginStorage } from '../../types/plugin';
1
+ import { PluginStorage } from '~/types/plugin';
2
2
  export declare const useStorageData: <T>(storage: PluginStorage, dataKey: string) => {
3
3
  loading: boolean;
4
4
  value: T | undefined;
@@ -2,3 +2,4 @@ export * from './viz-manager';
2
2
  export * from './plugin-context';
3
3
  export * from './plugin-data-migrator';
4
4
  export * from './hooks';
5
+ export * from './color-manager';
@@ -1,4 +1,4 @@
1
- import { PluginStorage } from '../types/plugin';
1
+ import { IWatchOptions, PluginStorage } from '~/types/plugin';
2
2
  export declare class JsonPluginStorage implements PluginStorage {
3
3
  protected rootRef: {
4
4
  current: Record<string, any>;
@@ -8,5 +8,5 @@ export declare class JsonPluginStorage implements PluginStorage {
8
8
  getItem<T>(key: string | null): Promise<T>;
9
9
  private getValueFromRoot;
10
10
  setItem<T>(key: string | null, item: T): Promise<T>;
11
- watchItem<T>(key: string | null, callback: (value: T, previous?: T) => void): () => void;
11
+ watchItem<T>(key: string | null, callback: (value: T, previous?: T) => void, options?: IWatchOptions): () => void;
12
12
  }
@@ -1,5 +1,5 @@
1
1
  import EventEmitter2 from 'eventemitter2';
2
- import { IMessageChannels } from '../types/plugin';
2
+ import { IMessageChannels } from '~/types/plugin';
3
3
  export declare class MessageChannels implements IMessageChannels {
4
4
  private channels;
5
5
  globalChannel: EventEmitter2;
@@ -1,10 +1,12 @@
1
1
  /// <reference types="react" />
2
- import { IPluginManager } from '../types/plugin';
2
+ import { IPluginManager } from '~/types/plugin';
3
+ import { IColorManager } from './color-manager';
3
4
  import { PluginManager } from './plugin-manager';
4
5
  import { VizManager } from './viz-manager';
5
6
  interface IPluginContextProps {
6
7
  pluginManager: IPluginManager;
7
8
  vizManager: VizManager;
9
+ colorManager: IColorManager;
8
10
  }
9
11
  export declare const pluginManager: PluginManager;
10
12
  export declare const createPluginContext: () => IPluginContextProps;
@@ -1 +1,2 @@
1
1
  export * from './plugin-data-migrator';
2
+ export * from './version-based-migrator';
@@ -0,0 +1,18 @@
1
+ import { IVizComponentMigrator, VizComponentMigrationContext } from '~/types/plugin';
2
+ import { PluginDataMigrator } from './plugin-data-migrator';
3
+ /**
4
+ * Instance version is read from the `instanceData.version` field.
5
+ * Current version is read from the `VERSION` field.
6
+ * If the instance version is less than the current version,
7
+ * the migrator will run.
8
+ * You can implement the `configVersions` method to
9
+ * specify how migrations are performed.
10
+ */
11
+ export declare abstract class VersionBasedMigrator extends PluginDataMigrator implements IVizComponentMigrator {
12
+ abstract readonly VERSION: number;
13
+ abstract configVersions(): void;
14
+ constructor();
15
+ version(version: number, handler: (data: any) => any): PluginDataMigrator;
16
+ migrate({ instanceData }: VizComponentMigrationContext): Promise<void>;
17
+ needMigration({ instanceData }: VizComponentMigrationContext): Promise<boolean>;
18
+ }
@@ -1,4 +1,4 @@
1
- import { IDashboardPlugin, IPluginManager, VizComponent } from '../types/plugin';
1
+ import { IDashboardPlugin, IPluginManager, VizComponent } from '~/types/plugin';
2
2
  export declare class PluginManager implements IPluginManager {
3
3
  /**
4
4
  * Id to plugin map
@@ -9,7 +9,6 @@ export declare class PluginManager implements IPluginManager {
9
9
  * Name to component map
10
10
  */
11
11
  private vizComponents;
12
- constructor();
13
12
  factory: {
14
13
  viz: (name: string) => VizComponent;
15
14
  };
@@ -0,0 +1,10 @@
1
+ import { IWatchOptions, PluginStorage } from '~/types/plugin';
2
+ export declare class SubTreeJsonPluginStorage implements PluginStorage {
3
+ protected root: PluginStorage;
4
+ protected path: string;
5
+ constructor(root: PluginStorage, path: string);
6
+ deleteItem(key: string): Promise<void>;
7
+ getItem<T>(key: string | null): Promise<T>;
8
+ setItem<T>(key: string | null, item: T): Promise<T>;
9
+ watchItem<T>(key: string | null, callback: (value: T, previous?: T) => void, options?: IWatchOptions): () => void;
10
+ }
@@ -0,0 +1,2 @@
1
+ import { VizComponent } from '~/types/plugin';
2
+ export declare const Bar3dChartVizComponent: VizComponent;
@@ -0,0 +1,13 @@
1
+ export interface Axis3DType {
2
+ type: string;
3
+ name: string;
4
+ }
5
+ export interface IBar3dChartConf {
6
+ x_axis_data_key: string;
7
+ y_axis_data_key: string;
8
+ z_axis_data_key: string;
9
+ xAxis3D: Axis3DType;
10
+ yAxis3D: Axis3DType;
11
+ zAxis3D: Axis3DType;
12
+ }
13
+ export declare const DEFAULT_CONFIG: IBar3dChartConf;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizConfigProps } from '~/types/plugin';
3
+ export declare function VizBar3dChartPanel({ context }: VizConfigProps): JSX.Element | null;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizViewProps } from '~/types/plugin';
3
+ export declare function VizBar3dChart({ context }: VizViewProps): JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { VizComponent } from '~/types/plugin';
2
+ export declare const BoxplotChartVizComponent: VizComponent;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { IBoxplotChartConf } from '../type';
4
+ interface IReferenceLinesField {
5
+ control: Control<IBoxplotChartConf, any>;
6
+ watch: UseFormWatch<IBoxplotChartConf>;
7
+ }
8
+ export declare function ReferenceLinesField({ control, watch }: IReferenceLinesField): JSX.Element;
9
+ export {};
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFieldArrayRemove } from 'react-hook-form';
3
+ import { IBoxplotChartConf } from '../type';
4
+ interface IReferenceLineField {
5
+ control: Control<IBoxplotChartConf, any>;
6
+ index: number;
7
+ remove: UseFieldArrayRemove;
8
+ variableOptions: {
9
+ label: string;
10
+ value: string;
11
+ }[];
12
+ }
13
+ export declare function ReferenceLineField({ control, index, remove, variableOptions }: IReferenceLineField): JSX.Element;
14
+ export {};
@@ -0,0 +1,20 @@
1
+ import { ITemplateVariable } from '~/utils/template';
2
+ export interface IBoxplotReferenceLine {
3
+ name: string;
4
+ template: string;
5
+ variable_key: string;
6
+ }
7
+ export interface IBoxplotChartConf {
8
+ x_axis: {
9
+ name: string;
10
+ data_key: string;
11
+ };
12
+ y_axis: {
13
+ name: string;
14
+ data_key: string;
15
+ };
16
+ color: string;
17
+ variables: ITemplateVariable[];
18
+ reference_lines: IBoxplotReferenceLine[];
19
+ }
20
+ export declare const DEFAULT_CONFIG: IBoxplotChartConf;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { IBoxplotChartConf } from '../type';
4
+ interface IVariablesField {
5
+ control: Control<IBoxplotChartConf, any>;
6
+ watch: UseFormWatch<IBoxplotChartConf>;
7
+ data: any[];
8
+ }
9
+ export declare function VariablesField({ control, watch, data }: IVariablesField): JSX.Element;
10
+ export {};
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFieldArrayRemove } from 'react-hook-form';
3
+ import { IBoxplotChartConf } from '../type';
4
+ interface VariableField {
5
+ control: Control<IBoxplotChartConf, any>;
6
+ index: number;
7
+ remove: UseFieldArrayRemove;
8
+ data: any[];
9
+ }
10
+ export declare function VariableField({ control, index, remove, data }: VariableField): JSX.Element;
11
+ export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizConfigProps } from '~/types/plugin';
3
+ export declare function VizBoxplotChartPanel({ context }: VizConfigProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizViewProps } from '~/types/plugin';
3
+ export declare function VizBoxplotChart({ context }: VizViewProps): JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { VizComponent } from '~/types/plugin';
2
+ export declare const CartesianVizComponent: VizComponent;
@@ -0,0 +1,5 @@
1
+ import { ICartesianChartConf } from '../type';
2
+ export declare function getGrid(conf: ICartesianChartConf): {
3
+ bottom: number;
4
+ top: number;
5
+ };
@@ -0,0 +1,2 @@
1
+ import { ICartesianChartConf } from '../type';
2
+ export declare function getOption(conf: ICartesianChartConf, data: any[]): any;
@@ -0,0 +1,2 @@
1
+ import { ICartesianChartConf } from '../type';
2
+ export declare function getSeries(conf: ICartesianChartConf, xAxisData: any[], data: any[], labelFormatters: Record<string, any>): any[];
@@ -0,0 +1,5 @@
1
+ import { TopLevelFormatterParams } from 'echarts/types/dist/shared';
2
+ import { ICartesianChartConf } from '../type';
3
+ export declare function getTooltip(conf: ICartesianChartConf, labelFormatters: Record<string, (p: any) => string>): {
4
+ formatter: (params: TopLevelFormatterParams) => string;
5
+ };
@@ -0,0 +1,2 @@
1
+ import { ICartesianChartConf } from '../type';
2
+ export declare function getXAxes(conf: ICartesianChartConf, xAxisData: any[], regressionXAxes: any[]): any[];
@@ -0,0 +1,15 @@
1
+ import { ICartesianChartConf } from '../type';
2
+ export declare function getYAxes(conf: ICartesianChartConf, labelFormatters: Record<string, (p: any) => string>): {
3
+ axisLabel: {
4
+ show: boolean;
5
+ formatter: (p: any) => string;
6
+ };
7
+ nameTextStyle: {
8
+ fontWeight: string;
9
+ align: string;
10
+ };
11
+ nameLocation: string;
12
+ nameGap: number;
13
+ name: string;
14
+ label_formatter: import("../../../../panel/settings/common/numbro-format-selector").TNumbroFormat;
15
+ }[];
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { ICartesianChartConf } from '../../type';
4
+ interface IRegressionsField {
5
+ control: Control<ICartesianChartConf, any>;
6
+ watch: UseFormWatch<ICartesianChartConf>;
7
+ data: any[];
8
+ }
9
+ export declare function RegressionsField({ control, watch, data }: IRegressionsField): JSX.Element;
10
+ export {};
@@ -1,11 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { Control, UseFormGetValues, UseFormWatch } from 'react-hook-form';
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
3
  import { ICartesianChartConf } from '../../type';
4
4
  interface ISeriesField {
5
5
  control: Control<ICartesianChartConf, any>;
6
6
  watch: UseFormWatch<ICartesianChartConf>;
7
- getValues: UseFormGetValues<ICartesianChartConf>;
8
7
  data: any[];
9
8
  }
10
- export declare function SeriesField({ control, watch, getValues, data }: ISeriesField): JSX.Element;
9
+ export declare function SeriesField({ control, watch, data }: ISeriesField): JSX.Element;
11
10
  export {};
@@ -1,6 +1,5 @@
1
- import { IVizPanelProps } from '../../../types';
2
- import { ITemplateVariable } from '../../../utils/template/types';
3
- import { TNumbroFormat } from '../../settings/common/numbro-format-selector';
1
+ import { TNumbroFormat } from '~/panel/settings/common/numbro-format-selector';
2
+ import { ITemplateVariable } from '~/utils/template';
4
3
  export interface ICartesianChartSeriesItem {
5
4
  type: 'line' | 'bar' | 'scatter';
6
5
  name: string;
@@ -12,8 +11,10 @@ export interface ICartesianChartSeriesItem {
12
11
  stack: string;
13
12
  color?: string;
14
13
  barWidth: string;
14
+ barGap?: string;
15
15
  smooth: boolean;
16
16
  step: false | 'start' | 'middle' | 'end';
17
+ group_by_key: string;
17
18
  }
18
19
  export interface IYAxisConf {
19
20
  name: string;
@@ -52,7 +53,4 @@ export interface ICartesianChartConf {
52
53
  variables: ITemplateVariable[];
53
54
  };
54
55
  }
55
- export interface IVizCartesianChartPanel extends Omit<IVizPanelProps, 'conf' | 'setConf'> {
56
- conf: ICartesianChartConf;
57
- setConf: (values: ICartesianChartConf) => void;
58
- }
56
+ export declare const DEFAULT_CONFIG: ICartesianChartConf;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizViewProps } from '~/types/plugin';
3
+ export declare function VizCartesianChart({ context }: VizViewProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizConfigProps } from '~/types/plugin';
3
+ export declare function VizCartesianPanel({ context }: VizConfigProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { VizComponent } from '~/types/plugin';
2
+ export declare const PieChartVizComponent: VizComponent;
@@ -0,0 +1,5 @@
1
+ export interface IPieChartConf {
2
+ label_field: string;
3
+ value_field: string;
4
+ }
5
+ export declare const DEFAULT_CONFIG: IPieChartConf;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizConfigProps } from '~/types/plugin';
3
+ export declare function VizPieChartPanel({ context }: VizConfigProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizViewProps } from '~/types/plugin';
3
+ export declare function VizPieChart({ context }: VizViewProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { VizComponent } from '~/types/plugin';
2
+ export declare const RadarChartVizComponent: VizComponent;
@@ -0,0 +1,26 @@
1
+ import { IRadarChartConf } from '../type';
2
+ export declare function getOption(conf: IRadarChartConf, data: any[]): {
3
+ legend: {
4
+ show: boolean;
5
+ bottom: number;
6
+ left: number;
7
+ };
8
+ tooltip: {
9
+ trigger: string;
10
+ };
11
+ } & {
12
+ radar: {
13
+ indicator: {
14
+ name: string;
15
+ max: number;
16
+ color: string | undefined;
17
+ }[];
18
+ };
19
+ series: {
20
+ type: string;
21
+ data: {
22
+ value: any[];
23
+ name: any;
24
+ }[];
25
+ };
26
+ };
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { IRadarChartConf } from '../type';
4
+ interface IDimensionsField {
5
+ control: Control<IRadarChartConf, any>;
6
+ watch: UseFormWatch<IRadarChartConf>;
7
+ data: any[];
8
+ }
9
+ export declare function DimensionsField({ control, watch, data }: IDimensionsField): JSX.Element;
10
+ export {};
@@ -0,0 +1,11 @@
1
+ export interface IRadarChartDimension {
2
+ name: string;
3
+ data_key: string;
4
+ max: number;
5
+ color?: string;
6
+ }
7
+ export interface IRadarChartConf {
8
+ series_name_key: string;
9
+ dimensions: IRadarChartDimension[];
10
+ }
11
+ export declare const DEFAULT_CONFIG: IRadarChartConf;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizConfigProps } from '~/types/plugin';
3
+ export declare function VizRadarChartPanel({ context }: VizConfigProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizViewProps } from '~/types/plugin';
3
+ export declare function VizRadarChart({ context }: VizViewProps): JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { VizComponent } from '~/types/plugin';
2
+ export declare const RegressionChartVizComponent: VizComponent;
@@ -0,0 +1,2 @@
1
+ import { IRegressionChartConf } from '../type';
2
+ export declare function getOption(conf: IRegressionChartConf, data: any[]): any;
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import { IRegressionChartConf } from '../type';
3
+ export declare function getRegressionDescription(data: any[], conf?: IRegressionChartConf): {
4
+ expression: JSX.Element;
5
+ rSquared: any;
6
+ adjustedRSquared: number;
7
+ } | {
8
+ expression: string;
9
+ rSquared: any;
10
+ adjustedRSquared: number;
11
+ } | {
12
+ expression: string;
13
+ rSquared: number;
14
+ adjustedRSquared?: undefined;
15
+ };
@@ -0,0 +1,14 @@
1
+ import { IRegressionLineConf } from '../../cartesian/type';
2
+ import { IRegressionChartConf } from '../type';
3
+ interface IRegressionSeriesItem extends IRegressionLineConf {
4
+ data: number[][];
5
+ name: string;
6
+ showSymbol: boolean;
7
+ tooltip: Record<string, any>;
8
+ smooth: boolean;
9
+ }
10
+ export declare function getRegressionConf({ regression }: IRegressionChartConf, data: number[][]): {
11
+ regressionSeries: IRegressionSeriesItem[];
12
+ regressionXAxes: Record<string, any>[];
13
+ };
14
+ export {};
@@ -0,0 +1,14 @@
1
+ /**
2
+ * NOTE: this file is almost a duplicate of cartesian/panel/regressions/regression-item.tsx
3
+ * FIXME: extract common input widgets & configs, then improve this file
4
+ */
5
+ /// <reference types="react" />
6
+ import { Control, UseFormWatch } from 'react-hook-form';
7
+ import { IRegressionChartConf } from './type';
8
+ interface IRegressionField {
9
+ control: Control<IRegressionChartConf, any>;
10
+ watch: UseFormWatch<IRegressionChartConf>;
11
+ data: any[];
12
+ }
13
+ export declare function RegressionField({ control, watch, data }: IRegressionField): JSX.Element;
14
+ export {};
@@ -0,0 +1,12 @@
1
+ import { IRegressionConf } from '../cartesian/type';
2
+ export interface IRegressionChartConf {
3
+ x_axis: {
4
+ name: string;
5
+ data_key: string;
6
+ };
7
+ y_axis: {
8
+ name: string;
9
+ };
10
+ regression: IRegressionConf;
11
+ }
12
+ export declare const DEFAULT_CONFIG: IRegressionChartConf;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizConfigProps } from '~/types/plugin';
3
+ export declare function VizRegressionChartPanel({ context }: VizConfigProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizViewProps } from '~/types/plugin';
3
+ export declare function VizRegressionChart({ context }: VizViewProps): JSX.Element | null;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { Editor } from '@mantine/rte';
3
+ /**
4
+ * Sync external changes to the editor
5
+ * see also https://github.com/mantinedev/mantine/issues/1625#issuecomment-1154506482
6
+ * @param content
7
+ */
8
+ export declare function useSyncEditorContent(content?: string): import("react").RefObject<Editor>;
@@ -0,0 +1,2 @@
1
+ import { VizComponent } from '~/types/plugin';
2
+ export declare const RichTextVizComponent: VizComponent;
@@ -0,0 +1,4 @@
1
+ export interface IRichTextConf {
2
+ content: '';
3
+ }
4
+ export declare const DEFAULT_CONFIG: IRichTextConf;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizConfigProps } from '~/types/plugin';
3
+ export declare function VizRichTextPanel({ context }: VizConfigProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizViewProps } from '~/types/plugin';
3
+ export declare function VizRichText({ context }: VizViewProps): JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { VizComponent } from '~/types/plugin';
2
+ export declare const StatsVizComponent: VizComponent;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { Control, UseFieldArrayRemove } from 'react-hook-form';
3
- import { IVizStatsConf } from '../types';
3
+ import { IVizStatsConf } from '../type';
4
4
  interface VariableField {
5
5
  control: Control<IVizStatsConf, any>;
6
6
  index: number;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { Control, UseFormWatch } from 'react-hook-form';
3
- import { IVizStatsConf } from '../types';
3
+ import { IVizStatsConf } from '../type';
4
4
  interface IVariablesField {
5
5
  control: Control<IVizStatsConf, any>;
6
6
  watch: UseFormWatch<IVizStatsConf>;