@neo4j-ndl/react-graph 1.5.6 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/graph-visualization-context.js.map +1 -1
- package/lib/cjs/graph-visualization.js +1 -1
- package/lib/cjs/graph-visualization.js.map +1 -1
- package/lib/cjs/index.js +5 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/stories/graph-visualization-range-styling.story.js +21 -16
- package/lib/cjs/stories/graph-visualization-range-styling.story.js.map +1 -1
- package/lib/cjs/stories/graph-visualization-rule-based-styling-advanced.story.js +105 -82
- package/lib/cjs/stories/graph-visualization-rule-based-styling-advanced.story.js.map +1 -1
- package/lib/cjs/stories/graph-visualization-rule-based-styling.story.js +15 -13
- package/lib/cjs/stories/graph-visualization-rule-based-styling.story.js.map +1 -1
- package/lib/cjs/stories/graph-visualization-simple-styling.story.js +12 -10
- package/lib/cjs/stories/graph-visualization-simple-styling.story.js.map +1 -1
- package/lib/cjs/stories/graph-visualization-unique-colors-styling.story.js +71 -0
- package/lib/cjs/stories/graph-visualization-unique-colors-styling.story.js.map +1 -0
- package/lib/cjs/stories/index.js +5 -1
- package/lib/cjs/stories/index.js.map +1 -1
- package/lib/cjs/styling/compile-graph-styles.js +143 -60
- package/lib/cjs/styling/compile-graph-styles.js.map +1 -1
- package/lib/cjs/styling/create-vis-data-structures.js.map +1 -1
- package/lib/cjs/styling/parse-style-rules.js +4 -4
- package/lib/cjs/styling/parse-style-rules.js.map +1 -1
- package/lib/cjs/styling/style-types.js +57 -16
- package/lib/cjs/styling/style-types.js.map +1 -1
- package/lib/cjs/styling/use-graph-data.js +1 -1
- package/lib/cjs/styling/use-graph-data.js.map +1 -1
- package/lib/esm/graph-visualization-context.js.map +1 -1
- package/lib/esm/graph-visualization.js +1 -1
- package/lib/esm/graph-visualization.js.map +1 -1
- package/lib/esm/index.js +2 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/stories/graph-visualization-range-styling.story.js +21 -16
- package/lib/esm/stories/graph-visualization-range-styling.story.js.map +1 -1
- package/lib/esm/stories/graph-visualization-rule-based-styling-advanced.story.js +105 -82
- package/lib/esm/stories/graph-visualization-rule-based-styling-advanced.story.js.map +1 -1
- package/lib/esm/stories/graph-visualization-rule-based-styling.story.js +15 -13
- package/lib/esm/stories/graph-visualization-rule-based-styling.story.js.map +1 -1
- package/lib/esm/stories/graph-visualization-simple-styling.story.js +12 -10
- package/lib/esm/stories/graph-visualization-simple-styling.story.js.map +1 -1
- package/lib/esm/stories/graph-visualization-unique-colors-styling.story.js +69 -0
- package/lib/esm/stories/graph-visualization-unique-colors-styling.story.js.map +1 -0
- package/lib/esm/stories/index.js +3 -0
- package/lib/esm/stories/index.js.map +1 -1
- package/lib/esm/styling/compile-graph-styles.js +141 -58
- package/lib/esm/styling/compile-graph-styles.js.map +1 -1
- package/lib/esm/styling/create-vis-data-structures.js.map +1 -1
- package/lib/esm/styling/parse-style-rules.js +5 -5
- package/lib/esm/styling/parse-style-rules.js.map +1 -1
- package/lib/esm/styling/style-types.js +56 -15
- package/lib/esm/styling/style-types.js.map +1 -1
- package/lib/esm/styling/use-graph-data.js +2 -2
- package/lib/esm/styling/use-graph-data.js.map +1 -1
- package/lib/types/graph-visualization-context.d.ts +2 -2
- package/lib/types/graph-visualization-context.d.ts.map +1 -1
- package/lib/types/graph-visualization.d.ts +3 -3
- package/lib/types/graph-visualization.d.ts.map +1 -1
- package/lib/types/index.d.ts +3 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/stories/graph-visualization-range-styling.story.d.ts +2 -2
- package/lib/types/stories/graph-visualization-range-styling.story.d.ts.map +1 -1
- package/lib/types/stories/graph-visualization-rule-based-styling-advanced.story.d.ts +10 -10
- package/lib/types/stories/graph-visualization-rule-based-styling-advanced.story.d.ts.map +1 -1
- package/lib/types/stories/graph-visualization-rule-based-styling.story.d.ts +2 -2
- package/lib/types/stories/graph-visualization-rule-based-styling.story.d.ts.map +1 -1
- package/lib/types/stories/graph-visualization-simple-styling.story.d.ts +2 -2
- package/lib/types/stories/graph-visualization-simple-styling.story.d.ts.map +1 -1
- package/lib/types/stories/graph-visualization-unique-colors-styling.story.d.ts +23 -0
- package/lib/types/stories/graph-visualization-unique-colors-styling.story.d.ts.map +1 -0
- package/lib/types/stories/index.d.ts +2 -0
- package/lib/types/stories/index.d.ts.map +1 -1
- package/lib/types/styling/compile-graph-styles.d.ts +9 -8
- package/lib/types/styling/compile-graph-styles.d.ts.map +1 -1
- package/lib/types/styling/create-vis-data-structures.d.ts +2 -2
- package/lib/types/styling/create-vis-data-structures.d.ts.map +1 -1
- package/lib/types/styling/parse-style-rules.d.ts +5 -5
- package/lib/types/styling/parse-style-rules.d.ts.map +1 -1
- package/lib/types/styling/style-types.d.ts +113 -51
- package/lib/types/styling/style-types.d.ts.map +1 -1
- package/lib/types/styling/use-graph-data.d.ts +3 -3
- package/lib/types/styling/use-graph-data.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +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;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,gEAA4D;AAE5D,6CAAoE;AAEvD,QAAA,gBAAgB,GAAgB;IAC3C;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;QACtB,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;KACpB;CACF,CAAC;AAEW,QAAA,YAAY,GAAgB;IACvC;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC3B,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,YAAY,CAAC,EAAE;QAC5D,QAAQ,EAAE,EAAE,EAAE,gEAAgE;QAC9E,KAAK,EAAE;YACL,KAAK,E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KAAK,EAAE,SAAS;YAChB,QAAQ,EAAE;gBACR,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE;gBAC3B,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE;aACtD;SACF;KACF;CACF,CAAC;AAEW,QAAA,kBAAkB,GAAgB;IAC7C,GAAG,wBAAgB;IACnB,GAAG,oBAAY;IACf,GAAG,oBAAY;IACf,GAAG,iBAAS;IACZ,GAAG,gBAAQ;IACX,GAAG,uBAAe;IAClB,GAAG,sBAAc;IACjB,GAAG,yBAAiB;CACrB,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,gCAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,uBAAC,wCAAkB,IACjB,KAAK,EAAE,+BAAkB,CAAC,KAAK,EAC/B,IAAI,EAAE,+BAAkB,CAAC,IAAI,EAC7B,SAAS,EAAE,6BAAgB,EAC3B,aAAa,EAAE,0BAAkB,GACjC,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"]}
|
|
1
|
+
{"version":3,"file":"graph-visualization-rule-based-styling-advanced.story.js","sourceRoot":"","sources":["../../../src/stories/graph-visualization-rule-based-styling-advanced.story.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,gEAA4D;AAE5D,6CAAoE;AAEvD,QAAA,gBAAgB,GAAqB;IAChD;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;QACtB,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE;KAC/B;CACF,CAAC;AAEW,QAAA,YAAY,GAAqB;IAC5C;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC3B,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,YAAY,CAAC,EAAE;QAC5D,QAAQ,EAAE,EAAE,EAAE,gEAAgE;QAC9E,KAAK,EAAE;YACL,KAA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AG,iBAAS;IACZ,GAAG,gBAAQ;IACX,GAAG,uBAAe;IAClB,GAAG,sBAAc;IACjB,GAAG,yBAAiB;CACrB,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,gCAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,uBAAC,wCAAkB,IACjB,KAAK,EAAE,+BAAkB,CAAC,KAAK,EAC/B,IAAI,EAAE,+BAAkB,CAAC,IAAI,EAC7B,SAAS,EAAE,6BAAgB,EAC3B,UAAU,EAAE,0BAAkB,GAC9B,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { GraphVisualization } from '../graph-visualization';\nimport { type GraphStyleRule } from '../styling/style-types';\nimport { advancedStoryGraph, containerClasses } from './story-data';\n\nexport const defaultNodeRules: GraphStyleRule[] = [\n {\n match: { label: null },\n apply: { size: { value: 10 } },\n },\n];\n\nexport const trainerRules: GraphStyleRule[] = [\n {\n match: { label: 'Trainer' },\n where: { equal: [{ property: 'reputation' }, 'Gym Leader'] },\n priority: 20, // Gym Leaders are special - should override level-based styling\n apply: {\n color: { value: '#9b59b6' },\n captions: {\n text: [\n { value: { property: 'name' }, styles: ['bold'] },\n { value: ' 🏆', styles: [] },\n { value: ' Gym Leader', styles: ['italic'] },\n ],\n align: 'bottom',\n },\n size: { value: 45 },\n },\n },\n {\n match: { label: 'Trainer' },\n where: { greaterThanOrEqual: [{ property: 'level' }, 85] },\n priority: 10, // Base high-level styling\n apply: {\n size: { value: 30 },\n captions: {\n text: [\n { value: { property: 'name' }, styles: ['bold'] },\n { value: ' (Lv ', styles: [] },\n { value: { property: 'level' }, styles: [] },\n { value: ')', styles: [] },\n ],\n size: 2,\n },\n },\n },\n];\n\nexport const pokemonRules: GraphStyleRule[] = [\n // Make the 'saur family green is our highest priority\n {\n match: { label: 'Pokemon' },\n where: { endsWith: [{ property: 'name' }, 'saur'] },\n priority: 50,\n apply: {\n color: { value: '#2ecc71' },\n captions: {\n text: [\n { value: '🌿 ', styles: [] },\n { value: { property: 'name' }, styles: ['bold', 'italic'] },\n ],\n },\n },\n },\n {\n match: { label: 'Pokemon' },\n where: { equal: [{ property: 'is_starter' }, true] },\n apply: {\n color: { value: '#f39c12' },\n captions: {\n text: [\n { value: { property: 'name' }, styles: ['bold'] },\n { value: ' ⭐', styles: [] },\n ],\n },\n size: { value: 40 },\n },\n },\n {\n match: { label: 'Pokemon' },\n where: { greaterThanOrEqual: [{ property: 'level' }, 85] },\n priority: 30, // High-level Pokemon override starter styling\n apply: {\n color: { value: '#c0392b' },\n captions: {\n text: [\n { value: '💪 ', styles: [] },\n { value: { property: 'name' }, styles: ['bold'] },\n { value: ' Lv', styles: [] },\n { value: { property: 'level' }, styles: [] },\n ],\n },\n size: { value: 42 },\n },\n },\n {\n match: { label: 'Pokemon' },\n where: { lessThan: [{ property: 'catch_rate' }, 50] },\n priority: 40, // Rare caption is our second highest priority\n apply: {\n captions: {\n text: [\n { value: { property: 'name' }, styles: ['bold'] },\n { value: ' (Rare)', styles: ['italic'] },\n ],\n },\n },\n },\n {\n match: { label: 'Pokemon' },\n where: {\n and: [\n { lessThan: [{ property: 'level' }, 10] },\n { not: { equal: [{ property: 'is_starter' }, true] } },\n ],\n },\n priority: 15, // Baby Pokemon get special styling\n apply: {\n size: { value: 25 },\n color: { value: '#95a5a6' },\n captions: {\n text: [\n { value: { property: 'name' }, styles: ['italic'] },\n { value: ' (Smol)', styles: [] },\n ],\n },\n },\n },\n];\n\nexport const typeRules: GraphStyleRule[] = [\n {\n match: { label: 'Type' },\n where: {\n or: [\n { equal: [{ property: 'name' }, 'Grass'] },\n { equal: [{ property: 'name' }, 'Poison'] },\n ],\n },\n apply: {\n color: { value: '#27ae60' },\n },\n },\n];\n\nexport const gymRules: GraphStyleRule[] = [\n {\n match: { label: 'Gym' },\n apply: {\n color: { value: '#8e44ad' },\n size: { value: 48 },\n captions: {\n text: [\n { value: '🏛️ ', styles: [] },\n { value: { property: 'name' }, styles: ['bold', 'underline'] },\n ],\n align: 'top',\n },\n },\n },\n];\n\nexport const battledRelRules: GraphStyleRule[] = [\n {\n match: { reltype: 'BATTLED' },\n where: { equal: [{ property: 'won' }, true] },\n apply: {\n color: { value: '#27ae60' },\n width: { value: 4 },\n captions: { text: [{ value: 'WON BATTLE', styles: ['bold'] }], size: 2 },\n },\n },\n {\n match: { reltype: 'BATTLED' },\n where: { equal: [{ property: 'won' }, false] },\n apply: {\n color: { value: '#e74c3c' },\n width: { value: 2 },\n captions: {\n text: [{ value: 'LOST BATTLE', styles: ['italic'] }],\n size: 2,\n },\n },\n },\n];\n\nexport const caughtRelRules: GraphStyleRule[] = [\n {\n match: { reltype: 'CAUGHT' },\n apply: {\n color: { value: '#e91e63' },\n width: { value: 3 },\n captions: {\n text: [\n { value: 'Caught @ Lv', styles: [] },\n { value: { property: 'level' }, styles: ['bold'] },\n ],\n size: 1.5,\n },\n },\n },\n];\n\nexport const evolvesToRelRules: GraphStyleRule[] = [\n {\n match: { reltype: 'EVOLVES_TO' },\n apply: {\n color: { value: '#16a085' },\n width: { value: 2 },\n captions: { text: [{ value: '→', styles: ['bold'] }] },\n },\n },\n {\n match: { reltype: 'EVOLVES_TO' },\n where: { equal: [{ property: 'method' }, 'Level'] },\n priority: 1,\n apply: {\n captions: {\n text: [\n { value: '→ Lv', styles: [] },\n { value: { property: 'level' }, styles: ['bold'] },\n ],\n },\n },\n },\n {\n match: { reltype: 'EVOLVES_TO' },\n where: { not: { equal: [{ property: 'method' }, 'Level'] } },\n priority: 1,\n apply: {\n color: { value: '#8e44ad' },\n captions: {\n text: [\n { value: '→ ', styles: [] },\n { value: { property: 'method' }, styles: ['italic'] },\n ],\n },\n },\n },\n];\n\nexport const advancedStyleRules: GraphStyleRule[] = [\n ...defaultNodeRules,\n ...trainerRules,\n ...pokemonRules,\n ...typeRules,\n ...gymRules,\n ...battledRelRules,\n ...caughtRelRules,\n ...evolvesToRelRules,\n];\n\nconst Component = () => {\n return (\n <div style={{ height: '600px' }}>\n <GraphVisualization\n nodes={advancedStoryGraph.nodes}\n rels={advancedStoryGraph.rels}\n className={containerClasses}\n styleRules={advancedStyleRules}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -28,13 +28,13 @@ exports.styleRules = [
|
|
|
28
28
|
{
|
|
29
29
|
// Nodes are teal by default
|
|
30
30
|
match: { label: null },
|
|
31
|
-
apply: { color: 'teal' },
|
|
31
|
+
apply: { color: { value: 'teal' } },
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
// Type named dragon becomes purple
|
|
35
35
|
match: { label: 'Type' },
|
|
36
36
|
where: { equal: [{ property: 'name' }, 'Dragon'] },
|
|
37
|
-
apply: { color: '#9b59b6' },
|
|
37
|
+
apply: { color: { value: '#9b59b6' } },
|
|
38
38
|
},
|
|
39
39
|
// Awesome and heavy Pokemon become larger
|
|
40
40
|
{
|
|
@@ -46,18 +46,20 @@ exports.styleRules = [
|
|
|
46
46
|
],
|
|
47
47
|
},
|
|
48
48
|
apply: {
|
|
49
|
-
size: 50,
|
|
49
|
+
size: { value: 50 },
|
|
50
50
|
},
|
|
51
51
|
},
|
|
52
52
|
// Pokemon are red by default
|
|
53
53
|
{
|
|
54
54
|
match: { label: 'Pokemon' },
|
|
55
55
|
apply: {
|
|
56
|
-
color: '#ff6b6b',
|
|
57
|
-
captions:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
color: { value: '#ff6b6b' },
|
|
57
|
+
captions: {
|
|
58
|
+
text: [
|
|
59
|
+
{ value: 'Pokemon', styles: ['bold'] },
|
|
60
|
+
{ value: { property: 'name' } },
|
|
61
|
+
],
|
|
62
|
+
},
|
|
61
63
|
},
|
|
62
64
|
},
|
|
63
65
|
{
|
|
@@ -65,15 +67,15 @@ exports.styleRules = [
|
|
|
65
67
|
match: { label: 'Pokemon' },
|
|
66
68
|
where: { label: 'Legendary' },
|
|
67
69
|
apply: {
|
|
68
|
-
color: 'gold',
|
|
69
|
-
captions:
|
|
70
|
-
{ value: { property: 'name' }, styles: ['bold', 'underline'] },
|
|
71
|
-
|
|
70
|
+
color: { value: 'gold' },
|
|
71
|
+
captions: {
|
|
72
|
+
text: [{ value: { property: 'name' }, styles: ['bold', 'underline'] }],
|
|
73
|
+
},
|
|
72
74
|
},
|
|
73
75
|
},
|
|
74
76
|
];
|
|
75
77
|
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,
|
|
78
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: { height: '600px' }, children: (0, jsx_runtime_1.jsx)(graph_visualization_1.GraphVisualization, { nodes: story_data_1.StoryGraph.nodes, rels: story_data_1.StoryGraph.rels, className: story_data_1.containerClasses, styleRules: exports.styleRules }) }));
|
|
77
79
|
};
|
|
78
80
|
exports.default = Component;
|
|
79
81
|
//# sourceMappingURL=graph-visualization-rule-based-styling.story.js.map
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"graph-visualization-rule-based-styling.story.js","sourceRoot":"","sources":["../../../src/stories/graph-visualization-rule-based-styling.story.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,gEAA4D;AAE5D,6CAA4D;AAE/C,QAAA,UAAU,GAAqB;IAC1C;QACE,4BAA4B;QAC5B,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;QACtB,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;KACpC;IACD;QACE,mCAAmC;QACnC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;QACxB,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAE;QAClD,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE;KACvC;IACD,0CAA0C;IAC1C;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC3B,KAAK,EAAE;YACL,GAAG,EAAE;gBACH,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,IAAI,CAAC,EAAE;gBAC5C,EAAE,WAAW,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,GAAG,CAAC,EAAE;aAC/C;SACF;QACD,KAAK,EAAE;YACL,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;SACpB;KACF;IACD,6BAA6B;IAC7B;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC3B,KAAK,EAAE;YACL,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;YAC3B,QAAQ,EAAE;gBACR,IAAI,EAAE;oBACJ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE;oBACtC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE;iBAChC;aACF;SACF;KACF;IACD;QACE,qEAAqE;QACrE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC3B,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE;QAC7B,KAAK,EAAE;YACL,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;YACxB,QAAQ,EAAE;gBACR,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC;aACvE;SACF;KACF;CACF,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,gCAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,uBAAC,wCAAkB,IACjB,KAAK,EAAE,uBAAU,CAAC,KAAK,EACvB,IAAI,EAAE,uBAAU,CAAC,IAAI,EACrB,SAAS,EAAE,6BAAgB,EAC3B,UAAU,EAAE,kBAAU,GACtB,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { GraphVisualization } from '../graph-visualization';\nimport { type GraphStyleRule } from '../styling/style-types';\nimport { containerClasses, StoryGraph } from './story-data';\n\nexport const styleRules: GraphStyleRule[] = [\n {\n // Nodes are teal by default\n match: { label: null },\n apply: { color: { value: 'teal' } },\n },\n {\n // Type named dragon becomes purple\n match: { label: 'Type' },\n where: { equal: [{ property: 'name' }, 'Dragon'] },\n apply: { color: { value: '#9b59b6' } },\n },\n // Awesome and heavy Pokemon become larger\n {\n match: { label: 'Pokemon' },\n where: {\n and: [\n { equal: [{ property: 'isAwesome' }, true] },\n { greaterThan: [{ property: 'weight' }, 300] },\n ],\n },\n apply: {\n size: { value: 50 },\n },\n },\n // Pokemon are red by default\n {\n match: { label: 'Pokemon' },\n apply: {\n color: { value: '#ff6b6b' },\n captions: {\n text: [\n { value: 'Pokemon', styles: ['bold'] },\n { value: { property: 'name' } },\n ],\n },\n },\n },\n {\n // Pokemon that are also have the label Legendary become gold instead\n match: { label: 'Pokemon' },\n where: { label: 'Legendary' },\n apply: {\n color: { value: 'gold' },\n captions: {\n text: [{ value: { property: 'name' }, styles: ['bold', 'underline'] }],\n },\n },\n },\n];\n\nconst Component = () => {\n return (\n <div style={{ height: '600px' }}>\n <GraphVisualization\n nodes={StoryGraph.nodes}\n rels={StoryGraph.rels}\n className={containerClasses}\n styleRules={styleRules}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -28,30 +28,32 @@ exports.simpleStyleRules = [
|
|
|
28
28
|
{
|
|
29
29
|
match: { label: 'Pokemon' },
|
|
30
30
|
apply: {
|
|
31
|
-
color: 'red', // Red for Pokemon
|
|
32
|
-
captions:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
color: { value: 'red' }, // Red for Pokemon
|
|
32
|
+
captions: {
|
|
33
|
+
text: [
|
|
34
|
+
{ value: 'Pokemon', styles: ['bold'] },
|
|
35
|
+
{ value: { property: 'name' } },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
36
38
|
},
|
|
37
39
|
},
|
|
38
40
|
{
|
|
39
41
|
match: { label: 'Type' },
|
|
40
42
|
apply: {
|
|
41
|
-
color: '#4ecdc4', // Teal for Types
|
|
43
|
+
color: { value: '#4ecdc4' }, // Teal for Types
|
|
42
44
|
},
|
|
43
45
|
},
|
|
44
46
|
{
|
|
45
47
|
match: { reltype: 'HAS_TYPE' },
|
|
46
48
|
apply: {
|
|
47
|
-
color: '#95a5a6', // Gray for relationships
|
|
48
|
-
captions: [{ value: 'has type' }],
|
|
49
|
-
width: 2,
|
|
49
|
+
color: { value: '#95a5a6' }, // Gray for relationships
|
|
50
|
+
captions: { text: [{ value: 'has type' }] },
|
|
51
|
+
width: { value: 2 },
|
|
50
52
|
},
|
|
51
53
|
},
|
|
52
54
|
];
|
|
53
55
|
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,
|
|
56
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: { height: '600px' }, children: (0, jsx_runtime_1.jsx)(graph_visualization_1.GraphVisualization, { nodes: story_data_1.StoryGraph.nodes, rels: story_data_1.StoryGraph.rels, className: story_data_1.containerClasses, styleRules: exports.simpleStyleRules }) }));
|
|
55
57
|
};
|
|
56
58
|
exports.default = Component;
|
|
57
59
|
//# sourceMappingURL=graph-visualization-simple-styling.story.js.map
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"graph-visualization-simple-styling.story.js","sourceRoot":"","sources":["../../../src/stories/graph-visualization-simple-styling.story.tsx"],"names":[],"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j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { GraphVisualization } from '../graph-visualization';\nimport { type GraphStyleRule } from '../styling/style-types';\nimport { containerClasses, StoryGraph } from './story-data';\n\nexport const simpleStyleRules: GraphStyleRule[] = [\n {\n match: { label: 'Pokemon' },\n apply: {\n color: { value: 'red' }, // Red for Pokemon\n captions: {\n text: [\n { value: 'Pokemon', styles: ['bold'] },\n { value: { property: 'name' } },\n ],\n },\n },\n },\n {\n match: { label: 'Type' },\n apply: {\n color: { value: '#4ecdc4' }, // Teal for Types\n },\n },\n {\n match: { reltype: 'HAS_TYPE' },\n apply: {\n color: { value: '#95a5a6' }, // Gray for relationships\n captions: { text: [{ value: 'has type' }] },\n width: { value: 2 },\n },\n },\n];\n\nconst Component = () => {\n return (\n <div style={{ height: '600px' }}>\n <GraphVisualization\n nodes={StoryGraph.nodes}\n rels={StoryGraph.rels}\n className={containerClasses}\n styleRules={simpleStyleRules}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) "Neo4j"
|
|
7
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
8
|
+
*
|
|
9
|
+
* This file is part of Neo4j.
|
|
10
|
+
*
|
|
11
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
12
|
+
* it under the terms of the GNU General Public License as published by
|
|
13
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
14
|
+
* (at your option) any later version.
|
|
15
|
+
*
|
|
16
|
+
* This program is distributed in the hope that it will be useful,
|
|
17
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
* GNU General Public License for more details.
|
|
20
|
+
*
|
|
21
|
+
* You should have received a copy of the GNU General Public License
|
|
22
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
+
*/
|
|
24
|
+
const graph_visualization_1 = require("../graph-visualization");
|
|
25
|
+
const story_data_1 = require("./story-data");
|
|
26
|
+
/**
|
|
27
|
+
* Uses the Pokémon advancedStoryGraph to demonstrate uniqueColors styling.
|
|
28
|
+
* All nodes and relationships default to gray; Trainer nodes are then colored
|
|
29
|
+
* by their `reputation` property (Champion, Gym Leader, Rival, Breeder) and
|
|
30
|
+
* EVOLVES_TO relationships are colored by their `method` property (Level,
|
|
31
|
+
* Friendship, Thunder Stone, etc.).
|
|
32
|
+
*/
|
|
33
|
+
const styleRules = [
|
|
34
|
+
{
|
|
35
|
+
match: { label: null },
|
|
36
|
+
apply: { color: { value: '#aaaaaa' } },
|
|
37
|
+
priority: 0,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
match: { reltype: null },
|
|
41
|
+
apply: { color: { value: '#aaaaaa' } },
|
|
42
|
+
priority: 0,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
match: { label: 'Trainer' },
|
|
46
|
+
apply: {
|
|
47
|
+
uniqueColors: { onProperty: 'reputation' },
|
|
48
|
+
captions: {
|
|
49
|
+
text: [
|
|
50
|
+
{ value: { property: 'name' }, styles: ['bold'] },
|
|
51
|
+
{ value: ' · ', styles: [] },
|
|
52
|
+
{ value: { property: 'reputation' }, styles: ['italic'] },
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
priority: 1,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
match: { reltype: 'EVOLVES_TO' },
|
|
60
|
+
apply: {
|
|
61
|
+
uniqueColors: { onProperty: 'method' },
|
|
62
|
+
captions: { text: [{ value: { property: 'method' } }] },
|
|
63
|
+
},
|
|
64
|
+
priority: 1,
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
const Component = () => {
|
|
68
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: { height: '600px' }, children: (0, jsx_runtime_1.jsx)(graph_visualization_1.GraphVisualization, { nodes: story_data_1.advancedStoryGraph.nodes, rels: story_data_1.advancedStoryGraph.rels, className: story_data_1.containerClasses, styleRules: styleRules }) }));
|
|
69
|
+
};
|
|
70
|
+
exports.default = Component;
|
|
71
|
+
//# sourceMappingURL=graph-visualization-unique-colors-styling.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-visualization-unique-colors-styling.story.js","sourceRoot":"","sources":["../../../src/stories/graph-visualization-unique-colors-styling.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,gEAA4D;AAE5D,6CAAoE;AAEpE;;;;;;GAMG;AACH,MAAM,UAAU,GAAqB;IACnC;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;QACtB,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE;QACtC,QAAQ,EAAE,CAAC;KACZ;IACD;QACE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;QACxB,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE;QACtC,QAAQ,EAAE,CAAC;KACZ;IACD;QACE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;QAC3B,KAAK,EAAE;YACL,YAAY,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE;YAC1C,QAAQ,EAAE;gBACR,IAAI,EAAE;oBACJ,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE;oBACjD,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;oBAC5B,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE;iBAC1D;aACF;SACF;QACD,QAAQ,EAAE,CAAC;KACZ;IACD;QACE,KAAK,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE;QAChC,KAAK,EAAE;YACL,YAAY,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE;YACtC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,CAAC,EAAE;SACxD;QACD,QAAQ,EAAE,CAAC;KACZ;CACF,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,gCAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAC7B,uBAAC,wCAAkB,IACjB,KAAK,EAAE,+BAAkB,CAAC,KAAK,EAC/B,IAAI,EAAE,+BAAkB,CAAC,IAAI,EAC7B,SAAS,EAAE,6BAAgB,EAC3B,UAAU,EAAE,UAAU,GACtB,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { GraphVisualization } from '../graph-visualization';\nimport { type GraphStyleRule } from '../styling/style-types';\nimport { advancedStoryGraph, containerClasses } from './story-data';\n\n/**\n * Uses the Pokémon advancedStoryGraph to demonstrate uniqueColors styling.\n * All nodes and relationships default to gray; Trainer nodes are then colored\n * by their `reputation` property (Champion, Gym Leader, Rival, Breeder) and\n * EVOLVES_TO relationships are colored by their `method` property (Level,\n * Friendship, Thunder Stone, etc.).\n */\nconst styleRules: GraphStyleRule[] = [\n {\n match: { label: null },\n apply: { color: { value: '#aaaaaa' } },\n priority: 0,\n },\n {\n match: { reltype: null },\n apply: { color: { value: '#aaaaaa' } },\n priority: 0,\n },\n {\n match: { label: 'Trainer' },\n apply: {\n uniqueColors: { onProperty: 'reputation' },\n captions: {\n text: [\n { value: { property: 'name' }, styles: ['bold'] },\n { value: ' · ', styles: [] },\n { value: { property: 'reputation' }, styles: ['italic'] },\n ],\n },\n },\n priority: 1,\n },\n {\n match: { reltype: 'EVOLVES_TO' },\n apply: {\n uniqueColors: { onProperty: 'method' },\n captions: { text: [{ value: { property: 'method' } }] },\n },\n priority: 1,\n },\n];\n\nconst Component = () => {\n return (\n <div style={{ height: '600px' }}>\n <GraphVisualization\n nodes={advancedStoryGraph.nodes}\n rels={advancedStoryGraph.rels}\n className={containerClasses}\n styleRules={styleRules}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
|
package/lib/cjs/stories/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.PreviewGraphVisualizationSrc = exports.GraphVisualizationRangeStylingSrc = 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.GraphVisualizationRangeStyling = exports.GraphVisualizationMaximalist = exports.GraphVisualizationHighlighting = exports.GraphVisualizationDefault = exports.GraphVisualizationCustom = exports.GraphVisualizationBarebones = void 0;
|
|
26
|
+
exports.PreviewGraphVisualizationSrc = exports.GraphVisualizationUniqueColorsStylingRawSrc = exports.GraphVisualizationRangeStylingSrc = exports.GraphVisualizationRuleBasedStylingAdvancedSrc = exports.GraphVisualizationSearchSrc = exports.GraphVisualizationRuleBasedStylingSrc = exports.GraphVisualizationSimpleStylingSrc = exports.GraphVisualizationHighlightingSrc = exports.GraphVisualizationCustomSrc = exports.GraphVisualizationMaximalistSrc = exports.GraphVisualizationBarebonesSrc = exports.GraphVisualizationDefaultSrc = exports.PreviewGraphVisualization = exports.GraphVisualizationUniqueColorsStyling = exports.GraphVisualizationSimpleStyling = exports.GraphVisualizationSearch = exports.GraphVisualizationRuleBasedStyling = exports.GraphVisualizationRuleBasedStylingAdvanced = exports.GraphVisualizationRangeStyling = 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");
|
|
@@ -44,6 +44,8 @@ var graph_visualization_search_story_1 = require("./graph-visualization-search.s
|
|
|
44
44
|
Object.defineProperty(exports, "GraphVisualizationSearch", { enumerable: true, get: function () { return __importDefault(graph_visualization_search_story_1).default; } });
|
|
45
45
|
var graph_visualization_simple_styling_story_1 = require("./graph-visualization-simple-styling.story");
|
|
46
46
|
Object.defineProperty(exports, "GraphVisualizationSimpleStyling", { enumerable: true, get: function () { return __importDefault(graph_visualization_simple_styling_story_1).default; } });
|
|
47
|
+
var graph_visualization_unique_colors_styling_story_1 = require("./graph-visualization-unique-colors-styling.story");
|
|
48
|
+
Object.defineProperty(exports, "GraphVisualizationUniqueColorsStyling", { enumerable: true, get: function () { return __importDefault(graph_visualization_unique_colors_styling_story_1).default; } });
|
|
47
49
|
var preview_graph_visualization_story_1 = require("./preview-graph-visualization.story");
|
|
48
50
|
Object.defineProperty(exports, "PreviewGraphVisualization", { enumerable: true, get: function () { return __importDefault(preview_graph_visualization_story_1).default; } });
|
|
49
51
|
const utils_1 = require("../utils");
|
|
@@ -57,6 +59,7 @@ const graph_visualization_rule_based_styling_story_raw_1 = __importDefault(requi
|
|
|
57
59
|
const graph_visualization_rule_based_styling_advanced_story_raw_1 = __importDefault(require("./graph-visualization-rule-based-styling-advanced.story?raw"));
|
|
58
60
|
const graph_visualization_search_story_raw_1 = __importDefault(require("./graph-visualization-search.story?raw"));
|
|
59
61
|
const graph_visualization_simple_styling_story_raw_1 = __importDefault(require("./graph-visualization-simple-styling.story?raw"));
|
|
62
|
+
const graph_visualization_unique_colors_styling_story_raw_1 = __importDefault(require("./graph-visualization-unique-colors-styling.story?raw"));
|
|
60
63
|
const preview_graph_visualization_story_raw_1 = __importDefault(require("./preview-graph-visualization.story?raw"));
|
|
61
64
|
exports.GraphVisualizationDefaultSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_default_story_raw_1.default);
|
|
62
65
|
exports.GraphVisualizationBarebonesSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_barebones_story_raw_1.default);
|
|
@@ -68,5 +71,6 @@ exports.GraphVisualizationRuleBasedStylingSrc = (0, utils_1.removeLicenseHeader)
|
|
|
68
71
|
exports.GraphVisualizationSearchSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_search_story_raw_1.default);
|
|
69
72
|
exports.GraphVisualizationRuleBasedStylingAdvancedSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_rule_based_styling_advanced_story_raw_1.default);
|
|
70
73
|
exports.GraphVisualizationRangeStylingSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_range_styling_story_raw_1.default);
|
|
74
|
+
exports.GraphVisualizationUniqueColorsStylingRawSrc = (0, utils_1.removeLicenseHeader)(graph_visualization_unique_colors_styling_story_raw_1.default);
|
|
71
75
|
exports.PreviewGraphVisualizationSrc = (0, utils_1.removeLicenseHeader)(preview_graph_visualization_story_raw_1.default);
|
|
72
76
|
//# 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,+FAAiG;AAAxF,qKAAA,OAAO,OAAgC;AAChD,qGAAsG;AAA7F,0KAAA,OAAO,OAAkC;AAClD,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,gIAA8F;AAC9F,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,iCAAiC,GAAG,IAAA,2BAAmB,EAClE,qDAAiC,CAClC,CAAC;AAEW,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 GraphVisualizationRangeStyling } from './graph-visualization-range-styling.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 GraphVisualizationRangeStylingRaw from './graph-visualization-range-styling.story?raw';\nimport GraphVisualizationRuleBasedStylingSrcRaw from './graph-visualization-rule-based-styling.story?raw';\nimport GraphVisualizationRuleBasedStylingAdvancedSrcRaw from './graph-visualization-rule-based-styling-advanced.story?raw';\nimport 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 GraphVisualizationRangeStylingSrc = removeLicenseHeader(\n GraphVisualizationRangeStylingRaw,\n);\n\nexport const PreviewGraphVisualizationSrc = removeLicenseHeader(\n PreviewGraphVisualizationSrcRaw,\n);\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,qGAAsG;AAA7F,0KAAA,OAAO,OAAkC;AAClD,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,qHAAqH;AAA5G,yLAAA,OAAO,OAAyC;AACzD,yFAA2F;AAAlF,+JAAA,OAAO,OAA6B;AAE7C,oCAA+C;AAC/C,wHAA0F;AAC1F,kHAAoF;AACpF,oHAAsF;AACtF,8HAAgG;AAChG,0HAA4F;AAC5F,gIAA8F;AAC9F,0IAA0G;AAC1G,4JAA2H;AAC3H,kHAAoF;AACpF,kIAAmG;AACnG,gJAA6G;AAC7G,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,iCAAiC,GAAG,IAAA,2BAAmB,EAClE,qDAAiC,CAClC,CAAC;AAEW,QAAA,2CAA2C,GAAG,IAAA,2BAAmB,EAC5E,6DAAwC,CACzC,CAAC;AAEW,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 GraphVisualizationRangeStyling } from './graph-visualization-range-styling.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 GraphVisualizationUniqueColorsStyling } from './graph-visualization-unique-colors-styling.story';\nexport { default as PreviewGraphVisualization } from './preview-graph-visualization.story';\n\nimport { removeLicenseHeader } from '../utils';\nimport GraphVisualizationBarebonesSrcRaw from './graph-visualization-barebones.story?raw';\nimport GraphVisualizationCustomSrcRaw from './graph-visualization-custom.story?raw';\nimport GraphVisualizationDefaultSrcRaw from './graph-visualization-default.story?raw';\nimport GraphVisualizationHighlightingSrcRaw from './graph-visualization-highlighting.story?raw';\nimport GraphVisualizationMaximalistSrcRaw from './graph-visualization-maximalist.story?raw';\nimport GraphVisualizationRangeStylingRaw from './graph-visualization-range-styling.story?raw';\nimport GraphVisualizationRuleBasedStylingSrcRaw from './graph-visualization-rule-based-styling.story?raw';\nimport GraphVisualizationRuleBasedStylingAdvancedSrcRaw from './graph-visualization-rule-based-styling-advanced.story?raw';\nimport GraphVisualizationSearchSrcRaw from './graph-visualization-search.story?raw';\nimport GraphVisualizationSimpleStylingSrcRaw from './graph-visualization-simple-styling.story?raw';\nimport GraphVisualizationUniqueColorsStylingRaw from './graph-visualization-unique-colors-styling.story?raw';\nimport PreviewGraphVisualizationSrcRaw from './preview-graph-visualization.story?raw';\n\nexport const GraphVisualizationDefaultSrc = removeLicenseHeader(\n GraphVisualizationDefaultSrcRaw,\n);\n\nexport const GraphVisualizationBarebonesSrc = removeLicenseHeader(\n GraphVisualizationBarebonesSrcRaw,\n);\n\nexport const GraphVisualizationMaximalistSrc = removeLicenseHeader(\n GraphVisualizationMaximalistSrcRaw,\n);\n\nexport const GraphVisualizationCustomSrc = removeLicenseHeader(\n GraphVisualizationCustomSrcRaw,\n);\n\nexport const GraphVisualizationHighlightingSrc = removeLicenseHeader(\n GraphVisualizationHighlightingSrcRaw,\n);\n\nexport const GraphVisualizationSimpleStylingSrc = removeLicenseHeader(\n GraphVisualizationSimpleStylingSrcRaw,\n);\n\nexport const GraphVisualizationRuleBasedStylingSrc = removeLicenseHeader(\n GraphVisualizationRuleBasedStylingSrcRaw,\n);\n\nexport const GraphVisualizationSearchSrc = removeLicenseHeader(\n GraphVisualizationSearchSrcRaw,\n);\n\nexport const GraphVisualizationRuleBasedStylingAdvancedSrc =\n removeLicenseHeader(GraphVisualizationRuleBasedStylingAdvancedSrcRaw);\n\nexport const GraphVisualizationRangeStylingSrc = removeLicenseHeader(\n GraphVisualizationRangeStylingRaw,\n);\n\nexport const GraphVisualizationUniqueColorsStylingRawSrc = removeLicenseHeader(\n GraphVisualizationUniqueColorsStylingRaw,\n);\n\nexport const PreviewGraphVisualizationSrc = removeLicenseHeader(\n PreviewGraphVisualizationSrcRaw,\n);\n"]}
|