@devtable/dashboard 9.1.0 → 9.2.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.
@@ -5,6 +5,7 @@ interface IXAxisLabelFormatterField {
5
5
  value: IXAxisLabelFormatter;
6
6
  onChange: (v: IXAxisLabelFormatter) => void;
7
7
  data: AnyObject[];
8
+ triggerButtonText?: string;
8
9
  }
9
10
  export declare const XAxisLabelFormatterField: import('./react').ForwardRefExoticComponent<IXAxisLabelFormatterField & import('./react').RefAttributes<unknown>>;
10
11
  export {};
@@ -1,5 +1,3 @@
1
1
  import { IRegressionSeriesItem } from '~/plugins/common-echarts-fields/regression-line';
2
2
  import { ICartesianChartConf } from '../type';
3
- export declare function getRegressionConfs({ regressions, x_axis_data_key }: ICartesianChartConf, rawData: TVizData): {
4
- regressionSeries: IRegressionSeriesItem[];
5
- };
3
+ export declare function getRegressionConfs({ regressions, x_axis_data_key }: ICartesianChartConf, rawData: TVizData): IRegressionSeriesItem[];
@@ -1,10 +1,6 @@
1
- /**
2
- * NOTE: this file is almost a duplicate of cartesian/editors/regressions/regression-item.tsx
3
- * FIXME: extract common input widgets & configs, then improve this file
4
- */
5
1
  /// <reference types="react" />
6
2
  import { Control, UseFormWatch } from 'react-hook-form';
7
- import { IRegressionChartConf } from './type';
3
+ import { IRegressionChartConf } from '../type';
8
4
  interface IRegressionField {
9
5
  control: Control<IRegressionChartConf, $TSFixMe>;
10
6
  watch: UseFormWatch<IRegressionChartConf>;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { IRegressionChartConf } from '../type';
4
+ interface IXAxisField {
5
+ control: Control<IRegressionChartConf, $TSFixMe>;
6
+ watch: UseFormWatch<IRegressionChartConf>;
7
+ data: TVizData;
8
+ }
9
+ export declare function XAxisField({ data, control, watch }: IXAxisField): JSX.Element;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { IRegressionChartConf } from '../type';
4
+ interface IYAxisField {
5
+ control: Control<IRegressionChartConf, $TSFixMe>;
6
+ watch: UseFormWatch<IRegressionChartConf>;
7
+ data: TVizData;
8
+ }
9
+ export declare function YAxisField({ data, control, watch }: IYAxisField): JSX.Element;
10
+ export {};
@@ -0,0 +1,2 @@
1
+ import { IRegressionChartConf } from '../type';
2
+ export declare function v2(legacyConf: $TSFixMe): IRegressionChartConf;
@@ -1,6 +1,6 @@
1
1
  import { IRegressionSeriesItem } from '~/plugins/common-echarts-fields/regression-line';
2
2
  import { IRegressionChartConf } from '../type';
3
- export declare function getRegressionConf({ regression }: IRegressionChartConf, data: number[][]): {
4
- regressionSeries: IRegressionSeriesItem[];
5
- regressionXAxes: Record<string, any>[];
6
- };
3
+ import { TSeriesConf } from './series';
4
+ declare type TGetRegressionConfRet = IRegressionSeriesItem[];
5
+ export declare function getRegressionConf(conf: IRegressionChartConf, series: TSeriesConf): TGetRegressionConfRet;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ import { AnyObject } from '~/types';
2
+ import { IRegressionChartConf } from '../type';
3
+ export declare type TSeriesConf = AnyObject[];
4
+ export declare function getSeries(conf: IRegressionChartConf, data: TVizData): TSeriesConf;
@@ -2,10 +2,12 @@ import { IRegressionChartConf } from '../type';
2
2
  declare type TFormatterParams = {
3
3
  color: string;
4
4
  marker: string;
5
- name: string;
5
+ seriesName: string;
6
6
  value: [number, number];
7
7
  };
8
8
  export declare function getTooltip(conf: IRegressionChartConf): {
9
+ confine: boolean;
10
+ trigger: string;
9
11
  formatter: (params: TFormatterParams | TFormatterParams[]) => string;
10
12
  };
11
13
  export {};
@@ -0,0 +1,18 @@
1
+ import { IRegressionChartConf } from '../type';
2
+ export declare function getXAxis(conf: IRegressionChartConf): {
3
+ type: string;
4
+ name: string;
5
+ nameLocation: string;
6
+ nameGap: number;
7
+ axisTick: {
8
+ show: boolean;
9
+ alignWithLabel: boolean;
10
+ };
11
+ axisLabel: {
12
+ formatter: (value: number, index: number) => any;
13
+ width: number;
14
+ overflow: "truncate" | "break" | "breakAll";
15
+ ellipsis: "...";
16
+ rotate: number;
17
+ };
18
+ };
@@ -0,0 +1,9 @@
1
+ import { IRegressionChartConf } from '../../type';
2
+ import { ReactNode } from './react';
3
+ export declare type TDescription = {
4
+ name: string;
5
+ expression: ReactNode;
6
+ rSquared: number;
7
+ adjustedRSquared: number;
8
+ };
9
+ export declare function getRegressionDescription(data: TVizData, conf?: IRegressionChartConf): TDescription[];
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { IRegressionChartConf } from '../type';
2
+ import { IRegressionChartConf } from '../../type';
3
3
  export interface IRegressionDescription {
4
4
  conf: IRegressionChartConf;
5
5
  data: TVizData;
@@ -1,12 +1,21 @@
1
+ import { IXAxisLabelFormatter } from '~/plugins/common-echarts-fields/x-axis-label-formatter/types';
1
2
  import { IRegressionConf } from '../cartesian/type';
3
+ import { IAxisLabelOverflow } from '~/plugins/common-echarts-fields/axis-label-overflow';
4
+ import { TNumbroFormat } from '~/panel/settings/common/numbro-format-selector';
2
5
  export interface IRegressionChartConf {
3
6
  x_axis: {
4
7
  name: string;
5
8
  data_key: string;
9
+ axisLabel: {
10
+ rotate: number;
11
+ format: TNumbroFormat;
12
+ overflow: IAxisLabelOverflow;
13
+ formatter: IXAxisLabelFormatter;
14
+ };
6
15
  };
7
16
  y_axis: {
8
17
  name: string;
9
18
  };
10
- regression: Omit<IRegressionConf, 'group_by_key'>;
19
+ regression: IRegressionConf;
11
20
  }
12
21
  export declare const DEFAULT_CONFIG: IRegressionChartConf;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/dashboard",
3
- "version": "9.1.0",
3
+ "version": "9.2.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -52,7 +52,7 @@
52
52
  "@mantine/notifications": "5.9.5",
53
53
  "@mantine/prism": "5.9.5",
54
54
  "@mantine/tiptap": "5.9.5",
55
- "@tabler/icons": "^1.118.0",
55
+ "@tabler/icons": "1.119.0",
56
56
  "@testing-library/cypress": "^9.0.0",
57
57
  "@testing-library/jest-dom": "^5.16.4",
58
58
  "@testing-library/react": "^13.3.0",
@@ -120,7 +120,7 @@
120
120
  "@mantine/notifications": "5.9.5",
121
121
  "@mantine/prism": "5.9.5",
122
122
  "@mantine/tiptap": "5.9.5",
123
- "@tabler/icons": "^1.118.0",
123
+ "@tabler/icons": "1.119.0",
124
124
  "@tanstack/react-table": "^8.5.13",
125
125
  "@tiptap/extension-code-block-lowlight": "2.0.3",
126
126
  "@tiptap/extension-color": "2.0.3",