@neo4j-ndl/react-graph 2.1.1 → 2.1.3

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 (99) hide show
  1. package/lib/cjs/graph-visualization-buttons.js +85 -20
  2. package/lib/cjs/graph-visualization-buttons.js.map +1 -1
  3. package/lib/esm/graph-visualization-buttons.js +85 -20
  4. package/lib/esm/graph-visualization-buttons.js.map +1 -1
  5. package/lib/types/graph-visualization-buttons.d.ts +13 -5
  6. package/lib/types/graph-visualization-buttons.d.ts.map +1 -1
  7. package/lib/types/graph-visualization.d.ts +58 -3
  8. package/lib/types/graph-visualization.d.ts.map +1 -1
  9. package/package.json +3 -3
  10. package/lib/cjs/stories/graph-visualization-barebones.story.js +0 -93
  11. package/lib/cjs/stories/graph-visualization-barebones.story.js.map +0 -1
  12. package/lib/cjs/stories/graph-visualization-custom.story.js +0 -77
  13. package/lib/cjs/stories/graph-visualization-custom.story.js.map +0 -1
  14. package/lib/cjs/stories/graph-visualization-default.story.js +0 -93
  15. package/lib/cjs/stories/graph-visualization-default.story.js.map +0 -1
  16. package/lib/cjs/stories/graph-visualization-highlighting.story.js +0 -30
  17. package/lib/cjs/stories/graph-visualization-highlighting.story.js.map +0 -1
  18. package/lib/cjs/stories/graph-visualization-maximalist.story.js +0 -107
  19. package/lib/cjs/stories/graph-visualization-maximalist.story.js.map +0 -1
  20. package/lib/cjs/stories/graph-visualization-range-styling.story.js +0 -100
  21. package/lib/cjs/stories/graph-visualization-range-styling.story.js.map +0 -1
  22. package/lib/cjs/stories/graph-visualization-rule-based-styling-advanced.story.js +0 -270
  23. package/lib/cjs/stories/graph-visualization-rule-based-styling-advanced.story.js.map +0 -1
  24. package/lib/cjs/stories/graph-visualization-rule-based-styling-datetime.story.js +0 -181
  25. package/lib/cjs/stories/graph-visualization-rule-based-styling-datetime.story.js.map +0 -1
  26. package/lib/cjs/stories/graph-visualization-rule-based-styling.story.js +0 -81
  27. package/lib/cjs/stories/graph-visualization-rule-based-styling.story.js.map +0 -1
  28. package/lib/cjs/stories/graph-visualization-search.story.js +0 -36
  29. package/lib/cjs/stories/graph-visualization-search.story.js.map +0 -1
  30. package/lib/cjs/stories/graph-visualization-simple-styling.story.js +0 -59
  31. package/lib/cjs/stories/graph-visualization-simple-styling.story.js.map +0 -1
  32. package/lib/cjs/stories/graph-visualization-unique-colors-styling.story.js +0 -71
  33. package/lib/cjs/stories/graph-visualization-unique-colors-styling.story.js.map +0 -1
  34. package/lib/cjs/stories/index.js +0 -80
  35. package/lib/cjs/stories/index.js.map +0 -1
  36. package/lib/cjs/stories/preview-graph-visualization.story.js +0 -68
  37. package/lib/cjs/stories/preview-graph-visualization.story.js.map +0 -1
  38. package/lib/cjs/stories/story-data.js +0 -992
  39. package/lib/cjs/stories/story-data.js.map +0 -1
  40. package/lib/esm/stories/graph-visualization-barebones.story.js +0 -90
  41. package/lib/esm/stories/graph-visualization-barebones.story.js.map +0 -1
  42. package/lib/esm/stories/graph-visualization-custom.story.js +0 -74
  43. package/lib/esm/stories/graph-visualization-custom.story.js.map +0 -1
  44. package/lib/esm/stories/graph-visualization-default.story.js +0 -90
  45. package/lib/esm/stories/graph-visualization-default.story.js.map +0 -1
  46. package/lib/esm/stories/graph-visualization-highlighting.story.js +0 -28
  47. package/lib/esm/stories/graph-visualization-highlighting.story.js.map +0 -1
  48. package/lib/esm/stories/graph-visualization-maximalist.story.js +0 -104
  49. package/lib/esm/stories/graph-visualization-maximalist.story.js.map +0 -1
  50. package/lib/esm/stories/graph-visualization-range-styling.story.js +0 -97
  51. package/lib/esm/stories/graph-visualization-range-styling.story.js.map +0 -1
  52. package/lib/esm/stories/graph-visualization-rule-based-styling-advanced.story.js +0 -267
  53. package/lib/esm/stories/graph-visualization-rule-based-styling-advanced.story.js.map +0 -1
  54. package/lib/esm/stories/graph-visualization-rule-based-styling-datetime.story.js +0 -178
  55. package/lib/esm/stories/graph-visualization-rule-based-styling-datetime.story.js.map +0 -1
  56. package/lib/esm/stories/graph-visualization-rule-based-styling.story.js +0 -78
  57. package/lib/esm/stories/graph-visualization-rule-based-styling.story.js.map +0 -1
  58. package/lib/esm/stories/graph-visualization-search.story.js +0 -34
  59. package/lib/esm/stories/graph-visualization-search.story.js.map +0 -1
  60. package/lib/esm/stories/graph-visualization-simple-styling.story.js +0 -56
  61. package/lib/esm/stories/graph-visualization-simple-styling.story.js.map +0 -1
  62. package/lib/esm/stories/graph-visualization-unique-colors-styling.story.js +0 -69
  63. package/lib/esm/stories/graph-visualization-unique-colors-styling.story.js.map +0 -1
  64. package/lib/esm/stories/index.js +0 -61
  65. package/lib/esm/stories/index.js.map +0 -1
  66. package/lib/esm/stories/preview-graph-visualization.story.js +0 -66
  67. package/lib/esm/stories/preview-graph-visualization.story.js.map +0 -1
  68. package/lib/esm/stories/story-data.js +0 -989
  69. package/lib/esm/stories/story-data.js.map +0 -1
  70. package/lib/types/stories/graph-visualization-barebones.story.d.ts +0 -24
  71. package/lib/types/stories/graph-visualization-barebones.story.d.ts.map +0 -1
  72. package/lib/types/stories/graph-visualization-custom.story.d.ts +0 -24
  73. package/lib/types/stories/graph-visualization-custom.story.d.ts.map +0 -1
  74. package/lib/types/stories/graph-visualization-default.story.d.ts +0 -24
  75. package/lib/types/stories/graph-visualization-default.story.d.ts.map +0 -1
  76. package/lib/types/stories/graph-visualization-highlighting.story.d.ts +0 -23
  77. package/lib/types/stories/graph-visualization-highlighting.story.d.ts.map +0 -1
  78. package/lib/types/stories/graph-visualization-maximalist.story.d.ts +0 -24
  79. package/lib/types/stories/graph-visualization-maximalist.story.d.ts.map +0 -1
  80. package/lib/types/stories/graph-visualization-range-styling.story.d.ts +0 -25
  81. package/lib/types/stories/graph-visualization-range-styling.story.d.ts.map +0 -1
  82. package/lib/types/stories/graph-visualization-rule-based-styling-advanced.story.d.ts +0 -33
  83. package/lib/types/stories/graph-visualization-rule-based-styling-advanced.story.d.ts.map +0 -1
  84. package/lib/types/stories/graph-visualization-rule-based-styling-datetime.story.d.ts +0 -25
  85. package/lib/types/stories/graph-visualization-rule-based-styling-datetime.story.d.ts.map +0 -1
  86. package/lib/types/stories/graph-visualization-rule-based-styling.story.d.ts +0 -25
  87. package/lib/types/stories/graph-visualization-rule-based-styling.story.d.ts.map +0 -1
  88. package/lib/types/stories/graph-visualization-search.story.d.ts +0 -23
  89. package/lib/types/stories/graph-visualization-search.story.d.ts.map +0 -1
  90. package/lib/types/stories/graph-visualization-simple-styling.story.d.ts +0 -25
  91. package/lib/types/stories/graph-visualization-simple-styling.story.d.ts.map +0 -1
  92. package/lib/types/stories/graph-visualization-unique-colors-styling.story.d.ts +0 -23
  93. package/lib/types/stories/graph-visualization-unique-colors-styling.story.d.ts.map +0 -1
  94. package/lib/types/stories/index.d.ts +0 -47
  95. package/lib/types/stories/index.d.ts.map +0 -1
  96. package/lib/types/stories/preview-graph-visualization.story.d.ts +0 -23
  97. package/lib/types/stories/preview-graph-visualization.story.d.ts.map +0 -1
  98. package/lib/types/stories/story-data.d.ts +0 -31
  99. package/lib/types/stories/story-data.d.ts.map +0 -1
@@ -1,78 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
3
- *
4
- * Copyright (c) "Neo4j"
5
- * Neo4j Sweden AB [http://neo4j.com]
6
- *
7
- * This file is part of Neo4j.
8
- *
9
- * Neo4j is free software: you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation, either version 3 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
- */
22
- import { GraphVisualization } from '../graph-visualization';
23
- import { containerClasses, StoryGraph } from './story-data';
24
- export const styleRules = [
25
- {
26
- // Nodes are teal by default
27
- match: { label: null },
28
- apply: { color: { value: 'teal' } },
29
- },
30
- {
31
- // Type named dragon becomes purple
32
- match: { label: 'Type' },
33
- where: { equal: [{ property: 'name' }, 'Dragon'] },
34
- apply: { color: { value: '#9b59b6' } },
35
- },
36
- // Awesome and heavy Pokemon become larger
37
- {
38
- match: { label: 'Pokemon' },
39
- where: {
40
- and: [
41
- { equal: [{ property: 'isAwesome' }, true] },
42
- { greaterThan: [{ property: 'weight' }, 300] },
43
- ],
44
- },
45
- apply: {
46
- size: { value: 50 },
47
- },
48
- },
49
- // Pokemon are red by default
50
- {
51
- match: { label: 'Pokemon' },
52
- apply: {
53
- color: { value: '#ff6b6b' },
54
- captions: {
55
- text: [
56
- { value: 'Pokemon', styles: ['bold'] },
57
- { value: { property: 'name' } },
58
- ],
59
- },
60
- },
61
- },
62
- {
63
- // Pokemon that are also have the label Legendary become gold instead
64
- match: { label: 'Pokemon' },
65
- where: { label: 'Legendary' },
66
- apply: {
67
- color: { value: 'gold' },
68
- captions: {
69
- text: [{ value: { property: 'name' }, styles: ['bold', 'underline'] }],
70
- },
71
- },
72
- },
73
- ];
74
- const Component = () => {
75
- return (_jsx("div", { style: { height: '600px' }, children: _jsx(GraphVisualization, { nodes: StoryGraph.nodes, rels: StoryGraph.rels, className: containerClasses, styleRules: styleRules }) }));
76
- };
77
- export default Component;
78
- //# sourceMappingURL=graph-visualization-rule-based-styling.story.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graph-visualization-rule-based-styling.story.js","sourceRoot":"","sources":["../../../src/stories/graph-visualization-rule-based-styling.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,CAAC,MAAM,UAAU,GAAqB;IAC1C;QACE,4BAA4B;QAC5B,KAAK,EAAE,EAAE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Q,EAAE;gBACR,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC;aACvE;SACF;KACF;CACF,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,KAAC,kBAAkB,IACjB,KAAK,EAAE,UAAU,CAAC,KAAK,EACvB,IAAI,EAAE,UAAU,CAAC,IAAI,EACrB,SAAS,EAAE,gBAAgB,EAC3B,UAAU,EAAE,UAAU,GACtB,GACE,CACP,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 { GraphVisualization } from '../graph-visualization';\nimport { type GraphStyleRule } from '../styling/style-types';\nimport { containerClasses, StoryGraph } from './story-data';\n\nexport const styleRules: GraphStyleRule[] = [\n {\n // Nodes are teal by default\n match: { label: null },\n apply: { color: { value: 'teal' } },\n },\n {\n // Type named dragon becomes purple\n match: { label: 'Type' },\n where: { equal: [{ property: 'name' }, 'Dragon'] },\n apply: { color: { value: '#9b59b6' } },\n },\n // Awesome and heavy Pokemon become larger\n {\n match: { label: 'Pokemon' },\n where: {\n and: [\n { equal: [{ property: 'isAwesome' }, true] },\n { greaterThan: [{ property: 'weight' }, 300] },\n ],\n },\n apply: {\n size: { value: 50 },\n },\n },\n // Pokemon are red by default\n {\n match: { label: 'Pokemon' },\n apply: {\n color: { value: '#ff6b6b' },\n captions: {\n text: [\n { value: 'Pokemon', styles: ['bold'] },\n { value: { property: 'name' } },\n ],\n },\n },\n },\n {\n // Pokemon that are also have the label Legendary become gold instead\n match: { label: 'Pokemon' },\n where: { label: 'Legendary' },\n apply: {\n color: { value: 'gold' },\n captions: {\n text: [{ value: { property: 'name' }, styles: ['bold', 'underline'] }],\n },\n },\n },\n];\n\nconst Component = () => {\n return (\n <div style={{ height: '600px' }}>\n <GraphVisualization\n nodes={StoryGraph.nodes}\n rels={StoryGraph.rels}\n className={containerClasses}\n styleRules={styleRules}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -1,34 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
3
- *
4
- * Copyright (c) "Neo4j"
5
- * Neo4j Sweden AB [http://neo4j.com]
6
- *
7
- * This file is part of Neo4j.
8
- *
9
- * Neo4j is free software: you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation, either version 3 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
- */
22
- import { useState } from 'react';
23
- import { GraphVisualization } from '../graph-visualization';
24
- import { containerClasses, StoryGraph } from './story-data';
25
- const Component = () => {
26
- const [selectedNodeIds, setSelectedNodeIds] = useState();
27
- const [selectedRelationshipIds, setSelectedRelationshipIds] = useState();
28
- return (_jsx("div", { style: { height: '600px' }, children: _jsx(GraphVisualization, { nodes: StoryGraph.nodes, rels: StoryGraph.rels, className: containerClasses, topRightIsland: _jsx(GraphVisualization.SearchButton, { onSearch: (nodeIds, relationshipIds) => {
29
- setSelectedNodeIds(nodeIds);
30
- setSelectedRelationshipIds(relationshipIds);
31
- } }), highlightedNodeIds: selectedNodeIds, highlightedRelationshipIds: selectedRelationshipIds }) }));
32
- };
33
- export default Component;
34
- //# sourceMappingURL=graph-visualization-search.story.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graph-visualization-search.story.js","sourceRoot":"","sources":["../../../src/stories/graph-visualization-search.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,EAEnD,CAAC;IACJ,MAAM,CAAC,uBAAuB,EAAE,0BAA0B,CAAC,GAAG,QAAQ,EAEnE,CAAC;IAEJ,OAAO,CACL,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,KAAC,kBAAkB,IACjB,KAAK,EAAE,UAAU,CAAC,KAAK,EACvB,IAAI,EAAE,UAAU,CAAC,IAAI,EACrB,SAAS,EAAE,gBAAgB,EAC3B,cAAc,EACZ,KAAC,kBAAkB,CAAC,YAAY,IAC9B,QAAQ,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE;oBACrC,kBAAkB,CAAC,OAAO,CAAC,CAAC;oBAC5B,0BAA0B,CAAC,eAAe,CAAC,CAAC;gBAC9C,CAAC,GACD,EAEJ,kBAAkB,EAAE,eAAe,EACnC,0BAA0B,EAAE,uBAAuB,GACnD,GACE,CACP,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 { useState } from 'react';\n\nimport { GraphVisualization } from '../graph-visualization';\nimport { containerClasses, StoryGraph } from './story-data';\n\nconst Component = () => {\n const [selectedNodeIds, setSelectedNodeIds] = useState<\n string[] | undefined\n >();\n const [selectedRelationshipIds, setSelectedRelationshipIds] = useState<\n string[] | undefined\n >();\n\n return (\n <div style={{ height: '600px' }}>\n <GraphVisualization\n nodes={StoryGraph.nodes}\n rels={StoryGraph.rels}\n className={containerClasses}\n topRightIsland={\n <GraphVisualization.SearchButton\n onSearch={(nodeIds, relationshipIds) => {\n setSelectedNodeIds(nodeIds);\n setSelectedRelationshipIds(relationshipIds);\n }}\n />\n }\n highlightedNodeIds={selectedNodeIds}\n highlightedRelationshipIds={selectedRelationshipIds}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -1,56 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
3
- *
4
- * Copyright (c) "Neo4j"
5
- * Neo4j Sweden AB [http://neo4j.com]
6
- *
7
- * This file is part of Neo4j.
8
- *
9
- * Neo4j is free software: you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation, either version 3 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
- */
22
- import { GraphVisualization } from '../graph-visualization';
23
- import { containerClasses, StoryGraph } from './story-data';
24
- export const simpleStyleRules = [
25
- {
26
- match: { label: 'Pokemon' },
27
- apply: {
28
- color: { value: 'red' }, // Red for Pokemon
29
- captions: {
30
- text: [
31
- { value: 'Pokemon', styles: ['bold'] },
32
- { value: { property: 'name' } },
33
- ],
34
- },
35
- },
36
- },
37
- {
38
- match: { label: 'Type' },
39
- apply: {
40
- color: { value: '#4ecdc4' }, // Teal for Types
41
- },
42
- },
43
- {
44
- match: { reltype: 'HAS_TYPE' },
45
- apply: {
46
- color: { value: '#95a5a6' }, // Gray for relationships
47
- captions: { text: [{ value: 'has type' }] },
48
- width: { value: 2 },
49
- },
50
- },
51
- ];
52
- const Component = () => {
53
- return (_jsx("div", { style: { height: '600px' }, children: _jsx(GraphVisualization, { nodes: StoryGraph.nodes, rels: StoryGraph.rels, className: containerClasses, styleRules: simpleStyleRules }) }));
54
- };
55
- export default Component;
56
- //# sourceMappingURL=graph-visualization-simple-styling.story.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graph-visualization-simple-styling.story.js","sourceRoot":"","sources":["../../../src/stories/graph-visualization-simple-styling.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,CAAC,MAAM,gBAAgB,GAAqB;IAChD;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC3B,KAAK,EAAE;YACL,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,kBAAkB;YAC3C,QAAQ,EAAE;gBACR,IAAI,EAAE;oBACJ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE;oBACtC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE;iBAChC;aACF;SACF;KACF;IACD;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;QACxB,KAAK,EAAE;YACL,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,iBAAiB;SAC/C;KACF;IACD;QACE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;QAC9B,KAAK,EAAE;YACL,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,yBAAyB;YACtD,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE;YAC3C,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;SACpB;KACF;CACF,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,KAAC,kBAAkB,IACjB,KAAK,EAAE,UAAU,CAAC,KAAK,EACvB,IAAI,EAAE,UAAU,CAAC,IAAI,EACrB,SAAS,EAAE,gBAAgB,EAC3B,UAAU,EAAE,gBAAgB,GAC5B,GACE,CACP,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 { GraphVisualization } from '../graph-visualization';\nimport { type GraphStyleRule } from '../styling/style-types';\nimport { containerClasses, StoryGraph } from './story-data';\n\nexport const simpleStyleRules: GraphStyleRule[] = [\n {\n match: { label: 'Pokemon' },\n apply: {\n color: { value: 'red' }, // Red for Pokemon\n captions: {\n text: [\n { value: 'Pokemon', styles: ['bold'] },\n { value: { property: 'name' } },\n ],\n },\n },\n },\n {\n match: { label: 'Type' },\n apply: {\n color: { value: '#4ecdc4' }, // Teal for Types\n },\n },\n {\n match: { reltype: 'HAS_TYPE' },\n apply: {\n color: { value: '#95a5a6' }, // Gray for relationships\n captions: { text: [{ value: 'has type' }] },\n width: { value: 2 },\n },\n },\n];\n\nconst Component = () => {\n return (\n <div style={{ height: '600px' }}>\n <GraphVisualization\n nodes={StoryGraph.nodes}\n rels={StoryGraph.rels}\n className={containerClasses}\n styleRules={simpleStyleRules}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -1,69 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
3
- *
4
- * Copyright (c) "Neo4j"
5
- * Neo4j Sweden AB [http://neo4j.com]
6
- *
7
- * This file is part of Neo4j.
8
- *
9
- * Neo4j is free software: you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation, either version 3 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
- */
22
- import { GraphVisualization } from '../graph-visualization';
23
- import { advancedStoryGraph, containerClasses } from './story-data';
24
- /**
25
- * Uses the Pokémon advancedStoryGraph to demonstrate uniqueColors styling.
26
- * All nodes and relationships default to gray; Trainer nodes are then colored
27
- * by their `reputation` property (Champion, Gym Leader, Rival, Breeder) and
28
- * EVOLVES_TO relationships are colored by their `method` property (Level,
29
- * Friendship, Thunder Stone, etc.).
30
- */
31
- const styleRules = [
32
- {
33
- match: { label: null },
34
- apply: { color: { value: '#aaaaaa' } },
35
- priority: 0,
36
- },
37
- {
38
- match: { reltype: null },
39
- apply: { color: { value: '#aaaaaa' } },
40
- priority: 0,
41
- },
42
- {
43
- match: { label: 'Trainer' },
44
- apply: {
45
- uniqueColors: { onProperty: 'reputation' },
46
- captions: {
47
- text: [
48
- { value: { property: 'name' }, styles: ['bold'] },
49
- { value: ' · ', styles: [] },
50
- { value: { property: 'reputation' }, styles: ['italic'] },
51
- ],
52
- },
53
- },
54
- priority: 1,
55
- },
56
- {
57
- match: { reltype: 'EVOLVES_TO' },
58
- apply: {
59
- uniqueColors: { onProperty: 'method' },
60
- captions: { text: [{ value: { property: 'method' } }] },
61
- },
62
- priority: 1,
63
- },
64
- ];
65
- const Component = () => {
66
- return (_jsx("div", { style: { height: '600px' }, children: _jsx(GraphVisualization, { nodes: advancedStoryGraph.nodes, rels: advancedStoryGraph.rels, className: containerClasses, styleRules: styleRules }) }));
67
- };
68
- export default Component;
69
- //# sourceMappingURL=graph-visualization-unique-colors-styling.story.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graph-visualization-unique-colors-styling.story.js","sourceRoot":"","sources":["../../../src/stories/graph-visualization-unique-colors-styling.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEpE;;;;;;GAMG;AACH,MAAM,UAAU,GAAqB;IACnC;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;QACtB,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAA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AAe,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 { GraphVisualization } from '../graph-visualization';\nimport { type GraphStyleRule } from '../styling/style-types';\nimport { advancedStoryGraph, containerClasses } from './story-data';\n\n/**\n * Uses the Pokémon advancedStoryGraph to demonstrate uniqueColors styling.\n * All nodes and relationships default to gray; Trainer nodes are then colored\n * by their `reputation` property (Champion, Gym Leader, Rival, Breeder) and\n * EVOLVES_TO relationships are colored by their `method` property (Level,\n * Friendship, Thunder Stone, etc.).\n */\nconst styleRules: GraphStyleRule[] = [\n {\n match: { label: null },\n apply: { color: { value: '#aaaaaa' } },\n priority: 0,\n },\n {\n match: { reltype: null },\n apply: { color: { value: '#aaaaaa' } },\n priority: 0,\n },\n {\n match: { label: 'Trainer' },\n apply: {\n uniqueColors: { onProperty: 'reputation' },\n captions: {\n text: [\n { value: { property: 'name' }, styles: ['bold'] },\n { value: ' · ', styles: [] },\n { value: { property: 'reputation' }, styles: ['italic'] },\n ],\n },\n },\n priority: 1,\n },\n {\n match: { reltype: 'EVOLVES_TO' },\n apply: {\n uniqueColors: { onProperty: 'method' },\n captions: { text: [{ value: { property: 'method' } }] },\n },\n priority: 1,\n },\n];\n\nconst Component = () => {\n return (\n <div style={{ height: '600px' }}>\n <GraphVisualization\n nodes={advancedStoryGraph.nodes}\n rels={advancedStoryGraph.rels}\n className={containerClasses}\n styleRules={styleRules}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -1,61 +0,0 @@
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
- export { default as GraphVisualizationBarebones } from './graph-visualization-barebones.story';
22
- export { default as GraphVisualizationCustom } from './graph-visualization-custom.story';
23
- export { default as GraphVisualizationDefault } from './graph-visualization-default.story';
24
- export { default as GraphVisualizationHighlighting } from './graph-visualization-highlighting.story';
25
- export { default as GraphVisualizationMaximalist } from './graph-visualization-maximalist.story';
26
- export { default as GraphVisualizationRangeStyling } from './graph-visualization-range-styling.story';
27
- export { default as GraphVisualizationRuleBasedStylingAdvanced } from './graph-visualization-rule-based-styling-advanced.story';
28
- export { default as GraphVisualizationRuleBasedStylingDateTime } from './graph-visualization-rule-based-styling-datetime.story';
29
- export { default as GraphVisualizationRuleBasedStyling } from './graph-visualization-rule-based-styling.story';
30
- export { default as GraphVisualizationSearch } from './graph-visualization-search.story';
31
- export { default as GraphVisualizationSimpleStyling } from './graph-visualization-simple-styling.story';
32
- export { default as GraphVisualizationUniqueColorsStyling } from './graph-visualization-unique-colors-styling.story';
33
- export { default as PreviewGraphVisualization } from './preview-graph-visualization.story';
34
- import { removeLicenseHeader } from '../utils';
35
- import GraphVisualizationBarebonesSrcRaw from './graph-visualization-barebones.story?raw';
36
- import GraphVisualizationCustomSrcRaw from './graph-visualization-custom.story?raw';
37
- import GraphVisualizationDefaultSrcRaw from './graph-visualization-default.story?raw';
38
- import GraphVisualizationHighlightingSrcRaw from './graph-visualization-highlighting.story?raw';
39
- import GraphVisualizationMaximalistSrcRaw from './graph-visualization-maximalist.story?raw';
40
- import GraphVisualizationRangeStylingRaw from './graph-visualization-range-styling.story?raw';
41
- import GraphVisualizationRuleBasedStylingSrcRaw from './graph-visualization-rule-based-styling.story?raw';
42
- import GraphVisualizationRuleBasedStylingAdvancedSrcRaw from './graph-visualization-rule-based-styling-advanced.story?raw';
43
- import GraphVisualizationRuleBasedStylingDateTimeSrcRaw from './graph-visualization-rule-based-styling-datetime.story?raw';
44
- import GraphVisualizationSearchSrcRaw from './graph-visualization-search.story?raw';
45
- import GraphVisualizationSimpleStylingSrcRaw from './graph-visualization-simple-styling.story?raw';
46
- import GraphVisualizationUniqueColorsStylingRaw from './graph-visualization-unique-colors-styling.story?raw';
47
- import PreviewGraphVisualizationSrcRaw from './preview-graph-visualization.story?raw';
48
- export const GraphVisualizationDefaultSrc = removeLicenseHeader(GraphVisualizationDefaultSrcRaw);
49
- export const GraphVisualizationBarebonesSrc = removeLicenseHeader(GraphVisualizationBarebonesSrcRaw);
50
- export const GraphVisualizationMaximalistSrc = removeLicenseHeader(GraphVisualizationMaximalistSrcRaw);
51
- export const GraphVisualizationCustomSrc = removeLicenseHeader(GraphVisualizationCustomSrcRaw);
52
- export const GraphVisualizationHighlightingSrc = removeLicenseHeader(GraphVisualizationHighlightingSrcRaw);
53
- export const GraphVisualizationSimpleStylingSrc = removeLicenseHeader(GraphVisualizationSimpleStylingSrcRaw);
54
- export const GraphVisualizationRuleBasedStylingSrc = removeLicenseHeader(GraphVisualizationRuleBasedStylingSrcRaw);
55
- export const GraphVisualizationSearchSrc = removeLicenseHeader(GraphVisualizationSearchSrcRaw);
56
- export const GraphVisualizationRuleBasedStylingAdvancedSrc = removeLicenseHeader(GraphVisualizationRuleBasedStylingAdvancedSrcRaw);
57
- export const GraphVisualizationRuleBasedStylingDateTimeSrc = removeLicenseHeader(GraphVisualizationRuleBasedStylingDateTimeSrcRaw);
58
- export const GraphVisualizationRangeStylingSrc = removeLicenseHeader(GraphVisualizationRangeStylingRaw);
59
- export const GraphVisualizationUniqueColorsStylingRawSrc = removeLicenseHeader(GraphVisualizationUniqueColorsStylingRaw);
60
- export const PreviewGraphVisualizationSrc = removeLicenseHeader(PreviewGraphVisualizationSrcRaw);
61
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
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,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AACtG,OAAO,EAAE,OAAO,IAAI,0CAA0C,EAAE,MAAM,yDAAyD,CAAC;AAChI,OAAO,EAAE,OAAO,IAAI,0CAA0C,EAAE,MAAM,yDAAyD,CAAC;AAChI,OAAO,EAAE,OAAO,IAAI,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AAC/G,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AACxG,OAAO,EAAE,OAAO,IAAI,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AACrH,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAE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CAAC,gDAAgD,CAAC,CAAC;AAExE,MAAM,CAAC,MAAM,6CAA6C,GACxD,mBAAmB,CAAC,gDAAgD,CAAC,CAAC;AAExE,MAAM,CAAC,MAAM,iCAAiC,GAAG,mBAAmB,CAClE,iCAAiC,CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,2CAA2C,GAAG,mBAAmB,CAC5E,wCAAwC,CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,mBAAmB,CAC7D,+BAA+B,CAChC,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 GraphVisualizationMaximalist } from './graph-visualization-maximalist.story';\nexport { default as GraphVisualizationRangeStyling } from './graph-visualization-range-styling.story';\nexport { default as GraphVisualizationRuleBasedStylingAdvanced } from './graph-visualization-rule-based-styling-advanced.story';\nexport { default as GraphVisualizationRuleBasedStylingDateTime } from './graph-visualization-rule-based-styling-datetime.story';\nexport { default as GraphVisualizationRuleBasedStyling } from './graph-visualization-rule-based-styling.story';\nexport { default as GraphVisualizationSearch } from './graph-visualization-search.story';\nexport { default as GraphVisualizationSimpleStyling } from './graph-visualization-simple-styling.story';\nexport { default as GraphVisualizationUniqueColorsStyling } from './graph-visualization-unique-colors-styling.story';\nexport { default as PreviewGraphVisualization } from './preview-graph-visualization.story';\n\nimport { removeLicenseHeader } from '../utils';\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 GraphVisualizationRangeStylingRaw from './graph-visualization-range-styling.story?raw';\nimport GraphVisualizationRuleBasedStylingSrcRaw from './graph-visualization-rule-based-styling.story?raw';\nimport GraphVisualizationRuleBasedStylingAdvancedSrcRaw from './graph-visualization-rule-based-styling-advanced.story?raw';\nimport GraphVisualizationRuleBasedStylingDateTimeSrcRaw from './graph-visualization-rule-based-styling-datetime.story?raw';\nimport GraphVisualizationSearchSrcRaw from './graph-visualization-search.story?raw';\nimport GraphVisualizationSimpleStylingSrcRaw from './graph-visualization-simple-styling.story?raw';\nimport GraphVisualizationUniqueColorsStylingRaw from './graph-visualization-unique-colors-styling.story?raw';\nimport PreviewGraphVisualizationSrcRaw from './preview-graph-visualization.story?raw';\n\nexport const GraphVisualizationDefaultSrc = removeLicenseHeader(\n GraphVisualizationDefaultSrcRaw,\n);\n\nexport const GraphVisualizationBarebonesSrc = removeLicenseHeader(\n GraphVisualizationBarebonesSrcRaw,\n);\n\nexport const GraphVisualizationMaximalistSrc = removeLicenseHeader(\n GraphVisualizationMaximalistSrcRaw,\n);\n\nexport const GraphVisualizationCustomSrc = removeLicenseHeader(\n GraphVisualizationCustomSrcRaw,\n);\n\nexport const GraphVisualizationHighlightingSrc = removeLicenseHeader(\n GraphVisualizationHighlightingSrcRaw,\n);\n\nexport const GraphVisualizationSimpleStylingSrc = removeLicenseHeader(\n GraphVisualizationSimpleStylingSrcRaw,\n);\n\nexport const GraphVisualizationRuleBasedStylingSrc = removeLicenseHeader(\n GraphVisualizationRuleBasedStylingSrcRaw,\n);\n\nexport const GraphVisualizationSearchSrc = removeLicenseHeader(\n GraphVisualizationSearchSrcRaw,\n);\n\nexport const GraphVisualizationRuleBasedStylingAdvancedSrc =\n removeLicenseHeader(GraphVisualizationRuleBasedStylingAdvancedSrcRaw);\n\nexport const GraphVisualizationRuleBasedStylingDateTimeSrc =\n removeLicenseHeader(GraphVisualizationRuleBasedStylingDateTimeSrcRaw);\n\nexport const GraphVisualizationRangeStylingSrc = removeLicenseHeader(\n GraphVisualizationRangeStylingRaw,\n);\n\nexport const GraphVisualizationUniqueColorsStylingRawSrc = removeLicenseHeader(\n GraphVisualizationUniqueColorsStylingRaw,\n);\n\nexport const PreviewGraphVisualizationSrc = removeLicenseHeader(\n PreviewGraphVisualizationSrcRaw,\n);\n"]}
@@ -1,66 +0,0 @@
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, bottomCenterIsland: 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
@@ -1 +0,0 @@
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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,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,kBAAkB,EAAE,IAAI,EACxB,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 bottomCenterIsland={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"]}