diff --git a/package.json b/package.json index a1088d2..f1125c4 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "react-router-dom": "^4.1.2", "react-scripts": "1.0.10", "react-sortable-tree": "^0.1.19", + "react-svg-pan-zoom": "^2.14.1", "superagent": "^3.5.0" }, "devDependencies": { diff --git a/public/Pintura/css/colours.css b/public/Pintura/css/colours.css new file mode 100644 index 0000000..0911a35 --- /dev/null +++ b/public/Pintura/css/colours.css @@ -0,0 +1,61 @@ +#menu { + color:#fff!important; + background-color:#000!important +} +.dark-grey-background { + color:black; + background:#aaa; +} +.light-grey-background { + color:black; + background:#ddd; +} +.blue-grey-background { + color:white; + background:#607d8b; +} +.floating-panel-item { + font-size:12px; +} +#floating-panel-list-div { + background:#aaa; +} +.floating-panel-list { + background:grey; + border:none; +} +.w3-ul li { + border-bottom:0px; +} +#sidebar { + background:#607d8b; + border-right:thick solid white; +} +.component-type-name { + color:black; + font-size:12px; +} +.floating-panel-name { + font-size:12px; +} +.dark-font { + color:black; +} +.dropdown-menu { + border:medium solid black; + background:#607d8b; + border:medium solid black; + border-width: 1px 1px 1px 1px; +} +.dropdown-menu h4 { + color:white; +} +.dropdown-menu a { + color: black; + background:#ddd; + font-size:14px; +} +.dropdown-menu a:hover { + background:#bbb; + color: white; +} diff --git a/public/Pintura/css/svg.css b/public/Pintura/css/svg.css new file mode 100644 index 0000000..2fcb5e9 --- /dev/null +++ b/public/Pintura/css/svg.css @@ -0,0 +1,84 @@ +.bar { + stroke: #000; + stroke-width: 3px; +} + +.highlighted-node:hover { + stroke: #ff0; +} + +line { + stroke: #000; + stroke-width: 1px; +} + +.line { + stroke: #000; + stroke-width: 2px; +} +.terminal-connnode { + stroke: #000; + stroke-width: 1px; +} +.terminal-toponode { + stroke: #000; + stroke-width: 1px; +} +.conduct { + stroke: #000; + stroke-width: 1px; +} +.unknown { + stroke: #f0f; + stroke-width: 1px; + height: 20px; + width: 20px; +} +.acline { + stroke: #000; + stroke-width: 2px; +} +#backing { + fill: whitesmoke; +} + +/* Below here are SVG elements that we don't want the user to interact with + therefore we disable pointer events */ + +.svglabel { + visibility: hidden; + pointer-events: none; + -webkit-user-select: none; /* Chrome all / Safari all */ + -moz-user-select: none; /* Firefox all */ + -ms-user-select: none; /* IE 10+ */ +} +.svglabel-high { + visibility: visible; + font-size: 12px; + font-family: "sans-serif"; + text-anchor: right; + fill: black; + stroke-width: 1px; + pointer-events: none; + -webkit-user-select: none; /* Chrome all / Safari all */ + -moz-user-select: none; /* Firefox all */ + -ms-user-select: none; /* IE 10+ */ +} +.gridLine { + stroke: #aaa; + stroke-width: 1px; + pointer-events: none; + -webkit-user-select: none; /* Chrome all / Safari all */ + -moz-user-select: none; /* Firefox all */ + -ms-user-select: none; /* IE 10+ */ +} +.gridLabel { + font-size: 8px; + font-family: "sans-serif"; + fill: grey; + stroke-width: 0px; + pointer-events: none; + -webkit-user-select: none; /* Chrome all / Safari all */ + -moz-user-select: none; /* Firefox all */ + -ms-user-select: none; /* IE 10+ */ +} diff --git a/public/Pintura/images/Pintura_logo.svg b/public/Pintura/images/Pintura_logo.svg new file mode 100644 index 0000000..3230dd5 --- /dev/null +++ b/public/Pintura/images/Pintura_logo.svg @@ -0,0 +1,1225 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/Pintura/images/brea.svg b/public/Pintura/images/brea.svg new file mode 100644 index 0000000..0361327 --- /dev/null +++ b/public/Pintura/images/brea.svg @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/public/Pintura/images/conn.svg b/public/Pintura/images/conn.svg new file mode 100644 index 0000000..cce4240 --- /dev/null +++ b/public/Pintura/images/conn.svg @@ -0,0 +1,21 @@ + + + + + diff --git a/public/Pintura/images/cons.svg b/public/Pintura/images/cons.svg new file mode 100644 index 0000000..47b333d --- /dev/null +++ b/public/Pintura/images/cons.svg @@ -0,0 +1,22 @@ + + + + + + diff --git a/public/Pintura/images/net.svg b/public/Pintura/images/net.svg new file mode 100644 index 0000000..494831c --- /dev/null +++ b/public/Pintura/images/net.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + diff --git a/public/Pintura/images/sol.svg b/public/Pintura/images/sol.svg new file mode 100644 index 0000000..f738402 --- /dev/null +++ b/public/Pintura/images/sol.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + diff --git a/public/Pintura/images/sync.svg b/public/Pintura/images/sync.svg new file mode 100644 index 0000000..717aa31 --- /dev/null +++ b/public/Pintura/images/sync.svg @@ -0,0 +1,22 @@ + + + + + + diff --git a/public/Pintura/images/term.svg b/public/Pintura/images/term.svg new file mode 100644 index 0000000..d67173e --- /dev/null +++ b/public/Pintura/images/term.svg @@ -0,0 +1,21 @@ + + + + + diff --git a/public/Pintura/images/topo.svg b/public/Pintura/images/topo.svg new file mode 100644 index 0000000..643c352 --- /dev/null +++ b/public/Pintura/images/topo.svg @@ -0,0 +1,22 @@ + + + + + + diff --git a/public/Pintura/images/trans.svg b/public/Pintura/images/trans.svg new file mode 100644 index 0000000..e9af2ce --- /dev/null +++ b/public/Pintura/images/trans.svg @@ -0,0 +1,22 @@ + + + + + + diff --git a/public/Pintura/js/cimjson.js b/public/Pintura/js/cimjson.js new file mode 100644 index 0000000..957c369 --- /dev/null +++ b/public/Pintura/js/cimjson.js @@ -0,0 +1,201 @@ +/* + * Copyright © 2016-2017, RWTH Aachen University + * Authors: Richard Marston + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * A copy of the GNU General Public License is in the LICENSE file + * in the top level directory of this source tree. + */ + +var cimjson = cimjson || (function() { + + var pathBase = ''; + const imageNames = { + "cim:ACLineSegment": "images/term.svg", + "cim:Terminal": "images/term.svg", + "cim:Breaker": "images/brea.svg", + "cim:ConnectivityNode": "images/conn.svg", + "cim:EnergyConsumer": "images/cons.svg", + "cim:EquivalentInjection": "images/cons.svg", + "cim:ExternalNetworkInjection": "images/net.svg", + "cim:PowerTransformer": "images/trans.svg", + "cim:SolarGeneratingUnit": "images/solar.svg", + "cim:SynchronousMachine": "images/sync.svg", + "cim:TopologicalNode": "images/topo.svg", + "cim:TransformerWinding": "images/trans.svg", + }; + + const PinturaDiagramObjectPoints = "Pintura:DiagramObjectPoints"; + + var getImageName = function(type) { + return pathBase + imageNames[type]; + } + + var convertDiagramObjectToTemplateFormat = function(diagramObject, graph, categoryGraphName, diagramList) { + + let originalPoints = diagramObject[PinturaDiagramObjectPoints]; + let preOffsetPoints = []; + let imagePoints = []; + let labelPoint; + let object; + let categoryGraph = graph[categoryGraphName]; + const imageHeight = 12; + const imageWidth = 12; + if (diagramObject["cim:DiagramObject.IdentifiedObject"] != undefined) { + let rdfId = diagramObject["cim:DiagramObject.IdentifiedObject"]["rdf:resource"].substring(1); + for (let index in originalPoints) { + let point = originalPoints[index]; + preOffsetPoints.push( + { + "x": parseInt(point["cim:DiagramObjectPoint.xPosition"]).toString(), + "y": parseInt(point["cim:DiagramObjectPoint.yPosition"]).toString() + }); + imagePoints.push( + { + "imageHeight" : imageHeight.toString(), + "imageWidth" : imageWidth.toString(), + "x" : (parseInt(point["cim:DiagramObjectPoint.xPosition"]) - (imageWidth/2)).toString(), + "y" : (parseInt(point["cim:DiagramObjectPoint.yPosition"]) - (imageHeight/2)).toString() + }); + }; + labelPoint = { + "x": (parseInt(preOffsetPoints[0].x) + (imageWidth/2)).toString(), + "y": (parseInt(preOffsetPoints[0].y) - (imageHeight/2)).toString() + }; + object = + { + "pintura:image" : getImageName(categoryGraphName), + "pintura:rdfId" : rdfId, + "pintura:points" : imagePoints, + "pintura:label" : { + "text": categoryGraph[rdfId]["cim:IdentifiedObject.name"], + "x" : labelPoint.x, + "y" : labelPoint.y + } + } + while (preOffsetPoints.length > 1) { + if (object["pintura:line"] == null) { + object["pintura:line"] = []; + } + let line = { + "x1": preOffsetPoints[0].x, + "y1": preOffsetPoints[0].y, + "x2": preOffsetPoints[1].x, + "y2": preOffsetPoints[1].y + }; + object["pintura:line"].push(line); + preOffsetPoints.shift() + } + } + let diagram = diagramObject["cim:DiagramObject.Diagram"]["rdf:resource"].substring(1); + if (diagramList[diagram] === undefined){ + diagramList[diagram] = { "pintura:name" : graph["cim:Diagram"][diagram]["cim:IdentifiedObject.name"] }; + } + if (diagramObject["cim:DiagramObject.IdentifiedObject"]) { + let identifiedObject = diagramObject["cim:DiagramObject.IdentifiedObject"]["rdf:resource"].substring(1); + if (diagramList[diagram]["components"] === undefined){ + diagramList[diagram]["components"] = {}; + } + if (diagramList[diagram]["components"][categoryGraphName] === undefined){ + diagramList[diagram]["components"][categoryGraphName] = {}; + } + diagramList[diagram]["components"][categoryGraphName][identifiedObject] = object; + } + }; + + var convertToTemplatableFormat = function(diagramObjects, graph) { + + let output = { 'Diagram' : {} }; + let diagramList = output['Diagram']; + + for (categoryGraphName in imageNames) { + + let categoryGraph = graph[categoryGraphName]; + for (let key in categoryGraph) { + let diagramObject = diagramObjects[key]; + if (diagramObject != undefined) { + convertDiagramObjectToTemplateFormat(diagramObject, graph, categoryGraphName, diagramList); + } + } + } + return output; + }; + + var indexDiagramGraphByComponentType = function(input) { + /* + * Index the diagram object graph by the identified object's id so we don't + * have to go hunting for the referenced object inside the diagram objects. + */ + let graph = {}; + for (let key in input) { + let diagramObject = input[key]; + let diagram = diagramObject["cim:DiagramObject.Diagram"]["rdf:resource"].substring(1); + if (diagramObject["cim:DiagramObject.IdentifiedObject"]) { + let identifiedObject = input[key]["cim:DiagramObject.IdentifiedObject"]["rdf:resource"].substring(1); + graph[identifiedObject] = input[key]; + } + } + return graph; + }; + + var addDiagramObjectPointsToDiagramObjects = function(diagramObjectPointGraph, diagramObjectGraph){ + for (let key in diagramObjectPointGraph) { + mergeMatchingDataIntoParentNodeArray(diagramObjectPointGraph[key], "cim:DiagramObjectPoint.DiagramObject", diagramObjectGraph, PinturaDiagramObjectPoints); + } + }; + + /* + * Create link to a member of an array of e.g. points + */ + var mergeMatchingDataIntoParentNodeArray = function(node, matchingElement, destinationGraph, destinationElement) { + if (node[matchingElement]) { + let id = node[matchingElement]["rdf:resource"].substr(1); + if (destinationGraph[id]) { + if (destinationGraph[id][destinationElement] === undefined) { + destinationGraph[id][destinationElement] = []; + } + destinationGraph[id][destinationElement].push(node); + } + else { + console.log("Could not find destination "+matchingElement+" to merge into "+destinationElement+"."); + } + } + else { + console.log("Could not find matching element "+matchingElement+" to merge "+destinationElement+" into ."); + } + }; + + var getTemplateJson = function(graph) { + let updatedDiagramObjects = JSON.parse(JSON.stringify(graph['cim:DiagramObject'])); + let diagramObjectPoints = graph['cim:DiagramObjectPoint']; + addDiagramObjectPointsToDiagramObjects(diagramObjectPoints, updatedDiagramObjects); + + let diagramObjectsByIdentifiedObjects = indexDiagramGraphByComponentType(updatedDiagramObjects); + + templateReadyFormat = convertToTemplatableFormat(diagramObjectsByIdentifiedObjects, graph); + + return templateReadyFormat; + }; + + return { + setImagePathBase : function(path) { + pathBase = path; + }, + getTemplateJson, + }; +}()); + +if (typeof module !== 'undefined' && module.exports) { + module.exports = { + cimjson + }; +} diff --git a/public/Pintura/js/cimsvg.js b/public/Pintura/js/cimsvg.js new file mode 100644 index 0000000..aaf97d0 --- /dev/null +++ b/public/Pintura/js/cimsvg.js @@ -0,0 +1,140 @@ +/* + * Copyright © 2016-2017, RWTH Aachen University + * Authors: Richard Marston + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * A copy of the GNU General Public License is in the LICENSE file + * in the top level directory of this source tree. + */ + +var cimsvg = cimsvg || (function() { + + var svgNode = null; + var xmlNode = null; + var pinturaNode = null; + var sidebarNode = null; + + function handler() { + //console.log(this.getResponseHeader('content-type')); + } + + var includeFile = function(fileName, callback) { + let dom = svgNode.ownerDocument; + let newTag = dom.createElement("script"); + newTag.type = "text/javascript"; + newTag.src=fileName; + if ( callback != undefined ) { + newTag.onload=function() { + callback(); + }; + } + svgNode.parentElement.appendChild(newTag); + }; + + var applyTemplate = function(data) { + var template = Handlebars.templates['cim2svg']; + return template(data); + }; + + var loadFile = function(fileContents) { + if (cimxml.moreXmlData(fileContents)) { + baseJson = cimxml.getBaseJson(); + templateJson = cimjson.getTemplateJson(baseJson); + svgNode.ownerDocument.getElementById('diagrams').innerHTML = applyTemplate(templateJson); + if(sidebarNode != null) { + cimmenu.populateSidebar(sidebarNode, templateJson); + } + } + }; + + var setFileCount = function(count) { + cimxml.setRdfFileCount(count); + }; + + var isNode = false; + if (typeof module !== 'undefined' && module.exports) { + isNode = true; + } + + var updateComponent = function(type, id, attribute, value) { + cimxml.updateComponentInBaseJson(type, id, attribute, value) + baseJson = cimxml.getBaseJson(); + templateJson = cimjson.getTemplateJson(baseJson); + if (attribute === "cim:IdentifiedObject.name") { + buttonId = '#' + id + "-sidebar-button" + button = sidebarNode.querySelector(buttonId) + button.innerHTML = value; + } + }; + + var loadXml = function(fileName, callback) { + // Create a connection to the file. + var Connect = new XMLHttpRequest(); + // Define which file to open and + Connect.open("GET", fileName, true); + Connect.setRequestHeader("Content-Type", "text/xml"); + Connect.onreadystatechange = handler; + Connect.onload = function (e) { + if(Connect.readyState === 4) { + if(Connect.status === 200) { + callback(Connect.responseXML); + } + else { + console.log(Connect.statusText); + } + } + }; + // send the request. + Connect.send(null); + }; + + return { + init : function(svg, sidebar, componentAttributes, componentCreation) { + svgNode = svg; + sidebarNode = sidebar; + includeFile("handlebars.runtime.js", function() { + includeFile("src/cimview.js", function() { + cimview.init(svgNode); + if(sidebarNode != undefined) { + includeFile("src/cimmenu.js", function() { + cimmenu.init(componentAttributes) + }); + } + includeFile("templates/template.js", function(){ + includeFile("src/cimxml.js", function(){ + includeFile("src/cimjson.js", function(){}); + }); + }); + }); + }); + loadXml("templates/generated_add_components/menu.xml", function(xml){ + if(componentCreation != undefined) { + accordion = componentCreation.querySelector('#component-creation-list-div') + accordion.innerHTML = xml.documentElement.innerHTML; + } + }); + }, + setSVG : function(svg) { + svgNode = svg; + }, + loadFile, + setFileCount, + updateComponent, + }; + +}()); + +if (cimsvg.isNode) { + module.exports = { + cimsvg + } +} diff --git a/public/Pintura/js/cimview.js b/public/Pintura/js/cimview.js new file mode 100644 index 0000000..3c96201 --- /dev/null +++ b/public/Pintura/js/cimview.js @@ -0,0 +1,208 @@ +/* + * Copyright © 2016-2017, RWTH Aachen University + * Authors: Richard Marston + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * A copy of the GNU General Public License is in the LICENSE file + * in the top level directory of this source tree. + */ + +var cimview = cimview || (function() { + + var svgNode = null; + + var zoomSizes = [ + { width: 1024, height: 768 }, + { width: 920, height: 690 }, + { width: 816, height: 612 }, + { width: 712, height: 532 }, + { width: 608, height: 456 }, + { width: 504, height: 378 }, + { width: 400, height: 300 }, + ]; + + var zoomLevel = 0; + + var zoomToLevel = function(level) { + zoomLevel = level; + let rect = getViewBox(); + centreOfGrid = { x: rect.x + rect.width / 2, y: rect.y + rect.height / 2 }; + rect.width = zoomSizes[level].width; + rect.height = zoomSizes[level].height; + rect.x = centreOfGrid.x - (rect.width / 2); + rect.y = centreOfGrid.y - (rect.height / 2); + setViewBox(rect); + }; + + var zoomOut = function() { + let level = zoomLevel-1; + if (level < 0) { + level = 0; + } + zoomToLevel(level); + //document.getElementById("zoomer").value=level; + }; + + var zoomIn = function() { + let level = zoomLevel+1; + let lastIndex = zoomSizes.length-1; + if (level > lastIndex) { + level = lastIndex; + } + zoomToLevel(level); + //document.getElementById("zoomer").value=level; + }; + + var pan = function(point) { + let rect = getViewBox(); + rect.x += point.x; + rect.y += point.y; + setViewBox(rect); + }; + + var clearGrid = function() { + let oldLines = Array.from(svgNode.getElementsByClassName("gridLine")); + oldLines.forEach(function(key) { + key.remove(); + }); + let oldLabels = Array.from(svgNode.getElementsByClassName("gridLabel")); + oldLabels.forEach(function(key) { + key.remove(); + }); + }; + + var createLocationMarker = function(id, loc, x, y) { + let grid = svgNode.ownerDocument.getElementById("grid"); + let textAttributes = { + "x": x, + "y": y, + "class": "gridLabel", + "id": id, + }; + let text = createSvgTag("text", textAttributes); + text.innerHTML = loc; + grid.appendChild(text); + }; + + var createGridLine = function(x1, y1, x2, y2) { + let grid = svgNode.ownerDocument.getElementById("grid"); + let lineAttributes = { + "x1": x1, + "x2": x2, + "y1": y1, + "y2": y2, + "class": "gridLine", + }; + let line = createSvgTag("line", lineAttributes); + grid.appendChild(line); + }; + + /* + * Create a tag in the svg namespace + */ + const createSvgTag = function(tagname, attributes) { + let xmlns="http://www.w3.org/2000/svg"; + let newTag = svgNode.ownerDocument.createElementNS(xmlns, tagname); + for (let key in attributes) { + newTag.setAttribute(key, attributes[key]); + } + return newTag; + }; + + var calculateStartOffset = function(distanceFromOrigin, gridSize) { + let offset; + if (distanceFromOrigin < 0) { + offset = distanceFromOrigin - ( distanceFromOrigin % gridSize ); + } + else { + offset = distanceFromOrigin + gridSize - ( distanceFromOrigin % gridSize ); + } + return offset; + }; + + var createGrid = function() { + clearGrid(); + let gridSize = 100; + let viewBoxRect = getViewBox(); + /* horizontal lines */ + let startOffsetY = calculateStartOffset(viewBoxRect.y, gridSize); + let startOffsetX = calculateStartOffset(viewBoxRect.x, gridSize); + for (let i=0; i<(viewBoxRect.height/gridSize); i++) { + let yval = i*gridSize+startOffsetY; + createGridLine(viewBoxRect.x, yval, viewBoxRect.width+viewBoxRect.x, yval); + createLocationMarker(yval+"y", yval.toString(), viewBoxRect.x+10, yval+20); + } + /* vertical lines */ + for (let i=0; i<(viewBoxRect.width/gridSize); i++) { + let xval = i*gridSize+startOffsetX; + createGridLine(xval, viewBoxRect.y, xval, viewBoxRect.height+viewBoxRect.y); + createLocationMarker(xval+"x", xval.toString(), xval+10, viewBoxRect.y+20); + } + }; + + var getViewBox = function() { + let rect = {}; + viewBoxString = svgNode.getAttribute("viewBox"); + viewBoxElements = viewBoxString.split(" "); + rect.x = parseInt(viewBoxElements[0]); + rect.y = parseInt(viewBoxElements[1]); + rect.width = parseInt(viewBoxElements[2]); + rect.height = parseInt(viewBoxElements[3]); + return rect; + }; + + var setViewBox = function(rect) { + let viewBoxString = rect.x+" "+rect.y+" "+rect.width+" "+rect.height; + svgNode.setAttribute("viewBox", viewBoxString); + let bg = svgNode.ownerDocument.getElementById("backing"); + bg.setAttribute("x", rect.x); + bg.setAttribute("y", rect.y); + bg.setAttribute("width", "100%"); + bg.setAttribute("height", "100%"); + createGrid(); + }; + + var clearDisplay = function() { + while (svgNode.firstChild) { + svgNode.removeChild(svgNode.firstChild); + } + }; + + var hideAllLabels = function() { + Array.from(svgNode.getElementsByClassName("svglabel")).forEach(function (label) { + label.setAttributeNS(null, "visibility", "hidden"); + }); + }; + + var init = function(svg) { + svgNode = svg; + let rect = { x: "-100", y: "-100", width: "1024", height: "768" }; + setViewBox(rect); + }; + + /* + * Specify the functions that this module exports + */ + return { + init, + pan, + zoomIn, + zoomOut, + }; + +}()); + +if (typeof module !== 'undefined' && module.exports) { + module.exports = { + cimview + } +} diff --git a/public/Pintura/js/cimxml.js b/public/Pintura/js/cimxml.js new file mode 100644 index 0000000..128deb9 --- /dev/null +++ b/public/Pintura/js/cimxml.js @@ -0,0 +1,253 @@ +/* + * Copyright © 2016-2017, RWTH Aachen University + * Authors: Richard Marston + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * A copy of the GNU General Public License is in the LICENSE file + * in the top level directory of this source tree. + */ + +var cimxml = cimxml || (function() { + + var xmlDoc; + var rdfFileCount = 0; + var rdfFileReceived = 0; + var jsonBaseData = null; + const xmlnsString = "xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:cim='http://iec.ch/TC57/2012/CIM-schema-cim16#' xmlns:md='http://iec.ch/TC57/61970-552/ModelDescription/1#' xmlns:entsoe='http://entsoe.eu/Secretariat/ProfileExtension/2#'"; + + var getRawXML = function() { + return xmlDoc; + }; + + var getBaseJson = function() { + return jsonBaseData; + }; + + /* + * Convert a small data item into XML and add it to a node + */ + var addChild = function(object, name, doc, owner) { + + let child; + if (typeof object == "object") { + child = doc.createElement(name); + child.setAttribute("rdf:resource", object["rdf:resource"]); + } + else { + child = doc.createElement(name); + child.innerHTML = object; + } + owner.appendChild(child); + }; + + var copyXmlDataIntoObject = function(object, node) { + + let childNodes = node.children; + for (let childIndex = 0; childIndex < childNodes.length; childIndex++) { + let thisChild = childNodes[childIndex]; + if (thisChild.nodeType == Node.ELEMENT_NODE) { + if (thisChild.attributes.length > 0) { + object[thisChild.nodeName] = { "rdf:resource": thisChild.getAttribute("rdf:resource")}; + } + else { + object[thisChild.nodeName] = thisChild.innerHTML; + } + } + } + }; + + var importXmlNodeIntoGraph = function(graph, nodeCategory, node, id) { + + let thisObject = { }; + + thisObject['rdfid'] = id + + copyXmlDataIntoObject(thisObject, node); + + if (!graph[nodeCategory]) { + graph[nodeCategory] = {}; + } + + /* add the new object to the graph */ + let categoryGraph = graph[nodeCategory]; + categoryGraph[id] = thisObject; + }; + + var importAboutDataIntoGraph = function(graph, nodeCategory, thisNode, id) { + + if (graph[nodeCategory] && graph[nodeCategory][id]) { + let thisObject = graph[nodeCategory][id].about = []; + copyXmlDataIntoObject(thisObject, thisNode); + } + }; + + /* + * What is the rdf:ID attribute for this node + */ + var getRdfId = function(node) { + + let rdfId = node.getAttribute("rdf:ID"); + return rdfId; + }; + + /* + * What is the rdf:about attribute for this node + */ + var getRdfAbout = function(node) { + + let rdfAbout = node.getAttribute("rdf:about"); + return rdfAbout; + }; + + /* + * Clear the buffer of XML data that we use to handle multiple file imports + */ + var clearXmlData = function() { + + xmlDoc = null; + }; + + var xmlns = function(){ + + return xmlnsString; + }; + + /* + * Function to create a JSON document from an RDF (XML) DOM. + * RDF is a shallow xml format so we don"t have to dig too + * deep, a node will only ever have children or attributes. + */ + var createObjectGraphFromXml = function( xmlData ) { + + let graph = {}; + let topLevelNodes = xmlData.documentElement.childNodes; + + /* loop through all of the top level nodes */ + for (let topLevelIndex=0; topLevelIndex 0) { + if (rdfFileCount == rdfFileReceived) { + return true; + } + } + }; + + /* + * Here comes some more data + */ + var moreXmlData = function(text, draw=true) { + + if (!xmlDoc) { + xmlDoc = getDOM(""); + } + + let newDoc = getDOM(text); + let nodes = newDoc.documentElement.childNodes; + for (let i = 0; i < nodes.length; i++) { + if (nodes[i].nodeType == Node.ELEMENT_NODE) { + if (nodes[i].nodeName != "md:FullModel") { + xmlDoc.documentElement.appendChild(nodes[i].cloneNode(true)); + } + } + } + + rdfFileReceived++; + if (checkIfParseReady()) { + jsonBaseData = createObjectGraphFromXml(xmlDoc); + rdfFileReceived = 0; + rdfFileCount = 0; + return true; + } + return false; + }; + + /* + * Different method of getting DOM required for some platforms + */ + var getDOM = function(text) { + + let newDoc; + if ( window.DOMParser ) { + newDoc = ( new DOMParser() ).parseFromString( text, "application/xml" ); + } + else if( window.ActiveXObject ) { + let xmlObject = new ActiveXObject( "Microsoft.XMLDOM" ); + xmlObject.async = false; + xmlObject.loadXML( text ); + newDoc = xmlObject; + xmlObject = undefined; + } + else { + throw new Error( "Cannot find an XML parser!" ); + } + return newDoc; + }; + + var updateComponentInBaseJson = function(type, id, attribute, value) { + jsonBaseData[type][id][attribute] = value + }; + + return { + getBaseJson, + setRdfFileCount, + clearXmlData, + moreXmlData, + getRawXML, + updateComponentInBaseJson, + }; +}()); + +if (typeof module !== 'undefined' && module.exports) { + module.exports = { + cimxml + }; +} diff --git a/public/Pintura/js/handlebars.runtime.js b/public/Pintura/js/handlebars.runtime.js new file mode 100644 index 0000000..86c977a --- /dev/null +++ b/public/Pintura/js/handlebars.runtime.js @@ -0,0 +1,1468 @@ +/**! + + @license + handlebars v4.0.10 + +Copyright (C) 2011-2016 by Yehuda Katz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["Handlebars"] = factory(); + else + root["Handlebars"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireWildcard = __webpack_require__(1)['default']; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + + var _handlebarsBase = __webpack_require__(3); + + var base = _interopRequireWildcard(_handlebarsBase); + + // Each of these augment the Handlebars object. No need to setup here. + // (This is done to easily share code between commonjs and browse envs) + + var _handlebarsSafeString = __webpack_require__(20); + + var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); + + var _handlebarsException = __webpack_require__(5); + + var _handlebarsException2 = _interopRequireDefault(_handlebarsException); + + var _handlebarsUtils = __webpack_require__(4); + + var Utils = _interopRequireWildcard(_handlebarsUtils); + + var _handlebarsRuntime = __webpack_require__(21); + + var runtime = _interopRequireWildcard(_handlebarsRuntime); + + var _handlebarsNoConflict = __webpack_require__(33); + + var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + + // For compatibility and usage outside of module systems, make the Handlebars object a namespace + function create() { + var hb = new base.HandlebarsEnvironment(); + + Utils.extend(hb, base); + hb.SafeString = _handlebarsSafeString2['default']; + hb.Exception = _handlebarsException2['default']; + hb.Utils = Utils; + hb.escapeExpression = Utils.escapeExpression; + + hb.VM = runtime; + hb.template = function (spec) { + return runtime.template(spec, hb); + }; + + return hb; + } + + var inst = create(); + inst.create = create; + + _handlebarsNoConflict2['default'](inst); + + inst['default'] = inst; + + exports['default'] = inst; + module.exports = exports['default']; + +/***/ }), +/* 1 */ +/***/ (function(module, exports) { + + "use strict"; + + exports["default"] = function (obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + + newObj["default"] = obj; + return newObj; + } + }; + + exports.__esModule = true; + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + + "use strict"; + + exports["default"] = function (obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + }; + + exports.__esModule = true; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + exports.HandlebarsEnvironment = HandlebarsEnvironment; + + var _utils = __webpack_require__(4); + + var _exception = __webpack_require__(5); + + var _exception2 = _interopRequireDefault(_exception); + + var _helpers = __webpack_require__(9); + + var _decorators = __webpack_require__(17); + + var _logger = __webpack_require__(19); + + var _logger2 = _interopRequireDefault(_logger); + + var VERSION = '4.0.10'; + exports.VERSION = VERSION; + var COMPILER_REVISION = 7; + + exports.COMPILER_REVISION = COMPILER_REVISION; + var REVISION_CHANGES = { + 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it + 2: '== 1.0.0-rc.3', + 3: '== 1.0.0-rc.4', + 4: '== 1.x.x', + 5: '== 2.0.0-alpha.x', + 6: '>= 2.0.0-beta.1', + 7: '>= 4.0.0' + }; + + exports.REVISION_CHANGES = REVISION_CHANGES; + var objectType = '[object Object]'; + + function HandlebarsEnvironment(helpers, partials, decorators) { + this.helpers = helpers || {}; + this.partials = partials || {}; + this.decorators = decorators || {}; + + _helpers.registerDefaultHelpers(this); + _decorators.registerDefaultDecorators(this); + } + + HandlebarsEnvironment.prototype = { + constructor: HandlebarsEnvironment, + + logger: _logger2['default'], + log: _logger2['default'].log, + + registerHelper: function registerHelper(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _exception2['default']('Arg not supported with multiple helpers'); + } + _utils.extend(this.helpers, name); + } else { + this.helpers[name] = fn; + } + }, + unregisterHelper: function unregisterHelper(name) { + delete this.helpers[name]; + }, + + registerPartial: function registerPartial(name, partial) { + if (_utils.toString.call(name) === objectType) { + _utils.extend(this.partials, name); + } else { + if (typeof partial === 'undefined') { + throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); + } + this.partials[name] = partial; + } + }, + unregisterPartial: function unregisterPartial(name) { + delete this.partials[name]; + }, + + registerDecorator: function registerDecorator(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _exception2['default']('Arg not supported with multiple decorators'); + } + _utils.extend(this.decorators, name); + } else { + this.decorators[name] = fn; + } + }, + unregisterDecorator: function unregisterDecorator(name) { + delete this.decorators[name]; + } + }; + + var log = _logger2['default'].log; + + exports.log = log; + exports.createFrame = _utils.createFrame; + exports.logger = _logger2['default']; + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + exports.extend = extend; + exports.indexOf = indexOf; + exports.escapeExpression = escapeExpression; + exports.isEmpty = isEmpty; + exports.createFrame = createFrame; + exports.blockParams = blockParams; + exports.appendContextPath = appendContextPath; + var escape = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`', + '=': '=' + }; + + var badChars = /[&<>"'`=]/g, + possible = /[&<>"'`=]/; + + function escapeChar(chr) { + return escape[chr]; + } + + function extend(obj /* , ...source */) { + for (var i = 1; i < arguments.length; i++) { + for (var key in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { + obj[key] = arguments[i][key]; + } + } + } + + return obj; + } + + var toString = Object.prototype.toString; + + exports.toString = toString; + // Sourced from lodash + // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt + /* eslint-disable func-style */ + var isFunction = function isFunction(value) { + return typeof value === 'function'; + }; + // fallback for older versions of Chrome and Safari + /* istanbul ignore next */ + if (isFunction(/x/)) { + exports.isFunction = isFunction = function (value) { + return typeof value === 'function' && toString.call(value) === '[object Function]'; + }; + } + exports.isFunction = isFunction; + + /* eslint-enable func-style */ + + /* istanbul ignore next */ + var isArray = Array.isArray || function (value) { + return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; + }; + + exports.isArray = isArray; + // Older IE versions do not directly support indexOf so we must implement our own, sadly. + + function indexOf(array, value) { + for (var i = 0, len = array.length; i < len; i++) { + if (array[i] === value) { + return i; + } + } + return -1; + } + + function escapeExpression(string) { + if (typeof string !== 'string') { + // don't escape SafeStrings, since they're already safe + if (string && string.toHTML) { + return string.toHTML(); + } else if (string == null) { + return ''; + } else if (!string) { + return string + ''; + } + + // Force a string conversion as this will be done by the append regardless and + // the regex test will do this transparently behind the scenes, causing issues if + // an object's to string has escaped characters in it. + string = '' + string; + } + + if (!possible.test(string)) { + return string; + } + return string.replace(badChars, escapeChar); + } + + function isEmpty(value) { + if (!value && value !== 0) { + return true; + } else if (isArray(value) && value.length === 0) { + return true; + } else { + return false; + } + } + + function createFrame(object) { + var frame = extend({}, object); + frame._parent = object; + return frame; + } + + function blockParams(params, ids) { + params.path = ids; + return params; + } + + function appendContextPath(contextPath, id) { + return (contextPath ? contextPath + '.' : '') + id; + } + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _Object$defineProperty = __webpack_require__(6)['default']; + + exports.__esModule = true; + + var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; + + function Exception(message, node) { + var loc = node && node.loc, + line = undefined, + column = undefined; + if (loc) { + line = loc.start.line; + column = loc.start.column; + + message += ' - ' + line + ':' + column; + } + + var tmp = Error.prototype.constructor.call(this, message); + + // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. + for (var idx = 0; idx < errorProps.length; idx++) { + this[errorProps[idx]] = tmp[errorProps[idx]]; + } + + /* istanbul ignore else */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, Exception); + } + + try { + if (loc) { + this.lineNumber = line; + + // Work around issue under safari where we can't directly set the column value + /* istanbul ignore next */ + if (_Object$defineProperty) { + Object.defineProperty(this, 'column', { + value: column, + enumerable: true + }); + } else { + this.column = column; + } + } + } catch (nop) { + /* Ignore if the browser is very particular */ + } + } + + Exception.prototype = new Error(); + + exports['default'] = Exception; + module.exports = exports['default']; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(7), __esModule: true }; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + + var $ = __webpack_require__(8); + module.exports = function defineProperty(it, key, desc){ + return $.setDesc(it, key, desc); + }; + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + + var $Object = Object; + module.exports = { + create: $Object.create, + getProto: $Object.getPrototypeOf, + isEnum: {}.propertyIsEnumerable, + getDesc: $Object.getOwnPropertyDescriptor, + setDesc: $Object.defineProperty, + setDescs: $Object.defineProperties, + getKeys: $Object.keys, + getNames: $Object.getOwnPropertyNames, + getSymbols: $Object.getOwnPropertySymbols, + each: [].forEach + }; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + exports.registerDefaultHelpers = registerDefaultHelpers; + + var _helpersBlockHelperMissing = __webpack_require__(10); + + var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); + + var _helpersEach = __webpack_require__(11); + + var _helpersEach2 = _interopRequireDefault(_helpersEach); + + var _helpersHelperMissing = __webpack_require__(12); + + var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); + + var _helpersIf = __webpack_require__(13); + + var _helpersIf2 = _interopRequireDefault(_helpersIf); + + var _helpersLog = __webpack_require__(14); + + var _helpersLog2 = _interopRequireDefault(_helpersLog); + + var _helpersLookup = __webpack_require__(15); + + var _helpersLookup2 = _interopRequireDefault(_helpersLookup); + + var _helpersWith = __webpack_require__(16); + + var _helpersWith2 = _interopRequireDefault(_helpersWith); + + function registerDefaultHelpers(instance) { + _helpersBlockHelperMissing2['default'](instance); + _helpersEach2['default'](instance); + _helpersHelperMissing2['default'](instance); + _helpersIf2['default'](instance); + _helpersLog2['default'](instance); + _helpersLookup2['default'](instance); + _helpersWith2['default'](instance); + } + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + exports['default'] = function (instance) { + instance.registerHelper('blockHelperMissing', function (context, options) { + var inverse = options.inverse, + fn = options.fn; + + if (context === true) { + return fn(this); + } else if (context === false || context == null) { + return inverse(this); + } else if (_utils.isArray(context)) { + if (context.length > 0) { + if (options.ids) { + options.ids = [options.name]; + } + + return instance.helpers.each(context, options); + } else { + return inverse(this); + } + } else { + if (options.data && options.ids) { + var data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); + options = { data: data }; + } + + return fn(context, options); + } + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + var _exception = __webpack_require__(5); + + var _exception2 = _interopRequireDefault(_exception); + + exports['default'] = function (instance) { + instance.registerHelper('each', function (context, options) { + if (!options) { + throw new _exception2['default']('Must pass iterator to #each'); + } + + var fn = options.fn, + inverse = options.inverse, + i = 0, + ret = '', + data = undefined, + contextPath = undefined; + + if (options.data && options.ids) { + contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; + } + + if (_utils.isFunction(context)) { + context = context.call(this); + } + + if (options.data) { + data = _utils.createFrame(options.data); + } + + function execIteration(field, index, last) { + if (data) { + data.key = field; + data.index = index; + data.first = index === 0; + data.last = !!last; + + if (contextPath) { + data.contextPath = contextPath + field; + } + } + + ret = ret + fn(context[field], { + data: data, + blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) + }); + } + + if (context && typeof context === 'object') { + if (_utils.isArray(context)) { + for (var j = context.length; i < j; i++) { + if (i in context) { + execIteration(i, i, i === context.length - 1); + } + } + } else { + var priorKey = undefined; + + for (var key in context) { + if (context.hasOwnProperty(key)) { + // We're running the iterations one step out of sync so we can detect + // the last iteration without have to scan the object twice and create + // an itermediate keys array. + if (priorKey !== undefined) { + execIteration(priorKey, i - 1); + } + priorKey = key; + i++; + } + } + if (priorKey !== undefined) { + execIteration(priorKey, i - 1, true); + } + } + } + + if (i === 0) { + ret = inverse(this); + } + + return ret; + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + + var _exception = __webpack_require__(5); + + var _exception2 = _interopRequireDefault(_exception); + + exports['default'] = function (instance) { + instance.registerHelper('helperMissing', function () /* [args, ]options */{ + if (arguments.length === 1) { + // A missing field in a {{foo}} construct. + return undefined; + } else { + // Someone is actually trying to call something, blow up. + throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); + } + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + exports['default'] = function (instance) { + instance.registerHelper('if', function (conditional, options) { + if (_utils.isFunction(conditional)) { + conditional = conditional.call(this); + } + + // Default behavior is to render the positive path if the value is truthy and not empty. + // The `includeZero` option may be set to treat the condtional as purely not empty based on the + // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. + if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { + return options.inverse(this); + } else { + return options.fn(this); + } + }); + + instance.registerHelper('unless', function (conditional, options) { + return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash }); + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 14 */ +/***/ (function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (instance) { + instance.registerHelper('log', function () /* message, options */{ + var args = [undefined], + options = arguments[arguments.length - 1]; + for (var i = 0; i < arguments.length - 1; i++) { + args.push(arguments[i]); + } + + var level = 1; + if (options.hash.level != null) { + level = options.hash.level; + } else if (options.data && options.data.level != null) { + level = options.data.level; + } + args[0] = level; + + instance.log.apply(instance, args); + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 15 */ +/***/ (function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (instance) { + instance.registerHelper('lookup', function (obj, field) { + return obj && obj[field]; + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + exports['default'] = function (instance) { + instance.registerHelper('with', function (context, options) { + if (_utils.isFunction(context)) { + context = context.call(this); + } + + var fn = options.fn; + + if (!_utils.isEmpty(context)) { + var data = options.data; + if (options.data && options.ids) { + data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); + } + + return fn(context, { + data: data, + blockParams: _utils.blockParams([context], [data && data.contextPath]) + }); + } else { + return options.inverse(this); + } + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + exports.registerDefaultDecorators = registerDefaultDecorators; + + var _decoratorsInline = __webpack_require__(18); + + var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); + + function registerDefaultDecorators(instance) { + _decoratorsInline2['default'](instance); + } + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + exports['default'] = function (instance) { + instance.registerDecorator('inline', function (fn, props, container, options) { + var ret = fn; + if (!props.partials) { + props.partials = {}; + ret = function (context, options) { + // Create a new partials stack frame prior to exec. + var original = container.partials; + container.partials = _utils.extend({}, original, props.partials); + var ret = fn(context, options); + container.partials = original; + return ret; + }; + } + + props.partials[options.args[0]] = options.fn; + + return ret; + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + var logger = { + methodMap: ['debug', 'info', 'warn', 'error'], + level: 'info', + + // Maps a given level value to the `methodMap` indexes above. + lookupLevel: function lookupLevel(level) { + if (typeof level === 'string') { + var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); + if (levelMap >= 0) { + level = levelMap; + } else { + level = parseInt(level, 10); + } + } + + return level; + }, + + // Can be overridden in the host environment + log: function log(level) { + level = logger.lookupLevel(level); + + if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { + var method = logger.methodMap[level]; + if (!console[method]) { + // eslint-disable-line no-console + method = 'log'; + } + + for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + message[_key - 1] = arguments[_key]; + } + + console[method].apply(console, message); // eslint-disable-line no-console + } + } + }; + + exports['default'] = logger; + module.exports = exports['default']; + +/***/ }), +/* 20 */ +/***/ (function(module, exports) { + + // Build out our basic SafeString type + 'use strict'; + + exports.__esModule = true; + function SafeString(string) { + this.string = string; + } + + SafeString.prototype.toString = SafeString.prototype.toHTML = function () { + return '' + this.string; + }; + + exports['default'] = SafeString; + module.exports = exports['default']; + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _Object$seal = __webpack_require__(22)['default']; + + var _interopRequireWildcard = __webpack_require__(1)['default']; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + exports.checkRevision = checkRevision; + exports.template = template; + exports.wrapProgram = wrapProgram; + exports.resolvePartial = resolvePartial; + exports.invokePartial = invokePartial; + exports.noop = noop; + + var _utils = __webpack_require__(4); + + var Utils = _interopRequireWildcard(_utils); + + var _exception = __webpack_require__(5); + + var _exception2 = _interopRequireDefault(_exception); + + var _base = __webpack_require__(3); + + function checkRevision(compilerInfo) { + var compilerRevision = compilerInfo && compilerInfo[0] || 1, + currentRevision = _base.COMPILER_REVISION; + + if (compilerRevision !== currentRevision) { + if (compilerRevision < currentRevision) { + var runtimeVersions = _base.REVISION_CHANGES[currentRevision], + compilerVersions = _base.REVISION_CHANGES[compilerRevision]; + throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); + } else { + // Use the embedded version info since the runtime doesn't know about this revision yet + throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); + } + } + } + + function template(templateSpec, env) { + /* istanbul ignore next */ + if (!env) { + throw new _exception2['default']('No environment passed to template'); + } + if (!templateSpec || !templateSpec.main) { + throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); + } + + templateSpec.main.decorator = templateSpec.main_d; + + // Note: Using env.VM references rather than local var references throughout this section to allow + // for external users to override these as psuedo-supported APIs. + env.VM.checkRevision(templateSpec.compiler); + + function invokePartialWrapper(partial, context, options) { + if (options.hash) { + context = Utils.extend({}, context, options.hash); + if (options.ids) { + options.ids[0] = true; + } + } + + partial = env.VM.resolvePartial.call(this, partial, context, options); + var result = env.VM.invokePartial.call(this, partial, context, options); + + if (result == null && env.compile) { + options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); + result = options.partials[options.name](context, options); + } + if (result != null) { + if (options.indent) { + var lines = result.split('\n'); + for (var i = 0, l = lines.length; i < l; i++) { + if (!lines[i] && i + 1 === l) { + break; + } + + lines[i] = options.indent + lines[i]; + } + result = lines.join('\n'); + } + return result; + } else { + throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); + } + } + + // Just add water + var container = { + strict: function strict(obj, name) { + if (!(name in obj)) { + throw new _exception2['default']('"' + name + '" not defined in ' + obj); + } + return obj[name]; + }, + lookup: function lookup(depths, name) { + var len = depths.length; + for (var i = 0; i < len; i++) { + if (depths[i] && depths[i][name] != null) { + return depths[i][name]; + } + } + }, + lambda: function lambda(current, context) { + return typeof current === 'function' ? current.call(context) : current; + }, + + escapeExpression: Utils.escapeExpression, + invokePartial: invokePartialWrapper, + + fn: function fn(i) { + var ret = templateSpec[i]; + ret.decorator = templateSpec[i + '_d']; + return ret; + }, + + programs: [], + program: function program(i, data, declaredBlockParams, blockParams, depths) { + var programWrapper = this.programs[i], + fn = this.fn(i); + if (data || depths || blockParams || declaredBlockParams) { + programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); + } else if (!programWrapper) { + programWrapper = this.programs[i] = wrapProgram(this, i, fn); + } + return programWrapper; + }, + + data: function data(value, depth) { + while (value && depth--) { + value = value._parent; + } + return value; + }, + merge: function merge(param, common) { + var obj = param || common; + + if (param && common && param !== common) { + obj = Utils.extend({}, common, param); + } + + return obj; + }, + // An empty object to use as replacement for null-contexts + nullContext: _Object$seal({}), + + noop: env.VM.noop, + compilerInfo: templateSpec.compiler + }; + + function ret(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var data = options.data; + + ret._setup(options); + if (!options.partial && templateSpec.useData) { + data = initData(context, data); + } + var depths = undefined, + blockParams = templateSpec.useBlockParams ? [] : undefined; + if (templateSpec.useDepths) { + if (options.depths) { + depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths; + } else { + depths = [context]; + } + } + + function main(context /*, options*/) { + return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); + } + main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); + return main(context, options); + } + ret.isTop = true; + + ret._setup = function (options) { + if (!options.partial) { + container.helpers = container.merge(options.helpers, env.helpers); + + if (templateSpec.usePartial) { + container.partials = container.merge(options.partials, env.partials); + } + if (templateSpec.usePartial || templateSpec.useDecorators) { + container.decorators = container.merge(options.decorators, env.decorators); + } + } else { + container.helpers = options.helpers; + container.partials = options.partials; + container.decorators = options.decorators; + } + }; + + ret._child = function (i, data, blockParams, depths) { + if (templateSpec.useBlockParams && !blockParams) { + throw new _exception2['default']('must pass block params'); + } + if (templateSpec.useDepths && !depths) { + throw new _exception2['default']('must pass parent depths'); + } + + return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); + }; + return ret; + } + + function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { + function prog(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var currentDepths = depths; + if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { + currentDepths = [context].concat(depths); + } + + return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); + } + + prog = executeDecorators(fn, prog, container, depths, data, blockParams); + + prog.program = i; + prog.depth = depths ? depths.length : 0; + prog.blockParams = declaredBlockParams || 0; + return prog; + } + + function resolvePartial(partial, context, options) { + if (!partial) { + if (options.name === '@partial-block') { + partial = options.data['partial-block']; + } else { + partial = options.partials[options.name]; + } + } else if (!partial.call && !options.name) { + // This is a dynamic partial that returned a string + options.name = partial; + partial = options.partials[partial]; + } + return partial; + } + + function invokePartial(partial, context, options) { + // Use the current closure context to save the partial-block if this partial + var currentPartialBlock = options.data && options.data['partial-block']; + options.partial = true; + if (options.ids) { + options.data.contextPath = options.ids[0] || options.data.contextPath; + } + + var partialBlock = undefined; + if (options.fn && options.fn !== noop) { + (function () { + options.data = _base.createFrame(options.data); + // Wrapper function to get access to currentPartialBlock from the closure + var fn = options.fn; + partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + // Restore the partial-block from the closure for the execution of the block + // i.e. the part inside the block of the partial call. + options.data = _base.createFrame(options.data); + options.data['partial-block'] = currentPartialBlock; + return fn(context, options); + }; + if (fn.partials) { + options.partials = Utils.extend({}, options.partials, fn.partials); + } + })(); + } + + if (partial === undefined && partialBlock) { + partial = partialBlock; + } + + if (partial === undefined) { + throw new _exception2['default']('The partial ' + options.name + ' could not be found'); + } else if (partial instanceof Function) { + return partial(context, options); + } + } + + function noop() { + return ''; + } + + function initData(context, data) { + if (!data || !('root' in data)) { + data = data ? _base.createFrame(data) : {}; + data.root = context; + } + return data; + } + + function executeDecorators(fn, prog, container, depths, data, blockParams) { + if (fn.decorator) { + var props = {}; + prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); + Utils.extend(prog, props); + } + return prog; + } + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(23), __esModule: true }; + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + + __webpack_require__(24); + module.exports = __webpack_require__(29).Object.seal; + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + + // 19.1.2.17 Object.seal(O) + var isObject = __webpack_require__(25); + + __webpack_require__(26)('seal', function($seal){ + return function seal(it){ + return $seal && isObject(it) ? $seal(it) : it; + }; + }); + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + + module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(27) + , core = __webpack_require__(29) + , fails = __webpack_require__(32); + module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); + }; + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + + var global = __webpack_require__(28) + , core = __webpack_require__(29) + , ctx = __webpack_require__(30) + , PROTOTYPE = 'prototype'; + + var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , IS_WRAP = type & $export.W + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] + , key, own, out; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && key in target; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function(C){ + var F = function(param){ + return this instanceof C ? new C(param) : C(param); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; + } + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + module.exports = $export; + +/***/ }), +/* 28 */ +/***/ (function(module, exports) { + + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); + if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef + +/***/ }), +/* 29 */ +/***/ (function(module, exports) { + + var core = module.exports = {version: '1.2.6'}; + if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + + // optional / simple context binding + var aFunction = __webpack_require__(31); + module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; + }; + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + + module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; + }; + +/***/ }), +/* 32 */ +/***/ (function(module, exports) { + + module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } + }; + +/***/ }), +/* 33 */ +/***/ (function(module, exports) { + + /* WEBPACK VAR INJECTION */(function(global) {/* global window */ + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (Handlebars) { + /* istanbul ignore next */ + var root = typeof global !== 'undefined' ? global : window, + $Handlebars = root.Handlebars; + /* istanbul ignore next */ + Handlebars.noConflict = function () { + if (root.Handlebars === Handlebars) { + root.Handlebars = $Handlebars; + } + return Handlebars; + }; + }; + + module.exports = exports['default']; + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }) +/******/ ]) +}); +; \ No newline at end of file diff --git a/public/Pintura/templates/template.js b/public/Pintura/templates/template.js new file mode 100644 index 0000000..14a8178 --- /dev/null +++ b/public/Pintura/templates/template.js @@ -0,0 +1,2521 @@ +(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['cim2svg'] = template({"1":function(container,depth0,helpers,partials,data,blockParams,depths) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return " \n" + + ((stack1 = helpers["with"].call(alias1,(depth0 != null ? depth0.components : depth0),{"name":"with","hash":{},"fn":container.program(2, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"blockParams":blockParams})) != null ? stack1 : ""); +},"2":function(container,depth0,helpers,partials,data,blockParams,depths) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(3, data, 2, blockParams, depths),"inverse":container.noop,"data":data,"blockParams":blockParams})) != null ? stack1 : ""); +},"3":function(container,depth0,helpers,partials,data,blockParams,depths) { + var stack1; + + return " \n" + + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(4, data, 2, blockParams, depths),"inverse":container.noop,"data":data,"blockParams":blockParams})) != null ? stack1 : "") + + " \n"; +},"4":function(container,depth0,helpers,partials,data,blockParams,depths) { + var stack1, helper, options, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression, alias5=container.lambda, buffer = + " \n" + + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0["pintura:points"] : depth0),{"name":"each","hash":{},"fn":container.program(5, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"blockParams":blockParams})) != null ? stack1 : ""); + stack1 = ((helper = (helper = helpers["pintura:label"] || (depth0 != null ? depth0["pintura:label"] : depth0)) != null ? helper : alias2),(options={"name":"pintura:label","hash":{},"fn":container.program(7, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"blockParams":blockParams}),(typeof helper === alias3 ? helper.call(alias1,options) : helper)); + if (!helpers["pintura:label"]) { stack1 = helpers.blockHelperMissing.call(depth0,stack1,options)} + if (stack1 != null) { buffer += stack1; } + return buffer + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0["pintura:line"] : depth0),{"name":"each","hash":{},"fn":container.program(9, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"blockParams":blockParams})) != null ? stack1 : "") + + " \n"; +},"5":function(container,depth0,helpers,partials,data,blockParams,depths) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression, alias5=container.lambda; + + return " \n"; +},"7":function(container,depth0,helpers,partials,data,blockParams) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression, alias5=container.lambda; + + return " " + + alias4(((helper = (helper = helpers.text || (depth0 != null ? depth0.text : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"text","hash":{},"data":data,"blockParams":blockParams}) : helper))) + + "\n"; +},"9":function(container,depth0,helpers,partials,data,blockParams) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return " \n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.Diagram : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"blockParams":blockParams})) != null ? stack1 : "") + + "\n\n"; +},"useData":true,"useDepths":true,"useBlockParams":true}); +templates['pintura2html'] = template({"1":function(container,depth0,helpers,partials,data,blockParams) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}); + + return "
  • Components in Diagram: " + + container.escapeExpression(((helper = (helper = helpers["pintura:name"] || (depth0 != null ? depth0["pintura:name"] : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"pintura:name","hash":{},"data":data,"blockParams":blockParams}) : helper))) + + "
  • \n" + + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.components : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 2, blockParams),"inverse":container.noop,"data":data,"blockParams":blockParams})) != null ? stack1 : ""); +},"2":function(container,depth0,helpers,partials,data,blockParams) { + var stack1, alias1=container.lambda, alias2=container.escapeExpression; + + return " \n
    \n" + + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(3, data, 2, blockParams),"inverse":container.noop,"data":data,"blockParams":blockParams})) != null ? stack1 : "") + + "
    \n"; +},"3":function(container,depth0,helpers,partials,data,blockParams) { + var stack1, alias1=container.lambda, alias2=container.escapeExpression; + + return " \n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams) { + var stack1; + + return "
      \n" + + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.Diagram : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0, blockParams),"inverse":container.noop,"data":data,"blockParams":blockParams})) != null ? stack1 : "") + + "
    \n"; +},"useData":true,"useBlockParams":true}); +templates['ACDCTerminal'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "\n
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:ACDCTerminal.connected\n \n
    • \n
    • \n cim:ACDCTerminal.sequenceNumber\n \n
    • \n
    \n"; +},"useData":true}); +templates['ACLineSegment'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "\n
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:ACLineSegment.b0ch\n \n
    • \n
    • \n cim:ACLineSegment.bch\n \n
    • \n
    • \n cim:ACLineSegment.g0ch\n \n
    • \n
    • \n cim:ACLineSegment.gch\n \n
    • \n
    • \n cim:ACLineSegment.r\n \n
    • \n
    • \n cim:ACLineSegment.r0\n \n
    • \n
    • \n cim:ACLineSegment.shortCircuitEndTemperature\n \n
    • \n
    • \n cim:ACLineSegment.x\n \n
    • \n
    • \n cim:ACLineSegment.x0\n \n
    • \n
    • \n cim:ACLineSegment.Clamp\n \n
    • \n
    \n"; +},"useData":true}); +templates['ACLineSegmentPhase'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:ACLineSegmentPhase.phase\n \n
    • \n
    • \n cim:ACLineSegmentPhase.ACLineSegment\n \n
    • \n
    \n"; +},"useData":true}); +templates['AsynchronousMachine'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:AsynchronousMachine.asynchronousMachineType\n \n
    • \n
    • \n cim:AsynchronousMachine.converterFedDrive\n \n
    • \n
    • \n cim:AsynchronousMachine.efficiency\n \n
    • \n
    • \n cim:AsynchronousMachine.iaIrRatio\n \n
    • \n
    • \n cim:AsynchronousMachine.nominalFrequency\n \n
    • \n
    • \n cim:AsynchronousMachine.nominalSpeed\n \n
    • \n
    • \n cim:AsynchronousMachine.polePairNumber\n \n
    • \n
    • \n cim:AsynchronousMachine.ratedMechanicalPower\n \n
    • \n
    • \n cim:AsynchronousMachine.reversible\n \n
    • \n
    • \n cim:AsynchronousMachine.rr1\n \n
    • \n
    • \n cim:AsynchronousMachine.rr2\n \n
    • \n
    • \n cim:AsynchronousMachine.rxLockedRotorRatio\n \n
    • \n
    • \n cim:AsynchronousMachine.tpo\n \n
    • \n
    • \n cim:AsynchronousMachine.tppo\n \n
    • \n
    • \n cim:AsynchronousMachine.xlr1\n \n
    • \n
    • \n cim:AsynchronousMachine.xlr2\n \n
    • \n
    • \n cim:AsynchronousMachine.xm\n \n
    • \n
    • \n cim:AsynchronousMachine.xp\n \n
    • \n
    • \n cim:AsynchronousMachine.xpp\n \n
    • \n
    • \n cim:AsynchronousMachine.xs\n \n
    • \n
    \n"; +},"useData":true}); +templates['BaseFrequency'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:BaseFrequency.frequency\n \n
    • \n
    \n"; +},"useData":true}); +templates['BasePower'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:BasePower.basePower\n \n
    • \n
    \n"; +},"useData":true}); +templates['BaseVoltage'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:BaseVoltage.nominalVoltage\n \n
    • \n
    • \n cim:BaseVoltage.ConductingEquipment\n \n
    • \n
    \n"; +},"useData":true}); +templates['BasicIntervalSchedule'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:BasicIntervalSchedule.startTime\n \n
    • \n
    • \n cim:BasicIntervalSchedule.value1Multiplier\n \n
    • \n
    • \n cim:BasicIntervalSchedule.value1Unit\n \n
    • \n
    • \n cim:BasicIntervalSchedule.value2Multiplier\n \n
    • \n
    • \n cim:BasicIntervalSchedule.value2Unit\n \n
    • \n
    \n"; +},"useData":true}); +templates['Bay'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:Bay.bayEnergyMeasFlag\n \n
    • \n
    • \n cim:Bay.bayPowerMeasFlag\n \n
    • \n
    • \n cim:Bay.breakerConfiguration\n \n
    • \n
    • \n cim:Bay.busBarConfiguration\n \n
    • \n
    \n"; +},"useData":true}); +templates['Breaker'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:Breaker.inTransitTime\n \n
    • \n
    \n"; +},"useData":true}); +templates['BusbarSection'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:BusbarSection.ipMax\n \n
    • \n
    • \n cim:BusbarSection.VoltageControlZone\n \n
    • \n
    \n"; +},"useData":true}); +templates['BusNameMarker'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "\n
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:BusNameMarker.priority\n \n
    • \n
    • \n cim:BusNameMarker.ReportingGroup\n \n
    • \n
    • \n cim:BusNameMarker.Terminal\n \n
    • \n
    \n"; +},"useData":true}); +templates['Clamp'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:Clamp.lengthFromTerminal1\n \n
    • \n
    \n"; +},"useData":true}); +templates['CompositeSwitch'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:CompositeSwitch.compositeSwitchType\n \n
    • \n
    • \n cim:CompositeSwitch.Switches\n \n
    • \n
    \n"; +},"useData":true}); +templates['ConductingEquipment'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:ConductingEquipment.ProtectiveActionAdjustment\n \n
    • \n
    \n"; +},"useData":true}); +templates['Conductor'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:Conductor.length\n \n
    • \n
    \n"; +},"useData":true}); +templates['ConnectivityNodeContainer'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    \n"; +},"useData":true}); +templates['ConnectivityNode'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:ConnectivityNode.ConnectivityNodeContainer\n \n
    • \n
    \n"; +},"useData":true}); +templates['Connector'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    \n"; +},"useData":true}); +templates['Curve'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:Curve.curveStyle\n \n
    • \n
    • \n cim:Curve.xMultiplier\n \n
    • \n
    • \n cim:Curve.xUnit\n \n
    • \n
    • \n cim:Curve.y1Multiplier\n \n
    • \n
    • \n cim:Curve.y1Unit\n \n
    • \n
    • \n cim:Curve.y2Multiplier\n \n
    • \n
    • \n cim:Curve.y2Unit\n \n
    • \n
    • \n cim:Curve.y3Multiplier\n \n
    • \n
    • \n cim:Curve.y3Unit\n \n
    • \n
    • \n cim:Curve.CurveDatas\n \n
    • \n
    \n"; +},"useData":true}); +templates['Cut'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:Cut.lengthFromTerminal1\n \n
    • \n
    • \n cim:Cut.ACLineSegment\n \n
    • \n
    \n"; +},"useData":true}); +templates['DCTopologicalNode'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    \n"; +},"useData":true}); +templates['Disconnector'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    \n"; +},"useData":true}); +templates['EarthFaultCompensator'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:EarthFaultCompensator.r\n \n
    • \n
    \n"; +},"useData":true}); +templates['EnergyConsumer'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:EnergyConsumer.customerCount\n \n
    • \n
    • \n cim:EnergyConsumer.grounded\n \n
    • \n
    • \n cim:EnergyConsumer.p\n \n
    • \n
    • \n cim:EnergyConsumer.pfixed\n \n
    • \n
    • \n cim:EnergyConsumer.pfixedPct\n \n
    • \n
    • \n cim:EnergyConsumer.phaseConnection\n \n
    • \n
    • \n cim:EnergyConsumer.q\n \n
    • \n
    • \n cim:EnergyConsumer.qfixed\n \n
    • \n
    • \n cim:EnergyConsumer.qfixedPct\n \n
    • \n
    • \n cim:EnergyConsumer.LoadResponse\n \n
    • \n
    • \n cim:EnergyConsumer.EnergyConsumerPhase\n \n
    • \n
    \n"; +},"useData":true}); +templates['EnergyConsumerPhase'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:EnergyConsumerPhase.pfixed\n \n
    • \n
    • \n cim:EnergyConsumerPhase.pfixedPct\n \n
    • \n
    • \n cim:EnergyConsumerPhase.phase\n \n
    • \n
    • \n cim:EnergyConsumerPhase.qfixed\n \n
    • \n
    • \n cim:EnergyConsumerPhase.qfixedPct\n \n
    • \n
    \n"; +},"useData":true}); +templates['EnergySource'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:EnergySource.activePower\n \n
    • \n
    • \n cim:EnergySource.nominalVoltage\n \n
    • \n
    • \n cim:EnergySource.r\n \n
    • \n
    • \n cim:EnergySource.r0\n \n
    • \n
    • \n cim:EnergySource.reactivePower\n \n
    • \n
    • \n cim:EnergySource.rn\n \n
    • \n
    • \n cim:EnergySource.voltageAngle\n \n
    • \n
    • \n cim:EnergySource.voltageMagnitude\n \n
    • \n
    • \n cim:EnergySource.x\n \n
    • \n
    • \n cim:EnergySource.x0\n \n
    • \n
    • \n cim:EnergySource.xn\n \n
    • \n
    • \n cim:EnergySource.EnergySchedulingType\n \n
    • \n
    \n"; +},"useData":true}); +templates['EquipmentContainer'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
    • \n cim:IdentifiedObject.name\n \n
    • \n
    • \n cim:EquipmentContainer.Equipments\n \n
    • \n
    \n"; +},"useData":true}); +templates['Equipment'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
      \n
        \n
      • \n cim:IdentifiedObject.name\n \n
      • \n
      • \n cim:Equipment.aggregate\n \n
      • \n
      • \n cim:Equipment.normallyInService\n \n
      • \n
      • \n cim:Equipment.WeatherStation\n \n
      • \n
      \n"; +},"useData":true}); +templates['ExternalNetworkInjection'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
        \n
      • \n cim:IdentifiedObject.name\n \n
      • \n
      • \n cim:ExternalNetworkInjection.governorSCD\n \n
      • \n
      • \n cim:ExternalNetworkInjection.ikSecond\n \n
      • \n
      • \n cim:ExternalNetworkInjection.maxInitialSymShCCurrent\n \n
      • \n
      • \n cim:ExternalNetworkInjection.maxP\n \n
      • \n
      • \n cim:ExternalNetworkInjection.maxQ\n \n
      • \n
      • \n cim:ExternalNetworkInjection.maxR0ToX0Ratio\n \n
      • \n
      • \n cim:ExternalNetworkInjection.maxR1ToX1Ratio\n \n
      • \n
      • \n cim:ExternalNetworkInjection.maxZ0ToZ1Ratio\n \n
      • \n
      • \n cim:ExternalNetworkInjection.minInitialSymShCCurrent\n \n
      • \n
      • \n cim:ExternalNetworkInjection.minP\n \n
      • \n
      • \n cim:ExternalNetworkInjection.minQ\n \n
      • \n
      • \n cim:ExternalNetworkInjection.minR0ToX0Ratio\n \n
      • \n
      • \n cim:ExternalNetworkInjection.minR1ToX1Ratio\n \n
      • \n
      • \n cim:ExternalNetworkInjection.minZ0ToZ1Ratio\n \n
      • \n
      • \n cim:ExternalNetworkInjection.p\n \n
      • \n
      • \n cim:ExternalNetworkInjection.q\n \n
      • \n
      • \n cim:ExternalNetworkInjection.referencePriority\n \n
      • \n
      • \n cim:ExternalNetworkInjection.voltageFactor\n \n
      • \n
      \n"; +},"useData":true}); +templates['FrequencyConverter'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
        \n
      • \n cim:IdentifiedObject.name\n \n
      • \n
      • \n cim:FrequencyConverter.frequency\n \n
      • \n
      • \n cim:FrequencyConverter.maxP\n \n
      • \n
      • \n cim:FrequencyConverter.maxU\n \n
      • \n
      • \n cim:FrequencyConverter.minP\n \n
      • \n
      • \n cim:FrequencyConverter.minU\n \n
      • \n
      \n"; +},"useData":true}); +templates['Fuse'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
        \n
      • \n cim:IdentifiedObject.name\n \n
      • \n
      \n"; +},"useData":true}); +templates['GeographicalRegion'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
        \n
      • \n cim:IdentifiedObject.name\n \n
      • \n
      • \n cim:GeographicalRegion.Regions\n \n
      • \n
      \n"; +},"useData":true}); +templates['GroundDisconnector'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
        \n
      • \n cim:IdentifiedObject.name\n \n
      • \n
      \n"; +},"useData":true}); +templates['Ground'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
        \n
      • \n cim:IdentifiedObject.name\n \n
      • \n
      \n"; +},"useData":true}); +templates['GroundingImpedance'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
        \n
      • \n cim:IdentifiedObject.name\n \n
      • \n
      • \n cim:GroundingImpedance.x\n \n
      • \n
      \n"; +},"useData":true}); +templates['IrregularIntervalSchedule'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
        \n
          \n
        • \n cim:IdentifiedObject.name\n \n
        • \n
        • \n cim:IrregularIntervalSchedule.TimePoints\n \n
        • \n
        \n"; +},"useData":true}); +templates['Jumper'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
          \n
        • \n cim:IdentifiedObject.name\n \n
        • \n
        \n"; +},"useData":true}); +templates['Junction'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
          \n
        • \n cim:IdentifiedObject.name\n \n
        • \n
        \n"; +},"useData":true}); +templates['LinearShuntCompensator'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
          \n
        • \n cim:IdentifiedObject.name\n \n
        • \n
        • \n cim:LinearShuntCompensator.b0PerSection\n \n
        • \n
        • \n cim:LinearShuntCompensator.bPerSection\n \n
        • \n
        • \n cim:LinearShuntCompensator.g0PerSection\n \n
        • \n
        • \n cim:LinearShuntCompensator.gPerSection\n \n
        • \n
        \n"; +},"useData":true}); +templates['LinearShuntCompensatorPhase'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
          \n
        • \n cim:IdentifiedObject.name\n \n
        • \n
        • \n cim:LinearShuntCompensatorPhase.bPerSection\n \n
        • \n
        • \n cim:LinearShuntCompensatorPhase.gPerSection\n \n
        • \n
        \n"; +},"useData":true}); +templates['Line'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
          \n
        • \n cim:IdentifiedObject.name\n \n
        • \n
        \n"; +},"useData":true}); +templates['LoadBreakSwitch'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
          \n
        • \n cim:IdentifiedObject.name\n \n
        • \n
        \n"; +},"useData":true}); +templates['MutualCoupling'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
          \n
        • \n cim:IdentifiedObject.name\n \n
        • \n
        • \n cim:MutualCoupling.b0ch\n \n
        • \n
        • \n cim:MutualCoupling.distance11\n \n
        • \n
        • \n cim:MutualCoupling.distance12\n \n
        • \n
        • \n cim:MutualCoupling.distance21\n \n
        • \n
        • \n cim:MutualCoupling.distance22\n \n
        • \n
        • \n cim:MutualCoupling.g0ch\n \n
        • \n
        • \n cim:MutualCoupling.r0\n \n
        • \n
        • \n cim:MutualCoupling.x0\n \n
        • \n
        • \n cim:MutualCoupling.First_Terminal\n \n
        • \n
        • \n cim:MutualCoupling.Second_Terminal\n \n
        • \n
        \n"; +},"useData":true}); +templates['NonlinearShuntCompensator'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
          \n
        • \n cim:IdentifiedObject.name\n \n
        • \n
        • \n cim:NonlinearShuntCompensator.NonlinearShuntCompensatorPoints\n \n
        • \n
        \n"; +},"useData":true}); +templates['NonlinearShuntCompensatorPhase'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
          \n
        • \n cim:IdentifiedObject.name\n \n
        • \n
        • \n cim:NonlinearShuntCompensatorPhase.NonlinearShuntCompensatorPhasePoints\n \n
        • \n
        \n"; +},"useData":true}); +templates['OperatingParticipant'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
          \n
            \n
              \n
                \n
                  \n
                • \n cim:IdentifiedObject.name\n \n
                • \n
                \n"; +},"useData":true}); +templates['PerLengthImpedance'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                  \n
                    \n
                      \n
                    • \n cim:IdentifiedObject.name\n \n
                    • \n
                    • \n cim:PerLengthImpedance.ACLineSegments\n \n
                    • \n
                    \n"; +},"useData":true}); +templates['PerLengthLineParameter'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                      \n
                    • \n cim:IdentifiedObject.name\n \n
                    • \n
                    \n"; +},"useData":true}); +templates['PerLengthPhaseImpedance'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                      \n
                    • \n cim:IdentifiedObject.name\n \n
                    • \n
                    • \n cim:PerLengthPhaseImpedance.conductorCount\n \n
                    • \n
                    • \n cim:PerLengthPhaseImpedance.PhaseImpedanceData\n \n
                    • \n
                    \n"; +},"useData":true}); +templates['PerLengthSequenceImpedance'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                      \n
                    • \n cim:IdentifiedObject.name\n \n
                    • \n
                    • \n cim:PerLengthSequenceImpedance.b0ch\n \n
                    • \n
                    • \n cim:PerLengthSequenceImpedance.bch\n \n
                    • \n
                    • \n cim:PerLengthSequenceImpedance.g0ch\n \n
                    • \n
                    • \n cim:PerLengthSequenceImpedance.gch\n \n
                    • \n
                    • \n cim:PerLengthSequenceImpedance.r\n \n
                    • \n
                    • \n cim:PerLengthSequenceImpedance.r0\n \n
                    • \n
                    • \n cim:PerLengthSequenceImpedance.x\n \n
                    • \n
                    • \n cim:PerLengthSequenceImpedance.x0\n \n
                    • \n
                    \n"; +},"useData":true}); +templates['PetersenCoil'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                      \n
                    • \n cim:IdentifiedObject.name\n \n
                    • \n
                    • \n cim:PetersenCoil.mode\n \n
                    • \n
                    • \n cim:PetersenCoil.nominalU\n \n
                    • \n
                    • \n cim:PetersenCoil.offsetCurrent\n \n
                    • \n
                    • \n cim:PetersenCoil.positionCurrent\n \n
                    • \n
                    • \n cim:PetersenCoil.xGroundMax\n \n
                    • \n
                    • \n cim:PetersenCoil.xGroundMin\n \n
                    • \n
                    • \n cim:PetersenCoil.xGroundNominal\n \n
                    • \n
                    \n"; +},"useData":true}); +templates['PhaseTapChangerAsymmetrical'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                      \n
                    • \n cim:IdentifiedObject.name\n \n
                    • \n
                    • \n cim:PhaseTapChangerAsymmetrical.windingConnectionAngle\n \n
                    • \n
                    \n"; +},"useData":true}); +templates['PhaseTapChanger'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                      \n
                        \n
                      • \n cim:IdentifiedObject.name\n \n
                      • \n
                      \n"; +},"useData":true}); +templates['PhaseTapChangerLinear'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                        \n
                      • \n cim:IdentifiedObject.name\n \n
                      • \n
                      • \n cim:PhaseTapChangerLinear.stepPhaseShiftIncrement\n \n
                      • \n
                      • \n cim:PhaseTapChangerLinear.xMax\n \n
                      • \n
                      • \n cim:PhaseTapChangerLinear.xMin\n \n
                      • \n
                      \n"; +},"useData":true}); +templates['PhaseTapChangerNonLinear'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                        \n
                      • \n cim:IdentifiedObject.name\n \n
                      • \n
                      • \n cim:PhaseTapChangerNonLinear.voltageStepIncrement\n \n
                      • \n
                      • \n cim:PhaseTapChangerNonLinear.xMax\n \n
                      • \n
                      • \n cim:PhaseTapChangerNonLinear.xMin\n \n
                      • \n
                      \n"; +},"useData":true}); +templates['PhaseTapChangerSymmetrical'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                        \n
                      • \n cim:IdentifiedObject.name\n \n
                      • \n
                      \n"; +},"useData":true}); +templates['PhaseTapChangerTable'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                        \n
                      • \n cim:IdentifiedObject.name\n \n
                      • \n
                      • \n cim:PhaseTapChangerTable.PhaseTapChangerTabular\n \n
                      • \n
                      \n"; +},"useData":true}); +templates['PhaseTapChangerTablePoint'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                        \n
                      • \n cim:IdentifiedObject.name\n \n
                      • \n
                      • \n cim:PhaseTapChangerTablePoint.angle\n \n
                      • \n
                      • \n cim:PhaseTapChangerTablePoint.PhaseTapChangerTable\n \n
                      • \n
                      \n"; +},"useData":true}); +templates['PhaseTapChangerTabular'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                        \n
                      • \n cim:IdentifiedObject.name\n \n
                      • \n
                      \n"; +},"useData":true}); +templates['Plant'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                        \n
                      • \n cim:IdentifiedObject.name\n \n
                      • \n
                      \n"; +},"useData":true}); +templates['PowerSystemResource'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                        \n
                      • \n cim:IdentifiedObject.name\n \n
                      • \n
                      • \n cim:PowerSystemResource.Controls\n \n
                      • \n
                      • \n cim:PowerSystemResource.Measurements\n \n
                      • \n
                      • \n cim:PowerSystemResource.PSRType\n \n
                      • \n
                      \n"; +},"useData":true}); +templates['PowerTransformerEnd'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                        \n
                      • \n cim:IdentifiedObject.name\n \n
                      • \n
                      • \n cim:PowerTransformerEnd.b\n \n
                      • \n
                      • \n cim:PowerTransformerEnd.b0\n \n
                      • \n
                      • \n cim:PowerTransformerEnd.connectionKind\n \n
                      • \n
                      • \n cim:PowerTransformerEnd.g\n \n
                      • \n
                      • \n cim:PowerTransformerEnd.g0\n \n
                      • \n
                      • \n cim:PowerTransformerEnd.phaseAngleClock\n \n
                      • \n
                      • \n cim:PowerTransformerEnd.r\n \n
                      • \n
                      • \n cim:PowerTransformerEnd.r0\n \n
                      • \n
                      • \n cim:PowerTransformerEnd.ratedS\n \n
                      • \n
                      • \n cim:PowerTransformerEnd.ratedU\n \n
                      • \n
                      • \n cim:PowerTransformerEnd.x\n \n
                      • \n
                      • \n cim:PowerTransformerEnd.x0\n \n
                      • \n
                      \n"; +},"useData":true}); +templates['PowerTransformer'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                        \n
                      • \n cim:IdentifiedObject.name\n \n
                      • \n
                      • \n cim:PowerTransformer.beforeShCircuitHighestOperatingCurrent\n \n
                      • \n
                      • \n cim:PowerTransformer.beforeShCircuitHighestOperatingVoltage\n \n
                      • \n
                      • \n cim:PowerTransformer.beforeShortCircuitAnglePf\n \n
                      • \n
                      • \n cim:PowerTransformer.highSideMinOperatingU\n \n
                      • \n
                      • \n cim:PowerTransformer.isPartOfGeneratorUnit\n \n
                      • \n
                      • \n cim:PowerTransformer.operationalValuesConsidered\n \n
                      • \n
                      • \n cim:PowerTransformer.vectorGroup\n \n
                      • \n
                      • \n cim:PowerTransformer.PowerTransformerEnd\n \n
                      • \n
                      \n"; +},"useData":true}); +templates['ProtectedSwitch'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                        \n
                      • \n cim:IdentifiedObject.name\n \n
                      • \n
                      • \n cim:ProtectedSwitch.breakingCapacity\n \n
                      • \n
                      \n"; +},"useData":true}); +templates['PSRType'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                        \n
                          \n
                        • \n cim:IdentifiedObject.name\n \n
                        • \n
                        \n"; +},"useData":true}); +templates['RatioTapChanger'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                          \n
                        • \n cim:IdentifiedObject.name\n \n
                        • \n
                        • \n cim:RatioTapChanger.stepVoltageIncrement\n \n
                        • \n
                        • \n cim:RatioTapChanger.tculControlMode\n \n
                        • \n
                        • \n cim:RatioTapChanger.RatioTapChangerTable\n \n
                        • \n
                        \n"; +},"useData":true}); +templates['RatioTapChangerTable'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                          \n
                        • \n cim:IdentifiedObject.name\n \n
                        • \n
                        \n"; +},"useData":true}); +templates['RatioTapChangerTablePoint'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                          \n
                        • \n cim:IdentifiedObject.name\n \n
                        • \n
                        • \n cim:RatioTapChangerTablePoint.RatioTapChangerTable\n \n
                        • \n
                        \n"; +},"useData":true}); +templates['ReactiveCapabilityCurve'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                          \n
                        • \n cim:IdentifiedObject.name\n \n
                        • \n
                        • \n cim:ReactiveCapabilityCurve.coolantTemperature\n \n
                        • \n
                        • \n cim:ReactiveCapabilityCurve.hydrogenPressure\n \n
                        • \n
                        • \n cim:ReactiveCapabilityCurve.EquivalentInjection\n \n
                        • \n
                        • \n cim:ReactiveCapabilityCurve.InitiallyUsedBySynchronousMachines\n \n
                        • \n
                        • \n cim:ReactiveCapabilityCurve.SynchronousMachines\n \n
                        • \n
                        \n"; +},"useData":true}); +templates['Recloser'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                          \n
                        • \n cim:IdentifiedObject.name\n \n
                        • \n
                        \n"; +},"useData":true}); +templates['RegularIntervalSchedule'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                          \n
                        • \n cim:IdentifiedObject.name\n \n
                        • \n
                        • \n cim:RegularIntervalSchedule.endTime\n \n
                        • \n
                        • \n cim:RegularIntervalSchedule.timeStep\n \n
                        • \n
                        • \n cim:RegularIntervalSchedule.TimePoints\n \n
                        • \n
                        \n"; +},"useData":true}); +templates['RegulatingCondEq'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                          \n
                        • \n cim:IdentifiedObject.name\n \n
                        • \n
                        • \n cim:RegulatingCondEq.controlEnabled\n \n
                        • \n
                        • \n cim:RegulatingCondEq.RegulatingControl\n \n
                        • \n
                        \n"; +},"useData":true}); +templates['RegulatingControl'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                          \n
                        • \n cim:IdentifiedObject.name\n \n
                        • \n
                        • \n cim:RegulatingControl.discrete\n \n
                        • \n
                        • \n cim:RegulatingControl.enabled\n \n
                        • \n
                        • \n cim:RegulatingControl.mode\n \n
                        • \n
                        • \n cim:RegulatingControl.monitoredPhase\n \n
                        • \n
                        • \n cim:RegulatingControl.targetDeadband\n \n
                        • \n
                        • \n cim:RegulatingControl.targetValue\n \n
                        • \n
                        • \n cim:RegulatingControl.targetValueUnitMultiplier\n \n
                        • \n
                        \n"; +},"useData":true}); +templates['RegulationSchedule'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                          \n
                        • \n cim:IdentifiedObject.name\n \n
                        • \n
                        • \n cim:RegulationSchedule.RegulatingControl\n \n
                        • \n
                        • \n cim:RegulationSchedule.VoltageControlZones\n \n
                        • \n
                        \n"; +},"useData":true}); +templates['ReportingSuperGroup'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                          \n
                            \n
                          • \n cim:IdentifiedObject.name\n \n
                          • \n
                          • \n cim:ReportingSuperGroup.ReportingGroup\n \n
                          • \n
                          • \n cim:ReportingSuperGroup.ReportingGroup\n \n
                          • \n
                          \n"; +},"useData":true}); +templates['RotatingMachine'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                            \n
                          • \n cim:IdentifiedObject.name\n \n
                          • \n
                          • \n cim:RotatingMachine.p\n \n
                          • \n
                          • \n cim:RotatingMachine.q\n \n
                          • \n
                          • \n cim:RotatingMachine.ratedPowerFactor\n \n
                          • \n
                          • \n cim:RotatingMachine.ratedS\n \n
                          • \n
                          • \n cim:RotatingMachine.ratedU\n \n
                          • \n
                          • \n cim:RotatingMachine.HydroPump\n \n
                          • \n
                          \n"; +},"useData":true}); +templates['Sectionaliser'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                            \n
                          • \n cim:IdentifiedObject.name\n \n
                          • \n
                          \n"; +},"useData":true}); +templates['SeriesCompensator'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                            \n
                          • \n cim:IdentifiedObject.name\n \n
                          • \n
                          • \n cim:SeriesCompensator.r\n \n
                          • \n
                          • \n cim:SeriesCompensator.r0\n \n
                          • \n
                          • \n cim:SeriesCompensator.varistorPresent\n \n
                          • \n
                          • \n cim:SeriesCompensator.varistorRatedCurrent\n \n
                          • \n
                          • \n cim:SeriesCompensator.varistorVoltageThreshold\n \n
                          • \n
                          • \n cim:SeriesCompensator.x\n \n
                          • \n
                          • \n cim:SeriesCompensator.x0\n \n
                          • \n
                          \n"; +},"useData":true}); +templates['ShuntCompensator'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                            \n
                          • \n cim:IdentifiedObject.name\n \n
                          • \n
                          • \n cim:ShuntCompensator.aVRDelay\n \n
                          • \n
                          • \n cim:ShuntCompensator.grounded\n \n
                          • \n
                          • \n cim:ShuntCompensator.maximumSections\n \n
                          • \n
                          • \n cim:ShuntCompensator.nomU\n \n
                          • \n
                          • \n cim:ShuntCompensator.normalSections\n \n
                          • \n
                          • \n cim:ShuntCompensator.phaseConnection\n \n
                          • \n
                          • \n cim:ShuntCompensator.sections\n \n
                          • \n
                          • \n cim:ShuntCompensator.switchOnCount\n \n
                          • \n
                          • \n cim:ShuntCompensator.switchOnDate\n \n
                          • \n
                          • \n cim:ShuntCompensator.voltageSensitivity\n \n
                          • \n
                          • \n cim:ShuntCompensator.ShuntCompensatorPhase\n \n
                          • \n
                          \n"; +},"useData":true}); +templates['ShuntCompensatorPhase'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                            \n
                          • \n cim:IdentifiedObject.name\n \n
                          • \n
                          • \n cim:ShuntCompensatorPhase.maximumSections\n \n
                          • \n
                          • \n cim:ShuntCompensatorPhase.normalSections\n \n
                          • \n
                          • \n cim:ShuntCompensatorPhase.phase\n \n
                          • \n
                          \n"; +},"useData":true}); +templates['StaticVarCompensator'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                            \n
                          • \n cim:IdentifiedObject.name\n \n
                          • \n
                          • \n cim:StaticVarCompensator.capacitiveRating\n \n
                          • \n
                          • \n cim:StaticVarCompensator.inductiveRating\n \n
                          • \n
                          • \n cim:StaticVarCompensator.q\n \n
                          • \n
                          • \n cim:StaticVarCompensator.slope\n \n
                          • \n
                          • \n cim:StaticVarCompensator.sVCControlMode\n \n
                          • \n
                          • \n cim:StaticVarCompensator.voltageSetPoint\n \n
                          • \n
                          \n"; +},"useData":true}); +templates['SubGeographicalRegion'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                            \n
                          • \n cim:IdentifiedObject.name\n \n
                          • \n
                          • \n cim:SubGeographicalRegion.Lines\n \n
                          • \n
                          • \n cim:SubGeographicalRegion.Substations\n \n
                          • \n
                          \n"; +},"useData":true}); +templates['Substation'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                            \n
                          • \n cim:IdentifiedObject.name\n \n
                          • \n
                          • \n cim:Substation.VoltageLevels\n \n
                          • \n
                          • \n cim:Substation.Bays\n \n
                          • \n
                          • \n cim:Substation.DCConverterUnit\n \n
                          • \n
                          \n"; +},"useData":true}); +templates['Switch'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                            \n
                          • \n cim:IdentifiedObject.name\n \n
                          • \n
                          • \n cim:Switch.normalOpen\n \n
                          • \n
                          • \n cim:Switch.open\n \n
                          • \n
                          • \n cim:Switch.ratedCurrent\n \n
                          • \n
                          • \n cim:Switch.retained\n \n
                          • \n
                          • \n cim:Switch.switchOnCount\n \n
                          • \n
                          • \n cim:Switch.switchOnDate\n \n
                          • \n
                          • \n cim:Switch.SwitchPhase\n \n
                          • \n
                          • \n cim:Switch.SwitchSchedules\n \n
                          • \n
                          \n"; +},"useData":true}); +templates['SwitchPhase'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                            \n
                          • \n cim:IdentifiedObject.name\n \n
                          • \n
                          • \n cim:SwitchPhase.closed\n \n
                          • \n
                          • \n cim:SwitchPhase.normalOpen\n \n
                          • \n
                          • \n cim:SwitchPhase.phaseSide1\n \n
                          • \n
                          • \n cim:SwitchPhase.phaseSide2\n \n
                          • \n
                          \n"; +},"useData":true}); +templates['SwitchSchedule'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                            \n
                          • \n cim:IdentifiedObject.name\n \n
                          • \n
                          \n"; +},"useData":true}); +templates['SynchronousMachine'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                            \n
                          • \n cim:IdentifiedObject.name\n \n
                          • \n
                          • \n cim:SynchronousMachine.aVRToManualLag\n \n
                          • \n
                          • \n cim:SynchronousMachine.aVRToManualLead\n \n
                          • \n
                          • \n cim:SynchronousMachine.baseQ\n \n
                          • \n
                          • \n cim:SynchronousMachine.condenserP\n \n
                          • \n
                          • \n cim:SynchronousMachine.coolantCondition\n \n
                          • \n
                          • \n cim:SynchronousMachine.coolantType\n \n
                          • \n
                          • \n cim:SynchronousMachine.earthing\n \n
                          • \n
                          • \n cim:SynchronousMachine.earthingStarPointR\n \n
                          • \n
                          • \n cim:SynchronousMachine.earthingStarPointX\n \n
                          • \n
                          • \n cim:SynchronousMachine.ikk\n \n
                          • \n
                          • \n cim:SynchronousMachine.manualToAVR\n \n
                          • \n
                          • \n cim:SynchronousMachine.maxQ\n \n
                          • \n
                          • \n cim:SynchronousMachine.maxU\n \n
                          • \n
                          • \n cim:SynchronousMachine.minQ\n \n
                          • \n
                          • \n cim:SynchronousMachine.minU\n \n
                          • \n
                          • \n cim:SynchronousMachine.mu\n \n
                          • \n
                          • \n cim:SynchronousMachine.operatingMode\n \n
                          • \n
                          • \n cim:SynchronousMachine.qPercent\n \n
                          • \n
                          • \n cim:SynchronousMachine.r\n \n
                          • \n
                          • \n cim:SynchronousMachine.r0\n \n
                          • \n
                          • \n cim:SynchronousMachine.r2\n \n
                          • \n
                          • \n cim:SynchronousMachine.referencePriority\n \n
                          • \n
                          • \n cim:SynchronousMachine.satDirectSubtransX\n \n
                          • \n
                          • \n cim:SynchronousMachine.satDirectSyncX\n \n
                          • \n
                          • \n cim:SynchronousMachine.satDirectTransX\n \n
                          • \n
                          • \n cim:SynchronousMachine.shortCircuitRotorType\n \n
                          • \n
                          • \n cim:SynchronousMachine.type\n \n
                          • \n
                          • \n cim:SynchronousMachine.voltageRegulationRange\n \n
                          • \n
                          • \n cim:SynchronousMachine.x0\n \n
                          • \n
                          • \n cim:SynchronousMachine.x2\n \n
                          • \n
                          \n"; +},"useData":true}); +templates['TapChangerControl'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                            \n
                          • \n cim:IdentifiedObject.name\n \n
                          • \n
                          • \n cim:TapChangerControl.limitVoltage\n \n
                          • \n
                          • \n cim:TapChangerControl.lineDropCompensation\n \n
                          • \n
                          • \n cim:TapChangerControl.lineDropR\n \n
                          • \n
                          • \n cim:TapChangerControl.lineDropX\n \n
                          • \n
                          • \n cim:TapChangerControl.reverseLineDropR\n \n
                          • \n
                          • \n cim:TapChangerControl.reverseLineDropX\n \n
                          • \n
                          \n"; +},"useData":true}); +templates['TapChanger'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                            \n
                          • \n cim:IdentifiedObject.name\n \n
                          • \n
                          • \n cim:TapChanger.controlEnabled\n \n
                          • \n
                          • \n cim:TapChanger.highStep\n \n
                          • \n
                          • \n cim:TapChanger.initialDelay\n \n
                          • \n
                          • \n cim:TapChanger.lowStep\n \n
                          • \n
                          • \n cim:TapChanger.ltcFlag\n \n
                          • \n
                          • \n cim:TapChanger.neutralStep\n \n
                          • \n
                          • \n cim:TapChanger.neutralU\n \n
                          • \n
                          • \n cim:TapChanger.normalStep\n \n
                          • \n
                          • \n cim:TapChanger.step\n \n
                          • \n
                          • \n cim:TapChanger.subsequentDelay\n \n
                          • \n
                          • \n cim:TapChanger.TapChangerControl\n \n
                          • \n
                          \n"; +},"useData":true}); +templates['TapSchedule'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                            \n
                              \n
                            • \n cim:IdentifiedObject.name\n \n
                            • \n
                            • \n cim:TapSchedule.TapChanger\n \n
                            • \n
                            \n"; +},"useData":true}); +templates['Terminal'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                              \n
                            • \n cim:IdentifiedObject.name\n \n
                            • \n
                            • \n cim:Terminal.phases\n \n
                            • \n
                            • \n cim:Terminal.ConnectivityNode\n \n
                            • \n
                            • \n cim:Terminal.ConductingEquipment\n \n
                            • \n
                            • \n cim:Terminal.RegulatingControl\n \n
                            • \n
                            \n"; +},"useData":true}); +templates['TopologicalIsland'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                              \n
                            • \n cim:IdentifiedObject.name\n \n
                            • \n
                            • \n cim:TopologicalIsland.TopologicalNodes\n \n
                            • \n
                            • \n cim:TopologicalIsland.AngleRefTopologicalNode\n \n
                            • \n
                            \n"; +},"useData":true}); +templates['TopologicalNode'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                              \n
                            • \n cim:IdentifiedObject.name\n \n
                            • \n
                            • \n cim:TopologicalNode.pInjection\n \n
                            • \n
                            • \n cim:TopologicalNode.qInjection\n \n
                            • \n
                            • \n cim:TopologicalNode.ReportingGroup\n \n
                            • \n
                            • \n cim:TopologicalNode.ConnectivityNodeContainer\n \n
                            • \n
                            • \n cim:TopologicalNode.BaseVoltage\n \n
                            • \n
                            \n"; +},"useData":true}); +templates['TransformerCoreAdmittance'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                              \n
                            • \n cim:IdentifiedObject.name\n \n
                            • \n
                            • \n cim:TransformerCoreAdmittance.b\n \n
                            • \n
                            • \n cim:TransformerCoreAdmittance.b0\n \n
                            • \n
                            • \n cim:TransformerCoreAdmittance.g\n \n
                            • \n
                            • \n cim:TransformerCoreAdmittance.g0\n \n
                            • \n
                            • \n cim:TransformerCoreAdmittance.TransformerEnd\n \n
                            • \n
                            \n"; +},"useData":true}); +templates['TransformerEnd'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                              \n
                            • \n cim:IdentifiedObject.name\n \n
                            • \n
                            • \n cim:TransformerEnd.bmagSat\n \n
                            • \n
                            • \n cim:TransformerEnd.endNumber\n \n
                            • \n
                            • \n cim:TransformerEnd.grounded\n \n
                            • \n
                            • \n cim:TransformerEnd.magBaseU\n \n
                            • \n
                            • \n cim:TransformerEnd.magSatFlux\n \n
                            • \n
                            • \n cim:TransformerEnd.rground\n \n
                            • \n
                            • \n cim:TransformerEnd.xground\n \n
                            • \n
                            • \n cim:TransformerEnd.PhaseTapChanger\n \n
                            • \n
                            • \n cim:TransformerEnd.StarImpedance\n \n
                            • \n
                            • \n cim:TransformerEnd.RatioTapChanger\n \n
                            • \n
                            • \n cim:TransformerEnd.BaseVoltage\n \n
                            • \n
                            • \n cim:TransformerEnd.Terminal\n \n
                            • \n
                            \n"; +},"useData":true}); +templates['TransformerMeshImpedance'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                              \n
                            • \n cim:IdentifiedObject.name\n \n
                            • \n
                            • \n cim:TransformerMeshImpedance.r\n \n
                            • \n
                            • \n cim:TransformerMeshImpedance.r0\n \n
                            • \n
                            • \n cim:TransformerMeshImpedance.x\n \n
                            • \n
                            • \n cim:TransformerMeshImpedance.x0\n \n
                            • \n
                            • \n cim:TransformerMeshImpedance.ToTransformerEnd\n \n
                            • \n
                            • \n cim:TransformerMeshImpedance.FromTransformerEnd\n \n
                            • \n
                            \n"; +},"useData":true}); +templates['TransformerStarImpedance'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                              \n
                            • \n cim:IdentifiedObject.name\n \n
                            • \n
                            • \n cim:TransformerStarImpedance.r\n \n
                            • \n
                            • \n cim:TransformerStarImpedance.r0\n \n
                            • \n
                            • \n cim:TransformerStarImpedance.x\n \n
                            • \n
                            • \n cim:TransformerStarImpedance.x0\n \n
                            • \n
                            \n"; +},"useData":true}); +templates['TransformerTankEnd'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                              \n
                            • \n cim:IdentifiedObject.name\n \n
                            • \n
                            • \n cim:TransformerTankEnd.phases\n \n
                            • \n
                            • \n cim:TransformerTankEnd.TransformerTank\n \n
                            • \n
                            \n"; +},"useData":true}); +templates['TransformerTank'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                              \n
                            • \n cim:IdentifiedObject.name\n \n
                            • \n
                            • \n cim:TransformerTank.PowerTransformer\n \n
                            • \n
                            \n"; +},"useData":true}); +templates['VoltageControlZone'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                              \n
                            • \n cim:IdentifiedObject.name\n \n
                            • \n
                            \n"; +},"useData":true}); +templates['VoltageLevel'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
                              \n
                            • \n cim:IdentifiedObject.name\n \n
                            • \n
                            • \n cim:VoltageLevel.highVoltageLimit\n \n
                            • \n
                            • \n cim:VoltageLevel.lowVoltageLimit\n \n
                            • \n
                            • \n cim:VoltageLevel.Bays\n \n
                            • \n
                            • \n cim:VoltageLevel.BaseVoltage\n \n
                            • \n
                            \n"; +},"useData":true}); +})(); diff --git a/public/index.html b/public/index.html index 2775a2d..7c7f981 100644 --- a/public/index.html +++ b/public/index.html @@ -27,5 +27,12 @@ To begin the development, run `npm start`. To create a production bundle, use `npm run build`. --> + + + + + + + diff --git a/src/components/dialog/edit-widget-control-creator.js b/src/components/dialog/edit-widget-control-creator.js index 22fe5c6..2c503ba 100644 --- a/src/components/dialog/edit-widget-control-creator.js +++ b/src/components/dialog/edit-widget-control-creator.js @@ -83,8 +83,10 @@ export default function createControls(widgetType = null, widget = null, session ); break; case 'Image': + // Restrict to only image file types (MIME) + let imageControlFiles = files == null? [] : files.filter(file => file.type.includes('image')); dialogControls.push( - validateForm(id)} simulation={simulation} handleChange={(e) => handleChange(e)} />, + validateForm(id)} simulation={simulation} handleChange={(e) => handleChange(e)} />, handleChange(e)} /> ); break; @@ -141,6 +143,13 @@ export default function createControls(widgetType = null, widget = null, session handleChange(e)} /> ); break; + case 'Topology': + // Restrict to only xml files (MIME) + let topologyControlFiles = files == null? [] : files.filter( file => file.type.includes('xml')); + dialogControls.push( + validateForm(id)} simulation={simulation} handleChange={(e) => handleChange(e)} /> + ); + break; default: console.log('Non-valid widget type: ' + widgetType); diff --git a/src/components/dialog/edit-widget.js b/src/components/dialog/edit-widget.js index 0528938..daf51fe 100644 --- a/src/components/dialog/edit-widget.js +++ b/src/components/dialog/edit-widget.js @@ -58,7 +58,7 @@ class EditWidgetDialog extends React.Component { // scale width to match aspect const aspectRatio = file.dimensions.width / file.dimensions.height; changeObject.width = this.state.temporal.height * aspectRatio; - + return changeObject; } @@ -90,8 +90,10 @@ class EditWidgetDialog extends React.Component { } else if (e.target.id === 'file') { changeObject[e.target.id] = e.target.value; - // get file and update size - changeObject = this.assignAspectRatio(changeObject, e.target.value); + // get file and update size (if it's an image) + if ('lockAspect' in this.state.temporal && this.state.temporal.lockAspect) { + changeObject = this.assignAspectRatio(changeObject, e.target.value); + } } else if (e.target.type === 'checkbox') { changeObject[e.target.id] = e.target.checked; } else if (e.target.type === 'number') { diff --git a/src/components/toolbox-item.js b/src/components/toolbox-item.js index 56b8b73..ff2a7cb 100644 --- a/src/components/toolbox-item.js +++ b/src/components/toolbox-item.js @@ -53,13 +53,13 @@ class ToolboxItem extends React.Component { if (this.props.disabled === false) { return this.props.connectDragSource( - + {this.props.name} , {dropEffect}); } else { return ( - + {this.props.name} ); diff --git a/src/components/widget-factory.js b/src/components/widget-factory.js index 0126b8f..9cae22a 100644 --- a/src/components/widget-factory.js +++ b/src/components/widget-factory.js @@ -143,6 +143,10 @@ class WidgetFactory { case 'HTML': widget.content = 'Hello World'; break; + case 'Topology': + widget.width = 600; + widget.height = 400; + break; default: widget.width = 100; diff --git a/src/components/widget-topology.js b/src/components/widget-topology.js new file mode 100644 index 0000000..bab361b --- /dev/null +++ b/src/components/widget-topology.js @@ -0,0 +1,176 @@ +/** + * File: widget-topology.js + * Author: Ricardo Hernandez-Montoya + * Date: 08.01.2018 + * + * This file is part of VILLASweb. + * + * VILLASweb is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * VILLASweb is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with VILLASweb. If not, see . + ******************************************************************************/ + +import React from 'react'; +import {ReactSVGPanZoom} from 'react-svg-pan-zoom'; +import config from '../config'; +import '../styles/simple-spinner.css'; + + +// Do not show Pintura's grid +const pinturaGridStyle = { + display: 'none' +} + +// Avoid another color in the frontend +const pinturaBackingStyle = { + fill: 'transparent' +} + +// Center spinner +const spinnerContainerStyle = { + width: '100%', + height: '100%', + display: 'flex', + justifyContent: 'center', + alignItems: 'center' +} + +// Topology failed message +const msgContainerStyle = Object.assign({ + backgroundColor: '#ececec' +},spinnerContainerStyle) + +const msgStyle = { + fontWeight: 'bold' +} + +// Initialize functions +function attachComponentEvents() { + window.onMouseOver = (e) => show(textSibling(e)); + window.onMouseLeave = (e) => hide(textSibling(e)); +} + +function textSibling(e) { + // Find sibling text element and toggle its visibility + let gParent = e.target.parentElement; + return gParent.getElementsByTagName('text')[0]; +} + +function show(element) { + element.style.visibility = 'inherit'; +} + +function hide(element) { + element.style.visibility = 'hidden'; +} + +// De-initialize functions +function detachComponentEvents() { + window.onMouseOver = null; + window.onMouseLeave = null; +} + +class WidgetTopology extends React.Component { + constructor(props) { + super(props); + this.svgElem = null; + this.Viewer = null; + + this.state = { + visualizationState: 'initial' + }; + } + + componentDidMount() { + if (this.svgElem) { + window.cimjson.setImagePathBase(process.env.PUBLIC_URL + '/Pintura/'); + window.cimsvg.setSVG(this.svgElem); // function not available in upstream source + window.cimview.init(this.svgElem); + window.onMouseLeave = function() {}; + window.onMouseOver = function() {}; + window.onMouseLeave = function() {}; + window.onMouseUp = function() {}; + window.onMouseDown = function() {}; + window.onMouseMove = function() {}; + } + } + + componentWillUnmount() { + detachComponentEvents(); + } + + componentWillReceiveProps(nextProps) { + const file = nextProps.files.find(file => file._id === nextProps.widget.file); + // Ensure model is requested only once or a different was selected + if (this.props.widget.file !== nextProps.widget.file || (this.state.visualizationState === 'initial' && file)) { + this.setState({'visualizationState': 'loading' }); + if (file) { + fetch(new Request('/' + config.publicPathBase + file.path)) + .then( response => { + if (response.status === 200) { + this.setState({'visualizationState': 'ready' }); + window.cimxml.clearXmlData() + window.cimsvg.setFileCount(1); + return response.text().then( contents => { + window.cimsvg.loadFile(contents); + attachComponentEvents(); + }); + } else { + throw new Error('Request failed'); + } + }) + .catch(error => { + this.setState({ + 'visualizationState': 'show_message', + 'message': 'Topology could not be loaded.'}); + }); + } + } else { + // No file has been selected + if (!nextProps.widget.file) { + this.setState({ + 'visualizationState': 'show_message', + 'message': 'Select a topology model first.'}); + } + } + } + + render() { + var markup = null; + + switch(this.state.visualizationState) { + case 'loading': + markup =
                            ; break; + case 'show_message': + markup =
                            { this.state.message }
                            ; break; + default: + markup = (
                            + this.Viewer = Viewer} + style={{outline: "1px solid black"}} + detectAutoPan={false} + width={this.props.widget.width-2} height={this.props.widget.height-2} > + + this.svgElem = c }width={this.props.widget.width} height={this.props.widget.height}> + + + + + + +
                            ); + } + return markup; + } +} + +export default WidgetTopology; diff --git a/src/containers/visualization.js b/src/containers/visualization.js index cf8d09f..1f30c13 100644 --- a/src/containers/visualization.js +++ b/src/containers/visualization.js @@ -454,6 +454,10 @@ class Visualization extends React.Component { ); + // Only one topology widget at the time is supported + let thereIsTopologyWidget = current_widgets && Object.values(current_widgets).filter( widget => widget.type === 'Topology').length > 0; + let topologyItemMsg = !thereIsTopologyWidget? '' : 'Currently only one is supported'; + return (
                            @@ -482,6 +486,7 @@ class Visualization extends React.Component { +
                            { editingControls } diff --git a/src/containers/widget.js b/src/containers/widget.js index 2242464..7ebd0aa 100644 --- a/src/containers/widget.js +++ b/src/containers/widget.js @@ -43,6 +43,7 @@ import WidgetSlider from '../components/widget-slider'; import WidgetGauge from '../components/widget-gauge'; import WidgetBox from '../components/widget-box'; import WidgetHTML from '../components/widget-html'; +import WidgetTopology from '../components/widget-topology'; import '../styles/widgets.css'; @@ -188,6 +189,8 @@ class Widget extends React.Component { element = } else if (widget.type === 'HTML') { element = + } else if (widget.type === 'Topology') { + element = } const widgetClasses = classNames({ diff --git a/src/styles/simple-spinner.css b/src/styles/simple-spinner.css new file mode 100644 index 0000000..c86368a --- /dev/null +++ b/src/styles/simple-spinner.css @@ -0,0 +1,19 @@ + +/* + Basic spinner animation + taken from: https://www.w3schools.com/howto/howto_css_loader.asp +*/ + +.loader { + border: 16px solid #f3f3f3; + border-top: 16px solid #6ea2b0; + border-radius: 50%; + width: 120px; + height: 120px; + animation: spin 1s linear infinite; +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +}