@neo4j-ndl/react-charts 0.0.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.
- package/LICENSE +674 -0
- package/lib/LICENSES.txt +229 -0
- package/lib/NOTICE.txt +26 -0
- package/lib/cjs/charts/Chart.js +162 -0
- package/lib/cjs/charts/Chart.js.map +1 -0
- package/lib/cjs/charts/ChartTooltip.js +52 -0
- package/lib/cjs/charts/ChartTooltip.js.map +1 -0
- package/lib/cjs/charts/Legend.js +238 -0
- package/lib/cjs/charts/Legend.js.map +1 -0
- package/lib/cjs/charts/index.js +38 -0
- package/lib/cjs/charts/index.js.map +1 -0
- package/lib/cjs/charts/themes/darkTheme.js +30 -0
- package/lib/cjs/charts/themes/darkTheme.js.map +1 -0
- package/lib/cjs/charts/themes/defaultTheme.js +57 -0
- package/lib/cjs/charts/themes/defaultTheme.js.map +1 -0
- package/lib/cjs/charts/themes/lightTheme.js +30 -0
- package/lib/cjs/charts/themes/lightTheme.js.map +1 -0
- package/lib/cjs/charts/utils.js +40 -0
- package/lib/cjs/charts/utils.js.map +1 -0
- package/lib/cjs/common/ConditionalWrap.js +30 -0
- package/lib/cjs/common/ConditionalWrap.js.map +1 -0
- package/lib/cjs/index.js +38 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/esm/charts/Chart.js +159 -0
- package/lib/esm/charts/Chart.js.map +1 -0
- package/lib/esm/charts/ChartTooltip.js +46 -0
- package/lib/esm/charts/ChartTooltip.js.map +1 -0
- package/lib/esm/charts/Legend.js +232 -0
- package/lib/esm/charts/Legend.js.map +1 -0
- package/lib/esm/charts/index.js +22 -0
- package/lib/esm/charts/index.js.map +1 -0
- package/lib/esm/charts/themes/darkTheme.js +27 -0
- package/lib/esm/charts/themes/darkTheme.js.map +1 -0
- package/lib/esm/charts/themes/defaultTheme.js +54 -0
- package/lib/esm/charts/themes/defaultTheme.js.map +1 -0
- package/lib/esm/charts/themes/lightTheme.js +27 -0
- package/lib/esm/charts/themes/lightTheme.js.map +1 -0
- package/lib/esm/charts/utils.js +37 -0
- package/lib/esm/charts/utils.js.map +1 -0
- package/lib/esm/common/ConditionalWrap.js +26 -0
- package/lib/esm/common/ConditionalWrap.js.map +1 -0
- package/lib/esm/index.js +22 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/types/charts/Chart.d.ts +38 -0
- package/lib/types/charts/ChartTooltip.d.ts +59 -0
- package/lib/types/charts/Legend.d.ts +30 -0
- package/lib/types/charts/index.d.ts +21 -0
- package/lib/types/charts/themes/darkTheme.d.ts +55 -0
- package/lib/types/charts/themes/defaultTheme.d.ts +51 -0
- package/lib/types/charts/themes/lightTheme.d.ts +55 -0
- package/lib/types/charts/utils.d.ts +23 -0
- package/lib/types/common/ConditionalWrap.d.ts +27 -0
- package/lib/types/index.d.ts +21 -0
- package/package.json +76 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import { useCallback, useRef } from 'react';
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23
|
+
const useThrottle = (callback, limit) => {
|
|
24
|
+
const lastCallRef = useRef(0);
|
|
25
|
+
const throttledCallback = useCallback(
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
+
(...args) => {
|
|
28
|
+
const now = Date.now();
|
|
29
|
+
if (now - lastCallRef.current >= limit) {
|
|
30
|
+
lastCallRef.current = now;
|
|
31
|
+
callback(...args);
|
|
32
|
+
}
|
|
33
|
+
}, [callback, limit]);
|
|
34
|
+
return throttledCallback;
|
|
35
|
+
};
|
|
36
|
+
export { useThrottle };
|
|
37
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/charts/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE5C,8DAA8D;AAC9D,MAAM,WAAW,GAAG,CAAC,QAAqC,EAAE,KAAa,EAAE,EAAE;IAC3E,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC9B,MAAM,iBAAiB,GAAG,WAAW;IACnC,8DAA8D;IAC9D,CAAC,GAAG,IAAW,EAAE,EAAE;QACjB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,IAAI,GAAG,GAAG,WAAW,CAAC,OAAO,IAAI,KAAK,EAAE,CAAC;YACvC,WAAW,CAAC,OAAO,GAAG,GAAG,CAAC;YAC1B,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC;QACpB,CAAC;IACH,CAAC,EACD,CAAC,QAAQ,EAAE,KAAK,CAAC,CAClB,CAAC;IACF,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
+
export const ConditionalWrap = ({ shouldWrap: condition, wrapper, children, }) => {
|
|
24
|
+
return condition ? _jsx(_Fragment, { children: wrapper(children) }) : _jsx(_Fragment, { children: children });
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=ConditionalWrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConditionalWrap.js","sourceRoot":"","sources":["../../../src/common/ConditionalWrap.tsx"],"names":[],"mappings":";AA2BA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,UAAU,EAAE,SAAS,EACrB,OAAO,EACP,QAAQ,GACa,EAAE,EAAE;IACzB,OAAO,SAAS,CAAC,CAAC,CAAC,4BAAG,OAAO,CAAC,QAAQ,CAAC,GAAI,CAAC,CAAC,CAAC,4BAAG,QAAQ,GAAI,CAAC;AAChE,CAAC,CAAC"}
|
package/lib/esm/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export * from './charts';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import { type CSSProperties } from 'react';
|
|
22
|
+
import { type EChartsOption, type SetOptionOpts } from 'echarts';
|
|
23
|
+
import { LegendProps } from './Legend';
|
|
24
|
+
export interface ChartProps {
|
|
25
|
+
dataset: EChartsOption['dataset'];
|
|
26
|
+
series: EChartsOption['series'];
|
|
27
|
+
xAxis: EChartsOption['xAxis'];
|
|
28
|
+
yAxis: EChartsOption['yAxis'];
|
|
29
|
+
legend?: {
|
|
30
|
+
show?: boolean;
|
|
31
|
+
wrappingType?: LegendProps['wrappingType'];
|
|
32
|
+
};
|
|
33
|
+
option: Omit<EChartsOption, 'series' | 'dataset' | 'legend' | 'xAxis' | 'yAxis'>;
|
|
34
|
+
style?: CSSProperties;
|
|
35
|
+
settings?: SetOptionOpts;
|
|
36
|
+
loading?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare function Chart({ dataset, option: userOption, xAxis, yAxis, series, style, settings, loading, legend, }: ChartProps): JSX.Element;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import React from 'react';
|
|
23
|
+
export interface ChartTooltipProps {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
className?: string;
|
|
26
|
+
isOpen?: boolean;
|
|
27
|
+
style?: React.CSSProperties;
|
|
28
|
+
anchorPosition?: {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export declare const ChartTooltipComponent: React.ForwardRefExoticComponent<ChartTooltipProps & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
+
type ChartTooltipTitleProps = {
|
|
35
|
+
children: React.ReactNode;
|
|
36
|
+
};
|
|
37
|
+
export type ChartTooltipContentProps = {
|
|
38
|
+
leftElement?: React.ReactNode;
|
|
39
|
+
rightElement?: React.ReactNode;
|
|
40
|
+
indentSquareColor?: string;
|
|
41
|
+
notification?: {
|
|
42
|
+
leftElement: React.ReactNode;
|
|
43
|
+
rightElement: React.ReactNode;
|
|
44
|
+
type: 'warning' | 'danger';
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
declare const ChartTooltip: React.ForwardRefExoticComponent<ChartTooltipProps & React.RefAttributes<HTMLDivElement>> & {
|
|
48
|
+
Title: React.ForwardRefExoticComponent<ChartTooltipTitleProps & React.RefAttributes<HTMLSpanElement>>;
|
|
49
|
+
Content: React.ForwardRefExoticComponent<ChartTooltipContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
50
|
+
Link: React.ForwardRefExoticComponent<Omit<import("@neo4j-ndl/react").TextLinkProps & {
|
|
51
|
+
as?: React.ElementType<any> | undefined;
|
|
52
|
+
htmlAttributes?: import("@neo4j-ndl/react/lib/types/_common/types").HtmlAttributes<React.ElementType<any>> | undefined;
|
|
53
|
+
className?: string;
|
|
54
|
+
style?: React.CSSProperties;
|
|
55
|
+
} & {
|
|
56
|
+
ref?: any;
|
|
57
|
+
}, "ref"> & React.RefAttributes<unknown>>;
|
|
58
|
+
};
|
|
59
|
+
export { ChartTooltip };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import React from 'react';
|
|
22
|
+
export interface LegendProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
23
|
+
wrappingType?: 'wrapping' | 'truncation' | 'overflow';
|
|
24
|
+
series: {
|
|
25
|
+
name: string;
|
|
26
|
+
color: string;
|
|
27
|
+
}[];
|
|
28
|
+
chartRef: React.RefObject<HTMLDivElement>;
|
|
29
|
+
}
|
|
30
|
+
export declare const Legend: React.ForwardRefExoticComponent<LegendProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export * from './Chart';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
export declare const darkTheme: {
|
|
23
|
+
version: number;
|
|
24
|
+
themeName: string;
|
|
25
|
+
theme: {
|
|
26
|
+
color: string[];
|
|
27
|
+
axes: {
|
|
28
|
+
type: string;
|
|
29
|
+
axisLineShow: boolean;
|
|
30
|
+
axisLineColor: string;
|
|
31
|
+
axisTickShow: boolean;
|
|
32
|
+
axisTickColor: string;
|
|
33
|
+
axisLabelShow: boolean;
|
|
34
|
+
axisLabelColor: string;
|
|
35
|
+
splitLineShow: boolean;
|
|
36
|
+
splitLineColor: string[];
|
|
37
|
+
splitAreaShow: boolean;
|
|
38
|
+
splitAreaColor: string[];
|
|
39
|
+
}[];
|
|
40
|
+
lineWidth: string;
|
|
41
|
+
backgroundColor: string;
|
|
42
|
+
kColor: string;
|
|
43
|
+
kColor0: string;
|
|
44
|
+
kBorderColor: string;
|
|
45
|
+
kBorderColor0: string;
|
|
46
|
+
kBorderWidth: number;
|
|
47
|
+
symbolSize: string;
|
|
48
|
+
symbol: string;
|
|
49
|
+
symbolBorderWidth: string;
|
|
50
|
+
lineSmooth: boolean;
|
|
51
|
+
graphLineWidth: number;
|
|
52
|
+
graphLineColor: string;
|
|
53
|
+
axisSeperateSetting: boolean;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
export declare const defaultTheme: {
|
|
23
|
+
color: string[];
|
|
24
|
+
axes: {
|
|
25
|
+
type: string;
|
|
26
|
+
axisLineShow: boolean;
|
|
27
|
+
axisLineColor: string;
|
|
28
|
+
axisTickShow: boolean;
|
|
29
|
+
axisTickColor: string;
|
|
30
|
+
axisLabelShow: boolean;
|
|
31
|
+
axisLabelColor: string;
|
|
32
|
+
splitLineShow: boolean;
|
|
33
|
+
splitLineColor: string[];
|
|
34
|
+
splitAreaShow: boolean;
|
|
35
|
+
splitAreaColor: string[];
|
|
36
|
+
}[];
|
|
37
|
+
lineWidth: string;
|
|
38
|
+
backgroundColor: string;
|
|
39
|
+
kColor: string;
|
|
40
|
+
kColor0: string;
|
|
41
|
+
kBorderColor: string;
|
|
42
|
+
kBorderColor0: string;
|
|
43
|
+
kBorderWidth: number;
|
|
44
|
+
symbolSize: string;
|
|
45
|
+
symbol: string;
|
|
46
|
+
symbolBorderWidth: string;
|
|
47
|
+
lineSmooth: boolean;
|
|
48
|
+
graphLineWidth: number;
|
|
49
|
+
graphLineColor: string;
|
|
50
|
+
axisSeperateSetting: boolean;
|
|
51
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
export declare const lightTheme: {
|
|
23
|
+
version: number;
|
|
24
|
+
themeName: string;
|
|
25
|
+
theme: {
|
|
26
|
+
color: string[];
|
|
27
|
+
axes: {
|
|
28
|
+
type: string;
|
|
29
|
+
axisLineShow: boolean;
|
|
30
|
+
axisLineColor: string;
|
|
31
|
+
axisTickShow: boolean;
|
|
32
|
+
axisTickColor: string;
|
|
33
|
+
axisLabelShow: boolean;
|
|
34
|
+
axisLabelColor: string;
|
|
35
|
+
splitLineShow: boolean;
|
|
36
|
+
splitLineColor: string[];
|
|
37
|
+
splitAreaShow: boolean;
|
|
38
|
+
splitAreaColor: string[];
|
|
39
|
+
}[];
|
|
40
|
+
lineWidth: string;
|
|
41
|
+
backgroundColor: string;
|
|
42
|
+
kColor: string;
|
|
43
|
+
kColor0: string;
|
|
44
|
+
kBorderColor: string;
|
|
45
|
+
kBorderColor0: string;
|
|
46
|
+
kBorderWidth: number;
|
|
47
|
+
symbolSize: string;
|
|
48
|
+
symbol: string;
|
|
49
|
+
symbolBorderWidth: string;
|
|
50
|
+
lineSmooth: boolean;
|
|
51
|
+
graphLineWidth: number;
|
|
52
|
+
graphLineColor: string;
|
|
53
|
+
axisSeperateSetting: boolean;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
declare const useThrottle: (callback: (...args: any[]) => unknown, limit: number) => (...args: any[]) => void;
|
|
23
|
+
export { useThrottle };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
type ConditionalWrapProps = {
|
|
22
|
+
shouldWrap: boolean;
|
|
23
|
+
wrapper: (children: React.ReactNode) => React.ReactNode;
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
};
|
|
26
|
+
export declare const ConditionalWrap: ({ shouldWrap: condition, wrapper, children, }: ConditionalWrapProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export * from './charts';
|
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@neo4j-ndl/react-charts",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"description": "React implementation of charts from Neo4j Design System",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"neo4j",
|
|
8
|
+
"react",
|
|
9
|
+
"design system",
|
|
10
|
+
"needle",
|
|
11
|
+
"ndl",
|
|
12
|
+
"chart",
|
|
13
|
+
"charts"
|
|
14
|
+
],
|
|
15
|
+
"author": "Neo4j Inc.",
|
|
16
|
+
"homepage": "https://www.neo4j.design",
|
|
17
|
+
"license": "GPL-3.0",
|
|
18
|
+
"main": "./lib/cjs/index.js",
|
|
19
|
+
"module": "./lib/esm/index.js",
|
|
20
|
+
"types": "./lib/types/index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
"./icons": {
|
|
23
|
+
"import": "./lib/esm/icons/index.js",
|
|
24
|
+
"require": "./lib/cjs/icons/index.js",
|
|
25
|
+
"types": "./lib/types/icons/index.d.ts"
|
|
26
|
+
},
|
|
27
|
+
".": {
|
|
28
|
+
"import": "./lib/esm/index.js",
|
|
29
|
+
"require": "./lib/cjs/index.js",
|
|
30
|
+
"types": "./lib/types/index.d.ts"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"directories": {
|
|
34
|
+
"lib": "lib"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"lib",
|
|
38
|
+
"icons"
|
|
39
|
+
],
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@axe-core/playwright": "4.9.0",
|
|
45
|
+
"@playwright/experimental-ct-react": "1.45.0",
|
|
46
|
+
"@playwright/test": "1.45.0",
|
|
47
|
+
"@types/react": "18.2.18",
|
|
48
|
+
"@types/react-dom": "18.2.7",
|
|
49
|
+
"react": "18.2.0",
|
|
50
|
+
"typescript": "5.5.4"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"react": ">=16.8.0",
|
|
54
|
+
"react-dom": ">=16.8.0",
|
|
55
|
+
"@neo4j-ndl/base": "^3.0.15"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"classnames": "2.5.1",
|
|
59
|
+
"echarts": "5.5.1",
|
|
60
|
+
"usehooks-ts": "3.1.0",
|
|
61
|
+
"@neo4j-ndl/react": "^3.0.28"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"test": "pnpm test:playwright",
|
|
65
|
+
"test:playwright": "playwright test -c playwright-component-testing.config.ts",
|
|
66
|
+
"build": "pnpm build:esm && pnpm build:cjs && pnpm build:types",
|
|
67
|
+
"build:esm": "tsc -p tsconfig.esm.json",
|
|
68
|
+
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
69
|
+
"watch:esm": "tsc -p tsconfig.esm.json --watch",
|
|
70
|
+
"watch:cjs": "tsc -p tsconfig.cjs.json --watch",
|
|
71
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
72
|
+
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx}'",
|
|
73
|
+
"lint": "eslint src",
|
|
74
|
+
"nuke:local": "../../scripts/cc.sh '{yellow ☢️} Nuking react! {yellow ☢️}' && pnpm dlx rimraf@5.0.5 .tsbuildinfo node_modules lib playwright-report test-results playwright/.cache"
|
|
75
|
+
}
|
|
76
|
+
}
|