diff --git a/app-latest-build/main.js b/app-latest-build/main.js index 94396fd..7654276 100644 --- a/app-latest-build/main.js +++ b/app-latest-build/main.js @@ -10892,7 +10892,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ environment: () => (/* binding */ environment) /* harmony export */ }); // This file can be replaced during build by using the `fileReplacements` array. -// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. +// `ng build --configuration production` replaces `environment.ts` with `environment.prod.ts`. // The list of file replacements can be found in `angular.json`. const environment = { production: false, diff --git a/app-latest-build/main.js.map b/app-latest-build/main.js.map index 85805ec..7a4531e 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,MAAM;EAC3B,IAAI,CAACR,eAAe,CAACU,IAAI,CAACJ,aAAa,CAAC;EAExC,IAAIK,MAAM,GAAG,IAAI,CAACC,GAAG,CAAC,QAAQ,CAAC;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/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/elementTypes.ts","./src/app/Domain/Common/iconConfiguration.ts","./src/app/Domain/Common/iconSetConfiguration.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/Export/configAndDst.ts","./src/app/Domain/Export/exportConstants.ts","./src/app/Domain/Icon-Set-Configuration/allIcons.ts","./src/app/Domain/Icon-Set-Configuration/iconFilterEnum.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/icon-list-item/icon-list-item.component.ts","./src/app/Presentation/DomainConfiguration/icon-list-item/icon-list-item.component.html","./src/app/Presentation/DomainConfiguration/icon-set-configuration.component.ts","./src/app/Presentation/DomainConfiguration/icon-set-configuration.component.html","./src/app/Presentation/DomainConfiguration/icon-set-details/icon-set-details.component.ts","./src/app/Presentation/DomainConfiguration/icon-set-details/icon-set-details.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/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/IconSetConfiguration/icon-dictionary.service.ts","./src/app/Service/IconSetConfiguration/icon-set-configuration.service.ts","./src/app/Service/IconSetConfiguration/icon-set-customization.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\";\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 = actorType;\n replaceOption[i] = {\n label: \"Change to \" + typeName,\n actionName: \"replace-with-actor-\" + typeName.toLowerCase(),\n className: iconDictionaryService.getIconForBPMN(\n elementTypes.ACTOR,\n actorType,\n ),\n target: {\n type: `${elementTypes.ACTOR}${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 = workObjectType;\n replaceOption[i] = {\n label: \"Change to \" + typeName,\n actionName: \"replace-with-actor-\" + typeName,\n className: iconDictionaryService.getIconForBPMN(\n elementTypes.WORKOBJECT,\n workObjectType,\n ),\n target: {\n type: `${elementTypes.WORKOBJECT}${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/Icon-Set-Configuration/allIcons\";\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 = workObjectType;\n let icon = iconDictionaryService.getIconForBPMN(\n elementTypes.WORKOBJECT,\n workObjectType,\n );\n let action = [];\n action[\"append.workObject\" + name] = appendAction(\n `${elementTypes.WORKOBJECT}${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 = actorType;\n let icon = iconDictionaryService.getIconForBPMN(\n elementTypes.ACTOR,\n actorType,\n );\n let action = [];\n action[\"append.actor\" + name] = appendAction(\n `${elementTypes.ACTOR}${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\";\nimport { getNameFromType } from \"../../Utils/naming\";\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 // !IMPORTANT!\n // When converting svg-files via Inkscape or Photoshop the svg-circle is converted to a black dot that obscures the number.\n // To circumvent this, we draw a . as the white background and an o as the circle around the number.\n // There is a minor Bug, that in some Programs the used Font is not supported, which defaults to Arial, where the o is not round but oval.\n // Unit 3rd Party Tools update their svg-version to 1.2 we should keep this workaround.\n box.x -= 65;\n box.y -= 12;\n renderNumber(parentGfx, \".\", backgroundDotStyle(box), element.type);\n box.x += 30;\n box.y += 3;\n renderNumber(parentGfx, \"o\", backgroundBoxStyle(box), element.type);\n\n numbers[semantic.number] = true;\n box.x += 9;\n box.y -= 7;\n\n if (semantic.number < 10) {\n box.x += 3;\n }\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 return text;\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 getNameFromType(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 getNameFromType(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 { 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 angle = 0;\n if (element.waypoints.length > 1) {\n angle = angleBetween(\n // Start of first arrow segment\n element.waypoints[0],\n // End of first arrow segment\n element.waypoints[1],\n );\n }\n let x = element.waypoints[0].x;\n let y = element.waypoints[0].y;\n\n let fixedOffsetX = 0;\n let fixedOffsetY = 0;\n let angleDependantOffsetX = 0;\n let angleDependantOffsetY = 0;\n\n // Fine tune positioning of sequence number above beginning of first arrow segment\n if (angle >= 0 && angle <= 45) {\n fixedOffsetX = 25;\n angleDependantOffsetY = 20 * (1 - angle / 45);\n } else if (angle <= 90) {\n fixedOffsetX = 5;\n angleDependantOffsetX = 15 * (1 - (angle - 45) / 45);\n } else if (angle <= 135) {\n fixedOffsetX = 5;\n angleDependantOffsetX = -20 * ((angle - 90) / 45);\n } else if (angle <= 180) {\n fixedOffsetX = -15;\n angleDependantOffsetY = 20 * ((angle - 135) / 45);\n } else if (angle <= 225) {\n fixedOffsetX = -15;\n fixedOffsetY = 15;\n angleDependantOffsetY = 25 * ((angle - 180) / 45);\n } else if (angle <= 270) {\n fixedOffsetX = 5;\n angleDependantOffsetX = -20 * (1 - (angle - 225) / 45);\n fixedOffsetY = 40;\n } else if (angle <= 315) {\n fixedOffsetX = 5;\n angleDependantOffsetX = 25 * ((angle - 270) / 45);\n fixedOffsetY = 40;\n } else {\n fixedOffsetX = 25;\n fixedOffsetY = 20;\n angleDependantOffsetY = 15 * (1 - (angle - 315) / 45);\n }\n\n x = x + fixedOffsetX + angleDependantOffsetX;\n y = y + fixedOffsetY + angleDependantOffsetY;\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/Icon-Set-Configuration/allIcons\";\nimport { Dictionary } from \"src/app/Domain/Common/dictionary/dictionary\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\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((name) => {\n addCanvasObjectTypes(\n name,\n createAction,\n actions,\n \"actor\",\n elementTypes.ACTOR,\n );\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((name) => {\n addCanvasObjectTypes(\n name,\n createAction,\n actions,\n \"actor\",\n elementTypes.WORKOBJECT,\n );\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(\n name,\n createAction,\n actions,\n className,\n elementType,\n) {\n let icon = iconDictionary.getIconForBPMN(elementType, name);\n\n let action = [];\n action[\"domainStory-\" + className + name] = createAction(\n `${elementType}${name}`,\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 = '';\nexport const INITIAL_ICON_SET_NAME = 'default';\n\n/** LocalStorageTags **/\nexport const APPENDED_ICONS_TAG = 'appendedIcons';\n// String value of tag should not be renamed, because existing configurations would not load\nexport const ICON_SET_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","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/Icon-Set-Configuration/allIcons';\nimport { Configuration } from 'src/app/Domain/Common/configuration';\nimport { IconSetConfiguration } from 'src/app/Domain/Common/iconSetConfiguration';\nimport { INITIAL_ICON_SET_NAME } from './constants';\n\nexport class IconConfiguration {\n domainName = INITIAL_ICON_SET_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(iconSetConfiguration: IconSetConfiguration): Configuration {\n this.domainName = iconSetConfiguration.name;\n\n let actors = iconSetConfiguration.actors;\n let workObjects = iconSetConfiguration.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 { INITIAL_ICON_SET_NAME } from './constants';\nimport { testBusinessObject } from './businessObject';\nimport { elementTypes } from './elementTypes';\nimport { Dictionary } from './dictionary/dictionary';\n\nexport interface IconSetConfiguration {\n name: string;\n actors: Dictionary;\n workObjects: Dictionary;\n}\n\nexport interface IconSetConfigurationForExport {\n name: string;\n actors: any;\n workObjects: any;\n}\n\nexport interface CustomIconSetConfiguration {\n name: string;\n actors: string[];\n workObjects: string[];\n}\nconst actor = structuredClone(testBusinessObject);\nactor.type = elementTypes.ACTOR;\n\nexport const testCustomIconSetConfiguration: CustomIconSetConfiguration = {\n name: INITIAL_ICON_SET_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","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","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 { 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","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 { IconSetConfigurationComponent } from 'src/app/Presentation/DomainConfiguration/icon-set-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 { IconSetDetailsComponent } from '../Presentation/DomainConfiguration/icon-set-details/icon-set-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 IconSetConfigurationComponent,\n GeneralSettingsComponent,\n LabelDictionaryComponent,\n IconListItemComponent,\n DetailsListItemComponent,\n IconSetDetailsComponent,\n ],\n exports: [\n GeneralSettingsComponent,\n IconSetConfigurationComponent,\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/Icon-Set-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 { AfterViewChecked, Component, Input, OnInit } from '@angular/core';\nimport { IconListItem } from '../../../Domain/Icon-Set-Configuration/iconListItem';\nimport { BehaviorSubject } from 'rxjs';\nimport { IconSetCustomizationService } from '../../../Service/IconSetConfiguration/icon-set-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(\n private iconSetCustomizationService: IconSetCustomizationService,\n ) {}\n\n ngOnInit(): void {\n this.icon = this.iconSetCustomizationService.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.iconSetCustomizationService.setAsUnassigned(\n this.iconName,\n this.icon.value.isActor,\n );\n }\n\n toggleActor(): void {\n this.iconSetCustomizationService.setAsActor(true, this.iconName);\n }\n\n toggleWorkobject(): void {\n this.iconSetCustomizationService.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, OnInit } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport {\n CustomIconSetConfiguration,\n fromConfigurationFromFile,\n} from 'src/app/Domain/Common/iconSetConfiguration';\nimport { IconSetConfigurationService } from 'src/app/Service/IconSetConfiguration/icon-set-configuration.service';\nimport { IconDictionaryService } from 'src/app/Service/IconSetConfiguration/icon-dictionary.service';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { sanitizeIconName } from 'src/app/Utils/sanitizer';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { IconFilterEnum } from '../../Domain/Icon-Set-Configuration/iconFilterEnum';\nimport { IconSetCustomizationService } from '../../Service/IconSetConfiguration/icon-set-customization.service';\n\n@Component({\n selector: 'app-icon-set-configuration',\n templateUrl: './icon-set-configuration.component.html',\n styleUrls: ['./icon-set-configuration.component.scss'],\n})\nexport class IconSetConfigurationComponent implements OnInit {\n private iconSetConfigurationTypes: CustomIconSetConfiguration;\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: IconSetConfigurationService,\n private iconDictionaryService: IconDictionaryService,\n private iconSetCustomizationService: IconSetCustomizationService,\n private elementRegistryService: ElementRegistryService,\n ) {\n this.iconSetConfigurationTypes =\n this.iconSetCustomizationService.getIconSetConfiguration().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.iconSetCustomizationService.selectedActors$;\n this.selectedWorkobjects =\n this.iconSetCustomizationService.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 Icon Set **/\n loadMinimalIconConfigurationWithDefaultIcons(): void {\n this.iconSetCustomizationService.resetIconSet();\n }\n\n loadInitialConfiguration(): void {\n this.iconSetCustomizationService.cancel();\n }\n\n /** Persist Icon Set **/\n saveIconSet(): void {\n this.iconSetCustomizationService.saveIconSet(\n this.elementRegistryService.getUsedIcons(),\n );\n }\n\n exportIconSet(): void {\n this.iconSetCustomizationService.exportIconSet();\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 // TODO: td: What kind of type is it here?\n this.iconDictionaryService.registerIconForBPMN(\n iconName,\n src,\n elementTypes.ACTOR,\n );\n\n this.allIcons.next(this.iconDictionaryService.getFullDictionary());\n this.filter.next(this.filter.value);\n\n this.iconSetCustomizationService.addNewIcon(iconName);\n }\n };\n reader.readAsDataURL(iconInputFile);\n }\n }\n\n /** Import Icon Set **/\n startIconSetImport(): void {\n document.getElementById('importDomain')?.click();\n }\n\n importIconSet(): void {\n // @ts-ignore\n const iconSetInputFile = 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.iconSetCustomizationService.importConfiguration(config);\n };\n\n reader.readAsText(iconSetInputFile);\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.iconSetCustomizationService.isIconActor(name),\n );\n break;\n case IconFilterEnum.ICON_FILTER_WORKOBJECT:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.iconSetCustomizationService.isIconWorkObject(name),\n );\n break;\n case IconFilterEnum.ICON_FILTER_UNASSIGNED:\n allFiltered = this.allIconNames.value.filter(\n (name) =>\n !this.iconSetCustomizationService.isIconActor(name) &&\n !this.iconSetCustomizationService.isIconWorkObject(name),\n );\n break;\n }\n return allFiltered;\n }\n}\n","
\n
\n
\n
\n
Filter by assignment:
\n \n None\n \n \n Actors\n \n \n Workobjects\n \n \n
\n
\n \n \n home \n \n \n close\n \n
\n \n
\n \n unarchive\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 { IconSetCustomizationService } from 'src/app/Service/IconSetConfiguration/icon-set-customization.service';\nimport { IconListItem } from 'src/app/Domain/Icon-Set-Configuration/iconListItem';\nimport { TitleService } from 'src/app/Service/Title/title.service';\n\n@Component({\n selector: 'app-icon-set-details',\n templateUrl: './icon-set-details.component.html',\n styleUrls: ['./icon-set-details.component.scss'],\n})\nexport class IconSetDetailsComponent implements OnInit {\n iconSetName: 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: IconSetCustomizationService,\n titleService: TitleService,\n ) {\n this.iconSetName = titleService.iconSetName$;\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 { 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 { 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 protected replayService: ReplayService,\n protected 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 () => this.exportService.downloadDST(),\n );\n const PNGDownloadOption = new ExportOption(\n 'PNG',\n 'Download a PNG-Image of the Domain-Story. This does not include the Domain-Story!',\n (withTitle: boolean) => 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 () => 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: \\t\\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 this.dirtyFlagService.makeClean();\n }\n\n /** Replay functions **/\n startReplay(): void {\n this.replayService.startReplay();\n }\n\n stopReplay(): void {\n this.replayService.stopReplay();\n }\n\n previousSentence(): void {\n this.replayService.previousSentence();\n }\n\n nextSentence(): void {\n this.replayService.nextSentence();\n }\n\n isExportable(): boolean {\n return (\n this.titleService.hasTitleOrDescription() ||\n this.exportService.isDomainStoryExportable()\n );\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 skip_previous \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 sentenceDescription$: 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.sentenceDescription$ = combineLatest([\n this.replayService.currentSentence$,\n this.replayService.maxSentenceNumber$,\n ]).pipe(map(([sentence, count]) => `${sentence}/${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 Sentence: {{ sentenceDescription$ | 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 { IconSetConfiguration } from 'src/app/Domain/Common/iconSetConfiguration';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { AutosaveConfigurationService } from '../../Service/Autosave/autosave-configuration.service';\nimport { IconSetCustomizationService } from '../../Service/IconSetConfiguration/icon-set-customization.service';\n\n@Component({\n selector: 'app-settings',\n templateUrl: './settings.component.html',\n styleUrls: ['./settings.component.scss'],\n})\nexport class SettingsComponent {\n iconSetConfiguration: IconSetConfiguration | undefined;\n showGeneralSettings = new BehaviorSubject(false);\n showIconSetCustomization = new BehaviorSubject(true);\n\n constructor(\n private settingsService: SettingsService,\n private modelerService: ModelerService,\n private iconSetCustomizationService: IconSetCustomizationService,\n ) {}\n\n close(): void {\n const savedConfiguration =\n this.iconSetCustomizationService.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.showIconSetCustomization.next(false);\n }\n\n openIconSetCustomization() {\n this.showGeneralSettings.next(false);\n this.showIconSetCustomization.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 '../IconSetConfiguration/icon-dictionary.service';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { fromConfigurationFromFile } from '../../Domain/Common/iconSetConfiguration';\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 { ICON_SET_CONFIGURATION_TAG } from '../../Domain/Common/constants';\nimport {\n IconSetConfiguration,\n fromConfigurationFromFile,\n} from '../../Domain/Common/iconSetConfiguration';\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: IconSetConfiguration) {\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 getStoredIconSetConfiguration(): IconSetConfiguration | undefined {\n const iconSetString = localStorage.getItem(ICON_SET_CONFIGURATION_TAG);\n\n if (!iconSetString) {\n return;\n } else {\n const configurationFromFile = fromConfigurationFromFile(\n JSON.parse(iconSetString),\n );\n if (this.checkValidityOfConfiguration(configurationFromFile)) {\n return configurationFromFile;\n }\n }\n return;\n }\n\n setStoredIconSetConfiguration(config: IconSetConfiguration): 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 ICON_SET_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 { StorySentence } from 'src/app/Domain/Replay/storySentence';\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 Sentence\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 showSentence(\n replaySentence: StorySentence,\n previousSentence?: StorySentence,\n ): void {\n this.removeHighlights();\n const notShown = this.getAllNotShown(replaySentence.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.highlightSentence(\n previousSentence\n ? replaySentence.objects.filter(\n (o) => !previousSentence.objects.includes(o),\n )\n : replaySentence.objects,\n );\n\n replaySentence.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 highlightSentence(sentenceObjects: BusinessObject[]): void {\n sentenceObjects\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';\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/Icon-Set-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 { IconSetConfigurationService } from 'src/app/Service/IconSetConfiguration/icon-set-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: IconSetConfigurationService,\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.fixActivityMarkersForEachSentence(\n result,\n this.replayService.getCurrentSentenceNumber(),\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.getCurrentSentenceNumber() <\n this.replayService.getMaxSentenceNumber()\n ) {\n this.replayService.nextSentence();\n try {\n const result = await this.modeler.saveSVG({});\n this.fixActivityMarkersForEachSentence(\n result,\n this.replayService.getCurrentSentenceNumber(),\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 + 10,\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 } = createTitleAndDescriptionSVGElement(\n title,\n description,\n xLeft,\n yUp,\n width,\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 { Injectable } from '@angular/core';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport { Configuration } from 'src/app/Domain/Common/configuration';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { IconSetConfiguration } from 'src/app/Domain/Common/iconSetConfiguration';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport {\n defaultConf,\n IconConfiguration,\n} from 'src/app/Domain/Common/iconConfiguration';\nimport {\n allIcons,\n appendedIcons,\n} from 'src/app/Domain/Icon-Set-Configuration/allIcons';\nimport { getNameFromType } from '../../Utils/naming';\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?: IconSetConfiguration;\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 elementType: elementTypes,\n ) {\n dictionary.clear();\n for (const key of keys) {\n dictionary.add(allTypes.get(key), key);\n }\n\n dictionary.keysArray().forEach((name) => {\n this.registerIconForBPMN(\n name,\n ICON_PREFIX + sanitizeIconName(name.toLowerCase()),\n elementType,\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(getNameFromType(element.type))) {\n allIn = false;\n }\n });\n } else {\n return false;\n }\n return allIn;\n }\n\n /** Load Icons from Configuration **/\n addIconsFromIconSetConfiguration(\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((name) => {\n if (!collection.has(name)) {\n const src = allTypes.get(name);\n if (src) {\n this.registerIconForType(dictionaryType, name, src);\n this.registerIconForBPMN(\n name,\n sanitizeIconName(ICON_PREFIX + name.toLowerCase()),\n dictionaryType,\n );\n }\n }\n });\n }\n\n /** Add Icon(s) to Dictionary **/\n registerIconForBPMN(\n name: string,\n src: string,\n elementType: elementTypes,\n ): void {\n if (name.includes(elementType)) {\n throw new Error('Should not include elementType');\n }\n\n this.iconDictionaryForBPMN.set(`${elementType}${name}`, src);\n }\n\n addIconsToTypeDictionary(\n actorIcons: BusinessObject[],\n workObjectIcons: BusinessObject[],\n ) {\n if (!this.allInTypeDictionary(elementTypes.ACTOR, actorIcons)) {\n this.addIconsFromIconSetConfiguration(\n elementTypes.ACTOR,\n actorIcons.map((element) => getNameFromType(element.type)),\n );\n }\n if (!this.allInTypeDictionary(elementTypes.WORKOBJECT, workObjectIcons)) {\n this.addIconsFromIconSetConfiguration(\n elementTypes.WORKOBJECT,\n workObjectIcons.map((element) => getNameFromType(element.type)),\n );\n }\n }\n\n registerIconForType(type: elementTypes, name: string, src: string): void {\n if (name.includes(type)) {\n throw new Error('Name should not include type!');\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.add(src, name);\n }\n\n unregisterIconForType(type: elementTypes, name: string): void {\n if (name.includes(type)) {\n throw new Error('Name should not include type!');\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.delete(name);\n }\n\n updateIconRegistries(\n actors: BusinessObject[],\n workObjects: BusinessObject[],\n config: IconSetConfiguration,\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.set(key, config.actors.get(key));\n });\n config.workObjects.keysArray().forEach((key) => {\n workObjectsDict.set(key, config.workObjects.get(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 let elementType;\n if (element.type.includes(elementTypes.ACTOR)) {\n elementType = elementTypes.ACTOR;\n } else {\n elementType = elementTypes.WORKOBJECT;\n }\n this.registerIconForBPMN(\n ICON_PREFIX + name.toLowerCase(),\n getNameFromType(element.type),\n elementType,\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 return this.actorIconDictionary.get(name);\n } else if (type === elementTypes.WORKOBJECT) {\n return this.workObjectDictionary.get(name);\n }\n return null;\n }\n\n getIconForBPMN(elementType: elementTypes, name: string): string | null {\n return this.iconDictionaryForBPMN.get(`${elementType}${name}`);\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 setCustomConfiguration(customConfiguration: IconSetConfiguration): void {\n this.customConfiguration = customConfiguration;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { IconDictionaryService } from 'src/app/Service/IconSetConfiguration/icon-dictionary.service';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport {\n CustomIconSetConfiguration,\n IconSetConfiguration,\n IconSetConfigurationForExport,\n} from 'src/app/Domain/Common/iconSetConfiguration';\nimport { defaultConf } from '../../Domain/Common/iconConfiguration';\nimport { TitleService } from '../Title/title.service';\nimport { INITIAL_ICON_SET_NAME } from '../../Domain/Common/constants';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconSetConfigurationService {\n constructor(\n private iconDictionaryService: IconDictionaryService,\n private elementRegistryService: ElementRegistryService,\n private titleService: TitleService,\n ) {}\n\n setIconSetName(iconSetName: string): void {\n this.titleService.setIconSetName(\n iconSetName ? iconSetName : INITIAL_ICON_SET_NAME,\n );\n }\n\n exportConfiguration(): void {\n const iconSetConfiguration = this.getCurrentConfigurationForExport();\n if (!iconSetConfiguration) {\n return;\n }\n\n const configJSONString = JSON.stringify(iconSetConfiguration, null, 2);\n const filename = this.titleService.getIconSetName();\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 + '.iconset');\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: IconSetConfiguration,\n updateIconSetName = 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.addIconsFromIconSetConfiguration(\n elementTypes.ACTOR,\n actorKeys.map((a) => elementTypes.ACTOR + a),\n );\n this.iconDictionaryService.addIconsFromIconSetConfiguration(\n elementTypes.WORKOBJECT,\n workObjectKeys.map((w) => elementTypes.WORKOBJECT + w),\n );\n\n if (updateIconSetName) {\n const configurationName = customConfig.name;\n this.setIconSetName(configurationName);\n }\n }\n\n getCurrentConfiguration(): IconSetConfiguration | undefined {\n const actors = this.iconDictionaryService.getActorsDictionary();\n const workObjects = this.iconDictionaryService.getWorkObjectsDictionary();\n\n let iconSetConfiguration;\n\n if (actors.size() > 0 && workObjects.size() > 0) {\n iconSetConfiguration = this.createConfigFromDictionaries(\n actors,\n workObjects,\n );\n }\n return iconSetConfiguration;\n }\n\n getCurrentConfigurationForExport():\n | IconSetConfigurationForExport\n | 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(): CustomIconSetConfiguration {\n return {\n name: this.titleService.getIconSetName() || INITIAL_ICON_SET_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(): IconSetConfiguration {\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 ): IconSetConfiguration {\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.getIconSetName(),\n actors: newActors,\n workObjects: newWorkobjects,\n };\n }\n\n private createConfigFromCanvas(): IconSetConfiguration {\n const config = {\n name: INITIAL_ICON_SET_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 { MatSnackBar } from '@angular/material/snack-bar';\nimport { BehaviorSubject } from 'rxjs';\nimport { UsedIconList } from 'src/app/Domain/Icon-Set-Configuration/UsedIconList';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n SNACKBAR_SUCCESS,\n} from '../../Domain/Common/constants';\nimport { Dictionary } from '../../Domain/Common/dictionary/dictionary';\nimport {\n CustomIconSetConfiguration,\n IconSetConfiguration,\n} from '../../Domain/Common/iconSetConfiguration';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { IconListItem } from '../../Domain/Icon-Set-Configuration/iconListItem';\nimport { getNameFromType } from '../../Utils/naming';\nimport { StorageService } from '../BrowserStorage/storage.service';\nimport { ImportDomainStoryService } from '../Import/import-domain-story.service';\nimport { TitleService } from '../Title/title.service';\nimport { IconSetConfigurationService } from './icon-set-configuration.service';\nimport { IconDictionaryService } from './icon-dictionary.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconSetCustomizationService {\n private readonly iconSetConfigurationTypes: BehaviorSubject;\n\n private allIconListItems = new Dictionary();\n\n private configurationHasChanged = false;\n\n selectedActors$ = new BehaviorSubject([]);\n selectedWorkobjects$ = new BehaviorSubject([]);\n private changedIconSetConfiguration: IconSetConfiguration | undefined;\n\n constructor(\n private configurationService: IconSetConfigurationService,\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.iconSetConfigurationTypes = new BehaviorSubject(\n this.configurationService.getCurrentConfigurationNamesWithoutPrefix(),\n );\n\n this.selectedWorkobjects$.next(\n this.iconSetConfigurationTypes.value.workObjects,\n );\n this.selectedActors$.next(this.iconSetConfigurationTypes.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 storedIconSetConfiguration =\n this.storageService.getStoredIconSetConfiguration();\n if (storedIconSetConfiguration) {\n this.importConfiguration(storedIconSetConfiguration, false);\n }\n const importedConfiguration = this.importService.getImportedConfiguration();\n if (importedConfiguration) {\n this.importConfiguration(importedConfiguration, false);\n }\n }\n\n importConfiguration(\n customConfig: IconSetConfiguration,\n saveIconSet = 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 (saveIconSet) {\n this.saveIconSet(this.elementRegistryService.getUsedIcons(), true);\n }\n }\n\n /** Getter & Setter **/\n getIconSetConfiguration(): BehaviorSubject {\n return this.iconSetConfigurationTypes;\n }\n\n getIconForName(iconName: string): BehaviorSubject {\n return this.allIconListItems.get(iconName);\n }\n\n isIconActor(iconName: string): boolean {\n return (\n this.iconSetConfigurationTypes.value.actors.filter(\n (actor: string) => actor === iconName,\n ).length > 0\n );\n }\n\n isIconWorkObject(iconName: string): boolean {\n return (\n this.iconSetConfigurationTypes.value.workObjects.filter(\n (workObject: string) => workObject === iconName,\n ).length > 0\n );\n }\n\n changeName(iconSetName: string): void {\n this.titleService.setIconSetName(iconSetName);\n const changedIconSet = this.iconSetConfigurationTypes.value;\n changedIconSet.name = iconSetName;\n this.iconSetConfigurationTypes.next(changedIconSet);\n }\n\n /** Selected 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 } else {\n this.deselectActor(actor);\n this.updateIcon(false, false, 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 } else {\n this.deselectWorkobject(workobject);\n this.updateIcon(false, false, workobject);\n }\n }\n\n selectActor(actor: string): void {\n const value = this.iconSetConfigurationTypes.value;\n if (!value.actors.includes(actor)) {\n value.actors.push(actor);\n this.iconSetConfigurationTypes.next(value);\n this.updateActorSubject();\n }\n }\n\n selectWorkObject(workObject: string): void {\n const value = this.iconSetConfigurationTypes.value;\n if (!value.workObjects.includes(workObject)) {\n value.workObjects.push(workObject);\n this.iconSetConfigurationTypes.next(value);\n this.updateWorkObjectSubject();\n }\n }\n\n deselectActor(actor: string): void {\n if (this.iconSetConfigurationTypes) {\n this.iconSetConfigurationTypes.next({\n name: this.iconSetConfigurationTypes.value.name,\n actors: this.iconSetConfigurationTypes.value.actors.filter(\n (a: string) => !a.includes(actor),\n ),\n workObjects: this.iconSetConfigurationTypes.value.workObjects,\n });\n }\n this.updateActorSubject();\n }\n\n deselectWorkobject(workobject: string): void {\n if (this.iconSetConfigurationTypes) {\n this.iconSetConfigurationTypes.next({\n name: this.iconSetConfigurationTypes.value.name,\n actors: this.iconSetConfigurationTypes.value.actors,\n workObjects: this.iconSetConfigurationTypes.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.iconSetConfigurationTypes.value;\n value.workObjects = sortedList;\n this.iconSetConfigurationTypes.next(value);\n this.updateWorkObjectSubject();\n }\n\n setSelectedActors(sortedList: string[]): void {\n const value = this.iconSetConfigurationTypes.value;\n value.actors = sortedList;\n this.iconSetConfigurationTypes.next(value);\n this.updateActorSubject();\n }\n\n private updateActorSubject(): void {\n this.selectedActors$.next(this.iconSetConfigurationTypes.value.actors);\n this.configurationHasChanged = true;\n }\n\n private updateWorkObjectSubject(): void {\n this.selectedWorkobjects$.next(\n this.iconSetConfigurationTypes.value.workObjects,\n );\n this.configurationHasChanged = true;\n }\n\n /** Revert Icon Set **/\n resetIconSet(): 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.iconSetConfigurationTypes.next({\n name: defaultConfig.name,\n actors: defaultConfig.actors.keysArray(),\n workObjects: defaultConfig.workObjects.keysArray(),\n } as CustomIconSetConfiguration);\n\n this.updateAllIconBehaviourSubjects();\n }\n\n cancel(): void {\n this.iconSetConfigurationTypes.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 Icon Set **/\n saveIconSet(usedIcons: UsedIconList, imported = false): void {\n const changedActors: string[] = [];\n const changedWorkobjects: string[] = [];\n if (this.configurationHasChanged) {\n const changedIconSet = this.createIconSetConfiguration();\n\n const configurationActors = changedIconSet.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 = changedIconSet.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.changedIconSetConfiguration = changedIconSet;\n\n this.updateIcons(changedIconSet);\n\n this.storageService.setStoredIconSetConfiguration(\n this.changedIconSetConfiguration,\n );\n this.snackbar.open(\n imported\n ? 'Configuration imported successfully'\n : 'Configuration saved successfully',\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 exportIconSet(): void {\n this.configurationService.exportConfiguration();\n }\n\n getAndClearSavedConfiguration(): IconSetConfiguration | undefined {\n const temp = this.changedIconSetConfiguration;\n this.changedIconSetConfiguration = undefined;\n\n return temp;\n }\n\n private createIconSetConfiguration(): IconSetConfiguration {\n const actors = new Dictionary();\n const workObjects = new Dictionary();\n\n this.iconSetConfigurationTypes.value.actors.forEach((name: string) => {\n actors.add(this.iconDictionaryService.getIconSource(name), name);\n });\n this.iconSetConfigurationTypes.value.workObjects.forEach((name: string) => {\n workObjects.add(this.iconDictionaryService.getIconSource(name), name);\n });\n\n return {\n name: this.iconSetConfigurationTypes.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 customIconSetConfiguration = this.iconSetConfigurationTypes.value;\n this.allIconListItems.keysArray().forEach((iconName) => {\n if (customIconSetConfiguration.actors.includes(iconName)) {\n this.updateIcon(true, false, iconName);\n } else if (customIconSetConfiguration.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 // TODO: td: This returns empty every time!\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(changedIconSet: IconSetConfiguration) {\n this.allIconListItems\n .keysArray()\n .forEach((item) => this.setAsUnassigned(item, this.isIconActor(item)));\n changedIconSet.actors.keysArray().forEach((actor) => {\n this.iconDictionaryService.registerIconForType(\n elementTypes.ACTOR,\n actor,\n this.iconDictionaryService.getFullDictionary().get(actor),\n );\n this.iconDictionaryService.unregisterIconForType(\n elementTypes.WORKOBJECT,\n actor,\n );\n this.setAsActor(true, actor);\n });\n changedIconSet.workObjects.keysArray().forEach((workObject) => {\n this.iconDictionaryService.registerIconForType(\n elementTypes.WORKOBJECT,\n workObject,\n this.iconDictionaryService.getFullDictionary().get(workObject),\n );\n this.iconDictionaryService.unregisterIconForType(\n elementTypes.ACTOR,\n workObject,\n );\n this.setAsWorkobject(true, workObject);\n });\n }\n}\n","import { EventEmitter, Injectable, OnDestroy } from '@angular/core';\nimport { IconDictionaryService } from 'src/app/Service/IconSetConfiguration/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 IconSetConfiguration,\n fromConfigurationFromFile,\n} from 'src/app/Domain/Common/iconSetConfiguration';\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 { IconSetConfigurationService } from '../IconSetConfiguration/icon-set-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: IconSetConfiguration | 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 iconSetConfigurationService: IconSetConfigurationService,\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(): IconSetConfiguration {\n const config: IconSetConfiguration = {\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: IconSetConfiguration;\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.iconSetConfigurationService.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 this.title,\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(iconSetConfiguration: IconSetConfiguration): boolean {\n const newActorKeys = iconSetConfiguration.actors.keysArray();\n const newWorkObjectKeys = iconSetConfiguration.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: IconSetConfiguration,\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: IconSetConfiguration) {\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 '../IconSetConfiguration/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 '../IconSetConfiguration/icon-dictionary.service';\nimport { ElementRegistryService } from '../ElementRegistry/element-registry.service';\nimport { IconSetConfigurationService } from '../IconSetConfiguration/icon-set-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: IconSetConfigurationService,\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 IconSetConfigurationService 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) =>\n 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 { IconSetConfiguration } from 'src/app/Domain/Common/iconSetConfiguration';\nimport { InitializerService } from './initializer.service';\nimport { ElementRegistryService } from '../ElementRegistry/element-registry.service';\nimport { IconDictionaryService } from '../IconSetConfiguration/icon-dictionary.service';\nimport { IconSetConfigurationService } from '../IconSetConfiguration/icon-set-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 iconSetConfigurationService: IconSetConfigurationService,\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 storedIconSetConfiguration =\n this.storageService.getStoredIconSetConfiguration();\n if (storedIconSetConfiguration) {\n this.iconDictionaryService.setCustomConfiguration(\n storedIconSetConfiguration,\n );\n this.iconSetConfigurationService.loadConfiguration(\n storedIconSetConfiguration,\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 iconSetConfiguration?: IconSetConfiguration,\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 (!iconSetConfiguration) {\n iconSetConfiguration =\n this.storageService.getStoredIconSetConfiguration();\n }\n if (iconSetConfiguration) {\n this.storageService.setStoredIconSetConfiguration(iconSetConfiguration);\n this.iconDictionaryService.setCustomConfiguration(iconSetConfiguration);\n this.iconSetConfigurationService.loadConfiguration(iconSetConfiguration);\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 { IconSetConfiguration } from 'src/app/Domain/Common/iconSetConfiguration';\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?: IconSetConfiguration,\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 { StorySentence } from 'src/app/Domain/Replay/storySentence';\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: StorySentence[] = [];\n private currentSentence = new BehaviorSubject(-1);\n private maxSentenceNumber = new BehaviorSubject(0);\n\n currentSentence$ = this.currentSentence.asObservable();\n maxSentenceNumber$ = this.maxSentenceNumber.asObservable();\n\n constructor(\n private replayStateService: ReplayStateService,\n private domManipulationService: DomManipulationService,\n private storyCreatorService: StoryCreatorService,\n private snackbar: MatSnackBar,\n ) {}\n\n isReplayable(): boolean {\n return this.storyCreatorService.traceActivitiesAndCreateStory().length > 0;\n }\n\n initializeReplay(): void {\n this.currentSentence.next(1);\n this.story = this.storyCreatorService.traceActivitiesAndCreateStory();\n this.maxSentenceNumber.next(this.story.length);\n }\n\n getCurrentSentenceNumber(): number {\n return this.currentSentence.value;\n }\n\n getMaxSentenceNumber(): number {\n return this.maxSentenceNumber.value;\n }\n\n nextSentence(): void {\n if (this.currentSentence.value < this.story.length) {\n this.currentSentence.next(this.currentSentence.value + 1);\n this.showCurrentSentence();\n }\n }\n\n previousSentence(): void {\n if (this.currentSentence.value > 1) {\n this.currentSentence.next(this.currentSentence.value - 1);\n this.showCurrentSentence();\n }\n }\n\n private showCurrentSentence() {\n this.domManipulationService.showSentence(\n this.story[this.currentSentence.value - 1],\n this.currentSentence.value > 1\n ? this.story[this.currentSentence.value - 2]\n : undefined,\n );\n }\n\n startReplay(): void {\n this.initializeReplay();\n if (this.story?.length) {\n const missingSentences = this.storyCreatorService.getMissingSentences(\n this.story,\n );\n if (missingSentences.length === 0) {\n this.replayStateService.setReplayState(true);\n this.domManipulationService.showSentence(\n this.story[this.currentSentence.getValue() - 1],\n );\n } else {\n const sentence = missingSentences.join(', ');\n this.snackbar.open(\n missingSentences.length === 1\n ? `The Domain Story is not complete. Sentence ${sentence} is missing.`\n : `The Domain Story is not complete. Sentences ${sentence} 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.currentSentence.next(-1);\n this.maxSentenceNumber.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 { StorySentence } from '../../../Domain/Replay/storySentence';\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(): StorySentence[] {\n const tracedActivityMap = new Dictionary();\n const story: StorySentence[] = [];\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 (\n let i = 0;\n i <= Math.max(...tracedActivityMap.keysArray().map((it) => Number(it)));\n i++\n ) {\n this.createSentence(tracedActivityMap, i, story);\n }\n this.addGroupsToLastSentence(story);\n return story;\n }\n\n private createSentence(\n tracedActivityMap: Dictionary,\n i: number,\n story: StorySentence[],\n ): void {\n const sentenceObjects = this.getSentenceObjects(\n tracedActivityMap.get(`${i}`) || [],\n );\n const highlightedElements = sentenceObjects.map((t) => t.id);\n if (i > 0) {\n story[i - 1].objects.forEach((object) => {\n if (!sentenceObjects.includes(object)) {\n sentenceObjects.push(object);\n }\n });\n }\n story[i] = {\n highlightedObjects: highlightedElements,\n objects: sentenceObjects,\n };\n }\n\n getMissingSentences(story: StorySentence[]): number[] {\n if (!story || story.length === 0) {\n return [];\n }\n\n const missingSentences: number[] = [];\n for (let i = 0; i < story.length; i++) {\n if (\n !story[i] ||\n story[i].objects.length <= 0 ||\n story[i].highlightedObjects.length === 0 ||\n story[i].objects.filter(\n (element) => element.type === elementTypes.ACTIVITY,\n ).length <= 0\n ) {\n missingSentences.push(i + 1);\n }\n }\n return missingSentences;\n }\n\n private getSentenceObjects(\n tracedActivity: ActivityCanvasObject[],\n ): BusinessObject[] {\n const initialSource: CanvasObject[] = [];\n const activities = tracedActivity;\n const targetObjects: CanvasObject[] = [];\n\n tracedActivity.forEach((parallelSentence: ActivityCanvasObject) => {\n initialSource.push(parallelSentence.source);\n\n const firstTarget = parallelSentence.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 private addGroupsToLastSentence(story: StorySentence[]): void {\n const groups = this.elementRegistryService.getAllGroups() as CanvasObject[];\n if (groups.length > 0) {\n story[story.length - 1].objects = story[story.length - 1].objects.concat(\n groups.map((g) => g.businessObject),\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 { environment } from '../../../environments/environment';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_ICON_SET_NAME,\n INITIAL_TITLE,\n} from '../../Domain/Common/constants';\nimport { CommandStackService } from '../CommandStack/command-stack.service';\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 iconSetNameSubject = new BehaviorSubject(\n INITIAL_ICON_SET_NAME,\n );\n private showDescriptionSubject = new BehaviorSubject(true);\n\n title$ = this.titleSubject.asObservable();\n description$ = this.descriptionSubject.asObservable();\n showDescription$ = this.showDescriptionSubject.asObservable();\n iconSetName$ = this.iconSetNameSubject.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(inputTitle: string | null): void {\n const title =\n !inputTitle || inputTitle.trim().length === 0\n ? INITIAL_TITLE\n : inputTitle;\n\n this.titleSubject.next(title);\n document.title = title === INITIAL_TITLE ? 'egon.io' : title;\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 setIconSetName(name: string): void {\n this.iconSetNameSubject.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 getIconSetName(): string {\n return this.iconSetNameSubject.value;\n }\n\n getVersion(): string {\n return environment.version;\n }\n\n hasTitleOrDescription(): boolean {\n return (\n (this.getTitle().trim().length > 0 &&\n this.getTitle() !== INITIAL_TITLE) ||\n (this.getDescription().trim().length > 0 &&\n this.getDescription() !== INITIAL_DESCRIPTION)\n );\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\n// TODO: td: This can cause a lot of errors\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 replayStateService: ReplayStateService,\n replayService: ReplayService,\n ) {\n this.showSettings$ = new BehaviorSubject(false);\n this.showDescription$ = new BehaviorSubject(true);\n\n document.addEventListener('keydown', (e: KeyboardEvent) => {\n if (e.ctrlKey && e.key === 's') {\n e.preventDefault();\n e.stopPropagation();\n if (this.exportService.isDomainStoryExportable()) {\n this.exportService.downloadDST();\n }\n }\n if (e.ctrlKey && e.key === 'l') {\n e.preventDefault();\n e.stopPropagation();\n document.getElementById('import')?.click();\n }\n if (\n (e.key === 'ArrowRight' || e.key === 'ArrowUp') &&\n this.replayStateService.getReplayOn()\n ) {\n e.preventDefault();\n e.stopPropagation();\n replayService.nextSentence();\n }\n if (\n (e.key === 'ArrowLeft' || e.key === 'ArrowDown') &&\n this.replayStateService.getReplayOn()\n ) {\n e.preventDefault();\n e.stopPropagation();\n replayService.previousSentence();\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 \n \"WPS\n WPS\n \n\n \n Privacy\n \n\n \n Imprint\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 { IconSetConfigurationService } from 'src/app/Service/IconSetConfiguration/icon-set-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/IconSetConfiguration/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 IconSetConfigurationService,\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: '2.0.0-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","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","getNameFromType","RENDERER_IDS","numbers","DEFAULT_COLOR","initializeRenderer","elementRegistryService","DomainStoryRenderer","styles","textRenderer","pathMap","rendererId","next","markers","computeStyle","generateActivityNumber","parentGfx","box","numberStash","semantic","use","number","renderNumber","backgroundDotStyle","backgroundBoxStyle","newRenderedNumber","numberStyle","fitBox","style","getExternalStyle","fill","fontSize","fontFamily","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","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","r","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","fixedOffsetX","fixedOffsetY","angleDependantOffsetX","angleDependantOffsetY","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_ICON_SET_NAME","ICON_SET_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","IconConfiguration","allIconDictionary","domainName","getDefaultConf","defaultConf","updateAllIconRegistry","appendSRCFile","actorsDict","workObjectsDict","newAppendedIcons","appen","createCustomConf","iconSetConfiguration","allIconsConf","structuredClone","testCustomIconSetConfiguration","fromConfigurationFromFile","configFromFile","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","ConfigAndDST","domain","dst","testConfigAndDst","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","CommonModule","AutosaveSettingsComponent","AutosaveOptionsComponent","AutosavedDraftsComponent","FormsModule","MaterialModule","AutosaveSettingsModule","_","_2","_3","declarations","imports","exports","HeaderButtonsComponent","DomainStoryModelerModuleModule","IconSetConfigurationComponent","IconListItemComponent","DetailsListItemComponent","IconSetDetailsComponent","GeneralSettingsComponent","LabelDictionaryComponent","SettingsModule","i0","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵelement","ɵɵlistener","AutosaveOptionsComponent_mat_card_0_Template_button_click_20_listener","ɵɵrestoreView","_r1","activated_r2","ɵɵreference","interval_r3","drafts_r4","ctx_r4","ɵɵnextContext","ɵɵresetView","save","checked","ɵɵadvance","ɵɵproperty","configuration_r6","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","draft_r3","_r2","$implicit","ctx_r3","loadDraft","ɵɵtextInterpolate","date","AutosavedDraftsComponent_div_7_div_1_Template","AutosavedDraftsComponent_div_7_Template_button_click_4_listener","removeAllDrafts","drafts","autosaveService","subscription","autosavedDraftsChanged$","subscribe","initDrafts","ngOnInit","loadCurrentDrafts","draft","AutosaveService","AutosavedDraftsComponent_Template","AutosavedDraftsComponent_div_7_Template","AutosavedDraftsComponent_ng_template_8_Template","ɵɵtemplateRefExtractor","ɵɵtextInterpolate2","noDrafts_r5","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_r2","doOption","option_r4","ɵɵ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","ctx_r0","ɵɵpropertyInterpolate","ɵɵ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","iconName","iconSetCustomizationService","isWorkobject","isNone","getIconForName","toggleNone","setAsUnassigned","toggleActor","setAsActor","toggleWorkobject","setAsWorkobject","IconSetCustomizationService","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","ɵɵclassProp","sanitizeIconName","iconName_r1","ICON_FILTER_NONE","selectedActors","selectedWorkobjects","allIconNames","allFilteredIconNames","iconSetConfigurationTypes","getIconSetConfiguration","getFullDictionary","selectedActors$","selectedWorkobjects$","allFiltered","getFilteredNamesForType","loadMinimalIconConfigurationWithDefaultIcons","resetIconSet","loadInitialConfiguration","saveIconSet","getUsedIcons","exportIconSet","startIconUpload","importIcon","files","iconInputFile","reader","FileReader","onloadend","addIMGToIconDictionary","registerIconForBPMN","addNewIcon","readAsDataURL","startIconSetImport","importIconSet","iconSetInputFile","loadConfiguration","importConfiguration","readAsText","filterForActors","ICON_FILTER_ACTOR","filterForWorkobjects","ICON_FILTER_WORKOBJECT","filterForUnassigned","ICON_FILTER_UNASSIGNED","filterByNameAndType","filteredByNameAndType","isIconActor","isIconWorkObject","IconSetConfigurationService","IconDictionaryService","i4","ElementRegistryService","IconSetConfigurationComponent_Template","IconSetConfigurationComponent_Template_button_click_6_listener","IconSetConfigurationComponent_Template_button_click_10_listener","IconSetConfigurationComponent_Template_button_click_14_listener","IconSetConfigurationComponent_Template_input_input_18_listener","IconSetConfigurationComponent_Template_button_click_20_listener","IconSetConfigurationComponent_Template_input_change_23_listener","IconSetConfigurationComponent_Template_button_click_24_listener","IconSetConfigurationComponent_Template_button_click_27_listener","IconSetConfigurationComponent_Template_button_click_31_listener","IconSetConfigurationComponent_Template_button_click_35_listener","IconSetConfigurationComponent_Template_input_change_38_listener","IconSetConfigurationComponent_Template_button_click_39_listener","IconSetConfigurationComponent_mat_grid_tile_46_Template","IconSetDetailsComponent_mat_list_item_12_Template_mat_list_item_dragover_0_listener","ctx_r1","allowDrop","IconSetDetailsComponent_mat_list_item_12_Template_mat_list_item_dragstart_0_listener","i_r3","onDragStart","IconSetDetailsComponent_mat_list_item_12_Template_mat_list_item_drop_0_listener","iconName_r5","onDrop","IconSetDetailsComponent_mat_list_item_18_Template_mat_list_item_dragover_0_listener","_r6","IconSetDetailsComponent_mat_list_item_18_Template_mat_list_item_dragstart_0_listener","i_r7","IconSetDetailsComponent_mat_list_item_18_Template_mat_list_item_drop_0_listener","ctx_r7","iconName_r9","customizationService","draggedList","draggedIndex","iconSetName","iconSetName$","changeName","listName","list","sortedList","setSelectedActors","setSelectedWorkObject","IconSetDetailsComponent_Template","IconSetDetailsComponent_Template_input_input_6_listener","IconSetDetailsComponent_mat_list_item_12_Template","IconSetDetailsComponent_mat_list_item_18_Template","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","openLabelDictionary","HeaderButtonsComponent_div_0_Template_button_click_16_listener","openSettings","HeaderButtonsComponent_div_0_Template_button_click_19_listener","openKeyboardShortcutsDialog","HeaderButtonsComponent_div_0_Template_button_click_22_listener","createNewDomainStory","replayService","isReplayable","isExportable","isDirty$","exportService","isDomainStoryExportable","HeaderButtonsComponent_div_2_Template_button_click_1_listener","_r3","previousSentence","HeaderButtonsComponent_div_2_Template_button_click_4_listener","nextSentence","HeaderButtonsComponent_div_2_Template_button_click_7_listener","stopReplay","settingsService","replayStateService","dialogService","importService","renderService","isReplay$","replayOn$","dirty$","filename","endsWith","importDST","importEGN","commandStackChanged","SVGDownloadOption","downloadSVG","EGNDownloadOption","downloadDST","PNGDownloadOption","downloadPNG","HTMLDownloadOption","downloadHTMLPresentation","disableClose","autoFocus","openDialog","shortCutText","reset","makeClean","hasTitleOrDescription","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","sentenceDescription$","description$","HeaderComponent","title$","showDescription$","currentSentence$","maxSentenceNumber$","pipe","sentence","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","_r4","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","showIconSetCustomization","savedConfiguration","getAndClearSavedConfiguration","restart","openGeneralSettings","openIconSetCustomization","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_icon_set_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","getStoredIconSetConfiguration","iconSetString","configurationFromFile","setStoredIconSetConfiguration","configForStorage","CommandStackService","setCommandStack","payload","matDialog","dialog","MatDialog","isDirtySubject","dirty","DomManipulationService","showAll","removeHighlights","getAllCanvasObjects","getAllGroups","domObject","display","showSentence","replaySentence","notShown","getAllNotShown","highlightSentence","o","getNumberDomForActivity","numberDOMS","numberBackgroundDom","numberTextDom","allActivities","getAllActivities","allConnections","getAllConnections","activityDomObject","connectionDomObject","sentenceObjects","shownElements","notShownElements","allObjects","fullyInitialized","registry","__implicitroot","setElementRegistry","_elements","createObjectListForDSTDownload","allObjectsFromCanvas","objectList","fillListOfCanvasObjects","canvasElement","groupObjects","checkChildForGroup","currentGroup","registryElementNames","getAllActors","workobjects","getAllWorkobjects","co","sanitizeForDesktop","formatDate","environment","pngService","svgService","htmlPresentationService","titleSubscription","descriptionSubscription","ngOnDestroy","unsubscribe","DomainStory","getCurrentConfigurationForExport","getStoryForDownload","getCurrentDateString","downloadFile","datatype","fileEnding","encodeURIComponent","body","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","fixActivityMarkersForEachSentence","getCurrentSentenceNumber","content","transition","err","alert","getMaxSentenceNumber","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","join","layerResizers","layerOverlays","removeAttribute","XMLSerializer","serializeToString","cacheData","getEncoded","findIndexToInsertData","svgIndex","backgroundColorWhite","appendDST","ICON_PREFIX","actorIconDictionary","workObjectDictionary","iconDictionaryForBPMN","iconConfig","allTypes","initDictionary","dictionary","customConfiguration","allInTypeDictionary","collection","allIn","addIconsFromIconSetConfiguration","dictionaryType","iconTypes","registerIconForType","addIconsToTypeDictionary","unregisterIconForType","extractCustomIconsFromDictionary","addNewIconsToDictionary","elementDictionary","sanitizedName","custom","addIconsToCss","fullDictionary","appendedDict","getTypeDictionaryKeys","getIconSource","elementOfType","getAllIconDictionary","getActorsDictionary","getWorkObjectsDictionary","getIconConfiguration","setCustomConfiguration","setIconSetName","exportConfiguration","configJSONString","getIconSetName","customConfig","updateIconSetName","actorDict","workObjectDict","actorKeys","workObjectKeys","configurationName","getCurrentConfiguration","createConfigFromDictionaries","currentConfiguration","getCurrentConfigurationNamesWithoutPrefix","createMinimalConfigurationWithDefaultIcons","minimalConfig","createConfigFromCanvas","actorNames","workobjectNames","newActors","newWorkobjects","allCanvasObjects","allIconListItems","configurationHasChanged","addIconToAllIconList","importedConfigurationEvent","storedIconSetConfiguration","importedConfiguration","getImportedConfiguration","selectedActorNames","selectActor","selectedWorkobjectNames","selectWorkObject","changedIconSet","deselectActor","deselectWorkobject","updateIcon","updateActorSubject","updateWorkObjectSubject","defaultConfig","workObjectName","actorName","updateAllIconBehaviourSubjects","resetToInitialConfiguration","usedIcons","imported","changedActors","changedWorkobjects","createIconSetConfiguration","configurationActors","configurationWorkobjects","changedIconSetConfiguration","updateIcons","temp","iconDict","getSrcForIcon","iconBehaviourSubject","customIconSetConfiguration","rawSrc","restoreTitleFromFileName","importRepairService","iconSetConfigurationService","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","currentSentence","maxSentenceNumber","traceActivitiesAndCreateStory","initializeReplay","showCurrentSentence","missingSentences","getMissingSentences","getValue","StoryCreatorService","tracedActivityMap","tracedItem","it","createSentence","addGroupsToLastSentence","getSentenceObjects","highlightedElements","highlightedObjects","tracedActivity","initialSource","targetObjects","parallelSentence","firstTarget","checkTarget","activityTarget","g","showSettings","showSettings$","titleSubject","descriptionSubject","iconSetNameSubject","showDescriptionSubject","allowUndo","fireTitleAndDescriptionUpdate","updateTitle","updateDescription","inputTitle","getVersion","degrees","radians","PI","quadrant","adjacent","opposite","atan2","Point","reg","domainStoryRegex","svgRegex","egnSuffix","dstSuffix","svgSuffix","filenameWithoutDateSuffix","AppComponent","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:///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sHAGJn6B,cAAc;IAAAM,OAAA,GA5BvB+5B,qEAAe,EACfE,kFAAqB,EACrBC,iEAAa,EACbC,yEAAiB,EACjBX,qEAAe,EACfC,4EAAkB,EAClBO,0EAAiB,EACjBN,mEAAc,EACdC,uEAAgB,EAChBC,4EAAkB,EAClBE,2EAAiB,EACjBD,kEAAa;IAAA55B,OAAA,GAGb85B,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,MAAMpY,WAAW,GAAG;EACzB2Y,UAAU,EAAE,KAAK;EACjBtW,OAAO,EAAE;CACV;AAED;;;;;;;AAOA;;;;;;;;;;;;;;;;AChB+C;AAGF;AACY;AAEzD,IAAIrC,kEAAW,CAAC2Y,UAAU,EAAE;EAC1BC,6DAAc,EAAE;AAClB;AAEAC,sEAAA,EAAwB,CACrBE,eAAe,CAACxB,sDAAS,CAAC,CAC1ByB,KAAK,CAAE1V,GAAG,IAAK2V,OAAO,CAACC,KAAK,CAAC5V,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/elementTypes.ts","./src/app/Domain/Common/iconConfiguration.ts","./src/app/Domain/Common/iconSetConfiguration.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/Export/configAndDst.ts","./src/app/Domain/Export/exportConstants.ts","./src/app/Domain/Icon-Set-Configuration/allIcons.ts","./src/app/Domain/Icon-Set-Configuration/iconFilterEnum.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/icon-list-item/icon-list-item.component.ts","./src/app/Presentation/DomainConfiguration/icon-list-item/icon-list-item.component.html","./src/app/Presentation/DomainConfiguration/icon-set-configuration.component.ts","./src/app/Presentation/DomainConfiguration/icon-set-configuration.component.html","./src/app/Presentation/DomainConfiguration/icon-set-details/icon-set-details.component.ts","./src/app/Presentation/DomainConfiguration/icon-set-details/icon-set-details.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/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/IconSetConfiguration/icon-dictionary.service.ts","./src/app/Service/IconSetConfiguration/icon-set-configuration.service.ts","./src/app/Service/IconSetConfiguration/icon-set-customization.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\";\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 = actorType;\n replaceOption[i] = {\n label: \"Change to \" + typeName,\n actionName: \"replace-with-actor-\" + typeName.toLowerCase(),\n className: iconDictionaryService.getIconForBPMN(\n elementTypes.ACTOR,\n actorType,\n ),\n target: {\n type: `${elementTypes.ACTOR}${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 = workObjectType;\n replaceOption[i] = {\n label: \"Change to \" + typeName,\n actionName: \"replace-with-actor-\" + typeName,\n className: iconDictionaryService.getIconForBPMN(\n elementTypes.WORKOBJECT,\n workObjectType,\n ),\n target: {\n type: `${elementTypes.WORKOBJECT}${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/Icon-Set-Configuration/allIcons\";\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 = workObjectType;\n let icon = iconDictionaryService.getIconForBPMN(\n elementTypes.WORKOBJECT,\n workObjectType,\n );\n let action = [];\n action[\"append.workObject\" + name] = appendAction(\n `${elementTypes.WORKOBJECT}${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 = actorType;\n let icon = iconDictionaryService.getIconForBPMN(\n elementTypes.ACTOR,\n actorType,\n );\n let action = [];\n action[\"append.actor\" + name] = appendAction(\n `${elementTypes.ACTOR}${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\";\nimport { getNameFromType } from \"../../Utils/naming\";\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 // !IMPORTANT!\n // When converting svg-files via Inkscape or Photoshop the svg-circle is converted to a black dot that obscures the number.\n // To circumvent this, we draw a . as the white background and an o as the circle around the number.\n // There is a minor Bug, that in some Programs the used Font is not supported, which defaults to Arial, where the o is not round but oval.\n // Unit 3rd Party Tools update their svg-version to 1.2 we should keep this workaround.\n box.x -= 65;\n box.y -= 12;\n renderNumber(parentGfx, \".\", backgroundDotStyle(box), element.type);\n box.x += 30;\n box.y += 3;\n renderNumber(parentGfx, \"o\", backgroundBoxStyle(box), element.type);\n\n numbers[semantic.number] = true;\n box.x += 9;\n box.y -= 7;\n\n if (semantic.number < 10) {\n box.x += 3;\n }\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 return text;\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 getNameFromType(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 getNameFromType(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 { 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 angle = 0;\n if (element.waypoints.length > 1) {\n angle = angleBetween(\n // Start of first arrow segment\n element.waypoints[0],\n // End of first arrow segment\n element.waypoints[1],\n );\n }\n let x = element.waypoints[0].x;\n let y = element.waypoints[0].y;\n\n let fixedOffsetX = 0;\n let fixedOffsetY = 0;\n let angleDependantOffsetX = 0;\n let angleDependantOffsetY = 0;\n\n // Fine tune positioning of sequence number above beginning of first arrow segment\n if (angle >= 0 && angle <= 45) {\n fixedOffsetX = 25;\n angleDependantOffsetY = 20 * (1 - angle / 45);\n } else if (angle <= 90) {\n fixedOffsetX = 5;\n angleDependantOffsetX = 15 * (1 - (angle - 45) / 45);\n } else if (angle <= 135) {\n fixedOffsetX = 5;\n angleDependantOffsetX = -20 * ((angle - 90) / 45);\n } else if (angle <= 180) {\n fixedOffsetX = -15;\n angleDependantOffsetY = 20 * ((angle - 135) / 45);\n } else if (angle <= 225) {\n fixedOffsetX = -15;\n fixedOffsetY = 15;\n angleDependantOffsetY = 25 * ((angle - 180) / 45);\n } else if (angle <= 270) {\n fixedOffsetX = 5;\n angleDependantOffsetX = -20 * (1 - (angle - 225) / 45);\n fixedOffsetY = 40;\n } else if (angle <= 315) {\n fixedOffsetX = 5;\n angleDependantOffsetX = 25 * ((angle - 270) / 45);\n fixedOffsetY = 40;\n } else {\n fixedOffsetX = 25;\n fixedOffsetY = 20;\n angleDependantOffsetY = 15 * (1 - (angle - 315) / 45);\n }\n\n x = x + fixedOffsetX + angleDependantOffsetX;\n y = y + fixedOffsetY + angleDependantOffsetY;\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/Icon-Set-Configuration/allIcons\";\nimport { Dictionary } from \"src/app/Domain/Common/dictionary/dictionary\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\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((name) => {\n addCanvasObjectTypes(\n name,\n createAction,\n actions,\n \"actor\",\n elementTypes.ACTOR,\n );\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((name) => {\n addCanvasObjectTypes(\n name,\n createAction,\n actions,\n \"actor\",\n elementTypes.WORKOBJECT,\n );\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(\n name,\n createAction,\n actions,\n className,\n elementType,\n) {\n let icon = iconDictionary.getIconForBPMN(elementType, name);\n\n let action = [];\n action[\"domainStory-\" + className + name] = createAction(\n `${elementType}${name}`,\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 = '';\nexport const INITIAL_ICON_SET_NAME = 'default';\n\n/** LocalStorageTags **/\nexport const APPENDED_ICONS_TAG = 'appendedIcons';\n// String value of tag should not be renamed, because existing configurations would not load\nexport const ICON_SET_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","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/Icon-Set-Configuration/allIcons';\nimport { Configuration } from 'src/app/Domain/Common/configuration';\nimport { IconSetConfiguration } from 'src/app/Domain/Common/iconSetConfiguration';\nimport { INITIAL_ICON_SET_NAME } from './constants';\n\nexport class IconConfiguration {\n domainName = INITIAL_ICON_SET_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(iconSetConfiguration: IconSetConfiguration): Configuration {\n this.domainName = iconSetConfiguration.name;\n\n let actors = iconSetConfiguration.actors;\n let workObjects = iconSetConfiguration.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 { INITIAL_ICON_SET_NAME } from './constants';\nimport { testBusinessObject } from './businessObject';\nimport { elementTypes } from './elementTypes';\nimport { Dictionary } from './dictionary/dictionary';\n\nexport interface IconSetConfiguration {\n name: string;\n actors: Dictionary;\n workObjects: Dictionary;\n}\n\nexport interface IconSetConfigurationForExport {\n name: string;\n actors: any;\n workObjects: any;\n}\n\nexport interface CustomIconSetConfiguration {\n name: string;\n actors: string[];\n workObjects: string[];\n}\nconst actor = structuredClone(testBusinessObject);\nactor.type = elementTypes.ACTOR;\n\nexport const testCustomIconSetConfiguration: CustomIconSetConfiguration = {\n name: INITIAL_ICON_SET_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","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","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 { 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","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 { IconSetConfigurationComponent } from 'src/app/Presentation/DomainConfiguration/icon-set-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 { IconSetDetailsComponent } from '../Presentation/DomainConfiguration/icon-set-details/icon-set-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 IconSetConfigurationComponent,\n GeneralSettingsComponent,\n LabelDictionaryComponent,\n IconListItemComponent,\n DetailsListItemComponent,\n IconSetDetailsComponent,\n ],\n exports: [\n GeneralSettingsComponent,\n IconSetConfigurationComponent,\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/Icon-Set-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 { AfterViewChecked, Component, Input, OnInit } from '@angular/core';\nimport { IconListItem } from '../../../Domain/Icon-Set-Configuration/iconListItem';\nimport { BehaviorSubject } from 'rxjs';\nimport { IconSetCustomizationService } from '../../../Service/IconSetConfiguration/icon-set-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(\n private iconSetCustomizationService: IconSetCustomizationService,\n ) {}\n\n ngOnInit(): void {\n this.icon = this.iconSetCustomizationService.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.iconSetCustomizationService.setAsUnassigned(\n this.iconName,\n this.icon.value.isActor,\n );\n }\n\n toggleActor(): void {\n this.iconSetCustomizationService.setAsActor(true, this.iconName);\n }\n\n toggleWorkobject(): void {\n this.iconSetCustomizationService.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, OnInit } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport {\n CustomIconSetConfiguration,\n fromConfigurationFromFile,\n} from 'src/app/Domain/Common/iconSetConfiguration';\nimport { IconSetConfigurationService } from 'src/app/Service/IconSetConfiguration/icon-set-configuration.service';\nimport { IconDictionaryService } from 'src/app/Service/IconSetConfiguration/icon-dictionary.service';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { sanitizeIconName } from 'src/app/Utils/sanitizer';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { IconFilterEnum } from '../../Domain/Icon-Set-Configuration/iconFilterEnum';\nimport { IconSetCustomizationService } from '../../Service/IconSetConfiguration/icon-set-customization.service';\n\n@Component({\n selector: 'app-icon-set-configuration',\n templateUrl: './icon-set-configuration.component.html',\n styleUrls: ['./icon-set-configuration.component.scss'],\n})\nexport class IconSetConfigurationComponent implements OnInit {\n private iconSetConfigurationTypes: CustomIconSetConfiguration;\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: IconSetConfigurationService,\n private iconDictionaryService: IconDictionaryService,\n private iconSetCustomizationService: IconSetCustomizationService,\n private elementRegistryService: ElementRegistryService,\n ) {\n this.iconSetConfigurationTypes =\n this.iconSetCustomizationService.getIconSetConfiguration().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.iconSetCustomizationService.selectedActors$;\n this.selectedWorkobjects =\n this.iconSetCustomizationService.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 Icon Set **/\n loadMinimalIconConfigurationWithDefaultIcons(): void {\n this.iconSetCustomizationService.resetIconSet();\n }\n\n loadInitialConfiguration(): void {\n this.iconSetCustomizationService.cancel();\n }\n\n /** Persist Icon Set **/\n saveIconSet(): void {\n this.iconSetCustomizationService.saveIconSet(\n this.elementRegistryService.getUsedIcons(),\n );\n }\n\n exportIconSet(): void {\n this.iconSetCustomizationService.exportIconSet();\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 // TODO: td: What kind of type is it here?\n this.iconDictionaryService.registerIconForBPMN(\n iconName,\n src,\n elementTypes.ACTOR,\n );\n\n this.allIcons.next(this.iconDictionaryService.getFullDictionary());\n this.filter.next(this.filter.value);\n\n this.iconSetCustomizationService.addNewIcon(iconName);\n }\n };\n reader.readAsDataURL(iconInputFile);\n }\n }\n\n /** Import Icon Set **/\n startIconSetImport(): void {\n document.getElementById('importDomain')?.click();\n }\n\n importIconSet(): void {\n // @ts-ignore\n const iconSetInputFile = 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.iconSetCustomizationService.importConfiguration(config);\n };\n\n reader.readAsText(iconSetInputFile);\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.iconSetCustomizationService.isIconActor(name),\n );\n break;\n case IconFilterEnum.ICON_FILTER_WORKOBJECT:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.iconSetCustomizationService.isIconWorkObject(name),\n );\n break;\n case IconFilterEnum.ICON_FILTER_UNASSIGNED:\n allFiltered = this.allIconNames.value.filter(\n (name) =>\n !this.iconSetCustomizationService.isIconActor(name) &&\n !this.iconSetCustomizationService.isIconWorkObject(name),\n );\n break;\n }\n return allFiltered;\n }\n}\n","
\n
\n
\n
\n
Filter by assignment:
\n \n None\n \n \n Actors\n \n \n Workobjects\n \n \n
\n
\n \n \n home \n \n \n close\n \n
\n \n
\n \n unarchive\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 { IconSetCustomizationService } from 'src/app/Service/IconSetConfiguration/icon-set-customization.service';\nimport { IconListItem } from 'src/app/Domain/Icon-Set-Configuration/iconListItem';\nimport { TitleService } from 'src/app/Service/Title/title.service';\n\n@Component({\n selector: 'app-icon-set-details',\n templateUrl: './icon-set-details.component.html',\n styleUrls: ['./icon-set-details.component.scss'],\n})\nexport class IconSetDetailsComponent implements OnInit {\n iconSetName: 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: IconSetCustomizationService,\n titleService: TitleService,\n ) {\n this.iconSetName = titleService.iconSetName$;\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 { 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 { 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 protected replayService: ReplayService,\n protected 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 () => this.exportService.downloadDST(),\n );\n const PNGDownloadOption = new ExportOption(\n 'PNG',\n 'Download a PNG-Image of the Domain-Story. This does not include the Domain-Story!',\n (withTitle: boolean) => 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 () => 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: \\t\\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 this.dirtyFlagService.makeClean();\n }\n\n /** Replay functions **/\n startReplay(): void {\n this.replayService.startReplay();\n }\n\n stopReplay(): void {\n this.replayService.stopReplay();\n }\n\n previousSentence(): void {\n this.replayService.previousSentence();\n }\n\n nextSentence(): void {\n this.replayService.nextSentence();\n }\n\n isExportable(): boolean {\n return (\n this.titleService.hasTitleOrDescription() ||\n this.exportService.isDomainStoryExportable()\n );\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 skip_previous \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 sentenceDescription$: 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.sentenceDescription$ = combineLatest([\n this.replayService.currentSentence$,\n this.replayService.maxSentenceNumber$,\n ]).pipe(map(([sentence, count]) => `${sentence}/${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 Sentence: {{ sentenceDescription$ | 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 { IconSetConfiguration } from 'src/app/Domain/Common/iconSetConfiguration';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { AutosaveConfigurationService } from '../../Service/Autosave/autosave-configuration.service';\nimport { IconSetCustomizationService } from '../../Service/IconSetConfiguration/icon-set-customization.service';\n\n@Component({\n selector: 'app-settings',\n templateUrl: './settings.component.html',\n styleUrls: ['./settings.component.scss'],\n})\nexport class SettingsComponent {\n iconSetConfiguration: IconSetConfiguration | undefined;\n showGeneralSettings = new BehaviorSubject(false);\n showIconSetCustomization = new BehaviorSubject(true);\n\n constructor(\n private settingsService: SettingsService,\n private modelerService: ModelerService,\n private iconSetCustomizationService: IconSetCustomizationService,\n ) {}\n\n close(): void {\n const savedConfiguration =\n this.iconSetCustomizationService.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.showIconSetCustomization.next(false);\n }\n\n openIconSetCustomization() {\n this.showGeneralSettings.next(false);\n this.showIconSetCustomization.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 '../IconSetConfiguration/icon-dictionary.service';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { fromConfigurationFromFile } from '../../Domain/Common/iconSetConfiguration';\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 { ICON_SET_CONFIGURATION_TAG } from '../../Domain/Common/constants';\nimport {\n IconSetConfiguration,\n fromConfigurationFromFile,\n} from '../../Domain/Common/iconSetConfiguration';\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: IconSetConfiguration) {\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 getStoredIconSetConfiguration(): IconSetConfiguration | undefined {\n const iconSetString = localStorage.getItem(ICON_SET_CONFIGURATION_TAG);\n\n if (!iconSetString) {\n return;\n } else {\n const configurationFromFile = fromConfigurationFromFile(\n JSON.parse(iconSetString),\n );\n if (this.checkValidityOfConfiguration(configurationFromFile)) {\n return configurationFromFile;\n }\n }\n return;\n }\n\n setStoredIconSetConfiguration(config: IconSetConfiguration): 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 ICON_SET_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 { StorySentence } from 'src/app/Domain/Replay/storySentence';\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 Sentence\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 showSentence(\n replaySentence: StorySentence,\n previousSentence?: StorySentence,\n ): void {\n this.removeHighlights();\n const notShown = this.getAllNotShown(replaySentence.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.highlightSentence(\n previousSentence\n ? replaySentence.objects.filter(\n (o) => !previousSentence.objects.includes(o),\n )\n : replaySentence.objects,\n );\n\n replaySentence.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 highlightSentence(sentenceObjects: BusinessObject[]): void {\n sentenceObjects\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';\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/Icon-Set-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 { IconSetConfigurationService } from 'src/app/Service/IconSetConfiguration/icon-set-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: IconSetConfigurationService,\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.fixActivityMarkersForEachSentence(\n result,\n this.replayService.getCurrentSentenceNumber(),\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.getCurrentSentenceNumber() <\n this.replayService.getMaxSentenceNumber()\n ) {\n this.replayService.nextSentence();\n try {\n const result = await this.modeler.saveSVG({});\n this.fixActivityMarkersForEachSentence(\n result,\n this.replayService.getCurrentSentenceNumber(),\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 + 10,\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 } = createTitleAndDescriptionSVGElement(\n title,\n description,\n xLeft,\n yUp,\n width,\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 { Injectable } from '@angular/core';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport { Configuration } from 'src/app/Domain/Common/configuration';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { IconSetConfiguration } from 'src/app/Domain/Common/iconSetConfiguration';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport {\n defaultConf,\n IconConfiguration,\n} from 'src/app/Domain/Common/iconConfiguration';\nimport {\n allIcons,\n appendedIcons,\n} from 'src/app/Domain/Icon-Set-Configuration/allIcons';\nimport { getNameFromType } from '../../Utils/naming';\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?: IconSetConfiguration;\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 elementType: elementTypes,\n ) {\n dictionary.clear();\n for (const key of keys) {\n dictionary.add(allTypes.get(key), key);\n }\n\n dictionary.keysArray().forEach((name) => {\n this.registerIconForBPMN(\n name,\n ICON_PREFIX + sanitizeIconName(name.toLowerCase()),\n elementType,\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(getNameFromType(element.type))) {\n allIn = false;\n }\n });\n } else {\n return false;\n }\n return allIn;\n }\n\n /** Load Icons from Configuration **/\n addIconsFromIconSetConfiguration(\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((name) => {\n if (!collection.has(name)) {\n const src = allTypes.get(name);\n if (src) {\n this.registerIconForType(dictionaryType, name, src);\n this.registerIconForBPMN(\n name,\n sanitizeIconName(ICON_PREFIX + name.toLowerCase()),\n dictionaryType,\n );\n }\n }\n });\n }\n\n /** Add Icon(s) to Dictionary **/\n registerIconForBPMN(\n name: string,\n src: string,\n elementType: elementTypes,\n ): void {\n if (name.includes(elementType)) {\n throw new Error('Should not include elementType');\n }\n\n this.iconDictionaryForBPMN.set(`${elementType}${name}`, src);\n }\n\n addIconsToTypeDictionary(\n actorIcons: BusinessObject[],\n workObjectIcons: BusinessObject[],\n ) {\n if (!this.allInTypeDictionary(elementTypes.ACTOR, actorIcons)) {\n this.addIconsFromIconSetConfiguration(\n elementTypes.ACTOR,\n actorIcons.map((element) => getNameFromType(element.type)),\n );\n }\n if (!this.allInTypeDictionary(elementTypes.WORKOBJECT, workObjectIcons)) {\n this.addIconsFromIconSetConfiguration(\n elementTypes.WORKOBJECT,\n workObjectIcons.map((element) => getNameFromType(element.type)),\n );\n }\n }\n\n registerIconForType(type: elementTypes, name: string, src: string): void {\n if (name.includes(type)) {\n throw new Error('Name should not include type!');\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.add(src, name);\n }\n\n unregisterIconForType(type: elementTypes, name: string): void {\n if (name.includes(type)) {\n throw new Error('Name should not include type!');\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.delete(name);\n }\n\n updateIconRegistries(\n actors: BusinessObject[],\n workObjects: BusinessObject[],\n config: IconSetConfiguration,\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.set(key, config.actors.get(key));\n });\n config.workObjects.keysArray().forEach((key) => {\n workObjectsDict.set(key, config.workObjects.get(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 let elementType;\n if (element.type.includes(elementTypes.ACTOR)) {\n elementType = elementTypes.ACTOR;\n } else {\n elementType = elementTypes.WORKOBJECT;\n }\n this.registerIconForBPMN(\n ICON_PREFIX + name.toLowerCase(),\n getNameFromType(element.type),\n elementType,\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 return this.actorIconDictionary.get(name);\n } else if (type === elementTypes.WORKOBJECT) {\n return this.workObjectDictionary.get(name);\n }\n return null;\n }\n\n getIconForBPMN(elementType: elementTypes, name: string): string | null {\n return this.iconDictionaryForBPMN.get(`${elementType}${name}`);\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 setCustomConfiguration(customConfiguration: IconSetConfiguration): void {\n this.customConfiguration = customConfiguration;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { IconDictionaryService } from 'src/app/Service/IconSetConfiguration/icon-dictionary.service';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport {\n CustomIconSetConfiguration,\n IconSetConfiguration,\n IconSetConfigurationForExport,\n} from 'src/app/Domain/Common/iconSetConfiguration';\nimport { defaultConf } from '../../Domain/Common/iconConfiguration';\nimport { TitleService } from '../Title/title.service';\nimport { INITIAL_ICON_SET_NAME } from '../../Domain/Common/constants';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconSetConfigurationService {\n constructor(\n private iconDictionaryService: IconDictionaryService,\n private elementRegistryService: ElementRegistryService,\n private titleService: TitleService,\n ) {}\n\n setIconSetName(iconSetName: string): void {\n this.titleService.setIconSetName(\n iconSetName ? iconSetName : INITIAL_ICON_SET_NAME,\n );\n }\n\n exportConfiguration(): void {\n const iconSetConfiguration = this.getCurrentConfigurationForExport();\n if (!iconSetConfiguration) {\n return;\n }\n\n const configJSONString = JSON.stringify(iconSetConfiguration, null, 2);\n const filename = this.titleService.getIconSetName();\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 + '.iconset');\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: IconSetConfiguration,\n updateIconSetName = 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.addIconsFromIconSetConfiguration(\n elementTypes.ACTOR,\n actorKeys.map((a) => elementTypes.ACTOR + a),\n );\n this.iconDictionaryService.addIconsFromIconSetConfiguration(\n elementTypes.WORKOBJECT,\n workObjectKeys.map((w) => elementTypes.WORKOBJECT + w),\n );\n\n if (updateIconSetName) {\n const configurationName = customConfig.name;\n this.setIconSetName(configurationName);\n }\n }\n\n getCurrentConfiguration(): IconSetConfiguration | undefined {\n const actors = this.iconDictionaryService.getActorsDictionary();\n const workObjects = this.iconDictionaryService.getWorkObjectsDictionary();\n\n let iconSetConfiguration;\n\n if (actors.size() > 0 && workObjects.size() > 0) {\n iconSetConfiguration = this.createConfigFromDictionaries(\n actors,\n workObjects,\n );\n }\n return iconSetConfiguration;\n }\n\n getCurrentConfigurationForExport():\n | IconSetConfigurationForExport\n | 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(): CustomIconSetConfiguration {\n return {\n name: this.titleService.getIconSetName() || INITIAL_ICON_SET_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(): IconSetConfiguration {\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 ): IconSetConfiguration {\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.getIconSetName(),\n actors: newActors,\n workObjects: newWorkobjects,\n };\n }\n\n private createConfigFromCanvas(): IconSetConfiguration {\n const config = {\n name: INITIAL_ICON_SET_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 { MatSnackBar } from '@angular/material/snack-bar';\nimport { BehaviorSubject } from 'rxjs';\nimport { UsedIconList } from 'src/app/Domain/Icon-Set-Configuration/UsedIconList';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n SNACKBAR_SUCCESS,\n} from '../../Domain/Common/constants';\nimport { Dictionary } from '../../Domain/Common/dictionary/dictionary';\nimport {\n CustomIconSetConfiguration,\n IconSetConfiguration,\n} from '../../Domain/Common/iconSetConfiguration';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { IconListItem } from '../../Domain/Icon-Set-Configuration/iconListItem';\nimport { getNameFromType } from '../../Utils/naming';\nimport { StorageService } from '../BrowserStorage/storage.service';\nimport { ImportDomainStoryService } from '../Import/import-domain-story.service';\nimport { TitleService } from '../Title/title.service';\nimport { IconSetConfigurationService } from './icon-set-configuration.service';\nimport { IconDictionaryService } from './icon-dictionary.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconSetCustomizationService {\n private readonly iconSetConfigurationTypes: BehaviorSubject;\n\n private allIconListItems = new Dictionary();\n\n private configurationHasChanged = false;\n\n selectedActors$ = new BehaviorSubject([]);\n selectedWorkobjects$ = new BehaviorSubject([]);\n private changedIconSetConfiguration: IconSetConfiguration | undefined;\n\n constructor(\n private configurationService: IconSetConfigurationService,\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.iconSetConfigurationTypes = new BehaviorSubject(\n this.configurationService.getCurrentConfigurationNamesWithoutPrefix(),\n );\n\n this.selectedWorkobjects$.next(\n this.iconSetConfigurationTypes.value.workObjects,\n );\n this.selectedActors$.next(this.iconSetConfigurationTypes.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 storedIconSetConfiguration =\n this.storageService.getStoredIconSetConfiguration();\n if (storedIconSetConfiguration) {\n this.importConfiguration(storedIconSetConfiguration, false);\n }\n const importedConfiguration = this.importService.getImportedConfiguration();\n if (importedConfiguration) {\n this.importConfiguration(importedConfiguration, false);\n }\n }\n\n importConfiguration(\n customConfig: IconSetConfiguration,\n saveIconSet = 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 (saveIconSet) {\n this.saveIconSet(this.elementRegistryService.getUsedIcons(), true);\n }\n }\n\n /** Getter & Setter **/\n getIconSetConfiguration(): BehaviorSubject {\n return this.iconSetConfigurationTypes;\n }\n\n getIconForName(iconName: string): BehaviorSubject {\n return this.allIconListItems.get(iconName);\n }\n\n isIconActor(iconName: string): boolean {\n return (\n this.iconSetConfigurationTypes.value.actors.filter(\n (actor: string) => actor === iconName,\n ).length > 0\n );\n }\n\n isIconWorkObject(iconName: string): boolean {\n return (\n this.iconSetConfigurationTypes.value.workObjects.filter(\n (workObject: string) => workObject === iconName,\n ).length > 0\n );\n }\n\n changeName(iconSetName: string): void {\n this.titleService.setIconSetName(iconSetName);\n const changedIconSet = this.iconSetConfigurationTypes.value;\n changedIconSet.name = iconSetName;\n this.iconSetConfigurationTypes.next(changedIconSet);\n }\n\n /** Selected 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 } else {\n this.deselectActor(actor);\n this.updateIcon(false, false, 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 } else {\n this.deselectWorkobject(workobject);\n this.updateIcon(false, false, workobject);\n }\n }\n\n selectActor(actor: string): void {\n const value = this.iconSetConfigurationTypes.value;\n if (!value.actors.includes(actor)) {\n value.actors.push(actor);\n this.iconSetConfigurationTypes.next(value);\n this.updateActorSubject();\n }\n }\n\n selectWorkObject(workObject: string): void {\n const value = this.iconSetConfigurationTypes.value;\n if (!value.workObjects.includes(workObject)) {\n value.workObjects.push(workObject);\n this.iconSetConfigurationTypes.next(value);\n this.updateWorkObjectSubject();\n }\n }\n\n deselectActor(actor: string): void {\n if (this.iconSetConfigurationTypes) {\n this.iconSetConfigurationTypes.next({\n name: this.iconSetConfigurationTypes.value.name,\n actors: this.iconSetConfigurationTypes.value.actors.filter(\n (a: string) => !a.includes(actor),\n ),\n workObjects: this.iconSetConfigurationTypes.value.workObjects,\n });\n }\n this.updateActorSubject();\n }\n\n deselectWorkobject(workobject: string): void {\n if (this.iconSetConfigurationTypes) {\n this.iconSetConfigurationTypes.next({\n name: this.iconSetConfigurationTypes.value.name,\n actors: this.iconSetConfigurationTypes.value.actors,\n workObjects: this.iconSetConfigurationTypes.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.iconSetConfigurationTypes.value;\n value.workObjects = sortedList;\n this.iconSetConfigurationTypes.next(value);\n this.updateWorkObjectSubject();\n }\n\n setSelectedActors(sortedList: string[]): void {\n const value = this.iconSetConfigurationTypes.value;\n value.actors = sortedList;\n this.iconSetConfigurationTypes.next(value);\n this.updateActorSubject();\n }\n\n private updateActorSubject(): void {\n this.selectedActors$.next(this.iconSetConfigurationTypes.value.actors);\n this.configurationHasChanged = true;\n }\n\n private updateWorkObjectSubject(): void {\n this.selectedWorkobjects$.next(\n this.iconSetConfigurationTypes.value.workObjects,\n );\n this.configurationHasChanged = true;\n }\n\n /** Revert Icon Set **/\n resetIconSet(): 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.iconSetConfigurationTypes.next({\n name: defaultConfig.name,\n actors: defaultConfig.actors.keysArray(),\n workObjects: defaultConfig.workObjects.keysArray(),\n } as CustomIconSetConfiguration);\n\n this.updateAllIconBehaviourSubjects();\n }\n\n cancel(): void {\n this.iconSetConfigurationTypes.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 Icon Set **/\n saveIconSet(usedIcons: UsedIconList, imported = false): void {\n const changedActors: string[] = [];\n const changedWorkobjects: string[] = [];\n if (this.configurationHasChanged) {\n const changedIconSet = this.createIconSetConfiguration();\n\n const configurationActors = changedIconSet.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 = changedIconSet.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.changedIconSetConfiguration = changedIconSet;\n\n this.updateIcons(changedIconSet);\n\n this.storageService.setStoredIconSetConfiguration(\n this.changedIconSetConfiguration,\n );\n this.snackbar.open(\n imported\n ? 'Configuration imported successfully'\n : 'Configuration saved successfully',\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 exportIconSet(): void {\n this.configurationService.exportConfiguration();\n }\n\n getAndClearSavedConfiguration(): IconSetConfiguration | undefined {\n const temp = this.changedIconSetConfiguration;\n this.changedIconSetConfiguration = undefined;\n\n return temp;\n }\n\n private createIconSetConfiguration(): IconSetConfiguration {\n const actors = new Dictionary();\n const workObjects = new Dictionary();\n\n this.iconSetConfigurationTypes.value.actors.forEach((name: string) => {\n actors.add(this.iconDictionaryService.getIconSource(name), name);\n });\n this.iconSetConfigurationTypes.value.workObjects.forEach((name: string) => {\n workObjects.add(this.iconDictionaryService.getIconSource(name), name);\n });\n\n return {\n name: this.iconSetConfigurationTypes.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 customIconSetConfiguration = this.iconSetConfigurationTypes.value;\n this.allIconListItems.keysArray().forEach((iconName) => {\n if (customIconSetConfiguration.actors.includes(iconName)) {\n this.updateIcon(true, false, iconName);\n } else if (customIconSetConfiguration.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 // TODO: td: This returns empty every time!\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(changedIconSet: IconSetConfiguration) {\n this.allIconListItems\n .keysArray()\n .forEach((item) => this.setAsUnassigned(item, this.isIconActor(item)));\n changedIconSet.actors.keysArray().forEach((actor) => {\n this.iconDictionaryService.registerIconForType(\n elementTypes.ACTOR,\n actor,\n this.iconDictionaryService.getFullDictionary().get(actor),\n );\n this.iconDictionaryService.unregisterIconForType(\n elementTypes.WORKOBJECT,\n actor,\n );\n this.setAsActor(true, actor);\n });\n changedIconSet.workObjects.keysArray().forEach((workObject) => {\n this.iconDictionaryService.registerIconForType(\n elementTypes.WORKOBJECT,\n workObject,\n this.iconDictionaryService.getFullDictionary().get(workObject),\n );\n this.iconDictionaryService.unregisterIconForType(\n elementTypes.ACTOR,\n workObject,\n );\n this.setAsWorkobject(true, workObject);\n });\n }\n}\n","import { EventEmitter, Injectable, OnDestroy } from '@angular/core';\nimport { IconDictionaryService } from 'src/app/Service/IconSetConfiguration/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 IconSetConfiguration,\n fromConfigurationFromFile,\n} from 'src/app/Domain/Common/iconSetConfiguration';\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 { IconSetConfigurationService } from '../IconSetConfiguration/icon-set-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: IconSetConfiguration | 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 iconSetConfigurationService: IconSetConfigurationService,\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(): IconSetConfiguration {\n const config: IconSetConfiguration = {\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: IconSetConfiguration;\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.iconSetConfigurationService.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 this.title,\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(iconSetConfiguration: IconSetConfiguration): boolean {\n const newActorKeys = iconSetConfiguration.actors.keysArray();\n const newWorkObjectKeys = iconSetConfiguration.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: IconSetConfiguration,\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: IconSetConfiguration) {\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 '../IconSetConfiguration/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 '../IconSetConfiguration/icon-dictionary.service';\nimport { ElementRegistryService } from '../ElementRegistry/element-registry.service';\nimport { IconSetConfigurationService } from '../IconSetConfiguration/icon-set-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: IconSetConfigurationService,\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 IconSetConfigurationService 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) =>\n 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 { IconSetConfiguration } from 'src/app/Domain/Common/iconSetConfiguration';\nimport { InitializerService } from './initializer.service';\nimport { ElementRegistryService } from '../ElementRegistry/element-registry.service';\nimport { IconDictionaryService } from '../IconSetConfiguration/icon-dictionary.service';\nimport { IconSetConfigurationService } from '../IconSetConfiguration/icon-set-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 iconSetConfigurationService: IconSetConfigurationService,\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 storedIconSetConfiguration =\n this.storageService.getStoredIconSetConfiguration();\n if (storedIconSetConfiguration) {\n this.iconDictionaryService.setCustomConfiguration(\n storedIconSetConfiguration,\n );\n this.iconSetConfigurationService.loadConfiguration(\n storedIconSetConfiguration,\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 iconSetConfiguration?: IconSetConfiguration,\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 (!iconSetConfiguration) {\n iconSetConfiguration =\n this.storageService.getStoredIconSetConfiguration();\n }\n if (iconSetConfiguration) {\n this.storageService.setStoredIconSetConfiguration(iconSetConfiguration);\n this.iconDictionaryService.setCustomConfiguration(iconSetConfiguration);\n this.iconSetConfigurationService.loadConfiguration(iconSetConfiguration);\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 { IconSetConfiguration } from 'src/app/Domain/Common/iconSetConfiguration';\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?: IconSetConfiguration,\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 { StorySentence } from 'src/app/Domain/Replay/storySentence';\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: StorySentence[] = [];\n private currentSentence = new BehaviorSubject(-1);\n private maxSentenceNumber = new BehaviorSubject(0);\n\n currentSentence$ = this.currentSentence.asObservable();\n maxSentenceNumber$ = this.maxSentenceNumber.asObservable();\n\n constructor(\n private replayStateService: ReplayStateService,\n private domManipulationService: DomManipulationService,\n private storyCreatorService: StoryCreatorService,\n private snackbar: MatSnackBar,\n ) {}\n\n isReplayable(): boolean {\n return this.storyCreatorService.traceActivitiesAndCreateStory().length > 0;\n }\n\n initializeReplay(): void {\n this.currentSentence.next(1);\n this.story = this.storyCreatorService.traceActivitiesAndCreateStory();\n this.maxSentenceNumber.next(this.story.length);\n }\n\n getCurrentSentenceNumber(): number {\n return this.currentSentence.value;\n }\n\n getMaxSentenceNumber(): number {\n return this.maxSentenceNumber.value;\n }\n\n nextSentence(): void {\n if (this.currentSentence.value < this.story.length) {\n this.currentSentence.next(this.currentSentence.value + 1);\n this.showCurrentSentence();\n }\n }\n\n previousSentence(): void {\n if (this.currentSentence.value > 1) {\n this.currentSentence.next(this.currentSentence.value - 1);\n this.showCurrentSentence();\n }\n }\n\n private showCurrentSentence() {\n this.domManipulationService.showSentence(\n this.story[this.currentSentence.value - 1],\n this.currentSentence.value > 1\n ? this.story[this.currentSentence.value - 2]\n : undefined,\n );\n }\n\n startReplay(): void {\n this.initializeReplay();\n if (this.story?.length) {\n const missingSentences = this.storyCreatorService.getMissingSentences(\n this.story,\n );\n if (missingSentences.length === 0) {\n this.replayStateService.setReplayState(true);\n this.domManipulationService.showSentence(\n this.story[this.currentSentence.getValue() - 1],\n );\n } else {\n const sentence = missingSentences.join(', ');\n this.snackbar.open(\n missingSentences.length === 1\n ? `The Domain Story is not complete. Sentence ${sentence} is missing.`\n : `The Domain Story is not complete. Sentences ${sentence} 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.currentSentence.next(-1);\n this.maxSentenceNumber.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 { StorySentence } from '../../../Domain/Replay/storySentence';\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(): StorySentence[] {\n const tracedActivityMap = new Dictionary();\n const story: StorySentence[] = [];\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 (\n let i = 0;\n i <= Math.max(...tracedActivityMap.keysArray().map((it) => Number(it)));\n i++\n ) {\n this.createSentence(tracedActivityMap, i, story);\n }\n this.addGroupsToLastSentence(story);\n return story;\n }\n\n private createSentence(\n tracedActivityMap: Dictionary,\n i: number,\n story: StorySentence[],\n ): void {\n const sentenceObjects = this.getSentenceObjects(\n tracedActivityMap.get(`${i}`) || [],\n );\n const highlightedElements = sentenceObjects.map((t) => t.id);\n if (i > 0) {\n story[i - 1].objects.forEach((object) => {\n if (!sentenceObjects.includes(object)) {\n sentenceObjects.push(object);\n }\n });\n }\n story[i] = {\n highlightedObjects: highlightedElements,\n objects: sentenceObjects,\n };\n }\n\n getMissingSentences(story: StorySentence[]): number[] {\n if (!story || story.length === 0) {\n return [];\n }\n\n const missingSentences: number[] = [];\n for (let i = 0; i < story.length; i++) {\n if (\n !story[i] ||\n story[i].objects.length <= 0 ||\n story[i].highlightedObjects.length === 0 ||\n story[i].objects.filter(\n (element) => element.type === elementTypes.ACTIVITY,\n ).length <= 0\n ) {\n missingSentences.push(i + 1);\n }\n }\n return missingSentences;\n }\n\n private getSentenceObjects(\n tracedActivity: ActivityCanvasObject[],\n ): BusinessObject[] {\n const initialSource: CanvasObject[] = [];\n const activities = tracedActivity;\n const targetObjects: CanvasObject[] = [];\n\n tracedActivity.forEach((parallelSentence: ActivityCanvasObject) => {\n initialSource.push(parallelSentence.source);\n\n const firstTarget = parallelSentence.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 private addGroupsToLastSentence(story: StorySentence[]): void {\n const groups = this.elementRegistryService.getAllGroups() as CanvasObject[];\n if (groups.length > 0) {\n story[story.length - 1].objects = story[story.length - 1].objects.concat(\n groups.map((g) => g.businessObject),\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 { environment } from '../../../environments/environment';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_ICON_SET_NAME,\n INITIAL_TITLE,\n} from '../../Domain/Common/constants';\nimport { CommandStackService } from '../CommandStack/command-stack.service';\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 iconSetNameSubject = new BehaviorSubject(\n INITIAL_ICON_SET_NAME,\n );\n private showDescriptionSubject = new BehaviorSubject(true);\n\n title$ = this.titleSubject.asObservable();\n description$ = this.descriptionSubject.asObservable();\n showDescription$ = this.showDescriptionSubject.asObservable();\n iconSetName$ = this.iconSetNameSubject.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(inputTitle: string | null): void {\n const title =\n !inputTitle || inputTitle.trim().length === 0\n ? INITIAL_TITLE\n : inputTitle;\n\n this.titleSubject.next(title);\n document.title = title === INITIAL_TITLE ? 'egon.io' : title;\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 setIconSetName(name: string): void {\n this.iconSetNameSubject.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 getIconSetName(): string {\n return this.iconSetNameSubject.value;\n }\n\n getVersion(): string {\n return environment.version;\n }\n\n hasTitleOrDescription(): boolean {\n return (\n (this.getTitle().trim().length > 0 &&\n this.getTitle() !== INITIAL_TITLE) ||\n (this.getDescription().trim().length > 0 &&\n this.getDescription() !== INITIAL_DESCRIPTION)\n );\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\n// TODO: td: This can cause a lot of errors\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 replayStateService: ReplayStateService,\n replayService: ReplayService,\n ) {\n this.showSettings$ = new BehaviorSubject(false);\n this.showDescription$ = new BehaviorSubject(true);\n\n document.addEventListener('keydown', (e: KeyboardEvent) => {\n if (e.ctrlKey && e.key === 's') {\n e.preventDefault();\n e.stopPropagation();\n if (this.exportService.isDomainStoryExportable()) {\n this.exportService.downloadDST();\n }\n }\n if (e.ctrlKey && e.key === 'l') {\n e.preventDefault();\n e.stopPropagation();\n document.getElementById('import')?.click();\n }\n if (\n (e.key === 'ArrowRight' || e.key === 'ArrowUp') &&\n this.replayStateService.getReplayOn()\n ) {\n e.preventDefault();\n e.stopPropagation();\n replayService.nextSentence();\n }\n if (\n (e.key === 'ArrowLeft' || e.key === 'ArrowDown') &&\n this.replayStateService.getReplayOn()\n ) {\n e.preventDefault();\n e.stopPropagation();\n replayService.previousSentence();\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 \n \"WPS\n WPS\n \n\n \n Privacy\n \n\n \n Imprint\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 { IconSetConfigurationService } from 'src/app/Service/IconSetConfiguration/icon-set-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/IconSetConfiguration/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 IconSetConfigurationService,\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 --configuration production` 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: '2.0.0-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","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","getNameFromType","RENDERER_IDS","numbers","DEFAULT_COLOR","initializeRenderer","elementRegistryService","DomainStoryRenderer","styles","textRenderer","pathMap","rendererId","next","markers","computeStyle","generateActivityNumber","parentGfx","box","numberStash","semantic","use","number","renderNumber","backgroundDotStyle","backgroundBoxStyle","newRenderedNumber","numberStyle","fitBox","style","getExternalStyle","fill","fontSize","fontFamily","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","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","r","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","fixedOffsetX","fixedOffsetY","angleDependantOffsetX","angleDependantOffsetY","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_ICON_SET_NAME","ICON_SET_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","IconConfiguration","allIconDictionary","domainName","getDefaultConf","defaultConf","updateAllIconRegistry","appendSRCFile","actorsDict","workObjectsDict","newAppendedIcons","appen","createCustomConf","iconSetConfiguration","allIconsConf","structuredClone","testCustomIconSetConfiguration","fromConfigurationFromFile","configFromFile","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","ConfigAndDST","domain","dst","testConfigAndDst","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","CommonModule","AutosaveSettingsComponent","AutosaveOptionsComponent","AutosavedDraftsComponent","FormsModule","MaterialModule","AutosaveSettingsModule","_","_2","_3","declarations","imports","exports","HeaderButtonsComponent","DomainStoryModelerModuleModule","IconSetConfigurationComponent","IconListItemComponent","DetailsListItemComponent","IconSetDetailsComponent","GeneralSettingsComponent","LabelDictionaryComponent","SettingsModule","i0","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵelement","ɵɵlistener","AutosaveOptionsComponent_mat_card_0_Template_button_click_20_listener","ɵɵrestoreView","_r1","activated_r2","ɵɵreference","interval_r3","drafts_r4","ctx_r4","ɵɵnextContext","ɵɵresetView","save","checked","ɵɵadvance","ɵɵproperty","configuration_r6","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","draft_r3","_r2","$implicit","ctx_r3","loadDraft","ɵɵtextInterpolate","date","AutosavedDraftsComponent_div_7_div_1_Template","AutosavedDraftsComponent_div_7_Template_button_click_4_listener","removeAllDrafts","drafts","autosaveService","subscription","autosavedDraftsChanged$","subscribe","initDrafts","ngOnInit","loadCurrentDrafts","draft","AutosaveService","AutosavedDraftsComponent_Template","AutosavedDraftsComponent_div_7_Template","AutosavedDraftsComponent_ng_template_8_Template","ɵɵtemplateRefExtractor","ɵɵtextInterpolate2","noDrafts_r5","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_r2","doOption","option_r4","ɵɵ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","ctx_r0","ɵɵpropertyInterpolate","ɵɵ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","iconName","iconSetCustomizationService","isWorkobject","isNone","getIconForName","toggleNone","setAsUnassigned","toggleActor","setAsActor","toggleWorkobject","setAsWorkobject","IconSetCustomizationService","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","ɵɵclassProp","sanitizeIconName","iconName_r1","ICON_FILTER_NONE","selectedActors","selectedWorkobjects","allIconNames","allFilteredIconNames","iconSetConfigurationTypes","getIconSetConfiguration","getFullDictionary","selectedActors$","selectedWorkobjects$","allFiltered","getFilteredNamesForType","loadMinimalIconConfigurationWithDefaultIcons","resetIconSet","loadInitialConfiguration","saveIconSet","getUsedIcons","exportIconSet","startIconUpload","importIcon","files","iconInputFile","reader","FileReader","onloadend","addIMGToIconDictionary","registerIconForBPMN","addNewIcon","readAsDataURL","startIconSetImport","importIconSet","iconSetInputFile","loadConfiguration","importConfiguration","readAsText","filterForActors","ICON_FILTER_ACTOR","filterForWorkobjects","ICON_FILTER_WORKOBJECT","filterForUnassigned","ICON_FILTER_UNASSIGNED","filterByNameAndType","filteredByNameAndType","isIconActor","isIconWorkObject","IconSetConfigurationService","IconDictionaryService","i4","ElementRegistryService","IconSetConfigurationComponent_Template","IconSetConfigurationComponent_Template_button_click_6_listener","IconSetConfigurationComponent_Template_button_click_10_listener","IconSetConfigurationComponent_Template_button_click_14_listener","IconSetConfigurationComponent_Template_input_input_18_listener","IconSetConfigurationComponent_Template_button_click_20_listener","IconSetConfigurationComponent_Template_input_change_23_listener","IconSetConfigurationComponent_Template_button_click_24_listener","IconSetConfigurationComponent_Template_button_click_27_listener","IconSetConfigurationComponent_Template_button_click_31_listener","IconSetConfigurationComponent_Template_button_click_35_listener","IconSetConfigurationComponent_Template_input_change_38_listener","IconSetConfigurationComponent_Template_button_click_39_listener","IconSetConfigurationComponent_mat_grid_tile_46_Template","IconSetDetailsComponent_mat_list_item_12_Template_mat_list_item_dragover_0_listener","ctx_r1","allowDrop","IconSetDetailsComponent_mat_list_item_12_Template_mat_list_item_dragstart_0_listener","i_r3","onDragStart","IconSetDetailsComponent_mat_list_item_12_Template_mat_list_item_drop_0_listener","iconName_r5","onDrop","IconSetDetailsComponent_mat_list_item_18_Template_mat_list_item_dragover_0_listener","_r6","IconSetDetailsComponent_mat_list_item_18_Template_mat_list_item_dragstart_0_listener","i_r7","IconSetDetailsComponent_mat_list_item_18_Template_mat_list_item_drop_0_listener","ctx_r7","iconName_r9","customizationService","draggedList","draggedIndex","iconSetName","iconSetName$","changeName","listName","list","sortedList","setSelectedActors","setSelectedWorkObject","IconSetDetailsComponent_Template","IconSetDetailsComponent_Template_input_input_6_listener","IconSetDetailsComponent_mat_list_item_12_Template","IconSetDetailsComponent_mat_list_item_18_Template","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","openLabelDictionary","HeaderButtonsComponent_div_0_Template_button_click_16_listener","openSettings","HeaderButtonsComponent_div_0_Template_button_click_19_listener","openKeyboardShortcutsDialog","HeaderButtonsComponent_div_0_Template_button_click_22_listener","createNewDomainStory","replayService","isReplayable","isExportable","isDirty$","exportService","isDomainStoryExportable","HeaderButtonsComponent_div_2_Template_button_click_1_listener","_r3","previousSentence","HeaderButtonsComponent_div_2_Template_button_click_4_listener","nextSentence","HeaderButtonsComponent_div_2_Template_button_click_7_listener","stopReplay","settingsService","replayStateService","dialogService","importService","renderService","isReplay$","replayOn$","dirty$","filename","endsWith","importDST","importEGN","commandStackChanged","SVGDownloadOption","downloadSVG","EGNDownloadOption","downloadDST","PNGDownloadOption","downloadPNG","HTMLDownloadOption","downloadHTMLPresentation","disableClose","autoFocus","openDialog","shortCutText","reset","makeClean","hasTitleOrDescription","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","sentenceDescription$","description$","HeaderComponent","title$","showDescription$","currentSentence$","maxSentenceNumber$","pipe","sentence","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","_r4","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","showIconSetCustomization","savedConfiguration","getAndClearSavedConfiguration","restart","openGeneralSettings","openIconSetCustomization","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_icon_set_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","getStoredIconSetConfiguration","iconSetString","configurationFromFile","setStoredIconSetConfiguration","configForStorage","CommandStackService","setCommandStack","payload","matDialog","dialog","MatDialog","isDirtySubject","dirty","DomManipulationService","showAll","removeHighlights","getAllCanvasObjects","getAllGroups","domObject","display","showSentence","replaySentence","notShown","getAllNotShown","highlightSentence","o","getNumberDomForActivity","numberDOMS","numberBackgroundDom","numberTextDom","allActivities","getAllActivities","allConnections","getAllConnections","activityDomObject","connectionDomObject","sentenceObjects","shownElements","notShownElements","allObjects","fullyInitialized","registry","__implicitroot","setElementRegistry","_elements","createObjectListForDSTDownload","allObjectsFromCanvas","objectList","fillListOfCanvasObjects","canvasElement","groupObjects","checkChildForGroup","currentGroup","registryElementNames","getAllActors","workobjects","getAllWorkobjects","co","sanitizeForDesktop","formatDate","environment","pngService","svgService","htmlPresentationService","titleSubscription","descriptionSubscription","ngOnDestroy","unsubscribe","DomainStory","getCurrentConfigurationForExport","getStoryForDownload","getCurrentDateString","downloadFile","datatype","fileEnding","encodeURIComponent","body","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","fixActivityMarkersForEachSentence","getCurrentSentenceNumber","content","transition","err","alert","getMaxSentenceNumber","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","join","layerResizers","layerOverlays","removeAttribute","XMLSerializer","serializeToString","cacheData","getEncoded","findIndexToInsertData","svgIndex","backgroundColorWhite","appendDST","ICON_PREFIX","actorIconDictionary","workObjectDictionary","iconDictionaryForBPMN","iconConfig","allTypes","initDictionary","dictionary","customConfiguration","allInTypeDictionary","collection","allIn","addIconsFromIconSetConfiguration","dictionaryType","iconTypes","registerIconForType","addIconsToTypeDictionary","unregisterIconForType","extractCustomIconsFromDictionary","addNewIconsToDictionary","elementDictionary","sanitizedName","custom","addIconsToCss","fullDictionary","appendedDict","getTypeDictionaryKeys","getIconSource","elementOfType","getAllIconDictionary","getActorsDictionary","getWorkObjectsDictionary","getIconConfiguration","setCustomConfiguration","setIconSetName","exportConfiguration","configJSONString","getIconSetName","customConfig","updateIconSetName","actorDict","workObjectDict","actorKeys","workObjectKeys","configurationName","getCurrentConfiguration","createConfigFromDictionaries","currentConfiguration","getCurrentConfigurationNamesWithoutPrefix","createMinimalConfigurationWithDefaultIcons","minimalConfig","createConfigFromCanvas","actorNames","workobjectNames","newActors","newWorkobjects","allCanvasObjects","allIconListItems","configurationHasChanged","addIconToAllIconList","importedConfigurationEvent","storedIconSetConfiguration","importedConfiguration","getImportedConfiguration","selectedActorNames","selectActor","selectedWorkobjectNames","selectWorkObject","changedIconSet","deselectActor","deselectWorkobject","updateIcon","updateActorSubject","updateWorkObjectSubject","defaultConfig","workObjectName","actorName","updateAllIconBehaviourSubjects","resetToInitialConfiguration","usedIcons","imported","changedActors","changedWorkobjects","createIconSetConfiguration","configurationActors","configurationWorkobjects","changedIconSetConfiguration","updateIcons","temp","iconDict","getSrcForIcon","iconBehaviourSubject","customIconSetConfiguration","rawSrc","restoreTitleFromFileName","importRepairService","iconSetConfigurationService","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","currentSentence","maxSentenceNumber","traceActivitiesAndCreateStory","initializeReplay","showCurrentSentence","missingSentences","getMissingSentences","getValue","StoryCreatorService","tracedActivityMap","tracedItem","it","createSentence","addGroupsToLastSentence","getSentenceObjects","highlightedElements","highlightedObjects","tracedActivity","initialSource","targetObjects","parallelSentence","firstTarget","checkTarget","activityTarget","g","showSettings","showSettings$","titleSubject","descriptionSubject","iconSetNameSubject","showDescriptionSubject","allowUndo","fireTitleAndDescriptionUpdate","updateTitle","updateDescription","inputTitle","getVersion","degrees","radians","PI","quadrant","adjacent","opposite","atan2","Point","reg","domainStoryRegex","svgRegex","egnSuffix","dstSuffix","svgSuffix","filenameWithoutDateSuffix","AppComponent","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