@neo4j-ndl/react-graph 1.2.43 → 1.3.0

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 (96) hide show
  1. package/lib/cjs/graph-visualization-buttons.js +1 -3
  2. package/lib/cjs/graph-visualization-buttons.js.map +1 -1
  3. package/lib/cjs/graph-visualization-context.js.map +1 -1
  4. package/lib/cjs/graph-visualization.js +7 -5
  5. package/lib/cjs/graph-visualization.js.map +1 -1
  6. package/lib/cjs/index.js.map +1 -1
  7. package/lib/cjs/sidepanel-components/details-panel.js +5 -11
  8. package/lib/cjs/sidepanel-components/details-panel.js.map +1 -1
  9. package/lib/cjs/sidepanel-components/graph-label-wrapper.js +40 -0
  10. package/lib/cjs/sidepanel-components/graph-label-wrapper.js.map +1 -0
  11. package/lib/cjs/sidepanel-components/overview-panel.js +3 -12
  12. package/lib/cjs/sidepanel-components/overview-panel.js.map +1 -1
  13. package/lib/cjs/stories/graph-visualization-rule-based-styling-advanced.story.js +247 -0
  14. package/lib/cjs/stories/graph-visualization-rule-based-styling-advanced.story.js.map +1 -0
  15. package/lib/cjs/stories/graph-visualization-rule-based-styling.story.js +79 -0
  16. package/lib/cjs/stories/graph-visualization-rule-based-styling.story.js.map +1 -0
  17. package/lib/cjs/stories/graph-visualization-simple-styling.story.js +57 -0
  18. package/lib/cjs/stories/graph-visualization-simple-styling.story.js.map +1 -0
  19. package/lib/cjs/stories/index.js +23 -10
  20. package/lib/cjs/stories/index.js.map +1 -1
  21. package/lib/cjs/stories/story-data.js +906 -3
  22. package/lib/cjs/stories/story-data.js.map +1 -1
  23. package/lib/cjs/styling/compile-graph-styles.js +22 -21
  24. package/lib/cjs/styling/compile-graph-styles.js.map +1 -1
  25. package/lib/cjs/styling/create-vis-data-structures.js +126 -0
  26. package/lib/cjs/styling/create-vis-data-structures.js.map +1 -0
  27. package/lib/cjs/styling/use-graph-data.js +35 -0
  28. package/lib/cjs/styling/use-graph-data.js.map +1 -0
  29. package/lib/cjs/utils.js +23 -9
  30. package/lib/cjs/utils.js.map +1 -1
  31. package/lib/esm/graph-visualization-buttons.js +1 -3
  32. package/lib/esm/graph-visualization-buttons.js.map +1 -1
  33. package/lib/esm/graph-visualization-context.js.map +1 -1
  34. package/lib/esm/graph-visualization.js +7 -5
  35. package/lib/esm/graph-visualization.js.map +1 -1
  36. package/lib/esm/index.js.map +1 -1
  37. package/lib/esm/sidepanel-components/details-panel.js +6 -12
  38. package/lib/esm/sidepanel-components/details-panel.js.map +1 -1
  39. package/lib/esm/sidepanel-components/graph-label-wrapper.js +33 -0
  40. package/lib/esm/sidepanel-components/graph-label-wrapper.js.map +1 -0
  41. package/lib/esm/sidepanel-components/overview-panel.js +4 -13
  42. package/lib/esm/sidepanel-components/overview-panel.js.map +1 -1
  43. package/lib/esm/stories/graph-visualization-rule-based-styling-advanced.story.js +244 -0
  44. package/lib/esm/stories/graph-visualization-rule-based-styling-advanced.story.js.map +1 -0
  45. package/lib/esm/stories/graph-visualization-rule-based-styling.story.js +76 -0
  46. package/lib/esm/stories/graph-visualization-rule-based-styling.story.js.map +1 -0
  47. package/lib/esm/stories/graph-visualization-simple-styling.story.js +54 -0
  48. package/lib/esm/stories/graph-visualization-simple-styling.story.js.map +1 -0
  49. package/lib/esm/stories/index.js +18 -8
  50. package/lib/esm/stories/index.js.map +1 -1
  51. package/lib/esm/stories/story-data.js +905 -2
  52. package/lib/esm/stories/story-data.js.map +1 -1
  53. package/lib/esm/styling/compile-graph-styles.js +22 -21
  54. package/lib/esm/styling/compile-graph-styles.js.map +1 -1
  55. package/lib/esm/styling/create-vis-data-structures.js +122 -0
  56. package/lib/esm/styling/create-vis-data-structures.js.map +1 -0
  57. package/lib/esm/styling/use-graph-data.js +32 -0
  58. package/lib/esm/styling/use-graph-data.js.map +1 -0
  59. package/lib/esm/utils.js +20 -8
  60. package/lib/esm/utils.js.map +1 -1
  61. package/lib/types/graph-visualization-buttons.d.ts.map +1 -1
  62. package/lib/types/graph-visualization-context.d.ts +15 -9
  63. package/lib/types/graph-visualization-context.d.ts.map +1 -1
  64. package/lib/types/graph-visualization.d.ts +8 -1
  65. package/lib/types/graph-visualization.d.ts.map +1 -1
  66. package/lib/types/index.d.ts +2 -1
  67. package/lib/types/index.d.ts.map +1 -1
  68. package/lib/types/sidepanel-components/details-panel.d.ts.map +1 -1
  69. package/lib/types/{map-to-nvl-graph.d.ts → sidepanel-components/graph-label-wrapper.d.ts} +10 -17
  70. package/lib/types/sidepanel-components/graph-label-wrapper.d.ts.map +1 -0
  71. package/lib/types/sidepanel-components/overview-panel.d.ts.map +1 -1
  72. package/lib/types/stories/graph-visualization-rule-based-styling-advanced.story.d.ts +33 -0
  73. package/lib/types/stories/graph-visualization-rule-based-styling-advanced.story.d.ts.map +1 -0
  74. package/lib/types/stories/graph-visualization-rule-based-styling.story.d.ts +25 -0
  75. package/lib/types/stories/graph-visualization-rule-based-styling.story.d.ts.map +1 -0
  76. package/lib/types/stories/graph-visualization-simple-styling.story.d.ts +25 -0
  77. package/lib/types/stories/graph-visualization-simple-styling.story.d.ts.map +1 -0
  78. package/lib/types/stories/index.d.ts +7 -1
  79. package/lib/types/stories/index.d.ts.map +1 -1
  80. package/lib/types/stories/story-data.d.ts +4 -0
  81. package/lib/types/stories/story-data.d.ts.map +1 -1
  82. package/lib/types/styling/compile-graph-styles.d.ts +2 -5
  83. package/lib/types/styling/compile-graph-styles.d.ts.map +1 -1
  84. package/lib/types/styling/create-vis-data-structures.d.ts +28 -0
  85. package/lib/types/styling/create-vis-data-structures.d.ts.map +1 -0
  86. package/lib/types/styling/style-types.d.ts +2 -2
  87. package/lib/types/styling/use-graph-data.d.ts +28 -0
  88. package/lib/types/styling/use-graph-data.d.ts.map +1 -0
  89. package/lib/types/utils.d.ts +5 -3
  90. package/lib/types/utils.d.ts.map +1 -1
  91. package/package.json +3 -3
  92. package/lib/cjs/map-to-nvl-graph.js +0 -167
  93. package/lib/cjs/map-to-nvl-graph.js.map +0 -1
  94. package/lib/esm/map-to-nvl-graph.js +0 -162
  95. package/lib/esm/map-to-nvl-graph.js.map +0 -1
  96. package/lib/types/map-to-nvl-graph.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"overview-panel.js","sourceRoot":"","sources":["../../../src/sidepanel-components/overview-panel.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAA0D;AAE1D,gFAA8E;AAC9E,oFAA+E;AAC/E,yCAAqC;AAErC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAEvB,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,0DAA4B,GAAE,CAAC;IAEpD,OAAO,CACL,6DACE,uBAAC,2DAA2B,CAAC,KAAK,cAChC,uBAAC,kBAAU,IAAC,OAAO,EAAC,SAAS,iCAA8B,GACzB,EACpC,uBAAC,2DAA2B,CAAC,OAAO,cAClC,iCAAK,SAAS,EAAC,wCAAwC,aACpD,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CAC7C,iCAAK,SAAS,EAAC,sBAAsB,aACnC,gCAAK,SAAS,EAAC,qBAAqB,YAClC,sDACQ,KAAK,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,EAAE,GAAG,IAC/C,GACH,EACN,gCAAK,SAAS,EAAC,oBAAoB,YACjC,uBAAC,kBAAO,IAAC,cAAc,EAAE,kBAAkB,EAAE,aAAa,kBACvD,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAClC,CAAC,KAAK,EAAE,EAAE,CACR,SAAS,iBAAiB;;4CACxB,OAAO,CACL,wBAAC,kBAAU,IACT,IAAI,EAAC,MAAM,EAEX,cAAc,EAAE;oDACd,QAAQ,EAAE,CAAC,CAAC;iDACb,EACD,KAAK,EACH,MAAA,MAAA,QAAQ,CAAC,eAAe,CAAC,aAAa,CAAC,KAAK,CAAC,0CACzC,eAAe,mCAAI,EAAE,EAE3B,EAAE,EAAC,MAAM,aAER,KAAK,QACL,MAAA,MAAA,QAAQ,CAAC,eAAe,CAAC,aAAa,CAAC,KAAK,CAAC,0CAC1C,UAAU,mCAAI,CAAC,UAZd,KAAK,CAcC,CACd,CAAC;wCACJ,CAAC,CACJ,GACO,GACN,IACF,CACP,EAEA,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,CAC5C,iCAAK,SAAS,EAAC,oCAAoC,aACjD,kCAAM,SAAS,EAAC,kCAAkC,8BAClC,KAAK,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,GAAG,IACtD,EACP,gCAAK,SAAS,EAAC,oBAAoB,YACjC,uBAAC,kBAAO,IAAC,cAAc,EAAE,kBAAkB,EAAE,aAAa,kBACvD,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;;4CAAC,OAAA,CAC5C,wBAAC,kBAAU,IACT,IAAI,EAAC,cAAc,EAEnB,cAAc,EAAE;oDACd,QAAQ,EAAE,CAAC,CAAC;iDACb,EACD,KAAK,EACH,MAAA,MAAA,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,0CACvC,eAAe,mCAAI,EAAE,EAE3B,EAAE,EAAC,MAAM,aAER,IAAI,QACJ,MAAA,MAAA,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,0CACxC,UAAU,mCAAI,CAAC,UAZd,IAAI,CAcE,CACd,CAAA;yCAAA,CAAC,GACM,GACN,IACF,CACP,IACG,GAC8B,IACrC,CACJ,CAAC;AACJ,CAAC,CAAC;AAlFW,QAAA,aAAa,iBAkFxB","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 { GraphLabel, Typography } from '@neo4j-ndl/react';\n\nimport { useGraphVisualizationContext } from '../graph-visualization-context';\nimport { GraphVisualizationSidepanel } from '../graph-visualization-sidepanel';\nimport { ShowAll } from './show-all';\n\nconst OVERVIEW_STEP_SIZE = 25;\n\nexport const OverviewPanel = () => {\n const { nvlGraph } = useGraphVisualizationContext();\n\n return (\n <>\n <GraphVisualizationSidepanel.Title>\n <Typography variant=\"title-4\">Results overview</Typography>\n </GraphVisualizationSidepanel.Title>\n <GraphVisualizationSidepanel.Content>\n <div className=\"ndl-graph-visualization-overview-panel\">\n {nvlGraph.dataLookupTable.labels.length > 0 && (\n <div className=\"ndl-overview-section\">\n <div className=\"ndl-overview-header\">\n <span>\n Nodes{` (${nvlGraph.nodes.length.toLocaleString()})`}\n </span>\n </div>\n <div className=\"ndl-overview-items\">\n <ShowAll initiallyShown={OVERVIEW_STEP_SIZE} isButtonGroup>\n {nvlGraph.dataLookupTable.labels.map(\n (label) =>\n function GraphLabelWrapper() {\n return (\n <GraphLabel\n type=\"node\"\n key={label}\n htmlAttributes={{\n tabIndex: -1,\n }}\n color={\n nvlGraph.dataLookupTable.labelMetaData[label]\n ?.mostCommonColor ?? ''\n }\n as=\"span\"\n >\n {label} (\n {nvlGraph.dataLookupTable.labelMetaData[label]\n ?.totalCount ?? 0}\n )\n </GraphLabel>\n );\n },\n )}\n </ShowAll>\n </div>\n </div>\n )}\n\n {nvlGraph.dataLookupTable.types.length > 0 && (\n <div className=\"ndl-overview-relationships-section\">\n <span className=\"ndl-overview-relationships-title\">\n Relationships{` (${nvlGraph.rels.length.toLocaleString()})`}\n </span>\n <div className=\"ndl-overview-items\">\n <ShowAll initiallyShown={OVERVIEW_STEP_SIZE} isButtonGroup>\n {nvlGraph.dataLookupTable.types.map((type) => (\n <GraphLabel\n type=\"relationship\"\n key={type}\n htmlAttributes={{\n tabIndex: -1,\n }}\n color={\n nvlGraph.dataLookupTable.typeMetaData[type]\n ?.mostCommonColor ?? ''\n }\n as=\"span\"\n >\n {type} (\n {nvlGraph.dataLookupTable.typeMetaData[type]\n ?.totalCount ?? 0}\n )\n </GraphLabel>\n ))}\n </ShowAll>\n </div>\n </div>\n )}\n </div>\n </GraphVisualizationSidepanel.Content>\n </>\n );\n};\n"]}
1
+ {"version":3,"file":"overview-panel.js","sourceRoot":"","sources":["../../../src/sidepanel-components/overview-panel.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAA+D;AAE/D,gFAA8E;AAC9E,oFAA+E;AAC/E,+DAA0D;AAC1D,yCAAqC;AAErC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAEvB,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,IAAA,0DAA4B,GAAE,CAAC;IAEpE,OAAO,CACL,6DACE,uBAAC,2DAA2B,CAAC,KAAK,cAChC,uBAAC,kBAAU,IAAC,OAAO,EAAC,SAAS,iCAA8B,GACzB,EACpC,uBAAC,2DAA2B,CAAC,OAAO,cAClC,iCAAK,SAAS,EAAC,wCAAwC,aACpD,cAAc,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CACnC,iCAAK,SAAS,EAAC,sBAAsB,aACnC,gCAAK,SAAS,EAAC,qBAAqB,YAClC,sDACQ,KAAK,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,EAAE,GAAG,IAC/C,GACH,EACN,gCAAK,SAAS,EAAC,oBAAoB,YACjC,uBAAC,kBAAO,IAAC,cAAc,EAAE,kBAAkB,EAAE,aAAa,kBACvD,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACpC,uBAAC,uCAAiB,IAEhB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,cAAc,CAAC,aAAa,CAAC,KAAK,CAAC,EAC7C,SAAS,UAJJ,KAAK,CAKV,CACH,CAAC,GACM,GACN,IACF,CACP,EAEA,cAAc,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,CACrC,iCAAK,SAAS,EAAC,oCAAoC,aACjD,kCAAM,SAAS,EAAC,kCAAkC,8BAClC,KAAK,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,GAAG,IACtD,EACP,gCAAK,SAAS,EAAC,oBAAoB,YACjC,uBAAC,kBAAO,IAAC,cAAc,EAAE,kBAAkB,EAAE,aAAa,kBACvD,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACrC,uBAAC,uCAAiB,IAEhB,KAAK,EAAE,IAAI,EACX,IAAI,EAAC,cAAc,EACnB,QAAQ,EAAE,cAAc,CAAC,eAAe,CAAC,IAAI,CAAC,EAC9C,SAAS,UAJJ,IAAI,CAKT,CACH,CAAC,GACM,GACN,IACF,CACP,EAEA,cAAc,CAAC,iBAAiB,IAAI,CACnC,iCAAK,SAAS,EAAC,mBAAmB,aAChC,uBAAC,uBAAe,IAAC,OAAO,EAAC,MAAM,GAAG,EAClC,uBAAC,kBAAU,IAAC,OAAO,EAAC,YAAY,8CAEnB,IACT,CACP,IACG,GAC8B,IACrC,CACJ,CAAC;AACJ,CAAC,CAAC;AAlEW,QAAA,aAAa,iBAkExB","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 { StatusIndicator, Typography } from '@neo4j-ndl/react';\n\nimport { useGraphVisualizationContext } from '../graph-visualization-context';\nimport { GraphVisualizationSidepanel } from '../graph-visualization-sidepanel';\nimport { GraphLabelWrapper } from './graph-label-wrapper';\nimport { ShowAll } from './show-all';\n\nconst OVERVIEW_STEP_SIZE = 25;\n\nexport const OverviewPanel = () => {\n const { nvlGraph, metadataLookup } = useGraphVisualizationContext();\n\n return (\n <>\n <GraphVisualizationSidepanel.Title>\n <Typography variant=\"title-4\">Results overview</Typography>\n </GraphVisualizationSidepanel.Title>\n <GraphVisualizationSidepanel.Content>\n <div className=\"ndl-graph-visualization-overview-panel\">\n {metadataLookup.labels.length > 0 && (\n <div className=\"ndl-overview-section\">\n <div className=\"ndl-overview-header\">\n <span>\n Nodes{` (${nvlGraph.nodes.length.toLocaleString()})`}\n </span>\n </div>\n <div className=\"ndl-overview-items\">\n <ShowAll initiallyShown={OVERVIEW_STEP_SIZE} isButtonGroup>\n {metadataLookup.labels.map((label) => (\n <GraphLabelWrapper\n key={label}\n label={label}\n type=\"node\"\n metaData={metadataLookup.labelMetaData[label]}\n showCount\n />\n ))}\n </ShowAll>\n </div>\n </div>\n )}\n\n {metadataLookup.reltypes.length > 0 && (\n <div className=\"ndl-overview-relationships-section\">\n <span className=\"ndl-overview-relationships-title\">\n Relationships{` (${nvlGraph.rels.length.toLocaleString()})`}\n </span>\n <div className=\"ndl-overview-items\">\n <ShowAll initiallyShown={OVERVIEW_STEP_SIZE} isButtonGroup>\n {metadataLookup.reltypes.map((type) => (\n <GraphLabelWrapper\n key={type}\n label={type}\n type=\"relationship\"\n metaData={metadataLookup.reltypeMetaData[type]}\n showCount\n />\n ))}\n </ShowAll>\n </div>\n </div>\n )}\n\n {metadataLookup.hasMultipleColors && (\n <div className=\"ndl-overview-hint\">\n <StatusIndicator variant=\"info\" />\n <Typography variant=\"body-small\">\n indicates color may not match\n </Typography>\n </div>\n )}\n </div>\n </GraphVisualizationSidepanel.Content>\n </>\n );\n};\n"]}
@@ -0,0 +1,247 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.advancedStyleRules = exports.evolvesToRelRules = exports.caughtRelRules = exports.battledRelRules = exports.gymRules = exports.typeRules = exports.pokemonRules = exports.trainerRules = exports.defaultNodeRules = 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.defaultNodeRules = [
28
+ {
29
+ match: { label: null },
30
+ apply: { size: 10 },
31
+ },
32
+ ];
33
+ exports.trainerRules = [
34
+ {
35
+ match: { label: 'Trainer' },
36
+ where: { equal: [{ property: 'reputation' }, 'Gym Leader'] },
37
+ priority: 20, // Gym Leaders are special - should override level-based styling
38
+ apply: {
39
+ color: '#9b59b6',
40
+ captions: [
41
+ { value: { property: 'name' }, styles: ['bold'] },
42
+ { value: ' 🏆', styles: [] },
43
+ { value: ' Gym Leader', styles: ['italic'] },
44
+ ],
45
+ size: 45,
46
+ captionAlign: 'bottom',
47
+ },
48
+ },
49
+ {
50
+ match: { label: 'Trainer' },
51
+ where: { greaterThanOrEqual: [{ property: 'level' }, 85] },
52
+ priority: 10, // Base high-level styling
53
+ apply: {
54
+ size: 30,
55
+ captions: [
56
+ { value: { property: 'name' }, styles: ['bold'] },
57
+ { value: ' (Lv ', styles: [] },
58
+ { value: { property: 'level' }, styles: [] },
59
+ { value: ')', styles: [] },
60
+ ],
61
+ captionSize: 2,
62
+ },
63
+ },
64
+ ];
65
+ exports.pokemonRules = [
66
+ // Make the 'saur family green is our highest priority
67
+ {
68
+ match: { label: 'Pokemon' },
69
+ where: { endsWith: [{ property: 'name' }, 'saur'] },
70
+ priority: 50,
71
+ apply: {
72
+ color: '#2ecc71',
73
+ captions: [
74
+ { value: '🌿 ', styles: [] },
75
+ { value: { property: 'name' }, styles: ['bold', 'italic'] },
76
+ ],
77
+ },
78
+ },
79
+ {
80
+ match: { label: 'Pokemon' },
81
+ where: { equal: [{ property: 'is_starter' }, true] },
82
+ apply: {
83
+ color: '#f39c12',
84
+ captions: [
85
+ { value: { property: 'name' }, styles: ['bold'] },
86
+ { value: ' ⭐', styles: [] },
87
+ ],
88
+ size: 40,
89
+ },
90
+ },
91
+ {
92
+ match: { label: 'Pokemon' },
93
+ where: { greaterThanOrEqual: [{ property: 'level' }, 85] },
94
+ priority: 30, // High-level Pokemon override starter styling
95
+ apply: {
96
+ color: '#c0392b',
97
+ captions: [
98
+ { value: '💪 ', styles: [] },
99
+ { value: { property: 'name' }, styles: ['bold'] },
100
+ { value: ' Lv', styles: [] },
101
+ { value: { property: 'level' }, styles: [] },
102
+ ],
103
+ size: 42,
104
+ },
105
+ },
106
+ {
107
+ match: { label: 'Pokemon' },
108
+ where: { lessThan: [{ property: 'catch_rate' }, 50] },
109
+ priority: 40, // Rare caption is our second highest priority
110
+ apply: {
111
+ captions: [
112
+ { value: { property: 'name' }, styles: ['bold'] },
113
+ { value: ' (Rare)', styles: ['italic'] },
114
+ ],
115
+ },
116
+ },
117
+ {
118
+ match: { label: 'Pokemon' },
119
+ where: {
120
+ and: [
121
+ { lessThan: [{ property: 'level' }, 10] },
122
+ { not: { equal: [{ property: 'is_starter' }, true] } },
123
+ ],
124
+ },
125
+ priority: 15, // Baby Pokemon get special styling
126
+ apply: {
127
+ size: 25,
128
+ color: '#95a5a6',
129
+ captions: [
130
+ { value: { property: 'name' }, styles: ['italic'] },
131
+ { value: ' (Smol)', styles: [] },
132
+ ],
133
+ },
134
+ },
135
+ ];
136
+ exports.typeRules = [
137
+ {
138
+ match: { label: 'Type' },
139
+ where: {
140
+ or: [
141
+ { equal: [{ property: 'name' }, 'Grass'] },
142
+ { equal: [{ property: 'name' }, 'Poison'] },
143
+ ],
144
+ },
145
+ apply: {
146
+ color: '#27ae60',
147
+ },
148
+ },
149
+ ];
150
+ exports.gymRules = [
151
+ {
152
+ match: { label: 'Gym' },
153
+ apply: {
154
+ color: '#8e44ad',
155
+ size: 48,
156
+ captionAlign: 'top',
157
+ captions: [
158
+ { value: '🏛️ ', styles: [] },
159
+ { value: { property: 'name' }, styles: ['bold', 'underline'] },
160
+ ],
161
+ },
162
+ },
163
+ ];
164
+ exports.battledRelRules = [
165
+ {
166
+ match: { reltype: 'BATTLED' },
167
+ where: { equal: [{ property: 'won' }, true] },
168
+ apply: {
169
+ color: '#27ae60',
170
+ width: 4,
171
+ captions: [{ value: 'WON BATTLE', styles: ['bold'] }],
172
+ captionSize: 2,
173
+ },
174
+ },
175
+ {
176
+ match: { reltype: 'BATTLED' },
177
+ where: { equal: [{ property: 'won' }, false] },
178
+ apply: {
179
+ color: '#e74c3c',
180
+ width: 2,
181
+ captions: [{ value: 'LOST BATTLE', styles: ['italic'] }],
182
+ captionSize: 2,
183
+ },
184
+ },
185
+ ];
186
+ exports.caughtRelRules = [
187
+ {
188
+ match: { reltype: 'CAUGHT' },
189
+ apply: {
190
+ color: '#e91e63',
191
+ width: 3,
192
+ captions: [
193
+ { value: 'Caught @ Lv', styles: [] },
194
+ { value: { property: 'level' }, styles: ['bold'] },
195
+ ],
196
+ captionSize: 1.5,
197
+ },
198
+ },
199
+ ];
200
+ exports.evolvesToRelRules = [
201
+ {
202
+ match: { reltype: 'EVOLVES_TO' },
203
+ apply: {
204
+ color: '#16a085',
205
+ width: 2,
206
+ captions: [{ value: '→', styles: ['bold'] }],
207
+ },
208
+ },
209
+ {
210
+ match: { reltype: 'EVOLVES_TO' },
211
+ where: { equal: [{ property: 'method' }, 'Level'] },
212
+ priority: 1,
213
+ apply: {
214
+ captions: [
215
+ { value: '→ Lv', styles: [] },
216
+ { value: { property: 'level' }, styles: ['bold'] },
217
+ ],
218
+ },
219
+ },
220
+ {
221
+ match: { reltype: 'EVOLVES_TO' },
222
+ where: { not: { equal: [{ property: 'method' }, 'Level'] } },
223
+ priority: 1,
224
+ apply: {
225
+ color: '#8e44ad',
226
+ captions: [
227
+ { value: '→ ', styles: [] },
228
+ { value: { property: 'method' }, styles: ['italic'] },
229
+ ],
230
+ },
231
+ },
232
+ ];
233
+ exports.advancedStyleRules = [
234
+ ...exports.defaultNodeRules,
235
+ ...exports.trainerRules,
236
+ ...exports.pokemonRules,
237
+ ...exports.typeRules,
238
+ ...exports.gymRules,
239
+ ...exports.battledRelRules,
240
+ ...exports.caughtRelRules,
241
+ ...exports.evolvesToRelRules,
242
+ ];
243
+ const Component = () => {
244
+ 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, nvlStyleRules: exports.advancedStyleRules }) }));
245
+ };
246
+ exports.default = Component;
247
+ //# sourceMappingURL=graph-visualization-rule-based-styling-advanced.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph-visualization-rule-based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jC,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 StyleRule } from '../styling/style-types';\nimport { advancedStoryGraph, containerClasses } from './story-data';\n\nexport const defaultNodeRules: StyleRule[] = [\n {\n match: { label: null },\n apply: { size: 10 },\n },\n];\n\nexport const trainerRules: StyleRule[] = [\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: '#9b59b6',\n captions: [\n { value: { property: 'name' }, styles: ['bold'] },\n { value: ' 🏆', styles: [] },\n { value: ' Gym Leader', styles: ['italic'] },\n ],\n size: 45,\n captionAlign: 'bottom',\n },\n },\n {\n match: { label: 'Trainer' },\n where: { greaterThanOrEqual: [{ property: 'level' }, 85] },\n priority: 10, // Base high-level styling\n apply: {\n size: 30,\n captions: [\n { value: { property: 'name' }, styles: ['bold'] },\n { value: ' (Lv ', styles: [] },\n { value: { property: 'level' }, styles: [] },\n { value: ')', styles: [] },\n ],\n captionSize: 2,\n },\n },\n];\n\nexport const pokemonRules: StyleRule[] = [\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: '#2ecc71',\n captions: [\n { value: '🌿 ', styles: [] },\n { value: { property: 'name' }, styles: ['bold', 'italic'] },\n ],\n },\n },\n {\n match: { label: 'Pokemon' },\n where: { equal: [{ property: 'is_starter' }, true] },\n apply: {\n color: '#f39c12',\n captions: [\n { value: { property: 'name' }, styles: ['bold'] },\n { value: ' ⭐', styles: [] },\n ],\n size: 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: '#c0392b',\n captions: [\n { value: '💪 ', styles: [] },\n { value: { property: 'name' }, styles: ['bold'] },\n { value: ' Lv', styles: [] },\n { value: { property: 'level' }, styles: [] },\n ],\n size: 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 { value: { property: 'name' }, styles: ['bold'] },\n { value: ' (Rare)', styles: ['italic'] },\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: 25,\n color: '#95a5a6',\n captions: [\n { value: { property: 'name' }, styles: ['italic'] },\n { value: ' (Smol)', styles: [] },\n ],\n },\n },\n];\n\nexport const typeRules: StyleRule[] = [\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: '#27ae60',\n },\n },\n];\n\nexport const gymRules: StyleRule[] = [\n {\n match: { label: 'Gym' },\n apply: {\n color: '#8e44ad',\n size: 48,\n captionAlign: 'top',\n captions: [\n { value: '🏛️ ', styles: [] },\n { value: { property: 'name' }, styles: ['bold', 'underline'] },\n ],\n },\n },\n];\n\nexport const battledRelRules: StyleRule[] = [\n {\n match: { reltype: 'BATTLED' },\n where: { equal: [{ property: 'won' }, true] },\n apply: {\n color: '#27ae60',\n width: 4,\n captions: [{ value: 'WON BATTLE', styles: ['bold'] }],\n captionSize: 2,\n },\n },\n {\n match: { reltype: 'BATTLED' },\n where: { equal: [{ property: 'won' }, false] },\n apply: {\n color: '#e74c3c',\n width: 2,\n captions: [{ value: 'LOST BATTLE', styles: ['italic'] }],\n captionSize: 2,\n },\n },\n];\n\nexport const caughtRelRules: StyleRule[] = [\n {\n match: { reltype: 'CAUGHT' },\n apply: {\n color: '#e91e63',\n width: 3,\n captions: [\n { value: 'Caught @ Lv', styles: [] },\n { value: { property: 'level' }, styles: ['bold'] },\n ],\n captionSize: 1.5,\n },\n },\n];\n\nexport const evolvesToRelRules: StyleRule[] = [\n {\n match: { reltype: 'EVOLVES_TO' },\n apply: {\n color: '#16a085',\n width: 2,\n captions: [{ 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 { value: '→ Lv', styles: [] },\n { value: { property: 'level' }, styles: ['bold'] },\n ],\n },\n },\n {\n match: { reltype: 'EVOLVES_TO' },\n where: { not: { equal: [{ property: 'method' }, 'Level'] } },\n priority: 1,\n apply: {\n color: '#8e44ad',\n captions: [\n { value: '→ ', styles: [] },\n { value: { property: 'method' }, styles: ['italic'] },\n ],\n },\n },\n];\n\nexport const advancedStyleRules: StyleRule[] = [\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 nvlStyleRules={advancedStyleRules}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,79 @@
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: 'teal' },
32
+ },
33
+ {
34
+ // Type named dragon becomes purple
35
+ match: { label: 'Type' },
36
+ where: { equal: [{ property: 'name' }, 'Dragon'] },
37
+ apply: { color: '#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: 50,
50
+ },
51
+ },
52
+ // Pokemon are red by default
53
+ {
54
+ match: { label: 'Pokemon' },
55
+ apply: {
56
+ color: '#ff6b6b',
57
+ captions: [
58
+ { value: 'Pokemon', styles: ['bold'] },
59
+ { value: { property: 'name' } },
60
+ ],
61
+ },
62
+ },
63
+ {
64
+ // Pokemon that are also have the label Legendary become gold instead
65
+ match: { label: 'Pokemon' },
66
+ where: { label: 'Legendary' },
67
+ apply: {
68
+ color: 'gold',
69
+ captions: [
70
+ { value: { property: 'name' }, styles: ['bold', 'underline'] },
71
+ ],
72
+ },
73
+ },
74
+ ];
75
+ const Component = () => {
76
+ 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, nvlStyleRules: exports.styleRules }) }));
77
+ };
78
+ exports.default = Component;
79
+ //# sourceMappingURL=graph-visualization-rule-based-styling.story.js.map
@@ -0,0 +1 @@
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,GAAgB;IACrC;QACE,4BAA4B;QAC5B,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;QACtB,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;KACzB;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,SAAS,EAAE;KAC5B;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;SACT;KACF;IACD,6BAA6B;IAC7B;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC3B,KAAK,EAAE;YACL,KAAK,EAAE,SAAS;YAChB,QAAQ,EAAE;gBACR,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE;gBACtC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE;aAChC;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,MAAM;YACb,QAAQ,EAAE;gBACR,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE;aAC/D;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,aAAa,EAAE,kBAAU,GACzB,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 StyleRule } from '../styling/style-types';\nimport { containerClasses, StoryGraph } from './story-data';\n\nexport const styleRules: StyleRule[] = [\n {\n // Nodes are teal by default\n match: { label: null },\n apply: { color: 'teal' },\n },\n {\n // Type named dragon becomes purple\n match: { label: 'Type' },\n where: { equal: [{ property: 'name' }, 'Dragon'] },\n apply: { color: '#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: 50,\n },\n },\n // Pokemon are red by default\n {\n match: { label: 'Pokemon' },\n apply: {\n color: '#ff6b6b',\n captions: [\n { value: 'Pokemon', styles: ['bold'] },\n { value: { property: 'name' } },\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: 'gold',\n captions: [\n { 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 nvlStyleRules={styleRules}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,57 @@
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: 'red', // Red for Pokemon
32
+ captions: [
33
+ { value: 'Pokemon', styles: ['bold'] },
34
+ { value: { property: 'name' } },
35
+ ],
36
+ },
37
+ },
38
+ {
39
+ match: { label: 'Type' },
40
+ apply: {
41
+ color: '#4ecdc4', // Teal for Types
42
+ },
43
+ },
44
+ {
45
+ match: { reltype: 'HAS_TYPE' },
46
+ apply: {
47
+ color: '#95a5a6', // Gray for relationships
48
+ captions: [{ value: 'has type' }],
49
+ width: 2,
50
+ },
51
+ },
52
+ ];
53
+ const Component = () => {
54
+ 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, nvlStyleRules: exports.simpleStyleRules }) }));
55
+ };
56
+ exports.default = Component;
57
+ //# sourceMappingURL=graph-visualization-simple-styling.story.js.map
@@ -0,0 +1 @@
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,GAAgB;IAC3C;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC3B,KAAK,EAAE;YACL,KAAK,EAAE,KAAK,EAAE,kBAAkB;YAChC,QAAQ,EAAE;gBACR,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE;gBACtC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE;aAChC;SACF;KACF;IACD;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;QACxB,KAAK,EAAE;YACL,KAAK,EAAE,SAAS,EAAE,iBAAiB;SACpC;KACF;IACD;QACE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;QAC9B,KAAK,EAAE;YACL,KAAK,EAAE,SAAS,EAAE,yBAAyB;YAC3C,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;YACjC,KAAK,EAAE,CAAC;SACT;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,aAAa,EAAE,wBAAgB,GAC/B,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 StyleRule } from '../styling/style-types';\nimport { containerClasses, StoryGraph } from './story-data';\n\nexport const simpleStyleRules: StyleRule[] = [\n {\n match: { label: 'Pokemon' },\n apply: {\n color: 'red', // Red for Pokemon\n captions: [\n { value: 'Pokemon', styles: ['bold'] },\n { value: { property: 'name' } },\n ],\n },\n },\n {\n match: { label: 'Type' },\n apply: {\n color: '#4ecdc4', // Teal for Types\n },\n },\n {\n match: { reltype: 'HAS_TYPE' },\n apply: {\n color: '#95a5a6', // Gray for relationships\n captions: [{ value: 'has type' }],\n width: 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 nvlStyleRules={simpleStyleRules}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -23,7 +23,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
23
23
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.PreviewGraphVisualizationSrc = exports.GraphVisualizationSearchSrc = exports.GraphVisualizationHighlightingSrc = exports.GraphVisualizationCustomSrc = exports.GraphVisualizationMaximalistSrc = exports.GraphVisualizationBarebonesSrc = exports.GraphVisualizationDefaultSrc = exports.PreviewGraphVisualization = exports.GraphVisualizationMaximalist = exports.GraphVisualizationSearch = exports.GraphVisualizationHighlighting = exports.GraphVisualizationDefault = exports.GraphVisualizationCustom = exports.GraphVisualizationBarebones = void 0;
26
+ exports.PreviewGraphVisualizationSrc = exports.GraphVisualizationRuleBasedStylingAdvancedSrc = exports.GraphVisualizationSearchSrc = exports.GraphVisualizationRuleBasedStylingSrc = exports.GraphVisualizationSimpleStylingSrc = exports.GraphVisualizationHighlightingSrc = exports.GraphVisualizationCustomSrc = exports.GraphVisualizationMaximalistSrc = exports.GraphVisualizationBarebonesSrc = exports.GraphVisualizationDefaultSrc = exports.PreviewGraphVisualization = exports.GraphVisualizationSimpleStyling = exports.GraphVisualizationSearch = exports.GraphVisualizationRuleBasedStyling = exports.GraphVisualizationRuleBasedStylingAdvanced = exports.GraphVisualizationMaximalist = exports.GraphVisualizationHighlighting = exports.GraphVisualizationDefault = exports.GraphVisualizationCustom = exports.GraphVisualizationBarebones = void 0;
27
27
  var graph_visualization_barebones_story_1 = require("./graph-visualization-barebones.story");
28
28
  Object.defineProperty(exports, "GraphVisualizationBarebones", { enumerable: true, get: function () { return __importDefault(graph_visualization_barebones_story_1).default; } });
29
29
  var graph_visualization_custom_story_1 = require("./graph-visualization-custom.story");
@@ -32,24 +32,37 @@ var graph_visualization_default_story_1 = require("./graph-visualization-default
32
32
  Object.defineProperty(exports, "GraphVisualizationDefault", { enumerable: true, get: function () { return __importDefault(graph_visualization_default_story_1).default; } });
33
33
  var graph_visualization_highlighting_story_1 = require("./graph-visualization-highlighting.story");
34
34
  Object.defineProperty(exports, "GraphVisualizationHighlighting", { enumerable: true, get: function () { return __importDefault(graph_visualization_highlighting_story_1).default; } });
35
- var graph_visualization_search_story_1 = require("./graph-visualization-search.story");
36
- Object.defineProperty(exports, "GraphVisualizationSearch", { enumerable: true, get: function () { return __importDefault(graph_visualization_search_story_1).default; } });
37
35
  var graph_visualization_maximalist_story_1 = require("./graph-visualization-maximalist.story");
38
36
  Object.defineProperty(exports, "GraphVisualizationMaximalist", { enumerable: true, get: function () { return __importDefault(graph_visualization_maximalist_story_1).default; } });
37
+ var graph_visualization_rule_based_styling_advanced_story_1 = require("./graph-visualization-rule-based-styling-advanced.story");
38
+ Object.defineProperty(exports, "GraphVisualizationRuleBasedStylingAdvanced", { enumerable: true, get: function () { return __importDefault(graph_visualization_rule_based_styling_advanced_story_1).default; } });
39
+ var graph_visualization_rule_based_styling_story_1 = require("./graph-visualization-rule-based-styling.story");
40
+ Object.defineProperty(exports, "GraphVisualizationRuleBasedStyling", { enumerable: true, get: function () { return __importDefault(graph_visualization_rule_based_styling_story_1).default; } });
41
+ var graph_visualization_search_story_1 = require("./graph-visualization-search.story");
42
+ Object.defineProperty(exports, "GraphVisualizationSearch", { enumerable: true, get: function () { return __importDefault(graph_visualization_search_story_1).default; } });
43
+ var graph_visualization_simple_styling_story_1 = require("./graph-visualization-simple-styling.story");
44
+ Object.defineProperty(exports, "GraphVisualizationSimpleStyling", { enumerable: true, get: function () { return __importDefault(graph_visualization_simple_styling_story_1).default; } });
39
45
  var preview_graph_visualization_story_1 = require("./preview-graph-visualization.story");
40
46
  Object.defineProperty(exports, "PreviewGraphVisualization", { enumerable: true, get: function () { return __importDefault(preview_graph_visualization_story_1).default; } });
47
+ const utils_1 = require("../utils");
41
48
  const graph_visualization_barebones_story_raw_1 = __importDefault(require("./graph-visualization-barebones.story?raw"));
42
49
  const graph_visualization_custom_story_raw_1 = __importDefault(require("./graph-visualization-custom.story?raw"));
43
50
  const graph_visualization_default_story_raw_1 = __importDefault(require("./graph-visualization-default.story?raw"));
44
51
  const graph_visualization_highlighting_story_raw_1 = __importDefault(require("./graph-visualization-highlighting.story?raw"));
45
52
  const graph_visualization_maximalist_story_raw_1 = __importDefault(require("./graph-visualization-maximalist.story?raw"));
53
+ const graph_visualization_rule_based_styling_story_raw_1 = __importDefault(require("./graph-visualization-rule-based-styling.story?raw"));
54
+ const graph_visualization_rule_based_styling_advanced_story_raw_1 = __importDefault(require("./graph-visualization-rule-based-styling-advanced.story?raw"));
46
55
  const graph_visualization_search_story_raw_1 = __importDefault(require("./graph-visualization-search.story?raw"));
56
+ const graph_visualization_simple_styling_story_raw_1 = __importDefault(require("./graph-visualization-simple-styling.story?raw"));
47
57
  const preview_graph_visualization_story_raw_1 = __importDefault(require("./preview-graph-visualization.story?raw"));
48
- exports.GraphVisualizationDefaultSrc = graph_visualization_default_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
49
- exports.GraphVisualizationBarebonesSrc = graph_visualization_barebones_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
50
- exports.GraphVisualizationMaximalistSrc = graph_visualization_maximalist_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
51
- exports.GraphVisualizationCustomSrc = graph_visualization_custom_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
52
- exports.GraphVisualizationHighlightingSrc = graph_visualization_highlighting_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
53
- exports.GraphVisualizationSearchSrc = graph_visualization_search_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
54
- exports.PreviewGraphVisualizationSrc = preview_graph_visualization_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
58
+ exports.GraphVisualizationDefaultSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_default_story_raw_1.default);
59
+ exports.GraphVisualizationBarebonesSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_barebones_story_raw_1.default);
60
+ exports.GraphVisualizationMaximalistSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_maximalist_story_raw_1.default);
61
+ exports.GraphVisualizationCustomSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_custom_story_raw_1.default);
62
+ exports.GraphVisualizationHighlightingSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_highlighting_story_raw_1.default);
63
+ exports.GraphVisualizationSimpleStylingSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_simple_styling_story_raw_1.default);
64
+ exports.GraphVisualizationRuleBasedStylingSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_rule_based_styling_story_raw_1.default);
65
+ exports.GraphVisualizationSearchSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_search_story_raw_1.default);
66
+ exports.GraphVisualizationRuleBasedStylingAdvancedSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_rule_based_styling_advanced_story_raw_1.default);
67
+ exports.PreviewGraphVisualizationSrc = (0, utils_1.removeLicenseHeader)(preview_graph_visualization_story_raw_1.default);
55
68
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,6FAA+F;AAAtF,mKAAA,OAAO,OAA+B;AAC/C,uFAAyF;AAAhF,6JAAA,OAAO,OAA4B;AAC5C,yFAA2F;AAAlF,+JAAA,OAAO,OAA6B;AAC7C,mGAAqG;AAA5F,yKAAA,OAAO,OAAkC;AAClD,uFAAyF;AAAhF,6JAAA,OAAO,OAA4B;AAC5C,+FAAiG;AAAxF,qKAAA,OAAO,OAAgC;AAChD,yFAA2F;AAAlF,+JAAA,OAAO,OAA6B;AAE7C,wHAA0F;AAC1F,kHAAoF;AACpF,oHAAsF;AACtF,8HAAgG;AAChG,0HAA4F;AAC5F,kHAAoF;AACpF,oHAAsF;AAEzE,QAAA,4BAA4B,GACvC,+CAA+B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAEzD,QAAA,8BAA8B,GACzC,iDAAiC,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAE3D,QAAA,+BAA+B,GAC1C,kDAAkC,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAE5D,QAAA,2BAA2B,GACtC,8CAA8B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAExD,QAAA,iCAAiC,GAC5C,oDAAoC,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAE9D,QAAA,2BAA2B,GACtC,8CAA8B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAExD,QAAA,4BAA4B,GACvC,+CAA+B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as GraphVisualizationBarebones } from './graph-visualization-barebones.story';\nexport { default as GraphVisualizationCustom } from './graph-visualization-custom.story';\nexport { default as GraphVisualizationDefault } from './graph-visualization-default.story';\nexport { default as GraphVisualizationHighlighting } from './graph-visualization-highlighting.story';\nexport { default as GraphVisualizationSearch } from './graph-visualization-search.story';\nexport { default as GraphVisualizationMaximalist } from './graph-visualization-maximalist.story';\nexport { default as PreviewGraphVisualization } from './preview-graph-visualization.story';\n\nimport GraphVisualizationBarebonesSrcRaw from './graph-visualization-barebones.story?raw';\nimport GraphVisualizationCustomSrcRaw from './graph-visualization-custom.story?raw';\nimport GraphVisualizationDefaultSrcRaw from './graph-visualization-default.story?raw';\nimport GraphVisualizationHighlightingSrcRaw from './graph-visualization-highlighting.story?raw';\nimport GraphVisualizationMaximalistSrcRaw from './graph-visualization-maximalist.story?raw';\nimport GraphVisualizationSearchSrcRaw from './graph-visualization-search.story?raw';\nimport PreviewGraphVisualizationSrcRaw from './preview-graph-visualization.story?raw';\n\nexport const GraphVisualizationDefaultSrc =\n GraphVisualizationDefaultSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationBarebonesSrc =\n GraphVisualizationBarebonesSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationMaximalistSrc =\n GraphVisualizationMaximalistSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationCustomSrc =\n GraphVisualizationCustomSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationHighlightingSrc =\n GraphVisualizationHighlightingSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationSearchSrc =\n GraphVisualizationSearchSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const PreviewGraphVisualizationSrc =\n PreviewGraphVisualizationSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,6FAA+F;AAAtF,mKAAA,OAAO,OAA+B;AAC/C,uFAAyF;AAAhF,6JAAA,OAAO,OAA4B;AAC5C,yFAA2F;AAAlF,+JAAA,OAAO,OAA6B;AAC7C,mGAAqG;AAA5F,yKAAA,OAAO,OAAkC;AAClD,+FAAiG;AAAxF,qKAAA,OAAO,OAAgC;AAChD,iIAAgI;AAAvH,oMAAA,OAAO,OAA8C;AAC9D,+GAA+G;AAAtG,mLAAA,OAAO,OAAsC;AACtD,uFAAyF;AAAhF,6JAAA,OAAO,OAA4B;AAC5C,uGAAwG;AAA/F,4KAAA,OAAO,OAAmC;AACnD,yFAA2F;AAAlF,+JAAA,OAAO,OAA6B;AAE7C,oCAA+C;AAC/C,wHAA0F;AAC1F,kHAAoF;AACpF,oHAAsF;AACtF,8HAAgG;AAChG,0HAA4F;AAC5F,0IAA0G;AAC1G,4JAA2H;AAC3H,kHAAoF;AACpF,kIAAmG;AACnG,oHAAsF;AAEzE,QAAA,4BAA4B,GAAG,IAAA,2BAAmB,EAC7D,+CAA+B,CAChC,CAAC;AAEW,QAAA,8BAA8B,GAAG,IAAA,2BAAmB,EAC/D,iDAAiC,CAClC,CAAC;AAEW,QAAA,+BAA+B,GAAG,IAAA,2BAAmB,EAChE,kDAAkC,CACnC,CAAC;AAEW,QAAA,2BAA2B,GAAG,IAAA,2BAAmB,EAC5D,8CAA8B,CAC/B,CAAC;AAEW,QAAA,iCAAiC,GAAG,IAAA,2BAAmB,EAClE,oDAAoC,CACrC,CAAC;AAEW,QAAA,kCAAkC,GAAG,IAAA,2BAAmB,EACnE,sDAAqC,CACtC,CAAC;AAEW,QAAA,qCAAqC,GAAG,IAAA,2BAAmB,EACtE,0DAAwC,CACzC,CAAC;AAEW,QAAA,2BAA2B,GAAG,IAAA,2BAAmB,EAC5D,8CAA8B,CAC/B,CAAC;AAEW,QAAA,6CAA6C,GACxD,IAAA,2BAAmB,EAAC,mEAAgD,CAAC,CAAC;AAE3D,QAAA,4BAA4B,GAAG,IAAA,2BAAmB,EAC7D,+CAA+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 GraphVisualizationRuleBasedStylingAdvanced } from './graph-visualization-rule-based-styling-advanced.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 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 GraphVisualizationRuleBasedStylingSrcRaw from './graph-visualization-rule-based-styling.story?raw';\nimport GraphVisualizationRuleBasedStylingAdvancedSrcRaw from './graph-visualization-rule-based-styling-advanced.story?raw';\nimport GraphVisualizationSearchSrcRaw from './graph-visualization-search.story?raw';\nimport GraphVisualizationSimpleStylingSrcRaw from './graph-visualization-simple-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 PreviewGraphVisualizationSrc = removeLicenseHeader(\n PreviewGraphVisualizationSrcRaw,\n);\n"]}