From dcee181329f99a55d603d038d32b840b00f1a53f Mon Sep 17 00:00:00 2001 From: "Egon.io Bot" Date: Tue, 30 Jan 2024 09:51:05 +0000 Subject: [PATCH] Deploy latest build --- app-latest-build/main.js | 1 - app-latest-build/main.js.map | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app-latest-build/main.js b/app-latest-build/main.js index 1e87c94..7599575 100644 --- a/app-latest-build/main.js +++ b/app-latest-build/main.js @@ -8842,7 +8842,6 @@ class PngService { } /** * Calculate the Width and Height of the Bounding Box for the PNG so no Parts are cut off - * TODO Longer Iconnames can still be cut of, when the Element is the lowest Object on the canvas, same for Activities */ calculateWidthAndHeight(box) { if (box.xLeft < 0) { diff --git a/app-latest-build/main.js.map b/app-latest-build/main.js.map index 653a448..164eaa6 100644 --- a/app-latest-build/main.js.map +++ b/app-latest-build/main.js.map @@ -1 +1 @@ -{"version":3,"file":"main.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAA0C;AACgB;AACf;AACX;AAEU;AACU;AACJ;AACa;AAE/C,SAAUS,kBAAkBA,CAACC,OAAO;EAChDV,2DAAO,CAACW,IAAI,CAAC,IAAI,EAAED,OAAO,CAAC;EAE3B,IAAI,CAACE,eAAe,GAAG,EAAE;EACzB,IAAI,CAACC,cAAc,GAAG,EAAE;AAC1B;AAEAT,+CAAQ,CAACK,kBAAkB,EAAET,2DAAO,CAAC;AAErCS,kBAAkB,CAACK,SAAS,CAACC,QAAQ,GAAG,EAAE,CAACC,MAAM,CAC/CP,kBAAkB,CAACK,SAAS,CAACC,QAAQ,EACrC,CAACV,gDAAiB,EAAEC,yDAAkB,EAAEC,yDAAc,CAAC,EACvD,CAACN,sEAAY,CAAC,CACf;AAED;;;;;AAKAQ,kBAAkB,CAACK,SAAS,CAACG,eAAe,GAAG,UAAUC,aAAa;EACpE,IAAIC,QAAQ,GAAGD,aAAa,CAACE,MAAM;EACnC,OAAOF,aAAa,CAACG,QAAQ;EAC7B,OAAOH,aAAa,CAACE,M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AAqB,EACrBC,iEAAa,EACbC,yEAAiB,EACjBX,qEAAe,EACfC,4EAAkB,EAClBO,0EAAiB,EACjBN,mEAAc,EACdC,uEAAgB,EAChBC,4EAAkB,EAClBE,2EAAiB,EACjBD,kEAAa;EAAA;;;sHAGJ16B,cAAc;IAAAM,OAAA,GA5BvBs6B,qEAAe,EACfE,kFAAqB,EACrBC,iEAAa,EACbC,yEAAiB,EACjBX,qEAAe,EACfC,4EAAkB,EAClBO,0EAAiB,EACjBN,mEAAc,EACdC,uEAAgB,EAChBC,4EAAkB,EAClBE,2EAAiB,EACjBD,kEAAa;IAAAn6B,OAAA,GAGbq6B,qEAAe,EACfE,kFAAqB,EACrBC,iEAAa,EACbC,yEAAiB,EACjBX,qEAAe,EACfC,4EAAkB,EAClBO,0EAAiB,EACjBN,mEAAc,EACdC,uEAAgB,EAChBC,4EAAkB,EAClBE,2EAAiB,EACjBD,kEAAa;EAAA;AAAA;;;;;;;;;;;;;;AC1CjB;AACA;AACA;AAEO,MAAMlS,WAAW,GAAG;EACzByS,UAAU,EAAE,KAAK;EACjBvQ,OAAO,EAAE;CACV;AAED;;;;;;;AAOA;;;;;;;;;;;;;;;;AChB+C;AAGF;AACY;AAEzD,IAAIlC,kEAAW,CAACyS,UAAU,EAAE;EAC1BC,6DAAc,EAAE;;AAGlBC,sEAAA,EAAwB,CACrBE,eAAe,CAACxB,sDAAS,CAAC,CAC1ByB,KAAK,CAAE3P,GAAG,IAAK4P,OAAO,CAACC,KAAK,CAAC7P,GAAG,CAAC,CAAC","sources":["./src/app/Modeler/index.js","./src/app/Modeler/modeler/change-icon/replace.js","./src/app/Modeler/modeler/change-icon/replaceMenuProvider.js","./src/app/Modeler/modeler/change-icon/replaceOptions.js","./src/app/Modeler/modeler/context-pad/domainStoryContextPadProvider.js","./src/app/Modeler/modeler/domainStoryElementFactory.js","./src/app/Modeler/modeler/domainStoryIdFactory.js","./src/app/Modeler/modeler/domainStoryRenderer.js","./src/app/Modeler/modeler/domainStoryRules.js","./src/app/Modeler/modeler/domainStoryUpdater.js","./src/app/Modeler/modeler/index.js","./src/app/Modeler/modeler/labeling/dsLabelEditingPreview.js","./src/app/Modeler/modeler/labeling/dsLabelEditingProvider.js","./src/app/Modeler/modeler/labeling/dsLabelUtil.js","./src/app/Modeler/modeler/labeling/index.js","./src/app/Modeler/modeler/labeling/position.js","./src/app/Modeler/modeler/modeling/dSModeling.js","./src/app/Modeler/modeler/modeling/index.js","./src/app/Modeler/modeler/numbering/numbering.js","./src/app/Modeler/modeler/palette/domainStoryPalette.js","./src/app/Modeler/modeler/updateHandler/activityUpdateHandlers.js","./src/app/Modeler/modeler/updateHandler/elementUpdateHandler.js","./src/app/Modeler/modeler/updateHandler/headlineAndDescriptionUpdateHandler.js","./src/app/Modeler/modeler/updateHandler/massRenameHandler.js","./src/app/Modeler/modeler/updateHandler/updateLabelHandler.js","./src/app/Modeler/modeler/util.js","./src/app/Service/Export/exportUtil.js","./src/app/Domain/Common/businessObject.ts","./src/app/Domain/Common/configuration.ts","./src/app/Domain/Common/constants.ts","./src/app/Domain/Common/dictionary/dictionary.ts","./src/app/Domain/Common/domainConfiguration.ts","./src/app/Domain/Common/elementTypes.ts","./src/app/Domain/Common/iconConfiguration.ts","./src/app/Domain/Dialog/activityDialogData.ts","./src/app/Domain/Dialog/exportDialogData.ts","./src/app/Domain/Dialog/infoDialogData.ts","./src/app/Domain/DomManipulation/replayConstants.ts","./src/app/Domain/Domain-Configuration/allIcons.ts","./src/app/Domain/Domain-Configuration/iconFilterEnum.ts","./src/app/Domain/Export/configAndDst.ts","./src/app/Domain/Export/exportConstants.ts","./src/app/Modules/autosave-settings.module.ts","./src/app/Modules/domain-story-modeler-module.module.ts","./src/app/Modules/settings.module.ts","./src/app/Presentation/Autosave/AutosaveOptions/autosave-options.component.ts","./src/app/Presentation/Autosave/AutosaveOptions/autosave-options.component.html","./src/app/Presentation/Autosave/AutosaveSettings/autosave-settings.component.ts","./src/app/Presentation/Autosave/AutosaveSettings/autosave-settings.component.html","./src/app/Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component.ts","./src/app/Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component.html","./src/app/Presentation/Canvas/modeler.component.ts","./src/app/Presentation/Canvas/modeler.component.html","./src/app/Presentation/Dialog/activity-dialog/activity-dialog.component.ts","./src/app/Presentation/Dialog/activity-dialog/activity-dialog.component.html","./src/app/Presentation/Dialog/export-dialog/export-dialog.component.ts","./src/app/Presentation/Dialog/export-dialog/export-dialog.component.html","./src/app/Presentation/Dialog/header-dialog/header-dialog.component.ts","./src/app/Presentation/Dialog/header-dialog/header-dialog.component.html","./src/app/Presentation/Dialog/info-dialog/info-dialog.component.ts","./src/app/Presentation/Dialog/info-dialog/info-dialog.component.html","./src/app/Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component.ts","./src/app/Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component.html","./src/app/Presentation/DomainConfiguration/details-list-item/details-list-item.component.ts","./src/app/Presentation/DomainConfiguration/details-list-item/details-list-item.component.html","./src/app/Presentation/DomainConfiguration/domain-configuration.component.ts","./src/app/Presentation/DomainConfiguration/domain-configuration.component.html","./src/app/Presentation/DomainConfiguration/domain-details/domain-details.component.ts","./src/app/Presentation/DomainConfiguration/domain-details/domain-details.component.html","./src/app/Presentation/DomainConfiguration/icon-list-item/icon-list-item.component.ts","./src/app/Presentation/DomainConfiguration/icon-list-item/icon-list-item.component.html","./src/app/Presentation/Header/header-buttons.component.ts","./src/app/Presentation/Header/header-buttons.component.html","./src/app/Presentation/Header/header.component.ts","./src/app/Presentation/Header/header.component.html","./src/app/Presentation/LabelDictionary/label-dictionary.component.ts","./src/app/Presentation/LabelDictionary/label-dictionary.component.html","./src/app/Presentation/Settings/General/general-settings.component.ts","./src/app/Presentation/Settings/General/general-settings.component.html","./src/app/Presentation/Settings/settings.component.ts","./src/app/Presentation/Settings/settings.component.html","./src/app/Service/Autosave/autosave-configuration.service.ts","./src/app/Service/Autosave/autosave.service.ts","./src/app/Service/BrowserStorage/storage.service.ts","./src/app/Service/CommandStack/command-stack.service.ts","./src/app/Service/Dialog/dialog.service.ts","./src/app/Service/DirtyFlag/dirty-flag.service.ts","./src/app/Service/DomManipulation/dom-manipulation.service.ts","./src/app/Service/DomainConfiguration/domain-configuration.service.ts","./src/app/Service/DomainConfiguration/domain-customization.service.ts","./src/app/Service/DomainConfiguration/icon-dictionary.service.ts","./src/app/Service/ElementRegistry/element-registry.service.ts","./src/app/Service/Export/export.service.ts","./src/app/Service/Export/html-presentation.service.ts","./src/app/Service/Export/png.service.ts","./src/app/Service/Export/svg.service.ts","./src/app/Service/Import/import-domain-story.service.ts","./src/app/Service/Import/import-repair.service.ts","./src/app/Service/LabelDictionary/label-dictionary.service.ts","./src/app/Service/LabelDictionary/mass-naming.service.ts","./src/app/Service/Modeler/initializer.service.ts","./src/app/Service/Modeler/modeler.service.ts","./src/app/Service/Renderer/renderer.service.ts","./src/app/Service/Replay/replay-state.service.ts","./src/app/Service/Replay/replay.service.ts","./src/app/Service/Replay/storyCreator/story-creator.service.ts","./src/app/Service/Settings/settings.service.ts","./src/app/Service/Title/title.service.ts","./src/app/Utils/mathExtensions.ts","./src/app/Utils/naming.ts","./src/app/Utils/sanitizer.ts","./src/app/app.component.ts","./src/app/app.component.html","./src/app/app.module.ts","./src/app/material.module.ts","./src/environments/environment.ts","./src/main.ts"],"sourcesContent":["import Modeler from \"bpmn-js/lib/Modeler\";\nimport ResizeModule from \"diagram-js/lib/features/resize\";\nimport { assign, isArray } from \"min-dash\";\nimport inherits from \"inherits\";\n\nimport DomainStoryModule from \"./modeler\";\nimport LabelEditingModule from \"./modeler/labeling\";\nimport ModelingModule from \"./modeler/modeling\";\nimport { elementTypes } from \"../Domain/Common/elementTypes\";\n\nexport default function DomainStoryModeler(options) {\n Modeler.call(this, options);\n\n this._customElements = [];\n this._groupElements = [];\n}\n\ninherits(DomainStoryModeler, Modeler);\n\nDomainStoryModeler.prototype._modules = [].concat(\n DomainStoryModeler.prototype._modules,\n [DomainStoryModule, LabelEditingModule, ModelingModule],\n [ResizeModule]\n);\n\n/**\n * add a single custom element to the underlying diagram\n *\n * @param {Object} customElement\n */\nDomainStoryModeler.prototype._addCustomShape = function (customElement) {\n let parentId = customElement.parent;\n delete customElement.children;\n delete customElement.parent;\n this._customElements.push(customElement);\n\n let canvas = this.get(\"canvas\"),\n elementFactory = this.get(\"elementFactory\");\n\n let customAttrs = assign({ businessObject: customElement }, customElement);\n let customShape = elementFactory.create(\"shape\", customAttrs);\n\n if (isGroup(customElement)) {\n this._groupElements[customElement.id] = customShape;\n }\n\n if (parentId) {\n let parentShape = this._groupElements[parentId];\n\n if (isGroup(parentShape)) {\n return canvas.addShape(customShape, parentShape, parentShape.id);\n }\n }\n return canvas.addShape(customShape);\n};\n\nDomainStoryModeler.prototype._addCustomConnection = function (customElement) {\n this._customElements.push(customElement);\n\n let canvas = this.get(\"canvas\"),\n elementFactory = this.get(\"elementFactory\"),\n elementRegistry = this.get(\"elementRegistry\");\n\n let customAttrs = assign({ businessObject: customElement }, customElement);\n\n let connection = elementFactory.create(\n \"connection\",\n assign(customAttrs, {\n source: elementRegistry.get(customElement.source),\n target: elementRegistry.get(customElement.target),\n }),\n elementRegistry.get(customElement.source).parent\n );\n\n return canvas.addConnection(connection);\n};\n\n//** We import BusinessObjects, not the whole Canvas Object!!!!!!!!\nDomainStoryModeler.prototype.importCustomElements = function (elements) {\n this.get(\"eventBus\").fire(\"diagram.clear\", {});\n this._customElements = [];\n this._groupElements = [];\n\n this.addCustomElements(elements);\n};\n\n/**\n * add a number of custom elements and connections to the underlying diagram.\n *\n * @param {Array} customElements\n */\nDomainStoryModeler.prototype.addCustomElements = function (customElements) {\n if (!isArray(customElements)) {\n throw new Error(\"argument must be an array\");\n }\n\n let shapes = [],\n connections = [],\n groups = [];\n\n customElements.forEach(function (customElement) {\n if (isConnection(customElement)) {\n connections.push(customElement);\n } else if (isGroup(customElement)) {\n groups.push(customElement);\n } else {\n shapes.push(customElement);\n }\n });\n\n // add groups before shapes and shapes before connections so that connections\n // can already rely on the shapes being part of the diagram\n groups.forEach(this._addCustomShape, this);\n shapes.forEach(this._addCustomShape, this);\n connections.forEach(this._addCustomConnection, this);\n};\n\n/**\n * get custom elements with their current status.\n *\n * @return {Array} custom elements on the diagram\n */\nDomainStoryModeler.prototype.getCustomElements = function () {\n return this._customElements;\n};\n\n// override standard function to prevent default elements on canvas\nDomainStoryModeler.prototype.createDiagram = function (done) {};\n\nfunction isConnection(element) {\n return (\n element.type === elementTypes.ACTIVITY ||\n element.type === elementTypes.CONNECTION\n );\n}\n\nfunction isGroup(element) {\n return element && element.type === elementTypes.GROUP;\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\n/**\n * service that allow replacing of elements.\n */\nexport default function Replace(modeling) {\n this._modeling = modeling;\n}\n\n/**\n * @param {Element} oldElement - element to be replaced\n * @param {Object} newElementData - containing information about the new Element, for example height, width, type.\n * @param modeling\n */\nfunction replaceElement(oldElement, newElementData, modeling) {\n // let modeling = this._modeling;\n\n let newElement = setCenterOfElement(newElementData, oldElement, modeling);\n let outgoingActivities = newElement.outgoing;\n let incomingActivities = newElement.incoming;\n\n outgoingActivities.forEach((element) => {\n element.businessObject.source = newElement.id;\n });\n\n incomingActivities.forEach((element) => {\n element.businessObject.target = newElement.id;\n });\n\n return newElement;\n}\n\nfunction setCenterOfElement(newElementData, oldElement, modeling) {\n newElementData.x = Math.ceil(\n oldElement.x + (newElementData.width || oldElement.width) / 2\n );\n newElementData.y = Math.ceil(\n oldElement.y + (newElementData.height || oldElement.height) / 2\n );\n\n assign(newElementData, { name: oldElement.businessObject.name });\n\n return modeling.replaceShape(oldElement, newElementData, {});\n}\n\nReplace.prototype.replaceElement = replaceElement;\n","\"use strict\";\n\nimport Replace from \"./replace\";\nimport * as replaceOptions from \"./replaceOptions\";\n\nimport { forEach } from \"min-dash\";\n\n/**\n * This module is an element agnostic replace menu provider for the popup menu.\n */\nexport default function ReplaceMenuProvider(modeling) {\n this._dsReplace = new Replace(modeling);\n this._modeling = modeling;\n}\n\nReplaceMenuProvider.$inject = [\"modeling\"];\n\n/**\n * Get all entries from replaceOptions for the given element and apply filters\n * on them. Get for example only elements, which are different from the current one.\n *\n * @param {djs.model.Base} element\n *\n * @return {Array} a list of menu entry items\n */\nReplaceMenuProvider.prototype.getEntries = function (element) {\n let entries;\n if (element.type.includes(\"actor\")) {\n entries = replaceOptions.actorReplaceOptions(element.type);\n } else if (element.type.includes(\"workObject\")) {\n entries = replaceOptions.workObjectReplaceOptions(element.type);\n }\n\n return this._createEntries(element, entries);\n};\n\n/**\n * Creates an array of menu entry objects for a given element and filters the replaceOptions\n * according to a filter function.\n *\n * @param {djs.model.Base} element\n * @param {Object} replaceOptions\n *\n * @return {Array} a list of menu items\n */\nReplaceMenuProvider.prototype._createEntries = function (\n element,\n replaceOptions\n) {\n let menuEntries = [];\n\n let self = this;\n\n forEach(replaceOptions, function (definition) {\n let entry = self._createMenuEntry(definition, element);\n\n menuEntries.push(entry);\n });\n\n return menuEntries;\n};\n\n/**\n * Creates and returns a single menu entry item.\n *\n * @param {Object} definition a single replace options definition object\n * @param {djs.model.Base} element\n * @param {Function} [action] an action callback function which gets called when\n * the menu entry is being triggered.\n *\n * @return {Object} menu entry item\n */\nReplaceMenuProvider.prototype._createMenuEntry = function (\n definition,\n element,\n action\n) {\n let replaceElement = this._dsReplace.replaceElement;\n let modeling = this._modeling;\n let replaceAction = function () {\n return replaceElement(element, definition.target, modeling);\n };\n\n action = action || replaceAction;\n\n return {\n label: definition.label,\n className: definition.className,\n id: definition.actionName,\n action: action,\n };\n};\n","import { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { getNameFromType } from \"src/app/Utils/naming\";\n\nlet iconDictionaryService;\n\nexport function initializeReplaceOptions(iconDictionary) {\n iconDictionaryService = iconDictionary;\n}\n\nexport function actorReplaceOptions(name) {\n const actorTypes = iconDictionaryService.getTypeDictionary(\n elementTypes.ACTOR\n );\n\n let replaceOption = {};\n let i = 0;\n\n actorTypes.keysArray().forEach((actorType) => {\n if (!name.includes(actorType)) {\n const typeName = getNameFromType(actorType);\n replaceOption[i] = {\n label: \"Change to \" + typeName,\n actionName: \"replace-with-actor-\" + typeName.toLowerCase(),\n className: iconDictionaryService.getIconForBPMN(actorType),\n target: {\n type: actorType,\n },\n };\n i++;\n }\n });\n return replaceOption;\n}\n\nexport function workObjectReplaceOptions(name) {\n const workObjectTypes = iconDictionaryService.getTypeDictionary(\n elementTypes.WORKOBJECT\n );\n\n let replaceOption = {};\n let i = 0;\n\n workObjectTypes.keysArray().forEach((workObjectType) => {\n if (!name.includes(workObjectType)) {\n const typeName = getNameFromType(workObjectType);\n replaceOption[i] = {\n label: \"Change to \" + typeName,\n actionName: \"replace-with-actor-\" + typeName,\n className: iconDictionaryService.getIconForBPMN(workObjectType),\n target: {\n type: workObjectType,\n },\n };\n }\n i++;\n });\n return replaceOption;\n}\n","\"use strict\";\n\nimport inherits from \"inherits\";\n\nimport ContextPadProvider from \"bpmn-js/lib/features/context-pad/ContextPadProvider\";\n\nimport { assign, bind } from \"min-dash\";\nimport { generateAutomaticNumber } from \"../numbering/numbering\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { getAllStandardIconKeys } from \"src/app/Domain/Domain-Configuration/allIcons\";\nimport { getNameFromType } from \"src/app/Utils/naming\";\n\nlet dirtyFlagService;\nlet iconDictionaryService;\n\nexport function initializeContextPadProvider(dirtyFlag, iconDictionary) {\n dirtyFlagService = dirtyFlag;\n iconDictionaryService = iconDictionary;\n}\n\nexport default function DomainStoryContextPadProvider(\n injector,\n connect,\n translate,\n elementFactory,\n create,\n canvas,\n contextPad,\n popupMenu,\n replaceMenuProvider,\n commandStack,\n eventBus,\n modeling\n) {\n let startConnect;\n let selectedElement;\n\n injector.invoke(ContextPadProvider, this);\n let autoPlace = injector.get(\"autoPlace\", false);\n\n let cached = bind(this.getContextPadEntries, this);\n\n const colorPicker = document.getElementById(\"colorPicker\");\n colorPicker.onchange = (ev) => {\n const context = {\n businessObject: selectedElement.businessObject,\n newColor: ev.target.value,\n element: selectedElement,\n };\n\n commandStack.execute(\"element.colorChange\", context);\n dirtyFlagService.makeDirty();\n };\n\n popupMenu.registerProvider(\"ds-replace\", replaceMenuProvider);\n popupMenu.registerProvider(\"bpmn-replace\", replaceMenuProvider);\n\n this.getContextPadEntries = function (element) {\n const allStandardIconKeys = getAllStandardIconKeys();\n let actions = cached(element);\n\n startConnect = function (event, element, autoActivate) {\n connect.start(event, element, autoActivate);\n };\n\n if (element.type.includes(elementTypes.WORKOBJECT)) {\n if (\n allStandardIconKeys.includes(\n element.type.replace(elementTypes.WORKOBJECT, \"\")\n )\n ) {\n addColorChange(actions);\n }\n addConnectWithActivity(actions, startConnect);\n addTextAnnotation(actions);\n addActors(appendAction, actions);\n addWorkObjects(appendAction, actions);\n addChangeWorkObjectTypeMenu(actions);\n } else if (element.type.includes(elementTypes.ACTOR)) {\n if (\n allStandardIconKeys.includes(\n element.type.replace(elementTypes.ACTOR, \"\")\n )\n ) {\n addColorChange(actions);\n }\n addConnectWithActivity(actions, startConnect);\n addTextAnnotation(actions);\n addWorkObjects(appendAction, actions);\n addChangeActorTypeMenu(actions);\n } else if (element.type.includes(elementTypes.GROUP)) {\n delete actions.delete;\n addTextAnnotation(actions);\n assign(actions, {\n deleteGroup: {\n group: \"edit\",\n className: \"bpmn-icon-trash\",\n title: \"Remove Group without Child-Elements\",\n action: {\n click: function (event, element) {\n modeling.removeGroup(element);\n dirtyFlagService.makeDirty();\n },\n },\n },\n });\n addColorChange(actions);\n } else if (element.type.includes(elementTypes.ACTIVITY)) {\n moveDeleteActionToEndOfArray(actions);\n\n addColorChange(actions);\n\n assign(actions, {\n delete: {\n group: \"edit\",\n className: \"bpmn-icon-trash\",\n title: \"Remove\",\n action: {\n click: function (event, element) {\n modeling.removeElements({ element });\n dirtyFlagService.makeDirty();\n },\n },\n },\n });\n }\n\n return actions;\n };\n\n function moveDeleteActionToEndOfArray(actions) {\n delete actions.delete;\n\n assign(actions, {\n changeDirection: {\n group: \"edit\",\n className: \"icon-domain-story-changeDirection\",\n title: translate(\"Change direction\"),\n action: {\n // event needs to be addressed\n click: function (event, element) {\n changeDirection(element);\n },\n },\n },\n });\n }\n\n function addChangeActorTypeMenu(actions) {\n assign(actions, {\n replace: {\n group: \"edit\",\n className: \"bpmn-icon-screw-wrench\",\n title: translate(\"Change type\"),\n action: {\n click: function (event, element) {\n let position = assign(getReplaceMenuPosition(element), {\n cursor: { x: event.x, y: event.y },\n });\n popupMenu.open(element, \"ds-replace\", position);\n },\n },\n },\n });\n }\n\n function addColorChange(actions) {\n assign(actions, {\n colorChange: {\n group: \"edit\",\n className: \"icon-domain-story-color-picker\",\n title: translate(\"Change color\"),\n action: {\n click: function (event, element) {\n selectedElement = element;\n colorPicker.click();\n },\n },\n },\n });\n }\n\n function addTextAnnotation(actions) {\n assign(actions, {\n \"append.text-annotation\": appendAction(\n elementTypes.TEXTANNOTATION,\n \"bpmn-icon-text-annotation\",\n \"textannotation\",\n \"connect\"\n ),\n });\n }\n\n function addConnectWithActivity(actions, startConnect) {\n assign(actions, {\n connect: {\n group: \"connect\",\n className: \"bpmn-icon-connection\",\n title: translate(\"Connect with activity\"),\n action: {\n click: startConnect,\n dragstart: startConnect,\n },\n },\n });\n }\n\n function addWorkObjects(appendAction, actions) {\n let workObjectTypes = iconDictionaryService.getTypeDictionary(\n elementTypes.WORKOBJECT\n );\n workObjectTypes.keysArray().forEach((workObjectType) => {\n let name = getNameFromType(workObjectType);\n let icon = iconDictionaryService.getIconForBPMN(workObjectType);\n let action = [];\n action[\"append.workObject\" + name] = appendAction(\n workObjectType,\n icon,\n name,\n \"workObjects\"\n );\n assign(actions, action);\n });\n }\n\n function addActors(appendAction, actions) {\n let actorTypes = iconDictionaryService.getTypeDictionary(\n elementTypes.ACTOR\n );\n actorTypes.keysArray().forEach((actorType) => {\n let name = getNameFromType(actorType);\n let icon = iconDictionaryService.getIconForBPMN(actorType);\n let action = [];\n action[\"append.actor\" + name] = appendAction(\n actorType,\n icon,\n name,\n \"actors\"\n );\n assign(actions, action);\n });\n }\n\n function addChangeWorkObjectTypeMenu(actions) {\n assign(actions, {\n replace: {\n group: \"edit\",\n className: \"bpmn-icon-screw-wrench\",\n title: translate(\"Change type\"),\n action: {\n click: function (event, element) {\n let position = assign(getReplaceMenuPosition(element), {\n cursor: { x: event.x, y: event.y },\n });\n popupMenu.open(element, \"ds-replace\", position);\n },\n },\n },\n });\n }\n\n function changeDirection(element) {\n let context;\n let businessObject = element.businessObject;\n let newNumber;\n\n if (element.source.type.includes(elementTypes.ACTOR)) {\n newNumber = 0;\n } else {\n newNumber = generateAutomaticNumber(element, commandStack);\n }\n context = {\n businessObject: businessObject,\n newNumber: newNumber,\n element: element,\n };\n commandStack.execute(\"activity.directionChange\", context);\n }\n\n function getReplaceMenuPosition(element) {\n let Y_OFFSET = 5;\n\n let diagramContainer = canvas.getContainer(),\n pad = contextPad.getPad(element).html;\n\n let diagramRect = diagramContainer.getBoundingClientRect(),\n padRect = pad.getBoundingClientRect();\n\n let top = padRect.top - diagramRect.top;\n let left = padRect.left - diagramRect.left;\n\n return {\n x: left,\n y: top + padRect.height + Y_OFFSET,\n };\n }\n\n /**\n * create an append action\n *\n * @param {String} type\n * @param {String} className\n * @param {String} [title]\n * @param {String} group\n * @param {Object} [options]\n *\n * @return {Object} descriptor\n */\n function appendAction(type, className, title, group, options) {\n if (typeof title !== \"string\") {\n options = title;\n title = translate(\"{type}\", { type: type.replace(/^domainStory:/, \"\") });\n }\n\n function appendStart(event, element) {\n let shape = elementFactory.createShape(assign({ type: type }, options));\n let context = {\n elements: [shape],\n hints: {},\n source: element,\n };\n create.start(event, shape, context);\n }\n\n return {\n group: group,\n className: className,\n title: \"Append \" + title,\n action: {\n dragstart: startConnect,\n click: appendStart,\n },\n };\n }\n}\n\ninherits(DomainStoryContextPadProvider, ContextPadProvider);\n\nDomainStoryContextPadProvider.$inject = [\n \"injector\",\n \"connect\",\n \"translate\",\n \"elementFactory\",\n \"create\",\n \"canvas\",\n \"contextPad\",\n \"popupMenu\",\n \"replaceMenuProvider\",\n \"commandStack\",\n \"eventBus\",\n \"modeling\",\n];\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\nimport inherits from \"inherits\";\n\nimport BpmnElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\n\nimport { DEFAULT_LABEL_SIZE } from \"bpmn-js/lib/util/LabelUtil\";\n\nimport DomainStoryIdFactory from \"./domainStoryIdFactory\";\n\n/**\n * A custom factory that knows how to create BPMN _and_ custom elements.\n */\nexport default function DomainStoryElementFactory(bpmnFactory, moddle) {\n BpmnElementFactory.call(this, bpmnFactory, moddle);\n\n let self = this;\n let domainStoryIdFactory = new DomainStoryIdFactory();\n\n /**\n * create a diagram-js element with the given type (any of shape, connection, label).\n *\n * @param {String} elementType\n * @param {Object} attrs\n *\n * @return {djs.model.Base}\n */\n this.create = function (elementType, attrs) {\n let type = attrs.type;\n\n if (elementType === \"label\") {\n return self.baseCreate(\n elementType,\n assign({ type: \"label\" }, DEFAULT_LABEL_SIZE, attrs)\n );\n }\n\n // add type to businessObject if custom\n if (/^domainStory:/.test(type)) {\n if (!attrs.businessObject) {\n attrs.businessObject = {\n type: type,\n name: attrs.name ? attrs.name : \"\",\n };\n }\n\n if (attrs.id) {\n domainStoryIdFactory.registerId(attrs.id);\n } else {\n attrs.id = domainStoryIdFactory.getId(elementType);\n }\n assign(attrs.businessObject, {\n id: attrs.id,\n });\n\n let id = attrs.id;\n attrs.businessObject.get = function (key) {\n if (key === \"id\") {\n return id;\n }\n };\n attrs.businessObject.set = function (key, value) {\n if (key === \"id\") {\n assign(attrs.businessObject, { id: value });\n }\n };\n\n if (!attrs.businessObject.$type) {\n assign(attrs.businessObject, { $type: \"Element\" });\n }\n assign(attrs.businessObject, { di: {} });\n if (!attrs.businessObject.$descriptor) {\n assign(attrs.businessObject, { $descriptor: {} });\n }\n\n // add width and height if shape\n if (\n (!/:activity$/.test(type) || !/:connection$/.test(type)) &&\n !((/:group$/.test(type) && attrs.height) || attrs.width)\n ) {\n assign(attrs, self._getCustomElementSize(type));\n }\n\n if (!(\"$instanceOf\" in attrs.businessObject)) {\n // ensure we can use ModelUtil#is for type checks\n Object.defineProperty(attrs.businessObject, \"$instanceOf\", {\n value: function (type) {\n return this.type === type;\n },\n });\n }\n\n return self.baseCreate(elementType, attrs);\n }\n\n return self.createBpmnElement(elementType, attrs);\n };\n}\n\ninherits(DomainStoryElementFactory, BpmnElementFactory);\n\nDomainStoryElementFactory.$inject = [\"bpmnFactory\", \"moddle\"];\n\n/**\n * returns the default size of custom shapes.\n *\n * the following example shows an interface on how\n * to setup the custom shape's dimensions.\n * *\n * @param {String} type\n *\n * @return {Dimensions} a {width, height} object representing the size of the element\n */\nDomainStoryElementFactory.prototype._getCustomElementSize = function (type) {\n let shapes = {\n __default: { width: 75, height: 75 },\n \"domainStory:textAnnotation\": { width: 100, height: 30 },\n \"domainStory:group\": { width: 525, height: 275 },\n };\n\n return shapes[type] || shapes.__default;\n};\n\nclass Dimensions {\n width;\n height;\n}\n","\"use strict\";\n\nlet idList = [];\n\nexport default function DomainStoryIdFactory() {}\n\nDomainStoryIdFactory.prototype.getId = function (type) {\n return generateId(type);\n};\n\nDomainStoryIdFactory.prototype.registerId = function (id) {\n idList.push(id);\n};\n\nfunction generateId(type) {\n let idNumber = fourDigitsId();\n\n let id = type + \"_\" + idSuffix(idNumber);\n\n while (containsId(id)) {\n idNumber++;\n\n id = type + \"_\" + idSuffix(idNumber);\n }\n\n idList.push(id);\n return id;\n}\n\nfunction idSuffix(idNumber) {\n let id;\n if (idNumber > 9999) {\n id = 0;\n } else if (idNumber < 10) {\n id = \"000\" + idNumber;\n } else if (idNumber < 100) {\n id = \"00\" + idNumber;\n } else if (idNumber < 1000) {\n id = \"0\" + idNumber;\n } else {\n id = \"\" + idNumber;\n }\n return id;\n}\n\nfunction fourDigitsId() {\n return Math.floor(Math.random() * 10000);\n}\n\nexport function containsId(id) {\n let same = false;\n idList.forEach((element) => {\n if (id === element) {\n same = true;\n }\n });\n return same;\n}\n","\"use strict\";\n\nimport inherits from \"inherits\";\nimport BaseRenderer from \"diagram-js/lib/draw/BaseRenderer\";\nimport Ids from \"ids\";\nimport { getAnnotationBoxHeight } from \"./labeling/dsLabelEditingPreview\";\nimport { componentsToPath, createLine } from \"diagram-js/lib/util/RenderUtil\";\nimport {\n append as svgAppend,\n attr as svgAttr,\n classes as svgClasses,\n create as svgCreate,\n} from \"tiny-svg\";\nimport { query as domQuery } from \"min-dom\";\nimport { assign, isObject } from \"min-dash\";\nimport { getNumberStash } from \"./labeling/dsLabelEditingProvider\";\nimport {\n addNumberToRegistry,\n generateAutomaticNumber,\n numberBoxDefinitions,\n} from \"./numbering/numbering\";\n\nimport { calculateTextWidth } from \"./labeling/dsLabelUtil\";\nimport { countLines, labelPosition } from \"./labeling/position\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { angleBetween } from \"../../Utils/mathExtensions\";\n\nlet RENDERER_IDS = new Ids();\nlet numbers = [];\nconst DEFAULT_COLOR = \"black\";\n\n/**\n * a renderer that knows how to render custom elements.\n */\nlet iconDictionary;\nlet elementRegistry;\nlet dirtyFlag;\n\nexport function initializeRenderer(\n iconDictionaryService,\n elementRegistryService,\n dirtyFlagService\n) {\n iconDictionary = iconDictionaryService;\n elementRegistry = elementRegistryService;\n dirtyFlag = dirtyFlagService;\n}\n\nexport default function DomainStoryRenderer(\n eventBus,\n styles,\n canvas,\n textRenderer,\n pathMap,\n commandStack\n) {\n BaseRenderer.call(this, eventBus, 2000);\n\n let rendererId = RENDERER_IDS.next();\n let markers = {};\n let computeStyle = styles.computeStyle;\n\n // generate the automatic Number for an activity originating from an actor\n function generateActivityNumber(parentGfx, element, box) {\n // whenever we want to edit an activity, it gets redrawn as a new object\n // and the custom information is lost,\n // so we stash it before the editing occurs and set the value here\n\n let numberStash = getNumberStash();\n let semantic = element.businessObject;\n\n if (numberStash.use) {\n semantic.number = numberStash.number;\n }\n\n numbers[semantic.number] = true;\n\n let newRenderedNumber = renderNumber(\n parentGfx,\n semantic.number,\n numberStyle(box),\n element.type\n );\n addNumberToRegistry(newRenderedNumber, semantic.number);\n }\n\n // style functions\n function numberStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n position: \"absolute\",\n }),\n };\n }\n\n function backgroundBoxStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n fontSize: 50,\n position: \"absolute\",\n fontFamily: \"Courier New\",\n }),\n };\n }\n\n function backgroundDotStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"white\",\n fontSize: 150,\n position: \"absolute\",\n fontFamily: \"Courier\",\n }),\n };\n }\n\n // render functions\n // render label associated with actors and workobjects\n function renderEmbeddedLabel(parentGfx, element, align, padding) {\n let businessObject = element.businessObject;\n return renderLabel(\n parentGfx,\n businessObject.name,\n {\n box: element,\n align: align,\n padding: padding ? padding : 0,\n style: {\n fill: \"#000000\",\n },\n },\n element.type\n );\n }\n\n // render label associated with activities\n function renderExternalLabel(parentGfx, element) {\n let semantic = element.businessObject;\n let waypoints = element.waypoints;\n let lines = countLines(semantic.name);\n\n if (element.waypoints != null) {\n let position = labelPosition(waypoints, lines);\n let startPoint = element.waypoints[position.selected];\n let endPoint = element.waypoints[position.selected + 1];\n let angle = angleBetween(startPoint, endPoint);\n let alignment = \"left\";\n let boxWidth = 500;\n let xStart = position.x;\n\n // if the activity is horizontal, we want to center the label\n if (angle === 0 || angle === 180) {\n boxWidth = Math.abs(startPoint.x - endPoint.x);\n alignment = \"center\";\n xStart =\n (startPoint.x + endPoint.x) / 2 - calculateTextWidth(semantic.name);\n }\n\n let box = {\n textAlign: alignment,\n width: boxWidth,\n height: 30,\n x: xStart,\n y: position.y,\n };\n\n if (semantic.name && semantic.name.length) {\n return renderLabel(\n parentGfx,\n semantic.name,\n {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n wordWrap: \"break-word\",\n overflowWrap: \"break-word\",\n hyphens: \"auto\",\n }),\n },\n element.type\n );\n }\n }\n }\n\n // render the number associated with an activity\n function renderExternalNumber(parentGfx, element) {\n if (element && element.source) {\n let semantic = element.businessObject;\n\n let box = numberBoxDefinitions(element);\n\n if (\n semantic.number == null &&\n element.source.type &&\n element.source.type.includes(elementTypes.ACTOR)\n ) {\n generateAutomaticNumber(element, commandStack);\n }\n\n // render the background for the number\n if (semantic.number && element.source.type.includes(elementTypes.ACTOR)) {\n generateActivityNumber(parentGfx, element, box);\n } else {\n semantic.number = null;\n }\n }\n }\n\n // render a number on the canvas\n function renderNumber(parentGfx, number, options, type) {\n if (number < 10) {\n number = String(number);\n }\n number = String(number);\n let text = textRenderer.createText(number || \"\", options);\n let height = 0;\n\n svgClasses(text).add(\"djs-labelNumber\");\n\n setCoordinates(type, text, options, height, parentGfx);\n\n svgAppend(parentGfx, text);\n\n drawCircle(parentGfx, options, number.length);\n\n return text;\n }\n\n function drawCircle(parentGfx, options, textLength) {\n const circle = svgCreate(\"circle\");\n svgAttr(circle, {\n cx: options.box.x + 15 + textLength * 3,\n cy: options.box.y - 4,\n r: \"10\",\n style: \"fill:transparent;stroke:black;stroke-width:1\",\n });\n svgAppend(parentGfx, circle);\n }\n\n // the coordinates of the activity label must be set directly and will not be taken from the box\n function setCoordinates(type, text, options, height, parentGfx) {\n if (/:activity$/.test(type)) {\n text.innerHTML = manipulateInnerHTMLXLabel(\n text.children,\n options.box.x,\n 0\n );\n text.innerHTML = manipulateInnerHTMLYLabel(\n text.children,\n options.box.y,\n 0\n );\n } else if (/:actor/.test(type)) {\n height = parentGfx.firstChild.attributes.height.nodeValue;\n text.innerHTML = manipulateInnerHTMLYLabel(text.children, height, 0);\n } else if (/:workObject/.test(type)) {\n height = parentGfx.firstChild.attributes.height.nodeValue;\n text.innerHTML = manipulateInnerHTMLYLabel(text.children, height, 26);\n }\n }\n\n // render a label on the canvas\n function renderLabel(parentGfx, label, options, type) {\n let text = textRenderer.createText(label || \"\", options);\n let height = 0;\n\n svgClasses(text).add(\"djs-label\");\n setCoordinates(type, text, options, height, parentGfx);\n\n svgAppend(parentGfx, text);\n return text;\n }\n\n // determine the Y-coordinate of the label / number to be rendered\n function manipulateInnerHTMLYLabel(children, y, offset) {\n if (children) {\n let result = \"\";\n for (let i = 0; i < children.length; i++) {\n result += children[i].outerHTML.replace(\n /y=\"-?\\d*.\\d*\"/,\n 'y=\"' + (Number(y) + offset + 14 * i) + '\"'\n );\n }\n return result;\n }\n }\n\n // determine the X-coordinate of the label / number to be rendered\n function manipulateInnerHTMLXLabel(children, x, offset) {\n if (children) {\n let result = \"\";\n for (let i = 0; i < children.length; i++) {\n result += children[i].outerHTML.replace(\n /x=\"-?\\d*.\\d*\"/,\n 'x=\"' + (Number(x) + offset + 14) + '\"'\n );\n }\n return result;\n }\n }\n\n // draw functions\n this.drawGroup = function (parentGfx, element) {\n if (!element.businessObject.pickedColor) {\n element.businessObject.pickedColor = DEFAULT_COLOR;\n }\n let rect = drawRect(\n parentGfx,\n element.width,\n element.height,\n 0,\n assign(\n {\n fill: \"none\",\n stroke: element.businessObject.pickedColor,\n },\n element.attrs\n )\n );\n renderEmbeddedLabel(parentGfx, element, \"left-top\", 8);\n\n return rect;\n };\n\n function useColorForElement(element, iconSRC) {\n if (!element.businessObject.pickedColor) {\n element.businessObject.pickedColor = DEFAULT_COLOR;\n }\n const match = iconSRC.match(/fill=\".*?\"/);\n if (match && match.length > 1) {\n return iconSRC.replace(\n /fill=\".*?\"/,\n 'fill=\"' + element.businessObject.pickedColor + '\"'\n );\n } else {\n const index = iconSRC.indexOf(\"' +\n ''\n );\n } else {\n return useColorForElement(element, iconSRC);\n }\n }\n\n this.drawActor = function (parent, element) {\n let svgDynamicSizeAttributes = {\n width: element.width,\n height: element.height,\n },\n actor;\n let iconSRC = iconDictionary.getTypeIconSRC(\n elementTypes.ACTOR,\n element.type\n );\n iconSRC = getIconSrc(iconSRC, element);\n actor = svgCreate(iconSRC);\n\n svgAttr(actor, svgDynamicSizeAttributes);\n svgAppend(parent, actor);\n\n renderEmbeddedLabel(parent, element, \"center\", -5);\n return actor;\n };\n\n this.drawWorkObject = function (parent, element) {\n let svgDynamicSizeAttributes = {\n width: element.width * 0.65,\n height: element.height * 0.65,\n x: element.width / 2 - 25,\n y: element.height / 2 - 25,\n },\n workObject;\n let iconSRC = iconDictionary.getTypeIconSRC(\n elementTypes.WORKOBJECT,\n element.type\n );\n iconSRC = getIconSrc(iconSRC, element);\n workObject = svgCreate(iconSRC);\n\n svgAttr(workObject, svgDynamicSizeAttributes);\n svgAppend(parent, workObject);\n renderEmbeddedLabel(parent, element, \"center\", -5);\n\n return workObject;\n };\n\n function useColorForActivity(element) {\n if (!element.businessObject.pickedColor) {\n element.businessObject.pickedColor = \"black\";\n }\n let attrs = \"\";\n return computeStyle(attrs, {\n stroke: element.businessObject.pickedColor,\n fill: \"none\",\n strokeWidth: 1.5,\n strokeLinejoin: \"round\",\n markerEnd: marker(\n \"activity\",\n \"black\",\n element.businessObject.pickedColor\n ),\n });\n }\n\n this.drawActivity = function (p, element) {\n adjustForTextOverlap(element);\n\n if (element) {\n let attrs = useColorForActivity(element);\n\n let x = svgAppend(p, createLine(element.waypoints, attrs));\n renderExternalLabel(p, element);\n renderExternalNumber(p, element);\n\n // just adjusting the start- and endpoint of the connection-element moves only the drawn connection,\n // not the interactive line. This can be fixed by manually overriding the points of the interactive polyline\n // in the HTMl with the points of the drawn one.\n // this however does not adjust the surrounding box of the connection.\n fixConnectionInHTML(p.parentElement);\n\n return x;\n }\n };\n\n function checkIfPointOverlapsText(point, source) {\n if (point.y > source.y + 60) {\n if (point.x > source.x + 3 && point.x < source.x + 72) {\n let lineOffset = getLineOffset(source);\n if (source.y + 75 + lineOffset > point.y) {\n point.y += lineOffset;\n }\n }\n }\n }\n\n function adjustForTextOverlap(element) {\n let source = element.source;\n let target = element.target;\n\n let waypoints = element.waypoints;\n let startPoint = waypoints[0];\n let endPoint = waypoints[waypoints.length - 1];\n\n if (startPoint && endPoint && source && target) {\n checkIfPointOverlapsText(startPoint, source);\n checkIfPointOverlapsText(endPoint, source);\n }\n }\n\n function getLineOffset(element) {\n let id = element.id;\n let offset = 0;\n\n let objects = document.getElementsByClassName(\"djs-element djs-shape\");\n for (let i = 0; i < objects.length; i++) {\n let data_id = objects.item(i).getAttribute(\"data-element-id\");\n if (data_id === id) {\n let object = objects.item(i);\n let text = object.getElementsByTagName(\"text\")[0];\n let tspans = text.getElementsByTagName(\"tspan\");\n let tspan = tspans[tspans.length - 1];\n offset = tspan.getAttribute(\"y\");\n }\n }\n return offset - 70;\n }\n\n function fixConnectionInHTML(wantedConnection) {\n if (wantedConnection) {\n let polylines = wantedConnection.getElementsByTagName(\"polyline\");\n if (polylines.length > 1) {\n polylines[1].setAttribute(\n \"points\",\n polylines[0].getAttribute(\"points\")\n );\n }\n }\n }\n\n this.drawDSConnection = function (p, element) {\n let attrs = \"\";\n attrs = computeStyle(attrs, {\n stroke: \"#000000\",\n strokeWidth: 1.5,\n strokeLinejoin: \"round\",\n strokeDasharray: \"5, 5\",\n });\n\n return svgAppend(p, createLine(element.waypoints, attrs));\n };\n\n this.drawAnnotation = function (parentGfx, element) {\n let style = {\n fill: \"none\",\n stroke: \"none\",\n };\n\n let text = element.businessObject.text || \"\";\n if (element.businessObject.text) {\n let height = getAnnotationBoxHeight();\n\n if (height === 0 && element.businessObject.number) {\n height = element.businessObject.number;\n }\n assign(element, {\n height: height,\n });\n\n // for some reason the keyword height is not exported, so we use another, which we know will be exported,\n // to ensure persistent annotation heights between sessions\n assign(element.businessObject, {\n number: height,\n });\n }\n\n let textElement = drawRect(\n parentGfx,\n element.width,\n element.height,\n 0,\n 0,\n style\n );\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n drawPath(parentGfx, textPathData, {\n stroke: \"black\",\n });\n\n renderLabel(parentGfx, text, {\n box: element,\n align: \"left-top\",\n padding: 5,\n style: {\n fill: \"black\",\n },\n });\n\n return textElement;\n };\n\n // draw helper functions\n function drawPath(parentGfx, d, attrs) {\n attrs = computeStyle(attrs, [\"no-fill\"], {\n strokeWidth: 2,\n stroke: \"black\",\n });\n\n let path = svgCreate(\"path\");\n svgAttr(path, { d: d });\n svgAttr(path, attrs);\n\n svgAppend(parentGfx, path);\n\n return path;\n }\n\n function drawRect(parentGfx, width, height, r, offset, attrs) {\n if (isObject(offset)) {\n attrs = offset;\n offset = 0;\n }\n\n offset = offset || 0;\n attrs = computeStyle(attrs, {\n stroke: \"black\",\n strokeWidth: 2,\n fill: \"white\",\n });\n\n let rect = svgCreate(\"rect\");\n svgAttr(rect, {\n x: offset,\n y: offset,\n width: width - offset * 2,\n height: height - offset * 2,\n rx: r,\n ry: r,\n });\n\n svgAttr(rect, attrs);\n svgAppend(parentGfx, rect);\n\n return rect;\n }\n\n // marker functions\n function marker(type, fill, stroke) {\n let id = type + \"-\" + fill + \"-\" + stroke + \"-\" + rendererId;\n\n if (!markers[id]) {\n createMarker(type, fill, stroke);\n }\n return \"url(#\" + id + \")\";\n }\n\n function createMarker(type, fill, stroke) {\n let id = type + \"-\" + fill + \"-\" + stroke + \"-\" + rendererId;\n\n if (type === \"activity\") {\n let sequenceflowEnd = svgCreate(\"path\");\n svgAttr(sequenceflowEnd, { d: \"M 1 5 L 11 10 L 1 15 Z\" });\n\n addMarker(id, {\n element: sequenceflowEnd,\n ref: { x: 11, y: 10 },\n scale: 0.5,\n attrs: {\n fill: stroke,\n stroke: stroke,\n },\n });\n }\n }\n\n function addMarker(id, options) {\n let attrs = assign(\n {\n fill: \"black\",\n strokeWidth: 1,\n strokeLinecap: \"round\",\n strokeDasharray: \"none\",\n },\n options.attrs\n );\n\n let ref = options.ref || { x: 0, y: 0 };\n let scale = options.scale || 1;\n\n // resetting stroke dash array\n if (attrs.strokeDasharray === \"none\") {\n attrs.strokeDasharray = [10000, 1];\n }\n\n let marker = svgCreate(\"marker\");\n\n svgAttr(options.element, attrs);\n svgAppend(marker, options.element);\n svgAttr(marker, {\n id: id,\n viewBox: \"0 0 20 20\",\n refX: ref.x,\n refY: ref.y,\n markerWidth: 20 * scale,\n markerHeight: 20 * scale,\n orient: \"auto\",\n });\n\n let defs = domQuery(\"defs\", canvas._svg);\n if (!defs) {\n defs = svgCreate(\"defs\");\n svgAppend(canvas._svg, defs);\n }\n svgAppend(defs, marker);\n markers[id] = marker;\n }\n\n // path functions\n this.getWorkObjectPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n\n this.getGroupPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n\n this.getActivityPath = function (connection) {\n let waypoints = connection.waypoints.map(function (p) {\n return p.original || p;\n });\n\n let activityPath = [[\"M\", waypoints[0].x, waypoints[0].y]];\n\n waypoints.forEach(function (waypoint, index) {\n if (index !== 0) {\n activityPath.push([\"L\", waypoint.x, waypoint.y]);\n }\n });\n return componentsToPath(activityPath);\n };\n\n this.getActorPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n}\n\ninherits(DomainStoryRenderer, BaseRenderer);\n\nDomainStoryRenderer.$inject = [\n \"eventBus\",\n \"styles\",\n \"canvas\",\n \"textRenderer\",\n \"pathMap\",\n \"commandStack\",\n];\n\nDomainStoryRenderer.prototype.canRender = function (element) {\n return /^domainStory:/.test(element.type);\n};\n\nDomainStoryRenderer.prototype.drawShape = function (p, element) {\n // polyfill for tests\n if (!String.prototype.startsWith) {\n Object.defineProperty(String.prototype, \"startsWith\", {\n value: function (search, pos) {\n pos = !pos || pos < 0 ? 0 : +pos;\n return this.substring(pos, pos + search.length) === search;\n },\n });\n }\n\n let type = element.type;\n element.businessObject.type = type;\n\n elementRegistry.correctInitialize();\n dirtyFlag.makeDirty();\n\n if (type.includes(elementTypes.ACTOR)) {\n return this.drawActor(p, element);\n } else if (type.includes(elementTypes.WORKOBJECT)) {\n return this.drawWorkObject(p, element);\n } else if (type.includes(elementTypes.TEXTANNOTATION)) {\n return this.drawAnnotation(p, element);\n } else if (type.includes(elementTypes.GROUP)) {\n return this.drawGroup(p, element);\n }\n};\n\nDomainStoryRenderer.prototype.getShapePath = function (shape) {\n let type = shape.type;\n\n if (type.includes(elementTypes.ACTOR)) {\n return this.getActorPath(shape);\n } else if (type.includes(elementTypes.WORKOBJECT)) {\n return this.getWorkObjectPath(shape);\n } else if (type.includes(elementTypes.GROUP)) {\n return this.getGroupPath(shape);\n }\n};\n\nDomainStoryRenderer.prototype.drawConnection = function (p, element) {\n let type = element.type;\n\n dirtyFlag.makeDirty();\n\n // fixes activities that were copy-pasted\n if (!element.businessObject.type) {\n element.businessObject.type = type;\n }\n if (type === elementTypes.ACTIVITY) {\n return this.drawActivity(p, element);\n } else if (type === elementTypes.CONNECTION) {\n return this.drawDSConnection(p, element);\n }\n};\n\n// creates a SVG path that describes a rectangle which encloses the given shape.\nfunction getRectPath(shape) {\n let offset = 5;\n let x = shape.x,\n y = shape.y,\n width = shape.width / 2 + offset,\n height = shape.height / 2 + offset;\n\n return [\n [\"M\", x, y],\n [\"l\", width, 0],\n [\"l\", width, height],\n [\"l\", -width, height],\n [\"l\", -width, 0],\n [\"z\"],\n ];\n}\n","\"use strict\";\n\nimport { assign, every, reduce } from \"min-dash\";\n\nimport inherits from \"inherits\";\n\nimport RuleProvider from \"diagram-js/lib/features/rules/RuleProvider\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { is } from \"./util\";\n\nconst HIGH_PRIORITY = 1500;\nconst MIN_SIZE = 125;\n\nfunction isDomainStory(element) {\n return element && /^domainStory:/.test(element.type);\n}\n\nfunction isDomainStoryGroup(element) {\n return element && /^domainStory:group/.test(element.type);\n}\n\nfunction isActor(element) {\n return element && /^domainStory:actor\\w*/.test(element.type);\n}\n\nfunction isWorkObject(element) {\n return element && /^domainStory:workObject/.test(element.type);\n}\n\nfunction isActivity(element) {\n return element && /^domainStory:activity/.test(element.type);\n}\n\nfunction isConnection(element) {\n return element && /^domainStory:connection/.test(element.type);\n}\n\nfunction isAnnotation(element) {\n return element && /^domainStory:textAnnotation/.test(element.type);\n}\n\n/**\n * can source and target be connected?\n */\nfunction canConnect(source, target) {\n // only judge about two custom elements\n if (\n isDomainStoryGroup(target) ||\n !isDomainStory(source) ||\n !isDomainStory(target)\n ) {\n return;\n }\n\n // do not allow a connection from one element to itself\n if (source === target) {\n return;\n }\n\n // do not allow a connection between two actors\n if (isActor(source) && isActor(target)) {\n return;\n }\n\n // do not allow a connection, where the source or target is an activity\n if (isActivity(source) || isActivity(target)) {\n return;\n }\n\n // do not allow a connection, where the source or target is an annotation connection\n if (isConnection(source) || isConnection(target)) {\n return;\n }\n\n // do not allow a connection to a connection(the special type of connection between an element and a comment box)\n // when the target is an annotation, the connection type is an annotation connection instead of an activity\n if (isAnnotation(target)) {\n return { type: elementTypes.CONNECTION };\n }\n\n return { type: elementTypes.ACTIVITY };\n}\n\nfunction canResize(shape, newBounds) {\n if (is(shape, elementTypes.GROUP)) {\n if (newBounds) {\n let lowerLeft = { x: shape.x, y: shape.y + shape.height };\n let lowerRight = { x: shape.x + shape.width, y: shape.y + shape.height };\n let upperRight = { x: shape.x + shape.width, y: shape.y };\n\n if (newBounds.x !== shape.x && newBounds.y !== shape.y) {\n // upper left\n if (newBounds.x > lowerRight.x - MIN_SIZE) {\n assign(newBounds, { x: lowerRight.x - MIN_SIZE });\n }\n if (newBounds.y > lowerRight.y - MIN_SIZE) {\n assign(newBounds, { y: lowerRight.y - MIN_SIZE });\n }\n }\n\n if (newBounds.x !== shape.x && newBounds.y === shape.y) {\n // lower left\n if (newBounds.x > upperRight.x - MIN_SIZE) {\n assign(newBounds, { x: upperRight.x - MIN_SIZE });\n }\n }\n\n if (newBounds.x === shape.x && newBounds.y !== shape.y) {\n // upper right\n if (newBounds.y > lowerLeft.y - MIN_SIZE) {\n assign(newBounds, { y: lowerLeft.y - MIN_SIZE });\n }\n }\n\n if (newBounds.height < MIN_SIZE) {\n assign(newBounds, {\n height: MIN_SIZE,\n });\n }\n if (newBounds.width < MIN_SIZE) {\n assign(newBounds, {\n width: MIN_SIZE,\n });\n }\n }\n return true;\n }\n\n return false;\n}\n\nfunction canAttach(elements, target, source) {\n if (!Array.isArray(elements)) {\n elements = [elements];\n }\n\n // disallow appending as boundary event\n if (source) {\n return false;\n }\n\n // only (re-)attach one element at a time\n if (elements.length !== 1) {\n return false;\n }\n\n // allow default move operation\n if (!target) {\n return true;\n }\n\n // only allow drop on DomainStory Elements\n if (!isDomainStory(target)) {\n return false;\n }\n\n return \"attach\";\n}\n\nfunction canConnectToAnnotation(source, target, connection) {\n // do not allow an activity connect to an annotation\n if (isActivity(connection) && isAnnotation(target)) {\n return false;\n }\n\n // do not allow an annotation connection between two annotations\n if (\n isConnection(connection) &&\n isAnnotation(source) &&\n isAnnotation(target)\n ) {\n return false;\n }\n\n // do not allow an annotation connection between an actor or workObject and anything except an annotation\n return !(\n isConnection(connection) &&\n !isAnnotation(target) &&\n (isActor(source) || isWorkObject(source))\n );\n}\n\n/**\n * specific rules for custom elements\n */\nexport default function DomainStoryRules(eventBus) {\n RuleProvider.call(this, eventBus);\n}\n\ninherits(DomainStoryRules, RuleProvider);\n\nDomainStoryRules.$inject = [\"eventBus\"];\n\nDomainStoryRules.prototype.init = function () {\n /**\n * can shape be created on target container?\n */\n function canCreate(shape, target) {\n // only judge about custom elements\n if (!isDomainStory(shape)) {\n return;\n }\n\n // allow creation just on groups\n return !isDomainStory(target) || isDomainStoryGroup(target);\n }\n\n this.addRule(\"elements.create\", function (context) {\n const elements = context.elements,\n position = context.position,\n target = context.target;\n\n return every(elements, function (element) {\n if (isConnection(element)) {\n return canConnect(element.source, element.target, element);\n }\n\n if (element.host) {\n return canAttach(element, element.host, null, position);\n }\n\n return canCreate(element, target, null, position);\n });\n });\n\n this.addRule(\"elements.move\", HIGH_PRIORITY, function (context) {\n let target = context.target,\n shapes = context.shapes;\n\n let type;\n\n // do not allow mixed movements of custom / BPMN shapes\n // if any shape cannot be moved, the group cannot be moved, too\n\n // reject, if we have at least one\n // custom element that cannot be moved\n return reduce(\n shapes,\n function (result, s) {\n if (type === undefined) {\n type = isDomainStory(s);\n }\n\n if (type !== isDomainStory(s) || result === false) {\n return false;\n }\n\n return canCreate(s, target);\n },\n undefined\n );\n });\n\n this.addRule(\"shape.create\", HIGH_PRIORITY, function (context) {\n let target = context.target,\n shape = context.shape;\n\n return canCreate(shape, target);\n });\n\n this.addRule(\"connection.create\", HIGH_PRIORITY, function (context) {\n let source = context.source,\n target = context.target;\n\n return canConnect(source, target);\n });\n\n this.addRule(\"connection.reconnect\", HIGH_PRIORITY, function (context) {\n let connection = context.connection,\n source = context.hover || context.source,\n target = context.target;\n\n // --------------------------------------------------------------\n let result = canConnectToAnnotation(source, target, connection);\n\n if (!result) {\n return;\n }\n\n // --------------------------------------------------------------\n\n return canConnect(source, target, connection);\n });\n\n this.addRule(\"shape.resize\", function (context) {\n let shape = context.shape,\n newBounds = context.newBounds;\n\n return canResize(shape, newBounds);\n });\n};\n\nDomainStoryRules.prototype.canConnect = canConnect;\nDomainStoryRules.prototype.canAttach = canAttach;\nDomainStoryRules.prototype.isDomainStory = isDomainStory;\nDomainStoryRules.prototype.canResize = canResize;\n","\"use strict\";\n\nimport inherits from \"inherits\";\n\nimport { pick, assign } from \"min-dash\";\n\nimport CommandInterceptor from \"diagram-js/lib/command/CommandInterceptor\";\n\nimport {\n add as collectionAdd,\n remove as collectionRemove,\n} from \"diagram-js/lib/util/Collections\";\n\nimport { reworkGroupElements } from \"./util\";\nimport { elementTypes } from \"../../Domain/Common/elementTypes\";\n\n/**\n * a handler responsible for updating the custom element's businessObject\n * once changes on the diagram happen.\n */\nexport default function DomainStoryUpdater(eventBus, bpmnjs) {\n CommandInterceptor.call(this, eventBus);\n\n function updateCustomElement(e) {\n let context = e.context,\n shape = context.shape,\n businessObject = shape.businessObject;\n\n if (!shape || !shape.type.includes(elementTypes.DOMAINSTORY)) {\n return;\n }\n\n let parent = shape.parent;\n let customElements = bpmnjs._customElements;\n\n // make sure element is added / removed from bpmnjs.customElements\n if (!parent) {\n collectionRemove(customElements, businessObject);\n } else {\n collectionAdd(customElements, businessObject);\n }\n\n // save custom element position\n assign(businessObject, pick(shape, [\"x\", \"y\"]));\n\n // save custom element size if resizable\n if (shape.type === elementTypes.GROUP) {\n assign(businessObject, pick(shape, [\"height\", \"width\"]));\n\n // rework the child-parent relations if a group was moved, such that all Objects that are visually in the group are also associated with it\n // since we do not have access to the standard-canvas object here, we cannot use the function correctGroupChildren() from DSLabelUtil\n if (parent != null) {\n reworkGroupElements(parent, shape);\n }\n }\n if (\n shape &&\n shape.parent &&\n \"type\" in shape.parent &&\n shape.parent.type === elementTypes.GROUP\n ) {\n assign(businessObject, {\n parent: shape.parent.id,\n });\n }\n }\n\n function updateCustomConnection(e) {\n let context = e.context,\n connection = context.connection,\n source = connection.source,\n target = connection.target,\n businessObject = connection.businessObject;\n\n if (e.newTarget) {\n target = e.newTarget;\n }\n if (e.newSource) {\n source = e.newSource;\n }\n\n let parent = connection.parent;\n let customElements = bpmnjs._customElements;\n\n // make sure element is added / removed from bpmnjs.customElements\n if (!parent) {\n collectionRemove(customElements, businessObject);\n } else {\n collectionAdd(customElements, businessObject);\n }\n\n // update waypoints\n assign(businessObject, {\n waypoints: copyWaypoints(connection),\n });\n\n if (source) {\n if (!businessObject.source) {\n assign(businessObject, { source: source.id });\n } else {\n businessObject.source = source.id;\n }\n }\n if (target) {\n if (!businessObject.target) {\n assign(businessObject, { target: target.id });\n } else {\n businessObject.target = target.id;\n }\n }\n }\n\n function copyWaypoints(connection) {\n return connection.waypoints.map(function (p) {\n if (p.original) {\n return {\n original: {\n x: p.original.x,\n y: p.original.y,\n },\n x: p.x,\n y: p.y,\n };\n } else {\n return {\n x: p.x,\n y: p.y,\n };\n }\n });\n }\n\n this.executed(\n [\n \"shape.create\",\n \"shape.move\",\n \"shape.delete\",\n \"shape.resize\",\n \"shape.removeGroupWithChildren\",\n ],\n ifDomainStoryElement(updateCustomElement)\n );\n\n this.reverted(\n [\n \"shape.create\",\n \"shape.move\",\n \"shape.delete\",\n \"shape.resize\",\n \"shape.removeGroupWithChildren\",\n ],\n ifDomainStoryElement(updateCustomElement)\n );\n\n this.executed(\n [\n \"connection.create\",\n \"connection.reconnect\",\n \"connection.updateWaypoints\",\n \"connection.delete\",\n \"connection.layout\",\n \"connection.move\",\n ],\n ifDomainStoryElement(updateCustomConnection)\n );\n\n this.reverted(\n [\n \"connection.create\",\n \"connection.reconnect\",\n \"connection.updateWaypoints\",\n \"connection.delete\",\n \"connection.layout\",\n \"connection.move\",\n ],\n ifDomainStoryElement(updateCustomConnection)\n );\n}\n\n// check if element in the context of an event is a domainStory element\nfunction ifDomainStoryElement(fn) {\n return (event) => {\n const context = event.context;\n const element = context.shape || context.connection;\n\n if (isDomainStory(element)) {\n fn(event);\n }\n };\n}\n\nfunction isDomainStory(element) {\n return element && /domainStory:/.test(element.type);\n}\n\ninherits(DomainStoryUpdater, CommandInterceptor);\n\nDomainStoryUpdater.$inject = [\"eventBus\", \"bpmnjs\"];\n","\"use strict\";\n\nimport DomainStoryElementFactory from \"./domainStoryElementFactory\";\nimport DomainStoryRenderer from \"./domainStoryRenderer\";\nimport DomainStoryPalette from \"./palette/domainStoryPalette\";\nimport DomainStoryRules from \"./domainStoryRules\";\nimport DomainStoryUpdater from \"./domainStoryUpdater\";\nimport ElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\nimport CreateModule from \"diagram-js/lib/features/create\";\nimport PathMap from \"bpmn-js/lib/draw/PathMap\";\nimport PopupMenuModule from \"bpmn-js/lib/features/popup-menu\";\nimport ContextPadModule from \"diagram-js/lib/features/context-pad\";\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"./updateHandler/updateLabelHandler\";\nimport headlineAndDescriptionUpdateHandler from \"./updateHandler/headlineAndDescriptionUpdateHandler\";\nimport DomainStoryContextPadProvider from \"./context-pad/domainStoryContextPadProvider\";\nimport ReplaceMenuProvider from \"./change-icon/replaceMenuProvider\";\nimport DSModeling from \"./modeling/dSModeling\";\n\nexport default {\n __depends__: [CreateModule, ContextPadModule, PopupMenuModule],\n __init__: [\n \"domainStoryRenderer\",\n \"paletteProvider\",\n \"domainStoryRules\",\n \"domainStoryUpdater\",\n \"contextPadProvider\",\n \"replaceMenuProvider\",\n ],\n elementFactory: [\"type\", DomainStoryElementFactory],\n domainStoryRenderer: [\"type\", DomainStoryRenderer],\n paletteProvider: [\"type\", DomainStoryPalette],\n domainStoryRules: [\"type\", DomainStoryRules],\n domainStoryUpdater: [\"type\", DomainStoryUpdater],\n contextPadProvider: [\"type\", DomainStoryContextPadProvider],\n elementFactoryBpmn: [\"type\", ElementFactory],\n pathMap: [\"type\", PathMap],\n replaceMenuProvider: [\"type\", ReplaceMenuProvider],\n commandStack: [\"type\", CommandStack],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n headlineAndDescriptionUpdateHandler: [\n \"type\",\n headlineAndDescriptionUpdateHandler,\n ],\n modeling: [\"type\", DSModeling],\n};\n","\"use strict\";\n\nimport {\n append as svgAppend,\n attr as svgAttr,\n create as svgCreate,\n remove as svgRemove,\n} from \"tiny-svg\";\n\nimport { translate } from \"diagram-js/lib/util/SvgTransformUtil\";\nimport { elementTypes } from \"../../../Domain/Common/elementTypes\";\nimport { is } from \"../util\";\n\nconst MARKER_HIDDEN = \"djs-element-hidden\",\n MARKER_LABEL_HIDDEN = \"djs-label-hidden\";\n\nlet annotationBoxHeight = 0;\n\nexport function getAnnotationBoxHeight() {\n return annotationBoxHeight;\n}\n\nexport default function DSLabelEditingPreview(eventBus, canvas, pathMap) {\n let self = this;\n\n let defaultLayer = canvas.getDefaultLayer();\n let element, absoluteElementBBox, gfx;\n\n eventBus.on(\"directEditing.activate\", function (context) {\n let activeProvider = context.active;\n\n element = activeProvider.element.label || activeProvider.element;\n\n // text annotation\n if (is(element, elementTypes.TEXTANNOTATION)) {\n absoluteElementBBox = canvas.getAbsoluteBBox(element);\n\n gfx = svgCreate(\"g\");\n\n annotationBoxHeight = element.height;\n\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n let path = (self.path = svgCreate(\"path\"));\n\n svgAttr(path, {\n d: textPathData,\n strokeWidth: 2,\n stroke: getStrokeColor(element),\n });\n\n svgAppend(gfx, path);\n\n svgAppend(defaultLayer, gfx);\n\n translate(gfx, element.x, element.y);\n }\n\n if (is(element, elementTypes.TEXTANNOTATION) || element.labelTarget) {\n canvas.addMarker(element, MARKER_HIDDEN);\n } else if (\n element.type.includes(elementTypes.ACTOR) ||\n element.type.includes(elementTypes.WORKOBJECT) ||\n element.type.includes(elementTypes.ACTIVITY) ||\n element.type.includes(elementTypes.GROUP)\n ) {\n canvas.addMarker(element, MARKER_LABEL_HIDDEN);\n }\n });\n\n eventBus.on(\"directEditing.resize\", function (context) {\n // text annotation\n if (is(element, elementTypes.TEXTANNOTATION)) {\n let height = context.height,\n dy = context.dy;\n\n let newElementHeight = Math.max(\n (element.height / absoluteElementBBox.height) * (height + dy),\n 0\n );\n annotationBoxHeight = newElementHeight;\n\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: newElementHeight,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n svgAttr(self.path, {\n d: textPathData,\n });\n }\n });\n\n eventBus.on(\n [\"directEditing.complete\", \"directEditing.cancel\"],\n function (context) {\n let activeProvider = context.active;\n\n if (activeProvider) {\n canvas.removeMarker(\n activeProvider.element.label || activeProvider.element,\n MARKER_HIDDEN\n );\n canvas.removeMarker(element, MARKER_LABEL_HIDDEN);\n }\n\n element = undefined;\n absoluteElementBBox = undefined;\n\n if (gfx) {\n svgRemove(gfx);\n\n gfx = undefined;\n }\n }\n );\n}\n\nDSLabelEditingPreview.$inject = [\"eventBus\", \"canvas\", \"pathMap\"];\n\n// helpers ///////////////////\n\nfunction getStrokeColor() {\n return \"black\";\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\nimport { autocomplete, getLabel } from \"./dsLabelUtil\";\n\nimport { isAny } from \"bpmn-js/lib/features/modeling/util/ModelingUtil\";\n\nimport {\n getExternalLabelMid,\n hasExternalLabel,\n isLabel,\n isLabelExternal,\n} from \"bpmn-js/lib/util/LabelUtil\";\n\nimport { elementTypes } from \"../../../Domain/Common/elementTypes\";\nimport { is } from \"../util\";\n\nlet dictionaryService;\n\nlet numberStash = 0;\nlet stashUse = false;\n\nexport function initializeLabelEditingProvider(labelingDictionary) {\n dictionaryService = labelingDictionary;\n}\n\nexport function getNumberStash() {\n let number = { use: stashUse, number: numberStash };\n stashUse = false;\n return number;\n}\n\nexport function toggleStashUse(use) {\n stashUse = use;\n}\n\nexport function focusElement(element) {\n // Opening a Angular Dialog seems to mess with the focus logic somehow.\n // My guess is that is makes the mousedown event passive, which prevents \"preventDefault\" from intercepting.\n // I am not sure how to fix it, but this seems to be a workaround.\n setTimeout(() => element.focus(), 0);\n}\n\nexport default function DSLabelEditingProvider(\n eventBus,\n canvas,\n directEditing,\n modeling,\n resizeHandles,\n textRenderer,\n updateLabelHandler\n) {\n this._canvas = canvas;\n this._modeling = modeling;\n this._textRenderer = textRenderer;\n this._updateLabelHandler = updateLabelHandler;\n\n directEditing.registerProvider(this);\n\n // listen to dblclick on non-root elements\n eventBus.on(\"element.dblclick\", function (event) {\n activateDirectEdit(event.element, true);\n if (is(event.element, elementTypes.ACTIVITY)) {\n // if we edit an activity, we do not want the standard editing box\n numberStash = event.element.businessObject.number;\n stashUse = true;\n directEditing.complete();\n }\n });\n\n // complete on followup canvas operation\n eventBus.on(\n [\n \"element.mousedown\",\n \"drag.init\",\n \"canvas.viewbox.changing\",\n \"autoPlace\",\n \"popupMenu.open\",\n ],\n function () {\n if (directEditing.isActive()) {\n directEditing.complete();\n }\n }\n );\n\n // cancel on command stack changes\n eventBus.on([\"commandStack.changed\"], function () {\n if (directEditing.isActive()) {\n directEditing.cancel();\n }\n });\n\n eventBus.on(\"directEditing.activate\", function (event) {\n resizeHandles.removeResizers();\n let element = event.active.element;\n createAutocomplete(element);\n });\n\n eventBus.on(\"create.end\", 500, function (event) {\n let element = event.shape,\n canExecute = event.context.canExecute,\n isTouch = event.isTouch;\n\n if (isTouch) {\n return;\n }\n\n if (!canExecute) {\n return;\n }\n if (!is(element, elementTypes.ACTIVITY)) {\n activateDirectEdit(element);\n }\n let editingBox = document.getElementsByClassName(\n \"djs-direct-editing-content\"\n );\n focusElement(editingBox.item(0));\n });\n\n eventBus.on(\"autoPlace.end\", 500, function (event) {\n activateDirectEdit(event.shape);\n });\n\n function activateDirectEdit(element, force) {\n if (\n force ||\n isAny(element, [elementTypes.TEXTANNOTATION]) ||\n element.businessObject.type.includes(elementTypes.DOMAINSTORY)\n ) {\n directEditing.activate(element);\n }\n }\n\n function createAutocomplete(element) {\n let editingBox = document.getElementsByClassName(\n \"djs-direct-editing-content\"\n );\n focusElement(editingBox.item(0));\n autocomplete(\n editingBox[0],\n dictionaryService.getUniqueWorkObjectNames(),\n element,\n eventBus\n );\n }\n}\n\nDSLabelEditingProvider.$inject = [\n \"eventBus\",\n \"canvas\",\n \"directEditing\",\n \"modeling\",\n \"resizeHandles\",\n \"textRenderer\",\n \"updateLabelHandler\",\n];\n\n/**\n * activate direct editing for activities and text annotations.\n *\n * @param {djs.model.Base} element\n *\n * @return {Object} an object with properties bounds (position and size), text and options\n */\nDSLabelEditingProvider.prototype.activate = function (element) {\n // text\n if (element.id === \"__implicitrootbase\") {\n return;\n }\n let text = getLabel(element);\n\n if (text === undefined) {\n return;\n }\n\n let context = {\n text: text,\n };\n\n // bounds\n let bounds = this.getEditingBBox(element);\n\n assign(context, bounds);\n\n let options = {};\n\n // external labels\n if (isLabelExternal(element)) {\n assign(options, {\n autoResize: true,\n });\n }\n\n // text annotations\n if (is(element, elementTypes.TEXTANNOTATION)) {\n assign(options, {\n resizable: true,\n autoResize: true,\n });\n }\n\n assign(context, {\n options: options,\n });\n\n return context;\n};\n\n/**\n * get the editing bounding box based on the element's size and position\n *\n * @param {djs.model.Base} element\n *\n * @return {Object} an object containing information about position\n * and size (fixed or minimum and/or maximum)\n */\nDSLabelEditingProvider.prototype.getEditingBBox = function (element) {\n let canvas = this._canvas;\n\n let target = element.label || element;\n\n let bbox = canvas.getAbsoluteBBox(target);\n\n let mid = {\n x: bbox.x + bbox.width / 2,\n y: bbox.y + bbox.height / 2,\n };\n\n // default position\n let bounds = { x: bbox.x, y: bbox.y };\n\n /** The cavnas is an Object from BPMN, the IDE might say, that zoom is deprecated,\n * because it thinks canvas is the standard HTMLElement. -> Needs to stay toom **/\n let zoom = canvas.zoom();\n let defaultStyle = this._textRenderer.getDefaultStyle(),\n externalStyle = this._textRenderer.getExternalStyle();\n\n // take zoom into account\n let externalFontSize = externalStyle.fontSize * zoom,\n externalLineHeight = externalStyle.lineHeight,\n defaultFontSize = defaultStyle.fontSize * zoom,\n defaultLineHeight = defaultStyle.lineHeight;\n\n let style = {\n fontFamily: this._textRenderer.getDefaultStyle().fontFamily,\n fontWeight: this._textRenderer.getDefaultStyle().fontWeight,\n };\n\n // adjust for groups\n if (is(element, elementTypes.GROUP)) {\n assign(bounds, {\n minWidth: bbox.width / 2.5 > 125 ? bbox.width / 2.5 : 125,\n maxWidth: bbox.width,\n minHeight: 30 * zoom,\n x: bbox.x,\n y: bbox.y,\n });\n\n assign(style, {\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n textAlign: \"left\",\n });\n }\n\n // internal labels for tasks and collapsed call activities,\n // sub processes and participants\n if (\n /^domainStory:actor\\w*/.test(element.type) ||\n /^domainStory:workObject\\w*/.test(element.type)\n ) {\n assign(bounds, {\n width: bbox.width,\n minHeight: 30,\n y: bbox.y + bbox.height - 20,\n x: bbox.x,\n });\n\n assign(style, {\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n });\n }\n\n let width = 90 * zoom,\n paddingTop = 7 * zoom,\n paddingBottom = 4 * zoom;\n\n // external labels for events, data elements, gateways and connections\n if (target.labelTarget) {\n assign(bounds, {\n width: width,\n height: bbox.height + paddingTop + paddingBottom,\n x: mid.x - width / 2,\n y: bbox.y - paddingTop,\n });\n\n assign(style, {\n fontSize: externalFontSize + \"px\",\n lineHeight: externalLineHeight,\n paddingTop: paddingTop + \"px\",\n paddingBottom: paddingBottom + \"px\",\n });\n }\n\n // external label not yet created\n if (\n isLabelExternal(target) &&\n !hasExternalLabel(target) &&\n !isLabel(target)\n ) {\n let externalLabelMid = getExternalLabelMid(element);\n\n let absoluteBBox = canvas.getAbsoluteBBox({\n x: externalLabelMid.x,\n y: externalLabelMid.y,\n width: 0,\n height: 0,\n });\n\n let height = externalFontSize + paddingTop + paddingBottom;\n\n assign(bounds, {\n width: width,\n height: height,\n x: absoluteBBox.x - width / 2,\n y: absoluteBBox.y - height / 2,\n });\n\n assign(style, {\n fontSize: externalFontSize + \"px\",\n lineHeight: externalLineHeight,\n paddingTop: paddingTop + \"px\",\n paddingBottom: paddingBottom + \"px\",\n });\n }\n\n // text annotations\n if (is(element, elementTypes.TEXTANNOTATION)) {\n assign(bounds, {\n width: bbox.width,\n height: bbox.height,\n minWidth: 30 * zoom,\n minHeight: 10 * zoom,\n });\n\n assign(style, {\n textAlign: \"left\",\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n });\n }\n\n return { bounds: bounds, style: style };\n};\n\nDSLabelEditingProvider.prototype.update = function (\n element,\n newLabel,\n activeContextText,\n bounds\n) {\n let newBounds, bbox;\n\n if (is(element, elementTypes.TEXTANNOTATION)) {\n bbox = this._canvas.getAbsoluteBBox(element);\n\n newBounds = {\n x: element.x,\n y: element.y,\n width: (element.width / bbox.width) * bounds.width,\n height: (element.height / bbox.height) * bounds.height,\n };\n }\n\n this._modeling.updateLabel(element, newLabel, newBounds);\n};\n","\"use strict\";\n\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { is } from \"../util\";\n\nfunction getLabelAttr(semantic) {\n if (\n semantic.type.includes(elementTypes.ACTOR) ||\n semantic.type.includes(elementTypes.WORKOBJECT) ||\n semantic.type.includes(elementTypes.ACTIVITY) ||\n semantic.type.includes(elementTypes.GROUP)\n ) {\n return \"name\";\n }\n\n if (is(semantic, elementTypes.TEXTANNOTATION)) {\n return \"text\";\n }\n}\n\nfunction getNumberAttr(semantic) {\n if (is(semantic, elementTypes.ACTIVITY)) {\n return \"number\";\n }\n}\n\nexport function getLabel(element) {\n let semantic;\n if (element.businessObject) {\n semantic = element.businessObject;\n } else {\n semantic = element;\n }\n let attr = getLabelAttr(semantic);\n if (attr && semantic) {\n return semantic[attr] || \"\";\n }\n}\n\nexport function getNumber(element) {\n let semantic = element.businessObject,\n attr = getNumberAttr(semantic);\n\n if (attr) {\n return semantic[attr] || \"\";\n }\n}\n\nexport function setLabel(element, text) {\n let semantic;\n if (element.businessObject) {\n semantic = element.businessObject;\n } else {\n semantic = element;\n }\n let attr = getLabelAttr(semantic);\n\n if (attr) {\n semantic[attr] = text;\n }\n return element;\n}\n\nexport function setNumber(element, textNumber) {\n let semantic = element.businessObject,\n attr = getNumberAttr(semantic);\n\n if (attr) {\n semantic[attr] = textNumber;\n }\n\n return element;\n}\n\n// select at which part of the activity the label should be attached to\nexport function selectPartOfActivity(waypoints, angleActivity) {\n let selectedActivity = 0;\n let linelength = 49;\n\n for (let i = 0; i < waypoints.length; i++) {\n if (angleActivity[i] === 0 || angleActivity[i] === 180) {\n let length = Math.abs(waypoints[i].x - waypoints[i + 1].x);\n if (length > linelength) {\n selectedActivity = i;\n }\n }\n }\n return selectedActivity;\n}\n\n// approximate the width of the label text, standard fontsize: 11\nexport function calculateTextWidth(text) {\n if (!text) {\n return 0;\n }\n\n let fontsize = text.length * 5.1;\n fontsize = fontsize / 2;\n\n // add an initial offset to the absolute middle of the activity\n fontsize += 20;\n return fontsize;\n}\n\n/**\n * copied from https://www.w3schools.com/howto/howto_js_autocomplete.asp on 18.09.2018\n */\nexport function autocomplete(input, workObjectNames, element, eventBus) {\n closeAllLists();\n\n /* the autocomplete function takes three arguments,\n the text field element and an array of possible autocompleted values and an optional element to which it is appended:*/\n let currentFocus, filteredWorkObjectNames;\n\n /* execute a function when someone writes in the text field:*/\n input.addEventListener(\"input\", function () {\n if (workObjectNames.length === 0) {\n return;\n }\n\n /* the direct editing field of actors and workobjects is a recycled html-element and has old values that need to be overridden*/\n if (element.type.includes(elementTypes.WORKOBJECT)) {\n this.value = this.innerHTML;\n }\n let autocompleteList,\n autocompleteItem,\n val = this.value;\n\n /* close any already open lists of autocompleted values*/\n closeAllLists();\n currentFocus = -1;\n\n /* create a DIV element that will contain the items (values):*/\n autocompleteList = document.createElement(\"DIV\");\n autocompleteList.setAttribute(\"id\", \"autocomplete-list\");\n autocompleteList.setAttribute(\"class\", \"autocomplete-items\");\n\n /* append the DIV element as a child of the autocomplete container:*/\n this.parentNode.appendChild(autocompleteList);\n\n /* for each item in the array...*/\n filteredWorkObjectNames = [];\n for (const name of workObjectNames) {\n /* check if the item starts with the same letters as the text field value:*/\n if (val) {\n if (name.substring(0, val.length).toUpperCase() === val.toUpperCase()) {\n /* create a DIV element for each matching element:*/\n autocompleteItem = document.createElement(\"DIV\");\n\n /* make the matching letters bold:*/\n autocompleteItem.innerHTML =\n \"\" +\n name.substring(0, val.length) +\n \"\" +\n name.substring(val.length);\n\n /* insert an input field that will hold the current name:*/\n autocompleteItem.innerHTML +=\n \"\";\n autocompleteList.appendChild(autocompleteItem);\n\n filteredWorkObjectNames.push(name);\n }\n }\n }\n\n // if we edit an actor, we do not want auto-complete, since actors generally are unique\n if (element.type.includes(elementTypes.ACTOR)) {\n autocompleteList.style.visibility = \"hidden\";\n }\n });\n\n /* execute a function presses a key on the keyboard:*/\n input.onkeydown = function (e) {\n let autocompleteList = document.getElementById(\"autocomplete-list\");\n if (autocompleteList) {\n autocompleteList = autocompleteList.getElementsByTagName(\"div\");\n }\n if (e.keyCode === 40) {\n /* If the arrow DOWN key is pressed,\n increase the currentFocus letiable:*/\n currentFocus++;\n\n /* and and make the current item more visible:*/\n addActive(autocompleteList);\n } else if (e.keyCode === 38) {\n // up\n /* If the arrow UP key is pressed,\n decrease the currentFocus letiable:*/\n currentFocus--;\n\n /* and and make the current item more visible:*/\n addActive(autocompleteList);\n } else if (e.keyCode === 13) {\n e.preventDefault();\n /* If the ENTER key is pressed, prevent the form from being submitted,*/\n if (currentFocus > -1) {\n element.businessObject.name = filteredWorkObjectNames[currentFocus];\n eventBus.fire(\"element.changed\", { element });\n }\n }\n };\n\n function addActive(autocompleteList) {\n /* a function to classify an item as \"active\":*/\n if (!autocompleteList || autocompleteList.length < 1) return false;\n\n /* start by removing the \"active\" class on all items:*/\n removeActive(autocompleteList);\n if (currentFocus >= autocompleteList.length) currentFocus = 0;\n if (currentFocus < 0) currentFocus = autocompleteList.length - 1;\n\n /* add class \"autocomplete-active\":*/\n autocompleteList[currentFocus].classList.add(\"autocomplete-active\");\n }\n\n function removeActive(autocompleteList) {\n /* a function to remove the \"active\" class from all autocomplete items:*/\n if (autocompleteList.length > 1) {\n for (const item of autocompleteList) {\n item.classList.remove(\"autocomplete-active\");\n }\n }\n }\n\n function closeAllLists(survivor) {\n /* close all autocomplete lists in the document,\n except the one passed as an argument:*/\n let autocompleteList =\n document.getElementsByClassName(\"autocomplete-items\");\n for (const item of autocompleteList) {\n if (survivor != item && survivor != input) {\n item.parentNode.removeChild(item);\n }\n }\n }\n\n /* execute a function when someone clicks in the document:*/\n document.addEventListener(\"click\", function (e) {\n closeAllLists(e.target);\n });\n}\n","\"use strict\";\n\nimport ChangeSupportModule from \"diagram-js/lib/features/change-support\";\nimport ResizeModule from \"diagram-js/lib/features/resize\";\nimport DirectEditingModule from \"diagram-js-direct-editing\";\n\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"../updateHandler/updateLabelHandler\";\nimport DSLabelEditingPreview from \"./dsLabelEditingPreview\";\nimport DSLabelEditingProvider from \"./dsLabelEditingProvider\";\nimport DSModeling from \"../modeling/dSModeling\";\n\nexport default {\n __depends__: [ChangeSupportModule, ResizeModule, DirectEditingModule],\n __init__: [\"dSlabelEditingProvider\", \"dSlabelEditingPreview\"],\n dSlabelEditingProvider: [\"type\", DSLabelEditingProvider],\n dSlabelEditingPreview: [\"type\", DSLabelEditingPreview],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n commandStack: [\"type\", CommandStack],\n modeling: [\"type \", DSModeling],\n};\n","\"use strict\";\n\nimport { selectPartOfActivity } from \"./dsLabelUtil\";\nimport { angleBetween } from \"../../../Utils/mathExtensions\";\n\nexport function countLines(str) {\n return str.split(/\\r\\n|\\r|\\n/).length;\n}\n\n// determine the position of the label at the activity\nexport function labelPosition(waypoints, lines = 1) {\n let amountWaypoints = waypoints.length;\n let determinedPosition;\n let xPos;\n let yPos;\n\n if (amountWaypoints > 2) {\n let angleActivity = new Array(amountWaypoints - 1);\n for (let i = 0; i < amountWaypoints - 1; i++) {\n // calculate the angles of the activities\n angleActivity[i] = angleBetween(waypoints[i], waypoints[i + 1]);\n }\n\n let selectedActivity = selectPartOfActivity(waypoints, angleActivity);\n\n xPos = labelPositionX(\n waypoints[selectedActivity],\n waypoints[selectedActivity + 1]\n );\n yPos = labelPositionY(\n waypoints[selectedActivity],\n waypoints[selectedActivity + 1],\n lines\n );\n\n determinedPosition = {\n x: xPos,\n y: yPos,\n selected: selectedActivity,\n };\n\n return determinedPosition;\n } else {\n xPos = labelPositionX(waypoints[0], waypoints[1]);\n yPos = labelPositionY(waypoints[0], waypoints[1], lines);\n\n determinedPosition = {\n x: xPos,\n y: yPos,\n selected: 0,\n };\n\n return determinedPosition;\n }\n}\n\n// calculate the X position of the label\nexport function labelPositionX(startPoint, endPoint) {\n let angle = angleBetween(startPoint, endPoint);\n let offsetX = 0;\n let scaledAngle = 0;\n if (angle === 0 || angle === 180 || angle === 90 || angle === 270) {\n offsetX = 0;\n } else if (angle > 0 && angle < 90) {\n // endpoint in upper right quadrant\n offsetX = 5 - angle / 6;\n } else if (angle > 90 && angle < 180) {\n // endpoint in upper left quadrant\n scaledAngle = angle - 90;\n offsetX = 5 - scaledAngle / 18;\n } else if (angle > 180 && angle < 270) {\n // endpoint in lower left quadrant\n scaledAngle = angle - 180;\n offsetX = scaledAngle / 18;\n } else if (angle > 270) {\n // endpoint in lower right quadrant\n scaledAngle = angle - 270;\n offsetX = 5 - scaledAngle / 6;\n }\n return offsetX + (startPoint.x + endPoint.x) / 2;\n}\n\n// calculate the Y position of the label\nexport function labelPositionY(startPoint, endPoint, lines = 1) {\n let angle = angleBetween(startPoint, endPoint);\n let offsetY = 0;\n let scaledAngle = 0;\n\n if (angle === 0 || angle === 180) {\n offsetY = 15;\n } else if (angle === 90 || angle === 270) {\n offsetY = 0;\n } else if (angle > 0 && angle < 90) {\n // endpoint in upper right quadrant\n offsetY = 15 - angle / 6;\n } else if (angle > 90 && angle < 180) {\n // endpoint in upper left quadrant\n scaledAngle = angle - 90;\n offsetY = (-scaledAngle / 9) * lines;\n } else if (angle > 180 && angle < 270) {\n // endpoint in lower left quadrant\n scaledAngle = angle - 180;\n offsetY = 15 - scaledAngle / 3;\n } else if (angle > 270) {\n // endpoint in lower right quadrant\n scaledAngle = angle - 270;\n offsetY = (-scaledAngle / 9) * lines;\n }\n return offsetY + (startPoint.y + endPoint.y) / 2;\n}\n","\"use strict\";\n\nimport Modeling from \"bpmn-js/lib/features/modeling/Modeling\";\n\nimport { inherits } from \"util\";\n\nexport default function DSModeling(\n eventBus,\n elementFactory,\n commandStack,\n domainStoryRules\n) {\n Modeling.call(this, eventBus, elementFactory, commandStack, domainStoryRules);\n}\n\nModeling.prototype.updateLabel = function (element, newLabel, newBounds) {\n if (\n element.businessObject\n ? newLabel !== element.businessObject.name\n : newLabel !== element.name\n ) {\n if (/^domainStory:/.test(element.type)) {\n this._commandStack.execute(\"element.updateCustomLabel\", {\n element: element,\n newLabel: newLabel,\n newBounds: newBounds,\n });\n } else {\n this._commandStack.execute(\"element.updateLabel\", {\n element: element,\n newLabel: newLabel,\n newBounds: newBounds,\n });\n }\n }\n};\n\nModeling.prototype.updateNumber = function (element, newNumber, newBounds) {\n if (\n element.businessObject\n ? newNumber !== element.businessObject.number\n : newNumber !== element.number\n ) {\n if (/^domainStory:/.test(element.type)) {\n this._commandStack.execute(\"element.updateCustomLabel\", {\n element: element,\n newNumber: newNumber,\n newBounds: newBounds,\n });\n } else {\n this._commandStack.execute(\"element.updateLabel\", {\n element: element,\n newNumber: newNumber,\n newBounds: newBounds,\n });\n }\n }\n};\n\nModeling.prototype.replaceShape = function (oldShape, newShape, hints) {\n let context = {\n oldShape: oldShape,\n newData: newShape,\n hints: hints || {},\n };\n\n this._commandStack.execute(\"shape.replace\", context);\n return context.newShape;\n};\n\nModeling.prototype.removeGroup = function (element) {\n this._commandStack.execute(\"shape.removeGroupWithoutChildren\", {\n element: element,\n });\n this.removeElements({ element });\n};\n\ninherits(DSModeling, Modeling);\n\nDSModeling.$inject = [\n \"eventBus\",\n \"elementFactory\",\n \"commandStack\",\n \"domainStoryRules\",\n];\n","\"use strict\";\n\nimport DomainStoryPalette from \"../palette/domainStoryPalette\";\nimport ElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\nimport CreateModule from \"diagram-js/lib/features/create\";\nimport PathMap from \"bpmn-js/lib/draw/PathMap\";\nimport PopupMenuModule from \"bpmn-js/lib/features/popup-menu\";\nimport ContextPadModule from \"diagram-js/lib/features/context-pad\";\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"../updateHandler/updateLabelHandler\";\nimport DomainStoryUpdater from \"../domainStoryUpdater\";\nimport DomainStoryElementFactory from \"../domainStoryElementFactory\";\nimport headlineAndDescriptionUpdateHandler from \"../updateHandler/headlineAndDescriptionUpdateHandler\";\nimport DomainStoryRenderer from \"../domainStoryRenderer\";\nimport DSModeling from \"./dSModeling\";\nimport DomainStoryRules from \"../domainStoryRules\";\nimport ReplaceMenuProvider from \"../change-icon/replaceMenuProvider\";\nimport DomainStoryContextPadProvider from \"../context-pad/domainStoryContextPadProvider\";\n\nexport default {\n __depends__: [CreateModule, ContextPadModule, PopupMenuModule],\n __init__: [\n \"domainStoryRenderer\",\n \"paletteProvider\",\n \"domainStoryRules\",\n \"domainStoryUpdater\",\n \"contextPadProvider\",\n \"replaceMenuProvider\",\n ],\n elementFactory: [\"type\", DomainStoryElementFactory],\n domainStoryRenderer: [\"type\", DomainStoryRenderer],\n paletteProvider: [\"type\", DomainStoryPalette],\n domainStoryRules: [\"type\", DomainStoryRules],\n domainStoryUpdater: [\"type\", DomainStoryUpdater],\n contextPadProvider: [\"type\", DomainStoryContextPadProvider],\n elementFactoryBpmn: [\"type\", ElementFactory],\n pathMap: [\"type\", PathMap],\n replaceMenuProvider: [\"type\", ReplaceMenuProvider],\n commandStack: [\"type\", CommandStack],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n headlineAndDescriptionUpdateHandler: [\n \"type\",\n headlineAndDescriptionUpdateHandler,\n ],\n modeling: [\"type\", DSModeling],\n};\n","\"use strict\";\n\nimport { labelPosition } from \"../labeling/position\";\nimport { angleBetween } from \"../../../Utils/mathExtensions\";\n\nlet numberRegistry = [];\nlet multipleNumberRegistry = [false];\n\nlet canvasElementRegistry;\n\nexport function initializeNumbering(canvasElementRegistryService) {\n canvasElementRegistry = canvasElementRegistryService;\n}\n\n// defines the box for activity numbers\nexport function numberBoxDefinitions(element) {\n let alignment = \"center\";\n let boxWidth = 30;\n let boxHeight = 30;\n let position = labelPosition(element.waypoints);\n let angle = 0;\n if (element.waypoints.length > 1) {\n angle = angleBetween(element.waypoints[0], element.waypoints[1]);\n }\n let x = position.x;\n let y = position.y;\n\n // TODO: Use trigonometric functions to make the positioning more consistent.\n // This would require to touch the label code as well.\n if (angle >= 0 && angle <= 45) {\n y = y - 30 + angle / 2;\n x = x - 25 - angle / 2;\n } else if (angle <= 90) {\n y = y - 10 + (angle - 45) / 4.5;\n x = x - 35 - angle / 9;\n } else if (angle <= 145) {\n y = y + angle / 7.25;\n x = x - 45 - angle / 14.5;\n } else if (angle < 180) {\n y = y + 20 + angle / 9;\n x = x - 50 + angle / 4.5;\n } else if (angle <= 225) {\n y = y - 45 + angle / 12.25;\n x = x + 10 - angle / 6.125;\n } else if (angle <= 270) {\n y = y - 80 + angle / 3.375;\n x = x - 5 - angle / 6.125;\n } else if (angle <= 315) {\n y = y - 135 + angle / 2;\n x = x - 50;\n } else {\n y = y + 22.5 + (angle - 315) / 6;\n x = x - 50 + (angle - 315) / 1.8;\n }\n\n return {\n textAlign: alignment,\n width: boxWidth,\n height: boxHeight,\n x: x,\n y: y,\n };\n}\n\n// determine the next available number that is not yet used\nexport function generateAutomaticNumber(elementActivity, commandStack) {\n const semantic = elementActivity.businessObject;\n const usedNumbers = [0];\n let wantedNumber = -1;\n\n const activitiesFromActors = canvasElementRegistry.getActivitiesFromActors();\n\n activitiesFromActors.forEach((element) => {\n if (element.businessObject.number) {\n usedNumbers.push(+element.businessObject.number);\n }\n });\n for (let i = 0; i < usedNumbers.length; i++) {\n if (!usedNumbers.includes(i)) {\n if (!usedNumbers.includes(i)) {\n wantedNumber = i;\n i = usedNumbers.length;\n }\n }\n }\n if (wantedNumber === -1) {\n wantedNumber = usedNumbers.length;\n }\n\n updateExistingNumbersAtGeneration(\n activitiesFromActors,\n wantedNumber,\n commandStack\n );\n semantic.number = wantedNumber;\n return wantedNumber;\n}\n\n// update the numbers at the activities when generating a new activity\nexport function updateExistingNumbersAtGeneration(\n activitiesFromActors,\n wantedNumber,\n commandStack\n) {\n activitiesFromActors.forEach((element) => {\n let number = +element.businessObject.number;\n\n if (number >= wantedNumber) {\n wantedNumber++;\n setTimeout(function () {\n commandStack.execute(\"activity.changed\", {\n businessObject: element.businessObject,\n newLabel: element.businessObject.name,\n newNumber: number,\n element: element,\n });\n }, 10);\n }\n });\n}\n\n// update the numbers at the activities when editing an activity\nexport function updateExistingNumbersAtEditing(\n activitiesFromActors,\n wantedNumber,\n eventBus\n) {\n // get a sorted list of all activities that could need changing\n let sortedActivities = [[]];\n activitiesFromActors.forEach((activity) => {\n if (!sortedActivities[activity.businessObject.number]) {\n sortedActivities[activity.businessObject.number] = [];\n }\n sortedActivities[activity.businessObject.number].push(activity);\n });\n\n // set the number of each activity to the next highest number, starting from the number, we overrode\n let currentNumber = wantedNumber;\n for (\n currentNumber;\n currentNumber < sortedActivities.length;\n currentNumber++\n ) {\n if (sortedActivities[currentNumber]) {\n wantedNumber++;\n setNumberOfActivity(\n sortedActivities[currentNumber],\n wantedNumber,\n eventBus\n );\n }\n }\n}\n\n// get the IDs of activities with their associated number, only returns activities that are originating from an actor\nexport function getNumbersAndIDs() {\n let iDWithNumber = [];\n let activities = canvasElementRegistry.getActivitiesFromActors();\n\n for (let i = activities.length - 1; i >= 0; i--) {\n let id = activities[i].businessObject.id;\n let number = activities[i].businessObject.number;\n iDWithNumber.push({ id: id, number: number });\n }\n return iDWithNumber;\n}\n\nexport function addNumberToRegistry(renderedNumber, number) {\n numberRegistry[number] = renderedNumber;\n}\n\nexport function setNumberIsMultiple(number, multi) {\n multipleNumberRegistry[number] = multi;\n}\n\n/**\n * @returns copy of registry\n */\nexport function getNumberRegistry() {\n return numberRegistry.slice(0);\n}\n\nexport function getMultipleNumberRegistry() {\n return multipleNumberRegistry.slice(0);\n}\n\nfunction setNumberOfActivity(elementArray, wantedNumber, eventBus) {\n if (elementArray) {\n elementArray.forEach((element) => {\n if (element) {\n let businessObject = element.businessObject;\n if (businessObject) {\n businessObject.number = wantedNumber;\n }\n eventBus.fire(\"element.changed\", { element });\n }\n });\n }\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\nimport { overrideAppendedIcons } from \"src/app/Domain/Domain-Configuration/allIcons\";\nimport { Dictionary } from \"src/app/Domain/Common/dictionary/dictionary\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { getNameFromType } from \"src/app/Utils/naming\";\nimport { APPENDED_ICONS_TAG } from \"../../../Domain/Common/constants\";\n\n/**\n * A palette that allows you to create BPMN _and_ custom elements.\n */\n\nlet iconDictionary;\nlet configuration;\n\nexport function initializePalette(iconDictionaryService, configurationService) {\n iconDictionary = iconDictionaryService;\n configuration = configurationService;\n}\n\nexport default function PaletteProvider(\n palette,\n create,\n elementFactory,\n spaceTool,\n lassoTool\n) {\n this._create = create;\n this._elementFactory = elementFactory;\n this._spaceTool = spaceTool;\n this._lassoTool = lassoTool;\n\n palette.registerProvider(this);\n}\n\nPaletteProvider.$inject = [\n \"palette\",\n \"create\",\n \"elementFactory\",\n \"spaceTool\",\n \"lassoTool\",\n \"modeling\",\n];\n\nPaletteProvider.prototype.getPaletteEntries = function () {\n let actions = {},\n create = this._create,\n elementFactory = this._elementFactory,\n spaceTool = this._spaceTool,\n lassoTool = this._lassoTool;\n\n function createAction(type, group, className, title, options) {\n function createListener(event) {\n let shape = elementFactory.createShape(assign({ type: type }, options));\n\n assign(shape.businessObject, {\n id: shape.id,\n });\n\n if (options) {\n shape.businessObject.di.isExpanded = options.isExpanded;\n }\n\n create.start(event, shape);\n }\n\n let shortType = type.replace(/^domainStory:/, \"\");\n\n return {\n group: group,\n className: className,\n title: \"Create \" + title || \"Create \" + shortType,\n action: {\n dragstart: createListener,\n click: createListener,\n },\n };\n }\n\n return initPalette(actions, spaceTool, lassoTool, createAction);\n};\n\nfunction appendCSSStyleCheat(customIcons) {\n const sheetEl = document.createElement(\"style\");\n document.head.appendChild(sheetEl);\n\n let customIconDict = new Dictionary();\n\n customIconDict.appendDict(customIcons);\n let customIconDictKeys = customIconDict.keysArray();\n\n customIconDictKeys.forEach((name) => {\n if (iconDictionary.getAppendedIconDictionary().has(name)) {\n let src = customIconDict.get(name);\n\n const iconStyle =\n \".icon-domain-story-\" +\n name.toLowerCase() +\n \"::before{\" +\n \" display: block;\" +\n ' content: url(\"data:image/svg+xml;utf8,' +\n wrapSRCInSVG(src) +\n '\");' +\n \" margin: 3px;}\";\n sheetEl.sheet.insertRule(iconStyle, sheetEl.sheet.cssRules.length);\n }\n });\n}\n\nfunction initPalette(actions, spaceTool, lassoTool, createAction) {\n let config = iconDictionary?.getCurrentIconConfigurationForBPMN();\n\n let customIcons = localStorage.getItem(APPENDED_ICONS_TAG);\n\n if (customIcons) {\n customIcons = JSON.parse(customIcons);\n if (customIconsLegacy(customIcons)) {\n customIcons = convertLegacyAppendedIconsToDict(customIcons);\n }\n if (customIcons.entries && customIcons.entries.forEach) {\n const customIconsDict = new Dictionary();\n customIcons.entries.forEach((entry) => {\n customIconsDict.putEntry(entry);\n });\n overrideAppendedIcons(customIconsDict);\n appendCSSStyleCheat(customIcons);\n }\n }\n\n iconDictionary?.initTypeDictionaries(config.actors, config.workObjects);\n\n let actorTypes = iconDictionary?.getTypeDictionary(elementTypes.ACTOR);\n\n actorTypes?.keysArray().forEach((actorType) => {\n addCanvasObjectTypes(actorType, createAction, actions, \"actor\");\n });\n\n assign(actions, {\n \"actor-separator\": {\n group: \"actor\",\n separator: true,\n },\n });\n\n let workObjectTypes = iconDictionary?.getTypeDictionary(\n elementTypes.WORKOBJECT\n );\n\n workObjectTypes?.keysArray().forEach((workObjectType) => {\n addCanvasObjectTypes(workObjectType, createAction, actions, \"actor\");\n });\n\n assign(actions, {\n \"workObject-separator\": {\n group: \"workObject\",\n separator: true,\n },\n \"domainStory-group\": createAction(\n elementTypes.GROUP,\n \"group\",\n \"icon-domain-story-tool-group\",\n \"group\"\n ),\n \"group-separator\": {\n group: \"group\",\n separator: true,\n },\n \"lasso-tool\": {\n group: \"tools\",\n className: \"bpmn-icon-lasso-tool\",\n title: \"Activate the lasso tool\",\n action: {\n click: function (event) {\n lassoTool.activateSelection(event);\n },\n },\n },\n \"space-tool\": {\n group: \"tools\",\n className: \"bpmn-icon-space-tool\",\n title: \"Activate the create/remove space tool\",\n action: {\n click: function (event) {\n spaceTool.activateSelection(event);\n },\n },\n },\n });\n\n return actions;\n}\n\nfunction addCanvasObjectTypes(actorType, createAction, actions, className) {\n let name = getNameFromType(actorType);\n let icon = iconDictionary.getIconForBPMN(actorType);\n\n let action = [];\n action[\"domainStory-\" + className + name] = createAction(\n actorType,\n className,\n icon,\n name\n );\n assign(actions, action);\n}\n\nfunction customIconsLegacy(customIcons) {\n return !(\n Object.keys(customIcons).length === 1 &&\n Object.keys(customIcons)[0] === \"entries\"\n );\n}\n\nfunction convertLegacyAppendedIconsToDict(customIcons) {\n let dict = new Dictionary();\n Object.keys(customIcons).forEach((key) => {\n dict.set(key, customIcons[key]);\n });\n return dict;\n}\n\n// For some reason its important to use ' in the content for the Palette and ContextPad\n// Do not change!\nfunction wrapSRCInSVG(src) {\n return (\n \"\" +\n \"\"\n );\n}\n","\"use strict\";\n\nimport { getNumbersAndIDs } from \"../numbering/numbering\";\n\n/**\n * commandStack Handler for changes at activities\n */\n\nlet canvasElementRegistry;\nexport function initializeActivityUpdateHandler(canvasElementRegistryService) {\n canvasElementRegistry = canvasElementRegistryService;\n}\n\nexport default function activityUpdateHandler(commandStack, eventBus) {\n commandStack.registerHandler(\n \"activity.directionChange\",\n activity_directionChange\n );\n commandStack.registerHandler(\"activity.changed\", activity_changed);\n\n // update the activity from the activity-dialog, either with or without number\n // and change other activities too, to keep the numbers consistent\n function activity_changed(modeling) {\n this.preExecute = function (context) {\n context.oldLabel = context.businessObject.name || \" \";\n\n let oldNumbersWithIDs = getNumbersAndIDs();\n modeling.updateLabel(context.businessObject, context.newLabel);\n modeling.updateNumber(context.businessObject, context.newNumber);\n\n context.oldNumber = context.businessObject.number;\n context.oldNumbersWithIDs = oldNumbersWithIDs;\n };\n\n this.execute = function (context) {\n let businessObject = context.businessObject;\n let element = context.element;\n\n if (context.newLabel && context.newLabel.length < 1) {\n context.newLabel = \" \";\n }\n\n businessObject.name = context.newLabel;\n businessObject.number = context.newNumber;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n semantic.name = context.oldLabel;\n semantic.number = context.oldNumber;\n\n revertAutomaticNumberGenerationChange(\n context.oldNumbersWithIDs,\n eventBus\n );\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n\n // change the direction of a single activity without affecting other activities\n function activity_directionChange(modeling) {\n this.preExecute = function (context) {\n context.oldNumber = context.businessObject.number;\n context.oldWaypoints = context.element.waypoints;\n context.name = context.businessObject.name;\n\n if (!context.oldNumber) {\n context.oldNumber = 0;\n }\n modeling.updateNumber(context.businessObject, context.newNumber);\n };\n\n this.execute = function (context) {\n let businessObject = context.businessObject;\n let element = context.element;\n let swapSource = element.source;\n let newWaypoints = [];\n let waypoints = element.waypoints;\n\n for (let i = waypoints.length - 1; i >= 0; i--) {\n newWaypoints.push(waypoints[i]);\n }\n\n element.source = element.target;\n businessObject.source = businessObject.target;\n element.target = swapSource;\n businessObject.target = swapSource.id;\n\n businessObject.name = context.name;\n businessObject.number = context.newNumber;\n element.waypoints = newWaypoints;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n let swapSource = element.source;\n\n element.source = element.target;\n semantic.source = semantic.target;\n element.target = swapSource;\n semantic.target = swapSource.id;\n\n semantic.name = context.name;\n\n semantic.number = context.oldNumber;\n element.waypoints = context.oldWaypoints;\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n}\n\n// reverts the automatic changed done by the automatic number-generation at editing\nfunction revertAutomaticNumberGenerationChange(iDWithNumber, eventBus) {\n let activities = canvasElementRegistry?.getActivitesFromActors();\n for (let i = activities.length - 1; i >= 0; i--) {\n for (let j = iDWithNumber.length - 1; j >= 0; j--) {\n if (iDWithNumber[j].id.includes(activities[i].businessObject.id)) {\n let element = activities[i];\n element.businessObject.number = iDWithNumber[j].number;\n j = -5;\n eventBus.fire(\"element.changed\", { element });\n iDWithNumber.splice(j, 1);\n }\n }\n }\n}\n","\"use strict\";\n\nimport { undoGroupRework } from \"../util\";\n\nexport default function elementUpdateHandler(commandStack, eventBus) {\n commandStack.registerHandler(\"element.colorChange\", element_colorChange);\n commandStack.registerHandler(\n \"shape.removeGroupWithoutChildren\",\n removeGroupWithoutChildren\n );\n\n function element_colorChange() {\n this.preExecute = function (context) {\n context.oldColor = context.businessObject.pickedColor;\n };\n\n this.execute = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n\n semantic.pickedColor = context.newColor;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n\n semantic.pickedColor = context.oldColor;\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n\n function removeGroupWithoutChildren() {\n this.preExecute = function (ctx) {\n ctx.parent = ctx.element.parent;\n ctx.children = ctx.element.children.slice();\n };\n\n this.execute = function (ctx) {\n let element = ctx.element;\n ctx.children.forEach((child) => {\n undoGroupRework(element, child);\n eventBus.fire(\"element.changed\", { element: child });\n });\n eventBus.fire(\"shape.remove\", { element });\n };\n\n this.revert = function (ctx) {\n let element = ctx.element;\n eventBus.fire(\"shape.added\", { element });\n\n ctx.element.children.forEach((child) => {\n reworkGroupElements(element, child);\n });\n };\n }\n}\n","/**\n * a handler that updates the text of a BPMN element.\n */\nexport default function headlineAndDescriptionUpdateHandler(\n commandStack,\n titleService\n) {\n commandStack.registerHandler(\n \"story.updateHeadlineAndDescription\",\n handlerFunction\n );\n\n function handlerFunction() {\n this.execute = function (ctx) {\n ctx.oldTitle = titleService.getTitle();\n ctx.oldDescription = titleService.getDescription();\n\n titleService.updateTitleAndDescription(\n ctx.newTitle,\n ctx.newDescription,\n false\n );\n };\n\n this.revert = function (ctx) {\n titleService.updateTitleAndDescription(\n ctx.oldTitle,\n ctx.oldDescription,\n false\n );\n };\n }\n}\n","\"use strict\";\n\nexport default function DSMassRenameHandler(commandStack, eventBus) {\n commandStack.registerHandler(\"domainStoryObjects.massRename\", massRename);\n\n function massRename(modeling) {\n this.preExecute = function (context) {\n let relevantElements = context.elements;\n\n context.oldLabel = relevantElements[0].businessObject.name;\n\n relevantElements.forEach((element) => {\n modeling.updateLabel(element.businessObject, confirm.newValue);\n });\n };\n\n this.execute = function (context) {\n let relevantElements = context.elements;\n relevantElements.forEach((element) => {\n let semantic = element.businessObject;\n semantic.name = context.newValue;\n\n eventBus.fire(\"element.changed\", { element });\n });\n };\n\n this.revert = function (context) {\n let relevantElements = context.elements;\n relevantElements.forEach((element) => {\n let semantic = element.businessObject;\n semantic.name = context.oldLabel;\n\n eventBus.fire(\"element.changed\", { element });\n });\n };\n }\n}\n","\"use strict\";\n\nimport {\n setLabel,\n getLabel,\n setNumber,\n getNumber,\n} from \"../labeling/dsLabelUtil\";\n\nimport {\n getExternalLabelMid,\n isLabelExternal,\n hasExternalLabel,\n isLabel,\n} from \"bpmn-js/lib/util/LabelUtil\";\n\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { getBusinessObject, is } from \"../util\";\n\nconst NULL_DIMENSIONS = {\n width: 0,\n height: 0,\n};\n\n/**\n * a handler that updates the text of a BPMN element.\n */\nexport default function UpdateLabelHandler(\n modeling,\n textRenderer,\n commandStack\n) {\n commandStack.registerHandler(\"element.updateCustomLabel\", handlerFunction);\n\n function handlerFunction() {\n /**\n * Set the label and return the changed elements.\n *\n * Element parameter can be label itself or connection (i.e. sequence flow).\n *\n * @param {djs.model.Base} element\n * @param {String} text\n */\n\n this.preExecute = function (ctx) {\n let element = ctx.element,\n businessObject = element.businessObject,\n newLabel = ctx.newLabel,\n newNumber = ctx.newNumber;\n\n if (\n !isLabel(element) &&\n isLabelExternal(element) &&\n !hasExternalLabel(element) &&\n (newLabel !== \"\" || newNumber !== \"\")\n ) {\n // create label\n let paddingTop = 7;\n\n let labelCenter = getExternalLabelMid(element);\n\n labelCenter = {\n x: labelCenter.x,\n y: labelCenter.y + paddingTop,\n };\n\n modeling.createLabel(element, labelCenter, {\n id: businessObject.id + \"_label\",\n businessObject: businessObject,\n });\n }\n };\n\n this.execute = function (ctx) {\n ctx.oldLabel = getLabel(ctx.element);\n ctx.oldNumber = getNumber(ctx.element);\n return setText(ctx.element, ctx.newLabel, ctx.newNumber);\n };\n\n this.revert = function (ctx) {\n return setText(ctx.element, ctx.oldLabel, ctx.oldNumber);\n };\n\n this.postExecute = function (ctx) {\n let element = ctx.element,\n label = element.label || element,\n newLabel = ctx.newLabel,\n newBounds = ctx.newBounds;\n\n if (isLabel(label) && newLabel.trim() === \"\") {\n modeling.removeShape(label);\n\n return;\n }\n\n // ignore internal labels for elements except text annotations\n if (\n !isLabelExternal(element) &&\n !is(element, elementTypes.TEXTANNOTATION)\n ) {\n return;\n }\n\n let bo = getBusinessObject(label);\n\n let text = bo.name || bo.text;\n\n // don't resize without text\n if (!text) {\n return;\n }\n\n // resize element based on label _or_ pre-defined bounds\n if (typeof newBounds === \"undefined\") {\n newBounds = textRenderer.getLayoutedBounds(label, text);\n }\n\n // setting newBounds to false or _null_ will\n // disable the postExecute resize operation\n if (newBounds) {\n modeling.resizeShape(label, newBounds, NULL_DIMENSIONS);\n }\n };\n }\n}\n\nfunction setText(element, text, textNumber) {\n // external label if present\n let label = element.label || element;\n\n let number = element.number || element;\n\n let labelTarget = element.labelTarget || element;\n\n let numberTarget = element.numberTarget || element;\n setLabel(label, text);\n setNumber(number, textNumber);\n\n return [label, labelTarget, number, numberTarget];\n}\n\nUpdateLabelHandler.$inject = [\"modeling\", \"textRenderer\", \"commandStack\"];\n","import { some } from \"min-dash\";\n\nexport function is(element, type) {\n const bo = getBusinessObject(element);\n\n return bo && typeof bo.$instanceOf == \"function\" && bo.$instanceOf(type);\n}\n\nexport function getBusinessObject(element) {\n return (element && element.businessObject) || element;\n}\n\nexport function isAny(element, types) {\n return some(types, function (t) {\n return is(element, t);\n });\n}\n\nexport function reworkGroupElements(parent, shape) {\n parent.children.slice().forEach((innerShape) => {\n if (innerShape.id !== shape.id) {\n if (innerShape.x >= shape.x && innerShape.x <= shape.x + shape.width) {\n if (innerShape.y >= shape.y && innerShape.y <= shape.y + shape.height) {\n innerShape.parent = shape;\n if (!shape.children.includes(innerShape)) {\n shape.children.push(innerShape);\n }\n }\n }\n }\n });\n}\n\nexport function undoGroupRework(parent, shape) {\n const superParent = parent.parent;\n\n parent.children.remove(shape);\n superParent.children.add(shape);\n\n shape.parent = superParent;\n\n const svgShape = document.querySelector(\n \"[data-element-id=\" + shape.id + \"]\"\n ).parentElement;\n const svgGroup = svgShape.parentElement;\n const svgGroupParent = svgGroup.parentElement.parentElement;\n svgGroup.removeChild(svgShape);\n svgGroupParent.appendChild(svgShape);\n}\n","import {\n SVG_LINK,\n TEXTSPAN_DESCRIPTION_HEIGHT,\n TEXTSPAN_TITLE_HEIGHT,\n X_OFFSET_UTIL,\n} from \"../../Domain/Export/exportConstants\";\n\nlet extraHeight = 0;\n\n// Has to be js File so we can access te correct non-standard HTML-Properties without excessive usage of ts-ignore\nexport function createTitleAndDescriptionSVGElement(\n title,\n description,\n xLeft,\n yUp,\n width\n) {\n title = title.replace(\"<\", \"\").replace(\">\", \"\");\n\n let titleElement = createTitle(title, width);\n let descriptionElement = createDescription(description, width);\n\n // to display the title and description in the SVG-file, we need to add a container for our text-elements\n let insertText =\n '' +\n titleElement +\n descriptionElement +\n \"\";\n return { insertText, extraHeight };\n}\n\nfunction createTitle(text, width) {\n let tempCanvas = document.createElement(\"canvas\");\n let ctx = tempCanvas.getContext(\"2d\");\n ctx.font = \"30px Arial\";\n\n return createTextSpans(text, width, ctx, 10, TEXTSPAN_TITLE_HEIGHT, 30);\n}\n\nfunction createDescription(text, width) {\n let description = \"\";\n let descriptionParts = text.split(\"
\");\n\n let tempCanvas = document.createElement(\"canvas\");\n let ctx = tempCanvas.getContext(\"2d\");\n ctx.font = \"12px Arial\";\n\n for (let i = 0; i < descriptionParts.length; i++) {\n description += createTextSpans(\n descriptionParts[i],\n width,\n ctx,\n 0,\n TEXTSPAN_DESCRIPTION_HEIGHT,\n 12\n );\n }\n return description;\n}\n\nfunction createTextSpans(text, width, ctx, yOffset, heightOffset, fontSize) {\n let textSpans = \"\";\n let words = text.split(\" \");\n\n let textTag =\n '';\n\n let textSpan = document.createElementNS(SVG_LINK, \"tspan\");\n let textNode = document.createTextNode(words[0]);\n\n textSpan.setAttribute(\"x\", X_OFFSET_UTIL);\n textSpan.setAttribute(\"y\", yOffset + extraHeight);\n textSpan.setAttribute(\"font-size\", fontSize);\n textSpan.appendChild(textNode);\n\n for (let j = 1; j < words.length; j++) {\n if (textSpan.firstChild && textSpan.firstChild.data) {\n let len = textSpan.firstChild.data.length;\n textNode.data += \" \" + words[j];\n\n if (ctx.measureText(textNode.data).width > width - 16) {\n extraHeight += heightOffset;\n textSpan.firstChild.data = textSpan.firstChild.data.slice(0, len); // remove overflow word\n\n textSpans += textTag + textSpan.outerHTML + \"\"; // append line\n\n // create new textspan for line break\n textSpan = document.createElementNS(SVG_LINK, \"tspan\");\n textNode = document.createTextNode(words[j]);\n textSpan.setAttribute(\"x\", X_OFFSET_UTIL);\n textSpan.setAttribute(\"y\", yOffset + extraHeight);\n textSpan.appendChild(textNode);\n }\n }\n }\n extraHeight += heightOffset;\n\n textSpans += textTag + textSpan.outerHTML + \"\";\n return textSpans;\n}\n","import { elementTypes } from './elementTypes';\n\nexport interface BusinessObject {\n $descriptor: any;\n $type: any;\n di: any;\n get: any;\n set: any;\n\n id: string;\n name: string;\n\n type: string;\n\n x: number;\n y: number;\n height: number | undefined;\n width: number | undefined;\n pickedColor: string | undefined;\n}\n\nexport const testBusinessObject: BusinessObject = {\n $descriptor: undefined,\n $type: undefined,\n di: undefined,\n get: undefined,\n set: undefined,\n\n id: 'test',\n name: 'test',\n\n type: elementTypes.WORKOBJECT,\n\n x: 0,\n y: 0,\n height: 38,\n width: 38,\n pickedColor: undefined,\n};\n","export class Configuration {\n actors: string[];\n workObjects: string[];\n\n constructor(actors: string[], workObjects: string[]) {\n this.actors = actors;\n this.workObjects = workObjects;\n }\n}\n","/** DEFAULT VALUES **/\nexport const INITIAL_TITLE = '< title >';\nexport const INITIAL_DESCRIPTION = '< description >';\nexport const INITIAL_DOMAIN_NAME = '[icons: default]';\n\n/** LocalStorageTags **/\nexport const APPENDED_ICONS_TAG = 'appendedIcons';\nexport const DOMAIN_CONFIGURATION_TAG = 'domainConfigurationTag';\n\n/** AUTOSAVE DEFAULTS **/\nexport const DEFAULT_AUTOSAVES_ENABLED = true;\nexport const DEFAULT_AUTOSAVES_MAX_DRAFTS = 5;\nexport const DEFAULT_AUTOSAVES_INTERVAL = 30;\n\n/** SNACKBAR **/\nexport const SNACKBAR_DURATION = 2000;\nexport const SNACKBAR_SUCCESS = 'snackbar_success';\nexport const SNACKBAR_ERROR = 'snackbar_error';\nexport const SNACKBAR_INFO = 'snackbar_info';\n\n/** BPMN_RELEVANT_CONSTANTS **/\nexport const IMPLICIT_ROOT_ID = '__implicitroot';\n","export class Dictionary {\n private entries: Entry[];\n\n constructor() {\n this.entries = [];\n }\n\n get length(): number {\n return this.entries.length;\n }\n\n all(): Entry[] {\n return this.entries;\n }\n\n size(): number {\n return this.entries.length;\n }\n\n isEmpty(): boolean {\n return this.entries.length <= 0;\n }\n\n has(key: string): boolean {\n return this.entries.some((entry) => entry.key === key);\n }\n\n set(key: string, value: any): void {\n if (!this.has(key)) {\n this.entries.push(new Entry(value, key));\n }\n }\n\n add(value: any, key: string): void {\n this.set(key, value);\n }\n\n putEntry(entry: Entry): void {\n if (!this.has(entry.key)) {\n this.entries.push(new Entry(entry.value, entry.key));\n }\n }\n\n keysArray(): string[] {\n return this.entries.map((entry) => entry.key);\n }\n\n addEach(object: any): void {\n Object.keys(object).forEach((key) => {\n this.set(key, object[key]);\n });\n }\n\n appendDict(dict: Dictionary): void {\n dict.entries.forEach((entry) => this.putEntry(entry));\n }\n\n clear(): void {\n this.entries = [];\n }\n\n delete(key: string): void {\n this.entries = this.entries.filter((entry) => entry.key !== key);\n }\n\n get(key: string): any {\n const found = this.entries.filter((entry) => entry.key === key);\n return found[0] ? found[0].value : null;\n }\n\n sort(fn: (a: Entry, b: Entry) => number) {\n this.entries.sort(fn);\n }\n\n sortByName() {\n this.entries.sort((a: Entry, b: Entry) => {\n if (a.key.includes('_custom') == b.key.includes('_custom')) {\n if (a.key < b.key) return -1;\n else {\n return 1;\n }\n } else {\n if (a.key.includes('_custom')) {\n return -1;\n } else {\n return 1;\n }\n }\n });\n }\n}\n\nexport class Entry {\n value: any;\n key: string;\n\n constructor(value: any, key: string) {\n this.value = value;\n this.key = key;\n }\n}\n","import { INITIAL_DOMAIN_NAME } from './constants';\nimport { testBusinessObject } from './businessObject';\nimport { elementTypes } from './elementTypes';\nimport { Dictionary } from './dictionary/dictionary';\n\nexport interface DomainConfiguration {\n name: string;\n actors: Dictionary;\n workObjects: Dictionary;\n}\n\nexport interface DomainConfigurationForExport {\n name: string;\n actors: any;\n workObjects: any;\n}\n\nexport interface CustomDomainConfiguration {\n name: string;\n actors: string[];\n workObjects: string[];\n}\nconst actor = structuredClone(testBusinessObject);\nactor.type = elementTypes.ACTOR;\n\nexport const testCustomDomainConfiguration: CustomDomainConfiguration = {\n name: INITIAL_DOMAIN_NAME,\n actors: ['Person'],\n workObjects: ['Document'],\n};\n\nexport function fromConfigurationFromFile(configFromFile: {\n name: string;\n actors: { [p: string]: any };\n workObjects: { [p: string]: any };\n}) {\n const actorsDict = new Dictionary();\n const workObjectsDict = new Dictionary();\n Object.keys(configFromFile.actors).forEach((key) => {\n actorsDict.add(configFromFile.actors[key], key);\n });\n Object.keys(configFromFile.workObjects).forEach((key) => {\n workObjectsDict.add(configFromFile.workObjects[key], key);\n });\n\n return {\n name: configFromFile.name,\n actors: actorsDict,\n workObjects: workObjectsDict,\n };\n}\n","export enum elementTypes {\n ACTIVITY = 'domainStory:activity',\n CONNECTION = 'domainStory:connection',\n ACTOR = 'domainStory:actor',\n WORKOBJECT = 'domainStory:workObject',\n GROUP = 'domainStory:group',\n TEXTANNOTATION = 'domainStory:textAnnotation',\n DOMAINSTORY = 'domainStory:',\n}\n","import { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { overrideAppendedIcons } from 'src/app/Domain/Domain-Configuration/allIcons';\nimport { Configuration } from 'src/app/Domain/Common/configuration';\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\nimport { INITIAL_DOMAIN_NAME } from './constants';\n\nexport class IconConfiguration {\n domainName = INITIAL_DOMAIN_NAME;\n\n private allIconDictionary: Dictionary;\n\n constructor(allIconDictionary: Dictionary) {\n this.allIconDictionary = allIconDictionary;\n }\n\n /**\n * Select the Iconset which you want to use\n */\n getDefaultConf(): Configuration {\n return defaultConf;\n }\n\n updateAllIconRegistry(allIconDictionary: Dictionary): void {\n this.allIconDictionary = allIconDictionary;\n }\n\n appendSRCFile(\n actors: string[],\n actorsDict: Dictionary,\n workObjects: string[],\n workObjectsDict: Dictionary\n ): void {\n const newAppendedIcons: { [key: string]: any } = {};\n\n actors.forEach((name: string) => {\n if (!this.allIconDictionary.has(name)) {\n newAppendedIcons[name] = actorsDict.get(name);\n }\n });\n\n workObjects.forEach((name: string) => {\n if (!this.allIconDictionary.has(name)) {\n newAppendedIcons[name] = workObjectsDict.get(name);\n }\n });\n const appen = new Dictionary();\n Object.keys(newAppendedIcons).forEach((key) => {\n appen.set(key, newAppendedIcons[key]);\n });\n\n overrideAppendedIcons(appen);\n }\n\n createCustomConf(domainConfiguration: DomainConfiguration): Configuration {\n this.domainName = domainConfiguration.name;\n\n let actors = domainConfiguration.actors;\n let workObjects = domainConfiguration.workObjects;\n\n this.appendSRCFile(\n actors.keysArray(),\n actors,\n workObjects.keysArray(),\n workObjects\n );\n\n return new Configuration(actors.keysArray(), workObjects.keysArray());\n }\n}\n\n/* eslint no-unused-vars: 0*/\n\n/**\n * All Icons as one Set\n * There are more Icons than fit in the palette.\n * This is just for reference\n */\nconst allIconsConf = {\n actors: ['Person', 'Group', 'System', 'Pet'],\n workObjects: [\n 'Place',\n 'Flag',\n 'World',\n 'Water',\n 'Store',\n 'Theater',\n 'Business',\n 'Meeting-room',\n 'Hotel',\n 'Dining',\n 'Courthouse',\n 'Gas-station',\n 'Car',\n 'Bus',\n 'Train',\n 'Truck',\n 'Taxi',\n 'Bike',\n 'Boat',\n 'Motorcycle',\n 'Plane',\n 'Flight-takeoff',\n 'Flight-landing',\n 'Shuttle',\n 'Walking',\n 'Traffic',\n 'Commute',\n 'Document',\n 'Folder',\n 'Call',\n 'Email',\n 'Copyright',\n 'Briefcase',\n 'Attach',\n 'Ruler',\n 'Sum',\n 'Conversation',\n 'Update',\n 'Cellphone',\n 'Speaker-phone',\n 'Signal',\n 'Key',\n 'Pencil',\n 'How-To-Reg',\n 'Settings',\n 'Grid',\n 'Label',\n 'Receipt',\n 'Calendar',\n 'Wrench',\n 'Headset',\n 'Keyboard',\n 'Mouse',\n 'Microphone',\n 'Router',\n 'Scanner',\n 'Printer',\n 'DNS',\n 'Security',\n 'Cloud',\n 'Desktop',\n 'Tablet',\n 'Assessment',\n 'Dashboard',\n 'Pie-chart',\n 'View-List',\n 'Euro',\n 'Dollar',\n 'Info',\n 'Alarm',\n 'Problem',\n 'Circle-Arrows',\n 'Picture-as-PDF',\n 'Credit-Card',\n 'Shopping',\n 'Favorite',\n 'Gavel',\n 'Blind',\n 'Hourglass',\n 'Time',\n 'Search',\n 'Thumb-up',\n 'Thumb-down',\n 'Thumb-up-down',\n 'Couch',\n 'Education',\n 'Watch',\n ],\n};\n\n/**\n * Default Iconset\n */\nexport const defaultConf = {\n actors: ['Person', 'Group', 'System'],\n workObjects: ['Document', 'Folder', 'Call', 'Email', 'Conversation', 'Info'],\n};\n","import { ActivityCanvasObject } from '../Common/activityCanvasObject';\n\nexport class ActivityDialogData {\n activity: ActivityCanvasObject;\n numberIsAllowedMultipleTimes: boolean;\n showNumberFields: boolean;\n\n saveFN: any;\n\n constructor(\n activity: ActivityCanvasObject,\n numberIsAllowedMultipleTimes: boolean,\n showNumberFields: boolean,\n saveFN: any\n ) {\n this.activity = activity;\n this.numberIsAllowedMultipleTimes = numberIsAllowedMultipleTimes;\n this.showNumberFields = showNumberFields;\n this.saveFN = saveFN;\n }\n}\n","export class ExportDialogData {\n title: string;\n options: ExportOption[];\n\n constructor(title: string, options: ExportOption[]) {\n this.title = title;\n this.options = options;\n }\n}\n\nexport class ExportOption {\n text: string;\n fn: any;\n tooltip: string;\n\n constructor(text: string, tooltip: string, fn: any) {\n this.text = text;\n this.tooltip = tooltip;\n this.fn = fn;\n }\n}\n","export class InfoDialogData {\n title: string;\n infoText: string;\n isInfo: boolean;\n isLink: boolean;\n linkText: string | undefined;\n\n constructor(\n title: string,\n infoText: string,\n isInfo: boolean,\n isLink: boolean = false,\n linkText?: string\n ) {\n this.title = title;\n this.infoText = infoText;\n this.isInfo = isInfo;\n this.isLink = isLink;\n this.linkText = linkText;\n }\n}\n","export const NUMBER_BACKGROUND_COLOR = 'white';\nexport const NUMBER_COLOR = 'black';\nexport const STROKE_WIDTH = '1.5';\n\nexport const HIGHLIGHT_NUMBER_BACKGROUNG_COLOR = '#43acbf';\nexport const HIGHLIGHT_NUMBER_COLOR = 'black';\nexport const HIGHLIGHT_COLOR = 'black';\nexport const HIGHLIGHT_STROKE_WIDTH = '4';\n","import { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\n\nexport let appendedIcons = new Dictionary();\nexport const allIcons = {\n Person:\n '',\n Group:\n '',\n Pet: '',\n Conversation:\n '',\n World:\n '',\n Store:\n '',\n Theater:\n '',\n Business:\n '',\n Water:\n '',\n Hotel:\n '',\n Dining:\n '',\n 'Gas-station':\n '',\n 'Meeting-room':\n '',\n Courthouse:\n '',\n Flag: '',\n Place:\n '',\n Car: '',\n Bus: '',\n Train:\n '',\n Truck:\n '',\n Taxi: '',\n Bike: '',\n Boat: '',\n Motorcycle:\n '',\n Plane:\n '',\n 'Flight-takeoff':\n '',\n 'Flight-landing':\n '',\n Shuttle:\n '',\n Walking:\n '',\n Traffic:\n '',\n Commute:\n '',\n System:\n '',\n Printer:\n '',\n Document:\n '',\n Folder:\n '',\n Call: '',\n Email:\n '',\n Copyright:\n '',\n DNS: '',\n Settings:\n '',\n Cellphone:\n '',\n Update:\n '',\n Briefcase:\n '',\n Microphone:\n '',\n Signal:\n '',\n Key: '',\n Pencil:\n '',\n Sum: '',\n Headset:\n '',\n Keyboard:\n '',\n Mouse:\n '',\n Router:\n '',\n Scanner:\n '',\n Security:\n '',\n Desktop:\n '',\n 'Speaker-phone':\n '',\n Tablet:\n '',\n Label:\n '',\n Receipt:\n '',\n Calendar:\n '',\n Cloud:\n '',\n Assessment:\n '',\n Dashboard:\n '',\n 'Pie-chart':\n '',\n Problem:\n '',\n 'Picture-as-PDF':\n '',\n Grid: '',\n Watch:\n '',\n Euro: '',\n Dollar:\n '',\n Info: '',\n Alarm:\n '',\n Wrench:\n '',\n 'Circle-Arrows':\n '',\n 'Credit-Card':\n '',\n Favorite:\n '',\n Gavel:\n '',\n Blind:\n '',\n Hourglass:\n '',\n Time: '',\n Search:\n '',\n Shopping:\n '',\n 'Thumb-up':\n '',\n 'Thumb-down':\n '',\n 'Thumb-up-down':\n '',\n Couch:\n '',\n Attach:\n '',\n Ruler:\n '',\n Education:\n '',\n 'How-To-Reg':\n '',\n 'View-List':\n '',\n};\n\nexport function getAllStandardIconKeys(): string[] {\n const allIconsDict = new Dictionary();\n\n allIconsDict.addEach(allIcons);\n\n return allIconsDict.keysArray();\n}\n\nexport function overrideAppendedIcons(newIcons: Dictionary): void {\n appendedIcons = newIcons;\n}\n","export enum IconFilterEnum {\n ICON_FILTER_ACTOR = 'ICON_FILTER_ACTOR',\n ICON_FILTER_WORKOBJECT = 'ICON_FILTER_WORKOBJECT',\n ICON_FILTER_UNASSIGNED = 'ICON_FILTER_UNASSIGNED',\n ICON_FILTER_NONE = 'ICON_FILTER_NONE',\n}\n","export class ConfigAndDST {\n domain: any;\n dst: any;\n\n constructor(domain: any, dst: any) {\n this.domain = domain;\n this.dst = dst;\n }\n}\n\nexport const testConfigAndDst: ConfigAndDST = {\n domain: JSON.parse(\n '{\"name\":\"\",' +\n '\"actors\":{\"Person\":\"' +\n '' +\n '\",' +\n '\"Group\":\"' +\n '' +\n '\",' +\n '\"System\":\"' +\n '\"},' +\n '\"workObjects\":{\"Document\":\"' +\n '\",' +\n '\"Folder\":\"' +\n '' +\n '\",' +\n '\"Call\":\"' +\n '\",' +\n '\"Email\":\"' +\n '\",' +\n '\"Conversation\":\"' +\n '\",' +\n '\"Info\":\"' +\n '' +\n '\"}}'\n ),\n dst:\n '[' +\n '{\"type\":\"domainStory:workObjectDocument\",\"name\":\"\",\"id\":\"shape_3792\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"x\":302,\"y\":102},' +\n '{\"type\":\"domainStory:actorPerson\",\"name\":\"\",\"id\":\"shape_4666\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"x\":103,\"y\":93},' +\n '{\"type\":\"domainStory:activity\",\"name\":\"\",\"id\":\"connection_4884\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"number\":1,' +\n '\"waypoints\":[{\"original\":{\"x\":141,\"y\":131},\"x\":186,\"y\":133},{\"original\":{\"x\":340,\"y\":140},\"x\":302,\"y\":138}],' +\n '\"source\":\"shape_4666\",\"target\":\"shape_3792\"}]',\n};\n","export const SVG_LINK = 'http://www.w3.org/2000/svg';\nexport const X_OFFSET_UTIL = '8';\nexport const TEXTSPAN_TITLE_HEIGHT = 30;\nexport const TEXTSPAN_DESCRIPTION_HEIGHT = 15;\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AutosaveSettingsComponent } from '../Presentation/Autosave/AutosaveSettings/autosave-settings.component';\nimport { AutosaveOptionsComponent } from '../Presentation/Autosave/AutosaveOptions/autosave-options.component';\nimport { AutosavedDraftsComponent } from '../Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component';\nimport { FormsModule } from '@angular/forms';\nimport { MaterialModule } from '../material.module';\n\n@NgModule({\n declarations: [\n AutosaveSettingsComponent,\n AutosaveOptionsComponent,\n AutosavedDraftsComponent,\n ],\n exports: [AutosaveSettingsComponent],\n imports: [CommonModule, FormsModule, MaterialModule],\n})\nexport class AutosaveSettingsModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { HeaderButtonsComponent } from '../Presentation/Header/header-buttons.component';\n\n@NgModule({\n declarations: [HeaderButtonsComponent],\n exports: [HeaderButtonsComponent],\n imports: [CommonModule],\n})\nexport class DomainStoryModelerModuleModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DomainConfigurationComponent } from 'src/app/Presentation/DomainConfiguration/domain-configuration.component';\nimport { IconListItemComponent } from '../Presentation/DomainConfiguration/icon-list-item/icon-list-item.component';\nimport { DetailsListItemComponent } from '../Presentation/DomainConfiguration/details-list-item/details-list-item.component';\nimport { DomainDetailsComponent } from '../Presentation/DomainConfiguration/domain-details/domain-details.component';\nimport { GeneralSettingsComponent } from '../Presentation/Settings/General/general-settings.component';\nimport { LabelDictionaryComponent } from '../Presentation/LabelDictionary/label-dictionary.component';\nimport { FormsModule } from '@angular/forms';\nimport { MaterialModule } from '../material.module';\nimport { AutosaveSettingsModule } from './autosave-settings.module';\n\n@NgModule({\n declarations: [\n DomainConfigurationComponent,\n GeneralSettingsComponent,\n LabelDictionaryComponent,\n IconListItemComponent,\n DetailsListItemComponent,\n DomainDetailsComponent,\n ],\n exports: [\n GeneralSettingsComponent,\n DomainConfigurationComponent,\n LabelDictionaryComponent,\n ],\n imports: [AutosaveSettingsModule, CommonModule, FormsModule, MaterialModule],\n})\nexport class SettingsModule {}\n","import { Component } from '@angular/core';\nimport { AutosaveConfigurationService } from '../../../Service/Autosave/autosave-configuration.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_ERROR,\n SNACKBAR_SUCCESS,\n} from 'src/app/Domain/Common/constants';\n\n@Component({\n selector: 'app-autosave-options',\n templateUrl: './autosave-options.component.html',\n styleUrls: ['./autosave-options.component.scss'],\n})\nexport class AutosaveOptionsComponent {\n constructor(\n protected autosaveConfiguration: AutosaveConfigurationService,\n private snackbar: MatSnackBar\n ) {}\n\n save(activated: boolean, maxDrafts: number, interval: number) {\n if (\n this.autosaveConfiguration.setConfiguration({\n activated,\n maxDrafts,\n interval,\n })\n ) {\n this.snackbar.open('Settings for Autosave saved', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n });\n } else {\n this.snackbar.open(\n 'Unable to save settings for Autosave - please try again',\n undefined,\n {\n duration: 2 * SNACKBAR_DURATION,\n panelClass: SNACKBAR_ERROR,\n }\n );\n }\n }\n}\n","\n \n Autosave Options\n \n \n
\n \n Enabled\n
\n
\n Interval [sec]\n \n
\n
\n Max. Drafts\n \n
\n \n Apply\n \n
\n
\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-autosave-settings',\n templateUrl: './autosave-settings.component.html',\n styleUrls: ['./autosave-settings.component.scss'],\n})\nexport class AutosaveSettingsComponent {}\n","\n\n","import { Component, OnInit } from '@angular/core';\nimport { AutosaveService } from '../../../Service/Autosave/autosave.service';\nimport { Draft } from '../../../Domain/Autosave/draft';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_SUCCESS,\n} from 'src/app/Domain/Common/constants';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'app-autosaved-drafts',\n templateUrl: './autosaved-drafts.component.html',\n styleUrls: ['./autosaved-drafts.component.scss'],\n})\nexport class AutosavedDraftsComponent implements OnInit {\n drafts: Draft[] = [];\n subscription: Subscription;\n\n constructor(\n private autosaveService: AutosaveService,\n private snackbar: MatSnackBar\n ) {\n this.subscription = this.autosaveService.autosavedDraftsChanged$.subscribe(\n () => this.initDrafts()\n );\n }\n\n ngOnInit(): void {\n this.initDrafts();\n }\n\n initDrafts() {\n this.drafts = this.autosaveService.loadCurrentDrafts();\n }\n\n loadDraft(draft: Draft): void {\n this.autosaveService.loadDraft(draft);\n this.snackbar.open('Draft loaded', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n });\n }\n\n removeAllDrafts() {\n this.autosaveService.removeAllDrafts();\n }\n}\n","\n \n \n History\n \n {{ drafts.length ? drafts.length : \"no\" }}\n {{ drafts.length > 1 ? \"drafts\" : \"draft\" }} available\n \n \n
\n
\n
\n
{{ draft.title }}
\n
{{ draft.date }}
\n
\n \n Load Draft\n \n
\n
\n
\n \n Remove All Drafts\n \n
\n
\n
\n
\n\nNo drafts found.\n","import { Component, OnInit } from '@angular/core';\nimport { ModelerService } from '../../Service/Modeler/modeler.service';\nimport { AutosaveService } from '../../Service/Autosave/autosave.service';\n\n@Component({\n selector: 'app-modeler',\n templateUrl: './modeler.component.html',\n styleUrls: ['./modeler.component.scss'],\n})\nexport class ModelerComponent implements OnInit {\n constructor(\n private modelerService: ModelerService,\n private autosaveService: AutosaveService\n ) {}\n\n ngOnInit(): void {\n this.modelerService.postInit();\n this.autosaveService.loadLatestDraft();\n }\n}\n","
\n","import { AfterViewInit, Component, Inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\nimport { ActivityDialogData } from 'src/app/Domain/Dialog/activityDialogData';\nimport { ActivityCanvasObject } from '../../../Domain/Common/activityCanvasObject';\n\n@Component({\n selector: 'app-activity-dialog',\n templateUrl: './activity-dialog.component.html',\n styleUrls: ['./activity-dialog.component.scss'],\n})\nexport class ActivityDialogComponent {\n form: UntypedFormGroup;\n activityLabel: string;\n activityNumber: number | undefined;\n numberIsAllowedMultipleTimes: boolean;\n showNumberFields: boolean;\n activity: ActivityCanvasObject;\n\n saveFN: any;\n\n constructor(\n private fb: UntypedFormBuilder,\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: ActivityDialogData\n ) {\n this.activity = data.activity;\n this.activityLabel = data.activity.businessObject.name;\n this.numberIsAllowedMultipleTimes = data.numberIsAllowedMultipleTimes;\n this.activityNumber = data.activity.businessObject.number;\n this.showNumberFields = data.showNumberFields;\n\n this.saveFN = data.saveFN;\n\n this.form = this.fb.group({\n activityLabel: [this.activityLabel, []],\n activityNumber: [this.activityNumber, []],\n multipleNumbers: [this.numberIsAllowedMultipleTimes, []],\n });\n }\n\n onSubmit(): void {\n this.numberIsAllowedMultipleTimes = !this.numberIsAllowedMultipleTimes;\n this.form.patchValue({\n multipleNumbers: this.numberIsAllowedMultipleTimes,\n });\n }\n\n save(): void {\n this.saveFN({\n activity: this.activity,\n ...this.form.value,\n });\n this.dialogRef.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n preventDefault(event: Event) {\n event.preventDefault();\n }\n}\n","\n

Edit Activity

\n
\n
\n \n Number\n \n \n \n multiple\n
\n \n Label\n \n \n
\n
\n\n\n \n \n\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { ExportDialogData } from 'src/app/Domain/Dialog/exportDialogData';\nimport { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';\n\n@Component({\n selector: 'app-export-dialog',\n templateUrl: './export-dialog.component.html',\n styleUrls: ['./export-dialog.component.scss'],\n})\nexport class ExportDialogComponent implements OnInit {\n title: string;\n options: {\n text: string;\n tooltip: string;\n fn: any;\n }[];\n withTitle: BehaviorSubject;\n useWhiteBackground: BehaviorSubject;\n\n constructor(\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: ExportDialogData\n ) {\n this.withTitle = new BehaviorSubject(true);\n this.useWhiteBackground = new BehaviorSubject(true);\n this.title = data.title;\n this.options = data.options;\n }\n\n ngOnInit(): void {}\n\n doOption(i: number): void {\n this.options[i].fn(this.withTitle.value, this.useWhiteBackground.value);\n this.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n updateWithTitle($event: Event) {\n // @ts-ignore\n this.withTitle.next($event.target.checked);\n }\n\n updateUseWhiteBackground($event: Event) {\n // @ts-ignore\n this.useWhiteBackground.next($event.target.checked);\n }\n}\n","\n

{{ title }}

\n \n
\n \n
\n\n
\n\n
\n \n \n {{ option.text }}\n \n
\n
\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\nimport { TitleService } from 'src/app/Service/Title/title.service';\n\n@Component({\n selector: 'app-header-dialog',\n templateUrl: './header-dialog.component.html',\n styleUrls: ['./header-dialog.component.scss'],\n})\nexport class HeaderDialogComponent implements OnInit {\n form: UntypedFormGroup;\n title: string;\n description: string;\n\n constructor(\n private fb: UntypedFormBuilder,\n private dialogRef: MatDialogRef,\n private titleService: TitleService\n ) {\n this.title =\n this.titleService.getTitle() === '< name of this Domain Story >'\n ? ''\n : this.titleService.getTitle();\n this.description = this.titleService.getDescription();\n\n this.form = this.fb.group({\n title: [this.title, []],\n description: [this.description, []],\n });\n }\n\n ngOnInit(): void {}\n\n save(): void {\n this.titleService.updateTitleAndDescription(\n this.form.get('title')?.value,\n this.form.get('description')?.value,\n true\n );\n this.dialogRef.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n preventDefault(event: Event) {\n event.preventDefault();\n }\n}\n","\n
\n \n Title\n \n \n
\n \n Description\n \n \n
\n
\n\n\n \n \n\n","import { AfterViewInit, Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { InfoDialogData } from 'src/app/Domain/Dialog/infoDialogData';\n\n@Component({\n selector: 'app-info-dialog',\n templateUrl: './info-dialog.component.html',\n styleUrls: ['./info-dialog.component.scss'],\n})\nexport class InfoDialogComponent implements AfterViewInit {\n title: string;\n infoText: string;\n showConfirmButton: boolean;\n hasLink: boolean;\n linkText: string;\n\n constructor(\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: InfoDialogData\n ) {\n this.title = data.title;\n this.infoText = data.infoText;\n this.showConfirmButton = !data.isInfo;\n this.hasLink = data.isLink;\n this.linkText = data.linkText || '';\n }\n\n ngAfterViewInit() {\n const span = document.getElementsByClassName(\n 'readOnlyText'\n )[0] as HTMLTextAreaElement;\n span.style.height = span.scrollHeight + 'px';\n }\n\n close(): void {\n this.dialogRef.close();\n }\n}\n","\n

{{ title }}

\n {{ infoText }} \n {{ linkText }}\n
\n\n\n \n\n","import { Component } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'app-label-dictionary-dialog',\n templateUrl: './label-dictionary-dialog.component.html',\n styleUrls: ['./label-dictionary-dialog.component.scss'],\n})\nexport class LabelDictionaryDialogComponent {\n constructor(\n private dialogRef: MatDialogRef\n ) {}\n\n close(): void {\n this.dialogRef.close();\n }\n}\n","\n

Label Dictionary

\n \n
\n","import { AfterViewChecked, Component, Input } from '@angular/core';\nimport { IconListItem } from '../../../Domain/Domain-Configuration/iconListItem';\n\n@Component({\n selector: 'app-details-list-item',\n templateUrl: './details-list-item.component.html',\n styleUrls: ['./details-list-item.component.scss'],\n})\nexport class DetailsListItemComponent implements AfterViewChecked {\n @Input()\n icon!: IconListItem;\n\n private iconInitiated = false;\n\n get id(): string {\n return (\n 'domain-configuration-details-icon-' +\n this.icon.name.toLowerCase() +\n '-' +\n (this.icon.isWorkObject ? 'workobject' : 'actor')\n );\n }\n\n get name(): string {\n return this.icon.name;\n }\n\n ngAfterViewChecked(): void {\n this.createIcon();\n }\n\n private createIcon(): void {\n const img = document.getElementById(this.id) as HTMLImageElement;\n if (img && !this.iconInitiated) {\n img.src = '' + this.icon.svg;\n this.iconInitiated = true;\n }\n }\n}\n","
\n \"{{\n {{ icon.name }}\n
\n","import { Component, OnInit } from '@angular/core';\nimport {\n CustomDomainConfiguration,\n fromConfigurationFromFile,\n} from 'src/app/Domain/Common/domainConfiguration';\nimport { DomainConfigurationService } from 'src/app/Service/DomainConfiguration/domain-configuration.service';\nimport { IconDictionaryService } from 'src/app/Service/DomainConfiguration/icon-dictionary.service';\nimport { BehaviorSubject } from 'rxjs';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { sanitizeIconName } from 'src/app/Utils/sanitizer';\nimport { IconFilterEnum } from '../../Domain/Domain-Configuration/iconFilterEnum';\nimport { DomainCustomizationService } from '../../Service/DomainConfiguration/domain-customization.service';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\n\n@Component({\n selector: 'app-domain-configuration',\n templateUrl: './domain-configuration.component.html',\n styleUrls: ['./domain-configuration.component.scss'],\n})\nexport class DomainConfigurationComponent implements OnInit {\n private domainConfigurationTypes: CustomDomainConfiguration;\n\n filter = new BehaviorSubject(IconFilterEnum.ICON_FILTER_NONE);\n\n selectedActors = new BehaviorSubject([]);\n selectedWorkobjects = new BehaviorSubject([]);\n\n allIcons: BehaviorSubject;\n allIconNames = new BehaviorSubject([]);\n allFilteredIconNames = new BehaviorSubject([]);\n\n constructor(\n private configurationService: DomainConfigurationService,\n private iconDictionaryService: IconDictionaryService,\n private domainCustomizationService: DomainCustomizationService,\n private elementRegistryService: ElementRegistryService\n ) {\n this.domainConfigurationTypes =\n this.domainCustomizationService.getDomainConfiguration().value;\n\n this.allIcons = new BehaviorSubject(\n this.iconDictionaryService.getFullDictionary()\n );\n this.allIcons.subscribe((allIcons) => {\n this.allIconNames.next(allIcons.keysArray().sort(this.sortByName));\n });\n\n this.selectedActors = this.domainCustomizationService.selectedActors$;\n this.selectedWorkobjects =\n this.domainCustomizationService.selectedWorkobjects$;\n }\n\n ngOnInit(): void {\n this.filter.subscribe((type) => {\n let allFiltered = this.getFilteredNamesForType(type);\n this.allFilteredIconNames.next(allFiltered.sort(this.sortByName));\n });\n }\n\n private sortByName(a: string, b: string): number {\n if (a.includes('_custom') == b.includes('_custom')) {\n if (a < b) return -1;\n else {\n return 1;\n }\n } else {\n if (a.includes('_custom')) {\n return -1;\n } else {\n return 1;\n }\n }\n }\n\n /** Default Domain **/\n loadMinimalIconConfigurationWithDefaultIcons(): void {\n this.domainCustomizationService.resetDomain();\n }\n\n loadInitialConfiguration(): void {\n this.domainCustomizationService.cancel();\n }\n\n /** Persist Domain **/\n saveDomain(): void {\n this.domainCustomizationService.saveDomain(\n this.elementRegistryService.getUsedIcons()\n );\n }\n\n exportDomain(): void {\n this.domainCustomizationService.exportDomain();\n }\n\n /** Add Custom Icon **/\n startIconUpload(): void {\n document.getElementById('importIcon')?.click();\n }\n\n importIcon(): void {\n // @ts-ignore\n const files = document.getElementById('importIcon').files;\n for (let iconInputFile of files) {\n const reader = new FileReader();\n const name = sanitizeIconName(iconInputFile.name);\n const iconName = name + '_custom';\n\n reader.onloadend = (e: ProgressEvent) => {\n if (e.target) {\n const src: string = e.target.result as unknown as string;\n this.iconDictionaryService.addIMGToIconDictionary(src, iconName);\n this.iconDictionaryService.registerIconForBPMN(iconName, src);\n\n this.allIcons.next(this.iconDictionaryService.getFullDictionary());\n this.filter.next(this.filter.value);\n\n this.domainCustomizationService.addNewIcon(iconName);\n }\n };\n reader.readAsDataURL(iconInputFile);\n }\n }\n\n /** Import Domain **/\n startDomainImport(): void {\n document.getElementById('importDomain')?.click();\n }\n\n importDomain(): void {\n // @ts-ignore\n const domainInputFile = document.getElementById('importDomain').files[0];\n const reader = new FileReader();\n\n reader.onloadend = (e: ProgressEvent) => {\n const configFromFile = JSON.parse(\n e.target?.result as unknown as string\n ) as {\n name: string;\n actors: { [key: string]: any };\n workObjects: { [key: string]: any };\n };\n const config = fromConfigurationFromFile(configFromFile);\n this.configurationService.loadConfiguration(config, false);\n\n this.domainCustomizationService.importConfiguration(config);\n };\n\n reader.readAsText(domainInputFile);\n }\n\n /** Filter **/\n filterForActors(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_ACTOR) {\n this.filter.next(IconFilterEnum.ICON_FILTER_ACTOR);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterForWorkobjects(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_WORKOBJECT) {\n this.filter.next(IconFilterEnum.ICON_FILTER_WORKOBJECT);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterForUnassigned(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_UNASSIGNED) {\n this.filter.next(IconFilterEnum.ICON_FILTER_UNASSIGNED);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterByNameAndType($event: any) {\n const filteredByNameAndType = this.getFilteredNamesForType(\n this.filter.value\n ).filter((name) =>\n name.toLowerCase().includes($event.target.value.toLowerCase())\n );\n this.allFilteredIconNames.next(filteredByNameAndType.sort(this.sortByName));\n }\n\n private getFilteredNamesForType(type: IconFilterEnum): string[] {\n let allFiltered: string[] = [];\n switch (type) {\n case IconFilterEnum.ICON_FILTER_NONE:\n allFiltered = this.allIconNames.value;\n break;\n case IconFilterEnum.ICON_FILTER_ACTOR:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.domainCustomizationService.isIconActor(name)\n );\n break;\n case IconFilterEnum.ICON_FILTER_WORKOBJECT:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.domainCustomizationService.isIconWorkObject(name)\n );\n break;\n case IconFilterEnum.ICON_FILTER_UNASSIGNED:\n allFiltered = this.allIconNames.value.filter(\n (name) =>\n !this.domainCustomizationService.isIconActor(name) &&\n !this.domainCustomizationService.isIconWorkObject(name)\n );\n break;\n }\n return allFiltered;\n }\n}\n","
\n
\n
\n
\n \n \n home \n \n
\n
\n
\n
Filter:
\n \n None\n \n
\n \n Actors\n \n
\n \n Workobjects\n \n
\n \n
\n
\n \n \n unarchive\n \n \n
\n \n close\n \n \n
\n
\n\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n\n \n
\n","import { Component, OnInit } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { DomainCustomizationService } from 'src/app/Service/DomainConfiguration/domain-customization.service';\nimport { IconListItem } from 'src/app/Domain/Domain-Configuration/iconListItem';\nimport { TitleService } from 'src/app/Service/Title/title.service';\n\n@Component({\n selector: 'app-domain-details',\n templateUrl: './domain-details.component.html',\n styleUrls: ['./domain-details.component.scss'],\n})\nexport class DomainDetailsComponent implements OnInit {\n domainName: Observable;\n\n private draggedList: string = '';\n private draggedIndex = 0;\n\n selectedActors$ = this.customizationService.selectedActors$;\n selectedWorkobjects$ = this.customizationService.selectedWorkobjects$;\n\n constructor(\n private customizationService: DomainCustomizationService,\n titleService: TitleService\n ) {\n this.domainName = titleService.domainName$;\n }\n\n ngOnInit(): void {}\n\n changeName(event: Event): void {\n // @ts-ignore\n this.customizationService.changeName(event.target.value);\n }\n\n getIconForName(iconName: string): IconListItem {\n return this.customizationService.getIconForName(iconName).value;\n }\n\n allowDrop($event: DragEvent, listName: string) {\n if (this.draggedList === listName) {\n $event.preventDefault();\n }\n }\n\n onDrop($event: DragEvent, iconName: string, actors: boolean, index: number) {\n let list;\n if (actors) {\n list = this.selectedActors$;\n } else {\n list = this.selectedWorkobjects$;\n }\n const sortedList = list.value;\n const item = sortedList[this.draggedIndex];\n sortedList.splice(this.draggedIndex, 1);\n sortedList.splice(index, 0, item);\n list.next(sortedList);\n\n if (actors) {\n this.customizationService.setSelectedActors(sortedList);\n } else {\n this.customizationService.setSelectedWorkObject(sortedList);\n }\n }\n\n onDragStart(index: number, draggedList: string) {\n this.draggedList = draggedList;\n this.draggedIndex = index;\n }\n}\n","
\n
\n

Icon Set name

\n
\n \n \n \n
\n
\n
\n

Order of actors

\n \n \n \n \n \n
\n
\n

Order of work objects

\n \n \n \n \n \n
\n
\n","import { AfterViewChecked, Component, Input, OnInit } from '@angular/core';\nimport { IconListItem } from '../../../Domain/Domain-Configuration/iconListItem';\nimport { BehaviorSubject } from 'rxjs';\nimport { DomainCustomizationService } from '../../../Service/DomainConfiguration/domain-customization.service';\n\n@Component({\n selector: 'app-icon-list-item',\n templateUrl: './icon-list-item.component.html',\n styleUrls: ['./icon-list-item.component.scss'],\n})\nexport class IconListItemComponent implements OnInit, AfterViewChecked {\n @Input()\n iconName: string = '';\n\n private iconInitiated = false;\n\n // @ts-ignore\n icon = new BehaviorSubject({});\n\n isActor: boolean = false;\n isWorkobject: boolean = false;\n isNone: boolean = true;\n\n get name(): string {\n return this.iconName;\n }\n\n get id() {\n return 'domain-configuration-icon-' + this.iconName;\n }\n\n constructor(private domainCustomizationService: DomainCustomizationService) {}\n\n ngOnInit(): void {\n this.icon = this.domainCustomizationService.getIconForName(this.iconName);\n if (!this.icon) {\n return;\n }\n\n this.icon.subscribe((value) => {\n this.isActor = value.isActor;\n this.isWorkobject = value.isWorkObject;\n this.isNone = !(value.isActor || value.isWorkObject);\n });\n this.isActor = this.icon.value.isActor;\n this.isWorkobject = this.icon.value.isWorkObject;\n this.isNone = !(this.icon.value.isActor || this.icon.value.isWorkObject);\n }\n\n ngAfterViewChecked(): void {\n this.createIcon();\n }\n\n private createIcon(): void {\n const img = document.getElementById(this.id) as HTMLImageElement;\n if (img && !this.iconInitiated) {\n img.src = '' + this.icon.value?.svg;\n this.iconInitiated = true;\n }\n }\n\n toggleNone() {\n this.domainCustomizationService.setAsUnassigned(\n this.iconName,\n this.icon.value.isActor\n );\n }\n\n toggleActor(): void {\n this.domainCustomizationService.setAsActor(true, this.iconName);\n }\n\n toggleWorkobject(): void {\n this.domainCustomizationService.setAsWorkobject(true, this.iconName);\n }\n}\n","
\n
\n \"{{\n
{{ name }}
\n
\n
\n \n \n None\n \n \n Actor\n \n \n Workobject\n \n \n
\n
\n","import { Component } from '@angular/core';\nimport { SettingsService } from '../../Service/Settings/settings.service';\nimport { ModelerService } from '../../Service/Modeler/modeler.service';\nimport { Observable } from 'rxjs';\nimport { ReplayStateService } from '../../Service/Replay/replay-state.service';\nimport { DirtyFlagService } from '../../Service/DirtyFlag/dirty-flag.service';\nimport {\n ExportDialogData,\n ExportOption,\n} from '../../Domain/Dialog/exportDialogData';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { ExportDialogComponent } from '../Dialog/export-dialog/export-dialog.component';\nimport { InfoDialogData } from '../../Domain/Dialog/infoDialogData';\nimport { InfoDialogComponent } from '../Dialog/info-dialog/info-dialog.component';\nimport { DialogService } from '../../Service/Dialog/dialog.service';\nimport { ReplayService } from '../../Service/Replay/replay.service';\nimport { ExportService } from '../../Service/Export/export.service';\nimport { ImportDomainStoryService } from '../../Service/Import/import-domain-story.service';\nimport { LabelDictionaryDialogComponent } from '../Dialog/label-dictionary-dialog/label-dictionary-dialog.component';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n} from '../../Domain/Common/constants';\nimport { AutosaveService } from '../../Service/Autosave/autosave.service';\nimport { TitleService } from '../../Service/Title/title.service';\nimport { RendererService } from '../../Service/Renderer/renderer.service';\n\n@Component({\n selector: 'app-header-buttons',\n templateUrl: './header-buttons.component.html',\n styleUrls: ['./header-buttons.component.scss'],\n})\nexport class HeaderButtonsComponent {\n isReplay$: Observable;\n isDirty$: Observable;\n\n constructor(\n private settingsService: SettingsService,\n private modelerService: ModelerService,\n private replayStateService: ReplayStateService,\n private dirtyFlagService: DirtyFlagService,\n private dialogService: DialogService,\n private replayService: ReplayService,\n private exportService: ExportService,\n private importService: ImportDomainStoryService,\n private titleService: TitleService,\n private renderService: RendererService,\n private snackbar: MatSnackBar\n ) {\n this.isReplay$ = this.replayStateService.replayOn$;\n this.isDirty$ = this.dirtyFlagService.dirty$;\n }\n import(): void {\n // @ts-ignore\n const filename = document.getElementById('import').files[0].name;\n if (filename.endsWith('.dst')) {\n this.importService.importDST(\n // @ts-ignore\n document.getElementById('import').files[0],\n filename,\n false\n );\n } else if (filename.endsWith('.dst.svg')) {\n this.importService.importDST(\n // @ts-ignore\n document.getElementById('import').files[0],\n filename,\n true\n );\n } else if (filename.endsWith('.egn')) {\n this.importService.importEGN(\n // @ts-ignore\n document.getElementById('import').files[0],\n filename,\n false\n );\n } else if (filename.endsWith('.egn.svg')) {\n this.importService.importEGN(\n // @ts-ignore\n document.getElementById('import').files[0],\n filename,\n true\n );\n }\n this.modelerService.commandStackChanged();\n }\n\n openSettings(): void {\n this.settingsService.open();\n }\n\n /** Open Dialogs **/\n openDownloadDialog(): void {\n if (this.exportService.isDomainStoryExportable()) {\n const SVGDownloadOption = new ExportOption(\n 'SVG',\n 'Download an SVG-Image with the Domain-Story embedded. Can be used to save and share your Domain-Story.',\n (withTitle: boolean, useWhiteBackground: boolean) =>\n this.exportService.downloadSVG(withTitle, useWhiteBackground)\n );\n const EGNDownloadOption = new ExportOption(\n 'EGN',\n 'Download an EGN-File with the Domain-Story. Can be used to save and share your Domain-Story.',\n (withTitle: boolean, useWhiteBackground: boolean) =>\n this.exportService.downloadDST()\n );\n const PNGDownloadOption = new ExportOption(\n 'PNG',\n 'Donwload a PNG-Image of the DOmain-Story. This does not include the Domain-Story!',\n (withTitle: boolean, useWhiteBackground: boolean) =>\n this.exportService.downloadPNG(withTitle)\n );\n const HTMLDownloadOption = new ExportOption(\n 'HTML-Presentation',\n 'Download an HTML-Presentation. This does not include the Domain-Story!',\n (withTitle: boolean, useWhiteBackground: boolean) =>\n this.exportService.downloadHTMLPresentation()\n );\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n config.data = new ExportDialogData('Export', [\n SVGDownloadOption,\n EGNDownloadOption,\n PNGDownloadOption,\n HTMLDownloadOption,\n ]);\n\n this.dialogService.openDialog(ExportDialogComponent, config);\n } else {\n this.snackbar.open('No Domain Story to be exported', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_INFO,\n });\n }\n }\n\n openKeyboardShortcutsDialog(): void {\n const title = 'Keyboard shortcuts';\n const shortCutText =\n 'Undo:\\t\\t\\t\\t\\tctrl + Z \\n' +\n 'Redo:\\t\\t\\t\\t\\tctrl + Y OR ctrl + shift + Z\\n' +\n 'Select All:\\t\\t\\t\\tctrl + A\\n' +\n 'Export as EGN:\\t\\t\\tctrl + S\\n' +\n 'Import Domain Story: \\tctrl + L\\n' +\n 'Search for text:\\t\\t\\tctrl + F\\n' +\n 'Direct editing:\\t\\t\\tE\\n' +\n 'Hand tool:\\t\\t\\t\\tH\\n' +\n 'Lasso tool:\\t\\t\\t\\tL\\n' +\n 'Space tool:\\t\\t\\t\\tS';\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n config.data = new InfoDialogData(title, shortCutText, true);\n\n this.dialogService.openDialog(InfoDialogComponent, config);\n }\n\n openLabelDictionary(): void {\n if (this.exportService.isDomainStoryExportable()) {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n this.dialogService.openDialog(LabelDictionaryDialogComponent, config);\n } else {\n this.snackbar.open(\n 'There are currently no Elements on the canvas',\n undefined,\n {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_INFO,\n }\n );\n }\n }\n\n createNewDomainStory(): void {\n this.titleService.reset();\n this.renderService.reset();\n }\n\n /** Replay functions **/\n startReplay(): void {\n this.replayService.startReplay();\n }\n\n stopReplay(): void {\n this.replayService.stopReplay();\n }\n\n previousStep(): void {\n this.replayService.previousStep();\n }\n\n nextStep(): void {\n this.replayService.nextStep();\n }\n}\n","
\n \n play_arrow \n \n \n unarchive \n \n \n \n \n archive\n \n \n archive\n \n \n \n \n spellcheck\n \n \n \n \n keyboard \n \n \n note_add \n \n
\n
\n \n \n \n
\n","import { Component } from '@angular/core';\nimport { combineLatest, map, Observable } from 'rxjs';\nimport { TitleService } from '../../Service/Title/title.service';\nimport { ReplayService } from '../../Service/Replay/replay.service';\nimport { ReplayStateService } from '../../Service/Replay/replay-state.service';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { HeaderDialogComponent } from '../Dialog/header-dialog/header-dialog.component';\nimport { DialogService } from '../../Service/Dialog/dialog.service';\n\n@Component({\n selector: 'app-header',\n templateUrl: './header.component.html',\n styleUrls: ['./header.component.scss'],\n})\nexport class HeaderComponent {\n title$ = this.titleService.title$;\n description$ = this.titleService.description$;\n showDescription$ = this.titleService.showDescription$;\n\n isReplay$: Observable;\n stepDescription$: Observable;\n showDescription: Observable;\n\n constructor(\n private titleService: TitleService,\n private replayService: ReplayService,\n private replayStateService: ReplayStateService,\n private dialogService: DialogService\n ) {\n this.isReplay$ = this.replayStateService.replayOn$;\n\n this.stepDescription$ = combineLatest([\n this.replayService.currentStep$,\n this.replayService.maxStepNumber$,\n ]).pipe(map(([step, count]) => `${step}/${count}`));\n\n this.showDescription = this.titleService.showDescription$;\n }\n\n openHeaderDialog(): void {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n this.dialogService.openDialog(HeaderDialogComponent, config);\n }\n\n setShowDescription(show: boolean): void {\n this.titleService.setShowDescription(show);\n }\n}\n","\n \n \n \n expand_less\n \n \n \n expand_more\n \n \n \n {{ title$ | async }}\n edit \n \n \n\n \n \n Step: {{ stepDescription$ | async }}\n\n \n\n \n \n\n\n {{ description$ | async }}\n\n","import { AfterViewInit, Component, EventEmitter, Output } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { WorkObjectLabelEntry } from '../../Domain/LabelDictionary/workObjectLabelEntry';\nimport { LabelEntry } from '../../Domain/LabelDictionary/labelEntry';\nimport { LabelDictionaryService } from '../../Service/LabelDictionary/label-dictionary.service';\n\n@Component({\n selector: 'app-label-dictionary',\n templateUrl: './label-dictionary.component.html',\n styleUrls: ['./label-dictionary.component.scss'],\n})\nexport class LabelDictionaryComponent implements AfterViewInit {\n workobjectEntriesSubject: BehaviorSubject;\n activityEntriesSubject: BehaviorSubject;\n\n workObjectEntries: WorkObjectLabelEntry[];\n activityEntries: LabelEntry[];\n\n @Output()\n closeEmitter: EventEmitter = new EventEmitter();\n\n constructor(private labelDictionaryService: LabelDictionaryService) {\n this.labelDictionaryService.createLabelDictionaries();\n this.workObjectEntries = this.labelDictionaryService.getWorkObjectLabels();\n this.activityEntries = this.labelDictionaryService.getActivityLabels();\n\n this.workobjectEntriesSubject = new BehaviorSubject(this.workObjectEntries);\n this.activityEntriesSubject = new BehaviorSubject(this.activityEntries);\n }\n\n ngAfterViewInit(): void {\n this.labelDictionaryService.createLabelDictionaries();\n this.workobjectEntriesSubject.next(\n this.labelDictionaryService.getWorkObjectLabels()\n );\n this.activityEntriesSubject.next(\n this.labelDictionaryService.getActivityLabels()\n );\n }\n\n save(): void {\n this.workObjectEntries = this.workobjectEntriesSubject.value;\n this.activityEntries = this.activityEntriesSubject.value;\n\n const activityNames: string[] = [];\n const originalActivityNames: string[] = [];\n\n const workObjectNames: string[] = [];\n const originalWorkObjectNames: string[] = [];\n\n this.activityEntries\n .filter((a) => a.name !== a.originalName)\n .forEach((activity) => {\n activityNames.push(activity.name);\n originalActivityNames.push(activity.originalName);\n });\n\n this.workObjectEntries\n .filter((w) => w.name !== w.originalName)\n .forEach((workobject) => {\n workObjectNames.push(workobject.name);\n originalWorkObjectNames.push(workobject.originalName);\n });\n\n this.labelDictionaryService.massRenameLabels(\n activityNames,\n originalActivityNames,\n workObjectNames,\n originalWorkObjectNames\n );\n this.closeEmitter.emit();\n }\n\n cancel(): void {\n this.workObjectEntries.forEach((w) => {\n w.name = w.originalName;\n });\n this.activityEntries.forEach((a) => {\n a.name = a.originalName;\n });\n\n this.workobjectEntriesSubject.next(this.workObjectEntries);\n this.activityEntriesSubject.next(this.activityEntries);\n }\n\n updateActivityEntry($event: Event, activityEntry: LabelEntry) {\n let entries = this.activityEntriesSubject.value;\n entries.filter(\n (e) => e.originalName === activityEntry.originalName\n // @ts-ignore\n )[0].name = $event.target.value;\n this.activityEntriesSubject.next(entries);\n }\n\n updateWorkobjectEntry($event: Event, workobjectEntry: LabelEntry) {\n let entries = this.workobjectEntriesSubject.value;\n entries.filter(\n (e) => e.originalName === workobjectEntry.originalName\n // @ts-ignore\n )[0].name = $event.target.value;\n this.workobjectEntriesSubject.next(entries);\n }\n\n preventDefault(event: Event): void {\n event.preventDefault();\n }\n\n close(): void {\n this.closeEmitter.emit();\n }\n}\n","\n
\n

Workobjects

\n \n \n \n \n \n \n \n
\n
\n

Activities

\n \n \n \n \n \n \n \n
\n
\n\n \n \n\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-general-settings',\n templateUrl: './general-settings.component.html',\n styleUrls: ['./general-settings.component.scss'],\n})\nexport class GeneralSettingsComponent {}\n","
\n \n
\n","import { Component } from '@angular/core';\nimport { SettingsService } from 'src/app/Service/Settings/settings.service';\nimport { ModelerService } from 'src/app/Service/Modeler/modeler.service';\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { AutosaveConfigurationService } from '../../Service/Autosave/autosave-configuration.service';\nimport { DomainCustomizationService } from '../../Service/DomainConfiguration/domain-customization.service';\n\n@Component({\n selector: 'app-settings',\n templateUrl: './settings.component.html',\n styleUrls: ['./settings.component.scss'],\n})\nexport class SettingsComponent {\n domainConfiguration: DomainConfiguration | undefined;\n showGeneralSettings = new BehaviorSubject(false);\n showDomainCustomization = new BehaviorSubject(true);\n\n constructor(\n private settingsService: SettingsService,\n private modelerService: ModelerService,\n private domainCustomizationService: DomainCustomizationService\n ) {}\n\n close(): void {\n const savedConfiguration =\n this.domainCustomizationService.getAndClearSavedConfiguration();\n if (savedConfiguration) {\n this.modelerService.restart(savedConfiguration);\n }\n this.settingsService.close();\n }\n\n openGeneralSettings() {\n this.showGeneralSettings.next(true);\n this.showDomainCustomization.next(false);\n }\n\n openDomainCustomization() {\n this.showGeneralSettings.next(false);\n this.showDomainCustomization.next(true);\n }\n}\n","
\n \n \n \n
\n \n Customize Icons for Your Domain\n \n \n General Settings\n \n
\n
\n
\n\n \n \n
\n","import { Injectable } from '@angular/core';\nimport { ReplaySubject } from 'rxjs';\nimport { StorageService } from '../BrowserStorage/storage.service';\nimport { AutosaveConfiguration } from '../../Domain/Autosave/autosave-configuration';\nimport {\n DEFAULT_AUTOSAVES_MAX_DRAFTS,\n DEFAULT_AUTOSAVES_ENABLED,\n DEFAULT_AUTOSAVES_INTERVAL,\n} from 'src/app/Domain/Common/constants';\n\nconst AUTOSAVE_CONFIGURATION_TAG = 'autosaveConfiguration';\n\nconst defaultConfiguration: AutosaveConfiguration = {\n activated: DEFAULT_AUTOSAVES_ENABLED,\n interval: DEFAULT_AUTOSAVES_INTERVAL,\n maxDrafts: DEFAULT_AUTOSAVES_MAX_DRAFTS,\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AutosaveConfigurationService {\n private configuration = defaultConfiguration;\n\n private readonly configurationSubject =\n new ReplaySubject(1);\n readonly configuration$ = this.configurationSubject.asObservable();\n\n constructor(private storageService: StorageService) {\n this.initializeConfiguration();\n }\n\n private initializeConfiguration() {\n this.loadConfiguration();\n this.configurationSubject.next(this.configuration);\n }\n\n setConfiguration(configuration: AutosaveConfiguration): boolean {\n try {\n this.configuration = configuration;\n this.saveConfiguration();\n this.configurationSubject.next(configuration);\n return true;\n } catch {\n return false;\n }\n }\n\n private loadConfiguration() {\n this.configuration =\n this.storageService.get(AUTOSAVE_CONFIGURATION_TAG) ??\n defaultConfiguration;\n }\n\n private saveConfiguration() {\n this.storageService.set(AUTOSAVE_CONFIGURATION_TAG, this.configuration);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { RendererService } from '../Renderer/renderer.service';\nimport { ExportService } from '../Export/export.service';\nimport { Draft } from '../../Domain/Autosave/draft';\nimport { AutosaveConfigurationService } from './autosave-configuration.service';\nimport { IconDictionaryService } from '../DomainConfiguration/icon-dictionary.service';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { fromConfigurationFromFile } from '../../Domain/Common/domainConfiguration';\nimport { StorageService } from '../BrowserStorage/storage.service';\nimport { TitleService } from '../Title/title.service';\nimport { AutosaveConfiguration } from '../../Domain/Autosave/autosave-configuration';\nimport { Subject } from 'rxjs';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_TITLE,\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n} from '../../Domain/Common/constants';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\nexport const DRAFTS_TAG = 'autosaveDrafts';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AutosaveService {\n private autosaveTimer: any;\n autosavedDraftsChanged$ = new Subject();\n\n constructor(\n private autosaveConfiguration: AutosaveConfigurationService,\n private exportService: ExportService,\n private iconDictionaryService: IconDictionaryService,\n private rendererService: RendererService,\n private snackbar: MatSnackBar,\n private storageService: StorageService,\n private titleService: TitleService\n ) {\n this.autosaveConfiguration.configuration$.subscribe((configuration) =>\n this.updateConfiguration(configuration)\n );\n }\n\n loadCurrentDrafts(): Draft[] {\n const drafts = this.readDrafts();\n this.sortDrafts(drafts);\n return drafts;\n }\n\n loadDraft(draft: Draft): void {\n const configFromFile = draft.configAndDST.domain;\n const config = fromConfigurationFromFile(configFromFile);\n const story = JSON.parse(draft.configAndDST.dst);\n\n this.titleService.updateTitleAndDescription(\n draft.title,\n draft.description,\n false\n );\n\n const actorIcons = this.iconDictionaryService.getElementsOfType(\n story,\n elementTypes.ACTOR\n );\n const workObjectIcons = this.iconDictionaryService.getElementsOfType(\n story,\n elementTypes.WORKOBJECT\n );\n this.iconDictionaryService.updateIconRegistries(\n actorIcons,\n workObjectIcons,\n config\n );\n this.rendererService.importStory(story, true, config, false);\n }\n\n removeAllDrafts() {\n this.storageService.set(DRAFTS_TAG, []);\n this.autosavedDraftsChanged$.next();\n }\n\n loadLatestDraft() {\n const drafts = this.readDrafts();\n if (drafts.length === 0) {\n return;\n }\n this.loadDraft(drafts[0]);\n }\n\n private updateConfiguration(configuration: AutosaveConfiguration) {\n this.stopTimer();\n\n if (configuration.activated) {\n this.startTimer(configuration.interval, configuration.maxDrafts);\n }\n }\n\n private stopTimer(): void {\n if (this.autosaveTimer) {\n clearInterval(this.autosaveTimer);\n this.autosaveTimer = undefined;\n }\n }\n\n private startTimer(interval: number, maxDrafts: number): void {\n this.autosaveTimer = setInterval(() => {\n const savedDrafts = this.loadCurrentDrafts();\n const newDraft = this.createDraft();\n let isChanged = maxDrafts > 0;\n if (savedDrafts.length > 0) {\n isChanged = isChanged && !this.isSame(newDraft, savedDrafts[0]);\n }\n if (isChanged && !this.isDraftEmpty(newDraft)) {\n savedDrafts.unshift(newDraft);\n while (savedDrafts.length > maxDrafts) {\n savedDrafts.pop();\n }\n this.writeDrafts(savedDrafts);\n this.snackbar.open('Draft Saved', undefined, {\n panelClass: SNACKBAR_INFO,\n duration: SNACKBAR_DURATION,\n });\n this.autosavedDraftsChanged$.next();\n }\n }, interval * 1000);\n }\n\n private isDraftEmpty(draft: Draft) {\n return (\n draft.title === INITIAL_TITLE &&\n draft.description === INITIAL_DESCRIPTION &&\n JSON.parse(draft.configAndDST.dst).length === 0\n );\n }\n\n private isSame(a: Draft, b: Draft) {\n return (\n a.title === b.title &&\n a.description === b.description &&\n JSON.stringify(a.configAndDST) === JSON.stringify(b.configAndDST)\n );\n }\n\n private writeDrafts(drafts: Draft[]) {\n this.storageService.set(DRAFTS_TAG, drafts);\n }\n\n private readDrafts(): Draft[] {\n return this.storageService.get(DRAFTS_TAG) ?? [];\n }\n\n private createDraft(): Draft {\n const dst = JSON.stringify(this.rendererService.getStory(), null, 2);\n const configAndDST = this.exportService.createConfigAndDST(dst);\n\n const date = new Date().toString().slice(0, 25);\n\n return {\n title: this.titleService.getTitle(),\n description: this.titleService.getDescription(),\n configAndDST,\n date,\n };\n }\n\n private sortDrafts(drafts: Draft[]): void {\n drafts.sort((a: Draft, b: Draft) => {\n const aDate = Date.parse(a.date);\n const bDate = Date.parse(b.date);\n return aDate > bDate ? 0 : 1;\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DOMAIN_CONFIGURATION_TAG } from '../../Domain/Common/constants';\nimport {\n DomainConfiguration,\n fromConfigurationFromFile,\n} from '../../Domain/Common/domainConfiguration';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StorageService {\n set(key: string, value: any) {\n localStorage.setItem(key, JSON.stringify(value));\n }\n\n get(key: string): any {\n const json = localStorage.getItem(key);\n if (json) {\n return JSON.parse(json);\n }\n return null;\n }\n\n removeItem(key: string) {\n localStorage.removeItem(key);\n }\n\n checkValidityOfConfiguration(configuratioFromFile: DomainConfiguration) {\n return (\n configuratioFromFile.actors.keysArray().length > 1 &&\n configuratioFromFile.workObjects.keysArray().length > 1 &&\n !configuratioFromFile.actors\n .all()\n .some((e) => typeof e.value !== 'string') &&\n !configuratioFromFile.workObjects\n .all()\n .some((e) => typeof e.value !== 'string')\n );\n }\n\n getStoredDomainConfiguration(): DomainConfiguration | undefined {\n const domainString = localStorage.getItem(DOMAIN_CONFIGURATION_TAG);\n\n if (!domainString) {\n return;\n } else {\n const configuratioFromFile = fromConfigurationFromFile(\n JSON.parse(domainString)\n );\n if (this.checkValidityOfConfiguration(configuratioFromFile)) {\n return configuratioFromFile;\n }\n }\n return;\n }\n\n setStoredDomainConfiguration(config: DomainConfiguration): void {\n const actors: {\n [p: string]: any;\n } = {};\n config.actors.keysArray().forEach((key) => {\n actors[key] = config.actors.get(key);\n });\n const workObjects: {\n [p: string]: any;\n } = {};\n config.workObjects.keysArray().forEach((key) => {\n workObjects[key] = config.workObjects.get(key);\n });\n\n const configForStorage = {\n name: config.name,\n actors: actors,\n workObjects: workObjects,\n };\n\n localStorage.setItem(\n DOMAIN_CONFIGURATION_TAG,\n JSON.stringify(configForStorage, null, 2)\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CommandStackService {\n private commandStack: any;\n\n constructor() {}\n\n setCommandStack(commandStack: any): void {\n this.commandStack = commandStack;\n }\n\n execute(action: string, payload: any) {\n this.commandStack.execute(action, payload);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\nimport { ComponentType } from '@angular/cdk/overlay';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DialogService {\n constructor(private matDialog: MatDialog) {}\n\n openDialog(dialog: ComponentType, config: MatDialogConfig): void {\n this.matDialog.open(dialog, config);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DirtyFlagService {\n private isDirtySubject = new BehaviorSubject(false);\n dirty$ = this.isDirtySubject.asObservable();\n\n makeDirty(): void {\n this.isDirtySubject.next(true);\n }\n\n makeClean(): void {\n this.isDirtySubject.next(false);\n }\n\n get dirty(): boolean {\n return this.isDirtySubject.value;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { StoryStep } from 'src/app/Domain/Replay/storyStep';\nimport {\n HIGHLIGHT_COLOR,\n HIGHLIGHT_NUMBER_BACKGROUNG_COLOR,\n HIGHLIGHT_NUMBER_COLOR,\n HIGHLIGHT_STROKE_WIDTH,\n NUMBER_BACKGROUND_COLOR,\n NUMBER_COLOR,\n STROKE_WIDTH,\n} from '../../Domain/DomManipulation/replayConstants';\n\n@Injectable({\n providedIn: 'root',\n})\n/**\n * Manipulates the DOM during replay to only show the elements of the current Step\n */\nexport class DomManipulationService {\n constructor(private elementRegistryService: ElementRegistryService) {}\n\n showAll(): void {\n this.removeHighlights();\n this.elementRegistryService\n .getAllCanvasObjects()\n .slice()\n .concat(this.elementRegistryService.getAllGroups().slice())\n .map((e) => e.businessObject)\n .forEach((element) => {\n const domObject = document.querySelector(\n '[data-element-id=' + element.id + ']'\n );\n // @ts-ignore\n domObject.style.display = 'block';\n });\n }\n\n showStep(replayStep: StoryStep, previousStep?: StoryStep): void {\n this.removeHighlights();\n const notShown = this.getAllNotShown(replayStep.objects);\n\n notShown.forEach((element) => {\n const domObject = document.querySelector(\n '[data-element-id=' + element.id + ']'\n );\n if (domObject) {\n // @ts-ignore\n domObject.style.display = 'none';\n }\n });\n\n this.hightlightStep(\n previousStep\n ? replayStep.objects.filter((o) => !previousStep.objects.includes(o))\n : replayStep.objects\n );\n\n replayStep.objects.forEach((element) => {\n const domObject = document.querySelector(\n '[data-element-id=' + element.id + ']'\n );\n if (domObject) {\n // @ts-ignore\n domObject.style.display = 'block';\n }\n });\n }\n\n getNumberDomForActivity(activity: SVGPolylineElement): any {\n const numberDOMS = activity.parentElement?.getElementsByClassName(\n 'djs-labelNumber'\n ) || ['', ''];\n return {\n numberBackgroundDom: numberDOMS[0],\n numberTextDom: numberDOMS[1],\n };\n }\n\n private removeHighlights(): void {\n const allActivities = this.elementRegistryService.getAllActivities();\n const allConnections = this.elementRegistryService.getAllConnections();\n\n allActivities.forEach((activity) => {\n const querySelector = document.querySelector(\n '[data-element-id=' + activity.id + ']'\n );\n if (querySelector) {\n const activityDomObject =\n querySelector.getElementsByTagName('polyline')[0];\n\n activityDomObject.style.stroke =\n activity.businessObject.pickedColor || 'black';\n activityDomObject.style.strokeWidth = STROKE_WIDTH;\n\n const { numberBackgroundDom, numberTextDom } =\n this.getNumberDomForActivity(activityDomObject);\n if (numberBackgroundDom && numberTextDom) {\n numberBackgroundDom.style.fill = NUMBER_BACKGROUND_COLOR;\n numberTextDom.style.fill = NUMBER_COLOR;\n }\n }\n });\n\n allConnections.forEach((connection) => {\n // @ts-ignore\n const connectionDomObject = document\n .querySelector('[data-element-id=' + connection.id + ']')\n .getElementsByTagName('polyline')[0];\n\n connectionDomObject.style.stroke =\n connection.businessObject.pickedColor || 'black';\n connectionDomObject.style.strokeWidth = '1.5';\n });\n }\n\n private hightlightStep(stepObjects: BusinessObject[]): void {\n stepObjects\n .filter((e) => e.type === elementTypes.ACTIVITY)\n .forEach((activity) => {\n const querySelector = document.querySelector(\n '[data-element-id=' + activity.id + ']'\n );\n if (querySelector) {\n const activityDomObject =\n querySelector.getElementsByTagName('polyline')[0];\n\n activityDomObject.style.stroke = HIGHLIGHT_COLOR;\n activityDomObject.style.strokeWidth = HIGHLIGHT_STROKE_WIDTH;\n\n const { numberBackgroundDom, numberTextDom } =\n this.getNumberDomForActivity(activityDomObject);\n if (numberTextDom && numberBackgroundDom) {\n numberBackgroundDom.style.fill = HIGHLIGHT_NUMBER_BACKGROUNG_COLOR;\n numberTextDom.style.fill = HIGHLIGHT_NUMBER_COLOR;\n }\n }\n });\n }\n\n private getAllNotShown(shownElements: BusinessObject[]): BusinessObject[] {\n const notShownElements: BusinessObject[] = [];\n const allObjects = this.elementRegistryService\n .getAllCanvasObjects()\n .concat(this.elementRegistryService.getAllGroups());\n\n allObjects.forEach((element) => {\n if (!shownElements.includes(element.businessObject)) {\n if (element.type.includes(elementTypes.CONNECTION)) {\n // @ts-ignore\n if (!element.source.type.includes(elementTypes.GROUP)) {\n notShownElements.push(element.businessObject);\n } else {\n // @ts-ignore\n shownElements.push(element.target);\n }\n } else {\n notShownElements.push(element.businessObject);\n }\n }\n });\n return notShownElements;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { IconDictionaryService } from 'src/app/Service/DomainConfiguration/icon-dictionary.service';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport {\n CustomDomainConfiguration,\n DomainConfiguration,\n DomainConfigurationForExport,\n} from 'src/app/Domain/Common/domainConfiguration';\nimport { defaultConf } from '../../Domain/Common/iconConfiguration';\nimport { TitleService } from '../Title/title.service';\nimport { INITIAL_DOMAIN_NAME } from '../../Domain/Common/constants';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DomainConfigurationService {\n constructor(\n private iconDictionaryService: IconDictionaryService,\n private elementRegistryService: ElementRegistryService,\n private titleService: TitleService\n ) {}\n\n setDomainName(domainName: string): void {\n this.titleService.setDomainName(\n domainName ? domainName : INITIAL_DOMAIN_NAME\n );\n }\n\n exportConfiguration(): void {\n const domainConfiguration = this.getCurrentConfigurationForExport();\n if (!domainConfiguration) {\n return;\n }\n\n const configJSONString = JSON.stringify(domainConfiguration, null, 2);\n const filename = this.titleService.getDomainName();\n const element = document.createElement('a');\n\n element.setAttribute(\n 'href',\n 'data:text/plain;charset=utf-8,' + encodeURIComponent(configJSONString)\n );\n element.setAttribute('download', filename + '.domain');\n element.style.display = 'none';\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n }\n\n loadConfiguration(\n customConfig: DomainConfiguration,\n updateDomainName = true\n ): void {\n let actorDict = new Dictionary();\n let workObjectDict = new Dictionary();\n\n if (customConfig.actors.keysArray()) {\n actorDict = customConfig.actors;\n workObjectDict = customConfig.workObjects;\n } else {\n actorDict.addEach(customConfig.actors);\n workObjectDict.addEach(customConfig.workObjects);\n }\n\n const actorKeys = actorDict.keysArray();\n const workObjectKeys = workObjectDict.keysArray();\n\n this.iconDictionaryService.updateIconRegistries([], [], customConfig);\n\n this.iconDictionaryService\n .getIconConfiguration()\n .appendSRCFile(actorKeys, actorDict, workObjectKeys, workObjectDict);\n\n this.iconDictionaryService.addIconsFromDomainConfiguration(\n elementTypes.ACTOR,\n actorKeys.map((a) => elementTypes.ACTOR + a)\n );\n this.iconDictionaryService.addIconsFromDomainConfiguration(\n elementTypes.WORKOBJECT,\n workObjectKeys.map((w) => elementTypes.WORKOBJECT + w)\n );\n\n if (updateDomainName) {\n const configurationName = customConfig.name;\n this.setDomainName(configurationName);\n }\n }\n\n getCurrentConfiguration(): DomainConfiguration | undefined {\n const actors = this.iconDictionaryService.getActorsDictionary();\n const workObjects = this.iconDictionaryService.getWorkObjectsDictionary();\n\n let domainConfiguration;\n\n if (actors.size() > 0 && workObjects.size() > 0) {\n domainConfiguration = this.createConfigFromDictionaries(\n actors,\n workObjects\n );\n }\n return domainConfiguration;\n }\n\n getCurrentConfigurationForExport(): DomainConfigurationForExport | undefined {\n const currentConfiguration = this.getCurrentConfiguration();\n\n if (currentConfiguration) {\n const actors: any = {};\n const workObjects: any = {};\n\n currentConfiguration.actors.all().forEach((entry) => {\n actors[entry.key] = entry.value;\n });\n currentConfiguration.workObjects.all().forEach((entry) => {\n workObjects[entry.key] = entry.value;\n });\n\n return {\n name: currentConfiguration.name,\n actors: actors,\n workObjects: workObjects,\n };\n }\n return;\n }\n\n getCurrentConfigurationNamesWithoutPrefix(): CustomDomainConfiguration {\n return {\n name: this.titleService.getDomainName() || INITIAL_DOMAIN_NAME,\n actors: this.iconDictionaryService\n .getActorsDictionary()\n .keysArray()\n .map((a) => a.replace(elementTypes.ACTOR, '')),\n workObjects: this.iconDictionaryService\n .getWorkObjectsDictionary()\n .keysArray()\n .map((w) => w.replace(elementTypes.WORKOBJECT, '')),\n };\n }\n\n createMinimalConfigurationWithDefaultIcons(): DomainConfiguration {\n const minimalConfig = this.createConfigFromCanvas();\n\n defaultConf.actors.forEach((iconName) => {\n minimalConfig.actors.add(\n this.iconDictionaryService.getIconSource(iconName),\n iconName\n );\n });\n defaultConf.workObjects.forEach((iconName) => {\n minimalConfig.workObjects.add(\n this.iconDictionaryService.getIconSource(iconName),\n iconName\n );\n });\n\n return minimalConfig;\n }\n\n private createConfigFromDictionaries(\n actorsDict: Dictionary,\n workObjectsDict: Dictionary\n ): DomainConfiguration {\n const actorNames = actorsDict.keysArray();\n const workobjectNames = workObjectsDict.keysArray();\n const newActors = new Dictionary();\n const newWorkobjects = new Dictionary();\n\n // Fill Configuration from Canvas-Objects\n actorNames.forEach((actor) => {\n newActors.add(\n actorsDict.get(actor),\n actor.replace(elementTypes.ACTOR, '')\n );\n });\n workobjectNames.forEach((workObject) => {\n newWorkobjects.add(\n workObjectsDict.get(workObject),\n workObject.replace(elementTypes.WORKOBJECT, '')\n );\n });\n\n return {\n name: this.titleService.getDomainName(),\n actors: newActors,\n workObjects: newWorkobjects,\n };\n }\n\n private createConfigFromCanvas(): DomainConfiguration {\n const config = {\n name: INITIAL_DOMAIN_NAME,\n actors: new Dictionary(),\n workObjects: new Dictionary(),\n };\n\n let allCanvasObjects = this.elementRegistryService.getAllCanvasObjects();\n\n allCanvasObjects\n .map((e) => e.businessObject)\n .forEach((element) => {\n const type = element.type\n .replace(elementTypes.ACTOR, '')\n .replace(elementTypes.WORKOBJECT, '');\n if (element.type.includes(elementTypes.ACTOR)) {\n let src = this.iconDictionaryService.getIconSource(type) || '';\n config.actors.add(src, type);\n } else if (element.type.includes(elementTypes.WORKOBJECT)) {\n let src = this.iconDictionaryService.getIconSource(type) || '';\n config.workObjects.add(src, type);\n }\n });\n\n return config;\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n CustomDomainConfiguration,\n DomainConfiguration,\n} from '../../Domain/Common/domainConfiguration';\nimport { BehaviorSubject } from 'rxjs';\nimport { DomainConfigurationService } from './domain-configuration.service';\nimport { IconDictionaryService } from './icon-dictionary.service';\nimport { getNameFromType } from '../../Utils/naming';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { IconListItem } from '../../Domain/Domain-Configuration/iconListItem';\nimport { Dictionary } from '../../Domain/Common/dictionary/dictionary';\nimport { ImportDomainStoryService } from '../Import/import-domain-story.service';\nimport { TitleService } from '../Title/title.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n SNACKBAR_SUCCESS,\n} from '../../Domain/Common/constants';\nimport { StorageService } from '../BrowserStorage/storage.service';\nimport { UsedIconList } from 'src/app/Domain/Domain-Configuration/UsedIconList';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DomainCustomizationService {\n private readonly domainConfigurationTypes: BehaviorSubject;\n\n private allIconListItems = new Dictionary();\n\n private configurationHasChanged = false;\n\n selectedActors$ = new BehaviorSubject([]);\n selectedWorkobjects$ = new BehaviorSubject([]);\n private changedDomainCofiguration: DomainConfiguration | undefined;\n\n constructor(\n private configurationService: DomainConfigurationService,\n private iconDictionaryService: IconDictionaryService,\n private importService: ImportDomainStoryService,\n private titleService: TitleService,\n private storageService: StorageService,\n private elementRegistryService: ElementRegistryService,\n private snackbar: MatSnackBar\n ) {\n this.domainConfigurationTypes = new BehaviorSubject(\n this.configurationService.getCurrentConfigurationNamesWithoutPrefix()\n );\n\n this.selectedWorkobjects$.next(\n this.domainConfigurationTypes.value.workObjects\n );\n this.selectedActors$.next(this.domainConfigurationTypes.value.actors);\n\n iconDictionaryService\n .getAllIconDictionary()\n .keysArray()\n .forEach((iconName) => {\n this.addIconToAllIconList(iconName);\n });\n\n importService.importedConfigurationEvent.subscribe((config) => {\n this.importConfiguration(config);\n });\n const storedDomainConfiguration =\n this.storageService.getStoredDomainConfiguration();\n if (storedDomainConfiguration) {\n this.importConfiguration(storedDomainConfiguration, false);\n }\n const importedConfiguration = this.importService.getImportedConfiguration();\n if (importedConfiguration) {\n this.importConfiguration(importedConfiguration, false);\n }\n }\n\n importConfiguration(\n customConfig: DomainConfiguration,\n saveDomain = true\n ): void {\n const actorKeys = customConfig.actors.keysArray();\n const workObjectKeys = customConfig.workObjects.keysArray();\n\n this.changeName(customConfig.name);\n actorKeys.forEach((iconName) => {\n if (!this.allIconListItems.has(iconName)) {\n this.addIconToAllIconList(iconName);\n }\n const selectedActorNames = this.selectedActors$.value;\n if (!selectedActorNames.includes(iconName)) {\n this.selectActor(iconName);\n }\n });\n workObjectKeys.forEach((iconName) => {\n if (!this.allIconListItems.has(iconName)) {\n this.addIconToAllIconList(iconName);\n }\n const selectedWorkobjectNames = this.selectedWorkobjects$.value;\n if (!selectedWorkobjectNames.includes(iconName)) {\n this.selectWorkObject(iconName);\n }\n });\n if (saveDomain) {\n this.saveDomain(this.elementRegistryService.getUsedIcons(), true);\n }\n }\n\n /** Getter & Setter **/\n getDomainConfiguration(): BehaviorSubject {\n return this.domainConfigurationTypes;\n }\n\n getIconForName(iconName: string): BehaviorSubject {\n return this.allIconListItems.get(iconName);\n }\n\n isIconActor(iconName: string): boolean {\n return (\n this.domainConfigurationTypes.value.actors.filter(\n (actor: string) => actor === iconName\n ).length > 0\n );\n }\n\n isIconWorkObject(iconName: string): boolean {\n return (\n this.domainConfigurationTypes.value.workObjects.filter(\n (workObject: string) => workObject === iconName\n ).length > 0\n );\n }\n\n changeName(domainName: string): void {\n this.titleService.setDomainName(domainName);\n const changedDomain = this.domainConfigurationTypes.value;\n changedDomain.name = domainName;\n this.domainConfigurationTypes.next(changedDomain);\n }\n\n /** Seleted Icons **/\n setAsUnassigned(iconName: string, isActor: boolean): void {\n if (isActor) {\n this.deselectActor(iconName);\n } else {\n this.deselectWorkobject(iconName);\n }\n this.updateIcon(false, false, iconName);\n }\n\n setAsActor(isActor: boolean, actor: string): void {\n if (isActor) {\n this.updateIcon(true, false, actor);\n this.selectActor(actor);\n this.deselectWorkobject(actor);\n\n const icon = this.iconDictionaryService.getFullDictionary().get(actor);\n this.iconDictionaryService.getActorsDictionary().add(icon, actor);\n } else {\n this.deselectActor(actor);\n this.updateIcon(false, false, actor);\n this.iconDictionaryService.getActorsDictionary().delete(actor);\n }\n }\n\n setAsWorkobject(isWorkobject: boolean, workobject: string): void {\n if (isWorkobject) {\n this.updateIcon(false, true, workobject);\n this.selectWorkObject(workobject);\n this.deselectActor(workobject);\n\n const icon = this.iconDictionaryService\n .getFullDictionary()\n .get(workobject);\n this.iconDictionaryService\n .getWorkObjectsDictionary()\n .add(icon, workobject);\n } else {\n this.deselectWorkobject(workobject);\n this.updateIcon(false, false, workobject);\n this.iconDictionaryService.getWorkObjectsDictionary().delete(workobject);\n }\n }\n\n selectActor(actor: string): void {\n const value = this.domainConfigurationTypes.value;\n if (!value.actors.includes(actor)) {\n value.actors.push(actor);\n this.domainConfigurationTypes.next(value);\n this.updateActorSubject();\n }\n }\n\n selectWorkObject(workObject: string): void {\n const value = this.domainConfigurationTypes.value;\n if (!value.workObjects.includes(workObject)) {\n value.workObjects.push(workObject);\n this.domainConfigurationTypes.next(value);\n this.updateWorkObjectSubject();\n }\n }\n\n deselectActor(actor: string): void {\n if (this.domainConfigurationTypes) {\n this.domainConfigurationTypes.next({\n name: this.domainConfigurationTypes.value.name,\n actors: this.domainConfigurationTypes.value.actors.filter(\n (a: string) => !a.includes(actor)\n ),\n workObjects: this.domainConfigurationTypes.value.workObjects,\n });\n }\n this.updateActorSubject();\n }\n\n deselectWorkobject(workobject: string): void {\n if (this.domainConfigurationTypes) {\n this.domainConfigurationTypes.next({\n name: this.domainConfigurationTypes.value.name,\n actors: this.domainConfigurationTypes.value.actors,\n workObjects: this.domainConfigurationTypes.value.workObjects.filter(\n (w: string) => !w.includes(workobject)\n ),\n });\n }\n this.updateWorkObjectSubject();\n }\n\n setSelectedWorkObject(sortedList: string[]): void {\n const value = this.domainConfigurationTypes.value;\n value.workObjects = sortedList;\n this.domainConfigurationTypes.next(value);\n this.updateWorkObjectSubject();\n }\n\n setSelectedActors(sortedList: string[]): void {\n const value = this.domainConfigurationTypes.value;\n value.actors = sortedList;\n this.domainConfigurationTypes.next(value);\n this.updateActorSubject();\n }\n\n private updateActorSubject(): void {\n this.selectedActors$.next(this.domainConfigurationTypes.value.actors);\n this.configurationHasChanged = true;\n }\n\n private updateWorkObjectSubject(): void {\n this.selectedWorkobjects$.next(\n this.domainConfigurationTypes.value.workObjects\n );\n this.configurationHasChanged = true;\n }\n\n /** Revert Domain **/\n resetDomain(): void {\n const defaultConfig =\n this.configurationService.createMinimalConfigurationWithDefaultIcons();\n\n this.selectedWorkobjects$.value.forEach((workObjectName) => {\n if (!defaultConfig.workObjects.has(workObjectName)) {\n this.deselectWorkobject(workObjectName);\n }\n });\n this.selectedActors$.value.forEach((actorName) => {\n if (!defaultConfig.actors.has(actorName)) {\n this.deselectActor(actorName);\n }\n });\n\n this.domainConfigurationTypes.next({\n name: defaultConfig.name,\n actors: defaultConfig.actors.keysArray(),\n workObjects: defaultConfig.workObjects.keysArray(),\n } as CustomDomainConfiguration);\n\n this.updateAllIconBehaviourSubjects();\n }\n\n cancel(): void {\n this.domainConfigurationTypes.next(\n this.configurationService.getCurrentConfigurationNamesWithoutPrefix()\n );\n this.updateAllIconBehaviourSubjects();\n this.resetToInitialConfiguration();\n }\n\n private resetToInitialConfiguration(): void {\n this.updateActorSubject();\n this.updateWorkObjectSubject();\n }\n\n /** Persist Domain **/\n saveDomain(usedIcons: UsedIconList, imported = false): void {\n const changedActors: string[] = [];\n const changedWorkobjects: string[] = [];\n if (this.configurationHasChanged) {\n const changedDomain = this.createDomainConfiguration();\n\n const configurationActors = changedDomain.actors.keysArray();\n usedIcons?.actors.forEach((actor) => {\n if (\n !configurationActors?.includes(actor) &&\n !changedActors.includes(actor)\n ) {\n changedActors.push(actor);\n }\n });\n const configurationWorkobjects = changedDomain.workObjects.keysArray();\n usedIcons?.workobjects.forEach((workobject) => {\n if (\n !configurationWorkobjects?.includes(workobject) &&\n !changedWorkobjects.includes(workobject)\n ) {\n changedWorkobjects.push(workobject);\n }\n });\n\n if (!changedActors.length && !changedWorkobjects.length) {\n this.changedDomainCofiguration = changedDomain;\n\n this.updateIcons(changedDomain);\n\n this.storageService.setStoredDomainConfiguration(\n this.changedDomainCofiguration\n );\n this.snackbar.open(\n imported\n ? 'Configuration imported successfully'\n : 'Configuration saved sucessfully',\n undefined,\n {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n }\n );\n }\n } else {\n this.snackbar.open(\n imported\n ? 'No configuration to be imported'\n : 'No configuration to be saved',\n undefined,\n {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_INFO,\n }\n );\n }\n if (changedActors.length || changedWorkobjects.length) {\n if (changedActors.length) {\n const actors = changedActors.join(', ');\n this.snackbar.open(\n `The following icons are already in use as actors and cannot be changed: ${actors}`,\n undefined,\n {\n duration: SNACKBAR_DURATION * 3,\n panelClass: SNACKBAR_INFO,\n }\n );\n }\n if (changedWorkobjects.length) {\n const workobjects = changedWorkobjects.join(', ');\n this.snackbar.open(\n `The following icons are already in use as workobjects and cannot be changed: ${workobjects}`,\n undefined,\n {\n duration: SNACKBAR_DURATION * 3,\n panelClass: SNACKBAR_INFO,\n }\n );\n }\n }\n }\n\n exportDomain(): void {\n this.configurationService.exportConfiguration();\n }\n\n getAndClearSavedConfiguration(): DomainConfiguration | undefined {\n const temp = this.changedDomainCofiguration;\n this.changedDomainCofiguration = undefined;\n\n return temp;\n }\n\n private createDomainConfiguration(): DomainConfiguration {\n const actors = new Dictionary();\n const workObjects = new Dictionary();\n\n this.domainConfigurationTypes.value.actors.forEach((type: string) => {\n actors.add(this.iconDictionaryService.getIconSource(type), type);\n });\n this.domainConfigurationTypes.value.workObjects.forEach((type: string) => {\n workObjects.add(this.iconDictionaryService.getIconSource(type), type);\n });\n\n return {\n name: this.domainConfigurationTypes.value.name || '',\n actors,\n workObjects,\n };\n }\n\n /** Update Icons **/\n addNewIcon(iconName: string): void {\n const iconDict = new Dictionary();\n iconDict.add(this.getSrcForIcon(iconName), iconName);\n this.iconDictionaryService.addIconsToCss(iconDict);\n this.addIconToAllIconList(iconName);\n }\n\n private addIconToAllIconList(iconName: string): void {\n this.allIconListItems.add(\n new BehaviorSubject({\n name: iconName,\n svg: this.getSrcForIcon(iconName),\n isActor: this.isIconActor(iconName),\n isWorkObject: this.isIconWorkObject(iconName),\n }),\n iconName\n );\n }\n\n private updateIcon(\n isActor: boolean,\n isWorkobject: boolean,\n iconName: string\n ) {\n const iconBehaviourSubject = this.getIconForName(iconName);\n const icon = iconBehaviourSubject.value;\n icon.isActor = isActor;\n icon.isWorkObject = isWorkobject;\n\n iconBehaviourSubject.next(icon);\n }\n\n private updateAllIconBehaviourSubjects(): void {\n const customDomainCofiguration = this.domainConfigurationTypes.value;\n this.allIconListItems.keysArray().forEach((iconName) => {\n if (customDomainCofiguration.actors.includes(iconName)) {\n this.updateIcon(true, false, iconName);\n } else if (customDomainCofiguration.workObjects.includes(iconName)) {\n this.updateIcon(false, true, iconName);\n } else {\n this.updateIcon(false, false, iconName);\n }\n });\n }\n\n private getSrcForIcon(name: string): string {\n let iconName: string;\n if (name.includes(elementTypes.DOMAINSTORY)) {\n iconName = getNameFromType(name);\n } else {\n iconName = name;\n }\n const rawSrc = this.iconDictionaryService.getIconSource(iconName);\n\n if (!rawSrc) {\n return '';\n }\n\n if (rawSrc.startsWith('data')) {\n return rawSrc;\n } else {\n return 'data:image/svg+xml,' + rawSrc;\n }\n }\n\n private updateIcons(changedDomain: DomainConfiguration) {\n this.allIconListItems\n .keysArray()\n .forEach((item) => this.setAsUnassigned(item, this.isIconActor(item)));\n changedDomain.actors\n .keysArray()\n .forEach((actor) => this.setAsActor(true, actor));\n changedDomain.workObjects\n .keysArray()\n .forEach((workObject) => this.setAsWorkobject(true, workObject));\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { getNameFromType } from 'src/app/Utils/naming';\nimport {\n allIcons,\n appendedIcons,\n} from 'src/app/Domain/Domain-Configuration/allIcons';\nimport {\n defaultConf,\n IconConfiguration,\n} from 'src/app/Domain/Common/iconConfiguration';\nimport { Configuration } from 'src/app/Domain/Common/configuration';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\nimport { sanitizeIconName } from '../../Utils/sanitizer';\n\nexport const ICON_PREFIX = 'icon-domain-story-';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconDictionaryService {\n private actorIconDictionary = new Dictionary();\n private workObjectDictionary = new Dictionary();\n\n private allIconDictionary = new Dictionary();\n private iconDictionaryForBPMN = new Dictionary();\n\n private customConfiguration?: DomainConfiguration;\n\n private readonly iconConfig: IconConfiguration;\n\n constructor() {\n this.allIconDictionary.addEach(allIcons);\n this.iconConfig = new IconConfiguration(this.allIconDictionary);\n }\n\n initTypeDictionaries(actors: string[], workObjects: string[]): void {\n if (!actors || actors.length == 0) {\n actors = defaultConf.actors;\n }\n if (!workObjects || workObjects.length == 0) {\n workObjects = defaultConf.workObjects;\n }\n\n const allTypes = new Dictionary();\n allTypes.addEach(allIcons);\n allTypes.appendDict(this.getAppendedIconDictionary());\n\n this.initDictionary(\n actors,\n allTypes,\n this.actorIconDictionary,\n elementTypes.ACTOR\n );\n this.initDictionary(\n workObjects,\n allTypes,\n this.workObjectDictionary,\n elementTypes.WORKOBJECT\n );\n }\n\n private initDictionary(\n keys: string[],\n allTypes: Dictionary,\n dictionary: Dictionary,\n namePrefix: elementTypes\n ) {\n dictionary.clear();\n for (const key of keys) {\n const name = namePrefix + key;\n dictionary.add(allTypes.get(key), name);\n }\n\n dictionary.keysArray().forEach((entry) => {\n const name = getNameFromType(entry);\n this.registerIconForBPMN(\n entry,\n ICON_PREFIX + sanitizeIconName(name.toLowerCase())\n );\n });\n }\n\n getCurrentIconConfigurationForBPMN(): Configuration {\n if (this.customConfiguration) {\n return this.iconConfig.createCustomConf(this.customConfiguration);\n }\n return this.iconConfig.getDefaultConf();\n }\n\n allInTypeDictionary(type: elementTypes, elements: BusinessObject[]): boolean {\n let collection: Dictionary;\n if (type === elementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (type === elementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n\n let allIn = true;\n if (elements) {\n elements.forEach((element) => {\n if (!collection.has(element.type)) {\n allIn = false;\n }\n });\n } else {\n return false;\n }\n return allIn;\n }\n\n /** Load Icons from Configuration **/\n\n addIconsFromDomainConfiguration(\n dictionaryType: elementTypes,\n iconTypes: string[]\n ): void {\n let collection: Dictionary;\n if (dictionaryType === elementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (dictionaryType === elementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n\n const allTypes = new Dictionary();\n allTypes.addEach(allIcons);\n allTypes.appendDict(appendedIcons);\n\n iconTypes.forEach((type) => {\n if (!collection.has(type)) {\n const name = getNameFromType(type);\n const src = allTypes.get(name);\n if (src) {\n this.registerIconForType(dictionaryType, type, src);\n this.registerIconForBPMN(\n type,\n sanitizeIconName(ICON_PREFIX + name.toLowerCase())\n );\n }\n }\n });\n }\n\n /** Add Icon(s) to Dictionary **/\n registerIconForBPMN(name: string, src: string): void {\n this.iconDictionaryForBPMN.set(name, src);\n }\n\n addIconsToTypeDictionary(\n actorIcons: BusinessObject[],\n workObjectIcons: BusinessObject[]\n ) {\n if (!this.allInTypeDictionary(elementTypes.ACTOR, actorIcons)) {\n this.addIconsFromDomainConfiguration(\n elementTypes.ACTOR,\n actorIcons.map((element) => element.type)\n );\n }\n if (!this.allInTypeDictionary(elementTypes.WORKOBJECT, workObjectIcons)) {\n this.addIconsFromDomainConfiguration(\n elementTypes.WORKOBJECT,\n workObjectIcons.map((element) => element.type)\n );\n }\n }\n\n registerIconForType(type: elementTypes, name: string, src: string): void {\n if (!name.includes(type)) {\n name = type + name;\n }\n\n let collection = new Dictionary();\n if (type === elementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (type === elementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n collection.set(name, src);\n }\n\n updateIconRegistries(\n actors: BusinessObject[],\n workObjects: BusinessObject[],\n config: DomainConfiguration\n ): void {\n const elements: BusinessObject[] = [];\n\n actors.forEach((a) => elements.push(a));\n workObjects.forEach((w) => elements.push(w));\n\n const customIcons = new Dictionary();\n\n const actorsDict = new Dictionary();\n const workObjectsDict = new Dictionary();\n config.actors.keysArray().forEach((key) => {\n actorsDict.add(config.actors.get(key), key);\n });\n config.workObjects.keysArray().forEach((key) => {\n workObjectsDict.add(config.workObjects.get(key), key);\n });\n\n this.extractCustomIconsFromDictionary(actorsDict, customIcons);\n this.extractCustomIconsFromDictionary(workObjectsDict, customIcons);\n\n elements.forEach((element) => {\n const name = sanitizeIconName(\n element.type\n .replace(elementTypes.ACTOR, '')\n .replace(elementTypes.WORKOBJECT, '')\n );\n if (\n (element.type.includes(elementTypes.ACTOR) ||\n element.type.includes(elementTypes.WORKOBJECT)) &&\n !this.getFullDictionary().has(name)\n ) {\n this.registerIconForBPMN(\n ICON_PREFIX + name.toLowerCase(),\n element.type\n );\n }\n });\n\n this.addNewIconsToDictionary(customIcons);\n this.addIconsToTypeDictionary(actors, workObjects);\n }\n\n private extractCustomIconsFromDictionary(\n elementDictionary: Dictionary,\n customIcons: Dictionary\n ) {\n elementDictionary.keysArray().forEach((name) => {\n const sanitizedName = sanitizeIconName(name);\n if (!this.getFullDictionary().has(sanitizedName)) {\n customIcons.add(elementDictionary.get(name), sanitizedName);\n }\n });\n }\n\n /** Add new Icon(s) **/\n\n addNewIconsToDictionary(customIcons: Dictionary) {\n customIcons.keysArray().forEach((key) => {\n const custom = customIcons.get(key);\n this.addIMGToIconDictionary(custom.src, key);\n });\n this.addIconsToCss(customIcons);\n }\n\n addIMGToIconDictionary(input: string, name: string): void {\n appendedIcons.set(name, input);\n }\n\n addIconsToCss(customIcons: Dictionary) {\n const sheetEl = document.getElementById('iconsCss');\n customIcons.keysArray().forEach((key) => {\n const src = customIcons.get(key);\n const iconStyle =\n '.' +\n ICON_PREFIX +\n sanitizeIconName(key.toLowerCase()) +\n '::before{ content: url(\"data:image/svg+xml;utf8,' +\n this.wrapSRCInSVG(src) +\n '\"); margin: 3px;}';\n // @ts-ignore\n sheetEl?.sheet?.insertRule(iconStyle, sheetEl.sheet.cssRules.length);\n });\n }\n\n private wrapSRCInSVG(src: string): string {\n return (\n \"\"\n );\n }\n\n /** Getter & Setter **/\n\n getFullDictionary(): Dictionary {\n const fullDictionary = new Dictionary();\n fullDictionary.appendDict(this.allIconDictionary);\n fullDictionary.appendDict(this.getAppendedIconDictionary());\n return fullDictionary;\n }\n\n getAppendedIconDictionary(): Dictionary {\n const appendedDict = new Dictionary();\n appendedIcons.keysArray().forEach((key) => {\n if (!this.allIconDictionary.has(key)) {\n appendedDict.set(key, appendedIcons.get(key));\n }\n });\n return appendedDict;\n }\n\n getTypeDictionary(type: elementTypes): Dictionary {\n if (type === elementTypes.ACTOR) {\n return this.actorIconDictionary;\n } else if (type === elementTypes.WORKOBJECT) {\n return this.workObjectDictionary;\n }\n return new Dictionary();\n }\n\n getTypeDictionaryKeys(type: elementTypes): string[] {\n return this.getTypeDictionary(type).keysArray();\n }\n\n getTypeIconSRC(type: elementTypes, name: string): string | null {\n if (type === elementTypes.ACTOR) {\n if (!name.startsWith(elementTypes.ACTOR)) {\n name = elementTypes.ACTOR + name;\n }\n return this.actorIconDictionary.get(name);\n } else if (type === elementTypes.WORKOBJECT) {\n if (!name.startsWith(elementTypes.WORKOBJECT)) {\n name = elementTypes.WORKOBJECT + name;\n }\n return this.workObjectDictionary.get(name);\n }\n return null;\n }\n\n getIconForBPMN(type: elementTypes): string | null {\n return this.iconDictionaryForBPMN.get(type);\n }\n\n getIconSource(name: string): string | null {\n if (this.allIconDictionary.has(name)) {\n return this.allIconDictionary.get(name);\n } else if (appendedIcons.has(name)) {\n return appendedIcons.get(name);\n }\n return null;\n }\n\n getElementsOfType(\n elements: BusinessObject[],\n type: elementTypes\n ): BusinessObject[] {\n const elementOfType: any = [];\n elements.forEach((element) => {\n if (element.type.includes(type)) {\n elementOfType.push(element);\n }\n });\n return elementOfType;\n }\n\n getAllIconDictionary(): Dictionary {\n return this.allIconDictionary;\n }\n\n getActorsDictionary(): Dictionary {\n return this.actorIconDictionary;\n }\n\n getWorkObjectsDictionary(): Dictionary {\n return this.workObjectDictionary;\n }\n\n getIconConfiguration(): IconConfiguration {\n return this.iconConfig;\n }\n\n setCusomtConfiguration(customConfiguration: DomainConfiguration): void {\n this.customConfiguration = customConfiguration;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { CanvasObject } from 'src/app/Domain/Common/canvasObject';\nimport { GroupCanvasObject } from '../../Domain/Common/groupCanvasObject';\nimport { ActivityCanvasObject } from '../../Domain/Common/activityCanvasObject';\nimport { UsedIconList } from 'src/app/Domain/Domain-Configuration/UsedIconList';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ElementRegistryService {\n private registry: any;\n private fullyInitialized = false;\n\n /**\n * Initially the registry has only the root-Element.\n * Once the canvas has bees initialized, we adjust the reference to point to the elements on the canvas for convenience\n */\n correctInitialize(): void {\n if (!this.fullyInitialized) {\n if (this.registry.__implicitroot) {\n this.registry = this.registry.__implicitroot.element.children;\n this.fullyInitialized = true;\n }\n }\n }\n\n setElementRegistry(registry: any): void {\n this.registry = registry._elements;\n }\n\n clear(): void {\n this.registry = null;\n this.fullyInitialized = false;\n }\n\n createObjectListForDSTDownload(): CanvasObject[] {\n if (this.registry) {\n const allObjectsFromCanvas = this.getAllCanvasObjects();\n const groups = this.getAllGroups();\n\n const objectList: CanvasObject[] = [];\n\n this.fillListOfCanvasObjects(allObjectsFromCanvas, objectList, groups);\n\n return objectList;\n }\n return [];\n }\n\n private fillListOfCanvasObjects(\n allObjectsFromCanvas: CanvasObject[],\n objectList: CanvasObject[],\n groups: GroupCanvasObject[]\n ): void {\n allObjectsFromCanvas.forEach((canvasElement) => {\n if (canvasElement.type === elementTypes.ACTIVITY) {\n objectList.push(canvasElement);\n }\n\n // ensure that Activities are always after Actors, Workobjects and Groups in .dst files\n else {\n if (canvasElement.type === elementTypes.TEXTANNOTATION) {\n canvasElement.businessObject.width = canvasElement.width;\n canvasElement.businessObject.height = canvasElement.height;\n }\n if (!objectList.includes(canvasElement)) {\n objectList.unshift(canvasElement);\n }\n }\n });\n\n groups.forEach((group) => {\n objectList.push(group);\n });\n }\n\n getAllActivities(): ActivityCanvasObject[] {\n const activities: ActivityCanvasObject[] = [];\n\n this.getAllCanvasObjects().forEach((element) => {\n if (element.type.includes(elementTypes.ACTIVITY)) {\n activities.push(element as ActivityCanvasObject);\n }\n });\n return activities;\n }\n\n getAllConnections(): ActivityCanvasObject[] {\n const connections: ActivityCanvasObject[] = [];\n this.getAllCanvasObjects().forEach((element) => {\n const type = element.type;\n if (type === elementTypes.CONNECTION) {\n connections.push(element as ActivityCanvasObject);\n }\n });\n return connections;\n }\n\n getAllCanvasObjects(): CanvasObject[] {\n const allObjects: CanvasObject[] = [];\n const groupObjects: GroupCanvasObject[] = [];\n\n this.checkChildForGroup(groupObjects, allObjects);\n\n // for each memorized group, remove it from the group-array and check its children, whether they are groups or not\n // if a child is a group, memorize it in the group-array\n // other children should already be in the allObjects list\n let i = groupObjects.length - 1;\n while (groupObjects.length >= 1) {\n const currentGroup = groupObjects.pop();\n // @ts-ignore\n currentGroup.children.forEach((child: CanvasObject) => {\n const type = child.type;\n if (type.includes(elementTypes.GROUP)) {\n groupObjects.push(child as GroupCanvasObject);\n }\n });\n i = groupObjects.length - 1;\n }\n return allObjects;\n }\n\n // returns all groups on the canvas and inside other groups\n getAllGroups(): GroupCanvasObject[] {\n const groupObjects: GroupCanvasObject[] = [];\n const allObjects: CanvasObject[] = [];\n\n this.checkChildForGroup(groupObjects, allObjects);\n\n for (const group of groupObjects) {\n group.children?.forEach((child: CanvasObject) => {\n if (child.type.includes(elementTypes.GROUP)) {\n groupObjects.push(child as GroupCanvasObject);\n }\n });\n }\n return groupObjects;\n }\n\n private checkChildForGroup(\n groupObjects: GroupCanvasObject[],\n allObjects: CanvasObject[]\n ): void {\n const registryElementNames = Object.keys(this.registry);\n for (let name of registryElementNames) {\n const entry = this.registry[name].element;\n if (entry.businessObject) {\n const type = entry.type;\n if (type && type.includes(elementTypes.GROUP)) {\n // if it is a group, memorize this for later\n groupObjects.push(entry);\n } else if (type) {\n allObjects.push(entry);\n }\n }\n }\n }\n\n // get a list of activities, that originate from an actor-type\n getActivitiesFromActors(): ActivityCanvasObject[] {\n const activitiesFromActors: ActivityCanvasObject[] = [];\n const activities = this.getAllActivities();\n\n activities.forEach((activity: ActivityCanvasObject) => {\n if (activity.source?.type.includes(elementTypes.ACTOR)) {\n activitiesFromActors.push(activity);\n }\n });\n return activitiesFromActors;\n }\n\n getUsedIcons(): UsedIconList {\n const actors = this.getAllActors();\n const workobjects = this.getAllWorkobjects();\n\n return {\n actors: actors.map((a) => a.type.replace(elementTypes.ACTOR, '')),\n workobjects: workobjects.map((w) =>\n w.type.replace(elementTypes.WORKOBJECT, '')\n ),\n };\n }\n\n private getAllActors() {\n return this.getAllCanvasObjects().filter((co) =>\n co.type.includes(elementTypes.ACTOR)\n );\n }\n\n getAllWorkobjects() {\n return this.getAllCanvasObjects().filter((co) =>\n co.type.includes(elementTypes.WORKOBJECT)\n );\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { DomainConfigurationService } from 'src/app/Service/DomainConfiguration/domain-configuration.service';\nimport { sanitizeForDesktop } from 'src/app/Utils/sanitizer';\nimport { TitleService } from 'src/app/Service/Title/title.service';\nimport { ConfigAndDST } from 'src/app/Domain/Export/configAndDst';\nimport { DirtyFlagService } from 'src/app/Service/DirtyFlag/dirty-flag.service';\nimport { PngService } from 'src/app/Service/Export/png.service';\nimport { SvgService } from 'src/app/Service/Export/svg.service';\nimport { Subscription } from 'rxjs';\nimport { RendererService } from '../Renderer/renderer.service';\nimport { HtmlPresentationService } from './html-presentation.service';\nimport { formatDate } from '@angular/common';\nimport { environment } from '../../../environments/environment';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ExportService implements OnDestroy {\n titleSubscription: Subscription;\n descriptionSubscription: Subscription;\n\n title = '';\n description = '';\n\n constructor(\n private configurationService: DomainConfigurationService,\n private titleService: TitleService,\n private dirtyFlagService: DirtyFlagService,\n private pngService: PngService,\n private svgService: SvgService,\n private htmlPresentationService: HtmlPresentationService,\n private rendererService: RendererService\n ) {\n this.titleSubscription = this.titleService.title$.subscribe(\n (title: string) => {\n this.title = title;\n }\n );\n this.descriptionSubscription = this.titleService.description$.subscribe(\n (description: string) => {\n this.description = description;\n }\n );\n }\n\n ngOnDestroy(): void {\n this.titleSubscription.unsubscribe();\n this.descriptionSubscription.unsubscribe();\n }\n\n isDomainStoryExportable(): boolean {\n return this.rendererService.getStory().length >= 1;\n }\n\n createConfigAndDST(DomainStory: any): ConfigAndDST {\n return new ConfigAndDST(\n this.configurationService.getCurrentConfigurationForExport(),\n DomainStory\n );\n }\n\n downloadDST(): void {\n const dst = this.getStoryForDownload();\n const configAndDST = this.createConfigAndDST(dst);\n const json = JSON.stringify(configAndDST, null, 2);\n\n const filename = sanitizeForDesktop(\n this.title + '_' + this.getCurrentDateString()\n );\n\n this.downloadFile(\n json,\n 'data:text/plain;charset=utf-8,',\n filename,\n '.egn',\n true\n );\n }\n\n private downloadFile(\n data: string,\n datatype: string,\n filename: string,\n fileEnding: string,\n makeClean: boolean\n ) {\n const element = document.createElement('a');\n element.setAttribute('href', datatype + encodeURIComponent(data));\n element.setAttribute('download', filename + fileEnding);\n\n element.style.display = 'none';\n document.body.appendChild(element);\n\n element.click();\n\n if (makeClean) {\n this.dirtyFlagService.makeClean();\n }\n\n document.body.removeChild(element);\n }\n\n downloadSVG(withTitle: boolean, useWhiteBackground: boolean): void {\n const story = this.getStoryForDownload();\n const dst = this.createConfigAndDST(story);\n\n const svgData = this.svgService.createSVGData(\n this.title,\n this.description,\n dst,\n withTitle,\n useWhiteBackground\n );\n\n this.downloadFile(\n svgData,\n 'data:application/bpmn20-xml;charset=UTF-8,',\n sanitizeForDesktop(this.title + '_' + this.getCurrentDateString()),\n '.egn.svg',\n true\n );\n }\n\n downloadPNG(withTitle: boolean): void {\n const canvas = document.getElementById('canvas');\n if (canvas) {\n const container = canvas.getElementsByClassName('djs-container');\n const svgElements = container[0].getElementsByTagName('svg');\n const outerSVGElement = svgElements[0];\n const viewport = outerSVGElement.getElementsByClassName('viewport')[0];\n const layerBase = viewport.getElementsByClassName('layer-base')[0];\n\n const image = document.createElement('img');\n\n // removes unwanted black dots in image\n let svg = this.pngService.extractSVG(viewport, outerSVGElement);\n\n svg = this.pngService.prepareSVG(\n svg,\n layerBase,\n this.description,\n this.title,\n withTitle\n );\n\n image.onload = () => {\n const tempCanvas = document.createElement('canvas');\n\n // add a 10px buffer to the right and lower boundary\n tempCanvas.width = this.pngService.getWidth() + 10;\n tempCanvas.height = this.pngService.getHeight() + 10;\n\n const ctx = tempCanvas.getContext('2d');\n if (ctx) {\n // fill with white background\n ctx.rect(0, 0, tempCanvas.width, tempCanvas.height);\n ctx.fillStyle = 'white';\n ctx.fill();\n\n ctx.drawImage(image, 0, 0);\n }\n\n const png64 = tempCanvas.toDataURL('image/png');\n const ele = document.createElement('a');\n ele.setAttribute(\n 'download',\n sanitizeForDesktop(this.title) +\n '_' +\n this.getCurrentDateString() +\n '.png'\n );\n ele.setAttribute('href', png64);\n document.body.appendChild(ele);\n ele.click();\n document.body.removeChild(ele);\n\n // image source has to be removed to circumvent browser caching\n image.src = '';\n };\n image.onchange = image.onload;\n\n image.width = this.pngService.getWidth();\n image.height = this.pngService.getHeight();\n\n image.src = 'data:image/svg+xml,' + svg;\n }\n }\n\n downloadHTMLPresentation(): void {\n const filename = sanitizeForDesktop(\n this.title + '_' + this.getCurrentDateString()\n );\n this.htmlPresentationService.downloadHTMLPresentation(filename).then();\n }\n\n private getStoryForDownload(): unknown[] {\n const story = this.rendererService.getStory() as unknown[];\n story.push({ info: this.titleService.getDescription() });\n story.push({ version: environment.version });\n return story;\n }\n\n private getCurrentDateString(): string {\n return formatDate(new Date(), 'YYYY-MM-dd', 'en-GB');\n }\n}\n","import { Injectable } from '@angular/core';\nimport { sanitizeForDesktop } from '../../Utils/sanitizer';\nimport { ReplayService } from '../Replay/replay.service';\n// @ts-ignore\nimport doT from 'dot';\nimport { TitleService } from '../Title/title.service';\n\n@Injectable({\n providedIn: 'root',\n})\n/**\n * Initial idea and PR from https://github.com/indika-dev\n */\nexport class HtmlPresentationService {\n constructor(\n private replayService: ReplayService,\n private titleService: TitleService\n ) {}\n\n private multiplexSecret: any;\n private multiplexId: any;\n\n private modeler: any;\n\n setModelerClasses(canvas: any, selection: any, modeler: any): void {\n this.modeler = modeler;\n }\n\n private static viewBoxCoordinates(svg: any): any {\n const ViewBoxCoordinate =\n /width=\"([^\"]+)\"\\s+height=\"([^\"]+)\"\\s+viewBox=\"([^\"]+)\"/;\n const match = svg.match(ViewBoxCoordinate);\n return match[3];\n }\n\n /*\n ---------------------------\n SVG handling starts here\n ----------------------------\n */\n\n async downloadHTMLPresentation(filename: string): Promise {\n const svgData = [];\n // export all sentences of domain story\n this.replayService.startReplay();\n try {\n const result = await this.modeler.saveSVG({});\n this.fixActivityMarkersForEachStep(\n result,\n this.replayService.getCurrentStepNumber()\n );\n svgData.push({\n content: HtmlPresentationService.createSVGData(result.svg),\n transition: 'slide',\n });\n } catch (err) {\n alert('There was an error exporting the SVG.\\n' + err);\n }\n while (\n this.replayService.getCurrentStepNumber() <\n this.replayService.getMaxStepNumber()\n ) {\n this.replayService.nextStep();\n try {\n const result = await this.modeler.saveSVG({});\n this.fixActivityMarkersForEachStep(\n result,\n this.replayService.getCurrentStepNumber()\n );\n svgData.push({\n content: HtmlPresentationService.createSVGData(result.svg),\n transition: 'slide',\n });\n } catch (err) {\n alert('There was an error exporting the SVG.\\n' + err);\n }\n }\n this.replayService.stopReplay();\n\n // create download for presentation\n const revealjsTemplate = document.getElementById('revealjs-template');\n const dots = doT.template(revealjsTemplate?.innerHTML);\n const revealjsData = {\n script: 'script',\n title: this.titleService.getTitle(),\n description: this.titleService.getDescription(),\n sentences: svgData,\n multiplexSecret: this.multiplexSecret,\n multiplexId: this.multiplexId,\n };\n const element = document.createElement('a');\n element.setAttribute(\n 'href',\n 'data:text/html;charset=UTF-8,' +\n this.fixMalformedHtmlScript(dots, revealjsData)\n );\n element.setAttribute('download', sanitizeForDesktop(filename) + '.html');\n element.style.display = 'none';\n document.body.appendChild(element);\n element.click();\n document.body.removeChild(element);\n }\n\n private fixMalformedHtmlScript(\n dots: any,\n revealjsData: {\n multiplexId: any;\n sentences: any[];\n multiplexSecret: any;\n description: string;\n title: string;\n script: string;\n }\n ) {\n return dots(revealjsData).replace(''),\n result.svg.indexOf('') + 7\n );\n const split = defs.split(' {\n const idToReplace = id.substring(4, id.length - 1);\n const newId =\n idToReplace.slice(0, id.length - 5) +\n 'customId' +\n sectionIndex +\n idToReplace.slice(idToReplace.length - 2);\n // @ts-ignore\n result.svg = result.svg.replaceAll(idToReplace, newId);\n });\n newDefs += '= 72) {\n fix = true;\n // https://www.chromestatus.com/features/5656049583390720\n }\n } else if (name.includes('Firefox')) {\n fix = true;\n\n // versionNumber of implementation unknown\n }\n if (fix) {\n while (svg.includes('#')) {\n svg = svg.replace('#', '%23');\n }\n }\n return svg;\n }\n\n findMostOuterElements(svg: HTMLElement): Box {\n let xLeft = 0;\n let xRight = 0;\n let yUp = 0;\n let yDown = 0;\n\n const elements = svg.getElementsByClassName('djs-group');\n\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n const sub = element.children;\n\n let elXLeft: number;\n let elXRight: number;\n let elYUp: number;\n let elYDown: number;\n\n const transform = sub[0].getAttribute('transform');\n if (transform) {\n let nums;\n\n if (transform.includes('matrix')) {\n transform.replace('matrix(', '');\n transform.replace(')', '');\n nums = transform.split(' ');\n elXLeft = parseInt(nums[4]);\n elYUp = parseInt(nums[5]);\n } else {\n transform.replace('translate(', '');\n transform.replace(')', '');\n nums = transform.split(' ');\n elXLeft = parseInt(nums[0]);\n elYUp = parseInt(nums[1]);\n }\n\n const rects = sub[0].getElementsByTagName('rect');\n const outerRect = rects[rects.length - 1];\n\n const width = outerRect.getAttribute('width');\n\n elXRight = elXLeft + parseInt(width != null ? width : '0');\n elYDown = elYUp + sub[0].getBoundingClientRect().height;\n } else {\n const rects = element.getElementsByTagName('rect');\n const outerRect = rects[rects.length - 1];\n\n const x = outerRect.getAttribute('x');\n const y = outerRect.getAttribute('y');\n\n elXLeft = parseInt(x != null ? x : '0');\n elYUp = parseInt(y != null ? y : '0');\n\n const width = outerRect.getAttribute('width');\n const height = outerRect.getAttribute('height');\n\n elXRight = elXLeft + parseInt(width != null ? width : '0');\n elYDown = elYUp + parseInt(height != null ? height : '0') + 20; // Add 20 px as Padding for text at the bottom\n }\n if (elXLeft < xLeft) {\n xLeft = elXLeft;\n }\n if (elXRight > xRight) {\n xRight = elXRight;\n }\n if (elYUp < yUp) {\n yUp = elYUp;\n }\n if (elYDown > yDown) {\n yDown = elYDown;\n }\n }\n\n yUp -= 75; // we need to adjust yUp to have space for the title and description\n\n return {\n xLeft,\n xRight,\n yUp,\n yDown,\n };\n }\n\n prepareSVG(\n svg: string,\n layerBase: any,\n description: string,\n title: string,\n withTitle: boolean\n ): string {\n const box = this.findMostOuterElements(layerBase);\n let viewBoxIndex = svg.indexOf('width=\"');\n\n this.calculateWidthAndHeight(box);\n\n const { insertText, extraHeight } = createTitleAndDescriptionSVGElement(\n title,\n description,\n box.xLeft,\n box.yUp + 20,\n this.width\n );\n if (withTitle) {\n this.height += extraHeight;\n }\n\n const bounds = this.createBounds(box, extraHeight);\n\n const dataStart = svg.substring(0, viewBoxIndex);\n viewBoxIndex = svg.indexOf('style=\"');\n\n const dataEnd = svg.substring(viewBoxIndex);\n dataEnd.substring(viewBoxIndex);\n\n svg = dataStart + bounds + dataEnd;\n\n const insertIndex = svg.indexOf('') + 20;\n\n if (withTitle) {\n svg = [\n svg.slice(0, insertIndex),\n insertText,\n svg.slice(insertIndex),\n ].join('');\n }\n svg = this.URIHashtagFix(svg);\n\n return svg;\n }\n\n private createBounds(box: Box, extraHeight: number) {\n return (\n 'width=\"' +\n this.width +\n '\" height=\"' +\n this.height +\n '\" viewBox=\" ' +\n box.xLeft +\n ' ' +\n (box.yUp - extraHeight) +\n ' ' +\n this.width +\n ' ' +\n this.height +\n '\" '\n );\n }\n\n /**\n * Calculate the Width and Height of the Bounding Box for the PNG so no Parts are cut off\n * TODO Longer Iconnames can still be cut of, when the Element is the lowest Object on the canvas, same for Activities\n */\n private calculateWidthAndHeight(box: Box): [number, number] {\n if (box.xLeft < 0) {\n if (box.xRight < 0) {\n this.width = Math.abs(box.xLeft - box.xRight);\n } else {\n this.width = Math.abs(box.xLeft) + box.xRight;\n }\n } else {\n this.width = box.xRight - box.xLeft;\n }\n\n if (box.yUp < 0) {\n if (box.yDown < 0) {\n this.height = Math.abs(box.yUp - box.yDown);\n } else {\n this.height = Math.abs(box.yUp) + box.yDown;\n }\n } else {\n this.height = box.yDown - box.yUp;\n }\n\n // if the domain-Story is smaller than 300px in width or height, increase its dimensions\n if (this.height < 300) {\n this.height += 300;\n box.yUp -= 150;\n box.yDown += 150;\n }\n if (this.width < 300) {\n this.width += 300;\n box.xLeft -= 150;\n box.xRight += 150;\n }\n return [this.height, this.width];\n }\n\n extractSVG(viewport: any, outerSVGElement: any): string {\n const layerResizers = viewport.getElementsByClassName('layer-resizers');\n const layerOverlays = viewport.getElementsByClassName('layer-overlays');\n const transform = viewport.getAttribute('transform');\n const translate = viewport.getAttribute('translate');\n\n if (layerResizers[0]) {\n layerResizers[0].parentNode.removeChild(layerResizers[0]);\n }\n if (layerOverlays[0]) {\n layerOverlays[0].parentNode.removeChild(layerOverlays[0]);\n }\n\n // remove canvas scrolling and scaling before serializeToString of SVG\n if (transform) {\n viewport.removeAttribute('transform');\n }\n if (translate) {\n viewport.removeAttribute('translate');\n }\n\n const svg = new XMLSerializer().serializeToString(outerSVGElement);\n\n // re-add canvas scrolling and scaling\n if (transform) {\n viewport.setAttribute('transform', transform);\n }\n if (translate) {\n viewport.setAttribute('translate', translate);\n }\n return svg;\n }\n\n getWidth(): number {\n return this.width;\n }\n\n getHeight(): number {\n return this.height;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ConfigAndDST } from 'src/app/Domain/Export/configAndDst';\nimport { createTitleAndDescriptionSVGElement } from 'src/app/Service/Export/exportUtil';\nimport { ModelerService } from '../Modeler/modeler.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SvgService {\n private cacheData = '';\n\n constructor(private modelerService: ModelerService) {}\n\n createSVGData(\n title: string,\n description: string,\n dst: ConfigAndDST,\n withTitle: boolean,\n useWhiteBackground: boolean\n ): string {\n this.cacheData = this.modelerService.getEncoded();\n\n let data = structuredClone(this.cacheData);\n\n let viewBoxIndex = data.indexOf('width=\"');\n\n let { width, height, viewBox } = this.viewBoxCoordinates(data);\n\n let xLeft: number;\n let xRight: number;\n let yUp: number;\n let yDown: number;\n const splitViewBox = viewBox.split(/\\s/);\n\n xLeft = +splitViewBox[0];\n yUp = +splitViewBox[1];\n xRight = +splitViewBox[2];\n yDown = +splitViewBox[3];\n\n if (xRight < 300) {\n xRight += 300;\n width += 300;\n }\n\n const { insertText, extraHeight } = createTitleAndDescriptionSVGElement(\n title,\n description,\n xLeft,\n yUp,\n width\n );\n if (withTitle) {\n // to display the title and description in the SVG-file, we need to add a container for the text-elements\n height += extraHeight + 80;\n }\n\n const bounds = this.createBounds(\n width,\n height,\n xLeft,\n yUp,\n xRight,\n yDown,\n withTitle\n );\n\n const dataStart = data.substring(0, viewBoxIndex);\n viewBoxIndex = data.indexOf('\" version');\n\n const dataEnd = data.substring(viewBoxIndex);\n dataEnd.substring(viewBoxIndex);\n\n data = dataStart + bounds + dataEnd;\n\n const insertIndex = this.findIndexToInsertData(data);\n\n if (withTitle) {\n data = data.slice(0, insertIndex) + insertText + data.slice(insertIndex);\n }\n\n if (useWhiteBackground) {\n const svgIndex = data.indexOf('width=\"');\n const backgroundColorWhite = 'style=\"background-color:white\" ';\n data =\n data.slice(0, svgIndex) + backgroundColorWhite + data.slice(svgIndex);\n }\n\n return this.appendDST(data, dst);\n }\n\n private findIndexToInsertData(data: string) {\n let insertIndex = data.indexOf('');\n if (insertIndex < 0) {\n insertIndex = data.indexOf('version=\"1.2\">') + 14;\n } else {\n insertIndex += 7;\n }\n return insertIndex;\n }\n\n private createBounds(\n width: number,\n height: number,\n xLeft: number,\n yUp: number,\n xRight: number,\n yDown: number,\n withTitle: boolean\n ): string {\n return (\n 'width=\"' +\n width +\n '\" height=\" ' +\n height +\n '\" viewBox=\"' +\n xLeft +\n ' ' +\n (withTitle ? yUp - 80 : yUp) +\n ' ' +\n xRight +\n ' ' +\n (yDown + 30)\n );\n }\n\n private viewBoxCoordinates(svg: string): {\n width: number;\n height: number;\n viewBox: string;\n } {\n const ViewBoxCoordinate =\n /width=\"([^\"]+)\"\\s+height=\"([^\"]+)\"\\s+viewBox=\"([^\"]+)\"/;\n const match = svg.match(ViewBoxCoordinate);\n if (match) {\n return { width: +match[1], height: +match[2], viewBox: match[3] };\n }\n return { width: 0, height: 0, viewBox: '' };\n }\n\n private appendDST(data: string, dst: ConfigAndDST): string {\n data += '\\n';\n return data;\n }\n}\n","import { EventEmitter, Injectable, OnDestroy } from '@angular/core';\nimport { IconDictionaryService } from 'src/app/Service/DomainConfiguration/icon-dictionary.service';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { TitleService } from 'src/app/Service/Title/title.service';\nimport { ImportRepairService } from 'src/app/Service/Import/import-repair.service';\nimport { Observable, Subscription } from 'rxjs';\nimport { RendererService } from 'src/app/Service/Renderer/renderer.service';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport {\n DomainConfiguration,\n fromConfigurationFromFile,\n} from 'src/app/Domain/Common/domainConfiguration';\nimport { DialogService } from '../Dialog/dialog.service';\nimport { InfoDialogComponent } from '../../Presentation/Dialog/info-dialog/info-dialog.component';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { InfoDialogData } from '../../Domain/Dialog/infoDialogData';\nimport { restoreTitleFromFileName } from '../../Utils/sanitizer';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_TITLE,\n SNACKBAR_DURATION,\n SNACKBAR_ERROR,\n SNACKBAR_INFO,\n} from '../../Domain/Common/constants';\nimport { DomainConfigurationService } from '../DomainConfiguration/domain-configuration.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ImportDomainStoryService implements OnDestroy {\n titleSubscription: Subscription;\n descriptionSubscription: Subscription;\n\n title = INITIAL_TITLE;\n description = INITIAL_DESCRIPTION;\n private importedConfiguration: DomainConfiguration | null = null;\n\n private importedConfigurationEmitter =\n new EventEmitter();\n\n constructor(\n private iconDictionaryService: IconDictionaryService,\n private importRepairService: ImportRepairService,\n private titleService: TitleService,\n private rendererService: RendererService,\n private dialogService: DialogService,\n private domainConfigurationService: DomainConfigurationService,\n private snackbar: MatSnackBar\n ) {\n this.titleSubscription = this.titleService.title$.subscribe(\n (title: string) => {\n this.title = title;\n }\n );\n this.descriptionSubscription = this.titleService.description$.subscribe(\n (description: string) => {\n this.description = description;\n }\n );\n }\n\n ngOnDestroy(): void {\n this.titleSubscription.unsubscribe();\n this.descriptionSubscription.unsubscribe();\n }\n\n get importedConfigurationEvent(): Observable {\n return this.importedConfigurationEmitter.asObservable();\n }\n\n getImportedConfiguration(): DomainConfiguration {\n const config: DomainConfiguration = {\n name: this.importedConfiguration?.name || '',\n actors: this.importedConfiguration?.actors || new Dictionary(),\n workObjects: this.importedConfiguration?.workObjects || new Dictionary(),\n };\n this.importedConfiguration = null;\n return config;\n }\n\n importDST(input: Blob, filename: string, isSVG: boolean): void {\n const fileReader = new FileReader();\n const titleText = restoreTitleFromFileName(filename, isSVG);\n\n // no need to put this on the commandStack\n this.titleService.updateTitleAndDescription(titleText, null, false);\n\n fileReader.onloadend = (e) => {\n if (e && e.target) {\n this.fileReaderFunction(e.target.result, isSVG, false);\n }\n };\n\n fileReader.readAsText(input);\n }\n\n importEGN(input: Blob, filename: string, isSVG: boolean): void {\n const fileReader = new FileReader();\n const titleText = restoreTitleFromFileName(filename, isSVG);\n\n // no need to put this on the commandStack\n this.titleService.updateTitleAndDescription(titleText, null, false);\n\n fileReader.onloadend = (e) => {\n if (e && e.target) {\n this.fileReaderFunction(e.target.result, isSVG, true);\n }\n };\n\n fileReader.readAsText(input);\n }\n\n private fileReaderFunction(\n text: string | ArrayBuffer | null,\n isSVG: boolean,\n isEGN: boolean\n ): void {\n let dstText;\n if (typeof text === 'string') {\n if (isSVG) {\n dstText = this.removeXMLComments(text);\n } else {\n dstText = text;\n }\n\n let elements: any[];\n let config: DomainConfiguration;\n let configFromFile: {\n name: string;\n actors: { [key: string]: any };\n workObjects: { [key: string]: any };\n };\n\n let dstAndConfig = this.extractDstAndConfig(dstText, isSVG);\n if (dstAndConfig == null) {\n return;\n }\n\n // current implementation\n if (dstAndConfig.domain) {\n configFromFile = isEGN\n ? dstAndConfig.domain\n : JSON.parse(dstAndConfig.domain);\n config = fromConfigurationFromFile(configFromFile);\n elements = isEGN ? dstAndConfig.dst : JSON.parse(dstAndConfig.dst);\n } else {\n // legacy implementation\n if (dstAndConfig.config) {\n configFromFile = JSON.parse(dstAndConfig.config);\n config = fromConfigurationFromFile(configFromFile);\n elements = JSON.parse(dstAndConfig.dst);\n } else {\n // implementation prior to configuration\n elements = JSON.parse(dstText);\n config =\n this.domainConfigurationService.createMinimalConfigurationWithDefaultIcons();\n }\n }\n\n const configChanged = this.checkConfigForChanges(config);\n\n let lastElement = elements[elements.length - 1];\n if (!lastElement.id) {\n lastElement = elements.pop();\n let importVersionNumber = lastElement;\n\n // if the last element has the importedVersionNumber has the tag version,\n // then there exists another meta tag 'info' for the description\n if (importVersionNumber.version) {\n lastElement = elements.pop();\n }\n\n if (importVersionNumber.version) {\n importVersionNumber = importVersionNumber.version as string;\n } else {\n importVersionNumber = '?';\n this.snackbar.open(`The version number is unreadable.`, undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_ERROR,\n });\n }\n elements = this.handleVersionNumber(importVersionNumber, elements);\n }\n\n if (\n !this.importRepairService.checkForUnreferencedElementsInActivitiesAndRepair(\n elements\n )\n ) {\n this.showBrokenImportDialog(isSVG ? 'SVG' : 'DST');\n }\n\n this.titleService.updateTitleAndDescription(\n null,\n lastElement.info,\n false\n );\n\n this.importRepairService.adjustPositions(elements);\n\n this.updateIconRegistries(elements, config);\n this.rendererService.importStory(elements, configChanged, config);\n }\n }\n\n private handleVersionNumber(\n importVersionNumber: string,\n elements: BusinessObject[]\n ): BusinessObject[] {\n const versionPrefix = +importVersionNumber.substring(\n 0,\n importVersionNumber.lastIndexOf('.')\n );\n if (versionPrefix <= 0.5) {\n elements =\n this.importRepairService.updateCustomElementsPreviousV050(elements);\n this.showPreviousV050Dialog(versionPrefix);\n }\n return elements;\n }\n\n private extractDstAndConfig(dstText: string, isSVG: boolean) {\n let dstAndConfig = null;\n try {\n dstAndConfig = JSON.parse(dstText);\n } catch (e) {\n this.showBrokenImportDialog(isSVG ? 'SVG' : 'DST');\n }\n return dstAndConfig;\n }\n\n private removeXMLComments(xmlText: string): string {\n xmlText = xmlText.substring(xmlText.indexOf(''));\n while (xmlText.includes('')) {\n xmlText = xmlText.replace('', '');\n }\n xmlText = xmlText.replace('', '');\n xmlText = xmlText.replace('', '');\n return xmlText;\n }\n\n checkConfigForChanges(domainConfiguration: DomainConfiguration): boolean {\n const newActorKeys = domainConfiguration.actors.keysArray();\n const newWorkObjectKeys = domainConfiguration.workObjects.keysArray();\n\n const currentActorKeys = this.iconDictionaryService.getTypeDictionaryKeys(\n elementTypes.ACTOR\n );\n const currentWorkobjectKeys =\n this.iconDictionaryService.getTypeDictionaryKeys(elementTypes.WORKOBJECT);\n\n let changed = false;\n\n if (\n newActorKeys.length !== currentActorKeys.length ||\n newWorkObjectKeys.length !== currentWorkobjectKeys.length\n ) {\n return true;\n }\n\n for (let i = 0; i < newActorKeys.length; i++) {\n changed =\n this.clearName(currentActorKeys[i]) !== this.clearName(newActorKeys[i]);\n if (changed) {\n i = newActorKeys.length;\n }\n }\n if (changed) {\n return changed;\n }\n for (let i = 0; i < newWorkObjectKeys.length; i++) {\n changed =\n this.clearName(currentWorkobjectKeys[i]) !==\n this.clearName(newWorkObjectKeys[i]);\n if (changed) {\n i = newWorkObjectKeys.length;\n }\n }\n return changed;\n }\n\n private clearName(name: string): string {\n return name\n .replace(elementTypes.ACTOR, '')\n .replace(elementTypes.WORKOBJECT, '');\n }\n\n private updateIconRegistries(\n elements: BusinessObject[],\n config: DomainConfiguration\n ): void {\n const actorIcons = this.iconDictionaryService.getElementsOfType(\n elements,\n elementTypes.ACTOR\n );\n const workObjectIcons = this.iconDictionaryService.getElementsOfType(\n elements,\n elementTypes.WORKOBJECT\n );\n this.iconDictionaryService.updateIconRegistries(\n actorIcons,\n workObjectIcons,\n config\n );\n\n this.setImportedConfigurationAndEmit(config);\n }\n\n private showPreviousV050Dialog(version: number): void {\n const title = 'Compatability-Warning';\n const text =\n 'The uploaded Domain-Story is from version ' +\n version +\n '. There may be problems with the default actors or workobjects contained in the story.';\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n config.data = new InfoDialogData(title, text, true);\n\n this.dialogService.openDialog(InfoDialogComponent, config);\n }\n\n private setImportedConfigurationAndEmit(config: DomainConfiguration) {\n this.importedConfiguration = config;\n this.importedConfigurationEmitter.emit(config);\n }\n\n private showBrokenImportDialog(type: string) {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n config.data = new InfoDialogData(\n 'Error during import',\n 'The uploaded ' +\n type +\n ' is not complete, there could be elements missing from the canvas.',\n true,\n false\n );\n\n this.dialogService.openDialog(InfoDialogComponent, config);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport { Waypoint } from 'src/app/Domain/Common/waypoint';\nimport { ActivityBusinessObject } from '../../Domain/Common/activityBusinessObject';\n\n/**\n * Repairs broken Domain Stories so that it can be rendered onto the canvas\n * by removing activities and connections that reference elements that don't exists\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ImportRepairService {\n checkForUnreferencedElementsInActivitiesAndRepair(\n elements: BusinessObject[]\n ): boolean {\n const activities: ActivityBusinessObject[] = [];\n const objectIDs: string[] = [];\n\n let complete = true;\n\n elements.forEach((element) => {\n const type = element.type;\n if (type === elementTypes.ACTIVITY || type === elementTypes.CONNECTION) {\n activities.push(element as ActivityBusinessObject);\n } else {\n objectIDs.push(element.id);\n }\n });\n\n activities.forEach((activity) => {\n const source = activity.source;\n const target = activity.target;\n if (!objectIDs.includes(source) || !objectIDs.includes(target)) {\n complete = false;\n const activityIndex = elements.indexOf(activity);\n elements = elements.splice(activityIndex, 1);\n }\n });\n return complete;\n }\n\n /**\n * Ensure backwards compatibility.\n * Previously Document had no special name and was just addressed as workObject\n * Bubble was renamed to Conversation\n */\n updateCustomElementsPreviousV050(\n elements: BusinessObject[]\n ): BusinessObject[] {\n for (const element of elements) {\n if (element.type === elementTypes.WORKOBJECT) {\n element.type = elementTypes.WORKOBJECT + 'Document';\n } else if (element.type === elementTypes.WORKOBJECT + 'Bubble') {\n element.type = elementTypes.WORKOBJECT + 'Conversation';\n }\n }\n return elements;\n }\n\n /**\n * Adjusts Positions of Elements to ensure the Domain Story starts in the visible parts of the canvas\n */\n adjustPositions(elements: BusinessObject[]): void {\n let xLeft = 0;\n let yUp = 0;\n let isFirst = true;\n\n this.findFirstElement(elements, isFirst, xLeft, yUp);\n\n if (xLeft < 75 || xLeft > 150 || yUp < 0 || yUp > 50) {\n // add Padding for the Palette and the top\n xLeft -= 75;\n yUp -= 50;\n\n elements.forEach((element) =>\n this.adjustElementPosition(element, xLeft, yUp)\n );\n }\n }\n\n private adjustElementPosition(\n element: BusinessObject,\n xLeft: number,\n yUp: number\n ): void {\n if (\n element.type === elementTypes.ACTIVITY ||\n element.type === elementTypes.CONNECTION\n ) {\n const waypoints = (element as ActivityBusinessObject).waypoints;\n waypoints.forEach((point: Waypoint) => {\n point.x -= xLeft;\n point.y -= yUp;\n\n if (point.original) {\n point.original.x = point.x;\n point.original.y = point.y;\n }\n });\n } else {\n element.x -= xLeft;\n element.y -= yUp;\n }\n }\n\n private findFirstElement(\n elements: BusinessObject[],\n isFirst: boolean,\n xLeft: number,\n yUp: number\n ) {\n elements.forEach((element) => {\n let elXLeft;\n let elYUp;\n if (\n element.type !== elementTypes.ACTIVITY &&\n element.type !== elementTypes.CONNECTION\n ) {\n if (isFirst) {\n xLeft = element.x;\n yUp = element.y;\n isFirst = false;\n }\n elXLeft = element.x;\n elYUp = element.y;\n if (elXLeft < xLeft) {\n xLeft = elXLeft;\n }\n if (elYUp < yUp) {\n yUp = elYUp;\n }\n }\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { MassNamingService } from 'src/app/Service/LabelDictionary/mass-naming.service';\nimport { IconDictionaryService } from '../DomainConfiguration/icon-dictionary.service';\nimport { WorkObjectLabelEntry } from '../../Domain/LabelDictionary/workObjectLabelEntry';\nimport { LabelEntry } from '../../Domain/LabelDictionary/labelEntry';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LabelDictionaryService {\n activityLabels: LabelEntry[] = [];\n workObjektLabels: WorkObjectLabelEntry[] = [];\n\n constructor(\n private massNamingService: MassNamingService,\n private elementRegistryService: ElementRegistryService,\n private iconDictionaryService: IconDictionaryService\n ) {}\n\n createLabelDictionaries(): void {\n this.activityLabels = [];\n this.workObjektLabels = [];\n\n const allObjects = this.elementRegistryService.getAllCanvasObjects();\n\n allObjects.forEach((element) => {\n const name = element.businessObject.name;\n if (\n name &&\n name.length > 0 &&\n element.type.includes(elementTypes.ACTIVITY) &&\n !this.activityLabels.map((a) => a.name).includes(name)\n ) {\n this.activityLabels.push({\n name,\n originalName: name,\n });\n } else if (\n name &&\n name.length > 0 &&\n element.type.includes(elementTypes.WORKOBJECT) &&\n !this.workObjektLabels.map((e) => e.name).includes(name)\n ) {\n const iconName = element.type.replace(elementTypes.WORKOBJECT, '');\n let icon = this.iconDictionaryService.getIconSource(iconName);\n if (!icon) {\n return;\n }\n if (!icon.startsWith('data')) {\n icon = 'data:image/svg+xml,' + icon;\n }\n this.workObjektLabels.push({\n name,\n originalName: name,\n icon,\n });\n }\n });\n this.activityLabels.sort((a, b) => {\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\n });\n this.workObjektLabels.sort((a, b) => {\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\n });\n }\n\n getActivityLabels(): LabelEntry[] {\n return this.activityLabels.slice();\n }\n\n getWorkObjectLabels(): WorkObjectLabelEntry[] {\n return this.workObjektLabels.slice();\n }\n\n getUniqueWorkObjectNames(): String[] {\n const workObjects = this.elementRegistryService.getAllWorkobjects();\n return [\n ...new Set(\n workObjects\n .filter((workObject) => {\n return !!workObject.businessObject.name;\n })\n .map((workObject) => workObject.businessObject.name)\n ),\n ];\n }\n\n massRenameLabels(\n activityNames: string[],\n originalActivityNames: string[],\n workObjectNames: string[],\n originalWorkObjectNames: string[]\n ): void {\n for (let i = 0; i < originalActivityNames.length; i++) {\n if (!activityNames[i]) {\n activityNames[i] = '';\n }\n if (!(activityNames[i] == originalActivityNames[i])) {\n this.massNamingService.massChangeNames(\n originalActivityNames[i],\n activityNames[i],\n elementTypes.ACTIVITY\n );\n }\n }\n for (let i = 0; i < originalWorkObjectNames.length; i++) {\n if (!workObjectNames[i]) {\n workObjectNames[i] = '';\n }\n if (!(workObjectNames[i] == originalWorkObjectNames[i])) {\n this.massNamingService.massChangeNames(\n originalWorkObjectNames[i],\n workObjectNames[i],\n elementTypes.WORKOBJECT\n );\n }\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { CanvasObject } from 'src/app/Domain/Common/canvasObject';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { CommandStackService } from '../CommandStack/command-stack.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MassNamingService {\n constructor(\n private elementRegistryService: ElementRegistryService,\n private commandStackService: CommandStackService\n ) {}\n\n massChangeNames(\n oldValue: string,\n newValue: string,\n type: elementTypes\n ): void {\n const allRelevantObjects: CanvasObject[] = [];\n\n this.elementRegistryService.getAllCanvasObjects().forEach((element) => {\n if (\n element.type.includes(type) &&\n element.businessObject.name === oldValue\n ) {\n allRelevantObjects.push(element);\n }\n });\n\n const context = {\n elements: allRelevantObjects,\n newValue,\n };\n\n this.commandStackService.execute('domainStoryObjects.massRename', context);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { initializeContextPadProvider } from '../../Modeler/modeler/context-pad/domainStoryContextPadProvider';\nimport {\n getMultipleNumberRegistry,\n getNumberRegistry,\n initializeNumbering,\n setNumberIsMultiple,\n updateExistingNumbersAtEditing,\n} from '../../Modeler/modeler/numbering/numbering';\nimport { initializePalette } from '../../Modeler/modeler/palette/domainStoryPalette';\nimport { initializeRenderer } from '../../Modeler/modeler/domainStoryRenderer';\nimport {\n initializeLabelEditingProvider,\n toggleStashUse,\n} from '../../Modeler/modeler/labeling/dsLabelEditingProvider';\nimport { initializeReplaceOptions } from '../../Modeler/modeler/change-icon/replaceOptions';\n\nimport { DirtyFlagService } from '../DirtyFlag/dirty-flag.service';\nimport { IconDictionaryService } from '../DomainConfiguration/icon-dictionary.service';\nimport { ElementRegistryService } from '../ElementRegistry/element-registry.service';\nimport { DomainConfigurationService } from '../DomainConfiguration/domain-configuration.service';\nimport { LabelDictionaryService } from '../LabelDictionary/label-dictionary.service';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { ReplayStateService } from '../Replay/replay-state.service';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { ActivityDialogData } from '../../Domain/Dialog/activityDialogData';\nimport { ActivityDialogComponent } from '../../Presentation/Dialog/activity-dialog/activity-dialog.component';\nimport { DialogService } from '../Dialog/dialog.service';\nimport massRenameHandler from '../../Modeler/modeler/updateHandler/massRenameHandler';\nimport headlineAndDescriptionUpdateHandler from '../../Modeler/modeler/updateHandler/headlineAndDescriptionUpdateHandler';\nimport { TitleService } from '../Title/title.service';\nimport { ActivityCanvasObject } from '../../Domain/Common/activityCanvasObject';\nimport { HtmlPresentationService } from '../Export/html-presentation.service';\nimport { positionsMatch } from '../../Utils/mathExtensions';\nimport activityUpdateHandler, {\n initializeActivityUpdateHandler,\n} from '../../Modeler/modeler/updateHandler/activityUpdateHandlers';\nimport elementUpdateHandler from '../../Modeler/modeler/updateHandler/elementUpdateHandler';\nimport { CommandStackService } from '../CommandStack/command-stack.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class InitializerService {\n constructor(\n private dirtyFlagService: DirtyFlagService,\n private iconDictionaryService: IconDictionaryService,\n private elementRegistryService: ElementRegistryService,\n private configurationService: DomainConfigurationService,\n private labelDictionaryService: LabelDictionaryService,\n private replayStateService: ReplayStateService,\n private dialogService: DialogService,\n private commandStackService: CommandStackService,\n private titleService: TitleService,\n private htmlPresentationService: HtmlPresentationService\n ) {}\n\n initializeDomainStoryModelerClasses(): void {\n initializeContextPadProvider(\n this.dirtyFlagService,\n this.iconDictionaryService\n );\n /** The Palette and the Context Menu need the Icons present in the Domain,\n * so the IconDictionaryService and the DomainConfigurationService needs to be given to the Palette **/\n initializePalette(this.iconDictionaryService, this.configurationService);\n initializeRenderer(\n this.iconDictionaryService,\n this.elementRegistryService,\n this.dirtyFlagService\n );\n initializeLabelEditingProvider(this.labelDictionaryService);\n initializeReplaceOptions(this.iconDictionaryService);\n initializeNumbering(this.elementRegistryService);\n initializeActivityUpdateHandler(this.elementRegistryService);\n }\n\n propagateDomainStoryModelerClassesToServices(\n commandStack: any,\n elementRegistry: any,\n canvas: any,\n selection: any,\n modeler: any\n ): void {\n this.commandStackService.setCommandStack(commandStack);\n this.elementRegistryService.setElementRegistry(elementRegistry);\n this.htmlPresentationService.setModelerClasses(canvas, selection, modeler);\n }\n\n initializeDomainStoryModelerEventHandlers(\n commandStack: any,\n eventBus: any\n ): void {\n activityUpdateHandler(commandStack, eventBus);\n massRenameHandler(commandStack, eventBus);\n elementUpdateHandler(commandStack, eventBus);\n headlineAndDescriptionUpdateHandler(commandStack, this.titleService);\n }\n\n initiateEventBusListeners(eventBus: any, commandStack: any): void {\n eventBus.on('element.dblclick', (e: any) => {\n if (!this.replayStateService.getReplayOn()) {\n const element = e.element;\n if (element.type === elementTypes.ACTIVITY) {\n // override the doubleClickListener on activities\n this.activityDoubleClick(element, eventBus, commandStack);\n } else {\n const renderedNumberRegistry = getNumberRegistry();\n\n // add a DoubleClickListener to the number on activities\n if (renderedNumberRegistry.length > 1) {\n const allActivities =\n this.elementRegistryService.getActivitiesFromActors();\n\n if (allActivities.length > 0) {\n const htmlCanvas = document.getElementById('canvas');\n if (htmlCanvas) {\n const container =\n htmlCanvas.getElementsByClassName('djs-container');\n const svgElements = container[0].getElementsByTagName('svg');\n const outerSVGElement = svgElements[0];\n const viewport =\n outerSVGElement.getElementsByClassName('viewport')[0];\n let transform = viewport.getAttribute('transform');\n\n let transformX = 0;\n let transformY = 0;\n let zoomX = 1;\n let zoomY = 1;\n let nums;\n\n const clickX = e.originalEvent.offsetX;\n const clickY = e.originalEvent.offsetY;\n\n // adjust for zoom and panning\n if (transform) {\n transform = transform.replace('matrix(', '');\n transform.replace(')', '');\n nums = transform.split(',');\n zoomX = parseFloat(nums[0]);\n zoomY = parseFloat(nums[3]);\n transformX = parseInt(nums[4], undefined);\n transformY = parseInt(nums[5], undefined);\n }\n\n const width = 25 * zoomX;\n const height = 22 * zoomY;\n\n for (let i = 1; i < renderedNumberRegistry.length; i++) {\n const currentNum = renderedNumberRegistry[i];\n if (currentNum) {\n const tspan = currentNum.getElementsByTagName('tspan')[0];\n const tx = tspan.getAttribute('x');\n const ty = tspan.getAttribute('y');\n const tNumber = parseInt(tspan.innerHTML, undefined);\n\n const elementX = Math.floor(\n tx * zoomX + (transformX - 11 * zoomX)\n );\n const elementY = Math.floor(\n ty * zoomY + (transformY - 15 * zoomY)\n );\n\n allActivities.forEach((activity: ActivityCanvasObject) => {\n const activityNumber = activity.businessObject.number;\n if (activityNumber === tNumber) {\n if (\n positionsMatch(\n width,\n height,\n elementX,\n elementY,\n clickX,\n clickY\n )\n ) {\n this.activityDoubleClick(\n activity,\n eventBus,\n commandStack\n );\n }\n }\n });\n }\n }\n }\n }\n }\n }\n }\n });\n\n // when in replay, do not allow any interaction on the canvas\n eventBus.on(\n [\n 'element.click',\n 'element.dblclick',\n 'element.mousedown',\n 'drag.init',\n 'canvas.viewbox.changing',\n 'autoPlace',\n 'popupMenu.open',\n ],\n 10000000000,\n (event: any) => {\n if (this.replayStateService.getReplayOn()) {\n event.stopPropagation();\n event.preventDefault();\n }\n }\n );\n }\n\n /** Overrrides for Canvas Functions **/\n private activityDoubleClick(\n activity: ActivityCanvasObject,\n eventBus: any,\n commandStack: any\n ): void {\n const source = activity.source;\n\n // ensure the right number when changing the direction of an activity\n toggleStashUse(false);\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n if (\n activity.businessObject.number &&\n source &&\n source.type.includes(elementTypes.ACTOR)\n ) {\n config.data = new ActivityDialogData(\n activity,\n getMultipleNumberRegistry()[activity.businessObject.number],\n true,\n (data: any) => this.saveActivityInputLabel(data, eventBus, commandStack)\n );\n } else if (source && source.type.includes(elementTypes.WORKOBJECT)) {\n config.data = new ActivityDialogData(\n activity,\n false,\n false,\n (activityData: any) =>\n this.saveActivityInputLabel(activityData, eventBus, commandStack)\n );\n }\n this.dialogService.openDialog(ActivityDialogComponent, config);\n }\n\n private saveActivityInputLabel(\n activityData: any,\n eventBus: any,\n commandStack: any\n ): void {\n const label = activityData.activityLabel;\n const hasNumber = activityData.activityNumber ?? false;\n const activityNumber = activityData.activityNumber;\n const multipleNumberAllowed = activityData.multipleNumbers ?? false;\n const element = activityData.activity;\n\n const activitiesFromActors =\n this.elementRegistryService.getActivitiesFromActors();\n const index = activitiesFromActors.indexOf(element);\n\n activitiesFromActors.splice(index, 1);\n if (hasNumber) {\n setNumberIsMultiple(activityNumber, multipleNumberAllowed);\n }\n element.businessObject.multipleNumberAllowed = multipleNumberAllowed;\n\n let options: any;\n if (hasNumber) {\n options = {\n businessObject: element.businessObject,\n newLabel: label,\n newNumber: activityNumber,\n element,\n };\n } else {\n options = {\n businessObject: element.businessObject,\n newLabel: label,\n element,\n };\n }\n\n commandStack.execute('activity.changed', options);\n if (element.businessObject.multipleNumberAllowed !== false) {\n if (getMultipleNumberRegistry()[activityNumber] === false) {\n updateExistingNumbersAtEditing(\n activitiesFromActors,\n activityNumber,\n eventBus\n );\n }\n } else if (element.businessObject.multipleNumberAllowed === false) {\n updateExistingNumbersAtEditing(\n activitiesFromActors,\n activityNumber,\n eventBus\n );\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { assign } from 'min-dash';\nimport DomainStoryModeler from 'src/app/Modeler';\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\nimport { InitializerService } from './initializer.service';\nimport { ElementRegistryService } from '../ElementRegistry/element-registry.service';\nimport { IconDictionaryService } from '../DomainConfiguration/icon-dictionary.service';\nimport { DomainConfigurationService } from '../DomainConfiguration/domain-configuration.service';\nimport { BusinessObject } from '../../Domain/Common/businessObject';\nimport { StorageService } from '../BrowserStorage/storage.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ModelerService {\n constructor(\n private initializerService: InitializerService,\n private elementRegistryService: ElementRegistryService,\n private iconDictionaryService: IconDictionaryService,\n private domainConfigurationService: DomainConfigurationService,\n private storageService: StorageService\n ) {}\n\n private modeler: any;\n private canvas: any;\n private elementRegistry: any;\n private commandStack: any;\n private selection: any;\n private eventBus: any;\n\n private encoded: string | undefined;\n\n postInit(): void {\n const storedDomainConfiguration =\n this.storageService.getStoredDomainConfiguration();\n if (storedDomainConfiguration) {\n this.iconDictionaryService.setCusomtConfiguration(\n storedDomainConfiguration\n );\n this.domainConfigurationService.loadConfiguration(\n storedDomainConfiguration\n );\n }\n this.initializerService.initializeDomainStoryModelerClasses();\n this.modeler = new DomainStoryModeler({\n container: '#canvas',\n keyboard: {\n bindTo: document,\n },\n\n // Disable BPMN-SearchModule and re-enable browser Search\n additionalModules: [\n {\n bpmnSearch: ['value', 'foo'],\n },\n ],\n });\n\n if (this.modeler.get) {\n this.canvas = this.modeler.get('canvas');\n this.elementRegistry = this.modeler.get('elementRegistry');\n this.eventBus = this.modeler.get('eventBus');\n this.commandStack = this.modeler.get('commandStack');\n this.selection = this.modeler.get('selection');\n }\n\n this.initializerService.initializeDomainStoryModelerEventHandlers(\n this.commandStack,\n this.eventBus\n );\n this.initializerService.propagateDomainStoryModelerClassesToServices(\n this.commandStack,\n this.elementRegistry,\n this.canvas,\n this.selection,\n this.modeler\n );\n\n const exportArtifacts = this.debounce(this.saveSVG, 500);\n if (this.modeler.get) {\n this.modeler.on('commandStack.changed', exportArtifacts);\n }\n\n this.initializerService.initiateEventBusListeners(\n this.eventBus,\n this.commandStack\n );\n\n this.modeler.createDiagram();\n // expose bpmnjs to window for debugging purposes\n assign(window, { bpmnjs: this.modeler });\n\n this.startDebounce();\n }\n\n restart(\n domainConfiguration?: DomainConfiguration,\n domainStory?: BusinessObject[]\n ): void {\n const currentStory =\n domainStory != undefined\n ? domainStory\n : this.elementRegistryService\n .createObjectListForDSTDownload()\n .map((e) => e.businessObject);\n if (!domainConfiguration) {\n domainConfiguration = this.storageService.getStoredDomainConfiguration();\n }\n if (domainConfiguration) {\n this.storageService.setStoredDomainConfiguration(domainConfiguration);\n this.iconDictionaryService.setCusomtConfiguration(domainConfiguration);\n this.domainConfigurationService.loadConfiguration(domainConfiguration);\n }\n\n this.elementRegistryService.clear();\n this.modeler?.destroy();\n this.postInit();\n if (currentStory && this.modeler.get) {\n this.modeler.importCustomElements(currentStory);\n }\n }\n\n /** Interactions with the Modeler **/\n getModeler(): any {\n return this.modeler;\n }\n\n commandStackChanged(): void {\n // to update the title of the svg, we need to tell the command stack, that a value has changed\n this.eventBus.fire(\n 'commandStack.changed',\n this.debounce(this.saveSVG, 500)\n );\n }\n\n startDebounce(): void {\n this.debounce(this.saveSVG, 500);\n }\n\n debounce(fn: any, timeout: number): any {\n return () => {\n let timer;\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(() => {\n // tslint:disable-next-line:no-unused-expression\n fn(this.modeler).then((svg: string) => {\n this.encoded = svg;\n }) as Promise;\n }, timeout);\n };\n }\n\n getEncoded(): string {\n return this.encoded ? this.encoded : '';\n }\n\n async saveSVG(modeler: any): Promise {\n try {\n const result = await modeler.saveSVG();\n return result.svg;\n } catch (err) {\n alert('There was an error saving the SVG.\\n' + err);\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ModelerService } from 'src/app/Service/Modeler/modeler.service';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { DirtyFlagService } from 'src/app/Service/DirtyFlag/dirty-flag.service';\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RendererService {\n constructor(\n private modelerService: ModelerService,\n private elementRegistryService: ElementRegistryService,\n private dirtyFlagService: DirtyFlagService\n ) {}\n\n renderStory(domainStory: BusinessObject[]): void {\n this.modelerService.getModeler().importCustomElements(domainStory);\n }\n\n reset(): void {\n this.renderStory([]);\n }\n\n importStory(\n domainStory: BusinessObject[],\n configurationChange: boolean,\n config?: DomainConfiguration,\n makeClean = true\n ): void {\n this.modelerService.restart(config, domainStory);\n this.renderStory(domainStory);\n\n this.elementRegistryService.correctInitialize();\n\n this.modelerService.commandStackChanged();\n this.modelerService.startDebounce();\n\n if (makeClean) {\n this.dirtyFlagService.makeClean();\n }\n }\n\n getStory(): BusinessObject[] {\n return this.elementRegistryService\n .createObjectListForDSTDownload()\n .map((c) => c.businessObject);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReplayStateService {\n private replayOnSubject = new BehaviorSubject(false);\n\n replayOn$ = this.replayOnSubject.asObservable();\n\n setReplayState(state: boolean): void {\n this.replayOnSubject.next(state);\n }\n\n getReplayOn(): boolean {\n return this.replayOnSubject.value;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ReplayStateService } from 'src/app/Service/Replay/replay-state.service';\nimport { DomManipulationService } from 'src/app/Service/DomManipulation/dom-manipulation.service';\nimport { StoryStep } from 'src/app/Domain/Replay/storyStep';\nimport { StoryCreatorService } from './storyCreator/story-creator.service';\nimport { BehaviorSubject } from 'rxjs';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n} from '../../Domain/Common/constants';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReplayService {\n private story: StoryStep[] = [];\n private currentStep = new BehaviorSubject(-1);\n private maxStepNumber = new BehaviorSubject(0);\n\n currentStep$ = this.currentStep.asObservable();\n maxStepNumber$ = this.maxStepNumber.asObservable();\n\n constructor(\n private replayStateService: ReplayStateService,\n private domManipulationService: DomManipulationService,\n private storyCreatorService: StoryCreatorService,\n private snackbar: MatSnackBar\n ) {}\n\n initializeReplay(): void {\n this.currentStep.next(1);\n this.story = this.storyCreatorService.traceActivitiesAndCreateStory();\n this.maxStepNumber.next(this.story.length);\n }\n\n getCurrentStepNumber(): number {\n return this.currentStep.value;\n }\n\n getMaxStepNumber(): number {\n return this.maxStepNumber.value;\n }\n\n nextStep(): void {\n if (this.currentStep.value < this.story.length) {\n this.currentStep.next(this.currentStep.value + 1);\n this.showCurrentStep();\n }\n }\n\n previousStep(): void {\n if (this.currentStep.value > 1) {\n this.currentStep.next(this.currentStep.value - 1);\n this.showCurrentStep();\n }\n }\n\n private showCurrentStep() {\n this.domManipulationService.showStep(\n this.story[this.currentStep.value - 1],\n this.currentStep.value > 1\n ? this.story[this.currentStep.value - 2]\n : undefined\n );\n }\n\n startReplay(): void {\n this.initializeReplay();\n if (this.story?.length) {\n const missingSteps = this.storyCreatorService.getMissingSteps(this.story);\n if (missingSteps.length === 0) {\n this.replayStateService.setReplayState(true);\n this.domManipulationService.showStep(\n this.story[this.currentStep.getValue() - 1]\n );\n } else {\n const steps = missingSteps.join(', ');\n this.snackbar.open(\n steps.length === 1\n ? `The Domain Story is not complete. Step ${steps} is missing.`\n : `The Domain Story is not complete. Steps ${steps} are missing.`,\n undefined,\n {\n duration: SNACKBAR_DURATION * 2,\n panelClass: SNACKBAR_INFO,\n }\n );\n }\n } else {\n this.snackbar.open('You need a Domain Story for replay.', undefined, {\n duration: SNACKBAR_DURATION * 2,\n panelClass: SNACKBAR_INFO,\n });\n }\n }\n\n stopReplay(): void {\n this.currentStep.next(-1);\n this.maxStepNumber.next(0);\n this.replayStateService.setReplayState(false);\n this.domManipulationService.showAll();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { elementTypes } from '../../../Domain/Common/elementTypes';\nimport { ActivityCanvasObject } from '../../../Domain/Common/activityCanvasObject';\nimport { BusinessObject } from '../../../Domain/Common/businessObject';\nimport { CanvasObject } from '../../../Domain/Common/canvasObject';\nimport { ElementRegistryService } from '../../ElementRegistry/element-registry.service';\nimport { StoryStep } from '../../../Domain/Replay/storyStep';\nimport { Dictionary } from '../../../Domain/Common/dictionary/dictionary';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StoryCreatorService {\n constructor(private elementRegistryService: ElementRegistryService) {}\n\n traceActivitiesAndCreateStory(): StoryStep[] {\n const tracedActivityMap = new Dictionary();\n const story: StoryStep[] = [];\n const activities = this.elementRegistryService.getActivitiesFromActors();\n\n activities.forEach((activity) => {\n const activityNumber = Number(activity.businessObject.number); // Sometimes the activityNumber is a string for some reason\n const tracedItem = tracedActivityMap.get(`${activityNumber - 1}`)\n ? tracedActivityMap.get(`${activityNumber - 1}`)\n : [];\n tracedItem.push(activity);\n tracedActivityMap.set(`${activityNumber - 1}`, tracedItem);\n });\n\n for (let i = 0; i < tracedActivityMap.keysArray().length; i++) {\n this.createStep(tracedActivityMap, i, story);\n }\n this.addGroupStep(story);\n return story;\n }\n\n private createStep(\n tracedActivityMap: Dictionary,\n i: number,\n story: StoryStep[]\n ): void {\n const stepObjects = this.getStepObjects(\n tracedActivityMap.get(`${i}`) || []\n );\n const highlightedElements = stepObjects.map((t) => t.id);\n if (i > 0) {\n story[i - 1].objects.forEach((object) => {\n if (!stepObjects.includes(object)) {\n stepObjects.push(object);\n }\n });\n }\n story[i] = {\n highlightedObjects: highlightedElements,\n objects: stepObjects,\n };\n }\n\n getMissingSteps(story: StoryStep[]): number[] {\n if (!story || story.length === 0) {\n return [];\n }\n\n const missingSteps: number[] = [];\n let complete = true;\n for (let i = 0; i < story.length; i++) {\n if (\n !story[i] ||\n !(story[i].objects.length > 0) ||\n story[i].objects.filter(\n (element) => element.type === elementTypes.ACTIVITY\n ).length <= 0\n ) {\n missingSteps.push(i + 1);\n complete = false;\n }\n }\n return missingSteps;\n }\n\n private getStepObjects(\n tracedActivity: ActivityCanvasObject[]\n ): BusinessObject[] {\n const initialSource: CanvasObject[] = [];\n const activities = tracedActivity;\n const targetObjects: CanvasObject[] = [];\n\n tracedActivity.forEach((parallelStep: ActivityCanvasObject) => {\n initialSource.push(parallelStep.source);\n\n const firstTarget = parallelStep.target;\n targetObjects.push(firstTarget);\n\n // check the outgoing activities for each target\n for (const checkTarget of targetObjects) {\n if (\n checkTarget.businessObject &&\n !checkTarget.businessObject.type.includes('actor') &&\n checkTarget.outgoing\n ) {\n // check the target for each outgoing activity\n checkTarget.outgoing.forEach((activity: ActivityCanvasObject) => {\n activities.push(activity);\n const activityTarget = activity.target;\n if (activityTarget && !targetObjects.includes(activityTarget)) {\n targetObjects.push(activityTarget);\n }\n });\n }\n }\n });\n return initialSource\n .map((e) => e.businessObject)\n .concat(activities.map((a) => a.businessObject))\n .concat(targetObjects.map((t) => t.businessObject));\n }\n\n /** Groups should be shown at the End of the Story **/\n private addGroupStep(story: StoryStep[]): void {\n const groups = this.elementRegistryService.getAllGroups() as CanvasObject[];\n if (groups.length > 0) {\n story.push({\n highlightedObjects: [],\n objects: groups\n .map((g) => g.businessObject)\n .concat(story[story.length - 1].objects),\n });\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SettingsService {\n private showSettings = new BehaviorSubject(false);\n showSettings$ = this.showSettings.asObservable();\n\n close(): void {\n this.showSettings.next(false);\n }\n\n open(): void {\n this.showSettings.next(true);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_DOMAIN_NAME,\n INITIAL_TITLE,\n} from '../../Domain/Common/constants';\nimport { CommandStackService } from '../CommandStack/command-stack.service';\nimport { environment } from '../../../environments/environment';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TitleService {\n private titleSubject = new BehaviorSubject(INITIAL_TITLE);\n private descriptionSubject = new BehaviorSubject(INITIAL_DESCRIPTION);\n private domainNameSubject = new BehaviorSubject(INITIAL_DOMAIN_NAME);\n private showDescriptionSubject = new BehaviorSubject(true);\n\n title$ = this.titleSubject.asObservable();\n description$ = this.descriptionSubject.asObservable();\n showDescription$ = this.showDescriptionSubject.asObservable();\n domainName$ = this.domainNameSubject.asObservable();\n\n constructor(private commandStackService: CommandStackService) {}\n\n updateTitleAndDescription(\n title: string | null,\n description: string | null,\n allowUndo: boolean\n ): void {\n if (allowUndo) {\n this.fireTitleAndDescriptionUpdate(title, description);\n } else {\n this.updateTitle(title);\n this.updateDescription(description);\n }\n }\n\n reset(): void {\n this.updateTitleAndDescription(INITIAL_TITLE, INITIAL_DESCRIPTION, false);\n }\n\n private updateTitle(title: string | null): void {\n this.titleSubject.next(title ?? this.titleSubject.value);\n document.title = title ?? this.titleSubject.value + ' - egon.io';\n }\n\n private updateDescription(description: string | null): void {\n this.descriptionSubject.next(description ?? this.descriptionSubject.value);\n }\n\n setShowDescription(show: boolean): void {\n this.showDescriptionSubject.next(show);\n }\n\n setDomainName(name: string): void {\n this.domainNameSubject.next(name);\n }\n\n getTitle(): string {\n return this.titleSubject.value;\n }\n\n getDescription(): string {\n return this.descriptionSubject.value;\n }\n\n getDomainName(): string {\n return this.domainNameSubject.value;\n }\n\n getVersion(): string {\n return environment.version;\n }\n\n private fireTitleAndDescriptionUpdate(\n newTitle: string | null,\n newDescription: string | null\n ): void {\n const context = {\n newTitle,\n newDescription,\n };\n this.commandStackService.execute(\n 'story.updateHeadlineAndDescription',\n context\n );\n }\n}\n","'use strict';\n\n// convert rad to deg\nexport function degrees(radians: number): number {\n return (radians * 180) / Math.PI;\n}\n\n// calculate the angle between two points in 2D\nexport function angleBetween(\n startPoint: Point,\n endPoint: Point\n): number | undefined {\n let quadrant;\n\n // determine in which quadrant we are\n if (startPoint.x <= endPoint.x) {\n if (startPoint.y >= endPoint.y) {\n quadrant = 0;\n } // upper right quadrant\n else {\n quadrant = 3;\n } // lower right quadrant\n } else {\n if (startPoint.y >= endPoint.y) {\n quadrant = 1;\n } // upper left Quadrant\n else {\n quadrant = 2;\n } // lower left quadrant\n }\n\n const adjacent = Math.abs(startPoint.y - endPoint.y);\n const opposite = Math.abs(startPoint.x - endPoint.x);\n\n // since the arcus-tangens only gives values between 0 and 90, we have to adjust for the quadrant we are in\n\n if (quadrant === 0) {\n return 90 - degrees(Math.atan2(opposite, adjacent));\n }\n if (quadrant === 1) {\n return 90 + degrees(Math.atan2(opposite, adjacent));\n }\n if (quadrant === 2) {\n return 270 - degrees(Math.atan2(opposite, adjacent));\n }\n if (quadrant === 3) {\n return 270 + degrees(Math.atan2(opposite, adjacent));\n }\n return undefined;\n}\n\nexport function positionsMatch(\n width: number,\n height: number,\n elementX: number,\n elementY: number,\n clickX: number,\n clickY: number\n): boolean {\n if (clickX > elementX && clickX < elementX + width) {\n if (clickY > elementY && clickY < elementY + height) {\n return true;\n }\n }\n return false;\n}\n\nexport class Point {\n y = 0;\n x = 0;\n}\n","import { elementTypes } from 'src/app/Domain/Common/elementTypes';\n\nexport function getNameFromType(type: string): string {\n if (type.includes(elementTypes.ACTOR)) {\n return type.replace(elementTypes.ACTOR, '');\n } else if (type.includes(elementTypes.WORKOBJECT)) {\n return type.replace(elementTypes.WORKOBJECT, '');\n }\n return '';\n}\n","'use strict';\n\n// sanitize user-Input to be Desktop-Filename safe\nexport function sanitizeForDesktop(str: string): string {\n const map: { [key: string]: string } = {\n '/': '',\n '\\\\': '',\n ':': '',\n '*': '',\n '?': '',\n '\"': '',\n '<': '',\n '>': '',\n '|': '',\n };\n const reg = /[/\\\\:*?\"<>|]/gi;\n return str ? str.replace(reg, (match) => map[match]) : '';\n}\n\nexport function sanitizeIconName(name: string): string {\n const map: { [key: string]: string } = {\n '/': '',\n '\\\\': '',\n ':': '',\n '*': '',\n '?': '',\n '\"': '',\n '<': '',\n '>': '',\n '|': '',\n '(': '',\n ')': '',\n ' ': '-',\n '.': '_',\n };\n const reg = /[/\\\\:*?\"<>|() .]/gi;\n return name\n ? name.replace(reg, (match) => {\n return map[match];\n })\n : '';\n}\n\nexport function restoreTitleFromFileName(\n filename: string,\n isSVG: boolean\n): string {\n let title;\n\n const domainStoryRegex = /_\\d+-\\d+-\\d+( ?_?-?\\(\\d+\\))?(-?\\d)?(.dst|.egn)/;\n const svgRegex = /_\\d+-\\d+-\\d+( ?_?-?\\(\\d+\\))?(-?\\d)?(.dst|.egn).svg/;\n\n const egnSuffix = '.egn';\n const dstSuffix = '.dst';\n const svgSuffix = '.svg';\n\n let filenameWithoutDateSuffix = filename.replace(\n isSVG ? svgRegex : domainStoryRegex,\n ''\n );\n if (filenameWithoutDateSuffix.includes(isSVG ? svgSuffix : dstSuffix)) {\n filenameWithoutDateSuffix = filenameWithoutDateSuffix\n .replace(svgSuffix, '')\n .replace(dstSuffix, '')\n .replace(egnSuffix, '');\n }\n title = filenameWithoutDateSuffix;\n return title;\n}\n","import { Component, OnInit } from '@angular/core';\nimport { SettingsService } from 'src/app/Service/Settings/settings.service';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { DialogService } from './Service/Dialog/dialog.service';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { InfoDialogData } from './Domain/Dialog/infoDialogData';\nimport { InfoDialogComponent } from './Presentation/Dialog/info-dialog/info-dialog.component';\nimport { TitleService } from './Service/Title/title.service';\nimport { ExportService } from './Service/Export/export.service';\nimport { ReplayStateService } from './Service/Replay/replay-state.service';\nimport { ReplayService } from './Service/Replay/replay.service';\nimport { environment } from '../environments/environment';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.scss'],\n})\nexport class AppComponent implements OnInit {\n showSettings$: Observable | BehaviorSubject;\n showDescription$: Observable;\n version: string = environment.version;\n\n constructor(\n private settingsService: SettingsService,\n private dialogService: DialogService,\n private titleService: TitleService,\n private exportService: ExportService,\n private replayStateSerice: ReplayStateService,\n replayService: ReplayService\n ) {\n this.showSettings$ = new BehaviorSubject(false);\n this.showDescription$ = new BehaviorSubject(true);\n\n document.onkeydown = (e: KeyboardEvent) => {\n if (e.ctrlKey && e.key === 's') {\n if (this.exportService.isDomainStoryExportable()) {\n this.exportService.downloadDST();\n }\n e.preventDefault();\n e.stopPropagation();\n }\n if (e.ctrlKey && e.key === 'l') {\n document.getElementById('import')?.click();\n e.preventDefault();\n e.stopPropagation();\n }\n if (e.key === 'ArrowRight' && this.replayStateSerice.getReplayOn()) {\n e.preventDefault();\n e.stopPropagation();\n replayService.nextStep();\n }\n if (e.key === 'ArrowLeft' && this.replayStateSerice.getReplayOn()) {\n e.preventDefault();\n e.stopPropagation();\n replayService.previousStep();\n }\n };\n }\n\n ngOnInit(): void {\n this.showDescription$ = this.titleService.showDescription$;\n this.showSettings$ = this.settingsService.showSettings$;\n }\n\n openLinkDialog(link: string, title: string, text: string): void {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n config.data = new InfoDialogData(title, text, true, true, link);\n\n this.dialogService.openDialog(InfoDialogComponent, config);\n }\n}\n","
\n \n \n \n\n \n \n
\n\n \n \n \"Egon\n egon.io\n version:\n {{ version }}\n by \"WPS\n WPS\n \n \n\n","import { ApplicationRef, DoBootstrap, NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport {\n MAT_CHECKBOX_DEFAULT_OPTIONS,\n MatCheckboxDefaultOptions,\n} from '@angular/material/checkbox';\n\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { HeaderComponent } from 'src/app/Presentation/Header/header.component';\nimport { SettingsComponent } from 'src/app/Presentation/Settings/settings.component';\nimport { AppComponent } from 'src/app/app.component';\nimport { ExportService } from 'src/app/Service/Export/export.service';\nimport { ImportDomainStoryService } from 'src/app/Service/Import/import-domain-story.service';\nimport { ImportRepairService } from 'src/app/Service/Import/import-repair.service';\nimport { ModelerService } from 'src/app/Service/Modeler/modeler.service';\nimport { TitleService } from 'src/app/Service/Title/title.service';\nimport { LabelDictionaryService } from 'src/app/Service/LabelDictionary/label-dictionary.service';\nimport { ReplayService } from 'src/app/Service/Replay/replay.service';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { DomainConfigurationService } from 'src/app/Service/DomainConfiguration/domain-configuration.service';\nimport { MassNamingService } from 'src/app/Service/LabelDictionary/mass-naming.service';\nimport { InfoDialogComponent } from 'src/app/Presentation/Dialog/info-dialog/info-dialog.component';\nimport { ExportDialogComponent } from 'src/app/Presentation/Dialog/export-dialog/export-dialog.component';\nimport { ActivityDialogComponent } from 'src/app/Presentation/Dialog/activity-dialog/activity-dialog.component';\nimport { UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms';\nimport { HeaderDialogComponent } from 'src/app/Presentation/Dialog/header-dialog/header-dialog.component';\nimport { IconDictionaryService } from 'src/app/Service/DomainConfiguration/icon-dictionary.service';\nimport { ModelerComponent } from 'src/app/Presentation/Canvas/modeler.component';\nimport { SettingsModule } from 'src/app/Modules/settings.module';\nimport { AutosaveService } from './Service/Autosave/autosave.service';\nimport { DomainStoryModelerModuleModule } from './Modules/domain-story-modeler-module.module';\nimport { LabelDictionaryDialogComponent } from './Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component';\nimport { MaterialModule } from './material.module';\n\n@NgModule({\n declarations: [\n HeaderComponent,\n SettingsComponent,\n AppComponent,\n InfoDialogComponent,\n ExportDialogComponent,\n ActivityDialogComponent,\n HeaderDialogComponent,\n ModelerComponent,\n LabelDictionaryDialogComponent,\n ],\n imports: [\n BrowserModule,\n NoopAnimationsModule,\n ReactiveFormsModule,\n SettingsModule,\n DomainStoryModelerModuleModule,\n MaterialModule,\n ],\n providers: [\n AutosaveService,\n ExportService,\n ImportDomainStoryService,\n ImportRepairService,\n IconDictionaryService,\n TitleService,\n LabelDictionaryService,\n ReplayService,\n ElementRegistryService,\n DomainConfigurationService,\n ModelerService,\n MassNamingService,\n UntypedFormBuilder,\n {\n provide: MAT_CHECKBOX_DEFAULT_OPTIONS,\n useValue: { clickAction: 'noop' } as MatCheckboxDefaultOptions,\n },\n ],\n})\nexport class AppModule implements DoBootstrap {\n constructor(private autosaveService: AutosaveService) {\n // autosaveService wird so automatisch initialisiert, auf keinen Fall entfernen!\n }\n\n ngDoBootstrap(app: ApplicationRef): void {\n const componentElement = document.createElement('app-root');\n document.body.append(componentElement);\n app.bootstrap(AppComponent);\n }\n}\n","import { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { NgModule } from '@angular/core';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatGridListModule } from '@angular/material/grid-list';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { MatListModule } from '@angular/material/list';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\n@NgModule({\n imports: [\n MatButtonModule,\n MatButtonToggleModule,\n MatListModule,\n MatCheckboxModule,\n MatDialogModule,\n MatFormFieldModule,\n MatGridListModule,\n MatInputModule,\n MatToolbarModule,\n MatExpansionModule,\n MatSnackBarModule,\n MatCardModule,\n ],\n exports: [\n MatButtonModule,\n MatButtonToggleModule,\n MatListModule,\n MatCheckboxModule,\n MatDialogModule,\n MatFormFieldModule,\n MatGridListModule,\n MatInputModule,\n MatToolbarModule,\n MatExpansionModule,\n MatSnackBarModule,\n MatCardModule,\n ],\n})\nexport class MaterialModule {}\n","// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.\n// The list of file replacements can be found in `angular.json`.\n\nexport const environment = {\n production: false,\n version: 'dev',\n};\n\n/*\n * For easier debugging in development mode, you can import the following file\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\n *\n * This import should be commented out in production mode because it will have a negative impact\n * on performance if an error is thrown.\n */\n// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.\n","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic()\n .bootstrapModule(AppModule)\n .catch((err) => console.error(err));\n"],"names":["Modeler","ResizeModule","assign","isArray","inherits","DomainStoryModule","LabelEditingModule","ModelingModule","elementTypes","DomainStoryModeler","options","call","_customElements","_groupElements","prototype","_modules","concat","_addCustomShape","customElement","parentId","parent","children","push","canvas","get","elementFactory","customAttrs","businessObject","customShape","create","isGroup","id","parentShape","addShape","_addCustomConnection","elementRegistry","connection","source","target","addConnection","importCustomElements","elements","fire","addCustomElements","customElements","Error","shapes","connections","groups","forEach","isConnection","getCustomElements","createDiagram","done","element","type","ACTIVITY","CONNECTION","GROUP","Replace","modeling","_modeling","replaceElement","oldElement","newElementData","newElement","setCenterOfElement","outgoingActivities","outgoing","incomingActivities","incoming","x","Math","ceil","width","y","height","name","replaceShape","replaceOptions","ReplaceMenuProvider","_dsReplace","$inject","getEntries","entries","includes","actorReplaceOptions","workObjectReplaceOptions","_createEntries","menuEntries","self","definition","entry","_createMenuEntry","action","replaceAction","label","className","actionName","getNameFromType","iconDictionaryService","initializeReplaceOptions","iconDictionary","actorTypes","getTypeDictionary","ACTOR","replaceOption","i","keysArray","actorType","typeName","toLowerCase","getIconForBPMN","workObjectTypes","WORKOBJECT","workObjectType","ContextPadProvider","bind","generateAutomaticNumber","getAllStandardIconKeys","dirtyFlagService","initializeContextPadProvider","dirtyFlag","DomainStoryContextPadProvider","injector","connect","translate","contextPad","popupMenu","replaceMenuProvider","commandStack","eventBus","startConnect","selectedElement","invoke","autoPlace","cached","getContextPadEntries","colorPicker","document","getElementById","onchange","ev","context","newColor","value","execute","makeDirty","registerProvider","allStandardIconKeys","actions","event","autoActivate","start","replace","addColorChange","addConnectWithActivity","addTextAnnotation","addActors","appendAction","addWorkObjects","addChangeWorkObjectTypeMenu","addChangeActorTypeMenu","delete","deleteGroup","group","title","click","removeGroup","moveDeleteActionToEndOfArray","removeElements","changeDirection","position","getReplaceMenuPosition","cursor","open","colorChange","TEXTANNOTATION","dragstart","icon","newNumber","Y_OFFSET","diagramContainer","getContainer","pad","getPad","html","diagramRect","getBoundingClientRect","padRect","top","left","appendStart","shape","createShape","hints","BpmnElementFactory","DEFAULT_LABEL_SIZE","DomainStoryIdFactory","DomainStoryElementFactory","bpmnFactory","moddle","domainStoryIdFactory","elementType","attrs","baseCreate","test","registerId","getId","key","set","$type","di","$descriptor","_getCustomElementSize","Object","defineProperty","createBpmnElement","__default","Dimensions","idList","generateId","idNumber","fourDigitsId","idSuffix","containsId","floor","random","same","BaseRenderer","Ids","getAnnotationBoxHeight","componentsToPath","createLine","append","svgAppend","attr","svgAttr","classes","svgClasses","svgCreate","query","domQuery","isObject","getNumberStash","addNumberToRegistry","numberBoxDefinitions","calculateTextWidth","countLines","labelPosition","angleBetween","RENDERER_IDS","numbers","DEFAULT_COLOR","initializeRenderer","elementRegistryService","DomainStoryRenderer","styles","textRenderer","pathMap","rendererId","next","markers","computeStyle","generateActivityNumber","parentGfx","box","numberStash","semantic","use","number","newRenderedNumber","renderNumber","numberStyle","fitBox","style","getExternalStyle","fill","backgroundBoxStyle","fontSize","fontFamily","backgroundDotStyle","renderEmbeddedLabel","align","padding","renderLabel","renderExternalLabel","waypoints","lines","startPoint","selected","endPoint","angle","alignment","boxWidth","xStart","abs","textAlign","length","wordWrap","overflowWrap","hyphens","renderExternalNumber","String","text","createText","add","setCoordinates","drawCircle","textLength","circle","cx","cy","r","innerHTML","manipulateInnerHTMLXLabel","manipulateInnerHTMLYLabel","firstChild","attributes","nodeValue","offset","result","outerHTML","Number","drawGroup","pickedColor","rect","drawRect","stroke","useColorForElement","iconSRC","match","index","indexOf","substring","getIconSrc","startsWith","drawActor","svgDynamicSizeAttributes","actor","getTypeIconSRC","drawWorkObject","workObject","useColorForActivity","strokeWidth","strokeLinejoin","markerEnd","marker","drawActivity","p","adjustForTextOverlap","fixConnectionInHTML","parentElement","checkIfPointOverlapsText","point","lineOffset","getLineOffset","objects","getElementsByClassName","data_id","item","getAttribute","object","getElementsByTagName","tspans","tspan","wantedConnection","polylines","setAttribute","drawDSConnection","strokeDasharray","drawAnnotation","textElement","textPathData","getScaledPath","xScaleFactor","yScaleFactor","containerWidth","containerHeight","mx","my","drawPath","d","path","rx","ry","createMarker","sequenceflowEnd","addMarker","ref","scale","strokeLinecap","viewBox","refX","refY","markerWidth","markerHeight","orient","defs","_svg","getWorkObjectPath","rectangle","getRectPath","getGroupPath","getActivityPath","map","original","activityPath","waypoint","getActorPath","canRender","drawShape","search","pos","correctInitialize","getShapePath","drawConnection","every","reduce","RuleProvider","is","HIGH_PRIORITY","MIN_SIZE","isDomainStory","isDomainStoryGroup","isActor","isWorkObject","isActivity","isAnnotation","canConnect","canResize","newBounds","lowerLeft","lowerRight","upperRight","canAttach","Array","canConnectToAnnotation","DomainStoryRules","init","canCreate","addRule","host","s","undefined","hover","pick","CommandInterceptor","collectionAdd","remove","collectionRemove","reworkGroupElements","DomainStoryUpdater","bpmnjs","updateCustomElement","e","DOMAINSTORY","updateCustomConnection","newTarget","newSource","copyWaypoints","executed","ifDomainStoryElement","reverted","fn","DomainStoryPalette","ElementFactory","CreateModule","PathMap","PopupMenuModule","ContextPadModule","CommandStack","UpdateLabelHandler","headlineAndDescriptionUpdateHandler","DSModeling","__depends__","__init__","domainStoryRenderer","paletteProvider","domainStoryRules","domainStoryUpdater","contextPadProvider","elementFactoryBpmn","updateLabelHandler","svgRemove","MARKER_HIDDEN","MARKER_LABEL_HIDDEN","annotationBoxHeight","DSLabelEditingPreview","defaultLayer","getDefaultLayer","absoluteElementBBox","gfx","on","activeProvider","active","getAbsoluteBBox","getStrokeColor","labelTarget","dy","newElementHeight","max","removeMarker","autocomplete","getLabel","isAny","getExternalLabelMid","hasExternalLabel","isLabel","isLabelExternal","dictionaryService","stashUse","initializeLabelEditingProvider","labelingDictionary","toggleStashUse","focusElement","setTimeout","focus","DSLabelEditingProvider","directEditing","resizeHandles","_canvas","_textRenderer","_updateLabelHandler","activateDirectEdit","complete","isActive","cancel","removeResizers","createAutocomplete","canExecute","isTouch","editingBox","force","activate","getUniqueWorkObjectNames","bounds","getEditingBBox","autoResize","resizable","bbox","mid","zoom","defaultStyle","getDefaultStyle","externalStyle","externalFontSize","externalLineHeight","lineHeight","defaultFontSize","defaultLineHeight","fontWeight","minWidth","maxWidth","minHeight","paddingTop","paddingBottom","paddingLeft","paddingRight","externalLabelMid","absoluteBBox","update","newLabel","activeContextText","updateLabel","getLabelAttr","getNumberAttr","getNumber","setLabel","setNumber","textNumber","selectPartOfActivity","angleActivity","selectedActivity","linelength","fontsize","input","workObjectNames","closeAllLists","currentFocus","filteredWorkObjectNames","addEventListener","autocompleteList","autocompleteItem","val","createElement","parentNode","appendChild","toUpperCase","visibility","onkeydown","keyCode","addActive","preventDefault","removeActive","classList","survivor","removeChild","ChangeSupportModule","DirectEditingModule","dSlabelEditingProvider","dSlabelEditingPreview","str","split","amountWaypoints","determinedPosition","xPos","yPos","labelPositionX","labelPositionY","offsetX","scaledAngle","offsetY","Modeling","_commandStack","updateNumber","oldShape","newShape","newData","numberRegistry","multipleNumberRegistry","canvasElementRegistry","initializeNumbering","canvasElementRegistryService","boxHeight","elementActivity","usedNumbers","wantedNumber","activitiesFromActors","getActivitiesFromActors","updateExistingNumbersAtGeneration","updateExistingNumbersAtEditing","sortedActivities","activity","currentNumber","setNumberOfActivity","getNumbersAndIDs","iDWithNumber","activities","renderedNumber","setNumberIsMultiple","multi","getNumberRegistry","slice","getMultipleNumberRegistry","elementArray","overrideAppendedIcons","Dictionary","APPENDED_ICONS_TAG","configuration","initializePalette","configurationService","PaletteProvider","palette","spaceTool","lassoTool","_create","_elementFactory","_spaceTool","_lassoTool","getPaletteEntries","createAction","createListener","isExpanded","shortType","initPalette","appendCSSStyleCheat","customIcons","sheetEl","head","customIconDict","appendDict","customIconDictKeys","getAppendedIconDictionary","has","src","iconStyle","wrapSRCInSVG","sheet","insertRule","cssRules","config","getCurrentIconConfigurationForBPMN","localStorage","getItem","JSON","parse","customIconsLegacy","convertLegacyAppendedIconsToDict","customIconsDict","putEntry","initTypeDictionaries","actors","workObjects","addCanvasObjectTypes","separator","activateSelection","keys","dict","initializeActivityUpdateHandler","activityUpdateHandler","registerHandler","activity_directionChange","activity_changed","preExecute","oldLabel","oldNumbersWithIDs","oldNumber","revert","revertAutomaticNumberGenerationChange","oldWaypoints","swapSource","newWaypoints","getActivitesFromActors","j","splice","undoGroupRework","elementUpdateHandler","element_colorChange","removeGroupWithoutChildren","oldColor","ctx","child","titleService","handlerFunction","oldTitle","getTitle","oldDescription","getDescription","updateTitleAndDescription","newTitle","newDescription","DSMassRenameHandler","massRename","relevantElements","confirm","newValue","getBusinessObject","NULL_DIMENSIONS","labelCenter","createLabel","setText","postExecute","trim","removeShape","bo","getLayoutedBounds","resizeShape","numberTarget","some","$instanceOf","types","t","innerShape","superParent","svgShape","querySelector","svgGroup","svgGroupParent","SVG_LINK","TEXTSPAN_DESCRIPTION_HEIGHT","TEXTSPAN_TITLE_HEIGHT","X_OFFSET_UTIL","extraHeight","createTitleAndDescriptionSVGElement","description","xLeft","yUp","titleElement","createTitle","descriptionElement","createDescription","insertText","tempCanvas","getContext","font","createTextSpans","descriptionParts","yOffset","heightOffset","textSpans","words","textTag","textSpan","createElementNS","textNode","createTextNode","data","len","measureText","testBusinessObject","Configuration","constructor","INITIAL_TITLE","INITIAL_DESCRIPTION","INITIAL_DOMAIN_NAME","DOMAIN_CONFIGURATION_TAG","DEFAULT_AUTOSAVES_ENABLED","DEFAULT_AUTOSAVES_MAX_DRAFTS","DEFAULT_AUTOSAVES_INTERVAL","SNACKBAR_DURATION","SNACKBAR_SUCCESS","SNACKBAR_ERROR","SNACKBAR_INFO","IMPLICIT_ROOT_ID","all","size","isEmpty","Entry","addEach","clear","filter","found","sort","sortByName","a","b","structuredClone","testCustomDomainConfiguration","fromConfigurationFromFile","configFromFile","actorsDict","workObjectsDict","IconConfiguration","allIconDictionary","domainName","getDefaultConf","defaultConf","updateAllIconRegistry","appendSRCFile","newAppendedIcons","appen","createCustomConf","domainConfiguration","allIconsConf","ActivityDialogData","numberIsAllowedMultipleTimes","showNumberFields","saveFN","ExportDialogData","ExportOption","tooltip","InfoDialogData","infoText","isInfo","isLink","linkText","NUMBER_BACKGROUND_COLOR","NUMBER_COLOR","STROKE_WIDTH","HIGHLIGHT_NUMBER_BACKGROUNG_COLOR","HIGHLIGHT_NUMBER_COLOR","HIGHLIGHT_COLOR","HIGHLIGHT_STROKE_WIDTH","appendedIcons","allIcons","Person","Group","Pet","Conversation","World","Store","Theater","Business","Water","Hotel","Dining","Courthouse","Flag","Place","Car","Bus","Train","Truck","Taxi","Bike","Boat","Motorcycle","Plane","Shuttle","Walking","Traffic","Commute","System","Printer","Document","Folder","Call","Email","Copyright","DNS","Settings","Cellphone","Update","Briefcase","Microphone","Signal","Key","Pencil","Sum","Headset","Keyboard","Mouse","Router","Scanner","Security","Desktop","Tablet","Label","Receipt","Calendar","Cloud","Assessment","Dashboard","Problem","Grid","Watch","Euro","Dollar","Info","Alarm","Wrench","Favorite","Gavel","Blind","Hourglass","Time","Search","Shopping","Couch","Attach","Ruler","Education","allIconsDict","newIcons","IconFilterEnum","ConfigAndDST","domain","dst","testConfigAndDst","CommonModule","AutosaveSettingsComponent","AutosaveOptionsComponent","AutosavedDraftsComponent","FormsModule","MaterialModule","AutosaveSettingsModule","_","_2","_3","declarations","imports","exports","HeaderButtonsComponent","DomainStoryModelerModuleModule","DomainConfigurationComponent","IconListItemComponent","DetailsListItemComponent","DomainDetailsComponent","GeneralSettingsComponent","LabelDictionaryComponent","SettingsModule","i0","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵelement","ɵɵlistener","AutosaveOptionsComponent_mat_card_0_Template_button_click_20_listener","ɵɵrestoreView","_r6","_r2","ɵɵreference","_r4","_r3","ctx_r5","ɵɵnextContext","ɵɵresetView","save","checked","ɵɵadvance","ɵɵproperty","configuration_r1","activated","interval","maxDrafts","autosaveConfiguration","snackbar","setConfiguration","duration","panelClass","ɵɵdirectiveInject","i1","AutosaveConfigurationService","i2","MatSnackBar","selectors","decls","vars","consts","template","AutosaveOptionsComponent_Template","rf","ɵɵtemplate","AutosaveOptionsComponent_mat_card_0_Template","ɵɵpipeBind1","configuration$","AutosaveSettingsComponent_Template","AutosavedDraftsComponent_div_7_div_1_Template_button_click_6_listener","restoredCtx","draft_r4","$implicit","loadDraft","ɵɵtextInterpolate","date","AutosavedDraftsComponent_div_7_div_1_Template","AutosavedDraftsComponent_div_7_Template_button_click_4_listener","_r8","ctx_r7","removeAllDrafts","ctx_r0","drafts","autosaveService","subscription","autosavedDraftsChanged$","subscribe","initDrafts","ngOnInit","loadCurrentDrafts","draft","AutosaveService","AutosavedDraftsComponent_Template","AutosavedDraftsComponent_div_7_Template","AutosavedDraftsComponent_ng_template_8_Template","ɵɵtemplateRefExtractor","ɵɵtextInterpolate2","_r1","ModelerComponent","modelerService","postInit","loadLatestDraft","ModelerService","ModelerComponent_Template","MAT_DIALOG_DATA","ActivityDialogComponent","fb","dialogRef","activityLabel","activityNumber","form","multipleNumbers","onSubmit","patchValue","close","UntypedFormBuilder","MatDialogRef","ActivityDialogComponent_Template","ActivityDialogComponent_Template_input_change_9_listener","ActivityDialogComponent_Template_textarea_keydown_enter_14_listener","$event","ActivityDialogComponent_Template_textarea_keyup_enter_14_listener","ActivityDialogComponent_Template_textarea_keyup_escape_14_listener","ActivityDialogComponent_Template_button_click_16_listener","ActivityDialogComponent_Template_button_click_18_listener","BehaviorSubject","ExportDialogComponent_button_17_Template_button_click_0_listener","i_r2","ctx_r3","doOption","option_r1","ɵɵtextInterpolate1","ExportDialogComponent","withTitle","useWhiteBackground","updateWithTitle","updateUseWhiteBackground","ExportDialogComponent_Template","ExportDialogComponent_Template_input_change_4_listener","ExportDialogComponent_Template_input_change_9_listener","ExportDialogComponent_Template_button_click_15_listener","ExportDialogComponent_button_17_Template","HeaderDialogComponent","i3","TitleService","HeaderDialogComponent_Template","HeaderDialogComponent_Template_textarea_keydown_enter_10_listener","HeaderDialogComponent_Template_textarea_keyup_enter_10_listener","HeaderDialogComponent_Template_textarea_keyup_escape_10_listener","HeaderDialogComponent_Template_button_click_12_listener","HeaderDialogComponent_Template_button_click_14_listener","ɵɵpropertyInterpolate","ctx_r1","ɵɵsanitizeUrl","InfoDialogComponent_mat_dialog_actions_5_Template_button_click_1_listener","InfoDialogComponent","showConfirmButton","hasLink","ngAfterViewInit","span","scrollHeight","InfoDialogComponent_Template","InfoDialogComponent_span_3_Template","InfoDialogComponent_a_4_Template","InfoDialogComponent_mat_dialog_actions_5_Template","LabelDictionaryDialogComponent","LabelDictionaryDialogComponent_Template","LabelDictionaryDialogComponent_Template_app_label_dictionary_closeEmitter_3_listener","iconInitiated","ngAfterViewChecked","createIcon","img","svg","inputs","DetailsListItemComponent_Template","sanitizeIconName","iconName_r1","domainCustomizationService","ICON_FILTER_NONE","selectedActors","selectedWorkobjects","allIconNames","allFilteredIconNames","domainConfigurationTypes","getDomainConfiguration","getFullDictionary","selectedActors$","selectedWorkobjects$","allFiltered","getFilteredNamesForType","loadMinimalIconConfigurationWithDefaultIcons","resetDomain","loadInitialConfiguration","saveDomain","getUsedIcons","exportDomain","startIconUpload","importIcon","files","iconInputFile","reader","FileReader","iconName","onloadend","addIMGToIconDictionary","registerIconForBPMN","addNewIcon","readAsDataURL","startDomainImport","importDomain","domainInputFile","loadConfiguration","importConfiguration","readAsText","filterForActors","ICON_FILTER_ACTOR","filterForWorkobjects","ICON_FILTER_WORKOBJECT","filterForUnassigned","ICON_FILTER_UNASSIGNED","filterByNameAndType","filteredByNameAndType","isIconActor","isIconWorkObject","DomainConfigurationService","IconDictionaryService","DomainCustomizationService","i4","ElementRegistryService","DomainConfigurationComponent_Template","DomainConfigurationComponent_Template_button_click_4_listener","DomainConfigurationComponent_Template_input_change_7_listener","DomainConfigurationComponent_Template_button_click_8_listener","DomainConfigurationComponent_Template_button_click_15_listener","DomainConfigurationComponent_Template_button_click_20_listener","DomainConfigurationComponent_Template_button_click_25_listener","DomainConfigurationComponent_Template_input_input_30_listener","DomainConfigurationComponent_Template_button_click_32_listener","DomainConfigurationComponent_Template_button_click_35_listener","DomainConfigurationComponent_Template_input_change_38_listener","DomainConfigurationComponent_Template_button_click_40_listener","DomainConfigurationComponent_Template_button_click_43_listener","DomainConfigurationComponent_mat_grid_tile_50_Template","ɵɵclassProp","DomainDetailsComponent_mat_list_item_12_Template_mat_list_item_dragover_0_listener","_r5","ctx_r4","allowDrop","DomainDetailsComponent_mat_list_item_12_Template_mat_list_item_dragstart_0_listener","i_r3","ctx_r6","onDragStart","DomainDetailsComponent_mat_list_item_12_Template_mat_list_item_drop_0_listener","iconName_r2","onDrop","getIconForName","DomainDetailsComponent_mat_list_item_18_Template_mat_list_item_dragover_0_listener","_r11","ctx_r10","DomainDetailsComponent_mat_list_item_18_Template_mat_list_item_dragstart_0_listener","i_r9","ctx_r12","DomainDetailsComponent_mat_list_item_18_Template_mat_list_item_drop_0_listener","iconName_r8","ctx_r13","customizationService","draggedList","draggedIndex","domainName$","changeName","listName","list","sortedList","setSelectedActors","setSelectedWorkObject","DomainDetailsComponent_Template","DomainDetailsComponent_Template_input_input_6_listener","DomainDetailsComponent_mat_list_item_12_Template","DomainDetailsComponent_mat_list_item_18_Template","isWorkobject","isNone","toggleNone","setAsUnassigned","toggleActor","setAsActor","toggleWorkobject","setAsWorkobject","IconListItemComponent_Template","IconListItemComponent_Template_mat_button_toggle_change_7_listener","IconListItemComponent_Template_mat_button_toggle_change_10_listener","IconListItemComponent_Template_mat_button_toggle_change_13_listener","MatDialogConfig","HeaderButtonsComponent_div_0_Template_button_click_1_listener","startReplay","HeaderButtonsComponent_div_0_Template_input_change_7_listener","import","HeaderButtonsComponent_div_0_Template_button_click_8_listener","openDownloadDialog","HeaderButtonsComponent_div_0_span_9_Template","HeaderButtonsComponent_div_0_span_11_Template","HeaderButtonsComponent_div_0_Template_button_click_13_listener","ctx_r8","openLabelDictionary","HeaderButtonsComponent_div_0_Template_button_click_16_listener","ctx_r9","openSettings","HeaderButtonsComponent_div_0_Template_button_click_19_listener","openKeyboardShortcutsDialog","HeaderButtonsComponent_div_0_Template_button_click_22_listener","ctx_r11","createNewDomainStory","isDirty$","HeaderButtonsComponent_div_2_Template_button_click_1_listener","_r13","previousStep","HeaderButtonsComponent_div_2_Template_button_click_4_listener","ctx_r14","nextStep","HeaderButtonsComponent_div_2_Template_button_click_7_listener","ctx_r15","stopReplay","settingsService","replayStateService","dialogService","replayService","exportService","importService","renderService","isReplay$","replayOn$","dirty$","filename","endsWith","importDST","importEGN","commandStackChanged","isDomainStoryExportable","SVGDownloadOption","downloadSVG","EGNDownloadOption","downloadDST","PNGDownloadOption","downloadPNG","HTMLDownloadOption","downloadHTMLPresentation","disableClose","autoFocus","openDialog","shortCutText","reset","SettingsService","ReplayStateService","DirtyFlagService","i5","DialogService","i6","ReplayService","i7","ExportService","i8","ImportDomainStoryService","i9","i10","RendererService","i11","HeaderButtonsComponent_Template","HeaderButtonsComponent_div_0_Template","HeaderButtonsComponent_div_2_Template","combineLatest","HeaderComponent_button_2_Template_button_click_0_listener","setShowDescription","HeaderComponent_button_4_Template_button_click_0_listener","_r7","ctx_r2","stepDescription$","description$","HeaderComponent","title$","showDescription$","currentStep$","maxStepNumber$","pipe","step","count","showDescription","openHeaderDialog","show","HeaderComponent_Template","HeaderComponent_button_2_Template","HeaderComponent_button_4_Template","HeaderComponent_Template_span_click_7_listener","HeaderComponent_span_13_Template","HeaderComponent_mat_card_17_Template","EventEmitter","LabelDictionaryComponent_mat_list_item_5_Template_input_change_2_listener","workobjectEntry_r2","updateWorkobjectEntry","LabelDictionaryComponent_mat_list_item_11_Template_textarea_change_2_listener","activityEntry_r5","updateActivityEntry","LabelDictionaryComponent_mat_list_item_11_Template_textarea_keydown_enter_2_listener","LabelDictionaryComponent_mat_list_item_11_Template_textarea_keyup_enter_2_listener","LabelDictionaryComponent_mat_list_item_11_Template_textarea_keyup_escape_2_listener","labelDictionaryService","closeEmitter","createLabelDictionaries","workObjectEntries","getWorkObjectLabels","activityEntries","getActivityLabels","workobjectEntriesSubject","activityEntriesSubject","activityNames","originalActivityNames","originalWorkObjectNames","originalName","w","workobject","massRenameLabels","emit","activityEntry","workobjectEntry","LabelDictionaryService","outputs","LabelDictionaryComponent_Template","LabelDictionaryComponent_mat_list_item_5_Template","LabelDictionaryComponent_mat_list_item_11_Template","LabelDictionaryComponent_Template_button_click_14_listener","LabelDictionaryComponent_Template_button_click_16_listener","GeneralSettingsComponent_Template","SettingsComponent","showGeneralSettings","showDomainCustomization","savedConfiguration","getAndClearSavedConfiguration","restart","openGeneralSettings","openDomainCustomization","SettingsComponent_Template","SettingsComponent_Template_button_click_3_listener","SettingsComponent_Template_button_click_7_listener","SettingsComponent_Template_button_click_11_listener","SettingsComponent_app_general_settings_15_Template","SettingsComponent_app_domain_configuration_17_Template","ReplaySubject","AUTOSAVE_CONFIGURATION_TAG","defaultConfiguration","storageService","configurationSubject","asObservable","initializeConfiguration","saveConfiguration","ɵɵinject","StorageService","factory","ɵfac","providedIn","Subject","DRAFTS_TAG","rendererService","updateConfiguration","readDrafts","sortDrafts","configAndDST","story","actorIcons","getElementsOfType","workObjectIcons","updateIconRegistries","importStory","stopTimer","startTimer","autosaveTimer","clearInterval","setInterval","savedDrafts","newDraft","createDraft","isChanged","isSame","isDraftEmpty","unshift","pop","writeDrafts","stringify","getStory","createConfigAndDST","Date","toString","aDate","bDate","setItem","json","removeItem","checkValidityOfConfiguration","configuratioFromFile","getStoredDomainConfiguration","domainString","setStoredDomainConfiguration","configForStorage","CommandStackService","setCommandStack","payload","matDialog","dialog","MatDialog","isDirtySubject","makeClean","dirty","DomManipulationService","showAll","removeHighlights","getAllCanvasObjects","getAllGroups","domObject","display","showStep","replayStep","notShown","getAllNotShown","hightlightStep","o","getNumberDomForActivity","numberDOMS","numberBackgroundDom","numberTextDom","allActivities","getAllActivities","allConnections","getAllConnections","activityDomObject","connectionDomObject","stepObjects","shownElements","notShownElements","allObjects","setDomainName","exportConfiguration","getCurrentConfigurationForExport","configJSONString","getDomainName","encodeURIComponent","body","customConfig","updateDomainName","actorDict","workObjectDict","actorKeys","workObjectKeys","getIconConfiguration","addIconsFromDomainConfiguration","configurationName","getCurrentConfiguration","getActorsDictionary","getWorkObjectsDictionary","createConfigFromDictionaries","currentConfiguration","getCurrentConfigurationNamesWithoutPrefix","createMinimalConfigurationWithDefaultIcons","minimalConfig","createConfigFromCanvas","getIconSource","actorNames","workobjectNames","newActors","newWorkobjects","allCanvasObjects","allIconListItems","configurationHasChanged","getAllIconDictionary","addIconToAllIconList","importedConfigurationEvent","storedDomainConfiguration","importedConfiguration","getImportedConfiguration","selectedActorNames","selectActor","selectedWorkobjectNames","selectWorkObject","changedDomain","deselectActor","deselectWorkobject","updateIcon","updateActorSubject","updateWorkObjectSubject","defaultConfig","workObjectName","actorName","updateAllIconBehaviourSubjects","resetToInitialConfiguration","usedIcons","imported","changedActors","changedWorkobjects","createDomainConfiguration","configurationActors","configurationWorkobjects","workobjects","changedDomainCofiguration","updateIcons","join","temp","iconDict","getSrcForIcon","addIconsToCss","iconBehaviourSubject","customDomainCofiguration","rawSrc","ICON_PREFIX","actorIconDictionary","workObjectDictionary","iconDictionaryForBPMN","iconConfig","allTypes","initDictionary","dictionary","namePrefix","customConfiguration","allInTypeDictionary","collection","allIn","dictionaryType","iconTypes","registerIconForType","addIconsToTypeDictionary","extractCustomIconsFromDictionary","addNewIconsToDictionary","elementDictionary","sanitizedName","custom","fullDictionary","appendedDict","getTypeDictionaryKeys","elementOfType","setCusomtConfiguration","fullyInitialized","registry","__implicitroot","setElementRegistry","_elements","createObjectListForDSTDownload","allObjectsFromCanvas","objectList","fillListOfCanvasObjects","canvasElement","groupObjects","checkChildForGroup","currentGroup","registryElementNames","getAllActors","getAllWorkobjects","co","sanitizeForDesktop","formatDate","environment","pngService","svgService","htmlPresentationService","titleSubscription","descriptionSubscription","ngOnDestroy","unsubscribe","DomainStory","getStoryForDownload","getCurrentDateString","downloadFile","datatype","fileEnding","svgData","createSVGData","container","svgElements","outerSVGElement","viewport","layerBase","image","extractSVG","prepareSVG","onload","getWidth","getHeight","fillStyle","drawImage","png64","toDataURL","ele","then","info","version","PngService","SvgService","HtmlPresentationService","doT","setModelerClasses","selection","modeler","viewBoxCoordinates","ViewBoxCoordinate","_this","_asyncToGenerator","saveSVG","fixActivityMarkersForEachStep","getCurrentStepNumber","content","transition","err","alert","getMaxStepNumber","revealjsTemplate","dots","revealjsData","script","sentences","multiplexSecret","multiplexId","fixMalformedHtmlScript","viewBoxIndex","splitViewBox","dataStart","dataEnd","createBounds","sectionIndex","newDefs","ids","idToReplace","newId","replaceAll","browserSpecs","ua","navigator","userAgent","tem","M","exec","appName","appVersion","URIHashtagFix","fix","browser","parseInt","findMostOuterElements","xRight","yDown","sub","elXLeft","elXRight","elYUp","elYDown","transform","nums","rects","outerRect","calculateWidthAndHeight","insertIndex","layerResizers","layerOverlays","removeAttribute","XMLSerializer","serializeToString","cacheData","getEncoded","findIndexToInsertData","svgIndex","backgroundColorWhite","appendDST","restoreTitleFromFileName","importRepairService","domainConfigurationService","importedConfigurationEmitter","isSVG","fileReader","titleText","fileReaderFunction","isEGN","dstText","removeXMLComments","dstAndConfig","extractDstAndConfig","configChanged","checkConfigForChanges","lastElement","importVersionNumber","handleVersionNumber","checkForUnreferencedElementsInActivitiesAndRepair","showBrokenImportDialog","adjustPositions","versionPrefix","lastIndexOf","updateCustomElementsPreviousV050","showPreviousV050Dialog","xmlText","newActorKeys","newWorkObjectKeys","currentActorKeys","currentWorkobjectKeys","changed","clearName","setImportedConfigurationAndEmit","ImportRepairService","objectIDs","activityIndex","isFirst","findFirstElement","adjustElementPosition","massNamingService","activityLabels","workObjektLabels","localeCompare","Set","massChangeNames","MassNamingService","commandStackService","oldValue","allRelevantObjects","massRenameHandler","positionsMatch","InitializerService","initializeDomainStoryModelerClasses","propagateDomainStoryModelerClassesToServices","initializeDomainStoryModelerEventHandlers","initiateEventBusListeners","getReplayOn","activityDoubleClick","renderedNumberRegistry","htmlCanvas","transformX","transformY","zoomX","zoomY","clickX","originalEvent","clickY","parseFloat","currentNum","tx","ty","tNumber","elementX","elementY","stopPropagation","saveActivityInputLabel","activityData","hasNumber","multipleNumberAllowed","initializerService","keyboard","bindTo","additionalModules","bpmnSearch","exportArtifacts","debounce","window","startDebounce","domainStory","currentStory","destroy","getModeler","timeout","timer","clearTimeout","encoded","renderStory","configurationChange","c","replayOnSubject","setReplayState","state","domManipulationService","storyCreatorService","currentStep","maxStepNumber","initializeReplay","traceActivitiesAndCreateStory","showCurrentStep","missingSteps","getMissingSteps","getValue","steps","StoryCreatorService","tracedActivityMap","tracedItem","createStep","addGroupStep","getStepObjects","highlightedElements","highlightedObjects","tracedActivity","initialSource","targetObjects","parallelStep","firstTarget","checkTarget","activityTarget","g","showSettings","showSettings$","titleSubject","descriptionSubject","domainNameSubject","showDescriptionSubject","allowUndo","fireTitleAndDescriptionUpdate","updateTitle","updateDescription","getVersion","degrees","radians","PI","quadrant","adjacent","opposite","atan2","Point","reg","domainStoryRegex","svgRegex","egnSuffix","dstSuffix","svgSuffix","filenameWithoutDateSuffix","AppComponent","replayStateSerice","ctrlKey","openLinkDialog","link","AppComponent_Template","AppComponent_app_settings_1_Template","BrowserModule","MAT_CHECKBOX_DEFAULT_OPTIONS","NoopAnimationsModule","ReactiveFormsModule","AppModule","ngDoBootstrap","app","componentElement","bootstrap","provide","useValue","clickAction","MatDialogModule","MatFormFieldModule","MatInputModule","MatToolbarModule","MatExpansionModule","MatCardModule","MatSnackBarModule","MatButtonModule","MatGridListModule","MatButtonToggleModule","MatListModule","MatCheckboxModule","production","enableProdMode","__NgCli_bootstrap_1","platformBrowser","bootstrapModule","catch","console","error"],"sourceRoot":"webpack:///","x_google_ignoreList":[]} \ No newline at end of file +{"version":3,"file":"main.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAA0C;AACgB;AACf;AACX;AAEU;AACU;AACJ;AACa;AAE/C,SAAUS,kBAAkBA,CAACC,OAAO;EAChDV,2DAAO,CAACW,IAAI,CAAC,IAAI,EAAED,OAAO,CAAC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+C;AAGF;AACY;AAEzD,IAAIlC,kEAAW,CAACyS,UAAU,EAAE;EAC1BC,6DAAc,EAAE;;AAGlBC,sEAAA,EAAwB,CACrBE,eAAe,CAACxB,sDAAS,CAAC,CAC1ByB,KAAK,CAAE3P,GAAG,IAAK4P,OAAO,CAACC,KAAK,CAAC7P,GAAG,CAAC,CAAC","sources":["./src/app/Modeler/index.js","./src/app/Modeler/modeler/change-icon/replace.js","./src/app/Modeler/modeler/change-icon/replaceMenuProvider.js","./src/app/Modeler/modeler/change-icon/replaceOptions.js","./src/app/Modeler/modeler/context-pad/domainStoryContextPadProvider.js","./src/app/Modeler/modeler/domainStoryElementFactory.js","./src/app/Modeler/modeler/domainStoryIdFactory.js","./src/app/Modeler/modeler/domainStoryRenderer.js","./src/app/Modeler/modeler/domainStoryRules.js","./src/app/Modeler/modeler/domainStoryUpdater.js","./src/app/Modeler/modeler/index.js","./src/app/Modeler/modeler/labeling/dsLabelEditingPreview.js","./src/app/Modeler/modeler/labeling/dsLabelEditingProvider.js","./src/app/Modeler/modeler/labeling/dsLabelUtil.js","./src/app/Modeler/modeler/labeling/index.js","./src/app/Modeler/modeler/labeling/position.js","./src/app/Modeler/modeler/modeling/dSModeling.js","./src/app/Modeler/modeler/modeling/index.js","./src/app/Modeler/modeler/numbering/numbering.js","./src/app/Modeler/modeler/palette/domainStoryPalette.js","./src/app/Modeler/modeler/updateHandler/activityUpdateHandlers.js","./src/app/Modeler/modeler/updateHandler/elementUpdateHandler.js","./src/app/Modeler/modeler/updateHandler/headlineAndDescriptionUpdateHandler.js","./src/app/Modeler/modeler/updateHandler/massRenameHandler.js","./src/app/Modeler/modeler/updateHandler/updateLabelHandler.js","./src/app/Modeler/modeler/util.js","./src/app/Service/Export/exportUtil.js","./src/app/Domain/Common/businessObject.ts","./src/app/Domain/Common/configuration.ts","./src/app/Domain/Common/constants.ts","./src/app/Domain/Common/dictionary/dictionary.ts","./src/app/Domain/Common/domainConfiguration.ts","./src/app/Domain/Common/elementTypes.ts","./src/app/Domain/Common/iconConfiguration.ts","./src/app/Domain/Dialog/activityDialogData.ts","./src/app/Domain/Dialog/exportDialogData.ts","./src/app/Domain/Dialog/infoDialogData.ts","./src/app/Domain/DomManipulation/replayConstants.ts","./src/app/Domain/Domain-Configuration/allIcons.ts","./src/app/Domain/Domain-Configuration/iconFilterEnum.ts","./src/app/Domain/Export/configAndDst.ts","./src/app/Domain/Export/exportConstants.ts","./src/app/Modules/autosave-settings.module.ts","./src/app/Modules/domain-story-modeler-module.module.ts","./src/app/Modules/settings.module.ts","./src/app/Presentation/Autosave/AutosaveOptions/autosave-options.component.ts","./src/app/Presentation/Autosave/AutosaveOptions/autosave-options.component.html","./src/app/Presentation/Autosave/AutosaveSettings/autosave-settings.component.ts","./src/app/Presentation/Autosave/AutosaveSettings/autosave-settings.component.html","./src/app/Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component.ts","./src/app/Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component.html","./src/app/Presentation/Canvas/modeler.component.ts","./src/app/Presentation/Canvas/modeler.component.html","./src/app/Presentation/Dialog/activity-dialog/activity-dialog.component.ts","./src/app/Presentation/Dialog/activity-dialog/activity-dialog.component.html","./src/app/Presentation/Dialog/export-dialog/export-dialog.component.ts","./src/app/Presentation/Dialog/export-dialog/export-dialog.component.html","./src/app/Presentation/Dialog/header-dialog/header-dialog.component.ts","./src/app/Presentation/Dialog/header-dialog/header-dialog.component.html","./src/app/Presentation/Dialog/info-dialog/info-dialog.component.ts","./src/app/Presentation/Dialog/info-dialog/info-dialog.component.html","./src/app/Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component.ts","./src/app/Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component.html","./src/app/Presentation/DomainConfiguration/details-list-item/details-list-item.component.ts","./src/app/Presentation/DomainConfiguration/details-list-item/details-list-item.component.html","./src/app/Presentation/DomainConfiguration/domain-configuration.component.ts","./src/app/Presentation/DomainConfiguration/domain-configuration.component.html","./src/app/Presentation/DomainConfiguration/domain-details/domain-details.component.ts","./src/app/Presentation/DomainConfiguration/domain-details/domain-details.component.html","./src/app/Presentation/DomainConfiguration/icon-list-item/icon-list-item.component.ts","./src/app/Presentation/DomainConfiguration/icon-list-item/icon-list-item.component.html","./src/app/Presentation/Header/header-buttons.component.ts","./src/app/Presentation/Header/header-buttons.component.html","./src/app/Presentation/Header/header.component.ts","./src/app/Presentation/Header/header.component.html","./src/app/Presentation/LabelDictionary/label-dictionary.component.ts","./src/app/Presentation/LabelDictionary/label-dictionary.component.html","./src/app/Presentation/Settings/General/general-settings.component.ts","./src/app/Presentation/Settings/General/general-settings.component.html","./src/app/Presentation/Settings/settings.component.ts","./src/app/Presentation/Settings/settings.component.html","./src/app/Service/Autosave/autosave-configuration.service.ts","./src/app/Service/Autosave/autosave.service.ts","./src/app/Service/BrowserStorage/storage.service.ts","./src/app/Service/CommandStack/command-stack.service.ts","./src/app/Service/Dialog/dialog.service.ts","./src/app/Service/DirtyFlag/dirty-flag.service.ts","./src/app/Service/DomManipulation/dom-manipulation.service.ts","./src/app/Service/DomainConfiguration/domain-configuration.service.ts","./src/app/Service/DomainConfiguration/domain-customization.service.ts","./src/app/Service/DomainConfiguration/icon-dictionary.service.ts","./src/app/Service/ElementRegistry/element-registry.service.ts","./src/app/Service/Export/export.service.ts","./src/app/Service/Export/html-presentation.service.ts","./src/app/Service/Export/png.service.ts","./src/app/Service/Export/svg.service.ts","./src/app/Service/Import/import-domain-story.service.ts","./src/app/Service/Import/import-repair.service.ts","./src/app/Service/LabelDictionary/label-dictionary.service.ts","./src/app/Service/LabelDictionary/mass-naming.service.ts","./src/app/Service/Modeler/initializer.service.ts","./src/app/Service/Modeler/modeler.service.ts","./src/app/Service/Renderer/renderer.service.ts","./src/app/Service/Replay/replay-state.service.ts","./src/app/Service/Replay/replay.service.ts","./src/app/Service/Replay/storyCreator/story-creator.service.ts","./src/app/Service/Settings/settings.service.ts","./src/app/Service/Title/title.service.ts","./src/app/Utils/mathExtensions.ts","./src/app/Utils/naming.ts","./src/app/Utils/sanitizer.ts","./src/app/app.component.ts","./src/app/app.component.html","./src/app/app.module.ts","./src/app/material.module.ts","./src/environments/environment.ts","./src/main.ts"],"sourcesContent":["import Modeler from \"bpmn-js/lib/Modeler\";\nimport ResizeModule from \"diagram-js/lib/features/resize\";\nimport { assign, isArray } from \"min-dash\";\nimport inherits from \"inherits\";\n\nimport DomainStoryModule from \"./modeler\";\nimport LabelEditingModule from \"./modeler/labeling\";\nimport ModelingModule from \"./modeler/modeling\";\nimport { elementTypes } from \"../Domain/Common/elementTypes\";\n\nexport default function DomainStoryModeler(options) {\n Modeler.call(this, options);\n\n this._customElements = [];\n this._groupElements = [];\n}\n\ninherits(DomainStoryModeler, Modeler);\n\nDomainStoryModeler.prototype._modules = [].concat(\n DomainStoryModeler.prototype._modules,\n [DomainStoryModule, LabelEditingModule, ModelingModule],\n [ResizeModule]\n);\n\n/**\n * add a single custom element to the underlying diagram\n *\n * @param {Object} customElement\n */\nDomainStoryModeler.prototype._addCustomShape = function (customElement) {\n let parentId = customElement.parent;\n delete customElement.children;\n delete customElement.parent;\n this._customElements.push(customElement);\n\n let canvas = this.get(\"canvas\"),\n elementFactory = this.get(\"elementFactory\");\n\n let customAttrs = assign({ businessObject: customElement }, customElement);\n let customShape = elementFactory.create(\"shape\", customAttrs);\n\n if (isGroup(customElement)) {\n this._groupElements[customElement.id] = customShape;\n }\n\n if (parentId) {\n let parentShape = this._groupElements[parentId];\n\n if (isGroup(parentShape)) {\n return canvas.addShape(customShape, parentShape, parentShape.id);\n }\n }\n return canvas.addShape(customShape);\n};\n\nDomainStoryModeler.prototype._addCustomConnection = function (customElement) {\n this._customElements.push(customElement);\n\n let canvas = this.get(\"canvas\"),\n elementFactory = this.get(\"elementFactory\"),\n elementRegistry = this.get(\"elementRegistry\");\n\n let customAttrs = assign({ businessObject: customElement }, customElement);\n\n let connection = elementFactory.create(\n \"connection\",\n assign(customAttrs, {\n source: elementRegistry.get(customElement.source),\n target: elementRegistry.get(customElement.target),\n }),\n elementRegistry.get(customElement.source).parent\n );\n\n return canvas.addConnection(connection);\n};\n\n//** We import BusinessObjects, not the whole Canvas Object!!!!!!!!\nDomainStoryModeler.prototype.importCustomElements = function (elements) {\n this.get(\"eventBus\").fire(\"diagram.clear\", {});\n this._customElements = [];\n this._groupElements = [];\n\n this.addCustomElements(elements);\n};\n\n/**\n * add a number of custom elements and connections to the underlying diagram.\n *\n * @param {Array} customElements\n */\nDomainStoryModeler.prototype.addCustomElements = function (customElements) {\n if (!isArray(customElements)) {\n throw new Error(\"argument must be an array\");\n }\n\n let shapes = [],\n connections = [],\n groups = [];\n\n customElements.forEach(function (customElement) {\n if (isConnection(customElement)) {\n connections.push(customElement);\n } else if (isGroup(customElement)) {\n groups.push(customElement);\n } else {\n shapes.push(customElement);\n }\n });\n\n // add groups before shapes and shapes before connections so that connections\n // can already rely on the shapes being part of the diagram\n groups.forEach(this._addCustomShape, this);\n shapes.forEach(this._addCustomShape, this);\n connections.forEach(this._addCustomConnection, this);\n};\n\n/**\n * get custom elements with their current status.\n *\n * @return {Array} custom elements on the diagram\n */\nDomainStoryModeler.prototype.getCustomElements = function () {\n return this._customElements;\n};\n\n// override standard function to prevent default elements on canvas\nDomainStoryModeler.prototype.createDiagram = function (done) {};\n\nfunction isConnection(element) {\n return (\n element.type === elementTypes.ACTIVITY ||\n element.type === elementTypes.CONNECTION\n );\n}\n\nfunction isGroup(element) {\n return element && element.type === elementTypes.GROUP;\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\n/**\n * service that allow replacing of elements.\n */\nexport default function Replace(modeling) {\n this._modeling = modeling;\n}\n\n/**\n * @param {Element} oldElement - element to be replaced\n * @param {Object} newElementData - containing information about the new Element, for example height, width, type.\n * @param modeling\n */\nfunction replaceElement(oldElement, newElementData, modeling) {\n // let modeling = this._modeling;\n\n let newElement = setCenterOfElement(newElementData, oldElement, modeling);\n let outgoingActivities = newElement.outgoing;\n let incomingActivities = newElement.incoming;\n\n outgoingActivities.forEach((element) => {\n element.businessObject.source = newElement.id;\n });\n\n incomingActivities.forEach((element) => {\n element.businessObject.target = newElement.id;\n });\n\n return newElement;\n}\n\nfunction setCenterOfElement(newElementData, oldElement, modeling) {\n newElementData.x = Math.ceil(\n oldElement.x + (newElementData.width || oldElement.width) / 2\n );\n newElementData.y = Math.ceil(\n oldElement.y + (newElementData.height || oldElement.height) / 2\n );\n\n assign(newElementData, { name: oldElement.businessObject.name });\n\n return modeling.replaceShape(oldElement, newElementData, {});\n}\n\nReplace.prototype.replaceElement = replaceElement;\n","\"use strict\";\n\nimport Replace from \"./replace\";\nimport * as replaceOptions from \"./replaceOptions\";\n\nimport { forEach } from \"min-dash\";\n\n/**\n * This module is an element agnostic replace menu provider for the popup menu.\n */\nexport default function ReplaceMenuProvider(modeling) {\n this._dsReplace = new Replace(modeling);\n this._modeling = modeling;\n}\n\nReplaceMenuProvider.$inject = [\"modeling\"];\n\n/**\n * Get all entries from replaceOptions for the given element and apply filters\n * on them. Get for example only elements, which are different from the current one.\n *\n * @param {djs.model.Base} element\n *\n * @return {Array} a list of menu entry items\n */\nReplaceMenuProvider.prototype.getEntries = function (element) {\n let entries;\n if (element.type.includes(\"actor\")) {\n entries = replaceOptions.actorReplaceOptions(element.type);\n } else if (element.type.includes(\"workObject\")) {\n entries = replaceOptions.workObjectReplaceOptions(element.type);\n }\n\n return this._createEntries(element, entries);\n};\n\n/**\n * Creates an array of menu entry objects for a given element and filters the replaceOptions\n * according to a filter function.\n *\n * @param {djs.model.Base} element\n * @param {Object} replaceOptions\n *\n * @return {Array} a list of menu items\n */\nReplaceMenuProvider.prototype._createEntries = function (\n element,\n replaceOptions\n) {\n let menuEntries = [];\n\n let self = this;\n\n forEach(replaceOptions, function (definition) {\n let entry = self._createMenuEntry(definition, element);\n\n menuEntries.push(entry);\n });\n\n return menuEntries;\n};\n\n/**\n * Creates and returns a single menu entry item.\n *\n * @param {Object} definition a single replace options definition object\n * @param {djs.model.Base} element\n * @param {Function} [action] an action callback function which gets called when\n * the menu entry is being triggered.\n *\n * @return {Object} menu entry item\n */\nReplaceMenuProvider.prototype._createMenuEntry = function (\n definition,\n element,\n action\n) {\n let replaceElement = this._dsReplace.replaceElement;\n let modeling = this._modeling;\n let replaceAction = function () {\n return replaceElement(element, definition.target, modeling);\n };\n\n action = action || replaceAction;\n\n return {\n label: definition.label,\n className: definition.className,\n id: definition.actionName,\n action: action,\n };\n};\n","import { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { getNameFromType } from \"src/app/Utils/naming\";\n\nlet iconDictionaryService;\n\nexport function initializeReplaceOptions(iconDictionary) {\n iconDictionaryService = iconDictionary;\n}\n\nexport function actorReplaceOptions(name) {\n const actorTypes = iconDictionaryService.getTypeDictionary(\n elementTypes.ACTOR\n );\n\n let replaceOption = {};\n let i = 0;\n\n actorTypes.keysArray().forEach((actorType) => {\n if (!name.includes(actorType)) {\n const typeName = getNameFromType(actorType);\n replaceOption[i] = {\n label: \"Change to \" + typeName,\n actionName: \"replace-with-actor-\" + typeName.toLowerCase(),\n className: iconDictionaryService.getIconForBPMN(actorType),\n target: {\n type: actorType,\n },\n };\n i++;\n }\n });\n return replaceOption;\n}\n\nexport function workObjectReplaceOptions(name) {\n const workObjectTypes = iconDictionaryService.getTypeDictionary(\n elementTypes.WORKOBJECT\n );\n\n let replaceOption = {};\n let i = 0;\n\n workObjectTypes.keysArray().forEach((workObjectType) => {\n if (!name.includes(workObjectType)) {\n const typeName = getNameFromType(workObjectType);\n replaceOption[i] = {\n label: \"Change to \" + typeName,\n actionName: \"replace-with-actor-\" + typeName,\n className: iconDictionaryService.getIconForBPMN(workObjectType),\n target: {\n type: workObjectType,\n },\n };\n }\n i++;\n });\n return replaceOption;\n}\n","\"use strict\";\n\nimport inherits from \"inherits\";\n\nimport ContextPadProvider from \"bpmn-js/lib/features/context-pad/ContextPadProvider\";\n\nimport { assign, bind } from \"min-dash\";\nimport { generateAutomaticNumber } from \"../numbering/numbering\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { getAllStandardIconKeys } from \"src/app/Domain/Domain-Configuration/allIcons\";\nimport { getNameFromType } from \"src/app/Utils/naming\";\n\nlet dirtyFlagService;\nlet iconDictionaryService;\n\nexport function initializeContextPadProvider(dirtyFlag, iconDictionary) {\n dirtyFlagService = dirtyFlag;\n iconDictionaryService = iconDictionary;\n}\n\nexport default function DomainStoryContextPadProvider(\n injector,\n connect,\n translate,\n elementFactory,\n create,\n canvas,\n contextPad,\n popupMenu,\n replaceMenuProvider,\n commandStack,\n eventBus,\n modeling\n) {\n let startConnect;\n let selectedElement;\n\n injector.invoke(ContextPadProvider, this);\n let autoPlace = injector.get(\"autoPlace\", false);\n\n let cached = bind(this.getContextPadEntries, this);\n\n const colorPicker = document.getElementById(\"colorPicker\");\n colorPicker.onchange = (ev) => {\n const context = {\n businessObject: selectedElement.businessObject,\n newColor: ev.target.value,\n element: selectedElement,\n };\n\n commandStack.execute(\"element.colorChange\", context);\n dirtyFlagService.makeDirty();\n };\n\n popupMenu.registerProvider(\"ds-replace\", replaceMenuProvider);\n popupMenu.registerProvider(\"bpmn-replace\", replaceMenuProvider);\n\n this.getContextPadEntries = function (element) {\n const allStandardIconKeys = getAllStandardIconKeys();\n let actions = cached(element);\n\n startConnect = function (event, element, autoActivate) {\n connect.start(event, element, autoActivate);\n };\n\n if (element.type.includes(elementTypes.WORKOBJECT)) {\n if (\n allStandardIconKeys.includes(\n element.type.replace(elementTypes.WORKOBJECT, \"\")\n )\n ) {\n addColorChange(actions);\n }\n addConnectWithActivity(actions, startConnect);\n addTextAnnotation(actions);\n addActors(appendAction, actions);\n addWorkObjects(appendAction, actions);\n addChangeWorkObjectTypeMenu(actions);\n } else if (element.type.includes(elementTypes.ACTOR)) {\n if (\n allStandardIconKeys.includes(\n element.type.replace(elementTypes.ACTOR, \"\")\n )\n ) {\n addColorChange(actions);\n }\n addConnectWithActivity(actions, startConnect);\n addTextAnnotation(actions);\n addWorkObjects(appendAction, actions);\n addChangeActorTypeMenu(actions);\n } else if (element.type.includes(elementTypes.GROUP)) {\n delete actions.delete;\n addTextAnnotation(actions);\n assign(actions, {\n deleteGroup: {\n group: \"edit\",\n className: \"bpmn-icon-trash\",\n title: \"Remove Group without Child-Elements\",\n action: {\n click: function (event, element) {\n modeling.removeGroup(element);\n dirtyFlagService.makeDirty();\n },\n },\n },\n });\n addColorChange(actions);\n } else if (element.type.includes(elementTypes.ACTIVITY)) {\n moveDeleteActionToEndOfArray(actions);\n\n addColorChange(actions);\n\n assign(actions, {\n delete: {\n group: \"edit\",\n className: \"bpmn-icon-trash\",\n title: \"Remove\",\n action: {\n click: function (event, element) {\n modeling.removeElements({ element });\n dirtyFlagService.makeDirty();\n },\n },\n },\n });\n }\n\n return actions;\n };\n\n function moveDeleteActionToEndOfArray(actions) {\n delete actions.delete;\n\n assign(actions, {\n changeDirection: {\n group: \"edit\",\n className: \"icon-domain-story-changeDirection\",\n title: translate(\"Change direction\"),\n action: {\n // event needs to be addressed\n click: function (event, element) {\n changeDirection(element);\n },\n },\n },\n });\n }\n\n function addChangeActorTypeMenu(actions) {\n assign(actions, {\n replace: {\n group: \"edit\",\n className: \"bpmn-icon-screw-wrench\",\n title: translate(\"Change type\"),\n action: {\n click: function (event, element) {\n let position = assign(getReplaceMenuPosition(element), {\n cursor: { x: event.x, y: event.y },\n });\n popupMenu.open(element, \"ds-replace\", position);\n },\n },\n },\n });\n }\n\n function addColorChange(actions) {\n assign(actions, {\n colorChange: {\n group: \"edit\",\n className: \"icon-domain-story-color-picker\",\n title: translate(\"Change color\"),\n action: {\n click: function (event, element) {\n selectedElement = element;\n colorPicker.click();\n },\n },\n },\n });\n }\n\n function addTextAnnotation(actions) {\n assign(actions, {\n \"append.text-annotation\": appendAction(\n elementTypes.TEXTANNOTATION,\n \"bpmn-icon-text-annotation\",\n \"textannotation\",\n \"connect\"\n ),\n });\n }\n\n function addConnectWithActivity(actions, startConnect) {\n assign(actions, {\n connect: {\n group: \"connect\",\n className: \"bpmn-icon-connection\",\n title: translate(\"Connect with activity\"),\n action: {\n click: startConnect,\n dragstart: startConnect,\n },\n },\n });\n }\n\n function addWorkObjects(appendAction, actions) {\n let workObjectTypes = iconDictionaryService.getTypeDictionary(\n elementTypes.WORKOBJECT\n );\n workObjectTypes.keysArray().forEach((workObjectType) => {\n let name = getNameFromType(workObjectType);\n let icon = iconDictionaryService.getIconForBPMN(workObjectType);\n let action = [];\n action[\"append.workObject\" + name] = appendAction(\n workObjectType,\n icon,\n name,\n \"workObjects\"\n );\n assign(actions, action);\n });\n }\n\n function addActors(appendAction, actions) {\n let actorTypes = iconDictionaryService.getTypeDictionary(\n elementTypes.ACTOR\n );\n actorTypes.keysArray().forEach((actorType) => {\n let name = getNameFromType(actorType);\n let icon = iconDictionaryService.getIconForBPMN(actorType);\n let action = [];\n action[\"append.actor\" + name] = appendAction(\n actorType,\n icon,\n name,\n \"actors\"\n );\n assign(actions, action);\n });\n }\n\n function addChangeWorkObjectTypeMenu(actions) {\n assign(actions, {\n replace: {\n group: \"edit\",\n className: \"bpmn-icon-screw-wrench\",\n title: translate(\"Change type\"),\n action: {\n click: function (event, element) {\n let position = assign(getReplaceMenuPosition(element), {\n cursor: { x: event.x, y: event.y },\n });\n popupMenu.open(element, \"ds-replace\", position);\n },\n },\n },\n });\n }\n\n function changeDirection(element) {\n let context;\n let businessObject = element.businessObject;\n let newNumber;\n\n if (element.source.type.includes(elementTypes.ACTOR)) {\n newNumber = 0;\n } else {\n newNumber = generateAutomaticNumber(element, commandStack);\n }\n context = {\n businessObject: businessObject,\n newNumber: newNumber,\n element: element,\n };\n commandStack.execute(\"activity.directionChange\", context);\n }\n\n function getReplaceMenuPosition(element) {\n let Y_OFFSET = 5;\n\n let diagramContainer = canvas.getContainer(),\n pad = contextPad.getPad(element).html;\n\n let diagramRect = diagramContainer.getBoundingClientRect(),\n padRect = pad.getBoundingClientRect();\n\n let top = padRect.top - diagramRect.top;\n let left = padRect.left - diagramRect.left;\n\n return {\n x: left,\n y: top + padRect.height + Y_OFFSET,\n };\n }\n\n /**\n * create an append action\n *\n * @param {String} type\n * @param {String} className\n * @param {String} [title]\n * @param {String} group\n * @param {Object} [options]\n *\n * @return {Object} descriptor\n */\n function appendAction(type, className, title, group, options) {\n if (typeof title !== \"string\") {\n options = title;\n title = translate(\"{type}\", { type: type.replace(/^domainStory:/, \"\") });\n }\n\n function appendStart(event, element) {\n let shape = elementFactory.createShape(assign({ type: type }, options));\n let context = {\n elements: [shape],\n hints: {},\n source: element,\n };\n create.start(event, shape, context);\n }\n\n return {\n group: group,\n className: className,\n title: \"Append \" + title,\n action: {\n dragstart: startConnect,\n click: appendStart,\n },\n };\n }\n}\n\ninherits(DomainStoryContextPadProvider, ContextPadProvider);\n\nDomainStoryContextPadProvider.$inject = [\n \"injector\",\n \"connect\",\n \"translate\",\n \"elementFactory\",\n \"create\",\n \"canvas\",\n \"contextPad\",\n \"popupMenu\",\n \"replaceMenuProvider\",\n \"commandStack\",\n \"eventBus\",\n \"modeling\",\n];\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\nimport inherits from \"inherits\";\n\nimport BpmnElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\n\nimport { DEFAULT_LABEL_SIZE } from \"bpmn-js/lib/util/LabelUtil\";\n\nimport DomainStoryIdFactory from \"./domainStoryIdFactory\";\n\n/**\n * A custom factory that knows how to create BPMN _and_ custom elements.\n */\nexport default function DomainStoryElementFactory(bpmnFactory, moddle) {\n BpmnElementFactory.call(this, bpmnFactory, moddle);\n\n let self = this;\n let domainStoryIdFactory = new DomainStoryIdFactory();\n\n /**\n * create a diagram-js element with the given type (any of shape, connection, label).\n *\n * @param {String} elementType\n * @param {Object} attrs\n *\n * @return {djs.model.Base}\n */\n this.create = function (elementType, attrs) {\n let type = attrs.type;\n\n if (elementType === \"label\") {\n return self.baseCreate(\n elementType,\n assign({ type: \"label\" }, DEFAULT_LABEL_SIZE, attrs)\n );\n }\n\n // add type to businessObject if custom\n if (/^domainStory:/.test(type)) {\n if (!attrs.businessObject) {\n attrs.businessObject = {\n type: type,\n name: attrs.name ? attrs.name : \"\",\n };\n }\n\n if (attrs.id) {\n domainStoryIdFactory.registerId(attrs.id);\n } else {\n attrs.id = domainStoryIdFactory.getId(elementType);\n }\n assign(attrs.businessObject, {\n id: attrs.id,\n });\n\n let id = attrs.id;\n attrs.businessObject.get = function (key) {\n if (key === \"id\") {\n return id;\n }\n };\n attrs.businessObject.set = function (key, value) {\n if (key === \"id\") {\n assign(attrs.businessObject, { id: value });\n }\n };\n\n if (!attrs.businessObject.$type) {\n assign(attrs.businessObject, { $type: \"Element\" });\n }\n assign(attrs.businessObject, { di: {} });\n if (!attrs.businessObject.$descriptor) {\n assign(attrs.businessObject, { $descriptor: {} });\n }\n\n // add width and height if shape\n if (\n (!/:activity$/.test(type) || !/:connection$/.test(type)) &&\n !((/:group$/.test(type) && attrs.height) || attrs.width)\n ) {\n assign(attrs, self._getCustomElementSize(type));\n }\n\n if (!(\"$instanceOf\" in attrs.businessObject)) {\n // ensure we can use ModelUtil#is for type checks\n Object.defineProperty(attrs.businessObject, \"$instanceOf\", {\n value: function (type) {\n return this.type === type;\n },\n });\n }\n\n return self.baseCreate(elementType, attrs);\n }\n\n return self.createBpmnElement(elementType, attrs);\n };\n}\n\ninherits(DomainStoryElementFactory, BpmnElementFactory);\n\nDomainStoryElementFactory.$inject = [\"bpmnFactory\", \"moddle\"];\n\n/**\n * returns the default size of custom shapes.\n *\n * the following example shows an interface on how\n * to setup the custom shape's dimensions.\n * *\n * @param {String} type\n *\n * @return {Dimensions} a {width, height} object representing the size of the element\n */\nDomainStoryElementFactory.prototype._getCustomElementSize = function (type) {\n let shapes = {\n __default: { width: 75, height: 75 },\n \"domainStory:textAnnotation\": { width: 100, height: 30 },\n \"domainStory:group\": { width: 525, height: 275 },\n };\n\n return shapes[type] || shapes.__default;\n};\n\nclass Dimensions {\n width;\n height;\n}\n","\"use strict\";\n\nlet idList = [];\n\nexport default function DomainStoryIdFactory() {}\n\nDomainStoryIdFactory.prototype.getId = function (type) {\n return generateId(type);\n};\n\nDomainStoryIdFactory.prototype.registerId = function (id) {\n idList.push(id);\n};\n\nfunction generateId(type) {\n let idNumber = fourDigitsId();\n\n let id = type + \"_\" + idSuffix(idNumber);\n\n while (containsId(id)) {\n idNumber++;\n\n id = type + \"_\" + idSuffix(idNumber);\n }\n\n idList.push(id);\n return id;\n}\n\nfunction idSuffix(idNumber) {\n let id;\n if (idNumber > 9999) {\n id = 0;\n } else if (idNumber < 10) {\n id = \"000\" + idNumber;\n } else if (idNumber < 100) {\n id = \"00\" + idNumber;\n } else if (idNumber < 1000) {\n id = \"0\" + idNumber;\n } else {\n id = \"\" + idNumber;\n }\n return id;\n}\n\nfunction fourDigitsId() {\n return Math.floor(Math.random() * 10000);\n}\n\nexport function containsId(id) {\n let same = false;\n idList.forEach((element) => {\n if (id === element) {\n same = true;\n }\n });\n return same;\n}\n","\"use strict\";\n\nimport inherits from \"inherits\";\nimport BaseRenderer from \"diagram-js/lib/draw/BaseRenderer\";\nimport Ids from \"ids\";\nimport { getAnnotationBoxHeight } from \"./labeling/dsLabelEditingPreview\";\nimport { componentsToPath, createLine } from \"diagram-js/lib/util/RenderUtil\";\nimport {\n append as svgAppend,\n attr as svgAttr,\n classes as svgClasses,\n create as svgCreate,\n} from \"tiny-svg\";\nimport { query as domQuery } from \"min-dom\";\nimport { assign, isObject } from \"min-dash\";\nimport { getNumberStash } from \"./labeling/dsLabelEditingProvider\";\nimport {\n addNumberToRegistry,\n generateAutomaticNumber,\n numberBoxDefinitions,\n} from \"./numbering/numbering\";\n\nimport { calculateTextWidth } from \"./labeling/dsLabelUtil\";\nimport { countLines, labelPosition } from \"./labeling/position\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { angleBetween } from \"../../Utils/mathExtensions\";\n\nlet RENDERER_IDS = new Ids();\nlet numbers = [];\nconst DEFAULT_COLOR = \"black\";\n\n/**\n * a renderer that knows how to render custom elements.\n */\nlet iconDictionary;\nlet elementRegistry;\nlet dirtyFlag;\n\nexport function initializeRenderer(\n iconDictionaryService,\n elementRegistryService,\n dirtyFlagService\n) {\n iconDictionary = iconDictionaryService;\n elementRegistry = elementRegistryService;\n dirtyFlag = dirtyFlagService;\n}\n\nexport default function DomainStoryRenderer(\n eventBus,\n styles,\n canvas,\n textRenderer,\n pathMap,\n commandStack\n) {\n BaseRenderer.call(this, eventBus, 2000);\n\n let rendererId = RENDERER_IDS.next();\n let markers = {};\n let computeStyle = styles.computeStyle;\n\n // generate the automatic Number for an activity originating from an actor\n function generateActivityNumber(parentGfx, element, box) {\n // whenever we want to edit an activity, it gets redrawn as a new object\n // and the custom information is lost,\n // so we stash it before the editing occurs and set the value here\n\n let numberStash = getNumberStash();\n let semantic = element.businessObject;\n\n if (numberStash.use) {\n semantic.number = numberStash.number;\n }\n\n numbers[semantic.number] = true;\n\n let newRenderedNumber = renderNumber(\n parentGfx,\n semantic.number,\n numberStyle(box),\n element.type\n );\n addNumberToRegistry(newRenderedNumber, semantic.number);\n }\n\n // style functions\n function numberStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n position: \"absolute\",\n }),\n };\n }\n\n function backgroundBoxStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n fontSize: 50,\n position: \"absolute\",\n fontFamily: \"Courier New\",\n }),\n };\n }\n\n function backgroundDotStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"white\",\n fontSize: 150,\n position: \"absolute\",\n fontFamily: \"Courier\",\n }),\n };\n }\n\n // render functions\n // render label associated with actors and workobjects\n function renderEmbeddedLabel(parentGfx, element, align, padding) {\n let businessObject = element.businessObject;\n return renderLabel(\n parentGfx,\n businessObject.name,\n {\n box: element,\n align: align,\n padding: padding ? padding : 0,\n style: {\n fill: \"#000000\",\n },\n },\n element.type\n );\n }\n\n // render label associated with activities\n function renderExternalLabel(parentGfx, element) {\n let semantic = element.businessObject;\n let waypoints = element.waypoints;\n let lines = countLines(semantic.name);\n\n if (element.waypoints != null) {\n let position = labelPosition(waypoints, lines);\n let startPoint = element.waypoints[position.selected];\n let endPoint = element.waypoints[position.selected + 1];\n let angle = angleBetween(startPoint, endPoint);\n let alignment = \"left\";\n let boxWidth = 500;\n let xStart = position.x;\n\n // if the activity is horizontal, we want to center the label\n if (angle === 0 || angle === 180) {\n boxWidth = Math.abs(startPoint.x - endPoint.x);\n alignment = \"center\";\n xStart =\n (startPoint.x + endPoint.x) / 2 - calculateTextWidth(semantic.name);\n }\n\n let box = {\n textAlign: alignment,\n width: boxWidth,\n height: 30,\n x: xStart,\n y: position.y,\n };\n\n if (semantic.name && semantic.name.length) {\n return renderLabel(\n parentGfx,\n semantic.name,\n {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n wordWrap: \"break-word\",\n overflowWrap: \"break-word\",\n hyphens: \"auto\",\n }),\n },\n element.type\n );\n }\n }\n }\n\n // render the number associated with an activity\n function renderExternalNumber(parentGfx, element) {\n if (element && element.source) {\n let semantic = element.businessObject;\n\n let box = numberBoxDefinitions(element);\n\n if (\n semantic.number == null &&\n element.source.type &&\n element.source.type.includes(elementTypes.ACTOR)\n ) {\n generateAutomaticNumber(element, commandStack);\n }\n\n // render the background for the number\n if (semantic.number && element.source.type.includes(elementTypes.ACTOR)) {\n generateActivityNumber(parentGfx, element, box);\n } else {\n semantic.number = null;\n }\n }\n }\n\n // render a number on the canvas\n function renderNumber(parentGfx, number, options, type) {\n if (number < 10) {\n number = String(number);\n }\n number = String(number);\n let text = textRenderer.createText(number || \"\", options);\n let height = 0;\n\n svgClasses(text).add(\"djs-labelNumber\");\n\n setCoordinates(type, text, options, height, parentGfx);\n\n svgAppend(parentGfx, text);\n\n drawCircle(parentGfx, options, number.length);\n\n return text;\n }\n\n function drawCircle(parentGfx, options, textLength) {\n const circle = svgCreate(\"circle\");\n svgAttr(circle, {\n cx: options.box.x + 15 + textLength * 3,\n cy: options.box.y - 4,\n r: \"10\",\n style: \"fill:transparent;stroke:black;stroke-width:1\",\n });\n svgAppend(parentGfx, circle);\n }\n\n // the coordinates of the activity label must be set directly and will not be taken from the box\n function setCoordinates(type, text, options, height, parentGfx) {\n if (/:activity$/.test(type)) {\n text.innerHTML = manipulateInnerHTMLXLabel(\n text.children,\n options.box.x,\n 0\n );\n text.innerHTML = manipulateInnerHTMLYLabel(\n text.children,\n options.box.y,\n 0\n );\n } else if (/:actor/.test(type)) {\n height = parentGfx.firstChild.attributes.height.nodeValue;\n text.innerHTML = manipulateInnerHTMLYLabel(text.children, height, 0);\n } else if (/:workObject/.test(type)) {\n height = parentGfx.firstChild.attributes.height.nodeValue;\n text.innerHTML = manipulateInnerHTMLYLabel(text.children, height, 26);\n }\n }\n\n // render a label on the canvas\n function renderLabel(parentGfx, label, options, type) {\n let text = textRenderer.createText(label || \"\", options);\n let height = 0;\n\n svgClasses(text).add(\"djs-label\");\n setCoordinates(type, text, options, height, parentGfx);\n\n svgAppend(parentGfx, text);\n return text;\n }\n\n // determine the Y-coordinate of the label / number to be rendered\n function manipulateInnerHTMLYLabel(children, y, offset) {\n if (children) {\n let result = \"\";\n for (let i = 0; i < children.length; i++) {\n result += children[i].outerHTML.replace(\n /y=\"-?\\d*.\\d*\"/,\n 'y=\"' + (Number(y) + offset + 14 * i) + '\"'\n );\n }\n return result;\n }\n }\n\n // determine the X-coordinate of the label / number to be rendered\n function manipulateInnerHTMLXLabel(children, x, offset) {\n if (children) {\n let result = \"\";\n for (let i = 0; i < children.length; i++) {\n result += children[i].outerHTML.replace(\n /x=\"-?\\d*.\\d*\"/,\n 'x=\"' + (Number(x) + offset + 14) + '\"'\n );\n }\n return result;\n }\n }\n\n // draw functions\n this.drawGroup = function (parentGfx, element) {\n if (!element.businessObject.pickedColor) {\n element.businessObject.pickedColor = DEFAULT_COLOR;\n }\n let rect = drawRect(\n parentGfx,\n element.width,\n element.height,\n 0,\n assign(\n {\n fill: \"none\",\n stroke: element.businessObject.pickedColor,\n },\n element.attrs\n )\n );\n renderEmbeddedLabel(parentGfx, element, \"left-top\", 8);\n\n return rect;\n };\n\n function useColorForElement(element, iconSRC) {\n if (!element.businessObject.pickedColor) {\n element.businessObject.pickedColor = DEFAULT_COLOR;\n }\n const match = iconSRC.match(/fill=\".*?\"/);\n if (match && match.length > 1) {\n return iconSRC.replace(\n /fill=\".*?\"/,\n 'fill=\"' + element.businessObject.pickedColor + '\"'\n );\n } else {\n const index = iconSRC.indexOf(\"' +\n ''\n );\n } else {\n return useColorForElement(element, iconSRC);\n }\n }\n\n this.drawActor = function (parent, element) {\n let svgDynamicSizeAttributes = {\n width: element.width,\n height: element.height,\n },\n actor;\n let iconSRC = iconDictionary.getTypeIconSRC(\n elementTypes.ACTOR,\n element.type\n );\n iconSRC = getIconSrc(iconSRC, element);\n actor = svgCreate(iconSRC);\n\n svgAttr(actor, svgDynamicSizeAttributes);\n svgAppend(parent, actor);\n\n renderEmbeddedLabel(parent, element, \"center\", -5);\n return actor;\n };\n\n this.drawWorkObject = function (parent, element) {\n let svgDynamicSizeAttributes = {\n width: element.width * 0.65,\n height: element.height * 0.65,\n x: element.width / 2 - 25,\n y: element.height / 2 - 25,\n },\n workObject;\n let iconSRC = iconDictionary.getTypeIconSRC(\n elementTypes.WORKOBJECT,\n element.type\n );\n iconSRC = getIconSrc(iconSRC, element);\n workObject = svgCreate(iconSRC);\n\n svgAttr(workObject, svgDynamicSizeAttributes);\n svgAppend(parent, workObject);\n renderEmbeddedLabel(parent, element, \"center\", -5);\n\n return workObject;\n };\n\n function useColorForActivity(element) {\n if (!element.businessObject.pickedColor) {\n element.businessObject.pickedColor = \"black\";\n }\n let attrs = \"\";\n return computeStyle(attrs, {\n stroke: element.businessObject.pickedColor,\n fill: \"none\",\n strokeWidth: 1.5,\n strokeLinejoin: \"round\",\n markerEnd: marker(\n \"activity\",\n \"black\",\n element.businessObject.pickedColor\n ),\n });\n }\n\n this.drawActivity = function (p, element) {\n adjustForTextOverlap(element);\n\n if (element) {\n let attrs = useColorForActivity(element);\n\n let x = svgAppend(p, createLine(element.waypoints, attrs));\n renderExternalLabel(p, element);\n renderExternalNumber(p, element);\n\n // just adjusting the start- and endpoint of the connection-element moves only the drawn connection,\n // not the interactive line. This can be fixed by manually overriding the points of the interactive polyline\n // in the HTMl with the points of the drawn one.\n // this however does not adjust the surrounding box of the connection.\n fixConnectionInHTML(p.parentElement);\n\n return x;\n }\n };\n\n function checkIfPointOverlapsText(point, source) {\n if (point.y > source.y + 60) {\n if (point.x > source.x + 3 && point.x < source.x + 72) {\n let lineOffset = getLineOffset(source);\n if (source.y + 75 + lineOffset > point.y) {\n point.y += lineOffset;\n }\n }\n }\n }\n\n function adjustForTextOverlap(element) {\n let source = element.source;\n let target = element.target;\n\n let waypoints = element.waypoints;\n let startPoint = waypoints[0];\n let endPoint = waypoints[waypoints.length - 1];\n\n if (startPoint && endPoint && source && target) {\n checkIfPointOverlapsText(startPoint, source);\n checkIfPointOverlapsText(endPoint, source);\n }\n }\n\n function getLineOffset(element) {\n let id = element.id;\n let offset = 0;\n\n let objects = document.getElementsByClassName(\"djs-element djs-shape\");\n for (let i = 0; i < objects.length; i++) {\n let data_id = objects.item(i).getAttribute(\"data-element-id\");\n if (data_id === id) {\n let object = objects.item(i);\n let text = object.getElementsByTagName(\"text\")[0];\n let tspans = text.getElementsByTagName(\"tspan\");\n let tspan = tspans[tspans.length - 1];\n offset = tspan.getAttribute(\"y\");\n }\n }\n return offset - 70;\n }\n\n function fixConnectionInHTML(wantedConnection) {\n if (wantedConnection) {\n let polylines = wantedConnection.getElementsByTagName(\"polyline\");\n if (polylines.length > 1) {\n polylines[1].setAttribute(\n \"points\",\n polylines[0].getAttribute(\"points\")\n );\n }\n }\n }\n\n this.drawDSConnection = function (p, element) {\n let attrs = \"\";\n attrs = computeStyle(attrs, {\n stroke: \"#000000\",\n strokeWidth: 1.5,\n strokeLinejoin: \"round\",\n strokeDasharray: \"5, 5\",\n });\n\n return svgAppend(p, createLine(element.waypoints, attrs));\n };\n\n this.drawAnnotation = function (parentGfx, element) {\n let style = {\n fill: \"none\",\n stroke: \"none\",\n };\n\n let text = element.businessObject.text || \"\";\n if (element.businessObject.text) {\n let height = getAnnotationBoxHeight();\n\n if (height === 0 && element.businessObject.number) {\n height = element.businessObject.number;\n }\n assign(element, {\n height: height,\n });\n\n // for some reason the keyword height is not exported, so we use another, which we know will be exported,\n // to ensure persistent annotation heights between sessions\n assign(element.businessObject, {\n number: height,\n });\n }\n\n let textElement = drawRect(\n parentGfx,\n element.width,\n element.height,\n 0,\n 0,\n style\n );\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n drawPath(parentGfx, textPathData, {\n stroke: \"black\",\n });\n\n renderLabel(parentGfx, text, {\n box: element,\n align: \"left-top\",\n padding: 5,\n style: {\n fill: \"black\",\n },\n });\n\n return textElement;\n };\n\n // draw helper functions\n function drawPath(parentGfx, d, attrs) {\n attrs = computeStyle(attrs, [\"no-fill\"], {\n strokeWidth: 2,\n stroke: \"black\",\n });\n\n let path = svgCreate(\"path\");\n svgAttr(path, { d: d });\n svgAttr(path, attrs);\n\n svgAppend(parentGfx, path);\n\n return path;\n }\n\n function drawRect(parentGfx, width, height, r, offset, attrs) {\n if (isObject(offset)) {\n attrs = offset;\n offset = 0;\n }\n\n offset = offset || 0;\n attrs = computeStyle(attrs, {\n stroke: \"black\",\n strokeWidth: 2,\n fill: \"white\",\n });\n\n let rect = svgCreate(\"rect\");\n svgAttr(rect, {\n x: offset,\n y: offset,\n width: width - offset * 2,\n height: height - offset * 2,\n rx: r,\n ry: r,\n });\n\n svgAttr(rect, attrs);\n svgAppend(parentGfx, rect);\n\n return rect;\n }\n\n // marker functions\n function marker(type, fill, stroke) {\n let id = type + \"-\" + fill + \"-\" + stroke + \"-\" + rendererId;\n\n if (!markers[id]) {\n createMarker(type, fill, stroke);\n }\n return \"url(#\" + id + \")\";\n }\n\n function createMarker(type, fill, stroke) {\n let id = type + \"-\" + fill + \"-\" + stroke + \"-\" + rendererId;\n\n if (type === \"activity\") {\n let sequenceflowEnd = svgCreate(\"path\");\n svgAttr(sequenceflowEnd, { d: \"M 1 5 L 11 10 L 1 15 Z\" });\n\n addMarker(id, {\n element: sequenceflowEnd,\n ref: { x: 11, y: 10 },\n scale: 0.5,\n attrs: {\n fill: stroke,\n stroke: stroke,\n },\n });\n }\n }\n\n function addMarker(id, options) {\n let attrs = assign(\n {\n fill: \"black\",\n strokeWidth: 1,\n strokeLinecap: \"round\",\n strokeDasharray: \"none\",\n },\n options.attrs\n );\n\n let ref = options.ref || { x: 0, y: 0 };\n let scale = options.scale || 1;\n\n // resetting stroke dash array\n if (attrs.strokeDasharray === \"none\") {\n attrs.strokeDasharray = [10000, 1];\n }\n\n let marker = svgCreate(\"marker\");\n\n svgAttr(options.element, attrs);\n svgAppend(marker, options.element);\n svgAttr(marker, {\n id: id,\n viewBox: \"0 0 20 20\",\n refX: ref.x,\n refY: ref.y,\n markerWidth: 20 * scale,\n markerHeight: 20 * scale,\n orient: \"auto\",\n });\n\n let defs = domQuery(\"defs\", canvas._svg);\n if (!defs) {\n defs = svgCreate(\"defs\");\n svgAppend(canvas._svg, defs);\n }\n svgAppend(defs, marker);\n markers[id] = marker;\n }\n\n // path functions\n this.getWorkObjectPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n\n this.getGroupPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n\n this.getActivityPath = function (connection) {\n let waypoints = connection.waypoints.map(function (p) {\n return p.original || p;\n });\n\n let activityPath = [[\"M\", waypoints[0].x, waypoints[0].y]];\n\n waypoints.forEach(function (waypoint, index) {\n if (index !== 0) {\n activityPath.push([\"L\", waypoint.x, waypoint.y]);\n }\n });\n return componentsToPath(activityPath);\n };\n\n this.getActorPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n}\n\ninherits(DomainStoryRenderer, BaseRenderer);\n\nDomainStoryRenderer.$inject = [\n \"eventBus\",\n \"styles\",\n \"canvas\",\n \"textRenderer\",\n \"pathMap\",\n \"commandStack\",\n];\n\nDomainStoryRenderer.prototype.canRender = function (element) {\n return /^domainStory:/.test(element.type);\n};\n\nDomainStoryRenderer.prototype.drawShape = function (p, element) {\n // polyfill for tests\n if (!String.prototype.startsWith) {\n Object.defineProperty(String.prototype, \"startsWith\", {\n value: function (search, pos) {\n pos = !pos || pos < 0 ? 0 : +pos;\n return this.substring(pos, pos + search.length) === search;\n },\n });\n }\n\n let type = element.type;\n element.businessObject.type = type;\n\n elementRegistry.correctInitialize();\n dirtyFlag.makeDirty();\n\n if (type.includes(elementTypes.ACTOR)) {\n return this.drawActor(p, element);\n } else if (type.includes(elementTypes.WORKOBJECT)) {\n return this.drawWorkObject(p, element);\n } else if (type.includes(elementTypes.TEXTANNOTATION)) {\n return this.drawAnnotation(p, element);\n } else if (type.includes(elementTypes.GROUP)) {\n return this.drawGroup(p, element);\n }\n};\n\nDomainStoryRenderer.prototype.getShapePath = function (shape) {\n let type = shape.type;\n\n if (type.includes(elementTypes.ACTOR)) {\n return this.getActorPath(shape);\n } else if (type.includes(elementTypes.WORKOBJECT)) {\n return this.getWorkObjectPath(shape);\n } else if (type.includes(elementTypes.GROUP)) {\n return this.getGroupPath(shape);\n }\n};\n\nDomainStoryRenderer.prototype.drawConnection = function (p, element) {\n let type = element.type;\n\n dirtyFlag.makeDirty();\n\n // fixes activities that were copy-pasted\n if (!element.businessObject.type) {\n element.businessObject.type = type;\n }\n if (type === elementTypes.ACTIVITY) {\n return this.drawActivity(p, element);\n } else if (type === elementTypes.CONNECTION) {\n return this.drawDSConnection(p, element);\n }\n};\n\n// creates a SVG path that describes a rectangle which encloses the given shape.\nfunction getRectPath(shape) {\n let offset = 5;\n let x = shape.x,\n y = shape.y,\n width = shape.width / 2 + offset,\n height = shape.height / 2 + offset;\n\n return [\n [\"M\", x, y],\n [\"l\", width, 0],\n [\"l\", width, height],\n [\"l\", -width, height],\n [\"l\", -width, 0],\n [\"z\"],\n ];\n}\n","\"use strict\";\n\nimport { assign, every, reduce } from \"min-dash\";\n\nimport inherits from \"inherits\";\n\nimport RuleProvider from \"diagram-js/lib/features/rules/RuleProvider\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { is } from \"./util\";\n\nconst HIGH_PRIORITY = 1500;\nconst MIN_SIZE = 125;\n\nfunction isDomainStory(element) {\n return element && /^domainStory:/.test(element.type);\n}\n\nfunction isDomainStoryGroup(element) {\n return element && /^domainStory:group/.test(element.type);\n}\n\nfunction isActor(element) {\n return element && /^domainStory:actor\\w*/.test(element.type);\n}\n\nfunction isWorkObject(element) {\n return element && /^domainStory:workObject/.test(element.type);\n}\n\nfunction isActivity(element) {\n return element && /^domainStory:activity/.test(element.type);\n}\n\nfunction isConnection(element) {\n return element && /^domainStory:connection/.test(element.type);\n}\n\nfunction isAnnotation(element) {\n return element && /^domainStory:textAnnotation/.test(element.type);\n}\n\n/**\n * can source and target be connected?\n */\nfunction canConnect(source, target) {\n // only judge about two custom elements\n if (\n isDomainStoryGroup(target) ||\n !isDomainStory(source) ||\n !isDomainStory(target)\n ) {\n return;\n }\n\n // do not allow a connection from one element to itself\n if (source === target) {\n return;\n }\n\n // do not allow a connection between two actors\n if (isActor(source) && isActor(target)) {\n return;\n }\n\n // do not allow a connection, where the source or target is an activity\n if (isActivity(source) || isActivity(target)) {\n return;\n }\n\n // do not allow a connection, where the source or target is an annotation connection\n if (isConnection(source) || isConnection(target)) {\n return;\n }\n\n // do not allow a connection to a connection(the special type of connection between an element and a comment box)\n // when the target is an annotation, the connection type is an annotation connection instead of an activity\n if (isAnnotation(target)) {\n return { type: elementTypes.CONNECTION };\n }\n\n return { type: elementTypes.ACTIVITY };\n}\n\nfunction canResize(shape, newBounds) {\n if (is(shape, elementTypes.GROUP)) {\n if (newBounds) {\n let lowerLeft = { x: shape.x, y: shape.y + shape.height };\n let lowerRight = { x: shape.x + shape.width, y: shape.y + shape.height };\n let upperRight = { x: shape.x + shape.width, y: shape.y };\n\n if (newBounds.x !== shape.x && newBounds.y !== shape.y) {\n // upper left\n if (newBounds.x > lowerRight.x - MIN_SIZE) {\n assign(newBounds, { x: lowerRight.x - MIN_SIZE });\n }\n if (newBounds.y > lowerRight.y - MIN_SIZE) {\n assign(newBounds, { y: lowerRight.y - MIN_SIZE });\n }\n }\n\n if (newBounds.x !== shape.x && newBounds.y === shape.y) {\n // lower left\n if (newBounds.x > upperRight.x - MIN_SIZE) {\n assign(newBounds, { x: upperRight.x - MIN_SIZE });\n }\n }\n\n if (newBounds.x === shape.x && newBounds.y !== shape.y) {\n // upper right\n if (newBounds.y > lowerLeft.y - MIN_SIZE) {\n assign(newBounds, { y: lowerLeft.y - MIN_SIZE });\n }\n }\n\n if (newBounds.height < MIN_SIZE) {\n assign(newBounds, {\n height: MIN_SIZE,\n });\n }\n if (newBounds.width < MIN_SIZE) {\n assign(newBounds, {\n width: MIN_SIZE,\n });\n }\n }\n return true;\n }\n\n return false;\n}\n\nfunction canAttach(elements, target, source) {\n if (!Array.isArray(elements)) {\n elements = [elements];\n }\n\n // disallow appending as boundary event\n if (source) {\n return false;\n }\n\n // only (re-)attach one element at a time\n if (elements.length !== 1) {\n return false;\n }\n\n // allow default move operation\n if (!target) {\n return true;\n }\n\n // only allow drop on DomainStory Elements\n if (!isDomainStory(target)) {\n return false;\n }\n\n return \"attach\";\n}\n\nfunction canConnectToAnnotation(source, target, connection) {\n // do not allow an activity connect to an annotation\n if (isActivity(connection) && isAnnotation(target)) {\n return false;\n }\n\n // do not allow an annotation connection between two annotations\n if (\n isConnection(connection) &&\n isAnnotation(source) &&\n isAnnotation(target)\n ) {\n return false;\n }\n\n // do not allow an annotation connection between an actor or workObject and anything except an annotation\n return !(\n isConnection(connection) &&\n !isAnnotation(target) &&\n (isActor(source) || isWorkObject(source))\n );\n}\n\n/**\n * specific rules for custom elements\n */\nexport default function DomainStoryRules(eventBus) {\n RuleProvider.call(this, eventBus);\n}\n\ninherits(DomainStoryRules, RuleProvider);\n\nDomainStoryRules.$inject = [\"eventBus\"];\n\nDomainStoryRules.prototype.init = function () {\n /**\n * can shape be created on target container?\n */\n function canCreate(shape, target) {\n // only judge about custom elements\n if (!isDomainStory(shape)) {\n return;\n }\n\n // allow creation just on groups\n return !isDomainStory(target) || isDomainStoryGroup(target);\n }\n\n this.addRule(\"elements.create\", function (context) {\n const elements = context.elements,\n position = context.position,\n target = context.target;\n\n return every(elements, function (element) {\n if (isConnection(element)) {\n return canConnect(element.source, element.target, element);\n }\n\n if (element.host) {\n return canAttach(element, element.host, null, position);\n }\n\n return canCreate(element, target, null, position);\n });\n });\n\n this.addRule(\"elements.move\", HIGH_PRIORITY, function (context) {\n let target = context.target,\n shapes = context.shapes;\n\n let type;\n\n // do not allow mixed movements of custom / BPMN shapes\n // if any shape cannot be moved, the group cannot be moved, too\n\n // reject, if we have at least one\n // custom element that cannot be moved\n return reduce(\n shapes,\n function (result, s) {\n if (type === undefined) {\n type = isDomainStory(s);\n }\n\n if (type !== isDomainStory(s) || result === false) {\n return false;\n }\n\n return canCreate(s, target);\n },\n undefined\n );\n });\n\n this.addRule(\"shape.create\", HIGH_PRIORITY, function (context) {\n let target = context.target,\n shape = context.shape;\n\n return canCreate(shape, target);\n });\n\n this.addRule(\"connection.create\", HIGH_PRIORITY, function (context) {\n let source = context.source,\n target = context.target;\n\n return canConnect(source, target);\n });\n\n this.addRule(\"connection.reconnect\", HIGH_PRIORITY, function (context) {\n let connection = context.connection,\n source = context.hover || context.source,\n target = context.target;\n\n // --------------------------------------------------------------\n let result = canConnectToAnnotation(source, target, connection);\n\n if (!result) {\n return;\n }\n\n // --------------------------------------------------------------\n\n return canConnect(source, target, connection);\n });\n\n this.addRule(\"shape.resize\", function (context) {\n let shape = context.shape,\n newBounds = context.newBounds;\n\n return canResize(shape, newBounds);\n });\n};\n\nDomainStoryRules.prototype.canConnect = canConnect;\nDomainStoryRules.prototype.canAttach = canAttach;\nDomainStoryRules.prototype.isDomainStory = isDomainStory;\nDomainStoryRules.prototype.canResize = canResize;\n","\"use strict\";\n\nimport inherits from \"inherits\";\n\nimport { pick, assign } from \"min-dash\";\n\nimport CommandInterceptor from \"diagram-js/lib/command/CommandInterceptor\";\n\nimport {\n add as collectionAdd,\n remove as collectionRemove,\n} from \"diagram-js/lib/util/Collections\";\n\nimport { reworkGroupElements } from \"./util\";\nimport { elementTypes } from \"../../Domain/Common/elementTypes\";\n\n/**\n * a handler responsible for updating the custom element's businessObject\n * once changes on the diagram happen.\n */\nexport default function DomainStoryUpdater(eventBus, bpmnjs) {\n CommandInterceptor.call(this, eventBus);\n\n function updateCustomElement(e) {\n let context = e.context,\n shape = context.shape,\n businessObject = shape.businessObject;\n\n if (!shape || !shape.type.includes(elementTypes.DOMAINSTORY)) {\n return;\n }\n\n let parent = shape.parent;\n let customElements = bpmnjs._customElements;\n\n // make sure element is added / removed from bpmnjs.customElements\n if (!parent) {\n collectionRemove(customElements, businessObject);\n } else {\n collectionAdd(customElements, businessObject);\n }\n\n // save custom element position\n assign(businessObject, pick(shape, [\"x\", \"y\"]));\n\n // save custom element size if resizable\n if (shape.type === elementTypes.GROUP) {\n assign(businessObject, pick(shape, [\"height\", \"width\"]));\n\n // rework the child-parent relations if a group was moved, such that all Objects that are visually in the group are also associated with it\n // since we do not have access to the standard-canvas object here, we cannot use the function correctGroupChildren() from DSLabelUtil\n if (parent != null) {\n reworkGroupElements(parent, shape);\n }\n }\n if (\n shape &&\n shape.parent &&\n \"type\" in shape.parent &&\n shape.parent.type === elementTypes.GROUP\n ) {\n assign(businessObject, {\n parent: shape.parent.id,\n });\n }\n }\n\n function updateCustomConnection(e) {\n let context = e.context,\n connection = context.connection,\n source = connection.source,\n target = connection.target,\n businessObject = connection.businessObject;\n\n if (e.newTarget) {\n target = e.newTarget;\n }\n if (e.newSource) {\n source = e.newSource;\n }\n\n let parent = connection.parent;\n let customElements = bpmnjs._customElements;\n\n // make sure element is added / removed from bpmnjs.customElements\n if (!parent) {\n collectionRemove(customElements, businessObject);\n } else {\n collectionAdd(customElements, businessObject);\n }\n\n // update waypoints\n assign(businessObject, {\n waypoints: copyWaypoints(connection),\n });\n\n if (source) {\n if (!businessObject.source) {\n assign(businessObject, { source: source.id });\n } else {\n businessObject.source = source.id;\n }\n }\n if (target) {\n if (!businessObject.target) {\n assign(businessObject, { target: target.id });\n } else {\n businessObject.target = target.id;\n }\n }\n }\n\n function copyWaypoints(connection) {\n return connection.waypoints.map(function (p) {\n if (p.original) {\n return {\n original: {\n x: p.original.x,\n y: p.original.y,\n },\n x: p.x,\n y: p.y,\n };\n } else {\n return {\n x: p.x,\n y: p.y,\n };\n }\n });\n }\n\n this.executed(\n [\n \"shape.create\",\n \"shape.move\",\n \"shape.delete\",\n \"shape.resize\",\n \"shape.removeGroupWithChildren\",\n ],\n ifDomainStoryElement(updateCustomElement)\n );\n\n this.reverted(\n [\n \"shape.create\",\n \"shape.move\",\n \"shape.delete\",\n \"shape.resize\",\n \"shape.removeGroupWithChildren\",\n ],\n ifDomainStoryElement(updateCustomElement)\n );\n\n this.executed(\n [\n \"connection.create\",\n \"connection.reconnect\",\n \"connection.updateWaypoints\",\n \"connection.delete\",\n \"connection.layout\",\n \"connection.move\",\n ],\n ifDomainStoryElement(updateCustomConnection)\n );\n\n this.reverted(\n [\n \"connection.create\",\n \"connection.reconnect\",\n \"connection.updateWaypoints\",\n \"connection.delete\",\n \"connection.layout\",\n \"connection.move\",\n ],\n ifDomainStoryElement(updateCustomConnection)\n );\n}\n\n// check if element in the context of an event is a domainStory element\nfunction ifDomainStoryElement(fn) {\n return (event) => {\n const context = event.context;\n const element = context.shape || context.connection;\n\n if (isDomainStory(element)) {\n fn(event);\n }\n };\n}\n\nfunction isDomainStory(element) {\n return element && /domainStory:/.test(element.type);\n}\n\ninherits(DomainStoryUpdater, CommandInterceptor);\n\nDomainStoryUpdater.$inject = [\"eventBus\", \"bpmnjs\"];\n","\"use strict\";\n\nimport DomainStoryElementFactory from \"./domainStoryElementFactory\";\nimport DomainStoryRenderer from \"./domainStoryRenderer\";\nimport DomainStoryPalette from \"./palette/domainStoryPalette\";\nimport DomainStoryRules from \"./domainStoryRules\";\nimport DomainStoryUpdater from \"./domainStoryUpdater\";\nimport ElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\nimport CreateModule from \"diagram-js/lib/features/create\";\nimport PathMap from \"bpmn-js/lib/draw/PathMap\";\nimport PopupMenuModule from \"bpmn-js/lib/features/popup-menu\";\nimport ContextPadModule from \"diagram-js/lib/features/context-pad\";\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"./updateHandler/updateLabelHandler\";\nimport headlineAndDescriptionUpdateHandler from \"./updateHandler/headlineAndDescriptionUpdateHandler\";\nimport DomainStoryContextPadProvider from \"./context-pad/domainStoryContextPadProvider\";\nimport ReplaceMenuProvider from \"./change-icon/replaceMenuProvider\";\nimport DSModeling from \"./modeling/dSModeling\";\n\nexport default {\n __depends__: [CreateModule, ContextPadModule, PopupMenuModule],\n __init__: [\n \"domainStoryRenderer\",\n \"paletteProvider\",\n \"domainStoryRules\",\n \"domainStoryUpdater\",\n \"contextPadProvider\",\n \"replaceMenuProvider\",\n ],\n elementFactory: [\"type\", DomainStoryElementFactory],\n domainStoryRenderer: [\"type\", DomainStoryRenderer],\n paletteProvider: [\"type\", DomainStoryPalette],\n domainStoryRules: [\"type\", DomainStoryRules],\n domainStoryUpdater: [\"type\", DomainStoryUpdater],\n contextPadProvider: [\"type\", DomainStoryContextPadProvider],\n elementFactoryBpmn: [\"type\", ElementFactory],\n pathMap: [\"type\", PathMap],\n replaceMenuProvider: [\"type\", ReplaceMenuProvider],\n commandStack: [\"type\", CommandStack],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n headlineAndDescriptionUpdateHandler: [\n \"type\",\n headlineAndDescriptionUpdateHandler,\n ],\n modeling: [\"type\", DSModeling],\n};\n","\"use strict\";\n\nimport {\n append as svgAppend,\n attr as svgAttr,\n create as svgCreate,\n remove as svgRemove,\n} from \"tiny-svg\";\n\nimport { translate } from \"diagram-js/lib/util/SvgTransformUtil\";\nimport { elementTypes } from \"../../../Domain/Common/elementTypes\";\nimport { is } from \"../util\";\n\nconst MARKER_HIDDEN = \"djs-element-hidden\",\n MARKER_LABEL_HIDDEN = \"djs-label-hidden\";\n\nlet annotationBoxHeight = 0;\n\nexport function getAnnotationBoxHeight() {\n return annotationBoxHeight;\n}\n\nexport default function DSLabelEditingPreview(eventBus, canvas, pathMap) {\n let self = this;\n\n let defaultLayer = canvas.getDefaultLayer();\n let element, absoluteElementBBox, gfx;\n\n eventBus.on(\"directEditing.activate\", function (context) {\n let activeProvider = context.active;\n\n element = activeProvider.element.label || activeProvider.element;\n\n // text annotation\n if (is(element, elementTypes.TEXTANNOTATION)) {\n absoluteElementBBox = canvas.getAbsoluteBBox(element);\n\n gfx = svgCreate(\"g\");\n\n annotationBoxHeight = element.height;\n\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n let path = (self.path = svgCreate(\"path\"));\n\n svgAttr(path, {\n d: textPathData,\n strokeWidth: 2,\n stroke: getStrokeColor(element),\n });\n\n svgAppend(gfx, path);\n\n svgAppend(defaultLayer, gfx);\n\n translate(gfx, element.x, element.y);\n }\n\n if (is(element, elementTypes.TEXTANNOTATION) || element.labelTarget) {\n canvas.addMarker(element, MARKER_HIDDEN);\n } else if (\n element.type.includes(elementTypes.ACTOR) ||\n element.type.includes(elementTypes.WORKOBJECT) ||\n element.type.includes(elementTypes.ACTIVITY) ||\n element.type.includes(elementTypes.GROUP)\n ) {\n canvas.addMarker(element, MARKER_LABEL_HIDDEN);\n }\n });\n\n eventBus.on(\"directEditing.resize\", function (context) {\n // text annotation\n if (is(element, elementTypes.TEXTANNOTATION)) {\n let height = context.height,\n dy = context.dy;\n\n let newElementHeight = Math.max(\n (element.height / absoluteElementBBox.height) * (height + dy),\n 0\n );\n annotationBoxHeight = newElementHeight;\n\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: newElementHeight,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n svgAttr(self.path, {\n d: textPathData,\n });\n }\n });\n\n eventBus.on(\n [\"directEditing.complete\", \"directEditing.cancel\"],\n function (context) {\n let activeProvider = context.active;\n\n if (activeProvider) {\n canvas.removeMarker(\n activeProvider.element.label || activeProvider.element,\n MARKER_HIDDEN\n );\n canvas.removeMarker(element, MARKER_LABEL_HIDDEN);\n }\n\n element = undefined;\n absoluteElementBBox = undefined;\n\n if (gfx) {\n svgRemove(gfx);\n\n gfx = undefined;\n }\n }\n );\n}\n\nDSLabelEditingPreview.$inject = [\"eventBus\", \"canvas\", \"pathMap\"];\n\n// helpers ///////////////////\n\nfunction getStrokeColor() {\n return \"black\";\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\nimport { autocomplete, getLabel } from \"./dsLabelUtil\";\n\nimport { isAny } from \"bpmn-js/lib/features/modeling/util/ModelingUtil\";\n\nimport {\n getExternalLabelMid,\n hasExternalLabel,\n isLabel,\n isLabelExternal,\n} from \"bpmn-js/lib/util/LabelUtil\";\n\nimport { elementTypes } from \"../../../Domain/Common/elementTypes\";\nimport { is } from \"../util\";\n\nlet dictionaryService;\n\nlet numberStash = 0;\nlet stashUse = false;\n\nexport function initializeLabelEditingProvider(labelingDictionary) {\n dictionaryService = labelingDictionary;\n}\n\nexport function getNumberStash() {\n let number = { use: stashUse, number: numberStash };\n stashUse = false;\n return number;\n}\n\nexport function toggleStashUse(use) {\n stashUse = use;\n}\n\nexport function focusElement(element) {\n // Opening a Angular Dialog seems to mess with the focus logic somehow.\n // My guess is that is makes the mousedown event passive, which prevents \"preventDefault\" from intercepting.\n // I am not sure how to fix it, but this seems to be a workaround.\n setTimeout(() => element.focus(), 0);\n}\n\nexport default function DSLabelEditingProvider(\n eventBus,\n canvas,\n directEditing,\n modeling,\n resizeHandles,\n textRenderer,\n updateLabelHandler\n) {\n this._canvas = canvas;\n this._modeling = modeling;\n this._textRenderer = textRenderer;\n this._updateLabelHandler = updateLabelHandler;\n\n directEditing.registerProvider(this);\n\n // listen to dblclick on non-root elements\n eventBus.on(\"element.dblclick\", function (event) {\n activateDirectEdit(event.element, true);\n if (is(event.element, elementTypes.ACTIVITY)) {\n // if we edit an activity, we do not want the standard editing box\n numberStash = event.element.businessObject.number;\n stashUse = true;\n directEditing.complete();\n }\n });\n\n // complete on followup canvas operation\n eventBus.on(\n [\n \"element.mousedown\",\n \"drag.init\",\n \"canvas.viewbox.changing\",\n \"autoPlace\",\n \"popupMenu.open\",\n ],\n function () {\n if (directEditing.isActive()) {\n directEditing.complete();\n }\n }\n );\n\n // cancel on command stack changes\n eventBus.on([\"commandStack.changed\"], function () {\n if (directEditing.isActive()) {\n directEditing.cancel();\n }\n });\n\n eventBus.on(\"directEditing.activate\", function (event) {\n resizeHandles.removeResizers();\n let element = event.active.element;\n createAutocomplete(element);\n });\n\n eventBus.on(\"create.end\", 500, function (event) {\n let element = event.shape,\n canExecute = event.context.canExecute,\n isTouch = event.isTouch;\n\n if (isTouch) {\n return;\n }\n\n if (!canExecute) {\n return;\n }\n if (!is(element, elementTypes.ACTIVITY)) {\n activateDirectEdit(element);\n }\n let editingBox = document.getElementsByClassName(\n \"djs-direct-editing-content\"\n );\n focusElement(editingBox.item(0));\n });\n\n eventBus.on(\"autoPlace.end\", 500, function (event) {\n activateDirectEdit(event.shape);\n });\n\n function activateDirectEdit(element, force) {\n if (\n force ||\n isAny(element, [elementTypes.TEXTANNOTATION]) ||\n element.businessObject.type.includes(elementTypes.DOMAINSTORY)\n ) {\n directEditing.activate(element);\n }\n }\n\n function createAutocomplete(element) {\n let editingBox = document.getElementsByClassName(\n \"djs-direct-editing-content\"\n );\n focusElement(editingBox.item(0));\n autocomplete(\n editingBox[0],\n dictionaryService.getUniqueWorkObjectNames(),\n element,\n eventBus\n );\n }\n}\n\nDSLabelEditingProvider.$inject = [\n \"eventBus\",\n \"canvas\",\n \"directEditing\",\n \"modeling\",\n \"resizeHandles\",\n \"textRenderer\",\n \"updateLabelHandler\",\n];\n\n/**\n * activate direct editing for activities and text annotations.\n *\n * @param {djs.model.Base} element\n *\n * @return {Object} an object with properties bounds (position and size), text and options\n */\nDSLabelEditingProvider.prototype.activate = function (element) {\n // text\n if (element.id === \"__implicitrootbase\") {\n return;\n }\n let text = getLabel(element);\n\n if (text === undefined) {\n return;\n }\n\n let context = {\n text: text,\n };\n\n // bounds\n let bounds = this.getEditingBBox(element);\n\n assign(context, bounds);\n\n let options = {};\n\n // external labels\n if (isLabelExternal(element)) {\n assign(options, {\n autoResize: true,\n });\n }\n\n // text annotations\n if (is(element, elementTypes.TEXTANNOTATION)) {\n assign(options, {\n resizable: true,\n autoResize: true,\n });\n }\n\n assign(context, {\n options: options,\n });\n\n return context;\n};\n\n/**\n * get the editing bounding box based on the element's size and position\n *\n * @param {djs.model.Base} element\n *\n * @return {Object} an object containing information about position\n * and size (fixed or minimum and/or maximum)\n */\nDSLabelEditingProvider.prototype.getEditingBBox = function (element) {\n let canvas = this._canvas;\n\n let target = element.label || element;\n\n let bbox = canvas.getAbsoluteBBox(target);\n\n let mid = {\n x: bbox.x + bbox.width / 2,\n y: bbox.y + bbox.height / 2,\n };\n\n // default position\n let bounds = { x: bbox.x, y: bbox.y };\n\n /** The cavnas is an Object from BPMN, the IDE might say, that zoom is deprecated,\n * because it thinks canvas is the standard HTMLElement. -> Needs to stay toom **/\n let zoom = canvas.zoom();\n let defaultStyle = this._textRenderer.getDefaultStyle(),\n externalStyle = this._textRenderer.getExternalStyle();\n\n // take zoom into account\n let externalFontSize = externalStyle.fontSize * zoom,\n externalLineHeight = externalStyle.lineHeight,\n defaultFontSize = defaultStyle.fontSize * zoom,\n defaultLineHeight = defaultStyle.lineHeight;\n\n let style = {\n fontFamily: this._textRenderer.getDefaultStyle().fontFamily,\n fontWeight: this._textRenderer.getDefaultStyle().fontWeight,\n };\n\n // adjust for groups\n if (is(element, elementTypes.GROUP)) {\n assign(bounds, {\n minWidth: bbox.width / 2.5 > 125 ? bbox.width / 2.5 : 125,\n maxWidth: bbox.width,\n minHeight: 30 * zoom,\n x: bbox.x,\n y: bbox.y,\n });\n\n assign(style, {\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n textAlign: \"left\",\n });\n }\n\n // internal labels for tasks and collapsed call activities,\n // sub processes and participants\n if (\n /^domainStory:actor\\w*/.test(element.type) ||\n /^domainStory:workObject\\w*/.test(element.type)\n ) {\n assign(bounds, {\n width: bbox.width,\n minHeight: 30,\n y: bbox.y + bbox.height - 20,\n x: bbox.x,\n });\n\n assign(style, {\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n });\n }\n\n let width = 90 * zoom,\n paddingTop = 7 * zoom,\n paddingBottom = 4 * zoom;\n\n // external labels for events, data elements, gateways and connections\n if (target.labelTarget) {\n assign(bounds, {\n width: width,\n height: bbox.height + paddingTop + paddingBottom,\n x: mid.x - width / 2,\n y: bbox.y - paddingTop,\n });\n\n assign(style, {\n fontSize: externalFontSize + \"px\",\n lineHeight: externalLineHeight,\n paddingTop: paddingTop + \"px\",\n paddingBottom: paddingBottom + \"px\",\n });\n }\n\n // external label not yet created\n if (\n isLabelExternal(target) &&\n !hasExternalLabel(target) &&\n !isLabel(target)\n ) {\n let externalLabelMid = getExternalLabelMid(element);\n\n let absoluteBBox = canvas.getAbsoluteBBox({\n x: externalLabelMid.x,\n y: externalLabelMid.y,\n width: 0,\n height: 0,\n });\n\n let height = externalFontSize + paddingTop + paddingBottom;\n\n assign(bounds, {\n width: width,\n height: height,\n x: absoluteBBox.x - width / 2,\n y: absoluteBBox.y - height / 2,\n });\n\n assign(style, {\n fontSize: externalFontSize + \"px\",\n lineHeight: externalLineHeight,\n paddingTop: paddingTop + \"px\",\n paddingBottom: paddingBottom + \"px\",\n });\n }\n\n // text annotations\n if (is(element, elementTypes.TEXTANNOTATION)) {\n assign(bounds, {\n width: bbox.width,\n height: bbox.height,\n minWidth: 30 * zoom,\n minHeight: 10 * zoom,\n });\n\n assign(style, {\n textAlign: \"left\",\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n });\n }\n\n return { bounds: bounds, style: style };\n};\n\nDSLabelEditingProvider.prototype.update = function (\n element,\n newLabel,\n activeContextText,\n bounds\n) {\n let newBounds, bbox;\n\n if (is(element, elementTypes.TEXTANNOTATION)) {\n bbox = this._canvas.getAbsoluteBBox(element);\n\n newBounds = {\n x: element.x,\n y: element.y,\n width: (element.width / bbox.width) * bounds.width,\n height: (element.height / bbox.height) * bounds.height,\n };\n }\n\n this._modeling.updateLabel(element, newLabel, newBounds);\n};\n","\"use strict\";\n\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { is } from \"../util\";\n\nfunction getLabelAttr(semantic) {\n if (\n semantic.type.includes(elementTypes.ACTOR) ||\n semantic.type.includes(elementTypes.WORKOBJECT) ||\n semantic.type.includes(elementTypes.ACTIVITY) ||\n semantic.type.includes(elementTypes.GROUP)\n ) {\n return \"name\";\n }\n\n if (is(semantic, elementTypes.TEXTANNOTATION)) {\n return \"text\";\n }\n}\n\nfunction getNumberAttr(semantic) {\n if (is(semantic, elementTypes.ACTIVITY)) {\n return \"number\";\n }\n}\n\nexport function getLabel(element) {\n let semantic;\n if (element.businessObject) {\n semantic = element.businessObject;\n } else {\n semantic = element;\n }\n let attr = getLabelAttr(semantic);\n if (attr && semantic) {\n return semantic[attr] || \"\";\n }\n}\n\nexport function getNumber(element) {\n let semantic = element.businessObject,\n attr = getNumberAttr(semantic);\n\n if (attr) {\n return semantic[attr] || \"\";\n }\n}\n\nexport function setLabel(element, text) {\n let semantic;\n if (element.businessObject) {\n semantic = element.businessObject;\n } else {\n semantic = element;\n }\n let attr = getLabelAttr(semantic);\n\n if (attr) {\n semantic[attr] = text;\n }\n return element;\n}\n\nexport function setNumber(element, textNumber) {\n let semantic = element.businessObject,\n attr = getNumberAttr(semantic);\n\n if (attr) {\n semantic[attr] = textNumber;\n }\n\n return element;\n}\n\n// select at which part of the activity the label should be attached to\nexport function selectPartOfActivity(waypoints, angleActivity) {\n let selectedActivity = 0;\n let linelength = 49;\n\n for (let i = 0; i < waypoints.length; i++) {\n if (angleActivity[i] === 0 || angleActivity[i] === 180) {\n let length = Math.abs(waypoints[i].x - waypoints[i + 1].x);\n if (length > linelength) {\n selectedActivity = i;\n }\n }\n }\n return selectedActivity;\n}\n\n// approximate the width of the label text, standard fontsize: 11\nexport function calculateTextWidth(text) {\n if (!text) {\n return 0;\n }\n\n let fontsize = text.length * 5.1;\n fontsize = fontsize / 2;\n\n // add an initial offset to the absolute middle of the activity\n fontsize += 20;\n return fontsize;\n}\n\n/**\n * copied from https://www.w3schools.com/howto/howto_js_autocomplete.asp on 18.09.2018\n */\nexport function autocomplete(input, workObjectNames, element, eventBus) {\n closeAllLists();\n\n /* the autocomplete function takes three arguments,\n the text field element and an array of possible autocompleted values and an optional element to which it is appended:*/\n let currentFocus, filteredWorkObjectNames;\n\n /* execute a function when someone writes in the text field:*/\n input.addEventListener(\"input\", function () {\n if (workObjectNames.length === 0) {\n return;\n }\n\n /* the direct editing field of actors and workobjects is a recycled html-element and has old values that need to be overridden*/\n if (element.type.includes(elementTypes.WORKOBJECT)) {\n this.value = this.innerHTML;\n }\n let autocompleteList,\n autocompleteItem,\n val = this.value;\n\n /* close any already open lists of autocompleted values*/\n closeAllLists();\n currentFocus = -1;\n\n /* create a DIV element that will contain the items (values):*/\n autocompleteList = document.createElement(\"DIV\");\n autocompleteList.setAttribute(\"id\", \"autocomplete-list\");\n autocompleteList.setAttribute(\"class\", \"autocomplete-items\");\n\n /* append the DIV element as a child of the autocomplete container:*/\n this.parentNode.appendChild(autocompleteList);\n\n /* for each item in the array...*/\n filteredWorkObjectNames = [];\n for (const name of workObjectNames) {\n /* check if the item starts with the same letters as the text field value:*/\n if (val) {\n if (name.substring(0, val.length).toUpperCase() === val.toUpperCase()) {\n /* create a DIV element for each matching element:*/\n autocompleteItem = document.createElement(\"DIV\");\n\n /* make the matching letters bold:*/\n autocompleteItem.innerHTML =\n \"\" +\n name.substring(0, val.length) +\n \"\" +\n name.substring(val.length);\n\n /* insert an input field that will hold the current name:*/\n autocompleteItem.innerHTML +=\n \"\";\n autocompleteList.appendChild(autocompleteItem);\n\n filteredWorkObjectNames.push(name);\n }\n }\n }\n\n // if we edit an actor, we do not want auto-complete, since actors generally are unique\n if (element.type.includes(elementTypes.ACTOR)) {\n autocompleteList.style.visibility = \"hidden\";\n }\n });\n\n /* execute a function presses a key on the keyboard:*/\n input.onkeydown = function (e) {\n let autocompleteList = document.getElementById(\"autocomplete-list\");\n if (autocompleteList) {\n autocompleteList = autocompleteList.getElementsByTagName(\"div\");\n }\n if (e.keyCode === 40) {\n /* If the arrow DOWN key is pressed,\n increase the currentFocus letiable:*/\n currentFocus++;\n\n /* and and make the current item more visible:*/\n addActive(autocompleteList);\n } else if (e.keyCode === 38) {\n // up\n /* If the arrow UP key is pressed,\n decrease the currentFocus letiable:*/\n currentFocus--;\n\n /* and and make the current item more visible:*/\n addActive(autocompleteList);\n } else if (e.keyCode === 13) {\n e.preventDefault();\n /* If the ENTER key is pressed, prevent the form from being submitted,*/\n if (currentFocus > -1) {\n element.businessObject.name = filteredWorkObjectNames[currentFocus];\n eventBus.fire(\"element.changed\", { element });\n }\n }\n };\n\n function addActive(autocompleteList) {\n /* a function to classify an item as \"active\":*/\n if (!autocompleteList || autocompleteList.length < 1) return false;\n\n /* start by removing the \"active\" class on all items:*/\n removeActive(autocompleteList);\n if (currentFocus >= autocompleteList.length) currentFocus = 0;\n if (currentFocus < 0) currentFocus = autocompleteList.length - 1;\n\n /* add class \"autocomplete-active\":*/\n autocompleteList[currentFocus].classList.add(\"autocomplete-active\");\n }\n\n function removeActive(autocompleteList) {\n /* a function to remove the \"active\" class from all autocomplete items:*/\n if (autocompleteList.length > 1) {\n for (const item of autocompleteList) {\n item.classList.remove(\"autocomplete-active\");\n }\n }\n }\n\n function closeAllLists(survivor) {\n /* close all autocomplete lists in the document,\n except the one passed as an argument:*/\n let autocompleteList =\n document.getElementsByClassName(\"autocomplete-items\");\n for (const item of autocompleteList) {\n if (survivor != item && survivor != input) {\n item.parentNode.removeChild(item);\n }\n }\n }\n\n /* execute a function when someone clicks in the document:*/\n document.addEventListener(\"click\", function (e) {\n closeAllLists(e.target);\n });\n}\n","\"use strict\";\n\nimport ChangeSupportModule from \"diagram-js/lib/features/change-support\";\nimport ResizeModule from \"diagram-js/lib/features/resize\";\nimport DirectEditingModule from \"diagram-js-direct-editing\";\n\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"../updateHandler/updateLabelHandler\";\nimport DSLabelEditingPreview from \"./dsLabelEditingPreview\";\nimport DSLabelEditingProvider from \"./dsLabelEditingProvider\";\nimport DSModeling from \"../modeling/dSModeling\";\n\nexport default {\n __depends__: [ChangeSupportModule, ResizeModule, DirectEditingModule],\n __init__: [\"dSlabelEditingProvider\", \"dSlabelEditingPreview\"],\n dSlabelEditingProvider: [\"type\", DSLabelEditingProvider],\n dSlabelEditingPreview: [\"type\", DSLabelEditingPreview],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n commandStack: [\"type\", CommandStack],\n modeling: [\"type \", DSModeling],\n};\n","\"use strict\";\n\nimport { selectPartOfActivity } from \"./dsLabelUtil\";\nimport { angleBetween } from \"../../../Utils/mathExtensions\";\n\nexport function countLines(str) {\n return str.split(/\\r\\n|\\r|\\n/).length;\n}\n\n// determine the position of the label at the activity\nexport function labelPosition(waypoints, lines = 1) {\n let amountWaypoints = waypoints.length;\n let determinedPosition;\n let xPos;\n let yPos;\n\n if (amountWaypoints > 2) {\n let angleActivity = new Array(amountWaypoints - 1);\n for (let i = 0; i < amountWaypoints - 1; i++) {\n // calculate the angles of the activities\n angleActivity[i] = angleBetween(waypoints[i], waypoints[i + 1]);\n }\n\n let selectedActivity = selectPartOfActivity(waypoints, angleActivity);\n\n xPos = labelPositionX(\n waypoints[selectedActivity],\n waypoints[selectedActivity + 1]\n );\n yPos = labelPositionY(\n waypoints[selectedActivity],\n waypoints[selectedActivity + 1],\n lines\n );\n\n determinedPosition = {\n x: xPos,\n y: yPos,\n selected: selectedActivity,\n };\n\n return determinedPosition;\n } else {\n xPos = labelPositionX(waypoints[0], waypoints[1]);\n yPos = labelPositionY(waypoints[0], waypoints[1], lines);\n\n determinedPosition = {\n x: xPos,\n y: yPos,\n selected: 0,\n };\n\n return determinedPosition;\n }\n}\n\n// calculate the X position of the label\nexport function labelPositionX(startPoint, endPoint) {\n let angle = angleBetween(startPoint, endPoint);\n let offsetX = 0;\n let scaledAngle = 0;\n if (angle === 0 || angle === 180 || angle === 90 || angle === 270) {\n offsetX = 0;\n } else if (angle > 0 && angle < 90) {\n // endpoint in upper right quadrant\n offsetX = 5 - angle / 6;\n } else if (angle > 90 && angle < 180) {\n // endpoint in upper left quadrant\n scaledAngle = angle - 90;\n offsetX = 5 - scaledAngle / 18;\n } else if (angle > 180 && angle < 270) {\n // endpoint in lower left quadrant\n scaledAngle = angle - 180;\n offsetX = scaledAngle / 18;\n } else if (angle > 270) {\n // endpoint in lower right quadrant\n scaledAngle = angle - 270;\n offsetX = 5 - scaledAngle / 6;\n }\n return offsetX + (startPoint.x + endPoint.x) / 2;\n}\n\n// calculate the Y position of the label\nexport function labelPositionY(startPoint, endPoint, lines = 1) {\n let angle = angleBetween(startPoint, endPoint);\n let offsetY = 0;\n let scaledAngle = 0;\n\n if (angle === 0 || angle === 180) {\n offsetY = 15;\n } else if (angle === 90 || angle === 270) {\n offsetY = 0;\n } else if (angle > 0 && angle < 90) {\n // endpoint in upper right quadrant\n offsetY = 15 - angle / 6;\n } else if (angle > 90 && angle < 180) {\n // endpoint in upper left quadrant\n scaledAngle = angle - 90;\n offsetY = (-scaledAngle / 9) * lines;\n } else if (angle > 180 && angle < 270) {\n // endpoint in lower left quadrant\n scaledAngle = angle - 180;\n offsetY = 15 - scaledAngle / 3;\n } else if (angle > 270) {\n // endpoint in lower right quadrant\n scaledAngle = angle - 270;\n offsetY = (-scaledAngle / 9) * lines;\n }\n return offsetY + (startPoint.y + endPoint.y) / 2;\n}\n","\"use strict\";\n\nimport Modeling from \"bpmn-js/lib/features/modeling/Modeling\";\n\nimport { inherits } from \"util\";\n\nexport default function DSModeling(\n eventBus,\n elementFactory,\n commandStack,\n domainStoryRules\n) {\n Modeling.call(this, eventBus, elementFactory, commandStack, domainStoryRules);\n}\n\nModeling.prototype.updateLabel = function (element, newLabel, newBounds) {\n if (\n element.businessObject\n ? newLabel !== element.businessObject.name\n : newLabel !== element.name\n ) {\n if (/^domainStory:/.test(element.type)) {\n this._commandStack.execute(\"element.updateCustomLabel\", {\n element: element,\n newLabel: newLabel,\n newBounds: newBounds,\n });\n } else {\n this._commandStack.execute(\"element.updateLabel\", {\n element: element,\n newLabel: newLabel,\n newBounds: newBounds,\n });\n }\n }\n};\n\nModeling.prototype.updateNumber = function (element, newNumber, newBounds) {\n if (\n element.businessObject\n ? newNumber !== element.businessObject.number\n : newNumber !== element.number\n ) {\n if (/^domainStory:/.test(element.type)) {\n this._commandStack.execute(\"element.updateCustomLabel\", {\n element: element,\n newNumber: newNumber,\n newBounds: newBounds,\n });\n } else {\n this._commandStack.execute(\"element.updateLabel\", {\n element: element,\n newNumber: newNumber,\n newBounds: newBounds,\n });\n }\n }\n};\n\nModeling.prototype.replaceShape = function (oldShape, newShape, hints) {\n let context = {\n oldShape: oldShape,\n newData: newShape,\n hints: hints || {},\n };\n\n this._commandStack.execute(\"shape.replace\", context);\n return context.newShape;\n};\n\nModeling.prototype.removeGroup = function (element) {\n this._commandStack.execute(\"shape.removeGroupWithoutChildren\", {\n element: element,\n });\n this.removeElements({ element });\n};\n\ninherits(DSModeling, Modeling);\n\nDSModeling.$inject = [\n \"eventBus\",\n \"elementFactory\",\n \"commandStack\",\n \"domainStoryRules\",\n];\n","\"use strict\";\n\nimport DomainStoryPalette from \"../palette/domainStoryPalette\";\nimport ElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\nimport CreateModule from \"diagram-js/lib/features/create\";\nimport PathMap from \"bpmn-js/lib/draw/PathMap\";\nimport PopupMenuModule from \"bpmn-js/lib/features/popup-menu\";\nimport ContextPadModule from \"diagram-js/lib/features/context-pad\";\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"../updateHandler/updateLabelHandler\";\nimport DomainStoryUpdater from \"../domainStoryUpdater\";\nimport DomainStoryElementFactory from \"../domainStoryElementFactory\";\nimport headlineAndDescriptionUpdateHandler from \"../updateHandler/headlineAndDescriptionUpdateHandler\";\nimport DomainStoryRenderer from \"../domainStoryRenderer\";\nimport DSModeling from \"./dSModeling\";\nimport DomainStoryRules from \"../domainStoryRules\";\nimport ReplaceMenuProvider from \"../change-icon/replaceMenuProvider\";\nimport DomainStoryContextPadProvider from \"../context-pad/domainStoryContextPadProvider\";\n\nexport default {\n __depends__: [CreateModule, ContextPadModule, PopupMenuModule],\n __init__: [\n \"domainStoryRenderer\",\n \"paletteProvider\",\n \"domainStoryRules\",\n \"domainStoryUpdater\",\n \"contextPadProvider\",\n \"replaceMenuProvider\",\n ],\n elementFactory: [\"type\", DomainStoryElementFactory],\n domainStoryRenderer: [\"type\", DomainStoryRenderer],\n paletteProvider: [\"type\", DomainStoryPalette],\n domainStoryRules: [\"type\", DomainStoryRules],\n domainStoryUpdater: [\"type\", DomainStoryUpdater],\n contextPadProvider: [\"type\", DomainStoryContextPadProvider],\n elementFactoryBpmn: [\"type\", ElementFactory],\n pathMap: [\"type\", PathMap],\n replaceMenuProvider: [\"type\", ReplaceMenuProvider],\n commandStack: [\"type\", CommandStack],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n headlineAndDescriptionUpdateHandler: [\n \"type\",\n headlineAndDescriptionUpdateHandler,\n ],\n modeling: [\"type\", DSModeling],\n};\n","\"use strict\";\n\nimport { labelPosition } from \"../labeling/position\";\nimport { angleBetween } from \"../../../Utils/mathExtensions\";\n\nlet numberRegistry = [];\nlet multipleNumberRegistry = [false];\n\nlet canvasElementRegistry;\n\nexport function initializeNumbering(canvasElementRegistryService) {\n canvasElementRegistry = canvasElementRegistryService;\n}\n\n// defines the box for activity numbers\nexport function numberBoxDefinitions(element) {\n let alignment = \"center\";\n let boxWidth = 30;\n let boxHeight = 30;\n let position = labelPosition(element.waypoints);\n let angle = 0;\n if (element.waypoints.length > 1) {\n angle = angleBetween(element.waypoints[0], element.waypoints[1]);\n }\n let x = position.x;\n let y = position.y;\n\n // TODO: Use trigonometric functions to make the positioning more consistent.\n // This would require to touch the label code as well.\n if (angle >= 0 && angle <= 45) {\n y = y - 30 + angle / 2;\n x = x - 25 - angle / 2;\n } else if (angle <= 90) {\n y = y - 10 + (angle - 45) / 4.5;\n x = x - 35 - angle / 9;\n } else if (angle <= 145) {\n y = y + angle / 7.25;\n x = x - 45 - angle / 14.5;\n } else if (angle < 180) {\n y = y + 20 + angle / 9;\n x = x - 50 + angle / 4.5;\n } else if (angle <= 225) {\n y = y - 45 + angle / 12.25;\n x = x + 10 - angle / 6.125;\n } else if (angle <= 270) {\n y = y - 80 + angle / 3.375;\n x = x - 5 - angle / 6.125;\n } else if (angle <= 315) {\n y = y - 135 + angle / 2;\n x = x - 50;\n } else {\n y = y + 22.5 + (angle - 315) / 6;\n x = x - 50 + (angle - 315) / 1.8;\n }\n\n return {\n textAlign: alignment,\n width: boxWidth,\n height: boxHeight,\n x: x,\n y: y,\n };\n}\n\n// determine the next available number that is not yet used\nexport function generateAutomaticNumber(elementActivity, commandStack) {\n const semantic = elementActivity.businessObject;\n const usedNumbers = [0];\n let wantedNumber = -1;\n\n const activitiesFromActors = canvasElementRegistry.getActivitiesFromActors();\n\n activitiesFromActors.forEach((element) => {\n if (element.businessObject.number) {\n usedNumbers.push(+element.businessObject.number);\n }\n });\n for (let i = 0; i < usedNumbers.length; i++) {\n if (!usedNumbers.includes(i)) {\n if (!usedNumbers.includes(i)) {\n wantedNumber = i;\n i = usedNumbers.length;\n }\n }\n }\n if (wantedNumber === -1) {\n wantedNumber = usedNumbers.length;\n }\n\n updateExistingNumbersAtGeneration(\n activitiesFromActors,\n wantedNumber,\n commandStack\n );\n semantic.number = wantedNumber;\n return wantedNumber;\n}\n\n// update the numbers at the activities when generating a new activity\nexport function updateExistingNumbersAtGeneration(\n activitiesFromActors,\n wantedNumber,\n commandStack\n) {\n activitiesFromActors.forEach((element) => {\n let number = +element.businessObject.number;\n\n if (number >= wantedNumber) {\n wantedNumber++;\n setTimeout(function () {\n commandStack.execute(\"activity.changed\", {\n businessObject: element.businessObject,\n newLabel: element.businessObject.name,\n newNumber: number,\n element: element,\n });\n }, 10);\n }\n });\n}\n\n// update the numbers at the activities when editing an activity\nexport function updateExistingNumbersAtEditing(\n activitiesFromActors,\n wantedNumber,\n eventBus\n) {\n // get a sorted list of all activities that could need changing\n let sortedActivities = [[]];\n activitiesFromActors.forEach((activity) => {\n if (!sortedActivities[activity.businessObject.number]) {\n sortedActivities[activity.businessObject.number] = [];\n }\n sortedActivities[activity.businessObject.number].push(activity);\n });\n\n // set the number of each activity to the next highest number, starting from the number, we overrode\n let currentNumber = wantedNumber;\n for (\n currentNumber;\n currentNumber < sortedActivities.length;\n currentNumber++\n ) {\n if (sortedActivities[currentNumber]) {\n wantedNumber++;\n setNumberOfActivity(\n sortedActivities[currentNumber],\n wantedNumber,\n eventBus\n );\n }\n }\n}\n\n// get the IDs of activities with their associated number, only returns activities that are originating from an actor\nexport function getNumbersAndIDs() {\n let iDWithNumber = [];\n let activities = canvasElementRegistry.getActivitiesFromActors();\n\n for (let i = activities.length - 1; i >= 0; i--) {\n let id = activities[i].businessObject.id;\n let number = activities[i].businessObject.number;\n iDWithNumber.push({ id: id, number: number });\n }\n return iDWithNumber;\n}\n\nexport function addNumberToRegistry(renderedNumber, number) {\n numberRegistry[number] = renderedNumber;\n}\n\nexport function setNumberIsMultiple(number, multi) {\n multipleNumberRegistry[number] = multi;\n}\n\n/**\n * @returns copy of registry\n */\nexport function getNumberRegistry() {\n return numberRegistry.slice(0);\n}\n\nexport function getMultipleNumberRegistry() {\n return multipleNumberRegistry.slice(0);\n}\n\nfunction setNumberOfActivity(elementArray, wantedNumber, eventBus) {\n if (elementArray) {\n elementArray.forEach((element) => {\n if (element) {\n let businessObject = element.businessObject;\n if (businessObject) {\n businessObject.number = wantedNumber;\n }\n eventBus.fire(\"element.changed\", { element });\n }\n });\n }\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\nimport { overrideAppendedIcons } from \"src/app/Domain/Domain-Configuration/allIcons\";\nimport { Dictionary } from \"src/app/Domain/Common/dictionary/dictionary\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { getNameFromType } from \"src/app/Utils/naming\";\nimport { APPENDED_ICONS_TAG } from \"../../../Domain/Common/constants\";\n\n/**\n * A palette that allows you to create BPMN _and_ custom elements.\n */\n\nlet iconDictionary;\nlet configuration;\n\nexport function initializePalette(iconDictionaryService, configurationService) {\n iconDictionary = iconDictionaryService;\n configuration = configurationService;\n}\n\nexport default function PaletteProvider(\n palette,\n create,\n elementFactory,\n spaceTool,\n lassoTool\n) {\n this._create = create;\n this._elementFactory = elementFactory;\n this._spaceTool = spaceTool;\n this._lassoTool = lassoTool;\n\n palette.registerProvider(this);\n}\n\nPaletteProvider.$inject = [\n \"palette\",\n \"create\",\n \"elementFactory\",\n \"spaceTool\",\n \"lassoTool\",\n \"modeling\",\n];\n\nPaletteProvider.prototype.getPaletteEntries = function () {\n let actions = {},\n create = this._create,\n elementFactory = this._elementFactory,\n spaceTool = this._spaceTool,\n lassoTool = this._lassoTool;\n\n function createAction(type, group, className, title, options) {\n function createListener(event) {\n let shape = elementFactory.createShape(assign({ type: type }, options));\n\n assign(shape.businessObject, {\n id: shape.id,\n });\n\n if (options) {\n shape.businessObject.di.isExpanded = options.isExpanded;\n }\n\n create.start(event, shape);\n }\n\n let shortType = type.replace(/^domainStory:/, \"\");\n\n return {\n group: group,\n className: className,\n title: \"Create \" + title || \"Create \" + shortType,\n action: {\n dragstart: createListener,\n click: createListener,\n },\n };\n }\n\n return initPalette(actions, spaceTool, lassoTool, createAction);\n};\n\nfunction appendCSSStyleCheat(customIcons) {\n const sheetEl = document.createElement(\"style\");\n document.head.appendChild(sheetEl);\n\n let customIconDict = new Dictionary();\n\n customIconDict.appendDict(customIcons);\n let customIconDictKeys = customIconDict.keysArray();\n\n customIconDictKeys.forEach((name) => {\n if (iconDictionary.getAppendedIconDictionary().has(name)) {\n let src = customIconDict.get(name);\n\n const iconStyle =\n \".icon-domain-story-\" +\n name.toLowerCase() +\n \"::before{\" +\n \" display: block;\" +\n ' content: url(\"data:image/svg+xml;utf8,' +\n wrapSRCInSVG(src) +\n '\");' +\n \" margin: 3px;}\";\n sheetEl.sheet.insertRule(iconStyle, sheetEl.sheet.cssRules.length);\n }\n });\n}\n\nfunction initPalette(actions, spaceTool, lassoTool, createAction) {\n let config = iconDictionary?.getCurrentIconConfigurationForBPMN();\n\n let customIcons = localStorage.getItem(APPENDED_ICONS_TAG);\n\n if (customIcons) {\n customIcons = JSON.parse(customIcons);\n if (customIconsLegacy(customIcons)) {\n customIcons = convertLegacyAppendedIconsToDict(customIcons);\n }\n if (customIcons.entries && customIcons.entries.forEach) {\n const customIconsDict = new Dictionary();\n customIcons.entries.forEach((entry) => {\n customIconsDict.putEntry(entry);\n });\n overrideAppendedIcons(customIconsDict);\n appendCSSStyleCheat(customIcons);\n }\n }\n\n iconDictionary?.initTypeDictionaries(config.actors, config.workObjects);\n\n let actorTypes = iconDictionary?.getTypeDictionary(elementTypes.ACTOR);\n\n actorTypes?.keysArray().forEach((actorType) => {\n addCanvasObjectTypes(actorType, createAction, actions, \"actor\");\n });\n\n assign(actions, {\n \"actor-separator\": {\n group: \"actor\",\n separator: true,\n },\n });\n\n let workObjectTypes = iconDictionary?.getTypeDictionary(\n elementTypes.WORKOBJECT\n );\n\n workObjectTypes?.keysArray().forEach((workObjectType) => {\n addCanvasObjectTypes(workObjectType, createAction, actions, \"actor\");\n });\n\n assign(actions, {\n \"workObject-separator\": {\n group: \"workObject\",\n separator: true,\n },\n \"domainStory-group\": createAction(\n elementTypes.GROUP,\n \"group\",\n \"icon-domain-story-tool-group\",\n \"group\"\n ),\n \"group-separator\": {\n group: \"group\",\n separator: true,\n },\n \"lasso-tool\": {\n group: \"tools\",\n className: \"bpmn-icon-lasso-tool\",\n title: \"Activate the lasso tool\",\n action: {\n click: function (event) {\n lassoTool.activateSelection(event);\n },\n },\n },\n \"space-tool\": {\n group: \"tools\",\n className: \"bpmn-icon-space-tool\",\n title: \"Activate the create/remove space tool\",\n action: {\n click: function (event) {\n spaceTool.activateSelection(event);\n },\n },\n },\n });\n\n return actions;\n}\n\nfunction addCanvasObjectTypes(actorType, createAction, actions, className) {\n let name = getNameFromType(actorType);\n let icon = iconDictionary.getIconForBPMN(actorType);\n\n let action = [];\n action[\"domainStory-\" + className + name] = createAction(\n actorType,\n className,\n icon,\n name\n );\n assign(actions, action);\n}\n\nfunction customIconsLegacy(customIcons) {\n return !(\n Object.keys(customIcons).length === 1 &&\n Object.keys(customIcons)[0] === \"entries\"\n );\n}\n\nfunction convertLegacyAppendedIconsToDict(customIcons) {\n let dict = new Dictionary();\n Object.keys(customIcons).forEach((key) => {\n dict.set(key, customIcons[key]);\n });\n return dict;\n}\n\n// For some reason its important to use ' in the content for the Palette and ContextPad\n// Do not change!\nfunction wrapSRCInSVG(src) {\n return (\n \"\" +\n \"\"\n );\n}\n","\"use strict\";\n\nimport { getNumbersAndIDs } from \"../numbering/numbering\";\n\n/**\n * commandStack Handler for changes at activities\n */\n\nlet canvasElementRegistry;\nexport function initializeActivityUpdateHandler(canvasElementRegistryService) {\n canvasElementRegistry = canvasElementRegistryService;\n}\n\nexport default function activityUpdateHandler(commandStack, eventBus) {\n commandStack.registerHandler(\n \"activity.directionChange\",\n activity_directionChange\n );\n commandStack.registerHandler(\"activity.changed\", activity_changed);\n\n // update the activity from the activity-dialog, either with or without number\n // and change other activities too, to keep the numbers consistent\n function activity_changed(modeling) {\n this.preExecute = function (context) {\n context.oldLabel = context.businessObject.name || \" \";\n\n let oldNumbersWithIDs = getNumbersAndIDs();\n modeling.updateLabel(context.businessObject, context.newLabel);\n modeling.updateNumber(context.businessObject, context.newNumber);\n\n context.oldNumber = context.businessObject.number;\n context.oldNumbersWithIDs = oldNumbersWithIDs;\n };\n\n this.execute = function (context) {\n let businessObject = context.businessObject;\n let element = context.element;\n\n if (context.newLabel && context.newLabel.length < 1) {\n context.newLabel = \" \";\n }\n\n businessObject.name = context.newLabel;\n businessObject.number = context.newNumber;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n semantic.name = context.oldLabel;\n semantic.number = context.oldNumber;\n\n revertAutomaticNumberGenerationChange(\n context.oldNumbersWithIDs,\n eventBus\n );\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n\n // change the direction of a single activity without affecting other activities\n function activity_directionChange(modeling) {\n this.preExecute = function (context) {\n context.oldNumber = context.businessObject.number;\n context.oldWaypoints = context.element.waypoints;\n context.name = context.businessObject.name;\n\n if (!context.oldNumber) {\n context.oldNumber = 0;\n }\n modeling.updateNumber(context.businessObject, context.newNumber);\n };\n\n this.execute = function (context) {\n let businessObject = context.businessObject;\n let element = context.element;\n let swapSource = element.source;\n let newWaypoints = [];\n let waypoints = element.waypoints;\n\n for (let i = waypoints.length - 1; i >= 0; i--) {\n newWaypoints.push(waypoints[i]);\n }\n\n element.source = element.target;\n businessObject.source = businessObject.target;\n element.target = swapSource;\n businessObject.target = swapSource.id;\n\n businessObject.name = context.name;\n businessObject.number = context.newNumber;\n element.waypoints = newWaypoints;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n let swapSource = element.source;\n\n element.source = element.target;\n semantic.source = semantic.target;\n element.target = swapSource;\n semantic.target = swapSource.id;\n\n semantic.name = context.name;\n\n semantic.number = context.oldNumber;\n element.waypoints = context.oldWaypoints;\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n}\n\n// reverts the automatic changed done by the automatic number-generation at editing\nfunction revertAutomaticNumberGenerationChange(iDWithNumber, eventBus) {\n let activities = canvasElementRegistry?.getActivitesFromActors();\n for (let i = activities.length - 1; i >= 0; i--) {\n for (let j = iDWithNumber.length - 1; j >= 0; j--) {\n if (iDWithNumber[j].id.includes(activities[i].businessObject.id)) {\n let element = activities[i];\n element.businessObject.number = iDWithNumber[j].number;\n j = -5;\n eventBus.fire(\"element.changed\", { element });\n iDWithNumber.splice(j, 1);\n }\n }\n }\n}\n","\"use strict\";\n\nimport { undoGroupRework } from \"../util\";\n\nexport default function elementUpdateHandler(commandStack, eventBus) {\n commandStack.registerHandler(\"element.colorChange\", element_colorChange);\n commandStack.registerHandler(\n \"shape.removeGroupWithoutChildren\",\n removeGroupWithoutChildren\n );\n\n function element_colorChange() {\n this.preExecute = function (context) {\n context.oldColor = context.businessObject.pickedColor;\n };\n\n this.execute = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n\n semantic.pickedColor = context.newColor;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n\n semantic.pickedColor = context.oldColor;\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n\n function removeGroupWithoutChildren() {\n this.preExecute = function (ctx) {\n ctx.parent = ctx.element.parent;\n ctx.children = ctx.element.children.slice();\n };\n\n this.execute = function (ctx) {\n let element = ctx.element;\n ctx.children.forEach((child) => {\n undoGroupRework(element, child);\n eventBus.fire(\"element.changed\", { element: child });\n });\n eventBus.fire(\"shape.remove\", { element });\n };\n\n this.revert = function (ctx) {\n let element = ctx.element;\n eventBus.fire(\"shape.added\", { element });\n\n ctx.element.children.forEach((child) => {\n reworkGroupElements(element, child);\n });\n };\n }\n}\n","/**\n * a handler that updates the text of a BPMN element.\n */\nexport default function headlineAndDescriptionUpdateHandler(\n commandStack,\n titleService\n) {\n commandStack.registerHandler(\n \"story.updateHeadlineAndDescription\",\n handlerFunction\n );\n\n function handlerFunction() {\n this.execute = function (ctx) {\n ctx.oldTitle = titleService.getTitle();\n ctx.oldDescription = titleService.getDescription();\n\n titleService.updateTitleAndDescription(\n ctx.newTitle,\n ctx.newDescription,\n false\n );\n };\n\n this.revert = function (ctx) {\n titleService.updateTitleAndDescription(\n ctx.oldTitle,\n ctx.oldDescription,\n false\n );\n };\n }\n}\n","\"use strict\";\n\nexport default function DSMassRenameHandler(commandStack, eventBus) {\n commandStack.registerHandler(\"domainStoryObjects.massRename\", massRename);\n\n function massRename(modeling) {\n this.preExecute = function (context) {\n let relevantElements = context.elements;\n\n context.oldLabel = relevantElements[0].businessObject.name;\n\n relevantElements.forEach((element) => {\n modeling.updateLabel(element.businessObject, confirm.newValue);\n });\n };\n\n this.execute = function (context) {\n let relevantElements = context.elements;\n relevantElements.forEach((element) => {\n let semantic = element.businessObject;\n semantic.name = context.newValue;\n\n eventBus.fire(\"element.changed\", { element });\n });\n };\n\n this.revert = function (context) {\n let relevantElements = context.elements;\n relevantElements.forEach((element) => {\n let semantic = element.businessObject;\n semantic.name = context.oldLabel;\n\n eventBus.fire(\"element.changed\", { element });\n });\n };\n }\n}\n","\"use strict\";\n\nimport {\n setLabel,\n getLabel,\n setNumber,\n getNumber,\n} from \"../labeling/dsLabelUtil\";\n\nimport {\n getExternalLabelMid,\n isLabelExternal,\n hasExternalLabel,\n isLabel,\n} from \"bpmn-js/lib/util/LabelUtil\";\n\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { getBusinessObject, is } from \"../util\";\n\nconst NULL_DIMENSIONS = {\n width: 0,\n height: 0,\n};\n\n/**\n * a handler that updates the text of a BPMN element.\n */\nexport default function UpdateLabelHandler(\n modeling,\n textRenderer,\n commandStack\n) {\n commandStack.registerHandler(\"element.updateCustomLabel\", handlerFunction);\n\n function handlerFunction() {\n /**\n * Set the label and return the changed elements.\n *\n * Element parameter can be label itself or connection (i.e. sequence flow).\n *\n * @param {djs.model.Base} element\n * @param {String} text\n */\n\n this.preExecute = function (ctx) {\n let element = ctx.element,\n businessObject = element.businessObject,\n newLabel = ctx.newLabel,\n newNumber = ctx.newNumber;\n\n if (\n !isLabel(element) &&\n isLabelExternal(element) &&\n !hasExternalLabel(element) &&\n (newLabel !== \"\" || newNumber !== \"\")\n ) {\n // create label\n let paddingTop = 7;\n\n let labelCenter = getExternalLabelMid(element);\n\n labelCenter = {\n x: labelCenter.x,\n y: labelCenter.y + paddingTop,\n };\n\n modeling.createLabel(element, labelCenter, {\n id: businessObject.id + \"_label\",\n businessObject: businessObject,\n });\n }\n };\n\n this.execute = function (ctx) {\n ctx.oldLabel = getLabel(ctx.element);\n ctx.oldNumber = getNumber(ctx.element);\n return setText(ctx.element, ctx.newLabel, ctx.newNumber);\n };\n\n this.revert = function (ctx) {\n return setText(ctx.element, ctx.oldLabel, ctx.oldNumber);\n };\n\n this.postExecute = function (ctx) {\n let element = ctx.element,\n label = element.label || element,\n newLabel = ctx.newLabel,\n newBounds = ctx.newBounds;\n\n if (isLabel(label) && newLabel.trim() === \"\") {\n modeling.removeShape(label);\n\n return;\n }\n\n // ignore internal labels for elements except text annotations\n if (\n !isLabelExternal(element) &&\n !is(element, elementTypes.TEXTANNOTATION)\n ) {\n return;\n }\n\n let bo = getBusinessObject(label);\n\n let text = bo.name || bo.text;\n\n // don't resize without text\n if (!text) {\n return;\n }\n\n // resize element based on label _or_ pre-defined bounds\n if (typeof newBounds === \"undefined\") {\n newBounds = textRenderer.getLayoutedBounds(label, text);\n }\n\n // setting newBounds to false or _null_ will\n // disable the postExecute resize operation\n if (newBounds) {\n modeling.resizeShape(label, newBounds, NULL_DIMENSIONS);\n }\n };\n }\n}\n\nfunction setText(element, text, textNumber) {\n // external label if present\n let label = element.label || element;\n\n let number = element.number || element;\n\n let labelTarget = element.labelTarget || element;\n\n let numberTarget = element.numberTarget || element;\n setLabel(label, text);\n setNumber(number, textNumber);\n\n return [label, labelTarget, number, numberTarget];\n}\n\nUpdateLabelHandler.$inject = [\"modeling\", \"textRenderer\", \"commandStack\"];\n","import { some } from \"min-dash\";\n\nexport function is(element, type) {\n const bo = getBusinessObject(element);\n\n return bo && typeof bo.$instanceOf == \"function\" && bo.$instanceOf(type);\n}\n\nexport function getBusinessObject(element) {\n return (element && element.businessObject) || element;\n}\n\nexport function isAny(element, types) {\n return some(types, function (t) {\n return is(element, t);\n });\n}\n\nexport function reworkGroupElements(parent, shape) {\n parent.children.slice().forEach((innerShape) => {\n if (innerShape.id !== shape.id) {\n if (innerShape.x >= shape.x && innerShape.x <= shape.x + shape.width) {\n if (innerShape.y >= shape.y && innerShape.y <= shape.y + shape.height) {\n innerShape.parent = shape;\n if (!shape.children.includes(innerShape)) {\n shape.children.push(innerShape);\n }\n }\n }\n }\n });\n}\n\nexport function undoGroupRework(parent, shape) {\n const superParent = parent.parent;\n\n parent.children.remove(shape);\n superParent.children.add(shape);\n\n shape.parent = superParent;\n\n const svgShape = document.querySelector(\n \"[data-element-id=\" + shape.id + \"]\"\n ).parentElement;\n const svgGroup = svgShape.parentElement;\n const svgGroupParent = svgGroup.parentElement.parentElement;\n svgGroup.removeChild(svgShape);\n svgGroupParent.appendChild(svgShape);\n}\n","import {\n SVG_LINK,\n TEXTSPAN_DESCRIPTION_HEIGHT,\n TEXTSPAN_TITLE_HEIGHT,\n X_OFFSET_UTIL,\n} from \"../../Domain/Export/exportConstants\";\n\nlet extraHeight = 0;\n\n// Has to be js File so we can access te correct non-standard HTML-Properties without excessive usage of ts-ignore\nexport function createTitleAndDescriptionSVGElement(\n title,\n description,\n xLeft,\n yUp,\n width\n) {\n title = title.replace(\"<\", \"\").replace(\">\", \"\");\n\n let titleElement = createTitle(title, width);\n let descriptionElement = createDescription(description, width);\n\n // to display the title and description in the SVG-file, we need to add a container for our text-elements\n let insertText =\n '' +\n titleElement +\n descriptionElement +\n \"\";\n return { insertText, extraHeight };\n}\n\nfunction createTitle(text, width) {\n let tempCanvas = document.createElement(\"canvas\");\n let ctx = tempCanvas.getContext(\"2d\");\n ctx.font = \"30px Arial\";\n\n return createTextSpans(text, width, ctx, 10, TEXTSPAN_TITLE_HEIGHT, 30);\n}\n\nfunction createDescription(text, width) {\n let description = \"\";\n let descriptionParts = text.split(\"
\");\n\n let tempCanvas = document.createElement(\"canvas\");\n let ctx = tempCanvas.getContext(\"2d\");\n ctx.font = \"12px Arial\";\n\n for (let i = 0; i < descriptionParts.length; i++) {\n description += createTextSpans(\n descriptionParts[i],\n width,\n ctx,\n 0,\n TEXTSPAN_DESCRIPTION_HEIGHT,\n 12\n );\n }\n return description;\n}\n\nfunction createTextSpans(text, width, ctx, yOffset, heightOffset, fontSize) {\n let textSpans = \"\";\n let words = text.split(\" \");\n\n let textTag =\n '';\n\n let textSpan = document.createElementNS(SVG_LINK, \"tspan\");\n let textNode = document.createTextNode(words[0]);\n\n textSpan.setAttribute(\"x\", X_OFFSET_UTIL);\n textSpan.setAttribute(\"y\", yOffset + extraHeight);\n textSpan.setAttribute(\"font-size\", fontSize);\n textSpan.appendChild(textNode);\n\n for (let j = 1; j < words.length; j++) {\n if (textSpan.firstChild && textSpan.firstChild.data) {\n let len = textSpan.firstChild.data.length;\n textNode.data += \" \" + words[j];\n\n if (ctx.measureText(textNode.data).width > width - 16) {\n extraHeight += heightOffset;\n textSpan.firstChild.data = textSpan.firstChild.data.slice(0, len); // remove overflow word\n\n textSpans += textTag + textSpan.outerHTML + \"\"; // append line\n\n // create new textspan for line break\n textSpan = document.createElementNS(SVG_LINK, \"tspan\");\n textNode = document.createTextNode(words[j]);\n textSpan.setAttribute(\"x\", X_OFFSET_UTIL);\n textSpan.setAttribute(\"y\", yOffset + extraHeight);\n textSpan.appendChild(textNode);\n }\n }\n }\n extraHeight += heightOffset;\n\n textSpans += textTag + textSpan.outerHTML + \"\";\n return textSpans;\n}\n","import { elementTypes } from './elementTypes';\n\nexport interface BusinessObject {\n $descriptor: any;\n $type: any;\n di: any;\n get: any;\n set: any;\n\n id: string;\n name: string;\n\n type: string;\n\n x: number;\n y: number;\n height: number | undefined;\n width: number | undefined;\n pickedColor: string | undefined;\n}\n\nexport const testBusinessObject: BusinessObject = {\n $descriptor: undefined,\n $type: undefined,\n di: undefined,\n get: undefined,\n set: undefined,\n\n id: 'test',\n name: 'test',\n\n type: elementTypes.WORKOBJECT,\n\n x: 0,\n y: 0,\n height: 38,\n width: 38,\n pickedColor: undefined,\n};\n","export class Configuration {\n actors: string[];\n workObjects: string[];\n\n constructor(actors: string[], workObjects: string[]) {\n this.actors = actors;\n this.workObjects = workObjects;\n }\n}\n","/** DEFAULT VALUES **/\nexport const INITIAL_TITLE = '< title >';\nexport const INITIAL_DESCRIPTION = '< description >';\nexport const INITIAL_DOMAIN_NAME = '[icons: default]';\n\n/** LocalStorageTags **/\nexport const APPENDED_ICONS_TAG = 'appendedIcons';\nexport const DOMAIN_CONFIGURATION_TAG = 'domainConfigurationTag';\n\n/** AUTOSAVE DEFAULTS **/\nexport const DEFAULT_AUTOSAVES_ENABLED = true;\nexport const DEFAULT_AUTOSAVES_MAX_DRAFTS = 5;\nexport const DEFAULT_AUTOSAVES_INTERVAL = 30;\n\n/** SNACKBAR **/\nexport const SNACKBAR_DURATION = 2000;\nexport const SNACKBAR_SUCCESS = 'snackbar_success';\nexport const SNACKBAR_ERROR = 'snackbar_error';\nexport const SNACKBAR_INFO = 'snackbar_info';\n\n/** BPMN_RELEVANT_CONSTANTS **/\nexport const IMPLICIT_ROOT_ID = '__implicitroot';\n","export class Dictionary {\n private entries: Entry[];\n\n constructor() {\n this.entries = [];\n }\n\n get length(): number {\n return this.entries.length;\n }\n\n all(): Entry[] {\n return this.entries;\n }\n\n size(): number {\n return this.entries.length;\n }\n\n isEmpty(): boolean {\n return this.entries.length <= 0;\n }\n\n has(key: string): boolean {\n return this.entries.some((entry) => entry.key === key);\n }\n\n set(key: string, value: any): void {\n if (!this.has(key)) {\n this.entries.push(new Entry(value, key));\n }\n }\n\n add(value: any, key: string): void {\n this.set(key, value);\n }\n\n putEntry(entry: Entry): void {\n if (!this.has(entry.key)) {\n this.entries.push(new Entry(entry.value, entry.key));\n }\n }\n\n keysArray(): string[] {\n return this.entries.map((entry) => entry.key);\n }\n\n addEach(object: any): void {\n Object.keys(object).forEach((key) => {\n this.set(key, object[key]);\n });\n }\n\n appendDict(dict: Dictionary): void {\n dict.entries.forEach((entry) => this.putEntry(entry));\n }\n\n clear(): void {\n this.entries = [];\n }\n\n delete(key: string): void {\n this.entries = this.entries.filter((entry) => entry.key !== key);\n }\n\n get(key: string): any {\n const found = this.entries.filter((entry) => entry.key === key);\n return found[0] ? found[0].value : null;\n }\n\n sort(fn: (a: Entry, b: Entry) => number) {\n this.entries.sort(fn);\n }\n\n sortByName() {\n this.entries.sort((a: Entry, b: Entry) => {\n if (a.key.includes('_custom') == b.key.includes('_custom')) {\n if (a.key < b.key) return -1;\n else {\n return 1;\n }\n } else {\n if (a.key.includes('_custom')) {\n return -1;\n } else {\n return 1;\n }\n }\n });\n }\n}\n\nexport class Entry {\n value: any;\n key: string;\n\n constructor(value: any, key: string) {\n this.value = value;\n this.key = key;\n }\n}\n","import { INITIAL_DOMAIN_NAME } from './constants';\nimport { testBusinessObject } from './businessObject';\nimport { elementTypes } from './elementTypes';\nimport { Dictionary } from './dictionary/dictionary';\n\nexport interface DomainConfiguration {\n name: string;\n actors: Dictionary;\n workObjects: Dictionary;\n}\n\nexport interface DomainConfigurationForExport {\n name: string;\n actors: any;\n workObjects: any;\n}\n\nexport interface CustomDomainConfiguration {\n name: string;\n actors: string[];\n workObjects: string[];\n}\nconst actor = structuredClone(testBusinessObject);\nactor.type = elementTypes.ACTOR;\n\nexport const testCustomDomainConfiguration: CustomDomainConfiguration = {\n name: INITIAL_DOMAIN_NAME,\n actors: ['Person'],\n workObjects: ['Document'],\n};\n\nexport function fromConfigurationFromFile(configFromFile: {\n name: string;\n actors: { [p: string]: any };\n workObjects: { [p: string]: any };\n}) {\n const actorsDict = new Dictionary();\n const workObjectsDict = new Dictionary();\n Object.keys(configFromFile.actors).forEach((key) => {\n actorsDict.add(configFromFile.actors[key], key);\n });\n Object.keys(configFromFile.workObjects).forEach((key) => {\n workObjectsDict.add(configFromFile.workObjects[key], key);\n });\n\n return {\n name: configFromFile.name,\n actors: actorsDict,\n workObjects: workObjectsDict,\n };\n}\n","export enum elementTypes {\n ACTIVITY = 'domainStory:activity',\n CONNECTION = 'domainStory:connection',\n ACTOR = 'domainStory:actor',\n WORKOBJECT = 'domainStory:workObject',\n GROUP = 'domainStory:group',\n TEXTANNOTATION = 'domainStory:textAnnotation',\n DOMAINSTORY = 'domainStory:',\n}\n","import { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { overrideAppendedIcons } from 'src/app/Domain/Domain-Configuration/allIcons';\nimport { Configuration } from 'src/app/Domain/Common/configuration';\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\nimport { INITIAL_DOMAIN_NAME } from './constants';\n\nexport class IconConfiguration {\n domainName = INITIAL_DOMAIN_NAME;\n\n private allIconDictionary: Dictionary;\n\n constructor(allIconDictionary: Dictionary) {\n this.allIconDictionary = allIconDictionary;\n }\n\n /**\n * Select the Iconset which you want to use\n */\n getDefaultConf(): Configuration {\n return defaultConf;\n }\n\n updateAllIconRegistry(allIconDictionary: Dictionary): void {\n this.allIconDictionary = allIconDictionary;\n }\n\n appendSRCFile(\n actors: string[],\n actorsDict: Dictionary,\n workObjects: string[],\n workObjectsDict: Dictionary\n ): void {\n const newAppendedIcons: { [key: string]: any } = {};\n\n actors.forEach((name: string) => {\n if (!this.allIconDictionary.has(name)) {\n newAppendedIcons[name] = actorsDict.get(name);\n }\n });\n\n workObjects.forEach((name: string) => {\n if (!this.allIconDictionary.has(name)) {\n newAppendedIcons[name] = workObjectsDict.get(name);\n }\n });\n const appen = new Dictionary();\n Object.keys(newAppendedIcons).forEach((key) => {\n appen.set(key, newAppendedIcons[key]);\n });\n\n overrideAppendedIcons(appen);\n }\n\n createCustomConf(domainConfiguration: DomainConfiguration): Configuration {\n this.domainName = domainConfiguration.name;\n\n let actors = domainConfiguration.actors;\n let workObjects = domainConfiguration.workObjects;\n\n this.appendSRCFile(\n actors.keysArray(),\n actors,\n workObjects.keysArray(),\n workObjects\n );\n\n return new Configuration(actors.keysArray(), workObjects.keysArray());\n }\n}\n\n/* eslint no-unused-vars: 0*/\n\n/**\n * All Icons as one Set\n * There are more Icons than fit in the palette.\n * This is just for reference\n */\nconst allIconsConf = {\n actors: ['Person', 'Group', 'System', 'Pet'],\n workObjects: [\n 'Place',\n 'Flag',\n 'World',\n 'Water',\n 'Store',\n 'Theater',\n 'Business',\n 'Meeting-room',\n 'Hotel',\n 'Dining',\n 'Courthouse',\n 'Gas-station',\n 'Car',\n 'Bus',\n 'Train',\n 'Truck',\n 'Taxi',\n 'Bike',\n 'Boat',\n 'Motorcycle',\n 'Plane',\n 'Flight-takeoff',\n 'Flight-landing',\n 'Shuttle',\n 'Walking',\n 'Traffic',\n 'Commute',\n 'Document',\n 'Folder',\n 'Call',\n 'Email',\n 'Copyright',\n 'Briefcase',\n 'Attach',\n 'Ruler',\n 'Sum',\n 'Conversation',\n 'Update',\n 'Cellphone',\n 'Speaker-phone',\n 'Signal',\n 'Key',\n 'Pencil',\n 'How-To-Reg',\n 'Settings',\n 'Grid',\n 'Label',\n 'Receipt',\n 'Calendar',\n 'Wrench',\n 'Headset',\n 'Keyboard',\n 'Mouse',\n 'Microphone',\n 'Router',\n 'Scanner',\n 'Printer',\n 'DNS',\n 'Security',\n 'Cloud',\n 'Desktop',\n 'Tablet',\n 'Assessment',\n 'Dashboard',\n 'Pie-chart',\n 'View-List',\n 'Euro',\n 'Dollar',\n 'Info',\n 'Alarm',\n 'Problem',\n 'Circle-Arrows',\n 'Picture-as-PDF',\n 'Credit-Card',\n 'Shopping',\n 'Favorite',\n 'Gavel',\n 'Blind',\n 'Hourglass',\n 'Time',\n 'Search',\n 'Thumb-up',\n 'Thumb-down',\n 'Thumb-up-down',\n 'Couch',\n 'Education',\n 'Watch',\n ],\n};\n\n/**\n * Default Iconset\n */\nexport const defaultConf = {\n actors: ['Person', 'Group', 'System'],\n workObjects: ['Document', 'Folder', 'Call', 'Email', 'Conversation', 'Info'],\n};\n","import { ActivityCanvasObject } from '../Common/activityCanvasObject';\n\nexport class ActivityDialogData {\n activity: ActivityCanvasObject;\n numberIsAllowedMultipleTimes: boolean;\n showNumberFields: boolean;\n\n saveFN: any;\n\n constructor(\n activity: ActivityCanvasObject,\n numberIsAllowedMultipleTimes: boolean,\n showNumberFields: boolean,\n saveFN: any\n ) {\n this.activity = activity;\n this.numberIsAllowedMultipleTimes = numberIsAllowedMultipleTimes;\n this.showNumberFields = showNumberFields;\n this.saveFN = saveFN;\n }\n}\n","export class ExportDialogData {\n title: string;\n options: ExportOption[];\n\n constructor(title: string, options: ExportOption[]) {\n this.title = title;\n this.options = options;\n }\n}\n\nexport class ExportOption {\n text: string;\n fn: any;\n tooltip: string;\n\n constructor(text: string, tooltip: string, fn: any) {\n this.text = text;\n this.tooltip = tooltip;\n this.fn = fn;\n }\n}\n","export class InfoDialogData {\n title: string;\n infoText: string;\n isInfo: boolean;\n isLink: boolean;\n linkText: string | undefined;\n\n constructor(\n title: string,\n infoText: string,\n isInfo: boolean,\n isLink: boolean = false,\n linkText?: string\n ) {\n this.title = title;\n this.infoText = infoText;\n this.isInfo = isInfo;\n this.isLink = isLink;\n this.linkText = linkText;\n }\n}\n","export const NUMBER_BACKGROUND_COLOR = 'white';\nexport const NUMBER_COLOR = 'black';\nexport const STROKE_WIDTH = '1.5';\n\nexport const HIGHLIGHT_NUMBER_BACKGROUNG_COLOR = '#43acbf';\nexport const HIGHLIGHT_NUMBER_COLOR = 'black';\nexport const HIGHLIGHT_COLOR = 'black';\nexport const HIGHLIGHT_STROKE_WIDTH = '4';\n","import { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\n\nexport let appendedIcons = new Dictionary();\nexport const allIcons = {\n Person:\n '',\n Group:\n '',\n Pet: '',\n Conversation:\n '',\n World:\n '',\n Store:\n '',\n Theater:\n '',\n Business:\n '',\n Water:\n '',\n Hotel:\n '',\n Dining:\n '',\n 'Gas-station':\n '',\n 'Meeting-room':\n '',\n Courthouse:\n '',\n Flag: '',\n Place:\n '',\n Car: '',\n Bus: '',\n Train:\n '',\n Truck:\n '',\n Taxi: '',\n Bike: '',\n Boat: '',\n Motorcycle:\n '',\n Plane:\n '',\n 'Flight-takeoff':\n '',\n 'Flight-landing':\n '',\n Shuttle:\n '',\n Walking:\n '',\n Traffic:\n '',\n Commute:\n '',\n System:\n '',\n Printer:\n '',\n Document:\n '',\n Folder:\n '',\n Call: '',\n Email:\n '',\n Copyright:\n '',\n DNS: '',\n Settings:\n '',\n Cellphone:\n '',\n Update:\n '',\n Briefcase:\n '',\n Microphone:\n '',\n Signal:\n '',\n Key: '',\n Pencil:\n '',\n Sum: '',\n Headset:\n '',\n Keyboard:\n '',\n Mouse:\n '',\n Router:\n '',\n Scanner:\n '',\n Security:\n '',\n Desktop:\n '',\n 'Speaker-phone':\n '',\n Tablet:\n '',\n Label:\n '',\n Receipt:\n '',\n Calendar:\n '',\n Cloud:\n '',\n Assessment:\n '',\n Dashboard:\n '',\n 'Pie-chart':\n '',\n Problem:\n '',\n 'Picture-as-PDF':\n '',\n Grid: '',\n Watch:\n '',\n Euro: '',\n Dollar:\n '',\n Info: '',\n Alarm:\n '',\n Wrench:\n '',\n 'Circle-Arrows':\n '',\n 'Credit-Card':\n '',\n Favorite:\n '',\n Gavel:\n '',\n Blind:\n '',\n Hourglass:\n '',\n Time: '',\n Search:\n '',\n Shopping:\n '',\n 'Thumb-up':\n '',\n 'Thumb-down':\n '',\n 'Thumb-up-down':\n '',\n Couch:\n '',\n Attach:\n '',\n Ruler:\n '',\n Education:\n '',\n 'How-To-Reg':\n '',\n 'View-List':\n '',\n};\n\nexport function getAllStandardIconKeys(): string[] {\n const allIconsDict = new Dictionary();\n\n allIconsDict.addEach(allIcons);\n\n return allIconsDict.keysArray();\n}\n\nexport function overrideAppendedIcons(newIcons: Dictionary): void {\n appendedIcons = newIcons;\n}\n","export enum IconFilterEnum {\n ICON_FILTER_ACTOR = 'ICON_FILTER_ACTOR',\n ICON_FILTER_WORKOBJECT = 'ICON_FILTER_WORKOBJECT',\n ICON_FILTER_UNASSIGNED = 'ICON_FILTER_UNASSIGNED',\n ICON_FILTER_NONE = 'ICON_FILTER_NONE',\n}\n","export class ConfigAndDST {\n domain: any;\n dst: any;\n\n constructor(domain: any, dst: any) {\n this.domain = domain;\n this.dst = dst;\n }\n}\n\nexport const testConfigAndDst: ConfigAndDST = {\n domain: JSON.parse(\n '{\"name\":\"\",' +\n '\"actors\":{\"Person\":\"' +\n '' +\n '\",' +\n '\"Group\":\"' +\n '' +\n '\",' +\n '\"System\":\"' +\n '\"},' +\n '\"workObjects\":{\"Document\":\"' +\n '\",' +\n '\"Folder\":\"' +\n '' +\n '\",' +\n '\"Call\":\"' +\n '\",' +\n '\"Email\":\"' +\n '\",' +\n '\"Conversation\":\"' +\n '\",' +\n '\"Info\":\"' +\n '' +\n '\"}}'\n ),\n dst:\n '[' +\n '{\"type\":\"domainStory:workObjectDocument\",\"name\":\"\",\"id\":\"shape_3792\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"x\":302,\"y\":102},' +\n '{\"type\":\"domainStory:actorPerson\",\"name\":\"\",\"id\":\"shape_4666\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"x\":103,\"y\":93},' +\n '{\"type\":\"domainStory:activity\",\"name\":\"\",\"id\":\"connection_4884\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"number\":1,' +\n '\"waypoints\":[{\"original\":{\"x\":141,\"y\":131},\"x\":186,\"y\":133},{\"original\":{\"x\":340,\"y\":140},\"x\":302,\"y\":138}],' +\n '\"source\":\"shape_4666\",\"target\":\"shape_3792\"}]',\n};\n","export const SVG_LINK = 'http://www.w3.org/2000/svg';\nexport const X_OFFSET_UTIL = '8';\nexport const TEXTSPAN_TITLE_HEIGHT = 30;\nexport const TEXTSPAN_DESCRIPTION_HEIGHT = 15;\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AutosaveSettingsComponent } from '../Presentation/Autosave/AutosaveSettings/autosave-settings.component';\nimport { AutosaveOptionsComponent } from '../Presentation/Autosave/AutosaveOptions/autosave-options.component';\nimport { AutosavedDraftsComponent } from '../Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component';\nimport { FormsModule } from '@angular/forms';\nimport { MaterialModule } from '../material.module';\n\n@NgModule({\n declarations: [\n AutosaveSettingsComponent,\n AutosaveOptionsComponent,\n AutosavedDraftsComponent,\n ],\n exports: [AutosaveSettingsComponent],\n imports: [CommonModule, FormsModule, MaterialModule],\n})\nexport class AutosaveSettingsModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { HeaderButtonsComponent } from '../Presentation/Header/header-buttons.component';\n\n@NgModule({\n declarations: [HeaderButtonsComponent],\n exports: [HeaderButtonsComponent],\n imports: [CommonModule],\n})\nexport class DomainStoryModelerModuleModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DomainConfigurationComponent } from 'src/app/Presentation/DomainConfiguration/domain-configuration.component';\nimport { IconListItemComponent } from '../Presentation/DomainConfiguration/icon-list-item/icon-list-item.component';\nimport { DetailsListItemComponent } from '../Presentation/DomainConfiguration/details-list-item/details-list-item.component';\nimport { DomainDetailsComponent } from '../Presentation/DomainConfiguration/domain-details/domain-details.component';\nimport { GeneralSettingsComponent } from '../Presentation/Settings/General/general-settings.component';\nimport { LabelDictionaryComponent } from '../Presentation/LabelDictionary/label-dictionary.component';\nimport { FormsModule } from '@angular/forms';\nimport { MaterialModule } from '../material.module';\nimport { AutosaveSettingsModule } from './autosave-settings.module';\n\n@NgModule({\n declarations: [\n DomainConfigurationComponent,\n GeneralSettingsComponent,\n LabelDictionaryComponent,\n IconListItemComponent,\n DetailsListItemComponent,\n DomainDetailsComponent,\n ],\n exports: [\n GeneralSettingsComponent,\n DomainConfigurationComponent,\n LabelDictionaryComponent,\n ],\n imports: [AutosaveSettingsModule, CommonModule, FormsModule, MaterialModule],\n})\nexport class SettingsModule {}\n","import { Component } from '@angular/core';\nimport { AutosaveConfigurationService } from '../../../Service/Autosave/autosave-configuration.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_ERROR,\n SNACKBAR_SUCCESS,\n} from 'src/app/Domain/Common/constants';\n\n@Component({\n selector: 'app-autosave-options',\n templateUrl: './autosave-options.component.html',\n styleUrls: ['./autosave-options.component.scss'],\n})\nexport class AutosaveOptionsComponent {\n constructor(\n protected autosaveConfiguration: AutosaveConfigurationService,\n private snackbar: MatSnackBar\n ) {}\n\n save(activated: boolean, maxDrafts: number, interval: number) {\n if (\n this.autosaveConfiguration.setConfiguration({\n activated,\n maxDrafts,\n interval,\n })\n ) {\n this.snackbar.open('Settings for Autosave saved', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n });\n } else {\n this.snackbar.open(\n 'Unable to save settings for Autosave - please try again',\n undefined,\n {\n duration: 2 * SNACKBAR_DURATION,\n panelClass: SNACKBAR_ERROR,\n }\n );\n }\n }\n}\n","\n \n Autosave Options\n \n \n
\n \n Enabled\n
\n
\n Interval [sec]\n \n
\n
\n Max. Drafts\n \n
\n \n Apply\n \n
\n
\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-autosave-settings',\n templateUrl: './autosave-settings.component.html',\n styleUrls: ['./autosave-settings.component.scss'],\n})\nexport class AutosaveSettingsComponent {}\n","\n\n","import { Component, OnInit } from '@angular/core';\nimport { AutosaveService } from '../../../Service/Autosave/autosave.service';\nimport { Draft } from '../../../Domain/Autosave/draft';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_SUCCESS,\n} from 'src/app/Domain/Common/constants';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'app-autosaved-drafts',\n templateUrl: './autosaved-drafts.component.html',\n styleUrls: ['./autosaved-drafts.component.scss'],\n})\nexport class AutosavedDraftsComponent implements OnInit {\n drafts: Draft[] = [];\n subscription: Subscription;\n\n constructor(\n private autosaveService: AutosaveService,\n private snackbar: MatSnackBar\n ) {\n this.subscription = this.autosaveService.autosavedDraftsChanged$.subscribe(\n () => this.initDrafts()\n );\n }\n\n ngOnInit(): void {\n this.initDrafts();\n }\n\n initDrafts() {\n this.drafts = this.autosaveService.loadCurrentDrafts();\n }\n\n loadDraft(draft: Draft): void {\n this.autosaveService.loadDraft(draft);\n this.snackbar.open('Draft loaded', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n });\n }\n\n removeAllDrafts() {\n this.autosaveService.removeAllDrafts();\n }\n}\n","\n \n \n History\n \n {{ drafts.length ? drafts.length : \"no\" }}\n {{ drafts.length > 1 ? \"drafts\" : \"draft\" }} available\n \n \n
\n
\n
\n
{{ draft.title }}
\n
{{ draft.date }}
\n
\n \n Load Draft\n \n
\n
\n
\n \n Remove All Drafts\n \n
\n
\n
\n
\n\nNo drafts found.\n","import { Component, OnInit } from '@angular/core';\nimport { ModelerService } from '../../Service/Modeler/modeler.service';\nimport { AutosaveService } from '../../Service/Autosave/autosave.service';\n\n@Component({\n selector: 'app-modeler',\n templateUrl: './modeler.component.html',\n styleUrls: ['./modeler.component.scss'],\n})\nexport class ModelerComponent implements OnInit {\n constructor(\n private modelerService: ModelerService,\n private autosaveService: AutosaveService\n ) {}\n\n ngOnInit(): void {\n this.modelerService.postInit();\n this.autosaveService.loadLatestDraft();\n }\n}\n","
\n","import { AfterViewInit, Component, Inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\nimport { ActivityDialogData } from 'src/app/Domain/Dialog/activityDialogData';\nimport { ActivityCanvasObject } from '../../../Domain/Common/activityCanvasObject';\n\n@Component({\n selector: 'app-activity-dialog',\n templateUrl: './activity-dialog.component.html',\n styleUrls: ['./activity-dialog.component.scss'],\n})\nexport class ActivityDialogComponent {\n form: UntypedFormGroup;\n activityLabel: string;\n activityNumber: number | undefined;\n numberIsAllowedMultipleTimes: boolean;\n showNumberFields: boolean;\n activity: ActivityCanvasObject;\n\n saveFN: any;\n\n constructor(\n private fb: UntypedFormBuilder,\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: ActivityDialogData\n ) {\n this.activity = data.activity;\n this.activityLabel = data.activity.businessObject.name;\n this.numberIsAllowedMultipleTimes = data.numberIsAllowedMultipleTimes;\n this.activityNumber = data.activity.businessObject.number;\n this.showNumberFields = data.showNumberFields;\n\n this.saveFN = data.saveFN;\n\n this.form = this.fb.group({\n activityLabel: [this.activityLabel, []],\n activityNumber: [this.activityNumber, []],\n multipleNumbers: [this.numberIsAllowedMultipleTimes, []],\n });\n }\n\n onSubmit(): void {\n this.numberIsAllowedMultipleTimes = !this.numberIsAllowedMultipleTimes;\n this.form.patchValue({\n multipleNumbers: this.numberIsAllowedMultipleTimes,\n });\n }\n\n save(): void {\n this.saveFN({\n activity: this.activity,\n ...this.form.value,\n });\n this.dialogRef.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n preventDefault(event: Event) {\n event.preventDefault();\n }\n}\n","\n

Edit Activity

\n
\n
\n \n Number\n \n \n \n multiple\n
\n \n Label\n \n \n
\n
\n\n\n \n \n\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { ExportDialogData } from 'src/app/Domain/Dialog/exportDialogData';\nimport { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';\n\n@Component({\n selector: 'app-export-dialog',\n templateUrl: './export-dialog.component.html',\n styleUrls: ['./export-dialog.component.scss'],\n})\nexport class ExportDialogComponent implements OnInit {\n title: string;\n options: {\n text: string;\n tooltip: string;\n fn: any;\n }[];\n withTitle: BehaviorSubject;\n useWhiteBackground: BehaviorSubject;\n\n constructor(\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: ExportDialogData\n ) {\n this.withTitle = new BehaviorSubject(true);\n this.useWhiteBackground = new BehaviorSubject(true);\n this.title = data.title;\n this.options = data.options;\n }\n\n ngOnInit(): void {}\n\n doOption(i: number): void {\n this.options[i].fn(this.withTitle.value, this.useWhiteBackground.value);\n this.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n updateWithTitle($event: Event) {\n // @ts-ignore\n this.withTitle.next($event.target.checked);\n }\n\n updateUseWhiteBackground($event: Event) {\n // @ts-ignore\n this.useWhiteBackground.next($event.target.checked);\n }\n}\n","\n

{{ title }}

\n \n
\n \n
\n\n
\n\n
\n \n \n {{ option.text }}\n \n
\n
\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\nimport { TitleService } from 'src/app/Service/Title/title.service';\n\n@Component({\n selector: 'app-header-dialog',\n templateUrl: './header-dialog.component.html',\n styleUrls: ['./header-dialog.component.scss'],\n})\nexport class HeaderDialogComponent implements OnInit {\n form: UntypedFormGroup;\n title: string;\n description: string;\n\n constructor(\n private fb: UntypedFormBuilder,\n private dialogRef: MatDialogRef,\n private titleService: TitleService\n ) {\n this.title =\n this.titleService.getTitle() === '< name of this Domain Story >'\n ? ''\n : this.titleService.getTitle();\n this.description = this.titleService.getDescription();\n\n this.form = this.fb.group({\n title: [this.title, []],\n description: [this.description, []],\n });\n }\n\n ngOnInit(): void {}\n\n save(): void {\n this.titleService.updateTitleAndDescription(\n this.form.get('title')?.value,\n this.form.get('description')?.value,\n true\n );\n this.dialogRef.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n preventDefault(event: Event) {\n event.preventDefault();\n }\n}\n","\n
\n \n Title\n \n \n
\n \n Description\n \n \n
\n
\n\n\n \n \n\n","import { AfterViewInit, Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { InfoDialogData } from 'src/app/Domain/Dialog/infoDialogData';\n\n@Component({\n selector: 'app-info-dialog',\n templateUrl: './info-dialog.component.html',\n styleUrls: ['./info-dialog.component.scss'],\n})\nexport class InfoDialogComponent implements AfterViewInit {\n title: string;\n infoText: string;\n showConfirmButton: boolean;\n hasLink: boolean;\n linkText: string;\n\n constructor(\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: InfoDialogData\n ) {\n this.title = data.title;\n this.infoText = data.infoText;\n this.showConfirmButton = !data.isInfo;\n this.hasLink = data.isLink;\n this.linkText = data.linkText || '';\n }\n\n ngAfterViewInit() {\n const span = document.getElementsByClassName(\n 'readOnlyText'\n )[0] as HTMLTextAreaElement;\n span.style.height = span.scrollHeight + 'px';\n }\n\n close(): void {\n this.dialogRef.close();\n }\n}\n","\n

{{ title }}

\n {{ infoText }} \n {{ linkText }}\n
\n\n\n \n\n","import { Component } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'app-label-dictionary-dialog',\n templateUrl: './label-dictionary-dialog.component.html',\n styleUrls: ['./label-dictionary-dialog.component.scss'],\n})\nexport class LabelDictionaryDialogComponent {\n constructor(\n private dialogRef: MatDialogRef\n ) {}\n\n close(): void {\n this.dialogRef.close();\n }\n}\n","\n

Label Dictionary

\n \n
\n","import { AfterViewChecked, Component, Input } from '@angular/core';\nimport { IconListItem } from '../../../Domain/Domain-Configuration/iconListItem';\n\n@Component({\n selector: 'app-details-list-item',\n templateUrl: './details-list-item.component.html',\n styleUrls: ['./details-list-item.component.scss'],\n})\nexport class DetailsListItemComponent implements AfterViewChecked {\n @Input()\n icon!: IconListItem;\n\n private iconInitiated = false;\n\n get id(): string {\n return (\n 'domain-configuration-details-icon-' +\n this.icon.name.toLowerCase() +\n '-' +\n (this.icon.isWorkObject ? 'workobject' : 'actor')\n );\n }\n\n get name(): string {\n return this.icon.name;\n }\n\n ngAfterViewChecked(): void {\n this.createIcon();\n }\n\n private createIcon(): void {\n const img = document.getElementById(this.id) as HTMLImageElement;\n if (img && !this.iconInitiated) {\n img.src = '' + this.icon.svg;\n this.iconInitiated = true;\n }\n }\n}\n","
\n \"{{\n {{ icon.name }}\n
\n","import { Component, OnInit } from '@angular/core';\nimport {\n CustomDomainConfiguration,\n fromConfigurationFromFile,\n} from 'src/app/Domain/Common/domainConfiguration';\nimport { DomainConfigurationService } from 'src/app/Service/DomainConfiguration/domain-configuration.service';\nimport { IconDictionaryService } from 'src/app/Service/DomainConfiguration/icon-dictionary.service';\nimport { BehaviorSubject } from 'rxjs';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { sanitizeIconName } from 'src/app/Utils/sanitizer';\nimport { IconFilterEnum } from '../../Domain/Domain-Configuration/iconFilterEnum';\nimport { DomainCustomizationService } from '../../Service/DomainConfiguration/domain-customization.service';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\n\n@Component({\n selector: 'app-domain-configuration',\n templateUrl: './domain-configuration.component.html',\n styleUrls: ['./domain-configuration.component.scss'],\n})\nexport class DomainConfigurationComponent implements OnInit {\n private domainConfigurationTypes: CustomDomainConfiguration;\n\n filter = new BehaviorSubject(IconFilterEnum.ICON_FILTER_NONE);\n\n selectedActors = new BehaviorSubject([]);\n selectedWorkobjects = new BehaviorSubject([]);\n\n allIcons: BehaviorSubject;\n allIconNames = new BehaviorSubject([]);\n allFilteredIconNames = new BehaviorSubject([]);\n\n constructor(\n private configurationService: DomainConfigurationService,\n private iconDictionaryService: IconDictionaryService,\n private domainCustomizationService: DomainCustomizationService,\n private elementRegistryService: ElementRegistryService\n ) {\n this.domainConfigurationTypes =\n this.domainCustomizationService.getDomainConfiguration().value;\n\n this.allIcons = new BehaviorSubject(\n this.iconDictionaryService.getFullDictionary()\n );\n this.allIcons.subscribe((allIcons) => {\n this.allIconNames.next(allIcons.keysArray().sort(this.sortByName));\n });\n\n this.selectedActors = this.domainCustomizationService.selectedActors$;\n this.selectedWorkobjects =\n this.domainCustomizationService.selectedWorkobjects$;\n }\n\n ngOnInit(): void {\n this.filter.subscribe((type) => {\n let allFiltered = this.getFilteredNamesForType(type);\n this.allFilteredIconNames.next(allFiltered.sort(this.sortByName));\n });\n }\n\n private sortByName(a: string, b: string): number {\n if (a.includes('_custom') == b.includes('_custom')) {\n if (a < b) return -1;\n else {\n return 1;\n }\n } else {\n if (a.includes('_custom')) {\n return -1;\n } else {\n return 1;\n }\n }\n }\n\n /** Default Domain **/\n loadMinimalIconConfigurationWithDefaultIcons(): void {\n this.domainCustomizationService.resetDomain();\n }\n\n loadInitialConfiguration(): void {\n this.domainCustomizationService.cancel();\n }\n\n /** Persist Domain **/\n saveDomain(): void {\n this.domainCustomizationService.saveDomain(\n this.elementRegistryService.getUsedIcons()\n );\n }\n\n exportDomain(): void {\n this.domainCustomizationService.exportDomain();\n }\n\n /** Add Custom Icon **/\n startIconUpload(): void {\n document.getElementById('importIcon')?.click();\n }\n\n importIcon(): void {\n // @ts-ignore\n const files = document.getElementById('importIcon').files;\n for (let iconInputFile of files) {\n const reader = new FileReader();\n const name = sanitizeIconName(iconInputFile.name);\n const iconName = name + '_custom';\n\n reader.onloadend = (e: ProgressEvent) => {\n if (e.target) {\n const src: string = e.target.result as unknown as string;\n this.iconDictionaryService.addIMGToIconDictionary(src, iconName);\n this.iconDictionaryService.registerIconForBPMN(iconName, src);\n\n this.allIcons.next(this.iconDictionaryService.getFullDictionary());\n this.filter.next(this.filter.value);\n\n this.domainCustomizationService.addNewIcon(iconName);\n }\n };\n reader.readAsDataURL(iconInputFile);\n }\n }\n\n /** Import Domain **/\n startDomainImport(): void {\n document.getElementById('importDomain')?.click();\n }\n\n importDomain(): void {\n // @ts-ignore\n const domainInputFile = document.getElementById('importDomain').files[0];\n const reader = new FileReader();\n\n reader.onloadend = (e: ProgressEvent) => {\n const configFromFile = JSON.parse(\n e.target?.result as unknown as string\n ) as {\n name: string;\n actors: { [key: string]: any };\n workObjects: { [key: string]: any };\n };\n const config = fromConfigurationFromFile(configFromFile);\n this.configurationService.loadConfiguration(config, false);\n\n this.domainCustomizationService.importConfiguration(config);\n };\n\n reader.readAsText(domainInputFile);\n }\n\n /** Filter **/\n filterForActors(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_ACTOR) {\n this.filter.next(IconFilterEnum.ICON_FILTER_ACTOR);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterForWorkobjects(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_WORKOBJECT) {\n this.filter.next(IconFilterEnum.ICON_FILTER_WORKOBJECT);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterForUnassigned(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_UNASSIGNED) {\n this.filter.next(IconFilterEnum.ICON_FILTER_UNASSIGNED);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterByNameAndType($event: any) {\n const filteredByNameAndType = this.getFilteredNamesForType(\n this.filter.value\n ).filter((name) =>\n name.toLowerCase().includes($event.target.value.toLowerCase())\n );\n this.allFilteredIconNames.next(filteredByNameAndType.sort(this.sortByName));\n }\n\n private getFilteredNamesForType(type: IconFilterEnum): string[] {\n let allFiltered: string[] = [];\n switch (type) {\n case IconFilterEnum.ICON_FILTER_NONE:\n allFiltered = this.allIconNames.value;\n break;\n case IconFilterEnum.ICON_FILTER_ACTOR:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.domainCustomizationService.isIconActor(name)\n );\n break;\n case IconFilterEnum.ICON_FILTER_WORKOBJECT:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.domainCustomizationService.isIconWorkObject(name)\n );\n break;\n case IconFilterEnum.ICON_FILTER_UNASSIGNED:\n allFiltered = this.allIconNames.value.filter(\n (name) =>\n !this.domainCustomizationService.isIconActor(name) &&\n !this.domainCustomizationService.isIconWorkObject(name)\n );\n break;\n }\n return allFiltered;\n }\n}\n","
\n
\n
\n
\n \n \n home \n \n
\n
\n
\n
Filter:
\n \n None\n \n
\n \n Actors\n \n
\n \n Workobjects\n \n
\n \n
\n
\n \n \n unarchive\n \n \n
\n \n close\n \n \n
\n
\n\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n\n \n
\n","import { Component, OnInit } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { DomainCustomizationService } from 'src/app/Service/DomainConfiguration/domain-customization.service';\nimport { IconListItem } from 'src/app/Domain/Domain-Configuration/iconListItem';\nimport { TitleService } from 'src/app/Service/Title/title.service';\n\n@Component({\n selector: 'app-domain-details',\n templateUrl: './domain-details.component.html',\n styleUrls: ['./domain-details.component.scss'],\n})\nexport class DomainDetailsComponent implements OnInit {\n domainName: Observable;\n\n private draggedList: string = '';\n private draggedIndex = 0;\n\n selectedActors$ = this.customizationService.selectedActors$;\n selectedWorkobjects$ = this.customizationService.selectedWorkobjects$;\n\n constructor(\n private customizationService: DomainCustomizationService,\n titleService: TitleService\n ) {\n this.domainName = titleService.domainName$;\n }\n\n ngOnInit(): void {}\n\n changeName(event: Event): void {\n // @ts-ignore\n this.customizationService.changeName(event.target.value);\n }\n\n getIconForName(iconName: string): IconListItem {\n return this.customizationService.getIconForName(iconName).value;\n }\n\n allowDrop($event: DragEvent, listName: string) {\n if (this.draggedList === listName) {\n $event.preventDefault();\n }\n }\n\n onDrop($event: DragEvent, iconName: string, actors: boolean, index: number) {\n let list;\n if (actors) {\n list = this.selectedActors$;\n } else {\n list = this.selectedWorkobjects$;\n }\n const sortedList = list.value;\n const item = sortedList[this.draggedIndex];\n sortedList.splice(this.draggedIndex, 1);\n sortedList.splice(index, 0, item);\n list.next(sortedList);\n\n if (actors) {\n this.customizationService.setSelectedActors(sortedList);\n } else {\n this.customizationService.setSelectedWorkObject(sortedList);\n }\n }\n\n onDragStart(index: number, draggedList: string) {\n this.draggedList = draggedList;\n this.draggedIndex = index;\n }\n}\n","
\n
\n

Icon Set name

\n
\n \n \n \n
\n
\n
\n

Order of actors

\n \n \n \n \n \n
\n
\n

Order of work objects

\n \n \n \n \n \n
\n
\n","import { AfterViewChecked, Component, Input, OnInit } from '@angular/core';\nimport { IconListItem } from '../../../Domain/Domain-Configuration/iconListItem';\nimport { BehaviorSubject } from 'rxjs';\nimport { DomainCustomizationService } from '../../../Service/DomainConfiguration/domain-customization.service';\n\n@Component({\n selector: 'app-icon-list-item',\n templateUrl: './icon-list-item.component.html',\n styleUrls: ['./icon-list-item.component.scss'],\n})\nexport class IconListItemComponent implements OnInit, AfterViewChecked {\n @Input()\n iconName: string = '';\n\n private iconInitiated = false;\n\n // @ts-ignore\n icon = new BehaviorSubject({});\n\n isActor: boolean = false;\n isWorkobject: boolean = false;\n isNone: boolean = true;\n\n get name(): string {\n return this.iconName;\n }\n\n get id() {\n return 'domain-configuration-icon-' + this.iconName;\n }\n\n constructor(private domainCustomizationService: DomainCustomizationService) {}\n\n ngOnInit(): void {\n this.icon = this.domainCustomizationService.getIconForName(this.iconName);\n if (!this.icon) {\n return;\n }\n\n this.icon.subscribe((value) => {\n this.isActor = value.isActor;\n this.isWorkobject = value.isWorkObject;\n this.isNone = !(value.isActor || value.isWorkObject);\n });\n this.isActor = this.icon.value.isActor;\n this.isWorkobject = this.icon.value.isWorkObject;\n this.isNone = !(this.icon.value.isActor || this.icon.value.isWorkObject);\n }\n\n ngAfterViewChecked(): void {\n this.createIcon();\n }\n\n private createIcon(): void {\n const img = document.getElementById(this.id) as HTMLImageElement;\n if (img && !this.iconInitiated) {\n img.src = '' + this.icon.value?.svg;\n this.iconInitiated = true;\n }\n }\n\n toggleNone() {\n this.domainCustomizationService.setAsUnassigned(\n this.iconName,\n this.icon.value.isActor\n );\n }\n\n toggleActor(): void {\n this.domainCustomizationService.setAsActor(true, this.iconName);\n }\n\n toggleWorkobject(): void {\n this.domainCustomizationService.setAsWorkobject(true, this.iconName);\n }\n}\n","
\n
\n \"{{\n
{{ name }}
\n
\n
\n \n \n None\n \n \n Actor\n \n \n Workobject\n \n \n
\n
\n","import { Component } from '@angular/core';\nimport { SettingsService } from '../../Service/Settings/settings.service';\nimport { ModelerService } from '../../Service/Modeler/modeler.service';\nimport { Observable } from 'rxjs';\nimport { ReplayStateService } from '../../Service/Replay/replay-state.service';\nimport { DirtyFlagService } from '../../Service/DirtyFlag/dirty-flag.service';\nimport {\n ExportDialogData,\n ExportOption,\n} from '../../Domain/Dialog/exportDialogData';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { ExportDialogComponent } from '../Dialog/export-dialog/export-dialog.component';\nimport { InfoDialogData } from '../../Domain/Dialog/infoDialogData';\nimport { InfoDialogComponent } from '../Dialog/info-dialog/info-dialog.component';\nimport { DialogService } from '../../Service/Dialog/dialog.service';\nimport { ReplayService } from '../../Service/Replay/replay.service';\nimport { ExportService } from '../../Service/Export/export.service';\nimport { ImportDomainStoryService } from '../../Service/Import/import-domain-story.service';\nimport { LabelDictionaryDialogComponent } from '../Dialog/label-dictionary-dialog/label-dictionary-dialog.component';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n} from '../../Domain/Common/constants';\nimport { AutosaveService } from '../../Service/Autosave/autosave.service';\nimport { TitleService } from '../../Service/Title/title.service';\nimport { RendererService } from '../../Service/Renderer/renderer.service';\n\n@Component({\n selector: 'app-header-buttons',\n templateUrl: './header-buttons.component.html',\n styleUrls: ['./header-buttons.component.scss'],\n})\nexport class HeaderButtonsComponent {\n isReplay$: Observable;\n isDirty$: Observable;\n\n constructor(\n private settingsService: SettingsService,\n private modelerService: ModelerService,\n private replayStateService: ReplayStateService,\n private dirtyFlagService: DirtyFlagService,\n private dialogService: DialogService,\n private replayService: ReplayService,\n private exportService: ExportService,\n private importService: ImportDomainStoryService,\n private titleService: TitleService,\n private renderService: RendererService,\n private snackbar: MatSnackBar\n ) {\n this.isReplay$ = this.replayStateService.replayOn$;\n this.isDirty$ = this.dirtyFlagService.dirty$;\n }\n import(): void {\n // @ts-ignore\n const filename = document.getElementById('import').files[0].name;\n if (filename.endsWith('.dst')) {\n this.importService.importDST(\n // @ts-ignore\n document.getElementById('import').files[0],\n filename,\n false\n );\n } else if (filename.endsWith('.dst.svg')) {\n this.importService.importDST(\n // @ts-ignore\n document.getElementById('import').files[0],\n filename,\n true\n );\n } else if (filename.endsWith('.egn')) {\n this.importService.importEGN(\n // @ts-ignore\n document.getElementById('import').files[0],\n filename,\n false\n );\n } else if (filename.endsWith('.egn.svg')) {\n this.importService.importEGN(\n // @ts-ignore\n document.getElementById('import').files[0],\n filename,\n true\n );\n }\n this.modelerService.commandStackChanged();\n }\n\n openSettings(): void {\n this.settingsService.open();\n }\n\n /** Open Dialogs **/\n openDownloadDialog(): void {\n if (this.exportService.isDomainStoryExportable()) {\n const SVGDownloadOption = new ExportOption(\n 'SVG',\n 'Download an SVG-Image with the Domain-Story embedded. Can be used to save and share your Domain-Story.',\n (withTitle: boolean, useWhiteBackground: boolean) =>\n this.exportService.downloadSVG(withTitle, useWhiteBackground)\n );\n const EGNDownloadOption = new ExportOption(\n 'EGN',\n 'Download an EGN-File with the Domain-Story. Can be used to save and share your Domain-Story.',\n (withTitle: boolean, useWhiteBackground: boolean) =>\n this.exportService.downloadDST()\n );\n const PNGDownloadOption = new ExportOption(\n 'PNG',\n 'Donwload a PNG-Image of the DOmain-Story. This does not include the Domain-Story!',\n (withTitle: boolean, useWhiteBackground: boolean) =>\n this.exportService.downloadPNG(withTitle)\n );\n const HTMLDownloadOption = new ExportOption(\n 'HTML-Presentation',\n 'Download an HTML-Presentation. This does not include the Domain-Story!',\n (withTitle: boolean, useWhiteBackground: boolean) =>\n this.exportService.downloadHTMLPresentation()\n );\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n config.data = new ExportDialogData('Export', [\n SVGDownloadOption,\n EGNDownloadOption,\n PNGDownloadOption,\n HTMLDownloadOption,\n ]);\n\n this.dialogService.openDialog(ExportDialogComponent, config);\n } else {\n this.snackbar.open('No Domain Story to be exported', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_INFO,\n });\n }\n }\n\n openKeyboardShortcutsDialog(): void {\n const title = 'Keyboard shortcuts';\n const shortCutText =\n 'Undo:\\t\\t\\t\\t\\tctrl + Z \\n' +\n 'Redo:\\t\\t\\t\\t\\tctrl + Y OR ctrl + shift + Z\\n' +\n 'Select All:\\t\\t\\t\\tctrl + A\\n' +\n 'Export as EGN:\\t\\t\\tctrl + S\\n' +\n 'Import Domain Story: \\tctrl + L\\n' +\n 'Search for text:\\t\\t\\tctrl + F\\n' +\n 'Direct editing:\\t\\t\\tE\\n' +\n 'Hand tool:\\t\\t\\t\\tH\\n' +\n 'Lasso tool:\\t\\t\\t\\tL\\n' +\n 'Space tool:\\t\\t\\t\\tS';\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n config.data = new InfoDialogData(title, shortCutText, true);\n\n this.dialogService.openDialog(InfoDialogComponent, config);\n }\n\n openLabelDictionary(): void {\n if (this.exportService.isDomainStoryExportable()) {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n this.dialogService.openDialog(LabelDictionaryDialogComponent, config);\n } else {\n this.snackbar.open(\n 'There are currently no Elements on the canvas',\n undefined,\n {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_INFO,\n }\n );\n }\n }\n\n createNewDomainStory(): void {\n this.titleService.reset();\n this.renderService.reset();\n }\n\n /** Replay functions **/\n startReplay(): void {\n this.replayService.startReplay();\n }\n\n stopReplay(): void {\n this.replayService.stopReplay();\n }\n\n previousStep(): void {\n this.replayService.previousStep();\n }\n\n nextStep(): void {\n this.replayService.nextStep();\n }\n}\n","
\n \n play_arrow \n \n \n unarchive \n \n \n \n \n archive\n \n \n archive\n \n \n \n \n spellcheck\n \n \n \n \n keyboard \n \n \n note_add \n \n
\n
\n \n \n \n
\n","import { Component } from '@angular/core';\nimport { combineLatest, map, Observable } from 'rxjs';\nimport { TitleService } from '../../Service/Title/title.service';\nimport { ReplayService } from '../../Service/Replay/replay.service';\nimport { ReplayStateService } from '../../Service/Replay/replay-state.service';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { HeaderDialogComponent } from '../Dialog/header-dialog/header-dialog.component';\nimport { DialogService } from '../../Service/Dialog/dialog.service';\n\n@Component({\n selector: 'app-header',\n templateUrl: './header.component.html',\n styleUrls: ['./header.component.scss'],\n})\nexport class HeaderComponent {\n title$ = this.titleService.title$;\n description$ = this.titleService.description$;\n showDescription$ = this.titleService.showDescription$;\n\n isReplay$: Observable;\n stepDescription$: Observable;\n showDescription: Observable;\n\n constructor(\n private titleService: TitleService,\n private replayService: ReplayService,\n private replayStateService: ReplayStateService,\n private dialogService: DialogService\n ) {\n this.isReplay$ = this.replayStateService.replayOn$;\n\n this.stepDescription$ = combineLatest([\n this.replayService.currentStep$,\n this.replayService.maxStepNumber$,\n ]).pipe(map(([step, count]) => `${step}/${count}`));\n\n this.showDescription = this.titleService.showDescription$;\n }\n\n openHeaderDialog(): void {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n this.dialogService.openDialog(HeaderDialogComponent, config);\n }\n\n setShowDescription(show: boolean): void {\n this.titleService.setShowDescription(show);\n }\n}\n","\n \n \n \n expand_less\n \n \n \n expand_more\n \n \n \n {{ title$ | async }}\n edit \n \n \n\n \n \n Step: {{ stepDescription$ | async }}\n\n \n\n \n \n\n\n {{ description$ | async }}\n\n","import { AfterViewInit, Component, EventEmitter, Output } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { WorkObjectLabelEntry } from '../../Domain/LabelDictionary/workObjectLabelEntry';\nimport { LabelEntry } from '../../Domain/LabelDictionary/labelEntry';\nimport { LabelDictionaryService } from '../../Service/LabelDictionary/label-dictionary.service';\n\n@Component({\n selector: 'app-label-dictionary',\n templateUrl: './label-dictionary.component.html',\n styleUrls: ['./label-dictionary.component.scss'],\n})\nexport class LabelDictionaryComponent implements AfterViewInit {\n workobjectEntriesSubject: BehaviorSubject;\n activityEntriesSubject: BehaviorSubject;\n\n workObjectEntries: WorkObjectLabelEntry[];\n activityEntries: LabelEntry[];\n\n @Output()\n closeEmitter: EventEmitter = new EventEmitter();\n\n constructor(private labelDictionaryService: LabelDictionaryService) {\n this.labelDictionaryService.createLabelDictionaries();\n this.workObjectEntries = this.labelDictionaryService.getWorkObjectLabels();\n this.activityEntries = this.labelDictionaryService.getActivityLabels();\n\n this.workobjectEntriesSubject = new BehaviorSubject(this.workObjectEntries);\n this.activityEntriesSubject = new BehaviorSubject(this.activityEntries);\n }\n\n ngAfterViewInit(): void {\n this.labelDictionaryService.createLabelDictionaries();\n this.workobjectEntriesSubject.next(\n this.labelDictionaryService.getWorkObjectLabels()\n );\n this.activityEntriesSubject.next(\n this.labelDictionaryService.getActivityLabels()\n );\n }\n\n save(): void {\n this.workObjectEntries = this.workobjectEntriesSubject.value;\n this.activityEntries = this.activityEntriesSubject.value;\n\n const activityNames: string[] = [];\n const originalActivityNames: string[] = [];\n\n const workObjectNames: string[] = [];\n const originalWorkObjectNames: string[] = [];\n\n this.activityEntries\n .filter((a) => a.name !== a.originalName)\n .forEach((activity) => {\n activityNames.push(activity.name);\n originalActivityNames.push(activity.originalName);\n });\n\n this.workObjectEntries\n .filter((w) => w.name !== w.originalName)\n .forEach((workobject) => {\n workObjectNames.push(workobject.name);\n originalWorkObjectNames.push(workobject.originalName);\n });\n\n this.labelDictionaryService.massRenameLabels(\n activityNames,\n originalActivityNames,\n workObjectNames,\n originalWorkObjectNames\n );\n this.closeEmitter.emit();\n }\n\n cancel(): void {\n this.workObjectEntries.forEach((w) => {\n w.name = w.originalName;\n });\n this.activityEntries.forEach((a) => {\n a.name = a.originalName;\n });\n\n this.workobjectEntriesSubject.next(this.workObjectEntries);\n this.activityEntriesSubject.next(this.activityEntries);\n }\n\n updateActivityEntry($event: Event, activityEntry: LabelEntry) {\n let entries = this.activityEntriesSubject.value;\n entries.filter(\n (e) => e.originalName === activityEntry.originalName\n // @ts-ignore\n )[0].name = $event.target.value;\n this.activityEntriesSubject.next(entries);\n }\n\n updateWorkobjectEntry($event: Event, workobjectEntry: LabelEntry) {\n let entries = this.workobjectEntriesSubject.value;\n entries.filter(\n (e) => e.originalName === workobjectEntry.originalName\n // @ts-ignore\n )[0].name = $event.target.value;\n this.workobjectEntriesSubject.next(entries);\n }\n\n preventDefault(event: Event): void {\n event.preventDefault();\n }\n\n close(): void {\n this.closeEmitter.emit();\n }\n}\n","\n
\n

Workobjects

\n \n \n \n \n \n \n \n
\n
\n

Activities

\n \n \n \n \n \n \n \n
\n
\n\n \n \n\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-general-settings',\n templateUrl: './general-settings.component.html',\n styleUrls: ['./general-settings.component.scss'],\n})\nexport class GeneralSettingsComponent {}\n","
\n \n
\n","import { Component } from '@angular/core';\nimport { SettingsService } from 'src/app/Service/Settings/settings.service';\nimport { ModelerService } from 'src/app/Service/Modeler/modeler.service';\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { AutosaveConfigurationService } from '../../Service/Autosave/autosave-configuration.service';\nimport { DomainCustomizationService } from '../../Service/DomainConfiguration/domain-customization.service';\n\n@Component({\n selector: 'app-settings',\n templateUrl: './settings.component.html',\n styleUrls: ['./settings.component.scss'],\n})\nexport class SettingsComponent {\n domainConfiguration: DomainConfiguration | undefined;\n showGeneralSettings = new BehaviorSubject(false);\n showDomainCustomization = new BehaviorSubject(true);\n\n constructor(\n private settingsService: SettingsService,\n private modelerService: ModelerService,\n private domainCustomizationService: DomainCustomizationService\n ) {}\n\n close(): void {\n const savedConfiguration =\n this.domainCustomizationService.getAndClearSavedConfiguration();\n if (savedConfiguration) {\n this.modelerService.restart(savedConfiguration);\n }\n this.settingsService.close();\n }\n\n openGeneralSettings() {\n this.showGeneralSettings.next(true);\n this.showDomainCustomization.next(false);\n }\n\n openDomainCustomization() {\n this.showGeneralSettings.next(false);\n this.showDomainCustomization.next(true);\n }\n}\n","
\n \n \n \n
\n \n Customize Icons for Your Domain\n \n \n General Settings\n \n
\n
\n
\n\n \n \n
\n","import { Injectable } from '@angular/core';\nimport { ReplaySubject } from 'rxjs';\nimport { StorageService } from '../BrowserStorage/storage.service';\nimport { AutosaveConfiguration } from '../../Domain/Autosave/autosave-configuration';\nimport {\n DEFAULT_AUTOSAVES_MAX_DRAFTS,\n DEFAULT_AUTOSAVES_ENABLED,\n DEFAULT_AUTOSAVES_INTERVAL,\n} from 'src/app/Domain/Common/constants';\n\nconst AUTOSAVE_CONFIGURATION_TAG = 'autosaveConfiguration';\n\nconst defaultConfiguration: AutosaveConfiguration = {\n activated: DEFAULT_AUTOSAVES_ENABLED,\n interval: DEFAULT_AUTOSAVES_INTERVAL,\n maxDrafts: DEFAULT_AUTOSAVES_MAX_DRAFTS,\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AutosaveConfigurationService {\n private configuration = defaultConfiguration;\n\n private readonly configurationSubject =\n new ReplaySubject(1);\n readonly configuration$ = this.configurationSubject.asObservable();\n\n constructor(private storageService: StorageService) {\n this.initializeConfiguration();\n }\n\n private initializeConfiguration() {\n this.loadConfiguration();\n this.configurationSubject.next(this.configuration);\n }\n\n setConfiguration(configuration: AutosaveConfiguration): boolean {\n try {\n this.configuration = configuration;\n this.saveConfiguration();\n this.configurationSubject.next(configuration);\n return true;\n } catch {\n return false;\n }\n }\n\n private loadConfiguration() {\n this.configuration =\n this.storageService.get(AUTOSAVE_CONFIGURATION_TAG) ??\n defaultConfiguration;\n }\n\n private saveConfiguration() {\n this.storageService.set(AUTOSAVE_CONFIGURATION_TAG, this.configuration);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { RendererService } from '../Renderer/renderer.service';\nimport { ExportService } from '../Export/export.service';\nimport { Draft } from '../../Domain/Autosave/draft';\nimport { AutosaveConfigurationService } from './autosave-configuration.service';\nimport { IconDictionaryService } from '../DomainConfiguration/icon-dictionary.service';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { fromConfigurationFromFile } from '../../Domain/Common/domainConfiguration';\nimport { StorageService } from '../BrowserStorage/storage.service';\nimport { TitleService } from '../Title/title.service';\nimport { AutosaveConfiguration } from '../../Domain/Autosave/autosave-configuration';\nimport { Subject } from 'rxjs';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_TITLE,\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n} from '../../Domain/Common/constants';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\nexport const DRAFTS_TAG = 'autosaveDrafts';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AutosaveService {\n private autosaveTimer: any;\n autosavedDraftsChanged$ = new Subject();\n\n constructor(\n private autosaveConfiguration: AutosaveConfigurationService,\n private exportService: ExportService,\n private iconDictionaryService: IconDictionaryService,\n private rendererService: RendererService,\n private snackbar: MatSnackBar,\n private storageService: StorageService,\n private titleService: TitleService\n ) {\n this.autosaveConfiguration.configuration$.subscribe((configuration) =>\n this.updateConfiguration(configuration)\n );\n }\n\n loadCurrentDrafts(): Draft[] {\n const drafts = this.readDrafts();\n this.sortDrafts(drafts);\n return drafts;\n }\n\n loadDraft(draft: Draft): void {\n const configFromFile = draft.configAndDST.domain;\n const config = fromConfigurationFromFile(configFromFile);\n const story = JSON.parse(draft.configAndDST.dst);\n\n this.titleService.updateTitleAndDescription(\n draft.title,\n draft.description,\n false\n );\n\n const actorIcons = this.iconDictionaryService.getElementsOfType(\n story,\n elementTypes.ACTOR\n );\n const workObjectIcons = this.iconDictionaryService.getElementsOfType(\n story,\n elementTypes.WORKOBJECT\n );\n this.iconDictionaryService.updateIconRegistries(\n actorIcons,\n workObjectIcons,\n config\n );\n this.rendererService.importStory(story, true, config, false);\n }\n\n removeAllDrafts() {\n this.storageService.set(DRAFTS_TAG, []);\n this.autosavedDraftsChanged$.next();\n }\n\n loadLatestDraft() {\n const drafts = this.readDrafts();\n if (drafts.length === 0) {\n return;\n }\n this.loadDraft(drafts[0]);\n }\n\n private updateConfiguration(configuration: AutosaveConfiguration) {\n this.stopTimer();\n\n if (configuration.activated) {\n this.startTimer(configuration.interval, configuration.maxDrafts);\n }\n }\n\n private stopTimer(): void {\n if (this.autosaveTimer) {\n clearInterval(this.autosaveTimer);\n this.autosaveTimer = undefined;\n }\n }\n\n private startTimer(interval: number, maxDrafts: number): void {\n this.autosaveTimer = setInterval(() => {\n const savedDrafts = this.loadCurrentDrafts();\n const newDraft = this.createDraft();\n let isChanged = maxDrafts > 0;\n if (savedDrafts.length > 0) {\n isChanged = isChanged && !this.isSame(newDraft, savedDrafts[0]);\n }\n if (isChanged && !this.isDraftEmpty(newDraft)) {\n savedDrafts.unshift(newDraft);\n while (savedDrafts.length > maxDrafts) {\n savedDrafts.pop();\n }\n this.writeDrafts(savedDrafts);\n this.snackbar.open('Draft Saved', undefined, {\n panelClass: SNACKBAR_INFO,\n duration: SNACKBAR_DURATION,\n });\n this.autosavedDraftsChanged$.next();\n }\n }, interval * 1000);\n }\n\n private isDraftEmpty(draft: Draft) {\n return (\n draft.title === INITIAL_TITLE &&\n draft.description === INITIAL_DESCRIPTION &&\n JSON.parse(draft.configAndDST.dst).length === 0\n );\n }\n\n private isSame(a: Draft, b: Draft) {\n return (\n a.title === b.title &&\n a.description === b.description &&\n JSON.stringify(a.configAndDST) === JSON.stringify(b.configAndDST)\n );\n }\n\n private writeDrafts(drafts: Draft[]) {\n this.storageService.set(DRAFTS_TAG, drafts);\n }\n\n private readDrafts(): Draft[] {\n return this.storageService.get(DRAFTS_TAG) ?? [];\n }\n\n private createDraft(): Draft {\n const dst = JSON.stringify(this.rendererService.getStory(), null, 2);\n const configAndDST = this.exportService.createConfigAndDST(dst);\n\n const date = new Date().toString().slice(0, 25);\n\n return {\n title: this.titleService.getTitle(),\n description: this.titleService.getDescription(),\n configAndDST,\n date,\n };\n }\n\n private sortDrafts(drafts: Draft[]): void {\n drafts.sort((a: Draft, b: Draft) => {\n const aDate = Date.parse(a.date);\n const bDate = Date.parse(b.date);\n return aDate > bDate ? 0 : 1;\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DOMAIN_CONFIGURATION_TAG } from '../../Domain/Common/constants';\nimport {\n DomainConfiguration,\n fromConfigurationFromFile,\n} from '../../Domain/Common/domainConfiguration';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StorageService {\n set(key: string, value: any) {\n localStorage.setItem(key, JSON.stringify(value));\n }\n\n get(key: string): any {\n const json = localStorage.getItem(key);\n if (json) {\n return JSON.parse(json);\n }\n return null;\n }\n\n removeItem(key: string) {\n localStorage.removeItem(key);\n }\n\n checkValidityOfConfiguration(configuratioFromFile: DomainConfiguration) {\n return (\n configuratioFromFile.actors.keysArray().length > 1 &&\n configuratioFromFile.workObjects.keysArray().length > 1 &&\n !configuratioFromFile.actors\n .all()\n .some((e) => typeof e.value !== 'string') &&\n !configuratioFromFile.workObjects\n .all()\n .some((e) => typeof e.value !== 'string')\n );\n }\n\n getStoredDomainConfiguration(): DomainConfiguration | undefined {\n const domainString = localStorage.getItem(DOMAIN_CONFIGURATION_TAG);\n\n if (!domainString) {\n return;\n } else {\n const configuratioFromFile = fromConfigurationFromFile(\n JSON.parse(domainString)\n );\n if (this.checkValidityOfConfiguration(configuratioFromFile)) {\n return configuratioFromFile;\n }\n }\n return;\n }\n\n setStoredDomainConfiguration(config: DomainConfiguration): void {\n const actors: {\n [p: string]: any;\n } = {};\n config.actors.keysArray().forEach((key) => {\n actors[key] = config.actors.get(key);\n });\n const workObjects: {\n [p: string]: any;\n } = {};\n config.workObjects.keysArray().forEach((key) => {\n workObjects[key] = config.workObjects.get(key);\n });\n\n const configForStorage = {\n name: config.name,\n actors: actors,\n workObjects: workObjects,\n };\n\n localStorage.setItem(\n DOMAIN_CONFIGURATION_TAG,\n JSON.stringify(configForStorage, null, 2)\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CommandStackService {\n private commandStack: any;\n\n constructor() {}\n\n setCommandStack(commandStack: any): void {\n this.commandStack = commandStack;\n }\n\n execute(action: string, payload: any) {\n this.commandStack.execute(action, payload);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\nimport { ComponentType } from '@angular/cdk/overlay';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DialogService {\n constructor(private matDialog: MatDialog) {}\n\n openDialog(dialog: ComponentType, config: MatDialogConfig): void {\n this.matDialog.open(dialog, config);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DirtyFlagService {\n private isDirtySubject = new BehaviorSubject(false);\n dirty$ = this.isDirtySubject.asObservable();\n\n makeDirty(): void {\n this.isDirtySubject.next(true);\n }\n\n makeClean(): void {\n this.isDirtySubject.next(false);\n }\n\n get dirty(): boolean {\n return this.isDirtySubject.value;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { StoryStep } from 'src/app/Domain/Replay/storyStep';\nimport {\n HIGHLIGHT_COLOR,\n HIGHLIGHT_NUMBER_BACKGROUNG_COLOR,\n HIGHLIGHT_NUMBER_COLOR,\n HIGHLIGHT_STROKE_WIDTH,\n NUMBER_BACKGROUND_COLOR,\n NUMBER_COLOR,\n STROKE_WIDTH,\n} from '../../Domain/DomManipulation/replayConstants';\n\n@Injectable({\n providedIn: 'root',\n})\n/**\n * Manipulates the DOM during replay to only show the elements of the current Step\n */\nexport class DomManipulationService {\n constructor(private elementRegistryService: ElementRegistryService) {}\n\n showAll(): void {\n this.removeHighlights();\n this.elementRegistryService\n .getAllCanvasObjects()\n .slice()\n .concat(this.elementRegistryService.getAllGroups().slice())\n .map((e) => e.businessObject)\n .forEach((element) => {\n const domObject = document.querySelector(\n '[data-element-id=' + element.id + ']'\n );\n // @ts-ignore\n domObject.style.display = 'block';\n });\n }\n\n showStep(replayStep: StoryStep, previousStep?: StoryStep): void {\n this.removeHighlights();\n const notShown = this.getAllNotShown(replayStep.objects);\n\n notShown.forEach((element) => {\n const domObject = document.querySelector(\n '[data-element-id=' + element.id + ']'\n );\n if (domObject) {\n // @ts-ignore\n domObject.style.display = 'none';\n }\n });\n\n this.hightlightStep(\n previousStep\n ? replayStep.objects.filter((o) => !previousStep.objects.includes(o))\n : replayStep.objects\n );\n\n replayStep.objects.forEach((element) => {\n const domObject = document.querySelector(\n '[data-element-id=' + element.id + ']'\n );\n if (domObject) {\n // @ts-ignore\n domObject.style.display = 'block';\n }\n });\n }\n\n getNumberDomForActivity(activity: SVGPolylineElement): any {\n const numberDOMS = activity.parentElement?.getElementsByClassName(\n 'djs-labelNumber'\n ) || ['', ''];\n return {\n numberBackgroundDom: numberDOMS[0],\n numberTextDom: numberDOMS[1],\n };\n }\n\n private removeHighlights(): void {\n const allActivities = this.elementRegistryService.getAllActivities();\n const allConnections = this.elementRegistryService.getAllConnections();\n\n allActivities.forEach((activity) => {\n const querySelector = document.querySelector(\n '[data-element-id=' + activity.id + ']'\n );\n if (querySelector) {\n const activityDomObject =\n querySelector.getElementsByTagName('polyline')[0];\n\n activityDomObject.style.stroke =\n activity.businessObject.pickedColor || 'black';\n activityDomObject.style.strokeWidth = STROKE_WIDTH;\n\n const { numberBackgroundDom, numberTextDom } =\n this.getNumberDomForActivity(activityDomObject);\n if (numberBackgroundDom && numberTextDom) {\n numberBackgroundDom.style.fill = NUMBER_BACKGROUND_COLOR;\n numberTextDom.style.fill = NUMBER_COLOR;\n }\n }\n });\n\n allConnections.forEach((connection) => {\n // @ts-ignore\n const connectionDomObject = document\n .querySelector('[data-element-id=' + connection.id + ']')\n .getElementsByTagName('polyline')[0];\n\n connectionDomObject.style.stroke =\n connection.businessObject.pickedColor || 'black';\n connectionDomObject.style.strokeWidth = '1.5';\n });\n }\n\n private hightlightStep(stepObjects: BusinessObject[]): void {\n stepObjects\n .filter((e) => e.type === elementTypes.ACTIVITY)\n .forEach((activity) => {\n const querySelector = document.querySelector(\n '[data-element-id=' + activity.id + ']'\n );\n if (querySelector) {\n const activityDomObject =\n querySelector.getElementsByTagName('polyline')[0];\n\n activityDomObject.style.stroke = HIGHLIGHT_COLOR;\n activityDomObject.style.strokeWidth = HIGHLIGHT_STROKE_WIDTH;\n\n const { numberBackgroundDom, numberTextDom } =\n this.getNumberDomForActivity(activityDomObject);\n if (numberTextDom && numberBackgroundDom) {\n numberBackgroundDom.style.fill = HIGHLIGHT_NUMBER_BACKGROUNG_COLOR;\n numberTextDom.style.fill = HIGHLIGHT_NUMBER_COLOR;\n }\n }\n });\n }\n\n private getAllNotShown(shownElements: BusinessObject[]): BusinessObject[] {\n const notShownElements: BusinessObject[] = [];\n const allObjects = this.elementRegistryService\n .getAllCanvasObjects()\n .concat(this.elementRegistryService.getAllGroups());\n\n allObjects.forEach((element) => {\n if (!shownElements.includes(element.businessObject)) {\n if (element.type.includes(elementTypes.CONNECTION)) {\n // @ts-ignore\n if (!element.source.type.includes(elementTypes.GROUP)) {\n notShownElements.push(element.businessObject);\n } else {\n // @ts-ignore\n shownElements.push(element.target);\n }\n } else {\n notShownElements.push(element.businessObject);\n }\n }\n });\n return notShownElements;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { IconDictionaryService } from 'src/app/Service/DomainConfiguration/icon-dictionary.service';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport {\n CustomDomainConfiguration,\n DomainConfiguration,\n DomainConfigurationForExport,\n} from 'src/app/Domain/Common/domainConfiguration';\nimport { defaultConf } from '../../Domain/Common/iconConfiguration';\nimport { TitleService } from '../Title/title.service';\nimport { INITIAL_DOMAIN_NAME } from '../../Domain/Common/constants';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DomainConfigurationService {\n constructor(\n private iconDictionaryService: IconDictionaryService,\n private elementRegistryService: ElementRegistryService,\n private titleService: TitleService\n ) {}\n\n setDomainName(domainName: string): void {\n this.titleService.setDomainName(\n domainName ? domainName : INITIAL_DOMAIN_NAME\n );\n }\n\n exportConfiguration(): void {\n const domainConfiguration = this.getCurrentConfigurationForExport();\n if (!domainConfiguration) {\n return;\n }\n\n const configJSONString = JSON.stringify(domainConfiguration, null, 2);\n const filename = this.titleService.getDomainName();\n const element = document.createElement('a');\n\n element.setAttribute(\n 'href',\n 'data:text/plain;charset=utf-8,' + encodeURIComponent(configJSONString)\n );\n element.setAttribute('download', filename + '.domain');\n element.style.display = 'none';\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n }\n\n loadConfiguration(\n customConfig: DomainConfiguration,\n updateDomainName = true\n ): void {\n let actorDict = new Dictionary();\n let workObjectDict = new Dictionary();\n\n if (customConfig.actors.keysArray()) {\n actorDict = customConfig.actors;\n workObjectDict = customConfig.workObjects;\n } else {\n actorDict.addEach(customConfig.actors);\n workObjectDict.addEach(customConfig.workObjects);\n }\n\n const actorKeys = actorDict.keysArray();\n const workObjectKeys = workObjectDict.keysArray();\n\n this.iconDictionaryService.updateIconRegistries([], [], customConfig);\n\n this.iconDictionaryService\n .getIconConfiguration()\n .appendSRCFile(actorKeys, actorDict, workObjectKeys, workObjectDict);\n\n this.iconDictionaryService.addIconsFromDomainConfiguration(\n elementTypes.ACTOR,\n actorKeys.map((a) => elementTypes.ACTOR + a)\n );\n this.iconDictionaryService.addIconsFromDomainConfiguration(\n elementTypes.WORKOBJECT,\n workObjectKeys.map((w) => elementTypes.WORKOBJECT + w)\n );\n\n if (updateDomainName) {\n const configurationName = customConfig.name;\n this.setDomainName(configurationName);\n }\n }\n\n getCurrentConfiguration(): DomainConfiguration | undefined {\n const actors = this.iconDictionaryService.getActorsDictionary();\n const workObjects = this.iconDictionaryService.getWorkObjectsDictionary();\n\n let domainConfiguration;\n\n if (actors.size() > 0 && workObjects.size() > 0) {\n domainConfiguration = this.createConfigFromDictionaries(\n actors,\n workObjects\n );\n }\n return domainConfiguration;\n }\n\n getCurrentConfigurationForExport(): DomainConfigurationForExport | undefined {\n const currentConfiguration = this.getCurrentConfiguration();\n\n if (currentConfiguration) {\n const actors: any = {};\n const workObjects: any = {};\n\n currentConfiguration.actors.all().forEach((entry) => {\n actors[entry.key] = entry.value;\n });\n currentConfiguration.workObjects.all().forEach((entry) => {\n workObjects[entry.key] = entry.value;\n });\n\n return {\n name: currentConfiguration.name,\n actors: actors,\n workObjects: workObjects,\n };\n }\n return;\n }\n\n getCurrentConfigurationNamesWithoutPrefix(): CustomDomainConfiguration {\n return {\n name: this.titleService.getDomainName() || INITIAL_DOMAIN_NAME,\n actors: this.iconDictionaryService\n .getActorsDictionary()\n .keysArray()\n .map((a) => a.replace(elementTypes.ACTOR, '')),\n workObjects: this.iconDictionaryService\n .getWorkObjectsDictionary()\n .keysArray()\n .map((w) => w.replace(elementTypes.WORKOBJECT, '')),\n };\n }\n\n createMinimalConfigurationWithDefaultIcons(): DomainConfiguration {\n const minimalConfig = this.createConfigFromCanvas();\n\n defaultConf.actors.forEach((iconName) => {\n minimalConfig.actors.add(\n this.iconDictionaryService.getIconSource(iconName),\n iconName\n );\n });\n defaultConf.workObjects.forEach((iconName) => {\n minimalConfig.workObjects.add(\n this.iconDictionaryService.getIconSource(iconName),\n iconName\n );\n });\n\n return minimalConfig;\n }\n\n private createConfigFromDictionaries(\n actorsDict: Dictionary,\n workObjectsDict: Dictionary\n ): DomainConfiguration {\n const actorNames = actorsDict.keysArray();\n const workobjectNames = workObjectsDict.keysArray();\n const newActors = new Dictionary();\n const newWorkobjects = new Dictionary();\n\n // Fill Configuration from Canvas-Objects\n actorNames.forEach((actor) => {\n newActors.add(\n actorsDict.get(actor),\n actor.replace(elementTypes.ACTOR, '')\n );\n });\n workobjectNames.forEach((workObject) => {\n newWorkobjects.add(\n workObjectsDict.get(workObject),\n workObject.replace(elementTypes.WORKOBJECT, '')\n );\n });\n\n return {\n name: this.titleService.getDomainName(),\n actors: newActors,\n workObjects: newWorkobjects,\n };\n }\n\n private createConfigFromCanvas(): DomainConfiguration {\n const config = {\n name: INITIAL_DOMAIN_NAME,\n actors: new Dictionary(),\n workObjects: new Dictionary(),\n };\n\n let allCanvasObjects = this.elementRegistryService.getAllCanvasObjects();\n\n allCanvasObjects\n .map((e) => e.businessObject)\n .forEach((element) => {\n const type = element.type\n .replace(elementTypes.ACTOR, '')\n .replace(elementTypes.WORKOBJECT, '');\n if (element.type.includes(elementTypes.ACTOR)) {\n let src = this.iconDictionaryService.getIconSource(type) || '';\n config.actors.add(src, type);\n } else if (element.type.includes(elementTypes.WORKOBJECT)) {\n let src = this.iconDictionaryService.getIconSource(type) || '';\n config.workObjects.add(src, type);\n }\n });\n\n return config;\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n CustomDomainConfiguration,\n DomainConfiguration,\n} from '../../Domain/Common/domainConfiguration';\nimport { BehaviorSubject } from 'rxjs';\nimport { DomainConfigurationService } from './domain-configuration.service';\nimport { IconDictionaryService } from './icon-dictionary.service';\nimport { getNameFromType } from '../../Utils/naming';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { IconListItem } from '../../Domain/Domain-Configuration/iconListItem';\nimport { Dictionary } from '../../Domain/Common/dictionary/dictionary';\nimport { ImportDomainStoryService } from '../Import/import-domain-story.service';\nimport { TitleService } from '../Title/title.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n SNACKBAR_SUCCESS,\n} from '../../Domain/Common/constants';\nimport { StorageService } from '../BrowserStorage/storage.service';\nimport { UsedIconList } from 'src/app/Domain/Domain-Configuration/UsedIconList';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DomainCustomizationService {\n private readonly domainConfigurationTypes: BehaviorSubject;\n\n private allIconListItems = new Dictionary();\n\n private configurationHasChanged = false;\n\n selectedActors$ = new BehaviorSubject([]);\n selectedWorkobjects$ = new BehaviorSubject([]);\n private changedDomainCofiguration: DomainConfiguration | undefined;\n\n constructor(\n private configurationService: DomainConfigurationService,\n private iconDictionaryService: IconDictionaryService,\n private importService: ImportDomainStoryService,\n private titleService: TitleService,\n private storageService: StorageService,\n private elementRegistryService: ElementRegistryService,\n private snackbar: MatSnackBar\n ) {\n this.domainConfigurationTypes = new BehaviorSubject(\n this.configurationService.getCurrentConfigurationNamesWithoutPrefix()\n );\n\n this.selectedWorkobjects$.next(\n this.domainConfigurationTypes.value.workObjects\n );\n this.selectedActors$.next(this.domainConfigurationTypes.value.actors);\n\n iconDictionaryService\n .getAllIconDictionary()\n .keysArray()\n .forEach((iconName) => {\n this.addIconToAllIconList(iconName);\n });\n\n importService.importedConfigurationEvent.subscribe((config) => {\n this.importConfiguration(config);\n });\n const storedDomainConfiguration =\n this.storageService.getStoredDomainConfiguration();\n if (storedDomainConfiguration) {\n this.importConfiguration(storedDomainConfiguration, false);\n }\n const importedConfiguration = this.importService.getImportedConfiguration();\n if (importedConfiguration) {\n this.importConfiguration(importedConfiguration, false);\n }\n }\n\n importConfiguration(\n customConfig: DomainConfiguration,\n saveDomain = true\n ): void {\n const actorKeys = customConfig.actors.keysArray();\n const workObjectKeys = customConfig.workObjects.keysArray();\n\n this.changeName(customConfig.name);\n actorKeys.forEach((iconName) => {\n if (!this.allIconListItems.has(iconName)) {\n this.addIconToAllIconList(iconName);\n }\n const selectedActorNames = this.selectedActors$.value;\n if (!selectedActorNames.includes(iconName)) {\n this.selectActor(iconName);\n }\n });\n workObjectKeys.forEach((iconName) => {\n if (!this.allIconListItems.has(iconName)) {\n this.addIconToAllIconList(iconName);\n }\n const selectedWorkobjectNames = this.selectedWorkobjects$.value;\n if (!selectedWorkobjectNames.includes(iconName)) {\n this.selectWorkObject(iconName);\n }\n });\n if (saveDomain) {\n this.saveDomain(this.elementRegistryService.getUsedIcons(), true);\n }\n }\n\n /** Getter & Setter **/\n getDomainConfiguration(): BehaviorSubject {\n return this.domainConfigurationTypes;\n }\n\n getIconForName(iconName: string): BehaviorSubject {\n return this.allIconListItems.get(iconName);\n }\n\n isIconActor(iconName: string): boolean {\n return (\n this.domainConfigurationTypes.value.actors.filter(\n (actor: string) => actor === iconName\n ).length > 0\n );\n }\n\n isIconWorkObject(iconName: string): boolean {\n return (\n this.domainConfigurationTypes.value.workObjects.filter(\n (workObject: string) => workObject === iconName\n ).length > 0\n );\n }\n\n changeName(domainName: string): void {\n this.titleService.setDomainName(domainName);\n const changedDomain = this.domainConfigurationTypes.value;\n changedDomain.name = domainName;\n this.domainConfigurationTypes.next(changedDomain);\n }\n\n /** Seleted Icons **/\n setAsUnassigned(iconName: string, isActor: boolean): void {\n if (isActor) {\n this.deselectActor(iconName);\n } else {\n this.deselectWorkobject(iconName);\n }\n this.updateIcon(false, false, iconName);\n }\n\n setAsActor(isActor: boolean, actor: string): void {\n if (isActor) {\n this.updateIcon(true, false, actor);\n this.selectActor(actor);\n this.deselectWorkobject(actor);\n\n const icon = this.iconDictionaryService.getFullDictionary().get(actor);\n this.iconDictionaryService.getActorsDictionary().add(icon, actor);\n } else {\n this.deselectActor(actor);\n this.updateIcon(false, false, actor);\n this.iconDictionaryService.getActorsDictionary().delete(actor);\n }\n }\n\n setAsWorkobject(isWorkobject: boolean, workobject: string): void {\n if (isWorkobject) {\n this.updateIcon(false, true, workobject);\n this.selectWorkObject(workobject);\n this.deselectActor(workobject);\n\n const icon = this.iconDictionaryService\n .getFullDictionary()\n .get(workobject);\n this.iconDictionaryService\n .getWorkObjectsDictionary()\n .add(icon, workobject);\n } else {\n this.deselectWorkobject(workobject);\n this.updateIcon(false, false, workobject);\n this.iconDictionaryService.getWorkObjectsDictionary().delete(workobject);\n }\n }\n\n selectActor(actor: string): void {\n const value = this.domainConfigurationTypes.value;\n if (!value.actors.includes(actor)) {\n value.actors.push(actor);\n this.domainConfigurationTypes.next(value);\n this.updateActorSubject();\n }\n }\n\n selectWorkObject(workObject: string): void {\n const value = this.domainConfigurationTypes.value;\n if (!value.workObjects.includes(workObject)) {\n value.workObjects.push(workObject);\n this.domainConfigurationTypes.next(value);\n this.updateWorkObjectSubject();\n }\n }\n\n deselectActor(actor: string): void {\n if (this.domainConfigurationTypes) {\n this.domainConfigurationTypes.next({\n name: this.domainConfigurationTypes.value.name,\n actors: this.domainConfigurationTypes.value.actors.filter(\n (a: string) => !a.includes(actor)\n ),\n workObjects: this.domainConfigurationTypes.value.workObjects,\n });\n }\n this.updateActorSubject();\n }\n\n deselectWorkobject(workobject: string): void {\n if (this.domainConfigurationTypes) {\n this.domainConfigurationTypes.next({\n name: this.domainConfigurationTypes.value.name,\n actors: this.domainConfigurationTypes.value.actors,\n workObjects: this.domainConfigurationTypes.value.workObjects.filter(\n (w: string) => !w.includes(workobject)\n ),\n });\n }\n this.updateWorkObjectSubject();\n }\n\n setSelectedWorkObject(sortedList: string[]): void {\n const value = this.domainConfigurationTypes.value;\n value.workObjects = sortedList;\n this.domainConfigurationTypes.next(value);\n this.updateWorkObjectSubject();\n }\n\n setSelectedActors(sortedList: string[]): void {\n const value = this.domainConfigurationTypes.value;\n value.actors = sortedList;\n this.domainConfigurationTypes.next(value);\n this.updateActorSubject();\n }\n\n private updateActorSubject(): void {\n this.selectedActors$.next(this.domainConfigurationTypes.value.actors);\n this.configurationHasChanged = true;\n }\n\n private updateWorkObjectSubject(): void {\n this.selectedWorkobjects$.next(\n this.domainConfigurationTypes.value.workObjects\n );\n this.configurationHasChanged = true;\n }\n\n /** Revert Domain **/\n resetDomain(): void {\n const defaultConfig =\n this.configurationService.createMinimalConfigurationWithDefaultIcons();\n\n this.selectedWorkobjects$.value.forEach((workObjectName) => {\n if (!defaultConfig.workObjects.has(workObjectName)) {\n this.deselectWorkobject(workObjectName);\n }\n });\n this.selectedActors$.value.forEach((actorName) => {\n if (!defaultConfig.actors.has(actorName)) {\n this.deselectActor(actorName);\n }\n });\n\n this.domainConfigurationTypes.next({\n name: defaultConfig.name,\n actors: defaultConfig.actors.keysArray(),\n workObjects: defaultConfig.workObjects.keysArray(),\n } as CustomDomainConfiguration);\n\n this.updateAllIconBehaviourSubjects();\n }\n\n cancel(): void {\n this.domainConfigurationTypes.next(\n this.configurationService.getCurrentConfigurationNamesWithoutPrefix()\n );\n this.updateAllIconBehaviourSubjects();\n this.resetToInitialConfiguration();\n }\n\n private resetToInitialConfiguration(): void {\n this.updateActorSubject();\n this.updateWorkObjectSubject();\n }\n\n /** Persist Domain **/\n saveDomain(usedIcons: UsedIconList, imported = false): void {\n const changedActors: string[] = [];\n const changedWorkobjects: string[] = [];\n if (this.configurationHasChanged) {\n const changedDomain = this.createDomainConfiguration();\n\n const configurationActors = changedDomain.actors.keysArray();\n usedIcons?.actors.forEach((actor) => {\n if (\n !configurationActors?.includes(actor) &&\n !changedActors.includes(actor)\n ) {\n changedActors.push(actor);\n }\n });\n const configurationWorkobjects = changedDomain.workObjects.keysArray();\n usedIcons?.workobjects.forEach((workobject) => {\n if (\n !configurationWorkobjects?.includes(workobject) &&\n !changedWorkobjects.includes(workobject)\n ) {\n changedWorkobjects.push(workobject);\n }\n });\n\n if (!changedActors.length && !changedWorkobjects.length) {\n this.changedDomainCofiguration = changedDomain;\n\n this.updateIcons(changedDomain);\n\n this.storageService.setStoredDomainConfiguration(\n this.changedDomainCofiguration\n );\n this.snackbar.open(\n imported\n ? 'Configuration imported successfully'\n : 'Configuration saved sucessfully',\n undefined,\n {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n }\n );\n }\n } else {\n this.snackbar.open(\n imported\n ? 'No configuration to be imported'\n : 'No configuration to be saved',\n undefined,\n {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_INFO,\n }\n );\n }\n if (changedActors.length || changedWorkobjects.length) {\n if (changedActors.length) {\n const actors = changedActors.join(', ');\n this.snackbar.open(\n `The following icons are already in use as actors and cannot be changed: ${actors}`,\n undefined,\n {\n duration: SNACKBAR_DURATION * 3,\n panelClass: SNACKBAR_INFO,\n }\n );\n }\n if (changedWorkobjects.length) {\n const workobjects = changedWorkobjects.join(', ');\n this.snackbar.open(\n `The following icons are already in use as workobjects and cannot be changed: ${workobjects}`,\n undefined,\n {\n duration: SNACKBAR_DURATION * 3,\n panelClass: SNACKBAR_INFO,\n }\n );\n }\n }\n }\n\n exportDomain(): void {\n this.configurationService.exportConfiguration();\n }\n\n getAndClearSavedConfiguration(): DomainConfiguration | undefined {\n const temp = this.changedDomainCofiguration;\n this.changedDomainCofiguration = undefined;\n\n return temp;\n }\n\n private createDomainConfiguration(): DomainConfiguration {\n const actors = new Dictionary();\n const workObjects = new Dictionary();\n\n this.domainConfigurationTypes.value.actors.forEach((type: string) => {\n actors.add(this.iconDictionaryService.getIconSource(type), type);\n });\n this.domainConfigurationTypes.value.workObjects.forEach((type: string) => {\n workObjects.add(this.iconDictionaryService.getIconSource(type), type);\n });\n\n return {\n name: this.domainConfigurationTypes.value.name || '',\n actors,\n workObjects,\n };\n }\n\n /** Update Icons **/\n addNewIcon(iconName: string): void {\n const iconDict = new Dictionary();\n iconDict.add(this.getSrcForIcon(iconName), iconName);\n this.iconDictionaryService.addIconsToCss(iconDict);\n this.addIconToAllIconList(iconName);\n }\n\n private addIconToAllIconList(iconName: string): void {\n this.allIconListItems.add(\n new BehaviorSubject({\n name: iconName,\n svg: this.getSrcForIcon(iconName),\n isActor: this.isIconActor(iconName),\n isWorkObject: this.isIconWorkObject(iconName),\n }),\n iconName\n );\n }\n\n private updateIcon(\n isActor: boolean,\n isWorkobject: boolean,\n iconName: string\n ) {\n const iconBehaviourSubject = this.getIconForName(iconName);\n const icon = iconBehaviourSubject.value;\n icon.isActor = isActor;\n icon.isWorkObject = isWorkobject;\n\n iconBehaviourSubject.next(icon);\n }\n\n private updateAllIconBehaviourSubjects(): void {\n const customDomainCofiguration = this.domainConfigurationTypes.value;\n this.allIconListItems.keysArray().forEach((iconName) => {\n if (customDomainCofiguration.actors.includes(iconName)) {\n this.updateIcon(true, false, iconName);\n } else if (customDomainCofiguration.workObjects.includes(iconName)) {\n this.updateIcon(false, true, iconName);\n } else {\n this.updateIcon(false, false, iconName);\n }\n });\n }\n\n private getSrcForIcon(name: string): string {\n let iconName: string;\n if (name.includes(elementTypes.DOMAINSTORY)) {\n iconName = getNameFromType(name);\n } else {\n iconName = name;\n }\n const rawSrc = this.iconDictionaryService.getIconSource(iconName);\n\n if (!rawSrc) {\n return '';\n }\n\n if (rawSrc.startsWith('data')) {\n return rawSrc;\n } else {\n return 'data:image/svg+xml,' + rawSrc;\n }\n }\n\n private updateIcons(changedDomain: DomainConfiguration) {\n this.allIconListItems\n .keysArray()\n .forEach((item) => this.setAsUnassigned(item, this.isIconActor(item)));\n changedDomain.actors\n .keysArray()\n .forEach((actor) => this.setAsActor(true, actor));\n changedDomain.workObjects\n .keysArray()\n .forEach((workObject) => this.setAsWorkobject(true, workObject));\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { getNameFromType } from 'src/app/Utils/naming';\nimport {\n allIcons,\n appendedIcons,\n} from 'src/app/Domain/Domain-Configuration/allIcons';\nimport {\n defaultConf,\n IconConfiguration,\n} from 'src/app/Domain/Common/iconConfiguration';\nimport { Configuration } from 'src/app/Domain/Common/configuration';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\nimport { sanitizeIconName } from '../../Utils/sanitizer';\n\nexport const ICON_PREFIX = 'icon-domain-story-';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconDictionaryService {\n private actorIconDictionary = new Dictionary();\n private workObjectDictionary = new Dictionary();\n\n private allIconDictionary = new Dictionary();\n private iconDictionaryForBPMN = new Dictionary();\n\n private customConfiguration?: DomainConfiguration;\n\n private readonly iconConfig: IconConfiguration;\n\n constructor() {\n this.allIconDictionary.addEach(allIcons);\n this.iconConfig = new IconConfiguration(this.allIconDictionary);\n }\n\n initTypeDictionaries(actors: string[], workObjects: string[]): void {\n if (!actors || actors.length == 0) {\n actors = defaultConf.actors;\n }\n if (!workObjects || workObjects.length == 0) {\n workObjects = defaultConf.workObjects;\n }\n\n const allTypes = new Dictionary();\n allTypes.addEach(allIcons);\n allTypes.appendDict(this.getAppendedIconDictionary());\n\n this.initDictionary(\n actors,\n allTypes,\n this.actorIconDictionary,\n elementTypes.ACTOR\n );\n this.initDictionary(\n workObjects,\n allTypes,\n this.workObjectDictionary,\n elementTypes.WORKOBJECT\n );\n }\n\n private initDictionary(\n keys: string[],\n allTypes: Dictionary,\n dictionary: Dictionary,\n namePrefix: elementTypes\n ) {\n dictionary.clear();\n for (const key of keys) {\n const name = namePrefix + key;\n dictionary.add(allTypes.get(key), name);\n }\n\n dictionary.keysArray().forEach((entry) => {\n const name = getNameFromType(entry);\n this.registerIconForBPMN(\n entry,\n ICON_PREFIX + sanitizeIconName(name.toLowerCase())\n );\n });\n }\n\n getCurrentIconConfigurationForBPMN(): Configuration {\n if (this.customConfiguration) {\n return this.iconConfig.createCustomConf(this.customConfiguration);\n }\n return this.iconConfig.getDefaultConf();\n }\n\n allInTypeDictionary(type: elementTypes, elements: BusinessObject[]): boolean {\n let collection: Dictionary;\n if (type === elementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (type === elementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n\n let allIn = true;\n if (elements) {\n elements.forEach((element) => {\n if (!collection.has(element.type)) {\n allIn = false;\n }\n });\n } else {\n return false;\n }\n return allIn;\n }\n\n /** Load Icons from Configuration **/\n\n addIconsFromDomainConfiguration(\n dictionaryType: elementTypes,\n iconTypes: string[]\n ): void {\n let collection: Dictionary;\n if (dictionaryType === elementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (dictionaryType === elementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n\n const allTypes = new Dictionary();\n allTypes.addEach(allIcons);\n allTypes.appendDict(appendedIcons);\n\n iconTypes.forEach((type) => {\n if (!collection.has(type)) {\n const name = getNameFromType(type);\n const src = allTypes.get(name);\n if (src) {\n this.registerIconForType(dictionaryType, type, src);\n this.registerIconForBPMN(\n type,\n sanitizeIconName(ICON_PREFIX + name.toLowerCase())\n );\n }\n }\n });\n }\n\n /** Add Icon(s) to Dictionary **/\n registerIconForBPMN(name: string, src: string): void {\n this.iconDictionaryForBPMN.set(name, src);\n }\n\n addIconsToTypeDictionary(\n actorIcons: BusinessObject[],\n workObjectIcons: BusinessObject[]\n ) {\n if (!this.allInTypeDictionary(elementTypes.ACTOR, actorIcons)) {\n this.addIconsFromDomainConfiguration(\n elementTypes.ACTOR,\n actorIcons.map((element) => element.type)\n );\n }\n if (!this.allInTypeDictionary(elementTypes.WORKOBJECT, workObjectIcons)) {\n this.addIconsFromDomainConfiguration(\n elementTypes.WORKOBJECT,\n workObjectIcons.map((element) => element.type)\n );\n }\n }\n\n registerIconForType(type: elementTypes, name: string, src: string): void {\n if (!name.includes(type)) {\n name = type + name;\n }\n\n let collection = new Dictionary();\n if (type === elementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (type === elementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n collection.set(name, src);\n }\n\n updateIconRegistries(\n actors: BusinessObject[],\n workObjects: BusinessObject[],\n config: DomainConfiguration\n ): void {\n const elements: BusinessObject[] = [];\n\n actors.forEach((a) => elements.push(a));\n workObjects.forEach((w) => elements.push(w));\n\n const customIcons = new Dictionary();\n\n const actorsDict = new Dictionary();\n const workObjectsDict = new Dictionary();\n config.actors.keysArray().forEach((key) => {\n actorsDict.add(config.actors.get(key), key);\n });\n config.workObjects.keysArray().forEach((key) => {\n workObjectsDict.add(config.workObjects.get(key), key);\n });\n\n this.extractCustomIconsFromDictionary(actorsDict, customIcons);\n this.extractCustomIconsFromDictionary(workObjectsDict, customIcons);\n\n elements.forEach((element) => {\n const name = sanitizeIconName(\n element.type\n .replace(elementTypes.ACTOR, '')\n .replace(elementTypes.WORKOBJECT, '')\n );\n if (\n (element.type.includes(elementTypes.ACTOR) ||\n element.type.includes(elementTypes.WORKOBJECT)) &&\n !this.getFullDictionary().has(name)\n ) {\n this.registerIconForBPMN(\n ICON_PREFIX + name.toLowerCase(),\n element.type\n );\n }\n });\n\n this.addNewIconsToDictionary(customIcons);\n this.addIconsToTypeDictionary(actors, workObjects);\n }\n\n private extractCustomIconsFromDictionary(\n elementDictionary: Dictionary,\n customIcons: Dictionary\n ) {\n elementDictionary.keysArray().forEach((name) => {\n const sanitizedName = sanitizeIconName(name);\n if (!this.getFullDictionary().has(sanitizedName)) {\n customIcons.add(elementDictionary.get(name), sanitizedName);\n }\n });\n }\n\n /** Add new Icon(s) **/\n\n addNewIconsToDictionary(customIcons: Dictionary) {\n customIcons.keysArray().forEach((key) => {\n const custom = customIcons.get(key);\n this.addIMGToIconDictionary(custom.src, key);\n });\n this.addIconsToCss(customIcons);\n }\n\n addIMGToIconDictionary(input: string, name: string): void {\n appendedIcons.set(name, input);\n }\n\n addIconsToCss(customIcons: Dictionary) {\n const sheetEl = document.getElementById('iconsCss');\n customIcons.keysArray().forEach((key) => {\n const src = customIcons.get(key);\n const iconStyle =\n '.' +\n ICON_PREFIX +\n sanitizeIconName(key.toLowerCase()) +\n '::before{ content: url(\"data:image/svg+xml;utf8,' +\n this.wrapSRCInSVG(src) +\n '\"); margin: 3px;}';\n // @ts-ignore\n sheetEl?.sheet?.insertRule(iconStyle, sheetEl.sheet.cssRules.length);\n });\n }\n\n private wrapSRCInSVG(src: string): string {\n return (\n \"\"\n );\n }\n\n /** Getter & Setter **/\n\n getFullDictionary(): Dictionary {\n const fullDictionary = new Dictionary();\n fullDictionary.appendDict(this.allIconDictionary);\n fullDictionary.appendDict(this.getAppendedIconDictionary());\n return fullDictionary;\n }\n\n getAppendedIconDictionary(): Dictionary {\n const appendedDict = new Dictionary();\n appendedIcons.keysArray().forEach((key) => {\n if (!this.allIconDictionary.has(key)) {\n appendedDict.set(key, appendedIcons.get(key));\n }\n });\n return appendedDict;\n }\n\n getTypeDictionary(type: elementTypes): Dictionary {\n if (type === elementTypes.ACTOR) {\n return this.actorIconDictionary;\n } else if (type === elementTypes.WORKOBJECT) {\n return this.workObjectDictionary;\n }\n return new Dictionary();\n }\n\n getTypeDictionaryKeys(type: elementTypes): string[] {\n return this.getTypeDictionary(type).keysArray();\n }\n\n getTypeIconSRC(type: elementTypes, name: string): string | null {\n if (type === elementTypes.ACTOR) {\n if (!name.startsWith(elementTypes.ACTOR)) {\n name = elementTypes.ACTOR + name;\n }\n return this.actorIconDictionary.get(name);\n } else if (type === elementTypes.WORKOBJECT) {\n if (!name.startsWith(elementTypes.WORKOBJECT)) {\n name = elementTypes.WORKOBJECT + name;\n }\n return this.workObjectDictionary.get(name);\n }\n return null;\n }\n\n getIconForBPMN(type: elementTypes): string | null {\n return this.iconDictionaryForBPMN.get(type);\n }\n\n getIconSource(name: string): string | null {\n if (this.allIconDictionary.has(name)) {\n return this.allIconDictionary.get(name);\n } else if (appendedIcons.has(name)) {\n return appendedIcons.get(name);\n }\n return null;\n }\n\n getElementsOfType(\n elements: BusinessObject[],\n type: elementTypes\n ): BusinessObject[] {\n const elementOfType: any = [];\n elements.forEach((element) => {\n if (element.type.includes(type)) {\n elementOfType.push(element);\n }\n });\n return elementOfType;\n }\n\n getAllIconDictionary(): Dictionary {\n return this.allIconDictionary;\n }\n\n getActorsDictionary(): Dictionary {\n return this.actorIconDictionary;\n }\n\n getWorkObjectsDictionary(): Dictionary {\n return this.workObjectDictionary;\n }\n\n getIconConfiguration(): IconConfiguration {\n return this.iconConfig;\n }\n\n setCusomtConfiguration(customConfiguration: DomainConfiguration): void {\n this.customConfiguration = customConfiguration;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { CanvasObject } from 'src/app/Domain/Common/canvasObject';\nimport { GroupCanvasObject } from '../../Domain/Common/groupCanvasObject';\nimport { ActivityCanvasObject } from '../../Domain/Common/activityCanvasObject';\nimport { UsedIconList } from 'src/app/Domain/Domain-Configuration/UsedIconList';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ElementRegistryService {\n private registry: any;\n private fullyInitialized = false;\n\n /**\n * Initially the registry has only the root-Element.\n * Once the canvas has bees initialized, we adjust the reference to point to the elements on the canvas for convenience\n */\n correctInitialize(): void {\n if (!this.fullyInitialized) {\n if (this.registry.__implicitroot) {\n this.registry = this.registry.__implicitroot.element.children;\n this.fullyInitialized = true;\n }\n }\n }\n\n setElementRegistry(registry: any): void {\n this.registry = registry._elements;\n }\n\n clear(): void {\n this.registry = null;\n this.fullyInitialized = false;\n }\n\n createObjectListForDSTDownload(): CanvasObject[] {\n if (this.registry) {\n const allObjectsFromCanvas = this.getAllCanvasObjects();\n const groups = this.getAllGroups();\n\n const objectList: CanvasObject[] = [];\n\n this.fillListOfCanvasObjects(allObjectsFromCanvas, objectList, groups);\n\n return objectList;\n }\n return [];\n }\n\n private fillListOfCanvasObjects(\n allObjectsFromCanvas: CanvasObject[],\n objectList: CanvasObject[],\n groups: GroupCanvasObject[]\n ): void {\n allObjectsFromCanvas.forEach((canvasElement) => {\n if (canvasElement.type === elementTypes.ACTIVITY) {\n objectList.push(canvasElement);\n }\n\n // ensure that Activities are always after Actors, Workobjects and Groups in .dst files\n else {\n if (canvasElement.type === elementTypes.TEXTANNOTATION) {\n canvasElement.businessObject.width = canvasElement.width;\n canvasElement.businessObject.height = canvasElement.height;\n }\n if (!objectList.includes(canvasElement)) {\n objectList.unshift(canvasElement);\n }\n }\n });\n\n groups.forEach((group) => {\n objectList.push(group);\n });\n }\n\n getAllActivities(): ActivityCanvasObject[] {\n const activities: ActivityCanvasObject[] = [];\n\n this.getAllCanvasObjects().forEach((element) => {\n if (element.type.includes(elementTypes.ACTIVITY)) {\n activities.push(element as ActivityCanvasObject);\n }\n });\n return activities;\n }\n\n getAllConnections(): ActivityCanvasObject[] {\n const connections: ActivityCanvasObject[] = [];\n this.getAllCanvasObjects().forEach((element) => {\n const type = element.type;\n if (type === elementTypes.CONNECTION) {\n connections.push(element as ActivityCanvasObject);\n }\n });\n return connections;\n }\n\n getAllCanvasObjects(): CanvasObject[] {\n const allObjects: CanvasObject[] = [];\n const groupObjects: GroupCanvasObject[] = [];\n\n this.checkChildForGroup(groupObjects, allObjects);\n\n // for each memorized group, remove it from the group-array and check its children, whether they are groups or not\n // if a child is a group, memorize it in the group-array\n // other children should already be in the allObjects list\n let i = groupObjects.length - 1;\n while (groupObjects.length >= 1) {\n const currentGroup = groupObjects.pop();\n // @ts-ignore\n currentGroup.children.forEach((child: CanvasObject) => {\n const type = child.type;\n if (type.includes(elementTypes.GROUP)) {\n groupObjects.push(child as GroupCanvasObject);\n }\n });\n i = groupObjects.length - 1;\n }\n return allObjects;\n }\n\n // returns all groups on the canvas and inside other groups\n getAllGroups(): GroupCanvasObject[] {\n const groupObjects: GroupCanvasObject[] = [];\n const allObjects: CanvasObject[] = [];\n\n this.checkChildForGroup(groupObjects, allObjects);\n\n for (const group of groupObjects) {\n group.children?.forEach((child: CanvasObject) => {\n if (child.type.includes(elementTypes.GROUP)) {\n groupObjects.push(child as GroupCanvasObject);\n }\n });\n }\n return groupObjects;\n }\n\n private checkChildForGroup(\n groupObjects: GroupCanvasObject[],\n allObjects: CanvasObject[]\n ): void {\n const registryElementNames = Object.keys(this.registry);\n for (let name of registryElementNames) {\n const entry = this.registry[name].element;\n if (entry.businessObject) {\n const type = entry.type;\n if (type && type.includes(elementTypes.GROUP)) {\n // if it is a group, memorize this for later\n groupObjects.push(entry);\n } else if (type) {\n allObjects.push(entry);\n }\n }\n }\n }\n\n // get a list of activities, that originate from an actor-type\n getActivitiesFromActors(): ActivityCanvasObject[] {\n const activitiesFromActors: ActivityCanvasObject[] = [];\n const activities = this.getAllActivities();\n\n activities.forEach((activity: ActivityCanvasObject) => {\n if (activity.source?.type.includes(elementTypes.ACTOR)) {\n activitiesFromActors.push(activity);\n }\n });\n return activitiesFromActors;\n }\n\n getUsedIcons(): UsedIconList {\n const actors = this.getAllActors();\n const workobjects = this.getAllWorkobjects();\n\n return {\n actors: actors.map((a) => a.type.replace(elementTypes.ACTOR, '')),\n workobjects: workobjects.map((w) =>\n w.type.replace(elementTypes.WORKOBJECT, '')\n ),\n };\n }\n\n private getAllActors() {\n return this.getAllCanvasObjects().filter((co) =>\n co.type.includes(elementTypes.ACTOR)\n );\n }\n\n getAllWorkobjects() {\n return this.getAllCanvasObjects().filter((co) =>\n co.type.includes(elementTypes.WORKOBJECT)\n );\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { DomainConfigurationService } from 'src/app/Service/DomainConfiguration/domain-configuration.service';\nimport { sanitizeForDesktop } from 'src/app/Utils/sanitizer';\nimport { TitleService } from 'src/app/Service/Title/title.service';\nimport { ConfigAndDST } from 'src/app/Domain/Export/configAndDst';\nimport { DirtyFlagService } from 'src/app/Service/DirtyFlag/dirty-flag.service';\nimport { PngService } from 'src/app/Service/Export/png.service';\nimport { SvgService } from 'src/app/Service/Export/svg.service';\nimport { Subscription } from 'rxjs';\nimport { RendererService } from '../Renderer/renderer.service';\nimport { HtmlPresentationService } from './html-presentation.service';\nimport { formatDate } from '@angular/common';\nimport { environment } from '../../../environments/environment';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ExportService implements OnDestroy {\n titleSubscription: Subscription;\n descriptionSubscription: Subscription;\n\n title = '';\n description = '';\n\n constructor(\n private configurationService: DomainConfigurationService,\n private titleService: TitleService,\n private dirtyFlagService: DirtyFlagService,\n private pngService: PngService,\n private svgService: SvgService,\n private htmlPresentationService: HtmlPresentationService,\n private rendererService: RendererService\n ) {\n this.titleSubscription = this.titleService.title$.subscribe(\n (title: string) => {\n this.title = title;\n }\n );\n this.descriptionSubscription = this.titleService.description$.subscribe(\n (description: string) => {\n this.description = description;\n }\n );\n }\n\n ngOnDestroy(): void {\n this.titleSubscription.unsubscribe();\n this.descriptionSubscription.unsubscribe();\n }\n\n isDomainStoryExportable(): boolean {\n return this.rendererService.getStory().length >= 1;\n }\n\n createConfigAndDST(DomainStory: any): ConfigAndDST {\n return new ConfigAndDST(\n this.configurationService.getCurrentConfigurationForExport(),\n DomainStory\n );\n }\n\n downloadDST(): void {\n const dst = this.getStoryForDownload();\n const configAndDST = this.createConfigAndDST(dst);\n const json = JSON.stringify(configAndDST, null, 2);\n\n const filename = sanitizeForDesktop(\n this.title + '_' + this.getCurrentDateString()\n );\n\n this.downloadFile(\n json,\n 'data:text/plain;charset=utf-8,',\n filename,\n '.egn',\n true\n );\n }\n\n private downloadFile(\n data: string,\n datatype: string,\n filename: string,\n fileEnding: string,\n makeClean: boolean\n ) {\n const element = document.createElement('a');\n element.setAttribute('href', datatype + encodeURIComponent(data));\n element.setAttribute('download', filename + fileEnding);\n\n element.style.display = 'none';\n document.body.appendChild(element);\n\n element.click();\n\n if (makeClean) {\n this.dirtyFlagService.makeClean();\n }\n\n document.body.removeChild(element);\n }\n\n downloadSVG(withTitle: boolean, useWhiteBackground: boolean): void {\n const story = this.getStoryForDownload();\n const dst = this.createConfigAndDST(story);\n\n const svgData = this.svgService.createSVGData(\n this.title,\n this.description,\n dst,\n withTitle,\n useWhiteBackground\n );\n\n this.downloadFile(\n svgData,\n 'data:application/bpmn20-xml;charset=UTF-8,',\n sanitizeForDesktop(this.title + '_' + this.getCurrentDateString()),\n '.egn.svg',\n true\n );\n }\n\n downloadPNG(withTitle: boolean): void {\n const canvas = document.getElementById('canvas');\n if (canvas) {\n const container = canvas.getElementsByClassName('djs-container');\n const svgElements = container[0].getElementsByTagName('svg');\n const outerSVGElement = svgElements[0];\n const viewport = outerSVGElement.getElementsByClassName('viewport')[0];\n const layerBase = viewport.getElementsByClassName('layer-base')[0];\n\n const image = document.createElement('img');\n\n // removes unwanted black dots in image\n let svg = this.pngService.extractSVG(viewport, outerSVGElement);\n\n svg = this.pngService.prepareSVG(\n svg,\n layerBase,\n this.description,\n this.title,\n withTitle\n );\n\n image.onload = () => {\n const tempCanvas = document.createElement('canvas');\n\n // add a 10px buffer to the right and lower boundary\n tempCanvas.width = this.pngService.getWidth() + 10;\n tempCanvas.height = this.pngService.getHeight() + 10;\n\n const ctx = tempCanvas.getContext('2d');\n if (ctx) {\n // fill with white background\n ctx.rect(0, 0, tempCanvas.width, tempCanvas.height);\n ctx.fillStyle = 'white';\n ctx.fill();\n\n ctx.drawImage(image, 0, 0);\n }\n\n const png64 = tempCanvas.toDataURL('image/png');\n const ele = document.createElement('a');\n ele.setAttribute(\n 'download',\n sanitizeForDesktop(this.title) +\n '_' +\n this.getCurrentDateString() +\n '.png'\n );\n ele.setAttribute('href', png64);\n document.body.appendChild(ele);\n ele.click();\n document.body.removeChild(ele);\n\n // image source has to be removed to circumvent browser caching\n image.src = '';\n };\n image.onchange = image.onload;\n\n image.width = this.pngService.getWidth();\n image.height = this.pngService.getHeight();\n\n image.src = 'data:image/svg+xml,' + svg;\n }\n }\n\n downloadHTMLPresentation(): void {\n const filename = sanitizeForDesktop(\n this.title + '_' + this.getCurrentDateString()\n );\n this.htmlPresentationService.downloadHTMLPresentation(filename).then();\n }\n\n private getStoryForDownload(): unknown[] {\n const story = this.rendererService.getStory() as unknown[];\n story.push({ info: this.titleService.getDescription() });\n story.push({ version: environment.version });\n return story;\n }\n\n private getCurrentDateString(): string {\n return formatDate(new Date(), 'YYYY-MM-dd', 'en-GB');\n }\n}\n","import { Injectable } from '@angular/core';\nimport { sanitizeForDesktop } from '../../Utils/sanitizer';\nimport { ReplayService } from '../Replay/replay.service';\n// @ts-ignore\nimport doT from 'dot';\nimport { TitleService } from '../Title/title.service';\n\n@Injectable({\n providedIn: 'root',\n})\n/**\n * Initial idea and PR from https://github.com/indika-dev\n */\nexport class HtmlPresentationService {\n constructor(\n private replayService: ReplayService,\n private titleService: TitleService\n ) {}\n\n private multiplexSecret: any;\n private multiplexId: any;\n\n private modeler: any;\n\n setModelerClasses(canvas: any, selection: any, modeler: any): void {\n this.modeler = modeler;\n }\n\n private static viewBoxCoordinates(svg: any): any {\n const ViewBoxCoordinate =\n /width=\"([^\"]+)\"\\s+height=\"([^\"]+)\"\\s+viewBox=\"([^\"]+)\"/;\n const match = svg.match(ViewBoxCoordinate);\n return match[3];\n }\n\n /*\n ---------------------------\n SVG handling starts here\n ----------------------------\n */\n\n async downloadHTMLPresentation(filename: string): Promise {\n const svgData = [];\n // export all sentences of domain story\n this.replayService.startReplay();\n try {\n const result = await this.modeler.saveSVG({});\n this.fixActivityMarkersForEachStep(\n result,\n this.replayService.getCurrentStepNumber()\n );\n svgData.push({\n content: HtmlPresentationService.createSVGData(result.svg),\n transition: 'slide',\n });\n } catch (err) {\n alert('There was an error exporting the SVG.\\n' + err);\n }\n while (\n this.replayService.getCurrentStepNumber() <\n this.replayService.getMaxStepNumber()\n ) {\n this.replayService.nextStep();\n try {\n const result = await this.modeler.saveSVG({});\n this.fixActivityMarkersForEachStep(\n result,\n this.replayService.getCurrentStepNumber()\n );\n svgData.push({\n content: HtmlPresentationService.createSVGData(result.svg),\n transition: 'slide',\n });\n } catch (err) {\n alert('There was an error exporting the SVG.\\n' + err);\n }\n }\n this.replayService.stopReplay();\n\n // create download for presentation\n const revealjsTemplate = document.getElementById('revealjs-template');\n const dots = doT.template(revealjsTemplate?.innerHTML);\n const revealjsData = {\n script: 'script',\n title: this.titleService.getTitle(),\n description: this.titleService.getDescription(),\n sentences: svgData,\n multiplexSecret: this.multiplexSecret,\n multiplexId: this.multiplexId,\n };\n const element = document.createElement('a');\n element.setAttribute(\n 'href',\n 'data:text/html;charset=UTF-8,' +\n this.fixMalformedHtmlScript(dots, revealjsData)\n );\n element.setAttribute('download', sanitizeForDesktop(filename) + '.html');\n element.style.display = 'none';\n document.body.appendChild(element);\n element.click();\n document.body.removeChild(element);\n }\n\n private fixMalformedHtmlScript(\n dots: any,\n revealjsData: {\n multiplexId: any;\n sentences: any[];\n multiplexSecret: any;\n description: string;\n title: string;\n script: string;\n }\n ) {\n return dots(revealjsData).replace(''),\n result.svg.indexOf('') + 7\n );\n const split = defs.split(' {\n const idToReplace = id.substring(4, id.length - 1);\n const newId =\n idToReplace.slice(0, id.length - 5) +\n 'customId' +\n sectionIndex +\n idToReplace.slice(idToReplace.length - 2);\n // @ts-ignore\n result.svg = result.svg.replaceAll(idToReplace, newId);\n });\n newDefs += '= 72) {\n fix = true;\n // https://www.chromestatus.com/features/5656049583390720\n }\n } else if (name.includes('Firefox')) {\n fix = true;\n\n // versionNumber of implementation unknown\n }\n if (fix) {\n while (svg.includes('#')) {\n svg = svg.replace('#', '%23');\n }\n }\n return svg;\n }\n\n findMostOuterElements(svg: HTMLElement): Box {\n let xLeft = 0;\n let xRight = 0;\n let yUp = 0;\n let yDown = 0;\n\n const elements = svg.getElementsByClassName('djs-group');\n\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n const sub = element.children;\n\n let elXLeft: number;\n let elXRight: number;\n let elYUp: number;\n let elYDown: number;\n\n const transform = sub[0].getAttribute('transform');\n if (transform) {\n let nums;\n\n if (transform.includes('matrix')) {\n transform.replace('matrix(', '');\n transform.replace(')', '');\n nums = transform.split(' ');\n elXLeft = parseInt(nums[4]);\n elYUp = parseInt(nums[5]);\n } else {\n transform.replace('translate(', '');\n transform.replace(')', '');\n nums = transform.split(' ');\n elXLeft = parseInt(nums[0]);\n elYUp = parseInt(nums[1]);\n }\n\n const rects = sub[0].getElementsByTagName('rect');\n const outerRect = rects[rects.length - 1];\n\n const width = outerRect.getAttribute('width');\n\n elXRight = elXLeft + parseInt(width != null ? width : '0');\n elYDown = elYUp + sub[0].getBoundingClientRect().height;\n } else {\n const rects = element.getElementsByTagName('rect');\n const outerRect = rects[rects.length - 1];\n\n const x = outerRect.getAttribute('x');\n const y = outerRect.getAttribute('y');\n\n elXLeft = parseInt(x != null ? x : '0');\n elYUp = parseInt(y != null ? y : '0');\n\n const width = outerRect.getAttribute('width');\n const height = outerRect.getAttribute('height');\n\n elXRight = elXLeft + parseInt(width != null ? width : '0');\n elYDown = elYUp + parseInt(height != null ? height : '0') + 20; // Add 20 px as Padding for text at the bottom\n }\n if (elXLeft < xLeft) {\n xLeft = elXLeft;\n }\n if (elXRight > xRight) {\n xRight = elXRight;\n }\n if (elYUp < yUp) {\n yUp = elYUp;\n }\n if (elYDown > yDown) {\n yDown = elYDown;\n }\n }\n\n yUp -= 75; // we need to adjust yUp to have space for the title and description\n\n return {\n xLeft,\n xRight,\n yUp,\n yDown,\n };\n }\n\n prepareSVG(\n svg: string,\n layerBase: any,\n description: string,\n title: string,\n withTitle: boolean\n ): string {\n const box = this.findMostOuterElements(layerBase);\n let viewBoxIndex = svg.indexOf('width=\"');\n\n this.calculateWidthAndHeight(box);\n\n const { insertText, extraHeight } = createTitleAndDescriptionSVGElement(\n title,\n description,\n box.xLeft,\n box.yUp + 20,\n this.width\n );\n if (withTitle) {\n this.height += extraHeight;\n }\n\n const bounds = this.createBounds(box, extraHeight);\n\n const dataStart = svg.substring(0, viewBoxIndex);\n viewBoxIndex = svg.indexOf('style=\"');\n\n const dataEnd = svg.substring(viewBoxIndex);\n dataEnd.substring(viewBoxIndex);\n\n svg = dataStart + bounds + dataEnd;\n\n const insertIndex = svg.indexOf('') + 20;\n\n if (withTitle) {\n svg = [\n svg.slice(0, insertIndex),\n insertText,\n svg.slice(insertIndex),\n ].join('');\n }\n svg = this.URIHashtagFix(svg);\n\n return svg;\n }\n\n private createBounds(box: Box, extraHeight: number) {\n return (\n 'width=\"' +\n this.width +\n '\" height=\"' +\n this.height +\n '\" viewBox=\" ' +\n box.xLeft +\n ' ' +\n (box.yUp - extraHeight) +\n ' ' +\n this.width +\n ' ' +\n this.height +\n '\" '\n );\n }\n\n /**\n * Calculate the Width and Height of the Bounding Box for the PNG so no Parts are cut off\n */\n private calculateWidthAndHeight(box: Box): [number, number] {\n if (box.xLeft < 0) {\n if (box.xRight < 0) {\n this.width = Math.abs(box.xLeft - box.xRight);\n } else {\n this.width = Math.abs(box.xLeft) + box.xRight;\n }\n } else {\n this.width = box.xRight - box.xLeft;\n }\n\n if (box.yUp < 0) {\n if (box.yDown < 0) {\n this.height = Math.abs(box.yUp - box.yDown);\n } else {\n this.height = Math.abs(box.yUp) + box.yDown;\n }\n } else {\n this.height = box.yDown - box.yUp;\n }\n\n // if the domain-Story is smaller than 300px in width or height, increase its dimensions\n if (this.height < 300) {\n this.height += 300;\n box.yUp -= 150;\n box.yDown += 150;\n }\n if (this.width < 300) {\n this.width += 300;\n box.xLeft -= 150;\n box.xRight += 150;\n }\n return [this.height, this.width];\n }\n\n extractSVG(viewport: any, outerSVGElement: any): string {\n const layerResizers = viewport.getElementsByClassName('layer-resizers');\n const layerOverlays = viewport.getElementsByClassName('layer-overlays');\n const transform = viewport.getAttribute('transform');\n const translate = viewport.getAttribute('translate');\n\n if (layerResizers[0]) {\n layerResizers[0].parentNode.removeChild(layerResizers[0]);\n }\n if (layerOverlays[0]) {\n layerOverlays[0].parentNode.removeChild(layerOverlays[0]);\n }\n\n // remove canvas scrolling and scaling before serializeToString of SVG\n if (transform) {\n viewport.removeAttribute('transform');\n }\n if (translate) {\n viewport.removeAttribute('translate');\n }\n\n const svg = new XMLSerializer().serializeToString(outerSVGElement);\n\n // re-add canvas scrolling and scaling\n if (transform) {\n viewport.setAttribute('transform', transform);\n }\n if (translate) {\n viewport.setAttribute('translate', translate);\n }\n return svg;\n }\n\n getWidth(): number {\n return this.width;\n }\n\n getHeight(): number {\n return this.height;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ConfigAndDST } from 'src/app/Domain/Export/configAndDst';\nimport { createTitleAndDescriptionSVGElement } from 'src/app/Service/Export/exportUtil';\nimport { ModelerService } from '../Modeler/modeler.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SvgService {\n private cacheData = '';\n\n constructor(private modelerService: ModelerService) {}\n\n createSVGData(\n title: string,\n description: string,\n dst: ConfigAndDST,\n withTitle: boolean,\n useWhiteBackground: boolean\n ): string {\n this.cacheData = this.modelerService.getEncoded();\n\n let data = structuredClone(this.cacheData);\n\n let viewBoxIndex = data.indexOf('width=\"');\n\n let { width, height, viewBox } = this.viewBoxCoordinates(data);\n\n let xLeft: number;\n let xRight: number;\n let yUp: number;\n let yDown: number;\n const splitViewBox = viewBox.split(/\\s/);\n\n xLeft = +splitViewBox[0];\n yUp = +splitViewBox[1];\n xRight = +splitViewBox[2];\n yDown = +splitViewBox[3];\n\n if (xRight < 300) {\n xRight += 300;\n width += 300;\n }\n\n const { insertText, extraHeight } = createTitleAndDescriptionSVGElement(\n title,\n description,\n xLeft,\n yUp,\n width\n );\n if (withTitle) {\n // to display the title and description in the SVG-file, we need to add a container for the text-elements\n height += extraHeight + 80;\n }\n\n const bounds = this.createBounds(\n width,\n height,\n xLeft,\n yUp,\n xRight,\n yDown,\n withTitle\n );\n\n const dataStart = data.substring(0, viewBoxIndex);\n viewBoxIndex = data.indexOf('\" version');\n\n const dataEnd = data.substring(viewBoxIndex);\n dataEnd.substring(viewBoxIndex);\n\n data = dataStart + bounds + dataEnd;\n\n const insertIndex = this.findIndexToInsertData(data);\n\n if (withTitle) {\n data = data.slice(0, insertIndex) + insertText + data.slice(insertIndex);\n }\n\n if (useWhiteBackground) {\n const svgIndex = data.indexOf('width=\"');\n const backgroundColorWhite = 'style=\"background-color:white\" ';\n data =\n data.slice(0, svgIndex) + backgroundColorWhite + data.slice(svgIndex);\n }\n\n return this.appendDST(data, dst);\n }\n\n private findIndexToInsertData(data: string) {\n let insertIndex = data.indexOf('');\n if (insertIndex < 0) {\n insertIndex = data.indexOf('version=\"1.2\">') + 14;\n } else {\n insertIndex += 7;\n }\n return insertIndex;\n }\n\n private createBounds(\n width: number,\n height: number,\n xLeft: number,\n yUp: number,\n xRight: number,\n yDown: number,\n withTitle: boolean\n ): string {\n return (\n 'width=\"' +\n width +\n '\" height=\" ' +\n height +\n '\" viewBox=\"' +\n xLeft +\n ' ' +\n (withTitle ? yUp - 80 : yUp) +\n ' ' +\n xRight +\n ' ' +\n (yDown + 30)\n );\n }\n\n private viewBoxCoordinates(svg: string): {\n width: number;\n height: number;\n viewBox: string;\n } {\n const ViewBoxCoordinate =\n /width=\"([^\"]+)\"\\s+height=\"([^\"]+)\"\\s+viewBox=\"([^\"]+)\"/;\n const match = svg.match(ViewBoxCoordinate);\n if (match) {\n return { width: +match[1], height: +match[2], viewBox: match[3] };\n }\n return { width: 0, height: 0, viewBox: '' };\n }\n\n private appendDST(data: string, dst: ConfigAndDST): string {\n data += '\\n';\n return data;\n }\n}\n","import { EventEmitter, Injectable, OnDestroy } from '@angular/core';\nimport { IconDictionaryService } from 'src/app/Service/DomainConfiguration/icon-dictionary.service';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { TitleService } from 'src/app/Service/Title/title.service';\nimport { ImportRepairService } from 'src/app/Service/Import/import-repair.service';\nimport { Observable, Subscription } from 'rxjs';\nimport { RendererService } from 'src/app/Service/Renderer/renderer.service';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport {\n DomainConfiguration,\n fromConfigurationFromFile,\n} from 'src/app/Domain/Common/domainConfiguration';\nimport { DialogService } from '../Dialog/dialog.service';\nimport { InfoDialogComponent } from '../../Presentation/Dialog/info-dialog/info-dialog.component';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { InfoDialogData } from '../../Domain/Dialog/infoDialogData';\nimport { restoreTitleFromFileName } from '../../Utils/sanitizer';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_TITLE,\n SNACKBAR_DURATION,\n SNACKBAR_ERROR,\n SNACKBAR_INFO,\n} from '../../Domain/Common/constants';\nimport { DomainConfigurationService } from '../DomainConfiguration/domain-configuration.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ImportDomainStoryService implements OnDestroy {\n titleSubscription: Subscription;\n descriptionSubscription: Subscription;\n\n title = INITIAL_TITLE;\n description = INITIAL_DESCRIPTION;\n private importedConfiguration: DomainConfiguration | null = null;\n\n private importedConfigurationEmitter =\n new EventEmitter();\n\n constructor(\n private iconDictionaryService: IconDictionaryService,\n private importRepairService: ImportRepairService,\n private titleService: TitleService,\n private rendererService: RendererService,\n private dialogService: DialogService,\n private domainConfigurationService: DomainConfigurationService,\n private snackbar: MatSnackBar\n ) {\n this.titleSubscription = this.titleService.title$.subscribe(\n (title: string) => {\n this.title = title;\n }\n );\n this.descriptionSubscription = this.titleService.description$.subscribe(\n (description: string) => {\n this.description = description;\n }\n );\n }\n\n ngOnDestroy(): void {\n this.titleSubscription.unsubscribe();\n this.descriptionSubscription.unsubscribe();\n }\n\n get importedConfigurationEvent(): Observable {\n return this.importedConfigurationEmitter.asObservable();\n }\n\n getImportedConfiguration(): DomainConfiguration {\n const config: DomainConfiguration = {\n name: this.importedConfiguration?.name || '',\n actors: this.importedConfiguration?.actors || new Dictionary(),\n workObjects: this.importedConfiguration?.workObjects || new Dictionary(),\n };\n this.importedConfiguration = null;\n return config;\n }\n\n importDST(input: Blob, filename: string, isSVG: boolean): void {\n const fileReader = new FileReader();\n const titleText = restoreTitleFromFileName(filename, isSVG);\n\n // no need to put this on the commandStack\n this.titleService.updateTitleAndDescription(titleText, null, false);\n\n fileReader.onloadend = (e) => {\n if (e && e.target) {\n this.fileReaderFunction(e.target.result, isSVG, false);\n }\n };\n\n fileReader.readAsText(input);\n }\n\n importEGN(input: Blob, filename: string, isSVG: boolean): void {\n const fileReader = new FileReader();\n const titleText = restoreTitleFromFileName(filename, isSVG);\n\n // no need to put this on the commandStack\n this.titleService.updateTitleAndDescription(titleText, null, false);\n\n fileReader.onloadend = (e) => {\n if (e && e.target) {\n this.fileReaderFunction(e.target.result, isSVG, true);\n }\n };\n\n fileReader.readAsText(input);\n }\n\n private fileReaderFunction(\n text: string | ArrayBuffer | null,\n isSVG: boolean,\n isEGN: boolean\n ): void {\n let dstText;\n if (typeof text === 'string') {\n if (isSVG) {\n dstText = this.removeXMLComments(text);\n } else {\n dstText = text;\n }\n\n let elements: any[];\n let config: DomainConfiguration;\n let configFromFile: {\n name: string;\n actors: { [key: string]: any };\n workObjects: { [key: string]: any };\n };\n\n let dstAndConfig = this.extractDstAndConfig(dstText, isSVG);\n if (dstAndConfig == null) {\n return;\n }\n\n // current implementation\n if (dstAndConfig.domain) {\n configFromFile = isEGN\n ? dstAndConfig.domain\n : JSON.parse(dstAndConfig.domain);\n config = fromConfigurationFromFile(configFromFile);\n elements = isEGN ? dstAndConfig.dst : JSON.parse(dstAndConfig.dst);\n } else {\n // legacy implementation\n if (dstAndConfig.config) {\n configFromFile = JSON.parse(dstAndConfig.config);\n config = fromConfigurationFromFile(configFromFile);\n elements = JSON.parse(dstAndConfig.dst);\n } else {\n // implementation prior to configuration\n elements = JSON.parse(dstText);\n config =\n this.domainConfigurationService.createMinimalConfigurationWithDefaultIcons();\n }\n }\n\n const configChanged = this.checkConfigForChanges(config);\n\n let lastElement = elements[elements.length - 1];\n if (!lastElement.id) {\n lastElement = elements.pop();\n let importVersionNumber = lastElement;\n\n // if the last element has the importedVersionNumber has the tag version,\n // then there exists another meta tag 'info' for the description\n if (importVersionNumber.version) {\n lastElement = elements.pop();\n }\n\n if (importVersionNumber.version) {\n importVersionNumber = importVersionNumber.version as string;\n } else {\n importVersionNumber = '?';\n this.snackbar.open(`The version number is unreadable.`, undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_ERROR,\n });\n }\n elements = this.handleVersionNumber(importVersionNumber, elements);\n }\n\n if (\n !this.importRepairService.checkForUnreferencedElementsInActivitiesAndRepair(\n elements\n )\n ) {\n this.showBrokenImportDialog(isSVG ? 'SVG' : 'DST');\n }\n\n this.titleService.updateTitleAndDescription(\n null,\n lastElement.info,\n false\n );\n\n this.importRepairService.adjustPositions(elements);\n\n this.updateIconRegistries(elements, config);\n this.rendererService.importStory(elements, configChanged, config);\n }\n }\n\n private handleVersionNumber(\n importVersionNumber: string,\n elements: BusinessObject[]\n ): BusinessObject[] {\n const versionPrefix = +importVersionNumber.substring(\n 0,\n importVersionNumber.lastIndexOf('.')\n );\n if (versionPrefix <= 0.5) {\n elements =\n this.importRepairService.updateCustomElementsPreviousV050(elements);\n this.showPreviousV050Dialog(versionPrefix);\n }\n return elements;\n }\n\n private extractDstAndConfig(dstText: string, isSVG: boolean) {\n let dstAndConfig = null;\n try {\n dstAndConfig = JSON.parse(dstText);\n } catch (e) {\n this.showBrokenImportDialog(isSVG ? 'SVG' : 'DST');\n }\n return dstAndConfig;\n }\n\n private removeXMLComments(xmlText: string): string {\n xmlText = xmlText.substring(xmlText.indexOf(''));\n while (xmlText.includes('')) {\n xmlText = xmlText.replace('', '');\n }\n xmlText = xmlText.replace('', '');\n xmlText = xmlText.replace('', '');\n return xmlText;\n }\n\n checkConfigForChanges(domainConfiguration: DomainConfiguration): boolean {\n const newActorKeys = domainConfiguration.actors.keysArray();\n const newWorkObjectKeys = domainConfiguration.workObjects.keysArray();\n\n const currentActorKeys = this.iconDictionaryService.getTypeDictionaryKeys(\n elementTypes.ACTOR\n );\n const currentWorkobjectKeys =\n this.iconDictionaryService.getTypeDictionaryKeys(elementTypes.WORKOBJECT);\n\n let changed = false;\n\n if (\n newActorKeys.length !== currentActorKeys.length ||\n newWorkObjectKeys.length !== currentWorkobjectKeys.length\n ) {\n return true;\n }\n\n for (let i = 0; i < newActorKeys.length; i++) {\n changed =\n this.clearName(currentActorKeys[i]) !== this.clearName(newActorKeys[i]);\n if (changed) {\n i = newActorKeys.length;\n }\n }\n if (changed) {\n return changed;\n }\n for (let i = 0; i < newWorkObjectKeys.length; i++) {\n changed =\n this.clearName(currentWorkobjectKeys[i]) !==\n this.clearName(newWorkObjectKeys[i]);\n if (changed) {\n i = newWorkObjectKeys.length;\n }\n }\n return changed;\n }\n\n private clearName(name: string): string {\n return name\n .replace(elementTypes.ACTOR, '')\n .replace(elementTypes.WORKOBJECT, '');\n }\n\n private updateIconRegistries(\n elements: BusinessObject[],\n config: DomainConfiguration\n ): void {\n const actorIcons = this.iconDictionaryService.getElementsOfType(\n elements,\n elementTypes.ACTOR\n );\n const workObjectIcons = this.iconDictionaryService.getElementsOfType(\n elements,\n elementTypes.WORKOBJECT\n );\n this.iconDictionaryService.updateIconRegistries(\n actorIcons,\n workObjectIcons,\n config\n );\n\n this.setImportedConfigurationAndEmit(config);\n }\n\n private showPreviousV050Dialog(version: number): void {\n const title = 'Compatability-Warning';\n const text =\n 'The uploaded Domain-Story is from version ' +\n version +\n '. There may be problems with the default actors or workobjects contained in the story.';\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n config.data = new InfoDialogData(title, text, true);\n\n this.dialogService.openDialog(InfoDialogComponent, config);\n }\n\n private setImportedConfigurationAndEmit(config: DomainConfiguration) {\n this.importedConfiguration = config;\n this.importedConfigurationEmitter.emit(config);\n }\n\n private showBrokenImportDialog(type: string) {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n config.data = new InfoDialogData(\n 'Error during import',\n 'The uploaded ' +\n type +\n ' is not complete, there could be elements missing from the canvas.',\n true,\n false\n );\n\n this.dialogService.openDialog(InfoDialogComponent, config);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport { Waypoint } from 'src/app/Domain/Common/waypoint';\nimport { ActivityBusinessObject } from '../../Domain/Common/activityBusinessObject';\n\n/**\n * Repairs broken Domain Stories so that it can be rendered onto the canvas\n * by removing activities and connections that reference elements that don't exists\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ImportRepairService {\n checkForUnreferencedElementsInActivitiesAndRepair(\n elements: BusinessObject[]\n ): boolean {\n const activities: ActivityBusinessObject[] = [];\n const objectIDs: string[] = [];\n\n let complete = true;\n\n elements.forEach((element) => {\n const type = element.type;\n if (type === elementTypes.ACTIVITY || type === elementTypes.CONNECTION) {\n activities.push(element as ActivityBusinessObject);\n } else {\n objectIDs.push(element.id);\n }\n });\n\n activities.forEach((activity) => {\n const source = activity.source;\n const target = activity.target;\n if (!objectIDs.includes(source) || !objectIDs.includes(target)) {\n complete = false;\n const activityIndex = elements.indexOf(activity);\n elements = elements.splice(activityIndex, 1);\n }\n });\n return complete;\n }\n\n /**\n * Ensure backwards compatibility.\n * Previously Document had no special name and was just addressed as workObject\n * Bubble was renamed to Conversation\n */\n updateCustomElementsPreviousV050(\n elements: BusinessObject[]\n ): BusinessObject[] {\n for (const element of elements) {\n if (element.type === elementTypes.WORKOBJECT) {\n element.type = elementTypes.WORKOBJECT + 'Document';\n } else if (element.type === elementTypes.WORKOBJECT + 'Bubble') {\n element.type = elementTypes.WORKOBJECT + 'Conversation';\n }\n }\n return elements;\n }\n\n /**\n * Adjusts Positions of Elements to ensure the Domain Story starts in the visible parts of the canvas\n */\n adjustPositions(elements: BusinessObject[]): void {\n let xLeft = 0;\n let yUp = 0;\n let isFirst = true;\n\n this.findFirstElement(elements, isFirst, xLeft, yUp);\n\n if (xLeft < 75 || xLeft > 150 || yUp < 0 || yUp > 50) {\n // add Padding for the Palette and the top\n xLeft -= 75;\n yUp -= 50;\n\n elements.forEach((element) =>\n this.adjustElementPosition(element, xLeft, yUp)\n );\n }\n }\n\n private adjustElementPosition(\n element: BusinessObject,\n xLeft: number,\n yUp: number\n ): void {\n if (\n element.type === elementTypes.ACTIVITY ||\n element.type === elementTypes.CONNECTION\n ) {\n const waypoints = (element as ActivityBusinessObject).waypoints;\n waypoints.forEach((point: Waypoint) => {\n point.x -= xLeft;\n point.y -= yUp;\n\n if (point.original) {\n point.original.x = point.x;\n point.original.y = point.y;\n }\n });\n } else {\n element.x -= xLeft;\n element.y -= yUp;\n }\n }\n\n private findFirstElement(\n elements: BusinessObject[],\n isFirst: boolean,\n xLeft: number,\n yUp: number\n ) {\n elements.forEach((element) => {\n let elXLeft;\n let elYUp;\n if (\n element.type !== elementTypes.ACTIVITY &&\n element.type !== elementTypes.CONNECTION\n ) {\n if (isFirst) {\n xLeft = element.x;\n yUp = element.y;\n isFirst = false;\n }\n elXLeft = element.x;\n elYUp = element.y;\n if (elXLeft < xLeft) {\n xLeft = elXLeft;\n }\n if (elYUp < yUp) {\n yUp = elYUp;\n }\n }\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { MassNamingService } from 'src/app/Service/LabelDictionary/mass-naming.service';\nimport { IconDictionaryService } from '../DomainConfiguration/icon-dictionary.service';\nimport { WorkObjectLabelEntry } from '../../Domain/LabelDictionary/workObjectLabelEntry';\nimport { LabelEntry } from '../../Domain/LabelDictionary/labelEntry';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LabelDictionaryService {\n activityLabels: LabelEntry[] = [];\n workObjektLabels: WorkObjectLabelEntry[] = [];\n\n constructor(\n private massNamingService: MassNamingService,\n private elementRegistryService: ElementRegistryService,\n private iconDictionaryService: IconDictionaryService\n ) {}\n\n createLabelDictionaries(): void {\n this.activityLabels = [];\n this.workObjektLabels = [];\n\n const allObjects = this.elementRegistryService.getAllCanvasObjects();\n\n allObjects.forEach((element) => {\n const name = element.businessObject.name;\n if (\n name &&\n name.length > 0 &&\n element.type.includes(elementTypes.ACTIVITY) &&\n !this.activityLabels.map((a) => a.name).includes(name)\n ) {\n this.activityLabels.push({\n name,\n originalName: name,\n });\n } else if (\n name &&\n name.length > 0 &&\n element.type.includes(elementTypes.WORKOBJECT) &&\n !this.workObjektLabels.map((e) => e.name).includes(name)\n ) {\n const iconName = element.type.replace(elementTypes.WORKOBJECT, '');\n let icon = this.iconDictionaryService.getIconSource(iconName);\n if (!icon) {\n return;\n }\n if (!icon.startsWith('data')) {\n icon = 'data:image/svg+xml,' + icon;\n }\n this.workObjektLabels.push({\n name,\n originalName: name,\n icon,\n });\n }\n });\n this.activityLabels.sort((a, b) => {\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\n });\n this.workObjektLabels.sort((a, b) => {\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\n });\n }\n\n getActivityLabels(): LabelEntry[] {\n return this.activityLabels.slice();\n }\n\n getWorkObjectLabels(): WorkObjectLabelEntry[] {\n return this.workObjektLabels.slice();\n }\n\n getUniqueWorkObjectNames(): String[] {\n const workObjects = this.elementRegistryService.getAllWorkobjects();\n return [\n ...new Set(\n workObjects\n .filter((workObject) => {\n return !!workObject.businessObject.name;\n })\n .map((workObject) => workObject.businessObject.name)\n ),\n ];\n }\n\n massRenameLabels(\n activityNames: string[],\n originalActivityNames: string[],\n workObjectNames: string[],\n originalWorkObjectNames: string[]\n ): void {\n for (let i = 0; i < originalActivityNames.length; i++) {\n if (!activityNames[i]) {\n activityNames[i] = '';\n }\n if (!(activityNames[i] == originalActivityNames[i])) {\n this.massNamingService.massChangeNames(\n originalActivityNames[i],\n activityNames[i],\n elementTypes.ACTIVITY\n );\n }\n }\n for (let i = 0; i < originalWorkObjectNames.length; i++) {\n if (!workObjectNames[i]) {\n workObjectNames[i] = '';\n }\n if (!(workObjectNames[i] == originalWorkObjectNames[i])) {\n this.massNamingService.massChangeNames(\n originalWorkObjectNames[i],\n workObjectNames[i],\n elementTypes.WORKOBJECT\n );\n }\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { CanvasObject } from 'src/app/Domain/Common/canvasObject';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { CommandStackService } from '../CommandStack/command-stack.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MassNamingService {\n constructor(\n private elementRegistryService: ElementRegistryService,\n private commandStackService: CommandStackService\n ) {}\n\n massChangeNames(\n oldValue: string,\n newValue: string,\n type: elementTypes\n ): void {\n const allRelevantObjects: CanvasObject[] = [];\n\n this.elementRegistryService.getAllCanvasObjects().forEach((element) => {\n if (\n element.type.includes(type) &&\n element.businessObject.name === oldValue\n ) {\n allRelevantObjects.push(element);\n }\n });\n\n const context = {\n elements: allRelevantObjects,\n newValue,\n };\n\n this.commandStackService.execute('domainStoryObjects.massRename', context);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { initializeContextPadProvider } from '../../Modeler/modeler/context-pad/domainStoryContextPadProvider';\nimport {\n getMultipleNumberRegistry,\n getNumberRegistry,\n initializeNumbering,\n setNumberIsMultiple,\n updateExistingNumbersAtEditing,\n} from '../../Modeler/modeler/numbering/numbering';\nimport { initializePalette } from '../../Modeler/modeler/palette/domainStoryPalette';\nimport { initializeRenderer } from '../../Modeler/modeler/domainStoryRenderer';\nimport {\n initializeLabelEditingProvider,\n toggleStashUse,\n} from '../../Modeler/modeler/labeling/dsLabelEditingProvider';\nimport { initializeReplaceOptions } from '../../Modeler/modeler/change-icon/replaceOptions';\n\nimport { DirtyFlagService } from '../DirtyFlag/dirty-flag.service';\nimport { IconDictionaryService } from '../DomainConfiguration/icon-dictionary.service';\nimport { ElementRegistryService } from '../ElementRegistry/element-registry.service';\nimport { DomainConfigurationService } from '../DomainConfiguration/domain-configuration.service';\nimport { LabelDictionaryService } from '../LabelDictionary/label-dictionary.service';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { ReplayStateService } from '../Replay/replay-state.service';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { ActivityDialogData } from '../../Domain/Dialog/activityDialogData';\nimport { ActivityDialogComponent } from '../../Presentation/Dialog/activity-dialog/activity-dialog.component';\nimport { DialogService } from '../Dialog/dialog.service';\nimport massRenameHandler from '../../Modeler/modeler/updateHandler/massRenameHandler';\nimport headlineAndDescriptionUpdateHandler from '../../Modeler/modeler/updateHandler/headlineAndDescriptionUpdateHandler';\nimport { TitleService } from '../Title/title.service';\nimport { ActivityCanvasObject } from '../../Domain/Common/activityCanvasObject';\nimport { HtmlPresentationService } from '../Export/html-presentation.service';\nimport { positionsMatch } from '../../Utils/mathExtensions';\nimport activityUpdateHandler, {\n initializeActivityUpdateHandler,\n} from '../../Modeler/modeler/updateHandler/activityUpdateHandlers';\nimport elementUpdateHandler from '../../Modeler/modeler/updateHandler/elementUpdateHandler';\nimport { CommandStackService } from '../CommandStack/command-stack.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class InitializerService {\n constructor(\n private dirtyFlagService: DirtyFlagService,\n private iconDictionaryService: IconDictionaryService,\n private elementRegistryService: ElementRegistryService,\n private configurationService: DomainConfigurationService,\n private labelDictionaryService: LabelDictionaryService,\n private replayStateService: ReplayStateService,\n private dialogService: DialogService,\n private commandStackService: CommandStackService,\n private titleService: TitleService,\n private htmlPresentationService: HtmlPresentationService\n ) {}\n\n initializeDomainStoryModelerClasses(): void {\n initializeContextPadProvider(\n this.dirtyFlagService,\n this.iconDictionaryService\n );\n /** The Palette and the Context Menu need the Icons present in the Domain,\n * so the IconDictionaryService and the DomainConfigurationService needs to be given to the Palette **/\n initializePalette(this.iconDictionaryService, this.configurationService);\n initializeRenderer(\n this.iconDictionaryService,\n this.elementRegistryService,\n this.dirtyFlagService\n );\n initializeLabelEditingProvider(this.labelDictionaryService);\n initializeReplaceOptions(this.iconDictionaryService);\n initializeNumbering(this.elementRegistryService);\n initializeActivityUpdateHandler(this.elementRegistryService);\n }\n\n propagateDomainStoryModelerClassesToServices(\n commandStack: any,\n elementRegistry: any,\n canvas: any,\n selection: any,\n modeler: any\n ): void {\n this.commandStackService.setCommandStack(commandStack);\n this.elementRegistryService.setElementRegistry(elementRegistry);\n this.htmlPresentationService.setModelerClasses(canvas, selection, modeler);\n }\n\n initializeDomainStoryModelerEventHandlers(\n commandStack: any,\n eventBus: any\n ): void {\n activityUpdateHandler(commandStack, eventBus);\n massRenameHandler(commandStack, eventBus);\n elementUpdateHandler(commandStack, eventBus);\n headlineAndDescriptionUpdateHandler(commandStack, this.titleService);\n }\n\n initiateEventBusListeners(eventBus: any, commandStack: any): void {\n eventBus.on('element.dblclick', (e: any) => {\n if (!this.replayStateService.getReplayOn()) {\n const element = e.element;\n if (element.type === elementTypes.ACTIVITY) {\n // override the doubleClickListener on activities\n this.activityDoubleClick(element, eventBus, commandStack);\n } else {\n const renderedNumberRegistry = getNumberRegistry();\n\n // add a DoubleClickListener to the number on activities\n if (renderedNumberRegistry.length > 1) {\n const allActivities =\n this.elementRegistryService.getActivitiesFromActors();\n\n if (allActivities.length > 0) {\n const htmlCanvas = document.getElementById('canvas');\n if (htmlCanvas) {\n const container =\n htmlCanvas.getElementsByClassName('djs-container');\n const svgElements = container[0].getElementsByTagName('svg');\n const outerSVGElement = svgElements[0];\n const viewport =\n outerSVGElement.getElementsByClassName('viewport')[0];\n let transform = viewport.getAttribute('transform');\n\n let transformX = 0;\n let transformY = 0;\n let zoomX = 1;\n let zoomY = 1;\n let nums;\n\n const clickX = e.originalEvent.offsetX;\n const clickY = e.originalEvent.offsetY;\n\n // adjust for zoom and panning\n if (transform) {\n transform = transform.replace('matrix(', '');\n transform.replace(')', '');\n nums = transform.split(',');\n zoomX = parseFloat(nums[0]);\n zoomY = parseFloat(nums[3]);\n transformX = parseInt(nums[4], undefined);\n transformY = parseInt(nums[5], undefined);\n }\n\n const width = 25 * zoomX;\n const height = 22 * zoomY;\n\n for (let i = 1; i < renderedNumberRegistry.length; i++) {\n const currentNum = renderedNumberRegistry[i];\n if (currentNum) {\n const tspan = currentNum.getElementsByTagName('tspan')[0];\n const tx = tspan.getAttribute('x');\n const ty = tspan.getAttribute('y');\n const tNumber = parseInt(tspan.innerHTML, undefined);\n\n const elementX = Math.floor(\n tx * zoomX + (transformX - 11 * zoomX)\n );\n const elementY = Math.floor(\n ty * zoomY + (transformY - 15 * zoomY)\n );\n\n allActivities.forEach((activity: ActivityCanvasObject) => {\n const activityNumber = activity.businessObject.number;\n if (activityNumber === tNumber) {\n if (\n positionsMatch(\n width,\n height,\n elementX,\n elementY,\n clickX,\n clickY\n )\n ) {\n this.activityDoubleClick(\n activity,\n eventBus,\n commandStack\n );\n }\n }\n });\n }\n }\n }\n }\n }\n }\n }\n });\n\n // when in replay, do not allow any interaction on the canvas\n eventBus.on(\n [\n 'element.click',\n 'element.dblclick',\n 'element.mousedown',\n 'drag.init',\n 'canvas.viewbox.changing',\n 'autoPlace',\n 'popupMenu.open',\n ],\n 10000000000,\n (event: any) => {\n if (this.replayStateService.getReplayOn()) {\n event.stopPropagation();\n event.preventDefault();\n }\n }\n );\n }\n\n /** Overrrides for Canvas Functions **/\n private activityDoubleClick(\n activity: ActivityCanvasObject,\n eventBus: any,\n commandStack: any\n ): void {\n const source = activity.source;\n\n // ensure the right number when changing the direction of an activity\n toggleStashUse(false);\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n if (\n activity.businessObject.number &&\n source &&\n source.type.includes(elementTypes.ACTOR)\n ) {\n config.data = new ActivityDialogData(\n activity,\n getMultipleNumberRegistry()[activity.businessObject.number],\n true,\n (data: any) => this.saveActivityInputLabel(data, eventBus, commandStack)\n );\n } else if (source && source.type.includes(elementTypes.WORKOBJECT)) {\n config.data = new ActivityDialogData(\n activity,\n false,\n false,\n (activityData: any) =>\n this.saveActivityInputLabel(activityData, eventBus, commandStack)\n );\n }\n this.dialogService.openDialog(ActivityDialogComponent, config);\n }\n\n private saveActivityInputLabel(\n activityData: any,\n eventBus: any,\n commandStack: any\n ): void {\n const label = activityData.activityLabel;\n const hasNumber = activityData.activityNumber ?? false;\n const activityNumber = activityData.activityNumber;\n const multipleNumberAllowed = activityData.multipleNumbers ?? false;\n const element = activityData.activity;\n\n const activitiesFromActors =\n this.elementRegistryService.getActivitiesFromActors();\n const index = activitiesFromActors.indexOf(element);\n\n activitiesFromActors.splice(index, 1);\n if (hasNumber) {\n setNumberIsMultiple(activityNumber, multipleNumberAllowed);\n }\n element.businessObject.multipleNumberAllowed = multipleNumberAllowed;\n\n let options: any;\n if (hasNumber) {\n options = {\n businessObject: element.businessObject,\n newLabel: label,\n newNumber: activityNumber,\n element,\n };\n } else {\n options = {\n businessObject: element.businessObject,\n newLabel: label,\n element,\n };\n }\n\n commandStack.execute('activity.changed', options);\n if (element.businessObject.multipleNumberAllowed !== false) {\n if (getMultipleNumberRegistry()[activityNumber] === false) {\n updateExistingNumbersAtEditing(\n activitiesFromActors,\n activityNumber,\n eventBus\n );\n }\n } else if (element.businessObject.multipleNumberAllowed === false) {\n updateExistingNumbersAtEditing(\n activitiesFromActors,\n activityNumber,\n eventBus\n );\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { assign } from 'min-dash';\nimport DomainStoryModeler from 'src/app/Modeler';\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\nimport { InitializerService } from './initializer.service';\nimport { ElementRegistryService } from '../ElementRegistry/element-registry.service';\nimport { IconDictionaryService } from '../DomainConfiguration/icon-dictionary.service';\nimport { DomainConfigurationService } from '../DomainConfiguration/domain-configuration.service';\nimport { BusinessObject } from '../../Domain/Common/businessObject';\nimport { StorageService } from '../BrowserStorage/storage.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ModelerService {\n constructor(\n private initializerService: InitializerService,\n private elementRegistryService: ElementRegistryService,\n private iconDictionaryService: IconDictionaryService,\n private domainConfigurationService: DomainConfigurationService,\n private storageService: StorageService\n ) {}\n\n private modeler: any;\n private canvas: any;\n private elementRegistry: any;\n private commandStack: any;\n private selection: any;\n private eventBus: any;\n\n private encoded: string | undefined;\n\n postInit(): void {\n const storedDomainConfiguration =\n this.storageService.getStoredDomainConfiguration();\n if (storedDomainConfiguration) {\n this.iconDictionaryService.setCusomtConfiguration(\n storedDomainConfiguration\n );\n this.domainConfigurationService.loadConfiguration(\n storedDomainConfiguration\n );\n }\n this.initializerService.initializeDomainStoryModelerClasses();\n this.modeler = new DomainStoryModeler({\n container: '#canvas',\n keyboard: {\n bindTo: document,\n },\n\n // Disable BPMN-SearchModule and re-enable browser Search\n additionalModules: [\n {\n bpmnSearch: ['value', 'foo'],\n },\n ],\n });\n\n if (this.modeler.get) {\n this.canvas = this.modeler.get('canvas');\n this.elementRegistry = this.modeler.get('elementRegistry');\n this.eventBus = this.modeler.get('eventBus');\n this.commandStack = this.modeler.get('commandStack');\n this.selection = this.modeler.get('selection');\n }\n\n this.initializerService.initializeDomainStoryModelerEventHandlers(\n this.commandStack,\n this.eventBus\n );\n this.initializerService.propagateDomainStoryModelerClassesToServices(\n this.commandStack,\n this.elementRegistry,\n this.canvas,\n this.selection,\n this.modeler\n );\n\n const exportArtifacts = this.debounce(this.saveSVG, 500);\n if (this.modeler.get) {\n this.modeler.on('commandStack.changed', exportArtifacts);\n }\n\n this.initializerService.initiateEventBusListeners(\n this.eventBus,\n this.commandStack\n );\n\n this.modeler.createDiagram();\n // expose bpmnjs to window for debugging purposes\n assign(window, { bpmnjs: this.modeler });\n\n this.startDebounce();\n }\n\n restart(\n domainConfiguration?: DomainConfiguration,\n domainStory?: BusinessObject[]\n ): void {\n const currentStory =\n domainStory != undefined\n ? domainStory\n : this.elementRegistryService\n .createObjectListForDSTDownload()\n .map((e) => e.businessObject);\n if (!domainConfiguration) {\n domainConfiguration = this.storageService.getStoredDomainConfiguration();\n }\n if (domainConfiguration) {\n this.storageService.setStoredDomainConfiguration(domainConfiguration);\n this.iconDictionaryService.setCusomtConfiguration(domainConfiguration);\n this.domainConfigurationService.loadConfiguration(domainConfiguration);\n }\n\n this.elementRegistryService.clear();\n this.modeler?.destroy();\n this.postInit();\n if (currentStory && this.modeler.get) {\n this.modeler.importCustomElements(currentStory);\n }\n }\n\n /** Interactions with the Modeler **/\n getModeler(): any {\n return this.modeler;\n }\n\n commandStackChanged(): void {\n // to update the title of the svg, we need to tell the command stack, that a value has changed\n this.eventBus.fire(\n 'commandStack.changed',\n this.debounce(this.saveSVG, 500)\n );\n }\n\n startDebounce(): void {\n this.debounce(this.saveSVG, 500);\n }\n\n debounce(fn: any, timeout: number): any {\n return () => {\n let timer;\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(() => {\n // tslint:disable-next-line:no-unused-expression\n fn(this.modeler).then((svg: string) => {\n this.encoded = svg;\n }) as Promise;\n }, timeout);\n };\n }\n\n getEncoded(): string {\n return this.encoded ? this.encoded : '';\n }\n\n async saveSVG(modeler: any): Promise {\n try {\n const result = await modeler.saveSVG();\n return result.svg;\n } catch (err) {\n alert('There was an error saving the SVG.\\n' + err);\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ModelerService } from 'src/app/Service/Modeler/modeler.service';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { DirtyFlagService } from 'src/app/Service/DirtyFlag/dirty-flag.service';\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RendererService {\n constructor(\n private modelerService: ModelerService,\n private elementRegistryService: ElementRegistryService,\n private dirtyFlagService: DirtyFlagService\n ) {}\n\n renderStory(domainStory: BusinessObject[]): void {\n this.modelerService.getModeler().importCustomElements(domainStory);\n }\n\n reset(): void {\n this.renderStory([]);\n }\n\n importStory(\n domainStory: BusinessObject[],\n configurationChange: boolean,\n config?: DomainConfiguration,\n makeClean = true\n ): void {\n this.modelerService.restart(config, domainStory);\n this.renderStory(domainStory);\n\n this.elementRegistryService.correctInitialize();\n\n this.modelerService.commandStackChanged();\n this.modelerService.startDebounce();\n\n if (makeClean) {\n this.dirtyFlagService.makeClean();\n }\n }\n\n getStory(): BusinessObject[] {\n return this.elementRegistryService\n .createObjectListForDSTDownload()\n .map((c) => c.businessObject);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReplayStateService {\n private replayOnSubject = new BehaviorSubject(false);\n\n replayOn$ = this.replayOnSubject.asObservable();\n\n setReplayState(state: boolean): void {\n this.replayOnSubject.next(state);\n }\n\n getReplayOn(): boolean {\n return this.replayOnSubject.value;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ReplayStateService } from 'src/app/Service/Replay/replay-state.service';\nimport { DomManipulationService } from 'src/app/Service/DomManipulation/dom-manipulation.service';\nimport { StoryStep } from 'src/app/Domain/Replay/storyStep';\nimport { StoryCreatorService } from './storyCreator/story-creator.service';\nimport { BehaviorSubject } from 'rxjs';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n} from '../../Domain/Common/constants';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReplayService {\n private story: StoryStep[] = [];\n private currentStep = new BehaviorSubject(-1);\n private maxStepNumber = new BehaviorSubject(0);\n\n currentStep$ = this.currentStep.asObservable();\n maxStepNumber$ = this.maxStepNumber.asObservable();\n\n constructor(\n private replayStateService: ReplayStateService,\n private domManipulationService: DomManipulationService,\n private storyCreatorService: StoryCreatorService,\n private snackbar: MatSnackBar\n ) {}\n\n initializeReplay(): void {\n this.currentStep.next(1);\n this.story = this.storyCreatorService.traceActivitiesAndCreateStory();\n this.maxStepNumber.next(this.story.length);\n }\n\n getCurrentStepNumber(): number {\n return this.currentStep.value;\n }\n\n getMaxStepNumber(): number {\n return this.maxStepNumber.value;\n }\n\n nextStep(): void {\n if (this.currentStep.value < this.story.length) {\n this.currentStep.next(this.currentStep.value + 1);\n this.showCurrentStep();\n }\n }\n\n previousStep(): void {\n if (this.currentStep.value > 1) {\n this.currentStep.next(this.currentStep.value - 1);\n this.showCurrentStep();\n }\n }\n\n private showCurrentStep() {\n this.domManipulationService.showStep(\n this.story[this.currentStep.value - 1],\n this.currentStep.value > 1\n ? this.story[this.currentStep.value - 2]\n : undefined\n );\n }\n\n startReplay(): void {\n this.initializeReplay();\n if (this.story?.length) {\n const missingSteps = this.storyCreatorService.getMissingSteps(this.story);\n if (missingSteps.length === 0) {\n this.replayStateService.setReplayState(true);\n this.domManipulationService.showStep(\n this.story[this.currentStep.getValue() - 1]\n );\n } else {\n const steps = missingSteps.join(', ');\n this.snackbar.open(\n steps.length === 1\n ? `The Domain Story is not complete. Step ${steps} is missing.`\n : `The Domain Story is not complete. Steps ${steps} are missing.`,\n undefined,\n {\n duration: SNACKBAR_DURATION * 2,\n panelClass: SNACKBAR_INFO,\n }\n );\n }\n } else {\n this.snackbar.open('You need a Domain Story for replay.', undefined, {\n duration: SNACKBAR_DURATION * 2,\n panelClass: SNACKBAR_INFO,\n });\n }\n }\n\n stopReplay(): void {\n this.currentStep.next(-1);\n this.maxStepNumber.next(0);\n this.replayStateService.setReplayState(false);\n this.domManipulationService.showAll();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { elementTypes } from '../../../Domain/Common/elementTypes';\nimport { ActivityCanvasObject } from '../../../Domain/Common/activityCanvasObject';\nimport { BusinessObject } from '../../../Domain/Common/businessObject';\nimport { CanvasObject } from '../../../Domain/Common/canvasObject';\nimport { ElementRegistryService } from '../../ElementRegistry/element-registry.service';\nimport { StoryStep } from '../../../Domain/Replay/storyStep';\nimport { Dictionary } from '../../../Domain/Common/dictionary/dictionary';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StoryCreatorService {\n constructor(private elementRegistryService: ElementRegistryService) {}\n\n traceActivitiesAndCreateStory(): StoryStep[] {\n const tracedActivityMap = new Dictionary();\n const story: StoryStep[] = [];\n const activities = this.elementRegistryService.getActivitiesFromActors();\n\n activities.forEach((activity) => {\n const activityNumber = Number(activity.businessObject.number); // Sometimes the activityNumber is a string for some reason\n const tracedItem = tracedActivityMap.get(`${activityNumber - 1}`)\n ? tracedActivityMap.get(`${activityNumber - 1}`)\n : [];\n tracedItem.push(activity);\n tracedActivityMap.set(`${activityNumber - 1}`, tracedItem);\n });\n\n for (let i = 0; i < tracedActivityMap.keysArray().length; i++) {\n this.createStep(tracedActivityMap, i, story);\n }\n this.addGroupStep(story);\n return story;\n }\n\n private createStep(\n tracedActivityMap: Dictionary,\n i: number,\n story: StoryStep[]\n ): void {\n const stepObjects = this.getStepObjects(\n tracedActivityMap.get(`${i}`) || []\n );\n const highlightedElements = stepObjects.map((t) => t.id);\n if (i > 0) {\n story[i - 1].objects.forEach((object) => {\n if (!stepObjects.includes(object)) {\n stepObjects.push(object);\n }\n });\n }\n story[i] = {\n highlightedObjects: highlightedElements,\n objects: stepObjects,\n };\n }\n\n getMissingSteps(story: StoryStep[]): number[] {\n if (!story || story.length === 0) {\n return [];\n }\n\n const missingSteps: number[] = [];\n let complete = true;\n for (let i = 0; i < story.length; i++) {\n if (\n !story[i] ||\n !(story[i].objects.length > 0) ||\n story[i].objects.filter(\n (element) => element.type === elementTypes.ACTIVITY\n ).length <= 0\n ) {\n missingSteps.push(i + 1);\n complete = false;\n }\n }\n return missingSteps;\n }\n\n private getStepObjects(\n tracedActivity: ActivityCanvasObject[]\n ): BusinessObject[] {\n const initialSource: CanvasObject[] = [];\n const activities = tracedActivity;\n const targetObjects: CanvasObject[] = [];\n\n tracedActivity.forEach((parallelStep: ActivityCanvasObject) => {\n initialSource.push(parallelStep.source);\n\n const firstTarget = parallelStep.target;\n targetObjects.push(firstTarget);\n\n // check the outgoing activities for each target\n for (const checkTarget of targetObjects) {\n if (\n checkTarget.businessObject &&\n !checkTarget.businessObject.type.includes('actor') &&\n checkTarget.outgoing\n ) {\n // check the target for each outgoing activity\n checkTarget.outgoing.forEach((activity: ActivityCanvasObject) => {\n activities.push(activity);\n const activityTarget = activity.target;\n if (activityTarget && !targetObjects.includes(activityTarget)) {\n targetObjects.push(activityTarget);\n }\n });\n }\n }\n });\n return initialSource\n .map((e) => e.businessObject)\n .concat(activities.map((a) => a.businessObject))\n .concat(targetObjects.map((t) => t.businessObject));\n }\n\n /** Groups should be shown at the End of the Story **/\n private addGroupStep(story: StoryStep[]): void {\n const groups = this.elementRegistryService.getAllGroups() as CanvasObject[];\n if (groups.length > 0) {\n story.push({\n highlightedObjects: [],\n objects: groups\n .map((g) => g.businessObject)\n .concat(story[story.length - 1].objects),\n });\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SettingsService {\n private showSettings = new BehaviorSubject(false);\n showSettings$ = this.showSettings.asObservable();\n\n close(): void {\n this.showSettings.next(false);\n }\n\n open(): void {\n this.showSettings.next(true);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_DOMAIN_NAME,\n INITIAL_TITLE,\n} from '../../Domain/Common/constants';\nimport { CommandStackService } from '../CommandStack/command-stack.service';\nimport { environment } from '../../../environments/environment';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TitleService {\n private titleSubject = new BehaviorSubject(INITIAL_TITLE);\n private descriptionSubject = new BehaviorSubject(INITIAL_DESCRIPTION);\n private domainNameSubject = new BehaviorSubject(INITIAL_DOMAIN_NAME);\n private showDescriptionSubject = new BehaviorSubject(true);\n\n title$ = this.titleSubject.asObservable();\n description$ = this.descriptionSubject.asObservable();\n showDescription$ = this.showDescriptionSubject.asObservable();\n domainName$ = this.domainNameSubject.asObservable();\n\n constructor(private commandStackService: CommandStackService) {}\n\n updateTitleAndDescription(\n title: string | null,\n description: string | null,\n allowUndo: boolean\n ): void {\n if (allowUndo) {\n this.fireTitleAndDescriptionUpdate(title, description);\n } else {\n this.updateTitle(title);\n this.updateDescription(description);\n }\n }\n\n reset(): void {\n this.updateTitleAndDescription(INITIAL_TITLE, INITIAL_DESCRIPTION, false);\n }\n\n private updateTitle(title: string | null): void {\n this.titleSubject.next(title ?? this.titleSubject.value);\n document.title = title ?? this.titleSubject.value + ' - egon.io';\n }\n\n private updateDescription(description: string | null): void {\n this.descriptionSubject.next(description ?? this.descriptionSubject.value);\n }\n\n setShowDescription(show: boolean): void {\n this.showDescriptionSubject.next(show);\n }\n\n setDomainName(name: string): void {\n this.domainNameSubject.next(name);\n }\n\n getTitle(): string {\n return this.titleSubject.value;\n }\n\n getDescription(): string {\n return this.descriptionSubject.value;\n }\n\n getDomainName(): string {\n return this.domainNameSubject.value;\n }\n\n getVersion(): string {\n return environment.version;\n }\n\n private fireTitleAndDescriptionUpdate(\n newTitle: string | null,\n newDescription: string | null\n ): void {\n const context = {\n newTitle,\n newDescription,\n };\n this.commandStackService.execute(\n 'story.updateHeadlineAndDescription',\n context\n );\n }\n}\n","'use strict';\n\n// convert rad to deg\nexport function degrees(radians: number): number {\n return (radians * 180) / Math.PI;\n}\n\n// calculate the angle between two points in 2D\nexport function angleBetween(\n startPoint: Point,\n endPoint: Point\n): number | undefined {\n let quadrant;\n\n // determine in which quadrant we are\n if (startPoint.x <= endPoint.x) {\n if (startPoint.y >= endPoint.y) {\n quadrant = 0;\n } // upper right quadrant\n else {\n quadrant = 3;\n } // lower right quadrant\n } else {\n if (startPoint.y >= endPoint.y) {\n quadrant = 1;\n } // upper left Quadrant\n else {\n quadrant = 2;\n } // lower left quadrant\n }\n\n const adjacent = Math.abs(startPoint.y - endPoint.y);\n const opposite = Math.abs(startPoint.x - endPoint.x);\n\n // since the arcus-tangens only gives values between 0 and 90, we have to adjust for the quadrant we are in\n\n if (quadrant === 0) {\n return 90 - degrees(Math.atan2(opposite, adjacent));\n }\n if (quadrant === 1) {\n return 90 + degrees(Math.atan2(opposite, adjacent));\n }\n if (quadrant === 2) {\n return 270 - degrees(Math.atan2(opposite, adjacent));\n }\n if (quadrant === 3) {\n return 270 + degrees(Math.atan2(opposite, adjacent));\n }\n return undefined;\n}\n\nexport function positionsMatch(\n width: number,\n height: number,\n elementX: number,\n elementY: number,\n clickX: number,\n clickY: number\n): boolean {\n if (clickX > elementX && clickX < elementX + width) {\n if (clickY > elementY && clickY < elementY + height) {\n return true;\n }\n }\n return false;\n}\n\nexport class Point {\n y = 0;\n x = 0;\n}\n","import { elementTypes } from 'src/app/Domain/Common/elementTypes';\n\nexport function getNameFromType(type: string): string {\n if (type.includes(elementTypes.ACTOR)) {\n return type.replace(elementTypes.ACTOR, '');\n } else if (type.includes(elementTypes.WORKOBJECT)) {\n return type.replace(elementTypes.WORKOBJECT, '');\n }\n return '';\n}\n","'use strict';\n\n// sanitize user-Input to be Desktop-Filename safe\nexport function sanitizeForDesktop(str: string): string {\n const map: { [key: string]: string } = {\n '/': '',\n '\\\\': '',\n ':': '',\n '*': '',\n '?': '',\n '\"': '',\n '<': '',\n '>': '',\n '|': '',\n };\n const reg = /[/\\\\:*?\"<>|]/gi;\n return str ? str.replace(reg, (match) => map[match]) : '';\n}\n\nexport function sanitizeIconName(name: string): string {\n const map: { [key: string]: string } = {\n '/': '',\n '\\\\': '',\n ':': '',\n '*': '',\n '?': '',\n '\"': '',\n '<': '',\n '>': '',\n '|': '',\n '(': '',\n ')': '',\n ' ': '-',\n '.': '_',\n };\n const reg = /[/\\\\:*?\"<>|() .]/gi;\n return name\n ? name.replace(reg, (match) => {\n return map[match];\n })\n : '';\n}\n\nexport function restoreTitleFromFileName(\n filename: string,\n isSVG: boolean\n): string {\n let title;\n\n const domainStoryRegex = /_\\d+-\\d+-\\d+( ?_?-?\\(\\d+\\))?(-?\\d)?(.dst|.egn)/;\n const svgRegex = /_\\d+-\\d+-\\d+( ?_?-?\\(\\d+\\))?(-?\\d)?(.dst|.egn).svg/;\n\n const egnSuffix = '.egn';\n const dstSuffix = '.dst';\n const svgSuffix = '.svg';\n\n let filenameWithoutDateSuffix = filename.replace(\n isSVG ? svgRegex : domainStoryRegex,\n ''\n );\n if (filenameWithoutDateSuffix.includes(isSVG ? svgSuffix : dstSuffix)) {\n filenameWithoutDateSuffix = filenameWithoutDateSuffix\n .replace(svgSuffix, '')\n .replace(dstSuffix, '')\n .replace(egnSuffix, '');\n }\n title = filenameWithoutDateSuffix;\n return title;\n}\n","import { Component, OnInit } from '@angular/core';\nimport { SettingsService } from 'src/app/Service/Settings/settings.service';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { DialogService } from './Service/Dialog/dialog.service';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { InfoDialogData } from './Domain/Dialog/infoDialogData';\nimport { InfoDialogComponent } from './Presentation/Dialog/info-dialog/info-dialog.component';\nimport { TitleService } from './Service/Title/title.service';\nimport { ExportService } from './Service/Export/export.service';\nimport { ReplayStateService } from './Service/Replay/replay-state.service';\nimport { ReplayService } from './Service/Replay/replay.service';\nimport { environment } from '../environments/environment';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.scss'],\n})\nexport class AppComponent implements OnInit {\n showSettings$: Observable | BehaviorSubject;\n showDescription$: Observable;\n version: string = environment.version;\n\n constructor(\n private settingsService: SettingsService,\n private dialogService: DialogService,\n private titleService: TitleService,\n private exportService: ExportService,\n private replayStateSerice: ReplayStateService,\n replayService: ReplayService\n ) {\n this.showSettings$ = new BehaviorSubject(false);\n this.showDescription$ = new BehaviorSubject(true);\n\n document.onkeydown = (e: KeyboardEvent) => {\n if (e.ctrlKey && e.key === 's') {\n if (this.exportService.isDomainStoryExportable()) {\n this.exportService.downloadDST();\n }\n e.preventDefault();\n e.stopPropagation();\n }\n if (e.ctrlKey && e.key === 'l') {\n document.getElementById('import')?.click();\n e.preventDefault();\n e.stopPropagation();\n }\n if (e.key === 'ArrowRight' && this.replayStateSerice.getReplayOn()) {\n e.preventDefault();\n e.stopPropagation();\n replayService.nextStep();\n }\n if (e.key === 'ArrowLeft' && this.replayStateSerice.getReplayOn()) {\n e.preventDefault();\n e.stopPropagation();\n replayService.previousStep();\n }\n };\n }\n\n ngOnInit(): void {\n this.showDescription$ = this.titleService.showDescription$;\n this.showSettings$ = this.settingsService.showSettings$;\n }\n\n openLinkDialog(link: string, title: string, text: string): void {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n config.data = new InfoDialogData(title, text, true, true, link);\n\n this.dialogService.openDialog(InfoDialogComponent, config);\n }\n}\n","
\n \n \n \n\n \n \n
\n\n \n \n \"Egon\n egon.io\n version:\n {{ version }}\n by \"WPS\n WPS\n \n \n\n","import { ApplicationRef, DoBootstrap, NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport {\n MAT_CHECKBOX_DEFAULT_OPTIONS,\n MatCheckboxDefaultOptions,\n} from '@angular/material/checkbox';\n\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { HeaderComponent } from 'src/app/Presentation/Header/header.component';\nimport { SettingsComponent } from 'src/app/Presentation/Settings/settings.component';\nimport { AppComponent } from 'src/app/app.component';\nimport { ExportService } from 'src/app/Service/Export/export.service';\nimport { ImportDomainStoryService } from 'src/app/Service/Import/import-domain-story.service';\nimport { ImportRepairService } from 'src/app/Service/Import/import-repair.service';\nimport { ModelerService } from 'src/app/Service/Modeler/modeler.service';\nimport { TitleService } from 'src/app/Service/Title/title.service';\nimport { LabelDictionaryService } from 'src/app/Service/LabelDictionary/label-dictionary.service';\nimport { ReplayService } from 'src/app/Service/Replay/replay.service';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { DomainConfigurationService } from 'src/app/Service/DomainConfiguration/domain-configuration.service';\nimport { MassNamingService } from 'src/app/Service/LabelDictionary/mass-naming.service';\nimport { InfoDialogComponent } from 'src/app/Presentation/Dialog/info-dialog/info-dialog.component';\nimport { ExportDialogComponent } from 'src/app/Presentation/Dialog/export-dialog/export-dialog.component';\nimport { ActivityDialogComponent } from 'src/app/Presentation/Dialog/activity-dialog/activity-dialog.component';\nimport { UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms';\nimport { HeaderDialogComponent } from 'src/app/Presentation/Dialog/header-dialog/header-dialog.component';\nimport { IconDictionaryService } from 'src/app/Service/DomainConfiguration/icon-dictionary.service';\nimport { ModelerComponent } from 'src/app/Presentation/Canvas/modeler.component';\nimport { SettingsModule } from 'src/app/Modules/settings.module';\nimport { AutosaveService } from './Service/Autosave/autosave.service';\nimport { DomainStoryModelerModuleModule } from './Modules/domain-story-modeler-module.module';\nimport { LabelDictionaryDialogComponent } from './Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component';\nimport { MaterialModule } from './material.module';\n\n@NgModule({\n declarations: [\n HeaderComponent,\n SettingsComponent,\n AppComponent,\n InfoDialogComponent,\n ExportDialogComponent,\n ActivityDialogComponent,\n HeaderDialogComponent,\n ModelerComponent,\n LabelDictionaryDialogComponent,\n ],\n imports: [\n BrowserModule,\n NoopAnimationsModule,\n ReactiveFormsModule,\n SettingsModule,\n DomainStoryModelerModuleModule,\n MaterialModule,\n ],\n providers: [\n AutosaveService,\n ExportService,\n ImportDomainStoryService,\n ImportRepairService,\n IconDictionaryService,\n TitleService,\n LabelDictionaryService,\n ReplayService,\n ElementRegistryService,\n DomainConfigurationService,\n ModelerService,\n MassNamingService,\n UntypedFormBuilder,\n {\n provide: MAT_CHECKBOX_DEFAULT_OPTIONS,\n useValue: { clickAction: 'noop' } as MatCheckboxDefaultOptions,\n },\n ],\n})\nexport class AppModule implements DoBootstrap {\n constructor(private autosaveService: AutosaveService) {\n // autosaveService wird so automatisch initialisiert, auf keinen Fall entfernen!\n }\n\n ngDoBootstrap(app: ApplicationRef): void {\n const componentElement = document.createElement('app-root');\n document.body.append(componentElement);\n app.bootstrap(AppComponent);\n }\n}\n","import { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { NgModule } from '@angular/core';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatGridListModule } from '@angular/material/grid-list';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { MatListModule } from '@angular/material/list';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\n@NgModule({\n imports: [\n MatButtonModule,\n MatButtonToggleModule,\n MatListModule,\n MatCheckboxModule,\n MatDialogModule,\n MatFormFieldModule,\n MatGridListModule,\n MatInputModule,\n MatToolbarModule,\n MatExpansionModule,\n MatSnackBarModule,\n MatCardModule,\n ],\n exports: [\n MatButtonModule,\n MatButtonToggleModule,\n MatListModule,\n MatCheckboxModule,\n MatDialogModule,\n MatFormFieldModule,\n MatGridListModule,\n MatInputModule,\n MatToolbarModule,\n MatExpansionModule,\n MatSnackBarModule,\n MatCardModule,\n ],\n})\nexport class MaterialModule {}\n","// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.\n// The list of file replacements can be found in `angular.json`.\n\nexport const environment = {\n production: false,\n version: 'dev',\n};\n\n/*\n * For easier debugging in development mode, you can import the following file\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\n *\n * This import should be commented out in production mode because it will have a negative impact\n * on performance if an error is thrown.\n */\n// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.\n","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic()\n .bootstrapModule(AppModule)\n .catch((err) => console.error(err));\n"],"names":["Modeler","ResizeModule","assign","isArray","inherits","DomainStoryModule","LabelEditingModule","ModelingModule","elementTypes","DomainStoryModeler","options","call","_customElements","_groupElements","prototype","_modules","concat","_addCustomShape","customElement","parentId","parent","children","push","canvas","get","elementFactory","customAttrs","businessObject","customShape","create","isGroup","id","parentShape","addShape","_addCustomConnection","elementRegistry","connection","source","target","addConnection","importCustomElements","elements","fire","addCustomElements","customElements","Error","shapes","connections","groups","forEach","isConnection","getCustomElements","createDiagram","done","element","type","ACTIVITY","CONNECTION","GROUP","Replace","modeling","_modeling","replaceElement","oldElement","newElementData","newElement","setCenterOfElement","outgoingActivities","outgoing","incomingActivities","incoming","x","Math","ceil","width","y","height","name","replaceShape","replaceOptions","ReplaceMenuProvider","_dsReplace","$inject","getEntries","entries","includes","actorReplaceOptions","workObjectReplaceOptions","_createEntries","menuEntries","self","definition","entry","_createMenuEntry","action","replaceAction","label","className","actionName","getNameFromType","iconDictionaryService","initializeReplaceOptions","iconDictionary","actorTypes","getTypeDictionary","ACTOR","replaceOption","i","keysArray","actorType","typeName","toLowerCase","getIconForBPMN","workObjectTypes","WORKOBJECT","workObjectType","ContextPadProvider","bind","generateAutomaticNumber","getAllStandardIconKeys","dirtyFlagService","initializeContextPadProvider","dirtyFlag","DomainStoryContextPadProvider","injector","connect","translate","contextPad","popupMenu","replaceMenuProvider","commandStack","eventBus","startConnect","selectedElement","invoke","autoPlace","cached","getContextPadEntries","colorPicker","document","getElementById","onchange","ev","context","newColor","value","execute","makeDirty","registerProvider","allStandardIconKeys","actions","event","autoActivate","start","replace","addColorChange","addConnectWithActivity","addTextAnnotation","addActors","appendAction","addWorkObjects","addChangeWorkObjectTypeMenu","addChangeActorTypeMenu","delete","deleteGroup","group","title","click","removeGroup","moveDeleteActionToEndOfArray","removeElements","changeDirection","position","getReplaceMenuPosition","cursor","open","colorChange","TEXTANNOTATION","dragstart","icon","newNumber","Y_OFFSET","diagramContainer","getContainer","pad","getPad","html","diagramRect","getBoundingClientRect","padRect","top","left","appendStart","shape","createShape","hints","BpmnElementFactory","DEFAULT_LABEL_SIZE","DomainStoryIdFactory","DomainStoryElementFactory","bpmnFactory","moddle","domainStoryIdFactory","elementType","attrs","baseCreate","test","registerId","getId","key","set","$type","di","$descriptor","_getCustomElementSize","Object","defineProperty","createBpmnElement","__default","Dimensions","idList","generateId","idNumber","fourDigitsId","idSuffix","containsId","floor","random","same","BaseRenderer","Ids","getAnnotationBoxHeight","componentsToPath","createLine","append","svgAppend","attr","svgAttr","classes","svgClasses","svgCreate","query","domQuery","isObject","getNumberStash","addNumberToRegistry","numberBoxDefinitions","calculateTextWidth","countLines","labelPosition","angleBetween","RENDERER_IDS","numbers","DEFAULT_COLOR","initializeRenderer","elementRegistryService","DomainStoryRenderer","styles","textRenderer","pathMap","rendererId","next","markers","computeStyle","generateActivityNumber","parentGfx","box","numberStash","semantic","use","number","newRenderedNumber","renderNumber","numberStyle","fitBox","style","getExternalStyle","fill","backgroundBoxStyle","fontSize","fontFamily","backgroundDotStyle","renderEmbeddedLabel","align","padding","renderLabel","renderExternalLabel","waypoints","lines","startPoint","selected","endPoint","angle","alignment","boxWidth","xStart","abs","textAlign","length","wordWrap","overflowWrap","hyphens","renderExternalNumber","String","text","createText","add","setCoordinates","drawCircle","textLength","circle","cx","cy","r","innerHTML","manipulateInnerHTMLXLabel","manipulateInnerHTMLYLabel","firstChild","attributes","nodeValue","offset","result","outerHTML","Number","drawGroup","pickedColor","rect","drawRect","stroke","useColorForElement","iconSRC","match","index","indexOf","substring","getIconSrc","startsWith","drawActor","svgDynamicSizeAttributes","actor","getTypeIconSRC","drawWorkObject","workObject","useColorForActivity","strokeWidth","strokeLinejoin","markerEnd","marker","drawActivity","p","adjustForTextOverlap","fixConnectionInHTML","parentElement","checkIfPointOverlapsText","point","lineOffset","getLineOffset","objects","getElementsByClassName","data_id","item","getAttribute","object","getElementsByTagName","tspans","tspan","wantedConnection","polylines","setAttribute","drawDSConnection","strokeDasharray","drawAnnotation","textElement","textPathData","getScaledPath","xScaleFactor","yScaleFactor","containerWidth","containerHeight","mx","my","drawPath","d","path","rx","ry","createMarker","sequenceflowEnd","addMarker","ref","scale","strokeLinecap","viewBox","refX","refY","markerWidth","markerHeight","orient","defs","_svg","getWorkObjectPath","rectangle","getRectPath","getGroupPath","getActivityPath","map","original","activityPath","waypoint","getActorPath","canRender","drawShape","search","pos","correctInitialize","getShapePath","drawConnection","every","reduce","RuleProvider","is","HIGH_PRIORITY","MIN_SIZE","isDomainStory","isDomainStoryGroup","isActor","isWorkObject","isActivity","isAnnotation","canConnect","canResize","newBounds","lowerLeft","lowerRight","upperRight","canAttach","Array","canConnectToAnnotation","DomainStoryRules","init","canCreate","addRule","host","s","undefined","hover","pick","CommandInterceptor","collectionAdd","remove","collectionRemove","reworkGroupElements","DomainStoryUpdater","bpmnjs","updateCustomElement","e","DOMAINSTORY","updateCustomConnection","newTarget","newSource","copyWaypoints","executed","ifDomainStoryElement","reverted","fn","DomainStoryPalette","ElementFactory","CreateModule","PathMap","PopupMenuModule","ContextPadModule","CommandStack","UpdateLabelHandler","headlineAndDescriptionUpdateHandler","DSModeling","__depends__","__init__","domainStoryRenderer","paletteProvider","domainStoryRules","domainStoryUpdater","contextPadProvider","elementFactoryBpmn","updateLabelHandler","svgRemove","MARKER_HIDDEN","MARKER_LABEL_HIDDEN","annotationBoxHeight","DSLabelEditingPreview","defaultLayer","getDefaultLayer","absoluteElementBBox","gfx","on","activeProvider","active","getAbsoluteBBox","getStrokeColor","labelTarget","dy","newElementHeight","max","removeMarker","autocomplete","getLabel","isAny","getExternalLabelMid","hasExternalLabel","isLabel","isLabelExternal","dictionaryService","stashUse","initializeLabelEditingProvider","labelingDictionary","toggleStashUse","focusElement","setTimeout","focus","DSLabelEditingProvider","directEditing","resizeHandles","_canvas","_textRenderer","_updateLabelHandler","activateDirectEdit","complete","isActive","cancel","removeResizers","createAutocomplete","canExecute","isTouch","editingBox","force","activate","getUniqueWorkObjectNames","bounds","getEditingBBox","autoResize","resizable","bbox","mid","zoom","defaultStyle","getDefaultStyle","externalStyle","externalFontSize","externalLineHeight","lineHeight","defaultFontSize","defaultLineHeight","fontWeight","minWidth","maxWidth","minHeight","paddingTop","paddingBottom","paddingLeft","paddingRight","externalLabelMid","absoluteBBox","update","newLabel","activeContextText","updateLabel","getLabelAttr","getNumberAttr","getNumber","setLabel","setNumber","textNumber","selectPartOfActivity","angleActivity","selectedActivity","linelength","fontsize","input","workObjectNames","closeAllLists","currentFocus","filteredWorkObjectNames","addEventListener","autocompleteList","autocompleteItem","val","createElement","parentNode","appendChild","toUpperCase","visibility","onkeydown","keyCode","addActive","preventDefault","removeActive","classList","survivor","removeChild","ChangeSupportModule","DirectEditingModule","dSlabelEditingProvider","dSlabelEditingPreview","str","split","amountWaypoints","determinedPosition","xPos","yPos","labelPositionX","labelPositionY","offsetX","scaledAngle","offsetY","Modeling","_commandStack","updateNumber","oldShape","newShape","newData","numberRegistry","multipleNumberRegistry","canvasElementRegistry","initializeNumbering","canvasElementRegistryService","boxHeight","elementActivity","usedNumbers","wantedNumber","activitiesFromActors","getActivitiesFromActors","updateExistingNumbersAtGeneration","updateExistingNumbersAtEditing","sortedActivities","activity","currentNumber","setNumberOfActivity","getNumbersAndIDs","iDWithNumber","activities","renderedNumber","setNumberIsMultiple","multi","getNumberRegistry","slice","getMultipleNumberRegistry","elementArray","overrideAppendedIcons","Dictionary","APPENDED_ICONS_TAG","configuration","initializePalette","configurationService","PaletteProvider","palette","spaceTool","lassoTool","_create","_elementFactory","_spaceTool","_lassoTool","getPaletteEntries","createAction","createListener","isExpanded","shortType","initPalette","appendCSSStyleCheat","customIcons","sheetEl","head","customIconDict","appendDict","customIconDictKeys","getAppendedIconDictionary","has","src","iconStyle","wrapSRCInSVG","sheet","insertRule","cssRules","config","getCurrentIconConfigurationForBPMN","localStorage","getItem","JSON","parse","customIconsLegacy","convertLegacyAppendedIconsToDict","customIconsDict","putEntry","initTypeDictionaries","actors","workObjects","addCanvasObjectTypes","separator","activateSelection","keys","dict","initializeActivityUpdateHandler","activityUpdateHandler","registerHandler","activity_directionChange","activity_changed","preExecute","oldLabel","oldNumbersWithIDs","oldNumber","revert","revertAutomaticNumberGenerationChange","oldWaypoints","swapSource","newWaypoints","getActivitesFromActors","j","splice","undoGroupRework","elementUpdateHandler","element_colorChange","removeGroupWithoutChildren","oldColor","ctx","child","titleService","handlerFunction","oldTitle","getTitle","oldDescription","getDescription","updateTitleAndDescription","newTitle","newDescription","DSMassRenameHandler","massRename","relevantElements","confirm","newValue","getBusinessObject","NULL_DIMENSIONS","labelCenter","createLabel","setText","postExecute","trim","removeShape","bo","getLayoutedBounds","resizeShape","numberTarget","some","$instanceOf","types","t","innerShape","superParent","svgShape","querySelector","svgGroup","svgGroupParent","SVG_LINK","TEXTSPAN_DESCRIPTION_HEIGHT","TEXTSPAN_TITLE_HEIGHT","X_OFFSET_UTIL","extraHeight","createTitleAndDescriptionSVGElement","description","xLeft","yUp","titleElement","createTitle","descriptionElement","createDescription","insertText","tempCanvas","getContext","font","createTextSpans","descriptionParts","yOffset","heightOffset","textSpans","words","textTag","textSpan","createElementNS","textNode","createTextNode","data","len","measureText","testBusinessObject","Configuration","constructor","INITIAL_TITLE","INITIAL_DESCRIPTION","INITIAL_DOMAIN_NAME","DOMAIN_CONFIGURATION_TAG","DEFAULT_AUTOSAVES_ENABLED","DEFAULT_AUTOSAVES_MAX_DRAFTS","DEFAULT_AUTOSAVES_INTERVAL","SNACKBAR_DURATION","SNACKBAR_SUCCESS","SNACKBAR_ERROR","SNACKBAR_INFO","IMPLICIT_ROOT_ID","all","size","isEmpty","Entry","addEach","clear","filter","found","sort","sortByName","a","b","structuredClone","testCustomDomainConfiguration","fromConfigurationFromFile","configFromFile","actorsDict","workObjectsDict","IconConfiguration","allIconDictionary","domainName","getDefaultConf","defaultConf","updateAllIconRegistry","appendSRCFile","newAppendedIcons","appen","createCustomConf","domainConfiguration","allIconsConf","ActivityDialogData","numberIsAllowedMultipleTimes","showNumberFields","saveFN","ExportDialogData","ExportOption","tooltip","InfoDialogData","infoText","isInfo","isLink","linkText","NUMBER_BACKGROUND_COLOR","NUMBER_COLOR","STROKE_WIDTH","HIGHLIGHT_NUMBER_BACKGROUNG_COLOR","HIGHLIGHT_NUMBER_COLOR","HIGHLIGHT_COLOR","HIGHLIGHT_STROKE_WIDTH","appendedIcons","allIcons","Person","Group","Pet","Conversation","World","Store","Theater","Business","Water","Hotel","Dining","Courthouse","Flag","Place","Car","Bus","Train","Truck","Taxi","Bike","Boat","Motorcycle","Plane","Shuttle","Walking","Traffic","Commute","System","Printer","Document","Folder","Call","Email","Copyright","DNS","Settings","Cellphone","Update","Briefcase","Microphone","Signal","Key","Pencil","Sum","Headset","Keyboard","Mouse","Router","Scanner","Security","Desktop","Tablet","Label","Receipt","Calendar","Cloud","Assessment","Dashboard","Problem","Grid","Watch","Euro","Dollar","Info","Alarm","Wrench","Favorite","Gavel","Blind","Hourglass","Time","Search","Shopping","Couch","Attach","Ruler","Education","allIconsDict","newIcons","IconFilterEnum","ConfigAndDST","domain","dst","testConfigAndDst","CommonModule","AutosaveSettingsComponent","AutosaveOptionsComponent","AutosavedDraftsComponent","FormsModule","MaterialModule","AutosaveSettingsModule","_","_2","_3","declarations","imports","exports","HeaderButtonsComponent","DomainStoryModelerModuleModule","DomainConfigurationComponent","IconListItemComponent","DetailsListItemComponent","DomainDetailsComponent","GeneralSettingsComponent","LabelDictionaryComponent","SettingsModule","i0","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵelement","ɵɵlistener","AutosaveOptionsComponent_mat_card_0_Template_button_click_20_listener","ɵɵrestoreView","_r6","_r2","ɵɵreference","_r4","_r3","ctx_r5","ɵɵnextContext","ɵɵresetView","save","checked","ɵɵadvance","ɵɵproperty","configuration_r1","activated","interval","maxDrafts","autosaveConfiguration","snackbar","setConfiguration","duration","panelClass","ɵɵdirectiveInject","i1","AutosaveConfigurationService","i2","MatSnackBar","selectors","decls","vars","consts","template","AutosaveOptionsComponent_Template","rf","ɵɵtemplate","AutosaveOptionsComponent_mat_card_0_Template","ɵɵpipeBind1","configuration$","AutosaveSettingsComponent_Template","AutosavedDraftsComponent_div_7_div_1_Template_button_click_6_listener","restoredCtx","draft_r4","$implicit","loadDraft","ɵɵtextInterpolate","date","AutosavedDraftsComponent_div_7_div_1_Template","AutosavedDraftsComponent_div_7_Template_button_click_4_listener","_r8","ctx_r7","removeAllDrafts","ctx_r0","drafts","autosaveService","subscription","autosavedDraftsChanged$","subscribe","initDrafts","ngOnInit","loadCurrentDrafts","draft","AutosaveService","AutosavedDraftsComponent_Template","AutosavedDraftsComponent_div_7_Template","AutosavedDraftsComponent_ng_template_8_Template","ɵɵtemplateRefExtractor","ɵɵtextInterpolate2","_r1","ModelerComponent","modelerService","postInit","loadLatestDraft","ModelerService","ModelerComponent_Template","MAT_DIALOG_DATA","ActivityDialogComponent","fb","dialogRef","activityLabel","activityNumber","form","multipleNumbers","onSubmit","patchValue","close","UntypedFormBuilder","MatDialogRef","ActivityDialogComponent_Template","ActivityDialogComponent_Template_input_change_9_listener","ActivityDialogComponent_Template_textarea_keydown_enter_14_listener","$event","ActivityDialogComponent_Template_textarea_keyup_enter_14_listener","ActivityDialogComponent_Template_textarea_keyup_escape_14_listener","ActivityDialogComponent_Template_button_click_16_listener","ActivityDialogComponent_Template_button_click_18_listener","BehaviorSubject","ExportDialogComponent_button_17_Template_button_click_0_listener","i_r2","ctx_r3","doOption","option_r1","ɵɵtextInterpolate1","ExportDialogComponent","withTitle","useWhiteBackground","updateWithTitle","updateUseWhiteBackground","ExportDialogComponent_Template","ExportDialogComponent_Template_input_change_4_listener","ExportDialogComponent_Template_input_change_9_listener","ExportDialogComponent_Template_button_click_15_listener","ExportDialogComponent_button_17_Template","HeaderDialogComponent","i3","TitleService","HeaderDialogComponent_Template","HeaderDialogComponent_Template_textarea_keydown_enter_10_listener","HeaderDialogComponent_Template_textarea_keyup_enter_10_listener","HeaderDialogComponent_Template_textarea_keyup_escape_10_listener","HeaderDialogComponent_Template_button_click_12_listener","HeaderDialogComponent_Template_button_click_14_listener","ɵɵpropertyInterpolate","ctx_r1","ɵɵsanitizeUrl","InfoDialogComponent_mat_dialog_actions_5_Template_button_click_1_listener","InfoDialogComponent","showConfirmButton","hasLink","ngAfterViewInit","span","scrollHeight","InfoDialogComponent_Template","InfoDialogComponent_span_3_Template","InfoDialogComponent_a_4_Template","InfoDialogComponent_mat_dialog_actions_5_Template","LabelDictionaryDialogComponent","LabelDictionaryDialogComponent_Template","LabelDictionaryDialogComponent_Template_app_label_dictionary_closeEmitter_3_listener","iconInitiated","ngAfterViewChecked","createIcon","img","svg","inputs","DetailsListItemComponent_Template","sanitizeIconName","iconName_r1","domainCustomizationService","ICON_FILTER_NONE","selectedActors","selectedWorkobjects","allIconNames","allFilteredIconNames","domainConfigurationTypes","getDomainConfiguration","getFullDictionary","selectedActors$","selectedWorkobjects$","allFiltered","getFilteredNamesForType","loadMinimalIconConfigurationWithDefaultIcons","resetDomain","loadInitialConfiguration","saveDomain","getUsedIcons","exportDomain","startIconUpload","importIcon","files","iconInputFile","reader","FileReader","iconName","onloadend","addIMGToIconDictionary","registerIconForBPMN","addNewIcon","readAsDataURL","startDomainImport","importDomain","domainInputFile","loadConfiguration","importConfiguration","readAsText","filterForActors","ICON_FILTER_ACTOR","filterForWorkobjects","ICON_FILTER_WORKOBJECT","filterForUnassigned","ICON_FILTER_UNASSIGNED","filterByNameAndType","filteredByNameAndType","isIconActor","isIconWorkObject","DomainConfigurationService","IconDictionaryService","DomainCustomizationService","i4","ElementRegistryService","DomainConfigurationComponent_Template","DomainConfigurationComponent_Template_button_click_4_listener","DomainConfigurationComponent_Template_input_change_7_listener","DomainConfigurationComponent_Template_button_click_8_listener","DomainConfigurationComponent_Template_button_click_15_listener","DomainConfigurationComponent_Template_button_click_20_listener","DomainConfigurationComponent_Template_button_click_25_listener","DomainConfigurationComponent_Template_input_input_30_listener","DomainConfigurationComponent_Template_button_click_32_listener","DomainConfigurationComponent_Template_button_click_35_listener","DomainConfigurationComponent_Template_input_change_38_listener","DomainConfigurationComponent_Template_button_click_40_listener","DomainConfigurationComponent_Template_button_click_43_listener","DomainConfigurationComponent_mat_grid_tile_50_Template","ɵɵclassProp","DomainDetailsComponent_mat_list_item_12_Template_mat_list_item_dragover_0_listener","_r5","ctx_r4","allowDrop","DomainDetailsComponent_mat_list_item_12_Template_mat_list_item_dragstart_0_listener","i_r3","ctx_r6","onDragStart","DomainDetailsComponent_mat_list_item_12_Template_mat_list_item_drop_0_listener","iconName_r2","onDrop","getIconForName","DomainDetailsComponent_mat_list_item_18_Template_mat_list_item_dragover_0_listener","_r11","ctx_r10","DomainDetailsComponent_mat_list_item_18_Template_mat_list_item_dragstart_0_listener","i_r9","ctx_r12","DomainDetailsComponent_mat_list_item_18_Template_mat_list_item_drop_0_listener","iconName_r8","ctx_r13","customizationService","draggedList","draggedIndex","domainName$","changeName","listName","list","sortedList","setSelectedActors","setSelectedWorkObject","DomainDetailsComponent_Template","DomainDetailsComponent_Template_input_input_6_listener","DomainDetailsComponent_mat_list_item_12_Template","DomainDetailsComponent_mat_list_item_18_Template","isWorkobject","isNone","toggleNone","setAsUnassigned","toggleActor","setAsActor","toggleWorkobject","setAsWorkobject","IconListItemComponent_Template","IconListItemComponent_Template_mat_button_toggle_change_7_listener","IconListItemComponent_Template_mat_button_toggle_change_10_listener","IconListItemComponent_Template_mat_button_toggle_change_13_listener","MatDialogConfig","HeaderButtonsComponent_div_0_Template_button_click_1_listener","startReplay","HeaderButtonsComponent_div_0_Template_input_change_7_listener","import","HeaderButtonsComponent_div_0_Template_button_click_8_listener","openDownloadDialog","HeaderButtonsComponent_div_0_span_9_Template","HeaderButtonsComponent_div_0_span_11_Template","HeaderButtonsComponent_div_0_Template_button_click_13_listener","ctx_r8","openLabelDictionary","HeaderButtonsComponent_div_0_Template_button_click_16_listener","ctx_r9","openSettings","HeaderButtonsComponent_div_0_Template_button_click_19_listener","openKeyboardShortcutsDialog","HeaderButtonsComponent_div_0_Template_button_click_22_listener","ctx_r11","createNewDomainStory","isDirty$","HeaderButtonsComponent_div_2_Template_button_click_1_listener","_r13","previousStep","HeaderButtonsComponent_div_2_Template_button_click_4_listener","ctx_r14","nextStep","HeaderButtonsComponent_div_2_Template_button_click_7_listener","ctx_r15","stopReplay","settingsService","replayStateService","dialogService","replayService","exportService","importService","renderService","isReplay$","replayOn$","dirty$","filename","endsWith","importDST","importEGN","commandStackChanged","isDomainStoryExportable","SVGDownloadOption","downloadSVG","EGNDownloadOption","downloadDST","PNGDownloadOption","downloadPNG","HTMLDownloadOption","downloadHTMLPresentation","disableClose","autoFocus","openDialog","shortCutText","reset","SettingsService","ReplayStateService","DirtyFlagService","i5","DialogService","i6","ReplayService","i7","ExportService","i8","ImportDomainStoryService","i9","i10","RendererService","i11","HeaderButtonsComponent_Template","HeaderButtonsComponent_div_0_Template","HeaderButtonsComponent_div_2_Template","combineLatest","HeaderComponent_button_2_Template_button_click_0_listener","setShowDescription","HeaderComponent_button_4_Template_button_click_0_listener","_r7","ctx_r2","stepDescription$","description$","HeaderComponent","title$","showDescription$","currentStep$","maxStepNumber$","pipe","step","count","showDescription","openHeaderDialog","show","HeaderComponent_Template","HeaderComponent_button_2_Template","HeaderComponent_button_4_Template","HeaderComponent_Template_span_click_7_listener","HeaderComponent_span_13_Template","HeaderComponent_mat_card_17_Template","EventEmitter","LabelDictionaryComponent_mat_list_item_5_Template_input_change_2_listener","workobjectEntry_r2","updateWorkobjectEntry","LabelDictionaryComponent_mat_list_item_11_Template_textarea_change_2_listener","activityEntry_r5","updateActivityEntry","LabelDictionaryComponent_mat_list_item_11_Template_textarea_keydown_enter_2_listener","LabelDictionaryComponent_mat_list_item_11_Template_textarea_keyup_enter_2_listener","LabelDictionaryComponent_mat_list_item_11_Template_textarea_keyup_escape_2_listener","labelDictionaryService","closeEmitter","createLabelDictionaries","workObjectEntries","getWorkObjectLabels","activityEntries","getActivityLabels","workobjectEntriesSubject","activityEntriesSubject","activityNames","originalActivityNames","originalWorkObjectNames","originalName","w","workobject","massRenameLabels","emit","activityEntry","workobjectEntry","LabelDictionaryService","outputs","LabelDictionaryComponent_Template","LabelDictionaryComponent_mat_list_item_5_Template","LabelDictionaryComponent_mat_list_item_11_Template","LabelDictionaryComponent_Template_button_click_14_listener","LabelDictionaryComponent_Template_button_click_16_listener","GeneralSettingsComponent_Template","SettingsComponent","showGeneralSettings","showDomainCustomization","savedConfiguration","getAndClearSavedConfiguration","restart","openGeneralSettings","openDomainCustomization","SettingsComponent_Template","SettingsComponent_Template_button_click_3_listener","SettingsComponent_Template_button_click_7_listener","SettingsComponent_Template_button_click_11_listener","SettingsComponent_app_general_settings_15_Template","SettingsComponent_app_domain_configuration_17_Template","ReplaySubject","AUTOSAVE_CONFIGURATION_TAG","defaultConfiguration","storageService","configurationSubject","asObservable","initializeConfiguration","saveConfiguration","ɵɵinject","StorageService","factory","ɵfac","providedIn","Subject","DRAFTS_TAG","rendererService","updateConfiguration","readDrafts","sortDrafts","configAndDST","story","actorIcons","getElementsOfType","workObjectIcons","updateIconRegistries","importStory","stopTimer","startTimer","autosaveTimer","clearInterval","setInterval","savedDrafts","newDraft","createDraft","isChanged","isSame","isDraftEmpty","unshift","pop","writeDrafts","stringify","getStory","createConfigAndDST","Date","toString","aDate","bDate","setItem","json","removeItem","checkValidityOfConfiguration","configuratioFromFile","getStoredDomainConfiguration","domainString","setStoredDomainConfiguration","configForStorage","CommandStackService","setCommandStack","payload","matDialog","dialog","MatDialog","isDirtySubject","makeClean","dirty","DomManipulationService","showAll","removeHighlights","getAllCanvasObjects","getAllGroups","domObject","display","showStep","replayStep","notShown","getAllNotShown","hightlightStep","o","getNumberDomForActivity","numberDOMS","numberBackgroundDom","numberTextDom","allActivities","getAllActivities","allConnections","getAllConnections","activityDomObject","connectionDomObject","stepObjects","shownElements","notShownElements","allObjects","setDomainName","exportConfiguration","getCurrentConfigurationForExport","configJSONString","getDomainName","encodeURIComponent","body","customConfig","updateDomainName","actorDict","workObjectDict","actorKeys","workObjectKeys","getIconConfiguration","addIconsFromDomainConfiguration","configurationName","getCurrentConfiguration","getActorsDictionary","getWorkObjectsDictionary","createConfigFromDictionaries","currentConfiguration","getCurrentConfigurationNamesWithoutPrefix","createMinimalConfigurationWithDefaultIcons","minimalConfig","createConfigFromCanvas","getIconSource","actorNames","workobjectNames","newActors","newWorkobjects","allCanvasObjects","allIconListItems","configurationHasChanged","getAllIconDictionary","addIconToAllIconList","importedConfigurationEvent","storedDomainConfiguration","importedConfiguration","getImportedConfiguration","selectedActorNames","selectActor","selectedWorkobjectNames","selectWorkObject","changedDomain","deselectActor","deselectWorkobject","updateIcon","updateActorSubject","updateWorkObjectSubject","defaultConfig","workObjectName","actorName","updateAllIconBehaviourSubjects","resetToInitialConfiguration","usedIcons","imported","changedActors","changedWorkobjects","createDomainConfiguration","configurationActors","configurationWorkobjects","workobjects","changedDomainCofiguration","updateIcons","join","temp","iconDict","getSrcForIcon","addIconsToCss","iconBehaviourSubject","customDomainCofiguration","rawSrc","ICON_PREFIX","actorIconDictionary","workObjectDictionary","iconDictionaryForBPMN","iconConfig","allTypes","initDictionary","dictionary","namePrefix","customConfiguration","allInTypeDictionary","collection","allIn","dictionaryType","iconTypes","registerIconForType","addIconsToTypeDictionary","extractCustomIconsFromDictionary","addNewIconsToDictionary","elementDictionary","sanitizedName","custom","fullDictionary","appendedDict","getTypeDictionaryKeys","elementOfType","setCusomtConfiguration","fullyInitialized","registry","__implicitroot","setElementRegistry","_elements","createObjectListForDSTDownload","allObjectsFromCanvas","objectList","fillListOfCanvasObjects","canvasElement","groupObjects","checkChildForGroup","currentGroup","registryElementNames","getAllActors","getAllWorkobjects","co","sanitizeForDesktop","formatDate","environment","pngService","svgService","htmlPresentationService","titleSubscription","descriptionSubscription","ngOnDestroy","unsubscribe","DomainStory","getStoryForDownload","getCurrentDateString","downloadFile","datatype","fileEnding","svgData","createSVGData","container","svgElements","outerSVGElement","viewport","layerBase","image","extractSVG","prepareSVG","onload","getWidth","getHeight","fillStyle","drawImage","png64","toDataURL","ele","then","info","version","PngService","SvgService","HtmlPresentationService","doT","setModelerClasses","selection","modeler","viewBoxCoordinates","ViewBoxCoordinate","_this","_asyncToGenerator","saveSVG","fixActivityMarkersForEachStep","getCurrentStepNumber","content","transition","err","alert","getMaxStepNumber","revealjsTemplate","dots","revealjsData","script","sentences","multiplexSecret","multiplexId","fixMalformedHtmlScript","viewBoxIndex","splitViewBox","dataStart","dataEnd","createBounds","sectionIndex","newDefs","ids","idToReplace","newId","replaceAll","browserSpecs","ua","navigator","userAgent","tem","M","exec","appName","appVersion","URIHashtagFix","fix","browser","parseInt","findMostOuterElements","xRight","yDown","sub","elXLeft","elXRight","elYUp","elYDown","transform","nums","rects","outerRect","calculateWidthAndHeight","insertIndex","layerResizers","layerOverlays","removeAttribute","XMLSerializer","serializeToString","cacheData","getEncoded","findIndexToInsertData","svgIndex","backgroundColorWhite","appendDST","restoreTitleFromFileName","importRepairService","domainConfigurationService","importedConfigurationEmitter","isSVG","fileReader","titleText","fileReaderFunction","isEGN","dstText","removeXMLComments","dstAndConfig","extractDstAndConfig","configChanged","checkConfigForChanges","lastElement","importVersionNumber","handleVersionNumber","checkForUnreferencedElementsInActivitiesAndRepair","showBrokenImportDialog","adjustPositions","versionPrefix","lastIndexOf","updateCustomElementsPreviousV050","showPreviousV050Dialog","xmlText","newActorKeys","newWorkObjectKeys","currentActorKeys","currentWorkobjectKeys","changed","clearName","setImportedConfigurationAndEmit","ImportRepairService","objectIDs","activityIndex","isFirst","findFirstElement","adjustElementPosition","massNamingService","activityLabels","workObjektLabels","localeCompare","Set","massChangeNames","MassNamingService","commandStackService","oldValue","allRelevantObjects","massRenameHandler","positionsMatch","InitializerService","initializeDomainStoryModelerClasses","propagateDomainStoryModelerClassesToServices","initializeDomainStoryModelerEventHandlers","initiateEventBusListeners","getReplayOn","activityDoubleClick","renderedNumberRegistry","htmlCanvas","transformX","transformY","zoomX","zoomY","clickX","originalEvent","clickY","parseFloat","currentNum","tx","ty","tNumber","elementX","elementY","stopPropagation","saveActivityInputLabel","activityData","hasNumber","multipleNumberAllowed","initializerService","keyboard","bindTo","additionalModules","bpmnSearch","exportArtifacts","debounce","window","startDebounce","domainStory","currentStory","destroy","getModeler","timeout","timer","clearTimeout","encoded","renderStory","configurationChange","c","replayOnSubject","setReplayState","state","domManipulationService","storyCreatorService","currentStep","maxStepNumber","initializeReplay","traceActivitiesAndCreateStory","showCurrentStep","missingSteps","getMissingSteps","getValue","steps","StoryCreatorService","tracedActivityMap","tracedItem","createStep","addGroupStep","getStepObjects","highlightedElements","highlightedObjects","tracedActivity","initialSource","targetObjects","parallelStep","firstTarget","checkTarget","activityTarget","g","showSettings","showSettings$","titleSubject","descriptionSubject","domainNameSubject","showDescriptionSubject","allowUndo","fireTitleAndDescriptionUpdate","updateTitle","updateDescription","getVersion","degrees","radians","PI","quadrant","adjacent","opposite","atan2","Point","reg","domainStoryRegex","svgRegex","egnSuffix","dstSuffix","svgSuffix","filenameWithoutDateSuffix","AppComponent","replayStateSerice","ctrlKey","openLinkDialog","link","AppComponent_Template","AppComponent_app_settings_1_Template","BrowserModule","MAT_CHECKBOX_DEFAULT_OPTIONS","NoopAnimationsModule","ReactiveFormsModule","AppModule","ngDoBootstrap","app","componentElement","bootstrap","provide","useValue","clickAction","MatDialogModule","MatFormFieldModule","MatInputModule","MatToolbarModule","MatExpansionModule","MatCardModule","MatSnackBarModule","MatButtonModule","MatGridListModule","MatButtonToggleModule","MatListModule","MatCheckboxModule","production","enableProdMode","__NgCli_bootstrap_1","platformBrowser","bootstrapModule","catch","console","error"],"sourceRoot":"webpack:///","x_google_ignoreList":[]} \ No newline at end of file