@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.
Files changed (54) hide show
  1. package/LICENSE +674 -0
  2. package/lib/LICENSES.txt +229 -0
  3. package/lib/NOTICE.txt +26 -0
  4. package/lib/cjs/charts/Chart.js +162 -0
  5. package/lib/cjs/charts/Chart.js.map +1 -0
  6. package/lib/cjs/charts/ChartTooltip.js +52 -0
  7. package/lib/cjs/charts/ChartTooltip.js.map +1 -0
  8. package/lib/cjs/charts/Legend.js +238 -0
  9. package/lib/cjs/charts/Legend.js.map +1 -0
  10. package/lib/cjs/charts/index.js +38 -0
  11. package/lib/cjs/charts/index.js.map +1 -0
  12. package/lib/cjs/charts/themes/darkTheme.js +30 -0
  13. package/lib/cjs/charts/themes/darkTheme.js.map +1 -0
  14. package/lib/cjs/charts/themes/defaultTheme.js +57 -0
  15. package/lib/cjs/charts/themes/defaultTheme.js.map +1 -0
  16. package/lib/cjs/charts/themes/lightTheme.js +30 -0
  17. package/lib/cjs/charts/themes/lightTheme.js.map +1 -0
  18. package/lib/cjs/charts/utils.js +40 -0
  19. package/lib/cjs/charts/utils.js.map +1 -0
  20. package/lib/cjs/common/ConditionalWrap.js +30 -0
  21. package/lib/cjs/common/ConditionalWrap.js.map +1 -0
  22. package/lib/cjs/index.js +38 -0
  23. package/lib/cjs/index.js.map +1 -0
  24. package/lib/esm/charts/Chart.js +159 -0
  25. package/lib/esm/charts/Chart.js.map +1 -0
  26. package/lib/esm/charts/ChartTooltip.js +46 -0
  27. package/lib/esm/charts/ChartTooltip.js.map +1 -0
  28. package/lib/esm/charts/Legend.js +232 -0
  29. package/lib/esm/charts/Legend.js.map +1 -0
  30. package/lib/esm/charts/index.js +22 -0
  31. package/lib/esm/charts/index.js.map +1 -0
  32. package/lib/esm/charts/themes/darkTheme.js +27 -0
  33. package/lib/esm/charts/themes/darkTheme.js.map +1 -0
  34. package/lib/esm/charts/themes/defaultTheme.js +54 -0
  35. package/lib/esm/charts/themes/defaultTheme.js.map +1 -0
  36. package/lib/esm/charts/themes/lightTheme.js +27 -0
  37. package/lib/esm/charts/themes/lightTheme.js.map +1 -0
  38. package/lib/esm/charts/utils.js +37 -0
  39. package/lib/esm/charts/utils.js.map +1 -0
  40. package/lib/esm/common/ConditionalWrap.js +26 -0
  41. package/lib/esm/common/ConditionalWrap.js.map +1 -0
  42. package/lib/esm/index.js +22 -0
  43. package/lib/esm/index.js.map +1 -0
  44. package/lib/types/charts/Chart.d.ts +38 -0
  45. package/lib/types/charts/ChartTooltip.d.ts +59 -0
  46. package/lib/types/charts/Legend.d.ts +30 -0
  47. package/lib/types/charts/index.d.ts +21 -0
  48. package/lib/types/charts/themes/darkTheme.d.ts +55 -0
  49. package/lib/types/charts/themes/defaultTheme.d.ts +51 -0
  50. package/lib/types/charts/themes/lightTheme.d.ts +55 -0
  51. package/lib/types/charts/utils.d.ts +23 -0
  52. package/lib/types/common/ConditionalWrap.d.ts +27 -0
  53. package/lib/types/index.d.ts +21 -0
  54. package/package.json +76 -0
@@ -0,0 +1,238 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Legend = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ /**
9
+ *
10
+ * Copyright (c) "Neo4j"
11
+ * Neo4j Sweden AB [http://neo4j.com]
12
+ *
13
+ * This file is part of Neo4j.
14
+ *
15
+ * Neo4j is free software: you can redistribute it and/or modify
16
+ * it under the terms of the GNU General Public License as published by
17
+ * the Free Software Foundation, either version 3 of the License, or
18
+ * (at your option) any later version.
19
+ *
20
+ * This program is distributed in the hope that it will be useful,
21
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
+ * GNU General Public License for more details.
24
+ *
25
+ * You should have received a copy of the GNU General Public License
26
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
27
+ */
28
+ const classnames_1 = __importDefault(require("classnames"));
29
+ const react_1 = require("react");
30
+ const react_2 = require("@neo4j-ndl/react");
31
+ const icons_1 = require("@neo4j-ndl/react/icons");
32
+ const usehooks_ts_1 = require("usehooks-ts");
33
+ const ConditionalWrap_1 = require("../common/ConditionalWrap");
34
+ const echarts_1 = require("echarts");
35
+ const base_1 = require("@neo4j-ndl/base");
36
+ const LegendItem = (0, react_1.forwardRef)(function LegendItemComponent({ children, as, className, name, selected, deSelected, onSquareClick, onTextClick, color, hasButtons = true, },
37
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
38
+ ref) {
39
+ const Component = as === 'button' ? 'button' : 'div';
40
+ const InnerComponent = hasButtons ? 'button' : 'div';
41
+ const classes = (0, classnames_1.default)('ndl-chart-legend-item', {
42
+ 'ndl-chart-legend-item-selected': selected,
43
+ 'ndl-chart-legend-item-deselected': deSelected,
44
+ }, className);
45
+ return ((0, jsx_runtime_1.jsxs)(Component, { className: classes, ref: ref, tabIndex: -1, "data-labelname": name, children: [(0, jsx_runtime_1.jsx)(InnerComponent, { className: "ndl-chart-legend-item-square", style: {
46
+ backgroundColor: color,
47
+ }, onClick: hasButtons ? onSquareClick : undefined, children: selected && ((0, jsx_runtime_1.jsx)(icons_1.CheckIconOutline, { className: "ndl-chart-legend-item-square-checkmark" })) }), (0, jsx_runtime_1.jsx)(react_2.Typography, { as: InnerComponent, variant: "body-medium", className: "ndl-chart-legend-item-text", htmlAttributes: {
48
+ onClick: hasButtons ? onTextClick : undefined,
49
+ }, children: children })] }));
50
+ });
51
+ exports.Legend = (0, react_1.forwardRef)(function LegendComponent({ className, wrappingType = 'wrapping', series, chartRef }, ref) {
52
+ const [selectedSeries, setSelectedSeries] = (0, react_1.useState)(Object.fromEntries(series.map((s) => { var _a; return [(_a = s.name) !== null && _a !== void 0 ? _a : '', true]; })));
53
+ (0, react_1.useEffect)(() => {
54
+ setSelectedSeries(Object.fromEntries(series.map((s) => { var _a; return [(_a = s.name) !== null && _a !== void 0 ? _a : '', true]; })));
55
+ if (chartRef.current === null) {
56
+ return;
57
+ }
58
+ const chart = (0, echarts_1.getInstanceByDom)(chartRef.current);
59
+ chart === null || chart === void 0 ? void 0 : chart.on('legendselectchanged', (params) => {
60
+ if (typeof params === 'object' &&
61
+ params !== null &&
62
+ 'selected' in params &&
63
+ params.selected !== null) {
64
+ // @ts-expect-error echarts types are not extensive enough
65
+ setSelectedSeries(params.selected);
66
+ }
67
+ });
68
+ chart === null || chart === void 0 ? void 0 : chart.on('legendselectall', (params) => {
69
+ if (typeof params === 'object' &&
70
+ params !== null &&
71
+ 'selected' in params &&
72
+ params.selected !== null) {
73
+ // @ts-expect-error echarts types are not extensive enough
74
+ setSelectedSeries(params.selected);
75
+ }
76
+ });
77
+ chart === null || chart === void 0 ? void 0 : chart.on('legendselected', (params) => {
78
+ if (typeof params === 'object' &&
79
+ params !== null &&
80
+ 'selected' in params &&
81
+ params.selected !== null) {
82
+ // @ts-expect-error echarts types are not extensive enough
83
+ setSelectedSeries(params.selected);
84
+ }
85
+ });
86
+ chart === null || chart === void 0 ? void 0 : chart.on('legendunselected', (params) => {
87
+ if (typeof params === 'object' &&
88
+ params !== null &&
89
+ 'selected' in params &&
90
+ params.selected !== null) {
91
+ // @ts-expect-error echarts types are not extensive enough
92
+ setSelectedSeries(params.selected);
93
+ }
94
+ });
95
+ return () => {
96
+ chart === null || chart === void 0 ? void 0 : chart.off('legendselectchanged');
97
+ chart === null || chart === void 0 ? void 0 : chart.off('legendselectall');
98
+ chart === null || chart === void 0 ? void 0 : chart.off('legendselected');
99
+ chart === null || chart === void 0 ? void 0 : chart.off('legendunselected');
100
+ };
101
+ }, [chartRef, series]);
102
+ const classes = (0, classnames_1.default)(`ndl-chart-legend`, {
103
+ 'ndl-chart-legend-overflow': wrappingType === 'overflow',
104
+ 'ndl-chart-legend-wrapping': wrappingType === 'wrapping',
105
+ 'ndl-chart-legend-truncation': wrappingType === 'truncation',
106
+ }, className);
107
+ const setOnlyVisible = (name) => {
108
+ if (chartRef.current === null) {
109
+ return;
110
+ }
111
+ const chart = (0, echarts_1.getInstanceByDom)(chartRef.current);
112
+ chart === null || chart === void 0 ? void 0 : chart.dispatchAction({
113
+ type: 'legendSelect',
114
+ name: name,
115
+ });
116
+ const otherNames = Object.keys(selectedSeries).filter((n) => n !== name);
117
+ otherNames.forEach((name) => {
118
+ chart === null || chart === void 0 ? void 0 : chart.dispatchAction({
119
+ type: 'legendUnSelect',
120
+ name: name,
121
+ });
122
+ });
123
+ };
124
+ const toggleVisibility = (name) => {
125
+ if (chartRef.current === null) {
126
+ return;
127
+ }
128
+ const chart = (0, echarts_1.getInstanceByDom)(chartRef.current);
129
+ chart === null || chart === void 0 ? void 0 : chart.dispatchAction({
130
+ type: 'legendToggleSelect',
131
+ name: name,
132
+ });
133
+ };
134
+ const setAllVisible = () => {
135
+ if (chartRef.current === null) {
136
+ return;
137
+ }
138
+ const chart = (0, echarts_1.getInstanceByDom)(chartRef.current);
139
+ chart === null || chart === void 0 ? void 0 : chart.dispatchAction({
140
+ type: 'legendAllSelect',
141
+ });
142
+ };
143
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: wrappingType === 'truncation' || wrappingType === 'wrapping' ? ((0, jsx_runtime_1.jsx)("div", { className: classes, ref: ref, children: series.map((currentSeries, index) => {
144
+ var _a, _b;
145
+ const isOnlyVisible = selectedSeries[(_a = currentSeries.name) !== null && _a !== void 0 ? _a : ''] &&
146
+ Object.values(selectedSeries).filter(Boolean).length === 1;
147
+ const color = currentSeries.color;
148
+ return ((0, jsx_runtime_1.jsx)(ConditionalWrap_1.ConditionalWrap, { shouldWrap: wrappingType === 'truncation', wrapper: (children) => ((0, jsx_runtime_1.jsx)(react_2.Tooltip, { type: "simple", children: (0, jsx_runtime_1.jsx)(react_2.Tooltip.Trigger, { hasButtonWrapper: true, children: children }) }, index)), children: (0, jsx_runtime_1.jsx)(LegendItem, { as: wrappingType === 'truncation' ? 'button' : 'div', name: currentSeries.name, color: color, hasButtons: currentSeries.name !== undefined, onSquareClick: () => {
149
+ if (isOnlyVisible) {
150
+ setAllVisible();
151
+ }
152
+ else {
153
+ setOnlyVisible(currentSeries.name);
154
+ }
155
+ }, onTextClick: () => toggleVisibility(currentSeries.name), selected: isOnlyVisible, deSelected: currentSeries.name === undefined
156
+ ? false
157
+ : !selectedSeries[currentSeries.name], children: (_b = currentSeries.name) !== null && _b !== void 0 ? _b : `Series ${index}` }) }, index));
158
+ }) })) : ((0, jsx_runtime_1.jsx)(LegendOverflowType, { className: classes, visibleSeries: selectedSeries, wrappingType: wrappingType, chartRef: chartRef, series: series, onSquareClick: (name) => {
159
+ const isOnlyVisible = selectedSeries[name !== null && name !== void 0 ? name : ''] &&
160
+ Object.values(selectedSeries).filter(Boolean).length === 1;
161
+ if (isOnlyVisible) {
162
+ setAllVisible();
163
+ }
164
+ else {
165
+ setOnlyVisible(name);
166
+ }
167
+ }, onTextClick: (name) => {
168
+ toggleVisibility(name);
169
+ } })) }));
170
+ });
171
+ const LegendOverflowType = function LegendOverflow({ className, series, onSquareClick, onTextClick, visibleSeries, }) {
172
+ const containerRef = (0, react_1.useRef)(null);
173
+ const [nonOverflowItemsNames, setNonOverflowItemsNames] = (0, react_1.useState)(series.map((s) => s.name));
174
+ (0, react_1.useEffect)(() => {
175
+ setNonOverflowItemsNames(series.map((s) => s.name));
176
+ }, [series]);
177
+ const overflowItemsNames = series.filter((item) => !nonOverflowItemsNames.includes(item.name));
178
+ const [width, setWidth] = (0, react_1.useState)(Infinity);
179
+ (0, usehooks_ts_1.useResizeObserver)({
180
+ ref: containerRef,
181
+ onResize: (entry) => {
182
+ if (entry.width === undefined) {
183
+ return;
184
+ }
185
+ if (width < entry.width) {
186
+ setNonOverflowItemsNames(series.map((s) => s.name));
187
+ }
188
+ setWidth(entry.width);
189
+ },
190
+ });
191
+ (0, react_1.useEffect)(() => {
192
+ const container = containerRef.current;
193
+ if (!container) {
194
+ return;
195
+ }
196
+ let elements = Array.from(container.children);
197
+ if (elements.length === 0 || series.length === 0) {
198
+ return;
199
+ }
200
+ let totalWidth = 0;
201
+ if (overflowItemsNames.length > 0) {
202
+ const lastElementItem = elements[elements.length - 1];
203
+ const lastItemWidth = lastElementItem.getBoundingClientRect().width;
204
+ elements = elements.slice(0, elements.length - 1);
205
+ totalWidth += lastItemWidth;
206
+ }
207
+ elements.forEach((element) => {
208
+ totalWidth += element.getBoundingClientRect().width;
209
+ const textContent = element.textContent;
210
+ if (!textContent) {
211
+ return;
212
+ }
213
+ const itemName = element.getAttribute('data-labelname');
214
+ if (itemName === null) {
215
+ return;
216
+ }
217
+ if (totalWidth > width) {
218
+ setNonOverflowItemsNames((oldNames) => oldNames.filter((name) => name !== itemName));
219
+ }
220
+ });
221
+ }, [overflowItemsNames.length, series.length, width]);
222
+ const classes = (0, classnames_1.default)({
223
+ 'ndl-chart-legend-calculating': width === Infinity,
224
+ }, className);
225
+ return ((0, jsx_runtime_1.jsxs)("div", { className: classes, ref: containerRef, children: [nonOverflowItemsNames.map((name) => {
226
+ const currentSeries = series.find((s) => s.name === name);
227
+ if (currentSeries === undefined) {
228
+ return null;
229
+ }
230
+ const isVisible = visibleSeries[name];
231
+ const isOnlyVisible = isVisible &&
232
+ Object.values(visibleSeries).filter(Boolean).length === 1;
233
+ return ((0, jsx_runtime_1.jsx)(LegendItem, { name: name, color: currentSeries.color, onSquareClick: () => {
234
+ onSquareClick === null || onSquareClick === void 0 ? void 0 : onSquareClick(name);
235
+ }, onTextClick: () => onTextClick === null || onTextClick === void 0 ? void 0 : onTextClick(name), selected: isOnlyVisible, deSelected: !isVisible, children: name }, name));
236
+ }), overflowItemsNames.length > 0 && ((0, jsx_runtime_1.jsxs)(react_2.Tooltip, { type: "simple", children: [(0, jsx_runtime_1.jsx)(react_2.Tooltip.Trigger, { children: (0, jsx_runtime_1.jsxs)(LegendItem, { as: "div", name: "ndl-overflow-items", color: base_1.tokens.colors.neutral[30], hasButtons: false, children: [overflowItemsNames.length, " more"] }) }), (0, jsx_runtime_1.jsx)(react_2.Tooltip.Content, { children: overflowItemsNames.map((item) => ((0, jsx_runtime_1.jsx)("p", { children: item.name }, item.name))) })] }))] }));
237
+ };
238
+ //# sourceMappingURL=Legend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Legend.js","sourceRoot":"","sources":["../../../src/charts/Legend.tsx"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4DAAoC;AACpC,iCAAuE;AACvE,4CAAuD;AACvD,kDAA0D;AAC1D,6CAAgD;AAChD,+DAA4D;AAC5D,qCAA2C;AAC3C,0CAAyC;AAczC,MAAM,UAAU,GAAG,IAAA,kBAAU,EAAC,SAAS,mBAAmB,CACxD,EACE,QAAQ,EACR,EAAE,EACF,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,aAAa,EACb,WAAW,EACX,KAAK,EACL,UAAU,GAAG,IAAI,GACD;AAClB,8DAA8D;AAC9D,GAA4B;IAE5B,MAAM,SAAS,GAAG,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;IACrD,MAAM,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;IACrD,MAAM,OAAO,GAAG,IAAA,oBAAU,EACxB,uBAAuB,EACvB;QACE,gCAAgC,EAAE,QAAQ;QAC1C,kCAAkC,EAAE,UAAU;KAC/C,EACD,SAAS,CACV,CAAC;IAEF,OAAO,CACL,wBAAC,SAAS,IACR,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,CAAC,CAAC,oBACI,IAAI,aAEpB,uBAAC,cAAc,IACb,SAAS,EAAC,8BAA8B,EACxC,KAAK,EAAE;oBACL,eAAe,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BAC5D,OAAO,CACL,uBAAC,UAAU,IAET,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,aAAa,CAAC,KAAK,EAC1B,aAAa,EAAE,GAAG,EAAE;wBAClB,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAG,IAAI,CAAC,CAAC;oBACxB,CAAC,EACD,WAAW,EAAE,GAAG,EAAE,CAAC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,IAAI,CAAC,EACtC,QAAQ,EAAE,aAAa,EACvB,UAAU,EAAE,CAAC,SAAS,YAErB,IAAI,IAVA,IAAI,CAWE,CACd,CAAC;YACJ,CAAC,CAAC,EAED,kBAAkB,CAAC,MAAM,GAAG,CAAC,IAAI,CAChC,wBAAC,eAAO,IAAC,IAAI,EAAC,QAAQ,aACpB,uBAAC,eAAO,CAAC,OAAO,cACd,wBAAC,UAAU,IACT,EAAE,EAAC,KAAK,EACR,IAAI,EAAC,oBAAoB,EACzB,KAAK,EAAE,aAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,EAChC,UAAU,EAAE,KAAK,aAEhB,kBAAkB,CAAC,MAAM,aACf,GACG,EAClB,uBAAC,eAAO,CAAC,OAAO,cACb,kBAAkB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAChC,wCAAoB,IAAI,CAAC,IAAI,IAArB,IAAI,CAAC,IAAI,CAAiB,CACnC,CAAC,GACc,IACV,CACX,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ var desc = Object.getOwnPropertyDescriptor(m, k);
25
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
26
+ desc = { enumerable: true, get: function() { return m[k]; } };
27
+ }
28
+ Object.defineProperty(o, k2, desc);
29
+ }) : (function(o, m, k, k2) {
30
+ if (k2 === undefined) k2 = k;
31
+ o[k2] = m[k];
32
+ }));
33
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
34
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ __exportStar(require("./Chart"), exports);
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/charts/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;AAEH,0CAAwB"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.darkTheme = void 0;
4
+ /**
5
+ *
6
+ * Copyright (c) "Neo4j"
7
+ * Neo4j Sweden AB [http://neo4j.com]
8
+ *
9
+ * This file is part of Neo4j.
10
+ *
11
+ * Neo4j is free software: you can redistribute it and/or modify
12
+ * it under the terms of the GNU General Public License as published by
13
+ * the Free Software Foundation, either version 3 of the License, or
14
+ * (at your option) any later version.
15
+ *
16
+ * This program is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ * GNU General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU General Public License
22
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
23
+ */
24
+ const defaultTheme_1 = require("./defaultTheme");
25
+ exports.darkTheme = {
26
+ version: 1,
27
+ themeName: 'ndl-dark',
28
+ theme: Object.assign({}, defaultTheme_1.defaultTheme),
29
+ };
30
+ //# sourceMappingURL=darkTheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"darkTheme.js","sourceRoot":"","sources":["../../../../src/charts/themes/darkTheme.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iDAA8C;AAEjC,QAAA,SAAS,GAAG;IACvB,OAAO,EAAE,CAAC;IACV,SAAS,EAAE,UAAU;IACrB,KAAK,oBACA,2BAAY,CAChB;CACF,CAAC"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultTheme = void 0;
4
+ /**
5
+ *
6
+ * Copyright (c) "Neo4j"
7
+ * Neo4j Sweden AB [http://neo4j.com]
8
+ *
9
+ * This file is part of Neo4j.
10
+ *
11
+ * Neo4j is free software: you can redistribute it and/or modify
12
+ * it under the terms of the GNU General Public License as published by
13
+ * the Free Software Foundation, either version 3 of the License, or
14
+ * (at your option) any later version.
15
+ *
16
+ * This program is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ * GNU General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU General Public License
22
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
23
+ */
24
+ const base_1 = require("@neo4j-ndl/base");
25
+ exports.defaultTheme = {
26
+ color: Object.values(base_1.tokens.palette.categorical),
27
+ axes: [
28
+ {
29
+ type: 'all',
30
+ axisLineShow: true,
31
+ axisLineColor: '#bbbec3',
32
+ axisTickShow: true,
33
+ axisTickColor: '#bbbec3',
34
+ axisLabelShow: true,
35
+ axisLabelColor: '#5e636a',
36
+ splitLineShow: true,
37
+ splitLineColor: ['#E0E6F1'],
38
+ splitAreaShow: false,
39
+ splitAreaColor: ['rgba(250,250,250,0.2)', 'rgba(210,219,238,0.2)'],
40
+ },
41
+ ],
42
+ lineWidth: '11',
43
+ backgroundColor: 'transparent',
44
+ kColor: '#eb5454',
45
+ kColor0: '#47b262',
46
+ kBorderColor: '#eb5454',
47
+ kBorderColor0: '#47b262',
48
+ kBorderWidth: 1,
49
+ symbolSize: '12',
50
+ symbol: 'emptyCircle',
51
+ symbolBorderWidth: '3',
52
+ lineSmooth: false,
53
+ graphLineWidth: 1,
54
+ graphLineColor: '#aaa',
55
+ axisSeperateSetting: false,
56
+ };
57
+ //# sourceMappingURL=defaultTheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultTheme.js","sourceRoot":"","sources":["../../../../src/charts/themes/defaultTheme.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,0CAAyC;AAE5B,QAAA,YAAY,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,aAAM,CAAC,OAAO,CAAC,WAAW,CAAC;IAChD,IAAI,EAAE;QACJ;YACE,IAAI,EAAE,KAAK;YACX,YAAY,EAAE,IAAI;YAClB,aAAa,EAAE,SAAS;YACxB,YAAY,EAAE,IAAI;YAClB,aAAa,EAAE,SAAS;YACxB,aAAa,EAAE,IAAI;YACnB,cAAc,EAAE,SAAS;YACzB,aAAa,EAAE,IAAI;YACnB,cAAc,EAAE,CAAC,SAAS,CAAC;YAC3B,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;SACnE;KACF;IACD,SAAS,EAAE,IAAI;IACf,eAAe,EAAE,aAAa;IAC9B,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,SAAS;IACvB,aAAa,EAAE,SAAS;IACxB,YAAY,EAAE,CAAC;IACf,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,aAAa;IACrB,iBAAiB,EAAE,GAAG;IACtB,UAAU,EAAE,KAAK;IACjB,cAAc,EAAE,CAAC;IACjB,cAAc,EAAE,MAAM;IACtB,mBAAmB,EAAE,KAAK;CAC3B,CAAC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.lightTheme = void 0;
4
+ /**
5
+ *
6
+ * Copyright (c) "Neo4j"
7
+ * Neo4j Sweden AB [http://neo4j.com]
8
+ *
9
+ * This file is part of Neo4j.
10
+ *
11
+ * Neo4j is free software: you can redistribute it and/or modify
12
+ * it under the terms of the GNU General Public License as published by
13
+ * the Free Software Foundation, either version 3 of the License, or
14
+ * (at your option) any later version.
15
+ *
16
+ * This program is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ * GNU General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU General Public License
22
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
23
+ */
24
+ const defaultTheme_1 = require("./defaultTheme");
25
+ exports.lightTheme = {
26
+ version: 1,
27
+ themeName: 'ndl-light',
28
+ theme: Object.assign({}, defaultTheme_1.defaultTheme),
29
+ };
30
+ //# sourceMappingURL=lightTheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lightTheme.js","sourceRoot":"","sources":["../../../../src/charts/themes/lightTheme.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iDAA8C;AAEjC,QAAA,UAAU,GAAG;IACxB,OAAO,EAAE,CAAC;IACV,SAAS,EAAE,WAAW;IACtB,KAAK,oBACA,2BAAY,CAChB;CACF,CAAC"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useThrottle = void 0;
4
+ /**
5
+ *
6
+ * Copyright (c) "Neo4j"
7
+ * Neo4j Sweden AB [http://neo4j.com]
8
+ *
9
+ * This file is part of Neo4j.
10
+ *
11
+ * Neo4j is free software: you can redistribute it and/or modify
12
+ * it under the terms of the GNU General Public License as published by
13
+ * the Free Software Foundation, either version 3 of the License, or
14
+ * (at your option) any later version.
15
+ *
16
+ * This program is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ * GNU General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU General Public License
22
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
23
+ */
24
+ const react_1 = require("react");
25
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
+ const useThrottle = (callback, limit) => {
27
+ const lastCallRef = (0, react_1.useRef)(0);
28
+ const throttledCallback = (0, react_1.useCallback)(
29
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
30
+ (...args) => {
31
+ const now = Date.now();
32
+ if (now - lastCallRef.current >= limit) {
33
+ lastCallRef.current = now;
34
+ callback(...args);
35
+ }
36
+ }, [callback, limit]);
37
+ return throttledCallback;
38
+ };
39
+ exports.useThrottle = useThrottle;
40
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/charts/utils.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iCAA4C;AAE5C,8DAA8D;AAC9D,MAAM,WAAW,GAAG,CAAC,QAAqC,EAAE,KAAa,EAAE,EAAE;IAC3E,MAAM,WAAW,GAAG,IAAA,cAAM,EAAC,CAAC,CAAC,CAAC;IAC9B,MAAM,iBAAiB,GAAG,IAAA,mBAAW;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;AAEO,kCAAW"}
@@ -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
+
22
+ "use strict";
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.ConditionalWrap = void 0;
25
+ const jsx_runtime_1 = require("react/jsx-runtime");
26
+ const ConditionalWrap = ({ shouldWrap: condition, wrapper, children, }) => {
27
+ return condition ? (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: wrapper(children) }) : (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
28
+ };
29
+ exports.ConditionalWrap = ConditionalWrap;
30
+ //# sourceMappingURL=ConditionalWrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConditionalWrap.js","sourceRoot":"","sources":["../../../src/common/ConditionalWrap.tsx"],"names":[],"mappings":";;;;AA2BO,MAAM,eAAe,GAAG,CAAC,EAC9B,UAAU,EAAE,SAAS,EACrB,OAAO,EACP,QAAQ,GACa,EAAE,EAAE;IACzB,OAAO,SAAS,CAAC,CAAC,CAAC,2DAAG,OAAO,CAAC,QAAQ,CAAC,GAAI,CAAC,CAAC,CAAC,2DAAG,QAAQ,GAAI,CAAC;AAChE,CAAC,CAAC;AANW,QAAA,eAAe,mBAM1B"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /**
18
+ *
19
+ * Copyright (c) "Neo4j"
20
+ * Neo4j Sweden AB [http://neo4j.com]
21
+ *
22
+ * This file is part of Neo4j.
23
+ *
24
+ * Neo4j is free software: you can redistribute it and/or modify
25
+ * it under the terms of the GNU General Public License as published by
26
+ * the Free Software Foundation, either version 3 of the License, or
27
+ * (at your option) any later version.
28
+ *
29
+ * This program is distributed in the hope that it will be useful,
30
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
31
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32
+ * GNU General Public License for more details.
33
+ *
34
+ * You should have received a copy of the GNU General Public License
35
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
36
+ */
37
+ __exportStar(require("./charts"), exports);
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,2CAAyB"}