@neo4j-ndl/react 3.8.7 → 3.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/lib/cjs/graph-visualization/graph-viz-buttons.js +142 -0
  2. package/lib/cjs/graph-visualization/graph-viz-buttons.js.map +1 -0
  3. package/lib/cjs/graph-visualization/graph-viz-context.js +62 -0
  4. package/lib/cjs/graph-visualization/graph-viz-context.js.map +1 -0
  5. package/lib/cjs/graph-visualization/graph-viz-sidepanel.js +56 -0
  6. package/lib/cjs/graph-visualization/graph-viz-sidepanel.js.map +1 -0
  7. package/lib/cjs/graph-visualization/graph-viz.js +289 -0
  8. package/lib/cjs/graph-visualization/graph-viz.js.map +1 -0
  9. package/lib/cjs/graph-visualization/index.js +44 -0
  10. package/lib/cjs/graph-visualization/index.js.map +1 -0
  11. package/lib/cjs/graph-visualization/map-to-nvl-graph.js +167 -0
  12. package/lib/cjs/graph-visualization/map-to-nvl-graph.js.map +1 -0
  13. package/lib/cjs/graph-visualization/sidepanel-components/button-group.js +96 -0
  14. package/lib/cjs/graph-visualization/sidepanel-components/button-group.js.map +1 -0
  15. package/lib/cjs/graph-visualization/sidepanel-components/clickable-urls-test.js +214 -0
  16. package/lib/cjs/graph-visualization/sidepanel-components/clickable-urls-test.js.map +1 -0
  17. package/lib/cjs/graph-visualization/sidepanel-components/clickable-urls.js +46 -0
  18. package/lib/cjs/graph-visualization/sidepanel-components/clickable-urls.js.map +1 -0
  19. package/lib/cjs/graph-visualization/sidepanel-components/details-panel.js +87 -0
  20. package/lib/cjs/graph-visualization/sidepanel-components/details-panel.js.map +1 -0
  21. package/lib/cjs/graph-visualization/sidepanel-components/overview-panel.js +45 -0
  22. package/lib/cjs/graph-visualization/sidepanel-components/overview-panel.js.map +1 -0
  23. package/lib/cjs/graph-visualization/sidepanel-components/properties-table.js +49 -0
  24. package/lib/cjs/graph-visualization/sidepanel-components/properties-table.js.map +1 -0
  25. package/lib/cjs/graph-visualization/sidepanel-components/show-all.js +44 -0
  26. package/lib/cjs/graph-visualization/sidepanel-components/show-all.js.map +1 -0
  27. package/lib/cjs/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.js +35 -0
  28. package/lib/cjs/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.js.map +1 -0
  29. package/lib/cjs/graph-visualization/stories/graph-viz-barebones.story.js +93 -0
  30. package/lib/cjs/graph-visualization/stories/graph-viz-barebones.story.js.map +1 -0
  31. package/lib/cjs/graph-visualization/stories/graph-viz-custom.story.js +74 -0
  32. package/lib/cjs/graph-visualization/stories/graph-viz-custom.story.js.map +1 -0
  33. package/lib/cjs/graph-visualization/stories/graph-viz-default.story.js +93 -0
  34. package/lib/cjs/graph-visualization/stories/graph-viz-default.story.js.map +1 -0
  35. package/lib/cjs/graph-visualization/stories/graph-viz-maximalist.story.js +106 -0
  36. package/lib/cjs/graph-visualization/stories/graph-viz-maximalist.story.js.map +1 -0
  37. package/lib/cjs/graph-visualization/stories/graph-viz.stories.js +85 -0
  38. package/lib/cjs/graph-visualization/stories/graph-viz.stories.js.map +1 -0
  39. package/lib/cjs/graph-visualization/stories/index.js +44 -0
  40. package/lib/cjs/graph-visualization/stories/index.js.map +1 -0
  41. package/lib/cjs/graph-visualization/stories/story-data.js +89 -0
  42. package/lib/cjs/graph-visualization/stories/story-data.js.map +1 -0
  43. package/lib/cjs/graph-visualization/use-managed-selection-state.js +258 -0
  44. package/lib/cjs/graph-visualization/use-managed-selection-state.js.map +1 -0
  45. package/lib/cjs/graph-visualization/use-semi-controlled-state.js +38 -0
  46. package/lib/cjs/graph-visualization/use-semi-controlled-state.js.map +1 -0
  47. package/lib/cjs/graph-visualization/utils.js +30 -0
  48. package/lib/cjs/graph-visualization/utils.js.map +1 -0
  49. package/lib/cjs/index.js +1 -0
  50. package/lib/cjs/index.js.map +1 -1
  51. package/lib/esm/graph-visualization/graph-viz-buttons.js +127 -0
  52. package/lib/esm/graph-visualization/graph-viz-buttons.js.map +1 -0
  53. package/lib/esm/graph-visualization/graph-viz-context.js +58 -0
  54. package/lib/esm/graph-visualization/graph-viz-context.js.map +1 -0
  55. package/lib/esm/graph-visualization/graph-viz-sidepanel.js +52 -0
  56. package/lib/esm/graph-visualization/graph-viz-sidepanel.js.map +1 -0
  57. package/lib/esm/graph-visualization/graph-viz.js +259 -0
  58. package/lib/esm/graph-visualization/graph-viz.js.map +1 -0
  59. package/lib/esm/graph-visualization/index.js +25 -0
  60. package/lib/esm/graph-visualization/index.js.map +1 -0
  61. package/lib/esm/graph-visualization/map-to-nvl-graph.js +162 -0
  62. package/lib/esm/graph-visualization/map-to-nvl-graph.js.map +1 -0
  63. package/lib/esm/graph-visualization/sidepanel-components/button-group.js +69 -0
  64. package/lib/esm/graph-visualization/sidepanel-components/button-group.js.map +1 -0
  65. package/lib/esm/graph-visualization/sidepanel-components/clickable-urls-test.js +212 -0
  66. package/lib/esm/graph-visualization/sidepanel-components/clickable-urls-test.js.map +1 -0
  67. package/lib/esm/graph-visualization/sidepanel-components/clickable-urls.js +40 -0
  68. package/lib/esm/graph-visualization/sidepanel-components/clickable-urls.js.map +1 -0
  69. package/lib/esm/graph-visualization/sidepanel-components/details-panel.js +83 -0
  70. package/lib/esm/graph-visualization/sidepanel-components/details-panel.js.map +1 -0
  71. package/lib/esm/graph-visualization/sidepanel-components/overview-panel.js +41 -0
  72. package/lib/esm/graph-visualization/sidepanel-components/overview-panel.js.map +1 -0
  73. package/lib/esm/graph-visualization/sidepanel-components/properties-table.js +45 -0
  74. package/lib/esm/graph-visualization/sidepanel-components/properties-table.js.map +1 -0
  75. package/lib/esm/graph-visualization/sidepanel-components/show-all.js +41 -0
  76. package/lib/esm/graph-visualization/sidepanel-components/show-all.js.map +1 -0
  77. package/lib/esm/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.js +31 -0
  78. package/lib/esm/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.js.map +1 -0
  79. package/lib/esm/graph-visualization/stories/graph-viz-barebones.story.js +90 -0
  80. package/lib/esm/graph-visualization/stories/graph-viz-barebones.story.js.map +1 -0
  81. package/lib/esm/graph-visualization/stories/graph-viz-custom.story.js +71 -0
  82. package/lib/esm/graph-visualization/stories/graph-viz-custom.story.js.map +1 -0
  83. package/lib/esm/graph-visualization/stories/graph-viz-default.story.js +90 -0
  84. package/lib/esm/graph-visualization/stories/graph-viz-default.story.js.map +1 -0
  85. package/lib/esm/graph-visualization/stories/graph-viz-maximalist.story.js +103 -0
  86. package/lib/esm/graph-visualization/stories/graph-viz-maximalist.story.js.map +1 -0
  87. package/lib/esm/graph-visualization/stories/graph-viz.stories.js +82 -0
  88. package/lib/esm/graph-visualization/stories/graph-viz.stories.js.map +1 -0
  89. package/lib/esm/graph-visualization/stories/index.js +34 -0
  90. package/lib/esm/graph-visualization/stories/index.js.map +1 -0
  91. package/lib/esm/graph-visualization/stories/story-data.js +86 -0
  92. package/lib/esm/graph-visualization/stories/story-data.js.map +1 -0
  93. package/lib/esm/graph-visualization/use-managed-selection-state.js +255 -0
  94. package/lib/esm/graph-visualization/use-managed-selection-state.js.map +1 -0
  95. package/lib/esm/graph-visualization/use-semi-controlled-state.js +35 -0
  96. package/lib/esm/graph-visualization/use-semi-controlled-state.js.map +1 -0
  97. package/lib/esm/graph-visualization/utils.js +25 -0
  98. package/lib/esm/graph-visualization/utils.js.map +1 -0
  99. package/lib/esm/index.js +1 -0
  100. package/lib/esm/index.js.map +1 -1
  101. package/lib/types/graph-visualization/graph-viz-buttons.d.ts +49 -0
  102. package/lib/types/graph-visualization/graph-viz-context.d.ts +122 -0
  103. package/lib/types/graph-visualization/graph-viz-sidepanel.d.ts +32 -0
  104. package/lib/types/graph-visualization/graph-viz.d.ts +149 -0
  105. package/lib/types/graph-visualization/index.d.ts +24 -0
  106. package/lib/types/graph-visualization/map-to-nvl-graph.d.ts +37 -0
  107. package/lib/types/graph-visualization/sidepanel-components/button-group.d.ts +24 -0
  108. package/lib/types/graph-visualization/sidepanel-components/clickable-urls-test.d.ts +21 -0
  109. package/lib/types/graph-visualization/sidepanel-components/clickable-urls.d.ts +26 -0
  110. package/lib/types/graph-visualization/sidepanel-components/details-panel.d.ts +25 -0
  111. package/lib/types/graph-visualization/sidepanel-components/overview-panel.d.ts +21 -0
  112. package/lib/types/graph-visualization/sidepanel-components/properties-table.d.ts +31 -0
  113. package/lib/types/graph-visualization/sidepanel-components/show-all.d.ts +29 -0
  114. package/lib/types/graph-visualization/sidepanel-components/single-selection-sidepanel-contents.d.ts +21 -0
  115. package/lib/types/graph-visualization/stories/graph-viz-barebones.story.d.ts +23 -0
  116. package/lib/types/graph-visualization/stories/graph-viz-custom.story.d.ts +23 -0
  117. package/lib/types/graph-visualization/stories/graph-viz-default.story.d.ts +23 -0
  118. package/lib/types/graph-visualization/stories/graph-viz-maximalist.story.d.ts +23 -0
  119. package/lib/types/graph-visualization/stories/graph-viz.stories.d.ts +36 -0
  120. package/lib/types/graph-visualization/stories/index.d.ts +28 -0
  121. package/lib/types/graph-visualization/stories/story-data.d.ts +26 -0
  122. package/lib/types/graph-visualization/use-managed-selection-state.d.ts +114 -0
  123. package/lib/types/graph-visualization/use-semi-controlled-state.d.ts +21 -0
  124. package/lib/types/graph-visualization/utils.d.ts +23 -0
  125. package/lib/types/index.d.ts +1 -0
  126. package/package.json +7 -2
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OverviewPanel = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ /**
6
+ *
7
+ * Copyright (c) "Neo4j"
8
+ * Neo4j Sweden AB [http://neo4j.com]
9
+ *
10
+ * This file is part of Neo4j.
11
+ *
12
+ * Neo4j is free software: you can redistribute it and/or modify
13
+ * it under the terms of the GNU General Public License as published by
14
+ * the Free Software Foundation, either version 3 of the License, or
15
+ * (at your option) any later version.
16
+ *
17
+ * This program is distributed in the hope that it will be useful,
18
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ * GNU General Public License for more details.
21
+ *
22
+ * You should have received a copy of the GNU General Public License
23
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+ */
25
+ const react_1 = require("@neo4j-ndl/react");
26
+ const graph_viz_context_1 = require("../graph-viz-context");
27
+ const graph_viz_sidepanel_1 = require("../graph-viz-sidepanel");
28
+ const show_all_1 = require("./show-all");
29
+ const OVERVIEW_STEP_SIZE = 25;
30
+ const OverviewPanel = () => {
31
+ const { nvlGraph } = (0, graph_viz_context_1.useGraphVizContext)();
32
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(graph_viz_sidepanel_1.GraphVizSidepanel.Title, { children: (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "h6", children: "Results overview" }) }), (0, jsx_runtime_1.jsx)(graph_viz_sidepanel_1.GraphVizSidepanel.Content, { children: (0, jsx_runtime_1.jsxs)("div", { className: "ndl-graph-viz-overview-panel", children: [nvlGraph.dataLookupTable.labels.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "ndl-overview-section", children: [(0, jsx_runtime_1.jsx)("div", { className: "ndl-overview-header", children: (0, jsx_runtime_1.jsxs)("span", { children: ["Nodes", ` (${nvlGraph.nodes.length.toLocaleString()})`] }) }), (0, jsx_runtime_1.jsx)("div", { className: "ndl-overview-items", tabIndex: 0, children: (0, jsx_runtime_1.jsx)(show_all_1.ShowAll, { initiallyShown: OVERVIEW_STEP_SIZE, isButtonGroup: true, children: nvlGraph.dataLookupTable.labels.map((label) => function GraphLabelWrapper() {
33
+ var _a, _b, _c, _d;
34
+ return ((0, jsx_runtime_1.jsxs)(react_1.GraphLabel, { type: "node", htmlAttributes: {
35
+ tabIndex: -1,
36
+ }, 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));
37
+ }) }) })] })), nvlGraph.dataLookupTable.types.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "ndl-overview-relationships-section", children: [(0, jsx_runtime_1.jsxs)("span", { className: "ndl-overview-relationships-title", children: ["Relationships", ` (${nvlGraph.rels.length.toLocaleString()})`] }), (0, jsx_runtime_1.jsx)("div", { className: "ndl-overview-items", children: (0, jsx_runtime_1.jsx)(show_all_1.ShowAll, { initiallyShown: OVERVIEW_STEP_SIZE, isButtonGroup: true, children: nvlGraph.dataLookupTable.types.map((type) => {
38
+ var _a, _b, _c, _d;
39
+ return ((0, jsx_runtime_1.jsxs)(react_1.GraphLabel, { type: "relationship", htmlAttributes: {
40
+ tabIndex: -1,
41
+ }, 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));
42
+ }) }) })] }))] }) })] }));
43
+ };
44
+ exports.OverviewPanel = OverviewPanel;
45
+ //# 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,4CAA0D;AAE1D,4DAA0D;AAC1D,gEAA2D;AAC3D,yCAAqC;AAErC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAEvB,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,sCAAkB,GAAE,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c,EAAE,GAAG,IACtD,EACP,gCAAK,SAAS,EAAC,oBAAoB,YACjC,uBAAC,kBAAO,IAAC,cAAc,EAAE,kBAAkB,EAAE,aAAa,kBACvD,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;;4CAAC,OAAA,CAC5C,wBAAC,kBAAU,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;AAnFW,QAAA,aAAa,iBAmFxB"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PropertiesTable = exports.MAX_LENGTH_WIDE = exports.MAX_LENGTH_NARROW = exports.WIDE_VIEW_THRESHOLD = exports.ELLIPSIS = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ /**
6
+ *
7
+ * Copyright (c) "Neo4j"
8
+ * Neo4j Sweden AB [http://neo4j.com]
9
+ *
10
+ * This file is part of Neo4j.
11
+ *
12
+ * Neo4j is free software: you can redistribute it and/or modify
13
+ * it under the terms of the GNU General Public License as published by
14
+ * the Free Software Foundation, either version 3 of the License, or
15
+ * (at your option) any later version.
16
+ *
17
+ * This program is distributed in the hope that it will be useful,
18
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ * GNU General Public License for more details.
21
+ *
22
+ * You should have received a copy of the GNU General Public License
23
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+ */
25
+ const react_1 = require("@neo4j-ndl/react");
26
+ const react_2 = require("react");
27
+ const clickable_urls_1 = require("./clickable-urls");
28
+ exports.ELLIPSIS = '\u2026';
29
+ exports.WIDE_VIEW_THRESHOLD = 900;
30
+ exports.MAX_LENGTH_NARROW = 150;
31
+ exports.MAX_LENGTH_WIDE = 300;
32
+ const ExpandableValue = ({ value, width, type }) => {
33
+ const [isExpanded, setIsExpanded] = (0, react_2.useState)(false);
34
+ const maxLength = width > exports.WIDE_VIEW_THRESHOLD ? exports.MAX_LENGTH_WIDE : exports.MAX_LENGTH_NARROW;
35
+ const handleExpandClick = () => {
36
+ setIsExpanded(true);
37
+ };
38
+ let valueShown = isExpanded ? value : value.slice(0, maxLength);
39
+ const isValueTrimmed = valueShown.length !== value.length;
40
+ valueShown += isValueTrimmed ? exports.ELLIPSIS : '';
41
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [type.startsWith('Array') && '[', (0, jsx_runtime_1.jsx)(clickable_urls_1.ClickableUrls, { text: valueShown }), isValueTrimmed && ((0, jsx_runtime_1.jsx)("button", { onClick: handleExpandClick, className: "ndl-properties-show-all-button", children: ' Show all' })), type.startsWith('Array') && ']'] }));
42
+ };
43
+ const PropertiesTable = ({ properties, paneWidth, }) => {
44
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "ndl-graph-viz-properties-table", children: [(0, jsx_runtime_1.jsxs)("div", { className: "ndl-properties-header", children: [(0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "body-small", className: "ndl-properties-header-key", children: "Key" }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "body-small", children: "Value" })] }), Object.entries(properties).map(([key, { stringified, type }]) => {
45
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "ndl-properties-row", children: [(0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "body-small", className: "ndl-properties-key", children: key }), (0, jsx_runtime_1.jsx)("div", { className: "ndl-properties-value", children: (0, jsx_runtime_1.jsx)(ExpandableValue, { value: stringified, width: paneWidth, type: type }) }), (0, jsx_runtime_1.jsx)("div", { className: "ndl-properties-clipboard-button", children: (0, jsx_runtime_1.jsx)(react_1.ClipboardButton, { textToCopy: `${key}: ${stringified}`, size: "small", tooltipProps: { placement: 'left', type: 'simple' } }) })] }, key));
46
+ })] }));
47
+ };
48
+ exports.PropertiesTable = PropertiesTable;
49
+ //# 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,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,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IAChE,MAAM,cAAc,GAAG,UAAU,C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,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"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ShowAll = ShowAll;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ /**
6
+ *
7
+ * Copyright (c) "Neo4j"
8
+ * Neo4j Sweden AB [http://neo4j.com]
9
+ *
10
+ * This file is part of Neo4j.
11
+ *
12
+ * Neo4j is free software: you can redistribute it and/or modify
13
+ * it under the terms of the GNU General Public License as published by
14
+ * the Free Software Foundation, either version 3 of the License, or
15
+ * (at your option) any later version.
16
+ *
17
+ * This program is distributed in the hope that it will be useful,
18
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ * GNU General Public License for more details.
21
+ *
22
+ * You should have received a copy of the GNU General Public License
23
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+ */
25
+ const react_1 = require("@neo4j-ndl/react");
26
+ const react_2 = require("react");
27
+ const button_group_1 = require("./button-group");
28
+ const isThunkComponent = (t) => typeof t === 'function';
29
+ function ShowAll({ initiallyShown, children, isButtonGroup, }) {
30
+ const [isExpanded, setIsExpanded] = (0, react_2.useState)(false);
31
+ const toggleExpanded = () => setIsExpanded((e) => !e);
32
+ const itemCount = children.length;
33
+ const shouldHaveControls = itemCount > initiallyShown;
34
+ const shown = isExpanded ? itemCount : initiallyShown;
35
+ const leftToShow = itemCount - shown;
36
+ if (itemCount === 0) {
37
+ return null;
38
+ }
39
+ const currentChildren = children
40
+ .slice(0, shown)
41
+ .map((c) => (isThunkComponent(c) ? c() : c));
42
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isButtonGroup === true ? ((0, jsx_runtime_1.jsx)(button_group_1.ButtonGroup, { children: currentChildren })) : ((0, jsx_runtime_1.jsx)("div", { style: { all: 'inherit' }, children: currentChildren })), shouldHaveControls && ((0, jsx_runtime_1.jsx)(react_1.Button, { fill: "text", size: "small", onClick: toggleExpanded, children: isExpanded ? 'Show less' : `Show all (${leftToShow} more)` }))] }));
43
+ }
44
+ //# 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":";;AAqCA,0BAmCC;;AAxED;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAA0C;AAC1C,iCAAiD;AAEjD,iDAA6C;AAS7C,MAAM,gBAAgB,GAAG,CACvB,CAAgC,EACV,EAAE,CAAC,OAAO,CAAC,KAAK,UAAU,CAAC;AAEnD,SAAgB,OAAO,CAAC,EACtB,cAAc,EACd,QAAQ,EACR,aAAa,GACA;IACb,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,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,6DACG,aAAa,KAAK,IAAI,CAAC,CAAC,CAAC,CACxB,uBAAC,0BAAW,cAAE,eAAe,GAAe,CAC7C,CAAC,CAAC,CAAC,CACF,gCAAK,KAAK,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,YAAG,eAAe,GAAO,CACxD,EACA,kBAAkB,IAAI,CACrB,uBAAC,cAAM,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"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SingleSelectionSidepanelContents = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ /**
6
+ *
7
+ * Copyright (c) "Neo4j"
8
+ * Neo4j Sweden AB [http://neo4j.com]
9
+ *
10
+ * This file is part of Neo4j.
11
+ *
12
+ * Neo4j is free software: you can redistribute it and/or modify
13
+ * it under the terms of the GNU General Public License as published by
14
+ * the Free Software Foundation, either version 3 of the License, or
15
+ * (at your option) any later version.
16
+ *
17
+ * This program is distributed in the hope that it will be useful,
18
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ * GNU General Public License for more details.
21
+ *
22
+ * You should have received a copy of the GNU General Public License
23
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+ */
25
+ const react_1 = require("react");
26
+ const graph_viz_context_1 = require("../graph-viz-context");
27
+ const details_panel_1 = require("./details-panel");
28
+ const overview_panel_1 = require("./overview-panel");
29
+ const SingleSelectionSidepanelContents = () => {
30
+ const { selected } = (0, graph_viz_context_1.useGraphVizContext)();
31
+ const hasSelection = (0, react_1.useMemo)(() => selected.nodeIds.length > 0 || selected.relationshipIds.length > 0, [selected]);
32
+ return hasSelection ? (0, jsx_runtime_1.jsx)(details_panel_1.DetailsPanel, {}) : (0, jsx_runtime_1.jsx)(overview_panel_1.OverviewPanel, {});
33
+ };
34
+ exports.SingleSelectionSidepanelContents = SingleSelectionSidepanelContents;
35
+ //# sourceMappingURL=single-selection-sidepanel-contents.js.map
@@ -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,iCAAgC;AAEhC,4DAA0D;AAC1D,mDAA+C;AAC/C,qDAAiD;AAE1C,MAAM,gCAAgC,GAAG,GAAG,EAAE;IACnD,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,sCAAkB,GAAE,CAAC;IAE1C,MAAM,YAAY,GAAG,IAAA,eAAO,EAC1B,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,uBAAC,4BAAY,KAAG,CAAC,CAAC,CAAC,uBAAC,8BAAa,KAAG,CAAC;AAC7D,CAAC,CAAC;AATW,QAAA,gCAAgC,oCAS3C"}
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.containerClasses = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ /**
6
+ *
7
+ * Copyright (c) "Neo4j"
8
+ * Neo4j Sweden AB [http://neo4j.com]
9
+ *
10
+ * This file is part of Neo4j.
11
+ *
12
+ * Neo4j is free software: you can redistribute it and/or modify
13
+ * it under the terms of the GNU General Public License as published by
14
+ * the Free Software Foundation, either version 3 of the License, or
15
+ * (at your option) any later version.
16
+ *
17
+ * This program is distributed in the hope that it will be useful,
18
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ * GNU General Public License for more details.
21
+ *
22
+ * You should have received a copy of the GNU General Public License
23
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+ */
25
+ const graph_viz_1 = require("../graph-viz");
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
+ exports.containerClasses = 'n-w-full n-border-palette-neutral-border-weak n-mx-2 n-rounded-lg n-border';
89
+ const Component = () => {
90
+ return ((0, jsx_runtime_1.jsx)("div", { style: { height: '600px' }, children: (0, jsx_runtime_1.jsx)(graph_viz_1.GraphViz, { bottomLeftIsland: null, bottomRightIsland: null, nodes: nodes, rels: rels, sidepanel: null, topLeftIsland: null, topRightIsland: null, className: exports.containerClasses }) }));
91
+ };
92
+ exports.default = Component;
93
+ //# 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,4CAAwC;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;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;AACW,QAAA,gBAAgB,GAC3B,4EAA4E,CAAC;AAE/E,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,gCAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,uBAAC,oBAAQ,IACP,gBAAgB,EAAE,IAAI,EACtB,iBAAiB,EAAE,IAAI,EACvB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,IAAI,EACf,aAAa,EAAE,IAAI,EACnB,cAAc,EAAE,IAAI,EACpB,SAAS,EAAE,wBAAgB,GAC3B,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC"}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.containerClasses = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ /**
6
+ *
7
+ * Copyright (c) "Neo4j"
8
+ * Neo4j Sweden AB [http://neo4j.com]
9
+ *
10
+ * This file is part of Neo4j.
11
+ *
12
+ * Neo4j is free software: you can redistribute it and/or modify
13
+ * it under the terms of the GNU General Public License as published by
14
+ * the Free Software Foundation, either version 3 of the License, or
15
+ * (at your option) any later version.
16
+ *
17
+ * This program is distributed in the hope that it will be useful,
18
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ * GNU General Public License for more details.
21
+ *
22
+ * You should have received a copy of the GNU General Public License
23
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+ */
25
+ const graph_viz_1 = require("../graph-viz");
26
+ const nodes = [
27
+ {
28
+ id: 'node1',
29
+ labels: ['Pokemon', 'Legendary'],
30
+ properties: {},
31
+ },
32
+ {
33
+ id: 'node2',
34
+ labels: ['Type'],
35
+ properties: { name: { stringified: 'Dragon', type: 'String' } },
36
+ },
37
+ {
38
+ id: 'node3',
39
+ labels: ['Type'],
40
+ properties: { name: { stringified: 'Flying', type: 'String' } },
41
+ },
42
+ ];
43
+ const rels = [
44
+ {
45
+ from: 'node1',
46
+ id: 'rel1',
47
+ properties: {},
48
+ to: 'node2',
49
+ type: 'HAS_TYPE',
50
+ },
51
+ {
52
+ from: 'node1',
53
+ id: 'rel2',
54
+ properties: {},
55
+ to: 'node3',
56
+ type: 'HAS_TYPE',
57
+ },
58
+ ];
59
+ exports.containerClasses = 'n-w-full n-border-palette-neutral-border-weak n-mx-2 n-rounded-lg n-border';
60
+ const Component = () => {
61
+ return ((0, jsx_runtime_1.jsx)("div", { style: { height: '600px' }, children: (0, jsx_runtime_1.jsx)(graph_viz_1.GraphViz, { bottomLeftIsland: (0, jsx_runtime_1.jsx)("div", { children: "\u2199\uFE0F" }), bottomRightIsland: (0, jsx_runtime_1.jsx)("div", { children: "\u2198\uFE0F" }), nodes: nodes, rels: rels, sidepanel: {
62
+ children: (0, jsx_runtime_1.jsx)("div", { children: "Custom panel contents" }),
63
+ isSidePanelOpen: true,
64
+ onSidePanelResize: () => {
65
+ /* no op */
66
+ },
67
+ setIsSidePanelOpen: () => {
68
+ /* no op */
69
+ },
70
+ sidePanelWidth: 300,
71
+ }, topLeftIsland: (0, jsx_runtime_1.jsx)("div", { children: "\u2196\uFE0F" }), topRightIsland: (0, jsx_runtime_1.jsx)("div", { children: "\u2197\uFE0F" }), className: exports.containerClasses }) }));
72
+ };
73
+ exports.default = Component;
74
+ //# 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,4CAAwC;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;AACW,QAAA,gBAAgB,GAC3B,4EAA4E,CAAC;AAE/E,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,gCAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,uBAAC,oBAAQ,IACP,gBAAgB,EAAE,2DAAa,EAC/B,iBAAiB,EAAE,2DAAa,EAChC,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,SAAS,EAAE;gBACT,QAAQ,EAAE,oEAAgC;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,2DAAa,EAC5B,cAAc,EAAE,2DAAa,EAC7B,SAAS,EAAE,wBAAgB,GAC3B,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC"}
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.containerClasses = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ /**
6
+ *
7
+ * Copyright (c) "Neo4j"
8
+ * Neo4j Sweden AB [http://neo4j.com]
9
+ *
10
+ * This file is part of Neo4j.
11
+ *
12
+ * Neo4j is free software: you can redistribute it and/or modify
13
+ * it under the terms of the GNU General Public License as published by
14
+ * the Free Software Foundation, either version 3 of the License, or
15
+ * (at your option) any later version.
16
+ *
17
+ * This program is distributed in the hope that it will be useful,
18
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ * GNU General Public License for more details.
21
+ *
22
+ * You should have received a copy of the GNU General Public License
23
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+ */
25
+ const graph_viz_1 = require("../graph-viz");
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
+ exports.containerClasses = 'n-w-full n-border-palette-neutral-border-weak n-mx-2 n-rounded-lg n-border';
89
+ const Component = () => {
90
+ return ((0, jsx_runtime_1.jsx)("div", { style: { height: '600px' }, children: (0, jsx_runtime_1.jsx)(graph_viz_1.GraphViz, { nodes: nodes, rels: rels, className: exports.containerClasses }) }));
91
+ };
92
+ exports.default = Component;
93
+ //# 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;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ACV,UAAU,EAAE,EAAE;QACd,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,UAAU;KACjB;CACF,CAAC;AACW,QAAA,gBAAgB,GAC3B,4EAA4E,CAAC;AAE/E,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,gCAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,uBAAC,oBAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,wBAAgB,GAAI,GAC/D,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC"}
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.containerClasses = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ /**
6
+ *
7
+ * Copyright (c) "Neo4j"
8
+ * Neo4j Sweden AB [http://neo4j.com]
9
+ *
10
+ * This file is part of Neo4j.
11
+ *
12
+ * Neo4j is free software: you can redistribute it and/or modify
13
+ * it under the terms of the GNU General Public License as published by
14
+ * the Free Software Foundation, either version 3 of the License, or
15
+ * (at your option) any later version.
16
+ *
17
+ * This program is distributed in the hope that it will be useful,
18
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ * GNU General Public License for more details.
21
+ *
22
+ * You should have received a copy of the GNU General Public License
23
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+ */
25
+ const react_1 = require("@neo4j-ndl/react");
26
+ const react_2 = require("react");
27
+ const graph_viz_1 = require("../graph-viz");
28
+ const single_selection_sidepanel_contents_1 = require("../sidepanel-components/single-selection-sidepanel-contents");
29
+ const nodes = [
30
+ {
31
+ id: 'node1',
32
+ labels: ['Pokemon', 'Legendary'],
33
+ properties: {
34
+ durationToWinBattle: {
35
+ stringified: 'P0M0DT0.000000001S',
36
+ type: 'duration',
37
+ },
38
+ favoriteColors: {
39
+ stringified: '["red", "blue", "green"]',
40
+ type: 'list',
41
+ },
42
+ getsBeatBy: {
43
+ stringified: 'null',
44
+ type: 'null',
45
+ },
46
+ isAwesome: {
47
+ stringified: 'true',
48
+ type: 'boolean',
49
+ },
50
+ location: {
51
+ stringified: 'point({srid:1, x:100, y:200, z:300})',
52
+ type: 'point',
53
+ },
54
+ name: {
55
+ stringified: '"Rayquaza"',
56
+ type: 'string',
57
+ },
58
+ weight: {
59
+ stringified: '392.0',
60
+ type: 'float',
61
+ },
62
+ },
63
+ },
64
+ {
65
+ id: 'node2',
66
+ labels: ['Type'],
67
+ properties: { name: { stringified: 'Dragon', type: 'String' } },
68
+ },
69
+ {
70
+ id: 'node3',
71
+ labels: ['Type'],
72
+ properties: { name: { stringified: 'Flying', type: 'String' } },
73
+ },
74
+ ];
75
+ const rels = [
76
+ {
77
+ from: 'node1',
78
+ id: 'rel1',
79
+ properties: {},
80
+ to: 'node2',
81
+ type: 'HAS_TYPE',
82
+ },
83
+ {
84
+ from: 'node1',
85
+ id: 'rel2',
86
+ properties: {},
87
+ to: 'node3',
88
+ type: 'HAS_TYPE',
89
+ },
90
+ ];
91
+ exports.containerClasses = 'n-w-full n-border-palette-neutral-border-weak n-mx-2 n-rounded-lg n-border';
92
+ const Component = () => {
93
+ const [isOpen, setIsOpen] = (0, react_2.useState)(true);
94
+ const [gesture, setGesture] = (0, react_2.useState)('box');
95
+ return ((0, jsx_runtime_1.jsx)("div", { style: { height: '600px' }, children: (0, jsx_runtime_1.jsx)(graph_viz_1.GraphViz, { gesture: gesture, setGesture: setGesture, bottomLeftIsland: (0, jsx_runtime_1.jsxs)(react_1.IconButtonArray, { children: [(0, jsx_runtime_1.jsx)(graph_viz_1.GraphViz.LassoSelectButton, {}), (0, jsx_runtime_1.jsx)(graph_viz_1.GraphViz.SingleSelectButton, {}), (0, jsx_runtime_1.jsx)(graph_viz_1.GraphViz.BoxSelectButton, {})] }), bottomRightIsland: (0, jsx_runtime_1.jsxs)(react_1.IconButtonArray, { children: [(0, jsx_runtime_1.jsx)(graph_viz_1.GraphViz.ZoomInButton, {}), (0, jsx_runtime_1.jsx)(graph_viz_1.GraphViz.ZoomOutButton, {}), (0, jsx_runtime_1.jsx)(graph_viz_1.GraphViz.ZoomToFitButton, {})] }), nodes: nodes, rels: rels, sidepanel: {
96
+ children: (0, jsx_runtime_1.jsx)(single_selection_sidepanel_contents_1.SingleSelectionSidepanelContents, {}),
97
+ isSidePanelOpen: isOpen,
98
+ onSidePanelResize: () => {
99
+ /* no op */
100
+ },
101
+ setIsSidePanelOpen: setIsOpen,
102
+ sidePanelWidth: 300,
103
+ }, topLeftIsland: (0, jsx_runtime_1.jsx)(graph_viz_1.GraphViz.DownloadButton, {}), topRightIsland: (0, jsx_runtime_1.jsx)(graph_viz_1.GraphViz.ToggleSidePanelButton, {}), className: exports.containerClasses }) }));
104
+ };
105
+ exports.default = Component;
106
+ //# 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,4CAAmD;AACnD,iCAAiC;AAEjC,4CAAwC;AAExC,qHAA+G;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,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,IAA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