@neo4j-ndl/react-graph 0.0.5 → 1.0.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.
- package/lib/cjs/graph-visualization-buttons.js +36 -16
- package/lib/cjs/graph-visualization-buttons.js.map +1 -1
- package/lib/cjs/graph-visualization-sidepanel.js +1 -1
- package/lib/cjs/graph-visualization-sidepanel.js.map +1 -1
- package/lib/cjs/graph-visualization.js +38 -13
- package/lib/cjs/graph-visualization.js.map +1 -1
- package/lib/cjs/map-to-nvl-graph.js +2 -2
- package/lib/cjs/map-to-nvl-graph.js.map +1 -1
- package/lib/cjs/sidepanel-components/button-group.js +17 -7
- package/lib/cjs/sidepanel-components/button-group.js.map +1 -1
- package/lib/cjs/sidepanel-components/overview-panel.js +1 -1
- package/lib/cjs/sidepanel-components/overview-panel.js.map +1 -1
- package/lib/cjs/sidepanel-components/show-all.js +1 -1
- package/lib/cjs/sidepanel-components/show-all.js.map +1 -1
- package/lib/cjs/stories/graph-visualization-barebones.story.js +1 -1
- package/lib/cjs/stories/graph-visualization-barebones.story.js.map +1 -1
- package/lib/cjs/stories/graph-visualization-custom.story.js +1 -1
- package/lib/cjs/stories/graph-visualization-custom.story.js.map +1 -1
- package/lib/cjs/stories/graph-visualization-default.story.js +1 -1
- package/lib/cjs/stories/graph-visualization-default.story.js.map +1 -1
- package/lib/cjs/stories/graph-visualization-maximalist.story.js +1 -1
- package/lib/cjs/stories/graph-visualization-maximalist.story.js.map +1 -1
- package/lib/cjs/stories/story-data.js +1 -1
- package/lib/cjs/stories/story-data.js.map +1 -1
- package/lib/cjs/use-semi-controlled-state.js +13 -16
- package/lib/cjs/use-semi-controlled-state.js.map +1 -1
- package/lib/esm/graph-visualization-buttons.js +38 -18
- package/lib/esm/graph-visualization-buttons.js.map +1 -1
- package/lib/esm/graph-visualization-sidepanel.js +1 -1
- package/lib/esm/graph-visualization-sidepanel.js.map +1 -1
- package/lib/esm/graph-visualization.js +22 -7
- package/lib/esm/graph-visualization.js.map +1 -1
- package/lib/esm/map-to-nvl-graph.js +2 -2
- package/lib/esm/map-to-nvl-graph.js.map +1 -1
- package/lib/esm/sidepanel-components/overview-panel.js +1 -1
- package/lib/esm/sidepanel-components/overview-panel.js.map +1 -1
- package/lib/esm/sidepanel-components/show-all.js +2 -2
- package/lib/esm/sidepanel-components/show-all.js.map +1 -1
- package/lib/esm/stories/graph-visualization-barebones.story.js +1 -1
- package/lib/esm/stories/graph-visualization-barebones.story.js.map +1 -1
- package/lib/esm/stories/graph-visualization-custom.story.js +1 -1
- package/lib/esm/stories/graph-visualization-custom.story.js.map +1 -1
- package/lib/esm/stories/graph-visualization-default.story.js +1 -1
- package/lib/esm/stories/graph-visualization-default.story.js.map +1 -1
- package/lib/esm/stories/graph-visualization-maximalist.story.js +1 -1
- package/lib/esm/stories/graph-visualization-maximalist.story.js.map +1 -1
- package/lib/esm/stories/story-data.js +1 -1
- package/lib/esm/stories/story-data.js.map +1 -1
- package/lib/esm/use-semi-controlled-state.js +13 -16
- package/lib/esm/use-semi-controlled-state.js.map +1 -1
- package/lib/types/graph-visualization-buttons.d.ts +16 -6
- package/lib/types/graph-visualization.d.ts +201 -23
- package/lib/types/stories/graph-visualization-barebones.story.d.ts +1 -1
- package/lib/types/stories/graph-visualization-custom.story.d.ts +1 -1
- package/lib/types/stories/graph-visualization-default.story.d.ts +1 -1
- package/lib/types/stories/graph-visualization-maximalist.story.d.ts +1 -1
- package/lib/types/stories/story-data.d.ts +1 -1
- package/lib/types/use-semi-controlled-state.d.ts +6 -1
- package/package.json +5 -5
|
@@ -19,22 +19,19 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
import { useCallback, useMemo, useState } from 'react';
|
|
22
|
-
export function useSemicontrolledState(
|
|
23
|
-
const [
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
22
|
+
export function useSemicontrolledState({ state, onChange, isControlled, }) {
|
|
23
|
+
const [internal, setInternal] = useState(state);
|
|
24
|
+
// Decide which state is "active"
|
|
25
|
+
const current = useMemo(() => {
|
|
26
|
+
return isControlled === true ? state : internal;
|
|
27
|
+
}, [isControlled, state, internal]);
|
|
28
|
+
const setState = useCallback((next) => {
|
|
29
|
+
const resolved = typeof next === 'function' ? next(current) : next;
|
|
30
|
+
if (isControlled !== true) {
|
|
31
|
+
setInternal(resolved);
|
|
33
32
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, [externalSetState, setBackupState, externalState]);
|
|
38
|
-
return [state, setState];
|
|
33
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(resolved);
|
|
34
|
+
}, [isControlled, current, onChange]);
|
|
35
|
+
return [current, setState];
|
|
39
36
|
}
|
|
40
37
|
//# sourceMappingURL=use-semi-controlled-state.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-semi-controlled-state.js","sourceRoot":"","sources":["../../src/use-semi-controlled-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"use-semi-controlled-state.js","sourceRoot":"","sources":["../../src/use-semi-controlled-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAUvD,MAAM,UAAU,sBAAsB,CAAI,EACxC,KAAK,EACL,QAAQ,EACR,YAAY,GACmB;IAC/B,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAI,KAAK,CAAC,CAAC;IAEnD,iCAAiC;IACjC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE;QAC3B,OAAO,YAAY,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;IAClD,CAAC,EAAE,CAAC,YAAY,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEpC,MAAM,QAAQ,GAAG,WAAW,CAC1B,CAAC,IAAuB,EAAE,EAAE;QAC1B,MAAM,QAAQ,GACZ,OAAO,IAAI,KAAK,UAAU,CAAC,CAAC,CAAE,IAAuB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAExE,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;YAC1B,WAAW,CAAC,QAAQ,CAAC,CAAC;QACxB,CAAC;QACD,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,QAAQ,CAAC,CAAC;IACvB,CAAC,EACD,CAAC,YAAY,EAAE,OAAO,EAAE,QAAQ,CAAC,CAClC,CAAC;IAEF,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -18,16 +18,26 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
import {
|
|
22
|
-
import { type
|
|
21
|
+
import { CleanIconButton, Tooltip } from '@neo4j-ndl/react';
|
|
22
|
+
import { type PropsWithChildren } from 'react';
|
|
23
23
|
type GraphVisualizationButtonProps = {
|
|
24
|
+
tooltipPlacement?: React.ComponentProps<typeof Tooltip>['placement'];
|
|
24
25
|
className?: string;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Additional css styling. Will be applied to the root element.
|
|
28
|
+
*/
|
|
29
|
+
style?: React.CSSProperties;
|
|
30
|
+
/**
|
|
31
|
+
* Html attributes to apply to the root element. This will override any default html attributes, use with caution.
|
|
32
|
+
*/
|
|
33
|
+
htmlAttributes?: React.ComponentPropsWithRef<typeof CleanIconButton>['htmlAttributes'];
|
|
34
|
+
/**
|
|
35
|
+
* A ref to apply to the root element.
|
|
36
|
+
*/
|
|
37
|
+
ref?: React.ComponentPropsWithRef<'button'>['ref'];
|
|
28
38
|
};
|
|
29
39
|
type BaseProperties = GraphVisualizationButtonProps & {
|
|
30
|
-
|
|
40
|
+
description: string;
|
|
31
41
|
testid?: string;
|
|
32
42
|
ariaLabel?: string;
|
|
33
43
|
isActive?: boolean;
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
import { type PolymorphicRef } from '@neo4j-ndl/react';
|
|
22
21
|
import type NVL from '@neo4j-nvl/base';
|
|
23
22
|
import { type InteractiveNvlWrapperProps } from '@neo4j-nvl/react';
|
|
24
23
|
import React from 'react';
|
|
@@ -29,15 +28,14 @@ export declare const DEFAULT_NVL_OPTIONS: {
|
|
|
29
28
|
maxZoom: number;
|
|
30
29
|
minZoom: number;
|
|
31
30
|
relationshipThreshold: number;
|
|
32
|
-
useWebGL: boolean;
|
|
33
31
|
};
|
|
34
|
-
export type GraphVisualizationProps<T extends React.ElementType> = {
|
|
32
|
+
export type GraphVisualizationProps<T extends React.ElementType = 'div'> = {
|
|
35
33
|
nvlRef?: React.RefObject<NVL>;
|
|
36
34
|
sidepanel?: Sidepanel | null;
|
|
37
|
-
topRightIsland?: React.ReactNode;
|
|
38
35
|
bottomLeftIsland?: React.ReactNode;
|
|
39
36
|
bottomRightIsland?: React.ReactNode;
|
|
40
37
|
topLeftIsland?: React.ReactNode;
|
|
38
|
+
topRightIsland?: React.ReactNode;
|
|
41
39
|
className?: string;
|
|
42
40
|
style?: React.CSSProperties;
|
|
43
41
|
gesture?: Gesture;
|
|
@@ -51,7 +49,7 @@ export type GraphVisualizationProps<T extends React.ElementType> = {
|
|
|
51
49
|
highlightedNodeIds?: string[];
|
|
52
50
|
highlightedRelationshipIds?: string[];
|
|
53
51
|
as?: T;
|
|
54
|
-
ref?:
|
|
52
|
+
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
55
53
|
htmlAttributes?: React.HTMLAttributes<T>;
|
|
56
54
|
} & InteractiveNvlWrapperProps;
|
|
57
55
|
/**
|
|
@@ -115,58 +113,238 @@ export type GraphVisualizationProps<T extends React.ElementType> = {
|
|
|
115
113
|
export declare function GraphVisualization<T extends React.ElementType = 'div'>({ nvlRef: rawNvlRef, nvlCallbacks, nvlOptions, sidepanel: rawSidepanel, nodes: rawNodes, rels: rawRels, highlightedNodeIds, highlightedRelationshipIds, topLeftIsland, topRightIsland, bottomLeftIsland, bottomRightIsland, gesture, setGesture, selected: rawSelected, setSelected: rawSetSelected, interactionMode: rawInteractionMode, setInteractionMode: rawSetInteractionMode, mouseEventCallbacks, className, style, htmlAttributes, ref, as, ...restProps }: GraphVisualizationProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
116
114
|
export declare namespace GraphVisualization {
|
|
117
115
|
var ZoomInButton: ({ className, style, htmlAttributes, tooltipPlacement, }: {
|
|
116
|
+
tooltipPlacement?: React.ComponentProps<{
|
|
117
|
+
({ children, isDisabled, type, isInitialOpen, placement, isOpen, onOpenChange, isPortaled: isPortaledProp, floatingStrategy: strategyProp, hoverDelay, shouldCloseOnReferenceClick, autoUpdateOptions, }: import("@neo4j-ndl/react/lib/types/tooltip").TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
118
|
+
displayName: string;
|
|
119
|
+
} & {
|
|
120
|
+
Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
121
|
+
children: React.ReactNode;
|
|
122
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
123
|
+
Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", import("@neo4j-ndl/react/lib/types/tooltip").TooltipBodyProps>) => import("react/jsx-runtime").JSX.Element | null;
|
|
124
|
+
Content: ({ children, style, htmlAttributes, className, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
125
|
+
children: React.ReactNode;
|
|
126
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
127
|
+
Header: ({ children, passThroughProps, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
|
|
128
|
+
children: React.ReactNode;
|
|
129
|
+
passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
|
|
130
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
131
|
+
Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
|
|
132
|
+
children: React.ReactNode;
|
|
133
|
+
hasButtonWrapper?: boolean;
|
|
134
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
135
|
+
}>["placement"];
|
|
118
136
|
className?: string;
|
|
119
137
|
style?: React.CSSProperties;
|
|
120
|
-
htmlAttributes?: import("@neo4j-ndl/react").
|
|
121
|
-
|
|
138
|
+
htmlAttributes?: React.ComponentPropsWithRef<typeof import("@neo4j-ndl/react").CleanIconButton>["htmlAttributes"];
|
|
139
|
+
ref?: React.ComponentPropsWithRef<"button">["ref"];
|
|
122
140
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
123
141
|
var ZoomOutButton: ({ className, style, htmlAttributes, tooltipPlacement, }: {
|
|
142
|
+
tooltipPlacement?: React.ComponentProps<{
|
|
143
|
+
({ children, isDisabled, type, isInitialOpen, placement, isOpen, onOpenChange, isPortaled: isPortaledProp, floatingStrategy: strategyProp, hoverDelay, shouldCloseOnReferenceClick, autoUpdateOptions, }: import("@neo4j-ndl/react/lib/types/tooltip").TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
144
|
+
displayName: string;
|
|
145
|
+
} & {
|
|
146
|
+
Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
147
|
+
children: React.ReactNode;
|
|
148
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
149
|
+
Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", import("@neo4j-ndl/react/lib/types/tooltip").TooltipBodyProps>) => import("react/jsx-runtime").JSX.Element | null;
|
|
150
|
+
Content: ({ children, style, htmlAttributes, className, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
151
|
+
children: React.ReactNode;
|
|
152
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
153
|
+
Header: ({ children, passThroughProps, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
|
|
154
|
+
children: React.ReactNode;
|
|
155
|
+
passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
|
|
156
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
157
|
+
Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
|
|
158
|
+
children: React.ReactNode;
|
|
159
|
+
hasButtonWrapper?: boolean;
|
|
160
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
161
|
+
}>["placement"];
|
|
124
162
|
className?: string;
|
|
125
163
|
style?: React.CSSProperties;
|
|
126
|
-
htmlAttributes?: import("@neo4j-ndl/react").
|
|
127
|
-
|
|
164
|
+
htmlAttributes?: React.ComponentPropsWithRef<typeof import("@neo4j-ndl/react").CleanIconButton>["htmlAttributes"];
|
|
165
|
+
ref?: React.ComponentPropsWithRef<"button">["ref"];
|
|
128
166
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
129
167
|
var ZoomToFitButton: ({ className, style, htmlAttributes, tooltipPlacement, }: {
|
|
168
|
+
tooltipPlacement?: React.ComponentProps<{
|
|
169
|
+
({ children, isDisabled, type, isInitialOpen, placement, isOpen, onOpenChange, isPortaled: isPortaledProp, floatingStrategy: strategyProp, hoverDelay, shouldCloseOnReferenceClick, autoUpdateOptions, }: import("@neo4j-ndl/react/lib/types/tooltip").TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
170
|
+
displayName: string;
|
|
171
|
+
} & {
|
|
172
|
+
Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
173
|
+
children: React.ReactNode;
|
|
174
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
175
|
+
Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", import("@neo4j-ndl/react/lib/types/tooltip").TooltipBodyProps>) => import("react/jsx-runtime").JSX.Element | null;
|
|
176
|
+
Content: ({ children, style, htmlAttributes, className, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
177
|
+
children: React.ReactNode;
|
|
178
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
179
|
+
Header: ({ children, passThroughProps, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
|
|
180
|
+
children: React.ReactNode;
|
|
181
|
+
passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
|
|
182
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
183
|
+
Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
|
|
184
|
+
children: React.ReactNode;
|
|
185
|
+
hasButtonWrapper?: boolean;
|
|
186
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
187
|
+
}>["placement"];
|
|
130
188
|
className?: string;
|
|
131
189
|
style?: React.CSSProperties;
|
|
132
|
-
htmlAttributes?: import("@neo4j-ndl/react").
|
|
133
|
-
|
|
190
|
+
htmlAttributes?: React.ComponentPropsWithRef<typeof import("@neo4j-ndl/react").CleanIconButton>["htmlAttributes"];
|
|
191
|
+
ref?: React.ComponentPropsWithRef<"button">["ref"];
|
|
134
192
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
135
193
|
var ToggleSidePanelButton: ({ className, htmlAttributes, style, tooltipPlacement, }: {
|
|
194
|
+
tooltipPlacement?: React.ComponentProps<{
|
|
195
|
+
({ children, isDisabled, type, isInitialOpen, placement, isOpen, onOpenChange, isPortaled: isPortaledProp, floatingStrategy: strategyProp, hoverDelay, shouldCloseOnReferenceClick, autoUpdateOptions, }: import("@neo4j-ndl/react/lib/types/tooltip").TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
196
|
+
displayName: string;
|
|
197
|
+
} & {
|
|
198
|
+
Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
199
|
+
children: React.ReactNode;
|
|
200
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
201
|
+
Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", import("@neo4j-ndl/react/lib/types/tooltip").TooltipBodyProps>) => import("react/jsx-runtime").JSX.Element | null;
|
|
202
|
+
Content: ({ children, style, htmlAttributes, className, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
203
|
+
children: React.ReactNode;
|
|
204
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
205
|
+
Header: ({ children, passThroughProps, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
|
|
206
|
+
children: React.ReactNode;
|
|
207
|
+
passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
|
|
208
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
209
|
+
Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
|
|
210
|
+
children: React.ReactNode;
|
|
211
|
+
hasButtonWrapper?: boolean;
|
|
212
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
213
|
+
}>["placement"];
|
|
136
214
|
className?: string;
|
|
137
215
|
style?: React.CSSProperties;
|
|
138
|
-
htmlAttributes?: import("@neo4j-ndl/react").
|
|
139
|
-
|
|
216
|
+
htmlAttributes?: React.ComponentPropsWithRef<typeof import("@neo4j-ndl/react").CleanIconButton>["htmlAttributes"];
|
|
217
|
+
ref?: React.ComponentPropsWithRef<"button">["ref"];
|
|
140
218
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
141
219
|
var DownloadButton: ({ className, style, htmlAttributes, tooltipPlacement, }: {
|
|
220
|
+
tooltipPlacement?: React.ComponentProps<{
|
|
221
|
+
({ children, isDisabled, type, isInitialOpen, placement, isOpen, onOpenChange, isPortaled: isPortaledProp, floatingStrategy: strategyProp, hoverDelay, shouldCloseOnReferenceClick, autoUpdateOptions, }: import("@neo4j-ndl/react/lib/types/tooltip").TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
222
|
+
displayName: string;
|
|
223
|
+
} & {
|
|
224
|
+
Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
225
|
+
children: React.ReactNode;
|
|
226
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
227
|
+
Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", import("@neo4j-ndl/react/lib/types/tooltip").TooltipBodyProps>) => import("react/jsx-runtime").JSX.Element | null;
|
|
228
|
+
Content: ({ children, style, htmlAttributes, className, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
229
|
+
children: React.ReactNode;
|
|
230
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
231
|
+
Header: ({ children, passThroughProps, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
|
|
232
|
+
children: React.ReactNode;
|
|
233
|
+
passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
|
|
234
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
235
|
+
Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
|
|
236
|
+
children: React.ReactNode;
|
|
237
|
+
hasButtonWrapper?: boolean;
|
|
238
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
239
|
+
}>["placement"];
|
|
142
240
|
className?: string;
|
|
143
241
|
style?: React.CSSProperties;
|
|
144
|
-
htmlAttributes?: import("@neo4j-ndl/react").
|
|
145
|
-
|
|
242
|
+
htmlAttributes?: React.ComponentPropsWithRef<typeof import("@neo4j-ndl/react").CleanIconButton>["htmlAttributes"];
|
|
243
|
+
ref?: React.ComponentPropsWithRef<"button">["ref"];
|
|
146
244
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
147
245
|
var BoxSelectButton: ({ className, style, htmlAttributes, tooltipPlacement, }: {
|
|
246
|
+
tooltipPlacement?: React.ComponentProps<{
|
|
247
|
+
({ children, isDisabled, type, isInitialOpen, placement, isOpen, onOpenChange, isPortaled: isPortaledProp, floatingStrategy: strategyProp, hoverDelay, shouldCloseOnReferenceClick, autoUpdateOptions, }: import("@neo4j-ndl/react/lib/types/tooltip").TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
248
|
+
displayName: string;
|
|
249
|
+
} & {
|
|
250
|
+
Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
251
|
+
children: React.ReactNode;
|
|
252
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
253
|
+
Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", import("@neo4j-ndl/react/lib/types/tooltip").TooltipBodyProps>) => import("react/jsx-runtime").JSX.Element | null;
|
|
254
|
+
Content: ({ children, style, htmlAttributes, className, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
255
|
+
children: React.ReactNode;
|
|
256
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
257
|
+
Header: ({ children, passThroughProps, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
|
|
258
|
+
children: React.ReactNode;
|
|
259
|
+
passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
|
|
260
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
261
|
+
Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
|
|
262
|
+
children: React.ReactNode;
|
|
263
|
+
hasButtonWrapper?: boolean;
|
|
264
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
265
|
+
}>["placement"];
|
|
148
266
|
className?: string;
|
|
149
267
|
style?: React.CSSProperties;
|
|
150
|
-
htmlAttributes?: import("@neo4j-ndl/react").
|
|
151
|
-
|
|
268
|
+
htmlAttributes?: React.ComponentPropsWithRef<typeof import("@neo4j-ndl/react").CleanIconButton>["htmlAttributes"];
|
|
269
|
+
ref?: React.ComponentPropsWithRef<"button">["ref"];
|
|
152
270
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
153
271
|
var LassoSelectButton: ({ className, style, htmlAttributes, tooltipPlacement, }: {
|
|
272
|
+
tooltipPlacement?: React.ComponentProps<{
|
|
273
|
+
({ children, isDisabled, type, isInitialOpen, placement, isOpen, onOpenChange, isPortaled: isPortaledProp, floatingStrategy: strategyProp, hoverDelay, shouldCloseOnReferenceClick, autoUpdateOptions, }: import("@neo4j-ndl/react/lib/types/tooltip").TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
274
|
+
displayName: string;
|
|
275
|
+
} & {
|
|
276
|
+
Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
277
|
+
children: React.ReactNode;
|
|
278
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
279
|
+
Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", import("@neo4j-ndl/react/lib/types/tooltip").TooltipBodyProps>) => import("react/jsx-runtime").JSX.Element | null;
|
|
280
|
+
Content: ({ children, style, htmlAttributes, className, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
281
|
+
children: React.ReactNode;
|
|
282
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
283
|
+
Header: ({ children, passThroughProps, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
|
|
284
|
+
children: React.ReactNode;
|
|
285
|
+
passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
|
|
286
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
287
|
+
Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
|
|
288
|
+
children: React.ReactNode;
|
|
289
|
+
hasButtonWrapper?: boolean;
|
|
290
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
291
|
+
}>["placement"];
|
|
154
292
|
className?: string;
|
|
155
293
|
style?: React.CSSProperties;
|
|
156
|
-
htmlAttributes?: import("@neo4j-ndl/react").
|
|
157
|
-
|
|
294
|
+
htmlAttributes?: React.ComponentPropsWithRef<typeof import("@neo4j-ndl/react").CleanIconButton>["htmlAttributes"];
|
|
295
|
+
ref?: React.ComponentPropsWithRef<"button">["ref"];
|
|
158
296
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
159
297
|
var SingleSelectButton: ({ className, style, htmlAttributes, tooltipPlacement, }: {
|
|
298
|
+
tooltipPlacement?: React.ComponentProps<{
|
|
299
|
+
({ children, isDisabled, type, isInitialOpen, placement, isOpen, onOpenChange, isPortaled: isPortaledProp, floatingStrategy: strategyProp, hoverDelay, shouldCloseOnReferenceClick, autoUpdateOptions, }: import("@neo4j-ndl/react/lib/types/tooltip").TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
300
|
+
displayName: string;
|
|
301
|
+
} & {
|
|
302
|
+
Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
303
|
+
children: React.ReactNode;
|
|
304
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
305
|
+
Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", import("@neo4j-ndl/react/lib/types/tooltip").TooltipBodyProps>) => import("react/jsx-runtime").JSX.Element | null;
|
|
306
|
+
Content: ({ children, style, htmlAttributes, className, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
307
|
+
children: React.ReactNode;
|
|
308
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
309
|
+
Header: ({ children, passThroughProps, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
|
|
310
|
+
children: React.ReactNode;
|
|
311
|
+
passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
|
|
312
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
313
|
+
Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
|
|
314
|
+
children: React.ReactNode;
|
|
315
|
+
hasButtonWrapper?: boolean;
|
|
316
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
317
|
+
}>["placement"];
|
|
160
318
|
className?: string;
|
|
161
319
|
style?: React.CSSProperties;
|
|
162
|
-
htmlAttributes?: import("@neo4j-ndl/react").
|
|
163
|
-
|
|
320
|
+
htmlAttributes?: React.ComponentPropsWithRef<typeof import("@neo4j-ndl/react").CleanIconButton>["htmlAttributes"];
|
|
321
|
+
ref?: React.ComponentPropsWithRef<"button">["ref"];
|
|
164
322
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
165
323
|
var SearchButton: ({ className, style, htmlAttributes, tooltipPlacement, open: rawOpen, setOpen: rawSetOpen, searchTerm: rawSearchTerm, setSearchTerm: rawSetSearchTerm, onSearch, }: {
|
|
324
|
+
tooltipPlacement?: React.ComponentProps<{
|
|
325
|
+
({ children, isDisabled, type, isInitialOpen, placement, isOpen, onOpenChange, isPortaled: isPortaledProp, floatingStrategy: strategyProp, hoverDelay, shouldCloseOnReferenceClick, autoUpdateOptions, }: import("@neo4j-ndl/react/lib/types/tooltip").TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
326
|
+
displayName: string;
|
|
327
|
+
} & {
|
|
328
|
+
Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
329
|
+
children: React.ReactNode;
|
|
330
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
331
|
+
Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", import("@neo4j-ndl/react/lib/types/tooltip").TooltipBodyProps>) => import("react/jsx-runtime").JSX.Element | null;
|
|
332
|
+
Content: ({ children, style, htmlAttributes, className, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
|
|
333
|
+
children: React.ReactNode;
|
|
334
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
335
|
+
Header: ({ children, passThroughProps, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
|
|
336
|
+
children: React.ReactNode;
|
|
337
|
+
passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
|
|
338
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
339
|
+
Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
|
|
340
|
+
children: React.ReactNode;
|
|
341
|
+
hasButtonWrapper?: boolean;
|
|
342
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
343
|
+
}>["placement"];
|
|
166
344
|
className?: string;
|
|
167
345
|
style?: React.CSSProperties;
|
|
168
|
-
htmlAttributes?: import("@neo4j-ndl/react").
|
|
169
|
-
|
|
346
|
+
htmlAttributes?: React.ComponentPropsWithRef<typeof import("@neo4j-ndl/react").CleanIconButton>["htmlAttributes"];
|
|
347
|
+
ref?: React.ComponentPropsWithRef<"button">["ref"];
|
|
170
348
|
} & {
|
|
171
349
|
open?: boolean;
|
|
172
350
|
setOpen?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
export declare const containerClasses = "n-w-full n-border-
|
|
21
|
+
export declare const containerClasses = "n-w-full n-border-neutral-border-weak n-mx-2 n-rounded-lg n-border";
|
|
22
22
|
declare const Component: () => import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export default Component;
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
export declare const containerClasses = "n-w-full n-border-
|
|
21
|
+
export declare const containerClasses = "n-w-full n-border-neutral-border-weak n-mx-2 n-rounded-lg n-border";
|
|
22
22
|
declare const Component: () => import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export default Component;
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
export declare const containerClasses = "n-w-full n-border-
|
|
21
|
+
export declare const containerClasses = "n-w-full n-border-neutral-border-weak n-mx-2 n-rounded-lg n-border";
|
|
22
22
|
declare const Component: () => import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export default Component;
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
export declare const containerClasses = "n-w-full n-border-
|
|
21
|
+
export declare const containerClasses = "n-w-full n-border-neutral-border-weak n-mx-2 n-rounded-lg n-border";
|
|
22
22
|
declare const Component: () => import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export default Component;
|
|
@@ -23,4 +23,4 @@ export declare const StoryGraph: {
|
|
|
23
23
|
nodes: NeoNode[];
|
|
24
24
|
rels: NeoRel[];
|
|
25
25
|
};
|
|
26
|
-
export declare const containerClasses = "n-w-full n-border-
|
|
26
|
+
export declare const containerClasses = "n-w-full n-border-neutral-border-weak n-mx-2 n-rounded-lg n-border";
|
|
@@ -19,5 +19,10 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
type SetStateAction<T> = T | ((prev: T) => T);
|
|
22
|
-
|
|
22
|
+
type UseSemiControlledStateProps<T> = {
|
|
23
|
+
state: T;
|
|
24
|
+
onChange?: (next: T) => void;
|
|
25
|
+
isControlled?: boolean;
|
|
26
|
+
};
|
|
27
|
+
export declare function useSemicontrolledState<T>({ state, onChange, isControlled, }: UseSemiControlledStateProps<T>): [T, (setState: SetStateAction<T>) => void];
|
|
23
28
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-ndl/react-graph",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "React implementation of the graph visualization from Neo4j Design System",
|
|
6
6
|
"keywords": [
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@axe-core/playwright": "4.9.0",
|
|
39
|
-
"@playwright/experimental-ct-react": "1.
|
|
40
|
-
"@playwright/test": "1.
|
|
39
|
+
"@playwright/experimental-ct-react": "1.56.0",
|
|
40
|
+
"@playwright/test": "1.56.0",
|
|
41
41
|
"@testing-library/jest-dom": "6.6.3",
|
|
42
42
|
"@testing-library/react": "14.3.1",
|
|
43
43
|
"@types/react": "18.2.18",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"@neo4j-nvl/base": "^1.0.0",
|
|
56
56
|
"@neo4j-nvl/interaction-handlers": "^1.0.0",
|
|
57
57
|
"@neo4j-nvl/react": "^1.0.0",
|
|
58
|
-
"@neo4j-ndl/base": "^
|
|
59
|
-
"@neo4j-ndl/react": "^
|
|
58
|
+
"@neo4j-ndl/base": "^4.0.0",
|
|
59
|
+
"@neo4j-ndl/react": "^4.0.0"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"classnames": "2.5.1",
|