1 line
63 KiB
Plaintext
1 line
63 KiB
Plaintext
{"version":3,"file":"journeyDiagram-25debde4.js","sources":["../src/diagrams/user-journey/parser/journey.jison","../src/diagrams/user-journey/journeyDb.js","../src/diagrams/user-journey/styles.js","../src/diagrams/user-journey/svgDraw.js","../src/diagrams/user-journey/journeyRenderer.ts","../src/diagrams/user-journey/journeyDiagram.ts"],"sourcesContent":["/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2015 Knut Sveidqvist\n * MIT license.\n */\n%lex\n%options case-insensitive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n\n// Directive states\n%x open_directive type_directive arg_directive\n\n\n%%\n\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n<open_directive>((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n<type_directive>\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n<type_directive,arg_directive>\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n<arg_directive>((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\\%%(?!\\{)[^\\n]* /* skip comments */\n[^\\}]\\%\\%[^\\n]* /* skip comments */\n[\\n]+ return 'NEWLINE';\n\\s+ /* skip whitespace */\n\\#[^\\n]* /* skip comments */\n\n\"journey\" return 'journey';\n\"title\"\\s[^#\\n;]+ return 'title';\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n\"section\"\\s[^#:\\n;]+ return 'section';\n[^#:\\n;]+ return 'taskName';\n\":\"[^#\\n;]+ return 'taskData';\n\":\" return ':';\n<<EOF>> return 'EOF';\n. return 'INVALID';\n\n/lex\n\n%left '^'\n\n%start start\n\n%% /* language grammar */\n\nstart\n\t: journey document 'EOF' { return $2; }\n\t| directive start\n\t;\n\ndocument\n\t: /* empty */ { $$ = [] }\n\t| document line {$1.push($2);$$ = $1}\n\t;\n\nline\n\t: SPACE statement { $$ = $2 }\n\t| statement { $$ = $1 }\n\t| NEWLINE { $$=[];}\n\t| EOF { $$=[];}\n\t;\n\ndirective\n : openDirective typeDirective closeDirective 'NEWLINE'\n | openDirective typeDirective ':' argDirective closeDirective 'NEWLINE'\n ;\n\nstatement\n : title {yy.setDiagramTitle($1.substr(6));$$=$1.substr(6);}\n | acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }\n | acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }\n | acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }\n | section {yy.addSection($1.substr(8));$$=$1.substr(8);}\n | taskName taskData {yy.addTask($1, $2);$$='task';}\n | directive\n ;\n\nopenDirective\n : open_directive { yy.parseDirective('%%{', 'open_directive'); }\n ;\n\ntypeDirective\n : type_directive { yy.parseDirective($1, 'type_directive'); }\n ;\n\nargDirective\n : arg_directive { $1 = $1.trim().replace(/'/g, '\"'); yy.parseDirective($1, 'arg_directive'); }\n ;\n\ncloseDirective\n : close_directive { yy.parseDirective('}%%', 'close_directive', 'journey'); }\n ;\n\n%%\n","import mermaidAPI from '../../mermaidAPI';\nimport * as configApi from '../../config';\nimport {\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../../commonDb';\n\nlet currentSection = '';\n\nconst sections = [];\nconst tasks = [];\nconst rawTasks = [];\n\nexport const parseDirective = function (statement, context, type) {\n mermaidAPI.parseDirective(this, statement, context, type);\n};\n\nexport const clear = function () {\n sections.length = 0;\n tasks.length = 0;\n currentSection = '';\n rawTasks.length = 0;\n commonClear();\n};\n\nexport const addSection = function (txt) {\n currentSection = txt;\n sections.push(txt);\n};\n\nexport const getSections = function () {\n return sections;\n};\n\nexport const getTasks = function () {\n let allItemsProcessed = compileTasks();\n const maxDepth = 100;\n let iterationCount = 0;\n while (!allItemsProcessed && iterationCount < maxDepth) {\n allItemsProcessed = compileTasks();\n iterationCount++;\n }\n\n tasks.push(...rawTasks);\n\n return tasks;\n};\n\nconst updateActors = function () {\n const tempActors = [];\n tasks.forEach((task) => {\n if (task.people) {\n tempActors.push(...task.people);\n }\n });\n\n const unique = new Set(tempActors);\n return [...unique].sort();\n};\n\nexport const addTask = function (descr, taskData) {\n const pieces = taskData.substr(1).split(':');\n\n let score = 0;\n let peeps = [];\n if (pieces.length === 1) {\n score = Number(pieces[0]);\n peeps = [];\n } else {\n score = Number(pieces[0]);\n peeps = pieces[1].split(',');\n }\n const peopleList = peeps.map((s) => s.trim());\n\n const rawTask = {\n section: currentSection,\n type: currentSection,\n people: peopleList,\n task: descr,\n score,\n };\n\n rawTasks.push(rawTask);\n};\n\nexport const addTaskOrg = function (descr) {\n const newTask = {\n section: currentSection,\n type: currentSection,\n description: descr,\n task: descr,\n classes: [],\n };\n tasks.push(newTask);\n};\n\nconst compileTasks = function () {\n const compileTask = function (pos) {\n return rawTasks[pos].processed;\n };\n\n let allProcessed = true;\n for (const [i, rawTask] of rawTasks.entries()) {\n compileTask(i);\n\n allProcessed = allProcessed && rawTask.processed;\n }\n return allProcessed;\n};\n\nconst getActors = function () {\n return updateActors();\n};\n\nexport default {\n parseDirective,\n getConfig: () => configApi.getConfig().journey,\n clear,\n setDiagramTitle,\n getDiagramTitle,\n setAccTitle,\n getAccTitle,\n setAccDescription,\n getAccDescription,\n addSection,\n getSections,\n getTasks,\n addTask,\n addTaskOrg,\n getActors,\n};\n","const getStyles = (options) =>\n `.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${options.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${options.textColor}\n }\n\n .legend {\n fill: ${options.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${options.textColor}\n }\n\n .face {\n ${options.faceColor ? `fill: ${options.faceColor}` : 'fill: #FFF8DC'};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${options.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${options.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${options.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${options.tertiaryColor};\n border: 1px solid ${options.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${options.fillType0 ? `fill: ${options.fillType0}` : ''};\n }\n .task-type-1, .section-type-1 {\n ${options.fillType0 ? `fill: ${options.fillType1}` : ''};\n }\n .task-type-2, .section-type-2 {\n ${options.fillType0 ? `fill: ${options.fillType2}` : ''};\n }\n .task-type-3, .section-type-3 {\n ${options.fillType0 ? `fill: ${options.fillType3}` : ''};\n }\n .task-type-4, .section-type-4 {\n ${options.fillType0 ? `fill: ${options.fillType4}` : ''};\n }\n .task-type-5, .section-type-5 {\n ${options.fillType0 ? `fill: ${options.fillType5}` : ''};\n }\n .task-type-6, .section-type-6 {\n ${options.fillType0 ? `fill: ${options.fillType6}` : ''};\n }\n .task-type-7, .section-type-7 {\n ${options.fillType0 ? `fill: ${options.fillType7}` : ''};\n }\n\n .actor-0 {\n ${options.actor0 ? `fill: ${options.actor0}` : ''};\n }\n .actor-1 {\n ${options.actor1 ? `fill: ${options.actor1}` : ''};\n }\n .actor-2 {\n ${options.actor2 ? `fill: ${options.actor2}` : ''};\n }\n .actor-3 {\n ${options.actor3 ? `fill: ${options.actor3}` : ''};\n }\n .actor-4 {\n ${options.actor4 ? `fill: ${options.actor4}` : ''};\n }\n .actor-5 {\n ${options.actor5 ? `fill: ${options.actor5}` : ''};\n }\n`;\n\nexport default getStyles;\n","import { arc as d3arc } from 'd3';\n\nexport const drawRect = function (elem, rectData) {\n const rectElem = elem.append('rect');\n rectElem.attr('x', rectData.x);\n rectElem.attr('y', rectData.y);\n rectElem.attr('fill', rectData.fill);\n rectElem.attr('stroke', rectData.stroke);\n rectElem.attr('width', rectData.width);\n rectElem.attr('height', rectData.height);\n rectElem.attr('rx', rectData.rx);\n rectElem.attr('ry', rectData.ry);\n\n if (rectData.class !== undefined) {\n rectElem.attr('class', rectData.class);\n }\n\n return rectElem;\n};\n\nexport const drawFace = function (element, faceData) {\n const radius = 15;\n const circleElement = element\n .append('circle')\n .attr('cx', faceData.cx)\n .attr('cy', faceData.cy)\n .attr('class', 'face')\n .attr('r', radius)\n .attr('stroke-width', 2)\n .attr('overflow', 'visible');\n\n const face = element.append('g');\n\n //left eye\n face\n .append('circle')\n .attr('cx', faceData.cx - radius / 3)\n .attr('cy', faceData.cy - radius / 3)\n .attr('r', 1.5)\n .attr('stroke-width', 2)\n .attr('fill', '#666')\n .attr('stroke', '#666');\n\n //right eye\n face\n .append('circle')\n .attr('cx', faceData.cx + radius / 3)\n .attr('cy', faceData.cy - radius / 3)\n .attr('r', 1.5)\n .attr('stroke-width', 2)\n .attr('fill', '#666')\n .attr('stroke', '#666');\n\n /** @param {any} face */\n function smile(face) {\n const arc = d3arc()\n .startAngle(Math.PI / 2)\n .endAngle(3 * (Math.PI / 2))\n .innerRadius(radius / 2)\n .outerRadius(radius / 2.2);\n //mouth\n face\n .append('path')\n .attr('class', 'mouth')\n .attr('d', arc)\n .attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 2) + ')');\n }\n\n /** @param {any} face */\n function sad(face) {\n const arc = d3arc()\n .startAngle((3 * Math.PI) / 2)\n .endAngle(5 * (Math.PI / 2))\n .innerRadius(radius / 2)\n .outerRadius(radius / 2.2);\n //mouth\n face\n .append('path')\n .attr('class', 'mouth')\n .attr('d', arc)\n .attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 7) + ')');\n }\n\n /** @param {any} face */\n function ambivalent(face) {\n face\n .append('line')\n .attr('class', 'mouth')\n .attr('stroke', 2)\n .attr('x1', faceData.cx - 5)\n .attr('y1', faceData.cy + 7)\n .attr('x2', faceData.cx + 5)\n .attr('y2', faceData.cy + 7)\n .attr('class', 'mouth')\n .attr('stroke-width', '1px')\n .attr('stroke', '#666');\n }\n\n if (faceData.score > 3) {\n smile(face);\n } else if (faceData.score < 3) {\n sad(face);\n } else {\n ambivalent(face);\n }\n\n return circleElement;\n};\n\nexport const drawCircle = function (element, circleData) {\n const circleElement = element.append('circle');\n circleElement.attr('cx', circleData.cx);\n circleElement.attr('cy', circleData.cy);\n circleElement.attr('class', 'actor-' + circleData.pos);\n circleElement.attr('fill', circleData.fill);\n circleElement.attr('stroke', circleData.stroke);\n circleElement.attr('r', circleData.r);\n\n if (circleElement.class !== undefined) {\n circleElement.attr('class', circleElement.class);\n }\n\n if (circleData.title !== undefined) {\n circleElement.append('title').text(circleData.title);\n }\n\n return circleElement;\n};\n\nexport const drawText = function (elem, textData) {\n // Remove and ignore br:s\n const nText = textData.text.replace(/<br\\s*\\/?>/gi, ' ');\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.attr('class', 'legend');\n\n textElem.style('text-anchor', textData.anchor);\n\n if (textData.class !== undefined) {\n textElem.attr('class', textData.class);\n }\n\n const span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.text(nText);\n\n return textElem;\n};\n\nexport const drawLabel = function (elem, txtObject) {\n /**\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} cut\n */\n function genPoints(x, y, width, height, cut) {\n return (\n x +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n (y + height - cut) +\n ' ' +\n (x + width - cut * 1.2) +\n ',' +\n (y + height) +\n ' ' +\n x +\n ',' +\n (y + height)\n );\n }\n const polygon = elem.append('polygon');\n polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7));\n polygon.attr('class', 'labelBox');\n\n txtObject.y = txtObject.y + txtObject.labelMargin;\n txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;\n drawText(elem, txtObject);\n};\n\nexport const drawSection = function (elem, section, conf) {\n const g = elem.append('g');\n\n const rect = getNoteRect();\n rect.x = section.x;\n rect.y = section.y;\n rect.fill = section.fill;\n // section width covers all nested tasks\n rect.width =\n conf.width * section.taskCount + // width of the tasks\n conf.diagramMarginX * (section.taskCount - 1); // width of space between tasks\n rect.height = conf.height;\n rect.class = 'journey-section section-type-' + section.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n _drawTextCandidateFunc(conf)(\n section.text,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: 'journey-section section-type-' + section.num },\n conf,\n section.colour\n );\n};\n\nlet taskCount = -1;\n/**\n * Draws an actor in the diagram with the attached line\n *\n * @param {any} elem The HTML element\n * @param {any} task The task to render\n * @param {any} conf The global configuration\n */\nexport const drawTask = function (elem, task, conf) {\n const center = task.x + conf.width / 2;\n const g = elem.append('g');\n taskCount++;\n const maxHeight = 300 + 5 * 30;\n g.append('line')\n .attr('id', 'task' + taskCount)\n .attr('x1', center)\n .attr('y1', task.y)\n .attr('x2', center)\n .attr('y2', maxHeight)\n .attr('class', 'task-line')\n .attr('stroke-width', '1px')\n .attr('stroke-dasharray', '4 2')\n .attr('stroke', '#666');\n\n drawFace(g, {\n cx: center,\n cy: 300 + (5 - task.score) * 30,\n score: task.score,\n });\n\n const rect = getNoteRect();\n rect.x = task.x;\n rect.y = task.y;\n rect.fill = task.fill;\n rect.width = conf.width;\n rect.height = conf.height;\n rect.class = 'task task-type-' + task.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n let xPos = task.x + 14;\n task.people.forEach((person) => {\n const colour = task.actors[person].color;\n\n const circle = {\n cx: xPos,\n cy: task.y,\n r: 7,\n fill: colour,\n stroke: '#000',\n title: person,\n pos: task.actors[person].position,\n };\n\n drawCircle(g, circle);\n xPos += 10;\n });\n\n _drawTextCandidateFunc(conf)(\n task.task,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: 'task' },\n conf,\n task.colour\n );\n};\n\n/**\n * Draws a background rectangle\n *\n * @param {any} elem The html element\n * @param {any} bounds The bounds of the drawing\n */\nexport const drawBackgroundRect = function (elem, bounds) {\n const rectElem = drawRect(elem, {\n x: bounds.startx,\n y: bounds.starty,\n width: bounds.stopx - bounds.startx,\n height: bounds.stopy - bounds.starty,\n fill: bounds.fill,\n class: 'rect',\n });\n rectElem.lower();\n};\n\nexport const getTextObj = function () {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n 'text-anchor': 'start',\n width: 100,\n height: 100,\n textMargin: 0,\n rx: 0,\n ry: 0,\n };\n};\n\nexport const getNoteRect = function () {\n return {\n x: 0,\n y: 0,\n width: 100,\n anchor: 'start',\n height: 100,\n rx: 0,\n ry: 0,\n };\n};\n\nconst _drawTextCandidateFunc = (function () {\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} colour\n */\n function byText(content, g, x, y, width, height, textAttrs, colour) {\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y + height / 2 + 5)\n .style('font-color', colour)\n .style('text-anchor', 'middle')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n * @param {any} colour\n */\n function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) {\n const { taskFontSize, taskFontFamily } = conf;\n\n const lines = content.split(/<br\\s*\\/?>/gi);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * taskFontSize - (taskFontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y)\n .attr('fill', colour)\n .style('text-anchor', 'middle')\n .style('font-size', taskFontSize)\n .style('font-family', taskFontFamily);\n text\n .append('tspan')\n .attr('x', x + width / 2)\n .attr('dy', dy)\n .text(lines[i]);\n\n text\n .attr('y', y + height / 2.0)\n .attr('dominant-baseline', 'central')\n .attr('alignment-baseline', 'central');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const body = g.append('switch');\n const f = body\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height)\n .attr('position', 'fixed');\n\n const text = f\n .append('xhtml:div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .attr('class', 'label')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, body, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} toText\n * @param {any} fromTextAttrsDict\n */\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (key in fromTextAttrsDict) {\n // noinspection JSUnfilteredForInLoop\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nconst initGraphics = function (graphics) {\n graphics\n .append('defs')\n .append('marker')\n .attr('id', 'arrowhead')\n .attr('refX', 5)\n .attr('refY', 2)\n .attr('markerWidth', 6)\n .attr('markerHeight', 4)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0,0 V 4 L6,2 Z'); // this is actual shape for arrowhead\n};\n\nexport default {\n drawRect,\n drawCircle,\n drawSection,\n drawText,\n drawLabel,\n drawTask,\n drawBackgroundRect,\n getTextObj,\n getNoteRect,\n initGraphics,\n};\n","// @ts-nocheck TODO: fix file\nimport { select } from 'd3';\nimport svgDraw from './svgDraw';\nimport { getConfig } from '../../config';\nimport { configureSvgSize } from '../../setupGraphViewbox';\n\nexport const setConf = function (cnf) {\n const keys = Object.keys(cnf);\n\n keys.forEach(function (key) {\n conf[key] = cnf[key];\n });\n};\n\nconst actors = {};\n\n/** @param diagram - The diagram to draw to. */\nfunction drawActorLegend(diagram) {\n const conf = getConfig().journey;\n // Draw the actors\n let yPos = 60;\n Object.keys(actors).forEach((person) => {\n const colour = actors[person].color;\n\n const circleData = {\n cx: 20,\n cy: yPos,\n r: 7,\n fill: colour,\n stroke: '#000',\n pos: actors[person].position,\n };\n svgDraw.drawCircle(diagram, circleData);\n\n const labelData = {\n x: 40,\n y: yPos + 7,\n fill: '#666',\n text: person,\n textMargin: conf.boxTextMargin | 5,\n };\n svgDraw.drawText(diagram, labelData);\n\n yPos += 20;\n });\n}\n// TODO: Cleanup?\nconst conf = getConfig().journey;\nconst LEFT_MARGIN = conf.leftMargin;\nexport const draw = function (text, id, version, diagObj) {\n const conf = getConfig().journey;\n diagObj.db.clear();\n diagObj.parser.parse(text + '\\n');\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 // const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n bounds.init();\n const diagram = root.select('#' + id);\n\n svgDraw.initGraphics(diagram);\n\n const tasks = diagObj.db.getTasks();\n const title = diagObj.db.getDiagramTitle();\n\n const actorNames = diagObj.db.getActors();\n for (const member in actors) {\n delete actors[member];\n }\n let actorPos = 0;\n actorNames.forEach((actorName) => {\n actors[actorName] = {\n color: conf.actorColours[actorPos % conf.actorColours.length],\n position: actorPos,\n };\n actorPos++;\n });\n\n drawActorLegend(diagram);\n bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50);\n drawTasks(diagram, tasks, 0);\n\n const box = bounds.getBounds();\n if (title) {\n diagram\n .append('text')\n .text(title)\n .attr('x', LEFT_MARGIN)\n .attr('font-size', '4ex')\n .attr('font-weight', 'bold')\n .attr('y', 25);\n }\n\n const height = box.stopy - box.starty + 2 * conf.diagramMarginY;\n const width = LEFT_MARGIN + box.stopx + 2 * conf.diagramMarginX;\n\n configureSvgSize(diagram, height, width, conf.useMaxWidth);\n\n // Draw activity line\n diagram\n .append('line')\n .attr('x1', LEFT_MARGIN)\n .attr('y1', conf.height * 4) // One section head + one task + margins\n .attr('x2', width - LEFT_MARGIN - 4) // Subtract stroke width so arrow point is retained\n .attr('y2', conf.height * 4)\n .attr('stroke-width', 4)\n .attr('stroke', 'black')\n .attr('marker-end', 'url(#arrowhead)');\n\n const extraVertForTitle = title ? 70 : 0;\n diagram.attr('viewBox', `${box.startx} -25 ${width} ${height + extraVertForTitle}`);\n diagram.attr('preserveAspectRatio', 'xMinYMin meet');\n diagram.attr('height', height + extraVertForTitle + 25);\n};\n\nexport const bounds = {\n data: {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n },\n verticalPos: 0,\n\n sequenceItems: [],\n init: function () {\n this.sequenceItems = [];\n this.data = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n };\n this.verticalPos = 0;\n },\n updateVal: function (obj, key, val, fun) {\n if (obj[key] === undefined) {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n },\n updateBounds: function (startx, starty, stopx, stopy) {\n const conf = getConfig().journey;\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _self = this;\n let cnt = 0;\n /** @param type - Set to `activation` if activation */\n function updateFn(type?: 'activation') {\n return function updateItemBounds(item) {\n cnt++;\n // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems\n const n = _self.sequenceItems.length - cnt + 1;\n _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n if (!(type === 'activation')) {\n _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);\n }\n };\n }\n\n this.sequenceItems.forEach(updateFn());\n },\n insert: function (startx, starty, stopx, stopy) {\n const _startx = Math.min(startx, stopx);\n const _stopx = Math.max(startx, stopx);\n const _starty = Math.min(starty, stopy);\n const _stopy = Math.max(starty, stopy);\n\n this.updateVal(bounds.data, 'startx', _startx, Math.min);\n this.updateVal(bounds.data, 'starty', _starty, Math.min);\n this.updateVal(bounds.data, 'stopx', _stopx, Math.max);\n this.updateVal(bounds.data, 'stopy', _stopy, Math.max);\n\n this.updateBounds(_startx, _starty, _stopx, _stopy);\n },\n bumpVerticalPos: function (bump) {\n this.verticalPos = this.verticalPos + bump;\n this.data.stopy = this.verticalPos;\n },\n getVerticalPos: function () {\n return this.verticalPos;\n },\n getBounds: function () {\n return this.data;\n },\n};\n\nconst fills = conf.sectionFills;\nconst textColours = conf.sectionColours;\n\nexport const drawTasks = function (diagram, tasks, verticalPos) {\n const conf = getConfig().journey;\n let lastSection = '';\n const sectionVHeight = conf.height * 2 + conf.diagramMarginY;\n const taskPos = verticalPos + sectionVHeight;\n\n let sectionNumber = 0;\n let fill = '#CCC';\n let colour = 'black';\n let num = 0;\n\n // Draw the tasks\n for (const [i, task] of tasks.entries()) {\n if (lastSection !== task.section) {\n fill = fills[sectionNumber % fills.length];\n num = sectionNumber % fills.length;\n colour = textColours[sectionNumber % textColours.length];\n\n // count how many consecutive tasks have the same section\n let taskInSectionCount = 0;\n const currentSection = task.section;\n for (let taskIndex = i; taskIndex < tasks.length; taskIndex++) {\n if (tasks[taskIndex].section == currentSection) {\n taskInSectionCount = taskInSectionCount + 1;\n } else {\n break;\n }\n }\n\n const section = {\n x: i * conf.taskMargin + i * conf.width + LEFT_MARGIN,\n y: 50,\n text: task.section,\n fill,\n num,\n colour,\n taskCount: taskInSectionCount,\n };\n\n svgDraw.drawSection(diagram, section, conf);\n lastSection = task.section;\n sectionNumber++;\n }\n\n // Collect the actors involved in the task\n const taskActors = task.people.reduce((acc, actorName) => {\n if (actors[actorName]) {\n acc[actorName] = actors[actorName];\n }\n\n return acc;\n }, {});\n\n // Add some rendering data to the object\n task.x = i * conf.taskMargin + i * conf.width + LEFT_MARGIN;\n task.y = taskPos;\n task.width = conf.diagramMarginX;\n task.height = conf.diagramMarginY;\n task.colour = colour;\n task.fill = fill;\n task.num = num;\n task.actors = taskActors;\n\n // Draw the box with the attached line\n svgDraw.drawTask(diagram, task, conf);\n bounds.insert(task.x, task.y, task.x + task.width + conf.taskMargin, 300 + 5 * 30); // stopY is the length of the descenders.\n }\n};\n\nexport default {\n setConf,\n draw,\n};\n","import { DiagramDefinition } from '../../diagram-api/types';\n// @ts-ignore: TODO Fix ts errors\nimport parser from './parser/journey';\nimport db from './journeyDb';\nimport styles from './styles';\nimport renderer from './journeyRenderer';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: (cnf) => {\n renderer.setConf(cnf.journey);\n db.clear();\n },\n};\n"],"names":["parser","o","k","v","l","$V0","$V1","$V2","$V3","$V4","$V5","$V6","$V7","$V8","$V9","$Va","yytext","yyleng","yylineno","yy","yystate","$$","_$","$0","str","hash","error","input","self","stack","tstack","vstack","lstack","table","TERROR","EOF","args","lexer","sharedState","yyloc","ranges","lex","token","symbol","state","action","r","yyval","p","len","newState","expected","errStr","ch","lines","oldLines","past","next","pre","c","match","indexed_rule","backup","tempMatch","index","rules","i","condition","n","yy_","$avoiding_name_collisions","YY_START","Parser","currentSection","sections","tasks","rawTasks","parseDirective","statement","context","type","mermaidAPI","clear","commonClear","addSection","txt","getSections","getTasks","allItemsProcessed","compileTasks","maxDepth","iterationCount","updateActors","tempActors","task","addTask","descr","taskData","pieces","score","peeps","peopleList","s","rawTask","addTaskOrg","newTask","compileTask","pos","allProcessed","getActors","db","configApi.getConfig","setDiagramTitle","getDiagramTitle","setAccTitle","getAccTitle","setAccDescription","getAccDescription","getStyles","options","styles","drawRect","elem","rectData","rectElem","drawFace","element","faceData","circleElement","face","smile","arc","d3arc","sad","ambivalent","drawCircle","circleData","drawText","textData","nText","textElem","span","drawLabel","txtObject","genPoints","x","y","width","height","cut","polygon","drawSection","section","conf","g","rect","getNoteRect","_drawTextCandidateFunc","taskCount","drawTask","center","maxHeight","xPos","person","colour","circle","drawBackgroundRect","bounds","getTextObj","byText","content","textAttrs","text","_setTextAttrs","byTspan","taskFontSize","taskFontFamily","dy","byFo","body","toText","fromTextAttrsDict","key","initGraphics","graphics","svgDraw","setConf","cnf","actors","drawActorLegend","diagram","getConfig","yPos","labelData","LEFT_MARGIN","draw","id","version","diagObj","securityLevel","sandboxElement","select","root","title","actorNames","member","actorPos","actorName","drawTasks","box","configureSvgSize","extraVertForTitle","obj","val","fun","startx","starty","stopx","stopy","_self","cnt","updateFn","item","_startx","_stopx","_starty","_stopy","bump","fills","textColours","verticalPos","lastSection","sectionVHeight","taskPos","sectionNumber","fill","num","taskInSectionCount","taskIndex","taskActors","acc","renderer"],"mappings":";;;;;;;;AAyEA,IAAIA,IAAU,WAAU;AACxB,MAAIC,IAAE,SAASC,GAAEC,GAAEF,GAAEG,GAAE;AAAC,SAAIH,IAAEA,KAAG,CAAE,GAACG,IAAEF,EAAE,QAAOE,KAAIH,EAAEC,EAAEE,CAAC,CAAC,IAAED;AAAE;AAAC,WAAOF;AAAA,EAAC,GAAEI,IAAI,CAAC,GAAE,CAAC,GAAEC,IAAI,CAAC,GAAE,CAAC,GAAEC,IAAI,CAAC,GAAE,GAAE,IAAG,IAAG,IAAG,IAAG,IAAG,IAAG,IAAG,EAAE,GAAEC,IAAI,CAAC,GAAE,EAAE,GAAEC,IAAI,CAAC,GAAE,EAAE,GAAEC,IAAI,CAAC,GAAE,EAAE,GAAEC,IAAI,CAAC,GAAE,EAAE,GAAEC,IAAI,CAAC,GAAE,EAAE,GAAEC,IAAI,CAAC,GAAE,EAAE,GAAEC,IAAI,CAAC,GAAE,EAAE,GAAEC,IAAI,CAAC,GAAE,GAAE,GAAE,IAAG,IAAG,IAAG,IAAG,IAAG,IAAG,IAAG,EAAE,GACzOf,IAAS;AAAA,IAAC,OAAO,WAAkB;AAAA,IAAG;AAAA,IAC1C,IAAI,CAAE;AAAA,IACN,UAAU,EAAC,OAAQ,GAAE,OAAQ,GAAE,SAAU,GAAE,UAAW,GAAE,KAAM,GAAE,WAAY,GAAE,MAAO,GAAE,OAAQ,GAAE,WAAY,IAAG,SAAU,IAAG,eAAgB,IAAG,eAAgB,IAAG,gBAAiB,IAAG,KAAI,IAAG,cAAe,IAAG,OAAQ,IAAG,WAAY,IAAG,iBAAkB,IAAG,WAAY,IAAG,iBAAkB,IAAG,2BAA4B,IAAG,SA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