1 line
58 KiB
Plaintext
1 line
58 KiB
Plaintext
{"version":3,"file":"mindmap-definition-c8a05b8a.js","sources":["../src/diagrams/mindmap/parser/mindmap.jison","../src/diagrams/mindmap/mindmapDb.js","../src/diagrams/mindmap/svgDraw.js","../src/diagrams/mindmap/mindmapRenderer.js","../src/diagrams/mindmap/styles.js","../src/diagrams/mindmap/mindmap-definition.ts"],"sourcesContent":["/** mermaid\n * https://knsv.github.io/mermaid\n * (c) 2015 Knut Sveidqvist\n * MIT license.\n */\n%lex\n\n%options case-insensitive\n\n%{\n\t// Pre-lexer code can go here\n%}\n%x NODE\n%x NSTR\n%x ICON\n%x CLASS\n\n%%\n\n\\s*\\%\\%.* {yy.getLogger().trace('Found comment',yytext);}\n// \\%\\%[^\\n]*\\n /* skip comments */\n\"mindmap\"\t\t return 'MINDMAP';\n\":::\" { this.begin('CLASS'); }\n<CLASS>.+\t\t\t { this.popState();return 'CLASS'; }\n<CLASS>\\n\t\t\t\t { this.popState();}\n// [\\s]*\"::icon(\" { this.begin('ICON'); }\n\"::icon(\" { yy.getLogger().trace('Begin icon');this.begin('ICON'); }\n[\\s]+[\\n] {yy.getLogger().trace('SPACELINE');return 'SPACELINE' /* skip all whitespace */ ;}\n[\\n]+ return 'NL';\n<ICON>[^\\)]+\t\t\t { return 'ICON'; }\n<ICON>\\)\t\t\t\t {yy.getLogger().trace('end icon');this.popState();}\n\"-)\" { yy.getLogger().trace('Exploding node'); this.begin('NODE');return 'NODE_DSTART'; }\n\"(-\" { yy.getLogger().trace('Cloud'); this.begin('NODE');return 'NODE_DSTART'; }\n\"))\" { yy.getLogger().trace('Explosion Bang'); this.begin('NODE');return 'NODE_DSTART'; }\n\")\" { yy.getLogger().trace('Cloud Bang'); this.begin('NODE');return 'NODE_DSTART'; }\n\"((\" { this.begin('NODE');return 'NODE_DSTART'; }\n\"{{\" { this.begin('NODE');return 'NODE_DSTART'; }\n\"(\" { this.begin('NODE');return 'NODE_DSTART'; }\n\"[\" { this.begin('NODE');return 'NODE_DSTART'; }\n[\\s]+ return 'SPACELIST' /* skip all whitespace */ ;\n// !(-\\() return 'NODE_ID';\n[^\\(\\[\\n\\-\\)\\{\\}]+ return 'NODE_ID';\n<<EOF>> return 'EOF';\n<NODE>[\"] { yy.getLogger().trace('Starting NSTR');this.begin(\"NSTR\");}\n<NSTR>[^\"]+ { yy.getLogger().trace('description:', yytext); return \"NODE_DESCR\";}\n<NSTR>[\"] {this.popState();}\n<NODE>[\\)]\\) {this.popState();yy.getLogger().trace('node end ))');return \"NODE_DEND\";}\n<NODE>[\\)] {this.popState();yy.getLogger().trace('node end )');return \"NODE_DEND\";}\n<NODE>[\\]] {this.popState();yy.getLogger().trace('node end ...',yytext);return \"NODE_DEND\";}\n<NODE>\"}}\" {this.popState();yy.getLogger().trace('node end ((');return \"NODE_DEND\";}\n<NODE>\"(-\" {this.popState();yy.getLogger().trace('node end (-');return \"NODE_DEND\";}\n<NODE>\"-)\" {this.popState();yy.getLogger().trace('node end (-');return \"NODE_DEND\";}\n<NODE>\"((\" {this.popState();yy.getLogger().trace('node end ((');return \"NODE_DEND\";}\n<NODE>\"(\" {this.popState();yy.getLogger().trace('node end ((');return \"NODE_DEND\";}\n<NODE>[^\\)\\]\\(\\}]+ { yy.getLogger().trace('Long description:', yytext); return 'NODE_DESCR';}\n<NODE>.+(?!\\(\\() { yy.getLogger().trace('Long description:', yytext); return 'NODE_DESCR';}\n// [\\[] return 'NODE_START';\n// .+ return 'TXT' ;\n\n/lex\n\n%start start\n\n%% /* language grammar */\n\nstart\n// %{\t: info document 'EOF' { return yy; } }\n\t: mindMap\n |\tspaceLines mindMap\n ;\n\nspaceLines\n : SPACELINE\n | spaceLines SPACELINE\n | spaceLines NL\n ;\n\nmindMap\n : MINDMAP document { return yy; }\n | MINDMAP NL document { return yy; }\n ;\n\nstop\n : NL {yy.getLogger().trace('Stop NL ');}\n | EOF {yy.getLogger().trace('Stop EOF ');}\n | SPACELINE\n | stop NL {yy.getLogger().trace('Stop NL2 ');}\n | stop EOF {yy.getLogger().trace('Stop EOF2 ');}\n ;\ndocument\n\t: document statement stop\n\t| statement stop\n\t;\n\nstatement\n\t: SPACELIST node { yy.getLogger().info('Node: ',$2.id);yy.addNode($1.length, $2.id, $2.descr, $2.type); }\n\t| SPACELIST ICON { yy.getLogger().trace('Icon: ',$2);yy.decorateNode({icon: $2}); }\n\t| SPACELIST CLASS { yy.decorateNode({class: $2}); }\n | SPACELINE { yy.getLogger().trace('SPACELIST');}\n\t| node\t\t\t\t\t { yy.getLogger().trace('Node: ',$1.id);yy.addNode(0, $1.id, $1.descr, $1.type); }\n\t| ICON { yy.decorateNode({icon: $1}); }\n\t| CLASS { yy.decorateNode({class: $1}); }\n | SPACELIST\n\t;\n\n\n\nnode\n :nodeWithId\n |nodeWithoutId\n ;\n\nnodeWithoutId\n : NODE_DSTART NODE_DESCR NODE_DEND\n\t { yy.getLogger().trace(\"node found ..\", $1); $$ = { id: $2, descr: $2, type: yy.getType($1, $3) }; }\n ;\n\nnodeWithId\n\t: NODE_ID { $$ = { id: $1, descr: $1, type: yy.nodeType.DEFAULT }; }\n\t| NODE_ID NODE_DSTART NODE_DESCR NODE_DEND\n\t { yy.getLogger().trace(\"node found ..\", $1); $$ = { id: $1, descr: $3, type: yy.getType($2, $4) }; }\n\t;\n%%\n","import { getConfig } from '../../config';\nimport { sanitizeText as _sanitizeText } from '../../diagrams/common/common';\nimport { log } from '../../logger';\n\nexport const sanitizeText = (text) => _sanitizeText(text, getConfig());\n\nlet nodes = [];\nlet cnt = 0;\nlet elements = {};\nexport const clear = () => {\n nodes = [];\n cnt = 0;\n elements = {};\n};\n\nconst getParent = function (level) {\n for (let i = nodes.length - 1; i >= 0; i--) {\n if (nodes[i].level < level) {\n return nodes[i];\n }\n }\n // No parent found\n return null;\n};\n\nexport const getMindmap = () => {\n return nodes.length > 0 ? nodes[0] : null;\n};\nexport const addNode = (level, id, descr, type) => {\n log.info('addNode', level, id, descr, type);\n const conf = getConfig();\n const node = {\n id: cnt++,\n nodeId: sanitizeText(id),\n level,\n descr: sanitizeText(descr),\n type,\n children: [],\n width: getConfig().mindmap.maxNodeWidth,\n };\n switch (node.type) {\n case nodeType.ROUNDED_RECT:\n node.padding = 2 * conf.mindmap.padding;\n break;\n case nodeType.RECT:\n node.padding = 2 * conf.mindmap.padding;\n break;\n case nodeType.HEXAGON:\n node.padding = 2 * conf.mindmap.padding;\n break;\n default:\n node.padding = conf.mindmap.padding;\n }\n const parent = getParent(level);\n if (parent) {\n parent.children.push(node);\n // Keep all nodes in the list\n nodes.push(node);\n } else {\n if (nodes.length === 0) {\n // First node, the root\n nodes.push(node);\n } else {\n // Syntax error ... there can only bee one root\n let error = new Error(\n 'There can be only one root. No parent could be found for (\"' + node.descr + '\")'\n );\n error.hash = {\n text: 'branch ' + name,\n token: 'branch ' + name,\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: ['\"checkout ' + name + '\"'],\n };\n throw error;\n }\n }\n};\n\nexport const nodeType = {\n DEFAULT: 0,\n NO_BORDER: 0,\n ROUNDED_RECT: 1,\n RECT: 2,\n CIRCLE: 3,\n CLOUD: 4,\n BANG: 5,\n HEXAGON: 6,\n};\n\nexport const getType = (startStr, endStr) => {\n log.debug('In get type', startStr, endStr);\n switch (startStr) {\n case '[':\n return nodeType.RECT;\n case '(':\n return endStr === ')' ? nodeType.ROUNDED_RECT : nodeType.CLOUD;\n case '((':\n return nodeType.CIRCLE;\n case ')':\n return nodeType.CLOUD;\n case '))':\n return nodeType.BANG;\n case '{{':\n return nodeType.HEXAGON;\n default:\n return nodeType.DEFAULT;\n }\n};\n\nexport const setElementForId = (id, element) => {\n elements[id] = element;\n};\n\nexport const decorateNode = (decoration) => {\n const node = nodes[nodes.length - 1];\n if (decoration && decoration.icon) {\n node.icon = sanitizeText(decoration.icon);\n }\n if (decoration && decoration.class) {\n node.class = sanitizeText(decoration.class);\n }\n};\n\nexport const type2Str = (type) => {\n switch (type) {\n case nodeType.DEFAULT:\n return 'no-border';\n case nodeType.RECT:\n return 'rect';\n case nodeType.ROUNDED_RECT:\n return 'rounded-rect';\n case nodeType.CIRCLE:\n return 'circle';\n case nodeType.CLOUD:\n return 'cloud';\n case nodeType.BANG:\n return 'bang';\n case nodeType.HEXAGON:\n return 'hexgon';\n default:\n return 'no-border';\n }\n};\n\nexport let parseError;\nexport const setErrorHandler = (handler) => {\n parseError = handler;\n};\n\n// Expose logger to grammar\nexport const getLogger = () => log;\n\nexport const getNodeById = (id) => nodes[id];\nexport const getElementById = (id) => elements[id];\n","import { select } from 'd3';\nimport * as db from './mindmapDb';\nconst MAX_SECTIONS = 12;\n\n/**\n * @param {string} text The text to be wrapped\n * @param {number} width The max width of the text\n */\nfunction wrap(text, width) {\n text.each(function () {\n var text = select(this),\n words = text\n .text()\n .split(/(\\s+|<br>)/)\n .reverse(),\n word,\n line = [],\n lineHeight = 1.1, // ems\n y = text.attr('y'),\n dy = parseFloat(text.attr('dy')),\n tspan = text\n .text(null)\n .append('tspan')\n .attr('x', 0)\n .attr('y', y)\n .attr('dy', dy + 'em');\n for (let j = 0; j < words.length; j++) {\n word = words[words.length - 1 - j];\n line.push(word);\n tspan.text(line.join(' ').trim());\n if (tspan.node().getComputedTextLength() > width || word === '<br>') {\n line.pop();\n tspan.text(line.join(' ').trim());\n if (word === '<br>') {\n line = [''];\n } else {\n line = [word];\n }\n\n tspan = text\n .append('tspan')\n .attr('x', 0)\n .attr('y', y)\n .attr('dy', lineHeight + 'em')\n .text(word);\n }\n }\n });\n}\n\nconst defaultBkg = function (elem, node, section) {\n const rd = 5;\n elem\n .append('path')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr(\n 'd',\n `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${\n node.width - 2 * rd\n } q5,0 5,5 v${node.height - rd} H0 Z`\n );\n\n elem\n .append('line')\n .attr('class', 'node-line-' + section)\n .attr('x1', 0)\n .attr('y1', node.height)\n .attr('x2', node.width)\n .attr('y2', node.height);\n};\nconst rectBkg = function (elem, node) {\n elem\n .append('rect')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr('height', node.height)\n .attr('width', node.width);\n};\nconst cloudBkg = function (elem, node) {\n const w = node.width;\n const h = node.height;\n const r1 = 0.15 * w;\n const r2 = 0.25 * w;\n const r3 = 0.35 * w;\n const r4 = 0.2 * w;\n elem\n .append('path')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr(\n 'd',\n `M0 0 a${r1},${r1} 0 0,1 ${w * 0.25},${-1 * w * 0.1}\n a${r3},${r3} 1 0,1 ${w * 0.4},${-1 * w * 0.1}\n a${r2},${r2} 1 0,1 ${w * 0.35},${1 * w * 0.2}\n\n a${r1},${r1} 1 0,1 ${w * 0.15},${1 * h * 0.35}\n a${r4},${r4} 1 0,1 ${-1 * w * 0.15},${1 * h * 0.65}\n\n a${r2},${r1} 1 0,1 ${-1 * w * 0.25},${w * 0.15}\n a${r3},${r3} 1 0,1 ${-1 * w * 0.5},${0}\n a${r1},${r1} 1 0,1 ${-1 * w * 0.25},${-1 * w * 0.15}\n\n a${r1},${r1} 1 0,1 ${-1 * w * 0.1},${-1 * h * 0.35}\n a${r4},${r4} 1 0,1 ${w * 0.1},${-1 * h * 0.65}\n\n H0 V0 Z`\n );\n};\nconst bangBkg = function (elem, node) {\n const w = node.width;\n const h = node.height;\n const r = 0.15 * w;\n elem\n .append('path')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr(\n 'd',\n `M0 0 a${r},${r} 1 0,0 ${w * 0.25},${-1 * h * 0.1}\n a${r},${r} 1 0,0 ${w * 0.25},${0}\n a${r},${r} 1 0,0 ${w * 0.25},${0}\n a${r},${r} 1 0,0 ${w * 0.25},${1 * h * 0.1}\n\n a${r},${r} 1 0,0 ${w * 0.15},${1 * h * 0.33}\n a${r * 0.8},${r * 0.8} 1 0,0 ${0},${1 * h * 0.34}\n a${r},${r} 1 0,0 ${-1 * w * 0.15},${1 * h * 0.33}\n\n a${r},${r} 1 0,0 ${-1 * w * 0.25},${h * 0.15}\n a${r},${r} 1 0,0 ${-1 * w * 0.25},${0}\n a${r},${r} 1 0,0 ${-1 * w * 0.25},${0}\n a${r},${r} 1 0,0 ${-1 * w * 0.25},${-1 * h * 0.15}\n\n a${r},${r} 1 0,0 ${-1 * w * 0.1},${-1 * h * 0.33}\n a${r * 0.8},${r * 0.8} 1 0,0 ${0},${-1 * h * 0.34}\n a${r},${r} 1 0,0 ${w * 0.1},${-1 * h * 0.33}\n\n H0 V0 Z`\n );\n};\nconst circleBkg = function (elem, node) {\n elem\n .append('circle')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr('r', node.width / 2);\n};\n\n/**\n *\n * @param parent\n * @param w\n * @param h\n * @param points\n * @param node\n */\nfunction insertPolygonShape(parent, w, h, points, node) {\n return parent\n .insert('polygon', ':first-child')\n .attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n )\n .attr('transform', 'translate(' + (node.width - w) / 2 + ', ' + h + ')');\n}\n\nconst hexagonBkg = function (elem, node) {\n const h = node.height;\n const f = 4;\n const m = h / f;\n const w = node.width - node.padding + 2 * m;\n const points = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 },\n ];\n const shapeSvg = insertPolygonShape(elem, w, h, points, node);\n};\n\nconst roundedRectBkg = function (elem, node) {\n elem\n .append('rect')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr('height', node.height)\n .attr('rx', node.padding)\n .attr('ry', node.padding)\n .attr('width', node.width);\n};\n\n/**\n * @param {object} elem The D3 dom element in which the node is to be added\n * @param {object} node The node to be added\n * @param fullSection\n * @param {object} conf The configuration object\n * @returns {number} The height nodes dom element\n */\nexport const drawNode = function (elem, node, fullSection, conf) {\n const section = fullSection % (MAX_SECTIONS - 1);\n const nodeElem = elem.append('g');\n node.section = section;\n let sectionClass = 'section-' + section;\n if (section < 0) {\n sectionClass += ' section-root';\n }\n nodeElem.attr('class', (node.class ? node.class + ' ' : '') + 'mindmap-node ' + sectionClass);\n const bkgElem = nodeElem.append('g');\n\n // Create the wrapped text element\n const textElem = nodeElem.append('g');\n const txt = textElem\n .append('text')\n .text(node.descr)\n .attr('dy', '1em')\n .attr('alignment-baseline', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'middle')\n .call(wrap, node.width);\n const bbox = txt.node().getBBox();\n const fontSize = conf.fontSize.replace ? conf.fontSize.replace('px', '') : conf.fontSize;\n node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding;\n node.width = bbox.width + 2 * node.padding;\n if (node.icon) {\n if (node.type === db.nodeType.CIRCLE) {\n node.height += 50;\n node.width += 50;\n const icon = nodeElem\n .append('foreignObject')\n .attr('height', '50px')\n .attr('width', node.width)\n .attr('style', 'text-align: center;');\n icon\n .append('div')\n .attr('class', 'icon-container')\n .append('i')\n .attr('class', 'node-icon-' + section + ' ' + node.icon);\n textElem.attr(\n 'transform',\n 'translate(' + node.width / 2 + ', ' + (node.height / 2 - 1.5 * node.padding) + ')'\n );\n } else {\n node.width += 50;\n const orgHeight = node.height;\n node.height = Math.max(orgHeight, 60);\n const heightDiff = Math.abs(node.height - orgHeight);\n const icon = nodeElem\n .append('foreignObject')\n .attr('width', '60px')\n .attr('height', node.height)\n .attr('style', 'text-align: center;margin-top:' + heightDiff / 2 + 'px;');\n\n icon\n .append('div')\n .attr('class', 'icon-container')\n .append('i')\n .attr('class', 'node-icon-' + section + ' ' + node.icon);\n textElem.attr(\n 'transform',\n 'translate(' + (25 + node.width / 2) + ', ' + (heightDiff / 2 + node.padding / 2) + ')'\n );\n }\n } else {\n textElem.attr('transform', 'translate(' + node.width / 2 + ', ' + node.padding / 2 + ')');\n }\n\n switch (node.type) {\n case db.nodeType.DEFAULT:\n defaultBkg(bkgElem, node, section, conf);\n break;\n case db.nodeType.ROUNDED_RECT:\n roundedRectBkg(bkgElem, node, section, conf);\n break;\n case db.nodeType.RECT:\n rectBkg(bkgElem, node, section, conf);\n break;\n case db.nodeType.CIRCLE:\n bkgElem.attr('transform', 'translate(' + node.width / 2 + ', ' + +node.height / 2 + ')');\n circleBkg(bkgElem, node, section, conf);\n break;\n case db.nodeType.CLOUD:\n cloudBkg(bkgElem, node, section, conf);\n break;\n case db.nodeType.BANG:\n bangBkg(bkgElem, node, section, conf);\n break;\n case db.nodeType.HEXAGON:\n hexagonBkg(bkgElem, node, section, conf);\n break;\n }\n\n // Position the node to its coordinate\n // if (typeof node.x !== 'undefined' && typeof node.y !== 'undefined') {\n // nodeElem.attr('transform', 'translate(' + node.x + ',' + node.y + ')');\n // }\n db.setElementForId(node.id, nodeElem);\n return node.height;\n};\n\nexport const drawEdge = function drawEdge(edgesElem, mindmap, parent, depth, fullSection) {\n const section = fullSection % (MAX_SECTIONS - 1);\n const sx = parent.x + parent.width / 2;\n const sy = parent.y + parent.height / 2;\n const ex = mindmap.x + mindmap.width / 2;\n const ey = mindmap.y + mindmap.height / 2;\n const mx = ex > sx ? sx + Math.abs(sx - ex) / 2 : sx - Math.abs(sx - ex) / 2;\n const my = ey > sy ? sy + Math.abs(sy - ey) / 2 : sy - Math.abs(sy - ey) / 2;\n const qx = ex > sx ? Math.abs(sx - mx) / 2 + sx : -Math.abs(sx - mx) / 2 + sx;\n const qy = ey > sy ? Math.abs(sy - my) / 2 + sy : -Math.abs(sy - my) / 2 + sy;\n\n edgesElem\n .append('path')\n .attr(\n 'd',\n parent.direction === 'TB' || parent.direction === 'BT'\n ? `M${sx},${sy} Q${sx},${qy} ${mx},${my} T${ex},${ey}`\n : `M${sx},${sy} Q${qx},${sy} ${mx},${my} T${ex},${ey}`\n )\n .attr('class', 'edge section-edge-' + section + ' edge-depth-' + depth);\n};\n\nexport const positionNode = function (node) {\n const nodeElem = db.getElementById(node.id);\n\n const x = node.x || 0;\n const y = node.y || 0;\n // Position the node to its coordinate\n nodeElem.attr('transform', 'translate(' + x + ',' + y + ')');\n};\n\nexport default { drawNode, positionNode, drawEdge };\n","/** Created by knut on 14-12-11. */\nimport { select } from 'd3';\nimport { log } from '../../logger';\nimport { getConfig } from '../../config';\nimport { setupGraphViewbox } from '../../setupGraphViewbox';\nimport svgDraw from './svgDraw';\nimport cytoscape from 'cytoscape/dist/cytoscape.umd.js';\nimport coseBilkent from 'cytoscape-cose-bilkent';\nimport * as db from './mindmapDb';\n\n// Inject the layout algorithm into cytoscape\ncytoscape.use(coseBilkent);\n\n/**\n * @param {any} svg The svg element to draw the diagram onto\n * @param {object} mindmap The mindmap data and hierarchy\n * @param section\n * @param {object} conf The configuration object\n */\nfunction drawNodes(svg, mindmap, section, conf) {\n svgDraw.drawNode(svg, mindmap, section, conf);\n if (mindmap.children) {\n mindmap.children.forEach((child, index) => {\n drawNodes(svg, child, section < 0 ? index : section, conf);\n });\n }\n}\n\n/**\n * @param edgesEl\n * @param cy\n */\nfunction drawEdges(edgesEl, cy) {\n cy.edges().map((edge, id) => {\n const data = edge.data();\n if (edge[0]._private.bodyBounds) {\n const bounds = edge[0]._private.rscratch;\n log.trace('Edge: ', id, data);\n edgesEl\n .insert('path')\n .attr(\n 'd',\n `M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} `\n )\n .attr('class', 'edge section-edge-' + data.section + ' edge-depth-' + data.depth);\n }\n });\n}\n\n/**\n * @param mindmap The mindmap data and hierarchy\n * @param cy\n * @param conf The configuration object\n * @param level\n */\nfunction addNodes(mindmap, cy, conf, level) {\n cy.add({\n group: 'nodes',\n data: {\n id: mindmap.id,\n labelText: mindmap.descr,\n height: mindmap.height,\n width: mindmap.width,\n level: level,\n nodeId: mindmap.id,\n padding: mindmap.padding,\n type: mindmap.type,\n },\n position: {\n x: mindmap.x,\n y: mindmap.y,\n },\n });\n if (mindmap.children) {\n mindmap.children.forEach((child) => {\n addNodes(child, cy, conf, level + 1);\n cy.add({\n group: 'edges',\n data: {\n id: `${mindmap.id}_${child.id}`,\n source: mindmap.id,\n target: child.id,\n depth: level,\n section: child.section,\n },\n });\n });\n }\n}\n\n/**\n * @param node\n * @param conf\n * @param cy\n */\nfunction layoutMindmap(node, conf) {\n return new Promise((resolve) => {\n // Add temporary render element\n const renderEl = select('body').append('div').attr('id', 'cy').attr('style', 'display:none');\n const cy = cytoscape({\n container: document.getElementById('cy'), // container to render in\n style: [\n {\n selector: 'edge',\n style: {\n 'curve-style': 'bezier',\n },\n },\n ],\n });\n // Remove element after layout\n renderEl.remove();\n addNodes(node, cy, conf, 0);\n\n // Make cytoscape care about the dimensions of the nodes\n cy.nodes().forEach(function (n) {\n n.layoutDimensions = () => {\n const data = n.data();\n return { w: data.width, h: data.height };\n };\n });\n\n cy.layout({\n name: 'cose-bilkent',\n quality: 'proof',\n // headless: true,\n styleEnabled: false,\n animate: false,\n }).run();\n cy.ready((e) => {\n log.info('Ready', e);\n resolve(cy);\n });\n });\n}\n/**\n * @param node\n * @param cy\n * @param positionedMindmap\n * @param conf\n */\nfunction positionNodes(cy) {\n cy.nodes().map((node, id) => {\n const data = node.data();\n data.x = node.position().x;\n data.y = node.position().y;\n svgDraw.positionNode(data);\n const el = db.getElementById(data.nodeId);\n log.info('Id:', id, 'Position: (', node.position().x, ', ', node.position().y, ')', data);\n el.attr(\n 'transform',\n `translate(${node.position().x - data.width / 2}, ${node.position().y - data.height / 2})`\n );\n el.attr('attr', `apa-${id})`);\n });\n}\n\n/**\n * Draws a an info picture in the tag with id: id based on the graph definition in text.\n *\n * @param {any} text\n * @param {any} id\n * @param {any} version\n * @param diagObj\n */\n\nexport const draw = async (text, id, version, diagObj) => {\n const conf = getConfig();\n\n // This is done only for throwing the error if the text is not valid.\n diagObj.db.clear();\n // Parse the graph definition\n diagObj.parser.parse(text);\n\n log.debug('Renering info diagram\\n' + text);\n\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n // Parse the graph definition\n\n const svg = root.select('#' + id);\n\n svg.append('g');\n const mm = diagObj.db.getMindmap();\n\n // Draw the graph and start with drawing the nodes without proper position\n // this gives us the size of the nodes and we can set the positions later\n\n const edgesElem = svg.append('g');\n edgesElem.attr('class', 'mindmap-edges');\n const nodesElem = svg.append('g');\n nodesElem.attr('class', 'mindmap-nodes');\n drawNodes(nodesElem, mm, -1, conf);\n\n // Next step is to layout the mindmap, giving each node a position\n\n const cy = await layoutMindmap(mm, conf);\n\n // // After this we can draw, first the edges and the then nodes with the correct position\n drawEdges(edgesElem, cy, conf);\n positionNodes(cy, conf);\n\n // Setup the view box and size of the svg element\n setupGraphViewbox(undefined, svg, conf.mindmap.padding, conf.mindmap.useMaxWidth);\n};\n\nexport default {\n draw,\n};\n","import { darken, lighten, isDark } from 'khroma';\n\nconst genSections = (options) => {\n let sections = '';\n\n for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {\n options['lineColor' + i] = options['lineColor' + i] || options['cScaleInv' + i];\n if (isDark(options['lineColor' + i])) {\n options['lineColor' + i] = lighten(options['lineColor' + i], 20);\n } else {\n options['lineColor' + i] = darken(options['lineColor' + i], 20);\n }\n }\n\n for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {\n const sw = '' + (17 - 3 * i);\n sections += `\n .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${\n i - 1\n } polygon, .section-${i - 1} path {\n fill: ${options['cScale' + i]};\n }\n .section-${i - 1} text {\n fill: ${options['cScaleLabel' + i]};\n }\n .node-icon-${i - 1} {\n font-size: 40px;\n color: ${options['cScaleLabel' + i]};\n }\n .section-edge-${i - 1}{\n stroke: ${options['cScale' + i]};\n }\n .edge-depth-${i - 1}{\n stroke-width: ${sw};\n }\n .section-${i - 1} line {\n stroke: ${options['cScaleInv' + i]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `;\n }\n return sections;\n};\n\nconst getStyles = (options) =>\n `\n .edge {\n stroke-width: 3;\n }\n ${genSections(options)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${options.git0};\n }\n .section-root text {\n fill: ${options.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n`;\nexport default getStyles;\n","// @ts-ignore: TODO Fix ts errors\nimport mindmapParser from './parser/mindmap';\nimport * as mindmapDb from './mindmapDb';\nimport mindmapRenderer from './mindmapRenderer';\nimport mindmapStyles from './styles';\n\nexport const diagram = {\n db: mindmapDb,\n renderer: mindmapRenderer,\n parser: mindmapParser,\n styles: mindmapStyles,\n};\n"],"names":["o","parser","parseError","lexer","_sanitizeText","text","db.type2Str","db.nodeType","db.setElementForId","drawEdge","db.getElementById"],"mappings":";;;;;;;;AAyEA,IAAI,SAAU,WAAU;AACxB,MAAI,IAAE,SAAS,GAAE,GAAEA,IAAE,GAAE;AAAC,SAAIA,KAAEA,MAAG,CAAE,GAAC,IAAE,EAAE,QAAO,KAAIA,GAAE,EAAE,CAAC,CAAC,IAAE;AAAE;AAAC,WAAOA;AAAA,EAAC,GAAE,MAAI,CAAC,GAAE,CAAC,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,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