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

Edit Activity

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

{{ title }}

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

{{ title }}

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

Label Dictionary

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

Icon Set name

\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n

Order of actors

\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n

Order of work objects

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

Workobjects

\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n

Activities

\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n library_books\r\n update Dictionaries\r\n \r\n
\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-general-settings',\r\n templateUrl: './general-settings.component.html',\r\n styleUrls: ['./general-settings.component.scss'],\r\n})\r\nexport class GeneralSettingsComponent {}\r\n","
\r\n \r\n
\r\n","import { Component } from '@angular/core';\r\nimport { SettingsService } from 'src/app/Service/Settings/settings.service';\r\nimport { ModelerService } from 'src/app/Service/Modeler/modeler.service';\r\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\nimport { AutosaveConfigurationService } from '../../Service/Autosave/autosave-configuration.service';\r\nimport { DomainCustomizationService } from '../../Service/DomainConfiguration/domain-customization.service';\r\n\r\n@Component({\r\n selector: 'app-settings',\r\n templateUrl: './settings.component.html',\r\n styleUrls: ['./settings.component.scss'],\r\n})\r\nexport class SettingsComponent {\r\n domainConfiguration: DomainConfiguration | undefined;\r\n showGeneralSettings = new BehaviorSubject(false);\r\n showDomainCustomization = new BehaviorSubject(true);\r\n\r\n constructor(\r\n private settingsService: SettingsService,\r\n private modelerService: ModelerService,\r\n private domainCustomizationService: DomainCustomizationService\r\n ) {}\r\n\r\n close(): void {\r\n const savedConfiguration =\r\n this.domainCustomizationService.getAndClearSavedConfiguration();\r\n if (savedConfiguration) {\r\n this.modelerService.restart(savedConfiguration);\r\n }\r\n this.settingsService.close();\r\n }\r\n\r\n openGeneralSettings() {\r\n this.showGeneralSettings.next(true);\r\n this.showDomainCustomization.next(false);\r\n }\r\n\r\n openDomainCustomization() {\r\n this.showGeneralSettings.next(false);\r\n this.showDomainCustomization.next(true);\r\n }\r\n}\r\n","
\r\n \r\n \r\n \r\n
\r\n \r\n Customize Icons for Your Domain\r\n \r\n \r\n General Settings\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n","import { Injectable } from '@angular/core';\r\nimport { ReplaySubject } from 'rxjs';\r\nimport { StorageService } from '../BrowserStorage/storage.service';\r\nimport { AutosaveConfiguration } from '../../Domain/Autosave/autosave-configuration';\r\nimport {\r\n DEFAULT_AUTOSAVES_AMOUNT,\r\n DEFAULT_AUTOSAVES_INTERVAL,\r\n} from 'src/app/Domain/Common/constants';\r\n\r\nconst AUTOSAVE_CONFIGURATION_TAG = 'autosaveConfiguration';\r\n\r\nconst defaultConfiguration: AutosaveConfiguration = {\r\n activated: false,\r\n interval: DEFAULT_AUTOSAVES_INTERVAL,\r\n amount: DEFAULT_AUTOSAVES_AMOUNT,\r\n};\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AutosaveConfigurationService {\r\n private configuration = defaultConfiguration;\r\n\r\n private readonly configurationSubject =\r\n new ReplaySubject(1);\r\n readonly configuration$ = this.configurationSubject.asObservable();\r\n\r\n constructor(private storageService: StorageService) {\r\n this.initializeConfiguration();\r\n }\r\n\r\n private initializeConfiguration() {\r\n this.loadConfiguration();\r\n this.configurationSubject.next(this.configuration);\r\n }\r\n\r\n setConfiguration(configuration: AutosaveConfiguration): boolean {\r\n try {\r\n this.configuration = configuration;\r\n this.saveConfiguration();\r\n this.configurationSubject.next(configuration);\r\n return true;\r\n } catch {\r\n return false;\r\n }\r\n }\r\n\r\n private loadConfiguration() {\r\n this.configuration =\r\n this.storageService.get(AUTOSAVE_CONFIGURATION_TAG) ??\r\n defaultConfiguration;\r\n }\r\n\r\n private saveConfiguration() {\r\n this.storageService.set(AUTOSAVE_CONFIGURATION_TAG, this.configuration);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { RendererService } from '../Renderer/renderer.service';\r\nimport { ExportService } from '../Export/export.service';\r\nimport { Draft } from '../../Domain/Autosave/draft';\r\nimport { AutosaveConfigurationService } from './autosave-configuration.service';\r\nimport { IconDictionaryService } from '../DomainConfiguration/icon-dictionary.service';\r\nimport { elementTypes } from '../../Domain/Common/elementTypes';\r\nimport { fromConfigurationFromFile } from '../../Domain/Common/domainConfiguration';\r\nimport { StorageService } from '../BrowserStorage/storage.service';\r\nimport { TitleService } from '../Title/title.service';\r\nimport { AutosaveConfiguration } from '../../Domain/Autosave/autosave-configuration';\r\nimport {\r\n SNACKBAR_DURATION,\r\n SNACKBAR_INFO,\r\n} from 'src/app/Domain/Common/constants';\r\nimport { MatSnackBar } from '@angular/material/snack-bar';\r\nimport { Subject } from 'rxjs';\r\n\r\nexport const DRAFTS_TAG = 'autosaveDrafts';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AutosaveService {\r\n private autosaveTimer: any;\r\n autosavedDraftsChanged$ = new Subject();\r\n\r\n constructor(\r\n private autosaveConfiguration: AutosaveConfigurationService,\r\n private exportService: ExportService,\r\n private iconDistionaryService: IconDictionaryService,\r\n private rendererService: RendererService,\r\n private snackbar: MatSnackBar,\r\n private storageService: StorageService,\r\n private titleService: TitleService\r\n ) {\r\n this.autosaveConfiguration.configuration$.subscribe((configuration) =>\r\n this.updateConfiguration(configuration)\r\n );\r\n }\r\n\r\n loadCurrentDrafts(): Draft[] {\r\n const drafts = this.readDrafts();\r\n this.sortDrafts(drafts);\r\n return drafts;\r\n }\r\n\r\n loadDraft(draft: Draft): void {\r\n const configFromFile = draft.configAndDST.domain;\r\n const config = fromConfigurationFromFile(configFromFile);\r\n const story = JSON.parse(draft.configAndDST.dst);\r\n\r\n this.titleService.updateTitleAndDescription(\r\n draft.title,\r\n draft.description,\r\n false\r\n );\r\n\r\n const actorIcons = this.iconDistionaryService.getElementsOfType(\r\n story,\r\n elementTypes.ACTOR\r\n );\r\n const workObjectIcons = this.iconDistionaryService.getElementsOfType(\r\n story,\r\n elementTypes.WORKOBJECT\r\n );\r\n this.iconDistionaryService.updateIconRegistries(\r\n actorIcons,\r\n workObjectIcons,\r\n config\r\n );\r\n this.rendererService.importStory(story, true, config, false);\r\n }\r\n\r\n removeAllDrafts() {\r\n this.storageService.set(DRAFTS_TAG, []);\r\n this.autosavedDraftsChanged$.next();\r\n }\r\n\r\n private updateConfiguration(configuration: AutosaveConfiguration) {\r\n this.stopTimer();\r\n\r\n if (configuration.activated) {\r\n this.startTimer(configuration.interval, configuration.amount);\r\n }\r\n }\r\n\r\n private stopTimer(): void {\r\n if (this.autosaveTimer) {\r\n clearInterval(this.autosaveTimer);\r\n this.autosaveTimer = undefined;\r\n }\r\n }\r\n\r\n private startTimer(interval: number, amount: number): void {\r\n this.autosaveTimer = setInterval(() => {\r\n const drafts = this.loadCurrentDrafts();\r\n const newDraft = this.createDraft();\r\n let isChanged = amount > 0;\r\n if (drafts.length > 0) {\r\n isChanged = isChanged && !this.isSame(newDraft, drafts[0]);\r\n }\r\n if (isChanged) {\r\n drafts.unshift(this.createDraft());\r\n while (drafts.length > amount) {\r\n drafts.pop();\r\n }\r\n this.writeDrafts(drafts);\r\n this.snackbar.open('Draft Saved', undefined, {\r\n panelClass: SNACKBAR_INFO,\r\n duration: SNACKBAR_DURATION,\r\n });\r\n this.autosavedDraftsChanged$.next();\r\n }\r\n }, interval * 60000);\r\n }\r\n\r\n private isSame(a: Draft, b: Draft) {\r\n return (\r\n a.title === b.title &&\r\n a.description === b.description &&\r\n JSON.stringify(a.configAndDST) === JSON.stringify(b.configAndDST)\r\n );\r\n }\r\n\r\n private writeDrafts(drafts: Draft[]) {\r\n this.storageService.set(DRAFTS_TAG, drafts);\r\n }\r\n\r\n private readDrafts(): Draft[] {\r\n return this.storageService.get(DRAFTS_TAG) ?? [];\r\n }\r\n\r\n private createDraft(): Draft {\r\n const dst = JSON.stringify(this.rendererService.getStory(), null, 2);\r\n const configAndDST = this.exportService.createConfigAndDST(dst);\r\n\r\n const date = new Date().toString().slice(0, 25);\r\n\r\n return {\r\n title: this.titleService.getTitle(),\r\n description: this.titleService.getDescription(),\r\n configAndDST,\r\n date,\r\n };\r\n }\r\n\r\n private sortDrafts(drafts: Draft[]): void {\r\n drafts.sort((a: Draft, b: Draft) => {\r\n const aDate = Date.parse(a.date);\r\n const bDate = Date.parse(b.date);\r\n return aDate > bDate ? 0 : 1;\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { DOMAIN_CONFIGURATION_TAG } from '../../Domain/Common/constants';\r\nimport {\r\n DomainConfiguration,\r\n fromConfigurationFromFile,\r\n} from '../../Domain/Common/domainConfiguration';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class StorageService {\r\n set(key: string, value: any) {\r\n localStorage.setItem(key, JSON.stringify(value));\r\n }\r\n\r\n get(key: string): any {\r\n const json = localStorage.getItem(key);\r\n if (json) {\r\n return JSON.parse(json);\r\n }\r\n return null;\r\n }\r\n\r\n removeItem(key: string) {\r\n localStorage.removeItem(key);\r\n }\r\n\r\n checkValidityOfConfiguration(configuratioFromFile: DomainConfiguration) {\r\n return (\r\n configuratioFromFile.actors.keysArray().length > 1 &&\r\n configuratioFromFile.workObjects.keysArray().length > 1 &&\r\n !configuratioFromFile.actors\r\n .all()\r\n .some((e) => typeof e.value !== 'string') &&\r\n !configuratioFromFile.workObjects\r\n .all()\r\n .some((e) => typeof e.value !== 'string')\r\n );\r\n }\r\n\r\n getStoredDomainConfiguration(): DomainConfiguration | undefined {\r\n const domainString = localStorage.getItem(DOMAIN_CONFIGURATION_TAG);\r\n\r\n if (!domainString) {\r\n return;\r\n } else {\r\n const configuratioFromFile = fromConfigurationFromFile(\r\n JSON.parse(domainString)\r\n );\r\n if (this.checkValidityOfConfiguration(configuratioFromFile)) {\r\n return configuratioFromFile;\r\n }\r\n }\r\n return;\r\n }\r\n\r\n setStoredDomainConfiguration(config: DomainConfiguration): void {\r\n const actors: {\r\n [p: string]: any;\r\n } = {};\r\n config.actors.keysArray().forEach((key) => {\r\n actors[key] = config.actors.get(key);\r\n });\r\n const workObjects: {\r\n [p: string]: any;\r\n } = {};\r\n config.workObjects.keysArray().forEach((key) => {\r\n workObjects[key] = config.workObjects.get(key);\r\n });\r\n\r\n const configForStorage = {\r\n name: config.name,\r\n actors: actors,\r\n workObjects: workObjects,\r\n };\r\n\r\n localStorage.setItem(\r\n DOMAIN_CONFIGURATION_TAG,\r\n JSON.stringify(configForStorage, null, 2)\r\n );\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class CommandStackService {\r\n private commandStack: any;\r\n\r\n constructor() {}\r\n\r\n setCommandStack(commandStack: any): void {\r\n this.commandStack = commandStack;\r\n }\r\n\r\n execute(action: string, payload: any) {\r\n this.commandStack.execute(action, payload);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\r\nimport { ComponentType } from '@angular/cdk/overlay';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class DialogService {\r\n constructor(private matDialog: MatDialog) {}\r\n\r\n openDialog(dialog: ComponentType, config: MatDialogConfig): void {\r\n this.matDialog.open(dialog, config);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class DirtyFlagService {\r\n private isDirtySubject = new BehaviorSubject(false);\r\n dirty$ = this.isDirtySubject.asObservable();\r\n\r\n makeDirty(): void {\r\n this.isDirtySubject.next(true);\r\n }\r\n\r\n makeClean(): void {\r\n this.isDirtySubject.next(false);\r\n }\r\n\r\n get dirty(): boolean {\r\n return this.isDirtySubject.value;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\r\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\r\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\r\nimport { StoryStep } from 'src/app/Domain/Replay/storyStep';\r\nimport {\r\n HIGHLIGHT_COLOR,\r\n HIGHLIGHT_NUMBER_BACKGROUNG_COLOR,\r\n HIGHLIGHT_NUMBER_COLOR,\r\n HIGHLIGHT_STROKE_WIDTH,\r\n NUMBER_BACKGROUND_COLOR,\r\n NUMBER_COLOR,\r\n STROKE_WIDTH,\r\n} from '../../Domain/DomManipulation/replayConstants';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\n/**\r\n * Manipulates the DOM during replay to only show the elements of the current Step\r\n */\r\nexport class DomManipulationService {\r\n constructor(private elementRegistryService: ElementRegistryService) {}\r\n\r\n showAll(): void {\r\n this.removeHighlights();\r\n this.elementRegistryService\r\n .getAllCanvasObjects()\r\n .slice()\r\n .concat(this.elementRegistryService.getAllGroups().slice())\r\n .map((e) => e.businessObject)\r\n .forEach((element) => {\r\n const domObject = document.querySelector(\r\n '[data-element-id=' + element.id + ']'\r\n );\r\n // @ts-ignore\r\n domObject.style.display = 'block';\r\n });\r\n }\r\n\r\n showStep(replayStep: StoryStep, previousStep?: StoryStep): void {\r\n this.removeHighlights();\r\n const notShown = this.getAllNotShown(replayStep.objects);\r\n\r\n notShown.forEach((element) => {\r\n const domObject = document.querySelector(\r\n '[data-element-id=' + element.id + ']'\r\n );\r\n if (domObject) {\r\n // @ts-ignore\r\n domObject.style.display = 'none';\r\n }\r\n });\r\n\r\n this.hightlightStep(\r\n previousStep\r\n ? replayStep.objects.filter((o) => !previousStep.objects.includes(o))\r\n : replayStep.objects\r\n );\r\n\r\n replayStep.objects.forEach((element) => {\r\n const domObject = document.querySelector(\r\n '[data-element-id=' + element.id + ']'\r\n );\r\n if (domObject) {\r\n // @ts-ignore\r\n domObject.style.display = 'block';\r\n }\r\n });\r\n }\r\n\r\n getNumberDomForActivity(activity: SVGPolylineElement): any {\r\n const numberDOMS = activity.parentElement?.getElementsByClassName(\r\n 'djs-labelNumber'\r\n ) || ['', ''];\r\n return {\r\n numberBackgroundDom: numberDOMS[0],\r\n numberTextDom: numberDOMS[1],\r\n };\r\n }\r\n\r\n private removeHighlights(): void {\r\n const allActivities = this.elementRegistryService.getAllActivities();\r\n const allConnections = this.elementRegistryService.getAllConnections();\r\n\r\n allActivities.forEach((activity) => {\r\n const querySelector = document.querySelector(\r\n '[data-element-id=' + activity.id + ']'\r\n );\r\n if (querySelector) {\r\n const activityDomObject =\r\n querySelector.getElementsByTagName('polyline')[0];\r\n\r\n activityDomObject.style.stroke =\r\n activity.businessObject.pickedColor || 'black';\r\n activityDomObject.style.strokeWidth = STROKE_WIDTH;\r\n\r\n const { numberBackgroundDom, numberTextDom } =\r\n this.getNumberDomForActivity(activityDomObject);\r\n if (numberBackgroundDom && numberTextDom) {\r\n numberBackgroundDom.style.fill = NUMBER_BACKGROUND_COLOR;\r\n numberTextDom.style.fill = NUMBER_COLOR;\r\n }\r\n }\r\n });\r\n\r\n allConnections.forEach((connection) => {\r\n // @ts-ignore\r\n const connectionDomObject = document\r\n .querySelector('[data-element-id=' + connection.id + ']')\r\n .getElementsByTagName('polyline')[0];\r\n\r\n connectionDomObject.style.stroke =\r\n connection.businessObject.pickedColor || 'black';\r\n connectionDomObject.style.strokeWidth = '1.5';\r\n });\r\n }\r\n\r\n private hightlightStep(stepObjects: BusinessObject[]): void {\r\n stepObjects\r\n .filter((e) => e.type === elementTypes.ACTIVITY)\r\n .forEach((activity) => {\r\n const querySelector = document.querySelector(\r\n '[data-element-id=' + activity.id + ']'\r\n );\r\n if (querySelector) {\r\n const activityDomObject =\r\n querySelector.getElementsByTagName('polyline')[0];\r\n\r\n activityDomObject.style.stroke = HIGHLIGHT_COLOR;\r\n activityDomObject.style.strokeWidth = HIGHLIGHT_STROKE_WIDTH;\r\n\r\n const { numberBackgroundDom, numberTextDom } =\r\n this.getNumberDomForActivity(activityDomObject);\r\n if (numberTextDom && numberBackgroundDom) {\r\n numberBackgroundDom.style.fill = HIGHLIGHT_NUMBER_BACKGROUNG_COLOR;\r\n numberTextDom.style.fill = HIGHLIGHT_NUMBER_COLOR;\r\n }\r\n }\r\n });\r\n }\r\n\r\n private getAllNotShown(shownElements: BusinessObject[]): BusinessObject[] {\r\n const notShownElements: BusinessObject[] = [];\r\n const allObjects = this.elementRegistryService\r\n .getAllCanvasObjects()\r\n .concat(this.elementRegistryService.getAllGroups());\r\n\r\n allObjects.forEach((element) => {\r\n if (!shownElements.includes(element.businessObject)) {\r\n if (element.type.includes(elementTypes.CONNECTION)) {\r\n // @ts-ignore\r\n if (!element.source.type.includes(elementTypes.GROUP)) {\r\n notShownElements.push(element.businessObject);\r\n } else {\r\n // @ts-ignore\r\n shownElements.push(element.target);\r\n }\r\n } else {\r\n notShownElements.push(element.businessObject);\r\n }\r\n }\r\n });\r\n return notShownElements;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\r\nimport { IconDictionaryService } from 'src/app/Service/DomainConfiguration/icon-dictionary.service';\r\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\r\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\r\nimport {\r\n CustomDomainConfiguration,\r\n DomainConfiguration,\r\n DomainConfigurationForExport,\r\n} from 'src/app/Domain/Common/domainConfiguration';\r\nimport { defaultConf } from '../../Domain/Common/iconConfiguration';\r\nimport { TitleService } from '../Title/title.service';\r\nimport { INITIAL_DOMAIN_NAME } from '../../Domain/Common/constants';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class DomainConfigurationService {\r\n constructor(\r\n private iconDictionaryService: IconDictionaryService,\r\n private elementRegistryService: ElementRegistryService,\r\n private titleService: TitleService\r\n ) {}\r\n\r\n setDomainName(domainName: string): void {\r\n this.titleService.setDomainName(\r\n domainName ? domainName : INITIAL_DOMAIN_NAME\r\n );\r\n }\r\n\r\n exportConfiguration(): void {\r\n const domainConfiguration = this.getCurrentConfigurationForExport();\r\n if (!domainConfiguration) {\r\n return;\r\n }\r\n\r\n const configJSONString = JSON.stringify(domainConfiguration, null, 2);\r\n const filename = this.titleService.getDomainName();\r\n const element = document.createElement('a');\r\n\r\n element.setAttribute(\r\n 'href',\r\n 'data:text/plain;charset=utf-8,' + encodeURIComponent(configJSONString)\r\n );\r\n element.setAttribute('download', filename + '.domain');\r\n element.style.display = 'none';\r\n document.body.appendChild(element);\r\n\r\n element.click();\r\n\r\n document.body.removeChild(element);\r\n }\r\n\r\n loadConfiguration(\r\n customConfig: DomainConfiguration,\r\n updateDomainName = true\r\n ): void {\r\n let actorDict = new Dictionary();\r\n let workObjectDict = new Dictionary();\r\n\r\n if (customConfig.actors.keysArray()) {\r\n actorDict = customConfig.actors;\r\n workObjectDict = customConfig.workObjects;\r\n } else {\r\n actorDict.addEach(customConfig.actors);\r\n workObjectDict.addEach(customConfig.workObjects);\r\n }\r\n\r\n const actorKeys = actorDict.keysArray();\r\n const workObjectKeys = workObjectDict.keysArray();\r\n\r\n this.iconDictionaryService.updateIconRegistries([], [], customConfig);\r\n\r\n this.iconDictionaryService\r\n .getIconConfiguration()\r\n .appendSRCFile(actorKeys, actorDict, workObjectKeys, workObjectDict);\r\n\r\n this.iconDictionaryService.addIconsFromDomainConfiguration(\r\n elementTypes.ACTOR,\r\n actorKeys.map((a) => elementTypes.ACTOR + a)\r\n );\r\n this.iconDictionaryService.addIconsFromDomainConfiguration(\r\n elementTypes.WORKOBJECT,\r\n workObjectKeys.map((w) => elementTypes.WORKOBJECT + w)\r\n );\r\n\r\n if (updateDomainName) {\r\n const configurationName = customConfig.name;\r\n this.setDomainName(configurationName);\r\n }\r\n }\r\n\r\n getCurrentConfiguration(): DomainConfiguration | undefined {\r\n const actors = this.iconDictionaryService.getActorsDictionary();\r\n const workObjects = this.iconDictionaryService.getWorkObjectsDictionary();\r\n\r\n let domainConfiguration;\r\n\r\n if (actors.size() > 0 && workObjects.size() > 0) {\r\n domainConfiguration = this.createConfigFromDictionaries(\r\n actors,\r\n workObjects\r\n );\r\n }\r\n return domainConfiguration;\r\n }\r\n\r\n getCurrentConfigurationForExport(): DomainConfigurationForExport | undefined {\r\n const currentConfiguration = this.getCurrentConfiguration();\r\n\r\n if (currentConfiguration) {\r\n const actors: any = {};\r\n const workObjects: any = {};\r\n\r\n currentConfiguration.actors.all().forEach((entry) => {\r\n actors[entry.key] = entry.value;\r\n });\r\n currentConfiguration.workObjects.all().forEach((entry) => {\r\n workObjects[entry.key] = entry.value;\r\n });\r\n\r\n return {\r\n name: currentConfiguration.name,\r\n actors: actors,\r\n workObjects: workObjects,\r\n };\r\n }\r\n return;\r\n }\r\n\r\n getCurrentConfigurationNamesWithoutPrefix(): CustomDomainConfiguration {\r\n return {\r\n name: this.titleService.getDomainName() || INITIAL_DOMAIN_NAME,\r\n actors: this.iconDictionaryService\r\n .getActorsDictionary()\r\n .keysArray()\r\n .map((a) => a.replace(elementTypes.ACTOR, '')),\r\n workObjects: this.iconDictionaryService\r\n .getWorkObjectsDictionary()\r\n .keysArray()\r\n .map((w) => w.replace(elementTypes.WORKOBJECT, '')),\r\n };\r\n }\r\n\r\n createMinimalConfigurationWithDefaultIcons(): DomainConfiguration {\r\n const minimalConfig = this.createConfigFromCanvas();\r\n\r\n defaultConf.actors.forEach((iconName) => {\r\n minimalConfig.actors.add(\r\n this.iconDictionaryService.getIconSource(iconName),\r\n iconName\r\n );\r\n });\r\n defaultConf.workObjects.forEach((iconName) => {\r\n minimalConfig.workObjects.add(\r\n this.iconDictionaryService.getIconSource(iconName),\r\n iconName\r\n );\r\n });\r\n\r\n return minimalConfig;\r\n }\r\n\r\n private createConfigFromDictionaries(\r\n actorsDict: Dictionary,\r\n workObjectsDict: Dictionary\r\n ): DomainConfiguration {\r\n const actorNames = actorsDict.keysArray();\r\n const workobjectNames = workObjectsDict.keysArray();\r\n const newActors = new Dictionary();\r\n const newWorkobjects = new Dictionary();\r\n\r\n // Fill Configuration from Canvas-Objects\r\n actorNames.forEach((actor) => {\r\n newActors.add(\r\n actorsDict.get(actor),\r\n actor.replace(elementTypes.ACTOR, '')\r\n );\r\n });\r\n workobjectNames.forEach((workObject) => {\r\n newWorkobjects.add(\r\n workObjectsDict.get(workObject),\r\n workObject.replace(elementTypes.WORKOBJECT, '')\r\n );\r\n });\r\n\r\n return {\r\n name: this.titleService.getDomainName(),\r\n actors: newActors,\r\n workObjects: newWorkobjects,\r\n };\r\n }\r\n\r\n private createConfigFromCanvas(): DomainConfiguration {\r\n const config = {\r\n name: INITIAL_DOMAIN_NAME,\r\n actors: new Dictionary(),\r\n workObjects: new Dictionary(),\r\n };\r\n\r\n let allCanvasObjects = this.elementRegistryService.getAllCanvasObjects();\r\n\r\n allCanvasObjects\r\n .map((e) => e.businessObject)\r\n .forEach((element) => {\r\n const type = element.type\r\n .replace(elementTypes.ACTOR, '')\r\n .replace(elementTypes.WORKOBJECT, '');\r\n if (element.type.includes(elementTypes.ACTOR)) {\r\n let src = this.iconDictionaryService.getIconSource(type) || '';\r\n config.actors.add(src, type);\r\n } else if (element.type.includes(elementTypes.WORKOBJECT)) {\r\n let src = this.iconDictionaryService.getIconSource(type) || '';\r\n config.workObjects.add(src, type);\r\n }\r\n });\r\n\r\n return config;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport {\r\n CustomDomainConfiguration,\r\n DomainConfiguration,\r\n} from '../../Domain/Common/domainConfiguration';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { DomainConfigurationService } from './domain-configuration.service';\r\nimport { IconDictionaryService } from './icon-dictionary.service';\r\nimport { getNameFromType } from '../../Utils/naming';\r\nimport { elementTypes } from '../../Domain/Common/elementTypes';\r\nimport { IconListItem } from '../../Domain/Domain-Configuration/iconListItem';\r\nimport { Dictionary } from '../../Domain/Common/dictionary/dictionary';\r\nimport { ImportDomainStoryService } from '../Import/import-domain-story.service';\r\nimport { TitleService } from '../Title/title.service';\r\nimport { MatSnackBar } from '@angular/material/snack-bar';\r\nimport {\r\n SNACKBAR_DURATION,\r\n SNACKBAR_INFO,\r\n SNACKBAR_SUCCESS,\r\n} from '../../Domain/Common/constants';\r\nimport { StorageService } from '../BrowserStorage/storage.service';\r\nimport { UsedIconList } from 'src/app/Domain/Domain-Configuration/UsedIconList';\r\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class DomainCustomizationService {\r\n private readonly domainConfigurationTypes: BehaviorSubject;\r\n\r\n private allIconListItems = new Dictionary();\r\n\r\n private configurationHasChanged = false;\r\n\r\n selectedActors$ = new BehaviorSubject([]);\r\n selectedWorkobjects$ = new BehaviorSubject([]);\r\n private changedDomainCofiguration: DomainConfiguration | undefined;\r\n\r\n constructor(\r\n private configurationService: DomainConfigurationService,\r\n private iconDictionaryService: IconDictionaryService,\r\n private importService: ImportDomainStoryService,\r\n private titleService: TitleService,\r\n private storageService: StorageService,\r\n private elementRegistryService: ElementRegistryService,\r\n private snackbar: MatSnackBar\r\n ) {\r\n this.domainConfigurationTypes = new BehaviorSubject(\r\n this.configurationService.getCurrentConfigurationNamesWithoutPrefix()\r\n );\r\n\r\n this.selectedWorkobjects$.next(\r\n this.domainConfigurationTypes.value.workObjects\r\n );\r\n this.selectedActors$.next(this.domainConfigurationTypes.value.actors);\r\n\r\n iconDictionaryService\r\n .getAllIconDictionary()\r\n .keysArray()\r\n .forEach((iconName) => {\r\n this.addIconToAllIconList(iconName);\r\n });\r\n\r\n importService.importedConfigurationEvent.subscribe((config) => {\r\n this.importConfiguration(config);\r\n });\r\n const storedDomainConfiguration =\r\n this.storageService.getStoredDomainConfiguration();\r\n if (storedDomainConfiguration) {\r\n this.importConfiguration(storedDomainConfiguration, false);\r\n }\r\n const importedConfiguration = this.importService.getImportedConfiguration();\r\n if (importedConfiguration) {\r\n this.importConfiguration(importedConfiguration, false);\r\n }\r\n }\r\n\r\n importConfiguration(\r\n customConfig: DomainConfiguration,\r\n saveDomain = true\r\n ): void {\r\n const actorKeys = customConfig.actors.keysArray();\r\n const workObjectKeys = customConfig.workObjects.keysArray();\r\n\r\n actorKeys.forEach((iconName) => {\r\n if (!this.allIconListItems.has(iconName)) {\r\n this.addIconToAllIconList(iconName);\r\n }\r\n const selectedActorNames = this.selectedActors$.value;\r\n if (!selectedActorNames.includes(iconName)) {\r\n this.selectActor(iconName);\r\n }\r\n });\r\n workObjectKeys.forEach((iconName) => {\r\n if (!this.allIconListItems.has(iconName)) {\r\n this.addIconToAllIconList(iconName);\r\n }\r\n const selectedWorkobjectNames = this.selectedWorkobjects$.value;\r\n if (!selectedWorkobjectNames.includes(iconName)) {\r\n this.selectWorkObject(iconName);\r\n }\r\n });\r\n if (saveDomain) {\r\n this.saveDomain(this.elementRegistryService.getUsedIcons(), true);\r\n }\r\n }\r\n\r\n /** Getter & Setter **/\r\n getDomainConfiguration(): BehaviorSubject {\r\n return this.domainConfigurationTypes;\r\n }\r\n\r\n getIconForName(iconName: string): BehaviorSubject {\r\n return this.allIconListItems.get(iconName);\r\n }\r\n\r\n isIconActor(iconName: string): boolean {\r\n return (\r\n this.domainConfigurationTypes.value.actors.filter(\r\n (actor: string) => actor === iconName\r\n ).length > 0\r\n );\r\n }\r\n\r\n isIconWorkObject(iconName: string): boolean {\r\n return (\r\n this.domainConfigurationTypes.value.workObjects.filter(\r\n (workObject: string) => workObject === iconName\r\n ).length > 0\r\n );\r\n }\r\n\r\n changeName(domainName: string): void {\r\n this.titleService.setDomainName(domainName);\r\n const changedDomain = this.domainConfigurationTypes.value;\r\n changedDomain.name = domainName;\r\n this.domainConfigurationTypes.next(changedDomain);\r\n }\r\n\r\n /** Seleted Icons **/\r\n setAsUnassigned(iconName: string, isActor: boolean): void {\r\n if (isActor) {\r\n this.deselectActor(iconName);\r\n } else {\r\n this.deselectWorkobject(iconName);\r\n }\r\n this.updateIcon(false, false, iconName);\r\n }\r\n\r\n setAsActor(isActor: boolean, actor: string): void {\r\n if (isActor) {\r\n this.updateIcon(true, false, actor);\r\n this.selectActor(actor);\r\n this.deselectWorkobject(actor);\r\n } else {\r\n this.deselectActor(actor);\r\n this.updateIcon(false, false, actor);\r\n }\r\n }\r\n\r\n setAsWorkobject(isWorkobject: boolean, workobject: string): void {\r\n if (isWorkobject) {\r\n this.updateIcon(false, true, workobject);\r\n this.selectWorkObject(workobject);\r\n this.deselectActor(workobject);\r\n } else {\r\n this.deselectWorkobject(workobject);\r\n this.updateIcon(false, false, workobject);\r\n }\r\n }\r\n\r\n selectActor(actor: string): void {\r\n const value = this.domainConfigurationTypes.value;\r\n if (!value.actors.includes(actor)) {\r\n value.actors.push(actor);\r\n this.domainConfigurationTypes.next(value);\r\n this.updateActorSubject();\r\n }\r\n }\r\n\r\n selectWorkObject(workObject: string): void {\r\n const value = this.domainConfigurationTypes.value;\r\n if (!value.workObjects.includes(workObject)) {\r\n value.workObjects.push(workObject);\r\n this.domainConfigurationTypes.next(value);\r\n this.updateWorkObjectSubject();\r\n }\r\n }\r\n\r\n deselectActor(actor: string): void {\r\n if (this.domainConfigurationTypes) {\r\n this.domainConfigurationTypes.next({\r\n name: this.domainConfigurationTypes.value.name,\r\n actors: this.domainConfigurationTypes.value.actors.filter(\r\n (a: string) => !a.includes(actor)\r\n ),\r\n workObjects: this.domainConfigurationTypes.value.workObjects,\r\n });\r\n }\r\n this.updateActorSubject();\r\n }\r\n\r\n deselectWorkobject(workobject: string): void {\r\n if (this.domainConfigurationTypes) {\r\n this.domainConfigurationTypes.next({\r\n name: this.domainConfigurationTypes.value.name,\r\n actors: this.domainConfigurationTypes.value.actors,\r\n workObjects: this.domainConfigurationTypes.value.workObjects.filter(\r\n (w: string) => !w.includes(workobject)\r\n ),\r\n });\r\n }\r\n this.updateWorkObjectSubject();\r\n }\r\n\r\n setSelectedWorkObject(sortedList: string[]): void {\r\n const value = this.domainConfigurationTypes.value;\r\n value.workObjects = sortedList;\r\n this.domainConfigurationTypes.next(value);\r\n this.updateWorkObjectSubject();\r\n }\r\n\r\n setSelectedActors(sortedList: string[]): void {\r\n const value = this.domainConfigurationTypes.value;\r\n value.actors = sortedList;\r\n this.domainConfigurationTypes.next(value);\r\n this.updateActorSubject();\r\n }\r\n\r\n private updateActorSubject(): void {\r\n this.selectedActors$.next(this.domainConfigurationTypes.value.actors);\r\n this.configurationHasChanged = true;\r\n }\r\n\r\n private updateWorkObjectSubject(): void {\r\n this.selectedWorkobjects$.next(\r\n this.domainConfigurationTypes.value.workObjects\r\n );\r\n this.configurationHasChanged = true;\r\n }\r\n\r\n /** Revert Domain **/\r\n resetDomain(): void {\r\n const defaultConfig =\r\n this.configurationService.createMinimalConfigurationWithDefaultIcons();\r\n\r\n this.selectedWorkobjects$.value.forEach((workObjectName) => {\r\n if (!defaultConfig.workObjects.has(workObjectName)) {\r\n this.deselectWorkobject(workObjectName);\r\n }\r\n });\r\n this.selectedActors$.value.forEach((actorName) => {\r\n if (!defaultConfig.actors.has(actorName)) {\r\n this.deselectActor(actorName);\r\n }\r\n });\r\n\r\n this.domainConfigurationTypes.next({\r\n name: defaultConfig.name,\r\n actors: defaultConfig.actors.keysArray(),\r\n workObjects: defaultConfig.workObjects.keysArray(),\r\n } as CustomDomainConfiguration);\r\n\r\n this.updateAllIconBehaviourSubjects();\r\n }\r\n\r\n cancel(): void {\r\n this.domainConfigurationTypes.next(\r\n this.configurationService.getCurrentConfigurationNamesWithoutPrefix()\r\n );\r\n this.updateAllIconBehaviourSubjects();\r\n this.resetToInitialConfiguration();\r\n }\r\n\r\n private resetToInitialConfiguration(): void {\r\n this.updateActorSubject();\r\n this.updateWorkObjectSubject();\r\n }\r\n\r\n /** Persist Domain **/\r\n saveDomain(usedIcons: UsedIconList, imported = false): void {\r\n const changedActors: string[] = [];\r\n const changedWorkobjects: string[] = [];\r\n if (this.configurationHasChanged) {\r\n const changedDomain = this.createDomainConfiguration();\r\n\r\n const configurationActors = changedDomain.actors.keysArray();\r\n usedIcons?.actors.forEach((actor) => {\r\n if (\r\n !configurationActors?.includes(actor) &&\r\n !changedActors.includes(actor)\r\n ) {\r\n changedActors.push(actor);\r\n }\r\n });\r\n const configurationWorkobjects = changedDomain.workObjects.keysArray();\r\n usedIcons?.workobjects.forEach((workobject) => {\r\n if (\r\n !configurationWorkobjects?.includes(workobject) &&\r\n !changedWorkobjects.includes(workobject)\r\n ) {\r\n changedWorkobjects.push(workobject);\r\n }\r\n });\r\n\r\n if (!changedActors.length && !changedWorkobjects.length) {\r\n this.changedDomainCofiguration = changedDomain;\r\n\r\n this.updateIcons(changedDomain);\r\n\r\n this.storageService.setStoredDomainConfiguration(\r\n this.changedDomainCofiguration\r\n );\r\n this.snackbar.open(\r\n imported\r\n ? 'Configuration imported successfully'\r\n : 'Configuration saved sucessfully',\r\n undefined,\r\n {\r\n duration: SNACKBAR_DURATION,\r\n panelClass: SNACKBAR_SUCCESS,\r\n }\r\n );\r\n }\r\n } else {\r\n this.snackbar.open(\r\n imported\r\n ? 'No configuration to be imported'\r\n : 'No configuration to be saved',\r\n undefined,\r\n {\r\n duration: SNACKBAR_DURATION,\r\n panelClass: SNACKBAR_INFO,\r\n }\r\n );\r\n }\r\n if (changedActors.length || changedWorkobjects.length) {\r\n if (changedActors.length) {\r\n const actors = changedActors.join(', ');\r\n this.snackbar.open(\r\n `The following icons are already in use as actors and cannot be changed: ${actors}`,\r\n undefined,\r\n {\r\n duration: SNACKBAR_DURATION * 3,\r\n panelClass: SNACKBAR_INFO,\r\n }\r\n );\r\n }\r\n if (changedWorkobjects.length) {\r\n const workobjects = changedWorkobjects.join(', ');\r\n this.snackbar.open(\r\n `The following icons are already in use as workobjects and cannot be changed: ${workobjects}`,\r\n undefined,\r\n {\r\n duration: SNACKBAR_DURATION * 3,\r\n panelClass: SNACKBAR_INFO,\r\n }\r\n );\r\n }\r\n }\r\n }\r\n\r\n exportDomain(): void {\r\n this.configurationService.exportConfiguration();\r\n }\r\n\r\n getAndClearSavedConfiguration(): DomainConfiguration | undefined {\r\n const temp = this.changedDomainCofiguration;\r\n this.changedDomainCofiguration = undefined;\r\n\r\n return temp;\r\n }\r\n\r\n private createDomainConfiguration(): DomainConfiguration {\r\n const actors = new Dictionary();\r\n const workObjects = new Dictionary();\r\n\r\n this.domainConfigurationTypes.value.actors.forEach((type: string) => {\r\n actors.add(this.iconDictionaryService.getIconSource(type), type);\r\n });\r\n this.domainConfigurationTypes.value.workObjects.forEach((type: string) => {\r\n workObjects.add(this.iconDictionaryService.getIconSource(type), type);\r\n });\r\n\r\n return {\r\n name: this.domainConfigurationTypes.value.name || '',\r\n actors,\r\n workObjects,\r\n };\r\n }\r\n\r\n /** Update Icons **/\r\n addNewIcon(iconName: string): void {\r\n const iconDict = new Dictionary();\r\n iconDict.add(this.getSrcForIcon(iconName), iconName);\r\n this.iconDictionaryService.addIconsToCss(iconDict);\r\n this.addIconToAllIconList(iconName);\r\n }\r\n\r\n private addIconToAllIconList(iconName: string): void {\r\n this.allIconListItems.add(\r\n new BehaviorSubject({\r\n name: iconName,\r\n svg: this.getSrcForIcon(iconName),\r\n isActor: this.isIconActor(iconName),\r\n isWorkObject: this.isIconWorkObject(iconName),\r\n }),\r\n iconName\r\n );\r\n }\r\n\r\n private updateIcon(\r\n isActor: boolean,\r\n isWorkobject: boolean,\r\n iconName: string\r\n ) {\r\n const iconBehaviourSubject = this.getIconForName(iconName);\r\n const icon = iconBehaviourSubject.value;\r\n icon.isActor = isActor;\r\n icon.isWorkObject = isWorkobject;\r\n\r\n iconBehaviourSubject.next(icon);\r\n }\r\n\r\n private updateAllIconBehaviourSubjects(): void {\r\n const customDomainCofiguration = this.domainConfigurationTypes.value;\r\n this.allIconListItems.keysArray().forEach((iconName) => {\r\n if (customDomainCofiguration.actors.includes(iconName)) {\r\n this.updateIcon(true, false, iconName);\r\n } else if (customDomainCofiguration.workObjects.includes(iconName)) {\r\n this.updateIcon(false, true, iconName);\r\n } else {\r\n this.updateIcon(false, false, iconName);\r\n }\r\n });\r\n }\r\n\r\n private getSrcForIcon(name: string): string {\r\n let iconName: string;\r\n if (name.includes(elementTypes.DOMAINSTORY)) {\r\n iconName = getNameFromType(name);\r\n } else {\r\n iconName = name;\r\n }\r\n const rawSrc = this.iconDictionaryService.getIconSource(iconName);\r\n\r\n if (!rawSrc) {\r\n return '';\r\n }\r\n\r\n if (rawSrc.startsWith('data')) {\r\n return rawSrc;\r\n } else {\r\n return 'data:image/svg+xml,' + rawSrc;\r\n }\r\n }\r\n\r\n private updateIcons(changedDomain: DomainConfiguration) {\r\n this.allIconListItems\r\n .keysArray()\r\n .forEach((item) => this.setAsUnassigned(item, this.isIconActor(item)));\r\n changedDomain.actors\r\n .keysArray()\r\n .forEach((actor) => this.setAsActor(true, actor));\r\n changedDomain.workObjects\r\n .keysArray()\r\n .forEach((workObject) => this.setAsWorkobject(true, workObject));\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\r\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\r\nimport { getNameFromType } from 'src/app/Utils/naming';\r\nimport {\r\n allIcons,\r\n appendedIcons,\r\n} from 'src/app/Domain/Domain-Configuration/allIcons';\r\nimport {\r\n defaultConf,\r\n IconConfiguration,\r\n} from 'src/app/Domain/Common/iconConfiguration';\r\nimport { Configuration } from 'src/app/Domain/Common/configuration';\r\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\r\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\r\nimport { sanitizeIconName } from '../../Utils/sanitizer';\r\n\r\nexport const ICON_PREFIX = 'icon-domain-story-';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class IconDictionaryService {\r\n private actorIconDictionary = new Dictionary();\r\n private workObjectDictionary = new Dictionary();\r\n\r\n private allIconDictionary = new Dictionary();\r\n private iconDictionaryForBPMN = new Dictionary();\r\n\r\n private customConfiguration?: DomainConfiguration;\r\n\r\n private readonly iconConfig: IconConfiguration;\r\n\r\n constructor() {\r\n this.allIconDictionary.addEach(allIcons);\r\n this.iconConfig = new IconConfiguration(this.allIconDictionary);\r\n }\r\n\r\n initTypeDictionaries(actors: string[], workObjects: string[]): void {\r\n if (!actors || actors.length == 0) {\r\n actors = defaultConf.actors;\r\n }\r\n if (!workObjects || workObjects.length == 0) {\r\n workObjects = defaultConf.workObjects;\r\n }\r\n\r\n const allTypes = new Dictionary();\r\n allTypes.addEach(allIcons);\r\n allTypes.appendDict(this.getAppendedIconDictionary());\r\n\r\n this.initDictionary(\r\n actors,\r\n allTypes,\r\n this.actorIconDictionary,\r\n elementTypes.ACTOR\r\n );\r\n this.initDictionary(\r\n workObjects,\r\n allTypes,\r\n this.workObjectDictionary,\r\n elementTypes.WORKOBJECT\r\n );\r\n }\r\n\r\n private initDictionary(\r\n keys: string[],\r\n allTypes: Dictionary,\r\n dictionary: Dictionary,\r\n namePrefix: elementTypes\r\n ) {\r\n dictionary.clear();\r\n for (const key of keys) {\r\n const name = namePrefix + key;\r\n dictionary.add(allTypes.get(key), name);\r\n }\r\n\r\n dictionary.keysArray().forEach((entry) => {\r\n const name = getNameFromType(entry);\r\n this.registerIconForBPMN(\r\n entry,\r\n ICON_PREFIX + sanitizeIconName(name.toLowerCase())\r\n );\r\n });\r\n }\r\n\r\n getCurrentIconConfigurationForBPMN(): Configuration {\r\n if (this.customConfiguration) {\r\n return this.iconConfig.createCustomConf(this.customConfiguration);\r\n }\r\n return this.iconConfig.getDefaultConf();\r\n }\r\n\r\n allInTypeDictionary(type: elementTypes, elements: BusinessObject[]): boolean {\r\n let collection: Dictionary;\r\n if (type === elementTypes.ACTOR) {\r\n collection = this.actorIconDictionary;\r\n } else if (type === elementTypes.WORKOBJECT) {\r\n collection = this.workObjectDictionary;\r\n }\r\n\r\n let allIn = true;\r\n if (elements) {\r\n elements.forEach((element) => {\r\n if (!collection.has(element.type)) {\r\n allIn = false;\r\n }\r\n });\r\n } else {\r\n return false;\r\n }\r\n return allIn;\r\n }\r\n\r\n /** Load Icons from Configuration **/\r\n\r\n addIconsFromDomainConfiguration(\r\n dictionaryType: elementTypes,\r\n iconTypes: string[]\r\n ): void {\r\n let collection: Dictionary;\r\n if (dictionaryType === elementTypes.ACTOR) {\r\n collection = this.actorIconDictionary;\r\n } else if (dictionaryType === elementTypes.WORKOBJECT) {\r\n collection = this.workObjectDictionary;\r\n }\r\n\r\n const allTypes = new Dictionary();\r\n allTypes.addEach(allIcons);\r\n allTypes.appendDict(appendedIcons);\r\n\r\n iconTypes.forEach((type) => {\r\n if (!collection.has(type)) {\r\n const name = getNameFromType(type);\r\n const src = allTypes.get(name);\r\n if (src) {\r\n this.registerIconForType(dictionaryType, type, src);\r\n this.registerIconForBPMN(\r\n type,\r\n sanitizeIconName(ICON_PREFIX + name.toLowerCase())\r\n );\r\n }\r\n }\r\n });\r\n }\r\n\r\n /** Add Icon(s) to Dictionary **/\r\n registerIconForBPMN(name: string, src: string): void {\r\n this.iconDictionaryForBPMN.set(name, src);\r\n }\r\n\r\n addIconsToTypeDictionary(\r\n actorIcons: BusinessObject[],\r\n workObjectIcons: BusinessObject[]\r\n ) {\r\n if (!this.allInTypeDictionary(elementTypes.ACTOR, actorIcons)) {\r\n this.addIconsFromDomainConfiguration(\r\n elementTypes.ACTOR,\r\n actorIcons.map((element) => element.type)\r\n );\r\n }\r\n if (!this.allInTypeDictionary(elementTypes.WORKOBJECT, workObjectIcons)) {\r\n this.addIconsFromDomainConfiguration(\r\n elementTypes.WORKOBJECT,\r\n workObjectIcons.map((element) => element.type)\r\n );\r\n }\r\n }\r\n\r\n registerIconForType(type: elementTypes, name: string, src: string): void {\r\n if (!name.includes(type)) {\r\n name = type + name;\r\n }\r\n\r\n let collection = new Dictionary();\r\n if (type === elementTypes.ACTOR) {\r\n collection = this.actorIconDictionary;\r\n } else if (type === elementTypes.WORKOBJECT) {\r\n collection = this.workObjectDictionary;\r\n }\r\n collection.set(name, src);\r\n }\r\n\r\n updateIconRegistries(\r\n actors: BusinessObject[],\r\n workObjects: BusinessObject[],\r\n config: DomainConfiguration\r\n ): void {\r\n const elements: BusinessObject[] = [];\r\n\r\n actors.forEach((a) => elements.push(a));\r\n workObjects.forEach((w) => elements.push(w));\r\n\r\n const customIcons = new Dictionary();\r\n\r\n const actorsDict = new Dictionary();\r\n const workObjectsDict = new Dictionary();\r\n config.actors.keysArray().forEach((key) => {\r\n actorsDict.add(config.actors.get(key), key);\r\n });\r\n config.workObjects.keysArray().forEach((key) => {\r\n workObjectsDict.add(config.workObjects.get(key), key);\r\n });\r\n\r\n this.extractCustomIconsFromDictionary(actorsDict, customIcons);\r\n this.extractCustomIconsFromDictionary(workObjectsDict, customIcons);\r\n\r\n elements.forEach((element) => {\r\n const name = sanitizeIconName(\r\n element.type\r\n .replace(elementTypes.ACTOR, '')\r\n .replace(elementTypes.WORKOBJECT, '')\r\n );\r\n if (\r\n (element.type.includes(elementTypes.ACTOR) ||\r\n element.type.includes(elementTypes.WORKOBJECT)) &&\r\n !this.getFullDictionary().has(name)\r\n ) {\r\n this.registerIconForBPMN(\r\n ICON_PREFIX + name.toLowerCase(),\r\n element.type\r\n );\r\n }\r\n });\r\n\r\n this.addNewIconsToDictionary(customIcons);\r\n this.addIconsToTypeDictionary(actors, workObjects);\r\n }\r\n\r\n private extractCustomIconsFromDictionary(\r\n elementDictionary: Dictionary,\r\n customIcons: Dictionary\r\n ) {\r\n elementDictionary.keysArray().forEach((name) => {\r\n const sanitizedName = sanitizeIconName(name);\r\n if (!this.getFullDictionary().has(sanitizedName)) {\r\n customIcons.add(elementDictionary.get(name), sanitizedName);\r\n }\r\n });\r\n }\r\n\r\n /** Add new Icon(s) **/\r\n\r\n addNewIconsToDictionary(customIcons: Dictionary) {\r\n customIcons.keysArray().forEach((key) => {\r\n const custom = customIcons.get(key);\r\n this.addIMGToIconDictionary(custom.src, key);\r\n });\r\n this.addIconsToCss(customIcons);\r\n }\r\n\r\n addIMGToIconDictionary(input: string, name: string): void {\r\n appendedIcons.set(name, input);\r\n }\r\n\r\n addIconsToCss(customIcons: Dictionary) {\r\n const sheetEl = document.getElementById('iconsCss');\r\n customIcons.keysArray().forEach((key) => {\r\n const src = customIcons.get(key);\r\n const iconStyle =\r\n '.' +\r\n ICON_PREFIX +\r\n sanitizeIconName(key.toLowerCase()) +\r\n '::before{ content: url(\"data:image/svg+xml;utf8,' +\r\n this.wrapSRCInSVG(src) +\r\n '\"); margin: 3px;}';\r\n // @ts-ignore\r\n sheetEl?.sheet?.insertRule(iconStyle, sheetEl.sheet.cssRules.length);\r\n });\r\n }\r\n\r\n private wrapSRCInSVG(src: string): string {\r\n return (\r\n \"\"\r\n );\r\n }\r\n\r\n /** Getter & Setter **/\r\n\r\n getFullDictionary(): Dictionary {\r\n const fullDictionary = new Dictionary();\r\n fullDictionary.appendDict(this.allIconDictionary);\r\n fullDictionary.appendDict(this.getAppendedIconDictionary());\r\n return fullDictionary;\r\n }\r\n\r\n getAppendedIconDictionary(): Dictionary {\r\n const appendedDict = new Dictionary();\r\n appendedIcons.keysArray().forEach((key) => {\r\n if (!this.allIconDictionary.has(key)) {\r\n appendedDict.set(key, appendedIcons.get(key));\r\n }\r\n });\r\n return appendedDict;\r\n }\r\n\r\n getTypeDictionary(type: elementTypes): Dictionary {\r\n if (type === elementTypes.ACTOR) {\r\n return this.actorIconDictionary;\r\n } else if (type === elementTypes.WORKOBJECT) {\r\n return this.workObjectDictionary;\r\n }\r\n return new Dictionary();\r\n }\r\n\r\n getTypeDictionaryKeys(type: elementTypes): string[] {\r\n return this.getTypeDictionary(type).keysArray();\r\n }\r\n\r\n getTypeIconSRC(type: elementTypes, name: string): string | null {\r\n if (type === elementTypes.ACTOR) {\r\n if (!name.startsWith(elementTypes.ACTOR)) {\r\n name = elementTypes.ACTOR + name;\r\n }\r\n return this.actorIconDictionary.get(name);\r\n } else if (type === elementTypes.WORKOBJECT) {\r\n if (!name.startsWith(elementTypes.WORKOBJECT)) {\r\n name = elementTypes.WORKOBJECT + name;\r\n }\r\n return this.workObjectDictionary.get(name);\r\n }\r\n return null;\r\n }\r\n\r\n getIconForBPMN(type: elementTypes): string | null {\r\n return this.iconDictionaryForBPMN.get(type);\r\n }\r\n\r\n getIconSource(name: string): string | null {\r\n if (this.allIconDictionary.has(name)) {\r\n return this.allIconDictionary.get(name);\r\n } else if (appendedIcons.has(name)) {\r\n return appendedIcons.get(name);\r\n }\r\n return null;\r\n }\r\n\r\n getElementsOfType(\r\n elements: BusinessObject[],\r\n type: elementTypes\r\n ): BusinessObject[] {\r\n const elementOfType: any = [];\r\n elements.forEach((element) => {\r\n if (element.type.includes(type)) {\r\n elementOfType.push(element);\r\n }\r\n });\r\n return elementOfType;\r\n }\r\n\r\n getAllIconDictionary(): Dictionary {\r\n return this.allIconDictionary;\r\n }\r\n\r\n getActorsDictionary(): Dictionary {\r\n return this.actorIconDictionary;\r\n }\r\n\r\n getWorkObjectsDictionary(): Dictionary {\r\n return this.workObjectDictionary;\r\n }\r\n\r\n getIconConfiguration(): IconConfiguration {\r\n return this.iconConfig;\r\n }\r\n\r\n setCusomtConfiguration(customConfiguration: DomainConfiguration): void {\r\n this.customConfiguration = customConfiguration;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\r\nimport { CanvasObject } from 'src/app/Domain/Common/canvasObject';\r\nimport { GroupCanvasObject } from '../../Domain/Common/groupCanvasObject';\r\nimport { ActivityCanvasObject } from '../../Domain/Common/activityCanvasObject';\r\nimport { UsedIconList } from 'src/app/Domain/Domain-Configuration/UsedIconList';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ElementRegistryService {\r\n private registry: any;\r\n private fullyInitialized = false;\r\n\r\n /**\r\n * Initially the registry has only the root-Element.\r\n * Once the canvas has bees initialized, we adjust the reference to point to the elements on the canvas for convenience\r\n */\r\n correctInitialize(): void {\r\n if (!this.fullyInitialized) {\r\n if (this.registry.__implicitroot) {\r\n this.registry = this.registry.__implicitroot.element.children;\r\n this.fullyInitialized = true;\r\n }\r\n }\r\n }\r\n\r\n setElementRegistry(registry: any): void {\r\n this.registry = registry._elements;\r\n }\r\n\r\n clear(): void {\r\n this.registry = null;\r\n this.fullyInitialized = false;\r\n }\r\n\r\n createObjectListForDSTDownload(): CanvasObject[] {\r\n if (this.registry) {\r\n const allObjectsFromCanvas = this.getAllCanvasObjects();\r\n const groups = this.getAllGroups();\r\n\r\n const objectList: CanvasObject[] = [];\r\n\r\n this.fillListOfCanvasObjects(allObjectsFromCanvas, objectList, groups);\r\n\r\n return objectList;\r\n }\r\n return [];\r\n }\r\n\r\n private fillListOfCanvasObjects(\r\n allObjectsFromCanvas: CanvasObject[],\r\n objectList: CanvasObject[],\r\n groups: GroupCanvasObject[]\r\n ): void {\r\n allObjectsFromCanvas.forEach((canvasElement) => {\r\n if (canvasElement.type === elementTypes.ACTIVITY) {\r\n objectList.push(canvasElement);\r\n }\r\n\r\n // ensure that Activities are always after Actors, Workobjects and Groups in .dst files\r\n else {\r\n if (canvasElement.type === elementTypes.TEXTANNOTATION) {\r\n canvasElement.businessObject.width = canvasElement.width;\r\n canvasElement.businessObject.height = canvasElement.height;\r\n }\r\n if (!objectList.includes(canvasElement)) {\r\n objectList.unshift(canvasElement);\r\n }\r\n }\r\n });\r\n\r\n groups.forEach((group) => {\r\n objectList.push(group);\r\n });\r\n }\r\n\r\n getAllActivities(): ActivityCanvasObject[] {\r\n const activities: ActivityCanvasObject[] = [];\r\n\r\n this.getAllCanvasObjects().forEach((element) => {\r\n if (element.type.includes(elementTypes.ACTIVITY)) {\r\n activities.push(element as ActivityCanvasObject);\r\n }\r\n });\r\n return activities;\r\n }\r\n\r\n getAllConnections(): ActivityCanvasObject[] {\r\n const connections: ActivityCanvasObject[] = [];\r\n this.getAllCanvasObjects().forEach((element) => {\r\n const type = element.type;\r\n if (type === elementTypes.CONNECTION) {\r\n connections.push(element as ActivityCanvasObject);\r\n }\r\n });\r\n return connections;\r\n }\r\n\r\n getAllCanvasObjects(): CanvasObject[] {\r\n const allObjects: CanvasObject[] = [];\r\n const groupObjects: GroupCanvasObject[] = [];\r\n\r\n this.checkChildForGroup(groupObjects, allObjects);\r\n\r\n // for each memorized group, remove it from the group-array and check its children, whether they are groups or not\r\n // if a child is a group, memorize it in the group-array\r\n // other children should already be in the allObjects list\r\n let i = groupObjects.length - 1;\r\n while (groupObjects.length >= 1) {\r\n const currentGroup = groupObjects.pop();\r\n // @ts-ignore\r\n currentGroup.children.forEach((child: CanvasObject) => {\r\n const type = child.type;\r\n if (type.includes(elementTypes.GROUP)) {\r\n groupObjects.push(child as GroupCanvasObject);\r\n }\r\n });\r\n i = groupObjects.length - 1;\r\n }\r\n return allObjects;\r\n }\r\n\r\n // returns all groups on the canvas and inside other groups\r\n getAllGroups(): GroupCanvasObject[] {\r\n const groupObjects: GroupCanvasObject[] = [];\r\n const allObjects: CanvasObject[] = [];\r\n\r\n this.checkChildForGroup(groupObjects, allObjects);\r\n\r\n for (const group of groupObjects) {\r\n group.children?.forEach((child: CanvasObject) => {\r\n if (child.type.includes(elementTypes.GROUP)) {\r\n groupObjects.push(child as GroupCanvasObject);\r\n }\r\n });\r\n }\r\n return groupObjects;\r\n }\r\n\r\n private checkChildForGroup(\r\n groupObjects: GroupCanvasObject[],\r\n allObjects: CanvasObject[]\r\n ): void {\r\n const registryElementNames = Object.keys(this.registry);\r\n for (let name of registryElementNames) {\r\n const entry = this.registry[name].element;\r\n if (entry.businessObject) {\r\n const type = entry.type;\r\n if (type && type.includes(elementTypes.GROUP)) {\r\n // if it is a group, memorize this for later\r\n groupObjects.push(entry);\r\n } else if (type) {\r\n allObjects.push(entry);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // get a list of activities, that originate from an actor-type\r\n getActivitiesFromActors(): ActivityCanvasObject[] {\r\n const activitiesFromActors: ActivityCanvasObject[] = [];\r\n const activities = this.getAllActivities();\r\n\r\n activities.forEach((activity: ActivityCanvasObject) => {\r\n if (activity.source?.type.includes(elementTypes.ACTOR)) {\r\n activitiesFromActors.push(activity);\r\n }\r\n });\r\n return activitiesFromActors;\r\n }\r\n\r\n getUsedIcons(): UsedIconList {\r\n const actors = this.getAllActors();\r\n const workobjects = this.getAllWorkobjects();\r\n\r\n return {\r\n actors: actors.map((a) => a.type.replace(elementTypes.ACTOR, '')),\r\n workobjects: workobjects.map((w) =>\r\n w.type.replace(elementTypes.WORKOBJECT, '')\r\n ),\r\n };\r\n }\r\n\r\n private getAllActors() {\r\n return this.getAllCanvasObjects().filter((co) =>\r\n co.type.includes(elementTypes.ACTOR)\r\n );\r\n }\r\n\r\n private getAllWorkobjects() {\r\n return this.getAllCanvasObjects().filter((co) =>\r\n co.type.includes(elementTypes.WORKOBJECT)\r\n );\r\n }\r\n}\r\n","import { Injectable, OnDestroy } from '@angular/core';\r\nimport { DomainConfigurationService } from 'src/app/Service/DomainConfiguration/domain-configuration.service';\r\nimport { sanitizeForDesktop } from 'src/app/Utils/sanitizer';\r\nimport { TitleService } from 'src/app/Service/Title/title.service';\r\nimport { ConfigAndDST } from 'src/app/Domain/Export/configAndDst';\r\nimport { DirtyFlagService } from 'src/app/Service/DirtyFlag/dirty-flag.service';\r\nimport { PngService } from 'src/app/Service/Export/png.service';\r\nimport { SvgService } from 'src/app/Service/Export/svg.service';\r\nimport { Subscription } from 'rxjs';\r\nimport { RendererService } from '../Renderer/renderer.service';\r\nimport { HtmlPresentationService } from './html-presentation.service';\r\nimport { VERSION } from '../../Domain/Common/constants';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ExportService implements OnDestroy {\r\n titleSubscription: Subscription;\r\n descriptionSubscription: Subscription;\r\n\r\n title = '';\r\n description = '';\r\n\r\n constructor(\r\n private configurationService: DomainConfigurationService,\r\n private titleService: TitleService,\r\n private dirtyFlagService: DirtyFlagService,\r\n private pngService: PngService,\r\n private svgService: SvgService,\r\n private htmlPresentationService: HtmlPresentationService,\r\n private rendererService: RendererService\r\n ) {\r\n this.titleSubscription = this.titleService.title$.subscribe(\r\n (title: string) => {\r\n this.title = title;\r\n }\r\n );\r\n this.descriptionSubscription = this.titleService.description$.subscribe(\r\n (description: string) => {\r\n this.description = description;\r\n }\r\n );\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.titleSubscription.unsubscribe();\r\n this.descriptionSubscription.unsubscribe();\r\n }\r\n\r\n isDomainStoryExportable(): boolean {\r\n return this.rendererService.getStory().length >= 1;\r\n }\r\n\r\n createConfigAndDST(DomainStory: any): ConfigAndDST {\r\n return new ConfigAndDST(\r\n this.configurationService.getCurrentConfigurationForExport(),\r\n DomainStory\r\n );\r\n }\r\n\r\n downloadDST(): void {\r\n const dst = this.getStoryForDownload();\r\n const configAndDST = this.createConfigAndDST(dst);\r\n const json = JSON.stringify(configAndDST, null, 2);\r\n\r\n const filename = sanitizeForDesktop(\r\n this.title + '_' + new Date().toString().slice(0, 10)\r\n );\r\n\r\n this.downloadFile(\r\n json,\r\n 'data:text/plain;charset=utf-8,',\r\n filename,\r\n '.egn',\r\n true\r\n );\r\n }\r\n\r\n private downloadFile(\r\n data: string,\r\n datatype: string,\r\n filename: string,\r\n fileEnding: string,\r\n makeClean: boolean\r\n ) {\r\n const element = document.createElement('a');\r\n element.setAttribute('href', datatype + encodeURIComponent(data));\r\n element.setAttribute('download', filename + fileEnding);\r\n\r\n element.style.display = 'none';\r\n document.body.appendChild(element);\r\n\r\n element.click();\r\n\r\n if (makeClean) {\r\n this.dirtyFlagService.makeClean();\r\n }\r\n\r\n document.body.removeChild(element);\r\n }\r\n\r\n downloadSVG(withTitle: boolean): void {\r\n const story = this.getStoryForDownload();\r\n const dst = this.createConfigAndDST(story);\r\n\r\n const svgData = this.svgService.createSVGData(\r\n this.title,\r\n this.description,\r\n dst,\r\n withTitle\r\n );\r\n\r\n this.downloadFile(\r\n svgData,\r\n 'data:application/bpmn20-xml;charset=UTF-8,',\r\n sanitizeForDesktop(this.title),\r\n '.egn.svg',\r\n true\r\n );\r\n }\r\n\r\n downloadPNG(withTitle: boolean): void {\r\n const canvas = document.getElementById('canvas');\r\n if (canvas) {\r\n const container = canvas.getElementsByClassName('djs-container');\r\n const svgElements = container[0].getElementsByTagName('svg');\r\n const outerSVGElement = svgElements[0];\r\n const viewport = outerSVGElement.getElementsByClassName('viewport')[0];\r\n const layerBase = viewport.getElementsByClassName('layer-base')[0];\r\n\r\n const image = document.createElement('img');\r\n\r\n // removes unwanted black dots in image\r\n let svg = this.pngService.extractSVG(viewport, outerSVGElement);\r\n\r\n svg = this.pngService.prepareSVG(\r\n svg,\r\n layerBase,\r\n this.description,\r\n this.title,\r\n withTitle\r\n );\r\n\r\n image.onload = () => {\r\n const tempCanvas = document.createElement('canvas');\r\n\r\n // add a 10px buffer to the right and lower boundary\r\n tempCanvas.width = this.pngService.getWidth() + 10;\r\n tempCanvas.height = this.pngService.getHeight() + 10;\r\n\r\n const ctx = tempCanvas.getContext('2d');\r\n if (ctx) {\r\n // fill with white background\r\n ctx.rect(0, 0, tempCanvas.width, tempCanvas.height);\r\n ctx.fillStyle = 'white';\r\n ctx.fill();\r\n\r\n ctx.drawImage(image, 0, 0);\r\n }\r\n\r\n const png64 = tempCanvas.toDataURL('image/png');\r\n const ele = document.createElement('a');\r\n ele.setAttribute(\r\n 'download',\r\n sanitizeForDesktop(this.title) +\r\n '_' +\r\n new Date().toISOString().slice(0, 10) +\r\n '.png'\r\n );\r\n ele.setAttribute('href', png64);\r\n document.body.appendChild(ele);\r\n ele.click();\r\n document.body.removeChild(ele);\r\n\r\n // image source has to be removed to circumvent browser caching\r\n image.src = '';\r\n };\r\n image.onchange = image.onload;\r\n\r\n image.width = this.pngService.getWidth();\r\n image.height = this.pngService.getHeight();\r\n\r\n image.src = 'data:image/svg+xml,' + svg;\r\n }\r\n }\r\n\r\n downloadHTMLPresentation(): void {\r\n const filename = sanitizeForDesktop(\r\n this.title + '_' + new Date().toString().slice(0, 10)\r\n );\r\n this.htmlPresentationService.downloadHTMLPresentation(filename).then();\r\n }\r\n\r\n private getStoryForDownload(): unknown[] {\r\n const story = this.rendererService.getStory() as unknown[];\r\n story.push({ info: this.titleService.getDescription() });\r\n story.push({ version: VERSION });\r\n return story;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { sanitizeForDesktop } from '../../Utils/sanitizer';\r\nimport { ReplayService } from '../Replay/replay.service';\r\n// @ts-ignore\r\nimport doT from 'dot';\r\nimport { TitleService } from '../Title/title.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\n/**\r\n * Initial idea and PR from https://github.com/indika-dev\r\n */\r\nexport class HtmlPresentationService {\r\n constructor(\r\n private replayService: ReplayService,\r\n private titleService: TitleService\r\n ) {}\r\n\r\n private multiplexSecret: any;\r\n private multiplexId: any;\r\n\r\n private modeler: any;\r\n\r\n setModelerClasses(canvas: any, selection: any, modeler: any): void {\r\n this.modeler = modeler;\r\n }\r\n\r\n private static viewBoxCoordinates(svg: any): any {\r\n const ViewBoxCoordinate =\r\n /width=\"([^\"]+)\"\\s+height=\"([^\"]+)\"\\s+viewBox=\"([^\"]+)\"/;\r\n const match = svg.match(ViewBoxCoordinate);\r\n return match[3];\r\n }\r\n\r\n /*\r\n ---------------------------\r\n SVG handling starts here\r\n ----------------------------\r\n */\r\n\r\n async downloadHTMLPresentation(filename: string): Promise {\r\n const svgData = [];\r\n // export all sentences of domain story\r\n this.replayService.startReplay();\r\n try {\r\n const result = await this.modeler.saveSVG({});\r\n this.fixActivityMarkersForEachStep(\r\n result,\r\n this.replayService.getCurrentStepNumber()\r\n );\r\n svgData.push({\r\n content: HtmlPresentationService.createSVGData(result.svg),\r\n transition: 'slide',\r\n });\r\n } catch (err) {\r\n alert('There was an error exporting the SVG.\\n' + err);\r\n }\r\n while (\r\n this.replayService.getCurrentStepNumber() <\r\n this.replayService.getMaxStepNumber()\r\n ) {\r\n this.replayService.nextStep();\r\n try {\r\n const result = await this.modeler.saveSVG({});\r\n this.fixActivityMarkersForEachStep(\r\n result,\r\n this.replayService.getCurrentStepNumber()\r\n );\r\n svgData.push({\r\n content: HtmlPresentationService.createSVGData(result.svg),\r\n transition: 'slide',\r\n });\r\n } catch (err) {\r\n alert('There was an error exporting the SVG.\\n' + err);\r\n }\r\n }\r\n this.replayService.stopReplay();\r\n\r\n // create download for presentation\r\n const revealjsTemplate = document.getElementById('revealjs-template');\r\n const dots = doT.template(revealjsTemplate?.innerHTML);\r\n const revealjsData = {\r\n script: 'script',\r\n title: this.titleService.getTitle(),\r\n description: this.titleService.getDescription(),\r\n sentences: svgData,\r\n multiplexSecret: this.multiplexSecret,\r\n multiplexId: this.multiplexId,\r\n };\r\n const element = document.createElement('a');\r\n element.setAttribute(\r\n 'href',\r\n 'data:text/html;charset=UTF-8,' +\r\n this.fixMalformedHtmlScript(dots, revealjsData)\r\n );\r\n element.setAttribute('download', sanitizeForDesktop(filename) + '.html');\r\n element.style.display = 'none';\r\n document.body.appendChild(element);\r\n element.click();\r\n document.body.removeChild(element);\r\n }\r\n\r\n private fixMalformedHtmlScript(\r\n dots: any,\r\n revealjsData: {\r\n multiplexId: any;\r\n sentences: any[];\r\n multiplexSecret: any;\r\n description: string;\r\n title: string;\r\n script: string;\r\n }\r\n ) {\r\n return dots(revealjsData).replace(''),\r\n result.svg.indexOf('') + 7\r\n );\r\n const split = defs.split(' {\r\n const idToReplace = id.substring(4, id.length - 1);\r\n const newId =\r\n idToReplace.slice(0, id.length - 5) +\r\n 'customId' +\r\n sectionIndex +\r\n idToReplace.slice(idToReplace.length - 2);\r\n // @ts-ignore\r\n result.svg = result.svg.replaceAll(idToReplace, newId);\r\n });\r\n newDefs += '= 72) {\r\n fix = true;\r\n // https://www.chromestatus.com/features/5656049583390720\r\n }\r\n } else if (name.includes('Firefox')) {\r\n fix = true;\r\n\r\n // versionNumber of implementation unknown\r\n }\r\n if (fix) {\r\n while (svg.includes('#')) {\r\n svg = svg.replace('#', '%23');\r\n }\r\n }\r\n return svg;\r\n }\r\n\r\n findMostOuterElements(svg: HTMLElement): Box {\r\n let xLeft = 0;\r\n let xRight = 0;\r\n let yUp = 0;\r\n let yDown = 0;\r\n\r\n const elements = svg.getElementsByClassName('djs-group');\r\n\r\n // tslint:disable-next-line:prefer-for-of\r\n for (let i = 0; i < elements.length; i++) {\r\n const element = elements[i];\r\n const sub = element.children;\r\n\r\n let elXLeft: number;\r\n let elXRight: number;\r\n let elYUp: number;\r\n let elYDown: number;\r\n\r\n const transform = sub[0].getAttribute('transform');\r\n if (transform) {\r\n let nums;\r\n\r\n if (transform.includes('matrix')) {\r\n transform.replace('matrix(', '');\r\n transform.replace(')', '');\r\n nums = transform.split(' ');\r\n elXLeft = parseInt(nums[4]);\r\n elYUp = parseInt(nums[5]);\r\n } else {\r\n transform.replace('translate(', '');\r\n transform.replace(')', '');\r\n nums = transform.split(' ');\r\n elXLeft = parseInt(nums[0]);\r\n elYUp = parseInt(nums[1]);\r\n }\r\n\r\n const rects = sub[0].getElementsByTagName('rect');\r\n const outerRect = rects[rects.length - 1];\r\n\r\n const width = outerRect.getAttribute('width');\r\n\r\n elXRight = elXLeft + parseInt(width != null ? width : '0');\r\n elYDown = elYUp + sub[0].getBoundingClientRect().height;\r\n } else {\r\n const rects = element.getElementsByTagName('rect');\r\n const outerRect = rects[rects.length - 1];\r\n\r\n const x = outerRect.getAttribute('x');\r\n const y = outerRect.getAttribute('y');\r\n\r\n elXLeft = parseInt(x != null ? x : '0');\r\n elYUp = parseInt(y != null ? y : '0');\r\n\r\n const width = outerRect.getAttribute('width');\r\n const height = outerRect.getAttribute('height');\r\n\r\n elXRight = elXLeft + parseInt(width != null ? width : '0');\r\n elYDown = elYUp + parseInt(height != null ? height : '0') + 20; // Add 20 px as Padding for text at the bottom\r\n }\r\n if (elXLeft < xLeft) {\r\n xLeft = elXLeft;\r\n }\r\n if (elXRight > xRight) {\r\n xRight = elXRight;\r\n }\r\n if (elYUp < yUp) {\r\n yUp = elYUp;\r\n }\r\n if (elYDown > yDown) {\r\n yDown = elYDown;\r\n }\r\n }\r\n\r\n yUp -= 75; // we need to adjust yUp to have space for the title and description\r\n\r\n return {\r\n xLeft,\r\n xRight,\r\n yUp,\r\n yDown,\r\n };\r\n }\r\n\r\n prepareSVG(\r\n svg: string,\r\n layerBase: any,\r\n description: string,\r\n title: string,\r\n withTitle: boolean\r\n ): string {\r\n const box = this.findMostOuterElements(layerBase);\r\n let viewBoxIndex = svg.indexOf('width=\"');\r\n\r\n this.calculateWidthAndHeight(box);\r\n\r\n const { insertText, extraHeight } = createTitleAndDescriptionSVGElement(\r\n title,\r\n description,\r\n box.xLeft,\r\n box.yUp + 20,\r\n this.width\r\n );\r\n if (withTitle) {\r\n this.height += extraHeight;\r\n }\r\n\r\n const bounds = this.createBounds(box, extraHeight);\r\n\r\n const dataStart = svg.substring(0, viewBoxIndex);\r\n viewBoxIndex = svg.indexOf('style=\"');\r\n\r\n const dataEnd = svg.substring(viewBoxIndex);\r\n dataEnd.substring(viewBoxIndex);\r\n\r\n svg = dataStart + bounds + dataEnd;\r\n\r\n const insertIndex = svg.indexOf('') + 20;\r\n\r\n if (withTitle) {\r\n svg = [\r\n svg.slice(0, insertIndex),\r\n insertText,\r\n svg.slice(insertIndex),\r\n ].join('');\r\n }\r\n svg = this.URIHashtagFix(svg);\r\n\r\n return svg;\r\n }\r\n\r\n private createBounds(box: Box, extraHeight: number) {\r\n return (\r\n 'width=\"' +\r\n this.width +\r\n '\" height=\"' +\r\n this.height +\r\n '\" viewBox=\" ' +\r\n box.xLeft +\r\n ' ' +\r\n (box.yUp - extraHeight) +\r\n ' ' +\r\n this.width +\r\n ' ' +\r\n this.height +\r\n '\" '\r\n );\r\n }\r\n\r\n /**\r\n * Calculate the Width and Height of the Bounding Box for the PNG so no Parts are cut off\r\n * TODO Longer Iconnames can still be cut of, when the Element is the lowest Object on the canvas, same for Activities\r\n */\r\n private calculateWidthAndHeight(box: Box): [number, number] {\r\n if (box.xLeft < 0) {\r\n if (box.xRight < 0) {\r\n this.width = Math.abs(box.xLeft - box.xRight);\r\n } else {\r\n this.width = Math.abs(box.xLeft) + box.xRight;\r\n }\r\n } else {\r\n this.width = box.xRight - box.xLeft;\r\n }\r\n\r\n if (box.yUp < 0) {\r\n if (box.yDown < 0) {\r\n this.height = Math.abs(box.yUp - box.yDown);\r\n } else {\r\n this.height = Math.abs(box.yUp) + box.yDown;\r\n }\r\n } else {\r\n this.height = box.yDown - box.yUp;\r\n }\r\n\r\n // if the domain-Story is smaller than 300px in width or height, increase its dimensions\r\n if (this.height < 300) {\r\n this.height += 300;\r\n box.yUp -= 150;\r\n box.yDown += 150;\r\n }\r\n if (this.width < 300) {\r\n this.width += 300;\r\n box.xLeft -= 150;\r\n box.xRight += 150;\r\n }\r\n return [this.height, this.width];\r\n }\r\n\r\n extractSVG(viewport: any, outerSVGElement: any): string {\r\n const layerResizers = viewport.getElementsByClassName('layer-resizers');\r\n const layerOverlays = viewport.getElementsByClassName('layer-overlays');\r\n const transform = viewport.getAttribute('transform');\r\n const translate = viewport.getAttribute('translate');\r\n\r\n if (layerResizers[0]) {\r\n layerResizers[0].parentNode.removeChild(layerResizers[0]);\r\n }\r\n if (layerOverlays[0]) {\r\n layerOverlays[0].parentNode.removeChild(layerOverlays[0]);\r\n }\r\n\r\n // remove canvas scrolling and scaling before serializeToString of SVG\r\n if (transform) {\r\n viewport.removeAttribute('transform');\r\n }\r\n if (translate) {\r\n viewport.removeAttribute('translate');\r\n }\r\n\r\n const svg = new XMLSerializer().serializeToString(outerSVGElement);\r\n\r\n // re-add canvas scrolling and scaling\r\n if (transform) {\r\n viewport.setAttribute('transform', transform);\r\n }\r\n if (translate) {\r\n viewport.setAttribute('translate', translate);\r\n }\r\n return svg;\r\n }\r\n\r\n getWidth(): number {\r\n return this.width;\r\n }\r\n\r\n getHeight(): number {\r\n return this.height;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ConfigAndDST } from 'src/app/Domain/Export/configAndDst';\r\nimport { createTitleAndDescriptionSVGElement } from 'src/app/Service/Export/exportUtil';\r\nimport { ModelerService } from '../Modeler/modeler.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SvgService {\r\n private cacheData = '';\r\n\r\n constructor(private modelerService: ModelerService) {}\r\n\r\n createSVGData(\r\n title: string,\r\n description: string,\r\n dst: ConfigAndDST,\r\n withTitle: boolean\r\n ): string {\r\n this.cacheData = this.modelerService.getEncoded();\r\n\r\n let data = structuredClone(this.cacheData);\r\n\r\n let viewBoxIndex = data.indexOf('width=\"');\r\n\r\n let { width, height, viewBox } = this.viewBoxCoordinates(data);\r\n\r\n let xLeft: number;\r\n let xRight: number;\r\n let yUp: number;\r\n let yDown: number;\r\n const splitViewBox = viewBox.split(/\\s/);\r\n\r\n xLeft = +splitViewBox[0];\r\n yUp = +splitViewBox[1];\r\n xRight = +splitViewBox[2];\r\n yDown = +splitViewBox[3];\r\n\r\n if (xRight < 300) {\r\n xRight += 300;\r\n width += 300;\r\n }\r\n\r\n const { insertText, extraHeight } = createTitleAndDescriptionSVGElement(\r\n title,\r\n description,\r\n xLeft,\r\n yUp,\r\n width\r\n );\r\n if (withTitle) {\r\n // to display the title and description in the SVG-file, we need to add a container for the text-elements\r\n height += extraHeight + 80;\r\n }\r\n\r\n const svgIndex = data.indexOf('width=\"');\r\n const backgroundColorWhite = 'style=\"background-color:white\" ';\r\n data = [\r\n data.slice(0, svgIndex),\r\n backgroundColorWhite,\r\n data.slice(svgIndex),\r\n ].join('');\r\n\r\n const bounds = this.createBounds(\r\n width,\r\n height,\r\n xLeft,\r\n yUp,\r\n xRight,\r\n yDown,\r\n withTitle\r\n );\r\n\r\n const dataStart = data.substring(0, viewBoxIndex);\r\n viewBoxIndex = data.indexOf('\" version');\r\n\r\n const dataEnd = data.substring(viewBoxIndex);\r\n dataEnd.substring(viewBoxIndex);\r\n\r\n data = dataStart + bounds + dataEnd;\r\n\r\n const insertIndex = this.findIndexToInsertData(data);\r\n\r\n if (withTitle) {\r\n data = [\r\n data.slice(0, insertIndex),\r\n insertText,\r\n data.slice(insertIndex),\r\n ].join('');\r\n }\r\n\r\n return this.appendDST(data, dst);\r\n }\r\n\r\n private findIndexToInsertData(data: string) {\r\n let insertIndex = data.indexOf('');\r\n if (insertIndex < 0) {\r\n insertIndex = data.indexOf('version=\"1.2\">') + 14;\r\n } else {\r\n insertIndex += 7;\r\n }\r\n return insertIndex;\r\n }\r\n\r\n private createBounds(\r\n width: number,\r\n height: number,\r\n xLeft: number,\r\n yUp: number,\r\n xRight: number,\r\n yDown: number,\r\n withTitle: boolean\r\n ): string {\r\n return (\r\n 'width=\"' +\r\n width +\r\n '\" height=\" ' +\r\n height +\r\n '\" viewBox=\"' +\r\n xLeft +\r\n ' ' +\r\n (withTitle ? yUp - 80 : yUp) +\r\n ' ' +\r\n xRight +\r\n ' ' +\r\n (yDown + 30)\r\n );\r\n }\r\n\r\n private viewBoxCoordinates(svg: string): {\r\n width: number;\r\n height: number;\r\n viewBox: string;\r\n } {\r\n const ViewBoxCoordinate =\r\n /width=\"([^\"]+)\"\\s+height=\"([^\"]+)\"\\s+viewBox=\"([^\"]+)\"/;\r\n const match = svg.match(ViewBoxCoordinate);\r\n if (match) {\r\n return { width: +match[1], height: +match[2], viewBox: match[3] };\r\n }\r\n return { width: 0, height: 0, viewBox: '' };\r\n }\r\n\r\n private appendDST(data: string, dst: ConfigAndDST): string {\r\n data += '\\n';\r\n return data;\r\n }\r\n}\r\n","import { EventEmitter, Injectable, OnDestroy } from '@angular/core';\r\nimport { IconDictionaryService } from 'src/app/Service/DomainConfiguration/icon-dictionary.service';\r\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\r\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\r\nimport { TitleService } from 'src/app/Service/Title/title.service';\r\nimport { ImportRepairService } from 'src/app/Service/Import/import-repair.service';\r\nimport { Observable, Subscription } from 'rxjs';\r\nimport { RendererService } from 'src/app/Service/Renderer/renderer.service';\r\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\r\nimport {\r\n DomainConfiguration,\r\n fromConfigurationFromFile,\r\n} from 'src/app/Domain/Common/domainConfiguration';\r\nimport { DialogService } from '../Dialog/dialog.service';\r\nimport { InfoDialogComponent } from '../../Presentation/Dialog/info-dialog/info-dialog.component';\r\nimport { MatDialogConfig } from '@angular/material/dialog';\r\nimport { InfoDialogData } from '../../Domain/Dialog/infoDialogData';\r\nimport { restoreTitleFromFileName } from '../../Utils/sanitizer';\r\nimport {\r\n INITIAL_DESCRIPTION,\r\n INITIAL_TITLE,\r\n} from '../../Domain/Common/constants';\r\nimport { DomainConfigurationService } from '../DomainConfiguration/domain-configuration.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ImportDomainStoryService implements OnDestroy {\r\n titleSubscription: Subscription;\r\n descriptionSubscription: Subscription;\r\n\r\n title = INITIAL_TITLE;\r\n description = INITIAL_DESCRIPTION;\r\n private importedConfiguration: DomainConfiguration | null = null;\r\n\r\n private importedConfigurationEmitter =\r\n new EventEmitter();\r\n\r\n constructor(\r\n private iconDictionaryService: IconDictionaryService,\r\n private importRepairService: ImportRepairService,\r\n private titleService: TitleService,\r\n private rendererService: RendererService,\r\n private dialogService: DialogService,\r\n private domainConfigurationService: DomainConfigurationService\r\n ) {\r\n this.titleSubscription = this.titleService.title$.subscribe(\r\n (title: string) => {\r\n this.title = title;\r\n }\r\n );\r\n this.descriptionSubscription = this.titleService.description$.subscribe(\r\n (description: string) => {\r\n this.description = description;\r\n }\r\n );\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.titleSubscription.unsubscribe();\r\n this.descriptionSubscription.unsubscribe();\r\n }\r\n\r\n get importedConfigurationEvent(): Observable {\r\n return this.importedConfigurationEmitter.asObservable();\r\n }\r\n\r\n getImportedConfiguration(): DomainConfiguration {\r\n const config: DomainConfiguration = {\r\n name: this.importedConfiguration?.name || '',\r\n actors: this.importedConfiguration?.actors || new Dictionary(),\r\n workObjects: this.importedConfiguration?.workObjects || new Dictionary(),\r\n };\r\n this.importedConfiguration = null;\r\n return config;\r\n }\r\n\r\n importDST(input: Blob, filename: string, isSVG: boolean): void {\r\n const fileReader = new FileReader();\r\n const titleText = restoreTitleFromFileName(filename, isSVG);\r\n\r\n // no need to put this on the commandStack\r\n this.titleService.updateTitleAndDescription(titleText, null, false);\r\n\r\n fileReader.onloadend = (e) => {\r\n if (e && e.target) {\r\n this.fileReaderFunction(e.target.result, isSVG, false);\r\n }\r\n };\r\n\r\n fileReader.readAsText(input);\r\n }\r\n\r\n importEGN(input: Blob, filename: string, isSVG: boolean): void {\r\n const fileReader = new FileReader();\r\n const titleText = restoreTitleFromFileName(filename, isSVG);\r\n\r\n // no need to put this on the commandStack\r\n this.titleService.updateTitleAndDescription(titleText, null, false);\r\n\r\n fileReader.onloadend = (e) => {\r\n if (e && e.target) {\r\n this.fileReaderFunction(e.target.result, isSVG, true);\r\n }\r\n };\r\n\r\n fileReader.readAsText(input);\r\n }\r\n\r\n private fileReaderFunction(\r\n text: string | ArrayBuffer | null,\r\n isSVG: boolean,\r\n isEGN: boolean\r\n ): void {\r\n let dstText;\r\n if (typeof text === 'string') {\r\n if (isSVG) {\r\n dstText = this.removeXMLComments(text);\r\n } else {\r\n dstText = text;\r\n }\r\n\r\n let elements: any[];\r\n let config: DomainConfiguration;\r\n let configFromFile: {\r\n name: string;\r\n actors: { [key: string]: any };\r\n workObjects: { [key: string]: any };\r\n };\r\n\r\n let dstAndConfig = this.extractDstAndConfig(dstText, isSVG);\r\n if (dstAndConfig == null) {\r\n return;\r\n }\r\n\r\n // current implementation\r\n if (dstAndConfig.domain) {\r\n configFromFile = isEGN\r\n ? dstAndConfig.domain\r\n : JSON.parse(dstAndConfig.domain);\r\n config = fromConfigurationFromFile(configFromFile);\r\n elements = isEGN ? dstAndConfig.dst : JSON.parse(dstAndConfig.dst);\r\n } else {\r\n // legacy implementation\r\n if (dstAndConfig.config) {\r\n configFromFile = JSON.parse(dstAndConfig.config);\r\n config = fromConfigurationFromFile(configFromFile);\r\n elements = JSON.parse(dstAndConfig.dst);\r\n } else {\r\n // implementation prior to configuration\r\n elements = JSON.parse(dstText);\r\n config =\r\n this.domainConfigurationService.createMinimalConfigurationWithDefaultIcons();\r\n }\r\n }\r\n\r\n const configChanged = this.checkConfigForChanges(config);\r\n\r\n let lastElement = elements[elements.length - 1];\r\n if (!lastElement.id) {\r\n lastElement = elements.pop();\r\n let importVersionNumber = lastElement;\r\n\r\n // if the last element has the importedVersionNumber has the tag version,\r\n // then there exists another meta tag 'info' for the description\r\n if (importVersionNumber.version) {\r\n lastElement = elements.pop();\r\n }\r\n\r\n if (importVersionNumber.version) {\r\n importVersionNumber = importVersionNumber.version as string;\r\n } else {\r\n importVersionNumber = '?';\r\n // TODO show error for unreadable version number\r\n }\r\n elements = this.handleVersionNumber(importVersionNumber, elements);\r\n }\r\n\r\n if (\r\n !this.importRepairService.checkForUnreferencedElementsInActivitiesAndRepair(\r\n elements\r\n )\r\n ) {\r\n this.showBrokenImportDialog(isSVG ? 'SVG' : 'DST');\r\n }\r\n\r\n this.titleService.updateTitleAndDescription(\r\n null,\r\n lastElement.info,\r\n false\r\n );\r\n\r\n this.importRepairService.adjustPositions(elements);\r\n\r\n this.updateIconRegistries(elements, config);\r\n this.rendererService.importStory(elements, configChanged, config);\r\n }\r\n }\r\n\r\n private handleVersionNumber(\r\n importVersionNumber: string,\r\n elements: BusinessObject[]\r\n ): BusinessObject[] {\r\n const versionPrefix = +importVersionNumber.substring(\r\n 0,\r\n importVersionNumber.lastIndexOf('.')\r\n );\r\n if (versionPrefix <= 0.5) {\r\n elements =\r\n this.importRepairService.updateCustomElementsPreviousV050(elements);\r\n this.showPreviousV050Dialog(versionPrefix);\r\n }\r\n return elements;\r\n }\r\n\r\n private extractDstAndConfig(dstText: string, isSVG: boolean) {\r\n let dstAndConfig = null;\r\n try {\r\n dstAndConfig = JSON.parse(dstText);\r\n } catch (e) {\r\n this.showBrokenImportDialog(isSVG ? 'SVG' : 'DST');\r\n }\r\n return dstAndConfig;\r\n }\r\n\r\n private removeXMLComments(xmlText: string): string {\r\n xmlText = xmlText.substring(xmlText.indexOf(''));\r\n while (xmlText.includes('')) {\r\n xmlText = xmlText.replace('', '');\r\n }\r\n xmlText = xmlText.replace('', '');\r\n xmlText = xmlText.replace('', '');\r\n return xmlText;\r\n }\r\n\r\n checkConfigForChanges(domainConfiguration: DomainConfiguration): boolean {\r\n const newActorKeys = domainConfiguration.actors.keysArray();\r\n const newWorkObjectKeys = domainConfiguration.workObjects.keysArray();\r\n\r\n const currentActorKeys = this.iconDictionaryService.getTypeDictionaryKeys(\r\n elementTypes.ACTOR\r\n );\r\n const currentWorkobjectKeys =\r\n this.iconDictionaryService.getTypeDictionaryKeys(elementTypes.WORKOBJECT);\r\n\r\n let changed = false;\r\n\r\n if (\r\n newActorKeys.length !== currentActorKeys.length ||\r\n newWorkObjectKeys.length !== currentWorkobjectKeys.length\r\n ) {\r\n return true;\r\n }\r\n\r\n for (let i = 0; i < newActorKeys.length; i++) {\r\n changed =\r\n this.clearName(currentActorKeys[i]) !== this.clearName(newActorKeys[i]);\r\n if (changed) {\r\n i = newActorKeys.length;\r\n }\r\n }\r\n if (changed) {\r\n return changed;\r\n }\r\n for (let i = 0; i < newWorkObjectKeys.length; i++) {\r\n changed =\r\n this.clearName(currentWorkobjectKeys[i]) !==\r\n this.clearName(newWorkObjectKeys[i]);\r\n if (changed) {\r\n i = newWorkObjectKeys.length;\r\n }\r\n }\r\n return changed;\r\n }\r\n private clearName(name: string): string {\r\n return name\r\n .replace(elementTypes.ACTOR, '')\r\n .replace(elementTypes.WORKOBJECT, '');\r\n }\r\n\r\n private updateIconRegistries(\r\n elements: BusinessObject[],\r\n config: DomainConfiguration\r\n ): void {\r\n const actorIcons = this.iconDictionaryService.getElementsOfType(\r\n elements,\r\n elementTypes.ACTOR\r\n );\r\n const workObjectIcons = this.iconDictionaryService.getElementsOfType(\r\n elements,\r\n elementTypes.WORKOBJECT\r\n );\r\n this.iconDictionaryService.updateIconRegistries(\r\n actorIcons,\r\n workObjectIcons,\r\n config\r\n );\r\n\r\n this.setImportedConfigurationAndEmit(config);\r\n }\r\n\r\n private showPreviousV050Dialog(version: number): void {\r\n const title = 'Compatability-Warning';\r\n const text =\r\n 'The uploaded Domain-Story is from version ' +\r\n version +\r\n '. There may be problems with the default actors or workobjects contained in the story.';\r\n\r\n const config = new MatDialogConfig();\r\n config.disableClose = false;\r\n config.autoFocus = true;\r\n\r\n config.data = new InfoDialogData(title, text, true);\r\n\r\n this.dialogService.openDialog(InfoDialogComponent, config);\r\n }\r\n\r\n private setImportedConfigurationAndEmit(config: DomainConfiguration) {\r\n this.importedConfiguration = config;\r\n this.importedConfigurationEmitter.emit(config);\r\n }\r\n\r\n private showBrokenImportDialog(type: string) {\r\n const config = new MatDialogConfig();\r\n config.disableClose = false;\r\n config.autoFocus = true;\r\n config.data = new InfoDialogData(\r\n 'Error during import',\r\n 'The uploaded ' +\r\n type +\r\n ' is not complete, there could be elements missing from the canvas.',\r\n true,\r\n false\r\n );\r\n\r\n this.dialogService.openDialog(InfoDialogComponent, config);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\r\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\r\nimport { Waypoint } from 'src/app/Domain/Common/waypoint';\r\nimport { ActivityBusinessObject } from '../../Domain/Common/activityBusinessObject';\r\n\r\n/**\r\n * Repairs broken Domain Stories so that it can be rendered onto the canvas\r\n * by removing activities and connections that reference elements that don't exists\r\n */\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ImportRepairService {\r\n checkForUnreferencedElementsInActivitiesAndRepair(\r\n elements: BusinessObject[]\r\n ): boolean {\r\n const activities: ActivityBusinessObject[] = [];\r\n const objectIDs: string[] = [];\r\n\r\n let complete = true;\r\n\r\n elements.forEach((element) => {\r\n const type = element.type;\r\n if (type === elementTypes.ACTIVITY || type === elementTypes.CONNECTION) {\r\n activities.push(element as ActivityBusinessObject);\r\n } else {\r\n objectIDs.push(element.id);\r\n }\r\n });\r\n\r\n activities.forEach((activity) => {\r\n const source = activity.source;\r\n const target = activity.target;\r\n if (!objectIDs.includes(source) || !objectIDs.includes(target)) {\r\n complete = false;\r\n const activityIndex = elements.indexOf(activity);\r\n elements = elements.splice(activityIndex, 1);\r\n }\r\n });\r\n return complete;\r\n }\r\n\r\n /**\r\n * Ensure backwards compatibility.\r\n * Previously Document had no special name and was just addressed as workObject\r\n * Bubble was renamed to Conversation\r\n */\r\n updateCustomElementsPreviousV050(\r\n elements: BusinessObject[]\r\n ): BusinessObject[] {\r\n for (const element of elements) {\r\n if (element.type === elementTypes.WORKOBJECT) {\r\n element.type = elementTypes.WORKOBJECT + 'Document';\r\n } else if (element.type === elementTypes.WORKOBJECT + 'Bubble') {\r\n element.type = elementTypes.WORKOBJECT + 'Conversation';\r\n }\r\n }\r\n return elements;\r\n }\r\n\r\n /**\r\n * Adjusts Positions of Elements to ensure the Domain Story starts in the visible parts of the canvas\r\n */\r\n adjustPositions(elements: BusinessObject[]): void {\r\n let xLeft = 0;\r\n let yUp = 0;\r\n let isFirst = true;\r\n\r\n this.findFirstElement(elements, isFirst, xLeft, yUp);\r\n\r\n if (xLeft < 75 || xLeft > 150 || yUp < 0 || yUp > 50) {\r\n // add Padding for the Palette and the top\r\n xLeft -= 75;\r\n yUp -= 50;\r\n\r\n elements.forEach((element) =>\r\n this.adjustElementPosition(element, xLeft, yUp)\r\n );\r\n }\r\n }\r\n\r\n private adjustElementPosition(\r\n element: BusinessObject,\r\n xLeft: number,\r\n yUp: number\r\n ): void {\r\n if (\r\n element.type === elementTypes.ACTIVITY ||\r\n element.type === elementTypes.CONNECTION\r\n ) {\r\n const waypoints = (element as ActivityBusinessObject).waypoints;\r\n waypoints.forEach((point: Waypoint) => {\r\n point.x -= xLeft;\r\n point.y -= yUp;\r\n\r\n if (point.original) {\r\n point.original.x = point.x;\r\n point.original.y = point.y;\r\n }\r\n });\r\n } else {\r\n element.x -= xLeft;\r\n element.y -= yUp;\r\n }\r\n }\r\n\r\n private findFirstElement(\r\n elements: BusinessObject[],\r\n isFirst: boolean,\r\n xLeft: number,\r\n yUp: number\r\n ) {\r\n elements.forEach((element) => {\r\n let elXLeft;\r\n let elYUp;\r\n if (\r\n element.type !== elementTypes.ACTIVITY &&\r\n element.type !== elementTypes.CONNECTION\r\n ) {\r\n if (isFirst) {\r\n xLeft = element.x;\r\n yUp = element.y;\r\n isFirst = false;\r\n }\r\n elXLeft = element.x;\r\n elYUp = element.y;\r\n if (elXLeft < xLeft) {\r\n xLeft = elXLeft;\r\n }\r\n if (elYUp < yUp) {\r\n yUp = elYUp;\r\n }\r\n }\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\r\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\r\nimport { MassNamingService } from 'src/app/Service/LabelDictionary/mass-naming.service';\r\nimport { IconDictionaryService } from '../DomainConfiguration/icon-dictionary.service';\r\nimport { WorkObjectLabelEntry } from '../../Domain/LabelDictionary/workObjectLabelEntry';\r\nimport { LabelEntry } from '../../Domain/LabelDictionary/labelEntry';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class LabelDictionaryService {\r\n activityLabels: LabelEntry[] = [];\r\n workObjektLabels: WorkObjectLabelEntry[] = [];\r\n\r\n constructor(\r\n private massNamingService: MassNamingService,\r\n private elementRegistryService: ElementRegistryService,\r\n private iconDictionaryService: IconDictionaryService\r\n ) {}\r\n\r\n createLabelDictionaries(): void {\r\n this.activityLabels = [];\r\n this.workObjektLabels = [];\r\n\r\n const allObjects = this.elementRegistryService.getAllCanvasObjects();\r\n\r\n allObjects.forEach((element) => {\r\n const name = element.businessObject.name;\r\n if (\r\n name &&\r\n name.length > 0 &&\r\n element.type.includes(elementTypes.ACTIVITY) &&\r\n !this.activityLabels.map((a) => a.name).includes(name)\r\n ) {\r\n this.activityLabels.push({\r\n name,\r\n originalName: name,\r\n });\r\n } else if (\r\n name &&\r\n name.length > 0 &&\r\n element.type.includes(elementTypes.WORKOBJECT) &&\r\n !this.workObjektLabels.map((e) => e.name).includes(name)\r\n ) {\r\n const iconName = element.type.replace(elementTypes.WORKOBJECT, '');\r\n let icon = this.iconDictionaryService.getIconSource(iconName);\r\n if (!icon) {\r\n return;\r\n }\r\n if (!icon.startsWith('data')) {\r\n icon = 'data:image/svg+xml,' + icon;\r\n }\r\n this.workObjektLabels.push({\r\n name,\r\n originalName: name,\r\n icon,\r\n });\r\n }\r\n });\r\n this.activityLabels.sort((a, b) => {\r\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\r\n });\r\n this.workObjektLabels.sort((a, b) => {\r\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\r\n });\r\n }\r\n\r\n getActivityLabels(): LabelEntry[] {\r\n return this.activityLabels.slice();\r\n }\r\n\r\n getWorkObjectLabels(): WorkObjectLabelEntry[] {\r\n return this.workObjektLabels.slice();\r\n }\r\n\r\n massRenameLabels(\r\n activityNames: string[],\r\n originalActivityNames: string[],\r\n workObjectNames: string[],\r\n originalWorkObjectNames: string[]\r\n ): void {\r\n for (let i = 0; i < originalActivityNames.length; i++) {\r\n if (!activityNames[i]) {\r\n activityNames[i] = '';\r\n }\r\n if (!(activityNames[i] == originalActivityNames[i])) {\r\n this.massNamingService.massChangeNames(\r\n originalActivityNames[i],\r\n activityNames[i],\r\n elementTypes.ACTIVITY\r\n );\r\n }\r\n }\r\n for (let i = 0; i < originalWorkObjectNames.length; i++) {\r\n if (!workObjectNames[i]) {\r\n workObjectNames[i] = '';\r\n }\r\n if (!(workObjectNames[i] == originalWorkObjectNames[i])) {\r\n this.massNamingService.massChangeNames(\r\n originalWorkObjectNames[i],\r\n workObjectNames[i],\r\n elementTypes.WORKOBJECT\r\n );\r\n }\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\r\nimport { CanvasObject } from 'src/app/Domain/Common/canvasObject';\r\nimport { elementTypes } from '../../Domain/Common/elementTypes';\r\nimport { CommandStackService } from '../CommandStack/command-stack.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class MassNamingService {\r\n constructor(\r\n private elementRegistryService: ElementRegistryService,\r\n private commandStackService: CommandStackService\r\n ) {}\r\n\r\n massChangeNames(\r\n oldValue: string,\r\n newValue: string,\r\n type: elementTypes\r\n ): void {\r\n const allRelevantObjects: CanvasObject[] = [];\r\n\r\n this.elementRegistryService.getAllCanvasObjects().forEach((element) => {\r\n if (\r\n element.type.includes(type) &&\r\n element.businessObject.name === oldValue\r\n ) {\r\n allRelevantObjects.push(element);\r\n }\r\n });\r\n\r\n const context = {\r\n elements: allRelevantObjects,\r\n newValue,\r\n };\r\n\r\n this.commandStackService.execute('domainStoryObjects.massRename', context);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport { initializeContextPadProvider } from '../../Modeler/modeler/context-pad/domainStoryContextPadProvider';\r\nimport {\r\n getMultipleNumberRegistry,\r\n getNumberRegistry,\r\n initializeNumbering,\r\n setNumberIsMultiple,\r\n updateExistingNumbersAtEditing,\r\n} from '../../Modeler/modeler/numbering/numbering';\r\nimport { initializePalette } from '../../Modeler/modeler/palette/domainStoryPalette';\r\nimport { initializeRenderer } from '../../Modeler/modeler/domainStoryRenderer';\r\nimport {\r\n initializeLabelEditingProvider,\r\n toggleStashUse,\r\n} from '../../Modeler/modeler/labeling/dsLabelEditingProvider';\r\nimport { initializeReplaceOptions } from '../../Modeler/modeler/change-icon/replaceOptions';\r\n\r\nimport { DirtyFlagService } from '../DirtyFlag/dirty-flag.service';\r\nimport { IconDictionaryService } from '../DomainConfiguration/icon-dictionary.service';\r\nimport { ElementRegistryService } from '../ElementRegistry/element-registry.service';\r\nimport { DomainConfigurationService } from '../DomainConfiguration/domain-configuration.service';\r\nimport { LabelDictionaryService } from '../LabelDictionary/label-dictionary.service';\r\nimport { elementTypes } from '../../Domain/Common/elementTypes';\r\nimport { ReplayStateService } from '../Replay/replay-state.service';\r\nimport { MatDialogConfig } from '@angular/material/dialog';\r\nimport { ActivityDialogData } from '../../Domain/Dialog/activityDialogData';\r\nimport { ActivityDialogComponent } from '../../Presentation/Dialog/activity-dialog/activity-dialog.component';\r\nimport { DialogService } from '../Dialog/dialog.service';\r\nimport massRenameHandler from '../../Modeler/modeler/updateHandler/massRenameHandler';\r\nimport headlineAndDescriptionUpdateHandler from '../../Modeler/modeler/updateHandler/headlineAndDescriptionUpdateHandler';\r\nimport { TitleService } from '../Title/title.service';\r\nimport { ActivityCanvasObject } from '../../Domain/Common/activityCanvasObject';\r\nimport { HtmlPresentationService } from '../Export/html-presentation.service';\r\nimport { positionsMatch } from '../../Utils/mathExtensions';\r\nimport activityUpdateHandler, {\r\n initializeActivityUpdateHandler,\r\n} from '../../Modeler/modeler/updateHandler/activityUpdateHandlers';\r\nimport elementUpdateHandler from '../../Modeler/modeler/updateHandler/elementUpdateHandler';\r\nimport { CommandStackService } from '../CommandStack/command-stack.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class InitializerService {\r\n constructor(\r\n private dirtyFlagService: DirtyFlagService,\r\n private iconDictionaryService: IconDictionaryService,\r\n private elementRegistryService: ElementRegistryService,\r\n private configurationService: DomainConfigurationService,\r\n private labelDictionaryService: LabelDictionaryService,\r\n private replayStateService: ReplayStateService,\r\n private dialogService: DialogService,\r\n private commandStackService: CommandStackService,\r\n private titleService: TitleService,\r\n private htmlPresentationService: HtmlPresentationService\r\n ) {}\r\n\r\n initializeDomainStoryModelerClasses(): void {\r\n initializeContextPadProvider(\r\n this.dirtyFlagService,\r\n this.iconDictionaryService\r\n );\r\n /** The Palette and the Context Menu need the Icons present in the Domain,\r\n * so the IconDictionaryService and the DomainConfigurationService needs to be given to the Palette **/\r\n initializePalette(this.iconDictionaryService, this.configurationService);\r\n initializeRenderer(\r\n this.iconDictionaryService,\r\n this.elementRegistryService,\r\n this.dirtyFlagService\r\n );\r\n initializeLabelEditingProvider(this.labelDictionaryService);\r\n initializeReplaceOptions(this.iconDictionaryService);\r\n initializeNumbering(this.elementRegistryService);\r\n initializeActivityUpdateHandler(this.elementRegistryService);\r\n }\r\n\r\n propagateDomainStoryModelerClassesToServices(\r\n commandStack: any,\r\n elementRegistry: any,\r\n canvas: any,\r\n selection: any,\r\n modeler: any\r\n ): void {\r\n this.commandStackService.setCommandStack(commandStack);\r\n this.elementRegistryService.setElementRegistry(elementRegistry);\r\n this.htmlPresentationService.setModelerClasses(canvas, selection, modeler);\r\n }\r\n\r\n initializeDomainStoryModelerEventHandlers(\r\n commandStack: any,\r\n eventBus: any\r\n ): void {\r\n activityUpdateHandler(commandStack, eventBus);\r\n massRenameHandler(commandStack, eventBus);\r\n elementUpdateHandler(commandStack, eventBus);\r\n headlineAndDescriptionUpdateHandler(commandStack, this.titleService);\r\n }\r\n\r\n initiateEventBusListeners(eventBus: any, commandStack: any): void {\r\n eventBus.on('element.dblclick', (e: any) => {\r\n if (!this.replayStateService.getReplayOn()) {\r\n const element = e.element;\r\n if (element.type === elementTypes.ACTIVITY) {\r\n // override the doubleClickListener on activities\r\n this.activityDoubleClick(element, eventBus, commandStack);\r\n } else {\r\n const renderedNumberRegistry = getNumberRegistry();\r\n\r\n // add a DoubleClickListener to the number on activities\r\n if (renderedNumberRegistry.length > 1) {\r\n const allActivities =\r\n this.elementRegistryService.getActivitiesFromActors();\r\n\r\n if (allActivities.length > 0) {\r\n const htmlCanvas = document.getElementById('canvas');\r\n if (htmlCanvas) {\r\n const container =\r\n htmlCanvas.getElementsByClassName('djs-container');\r\n const svgElements = container[0].getElementsByTagName('svg');\r\n const outerSVGElement = svgElements[0];\r\n const viewport =\r\n outerSVGElement.getElementsByClassName('viewport')[0];\r\n let transform = viewport.getAttribute('transform');\r\n\r\n let transformX = 0;\r\n let transformY = 0;\r\n let zoomX = 1;\r\n let zoomY = 1;\r\n let nums;\r\n\r\n const clickX = e.originalEvent.offsetX;\r\n const clickY = e.originalEvent.offsetY;\r\n\r\n // adjust for zoom and panning\r\n if (transform) {\r\n transform = transform.replace('matrix(', '');\r\n transform.replace(')', '');\r\n nums = transform.split(',');\r\n zoomX = parseFloat(nums[0]);\r\n zoomY = parseFloat(nums[3]);\r\n transformX = parseInt(nums[4], undefined);\r\n transformY = parseInt(nums[5], undefined);\r\n }\r\n\r\n const width = 25 * zoomX;\r\n const height = 22 * zoomY;\r\n\r\n for (let i = 1; i < renderedNumberRegistry.length; i++) {\r\n const currentNum = renderedNumberRegistry[i];\r\n if (currentNum) {\r\n const tspan = currentNum.getElementsByTagName('tspan')[0];\r\n const tx = tspan.getAttribute('x');\r\n const ty = tspan.getAttribute('y');\r\n const tNumber = parseInt(tspan.innerHTML, undefined);\r\n\r\n const elementX = Math.floor(\r\n tx * zoomX + (transformX - 11 * zoomX)\r\n );\r\n const elementY = Math.floor(\r\n ty * zoomY + (transformY - 15 * zoomY)\r\n );\r\n\r\n allActivities.forEach((activity: ActivityCanvasObject) => {\r\n const activityNumber = activity.businessObject.number;\r\n if (activityNumber === tNumber) {\r\n if (\r\n positionsMatch(\r\n width,\r\n height,\r\n elementX,\r\n elementY,\r\n clickX,\r\n clickY\r\n )\r\n ) {\r\n this.activityDoubleClick(\r\n activity,\r\n eventBus,\r\n commandStack\r\n );\r\n }\r\n }\r\n });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n // when in replay, do not allow any interaction on the canvas\r\n eventBus.on(\r\n [\r\n 'element.click',\r\n 'element.dblclick',\r\n 'element.mousedown',\r\n 'drag.init',\r\n 'canvas.viewbox.changing',\r\n 'autoPlace',\r\n 'popupMenu.open',\r\n ],\r\n 10000000000,\r\n (event: any) => {\r\n if (this.replayStateService.getReplayOn()) {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n }\r\n }\r\n );\r\n }\r\n\r\n /** Overrrides for Canvas Functions **/\r\n private activityDoubleClick(\r\n activity: ActivityCanvasObject,\r\n eventBus: any,\r\n commandStack: any\r\n ): void {\r\n const source = activity.source;\r\n\r\n // ensure the right number when changing the direction of an activity\r\n toggleStashUse(false);\r\n\r\n const config = new MatDialogConfig();\r\n config.disableClose = false;\r\n config.autoFocus = true;\r\n\r\n if (\r\n activity.businessObject.number &&\r\n source &&\r\n source.type.includes(elementTypes.ACTOR)\r\n ) {\r\n config.data = new ActivityDialogData(\r\n activity,\r\n getMultipleNumberRegistry()[activity.businessObject.number],\r\n true,\r\n (data: any) => this.saveActivityInputLabel(data, eventBus, commandStack)\r\n );\r\n } else if (source && source.type.includes(elementTypes.WORKOBJECT)) {\r\n config.data = new ActivityDialogData(\r\n activity,\r\n false,\r\n false,\r\n (activityData: any) =>\r\n this.saveActivityInputLabel(activityData, eventBus, commandStack)\r\n );\r\n }\r\n this.dialogService.openDialog(ActivityDialogComponent, config);\r\n }\r\n\r\n private saveActivityInputLabel(\r\n activityData: any,\r\n eventBus: any,\r\n commandStack: any\r\n ): void {\r\n const label = activityData.activityLabel;\r\n const hasNumber = activityData.multipleNumbers !== undefined;\r\n const activityNumber = activityData.activityNumber;\r\n const multipleNumberAllowed = activityData.multipleNumbers;\r\n const element = activityData.activity;\r\n\r\n const activitiesFromActors =\r\n this.elementRegistryService.getActivitiesFromActors();\r\n const index = activitiesFromActors.indexOf(element);\r\n\r\n activitiesFromActors.splice(index, 1);\r\n if (hasNumber) {\r\n setNumberIsMultiple(activityNumber, multipleNumberAllowed);\r\n }\r\n element.businessObject.multipleNumberAllowed = multipleNumberAllowed;\r\n\r\n let options: any;\r\n if (hasNumber) {\r\n options = {\r\n businessObject: element.businessObject,\r\n newLabel: label,\r\n newNumber: activityNumber,\r\n element,\r\n };\r\n } else {\r\n options = {\r\n businessObject: element.businessObject,\r\n newLabel: label,\r\n element,\r\n };\r\n }\r\n\r\n commandStack.execute('activity.changed', options);\r\n if (element.businessObject.multipleNumberAllowed !== false) {\r\n if (getMultipleNumberRegistry()[activityNumber] === false) {\r\n updateExistingNumbersAtEditing(\r\n activitiesFromActors,\r\n activityNumber,\r\n eventBus\r\n );\r\n }\r\n } else if (element.businessObject.multipleNumberAllowed === false) {\r\n updateExistingNumbersAtEditing(\r\n activitiesFromActors,\r\n activityNumber,\r\n eventBus\r\n );\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { assign } from 'min-dash';\r\nimport DomainStoryModeler from 'src/app/Modeler';\r\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\r\nimport { InitializerService } from './initializer.service';\r\nimport { ElementRegistryService } from '../ElementRegistry/element-registry.service';\r\nimport { IconDictionaryService } from '../DomainConfiguration/icon-dictionary.service';\r\nimport { DomainConfigurationService } from '../DomainConfiguration/domain-configuration.service';\r\nimport { BusinessObject } from '../../Domain/Common/businessObject';\r\nimport { StorageService } from '../BrowserStorage/storage.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ModelerService {\r\n constructor(\r\n private initializerService: InitializerService,\r\n private elementRegistryService: ElementRegistryService,\r\n private iconDictionaryService: IconDictionaryService,\r\n private domainConfigurationService: DomainConfigurationService,\r\n private storageService: StorageService\r\n ) {}\r\n\r\n private modeler: any;\r\n private canvas: any;\r\n private elementRegistry: any;\r\n private commandStack: any;\r\n private selection: any;\r\n private eventBus: any;\r\n\r\n private encoded: string | undefined;\r\n\r\n postInit(): void {\r\n const storedDomainConfiguration =\r\n this.storageService.getStoredDomainConfiguration();\r\n if (storedDomainConfiguration) {\r\n this.iconDictionaryService.setCusomtConfiguration(\r\n storedDomainConfiguration\r\n );\r\n this.domainConfigurationService.loadConfiguration(\r\n storedDomainConfiguration\r\n );\r\n }\r\n this.initializerService.initializeDomainStoryModelerClasses();\r\n this.modeler = new DomainStoryModeler({\r\n container: '#canvas',\r\n keyboard: {\r\n bindTo: document,\r\n },\r\n\r\n // Disable BPMN-SearchModule and re-enable browser Search\r\n additionalModules: [\r\n {\r\n bpmnSearch: ['value', 'foo'],\r\n },\r\n ],\r\n });\r\n\r\n if (this.modeler.get) {\r\n this.canvas = this.modeler.get('canvas');\r\n this.elementRegistry = this.modeler.get('elementRegistry');\r\n this.eventBus = this.modeler.get('eventBus');\r\n this.commandStack = this.modeler.get('commandStack');\r\n this.selection = this.modeler.get('selection');\r\n }\r\n\r\n this.initializerService.initializeDomainStoryModelerEventHandlers(\r\n this.commandStack,\r\n this.eventBus\r\n );\r\n this.initializerService.propagateDomainStoryModelerClassesToServices(\r\n this.commandStack,\r\n this.elementRegistry,\r\n this.canvas,\r\n this.selection,\r\n this.modeler\r\n );\r\n\r\n const exportArtifacts = this.debounce(this.saveSVG, 500);\r\n if (this.modeler.get) {\r\n this.modeler.on('commandStack.changed', exportArtifacts);\r\n }\r\n\r\n this.initializerService.initiateEventBusListeners(\r\n this.eventBus,\r\n this.commandStack\r\n );\r\n\r\n this.modeler.createDiagram();\r\n // expose bpmnjs to window for debugging purposes\r\n assign(window, { bpmnjs: this.modeler });\r\n\r\n this.startDebounce();\r\n }\r\n\r\n restart(\r\n domainConfiguration?: DomainConfiguration,\r\n domainStory?: BusinessObject[]\r\n ): void {\r\n const currentStory =\r\n domainStory != undefined\r\n ? domainStory\r\n : this.elementRegistryService\r\n .createObjectListForDSTDownload()\r\n .map((e) => e.businessObject);\r\n if (!domainConfiguration) {\r\n domainConfiguration = this.storageService.getStoredDomainConfiguration();\r\n }\r\n if (domainConfiguration) {\r\n this.storageService.setStoredDomainConfiguration(domainConfiguration);\r\n this.iconDictionaryService.setCusomtConfiguration(domainConfiguration);\r\n this.domainConfigurationService.loadConfiguration(domainConfiguration);\r\n }\r\n\r\n this.elementRegistryService.clear();\r\n this.modeler?.destroy();\r\n this.postInit();\r\n if (currentStory && this.modeler.get) {\r\n this.modeler.importCustomElements(currentStory);\r\n }\r\n }\r\n\r\n /** Interactions with the Modeler **/\r\n getModeler(): any {\r\n return this.modeler;\r\n }\r\n\r\n commandStackChanged(): void {\r\n // to update the title of the svg, we need to tell the command stack, that a value has changed\r\n this.eventBus.fire(\r\n 'commandStack.changed',\r\n this.debounce(this.saveSVG, 500)\r\n );\r\n }\r\n\r\n startDebounce(): void {\r\n this.debounce(this.saveSVG, 500);\r\n }\r\n\r\n debounce(fn: any, timeout: number): any {\r\n return () => {\r\n let timer;\r\n if (timer) {\r\n clearTimeout(timer);\r\n }\r\n timer = setTimeout(() => {\r\n // tslint:disable-next-line:no-unused-expression\r\n fn(this.modeler).then((svg: string) => {\r\n this.encoded = svg;\r\n }) as Promise;\r\n }, timeout);\r\n };\r\n }\r\n\r\n getEncoded(): string {\r\n return this.encoded ? this.encoded : '';\r\n }\r\n\r\n async saveSVG(modeler: any): Promise {\r\n try {\r\n const result = await modeler.saveSVG();\r\n return result.svg;\r\n } catch (err) {\r\n alert('There was an error saving the SVG.\\n' + err);\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ModelerService } from 'src/app/Service/Modeler/modeler.service';\r\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\r\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\r\nimport { DirtyFlagService } from 'src/app/Service/DirtyFlag/dirty-flag.service';\r\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class RendererService {\r\n constructor(\r\n private modelerService: ModelerService,\r\n private elementRegistryService: ElementRegistryService,\r\n private dirtyFlagService: DirtyFlagService\r\n ) {}\r\n\r\n renderStory(domainStory: BusinessObject[]): void {\r\n this.modelerService.getModeler().importCustomElements(domainStory);\r\n }\r\n\r\n importStory(\r\n domainStory: BusinessObject[],\r\n configurationChange: boolean,\r\n config?: DomainConfiguration,\r\n makeClean = true\r\n ): void {\r\n this.modelerService.restart(config, domainStory);\r\n this.renderStory(domainStory);\r\n\r\n this.elementRegistryService.correctInitialize();\r\n\r\n this.modelerService.commandStackChanged();\r\n this.modelerService.startDebounce();\r\n\r\n if (makeClean) {\r\n this.dirtyFlagService.makeClean();\r\n }\r\n }\r\n\r\n getStory(): BusinessObject[] {\r\n return this.elementRegistryService\r\n .createObjectListForDSTDownload()\r\n .map((c) => c.businessObject);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ReplayStateService {\r\n private replayOnSubject = new BehaviorSubject(false);\r\n\r\n replayOn$ = this.replayOnSubject.asObservable();\r\n\r\n setReplayState(state: boolean): void {\r\n this.replayOnSubject.next(state);\r\n }\r\n\r\n getReplayOn(): boolean {\r\n return this.replayOnSubject.value;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ReplayStateService } from 'src/app/Service/Replay/replay-state.service';\r\nimport { DomManipulationService } from 'src/app/Service/DomManipulation/dom-manipulation.service';\r\nimport { StoryStep } from 'src/app/Domain/Replay/storyStep';\r\nimport { StoryCreatorService } from './storyCreator/story-creator.service';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { MatSnackBar } from '@angular/material/snack-bar';\r\nimport {\r\n SNACKBAR_DURATION,\r\n SNACKBAR_INFO,\r\n} from '../../Domain/Common/constants';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ReplayService {\r\n private story: StoryStep[] = [];\r\n private currentStep = new BehaviorSubject(-1);\r\n private maxStepNumber = new BehaviorSubject(0);\r\n\r\n currentStep$ = this.currentStep.asObservable();\r\n maxStepNumber$ = this.maxStepNumber.asObservable();\r\n\r\n constructor(\r\n private replayStateService: ReplayStateService,\r\n private domManipulationService: DomManipulationService,\r\n private storyCreatorService: StoryCreatorService,\r\n private snackbar: MatSnackBar\r\n ) {}\r\n\r\n initializeReplay(): void {\r\n this.currentStep.next(1);\r\n this.story = this.storyCreatorService.traceActivitiesAndCreateStory();\r\n this.maxStepNumber.next(this.story.length);\r\n }\r\n\r\n getCurrentStepNumber(): number {\r\n return this.currentStep.value;\r\n }\r\n\r\n getMaxStepNumber(): number {\r\n return this.maxStepNumber.value;\r\n }\r\n\r\n nextStep(): void {\r\n if (this.currentStep.value < this.story.length) {\r\n this.currentStep.next(this.currentStep.value + 1);\r\n this.showCurrentStep();\r\n }\r\n }\r\n\r\n previousStep(): void {\r\n if (this.currentStep.value > 1) {\r\n this.currentStep.next(this.currentStep.value - 1);\r\n this.showCurrentStep();\r\n }\r\n }\r\n\r\n private showCurrentStep() {\r\n this.domManipulationService.showStep(\r\n this.story[this.currentStep.value - 1],\r\n this.currentStep.value > 1\r\n ? this.story[this.currentStep.value - 2]\r\n : undefined\r\n );\r\n }\r\n\r\n startReplay(): void {\r\n this.initializeReplay();\r\n if (this.story?.length) {\r\n const missingSteps = this.storyCreatorService.getMissingSteps(this.story);\r\n if (missingSteps.length === 0) {\r\n this.replayStateService.setReplayState(true);\r\n this.domManipulationService.showStep(\r\n this.story[this.currentStep.getValue() - 1]\r\n );\r\n } else {\r\n const steps = missingSteps.join(', ');\r\n this.snackbar.open(\r\n steps.length === 1\r\n ? `The Domain Story is not complete. Step ${steps} is missing.`\r\n : `The Domain Story is not complete. Steps ${steps} are missing.`,\r\n undefined,\r\n {\r\n duration: SNACKBAR_DURATION * 2,\r\n panelClass: SNACKBAR_INFO,\r\n }\r\n );\r\n }\r\n } else {\r\n this.snackbar.open('You need a Domain Story for replay.', undefined, {\r\n duration: SNACKBAR_DURATION * 2,\r\n panelClass: SNACKBAR_INFO,\r\n });\r\n }\r\n }\r\n\r\n stopReplay(): void {\r\n this.currentStep.next(-1);\r\n this.maxStepNumber.next(0);\r\n this.replayStateService.setReplayState(false);\r\n this.domManipulationService.showAll();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { elementTypes } from '../../../Domain/Common/elementTypes';\r\nimport { ActivityCanvasObject } from '../../../Domain/Common/activityCanvasObject';\r\nimport { BusinessObject } from '../../../Domain/Common/businessObject';\r\nimport { CanvasObject } from '../../../Domain/Common/canvasObject';\r\nimport { ElementRegistryService } from '../../ElementRegistry/element-registry.service';\r\nimport { StoryStep } from '../../../Domain/Replay/storyStep';\r\nimport { Dictionary } from '../../../Domain/Common/dictionary/dictionary';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class StoryCreatorService {\r\n constructor(private elementRegistryService: ElementRegistryService) {}\r\n\r\n traceActivitiesAndCreateStory(): StoryStep[] {\r\n const tracedActivityMap = new Dictionary();\r\n const story: StoryStep[] = [];\r\n const activities = this.elementRegistryService.getActivitiesFromActors();\r\n\r\n activities.forEach((activity) => {\r\n const activityNumber = Number(activity.businessObject.number); // Sometimes the activityNumber is a string for some reason\r\n const tracedItem = tracedActivityMap.get(`${activityNumber - 1}`)\r\n ? tracedActivityMap.get(`${activityNumber - 1}`)\r\n : [];\r\n tracedItem.push(activity);\r\n tracedActivityMap.set(`${activityNumber - 1}`, tracedItem);\r\n });\r\n\r\n for (let i = 0; i < tracedActivityMap.keysArray().length; i++) {\r\n this.createStep(tracedActivityMap, i, story);\r\n }\r\n this.addGroupStep(story);\r\n return story;\r\n }\r\n\r\n private createStep(\r\n tracedActivityMap: Dictionary,\r\n i: number,\r\n story: StoryStep[]\r\n ): void {\r\n const stepObjects = this.getStepObjects(\r\n tracedActivityMap.get(`${i}`) || []\r\n );\r\n const highlightedElements = stepObjects.map((t) => t.id);\r\n if (i > 0) {\r\n story[i - 1].objects.forEach((object) => {\r\n if (!stepObjects.includes(object)) {\r\n stepObjects.push(object);\r\n }\r\n });\r\n }\r\n story[i] = {\r\n highlightedObjects: highlightedElements,\r\n objects: stepObjects,\r\n };\r\n }\r\n\r\n getMissingSteps(story: StoryStep[]): number[] {\r\n if (!story || story.length === 0) {\r\n return [];\r\n }\r\n\r\n const missingSteps: number[] = [];\r\n let complete = true;\r\n for (let i = 0; i < story.length; i++) {\r\n if (\r\n !story[i] ||\r\n !(story[i].objects.length > 0) ||\r\n story[i].objects.filter(\r\n (element) => element.type === elementTypes.ACTIVITY\r\n ).length <= 0\r\n ) {\r\n missingSteps.push(i + 1);\r\n complete = false;\r\n }\r\n }\r\n return missingSteps;\r\n }\r\n\r\n private getStepObjects(\r\n tracedActivity: ActivityCanvasObject[]\r\n ): BusinessObject[] {\r\n const initialSource: CanvasObject[] = [];\r\n const activities = tracedActivity;\r\n const targetObjects: CanvasObject[] = [];\r\n\r\n tracedActivity.forEach((parallelStep: ActivityCanvasObject) => {\r\n initialSource.push(parallelStep.source);\r\n\r\n const firstTarget = parallelStep.target;\r\n targetObjects.push(firstTarget);\r\n\r\n // check the outgoing activities for each target\r\n for (const checkTarget of targetObjects) {\r\n if (\r\n checkTarget.businessObject &&\r\n !checkTarget.businessObject.type.includes('actor') &&\r\n checkTarget.outgoing\r\n ) {\r\n // check the target for each outgoing activity\r\n checkTarget.outgoing.forEach((activity: ActivityCanvasObject) => {\r\n activities.push(activity);\r\n const activityTarget = activity.target;\r\n if (activityTarget && !targetObjects.includes(activityTarget)) {\r\n targetObjects.push(activityTarget);\r\n }\r\n });\r\n }\r\n }\r\n });\r\n return initialSource\r\n .map((e) => e.businessObject)\r\n .concat(activities.map((a) => a.businessObject))\r\n .concat(targetObjects.map((t) => t.businessObject));\r\n }\r\n\r\n /** Groups should be shown at the End of the Story **/\r\n private addGroupStep(story: StoryStep[]): void {\r\n const groups = this.elementRegistryService.getAllGroups() as CanvasObject[];\r\n if (groups.length > 0) {\r\n story.push({\r\n highlightedObjects: [],\r\n objects: groups\r\n .map((g) => g.businessObject)\r\n .concat(story[story.length - 1].objects),\r\n });\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SettingsService {\r\n private showSettings = new BehaviorSubject(false);\r\n showSettings$ = this.showSettings.asObservable();\r\n\r\n close(): void {\r\n this.showSettings.next(false);\r\n }\r\n\r\n open(): void {\r\n this.showSettings.next(true);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport {\r\n INITIAL_DESCRIPTION,\r\n INITIAL_DOMAIN_NAME,\r\n INITIAL_TITLE,\r\n VERSION,\r\n} from '../../Domain/Common/constants';\r\nimport { CommandStackService } from '../CommandStack/command-stack.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class TitleService {\r\n private titleSubject = new BehaviorSubject(INITIAL_TITLE);\r\n private descriptionSubject = new BehaviorSubject(INITIAL_DESCRIPTION);\r\n private domainNameSubject = new BehaviorSubject(INITIAL_DOMAIN_NAME);\r\n private showDescriptionSubject = new BehaviorSubject(true);\r\n\r\n title$ = this.titleSubject.asObservable();\r\n description$ = this.descriptionSubject.asObservable();\r\n showDescription$ = this.showDescriptionSubject.asObservable();\r\n domainName$ = this.domainNameSubject.asObservable();\r\n\r\n constructor(private commandStackService: CommandStackService) {}\r\n\r\n updateTitleAndDescription(\r\n title: string | null,\r\n description: string | null,\r\n allowUndo: boolean\r\n ): void {\r\n if (allowUndo) {\r\n this.fireTitleAndDescriptionUpdate(title, description);\r\n } else {\r\n this.updateTitle(title);\r\n this.updateDescription(description);\r\n }\r\n }\r\n\r\n private updateTitle(title: string | null): void {\r\n this.titleSubject.next(title ?? this.titleSubject.value);\r\n document.title = title ?? this.titleSubject.value + ' - egon.io';\r\n }\r\n\r\n private updateDescription(description: string | null): void {\r\n this.descriptionSubject.next(description ?? this.descriptionSubject.value);\r\n }\r\n\r\n setShowDescription(show: boolean): void {\r\n this.showDescriptionSubject.next(show);\r\n }\r\n\r\n setDomainName(name: string): void {\r\n this.domainNameSubject.next(name);\r\n }\r\n\r\n getTitle(): string {\r\n return this.titleSubject.value;\r\n }\r\n\r\n getDescription(): string {\r\n return this.descriptionSubject.value;\r\n }\r\n\r\n getDomainName(): string {\r\n return this.domainNameSubject.value;\r\n }\r\n\r\n getVersion(): string {\r\n return VERSION;\r\n }\r\n\r\n private fireTitleAndDescriptionUpdate(\r\n newTitle: string | null,\r\n newDescription: string | null\r\n ): void {\r\n const context = {\r\n newTitle,\r\n newDescription,\r\n };\r\n this.commandStackService.execute(\r\n 'story.updateHeadlineAndDescription',\r\n context\r\n );\r\n }\r\n}\r\n","'use strict';\r\n\r\n// convert rad to deg\r\nexport function degrees(radians: number): number {\r\n return (radians * 180) / Math.PI;\r\n}\r\n\r\n// calculate the angle between two points in 2D\r\nexport function angleBetween(\r\n startPoint: Point,\r\n endPoint: Point\r\n): number | undefined {\r\n let quadrant;\r\n\r\n // determine in which quadrant we are\r\n if (startPoint.x <= endPoint.x) {\r\n if (startPoint.y >= endPoint.y) {\r\n quadrant = 0;\r\n } // upper right quadrant\r\n else {\r\n quadrant = 3;\r\n } // lower right quadrant\r\n } else {\r\n if (startPoint.y >= endPoint.y) {\r\n quadrant = 1;\r\n } // upper left Quadrant\r\n else {\r\n quadrant = 2;\r\n } // lower left quadrant\r\n }\r\n\r\n const adjacent = Math.abs(startPoint.y - endPoint.y);\r\n const opposite = Math.abs(startPoint.x - endPoint.x);\r\n\r\n // since the arcus-tangens only gives values between 0 and 90, we have to adjust for the quadrant we are in\r\n\r\n if (quadrant === 0) {\r\n return 90 - degrees(Math.atan2(opposite, adjacent));\r\n }\r\n if (quadrant === 1) {\r\n return 90 + degrees(Math.atan2(opposite, adjacent));\r\n }\r\n if (quadrant === 2) {\r\n return 270 - degrees(Math.atan2(opposite, adjacent));\r\n }\r\n if (quadrant === 3) {\r\n return 270 + degrees(Math.atan2(opposite, adjacent));\r\n }\r\n return undefined;\r\n}\r\n\r\nexport function positionsMatch(\r\n width: number,\r\n height: number,\r\n elementX: number,\r\n elementY: number,\r\n clickX: number,\r\n clickY: number\r\n): boolean {\r\n if (clickX > elementX && clickX < elementX + width) {\r\n if (clickY > elementY && clickY < elementY + height) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\n\r\nexport class Point {\r\n y = 0;\r\n x = 0;\r\n}\r\n","import { elementTypes } from 'src/app/Domain/Common/elementTypes';\r\n\r\nexport function getNameFromType(type: string): string {\r\n if (type.includes(elementTypes.ACTOR)) {\r\n return type.replace(elementTypes.ACTOR, '');\r\n } else if (type.includes(elementTypes.WORKOBJECT)) {\r\n return type.replace(elementTypes.WORKOBJECT, '');\r\n }\r\n return '';\r\n}\r\n","'use strict';\r\n\r\n// sanitize user-Input to be Desktop-Filename safe\r\nexport function sanitizeForDesktop(str: string): string {\r\n const map: { [key: string]: string } = {\r\n '/': '',\r\n '\\\\': '',\r\n ':': '',\r\n '*': '',\r\n '?': '',\r\n '\"': '',\r\n '<': '',\r\n '>': '',\r\n '|': '',\r\n };\r\n const reg = /[/\\\\:*?\"<>|]/gi;\r\n return str ? str.replace(reg, (match) => map[match]) : '';\r\n}\r\n\r\nexport function sanitizeIconName(name: string): string {\r\n const map: { [key: string]: string } = {\r\n '/': '',\r\n '\\\\': '',\r\n ':': '',\r\n '*': '',\r\n '?': '',\r\n '\"': '',\r\n '<': '',\r\n '>': '',\r\n '|': '',\r\n '(': '',\r\n ')': '',\r\n ' ': '-',\r\n '.': '_',\r\n };\r\n const reg = /[/\\\\:*?\"<>|() .]/gi;\r\n return name\r\n ? name.replace(reg, (match) => {\r\n return map[match];\r\n })\r\n : '';\r\n}\r\n\r\nexport function restoreTitleFromFileName(\r\n filename: string,\r\n isSVG: boolean\r\n): string {\r\n let title;\r\n\r\n const dstRegex = /_\\d+-\\d+-\\d+( ?_?-?\\(\\d+\\))?(-?\\d)?(.dst|.egn)/;\r\n const svgRegex = /_\\d+-\\d+-\\d+( ?_?-?\\(\\d+\\))?(-?\\d)?(.dst|.egn).svg/;\r\n\r\n const egnSuffix = '.dst';\r\n const dstSuffix = '.dst';\r\n const svgSuffix = '.svg';\r\n\r\n let filenameWithoutDateSuffix = filename.replace(\r\n isSVG ? svgRegex : dstRegex,\r\n ''\r\n );\r\n if (filenameWithoutDateSuffix.includes(isSVG ? svgSuffix : dstSuffix)) {\r\n filenameWithoutDateSuffix = filenameWithoutDateSuffix\r\n .replace(svgSuffix, '')\r\n .replace(dstSuffix, '')\r\n .replace(egnSuffix, '');\r\n }\r\n title = filenameWithoutDateSuffix;\r\n return title;\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { SettingsService } from 'src/app/Service/Settings/settings.service';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\nimport { DialogService } from './Service/Dialog/dialog.service';\r\nimport { MatDialogConfig } from '@angular/material/dialog';\r\nimport { InfoDialogData } from './Domain/Dialog/infoDialogData';\r\nimport { InfoDialogComponent } from './Presentation/Dialog/info-dialog/info-dialog.component';\r\nimport { TitleService } from './Service/Title/title.service';\r\nimport { VERSION } from './Domain/Common/constants';\r\nimport { ExportService } from './Service/Export/export.service';\r\nimport { ReplayStateService } from './Service/Replay/replay-state.service';\r\nimport { ReplayService } from './Service/Replay/replay.service';\r\n\r\n@Component({\r\n selector: 'app-root',\r\n templateUrl: './app.component.html',\r\n styleUrls: ['./app.component.scss'],\r\n})\r\nexport class AppComponent implements OnInit {\r\n showSettings$: Observable | BehaviorSubject;\r\n showDescription$: Observable;\r\n version: string = '';\r\n\r\n constructor(\r\n private settingsService: SettingsService,\r\n private dialogService: DialogService,\r\n private titleService: TitleService,\r\n private exportService: ExportService,\r\n private replayStateSerice: ReplayStateService,\r\n private replayService: ReplayService\r\n ) {\r\n this.showSettings$ = new BehaviorSubject(false);\r\n this.showDescription$ = new BehaviorSubject(true);\r\n this.version = VERSION;\r\n\r\n document.onkeydown = (e: KeyboardEvent) => {\r\n if (e.ctrlKey && e.key === 's') {\r\n if (this.exportService.isDomainStoryExportable()) {\r\n this.exportService.downloadDST();\r\n }\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n if (e.ctrlKey && e.key === 'l') {\r\n document.getElementById('import')?.click();\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n if (e.key === 'ArrowRight' && this.replayStateSerice.getReplayOn()) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n replayService.nextStep();\r\n }\r\n if (e.key === 'ArrowLeft' && this.replayStateSerice.getReplayOn()) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n replayService.previousStep();\r\n }\r\n };\r\n }\r\n\r\n ngOnInit(): void {\r\n this.showDescription$ = this.titleService.showDescription$;\r\n this.showSettings$ = this.settingsService.showSettings$;\r\n }\r\n\r\n openLinkDialog(link: string, title: string, text: string): void {\r\n const config = new MatDialogConfig();\r\n config.disableClose = false;\r\n config.autoFocus = true;\r\n\r\n config.data = new InfoDialogData(title, text, true, true, link);\r\n\r\n this.dialogService.openDialog(InfoDialogComponent, config);\r\n }\r\n}\r\n","
\r\n \r\n \r\n \r\n\r\n \r\n \r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n\r\n","import { ApplicationRef, DoBootstrap, NgModule } from '@angular/core';\r\nimport { BrowserModule } from '@angular/platform-browser';\r\nimport {\r\n MAT_CHECKBOX_DEFAULT_OPTIONS,\r\n MatCheckboxDefaultOptions,\r\n} from '@angular/material/checkbox';\r\n\r\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { HeaderComponent } from 'src/app/Presentation/Header/header.component';\r\nimport { SettingsComponent } from 'src/app/Presentation/Settings/settings.component';\r\nimport { AppComponent } from 'src/app/app.component';\r\nimport { ExportService } from 'src/app/Service/Export/export.service';\r\nimport { ImportDomainStoryService } from 'src/app/Service/Import/import-domain-story.service';\r\nimport { ImportRepairService } from 'src/app/Service/Import/import-repair.service';\r\nimport { ModelerService } from 'src/app/Service/Modeler/modeler.service';\r\nimport { TitleService } from 'src/app/Service/Title/title.service';\r\nimport { LabelDictionaryService } from 'src/app/Service/LabelDictionary/label-dictionary.service';\r\nimport { ReplayService } from 'src/app/Service/Replay/replay.service';\r\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\r\nimport { DomainConfigurationService } from 'src/app/Service/DomainConfiguration/domain-configuration.service';\r\nimport { MassNamingService } from 'src/app/Service/LabelDictionary/mass-naming.service';\r\nimport { InfoDialogComponent } from 'src/app/Presentation/Dialog/info-dialog/info-dialog.component';\r\nimport { ExportDialogComponent } from 'src/app/Presentation/Dialog/export-dialog/export-dialog.component';\r\nimport { ActivityDialogComponent } from 'src/app/Presentation/Dialog/activity-dialog/activity-dialog.component';\r\nimport { UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms';\r\nimport { HeaderDialogComponent } from 'src/app/Presentation/Dialog/header-dialog/header-dialog.component';\r\nimport { IconDictionaryService } from 'src/app/Service/DomainConfiguration/icon-dictionary.service';\r\nimport { ModelerComponent } from 'src/app/Presentation/Canvas/modeler.component';\r\nimport { SettingsModule } from 'src/app/Modules/settings.module';\r\nimport { AutosaveService } from './Service/Autosave/autosave.service';\r\nimport { DomainStoryModelerModuleModule } from './Modules/domain-story-modeler-module.module';\r\nimport { LabelDictionaryDialogComponent } from './Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component';\r\nimport { MaterialModule } from './material.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n HeaderComponent,\r\n SettingsComponent,\r\n AppComponent,\r\n InfoDialogComponent,\r\n ExportDialogComponent,\r\n ActivityDialogComponent,\r\n HeaderDialogComponent,\r\n ModelerComponent,\r\n LabelDictionaryDialogComponent,\r\n ],\r\n imports: [\r\n BrowserModule,\r\n NoopAnimationsModule,\r\n ReactiveFormsModule,\r\n SettingsModule,\r\n DomainStoryModelerModuleModule,\r\n MaterialModule,\r\n ],\r\n providers: [\r\n AutosaveService,\r\n ExportService,\r\n ImportDomainStoryService,\r\n ImportRepairService,\r\n IconDictionaryService,\r\n TitleService,\r\n LabelDictionaryService,\r\n ReplayService,\r\n ElementRegistryService,\r\n DomainConfigurationService,\r\n ModelerService,\r\n MassNamingService,\r\n UntypedFormBuilder,\r\n {\r\n provide: MAT_CHECKBOX_DEFAULT_OPTIONS,\r\n useValue: { clickAction: 'noop' } as MatCheckboxDefaultOptions,\r\n },\r\n ],\r\n})\r\nexport class AppModule implements DoBootstrap {\r\n constructor(private autosaveService: AutosaveService) {\r\n // autosaveService wird so automatisch initialisiert, auf keinen Fall entfernen!\r\n }\r\n\r\n ngDoBootstrap(app: ApplicationRef): void {\r\n const componentElement = document.createElement('app-root');\r\n document.body.append(componentElement);\r\n app.bootstrap(AppComponent);\r\n }\r\n}\r\n","import { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\r\nimport { NgModule } from '@angular/core';\r\n\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatGridListModule } from '@angular/material/grid-list';\r\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatCheckboxModule } from '@angular/material/checkbox';\r\n\r\n@NgModule({\r\n imports: [\r\n MatButtonModule,\r\n MatButtonToggleModule,\r\n MatListModule,\r\n MatCheckboxModule,\r\n MatDialogModule,\r\n MatFormFieldModule,\r\n MatGridListModule,\r\n MatInputModule,\r\n MatToolbarModule,\r\n MatExpansionModule,\r\n MatSnackBarModule,\r\n MatCardModule,\r\n ],\r\n exports: [\r\n MatButtonModule,\r\n MatButtonToggleModule,\r\n MatListModule,\r\n MatCheckboxModule,\r\n MatDialogModule,\r\n MatFormFieldModule,\r\n MatGridListModule,\r\n MatInputModule,\r\n MatToolbarModule,\r\n MatExpansionModule,\r\n MatSnackBarModule,\r\n MatCardModule,\r\n ],\r\n})\r\nexport class MaterialModule {}\r\n","// This file can be replaced during build by using the `fileReplacements` array.\r\n// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.\r\n// The list of file replacements can be found in `angular.json`.\r\n\r\nexport const environment = {\r\n production: false,\r\n};\r\n\r\n/*\r\n * For easier debugging in development mode, you can import the following file\r\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\r\n *\r\n * This import should be commented out in production mode because it will have a negative impact\r\n * on performance if an error is thrown.\r\n */\r\n// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.\r\n","import { enableProdMode } from '@angular/core';\r\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r\n\r\nimport { AppModule } from './app/app.module';\r\nimport { environment } from './environments/environment';\r\n\r\nif (environment.production) {\r\n enableProdMode();\r\n}\r\n\r\nplatformBrowserDynamic()\r\n .bootstrapModule(AppModule)\r\n .catch((err) => console.error(err));\r\n"],"names":["Modeler","ResizeModule","assign","isArray","inherits","DomainStoryModule","LabelEditingModule","ModelingModule","elementTypes","DomainStoryModeler","options","call","_customElements","_groupElements","prototype","_modules","concat","_addCustomShape","customElement","parentId","parent","children","push","canvas","get","elementFactory","customAttrs","businessObject","customShape","create","isGroup","id","parentShape","addShape","_addCustomConnection","elementRegistry","connection","source","target","addConnection","importCustomElements","elements","fire","addCustomElements","customElements","Error","shapes","connections","groups","forEach","isConnection","getCustomElements","createDiagram","done","element","type","ACTIVITY","CONNECTION","GROUP","Replace","modeling","_modeling","replaceElement","oldElement","newElementData","newElement","setCenterOfElement","outgoingActivities","outgoing","incomingActivities","incoming","x","Math","ceil","width","y","height","name","replaceShape","replaceOptions","ReplaceMenuProvider","_dsReplace","$inject","getEntries","entries","includes","actorReplaceOptions","workObjectReplaceOptions","_createEntries","menuEntries","self","definition","entry","_createMenuEntry","action","replaceAction","label","className","actionName","getNameFromType","iconDictionaryService","initializeReplaceOptions","iconDictionary","actorTypes","getTypeDictionary","ACTOR","replaceOption","i","keysArray","actorType","typeName","toLowerCase","getIconForBPMN","workObjectTypes","WORKOBJECT","workObjectType","ContextPadProvider","bind","generateAutomaticNumber","getAllStandardIconKeys","dirtyFlagService","initializeContextPadProvider","dirtyFlag","DomainStoryContextPadProvider","injector","connect","translate","contextPad","popupMenu","replaceMenuProvider","commandStack","eventBus","startConnect","selectedElement","invoke","autoPlace","cached","getContextPadEntries","colorPicker","document","getElementById","onchange","ev","context","newColor","value","execute","makeDirty","registerProvider","allStandardIconKeys","actions","event","autoActivate","start","replace","addColorChange","addConnectWithActivity","addTextAnnotation","addActors","appendAction","addWorkObjects","addChangeWorkObjectTypeMenu","addChangeActorTypeMenu","delete","deleteGroup","group","title","click","removeGroup","moveDeleteActionToEndOfArray","removeElements","changeDirection","position","getReplaceMenuPosition","cursor","open","colorChange","TEXTANNOTATION","dragstart","icon","newNumber","Y_OFFSET","diagramContainer","getContainer","pad","getPad","html","diagramRect","getBoundingClientRect","padRect","top","left","appendStart","shape","createShape","hints","BpmnElementFactory","DEFAULT_LABEL_SIZE","DomainStoryIdFactory","DomainStoryElementFactory","bpmnFactory","moddle","domainStoryIdFactory","elementType","attrs","baseCreate","test","registerId","getId","key","set","$type","di","$descriptor","_getCustomElementSize","Object","defineProperty","createBpmnElement","__default","Dimensions","idList","generateId","idNumber","fourDigitsId","idSuffix","containsId","floor","random","same","BaseRenderer","Ids","getAnnotationBoxHeight","componentsToPath","createLine","append","svgAppend","attr","svgAttr","classes","svgClasses","svgCreate","query","domQuery","isObject","getNumberStash","addNumberToRegistry","numberBoxDefinitions","calculateTextWidth","countLines","labelPosition","angleBetween","RENDERER_IDS","numbers","DEFAULT_COLOR","initializeRenderer","elementRegistryService","DomainStoryRenderer","styles","textRenderer","pathMap","rendererId","next","markers","computeStyle","generateActivityNumber","parentGfx","box","numberStash","semantic","use","number","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","p","svgDynamicSizeAttributes","actor","getTypeIconSRC","drawWorkObject","workObject","useColorForActivity","strokeWidth","strokeLinejoin","markerEnd","marker","drawActivity","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","getConnectionPath","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","getLabel","autocomplete","isAny","getExternalLabelMid","isLabelExternal","hasExternalLabel","isLabel","dictionaryService","stashUse","initializeLabelEditingProvider","labelingDictionary","toggleStashUse","DSLabelEditingProvider","directEditing","resizeHandles","_canvas","_textRenderer","_updateLabelHandler","activateDirectEdit","complete","isActive","cancel","removeResizers","createAutocomplete","canExecute","isTouch","force","activate","editingBox","focus","getWorkObjectLabels","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","inp","arr","closeAllLists","currentFocus","addEventListener","autocompleteList","autocompleteItem","val","createElement","parentNode","appendChild","substr","toUpperCase","onclick","visibility","onkeydown","keyCode","addActive","preventDefault","removeActive","classList","survivor","removeChild","ChangeSupportModule","DirectEditingModule","dSlabelEditingProvider","dSlabelEditingPreview","str","split","amountWaypoints","determinedPosition","xPos","yPos","labelPositionX","labelPositionY","offsetX","scaledAngle","offsetY","Modeling","_commandStack","updateNumber","oldShape","newShape","newData","numberRegistry","multipleNumberRegistry","canvasElementRegistry","initializeNumbering","canvasElementRegistryService","boxHeight","elementActivity","usedNumbers","wantedNumber","activitiesFromActors","getActivitiesFromActors","updateExistingNumbersAtGeneration","setTimeout","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","VERSION","INITIAL_TITLE","INITIAL_DESCRIPTION","INITIAL_DOMAIN_NAME","DOMAIN_CONFIGURATION_TAG","DEFAULT_AUTOSAVES_AMOUNT","DEFAULT_AUTOSAVES_INTERVAL","SNACKBAR_DURATION","SNACKBAR_SUCCESS","SNACKBAR_ERROR","SNACKBAR_INFO","IMPLICIT_ROOT_ID","all","size","isEmpty","Entry","addEach","clear","filter","found","sort","sortByName","a","b","structuredClone","testCustomDomainConfiguration","fromConfigurationFromFile","configFromFile","actorsDict","workObjectsDict","IconConfiguration","allIconDictionary","getDefaultConf","defaultConf","updateAllIconRegistry","appendSRCFile","newAppendedIcons","appen","createCustomConf","domainConfiguration","domainName","allIconsConf","ActivityDialogData","numberIsAllowedMultipleTimes","showNumberFields","saveFN","ExportDialogData","ExportOption","tooltip","InfoDialogData","infoText","isInfo","isLink","linkText","NUMBER_BACKGROUND_COLOR","NUMBER_COLOR","STROKE_WIDTH","HIGHLIGHT_NUMBER_BACKGROUNG_COLOR","HIGHLIGHT_NUMBER_COLOR","HIGHLIGHT_COLOR","HIGHLIGHT_STROKE_WIDTH","appendedIcons","allIcons","Person","Group","Pet","Conversation","World","Store","Theater","Business","Water","Hotel","Dining","Courthouse","Flag","Place","Car","Bus","Train","Truck","Taxi","Bike","Boat","Motorcycle","Plane","Shuttle","Walking","Traffic","Commute","System","Printer","Document","Folder","Call","Email","Copyright","DNS","Settings","Cellphone","Update","Briefcase","Microphone","Signal","Key","Pencil","Sum","Headset","Keyboard","Mouse","Router","Scanner","Security","Desktop","Tablet","Label","Receipt","Calendar","Cloud","Assessment","Dashboard","Problem","Grid","Watch","Euro","Dollar","Info","Alarm","Wrench","Favorite","Gavel","Blind","Hourglass","Time","Search","Shopping","Couch","Attach","Ruler","Education","allIconsDict","newIcons","IconFilterEnum","ConfigAndDST","domain","dst","testConfigAndDst","CommonModule","AutosaveSettingsComponent","AutosaveOptionsComponent","AutosavedDraftsComponent","FormsModule","MaterialModule","AutosaveSettingsModule","declarations","imports","exports","HeaderButtonsComponent","DomainStoryModelerModuleModule","DomainConfigurationComponent","IconListItemComponent","DetailsListItemComponent","DomainDetailsComponent","GeneralSettingsComponent","LabelDictionaryComponent","SettingsModule","i0","autosaveConfiguration","snackbar","save","activated","amount","interval","setConfiguration","duration","panelClass","selectors","decls","vars","consts","template","autosaveService","subscription","autosavedDraftsChanged$","subscribe","initDrafts","ngOnInit","drafts","loadCurrentDrafts","loadDraft","draft","removeAllDrafts","ModelerComponent","modelerService","postInit","MAT_DIALOG_DATA","ActivityDialogComponent","fb","dialogRef","activityLabel","activityNumber","form","multipleNumbers","onSubmit","patchValue","close","BehaviorSubject","ExportDialogComponent","withTitle","doOption","updateWithTitle","$event","checked","HeaderDialogComponent","InfoDialogComponent","showConfirmButton","hasLink","ngAfterViewInit","span","scrollHeight","LabelDictionaryDialogComponent","ngAfterViewChecked","createIcon","img","iconInitiated","svg","inputs","sanitizeIconName","domainCustomizationService","ICON_FILTER_NONE","domainConfigurationTypes","getDomainConfiguration","getFullDictionary","allIconNames","selectedActors","selectedActors$","selectedWorkobjects","selectedWorkobjects$","allFiltered","getFilteredNamesForType","allFilteredIconNames","loadMinimalIconConfigurationWithDefaultIcons","resetDomain","loadInitialConfiguration","saveDomain","getUsedIcons","exportDomain","startIconUpload","importIcon","files","iconInputFile","reader","FileReader","iconName","onloadend","addIMGToIconDictionary","registerIconForBPMN","addNewIcon","readAsDataURL","startDomainImport","importDomain","domainInputFile","loadConfiguration","importConfiguration","readAsText","filterForActors","ICON_FILTER_ACTOR","filterForWorkobjects","ICON_FILTER_WORKOBJECT","filterForUnassigned","ICON_FILTER_UNASSIGNED","filterByNameAndType","filteredByNameAndType","isIconActor","isIconWorkObject","customizationService","domainName$","changeName","getIconForName","allowDrop","listName","draggedList","onDrop","list","sortedList","draggedIndex","setSelectedActors","setSelectedWorkObject","onDragStart","isWorkobject","isNone","toggleNone","setAsUnassigned","toggleActor","setAsActor","toggleWorkobject","setAsWorkobject","MatDialogConfig","settingsService","replayStateService","dialogService","replayService","exportService","importService","isReplay$","replayOn$","isDirty$","dirty$","showDescription","showDescription$","import","filename","endsWith","importDST","importEGN","commandStackChanged","setShowDescription","show","openSettings","openDownloadDialog","isDomainStoryExportable","SVGDownloadOption","downloadSVG","EGNDownloadOption","downloadDST","PNGDownloadOption","downloadPNG","HTMLDownloadOption","downloadHTMLPresentation","disableClose","autoFocus","openDialog","openHeaderDialog","openKeyboardShortcutsDialog","shortCutText","openLabelDictionary","startReplay","stopReplay","previousStep","nextStep","combineLatest","HeaderComponent","title$","description$","stepDescription$","currentStep$","maxStepNumber$","pipe","step","count","EventEmitter","labelDictionaryService","createLabelDictionaries","workObjectEntries","activityEntries","getActivityLabels","workobjectEntriesSubject","activityEntriesSubject","activityNames","originalActivityNames","workObjectNames","originalWorkObjectNames","originalName","w","workobject","massRenameLabels","closeEmitter","emit","updateActivityEntry","activityEntry","updateWorkobjectEntry","workobjectEntry","outputs","SettingsComponent","savedConfiguration","getAndClearSavedConfiguration","restart","openGeneralSettings","showGeneralSettings","showDomainCustomization","openDomainCustomization","ReplaySubject","AUTOSAVE_CONFIGURATION_TAG","defaultConfiguration","AutosaveConfigurationService","storageService","configurationSubject","asObservable","initializeConfiguration","saveConfiguration","factory","providedIn","Subject","DRAFTS_TAG","AutosaveService","iconDistionaryService","rendererService","configuration$","updateConfiguration","readDrafts","sortDrafts","configAndDST","story","actorIcons","getElementsOfType","workObjectIcons","updateIconRegistries","importStory","stopTimer","startTimer","autosaveTimer","clearInterval","setInterval","newDraft","createDraft","isChanged","isSame","unshift","pop","writeDrafts","stringify","getStory","createConfigAndDST","date","Date","toString","aDate","bDate","StorageService","setItem","json","removeItem","checkValidityOfConfiguration","configuratioFromFile","getStoredDomainConfiguration","domainString","setStoredDomainConfiguration","configForStorage","CommandStackService","setCommandStack","payload","DialogService","matDialog","dialog","DirtyFlagService","isDirtySubject","makeClean","dirty","DomManipulationService","showAll","removeHighlights","getAllCanvasObjects","getAllGroups","domObject","display","showStep","replayStep","notShown","getAllNotShown","hightlightStep","o","getNumberDomForActivity","numberDOMS","numberBackgroundDom","numberTextDom","allActivities","getAllActivities","allConnections","getAllConnections","activityDomObject","connectionDomObject","stepObjects","shownElements","notShownElements","allObjects","DomainConfigurationService","setDomainName","exportConfiguration","getCurrentConfigurationForExport","configJSONString","getDomainName","encodeURIComponent","body","customConfig","updateDomainName","actorDict","workObjectDict","actorKeys","workObjectKeys","getIconConfiguration","addIconsFromDomainConfiguration","configurationName","getCurrentConfiguration","getActorsDictionary","getWorkObjectsDictionary","createConfigFromDictionaries","currentConfiguration","getCurrentConfigurationNamesWithoutPrefix","createMinimalConfigurationWithDefaultIcons","minimalConfig","createConfigFromCanvas","getIconSource","actorNames","workobjectNames","newActors","newWorkobjects","allCanvasObjects","DomainCustomizationService","getAllIconDictionary","addIconToAllIconList","importedConfigurationEvent","storedDomainConfiguration","importedConfiguration","getImportedConfiguration","allIconListItems","selectedActorNames","selectActor","selectedWorkobjectNames","selectWorkObject","changedDomain","deselectActor","deselectWorkobject","updateIcon","updateActorSubject","updateWorkObjectSubject","configurationHasChanged","defaultConfig","workObjectName","actorName","updateAllIconBehaviourSubjects","resetToInitialConfiguration","usedIcons","imported","changedActors","changedWorkobjects","createDomainConfiguration","configurationActors","configurationWorkobjects","workobjects","changedDomainCofiguration","updateIcons","join","temp","iconDict","getSrcForIcon","addIconsToCss","iconBehaviourSubject","customDomainCofiguration","rawSrc","ICON_PREFIX","IconDictionaryService","iconConfig","allTypes","initDictionary","actorIconDictionary","workObjectDictionary","dictionary","namePrefix","customConfiguration","allInTypeDictionary","collection","allIn","dictionaryType","iconTypes","registerIconForType","iconDictionaryForBPMN","addIconsToTypeDictionary","extractCustomIconsFromDictionary","addNewIconsToDictionary","elementDictionary","sanitizedName","custom","input","fullDictionary","appendedDict","getTypeDictionaryKeys","elementOfType","setCusomtConfiguration","ElementRegistryService","fullyInitialized","registry","__implicitroot","setElementRegistry","_elements","createObjectListForDSTDownload","allObjectsFromCanvas","objectList","fillListOfCanvasObjects","canvasElement","groupObjects","checkChildForGroup","currentGroup","registryElementNames","getAllActors","getAllWorkobjects","co","sanitizeForDesktop","ExportService","pngService","svgService","htmlPresentationService","titleSubscription","descriptionSubscription","ngOnDestroy","unsubscribe","DomainStory","getStoryForDownload","downloadFile","datatype","fileEnding","svgData","createSVGData","container","svgElements","outerSVGElement","viewport","layerBase","image","extractSVG","prepareSVG","onload","getWidth","getHeight","fillStyle","drawImage","png64","toDataURL","ele","toISOString","then","info","version","doT","HtmlPresentationService","setModelerClasses","selection","modeler","viewBoxCoordinates","ViewBoxCoordinate","saveSVG","fixActivityMarkersForEachStep","getCurrentStepNumber","content","transition","err","alert","getMaxStepNumber","revealjsTemplate","dots","revealjsData","script","sentences","multiplexSecret","multiplexId","fixMalformedHtmlScript","viewBoxIndex","splitViewBox","dataStart","dataEnd","createBounds","sectionIndex","newDefs","ids","idToReplace","newId","replaceAll","PngService","browserSpecs","ua","navigator","userAgent","tem","M","exec","appName","appVersion","URIHashtagFix","fix","browser","parseInt","findMostOuterElements","xRight","yDown","sub","elXLeft","elXRight","elYUp","elYDown","transform","nums","rects","outerRect","calculateWidthAndHeight","insertIndex","layerResizers","layerOverlays","removeAttribute","XMLSerializer","serializeToString","SvgService","cacheData","getEncoded","svgIndex","backgroundColorWhite","findIndexToInsertData","appendDST","restoreTitleFromFileName","ImportDomainStoryService","importRepairService","domainConfigurationService","importedConfigurationEmitter","isSVG","fileReader","titleText","fileReaderFunction","isEGN","dstText","removeXMLComments","dstAndConfig","extractDstAndConfig","configChanged","checkConfigForChanges","lastElement","importVersionNumber","handleVersionNumber","checkForUnreferencedElementsInActivitiesAndRepair","showBrokenImportDialog","adjustPositions","versionPrefix","lastIndexOf","updateCustomElementsPreviousV050","showPreviousV050Dialog","xmlText","newActorKeys","newWorkObjectKeys","currentActorKeys","currentWorkobjectKeys","changed","clearName","setImportedConfigurationAndEmit","ImportRepairService","objectIDs","activityIndex","isFirst","findFirstElement","adjustElementPosition","LabelDictionaryService","massNamingService","activityLabels","workObjektLabels","localeCompare","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","ModelerService","initializerService","keyboard","bindTo","additionalModules","bpmnSearch","exportArtifacts","debounce","window","startDebounce","domainStory","currentStory","destroy","getModeler","timeout","timer","clearTimeout","encoded","RendererService","renderStory","configurationChange","c","ReplayStateService","replayOnSubject","setReplayState","state","ReplayService","domManipulationService","storyCreatorService","currentStep","maxStepNumber","initializeReplay","traceActivitiesAndCreateStory","showCurrentStep","missingSteps","getMissingSteps","getValue","steps","StoryCreatorService","tracedActivityMap","tracedItem","createStep","addGroupStep","getStepObjects","highlightedElements","highlightedObjects","tracedActivity","initialSource","targetObjects","parallelStep","firstTarget","checkTarget","activityTarget","g","SettingsService","showSettings","TitleService","titleSubject","descriptionSubject","showDescriptionSubject","domainNameSubject","allowUndo","fireTitleAndDescriptionUpdate","updateTitle","updateDescription","getVersion","degrees","radians","PI","quadrant","adjacent","opposite","atan2","Point","reg","dstRegex","svgRegex","egnSuffix","dstSuffix","svgSuffix","filenameWithoutDateSuffix","AppComponent","replayStateSerice","showSettings$","ctrlKey","openLinkDialog","link","BrowserModule","MAT_CHECKBOX_DEFAULT_OPTIONS","NoopAnimationsModule","UntypedFormBuilder","ReactiveFormsModule","AppModule","ngDoBootstrap","app","componentElement","bootstrap","provide","useValue","clickAction","MatDialogModule","MatFormFieldModule","MatInputModule","MatToolbarModule","MatExpansionModule","MatCardModule","MatSnackBarModule","MatButtonModule","MatGridListModule","MatButtonToggleModule","MatListModule","MatCheckboxModule","environment","production","enableProdMode","__NgCli_bootstrap_1","bootstrapModule","catch","console","error"],"sourceRoot":"webpack:///","x_google_ignoreList":[]} \ No newline at end of file +{"version":3,"file":"main.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAA0C;AACgB;AACf;AACX;AAEU;AACU;AACJ;AACa;AAE/C,SAAUS,kBAAkB,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;IAC7BC,cAAc,GAAG,IAAI,CAACD,GA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ACfC,4EAAkB,EAClBO,0EAAiB,EACjBN,mEAAc,EACdC,uEAAgB,EAChBC,4EAAkB,EAClBE,2EAAiB,EACjBD,kEAAa;AAAA;;sHAGJruB,cAAc;IAAAG,UA5BvBouB,qEAAe,EACfE,kFAAqB,EACrBC,iEAAa,EACbC,yEAAiB,EACjBX,qEAAe,EACfC,4EAAkB,EAClBO,0EAAiB,EACjBN,mEAAc,EACdC,uEAAgB,EAChBC,4EAAkB,EAClBE,2EAAiB,EACjBD,kEAAa;IAAAjuB,UAGbmuB,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,MAAMO,WAAW,GAAG;EACzBC,UAAU,EAAE;CACb;AAED;;;;;;;AAOA;;;;;;;;;;;;;;;;ACf+C;AAGF;AACY;AAEzD,IAAID,kEAAW,CAACC,UAAU,EAAE;EAC1BC,6DAAc,EAAE;;AAGlBC,sEAAAA,EAAwB,CACrBC,eAAe,CAACxB,sDAAS,CAAC,CAC1ByB,KAAK,CAAEnQ,GAAG,IAAKoQ,OAAO,CAACC,KAAK,CAACrQ,GAAG,CAAC,CAAC","sources":["./src/app/Modeler/index.js","./src/app/Modeler/modeler/change-icon/replace.js","./src/app/Modeler/modeler/change-icon/replaceMenuProvider.js","./src/app/Modeler/modeler/change-icon/replaceOptions.js","./src/app/Modeler/modeler/context-pad/domainStoryContextPadProvider.js","./src/app/Modeler/modeler/domainStoryElementFactory.js","./src/app/Modeler/modeler/domainStoryIdFactory.js","./src/app/Modeler/modeler/domainStoryRenderer.js","./src/app/Modeler/modeler/domainStoryRules.js","./src/app/Modeler/modeler/domainStoryUpdater.js","./src/app/Modeler/modeler/index.js","./src/app/Modeler/modeler/labeling/dsLabelEditingPreview.js","./src/app/Modeler/modeler/labeling/dsLabelEditingProvider.js","./src/app/Modeler/modeler/labeling/dsLabelUtil.js","./src/app/Modeler/modeler/labeling/index.js","./src/app/Modeler/modeler/labeling/position.js","./src/app/Modeler/modeler/modeling/dSModeling.js","./src/app/Modeler/modeler/modeling/index.js","./src/app/Modeler/modeler/numbering/numbering.js","./src/app/Modeler/modeler/palette/domainStoryPalette.js","./src/app/Modeler/modeler/updateHandler/activityUpdateHandlers.js","./src/app/Modeler/modeler/updateHandler/elementUpdateHandler.js","./src/app/Modeler/modeler/updateHandler/headlineAndDescriptionUpdateHandler.js","./src/app/Modeler/modeler/updateHandler/massRenameHandler.js","./src/app/Modeler/modeler/updateHandler/updateLabelHandler.js","./src/app/Modeler/modeler/util.js","./src/app/Service/Export/exportUtil.js","./src/app/Domain/Common/businessObject.ts","./src/app/Domain/Common/configuration.ts","./src/app/Domain/Common/constants.ts","./src/app/Domain/Common/dictionary/dictionary.ts","./src/app/Domain/Common/domainConfiguration.ts","./src/app/Domain/Common/elementTypes.ts","./src/app/Domain/Common/iconConfiguration.ts","./src/app/Domain/Dialog/activityDialogData.ts","./src/app/Domain/Dialog/exportDialogData.ts","./src/app/Domain/Dialog/infoDialogData.ts","./src/app/Domain/DomManipulation/replayConstants.ts","./src/app/Domain/Domain-Configuration/allIcons.ts","./src/app/Domain/Domain-Configuration/iconFilterEnum.ts","./src/app/Domain/Export/configAndDst.ts","./src/app/Domain/Export/exportConstants.ts","./src/app/Modules/autosave-settings.module.ts","./src/app/Modules/domain-story-modeler-module.module.ts","./src/app/Modules/settings.module.ts","./src/app/Presentation/Autosave/AutosaveOptions/autosave-options.component.ts","./src/app/Presentation/Autosave/AutosaveOptions/autosave-options.component.html","./src/app/Presentation/Autosave/AutosaveSettings/autosave-settings.component.ts","./src/app/Presentation/Autosave/AutosaveSettings/autosave-settings.component.html","./src/app/Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component.ts","./src/app/Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component.html","./src/app/Presentation/Canvas/modeler.component.ts","./src/app/Presentation/Canvas/modeler.component.html","./src/app/Presentation/Dialog/activity-dialog/activity-dialog.component.ts","./src/app/Presentation/Dialog/activity-dialog/activity-dialog.component.html","./src/app/Presentation/Dialog/export-dialog/export-dialog.component.ts","./src/app/Presentation/Dialog/export-dialog/export-dialog.component.html","./src/app/Presentation/Dialog/header-dialog/header-dialog.component.ts","./src/app/Presentation/Dialog/header-dialog/header-dialog.component.html","./src/app/Presentation/Dialog/info-dialog/info-dialog.component.ts","./src/app/Presentation/Dialog/info-dialog/info-dialog.component.html","./src/app/Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component.ts","./src/app/Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component.html","./src/app/Presentation/DomainConfiguration/details-list-item/details-list-item.component.ts","./src/app/Presentation/DomainConfiguration/details-list-item/details-list-item.component.html","./src/app/Presentation/DomainConfiguration/domain-configuration.component.ts","./src/app/Presentation/DomainConfiguration/domain-configuration.component.html","./src/app/Presentation/DomainConfiguration/domain-details/domain-details.component.html","./src/app/Presentation/DomainConfiguration/domain-details/domain-details.component.ts","./src/app/Presentation/DomainConfiguration/icon-list-item/icon-list-item.component.ts","./src/app/Presentation/DomainConfiguration/icon-list-item/icon-list-item.component.html","./src/app/Presentation/Header/header-buttons.component.ts","./src/app/Presentation/Header/header-buttons.component.html","./src/app/Presentation/Header/header.component.ts","./src/app/Presentation/Header/header.component.html","./src/app/Presentation/LabelDictionary/label-dictionary.component.ts","./src/app/Presentation/LabelDictionary/label-dictionary.component.html","./src/app/Presentation/Settings/General/general-settings.component.ts","./src/app/Presentation/Settings/General/general-settings.component.html","./src/app/Presentation/Settings/settings.component.ts","./src/app/Presentation/Settings/settings.component.html","./src/app/Service/Autosave/autosave-configuration.service.ts","./src/app/Service/Autosave/autosave.service.ts","./src/app/Service/BrowserStorage/storage.service.ts","./src/app/Service/CommandStack/command-stack.service.ts","./src/app/Service/Dialog/dialog.service.ts","./src/app/Service/DirtyFlag/dirty-flag.service.ts","./src/app/Service/DomManipulation/dom-manipulation.service.ts","./src/app/Service/DomainConfiguration/domain-configuration.service.ts","./src/app/Service/DomainConfiguration/domain-customization.service.ts","./src/app/Service/DomainConfiguration/icon-dictionary.service.ts","./src/app/Service/ElementRegistry/element-registry.service.ts","./src/app/Service/Export/export.service.ts","./src/app/Service/Export/html-presentation.service.ts","./src/app/Service/Export/png.service.ts","./src/app/Service/Export/svg.service.ts","./src/app/Service/Import/import-domain-story.service.ts","./src/app/Service/Import/import-repair.service.ts","./src/app/Service/LabelDictionary/label-dictionary.service.ts","./src/app/Service/LabelDictionary/mass-naming.service.ts","./src/app/Service/Modeler/initializer.service.ts","./src/app/Service/Modeler/modeler.service.ts","./src/app/Service/Renderer/renderer.service.ts","./src/app/Service/Replay/replay-state.service.ts","./src/app/Service/Replay/replay.service.ts","./src/app/Service/Replay/storyCreator/story-creator.service.ts","./src/app/Service/Settings/settings.service.ts","./src/app/Service/Title/title.service.ts","./src/app/Utils/mathExtensions.ts","./src/app/Utils/naming.ts","./src/app/Utils/sanitizer.ts","./src/app/app.component.ts","./src/app/app.component.html","./src/app/app.module.ts","./src/app/material.module.ts","./src/environments/environment.ts","./src/main.ts"],"sourcesContent":["import Modeler from \"bpmn-js/lib/Modeler\";\r\nimport ResizeModule from \"diagram-js/lib/features/resize\";\r\nimport { assign, isArray } from \"min-dash\";\r\nimport inherits from \"inherits\";\r\n\r\nimport DomainStoryModule from \"./modeler\";\r\nimport LabelEditingModule from \"./modeler/labeling\";\r\nimport ModelingModule from \"./modeler/modeling\";\r\nimport { elementTypes } from \"../Domain/Common/elementTypes\";\r\n\r\nexport default function DomainStoryModeler(options) {\r\n Modeler.call(this, options);\r\n\r\n this._customElements = [];\r\n this._groupElements = [];\r\n}\r\n\r\ninherits(DomainStoryModeler, Modeler);\r\n\r\nDomainStoryModeler.prototype._modules = [].concat(\r\n DomainStoryModeler.prototype._modules,\r\n [DomainStoryModule, LabelEditingModule, ModelingModule],\r\n [ResizeModule]\r\n);\r\n\r\n/**\r\n * add a single custom element to the underlying diagram\r\n *\r\n * @param {Object} customElement\r\n */\r\nDomainStoryModeler.prototype._addCustomShape = function (customElement) {\r\n let parentId = customElement.parent;\r\n delete customElement.children;\r\n delete customElement.parent;\r\n this._customElements.push(customElement);\r\n\r\n let canvas = this.get(\"canvas\"),\r\n elementFactory = this.get(\"elementFactory\");\r\n\r\n let customAttrs = assign({ businessObject: customElement }, customElement);\r\n let customShape = elementFactory.create(\"shape\", customAttrs);\r\n\r\n if (isGroup(customElement)) {\r\n this._groupElements[customElement.id] = customShape;\r\n }\r\n\r\n if (parentId) {\r\n let parentShape = this._groupElements[parentId];\r\n\r\n if (isGroup(parentShape)) {\r\n return canvas.addShape(customShape, parentShape, parentShape.id);\r\n }\r\n }\r\n return canvas.addShape(customShape);\r\n};\r\n\r\nDomainStoryModeler.prototype._addCustomConnection = function (customElement) {\r\n this._customElements.push(customElement);\r\n\r\n let canvas = this.get(\"canvas\"),\r\n elementFactory = this.get(\"elementFactory\"),\r\n elementRegistry = this.get(\"elementRegistry\");\r\n\r\n let customAttrs = assign({ businessObject: customElement }, customElement);\r\n\r\n let connection = elementFactory.create(\r\n \"connection\",\r\n assign(customAttrs, {\r\n source: elementRegistry.get(customElement.source),\r\n target: elementRegistry.get(customElement.target),\r\n }),\r\n elementRegistry.get(customElement.source).parent\r\n );\r\n\r\n return canvas.addConnection(connection);\r\n};\r\n\r\n//** We import BusinessObjects, not the whole Canvas Object!!!!!!!!\r\nDomainStoryModeler.prototype.importCustomElements = function (elements) {\r\n this.get(\"eventBus\").fire(\"diagram.clear\", {});\r\n this._customElements = [];\r\n this._groupElements = [];\r\n\r\n this.addCustomElements(elements);\r\n};\r\n\r\n/**\r\n * add a number of custom elements and connections to the underlying diagram.\r\n *\r\n * @param {Array} customElements\r\n */\r\nDomainStoryModeler.prototype.addCustomElements = function (customElements) {\r\n if (!isArray(customElements)) {\r\n throw new Error(\"argument must be an array\");\r\n }\r\n\r\n let shapes = [],\r\n connections = [],\r\n groups = [];\r\n\r\n customElements.forEach(function (customElement) {\r\n if (isConnection(customElement)) {\r\n connections.push(customElement);\r\n } else if (isGroup(customElement)) {\r\n groups.push(customElement);\r\n } else {\r\n shapes.push(customElement);\r\n }\r\n });\r\n\r\n // add groups before shapes and shapes before connections so that connections\r\n // can already rely on the shapes being part of the diagram\r\n groups.forEach(this._addCustomShape, this);\r\n shapes.forEach(this._addCustomShape, this);\r\n connections.forEach(this._addCustomConnection, this);\r\n};\r\n\r\n/**\r\n * get custom elements with their current status.\r\n *\r\n * @return {Array} custom elements on the diagram\r\n */\r\nDomainStoryModeler.prototype.getCustomElements = function () {\r\n return this._customElements;\r\n};\r\n\r\n// override standard function to prevent default elements on canvas\r\nDomainStoryModeler.prototype.createDiagram = function (done) {};\r\n\r\nfunction isConnection(element) {\r\n return (\r\n element.type === elementTypes.ACTIVITY ||\r\n element.type === elementTypes.CONNECTION\r\n );\r\n}\r\n\r\nfunction isGroup(element) {\r\n return element && element.type === elementTypes.GROUP;\r\n}\r\n","\"use strict\";\r\n\r\nimport { assign } from \"min-dash\";\r\n\r\n/**\r\n * service that allow replacing of elements.\r\n */\r\nexport default function Replace(modeling) {\r\n this._modeling = modeling;\r\n}\r\n\r\n/**\r\n * @param {Element} oldElement - element to be replaced\r\n * @param {Object} newElementData - containing information about the new Element, for example height, width, type.\r\n * @param modeling\r\n */\r\nfunction replaceElement(oldElement, newElementData, modeling) {\r\n // let modeling = this._modeling;\r\n\r\n let newElement = setCenterOfElement(newElementData, oldElement, modeling);\r\n let outgoingActivities = newElement.outgoing;\r\n let incomingActivities = newElement.incoming;\r\n\r\n outgoingActivities.forEach((element) => {\r\n element.businessObject.source = newElement.id;\r\n });\r\n\r\n incomingActivities.forEach((element) => {\r\n element.businessObject.target = newElement.id;\r\n });\r\n\r\n return newElement;\r\n}\r\n\r\nfunction setCenterOfElement(newElementData, oldElement, modeling) {\r\n newElementData.x = Math.ceil(\r\n oldElement.x + (newElementData.width || oldElement.width) / 2\r\n );\r\n newElementData.y = Math.ceil(\r\n oldElement.y + (newElementData.height || oldElement.height) / 2\r\n );\r\n\r\n assign(newElementData, { name: oldElement.businessObject.name });\r\n\r\n return modeling.replaceShape(oldElement, newElementData, {});\r\n}\r\n\r\nReplace.prototype.replaceElement = replaceElement;\r\n","\"use strict\";\r\n\r\nimport Replace from \"./replace\";\r\nimport * as replaceOptions from \"./replaceOptions\";\r\n\r\nimport { forEach } from \"min-dash\";\r\n\r\n/**\r\n * This module is an element agnostic replace menu provider for the popup menu.\r\n */\r\nexport default function ReplaceMenuProvider(modeling) {\r\n this._dsReplace = new Replace(modeling);\r\n this._modeling = modeling;\r\n}\r\n\r\nReplaceMenuProvider.$inject = [\"modeling\"];\r\n\r\n/**\r\n * Get all entries from replaceOptions for the given element and apply filters\r\n * on them. Get for example only elements, which are different from the current one.\r\n *\r\n * @param {djs.model.Base} element\r\n *\r\n * @return {Array} a list of menu entry items\r\n */\r\nReplaceMenuProvider.prototype.getEntries = function (element) {\r\n let entries;\r\n if (element.type.includes(\"actor\")) {\r\n entries = replaceOptions.actorReplaceOptions(element.type);\r\n } else if (element.type.includes(\"workObject\")) {\r\n entries = replaceOptions.workObjectReplaceOptions(element.type);\r\n }\r\n\r\n return this._createEntries(element, entries);\r\n};\r\n\r\n/**\r\n * Creates an array of menu entry objects for a given element and filters the replaceOptions\r\n * according to a filter function.\r\n *\r\n * @param {djs.model.Base} element\r\n * @param {Object} replaceOptions\r\n *\r\n * @return {Array} a list of menu items\r\n */\r\nReplaceMenuProvider.prototype._createEntries = function (\r\n element,\r\n replaceOptions\r\n) {\r\n let menuEntries = [];\r\n\r\n let self = this;\r\n\r\n forEach(replaceOptions, function (definition) {\r\n let entry = self._createMenuEntry(definition, element);\r\n\r\n menuEntries.push(entry);\r\n });\r\n\r\n return menuEntries;\r\n};\r\n\r\n/**\r\n * Creates and returns a single menu entry item.\r\n *\r\n * @param {Object} definition a single replace options definition object\r\n * @param {djs.model.Base} element\r\n * @param {Function} [action] an action callback function which gets called when\r\n * the menu entry is being triggered.\r\n *\r\n * @return {Object} menu entry item\r\n */\r\nReplaceMenuProvider.prototype._createMenuEntry = function (\r\n definition,\r\n element,\r\n action\r\n) {\r\n let replaceElement = this._dsReplace.replaceElement;\r\n let modeling = this._modeling;\r\n let replaceAction = function () {\r\n return replaceElement(element, definition.target, modeling);\r\n };\r\n\r\n action = action || replaceAction;\r\n\r\n return {\r\n label: definition.label,\r\n className: definition.className,\r\n id: definition.actionName,\r\n action: action,\r\n };\r\n};\r\n","import { elementTypes } from \"src/app/Domain/Common/elementTypes\";\r\nimport { getNameFromType } from \"src/app/Utils/naming\";\r\n\r\nlet iconDictionaryService;\r\n\r\nexport function initializeReplaceOptions(iconDictionary) {\r\n iconDictionaryService = iconDictionary;\r\n}\r\n\r\nexport function actorReplaceOptions(name) {\r\n const actorTypes = iconDictionaryService.getTypeDictionary(\r\n elementTypes.ACTOR\r\n );\r\n\r\n let replaceOption = {};\r\n let i = 0;\r\n\r\n actorTypes.keysArray().forEach((actorType) => {\r\n if (!name.includes(actorType)) {\r\n const typeName = getNameFromType(actorType);\r\n replaceOption[i] = {\r\n label: \"Change to \" + typeName,\r\n actionName: \"replace-with-actor-\" + typeName.toLowerCase(),\r\n className: iconDictionaryService.getIconForBPMN(actorType),\r\n target: {\r\n type: actorType,\r\n },\r\n };\r\n i++;\r\n }\r\n });\r\n return replaceOption;\r\n}\r\n\r\nexport function workObjectReplaceOptions(name) {\r\n const workObjectTypes = iconDictionaryService.getTypeDictionary(\r\n elementTypes.WORKOBJECT\r\n );\r\n\r\n let replaceOption = {};\r\n let i = 0;\r\n\r\n workObjectTypes.keysArray().forEach((workObjectType) => {\r\n if (!name.includes(workObjectType)) {\r\n const typeName = getNameFromType(workObjectType);\r\n replaceOption[i] = {\r\n label: \"Change to \" + typeName,\r\n actionName: \"replace-with-actor-\" + typeName,\r\n className: iconDictionaryService.getIconForBPMN(workObjectType),\r\n target: {\r\n type: workObjectType,\r\n },\r\n };\r\n }\r\n i++;\r\n });\r\n return replaceOption;\r\n}\r\n","\"use strict\";\r\n\r\nimport inherits from \"inherits\";\r\n\r\nimport ContextPadProvider from \"bpmn-js/lib/features/context-pad/ContextPadProvider\";\r\n\r\nimport { assign, bind } from \"min-dash\";\r\nimport { generateAutomaticNumber } from \"../numbering/numbering\";\r\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\r\nimport { getAllStandardIconKeys } from \"src/app/Domain/Domain-Configuration/allIcons\";\r\nimport { getNameFromType } from \"src/app/Utils/naming\";\r\n\r\nlet dirtyFlagService;\r\nlet iconDictionaryService;\r\n\r\nexport function initializeContextPadProvider(dirtyFlag, iconDictionary) {\r\n dirtyFlagService = dirtyFlag;\r\n iconDictionaryService = iconDictionary;\r\n}\r\n\r\nexport default function DomainStoryContextPadProvider(\r\n injector,\r\n connect,\r\n translate,\r\n elementFactory,\r\n create,\r\n canvas,\r\n contextPad,\r\n popupMenu,\r\n replaceMenuProvider,\r\n commandStack,\r\n eventBus,\r\n modeling\r\n) {\r\n let startConnect;\r\n let selectedElement;\r\n\r\n injector.invoke(ContextPadProvider, this);\r\n let autoPlace = injector.get(\"autoPlace\", false);\r\n\r\n let cached = bind(this.getContextPadEntries, this);\r\n\r\n const colorPicker = document.getElementById(\"colorPicker\");\r\n colorPicker.onchange = (ev) => {\r\n const context = {\r\n businessObject: selectedElement.businessObject,\r\n newColor: ev.target.value,\r\n element: selectedElement,\r\n };\r\n\r\n commandStack.execute(\"element.colorChange\", context);\r\n dirtyFlagService.makeDirty();\r\n };\r\n\r\n popupMenu.registerProvider(\"ds-replace\", replaceMenuProvider);\r\n popupMenu.registerProvider(\"bpmn-replace\", replaceMenuProvider);\r\n\r\n this.getContextPadEntries = function (element) {\r\n const allStandardIconKeys = getAllStandardIconKeys();\r\n let actions = cached(element);\r\n\r\n startConnect = function (event, element, autoActivate) {\r\n connect.start(event, element, autoActivate);\r\n };\r\n\r\n if (element.type.includes(elementTypes.WORKOBJECT)) {\r\n if (\r\n allStandardIconKeys.includes(\r\n element.type.replace(elementTypes.WORKOBJECT, \"\")\r\n )\r\n ) {\r\n addColorChange(actions);\r\n }\r\n addConnectWithActivity(actions, startConnect);\r\n addTextAnnotation(actions);\r\n addActors(appendAction, actions);\r\n addWorkObjects(appendAction, actions);\r\n addChangeWorkObjectTypeMenu(actions);\r\n } else if (element.type.includes(elementTypes.ACTOR)) {\r\n if (\r\n allStandardIconKeys.includes(\r\n element.type.replace(elementTypes.ACTOR, \"\")\r\n )\r\n ) {\r\n addColorChange(actions);\r\n }\r\n addConnectWithActivity(actions, startConnect);\r\n addTextAnnotation(actions);\r\n addWorkObjects(appendAction, actions);\r\n addChangeActorTypeMenu(actions);\r\n } else if (element.type.includes(elementTypes.GROUP)) {\r\n delete actions.delete;\r\n addTextAnnotation(actions);\r\n assign(actions, {\r\n deleteGroup: {\r\n group: \"edit\",\r\n className: \"bpmn-icon-trash\",\r\n title: \"Remove Group without Child-Elements\",\r\n action: {\r\n click: function (event, element) {\r\n modeling.removeGroup(element);\r\n dirtyFlagService.makeDirty();\r\n },\r\n },\r\n },\r\n });\r\n addColorChange(actions);\r\n } else if (element.type.includes(elementTypes.ACTIVITY)) {\r\n moveDeleteActionToEndOfArray(actions);\r\n\r\n addColorChange(actions);\r\n\r\n assign(actions, {\r\n delete: {\r\n group: \"edit\",\r\n className: \"bpmn-icon-trash\",\r\n title: \"Remove\",\r\n action: {\r\n click: function (event, element) {\r\n modeling.removeElements({ element });\r\n dirtyFlagService.makeDirty();\r\n },\r\n },\r\n },\r\n });\r\n }\r\n\r\n return actions;\r\n };\r\n\r\n function moveDeleteActionToEndOfArray(actions) {\r\n delete actions.delete;\r\n\r\n assign(actions, {\r\n changeDirection: {\r\n group: \"edit\",\r\n className: \"icon-domain-story-changeDirection\",\r\n title: translate(\"Change direction\"),\r\n action: {\r\n // event needs to be addressed\r\n click: function (event, element) {\r\n changeDirection(element);\r\n },\r\n },\r\n },\r\n });\r\n }\r\n\r\n function addChangeActorTypeMenu(actions) {\r\n assign(actions, {\r\n replace: {\r\n group: \"edit\",\r\n className: \"bpmn-icon-screw-wrench\",\r\n title: translate(\"Change type\"),\r\n action: {\r\n click: function (event, element) {\r\n let position = assign(getReplaceMenuPosition(element), {\r\n cursor: { x: event.x, y: event.y },\r\n });\r\n popupMenu.open(element, \"ds-replace\", position);\r\n },\r\n },\r\n },\r\n });\r\n }\r\n\r\n function addColorChange(actions) {\r\n assign(actions, {\r\n colorChange: {\r\n group: \"edit\",\r\n className: \"icon-domain-story-color-picker\",\r\n title: translate(\"Change color\"),\r\n action: {\r\n click: function (event, element) {\r\n selectedElement = element;\r\n colorPicker.click();\r\n },\r\n },\r\n },\r\n });\r\n }\r\n\r\n function addTextAnnotation(actions) {\r\n assign(actions, {\r\n \"append.text-annotation\": appendAction(\r\n elementTypes.TEXTANNOTATION,\r\n \"bpmn-icon-text-annotation\",\r\n \"textannotation\",\r\n \"connect\"\r\n ),\r\n });\r\n }\r\n\r\n function addConnectWithActivity(actions, startConnect) {\r\n assign(actions, {\r\n connect: {\r\n group: \"connect\",\r\n className: \"bpmn-icon-connection\",\r\n title: translate(\"Connect with activity\"),\r\n action: {\r\n click: startConnect,\r\n dragstart: startConnect,\r\n },\r\n },\r\n });\r\n }\r\n\r\n function addWorkObjects(appendAction, actions) {\r\n let workObjectTypes = iconDictionaryService.getTypeDictionary(\r\n elementTypes.WORKOBJECT\r\n );\r\n workObjectTypes.keysArray().forEach((workObjectType) => {\r\n let name = getNameFromType(workObjectType);\r\n let icon = iconDictionaryService.getIconForBPMN(workObjectType);\r\n let action = [];\r\n action[\"append.workObject\" + name] = appendAction(\r\n workObjectType,\r\n icon,\r\n name,\r\n \"workObjects\"\r\n );\r\n assign(actions, action);\r\n });\r\n }\r\n\r\n function addActors(appendAction, actions) {\r\n let actorTypes = iconDictionaryService.getTypeDictionary(\r\n elementTypes.ACTOR\r\n );\r\n actorTypes.keysArray().forEach((actorType) => {\r\n let name = getNameFromType(actorType);\r\n let icon = iconDictionaryService.getIconForBPMN(actorType);\r\n let action = [];\r\n action[\"append.actor\" + name] = appendAction(\r\n actorType,\r\n icon,\r\n name,\r\n \"actors\"\r\n );\r\n assign(actions, action);\r\n });\r\n }\r\n\r\n function addChangeWorkObjectTypeMenu(actions) {\r\n assign(actions, {\r\n replace: {\r\n group: \"edit\",\r\n className: \"bpmn-icon-screw-wrench\",\r\n title: translate(\"Change type\"),\r\n action: {\r\n click: function (event, element) {\r\n let position = assign(getReplaceMenuPosition(element), {\r\n cursor: { x: event.x, y: event.y },\r\n });\r\n popupMenu.open(element, \"ds-replace\", position);\r\n },\r\n },\r\n },\r\n });\r\n }\r\n\r\n function changeDirection(element) {\r\n let context;\r\n let businessObject = element.businessObject;\r\n let newNumber;\r\n\r\n if (element.source.type.includes(elementTypes.ACTOR)) {\r\n newNumber = 0;\r\n } else {\r\n newNumber = generateAutomaticNumber(element, commandStack);\r\n }\r\n context = {\r\n businessObject: businessObject,\r\n newNumber: newNumber,\r\n element: element,\r\n };\r\n commandStack.execute(\"activity.directionChange\", context);\r\n }\r\n\r\n function getReplaceMenuPosition(element) {\r\n let Y_OFFSET = 5;\r\n\r\n let diagramContainer = canvas.getContainer(),\r\n pad = contextPad.getPad(element).html;\r\n\r\n let diagramRect = diagramContainer.getBoundingClientRect(),\r\n padRect = pad.getBoundingClientRect();\r\n\r\n let top = padRect.top - diagramRect.top;\r\n let left = padRect.left - diagramRect.left;\r\n\r\n return {\r\n x: left,\r\n y: top + padRect.height + Y_OFFSET,\r\n };\r\n }\r\n\r\n /**\r\n * create an append action\r\n *\r\n * @param {String} type\r\n * @param {String} className\r\n * @param {String} [title]\r\n * @param {String} group\r\n * @param {Object} [options]\r\n *\r\n * @return {Object} descriptor\r\n */\r\n function appendAction(type, className, title, group, options) {\r\n if (typeof title !== \"string\") {\r\n options = title;\r\n title = translate(\"{type}\", { type: type.replace(/^domainStory:/, \"\") });\r\n }\r\n\r\n function appendStart(event, element) {\r\n let shape = elementFactory.createShape(assign({ type: type }, options));\r\n let context = {\r\n elements: [shape],\r\n hints: {},\r\n source: element,\r\n };\r\n create.start(event, shape, context);\r\n }\r\n\r\n return {\r\n group: group,\r\n className: className,\r\n title: \"Append \" + title,\r\n action: {\r\n dragstart: startConnect,\r\n click: appendStart,\r\n },\r\n };\r\n }\r\n}\r\n\r\ninherits(DomainStoryContextPadProvider, ContextPadProvider);\r\n\r\nDomainStoryContextPadProvider.$inject = [\r\n \"injector\",\r\n \"connect\",\r\n \"translate\",\r\n \"elementFactory\",\r\n \"create\",\r\n \"canvas\",\r\n \"contextPad\",\r\n \"popupMenu\",\r\n \"replaceMenuProvider\",\r\n \"commandStack\",\r\n \"eventBus\",\r\n \"modeling\",\r\n];\r\n","\"use strict\";\r\n\r\nimport { assign } from \"min-dash\";\r\n\r\nimport inherits from \"inherits\";\r\n\r\nimport BpmnElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\r\n\r\nimport { DEFAULT_LABEL_SIZE } from \"bpmn-js/lib/util/LabelUtil\";\r\n\r\nimport DomainStoryIdFactory from \"./domainStoryIdFactory\";\r\n\r\n/**\r\n * A custom factory that knows how to create BPMN _and_ custom elements.\r\n */\r\nexport default function DomainStoryElementFactory(bpmnFactory, moddle) {\r\n BpmnElementFactory.call(this, bpmnFactory, moddle);\r\n\r\n let self = this;\r\n let domainStoryIdFactory = new DomainStoryIdFactory();\r\n\r\n /**\r\n * create a diagram-js element with the given type (any of shape, connection, label).\r\n *\r\n * @param {String} elementType\r\n * @param {Object} attrs\r\n *\r\n * @return {djs.model.Base}\r\n */\r\n this.create = function (elementType, attrs) {\r\n let type = attrs.type;\r\n\r\n if (elementType === \"label\") {\r\n return self.baseCreate(\r\n elementType,\r\n assign({ type: \"label\" }, DEFAULT_LABEL_SIZE, attrs)\r\n );\r\n }\r\n\r\n // add type to businessObject if custom\r\n if (/^domainStory:/.test(type)) {\r\n if (!attrs.businessObject) {\r\n attrs.businessObject = {\r\n type: type,\r\n name: attrs.name ? attrs.name : \"\",\r\n };\r\n }\r\n\r\n if (attrs.id) {\r\n domainStoryIdFactory.registerId(attrs.id);\r\n } else {\r\n attrs.id = domainStoryIdFactory.getId(elementType);\r\n }\r\n assign(attrs.businessObject, {\r\n id: attrs.id,\r\n });\r\n\r\n let id = attrs.id;\r\n attrs.businessObject.get = function (key) {\r\n if (key === \"id\") {\r\n return id;\r\n }\r\n };\r\n attrs.businessObject.set = function (key, value) {\r\n if (key === \"id\") {\r\n assign(attrs.businessObject, { id: value });\r\n }\r\n };\r\n\r\n if (!attrs.businessObject.$type) {\r\n assign(attrs.businessObject, { $type: \"Element\" });\r\n }\r\n assign(attrs.businessObject, { di: {} });\r\n if (!attrs.businessObject.$descriptor) {\r\n assign(attrs.businessObject, { $descriptor: {} });\r\n }\r\n\r\n // add width and height if shape\r\n if (\r\n (!/:activity$/.test(type) || !/:connection$/.test(type)) &&\r\n !((/:group$/.test(type) && attrs.height) || attrs.width)\r\n ) {\r\n assign(attrs, self._getCustomElementSize(type));\r\n }\r\n\r\n if (!(\"$instanceOf\" in attrs.businessObject)) {\r\n // ensure we can use ModelUtil#is for type checks\r\n Object.defineProperty(attrs.businessObject, \"$instanceOf\", {\r\n value: function (type) {\r\n return this.type === type;\r\n },\r\n });\r\n }\r\n\r\n return self.baseCreate(elementType, attrs);\r\n }\r\n\r\n return self.createBpmnElement(elementType, attrs);\r\n };\r\n}\r\n\r\ninherits(DomainStoryElementFactory, BpmnElementFactory);\r\n\r\nDomainStoryElementFactory.$inject = [\"bpmnFactory\", \"moddle\"];\r\n\r\n/**\r\n * returns the default size of custom shapes.\r\n *\r\n * the following example shows an interface on how\r\n * to setup the custom shape's dimensions.\r\n * *\r\n * @param {String} type\r\n *\r\n * @return {Dimensions} a {width, height} object representing the size of the element\r\n */\r\nDomainStoryElementFactory.prototype._getCustomElementSize = function (type) {\r\n let shapes = {\r\n __default: { width: 75, height: 75 },\r\n \"domainStory:textAnnotation\": { width: 100, height: 30 },\r\n \"domainStory:group\": { width: 525, height: 275 },\r\n };\r\n\r\n return shapes[type] || shapes.__default;\r\n};\r\n\r\nclass Dimensions {\r\n width;\r\n height;\r\n}\r\n","\"use strict\";\r\n\r\nlet idList = [];\r\n\r\nexport default function DomainStoryIdFactory() {}\r\n\r\nDomainStoryIdFactory.prototype.getId = function (type) {\r\n return generateId(type);\r\n};\r\n\r\nDomainStoryIdFactory.prototype.registerId = function (id) {\r\n idList.push(id);\r\n};\r\n\r\nfunction generateId(type) {\r\n let idNumber = fourDigitsId();\r\n\r\n let id = type + \"_\" + idSuffix(idNumber);\r\n\r\n while (containsId(id)) {\r\n idNumber++;\r\n\r\n id = type + \"_\" + idSuffix(idNumber);\r\n }\r\n\r\n idList.push(id);\r\n return id;\r\n}\r\n\r\nfunction idSuffix(idNumber) {\r\n let id;\r\n if (idNumber > 9999) {\r\n id = 0;\r\n } else if (idNumber < 10) {\r\n id = \"000\" + idNumber;\r\n } else if (idNumber < 100) {\r\n id = \"00\" + idNumber;\r\n } else if (idNumber < 1000) {\r\n id = \"0\" + idNumber;\r\n } else {\r\n id = \"\" + idNumber;\r\n }\r\n return id;\r\n}\r\n\r\nfunction fourDigitsId() {\r\n return Math.floor(Math.random() * 10000);\r\n}\r\n\r\nexport function containsId(id) {\r\n let same = false;\r\n idList.forEach((element) => {\r\n if (id === element) {\r\n same = true;\r\n }\r\n });\r\n return same;\r\n}\r\n","\"use strict\";\r\n\r\nimport inherits from \"inherits\";\r\nimport BaseRenderer from \"diagram-js/lib/draw/BaseRenderer\";\r\nimport Ids from \"ids\";\r\nimport { getAnnotationBoxHeight } from \"./labeling/dsLabelEditingPreview\";\r\nimport { componentsToPath, createLine } from \"diagram-js/lib/util/RenderUtil\";\r\nimport {\r\n append as svgAppend,\r\n attr as svgAttr,\r\n classes as svgClasses,\r\n create as svgCreate,\r\n} from \"tiny-svg\";\r\nimport { query as domQuery } from \"min-dom\";\r\nimport { assign, isObject } from \"min-dash\";\r\nimport { getNumberStash } from \"./labeling/dsLabelEditingProvider\";\r\nimport {\r\n addNumberToRegistry,\r\n generateAutomaticNumber,\r\n numberBoxDefinitions,\r\n} from \"./numbering/numbering\";\r\n\r\nimport { calculateTextWidth } from \"./labeling/dsLabelUtil\";\r\nimport { countLines, labelPosition } from \"./labeling/position\";\r\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\r\nimport { angleBetween } from \"../../Utils/mathExtensions\";\r\n\r\nlet RENDERER_IDS = new Ids();\r\nlet numbers = [];\r\nconst DEFAULT_COLOR = \"black\";\r\n\r\n/**\r\n * a renderer that knows how to render custom elements.\r\n */\r\nlet iconDictionary;\r\nlet elementRegistry;\r\nlet dirtyFlag;\r\n\r\nexport function initializeRenderer(\r\n iconDictionaryService,\r\n elementRegistryService,\r\n dirtyFlagService\r\n) {\r\n iconDictionary = iconDictionaryService;\r\n elementRegistry = elementRegistryService;\r\n dirtyFlag = dirtyFlagService;\r\n}\r\n\r\nexport default function DomainStoryRenderer(\r\n eventBus,\r\n styles,\r\n canvas,\r\n textRenderer,\r\n pathMap,\r\n commandStack\r\n) {\r\n BaseRenderer.call(this, eventBus, 2000);\r\n\r\n let rendererId = RENDERER_IDS.next();\r\n let markers = {};\r\n let computeStyle = styles.computeStyle;\r\n\r\n // generate the automatic Number for an activity originating from an actor\r\n function generateActivityNumber(parentGfx, element, box) {\r\n // whenever we want to edit an activity, it gets redrawn as a new object\r\n // and the custom information is lost,\r\n // so we stash it before the editing occurs and set the value here\r\n\r\n let numberStash = getNumberStash();\r\n let semantic = element.businessObject;\r\n\r\n if (numberStash.use) {\r\n semantic.number = numberStash.number;\r\n }\r\n\r\n box.x -= 65;\r\n box.y -= 12;\r\n renderNumber(parentGfx, \".\", backgroundDotStyle(box), element.type);\r\n box.x += 30;\r\n box.y += 3;\r\n renderNumber(parentGfx, \"o\", backgroundBoxStyle(box), element.type);\r\n\r\n numbers[semantic.number] = true;\r\n box.x += 9;\r\n box.y -= 7;\r\n\r\n if (semantic.number < 10) {\r\n box.x += 3;\r\n }\r\n\r\n let newRenderedNumber = renderNumber(\r\n parentGfx,\r\n semantic.number,\r\n numberStyle(box),\r\n element.type\r\n );\r\n addNumberToRegistry(newRenderedNumber, semantic.number);\r\n }\r\n\r\n // style functions\r\n function numberStyle(box) {\r\n return {\r\n box: box,\r\n fitBox: true,\r\n style: assign({}, textRenderer.getExternalStyle(), {\r\n fill: \"black\",\r\n position: \"absolute\",\r\n }),\r\n };\r\n }\r\n\r\n function backgroundBoxStyle(box) {\r\n return {\r\n box: box,\r\n fitBox: true,\r\n style: assign({}, textRenderer.getExternalStyle(), {\r\n fill: \"black\",\r\n fontSize: 50,\r\n position: \"absolute\",\r\n fontFamily: \"Courier New\",\r\n }),\r\n };\r\n }\r\n\r\n function backgroundDotStyle(box) {\r\n return {\r\n box: box,\r\n fitBox: true,\r\n style: assign({}, textRenderer.getExternalStyle(), {\r\n fill: \"white\",\r\n fontSize: 150,\r\n position: \"absolute\",\r\n fontFamily: \"Courier\",\r\n }),\r\n };\r\n }\r\n\r\n // render functions\r\n // render label associated with actors and workobjects\r\n function renderEmbeddedLabel(parentGfx, element, align, padding) {\r\n let businessObject = element.businessObject;\r\n return renderLabel(\r\n parentGfx,\r\n businessObject.name,\r\n {\r\n box: element,\r\n align: align,\r\n padding: padding ? padding : 0,\r\n style: {\r\n fill: \"#000000\",\r\n },\r\n },\r\n element.type\r\n );\r\n }\r\n\r\n // render label associated with activities\r\n function renderExternalLabel(parentGfx, element) {\r\n let semantic = element.businessObject;\r\n let waypoints = element.waypoints;\r\n let lines = countLines(semantic.name);\r\n\r\n if (element.waypoints != null) {\r\n let position = labelPosition(waypoints, lines);\r\n let startPoint = element.waypoints[position.selected];\r\n let endPoint = element.waypoints[position.selected + 1];\r\n let angle = angleBetween(startPoint, endPoint);\r\n let alignment = \"left\";\r\n let boxWidth = 500;\r\n let xStart = position.x;\r\n\r\n // if the activity is horizontal, we want to center the label\r\n if (angle === 0 || angle === 180) {\r\n boxWidth = Math.abs(startPoint.x - endPoint.x);\r\n alignment = \"center\";\r\n xStart =\r\n (startPoint.x + endPoint.x) / 2 - calculateTextWidth(semantic.name);\r\n }\r\n\r\n let box = {\r\n textAlign: alignment,\r\n width: boxWidth,\r\n height: 30,\r\n x: xStart,\r\n y: position.y,\r\n };\r\n\r\n if (semantic.name && semantic.name.length) {\r\n return renderLabel(\r\n parentGfx,\r\n semantic.name,\r\n {\r\n box: box,\r\n fitBox: true,\r\n style: assign({}, textRenderer.getExternalStyle(), {\r\n fill: \"black\",\r\n wordWrap: \"break-word\",\r\n overflowWrap: \"break-word\",\r\n hyphens: \"auto\",\r\n }),\r\n },\r\n element.type\r\n );\r\n }\r\n }\r\n }\r\n\r\n // render the number associated with an activity\r\n function renderExternalNumber(parentGfx, element) {\r\n if (element && element.source) {\r\n let semantic = element.businessObject;\r\n\r\n let box = numberBoxDefinitions(element);\r\n\r\n if (\r\n semantic.number == null &&\r\n element.source.type &&\r\n element.source.type.includes(elementTypes.ACTOR)\r\n ) {\r\n generateAutomaticNumber(element, commandStack);\r\n }\r\n\r\n // render the background for the number\r\n if (semantic.number && element.source.type.includes(elementTypes.ACTOR)) {\r\n generateActivityNumber(parentGfx, element, box);\r\n } else {\r\n semantic.number = null;\r\n }\r\n }\r\n }\r\n\r\n // render a number on the canvas\r\n function renderNumber(parentGfx, number, options, type) {\r\n if (number < 10) {\r\n number = String(number);\r\n }\r\n number = String(number);\r\n let text = textRenderer.createText(number || \"\", options);\r\n let height = 0;\r\n\r\n svgClasses(text).add(\"djs-labelNumber\");\r\n\r\n setCoordinates(type, text, options, height, parentGfx);\r\n\r\n svgAppend(parentGfx, text);\r\n return text;\r\n }\r\n\r\n // the coordinates of the activity label must be set directly and will not be taken from the box\r\n function setCoordinates(type, text, options, height, parentGfx) {\r\n if (/:activity$/.test(type)) {\r\n text.innerHTML = manipulateInnerHTMLXLabel(\r\n text.children,\r\n options.box.x,\r\n 0\r\n );\r\n text.innerHTML = manipulateInnerHTMLYLabel(\r\n text.children,\r\n options.box.y,\r\n 0\r\n );\r\n } else if (/:actor/.test(type)) {\r\n height = parentGfx.firstChild.attributes.height.nodeValue;\r\n text.innerHTML = manipulateInnerHTMLYLabel(text.children, height, 0);\r\n } else if (/:workObject/.test(type)) {\r\n height = parentGfx.firstChild.attributes.height.nodeValue;\r\n text.innerHTML = manipulateInnerHTMLYLabel(text.children, height, 26);\r\n }\r\n }\r\n\r\n // render a label on the canvas\r\n function renderLabel(parentGfx, label, options, type) {\r\n let text = textRenderer.createText(label || \"\", options);\r\n let height = 0;\r\n\r\n svgClasses(text).add(\"djs-label\");\r\n setCoordinates(type, text, options, height, parentGfx);\r\n\r\n svgAppend(parentGfx, text);\r\n return text;\r\n }\r\n\r\n // determine the Y-coordinate of the label / number to be rendered\r\n function manipulateInnerHTMLYLabel(children, y, offset) {\r\n if (children) {\r\n let result = \"\";\r\n for (let i = 0; i < children.length; i++) {\r\n result += children[i].outerHTML.replace(\r\n /y=\"-?\\d*.\\d*\"/,\r\n 'y=\"' + (Number(y) + offset + 14 * i) + '\"'\r\n );\r\n }\r\n return result;\r\n }\r\n }\r\n\r\n // determine the X-coordinate of the label / number to be rendered\r\n function manipulateInnerHTMLXLabel(children, x, offset) {\r\n if (children) {\r\n let result = \"\";\r\n for (let i = 0; i < children.length; i++) {\r\n result += children[i].outerHTML.replace(\r\n /x=\"-?\\d*.\\d*\"/,\r\n 'x=\"' + (Number(x) + offset + 14) + '\"'\r\n );\r\n }\r\n return result;\r\n }\r\n }\r\n\r\n // draw functions\r\n this.drawGroup = function (parentGfx, element) {\r\n if (!element.businessObject.pickedColor) {\r\n element.businessObject.pickedColor = DEFAULT_COLOR;\r\n }\r\n let rect = drawRect(\r\n parentGfx,\r\n element.width,\r\n element.height,\r\n 0,\r\n assign(\r\n {\r\n fill: \"none\",\r\n stroke: element.businessObject.pickedColor,\r\n },\r\n element.attrs\r\n )\r\n );\r\n renderEmbeddedLabel(parentGfx, element, \"left-top\", 8);\r\n\r\n return rect;\r\n };\r\n\r\n function useColorForElement(element, iconSRC) {\r\n if (!element.businessObject.pickedColor) {\r\n element.businessObject.pickedColor = DEFAULT_COLOR;\r\n }\r\n const match = iconSRC.match(/fill=\".*?\"/);\r\n if (match && match.length > 1) {\r\n return iconSRC.replace(\r\n /fill=\".*?\"/,\r\n 'fill=\"' + element.businessObject.pickedColor + '\"'\r\n );\r\n } else {\r\n const index = iconSRC.indexOf(\"' +\r\n ''\r\n );\r\n } else {\r\n return useColorForElement(element, iconSRC);\r\n }\r\n }\r\n\r\n this.drawActor = function (p, element) {\r\n let svgDynamicSizeAttributes = {\r\n width: element.width,\r\n height: element.height,\r\n },\r\n actor;\r\n let iconSRC = iconDictionary.getTypeIconSRC(\r\n elementTypes.ACTOR,\r\n element.type\r\n );\r\n iconSRC = getIconSrc(iconSRC, element);\r\n actor = svgCreate(iconSRC);\r\n\r\n svgAttr(actor, svgDynamicSizeAttributes);\r\n svgAppend(p, actor);\r\n\r\n renderEmbeddedLabel(p, element, \"center\", -5);\r\n return actor;\r\n };\r\n\r\n this.drawWorkObject = function (p, element) {\r\n let svgDynamicSizeAttributes = {\r\n width: element.width * 0.65,\r\n height: element.height * 0.65,\r\n x: element.width / 2 - 25,\r\n y: element.height / 2 - 25,\r\n },\r\n workObject;\r\n let iconSRC = iconDictionary.getTypeIconSRC(\r\n elementTypes.WORKOBJECT,\r\n element.type\r\n );\r\n iconSRC = getIconSrc(iconSRC, element);\r\n workObject = svgCreate(iconSRC);\r\n\r\n svgAttr(workObject, svgDynamicSizeAttributes);\r\n svgAppend(p, workObject);\r\n renderEmbeddedLabel(p, element, \"center\", -5);\r\n\r\n return workObject;\r\n };\r\n\r\n function useColorForActivity(element) {\r\n if (!element.businessObject.pickedColor) {\r\n element.businessObject.pickedColor = \"black\";\r\n }\r\n let attrs = \"\";\r\n return computeStyle(attrs, {\r\n stroke: element.businessObject.pickedColor,\r\n fill: \"none\",\r\n strokeWidth: 1.5,\r\n strokeLinejoin: \"round\",\r\n markerEnd: marker(\r\n \"activity\",\r\n \"black\",\r\n element.businessObject.pickedColor\r\n ),\r\n });\r\n }\r\n\r\n this.drawActivity = function (p, element) {\r\n adjustForTextOverlap(element);\r\n\r\n if (element) {\r\n let attrs = useColorForActivity(element);\r\n\r\n let x = svgAppend(p, createLine(element.waypoints, attrs));\r\n renderExternalLabel(p, element);\r\n renderExternalNumber(p, element);\r\n\r\n // just adjusting the start- and endpoint of the connection-element moves only the drawn connection,\r\n // not the interactive line. This can be fixed by manually overriding the points of the interactive polyline\r\n // in the HTMl with the points of the drawn one.\r\n // this however does not adjust the surrounding box of the connection.\r\n fixConnectionInHTML(p.parentElement);\r\n\r\n return x;\r\n }\r\n };\r\n\r\n function checkIfPointOverlapsText(point, source) {\r\n if (point.y > source.y + 60) {\r\n if (point.x > source.x + 3 && point.x < source.x + 72) {\r\n let lineOffset = getLineOffset(source);\r\n if (source.y + 75 + lineOffset > point.y) {\r\n point.y += lineOffset;\r\n }\r\n }\r\n }\r\n }\r\n\r\n function adjustForTextOverlap(element) {\r\n let source = element.source;\r\n let target = element.target;\r\n\r\n let waypoints = element.waypoints;\r\n let startPoint = waypoints[0];\r\n let endPoint = waypoints[waypoints.length - 1];\r\n\r\n if (startPoint && endPoint && source && target) {\r\n checkIfPointOverlapsText(startPoint, source);\r\n checkIfPointOverlapsText(endPoint, source);\r\n }\r\n }\r\n\r\n function getLineOffset(element) {\r\n let id = element.id;\r\n let offset = 0;\r\n\r\n let objects = document.getElementsByClassName(\"djs-element djs-shape\");\r\n for (let i = 0; i < objects.length; i++) {\r\n let data_id = objects.item(i).getAttribute(\"data-element-id\");\r\n if (data_id === id) {\r\n let object = objects.item(i);\r\n let text = object.getElementsByTagName(\"text\")[0];\r\n let tspans = text.getElementsByTagName(\"tspan\");\r\n let tspan = tspans[tspans.length - 1];\r\n offset = tspan.getAttribute(\"y\");\r\n }\r\n }\r\n return offset - 70;\r\n }\r\n\r\n function fixConnectionInHTML(wantedConnection) {\r\n if (wantedConnection) {\r\n let polylines = wantedConnection.getElementsByTagName(\"polyline\");\r\n if (polylines.length > 1) {\r\n polylines[1].setAttribute(\r\n \"points\",\r\n polylines[0].getAttribute(\"points\")\r\n );\r\n }\r\n }\r\n }\r\n\r\n this.drawDSConnection = function (p, element) {\r\n let attrs = \"\";\r\n attrs = computeStyle(attrs, {\r\n stroke: \"#000000\",\r\n strokeWidth: 1.5,\r\n strokeLinejoin: \"round\",\r\n strokeDasharray: \"5, 5\",\r\n });\r\n\r\n return svgAppend(p, createLine(element.waypoints, attrs));\r\n };\r\n\r\n this.drawAnnotation = function (parentGfx, element) {\r\n let style = {\r\n fill: \"none\",\r\n stroke: \"none\",\r\n };\r\n\r\n let text = element.businessObject.text || \"\";\r\n if (element.businessObject.text) {\r\n let height = getAnnotationBoxHeight();\r\n\r\n if (height === 0 && element.businessObject.number) {\r\n height = element.businessObject.number;\r\n }\r\n assign(element, {\r\n height: height,\r\n });\r\n\r\n // for some reason the keyword height is not exported, so we use another, which we know will be exported,\r\n // to ensure persistent annotation heights between sessions\r\n assign(element.businessObject, {\r\n number: height,\r\n });\r\n }\r\n\r\n let textElement = drawRect(\r\n parentGfx,\r\n element.width,\r\n element.height,\r\n 0,\r\n 0,\r\n style\r\n );\r\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\r\n xScaleFactor: 1,\r\n yScaleFactor: 1,\r\n containerWidth: element.width,\r\n containerHeight: element.height,\r\n position: {\r\n mx: 0.0,\r\n my: 0.0,\r\n },\r\n });\r\n\r\n drawPath(parentGfx, textPathData, {\r\n stroke: \"black\",\r\n });\r\n\r\n renderLabel(parentGfx, text, {\r\n box: element,\r\n align: \"left-top\",\r\n padding: 5,\r\n style: {\r\n fill: \"black\",\r\n },\r\n });\r\n\r\n return textElement;\r\n };\r\n\r\n // draw helper functions\r\n function drawPath(parentGfx, d, attrs) {\r\n attrs = computeStyle(attrs, [\"no-fill\"], {\r\n strokeWidth: 2,\r\n stroke: \"black\",\r\n });\r\n\r\n let path = svgCreate(\"path\");\r\n svgAttr(path, { d: d });\r\n svgAttr(path, attrs);\r\n\r\n svgAppend(parentGfx, path);\r\n\r\n return path;\r\n }\r\n\r\n function drawRect(parentGfx, width, height, r, offset, attrs) {\r\n if (isObject(offset)) {\r\n attrs = offset;\r\n offset = 0;\r\n }\r\n\r\n offset = offset || 0;\r\n attrs = computeStyle(attrs, {\r\n stroke: \"black\",\r\n strokeWidth: 2,\r\n fill: \"white\",\r\n });\r\n\r\n let rect = svgCreate(\"rect\");\r\n svgAttr(rect, {\r\n x: offset,\r\n y: offset,\r\n width: width - offset * 2,\r\n height: height - offset * 2,\r\n rx: r,\r\n ry: r,\r\n });\r\n\r\n svgAttr(rect, attrs);\r\n svgAppend(parentGfx, rect);\r\n\r\n return rect;\r\n }\r\n\r\n // marker functions\r\n function marker(type, fill, stroke) {\r\n let id = type + \"-\" + fill + \"-\" + stroke + \"-\" + rendererId;\r\n\r\n if (!markers[id]) {\r\n createMarker(type, fill, stroke);\r\n }\r\n return \"url(#\" + id + \")\";\r\n }\r\n\r\n function createMarker(type, fill, stroke) {\r\n let id = type + \"-\" + fill + \"-\" + stroke + \"-\" + rendererId;\r\n\r\n if (type === \"activity\") {\r\n let sequenceflowEnd = svgCreate(\"path\");\r\n svgAttr(sequenceflowEnd, { d: \"M 1 5 L 11 10 L 1 15 Z\" });\r\n\r\n addMarker(id, {\r\n element: sequenceflowEnd,\r\n ref: { x: 11, y: 10 },\r\n scale: 0.5,\r\n attrs: {\r\n fill: stroke,\r\n stroke: stroke,\r\n },\r\n });\r\n }\r\n }\r\n\r\n function addMarker(id, options) {\r\n let attrs = assign(\r\n {\r\n fill: \"black\",\r\n strokeWidth: 1,\r\n strokeLinecap: \"round\",\r\n strokeDasharray: \"none\",\r\n },\r\n options.attrs\r\n );\r\n\r\n let ref = options.ref || { x: 0, y: 0 };\r\n let scale = options.scale || 1;\r\n\r\n // resetting stroke dash array\r\n if (attrs.strokeDasharray === \"none\") {\r\n attrs.strokeDasharray = [10000, 1];\r\n }\r\n\r\n let marker = svgCreate(\"marker\");\r\n\r\n svgAttr(options.element, attrs);\r\n svgAppend(marker, options.element);\r\n svgAttr(marker, {\r\n id: id,\r\n viewBox: \"0 0 20 20\",\r\n refX: ref.x,\r\n refY: ref.y,\r\n markerWidth: 20 * scale,\r\n markerHeight: 20 * scale,\r\n orient: \"auto\",\r\n });\r\n\r\n let defs = domQuery(\"defs\", canvas._svg);\r\n if (!defs) {\r\n defs = svgCreate(\"defs\");\r\n svgAppend(canvas._svg, defs);\r\n }\r\n svgAppend(defs, marker);\r\n markers[id] = marker;\r\n }\r\n\r\n // path functions\r\n this.getWorkObjectPath = function (shape) {\r\n let rectangle = getRectPath(shape);\r\n return componentsToPath(rectangle);\r\n };\r\n\r\n this.getGroupPath = function (shape) {\r\n let rectangle = getRectPath(shape);\r\n return componentsToPath(rectangle);\r\n };\r\n\r\n this.getActivityPath = function (connection) {\r\n let waypoints = connection.waypoints.map(function (p) {\r\n return p.original || p;\r\n });\r\n\r\n let activityPath = [[\"M\", waypoints[0].x, waypoints[0].y]];\r\n\r\n waypoints.forEach(function (waypoint, index) {\r\n if (index !== 0) {\r\n activityPath.push([\"L\", waypoint.x, waypoint.y]);\r\n }\r\n });\r\n return componentsToPath(activityPath);\r\n };\r\n\r\n this.getActorPath = function (shape) {\r\n let rectangle = getRectPath(shape);\r\n return componentsToPath(rectangle);\r\n };\r\n}\r\n\r\ninherits(DomainStoryRenderer, BaseRenderer);\r\n\r\nDomainStoryRenderer.$inject = [\r\n \"eventBus\",\r\n \"styles\",\r\n \"canvas\",\r\n \"textRenderer\",\r\n \"pathMap\",\r\n \"commandStack\",\r\n];\r\n\r\nDomainStoryRenderer.prototype.canRender = function (element) {\r\n return /^domainStory:/.test(element.type);\r\n};\r\n\r\nDomainStoryRenderer.prototype.drawShape = function (p, element) {\r\n // polyfill for tests\r\n if (!String.prototype.startsWith) {\r\n Object.defineProperty(String.prototype, \"startsWith\", {\r\n value: function (search, pos) {\r\n pos = !pos || pos < 0 ? 0 : +pos;\r\n return this.substring(pos, pos + search.length) === search;\r\n },\r\n });\r\n }\r\n\r\n let type = element.type;\r\n element.businessObject.type = type;\r\n\r\n elementRegistry.correctInitialize();\r\n dirtyFlag.makeDirty();\r\n\r\n if (type.includes(elementTypes.ACTOR)) {\r\n return this.drawActor(p, element);\r\n } else if (type.includes(elementTypes.WORKOBJECT)) {\r\n return this.drawWorkObject(p, element);\r\n } else if (type.includes(elementTypes.TEXTANNOTATION)) {\r\n return this.drawAnnotation(p, element);\r\n } else if (type.includes(elementTypes.GROUP)) {\r\n return this.drawGroup(p, element);\r\n }\r\n};\r\n\r\nDomainStoryRenderer.prototype.getShapePath = function (shape) {\r\n let type = shape.type;\r\n\r\n if (type.includes(elementTypes.ACTOR)) {\r\n return this.getActorPath(shape);\r\n } else if (type.includes(elementTypes.WORKOBJECT)) {\r\n return this.getWorkObjectPath(shape);\r\n } else if (type.includes(elementTypes.GROUP)) {\r\n return this.getGroupPath(shape);\r\n }\r\n};\r\n\r\nDomainStoryRenderer.prototype.drawConnection = function (p, element) {\r\n let type = element.type;\r\n\r\n dirtyFlag.makeDirty();\r\n\r\n // fixes activities that were copy-pasted\r\n if (!element.businessObject.type) {\r\n element.businessObject.type = type;\r\n }\r\n if (type === elementTypes.ACTIVITY) {\r\n return this.drawActivity(p, element);\r\n } else if (type === elementTypes.CONNECTION) {\r\n return this.drawDSConnection(p, element);\r\n }\r\n};\r\n\r\n// TODO check if used\r\nDomainStoryRenderer.prototype.getConnectionPath = function (connection) {\r\n let type = connection.type;\r\n\r\n if (type === elementTypes.ACTIVITY || type === elementTypes.CONNECTION) {\r\n return this.getActivityPath(connection);\r\n }\r\n};\r\n\r\n// creates a SVG path that describes a rectangle which encloses the given shape.\r\nfunction getRectPath(shape) {\r\n let offset = 5;\r\n let x = shape.x,\r\n y = shape.y,\r\n width = shape.width / 2 + offset,\r\n height = shape.height / 2 + offset;\r\n\r\n return [\r\n [\"M\", x, y],\r\n [\"l\", width, 0],\r\n [\"l\", width, height],\r\n [\"l\", -width, height],\r\n [\"l\", -width, 0],\r\n [\"z\"],\r\n ];\r\n}\r\n","\"use strict\";\r\n\r\nimport { assign, every, reduce } from \"min-dash\";\r\n\r\nimport inherits from \"inherits\";\r\n\r\nimport RuleProvider from \"diagram-js/lib/features/rules/RuleProvider\";\r\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\r\nimport { is } from \"./util\";\r\n\r\nconst HIGH_PRIORITY = 1500;\r\nconst MIN_SIZE = 125;\r\n\r\nfunction isDomainStory(element) {\r\n return element && /^domainStory:/.test(element.type);\r\n}\r\n\r\nfunction isDomainStoryGroup(element) {\r\n return element && /^domainStory:group/.test(element.type);\r\n}\r\n\r\nfunction isActor(element) {\r\n return element && /^domainStory:actor\\w*/.test(element.type);\r\n}\r\n\r\nfunction isWorkObject(element) {\r\n return element && /^domainStory:workObject/.test(element.type);\r\n}\r\n\r\nfunction isActivity(element) {\r\n return element && /^domainStory:activity/.test(element.type);\r\n}\r\n\r\nfunction isConnection(element) {\r\n return element && /^domainStory:connection/.test(element.type);\r\n}\r\n\r\nfunction isAnnotation(element) {\r\n return element && /^domainStory:textAnnotation/.test(element.type);\r\n}\r\n\r\n/**\r\n * can source and target be connected?\r\n */\r\nfunction canConnect(source, target) {\r\n // only judge about two custom elements\r\n if (\r\n isDomainStoryGroup(target) ||\r\n !isDomainStory(source) ||\r\n !isDomainStory(target)\r\n ) {\r\n return;\r\n }\r\n\r\n // do not allow a connection from one element to itself\r\n if (source === target) {\r\n return;\r\n }\r\n\r\n // do not allow a connection between two actors\r\n if (isActor(source) && isActor(target)) {\r\n return;\r\n }\r\n\r\n // do not allow a connection, where the source or target is an activity\r\n if (isActivity(source) || isActivity(target)) {\r\n return;\r\n }\r\n\r\n // do not allow a connection, where the source or target is an annotation connection\r\n if (isConnection(source) || isConnection(target)) {\r\n return;\r\n }\r\n\r\n // do not allow a connection to a connection(the special type of connection between an element and a comment box)\r\n // when the target is an annotation, the connection type is an annotation connection instead of an activity\r\n if (isAnnotation(target)) {\r\n return { type: elementTypes.CONNECTION };\r\n }\r\n\r\n return { type: elementTypes.ACTIVITY };\r\n}\r\n\r\nfunction canResize(shape, newBounds) {\r\n if (is(shape, elementTypes.GROUP)) {\r\n if (newBounds) {\r\n let lowerLeft = { x: shape.x, y: shape.y + shape.height };\r\n let lowerRight = { x: shape.x + shape.width, y: shape.y + shape.height };\r\n let upperRight = { x: shape.x + shape.width, y: shape.y };\r\n\r\n if (newBounds.x !== shape.x && newBounds.y !== shape.y) {\r\n // upper left\r\n if (newBounds.x > lowerRight.x - MIN_SIZE) {\r\n assign(newBounds, { x: lowerRight.x - MIN_SIZE });\r\n }\r\n if (newBounds.y > lowerRight.y - MIN_SIZE) {\r\n assign(newBounds, { y: lowerRight.y - MIN_SIZE });\r\n }\r\n }\r\n\r\n if (newBounds.x !== shape.x && newBounds.y === shape.y) {\r\n // lower left\r\n if (newBounds.x > upperRight.x - MIN_SIZE) {\r\n assign(newBounds, { x: upperRight.x - MIN_SIZE });\r\n }\r\n }\r\n\r\n if (newBounds.x === shape.x && newBounds.y !== shape.y) {\r\n // upper right\r\n if (newBounds.y > lowerLeft.y - MIN_SIZE) {\r\n assign(newBounds, { y: lowerLeft.y - MIN_SIZE });\r\n }\r\n }\r\n\r\n if (newBounds.height < MIN_SIZE) {\r\n assign(newBounds, {\r\n height: MIN_SIZE,\r\n });\r\n }\r\n if (newBounds.width < MIN_SIZE) {\r\n assign(newBounds, {\r\n width: MIN_SIZE,\r\n });\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\nfunction canAttach(elements, target, source) {\r\n if (!Array.isArray(elements)) {\r\n elements = [elements];\r\n }\r\n\r\n // disallow appending as boundary event\r\n if (source) {\r\n return false;\r\n }\r\n\r\n // only (re-)attach one element at a time\r\n if (elements.length !== 1) {\r\n return false;\r\n }\r\n\r\n // allow default move operation\r\n if (!target) {\r\n return true;\r\n }\r\n\r\n // only allow drop on DomainStory Elements\r\n if (!isDomainStory(target)) {\r\n return false;\r\n }\r\n\r\n return \"attach\";\r\n}\r\n\r\nfunction canConnectToAnnotation(source, target, connection) {\r\n // do not allow an activity connect to an annotation\r\n if (isActivity(connection) && isAnnotation(target)) {\r\n return false;\r\n }\r\n\r\n // do not allow an annotation connection between two annotations\r\n if (\r\n isConnection(connection) &&\r\n isAnnotation(source) &&\r\n isAnnotation(target)\r\n ) {\r\n return false;\r\n }\r\n\r\n // do not allow an annotation connection between an actor or workObject and anything except an annotation\r\n return !(\r\n isConnection(connection) &&\r\n !isAnnotation(target) &&\r\n (isActor(source) || isWorkObject(source))\r\n );\r\n}\r\n\r\n/**\r\n * specific rules for custom elements\r\n */\r\nexport default function DomainStoryRules(eventBus) {\r\n RuleProvider.call(this, eventBus);\r\n}\r\n\r\ninherits(DomainStoryRules, RuleProvider);\r\n\r\nDomainStoryRules.$inject = [\"eventBus\"];\r\n\r\nDomainStoryRules.prototype.init = function () {\r\n /**\r\n * can shape be created on target container?\r\n */\r\n function canCreate(shape, target) {\r\n // only judge about custom elements\r\n if (!isDomainStory(shape)) {\r\n return;\r\n }\r\n\r\n // allow creation just on groups\r\n return !isDomainStory(target) || isDomainStoryGroup(target);\r\n }\r\n\r\n this.addRule(\"elements.create\", function (context) {\r\n const elements = context.elements,\r\n position = context.position,\r\n target = context.target;\r\n\r\n return every(elements, function (element) {\r\n if (isConnection(element)) {\r\n return canConnect(element.source, element.target, element);\r\n }\r\n\r\n if (element.host) {\r\n return canAttach(element, element.host, null, position);\r\n }\r\n\r\n return canCreate(element, target, null, position);\r\n });\r\n });\r\n\r\n this.addRule(\"elements.move\", HIGH_PRIORITY, function (context) {\r\n let target = context.target,\r\n shapes = context.shapes;\r\n\r\n let type;\r\n\r\n // do not allow mixed movements of custom / BPMN shapes\r\n // if any shape cannot be moved, the group cannot be moved, too\r\n\r\n // reject, if we have at least one\r\n // custom element that cannot be moved\r\n return reduce(\r\n shapes,\r\n function (result, s) {\r\n if (type === undefined) {\r\n type = isDomainStory(s);\r\n }\r\n\r\n if (type !== isDomainStory(s) || result === false) {\r\n return false;\r\n }\r\n\r\n return canCreate(s, target);\r\n },\r\n undefined\r\n );\r\n });\r\n\r\n this.addRule(\"shape.create\", HIGH_PRIORITY, function (context) {\r\n let target = context.target,\r\n shape = context.shape;\r\n\r\n return canCreate(shape, target);\r\n });\r\n\r\n this.addRule(\"connection.create\", HIGH_PRIORITY, function (context) {\r\n let source = context.source,\r\n target = context.target;\r\n\r\n return canConnect(source, target);\r\n });\r\n\r\n this.addRule(\"connection.reconnect\", HIGH_PRIORITY, function (context) {\r\n let connection = context.connection,\r\n source = context.hover || context.source,\r\n target = context.target;\r\n\r\n // --------------------------------------------------------------\r\n let result = canConnectToAnnotation(source, target, connection);\r\n\r\n if (!result) {\r\n return;\r\n }\r\n\r\n // --------------------------------------------------------------\r\n\r\n return canConnect(source, target, connection);\r\n });\r\n\r\n this.addRule(\"shape.resize\", function (context) {\r\n let shape = context.shape,\r\n newBounds = context.newBounds;\r\n\r\n return canResize(shape, newBounds);\r\n });\r\n};\r\n\r\nDomainStoryRules.prototype.canConnect = canConnect;\r\nDomainStoryRules.prototype.canAttach = canAttach;\r\nDomainStoryRules.prototype.isDomainStory = isDomainStory;\r\nDomainStoryRules.prototype.canResize = canResize;\r\n","\"use strict\";\r\n\r\nimport inherits from \"inherits\";\r\n\r\nimport { pick, assign } from \"min-dash\";\r\n\r\nimport CommandInterceptor from \"diagram-js/lib/command/CommandInterceptor\";\r\n\r\nimport {\r\n add as collectionAdd,\r\n remove as collectionRemove,\r\n} from \"diagram-js/lib/util/Collections\";\r\n\r\nimport { reworkGroupElements } from \"./util\";\r\nimport { elementTypes } from \"../../Domain/Common/elementTypes\";\r\n\r\n/**\r\n * a handler responsible for updating the custom element's businessObject\r\n * once changes on the diagram happen.\r\n */\r\nexport default function DomainStoryUpdater(eventBus, bpmnjs) {\r\n CommandInterceptor.call(this, eventBus);\r\n\r\n function updateCustomElement(e) {\r\n let context = e.context,\r\n shape = context.shape,\r\n businessObject = shape.businessObject;\r\n\r\n if (!shape || !shape.type.includes(elementTypes.DOMAINSTORY)) {\r\n return;\r\n }\r\n\r\n let parent = shape.parent;\r\n let customElements = bpmnjs._customElements;\r\n\r\n // make sure element is added / removed from bpmnjs.customElements\r\n if (!parent) {\r\n collectionRemove(customElements, businessObject);\r\n } else {\r\n collectionAdd(customElements, businessObject);\r\n }\r\n\r\n // save custom element position\r\n assign(businessObject, pick(shape, [\"x\", \"y\"]));\r\n\r\n // save custom element size if resizable\r\n if (shape.type === elementTypes.GROUP) {\r\n assign(businessObject, pick(shape, [\"height\", \"width\"]));\r\n\r\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\r\n // since we do not have access to the standard-canvas object here, we cannot use the function correctGroupChildren() from DSLabelUtil\r\n if (parent != null) {\r\n reworkGroupElements(parent, shape);\r\n }\r\n }\r\n if (\r\n shape &&\r\n shape.parent &&\r\n \"type\" in shape.parent &&\r\n shape.parent.type === elementTypes.GROUP\r\n ) {\r\n assign(businessObject, {\r\n parent: shape.parent.id,\r\n });\r\n }\r\n }\r\n\r\n function updateCustomConnection(e) {\r\n let context = e.context,\r\n connection = context.connection,\r\n source = connection.source,\r\n target = connection.target,\r\n businessObject = connection.businessObject;\r\n\r\n if (e.newTarget) {\r\n target = e.newTarget;\r\n }\r\n if (e.newSource) {\r\n source = e.newSource;\r\n }\r\n\r\n let parent = connection.parent;\r\n let customElements = bpmnjs._customElements;\r\n\r\n // make sure element is added / removed from bpmnjs.customElements\r\n if (!parent) {\r\n collectionRemove(customElements, businessObject);\r\n } else {\r\n collectionAdd(customElements, businessObject);\r\n }\r\n\r\n // update waypoints\r\n assign(businessObject, {\r\n waypoints: copyWaypoints(connection),\r\n });\r\n\r\n if (source) {\r\n if (!businessObject.source) {\r\n assign(businessObject, { source: source.id });\r\n } else {\r\n businessObject.source = source.id;\r\n }\r\n }\r\n if (target) {\r\n if (!businessObject.target) {\r\n assign(businessObject, { target: target.id });\r\n } else {\r\n businessObject.target = target.id;\r\n }\r\n }\r\n }\r\n\r\n function copyWaypoints(connection) {\r\n return connection.waypoints.map(function (p) {\r\n if (p.original) {\r\n return {\r\n original: {\r\n x: p.original.x,\r\n y: p.original.y,\r\n },\r\n x: p.x,\r\n y: p.y,\r\n };\r\n } else {\r\n return {\r\n x: p.x,\r\n y: p.y,\r\n };\r\n }\r\n });\r\n }\r\n\r\n this.executed(\r\n [\r\n \"shape.create\",\r\n \"shape.move\",\r\n \"shape.delete\",\r\n \"shape.resize\",\r\n \"shape.removeGroupWithChildren\",\r\n ],\r\n ifDomainStoryElement(updateCustomElement)\r\n );\r\n\r\n this.reverted(\r\n [\r\n \"shape.create\",\r\n \"shape.move\",\r\n \"shape.delete\",\r\n \"shape.resize\",\r\n \"shape.removeGroupWithChildren\",\r\n ],\r\n ifDomainStoryElement(updateCustomElement)\r\n );\r\n\r\n this.executed(\r\n [\r\n \"connection.create\",\r\n \"connection.reconnect\",\r\n \"connection.updateWaypoints\",\r\n \"connection.delete\",\r\n \"connection.layout\",\r\n \"connection.move\",\r\n ],\r\n ifDomainStoryElement(updateCustomConnection)\r\n );\r\n\r\n this.reverted(\r\n [\r\n \"connection.create\",\r\n \"connection.reconnect\",\r\n \"connection.updateWaypoints\",\r\n \"connection.delete\",\r\n \"connection.layout\",\r\n \"connection.move\",\r\n ],\r\n ifDomainStoryElement(updateCustomConnection)\r\n );\r\n}\r\n\r\n// check if element in the context of an event is a domainStory element\r\nfunction ifDomainStoryElement(fn) {\r\n return (event) => {\r\n const context = event.context;\r\n const element = context.shape || context.connection;\r\n\r\n if (isDomainStory(element)) {\r\n fn(event);\r\n }\r\n };\r\n}\r\n\r\nfunction isDomainStory(element) {\r\n return element && /domainStory:/.test(element.type);\r\n}\r\n\r\ninherits(DomainStoryUpdater, CommandInterceptor);\r\n\r\nDomainStoryUpdater.$inject = [\"eventBus\", \"bpmnjs\"];\r\n","\"use strict\";\r\n\r\nimport DomainStoryElementFactory from \"./domainStoryElementFactory\";\r\nimport DomainStoryRenderer from \"./domainStoryRenderer\";\r\nimport DomainStoryPalette from \"./palette/domainStoryPalette\";\r\nimport DomainStoryRules from \"./domainStoryRules\";\r\nimport DomainStoryUpdater from \"./domainStoryUpdater\";\r\nimport ElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\r\nimport CreateModule from \"diagram-js/lib/features/create\";\r\nimport PathMap from \"bpmn-js/lib/draw/PathMap\";\r\nimport PopupMenuModule from \"bpmn-js/lib/features/popup-menu\";\r\nimport ContextPadModule from \"diagram-js/lib/features/context-pad\";\r\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\r\nimport UpdateLabelHandler from \"./updateHandler/updateLabelHandler\";\r\nimport headlineAndDescriptionUpdateHandler from \"./updateHandler/headlineAndDescriptionUpdateHandler\";\r\nimport DomainStoryContextPadProvider from \"./context-pad/domainStoryContextPadProvider\";\r\nimport ReplaceMenuProvider from \"./change-icon/replaceMenuProvider\";\r\nimport DSModeling from \"./modeling/dSModeling\";\r\n\r\nexport default {\r\n __depends__: [CreateModule, ContextPadModule, PopupMenuModule],\r\n __init__: [\r\n \"domainStoryRenderer\",\r\n \"paletteProvider\",\r\n \"domainStoryRules\",\r\n \"domainStoryUpdater\",\r\n \"contextPadProvider\",\r\n \"replaceMenuProvider\",\r\n ],\r\n elementFactory: [\"type\", DomainStoryElementFactory],\r\n domainStoryRenderer: [\"type\", DomainStoryRenderer],\r\n paletteProvider: [\"type\", DomainStoryPalette],\r\n domainStoryRules: [\"type\", DomainStoryRules],\r\n domainStoryUpdater: [\"type\", DomainStoryUpdater],\r\n contextPadProvider: [\"type\", DomainStoryContextPadProvider],\r\n elementFactoryBpmn: [\"type\", ElementFactory],\r\n pathMap: [\"type\", PathMap],\r\n replaceMenuProvider: [\"type\", ReplaceMenuProvider],\r\n commandStack: [\"type\", CommandStack],\r\n updateLabelHandler: [\"type\", UpdateLabelHandler],\r\n headlineAndDescriptionUpdateHandler: [\r\n \"type\",\r\n headlineAndDescriptionUpdateHandler,\r\n ],\r\n modeling: [\"type\", DSModeling],\r\n};\r\n","\"use strict\";\r\n\r\nimport {\r\n append as svgAppend,\r\n attr as svgAttr,\r\n create as svgCreate,\r\n remove as svgRemove,\r\n} from \"tiny-svg\";\r\n\r\nimport { translate } from \"diagram-js/lib/util/SvgTransformUtil\";\r\nimport { elementTypes } from \"../../../Domain/Common/elementTypes\";\r\nimport { is } from \"../util\";\r\n\r\nconst MARKER_HIDDEN = \"djs-element-hidden\",\r\n MARKER_LABEL_HIDDEN = \"djs-label-hidden\";\r\n\r\nlet annotationBoxHeight = 0;\r\n\r\nexport function getAnnotationBoxHeight() {\r\n return annotationBoxHeight;\r\n}\r\n\r\nexport default function DSLabelEditingPreview(eventBus, canvas, pathMap) {\r\n let self = this;\r\n\r\n let defaultLayer = canvas.getDefaultLayer();\r\n let element, absoluteElementBBox, gfx;\r\n\r\n eventBus.on(\"directEditing.activate\", function (context) {\r\n let activeProvider = context.active;\r\n\r\n element = activeProvider.element.label || activeProvider.element;\r\n\r\n // text annotation\r\n if (is(element, elementTypes.TEXTANNOTATION)) {\r\n absoluteElementBBox = canvas.getAbsoluteBBox(element);\r\n\r\n gfx = svgCreate(\"g\");\r\n\r\n annotationBoxHeight = element.height;\r\n\r\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\r\n xScaleFactor: 1,\r\n yScaleFactor: 1,\r\n containerWidth: element.width,\r\n containerHeight: element.height,\r\n position: {\r\n mx: 0.0,\r\n my: 0.0,\r\n },\r\n });\r\n\r\n let path = (self.path = svgCreate(\"path\"));\r\n\r\n svgAttr(path, {\r\n d: textPathData,\r\n strokeWidth: 2,\r\n stroke: getStrokeColor(element),\r\n });\r\n\r\n svgAppend(gfx, path);\r\n\r\n svgAppend(defaultLayer, gfx);\r\n\r\n translate(gfx, element.x, element.y);\r\n }\r\n\r\n if (is(element, elementTypes.TEXTANNOTATION) || element.labelTarget) {\r\n canvas.addMarker(element, MARKER_HIDDEN);\r\n } else if (\r\n element.type.includes(elementTypes.ACTOR) ||\r\n element.type.includes(elementTypes.WORKOBJECT) ||\r\n element.type.includes(elementTypes.ACTIVITY) ||\r\n element.type.includes(elementTypes.GROUP)\r\n ) {\r\n canvas.addMarker(element, MARKER_LABEL_HIDDEN);\r\n }\r\n });\r\n\r\n eventBus.on(\"directEditing.resize\", function (context) {\r\n // text annotation\r\n if (is(element, elementTypes.TEXTANNOTATION)) {\r\n let height = context.height,\r\n dy = context.dy;\r\n\r\n let newElementHeight = Math.max(\r\n (element.height / absoluteElementBBox.height) * (height + dy),\r\n 0\r\n );\r\n annotationBoxHeight = newElementHeight;\r\n\r\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\r\n xScaleFactor: 1,\r\n yScaleFactor: 1,\r\n containerWidth: element.width,\r\n containerHeight: newElementHeight,\r\n position: {\r\n mx: 0.0,\r\n my: 0.0,\r\n },\r\n });\r\n\r\n svgAttr(self.path, {\r\n d: textPathData,\r\n });\r\n }\r\n });\r\n\r\n eventBus.on(\r\n [\"directEditing.complete\", \"directEditing.cancel\"],\r\n function (context) {\r\n let activeProvider = context.active;\r\n\r\n if (activeProvider) {\r\n canvas.removeMarker(\r\n activeProvider.element.label || activeProvider.element,\r\n MARKER_HIDDEN\r\n );\r\n canvas.removeMarker(element, MARKER_LABEL_HIDDEN);\r\n }\r\n\r\n element = undefined;\r\n absoluteElementBBox = undefined;\r\n\r\n if (gfx) {\r\n svgRemove(gfx);\r\n\r\n gfx = undefined;\r\n }\r\n }\r\n );\r\n}\r\n\r\nDSLabelEditingPreview.$inject = [\"eventBus\", \"canvas\", \"pathMap\"];\r\n\r\n// helpers ///////////////////\r\n\r\nfunction getStrokeColor() {\r\n return \"black\";\r\n}\r\n","\"use strict\";\r\n\r\nimport { assign } from \"min-dash\";\r\n\r\nimport { getLabel, autocomplete } from \"./dsLabelUtil\";\r\n\r\nimport { isAny } from \"bpmn-js/lib/features/modeling/util/ModelingUtil\";\r\n\r\nimport {\r\n getExternalLabelMid,\r\n isLabelExternal,\r\n hasExternalLabel,\r\n isLabel,\r\n} from \"bpmn-js/lib/util/LabelUtil\";\r\n\r\nimport { elementTypes } from \"../../../Domain/Common/elementTypes\";\r\nimport { is } from \"../util\";\r\n\r\nlet dictionaryService;\r\n\r\nlet numberStash = 0;\r\nlet stashUse = false;\r\n\r\nexport function initializeLabelEditingProvider(labelingDictionary) {\r\n dictionaryService = labelingDictionary;\r\n}\r\n\r\nexport function getNumberStash() {\r\n let number = { use: stashUse, number: numberStash };\r\n stashUse = false;\r\n return number;\r\n}\r\n\r\nexport function toggleStashUse(use) {\r\n stashUse = use;\r\n}\r\n\r\nexport default function DSLabelEditingProvider(\r\n eventBus,\r\n canvas,\r\n directEditing,\r\n modeling,\r\n resizeHandles,\r\n textRenderer,\r\n updateLabelHandler\r\n) {\r\n this._canvas = canvas;\r\n this._modeling = modeling;\r\n this._textRenderer = textRenderer;\r\n this._updateLabelHandler = updateLabelHandler;\r\n\r\n directEditing.registerProvider(this);\r\n\r\n // listen to dblclick on non-root elements\r\n eventBus.on(\"element.dblclick\", function (event) {\r\n activateDirectEdit(event.element, true);\r\n if (is(event.element, elementTypes.ACTIVITY)) {\r\n // if we edit an activity, we do not want the standard editing box\r\n numberStash = event.element.businessObject.number;\r\n stashUse = true;\r\n directEditing.complete();\r\n }\r\n });\r\n\r\n // complete on followup canvas operation\r\n eventBus.on(\r\n [\r\n \"element.mousedown\",\r\n \"drag.init\",\r\n \"canvas.viewbox.changing\",\r\n \"autoPlace\",\r\n \"popupMenu.open\",\r\n ],\r\n function () {\r\n if (directEditing.isActive()) {\r\n directEditing.complete();\r\n }\r\n }\r\n );\r\n\r\n // cancel on command stack changes\r\n eventBus.on([\"commandStack.changed\"], function () {\r\n if (directEditing.isActive()) {\r\n directEditing.cancel();\r\n }\r\n });\r\n\r\n eventBus.on(\"directEditing.activate\", function (event) {\r\n resizeHandles.removeResizers();\r\n let element = event.active.element;\r\n createAutocomplete(element);\r\n });\r\n\r\n eventBus.on(\"create.end\", 500, function (event) {\r\n let element = event.shape,\r\n canExecute = event.context.canExecute,\r\n isTouch = event.isTouch;\r\n\r\n if (isTouch) {\r\n return;\r\n }\r\n\r\n if (!canExecute) {\r\n return;\r\n }\r\n if (!is(element, elementTypes.ACTIVITY)) {\r\n activateDirectEdit(element);\r\n }\r\n });\r\n\r\n eventBus.on(\"autoPlace.end\", 500, function (event) {\r\n activateDirectEdit(event.shape);\r\n });\r\n\r\n function activateDirectEdit(element, force) {\r\n if (\r\n force ||\r\n isAny(element, [elementTypes.TEXTANNOTATION]) ||\r\n element.businessObject.type.includes(elementTypes.DOMAINSTORY)\r\n ) {\r\n directEditing.activate(element);\r\n }\r\n }\r\n\r\n function createAutocomplete(element) {\r\n let editingBox = document.getElementsByClassName(\r\n \"djs-direct-editing-content\"\r\n );\r\n editingBox[0].focus();\r\n autocomplete(\r\n editingBox[0],\r\n dictionaryService.getWorkObjectLabels(),\r\n element\r\n );\r\n }\r\n}\r\n\r\nDSLabelEditingProvider.$inject = [\r\n \"eventBus\",\r\n \"canvas\",\r\n \"directEditing\",\r\n \"modeling\",\r\n \"resizeHandles\",\r\n \"textRenderer\",\r\n \"updateLabelHandler\",\r\n];\r\n\r\n/**\r\n * activate direct editing for activities and text annotations.\r\n *\r\n * @param {djs.model.Base} element\r\n *\r\n * @return {Object} an object with properties bounds (position and size), text and options\r\n */\r\nDSLabelEditingProvider.prototype.activate = function (element) {\r\n // text\r\n if (element.id === \"__implicitrootbase\") {\r\n return;\r\n }\r\n let text = getLabel(element);\r\n\r\n if (text === undefined) {\r\n return;\r\n }\r\n\r\n let context = {\r\n text: text,\r\n };\r\n\r\n // bounds\r\n let bounds = this.getEditingBBox(element);\r\n\r\n assign(context, bounds);\r\n\r\n let options = {};\r\n\r\n // external labels\r\n if (isLabelExternal(element)) {\r\n assign(options, {\r\n autoResize: true,\r\n });\r\n }\r\n\r\n // text annotations\r\n if (is(element, elementTypes.TEXTANNOTATION)) {\r\n assign(options, {\r\n resizable: true,\r\n autoResize: true,\r\n });\r\n }\r\n\r\n assign(context, {\r\n options: options,\r\n });\r\n\r\n return context;\r\n};\r\n\r\n/**\r\n * get the editing bounding box based on the element's size and position\r\n *\r\n * @param {djs.model.Base} element\r\n *\r\n * @return {Object} an object containing information about position\r\n * and size (fixed or minimum and/or maximum)\r\n */\r\nDSLabelEditingProvider.prototype.getEditingBBox = function (element) {\r\n let canvas = this._canvas;\r\n\r\n let target = element.label || element;\r\n\r\n let bbox = canvas.getAbsoluteBBox(target);\r\n\r\n let mid = {\r\n x: bbox.x + bbox.width / 2,\r\n y: bbox.y + bbox.height / 2,\r\n };\r\n\r\n // default position\r\n let bounds = { x: bbox.x, y: bbox.y };\r\n\r\n /** The cavnas is an Object from BPMN, the IDE might say, that zoom is deprecated,\r\n * because it thinks canvas is the standard HTMLElement. -> Needs to stay toom **/\r\n let zoom = canvas.zoom();\r\n let defaultStyle = this._textRenderer.getDefaultStyle(),\r\n externalStyle = this._textRenderer.getExternalStyle();\r\n\r\n // take zoom into account\r\n let externalFontSize = externalStyle.fontSize * zoom,\r\n externalLineHeight = externalStyle.lineHeight,\r\n defaultFontSize = defaultStyle.fontSize * zoom,\r\n defaultLineHeight = defaultStyle.lineHeight;\r\n\r\n let style = {\r\n fontFamily: this._textRenderer.getDefaultStyle().fontFamily,\r\n fontWeight: this._textRenderer.getDefaultStyle().fontWeight,\r\n };\r\n\r\n // adjust for groups\r\n if (is(element, elementTypes.GROUP)) {\r\n assign(bounds, {\r\n minWidth: bbox.width / 2.5 > 125 ? bbox.width / 2.5 : 125,\r\n maxWidth: bbox.width,\r\n minHeight: 30 * zoom,\r\n x: bbox.x,\r\n y: bbox.y,\r\n });\r\n\r\n assign(style, {\r\n fontSize: defaultFontSize + \"px\",\r\n lineHeight: defaultLineHeight,\r\n paddingTop: 7 * zoom + \"px\",\r\n paddingBottom: 7 * zoom + \"px\",\r\n paddingLeft: 5 * zoom + \"px\",\r\n paddingRight: 5 * zoom + \"px\",\r\n textAlign: \"left\",\r\n });\r\n }\r\n\r\n // internal labels for tasks and collapsed call activities,\r\n // sub processes and participants\r\n if (\r\n /^domainStory:actor\\w*/.test(element.type) ||\r\n /^domainStory:workObject\\w*/.test(element.type)\r\n ) {\r\n assign(bounds, {\r\n width: bbox.width,\r\n minHeight: 30,\r\n y: bbox.y + bbox.height - 20,\r\n x: bbox.x,\r\n });\r\n\r\n assign(style, {\r\n fontSize: defaultFontSize + \"px\",\r\n lineHeight: defaultLineHeight,\r\n paddingTop: 7 * zoom + \"px\",\r\n paddingBottom: 7 * zoom + \"px\",\r\n paddingLeft: 5 * zoom + \"px\",\r\n paddingRight: 5 * zoom + \"px\",\r\n });\r\n }\r\n\r\n let width = 90 * zoom,\r\n paddingTop = 7 * zoom,\r\n paddingBottom = 4 * zoom;\r\n\r\n // external labels for events, data elements, gateways and connections\r\n if (target.labelTarget) {\r\n assign(bounds, {\r\n width: width,\r\n height: bbox.height + paddingTop + paddingBottom,\r\n x: mid.x - width / 2,\r\n y: bbox.y - paddingTop,\r\n });\r\n\r\n assign(style, {\r\n fontSize: externalFontSize + \"px\",\r\n lineHeight: externalLineHeight,\r\n paddingTop: paddingTop + \"px\",\r\n paddingBottom: paddingBottom + \"px\",\r\n });\r\n }\r\n\r\n // external label not yet created\r\n if (\r\n isLabelExternal(target) &&\r\n !hasExternalLabel(target) &&\r\n !isLabel(target)\r\n ) {\r\n let externalLabelMid = getExternalLabelMid(element);\r\n\r\n let absoluteBBox = canvas.getAbsoluteBBox({\r\n x: externalLabelMid.x,\r\n y: externalLabelMid.y,\r\n width: 0,\r\n height: 0,\r\n });\r\n\r\n let height = externalFontSize + paddingTop + paddingBottom;\r\n\r\n assign(bounds, {\r\n width: width,\r\n height: height,\r\n x: absoluteBBox.x - width / 2,\r\n y: absoluteBBox.y - height / 2,\r\n });\r\n\r\n assign(style, {\r\n fontSize: externalFontSize + \"px\",\r\n lineHeight: externalLineHeight,\r\n paddingTop: paddingTop + \"px\",\r\n paddingBottom: paddingBottom + \"px\",\r\n });\r\n }\r\n\r\n // text annotations\r\n if (is(element, elementTypes.TEXTANNOTATION)) {\r\n assign(bounds, {\r\n width: bbox.width,\r\n height: bbox.height,\r\n minWidth: 30 * zoom,\r\n minHeight: 10 * zoom,\r\n });\r\n\r\n assign(style, {\r\n textAlign: \"left\",\r\n paddingTop: 7 * zoom + \"px\",\r\n paddingBottom: 7 * zoom + \"px\",\r\n paddingLeft: 5 * zoom + \"px\",\r\n paddingRight: 5 * zoom + \"px\",\r\n fontSize: defaultFontSize + \"px\",\r\n lineHeight: defaultLineHeight,\r\n });\r\n }\r\n\r\n return { bounds: bounds, style: style };\r\n};\r\n\r\nDSLabelEditingProvider.prototype.update = function (\r\n element,\r\n newLabel,\r\n activeContextText,\r\n bounds\r\n) {\r\n let newBounds, bbox;\r\n\r\n if (is(element, elementTypes.TEXTANNOTATION)) {\r\n bbox = this._canvas.getAbsoluteBBox(element);\r\n\r\n newBounds = {\r\n x: element.x,\r\n y: element.y,\r\n width: (element.width / bbox.width) * bounds.width,\r\n height: (element.height / bbox.height) * bounds.height,\r\n };\r\n }\r\n\r\n this._modeling.updateLabel(element, newLabel, newBounds);\r\n};\r\n","\"use strict\";\r\n\r\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\r\nimport { is } from \"../util\";\r\n\r\nfunction getLabelAttr(semantic) {\r\n if (\r\n semantic.type.includes(elementTypes.ACTOR) ||\r\n semantic.type.includes(elementTypes.WORKOBJECT) ||\r\n semantic.type.includes(elementTypes.ACTIVITY) ||\r\n semantic.type.includes(elementTypes.GROUP)\r\n ) {\r\n return \"name\";\r\n }\r\n\r\n if (is(semantic, elementTypes.TEXTANNOTATION)) {\r\n return \"text\";\r\n }\r\n}\r\n\r\nfunction getNumberAttr(semantic) {\r\n if (is(semantic, elementTypes.ACTIVITY)) {\r\n return \"number\";\r\n }\r\n}\r\n\r\nexport function getLabel(element) {\r\n let semantic;\r\n if (element.businessObject) {\r\n semantic = element.businessObject;\r\n } else {\r\n semantic = element;\r\n }\r\n let attr = getLabelAttr(semantic);\r\n if (attr && semantic) {\r\n return semantic[attr] || \"\";\r\n }\r\n}\r\n\r\nexport function getNumber(element) {\r\n let semantic = element.businessObject,\r\n attr = getNumberAttr(semantic);\r\n\r\n if (attr) {\r\n return semantic[attr] || \"\";\r\n }\r\n}\r\n\r\nexport function setLabel(element, text) {\r\n let semantic;\r\n if (element.businessObject) {\r\n semantic = element.businessObject;\r\n } else {\r\n semantic = element;\r\n }\r\n let attr = getLabelAttr(semantic);\r\n\r\n if (attr) {\r\n semantic[attr] = text;\r\n }\r\n\r\n return element;\r\n}\r\n\r\nexport function setNumber(element, textNumber) {\r\n let semantic = element.businessObject,\r\n attr = getNumberAttr(semantic);\r\n\r\n if (attr) {\r\n semantic[attr] = textNumber;\r\n }\r\n\r\n return element;\r\n}\r\n\r\n// select at which part of the activity the label should be attached to\r\nexport function selectPartOfActivity(waypoints, angleActivity) {\r\n let selectedActivity = 0;\r\n let linelength = 49;\r\n\r\n for (let i = 0; i < waypoints.length; i++) {\r\n if (angleActivity[i] === 0 || angleActivity[i] === 180) {\r\n let length = Math.abs(waypoints[i].x - waypoints[i + 1].x);\r\n if (length > linelength) {\r\n selectedActivity = i;\r\n }\r\n }\r\n }\r\n return selectedActivity;\r\n}\r\n\r\n// approximate the width of the label text, standard fontsize: 11\r\nexport function calculateTextWidth(text) {\r\n if (!text) {\r\n return 0;\r\n }\r\n\r\n let fontsize = text.length * 5.1;\r\n fontsize = fontsize / 2;\r\n\r\n // add an initial offset to the absolute middle of the activity\r\n fontsize += 20;\r\n return fontsize;\r\n}\r\n\r\n/**\r\n * copied from https://www.w3schools.com/howto/howto_js_autocomplete.asp on 18.09.2018\r\n */\r\nexport function autocomplete(inp, arr, element) {\r\n closeAllLists();\r\n\r\n /* the autocomplete function takes three arguments,\r\n the text field element and an array of possible autocompleted values and an optional element to which it is appended:*/\r\n let currentFocus;\r\n\r\n /* execute a function when someone writes in the text field:*/\r\n inp.addEventListener(\"input\", function () {\r\n /* the direct editing field of actors and workobjects is a recycled html-element and has old values that need to be overridden*/\r\n if (element.type.includes(elementTypes.WORKOBJECT)) {\r\n this.value = this.innerHTML;\r\n }\r\n let autocompleteList,\r\n autocompleteItem,\r\n val = this.value;\r\n\r\n /* close any already open lists of autocompleted values*/\r\n closeAllLists();\r\n currentFocus = -1;\r\n\r\n /* create a DIV element that will contain the items (values):*/\r\n autocompleteList = document.createElement(\"DIV\");\r\n autocompleteList.setAttribute(\"id\", \"autocomplete-list\");\r\n autocompleteList.setAttribute(\"class\", \"autocomplete-items\");\r\n\r\n /* append the DIV element as a child of the autocomplete container:*/\r\n this.parentNode.appendChild(autocompleteList);\r\n\r\n /* for each item in the array...*/\r\n for (const name of arr) {\r\n /* check if the item starts with the same letters as the text field value:*/\r\n if (val) {\r\n if (name.substr(0, val.length).toUpperCase() == val.toUpperCase()) {\r\n /* create a DIV element for each matching element:*/\r\n autocompleteItem = document.createElement(\"DIV\");\r\n\r\n /* make the matching letters bold:*/\r\n autocompleteItem.innerHTML =\r\n \"\" +\r\n name.substr(0, val.length) +\r\n \"\" +\r\n name.substr(val.length);\r\n\r\n /* insert an input field that will hold the current name:*/\r\n autocompleteItem.innerHTML +=\r\n \"\";\r\n\r\n /* execute a function when someone clicks on the item (DIV element):*/\r\n autocompleteItem.onclick = function () {\r\n /* insert the value for the autocomplete text field:*/\r\n inp.value = this.getElementsByTagName(\"input\")[0].value;\r\n inp.innerHTML = this.getElementsByTagName(\"input\")[0].value;\r\n\r\n /* close the list of autocompleted values,\r\n (or any other open lists of autocompleted values:*/\r\n closeAllLists();\r\n };\r\n autocompleteList.appendChild(autocompleteItem);\r\n }\r\n }\r\n }\r\n\r\n // if we edit an actor, we do not want auto-complete, since actors generally are unique\r\n if (element.type.includes(elementTypes.ACTOR)) {\r\n autocompleteList.style.visibility = \"hidden\";\r\n }\r\n });\r\n\r\n /* execute a function presses a key on the keyboard:*/\r\n inp.onkeydown = function (e) {\r\n let autocompleteList = document.getElementById(\"autocomplete-list\");\r\n if (autocompleteList) {\r\n autocompleteList = autocompleteList.getElementsByTagName(\"div\");\r\n }\r\n if (e.keyCode === 40) {\r\n /* If the arrow DOWN key is pressed,\r\n increase the currentFocus letiable:*/\r\n currentFocus++;\r\n\r\n /* and and make the current item more visible:*/\r\n addActive(autocompleteList);\r\n } else if (e.keyCode === 38) {\r\n // up\r\n /* If the arrow UP key is pressed,\r\n decrease the currentFocus letiable:*/\r\n currentFocus--;\r\n\r\n /* and and make the current item more visible:*/\r\n addActive(autocompleteList);\r\n } else if (e.keyCode === 13) {\r\n /* If the ENTER key is pressed, prevent the form from being submitted,*/\r\n e.preventDefault();\r\n if (currentFocus > -1) {\r\n /* and simulate a click on the \"active\" item:*/\r\n if (autocompleteList && autocompleteList[currentFocus]) {\r\n autocompleteList[currentFocus].click();\r\n }\r\n }\r\n }\r\n };\r\n\r\n function addActive(autocompleteList) {\r\n /* a function to classify an item as \"active\":*/\r\n if (!autocompleteList || autocompleteList.length < 1) return false;\r\n\r\n /* start by removing the \"active\" class on all items:*/\r\n removeActive(autocompleteList);\r\n if (currentFocus >= autocompleteList.length) currentFocus = 0;\r\n if (currentFocus < 0) currentFocus = autocompleteList.length - 1;\r\n\r\n /* add class \"autocomplete-active\":*/\r\n autocompleteList[currentFocus].classList.add(\"autocomplete-active\");\r\n }\r\n\r\n function removeActive(autocompleteList) {\r\n /* a function to remove the \"active\" class from all autocomplete items:*/\r\n if (autocompleteList.length > 1) {\r\n for (const item of autocompleteList) {\r\n item.classList.remove(\"autocomplete-active\");\r\n }\r\n }\r\n }\r\n\r\n function closeAllLists(survivor) {\r\n /* close all autocomplete lists in the document,\r\n except the one passed as an argument:*/\r\n let autocompleteList =\r\n document.getElementsByClassName(\"autocomplete-items\");\r\n for (const item of autocompleteList) {\r\n if (survivor != item && survivor != inp) {\r\n item.parentNode.removeChild(item);\r\n }\r\n }\r\n }\r\n\r\n /* execute a function when someone clicks in the document:*/\r\n document.addEventListener(\"click\", function (e) {\r\n closeAllLists(e.target);\r\n });\r\n}\r\n","\"use strict\";\r\n\r\nimport ChangeSupportModule from \"diagram-js/lib/features/change-support\";\r\nimport ResizeModule from \"diagram-js/lib/features/resize\";\r\nimport DirectEditingModule from \"diagram-js-direct-editing\";\r\n\r\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\r\nimport UpdateLabelHandler from \"../updateHandler/updateLabelHandler\";\r\nimport DSLabelEditingPreview from \"./dsLabelEditingPreview\";\r\nimport DSLabelEditingProvider from \"./dsLabelEditingProvider\";\r\nimport DSModeling from \"../modeling/dSModeling\";\r\n\r\nexport default {\r\n __depends__: [ChangeSupportModule, ResizeModule, DirectEditingModule],\r\n __init__: [\"dSlabelEditingProvider\", \"dSlabelEditingPreview\"],\r\n dSlabelEditingProvider: [\"type\", DSLabelEditingProvider],\r\n dSlabelEditingPreview: [\"type\", DSLabelEditingPreview],\r\n updateLabelHandler: [\"type\", UpdateLabelHandler],\r\n commandStack: [\"type\", CommandStack],\r\n modeling: [\"type \", DSModeling],\r\n};\r\n","\"use strict\";\r\n\r\nimport { selectPartOfActivity } from \"./dsLabelUtil\";\r\nimport { angleBetween } from \"../../../Utils/mathExtensions\";\r\n\r\nexport function countLines(str) {\r\n return str.split(/\\r\\n|\\r|\\n/).length;\r\n}\r\n\r\n// determine the position of the label at the activity\r\nexport function labelPosition(waypoints, lines = 1) {\r\n let amountWaypoints = waypoints.length;\r\n let determinedPosition;\r\n let xPos;\r\n let yPos;\r\n\r\n if (amountWaypoints > 2) {\r\n let angleActivity = new Array(amountWaypoints - 1);\r\n for (let i = 0; i < amountWaypoints - 1; i++) {\r\n // calculate the angles of the activities\r\n angleActivity[i] = angleBetween(waypoints[i], waypoints[i + 1]);\r\n }\r\n\r\n let selectedActivity = selectPartOfActivity(waypoints, angleActivity);\r\n\r\n xPos = labelPositionX(\r\n waypoints[selectedActivity],\r\n waypoints[selectedActivity + 1]\r\n );\r\n yPos = labelPositionY(\r\n waypoints[selectedActivity],\r\n waypoints[selectedActivity + 1],\r\n lines\r\n );\r\n\r\n determinedPosition = {\r\n x: xPos,\r\n y: yPos,\r\n selected: selectedActivity,\r\n };\r\n\r\n return determinedPosition;\r\n } else {\r\n xPos = labelPositionX(waypoints[0], waypoints[1]);\r\n yPos = labelPositionY(waypoints[0], waypoints[1], lines);\r\n\r\n determinedPosition = {\r\n x: xPos,\r\n y: yPos,\r\n selected: 0,\r\n };\r\n\r\n return determinedPosition;\r\n }\r\n}\r\n\r\n// calculate the X position of the label\r\nexport function labelPositionX(startPoint, endPoint) {\r\n let angle = angleBetween(startPoint, endPoint);\r\n let offsetX = 0;\r\n let scaledAngle = 0;\r\n if (angle === 0 || angle === 180 || angle === 90 || angle === 270) {\r\n offsetX = 0;\r\n } else if (angle > 0 && angle < 90) {\r\n // endpoint in upper right quadrant\r\n offsetX = 5 - angle / 6;\r\n } else if (angle > 90 && angle < 180) {\r\n // endpoint in upper left quadrant\r\n scaledAngle = angle - 90;\r\n offsetX = 5 - scaledAngle / 18;\r\n } else if (angle > 180 && angle < 270) {\r\n // endpoint in lower left quadrant\r\n scaledAngle = angle - 180;\r\n offsetX = scaledAngle / 18;\r\n } else if (angle > 270) {\r\n // endpoint in lower right quadrant\r\n scaledAngle = angle - 270;\r\n offsetX = 5 - scaledAngle / 6;\r\n }\r\n return offsetX + (startPoint.x + endPoint.x) / 2;\r\n}\r\n\r\n// calculate the Y position of the label\r\nexport function labelPositionY(startPoint, endPoint, lines = 1) {\r\n let angle = angleBetween(startPoint, endPoint);\r\n let offsetY = 0;\r\n let scaledAngle = 0;\r\n\r\n if (angle === 0 || angle === 180) {\r\n offsetY = 15;\r\n } else if (angle === 90 || angle === 270) {\r\n offsetY = 0;\r\n } else if (angle > 0 && angle < 90) {\r\n // endpoint in upper right quadrant\r\n offsetY = 15 - angle / 6;\r\n } else if (angle > 90 && angle < 180) {\r\n // endpoint in upper left quadrant\r\n scaledAngle = angle - 90;\r\n offsetY = (-scaledAngle / 9) * lines;\r\n } else if (angle > 180 && angle < 270) {\r\n // endpoint in lower left quadrant\r\n scaledAngle = angle - 180;\r\n offsetY = 15 - scaledAngle / 3;\r\n } else if (angle > 270) {\r\n // endpoint in lower right quadrant\r\n scaledAngle = angle - 270;\r\n offsetY = (-scaledAngle / 9) * lines;\r\n }\r\n return offsetY + (startPoint.y + endPoint.y) / 2;\r\n}\r\n","\"use strict\";\r\n\r\nimport Modeling from \"bpmn-js/lib/features/modeling/Modeling\";\r\n\r\nimport { inherits } from \"util\";\r\n\r\nexport default function DSModeling(\r\n eventBus,\r\n elementFactory,\r\n commandStack,\r\n domainStoryRules\r\n) {\r\n Modeling.call(this, eventBus, elementFactory, commandStack, domainStoryRules);\r\n}\r\n\r\nModeling.prototype.updateLabel = function (element, newLabel, newBounds) {\r\n if (\r\n element.businessObject\r\n ? newLabel !== element.businessObject.name\r\n : newLabel !== element.name\r\n ) {\r\n if (/^domainStory:/.test(element.type)) {\r\n this._commandStack.execute(\"element.updateCustomLabel\", {\r\n element: element,\r\n newLabel: newLabel,\r\n newBounds: newBounds,\r\n });\r\n } else {\r\n this._commandStack.execute(\"element.updateLabel\", {\r\n element: element,\r\n newLabel: newLabel,\r\n newBounds: newBounds,\r\n });\r\n }\r\n }\r\n};\r\n\r\nModeling.prototype.updateNumber = function (element, newNumber, newBounds) {\r\n if (\r\n element.businessObject\r\n ? newNumber !== element.businessObject.number\r\n : newNumber !== element.number\r\n ) {\r\n if (/^domainStory:/.test(element.type)) {\r\n this._commandStack.execute(\"element.updateCustomLabel\", {\r\n element: element,\r\n newNumber: newNumber,\r\n newBounds: newBounds,\r\n });\r\n } else {\r\n this._commandStack.execute(\"element.updateLabel\", {\r\n element: element,\r\n newNumber: newNumber,\r\n newBounds: newBounds,\r\n });\r\n }\r\n }\r\n};\r\n\r\nModeling.prototype.replaceShape = function (oldShape, newShape, hints) {\r\n let context = {\r\n oldShape: oldShape,\r\n newData: newShape,\r\n hints: hints || {},\r\n };\r\n\r\n this._commandStack.execute(\"shape.replace\", context);\r\n return context.newShape;\r\n};\r\n\r\nModeling.prototype.removeGroup = function (element) {\r\n this._commandStack.execute(\"shape.removeGroupWithoutChildren\", {\r\n element: element,\r\n });\r\n this.removeElements({ element });\r\n};\r\n\r\ninherits(DSModeling, Modeling);\r\n\r\nDSModeling.$inject = [\r\n \"eventBus\",\r\n \"elementFactory\",\r\n \"commandStack\",\r\n \"domainStoryRules\",\r\n];\r\n","\"use strict\";\r\n\r\nimport DomainStoryPalette from \"../palette/domainStoryPalette\";\r\nimport ElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\r\nimport CreateModule from \"diagram-js/lib/features/create\";\r\nimport PathMap from \"bpmn-js/lib/draw/PathMap\";\r\nimport PopupMenuModule from \"bpmn-js/lib/features/popup-menu\";\r\nimport ContextPadModule from \"diagram-js/lib/features/context-pad\";\r\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\r\nimport UpdateLabelHandler from \"../updateHandler/updateLabelHandler\";\r\nimport DomainStoryUpdater from \"../domainStoryUpdater\";\r\nimport DomainStoryElementFactory from \"../domainStoryElementFactory\";\r\nimport headlineAndDescriptionUpdateHandler from \"../updateHandler/headlineAndDescriptionUpdateHandler\";\r\nimport DomainStoryRenderer from \"../domainStoryRenderer\";\r\nimport DSModeling from \"./dSModeling\";\r\nimport DomainStoryRules from \"../domainStoryRules\";\r\nimport ReplaceMenuProvider from \"../change-icon/replaceMenuProvider\";\r\nimport DomainStoryContextPadProvider from \"../context-pad/domainStoryContextPadProvider\";\r\n\r\nexport default {\r\n __depends__: [CreateModule, ContextPadModule, PopupMenuModule],\r\n __init__: [\r\n \"domainStoryRenderer\",\r\n \"paletteProvider\",\r\n \"domainStoryRules\",\r\n \"domainStoryUpdater\",\r\n \"contextPadProvider\",\r\n \"replaceMenuProvider\",\r\n ],\r\n elementFactory: [\"type\", DomainStoryElementFactory],\r\n domainStoryRenderer: [\"type\", DomainStoryRenderer],\r\n paletteProvider: [\"type\", DomainStoryPalette],\r\n domainStoryRules: [\"type\", DomainStoryRules],\r\n domainStoryUpdater: [\"type\", DomainStoryUpdater],\r\n contextPadProvider: [\"type\", DomainStoryContextPadProvider],\r\n elementFactoryBpmn: [\"type\", ElementFactory],\r\n pathMap: [\"type\", PathMap],\r\n replaceMenuProvider: [\"type\", ReplaceMenuProvider],\r\n commandStack: [\"type\", CommandStack],\r\n updateLabelHandler: [\"type\", UpdateLabelHandler],\r\n headlineAndDescriptionUpdateHandler: [\r\n \"type\",\r\n headlineAndDescriptionUpdateHandler,\r\n ],\r\n modeling: [\"type\", DSModeling],\r\n};\r\n","\"use strict\";\r\n\r\nimport { labelPosition } from \"../labeling/position\";\r\n\r\nlet numberRegistry = [];\r\nlet multipleNumberRegistry = [false];\r\n\r\nlet canvasElementRegistry;\r\n\r\nexport function initializeNumbering(canvasElementRegistryService) {\r\n canvasElementRegistry = canvasElementRegistryService;\r\n}\r\n\r\n// defines the box for activity numbers\r\nexport function numberBoxDefinitions(element) {\r\n let alignment = \"center\";\r\n let boxWidth = 30;\r\n let boxHeight = 30;\r\n let position = labelPosition(element.waypoints);\r\n\r\n return {\r\n textAlign: alignment,\r\n width: boxWidth,\r\n height: boxHeight,\r\n x: position.x,\r\n y: position.y,\r\n };\r\n}\r\n\r\n// determine the next available number that is not yet used\r\nexport function generateAutomaticNumber(elementActivity, commandStack) {\r\n const semantic = elementActivity.businessObject;\r\n const usedNumbers = [0];\r\n let wantedNumber = -1;\r\n\r\n const activitiesFromActors = canvasElementRegistry.getActivitiesFromActors();\r\n\r\n activitiesFromActors.forEach((element) => {\r\n if (element.businessObject.number) {\r\n usedNumbers.push(+element.businessObject.number);\r\n }\r\n });\r\n for (let i = 0; i < usedNumbers.length; i++) {\r\n if (!usedNumbers.includes(i)) {\r\n if (!usedNumbers.includes(i)) {\r\n wantedNumber = i;\r\n i = usedNumbers.length;\r\n }\r\n }\r\n }\r\n if (wantedNumber === -1) {\r\n wantedNumber = usedNumbers.length;\r\n }\r\n\r\n updateExistingNumbersAtGeneration(\r\n activitiesFromActors,\r\n wantedNumber,\r\n commandStack\r\n );\r\n semantic.number = wantedNumber;\r\n return wantedNumber;\r\n}\r\n\r\n// update the numbers at the activities when generating a new activity\r\nexport function updateExistingNumbersAtGeneration(\r\n activitiesFromActors,\r\n wantedNumber,\r\n commandStack\r\n) {\r\n activitiesFromActors.forEach((element) => {\r\n let number = +element.businessObject.number;\r\n\r\n if (number >= wantedNumber) {\r\n wantedNumber++;\r\n setTimeout(function () {\r\n commandStack.execute(\"activity.changed\", {\r\n businessObject: element.businessObject,\r\n newLabel: element.businessObject.name,\r\n newNumber: number,\r\n element: element,\r\n });\r\n }, 10);\r\n }\r\n });\r\n}\r\n\r\n// update the numbers at the activities when editing an activity\r\nexport function updateExistingNumbersAtEditing(\r\n activitiesFromActors,\r\n wantedNumber,\r\n eventBus\r\n) {\r\n // get a sorted list of all activities that could need changing\r\n let sortedActivities = [[]];\r\n activitiesFromActors.forEach((activity) => {\r\n if (!sortedActivities[activity.businessObject.number]) {\r\n sortedActivities[activity.businessObject.number] = [];\r\n }\r\n sortedActivities[activity.businessObject.number].push(activity);\r\n });\r\n\r\n // set the number of each activity to the next highest number, starting from the number, we overrode\r\n let currentNumber = wantedNumber;\r\n for (\r\n currentNumber;\r\n currentNumber < sortedActivities.length;\r\n currentNumber++\r\n ) {\r\n if (sortedActivities[currentNumber]) {\r\n wantedNumber++;\r\n setNumberOfActivity(\r\n sortedActivities[currentNumber],\r\n wantedNumber,\r\n eventBus\r\n );\r\n }\r\n }\r\n}\r\n\r\n// get the IDs of activities with their associated number, only returns activities that are originating from an actor\r\nexport function getNumbersAndIDs() {\r\n let iDWithNumber = [];\r\n let activities = canvasElementRegistry.getActivitiesFromActors();\r\n\r\n for (let i = activities.length - 1; i >= 0; i--) {\r\n let id = activities[i].businessObject.id;\r\n let number = activities[i].businessObject.number;\r\n iDWithNumber.push({ id: id, number: number });\r\n }\r\n return iDWithNumber;\r\n}\r\n\r\nexport function addNumberToRegistry(renderedNumber, number) {\r\n numberRegistry[number] = renderedNumber;\r\n}\r\n\r\nexport function setNumberIsMultiple(number, multi) {\r\n multipleNumberRegistry[number] = multi;\r\n}\r\n\r\n/**\r\n * @returns copy of registry\r\n */\r\nexport function getNumberRegistry() {\r\n return numberRegistry.slice(0);\r\n}\r\n\r\nexport function getMultipleNumberRegistry() {\r\n return multipleNumberRegistry.slice(0);\r\n}\r\n\r\nfunction setNumberOfActivity(elementArray, wantedNumber, eventBus) {\r\n if (elementArray) {\r\n elementArray.forEach((element) => {\r\n if (element) {\r\n let businessObject = element.businessObject;\r\n if (businessObject) {\r\n businessObject.number = wantedNumber;\r\n }\r\n eventBus.fire(\"element.changed\", { element });\r\n }\r\n });\r\n }\r\n}\r\n","\"use strict\";\r\n\r\nimport { assign } from \"min-dash\";\r\nimport { overrideAppendedIcons } from \"src/app/Domain/Domain-Configuration/allIcons\";\r\nimport { Dictionary } from \"src/app/Domain/Common/dictionary/dictionary\";\r\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\r\nimport { getNameFromType } from \"src/app/Utils/naming\";\r\nimport { APPENDED_ICONS_TAG } from \"../../../Domain/Common/constants\";\r\n\r\n/**\r\n * A palette that allows you to create BPMN _and_ custom elements.\r\n */\r\n\r\nlet iconDictionary;\r\nlet configuration;\r\n\r\nexport function initializePalette(iconDictionaryService, configurationService) {\r\n iconDictionary = iconDictionaryService;\r\n configuration = configurationService;\r\n}\r\n\r\nexport default function PaletteProvider(\r\n palette,\r\n create,\r\n elementFactory,\r\n spaceTool,\r\n lassoTool\r\n) {\r\n this._create = create;\r\n this._elementFactory = elementFactory;\r\n this._spaceTool = spaceTool;\r\n this._lassoTool = lassoTool;\r\n\r\n palette.registerProvider(this);\r\n}\r\n\r\nPaletteProvider.$inject = [\r\n \"palette\",\r\n \"create\",\r\n \"elementFactory\",\r\n \"spaceTool\",\r\n \"lassoTool\",\r\n \"modeling\",\r\n];\r\n\r\nPaletteProvider.prototype.getPaletteEntries = function () {\r\n let actions = {},\r\n create = this._create,\r\n elementFactory = this._elementFactory,\r\n spaceTool = this._spaceTool,\r\n lassoTool = this._lassoTool;\r\n\r\n function createAction(type, group, className, title, options) {\r\n function createListener(event) {\r\n let shape = elementFactory.createShape(assign({ type: type }, options));\r\n\r\n assign(shape.businessObject, {\r\n id: shape.id,\r\n });\r\n\r\n if (options) {\r\n shape.businessObject.di.isExpanded = options.isExpanded;\r\n }\r\n\r\n create.start(event, shape);\r\n }\r\n\r\n let shortType = type.replace(/^domainStory:/, \"\");\r\n\r\n return {\r\n group: group,\r\n className: className,\r\n title: \"Create \" + title || \"Create \" + shortType,\r\n action: {\r\n dragstart: createListener,\r\n click: createListener,\r\n },\r\n };\r\n }\r\n\r\n return initPalette(actions, spaceTool, lassoTool, createAction);\r\n};\r\n\r\nfunction appendCSSStyleCheat(customIcons) {\r\n const sheetEl = document.createElement(\"style\");\r\n document.head.appendChild(sheetEl);\r\n\r\n let customIconDict = new Dictionary();\r\n\r\n customIconDict.appendDict(customIcons);\r\n let customIconDictKeys = customIconDict.keysArray();\r\n\r\n customIconDictKeys.forEach((name) => {\r\n if (iconDictionary.getAppendedIconDictionary().has(name)) {\r\n let src = customIconDict.get(name);\r\n\r\n const iconStyle =\r\n \".icon-domain-story-\" +\r\n name.toLowerCase() +\r\n \"::before{\" +\r\n \" display: block;\" +\r\n ' content: url(\"data:image/svg+xml;utf8,' +\r\n wrapSRCInSVG(src) +\r\n '\");' +\r\n \" margin: 3px;}\";\r\n sheetEl.sheet.insertRule(iconStyle, sheetEl.sheet.cssRules.length);\r\n }\r\n });\r\n}\r\n\r\nfunction initPalette(actions, spaceTool, lassoTool, createAction) {\r\n let config = iconDictionary?.getCurrentIconConfigurationForBPMN();\r\n\r\n let customIcons = localStorage.getItem(APPENDED_ICONS_TAG);\r\n\r\n if (customIcons) {\r\n customIcons = JSON.parse(customIcons);\r\n if (customIconsLegacy(customIcons)) {\r\n customIcons = convertLegacyAppendedIconsToDict(customIcons);\r\n }\r\n if (customIcons.entries && customIcons.entries.forEach) {\r\n const customIconsDict = new Dictionary();\r\n customIcons.entries.forEach((entry) => {\r\n customIconsDict.putEntry(entry);\r\n });\r\n overrideAppendedIcons(customIconsDict);\r\n appendCSSStyleCheat(customIcons);\r\n }\r\n }\r\n\r\n iconDictionary?.initTypeDictionaries(config.actors, config.workObjects);\r\n\r\n let actorTypes = iconDictionary?.getTypeDictionary(elementTypes.ACTOR);\r\n\r\n actorTypes?.keysArray().forEach((actorType) => {\r\n addCanvasObjectTypes(actorType, createAction, actions, \"actor\");\r\n });\r\n\r\n assign(actions, {\r\n \"actor-separator\": {\r\n group: \"actor\",\r\n separator: true,\r\n },\r\n });\r\n\r\n let workObjectTypes = iconDictionary?.getTypeDictionary(\r\n elementTypes.WORKOBJECT\r\n );\r\n\r\n workObjectTypes?.keysArray().forEach((workObjectType) => {\r\n addCanvasObjectTypes(workObjectType, createAction, actions, \"actor\"); // TODO is ClassName 'actor' correct?\r\n });\r\n\r\n assign(actions, {\r\n \"workObject-separator\": {\r\n group: \"workObject\",\r\n separator: true,\r\n },\r\n \"domainStory-group\": createAction(\r\n elementTypes.GROUP,\r\n \"group\",\r\n \"icon-domain-story-tool-group\",\r\n \"group\"\r\n ),\r\n \"group-separator\": {\r\n group: \"group\",\r\n separator: true,\r\n },\r\n \"lasso-tool\": {\r\n group: \"tools\",\r\n className: \"bpmn-icon-lasso-tool\",\r\n title: \"Activate the lasso tool\",\r\n action: {\r\n click: function (event) {\r\n lassoTool.activateSelection(event);\r\n },\r\n },\r\n },\r\n \"space-tool\": {\r\n group: \"tools\",\r\n className: \"bpmn-icon-space-tool\",\r\n title: \"Activate the create/remove space tool\",\r\n action: {\r\n click: function (event) {\r\n spaceTool.activateSelection(event);\r\n },\r\n },\r\n },\r\n });\r\n\r\n return actions;\r\n}\r\n\r\nfunction addCanvasObjectTypes(actorType, createAction, actions, className) {\r\n let name = getNameFromType(actorType);\r\n let icon = iconDictionary.getIconForBPMN(actorType);\r\n\r\n let action = [];\r\n action[\"domainStory-\" + className + name] = createAction(\r\n actorType,\r\n className,\r\n icon,\r\n name\r\n );\r\n assign(actions, action);\r\n}\r\n\r\nfunction customIconsLegacy(customIcons) {\r\n return !(\r\n Object.keys(customIcons).length === 1 &&\r\n Object.keys(customIcons)[0] === \"entries\"\r\n );\r\n}\r\n\r\nfunction convertLegacyAppendedIconsToDict(customIcons) {\r\n let dict = new Dictionary();\r\n Object.keys(customIcons).forEach((key) => {\r\n dict.set(key, customIcons[key]);\r\n });\r\n return dict;\r\n}\r\n\r\n// For some reason its important to use ' in the content for the Palette and ContextPad\r\n// Do not change!\r\nfunction wrapSRCInSVG(src) {\r\n return (\r\n \"\" +\r\n \"\"\r\n );\r\n}\r\n","\"use strict\";\r\n\r\nimport { getNumbersAndIDs } from \"../numbering/numbering\";\r\n\r\n/**\r\n * commandStack Handler for changes at activities\r\n */\r\n\r\nlet canvasElementRegistry;\r\nexport function initializeActivityUpdateHandler(canvasElementRegistryService) {\r\n canvasElementRegistry = canvasElementRegistryService;\r\n}\r\n\r\nexport default function activityUpdateHandler(commandStack, eventBus) {\r\n commandStack.registerHandler(\r\n \"activity.directionChange\",\r\n activity_directionChange\r\n );\r\n commandStack.registerHandler(\"activity.changed\", activity_changed);\r\n\r\n // update the activity from the activity-dialog, either with or without number\r\n // and change other activities too, to keep the numbers consistent\r\n function activity_changed(modeling) {\r\n this.preExecute = function (context) {\r\n context.oldLabel = context.businessObject.name || \" \";\r\n\r\n let oldNumbersWithIDs = getNumbersAndIDs();\r\n modeling.updateLabel(context.businessObject, context.newLabel);\r\n modeling.updateNumber(context.businessObject, context.newNumber);\r\n\r\n context.oldNumber = context.businessObject.number;\r\n context.oldNumbersWithIDs = oldNumbersWithIDs;\r\n };\r\n\r\n this.execute = function (context) {\r\n let semantic = context.businessObject;\r\n let element = context.element;\r\n\r\n if (context.newLabel && context.newLabel.length < 1) {\r\n context.newLabel = \" \";\r\n }\r\n\r\n semantic.name = context.newLabel;\r\n semantic.number = context.newNumber;\r\n\r\n eventBus.fire(\"element.changed\", { element });\r\n };\r\n\r\n this.revert = function (context) {\r\n let semantic = context.businessObject;\r\n let element = context.element;\r\n semantic.name = context.oldLabel;\r\n semantic.number = context.oldNumber;\r\n\r\n revertAutomaticNumberGenerationChange(\r\n context.oldNumbersWithIDs,\r\n eventBus\r\n );\r\n\r\n eventBus.fire(\"element.changed\", { element });\r\n };\r\n }\r\n\r\n // change the direction of a single activity without affecting other activities\r\n function activity_directionChange(modeling) {\r\n this.preExecute = function (context) {\r\n context.oldNumber = context.businessObject.number;\r\n context.oldWaypoints = context.element.waypoints;\r\n context.name = context.businessObject.name;\r\n\r\n if (!context.oldNumber) {\r\n context.oldNumber = 0;\r\n }\r\n modeling.updateNumber(context.businessObject, context.newNumber);\r\n };\r\n\r\n this.execute = function (context) {\r\n let businessObject = context.businessObject;\r\n let element = context.element;\r\n let swapSource = element.source;\r\n let newWaypoints = [];\r\n let waypoints = element.waypoints;\r\n\r\n for (let i = waypoints.length - 1; i >= 0; i--) {\r\n newWaypoints.push(waypoints[i]);\r\n }\r\n\r\n element.source = element.target;\r\n businessObject.source = businessObject.target;\r\n element.target = swapSource;\r\n businessObject.target = swapSource.id;\r\n\r\n businessObject.name = context.name;\r\n businessObject.number = context.newNumber;\r\n element.waypoints = newWaypoints;\r\n\r\n eventBus.fire(\"element.changed\", { element });\r\n };\r\n\r\n this.revert = function (context) {\r\n let semantic = context.businessObject;\r\n let element = context.element;\r\n let swapSource = element.source;\r\n\r\n element.source = element.target;\r\n semantic.source = semantic.target;\r\n element.target = swapSource;\r\n semantic.target = swapSource.id;\r\n\r\n semantic.name = context.name;\r\n\r\n semantic.number = context.oldNumber;\r\n element.waypoints = context.oldWaypoints;\r\n\r\n eventBus.fire(\"element.changed\", { element });\r\n };\r\n }\r\n}\r\n\r\n// reverts the automatic changed done by the automatic number-generation at editing\r\nfunction revertAutomaticNumberGenerationChange(iDWithNumber, eventBus) {\r\n let activities = canvasElementRegistry.getActivitesFromActors();\r\n for (let i = activities.length - 1; i >= 0; i--) {\r\n for (let j = iDWithNumber.length - 1; j >= 0; j--) {\r\n if (iDWithNumber[j].id.includes(activities[i].businessObject.id)) {\r\n let element = activities[i];\r\n element.businessObject.number = iDWithNumber[j].number;\r\n j = -5;\r\n eventBus.fire(\"element.changed\", { element });\r\n iDWithNumber.splice(j, 1);\r\n }\r\n }\r\n }\r\n}\r\n","\"use strict\";\r\n\r\nimport { undoGroupRework } from \"../util\";\r\n\r\nexport default function elementUpdateHandler(commandStack, eventBus) {\r\n commandStack.registerHandler(\"element.colorChange\", element_colorChange);\r\n commandStack.registerHandler(\r\n \"shape.removeGroupWithoutChildren\",\r\n removeGroupWithoutChildren\r\n );\r\n\r\n function element_colorChange() {\r\n this.preExecute = function (context) {\r\n context.oldColor = context.businessObject.pickedColor;\r\n };\r\n\r\n this.execute = function (context) {\r\n let semantic = context.businessObject;\r\n let element = context.element;\r\n\r\n semantic.pickedColor = context.newColor;\r\n\r\n eventBus.fire(\"element.changed\", { element });\r\n };\r\n\r\n this.revert = function (context) {\r\n let semantic = context.businessObject;\r\n let element = context.element;\r\n\r\n semantic.pickedColor = context.oldColor;\r\n\r\n eventBus.fire(\"element.changed\", { element });\r\n };\r\n }\r\n\r\n function removeGroupWithoutChildren() {\r\n this.preExecute = function (ctx) {\r\n ctx.parent = ctx.element.parent;\r\n ctx.children = ctx.element.children.slice();\r\n };\r\n\r\n this.execute = function (ctx) {\r\n let element = ctx.element;\r\n ctx.children.forEach((child) => {\r\n undoGroupRework(element, child);\r\n eventBus.fire(\"element.changed\", { element: child });\r\n });\r\n eventBus.fire(\"shape.remove\", { element });\r\n };\r\n\r\n this.revert = function (ctx) {\r\n let element = ctx.element;\r\n eventBus.fire(\"shape.added\", { element });\r\n\r\n ctx.element.children.forEach((child) => {\r\n reworkGroupElements(element, child);\r\n });\r\n };\r\n }\r\n}\r\n","/**\r\n * a handler that updates the text of a BPMN element.\r\n */\r\nexport default function headlineAndDescriptionUpdateHandler(\r\n commandStack,\r\n titleService\r\n) {\r\n commandStack.registerHandler(\r\n \"story.updateHeadlineAndDescription\",\r\n handlerFunction\r\n );\r\n\r\n function handlerFunction() {\r\n this.execute = function (ctx) {\r\n ctx.oldTitle = titleService.getTitle();\r\n ctx.oldDescription = titleService.getDescription();\r\n\r\n titleService.updateTitleAndDescription(\r\n ctx.newTitle,\r\n ctx.newDescription,\r\n false\r\n );\r\n };\r\n\r\n this.revert = function (ctx) {\r\n titleService.updateTitleAndDescription(\r\n ctx.oldTitle,\r\n ctx.oldDescription,\r\n false\r\n );\r\n };\r\n }\r\n}\r\n","\"use strict\";\r\n\r\nexport default function DSMassRenameHandler(commandStack, eventBus) {\r\n commandStack.registerHandler(\"domainStoryObjects.massRename\", massRename);\r\n\r\n function massRename(modeling) {\r\n this.preExecute = function (context) {\r\n let relevantElements = context.elements;\r\n\r\n context.oldLabel = relevantElements[0].businessObject.name;\r\n\r\n relevantElements.forEach((element) => {\r\n modeling.updateLabel(element.businessObject, confirm.newValue);\r\n });\r\n };\r\n\r\n this.execute = function (context) {\r\n let relevantElements = context.elements;\r\n relevantElements.forEach((element) => {\r\n let semantic = element.businessObject;\r\n semantic.name = context.newValue;\r\n\r\n eventBus.fire(\"element.changed\", { element });\r\n });\r\n };\r\n\r\n this.revert = function (context) {\r\n let relevantElements = context.elements;\r\n relevantElements.forEach((element) => {\r\n let semantic = element.businessObject;\r\n semantic.name = context.oldLabel;\r\n\r\n eventBus.fire(\"element.changed\", { element });\r\n });\r\n };\r\n }\r\n}\r\n","\"use strict\";\r\n\r\nimport {\r\n setLabel,\r\n getLabel,\r\n setNumber,\r\n getNumber,\r\n} from \"../labeling/dsLabelUtil\";\r\n\r\nimport {\r\n getExternalLabelMid,\r\n isLabelExternal,\r\n hasExternalLabel,\r\n isLabel,\r\n} from \"bpmn-js/lib/util/LabelUtil\";\r\n\r\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\r\nimport { getBusinessObject, is } from \"../util\";\r\n\r\nconst NULL_DIMENSIONS = {\r\n width: 0,\r\n height: 0,\r\n};\r\n\r\n/**\r\n * a handler that updates the text of a BPMN element.\r\n */\r\nexport default function UpdateLabelHandler(\r\n modeling,\r\n textRenderer,\r\n commandStack\r\n) {\r\n commandStack.registerHandler(\"element.updateCustomLabel\", handlerFunction);\r\n\r\n function handlerFunction() {\r\n /**\r\n * Set the label and return the changed elements.\r\n *\r\n * Element parameter can be label itself or connection (i.e. sequence flow).\r\n *\r\n * @param {djs.model.Base} element\r\n * @param {String} text\r\n */\r\n\r\n this.preExecute = function (ctx) {\r\n let element = ctx.element,\r\n businessObject = element.businessObject,\r\n newLabel = ctx.newLabel,\r\n newNumber = ctx.newNumber;\r\n\r\n if (\r\n !isLabel(element) &&\r\n isLabelExternal(element) &&\r\n !hasExternalLabel(element) &&\r\n (newLabel !== \"\" || newNumber !== \"\")\r\n ) {\r\n // create label\r\n let paddingTop = 7;\r\n\r\n let labelCenter = getExternalLabelMid(element);\r\n\r\n labelCenter = {\r\n x: labelCenter.x,\r\n y: labelCenter.y + paddingTop,\r\n };\r\n\r\n modeling.createLabel(element, labelCenter, {\r\n id: businessObject.id + \"_label\",\r\n businessObject: businessObject,\r\n });\r\n }\r\n };\r\n\r\n this.execute = function (ctx) {\r\n ctx.oldLabel = getLabel(ctx.element);\r\n ctx.oldNumber = getNumber(ctx.element);\r\n return setText(ctx.element, ctx.newLabel, ctx.newNumber);\r\n };\r\n\r\n this.revert = function (ctx) {\r\n return setText(ctx.element, ctx.oldLabel, ctx.oldNumber);\r\n };\r\n\r\n this.postExecute = function (ctx) {\r\n let element = ctx.element,\r\n label = element.label || element,\r\n newLabel = ctx.newLabel,\r\n newBounds = ctx.newBounds;\r\n\r\n if (isLabel(label) && newLabel.trim() === \"\") {\r\n modeling.removeShape(label);\r\n\r\n return;\r\n }\r\n\r\n // ignore internal labels for elements except text annotations\r\n if (\r\n !isLabelExternal(element) &&\r\n !is(element, elementTypes.TEXTANNOTATION)\r\n ) {\r\n return;\r\n }\r\n\r\n let bo = getBusinessObject(label);\r\n\r\n let text = bo.name || bo.text;\r\n\r\n // don't resize without text\r\n if (!text) {\r\n return;\r\n }\r\n\r\n // resize element based on label _or_ pre-defined bounds\r\n if (typeof newBounds === \"undefined\") {\r\n newBounds = textRenderer.getLayoutedBounds(label, text);\r\n }\r\n\r\n // setting newBounds to false or _null_ will\r\n // disable the postExecute resize operation\r\n if (newBounds) {\r\n modeling.resizeShape(label, newBounds, NULL_DIMENSIONS);\r\n }\r\n };\r\n }\r\n}\r\n\r\nfunction setText(element, text, textNumber) {\r\n // external label if present\r\n let label = element.label || element;\r\n\r\n let number = element.number || element;\r\n\r\n let labelTarget = element.labelTarget || element;\r\n\r\n let numberTarget = element.numberTarget || element;\r\n setLabel(label, text);\r\n setNumber(number, textNumber);\r\n\r\n return [label, labelTarget, number, numberTarget];\r\n}\r\n\r\nUpdateLabelHandler.$inject = [\"modeling\", \"textRenderer\", \"commandStack\"];\r\n","import { some } from \"min-dash\";\r\n\r\nexport function is(element, type) {\r\n const bo = getBusinessObject(element);\r\n\r\n return bo && typeof bo.$instanceOf == \"function\" && bo.$instanceOf(type);\r\n}\r\n\r\nexport function getBusinessObject(element) {\r\n return (element && element.businessObject) || element;\r\n}\r\n\r\nexport function isAny(element, types) {\r\n return some(types, function (t) {\r\n return is(element, t);\r\n });\r\n}\r\n\r\nexport function reworkGroupElements(parent, shape) {\r\n parent.children.slice().forEach((innerShape) => {\r\n if (innerShape.id !== shape.id) {\r\n if (innerShape.x >= shape.x && innerShape.x <= shape.x + shape.width) {\r\n if (innerShape.y >= shape.y && innerShape.y <= shape.y + shape.height) {\r\n innerShape.parent = shape;\r\n if (!shape.children.includes(innerShape)) {\r\n shape.children.push(innerShape);\r\n }\r\n }\r\n }\r\n }\r\n });\r\n}\r\n\r\nexport function undoGroupRework(parent, shape) {\r\n const superParent = parent.parent;\r\n\r\n parent.children.remove(shape);\r\n superParent.children.add(shape);\r\n\r\n shape.parent = superParent;\r\n\r\n const svgShape = document.querySelector(\r\n \"[data-element-id=\" + shape.id + \"]\"\r\n ).parentElement;\r\n const svgGroup = svgShape.parentElement;\r\n const svgGroupParent = svgGroup.parentElement.parentElement;\r\n svgGroup.removeChild(svgShape);\r\n svgGroupParent.appendChild(svgShape);\r\n}\r\n","import {\r\n SVG_LINK,\r\n TEXTSPAN_DESCRIPTION_HEIGHT,\r\n TEXTSPAN_TITLE_HEIGHT,\r\n X_OFFSET_UTIL,\r\n} from \"../../Domain/Export/exportConstants\";\r\n\r\nlet extraHeight = 0;\r\n\r\n// Has to be js File so we can access te correct non-standard HTML-Properties without excessive usage of ts-ignore\r\nexport function createTitleAndDescriptionSVGElement(\r\n title,\r\n description,\r\n xLeft,\r\n yUp,\r\n width\r\n) {\r\n title = title.replace(\"<\", \"\").replace(\">\", \"\");\r\n\r\n let titleElement = createTitle(title, width);\r\n let descriptionElement = createDescription(description, width);\r\n\r\n // to display the title and description in the SVG-file, we need to add a container for our text-elements\r\n let insertText =\r\n '' +\r\n titleElement +\r\n descriptionElement +\r\n \"\";\r\n return { insertText, extraHeight };\r\n}\r\n\r\nfunction createTitle(text, width) {\r\n let tempCanvas = document.createElement(\"canvas\");\r\n let ctx = tempCanvas.getContext(\"2d\");\r\n ctx.font = \"30px Arial\";\r\n\r\n return createTextSpans(text, width, ctx, 10, TEXTSPAN_TITLE_HEIGHT, 30);\r\n}\r\n\r\nfunction createDescription(text, width) {\r\n let description = \"\";\r\n let descriptionParts = text.split(\"
\");\r\n\r\n let tempCanvas = document.createElement(\"canvas\");\r\n let ctx = tempCanvas.getContext(\"2d\");\r\n ctx.font = \"12px Arial\";\r\n\r\n for (let i = 0; i < descriptionParts.length; i++) {\r\n description += createTextSpans(\r\n descriptionParts[i],\r\n width,\r\n ctx,\r\n 0,\r\n TEXTSPAN_DESCRIPTION_HEIGHT,\r\n 12\r\n );\r\n }\r\n return description;\r\n}\r\n\r\nfunction createTextSpans(text, width, ctx, yOffset, heightOffset, fontSize) {\r\n let textSpans = \"\";\r\n let words = text.split(\" \");\r\n\r\n let textTag =\r\n '';\r\n\r\n let textSpan = document.createElementNS(SVG_LINK, \"tspan\");\r\n let textNode = document.createTextNode(words[0]);\r\n\r\n textSpan.setAttribute(\"x\", X_OFFSET_UTIL);\r\n textSpan.setAttribute(\"y\", yOffset + extraHeight);\r\n textSpan.setAttribute(\"font-size\", fontSize);\r\n textSpan.appendChild(textNode);\r\n\r\n for (let j = 1; j < words.length; j++) {\r\n if (textSpan.firstChild && textSpan.firstChild.data) {\r\n let len = textSpan.firstChild.data.length;\r\n textNode.data += \" \" + words[j];\r\n\r\n if (ctx.measureText(textNode.data).width > width - 16) {\r\n extraHeight += heightOffset;\r\n textSpan.firstChild.data = textSpan.firstChild.data.slice(0, len); // remove overflow word\r\n\r\n textSpans += textTag + textSpan.outerHTML + \"\"; // append line\r\n\r\n // create new textspan for line break\r\n textSpan = document.createElementNS(SVG_LINK, \"tspan\");\r\n textNode = document.createTextNode(words[j]);\r\n textSpan.setAttribute(\"x\", X_OFFSET_UTIL);\r\n textSpan.setAttribute(\"y\", yOffset + extraHeight);\r\n textSpan.appendChild(textNode);\r\n }\r\n }\r\n }\r\n extraHeight += heightOffset;\r\n\r\n textSpans += textTag + textSpan.outerHTML + \"\";\r\n return textSpans;\r\n}\r\n","import { elementTypes } from './elementTypes';\r\n\r\nexport interface BusinessObject {\r\n $descriptor: any;\r\n $type: any;\r\n di: any;\r\n get: any;\r\n set: any;\r\n\r\n id: string;\r\n name: string;\r\n\r\n type: string;\r\n\r\n x: number;\r\n y: number;\r\n height: number | undefined;\r\n width: number | undefined;\r\n pickedColor: string | undefined;\r\n}\r\n\r\nexport const testBusinessObject: BusinessObject = {\r\n $descriptor: undefined,\r\n $type: undefined,\r\n di: undefined,\r\n get: undefined,\r\n set: undefined,\r\n\r\n id: 'test',\r\n name: 'test',\r\n\r\n type: elementTypes.WORKOBJECT,\r\n\r\n x: 0,\r\n y: 0,\r\n height: 38,\r\n width: 38,\r\n pickedColor: undefined,\r\n};\r\n","export class Configuration {\r\n actors: string[];\r\n workObjects: string[];\r\n\r\n constructor(actors: string[], workObjects: string[]) {\r\n this.actors = actors;\r\n this.workObjects = workObjects;\r\n }\r\n}\r\n","/** GLOBAL **/\r\nexport const VERSION = '2.0.0-beta.1';\r\n\r\n/** DEFAULT VALUES **/\r\nexport const INITIAL_TITLE = '< title >';\r\nexport const INITIAL_DESCRIPTION = '< description >';\r\nexport const INITIAL_DOMAIN_NAME = '[icons: default]';\r\n\r\n/** LocalStorageTags **/\r\nexport const APPENDED_ICONS_TAG = 'appendedIcons';\r\nexport const DOMAIN_CONFIGURATION_TAG = 'domainConfigurationTag';\r\n\r\n/** AUTOSAVE DEFAULTS **/\r\nexport const DEFAULT_AUTOSAVES_AMOUNT = 5;\r\nexport const DEFAULT_AUTOSAVES_INTERVAL = 5;\r\n\r\n/** SNACKBAR **/\r\nexport const SNACKBAR_DURATION = 2000;\r\nexport const SNACKBAR_SUCCESS = 'snackbar_success';\r\nexport const SNACKBAR_ERROR = 'snackbar_error';\r\nexport const SNACKBAR_INFO = 'snackbar_info';\r\n\r\n/** BPMN_RELEVANT_CONSTANTS **/\r\nexport const IMPLICIT_ROOT_ID = '__implicitroot';\r\n","export class Dictionary {\r\n private entries: Entry[];\r\n\r\n constructor() {\r\n this.entries = [];\r\n }\r\n\r\n get length(): number {\r\n return this.entries.length;\r\n }\r\n\r\n all(): Entry[] {\r\n return this.entries;\r\n }\r\n\r\n size(): number {\r\n return this.entries.length;\r\n }\r\n\r\n isEmpty(): boolean {\r\n return this.entries.length <= 0;\r\n }\r\n\r\n has(key: string): boolean {\r\n return this.entries.some((entry) => entry.key === key);\r\n }\r\n\r\n set(key: string, value: any): void {\r\n if (!this.has(key)) {\r\n this.entries.push(new Entry(value, key));\r\n }\r\n }\r\n\r\n add(value: any, key: string): void {\r\n this.set(key, value);\r\n }\r\n\r\n putEntry(entry: Entry): void {\r\n if (!this.has(entry.key)) {\r\n this.entries.push(new Entry(entry.value, entry.key));\r\n }\r\n }\r\n\r\n keysArray(): string[] {\r\n return this.entries.map((entry) => entry.key);\r\n }\r\n\r\n addEach(object: any): void {\r\n Object.keys(object).forEach((key) => {\r\n this.set(key, object[key]);\r\n });\r\n }\r\n\r\n appendDict(dict: Dictionary): void {\r\n dict.entries.forEach((entry) => this.putEntry(entry));\r\n }\r\n\r\n clear(): void {\r\n this.entries = [];\r\n }\r\n\r\n delete(key: string): void {\r\n this.entries = this.entries.filter((entry) => entry.key !== key);\r\n }\r\n\r\n get(key: string): any {\r\n const found = this.entries.filter((entry) => entry.key === key);\r\n return found[0] ? found[0].value : null;\r\n }\r\n\r\n sort(fn: (a: Entry, b: Entry) => number) {\r\n this.entries.sort(fn);\r\n }\r\n\r\n sortByName() {\r\n this.entries.sort((a: Entry, b: Entry) => {\r\n if (a.key.includes('_custom') == b.key.includes('_custom')) {\r\n if (a.key < b.key) return -1;\r\n else {\r\n return 1;\r\n }\r\n } else {\r\n if (a.key.includes('_custom')) {\r\n return -1;\r\n } else {\r\n return 1;\r\n }\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport class Entry {\r\n value: any;\r\n key: string;\r\n\r\n constructor(value: any, key: string) {\r\n this.value = value;\r\n this.key = key;\r\n }\r\n}\r\n","import { INITIAL_DOMAIN_NAME } from './constants';\r\nimport { testBusinessObject } from './businessObject';\r\nimport { elementTypes } from './elementTypes';\r\nimport { Dictionary } from './dictionary/dictionary';\r\n\r\nexport interface DomainConfiguration {\r\n name: string;\r\n actors: Dictionary;\r\n workObjects: Dictionary;\r\n}\r\n\r\nexport interface DomainConfigurationForExport {\r\n name: string;\r\n actors: any;\r\n workObjects: any;\r\n}\r\n\r\nexport interface CustomDomainConfiguration {\r\n name: string;\r\n actors: string[];\r\n workObjects: string[];\r\n}\r\nconst actor = structuredClone(testBusinessObject);\r\nactor.type = elementTypes.ACTOR;\r\n\r\nexport const testCustomDomainConfiguration: CustomDomainConfiguration = {\r\n name: INITIAL_DOMAIN_NAME,\r\n actors: ['Person'],\r\n workObjects: ['Document'],\r\n};\r\n\r\nexport function fromConfigurationFromFile(configFromFile: {\r\n name: string;\r\n actors: { [p: string]: any };\r\n workObjects: { [p: string]: any };\r\n}) {\r\n const actorsDict = new Dictionary();\r\n const workObjectsDict = new Dictionary();\r\n Object.keys(configFromFile.actors).forEach((key) => {\r\n actorsDict.add(configFromFile.actors[key], key);\r\n });\r\n Object.keys(configFromFile.workObjects).forEach((key) => {\r\n workObjectsDict.add(configFromFile.workObjects[key], key);\r\n });\r\n\r\n return {\r\n name: configFromFile.name,\r\n actors: actorsDict,\r\n workObjects: workObjectsDict,\r\n };\r\n}\r\n","export enum elementTypes {\r\n ACTIVITY = 'domainStory:activity',\r\n CONNECTION = 'domainStory:connection',\r\n ACTOR = 'domainStory:actor',\r\n WORKOBJECT = 'domainStory:workObject',\r\n GROUP = 'domainStory:group',\r\n TEXTANNOTATION = 'domainStory:textAnnotation',\r\n DOMAINSTORY = 'domainStory:',\r\n}\r\n","import { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\r\nimport { overrideAppendedIcons } from 'src/app/Domain/Domain-Configuration/allIcons';\r\nimport { Configuration } from 'src/app/Domain/Common/configuration';\r\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\r\nimport { INITIAL_DOMAIN_NAME } from './constants';\r\n\r\nexport class IconConfiguration {\r\n domainName = INITIAL_DOMAIN_NAME;\r\n\r\n private allIconDictionary: Dictionary;\r\n\r\n constructor(allIconDictionary: Dictionary) {\r\n this.allIconDictionary = allIconDictionary;\r\n }\r\n\r\n /**\r\n * Select the Iconset which you want to use\r\n */\r\n getDefaultConf(): Configuration {\r\n return defaultConf;\r\n }\r\n\r\n updateAllIconRegistry(allIconDictionary: Dictionary): void {\r\n this.allIconDictionary = allIconDictionary;\r\n }\r\n\r\n appendSRCFile(\r\n actors: string[],\r\n actorsDict: Dictionary,\r\n workObjects: string[],\r\n workObjectsDict: Dictionary\r\n ): void {\r\n const newAppendedIcons: { [key: string]: any } = {};\r\n\r\n actors.forEach((name: string) => {\r\n if (!this.allIconDictionary.has(name)) {\r\n newAppendedIcons[name] = actorsDict.get(name);\r\n }\r\n });\r\n\r\n workObjects.forEach((name: string) => {\r\n if (!this.allIconDictionary.has(name)) {\r\n newAppendedIcons[name] = workObjectsDict.get(name);\r\n }\r\n });\r\n const appen = new Dictionary();\r\n Object.keys(newAppendedIcons).forEach((key) => {\r\n appen.set(key, newAppendedIcons[key]);\r\n });\r\n\r\n overrideAppendedIcons(appen);\r\n }\r\n\r\n createCustomConf(domainConfiguration: DomainConfiguration): Configuration {\r\n this.domainName = domainConfiguration.name;\r\n\r\n let actors = domainConfiguration.actors;\r\n let workObjects = domainConfiguration.workObjects;\r\n\r\n this.appendSRCFile(\r\n actors.keysArray(),\r\n actors,\r\n workObjects.keysArray(),\r\n workObjects\r\n );\r\n\r\n return new Configuration(actors.keysArray(), workObjects.keysArray());\r\n }\r\n}\r\n\r\n/* eslint no-unused-vars: 0*/\r\n\r\n/**\r\n * All Icons as one Set\r\n * There are more Icons than fit in the palette.\r\n * This is just for reference\r\n */\r\nconst allIconsConf = {\r\n actors: ['Person', 'Group', 'System', 'Pet'],\r\n workObjects: [\r\n 'Place',\r\n 'Flag',\r\n 'World',\r\n 'Water',\r\n 'Store',\r\n 'Theater',\r\n 'Business',\r\n 'Meeting-room',\r\n 'Hotel',\r\n 'Dining',\r\n 'Courthouse',\r\n 'Gas-station',\r\n 'Car',\r\n 'Bus',\r\n 'Train',\r\n 'Truck',\r\n 'Taxi',\r\n 'Bike',\r\n 'Boat',\r\n 'Motorcycle',\r\n 'Plane',\r\n 'Flight-takeoff',\r\n 'Flight-landing',\r\n 'Shuttle',\r\n 'Walking',\r\n 'Traffic',\r\n 'Commute',\r\n 'Document',\r\n 'Folder',\r\n 'Call',\r\n 'Email',\r\n 'Copyright',\r\n 'Briefcase',\r\n 'Attach',\r\n 'Ruler',\r\n 'Sum',\r\n 'Conversation',\r\n 'Update',\r\n 'Cellphone',\r\n 'Speaker-phone',\r\n 'Signal',\r\n 'Key',\r\n 'Pencil',\r\n 'How-To-Reg',\r\n 'Settings',\r\n 'Grid',\r\n 'Label',\r\n 'Receipt',\r\n 'Calendar',\r\n 'Wrench',\r\n 'Headset',\r\n 'Keyboard',\r\n 'Mouse',\r\n 'Microphone',\r\n 'Router',\r\n 'Scanner',\r\n 'Printer',\r\n 'DNS',\r\n 'Security',\r\n 'Cloud',\r\n 'Desktop',\r\n 'Tablet',\r\n 'Assessment',\r\n 'Dashboard',\r\n 'Pie-chart',\r\n 'View-List',\r\n 'Euro',\r\n 'Dollar',\r\n 'Info',\r\n 'Alarm',\r\n 'Problem',\r\n 'Circle-Arrows',\r\n 'Picture-as-PDF',\r\n 'Credit-Card',\r\n 'Shopping',\r\n 'Favorite',\r\n 'Gavel',\r\n 'Blind',\r\n 'Hourglass',\r\n 'Time',\r\n 'Search',\r\n 'Thumb-up',\r\n 'Thumb-down',\r\n 'Thumb-up-down',\r\n 'Couch',\r\n 'Education',\r\n 'Watch',\r\n ],\r\n};\r\n\r\n/**\r\n * Default Iconset\r\n */\r\nexport const defaultConf = {\r\n actors: ['Person', 'Group', 'System'],\r\n workObjects: ['Document', 'Folder', 'Call', 'Email', 'Conversation', 'Info'],\r\n};\r\n","import { ActivityCanvasObject } from '../Common/activityCanvasObject';\r\n\r\nexport class ActivityDialogData {\r\n activity: ActivityCanvasObject;\r\n numberIsAllowedMultipleTimes: boolean;\r\n showNumberFields: boolean;\r\n\r\n saveFN: any;\r\n\r\n constructor(\r\n activity: ActivityCanvasObject,\r\n numberIsAllowedMultipleTimes: boolean,\r\n showNumberFields: boolean,\r\n saveFN: any\r\n ) {\r\n this.activity = activity;\r\n this.numberIsAllowedMultipleTimes = numberIsAllowedMultipleTimes;\r\n this.showNumberFields = showNumberFields;\r\n this.saveFN = saveFN;\r\n }\r\n}\r\n","export class ExportDialogData {\r\n title: string;\r\n options: ExportOption[];\r\n\r\n constructor(title: string, options: ExportOption[]) {\r\n this.title = title;\r\n this.options = options;\r\n }\r\n}\r\n\r\nexport class ExportOption {\r\n text: string;\r\n fn: any;\r\n tooltip: string;\r\n\r\n constructor(text: string, tooltip: string, fn: any) {\r\n this.text = text;\r\n this.tooltip = tooltip;\r\n this.fn = fn;\r\n }\r\n}\r\n","export class InfoDialogData {\r\n title: string;\r\n infoText: string;\r\n isInfo: boolean;\r\n isLink: boolean;\r\n linkText: string | undefined;\r\n\r\n constructor(\r\n title: string,\r\n infoText: string,\r\n isInfo: boolean,\r\n isLink: boolean = false,\r\n linkText?: string\r\n ) {\r\n this.title = title;\r\n this.infoText = infoText;\r\n this.isInfo = isInfo;\r\n this.isLink = isLink;\r\n this.linkText = linkText;\r\n }\r\n}\r\n","export const NUMBER_BACKGROUND_COLOR = 'white';\r\nexport const NUMBER_COLOR = 'black';\r\nexport const STROKE_WIDTH = '1.5';\r\n\r\nexport const HIGHLIGHT_NUMBER_BACKGROUNG_COLOR = '#43acbf';\r\nexport const HIGHLIGHT_NUMBER_COLOR = 'black';\r\nexport const HIGHLIGHT_COLOR = 'black';\r\nexport const HIGHLIGHT_STROKE_WIDTH = '4';\r\n","import { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\r\n\r\nexport let appendedIcons = new Dictionary();\r\nexport const allIcons = {\r\n Person:\r\n '',\r\n Group:\r\n '',\r\n Pet: '',\r\n Conversation:\r\n '',\r\n World:\r\n '',\r\n Store:\r\n '',\r\n Theater:\r\n '',\r\n Business:\r\n '',\r\n Water:\r\n '',\r\n Hotel:\r\n '',\r\n Dining:\r\n '',\r\n 'Gas-station':\r\n '',\r\n 'Meeting-room':\r\n '',\r\n Courthouse:\r\n '',\r\n Flag: '',\r\n Place:\r\n '',\r\n Car: '',\r\n Bus: '',\r\n Train:\r\n '',\r\n Truck:\r\n '',\r\n Taxi: '',\r\n Bike: '',\r\n Boat: '',\r\n Motorcycle:\r\n '',\r\n Plane:\r\n '',\r\n 'Flight-takeoff':\r\n '',\r\n 'Flight-landing':\r\n '',\r\n Shuttle:\r\n '',\r\n Walking:\r\n '',\r\n Traffic:\r\n '',\r\n Commute:\r\n '',\r\n System:\r\n '',\r\n Printer:\r\n '',\r\n Document:\r\n '',\r\n Folder:\r\n '',\r\n Call: '',\r\n Email:\r\n '',\r\n Copyright:\r\n '',\r\n DNS: '',\r\n Settings:\r\n '',\r\n Cellphone:\r\n '',\r\n Update:\r\n '',\r\n Briefcase:\r\n '',\r\n Microphone:\r\n '',\r\n Signal:\r\n '',\r\n Key: '',\r\n Pencil:\r\n '',\r\n Sum: '',\r\n Headset:\r\n '',\r\n Keyboard:\r\n '',\r\n Mouse:\r\n '',\r\n Router:\r\n '',\r\n Scanner:\r\n '',\r\n Security:\r\n '',\r\n Desktop:\r\n '',\r\n 'Speaker-phone':\r\n '',\r\n Tablet:\r\n '',\r\n Label:\r\n '',\r\n Receipt:\r\n '',\r\n Calendar:\r\n '',\r\n Cloud:\r\n '',\r\n Assessment:\r\n '',\r\n Dashboard:\r\n '',\r\n 'Pie-chart':\r\n '',\r\n Problem:\r\n '',\r\n 'Picture-as-PDF':\r\n '',\r\n Grid: '',\r\n Watch:\r\n '',\r\n Euro: '',\r\n Dollar:\r\n '',\r\n Info: '',\r\n Alarm:\r\n '',\r\n Wrench:\r\n '',\r\n 'Circle-Arrows':\r\n '',\r\n 'Credit-Card':\r\n '',\r\n Favorite:\r\n '',\r\n Gavel:\r\n '',\r\n Blind:\r\n '',\r\n Hourglass:\r\n '',\r\n Time: '',\r\n Search:\r\n '',\r\n Shopping:\r\n '',\r\n 'Thumb-up':\r\n '',\r\n 'Thumb-down':\r\n '',\r\n 'Thumb-up-down':\r\n '',\r\n Couch:\r\n '',\r\n Attach:\r\n '',\r\n Ruler:\r\n '',\r\n Education:\r\n '',\r\n 'How-To-Reg':\r\n '',\r\n 'View-List':\r\n '',\r\n};\r\n\r\nexport function getAllStandardIconKeys(): string[] {\r\n const allIconsDict = new Dictionary();\r\n\r\n allIconsDict.addEach(allIcons);\r\n\r\n return allIconsDict.keysArray();\r\n}\r\n\r\nexport function overrideAppendedIcons(newIcons: Dictionary): void {\r\n appendedIcons = newIcons;\r\n}\r\n","export enum IconFilterEnum {\r\n ICON_FILTER_ACTOR = 'ICON_FILTER_ACTOR',\r\n ICON_FILTER_WORKOBJECT = 'ICON_FILTER_WORKOBJECT',\r\n ICON_FILTER_UNASSIGNED = 'ICON_FILTER_UNASSIGNED',\r\n ICON_FILTER_NONE = 'ICON_FILTER_NONE',\r\n}\r\n","export class ConfigAndDST {\r\n domain: any;\r\n dst: any;\r\n\r\n constructor(domain: any, dst: any) {\r\n this.domain = domain;\r\n this.dst = dst;\r\n }\r\n}\r\n\r\nexport const testConfigAndDst: ConfigAndDST = {\r\n domain: JSON.parse(\r\n '{\"name\":\"\",' +\r\n '\"actors\":{\"Person\":\"' +\r\n '' +\r\n '\",' +\r\n '\"Group\":\"' +\r\n '' +\r\n '\",' +\r\n '\"System\":\"' +\r\n '\"},' +\r\n '\"workObjects\":{\"Document\":\"' +\r\n '\",' +\r\n '\"Folder\":\"' +\r\n '' +\r\n '\",' +\r\n '\"Call\":\"' +\r\n '\",' +\r\n '\"Email\":\"' +\r\n '\",' +\r\n '\"Conversation\":\"' +\r\n '\",' +\r\n '\"Info\":\"' +\r\n '' +\r\n '\"}}'\r\n ),\r\n dst:\r\n '[' +\r\n '{\"type\":\"domainStory:workObjectDocument\",\"name\":\"\",\"id\":\"shape_3792\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"x\":302,\"y\":102},' +\r\n '{\"type\":\"domainStory:actorPerson\",\"name\":\"\",\"id\":\"shape_4666\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"x\":103,\"y\":93},' +\r\n '{\"type\":\"domainStory:activity\",\"name\":\"\",\"id\":\"connection_4884\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"number\":1,' +\r\n '\"waypoints\":[{\"original\":{\"x\":141,\"y\":131},\"x\":186,\"y\":133},{\"original\":{\"x\":340,\"y\":140},\"x\":302,\"y\":138}],' +\r\n '\"source\":\"shape_4666\",\"target\":\"shape_3792\"}]',\r\n};\r\n","export const SVG_LINK = 'http://www.w3.org/2000/svg';\r\nexport const X_OFFSET_UTIL = '8';\r\nexport const TEXTSPAN_TITLE_HEIGHT = 30;\r\nexport const TEXTSPAN_DESCRIPTION_HEIGHT = 15;\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AutosaveSettingsComponent } from '../Presentation/Autosave/AutosaveSettings/autosave-settings.component';\r\nimport { AutosaveOptionsComponent } from '../Presentation/Autosave/AutosaveOptions/autosave-options.component';\r\nimport { AutosavedDraftsComponent } from '../Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n AutosaveSettingsComponent,\r\n AutosaveOptionsComponent,\r\n AutosavedDraftsComponent,\r\n ],\r\n exports: [AutosaveSettingsComponent],\r\n imports: [CommonModule, FormsModule, MaterialModule],\r\n})\r\nexport class AutosaveSettingsModule {}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { HeaderButtonsComponent } from '../Presentation/Header/header-buttons.component';\r\n\r\n@NgModule({\r\n declarations: [HeaderButtonsComponent],\r\n exports: [HeaderButtonsComponent],\r\n imports: [CommonModule],\r\n})\r\nexport class DomainStoryModelerModuleModule {}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { DomainConfigurationComponent } from 'src/app/Presentation/DomainConfiguration/domain-configuration.component';\r\nimport { IconListItemComponent } from '../Presentation/DomainConfiguration/icon-list-item/icon-list-item.component';\r\nimport { DetailsListItemComponent } from '../Presentation/DomainConfiguration/details-list-item/details-list-item.component';\r\nimport { DomainDetailsComponent } from '../Presentation/DomainConfiguration/domain-details/domain-details.component';\r\nimport { GeneralSettingsComponent } from '../Presentation/Settings/General/general-settings.component';\r\nimport { LabelDictionaryComponent } from '../Presentation/LabelDictionary/label-dictionary.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { MaterialModule } from '../material.module';\r\nimport { AutosaveSettingsModule } from './autosave-settings.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n DomainConfigurationComponent,\r\n GeneralSettingsComponent,\r\n LabelDictionaryComponent,\r\n IconListItemComponent,\r\n DetailsListItemComponent,\r\n DomainDetailsComponent,\r\n ],\r\n exports: [\r\n GeneralSettingsComponent,\r\n DomainConfigurationComponent,\r\n LabelDictionaryComponent,\r\n ],\r\n imports: [AutosaveSettingsModule, CommonModule, FormsModule, MaterialModule],\r\n})\r\nexport class SettingsModule {}\r\n","import { Component } from '@angular/core';\r\nimport { AutosaveConfigurationService } from '../../../Service/Autosave/autosave-configuration.service';\r\nimport { MatSnackBar } from '@angular/material/snack-bar';\r\nimport {\r\n SNACKBAR_DURATION,\r\n SNACKBAR_ERROR,\r\n SNACKBAR_SUCCESS,\r\n} from 'src/app/Domain/Common/constants';\r\n\r\n@Component({\r\n selector: 'app-autosave-options',\r\n templateUrl: './autosave-options.component.html',\r\n styleUrls: ['./autosave-options.component.scss'],\r\n})\r\nexport class AutosaveOptionsComponent {\r\n constructor(\r\n protected autosaveConfiguration: AutosaveConfigurationService,\r\n private snackbar: MatSnackBar\r\n ) {}\r\n\r\n save(activated: boolean, amount: number, interval: number) {\r\n if (\r\n this.autosaveConfiguration.setConfiguration({\r\n activated,\r\n amount,\r\n interval,\r\n })\r\n ) {\r\n this.snackbar.open('Settings for Autosave saved', undefined, {\r\n duration: SNACKBAR_DURATION,\r\n panelClass: SNACKBAR_SUCCESS,\r\n });\r\n } else {\r\n this.snackbar.open(\r\n 'Unable to save settings for Autosave - please try again',\r\n undefined,\r\n {\r\n duration: 2 * SNACKBAR_DURATION,\r\n panelClass: SNACKBAR_ERROR,\r\n }\r\n );\r\n }\r\n }\r\n}\r\n","\r\n \r\n Autosave Options\r\n \r\n \r\n
\r\n \r\n Enabled\r\n
\r\n
\r\n Interval\r\n \r\n
\r\n
\r\n Amount\r\n \r\n
\r\n \r\n Apply\r\n \r\n
\r\n
\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-autosave-settings',\r\n templateUrl: './autosave-settings.component.html',\r\n styleUrls: ['./autosave-settings.component.scss'],\r\n})\r\nexport class AutosaveSettingsComponent {}\r\n","\r\n\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { AutosaveService } from '../../../Service/Autosave/autosave.service';\r\nimport { Draft } from '../../../Domain/Autosave/draft';\r\nimport { MatSnackBar } from '@angular/material/snack-bar';\r\nimport {\r\n SNACKBAR_DURATION,\r\n SNACKBAR_SUCCESS,\r\n} from 'src/app/Domain/Common/constants';\r\nimport { Subscription } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'app-autosaved-drafts',\r\n templateUrl: './autosaved-drafts.component.html',\r\n styleUrls: ['./autosaved-drafts.component.scss'],\r\n})\r\nexport class AutosavedDraftsComponent implements OnInit {\r\n drafts: Draft[] = [];\r\n subscription: Subscription;\r\n\r\n constructor(\r\n private autosaveService: AutosaveService,\r\n private snackbar: MatSnackBar\r\n ) {\r\n this.subscription = this.autosaveService.autosavedDraftsChanged$.subscribe(\r\n () => this.initDrafts()\r\n );\r\n }\r\n\r\n ngOnInit(): void {\r\n this.initDrafts();\r\n }\r\n\r\n initDrafts() {\r\n this.drafts = this.autosaveService.loadCurrentDrafts();\r\n }\r\n\r\n loadDraft(draft: Draft): void {\r\n this.autosaveService.loadDraft(draft);\r\n this.snackbar.open('Draft loaded', undefined, {\r\n duration: SNACKBAR_DURATION,\r\n panelClass: SNACKBAR_SUCCESS,\r\n });\r\n }\r\n\r\n removeAllDrafts() {\r\n this.autosaveService.removeAllDrafts();\r\n }\r\n}\r\n","\r\n \r\n \r\n Autosaves \r\n \r\n {{ drafts.length ? drafts.length : \"no\" }}\r\n {{ drafts.length > 1 ? \"drafts\" : \"draft\" }} available\r\n \r\n \r\n
\r\n
\r\n
\r\n
{{ draft.title }}
\r\n
{{ draft.date }}
\r\n
\r\n \r\n Load Draft\r\n \r\n
\r\n
\r\n
\r\n \r\n Remove All Drafts\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\nNo drafts found.\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { ModelerService } from '../../Service/Modeler/modeler.service';\r\n\r\n@Component({\r\n selector: 'app-modeler',\r\n templateUrl: './modeler.component.html',\r\n styleUrls: ['./modeler.component.scss'],\r\n})\r\nexport class ModelerComponent implements OnInit {\r\n constructor(private modelerService: ModelerService) {}\r\n\r\n ngOnInit(): void {\r\n this.modelerService.postInit();\r\n }\r\n}\r\n","
\r\n","import { AfterViewInit, Component, Inject, OnInit } from '@angular/core';\r\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\r\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\r\nimport { ActivityDialogData } from 'src/app/Domain/Dialog/activityDialogData';\r\nimport { ActivityCanvasObject } from '../../../Domain/Common/activityCanvasObject';\r\n\r\n@Component({\r\n selector: 'app-activity-dialog',\r\n templateUrl: './activity-dialog.component.html',\r\n styleUrls: ['./activity-dialog.component.scss'],\r\n})\r\nexport class ActivityDialogComponent {\r\n form: UntypedFormGroup;\r\n activityLabel: string;\r\n activityNumber: number | undefined;\r\n numberIsAllowedMultipleTimes: boolean;\r\n showNumberFields: boolean;\r\n activity: ActivityCanvasObject;\r\n\r\n saveFN: any;\r\n\r\n constructor(\r\n private fb: UntypedFormBuilder,\r\n private dialogRef: MatDialogRef,\r\n @Inject(MAT_DIALOG_DATA) data: ActivityDialogData\r\n ) {\r\n this.activity = data.activity;\r\n this.activityLabel = data.activity.businessObject.name;\r\n this.numberIsAllowedMultipleTimes = data.numberIsAllowedMultipleTimes;\r\n this.activityNumber = data.activity.businessObject.number;\r\n this.showNumberFields = data.showNumberFields;\r\n\r\n this.saveFN = data.saveFN;\r\n\r\n this.form = this.fb.group({\r\n activityLabel: [this.activityLabel, []],\r\n activityNumber: [this.activityNumber, []],\r\n multipleNumbers: [this.numberIsAllowedMultipleTimes, []],\r\n });\r\n }\r\n\r\n onSubmit(): void {\r\n this.numberIsAllowedMultipleTimes = !this.numberIsAllowedMultipleTimes;\r\n this.form.patchValue({\r\n multipleNumbers: this.numberIsAllowedMultipleTimes,\r\n });\r\n }\r\n\r\n save(): void {\r\n this.saveFN({\r\n activity: this.activity,\r\n ...this.form.value,\r\n });\r\n this.dialogRef.close();\r\n }\r\n\r\n close(): void {\r\n this.dialogRef.close();\r\n }\r\n}\r\n","\r\n

Edit Activity

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

{{ title }}

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

{{ title }}

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

Label Dictionary

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

Icon Set name

\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n

Order of actors

\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n

Order of work objects

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

Workobjects

\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n

Activities

\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n library_books\r\n update Dictionaries\r\n \r\n
\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-general-settings',\r\n templateUrl: './general-settings.component.html',\r\n styleUrls: ['./general-settings.component.scss'],\r\n})\r\nexport class GeneralSettingsComponent {}\r\n","
\r\n \r\n
\r\n","import { Component } from '@angular/core';\r\nimport { SettingsService } from 'src/app/Service/Settings/settings.service';\r\nimport { ModelerService } from 'src/app/Service/Modeler/modeler.service';\r\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\nimport { AutosaveConfigurationService } from '../../Service/Autosave/autosave-configuration.service';\r\nimport { DomainCustomizationService } from '../../Service/DomainConfiguration/domain-customization.service';\r\n\r\n@Component({\r\n selector: 'app-settings',\r\n templateUrl: './settings.component.html',\r\n styleUrls: ['./settings.component.scss'],\r\n})\r\nexport class SettingsComponent {\r\n domainConfiguration: DomainConfiguration | undefined;\r\n showGeneralSettings = new BehaviorSubject(false);\r\n showDomainCustomization = new BehaviorSubject(true);\r\n\r\n constructor(\r\n private settingsService: SettingsService,\r\n private modelerService: ModelerService,\r\n private domainCustomizationService: DomainCustomizationService\r\n ) {}\r\n\r\n close(): void {\r\n const savedConfiguration =\r\n this.domainCustomizationService.getAndClearSavedConfiguration();\r\n if (savedConfiguration) {\r\n this.modelerService.restart(savedConfiguration);\r\n }\r\n this.settingsService.close();\r\n }\r\n\r\n openGeneralSettings() {\r\n this.showGeneralSettings.next(true);\r\n this.showDomainCustomization.next(false);\r\n }\r\n\r\n openDomainCustomization() {\r\n this.showGeneralSettings.next(false);\r\n this.showDomainCustomization.next(true);\r\n }\r\n}\r\n","
\r\n \r\n \r\n \r\n
\r\n \r\n Customize Icons for Your Domain\r\n \r\n \r\n General Settings\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n","import { Injectable } from '@angular/core';\r\nimport { ReplaySubject } from 'rxjs';\r\nimport { StorageService } from '../BrowserStorage/storage.service';\r\nimport { AutosaveConfiguration } from '../../Domain/Autosave/autosave-configuration';\r\nimport {\r\n DEFAULT_AUTOSAVES_AMOUNT,\r\n DEFAULT_AUTOSAVES_INTERVAL,\r\n} from 'src/app/Domain/Common/constants';\r\n\r\nconst AUTOSAVE_CONFIGURATION_TAG = 'autosaveConfiguration';\r\n\r\nconst defaultConfiguration: AutosaveConfiguration = {\r\n activated: false,\r\n interval: DEFAULT_AUTOSAVES_INTERVAL,\r\n amount: DEFAULT_AUTOSAVES_AMOUNT,\r\n};\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AutosaveConfigurationService {\r\n private configuration = defaultConfiguration;\r\n\r\n private readonly configurationSubject =\r\n new ReplaySubject(1);\r\n readonly configuration$ = this.configurationSubject.asObservable();\r\n\r\n constructor(private storageService: StorageService) {\r\n this.initializeConfiguration();\r\n }\r\n\r\n private initializeConfiguration() {\r\n this.loadConfiguration();\r\n this.configurationSubject.next(this.configuration);\r\n }\r\n\r\n setConfiguration(configuration: AutosaveConfiguration): boolean {\r\n try {\r\n this.configuration = configuration;\r\n this.saveConfiguration();\r\n this.configurationSubject.next(configuration);\r\n return true;\r\n } catch {\r\n return false;\r\n }\r\n }\r\n\r\n private loadConfiguration() {\r\n this.configuration =\r\n this.storageService.get(AUTOSAVE_CONFIGURATION_TAG) ??\r\n defaultConfiguration;\r\n }\r\n\r\n private saveConfiguration() {\r\n this.storageService.set(AUTOSAVE_CONFIGURATION_TAG, this.configuration);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { RendererService } from '../Renderer/renderer.service';\r\nimport { ExportService } from '../Export/export.service';\r\nimport { Draft } from '../../Domain/Autosave/draft';\r\nimport { AutosaveConfigurationService } from './autosave-configuration.service';\r\nimport { IconDictionaryService } from '../DomainConfiguration/icon-dictionary.service';\r\nimport { elementTypes } from '../../Domain/Common/elementTypes';\r\nimport { fromConfigurationFromFile } from '../../Domain/Common/domainConfiguration';\r\nimport { StorageService } from '../BrowserStorage/storage.service';\r\nimport { TitleService } from '../Title/title.service';\r\nimport { AutosaveConfiguration } from '../../Domain/Autosave/autosave-configuration';\r\nimport {\r\n SNACKBAR_DURATION,\r\n SNACKBAR_INFO,\r\n} from 'src/app/Domain/Common/constants';\r\nimport { MatSnackBar } from '@angular/material/snack-bar';\r\nimport { Subject } from 'rxjs';\r\n\r\nexport const DRAFTS_TAG = 'autosaveDrafts';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AutosaveService {\r\n private autosaveTimer: any;\r\n autosavedDraftsChanged$ = new Subject();\r\n\r\n constructor(\r\n private autosaveConfiguration: AutosaveConfigurationService,\r\n private exportService: ExportService,\r\n private iconDistionaryService: IconDictionaryService,\r\n private rendererService: RendererService,\r\n private snackbar: MatSnackBar,\r\n private storageService: StorageService,\r\n private titleService: TitleService\r\n ) {\r\n this.autosaveConfiguration.configuration$.subscribe((configuration) =>\r\n this.updateConfiguration(configuration)\r\n );\r\n }\r\n\r\n loadCurrentDrafts(): Draft[] {\r\n const drafts = this.readDrafts();\r\n this.sortDrafts(drafts);\r\n return drafts;\r\n }\r\n\r\n loadDraft(draft: Draft): void {\r\n const configFromFile = draft.configAndDST.domain;\r\n const config = fromConfigurationFromFile(configFromFile);\r\n const story = JSON.parse(draft.configAndDST.dst);\r\n\r\n this.titleService.updateTitleAndDescription(\r\n draft.title,\r\n draft.description,\r\n false\r\n );\r\n\r\n const actorIcons = this.iconDistionaryService.getElementsOfType(\r\n story,\r\n elementTypes.ACTOR\r\n );\r\n const workObjectIcons = this.iconDistionaryService.getElementsOfType(\r\n story,\r\n elementTypes.WORKOBJECT\r\n );\r\n this.iconDistionaryService.updateIconRegistries(\r\n actorIcons,\r\n workObjectIcons,\r\n config\r\n );\r\n this.rendererService.importStory(story, true, config, false);\r\n }\r\n\r\n removeAllDrafts() {\r\n this.storageService.set(DRAFTS_TAG, []);\r\n this.autosavedDraftsChanged$.next();\r\n }\r\n\r\n private updateConfiguration(configuration: AutosaveConfiguration) {\r\n this.stopTimer();\r\n\r\n if (configuration.activated) {\r\n this.startTimer(configuration.interval, configuration.amount);\r\n }\r\n }\r\n\r\n private stopTimer(): void {\r\n if (this.autosaveTimer) {\r\n clearInterval(this.autosaveTimer);\r\n this.autosaveTimer = undefined;\r\n }\r\n }\r\n\r\n private startTimer(interval: number, amount: number): void {\r\n this.autosaveTimer = setInterval(() => {\r\n const drafts = this.loadCurrentDrafts();\r\n const newDraft = this.createDraft();\r\n let isChanged = amount > 0;\r\n if (drafts.length > 0) {\r\n isChanged = isChanged && !this.isSame(newDraft, drafts[0]);\r\n }\r\n if (isChanged) {\r\n drafts.unshift(this.createDraft());\r\n while (drafts.length > amount) {\r\n drafts.pop();\r\n }\r\n this.writeDrafts(drafts);\r\n this.snackbar.open('Draft Saved', undefined, {\r\n panelClass: SNACKBAR_INFO,\r\n duration: SNACKBAR_DURATION,\r\n });\r\n this.autosavedDraftsChanged$.next();\r\n }\r\n }, interval * 60000);\r\n }\r\n\r\n private isSame(a: Draft, b: Draft) {\r\n return (\r\n a.title === b.title &&\r\n a.description === b.description &&\r\n JSON.stringify(a.configAndDST) === JSON.stringify(b.configAndDST)\r\n );\r\n }\r\n\r\n private writeDrafts(drafts: Draft[]) {\r\n this.storageService.set(DRAFTS_TAG, drafts);\r\n }\r\n\r\n private readDrafts(): Draft[] {\r\n return this.storageService.get(DRAFTS_TAG) ?? [];\r\n }\r\n\r\n private createDraft(): Draft {\r\n const dst = JSON.stringify(this.rendererService.getStory(), null, 2);\r\n const configAndDST = this.exportService.createConfigAndDST(dst);\r\n\r\n const date = new Date().toString().slice(0, 25);\r\n\r\n return {\r\n title: this.titleService.getTitle(),\r\n description: this.titleService.getDescription(),\r\n configAndDST,\r\n date,\r\n };\r\n }\r\n\r\n private sortDrafts(drafts: Draft[]): void {\r\n drafts.sort((a: Draft, b: Draft) => {\r\n const aDate = Date.parse(a.date);\r\n const bDate = Date.parse(b.date);\r\n return aDate > bDate ? 0 : 1;\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { DOMAIN_CONFIGURATION_TAG } from '../../Domain/Common/constants';\r\nimport {\r\n DomainConfiguration,\r\n fromConfigurationFromFile,\r\n} from '../../Domain/Common/domainConfiguration';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class StorageService {\r\n set(key: string, value: any) {\r\n localStorage.setItem(key, JSON.stringify(value));\r\n }\r\n\r\n get(key: string): any {\r\n const json = localStorage.getItem(key);\r\n if (json) {\r\n return JSON.parse(json);\r\n }\r\n return null;\r\n }\r\n\r\n removeItem(key: string) {\r\n localStorage.removeItem(key);\r\n }\r\n\r\n checkValidityOfConfiguration(configuratioFromFile: DomainConfiguration) {\r\n return (\r\n configuratioFromFile.actors.keysArray().length > 1 &&\r\n configuratioFromFile.workObjects.keysArray().length > 1 &&\r\n !configuratioFromFile.actors\r\n .all()\r\n .some((e) => typeof e.value !== 'string') &&\r\n !configuratioFromFile.workObjects\r\n .all()\r\n .some((e) => typeof e.value !== 'string')\r\n );\r\n }\r\n\r\n getStoredDomainConfiguration(): DomainConfiguration | undefined {\r\n const domainString = localStorage.getItem(DOMAIN_CONFIGURATION_TAG);\r\n\r\n if (!domainString) {\r\n return;\r\n } else {\r\n const configuratioFromFile = fromConfigurationFromFile(\r\n JSON.parse(domainString)\r\n );\r\n if (this.checkValidityOfConfiguration(configuratioFromFile)) {\r\n return configuratioFromFile;\r\n }\r\n }\r\n return;\r\n }\r\n\r\n setStoredDomainConfiguration(config: DomainConfiguration): void {\r\n const actors: {\r\n [p: string]: any;\r\n } = {};\r\n config.actors.keysArray().forEach((key) => {\r\n actors[key] = config.actors.get(key);\r\n });\r\n const workObjects: {\r\n [p: string]: any;\r\n } = {};\r\n config.workObjects.keysArray().forEach((key) => {\r\n workObjects[key] = config.workObjects.get(key);\r\n });\r\n\r\n const configForStorage = {\r\n name: config.name,\r\n actors: actors,\r\n workObjects: workObjects,\r\n };\r\n\r\n localStorage.setItem(\r\n DOMAIN_CONFIGURATION_TAG,\r\n JSON.stringify(configForStorage, null, 2)\r\n );\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class CommandStackService {\r\n private commandStack: any;\r\n\r\n constructor() {}\r\n\r\n setCommandStack(commandStack: any): void {\r\n this.commandStack = commandStack;\r\n }\r\n\r\n execute(action: string, payload: any) {\r\n this.commandStack.execute(action, payload);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\r\nimport { ComponentType } from '@angular/cdk/overlay';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class DialogService {\r\n constructor(private matDialog: MatDialog) {}\r\n\r\n openDialog(dialog: ComponentType, config: MatDialogConfig): void {\r\n this.matDialog.open(dialog, config);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class DirtyFlagService {\r\n private isDirtySubject = new BehaviorSubject(false);\r\n dirty$ = this.isDirtySubject.asObservable();\r\n\r\n makeDirty(): void {\r\n this.isDirtySubject.next(true);\r\n }\r\n\r\n makeClean(): void {\r\n this.isDirtySubject.next(false);\r\n }\r\n\r\n get dirty(): boolean {\r\n return this.isDirtySubject.value;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\r\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\r\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\r\nimport { StoryStep } from 'src/app/Domain/Replay/storyStep';\r\nimport {\r\n HIGHLIGHT_COLOR,\r\n HIGHLIGHT_NUMBER_BACKGROUNG_COLOR,\r\n HIGHLIGHT_NUMBER_COLOR,\r\n HIGHLIGHT_STROKE_WIDTH,\r\n NUMBER_BACKGROUND_COLOR,\r\n NUMBER_COLOR,\r\n STROKE_WIDTH,\r\n} from '../../Domain/DomManipulation/replayConstants';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\n/**\r\n * Manipulates the DOM during replay to only show the elements of the current Step\r\n */\r\nexport class DomManipulationService {\r\n constructor(private elementRegistryService: ElementRegistryService) {}\r\n\r\n showAll(): void {\r\n this.removeHighlights();\r\n this.elementRegistryService\r\n .getAllCanvasObjects()\r\n .slice()\r\n .concat(this.elementRegistryService.getAllGroups().slice())\r\n .map((e) => e.businessObject)\r\n .forEach((element) => {\r\n const domObject = document.querySelector(\r\n '[data-element-id=' + element.id + ']'\r\n );\r\n // @ts-ignore\r\n domObject.style.display = 'block';\r\n });\r\n }\r\n\r\n showStep(replayStep: StoryStep, previousStep?: StoryStep): void {\r\n this.removeHighlights();\r\n const notShown = this.getAllNotShown(replayStep.objects);\r\n\r\n notShown.forEach((element) => {\r\n const domObject = document.querySelector(\r\n '[data-element-id=' + element.id + ']'\r\n );\r\n if (domObject) {\r\n // @ts-ignore\r\n domObject.style.display = 'none';\r\n }\r\n });\r\n\r\n this.hightlightStep(\r\n previousStep\r\n ? replayStep.objects.filter((o) => !previousStep.objects.includes(o))\r\n : replayStep.objects\r\n );\r\n\r\n replayStep.objects.forEach((element) => {\r\n const domObject = document.querySelector(\r\n '[data-element-id=' + element.id + ']'\r\n );\r\n if (domObject) {\r\n // @ts-ignore\r\n domObject.style.display = 'block';\r\n }\r\n });\r\n }\r\n\r\n getNumberDomForActivity(activity: SVGPolylineElement): any {\r\n const numberDOMS = activity.parentElement?.getElementsByClassName(\r\n 'djs-labelNumber'\r\n ) || ['', ''];\r\n return {\r\n numberBackgroundDom: numberDOMS[0],\r\n numberTextDom: numberDOMS[1],\r\n };\r\n }\r\n\r\n private removeHighlights(): void {\r\n const allActivities = this.elementRegistryService.getAllActivities();\r\n const allConnections = this.elementRegistryService.getAllConnections();\r\n\r\n allActivities.forEach((activity) => {\r\n const querySelector = document.querySelector(\r\n '[data-element-id=' + activity.id + ']'\r\n );\r\n if (querySelector) {\r\n const activityDomObject =\r\n querySelector.getElementsByTagName('polyline')[0];\r\n\r\n activityDomObject.style.stroke =\r\n activity.businessObject.pickedColor || 'black';\r\n activityDomObject.style.strokeWidth = STROKE_WIDTH;\r\n\r\n const { numberBackgroundDom, numberTextDom } =\r\n this.getNumberDomForActivity(activityDomObject);\r\n if (numberBackgroundDom && numberTextDom) {\r\n numberBackgroundDom.style.fill = NUMBER_BACKGROUND_COLOR;\r\n numberTextDom.style.fill = NUMBER_COLOR;\r\n }\r\n }\r\n });\r\n\r\n allConnections.forEach((connection) => {\r\n // @ts-ignore\r\n const connectionDomObject = document\r\n .querySelector('[data-element-id=' + connection.id + ']')\r\n .getElementsByTagName('polyline')[0];\r\n\r\n connectionDomObject.style.stroke =\r\n connection.businessObject.pickedColor || 'black';\r\n connectionDomObject.style.strokeWidth = '1.5';\r\n });\r\n }\r\n\r\n private hightlightStep(stepObjects: BusinessObject[]): void {\r\n stepObjects\r\n .filter((e) => e.type === elementTypes.ACTIVITY)\r\n .forEach((activity) => {\r\n const querySelector = document.querySelector(\r\n '[data-element-id=' + activity.id + ']'\r\n );\r\n if (querySelector) {\r\n const activityDomObject =\r\n querySelector.getElementsByTagName('polyline')[0];\r\n\r\n activityDomObject.style.stroke = HIGHLIGHT_COLOR;\r\n activityDomObject.style.strokeWidth = HIGHLIGHT_STROKE_WIDTH;\r\n\r\n const { numberBackgroundDom, numberTextDom } =\r\n this.getNumberDomForActivity(activityDomObject);\r\n if (numberTextDom && numberBackgroundDom) {\r\n numberBackgroundDom.style.fill = HIGHLIGHT_NUMBER_BACKGROUNG_COLOR;\r\n numberTextDom.style.fill = HIGHLIGHT_NUMBER_COLOR;\r\n }\r\n }\r\n });\r\n }\r\n\r\n private getAllNotShown(shownElements: BusinessObject[]): BusinessObject[] {\r\n const notShownElements: BusinessObject[] = [];\r\n const allObjects = this.elementRegistryService\r\n .getAllCanvasObjects()\r\n .concat(this.elementRegistryService.getAllGroups());\r\n\r\n allObjects.forEach((element) => {\r\n if (!shownElements.includes(element.businessObject)) {\r\n if (element.type.includes(elementTypes.CONNECTION)) {\r\n // @ts-ignore\r\n if (!element.source.type.includes(elementTypes.GROUP)) {\r\n notShownElements.push(element.businessObject);\r\n } else {\r\n // @ts-ignore\r\n shownElements.push(element.target);\r\n }\r\n } else {\r\n notShownElements.push(element.businessObject);\r\n }\r\n }\r\n });\r\n return notShownElements;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\r\nimport { IconDictionaryService } from 'src/app/Service/DomainConfiguration/icon-dictionary.service';\r\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\r\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\r\nimport {\r\n CustomDomainConfiguration,\r\n DomainConfiguration,\r\n DomainConfigurationForExport,\r\n} from 'src/app/Domain/Common/domainConfiguration';\r\nimport { defaultConf } from '../../Domain/Common/iconConfiguration';\r\nimport { TitleService } from '../Title/title.service';\r\nimport { INITIAL_DOMAIN_NAME } from '../../Domain/Common/constants';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class DomainConfigurationService {\r\n constructor(\r\n private iconDictionaryService: IconDictionaryService,\r\n private elementRegistryService: ElementRegistryService,\r\n private titleService: TitleService\r\n ) {}\r\n\r\n setDomainName(domainName: string): void {\r\n this.titleService.setDomainName(\r\n domainName ? domainName : INITIAL_DOMAIN_NAME\r\n );\r\n }\r\n\r\n exportConfiguration(): void {\r\n const domainConfiguration = this.getCurrentConfigurationForExport();\r\n if (!domainConfiguration) {\r\n return;\r\n }\r\n\r\n const configJSONString = JSON.stringify(domainConfiguration, null, 2);\r\n const filename = this.titleService.getDomainName();\r\n const element = document.createElement('a');\r\n\r\n element.setAttribute(\r\n 'href',\r\n 'data:text/plain;charset=utf-8,' + encodeURIComponent(configJSONString)\r\n );\r\n element.setAttribute('download', filename + '.domain');\r\n element.style.display = 'none';\r\n document.body.appendChild(element);\r\n\r\n element.click();\r\n\r\n document.body.removeChild(element);\r\n }\r\n\r\n loadConfiguration(\r\n customConfig: DomainConfiguration,\r\n updateDomainName = true\r\n ): void {\r\n let actorDict = new Dictionary();\r\n let workObjectDict = new Dictionary();\r\n\r\n if (customConfig.actors.keysArray()) {\r\n actorDict = customConfig.actors;\r\n workObjectDict = customConfig.workObjects;\r\n } else {\r\n actorDict.addEach(customConfig.actors);\r\n workObjectDict.addEach(customConfig.workObjects);\r\n }\r\n\r\n const actorKeys = actorDict.keysArray();\r\n const workObjectKeys = workObjectDict.keysArray();\r\n\r\n this.iconDictionaryService.updateIconRegistries([], [], customConfig);\r\n\r\n this.iconDictionaryService\r\n .getIconConfiguration()\r\n .appendSRCFile(actorKeys, actorDict, workObjectKeys, workObjectDict);\r\n\r\n this.iconDictionaryService.addIconsFromDomainConfiguration(\r\n elementTypes.ACTOR,\r\n actorKeys.map((a) => elementTypes.ACTOR + a)\r\n );\r\n this.iconDictionaryService.addIconsFromDomainConfiguration(\r\n elementTypes.WORKOBJECT,\r\n workObjectKeys.map((w) => elementTypes.WORKOBJECT + w)\r\n );\r\n\r\n if (updateDomainName) {\r\n const configurationName = customConfig.name;\r\n this.setDomainName(configurationName);\r\n }\r\n }\r\n\r\n getCurrentConfiguration(): DomainConfiguration | undefined {\r\n const actors = this.iconDictionaryService.getActorsDictionary();\r\n const workObjects = this.iconDictionaryService.getWorkObjectsDictionary();\r\n\r\n let domainConfiguration;\r\n\r\n if (actors.size() > 0 && workObjects.size() > 0) {\r\n domainConfiguration = this.createConfigFromDictionaries(\r\n actors,\r\n workObjects\r\n );\r\n }\r\n return domainConfiguration;\r\n }\r\n\r\n getCurrentConfigurationForExport(): DomainConfigurationForExport | undefined {\r\n const currentConfiguration = this.getCurrentConfiguration();\r\n\r\n if (currentConfiguration) {\r\n const actors: any = {};\r\n const workObjects: any = {};\r\n\r\n currentConfiguration.actors.all().forEach((entry) => {\r\n actors[entry.key] = entry.value;\r\n });\r\n currentConfiguration.workObjects.all().forEach((entry) => {\r\n workObjects[entry.key] = entry.value;\r\n });\r\n\r\n return {\r\n name: currentConfiguration.name,\r\n actors: actors,\r\n workObjects: workObjects,\r\n };\r\n }\r\n return;\r\n }\r\n\r\n getCurrentConfigurationNamesWithoutPrefix(): CustomDomainConfiguration {\r\n return {\r\n name: this.titleService.getDomainName() || INITIAL_DOMAIN_NAME,\r\n actors: this.iconDictionaryService\r\n .getActorsDictionary()\r\n .keysArray()\r\n .map((a) => a.replace(elementTypes.ACTOR, '')),\r\n workObjects: this.iconDictionaryService\r\n .getWorkObjectsDictionary()\r\n .keysArray()\r\n .map((w) => w.replace(elementTypes.WORKOBJECT, '')),\r\n };\r\n }\r\n\r\n createMinimalConfigurationWithDefaultIcons(): DomainConfiguration {\r\n const minimalConfig = this.createConfigFromCanvas();\r\n\r\n defaultConf.actors.forEach((iconName) => {\r\n minimalConfig.actors.add(\r\n this.iconDictionaryService.getIconSource(iconName),\r\n iconName\r\n );\r\n });\r\n defaultConf.workObjects.forEach((iconName) => {\r\n minimalConfig.workObjects.add(\r\n this.iconDictionaryService.getIconSource(iconName),\r\n iconName\r\n );\r\n });\r\n\r\n return minimalConfig;\r\n }\r\n\r\n private createConfigFromDictionaries(\r\n actorsDict: Dictionary,\r\n workObjectsDict: Dictionary\r\n ): DomainConfiguration {\r\n const actorNames = actorsDict.keysArray();\r\n const workobjectNames = workObjectsDict.keysArray();\r\n const newActors = new Dictionary();\r\n const newWorkobjects = new Dictionary();\r\n\r\n // Fill Configuration from Canvas-Objects\r\n actorNames.forEach((actor) => {\r\n newActors.add(\r\n actorsDict.get(actor),\r\n actor.replace(elementTypes.ACTOR, '')\r\n );\r\n });\r\n workobjectNames.forEach((workObject) => {\r\n newWorkobjects.add(\r\n workObjectsDict.get(workObject),\r\n workObject.replace(elementTypes.WORKOBJECT, '')\r\n );\r\n });\r\n\r\n return {\r\n name: this.titleService.getDomainName(),\r\n actors: newActors,\r\n workObjects: newWorkobjects,\r\n };\r\n }\r\n\r\n private createConfigFromCanvas(): DomainConfiguration {\r\n const config = {\r\n name: INITIAL_DOMAIN_NAME,\r\n actors: new Dictionary(),\r\n workObjects: new Dictionary(),\r\n };\r\n\r\n let allCanvasObjects = this.elementRegistryService.getAllCanvasObjects();\r\n\r\n allCanvasObjects\r\n .map((e) => e.businessObject)\r\n .forEach((element) => {\r\n const type = element.type\r\n .replace(elementTypes.ACTOR, '')\r\n .replace(elementTypes.WORKOBJECT, '');\r\n if (element.type.includes(elementTypes.ACTOR)) {\r\n let src = this.iconDictionaryService.getIconSource(type) || '';\r\n config.actors.add(src, type);\r\n } else if (element.type.includes(elementTypes.WORKOBJECT)) {\r\n let src = this.iconDictionaryService.getIconSource(type) || '';\r\n config.workObjects.add(src, type);\r\n }\r\n });\r\n\r\n return config;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport {\r\n CustomDomainConfiguration,\r\n DomainConfiguration,\r\n} from '../../Domain/Common/domainConfiguration';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { DomainConfigurationService } from './domain-configuration.service';\r\nimport { IconDictionaryService } from './icon-dictionary.service';\r\nimport { getNameFromType } from '../../Utils/naming';\r\nimport { elementTypes } from '../../Domain/Common/elementTypes';\r\nimport { IconListItem } from '../../Domain/Domain-Configuration/iconListItem';\r\nimport { Dictionary } from '../../Domain/Common/dictionary/dictionary';\r\nimport { ImportDomainStoryService } from '../Import/import-domain-story.service';\r\nimport { TitleService } from '../Title/title.service';\r\nimport { MatSnackBar } from '@angular/material/snack-bar';\r\nimport {\r\n SNACKBAR_DURATION,\r\n SNACKBAR_INFO,\r\n SNACKBAR_SUCCESS,\r\n} from '../../Domain/Common/constants';\r\nimport { StorageService } from '../BrowserStorage/storage.service';\r\nimport { UsedIconList } from 'src/app/Domain/Domain-Configuration/UsedIconList';\r\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class DomainCustomizationService {\r\n private readonly domainConfigurationTypes: BehaviorSubject;\r\n\r\n private allIconListItems = new Dictionary();\r\n\r\n private configurationHasChanged = false;\r\n\r\n selectedActors$ = new BehaviorSubject([]);\r\n selectedWorkobjects$ = new BehaviorSubject([]);\r\n private changedDomainCofiguration: DomainConfiguration | undefined;\r\n\r\n constructor(\r\n private configurationService: DomainConfigurationService,\r\n private iconDictionaryService: IconDictionaryService,\r\n private importService: ImportDomainStoryService,\r\n private titleService: TitleService,\r\n private storageService: StorageService,\r\n private elementRegistryService: ElementRegistryService,\r\n private snackbar: MatSnackBar\r\n ) {\r\n this.domainConfigurationTypes = new BehaviorSubject(\r\n this.configurationService.getCurrentConfigurationNamesWithoutPrefix()\r\n );\r\n\r\n this.selectedWorkobjects$.next(\r\n this.domainConfigurationTypes.value.workObjects\r\n );\r\n this.selectedActors$.next(this.domainConfigurationTypes.value.actors);\r\n\r\n iconDictionaryService\r\n .getAllIconDictionary()\r\n .keysArray()\r\n .forEach((iconName) => {\r\n this.addIconToAllIconList(iconName);\r\n });\r\n\r\n importService.importedConfigurationEvent.subscribe((config) => {\r\n this.importConfiguration(config);\r\n });\r\n const storedDomainConfiguration =\r\n this.storageService.getStoredDomainConfiguration();\r\n if (storedDomainConfiguration) {\r\n this.importConfiguration(storedDomainConfiguration, false);\r\n }\r\n const importedConfiguration = this.importService.getImportedConfiguration();\r\n if (importedConfiguration) {\r\n this.importConfiguration(importedConfiguration, false);\r\n }\r\n }\r\n\r\n importConfiguration(\r\n customConfig: DomainConfiguration,\r\n saveDomain = true\r\n ): void {\r\n const actorKeys = customConfig.actors.keysArray();\r\n const workObjectKeys = customConfig.workObjects.keysArray();\r\n\r\n actorKeys.forEach((iconName) => {\r\n if (!this.allIconListItems.has(iconName)) {\r\n this.addIconToAllIconList(iconName);\r\n }\r\n const selectedActorNames = this.selectedActors$.value;\r\n if (!selectedActorNames.includes(iconName)) {\r\n this.selectActor(iconName);\r\n }\r\n });\r\n workObjectKeys.forEach((iconName) => {\r\n if (!this.allIconListItems.has(iconName)) {\r\n this.addIconToAllIconList(iconName);\r\n }\r\n const selectedWorkobjectNames = this.selectedWorkobjects$.value;\r\n if (!selectedWorkobjectNames.includes(iconName)) {\r\n this.selectWorkObject(iconName);\r\n }\r\n });\r\n if (saveDomain) {\r\n this.saveDomain(this.elementRegistryService.getUsedIcons(), true);\r\n }\r\n }\r\n\r\n /** Getter & Setter **/\r\n getDomainConfiguration(): BehaviorSubject {\r\n return this.domainConfigurationTypes;\r\n }\r\n\r\n getIconForName(iconName: string): BehaviorSubject {\r\n return this.allIconListItems.get(iconName);\r\n }\r\n\r\n isIconActor(iconName: string): boolean {\r\n return (\r\n this.domainConfigurationTypes.value.actors.filter(\r\n (actor: string) => actor === iconName\r\n ).length > 0\r\n );\r\n }\r\n\r\n isIconWorkObject(iconName: string): boolean {\r\n return (\r\n this.domainConfigurationTypes.value.workObjects.filter(\r\n (workObject: string) => workObject === iconName\r\n ).length > 0\r\n );\r\n }\r\n\r\n changeName(domainName: string): void {\r\n this.titleService.setDomainName(domainName);\r\n const changedDomain = this.domainConfigurationTypes.value;\r\n changedDomain.name = domainName;\r\n this.domainConfigurationTypes.next(changedDomain);\r\n }\r\n\r\n /** Seleted Icons **/\r\n setAsUnassigned(iconName: string, isActor: boolean): void {\r\n if (isActor) {\r\n this.deselectActor(iconName);\r\n } else {\r\n this.deselectWorkobject(iconName);\r\n }\r\n this.updateIcon(false, false, iconName);\r\n }\r\n\r\n setAsActor(isActor: boolean, actor: string): void {\r\n if (isActor) {\r\n this.updateIcon(true, false, actor);\r\n this.selectActor(actor);\r\n this.deselectWorkobject(actor);\r\n } else {\r\n this.deselectActor(actor);\r\n this.updateIcon(false, false, actor);\r\n }\r\n }\r\n\r\n setAsWorkobject(isWorkobject: boolean, workobject: string): void {\r\n if (isWorkobject) {\r\n this.updateIcon(false, true, workobject);\r\n this.selectWorkObject(workobject);\r\n this.deselectActor(workobject);\r\n } else {\r\n this.deselectWorkobject(workobject);\r\n this.updateIcon(false, false, workobject);\r\n }\r\n }\r\n\r\n selectActor(actor: string): void {\r\n const value = this.domainConfigurationTypes.value;\r\n if (!value.actors.includes(actor)) {\r\n value.actors.push(actor);\r\n this.domainConfigurationTypes.next(value);\r\n this.updateActorSubject();\r\n }\r\n }\r\n\r\n selectWorkObject(workObject: string): void {\r\n const value = this.domainConfigurationTypes.value;\r\n if (!value.workObjects.includes(workObject)) {\r\n value.workObjects.push(workObject);\r\n this.domainConfigurationTypes.next(value);\r\n this.updateWorkObjectSubject();\r\n }\r\n }\r\n\r\n deselectActor(actor: string): void {\r\n if (this.domainConfigurationTypes) {\r\n this.domainConfigurationTypes.next({\r\n name: this.domainConfigurationTypes.value.name,\r\n actors: this.domainConfigurationTypes.value.actors.filter(\r\n (a: string) => !a.includes(actor)\r\n ),\r\n workObjects: this.domainConfigurationTypes.value.workObjects,\r\n });\r\n }\r\n this.updateActorSubject();\r\n }\r\n\r\n deselectWorkobject(workobject: string): void {\r\n if (this.domainConfigurationTypes) {\r\n this.domainConfigurationTypes.next({\r\n name: this.domainConfigurationTypes.value.name,\r\n actors: this.domainConfigurationTypes.value.actors,\r\n workObjects: this.domainConfigurationTypes.value.workObjects.filter(\r\n (w: string) => !w.includes(workobject)\r\n ),\r\n });\r\n }\r\n this.updateWorkObjectSubject();\r\n }\r\n\r\n setSelectedWorkObject(sortedList: string[]): void {\r\n const value = this.domainConfigurationTypes.value;\r\n value.workObjects = sortedList;\r\n this.domainConfigurationTypes.next(value);\r\n this.updateWorkObjectSubject();\r\n }\r\n\r\n setSelectedActors(sortedList: string[]): void {\r\n const value = this.domainConfigurationTypes.value;\r\n value.actors = sortedList;\r\n this.domainConfigurationTypes.next(value);\r\n this.updateActorSubject();\r\n }\r\n\r\n private updateActorSubject(): void {\r\n this.selectedActors$.next(this.domainConfigurationTypes.value.actors);\r\n this.configurationHasChanged = true;\r\n }\r\n\r\n private updateWorkObjectSubject(): void {\r\n this.selectedWorkobjects$.next(\r\n this.domainConfigurationTypes.value.workObjects\r\n );\r\n this.configurationHasChanged = true;\r\n }\r\n\r\n /** Revert Domain **/\r\n resetDomain(): void {\r\n const defaultConfig =\r\n this.configurationService.createMinimalConfigurationWithDefaultIcons();\r\n\r\n this.selectedWorkobjects$.value.forEach((workObjectName) => {\r\n if (!defaultConfig.workObjects.has(workObjectName)) {\r\n this.deselectWorkobject(workObjectName);\r\n }\r\n });\r\n this.selectedActors$.value.forEach((actorName) => {\r\n if (!defaultConfig.actors.has(actorName)) {\r\n this.deselectActor(actorName);\r\n }\r\n });\r\n\r\n this.domainConfigurationTypes.next({\r\n name: defaultConfig.name,\r\n actors: defaultConfig.actors.keysArray(),\r\n workObjects: defaultConfig.workObjects.keysArray(),\r\n } as CustomDomainConfiguration);\r\n\r\n this.updateAllIconBehaviourSubjects();\r\n }\r\n\r\n cancel(): void {\r\n this.domainConfigurationTypes.next(\r\n this.configurationService.getCurrentConfigurationNamesWithoutPrefix()\r\n );\r\n this.updateAllIconBehaviourSubjects();\r\n this.resetToInitialConfiguration();\r\n }\r\n\r\n private resetToInitialConfiguration(): void {\r\n this.updateActorSubject();\r\n this.updateWorkObjectSubject();\r\n }\r\n\r\n /** Persist Domain **/\r\n saveDomain(usedIcons: UsedIconList, imported = false): void {\r\n const changedActors: string[] = [];\r\n const changedWorkobjects: string[] = [];\r\n if (this.configurationHasChanged) {\r\n const changedDomain = this.createDomainConfiguration();\r\n\r\n const configurationActors = changedDomain.actors.keysArray();\r\n usedIcons?.actors.forEach((actor) => {\r\n if (\r\n !configurationActors?.includes(actor) &&\r\n !changedActors.includes(actor)\r\n ) {\r\n changedActors.push(actor);\r\n }\r\n });\r\n const configurationWorkobjects = changedDomain.workObjects.keysArray();\r\n usedIcons?.workobjects.forEach((workobject) => {\r\n if (\r\n !configurationWorkobjects?.includes(workobject) &&\r\n !changedWorkobjects.includes(workobject)\r\n ) {\r\n changedWorkobjects.push(workobject);\r\n }\r\n });\r\n\r\n if (!changedActors.length && !changedWorkobjects.length) {\r\n this.changedDomainCofiguration = changedDomain;\r\n\r\n this.updateIcons(changedDomain);\r\n\r\n this.storageService.setStoredDomainConfiguration(\r\n this.changedDomainCofiguration\r\n );\r\n this.snackbar.open(\r\n imported\r\n ? 'Configuration imported successfully'\r\n : 'Configuration saved sucessfully',\r\n undefined,\r\n {\r\n duration: SNACKBAR_DURATION,\r\n panelClass: SNACKBAR_SUCCESS,\r\n }\r\n );\r\n }\r\n } else {\r\n this.snackbar.open(\r\n imported\r\n ? 'No configuration to be imported'\r\n : 'No configuration to be saved',\r\n undefined,\r\n {\r\n duration: SNACKBAR_DURATION,\r\n panelClass: SNACKBAR_INFO,\r\n }\r\n );\r\n }\r\n if (changedActors.length || changedWorkobjects.length) {\r\n if (changedActors.length) {\r\n const actors = changedActors.join(', ');\r\n this.snackbar.open(\r\n `The following icons are already in use as actors and cannot be changed: ${actors}`,\r\n undefined,\r\n {\r\n duration: SNACKBAR_DURATION * 3,\r\n panelClass: SNACKBAR_INFO,\r\n }\r\n );\r\n }\r\n if (changedWorkobjects.length) {\r\n const workobjects = changedWorkobjects.join(', ');\r\n this.snackbar.open(\r\n `The following icons are already in use as workobjects and cannot be changed: ${workobjects}`,\r\n undefined,\r\n {\r\n duration: SNACKBAR_DURATION * 3,\r\n panelClass: SNACKBAR_INFO,\r\n }\r\n );\r\n }\r\n }\r\n }\r\n\r\n exportDomain(): void {\r\n this.configurationService.exportConfiguration();\r\n }\r\n\r\n getAndClearSavedConfiguration(): DomainConfiguration | undefined {\r\n const temp = this.changedDomainCofiguration;\r\n this.changedDomainCofiguration = undefined;\r\n\r\n return temp;\r\n }\r\n\r\n private createDomainConfiguration(): DomainConfiguration {\r\n const actors = new Dictionary();\r\n const workObjects = new Dictionary();\r\n\r\n this.domainConfigurationTypes.value.actors.forEach((type: string) => {\r\n actors.add(this.iconDictionaryService.getIconSource(type), type);\r\n });\r\n this.domainConfigurationTypes.value.workObjects.forEach((type: string) => {\r\n workObjects.add(this.iconDictionaryService.getIconSource(type), type);\r\n });\r\n\r\n return {\r\n name: this.domainConfigurationTypes.value.name || '',\r\n actors,\r\n workObjects,\r\n };\r\n }\r\n\r\n /** Update Icons **/\r\n addNewIcon(iconName: string): void {\r\n const iconDict = new Dictionary();\r\n iconDict.add(this.getSrcForIcon(iconName), iconName);\r\n this.iconDictionaryService.addIconsToCss(iconDict);\r\n this.addIconToAllIconList(iconName);\r\n }\r\n\r\n private addIconToAllIconList(iconName: string): void {\r\n this.allIconListItems.add(\r\n new BehaviorSubject({\r\n name: iconName,\r\n svg: this.getSrcForIcon(iconName),\r\n isActor: this.isIconActor(iconName),\r\n isWorkObject: this.isIconWorkObject(iconName),\r\n }),\r\n iconName\r\n );\r\n }\r\n\r\n private updateIcon(\r\n isActor: boolean,\r\n isWorkobject: boolean,\r\n iconName: string\r\n ) {\r\n const iconBehaviourSubject = this.getIconForName(iconName);\r\n const icon = iconBehaviourSubject.value;\r\n icon.isActor = isActor;\r\n icon.isWorkObject = isWorkobject;\r\n\r\n iconBehaviourSubject.next(icon);\r\n }\r\n\r\n private updateAllIconBehaviourSubjects(): void {\r\n const customDomainCofiguration = this.domainConfigurationTypes.value;\r\n this.allIconListItems.keysArray().forEach((iconName) => {\r\n if (customDomainCofiguration.actors.includes(iconName)) {\r\n this.updateIcon(true, false, iconName);\r\n } else if (customDomainCofiguration.workObjects.includes(iconName)) {\r\n this.updateIcon(false, true, iconName);\r\n } else {\r\n this.updateIcon(false, false, iconName);\r\n }\r\n });\r\n }\r\n\r\n private getSrcForIcon(name: string): string {\r\n let iconName: string;\r\n if (name.includes(elementTypes.DOMAINSTORY)) {\r\n iconName = getNameFromType(name);\r\n } else {\r\n iconName = name;\r\n }\r\n const rawSrc = this.iconDictionaryService.getIconSource(iconName);\r\n\r\n if (!rawSrc) {\r\n return '';\r\n }\r\n\r\n if (rawSrc.startsWith('data')) {\r\n return rawSrc;\r\n } else {\r\n return 'data:image/svg+xml,' + rawSrc;\r\n }\r\n }\r\n\r\n private updateIcons(changedDomain: DomainConfiguration) {\r\n this.allIconListItems\r\n .keysArray()\r\n .forEach((item) => this.setAsUnassigned(item, this.isIconActor(item)));\r\n changedDomain.actors\r\n .keysArray()\r\n .forEach((actor) => this.setAsActor(true, actor));\r\n changedDomain.workObjects\r\n .keysArray()\r\n .forEach((workObject) => this.setAsWorkobject(true, workObject));\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\r\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\r\nimport { getNameFromType } from 'src/app/Utils/naming';\r\nimport {\r\n allIcons,\r\n appendedIcons,\r\n} from 'src/app/Domain/Domain-Configuration/allIcons';\r\nimport {\r\n defaultConf,\r\n IconConfiguration,\r\n} from 'src/app/Domain/Common/iconConfiguration';\r\nimport { Configuration } from 'src/app/Domain/Common/configuration';\r\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\r\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\r\nimport { sanitizeIconName } from '../../Utils/sanitizer';\r\n\r\nexport const ICON_PREFIX = 'icon-domain-story-';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class IconDictionaryService {\r\n private actorIconDictionary = new Dictionary();\r\n private workObjectDictionary = new Dictionary();\r\n\r\n private allIconDictionary = new Dictionary();\r\n private iconDictionaryForBPMN = new Dictionary();\r\n\r\n private customConfiguration?: DomainConfiguration;\r\n\r\n private readonly iconConfig: IconConfiguration;\r\n\r\n constructor() {\r\n this.allIconDictionary.addEach(allIcons);\r\n this.iconConfig = new IconConfiguration(this.allIconDictionary);\r\n }\r\n\r\n initTypeDictionaries(actors: string[], workObjects: string[]): void {\r\n if (!actors || actors.length == 0) {\r\n actors = defaultConf.actors;\r\n }\r\n if (!workObjects || workObjects.length == 0) {\r\n workObjects = defaultConf.workObjects;\r\n }\r\n\r\n const allTypes = new Dictionary();\r\n allTypes.addEach(allIcons);\r\n allTypes.appendDict(this.getAppendedIconDictionary());\r\n\r\n this.initDictionary(\r\n actors,\r\n allTypes,\r\n this.actorIconDictionary,\r\n elementTypes.ACTOR\r\n );\r\n this.initDictionary(\r\n workObjects,\r\n allTypes,\r\n this.workObjectDictionary,\r\n elementTypes.WORKOBJECT\r\n );\r\n }\r\n\r\n private initDictionary(\r\n keys: string[],\r\n allTypes: Dictionary,\r\n dictionary: Dictionary,\r\n namePrefix: elementTypes\r\n ) {\r\n dictionary.clear();\r\n for (const key of keys) {\r\n const name = namePrefix + key;\r\n dictionary.add(allTypes.get(key), name);\r\n }\r\n\r\n dictionary.keysArray().forEach((entry) => {\r\n const name = getNameFromType(entry);\r\n this.registerIconForBPMN(\r\n entry,\r\n ICON_PREFIX + sanitizeIconName(name.toLowerCase())\r\n );\r\n });\r\n }\r\n\r\n getCurrentIconConfigurationForBPMN(): Configuration {\r\n if (this.customConfiguration) {\r\n return this.iconConfig.createCustomConf(this.customConfiguration);\r\n }\r\n return this.iconConfig.getDefaultConf();\r\n }\r\n\r\n allInTypeDictionary(type: elementTypes, elements: BusinessObject[]): boolean {\r\n let collection: Dictionary;\r\n if (type === elementTypes.ACTOR) {\r\n collection = this.actorIconDictionary;\r\n } else if (type === elementTypes.WORKOBJECT) {\r\n collection = this.workObjectDictionary;\r\n }\r\n\r\n let allIn = true;\r\n if (elements) {\r\n elements.forEach((element) => {\r\n if (!collection.has(element.type)) {\r\n allIn = false;\r\n }\r\n });\r\n } else {\r\n return false;\r\n }\r\n return allIn;\r\n }\r\n\r\n /** Load Icons from Configuration **/\r\n\r\n addIconsFromDomainConfiguration(\r\n dictionaryType: elementTypes,\r\n iconTypes: string[]\r\n ): void {\r\n let collection: Dictionary;\r\n if (dictionaryType === elementTypes.ACTOR) {\r\n collection = this.actorIconDictionary;\r\n } else if (dictionaryType === elementTypes.WORKOBJECT) {\r\n collection = this.workObjectDictionary;\r\n }\r\n\r\n const allTypes = new Dictionary();\r\n allTypes.addEach(allIcons);\r\n allTypes.appendDict(appendedIcons);\r\n\r\n iconTypes.forEach((type) => {\r\n if (!collection.has(type)) {\r\n const name = getNameFromType(type);\r\n const src = allTypes.get(name);\r\n if (src) {\r\n this.registerIconForType(dictionaryType, type, src);\r\n this.registerIconForBPMN(\r\n type,\r\n sanitizeIconName(ICON_PREFIX + name.toLowerCase())\r\n );\r\n }\r\n }\r\n });\r\n }\r\n\r\n /** Add Icon(s) to Dictionary **/\r\n registerIconForBPMN(name: string, src: string): void {\r\n this.iconDictionaryForBPMN.set(name, src);\r\n }\r\n\r\n addIconsToTypeDictionary(\r\n actorIcons: BusinessObject[],\r\n workObjectIcons: BusinessObject[]\r\n ) {\r\n if (!this.allInTypeDictionary(elementTypes.ACTOR, actorIcons)) {\r\n this.addIconsFromDomainConfiguration(\r\n elementTypes.ACTOR,\r\n actorIcons.map((element) => element.type)\r\n );\r\n }\r\n if (!this.allInTypeDictionary(elementTypes.WORKOBJECT, workObjectIcons)) {\r\n this.addIconsFromDomainConfiguration(\r\n elementTypes.WORKOBJECT,\r\n workObjectIcons.map((element) => element.type)\r\n );\r\n }\r\n }\r\n\r\n registerIconForType(type: elementTypes, name: string, src: string): void {\r\n if (!name.includes(type)) {\r\n name = type + name;\r\n }\r\n\r\n let collection = new Dictionary();\r\n if (type === elementTypes.ACTOR) {\r\n collection = this.actorIconDictionary;\r\n } else if (type === elementTypes.WORKOBJECT) {\r\n collection = this.workObjectDictionary;\r\n }\r\n collection.set(name, src);\r\n }\r\n\r\n updateIconRegistries(\r\n actors: BusinessObject[],\r\n workObjects: BusinessObject[],\r\n config: DomainConfiguration\r\n ): void {\r\n const elements: BusinessObject[] = [];\r\n\r\n actors.forEach((a) => elements.push(a));\r\n workObjects.forEach((w) => elements.push(w));\r\n\r\n const customIcons = new Dictionary();\r\n\r\n const actorsDict = new Dictionary();\r\n const workObjectsDict = new Dictionary();\r\n config.actors.keysArray().forEach((key) => {\r\n actorsDict.add(config.actors.get(key), key);\r\n });\r\n config.workObjects.keysArray().forEach((key) => {\r\n workObjectsDict.add(config.workObjects.get(key), key);\r\n });\r\n\r\n this.extractCustomIconsFromDictionary(actorsDict, customIcons);\r\n this.extractCustomIconsFromDictionary(workObjectsDict, customIcons);\r\n\r\n elements.forEach((element) => {\r\n const name = sanitizeIconName(\r\n element.type\r\n .replace(elementTypes.ACTOR, '')\r\n .replace(elementTypes.WORKOBJECT, '')\r\n );\r\n if (\r\n (element.type.includes(elementTypes.ACTOR) ||\r\n element.type.includes(elementTypes.WORKOBJECT)) &&\r\n !this.getFullDictionary().has(name)\r\n ) {\r\n this.registerIconForBPMN(\r\n ICON_PREFIX + name.toLowerCase(),\r\n element.type\r\n );\r\n }\r\n });\r\n\r\n this.addNewIconsToDictionary(customIcons);\r\n this.addIconsToTypeDictionary(actors, workObjects);\r\n }\r\n\r\n private extractCustomIconsFromDictionary(\r\n elementDictionary: Dictionary,\r\n customIcons: Dictionary\r\n ) {\r\n elementDictionary.keysArray().forEach((name) => {\r\n const sanitizedName = sanitizeIconName(name);\r\n if (!this.getFullDictionary().has(sanitizedName)) {\r\n customIcons.add(elementDictionary.get(name), sanitizedName);\r\n }\r\n });\r\n }\r\n\r\n /** Add new Icon(s) **/\r\n\r\n addNewIconsToDictionary(customIcons: Dictionary) {\r\n customIcons.keysArray().forEach((key) => {\r\n const custom = customIcons.get(key);\r\n this.addIMGToIconDictionary(custom.src, key);\r\n });\r\n this.addIconsToCss(customIcons);\r\n }\r\n\r\n addIMGToIconDictionary(input: string, name: string): void {\r\n appendedIcons.set(name, input);\r\n }\r\n\r\n addIconsToCss(customIcons: Dictionary) {\r\n const sheetEl = document.getElementById('iconsCss');\r\n customIcons.keysArray().forEach((key) => {\r\n const src = customIcons.get(key);\r\n const iconStyle =\r\n '.' +\r\n ICON_PREFIX +\r\n sanitizeIconName(key.toLowerCase()) +\r\n '::before{ content: url(\"data:image/svg+xml;utf8,' +\r\n this.wrapSRCInSVG(src) +\r\n '\"); margin: 3px;}';\r\n // @ts-ignore\r\n sheetEl?.sheet?.insertRule(iconStyle, sheetEl.sheet.cssRules.length);\r\n });\r\n }\r\n\r\n private wrapSRCInSVG(src: string): string {\r\n return (\r\n \"\"\r\n );\r\n }\r\n\r\n /** Getter & Setter **/\r\n\r\n getFullDictionary(): Dictionary {\r\n const fullDictionary = new Dictionary();\r\n fullDictionary.appendDict(this.allIconDictionary);\r\n fullDictionary.appendDict(this.getAppendedIconDictionary());\r\n return fullDictionary;\r\n }\r\n\r\n getAppendedIconDictionary(): Dictionary {\r\n const appendedDict = new Dictionary();\r\n appendedIcons.keysArray().forEach((key) => {\r\n if (!this.allIconDictionary.has(key)) {\r\n appendedDict.set(key, appendedIcons.get(key));\r\n }\r\n });\r\n return appendedDict;\r\n }\r\n\r\n getTypeDictionary(type: elementTypes): Dictionary {\r\n if (type === elementTypes.ACTOR) {\r\n return this.actorIconDictionary;\r\n } else if (type === elementTypes.WORKOBJECT) {\r\n return this.workObjectDictionary;\r\n }\r\n return new Dictionary();\r\n }\r\n\r\n getTypeDictionaryKeys(type: elementTypes): string[] {\r\n return this.getTypeDictionary(type).keysArray();\r\n }\r\n\r\n getTypeIconSRC(type: elementTypes, name: string): string | null {\r\n if (type === elementTypes.ACTOR) {\r\n if (!name.startsWith(elementTypes.ACTOR)) {\r\n name = elementTypes.ACTOR + name;\r\n }\r\n return this.actorIconDictionary.get(name);\r\n } else if (type === elementTypes.WORKOBJECT) {\r\n if (!name.startsWith(elementTypes.WORKOBJECT)) {\r\n name = elementTypes.WORKOBJECT + name;\r\n }\r\n return this.workObjectDictionary.get(name);\r\n }\r\n return null;\r\n }\r\n\r\n getIconForBPMN(type: elementTypes): string | null {\r\n return this.iconDictionaryForBPMN.get(type);\r\n }\r\n\r\n getIconSource(name: string): string | null {\r\n if (this.allIconDictionary.has(name)) {\r\n return this.allIconDictionary.get(name);\r\n } else if (appendedIcons.has(name)) {\r\n return appendedIcons.get(name);\r\n }\r\n return null;\r\n }\r\n\r\n getElementsOfType(\r\n elements: BusinessObject[],\r\n type: elementTypes\r\n ): BusinessObject[] {\r\n const elementOfType: any = [];\r\n elements.forEach((element) => {\r\n if (element.type.includes(type)) {\r\n elementOfType.push(element);\r\n }\r\n });\r\n return elementOfType;\r\n }\r\n\r\n getAllIconDictionary(): Dictionary {\r\n return this.allIconDictionary;\r\n }\r\n\r\n getActorsDictionary(): Dictionary {\r\n return this.actorIconDictionary;\r\n }\r\n\r\n getWorkObjectsDictionary(): Dictionary {\r\n return this.workObjectDictionary;\r\n }\r\n\r\n getIconConfiguration(): IconConfiguration {\r\n return this.iconConfig;\r\n }\r\n\r\n setCusomtConfiguration(customConfiguration: DomainConfiguration): void {\r\n this.customConfiguration = customConfiguration;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\r\nimport { CanvasObject } from 'src/app/Domain/Common/canvasObject';\r\nimport { GroupCanvasObject } from '../../Domain/Common/groupCanvasObject';\r\nimport { ActivityCanvasObject } from '../../Domain/Common/activityCanvasObject';\r\nimport { UsedIconList } from 'src/app/Domain/Domain-Configuration/UsedIconList';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ElementRegistryService {\r\n private registry: any;\r\n private fullyInitialized = false;\r\n\r\n /**\r\n * Initially the registry has only the root-Element.\r\n * Once the canvas has bees initialized, we adjust the reference to point to the elements on the canvas for convenience\r\n */\r\n correctInitialize(): void {\r\n if (!this.fullyInitialized) {\r\n if (this.registry.__implicitroot) {\r\n this.registry = this.registry.__implicitroot.element.children;\r\n this.fullyInitialized = true;\r\n }\r\n }\r\n }\r\n\r\n setElementRegistry(registry: any): void {\r\n this.registry = registry._elements;\r\n }\r\n\r\n clear(): void {\r\n this.registry = null;\r\n this.fullyInitialized = false;\r\n }\r\n\r\n createObjectListForDSTDownload(): CanvasObject[] {\r\n if (this.registry) {\r\n const allObjectsFromCanvas = this.getAllCanvasObjects();\r\n const groups = this.getAllGroups();\r\n\r\n const objectList: CanvasObject[] = [];\r\n\r\n this.fillListOfCanvasObjects(allObjectsFromCanvas, objectList, groups);\r\n\r\n return objectList;\r\n }\r\n return [];\r\n }\r\n\r\n private fillListOfCanvasObjects(\r\n allObjectsFromCanvas: CanvasObject[],\r\n objectList: CanvasObject[],\r\n groups: GroupCanvasObject[]\r\n ): void {\r\n allObjectsFromCanvas.forEach((canvasElement) => {\r\n if (canvasElement.type === elementTypes.ACTIVITY) {\r\n objectList.push(canvasElement);\r\n }\r\n\r\n // ensure that Activities are always after Actors, Workobjects and Groups in .dst files\r\n else {\r\n if (canvasElement.type === elementTypes.TEXTANNOTATION) {\r\n canvasElement.businessObject.width = canvasElement.width;\r\n canvasElement.businessObject.height = canvasElement.height;\r\n }\r\n if (!objectList.includes(canvasElement)) {\r\n objectList.unshift(canvasElement);\r\n }\r\n }\r\n });\r\n\r\n groups.forEach((group) => {\r\n objectList.push(group);\r\n });\r\n }\r\n\r\n getAllActivities(): ActivityCanvasObject[] {\r\n const activities: ActivityCanvasObject[] = [];\r\n\r\n this.getAllCanvasObjects().forEach((element) => {\r\n if (element.type.includes(elementTypes.ACTIVITY)) {\r\n activities.push(element as ActivityCanvasObject);\r\n }\r\n });\r\n return activities;\r\n }\r\n\r\n getAllConnections(): ActivityCanvasObject[] {\r\n const connections: ActivityCanvasObject[] = [];\r\n this.getAllCanvasObjects().forEach((element) => {\r\n const type = element.type;\r\n if (type === elementTypes.CONNECTION) {\r\n connections.push(element as ActivityCanvasObject);\r\n }\r\n });\r\n return connections;\r\n }\r\n\r\n getAllCanvasObjects(): CanvasObject[] {\r\n const allObjects: CanvasObject[] = [];\r\n const groupObjects: GroupCanvasObject[] = [];\r\n\r\n this.checkChildForGroup(groupObjects, allObjects);\r\n\r\n // for each memorized group, remove it from the group-array and check its children, whether they are groups or not\r\n // if a child is a group, memorize it in the group-array\r\n // other children should already be in the allObjects list\r\n let i = groupObjects.length - 1;\r\n while (groupObjects.length >= 1) {\r\n const currentGroup = groupObjects.pop();\r\n // @ts-ignore\r\n currentGroup.children.forEach((child: CanvasObject) => {\r\n const type = child.type;\r\n if (type.includes(elementTypes.GROUP)) {\r\n groupObjects.push(child as GroupCanvasObject);\r\n }\r\n });\r\n i = groupObjects.length - 1;\r\n }\r\n return allObjects;\r\n }\r\n\r\n // returns all groups on the canvas and inside other groups\r\n getAllGroups(): GroupCanvasObject[] {\r\n const groupObjects: GroupCanvasObject[] = [];\r\n const allObjects: CanvasObject[] = [];\r\n\r\n this.checkChildForGroup(groupObjects, allObjects);\r\n\r\n for (const group of groupObjects) {\r\n group.children?.forEach((child: CanvasObject) => {\r\n if (child.type.includes(elementTypes.GROUP)) {\r\n groupObjects.push(child as GroupCanvasObject);\r\n }\r\n });\r\n }\r\n return groupObjects;\r\n }\r\n\r\n private checkChildForGroup(\r\n groupObjects: GroupCanvasObject[],\r\n allObjects: CanvasObject[]\r\n ): void {\r\n const registryElementNames = Object.keys(this.registry);\r\n for (let name of registryElementNames) {\r\n const entry = this.registry[name].element;\r\n if (entry.businessObject) {\r\n const type = entry.type;\r\n if (type && type.includes(elementTypes.GROUP)) {\r\n // if it is a group, memorize this for later\r\n groupObjects.push(entry);\r\n } else if (type) {\r\n allObjects.push(entry);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // get a list of activities, that originate from an actor-type\r\n getActivitiesFromActors(): ActivityCanvasObject[] {\r\n const activitiesFromActors: ActivityCanvasObject[] = [];\r\n const activities = this.getAllActivities();\r\n\r\n activities.forEach((activity: ActivityCanvasObject) => {\r\n if (activity.source?.type.includes(elementTypes.ACTOR)) {\r\n activitiesFromActors.push(activity);\r\n }\r\n });\r\n return activitiesFromActors;\r\n }\r\n\r\n getUsedIcons(): UsedIconList {\r\n const actors = this.getAllActors();\r\n const workobjects = this.getAllWorkobjects();\r\n\r\n return {\r\n actors: actors.map((a) => a.type.replace(elementTypes.ACTOR, '')),\r\n workobjects: workobjects.map((w) =>\r\n w.type.replace(elementTypes.WORKOBJECT, '')\r\n ),\r\n };\r\n }\r\n\r\n private getAllActors() {\r\n return this.getAllCanvasObjects().filter((co) =>\r\n co.type.includes(elementTypes.ACTOR)\r\n );\r\n }\r\n\r\n private getAllWorkobjects() {\r\n return this.getAllCanvasObjects().filter((co) =>\r\n co.type.includes(elementTypes.WORKOBJECT)\r\n );\r\n }\r\n}\r\n","import { Injectable, OnDestroy } from '@angular/core';\r\nimport { DomainConfigurationService } from 'src/app/Service/DomainConfiguration/domain-configuration.service';\r\nimport { sanitizeForDesktop } from 'src/app/Utils/sanitizer';\r\nimport { TitleService } from 'src/app/Service/Title/title.service';\r\nimport { ConfigAndDST } from 'src/app/Domain/Export/configAndDst';\r\nimport { DirtyFlagService } from 'src/app/Service/DirtyFlag/dirty-flag.service';\r\nimport { PngService } from 'src/app/Service/Export/png.service';\r\nimport { SvgService } from 'src/app/Service/Export/svg.service';\r\nimport { Subscription } from 'rxjs';\r\nimport { RendererService } from '../Renderer/renderer.service';\r\nimport { HtmlPresentationService } from './html-presentation.service';\r\nimport { VERSION } from '../../Domain/Common/constants';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ExportService implements OnDestroy {\r\n titleSubscription: Subscription;\r\n descriptionSubscription: Subscription;\r\n\r\n title = '';\r\n description = '';\r\n\r\n constructor(\r\n private configurationService: DomainConfigurationService,\r\n private titleService: TitleService,\r\n private dirtyFlagService: DirtyFlagService,\r\n private pngService: PngService,\r\n private svgService: SvgService,\r\n private htmlPresentationService: HtmlPresentationService,\r\n private rendererService: RendererService\r\n ) {\r\n this.titleSubscription = this.titleService.title$.subscribe(\r\n (title: string) => {\r\n this.title = title;\r\n }\r\n );\r\n this.descriptionSubscription = this.titleService.description$.subscribe(\r\n (description: string) => {\r\n this.description = description;\r\n }\r\n );\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.titleSubscription.unsubscribe();\r\n this.descriptionSubscription.unsubscribe();\r\n }\r\n\r\n isDomainStoryExportable(): boolean {\r\n return this.rendererService.getStory().length >= 1;\r\n }\r\n\r\n createConfigAndDST(DomainStory: any): ConfigAndDST {\r\n return new ConfigAndDST(\r\n this.configurationService.getCurrentConfigurationForExport(),\r\n DomainStory\r\n );\r\n }\r\n\r\n downloadDST(): void {\r\n const dst = this.getStoryForDownload();\r\n const configAndDST = this.createConfigAndDST(dst);\r\n const json = JSON.stringify(configAndDST, null, 2);\r\n\r\n const filename = sanitizeForDesktop(\r\n this.title + '_' + new Date().toString().slice(0, 10)\r\n );\r\n\r\n this.downloadFile(\r\n json,\r\n 'data:text/plain;charset=utf-8,',\r\n filename,\r\n '.egn',\r\n true\r\n );\r\n }\r\n\r\n private downloadFile(\r\n data: string,\r\n datatype: string,\r\n filename: string,\r\n fileEnding: string,\r\n makeClean: boolean\r\n ) {\r\n const element = document.createElement('a');\r\n element.setAttribute('href', datatype + encodeURIComponent(data));\r\n element.setAttribute('download', filename + fileEnding);\r\n\r\n element.style.display = 'none';\r\n document.body.appendChild(element);\r\n\r\n element.click();\r\n\r\n if (makeClean) {\r\n this.dirtyFlagService.makeClean();\r\n }\r\n\r\n document.body.removeChild(element);\r\n }\r\n\r\n downloadSVG(withTitle: boolean, useWhiteBackground: boolean): void {\r\n const story = this.getStoryForDownload();\r\n const dst = this.createConfigAndDST(story);\r\n\r\n const svgData = this.svgService.createSVGData(\r\n this.title,\r\n this.description,\r\n dst,\r\n withTitle,\r\n useWhiteBackground\r\n );\r\n\r\n this.downloadFile(\r\n svgData,\r\n 'data:application/bpmn20-xml;charset=UTF-8,',\r\n sanitizeForDesktop(this.title),\r\n '.egn.svg',\r\n true\r\n );\r\n }\r\n\r\n downloadPNG(withTitle: boolean): void {\r\n const canvas = document.getElementById('canvas');\r\n if (canvas) {\r\n const container = canvas.getElementsByClassName('djs-container');\r\n const svgElements = container[0].getElementsByTagName('svg');\r\n const outerSVGElement = svgElements[0];\r\n const viewport = outerSVGElement.getElementsByClassName('viewport')[0];\r\n const layerBase = viewport.getElementsByClassName('layer-base')[0];\r\n\r\n const image = document.createElement('img');\r\n\r\n // removes unwanted black dots in image\r\n let svg = this.pngService.extractSVG(viewport, outerSVGElement);\r\n\r\n svg = this.pngService.prepareSVG(\r\n svg,\r\n layerBase,\r\n this.description,\r\n this.title,\r\n withTitle\r\n );\r\n\r\n image.onload = () => {\r\n const tempCanvas = document.createElement('canvas');\r\n\r\n // add a 10px buffer to the right and lower boundary\r\n tempCanvas.width = this.pngService.getWidth() + 10;\r\n tempCanvas.height = this.pngService.getHeight() + 10;\r\n\r\n const ctx = tempCanvas.getContext('2d');\r\n if (ctx) {\r\n // fill with white background\r\n ctx.rect(0, 0, tempCanvas.width, tempCanvas.height);\r\n ctx.fillStyle = 'white';\r\n ctx.fill();\r\n\r\n ctx.drawImage(image, 0, 0);\r\n }\r\n\r\n const png64 = tempCanvas.toDataURL('image/png');\r\n const ele = document.createElement('a');\r\n ele.setAttribute(\r\n 'download',\r\n sanitizeForDesktop(this.title) +\r\n '_' +\r\n new Date().toISOString().slice(0, 10) +\r\n '.png'\r\n );\r\n ele.setAttribute('href', png64);\r\n document.body.appendChild(ele);\r\n ele.click();\r\n document.body.removeChild(ele);\r\n\r\n // image source has to be removed to circumvent browser caching\r\n image.src = '';\r\n };\r\n image.onchange = image.onload;\r\n\r\n image.width = this.pngService.getWidth();\r\n image.height = this.pngService.getHeight();\r\n\r\n image.src = 'data:image/svg+xml,' + svg;\r\n }\r\n }\r\n\r\n downloadHTMLPresentation(): void {\r\n const filename = sanitizeForDesktop(\r\n this.title + '_' + new Date().toString().slice(0, 10)\r\n );\r\n this.htmlPresentationService.downloadHTMLPresentation(filename).then();\r\n }\r\n\r\n private getStoryForDownload(): unknown[] {\r\n const story = this.rendererService.getStory() as unknown[];\r\n story.push({ info: this.titleService.getDescription() });\r\n story.push({ version: VERSION });\r\n return story;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { sanitizeForDesktop } from '../../Utils/sanitizer';\r\nimport { ReplayService } from '../Replay/replay.service';\r\n// @ts-ignore\r\nimport doT from 'dot';\r\nimport { TitleService } from '../Title/title.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\n/**\r\n * Initial idea and PR from https://github.com/indika-dev\r\n */\r\nexport class HtmlPresentationService {\r\n constructor(\r\n private replayService: ReplayService,\r\n private titleService: TitleService\r\n ) {}\r\n\r\n private multiplexSecret: any;\r\n private multiplexId: any;\r\n\r\n private modeler: any;\r\n\r\n setModelerClasses(canvas: any, selection: any, modeler: any): void {\r\n this.modeler = modeler;\r\n }\r\n\r\n private static viewBoxCoordinates(svg: any): any {\r\n const ViewBoxCoordinate =\r\n /width=\"([^\"]+)\"\\s+height=\"([^\"]+)\"\\s+viewBox=\"([^\"]+)\"/;\r\n const match = svg.match(ViewBoxCoordinate);\r\n return match[3];\r\n }\r\n\r\n /*\r\n ---------------------------\r\n SVG handling starts here\r\n ----------------------------\r\n */\r\n\r\n async downloadHTMLPresentation(filename: string): Promise {\r\n const svgData = [];\r\n // export all sentences of domain story\r\n this.replayService.startReplay();\r\n try {\r\n const result = await this.modeler.saveSVG({});\r\n this.fixActivityMarkersForEachStep(\r\n result,\r\n this.replayService.getCurrentStepNumber()\r\n );\r\n svgData.push({\r\n content: HtmlPresentationService.createSVGData(result.svg),\r\n transition: 'slide',\r\n });\r\n } catch (err) {\r\n alert('There was an error exporting the SVG.\\n' + err);\r\n }\r\n while (\r\n this.replayService.getCurrentStepNumber() <\r\n this.replayService.getMaxStepNumber()\r\n ) {\r\n this.replayService.nextStep();\r\n try {\r\n const result = await this.modeler.saveSVG({});\r\n this.fixActivityMarkersForEachStep(\r\n result,\r\n this.replayService.getCurrentStepNumber()\r\n );\r\n svgData.push({\r\n content: HtmlPresentationService.createSVGData(result.svg),\r\n transition: 'slide',\r\n });\r\n } catch (err) {\r\n alert('There was an error exporting the SVG.\\n' + err);\r\n }\r\n }\r\n this.replayService.stopReplay();\r\n\r\n // create download for presentation\r\n const revealjsTemplate = document.getElementById('revealjs-template');\r\n const dots = doT.template(revealjsTemplate?.innerHTML);\r\n const revealjsData = {\r\n script: 'script',\r\n title: this.titleService.getTitle(),\r\n description: this.titleService.getDescription(),\r\n sentences: svgData,\r\n multiplexSecret: this.multiplexSecret,\r\n multiplexId: this.multiplexId,\r\n };\r\n const element = document.createElement('a');\r\n element.setAttribute(\r\n 'href',\r\n 'data:text/html;charset=UTF-8,' +\r\n this.fixMalformedHtmlScript(dots, revealjsData)\r\n );\r\n element.setAttribute('download', sanitizeForDesktop(filename) + '.html');\r\n element.style.display = 'none';\r\n document.body.appendChild(element);\r\n element.click();\r\n document.body.removeChild(element);\r\n }\r\n\r\n private fixMalformedHtmlScript(\r\n dots: any,\r\n revealjsData: {\r\n multiplexId: any;\r\n sentences: any[];\r\n multiplexSecret: any;\r\n description: string;\r\n title: string;\r\n script: string;\r\n }\r\n ) {\r\n return dots(revealjsData).replace(''),\r\n result.svg.indexOf('') + 7\r\n );\r\n const split = defs.split(' {\r\n const idToReplace = id.substring(4, id.length - 1);\r\n const newId =\r\n idToReplace.slice(0, id.length - 5) +\r\n 'customId' +\r\n sectionIndex +\r\n idToReplace.slice(idToReplace.length - 2);\r\n // @ts-ignore\r\n result.svg = result.svg.replaceAll(idToReplace, newId);\r\n });\r\n newDefs += '= 72) {\r\n fix = true;\r\n // https://www.chromestatus.com/features/5656049583390720\r\n }\r\n } else if (name.includes('Firefox')) {\r\n fix = true;\r\n\r\n // versionNumber of implementation unknown\r\n }\r\n if (fix) {\r\n while (svg.includes('#')) {\r\n svg = svg.replace('#', '%23');\r\n }\r\n }\r\n return svg;\r\n }\r\n\r\n findMostOuterElements(svg: HTMLElement): Box {\r\n let xLeft = 0;\r\n let xRight = 0;\r\n let yUp = 0;\r\n let yDown = 0;\r\n\r\n const elements = svg.getElementsByClassName('djs-group');\r\n\r\n // tslint:disable-next-line:prefer-for-of\r\n for (let i = 0; i < elements.length; i++) {\r\n const element = elements[i];\r\n const sub = element.children;\r\n\r\n let elXLeft: number;\r\n let elXRight: number;\r\n let elYUp: number;\r\n let elYDown: number;\r\n\r\n const transform = sub[0].getAttribute('transform');\r\n if (transform) {\r\n let nums;\r\n\r\n if (transform.includes('matrix')) {\r\n transform.replace('matrix(', '');\r\n transform.replace(')', '');\r\n nums = transform.split(' ');\r\n elXLeft = parseInt(nums[4]);\r\n elYUp = parseInt(nums[5]);\r\n } else {\r\n transform.replace('translate(', '');\r\n transform.replace(')', '');\r\n nums = transform.split(' ');\r\n elXLeft = parseInt(nums[0]);\r\n elYUp = parseInt(nums[1]);\r\n }\r\n\r\n const rects = sub[0].getElementsByTagName('rect');\r\n const outerRect = rects[rects.length - 1];\r\n\r\n const width = outerRect.getAttribute('width');\r\n\r\n elXRight = elXLeft + parseInt(width != null ? width : '0');\r\n elYDown = elYUp + sub[0].getBoundingClientRect().height;\r\n } else {\r\n const rects = element.getElementsByTagName('rect');\r\n const outerRect = rects[rects.length - 1];\r\n\r\n const x = outerRect.getAttribute('x');\r\n const y = outerRect.getAttribute('y');\r\n\r\n elXLeft = parseInt(x != null ? x : '0');\r\n elYUp = parseInt(y != null ? y : '0');\r\n\r\n const width = outerRect.getAttribute('width');\r\n const height = outerRect.getAttribute('height');\r\n\r\n elXRight = elXLeft + parseInt(width != null ? width : '0');\r\n elYDown = elYUp + parseInt(height != null ? height : '0') + 20; // Add 20 px as Padding for text at the bottom\r\n }\r\n if (elXLeft < xLeft) {\r\n xLeft = elXLeft;\r\n }\r\n if (elXRight > xRight) {\r\n xRight = elXRight;\r\n }\r\n if (elYUp < yUp) {\r\n yUp = elYUp;\r\n }\r\n if (elYDown > yDown) {\r\n yDown = elYDown;\r\n }\r\n }\r\n\r\n yUp -= 75; // we need to adjust yUp to have space for the title and description\r\n\r\n return {\r\n xLeft,\r\n xRight,\r\n yUp,\r\n yDown,\r\n };\r\n }\r\n\r\n prepareSVG(\r\n svg: string,\r\n layerBase: any,\r\n description: string,\r\n title: string,\r\n withTitle: boolean\r\n ): string {\r\n const box = this.findMostOuterElements(layerBase);\r\n let viewBoxIndex = svg.indexOf('width=\"');\r\n\r\n this.calculateWidthAndHeight(box);\r\n\r\n const { insertText, extraHeight } = createTitleAndDescriptionSVGElement(\r\n title,\r\n description,\r\n box.xLeft,\r\n box.yUp + 20,\r\n this.width\r\n );\r\n if (withTitle) {\r\n this.height += extraHeight;\r\n }\r\n\r\n const bounds = this.createBounds(box, extraHeight);\r\n\r\n const dataStart = svg.substring(0, viewBoxIndex);\r\n viewBoxIndex = svg.indexOf('style=\"');\r\n\r\n const dataEnd = svg.substring(viewBoxIndex);\r\n dataEnd.substring(viewBoxIndex);\r\n\r\n svg = dataStart + bounds + dataEnd;\r\n\r\n const insertIndex = svg.indexOf('') + 20;\r\n\r\n if (withTitle) {\r\n svg = [\r\n svg.slice(0, insertIndex),\r\n insertText,\r\n svg.slice(insertIndex),\r\n ].join('');\r\n }\r\n svg = this.URIHashtagFix(svg);\r\n\r\n return svg;\r\n }\r\n\r\n private createBounds(box: Box, extraHeight: number) {\r\n return (\r\n 'width=\"' +\r\n this.width +\r\n '\" height=\"' +\r\n this.height +\r\n '\" viewBox=\" ' +\r\n box.xLeft +\r\n ' ' +\r\n (box.yUp - extraHeight) +\r\n ' ' +\r\n this.width +\r\n ' ' +\r\n this.height +\r\n '\" '\r\n );\r\n }\r\n\r\n /**\r\n * Calculate the Width and Height of the Bounding Box for the PNG so no Parts are cut off\r\n * TODO Longer Iconnames can still be cut of, when the Element is the lowest Object on the canvas, same for Activities\r\n */\r\n private calculateWidthAndHeight(box: Box): [number, number] {\r\n if (box.xLeft < 0) {\r\n if (box.xRight < 0) {\r\n this.width = Math.abs(box.xLeft - box.xRight);\r\n } else {\r\n this.width = Math.abs(box.xLeft) + box.xRight;\r\n }\r\n } else {\r\n this.width = box.xRight - box.xLeft;\r\n }\r\n\r\n if (box.yUp < 0) {\r\n if (box.yDown < 0) {\r\n this.height = Math.abs(box.yUp - box.yDown);\r\n } else {\r\n this.height = Math.abs(box.yUp) + box.yDown;\r\n }\r\n } else {\r\n this.height = box.yDown - box.yUp;\r\n }\r\n\r\n // if the domain-Story is smaller than 300px in width or height, increase its dimensions\r\n if (this.height < 300) {\r\n this.height += 300;\r\n box.yUp -= 150;\r\n box.yDown += 150;\r\n }\r\n if (this.width < 300) {\r\n this.width += 300;\r\n box.xLeft -= 150;\r\n box.xRight += 150;\r\n }\r\n return [this.height, this.width];\r\n }\r\n\r\n extractSVG(viewport: any, outerSVGElement: any): string {\r\n const layerResizers = viewport.getElementsByClassName('layer-resizers');\r\n const layerOverlays = viewport.getElementsByClassName('layer-overlays');\r\n const transform = viewport.getAttribute('transform');\r\n const translate = viewport.getAttribute('translate');\r\n\r\n if (layerResizers[0]) {\r\n layerResizers[0].parentNode.removeChild(layerResizers[0]);\r\n }\r\n if (layerOverlays[0]) {\r\n layerOverlays[0].parentNode.removeChild(layerOverlays[0]);\r\n }\r\n\r\n // remove canvas scrolling and scaling before serializeToString of SVG\r\n if (transform) {\r\n viewport.removeAttribute('transform');\r\n }\r\n if (translate) {\r\n viewport.removeAttribute('translate');\r\n }\r\n\r\n const svg = new XMLSerializer().serializeToString(outerSVGElement);\r\n\r\n // re-add canvas scrolling and scaling\r\n if (transform) {\r\n viewport.setAttribute('transform', transform);\r\n }\r\n if (translate) {\r\n viewport.setAttribute('translate', translate);\r\n }\r\n return svg;\r\n }\r\n\r\n getWidth(): number {\r\n return this.width;\r\n }\r\n\r\n getHeight(): number {\r\n return this.height;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ConfigAndDST } from 'src/app/Domain/Export/configAndDst';\r\nimport { createTitleAndDescriptionSVGElement } from 'src/app/Service/Export/exportUtil';\r\nimport { ModelerService } from '../Modeler/modeler.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SvgService {\r\n private cacheData = '';\r\n\r\n constructor(private modelerService: ModelerService) {}\r\n\r\n createSVGData(\r\n title: string,\r\n description: string,\r\n dst: ConfigAndDST,\r\n withTitle: boolean,\r\n useWhiteBackground: boolean\r\n ): string {\r\n this.cacheData = this.modelerService.getEncoded();\r\n\r\n let data = structuredClone(this.cacheData);\r\n\r\n let viewBoxIndex = data.indexOf('width=\"');\r\n\r\n let { width, height, viewBox } = this.viewBoxCoordinates(data);\r\n\r\n let xLeft: number;\r\n let xRight: number;\r\n let yUp: number;\r\n let yDown: number;\r\n const splitViewBox = viewBox.split(/\\s/);\r\n\r\n xLeft = +splitViewBox[0];\r\n yUp = +splitViewBox[1];\r\n xRight = +splitViewBox[2];\r\n yDown = +splitViewBox[3];\r\n\r\n if (xRight < 300) {\r\n xRight += 300;\r\n width += 300;\r\n }\r\n\r\n const { insertText, extraHeight } = createTitleAndDescriptionSVGElement(\r\n title,\r\n description,\r\n xLeft,\r\n yUp,\r\n width\r\n );\r\n if (withTitle) {\r\n // to display the title and description in the SVG-file, we need to add a container for the text-elements\r\n height += extraHeight + 80;\r\n }\r\n\r\n const svgIndex = data.indexOf('width=\"');\r\n if(useWhiteBackground) {\r\n const backgroundColorWhite = 'style=\"background-color:white\" ';\r\n data = [\r\n data.slice(0, svgIndex),\r\n backgroundColorWhite,\r\n data.slice(svgIndex),\r\n ].join('');\r\n }\r\n\r\n const bounds = this.createBounds(\r\n width,\r\n height,\r\n xLeft,\r\n yUp,\r\n xRight,\r\n yDown,\r\n withTitle\r\n );\r\n\r\n const dataStart = data.substring(0, viewBoxIndex);\r\n viewBoxIndex = data.indexOf('\" version');\r\n\r\n const dataEnd = data.substring(viewBoxIndex);\r\n dataEnd.substring(viewBoxIndex);\r\n\r\n data = dataStart + bounds + dataEnd;\r\n\r\n const insertIndex = this.findIndexToInsertData(data);\r\n\r\n if (withTitle) {\r\n data = [\r\n data.slice(0, insertIndex),\r\n insertText,\r\n data.slice(insertIndex),\r\n ].join('');\r\n }\r\n\r\n return this.appendDST(data, dst);\r\n }\r\n\r\n private findIndexToInsertData(data: string) {\r\n let insertIndex = data.indexOf('');\r\n if (insertIndex < 0) {\r\n insertIndex = data.indexOf('version=\"1.2\">') + 14;\r\n } else {\r\n insertIndex += 7;\r\n }\r\n return insertIndex;\r\n }\r\n\r\n private createBounds(\r\n width: number,\r\n height: number,\r\n xLeft: number,\r\n yUp: number,\r\n xRight: number,\r\n yDown: number,\r\n withTitle: boolean\r\n ): string {\r\n return (\r\n 'width=\"' +\r\n width +\r\n '\" height=\" ' +\r\n height +\r\n '\" viewBox=\"' +\r\n xLeft +\r\n ' ' +\r\n (withTitle ? yUp - 80 : yUp) +\r\n ' ' +\r\n xRight +\r\n ' ' +\r\n (yDown + 30)\r\n );\r\n }\r\n\r\n private viewBoxCoordinates(svg: string): {\r\n width: number;\r\n height: number;\r\n viewBox: string;\r\n } {\r\n const ViewBoxCoordinate =\r\n /width=\"([^\"]+)\"\\s+height=\"([^\"]+)\"\\s+viewBox=\"([^\"]+)\"/;\r\n const match = svg.match(ViewBoxCoordinate);\r\n if (match) {\r\n return { width: +match[1], height: +match[2], viewBox: match[3] };\r\n }\r\n return { width: 0, height: 0, viewBox: '' };\r\n }\r\n\r\n private appendDST(data: string, dst: ConfigAndDST): string {\r\n data += '\\n';\r\n return data;\r\n }\r\n}\r\n","import { EventEmitter, Injectable, OnDestroy } from '@angular/core';\r\nimport { IconDictionaryService } from 'src/app/Service/DomainConfiguration/icon-dictionary.service';\r\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\r\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\r\nimport { TitleService } from 'src/app/Service/Title/title.service';\r\nimport { ImportRepairService } from 'src/app/Service/Import/import-repair.service';\r\nimport { Observable, Subscription } from 'rxjs';\r\nimport { RendererService } from 'src/app/Service/Renderer/renderer.service';\r\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\r\nimport {\r\n DomainConfiguration,\r\n fromConfigurationFromFile,\r\n} from 'src/app/Domain/Common/domainConfiguration';\r\nimport { DialogService } from '../Dialog/dialog.service';\r\nimport { InfoDialogComponent } from '../../Presentation/Dialog/info-dialog/info-dialog.component';\r\nimport { MatDialogConfig } from '@angular/material/dialog';\r\nimport { InfoDialogData } from '../../Domain/Dialog/infoDialogData';\r\nimport { restoreTitleFromFileName } from '../../Utils/sanitizer';\r\nimport {\r\n INITIAL_DESCRIPTION,\r\n INITIAL_TITLE,\r\n} from '../../Domain/Common/constants';\r\nimport { DomainConfigurationService } from '../DomainConfiguration/domain-configuration.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ImportDomainStoryService implements OnDestroy {\r\n titleSubscription: Subscription;\r\n descriptionSubscription: Subscription;\r\n\r\n title = INITIAL_TITLE;\r\n description = INITIAL_DESCRIPTION;\r\n private importedConfiguration: DomainConfiguration | null = null;\r\n\r\n private importedConfigurationEmitter =\r\n new EventEmitter();\r\n\r\n constructor(\r\n private iconDictionaryService: IconDictionaryService,\r\n private importRepairService: ImportRepairService,\r\n private titleService: TitleService,\r\n private rendererService: RendererService,\r\n private dialogService: DialogService,\r\n private domainConfigurationService: DomainConfigurationService\r\n ) {\r\n this.titleSubscription = this.titleService.title$.subscribe(\r\n (title: string) => {\r\n this.title = title;\r\n }\r\n );\r\n this.descriptionSubscription = this.titleService.description$.subscribe(\r\n (description: string) => {\r\n this.description = description;\r\n }\r\n );\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.titleSubscription.unsubscribe();\r\n this.descriptionSubscription.unsubscribe();\r\n }\r\n\r\n get importedConfigurationEvent(): Observable {\r\n return this.importedConfigurationEmitter.asObservable();\r\n }\r\n\r\n getImportedConfiguration(): DomainConfiguration {\r\n const config: DomainConfiguration = {\r\n name: this.importedConfiguration?.name || '',\r\n actors: this.importedConfiguration?.actors || new Dictionary(),\r\n workObjects: this.importedConfiguration?.workObjects || new Dictionary(),\r\n };\r\n this.importedConfiguration = null;\r\n return config;\r\n }\r\n\r\n importDST(input: Blob, filename: string, isSVG: boolean): void {\r\n const fileReader = new FileReader();\r\n const titleText = restoreTitleFromFileName(filename, isSVG);\r\n\r\n // no need to put this on the commandStack\r\n this.titleService.updateTitleAndDescription(titleText, null, false);\r\n\r\n fileReader.onloadend = (e) => {\r\n if (e && e.target) {\r\n this.fileReaderFunction(e.target.result, isSVG, false);\r\n }\r\n };\r\n\r\n fileReader.readAsText(input);\r\n }\r\n\r\n importEGN(input: Blob, filename: string, isSVG: boolean): void {\r\n const fileReader = new FileReader();\r\n const titleText = restoreTitleFromFileName(filename, isSVG);\r\n\r\n // no need to put this on the commandStack\r\n this.titleService.updateTitleAndDescription(titleText, null, false);\r\n\r\n fileReader.onloadend = (e) => {\r\n if (e && e.target) {\r\n this.fileReaderFunction(e.target.result, isSVG, true);\r\n }\r\n };\r\n\r\n fileReader.readAsText(input);\r\n }\r\n\r\n private fileReaderFunction(\r\n text: string | ArrayBuffer | null,\r\n isSVG: boolean,\r\n isEGN: boolean\r\n ): void {\r\n let dstText;\r\n if (typeof text === 'string') {\r\n if (isSVG) {\r\n dstText = this.removeXMLComments(text);\r\n } else {\r\n dstText = text;\r\n }\r\n\r\n let elements: any[];\r\n let config: DomainConfiguration;\r\n let configFromFile: {\r\n name: string;\r\n actors: { [key: string]: any };\r\n workObjects: { [key: string]: any };\r\n };\r\n\r\n let dstAndConfig = this.extractDstAndConfig(dstText, isSVG);\r\n if (dstAndConfig == null) {\r\n return;\r\n }\r\n\r\n // current implementation\r\n if (dstAndConfig.domain) {\r\n configFromFile = isEGN\r\n ? dstAndConfig.domain\r\n : JSON.parse(dstAndConfig.domain);\r\n config = fromConfigurationFromFile(configFromFile);\r\n elements = isEGN ? dstAndConfig.dst : JSON.parse(dstAndConfig.dst);\r\n } else {\r\n // legacy implementation\r\n if (dstAndConfig.config) {\r\n configFromFile = JSON.parse(dstAndConfig.config);\r\n config = fromConfigurationFromFile(configFromFile);\r\n elements = JSON.parse(dstAndConfig.dst);\r\n } else {\r\n // implementation prior to configuration\r\n elements = JSON.parse(dstText);\r\n config =\r\n this.domainConfigurationService.createMinimalConfigurationWithDefaultIcons();\r\n }\r\n }\r\n\r\n const configChanged = this.checkConfigForChanges(config);\r\n\r\n let lastElement = elements[elements.length - 1];\r\n if (!lastElement.id) {\r\n lastElement = elements.pop();\r\n let importVersionNumber = lastElement;\r\n\r\n // if the last element has the importedVersionNumber has the tag version,\r\n // then there exists another meta tag 'info' for the description\r\n if (importVersionNumber.version) {\r\n lastElement = elements.pop();\r\n }\r\n\r\n if (importVersionNumber.version) {\r\n importVersionNumber = importVersionNumber.version as string;\r\n } else {\r\n importVersionNumber = '?';\r\n // TODO show error for unreadable version number\r\n }\r\n elements = this.handleVersionNumber(importVersionNumber, elements);\r\n }\r\n\r\n if (\r\n !this.importRepairService.checkForUnreferencedElementsInActivitiesAndRepair(\r\n elements\r\n )\r\n ) {\r\n this.showBrokenImportDialog(isSVG ? 'SVG' : 'DST');\r\n }\r\n\r\n this.titleService.updateTitleAndDescription(\r\n null,\r\n lastElement.info,\r\n false\r\n );\r\n\r\n this.importRepairService.adjustPositions(elements);\r\n\r\n this.updateIconRegistries(elements, config);\r\n this.rendererService.importStory(elements, configChanged, config);\r\n }\r\n }\r\n\r\n private handleVersionNumber(\r\n importVersionNumber: string,\r\n elements: BusinessObject[]\r\n ): BusinessObject[] {\r\n const versionPrefix = +importVersionNumber.substring(\r\n 0,\r\n importVersionNumber.lastIndexOf('.')\r\n );\r\n if (versionPrefix <= 0.5) {\r\n elements =\r\n this.importRepairService.updateCustomElementsPreviousV050(elements);\r\n this.showPreviousV050Dialog(versionPrefix);\r\n }\r\n return elements;\r\n }\r\n\r\n private extractDstAndConfig(dstText: string, isSVG: boolean) {\r\n let dstAndConfig = null;\r\n try {\r\n dstAndConfig = JSON.parse(dstText);\r\n } catch (e) {\r\n this.showBrokenImportDialog(isSVG ? 'SVG' : 'DST');\r\n }\r\n return dstAndConfig;\r\n }\r\n\r\n private removeXMLComments(xmlText: string): string {\r\n xmlText = xmlText.substring(xmlText.indexOf(''));\r\n while (xmlText.includes('')) {\r\n xmlText = xmlText.replace('', '');\r\n }\r\n xmlText = xmlText.replace('', '');\r\n xmlText = xmlText.replace('', '');\r\n return xmlText;\r\n }\r\n\r\n checkConfigForChanges(domainConfiguration: DomainConfiguration): boolean {\r\n const newActorKeys = domainConfiguration.actors.keysArray();\r\n const newWorkObjectKeys = domainConfiguration.workObjects.keysArray();\r\n\r\n const currentActorKeys = this.iconDictionaryService.getTypeDictionaryKeys(\r\n elementTypes.ACTOR\r\n );\r\n const currentWorkobjectKeys =\r\n this.iconDictionaryService.getTypeDictionaryKeys(elementTypes.WORKOBJECT);\r\n\r\n let changed = false;\r\n\r\n if (\r\n newActorKeys.length !== currentActorKeys.length ||\r\n newWorkObjectKeys.length !== currentWorkobjectKeys.length\r\n ) {\r\n return true;\r\n }\r\n\r\n for (let i = 0; i < newActorKeys.length; i++) {\r\n changed =\r\n this.clearName(currentActorKeys[i]) !== this.clearName(newActorKeys[i]);\r\n if (changed) {\r\n i = newActorKeys.length;\r\n }\r\n }\r\n if (changed) {\r\n return changed;\r\n }\r\n for (let i = 0; i < newWorkObjectKeys.length; i++) {\r\n changed =\r\n this.clearName(currentWorkobjectKeys[i]) !==\r\n this.clearName(newWorkObjectKeys[i]);\r\n if (changed) {\r\n i = newWorkObjectKeys.length;\r\n }\r\n }\r\n return changed;\r\n }\r\n private clearName(name: string): string {\r\n return name\r\n .replace(elementTypes.ACTOR, '')\r\n .replace(elementTypes.WORKOBJECT, '');\r\n }\r\n\r\n private updateIconRegistries(\r\n elements: BusinessObject[],\r\n config: DomainConfiguration\r\n ): void {\r\n const actorIcons = this.iconDictionaryService.getElementsOfType(\r\n elements,\r\n elementTypes.ACTOR\r\n );\r\n const workObjectIcons = this.iconDictionaryService.getElementsOfType(\r\n elements,\r\n elementTypes.WORKOBJECT\r\n );\r\n this.iconDictionaryService.updateIconRegistries(\r\n actorIcons,\r\n workObjectIcons,\r\n config\r\n );\r\n\r\n this.setImportedConfigurationAndEmit(config);\r\n }\r\n\r\n private showPreviousV050Dialog(version: number): void {\r\n const title = 'Compatability-Warning';\r\n const text =\r\n 'The uploaded Domain-Story is from version ' +\r\n version +\r\n '. There may be problems with the default actors or workobjects contained in the story.';\r\n\r\n const config = new MatDialogConfig();\r\n config.disableClose = false;\r\n config.autoFocus = true;\r\n\r\n config.data = new InfoDialogData(title, text, true);\r\n\r\n this.dialogService.openDialog(InfoDialogComponent, config);\r\n }\r\n\r\n private setImportedConfigurationAndEmit(config: DomainConfiguration) {\r\n this.importedConfiguration = config;\r\n this.importedConfigurationEmitter.emit(config);\r\n }\r\n\r\n private showBrokenImportDialog(type: string) {\r\n const config = new MatDialogConfig();\r\n config.disableClose = false;\r\n config.autoFocus = true;\r\n config.data = new InfoDialogData(\r\n 'Error during import',\r\n 'The uploaded ' +\r\n type +\r\n ' is not complete, there could be elements missing from the canvas.',\r\n true,\r\n false\r\n );\r\n\r\n this.dialogService.openDialog(InfoDialogComponent, config);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\r\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\r\nimport { Waypoint } from 'src/app/Domain/Common/waypoint';\r\nimport { ActivityBusinessObject } from '../../Domain/Common/activityBusinessObject';\r\n\r\n/**\r\n * Repairs broken Domain Stories so that it can be rendered onto the canvas\r\n * by removing activities and connections that reference elements that don't exists\r\n */\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ImportRepairService {\r\n checkForUnreferencedElementsInActivitiesAndRepair(\r\n elements: BusinessObject[]\r\n ): boolean {\r\n const activities: ActivityBusinessObject[] = [];\r\n const objectIDs: string[] = [];\r\n\r\n let complete = true;\r\n\r\n elements.forEach((element) => {\r\n const type = element.type;\r\n if (type === elementTypes.ACTIVITY || type === elementTypes.CONNECTION) {\r\n activities.push(element as ActivityBusinessObject);\r\n } else {\r\n objectIDs.push(element.id);\r\n }\r\n });\r\n\r\n activities.forEach((activity) => {\r\n const source = activity.source;\r\n const target = activity.target;\r\n if (!objectIDs.includes(source) || !objectIDs.includes(target)) {\r\n complete = false;\r\n const activityIndex = elements.indexOf(activity);\r\n elements = elements.splice(activityIndex, 1);\r\n }\r\n });\r\n return complete;\r\n }\r\n\r\n /**\r\n * Ensure backwards compatibility.\r\n * Previously Document had no special name and was just addressed as workObject\r\n * Bubble was renamed to Conversation\r\n */\r\n updateCustomElementsPreviousV050(\r\n elements: BusinessObject[]\r\n ): BusinessObject[] {\r\n for (const element of elements) {\r\n if (element.type === elementTypes.WORKOBJECT) {\r\n element.type = elementTypes.WORKOBJECT + 'Document';\r\n } else if (element.type === elementTypes.WORKOBJECT + 'Bubble') {\r\n element.type = elementTypes.WORKOBJECT + 'Conversation';\r\n }\r\n }\r\n return elements;\r\n }\r\n\r\n /**\r\n * Adjusts Positions of Elements to ensure the Domain Story starts in the visible parts of the canvas\r\n */\r\n adjustPositions(elements: BusinessObject[]): void {\r\n let xLeft = 0;\r\n let yUp = 0;\r\n let isFirst = true;\r\n\r\n this.findFirstElement(elements, isFirst, xLeft, yUp);\r\n\r\n if (xLeft < 75 || xLeft > 150 || yUp < 0 || yUp > 50) {\r\n // add Padding for the Palette and the top\r\n xLeft -= 75;\r\n yUp -= 50;\r\n\r\n elements.forEach((element) =>\r\n this.adjustElementPosition(element, xLeft, yUp)\r\n );\r\n }\r\n }\r\n\r\n private adjustElementPosition(\r\n element: BusinessObject,\r\n xLeft: number,\r\n yUp: number\r\n ): void {\r\n if (\r\n element.type === elementTypes.ACTIVITY ||\r\n element.type === elementTypes.CONNECTION\r\n ) {\r\n const waypoints = (element as ActivityBusinessObject).waypoints;\r\n waypoints.forEach((point: Waypoint) => {\r\n point.x -= xLeft;\r\n point.y -= yUp;\r\n\r\n if (point.original) {\r\n point.original.x = point.x;\r\n point.original.y = point.y;\r\n }\r\n });\r\n } else {\r\n element.x -= xLeft;\r\n element.y -= yUp;\r\n }\r\n }\r\n\r\n private findFirstElement(\r\n elements: BusinessObject[],\r\n isFirst: boolean,\r\n xLeft: number,\r\n yUp: number\r\n ) {\r\n elements.forEach((element) => {\r\n let elXLeft;\r\n let elYUp;\r\n if (\r\n element.type !== elementTypes.ACTIVITY &&\r\n element.type !== elementTypes.CONNECTION\r\n ) {\r\n if (isFirst) {\r\n xLeft = element.x;\r\n yUp = element.y;\r\n isFirst = false;\r\n }\r\n elXLeft = element.x;\r\n elYUp = element.y;\r\n if (elXLeft < xLeft) {\r\n xLeft = elXLeft;\r\n }\r\n if (elYUp < yUp) {\r\n yUp = elYUp;\r\n }\r\n }\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\r\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\r\nimport { MassNamingService } from 'src/app/Service/LabelDictionary/mass-naming.service';\r\nimport { IconDictionaryService } from '../DomainConfiguration/icon-dictionary.service';\r\nimport { WorkObjectLabelEntry } from '../../Domain/LabelDictionary/workObjectLabelEntry';\r\nimport { LabelEntry } from '../../Domain/LabelDictionary/labelEntry';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class LabelDictionaryService {\r\n activityLabels: LabelEntry[] = [];\r\n workObjektLabels: WorkObjectLabelEntry[] = [];\r\n\r\n constructor(\r\n private massNamingService: MassNamingService,\r\n private elementRegistryService: ElementRegistryService,\r\n private iconDictionaryService: IconDictionaryService\r\n ) {}\r\n\r\n createLabelDictionaries(): void {\r\n this.activityLabels = [];\r\n this.workObjektLabels = [];\r\n\r\n const allObjects = this.elementRegistryService.getAllCanvasObjects();\r\n\r\n allObjects.forEach((element) => {\r\n const name = element.businessObject.name;\r\n if (\r\n name &&\r\n name.length > 0 &&\r\n element.type.includes(elementTypes.ACTIVITY) &&\r\n !this.activityLabels.map((a) => a.name).includes(name)\r\n ) {\r\n this.activityLabels.push({\r\n name,\r\n originalName: name,\r\n });\r\n } else if (\r\n name &&\r\n name.length > 0 &&\r\n element.type.includes(elementTypes.WORKOBJECT) &&\r\n !this.workObjektLabels.map((e) => e.name).includes(name)\r\n ) {\r\n const iconName = element.type.replace(elementTypes.WORKOBJECT, '');\r\n let icon = this.iconDictionaryService.getIconSource(iconName);\r\n if (!icon) {\r\n return;\r\n }\r\n if (!icon.startsWith('data')) {\r\n icon = 'data:image/svg+xml,' + icon;\r\n }\r\n this.workObjektLabels.push({\r\n name,\r\n originalName: name,\r\n icon,\r\n });\r\n }\r\n });\r\n this.activityLabels.sort((a, b) => {\r\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\r\n });\r\n this.workObjektLabels.sort((a, b) => {\r\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\r\n });\r\n }\r\n\r\n getActivityLabels(): LabelEntry[] {\r\n return this.activityLabels.slice();\r\n }\r\n\r\n getWorkObjectLabels(): WorkObjectLabelEntry[] {\r\n return this.workObjektLabels.slice();\r\n }\r\n\r\n massRenameLabels(\r\n activityNames: string[],\r\n originalActivityNames: string[],\r\n workObjectNames: string[],\r\n originalWorkObjectNames: string[]\r\n ): void {\r\n for (let i = 0; i < originalActivityNames.length; i++) {\r\n if (!activityNames[i]) {\r\n activityNames[i] = '';\r\n }\r\n if (!(activityNames[i] == originalActivityNames[i])) {\r\n this.massNamingService.massChangeNames(\r\n originalActivityNames[i],\r\n activityNames[i],\r\n elementTypes.ACTIVITY\r\n );\r\n }\r\n }\r\n for (let i = 0; i < originalWorkObjectNames.length; i++) {\r\n if (!workObjectNames[i]) {\r\n workObjectNames[i] = '';\r\n }\r\n if (!(workObjectNames[i] == originalWorkObjectNames[i])) {\r\n this.massNamingService.massChangeNames(\r\n originalWorkObjectNames[i],\r\n workObjectNames[i],\r\n elementTypes.WORKOBJECT\r\n );\r\n }\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\r\nimport { CanvasObject } from 'src/app/Domain/Common/canvasObject';\r\nimport { elementTypes } from '../../Domain/Common/elementTypes';\r\nimport { CommandStackService } from '../CommandStack/command-stack.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class MassNamingService {\r\n constructor(\r\n private elementRegistryService: ElementRegistryService,\r\n private commandStackService: CommandStackService\r\n ) {}\r\n\r\n massChangeNames(\r\n oldValue: string,\r\n newValue: string,\r\n type: elementTypes\r\n ): void {\r\n const allRelevantObjects: CanvasObject[] = [];\r\n\r\n this.elementRegistryService.getAllCanvasObjects().forEach((element) => {\r\n if (\r\n element.type.includes(type) &&\r\n element.businessObject.name === oldValue\r\n ) {\r\n allRelevantObjects.push(element);\r\n }\r\n });\r\n\r\n const context = {\r\n elements: allRelevantObjects,\r\n newValue,\r\n };\r\n\r\n this.commandStackService.execute('domainStoryObjects.massRename', context);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport { initializeContextPadProvider } from '../../Modeler/modeler/context-pad/domainStoryContextPadProvider';\r\nimport {\r\n getMultipleNumberRegistry,\r\n getNumberRegistry,\r\n initializeNumbering,\r\n setNumberIsMultiple,\r\n updateExistingNumbersAtEditing,\r\n} from '../../Modeler/modeler/numbering/numbering';\r\nimport { initializePalette } from '../../Modeler/modeler/palette/domainStoryPalette';\r\nimport { initializeRenderer } from '../../Modeler/modeler/domainStoryRenderer';\r\nimport {\r\n initializeLabelEditingProvider,\r\n toggleStashUse,\r\n} from '../../Modeler/modeler/labeling/dsLabelEditingProvider';\r\nimport { initializeReplaceOptions } from '../../Modeler/modeler/change-icon/replaceOptions';\r\n\r\nimport { DirtyFlagService } from '../DirtyFlag/dirty-flag.service';\r\nimport { IconDictionaryService } from '../DomainConfiguration/icon-dictionary.service';\r\nimport { ElementRegistryService } from '../ElementRegistry/element-registry.service';\r\nimport { DomainConfigurationService } from '../DomainConfiguration/domain-configuration.service';\r\nimport { LabelDictionaryService } from '../LabelDictionary/label-dictionary.service';\r\nimport { elementTypes } from '../../Domain/Common/elementTypes';\r\nimport { ReplayStateService } from '../Replay/replay-state.service';\r\nimport { MatDialogConfig } from '@angular/material/dialog';\r\nimport { ActivityDialogData } from '../../Domain/Dialog/activityDialogData';\r\nimport { ActivityDialogComponent } from '../../Presentation/Dialog/activity-dialog/activity-dialog.component';\r\nimport { DialogService } from '../Dialog/dialog.service';\r\nimport massRenameHandler from '../../Modeler/modeler/updateHandler/massRenameHandler';\r\nimport headlineAndDescriptionUpdateHandler from '../../Modeler/modeler/updateHandler/headlineAndDescriptionUpdateHandler';\r\nimport { TitleService } from '../Title/title.service';\r\nimport { ActivityCanvasObject } from '../../Domain/Common/activityCanvasObject';\r\nimport { HtmlPresentationService } from '../Export/html-presentation.service';\r\nimport { positionsMatch } from '../../Utils/mathExtensions';\r\nimport activityUpdateHandler, {\r\n initializeActivityUpdateHandler,\r\n} from '../../Modeler/modeler/updateHandler/activityUpdateHandlers';\r\nimport elementUpdateHandler from '../../Modeler/modeler/updateHandler/elementUpdateHandler';\r\nimport { CommandStackService } from '../CommandStack/command-stack.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class InitializerService {\r\n constructor(\r\n private dirtyFlagService: DirtyFlagService,\r\n private iconDictionaryService: IconDictionaryService,\r\n private elementRegistryService: ElementRegistryService,\r\n private configurationService: DomainConfigurationService,\r\n private labelDictionaryService: LabelDictionaryService,\r\n private replayStateService: ReplayStateService,\r\n private dialogService: DialogService,\r\n private commandStackService: CommandStackService,\r\n private titleService: TitleService,\r\n private htmlPresentationService: HtmlPresentationService\r\n ) {}\r\n\r\n initializeDomainStoryModelerClasses(): void {\r\n initializeContextPadProvider(\r\n this.dirtyFlagService,\r\n this.iconDictionaryService\r\n );\r\n /** The Palette and the Context Menu need the Icons present in the Domain,\r\n * so the IconDictionaryService and the DomainConfigurationService needs to be given to the Palette **/\r\n initializePalette(this.iconDictionaryService, this.configurationService);\r\n initializeRenderer(\r\n this.iconDictionaryService,\r\n this.elementRegistryService,\r\n this.dirtyFlagService\r\n );\r\n initializeLabelEditingProvider(this.labelDictionaryService);\r\n initializeReplaceOptions(this.iconDictionaryService);\r\n initializeNumbering(this.elementRegistryService);\r\n initializeActivityUpdateHandler(this.elementRegistryService);\r\n }\r\n\r\n propagateDomainStoryModelerClassesToServices(\r\n commandStack: any,\r\n elementRegistry: any,\r\n canvas: any,\r\n selection: any,\r\n modeler: any\r\n ): void {\r\n this.commandStackService.setCommandStack(commandStack);\r\n this.elementRegistryService.setElementRegistry(elementRegistry);\r\n this.htmlPresentationService.setModelerClasses(canvas, selection, modeler);\r\n }\r\n\r\n initializeDomainStoryModelerEventHandlers(\r\n commandStack: any,\r\n eventBus: any\r\n ): void {\r\n activityUpdateHandler(commandStack, eventBus);\r\n massRenameHandler(commandStack, eventBus);\r\n elementUpdateHandler(commandStack, eventBus);\r\n headlineAndDescriptionUpdateHandler(commandStack, this.titleService);\r\n }\r\n\r\n initiateEventBusListeners(eventBus: any, commandStack: any): void {\r\n eventBus.on('element.dblclick', (e: any) => {\r\n if (!this.replayStateService.getReplayOn()) {\r\n const element = e.element;\r\n if (element.type === elementTypes.ACTIVITY) {\r\n // override the doubleClickListener on activities\r\n this.activityDoubleClick(element, eventBus, commandStack);\r\n } else {\r\n const renderedNumberRegistry = getNumberRegistry();\r\n\r\n // add a DoubleClickListener to the number on activities\r\n if (renderedNumberRegistry.length > 1) {\r\n const allActivities =\r\n this.elementRegistryService.getActivitiesFromActors();\r\n\r\n if (allActivities.length > 0) {\r\n const htmlCanvas = document.getElementById('canvas');\r\n if (htmlCanvas) {\r\n const container =\r\n htmlCanvas.getElementsByClassName('djs-container');\r\n const svgElements = container[0].getElementsByTagName('svg');\r\n const outerSVGElement = svgElements[0];\r\n const viewport =\r\n outerSVGElement.getElementsByClassName('viewport')[0];\r\n let transform = viewport.getAttribute('transform');\r\n\r\n let transformX = 0;\r\n let transformY = 0;\r\n let zoomX = 1;\r\n let zoomY = 1;\r\n let nums;\r\n\r\n const clickX = e.originalEvent.offsetX;\r\n const clickY = e.originalEvent.offsetY;\r\n\r\n // adjust for zoom and panning\r\n if (transform) {\r\n transform = transform.replace('matrix(', '');\r\n transform.replace(')', '');\r\n nums = transform.split(',');\r\n zoomX = parseFloat(nums[0]);\r\n zoomY = parseFloat(nums[3]);\r\n transformX = parseInt(nums[4], undefined);\r\n transformY = parseInt(nums[5], undefined);\r\n }\r\n\r\n const width = 25 * zoomX;\r\n const height = 22 * zoomY;\r\n\r\n for (let i = 1; i < renderedNumberRegistry.length; i++) {\r\n const currentNum = renderedNumberRegistry[i];\r\n if (currentNum) {\r\n const tspan = currentNum.getElementsByTagName('tspan')[0];\r\n const tx = tspan.getAttribute('x');\r\n const ty = tspan.getAttribute('y');\r\n const tNumber = parseInt(tspan.innerHTML, undefined);\r\n\r\n const elementX = Math.floor(\r\n tx * zoomX + (transformX - 11 * zoomX)\r\n );\r\n const elementY = Math.floor(\r\n ty * zoomY + (transformY - 15 * zoomY)\r\n );\r\n\r\n allActivities.forEach((activity: ActivityCanvasObject) => {\r\n const activityNumber = activity.businessObject.number;\r\n if (activityNumber === tNumber) {\r\n if (\r\n positionsMatch(\r\n width,\r\n height,\r\n elementX,\r\n elementY,\r\n clickX,\r\n clickY\r\n )\r\n ) {\r\n this.activityDoubleClick(\r\n activity,\r\n eventBus,\r\n commandStack\r\n );\r\n }\r\n }\r\n });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n // when in replay, do not allow any interaction on the canvas\r\n eventBus.on(\r\n [\r\n 'element.click',\r\n 'element.dblclick',\r\n 'element.mousedown',\r\n 'drag.init',\r\n 'canvas.viewbox.changing',\r\n 'autoPlace',\r\n 'popupMenu.open',\r\n ],\r\n 10000000000,\r\n (event: any) => {\r\n if (this.replayStateService.getReplayOn()) {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n }\r\n }\r\n );\r\n }\r\n\r\n /** Overrrides for Canvas Functions **/\r\n private activityDoubleClick(\r\n activity: ActivityCanvasObject,\r\n eventBus: any,\r\n commandStack: any\r\n ): void {\r\n const source = activity.source;\r\n\r\n // ensure the right number when changing the direction of an activity\r\n toggleStashUse(false);\r\n\r\n const config = new MatDialogConfig();\r\n config.disableClose = false;\r\n config.autoFocus = true;\r\n\r\n if (\r\n activity.businessObject.number &&\r\n source &&\r\n source.type.includes(elementTypes.ACTOR)\r\n ) {\r\n config.data = new ActivityDialogData(\r\n activity,\r\n getMultipleNumberRegistry()[activity.businessObject.number],\r\n true,\r\n (data: any) => this.saveActivityInputLabel(data, eventBus, commandStack)\r\n );\r\n } else if (source && source.type.includes(elementTypes.WORKOBJECT)) {\r\n config.data = new ActivityDialogData(\r\n activity,\r\n false,\r\n false,\r\n (activityData: any) =>\r\n this.saveActivityInputLabel(activityData, eventBus, commandStack)\r\n );\r\n }\r\n this.dialogService.openDialog(ActivityDialogComponent, config);\r\n }\r\n\r\n private saveActivityInputLabel(\r\n activityData: any,\r\n eventBus: any,\r\n commandStack: any\r\n ): void {\r\n const label = activityData.activityLabel;\r\n const hasNumber = activityData.multipleNumbers !== undefined;\r\n const activityNumber = activityData.activityNumber;\r\n const multipleNumberAllowed = activityData.multipleNumbers;\r\n const element = activityData.activity;\r\n\r\n const activitiesFromActors =\r\n this.elementRegistryService.getActivitiesFromActors();\r\n const index = activitiesFromActors.indexOf(element);\r\n\r\n activitiesFromActors.splice(index, 1);\r\n if (hasNumber) {\r\n setNumberIsMultiple(activityNumber, multipleNumberAllowed);\r\n }\r\n element.businessObject.multipleNumberAllowed = multipleNumberAllowed;\r\n\r\n let options: any;\r\n if (hasNumber) {\r\n options = {\r\n businessObject: element.businessObject,\r\n newLabel: label,\r\n newNumber: activityNumber,\r\n element,\r\n };\r\n } else {\r\n options = {\r\n businessObject: element.businessObject,\r\n newLabel: label,\r\n element,\r\n };\r\n }\r\n\r\n commandStack.execute('activity.changed', options);\r\n if (element.businessObject.multipleNumberAllowed !== false) {\r\n if (getMultipleNumberRegistry()[activityNumber] === false) {\r\n updateExistingNumbersAtEditing(\r\n activitiesFromActors,\r\n activityNumber,\r\n eventBus\r\n );\r\n }\r\n } else if (element.businessObject.multipleNumberAllowed === false) {\r\n updateExistingNumbersAtEditing(\r\n activitiesFromActors,\r\n activityNumber,\r\n eventBus\r\n );\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { assign } from 'min-dash';\r\nimport DomainStoryModeler from 'src/app/Modeler';\r\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\r\nimport { InitializerService } from './initializer.service';\r\nimport { ElementRegistryService } from '../ElementRegistry/element-registry.service';\r\nimport { IconDictionaryService } from '../DomainConfiguration/icon-dictionary.service';\r\nimport { DomainConfigurationService } from '../DomainConfiguration/domain-configuration.service';\r\nimport { BusinessObject } from '../../Domain/Common/businessObject';\r\nimport { StorageService } from '../BrowserStorage/storage.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ModelerService {\r\n constructor(\r\n private initializerService: InitializerService,\r\n private elementRegistryService: ElementRegistryService,\r\n private iconDictionaryService: IconDictionaryService,\r\n private domainConfigurationService: DomainConfigurationService,\r\n private storageService: StorageService\r\n ) {}\r\n\r\n private modeler: any;\r\n private canvas: any;\r\n private elementRegistry: any;\r\n private commandStack: any;\r\n private selection: any;\r\n private eventBus: any;\r\n\r\n private encoded: string | undefined;\r\n\r\n postInit(): void {\r\n const storedDomainConfiguration =\r\n this.storageService.getStoredDomainConfiguration();\r\n if (storedDomainConfiguration) {\r\n this.iconDictionaryService.setCusomtConfiguration(\r\n storedDomainConfiguration\r\n );\r\n this.domainConfigurationService.loadConfiguration(\r\n storedDomainConfiguration\r\n );\r\n }\r\n this.initializerService.initializeDomainStoryModelerClasses();\r\n this.modeler = new DomainStoryModeler({\r\n container: '#canvas',\r\n keyboard: {\r\n bindTo: document,\r\n },\r\n\r\n // Disable BPMN-SearchModule and re-enable browser Search\r\n additionalModules: [\r\n {\r\n bpmnSearch: ['value', 'foo'],\r\n },\r\n ],\r\n });\r\n\r\n if (this.modeler.get) {\r\n this.canvas = this.modeler.get('canvas');\r\n this.elementRegistry = this.modeler.get('elementRegistry');\r\n this.eventBus = this.modeler.get('eventBus');\r\n this.commandStack = this.modeler.get('commandStack');\r\n this.selection = this.modeler.get('selection');\r\n }\r\n\r\n this.initializerService.initializeDomainStoryModelerEventHandlers(\r\n this.commandStack,\r\n this.eventBus\r\n );\r\n this.initializerService.propagateDomainStoryModelerClassesToServices(\r\n this.commandStack,\r\n this.elementRegistry,\r\n this.canvas,\r\n this.selection,\r\n this.modeler\r\n );\r\n\r\n const exportArtifacts = this.debounce(this.saveSVG, 500);\r\n if (this.modeler.get) {\r\n this.modeler.on('commandStack.changed', exportArtifacts);\r\n }\r\n\r\n this.initializerService.initiateEventBusListeners(\r\n this.eventBus,\r\n this.commandStack\r\n );\r\n\r\n this.modeler.createDiagram();\r\n // expose bpmnjs to window for debugging purposes\r\n assign(window, { bpmnjs: this.modeler });\r\n\r\n this.startDebounce();\r\n }\r\n\r\n restart(\r\n domainConfiguration?: DomainConfiguration,\r\n domainStory?: BusinessObject[]\r\n ): void {\r\n const currentStory =\r\n domainStory != undefined\r\n ? domainStory\r\n : this.elementRegistryService\r\n .createObjectListForDSTDownload()\r\n .map((e) => e.businessObject);\r\n if (!domainConfiguration) {\r\n domainConfiguration = this.storageService.getStoredDomainConfiguration();\r\n }\r\n if (domainConfiguration) {\r\n this.storageService.setStoredDomainConfiguration(domainConfiguration);\r\n this.iconDictionaryService.setCusomtConfiguration(domainConfiguration);\r\n this.domainConfigurationService.loadConfiguration(domainConfiguration);\r\n }\r\n\r\n this.elementRegistryService.clear();\r\n this.modeler?.destroy();\r\n this.postInit();\r\n if (currentStory && this.modeler.get) {\r\n this.modeler.importCustomElements(currentStory);\r\n }\r\n }\r\n\r\n /** Interactions with the Modeler **/\r\n getModeler(): any {\r\n return this.modeler;\r\n }\r\n\r\n commandStackChanged(): void {\r\n // to update the title of the svg, we need to tell the command stack, that a value has changed\r\n this.eventBus.fire(\r\n 'commandStack.changed',\r\n this.debounce(this.saveSVG, 500)\r\n );\r\n }\r\n\r\n startDebounce(): void {\r\n this.debounce(this.saveSVG, 500);\r\n }\r\n\r\n debounce(fn: any, timeout: number): any {\r\n return () => {\r\n let timer;\r\n if (timer) {\r\n clearTimeout(timer);\r\n }\r\n timer = setTimeout(() => {\r\n // tslint:disable-next-line:no-unused-expression\r\n fn(this.modeler).then((svg: string) => {\r\n this.encoded = svg;\r\n }) as Promise;\r\n }, timeout);\r\n };\r\n }\r\n\r\n getEncoded(): string {\r\n return this.encoded ? this.encoded : '';\r\n }\r\n\r\n async saveSVG(modeler: any): Promise {\r\n try {\r\n const result = await modeler.saveSVG();\r\n return result.svg;\r\n } catch (err) {\r\n alert('There was an error saving the SVG.\\n' + err);\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ModelerService } from 'src/app/Service/Modeler/modeler.service';\r\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\r\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\r\nimport { DirtyFlagService } from 'src/app/Service/DirtyFlag/dirty-flag.service';\r\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class RendererService {\r\n constructor(\r\n private modelerService: ModelerService,\r\n private elementRegistryService: ElementRegistryService,\r\n private dirtyFlagService: DirtyFlagService\r\n ) {}\r\n\r\n renderStory(domainStory: BusinessObject[]): void {\r\n this.modelerService.getModeler().importCustomElements(domainStory);\r\n }\r\n\r\n importStory(\r\n domainStory: BusinessObject[],\r\n configurationChange: boolean,\r\n config?: DomainConfiguration,\r\n makeClean = true\r\n ): void {\r\n this.modelerService.restart(config, domainStory);\r\n this.renderStory(domainStory);\r\n\r\n this.elementRegistryService.correctInitialize();\r\n\r\n this.modelerService.commandStackChanged();\r\n this.modelerService.startDebounce();\r\n\r\n if (makeClean) {\r\n this.dirtyFlagService.makeClean();\r\n }\r\n }\r\n\r\n getStory(): BusinessObject[] {\r\n return this.elementRegistryService\r\n .createObjectListForDSTDownload()\r\n .map((c) => c.businessObject);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ReplayStateService {\r\n private replayOnSubject = new BehaviorSubject(false);\r\n\r\n replayOn$ = this.replayOnSubject.asObservable();\r\n\r\n setReplayState(state: boolean): void {\r\n this.replayOnSubject.next(state);\r\n }\r\n\r\n getReplayOn(): boolean {\r\n return this.replayOnSubject.value;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ReplayStateService } from 'src/app/Service/Replay/replay-state.service';\r\nimport { DomManipulationService } from 'src/app/Service/DomManipulation/dom-manipulation.service';\r\nimport { StoryStep } from 'src/app/Domain/Replay/storyStep';\r\nimport { StoryCreatorService } from './storyCreator/story-creator.service';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { MatSnackBar } from '@angular/material/snack-bar';\r\nimport {\r\n SNACKBAR_DURATION,\r\n SNACKBAR_INFO,\r\n} from '../../Domain/Common/constants';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ReplayService {\r\n private story: StoryStep[] = [];\r\n private currentStep = new BehaviorSubject(-1);\r\n private maxStepNumber = new BehaviorSubject(0);\r\n\r\n currentStep$ = this.currentStep.asObservable();\r\n maxStepNumber$ = this.maxStepNumber.asObservable();\r\n\r\n constructor(\r\n private replayStateService: ReplayStateService,\r\n private domManipulationService: DomManipulationService,\r\n private storyCreatorService: StoryCreatorService,\r\n private snackbar: MatSnackBar\r\n ) {}\r\n\r\n initializeReplay(): void {\r\n this.currentStep.next(1);\r\n this.story = this.storyCreatorService.traceActivitiesAndCreateStory();\r\n this.maxStepNumber.next(this.story.length);\r\n }\r\n\r\n getCurrentStepNumber(): number {\r\n return this.currentStep.value;\r\n }\r\n\r\n getMaxStepNumber(): number {\r\n return this.maxStepNumber.value;\r\n }\r\n\r\n nextStep(): void {\r\n if (this.currentStep.value < this.story.length) {\r\n this.currentStep.next(this.currentStep.value + 1);\r\n this.showCurrentStep();\r\n }\r\n }\r\n\r\n previousStep(): void {\r\n if (this.currentStep.value > 1) {\r\n this.currentStep.next(this.currentStep.value - 1);\r\n this.showCurrentStep();\r\n }\r\n }\r\n\r\n private showCurrentStep() {\r\n this.domManipulationService.showStep(\r\n this.story[this.currentStep.value - 1],\r\n this.currentStep.value > 1\r\n ? this.story[this.currentStep.value - 2]\r\n : undefined\r\n );\r\n }\r\n\r\n startReplay(): void {\r\n this.initializeReplay();\r\n if (this.story?.length) {\r\n const missingSteps = this.storyCreatorService.getMissingSteps(this.story);\r\n if (missingSteps.length === 0) {\r\n this.replayStateService.setReplayState(true);\r\n this.domManipulationService.showStep(\r\n this.story[this.currentStep.getValue() - 1]\r\n );\r\n } else {\r\n const steps = missingSteps.join(', ');\r\n this.snackbar.open(\r\n steps.length === 1\r\n ? `The Domain Story is not complete. Step ${steps} is missing.`\r\n : `The Domain Story is not complete. Steps ${steps} are missing.`,\r\n undefined,\r\n {\r\n duration: SNACKBAR_DURATION * 2,\r\n panelClass: SNACKBAR_INFO,\r\n }\r\n );\r\n }\r\n } else {\r\n this.snackbar.open('You need a Domain Story for replay.', undefined, {\r\n duration: SNACKBAR_DURATION * 2,\r\n panelClass: SNACKBAR_INFO,\r\n });\r\n }\r\n }\r\n\r\n stopReplay(): void {\r\n this.currentStep.next(-1);\r\n this.maxStepNumber.next(0);\r\n this.replayStateService.setReplayState(false);\r\n this.domManipulationService.showAll();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { elementTypes } from '../../../Domain/Common/elementTypes';\r\nimport { ActivityCanvasObject } from '../../../Domain/Common/activityCanvasObject';\r\nimport { BusinessObject } from '../../../Domain/Common/businessObject';\r\nimport { CanvasObject } from '../../../Domain/Common/canvasObject';\r\nimport { ElementRegistryService } from '../../ElementRegistry/element-registry.service';\r\nimport { StoryStep } from '../../../Domain/Replay/storyStep';\r\nimport { Dictionary } from '../../../Domain/Common/dictionary/dictionary';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class StoryCreatorService {\r\n constructor(private elementRegistryService: ElementRegistryService) {}\r\n\r\n traceActivitiesAndCreateStory(): StoryStep[] {\r\n const tracedActivityMap = new Dictionary();\r\n const story: StoryStep[] = [];\r\n const activities = this.elementRegistryService.getActivitiesFromActors();\r\n\r\n activities.forEach((activity) => {\r\n const activityNumber = Number(activity.businessObject.number); // Sometimes the activityNumber is a string for some reason\r\n const tracedItem = tracedActivityMap.get(`${activityNumber - 1}`)\r\n ? tracedActivityMap.get(`${activityNumber - 1}`)\r\n : [];\r\n tracedItem.push(activity);\r\n tracedActivityMap.set(`${activityNumber - 1}`, tracedItem);\r\n });\r\n\r\n for (let i = 0; i < tracedActivityMap.keysArray().length; i++) {\r\n this.createStep(tracedActivityMap, i, story);\r\n }\r\n this.addGroupStep(story);\r\n return story;\r\n }\r\n\r\n private createStep(\r\n tracedActivityMap: Dictionary,\r\n i: number,\r\n story: StoryStep[]\r\n ): void {\r\n const stepObjects = this.getStepObjects(\r\n tracedActivityMap.get(`${i}`) || []\r\n );\r\n const highlightedElements = stepObjects.map((t) => t.id);\r\n if (i > 0) {\r\n story[i - 1].objects.forEach((object) => {\r\n if (!stepObjects.includes(object)) {\r\n stepObjects.push(object);\r\n }\r\n });\r\n }\r\n story[i] = {\r\n highlightedObjects: highlightedElements,\r\n objects: stepObjects,\r\n };\r\n }\r\n\r\n getMissingSteps(story: StoryStep[]): number[] {\r\n if (!story || story.length === 0) {\r\n return [];\r\n }\r\n\r\n const missingSteps: number[] = [];\r\n let complete = true;\r\n for (let i = 0; i < story.length; i++) {\r\n if (\r\n !story[i] ||\r\n !(story[i].objects.length > 0) ||\r\n story[i].objects.filter(\r\n (element) => element.type === elementTypes.ACTIVITY\r\n ).length <= 0\r\n ) {\r\n missingSteps.push(i + 1);\r\n complete = false;\r\n }\r\n }\r\n return missingSteps;\r\n }\r\n\r\n private getStepObjects(\r\n tracedActivity: ActivityCanvasObject[]\r\n ): BusinessObject[] {\r\n const initialSource: CanvasObject[] = [];\r\n const activities = tracedActivity;\r\n const targetObjects: CanvasObject[] = [];\r\n\r\n tracedActivity.forEach((parallelStep: ActivityCanvasObject) => {\r\n initialSource.push(parallelStep.source);\r\n\r\n const firstTarget = parallelStep.target;\r\n targetObjects.push(firstTarget);\r\n\r\n // check the outgoing activities for each target\r\n for (const checkTarget of targetObjects) {\r\n if (\r\n checkTarget.businessObject &&\r\n !checkTarget.businessObject.type.includes('actor') &&\r\n checkTarget.outgoing\r\n ) {\r\n // check the target for each outgoing activity\r\n checkTarget.outgoing.forEach((activity: ActivityCanvasObject) => {\r\n activities.push(activity);\r\n const activityTarget = activity.target;\r\n if (activityTarget && !targetObjects.includes(activityTarget)) {\r\n targetObjects.push(activityTarget);\r\n }\r\n });\r\n }\r\n }\r\n });\r\n return initialSource\r\n .map((e) => e.businessObject)\r\n .concat(activities.map((a) => a.businessObject))\r\n .concat(targetObjects.map((t) => t.businessObject));\r\n }\r\n\r\n /** Groups should be shown at the End of the Story **/\r\n private addGroupStep(story: StoryStep[]): void {\r\n const groups = this.elementRegistryService.getAllGroups() as CanvasObject[];\r\n if (groups.length > 0) {\r\n story.push({\r\n highlightedObjects: [],\r\n objects: groups\r\n .map((g) => g.businessObject)\r\n .concat(story[story.length - 1].objects),\r\n });\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SettingsService {\r\n private showSettings = new BehaviorSubject(false);\r\n showSettings$ = this.showSettings.asObservable();\r\n\r\n close(): void {\r\n this.showSettings.next(false);\r\n }\r\n\r\n open(): void {\r\n this.showSettings.next(true);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport {\r\n INITIAL_DESCRIPTION,\r\n INITIAL_DOMAIN_NAME,\r\n INITIAL_TITLE,\r\n VERSION,\r\n} from '../../Domain/Common/constants';\r\nimport { CommandStackService } from '../CommandStack/command-stack.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class TitleService {\r\n private titleSubject = new BehaviorSubject(INITIAL_TITLE);\r\n private descriptionSubject = new BehaviorSubject(INITIAL_DESCRIPTION);\r\n private domainNameSubject = new BehaviorSubject(INITIAL_DOMAIN_NAME);\r\n private showDescriptionSubject = new BehaviorSubject(true);\r\n\r\n title$ = this.titleSubject.asObservable();\r\n description$ = this.descriptionSubject.asObservable();\r\n showDescription$ = this.showDescriptionSubject.asObservable();\r\n domainName$ = this.domainNameSubject.asObservable();\r\n\r\n constructor(private commandStackService: CommandStackService) {}\r\n\r\n updateTitleAndDescription(\r\n title: string | null,\r\n description: string | null,\r\n allowUndo: boolean\r\n ): void {\r\n if (allowUndo) {\r\n this.fireTitleAndDescriptionUpdate(title, description);\r\n } else {\r\n this.updateTitle(title);\r\n this.updateDescription(description);\r\n }\r\n }\r\n\r\n private updateTitle(title: string | null): void {\r\n this.titleSubject.next(title ?? this.titleSubject.value);\r\n document.title = title ?? this.titleSubject.value + ' - egon.io';\r\n }\r\n\r\n private updateDescription(description: string | null): void {\r\n this.descriptionSubject.next(description ?? this.descriptionSubject.value);\r\n }\r\n\r\n setShowDescription(show: boolean): void {\r\n this.showDescriptionSubject.next(show);\r\n }\r\n\r\n setDomainName(name: string): void {\r\n this.domainNameSubject.next(name);\r\n }\r\n\r\n getTitle(): string {\r\n return this.titleSubject.value;\r\n }\r\n\r\n getDescription(): string {\r\n return this.descriptionSubject.value;\r\n }\r\n\r\n getDomainName(): string {\r\n return this.domainNameSubject.value;\r\n }\r\n\r\n getVersion(): string {\r\n return VERSION;\r\n }\r\n\r\n private fireTitleAndDescriptionUpdate(\r\n newTitle: string | null,\r\n newDescription: string | null\r\n ): void {\r\n const context = {\r\n newTitle,\r\n newDescription,\r\n };\r\n this.commandStackService.execute(\r\n 'story.updateHeadlineAndDescription',\r\n context\r\n );\r\n }\r\n}\r\n","'use strict';\r\n\r\n// convert rad to deg\r\nexport function degrees(radians: number): number {\r\n return (radians * 180) / Math.PI;\r\n}\r\n\r\n// calculate the angle between two points in 2D\r\nexport function angleBetween(\r\n startPoint: Point,\r\n endPoint: Point\r\n): number | undefined {\r\n let quadrant;\r\n\r\n // determine in which quadrant we are\r\n if (startPoint.x <= endPoint.x) {\r\n if (startPoint.y >= endPoint.y) {\r\n quadrant = 0;\r\n } // upper right quadrant\r\n else {\r\n quadrant = 3;\r\n } // lower right quadrant\r\n } else {\r\n if (startPoint.y >= endPoint.y) {\r\n quadrant = 1;\r\n } // upper left Quadrant\r\n else {\r\n quadrant = 2;\r\n } // lower left quadrant\r\n }\r\n\r\n const adjacent = Math.abs(startPoint.y - endPoint.y);\r\n const opposite = Math.abs(startPoint.x - endPoint.x);\r\n\r\n // since the arcus-tangens only gives values between 0 and 90, we have to adjust for the quadrant we are in\r\n\r\n if (quadrant === 0) {\r\n return 90 - degrees(Math.atan2(opposite, adjacent));\r\n }\r\n if (quadrant === 1) {\r\n return 90 + degrees(Math.atan2(opposite, adjacent));\r\n }\r\n if (quadrant === 2) {\r\n return 270 - degrees(Math.atan2(opposite, adjacent));\r\n }\r\n if (quadrant === 3) {\r\n return 270 + degrees(Math.atan2(opposite, adjacent));\r\n }\r\n return undefined;\r\n}\r\n\r\nexport function positionsMatch(\r\n width: number,\r\n height: number,\r\n elementX: number,\r\n elementY: number,\r\n clickX: number,\r\n clickY: number\r\n): boolean {\r\n if (clickX > elementX && clickX < elementX + width) {\r\n if (clickY > elementY && clickY < elementY + height) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\n\r\nexport class Point {\r\n y = 0;\r\n x = 0;\r\n}\r\n","import { elementTypes } from 'src/app/Domain/Common/elementTypes';\r\n\r\nexport function getNameFromType(type: string): string {\r\n if (type.includes(elementTypes.ACTOR)) {\r\n return type.replace(elementTypes.ACTOR, '');\r\n } else if (type.includes(elementTypes.WORKOBJECT)) {\r\n return type.replace(elementTypes.WORKOBJECT, '');\r\n }\r\n return '';\r\n}\r\n","'use strict';\r\n\r\n// sanitize user-Input to be Desktop-Filename safe\r\nexport function sanitizeForDesktop(str: string): string {\r\n const map: { [key: string]: string } = {\r\n '/': '',\r\n '\\\\': '',\r\n ':': '',\r\n '*': '',\r\n '?': '',\r\n '\"': '',\r\n '<': '',\r\n '>': '',\r\n '|': '',\r\n };\r\n const reg = /[/\\\\:*?\"<>|]/gi;\r\n return str ? str.replace(reg, (match) => map[match]) : '';\r\n}\r\n\r\nexport function sanitizeIconName(name: string): string {\r\n const map: { [key: string]: string } = {\r\n '/': '',\r\n '\\\\': '',\r\n ':': '',\r\n '*': '',\r\n '?': '',\r\n '\"': '',\r\n '<': '',\r\n '>': '',\r\n '|': '',\r\n '(': '',\r\n ')': '',\r\n ' ': '-',\r\n '.': '_',\r\n };\r\n const reg = /[/\\\\:*?\"<>|() .]/gi;\r\n return name\r\n ? name.replace(reg, (match) => {\r\n return map[match];\r\n })\r\n : '';\r\n}\r\n\r\nexport function restoreTitleFromFileName(\r\n filename: string,\r\n isSVG: boolean\r\n): string {\r\n let title;\r\n\r\n const dstRegex = /_\\d+-\\d+-\\d+( ?_?-?\\(\\d+\\))?(-?\\d)?(.dst|.egn)/;\r\n const svgRegex = /_\\d+-\\d+-\\d+( ?_?-?\\(\\d+\\))?(-?\\d)?(.dst|.egn).svg/;\r\n\r\n const egnSuffix = '.dst';\r\n const dstSuffix = '.dst';\r\n const svgSuffix = '.svg';\r\n\r\n let filenameWithoutDateSuffix = filename.replace(\r\n isSVG ? svgRegex : dstRegex,\r\n ''\r\n );\r\n if (filenameWithoutDateSuffix.includes(isSVG ? svgSuffix : dstSuffix)) {\r\n filenameWithoutDateSuffix = filenameWithoutDateSuffix\r\n .replace(svgSuffix, '')\r\n .replace(dstSuffix, '')\r\n .replace(egnSuffix, '');\r\n }\r\n title = filenameWithoutDateSuffix;\r\n return title;\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { SettingsService } from 'src/app/Service/Settings/settings.service';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\nimport { DialogService } from './Service/Dialog/dialog.service';\r\nimport { MatDialogConfig } from '@angular/material/dialog';\r\nimport { InfoDialogData } from './Domain/Dialog/infoDialogData';\r\nimport { InfoDialogComponent } from './Presentation/Dialog/info-dialog/info-dialog.component';\r\nimport { TitleService } from './Service/Title/title.service';\r\nimport { VERSION } from './Domain/Common/constants';\r\nimport { ExportService } from './Service/Export/export.service';\r\nimport { ReplayStateService } from './Service/Replay/replay-state.service';\r\nimport { ReplayService } from './Service/Replay/replay.service';\r\n\r\n@Component({\r\n selector: 'app-root',\r\n templateUrl: './app.component.html',\r\n styleUrls: ['./app.component.scss'],\r\n})\r\nexport class AppComponent implements OnInit {\r\n showSettings$: Observable | BehaviorSubject;\r\n showDescription$: Observable;\r\n version: string = '';\r\n\r\n constructor(\r\n private settingsService: SettingsService,\r\n private dialogService: DialogService,\r\n private titleService: TitleService,\r\n private exportService: ExportService,\r\n private replayStateSerice: ReplayStateService,\r\n private replayService: ReplayService\r\n ) {\r\n this.showSettings$ = new BehaviorSubject(false);\r\n this.showDescription$ = new BehaviorSubject(true);\r\n this.version = VERSION;\r\n\r\n document.onkeydown = (e: KeyboardEvent) => {\r\n if (e.ctrlKey && e.key === 's') {\r\n if (this.exportService.isDomainStoryExportable()) {\r\n this.exportService.downloadDST();\r\n }\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n if (e.ctrlKey && e.key === 'l') {\r\n document.getElementById('import')?.click();\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n if (e.key === 'ArrowRight' && this.replayStateSerice.getReplayOn()) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n replayService.nextStep();\r\n }\r\n if (e.key === 'ArrowLeft' && this.replayStateSerice.getReplayOn()) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n replayService.previousStep();\r\n }\r\n };\r\n }\r\n\r\n ngOnInit(): void {\r\n this.showDescription$ = this.titleService.showDescription$;\r\n this.showSettings$ = this.settingsService.showSettings$;\r\n }\r\n\r\n openLinkDialog(link: string, title: string, text: string): void {\r\n const config = new MatDialogConfig();\r\n config.disableClose = false;\r\n config.autoFocus = true;\r\n\r\n config.data = new InfoDialogData(title, text, true, true, link);\r\n\r\n this.dialogService.openDialog(InfoDialogComponent, config);\r\n }\r\n}\r\n","
\r\n \r\n \r\n \r\n\r\n \r\n \r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n\r\n","import { ApplicationRef, DoBootstrap, NgModule } from '@angular/core';\r\nimport { BrowserModule } from '@angular/platform-browser';\r\nimport {\r\n MAT_CHECKBOX_DEFAULT_OPTIONS,\r\n MatCheckboxDefaultOptions,\r\n} from '@angular/material/checkbox';\r\n\r\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { HeaderComponent } from 'src/app/Presentation/Header/header.component';\r\nimport { SettingsComponent } from 'src/app/Presentation/Settings/settings.component';\r\nimport { AppComponent } from 'src/app/app.component';\r\nimport { ExportService } from 'src/app/Service/Export/export.service';\r\nimport { ImportDomainStoryService } from 'src/app/Service/Import/import-domain-story.service';\r\nimport { ImportRepairService } from 'src/app/Service/Import/import-repair.service';\r\nimport { ModelerService } from 'src/app/Service/Modeler/modeler.service';\r\nimport { TitleService } from 'src/app/Service/Title/title.service';\r\nimport { LabelDictionaryService } from 'src/app/Service/LabelDictionary/label-dictionary.service';\r\nimport { ReplayService } from 'src/app/Service/Replay/replay.service';\r\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\r\nimport { DomainConfigurationService } from 'src/app/Service/DomainConfiguration/domain-configuration.service';\r\nimport { MassNamingService } from 'src/app/Service/LabelDictionary/mass-naming.service';\r\nimport { InfoDialogComponent } from 'src/app/Presentation/Dialog/info-dialog/info-dialog.component';\r\nimport { ExportDialogComponent } from 'src/app/Presentation/Dialog/export-dialog/export-dialog.component';\r\nimport { ActivityDialogComponent } from 'src/app/Presentation/Dialog/activity-dialog/activity-dialog.component';\r\nimport { UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms';\r\nimport { HeaderDialogComponent } from 'src/app/Presentation/Dialog/header-dialog/header-dialog.component';\r\nimport { IconDictionaryService } from 'src/app/Service/DomainConfiguration/icon-dictionary.service';\r\nimport { ModelerComponent } from 'src/app/Presentation/Canvas/modeler.component';\r\nimport { SettingsModule } from 'src/app/Modules/settings.module';\r\nimport { AutosaveService } from './Service/Autosave/autosave.service';\r\nimport { DomainStoryModelerModuleModule } from './Modules/domain-story-modeler-module.module';\r\nimport { LabelDictionaryDialogComponent } from './Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component';\r\nimport { MaterialModule } from './material.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n HeaderComponent,\r\n SettingsComponent,\r\n AppComponent,\r\n InfoDialogComponent,\r\n ExportDialogComponent,\r\n ActivityDialogComponent,\r\n HeaderDialogComponent,\r\n ModelerComponent,\r\n LabelDictionaryDialogComponent,\r\n ],\r\n imports: [\r\n BrowserModule,\r\n NoopAnimationsModule,\r\n ReactiveFormsModule,\r\n SettingsModule,\r\n DomainStoryModelerModuleModule,\r\n MaterialModule,\r\n ],\r\n providers: [\r\n AutosaveService,\r\n ExportService,\r\n ImportDomainStoryService,\r\n ImportRepairService,\r\n IconDictionaryService,\r\n TitleService,\r\n LabelDictionaryService,\r\n ReplayService,\r\n ElementRegistryService,\r\n DomainConfigurationService,\r\n ModelerService,\r\n MassNamingService,\r\n UntypedFormBuilder,\r\n {\r\n provide: MAT_CHECKBOX_DEFAULT_OPTIONS,\r\n useValue: { clickAction: 'noop' } as MatCheckboxDefaultOptions,\r\n },\r\n ],\r\n})\r\nexport class AppModule implements DoBootstrap {\r\n constructor(private autosaveService: AutosaveService) {\r\n // autosaveService wird so automatisch initialisiert, auf keinen Fall entfernen!\r\n }\r\n\r\n ngDoBootstrap(app: ApplicationRef): void {\r\n const componentElement = document.createElement('app-root');\r\n document.body.append(componentElement);\r\n app.bootstrap(AppComponent);\r\n }\r\n}\r\n","import { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\r\nimport { NgModule } from '@angular/core';\r\n\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatGridListModule } from '@angular/material/grid-list';\r\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatCheckboxModule } from '@angular/material/checkbox';\r\n\r\n@NgModule({\r\n imports: [\r\n MatButtonModule,\r\n MatButtonToggleModule,\r\n MatListModule,\r\n MatCheckboxModule,\r\n MatDialogModule,\r\n MatFormFieldModule,\r\n MatGridListModule,\r\n MatInputModule,\r\n MatToolbarModule,\r\n MatExpansionModule,\r\n MatSnackBarModule,\r\n MatCardModule,\r\n ],\r\n exports: [\r\n MatButtonModule,\r\n MatButtonToggleModule,\r\n MatListModule,\r\n MatCheckboxModule,\r\n MatDialogModule,\r\n MatFormFieldModule,\r\n MatGridListModule,\r\n MatInputModule,\r\n MatToolbarModule,\r\n MatExpansionModule,\r\n MatSnackBarModule,\r\n MatCardModule,\r\n ],\r\n})\r\nexport class MaterialModule {}\r\n","// This file can be replaced during build by using the `fileReplacements` array.\r\n// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.\r\n// The list of file replacements can be found in `angular.json`.\r\n\r\nexport const environment = {\r\n production: false,\r\n};\r\n\r\n/*\r\n * For easier debugging in development mode, you can import the following file\r\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\r\n *\r\n * This import should be commented out in production mode because it will have a negative impact\r\n * on performance if an error is thrown.\r\n */\r\n// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.\r\n","import { enableProdMode } from '@angular/core';\r\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r\n\r\nimport { AppModule } from './app/app.module';\r\nimport { environment } from './environments/environment';\r\n\r\nif (environment.production) {\r\n enableProdMode();\r\n}\r\n\r\nplatformBrowserDynamic()\r\n .bootstrapModule(AppModule)\r\n .catch((err) => console.error(err));\r\n"],"names":["Modeler","ResizeModule","assign","isArray","inherits","DomainStoryModule","LabelEditingModule","ModelingModule","elementTypes","DomainStoryModeler","options","call","_customElements","_groupElements","prototype","_modules","concat","_addCustomShape","customElement","parentId","parent","children","push","canvas","get","elementFactory","customAttrs","businessObject","customShape","create","isGroup","id","parentShape","addShape","_addCustomConnection","elementRegistry","connection","source","target","addConnection","importCustomElements","elements","fire","addCustomElements","customElements","Error","shapes","connections","groups","forEach","isConnection","getCustomElements","createDiagram","done","element","type","ACTIVITY","CONNECTION","GROUP","Replace","modeling","_modeling","replaceElement","oldElement","newElementData","newElement","setCenterOfElement","outgoingActivities","outgoing","incomingActivities","incoming","x","Math","ceil","width","y","height","name","replaceShape","replaceOptions","ReplaceMenuProvider","_dsReplace","$inject","getEntries","entries","includes","actorReplaceOptions","workObjectReplaceOptions","_createEntries","menuEntries","self","definition","entry","_createMenuEntry","action","replaceAction","label","className","actionName","getNameFromType","iconDictionaryService","initializeReplaceOptions","iconDictionary","actorTypes","getTypeDictionary","ACTOR","replaceOption","i","keysArray","actorType","typeName","toLowerCase","getIconForBPMN","workObjectTypes","WORKOBJECT","workObjectType","ContextPadProvider","bind","generateAutomaticNumber","getAllStandardIconKeys","dirtyFlagService","initializeContextPadProvider","dirtyFlag","DomainStoryContextPadProvider","injector","connect","translate","contextPad","popupMenu","replaceMenuProvider","commandStack","eventBus","startConnect","selectedElement","invoke","autoPlace","cached","getContextPadEntries","colorPicker","document","getElementById","onchange","ev","context","newColor","value","execute","makeDirty","registerProvider","allStandardIconKeys","actions","event","autoActivate","start","replace","addColorChange","addConnectWithActivity","addTextAnnotation","addActors","appendAction","addWorkObjects","addChangeWorkObjectTypeMenu","addChangeActorTypeMenu","delete","deleteGroup","group","title","click","removeGroup","moveDeleteActionToEndOfArray","removeElements","changeDirection","position","getReplaceMenuPosition","cursor","open","colorChange","TEXTANNOTATION","dragstart","icon","newNumber","Y_OFFSET","diagramContainer","getContainer","pad","getPad","html","diagramRect","getBoundingClientRect","padRect","top","left","appendStart","shape","createShape","hints","BpmnElementFactory","DEFAULT_LABEL_SIZE","DomainStoryIdFactory","DomainStoryElementFactory","bpmnFactory","moddle","domainStoryIdFactory","elementType","attrs","baseCreate","test","registerId","getId","key","set","$type","di","$descriptor","_getCustomElementSize","Object","defineProperty","createBpmnElement","__default","Dimensions","idList","generateId","idNumber","fourDigitsId","idSuffix","containsId","floor","random","same","BaseRenderer","Ids","getAnnotationBoxHeight","componentsToPath","createLine","append","svgAppend","attr","svgAttr","classes","svgClasses","svgCreate","query","domQuery","isObject","getNumberStash","addNumberToRegistry","numberBoxDefinitions","calculateTextWidth","countLines","labelPosition","angleBetween","RENDERER_IDS","numbers","DEFAULT_COLOR","initializeRenderer","elementRegistryService","DomainStoryRenderer","styles","textRenderer","pathMap","rendererId","next","markers","computeStyle","generateActivityNumber","parentGfx","box","numberStash","semantic","use","number","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","p","svgDynamicSizeAttributes","actor","getTypeIconSRC","drawWorkObject","workObject","useColorForActivity","strokeWidth","strokeLinejoin","markerEnd","marker","drawActivity","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","getConnectionPath","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","getLabel","autocomplete","isAny","getExternalLabelMid","isLabelExternal","hasExternalLabel","isLabel","dictionaryService","stashUse","initializeLabelEditingProvider","labelingDictionary","toggleStashUse","DSLabelEditingProvider","directEditing","resizeHandles","_canvas","_textRenderer","_updateLabelHandler","activateDirectEdit","complete","isActive","cancel","removeResizers","createAutocomplete","canExecute","isTouch","force","activate","editingBox","focus","getWorkObjectLabels","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","inp","arr","closeAllLists","currentFocus","addEventListener","autocompleteList","autocompleteItem","val","createElement","parentNode","appendChild","substr","toUpperCase","onclick","visibility","onkeydown","keyCode","addActive","preventDefault","removeActive","classList","survivor","removeChild","ChangeSupportModule","DirectEditingModule","dSlabelEditingProvider","dSlabelEditingPreview","str","split","amountWaypoints","determinedPosition","xPos","yPos","labelPositionX","labelPositionY","offsetX","scaledAngle","offsetY","Modeling","_commandStack","updateNumber","oldShape","newShape","newData","numberRegistry","multipleNumberRegistry","canvasElementRegistry","initializeNumbering","canvasElementRegistryService","boxHeight","elementActivity","usedNumbers","wantedNumber","activitiesFromActors","getActivitiesFromActors","updateExistingNumbersAtGeneration","setTimeout","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","VERSION","INITIAL_TITLE","INITIAL_DESCRIPTION","INITIAL_DOMAIN_NAME","DOMAIN_CONFIGURATION_TAG","DEFAULT_AUTOSAVES_AMOUNT","DEFAULT_AUTOSAVES_INTERVAL","SNACKBAR_DURATION","SNACKBAR_SUCCESS","SNACKBAR_ERROR","SNACKBAR_INFO","IMPLICIT_ROOT_ID","all","size","isEmpty","Entry","addEach","clear","filter","found","sort","sortByName","a","b","structuredClone","testCustomDomainConfiguration","fromConfigurationFromFile","configFromFile","actorsDict","workObjectsDict","IconConfiguration","allIconDictionary","getDefaultConf","defaultConf","updateAllIconRegistry","appendSRCFile","newAppendedIcons","appen","createCustomConf","domainConfiguration","domainName","allIconsConf","ActivityDialogData","numberIsAllowedMultipleTimes","showNumberFields","saveFN","ExportDialogData","ExportOption","tooltip","InfoDialogData","infoText","isInfo","isLink","linkText","NUMBER_BACKGROUND_COLOR","NUMBER_COLOR","STROKE_WIDTH","HIGHLIGHT_NUMBER_BACKGROUNG_COLOR","HIGHLIGHT_NUMBER_COLOR","HIGHLIGHT_COLOR","HIGHLIGHT_STROKE_WIDTH","appendedIcons","allIcons","Person","Group","Pet","Conversation","World","Store","Theater","Business","Water","Hotel","Dining","Courthouse","Flag","Place","Car","Bus","Train","Truck","Taxi","Bike","Boat","Motorcycle","Plane","Shuttle","Walking","Traffic","Commute","System","Printer","Document","Folder","Call","Email","Copyright","DNS","Settings","Cellphone","Update","Briefcase","Microphone","Signal","Key","Pencil","Sum","Headset","Keyboard","Mouse","Router","Scanner","Security","Desktop","Tablet","Label","Receipt","Calendar","Cloud","Assessment","Dashboard","Problem","Grid","Watch","Euro","Dollar","Info","Alarm","Wrench","Favorite","Gavel","Blind","Hourglass","Time","Search","Shopping","Couch","Attach","Ruler","Education","allIconsDict","newIcons","IconFilterEnum","ConfigAndDST","domain","dst","testConfigAndDst","CommonModule","AutosaveSettingsComponent","AutosaveOptionsComponent","AutosavedDraftsComponent","FormsModule","MaterialModule","AutosaveSettingsModule","declarations","imports","exports","HeaderButtonsComponent","DomainStoryModelerModuleModule","DomainConfigurationComponent","IconListItemComponent","DetailsListItemComponent","DomainDetailsComponent","GeneralSettingsComponent","LabelDictionaryComponent","SettingsModule","i0","autosaveConfiguration","snackbar","save","activated","amount","interval","setConfiguration","duration","panelClass","selectors","decls","vars","consts","template","autosaveService","subscription","autosavedDraftsChanged$","subscribe","initDrafts","ngOnInit","drafts","loadCurrentDrafts","loadDraft","draft","removeAllDrafts","ModelerComponent","modelerService","postInit","MAT_DIALOG_DATA","ActivityDialogComponent","fb","dialogRef","activityLabel","activityNumber","form","multipleNumbers","onSubmit","patchValue","close","BehaviorSubject","ExportDialogComponent","withTitle","useWhiteBackground","doOption","updateWithTitle","$event","checked","updateUseWhiteBackground","HeaderDialogComponent","InfoDialogComponent","showConfirmButton","hasLink","ngAfterViewInit","span","scrollHeight","LabelDictionaryDialogComponent","ngAfterViewChecked","createIcon","img","iconInitiated","svg","inputs","sanitizeIconName","domainCustomizationService","ICON_FILTER_NONE","domainConfigurationTypes","getDomainConfiguration","getFullDictionary","allIconNames","selectedActors","selectedActors$","selectedWorkobjects","selectedWorkobjects$","allFiltered","getFilteredNamesForType","allFilteredIconNames","loadMinimalIconConfigurationWithDefaultIcons","resetDomain","loadInitialConfiguration","saveDomain","getUsedIcons","exportDomain","startIconUpload","importIcon","files","iconInputFile","reader","FileReader","iconName","onloadend","addIMGToIconDictionary","registerIconForBPMN","addNewIcon","readAsDataURL","startDomainImport","importDomain","domainInputFile","loadConfiguration","importConfiguration","readAsText","filterForActors","ICON_FILTER_ACTOR","filterForWorkobjects","ICON_FILTER_WORKOBJECT","filterForUnassigned","ICON_FILTER_UNASSIGNED","filterByNameAndType","filteredByNameAndType","isIconActor","isIconWorkObject","customizationService","domainName$","changeName","getIconForName","allowDrop","listName","draggedList","onDrop","list","sortedList","draggedIndex","setSelectedActors","setSelectedWorkObject","onDragStart","isWorkobject","isNone","toggleNone","setAsUnassigned","toggleActor","setAsActor","toggleWorkobject","setAsWorkobject","MatDialogConfig","settingsService","replayStateService","dialogService","replayService","exportService","importService","isReplay$","replayOn$","isDirty$","dirty$","showDescription","showDescription$","import","filename","endsWith","importDST","importEGN","commandStackChanged","setShowDescription","show","openSettings","openDownloadDialog","isDomainStoryExportable","SVGDownloadOption","downloadSVG","EGNDownloadOption","downloadDST","PNGDownloadOption","downloadPNG","HTMLDownloadOption","downloadHTMLPresentation","disableClose","autoFocus","openDialog","openHeaderDialog","openKeyboardShortcutsDialog","shortCutText","openLabelDictionary","startReplay","stopReplay","previousStep","nextStep","combineLatest","HeaderComponent","title$","description$","stepDescription$","currentStep$","maxStepNumber$","pipe","step","count","EventEmitter","labelDictionaryService","createLabelDictionaries","workObjectEntries","activityEntries","getActivityLabels","workobjectEntriesSubject","activityEntriesSubject","activityNames","originalActivityNames","workObjectNames","originalWorkObjectNames","originalName","w","workobject","massRenameLabels","closeEmitter","emit","updateActivityEntry","activityEntry","updateWorkobjectEntry","workobjectEntry","outputs","SettingsComponent","savedConfiguration","getAndClearSavedConfiguration","restart","openGeneralSettings","showGeneralSettings","showDomainCustomization","openDomainCustomization","ReplaySubject","AUTOSAVE_CONFIGURATION_TAG","defaultConfiguration","AutosaveConfigurationService","storageService","configurationSubject","asObservable","initializeConfiguration","saveConfiguration","factory","providedIn","Subject","DRAFTS_TAG","AutosaveService","iconDistionaryService","rendererService","configuration$","updateConfiguration","readDrafts","sortDrafts","configAndDST","story","actorIcons","getElementsOfType","workObjectIcons","updateIconRegistries","importStory","stopTimer","startTimer","autosaveTimer","clearInterval","setInterval","newDraft","createDraft","isChanged","isSame","unshift","pop","writeDrafts","stringify","getStory","createConfigAndDST","date","Date","toString","aDate","bDate","StorageService","setItem","json","removeItem","checkValidityOfConfiguration","configuratioFromFile","getStoredDomainConfiguration","domainString","setStoredDomainConfiguration","configForStorage","CommandStackService","setCommandStack","payload","DialogService","matDialog","dialog","DirtyFlagService","isDirtySubject","makeClean","dirty","DomManipulationService","showAll","removeHighlights","getAllCanvasObjects","getAllGroups","domObject","display","showStep","replayStep","notShown","getAllNotShown","hightlightStep","o","getNumberDomForActivity","numberDOMS","numberBackgroundDom","numberTextDom","allActivities","getAllActivities","allConnections","getAllConnections","activityDomObject","connectionDomObject","stepObjects","shownElements","notShownElements","allObjects","DomainConfigurationService","setDomainName","exportConfiguration","getCurrentConfigurationForExport","configJSONString","getDomainName","encodeURIComponent","body","customConfig","updateDomainName","actorDict","workObjectDict","actorKeys","workObjectKeys","getIconConfiguration","addIconsFromDomainConfiguration","configurationName","getCurrentConfiguration","getActorsDictionary","getWorkObjectsDictionary","createConfigFromDictionaries","currentConfiguration","getCurrentConfigurationNamesWithoutPrefix","createMinimalConfigurationWithDefaultIcons","minimalConfig","createConfigFromCanvas","getIconSource","actorNames","workobjectNames","newActors","newWorkobjects","allCanvasObjects","DomainCustomizationService","getAllIconDictionary","addIconToAllIconList","importedConfigurationEvent","storedDomainConfiguration","importedConfiguration","getImportedConfiguration","allIconListItems","selectedActorNames","selectActor","selectedWorkobjectNames","selectWorkObject","changedDomain","deselectActor","deselectWorkobject","updateIcon","updateActorSubject","updateWorkObjectSubject","configurationHasChanged","defaultConfig","workObjectName","actorName","updateAllIconBehaviourSubjects","resetToInitialConfiguration","usedIcons","imported","changedActors","changedWorkobjects","createDomainConfiguration","configurationActors","configurationWorkobjects","workobjects","changedDomainCofiguration","updateIcons","join","temp","iconDict","getSrcForIcon","addIconsToCss","iconBehaviourSubject","customDomainCofiguration","rawSrc","ICON_PREFIX","IconDictionaryService","iconConfig","allTypes","initDictionary","actorIconDictionary","workObjectDictionary","dictionary","namePrefix","customConfiguration","allInTypeDictionary","collection","allIn","dictionaryType","iconTypes","registerIconForType","iconDictionaryForBPMN","addIconsToTypeDictionary","extractCustomIconsFromDictionary","addNewIconsToDictionary","elementDictionary","sanitizedName","custom","input","fullDictionary","appendedDict","getTypeDictionaryKeys","elementOfType","setCusomtConfiguration","ElementRegistryService","fullyInitialized","registry","__implicitroot","setElementRegistry","_elements","createObjectListForDSTDownload","allObjectsFromCanvas","objectList","fillListOfCanvasObjects","canvasElement","groupObjects","checkChildForGroup","currentGroup","registryElementNames","getAllActors","getAllWorkobjects","co","sanitizeForDesktop","ExportService","pngService","svgService","htmlPresentationService","titleSubscription","descriptionSubscription","ngOnDestroy","unsubscribe","DomainStory","getStoryForDownload","downloadFile","datatype","fileEnding","svgData","createSVGData","container","svgElements","outerSVGElement","viewport","layerBase","image","extractSVG","prepareSVG","onload","getWidth","getHeight","fillStyle","drawImage","png64","toDataURL","ele","toISOString","then","info","version","doT","HtmlPresentationService","setModelerClasses","selection","modeler","viewBoxCoordinates","ViewBoxCoordinate","saveSVG","fixActivityMarkersForEachStep","getCurrentStepNumber","content","transition","err","alert","getMaxStepNumber","revealjsTemplate","dots","revealjsData","script","sentences","multiplexSecret","multiplexId","fixMalformedHtmlScript","viewBoxIndex","splitViewBox","dataStart","dataEnd","createBounds","sectionIndex","newDefs","ids","idToReplace","newId","replaceAll","PngService","browserSpecs","ua","navigator","userAgent","tem","M","exec","appName","appVersion","URIHashtagFix","fix","browser","parseInt","findMostOuterElements","xRight","yDown","sub","elXLeft","elXRight","elYUp","elYDown","transform","nums","rects","outerRect","calculateWidthAndHeight","insertIndex","layerResizers","layerOverlays","removeAttribute","XMLSerializer","serializeToString","SvgService","cacheData","getEncoded","svgIndex","backgroundColorWhite","findIndexToInsertData","appendDST","restoreTitleFromFileName","ImportDomainStoryService","importRepairService","domainConfigurationService","importedConfigurationEmitter","isSVG","fileReader","titleText","fileReaderFunction","isEGN","dstText","removeXMLComments","dstAndConfig","extractDstAndConfig","configChanged","checkConfigForChanges","lastElement","importVersionNumber","handleVersionNumber","checkForUnreferencedElementsInActivitiesAndRepair","showBrokenImportDialog","adjustPositions","versionPrefix","lastIndexOf","updateCustomElementsPreviousV050","showPreviousV050Dialog","xmlText","newActorKeys","newWorkObjectKeys","currentActorKeys","currentWorkobjectKeys","changed","clearName","setImportedConfigurationAndEmit","ImportRepairService","objectIDs","activityIndex","isFirst","findFirstElement","adjustElementPosition","LabelDictionaryService","massNamingService","activityLabels","workObjektLabels","localeCompare","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","ModelerService","initializerService","keyboard","bindTo","additionalModules","bpmnSearch","exportArtifacts","debounce","window","startDebounce","domainStory","currentStory","destroy","getModeler","timeout","timer","clearTimeout","encoded","RendererService","renderStory","configurationChange","c","ReplayStateService","replayOnSubject","setReplayState","state","ReplayService","domManipulationService","storyCreatorService","currentStep","maxStepNumber","initializeReplay","traceActivitiesAndCreateStory","showCurrentStep","missingSteps","getMissingSteps","getValue","steps","StoryCreatorService","tracedActivityMap","tracedItem","createStep","addGroupStep","getStepObjects","highlightedElements","highlightedObjects","tracedActivity","initialSource","targetObjects","parallelStep","firstTarget","checkTarget","activityTarget","g","SettingsService","showSettings","TitleService","titleSubject","descriptionSubject","showDescriptionSubject","domainNameSubject","allowUndo","fireTitleAndDescriptionUpdate","updateTitle","updateDescription","getVersion","degrees","radians","PI","quadrant","adjacent","opposite","atan2","Point","reg","dstRegex","svgRegex","egnSuffix","dstSuffix","svgSuffix","filenameWithoutDateSuffix","AppComponent","replayStateSerice","showSettings$","ctrlKey","openLinkDialog","link","BrowserModule","MAT_CHECKBOX_DEFAULT_OPTIONS","NoopAnimationsModule","UntypedFormBuilder","ReactiveFormsModule","AppModule","ngDoBootstrap","app","componentElement","bootstrap","provide","useValue","clickAction","MatDialogModule","MatFormFieldModule","MatInputModule","MatToolbarModule","MatExpansionModule","MatCardModule","MatSnackBarModule","MatButtonModule","MatGridListModule","MatButtonToggleModule","MatListModule","MatCheckboxModule","environment","production","enableProdMode","__NgCli_bootstrap_1","bootstrapModule","catch","console","error"],"sourceRoot":"webpack:///","x_google_ignoreList":[]} \ No newline at end of file