@neo4j-ndl/react 3.8.6 → 3.8.8

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 (136) hide show
  1. package/lib/cjs/graph-visualization/graph-viz-buttons.js +142 -0
  2. package/lib/cjs/graph-visualization/graph-viz-buttons.js.map +1 -0
  3. package/lib/cjs/graph-visualization/graph-viz-context.js +62 -0
  4. package/lib/cjs/graph-visualization/graph-viz-context.js.map +1 -0
  5. package/lib/cjs/graph-visualization/graph-viz-sidepanel.js +56 -0
  6. package/lib/cjs/graph-visualization/graph-viz-sidepanel.js.map +1 -0
  7. package/lib/cjs/graph-visualization/graph-viz.js +289 -0
  8. package/lib/cjs/graph-visualization/graph-viz.js.map +1 -0
  9. package/lib/cjs/graph-visualization/index.js +44 -0
  10. package/lib/cjs/graph-visualization/index.js.map +1 -0
  11. package/lib/cjs/graph-visualization/map-to-nvl-graph.js +167 -0
  12. package/lib/cjs/graph-visualization/map-to-nvl-graph.js.map +1 -0
  13. package/lib/cjs/graph-visualization/sidepanel-components/button-group.js +96 -0
  14. package/lib/cjs/graph-visualization/sidepanel-components/button-group.js.map +1 -0
  15. package/lib/cjs/graph-visualization/sidepanel-components/clickable-urls-test.js +214 -0
  16. package/lib/cjs/graph-visualization/sidepanel-components/clickable-urls-test.js.map +1 -0
  17. package/lib/cjs/graph-visualization/sidepanel-components/clickable-urls.js +46 -0
  18. package/lib/cjs/graph-visualization/sidepanel-components/clickable-urls.js.map +1 -0
  19. package/lib/cjs/graph-visualization/sidepanel-components/details-panel.js +87 -0
  20. package/lib/cjs/graph-visualization/sidepanel-components/details-panel.js.map +1 -0
  21. package/lib/cjs/graph-visualization/sidepanel-components/overview-panel.js +45 -0
  22. package/lib/cjs/graph-visualization/sidepanel-components/overview-panel.js.map +1 -0
  23. package/lib/cjs/graph-visualization/sidepanel-components/properties-table.js +49 -0
  24. package/lib/cjs/graph-visualization/sidepanel-components/properties-table.js.map +1 -0
  25. package/lib/cjs/graph-visualization/sidepanel-components/show-all.js +44 -0
  26. package/lib/cjs/graph-visualization/sidepanel-components/show-all.js.map +1 -0
  27. package/lib/cjs/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.js +35 -0
  28. package/lib/cjs/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.js.map +1 -0
  29. package/lib/cjs/graph-visualization/stories/graph-viz-barebones.story.js +93 -0
  30. package/lib/cjs/graph-visualization/stories/graph-viz-barebones.story.js.map +1 -0
  31. package/lib/cjs/graph-visualization/stories/graph-viz-custom.story.js +74 -0
  32. package/lib/cjs/graph-visualization/stories/graph-viz-custom.story.js.map +1 -0
  33. package/lib/cjs/graph-visualization/stories/graph-viz-default.story.js +93 -0
  34. package/lib/cjs/graph-visualization/stories/graph-viz-default.story.js.map +1 -0
  35. package/lib/cjs/graph-visualization/stories/graph-viz-maximalist.story.js +106 -0
  36. package/lib/cjs/graph-visualization/stories/graph-viz-maximalist.story.js.map +1 -0
  37. package/lib/cjs/graph-visualization/stories/graph-viz.stories.js +85 -0
  38. package/lib/cjs/graph-visualization/stories/graph-viz.stories.js.map +1 -0
  39. package/lib/cjs/graph-visualization/stories/index.js +44 -0
  40. package/lib/cjs/graph-visualization/stories/index.js.map +1 -0
  41. package/lib/cjs/graph-visualization/stories/story-data.js +89 -0
  42. package/lib/cjs/graph-visualization/stories/story-data.js.map +1 -0
  43. package/lib/cjs/graph-visualization/use-managed-selection-state.js +258 -0
  44. package/lib/cjs/graph-visualization/use-managed-selection-state.js.map +1 -0
  45. package/lib/cjs/graph-visualization/use-semi-controlled-state.js +38 -0
  46. package/lib/cjs/graph-visualization/use-semi-controlled-state.js.map +1 -0
  47. package/lib/cjs/graph-visualization/utils.js +30 -0
  48. package/lib/cjs/graph-visualization/utils.js.map +1 -0
  49. package/lib/cjs/index.js +1 -0
  50. package/lib/cjs/index.js.map +1 -1
  51. package/lib/cjs/spotlight/Spotlight.js +6 -1
  52. package/lib/cjs/spotlight/Spotlight.js.map +1 -1
  53. package/lib/cjs/spotlight/SpotlightTour.js +11 -2
  54. package/lib/cjs/spotlight/SpotlightTour.js.map +1 -1
  55. package/lib/esm/graph-visualization/graph-viz-buttons.js +127 -0
  56. package/lib/esm/graph-visualization/graph-viz-buttons.js.map +1 -0
  57. package/lib/esm/graph-visualization/graph-viz-context.js +58 -0
  58. package/lib/esm/graph-visualization/graph-viz-context.js.map +1 -0
  59. package/lib/esm/graph-visualization/graph-viz-sidepanel.js +52 -0
  60. package/lib/esm/graph-visualization/graph-viz-sidepanel.js.map +1 -0
  61. package/lib/esm/graph-visualization/graph-viz.js +259 -0
  62. package/lib/esm/graph-visualization/graph-viz.js.map +1 -0
  63. package/lib/esm/graph-visualization/index.js +25 -0
  64. package/lib/esm/graph-visualization/index.js.map +1 -0
  65. package/lib/esm/graph-visualization/map-to-nvl-graph.js +162 -0
  66. package/lib/esm/graph-visualization/map-to-nvl-graph.js.map +1 -0
  67. package/lib/esm/graph-visualization/sidepanel-components/button-group.js +69 -0
  68. package/lib/esm/graph-visualization/sidepanel-components/button-group.js.map +1 -0
  69. package/lib/esm/graph-visualization/sidepanel-components/clickable-urls-test.js +212 -0
  70. package/lib/esm/graph-visualization/sidepanel-components/clickable-urls-test.js.map +1 -0
  71. package/lib/esm/graph-visualization/sidepanel-components/clickable-urls.js +40 -0
  72. package/lib/esm/graph-visualization/sidepanel-components/clickable-urls.js.map +1 -0
  73. package/lib/esm/graph-visualization/sidepanel-components/details-panel.js +83 -0
  74. package/lib/esm/graph-visualization/sidepanel-components/details-panel.js.map +1 -0
  75. package/lib/esm/graph-visualization/sidepanel-components/overview-panel.js +41 -0
  76. package/lib/esm/graph-visualization/sidepanel-components/overview-panel.js.map +1 -0
  77. package/lib/esm/graph-visualization/sidepanel-components/properties-table.js +45 -0
  78. package/lib/esm/graph-visualization/sidepanel-components/properties-table.js.map +1 -0
  79. package/lib/esm/graph-visualization/sidepanel-components/show-all.js +41 -0
  80. package/lib/esm/graph-visualization/sidepanel-components/show-all.js.map +1 -0
  81. package/lib/esm/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.js +31 -0
  82. package/lib/esm/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.js.map +1 -0
  83. package/lib/esm/graph-visualization/stories/graph-viz-barebones.story.js +90 -0
  84. package/lib/esm/graph-visualization/stories/graph-viz-barebones.story.js.map +1 -0
  85. package/lib/esm/graph-visualization/stories/graph-viz-custom.story.js +71 -0
  86. package/lib/esm/graph-visualization/stories/graph-viz-custom.story.js.map +1 -0
  87. package/lib/esm/graph-visualization/stories/graph-viz-default.story.js +90 -0
  88. package/lib/esm/graph-visualization/stories/graph-viz-default.story.js.map +1 -0
  89. package/lib/esm/graph-visualization/stories/graph-viz-maximalist.story.js +103 -0
  90. package/lib/esm/graph-visualization/stories/graph-viz-maximalist.story.js.map +1 -0
  91. package/lib/esm/graph-visualization/stories/graph-viz.stories.js +82 -0
  92. package/lib/esm/graph-visualization/stories/graph-viz.stories.js.map +1 -0
  93. package/lib/esm/graph-visualization/stories/index.js +34 -0
  94. package/lib/esm/graph-visualization/stories/index.js.map +1 -0
  95. package/lib/esm/graph-visualization/stories/story-data.js +86 -0
  96. package/lib/esm/graph-visualization/stories/story-data.js.map +1 -0
  97. package/lib/esm/graph-visualization/use-managed-selection-state.js +255 -0
  98. package/lib/esm/graph-visualization/use-managed-selection-state.js.map +1 -0
  99. package/lib/esm/graph-visualization/use-semi-controlled-state.js +35 -0
  100. package/lib/esm/graph-visualization/use-semi-controlled-state.js.map +1 -0
  101. package/lib/esm/graph-visualization/utils.js +25 -0
  102. package/lib/esm/graph-visualization/utils.js.map +1 -0
  103. package/lib/esm/index.js +1 -0
  104. package/lib/esm/index.js.map +1 -1
  105. package/lib/esm/spotlight/Spotlight.js +6 -1
  106. package/lib/esm/spotlight/Spotlight.js.map +1 -1
  107. package/lib/esm/spotlight/SpotlightTour.js +11 -2
  108. package/lib/esm/spotlight/SpotlightTour.js.map +1 -1
  109. package/lib/types/graph-visualization/graph-viz-buttons.d.ts +49 -0
  110. package/lib/types/graph-visualization/graph-viz-context.d.ts +122 -0
  111. package/lib/types/graph-visualization/graph-viz-sidepanel.d.ts +32 -0
  112. package/lib/types/graph-visualization/graph-viz.d.ts +149 -0
  113. package/lib/types/graph-visualization/index.d.ts +24 -0
  114. package/lib/types/graph-visualization/map-to-nvl-graph.d.ts +37 -0
  115. package/lib/types/graph-visualization/sidepanel-components/button-group.d.ts +24 -0
  116. package/lib/types/graph-visualization/sidepanel-components/clickable-urls-test.d.ts +21 -0
  117. package/lib/types/graph-visualization/sidepanel-components/clickable-urls.d.ts +26 -0
  118. package/lib/types/graph-visualization/sidepanel-components/details-panel.d.ts +25 -0
  119. package/lib/types/graph-visualization/sidepanel-components/overview-panel.d.ts +21 -0
  120. package/lib/types/graph-visualization/sidepanel-components/properties-table.d.ts +31 -0
  121. package/lib/types/graph-visualization/sidepanel-components/show-all.d.ts +29 -0
  122. package/lib/types/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.d.ts +21 -0
  123. package/lib/types/graph-visualization/stories/graph-viz-barebones.story.d.ts +23 -0
  124. package/lib/types/graph-visualization/stories/graph-viz-custom.story.d.ts +23 -0
  125. package/lib/types/graph-visualization/stories/graph-viz-default.story.d.ts +23 -0
  126. package/lib/types/graph-visualization/stories/graph-viz-maximalist.story.d.ts +23 -0
  127. package/lib/types/graph-visualization/stories/graph-viz.stories.d.ts +36 -0
  128. package/lib/types/graph-visualization/stories/index.d.ts +28 -0
  129. package/lib/types/graph-visualization/stories/story-data.d.ts +26 -0
  130. package/lib/types/graph-visualization/use-managed-selection-state.d.ts +114 -0
  131. package/lib/types/graph-visualization/use-semi-controlled-state.d.ts +21 -0
  132. package/lib/types/graph-visualization/utils.d.ts +23 -0
  133. package/lib/types/index.d.ts +1 -0
  134. package/lib/types/spotlight/Spotlight.d.ts +6 -0
  135. package/lib/types/spotlight/SpotlightTour.d.ts +1 -1
  136. package/package.json +7 -2
@@ -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
+ export declare const containerClasses = "n-w-full n-border-palette-neutral-border-weak n-mx-2 n-rounded-lg n-border";
22
+ declare const Component: () => import("react/jsx-runtime").JSX.Element;
23
+ export default Component;
@@ -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
+ export declare const containerClasses = "n-w-full n-border-palette-neutral-border-weak n-mx-2 n-rounded-lg n-border";
22
+ declare const Component: () => import("react/jsx-runtime").JSX.Element;
23
+ export default Component;
@@ -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
+ export declare const containerClasses = "n-w-full n-border-palette-neutral-border-weak n-mx-2 n-rounded-lg n-border";
22
+ declare const Component: () => import("react/jsx-runtime").JSX.Element;
23
+ export default Component;
@@ -0,0 +1,36 @@
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 StoryObj } from '@storybook/react';
22
+ declare const componentMeta: {
23
+ parameters: {
24
+ controls: {
25
+ disable: boolean;
26
+ };
27
+ };
28
+ tags: string[];
29
+ title: string;
30
+ };
31
+ export default componentMeta;
32
+ type Story = StoryObj<typeof componentMeta>;
33
+ export declare const Default: Story;
34
+ export declare const Barebones: Story;
35
+ export declare const Maximalist: Story;
36
+ export declare const CustomIslands: Story;
@@ -0,0 +1,28 @@
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 { default as GraphVizBarebones } from './graph-viz-barebones.story';
22
+ export { default as GraphVizCustom } from './graph-viz-custom.story';
23
+ export { default as GraphVizDefault } from './graph-viz-default.story';
24
+ export { default as GraphVizMaximalist } from './graph-viz-maximalist.story';
25
+ export declare const GraphVizDefaultSrc: string;
26
+ export declare const GraphVizBarebonesSrc: string;
27
+ export declare const GraphVizMaximalistSrc: string;
28
+ export declare const GraphVizCustomSrc: string;
@@ -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
+ import { type NeoNode, type NeoRel } from '../graph-viz-context';
22
+ export declare const StoryGraph: {
23
+ nodes: NeoNode[];
24
+ rels: NeoRel[];
25
+ };
26
+ export declare const containerClasses = "n-w-full n-border-palette-neutral-border-weak n-mx-2 n-rounded-lg n-border";
@@ -0,0 +1,114 @@
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 HitTargets, type Node, type Relationship } from '@neo4j-nvl/base';
22
+ import { type MouseEventCallbacks } from '@neo4j-nvl/react';
23
+ import { type Gesture, type GraphSelection, type InteractionMode } from './graph-viz-context';
24
+ export type ManagedSelectionArgs = {
25
+ selected: GraphSelection;
26
+ setSelected: (newSelection: GraphSelection) => void;
27
+ gesture: Gesture;
28
+ interactionMode: InteractionMode;
29
+ setInteractionMode: (newInteractionMode: InteractionMode) => void;
30
+ mouseEventCallbacks: MouseEventCallbacks;
31
+ nvlGraph: {
32
+ nodes: Node[];
33
+ rels: Relationship[];
34
+ };
35
+ };
36
+ export declare function useManagedSelectionState({ selected, setSelected, gesture, interactionMode, setInteractionMode, mouseEventCallbacks, nvlGraph, }: ManagedSelectionArgs): {
37
+ nodesWithSelection: {
38
+ selected: boolean;
39
+ size?: number;
40
+ pinned?: boolean;
41
+ x?: number;
42
+ y?: number;
43
+ activated?: boolean;
44
+ icon?: string;
45
+ html?: HTMLElement;
46
+ id: string;
47
+ color?: string;
48
+ caption?: string;
49
+ disabled?: boolean;
50
+ hovered?: boolean;
51
+ captionSize?: number;
52
+ captionAlign?: "top" | "bottom" | "center";
53
+ captions?: import("@neo4j-nvl/base").StyledCaption[];
54
+ overlayIcon?: {
55
+ url: string;
56
+ position?: number[];
57
+ size?: number;
58
+ };
59
+ }[];
60
+ relsWithSelection: {
61
+ selected: boolean;
62
+ from: string;
63
+ to: string;
64
+ type?: string;
65
+ width?: number;
66
+ captionHtml?: HTMLElement;
67
+ id: string;
68
+ color?: string;
69
+ caption?: string;
70
+ disabled?: boolean;
71
+ hovered?: boolean;
72
+ captionSize?: number;
73
+ captionAlign?: "top" | "bottom" | "center";
74
+ captions?: import("@neo4j-nvl/base").StyledCaption[];
75
+ overlayIcon?: {
76
+ url: string;
77
+ position?: number[];
78
+ size?: number;
79
+ };
80
+ }[];
81
+ wrappedMouseEventCallbacks: {
82
+ onBoxSelect: boolean | (({ nodes, rels }: {
83
+ nodes: Node[];
84
+ rels: Relationship[];
85
+ }, evt: MouseEvent) => void);
86
+ onBoxStarted: boolean | ((event: MouseEvent) => void) | undefined;
87
+ onCanvasClick: boolean | ((evt: MouseEvent) => void);
88
+ onDragEnd: boolean | ((draggedNodes: Node[], evt: MouseEvent) => void);
89
+ onDragStart: boolean | ((draggedNodes: Node[], evt: MouseEvent) => void);
90
+ onDrawEnded: boolean | ((newRelationshipToAdd: Relationship | null, newTargetNodeToAdd: Node | null, event: MouseEvent) => void);
91
+ onDrawStarted: boolean | ((evt: MouseEvent) => void);
92
+ onHover: boolean | ((element: Node | Relationship, hitElements: HitTargets, event: MouseEvent) => void) | undefined;
93
+ onHoverNodeMargin: boolean | ((hoveredNode: Node | null, evt: MouseEvent) => void) | undefined;
94
+ onLassoSelect: boolean | (({ nodes, rels }: {
95
+ nodes: Node[];
96
+ rels: Relationship[];
97
+ }, evt: MouseEvent) => void);
98
+ onLassoStarted: boolean | ((event: MouseEvent) => void) | undefined;
99
+ onNodeClick: boolean | ((node: Node, hitElements: HitTargets, evt: MouseEvent) => void);
100
+ onNodeDoubleClick: boolean | ((node: Node, hitElements: HitTargets, evt: MouseEvent) => void);
101
+ onPan: boolean | ((panning: {
102
+ x: number;
103
+ y: number;
104
+ }, event: MouseEvent) => void);
105
+ onRelationshipClick: boolean | ((relationship: Relationship, hitElements: HitTargets, evt: MouseEvent) => void);
106
+ onRelationshipDoubleClick: boolean | ((relationship: Relationship, hitElements: HitTargets, evt: MouseEvent) => void);
107
+ onZoom: boolean | ((zoomLevel: number, event: WheelEvent) => void);
108
+ onCanvasDoubleClick?: ((event: MouseEvent) => void) | boolean;
109
+ onCanvasRightClick?: ((event: MouseEvent) => void) | boolean;
110
+ onNodeRightClick?: ((node: Node, hitElements: HitTargets, event: MouseEvent) => void) | boolean;
111
+ onRelationshipRightClick?: ((relationship: Relationship, hitElements: HitTargets, event: MouseEvent) => void) | boolean;
112
+ onDrag?: ((nodes: Node[], evt: MouseEvent) => void) | boolean;
113
+ };
114
+ };
@@ -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 declare function useSemicontrolledState<T>(externalState: T, externalSetState?: (newState: T) => void): [T, (setState: T) => void];
@@ -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
+ export declare const isMac: boolean;
22
+ export declare const xor: (a: string[], b: string[]) => string[];
23
+ export declare const mapValues: <T, R>(obj: Record<string, T>, fn: (value: T) => R) => Record<string, R>;
@@ -71,3 +71,4 @@ export * from './loading-bar';
71
71
  export * from './conditional-wrap';
72
72
  export * from './ai-presence';
73
73
  export * from './color-picker';
74
+ export * from './graph-visualization';
@@ -65,6 +65,8 @@ export type SpotlightProps = {
65
65
  beforeActions?: React.ReactNode;
66
66
  /** Callback function called when Esc is pressed or on mouse click outside of the Spotlight*/
67
67
  onClose?: (action: SpotlightCloseAction) => void;
68
+ /** Callback function called when the spotlight is opened */
69
+ onOpen?: () => void;
68
70
  /** Use anchorEl for portal's container. Should be used if the spotlight is inside an Dialog or Modal */
69
71
  hasAnchorPortal?: boolean;
70
72
  children?: React.ReactNode;
@@ -81,6 +83,8 @@ declare const Spotlight: Omit<React.ForwardRefExoticComponent<{
81
83
  beforeActions?: React.ReactNode;
82
84
  /** Callback function called when Esc is pressed or on mouse click outside of the Spotlight*/
83
85
  onClose?: (action: SpotlightCloseAction) => void;
86
+ /** Callback function called when the spotlight is opened */
87
+ onOpen?: () => void;
84
88
  /** Use anchorEl for portal's container. Should be used if the spotlight is inside an Dialog or Modal */
85
89
  hasAnchorPortal?: boolean;
86
90
  children?: React.ReactNode;
@@ -98,6 +102,8 @@ declare const Spotlight: Omit<React.ForwardRefExoticComponent<{
98
102
  beforeActions?: React.ReactNode;
99
103
  /** Callback function called when Esc is pressed or on mouse click outside of the Spotlight*/
100
104
  onClose?: (action: SpotlightCloseAction) => void;
105
+ /** Callback function called when the spotlight is opened */
106
+ onOpen?: () => void;
101
107
  /** Use anchorEl for portal's container. Should be used if the spotlight is inside an Dialog or Modal */
102
108
  hasAnchorPortal?: boolean;
103
109
  children?: React.ReactNode;
@@ -20,7 +20,7 @@
20
20
  */
21
21
  import type React from 'react';
22
22
  import { Spotlight, type SpotlightCloseAction } from './Spotlight';
23
- type SpotlightTourAction = SpotlightCloseAction | 'dismiss' | 'back' | 'next' | 'close';
23
+ type SpotlightTourAction = SpotlightCloseAction | 'dismiss' | 'back' | 'next' | 'close' | 'open';
24
24
  type SpotlightTourProps = {
25
25
  /** Array of spotlights */
26
26
  spotlights: React.ComponentProps<typeof Spotlight>[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-ndl/react",
3
- "version": "3.8.6",
3
+ "version": "3.8.8",
4
4
  "sideEffects": false,
5
5
  "description": "React implementation of Neo4j Design System",
6
6
  "keywords": [
@@ -50,6 +50,8 @@
50
50
  "@playwright/test": "1.45.0",
51
51
  "@storybook/react": "8.5.7",
52
52
  "@svgr/cli": "6.5.1",
53
+ "@testing-library/jest-dom": "6.6.3",
54
+ "@testing-library/react": "14.3.1",
53
55
  "@types/react": "18.2.18",
54
56
  "@types/react-datepicker": "6.2.0",
55
57
  "@types/react-dom": "18.2.7",
@@ -70,7 +72,7 @@
70
72
  "@tanstack/react-table": "8.20.5",
71
73
  "react": ">=16.8.0",
72
74
  "react-dom": ">=16.8.0",
73
- "@neo4j-ndl/base": "^3.7.3"
75
+ "@neo4j-ndl/base": "^3.7.4"
74
76
  },
75
77
  "dependencies": {
76
78
  "@dnd-kit/core": "6.1.0",
@@ -78,6 +80,9 @@
78
80
  "@floating-ui/react": "0.26.24",
79
81
  "@floating-ui/react-dom": "2.1.2",
80
82
  "@heroicons/react": "2.1.5",
83
+ "@neo4j-devtools/word-color": "^0.0.8",
84
+ "@neo4j-nvl/base": "0.3.8",
85
+ "@neo4j-nvl/react": "0.3.8",
81
86
  "@uiw/react-color": "2.5.4",
82
87
  "classnames": "2.5.1",
83
88
  "date-fns": "4.1.0",