@equinor/echo-components 0.7.7 → 0.7.9
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.
- package/dist/components/blackLink/BlackLink.d.ts +1 -2
- package/dist/components/copyToClipboard/CopyToClipboard.d.ts +0 -3
- package/dist/components/floatingActionButton/FloatingActionButton.d.ts +1 -1
- package/dist/components/floatingSearchBar/FloatingSearchBar.d.ts +1 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/legend/MainLegend.d.ts +2 -10
- package/dist/components/legend/layerLegend/LayerLegend.d.ts +2 -6
- package/dist/hooks/useKeyboardNavigation.d.ts +8 -5
- package/dist/icons/echoAssets/external.d.ts +0 -2
- package/dist/icons/echoAssets/index.d.ts +0 -2
- package/dist/index.js +2477 -17217
- package/dist/index.js.map +1 -1
- package/package.json +58 -58
- package/dist/components/charts/index.d.ts +0 -1
- package/dist/components/charts/lineChart/LineChart.d.ts +0 -21
- package/dist/components/charts/lineChart/dummy/lineChartConfig.d.ts +0 -16
- package/dist/components/charts/lineChart/dummy/rawData.d.ts +0 -26
- package/dist/components/charts/lineChart/utils.d.ts +0 -10
- package/dist/icons/echoAssets/maps.d.ts +0 -6
- package/dist/icons/echoAssets/misc.d.ts +0 -2
- package/dist/types/charts.d.ts +0 -77
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-components",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.9",
|
|
4
4
|
"description": "Package for creating echo related components.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -30,94 +30,94 @@
|
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@equinor/echo-utils": ">= 0.3.0 < 0.4.0",
|
|
33
|
-
"@equinor/eds-core-react": "
|
|
34
|
-
"@equinor/eds-icons": "
|
|
33
|
+
"@equinor/eds-core-react": "=0.25.0",
|
|
34
|
+
"@equinor/eds-icons": "=0.17.0",
|
|
35
35
|
"react": ">= 17.0.2",
|
|
36
36
|
"react-dom": ">= 17.0.2",
|
|
37
|
-
"styled-components": "
|
|
37
|
+
"styled-components": ">= 5.3.5 < 6.0.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@babel/runtime": "^7.
|
|
41
|
-
"@floating-ui/react": "^0.
|
|
42
|
-
"chart.js": "^4.
|
|
43
|
-
"jest-environment-jsdom": "^29.
|
|
40
|
+
"@babel/runtime": "^7.22.5",
|
|
41
|
+
"@floating-ui/react": "^0.24.3",
|
|
42
|
+
"chart.js": "^4.3.0",
|
|
43
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
44
44
|
"lodash.throttle": "^4.1.1",
|
|
45
|
-
"react-datepicker": "^4.
|
|
45
|
+
"react-datepicker": "^4.14.1",
|
|
46
46
|
"react-sortablejs": "^6.1.4",
|
|
47
47
|
"sortablejs": "^1.15.0",
|
|
48
|
-
"zustand": "^4.3.
|
|
48
|
+
"zustand": "^4.3.8"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@babel/core": "^7.
|
|
52
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
53
|
-
"@babel/preset-env": "^7.
|
|
54
|
-
"@babel/preset-react": "^7.
|
|
55
|
-
"@babel/preset-typescript": "^7.
|
|
51
|
+
"@babel/core": "^7.22.5",
|
|
52
|
+
"@babel/plugin-transform-runtime": "^7.22.5",
|
|
53
|
+
"@babel/preset-env": "^7.22.5",
|
|
54
|
+
"@babel/preset-react": "^7.22.5",
|
|
55
|
+
"@babel/preset-typescript": "^7.22.5",
|
|
56
56
|
"@equinor/echo-update": "^1.3.1",
|
|
57
|
-
"@equinor/echo-utils": "^0.3.
|
|
58
|
-
"@equinor/eds-core-react": "
|
|
59
|
-
"@equinor/eds-icons": "
|
|
57
|
+
"@equinor/echo-utils": "^0.3.1",
|
|
58
|
+
"@equinor/eds-core-react": "=0.25.0",
|
|
59
|
+
"@equinor/eds-icons": "=0.17.0",
|
|
60
60
|
"@rollup/plugin-babel": "^6.0.3",
|
|
61
|
-
"@rollup/plugin-commonjs": "^
|
|
62
|
-
"@rollup/plugin-node-resolve": "^15.0
|
|
63
|
-
"@rollup/plugin-typescript": "^11.
|
|
61
|
+
"@rollup/plugin-commonjs": "^25.0.2",
|
|
62
|
+
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
63
|
+
"@rollup/plugin-typescript": "^11.1.1",
|
|
64
64
|
"@rollup/plugin-url": "^8.0.1",
|
|
65
|
-
"@storybook/addon-actions": "7.0.0-rc.3",
|
|
66
|
-
"@storybook/addon-docs": "7.0.0-rc.3",
|
|
67
|
-
"@storybook/addon-essentials": "7.0.0-rc.3",
|
|
68
|
-
"@storybook/addon-links": "7.0.0-rc.3",
|
|
69
|
-
"@storybook/react": "7.0.0-rc.3",
|
|
70
|
-
"@storybook/react-webpack5": "7.0.0-rc.3",
|
|
71
|
-
"@svgr/rollup": "^
|
|
72
|
-
"@svgr/webpack": "^
|
|
73
|
-
"@testing-library/dom": "^
|
|
65
|
+
"@storybook/addon-actions": "^7.0.0-rc.3",
|
|
66
|
+
"@storybook/addon-docs": "^7.0.0-rc.3",
|
|
67
|
+
"@storybook/addon-essentials": "^7.0.0-rc.3",
|
|
68
|
+
"@storybook/addon-links": "^7.0.0-rc.3",
|
|
69
|
+
"@storybook/react": "^7.0.0-rc.3",
|
|
70
|
+
"@storybook/react-webpack5": "^7.0.0-rc.3",
|
|
71
|
+
"@svgr/rollup": "^8.0.1",
|
|
72
|
+
"@svgr/webpack": "^8.0.1",
|
|
73
|
+
"@testing-library/dom": "^9.3.1",
|
|
74
74
|
"@testing-library/react": "^14.0.0",
|
|
75
75
|
"@types/chart.js": "^2.9.37",
|
|
76
|
-
"@types/jest": "^29.
|
|
76
|
+
"@types/jest": "^29.5.2",
|
|
77
77
|
"@types/lodash.throttle": "^4.1.7",
|
|
78
|
-
"@types/react": "^18.
|
|
79
|
-
"@types/react-datepicker": "^4.
|
|
78
|
+
"@types/react": "^18.2.14",
|
|
79
|
+
"@types/react-datepicker": "^4.11.2",
|
|
80
80
|
"@types/react-test-renderer": "^18.0.0",
|
|
81
81
|
"@types/react-window": "^1.8.5",
|
|
82
|
-
"@types/sortablejs": "^1.15.
|
|
82
|
+
"@types/sortablejs": "^1.15.1",
|
|
83
83
|
"@types/styled-components": "^5.1.26",
|
|
84
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
85
|
-
"@typescript-eslint/parser": "^5.
|
|
86
|
-
"babel-loader": "^
|
|
87
|
-
"css-loader": "^6.
|
|
88
|
-
"eslint": "^8.
|
|
89
|
-
"eslint-config-prettier": "^8.
|
|
90
|
-
"eslint-plugin-mdx": "^2.0
|
|
84
|
+
"@typescript-eslint/eslint-plugin": "^5.60.1",
|
|
85
|
+
"@typescript-eslint/parser": "^5.60.1",
|
|
86
|
+
"babel-loader": "^9.1.2",
|
|
87
|
+
"css-loader": "^6.8.1",
|
|
88
|
+
"eslint": "^8.43.0",
|
|
89
|
+
"eslint-config-prettier": "^8.8.0",
|
|
90
|
+
"eslint-plugin-mdx": "^2.1.0",
|
|
91
91
|
"eslint-plugin-prettier": "^4.2.1",
|
|
92
92
|
"eslint-plugin-react": "^7.32.2",
|
|
93
93
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
94
|
-
"eslint-plugin-storybook": "^0.6.
|
|
95
|
-
"html-webpack-plugin": "^5.5.
|
|
94
|
+
"eslint-plugin-storybook": "^0.6.12",
|
|
95
|
+
"html-webpack-plugin": "^5.5.3",
|
|
96
96
|
"identity-obj-proxy": "^3.0.0",
|
|
97
|
-
"jest": "^29.
|
|
97
|
+
"jest": "^29.5.0",
|
|
98
98
|
"jest-svg-transformer": "^1.0.0",
|
|
99
|
-
"postcss": "^8.4.
|
|
100
|
-
"postcss-loader": "^7.
|
|
101
|
-
"prettier": "^2.8.
|
|
99
|
+
"postcss": "^8.4.24",
|
|
100
|
+
"postcss-loader": "^7.3.3",
|
|
101
|
+
"prettier": "^2.8.8",
|
|
102
102
|
"react": "^18.2.0",
|
|
103
|
-
"react-datepicker": "^4.
|
|
103
|
+
"react-datepicker": "^4.14.1",
|
|
104
104
|
"react-dom": "^18.2.0",
|
|
105
105
|
"react-test-renderer": "^18.2.0",
|
|
106
|
-
"react-window": "^1.8.
|
|
107
|
-
"rollup": "^3.
|
|
106
|
+
"react-window": "^1.8.9",
|
|
107
|
+
"rollup": "^3.25.3",
|
|
108
108
|
"rollup-plugin-delete": "^2.0.0",
|
|
109
109
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
110
110
|
"rollup-plugin-postcss": "^4.0.2",
|
|
111
111
|
"rollup-plugin-typescript-paths": "^1.4.0",
|
|
112
|
-
"rollup-plugin-visualizer": "^5.
|
|
113
|
-
"storybook": "7.0.0-rc.3",
|
|
112
|
+
"rollup-plugin-visualizer": "^5.9.2",
|
|
113
|
+
"storybook": "^7.0.0-rc.3",
|
|
114
114
|
"storybook-css-modules-preset": "^1.1.1",
|
|
115
|
-
"style-loader": "^3.3.
|
|
116
|
-
"styled-components": "^5.3.
|
|
117
|
-
"ts-jest": "^29.0
|
|
118
|
-
"tsconfig-paths-webpack-plugin": "^4.0.
|
|
119
|
-
"typescript": "^
|
|
120
|
-
"webpack": "^5.
|
|
115
|
+
"style-loader": "^3.3.3",
|
|
116
|
+
"styled-components": "^5.3.11",
|
|
117
|
+
"ts-jest": "^29.1.0",
|
|
118
|
+
"tsconfig-paths-webpack-plugin": "^4.0.1",
|
|
119
|
+
"typescript": "^5.1.3",
|
|
120
|
+
"webpack": "^5.88.0",
|
|
121
121
|
"worker-loader": "^3.0.8"
|
|
122
122
|
},
|
|
123
123
|
"files": [
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { LineChart } from './lineChart/LineChart';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/// <reference types="chart.js" />
|
|
3
|
-
import Chart, { 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
|
-
onChartInstance?: (chartInstance: Chart | undefined) => void;
|
|
19
|
-
}
|
|
20
|
-
declare function LineChart({ initialSize, chartDataSet, chartTitle, xAxisTitle, yAxisTitle, id, testId, chartConfigs, lineChartConfig, onChartInstance }: Props): JSX.Element;
|
|
21
|
-
export { LineChart };
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
import { IconData } from '@equinor/eds-icons';
|
|
2
|
-
export declare const polygon: IconData;
|
|
3
|
-
export declare const polyrectangle: IconData;
|
|
4
|
-
export declare const polyline: IconData;
|
|
5
|
-
export declare const polygon_symbol: IconData;
|
|
6
|
-
export declare const distance_circle: IconData;
|
package/dist/types/charts.d.ts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { InteractionMode, TooltipItem } from 'chart.js';
|
|
2
|
-
import { ChartData, ChartOptions, ChartType } from 'chart.js/auto';
|
|
3
|
-
export type LineChartDataSet = {
|
|
4
|
-
label: string;
|
|
5
|
-
data: number[];
|
|
6
|
-
borderColor: string;
|
|
7
|
-
pointBackgroundColor: string;
|
|
8
|
-
backgroundColor: string;
|
|
9
|
-
borderWidth: number;
|
|
10
|
-
pointStyle: string;
|
|
11
|
-
fill: boolean;
|
|
12
|
-
};
|
|
13
|
-
export type LineChartData = {
|
|
14
|
-
labels: string[];
|
|
15
|
-
datasets: LineChartDataSet[];
|
|
16
|
-
};
|
|
17
|
-
export type LineChartConfig = {
|
|
18
|
-
type: ChartType;
|
|
19
|
-
data: ChartData;
|
|
20
|
-
options: ChartOptions & {
|
|
21
|
-
responsive: boolean;
|
|
22
|
-
stacked: boolean;
|
|
23
|
-
interaction: {
|
|
24
|
-
mode: InteractionMode;
|
|
25
|
-
intersect: boolean;
|
|
26
|
-
};
|
|
27
|
-
elements: {
|
|
28
|
-
line: {
|
|
29
|
-
borderWidth: number;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
plugins: {
|
|
33
|
-
legend: {
|
|
34
|
-
labels: {
|
|
35
|
-
boxWidth: number;
|
|
36
|
-
boxHeight: number;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
title: {
|
|
40
|
-
display: boolean;
|
|
41
|
-
text: string;
|
|
42
|
-
};
|
|
43
|
-
tooltip: {
|
|
44
|
-
callbacks?: {
|
|
45
|
-
title?: () => string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
scales: {
|
|
50
|
-
x: {
|
|
51
|
-
title: {
|
|
52
|
-
display: boolean;
|
|
53
|
-
text: string;
|
|
54
|
-
};
|
|
55
|
-
ticks: {
|
|
56
|
-
minRotation: number;
|
|
57
|
-
maxRotation: number;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
y: {
|
|
61
|
-
border: {
|
|
62
|
-
display: boolean;
|
|
63
|
-
};
|
|
64
|
-
title: {
|
|
65
|
-
display: boolean;
|
|
66
|
-
text: string;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
animation: boolean;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
export type ChartCallbacks = {
|
|
74
|
-
tooltipCallback?: {
|
|
75
|
-
title?: (tooltipItems: TooltipItem<'line'>[]) => string | undefined;
|
|
76
|
-
};
|
|
77
|
-
};
|