@neo4j-ndl/react-charts 1.0.164 → 1.1.0

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,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChartEmpty = ChartEmpty;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ /**
6
+ *
7
+ * Copyright (c) "Neo4j"
8
+ * Neo4j Sweden AB [http://neo4j.com]
9
+ *
10
+ * This file is part of Neo4j.
11
+ *
12
+ * Neo4j is free software: you can redistribute it and/or modify
13
+ * it under the terms of the GNU General Public License as published by
14
+ * the Free Software Foundation, either version 3 of the License, or
15
+ * (at your option) any later version.
16
+ *
17
+ * This program is distributed in the hope that it will be useful,
18
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ * GNU General Public License for more details.
21
+ *
22
+ * You should have received a copy of the GNU General Public License
23
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+ */
25
+ const react_1 = require("@neo4j-ndl/react");
26
+ const icons_1 = require("@neo4j-ndl/react/icons");
27
+ const chartEmptyIcons = {
28
+ bar: icons_1.PresentationChartBarIconOutline,
29
+ line: icons_1.PresentationChartLineIconOutline,
30
+ pie: icons_1.ChartPieIconOutline,
31
+ };
32
+ function ChartEmpty({ action, message = 'No data available', type = 'line', }) {
33
+ const Icon = chartEmptyIcons[type];
34
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "ndl-chart-empty-state", children: [(0, jsx_runtime_1.jsx)(Icon, { className: "ndl-chart-empty-state-icon" }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "body-medium", children: message }), action] }));
35
+ }
36
+ //# sourceMappingURL=ChartEmpty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartEmpty.js","sourceRoot":"","sources":["../../../src/charts/ChartEmpty.tsx"],"names":[],"mappings":";;AAsCA,gCAcC;;AApDD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4CAA8C;AAC9C,kDAIgC;AAIhC,MAAM,eAAe,GAAG;IACtB,GAAG,EAAE,uCAA+B;IACpC,IAAI,EAAE,wCAAgC;IACtC,GAAG,EAAE,2BAAmB;CAIzB,CAAC;AAEF,SAAgB,UAAU,CAAC,EACzB,MAAM,EACN,OAAO,GAAG,mBAAmB,EAC7B,IAAI,GAAG,MAAM,GACG;IAChB,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAEnC,OAAO,CACL,iCAAK,SAAS,EAAC,uBAAuB,aACpC,uBAAC,IAAI,IAAC,SAAS,EAAC,4BAA4B,GAAG,EAC/C,uBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,YAAE,OAAO,GAAc,EACvD,MAAM,IACH,CACP,CAAC;AACJ,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Typography } from '@neo4j-ndl/react';\nimport {\n ChartPieIconOutline,\n PresentationChartBarIconOutline,\n PresentationChartLineIconOutline,\n} from '@neo4j-ndl/react/icons';\n\nimport { type ChartEmptyProps } from './chart-types';\n\nconst chartEmptyIcons = {\n bar: PresentationChartBarIconOutline,\n line: PresentationChartLineIconOutline,\n pie: ChartPieIconOutline,\n} satisfies Record<\n NonNullable<ChartEmptyProps['type']>,\n React.ComponentType<{ className?: string }>\n>;\n\nexport function ChartEmpty({\n action,\n message = 'No data available',\n type = 'line',\n}: ChartEmptyProps): React.JSX.Element {\n const Icon = chartEmptyIcons[type];\n\n return (\n <div className=\"ndl-chart-empty-state\">\n <Icon className=\"ndl-chart-empty-state-icon\" />\n <Typography variant=\"body-medium\">{message}</Typography>\n {action}\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"chart-types.js","sourceRoot":"","sources":["../../../src/charts/chart-types.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport {\n type EChartsOption,\n type LineSeriesOption,\n type RegisteredSeriesOption,\n type SetOptionOpts,\n} from 'echarts';\n\nexport type HexColor = `#${string}`;\n\nexport type Condition =\n | 'greater'\n | 'greaterOrEqual'\n | 'less'\n | 'lessOrEqual'\n | 'equal'\n | 'notEqual';\n\nexport type Values<T> = T[keyof T];\nexport type SeriesOption = Values<RegisteredSeriesOption>;\n\nexport type EchartsSeries = SeriesOption | SeriesOption[];\n\ntype CustomCondition = (\n lineValue: unknown,\n thresholdLineValue: unknown,\n) => boolean;\n\nexport interface ThresholdLineSeriesOption<\n T extends NotificationType,\n> extends Omit<LineSeriesOption, 'type'> {\n type: 'thresholdLine';\n yAxis: number;\n xAxis: [number, number];\n notificationType: T;\n color?: string;\n condition?: Condition;\n customConditionText?: string;\n customCondition?: CustomCondition;\n}\n\n// Only one threshold line of each type is allowed.\nexport type NeedleSeries =\n | [\n ThresholdLineSeriesOption<'warning'>,\n ThresholdLineSeriesOption<'danger'>,\n ...SeriesOption[],\n ]\n | [ThresholdLineSeriesOption<'danger'>, ...SeriesOption[]]\n | [ThresholdLineSeriesOption<'warning'>, ...SeriesOption[]]\n | SeriesOption[];\n\nexport interface ChartProps {\n /** The dataset configuration for the chart. Can be a single dataset or an array of datasets. */\n dataset: EChartsOption['dataset'];\n /** The series configuration for the chart. Defines what data to display and how to display it. */\n series: NeedleSeries;\n /** X-axis configuration for the chart. */\n xAxis?: EChartsOption['xAxis'];\n /** Y-axis configuration for the chart. */\n yAxis?: EChartsOption['yAxis'];\n /** Legend configuration for the chart. */\n legend?: {\n show?: boolean;\n wrappingType?: LegendProps['wrappingType'];\n };\n /** Additional ECharts options to merge with the chart configuration. */\n option?: Omit<\n EChartsOption,\n 'series' | 'dataset' | 'legend' | 'xAxis' | 'yAxis'\n >;\n /** Custom CSS styles to apply to the chart container. */\n style?: React.CSSProperties;\n /** Settings for how ECharts should update the chart. */\n settings?: SetOptionOpts;\n /** Whether the chart is in a loading state. */\n isLoading?: boolean;\n /** Callback functions for chart interactions. */\n callbacks?: {\n onZoom?: (params: { startValue: number; endValue: number }) => void;\n };\n /** Data zoom configuration for the chart. */\n dataZoom?: EChartsOption['dataZoom'];\n /** Whether the zoom in the chart is disabled */\n isChartZoomDisabled?: boolean;\n /** Custom color palette that overrides the default categorical colors. */\n palette?: HexColor[];\n}\n\n/**\n * Chart tooltip\n */\n\nexport interface ChartTooltipProps {\n children: React.ReactNode;\n className?: string;\n isOpen?: boolean;\n style?: React.CSSProperties;\n anchorPosition?: {\n x: number;\n y: number;\n };\n ref?: React.Ref<HTMLDivElement>;\n}\n\nexport type NotificationType = 'warning' | 'danger';\n\nexport type Notification = {\n leadingElement: React.ReactNode;\n trailingElement: React.ReactNode;\n notificationType: NotificationType;\n id: string;\n};\n\nexport type ChartTooltipContentProps = {\n leadingElement?: React.ReactNode;\n trailingElement?: React.ReactNode;\n indentSquareColor?: string;\n notifications?: Notification[];\n ref?: React.Ref<HTMLDivElement>;\n};\n\n/**\n * Legend\n */\nexport interface LegendItemProps {\n name: string;\n children: React.ReactNode;\n as?: 'button' | 'div';\n className?: string;\n color?: string;\n selected?: boolean;\n deSelected?: boolean;\n onLegendItemClick?: () => void;\n hasButtons?: boolean;\n onLegendItemMouseEnter?: () => void;\n onLegendItemMouseLeave?: () => void;\n ref?: React.Ref<HTMLButtonElement> & React.Ref<HTMLDivElement>;\n}\n\nexport type LegendProps = {\n wrappingType?: 'wrapping' | 'truncation' | 'overflow';\n series: {\n name: string;\n color: string;\n }[];\n chartRef: React.RefObject<HTMLDivElement | null>;\n /** Shared ref for legend selection state. Chart reads this when building\n * setOption so that legend filters survive re-renders. */\n selectedRef?: React.MutableRefObject<Record<string, boolean>>;\n ref?: React.Ref<HTMLDivElement>;\n};\n\nexport interface LegendOverflowProps extends LegendProps {\n className?: string;\n selectedSeries: Record<string, boolean>;\n onSetAllVisible: () => void;\n onToggleLegendVisibility?: (\n name: string,\n isAllSeriesSelected: boolean,\n isOnlyVisible: boolean,\n allSeries: { name: string; color: string }[],\n ) => void;\n onLegendItemMouseEnter: (series: { name: string; color: string }[]) => void;\n onLegendItemMouseLeave: (series: { name: string; color: string }[]) => void;\n}\n"]}
1
+ {"version":3,"file":"chart-types.js","sourceRoot":"","sources":["../../../src/charts/chart-types.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport {\n type EChartsOption,\n type LineSeriesOption,\n type RegisteredSeriesOption,\n type SetOptionOpts,\n} from 'echarts';\n\nexport type HexColor = `#${string}`;\n\nexport type Condition =\n | 'greater'\n | 'greaterOrEqual'\n | 'less'\n | 'lessOrEqual'\n | 'equal'\n | 'notEqual';\n\nexport type Values<T> = T[keyof T];\nexport type SeriesOption = Values<RegisteredSeriesOption>;\n\nexport type EchartsSeries = SeriesOption | SeriesOption[];\n\ntype CustomCondition = (\n lineValue: unknown,\n thresholdLineValue: unknown,\n) => boolean;\n\nexport interface ThresholdLineSeriesOption<\n T extends NotificationType,\n> extends Omit<LineSeriesOption, 'type'> {\n type: 'thresholdLine';\n yAxis: number;\n xAxis: [number, number];\n notificationType: T;\n color?: string;\n condition?: Condition;\n customConditionText?: string;\n customCondition?: CustomCondition;\n}\n\n// Only one threshold line of each type is allowed.\nexport type NeedleSeries =\n | [\n ThresholdLineSeriesOption<'warning'>,\n ThresholdLineSeriesOption<'danger'>,\n ...SeriesOption[],\n ]\n | [ThresholdLineSeriesOption<'danger'>, ...SeriesOption[]]\n | [ThresholdLineSeriesOption<'warning'>, ...SeriesOption[]]\n | SeriesOption[];\n\nexport interface ChartProps {\n /** The dataset configuration for the chart. Can be a single dataset or an array of datasets. */\n dataset: EChartsOption['dataset'];\n /** The series configuration for the chart. Defines what data to display and how to display it. */\n series: NeedleSeries;\n /** X-axis configuration for the chart. */\n xAxis?: EChartsOption['xAxis'];\n /** Y-axis configuration for the chart. */\n yAxis?: EChartsOption['yAxis'];\n /** Legend configuration for the chart. */\n legend?: {\n show?: boolean;\n wrappingType?: LegendProps['wrappingType'];\n };\n /** Additional ECharts options to merge with the chart configuration. */\n option?: Omit<\n EChartsOption,\n 'series' | 'dataset' | 'legend' | 'xAxis' | 'yAxis'\n >;\n /** Custom CSS styles to apply to the chart container. */\n style?: React.CSSProperties;\n /** Settings for how ECharts should update the chart. */\n settings?: SetOptionOpts;\n /** Whether the chart is in a loading state. */\n isLoading?: boolean;\n /** Callback functions for chart interactions. */\n callbacks?: {\n onZoom?: (params: { startValue: number; endValue: number }) => void;\n };\n /** Data zoom configuration for the chart. */\n dataZoom?: EChartsOption['dataZoom'];\n /** Whether the zoom in the chart is disabled */\n isChartZoomDisabled?: boolean;\n /** Custom color palette that overrides the default categorical colors. */\n palette?: HexColor[];\n}\n\nexport interface ChartEmptyProps {\n /** A text displayed to the user when the chart is empty. */\n message?: React.ReactNode;\n /** The type of chart. This is used to render the appropriate icon. */\n type?: 'line' | 'pie' | 'bar';\n /** Optional element (preferably a TextButton) that should provide the user with an action. */\n action?: React.ReactNode;\n}\n\n/**\n * Chart tooltip\n */\n\nexport interface ChartTooltipProps {\n children: React.ReactNode;\n className?: string;\n isOpen?: boolean;\n style?: React.CSSProperties;\n anchorPosition?: {\n x: number;\n y: number;\n };\n ref?: React.Ref<HTMLDivElement>;\n}\n\nexport type NotificationType = 'warning' | 'danger';\n\nexport type Notification = {\n leadingElement: React.ReactNode;\n trailingElement: React.ReactNode;\n notificationType: NotificationType;\n id: string;\n};\n\nexport type ChartTooltipContentProps = {\n leadingElement?: React.ReactNode;\n trailingElement?: React.ReactNode;\n indentSquareColor?: string;\n notifications?: Notification[];\n ref?: React.Ref<HTMLDivElement>;\n};\n\n/**\n * Legend\n */\nexport interface LegendItemProps {\n name: string;\n children: React.ReactNode;\n as?: 'button' | 'div';\n className?: string;\n color?: string;\n selected?: boolean;\n deSelected?: boolean;\n onLegendItemClick?: () => void;\n hasButtons?: boolean;\n onLegendItemMouseEnter?: () => void;\n onLegendItemMouseLeave?: () => void;\n ref?: React.Ref<HTMLButtonElement> & React.Ref<HTMLDivElement>;\n}\n\nexport type LegendProps = {\n wrappingType?: 'wrapping' | 'truncation' | 'overflow';\n series: {\n name: string;\n color: string;\n }[];\n chartRef: React.RefObject<HTMLDivElement | null>;\n /** Shared ref for legend selection state. Chart reads this when building\n * setOption so that legend filters survive re-renders. */\n selectedRef?: React.MutableRefObject<Record<string, boolean>>;\n ref?: React.Ref<HTMLDivElement>;\n};\n\nexport interface LegendOverflowProps extends LegendProps {\n className?: string;\n selectedSeries: Record<string, boolean>;\n onSetAllVisible: () => void;\n onToggleLegendVisibility?: (\n name: string,\n isAllSeriesSelected: boolean,\n isOnlyVisible: boolean,\n allSeries: { name: string; color: string }[],\n ) => void;\n onLegendItemMouseEnter: (series: { name: string; color: string }[]) => void;\n onLegendItemMouseLeave: (series: { name: string; color: string }[]) => void;\n}\n"]}
@@ -36,6 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.defaultThresholdLineSeriesOption = void 0;
38
38
  __exportStar(require("./Chart"), exports);
39
+ __exportStar(require("./ChartEmpty"), exports);
39
40
  // Export utils and types that were previously exported from Chart.tsx. Not sure that they are needed, but keeping them to not be breaking.
40
41
  var defaults_1 = require("./defaults");
41
42
  Object.defineProperty(exports, "defaultThresholdLineSeriesOption", { enumerable: true, get: function () { return defaults_1.defaultThresholdLineSeriesOption; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/charts/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;AAEH,0CAAwB;AACxB,2IAA2I;AAC3I,uCAA8D;AAArD,4HAAA,gCAAgC,OAAA","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from './Chart';\n// Export utils and types that were previously exported from Chart.tsx. Not sure that they are needed, but keeping them to not be breaking.\nexport { defaultThresholdLineSeriesOption } from './defaults';\nexport {\n type ThresholdLineSeriesOption,\n type Values,\n type SeriesOption,\n type EchartsSeries,\n type NeedleSeries,\n} from './chart-types';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/charts/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;AAEH,0CAAwB;AACxB,+CAA6B;AAC7B,2IAA2I;AAC3I,uCAA8D;AAArD,4HAAA,gCAAgC,OAAA","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from './Chart';\nexport * from './ChartEmpty';\n// Export utils and types that were previously exported from Chart.tsx. Not sure that they are needed, but keeping them to not be breaking.\nexport { defaultThresholdLineSeriesOption } from './defaults';\nexport {\n type ChartEmptyProps,\n type ThresholdLineSeriesOption,\n type Values,\n type SeriesOption,\n type EchartsSeries,\n type NeedleSeries,\n} from './chart-types';\n"]}
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
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
+ import { Typography } from '@neo4j-ndl/react';
23
+ import { ChartPieIconOutline, PresentationChartBarIconOutline, PresentationChartLineIconOutline, } from '@neo4j-ndl/react/icons';
24
+ const chartEmptyIcons = {
25
+ bar: PresentationChartBarIconOutline,
26
+ line: PresentationChartLineIconOutline,
27
+ pie: ChartPieIconOutline,
28
+ };
29
+ export function ChartEmpty({ action, message = 'No data available', type = 'line', }) {
30
+ const Icon = chartEmptyIcons[type];
31
+ return (_jsxs("div", { className: "ndl-chart-empty-state", children: [_jsx(Icon, { className: "ndl-chart-empty-state-icon" }), _jsx(Typography, { variant: "body-medium", children: message }), action] }));
32
+ }
33
+ //# sourceMappingURL=ChartEmpty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartEmpty.js","sourceRoot":"","sources":["../../../src/charts/ChartEmpty.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,mBAAmB,EACnB,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,wBAAwB,CAAC;AAIhC,MAAM,eAAe,GAAG;IACtB,GAAG,EAAE,+BAA+B;IACpC,IAAI,EAAE,gCAAgC;IACtC,GAAG,EAAE,mBAAmB;CAIzB,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,EACzB,MAAM,EACN,OAAO,GAAG,mBAAmB,EAC7B,IAAI,GAAG,MAAM,GACG;IAChB,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAEnC,OAAO,CACL,eAAK,SAAS,EAAC,uBAAuB,aACpC,KAAC,IAAI,IAAC,SAAS,EAAC,4BAA4B,GAAG,EAC/C,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,YAAE,OAAO,GAAc,EACvD,MAAM,IACH,CACP,CAAC;AACJ,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Typography } from '@neo4j-ndl/react';\nimport {\n ChartPieIconOutline,\n PresentationChartBarIconOutline,\n PresentationChartLineIconOutline,\n} from '@neo4j-ndl/react/icons';\n\nimport { type ChartEmptyProps } from './chart-types';\n\nconst chartEmptyIcons = {\n bar: PresentationChartBarIconOutline,\n line: PresentationChartLineIconOutline,\n pie: ChartPieIconOutline,\n} satisfies Record<\n NonNullable<ChartEmptyProps['type']>,\n React.ComponentType<{ className?: string }>\n>;\n\nexport function ChartEmpty({\n action,\n message = 'No data available',\n type = 'line',\n}: ChartEmptyProps): React.JSX.Element {\n const Icon = chartEmptyIcons[type];\n\n return (\n <div className=\"ndl-chart-empty-state\">\n <Icon className=\"ndl-chart-empty-state-icon\" />\n <Typography variant=\"body-medium\">{message}</Typography>\n {action}\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"chart-types.js","sourceRoot":"","sources":["../../../src/charts/chart-types.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport {\n type EChartsOption,\n type LineSeriesOption,\n type RegisteredSeriesOption,\n type SetOptionOpts,\n} from 'echarts';\n\nexport type HexColor = `#${string}`;\n\nexport type Condition =\n | 'greater'\n | 'greaterOrEqual'\n | 'less'\n | 'lessOrEqual'\n | 'equal'\n | 'notEqual';\n\nexport type Values<T> = T[keyof T];\nexport type SeriesOption = Values<RegisteredSeriesOption>;\n\nexport type EchartsSeries = SeriesOption | SeriesOption[];\n\ntype CustomCondition = (\n lineValue: unknown,\n thresholdLineValue: unknown,\n) => boolean;\n\nexport interface ThresholdLineSeriesOption<\n T extends NotificationType,\n> extends Omit<LineSeriesOption, 'type'> {\n type: 'thresholdLine';\n yAxis: number;\n xAxis: [number, number];\n notificationType: T;\n color?: string;\n condition?: Condition;\n customConditionText?: string;\n customCondition?: CustomCondition;\n}\n\n// Only one threshold line of each type is allowed.\nexport type NeedleSeries =\n | [\n ThresholdLineSeriesOption<'warning'>,\n ThresholdLineSeriesOption<'danger'>,\n ...SeriesOption[],\n ]\n | [ThresholdLineSeriesOption<'danger'>, ...SeriesOption[]]\n | [ThresholdLineSeriesOption<'warning'>, ...SeriesOption[]]\n | SeriesOption[];\n\nexport interface ChartProps {\n /** The dataset configuration for the chart. Can be a single dataset or an array of datasets. */\n dataset: EChartsOption['dataset'];\n /** The series configuration for the chart. Defines what data to display and how to display it. */\n series: NeedleSeries;\n /** X-axis configuration for the chart. */\n xAxis?: EChartsOption['xAxis'];\n /** Y-axis configuration for the chart. */\n yAxis?: EChartsOption['yAxis'];\n /** Legend configuration for the chart. */\n legend?: {\n show?: boolean;\n wrappingType?: LegendProps['wrappingType'];\n };\n /** Additional ECharts options to merge with the chart configuration. */\n option?: Omit<\n EChartsOption,\n 'series' | 'dataset' | 'legend' | 'xAxis' | 'yAxis'\n >;\n /** Custom CSS styles to apply to the chart container. */\n style?: React.CSSProperties;\n /** Settings for how ECharts should update the chart. */\n settings?: SetOptionOpts;\n /** Whether the chart is in a loading state. */\n isLoading?: boolean;\n /** Callback functions for chart interactions. */\n callbacks?: {\n onZoom?: (params: { startValue: number; endValue: number }) => void;\n };\n /** Data zoom configuration for the chart. */\n dataZoom?: EChartsOption['dataZoom'];\n /** Whether the zoom in the chart is disabled */\n isChartZoomDisabled?: boolean;\n /** Custom color palette that overrides the default categorical colors. */\n palette?: HexColor[];\n}\n\n/**\n * Chart tooltip\n */\n\nexport interface ChartTooltipProps {\n children: React.ReactNode;\n className?: string;\n isOpen?: boolean;\n style?: React.CSSProperties;\n anchorPosition?: {\n x: number;\n y: number;\n };\n ref?: React.Ref<HTMLDivElement>;\n}\n\nexport type NotificationType = 'warning' | 'danger';\n\nexport type Notification = {\n leadingElement: React.ReactNode;\n trailingElement: React.ReactNode;\n notificationType: NotificationType;\n id: string;\n};\n\nexport type ChartTooltipContentProps = {\n leadingElement?: React.ReactNode;\n trailingElement?: React.ReactNode;\n indentSquareColor?: string;\n notifications?: Notification[];\n ref?: React.Ref<HTMLDivElement>;\n};\n\n/**\n * Legend\n */\nexport interface LegendItemProps {\n name: string;\n children: React.ReactNode;\n as?: 'button' | 'div';\n className?: string;\n color?: string;\n selected?: boolean;\n deSelected?: boolean;\n onLegendItemClick?: () => void;\n hasButtons?: boolean;\n onLegendItemMouseEnter?: () => void;\n onLegendItemMouseLeave?: () => void;\n ref?: React.Ref<HTMLButtonElement> & React.Ref<HTMLDivElement>;\n}\n\nexport type LegendProps = {\n wrappingType?: 'wrapping' | 'truncation' | 'overflow';\n series: {\n name: string;\n color: string;\n }[];\n chartRef: React.RefObject<HTMLDivElement | null>;\n /** Shared ref for legend selection state. Chart reads this when building\n * setOption so that legend filters survive re-renders. */\n selectedRef?: React.MutableRefObject<Record<string, boolean>>;\n ref?: React.Ref<HTMLDivElement>;\n};\n\nexport interface LegendOverflowProps extends LegendProps {\n className?: string;\n selectedSeries: Record<string, boolean>;\n onSetAllVisible: () => void;\n onToggleLegendVisibility?: (\n name: string,\n isAllSeriesSelected: boolean,\n isOnlyVisible: boolean,\n allSeries: { name: string; color: string }[],\n ) => void;\n onLegendItemMouseEnter: (series: { name: string; color: string }[]) => void;\n onLegendItemMouseLeave: (series: { name: string; color: string }[]) => void;\n}\n"]}
1
+ {"version":3,"file":"chart-types.js","sourceRoot":"","sources":["../../../src/charts/chart-types.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport {\n type EChartsOption,\n type LineSeriesOption,\n type RegisteredSeriesOption,\n type SetOptionOpts,\n} from 'echarts';\n\nexport type HexColor = `#${string}`;\n\nexport type Condition =\n | 'greater'\n | 'greaterOrEqual'\n | 'less'\n | 'lessOrEqual'\n | 'equal'\n | 'notEqual';\n\nexport type Values<T> = T[keyof T];\nexport type SeriesOption = Values<RegisteredSeriesOption>;\n\nexport type EchartsSeries = SeriesOption | SeriesOption[];\n\ntype CustomCondition = (\n lineValue: unknown,\n thresholdLineValue: unknown,\n) => boolean;\n\nexport interface ThresholdLineSeriesOption<\n T extends NotificationType,\n> extends Omit<LineSeriesOption, 'type'> {\n type: 'thresholdLine';\n yAxis: number;\n xAxis: [number, number];\n notificationType: T;\n color?: string;\n condition?: Condition;\n customConditionText?: string;\n customCondition?: CustomCondition;\n}\n\n// Only one threshold line of each type is allowed.\nexport type NeedleSeries =\n | [\n ThresholdLineSeriesOption<'warning'>,\n ThresholdLineSeriesOption<'danger'>,\n ...SeriesOption[],\n ]\n | [ThresholdLineSeriesOption<'danger'>, ...SeriesOption[]]\n | [ThresholdLineSeriesOption<'warning'>, ...SeriesOption[]]\n | SeriesOption[];\n\nexport interface ChartProps {\n /** The dataset configuration for the chart. Can be a single dataset or an array of datasets. */\n dataset: EChartsOption['dataset'];\n /** The series configuration for the chart. Defines what data to display and how to display it. */\n series: NeedleSeries;\n /** X-axis configuration for the chart. */\n xAxis?: EChartsOption['xAxis'];\n /** Y-axis configuration for the chart. */\n yAxis?: EChartsOption['yAxis'];\n /** Legend configuration for the chart. */\n legend?: {\n show?: boolean;\n wrappingType?: LegendProps['wrappingType'];\n };\n /** Additional ECharts options to merge with the chart configuration. */\n option?: Omit<\n EChartsOption,\n 'series' | 'dataset' | 'legend' | 'xAxis' | 'yAxis'\n >;\n /** Custom CSS styles to apply to the chart container. */\n style?: React.CSSProperties;\n /** Settings for how ECharts should update the chart. */\n settings?: SetOptionOpts;\n /** Whether the chart is in a loading state. */\n isLoading?: boolean;\n /** Callback functions for chart interactions. */\n callbacks?: {\n onZoom?: (params: { startValue: number; endValue: number }) => void;\n };\n /** Data zoom configuration for the chart. */\n dataZoom?: EChartsOption['dataZoom'];\n /** Whether the zoom in the chart is disabled */\n isChartZoomDisabled?: boolean;\n /** Custom color palette that overrides the default categorical colors. */\n palette?: HexColor[];\n}\n\nexport interface ChartEmptyProps {\n /** A text displayed to the user when the chart is empty. */\n message?: React.ReactNode;\n /** The type of chart. This is used to render the appropriate icon. */\n type?: 'line' | 'pie' | 'bar';\n /** Optional element (preferably a TextButton) that should provide the user with an action. */\n action?: React.ReactNode;\n}\n\n/**\n * Chart tooltip\n */\n\nexport interface ChartTooltipProps {\n children: React.ReactNode;\n className?: string;\n isOpen?: boolean;\n style?: React.CSSProperties;\n anchorPosition?: {\n x: number;\n y: number;\n };\n ref?: React.Ref<HTMLDivElement>;\n}\n\nexport type NotificationType = 'warning' | 'danger';\n\nexport type Notification = {\n leadingElement: React.ReactNode;\n trailingElement: React.ReactNode;\n notificationType: NotificationType;\n id: string;\n};\n\nexport type ChartTooltipContentProps = {\n leadingElement?: React.ReactNode;\n trailingElement?: React.ReactNode;\n indentSquareColor?: string;\n notifications?: Notification[];\n ref?: React.Ref<HTMLDivElement>;\n};\n\n/**\n * Legend\n */\nexport interface LegendItemProps {\n name: string;\n children: React.ReactNode;\n as?: 'button' | 'div';\n className?: string;\n color?: string;\n selected?: boolean;\n deSelected?: boolean;\n onLegendItemClick?: () => void;\n hasButtons?: boolean;\n onLegendItemMouseEnter?: () => void;\n onLegendItemMouseLeave?: () => void;\n ref?: React.Ref<HTMLButtonElement> & React.Ref<HTMLDivElement>;\n}\n\nexport type LegendProps = {\n wrappingType?: 'wrapping' | 'truncation' | 'overflow';\n series: {\n name: string;\n color: string;\n }[];\n chartRef: React.RefObject<HTMLDivElement | null>;\n /** Shared ref for legend selection state. Chart reads this when building\n * setOption so that legend filters survive re-renders. */\n selectedRef?: React.MutableRefObject<Record<string, boolean>>;\n ref?: React.Ref<HTMLDivElement>;\n};\n\nexport interface LegendOverflowProps extends LegendProps {\n className?: string;\n selectedSeries: Record<string, boolean>;\n onSetAllVisible: () => void;\n onToggleLegendVisibility?: (\n name: string,\n isAllSeriesSelected: boolean,\n isOnlyVisible: boolean,\n allSeries: { name: string; color: string }[],\n ) => void;\n onLegendItemMouseEnter: (series: { name: string; color: string }[]) => void;\n onLegendItemMouseLeave: (series: { name: string; color: string }[]) => void;\n}\n"]}
@@ -19,6 +19,7 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  export * from './Chart';
22
+ export * from './ChartEmpty';
22
23
  // Export utils and types that were previously exported from Chart.tsx. Not sure that they are needed, but keeping them to not be breaking.
23
24
  export { defaultThresholdLineSeriesOption } from './defaults';
24
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/charts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,SAAS,CAAC;AACxB,2IAA2I;AAC3I,OAAO,EAAE,gCAAgC,EAAE,MAAM,YAAY,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from './Chart';\n// Export utils and types that were previously exported from Chart.tsx. Not sure that they are needed, but keeping them to not be breaking.\nexport { defaultThresholdLineSeriesOption } from './defaults';\nexport {\n type ThresholdLineSeriesOption,\n type Values,\n type SeriesOption,\n type EchartsSeries,\n type NeedleSeries,\n} from './chart-types';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/charts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,2IAA2I;AAC3I,OAAO,EAAE,gCAAgC,EAAE,MAAM,YAAY,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from './Chart';\nexport * from './ChartEmpty';\n// Export utils and types that were previously exported from Chart.tsx. Not sure that they are needed, but keeping them to not be breaking.\nexport { defaultThresholdLineSeriesOption } from './defaults';\nexport {\n type ChartEmptyProps,\n type ThresholdLineSeriesOption,\n type Values,\n type SeriesOption,\n type EchartsSeries,\n type NeedleSeries,\n} from './chart-types';\n"]}
@@ -0,0 +1,24 @@
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 { type ChartEmptyProps } from './chart-types';
23
+ export declare function ChartEmpty({ action, message, type, }: ChartEmptyProps): React.JSX.Element;
24
+ //# sourceMappingURL=ChartEmpty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartEmpty.d.ts","sourceRoot":"","sources":["../../../src/charts/ChartEmpty.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAWrD,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,OAA6B,EAC7B,IAAa,GACd,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAUrC"}
@@ -76,6 +76,14 @@ export interface ChartProps {
76
76
  /** Custom color palette that overrides the default categorical colors. */
77
77
  palette?: HexColor[];
78
78
  }
79
+ export interface ChartEmptyProps {
80
+ /** A text displayed to the user when the chart is empty. */
81
+ message?: React.ReactNode;
82
+ /** The type of chart. This is used to render the appropriate icon. */
83
+ type?: 'line' | 'pie' | 'bar';
84
+ /** Optional element (preferably a TextButton) that should provide the user with an action. */
85
+ action?: React.ReactNode;
86
+ }
79
87
  /**
80
88
  * Chart tooltip
81
89
  */
@@ -1 +1 @@
1
- {"version":3,"file":"chart-types.d.ts","sourceRoot":"","sources":["../../../src/charts/chart-types.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EACnB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,QAAQ,GAAG,IAAI,MAAM,EAAE,CAAC;AAEpC,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,gBAAgB,GAChB,MAAM,GACN,aAAa,GACb,OAAO,GACP,UAAU,CAAC;AAEf,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACnC,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAE1D,MAAM,M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
  export * from './Chart';
22
+ export * from './ChartEmpty';
22
23
  export { defaultThresholdLineSeriesOption } from './defaults';
23
- export { type ThresholdLineSeriesOption, type Values, type SeriesOption, type EchartsSeries, type NeedleSeries, } from './chart-types';
24
+ export { type ChartEmptyProps, type ThresholdLineSeriesOption, type Values, type SeriesOption, type EchartsSeries, type NeedleSeries, } from './chart-types';
24
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/charts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/charts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-ndl/react-charts",
3
- "version": "1.0.164",
3
+ "version": "1.1.0",
4
4
  "sideEffects": false,
5
5
  "description": "React implementation of charts from Neo4j Design System",
6
6
  "keywords": [
@@ -55,8 +55,8 @@
55
55
  "peerDependencies": {
56
56
  "react": ">=19.0.0",
57
57
  "react-dom": ">=19.0.0",
58
- "@neo4j-ndl/base": "^4.14.2",
59
- "@neo4j-ndl/react": "^4.14.6"
58
+ "@neo4j-ndl/base": "^4.15.0",
59
+ "@neo4j-ndl/react": "^4.15.1"
60
60
  },
61
61
  "dependencies": {
62
62
  "classnames": "2.5.1",