@equinor/echo-components 0.7.0 → 0.7.3

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.
@@ -1,19 +1,21 @@
1
1
  /// <reference types="react" />
2
2
  /// <reference types="chart.js" />
3
- import { ChartData, Defaults } from 'chart.js/auto';
4
- import { ChartCallbacks } from '../../../types/charts';
3
+ import Chart, { ChartData, Defaults } from 'chart.js/auto';
4
+ import { ChartCallbacks, LineChartConfig } from '../../../types/charts';
5
5
  interface Props {
6
- chartDataSet: ChartData;
7
- chartTitle: string;
8
- xAxisTitle: string;
9
- yAxisTitle: string;
10
6
  initialSize: Chart.ChartSize;
7
+ chartDataSet?: ChartData;
8
+ chartTitle?: string;
9
+ xAxisTitle?: string;
10
+ yAxisTitle?: string;
11
11
  id?: string;
12
12
  testId?: string;
13
13
  chartConfigs?: {
14
14
  defaults?: Defaults;
15
15
  callbacks?: ChartCallbacks;
16
16
  };
17
+ lineChartConfig?: LineChartConfig;
18
+ onChartInstance?: (chartInstance: Chart | undefined) => void;
17
19
  }
18
- declare function LineChart({ chartDataSet, chartTitle, xAxisTitle, yAxisTitle, id, testId, initialSize, chartConfigs }: Props): JSX.Element;
20
+ declare function LineChart({ initialSize, chartDataSet, chartTitle, xAxisTitle, yAxisTitle, id, testId, chartConfigs, lineChartConfig, onChartInstance }: Props): JSX.Element;
19
21
  export { LineChart };
@@ -1,24 +1,13 @@
1
1
  export declare const chartDataSet: {
2
2
  labels: string[];
3
- datasets: ({
3
+ datasets: {
4
4
  label: string;
5
5
  data: number[];
6
6
  borderColor: string;
7
7
  pointBackgroundColor: string;
8
8
  backgroundColor: string;
9
- borderWidth: number;
10
- pointStyle: string;
11
9
  fill: boolean;
12
- } | {
13
- label: string;
14
- data: number[];
15
- borderColor: string;
16
- pointBackgroundColor: string;
17
- backgroundColor: string;
18
- borderWidth: number;
19
- fill: boolean;
20
- pointStyle?: undefined;
21
- })[];
10
+ }[];
22
11
  };
23
12
  export declare const tooltip: {
24
13
  callbacks: {
@@ -1,3 +1,10 @@
1
1
  import { ChartData } from 'chart.js/auto';
2
2
  import { ChartCallbacks, LineChartConfig } from '../../../types/charts';
3
- export declare const generateChartConfig: (dataConfig: ChartData, chartTitle: string, xAxisTitle: string, yAxisTitle: string, chartCallbacks?: ChartCallbacks) => LineChartConfig;
3
+ export type ChartConfigOptions = {
4
+ dataConfig: ChartData;
5
+ chartTitle: string;
6
+ xAxisTitle: string;
7
+ yAxisTitle: string;
8
+ chartCallbacks?: ChartCallbacks;
9
+ };
10
+ export declare const generateChartConfig: ({ dataConfig, chartTitle, xAxisTitle, yAxisTitle, chartCallbacks }: ChartConfigOptions) => LineChartConfig;
@@ -1,6 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  export interface CopyToClipboardProps {
3
3
  copyableText: string;
4
+ variant?: 'neutral' | 'warning' | 'error';
5
+ multiline?: boolean;
6
+ className?: string;
4
7
  }
5
8
  declare const CopyToClipboard: (props: CopyToClipboardProps) => JSX.Element;
6
9
  export { CopyToClipboard };
@@ -3,3 +3,5 @@ export declare const robim_external_ald: IconData;
3
3
  export declare const robim_external_timp: IconData;
4
4
  export declare const robim_external_timp_text: IconData;
5
5
  export declare const robim_external_iwit: IconData;
6
+ export declare const robim_external_methane_sensor: IconData;
7
+ export declare const robim_external_satellite: IconData;