@neo4j-ndl/react-graph 1.2.44 → 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 +1 -1
  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
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import { GraphLabel, StatusIndicator } from '@neo4j-ndl/react';
23
+ import classNames from 'classnames';
24
+ export const GraphLabelWrapper = ({ label, type, metaData, tabIndex = -1, showCount = false, }) => {
25
+ var _a, _b, _c;
26
+ const classes = classNames('ndl-graph-label-rule-indicator', {
27
+ 'ndl-graph-label-rule-indicator-shift-left': type === 'relationship',
28
+ });
29
+ return (_jsxs(GraphLabel, { type: type, color: (_b = (_a = metaData === null || metaData === void 0 ? void 0 : metaData.colorDistribution[0]) === null || _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : '', className: "ndl-graph-label-wrapper", as: "span", htmlAttributes: {
30
+ tabIndex,
31
+ }, children: [((_c = metaData === null || metaData === void 0 ? void 0 : metaData.colorDistribution.length) !== null && _c !== void 0 ? _c : 0) > 1 && (_jsx(StatusIndicator, { className: classes, variant: "info" })), label, showCount && (metaData === null || metaData === void 0 ? void 0 : metaData.totalCount) != null && ` (${metaData.totalCount})`] }));
32
+ };
33
+ //# sourceMappingURL=graph-label-wrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph-label-wrapper.js","sourceRoot":"","sources":["../../../src/sidepanel-components/graph-label-wrapper.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,UAAU,MAAM,YAAY,CAAC;AAYpC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,QAAQ,GAAG,CAAC,CAAC,EACb,SAAS,GAAG,KAAK,GACM,EAAE,EAAE;;IAC3B,MAAM,OAAO,GAAG,UAAU,CAAC,gCAAgC,EAAE;QAC3D,2CAA2C,EAAE,IAAI,KAAK,cAAc;KACrE,CAAC,CAAC;IAEH,OAAO,CACL,MAAC,UAAU,IACT,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,MAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,iBAAiB,CAAC,CAAC,CAAC,0CAAE,KAAK,mCAAI,EAAE,EAClD,SAAS,EAAC,yBAAyB,EACnC,EAAE,EAAC,MAAM,EACT,cAAc,EAAE;YACd,QAAQ;SACT,aAEA,CAAC,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,iBAAiB,CAAC,MAAM,mCAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAChD,KAAC,eAAe,IAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAC,MAAM,GAAG,CACvD,EACA,KAAK,EACL,SAAS,IAAI,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,KAAI,IAAI,IAAI,KAAK,QAAQ,CAAC,UAAU,GAAG,IAC9D,CACd,CAAC;AACJ,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\nimport { GraphLabel, StatusIndicator } from '@neo4j-ndl/react';\nimport classNames from 'classnames';\n\nimport { type GraphItemMetaData } from '../graph-visualization-context';\n\ntype GraphLabelWrapperProps = {\n label: string;\n type: 'node' | 'relationship';\n metaData: GraphItemMetaData | undefined;\n tabIndex?: number;\n showCount?: boolean;\n};\n\nexport const GraphLabelWrapper = ({\n label,\n type,\n metaData,\n tabIndex = -1,\n showCount = false,\n}: GraphLabelWrapperProps) => {\n const classes = classNames('ndl-graph-label-rule-indicator', {\n 'ndl-graph-label-rule-indicator-shift-left': type === 'relationship',\n });\n\n return (\n <GraphLabel\n type={type}\n color={metaData?.colorDistribution[0]?.color ?? ''}\n className=\"ndl-graph-label-wrapper\"\n as=\"span\"\n htmlAttributes={{\n tabIndex,\n }}\n >\n {(metaData?.colorDistribution.length ?? 0) > 1 && (\n <StatusIndicator className={classes} variant=\"info\" />\n )}\n {label}\n {showCount && metaData?.totalCount != null && ` (${metaData.totalCount})`}\n </GraphLabel>\n );\n};\n"]}
@@ -19,23 +19,14 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
19
19
  * You should have received a copy of the GNU General Public License
20
20
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
21
  */
22
- import { GraphLabel, Typography } from '@neo4j-ndl/react';
22
+ import { StatusIndicator, Typography } from '@neo4j-ndl/react';
23
23
  import { useGraphVisualizationContext } from '../graph-visualization-context';
24
24
  import { GraphVisualizationSidepanel } from '../graph-visualization-sidepanel';
25
+ import { GraphLabelWrapper } from './graph-label-wrapper';
25
26
  import { ShowAll } from './show-all';
26
27
  const OVERVIEW_STEP_SIZE = 25;
27
28
  export const OverviewPanel = () => {
28
- const { nvlGraph } = useGraphVisualizationContext();
29
- return (_jsxs(_Fragment, { children: [_jsx(GraphVisualizationSidepanel.Title, { children: _jsx(Typography, { variant: "title-4", children: "Results overview" }) }), _jsx(GraphVisualizationSidepanel.Content, { children: _jsxs("div", { className: "ndl-graph-visualization-overview-panel", children: [nvlGraph.dataLookupTable.labels.length > 0 && (_jsxs("div", { className: "ndl-overview-section", children: [_jsx("div", { className: "ndl-overview-header", children: _jsxs("span", { children: ["Nodes", ` (${nvlGraph.nodes.length.toLocaleString()})`] }) }), _jsx("div", { className: "ndl-overview-items", children: _jsx(ShowAll, { initiallyShown: OVERVIEW_STEP_SIZE, isButtonGroup: true, children: nvlGraph.dataLookupTable.labels.map((label) => function GraphLabelWrapper() {
30
- var _a, _b, _c, _d;
31
- return (_jsxs(GraphLabel, { type: "node", htmlAttributes: {
32
- tabIndex: -1,
33
- }, color: (_b = (_a = nvlGraph.dataLookupTable.labelMetaData[label]) === null || _a === void 0 ? void 0 : _a.mostCommonColor) !== null && _b !== void 0 ? _b : '', as: "span", children: [label, " (", (_d = (_c = nvlGraph.dataLookupTable.labelMetaData[label]) === null || _c === void 0 ? void 0 : _c.totalCount) !== null && _d !== void 0 ? _d : 0, ")"] }, label));
34
- }) }) })] })), nvlGraph.dataLookupTable.types.length > 0 && (_jsxs("div", { className: "ndl-overview-relationships-section", children: [_jsxs("span", { className: "ndl-overview-relationships-title", children: ["Relationships", ` (${nvlGraph.rels.length.toLocaleString()})`] }), _jsx("div", { className: "ndl-overview-items", children: _jsx(ShowAll, { initiallyShown: OVERVIEW_STEP_SIZE, isButtonGroup: true, children: nvlGraph.dataLookupTable.types.map((type) => {
35
- var _a, _b, _c, _d;
36
- return (_jsxs(GraphLabel, { type: "relationship", htmlAttributes: {
37
- tabIndex: -1,
38
- }, color: (_b = (_a = nvlGraph.dataLookupTable.typeMetaData[type]) === null || _a === void 0 ? void 0 : _a.mostCommonColor) !== null && _b !== void 0 ? _b : '', as: "span", children: [type, " (", (_d = (_c = nvlGraph.dataLookupTable.typeMetaData[type]) === null || _c === void 0 ? void 0 : _c.totalCount) !== null && _d !== void 0 ? _d : 0, ")"] }, type));
39
- }) }) })] }))] }) })] }));
29
+ const { nvlGraph, metadataLookup } = useGraphVisualizationContext();
30
+ return (_jsxs(_Fragment, { children: [_jsx(GraphVisualizationSidepanel.Title, { children: _jsx(Typography, { variant: "title-4", children: "Results overview" }) }), _jsx(GraphVisualizationSidepanel.Content, { children: _jsxs("div", { className: "ndl-graph-visualization-overview-panel", children: [metadataLookup.labels.length > 0 && (_jsxs("div", { className: "ndl-overview-section", children: [_jsx("div", { className: "ndl-overview-header", children: _jsxs("span", { children: ["Nodes", ` (${nvlGraph.nodes.length.toLocaleString()})`] }) }), _jsx("div", { className: "ndl-overview-items", children: _jsx(ShowAll, { initiallyShown: OVERVIEW_STEP_SIZE, isButtonGroup: true, children: metadataLookup.labels.map((label) => (_jsx(GraphLabelWrapper, { label: label, type: "node", metaData: metadataLookup.labelMetaData[label], showCount: true }, label))) }) })] })), metadataLookup.reltypes.length > 0 && (_jsxs("div", { className: "ndl-overview-relationships-section", children: [_jsxs("span", { className: "ndl-overview-relationships-title", children: ["Relationships", ` (${nvlGraph.rels.length.toLocaleString()})`] }), _jsx("div", { className: "ndl-overview-items", children: _jsx(ShowAll, { initiallyShown: OVERVIEW_STEP_SIZE, isButtonGroup: true, children: metadataLookup.reltypes.map((type) => (_jsx(GraphLabelWrapper, { label: type, type: "relationship", metaData: metadataLookup.reltypeMetaData[type], showCount: true }, type))) }) })] })), metadataLookup.hasMultipleColors && (_jsxs("div", { className: "ndl-overview-hint", children: [_jsx(StatusIndicator, { variant: "info" }), _jsx(Typography, { variant: "body-small", children: "indicates color may not match" })] }))] }) })] }));
40
31
  };
41
32
  //# sourceMappingURL=overview-panel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"overview-panel.js","sourceRoot":"","sources":["../../../src/sidepanel-components/overview-panel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,EAAE,QAAQ,EAAE,GAAG,4BAA4B,EAAE,CAAC;IAEpD,OAAO,CACL,8BACE,KAAC,2BAA2B,CAAC,KAAK,cAChC,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,iCAA8B,GACzB,EACpC,KAAC,2BAA2B,CAAC,OAAO,cAClC,eAAK,SAAS,EAAC,wCAAwC,aACpD,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CAC7C,eAAK,SAAS,EAAC,sBAAsB,aACnC,cAAK,SAAS,EAAC,qBAAqB,YAClC,oCACQ,KAAK,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,EAAE,GAAG,IAC/C,GACH,EACN,cAAK,SAAS,EAAC,oBAAoB,YACjC,KAAC,OAAO,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,MAAC,UAAU,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,eAAK,SAAS,EAAC,oCAAoC,aACjD,gBAAM,SAAS,EAAC,kCAAkC,8BAClC,KAAK,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,GAAG,IACtD,EACP,cAAK,SAAS,EAAC,oBAAoB,YACjC,KAAC,OAAO,IAAC,cAAc,EAAE,kBAAkB,EAAE,aAAa,kBACvD,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;;4CAAC,OAAA,CAC5C,MAAC,UAAU,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","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,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,4BAA4B,EAAE,CAAC;IAEpE,OAAO,CACL,8BACE,KAAC,2BAA2B,CAAC,KAAK,cAChC,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,iCAA8B,GACzB,EACpC,KAAC,2BAA2B,CAAC,OAAO,cAClC,eAAK,SAAS,EAAC,wCAAwC,aACpD,cAAc,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CACnC,eAAK,SAAS,EAAC,sBAAsB,aAC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ourcesContent":["/**\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,244 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import { GraphVisualization } from '../graph-visualization';
23
+ import { advancedStoryGraph, containerClasses } from './story-data';
24
+ export const defaultNodeRules = [
25
+ {
26
+ match: { label: null },
27
+ apply: { size: 10 },
28
+ },
29
+ ];
30
+ export const trainerRules = [
31
+ {
32
+ match: { label: 'Trainer' },
33
+ where: { equal: [{ property: 'reputation' }, 'Gym Leader'] },
34
+ priority: 20, // Gym Leaders are special - should override level-based styling
35
+ apply: {
36
+ color: '#9b59b6',
37
+ captions: [
38
+ { value: { property: 'name' }, styles: ['bold'] },
39
+ { value: ' 🏆', styles: [] },
40
+ { value: ' Gym Leader', styles: ['italic'] },
41
+ ],
42
+ size: 45,
43
+ captionAlign: 'bottom',
44
+ },
45
+ },
46
+ {
47
+ match: { label: 'Trainer' },
48
+ where: { greaterThanOrEqual: [{ property: 'level' }, 85] },
49
+ priority: 10, // Base high-level styling
50
+ apply: {
51
+ size: 30,
52
+ captions: [
53
+ { value: { property: 'name' }, styles: ['bold'] },
54
+ { value: ' (Lv ', styles: [] },
55
+ { value: { property: 'level' }, styles: [] },
56
+ { value: ')', styles: [] },
57
+ ],
58
+ captionSize: 2,
59
+ },
60
+ },
61
+ ];
62
+ export const pokemonRules = [
63
+ // Make the 'saur family green is our highest priority
64
+ {
65
+ match: { label: 'Pokemon' },
66
+ where: { endsWith: [{ property: 'name' }, 'saur'] },
67
+ priority: 50,
68
+ apply: {
69
+ color: '#2ecc71',
70
+ captions: [
71
+ { value: '🌿 ', styles: [] },
72
+ { value: { property: 'name' }, styles: ['bold', 'italic'] },
73
+ ],
74
+ },
75
+ },
76
+ {
77
+ match: { label: 'Pokemon' },
78
+ where: { equal: [{ property: 'is_starter' }, true] },
79
+ apply: {
80
+ color: '#f39c12',
81
+ captions: [
82
+ { value: { property: 'name' }, styles: ['bold'] },
83
+ { value: ' ⭐', styles: [] },
84
+ ],
85
+ size: 40,
86
+ },
87
+ },
88
+ {
89
+ match: { label: 'Pokemon' },
90
+ where: { greaterThanOrEqual: [{ property: 'level' }, 85] },
91
+ priority: 30, // High-level Pokemon override starter styling
92
+ apply: {
93
+ color: '#c0392b',
94
+ captions: [
95
+ { value: '💪 ', styles: [] },
96
+ { value: { property: 'name' }, styles: ['bold'] },
97
+ { value: ' Lv', styles: [] },
98
+ { value: { property: 'level' }, styles: [] },
99
+ ],
100
+ size: 42,
101
+ },
102
+ },
103
+ {
104
+ match: { label: 'Pokemon' },
105
+ where: { lessThan: [{ property: 'catch_rate' }, 50] },
106
+ priority: 40, // Rare caption is our second highest priority
107
+ apply: {
108
+ captions: [
109
+ { value: { property: 'name' }, styles: ['bold'] },
110
+ { value: ' (Rare)', styles: ['italic'] },
111
+ ],
112
+ },
113
+ },
114
+ {
115
+ match: { label: 'Pokemon' },
116
+ where: {
117
+ and: [
118
+ { lessThan: [{ property: 'level' }, 10] },
119
+ { not: { equal: [{ property: 'is_starter' }, true] } },
120
+ ],
121
+ },
122
+ priority: 15, // Baby Pokemon get special styling
123
+ apply: {
124
+ size: 25,
125
+ color: '#95a5a6',
126
+ captions: [
127
+ { value: { property: 'name' }, styles: ['italic'] },
128
+ { value: ' (Smol)', styles: [] },
129
+ ],
130
+ },
131
+ },
132
+ ];
133
+ export const typeRules = [
134
+ {
135
+ match: { label: 'Type' },
136
+ where: {
137
+ or: [
138
+ { equal: [{ property: 'name' }, 'Grass'] },
139
+ { equal: [{ property: 'name' }, 'Poison'] },
140
+ ],
141
+ },
142
+ apply: {
143
+ color: '#27ae60',
144
+ },
145
+ },
146
+ ];
147
+ export const gymRules = [
148
+ {
149
+ match: { label: 'Gym' },
150
+ apply: {
151
+ color: '#8e44ad',
152
+ size: 48,
153
+ captionAlign: 'top',
154
+ captions: [
155
+ { value: '🏛️ ', styles: [] },
156
+ { value: { property: 'name' }, styles: ['bold', 'underline'] },
157
+ ],
158
+ },
159
+ },
160
+ ];
161
+ export const battledRelRules = [
162
+ {
163
+ match: { reltype: 'BATTLED' },
164
+ where: { equal: [{ property: 'won' }, true] },
165
+ apply: {
166
+ color: '#27ae60',
167
+ width: 4,
168
+ captions: [{ value: 'WON BATTLE', styles: ['bold'] }],
169
+ captionSize: 2,
170
+ },
171
+ },
172
+ {
173
+ match: { reltype: 'BATTLED' },
174
+ where: { equal: [{ property: 'won' }, false] },
175
+ apply: {
176
+ color: '#e74c3c',
177
+ width: 2,
178
+ captions: [{ value: 'LOST BATTLE', styles: ['italic'] }],
179
+ captionSize: 2,
180
+ },
181
+ },
182
+ ];
183
+ export const caughtRelRules = [
184
+ {
185
+ match: { reltype: 'CAUGHT' },
186
+ apply: {
187
+ color: '#e91e63',
188
+ width: 3,
189
+ captions: [
190
+ { value: 'Caught @ Lv', styles: [] },
191
+ { value: { property: 'level' }, styles: ['bold'] },
192
+ ],
193
+ captionSize: 1.5,
194
+ },
195
+ },
196
+ ];
197
+ export const evolvesToRelRules = [
198
+ {
199
+ match: { reltype: 'EVOLVES_TO' },
200
+ apply: {
201
+ color: '#16a085',
202
+ width: 2,
203
+ captions: [{ value: '→', styles: ['bold'] }],
204
+ },
205
+ },
206
+ {
207
+ match: { reltype: 'EVOLVES_TO' },
208
+ where: { equal: [{ property: 'method' }, 'Level'] },
209
+ priority: 1,
210
+ apply: {
211
+ captions: [
212
+ { value: '→ Lv', styles: [] },
213
+ { value: { property: 'level' }, styles: ['bold'] },
214
+ ],
215
+ },
216
+ },
217
+ {
218
+ match: { reltype: 'EVOLVES_TO' },
219
+ where: { not: { equal: [{ property: 'method' }, 'Level'] } },
220
+ priority: 1,
221
+ apply: {
222
+ color: '#8e44ad',
223
+ captions: [
224
+ { value: '→ ', styles: [] },
225
+ { value: { property: 'method' }, styles: ['italic'] },
226
+ ],
227
+ },
228
+ },
229
+ ];
230
+ export const advancedStyleRules = [
231
+ ...defaultNodeRules,
232
+ ...trainerRules,
233
+ ...pokemonRules,
234
+ ...typeRules,
235
+ ...gymRules,
236
+ ...battledRelRules,
237
+ ...caughtRelRules,
238
+ ...evolvesToRelRules,
239
+ ];
240
+ const Component = () => {
241
+ return (_jsx("div", { style: { height: '600px' }, children: _jsx(GraphVisualization, { nodes: advancedStoryGraph.nodes, rels: advancedStoryGraph.rels, className: containerClasses, nvlStyleRules: advancedStyleRules }) }));
242
+ };
243
+ export default Component;
244
+ //# sourceMappingURL=graph-visualization-rule-based-styling-advanced.story.js.map
@@ -0,0 +1 @@
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;;;;;;;;;;;;;;;;;;;G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,CAAC,IAAI,EAC7B,SAAS,EAAE,gBAAgB,EAC3B,aAAa,EAAE,kBAAkB,GACjC,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { GraphVisualization } from '../graph-visualization';\nimport { type 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,76 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import { GraphVisualization } from '../graph-visualization';
23
+ import { containerClasses, StoryGraph } from './story-data';
24
+ export const styleRules = [
25
+ {
26
+ // Nodes are teal by default
27
+ match: { label: null },
28
+ apply: { color: 'teal' },
29
+ },
30
+ {
31
+ // Type named dragon becomes purple
32
+ match: { label: 'Type' },
33
+ where: { equal: [{ property: 'name' }, 'Dragon'] },
34
+ apply: { color: '#9b59b6' },
35
+ },
36
+ // Awesome and heavy Pokemon become larger
37
+ {
38
+ match: { label: 'Pokemon' },
39
+ where: {
40
+ and: [
41
+ { equal: [{ property: 'isAwesome' }, true] },
42
+ { greaterThan: [{ property: 'weight' }, 300] },
43
+ ],
44
+ },
45
+ apply: {
46
+ size: 50,
47
+ },
48
+ },
49
+ // Pokemon are red by default
50
+ {
51
+ match: { label: 'Pokemon' },
52
+ apply: {
53
+ color: '#ff6b6b',
54
+ captions: [
55
+ { value: 'Pokemon', styles: ['bold'] },
56
+ { value: { property: 'name' } },
57
+ ],
58
+ },
59
+ },
60
+ {
61
+ // Pokemon that are also have the label Legendary become gold instead
62
+ match: { label: 'Pokemon' },
63
+ where: { label: 'Legendary' },
64
+ apply: {
65
+ color: 'gold',
66
+ captions: [
67
+ { value: { property: 'name' }, styles: ['bold', 'underline'] },
68
+ ],
69
+ },
70
+ },
71
+ ];
72
+ const Component = () => {
73
+ return (_jsx("div", { style: { height: '600px' }, children: _jsx(GraphVisualization, { nodes: StoryGraph.nodes, rels: StoryGraph.rels, className: containerClasses, nvlStyleRules: styleRules }) }));
74
+ };
75
+ export default Component;
76
+ //# 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,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,CAAC,MAAM,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,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,KAAC,kBAAkB,IACjB,KAAK,EAAE,UAAU,CAAC,KAAK,EACvB,IAAI,EAAE,UAAU,CAAC,IAAI,EACrB,SAAS,EAAE,gBAAgB,EAC3B,aAAa,EAAE,UAAU,GACzB,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { GraphVisualization } from '../graph-visualization';\nimport { type 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,54 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import { GraphVisualization } from '../graph-visualization';
23
+ import { containerClasses, StoryGraph } from './story-data';
24
+ export const simpleStyleRules = [
25
+ {
26
+ match: { label: 'Pokemon' },
27
+ apply: {
28
+ color: 'red', // Red for Pokemon
29
+ captions: [
30
+ { value: 'Pokemon', styles: ['bold'] },
31
+ { value: { property: 'name' } },
32
+ ],
33
+ },
34
+ },
35
+ {
36
+ match: { label: 'Type' },
37
+ apply: {
38
+ color: '#4ecdc4', // Teal for Types
39
+ },
40
+ },
41
+ {
42
+ match: { reltype: 'HAS_TYPE' },
43
+ apply: {
44
+ color: '#95a5a6', // Gray for relationships
45
+ captions: [{ value: 'has type' }],
46
+ width: 2,
47
+ },
48
+ },
49
+ ];
50
+ const Component = () => {
51
+ return (_jsx("div", { style: { height: '600px' }, children: _jsx(GraphVisualization, { nodes: StoryGraph.nodes, rels: StoryGraph.rels, className: containerClasses, nvlStyleRules: simpleStyleRules }) }));
52
+ };
53
+ export default Component;
54
+ //# 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,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,CAAC,MAAM,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,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,KAAC,kBAAkB,IACjB,KAAK,EAAE,UAAU,CAAC,KAAK,EACvB,IAAI,EAAE,UAAU,CAAC,IAAI,EACrB,SAAS,EAAE,gBAAgB,EAC3B,aAAa,EAAE,gBAAgB,GAC/B,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { GraphVisualization } from '../graph-visualization';\nimport { type 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"]}
@@ -22,21 +22,31 @@ export { default as GraphVisualizationBarebones } from './graph-visualization-ba
22
22
  export { default as GraphVisualizationCustom } from './graph-visualization-custom.story';
23
23
  export { default as GraphVisualizationDefault } from './graph-visualization-default.story';
24
24
  export { default as GraphVisualizationHighlighting } from './graph-visualization-highlighting.story';
25
- export { default as GraphVisualizationSearch } from './graph-visualization-search.story';
26
25
  export { default as GraphVisualizationMaximalist } from './graph-visualization-maximalist.story';
26
+ export { default as GraphVisualizationRuleBasedStylingAdvanced } from './graph-visualization-rule-based-styling-advanced.story';
27
+ export { default as GraphVisualizationRuleBasedStyling } from './graph-visualization-rule-based-styling.story';
28
+ export { default as GraphVisualizationSearch } from './graph-visualization-search.story';
29
+ export { default as GraphVisualizationSimpleStyling } from './graph-visualization-simple-styling.story';
27
30
  export { default as PreviewGraphVisualization } from './preview-graph-visualization.story';
31
+ import { removeLicenseHeader } from '../utils';
28
32
  import GraphVisualizationBarebonesSrcRaw from './graph-visualization-barebones.story?raw';
29
33
  import GraphVisualizationCustomSrcRaw from './graph-visualization-custom.story?raw';
30
34
  import GraphVisualizationDefaultSrcRaw from './graph-visualization-default.story?raw';
31
35
  import GraphVisualizationHighlightingSrcRaw from './graph-visualization-highlighting.story?raw';
32
36
  import GraphVisualizationMaximalistSrcRaw from './graph-visualization-maximalist.story?raw';
37
+ import GraphVisualizationRuleBasedStylingSrcRaw from './graph-visualization-rule-based-styling.story?raw';
38
+ import GraphVisualizationRuleBasedStylingAdvancedSrcRaw from './graph-visualization-rule-based-styling-advanced.story?raw';
33
39
  import GraphVisualizationSearchSrcRaw from './graph-visualization-search.story?raw';
40
+ import GraphVisualizationSimpleStylingSrcRaw from './graph-visualization-simple-styling.story?raw';
34
41
  import PreviewGraphVisualizationSrcRaw from './preview-graph-visualization.story?raw';
35
- export const GraphVisualizationDefaultSrc = GraphVisualizationDefaultSrcRaw.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
36
- export const GraphVisualizationBarebonesSrc = GraphVisualizationBarebonesSrcRaw.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
37
- export const GraphVisualizationMaximalistSrc = GraphVisualizationMaximalistSrcRaw.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
38
- export const GraphVisualizationCustomSrc = GraphVisualizationCustomSrcRaw.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
39
- export const GraphVisualizationHighlightingSrc = GraphVisualizationHighlightingSrcRaw.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
40
- export const GraphVisualizationSearchSrc = GraphVisualizationSearchSrcRaw.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
41
- export const PreviewGraphVisualizationSrc = PreviewGraphVisualizationSrcRaw.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
42
+ export const GraphVisualizationDefaultSrc = removeLicenseHeader(GraphVisualizationDefaultSrcRaw);
43
+ export const GraphVisualizationBarebonesSrc = removeLicenseHeader(GraphVisualizationBarebonesSrcRaw);
44
+ export const GraphVisualizationMaximalistSrc = removeLicenseHeader(GraphVisualizationMaximalistSrcRaw);
45
+ export const GraphVisualizationCustomSrc = removeLicenseHeader(GraphVisualizationCustomSrcRaw);
46
+ export const GraphVisualizationHighlightingSrc = removeLicenseHeader(GraphVisualizationHighlightingSrcRaw);
47
+ export const GraphVisualizationSimpleStylingSrc = removeLicenseHeader(GraphVisualizationSimpleStylingSrcRaw);
48
+ export const GraphVisualizationRuleBasedStylingSrc = removeLicenseHeader(GraphVisualizationRuleBasedStylingSrcRaw);
49
+ export const GraphVisualizationSearchSrc = removeLicenseHeader(GraphVisualizationSearchSrcRaw);
50
+ export const GraphVisualizationRuleBasedStylingAdvancedSrc = removeLicenseHeader(GraphVisualizationRuleBasedStylingAdvancedSrcRaw);
51
+ export const PreviewGraphVisualizationSrc = removeLicenseHeader(PreviewGraphVisualizationSrcRaw);
42
52
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AACrG,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAE3F,OAAO,iCAAiC,MAAM,2CAA2C,CAAC;AAC1F,OAAO,8BAA8B,MAAM,wCAAwC,CAAC;AACpF,OAAO,+BAA+B,MAAM,yCAAyC,CAAC;AACtF,OAAO,oCAAoC,MAAM,8CAA8C,CAAC;AAChG,OAAO,kCAAkC,MAAM,4CAA4C,CAAC;AAC5F,OAAO,8BAA8B,MAAM,wCAAwC,CAAC;AACpF,OAAO,+BAA+B,MAAM,yCAAyC,CAAC;AAEtF,MAAM,CAAC,MAAM,4BAA4B,GACvC,+BAA+B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAEtE,MAAM,CAAC,MAAM,8BAA8B,GACzC,iCAAiC,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAExE,MAAM,CAAC,MAAM,+BAA+B,GAC1C,kCAAkC,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAEzE,MAAM,CAAC,MAAM,2BAA2B,GACtC,8BAA8B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,iCAAiC,GAC5C,oCAAoC,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAE3E,MAAM,CAAC,MAAM,2BAA2B,GACtC,8BAA8B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,4BAA4B,GACvC,+BAA+B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as GraphVisualizationBarebones } from './graph-visualization-barebones.story';\nexport { default as GraphVisualizationCustom } from './graph-visualization-custom.story';\nexport { default as GraphVisualizationDefault } from './graph-visualization-default.story';\nexport { default as GraphVisualizationHighlighting } from './graph-visualization-highlighting.story';\nexport { default as GraphVisualizationSearch } from './graph-visualization-search.story';\nexport { default as GraphVisualizationMaximalist } from './graph-visualization-maximalist.story';\nexport { default as PreviewGraphVisualization } from './preview-graph-visualization.story';\n\nimport GraphVisualizationBarebonesSrcRaw from './graph-visualization-barebones.story?raw';\nimport GraphVisualizationCustomSrcRaw from './graph-visualization-custom.story?raw';\nimport GraphVisualizationDefaultSrcRaw from './graph-visualization-default.story?raw';\nimport GraphVisualizationHighlightingSrcRaw from './graph-visualization-highlighting.story?raw';\nimport GraphVisualizationMaximalistSrcRaw from './graph-visualization-maximalist.story?raw';\nimport GraphVisualizationSearchSrcRaw from './graph-visualization-search.story?raw';\nimport PreviewGraphVisualizationSrcRaw from './preview-graph-visualization.story?raw';\n\nexport const GraphVisualizationDefaultSrc =\n GraphVisualizationDefaultSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationBarebonesSrc =\n GraphVisualizationBarebonesSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationMaximalistSrc =\n GraphVisualizationMaximalistSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationCustomSrc =\n GraphVisualizationCustomSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationHighlightingSrc =\n GraphVisualizationHighlightingSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const GraphVisualizationSearchSrc =\n GraphVisualizationSearchSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n\nexport const PreviewGraphVisualizationSrc =\n PreviewGraphVisualizationSrcRaw.replace(/^\\/\\*[\\s\\S]*?\\*\\/\\s*/, '');\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"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BAAmB,CAC7D,+BAA+B,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,mBAAmB,CAC/D,iCAAiC,CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAG,mBAAmB,CAChE,kCAAkC,CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,mBAAmB,CAC5D,8BAA8B,CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,mBAAmB,CAClE,oCAAoC,CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAAG,mBAAmB,CACnE,qCAAqC,CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,qCAAqC,GAAG,mBAAmB,CACtE,wCAAwC,CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,mBAAmB,CAC5D,8BAA8B,CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,6CAA6C,GACxD,mBAAmB,CAAC,gDAAgD,CAAC,CAAC;AAExE,MAAM,CAAC,MAAM,4BAA4B,GAAG,mBAAmB,CAC7D,+BAA+B,CAChC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as GraphVisualizationBarebones } from './graph-visualization-barebones.story';\nexport { default as GraphVisualizationCustom } from './graph-visualization-custom.story';\nexport { default as GraphVisualizationDefault } from './graph-visualization-default.story';\nexport { default as GraphVisualizationHighlighting } from './graph-visualization-highlighting.story';\nexport { default as GraphVisualizationMaximalist } from './graph-visualization-maximalist.story';\nexport { default as 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"]}