@neo4j-ndl/react 3.8.6 → 3.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/graph-visualization/graph-viz-buttons.js +142 -0
- package/lib/cjs/graph-visualization/graph-viz-buttons.js.map +1 -0
- package/lib/cjs/graph-visualization/graph-viz-context.js +62 -0
- package/lib/cjs/graph-visualization/graph-viz-context.js.map +1 -0
- package/lib/cjs/graph-visualization/graph-viz-sidepanel.js +56 -0
- package/lib/cjs/graph-visualization/graph-viz-sidepanel.js.map +1 -0
- package/lib/cjs/graph-visualization/graph-viz.js +289 -0
- package/lib/cjs/graph-visualization/graph-viz.js.map +1 -0
- package/lib/cjs/graph-visualization/index.js +44 -0
- package/lib/cjs/graph-visualization/index.js.map +1 -0
- package/lib/cjs/graph-visualization/map-to-nvl-graph.js +167 -0
- package/lib/cjs/graph-visualization/map-to-nvl-graph.js.map +1 -0
- package/lib/cjs/graph-visualization/sidepanel-components/button-group.js +96 -0
- package/lib/cjs/graph-visualization/sidepanel-components/button-group.js.map +1 -0
- package/lib/cjs/graph-visualization/sidepanel-components/clickable-urls-test.js +214 -0
- package/lib/cjs/graph-visualization/sidepanel-components/clickable-urls-test.js.map +1 -0
- package/lib/cjs/graph-visualization/sidepanel-components/clickable-urls.js +46 -0
- package/lib/cjs/graph-visualization/sidepanel-components/clickable-urls.js.map +1 -0
- package/lib/cjs/graph-visualization/sidepanel-components/details-panel.js +87 -0
- package/lib/cjs/graph-visualization/sidepanel-components/details-panel.js.map +1 -0
- package/lib/cjs/graph-visualization/sidepanel-components/overview-panel.js +45 -0
- package/lib/cjs/graph-visualization/sidepanel-components/overview-panel.js.map +1 -0
- package/lib/cjs/graph-visualization/sidepanel-components/properties-table.js +49 -0
- package/lib/cjs/graph-visualization/sidepanel-components/properties-table.js.map +1 -0
- package/lib/cjs/graph-visualization/sidepanel-components/show-all.js +44 -0
- package/lib/cjs/graph-visualization/sidepanel-components/show-all.js.map +1 -0
- package/lib/cjs/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.js +35 -0
- package/lib/cjs/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.js.map +1 -0
- package/lib/cjs/graph-visualization/stories/graph-viz-barebones.story.js +93 -0
- package/lib/cjs/graph-visualization/stories/graph-viz-barebones.story.js.map +1 -0
- package/lib/cjs/graph-visualization/stories/graph-viz-custom.story.js +74 -0
- package/lib/cjs/graph-visualization/stories/graph-viz-custom.story.js.map +1 -0
- package/lib/cjs/graph-visualization/stories/graph-viz-default.story.js +93 -0
- package/lib/cjs/graph-visualization/stories/graph-viz-default.story.js.map +1 -0
- package/lib/cjs/graph-visualization/stories/graph-viz-maximalist.story.js +106 -0
- package/lib/cjs/graph-visualization/stories/graph-viz-maximalist.story.js.map +1 -0
- package/lib/cjs/graph-visualization/stories/graph-viz.stories.js +85 -0
- package/lib/cjs/graph-visualization/stories/graph-viz.stories.js.map +1 -0
- package/lib/cjs/graph-visualization/stories/index.js +44 -0
- package/lib/cjs/graph-visualization/stories/index.js.map +1 -0
- package/lib/cjs/graph-visualization/stories/story-data.js +89 -0
- package/lib/cjs/graph-visualization/stories/story-data.js.map +1 -0
- package/lib/cjs/graph-visualization/use-managed-selection-state.js +258 -0
- package/lib/cjs/graph-visualization/use-managed-selection-state.js.map +1 -0
- package/lib/cjs/graph-visualization/use-semi-controlled-state.js +38 -0
- package/lib/cjs/graph-visualization/use-semi-controlled-state.js.map +1 -0
- package/lib/cjs/graph-visualization/utils.js +30 -0
- package/lib/cjs/graph-visualization/utils.js.map +1 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/spotlight/Spotlight.js +6 -1
- package/lib/cjs/spotlight/Spotlight.js.map +1 -1
- package/lib/cjs/spotlight/SpotlightTour.js +11 -2
- package/lib/cjs/spotlight/SpotlightTour.js.map +1 -1
- package/lib/esm/graph-visualization/graph-viz-buttons.js +127 -0
- package/lib/esm/graph-visualization/graph-viz-buttons.js.map +1 -0
- package/lib/esm/graph-visualization/graph-viz-context.js +58 -0
- package/lib/esm/graph-visualization/graph-viz-context.js.map +1 -0
- package/lib/esm/graph-visualization/graph-viz-sidepanel.js +52 -0
- package/lib/esm/graph-visualization/graph-viz-sidepanel.js.map +1 -0
- package/lib/esm/graph-visualization/graph-viz.js +259 -0
- package/lib/esm/graph-visualization/graph-viz.js.map +1 -0
- package/lib/esm/graph-visualization/index.js +25 -0
- package/lib/esm/graph-visualization/index.js.map +1 -0
- package/lib/esm/graph-visualization/map-to-nvl-graph.js +162 -0
- package/lib/esm/graph-visualization/map-to-nvl-graph.js.map +1 -0
- package/lib/esm/graph-visualization/sidepanel-components/button-group.js +69 -0
- package/lib/esm/graph-visualization/sidepanel-components/button-group.js.map +1 -0
- package/lib/esm/graph-visualization/sidepanel-components/clickable-urls-test.js +212 -0
- package/lib/esm/graph-visualization/sidepanel-components/clickable-urls-test.js.map +1 -0
- package/lib/esm/graph-visualization/sidepanel-components/clickable-urls.js +40 -0
- package/lib/esm/graph-visualization/sidepanel-components/clickable-urls.js.map +1 -0
- package/lib/esm/graph-visualization/sidepanel-components/details-panel.js +83 -0
- package/lib/esm/graph-visualization/sidepanel-components/details-panel.js.map +1 -0
- package/lib/esm/graph-visualization/sidepanel-components/overview-panel.js +41 -0
- package/lib/esm/graph-visualization/sidepanel-components/overview-panel.js.map +1 -0
- package/lib/esm/graph-visualization/sidepanel-components/properties-table.js +45 -0
- package/lib/esm/graph-visualization/sidepanel-components/properties-table.js.map +1 -0
- package/lib/esm/graph-visualization/sidepanel-components/show-all.js +41 -0
- package/lib/esm/graph-visualization/sidepanel-components/show-all.js.map +1 -0
- package/lib/esm/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.js +31 -0
- package/lib/esm/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.js.map +1 -0
- package/lib/esm/graph-visualization/stories/graph-viz-barebones.story.js +90 -0
- package/lib/esm/graph-visualization/stories/graph-viz-barebones.story.js.map +1 -0
- package/lib/esm/graph-visualization/stories/graph-viz-custom.story.js +71 -0
- package/lib/esm/graph-visualization/stories/graph-viz-custom.story.js.map +1 -0
- package/lib/esm/graph-visualization/stories/graph-viz-default.story.js +90 -0
- package/lib/esm/graph-visualization/stories/graph-viz-default.story.js.map +1 -0
- package/lib/esm/graph-visualization/stories/graph-viz-maximalist.story.js +103 -0
- package/lib/esm/graph-visualization/stories/graph-viz-maximalist.story.js.map +1 -0
- package/lib/esm/graph-visualization/stories/graph-viz.stories.js +82 -0
- package/lib/esm/graph-visualization/stories/graph-viz.stories.js.map +1 -0
- package/lib/esm/graph-visualization/stories/index.js +34 -0
- package/lib/esm/graph-visualization/stories/index.js.map +1 -0
- package/lib/esm/graph-visualization/stories/story-data.js +86 -0
- package/lib/esm/graph-visualization/stories/story-data.js.map +1 -0
- package/lib/esm/graph-visualization/use-managed-selection-state.js +255 -0
- package/lib/esm/graph-visualization/use-managed-selection-state.js.map +1 -0
- package/lib/esm/graph-visualization/use-semi-controlled-state.js +35 -0
- package/lib/esm/graph-visualization/use-semi-controlled-state.js.map +1 -0
- package/lib/esm/graph-visualization/utils.js +25 -0
- package/lib/esm/graph-visualization/utils.js.map +1 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/spotlight/Spotlight.js +6 -1
- package/lib/esm/spotlight/Spotlight.js.map +1 -1
- package/lib/esm/spotlight/SpotlightTour.js +11 -2
- package/lib/esm/spotlight/SpotlightTour.js.map +1 -1
- package/lib/types/graph-visualization/graph-viz-buttons.d.ts +49 -0
- package/lib/types/graph-visualization/graph-viz-context.d.ts +122 -0
- package/lib/types/graph-visualization/graph-viz-sidepanel.d.ts +32 -0
- package/lib/types/graph-visualization/graph-viz.d.ts +149 -0
- package/lib/types/graph-visualization/index.d.ts +24 -0
- package/lib/types/graph-visualization/map-to-nvl-graph.d.ts +37 -0
- package/lib/types/graph-visualization/sidepanel-components/button-group.d.ts +24 -0
- package/lib/types/graph-visualization/sidepanel-components/clickable-urls-test.d.ts +21 -0
- package/lib/types/graph-visualization/sidepanel-components/clickable-urls.d.ts +26 -0
- package/lib/types/graph-visualization/sidepanel-components/details-panel.d.ts +25 -0
- package/lib/types/graph-visualization/sidepanel-components/overview-panel.d.ts +21 -0
- package/lib/types/graph-visualization/sidepanel-components/properties-table.d.ts +31 -0
- package/lib/types/graph-visualization/sidepanel-components/show-all.d.ts +29 -0
- package/lib/types/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.d.ts +21 -0
- package/lib/types/graph-visualization/stories/graph-viz-barebones.story.d.ts +23 -0
- package/lib/types/graph-visualization/stories/graph-viz-custom.story.d.ts +23 -0
- package/lib/types/graph-visualization/stories/graph-viz-default.story.d.ts +23 -0
- package/lib/types/graph-visualization/stories/graph-viz-maximalist.story.d.ts +23 -0
- package/lib/types/graph-visualization/stories/graph-viz.stories.d.ts +36 -0
- package/lib/types/graph-visualization/stories/index.d.ts +28 -0
- package/lib/types/graph-visualization/stories/story-data.d.ts +26 -0
- package/lib/types/graph-visualization/use-managed-selection-state.d.ts +114 -0
- package/lib/types/graph-visualization/use-semi-controlled-state.d.ts +21 -0
- package/lib/types/graph-visualization/utils.d.ts +23 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/spotlight/Spotlight.d.ts +6 -0
- package/lib/types/spotlight/SpotlightTour.d.ts +1 -1
- package/package.json +7 -2
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import { GraphLabel, Typography } from '@neo4j-ndl/react';
|
|
23
|
+
import { useGraphVizContext } from '../graph-viz-context';
|
|
24
|
+
import { GraphVizSidepanel } from '../graph-viz-sidepanel';
|
|
25
|
+
import { ShowAll } from './show-all';
|
|
26
|
+
const OVERVIEW_STEP_SIZE = 25;
|
|
27
|
+
export const OverviewPanel = () => {
|
|
28
|
+
const { nvlGraph } = useGraphVizContext();
|
|
29
|
+
return (_jsxs(_Fragment, { children: [_jsx(GraphVizSidepanel.Title, { children: _jsx(Typography, { variant: "h6", children: "Results overview" }) }), _jsx(GraphVizSidepanel.Content, { children: _jsxs("div", { className: "ndl-graph-viz-overview-panel", children: [nvlGraph.dataLookupTable.labels.length > 0 && (_jsxs("div", { className: "ndl-overview-section", children: [_jsx("div", { className: "ndl-overview-header", children: _jsxs("span", { children: ["Nodes", ` (${nvlGraph.nodes.length.toLocaleString()})`] }) }), _jsx("div", { className: "ndl-overview-items", tabIndex: 0, children: _jsx(ShowAll, { initiallyShown: OVERVIEW_STEP_SIZE, isButtonGroup: true, children: nvlGraph.dataLookupTable.labels.map((label) => function GraphLabelWrapper() {
|
|
30
|
+
var _a, _b, _c, _d;
|
|
31
|
+
return (_jsxs(GraphLabel, { type: "node", htmlAttributes: {
|
|
32
|
+
tabIndex: -1,
|
|
33
|
+
}, color: (_b = (_a = nvlGraph.dataLookupTable.labelMetaData[label]) === null || _a === void 0 ? void 0 : _a.mostCommonColor) !== null && _b !== void 0 ? _b : '', as: "span", children: [label, " (", (_d = (_c = nvlGraph.dataLookupTable.labelMetaData[label]) === null || _c === void 0 ? void 0 : _c.totalCount) !== null && _d !== void 0 ? _d : 0, ")"] }, label));
|
|
34
|
+
}) }) })] })), nvlGraph.dataLookupTable.types.length > 0 && (_jsxs("div", { className: "ndl-overview-relationships-section", children: [_jsxs("span", { className: "ndl-overview-relationships-title", children: ["Relationships", ` (${nvlGraph.rels.length.toLocaleString()})`] }), _jsx("div", { className: "ndl-overview-items", children: _jsx(ShowAll, { initiallyShown: OVERVIEW_STEP_SIZE, isButtonGroup: true, children: nvlGraph.dataLookupTable.types.map((type) => {
|
|
35
|
+
var _a, _b, _c, _d;
|
|
36
|
+
return (_jsxs(GraphLabel, { type: "relationship", htmlAttributes: {
|
|
37
|
+
tabIndex: -1,
|
|
38
|
+
}, color: (_b = (_a = nvlGraph.dataLookupTable.typeMetaData[type]) === null || _a === void 0 ? void 0 : _a.mostCommonColor) !== null && _b !== void 0 ? _b : '', as: "span", children: [type, " (", (_d = (_c = nvlGraph.dataLookupTable.typeMetaData[type]) === null || _c === void 0 ? void 0 : _c.totalCount) !== null && _d !== void 0 ? _d : 0, ")"] }, type));
|
|
39
|
+
}) }) })] }))] }) })] }));
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=overview-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overview-panel.js","sourceRoot":"","sources":["../../../../src/graph-visualization/sidepanel-components/overview-panel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,kBAAkB,GAAG,EAAE,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oC,aACjD,gBAAM,SAAS,EAAC,kCAAkC,8BAClC,KAAK,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,GAAG,IACtD,EACP,cAAK,SAAS,EAAC,oBAAoB,YACjC,KAAC,OAAO,IAAC,cAAc,EAAE,kBAAkB,EAAE,aAAa,kBACvD,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;;4CAAC,OAAA,CAC5C,MAAC,UAAU,IACT,IAAI,EAAC,cAAc,EAEnB,cAAc,EAAE;oDACd,QAAQ,EAAE,CAAC,CAAC;iDACb,EACD,KAAK,EACH,MAAA,MAAA,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,0CACvC,eAAe,mCAAI,EAAE,EAE3B,EAAE,EAAC,MAAM,aAER,IAAI,QACJ,MAAA,MAAA,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,0CACxC,UAAU,mCAAI,CAAC,UAZd,IAAI,CAcE,CACd,CAAA;yCAAA,CAAC,GACM,GACN,IACF,CACP,IACG,GACoB,IAC3B,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import { ClipboardButton, Typography } from '@neo4j-ndl/react';
|
|
23
|
+
import { useState } from 'react';
|
|
24
|
+
import { ClickableUrls } from './clickable-urls';
|
|
25
|
+
export const ELLIPSIS = '\u2026';
|
|
26
|
+
export const WIDE_VIEW_THRESHOLD = 900;
|
|
27
|
+
export const MAX_LENGTH_NARROW = 150;
|
|
28
|
+
export const MAX_LENGTH_WIDE = 300;
|
|
29
|
+
const ExpandableValue = ({ value, width, type }) => {
|
|
30
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
31
|
+
const maxLength = width > WIDE_VIEW_THRESHOLD ? MAX_LENGTH_WIDE : MAX_LENGTH_NARROW;
|
|
32
|
+
const handleExpandClick = () => {
|
|
33
|
+
setIsExpanded(true);
|
|
34
|
+
};
|
|
35
|
+
let valueShown = isExpanded ? value : value.slice(0, maxLength);
|
|
36
|
+
const isValueTrimmed = valueShown.length !== value.length;
|
|
37
|
+
valueShown += isValueTrimmed ? ELLIPSIS : '';
|
|
38
|
+
return (_jsxs(_Fragment, { children: [type.startsWith('Array') && '[', _jsx(ClickableUrls, { text: valueShown }), isValueTrimmed && (_jsx("button", { onClick: handleExpandClick, className: "ndl-properties-show-all-button", children: ' Show all' })), type.startsWith('Array') && ']'] }));
|
|
39
|
+
};
|
|
40
|
+
export const PropertiesTable = ({ properties, paneWidth, }) => {
|
|
41
|
+
return (_jsxs("div", { className: "ndl-graph-viz-properties-table", children: [_jsxs("div", { className: "ndl-properties-header", children: [_jsx(Typography, { variant: "body-small", className: "ndl-properties-header-key", children: "Key" }), _jsx(Typography, { variant: "body-small", children: "Value" })] }), Object.entries(properties).map(([key, { stringified, type }]) => {
|
|
42
|
+
return (_jsxs("div", { className: "ndl-properties-row", children: [_jsx(Typography, { variant: "body-small", className: "ndl-properties-key", children: key }), _jsx("div", { className: "ndl-properties-value", children: _jsx(ExpandableValue, { value: stringified, width: paneWidth, type: type }) }), _jsx("div", { className: "ndl-properties-clipboard-button", children: _jsx(ClipboardButton, { textToCopy: `${key}: ${stringified}`, size: "small", tooltipProps: { placement: 'left', type: 'simple' } }) })] }, key));
|
|
43
|
+
})] }));
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=properties-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"properties-table.js","sourceRoot":"","sources":["../../../../src/graph-visualization/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,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpD,MAAM,SAAS,GACb,KAAK,GAAG,mBAAmB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAEpE,MAAM,iBAAiB,GAAG,GAAG,EAAE;QAC7B,aAAa,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC,CAAC;IAEF,IAAI,UAAU,GA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AAI,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"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import { Button } from '@neo4j-ndl/react';
|
|
23
|
+
import { useState } from 'react';
|
|
24
|
+
import { ButtonGroup } from './button-group';
|
|
25
|
+
const isThunkComponent = (t) => typeof t === 'function';
|
|
26
|
+
export function ShowAll({ initiallyShown, children, isButtonGroup, }) {
|
|
27
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
28
|
+
const toggleExpanded = () => setIsExpanded((e) => !e);
|
|
29
|
+
const itemCount = children.length;
|
|
30
|
+
const shouldHaveControls = itemCount > initiallyShown;
|
|
31
|
+
const shown = isExpanded ? itemCount : initiallyShown;
|
|
32
|
+
const leftToShow = itemCount - shown;
|
|
33
|
+
if (itemCount === 0) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
const currentChildren = children
|
|
37
|
+
.slice(0, shown)
|
|
38
|
+
.map((c) => (isThunkComponent(c) ? c() : c));
|
|
39
|
+
return (_jsxs(_Fragment, { children: [isButtonGroup === true ? (_jsx(ButtonGroup, { children: currentChildren })) : (_jsx("div", { style: { all: 'inherit' }, children: currentChildren })), shouldHaveControls && (_jsx(Button, { fill: "text", size: "small", onClick: toggleExpanded, children: isExpanded ? 'Show less' : `Show all (${leftToShow} more)` }))] }));
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=show-all.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show-all.js","sourceRoot":"","sources":["../../../../src/graph-visualization/sidepanel-components/show-all.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAkB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAS7C,MAAM,gBAAgB,GAAG,CACvB,CAAgC,EACV,EAAE,CAAC,OAAO,CAAC,KAAK,UAAU,CAAC;AAEnD,MAAM,UAAU,OAAO,CAAC,EACtB,cAAc,EACd,QAAQ,EACR,aAAa,GACA;IACb,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtD,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC;IAElC,MAAM,kBAAkB,GAAG,SAAS,GAAG,cAAc,CAAC;IACtD,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC;IACtD,MAAM,UAAU,GAAG,SAAS,GAAG,KAAK,CAAC;IAErC,IAAI,SAAS,KAAK,CAAC,EAAE,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,eAAe,GAAG,QAAQ;SAC7B,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC;SACf,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,OAAO,CACL,8BACG,aAAa,KAAK,IAAI,CAAC,CAAC,CAAC,CACxB,KAAC,WAAW,cAAE,eAAe,GAAe,CAC7C,CAAC,CAAC,CAAC,CACF,cAAK,KAAK,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,YAAG,eAAe,GAAO,CACxD,EACA,kBAAkB,IAAI,CACrB,KAAC,MAAM,IAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,cAAc,YACrD,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,aAAa,UAAU,QAAQ,GACpD,CACV,IACA,CACJ,CAAC;AACJ,CAAC"}
|
package/lib/esm/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import { useMemo } from 'react';
|
|
23
|
+
import { useGraphVizContext } from '../graph-viz-context';
|
|
24
|
+
import { DetailsPanel } from './details-panel';
|
|
25
|
+
import { OverviewPanel } from './overview-panel';
|
|
26
|
+
export const SingleSelectionSidepanelContents = () => {
|
|
27
|
+
const { selected } = useGraphVizContext();
|
|
28
|
+
const hasSelection = useMemo(() => selected.nodeIds.length > 0 || selected.relationshipIds.length > 0, [selected]);
|
|
29
|
+
return hasSelection ? _jsx(DetailsPanel, {}) : _jsx(OverviewPanel, {});
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=single-selection-sidepanel-contents.js.map
|
package/lib/esm/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"single-selection-sidepanel-contents.js","sourceRoot":"","sources":["../../../../src/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,EAAE;IACnD,MAAM,EAAE,QAAQ,EAAE,GAAG,kBAAkB,EAAE,CAAC;IAE1C,MAAM,YAAY,GAAG,OAAO,CAC1B,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,EACxE,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,YAAY,CAAC,CAAC,CAAC,KAAC,YAAY,KAAG,CAAC,CAAC,CAAC,KAAC,aAAa,KAAG,CAAC;AAC7D,CAAC,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import { GraphViz } from '../graph-viz';
|
|
23
|
+
const nodes = [
|
|
24
|
+
{
|
|
25
|
+
id: 'node1',
|
|
26
|
+
labels: ['Pokemon', 'Legendary'],
|
|
27
|
+
properties: {
|
|
28
|
+
durationToWinBattle: {
|
|
29
|
+
stringified: 'P0M0DT0.000000001S',
|
|
30
|
+
type: 'duration',
|
|
31
|
+
},
|
|
32
|
+
favoriteColors: {
|
|
33
|
+
stringified: '["red", "blue", "green"]',
|
|
34
|
+
type: 'list',
|
|
35
|
+
},
|
|
36
|
+
getsBeatBy: {
|
|
37
|
+
stringified: 'null',
|
|
38
|
+
type: 'null',
|
|
39
|
+
},
|
|
40
|
+
isAwesome: {
|
|
41
|
+
stringified: 'true',
|
|
42
|
+
type: 'boolean',
|
|
43
|
+
},
|
|
44
|
+
location: {
|
|
45
|
+
stringified: 'point({srid:1, x:100, y:200, z:300})',
|
|
46
|
+
type: 'point',
|
|
47
|
+
},
|
|
48
|
+
name: {
|
|
49
|
+
stringified: '"Rayquaza"',
|
|
50
|
+
type: 'string',
|
|
51
|
+
},
|
|
52
|
+
weight: {
|
|
53
|
+
stringified: '392.0',
|
|
54
|
+
type: 'float',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'node2',
|
|
60
|
+
labels: ['Type'],
|
|
61
|
+
properties: { name: { stringified: 'Dragon', type: 'String' } },
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: 'node3',
|
|
65
|
+
labels: ['Type'],
|
|
66
|
+
properties: { name: { stringified: 'Flying', type: 'String' } },
|
|
67
|
+
},
|
|
68
|
+
];
|
|
69
|
+
const rels = [
|
|
70
|
+
{
|
|
71
|
+
from: 'node1',
|
|
72
|
+
id: 'rel1',
|
|
73
|
+
properties: {},
|
|
74
|
+
to: 'node2',
|
|
75
|
+
type: 'HAS_TYPE',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
from: 'node1',
|
|
79
|
+
id: 'rel2',
|
|
80
|
+
properties: {},
|
|
81
|
+
to: 'node3',
|
|
82
|
+
type: 'HAS_TYPE',
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
export const containerClasses = 'n-w-full n-border-palette-neutral-border-weak n-mx-2 n-rounded-lg n-border';
|
|
86
|
+
const Component = () => {
|
|
87
|
+
return (_jsx("div", { style: { height: '600px' }, children: _jsx(GraphViz, { bottomLeftIsland: null, bottomRightIsland: null, nodes: nodes, rels: rels, sidepanel: null, topLeftIsland: null, topRightIsland: null, className: containerClasses }) }));
|
|
88
|
+
};
|
|
89
|
+
export default Component;
|
|
90
|
+
//# sourceMappingURL=graph-viz-barebones.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-viz-barebones.story.js","sourceRoot":"","sources":["../../../../src/graph-visualization/stories/graph-viz-barebones.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,MAAM,KAAK,GAAc;IACvB;QACE,EAAE,EAAE,OAAO;QACX,MAAM,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC;QAChC,UAAU,EAAE;YACV,mBAAmB,EAAE;gBACnB,WAAW,EAAE,oBAAoB;gBACjC,IAAI,EAAE,UAAU;aACjB;YACD,cAAc,EAAE;gBACd,WAAW,EAAE,0BAA0B;gBACvC,IAAI,EAAE,MAAM;aACb;YACD,UAAU,EAAE;gBACV,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,MAAM;aACb;YACD,SAAS,EAAE;gBACT,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,SAAS;aAChB;YACD,QAAQ,EAAE;gBACR,WAAW,EAAE,sCAAsC;gBACnD,IAAI,EAAE,OAAO;aACd;YACD,IAAI,EAAE;gBACJ,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,QAAQ;aACf;YACD,MAAM,EAAE;gBACN,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;aACd;SACF;KACF;IACD;QACE,EAAE,EAAE,OAAO;QACX,MAAM,EAAE,CAAC,MAAM,CAAC;Q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
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import { GraphViz } from '../graph-viz';
|
|
23
|
+
const nodes = [
|
|
24
|
+
{
|
|
25
|
+
id: 'node1',
|
|
26
|
+
labels: ['Pokemon', 'Legendary'],
|
|
27
|
+
properties: {},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: 'node2',
|
|
31
|
+
labels: ['Type'],
|
|
32
|
+
properties: { name: { stringified: 'Dragon', type: 'String' } },
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'node3',
|
|
36
|
+
labels: ['Type'],
|
|
37
|
+
properties: { name: { stringified: 'Flying', type: 'String' } },
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
const rels = [
|
|
41
|
+
{
|
|
42
|
+
from: 'node1',
|
|
43
|
+
id: 'rel1',
|
|
44
|
+
properties: {},
|
|
45
|
+
to: 'node2',
|
|
46
|
+
type: 'HAS_TYPE',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
from: 'node1',
|
|
50
|
+
id: 'rel2',
|
|
51
|
+
properties: {},
|
|
52
|
+
to: 'node3',
|
|
53
|
+
type: 'HAS_TYPE',
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
export const containerClasses = 'n-w-full n-border-palette-neutral-border-weak n-mx-2 n-rounded-lg n-border';
|
|
57
|
+
const Component = () => {
|
|
58
|
+
return (_jsx("div", { style: { height: '600px' }, children: _jsx(GraphViz, { bottomLeftIsland: _jsx("div", { children: "\u2199\uFE0F" }), bottomRightIsland: _jsx("div", { children: "\u2198\uFE0F" }), nodes: nodes, rels: rels, sidepanel: {
|
|
59
|
+
children: _jsx("div", { children: "Custom panel contents" }),
|
|
60
|
+
isSidePanelOpen: true,
|
|
61
|
+
onSidePanelResize: () => {
|
|
62
|
+
/* no op */
|
|
63
|
+
},
|
|
64
|
+
setIsSidePanelOpen: () => {
|
|
65
|
+
/* no op */
|
|
66
|
+
},
|
|
67
|
+
sidePanelWidth: 300,
|
|
68
|
+
}, topLeftIsland: _jsx("div", { children: "\u2196\uFE0F" }), topRightIsland: _jsx("div", { children: "\u2197\uFE0F" }), className: containerClasses }) }));
|
|
69
|
+
};
|
|
70
|
+
export default Component;
|
|
71
|
+
//# sourceMappingURL=graph-viz-custom.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-viz-custom.story.js","sourceRoot":"","sources":["../../../../src/graph-visualization/stories/graph-viz-custom.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,MAAM,KAAK,GAAc;IACvB;QACE,EAAE,EAAE,OAAO;QACX,MAAM,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC;QAChC,UAAU,EAAE,EAAE;KACf;IACD;QACE,EAAE,EAAE,OAAO;QACX,MAAM,EAAE,CAAC,MAAM,CAAC;QAChB,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;KAChE;IACD;QACE,EAAE,EAAE,OAAO;QACX,MAAM,EAAE,CAAC,MAAM,CAAC;QAChB,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;KAChE;CACF,CAAC;AAEF,MAAM,IAAI,GAAG;IACX;QACE,IAAI,EAAE,OAAO;QACb,EAAE,EAAE,MAAM;QACV,UAAU,EAAE,EAAE;QACd,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,UAAU;KACjB;IACD;QACE,IAAI,EAAE,OAAO;QACb,EAAE,EAAE,MAAM;QACV,UAAU,EAAE,EAAE;QACd,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,UAAU;KACjB;CACF,CAAC;AACF,MAAM,CAAC,MAAM,gBAAgB,GAC3B,4EAA4E,CAAC;AAE/E,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,KAAC,QAAQ,IACP,gBAAgB,EAAE,yCAAa,EAC/B,iBAAiB,EAAE,yCAAa,EAChC,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,SAAS,EAAE;gBACT,QAAQ,EAAE,kDAAgC;gBAC1C,eAAe,EAAE,IAAI;gBACrB,iBAAiB,EAAE,GAAG,EAAE;oBACtB,WAAW;gBACb,CAAC;gBACD,kBAAkB,EAAE,GAAG,EAAE;oBACvB,WAAW;gBACb,CAAC;gBACD,cAAc,EAAE,GAAG;aACpB,EACD,aAAa,EAAE,yCAAa,EAC5B,cAAc,EAAE,yCAAa,EAC7B,SAAS,EAAE,gBAAgB,GAC3B,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import { GraphViz } from '../graph-viz';
|
|
23
|
+
const nodes = [
|
|
24
|
+
{
|
|
25
|
+
id: 'node1',
|
|
26
|
+
labels: ['Pokemon', 'Legendary'],
|
|
27
|
+
properties: {
|
|
28
|
+
durationToWinBattle: {
|
|
29
|
+
stringified: 'P0M0DT0.000000001S',
|
|
30
|
+
type: 'duration',
|
|
31
|
+
},
|
|
32
|
+
favoriteColors: {
|
|
33
|
+
stringified: '["red", "blue", "green"]',
|
|
34
|
+
type: 'list',
|
|
35
|
+
},
|
|
36
|
+
getsBeatBy: {
|
|
37
|
+
stringified: 'null',
|
|
38
|
+
type: 'null',
|
|
39
|
+
},
|
|
40
|
+
isAwesome: {
|
|
41
|
+
stringified: 'true',
|
|
42
|
+
type: 'boolean',
|
|
43
|
+
},
|
|
44
|
+
location: {
|
|
45
|
+
stringified: 'point({srid:1, x:100, y:200, z:300})',
|
|
46
|
+
type: 'point',
|
|
47
|
+
},
|
|
48
|
+
name: {
|
|
49
|
+
stringified: '"Rayquaza"',
|
|
50
|
+
type: 'string',
|
|
51
|
+
},
|
|
52
|
+
weight: {
|
|
53
|
+
stringified: '392.0',
|
|
54
|
+
type: 'float',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'node2',
|
|
60
|
+
labels: ['Type'],
|
|
61
|
+
properties: { name: { stringified: 'Dragon', type: 'String' } },
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: 'node3',
|
|
65
|
+
labels: ['Type'],
|
|
66
|
+
properties: { name: { stringified: 'Flying', type: 'String' } },
|
|
67
|
+
},
|
|
68
|
+
];
|
|
69
|
+
const rels = [
|
|
70
|
+
{
|
|
71
|
+
from: 'node1',
|
|
72
|
+
id: 'rel1',
|
|
73
|
+
properties: {},
|
|
74
|
+
to: 'node2',
|
|
75
|
+
type: 'HAS_TYPE',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
from: 'node1',
|
|
79
|
+
id: 'rel2',
|
|
80
|
+
properties: {},
|
|
81
|
+
to: 'node3',
|
|
82
|
+
type: 'HAS_TYPE',
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
export const containerClasses = 'n-w-full n-border-palette-neutral-border-weak n-mx-2 n-rounded-lg n-border';
|
|
86
|
+
const Component = () => {
|
|
87
|
+
return (_jsx("div", { style: { height: '600px' }, children: _jsx(GraphViz, { nodes: nodes, rels: rels, className: containerClasses }) }));
|
|
88
|
+
};
|
|
89
|
+
export default Component;
|
|
90
|
+
//# sourceMappingURL=graph-viz-default.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-viz-default.story.js","sourceRoot":"","sources":["../../../../src/graph-visualization/stories/graph-viz-default.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,MAAM,KAAK,GAAc;IACvB;QACE,EAAE,EAAE,OAAO;QACX,MAAM,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC;QAChC,UAAU,EAAE;YACV,mBAAmB,EAAE;gBACnB,WAAW,EAAE,oBAAoB;gBACjC,IAAI,EAAE,UAAU;aACjB;YACD,cAAc,EAAE;gBACd,WAAW,EAAE,0BAA0B;gBACvC,IA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I,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,GAAI,GAC/D,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import { IconButtonArray } from '@neo4j-ndl/react';
|
|
23
|
+
import { useState } from 'react';
|
|
24
|
+
import { GraphViz } from '../graph-viz';
|
|
25
|
+
import { SingleSelectionSidepanelContents } from '../sidepanel-components/single-selection-sidepanel-contents';
|
|
26
|
+
const nodes = [
|
|
27
|
+
{
|
|
28
|
+
id: 'node1',
|
|
29
|
+
labels: ['Pokemon', 'Legendary'],
|
|
30
|
+
properties: {
|
|
31
|
+
durationToWinBattle: {
|
|
32
|
+
stringified: 'P0M0DT0.000000001S',
|
|
33
|
+
type: 'duration',
|
|
34
|
+
},
|
|
35
|
+
favoriteColors: {
|
|
36
|
+
stringified: '["red", "blue", "green"]',
|
|
37
|
+
type: 'list',
|
|
38
|
+
},
|
|
39
|
+
getsBeatBy: {
|
|
40
|
+
stringified: 'null',
|
|
41
|
+
type: 'null',
|
|
42
|
+
},
|
|
43
|
+
isAwesome: {
|
|
44
|
+
stringified: 'true',
|
|
45
|
+
type: 'boolean',
|
|
46
|
+
},
|
|
47
|
+
location: {
|
|
48
|
+
stringified: 'point({srid:1, x:100, y:200, z:300})',
|
|
49
|
+
type: 'point',
|
|
50
|
+
},
|
|
51
|
+
name: {
|
|
52
|
+
stringified: '"Rayquaza"',
|
|
53
|
+
type: 'string',
|
|
54
|
+
},
|
|
55
|
+
weight: {
|
|
56
|
+
stringified: '392.0',
|
|
57
|
+
type: 'float',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: 'node2',
|
|
63
|
+
labels: ['Type'],
|
|
64
|
+
properties: { name: { stringified: 'Dragon', type: 'String' } },
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: 'node3',
|
|
68
|
+
labels: ['Type'],
|
|
69
|
+
properties: { name: { stringified: 'Flying', type: 'String' } },
|
|
70
|
+
},
|
|
71
|
+
];
|
|
72
|
+
const rels = [
|
|
73
|
+
{
|
|
74
|
+
from: 'node1',
|
|
75
|
+
id: 'rel1',
|
|
76
|
+
properties: {},
|
|
77
|
+
to: 'node2',
|
|
78
|
+
type: 'HAS_TYPE',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
from: 'node1',
|
|
82
|
+
id: 'rel2',
|
|
83
|
+
properties: {},
|
|
84
|
+
to: 'node3',
|
|
85
|
+
type: 'HAS_TYPE',
|
|
86
|
+
},
|
|
87
|
+
];
|
|
88
|
+
export const containerClasses = 'n-w-full n-border-palette-neutral-border-weak n-mx-2 n-rounded-lg n-border';
|
|
89
|
+
const Component = () => {
|
|
90
|
+
const [isOpen, setIsOpen] = useState(true);
|
|
91
|
+
const [gesture, setGesture] = useState('box');
|
|
92
|
+
return (_jsx("div", { style: { height: '600px' }, children: _jsx(GraphViz, { gesture: gesture, setGesture: setGesture, bottomLeftIsland: _jsxs(IconButtonArray, { children: [_jsx(GraphViz.LassoSelectButton, {}), _jsx(GraphViz.SingleSelectButton, {}), _jsx(GraphViz.BoxSelectButton, {})] }), bottomRightIsland: _jsxs(IconButtonArray, { children: [_jsx(GraphViz.ZoomInButton, {}), _jsx(GraphViz.ZoomOutButton, {}), _jsx(GraphViz.ZoomToFitButton, {})] }), nodes: nodes, rels: rels, sidepanel: {
|
|
93
|
+
children: _jsx(SingleSelectionSidepanelContents, {}),
|
|
94
|
+
isSidePanelOpen: isOpen,
|
|
95
|
+
onSidePanelResize: () => {
|
|
96
|
+
/* no op */
|
|
97
|
+
},
|
|
98
|
+
setIsSidePanelOpen: setIsOpen,
|
|
99
|
+
sidePanelWidth: 300,
|
|
100
|
+
}, topLeftIsland: _jsx(GraphViz.DownloadButton, {}), topRightIsland: _jsx(GraphViz.ToggleSidePanelButton, {}), className: containerClasses }) }));
|
|
101
|
+
};
|
|
102
|
+
export default Component;
|
|
103
|
+
//# sourceMappingURL=graph-viz-maximalist.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-viz-maximalist.story.js","sourceRoot":"","sources":["../../../../src/graph-visualization/stories/graph-viz-maximalist.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,gCAAgC,EAAE,MAAM,6DAA6D,CAAC;AAE/G,MAAM,KAAK,GAAc;IACvB;QACE,EAAE,EAAE,OAAO;QACX,MAAM,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC;QAChC,UAAU,EAAE;YACV,mBAAmB,EAAE;gBACnB,WAAW,EAAE,oBAAoB;gBACjC,IA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|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import { GraphVizBarebones, GraphVizBarebonesSrc, GraphVizCustom, GraphVizCustomSrc, GraphVizDefault, GraphVizDefaultSrc, GraphVizMaximalist, GraphVizMaximalistSrc, } from '.';
|
|
22
|
+
const componentMeta = {
|
|
23
|
+
parameters: {
|
|
24
|
+
controls: { disable: true },
|
|
25
|
+
},
|
|
26
|
+
tags: ['docsPage'],
|
|
27
|
+
title: 'Components/Next/GraphVisualization',
|
|
28
|
+
};
|
|
29
|
+
export default componentMeta;
|
|
30
|
+
export const Default = {
|
|
31
|
+
args: {},
|
|
32
|
+
parameters: {
|
|
33
|
+
docs: {
|
|
34
|
+
source: {
|
|
35
|
+
code: GraphVizDefaultSrc,
|
|
36
|
+
language: 'tsx',
|
|
37
|
+
type: 'code',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
render: GraphVizDefault,
|
|
42
|
+
};
|
|
43
|
+
export const Barebones = {
|
|
44
|
+
args: {},
|
|
45
|
+
parameters: {
|
|
46
|
+
docs: {
|
|
47
|
+
source: {
|
|
48
|
+
code: GraphVizBarebonesSrc,
|
|
49
|
+
language: 'tsx',
|
|
50
|
+
type: 'code',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
render: GraphVizBarebones,
|
|
55
|
+
};
|
|
56
|
+
export const Maximalist = {
|
|
57
|
+
args: {},
|
|
58
|
+
parameters: {
|
|
59
|
+
docs: {
|
|
60
|
+
source: {
|
|
61
|
+
code: GraphVizMaximalistSrc,
|
|
62
|
+
language: 'tsx',
|
|
63
|
+
type: 'code',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
render: GraphVizMaximalist,
|
|
68
|
+
};
|
|
69
|
+
export const CustomIslands = {
|
|
70
|
+
args: {},
|
|
71
|
+
parameters: {
|
|
72
|
+
docs: {
|
|
73
|
+
source: {
|
|
74
|
+
code: GraphVizCustomSrc,
|
|
75
|
+
language: 'tsx',
|
|
76
|
+
type: 'code',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
render: GraphVizCustom,
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=graph-viz.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-viz.stories.js","sourceRoot":"","sources":["../../../../src/graph-visualization/stories/graph-viz.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,oCAAoC;CAC5C,CAAC;AAEF,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,kBAAkB;gBACxB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IAC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