@neo4j-ndl/react-graph 2.1.0 → 2.1.2

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 +0,0 @@
1
- {"version":3,"file":"graph-visualization-rule-based-styling-advanced.story.js","sourceRoot":"","sources":["../../../src/stories/graph-visualization-rule-based-styling-advanced.story.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,gEAA4D;AAE5D,6CAAoE;AAEvD,QAAA,gBAAgB,GAAqB;IAChD;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;QACtB,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE;KAC/B;CACF,CAAC;AAEW,QAAA,YAAY,GAAqB;IAC5C;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC3B,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,YAAY,CAAC,EAAE;QAC5D,QAAQ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G,wBAAgB;IACnB,GAAG,oBAAY;IACf,GAAG,oBAAY;IACf,GAAG,iBAAS;IACZ,GAAG,gBAAQ;IACX,GAAG,uBAAe;IAClB,GAAG,sBAAc;IACjB,GAAG,yBAAiB;CACrB,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,gCAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,uBAAC,wCAAkB,IACjB,KAAK,EAAE,+BAAkB,CAAC,KAAK,EAC/B,IAAI,EAAE,+BAAkB,CAAC,IAAI,EAC7B,SAAS,EAAE,6BAAgB,EAC3B,UAAU,EAAE,0BAAkB,GAC9B,GACE,CACP,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 { GraphVisualization } from '../graph-visualization';\nimport { type GraphStyleRule } from '../styling/style-types';\nimport { advancedStoryGraph, containerClasses } from './story-data';\n\nexport const defaultNodeRules: GraphStyleRule[] = [\n {\n match: { label: null },\n apply: { size: { value: 10 } },\n },\n];\n\nexport const trainerRules: GraphStyleRule[] = [\n {\n match: { label: 'Trainer' },\n where: { equal: [{ property: 'reputation' }, 'Gym Leader'] },\n priority: 20, // Gym Leaders are special - should override level-based styling\n apply: {\n color: { value: '#9b59b6' },\n captions: {\n text: [\n { value: { property: 'name' }, styles: ['bold'] },\n { value: ' 🏆', styles: [] },\n { value: ' Gym Leader', styles: ['italic'] },\n ],\n align: 'bottom',\n },\n size: { value: 45 },\n },\n },\n {\n match: { label: 'Trainer' },\n where: { greaterThanOrEqual: [{ property: 'level' }, 85] },\n priority: 10, // Base high-level styling\n apply: {\n size: { value: 30 },\n captions: {\n text: [\n { value: { property: 'name' }, styles: ['bold'] },\n { value: ' (Lv ', styles: [] },\n { value: { property: 'level' }, styles: [] },\n { value: ')', styles: [] },\n ],\n size: 2,\n },\n },\n },\n];\n\nexport const pokemonRules: GraphStyleRule[] = [\n // Make the 'saur family green is our highest priority\n {\n match: { label: 'Pokemon' },\n where: { endsWith: [{ property: 'name' }, 'saur'] },\n priority: 50,\n apply: {\n color: { value: '#2ecc71' },\n captions: {\n text: [\n { value: '🌿 ', styles: [] },\n { value: { property: 'name' }, styles: ['bold', 'italic'] },\n ],\n },\n },\n },\n {\n match: { label: 'Pokemon' },\n where: { equal: [{ property: 'is_starter' }, true] },\n apply: {\n color: { value: '#f39c12' },\n captions: {\n text: [\n { value: { property: 'name' }, styles: ['bold'] },\n { value: ' ⭐', styles: [] },\n ],\n },\n size: { value: 40 },\n },\n },\n {\n match: { label: 'Pokemon' },\n where: { greaterThanOrEqual: [{ property: 'level' }, 85] },\n priority: 30, // High-level Pokemon override starter styling\n apply: {\n color: { value: '#c0392b' },\n captions: {\n text: [\n { value: '💪 ', styles: [] },\n { value: { property: 'name' }, styles: ['bold'] },\n { value: ' Lv', styles: [] },\n { value: { property: 'level' }, styles: [] },\n ],\n },\n size: { value: 42 },\n },\n },\n {\n match: { label: 'Pokemon' },\n where: { lessThan: [{ property: 'catch_rate' }, 50] },\n priority: 40, // Rare caption is our second highest priority\n apply: {\n captions: {\n text: [\n { value: { property: 'name' }, styles: ['bold'] },\n { value: ' (Rare)', styles: ['italic'] },\n ],\n },\n },\n },\n {\n match: { label: 'Pokemon' },\n where: {\n and: [\n { lessThan: [{ property: 'level' }, 10] },\n { not: { equal: [{ property: 'is_starter' }, true] } },\n ],\n },\n priority: 15, // Baby Pokemon get special styling\n apply: {\n size: { value: 25 },\n color: { value: '#95a5a6' },\n captions: {\n text: [\n { value: { property: 'name' }, styles: ['italic'] },\n { value: ' (Smol)', styles: [] },\n ],\n },\n },\n },\n];\n\nexport const typeRules: GraphStyleRule[] = [\n {\n match: { label: 'Type' },\n where: {\n or: [\n { equal: [{ property: 'name' }, 'Grass'] },\n { equal: [{ property: 'name' }, 'Poison'] },\n ],\n },\n apply: {\n color: { value: '#27ae60' },\n },\n },\n];\n\nexport const gymRules: GraphStyleRule[] = [\n {\n match: { label: 'Gym' },\n apply: {\n color: { value: '#8e44ad' },\n size: { value: 48 },\n captions: {\n text: [\n { value: '🏛️ ', styles: [] },\n { value: { property: 'name' }, styles: ['bold', 'underline'] },\n ],\n align: 'top',\n },\n },\n },\n];\n\nexport const battledRelRules: GraphStyleRule[] = [\n {\n match: { reltype: 'BATTLED' },\n where: { equal: [{ property: 'won' }, true] },\n apply: {\n color: { value: '#27ae60' },\n width: { value: 4 },\n captions: { text: [{ value: 'WON BATTLE', styles: ['bold'] }], size: 2 },\n },\n },\n {\n match: { reltype: 'BATTLED' },\n where: { equal: [{ property: 'won' }, false] },\n apply: {\n color: { value: '#e74c3c' },\n width: { value: 2 },\n captions: {\n text: [{ value: 'LOST BATTLE', styles: ['italic'] }],\n size: 2,\n },\n },\n },\n];\n\nexport const caughtRelRules: GraphStyleRule[] = [\n {\n match: { reltype: 'CAUGHT' },\n apply: {\n color: { value: '#e91e63' },\n width: { value: 3 },\n captions: {\n text: [\n { value: 'Caught @ Lv', styles: [] },\n { value: { property: 'level' }, styles: ['bold'] },\n ],\n size: 1.5,\n },\n },\n },\n];\n\nexport const evolvesToRelRules: GraphStyleRule[] = [\n {\n match: { reltype: 'EVOLVES_TO' },\n apply: {\n color: { value: '#16a085' },\n width: { value: 2 },\n captions: { text: [{ value: '→', styles: ['bold'] }] },\n },\n },\n {\n match: { reltype: 'EVOLVES_TO' },\n where: { equal: [{ property: 'method' }, 'Level'] },\n priority: 1,\n apply: {\n captions: {\n text: [\n { value: '→ Lv', styles: [] },\n { value: { property: 'level' }, styles: ['bold'] },\n ],\n },\n },\n },\n {\n match: { reltype: 'EVOLVES_TO' },\n where: { not: { equal: [{ property: 'method' }, 'Level'] } },\n priority: 1,\n apply: {\n color: { value: '#8e44ad' },\n captions: {\n text: [\n { value: '→ ', styles: [] },\n { value: { property: 'method' }, styles: ['italic'] },\n ],\n },\n },\n },\n];\n\nexport const advancedStyleRules: GraphStyleRule[] = [\n ...defaultNodeRules,\n ...trainerRules,\n ...pokemonRules,\n ...typeRules,\n ...gymRules,\n ...battledRelRules,\n ...caughtRelRules,\n ...evolvesToRelRules,\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={advancedStyleRules}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -1,181 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dateTimeStyleRules = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- /**
6
- *
7
- * Copyright (c) "Neo4j"
8
- * Neo4j Sweden AB [http://neo4j.com]
9
- *
10
- * This file is part of Neo4j.
11
- *
12
- * Neo4j is free software: you can redistribute it and/or modify
13
- * it under the terms of the GNU General Public License as published by
14
- * the Free Software Foundation, either version 3 of the License, or
15
- * (at your option) any later version.
16
- *
17
- * This program is distributed in the hope that it will be useful,
18
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
- * GNU General Public License for more details.
21
- *
22
- * You should have received a copy of the GNU General Public License
23
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
- */
25
- const graph_visualization_1 = require("../graph-visualization");
26
- const story_data_1 = require("./story-data");
27
- /** Neo4j driver-style portable DateTime property (ISO string in `stringified`). */
28
- function dateTimeProp(iso) {
29
- return { stringified: JSON.stringify(iso), type: 'DateTime' };
30
- }
31
- /** Neo4j driver-style portable LocalTime property. */
32
- function localTimeProp(time) {
33
- return { stringified: JSON.stringify(time), type: 'LocalTime' };
34
- }
35
- /**
36
- * Pokemon nodes with `firstSeen` (DateTime) and optional `peakActivity` (LocalTime).
37
- * Values use UTC offsets and RFC 9557 IANA brackets where noted.
38
- * Pikachu uses IANA-only form (`…[Europe/Stockholm]`) — no explicit offset required.
39
- */
40
- const dateTimeStoryGraph = {
41
- nodes: [
42
- {
43
- id: 'mewtwo',
44
- labels: ['Pokemon'],
45
- properties: {
46
- era: { stringified: '"1996 — Kanto"', type: 'string' },
47
- firstSeen: dateTimeProp('1996-02-27T00:00:00Z'),
48
- name: { stringified: '"Mewtwo"', type: 'string' },
49
- },
50
- },
51
- {
52
- id: 'eevee',
53
- labels: ['Pokemon'],
54
- properties: {
55
- era: { stringified: '"2024 — Paldea"', type: 'string' },
56
- firstSeen: dateTimeProp('2024-01-15T10:00:00+01:00'),
57
- name: { stringified: '"Eevee"', type: 'string' },
58
- },
59
- },
60
- {
61
- id: 'pikachu',
62
- labels: ['Pokemon'],
63
- properties: {
64
- era: { stringified: '"2024 — Stockholm CEST"', type: 'string' },
65
- // RFC 9557: local time in Europe/Stockholm — offset inferred (CEST in June)
66
- firstSeen: dateTimeProp('2024-06-15T14:00:00[Europe/Stockholm]'),
67
- name: { stringified: '"Pikachu"', type: 'string' },
68
- peakActivity: localTimeProp('14:30:00'),
69
- },
70
- },
71
- {
72
- id: 'charizard',
73
- labels: ['Pokemon'],
74
- properties: {
75
- era: { stringified: '"2024 — New York EDT"', type: 'string' },
76
- firstSeen: dateTimeProp('2024-07-04T12:00:00-04:00[America/New_York]'),
77
- name: { stringified: '"Charizard"', type: 'string' },
78
- peakActivity: localTimeProp('09:00:00'),
79
- },
80
- },
81
- {
82
- id: 'dragon-type',
83
- labels: ['Type'],
84
- properties: { name: { stringified: '"Dragon"', type: 'string' } },
85
- },
86
- ],
87
- rels: [
88
- {
89
- from: 'mewtwo',
90
- id: 'rel1',
91
- properties: {},
92
- to: 'dragon-type',
93
- type: 'HAS_TYPE',
94
- },
95
- {
96
- from: 'pikachu',
97
- id: 'rel2',
98
- properties: {},
99
- to: 'dragon-type',
100
- type: 'HAS_TYPE',
101
- },
102
- {
103
- from: 'charizard',
104
- id: 'rel3',
105
- properties: {},
106
- to: 'dragon-type',
107
- type: 'HAS_TYPE',
108
- },
109
- ],
110
- };
111
- exports.dateTimeStyleRules = [
112
- {
113
- // Default slate for all Pokemon
114
- match: { label: 'Pokemon' },
115
- apply: {
116
- color: { value: '#94a3b8' },
117
- captions: {
118
- text: [
119
- { value: { property: 'name' }, styles: ['bold'] },
120
- { value: '\n', styles: [] },
121
- { value: { property: 'era' }, styles: ['italic'] },
122
- ],
123
- },
124
- size: { value: 28 },
125
- },
126
- },
127
- {
128
- // firstSeen in 2024 or later (UTC midnight boundary)
129
- match: { label: 'Pokemon' },
130
- where: {
131
- greaterThanOrEqual: [
132
- { property: 'firstSeen' },
133
- { datetime: '2024-01-01T00:00:00Z' },
134
- ],
135
- },
136
- priority: 10,
137
- apply: { color: { value: '#22c55e' } },
138
- },
139
- {
140
- // firstSeen from mid-2024 onward
141
- match: { label: 'Pokemon' },
142
- where: {
143
- greaterThanOrEqual: [
144
- { property: 'firstSeen' },
145
- { datetime: '2024-06-01T00:00:00Z' },
146
- ],
147
- },
148
- priority: 20,
149
- apply: { color: { value: '#f97316' }, size: { value: 36 } },
150
- },
151
- {
152
- // Very recent sightings (June 2024+) — Charizard qualifies
153
- match: { label: 'Pokemon' },
154
- where: {
155
- greaterThanOrEqual: [
156
- { property: 'firstSeen' },
157
- { datetime: '2024-06-15T14:00:00Z' },
158
- ],
159
- },
160
- priority: 30,
161
- apply: { color: { value: '#eab308' }, size: { value: 44 } },
162
- },
163
- {
164
- // Afternoon-active Pokemon: peakActivity after noon UTC
165
- match: { label: 'Pokemon' },
166
- where: {
167
- greaterThanOrEqual: [{ property: 'peakActivity' }, { time: '12:00:00Z' }],
168
- },
169
- priority: 40,
170
- apply: { size: { value: 50 } },
171
- },
172
- {
173
- match: { label: 'Type' },
174
- apply: { color: { value: '#6366f1' }, size: { value: 22 } },
175
- },
176
- ];
177
- const Component = () => {
178
- return ((0, jsx_runtime_1.jsx)("div", { style: { height: '600px' }, children: (0, jsx_runtime_1.jsx)(graph_visualization_1.GraphVisualization, { nodes: dateTimeStoryGraph.nodes, rels: dateTimeStoryGraph.rels, className: story_data_1.containerClasses, styleRules: exports.dateTimeStyleRules }) }));
179
- };
180
- exports.default = Component;
181
- //# sourceMappingURL=graph-visualization-rule-based-styling-datetime.story.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graph-visualization-rule-based-styling-datetime.story.js","sourceRoot":"","sources":["../../../src/stories/graph-visualization-rule-based-styling-datetime.story.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,gEAA4D;AAO5D,6CAAgD;AAEhD,mFAAmF;AACnF,SAAS,YAAY,CAAC,GAAW;IAC/B,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AAChE,CAAC;AAED,sDAAsD;AACtD,SAAS,aAAa,CAAC,IAAY;IACjC,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;AAClE,CAAC;AAED;;;;GAIG;AACH,MAAM,kBAAkB,GAAyC;IAC/D,KAAK,EAAE;QACL;YACE,EAAE,EAAE,QAAQ;YACZ,MAAM,EAAE,CAAC,SAAS,CAAC;YACnB,UAAU,EAAE;gBACV,GAAG,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACtD,SAAS,EAAE,YAAY,CAAC,sBAAsB,CAAC;gBAC/C,IAAI,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AAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,uBAAC,wCAAkB,IACjB,KAAK,EAAE,kBAAkB,CAAC,KAAK,EAC/B,IAAI,EAAE,kBAAkB,CAAC,IAAI,EAC7B,SAAS,EAAE,6BAAgB,EAC3B,UAAU,EAAE,0BAAkB,GAC9B,GACE,CACP,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 { GraphVisualization } from '../graph-visualization';\nimport {\n type NeoNode,\n type NeoRel,\n type PortableProperty,\n} from '../graph-visualization-context';\nimport { type GraphStyleRule } from '../styling/style-types';\nimport { containerClasses } from './story-data';\n\n/** Neo4j driver-style portable DateTime property (ISO string in `stringified`). */\nfunction dateTimeProp(iso: string): PortableProperty {\n return { stringified: JSON.stringify(iso), type: 'DateTime' };\n}\n\n/** Neo4j driver-style portable LocalTime property. */\nfunction localTimeProp(time: string): PortableProperty {\n return { stringified: JSON.stringify(time), type: 'LocalTime' };\n}\n\n/**\n * Pokemon nodes with `firstSeen` (DateTime) and optional `peakActivity` (LocalTime).\n * Values use UTC offsets and RFC 9557 IANA brackets where noted.\n * Pikachu uses IANA-only form (`…[Europe/Stockholm]`) — no explicit offset required.\n */\nconst dateTimeStoryGraph: { nodes: NeoNode[]; rels: NeoRel[] } = {\n nodes: [\n {\n id: 'mewtwo',\n labels: ['Pokemon'],\n properties: {\n era: { stringified: '\"1996 — Kanto\"', type: 'string' },\n firstSeen: dateTimeProp('1996-02-27T00:00:00Z'),\n name: { stringified: '\"Mewtwo\"', type: 'string' },\n },\n },\n {\n id: 'eevee',\n labels: ['Pokemon'],\n properties: {\n era: { stringified: '\"2024 — Paldea\"', type: 'string' },\n firstSeen: dateTimeProp('2024-01-15T10:00:00+01:00'),\n name: { stringified: '\"Eevee\"', type: 'string' },\n },\n },\n {\n id: 'pikachu',\n labels: ['Pokemon'],\n properties: {\n era: { stringified: '\"2024 — Stockholm CEST\"', type: 'string' },\n // RFC 9557: local time in Europe/Stockholm — offset inferred (CEST in June)\n firstSeen: dateTimeProp('2024-06-15T14:00:00[Europe/Stockholm]'),\n name: { stringified: '\"Pikachu\"', type: 'string' },\n peakActivity: localTimeProp('14:30:00'),\n },\n },\n {\n id: 'charizard',\n labels: ['Pokemon'],\n properties: {\n era: { stringified: '\"2024 — New York EDT\"', type: 'string' },\n firstSeen: dateTimeProp('2024-07-04T12:00:00-04:00[America/New_York]'),\n name: { stringified: '\"Charizard\"', type: 'string' },\n peakActivity: localTimeProp('09:00:00'),\n },\n },\n {\n id: 'dragon-type',\n labels: ['Type'],\n properties: { name: { stringified: '\"Dragon\"', type: 'string' } },\n },\n ],\n rels: [\n {\n from: 'mewtwo',\n id: 'rel1',\n properties: {},\n to: 'dragon-type',\n type: 'HAS_TYPE',\n },\n {\n from: 'pikachu',\n id: 'rel2',\n properties: {},\n to: 'dragon-type',\n type: 'HAS_TYPE',\n },\n {\n from: 'charizard',\n id: 'rel3',\n properties: {},\n to: 'dragon-type',\n type: 'HAS_TYPE',\n },\n ],\n};\n\nexport const dateTimeStyleRules: GraphStyleRule[] = [\n {\n // Default slate for all Pokemon\n match: { label: 'Pokemon' },\n apply: {\n color: { value: '#94a3b8' },\n captions: {\n text: [\n { value: { property: 'name' }, styles: ['bold'] },\n { value: '\\n', styles: [] },\n { value: { property: 'era' }, styles: ['italic'] },\n ],\n },\n size: { value: 28 },\n },\n },\n {\n // firstSeen in 2024 or later (UTC midnight boundary)\n match: { label: 'Pokemon' },\n where: {\n greaterThanOrEqual: [\n { property: 'firstSeen' },\n { datetime: '2024-01-01T00:00:00Z' },\n ],\n },\n priority: 10,\n apply: { color: { value: '#22c55e' } },\n },\n {\n // firstSeen from mid-2024 onward\n match: { label: 'Pokemon' },\n where: {\n greaterThanOrEqual: [\n { property: 'firstSeen' },\n { datetime: '2024-06-01T00:00:00Z' },\n ],\n },\n priority: 20,\n apply: { color: { value: '#f97316' }, size: { value: 36 } },\n },\n {\n // Very recent sightings (June 2024+) — Charizard qualifies\n match: { label: 'Pokemon' },\n where: {\n greaterThanOrEqual: [\n { property: 'firstSeen' },\n { datetime: '2024-06-15T14:00:00Z' },\n ],\n },\n priority: 30,\n apply: { color: { value: '#eab308' }, size: { value: 44 } },\n },\n {\n // Afternoon-active Pokemon: peakActivity after noon UTC\n match: { label: 'Pokemon' },\n where: {\n greaterThanOrEqual: [{ property: 'peakActivity' }, { time: '12:00:00Z' }],\n },\n priority: 40,\n apply: { size: { value: 50 } },\n },\n {\n match: { label: 'Type' },\n apply: { color: { value: '#6366f1' }, size: { value: 22 } },\n },\n];\n\nconst Component = () => {\n return (\n <div style={{ height: '600px' }}>\n <GraphVisualization\n nodes={dateTimeStoryGraph.nodes}\n rels={dateTimeStoryGraph.rels}\n className={containerClasses}\n styleRules={dateTimeStyleRules}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -1,81 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.styleRules = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- /**
6
- *
7
- * Copyright (c) "Neo4j"
8
- * Neo4j Sweden AB [http://neo4j.com]
9
- *
10
- * This file is part of Neo4j.
11
- *
12
- * Neo4j is free software: you can redistribute it and/or modify
13
- * it under the terms of the GNU General Public License as published by
14
- * the Free Software Foundation, either version 3 of the License, or
15
- * (at your option) any later version.
16
- *
17
- * This program is distributed in the hope that it will be useful,
18
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
- * GNU General Public License for more details.
21
- *
22
- * You should have received a copy of the GNU General Public License
23
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
- */
25
- const graph_visualization_1 = require("../graph-visualization");
26
- const story_data_1 = require("./story-data");
27
- exports.styleRules = [
28
- {
29
- // Nodes are teal by default
30
- match: { label: null },
31
- apply: { color: { value: 'teal' } },
32
- },
33
- {
34
- // Type named dragon becomes purple
35
- match: { label: 'Type' },
36
- where: { equal: [{ property: 'name' }, 'Dragon'] },
37
- apply: { color: { value: '#9b59b6' } },
38
- },
39
- // Awesome and heavy Pokemon become larger
40
- {
41
- match: { label: 'Pokemon' },
42
- where: {
43
- and: [
44
- { equal: [{ property: 'isAwesome' }, true] },
45
- { greaterThan: [{ property: 'weight' }, 300] },
46
- ],
47
- },
48
- apply: {
49
- size: { value: 50 },
50
- },
51
- },
52
- // Pokemon are red by default
53
- {
54
- match: { label: 'Pokemon' },
55
- apply: {
56
- color: { value: '#ff6b6b' },
57
- captions: {
58
- text: [
59
- { value: 'Pokemon', styles: ['bold'] },
60
- { value: { property: 'name' } },
61
- ],
62
- },
63
- },
64
- },
65
- {
66
- // Pokemon that are also have the label Legendary become gold instead
67
- match: { label: 'Pokemon' },
68
- where: { label: 'Legendary' },
69
- apply: {
70
- color: { value: 'gold' },
71
- captions: {
72
- text: [{ value: { property: 'name' }, styles: ['bold', 'underline'] }],
73
- },
74
- },
75
- },
76
- ];
77
- const Component = () => {
78
- return ((0, jsx_runtime_1.jsx)("div", { style: { height: '600px' }, children: (0, jsx_runtime_1.jsx)(graph_visualization_1.GraphVisualization, { nodes: story_data_1.StoryGraph.nodes, rels: story_data_1.StoryGraph.rels, className: story_data_1.containerClasses, styleRules: exports.styleRules }) }));
79
- };
80
- exports.default = Component;
81
- //# 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,gEAA4D;AAE5D,6CAA4D;AAE/C,QAAA,UAAU,GAAqB;IAC1C;QACE,4BAA4B;QAC5B,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;QACtB,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;KACpC;IACD;QACE,mCAAmC;QACnC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;QACxB,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAE;QAClD,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE;KACvC;IACD,0CAA0C;IAC1C;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC3B,KAAK,EAAE;YACL,GAAG,EAAE;gBACH,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,IAAI,CAAC,EAAE;gBAC5C,EAAE,WAAW,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,GAAG,CAAC,EAAE;aAC/C;SACF;QACD,KAAK,EAAE;YACL,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;SACpB;KACF;IACD,6BAA6B;IAC7B;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC3B,KAAK,EAAE;YACL,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;YAC3B,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,qEAAqE;QACrE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC3B,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE;QAC7B,KAAK,EAAE;YACL,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;YACxB,QAAQ,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,gCAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,uBAAC,wCAAkB,IACjB,KAAK,EAAE,uBAAU,CAAC,KAAK,EACvB,IAAI,EAAE,uBAAU,CAAC,IAAI,EACrB,SAAS,EAAE,6BAAgB,EAC3B,UAAU,EAAE,kBAAU,GACtB,GACE,CACP,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 { 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,36 +0,0 @@
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("react");
25
- const graph_visualization_1 = require("../graph-visualization");
26
- const story_data_1 = require("./story-data");
27
- const Component = () => {
28
- const [selectedNodeIds, setSelectedNodeIds] = (0, react_1.useState)();
29
- const [selectedRelationshipIds, setSelectedRelationshipIds] = (0, react_1.useState)();
30
- return ((0, jsx_runtime_1.jsx)("div", { style: { height: '600px' }, children: (0, jsx_runtime_1.jsx)(graph_visualization_1.GraphVisualization, { nodes: story_data_1.StoryGraph.nodes, rels: story_data_1.StoryGraph.rels, className: story_data_1.containerClasses, topRightIsland: (0, jsx_runtime_1.jsx)(graph_visualization_1.GraphVisualization.SearchButton, { onSearch: (nodeIds, relationshipIds) => {
31
- setSelectedNodeIds(nodeIds);
32
- setSelectedRelationshipIds(relationshipIds);
33
- } }), highlightedNodeIds: selectedNodeIds, highlightedRelationshipIds: selectedRelationshipIds }) }));
34
- };
35
- exports.default = Component;
36
- //# 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,iCAAiC;AAEjC,gEAA4D;AAC5D,6CAA4D;AAE5D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,IAAA,gBAAQ,GAEnD,CAAC;IACJ,MAAM,CAAC,uBAAuB,EAAE,0BAA0B,CAAC,GAAG,IAAA,gBAAQ,GAEnE,CAAC;IAEJ,OAAO,CACL,gCAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,uBAAC,wCAAkB,IACjB,KAAK,EAAE,uBAAU,CAAC,KAAK,EACvB,IAAI,EAAE,uBAAU,CAAC,IAAI,EACrB,SAAS,EAAE,6BAAgB,EAC3B,cAAc,EACZ,uBAAC,wCAAkB,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,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 { 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,59 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.simpleStyleRules = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- /**
6
- *
7
- * Copyright (c) "Neo4j"
8
- * Neo4j Sweden AB [http://neo4j.com]
9
- *
10
- * This file is part of Neo4j.
11
- *
12
- * Neo4j is free software: you can redistribute it and/or modify
13
- * it under the terms of the GNU General Public License as published by
14
- * the Free Software Foundation, either version 3 of the License, or
15
- * (at your option) any later version.
16
- *
17
- * This program is distributed in the hope that it will be useful,
18
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
- * GNU General Public License for more details.
21
- *
22
- * You should have received a copy of the GNU General Public License
23
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
- */
25
- const graph_visualization_1 = require("../graph-visualization");
26
- const story_data_1 = require("./story-data");
27
- exports.simpleStyleRules = [
28
- {
29
- match: { label: 'Pokemon' },
30
- apply: {
31
- color: { value: 'red' }, // Red for Pokemon
32
- captions: {
33
- text: [
34
- { value: 'Pokemon', styles: ['bold'] },
35
- { value: { property: 'name' } },
36
- ],
37
- },
38
- },
39
- },
40
- {
41
- match: { label: 'Type' },
42
- apply: {
43
- color: { value: '#4ecdc4' }, // Teal for Types
44
- },
45
- },
46
- {
47
- match: { reltype: 'HAS_TYPE' },
48
- apply: {
49
- color: { value: '#95a5a6' }, // Gray for relationships
50
- captions: { text: [{ value: 'has type' }] },
51
- width: { value: 2 },
52
- },
53
- },
54
- ];
55
- const Component = () => {
56
- return ((0, jsx_runtime_1.jsx)("div", { style: { height: '600px' }, children: (0, jsx_runtime_1.jsx)(graph_visualization_1.GraphVisualization, { nodes: story_data_1.StoryGraph.nodes, rels: story_data_1.StoryGraph.rels, className: story_data_1.containerClasses, styleRules: exports.simpleStyleRules }) }));
57
- };
58
- exports.default = Component;
59
- //# 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,gEAA4D;AAE5D,6CAA4D;AAE/C,QAAA,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,gCAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,uBAAC,wCAAkB,IACjB,KAAK,EAAE,uBAAU,CAAC,KAAK,EACvB,IAAI,EAAE,uBAAU,CAAC,IAAI,EACrB,SAAS,EAAE,6BAAgB,EAC3B,UAAU,EAAE,wBAAgB,GAC5B,GACE,CACP,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 { 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,71 +0,0 @@
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 graph_visualization_1 = require("../graph-visualization");
25
- const story_data_1 = require("./story-data");
26
- /**
27
- * Uses the Pokémon advancedStoryGraph to demonstrate uniqueColors styling.
28
- * All nodes and relationships default to gray; Trainer nodes are then colored
29
- * by their `reputation` property (Champion, Gym Leader, Rival, Breeder) and
30
- * EVOLVES_TO relationships are colored by their `method` property (Level,
31
- * Friendship, Thunder Stone, etc.).
32
- */
33
- const styleRules = [
34
- {
35
- match: { label: null },
36
- apply: { color: { value: '#aaaaaa' } },
37
- priority: 0,
38
- },
39
- {
40
- match: { reltype: null },
41
- apply: { color: { value: '#aaaaaa' } },
42
- priority: 0,
43
- },
44
- {
45
- match: { label: 'Trainer' },
46
- apply: {
47
- uniqueColors: { onProperty: 'reputation' },
48
- captions: {
49
- text: [
50
- { value: { property: 'name' }, styles: ['bold'] },
51
- { value: ' · ', styles: [] },
52
- { value: { property: 'reputation' }, styles: ['italic'] },
53
- ],
54
- },
55
- },
56
- priority: 1,
57
- },
58
- {
59
- match: { reltype: 'EVOLVES_TO' },
60
- apply: {
61
- uniqueColors: { onProperty: 'method' },
62
- captions: { text: [{ value: { property: 'method' } }] },
63
- },
64
- priority: 1,
65
- },
66
- ];
67
- const Component = () => {
68
- return ((0, jsx_runtime_1.jsx)("div", { style: { height: '600px' }, children: (0, jsx_runtime_1.jsx)(graph_visualization_1.GraphVisualization, { nodes: story_data_1.advancedStoryGraph.nodes, rels: story_data_1.advancedStoryGraph.rels, className: story_data_1.containerClasses, styleRules: styleRules }) }));
69
- };
70
- exports.default = Component;
71
- //# 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,gEAA4D;AAE5D,6CAAoE;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,EAAE;QACtC,QAAQ,EAAE,CAAC;KACZ;IACD;QACE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;QACxB,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE;QACtC,QAAQ,EAAE,CAAC;KACZ;IACD;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC3B,KAAK,EAAE;YACL,YAAY,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE;YAC1C,QAAQ,EAAE;gBACR,IAAI,EAAE;oBACJ,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE;oBACjD,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;oBAC5B,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE;iBAC1D;aACF;SACF;QACD,QAAQ,EAAE,CAAC;KACZ;IACD;QACE,KAAK,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE;QAChC,KAAK,EAAE;YACL,YAAY,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE;YACtC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,CAAC,EAAE;SACxD;QACD,QAAQ,EAAE,CAAC;KACZ;CACF,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,gCAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,uBAAC,wCAAkB,IACjB,KAAK,EAAE,+BAAkB,CAAC,KAAK,EAC/B,IAAI,EAAE,+BAAkB,CAAC,IAAI,EAC7B,SAAS,EAAE,6BAAgB,EAC3B,UAAU,EAAE,UAAU,GACtB,GACE,CACP,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 { 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,80 +0,0 @@
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
- var __importDefault = (this && this.__importDefault) || function (mod) {
23
- return (mod && mod.__esModule) ? mod : { "default": mod };
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.PreviewGraphVisualizationSrc = exports.GraphVisualizationUniqueColorsStylingRawSrc = exports.GraphVisualizationRangeStylingSrc = exports.GraphVisualizationRuleBasedStylingDateTimeSrc = exports.GraphVisualizationRuleBasedStylingAdvancedSrc = exports.GraphVisualizationSearchSrc = exports.GraphVisualizationRuleBasedStylingSrc = exports.GraphVisualizationSimpleStylingSrc = exports.GraphVisualizationHighlightingSrc = exports.GraphVisualizationCustomSrc = exports.GraphVisualizationMaximalistSrc = exports.GraphVisualizationBarebonesSrc = exports.GraphVisualizationDefaultSrc = exports.PreviewGraphVisualization = exports.GraphVisualizationUniqueColorsStyling = exports.GraphVisualizationSimpleStyling = exports.GraphVisualizationSearch = exports.GraphVisualizationRuleBasedStyling = exports.GraphVisualizationRuleBasedStylingDateTime = exports.GraphVisualizationRuleBasedStylingAdvanced = exports.GraphVisualizationRangeStyling = exports.GraphVisualizationMaximalist = exports.GraphVisualizationHighlighting = exports.GraphVisualizationDefault = exports.GraphVisualizationCustom = exports.GraphVisualizationBarebones = void 0;
27
- var graph_visualization_barebones_story_1 = require("./graph-visualization-barebones.story");
28
- Object.defineProperty(exports, "GraphVisualizationBarebones", { enumerable: true, get: function () { return __importDefault(graph_visualization_barebones_story_1).default; } });
29
- var graph_visualization_custom_story_1 = require("./graph-visualization-custom.story");
30
- Object.defineProperty(exports, "GraphVisualizationCustom", { enumerable: true, get: function () { return __importDefault(graph_visualization_custom_story_1).default; } });
31
- var graph_visualization_default_story_1 = require("./graph-visualization-default.story");
32
- Object.defineProperty(exports, "GraphVisualizationDefault", { enumerable: true, get: function () { return __importDefault(graph_visualization_default_story_1).default; } });
33
- var graph_visualization_highlighting_story_1 = require("./graph-visualization-highlighting.story");
34
- Object.defineProperty(exports, "GraphVisualizationHighlighting", { enumerable: true, get: function () { return __importDefault(graph_visualization_highlighting_story_1).default; } });
35
- var graph_visualization_maximalist_story_1 = require("./graph-visualization-maximalist.story");
36
- Object.defineProperty(exports, "GraphVisualizationMaximalist", { enumerable: true, get: function () { return __importDefault(graph_visualization_maximalist_story_1).default; } });
37
- var graph_visualization_range_styling_story_1 = require("./graph-visualization-range-styling.story");
38
- Object.defineProperty(exports, "GraphVisualizationRangeStyling", { enumerable: true, get: function () { return __importDefault(graph_visualization_range_styling_story_1).default; } });
39
- var graph_visualization_rule_based_styling_advanced_story_1 = require("./graph-visualization-rule-based-styling-advanced.story");
40
- Object.defineProperty(exports, "GraphVisualizationRuleBasedStylingAdvanced", { enumerable: true, get: function () { return __importDefault(graph_visualization_rule_based_styling_advanced_story_1).default; } });
41
- var graph_visualization_rule_based_styling_datetime_story_1 = require("./graph-visualization-rule-based-styling-datetime.story");
42
- Object.defineProperty(exports, "GraphVisualizationRuleBasedStylingDateTime", { enumerable: true, get: function () { return __importDefault(graph_visualization_rule_based_styling_datetime_story_1).default; } });
43
- var graph_visualization_rule_based_styling_story_1 = require("./graph-visualization-rule-based-styling.story");
44
- Object.defineProperty(exports, "GraphVisualizationRuleBasedStyling", { enumerable: true, get: function () { return __importDefault(graph_visualization_rule_based_styling_story_1).default; } });
45
- var graph_visualization_search_story_1 = require("./graph-visualization-search.story");
46
- Object.defineProperty(exports, "GraphVisualizationSearch", { enumerable: true, get: function () { return __importDefault(graph_visualization_search_story_1).default; } });
47
- var graph_visualization_simple_styling_story_1 = require("./graph-visualization-simple-styling.story");
48
- Object.defineProperty(exports, "GraphVisualizationSimpleStyling", { enumerable: true, get: function () { return __importDefault(graph_visualization_simple_styling_story_1).default; } });
49
- var graph_visualization_unique_colors_styling_story_1 = require("./graph-visualization-unique-colors-styling.story");
50
- Object.defineProperty(exports, "GraphVisualizationUniqueColorsStyling", { enumerable: true, get: function () { return __importDefault(graph_visualization_unique_colors_styling_story_1).default; } });
51
- var preview_graph_visualization_story_1 = require("./preview-graph-visualization.story");
52
- Object.defineProperty(exports, "PreviewGraphVisualization", { enumerable: true, get: function () { return __importDefault(preview_graph_visualization_story_1).default; } });
53
- const utils_1 = require("../utils");
54
- const graph_visualization_barebones_story_raw_1 = __importDefault(require("./graph-visualization-barebones.story?raw"));
55
- const graph_visualization_custom_story_raw_1 = __importDefault(require("./graph-visualization-custom.story?raw"));
56
- const graph_visualization_default_story_raw_1 = __importDefault(require("./graph-visualization-default.story?raw"));
57
- const graph_visualization_highlighting_story_raw_1 = __importDefault(require("./graph-visualization-highlighting.story?raw"));
58
- const graph_visualization_maximalist_story_raw_1 = __importDefault(require("./graph-visualization-maximalist.story?raw"));
59
- const graph_visualization_range_styling_story_raw_1 = __importDefault(require("./graph-visualization-range-styling.story?raw"));
60
- const graph_visualization_rule_based_styling_story_raw_1 = __importDefault(require("./graph-visualization-rule-based-styling.story?raw"));
61
- const graph_visualization_rule_based_styling_advanced_story_raw_1 = __importDefault(require("./graph-visualization-rule-based-styling-advanced.story?raw"));
62
- const graph_visualization_rule_based_styling_datetime_story_raw_1 = __importDefault(require("./graph-visualization-rule-based-styling-datetime.story?raw"));
63
- const graph_visualization_search_story_raw_1 = __importDefault(require("./graph-visualization-search.story?raw"));
64
- const graph_visualization_simple_styling_story_raw_1 = __importDefault(require("./graph-visualization-simple-styling.story?raw"));
65
- const graph_visualization_unique_colors_styling_story_raw_1 = __importDefault(require("./graph-visualization-unique-colors-styling.story?raw"));
66
- const preview_graph_visualization_story_raw_1 = __importDefault(require("./preview-graph-visualization.story?raw"));
67
- exports.GraphVisualizationDefaultSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_default_story_raw_1.default);
68
- exports.GraphVisualizationBarebonesSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_barebones_story_raw_1.default);
69
- exports.GraphVisualizationMaximalistSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_maximalist_story_raw_1.default);
70
- exports.GraphVisualizationCustomSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_custom_story_raw_1.default);
71
- exports.GraphVisualizationHighlightingSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_highlighting_story_raw_1.default);
72
- exports.GraphVisualizationSimpleStylingSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_simple_styling_story_raw_1.default);
73
- exports.GraphVisualizationRuleBasedStylingSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_rule_based_styling_story_raw_1.default);
74
- exports.GraphVisualizationSearchSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_search_story_raw_1.default);
75
- exports.GraphVisualizationRuleBasedStylingAdvancedSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_rule_based_styling_advanced_story_raw_1.default);
76
- exports.GraphVisualizationRuleBasedStylingDateTimeSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_rule_based_styling_datetime_story_raw_1.default);
77
- exports.GraphVisualizationRangeStylingSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_range_styling_story_raw_1.default);
78
- exports.GraphVisualizationUniqueColorsStylingRawSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_unique_colors_styling_story_raw_1.default);
79
- exports.PreviewGraphVisualizationSrc = (0, utils_1.removeLicenseHeader)(preview_graph_visualization_story_raw_1.default);
80
- //# sourceMappingURL=index.js.map