@neo4j-ndl/react-graph 1.2.0 → 1.2.1
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/stories/graph-visualization.stories.js +2 -2
- package/lib/cjs/stories/graph-visualization.stories.js.map +1 -1
- package/lib/cjs/stories/index.js +5 -1
- package/lib/cjs/stories/index.js.map +1 -1
- package/lib/cjs/stories/preview-graph-visualization.stories.js +54 -0
- package/lib/cjs/stories/preview-graph-visualization.stories.js.map +1 -0
- package/lib/cjs/stories/preview-graph-visualization.story.js +68 -0
- package/lib/cjs/stories/preview-graph-visualization.story.js.map +1 -0
- package/lib/esm/stories/graph-visualization.stories.js +2 -2
- package/lib/esm/stories/graph-visualization.stories.js.map +1 -1
- package/lib/esm/stories/index.js +3 -0
- package/lib/esm/stories/index.js.map +1 -1
- package/lib/esm/stories/preview-graph-visualization.stories.js +51 -0
- package/lib/esm/stories/preview-graph-visualization.stories.js.map +1 -0
- package/lib/esm/stories/preview-graph-visualization.story.js +66 -0
- package/lib/esm/stories/preview-graph-visualization.story.js.map +1 -0
- package/lib/types/stories/index.d.ts +2 -0
- package/lib/types/stories/index.d.ts.map +1 -1
- package/lib/types/stories/preview-graph-visualization.stories.d.ts +32 -0
- package/lib/types/stories/preview-graph-visualization.stories.d.ts.map +1 -0
- package/lib/types/stories/preview-graph-visualization.story.d.ts +23 -0
- package/lib/types/stories/preview-graph-visualization.story.d.ts.map +1 -0
- package/package.json +4 -4
|
@@ -23,12 +23,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
23
|
exports.Search = exports.Highlighting = exports.CustomIslands = exports.Maximalist = exports.Barebones = exports.Default = void 0;
|
|
24
24
|
const _1 = require(".");
|
|
25
25
|
const componentMeta = {
|
|
26
|
-
id: 'components-
|
|
26
|
+
id: 'components-graph-visualization',
|
|
27
27
|
parameters: {
|
|
28
28
|
controls: { disable: true },
|
|
29
29
|
},
|
|
30
30
|
tags: ['docsPage'],
|
|
31
|
-
title: 'Components/
|
|
31
|
+
title: 'Components/GraphVisualization',
|
|
32
32
|
};
|
|
33
33
|
exports.default = componentMeta;
|
|
34
34
|
exports.Default = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-visualization.stories.js","sourceRoot":"","sources":["../../../src/stories/graph-visualization.stories.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAIH,wBAaW;AAEX,MAAM,aAAa,GAAG;IACpB,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"graph-visualization.stories.js","sourceRoot":"","sources":["../../../src/stories/graph-visualization.stories.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAIH,wBAaW;AAEX,MAAM,aAAa,GAAG;IACpB,EAAE,EAAE,gCAAgC;IACpC,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,+BAA+B;CACvC,CAAC;AAEF,kBAAe,aAAa,CAAC;AAGhB,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,+BAA4B;gBAClC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,4BAAyB;CAClC,CAAC;AAEW,QAAA,SAAS,GAAU;IAC9B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,iCAA8B;gBACpC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,8BAA2B;CACpC,CAAC;AAEW,QAAA,UAAU,GAAU;IAC/B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,kCAA+B;gBACrC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,+BAA4B;CACrC,CAAC;AAEW,QAAA,aAAa,GAAU;IAClC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,8BAA2B;gBACjC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,2BAAwB;CACjC,CAAC;AAEW,QAAA,YAAY,GAAU;IACjC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,oCAAiC;gBACvC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,iCAA8B;CACvC,CAAC;AAEW,QAAA,MAAM,GAAU;IAC3B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,8BAA2B;gBACjC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,2BAAwB;CACjC,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 { type StoryObj } from '@storybook/react-vite';\n\nimport {\n GraphVisualizationBarebones,\n GraphVisualizationBarebonesSrc,\n GraphVisualizationCustom,\n GraphVisualizationCustomSrc,\n GraphVisualizationDefault,\n GraphVisualizationDefaultSrc,\n GraphVisualizationHighlighting,\n GraphVisualizationHighlightingSrc,\n GraphVisualizationMaximalist,\n GraphVisualizationMaximalistSrc,\n GraphVisualizationSearch,\n GraphVisualizationSearchSrc,\n} from '.';\n\nconst componentMeta = {\n id: 'components-graph-visualization',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/GraphVisualization',\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphVisualizationDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphVisualizationDefault,\n};\n\nexport const Barebones: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphVisualizationBarebonesSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphVisualizationBarebones,\n};\n\nexport const Maximalist: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphVisualizationMaximalistSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphVisualizationMaximalist,\n};\n\nexport const CustomIslands: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphVisualizationCustomSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphVisualizationCustom,\n};\n\nexport const Highlighting: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphVisualizationHighlightingSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphVisualizationHighlighting,\n};\n\nexport const Search: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphVisualizationSearchSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphVisualizationSearch,\n};\n"]}
|
package/lib/cjs/stories/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.GraphVisualizationSearchSrc = exports.GraphVisualizationHighlightingSrc = exports.GraphVisualizationCustomSrc = exports.GraphVisualizationMaximalistSrc = exports.GraphVisualizationBarebonesSrc = exports.GraphVisualizationDefaultSrc = exports.GraphVisualizationMaximalist = exports.GraphVisualizationSearch = exports.GraphVisualizationHighlighting = exports.GraphVisualizationDefault = exports.GraphVisualizationCustom = exports.GraphVisualizationBarebones = void 0;
|
|
26
|
+
exports.PreviewGraphVisualizationSrc = exports.GraphVisualizationSearchSrc = exports.GraphVisualizationHighlightingSrc = exports.GraphVisualizationCustomSrc = exports.GraphVisualizationMaximalistSrc = exports.GraphVisualizationBarebonesSrc = exports.GraphVisualizationDefaultSrc = exports.PreviewGraphVisualization = exports.GraphVisualizationMaximalist = exports.GraphVisualizationSearch = exports.GraphVisualizationHighlighting = exports.GraphVisualizationDefault = exports.GraphVisualizationCustom = exports.GraphVisualizationBarebones = void 0;
|
|
27
27
|
var graph_visualization_barebones_story_1 = require("./graph-visualization-barebones.story");
|
|
28
28
|
Object.defineProperty(exports, "GraphVisualizationBarebones", { enumerable: true, get: function () { return __importDefault(graph_visualization_barebones_story_1).default; } });
|
|
29
29
|
var graph_visualization_custom_story_1 = require("./graph-visualization-custom.story");
|
|
@@ -36,16 +36,20 @@ var graph_visualization_search_story_1 = require("./graph-visualization-search.s
|
|
|
36
36
|
Object.defineProperty(exports, "GraphVisualizationSearch", { enumerable: true, get: function () { return __importDefault(graph_visualization_search_story_1).default; } });
|
|
37
37
|
var graph_visualization_maximalist_story_1 = require("./graph-visualization-maximalist.story");
|
|
38
38
|
Object.defineProperty(exports, "GraphVisualizationMaximalist", { enumerable: true, get: function () { return __importDefault(graph_visualization_maximalist_story_1).default; } });
|
|
39
|
+
var preview_graph_visualization_story_1 = require("./preview-graph-visualization.story");
|
|
40
|
+
Object.defineProperty(exports, "PreviewGraphVisualization", { enumerable: true, get: function () { return __importDefault(preview_graph_visualization_story_1).default; } });
|
|
39
41
|
const graph_visualization_barebones_story_raw_1 = __importDefault(require("./graph-visualization-barebones.story?raw"));
|
|
40
42
|
const graph_visualization_custom_story_raw_1 = __importDefault(require("./graph-visualization-custom.story?raw"));
|
|
41
43
|
const graph_visualization_default_story_raw_1 = __importDefault(require("./graph-visualization-default.story?raw"));
|
|
42
44
|
const graph_visualization_highlighting_story_raw_1 = __importDefault(require("./graph-visualization-highlighting.story?raw"));
|
|
43
45
|
const graph_visualization_maximalist_story_raw_1 = __importDefault(require("./graph-visualization-maximalist.story?raw"));
|
|
44
46
|
const graph_visualization_search_story_raw_1 = __importDefault(require("./graph-visualization-search.story?raw"));
|
|
47
|
+
const preview_graph_visualization_story_raw_1 = __importDefault(require("./preview-graph-visualization.story?raw"));
|
|
45
48
|
exports.GraphVisualizationDefaultSrc = graph_visualization_default_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
46
49
|
exports.GraphVisualizationBarebonesSrc = graph_visualization_barebones_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
47
50
|
exports.GraphVisualizationMaximalistSrc = graph_visualization_maximalist_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
48
51
|
exports.GraphVisualizationCustomSrc = graph_visualization_custom_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
49
52
|
exports.GraphVisualizationHighlightingSrc = graph_visualization_highlighting_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
50
53
|
exports.GraphVisualizationSearchSrc = graph_visualization_search_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
54
|
+
exports.PreviewGraphVisualizationSrc = preview_graph_visualization_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
51
55
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,6FAA+F;AAAtF,mKAAA,OAAO,OAA+B;AAC/C,uFAAyF;AAAhF,6JAAA,OAAO,OAA4B;AAC5C,yFAA2F;AAAlF,+JAAA,OAAO,OAA6B;AAC7C,mGAAqG;AAA5F,yKAAA,OAAO,OAAkC;AAClD,uFAAyF;AAAhF,6JAAA,OAAO,OAA4B;AAC5C,+FAAiG;AAAxF,qKAAA,OAAO,OAAgC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,6FAA+F;AAAtF,mKAAA,OAAO,OAA+B;AAC/C,uFAAyF;AAAhF,6JAAA,OAAO,OAA4B;AAC5C,yFAA2F;AAAlF,+JAAA,OAAO,OAA6B;AAC7C,mGAAqG;AAA5F,yKAAA,OAAO,OAAkC;AAClD,uFAAyF;AAAhF,6JAAA,OAAO,OAA4B;AAC5C,+FAAiG;AAAxF,qKAAA,OAAO,OAAgC;AAChD,yFAA2F;AAAlF,+JAAA,OAAO,OAA6B;AAE7C,wHAA0F;AAC1F,kHAAoF;AACpF,oHAAsF;AACtF,8HAAgG;AAChG,0HAA4F;AAC5F,kHAAoF;AACpF,oHAAsF;AAEzE,QAAA,4BAA4B,GACvC,+CAA+B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAEzD,QAAA,8BAA8B,GACzC,iDAAiC,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAE3D,QAAA,+BAA+B,GAC1C,kDAAkC,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAE5D,QAAA,2BAA2B,GACtC,8CAA8B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAExD,QAAA,iCAAiC,GAC5C,oDAAoC,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAE9D,QAAA,2BAA2B,GACtC,8CAA8B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAExD,QAAA,4BAA4B,GACvC,+CAA+B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,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\nexport { default as GraphVisualizationBarebones } from './graph-visualization-barebones.story';\nexport { default as GraphVisualizationCustom } from './graph-visualization-custom.story';\nexport { default as GraphVisualizationDefault } from './graph-visualization-default.story';\nexport { default as GraphVisualizationHighlighting } from './graph-visualization-highlighting.story';\nexport { default as GraphVisualizationSearch } from './graph-visualization-search.story';\nexport { default as GraphVisualizationMaximalist } from './graph-visualization-maximalist.story';\nexport { default as PreviewGraphVisualization } from './preview-graph-visualization.story';\n\nimport GraphVisualizationBarebonesSrcRaw from './graph-visualization-barebones.story?raw';\nimport GraphVisualizationCustomSrcRaw from './graph-visualization-custom.story?raw';\nimport GraphVisualizationDefaultSrcRaw from './graph-visualization-default.story?raw';\nimport GraphVisualizationHighlightingSrcRaw from './graph-visualization-highlighting.story?raw';\nimport GraphVisualizationMaximalistSrcRaw from './graph-visualization-maximalist.story?raw';\nimport GraphVisualizationSearchSrcRaw from './graph-visualization-search.story?raw';\nimport PreviewGraphVisualizationSrcRaw from './preview-graph-visualization.story?raw';\n\nexport const GraphVisualizationDefaultSrc =\n GraphVisualizationDefaultSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationBarebonesSrc =\n GraphVisualizationBarebonesSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationMaximalistSrc =\n GraphVisualizationMaximalistSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationCustomSrc =\n GraphVisualizationCustomSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationHighlightingSrc =\n GraphVisualizationHighlightingSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationSearchSrc =\n GraphVisualizationSearchSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const PreviewGraphVisualizationSrc =\n PreviewGraphVisualizationSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.GraphVisualizationWithPreviewHeader = void 0;
|
|
24
|
+
const ai_1 = require("@neo4j-ndl/react/ai");
|
|
25
|
+
const _1 = require(".");
|
|
26
|
+
const componentMeta = {
|
|
27
|
+
component: ai_1.Preview,
|
|
28
|
+
id: 'components-ai-preview-graph',
|
|
29
|
+
parameters: {
|
|
30
|
+
controls: { disable: true },
|
|
31
|
+
},
|
|
32
|
+
tags: ['docsPage'],
|
|
33
|
+
title: 'Components/AI/Preview', // Same title as the other Preview stories
|
|
34
|
+
};
|
|
35
|
+
exports.default = componentMeta;
|
|
36
|
+
exports.GraphVisualizationWithPreviewHeader = {
|
|
37
|
+
args: {},
|
|
38
|
+
parameters: {
|
|
39
|
+
docs: {
|
|
40
|
+
source: {
|
|
41
|
+
code: _1.PreviewGraphVisualizationSrc,
|
|
42
|
+
language: 'tsx',
|
|
43
|
+
type: 'code',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
render: _1.PreviewGraphVisualization,
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* This file should only be used for the GraphVisualizationPreview story,
|
|
51
|
+
* which is used to preview the graph visualization component in the AI Preview.
|
|
52
|
+
* Do not use this file for other stories.
|
|
53
|
+
*/
|
|
54
|
+
//# sourceMappingURL=preview-graph-visualization.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-graph-visualization.stories.js","sourceRoot":"","sources":["../../../src/stories/preview-graph-visualization.stories.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,4CAA8C;AAG9C,wBAA4E;AAE5E,MAAM,aAAa,GAAyB;IAC1C,SAAS,EAAE,YAAO;IAClB,EAAE,EAAE,6BAA6B;IACjC,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,uBAAuB,EAAE,0CAA0C;CAC3E,CAAC;AAEF,kBAAe,aAAa,CAAC;AAGhB,QAAA,mCAAmC,GAAU;IACxD,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,+BAA4B;gBAClC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,4BAAyB;CAClC,CAAC;AAEF;;;;GAIG","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 { Preview } from '@neo4j-ndl/react/ai';\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { PreviewGraphVisualization, PreviewGraphVisualizationSrc } from '.';\n\nconst componentMeta: Meta<typeof Preview> = {\n component: Preview,\n id: 'components-ai-preview-graph',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/AI/Preview', // Same title as the other Preview stories\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const GraphVisualizationWithPreviewHeader: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: PreviewGraphVisualizationSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: PreviewGraphVisualization,\n};\n\n/**\n * This file should only be used for the GraphVisualizationPreview story,\n * which is used to preview the graph visualization component in the AI Preview.\n * Do not use this file for other stories.\n */\n"]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) "Neo4j"
|
|
7
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
8
|
+
*
|
|
9
|
+
* This file is part of Neo4j.
|
|
10
|
+
*
|
|
11
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
12
|
+
* it under the terms of the GNU General Public License as published by
|
|
13
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
14
|
+
* (at your option) any later version.
|
|
15
|
+
*
|
|
16
|
+
* This program is distributed in the hope that it will be useful,
|
|
17
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
* GNU General Public License for more details.
|
|
20
|
+
*
|
|
21
|
+
* You should have received a copy of the GNU General Public License
|
|
22
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
+
*/
|
|
24
|
+
const react_1 = require("@neo4j-ndl/react");
|
|
25
|
+
const ai_1 = require("@neo4j-ndl/react/ai");
|
|
26
|
+
const icons_1 = require("@neo4j-ndl/react/icons");
|
|
27
|
+
const graph_visualization_1 = require("../graph-visualization");
|
|
28
|
+
const nodes = [
|
|
29
|
+
{
|
|
30
|
+
id: 'node1',
|
|
31
|
+
labels: ['Movie'],
|
|
32
|
+
properties: {
|
|
33
|
+
title: { stringified: '"The Matrix"', type: 'string' },
|
|
34
|
+
year: { stringified: '1999', type: 'integer' },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'node2',
|
|
39
|
+
labels: ['Person', 'Director'],
|
|
40
|
+
properties: { name: { stringified: '"Lana Wachowski"', type: 'string' } },
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'node3',
|
|
44
|
+
labels: ['Person'],
|
|
45
|
+
properties: { name: { stringified: '"Keanu Reeves"', type: 'string' } },
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
const rels = [
|
|
49
|
+
{
|
|
50
|
+
from: 'node2',
|
|
51
|
+
id: 'rel1',
|
|
52
|
+
properties: {},
|
|
53
|
+
to: 'node1',
|
|
54
|
+
type: 'DIRECTED',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
from: 'node2',
|
|
58
|
+
id: 'rel2',
|
|
59
|
+
properties: {},
|
|
60
|
+
to: 'node3',
|
|
61
|
+
type: 'WORKED_WITH',
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
const Component = () => {
|
|
65
|
+
return ((0, jsx_runtime_1.jsxs)(ai_1.Preview, { children: [(0, jsx_runtime_1.jsxs)(ai_1.Preview.Header, { actions: (0, jsx_runtime_1.jsx)(react_1.OutlinedButton, { variant: "neutral", size: "small", leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.PencilSquareIconOutline, {}), children: "Send to Import" }), children: ["Visualization", (0, jsx_runtime_1.jsx)(react_1.StatusLabel, { variant: "info", size: "small", fill: "semi-filled", children: "Preview" })] }), (0, jsx_runtime_1.jsx)("div", { style: { height: '254px' }, children: (0, jsx_runtime_1.jsx)(graph_visualization_1.GraphVisualization, { bottomLeftIsland: null, bottomRightIsland: null, nodes: nodes, rels: rels, sidepanel: null, topLeftIsland: null, topRightIsland: (0, jsx_runtime_1.jsx)(react_1.CleanIconButton, { size: "small", description: "Expand", children: (0, jsx_runtime_1.jsx)(icons_1.ExpandIcon, {}) }) }) })] }));
|
|
66
|
+
};
|
|
67
|
+
exports.default = Component;
|
|
68
|
+
//# sourceMappingURL=preview-graph-visualization.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-graph-visualization.story.js","sourceRoot":"","sources":["../../../src/stories/preview-graph-visualization.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAAgF;AAChF,4CAA8C;AAC9C,kDAA6E;AAE7E,gEAA4D;AAG5D,MAAM,KAAK,GAAc;IACvB;QACE,EAAE,EAAE,OAAO;QACX,MAAM,EAAE,CAAC,OAAO,CAAC;QACjB,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE;YACtD,IAAI,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE;SAC/C;KACF;IACD;QACE,EAAE,EAAE,OAAO;QACX,MAAM,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC;QAC9B,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,kBAAkB,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;KAC1E;IACD;QACE,EAAE,EAAE,OAAO;QACX,MAAM,EAAE,CAAC,QAAQ,CAAC;QAClB,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;KACxE;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,aAAa;KACpB;CACF,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,wBAAC,YAAO,eACN,wBAAC,YAAO,CAAC,MAAM,IACb,OAAO,EACL,uBAAC,sBAAc,IACb,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,OAAO,EACZ,aAAa,EAAE,uBAAC,+BAAuB,KAAG,+BAG3B,8BAInB,uBAAC,mBAAW,IAAC,OAAO,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,aAAa,wBAE7C,IACC,EACjB,gCAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,uBAAC,wCAAkB,IACjB,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,EACZ,uBAAC,uBAAe,IAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,QAAQ,YAChD,uBAAC,kBAAU,KAAG,GACE,GAEpB,GACE,IACE,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,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 { CleanIconButton, OutlinedButton, StatusLabel } from '@neo4j-ndl/react';\nimport { Preview } from '@neo4j-ndl/react/ai';\nimport { ExpandIcon, PencilSquareIconOutline } from '@neo4j-ndl/react/icons';\n\nimport { GraphVisualization } from '../graph-visualization';\nimport { type NeoNode } from '../graph-visualization-context';\n\nconst nodes: NeoNode[] = [\n {\n id: 'node1',\n labels: ['Movie'],\n properties: {\n title: { stringified: '\"The Matrix\"', type: 'string' },\n year: { stringified: '1999', type: 'integer' },\n },\n },\n {\n id: 'node2',\n labels: ['Person', 'Director'],\n properties: { name: { stringified: '\"Lana Wachowski\"', type: 'string' } },\n },\n {\n id: 'node3',\n labels: ['Person'],\n properties: { name: { stringified: '\"Keanu Reeves\"', type: 'string' } },\n },\n];\n\nconst rels = [\n {\n from: 'node2',\n id: 'rel1',\n properties: {},\n to: 'node1',\n type: 'DIRECTED',\n },\n {\n from: 'node2',\n id: 'rel2',\n properties: {},\n to: 'node3',\n type: 'WORKED_WITH',\n },\n];\n\nconst Component = () => {\n return (\n <Preview>\n <Preview.Header\n actions={\n <OutlinedButton\n variant=\"neutral\"\n size=\"small\"\n leadingVisual={<PencilSquareIconOutline />}\n >\n Send to Import\n </OutlinedButton>\n }\n >\n Visualization\n <StatusLabel variant=\"info\" size=\"small\" fill=\"semi-filled\">\n Preview\n </StatusLabel>\n </Preview.Header>\n <div style={{ height: '254px' }}>\n <GraphVisualization\n bottomLeftIsland={null}\n bottomRightIsland={null}\n nodes={nodes}\n rels={rels}\n sidepanel={null}\n topLeftIsland={null}\n topRightIsland={\n <CleanIconButton size=\"small\" description=\"Expand\">\n <ExpandIcon />\n </CleanIconButton>\n }\n />\n </div>\n </Preview>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { GraphVisualizationBarebones, GraphVisualizationBarebonesSrc, GraphVisualizationCustom, GraphVisualizationCustomSrc, GraphVisualizationDefault, GraphVisualizationDefaultSrc, GraphVisualizationHighlighting, GraphVisualizationHighlightingSrc, GraphVisualizationMaximalist, GraphVisualizationMaximalistSrc, GraphVisualizationSearch, GraphVisualizationSearchSrc, } from '.';
|
|
22
22
|
const componentMeta = {
|
|
23
|
-
id: 'components-
|
|
23
|
+
id: 'components-graph-visualization',
|
|
24
24
|
parameters: {
|
|
25
25
|
controls: { disable: true },
|
|
26
26
|
},
|
|
27
27
|
tags: ['docsPage'],
|
|
28
|
-
title: 'Components/
|
|
28
|
+
title: 'Components/GraphVisualization',
|
|
29
29
|
};
|
|
30
30
|
export default componentMeta;
|
|
31
31
|
export const Default = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-visualization.stories.js","sourceRoot":"","sources":["../../../src/stories/graph-visualization.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EACL,2BAA2B,EAC3B,8BAA8B,EAC9B,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,4BAA4B,EAC5B,8BAA8B,EAC9B,iCAAiC,EACjC,4BAA4B,EAC5B,+BAA+B,EAC/B,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"graph-visualization.stories.js","sourceRoot":"","sources":["../../../src/stories/graph-visualization.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EACL,2BAA2B,EAC3B,8BAA8B,EAC9B,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,4BAA4B,EAC5B,8BAA8B,EAC9B,iCAAiC,EACjC,4BAA4B,EAC5B,+BAA+B,EAC/B,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,EAAE,EAAE,gCAAgC;IACpC,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,+BAA+B;CACvC,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,4BAA4B;gBAClC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,yBAAyB;CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,8BAA8B;gBACpC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,2BAA2B;CACpC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,+BAA+B;gBACrC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,4BAA4B;CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,2BAA2B;gBACjC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,wBAAwB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAU;IACjC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,iCAAiC;gBACvC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,8BAA8B;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAU;IAC3B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,2BAA2B;gBACjC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,wBAAwB;CACjC,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 { type StoryObj } from '@storybook/react-vite';\n\nimport {\n GraphVisualizationBarebones,\n GraphVisualizationBarebonesSrc,\n GraphVisualizationCustom,\n GraphVisualizationCustomSrc,\n GraphVisualizationDefault,\n GraphVisualizationDefaultSrc,\n GraphVisualizationHighlighting,\n GraphVisualizationHighlightingSrc,\n GraphVisualizationMaximalist,\n GraphVisualizationMaximalistSrc,\n GraphVisualizationSearch,\n GraphVisualizationSearchSrc,\n} from '.';\n\nconst componentMeta = {\n id: 'components-graph-visualization',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/GraphVisualization',\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphVisualizationDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphVisualizationDefault,\n};\n\nexport const Barebones: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphVisualizationBarebonesSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphVisualizationBarebones,\n};\n\nexport const Maximalist: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphVisualizationMaximalistSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphVisualizationMaximalist,\n};\n\nexport const CustomIslands: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphVisualizationCustomSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphVisualizationCustom,\n};\n\nexport const Highlighting: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphVisualizationHighlightingSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphVisualizationHighlighting,\n};\n\nexport const Search: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: GraphVisualizationSearchSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: GraphVisualizationSearch,\n};\n"]}
|
package/lib/esm/stories/index.js
CHANGED
|
@@ -24,16 +24,19 @@ export { default as GraphVisualizationDefault } from './graph-visualization-defa
|
|
|
24
24
|
export { default as GraphVisualizationHighlighting } from './graph-visualization-highlighting.story';
|
|
25
25
|
export { default as GraphVisualizationSearch } from './graph-visualization-search.story';
|
|
26
26
|
export { default as GraphVisualizationMaximalist } from './graph-visualization-maximalist.story';
|
|
27
|
+
export { default as PreviewGraphVisualization } from './preview-graph-visualization.story';
|
|
27
28
|
import GraphVisualizationBarebonesSrcRaw from './graph-visualization-barebones.story?raw';
|
|
28
29
|
import GraphVisualizationCustomSrcRaw from './graph-visualization-custom.story?raw';
|
|
29
30
|
import GraphVisualizationDefaultSrcRaw from './graph-visualization-default.story?raw';
|
|
30
31
|
import GraphVisualizationHighlightingSrcRaw from './graph-visualization-highlighting.story?raw';
|
|
31
32
|
import GraphVisualizationMaximalistSrcRaw from './graph-visualization-maximalist.story?raw';
|
|
32
33
|
import GraphVisualizationSearchSrcRaw from './graph-visualization-search.story?raw';
|
|
34
|
+
import PreviewGraphVisualizationSrcRaw from './preview-graph-visualization.story?raw';
|
|
33
35
|
export const GraphVisualizationDefaultSrc = GraphVisualizationDefaultSrcRaw.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
34
36
|
export const GraphVisualizationBarebonesSrc = GraphVisualizationBarebonesSrcRaw.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
35
37
|
export const GraphVisualizationMaximalistSrc = GraphVisualizationMaximalistSrcRaw.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
36
38
|
export const GraphVisualizationCustomSrc = GraphVisualizationCustomSrcRaw.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
37
39
|
export const GraphVisualizationHighlightingSrc = GraphVisualizationHighlightingSrcRaw.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
38
40
|
export const GraphVisualizationSearchSrc = GraphVisualizationSearchSrcRaw.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
41
|
+
export const PreviewGraphVisualizationSrc = PreviewGraphVisualizationSrcRaw.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
39
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AACrG,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AACrG,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAE3F,OAAO,iCAAiC,MAAM,2CAA2C,CAAC;AAC1F,OAAO,8BAA8B,MAAM,wCAAwC,CAAC;AACpF,OAAO,+BAA+B,MAAM,yCAAyC,CAAC;AACtF,OAAO,oCAAoC,MAAM,8CAA8C,CAAC;AAChG,OAAO,kCAAkC,MAAM,4CAA4C,CAAC;AAC5F,OAAO,8BAA8B,MAAM,wCAAwC,CAAC;AACpF,OAAO,+BAA+B,MAAM,yCAAyC,CAAC;AAEtF,MAAM,CAAC,MAAM,4BAA4B,GACvC,+BAA+B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAEtE,MAAM,CAAC,MAAM,8BAA8B,GACzC,iCAAiC,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAExE,MAAM,CAAC,MAAM,+BAA+B,GAC1C,kCAAkC,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAEzE,MAAM,CAAC,MAAM,2BAA2B,GACtC,8BAA8B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,iCAAiC,GAC5C,oCAAoC,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAE3E,MAAM,CAAC,MAAM,2BAA2B,GACtC,8BAA8B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,4BAA4B,GACvC,+BAA+B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,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\nexport { default as GraphVisualizationBarebones } from './graph-visualization-barebones.story';\nexport { default as GraphVisualizationCustom } from './graph-visualization-custom.story';\nexport { default as GraphVisualizationDefault } from './graph-visualization-default.story';\nexport { default as GraphVisualizationHighlighting } from './graph-visualization-highlighting.story';\nexport { default as GraphVisualizationSearch } from './graph-visualization-search.story';\nexport { default as GraphVisualizationMaximalist } from './graph-visualization-maximalist.story';\nexport { default as PreviewGraphVisualization } from './preview-graph-visualization.story';\n\nimport GraphVisualizationBarebonesSrcRaw from './graph-visualization-barebones.story?raw';\nimport GraphVisualizationCustomSrcRaw from './graph-visualization-custom.story?raw';\nimport GraphVisualizationDefaultSrcRaw from './graph-visualization-default.story?raw';\nimport GraphVisualizationHighlightingSrcRaw from './graph-visualization-highlighting.story?raw';\nimport GraphVisualizationMaximalistSrcRaw from './graph-visualization-maximalist.story?raw';\nimport GraphVisualizationSearchSrcRaw from './graph-visualization-search.story?raw';\nimport PreviewGraphVisualizationSrcRaw from './preview-graph-visualization.story?raw';\n\nexport const GraphVisualizationDefaultSrc =\n GraphVisualizationDefaultSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationBarebonesSrc =\n GraphVisualizationBarebonesSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationMaximalistSrc =\n GraphVisualizationMaximalistSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationCustomSrc =\n GraphVisualizationCustomSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationHighlightingSrc =\n GraphVisualizationHighlightingSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationSearchSrc =\n GraphVisualizationSearchSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const PreviewGraphVisualizationSrc =\n PreviewGraphVisualizationSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n"]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import { Preview } from '@neo4j-ndl/react/ai';
|
|
22
|
+
import { PreviewGraphVisualization, PreviewGraphVisualizationSrc } from '.';
|
|
23
|
+
const componentMeta = {
|
|
24
|
+
component: Preview,
|
|
25
|
+
id: 'components-ai-preview-graph',
|
|
26
|
+
parameters: {
|
|
27
|
+
controls: { disable: true },
|
|
28
|
+
},
|
|
29
|
+
tags: ['docsPage'],
|
|
30
|
+
title: 'Components/AI/Preview', // Same title as the other Preview stories
|
|
31
|
+
};
|
|
32
|
+
export default componentMeta;
|
|
33
|
+
export const GraphVisualizationWithPreviewHeader = {
|
|
34
|
+
args: {},
|
|
35
|
+
parameters: {
|
|
36
|
+
docs: {
|
|
37
|
+
source: {
|
|
38
|
+
code: PreviewGraphVisualizationSrc,
|
|
39
|
+
language: 'tsx',
|
|
40
|
+
type: 'code',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
render: PreviewGraphVisualization,
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* This file should only be used for the GraphVisualizationPreview story,
|
|
48
|
+
* which is used to preview the graph visualization component in the AI Preview.
|
|
49
|
+
* Do not use this file for other stories.
|
|
50
|
+
*/
|
|
51
|
+
//# sourceMappingURL=preview-graph-visualization.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-graph-visualization.stories.js","sourceRoot":"","sources":["../../../src/stories/preview-graph-visualization.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,OAAO,EAAE,yBAAyB,EAAE,4BAA4B,EAAE,MAAM,GAAG,CAAC;AAE5E,MAAM,aAAa,GAAyB;IAC1C,SAAS,EAAE,OAAO;IAClB,EAAE,EAAE,6BAA6B;IACjC,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,uBAAuB,EAAE,0CAA0C;CAC3E,CAAC;AAEF,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,mCAAmC,GAAU;IACxD,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,4BAA4B;gBAClC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,yBAAyB;CAClC,CAAC;AAEF;;;;GAIG","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 { Preview } from '@neo4j-ndl/react/ai';\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { PreviewGraphVisualization, PreviewGraphVisualizationSrc } from '.';\n\nconst componentMeta: Meta<typeof Preview> = {\n component: Preview,\n id: 'components-ai-preview-graph',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/AI/Preview', // Same title as the other Preview stories\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const GraphVisualizationWithPreviewHeader: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: PreviewGraphVisualizationSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: PreviewGraphVisualization,\n};\n\n/**\n * This file should only be used for the GraphVisualizationPreview story,\n * which is used to preview the graph visualization component in the AI Preview.\n * Do not use this file for other stories.\n */\n"]}
|
|
@@ -0,0 +1,66 @@
|
|
|
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 { CleanIconButton, OutlinedButton, StatusLabel } from '@neo4j-ndl/react';
|
|
23
|
+
import { Preview } from '@neo4j-ndl/react/ai';
|
|
24
|
+
import { ExpandIcon, PencilSquareIconOutline } from '@neo4j-ndl/react/icons';
|
|
25
|
+
import { GraphVisualization } from '../graph-visualization';
|
|
26
|
+
const nodes = [
|
|
27
|
+
{
|
|
28
|
+
id: 'node1',
|
|
29
|
+
labels: ['Movie'],
|
|
30
|
+
properties: {
|
|
31
|
+
title: { stringified: '"The Matrix"', type: 'string' },
|
|
32
|
+
year: { stringified: '1999', type: 'integer' },
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'node2',
|
|
37
|
+
labels: ['Person', 'Director'],
|
|
38
|
+
properties: { name: { stringified: '"Lana Wachowski"', type: 'string' } },
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 'node3',
|
|
42
|
+
labels: ['Person'],
|
|
43
|
+
properties: { name: { stringified: '"Keanu Reeves"', type: 'string' } },
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
const rels = [
|
|
47
|
+
{
|
|
48
|
+
from: 'node2',
|
|
49
|
+
id: 'rel1',
|
|
50
|
+
properties: {},
|
|
51
|
+
to: 'node1',
|
|
52
|
+
type: 'DIRECTED',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
from: 'node2',
|
|
56
|
+
id: 'rel2',
|
|
57
|
+
properties: {},
|
|
58
|
+
to: 'node3',
|
|
59
|
+
type: 'WORKED_WITH',
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
const Component = () => {
|
|
63
|
+
return (_jsxs(Preview, { children: [_jsxs(Preview.Header, { actions: _jsx(OutlinedButton, { variant: "neutral", size: "small", leadingVisual: _jsx(PencilSquareIconOutline, {}), children: "Send to Import" }), children: ["Visualization", _jsx(StatusLabel, { variant: "info", size: "small", fill: "semi-filled", children: "Preview" })] }), _jsx("div", { style: { height: '254px' }, children: _jsx(GraphVisualization, { bottomLeftIsland: null, bottomRightIsland: null, nodes: nodes, rels: rels, sidepanel: null, topLeftIsland: null, topRightIsland: _jsx(CleanIconButton, { size: "small", description: "Expand", children: _jsx(ExpandIcon, {}) }) }) })] }));
|
|
64
|
+
};
|
|
65
|
+
export default Component;
|
|
66
|
+
//# sourceMappingURL=preview-graph-visualization.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-graph-visualization.story.js","sourceRoot":"","sources":["../../../src/stories/preview-graph-visualization.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAE7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAG5D,MAAM,KAAK,GAAc;IACvB;QACE,EAAE,EAAE,OAAO;QACX,MAAM,EAAE,CAAC,OAAO,CAAC;QACjB,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE;YACtD,IAAI,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE;SAC/C;KACF;IACD;QACE,EAAE,EAAE,OAAO;QACX,MAAM,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC;QAC9B,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,kBAAkB,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;KAC1E;IACD;QACE,EAAE,EAAE,OAAO;QACX,MAAM,EAAE,CAAC,QAAQ,CAAC;QAClB,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;KACxE;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,aAAa;KACpB;CACF,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,MAAC,OAAO,eACN,MAAC,OAAO,CAAC,MAAM,IACb,OAAO,EACL,KAAC,cAAc,IACb,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,OAAO,EACZ,aAAa,EAAE,KAAC,uBAAuB,KAAG,+BAG3B,8BAInB,KAAC,WAAW,IAAC,OAAO,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,aAAa,wBAE7C,IACC,EACjB,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,KAAC,kBAAkB,IACjB,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,EACZ,KAAC,eAAe,IAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,QAAQ,YAChD,KAAC,UAAU,KAAG,GACE,GAEpB,GACE,IACE,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,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 { CleanIconButton, OutlinedButton, StatusLabel } from '@neo4j-ndl/react';\nimport { Preview } from '@neo4j-ndl/react/ai';\nimport { ExpandIcon, PencilSquareIconOutline } from '@neo4j-ndl/react/icons';\n\nimport { GraphVisualization } from '../graph-visualization';\nimport { type NeoNode } from '../graph-visualization-context';\n\nconst nodes: NeoNode[] = [\n {\n id: 'node1',\n labels: ['Movie'],\n properties: {\n title: { stringified: '\"The Matrix\"', type: 'string' },\n year: { stringified: '1999', type: 'integer' },\n },\n },\n {\n id: 'node2',\n labels: ['Person', 'Director'],\n properties: { name: { stringified: '\"Lana Wachowski\"', type: 'string' } },\n },\n {\n id: 'node3',\n labels: ['Person'],\n properties: { name: { stringified: '\"Keanu Reeves\"', type: 'string' } },\n },\n];\n\nconst rels = [\n {\n from: 'node2',\n id: 'rel1',\n properties: {},\n to: 'node1',\n type: 'DIRECTED',\n },\n {\n from: 'node2',\n id: 'rel2',\n properties: {},\n to: 'node3',\n type: 'WORKED_WITH',\n },\n];\n\nconst Component = () => {\n return (\n <Preview>\n <Preview.Header\n actions={\n <OutlinedButton\n variant=\"neutral\"\n size=\"small\"\n leadingVisual={<PencilSquareIconOutline />}\n >\n Send to Import\n </OutlinedButton>\n }\n >\n Visualization\n <StatusLabel variant=\"info\" size=\"small\" fill=\"semi-filled\">\n Preview\n </StatusLabel>\n </Preview.Header>\n <div style={{ height: '254px' }}>\n <GraphVisualization\n bottomLeftIsland={null}\n bottomRightIsland={null}\n nodes={nodes}\n rels={rels}\n sidepanel={null}\n topLeftIsland={null}\n topRightIsland={\n <CleanIconButton size=\"small\" description=\"Expand\">\n <ExpandIcon />\n </CleanIconButton>\n }\n />\n </div>\n </Preview>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -24,10 +24,12 @@ export { default as GraphVisualizationDefault } from './graph-visualization-defa
|
|
|
24
24
|
export { default as GraphVisualizationHighlighting } from './graph-visualization-highlighting.story';
|
|
25
25
|
export { default as GraphVisualizationSearch } from './graph-visualization-search.story';
|
|
26
26
|
export { default as GraphVisualizationMaximalist } from './graph-visualization-maximalist.story';
|
|
27
|
+
export { default as PreviewGraphVisualization } from './preview-graph-visualization.story';
|
|
27
28
|
export declare const GraphVisualizationDefaultSrc: string;
|
|
28
29
|
export declare const GraphVisualizationBarebonesSrc: string;
|
|
29
30
|
export declare const GraphVisualizationMaximalistSrc: string;
|
|
30
31
|
export declare const GraphVisualizationCustomSrc: string;
|
|
31
32
|
export declare const GraphVisualizationHighlightingSrc: string;
|
|
32
33
|
export declare const GraphVisualizationSearchSrc: string;
|
|
34
|
+
export declare const PreviewGraphVisualizationSrc: string;
|
|
33
35
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AACrG,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AACrG,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAU3F,eAAO,MAAM,4BAA4B,QAC4B,CAAC;AAEtE,eAAO,MAAM,8BAA8B,QAC4B,CAAC;AAExE,eAAO,MAAM,+BAA+B,QAC4B,CAAC;AAEzE,eAAO,MAAM,2BAA2B,QAC4B,CAAC;AAErE,eAAO,MAAM,iCAAiC,QAC4B,CAAC;AAE3E,eAAO,MAAM,2BAA2B,QAC4B,CAAC;AAErE,eAAO,MAAM,4BAA4B,QAC4B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import { Preview } from '@neo4j-ndl/react/ai';
|
|
22
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
23
|
+
declare const componentMeta: Meta<typeof Preview>;
|
|
24
|
+
export default componentMeta;
|
|
25
|
+
type Story = StoryObj<typeof componentMeta>;
|
|
26
|
+
export declare const GraphVisualizationWithPreviewHeader: Story;
|
|
27
|
+
/**
|
|
28
|
+
* This file should only be used for the GraphVisualizationPreview story,
|
|
29
|
+
* which is used to preview the graph visualization component in the AI Preview.
|
|
30
|
+
* Do not use this file for other stories.
|
|
31
|
+
*/
|
|
32
|
+
//# sourceMappingURL=preview-graph-visualization.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-graph-visualization.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/preview-graph-visualization.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAIjE,QAAA,MAAM,aAAa,EAAE,IAAI,CAAC,OAAO,OAAO,CAQvC,CAAC;AAEF,eAAe,aAAa,CAAC;AAC7B,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAE5C,eAAO,MAAM,mCAAmC,EAAE,KAYjD,CAAC;AAEF;;;;GAIG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
declare const Component: () => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default Component;
|
|
23
|
+
//# sourceMappingURL=preview-graph-visualization.story.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-graph-visualization.story.d.ts","sourceRoot":"","sources":["../../../src/stories/preview-graph-visualization.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AA+CH,QAAA,MAAM,SAAS,+CAoCd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-ndl/react-graph",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "React implementation of the graph visualization from Neo4j Design System",
|
|
6
6
|
"keywords": [
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@types/react-dom": "19.2.3",
|
|
45
45
|
"@storybook/react-vite": "9.0.11",
|
|
46
46
|
"@neo4j-devtools/word-color": "0.0.8",
|
|
47
|
-
"@vitejs/plugin-react": "
|
|
47
|
+
"@vitejs/plugin-react": "5.1.2",
|
|
48
48
|
"react": "19.2.1",
|
|
49
49
|
"typescript": "5.5.4",
|
|
50
50
|
"vitest": "2.1.9"
|
|
@@ -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.
|
|
59
|
-
"@neo4j-ndl/react": "^4.
|
|
58
|
+
"@neo4j-ndl/base": "^4.6.0",
|
|
59
|
+
"@neo4j-ndl/react": "^4.6.0"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"classnames": "2.5.1",
|