@equinor/echo-components 0.6.6 → 0.7.2

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.
@@ -0,0 +1 @@
1
+ export { LineChart } from './lineChart/LineChart';
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ /// <reference types="chart.js" />
3
+ import { ChartData, Defaults } from 'chart.js/auto';
4
+ import { ChartCallbacks, LineChartConfig } from '../../../types/charts';
5
+ interface Props {
6
+ initialSize: Chart.ChartSize;
7
+ chartDataSet?: ChartData;
8
+ chartTitle?: string;
9
+ xAxisTitle?: string;
10
+ yAxisTitle?: string;
11
+ id?: string;
12
+ testId?: string;
13
+ chartConfigs?: {
14
+ defaults?: Defaults;
15
+ callbacks?: ChartCallbacks;
16
+ };
17
+ lineChartConfig?: LineChartConfig;
18
+ }
19
+ declare function LineChart({ initialSize, chartDataSet, chartTitle, xAxisTitle, yAxisTitle, id, testId, chartConfigs, lineChartConfig }: Props): JSX.Element;
20
+ export { LineChart };
@@ -0,0 +1,16 @@
1
+ export declare const chartDataSet: {
2
+ labels: string[];
3
+ datasets: {
4
+ label: string;
5
+ data: number[];
6
+ borderColor: string;
7
+ pointBackgroundColor: string;
8
+ backgroundColor: string;
9
+ fill: boolean;
10
+ }[];
11
+ };
12
+ export declare const tooltip: {
13
+ callbacks: {
14
+ title: (tooltipItems: [Chart.ChartTooltipItem]) => string | undefined;
15
+ };
16
+ };
@@ -0,0 +1,26 @@
1
+ export declare const raw: {
2
+ DATA1: {
3
+ id: string;
4
+ value: number;
5
+ timestamp: string;
6
+ status: number;
7
+ }[];
8
+ DATA2: {
9
+ id: string;
10
+ value: number;
11
+ timestamp: string;
12
+ status: number;
13
+ }[];
14
+ DATA3: {
15
+ id: string;
16
+ value: number;
17
+ timestamp: string;
18
+ status: number;
19
+ }[];
20
+ DATA4: {
21
+ id: string;
22
+ value: number;
23
+ timestamp: string;
24
+ status: number;
25
+ }[];
26
+ };
@@ -0,0 +1,10 @@
1
+ import { ChartData } from 'chart.js/auto';
2
+ import { ChartCallbacks, LineChartConfig } from '../../../types/charts';
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,6 @@
1
1
  import React from 'react';
2
2
  interface WithLabel {
3
- variant: 'square_icon_with_text';
3
+ variant: 'square_icon_with_text' | 'square_icon_with_text_below';
4
4
  label: string;
5
5
  }
6
6
  interface WithoutLabel {
@@ -1,5 +1,6 @@
1
1
  export * from './blackLink/BlackLink';
2
2
  export * from './buttonWithPopover/ButtonWithPopover';
3
+ export * from './charts';
3
4
  export * from './contextMenu/ContextMenu';
4
5
  export * from './contextMenuPopover/DataInfoButton';
5
6
  export * from './copyToClipboard/CopyToClipboard';
@@ -1,8 +1,9 @@
1
- import { PanelSize } from '@types';
1
+ import { PanelSize } from 'src/types/menuItem';
2
2
  import * as zustand from 'zustand';
3
3
  export interface PanelState {
4
4
  activePanel: string | undefined;
5
5
  panelSize: PanelSize;
6
+ overflowMenuOpen: boolean;
6
7
  updateActivePanel: (newActivePanel: string | undefined) => void;
7
8
  updatePanelSize: (newPanelSize: PanelSize) => void;
8
9
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface MenuButtonProps {
2
+ interface MenuButtonInterfaceProps {
3
3
  text: string;
4
4
  active: boolean;
5
5
  onClick: (event?: React.MouseEvent<HTMLButtonElement>) => void;
@@ -20,5 +20,5 @@ interface MenuButtonProps {
20
20
  * }
21
21
  * @return {*} {JSX.Element}
22
22
  */
23
- export declare const MenuButton: React.ForwardRefExoticComponent<MenuButtonProps & React.RefAttributes<HTMLButtonElement | null>>;
23
+ export declare const MenuButton: React.ForwardRefExoticComponent<MenuButtonInterfaceProps & React.HTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement | null>>;
24
24
  export default MenuButton;
@@ -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;