@neo4j-ndl/react-graph 1.0.27 → 1.0.29

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.
@@ -118,8 +118,9 @@ const ZoomToFitButton = ({ className, style, htmlAttributes, tooltipPlacement, }
118
118
  const { nvlInstance } = (0, graph_visualization_context_1.useGraphVisualizationContext)();
119
119
  const getNodesToFit = (0, react_2.useCallback)(() => {
120
120
  const instance = nvlInstance.current;
121
- if (!instance)
121
+ if (!instance) {
122
122
  return [];
123
+ }
123
124
  const selectedNodes = instance.getSelectedNodes();
124
125
  const selectedRels = instance.getSelectedRelationships();
125
126
  const nodeIds = new Set();
@@ -1 +1 @@
1
- {"version":3,"file":"graph-visualization-buttons.js","sourceRoot":"","sources":["../../src/graph-visualization-buttons.tsx"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAM0B;AAC1B,kDAWgC;AAChC,4DAA2C;AAC3C,iCAMe;AAEf,+EAGuC;AACvC,2EAAqE;AACrE,mCAAkD;AAmC3C,MAAM,WAAW,GAAG,CAAC,KAAoC,EAAE,EAAE;IAClE,MAAM,EACJ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,WAAW,EACX,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,cAAc,EACd,QAAQ,GACT,GAAG,KAAK,CAAC;IACV,OAAO,CACL,uBAAC,uBAAe,IACd,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,SAAS,EACrC,YAAY,EAAE;YACZ,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE;YAC5C,IAAI,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE;SACzD,EACD,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QA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AC;AACJ,CAAC,CAAC;AA9CW,QAAA,cAAc,kBA8CzB","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 CleanIconButton,\n IconButton,\n Menu,\n TextInput,\n type Tooltip,\n} from '@neo4j-ndl/react';\nimport {\n ArrowDownTrayIconOutline,\n FitToScreenIcon,\n LassoIcon,\n MagnifyingGlassIconOutline,\n MagnifyingGlassMinusIconOutline,\n MagnifyingGlassPlusIconOutline,\n PanelRightIcon,\n SelectIcon,\n SquareDashIcon,\n XMarkIconOutline,\n} from '@neo4j-ndl/react/icons';\nimport { default as cx } from 'classnames';\nimport {\n type PropsWithChildren,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport {\n type Gesture,\n useGraphVisualizationContext,\n} from './graph-visualization-context';\nimport { useSemicontrolledState } from './use-semi-controlled-state';\nimport { searchNodes, searchRels } from './utils';\n\ntype GraphVisualizationButtonProps = {\n tooltipPlacement?: React.ComponentProps<typeof Tooltip>['placement'];\n className?: string;\n /**\n * Additional css styling. Will be applied to the root element.\n */\n style?: React.CSSProperties;\n\n /**\n * Html attributes to apply to the root element. This will override any default html attributes, use with caution.\n */\n htmlAttributes?: React.ComponentPropsWithRef<\n typeof CleanIconButton\n >['htmlAttributes'];\n\n /**\n * A ref to apply to the root element.\n */\n ref?: React.ComponentPropsWithRef<'button'>['ref'];\n};\n\ntype BaseProperties = GraphVisualizationButtonProps & {\n description: string;\n testid?: string;\n ariaLabel?: string;\n isActive?: boolean;\n isDisabled?: boolean;\n onClick?: () => void;\n onMouseDown?: () => void;\n};\n\nexport type GraphVisualizationGroupButton = PropsWithChildren<BaseProperties>;\n\nexport const GroupButton = (props: GraphVisualizationGroupButton) => {\n const {\n isActive,\n ariaLabel,\n isDisabled,\n description,\n onClick,\n onMouseDown,\n tooltipPlacement,\n className,\n style,\n htmlAttributes,\n children,\n } = props;\n return (\n <CleanIconButton\n description={description ?? ariaLabel}\n tooltipProps={{\n content: { style: { whiteSpace: 'nowrap' } },\n root: { isPortaled: false, placement: tooltipPlacement },\n }}\n size=\"small\"\n className={className}\n style={style}\n isActive={isActive}\n isDisabled={isDisabled}\n onClick={onClick}\n htmlAttributes={{\n onMouseDown,\n ...htmlAttributes,\n }}\n >\n {children}\n </CleanIconButton>\n );\n};\n\nconst targetIsTextInput = (target: EventTarget | null): boolean => {\n if (!(target instanceof HTMLElement)) {\n return false;\n }\n return (\n target.isContentEditable || ['INPUT', 'TEXTAREA'].includes(target.tagName)\n );\n};\n\nconst isEditingText = (e: KeyboardEvent): boolean => {\n return targetIsTextInput(e.target);\n};\n\nconst GESTURE_KEYS: Record<Gesture, string> = {\n box: 'B',\n lasso: 'L',\n single: 'S',\n};\n\nconst useRegisterKeyboardGestureSwitcher = (gesture: Gesture) => {\n const { setGesture } = useGraphVisualizationContext();\n const handleKeyDown = useCallback(\n (evt: KeyboardEvent) => {\n if (!isEditingText(evt) && setGesture !== undefined) {\n const upperKey = evt.key.toUpperCase();\n if (upperKey === GESTURE_KEYS[gesture]) {\n setGesture(gesture);\n }\n }\n },\n [gesture, setGesture],\n );\n\n useEffect(() => {\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleKeyDown]);\n};\n\nconst NON_BREAKING_SPACE = '\\u00A0';\n\nexport const SingleSelectButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { gesture, setGesture, interactionMode } =\n useGraphVisualizationContext();\n useRegisterKeyboardGestureSwitcher('single');\n\n return (\n <GroupButton\n isActive={gesture === 'single'}\n isDisabled={interactionMode !== 'select'}\n ariaLabel=\"Individual Select Button\"\n description={`Individual Select ${NON_BREAKING_SPACE} ${GESTURE_KEYS.single}`}\n onClick={() => {\n setGesture?.('single');\n }}\n tooltipPlacement={tooltipPlacement ?? 'right'}\n htmlAttributes={{\n 'data-testid': 'gesture-individual-select',\n ...htmlAttributes,\n }}\n className={className}\n style={style}\n >\n <SelectIcon aria-label=\"Individual Select\" />\n </GroupButton>\n );\n};\n\nexport const BoxSelectButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { gesture, setGesture, interactionMode } =\n useGraphVisualizationContext();\n useRegisterKeyboardGestureSwitcher('box');\n\n return (\n <GroupButton\n isDisabled={interactionMode !== 'select' || setGesture === undefined}\n isActive={gesture === 'box'}\n ariaLabel=\"Box Select Button\"\n description={`Box Select ${NON_BREAKING_SPACE} ${GESTURE_KEYS.box}`}\n onClick={() => {\n setGesture?.('box');\n }}\n tooltipPlacement={tooltipPlacement ?? 'right'}\n htmlAttributes={{\n 'data-testid': 'gesture-box-select',\n ...htmlAttributes,\n }}\n className={className}\n style={style}\n >\n <SquareDashIcon aria-label=\"Box select\" />\n </GroupButton>\n );\n};\n\nexport const LassoSelectButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { gesture, setGesture, interactionMode } =\n useGraphVisualizationContext();\n useRegisterKeyboardGestureSwitcher('lasso');\n\n return (\n <GroupButton\n isDisabled={interactionMode !== 'select' || setGesture === undefined}\n isActive={gesture === 'lasso'}\n ariaLabel=\"Lasso Select Button\"\n description={`Lasso Select ${NON_BREAKING_SPACE} ${GESTURE_KEYS.lasso}`}\n onClick={() => {\n setGesture?.('lasso');\n }}\n tooltipPlacement={tooltipPlacement ?? 'right'}\n htmlAttributes={{\n 'data-testid': 'gesture-lasso-select',\n ...htmlAttributes,\n }}\n className={className}\n style={style}\n >\n <LassoIcon aria-label=\"Lasso select\" />\n </GroupButton>\n );\n};\n\nexport const ZoomInButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { nvlInstance } = useGraphVisualizationContext();\n\n const handleZoomIn = useCallback(() => {\n nvlInstance.current?.setZoom(nvlInstance.current?.getScale() * 1.3);\n }, [nvlInstance]);\n\n return (\n <GroupButton\n onClick={handleZoomIn}\n description=\"Zoom in\"\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n tooltipPlacement={tooltipPlacement ?? 'left'}\n >\n <MagnifyingGlassPlusIconOutline />\n </GroupButton>\n );\n};\n\nexport const ZoomOutButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { nvlInstance } = useGraphVisualizationContext();\n\n const handleZoomOut = useCallback(() => {\n nvlInstance.current?.setZoom(nvlInstance.current?.getScale() * 0.7);\n }, [nvlInstance]);\n\n return (\n <GroupButton\n onClick={handleZoomOut}\n description=\"Zoom out\"\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n tooltipPlacement={tooltipPlacement ?? 'left'}\n >\n <MagnifyingGlassMinusIconOutline />\n </GroupButton>\n );\n};\n\nexport const ZoomToFitButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { nvlInstance } = useGraphVisualizationContext();\n\n const getNodesToFit = useCallback(() => {\n const instance = nvlInstance.current;\n if (!instance) return [];\n\n const selectedNodes = instance.getSelectedNodes();\n const selectedRels = instance.getSelectedRelationships();\n const nodeIds = new Set<string>();\n\n if (selectedNodes.length || selectedRels.length) {\n selectedNodes.forEach((n) => nodeIds.add(n.id));\n selectedRels.forEach((r) => nodeIds.add(r.from).add(r.to));\n return [...nodeIds];\n }\n\n const allNodes = instance.getNodes();\n const allRels = instance.getRelationships();\n\n allNodes.forEach((n) => n.disabled !== true && nodeIds.add(n.id));\n allRels.forEach(\n (r) => r.disabled !== true && nodeIds.add(r.from).add(r.to),\n );\n\n if (nodeIds.size > 0) {\n return [...nodeIds];\n }\n\n return allNodes.map((node) => node.id);\n }, [nvlInstance]);\n\n const handleZoomToFit = useCallback(() => {\n nvlInstance.current?.fit(getNodesToFit());\n }, [getNodesToFit, nvlInstance]);\n\n return (\n <GroupButton\n onClick={handleZoomToFit}\n description=\"Zoom to fit\"\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n tooltipPlacement={tooltipPlacement ?? 'left'}\n >\n <FitToScreenIcon />\n </GroupButton>\n );\n};\n\nexport const ToggleSidePanelButton = ({\n className,\n htmlAttributes,\n style,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { sidepanel } = useGraphVisualizationContext();\n if (!sidepanel) {\n throw new Error(\n 'Using the ToggleSidePanelButton requires having a sidepanel',\n );\n }\n const { isSidePanelOpen, setIsSidePanelOpen } = sidepanel;\n return (\n <IconButton\n size=\"small\"\n onClick={() => setIsSidePanelOpen?.(!isSidePanelOpen)}\n isFloating\n description={isSidePanelOpen ? 'Close' : 'Open'}\n isActive={isSidePanelOpen}\n tooltipProps={{\n content: { style: { whiteSpace: 'nowrap' } },\n root: {\n isPortaled: false,\n placement: tooltipPlacement ?? 'bottom',\n shouldCloseOnReferenceClick: true,\n },\n }}\n className={cx('ndl-graph-visualization-toggle-sidepanel', className)}\n style={style}\n htmlAttributes={{\n 'aria-label': 'Toggle node properties panel',\n ...htmlAttributes,\n }}\n >\n <PanelRightIcon className=\"ndl-graph-visualization-toggle-icon\" />\n </IconButton>\n );\n};\n\ntype SearchButtonProps = GraphVisualizationButtonProps & {\n open?: boolean;\n setOpen?: React.Dispatch<React.SetStateAction<boolean>>;\n searchTerm?: string;\n setSearchTerm?: React.Dispatch<React.SetStateAction<string>>;\n onSearch?: (\n nodeIds: string[] | undefined,\n relationshipIds: string[] | undefined,\n ) => void;\n};\n\nexport const SearchButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n open: rawOpen,\n setOpen: rawSetOpen,\n searchTerm: rawSearchTerm,\n setSearchTerm: rawSetSearchTerm,\n onSearch = () => {\n // no-op\n },\n}: SearchButtonProps) => {\n const inputRef = useRef<HTMLInputElement>(null);\n const [isOpen, setIsOpen] = useSemicontrolledState({\n isControlled: rawOpen !== undefined,\n onChange: rawSetOpen,\n state: rawOpen ?? false,\n });\n const [searchTerm, setSearchTerm] = useSemicontrolledState({\n isControlled: rawSearchTerm !== undefined,\n onChange: rawSetSearchTerm,\n state: rawSearchTerm ?? '',\n });\n const { nvlGraph } = useGraphVisualizationContext();\n\n const handleSearchChange = (newValue: string) => {\n setSearchTerm(newValue);\n if (newValue === '') {\n onSearch(undefined, undefined);\n return;\n }\n\n const rawNodes = Object.values(nvlGraph.dataLookupTable.nodes);\n const rawRels = Object.values(nvlGraph.dataLookupTable.relationships);\n\n onSearch(searchNodes(rawNodes, newValue), searchRels(rawRels, newValue));\n };\n\n return (\n <>\n {isOpen ? (\n <TextInput\n ref={inputRef}\n size=\"small\"\n leadingElement={<MagnifyingGlassIconOutline />}\n trailingElement={\n <CleanIconButton\n onClick={() => {\n handleSearchChange('');\n inputRef.current?.focus();\n }}\n description=\"Clear search\"\n >\n <XMarkIconOutline />\n </CleanIconButton>\n }\n placeholder=\"Search...\"\n value={searchTerm}\n onChange={(e) => handleSearchChange(e.target.value)}\n htmlAttributes={{\n autoFocus: true,\n onBlur: () => {\n if (searchTerm === '') {\n setIsOpen(false);\n }\n },\n }}\n />\n ) : (\n <IconButton\n size=\"small\"\n isFloating\n onClick={() => setIsOpen((o) => !o)}\n description=\"Search\"\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n tooltipProps={{\n root: { placement: tooltipPlacement ?? 'bottom' },\n }}\n >\n <MagnifyingGlassIconOutline />\n </IconButton>\n )}\n </>\n );\n};\n\nexport const DownloadButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { nvlInstance } = useGraphVisualizationContext();\n\n const [isDownloadMenuOpen, setOpen] = useState(false);\n const closeFileMenu = () => setOpen(false);\n const downloadButtonRef = useRef<HTMLButtonElement>(null);\n return (\n <>\n <IconButton\n ref={downloadButtonRef}\n size=\"small\"\n isFloating\n onClick={() => setOpen((o) => !o)}\n description=\"Download\"\n tooltipProps={{\n root: { placement: tooltipPlacement ?? 'bottom' },\n }}\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n >\n <ArrowDownTrayIconOutline />\n </IconButton>\n\n <Menu\n isOpen={isDownloadMenuOpen}\n onClose={closeFileMenu}\n anchorRef={downloadButtonRef}\n >\n <Menu.Items>\n <Menu.Item\n title=\"Download as PNG\"\n onClick={() => {\n nvlInstance.current?.saveToFile({});\n closeFileMenu();\n }}\n />\n </Menu.Items>\n </Menu>\n </>\n );\n};\n"]}
1
+ {"version":3,"file":"graph-visualization-buttons.js","sourceRoot":"","sources":["../../src/graph-visualization-buttons.tsx"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAM0B;AAC1B,kDAWgC;AAChC,4DAA2C;AAC3C,iCAMe;AAEf,+EAGuC;AACvC,2EAAqE;AACrE,mCAAkD;AAmC3C,MAAM,WAAW,GAAG,CAAC,KAAoC,EAAE,EAAE;IAClE,MAAM,EACJ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,WAAW,EACX,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,cAAc,EACd,QAAQ,GACT,GAAG,KAAK,CAAC;IACV,OAAO,CACL,uBAAC,uBAAe,IACd,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,SAAS,EACrC,YAAY,EAAE;YACZ,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE;YAC5C,IAAI,EAAE,EAAE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AAiB,EACvB,OAAO,EAAE,GAAG,EAAE;;4BACZ,MAAA,WAAW,CAAC,OAAO,0CAAE,UAAU,CAAC,EAAE,CAAC,CAAC;4BACpC,aAAa,EAAE,CAAC;wBAClB,CAAC,GACD,GACS,GACR,IACN,CACJ,CAAC;AACJ,CAAC,CAAC;AA9CW,QAAA,cAAc,kBA8CzB","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 CleanIconButton,\n IconButton,\n Menu,\n TextInput,\n type Tooltip,\n} from '@neo4j-ndl/react';\nimport {\n ArrowDownTrayIconOutline,\n FitToScreenIcon,\n LassoIcon,\n MagnifyingGlassIconOutline,\n MagnifyingGlassMinusIconOutline,\n MagnifyingGlassPlusIconOutline,\n PanelRightIcon,\n SelectIcon,\n SquareDashIcon,\n XMarkIconOutline,\n} from '@neo4j-ndl/react/icons';\nimport { default as cx } from 'classnames';\nimport {\n type PropsWithChildren,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport {\n type Gesture,\n useGraphVisualizationContext,\n} from './graph-visualization-context';\nimport { useSemicontrolledState } from './use-semi-controlled-state';\nimport { searchNodes, searchRels } from './utils';\n\ntype GraphVisualizationButtonProps = {\n tooltipPlacement?: React.ComponentProps<typeof Tooltip>['placement'];\n className?: string;\n /**\n * Additional css styling. Will be applied to the root element.\n */\n style?: React.CSSProperties;\n\n /**\n * Html attributes to apply to the root element. This will override any default html attributes, use with caution.\n */\n htmlAttributes?: React.ComponentPropsWithRef<\n typeof CleanIconButton\n >['htmlAttributes'];\n\n /**\n * A ref to apply to the root element.\n */\n ref?: React.ComponentPropsWithRef<'button'>['ref'];\n};\n\ntype BaseProperties = GraphVisualizationButtonProps & {\n description: string;\n testid?: string;\n ariaLabel?: string;\n isActive?: boolean;\n isDisabled?: boolean;\n onClick?: () => void;\n onMouseDown?: () => void;\n};\n\nexport type GraphVisualizationGroupButton = PropsWithChildren<BaseProperties>;\n\nexport const GroupButton = (props: GraphVisualizationGroupButton) => {\n const {\n isActive,\n ariaLabel,\n isDisabled,\n description,\n onClick,\n onMouseDown,\n tooltipPlacement,\n className,\n style,\n htmlAttributes,\n children,\n } = props;\n return (\n <CleanIconButton\n description={description ?? ariaLabel}\n tooltipProps={{\n content: { style: { whiteSpace: 'nowrap' } },\n root: { isPortaled: false, placement: tooltipPlacement },\n }}\n size=\"small\"\n className={className}\n style={style}\n isActive={isActive}\n isDisabled={isDisabled}\n onClick={onClick}\n htmlAttributes={{\n onMouseDown,\n ...htmlAttributes,\n }}\n >\n {children}\n </CleanIconButton>\n );\n};\n\nconst targetIsTextInput = (target: EventTarget | null): boolean => {\n if (!(target instanceof HTMLElement)) {\n return false;\n }\n return (\n target.isContentEditable || ['INPUT', 'TEXTAREA'].includes(target.tagName)\n );\n};\n\nconst isEditingText = (e: KeyboardEvent): boolean => {\n return targetIsTextInput(e.target);\n};\n\nconst GESTURE_KEYS: Record<Gesture, string> = {\n box: 'B',\n lasso: 'L',\n single: 'S',\n};\n\nconst useRegisterKeyboardGestureSwitcher = (gesture: Gesture) => {\n const { setGesture } = useGraphVisualizationContext();\n const handleKeyDown = useCallback(\n (evt: KeyboardEvent) => {\n if (!isEditingText(evt) && setGesture !== undefined) {\n const upperKey = evt.key.toUpperCase();\n if (upperKey === GESTURE_KEYS[gesture]) {\n setGesture(gesture);\n }\n }\n },\n [gesture, setGesture],\n );\n\n useEffect(() => {\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleKeyDown]);\n};\n\nconst NON_BREAKING_SPACE = '\\u00A0';\n\nexport const SingleSelectButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { gesture, setGesture, interactionMode } =\n useGraphVisualizationContext();\n useRegisterKeyboardGestureSwitcher('single');\n\n return (\n <GroupButton\n isActive={gesture === 'single'}\n isDisabled={interactionMode !== 'select'}\n ariaLabel=\"Individual Select Button\"\n description={`Individual Select ${NON_BREAKING_SPACE} ${GESTURE_KEYS.single}`}\n onClick={() => {\n setGesture?.('single');\n }}\n tooltipPlacement={tooltipPlacement ?? 'right'}\n htmlAttributes={{\n 'data-testid': 'gesture-individual-select',\n ...htmlAttributes,\n }}\n className={className}\n style={style}\n >\n <SelectIcon aria-label=\"Individual Select\" />\n </GroupButton>\n );\n};\n\nexport const BoxSelectButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { gesture, setGesture, interactionMode } =\n useGraphVisualizationContext();\n useRegisterKeyboardGestureSwitcher('box');\n\n return (\n <GroupButton\n isDisabled={interactionMode !== 'select' || setGesture === undefined}\n isActive={gesture === 'box'}\n ariaLabel=\"Box Select Button\"\n description={`Box Select ${NON_BREAKING_SPACE} ${GESTURE_KEYS.box}`}\n onClick={() => {\n setGesture?.('box');\n }}\n tooltipPlacement={tooltipPlacement ?? 'right'}\n htmlAttributes={{\n 'data-testid': 'gesture-box-select',\n ...htmlAttributes,\n }}\n className={className}\n style={style}\n >\n <SquareDashIcon aria-label=\"Box select\" />\n </GroupButton>\n );\n};\n\nexport const LassoSelectButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { gesture, setGesture, interactionMode } =\n useGraphVisualizationContext();\n useRegisterKeyboardGestureSwitcher('lasso');\n\n return (\n <GroupButton\n isDisabled={interactionMode !== 'select' || setGesture === undefined}\n isActive={gesture === 'lasso'}\n ariaLabel=\"Lasso Select Button\"\n description={`Lasso Select ${NON_BREAKING_SPACE} ${GESTURE_KEYS.lasso}`}\n onClick={() => {\n setGesture?.('lasso');\n }}\n tooltipPlacement={tooltipPlacement ?? 'right'}\n htmlAttributes={{\n 'data-testid': 'gesture-lasso-select',\n ...htmlAttributes,\n }}\n className={className}\n style={style}\n >\n <LassoIcon aria-label=\"Lasso select\" />\n </GroupButton>\n );\n};\n\nexport const ZoomInButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { nvlInstance } = useGraphVisualizationContext();\n\n const handleZoomIn = useCallback(() => {\n nvlInstance.current?.setZoom(nvlInstance.current?.getScale() * 1.3);\n }, [nvlInstance]);\n\n return (\n <GroupButton\n onClick={handleZoomIn}\n description=\"Zoom in\"\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n tooltipPlacement={tooltipPlacement ?? 'left'}\n >\n <MagnifyingGlassPlusIconOutline />\n </GroupButton>\n );\n};\n\nexport const ZoomOutButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { nvlInstance } = useGraphVisualizationContext();\n\n const handleZoomOut = useCallback(() => {\n nvlInstance.current?.setZoom(nvlInstance.current?.getScale() * 0.7);\n }, [nvlInstance]);\n\n return (\n <GroupButton\n onClick={handleZoomOut}\n description=\"Zoom out\"\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n tooltipPlacement={tooltipPlacement ?? 'left'}\n >\n <MagnifyingGlassMinusIconOutline />\n </GroupButton>\n );\n};\n\nexport const ZoomToFitButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { nvlInstance } = useGraphVisualizationContext();\n\n const getNodesToFit = useCallback(() => {\n const instance = nvlInstance.current;\n if (!instance) {\n return [];\n }\n\n const selectedNodes = instance.getSelectedNodes();\n const selectedRels = instance.getSelectedRelationships();\n const nodeIds = new Set<string>();\n\n if (selectedNodes.length || selectedRels.length) {\n selectedNodes.forEach((n) => nodeIds.add(n.id));\n selectedRels.forEach((r) => nodeIds.add(r.from).add(r.to));\n return [...nodeIds];\n }\n\n const allNodes = instance.getNodes();\n const allRels = instance.getRelationships();\n\n allNodes.forEach((n) => n.disabled !== true && nodeIds.add(n.id));\n allRels.forEach(\n (r) => r.disabled !== true && nodeIds.add(r.from).add(r.to),\n );\n\n if (nodeIds.size > 0) {\n return [...nodeIds];\n }\n\n return allNodes.map((node) => node.id);\n }, [nvlInstance]);\n\n const handleZoomToFit = useCallback(() => {\n nvlInstance.current?.fit(getNodesToFit());\n }, [getNodesToFit, nvlInstance]);\n\n return (\n <GroupButton\n onClick={handleZoomToFit}\n description=\"Zoom to fit\"\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n tooltipPlacement={tooltipPlacement ?? 'left'}\n >\n <FitToScreenIcon />\n </GroupButton>\n );\n};\n\nexport const ToggleSidePanelButton = ({\n className,\n htmlAttributes,\n style,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { sidepanel } = useGraphVisualizationContext();\n if (!sidepanel) {\n throw new Error(\n 'Using the ToggleSidePanelButton requires having a sidepanel',\n );\n }\n const { isSidePanelOpen, setIsSidePanelOpen } = sidepanel;\n return (\n <IconButton\n size=\"small\"\n onClick={() => setIsSidePanelOpen?.(!isSidePanelOpen)}\n isFloating\n description={isSidePanelOpen ? 'Close' : 'Open'}\n isActive={isSidePanelOpen}\n tooltipProps={{\n content: { style: { whiteSpace: 'nowrap' } },\n root: {\n isPortaled: false,\n placement: tooltipPlacement ?? 'bottom',\n shouldCloseOnReferenceClick: true,\n },\n }}\n className={cx('ndl-graph-visualization-toggle-sidepanel', className)}\n style={style}\n htmlAttributes={{\n 'aria-label': 'Toggle node properties panel',\n ...htmlAttributes,\n }}\n >\n <PanelRightIcon className=\"ndl-graph-visualization-toggle-icon\" />\n </IconButton>\n );\n};\n\ntype SearchButtonProps = GraphVisualizationButtonProps & {\n open?: boolean;\n setOpen?: React.Dispatch<React.SetStateAction<boolean>>;\n searchTerm?: string;\n setSearchTerm?: React.Dispatch<React.SetStateAction<string>>;\n onSearch?: (\n nodeIds: string[] | undefined,\n relationshipIds: string[] | undefined,\n ) => void;\n};\n\nexport const SearchButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n open: rawOpen,\n setOpen: rawSetOpen,\n searchTerm: rawSearchTerm,\n setSearchTerm: rawSetSearchTerm,\n onSearch = () => {\n // no-op\n },\n}: SearchButtonProps) => {\n const inputRef = useRef<HTMLInputElement>(null);\n const [isOpen, setIsOpen] = useSemicontrolledState({\n isControlled: rawOpen !== undefined,\n onChange: rawSetOpen,\n state: rawOpen ?? false,\n });\n const [searchTerm, setSearchTerm] = useSemicontrolledState({\n isControlled: rawSearchTerm !== undefined,\n onChange: rawSetSearchTerm,\n state: rawSearchTerm ?? '',\n });\n const { nvlGraph } = useGraphVisualizationContext();\n\n const handleSearchChange = (newValue: string) => {\n setSearchTerm(newValue);\n if (newValue === '') {\n onSearch(undefined, undefined);\n return;\n }\n\n const rawNodes = Object.values(nvlGraph.dataLookupTable.nodes);\n const rawRels = Object.values(nvlGraph.dataLookupTable.relationships);\n\n onSearch(searchNodes(rawNodes, newValue), searchRels(rawRels, newValue));\n };\n\n return (\n <>\n {isOpen ? (\n <TextInput\n ref={inputRef}\n size=\"small\"\n leadingElement={<MagnifyingGlassIconOutline />}\n trailingElement={\n <CleanIconButton\n onClick={() => {\n handleSearchChange('');\n inputRef.current?.focus();\n }}\n description=\"Clear search\"\n >\n <XMarkIconOutline />\n </CleanIconButton>\n }\n placeholder=\"Search...\"\n value={searchTerm}\n onChange={(e) => handleSearchChange(e.target.value)}\n htmlAttributes={{\n autoFocus: true,\n onBlur: () => {\n if (searchTerm === '') {\n setIsOpen(false);\n }\n },\n }}\n />\n ) : (\n <IconButton\n size=\"small\"\n isFloating\n onClick={() => setIsOpen((o) => !o)}\n description=\"Search\"\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n tooltipProps={{\n root: { placement: tooltipPlacement ?? 'bottom' },\n }}\n >\n <MagnifyingGlassIconOutline />\n </IconButton>\n )}\n </>\n );\n};\n\nexport const DownloadButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { nvlInstance } = useGraphVisualizationContext();\n\n const [isDownloadMenuOpen, setOpen] = useState(false);\n const closeFileMenu = () => setOpen(false);\n const downloadButtonRef = useRef<HTMLButtonElement>(null);\n return (\n <>\n <IconButton\n ref={downloadButtonRef}\n size=\"small\"\n isFloating\n onClick={() => setOpen((o) => !o)}\n description=\"Download\"\n tooltipProps={{\n root: { placement: tooltipPlacement ?? 'bottom' },\n }}\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n >\n <ArrowDownTrayIconOutline />\n </IconButton>\n\n <Menu\n isOpen={isDownloadMenuOpen}\n onClose={closeFileMenu}\n anchorRef={downloadButtonRef}\n >\n <Menu.Items>\n <Menu.Item\n title=\"Download as PNG\"\n onClick={() => {\n nvlInstance.current?.saveToFile({});\n closeFileMenu();\n }}\n />\n </Menu.Items>\n </Menu>\n </>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"details-panel.js","sourceRoot":"","sources":["../../../src/sidepanel-components/details-panel.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAA+D;AAC/D,iCAAgC;AAEhC,gFAIwC;AACxC,oFAA+E;AAC/E,yDAAqD;AAS9C,MAAM,YAAY,GAAG,CAAC,EAAE,SAAS,GAAG,GAAG,EAAoB,EAAE,EAAE;IACpE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAA,0DAA4B,GAAE,CAAC;IAE9D,MAAM,QAAQ,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC5B,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,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AAY,CAAC,IAAI,CAAC,KAAK,EAE9B,EAAE,EAAC,MAAM,EACT,cAAc,EAAE;gCACd,QAAQ,EAAE,CAAC;6BACZ,YAEA,YAAY,CAAC,IAAI,CAAC,IAAI,IANlB,YAAY,CAAC,IAAI,CAAC,IAAI,CAOhB,CACd,GACG,EAEN,gCAAK,SAAS,EAAC,qBAAqB,GAAG,EACvC,uBAAC,kCAAe,IACd,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,UAAU,EACxC,SAAS,EAAE,SAAS,GACpB,IACkC,IACrC,CACJ,CAAC;AACJ,CAAC,CAAC;AA7GW,QAAA,YAAY,gBA6GvB","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 { ClipboardButton, GraphLabel } from '@neo4j-ndl/react';\nimport { useMemo } from 'react';\n\nimport {\n type NodeData,\n type RelData,\n useGraphVisualizationContext,\n} from '../graph-visualization-context';\nimport { GraphVisualizationSidepanel } from '../graph-visualization-sidepanel';\nimport { PropertiesTable } from './properties-table';\n\ntype DetailPanelProps = {\n paneWidth?: number;\n};\n\ntype SelectedItem =\n | { dataType: 'node'; data: NodeData }\n | { dataType: 'relationship'; data: RelData };\nexport const DetailsPanel = ({ paneWidth = 400 }: DetailPanelProps) => {\n const { selected, nvlGraph } = useGraphVisualizationContext();\n\n const nodeData = useMemo(() => {\n const [nodeId] = selected.nodeIds;\n if (nodeId !== undefined) {\n return nvlGraph.dataLookupTable.nodes[nodeId];\n }\n\n return undefined;\n }, [selected, nvlGraph]);\n\n const relData = useMemo(() => {\n const [relId] = selected.relationshipIds;\n if (relId !== undefined) {\n return nvlGraph.dataLookupTable.relationships[relId];\n }\n\n return undefined;\n }, [selected, nvlGraph]);\n\n const selectedItem = useMemo((): SelectedItem | undefined => {\n if (nodeData) {\n return { data: nodeData, dataType: 'node' };\n }\n\n if (relData) {\n return { data: relData, dataType: 'relationship' };\n }\n\n return undefined;\n }, [nodeData, relData]);\n\n if (selectedItem === undefined) {\n return null;\n }\n\n const properties = [\n {\n key: '<id>',\n type: 'String',\n value: `${selectedItem.data.id}`,\n },\n ...Object.keys(selectedItem.data.properties).map((key) => {\n return {\n key: key,\n type: selectedItem.data.properties[key].type,\n value: selectedItem.data.properties[key].stringified,\n };\n }),\n ];\n\n return (\n <>\n <GraphVisualizationSidepanel.Title>\n <h6 className=\"ndl-details-title\">\n {selectedItem.dataType === 'node'\n ? 'Node details'\n : 'Relationship details'}\n </h6>\n <ClipboardButton\n textToCopy={properties\n .map((prop) => `${prop.key}: ${prop.value}`)\n .join('\\n')}\n size=\"small\"\n />\n </GraphVisualizationSidepanel.Title>\n <GraphVisualizationSidepanel.Content>\n <div className=\"ndl-details-tags\">\n {selectedItem.dataType === 'node' ? (\n selectedItem.data.labelsSorted.map((label) => (\n <GraphLabel\n type=\"node\"\n color={\n nvlGraph.dataLookupTable.labelMetaData[label]\n ?.mostCommonColor ?? ''\n }\n key={label}\n as=\"span\"\n htmlAttributes={{\n tabIndex: 0,\n }}\n >\n {label}\n </GraphLabel>\n ))\n ) : (\n <GraphLabel\n type=\"relationship\"\n color={selectedItem.data.color}\n key={selectedItem.data.type}\n as=\"span\"\n htmlAttributes={{\n tabIndex: 0,\n }}\n >\n {selectedItem.data.type}\n </GraphLabel>\n )}\n </div>\n {/* Divider */}\n <div className=\"ndl-details-divider\" />\n <PropertiesTable\n properties={selectedItem.data.properties}\n paneWidth={paneWidth}\n />\n </GraphVisualizationSidepanel.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,MAAM,CAAC,CAAC,CAAC,CAClC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;;4BAAC,OAAA,CAC5C,uBAAC,kBAAU,IACT,IAAI,EAAC,MAAM,EACX,KAAK,EACH,MAAA,MAAA,QAAQ,CAAC,eAAe,CAAC,aAAa,CAAC,KAAK,CAAC,0CACzC,eAAe,mCAAI,EAAE,EAG3B,EAAE,EAAC,MAAM,EACT,cAAc,EAAE;oCACd,QAAQ,EAAE,CAAC;iCACZ,YAEA,KAAK,IAND,KAAK,CAOC,CACd,CAAA;yBAAA,CAAC,CACH,CAAC,CAAC,CAAC,CACF,uBAAC,kBAAU,IACT,IAAI,EAAC,cAAc,EACnB,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK,EAE9B,EAAE,EAAC,MAAM,EACT,cAAc,EAAE;gCACd,QAAQ,EAAE,CAAC;6BACZ,YAEA,YAAY,CAAC,IAAI,CAAC,IAAI,IANlB,YAAY,CAAC,IAAI,CAAC,IAAI,CAOhB,CACd,GACG,EAEN,gCAAK,SAAS,EAAC,qBAAqB,GAAG,EACvC,uBAAC,kCAAe,IACd,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,UAAU,EACxC,SAAS,EAAE,SAAS,GACpB,IACkC,IACrC,CACJ,CAAC;AACJ,CAAC,CAAC;AA7GW,QAAA,YAAY,gBA6GvB","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 { ClipboardButton, GraphLabel } from '@neo4j-ndl/react';\nimport { useMemo } from 'react';\n\nimport {\n type NodeData,\n type RelData,\n useGraphVisualizationContext,\n} from '../graph-visualization-context';\nimport { GraphVisualizationSidepanel } from '../graph-visualization-sidepanel';\nimport { PropertiesTable } from './properties-table';\n\ntype DetailPanelProps = {\n paneWidth?: number;\n};\n\ntype SelectedItem =\n | { dataType: 'node'; data: NodeData }\n | { dataType: 'relationship'; data: RelData };\n\nexport const DetailsPanel = ({ paneWidth = 400 }: DetailPanelProps) => {\n const { selected, nvlGraph } = useGraphVisualizationContext();\n\n const nodeData = useMemo(() => {\n const [nodeId] = selected.nodeIds;\n if (nodeId !== undefined) {\n return nvlGraph.dataLookupTable.nodes[nodeId];\n }\n\n return undefined;\n }, [selected, nvlGraph]);\n\n const relData = useMemo(() => {\n const [relId] = selected.relationshipIds;\n if (relId !== undefined) {\n return nvlGraph.dataLookupTable.relationships[relId];\n }\n\n return undefined;\n }, [selected, nvlGraph]);\n\n const selectedItem = useMemo((): SelectedItem | undefined => {\n if (nodeData) {\n return { data: nodeData, dataType: 'node' };\n }\n\n if (relData) {\n return { data: relData, dataType: 'relationship' };\n }\n\n return undefined;\n }, [nodeData, relData]);\n\n if (selectedItem === undefined) {\n return null;\n }\n\n const properties = [\n {\n key: '<id>',\n type: 'String',\n value: `${selectedItem.data.id}`,\n },\n ...Object.keys(selectedItem.data.properties).map((key) => {\n return {\n key: key,\n type: selectedItem.data.properties[key].type,\n value: selectedItem.data.properties[key].stringified,\n };\n }),\n ];\n\n return (\n <>\n <GraphVisualizationSidepanel.Title>\n <h6 className=\"ndl-details-title\">\n {selectedItem.dataType === 'node'\n ? 'Node details'\n : 'Relationship details'}\n </h6>\n <ClipboardButton\n textToCopy={properties\n .map((prop) => `${prop.key}: ${prop.value}`)\n .join('\\n')}\n size=\"small\"\n />\n </GraphVisualizationSidepanel.Title>\n <GraphVisualizationSidepanel.Content>\n <div className=\"ndl-details-tags\">\n {selectedItem.dataType === 'node' ? (\n selectedItem.data.labelsSorted.map((label) => (\n <GraphLabel\n type=\"node\"\n color={\n nvlGraph.dataLookupTable.labelMetaData[label]\n ?.mostCommonColor ?? ''\n }\n key={label}\n as=\"span\"\n htmlAttributes={{\n tabIndex: 0,\n }}\n >\n {label}\n </GraphLabel>\n ))\n ) : (\n <GraphLabel\n type=\"relationship\"\n color={selectedItem.data.color}\n key={selectedItem.data.type}\n as=\"span\"\n htmlAttributes={{\n tabIndex: 0,\n }}\n >\n {selectedItem.data.type}\n </GraphLabel>\n )}\n </div>\n {/* Divider */}\n <div className=\"ndl-details-divider\" />\n <PropertiesTable\n properties={selectedItem.data.properties}\n paneWidth={paneWidth}\n />\n </GraphVisualizationSidepanel.Content>\n </>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"properties-table.js","sourceRoot":"","sources":["../../../src/sidepanel-components/properties-table.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAA+D;AAC/D,iCAAiC;AAGjC,qDAAiD;AAEpC,QAAA,QAAQ,GAAG,QAAQ,CAAC;AACpB,QAAA,mBAAmB,GAAG,GAAG,CAAC;AAC1B,QAAA,iBAAiB,GAAG,GAAG,CAAC;AACxB,QAAA,eAAe,GAAG,GAAG,CAAC;AAMnC,MAAM,eAAe,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAwB,EAAE,EAAE;IACvE,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAEpD,MAAM,SAAS,GACb,KAAK,GAAG,2BAAmB,CAAC,CAAC,CAAC,uBAAe,CAAC,CAAC,CAAC,yBAAiB,CAAC;IAEpE,MAAM,iBAAiB,GAAG,GAAG,EAAE;QAC7B,aAAa,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC,CAAC;IAEF,IAAI,UAAU,GAAG,U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AI,EAAE,IAAI,GACV,GACE,EACN,gCAAK,SAAS,EAAC,iCAAiC,YAC9C,uBAAC,uBAAe,IACd,UAAU,EAAE,GAAG,GAAG,KAAK,WAAW,EAAE,EACpC,IAAI,EAAC,OAAO,EACZ,YAAY,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GACnD,GACE,KAjBE,GAAG,CAkBP,CACP,CAAC;YACJ,CAAC,CAAC,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AArCW,QAAA,eAAe,mBAqC1B","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 { ClipboardButton, Typography } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nimport { type PortableProperty } from '../graph-visualization-context';\nimport { ClickableUrls } from './clickable-urls';\n\nexport const ELLIPSIS = '\\u2026';\nexport const WIDE_VIEW_THRESHOLD = 900;\nexport const MAX_LENGTH_NARROW = 150;\nexport const MAX_LENGTH_WIDE = 300;\ntype ExpandableValueProps = {\n value: string;\n width: number;\n type: string;\n};\nconst ExpandableValue = ({ value, width, type }: ExpandableValueProps) => {\n const [isExpanded, setIsExpanded] = useState(false);\n\n const maxLength =\n width > WIDE_VIEW_THRESHOLD ? MAX_LENGTH_WIDE : MAX_LENGTH_NARROW;\n\n const handleExpandClick = () => {\n setIsExpanded(true);\n };\n\n let valueShown = isExpanded ? value : value.slice(0, maxLength);\n const isValueTrimmed = valueShown.length !== value.length;\n valueShown += isValueTrimmed ? ELLIPSIS : '';\n\n return (\n <>\n {type.startsWith('Array') && '['}\n <ClickableUrls text={valueShown} />\n {isValueTrimmed && (\n <button\n onClick={handleExpandClick}\n className=\"ndl-properties-show-all-button\"\n >\n {' Show all'}\n </button>\n )}\n {type.startsWith('Array') && ']'}\n </>\n );\n};\n\ntype PropertiesTableProps = {\n properties: Record<string, PortableProperty>;\n paneWidth: number;\n};\nexport const PropertiesTable = ({\n properties,\n paneWidth,\n}: PropertiesTableProps) => {\n return (\n <div className=\"ndl-graph-visualization-properties-table\">\n <div className=\"ndl-properties-header\">\n <Typography variant=\"body-small\" className=\"ndl-properties-header-key\">\n Key\n </Typography>\n <Typography variant=\"body-small\">Value</Typography>\n </div>\n {Object.entries(properties).map(([key, { stringified, type }]) => {\n return (\n <div key={key} className=\"ndl-properties-row\">\n <Typography variant=\"body-small\" className=\"ndl-properties-key\">\n {key}\n </Typography>\n <div className=\"ndl-properties-value\">\n <ExpandableValue\n value={stringified}\n width={paneWidth}\n type={type}\n />\n </div>\n <div className=\"ndl-properties-clipboard-button\">\n <ClipboardButton\n textToCopy={`${key}: ${stringified}`}\n size=\"small\"\n tooltipProps={{ placement: 'left', type: 'simple' }}\n />\n </div>\n </div>\n );\n })}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"properties-table.js","sourceRoot":"","sources":["../../../src/sidepanel-components/properties-table.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAA+D;AAC/D,iCAAiC;AAGjC,qDAAiD;AAEpC,QAAA,QAAQ,GAAG,QAAQ,CAAC;AACpB,QAAA,mBAAmB,GAAG,GAAG,CAAC;AAC1B,QAAA,iBAAiB,GAAG,GAAG,CAAC;AACxB,QAAA,eAAe,GAAG,GAAG,CAAC;AAMnC,MAAM,eAAe,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAwB,EAAE,EAAE;IACvE,MAAM,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AAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;gBAC/D,OAAO,CACL,iCAAe,SAAS,EAAC,oBAAoB,aAC3C,uBAAC,kBAAU,IAAC,OAAO,EAAC,YAAY,EAAC,SAAS,EAAC,oBAAoB,YAC5D,GAAG,GACO,EACb,gCAAK,SAAS,EAAC,sBAAsB,YACnC,uBAAC,eAAe,IACd,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,IAAI,GACV,GACE,EACN,gCAAK,SAAS,EAAC,iCAAiC,YAC9C,uBAAC,uBAAe,IACd,UAAU,EAAE,GAAG,GAAG,KAAK,WAAW,EAAE,EACpC,IAAI,EAAC,OAAO,EACZ,YAAY,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GACnD,GACE,KAjBE,GAAG,CAkBP,CACP,CAAC;YACJ,CAAC,CAAC,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AArCW,QAAA,eAAe,mBAqC1B","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 { ClipboardButton, Typography } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nimport { type PortableProperty } from '../graph-visualization-context';\nimport { ClickableUrls } from './clickable-urls';\n\nexport const ELLIPSIS = '\\u2026';\nexport const WIDE_VIEW_THRESHOLD = 900;\nexport const MAX_LENGTH_NARROW = 150;\nexport const MAX_LENGTH_WIDE = 300;\ntype ExpandableValueProps = {\n value: string;\n width: number;\n type: string;\n};\nconst ExpandableValue = ({ value, width, type }: ExpandableValueProps) => {\n const [isExpanded, setIsExpanded] = useState(false);\n\n const maxLength =\n width > WIDE_VIEW_THRESHOLD ? MAX_LENGTH_WIDE : MAX_LENGTH_NARROW;\n\n const handleExpandClick = () => {\n setIsExpanded(true);\n };\n\n let valueShown = isExpanded ? value : value.slice(0, maxLength);\n const isValueTrimmed = valueShown.length !== value.length;\n valueShown += isValueTrimmed ? ELLIPSIS : '';\n\n return (\n <>\n {type.startsWith('Array') && '['}\n <ClickableUrls text={valueShown} />\n {isValueTrimmed && (\n <button\n onClick={handleExpandClick}\n className=\"ndl-properties-show-all-button\"\n >\n {' Show all'}\n </button>\n )}\n {type.startsWith('Array') && ']'}\n </>\n );\n};\n\ntype PropertiesTableProps = {\n properties: Record<string, PortableProperty>;\n paneWidth: number;\n};\n\nexport const PropertiesTable = ({\n properties,\n paneWidth,\n}: PropertiesTableProps) => {\n return (\n <div className=\"ndl-graph-visualization-properties-table\">\n <div className=\"ndl-properties-header\">\n <Typography variant=\"body-small\" className=\"ndl-properties-header-key\">\n Key\n </Typography>\n <Typography variant=\"body-small\">Value</Typography>\n </div>\n {Object.entries(properties).map(([key, { stringified, type }]) => {\n return (\n <div key={key} className=\"ndl-properties-row\">\n <Typography variant=\"body-small\" className=\"ndl-properties-key\">\n {key}\n </Typography>\n <div className=\"ndl-properties-value\">\n <ExpandableValue\n value={stringified}\n width={paneWidth}\n type={type}\n />\n </div>\n <div className=\"ndl-properties-clipboard-button\">\n <ClipboardButton\n textToCopy={`${key}: ${stringified}`}\n size=\"small\"\n tooltipProps={{ placement: 'left', type: 'simple' }}\n />\n </div>\n </div>\n );\n })}\n </div>\n );\n};\n"]}
@@ -106,8 +106,9 @@ export const ZoomToFitButton = ({ className, style, htmlAttributes, tooltipPlace
106
106
  const { nvlInstance } = useGraphVisualizationContext();
107
107
  const getNodesToFit = useCallback(() => {
108
108
  const instance = nvlInstance.current;
109
- if (!instance)
109
+ if (!instance) {
110
110
  return [];
111
+ }
111
112
  const selectedNodes = instance.getSelectedNodes();
112
113
  const selectedRels = instance.getSelectedRelationships();
113
114
  const nodeIds = new Set();
@@ -1 +1 @@
1
- {"version":3,"file":"graph-visualization-buttons.js","sourceRoot":"","sources":["../../src/graph-visualization-buttons.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,eAAe,EACf,UAAU,EACV,IAAI,EACJ,SAAS,GAEV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,SAAS,EACT,0BAA0B,EAC1B,+BAA+B,EAC/B,8BAA8B,EAC9B,cAAc,EACd,UAAU,EACV,cAAc,EACd,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAEL,WAAW,EACX,SAAS,EACT,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,4BAA4B,GAC7B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAmClD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAoC,EAAE,EAAE;IAClE,MAAM,EACJ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,WAAW,EACX,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,cAAc,EACd,QAAQ,GACT,GAAG,KAAK,CAAC;IACV,OAAO,CACL,KAAC,eAAe,IACd,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,SAAS,EACrC,YAAY,EAAE;YACZ,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,Q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AE;IAClC,MAAM,EAAE,WAAW,EAAE,GAAG,4BAA4B,EAAE,CAAC;IAEvD,MAAM,CAAC,kBAAkB,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC3C,MAAM,iBAAiB,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAC1D,OAAO,CACL,8BACE,KAAC,UAAU,IACT,GAAG,EAAE,iBAAiB,EACtB,IAAI,EAAC,OAAO,EACZ,UAAU,QACV,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EACjC,WAAW,EAAC,UAAU,EACtB,YAAY,EAAE;oBACZ,IAAI,EAAE,EAAE,SAAS,EAAE,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,QAAQ,EAAE;iBAClD,EACD,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,YAE9B,KAAC,wBAAwB,KAAG,GACjB,EAEb,KAAC,IAAI,IACH,MAAM,EAAE,kBAAkB,EAC1B,OAAO,EAAE,aAAa,EACtB,SAAS,EAAE,iBAAiB,YAE5B,KAAC,IAAI,CAAC,KAAK,cACT,KAAC,IAAI,CAAC,IAAI,IACR,KAAK,EAAC,iBAAiB,EACvB,OAAO,EAAE,GAAG,EAAE;;4BACZ,MAAA,WAAW,CAAC,OAAO,0CAAE,UAAU,CAAC,EAAE,CAAC,CAAC;4BACpC,aAAa,EAAE,CAAC;wBAClB,CAAC,GACD,GACS,GACR,IACN,CACJ,CAAC;AACJ,CAAC,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\nimport {\n CleanIconButton,\n IconButton,\n Menu,\n TextInput,\n type Tooltip,\n} from '@neo4j-ndl/react';\nimport {\n ArrowDownTrayIconOutline,\n FitToScreenIcon,\n LassoIcon,\n MagnifyingGlassIconOutline,\n MagnifyingGlassMinusIconOutline,\n MagnifyingGlassPlusIconOutline,\n PanelRightIcon,\n SelectIcon,\n SquareDashIcon,\n XMarkIconOutline,\n} from '@neo4j-ndl/react/icons';\nimport { default as cx } from 'classnames';\nimport {\n type PropsWithChildren,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport {\n type Gesture,\n useGraphVisualizationContext,\n} from './graph-visualization-context';\nimport { useSemicontrolledState } from './use-semi-controlled-state';\nimport { searchNodes, searchRels } from './utils';\n\ntype GraphVisualizationButtonProps = {\n tooltipPlacement?: React.ComponentProps<typeof Tooltip>['placement'];\n className?: string;\n /**\n * Additional css styling. Will be applied to the root element.\n */\n style?: React.CSSProperties;\n\n /**\n * Html attributes to apply to the root element. This will override any default html attributes, use with caution.\n */\n htmlAttributes?: React.ComponentPropsWithRef<\n typeof CleanIconButton\n >['htmlAttributes'];\n\n /**\n * A ref to apply to the root element.\n */\n ref?: React.ComponentPropsWithRef<'button'>['ref'];\n};\n\ntype BaseProperties = GraphVisualizationButtonProps & {\n description: string;\n testid?: string;\n ariaLabel?: string;\n isActive?: boolean;\n isDisabled?: boolean;\n onClick?: () => void;\n onMouseDown?: () => void;\n};\n\nexport type GraphVisualizationGroupButton = PropsWithChildren<BaseProperties>;\n\nexport const GroupButton = (props: GraphVisualizationGroupButton) => {\n const {\n isActive,\n ariaLabel,\n isDisabled,\n description,\n onClick,\n onMouseDown,\n tooltipPlacement,\n className,\n style,\n htmlAttributes,\n children,\n } = props;\n return (\n <CleanIconButton\n description={description ?? ariaLabel}\n tooltipProps={{\n content: { style: { whiteSpace: 'nowrap' } },\n root: { isPortaled: false, placement: tooltipPlacement },\n }}\n size=\"small\"\n className={className}\n style={style}\n isActive={isActive}\n isDisabled={isDisabled}\n onClick={onClick}\n htmlAttributes={{\n onMouseDown,\n ...htmlAttributes,\n }}\n >\n {children}\n </CleanIconButton>\n );\n};\n\nconst targetIsTextInput = (target: EventTarget | null): boolean => {\n if (!(target instanceof HTMLElement)) {\n return false;\n }\n return (\n target.isContentEditable || ['INPUT', 'TEXTAREA'].includes(target.tagName)\n );\n};\n\nconst isEditingText = (e: KeyboardEvent): boolean => {\n return targetIsTextInput(e.target);\n};\n\nconst GESTURE_KEYS: Record<Gesture, string> = {\n box: 'B',\n lasso: 'L',\n single: 'S',\n};\n\nconst useRegisterKeyboardGestureSwitcher = (gesture: Gesture) => {\n const { setGesture } = useGraphVisualizationContext();\n const handleKeyDown = useCallback(\n (evt: KeyboardEvent) => {\n if (!isEditingText(evt) && setGesture !== undefined) {\n const upperKey = evt.key.toUpperCase();\n if (upperKey === GESTURE_KEYS[gesture]) {\n setGesture(gesture);\n }\n }\n },\n [gesture, setGesture],\n );\n\n useEffect(() => {\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleKeyDown]);\n};\n\nconst NON_BREAKING_SPACE = '\\u00A0';\n\nexport const SingleSelectButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { gesture, setGesture, interactionMode } =\n useGraphVisualizationContext();\n useRegisterKeyboardGestureSwitcher('single');\n\n return (\n <GroupButton\n isActive={gesture === 'single'}\n isDisabled={interactionMode !== 'select'}\n ariaLabel=\"Individual Select Button\"\n description={`Individual Select ${NON_BREAKING_SPACE} ${GESTURE_KEYS.single}`}\n onClick={() => {\n setGesture?.('single');\n }}\n tooltipPlacement={tooltipPlacement ?? 'right'}\n htmlAttributes={{\n 'data-testid': 'gesture-individual-select',\n ...htmlAttributes,\n }}\n className={className}\n style={style}\n >\n <SelectIcon aria-label=\"Individual Select\" />\n </GroupButton>\n );\n};\n\nexport const BoxSelectButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { gesture, setGesture, interactionMode } =\n useGraphVisualizationContext();\n useRegisterKeyboardGestureSwitcher('box');\n\n return (\n <GroupButton\n isDisabled={interactionMode !== 'select' || setGesture === undefined}\n isActive={gesture === 'box'}\n ariaLabel=\"Box Select Button\"\n description={`Box Select ${NON_BREAKING_SPACE} ${GESTURE_KEYS.box}`}\n onClick={() => {\n setGesture?.('box');\n }}\n tooltipPlacement={tooltipPlacement ?? 'right'}\n htmlAttributes={{\n 'data-testid': 'gesture-box-select',\n ...htmlAttributes,\n }}\n className={className}\n style={style}\n >\n <SquareDashIcon aria-label=\"Box select\" />\n </GroupButton>\n );\n};\n\nexport const LassoSelectButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { gesture, setGesture, interactionMode } =\n useGraphVisualizationContext();\n useRegisterKeyboardGestureSwitcher('lasso');\n\n return (\n <GroupButton\n isDisabled={interactionMode !== 'select' || setGesture === undefined}\n isActive={gesture === 'lasso'}\n ariaLabel=\"Lasso Select Button\"\n description={`Lasso Select ${NON_BREAKING_SPACE} ${GESTURE_KEYS.lasso}`}\n onClick={() => {\n setGesture?.('lasso');\n }}\n tooltipPlacement={tooltipPlacement ?? 'right'}\n htmlAttributes={{\n 'data-testid': 'gesture-lasso-select',\n ...htmlAttributes,\n }}\n className={className}\n style={style}\n >\n <LassoIcon aria-label=\"Lasso select\" />\n </GroupButton>\n );\n};\n\nexport const ZoomInButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { nvlInstance } = useGraphVisualizationContext();\n\n const handleZoomIn = useCallback(() => {\n nvlInstance.current?.setZoom(nvlInstance.current?.getScale() * 1.3);\n }, [nvlInstance]);\n\n return (\n <GroupButton\n onClick={handleZoomIn}\n description=\"Zoom in\"\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n tooltipPlacement={tooltipPlacement ?? 'left'}\n >\n <MagnifyingGlassPlusIconOutline />\n </GroupButton>\n );\n};\n\nexport const ZoomOutButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { nvlInstance } = useGraphVisualizationContext();\n\n const handleZoomOut = useCallback(() => {\n nvlInstance.current?.setZoom(nvlInstance.current?.getScale() * 0.7);\n }, [nvlInstance]);\n\n return (\n <GroupButton\n onClick={handleZoomOut}\n description=\"Zoom out\"\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n tooltipPlacement={tooltipPlacement ?? 'left'}\n >\n <MagnifyingGlassMinusIconOutline />\n </GroupButton>\n );\n};\n\nexport const ZoomToFitButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { nvlInstance } = useGraphVisualizationContext();\n\n const getNodesToFit = useCallback(() => {\n const instance = nvlInstance.current;\n if (!instance) return [];\n\n const selectedNodes = instance.getSelectedNodes();\n const selectedRels = instance.getSelectedRelationships();\n const nodeIds = new Set<string>();\n\n if (selectedNodes.length || selectedRels.length) {\n selectedNodes.forEach((n) => nodeIds.add(n.id));\n selectedRels.forEach((r) => nodeIds.add(r.from).add(r.to));\n return [...nodeIds];\n }\n\n const allNodes = instance.getNodes();\n const allRels = instance.getRelationships();\n\n allNodes.forEach((n) => n.disabled !== true && nodeIds.add(n.id));\n allRels.forEach(\n (r) => r.disabled !== true && nodeIds.add(r.from).add(r.to),\n );\n\n if (nodeIds.size > 0) {\n return [...nodeIds];\n }\n\n return allNodes.map((node) => node.id);\n }, [nvlInstance]);\n\n const handleZoomToFit = useCallback(() => {\n nvlInstance.current?.fit(getNodesToFit());\n }, [getNodesToFit, nvlInstance]);\n\n return (\n <GroupButton\n onClick={handleZoomToFit}\n description=\"Zoom to fit\"\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n tooltipPlacement={tooltipPlacement ?? 'left'}\n >\n <FitToScreenIcon />\n </GroupButton>\n );\n};\n\nexport const ToggleSidePanelButton = ({\n className,\n htmlAttributes,\n style,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { sidepanel } = useGraphVisualizationContext();\n if (!sidepanel) {\n throw new Error(\n 'Using the ToggleSidePanelButton requires having a sidepanel',\n );\n }\n const { isSidePanelOpen, setIsSidePanelOpen } = sidepanel;\n return (\n <IconButton\n size=\"small\"\n onClick={() => setIsSidePanelOpen?.(!isSidePanelOpen)}\n isFloating\n description={isSidePanelOpen ? 'Close' : 'Open'}\n isActive={isSidePanelOpen}\n tooltipProps={{\n content: { style: { whiteSpace: 'nowrap' } },\n root: {\n isPortaled: false,\n placement: tooltipPlacement ?? 'bottom',\n shouldCloseOnReferenceClick: true,\n },\n }}\n className={cx('ndl-graph-visualization-toggle-sidepanel', className)}\n style={style}\n htmlAttributes={{\n 'aria-label': 'Toggle node properties panel',\n ...htmlAttributes,\n }}\n >\n <PanelRightIcon className=\"ndl-graph-visualization-toggle-icon\" />\n </IconButton>\n );\n};\n\ntype SearchButtonProps = GraphVisualizationButtonProps & {\n open?: boolean;\n setOpen?: React.Dispatch<React.SetStateAction<boolean>>;\n searchTerm?: string;\n setSearchTerm?: React.Dispatch<React.SetStateAction<string>>;\n onSearch?: (\n nodeIds: string[] | undefined,\n relationshipIds: string[] | undefined,\n ) => void;\n};\n\nexport const SearchButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n open: rawOpen,\n setOpen: rawSetOpen,\n searchTerm: rawSearchTerm,\n setSearchTerm: rawSetSearchTerm,\n onSearch = () => {\n // no-op\n },\n}: SearchButtonProps) => {\n const inputRef = useRef<HTMLInputElement>(null);\n const [isOpen, setIsOpen] = useSemicontrolledState({\n isControlled: rawOpen !== undefined,\n onChange: rawSetOpen,\n state: rawOpen ?? false,\n });\n const [searchTerm, setSearchTerm] = useSemicontrolledState({\n isControlled: rawSearchTerm !== undefined,\n onChange: rawSetSearchTerm,\n state: rawSearchTerm ?? '',\n });\n const { nvlGraph } = useGraphVisualizationContext();\n\n const handleSearchChange = (newValue: string) => {\n setSearchTerm(newValue);\n if (newValue === '') {\n onSearch(undefined, undefined);\n return;\n }\n\n const rawNodes = Object.values(nvlGraph.dataLookupTable.nodes);\n const rawRels = Object.values(nvlGraph.dataLookupTable.relationships);\n\n onSearch(searchNodes(rawNodes, newValue), searchRels(rawRels, newValue));\n };\n\n return (\n <>\n {isOpen ? (\n <TextInput\n ref={inputRef}\n size=\"small\"\n leadingElement={<MagnifyingGlassIconOutline />}\n trailingElement={\n <CleanIconButton\n onClick={() => {\n handleSearchChange('');\n inputRef.current?.focus();\n }}\n description=\"Clear search\"\n >\n <XMarkIconOutline />\n </CleanIconButton>\n }\n placeholder=\"Search...\"\n value={searchTerm}\n onChange={(e) => handleSearchChange(e.target.value)}\n htmlAttributes={{\n autoFocus: true,\n onBlur: () => {\n if (searchTerm === '') {\n setIsOpen(false);\n }\n },\n }}\n />\n ) : (\n <IconButton\n size=\"small\"\n isFloating\n onClick={() => setIsOpen((o) => !o)}\n description=\"Search\"\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n tooltipProps={{\n root: { placement: tooltipPlacement ?? 'bottom' },\n }}\n >\n <MagnifyingGlassIconOutline />\n </IconButton>\n )}\n </>\n );\n};\n\nexport const DownloadButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { nvlInstance } = useGraphVisualizationContext();\n\n const [isDownloadMenuOpen, setOpen] = useState(false);\n const closeFileMenu = () => setOpen(false);\n const downloadButtonRef = useRef<HTMLButtonElement>(null);\n return (\n <>\n <IconButton\n ref={downloadButtonRef}\n size=\"small\"\n isFloating\n onClick={() => setOpen((o) => !o)}\n description=\"Download\"\n tooltipProps={{\n root: { placement: tooltipPlacement ?? 'bottom' },\n }}\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n >\n <ArrowDownTrayIconOutline />\n </IconButton>\n\n <Menu\n isOpen={isDownloadMenuOpen}\n onClose={closeFileMenu}\n anchorRef={downloadButtonRef}\n >\n <Menu.Items>\n <Menu.Item\n title=\"Download as PNG\"\n onClick={() => {\n nvlInstance.current?.saveToFile({});\n closeFileMenu();\n }}\n />\n </Menu.Items>\n </Menu>\n </>\n );\n};\n"]}
1
+ {"version":3,"file":"graph-visualization-buttons.js","sourceRoot":"","sources":["../../src/graph-visualization-buttons.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,eAAe,EACf,UAAU,EACV,IAAI,EACJ,SAAS,GAEV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,SAAS,EACT,0BAA0B,EAC1B,+BAA+B,EAC/B,8BAA8B,EAC9B,cAAc,EACd,UAAU,EACV,cAAc,EACd,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAEL,WAAW,EACX,SAAS,EACT,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,4BAA4B,GAC7B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAmClD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAoC,EAAE,EAAE;IAClE,MAAM,EACJ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,WAAW,EACX,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,SA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CAAC;4BACpC,aAAa,EAAE,CAAC;wBAClB,CAAC,GACD,GACS,GACR,IACN,CACJ,CAAC;AACJ,CAAC,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\nimport {\n CleanIconButton,\n IconButton,\n Menu,\n TextInput,\n type Tooltip,\n} from '@neo4j-ndl/react';\nimport {\n ArrowDownTrayIconOutline,\n FitToScreenIcon,\n LassoIcon,\n MagnifyingGlassIconOutline,\n MagnifyingGlassMinusIconOutline,\n MagnifyingGlassPlusIconOutline,\n PanelRightIcon,\n SelectIcon,\n SquareDashIcon,\n XMarkIconOutline,\n} from '@neo4j-ndl/react/icons';\nimport { default as cx } from 'classnames';\nimport {\n type PropsWithChildren,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport {\n type Gesture,\n useGraphVisualizationContext,\n} from './graph-visualization-context';\nimport { useSemicontrolledState } from './use-semi-controlled-state';\nimport { searchNodes, searchRels } from './utils';\n\ntype GraphVisualizationButtonProps = {\n tooltipPlacement?: React.ComponentProps<typeof Tooltip>['placement'];\n className?: string;\n /**\n * Additional css styling. Will be applied to the root element.\n */\n style?: React.CSSProperties;\n\n /**\n * Html attributes to apply to the root element. This will override any default html attributes, use with caution.\n */\n htmlAttributes?: React.ComponentPropsWithRef<\n typeof CleanIconButton\n >['htmlAttributes'];\n\n /**\n * A ref to apply to the root element.\n */\n ref?: React.ComponentPropsWithRef<'button'>['ref'];\n};\n\ntype BaseProperties = GraphVisualizationButtonProps & {\n description: string;\n testid?: string;\n ariaLabel?: string;\n isActive?: boolean;\n isDisabled?: boolean;\n onClick?: () => void;\n onMouseDown?: () => void;\n};\n\nexport type GraphVisualizationGroupButton = PropsWithChildren<BaseProperties>;\n\nexport const GroupButton = (props: GraphVisualizationGroupButton) => {\n const {\n isActive,\n ariaLabel,\n isDisabled,\n description,\n onClick,\n onMouseDown,\n tooltipPlacement,\n className,\n style,\n htmlAttributes,\n children,\n } = props;\n return (\n <CleanIconButton\n description={description ?? ariaLabel}\n tooltipProps={{\n content: { style: { whiteSpace: 'nowrap' } },\n root: { isPortaled: false, placement: tooltipPlacement },\n }}\n size=\"small\"\n className={className}\n style={style}\n isActive={isActive}\n isDisabled={isDisabled}\n onClick={onClick}\n htmlAttributes={{\n onMouseDown,\n ...htmlAttributes,\n }}\n >\n {children}\n </CleanIconButton>\n );\n};\n\nconst targetIsTextInput = (target: EventTarget | null): boolean => {\n if (!(target instanceof HTMLElement)) {\n return false;\n }\n return (\n target.isContentEditable || ['INPUT', 'TEXTAREA'].includes(target.tagName)\n );\n};\n\nconst isEditingText = (e: KeyboardEvent): boolean => {\n return targetIsTextInput(e.target);\n};\n\nconst GESTURE_KEYS: Record<Gesture, string> = {\n box: 'B',\n lasso: 'L',\n single: 'S',\n};\n\nconst useRegisterKeyboardGestureSwitcher = (gesture: Gesture) => {\n const { setGesture } = useGraphVisualizationContext();\n const handleKeyDown = useCallback(\n (evt: KeyboardEvent) => {\n if (!isEditingText(evt) && setGesture !== undefined) {\n const upperKey = evt.key.toUpperCase();\n if (upperKey === GESTURE_KEYS[gesture]) {\n setGesture(gesture);\n }\n }\n },\n [gesture, setGesture],\n );\n\n useEffect(() => {\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleKeyDown]);\n};\n\nconst NON_BREAKING_SPACE = '\\u00A0';\n\nexport const SingleSelectButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { gesture, setGesture, interactionMode } =\n useGraphVisualizationContext();\n useRegisterKeyboardGestureSwitcher('single');\n\n return (\n <GroupButton\n isActive={gesture === 'single'}\n isDisabled={interactionMode !== 'select'}\n ariaLabel=\"Individual Select Button\"\n description={`Individual Select ${NON_BREAKING_SPACE} ${GESTURE_KEYS.single}`}\n onClick={() => {\n setGesture?.('single');\n }}\n tooltipPlacement={tooltipPlacement ?? 'right'}\n htmlAttributes={{\n 'data-testid': 'gesture-individual-select',\n ...htmlAttributes,\n }}\n className={className}\n style={style}\n >\n <SelectIcon aria-label=\"Individual Select\" />\n </GroupButton>\n );\n};\n\nexport const BoxSelectButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { gesture, setGesture, interactionMode } =\n useGraphVisualizationContext();\n useRegisterKeyboardGestureSwitcher('box');\n\n return (\n <GroupButton\n isDisabled={interactionMode !== 'select' || setGesture === undefined}\n isActive={gesture === 'box'}\n ariaLabel=\"Box Select Button\"\n description={`Box Select ${NON_BREAKING_SPACE} ${GESTURE_KEYS.box}`}\n onClick={() => {\n setGesture?.('box');\n }}\n tooltipPlacement={tooltipPlacement ?? 'right'}\n htmlAttributes={{\n 'data-testid': 'gesture-box-select',\n ...htmlAttributes,\n }}\n className={className}\n style={style}\n >\n <SquareDashIcon aria-label=\"Box select\" />\n </GroupButton>\n );\n};\n\nexport const LassoSelectButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { gesture, setGesture, interactionMode } =\n useGraphVisualizationContext();\n useRegisterKeyboardGestureSwitcher('lasso');\n\n return (\n <GroupButton\n isDisabled={interactionMode !== 'select' || setGesture === undefined}\n isActive={gesture === 'lasso'}\n ariaLabel=\"Lasso Select Button\"\n description={`Lasso Select ${NON_BREAKING_SPACE} ${GESTURE_KEYS.lasso}`}\n onClick={() => {\n setGesture?.('lasso');\n }}\n tooltipPlacement={tooltipPlacement ?? 'right'}\n htmlAttributes={{\n 'data-testid': 'gesture-lasso-select',\n ...htmlAttributes,\n }}\n className={className}\n style={style}\n >\n <LassoIcon aria-label=\"Lasso select\" />\n </GroupButton>\n );\n};\n\nexport const ZoomInButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { nvlInstance } = useGraphVisualizationContext();\n\n const handleZoomIn = useCallback(() => {\n nvlInstance.current?.setZoom(nvlInstance.current?.getScale() * 1.3);\n }, [nvlInstance]);\n\n return (\n <GroupButton\n onClick={handleZoomIn}\n description=\"Zoom in\"\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n tooltipPlacement={tooltipPlacement ?? 'left'}\n >\n <MagnifyingGlassPlusIconOutline />\n </GroupButton>\n );\n};\n\nexport const ZoomOutButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { nvlInstance } = useGraphVisualizationContext();\n\n const handleZoomOut = useCallback(() => {\n nvlInstance.current?.setZoom(nvlInstance.current?.getScale() * 0.7);\n }, [nvlInstance]);\n\n return (\n <GroupButton\n onClick={handleZoomOut}\n description=\"Zoom out\"\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n tooltipPlacement={tooltipPlacement ?? 'left'}\n >\n <MagnifyingGlassMinusIconOutline />\n </GroupButton>\n );\n};\n\nexport const ZoomToFitButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { nvlInstance } = useGraphVisualizationContext();\n\n const getNodesToFit = useCallback(() => {\n const instance = nvlInstance.current;\n if (!instance) {\n return [];\n }\n\n const selectedNodes = instance.getSelectedNodes();\n const selectedRels = instance.getSelectedRelationships();\n const nodeIds = new Set<string>();\n\n if (selectedNodes.length || selectedRels.length) {\n selectedNodes.forEach((n) => nodeIds.add(n.id));\n selectedRels.forEach((r) => nodeIds.add(r.from).add(r.to));\n return [...nodeIds];\n }\n\n const allNodes = instance.getNodes();\n const allRels = instance.getRelationships();\n\n allNodes.forEach((n) => n.disabled !== true && nodeIds.add(n.id));\n allRels.forEach(\n (r) => r.disabled !== true && nodeIds.add(r.from).add(r.to),\n );\n\n if (nodeIds.size > 0) {\n return [...nodeIds];\n }\n\n return allNodes.map((node) => node.id);\n }, [nvlInstance]);\n\n const handleZoomToFit = useCallback(() => {\n nvlInstance.current?.fit(getNodesToFit());\n }, [getNodesToFit, nvlInstance]);\n\n return (\n <GroupButton\n onClick={handleZoomToFit}\n description=\"Zoom to fit\"\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n tooltipPlacement={tooltipPlacement ?? 'left'}\n >\n <FitToScreenIcon />\n </GroupButton>\n );\n};\n\nexport const ToggleSidePanelButton = ({\n className,\n htmlAttributes,\n style,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { sidepanel } = useGraphVisualizationContext();\n if (!sidepanel) {\n throw new Error(\n 'Using the ToggleSidePanelButton requires having a sidepanel',\n );\n }\n const { isSidePanelOpen, setIsSidePanelOpen } = sidepanel;\n return (\n <IconButton\n size=\"small\"\n onClick={() => setIsSidePanelOpen?.(!isSidePanelOpen)}\n isFloating\n description={isSidePanelOpen ? 'Close' : 'Open'}\n isActive={isSidePanelOpen}\n tooltipProps={{\n content: { style: { whiteSpace: 'nowrap' } },\n root: {\n isPortaled: false,\n placement: tooltipPlacement ?? 'bottom',\n shouldCloseOnReferenceClick: true,\n },\n }}\n className={cx('ndl-graph-visualization-toggle-sidepanel', className)}\n style={style}\n htmlAttributes={{\n 'aria-label': 'Toggle node properties panel',\n ...htmlAttributes,\n }}\n >\n <PanelRightIcon className=\"ndl-graph-visualization-toggle-icon\" />\n </IconButton>\n );\n};\n\ntype SearchButtonProps = GraphVisualizationButtonProps & {\n open?: boolean;\n setOpen?: React.Dispatch<React.SetStateAction<boolean>>;\n searchTerm?: string;\n setSearchTerm?: React.Dispatch<React.SetStateAction<string>>;\n onSearch?: (\n nodeIds: string[] | undefined,\n relationshipIds: string[] | undefined,\n ) => void;\n};\n\nexport const SearchButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n open: rawOpen,\n setOpen: rawSetOpen,\n searchTerm: rawSearchTerm,\n setSearchTerm: rawSetSearchTerm,\n onSearch = () => {\n // no-op\n },\n}: SearchButtonProps) => {\n const inputRef = useRef<HTMLInputElement>(null);\n const [isOpen, setIsOpen] = useSemicontrolledState({\n isControlled: rawOpen !== undefined,\n onChange: rawSetOpen,\n state: rawOpen ?? false,\n });\n const [searchTerm, setSearchTerm] = useSemicontrolledState({\n isControlled: rawSearchTerm !== undefined,\n onChange: rawSetSearchTerm,\n state: rawSearchTerm ?? '',\n });\n const { nvlGraph } = useGraphVisualizationContext();\n\n const handleSearchChange = (newValue: string) => {\n setSearchTerm(newValue);\n if (newValue === '') {\n onSearch(undefined, undefined);\n return;\n }\n\n const rawNodes = Object.values(nvlGraph.dataLookupTable.nodes);\n const rawRels = Object.values(nvlGraph.dataLookupTable.relationships);\n\n onSearch(searchNodes(rawNodes, newValue), searchRels(rawRels, newValue));\n };\n\n return (\n <>\n {isOpen ? (\n <TextInput\n ref={inputRef}\n size=\"small\"\n leadingElement={<MagnifyingGlassIconOutline />}\n trailingElement={\n <CleanIconButton\n onClick={() => {\n handleSearchChange('');\n inputRef.current?.focus();\n }}\n description=\"Clear search\"\n >\n <XMarkIconOutline />\n </CleanIconButton>\n }\n placeholder=\"Search...\"\n value={searchTerm}\n onChange={(e) => handleSearchChange(e.target.value)}\n htmlAttributes={{\n autoFocus: true,\n onBlur: () => {\n if (searchTerm === '') {\n setIsOpen(false);\n }\n },\n }}\n />\n ) : (\n <IconButton\n size=\"small\"\n isFloating\n onClick={() => setIsOpen((o) => !o)}\n description=\"Search\"\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n tooltipProps={{\n root: { placement: tooltipPlacement ?? 'bottom' },\n }}\n >\n <MagnifyingGlassIconOutline />\n </IconButton>\n )}\n </>\n );\n};\n\nexport const DownloadButton = ({\n className,\n style,\n htmlAttributes,\n tooltipPlacement,\n}: GraphVisualizationButtonProps) => {\n const { nvlInstance } = useGraphVisualizationContext();\n\n const [isDownloadMenuOpen, setOpen] = useState(false);\n const closeFileMenu = () => setOpen(false);\n const downloadButtonRef = useRef<HTMLButtonElement>(null);\n return (\n <>\n <IconButton\n ref={downloadButtonRef}\n size=\"small\"\n isFloating\n onClick={() => setOpen((o) => !o)}\n description=\"Download\"\n tooltipProps={{\n root: { placement: tooltipPlacement ?? 'bottom' },\n }}\n className={className}\n style={style}\n htmlAttributes={htmlAttributes}\n >\n <ArrowDownTrayIconOutline />\n </IconButton>\n\n <Menu\n isOpen={isDownloadMenuOpen}\n onClose={closeFileMenu}\n anchorRef={downloadButtonRef}\n >\n <Menu.Items>\n <Menu.Item\n title=\"Download as PNG\"\n onClick={() => {\n nvlInstance.current?.saveToFile({});\n closeFileMenu();\n }}\n />\n </Menu.Items>\n </Menu>\n </>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"details-panel.js","sourceRoot":"","sources":["../../../src/sidepanel-components/details-panel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAGL,4BAA4B,GAC7B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AASrD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,SAAS,GAAG,GAAG,EAAoB,EAAE,EAAE;IACpE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,4BAA4B,EAAE,CAAC;IAE9D,MAAM,QAAQ,GAAG,OAAO,CAAC,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,IAAI,EAAC,cAAc,EACnB,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK,EAE9B,EAAE,EAAC,MAAM,EACT,cAAc,EAAE;gCACd,QAAQ,EAAE,CAAC;6BACZ,YAEA,YAAY,CAAC,IAAI,CAAC,IAAI,IANlB,YAAY,CAAC,IAAI,CAAC,IAAI,CAOhB,CACd,GACG,EAEN,cAAK,SAAS,EAAC,qBAAqB,GAAG,EACvC,KAAC,eAAe,IACd,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,UAAU,EACxC,SAAS,EAAE,SAAS,GACpB,IACkC,IACrC,CACJ,CAAC;AACJ,CAAC,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\nimport { ClipboardButton, GraphLabel } from '@neo4j-ndl/react';\nimport { useMemo } from 'react';\n\nimport {\n type NodeData,\n type RelData,\n useGraphVisualizationContext,\n} from '../graph-visualization-context';\nimport { GraphVisualizationSidepanel } from '../graph-visualization-sidepanel';\nimport { PropertiesTable } from './properties-table';\n\ntype DetailPanelProps = {\n paneWidth?: number;\n};\n\ntype SelectedItem =\n | { dataType: 'node'; data: NodeData }\n | { dataType: 'relationship'; data: RelData };\nexport const DetailsPanel = ({ paneWidth = 400 }: DetailPanelProps) => {\n const { selected, nvlGraph } = useGraphVisualizationContext();\n\n const nodeData = useMemo(() => {\n const [nodeId] = selected.nodeIds;\n if (nodeId !== undefined) {\n return nvlGraph.dataLookupTable.nodes[nodeId];\n }\n\n return undefined;\n }, [selected, nvlGraph]);\n\n const relData = useMemo(() => {\n const [relId] = selected.relationshipIds;\n if (relId !== undefined) {\n return nvlGraph.dataLookupTable.relationships[relId];\n }\n\n return undefined;\n }, [selected, nvlGraph]);\n\n const selectedItem = useMemo((): SelectedItem | undefined => {\n if (nodeData) {\n return { data: nodeData, dataType: 'node' };\n }\n\n if (relData) {\n return { data: relData, dataType: 'relationship' };\n }\n\n return undefined;\n }, [nodeData, relData]);\n\n if (selectedItem === undefined) {\n return null;\n }\n\n const properties = [\n {\n key: '<id>',\n type: 'String',\n value: `${selectedItem.data.id}`,\n },\n ...Object.keys(selectedItem.data.properties).map((key) => {\n return {\n key: key,\n type: selectedItem.data.properties[key].type,\n value: selectedItem.data.properties[key].stringified,\n };\n }),\n ];\n\n return (\n <>\n <GraphVisualizationSidepanel.Title>\n <h6 className=\"ndl-details-title\">\n {selectedItem.dataType === 'node'\n ? 'Node details'\n : 'Relationship details'}\n </h6>\n <ClipboardButton\n textToCopy={properties\n .map((prop) => `${prop.key}: ${prop.value}`)\n .join('\\n')}\n size=\"small\"\n />\n </GraphVisualizationSidepanel.Title>\n <GraphVisualizationSidepanel.Content>\n <div className=\"ndl-details-tags\">\n {selectedItem.dataType === 'node' ? (\n selectedItem.data.labelsSorted.map((label) => (\n <GraphLabel\n type=\"node\"\n color={\n nvlGraph.dataLookupTable.labelMetaData[label]\n ?.mostCommonColor ?? ''\n }\n key={label}\n as=\"span\"\n htmlAttributes={{\n tabIndex: 0,\n }}\n >\n {label}\n </GraphLabel>\n ))\n ) : (\n <GraphLabel\n type=\"relationship\"\n color={selectedItem.data.color}\n key={selectedItem.data.type}\n as=\"span\"\n htmlAttributes={{\n tabIndex: 0,\n }}\n >\n {selectedItem.data.type}\n </GraphLabel>\n )}\n </div>\n {/* Divider */}\n <div className=\"ndl-details-divider\" />\n <PropertiesTable\n properties={selectedItem.data.properties}\n paneWidth={paneWidth}\n />\n </GraphVisualizationS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AK,EAAE,CAAC;6BAC3C,IAAI,CAAC,IAAI,CAAC,EACb,IAAI,EAAC,OAAO,GACZ,IACgC,EACpC,MAAC,2BAA2B,CAAC,OAAO,eAClC,cAAK,SAAS,EAAC,kBAAkB,YAC9B,YAAY,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,CAClC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;;4BAAC,OAAA,CAC5C,KAAC,UAAU,IACT,IAAI,EAAC,MAAM,EACX,KAAK,EACH,MAAA,MAAA,QAAQ,CAAC,eAAe,CAAC,aAAa,CAAC,KAAK,CAAC,0CACzC,eAAe,mCAAI,EAAE,EAG3B,EAAE,EAAC,MAAM,EACT,cAAc,EAAE;oCACd,QAAQ,EAAE,CAAC;iCACZ,YAEA,KAAK,IAND,KAAK,CAOC,CACd,CAAA;yBAAA,CAAC,CACH,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IACT,IAAI,EAAC,cAAc,EACnB,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK,EAE9B,EAAE,EAAC,MAAM,EACT,cAAc,EAAE;gCACd,QAAQ,EAAE,CAAC;6BACZ,YAEA,YAAY,CAAC,IAAI,CAAC,IAAI,IANlB,YAAY,CAAC,IAAI,CAAC,IAAI,CAOhB,CACd,GACG,EAEN,cAAK,SAAS,EAAC,qBAAqB,GAAG,EACvC,KAAC,eAAe,IACd,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,UAAU,EACxC,SAAS,EAAE,SAAS,GACpB,IACkC,IACrC,CACJ,CAAC;AACJ,CAAC,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\nimport { ClipboardButton, GraphLabel } from '@neo4j-ndl/react';\nimport { useMemo } from 'react';\n\nimport {\n type NodeData,\n type RelData,\n useGraphVisualizationContext,\n} from '../graph-visualization-context';\nimport { GraphVisualizationSidepanel } from '../graph-visualization-sidepanel';\nimport { PropertiesTable } from './properties-table';\n\ntype DetailPanelProps = {\n paneWidth?: number;\n};\n\ntype SelectedItem =\n | { dataType: 'node'; data: NodeData }\n | { dataType: 'relationship'; data: RelData };\n\nexport const DetailsPanel = ({ paneWidth = 400 }: DetailPanelProps) => {\n const { selected, nvlGraph } = useGraphVisualizationContext();\n\n const nodeData = useMemo(() => {\n const [nodeId] = selected.nodeIds;\n if (nodeId !== undefined) {\n return nvlGraph.dataLookupTable.nodes[nodeId];\n }\n\n return undefined;\n }, [selected, nvlGraph]);\n\n const relData = useMemo(() => {\n const [relId] = selected.relationshipIds;\n if (relId !== undefined) {\n return nvlGraph.dataLookupTable.relationships[relId];\n }\n\n return undefined;\n }, [selected, nvlGraph]);\n\n const selectedItem = useMemo((): SelectedItem | undefined => {\n if (nodeData) {\n return { data: nodeData, dataType: 'node' };\n }\n\n if (relData) {\n return { data: relData, dataType: 'relationship' };\n }\n\n return undefined;\n }, [nodeData, relData]);\n\n if (selectedItem === undefined) {\n return null;\n }\n\n const properties = [\n {\n key: '<id>',\n type: 'String',\n value: `${selectedItem.data.id}`,\n },\n ...Object.keys(selectedItem.data.properties).map((key) => {\n return {\n key: key,\n type: selectedItem.data.properties[key].type,\n value: selectedItem.data.properties[key].stringified,\n };\n }),\n ];\n\n return (\n <>\n <GraphVisualizationSidepanel.Title>\n <h6 className=\"ndl-details-title\">\n {selectedItem.dataType === 'node'\n ? 'Node details'\n : 'Relationship details'}\n </h6>\n <ClipboardButton\n textToCopy={properties\n .map((prop) => `${prop.key}: ${prop.value}`)\n .join('\\n')}\n size=\"small\"\n />\n </GraphVisualizationSidepanel.Title>\n <GraphVisualizationSidepanel.Content>\n <div className=\"ndl-details-tags\">\n {selectedItem.dataType === 'node' ? (\n selectedItem.data.labelsSorted.map((label) => (\n <GraphLabel\n type=\"node\"\n color={\n nvlGraph.dataLookupTable.labelMetaData[label]\n ?.mostCommonColor ?? ''\n }\n key={label}\n as=\"span\"\n htmlAttributes={{\n tabIndex: 0,\n }}\n >\n {label}\n </GraphLabel>\n ))\n ) : (\n <GraphLabel\n type=\"relationship\"\n color={selectedItem.data.color}\n key={selectedItem.data.type}\n as=\"span\"\n htmlAttributes={{\n tabIndex: 0,\n }}\n >\n {selectedItem.data.type}\n </GraphLabel>\n )}\n </div>\n {/* Divider */}\n <div className=\"ndl-details-divider\" />\n <PropertiesTable\n properties={selectedItem.data.properties}\n paneWidth={paneWidth}\n />\n </GraphVisualizationSidepanel.Content>\n </>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"properties-table.js","sourceRoot":"","sources":["../../../src/sidepanel-components/properties-table.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC;AACjC,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AACvC,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AACrC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC;AAMnC,MAAM,eAAe,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAwB,EAAE,EAAE;IACvE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AAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;gBAC/D,OAAO,CACL,eAAe,SAAS,EAAC,oBAAoB,aAC3C,KAAC,UAAU,IAAC,OAAO,EAAC,YAAY,EAAC,SAAS,EAAC,oBAAoB,YAC5D,GAAG,GACO,EACb,cAAK,SAAS,EAAC,sBAAsB,YACnC,KAAC,eAAe,IACd,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,IAAI,GACV,GACE,EACN,cAAK,SAAS,EAAC,iCAAiC,YAC9C,KAAC,eAAe,IACd,UAAU,EAAE,GAAG,GAAG,KAAK,WAAW,EAAE,EACpC,IAAI,EAAC,OAAO,EACZ,YAAY,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GACnD,GACE,KAjBE,GAAG,CAkBP,CACP,CAAC;YACJ,CAAC,CAAC,IACE,CACP,CAAC;AACJ,CAAC,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\nimport { ClipboardButton, Typography } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nimport { type PortableProperty } from '../graph-visualization-context';\nimport { ClickableUrls } from './clickable-urls';\n\nexport const ELLIPSIS = '\\u2026';\nexport const WIDE_VIEW_THRESHOLD = 900;\nexport const MAX_LENGTH_NARROW = 150;\nexport const MAX_LENGTH_WIDE = 300;\ntype ExpandableValueProps = {\n value: string;\n width: number;\n type: string;\n};\nconst ExpandableValue = ({ value, width, type }: ExpandableValueProps) => {\n const [isExpanded, setIsExpanded] = useState(false);\n\n const maxLength =\n width > WIDE_VIEW_THRESHOLD ? MAX_LENGTH_WIDE : MAX_LENGTH_NARROW;\n\n const handleExpandClick = () => {\n setIsExpanded(true);\n };\n\n let valueShown = isExpanded ? value : value.slice(0, maxLength);\n const isValueTrimmed = valueShown.length !== value.length;\n valueShown += isValueTrimmed ? ELLIPSIS : '';\n\n return (\n <>\n {type.startsWith('Array') && '['}\n <ClickableUrls text={valueShown} />\n {isValueTrimmed && (\n <button\n onClick={handleExpandClick}\n className=\"ndl-properties-show-all-button\"\n >\n {' Show all'}\n </button>\n )}\n {type.startsWith('Array') && ']'}\n </>\n );\n};\n\ntype PropertiesTableProps = {\n properties: Record<string, PortableProperty>;\n paneWidth: number;\n};\nexport const PropertiesTable = ({\n properties,\n paneWidth,\n}: PropertiesTableProps) => {\n return (\n <div className=\"ndl-graph-visualization-properties-table\">\n <div className=\"ndl-properties-header\">\n <Typography variant=\"body-small\" className=\"ndl-properties-header-key\">\n Key\n </Typography>\n <Typography variant=\"body-small\">Value</Typography>\n </div>\n {Object.entries(properties).map(([key, { stringified, type }]) => {\n return (\n <div key={key} className=\"ndl-properties-row\">\n <Typography variant=\"body-small\" className=\"ndl-properties-key\">\n {key}\n </Typography>\n <div className=\"ndl-properties-value\">\n <ExpandableValue\n value={stringified}\n width={paneWidth}\n type={type}\n />\n </div>\n <div className=\"ndl-properties-clipboard-button\">\n <ClipboardButton\n textToCopy={`${key}: ${stringified}`}\n size=\"small\"\n tooltipProps={{ placement: 'left', type: 'simple' }}\n />\n </div>\n </div>\n );\n })}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"properties-table.js","sourceRoot":"","sources":["../../../src/sidepanel-components/properties-table.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,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,GAAG,IAC/B,CACJ,CAAC;AACJ,CAAC,CAAC;AAOF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,UAAU,EACV,SAAS,GACY,EAAE,EAAE;IACzB,OAAO,CACL,eAAK,SAAS,EAAC,0CAA0C,aACvD,eAAK,SAAS,EAAC,uBAAuB,aACpC,KAAC,UAAU,IAAC,OAAO,EAAC,YAAY,EAAC,SAAS,EAAC,2BAA2B,oBAEzD,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,YAAY,sBAAmB,IAC/C,EACL,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;gBAC/D,OAAO,CACL,eAAe,SAAS,EAAC,oBAAoB,aAC3C,KAAC,UAAU,IAAC,OAAO,EAAC,YAAY,EAAC,SAAS,EAAC,oBAAoB,YAC5D,GAAG,GACO,EACb,cAAK,SAAS,EAAC,sBAAsB,YACnC,KAAC,eAAe,IACd,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,IAAI,GACV,GACE,EACN,cAAK,SAAS,EAAC,iCAAiC,YAC9C,KAAC,eAAe,IACd,UAAU,EAAE,GAAG,GAAG,KAAK,WAAW,EAAE,EACpC,IAAI,EAAC,OAAO,EACZ,YAAY,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GACnD,GACE,KAjBE,GAAG,CAkBP,CACP,CAAC;YACJ,CAAC,CAAC,IACE,CACP,CAAC;AACJ,CAAC,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\nimport { ClipboardButton, Typography } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nimport { type PortableProperty } from '../graph-visualization-context';\nimport { ClickableUrls } from './clickable-urls';\n\nexport const ELLIPSIS = '\\u2026';\nexport const WIDE_VIEW_THRESHOLD = 900;\nexport const MAX_LENGTH_NARROW = 150;\nexport const MAX_LENGTH_WIDE = 300;\ntype ExpandableValueProps = {\n value: string;\n width: number;\n type: string;\n};\nconst ExpandableValue = ({ value, width, type }: ExpandableValueProps) => {\n const [isExpanded, setIsExpanded] = useState(false);\n\n const maxLength =\n width > WIDE_VIEW_THRESHOLD ? MAX_LENGTH_WIDE : MAX_LENGTH_NARROW;\n\n const handleExpandClick = () => {\n setIsExpanded(true);\n };\n\n let valueShown = isExpanded ? value : value.slice(0, maxLength);\n const isValueTrimmed = valueShown.length !== value.length;\n valueShown += isValueTrimmed ? ELLIPSIS : '';\n\n return (\n <>\n {type.startsWith('Array') && '['}\n <ClickableUrls text={valueShown} />\n {isValueTrimmed && (\n <button\n onClick={handleExpandClick}\n className=\"ndl-properties-show-all-button\"\n >\n {' Show all'}\n </button>\n )}\n {type.startsWith('Array') && ']'}\n </>\n );\n};\n\ntype PropertiesTableProps = {\n properties: Record<string, PortableProperty>;\n paneWidth: number;\n};\n\nexport const PropertiesTable = ({\n properties,\n paneWidth,\n}: PropertiesTableProps) => {\n return (\n <div className=\"ndl-graph-visualization-properties-table\">\n <div className=\"ndl-properties-header\">\n <Typography variant=\"body-small\" className=\"ndl-properties-header-key\">\n Key\n </Typography>\n <Typography variant=\"body-small\">Value</Typography>\n </div>\n {Object.entries(properties).map(([key, { stringified, type }]) => {\n return (\n <div key={key} className=\"ndl-properties-row\">\n <Typography variant=\"body-small\" className=\"ndl-properties-key\">\n {key}\n </Typography>\n <div className=\"ndl-properties-value\">\n <ExpandableValue\n value={stringified}\n width={paneWidth}\n type={type}\n />\n </div>\n <div className=\"ndl-properties-clipboard-button\">\n <ClipboardButton\n textToCopy={`${key}: ${stringified}`}\n size=\"small\"\n tooltipProps={{ placement: 'left', type: 'simple' }}\n />\n </div>\n </div>\n );\n })}\n </div>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"graph-visualization-buttons.d.ts","sourceRoot":"","sources":["../../src/graph-visualization-buttons.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,eAAe,EAIf,KAAK,OAAO,EACb,MAAM,kBAAkB,CAAC;AAc1B,OAAO,EACL,KAAK,iBAAiB,EAKvB,MAAM,OAAO,CAAC;AASf,KAAK,6BAA6B,GAAG;IACnC,gBAAgB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAE5B;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,qBAAqB,CAC1C,OAAO,eAAe,CACvB,CAAC,gBAAgB,CAAC,CAAC;IAEpB;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC;CACpD,CAAC;AAEF,KAAK,cAAc,GAAG,6BAA6B,GAAG;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,E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I,yDAK/B,6BAA6B,4CAyB/B,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,yDAK1B,6BAA6B,4CAmB/B,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,yDAK3B,6BAA6B,4CAmB/B,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,yDAK7B,6BAA6B,4CAkD/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,yDAKnC,6BAA6B,4CAiC/B,CAAC;AAEF,KAAK,iBAAiB,GAAG,6BAA6B,GAAG;IACvD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,QAAQ,CAAC,EAAE,CACT,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,EAC7B,eAAe,EAAE,MAAM,EAAE,GAAG,SAAS,KAClC,IAAI,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,mKAY1B,iBAAiB,4CA2EnB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,yDAK5B,6BAA6B,4CAyC/B,CAAC"}
@@ -117,18 +117,19 @@ export declare namespace GraphVisualization {
117
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
118
  displayName: string;
119
119
  } & {
120
- Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
120
+ Actions: ({ children, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
121
121
  children: React.ReactNode;
122
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", {
123
+ Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, ...restProps }: 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, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
125
125
  children: React.ReactNode;
126
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", {
127
+ Header: ({ children, passThroughProps, typographyVariant, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
128
128
  children: React.ReactNode;
129
129
  passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
130
+ typographyVariant?: import("@neo4j-ndl/react/lib/types/typography").TypographyVariants;
130
131
  }>) => 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
+ Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
132
133
  children: React.ReactNode;
133
134
  hasButtonWrapper?: boolean;
134
135
  }>) => import("react/jsx-runtime").JSX.Element;
@@ -143,18 +144,19 @@ export declare namespace GraphVisualization {
143
144
  ({ 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
145
  displayName: string;
145
146
  } & {
146
- Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
147
+ Actions: ({ children, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
147
148
  children: React.ReactNode;
148
149
  }>) => 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", {
150
+ Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, ...restProps }: 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;
151
+ Content: ({ children, style, htmlAttributes, className, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
151
152
  children: React.ReactNode;
152
153
  }>) => 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
+ Header: ({ children, passThroughProps, typographyVariant, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
154
155
  children: React.ReactNode;
155
156
  passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
157
+ typographyVariant?: import("@neo4j-ndl/react/lib/types/typography").TypographyVariants;
156
158
  }>) => 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", {
159
+ Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
158
160
  children: React.ReactNode;
159
161
  hasButtonWrapper?: boolean;
160
162
  }>) => import("react/jsx-runtime").JSX.Element;
@@ -169,18 +171,19 @@ export declare namespace GraphVisualization {
169
171
  ({ 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
172
  displayName: string;
171
173
  } & {
172
- Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
174
+ Actions: ({ children, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
173
175
  children: React.ReactNode;
174
176
  }>) => 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
+ Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, ...restProps }: 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;
178
+ Content: ({ children, style, htmlAttributes, className, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
177
179
  children: React.ReactNode;
178
180
  }>) => 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", {
181
+ Header: ({ children, passThroughProps, typographyVariant, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
180
182
  children: React.ReactNode;
181
183
  passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
184
+ typographyVariant?: import("@neo4j-ndl/react/lib/types/typography").TypographyVariants;
182
185
  }>) => 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", {
186
+ Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
184
187
  children: React.ReactNode;
185
188
  hasButtonWrapper?: boolean;
186
189
  }>) => import("react/jsx-runtime").JSX.Element;
@@ -195,18 +198,19 @@ export declare namespace GraphVisualization {
195
198
  ({ 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
199
  displayName: string;
197
200
  } & {
198
- Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
201
+ Actions: ({ children, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
199
202
  children: React.ReactNode;
200
203
  }>) => 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", {
204
+ Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, ...restProps }: 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;
205
+ Content: ({ children, style, htmlAttributes, className, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
203
206
  children: React.ReactNode;
204
207
  }>) => 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", {
208
+ Header: ({ children, passThroughProps, typographyVariant, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
206
209
  children: React.ReactNode;
207
210
  passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
211
+ typographyVariant?: import("@neo4j-ndl/react/lib/types/typography").TypographyVariants;
208
212
  }>) => 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", {
213
+ Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
210
214
  children: React.ReactNode;
211
215
  hasButtonWrapper?: boolean;
212
216
  }>) => import("react/jsx-runtime").JSX.Element;
@@ -221,18 +225,19 @@ export declare namespace GraphVisualization {
221
225
  ({ 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
226
  displayName: string;
223
227
  } & {
224
- Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
228
+ Actions: ({ children, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
225
229
  children: React.ReactNode;
226
230
  }>) => 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", {
231
+ Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, ...restProps }: 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;
232
+ Content: ({ children, style, htmlAttributes, className, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
229
233
  children: React.ReactNode;
230
234
  }>) => 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", {
235
+ Header: ({ children, passThroughProps, typographyVariant, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
232
236
  children: React.ReactNode;
233
237
  passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
238
+ typographyVariant?: import("@neo4j-ndl/react/lib/types/typography").TypographyVariants;
234
239
  }>) => 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", {
240
+ Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
236
241
  children: React.ReactNode;
237
242
  hasButtonWrapper?: boolean;
238
243
  }>) => import("react/jsx-runtime").JSX.Element;
@@ -247,18 +252,19 @@ export declare namespace GraphVisualization {
247
252
  ({ 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
253
  displayName: string;
249
254
  } & {
250
- Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
255
+ Actions: ({ children, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
251
256
  children: React.ReactNode;
252
257
  }>) => 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", {
258
+ Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, ...restProps }: 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;
259
+ Content: ({ children, style, htmlAttributes, className, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
255
260
  children: React.ReactNode;
256
261
  }>) => 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", {
262
+ Header: ({ children, passThroughProps, typographyVariant, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
258
263
  children: React.ReactNode;
259
264
  passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
265
+ typographyVariant?: import("@neo4j-ndl/react/lib/types/typography").TypographyVariants;
260
266
  }>) => 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", {
267
+ Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
262
268
  children: React.ReactNode;
263
269
  hasButtonWrapper?: boolean;
264
270
  }>) => import("react/jsx-runtime").JSX.Element;
@@ -273,18 +279,19 @@ export declare namespace GraphVisualization {
273
279
  ({ 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
280
  displayName: string;
275
281
  } & {
276
- Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
282
+ Actions: ({ children, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
277
283
  children: React.ReactNode;
278
284
  }>) => 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", {
285
+ Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, ...restProps }: 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;
286
+ Content: ({ children, style, htmlAttributes, className, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
281
287
  children: React.ReactNode;
282
288
  }>) => 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", {
289
+ Header: ({ children, passThroughProps, typographyVariant, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
284
290
  children: React.ReactNode;
285
291
  passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
292
+ typographyVariant?: import("@neo4j-ndl/react/lib/types/typography").TypographyVariants;
286
293
  }>) => 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", {
294
+ Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
288
295
  children: React.ReactNode;
289
296
  hasButtonWrapper?: boolean;
290
297
  }>) => import("react/jsx-runtime").JSX.Element;
@@ -299,18 +306,19 @@ export declare namespace GraphVisualization {
299
306
  ({ 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
307
  displayName: string;
301
308
  } & {
302
- Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
309
+ Actions: ({ children, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
303
310
  children: React.ReactNode;
304
311
  }>) => 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", {
312
+ Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, ...restProps }: 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;
313
+ Content: ({ children, style, htmlAttributes, className, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
307
314
  children: React.ReactNode;
308
315
  }>) => 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", {
316
+ Header: ({ children, passThroughProps, typographyVariant, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
310
317
  children: React.ReactNode;
311
318
  passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
319
+ typographyVariant?: import("@neo4j-ndl/react/lib/types/typography").TypographyVariants;
312
320
  }>) => 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", {
321
+ Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
314
322
  children: React.ReactNode;
315
323
  hasButtonWrapper?: boolean;
316
324
  }>) => import("react/jsx-runtime").JSX.Element;
@@ -325,18 +333,19 @@ export declare namespace GraphVisualization {
325
333
  ({ 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
334
  displayName: string;
327
335
  } & {
328
- Actions: ({ children, className, style, htmlAttributes, ref, }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
336
+ Actions: ({ children, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
329
337
  children: React.ReactNode;
330
338
  }>) => 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", {
339
+ Body: ({ children, className, style, htmlAttributes, passThroughProps, ref, ...restProps }: 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;
340
+ Content: ({ children, style, htmlAttributes, className, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"div", {
333
341
  children: React.ReactNode;
334
342
  }>) => 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", {
343
+ Header: ({ children, passThroughProps, typographyVariant, className, style, htmlAttributes, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"span", {
336
344
  children: React.ReactNode;
337
345
  passThroughProps?: Partial<React.ComponentPropsWithoutRef<typeof import("@neo4j-ndl/react").Typography>>;
346
+ typographyVariant?: import("@neo4j-ndl/react/lib/types/typography").TypographyVariants;
338
347
  }>) => 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", {
348
+ Trigger: ({ children, hasButtonWrapper, htmlAttributes, className, style, ref, ...restProps }: import("@neo4j-ndl/react/lib/types/_common/types").CommonProps<"button", {
340
349
  children: React.ReactNode;
341
350
  hasButtonWrapper?: boolean;
342
351
  }>) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"graph-visualization.d.ts","sourceRoot":"","sources":["../../src/graph-visualization.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,KAAK,GAAG,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAA8C,MAAM,OAAO,CAAC;AAanE,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,cAAc,EAEnB,KAAK,eAAe,EACpB,KAAK,OAAO,EACZ,KAAK,MAAM,EAEX,KAAK,SAAS,EACf,MAAM,+BAA+B,CAAC;AA4BvC,eAAO,MAAM,mBAAmB;;;;;;CAM/B,CAAC;AAiBF,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,IAAI;IACzE,MAAM,CAAC,EAAE,KAAK,CAAC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"","sources":["../../../src/sidepanel-components/details-panel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAaH,KAAK,gBAAgB,GAAG;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAKF,eAAO,MAAM,YAAY,GAAI,eAAqB,gBAAgB,mDA6GjE,CAAC"}
1
+ {"version":3,"file":"details-panel.d.ts","sourceRoot":"","sources":["../../../src/sidepanel-components/details-panel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAaH,KAAK,gBAAgB,GAAG;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAMF,eAAO,MAAM,YAAY,GAAI,eAAqB,gBAAgB,mDA6GjE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"properties-table.d.ts","sourceRoot":"","sources":["../../../src/sidepanel-components/properties-table.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGvE,eAAO,MAAM,QAAQ,WAAW,CAAC;AACjC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,eAAO,MAAM,eAAe,MAAM,CAAC;AAqCnC,KAAK,oBAAoB,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC7C,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AACF,eAAO,MAAM,eAAe,GAAI,4BAG7B,oBAAoB,4CAkCtB,CAAC"}
1
+ {"version":3,"file":"properties-table.d.ts","sourceRoot":"","sources":["../../../src/sidepanel-components/properties-table.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGvE,eAAO,MAAM,QAAQ,WAAW,CAAC;AACjC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,eAAO,MAAM,eAAe,MAAM,CAAC;AAqCnC,KAAK,oBAAoB,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC7C,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,4BAG7B,oBAAoB,4CAkCtB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-ndl/react-graph",
3
- "version": "1.0.27",
3
+ "version": "1.0.29",
4
4
  "sideEffects": false,
5
5
  "description": "React implementation of the graph visualization from Neo4j Design System",
6
6
  "keywords": [
@@ -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": "^4.1.3",
59
- "@neo4j-ndl/react": "^4.1.5"
58
+ "@neo4j-ndl/base": "^4.1.4",
59
+ "@neo4j-ndl/react": "^4.1.7"
60
60
  },
61
61
  "dependencies": {
62
62
  "classnames": "2.5.1",