From 07bd147e6f7785d569ba39e0a8b51fdc1fa2de21 Mon Sep 17 00:00:00 2001 From: "Egon.io Bot" Date: Mon, 19 Aug 2024 13:22:18 +0000 Subject: [PATCH] Deploy latest build --- app-latest-build/main.js | 286 +++++++++++++++++++++++------------ app-latest-build/main.js.map | 2 +- 2 files changed, 194 insertions(+), 94 deletions(-) diff --git a/app-latest-build/main.js b/app-latest-build/main.js index 08aa047..3467083 100644 --- a/app-latest-build/main.js +++ b/app-latest-build/main.js @@ -3752,21 +3752,23 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ AppComponent: () => (/* binding */ AppComponent) /* harmony export */ }); -/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rxjs */ 95536); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rxjs */ 95536); /* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../environments/environment */ 45312); -/* harmony import */ var ngx_color_picker__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ngx-color-picker */ 32580); +/* harmony import */ var ngx_color_picker__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ngx-color-picker */ 32580); /* harmony import */ var _domain_entities_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./domain/entities/constants */ 40550); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/core */ 96623); /* harmony import */ var src_app_workbench_services_settings_settings_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/workbench/services/settings/settings.service */ 1299); /* harmony import */ var _tools_title_services_title_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tools/title/services/title.service */ 41535); /* harmony import */ var _tools_export_services_export_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./tools/export/services/export.service */ 39595); /* harmony import */ var _tools_autosave_services_autosave_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./tools/autosave/services/autosave.service */ 41707); -/* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); +/* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); /* harmony import */ var _tools_replay_services_replay_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./tools/replay/services/replay.service */ 3687); -/* harmony import */ var _workbench_presentation_header_header_header_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./workbench/presentation/header/header/header.component */ 38361); -/* harmony import */ var _workbench_presentation_settings_settings_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./workbench/presentation/settings/settings.component */ 45263); -/* harmony import */ var _tools_modeler_presentation_modeler_modeler_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./tools/modeler/presentation/modeler/modeler.component */ 87286); -/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _tools_modeler_services_modeler_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./tools/modeler/services/modeler.service */ 40439); +/* harmony import */ var _workbench_presentation_header_header_header_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./workbench/presentation/header/header/header.component */ 38361); +/* harmony import */ var _workbench_presentation_settings_settings_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./workbench/presentation/settings/settings.component */ 45263); +/* harmony import */ var _tools_import_directive_dragDrop_directive__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./tools/import/directive/dragDrop.directive */ 42482); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/common */ 39191); + @@ -3785,24 +3787,25 @@ __webpack_require__.r(__webpack_exports__); function AppComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) { - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelement"](0, "app-settings"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelement"](0, "app-settings"); } } class AppComponent { - constructor(settingsService, titleService, exportService, autosaveService, cd, snackbar, replayService) { + constructor(settingsService, titleService, exportService, autosaveService, cd, snackbar, replayService, modelerService) { this.settingsService = settingsService; this.titleService = titleService; this.exportService = exportService; this.autosaveService = autosaveService; this.cd = cd; this.snackbar = snackbar; + this.modelerService = modelerService; this.version = _environments_environment__WEBPACK_IMPORTED_MODULE_0__.environment.version; this.color = _domain_entities_constants__WEBPACK_IMPORTED_MODULE_1__.BLACK; this.skipNextColorUpdate = false; // define preset colors that have good contrast on white background and are compatible to EventStorming notation this.colorBox = [_domain_entities_constants__WEBPACK_IMPORTED_MODULE_1__.YELLOW, _domain_entities_constants__WEBPACK_IMPORTED_MODULE_1__.ORANGE, _domain_entities_constants__WEBPACK_IMPORTED_MODULE_1__.RED, _domain_entities_constants__WEBPACK_IMPORTED_MODULE_1__.LIGHT_PINK, _domain_entities_constants__WEBPACK_IMPORTED_MODULE_1__.DARK_PINK, _domain_entities_constants__WEBPACK_IMPORTED_MODULE_1__.PURPLE, _domain_entities_constants__WEBPACK_IMPORTED_MODULE_1__.BLUE, _domain_entities_constants__WEBPACK_IMPORTED_MODULE_1__.CYAN, _domain_entities_constants__WEBPACK_IMPORTED_MODULE_1__.GREEN, _domain_entities_constants__WEBPACK_IMPORTED_MODULE_1__.LIME, _domain_entities_constants__WEBPACK_IMPORTED_MODULE_1__.GREY, _domain_entities_constants__WEBPACK_IMPORTED_MODULE_1__.BLACK]; - this.showSettings$ = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject(false); - this.showDescription$ = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject(true); + this.showSettings$ = new rxjs__WEBPACK_IMPORTED_MODULE_12__.BehaviorSubject(false); + this.showDescription$ = new rxjs__WEBPACK_IMPORTED_MODULE_12__.BehaviorSubject(true); document.addEventListener('keydown', e => { if (e.ctrlKey && e.key === 's') { e.preventDefault(); @@ -3852,6 +3855,7 @@ class AppComponent { }); } ngOnInit() { + this.modelerService.postInit(); this.showDescription$ = this.titleService.showDescription$; this.showSettings$ = this.settingsService.showSettings$; } @@ -3871,93 +3875,93 @@ class AppComponent { this.cd.detectChanges(); } static #_ = this.ɵfac = function AppComponent_Factory(t) { - return new (t || AppComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](src_app_workbench_services_settings_settings_service__WEBPACK_IMPORTED_MODULE_2__.SettingsService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](_tools_title_services_title_service__WEBPACK_IMPORTED_MODULE_3__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](_tools_export_services_export_service__WEBPACK_IMPORTED_MODULE_4__.ExportService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](_tools_autosave_services_autosave_service__WEBPACK_IMPORTED_MODULE_5__.AutosaveService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_10__.ChangeDetectorRef), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_12__.MatSnackBar), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](_tools_replay_services_replay_service__WEBPACK_IMPORTED_MODULE_6__.ReplayService)); + return new (t || AppComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵdirectiveInject"](src_app_workbench_services_settings_settings_service__WEBPACK_IMPORTED_MODULE_2__.SettingsService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵdirectiveInject"](_tools_title_services_title_service__WEBPACK_IMPORTED_MODULE_3__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵdirectiveInject"](_tools_export_services_export_service__WEBPACK_IMPORTED_MODULE_4__.ExportService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵdirectiveInject"](_tools_autosave_services_autosave_service__WEBPACK_IMPORTED_MODULE_5__.AutosaveService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_11__.ChangeDetectorRef), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵdirectiveInject"](_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_13__.MatSnackBar), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵdirectiveInject"](_tools_replay_services_replay_service__WEBPACK_IMPORTED_MODULE_6__.ReplayService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵdirectiveInject"](_tools_modeler_services_modeler_service__WEBPACK_IMPORTED_MODULE_7__.ModelerService)); }; - static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdefineComponent"]({ + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵdefineComponent"]({ type: AppComponent, selectors: [["app-root"]], viewQuery: function AppComponent_Query(rf, ctx) { if (rf & 1) { - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵviewQuery"](ngx_color_picker__WEBPACK_IMPORTED_MODULE_13__.ColorPickerDirective, 5); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵviewQuery"](ngx_color_picker__WEBPACK_IMPORTED_MODULE_14__.ColorPickerDirective, 5); } if (rf & 2) { let _t; - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵloadQuery"]()) && (ctx.colorPicker = _t.first); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵloadQuery"]()) && (ctx.colorPicker = _t.first); } }, decls: 36, vars: 40, - consts: [["role", "main", 1, "content"], ["id", "colorPicker", 2, "display", "none", "height", "0", 3, "colorPickerChange", "colorPickerClose", "cpPresetColors", "colorPicker"], ["src", "favicon.ico", "height", "24", "alt", "Egon Logo"], ["href", "https://egon.io", "target", "_blank"], ["href", "https://egon.io/changelog", "target", "_blank"], ["src", "assets/logo/wps-icon.ico", "height", "24", "alt", "WPS Logo"], ["href", "https://www.wps.de/", "target", "_blank"], ["href", "https://www.wps.de/datenschutz/", "target", "_blank"], ["href", "https://www.wps.de/impressum/", "target", "_blank"]], + consts: [["role", "main", 1, "content"], ["id", "colorPicker", 2, "display", "none", "height", "0", 3, "colorPickerChange", "colorPickerClose", "cpPresetColors", "colorPicker"], ["appDrag", "", "id", "canvas"], ["src", "favicon.ico", "height", "24", "alt", "Egon Logo"], ["href", "https://egon.io", "target", "_blank"], ["href", "https://egon.io/changelog", "target", "_blank"], ["src", "assets/logo/wps-icon.ico", "height", "24", "alt", "WPS Logo"], ["href", "https://www.wps.de/", "target", "_blank"], ["href", "https://www.wps.de/datenschutz/", "target", "_blank"], ["href", "https://www.wps.de/impressum/", "target", "_blank"]], template: function AppComponent_Template(rf, ctx) { if (rf & 1) { - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](0, "div", 0)(1, "input", 1); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtwoWayListener"]("colorPickerChange", function AppComponent_Template_input_colorPickerChange_1_listener($event) { - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtwoWayBindingSet"](ctx.color, $event) || (ctx.color = $event); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementStart"](0, "div", 0)(1, "input", 1); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵtwoWayListener"]("colorPickerChange", function AppComponent_Template_input_colorPickerChange_1_listener($event) { + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵtwoWayBindingSet"](ctx.color, $event) || (ctx.color = $event); return $event; }); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("colorPickerClose", function AppComponent_Template_input_colorPickerClose_1_listener($event) { + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵlistener"]("colorPickerClose", function AppComponent_Template_input_colorPickerClose_1_listener($event) { return ctx.onColorChanged($event); }); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtemplate"](2, AppComponent_Conditional_2_Template, 1, 0, "app-settings"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](3, "async"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](4, "div"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](5, "async"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](6, "async"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](7, "async"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](8, "async"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](9, "async"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelement"](10, "app-header"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](11, "async"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](12, "async"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelement"](13, "app-modeler"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](14, "div"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](15, "async"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](16, "async"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](17, "span"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelement"](18, "img", 2); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](19, "a", 3); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](20, " egon.io"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](21, "span"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](22, "version: "); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](23, "a", 4); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](24); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](25, "span"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](26, "by "); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelement"](27, "img", 5); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](28, "a", 6); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](29, "WPS"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](30, "span")(31, "a", 7); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](32, "Privacy"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](33, "span")(34, "a", 8); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](35, "Imprint"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()()()(); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵtemplate"](2, AppComponent_Conditional_2_Template, 1, 0, "app-settings"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipe"](3, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementStart"](4, "div"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipe"](5, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipe"](6, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipe"](7, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipe"](8, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipe"](9, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelement"](10, "app-header"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipe"](11, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipe"](12, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelement"](13, "div", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementStart"](14, "div"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipe"](15, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipe"](16, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementStart"](17, "span"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelement"](18, "img", 3); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementStart"](19, "a", 4); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵtext"](20, " egon.io"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementStart"](21, "span"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵtext"](22, "version: "); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementStart"](23, "a", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵtext"](24); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementStart"](25, "span"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵtext"](26, "by "); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelement"](27, "img", 6); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementStart"](28, "a", 7); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵtext"](29, "WPS"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementStart"](30, "span")(31, "a", 8); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵtext"](32, "Privacy"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementStart"](33, "span")(34, "a", 9); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵtext"](35, "Imprint"); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵelementEnd"]()()()(); } if (rf & 2) { - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵadvance"](); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵstyleProp"]("background", ctx.color); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵproperty"]("cpPresetColors", ctx.colorBox); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtwoWayProperty"]("colorPicker", ctx.color); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵadvance"](); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵconditional"](2, _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipeBind1"](3, 20, ctx.showSettings$) ? 2 : -1); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵadvance"](2); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵclassProp"]("headerAndCanvas", !_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipeBind1"](5, 22, ctx.showSettings$) && _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipeBind1"](6, 24, ctx.showDescription$))("headerAndCanvasCollapsed", !_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipeBind1"](7, 26, ctx.showSettings$) && !_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipeBind1"](8, 28, ctx.showDescription$))("hidden", _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipeBind1"](9, 30, ctx.showSettings$)); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵadvance"](6); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵclassProp"]("header", _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipeBind1"](11, 32, ctx.showDescription$))("headerCollapsed", !_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipeBind1"](12, 34, ctx.showDescription$)); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵadvance"](4); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵclassProp"]("logoContainer", !_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipeBind1"](15, 36, ctx.showSettings$))("hidden", _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipeBind1"](16, 38, ctx.showSettings$)); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵadvance"](10); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtextInterpolate"](ctx.version); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵstyleProp"]("background", ctx.color); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵproperty"]("cpPresetColors", ctx.colorBox); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵtwoWayProperty"]("colorPicker", ctx.color); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵconditional"](2, _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipeBind1"](3, 20, ctx.showSettings$) ? 2 : -1); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵclassProp"]("headerAndCanvas", !_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipeBind1"](5, 22, ctx.showSettings$) && _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipeBind1"](6, 24, ctx.showDescription$))("headerAndCanvasCollapsed", !_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipeBind1"](7, 26, ctx.showSettings$) && !_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipeBind1"](8, 28, ctx.showDescription$))("hidden", _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipeBind1"](9, 30, ctx.showSettings$)); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵadvance"](6); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵclassProp"]("header", _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipeBind1"](11, 32, ctx.showDescription$))("headerCollapsed", !_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipeBind1"](12, 34, ctx.showDescription$)); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵadvance"](4); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵclassProp"]("logoContainer", !_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipeBind1"](15, 36, ctx.showSettings$))("hidden", _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵpipeBind1"](16, 38, ctx.showSettings$)); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵadvance"](10); + _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵtextInterpolate"](ctx.version); } }, - dependencies: [ngx_color_picker__WEBPACK_IMPORTED_MODULE_13__.ColorPickerDirective, _workbench_presentation_header_header_header_component__WEBPACK_IMPORTED_MODULE_7__.HeaderComponent, _workbench_presentation_settings_settings_component__WEBPACK_IMPORTED_MODULE_8__.SettingsComponent, _tools_modeler_presentation_modeler_modeler_component__WEBPACK_IMPORTED_MODULE_9__.ModelerComponent, _angular_common__WEBPACK_IMPORTED_MODULE_14__.AsyncPipe], + dependencies: [ngx_color_picker__WEBPACK_IMPORTED_MODULE_14__.ColorPickerDirective, _workbench_presentation_header_header_header_component__WEBPACK_IMPORTED_MODULE_8__.HeaderComponent, _workbench_presentation_settings_settings_component__WEBPACK_IMPORTED_MODULE_9__.SettingsComponent, _tools_import_directive_dragDrop_directive__WEBPACK_IMPORTED_MODULE_10__.DragDirective, _angular_common__WEBPACK_IMPORTED_MODULE_15__.AsyncPipe], styles: [".content[_ngcontent-%COMP%] {\n height: 100%;\n overflow: hidden;\n}\n\n\n\n.headerAndCanvas[_ngcontent-%COMP%] {\n height: 100%;\n width: 100%;\n display: grid;\n grid-template-rows: min-content auto;\n overflow: hidden;\n}\n\n.headerAndCanvasCollapsed[_ngcontent-%COMP%] {\n height: 100%;\n width: 100%;\n display: grid;\n grid-template-rows: min-content auto;\n overflow: hidden;\n}\n\n.settings[_ngcontent-%COMP%] {\n height: 100%;\n}\n\n.header[_ngcontent-%COMP%] {\n display: grid;\n grid-template-rows: min-content 155px;\n}\n\n\n\n.logoContainer[_ngcontent-%COMP%] {\n display: flex;\n position: absolute;\n bottom: 0;\n right: 100px;\n align-items: flex-end;\n}\n.logoContainer[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n margin-left: 16px;\n margin-bottom: 14px;\n align-items: center;\n}\n\n.hidden[_ngcontent-%COMP%] {\n height: 1px;\n width: 1px;\n}\n\n#wrapper[_ngcontent-%COMP%] {\n padding: 16px;\n min-height: 100%;\n height: 100%;\n box-sizing: border-box; \n\n}\n\n#tab-group[_ngcontent-%COMP%] {\n height: 100%;\n}\n\n#tab-group[_ngcontent-%COMP%] mat-tab-body[_ngcontent-%COMP%] {\n flex-grow: 1;\n}\n\n.mat-button-toggle-label-content[_ngcontent-%COMP%] {\n font-size: 10pt !important;\n padding: 0 5px !important;\n line-height: inherit !important;\n}\n\n .mdc-text-field--filled:not(.mdc-text-field--disabled) {\n background-color: white;\n}\n\nspan[_ngcontent-%COMP%] *[_ngcontent-%COMP%] {\n vertical-align: middle;\n}\n\nspan[_ngcontent-%COMP%] {\n height: 24px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLFlBQUE7RUFDQSxnQkFBQTtBQUNGOztBQUVBLHFCQUFBO0FBRUE7RUFDRSxZQUFBO0VBQ0EsV0FBQTtFQUNBLGFBQUE7RUFDQSxvQ0FBQTtFQUNBLGdC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NwYW4ge1xuICAgIG1hcmdpbi1sZWZ0OiAxNnB4O1xuICAgIG1hcmdpbi1ib3R0b206IDE0cHg7XG4gICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgfVxufVxuXG4uaGlkZGVuIHtcbiAgaGVpZ2h0OiAxcHg7XG4gIHdpZHRoOiAxcHg7XG59XG5cbiN3cmFwcGVyIHtcbiAgcGFkZGluZzogMTZweDtcbiAgbWluLWhlaWdodDogMTAwJTtcbiAgaGVpZ2h0OiAxMDAlO1xuICBib3gtc2l6aW5nOiBib3JkZXItYm94OyAvKm5ldyovXG59XG5cbiN0YWItZ3JvdXAge1xuICBoZWlnaHQ6IDEwMCU7XG59XG5cbiN0YWItZ3JvdXAgbWF0LXRhYi1ib2R5IHtcbiAgZmxleC1ncm93OiAxO1xufVxuXG4vLyBNYXRlcmlhbCBEZXNpZ24gT3ZlcnJpZGVzXG4ubWF0LWJ1dHRvbi10b2dnbGUtbGFiZWwtY29udGVudCB7XG4gIGZvbnQtc2l6ZTogMTBwdCAhaW1wb3J0YW50O1xuICBwYWRkaW5nOiAwIDVweCAhaW1wb3J0YW50O1xuICBsaW5lLWhlaWdodDogaW5oZXJpdCAhaW1wb3J0YW50O1xufVxuXG46Om5nLWRlZXAubWRjLXRleHQtZmllbGQtLWZpbGxlZDpub3QoLm1kYy10ZXh0LWZpZWxkLS1kaXNhYmxlZCkge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTtcbn1cblxuc3BhbiAqIHtcbiAgdmVydGljYWwtYWxpZ246IG1pZGRsZTtcbn1cblxuc3BhbiB7XG4gIGhlaWdodDogMjRweDtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0= */"] }); } @@ -3974,19 +3978,19 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ AppModule: () => (/* binding */ AppModule) /* harmony export */ }); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @angular/core */ 96623); -/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @angular/platform-browser */ 4199); -/* harmony import */ var _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @angular/material/checkbox */ 62827); -/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @angular/platform-browser/animations */ 91244); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @angular/platform-browser */ 4199); +/* harmony import */ var _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @angular/material/checkbox */ 62827); +/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @angular/platform-browser/animations */ 91244); /* harmony import */ var src_app_app_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/app.component */ 20092); /* harmony import */ var src_app_tools_import_services_import_domain_story_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/tools/import/services/import-domain-story.service */ 93586); /* harmony import */ var src_app_tools_label_dictionary_services_label_dictionary_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/tools/label-dictionary/services/label-dictionary.service */ 69731); /* harmony import */ var src_app_domain_services_element_registry_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/domain/services/element-registry.service */ 85511); /* harmony import */ var src_app_tools_icon_set_config_services_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/tools/icon-set-config/services/icon-set-configuration.service */ 46527); -/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @angular/forms */ 48015); +/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @angular/forms */ 48015); /* harmony import */ var src_app_tools_icon_set_config_services_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/tools/icon-set-config/services/icon-dictionary.service */ 6932); /* harmony import */ var _material_module__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./material.module */ 89439); -/* harmony import */ var ngx_color_picker__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ngx-color-picker */ 32580); +/* harmony import */ var ngx_color_picker__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ngx-color-picker */ 32580); /* harmony import */ var _domain_services_dirty_flag_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./domain/services/dirty-flag.service */ 94658); /* harmony import */ var _tools_icon_set_config_services_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./tools/icon-set-config/services/icon-set-customization.service */ 46252); /* harmony import */ var _tools_modeler_bpmn_modeler_context_pad_domainStoryContextPadProvider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./tools/modeler/bpmn/modeler/context-pad/domainStoryContextPadProvider */ 17325); @@ -4005,7 +4009,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _tools_label_dictionary_presentation_label_dictionary_module__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./tools/label-dictionary/presentation/label-dictionary.module */ 10462); /* harmony import */ var _tools_modeler_presentation_modeler_module__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./tools/modeler/presentation/modeler.module */ 71638); /* harmony import */ var _tools_title_presentation_title_module__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./tools/title/presentation/title.module */ 80302); -/* harmony import */ var _tools_autosave_services_autosave_service__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./tools/autosave/services/autosave.service */ 41707); +/* harmony import */ var _tools_import_directive_dragDrop_directive__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./tools/import/directive/dragDrop.directive */ 42482); +/* harmony import */ var _tools_autosave_services_autosave_service__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./tools/autosave/services/autosave.service */ 41707); + @@ -4051,19 +4057,19 @@ class AppModule { app.bootstrap(src_app_app_component__WEBPACK_IMPORTED_MODULE_0__.AppComponent); } static #_ = this.ɵfac = function AppModule_Factory(t) { - return new (t || AppModule)(_angular_core__WEBPACK_IMPORTED_MODULE_26__["ɵɵinject"](_tools_autosave_services_autosave_service__WEBPACK_IMPORTED_MODULE_25__.AutosaveService)); + return new (t || AppModule)(_angular_core__WEBPACK_IMPORTED_MODULE_27__["ɵɵinject"](_tools_autosave_services_autosave_service__WEBPACK_IMPORTED_MODULE_26__.AutosaveService)); }; - static #_2 = this.ɵmod = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_26__["ɵɵdefineNgModule"]({ + static #_2 = this.ɵmod = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_27__["ɵɵdefineNgModule"]({ type: AppModule }); - static #_3 = this.ɵinj = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_26__["ɵɵdefineInjector"]({ - providers: [_angular_forms__WEBPACK_IMPORTED_MODULE_27__.UntypedFormBuilder, { - provide: _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_28__.MAT_CHECKBOX_DEFAULT_OPTIONS, + static #_3 = this.ɵinj = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_27__["ɵɵdefineInjector"]({ + providers: [_angular_forms__WEBPACK_IMPORTED_MODULE_28__.UntypedFormBuilder, { + provide: _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_29__.MAT_CHECKBOX_DEFAULT_OPTIONS, useValue: { clickAction: 'noop' } }, { - provide: _angular_core__WEBPACK_IMPORTED_MODULE_26__.APP_INITIALIZER, + provide: _angular_core__WEBPACK_IMPORTED_MODULE_27__.APP_INITIALIZER, useFactory: initialize, multi: true, deps: [_domain_services_dirty_flag_service__WEBPACK_IMPORTED_MODULE_7__.DirtyFlagService, src_app_tools_icon_set_config_services_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__.IconDictionaryService, src_app_tools_icon_set_config_services_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_4__.IconSetConfigurationService, src_app_domain_services_element_registry_service__WEBPACK_IMPORTED_MODULE_3__.ElementRegistryService, src_app_tools_label_dictionary_services_label_dictionary_service__WEBPACK_IMPORTED_MODULE_2__.LabelDictionaryService] @@ -4071,13 +4077,13 @@ class AppModule { provide: _tools_icon_set_config_services_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_8__.IconSetChangedService, useExisting: src_app_tools_import_services_import_domain_story_service__WEBPACK_IMPORTED_MODULE_1__.ImportDomainStoryService }], - imports: [_angular_platform_browser__WEBPACK_IMPORTED_MODULE_29__.BrowserModule, _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_30__.NoopAnimationsModule, _material_module__WEBPACK_IMPORTED_MODULE_6__.MaterialModule, ngx_color_picker__WEBPACK_IMPORTED_MODULE_31__.ColorPickerModule, _workbench_presentation_workbench_module__WEBPACK_IMPORTED_MODULE_16__.WorkbenchModule, _tools_autosave_presentation_autosave_module__WEBPACK_IMPORTED_MODULE_18__.AutosaveModule, _tools_export_presentation_export_module__WEBPACK_IMPORTED_MODULE_19__.ExportModule, _tools_icon_set_config_presentation_icon_set_config_module__WEBPACK_IMPORTED_MODULE_20__.IconSetConfigModule, _tools_import_presentation_import_module__WEBPACK_IMPORTED_MODULE_21__.ImportModule, _tools_label_dictionary_presentation_label_dictionary_module__WEBPACK_IMPORTED_MODULE_22__.LabelDictionaryModule, _tools_modeler_presentation_modeler_module__WEBPACK_IMPORTED_MODULE_23__.ModelerModule, _tools_title_presentation_title_module__WEBPACK_IMPORTED_MODULE_24__.TitleModule, _domain_presentation_domain_module__WEBPACK_IMPORTED_MODULE_17__.DomainModule] + imports: [_angular_platform_browser__WEBPACK_IMPORTED_MODULE_30__.BrowserModule, _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_31__.NoopAnimationsModule, _material_module__WEBPACK_IMPORTED_MODULE_6__.MaterialModule, ngx_color_picker__WEBPACK_IMPORTED_MODULE_32__.ColorPickerModule, _workbench_presentation_workbench_module__WEBPACK_IMPORTED_MODULE_16__.WorkbenchModule, _tools_autosave_presentation_autosave_module__WEBPACK_IMPORTED_MODULE_18__.AutosaveModule, _tools_export_presentation_export_module__WEBPACK_IMPORTED_MODULE_19__.ExportModule, _tools_icon_set_config_presentation_icon_set_config_module__WEBPACK_IMPORTED_MODULE_20__.IconSetConfigModule, _tools_import_presentation_import_module__WEBPACK_IMPORTED_MODULE_21__.ImportModule, _tools_label_dictionary_presentation_label_dictionary_module__WEBPACK_IMPORTED_MODULE_22__.LabelDictionaryModule, _tools_modeler_presentation_modeler_module__WEBPACK_IMPORTED_MODULE_23__.ModelerModule, _tools_title_presentation_title_module__WEBPACK_IMPORTED_MODULE_24__.TitleModule, _domain_presentation_domain_module__WEBPACK_IMPORTED_MODULE_17__.DomainModule] }); } (function () { - (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_26__["ɵɵsetNgModuleScope"](AppModule, { + (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_27__["ɵɵsetNgModuleScope"](AppModule, { declarations: [src_app_app_component__WEBPACK_IMPORTED_MODULE_0__.AppComponent], - imports: [_angular_platform_browser__WEBPACK_IMPORTED_MODULE_29__.BrowserModule, _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_30__.NoopAnimationsModule, _material_module__WEBPACK_IMPORTED_MODULE_6__.MaterialModule, ngx_color_picker__WEBPACK_IMPORTED_MODULE_31__.ColorPickerModule, _workbench_presentation_workbench_module__WEBPACK_IMPORTED_MODULE_16__.WorkbenchModule, _tools_autosave_presentation_autosave_module__WEBPACK_IMPORTED_MODULE_18__.AutosaveModule, _tools_export_presentation_export_module__WEBPACK_IMPORTED_MODULE_19__.ExportModule, _tools_icon_set_config_presentation_icon_set_config_module__WEBPACK_IMPORTED_MODULE_20__.IconSetConfigModule, _tools_import_presentation_import_module__WEBPACK_IMPORTED_MODULE_21__.ImportModule, _tools_label_dictionary_presentation_label_dictionary_module__WEBPACK_IMPORTED_MODULE_22__.LabelDictionaryModule, _tools_modeler_presentation_modeler_module__WEBPACK_IMPORTED_MODULE_23__.ModelerModule, _tools_title_presentation_title_module__WEBPACK_IMPORTED_MODULE_24__.TitleModule, _domain_presentation_domain_module__WEBPACK_IMPORTED_MODULE_17__.DomainModule] + imports: [_angular_platform_browser__WEBPACK_IMPORTED_MODULE_30__.BrowserModule, _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_31__.NoopAnimationsModule, _material_module__WEBPACK_IMPORTED_MODULE_6__.MaterialModule, ngx_color_picker__WEBPACK_IMPORTED_MODULE_32__.ColorPickerModule, _workbench_presentation_workbench_module__WEBPACK_IMPORTED_MODULE_16__.WorkbenchModule, _tools_autosave_presentation_autosave_module__WEBPACK_IMPORTED_MODULE_18__.AutosaveModule, _tools_export_presentation_export_module__WEBPACK_IMPORTED_MODULE_19__.ExportModule, _tools_icon_set_config_presentation_icon_set_config_module__WEBPACK_IMPORTED_MODULE_20__.IconSetConfigModule, _tools_import_presentation_import_module__WEBPACK_IMPORTED_MODULE_21__.ImportModule, _tools_label_dictionary_presentation_label_dictionary_module__WEBPACK_IMPORTED_MODULE_22__.LabelDictionaryModule, _tools_modeler_presentation_modeler_module__WEBPACK_IMPORTED_MODULE_23__.ModelerModule, _tools_title_presentation_title_module__WEBPACK_IMPORTED_MODULE_24__.TitleModule, _domain_presentation_domain_module__WEBPACK_IMPORTED_MODULE_17__.DomainModule, _tools_import_directive_dragDrop_directive__WEBPACK_IMPORTED_MODULE_25__.DragDirective] }); })(); function initialize(dirtyFlagService, iconDictionaryService, configurationService, elementRegistryService, labelDictionaryService) { @@ -8233,6 +8239,80 @@ class IconSetCustomizationService { /***/ }), +/***/ 42482: +/*!**************************************************************!*\ + !*** ./src/app/tools/import/directive/dragDrop.directive.ts ***! + \**************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ DragDirective: () => (/* binding */ DragDirective) +/* harmony export */ }); +/* harmony import */ var _domain_entities_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../domain/entities/constants */ 40550); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _services_import_domain_story_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../services/import-domain-story.service */ 93586); +/* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); + + + + +class DragDirective { + constructor(importDomainStoryService, snackbar) { + this.importDomainStoryService = importDomainStoryService; + this.snackbar = snackbar; + this.background = ''; + } + onDragOver(evt) { + evt.preventDefault(); + evt.stopPropagation(); + this.background = '#999'; + } + onDragLeave(evt) { + evt.preventDefault(); + evt.stopPropagation(); + this.background = ''; + } + onDrop(evt) { + evt.preventDefault(); + evt.stopPropagation(); + this.background = ''; + if (evt.dataTransfer?.files[0]) { + this.importDomainStoryService.performDropImport(evt.dataTransfer.files[0]); + } else { + this.snackbar.open('Nothing to import', undefined, { + duration: _domain_entities_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION_LONG, + panelClass: _domain_entities_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_ERROR + }); + } + } + static #_ = this.ɵfac = function DragDirective_Factory(t) { + return new (t || DragDirective)(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](_services_import_domain_story_service__WEBPACK_IMPORTED_MODULE_1__.ImportDomainStoryService), _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_3__.MatSnackBar)); + }; + static #_2 = this.ɵdir = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineDirective"]({ + type: DragDirective, + selectors: [["", "appDrag", ""]], + hostVars: 2, + hostBindings: function DragDirective_HostBindings(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵlistener"]("dragover", function DragDirective_dragover_HostBindingHandler($event) { + return ctx.onDragOver($event); + })("dragleave", function DragDirective_dragleave_HostBindingHandler($event) { + return ctx.onDragLeave($event); + })("drop", function DragDirective_drop_HostBindingHandler($event) { + return ctx.onDrop($event); + }); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵstyleProp"]("background", ctx.background); + } + }, + standalone: true + }); +} + +/***/ }), + /***/ 88401: /*!************************************************************************************!*\ !*** ./src/app/tools/import/presentation/import-dialog/import-dialog.component.ts ***! @@ -8453,6 +8533,26 @@ class ImportDomainStoryService { } this.modelerService.commandStackChanged(); } + performDropImport(file) { + const filename = file.name; + const dstSvgPattern = /.*(.dst)(\s*\(\d+\)){0,1}\.svg/; + const egnSvgPattern = /.*(.egn)(\s*\(\d+\)){0,1}\.svg/; + if (filename.endsWith('.dst')) { + this.importDST(file, filename, false); + } else if (filename.match(dstSvgPattern)) { + this.importDST(file, filename, true); + } else if (filename.endsWith('.egn')) { + this.importEGN(file, filename, false); + } else if (filename.match(egnSvgPattern)) { + this.importEGN(file, filename, true); + } else { + this.snackbar.open('File not supported', undefined, { + duration: _domain_entities_constants__WEBPACK_IMPORTED_MODULE_2__.SNACKBAR_DURATION_LONG, + panelClass: _domain_entities_constants__WEBPACK_IMPORTED_MODULE_2__.SNACKBAR_ERROR + }); + } + this.modelerService.commandStackChanged(); + } importFromUrl(fileUrl) { if (!fileUrl.startsWith('http')) { this.snackbar.open('Url not valid', undefined, { diff --git a/app-latest-build/main.js.map b/app-latest-build/main.js.map index 8376080..725daf9 100644 --- a/app-latest-build/main.js.map +++ b/app-latest-build/main.js.map @@ -1 +1 @@ -{"version":3,"file":"main.js","mappings":";;;;;;;;;;;;;;AAK0C;AAE1C,IAAII,mBAAmB,GAAG,CAAC;AAE3B;AACM,SAAUC,mCAAmCA,CACjDC,uBAAuB,EACvBC,KAAK,EACLC,WAAW,EACXC,KAAK,EACLC,KAAK,EACLC,KAAK;EAELP,mBAAmB,GAAGE,uBAAuB;EAE7CC,KAAK,GAAGA,KAAK,CAACK,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;EAErD,IAAIC,YAAY,GAAGC,WAAW,CAACP,KAAK,EAAEI,KAAK,CAAC;EAE5C,IAAII,kBAAkB,GAAGC,iBAAiB,CAACR,WAAW,EAAEG,KAAK,CAAC;EAE9D;EAEA,IAAIM,UAAU,GACZ,qGAAqG,IACpGR,KAAK,GAAG,EAAE,CAAC,GACZ,GAAG,IACFC,KAAK,GAAGN,mBAAmB,CAAC,GAC7B,2BAA2B,GAC3BS,YAAY,GACZE,kBAAkB,GAClB,cAAc;EAChB,OAAO;IAAEE,UAAU;IAAEb,mBAAmB,EAAEA;EAAmB,CAAE;AACjE;AAEA,SAASU,WAAWA,CAACI,IAAI,EAAEP,KAAK;EAC9B,IAAIQ,UAAU,GAAGC,QAAQ,CAACC,aAAa,CAAC,QAAQ,CAAC;EACjD,IAAIC,GAAG,GAAGH,UAAU,CAACI,UAAU,CAAC,IAAI,CAAC;EACrCD,GAAG,CAACE,IAAI,GAAG,YAAY;EAEvB,OAAOC,eAAe,CAACP,IAAI,EAAEP,KAAK,EAAEW,GAAG,EAAE,EAAE,EAAEpB,iFAAqB,EAAE,EAAE,CAAC;AACzE;AAEA,SAASc,iBAAiBA,CAACE,IAAI,EAAEP,KAAK;EACpC,IAAIH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EAEAjG,IAAIA,CAAA;IACF,IAAI,CAAC0zD,YAAY,CAACztD,IAAI,CAAC,IAAI,CAAC;EAC9B;EAAC,QAAA6hB,CAAA;qBAVUG,eAAe;EAAA;EAAA,QAAAY,EAAA;WAAfZ,eAAe;IAAAuI,OAAA,EAAfvI,eAAe,CAAAwI,IAAA;IAAAC,UAAA,EAFd;EAAM;;;;;;;;;;;;;;;ACJpB;AACA;AACA;AAEO,MAAM7L,WAAW,GAAG;EACzB8uC,UAAU,EAAE,KAAK;EACjBptC,OAAO,EAAE;CACV;AAED;;;;;;;AAOA;;;;;;;;;;;;;;;;AChB+C;AAGF;AACY;AAEzD,IAAI1B,kEAAW,CAAC8uC,UAAU,EAAE;EAC1BC,6DAAc,EAAE;AAClB;AAEAC,sEAAA,EAAwB,CACrBE,eAAe,CAACnoC,sDAAS,CAAC,CAC1BiwB,KAAK,CAAErb,GAAG,IAAKwzB,OAAO,CAACC,KAAK,CAACzzB,GAAG,CAAC,CAAC","sources":["./src/app/tools/export/services/exportUtil.js","./src/app/tools/modeler/bpmn/index.js","./src/app/tools/modeler/bpmn/modeler/change-icon/replace.js","./src/app/tools/modeler/bpmn/modeler/change-icon/replaceMenuProvider.js","./src/app/tools/modeler/bpmn/modeler/change-icon/replaceOptions.js","./src/app/tools/modeler/bpmn/modeler/context-pad/domainStoryContextPadProvider.js","./src/app/tools/modeler/bpmn/modeler/domainStoryElementFactory.js","./src/app/tools/modeler/bpmn/modeler/domainStoryIdFactory.js","./src/app/tools/modeler/bpmn/modeler/domainStoryRenderer.js","./src/app/tools/modeler/bpmn/modeler/domainStoryRules.js","./src/app/tools/modeler/bpmn/modeler/domainStoryUpdater.js","./src/app/tools/modeler/bpmn/modeler/index.js","./src/app/tools/modeler/bpmn/modeler/labeling/dsLabelEditingPreview.js","./src/app/tools/modeler/bpmn/modeler/labeling/dsLabelEditingProvider.js","./src/app/tools/modeler/bpmn/modeler/labeling/dsLabelUtil.js","./src/app/tools/modeler/bpmn/modeler/labeling/index.js","./src/app/tools/modeler/bpmn/modeler/labeling/position.js","./src/app/tools/modeler/bpmn/modeler/modeling/dSModeling.js","./src/app/tools/modeler/bpmn/modeler/modeling/index.js","./src/app/tools/modeler/bpmn/modeler/numbering/numbering.js","./src/app/tools/modeler/bpmn/modeler/palette/domainStoryPalette.js","./src/app/tools/modeler/bpmn/modeler/updateHandler/activityUpdateHandlers.js","./src/app/tools/modeler/bpmn/modeler/updateHandler/elementUpdateHandler.js","./src/app/tools/modeler/bpmn/modeler/updateHandler/headlineAndDescriptionUpdateHandler.js","./src/app/tools/modeler/bpmn/modeler/updateHandler/massRenameHandler.js","./src/app/tools/modeler/bpmn/modeler/updateHandler/updateLabelHandler.js","./src/app/tools/modeler/bpmn/modeler/util.js","./src/app/app.component.ts","./src/app/app.component.html","./src/app/app.module.ts","./src/app/domain/entities/configuration.ts","./src/app/domain/entities/constants.ts","./src/app/domain/entities/dictionary.ts","./src/app/domain/entities/elementTypes.ts","./src/app/domain/entities/infoDialogData.ts","./src/app/domain/presentation/domain.module.ts","./src/app/domain/presentation/info-dialog/info-dialog.component.ts","./src/app/domain/presentation/info-dialog/info-dialog.component.html","./src/app/domain/services/command-stack.service.ts","./src/app/domain/services/dialog.service.ts","./src/app/domain/services/dirty-flag.service.ts","./src/app/domain/services/element-registry.service.ts","./src/app/domain/services/storage.service.ts","./src/app/material.module.ts","./src/app/tools/autosave/presentation/AutosaveOptions/autosave-options.component.ts","./src/app/tools/autosave/presentation/AutosaveOptions/autosave-options.component.html","./src/app/tools/autosave/presentation/AutosaveSettings/autosave-settings.component.ts","./src/app/tools/autosave/presentation/AutosaveSettings/autosave-settings.component.html","./src/app/tools/autosave/presentation/AutosavedDrafts/autosaved-drafts.component.ts","./src/app/tools/autosave/presentation/AutosavedDrafts/autosaved-drafts.component.html","./src/app/tools/autosave/presentation/autosave.module.ts","./src/app/tools/autosave/services/autosave-configuration.service.ts","./src/app/tools/autosave/services/autosave.service.ts","./src/app/tools/export/domain/dialog/exportDialogData.ts","./src/app/tools/export/domain/export/configAndDst.ts","./src/app/tools/export/domain/export/exportConstants.ts","./src/app/tools/export/presentation/export-dialog/export-dialog.component.ts","./src/app/tools/export/presentation/export-dialog/export-dialog.component.html","./src/app/tools/export/presentation/export.module.ts","./src/app/tools/export/services/export.service.ts","./src/app/tools/export/services/html-presentation.service.ts","./src/app/tools/export/services/png.service.ts","./src/app/tools/export/services/svg.service.ts","./src/app/tools/icon-set-config/domain/allIcons.ts","./src/app/tools/icon-set-config/domain/iconConfiguration.ts","./src/app/tools/icon-set-config/domain/iconFilterEnum.ts","./src/app/tools/icon-set-config/presentation/details-list-item/details-list-item.component.ts","./src/app/tools/icon-set-config/presentation/details-list-item/details-list-item.component.html","./src/app/tools/icon-set-config/presentation/icon-list-item/icon-list-item.component.ts","./src/app/tools/icon-set-config/presentation/icon-list-item/icon-list-item.component.html","./src/app/tools/icon-set-config/presentation/icon-set-config.module.ts","./src/app/tools/icon-set-config/presentation/icon-set-configuration/icon-set-configuration.component.ts","./src/app/tools/icon-set-config/presentation/icon-set-configuration/icon-set-configuration.component.html","./src/app/tools/icon-set-config/presentation/icon-set-details/icon-set-details.component.ts","./src/app/tools/icon-set-config/presentation/icon-set-details/icon-set-details.component.html","./src/app/tools/icon-set-config/services/icon-dictionary.service.ts","./src/app/tools/icon-set-config/services/icon-set-configuration.service.ts","./src/app/tools/icon-set-config/services/icon-set-customization.service.ts","./src/app/tools/import/presentation/import-dialog/import-dialog.component.ts","./src/app/tools/import/presentation/import-dialog/import-dialog.component.html","./src/app/tools/import/presentation/import.module.ts","./src/app/tools/import/services/import-domain-story.service.ts","./src/app/tools/import/services/import-repair.service.ts","./src/app/tools/label-dictionary/presentation/label-dictionary-dialog/label-dictionary-dialog.component.ts","./src/app/tools/label-dictionary/presentation/label-dictionary-dialog/label-dictionary-dialog.component.html","./src/app/tools/label-dictionary/presentation/label-dictionary.module.ts","./src/app/tools/label-dictionary/presentation/label-dictionary/label-dictionary.component.ts","./src/app/tools/label-dictionary/presentation/label-dictionary/label-dictionary.component.html","./src/app/tools/label-dictionary/services/label-dictionary.service.ts","./src/app/tools/label-dictionary/services/mass-naming.service.ts","./src/app/tools/modeler/domain/activity-dialog-form.ts","./src/app/tools/modeler/domain/activityDialogData.ts","./src/app/tools/modeler/presentation/activity-dialog/activity-dialog.component.ts","./src/app/tools/modeler/presentation/activity-dialog/activity-dialog.component.html","./src/app/tools/modeler/presentation/modeler.module.ts","./src/app/tools/modeler/presentation/modeler/modeler.component.ts","./src/app/tools/modeler/presentation/modeler/modeler.component.html","./src/app/tools/modeler/services/initializer.service.ts","./src/app/tools/modeler/services/modeler.service.ts","./src/app/tools/modeler/services/renderer.service.ts","./src/app/tools/replay/domain/replayConstants.ts","./src/app/tools/replay/services/dom-manipulation.service.ts","./src/app/tools/replay/services/replay.service.ts","./src/app/tools/replay/services/story-creator.service.ts","./src/app/tools/title/domain/title-dialog-form.ts","./src/app/tools/title/presentation/title-dialog/title-dialog.component.ts","./src/app/tools/title/presentation/title-dialog/title-dialog.component.html","./src/app/tools/title/presentation/title.module.ts","./src/app/tools/title/services/title.service.ts","./src/app/utils/colorConverter.ts","./src/app/utils/mathExtensions.ts","./src/app/utils/sanitizer.ts","./src/app/workbench/presentation/header/header-buttons/header-buttons.component.ts","./src/app/workbench/presentation/header/header-buttons/header-buttons.component.html","./src/app/workbench/presentation/header/header/header.component.ts","./src/app/workbench/presentation/header/header/header.component.html","./src/app/workbench/presentation/settings/general/general-settings.component.ts","./src/app/workbench/presentation/settings/general/general-settings.component.html","./src/app/workbench/presentation/settings/settings.component.ts","./src/app/workbench/presentation/settings/settings.component.html","./src/app/workbench/presentation/workbench.module.ts","./src/app/workbench/services/settings/settings.service.ts","./src/environments/environment.ts","./src/main.ts"],"sourcesContent":["import {\n SVG_LINK,\n TEXTSPAN_DESCRIPTION_HEIGHT,\n TEXTSPAN_TITLE_HEIGHT,\n X_OFFSET_UTIL,\n} from \"../domain/export/exportConstants\";\n\nlet dynamicHeightOffset = 0;\n\n// Has to be js File so we can access te correct non-standard HTML-Properties without excessive usage of ts-ignore\nexport function createTitleAndDescriptionSVGElement(\n initDynamicHeightOffset,\n title,\n description,\n min_x,\n min_y,\n width,\n) {\n dynamicHeightOffset = initDynamicHeightOffset;\n\n title = title.replace(\"<\", \"\").replace(\">\", \"\");\n\n let titleElement = createTitle(title, width);\n\n let descriptionElement = createDescription(description, width);\n\n // to display the title and description in the SVG-file, we need to add a container for our text-elements\n\n let insertText =\n '' +\n titleElement +\n descriptionElement +\n \"\";\n return { insertText, dynamicHeightOffset: dynamicHeightOffset };\n}\n\nfunction createTitle(text, width) {\n let tempCanvas = document.createElement(\"canvas\");\n let ctx = tempCanvas.getContext(\"2d\");\n ctx.font = \"30px Arial\";\n\n return createTextSpans(text, width, ctx, 10, TEXTSPAN_TITLE_HEIGHT, 30);\n}\n\nfunction createDescription(text, width) {\n let description = \"\";\n let descriptionParts = text.split(\"
\");\n\n let tempCanvas = document.createElement(\"canvas\");\n let ctx = tempCanvas.getContext(\"2d\");\n ctx.font = \"12px Arial\";\n\n for (let i = 0; i < descriptionParts.length; i++) {\n description += createTextSpans(\n descriptionParts[i],\n width,\n ctx,\n 0,\n TEXTSPAN_DESCRIPTION_HEIGHT,\n 12,\n );\n }\n return description;\n}\n\nfunction createTextSpans(text, width, ctx, yOffset, heightOffset, fontSize) {\n let textSpans = \"\";\n let words = text.split(\" \");\n\n // every leading empty strings in the array must be removed, otherwise the text elements\n // will not be filled with text\n words = removeLeadingEmptyStrings(words);\n\n let textTag =\n '';\n\n let textSpan = document.createElementNS(SVG_LINK, \"tspan\");\n let textNode = document.createTextNode(words[0]);\n\n textSpan.setAttribute(\"x\", X_OFFSET_UTIL);\n textSpan.setAttribute(\"y\", yOffset + dynamicHeightOffset);\n textSpan.setAttribute(\"font-size\", fontSize);\n textSpan.appendChild(textNode);\n\n for (let j = 1; j < words.length; j++) {\n if (textSpan.firstChild && textSpan.firstChild.data) {\n let len = textSpan.firstChild.data.length;\n textNode.data += \" \" + words[j];\n\n if (ctx.measureText(textNode.data).width > width - 16) {\n dynamicHeightOffset += heightOffset;\n textSpan.firstChild.data = textSpan.firstChild.data.slice(0, len); // remove overflow word\n\n textSpans += textTag + textSpan.outerHTML + \"\"; // append line\n\n // create new textspan for line break\n textSpan = document.createElementNS(SVG_LINK, \"tspan\");\n textNode = document.createTextNode(words[j]);\n textSpan.setAttribute(\"x\", X_OFFSET_UTIL);\n textSpan.setAttribute(\"y\", yOffset + dynamicHeightOffset);\n textSpan.appendChild(textNode);\n }\n }\n }\n dynamicHeightOffset += heightOffset;\n\n textSpans += textTag + textSpan.outerHTML + \"\";\n return textSpans;\n}\n\nfunction removeLeadingEmptyStrings(stringArray) {\n const firstNonEmptyIndex = stringArray.findIndex((string) => string !== \"\");\n return stringArray.slice(\n firstNonEmptyIndex === -1 ? stringArray.length : firstNonEmptyIndex,\n );\n}\n","import Modeler from \"bpmn-js/lib/Modeler\";\nimport ResizeModule from \"diagram-js/lib/features/resize\";\nimport { assign, isArray } from \"min-dash\";\nimport inherits from \"inherits\";\n\nimport DomainStoryModule from \"./modeler\";\nimport LabelEditingModule from \"./modeler/labeling\";\nimport ModelingModule from \"./modeler/modeling\";\nimport { ElementTypes } from \"../../../domain/entities/elementTypes\";\n\nexport default function DomainStoryModeler(options) {\n Modeler.call(this, options);\n\n this._customElements = [];\n this._groupElements = [];\n}\n\ninherits(DomainStoryModeler, Modeler);\n\nDomainStoryModeler.prototype._modules = [].concat(\n DomainStoryModeler.prototype._modules,\n [DomainStoryModule, LabelEditingModule, ModelingModule],\n [ResizeModule],\n);\n\n/**\n * add a single custom element to the underlying diagram\n *\n * @param {Object} customElement\n */\nDomainStoryModeler.prototype._addCustomShape = function (customElement) {\n let parentId = customElement.parent;\n delete customElement.children;\n delete customElement.parent;\n this._customElements.push(customElement);\n\n let canvas = this.get(\"canvas\"),\n elementFactory = this.get(\"elementFactory\");\n\n let customAttrs = assign({ businessObject: customElement }, customElement);\n let customShape = elementFactory.create(\"shape\", customAttrs);\n\n if (isGroup(customElement)) {\n this._groupElements[customElement.id] = customShape;\n }\n\n if (parentId) {\n let parentShape = this._groupElements[parentId];\n\n if (isGroup(parentShape)) {\n return canvas.addShape(customShape, parentShape, parentShape.id);\n }\n }\n return canvas.addShape(customShape);\n};\n\nDomainStoryModeler.prototype._addCustomConnection = function (customElement) {\n this._customElements.push(customElement);\n\n let canvas = this.get(\"canvas\"),\n elementFactory = this.get(\"elementFactory\"),\n elementRegistry = this.get(\"elementRegistry\");\n\n let customAttrs = assign({ businessObject: customElement }, customElement);\n\n let connection = elementFactory.create(\n \"connection\",\n assign(customAttrs, {\n source: elementRegistry.get(customElement.source),\n target: elementRegistry.get(customElement.target),\n }),\n elementRegistry.get(customElement.source).parent,\n );\n\n return canvas.addConnection(connection);\n};\n\n//** We import BusinessObjects, not the whole Canvas Object!!!!!!!!\nDomainStoryModeler.prototype.importCustomElements = function (elements) {\n this.get(\"eventBus\").fire(\"diagram.clear\", {});\n this._customElements = [];\n this._groupElements = [];\n\n this.addCustomElements(elements);\n};\n\n/**\n * add a number of custom elements and connections to the underlying diagram.\n *\n * @param {Array} customElements\n */\nDomainStoryModeler.prototype.addCustomElements = function (customElements) {\n if (!isArray(customElements)) {\n throw new Error(\"argument must be an array\");\n }\n\n let shapes = [],\n connections = [],\n groups = [];\n\n customElements.forEach(function (customElement) {\n if (isConnection(customElement)) {\n connections.push(customElement);\n } else if (isGroup(customElement)) {\n groups.push(customElement);\n } else {\n shapes.push(customElement);\n }\n });\n\n // add groups before shapes and shapes before connections so that connections\n // can already rely on the shapes being part of the diagram\n groups.forEach(this._addCustomShape, this);\n shapes.forEach(this._addCustomShape, this);\n connections.forEach(this._addCustomConnection, this);\n};\n\n/**\n * get custom elements with their current status.\n *\n * @return {Array} custom elements on the diagram\n */\nDomainStoryModeler.prototype.getCustomElements = function () {\n return this._customElements;\n};\n\n// override standard function to prevent default elements on canvas\nDomainStoryModeler.prototype.createDiagram = function (done) {};\n\nfunction isConnection(element) {\n return (\n element.type === ElementTypes.ACTIVITY ||\n element.type === ElementTypes.CONNECTION\n );\n}\n\nfunction isGroup(element) {\n return element && element.type === ElementTypes.GROUP;\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\n/**\n * service that allow replacing of elements.\n */\nexport default function Replace(modeling) {\n this._modeling = modeling;\n}\n\n/**\n * @param {Element} oldElement - element to be replaced\n * @param {Object} newElementData - containing information about the new Element, for example height, width, type.\n * @param modeling\n */\nfunction replaceElement(oldElement, newElementData, modeling) {\n let newElement = setCenterOfElement(newElementData, oldElement, modeling);\n let outgoingActivities = newElement.outgoing;\n let incomingActivities = newElement.incoming;\n\n outgoingActivities.forEach((element) => {\n element.businessObject.source = newElement.id;\n });\n\n incomingActivities.forEach((element) => {\n element.businessObject.target = newElement.id;\n });\n\n return newElement;\n}\n\nfunction setCenterOfElement(newElementData, oldElement, modeling) {\n newElementData.x = Math.ceil(\n oldElement.x + (newElementData.width || oldElement.width) / 2,\n );\n newElementData.y = Math.ceil(\n oldElement.y + (newElementData.height || oldElement.height) / 2,\n );\n\n assign(newElementData, { name: oldElement.businessObject.name });\n\n return modeling.replaceShape(oldElement, newElementData, {});\n}\n\nReplace.prototype.replaceElement = replaceElement;\n","\"use strict\";\n\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport Replace from \"./replace\";\nimport * as replaceOptions from \"./replaceOptions\";\n\nimport { forEach } from \"min-dash\";\n\n/**\n * This module is an element agnostic replace menu provider for the popup menu.\n */\nexport default function ReplaceMenuProvider(modeling) {\n this._dsReplace = new Replace(modeling);\n this._modeling = modeling;\n}\n\nReplaceMenuProvider.$inject = [\"modeling\"];\n\n/**\n * Get all entries from replaceOptions for the given element and apply filters\n * on them. Get for example only elements, which are different from the current one.\n *\n * @param {djs.model.Base} element\n *\n * @return {Array} a list of menu entry items\n */\nReplaceMenuProvider.prototype.getEntries = function (element) {\n let entries;\n if (element.type.includes(ElementTypes.ACTOR)) {\n entries = replaceOptions.actorReplaceOptions(element.type);\n } else if (element.type.includes(ElementTypes.WORKOBJECT)) {\n entries = replaceOptions.workObjectReplaceOptions(element.type);\n }\n\n return this._createEntries(element, entries);\n};\n\n/**\n * Creates an array of menu entry objects for a given element and filters the replaceOptions\n * according to a filter function.\n *\n * @param {djs.model.Base} element\n * @param {Object} replaceOptions\n *\n * @return {Array} a list of menu items\n */\nReplaceMenuProvider.prototype._createEntries = function (\n element,\n replaceOptions,\n) {\n let menuEntries = [];\n\n let self = this;\n\n forEach(replaceOptions, function (definition) {\n let entry = self._createMenuEntry(definition, element);\n\n menuEntries.push(entry);\n });\n\n return menuEntries;\n};\n\n/**\n * Creates and returns a single menu entry item.\n *\n * @param {Object} definition a single replace options definition object\n * @param {djs.model.Base} element\n * @param {Function} [action] an action callback function which gets called when\n * the menu entry is being triggered.\n *\n * @return {Object} menu entry item\n */\nReplaceMenuProvider.prototype._createMenuEntry = function (\n definition,\n element,\n action,\n) {\n let replaceElement = this._dsReplace.replaceElement;\n let modeling = this._modeling;\n let replaceAction = function () {\n return replaceElement(element, definition.target, modeling);\n };\n\n action = action || replaceAction;\n\n return {\n label: definition.label,\n className: definition.className,\n id: definition.actionName,\n action: action,\n };\n};\n","import { ElementTypes } from \"src/app/domain/entities/elementTypes\";\n\nlet iconDictionaryService;\n\nexport function initializeReplaceOptions(iconDictionary) {\n iconDictionaryService = iconDictionary;\n}\n\nexport function actorReplaceOptions(name) {\n const actorTypes = iconDictionaryService.getTypeDictionary(\n ElementTypes.ACTOR,\n );\n\n let replaceOption = {};\n let i = 0;\n\n actorTypes.keysArray().forEach((actorType) => {\n if (!name.includes(actorType)) {\n const typeName = actorType;\n replaceOption[i] = {\n label: \"Change to \" + typeName,\n actionName: \"replace-with-actor-\" + typeName.toLowerCase(),\n className: iconDictionaryService.getIconForBPMN(\n ElementTypes.ACTOR,\n actorType,\n ),\n target: {\n type: `${ElementTypes.ACTOR}${actorType}`,\n },\n };\n i++;\n }\n });\n return replaceOption;\n}\n\nexport function workObjectReplaceOptions(name) {\n const workObjectTypes = iconDictionaryService.getTypeDictionary(\n ElementTypes.WORKOBJECT,\n );\n\n let replaceOption = {};\n let i = 0;\n\n workObjectTypes.keysArray().forEach((workObjectType) => {\n if (!name.includes(workObjectType)) {\n const typeName = workObjectType;\n replaceOption[i] = {\n label: \"Change to \" + typeName,\n actionName: \"replace-with-actor-\" + typeName,\n className: iconDictionaryService.getIconForBPMN(\n ElementTypes.WORKOBJECT,\n workObjectType,\n ),\n target: {\n type: `${ElementTypes.WORKOBJECT}${workObjectType}`,\n },\n };\n }\n i++;\n });\n return replaceOption;\n}\n","\"use strict\";\n\nimport inherits from \"inherits\";\n\nimport ContextPadProvider from \"bpmn-js/lib/features/context-pad/ContextPadProvider\";\n\nimport { assign, bind } from \"min-dash\";\nimport { generateAutomaticNumber } from \"../numbering/numbering\";\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport { getAllStandardIconKeys } from \"src/app/tools/icon-set-config/domain/allIcons\";\nimport {\n hexToRGBA,\n isHexWithAlpha,\n rgbaToHex,\n} from \"../../../../../utils/colorConverter\";\n\nlet dirtyFlagService;\nlet iconDictionaryService;\n\nexport function initializeContextPadProvider(dirtyFlag, iconDictionary) {\n dirtyFlagService = dirtyFlag;\n iconDictionaryService = iconDictionary;\n}\n\nexport default function DomainStoryContextPadProvider(\n injector,\n connect,\n translate,\n elementFactory,\n create,\n canvas,\n contextPad,\n popupMenu,\n replaceMenuProvider,\n commandStack,\n eventBus,\n modeling,\n) {\n let startConnect;\n let selectedElement;\n\n injector.invoke(ContextPadProvider, this);\n\n let cached = bind(this.getContextPadEntries, this);\n\n document.addEventListener(\"pickedColor\", (event) => {\n if (selectedElement) {\n executeCommandStack(event);\n }\n });\n\n popupMenu.registerProvider(\"ds-replace\", replaceMenuProvider);\n popupMenu.registerProvider(\"bpmn-replace\", replaceMenuProvider);\n\n this.getContextPadEntries = function (element) {\n selectedElement = element;\n\n let pickedColor = selectedElement.businessObject.pickedColor;\n\n if (isHexWithAlpha(pickedColor)) {\n pickedColor = hexToRGBA(pickedColor);\n }\n document.dispatchEvent(\n new CustomEvent(\"defaultColor\", {\n detail: {\n color: pickedColor ?? \"#000000\",\n },\n }),\n );\n\n const allStandardIconKeys = getAllStandardIconKeys();\n let actions = cached(element);\n\n startConnect = function (event, element, autoActivate) {\n connect.start(event, element, autoActivate);\n };\n\n if (element.type.includes(ElementTypes.WORKOBJECT)) {\n addColorChange(actions);\n addConnectWithActivity(actions, startConnect);\n addTextAnnotation(actions);\n addActors(appendAction, actions);\n addWorkObjects(appendAction, actions);\n addChangeWorkObjectTypeMenu(actions);\n } else if (element.type.includes(ElementTypes.ACTOR)) {\n addColorChange(actions);\n addConnectWithActivity(actions, startConnect);\n addTextAnnotation(actions);\n addWorkObjects(appendAction, actions);\n addChangeActorTypeMenu(actions);\n } else if (element.type.includes(ElementTypes.GROUP)) {\n delete actions.delete;\n addTextAnnotation(actions);\n assign(actions, {\n deleteGroup: {\n group: \"edit\",\n className: \"bpmn-icon-trash\",\n title: \"Remove Group without Child-Elements\",\n action: {\n click: function (event, element) {\n modeling.removeGroup(element);\n dirtyFlagService.makeDirty();\n },\n },\n },\n });\n addColorChange(actions);\n } else if (element.type.includes(ElementTypes.ACTIVITY)) {\n moveDeleteActionToEndOfArray(actions);\n\n addColorChange(actions);\n\n assign(actions, {\n delete: {\n group: \"edit\",\n className: \"bpmn-icon-trash\",\n title: \"Remove\",\n action: {\n click: function (event, element) {\n modeling.removeElements({ element });\n dirtyFlagService.makeDirty();\n },\n },\n },\n });\n } else if (element.type.includes(ElementTypes.TEXTANNOTATION)) {\n addColorChange(actions);\n }\n\n return actions;\n };\n\n function moveDeleteActionToEndOfArray(actions) {\n delete actions.delete;\n\n assign(actions, {\n changeDirection: {\n group: \"edit\",\n className: \"icon-domain-story-changeDirection\",\n title: translate(\"Change direction\"),\n action: {\n // event needs to be addressed\n click: function (event, element) {\n changeDirection(element);\n },\n },\n },\n });\n }\n\n function addChangeActorTypeMenu(actions) {\n assign(actions, {\n replace: {\n group: \"edit\",\n className: \"bpmn-icon-screw-wrench\",\n title: translate(\"Change type\"),\n action: {\n click: function (event, element) {\n let position = assign(getReplaceMenuPosition(element), {\n cursor: { x: event.x, y: event.y },\n });\n popupMenu.open(element, \"ds-replace\", position);\n },\n },\n },\n });\n }\n\n function addColorChange(actions) {\n assign(actions, {\n colorChange: {\n group: \"edit\",\n className: \"icon-domain-story-color-picker\",\n title: translate(\"Change color\"),\n action: {\n click: function (event, element) {\n document.dispatchEvent(new CustomEvent(\"openColorPicker\"));\n },\n },\n },\n });\n }\n\n function addTextAnnotation(actions) {\n assign(actions, {\n \"append.text-annotation\": appendAction(\n ElementTypes.TEXTANNOTATION,\n \"bpmn-icon-text-annotation\",\n \"textannotation\",\n \"connect\",\n ),\n });\n }\n\n function addConnectWithActivity(actions, startConnect) {\n assign(actions, {\n connect: {\n group: \"connect\",\n className: \"bpmn-icon-connection\",\n title: translate(\"Connect with activity\"),\n action: {\n click: startConnect,\n dragstart: startConnect,\n },\n },\n });\n }\n\n function addWorkObjects(appendAction, actions) {\n let workObjectTypes = iconDictionaryService.getTypeDictionary(\n ElementTypes.WORKOBJECT,\n );\n workObjectTypes.keysArray().forEach((workObjectType) => {\n let name = workObjectType;\n let icon = iconDictionaryService.getIconForBPMN(\n ElementTypes.WORKOBJECT,\n workObjectType,\n );\n let action = [];\n action[\"append.workObject\" + name] = appendAction(\n `${ElementTypes.WORKOBJECT}${workObjectType}`,\n icon,\n name,\n \"workObjects\",\n );\n assign(actions, action);\n });\n }\n\n function addActors(appendAction, actions) {\n let actorTypes = iconDictionaryService.getTypeDictionary(\n ElementTypes.ACTOR,\n );\n actorTypes.keysArray().forEach((actorType) => {\n let name = actorType;\n let icon = iconDictionaryService.getIconForBPMN(\n ElementTypes.ACTOR,\n actorType,\n );\n let action = [];\n action[\"append.actor\" + name] = appendAction(\n `${ElementTypes.ACTOR}${actorType}`,\n icon,\n name,\n \"actors\",\n );\n assign(actions, action);\n });\n }\n\n function addChangeWorkObjectTypeMenu(actions) {\n assign(actions, {\n replace: {\n group: \"edit\",\n className: \"bpmn-icon-screw-wrench\",\n title: translate(\"Change type\"),\n action: {\n click: function (event, element) {\n let position = assign(getReplaceMenuPosition(element), {\n cursor: { x: event.x, y: event.y },\n });\n popupMenu.open(element, \"ds-replace\", position);\n },\n },\n },\n });\n }\n\n function changeDirection(element) {\n let context;\n let businessObject = element.businessObject;\n let newNumber;\n\n if (element.source.type.includes(ElementTypes.ACTOR)) {\n newNumber = 0;\n } else {\n newNumber = generateAutomaticNumber(element, commandStack);\n }\n context = {\n businessObject: businessObject,\n newNumber: newNumber,\n element: element,\n };\n commandStack.execute(\"activity.directionChange\", context);\n }\n\n function getReplaceMenuPosition(element) {\n let Y_OFFSET = 5;\n\n let diagramContainer = canvas.getContainer(),\n pad = contextPad.getPad(element).html;\n\n let diagramRect = diagramContainer.getBoundingClientRect(),\n padRect = pad.getBoundingClientRect();\n\n let top = padRect.top - diagramRect.top;\n let left = padRect.left - diagramRect.left;\n\n return {\n x: left,\n y: top + padRect.height + Y_OFFSET,\n };\n }\n\n /**\n * create an append action\n *\n * @param {String} type\n * @param {String} className\n * @param {String} [title]\n * @param {String} group\n * @param {Object} [options]\n *\n * @return {Object} descriptor\n */\n function appendAction(type, className, title, group, options) {\n if (typeof title !== \"string\") {\n options = title;\n title = translate(\"{type}\", { type: type.replace(/^domainStory:/, \"\") });\n }\n\n function appendStart(event, element) {\n let shape = elementFactory.createShape(assign({ type: type }, options));\n let context = {\n elements: [shape],\n hints: {},\n source: element,\n };\n create.start(event, shape, context);\n }\n\n return {\n group: group,\n className: className,\n title: \"Append \" + title,\n action: {\n dragstart: startConnect,\n click: appendStart,\n },\n };\n }\n\n function getSelectedBusinessObject(event) {\n const oldColor = selectedElement.businessObject.pickedColor;\n let newColor = event.detail.color;\n if (isHexWithAlpha(oldColor)) {\n newColor = rgbaToHex(newColor);\n }\n\n return {\n businessObject: selectedElement.businessObject,\n newColor: newColor,\n element: selectedElement,\n };\n }\n\n function executeCommandStack(event) {\n const selectedBusinessObject = getSelectedBusinessObject(event);\n\n commandStack.execute(\"element.colorChange\", selectedBusinessObject);\n dirtyFlagService.makeDirty();\n }\n}\n\ninherits(DomainStoryContextPadProvider, ContextPadProvider);\n\nDomainStoryContextPadProvider.$inject = [\n \"injector\",\n \"connect\",\n \"translate\",\n \"elementFactory\",\n \"create\",\n \"canvas\",\n \"contextPad\",\n \"popupMenu\",\n \"replaceMenuProvider\",\n \"commandStack\",\n \"eventBus\",\n \"modeling\",\n];\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\nimport inherits from \"inherits\";\n\nimport BpmnElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\n\nimport { DEFAULT_LABEL_SIZE } from \"bpmn-js/lib/util/LabelUtil\";\n\nimport DomainStoryIdFactory from \"./domainStoryIdFactory\";\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\n\n/**\n * A custom factory that knows how to create BPMN _and_ custom elements.\n */\nexport default function DomainStoryElementFactory(bpmnFactory, moddle) {\n BpmnElementFactory.call(this, bpmnFactory, moddle);\n\n let self = this;\n let domainStoryIdFactory = new DomainStoryIdFactory();\n\n /**\n * create a diagram-js element with the given type (any of shape, connection, label).\n *\n * @param {String} elementType\n * @param {Object} attrs\n *\n * @return {djs.model.Base}\n */\n this.create = function (elementType, attrs) {\n let type = attrs.type;\n\n if (elementType === \"label\") {\n return self.baseCreate(\n elementType,\n assign({ type: \"label\" }, DEFAULT_LABEL_SIZE, attrs),\n );\n }\n\n // add type to businessObject if custom\n if (/^domainStory:/.test(type)) {\n if (!attrs.businessObject) {\n attrs.businessObject = {\n type: type,\n name: attrs.name ? attrs.name : \"\",\n };\n }\n\n if (attrs.id) {\n domainStoryIdFactory.registerId(attrs.id);\n } else {\n attrs.id = domainStoryIdFactory.getId(elementType);\n }\n assign(attrs.businessObject, {\n id: attrs.id,\n });\n\n let id = attrs.id;\n attrs.businessObject.get = function (key) {\n if (key === \"id\") {\n return id;\n }\n };\n attrs.businessObject.set = function (key, value) {\n if (key === \"id\") {\n assign(attrs.businessObject, { id: value });\n }\n };\n\n if (!attrs.businessObject.$type) {\n assign(attrs.businessObject, { $type: \"Element\" });\n }\n assign(attrs.businessObject, { di: {} });\n if (!attrs.businessObject.$descriptor) {\n assign(attrs.businessObject, { $descriptor: {} });\n }\n\n // add width and height if shape\n if (\n (!/:activity$/.test(type) || !/:connection$/.test(type)) &&\n !((/:group$/.test(type) && attrs.height) || attrs.width)\n ) {\n assign(attrs, self._getCustomElementSize(type));\n }\n\n if (!(\"$instanceOf\" in attrs.businessObject)) {\n // ensure we can use ModelUtil#is for type checks\n Object.defineProperty(attrs.businessObject, \"$instanceOf\", {\n value: function (type) {\n return this.type === type;\n },\n });\n }\n\n return self.baseCreate(elementType, attrs);\n }\n\n return self.createBpmnElement(elementType, attrs);\n };\n}\n\ninherits(DomainStoryElementFactory, BpmnElementFactory);\n\nDomainStoryElementFactory.$inject = [\"bpmnFactory\", \"moddle\"];\n\n/**\n * returns the default size of custom shapes.\n *\n * the following example shows an interface on how\n * to setup the custom shape's dimensions.\n * *\n * @param {String} type\n *\n * @return {Dimensions} a {width, height} object representing the size of the element\n */\nDomainStoryElementFactory.prototype._getCustomElementSize = function (type) {\n let shapes = {\n __default: { width: 75, height: 75 },\n [ElementTypes.TEXTANNOTATION]: { width: 100, height: 30 },\n [ElementTypes.GROUP]: { width: 525, height: 275 },\n };\n\n return shapes[type] || shapes.__default;\n};\n\nclass Dimensions {\n width;\n height;\n}\n","\"use strict\";\n\nlet idList = [];\n\nexport default function DomainStoryIdFactory() {}\n\nDomainStoryIdFactory.prototype.getId = function (type) {\n return generateId(type);\n};\n\nDomainStoryIdFactory.prototype.registerId = function (id) {\n idList.push(id);\n};\n\nfunction generateId(type) {\n let idNumber = fourDigitsId();\n\n let id = type + \"_\" + idSuffix(idNumber);\n\n while (containsId(id)) {\n idNumber++;\n\n id = type + \"_\" + idSuffix(idNumber);\n }\n\n idList.push(id);\n return id;\n}\n\nfunction idSuffix(idNumber) {\n let id;\n if (idNumber > 9999) {\n id = 0;\n } else if (idNumber < 10) {\n id = \"000\" + idNumber;\n } else if (idNumber < 100) {\n id = \"00\" + idNumber;\n } else if (idNumber < 1000) {\n id = \"0\" + idNumber;\n } else {\n id = \"\" + idNumber;\n }\n return id;\n}\n\nfunction fourDigitsId() {\n return Math.floor(Math.random() * 10000);\n}\n\nexport function containsId(id) {\n let same = false;\n idList.forEach((element) => {\n if (id === element) {\n same = true;\n }\n });\n return same;\n}\n","\"use strict\";\n\nimport inherits from \"inherits\";\nimport BaseRenderer from \"diagram-js/lib/draw/BaseRenderer\";\nimport Ids from \"ids\";\nimport { getAnnotationBoxHeight } from \"src/app/tools/modeler/bpmn/modeler/labeling/dsLabelEditingPreview\";\nimport { componentsToPath, createLine } from \"diagram-js/lib/util/RenderUtil\";\nimport {\n append as svgAppend,\n attr as svgAttr,\n classes as svgClasses,\n create as svgCreate,\n} from \"tiny-svg\";\nimport { query as domQuery } from \"min-dom\";\nimport { assign, isObject } from \"min-dash\";\nimport { getNumberStash } from \"src/app/tools/modeler/bpmn/modeler/labeling/dsLabelEditingProvider\";\nimport {\n addNumberToRegistry,\n generateAutomaticNumber,\n numberBoxDefinitions,\n} from \"src/app/tools/modeler/bpmn/modeler/numbering/numbering\";\n\nimport { calculateTextWidth } from \"src/app/tools/modeler/bpmn/modeler/labeling/dsLabelUtil\";\nimport {\n countLines,\n labelPosition,\n} from \"src/app/tools/modeler/bpmn/modeler/labeling/position\";\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport { angleBetween } from \"../../../../utils/mathExtensions\";\nimport { isCustomIcon, isCustomSvgIcon } from \"./util\";\n\nlet RENDERER_IDS = new Ids();\nlet numbers = [];\nconst DEFAULT_COLOR = \"#000000\";\n\n/**\n * a renderer that knows how to render custom elements.\n */\nlet _iconDictionaryService;\nlet _elementRegistryService;\nlet _dirtyFlagService;\n\nexport function initializeRenderer(\n iconDictionaryService,\n elementRegistryService,\n dirtyFlagService,\n) {\n _iconDictionaryService = iconDictionaryService;\n _elementRegistryService = elementRegistryService;\n _dirtyFlagService = dirtyFlagService;\n}\n\nexport default function DomainStoryRenderer(\n eventBus,\n styles,\n canvas,\n textRenderer,\n pathMap,\n commandStack,\n) {\n BaseRenderer.call(this, eventBus, 2000);\n\n let rendererId = RENDERER_IDS.next();\n let markers = {};\n let computeStyle = styles.computeStyle;\n\n // generate the automatic Number for an activity originating from an actor\n function generateActivityNumber(parentGfx, element, box) {\n // whenever we want to edit an activity, it gets redrawn as a new object\n // and the custom information is lost,\n // so we stash it before the editing occurs and set the value here\n\n let numberStash = getNumberStash();\n let semantic = element.businessObject;\n\n if (numberStash.use) {\n semantic.number = numberStash.number;\n }\n\n numbers[semantic.number] = true;\n box.x -= 26;\n box.y -= 16;\n\n if (semantic.number < 10) {\n box.x += 3;\n }\n\n let newRenderedNumber = renderNumber(\n parentGfx,\n semantic.number,\n numberStyle(box),\n element.type,\n );\n addNumberToRegistry(newRenderedNumber, semantic.number);\n }\n\n // style functions\n function numberStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n position: \"absolute\",\n }),\n };\n }\n\n function backgroundBoxStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n fontSize: 50,\n position: \"absolute\",\n fontFamily: \"Courier New\",\n }),\n };\n }\n\n function backgroundDotStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"white\",\n fontSize: 150,\n position: \"absolute\",\n fontFamily: \"Courier\",\n }),\n };\n }\n\n // render functions\n // render label associated with actors and workobjects\n function renderEmbeddedLabel(parentGfx, element, align, padding) {\n let businessObject = element.businessObject;\n return renderLabel(\n parentGfx,\n businessObject.name,\n {\n box: element,\n align: align,\n padding: padding ? padding : 0,\n style: {\n fill: \"#000000\",\n },\n },\n element.type,\n );\n }\n\n // render label associated with activities\n function renderExternalLabel(parentGfx, element) {\n let semantic = element.businessObject;\n let waypoints = element.waypoints;\n let lines = countLines(semantic.name);\n\n if (element.waypoints != null) {\n let position = labelPosition(waypoints, lines);\n let startPoint = element.waypoints[position.selected];\n let endPoint = element.waypoints[position.selected + 1];\n let angle = angleBetween(startPoint, endPoint);\n let alignment = \"left\";\n let boxWidth = 500;\n let xStart = position.x;\n\n // if the activity is horizontal, we want to center the label\n if (angle === 0 || angle === 180) {\n boxWidth = Math.abs(startPoint.x - endPoint.x);\n alignment = \"center\";\n xStart =\n (startPoint.x + endPoint.x) / 2 - calculateTextWidth(semantic.name);\n }\n\n let box = {\n textAlign: alignment,\n width: boxWidth,\n height: 30,\n x: xStart,\n y: position.y,\n };\n\n if (semantic.name && semantic.name.length) {\n return renderLabel(\n parentGfx,\n semantic.name,\n {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n wordWrap: \"break-word\",\n overflowWrap: \"break-word\",\n hyphens: \"auto\",\n }),\n },\n element.type,\n );\n }\n }\n }\n\n // render the number associated with an activity\n function renderExternalNumber(parentGfx, element) {\n if (element && element.source) {\n let semantic = element.businessObject;\n\n let box = numberBoxDefinitions(element);\n\n if (\n semantic.number == null &&\n element.source.type &&\n element.source.type.includes(ElementTypes.ACTOR)\n ) {\n generateAutomaticNumber(element, commandStack);\n }\n\n // render the background for the number\n if (semantic.number && element.source.type.includes(ElementTypes.ACTOR)) {\n generateActivityNumber(parentGfx, element, box);\n } else {\n semantic.number = null;\n }\n }\n }\n\n // render a number on the canvas\n function renderNumber(parentGfx, number, options, type) {\n if (number < 10) {\n number = String(number);\n }\n number = String(number);\n let text = textRenderer.createText(number || \"\", options);\n let height = 0;\n\n svgClasses(text).add(\"djs-labelNumber\");\n\n setCoordinates(type, text, options, height, parentGfx);\n\n // !IMPORTANT!\n // When converting svg-files via Inkscape or Photoshop the svg-circle is converted to a black dot that obscures the number.\n // To circumvent this, we draw an arc.\n let circle = svgCreate(\"path\");\n let radius = 11;\n let x = options.box.x + 18 + (number > 9 ? 3 : 0);\n let y = options.box.y - radius + 7;\n svgAttr(circle, {\n d: `\n M ${x} ${y}\n m ${radius},0\n a ${radius},${radius} 0 1,0 ${-radius * 2},0\n a ${radius},${radius} 0 1,0 ${radius * 2},0\n `,\n fill: \"white\",\n stroke: \"black\",\n });\n\n svgAppend(parentGfx, circle);\n svgAppend(parentGfx, text);\n\n return text;\n }\n\n // the coordinates of the activity label must be set directly and will not be taken from the box\n function setCoordinates(type, text, options, height, parentGfx) {\n if (/:activity$/.test(type)) {\n text.innerHTML = manipulateInnerHTMLXLabel(\n text.children,\n options.box.x,\n 0,\n );\n text.innerHTML = manipulateInnerHTMLYLabel(\n text.children,\n options.box.y,\n 0,\n );\n } else if (/:actor/.test(type)) {\n height = parentGfx.firstChild.attributes.height.nodeValue;\n text.innerHTML = manipulateInnerHTMLYLabel(text.children, height, 0);\n } else if (/:workObject/.test(type)) {\n height = parentGfx.firstChild.attributes.height.nodeValue;\n text.innerHTML = manipulateInnerHTMLYLabel(text.children, height, 26);\n }\n }\n\n // render a label on the canvas\n function renderLabel(parentGfx, label, options, type) {\n let text = textRenderer.createText(label || \"\", options);\n let height = 0;\n\n svgClasses(text).add(\"djs-label\");\n setCoordinates(type, text, options, height, parentGfx);\n\n svgAppend(parentGfx, text);\n return text;\n }\n\n // determine the Y-coordinate of the label / number to be rendered\n function manipulateInnerHTMLYLabel(children, y, offset) {\n if (children) {\n let result = \"\";\n for (let i = 0; i < children.length; i++) {\n result += children[i].outerHTML.replace(\n /y=\"-?\\d*.\\d*\"/,\n 'y=\"' + (Number(y) + offset + 14 * i) + '\"',\n );\n }\n return result;\n }\n }\n\n // determine the X-coordinate of the label / number to be rendered\n function manipulateInnerHTMLXLabel(children, x, offset) {\n if (children) {\n let result = \"\";\n for (let i = 0; i < children.length; i++) {\n result += children[i].outerHTML.replace(\n /x=\"-?\\d*.\\d*\"/,\n 'x=\"' + (Number(x) + offset + 14) + '\"',\n );\n }\n return result;\n }\n }\n\n // draw functions\n this.drawGroup = function (parentGfx, element) {\n if (!element.businessObject.pickedColor) {\n element.businessObject.pickedColor = DEFAULT_COLOR;\n }\n let rect = drawRect(\n parentGfx,\n element.width,\n element.height,\n 0,\n assign(\n {\n fill: \"none\",\n stroke: element.businessObject.pickedColor,\n },\n element.attrs,\n ),\n );\n renderEmbeddedLabel(parentGfx, element, \"left-top\", 8);\n\n return rect;\n };\n\n function applyColorToCustomSvgIcon(pickedColor, iconSvg) {\n if (!pickedColor) {\n return iconSvg;\n }\n const [rest, base64Svg] = iconSvg.split(\"base64,\");\n const svg = atob(base64Svg);\n const coloredSvg = applyColorToIcon(pickedColor, svg);\n const encodedColoredSvg = btoa(coloredSvg);\n return rest + \"base64,\" + encodedColoredSvg;\n }\n\n function applyColorToIcon(pickedColor = DEFAULT_COLOR, iconSvg) {\n const match = iconSvg.match(\n /fill=\\s*\"(?!none).*?\"|fill:\\s*[#r]\\w*[;\\s]{1}/,\n );\n if (match && match.some((it) => it)) {\n return iconSvg\n .replaceAll(/fill=\\s*\"(?!none).*?\"/g, `fill=\"${pickedColor} \"`)\n .replaceAll(/fill:\\s*[#r]\\w*[;\\s]{1}/g, `fill:${pickedColor};`);\n } else {\n const index = iconSvg.indexOf(\"' +\n ''\n );\n } else {\n return applyColorToIcon(pickedColor, icon);\n }\n }\n\n this.drawActor = function (parent, element) {\n let svgDynamicSizeAttributes = {\n width: element.width,\n height: element.height,\n };\n let iconSRC = _iconDictionaryService.getTypeIconSRC(\n ElementTypes.ACTOR,\n ElementTypes.getIconId(element.type),\n );\n iconSRC = getIconSvg(iconSRC, element);\n let actor = svgCreate(iconSRC);\n\n svgAttr(actor, svgDynamicSizeAttributes);\n svgAppend(parent, actor);\n\n renderEmbeddedLabel(parent, element, \"center\", -5);\n return actor;\n };\n\n this.drawWorkObject = function (parent, element) {\n let svgDynamicSizeAttributes = {\n width: element.width * 0.65,\n height: element.height * 0.65,\n x: element.width / 2 - 25,\n y: element.height / 2 - 25,\n },\n workObject;\n let iconSRC = _iconDictionaryService.getTypeIconSRC(\n ElementTypes.WORKOBJECT,\n ElementTypes.getIconId(element.type),\n );\n iconSRC = getIconSvg(iconSRC, element);\n workObject = svgCreate(iconSRC);\n\n svgAttr(workObject, svgDynamicSizeAttributes);\n svgAppend(parent, workObject);\n renderEmbeddedLabel(parent, element, \"center\", -5);\n\n return workObject;\n };\n\n function useColorForActivity(element) {\n if (!element.businessObject.pickedColor) {\n element.businessObject.pickedColor = \"black\";\n }\n let attrs = \"\";\n return computeStyle(attrs, {\n stroke: element.businessObject.pickedColor,\n fill: \"none\",\n strokeWidth: 1.5,\n strokeLinejoin: \"round\",\n markerEnd: marker(\n \"activity\",\n \"black\",\n element.businessObject.pickedColor,\n ),\n });\n }\n\n this.drawActivity = function (p, element) {\n adjustForTextOverlap(element);\n\n if (element) {\n let attrs = useColorForActivity(element);\n\n let x = svgAppend(p, createLine(element.waypoints, attrs));\n renderExternalLabel(p, element);\n renderExternalNumber(p, element);\n\n // just adjusting the start- and endpoint of the connection-element moves only the drawn connection,\n // not the interactive line. This can be fixed by manually overriding the points of the interactive polyline\n // in the HTMl with the points of the drawn one.\n // this however does not adjust the surrounding box of the connection.\n fixConnectionInHTML(p.parentElement);\n\n return x;\n }\n };\n\n function checkIfPointOverlapsText(point, source) {\n if (point.y > source.y + 60) {\n if (point.x > source.x + 3 && point.x < source.x + 72) {\n let lineOffset = getLineOffset(source);\n if (source.y + 75 + lineOffset > point.y) {\n point.y += lineOffset;\n }\n }\n }\n }\n\n function adjustForTextOverlap(element) {\n let source = element.source;\n let target = element.target;\n\n let waypoints = element.waypoints;\n let startPoint = waypoints[0];\n let endPoint = waypoints[waypoints.length - 1];\n\n if (startPoint && endPoint && source && target) {\n checkIfPointOverlapsText(startPoint, source);\n checkIfPointOverlapsText(endPoint, source);\n }\n }\n\n function getLineOffset(element) {\n let id = element.id;\n let offset = 0;\n\n let objects = document.getElementsByClassName(\"djs-element djs-shape\");\n for (let i = 0; i < objects.length; i++) {\n let data_id = objects.item(i).getAttribute(\"data-element-id\");\n if (data_id === id) {\n let object = objects.item(i);\n let text = object.getElementsByTagName(\"text\")[0];\n let tspans = text.getElementsByTagName(\"tspan\");\n let tspan = tspans[tspans.length - 1];\n offset = tspan.getAttribute(\"y\");\n }\n }\n return offset - 70;\n }\n\n function fixConnectionInHTML(wantedConnection) {\n if (wantedConnection) {\n let polylines = wantedConnection.getElementsByTagName(\"polyline\");\n if (polylines.length > 1) {\n polylines[1].setAttribute(\n \"points\",\n polylines[0].getAttribute(\"points\"),\n );\n }\n }\n }\n\n this.drawDSConnection = function (p, element) {\n let attrs = \"\";\n attrs = computeStyle(attrs, {\n stroke: element.businessObject.pickedColor ?? \"black\",\n strokeWidth: 1.5,\n strokeLinejoin: \"round\",\n strokeDasharray: \"5, 5\",\n });\n\n return svgAppend(p, createLine(element.waypoints, attrs));\n };\n\n this.drawAnnotation = function (parentGfx, element) {\n let style = {\n fill: \"none\",\n stroke: \"none\",\n };\n\n let text = element.businessObject.text || \"\";\n if (element.businessObject.text) {\n let height = element.height ?? 0;\n\n if (height === 0 && element.businessObject.number) {\n height = element.businessObject.number;\n }\n assign(element, {\n height: height,\n });\n\n // for some reason the keyword height is not exported, so we use another, which we know will be exported,\n // to ensure persistent annotation heights between sessions\n assign(element.businessObject, {\n number: height,\n });\n }\n\n let textElement = drawRect(\n parentGfx,\n element.width,\n element.height,\n 0,\n 0,\n style,\n );\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n drawPath(parentGfx, textPathData, {\n stroke: element.businessObject.pickedColor ?? \"black\",\n });\n\n renderLabel(parentGfx, text, {\n box: element,\n align: \"left-top\",\n padding: 5,\n style: {\n fill: element.businessObject.pickedColor ?? \"black\",\n },\n });\n\n return textElement;\n };\n\n // draw helper functions\n function drawPath(parentGfx, d, attrs) {\n attrs = computeStyle(attrs, [\"no-fill\"], {\n strokeWidth: 2,\n stroke: \"black\",\n });\n\n let path = svgCreate(\"path\");\n svgAttr(path, { d: d });\n svgAttr(path, attrs);\n\n svgAppend(parentGfx, path);\n\n return path;\n }\n\n function drawRect(parentGfx, width, height, r, offset, attrs) {\n if (isObject(offset)) {\n attrs = offset;\n offset = 0;\n }\n\n offset = offset || 0;\n attrs = computeStyle(attrs, {\n stroke: \"black\",\n strokeWidth: 2,\n fill: \"white\",\n });\n\n let rect = svgCreate(\"rect\");\n svgAttr(rect, {\n x: offset,\n y: offset,\n width: width - offset * 2,\n height: height - offset * 2,\n rx: r,\n ry: r,\n });\n\n svgAttr(rect, attrs);\n svgAppend(parentGfx, rect);\n\n return rect;\n }\n\n // marker functions\n function marker(type, fill, stroke) {\n let id = type + \"-\" + fill + \"-\" + stroke + \"-\" + rendererId;\n\n if (!markers[id]) {\n createMarker(type, fill, stroke);\n }\n return \"url(#\" + id + \")\";\n }\n\n function createMarker(type, fill, stroke) {\n let id = type + \"-\" + fill + \"-\" + stroke + \"-\" + rendererId;\n\n if (type === \"activity\") {\n let sequenceflowEnd = svgCreate(\"path\");\n svgAttr(sequenceflowEnd, { d: \"M 1 5 L 11 10 L 1 15 Z\" });\n\n addMarker(id, {\n element: sequenceflowEnd,\n ref: { x: 11, y: 10 },\n scale: 0.5,\n attrs: {\n fill: stroke,\n stroke: stroke,\n },\n });\n }\n }\n\n function addMarker(id, options) {\n let attrs = assign(\n {\n fill: \"black\",\n strokeWidth: 1,\n strokeLinecap: \"round\",\n strokeDasharray: \"none\",\n },\n options.attrs,\n );\n\n let ref = options.ref || { x: 0, y: 0 };\n let scale = options.scale || 1;\n\n // resetting stroke dash array\n if (attrs.strokeDasharray === \"none\") {\n attrs.strokeDasharray = [10000, 1];\n }\n\n let marker = svgCreate(\"marker\");\n\n svgAttr(options.element, attrs);\n svgAppend(marker, options.element);\n svgAttr(marker, {\n id: id,\n viewBox: \"0 0 20 20\",\n refX: ref.x,\n refY: ref.y,\n markerWidth: 20 * scale,\n markerHeight: 20 * scale,\n orient: \"auto\",\n });\n\n let defs = domQuery(\"defs\", canvas._svg);\n if (!defs) {\n defs = svgCreate(\"defs\");\n svgAppend(canvas._svg, defs);\n }\n svgAppend(defs, marker);\n markers[id] = marker;\n }\n\n // path functions\n this.getWorkObjectPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n\n this.getGroupPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n\n this.getActivityPath = function (connection) {\n let waypoints = connection.waypoints.map(function (p) {\n return p.original || p;\n });\n\n let activityPath = [[\"M\", waypoints[0].x, waypoints[0].y]];\n\n waypoints.forEach(function (waypoint, index) {\n if (index !== 0) {\n activityPath.push([\"L\", waypoint.x, waypoint.y]);\n }\n });\n return componentsToPath(activityPath);\n };\n\n this.getActorPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n}\n\ninherits(DomainStoryRenderer, BaseRenderer);\n\nDomainStoryRenderer.$inject = [\n \"eventBus\",\n \"styles\",\n \"canvas\",\n \"textRenderer\",\n \"pathMap\",\n \"commandStack\",\n];\n\nDomainStoryRenderer.prototype.canRender = function (element) {\n return /^domainStory:/.test(element.type);\n};\n\nDomainStoryRenderer.prototype.drawShape = function (p, element) {\n // polyfill for tests\n if (!String.prototype.startsWith) {\n Object.defineProperty(String.prototype, \"startsWith\", {\n value: function (search, pos) {\n pos = !pos || pos < 0 ? 0 : +pos;\n return this.substring(pos, pos + search.length) === search;\n },\n });\n }\n\n let type = element.type;\n element.businessObject.type = type;\n\n _elementRegistryService.correctInitialize();\n _dirtyFlagService.makeDirty();\n\n if (type.includes(ElementTypes.ACTOR)) {\n return this.drawActor(p, element);\n } else if (type.includes(ElementTypes.WORKOBJECT)) {\n return this.drawWorkObject(p, element);\n } else if (type.includes(ElementTypes.TEXTANNOTATION)) {\n return this.drawAnnotation(p, element);\n } else if (type.includes(ElementTypes.GROUP)) {\n return this.drawGroup(p, element);\n }\n};\n\nDomainStoryRenderer.prototype.getShapePath = function (shape) {\n let type = shape.type;\n\n if (type.includes(ElementTypes.ACTOR)) {\n return this.getActorPath(shape);\n } else if (type.includes(ElementTypes.WORKOBJECT)) {\n return this.getWorkObjectPath(shape);\n } else if (type.includes(ElementTypes.GROUP)) {\n return this.getGroupPath(shape);\n }\n};\n\nDomainStoryRenderer.prototype.drawConnection = function (p, element) {\n let type = element.type;\n\n _dirtyFlagService.makeDirty();\n\n // fixes activities that were copy-pasted\n if (!element.businessObject.type) {\n element.businessObject.type = type;\n }\n if (type === ElementTypes.ACTIVITY) {\n return this.drawActivity(p, element);\n } else if (type === ElementTypes.CONNECTION) {\n return this.drawDSConnection(p, element);\n }\n};\n\n// creates a SVG path that describes a rectangle which encloses the given shape.\nfunction getRectPath(shape) {\n let offset = 5;\n let x = shape.x,\n y = shape.y,\n width = shape.width / 2 + offset,\n height = shape.height / 2 + offset;\n\n return [\n [\"M\", x, y],\n [\"l\", width, 0],\n [\"l\", width, height],\n [\"l\", -width, height],\n [\"l\", -width, 0],\n [\"z\"],\n ];\n}\n","\"use strict\";\n\nimport { assign, every, reduce } from \"min-dash\";\n\nimport inherits from \"inherits\";\n\nimport RuleProvider from \"diagram-js/lib/features/rules/RuleProvider\";\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport { is } from \"./util\";\n\nconst HIGH_PRIORITY = 1500;\nconst MIN_SIZE = 125;\n\nfunction isDomainStory(element) {\n return element && /^domainStory:/.test(element.type);\n}\n\nfunction isDomainStoryGroup(element) {\n return element && /^domainStory:group/.test(element.type);\n}\n\nfunction isActor(element) {\n return element && /^domainStory:actor\\w*/.test(element.type);\n}\n\nfunction isWorkObject(element) {\n return element && /^domainStory:workObject/.test(element.type);\n}\n\nfunction isActivity(element) {\n return element && /^domainStory:activity/.test(element.type);\n}\n\nfunction isConnection(element) {\n return element && /^domainStory:connection/.test(element.type);\n}\n\nfunction isAnnotation(element) {\n return element && /^domainStory:textAnnotation/.test(element.type);\n}\n\n/**\n * can source and target be connected?\n */\nfunction canConnect(source, target) {\n // only judge about two custom elements\n if (\n isDomainStoryGroup(target) ||\n !isDomainStory(source) ||\n !isDomainStory(target)\n ) {\n return;\n }\n\n // do not allow a connection from one element to itself\n if (source === target) {\n return;\n }\n\n // do not allow a connection between two actors\n if (isActor(source) && isActor(target)) {\n return;\n }\n\n // do not allow a connection, where the source or target is an activity\n if (isActivity(source) || isActivity(target)) {\n return;\n }\n\n // do not allow a connection, where the source or target is an annotation connection\n if (isConnection(source) || isConnection(target)) {\n return;\n }\n\n // do not allow a connection to a connection(the special type of connection between an element and a comment box)\n // when the target is an annotation, the connection type is an annotation connection instead of an activity\n if (isAnnotation(target)) {\n return { type: ElementTypes.CONNECTION };\n }\n\n return { type: ElementTypes.ACTIVITY };\n}\n\nfunction canResize(shape, newBounds) {\n if (is(shape, ElementTypes.GROUP)) {\n if (newBounds) {\n let lowerLeft = { x: shape.x, y: shape.y + shape.height };\n let lowerRight = { x: shape.x + shape.width, y: shape.y + shape.height };\n let upperRight = { x: shape.x + shape.width, y: shape.y };\n\n if (newBounds.x !== shape.x && newBounds.y !== shape.y) {\n // upper left\n if (newBounds.x > lowerRight.x - MIN_SIZE) {\n assign(newBounds, { x: lowerRight.x - MIN_SIZE });\n }\n if (newBounds.y > lowerRight.y - MIN_SIZE) {\n assign(newBounds, { y: lowerRight.y - MIN_SIZE });\n }\n }\n\n if (newBounds.x !== shape.x && newBounds.y === shape.y) {\n // lower left\n if (newBounds.x > upperRight.x - MIN_SIZE) {\n assign(newBounds, { x: upperRight.x - MIN_SIZE });\n }\n }\n\n if (newBounds.x === shape.x && newBounds.y !== shape.y) {\n // upper right\n if (newBounds.y > lowerLeft.y - MIN_SIZE) {\n assign(newBounds, { y: lowerLeft.y - MIN_SIZE });\n }\n }\n\n if (newBounds.height < MIN_SIZE) {\n assign(newBounds, {\n height: MIN_SIZE,\n });\n }\n if (newBounds.width < MIN_SIZE) {\n assign(newBounds, {\n width: MIN_SIZE,\n });\n }\n }\n return true;\n }\n\n return false;\n}\n\nfunction canAttach(elements, target, source) {\n if (!Array.isArray(elements)) {\n elements = [elements];\n }\n\n // disallow appending as boundary event\n if (source) {\n return false;\n }\n\n // only (re-)attach one element at a time\n if (elements.length !== 1) {\n return false;\n }\n\n // allow default move operation\n if (!target) {\n return true;\n }\n\n // only allow drop on DomainStory Elements\n if (!isDomainStory(target)) {\n return false;\n }\n\n return \"attach\";\n}\n\nfunction canConnectToAnnotation(source, target, connection) {\n // do not allow an activity connect to an annotation\n if (isActivity(connection) && isAnnotation(target)) {\n return false;\n }\n\n // do not allow an annotation connection between two annotations\n if (\n isConnection(connection) &&\n isAnnotation(source) &&\n isAnnotation(target)\n ) {\n return false;\n }\n\n // do not allow an annotation connection between an actor or workObject and anything except an annotation\n return !(\n isConnection(connection) &&\n !isAnnotation(target) &&\n (isActor(source) || isWorkObject(source))\n );\n}\n\n/**\n * specific rules for custom elements\n */\nexport default function DomainStoryRules(eventBus) {\n RuleProvider.call(this, eventBus);\n}\n\ninherits(DomainStoryRules, RuleProvider);\n\nDomainStoryRules.$inject = [\"eventBus\"];\n\nDomainStoryRules.prototype.init = function () {\n /**\n * can shape be created on target container?\n */\n function canCreate(shape, target) {\n // only judge about custom elements\n if (!isDomainStory(shape)) {\n return;\n }\n\n // allow creation just on groups\n return !isDomainStory(target) || isDomainStoryGroup(target);\n }\n\n this.addRule(\"elements.create\", function (context) {\n const elements = context.elements,\n position = context.position,\n target = context.target;\n\n return every(elements, function (element) {\n if (isConnection(element)) {\n return canConnect(element.source, element.target, element);\n }\n\n if (element.host) {\n return canAttach(element, element.host, null, position);\n }\n\n return canCreate(element, target, null, position);\n });\n });\n\n this.addRule(\"elements.move\", HIGH_PRIORITY, function (context) {\n let target = context.target,\n shapes = context.shapes;\n\n let type;\n\n // do not allow mixed movements of custom / BPMN shapes\n // if any shape cannot be moved, the group cannot be moved, too\n\n // reject, if we have at least one\n // custom element that cannot be moved\n return reduce(\n shapes,\n function (result, s) {\n if (type === undefined) {\n type = isDomainStory(s);\n }\n\n if (type !== isDomainStory(s) || result === false) {\n return false;\n }\n\n return canCreate(s, target);\n },\n undefined,\n );\n });\n\n this.addRule(\"shape.create\", HIGH_PRIORITY, function (context) {\n let target = context.target,\n shape = context.shape;\n\n return canCreate(shape, target);\n });\n\n this.addRule(\"connection.create\", HIGH_PRIORITY, function (context) {\n let source = context.source,\n target = context.target;\n\n return canConnect(source, target);\n });\n\n this.addRule(\"connection.reconnect\", HIGH_PRIORITY, function (context) {\n let connection = context.connection,\n source = context.hover || context.source,\n target = context.target;\n\n // --------------------------------------------------------------\n let result = canConnectToAnnotation(source, target, connection);\n\n if (!result) {\n return;\n }\n\n // --------------------------------------------------------------\n\n return canConnect(source, target, connection);\n });\n\n this.addRule(\"shape.resize\", function (context) {\n let shape = context.shape,\n newBounds = context.newBounds;\n\n return canResize(shape, newBounds);\n });\n};\n\nDomainStoryRules.prototype.canConnect = canConnect;\nDomainStoryRules.prototype.canAttach = canAttach;\nDomainStoryRules.prototype.isDomainStory = isDomainStory;\nDomainStoryRules.prototype.canResize = canResize;\n","\"use strict\";\n\nimport inherits from \"inherits\";\n\nimport { pick, assign } from \"min-dash\";\n\nimport CommandInterceptor from \"diagram-js/lib/command/CommandInterceptor\";\n\nimport {\n add as collectionAdd,\n remove as collectionRemove,\n} from \"diagram-js/lib/util/Collections\";\n\nimport { reworkGroupElements } from \"./util\";\nimport { ElementTypes } from \"../../../../domain/entities/elementTypes\";\n\n/**\n * a handler responsible for updating the custom element's businessObject\n * once changes on the diagram happen.\n */\nexport default function DomainStoryUpdater(eventBus, bpmnjs) {\n CommandInterceptor.call(this, eventBus);\n\n function updateCustomElement(e) {\n let context = e.context,\n shape = context.shape,\n businessObject = shape.businessObject;\n\n if (!shape || !shape.type.includes(ElementTypes.DOMAINSTORY)) {\n return;\n }\n\n let parent = shape.parent;\n let customElements = bpmnjs._customElements;\n\n // make sure element is added / removed from bpmnjs.customElements\n if (!parent) {\n collectionRemove(customElements, businessObject);\n } else {\n collectionAdd(customElements, businessObject);\n }\n\n // save custom element position\n assign(businessObject, pick(shape, [\"x\", \"y\"]));\n\n // save custom element size if resizable\n if (shape.type === ElementTypes.GROUP) {\n assign(businessObject, pick(shape, [\"height\", \"width\"]));\n\n // rework the child-parent relations if a group was moved, such that all Objects that are visually in the group are also associated with it\n // since we do not have access to the standard-canvas object here, we cannot use the function correctGroupChildren() from DSLabelUtil\n if (parent != null) {\n reworkGroupElements(parent, shape);\n }\n }\n if (\n shape &&\n shape.parent &&\n \"type\" in shape.parent &&\n shape.parent.type === ElementTypes.GROUP\n ) {\n assign(businessObject, {\n parent: shape.parent.id,\n });\n }\n }\n\n function updateCustomConnection(e) {\n let context = e.context,\n connection = context.connection,\n source = connection.source,\n target = connection.target,\n businessObject = connection.businessObject;\n\n if (e.newTarget) {\n target = e.newTarget;\n }\n if (e.newSource) {\n source = e.newSource;\n }\n\n let parent = connection.parent;\n let customElements = bpmnjs._customElements;\n\n // make sure element is added / removed from bpmnjs.customElements\n if (!parent) {\n collectionRemove(customElements, businessObject);\n } else {\n collectionAdd(customElements, businessObject);\n }\n\n // update waypoints\n assign(businessObject, {\n waypoints: copyWaypoints(connection),\n });\n\n if (source) {\n if (!businessObject.source) {\n assign(businessObject, { source: source.id });\n } else {\n businessObject.source = source.id;\n }\n }\n if (target) {\n if (!businessObject.target) {\n assign(businessObject, { target: target.id });\n } else {\n businessObject.target = target.id;\n }\n }\n }\n\n function copyWaypoints(connection) {\n return connection.waypoints.map(function (p) {\n if (p.original) {\n return {\n original: {\n x: p.original.x,\n y: p.original.y,\n },\n x: p.x,\n y: p.y,\n };\n } else {\n return {\n x: p.x,\n y: p.y,\n };\n }\n });\n }\n\n this.executed(\n [\n \"shape.create\",\n \"shape.move\",\n \"shape.delete\",\n \"shape.resize\",\n \"shape.removeGroupWithChildren\",\n ],\n ifDomainStoryElement(updateCustomElement),\n );\n\n this.reverted(\n [\n \"shape.create\",\n \"shape.move\",\n \"shape.delete\",\n \"shape.resize\",\n \"shape.removeGroupWithChildren\",\n ],\n ifDomainStoryElement(updateCustomElement),\n );\n\n this.executed(\n [\n \"connection.create\",\n \"connection.reconnect\",\n \"connection.updateWaypoints\",\n \"connection.delete\",\n \"connection.layout\",\n \"connection.move\",\n ],\n ifDomainStoryElement(updateCustomConnection),\n );\n\n this.reverted(\n [\n \"connection.create\",\n \"connection.reconnect\",\n \"connection.updateWaypoints\",\n \"connection.delete\",\n \"connection.layout\",\n \"connection.move\",\n ],\n ifDomainStoryElement(updateCustomConnection),\n );\n}\n\n// check if element in the context of an event is a domainStory element\nfunction ifDomainStoryElement(fn) {\n return (event) => {\n const context = event.context;\n const element = context.shape || context.connection;\n\n if (isDomainStory(element)) {\n fn(event);\n }\n };\n}\n\nfunction isDomainStory(element) {\n return element && /domainStory:/.test(element.type);\n}\n\ninherits(DomainStoryUpdater, CommandInterceptor);\n\nDomainStoryUpdater.$inject = [\"eventBus\", \"bpmnjs\"];\n","\"use strict\";\n\nimport DomainStoryElementFactory from \"./domainStoryElementFactory\";\nimport DomainStoryRenderer from \"./domainStoryRenderer\";\nimport DomainStoryPalette from \"./palette/domainStoryPalette\";\nimport DomainStoryRules from \"./domainStoryRules\";\nimport DomainStoryUpdater from \"./domainStoryUpdater\";\nimport ElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\nimport CreateModule from \"diagram-js/lib/features/create\";\nimport PathMap from \"bpmn-js/lib/draw/PathMap\";\nimport PopupMenuModule from \"bpmn-js/lib/features/popup-menu\";\nimport ContextPadModule from \"diagram-js/lib/features/context-pad\";\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"./updateHandler/updateLabelHandler\";\nimport headlineAndDescriptionUpdateHandler from \"./updateHandler/headlineAndDescriptionUpdateHandler\";\nimport DomainStoryContextPadProvider from \"./context-pad/domainStoryContextPadProvider\";\nimport ReplaceMenuProvider from \"./change-icon/replaceMenuProvider\";\nimport DSModeling from \"./modeling/dSModeling\";\n\nexport default {\n __depends__: [CreateModule, ContextPadModule, PopupMenuModule],\n __init__: [\n \"domainStoryRenderer\",\n \"paletteProvider\",\n \"domainStoryRules\",\n \"domainStoryUpdater\",\n \"contextPadProvider\",\n \"replaceMenuProvider\",\n ],\n elementFactory: [\"type\", DomainStoryElementFactory],\n domainStoryRenderer: [\"type\", DomainStoryRenderer],\n paletteProvider: [\"type\", DomainStoryPalette],\n domainStoryRules: [\"type\", DomainStoryRules],\n domainStoryUpdater: [\"type\", DomainStoryUpdater],\n contextPadProvider: [\"type\", DomainStoryContextPadProvider],\n elementFactoryBpmn: [\"type\", ElementFactory],\n pathMap: [\"type\", PathMap],\n replaceMenuProvider: [\"type\", ReplaceMenuProvider],\n commandStack: [\"type\", CommandStack],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n headlineAndDescriptionUpdateHandler: [\n \"type\",\n headlineAndDescriptionUpdateHandler,\n ],\n modeling: [\"type\", DSModeling],\n};\n","\"use strict\";\n\nimport {\n append as svgAppend,\n attr as svgAttr,\n create as svgCreate,\n remove as svgRemove,\n} from \"tiny-svg\";\n\nimport { translate } from \"diagram-js/lib/util/SvgTransformUtil\";\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport { is } from \"../util\";\n\nconst MARKER_HIDDEN = \"djs-element-hidden\",\n MARKER_LABEL_HIDDEN = \"djs-label-hidden\";\n\nexport default function DSLabelEditingPreview(eventBus, canvas, pathMap) {\n let self = this;\n\n let defaultLayer = canvas.getDefaultLayer();\n let element, absoluteElementBBox, gfx;\n\n eventBus.on(\"directEditing.activate\", function (context) {\n let activeProvider = context.active;\n\n element = activeProvider.element.label || activeProvider.element;\n\n // text annotation\n if (is(element, ElementTypes.TEXTANNOTATION)) {\n absoluteElementBBox = canvas.getAbsoluteBBox(element);\n gfx = svgCreate(\"g\");\n\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n let path = (self.path = svgCreate(\"path\"));\n\n svgAttr(path, {\n d: textPathData,\n strokeWidth: 2,\n stroke: getStrokeColor(element),\n });\n\n svgAppend(gfx, path);\n\n svgAppend(defaultLayer, gfx);\n\n translate(gfx, element.x, element.y);\n }\n\n if (is(element, ElementTypes.TEXTANNOTATION) || element.labelTarget) {\n canvas.addMarker(element, MARKER_HIDDEN);\n } else if (\n element.type.includes(ElementTypes.ACTOR) ||\n element.type.includes(ElementTypes.WORKOBJECT) ||\n element.type.includes(ElementTypes.ACTIVITY) ||\n element.type.includes(ElementTypes.GROUP)\n ) {\n canvas.addMarker(element, MARKER_LABEL_HIDDEN);\n }\n });\n\n eventBus.on(\"directEditing.resize\", function (context) {\n // text annotation\n if (is(element, ElementTypes.TEXTANNOTATION)) {\n let height = context.height,\n dy = context.dy;\n\n let newElementHeight = Math.max(\n (element.height / absoluteElementBBox.height) * (height + dy),\n 0,\n );\n\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: newElementHeight,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n svgAttr(self.path, {\n d: textPathData,\n });\n }\n });\n\n eventBus.on(\n [\"directEditing.complete\", \"directEditing.cancel\"],\n function (context) {\n let activeProvider = context.active;\n\n if (activeProvider) {\n canvas.removeMarker(\n activeProvider.element.label || activeProvider.element,\n MARKER_HIDDEN,\n );\n canvas.removeMarker(element, MARKER_LABEL_HIDDEN);\n }\n\n element = undefined;\n absoluteElementBBox = undefined;\n\n if (gfx) {\n svgRemove(gfx);\n\n gfx = undefined;\n }\n },\n );\n}\n\nDSLabelEditingPreview.$inject = [\"eventBus\", \"canvas\", \"pathMap\"];\n\n// helpers ///////////////////\n\nfunction getStrokeColor() {\n return \"black\";\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\nimport { autocomplete, getLabel } from \"./dsLabelUtil\";\n\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport { is } from \"../util\";\n\nlet dictionaryService;\n\nlet numberStash = 0;\nlet stashUse = false;\n\nexport function initializeLabelEditingProvider(labelingDictionary) {\n dictionaryService = labelingDictionary;\n}\n\nexport function getNumberStash() {\n let number = { use: stashUse, number: numberStash };\n stashUse = false;\n return number;\n}\n\nexport function toggleStashUse(use) {\n stashUse = use;\n}\n\nexport function focusElement(element) {\n // Opening a Angular Dialog seems to mess with the focus logic somehow.\n // My guess is that is makes the mousedown event passive, which prevents \"preventDefault\" from intercepting.\n // I am not sure how to fix it, but this seems to be a workaround.\n setTimeout(() => element.focus(), 0);\n}\n\nexport default function DSLabelEditingProvider(\n eventBus,\n canvas,\n directEditing,\n modeling,\n resizeHandles,\n textRenderer,\n updateLabelHandler,\n) {\n this._canvas = canvas;\n this._modeling = modeling;\n this._textRenderer = textRenderer;\n this._updateLabelHandler = updateLabelHandler;\n\n directEditing.registerProvider(this);\n\n // listen to dblclick on non-root elements\n eventBus.on(\"element.dblclick\", function (event) {\n activateDirectEdit(event.element, true);\n if (is(event.element, ElementTypes.ACTIVITY)) {\n // if we edit an activity, we do not want the standard editing box\n numberStash = event.element.businessObject.number;\n stashUse = true;\n directEditing.complete();\n }\n });\n\n // complete on followup canvas operation\n eventBus.on(\n [\n \"element.mousedown\",\n \"drag.init\",\n \"canvas.viewbox.changing\",\n \"autoPlace\",\n \"popupMenu.open\",\n ],\n function () {\n if (directEditing.isActive()) {\n directEditing.complete();\n }\n },\n );\n\n // cancel on command stack changes\n eventBus.on([\"commandStack.changed\"], function () {\n if (directEditing.isActive()) {\n directEditing.cancel();\n }\n });\n\n eventBus.on(\"directEditing.activate\", function (event) {\n resizeHandles.removeResizers();\n let element = event.active.element;\n createAutocomplete(element);\n });\n\n eventBus.on(\"create.end\", 500, function (event) {\n let element = event.shape,\n canExecute = event.context.canExecute,\n isTouch = event.isTouch;\n\n if (isTouch) {\n return;\n }\n\n if (!canExecute) {\n return;\n }\n if (!is(element, ElementTypes.ACTIVITY)) {\n activateDirectEdit(element);\n }\n let editingBox = document.getElementsByClassName(\n \"djs-direct-editing-content\",\n );\n focusElement(editingBox.item(0));\n });\n\n eventBus.on(\"autoPlace.end\", 500, function (event) {\n activateDirectEdit(event.shape);\n });\n\n function activateDirectEdit(element, force) {\n if (\n force ||\n element.businessObject.type.includes(ElementTypes.DOMAINSTORY)\n ) {\n directEditing.activate(element);\n }\n }\n\n function createAutocomplete(element) {\n let editingBox = document.getElementsByClassName(\n \"djs-direct-editing-content\",\n );\n focusElement(editingBox.item(0));\n autocomplete(\n editingBox[0],\n dictionaryService.getUniqueWorkObjectNames(),\n element,\n eventBus,\n );\n }\n}\n\nDSLabelEditingProvider.$inject = [\n \"eventBus\",\n \"canvas\",\n \"directEditing\",\n \"modeling\",\n \"resizeHandles\",\n \"textRenderer\",\n \"updateLabelHandler\",\n];\n\n/**\n * activate direct editing for activities and text annotations.\n *\n * @param {djs.model.Base} element\n *\n * @return {Object} an object with properties bounds (position and size), text and options\n */\nDSLabelEditingProvider.prototype.activate = function (element) {\n // text\n if (element.id === \"__implicitrootbase\") {\n return;\n }\n let text = getLabel(element);\n\n if (text === undefined) {\n return;\n }\n\n let context = {\n text: text,\n };\n\n // bounds\n let bounds = this.getEditingBBox(element);\n\n assign(context, bounds);\n\n let options = {};\n\n if (is(element, ElementTypes.TEXTANNOTATION)) {\n assign(options, {\n resizable: true,\n autoResize: true,\n });\n }\n\n assign(context, {\n options: options,\n });\n\n return context;\n};\n\n/**\n * get the editing bounding box based on the element's size and position\n *\n * @param {djs.model.Base} element\n *\n * @return {Object} an object containing information about position\n * and size (fixed or minimum and/or maximum)\n */\nDSLabelEditingProvider.prototype.getEditingBBox = function (element) {\n let canvas = this._canvas;\n\n let target = element.label || element;\n\n let bbox = canvas.getAbsoluteBBox(target);\n\n // default position\n let bounds = { x: bbox.x, y: bbox.y };\n\n /** The canvas is an object from bpmn-js. The IDE might say that zoom is deprecated,\n * because it thinks that canvas is the standard HTML element.**/\n let zoom = canvas.zoom();\n let defaultStyle = this._textRenderer.getDefaultStyle();\n\n // take zoom into account\n let defaultFontSize = defaultStyle.fontSize * zoom,\n defaultLineHeight = defaultStyle.lineHeight;\n\n let style = {\n fontFamily: this._textRenderer.getDefaultStyle().fontFamily,\n fontWeight: this._textRenderer.getDefaultStyle().fontWeight,\n };\n\n // adjust for groups\n if (is(element, ElementTypes.GROUP)) {\n assign(bounds, {\n minWidth: bbox.width / 2.5 > 125 ? bbox.width / 2.5 : 125,\n maxWidth: bbox.width,\n minHeight: 30 * zoom,\n x: bbox.x,\n y: bbox.y,\n });\n\n assign(style, {\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n textAlign: \"left\",\n });\n }\n\n if (\n // we can't use util's is() function here because the type contains the name of the icon\n /^domainStory:actor\\w*/.test(element.type) ||\n /^domainStory:workObject\\w*/.test(element.type)\n ) {\n assign(bounds, {\n width: bbox.width,\n minHeight: 30,\n y: bbox.y + bbox.height - 20,\n x: bbox.x,\n });\n\n assign(style, {\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n });\n }\n\n // text annotations\n if (is(element, ElementTypes.TEXTANNOTATION)) {\n assign(bounds, {\n width: bbox.width,\n height: bbox.height,\n minWidth: 30 * zoom,\n minHeight: 10 * zoom,\n });\n\n assign(style, {\n textAlign: \"left\",\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n });\n }\n\n return { bounds: bounds, style: style };\n};\n\nDSLabelEditingProvider.prototype.update = function (\n element,\n newLabel,\n activeContextText,\n bounds,\n) {\n let newBounds, bbox;\n\n if (is(element, ElementTypes.TEXTANNOTATION)) {\n bbox = this._canvas.getAbsoluteBBox(element);\n\n newBounds = {\n x: element.x,\n y: element.y,\n width: (element.width / bbox.width) * bounds.width,\n height: (element.height / bbox.height) * bounds.height,\n };\n }\n\n this._modeling.updateLabel(element, newLabel, newBounds);\n};\n","\"use strict\";\n\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport { is } from \"../util\";\n\nfunction getLabelAttr(semantic) {\n if (\n semantic.type.includes(ElementTypes.ACTOR) ||\n semantic.type.includes(ElementTypes.WORKOBJECT) ||\n semantic.type.includes(ElementTypes.ACTIVITY) ||\n semantic.type.includes(ElementTypes.GROUP)\n ) {\n return \"name\";\n }\n if (semantic.type.includes(ElementTypes.TEXTANNOTATION)) {\n return \"text\";\n }\n}\n\nfunction getNumberAttr(semantic) {\n if (is(semantic, ElementTypes.ACTIVITY)) {\n return \"number\";\n }\n}\n\nexport function getLabel(element) {\n let semantic;\n if (element.businessObject) {\n semantic = element.businessObject;\n } else {\n semantic = element;\n }\n let attr = getLabelAttr(semantic);\n if (attr && semantic) {\n return semantic[attr] || \"\";\n }\n}\n\nexport function getNumber(element) {\n let semantic = element.businessObject,\n attr = getNumberAttr(semantic);\n\n if (attr) {\n return semantic[attr] || \"\";\n }\n}\n\nexport function setLabel(element, text) {\n let semantic;\n if (element.businessObject) {\n semantic = element.businessObject;\n } else {\n semantic = element;\n }\n let attr = getLabelAttr(semantic);\n\n if (attr) {\n semantic[attr] = text;\n }\n return element;\n}\n\nexport function setNumber(element, textNumber) {\n let semantic = element.businessObject,\n attr = getNumberAttr(semantic);\n\n if (attr) {\n semantic[attr] = textNumber;\n }\n\n return element;\n}\n\n// select at which part of the activity the label should be attached to\nexport function selectPartOfActivity(waypoints, angleActivity) {\n let selectedActivity = 0;\n let linelength = 49;\n\n for (let i = 0; i < waypoints.length; i++) {\n if (angleActivity[i] === 0 || angleActivity[i] === 180) {\n let length = Math.abs(waypoints[i].x - waypoints[i + 1].x);\n if (length > linelength) {\n selectedActivity = i;\n }\n }\n }\n return selectedActivity;\n}\n\n// approximate the width of the label text, standard fontsize: 11\nexport function calculateTextWidth(text) {\n if (!text) {\n return 0;\n }\n\n let fontsize = text.length * 5.1;\n fontsize = fontsize / 2;\n\n // add an initial offset to the absolute middle of the activity\n fontsize += 20;\n return fontsize;\n}\n\n/**\n * copied from https://www.w3schools.com/howto/howto_js_autocomplete.asp on 18.09.2018\n */\nexport function autocomplete(input, workObjectNames, element, eventBus) {\n closeAllLists();\n\n /* the autocomplete function takes three arguments,\n the text field element and an array of possible autocompleted values and an optional element to which it is appended:*/\n let currentFocus, filteredWorkObjectNames;\n\n /* execute a function when someone writes in the text field:*/\n input.addEventListener(\"input\", function () {\n if (workObjectNames.length === 0) {\n return;\n }\n\n /* the direct editing field of actors and workobjects is a recycled html-element and has old values that need to be overridden*/\n if (element.type.includes(ElementTypes.WORKOBJECT)) {\n this.value = this.innerHTML;\n }\n let autocompleteList,\n autocompleteItem,\n val = this.value;\n\n /* close any already open lists of autocompleted values*/\n closeAllLists();\n currentFocus = -1;\n\n /* create a DIV element that will contain the items (values):*/\n autocompleteList = document.createElement(\"DIV\");\n autocompleteList.setAttribute(\"id\", \"autocomplete-list\");\n autocompleteList.setAttribute(\"class\", \"autocomplete-items\");\n\n /* append the DIV element as a child of the autocomplete container:*/\n this.parentNode.appendChild(autocompleteList);\n\n /* for each item in the array...*/\n filteredWorkObjectNames = [];\n for (const name of workObjectNames) {\n /* check if the item starts with the same letters as the text field value:*/\n if (val) {\n if (name.substring(0, val.length).toUpperCase() === val.toUpperCase()) {\n /* create a DIV element for each matching element:*/\n autocompleteItem = document.createElement(\"DIV\");\n\n /* make the matching letters bold:*/\n autocompleteItem.innerHTML =\n \"\" +\n name.substring(0, val.length) +\n \"\" +\n name.substring(val.length);\n\n /* insert an input field that will hold the current name:*/\n autocompleteItem.innerHTML +=\n \"\";\n autocompleteList.appendChild(autocompleteItem);\n\n filteredWorkObjectNames.push(name);\n }\n }\n }\n\n // if we edit an actor, we do not want auto-complete, since actors generally are unique\n if (element.type.includes(ElementTypes.ACTOR)) {\n autocompleteList.style.visibility = \"hidden\";\n }\n });\n\n /* execute a function presses a key on the keyboard:*/\n input.onkeydown = function (e) {\n let autocompleteList = document.getElementById(\"autocomplete-list\");\n if (autocompleteList) {\n autocompleteList = autocompleteList.getElementsByTagName(\"div\");\n }\n if (e.keyCode === 40) {\n /* If the arrow DOWN key is pressed,\n increase the currentFocus letiable:*/\n currentFocus++;\n\n /* and and make the current item more visible:*/\n addActive(autocompleteList);\n } else if (e.keyCode === 38) {\n // up\n /* If the arrow UP key is pressed,\n decrease the currentFocus letiable:*/\n currentFocus--;\n\n /* and and make the current item more visible:*/\n addActive(autocompleteList);\n } else if (e.keyCode === 13) {\n e.preventDefault();\n /* If the ENTER key is pressed, prevent the form from being submitted,*/\n if (currentFocus > -1) {\n element.businessObject.name = filteredWorkObjectNames[currentFocus];\n eventBus.fire(\"element.changed\", { element });\n }\n }\n };\n\n function addActive(autocompleteList) {\n /* a function to classify an item as \"active\":*/\n if (!autocompleteList || autocompleteList.length < 1) return false;\n\n /* start by removing the \"active\" class on all items:*/\n removeActive(autocompleteList);\n if (currentFocus >= autocompleteList.length) currentFocus = 0;\n if (currentFocus < 0) currentFocus = autocompleteList.length - 1;\n\n /* add class \"autocomplete-active\":*/\n autocompleteList[currentFocus].classList.add(\"autocomplete-active\");\n }\n\n function removeActive(autocompleteList) {\n /* a function to remove the \"active\" class from all autocomplete items:*/\n if (autocompleteList.length > 1) {\n for (const item of autocompleteList) {\n item.classList.remove(\"autocomplete-active\");\n }\n }\n }\n\n function closeAllLists(survivor) {\n /* close all autocomplete lists in the document,\n except the one passed as an argument:*/\n let autocompleteList =\n document.getElementsByClassName(\"autocomplete-items\");\n for (const item of autocompleteList) {\n if (survivor != item && survivor != input) {\n item.parentNode.removeChild(item);\n }\n }\n }\n\n /* execute a function when someone clicks in the document:*/\n document.addEventListener(\"click\", function (e) {\n closeAllLists(e.target);\n });\n}\n","\"use strict\";\n\nimport ChangeSupportModule from \"diagram-js/lib/features/change-support\";\nimport ResizeModule from \"diagram-js/lib/features/resize\";\nimport DirectEditingModule from \"diagram-js-direct-editing\";\n\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"../updateHandler/updateLabelHandler\";\nimport DSLabelEditingPreview from \"./dsLabelEditingPreview\";\nimport DSLabelEditingProvider from \"./dsLabelEditingProvider\";\nimport DSModeling from \"../modeling/dSModeling\";\n\nexport default {\n __depends__: [ChangeSupportModule, ResizeModule, DirectEditingModule],\n __init__: [\"dSlabelEditingProvider\", \"dSlabelEditingPreview\"],\n dSlabelEditingProvider: [\"type\", DSLabelEditingProvider],\n dSlabelEditingPreview: [\"type\", DSLabelEditingPreview],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n commandStack: [\"type\", CommandStack],\n modeling: [\"type \", DSModeling],\n};\n","\"use strict\";\n\nimport { selectPartOfActivity } from \"./dsLabelUtil\";\nimport { angleBetween } from \"src/app/utils/mathExtensions\";\n\nexport function countLines(str) {\n return str.split(/\\r\\n|\\r|\\n/).length;\n}\n\n// determine the position of the label at the activity\nexport function labelPosition(waypoints, lines = 1) {\n let amountWaypoints = waypoints.length;\n let determinedPosition;\n let xPos;\n let yPos;\n\n if (amountWaypoints > 2) {\n let angleActivity = new Array(amountWaypoints - 1);\n for (let i = 0; i < amountWaypoints - 1; i++) {\n // calculate the angles of the activities\n angleActivity[i] = angleBetween(waypoints[i], waypoints[i + 1]);\n }\n\n let selectedActivity = selectPartOfActivity(waypoints, angleActivity);\n\n xPos = labelPositionX(\n waypoints[selectedActivity],\n waypoints[selectedActivity + 1],\n );\n yPos = labelPositionY(\n waypoints[selectedActivity],\n waypoints[selectedActivity + 1],\n lines,\n );\n\n determinedPosition = {\n x: xPos,\n y: yPos,\n selected: selectedActivity,\n };\n\n return determinedPosition;\n } else {\n xPos = labelPositionX(waypoints[0], waypoints[1]);\n yPos = labelPositionY(waypoints[0], waypoints[1], lines);\n\n determinedPosition = {\n x: xPos,\n y: yPos,\n selected: 0,\n };\n\n return determinedPosition;\n }\n}\n\n// calculate the X position of the label\nexport function labelPositionX(startPoint, endPoint) {\n let angle = angleBetween(startPoint, endPoint);\n let offsetX = 0;\n let scaledAngle = 0;\n if (angle === 0 || angle === 180 || angle === 90 || angle === 270) {\n offsetX = 0;\n } else if (angle > 0 && angle < 90) {\n // endpoint in upper right quadrant\n offsetX = 5 - angle / 6;\n } else if (angle > 90 && angle < 180) {\n // endpoint in upper left quadrant\n scaledAngle = angle - 90;\n offsetX = 5 - scaledAngle / 18;\n } else if (angle > 180 && angle < 270) {\n // endpoint in lower left quadrant\n scaledAngle = angle - 180;\n offsetX = scaledAngle / 18;\n } else if (angle > 270) {\n // endpoint in lower right quadrant\n scaledAngle = angle - 270;\n offsetX = 5 - scaledAngle / 6;\n }\n return offsetX + (startPoint.x + endPoint.x) / 2;\n}\n\n// calculate the Y position of the label\nexport function labelPositionY(startPoint, endPoint, lines = 1) {\n let angle = angleBetween(startPoint, endPoint);\n let offsetY = 0;\n let scaledAngle = 0;\n\n if (angle === 0 || angle === 180) {\n offsetY = 15;\n } else if (angle === 90 || angle === 270) {\n offsetY = 0;\n } else if (angle > 0 && angle < 90) {\n // endpoint in upper right quadrant\n offsetY = 15 - angle / 6;\n } else if (angle > 90 && angle < 180) {\n // endpoint in upper left quadrant\n scaledAngle = angle - 90;\n offsetY = (-scaledAngle / 9) * lines;\n } else if (angle > 180 && angle < 270) {\n // endpoint in lower left quadrant\n scaledAngle = angle - 180;\n offsetY = 15 - scaledAngle / 3;\n } else if (angle > 270) {\n // endpoint in lower right quadrant\n scaledAngle = angle - 270;\n offsetY = (-scaledAngle / 9) * lines;\n }\n return offsetY + (startPoint.y + endPoint.y) / 2;\n}\n","\"use strict\";\n\nimport Modeling from \"bpmn-js/lib/features/modeling/Modeling\";\n\nimport { inherits } from \"util\";\n\nexport default function DSModeling(\n eventBus,\n elementFactory,\n commandStack,\n domainStoryRules,\n) {\n Modeling.call(this, eventBus, elementFactory, commandStack, domainStoryRules);\n}\n\nModeling.prototype.updateLabel = function (element, newLabel, newBounds) {\n if (\n element.businessObject\n ? newLabel !== element.businessObject.name\n : newLabel !== element.name\n ) {\n if (/^domainStory:/.test(element.type)) {\n this._commandStack.execute(\"element.updateCustomLabel\", {\n element: element,\n newLabel: newLabel,\n newBounds: newBounds,\n });\n } else {\n this._commandStack.execute(\"element.updateLabel\", {\n element: element,\n newLabel: newLabel,\n newBounds: newBounds,\n });\n }\n }\n};\n\nModeling.prototype.updateNumber = function (element, newNumber, newBounds) {\n if (\n element.businessObject\n ? newNumber !== element.businessObject.number\n : newNumber !== element.number\n ) {\n if (/^domainStory:/.test(element.type)) {\n this._commandStack.execute(\"element.updateCustomLabel\", {\n element: element,\n newNumber: newNumber,\n newBounds: newBounds,\n });\n } else {\n this._commandStack.execute(\"element.updateLabel\", {\n element: element,\n newNumber: newNumber,\n newBounds: newBounds,\n });\n }\n }\n};\n\nModeling.prototype.replaceShape = function (oldShape, newShape, hints) {\n let context = {\n oldShape: oldShape,\n newData: newShape,\n hints: hints || {},\n };\n\n this._commandStack.execute(\"shape.replace\", context);\n return context.newShape;\n};\n\nModeling.prototype.removeGroup = function (element) {\n this._commandStack.execute(\"shape.removeGroupWithoutChildren\", {\n element: element,\n });\n this.removeElements({ element });\n};\n\ninherits(DSModeling, Modeling);\n\nDSModeling.$inject = [\n \"eventBus\",\n \"elementFactory\",\n \"commandStack\",\n \"domainStoryRules\",\n];\n","\"use strict\";\n\nimport DomainStoryPalette from \"../palette/domainStoryPalette\";\nimport ElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\nimport CreateModule from \"diagram-js/lib/features/create\";\nimport PathMap from \"bpmn-js/lib/draw/PathMap\";\nimport PopupMenuModule from \"bpmn-js/lib/features/popup-menu\";\nimport ContextPadModule from \"diagram-js/lib/features/context-pad\";\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"../updateHandler/updateLabelHandler\";\nimport DomainStoryUpdater from \"../domainStoryUpdater\";\nimport DomainStoryElementFactory from \"../domainStoryElementFactory\";\nimport headlineAndDescriptionUpdateHandler from \"../updateHandler/headlineAndDescriptionUpdateHandler\";\nimport DomainStoryRenderer from \"../domainStoryRenderer\";\nimport DSModeling from \"./dSModeling\";\nimport DomainStoryRules from \"../domainStoryRules\";\nimport ReplaceMenuProvider from \"../change-icon/replaceMenuProvider\";\nimport DomainStoryContextPadProvider from \"../context-pad/domainStoryContextPadProvider\";\n\nexport default {\n __depends__: [CreateModule, ContextPadModule, PopupMenuModule],\n __init__: [\n \"domainStoryRenderer\",\n \"paletteProvider\",\n \"domainStoryRules\",\n \"domainStoryUpdater\",\n \"contextPadProvider\",\n \"replaceMenuProvider\",\n ],\n elementFactory: [\"type\", DomainStoryElementFactory],\n domainStoryRenderer: [\"type\", DomainStoryRenderer],\n paletteProvider: [\"type\", DomainStoryPalette],\n domainStoryRules: [\"type\", DomainStoryRules],\n domainStoryUpdater: [\"type\", DomainStoryUpdater],\n contextPadProvider: [\"type\", DomainStoryContextPadProvider],\n elementFactoryBpmn: [\"type\", ElementFactory],\n pathMap: [\"type\", PathMap],\n replaceMenuProvider: [\"type\", ReplaceMenuProvider],\n commandStack: [\"type\", CommandStack],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n headlineAndDescriptionUpdateHandler: [\n \"type\",\n headlineAndDescriptionUpdateHandler,\n ],\n modeling: [\"type\", DSModeling],\n};\n","\"use strict\";\n\nimport { angleBetween } from \"src/app/utils/mathExtensions\";\n\nlet numberRegistry = [];\nlet multipleNumberRegistry = [false];\n\nlet canvasElementRegistry;\n\nexport function initializeNumbering(canvasElementRegistryService) {\n canvasElementRegistry = canvasElementRegistryService;\n}\n\nexport function updateMultipleNumberRegistry(activityBusinessObjects) {\n activityBusinessObjects.forEach(\n (activity) =>\n (multipleNumberRegistry[activity.number] =\n activity.multipleNumberAllowed),\n );\n}\n\n// defines the box for activity numbers\nexport function numberBoxDefinitions(element) {\n let alignment = \"center\";\n let boxWidth = 30;\n let boxHeight = 30;\n let angle = 0;\n if (element.waypoints.length > 1) {\n angle = angleBetween(\n // Start of first arrow segment\n element.waypoints[0],\n // End of first arrow segment\n element.waypoints[1],\n );\n }\n let x = element.waypoints[0].x;\n let y = element.waypoints[0].y;\n\n let fixedOffsetX = 0;\n let fixedOffsetY = 0;\n let angleDependantOffsetX = 0;\n let angleDependantOffsetY = 0;\n\n // Fine tune positioning of sequence number above beginning of first arrow segment\n if (angle >= 0 && angle <= 45) {\n fixedOffsetX = 25;\n angleDependantOffsetY = 20 * (1 - angle / 45);\n } else if (angle <= 90) {\n fixedOffsetX = 5;\n angleDependantOffsetX = 15 * (1 - (angle - 45) / 45);\n } else if (angle <= 135) {\n fixedOffsetX = 5;\n angleDependantOffsetX = -20 * ((angle - 90) / 45);\n } else if (angle <= 180) {\n fixedOffsetX = -15;\n angleDependantOffsetY = 20 * ((angle - 135) / 45);\n } else if (angle <= 225) {\n fixedOffsetX = -15;\n fixedOffsetY = 15;\n angleDependantOffsetY = 25 * ((angle - 180) / 45);\n } else if (angle <= 270) {\n fixedOffsetX = 5;\n angleDependantOffsetX = -20 * (1 - (angle - 225) / 45);\n fixedOffsetY = 40;\n } else if (angle <= 315) {\n fixedOffsetX = 5;\n angleDependantOffsetX = 25 * ((angle - 270) / 45);\n fixedOffsetY = 40;\n } else {\n fixedOffsetX = 25;\n fixedOffsetY = 20;\n angleDependantOffsetY = 15 * (1 - (angle - 315) / 45);\n }\n\n x = x + fixedOffsetX + angleDependantOffsetX;\n y = y + fixedOffsetY + angleDependantOffsetY;\n\n return {\n textAlign: alignment,\n width: boxWidth,\n height: boxHeight,\n x: x,\n y: y,\n };\n}\n\n// determine the next available number that is not yet used\nexport function generateAutomaticNumber(elementActivity, commandStack) {\n const semantic = elementActivity.businessObject;\n const usedNumbers = [0];\n let wantedNumber = -1;\n\n const activitiesFromActors = canvasElementRegistry.getActivitiesFromActors();\n\n activitiesFromActors.forEach((element) => {\n if (element.businessObject.number) {\n usedNumbers.push(+element.businessObject.number);\n }\n });\n for (let i = 0; i < usedNumbers.length; i++) {\n if (!usedNumbers.includes(i)) {\n if (!usedNumbers.includes(i)) {\n wantedNumber = i;\n i = usedNumbers.length;\n }\n }\n }\n if (wantedNumber === -1) {\n wantedNumber = usedNumbers.length;\n }\n\n updateExistingNumbersAtGeneration(\n activitiesFromActors,\n wantedNumber,\n commandStack,\n );\n semantic.number = wantedNumber;\n return wantedNumber;\n}\n\n// update the numbers at the activities when generating a new activity\nexport function updateExistingNumbersAtGeneration(\n activitiesFromActors,\n wantedNumber,\n commandStack,\n) {\n activitiesFromActors.forEach((element) => {\n let number = +element.businessObject.number;\n\n if (number >= wantedNumber) {\n wantedNumber++;\n setTimeout(function () {\n commandStack.execute(\"activity.changed\", {\n businessObject: element.businessObject,\n newLabel: element.businessObject.name,\n newNumber: number,\n element: element,\n });\n }, 10);\n }\n });\n}\n\n// update the numbers at the activities when editing an activity\nexport function updateExistingNumbersAtEditing(\n activitiesFromActors,\n wantedNumber,\n eventBus,\n) {\n // get a sorted list of all activities that could need changing\n let sortedActivities = [[]];\n activitiesFromActors.forEach((activity) => {\n if (!sortedActivities[activity.businessObject.number]) {\n sortedActivities[activity.businessObject.number] = [];\n }\n sortedActivities[activity.businessObject.number].push(activity);\n });\n\n // set the number of each activity to the next highest number, starting from the number, we overrode\n let oldMultipleNumberRegistry = [...multipleNumberRegistry];\n let currentNumber = wantedNumber;\n for (\n currentNumber;\n currentNumber < sortedActivities.length;\n currentNumber++\n ) {\n if (sortedActivities[currentNumber]) {\n wantedNumber++;\n multipleNumberRegistry[wantedNumber] =\n oldMultipleNumberRegistry[currentNumber];\n setNumberOfActivity(\n sortedActivities[currentNumber],\n wantedNumber,\n eventBus,\n );\n }\n }\n}\n\n// get the IDs of activities with their associated number, only returns activities that are originating from an actor\nexport function getNumbersAndIDs() {\n let iDWithNumber = [];\n let activities = canvasElementRegistry.getActivitiesFromActors();\n\n for (let i = activities.length - 1; i >= 0; i--) {\n let id = activities[i].businessObject.id;\n let number = activities[i].businessObject.number;\n iDWithNumber.push({ id: id, number: number });\n }\n return iDWithNumber;\n}\n\nexport function addNumberToRegistry(renderedNumber, number) {\n numberRegistry[number] = renderedNumber;\n}\n\nexport function setNumberIsMultiple(number, multi) {\n multipleNumberRegistry[number] = multi;\n}\n\n/**\n * @returns copy of registry\n */\nexport function getNumberRegistry() {\n return numberRegistry.slice(0);\n}\n\nexport function getMultipleNumberRegistry() {\n return multipleNumberRegistry.slice(0);\n}\n\nfunction setNumberOfActivity(elementArray, wantedNumber, eventBus) {\n if (elementArray) {\n elementArray.forEach((element) => {\n if (element) {\n let businessObject = element.businessObject;\n if (businessObject) {\n businessObject.number = wantedNumber;\n }\n eventBus.fire(\"element.changed\", { element });\n }\n });\n }\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\nimport { overrideAppendedIcons } from \"src/app/tools/icon-set-config/domain/allIcons\";\nimport { Dictionary } from \"src/app/domain/entities/dictionary\";\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport { APPENDED_ICONS_TAG } from \"src/app/domain/entities/constants\";\n\nlet iconDictionary;\nlet configuration;\n\nexport function initializePalette(iconDictionaryService, configurationService) {\n iconDictionary = iconDictionaryService;\n configuration = configurationService;\n}\n\nexport default function PaletteProvider(\n palette,\n create,\n elementFactory,\n spaceTool,\n lassoTool,\n) {\n this._create = create;\n this._elementFactory = elementFactory;\n this._spaceTool = spaceTool;\n this._lassoTool = lassoTool;\n\n palette.registerProvider(this);\n}\n\nPaletteProvider.$inject = [\n \"palette\",\n \"create\",\n \"elementFactory\",\n \"spaceTool\",\n \"lassoTool\",\n \"modeling\",\n];\n\nPaletteProvider.prototype.getPaletteEntries = function () {\n let actions = {},\n create = this._create,\n elementFactory = this._elementFactory,\n spaceTool = this._spaceTool,\n lassoTool = this._lassoTool;\n\n function createAction(type, group, className, title, options) {\n function createListener(event) {\n let shape = elementFactory.createShape(assign({ type: type }, options));\n\n assign(shape.businessObject, {\n id: shape.id,\n });\n\n if (options) {\n shape.businessObject.di.isExpanded = options.isExpanded;\n }\n\n create.start(event, shape);\n }\n\n let shortType = type.replace(/^domainStory:/, \"\");\n\n return {\n group: group,\n className: className,\n title: \"Create \" + title || \"Create \" + shortType,\n action: {\n dragstart: createListener,\n click: createListener,\n },\n };\n }\n\n return initPalette(actions, spaceTool, lassoTool, createAction);\n};\n\nfunction appendCSSStyleCheat(customIcons) {\n const sheetEl = document.createElement(\"style\");\n document.head.appendChild(sheetEl);\n\n let customIconDict = new Dictionary();\n\n customIconDict.appendDict(customIcons);\n let customIconDictKeys = customIconDict.keysArray();\n\n customIconDictKeys.forEach((name) => {\n if (iconDictionary.getAppendedIconDictionary().has(name)) {\n let src = customIconDict.get(name);\n\n const iconStyle =\n \".icon-domain-story-\" +\n name.toLowerCase() +\n \"::before{\" +\n \" display: block;\" +\n ' content: url(\"data:image/svg+xml;utf8,' +\n wrapSRCInSVG(src) +\n '\");' +\n \" margin: 3px;}\";\n sheetEl.sheet.insertRule(iconStyle, sheetEl.sheet.cssRules.length);\n }\n });\n}\n\nfunction initPalette(actions, spaceTool, lassoTool, createAction) {\n let config = iconDictionary?.getCurrentIconConfigurationForBPMN();\n\n let customIcons = localStorage.getItem(APPENDED_ICONS_TAG);\n\n if (customIcons) {\n customIcons = JSON.parse(customIcons);\n if (customIconsLegacy(customIcons)) {\n customIcons = convertLegacyAppendedIconsToDict(customIcons);\n }\n if (customIcons.entries && customIcons.entries.forEach) {\n const customIconsDict = new Dictionary();\n customIcons.entries.forEach((entry) => {\n customIconsDict.putEntry(entry);\n });\n overrideAppendedIcons(customIconsDict);\n appendCSSStyleCheat(customIcons);\n }\n }\n\n iconDictionary?.initTypeDictionaries(config.actors, config.workObjects);\n\n let actorTypes = iconDictionary?.getTypeDictionary(ElementTypes.ACTOR);\n\n actorTypes?.keysArray().forEach((name) => {\n addCanvasObjectTypes(\n name,\n createAction,\n actions,\n \"actor\",\n ElementTypes.ACTOR,\n );\n });\n\n assign(actions, {\n \"actor-separator\": {\n group: \"actor\",\n separator: true,\n },\n });\n\n let workObjectTypes = iconDictionary?.getTypeDictionary(\n ElementTypes.WORKOBJECT,\n );\n\n workObjectTypes?.keysArray().forEach((name) => {\n addCanvasObjectTypes(\n name,\n createAction,\n actions,\n \"actor\",\n ElementTypes.WORKOBJECT,\n );\n });\n\n assign(actions, {\n \"workObject-separator\": {\n group: \"workObject\",\n separator: true,\n },\n \"domainStory-group\": createAction(\n ElementTypes.GROUP,\n \"group\",\n \"icon-domain-story-tool-group\",\n \"group\",\n ),\n \"group-separator\": {\n group: \"group\",\n separator: true,\n },\n \"lasso-tool\": {\n group: \"tools\",\n className: \"bpmn-icon-lasso-tool\",\n title: \"Activate the lasso tool\",\n action: {\n click: function (event) {\n lassoTool.activateSelection(event);\n },\n },\n },\n \"space-tool\": {\n group: \"tools\",\n className: \"bpmn-icon-space-tool\",\n title: \"Activate the create/remove space tool\",\n action: {\n click: function (event) {\n spaceTool.activateSelection(event);\n },\n },\n },\n });\n\n return actions;\n}\n\nfunction addCanvasObjectTypes(\n name,\n createAction,\n actions,\n className,\n elementType,\n) {\n let icon = iconDictionary.getIconForBPMN(elementType, name);\n\n let action = [];\n action[\"domainStory-\" + className + name] = createAction(\n `${elementType}${name}`,\n className,\n icon,\n name,\n );\n assign(actions, action);\n}\n\nfunction customIconsLegacy(customIcons) {\n return !(\n Object.keys(customIcons).length === 1 &&\n Object.keys(customIcons)[0] === \"entries\"\n );\n}\n\nfunction convertLegacyAppendedIconsToDict(customIcons) {\n let dict = new Dictionary();\n Object.keys(customIcons).forEach((key) => {\n dict.set(key, customIcons[key]);\n });\n return dict;\n}\n\n// For some reason its important to use ' in the content for the Palette and ContextPad\n// Do not change!\nfunction wrapSRCInSVG(src) {\n return (\n \"\" +\n \"\"\n );\n}\n","\"use strict\";\n\nimport { getNumbersAndIDs } from \"../numbering/numbering\";\n\n/**\n * commandStack Handler for changes at activities\n */\n\nlet canvasElementRegistry;\nexport function initializeActivityUpdateHandler(canvasElementRegistryService) {\n canvasElementRegistry = canvasElementRegistryService;\n}\n\nexport default function activityUpdateHandler(commandStack, eventBus) {\n commandStack.registerHandler(\n \"activity.directionChange\",\n activity_directionChange,\n );\n commandStack.registerHandler(\"activity.changed\", activity_changed);\n\n // update the activity from the activity-dialog, either with or without number\n // and change other activities too, to keep the numbers consistent\n function activity_changed(modeling) {\n this.preExecute = function (context) {\n context.oldLabel = context.businessObject.name || \" \";\n\n let oldNumbersWithIDs = getNumbersAndIDs();\n modeling.updateLabel(context.businessObject, context.newLabel);\n modeling.updateNumber(context.businessObject, context.newNumber);\n\n context.oldNumber = context.businessObject.number;\n context.oldNumbersWithIDs = oldNumbersWithIDs;\n };\n\n this.execute = function (context) {\n let businessObject = context.businessObject;\n let element = context.element;\n\n if (context.newLabel && context.newLabel.length < 1) {\n context.newLabel = \" \";\n }\n\n businessObject.name = context.newLabel;\n businessObject.number = context.newNumber;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n semantic.name = context.oldLabel;\n semantic.number = context.oldNumber;\n\n revertAutomaticNumberGenerationChange(\n context.oldNumbersWithIDs,\n eventBus,\n );\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n\n // change the direction of a single activity without affecting other activities\n function activity_directionChange(modeling) {\n this.preExecute = function (context) {\n context.oldNumber = context.businessObject.number;\n context.oldWaypoints = context.element.waypoints;\n context.name = context.businessObject.name;\n\n if (!context.oldNumber) {\n context.oldNumber = 0;\n }\n modeling.updateNumber(context.businessObject, context.newNumber);\n };\n\n this.execute = function (context) {\n let businessObject = context.businessObject;\n let element = context.element;\n let swapSource = element.source;\n let newWaypoints = [];\n let waypoints = element.waypoints;\n\n for (let i = waypoints.length - 1; i >= 0; i--) {\n newWaypoints.push(waypoints[i]);\n }\n\n element.source = element.target;\n businessObject.source = businessObject.target;\n element.target = swapSource;\n businessObject.target = swapSource.id;\n\n businessObject.name = context.name;\n businessObject.number = context.newNumber;\n element.waypoints = newWaypoints;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n let swapSource = element.source;\n\n element.source = element.target;\n semantic.source = semantic.target;\n element.target = swapSource;\n semantic.target = swapSource.id;\n\n semantic.name = context.name;\n\n semantic.number = context.oldNumber;\n element.waypoints = context.oldWaypoints;\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n}\n\n// reverts the automatic changed done by the automatic number-generation at editing\nfunction revertAutomaticNumberGenerationChange(iDWithNumber, eventBus) {\n let activities = canvasElementRegistry?.getActivitesFromActors();\n for (let i = activities.length - 1; i >= 0; i--) {\n for (let j = iDWithNumber.length - 1; j >= 0; j--) {\n if (iDWithNumber[j].id.includes(activities[i].businessObject.id)) {\n let element = activities[i];\n element.businessObject.number = iDWithNumber[j].number;\n j = -5;\n eventBus.fire(\"element.changed\", { element });\n iDWithNumber.splice(j, 1);\n }\n }\n }\n}\n","\"use strict\";\n\nimport { undoGroupRework } from \"../util\";\nimport { ElementTypes } from \"../../../../../domain/entities/elementTypes\";\n\nexport default function elementUpdateHandler(commandStack, eventBus) {\n commandStack.registerHandler(\"element.colorChange\", element_colorChange);\n commandStack.registerHandler(\n \"shape.removeGroupWithoutChildren\",\n removeGroupWithoutChildren,\n );\n\n function element_colorChange() {\n this.preExecute = function (context) {\n context.oldColor = context.businessObject.pickedColor;\n };\n\n this.execute = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n\n if (\n semantic.type.includes(ElementTypes.TEXTANNOTATION) &&\n element.incoming[0]\n ) {\n element.incoming[0].businessObject.pickedColor = context.newColor;\n eventBus.fire(\"element.changed\", { element: element.incoming[0] });\n }\n\n semantic.pickedColor = context.newColor;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n\n if (\n semantic.type.includes(ElementTypes.TEXTANNOTATION) &&\n element.incoming[0]\n ) {\n element.incoming[0].businessObject.pickedColor = context.oldColor;\n eventBus.fire(\"element.changed\", { element: element.incoming[0] });\n }\n\n semantic.pickedColor = context.oldColor;\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n\n function removeGroupWithoutChildren() {\n this.preExecute = function (ctx) {\n ctx.parent = ctx.element.parent;\n ctx.children = ctx.element.children.slice();\n };\n\n this.execute = function (ctx) {\n let element = ctx.element;\n ctx.children.forEach((child) => {\n undoGroupRework(element, child);\n eventBus.fire(\"element.changed\", { element: child });\n });\n eventBus.fire(\"shape.remove\", { element });\n };\n\n this.revert = function (ctx) {\n let element = ctx.element;\n eventBus.fire(\"shape.added\", { element });\n\n ctx.element.children.forEach((child) => {\n reworkGroupElements(element, child);\n });\n };\n }\n}\n","export default function headlineAndDescriptionUpdateHandler(\n commandStack,\n titleService,\n) {\n commandStack.registerHandler(\n \"story.updateHeadlineAndDescription\",\n handlerFunction,\n );\n\n function handlerFunction() {\n this.execute = function (ctx) {\n ctx.oldTitle = titleService.getTitle();\n ctx.oldDescription = titleService.getDescription();\n\n titleService.updateTitleAndDescription(\n ctx.newTitle,\n ctx.newDescription,\n false,\n );\n };\n\n this.revert = function (ctx) {\n titleService.updateTitleAndDescription(\n ctx.oldTitle,\n ctx.oldDescription,\n false,\n );\n };\n }\n}\n","\"use strict\";\n\nexport default function DSMassRenameHandler(commandStack, eventBus) {\n commandStack.registerHandler(\"domainStoryObjects.massRename\", massRename);\n\n function massRename(modeling) {\n this.preExecute = function (context) {\n let relevantElements = context.elements;\n\n context.oldLabel = relevantElements[0].businessObject.name;\n\n relevantElements.forEach((element) => {\n modeling.updateLabel(element.businessObject, confirm.newValue);\n });\n };\n\n this.execute = function (context) {\n let relevantElements = context.elements;\n relevantElements.forEach((element) => {\n let semantic = element.businessObject;\n semantic.name = context.newValue;\n\n eventBus.fire(\"element.changed\", { element });\n });\n };\n\n this.revert = function (context) {\n let relevantElements = context.elements;\n relevantElements.forEach((element) => {\n let semantic = element.businessObject;\n semantic.name = context.oldLabel;\n\n eventBus.fire(\"element.changed\", { element });\n });\n };\n }\n}\n","\"use strict\";\n\nimport {\n setLabel,\n getLabel,\n setNumber,\n getNumber,\n} from \"../labeling/dsLabelUtil\";\n\nimport {\n getExternalLabelMid,\n isLabelExternal,\n hasExternalLabel,\n isLabel,\n} from \"bpmn-js/lib/util/LabelUtil\";\n\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport { getBusinessObject, is } from \"../util\";\n\nconst NULL_DIMENSIONS = {\n width: 0,\n height: 0,\n};\n\n/**\n * a handler that updates the text of a BPMN element.\n */\nexport default function UpdateLabelHandler(\n modeling,\n textRenderer,\n commandStack,\n) {\n commandStack.registerHandler(\"element.updateCustomLabel\", handlerFunction);\n\n function handlerFunction() {\n /**\n * Set the label and return the changed elements.\n *\n * Element parameter can be label itself or connection (i.e. sequence flow).\n *\n * @param {djs.model.Base} element\n * @param {String} text\n */\n\n this.preExecute = function (ctx) {\n let element = ctx.element,\n businessObject = element.businessObject,\n newLabel = ctx.newLabel,\n newNumber = ctx.newNumber;\n\n if (\n !isLabel(element) &&\n isLabelExternal(element) &&\n !hasExternalLabel(element) &&\n (newLabel !== \"\" || newNumber !== \"\")\n ) {\n // create label\n let paddingTop = 7;\n\n let labelCenter = getExternalLabelMid(element);\n\n labelCenter = {\n x: labelCenter.x,\n y: labelCenter.y + paddingTop,\n };\n\n modeling.createLabel(element, labelCenter, {\n id: businessObject.id + \"_label\",\n businessObject: businessObject,\n });\n }\n };\n\n this.execute = function (ctx) {\n ctx.oldLabel = getLabel(ctx.element);\n ctx.oldNumber = getNumber(ctx.element);\n return setText(ctx.element, ctx.newLabel, ctx.newNumber);\n };\n\n this.revert = function (ctx) {\n return setText(ctx.element, ctx.oldLabel, ctx.oldNumber);\n };\n\n this.postExecute = function (ctx) {\n let element = ctx.element,\n label = element.label || element,\n newLabel = ctx.newLabel,\n newBounds = ctx.newBounds;\n\n if (isLabel(label) && newLabel.trim() === \"\") {\n modeling.removeShape(label);\n\n return;\n }\n\n // ignore internal labels for elements except text annotations\n if (\n !isLabelExternal(element) &&\n !is(element, ElementTypes.TEXTANNOTATION)\n ) {\n return;\n }\n\n let bo = getBusinessObject(label);\n\n let text = bo.name || bo.text;\n\n // don't resize without text\n if (!text) {\n return;\n }\n\n // resize element based on label _or_ pre-defined bounds\n if (typeof newBounds === \"undefined\") {\n newBounds = textRenderer.getLayoutedBounds(label, text);\n }\n\n // setting newBounds to false or _null_ will\n // disable the postExecute resize operation\n if (newBounds) {\n modeling.resizeShape(label, newBounds, NULL_DIMENSIONS);\n }\n };\n }\n}\n\nfunction setText(element, text, textNumber) {\n // external label if present\n let label = element.label || element;\n\n let number = element.number || element;\n\n let labelTarget = element.labelTarget || element;\n\n let numberTarget = element.numberTarget || element;\n setLabel(label, text);\n setNumber(number, textNumber);\n\n return [label, labelTarget, number, numberTarget];\n}\n\nUpdateLabelHandler.$inject = [\"modeling\", \"textRenderer\", \"commandStack\"];\n","// TODO: this will not work for actors and work objects as the name of the icon is part of the type\nexport function is(element, type) {\n const bo = getBusinessObject(element);\n\n return bo && bo.type === type;\n}\n\nexport function getBusinessObject(element) {\n return (element && element.businessObject) || element;\n}\n\nexport function reworkGroupElements(parent, shape) {\n parent.children.slice().forEach((innerShape) => {\n if (innerShape.id !== shape.id) {\n if (innerShape.x >= shape.x && innerShape.x <= shape.x + shape.width) {\n if (innerShape.y >= shape.y && innerShape.y <= shape.y + shape.height) {\n innerShape.parent = shape;\n if (!shape.children.includes(innerShape)) {\n shape.children.push(innerShape);\n }\n }\n }\n }\n });\n}\n\nexport function undoGroupRework(parent, shape) {\n const superParent = parent.parent;\n\n parent.children.remove(shape);\n superParent.children.add(shape);\n\n shape.parent = superParent;\n\n const svgShape = document.querySelector(\n \"[data-element-id=\" + shape.id + \"]\",\n ).parentElement;\n const svgGroup = svgShape.parentElement;\n const svgGroupParent = svgGroup.parentElement.parentElement;\n svgGroup.removeChild(svgShape);\n svgGroupParent.appendChild(svgShape);\n}\n\nexport function isCustomIcon(icon) {\n // default icons are provided as SVG\n // custom icons are provided as \"Data URL\" with a base64-encoded image as payload\n return icon.startsWith(\"data\");\n}\n\nexport function isCustomSvgIcon(icon) {\n // default icons are provided as SVG\n // custom icons are provided as \"Data URL\" with a base64-encoded image as payload\n return icon.startsWith(\"data:image/svg\");\n}\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n OnInit,\n ViewChild,\n} from '@angular/core';\nimport { SettingsService } from 'src/app/workbench/services/settings/settings.service';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { TitleService } from './tools/title/services/title.service';\nimport { ExportService } from './tools/export/services/export.service';\nimport { ReplayService } from './tools/replay/services/replay.service';\nimport { environment } from '../environments/environment';\nimport { ColorPickerDirective } from 'ngx-color-picker';\nimport { AutosaveService } from './tools/autosave/services/autosave.service';\nimport {\n BLACK,\n BLUE,\n CYAN,\n DARK_PINK,\n GREEN,\n GREY,\n LIGHT_PINK,\n LIME,\n ORANGE,\n PURPLE,\n RED,\n SNACKBAR_DURATION,\n SNACKBAR_DURATION_LONG,\n SNACKBAR_INFO,\n YELLOW,\n} from './domain/entities/constants';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.scss'],\n})\nexport class AppComponent implements OnInit, AfterViewInit {\n showSettings$: Observable | BehaviorSubject;\n showDescription$: Observable;\n version: string = environment.version;\n color: string = BLACK;\n\n @ViewChild(ColorPickerDirective, { static: false })\n colorPicker!: ColorPickerDirective;\n\n skipNextColorUpdate = false;\n\n // define preset colors that have good contrast on white background and are compatible to EventStorming notation\n colorBox: string[] = [\n YELLOW,\n ORANGE,\n RED,\n LIGHT_PINK,\n DARK_PINK,\n PURPLE,\n BLUE,\n CYAN,\n GREEN,\n LIME,\n GREY,\n BLACK,\n ];\n\n constructor(\n private settingsService: SettingsService,\n private titleService: TitleService,\n private exportService: ExportService,\n private autosaveService: AutosaveService,\n private cd: ChangeDetectorRef,\n private snackbar: MatSnackBar,\n replayService: ReplayService,\n ) {\n this.showSettings$ = new BehaviorSubject(false);\n this.showDescription$ = new BehaviorSubject(true);\n\n document.addEventListener('keydown', (e: KeyboardEvent) => {\n if (e.ctrlKey && e.key === 's') {\n e.preventDefault();\n e.stopPropagation();\n if (this.exportService.isDomainStoryExportable()) {\n this.exportService.downloadDST();\n }\n }\n if (e.ctrlKey && e.key === 'l') {\n e.preventDefault();\n e.stopPropagation();\n document.getElementById('import')?.click();\n }\n if (\n (e.key === 'ArrowRight' || e.key === 'ArrowUp') &&\n replayService.getReplayOn()\n ) {\n e.preventDefault();\n e.stopPropagation();\n replayService.nextSentence();\n }\n if (\n (e.key === 'ArrowLeft' || e.key === 'ArrowDown') &&\n replayService.getReplayOn()\n ) {\n e.preventDefault();\n e.stopPropagation();\n replayService.previousSentence();\n }\n if (e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n this.skipNextColorUpdate = true;\n this.colorPicker.closeDialog();\n }\n });\n\n document.addEventListener('defaultColor', (event: Event) => {\n const customEvent = event as CustomEvent;\n if (customEvent.detail.color === 'black') {\n this.color = BLACK;\n } else {\n this.color = customEvent.detail.color;\n }\n });\n\n document.addEventListener('openColorPicker', () => {\n this.colorPicker.openDialog();\n });\n\n document.addEventListener('errorColoringOnlySvg', () => {\n this.snackbar.open('Only SVG icons can be colored', undefined, {\n duration: SNACKBAR_DURATION_LONG,\n panelClass: SNACKBAR_INFO,\n });\n });\n }\n\n ngOnInit(): void {\n this.showDescription$ = this.titleService.showDescription$;\n this.showSettings$ = this.settingsService.showSettings$;\n }\n\n onColorChanged(color: string) {\n if (this.skipNextColorUpdate) {\n this.skipNextColorUpdate = false;\n return;\n }\n document.dispatchEvent(\n new CustomEvent('pickedColor', { detail: { color: color } }),\n );\n }\n\n ngAfterViewInit(): void {\n this.autosaveService.loadLatestDraft();\n this.cd.detectChanges();\n }\n}\n","
\n \n\n @if (showSettings$ | async) {\n \n }\n \n \n \n
\n\n \n \n \"Egon\n egon.io\n version: \n {{ version }}\n by \n \"WPS\n WPS\n \n\n \n Privacy\n \n\n \n Imprint\n \n \n\n","import {\n APP_INITIALIZER,\n ApplicationRef,\n DoBootstrap,\n NgModule,\n} from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport {\n MAT_CHECKBOX_DEFAULT_OPTIONS,\n MatCheckboxDefaultOptions,\n} from '@angular/material/checkbox';\n\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { AppComponent } from 'src/app/app.component';\nimport { ImportDomainStoryService } from 'src/app/tools/import/services/import-domain-story.service';\nimport { LabelDictionaryService } from 'src/app/tools/label-dictionary/services/label-dictionary.service';\nimport { ElementRegistryService } from 'src/app/domain/services/element-registry.service';\nimport { IconSetConfigurationService } from 'src/app/tools/icon-set-config/services/icon-set-configuration.service';\nimport { UntypedFormBuilder } from '@angular/forms';\nimport { IconDictionaryService } from 'src/app/tools/icon-set-config/services/icon-dictionary.service';\nimport { AutosaveService } from './tools/autosave/services/autosave.service';\nimport { MaterialModule } from './material.module';\nimport { ColorPickerModule } from 'ngx-color-picker';\nimport { DirtyFlagService } from './domain/services/dirty-flag.service';\nimport { IconSetChangedService } from './tools/icon-set-config/services/icon-set-customization.service';\nimport { initializeContextPadProvider } from './tools/modeler/bpmn/modeler/context-pad/domainStoryContextPadProvider';\nimport { initializePalette } from './tools/modeler/bpmn/modeler/palette/domainStoryPalette';\nimport { initializeRenderer } from './tools/modeler/bpmn/modeler/domainStoryRenderer';\nimport { initializeLabelEditingProvider } from './tools/modeler/bpmn/modeler/labeling/dsLabelEditingProvider';\nimport { initializeReplaceOptions } from './tools/modeler/bpmn/modeler/change-icon/replaceOptions';\nimport { initializeNumbering } from './tools/modeler/bpmn/modeler/numbering/numbering';\nimport { initializeActivityUpdateHandler } from './tools/modeler/bpmn/modeler/updateHandler/activityUpdateHandlers';\nimport { WorkbenchModule } from './workbench/presentation/workbench.module';\nimport { DomainModule } from './domain/presentation/domain.module';\nimport { AutosaveModule } from './tools/autosave/presentation/autosave.module';\nimport { ExportModule } from './tools/export/presentation/export.module';\nimport { IconSetConfigModule } from './tools/icon-set-config/presentation/icon-set-config.module';\nimport { ImportModule } from './tools/import/presentation/import.module';\nimport { LabelDictionaryModule } from './tools/label-dictionary/presentation/label-dictionary.module';\nimport { ModelerModule } from './tools/modeler/presentation/modeler.module';\nimport { TitleModule } from './tools/title/presentation/title.module';\n\n@NgModule({\n declarations: [AppComponent],\n imports: [\n BrowserModule,\n NoopAnimationsModule,\n MaterialModule,\n ColorPickerModule,\n WorkbenchModule,\n AutosaveModule,\n ExportModule,\n IconSetConfigModule,\n ImportModule,\n LabelDictionaryModule,\n ModelerModule,\n TitleModule,\n DomainModule,\n ],\n providers: [\n UntypedFormBuilder,\n {\n provide: MAT_CHECKBOX_DEFAULT_OPTIONS,\n useValue: { clickAction: 'noop' } as MatCheckboxDefaultOptions,\n },\n {\n provide: APP_INITIALIZER,\n useFactory: initialize,\n multi: true,\n deps: [\n DirtyFlagService,\n IconDictionaryService,\n IconSetConfigurationService,\n ElementRegistryService,\n LabelDictionaryService,\n ],\n },\n {\n provide: IconSetChangedService,\n useExisting: ImportDomainStoryService,\n },\n ],\n})\nexport class AppModule implements DoBootstrap {\n constructor(private autosaveService: AutosaveService) {\n // autosaveService wird so automatisch initialisiert, auf keinen Fall entfernen!\n }\n\n ngDoBootstrap(app: ApplicationRef): void {\n const componentElement = document.createElement('app-root');\n document.body.append(componentElement);\n app.bootstrap(AppComponent);\n }\n}\n\nfunction initialize(\n dirtyFlagService: DirtyFlagService,\n iconDictionaryService: IconDictionaryService,\n configurationService: IconSetConfigurationService,\n elementRegistryService: ElementRegistryService,\n labelDictionaryService: LabelDictionaryService,\n) {\n return () => {\n initializeContextPadProvider(dirtyFlagService, iconDictionaryService);\n\n /** The Palette and the Context Menu need the Icons present in the Domain,\n * so the IconDictionaryService and the IconSetConfigurationService needs to be given to the Palette **/\n initializePalette(iconDictionaryService, configurationService);\n initializeRenderer(\n iconDictionaryService,\n elementRegistryService,\n dirtyFlagService,\n );\n initializeLabelEditingProvider(labelDictionaryService);\n initializeReplaceOptions(iconDictionaryService);\n initializeNumbering(elementRegistryService);\n initializeActivityUpdateHandler(elementRegistryService);\n };\n}\n","export class Configuration {\n actors: string[];\n workObjects: string[];\n\n constructor(actors: string[], workObjects: string[]) {\n this.actors = actors;\n this.workObjects = workObjects;\n }\n}\n","/** DEFAULT VALUES **/\nexport const INITIAL_TITLE = '< title >';\nexport const INITIAL_DESCRIPTION = '';\nexport const INITIAL_ICON_SET_NAME = 'default';\n\n/** LocalStorageTags **/\nexport const APPENDED_ICONS_TAG = 'appendedIcons';\n// String value of tag should not be renamed, because existing configurations would not load\nexport const ICON_SET_CONFIGURATION_TAG = 'iconSetConfigurationTag';\n\n/** Version Key **/\nexport const VERSION_KEY = 'versionKey';\n\n/** AUTOSAVE DEFAULTS **/\nexport const DEFAULT_AUTOSAVES_ENABLED = true;\nexport const DEFAULT_AUTOSAVES_MAX_DRAFTS = 5;\nexport const DEFAULT_AUTOSAVES_INTERVAL = 30;\n\n/** SNACKBAR **/\nexport const SNACKBAR_DURATION = 2000;\nexport const SNACKBAR_DURATION_LONG = 4000;\nexport const SNACKBAR_DURATION_LONGER = 6000;\nexport const SNACKBAR_SUCCESS = 'snackbar_success';\nexport const SNACKBAR_ERROR = 'snackbar_error';\nexport const SNACKBAR_INFO = 'snackbar_info';\n\n/** BPMN_RELEVANT_CONSTANTS **/\nexport const IMPLICIT_ROOT_ID = '__implicitroot';\n\n/** COLOR PICKER DEFAULT COLORS **/\nexport const YELLOW = '#FDD835';\nexport const ORANGE = '#FB8C00';\nexport const RED = '#D32F2F';\nexport const LIGHT_PINK = '#F48FB1';\nexport const DARK_PINK = '#EC407A';\nexport const PURPLE = '#8E24AA';\nexport const BLUE = '#1E88E5';\nexport const CYAN = '#00ACC1';\nexport const GREEN = '#43A047';\nexport const LIME = '#C0CA33';\nexport const GREY = '#9E9E9E';\nexport const BLACK = '#000000';\n","export class Dictionary {\n private entries: Entry[];\n\n constructor() {\n this.entries = [];\n }\n\n get length(): number {\n return this.entries.length;\n }\n\n all(): Entry[] {\n return this.entries;\n }\n\n size(): number {\n return this.entries.length;\n }\n\n isEmpty(): boolean {\n return this.entries.length <= 0;\n }\n\n has(key: string): boolean {\n return this.entries.some((entry) => entry.key === key);\n }\n\n set(key: string, value: any): void {\n if (!this.has(key)) {\n this.entries.push(new Entry(value, key));\n }\n }\n\n add(value: any, key: string): void {\n this.set(key, value);\n }\n\n putEntry(entry: Entry): void {\n if (!this.has(entry.key)) {\n this.entries.push(new Entry(entry.value, entry.key));\n }\n }\n\n keysArray(): string[] {\n return this.entries.map((entry) => entry.key);\n }\n\n addEach(object: any): void {\n Object.keys(object).forEach((key) => {\n this.set(key, object[key]);\n });\n }\n\n appendDict(dict: Dictionary): void {\n dict.entries.forEach((entry) => this.putEntry(entry));\n }\n\n clear(): void {\n this.entries = [];\n }\n\n delete(key: string): void {\n this.entries = this.entries.filter((entry) => entry.key !== key);\n }\n\n get(key: string): any {\n const found = this.entries.filter((entry) => entry.key === key);\n return found[0] ? found[0].value : null;\n }\n}\n\nexport class Entry {\n value: any;\n key: string;\n\n constructor(value: any, key: string) {\n this.value = value;\n this.key = key;\n }\n}\n","export enum ElementTypes {\n ACTIVITY = 'domainStory:activity',\n CONNECTION = 'domainStory:connection',\n ACTOR = 'domainStory:actor',\n WORKOBJECT = 'domainStory:workObject',\n GROUP = 'domainStory:group',\n TEXTANNOTATION = 'domainStory:textAnnotation',\n DOMAINSTORY = 'domainStory:',\n}\n\nexport namespace ElementTypes {\n export function getIconId(type: string): string {\n if (type.startsWith(ElementTypes.ACTOR)) {\n return type.replace(ElementTypes.ACTOR, '');\n } else if (type.startsWith(ElementTypes.WORKOBJECT)) {\n return type.replace(ElementTypes.WORKOBJECT, '');\n }\n return '';\n }\n}\n","export class InfoDialogData {\n title: string;\n infoText: string;\n isInfo: boolean;\n isLink: boolean;\n linkText: string | undefined;\n\n constructor(\n title: string,\n infoText: string,\n isInfo: boolean,\n isLink: boolean = false,\n linkText?: string,\n ) {\n this.title = title;\n this.infoText = infoText;\n this.isInfo = isInfo;\n this.isLink = isLink;\n this.linkText = linkText;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { InfoDialogComponent } from './info-dialog/info-dialog.component';\nimport { CommonModule } from '@angular/common';\nimport { MaterialModule } from '../../material.module';\n\n@NgModule({\n declarations: [InfoDialogComponent],\n exports: [InfoDialogComponent],\n imports: [CommonModule, MaterialModule],\n})\nexport class DomainModule {}\n","import { AfterViewInit, Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { InfoDialogData } from 'src/app/domain/entities/infoDialogData';\n\n@Component({\n selector: 'app-info-dialog',\n templateUrl: './info-dialog.component.html',\n styleUrls: ['./info-dialog.component.scss'],\n})\nexport class InfoDialogComponent implements AfterViewInit {\n title: string;\n infoText: string;\n showConfirmButton: boolean;\n hasLink: boolean;\n linkText: string;\n\n constructor(\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: InfoDialogData,\n ) {\n this.title = data.title;\n this.infoText = data.infoText;\n this.showConfirmButton = !data.isInfo;\n this.hasLink = data.isLink;\n this.linkText = data.linkText || '';\n }\n\n ngAfterViewInit() {\n const span = document.getElementsByClassName(\n 'readOnlyText',\n )[0] as HTMLTextAreaElement;\n span.style.height = span.scrollHeight + 'px';\n }\n\n close(): void {\n this.dialogRef.close();\n }\n}\n","\n

{{ title }}

\n @if (infoText != \"\") {\n {{ infoText }} \n }\n @if (hasLink) {\n {{ linkText }}\n }\n
\n\n@if (showConfirmButton) {\n \n \n \n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CommandStackService {\n private commandStack: any;\n\n constructor() {}\n\n setCommandStack(commandStack: any): void {\n this.commandStack = commandStack;\n }\n\n execute(action: string, payload: any) {\n this.commandStack.execute(action, payload);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\nimport { ComponentType } from '@angular/cdk/overlay';\nimport { InfoDialogData } from '../entities/infoDialogData';\nimport { InfoDialogComponent } from '../presentation/info-dialog/info-dialog.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DialogService {\n constructor(private matDialog: MatDialog) {}\n\n openDialog(dialog: ComponentType, config: MatDialogConfig): void {\n this.matDialog.open(dialog, config);\n }\n\n openKeyboardShortcutsDialog(): void {\n const title = 'Keyboard Shortcuts';\n const shortCutText =\n 'Undo:\\t\\t\\t\\t\\tctrl + Z \\n' +\n 'Redo:\\t\\t\\t\\t\\tctrl + Y OR ctrl + shift + Z\\n' +\n 'Select All:\\t\\t\\t\\tctrl + A\\n' +\n 'Export as EGN:\\t\\t\\tctrl + S\\n' +\n 'Import Domain Story: \\tctrl + L\\n' +\n 'Search for text:\\t\\t\\tctrl + F\\n' +\n 'Direct editing:\\t\\t\\tE\\n' +\n 'Hand tool:\\t\\t\\t\\tH\\n' +\n 'Lasso tool:\\t\\t\\t\\tL\\n' +\n 'Space tool:\\t\\t\\t\\tS';\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n config.data = new InfoDialogData(title, shortCutText, true);\n\n this.openDialog(InfoDialogComponent, config);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DirtyFlagService {\n private isDirtySubject = new BehaviorSubject(false);\n dirty$ = this.isDirtySubject.asObservable();\n\n makeDirty(): void {\n this.isDirtySubject.next(true);\n }\n\n makeClean(): void {\n this.isDirtySubject.next(false);\n }\n\n get dirty(): boolean {\n return this.isDirtySubject.value;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { ElementTypes } from 'src/app/domain/entities/elementTypes';\nimport { CanvasObject } from 'src/app/domain/entities/canvasObject';\nimport { GroupCanvasObject } from '../entities/groupCanvasObject';\nimport { ActivityCanvasObject } from '../entities/activityCanvasObject';\nimport { UsedIconList } from 'src/app/domain/entities/UsedIconList';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ElementRegistryService {\n private registry: any;\n private fullyInitialized = false;\n\n /**\n * Initially the registry has only the root-Element.\n * Once the canvas has bees initialized, we adjust the reference to point to the elements on the canvas for convenience\n */\n correctInitialize(): void {\n if (!this.fullyInitialized) {\n if (this.registry.__implicitroot) {\n this.registry = this.registry.__implicitroot.element.children;\n this.fullyInitialized = true;\n }\n }\n }\n\n setElementRegistry(registry: any): void {\n this.registry = registry._elements;\n }\n\n clear(): void {\n this.registry = null;\n this.fullyInitialized = false;\n }\n\n createObjectListForDSTDownload(): CanvasObject[] {\n if (this.registry) {\n const allObjectsFromCanvas = this.getAllCanvasObjects();\n const groups = this.getAllGroups();\n\n const objectList: CanvasObject[] = [];\n\n this.fillListOfCanvasObjects(allObjectsFromCanvas, objectList, groups);\n\n return objectList;\n }\n return [];\n }\n\n private fillListOfCanvasObjects(\n allObjectsFromCanvas: CanvasObject[],\n objectList: CanvasObject[],\n groups: GroupCanvasObject[],\n ): void {\n allObjectsFromCanvas.forEach((canvasElement) => {\n if (canvasElement.type === ElementTypes.ACTIVITY) {\n objectList.push(canvasElement);\n }\n\n // ensure that Activities are always after Actors, Workobjects and Groups in .dst files\n else {\n if (canvasElement.type === ElementTypes.TEXTANNOTATION) {\n canvasElement.businessObject.width = canvasElement.width;\n canvasElement.businessObject.height = canvasElement.height;\n }\n if (!objectList.includes(canvasElement)) {\n objectList.unshift(canvasElement);\n }\n }\n });\n\n groups.forEach((group) => {\n objectList.push(group);\n });\n }\n\n getAllActivities(): ActivityCanvasObject[] {\n const activities: ActivityCanvasObject[] = [];\n\n this.getAllCanvasObjects().forEach((element) => {\n if (element.type.includes(ElementTypes.ACTIVITY)) {\n activities.push(element as ActivityCanvasObject);\n }\n });\n return activities;\n }\n\n getAllConnections(): ActivityCanvasObject[] {\n const connections: ActivityCanvasObject[] = [];\n this.getAllCanvasObjects().forEach((element) => {\n const type = element.type;\n if (type === ElementTypes.CONNECTION) {\n connections.push(element as ActivityCanvasObject);\n }\n });\n return connections;\n }\n\n getAllCanvasObjects(): CanvasObject[] {\n const allObjects: CanvasObject[] = [];\n const groupObjects: GroupCanvasObject[] = [];\n\n this.checkChildForGroup(groupObjects, allObjects);\n\n // for each memorized group, remove it from the group-array and check its children, whether they are groups or not\n // if a child is a group, memorize it in the group-array\n // other children should already be in the allObjects list\n let i = groupObjects.length - 1;\n while (groupObjects.length >= 1) {\n const currentGroup = groupObjects.pop();\n // @ts-ignore\n currentGroup.children.forEach((child: CanvasObject) => {\n const type = child.type;\n if (type.includes(ElementTypes.GROUP)) {\n groupObjects.push(child as GroupCanvasObject);\n }\n });\n i = groupObjects.length - 1;\n }\n return allObjects;\n }\n\n // returns all groups on the canvas and inside other groups\n getAllGroups(): GroupCanvasObject[] {\n const groupObjects: GroupCanvasObject[] = [];\n const allObjects: CanvasObject[] = [];\n\n this.checkChildForGroup(groupObjects, allObjects);\n\n for (const group of groupObjects) {\n group.children?.forEach((child: CanvasObject) => {\n if (child.type.includes(ElementTypes.GROUP)) {\n groupObjects.push(child as GroupCanvasObject);\n }\n });\n }\n return groupObjects;\n }\n\n private checkChildForGroup(\n groupObjects: GroupCanvasObject[],\n allObjects: CanvasObject[],\n ): void {\n const registryElementNames = Object.keys(this.registry);\n for (let name of registryElementNames) {\n const entry = this.registry[name].element;\n if (entry.businessObject) {\n const type = entry.type;\n if (type && type.includes(ElementTypes.GROUP)) {\n // if it is a group, memorize this for later\n groupObjects.push(entry);\n } else if (type) {\n allObjects.push(entry);\n }\n }\n }\n }\n\n // get a list of activities, that originate from an actor-type\n getActivitiesFromActors(): ActivityCanvasObject[] {\n const activitiesFromActors: ActivityCanvasObject[] = [];\n const activities = this.getAllActivities();\n\n activities.forEach((activity: ActivityCanvasObject) => {\n if (activity.source?.type.includes(ElementTypes.ACTOR)) {\n activitiesFromActors.push(activity);\n }\n });\n\n // sort by activityBusinessObject number\n activitiesFromActors.sort(\n (\n activityCanvasA: ActivityCanvasObject,\n activityCanvasB: ActivityCanvasObject,\n ) => {\n const activityNumberA = Number(activityCanvasA.businessObject.number);\n const activityNumberB = Number(activityCanvasB.businessObject.number);\n\n return activityNumberA - activityNumberB;\n },\n );\n\n return activitiesFromActors;\n }\n\n getUsedIcons(): UsedIconList {\n const actors = this.getAllActors();\n const workobjects = this.getAllWorkobjects();\n\n return {\n actors: actors.map((a) => a.type.replace(ElementTypes.ACTOR, '')),\n workobjects: workobjects.map((w) =>\n w.type.replace(ElementTypes.WORKOBJECT, ''),\n ),\n };\n }\n\n private getAllActors() {\n return this.getAllCanvasObjects().filter((co) =>\n co.type.includes(ElementTypes.ACTOR),\n );\n }\n\n getAllWorkobjects() {\n return this.getAllCanvasObjects().filter((co) =>\n co.type.includes(ElementTypes.WORKOBJECT),\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StorageService {\n set(key: string, value: any) {\n localStorage.setItem(key, JSON.stringify(value));\n }\n\n get(key: string): any {\n const json = localStorage.getItem(key);\n if (json) {\n return JSON.parse(json);\n }\n return null;\n }\n}\n","import { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { NgModule } from '@angular/core';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatGridListModule } from '@angular/material/grid-list';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { MatListModule } from '@angular/material/list';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\n@NgModule({\n imports: [\n MatButtonModule,\n MatButtonToggleModule,\n MatListModule,\n MatCheckboxModule,\n MatDialogModule,\n MatFormFieldModule,\n MatGridListModule,\n MatInputModule,\n MatToolbarModule,\n MatExpansionModule,\n MatSnackBarModule,\n MatCardModule,\n ],\n exports: [\n MatButtonModule,\n MatButtonToggleModule,\n MatListModule,\n MatCheckboxModule,\n MatDialogModule,\n MatFormFieldModule,\n MatGridListModule,\n MatInputModule,\n MatToolbarModule,\n MatExpansionModule,\n MatSnackBarModule,\n MatCardModule,\n ],\n})\nexport class MaterialModule {}\n","import { Component } from '@angular/core';\nimport { AutosaveConfigurationService } from '../../services/autosave-configuration.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_ERROR,\n SNACKBAR_SUCCESS,\n} from 'src/app/domain/entities/constants';\n\n@Component({\n selector: 'app-autosave-options',\n templateUrl: './autosave-options.component.html',\n styleUrls: ['./autosave-options.component.scss'],\n})\nexport class AutosaveOptionsComponent {\n constructor(\n protected autosaveConfiguration: AutosaveConfigurationService,\n private snackbar: MatSnackBar,\n ) {}\n\n save(activated: boolean, maxDrafts: number, interval: number) {\n if (\n this.autosaveConfiguration.setConfiguration({\n activated,\n maxDrafts,\n interval,\n })\n ) {\n this.snackbar.open('Settings for Autosave saved', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n });\n } else {\n this.snackbar.open(\n 'Unable to save settings for Autosave - please try again',\n undefined,\n {\n duration: 2 * SNACKBAR_DURATION,\n panelClass: SNACKBAR_ERROR,\n },\n );\n }\n }\n}\n","@if (autosaveConfiguration.configuration$ | async; as configuration) {\n \n \n Autosave Options\n \n \n
\n \n Enabled\n
\n
\n Interval [sec]\n \n
\n
\n Max. Drafts\n \n
\n \n Apply\n \n
\n
\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-autosave-settings',\n templateUrl: './autosave-settings.component.html',\n styleUrls: ['./autosave-settings.component.scss'],\n})\nexport class AutosaveSettingsComponent {}\n","\n\n","import { Component, OnInit } from '@angular/core';\nimport { AutosaveService } from '../../services/autosave.service';\nimport { Draft } from '../../domain/draft';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_SUCCESS,\n} from 'src/app/domain/entities/constants';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'app-autosaved-drafts',\n templateUrl: './autosaved-drafts.component.html',\n styleUrls: ['./autosaved-drafts.component.scss'],\n})\nexport class AutosavedDraftsComponent implements OnInit {\n drafts: Draft[] = [];\n subscription: Subscription;\n\n constructor(\n private autosaveService: AutosaveService,\n private snackbar: MatSnackBar,\n ) {\n this.subscription = this.autosaveService.autosavedDraftsChanged$.subscribe(\n () => this.initDrafts(),\n );\n }\n\n ngOnInit(): void {\n this.initDrafts();\n }\n\n initDrafts() {\n this.drafts = this.autosaveService.loadCurrentDrafts();\n }\n\n loadDraft(draft: Draft): void {\n this.autosaveService.loadDraft(draft);\n this.snackbar.open('Draft loaded', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n });\n }\n\n removeAllDrafts() {\n this.autosaveService.removeAllDrafts();\n }\n}\n","\n \n \n History\n \n {{ drafts.length ? drafts.length : \"no\" }}\n {{ drafts.length > 1 ? \"drafts\" : \"draft\" }} available\n \n \n @if (drafts.length) {\n
\n @for (draft of drafts; track draft) {\n
\n
\n
{{ draft.title }}
\n
{{ draft.date }}
\n
\n \n Load Draft\n \n
\n }\n
\n
\n \n Remove All Drafts\n \n
\n
\n } @else {\n No drafts found.\n }\n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AutosaveSettingsComponent } from './AutosaveSettings/autosave-settings.component';\nimport { AutosaveOptionsComponent } from './AutosaveOptions/autosave-options.component';\nimport { AutosavedDraftsComponent } from './AutosavedDrafts/autosaved-drafts.component';\nimport { FormsModule } from '@angular/forms';\nimport { MaterialModule } from '../../../material.module';\n\n@NgModule({\n declarations: [\n AutosaveSettingsComponent,\n AutosaveOptionsComponent,\n AutosavedDraftsComponent,\n ],\n exports: [AutosaveSettingsComponent],\n imports: [CommonModule, FormsModule, MaterialModule],\n})\nexport class AutosaveModule {}\n","import { Injectable } from '@angular/core';\nimport { ReplaySubject } from 'rxjs';\nimport { StorageService } from '../../../domain/services/storage.service';\nimport { AutosaveConfiguration } from '../domain/autosave-configuration';\nimport {\n DEFAULT_AUTOSAVES_MAX_DRAFTS,\n DEFAULT_AUTOSAVES_ENABLED,\n DEFAULT_AUTOSAVES_INTERVAL,\n} from 'src/app/domain/entities/constants';\n\nconst AUTOSAVE_CONFIGURATION_TAG = 'autosaveConfiguration';\n\nconst defaultConfiguration: AutosaveConfiguration = {\n activated: DEFAULT_AUTOSAVES_ENABLED,\n interval: DEFAULT_AUTOSAVES_INTERVAL,\n maxDrafts: DEFAULT_AUTOSAVES_MAX_DRAFTS,\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AutosaveConfigurationService {\n private configuration = defaultConfiguration;\n\n private readonly configurationSubject =\n new ReplaySubject(1);\n readonly configuration$ = this.configurationSubject.asObservable();\n\n constructor(private storageService: StorageService) {\n this.initializeConfiguration();\n }\n\n private initializeConfiguration() {\n this.loadConfiguration();\n this.configurationSubject.next(this.configuration);\n }\n\n setConfiguration(configuration: AutosaveConfiguration): boolean {\n try {\n this.configuration = configuration;\n this.saveConfiguration();\n this.configurationSubject.next(configuration);\n return true;\n } catch {\n return false;\n }\n }\n\n private loadConfiguration() {\n this.configuration =\n this.storageService.get(AUTOSAVE_CONFIGURATION_TAG) ??\n defaultConfiguration;\n }\n\n private saveConfiguration() {\n this.storageService.set(AUTOSAVE_CONFIGURATION_TAG, this.configuration);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { RendererService } from '../../modeler/services/renderer.service';\nimport { ExportService } from '../../export/services/export.service';\nimport { Draft } from '../domain/draft';\nimport { AutosaveConfigurationService } from './autosave-configuration.service';\nimport { IconDictionaryService } from '../../icon-set-config/services/icon-dictionary.service';\nimport { ElementTypes } from '../../../domain/entities/elementTypes';\nimport { StorageService } from '../../../domain/services/storage.service';\nimport { TitleService } from '../../title/services/title.service';\nimport { AutosaveConfiguration } from '../domain/autosave-configuration';\nimport { Subject } from 'rxjs';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_TITLE,\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n} from '../../../domain/entities/constants';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { IconSetConfigurationService } from '../../icon-set-config/services/icon-set-configuration.service';\n\nexport const DRAFTS_TAG = 'autosaveDrafts';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AutosaveService {\n private autosaveTimer: any;\n autosavedDraftsChanged$ = new Subject();\n\n constructor(\n private autosaveConfiguration: AutosaveConfigurationService,\n private exportService: ExportService,\n private iconDictionaryService: IconDictionaryService,\n private rendererService: RendererService,\n private snackbar: MatSnackBar,\n private storageService: StorageService,\n private titleService: TitleService,\n private iconSetConfigurationService: IconSetConfigurationService,\n ) {\n this.autosaveConfiguration.configuration$.subscribe((configuration) =>\n this.updateConfiguration(configuration),\n );\n }\n\n loadCurrentDrafts(): Draft[] {\n const drafts = this.readDrafts();\n this.sortDrafts(drafts);\n return drafts;\n }\n\n loadDraft(draft: Draft): void {\n const configFromFile = draft.configAndDST.domain;\n const config =\n this.iconSetConfigurationService.createIconSetConfiguration(\n configFromFile,\n );\n const story = JSON.parse(draft.configAndDST.dst);\n\n this.titleService.updateTitleAndDescription(\n draft.title,\n draft.description,\n false,\n );\n\n const actorIcons = this.iconDictionaryService.getElementsOfType(\n story,\n ElementTypes.ACTOR,\n );\n const workObjectIcons = this.iconDictionaryService.getElementsOfType(\n story,\n ElementTypes.WORKOBJECT,\n );\n this.iconDictionaryService.updateIconRegistries(\n actorIcons,\n workObjectIcons,\n config,\n );\n this.rendererService.importStory(story, true, config, false);\n }\n\n removeAllDrafts() {\n this.storageService.set(DRAFTS_TAG, []);\n this.autosavedDraftsChanged$.next();\n }\n\n loadLatestDraft() {\n const drafts = this.readDrafts();\n if (drafts.length === 0) {\n return;\n }\n this.loadDraft(drafts[0]);\n }\n\n private updateConfiguration(configuration: AutosaveConfiguration) {\n this.stopTimer();\n\n if (configuration.activated) {\n this.startTimer(configuration.interval, configuration.maxDrafts);\n }\n }\n\n private stopTimer(): void {\n if (this.autosaveTimer) {\n clearInterval(this.autosaveTimer);\n this.autosaveTimer = undefined;\n }\n }\n\n private startTimer(interval: number, maxDrafts: number): void {\n this.autosaveTimer = setInterval(() => {\n const savedDrafts = this.loadCurrentDrafts();\n const newDraft = this.createDraft();\n let isChanged = maxDrafts > 0;\n if (savedDrafts.length > 0) {\n isChanged = isChanged && !this.isSame(newDraft, savedDrafts[0]);\n }\n if (isChanged && !this.isDraftEmpty(newDraft)) {\n savedDrafts.unshift(newDraft);\n while (savedDrafts.length > maxDrafts) {\n savedDrafts.pop();\n }\n this.writeDrafts(savedDrafts);\n this.snackbar.open('Draft Saved', undefined, {\n panelClass: SNACKBAR_INFO,\n duration: SNACKBAR_DURATION,\n });\n this.autosavedDraftsChanged$.next();\n }\n }, interval * 1000);\n }\n\n private isDraftEmpty(draft: Draft) {\n const configAndDST = draft.configAndDST ?? { dst: '[]' };\n return (\n draft.title === INITIAL_TITLE &&\n draft.description === INITIAL_DESCRIPTION &&\n JSON.parse(configAndDST.dst).length === 0\n );\n }\n\n private isSame(a: Draft, b: Draft) {\n return (\n a.title === b.title &&\n a.description === b.description &&\n JSON.stringify(a.configAndDST) === JSON.stringify(b.configAndDST)\n );\n }\n\n private writeDrafts(drafts: Draft[]) {\n this.storageService.set(DRAFTS_TAG, drafts);\n }\n\n private readDrafts(): Draft[] {\n return this.storageService.get(DRAFTS_TAG) ?? [];\n }\n\n private createDraft(): Draft {\n const dst = JSON.stringify(this.rendererService.getStory(), null, 2);\n const configAndDST = this.exportService.createConfigAndDST(dst);\n\n const date = new Date().toString().slice(0, 25);\n\n return {\n title: this.titleService.getTitle(),\n description: this.titleService.getDescription(),\n configAndDST,\n date,\n };\n }\n\n private sortDrafts(drafts: Draft[]): void {\n drafts.sort((a: Draft, b: Draft) => {\n const aDate = Date.parse(a.date);\n const bDate = Date.parse(b.date);\n return aDate > bDate ? 0 : 1;\n });\n }\n}\n","export class ExportDialogData {\n title: string;\n options: ExportOption[];\n\n constructor(title: string, options: ExportOption[]) {\n this.title = title;\n this.options = options;\n }\n}\n\nexport class ExportOption {\n text: string;\n fn: any;\n tooltip: string;\n\n constructor(text: string, tooltip: string, fn: any) {\n this.text = text;\n this.tooltip = tooltip;\n this.fn = fn;\n }\n}\n","export class ConfigAndDST {\n domain: any;\n dst: any;\n\n constructor(domain: any, dst: any) {\n this.domain = domain;\n this.dst = dst;\n }\n}\n\nexport const testConfigAndDst: ConfigAndDST = {\n domain: JSON.parse(\n '{\"name\":\"\",' +\n '\"actors\":{\"Person\":\"' +\n '' +\n '\",' +\n '\"Group\":\"' +\n '' +\n '\",' +\n '\"System\":\"' +\n '\"},' +\n '\"workObjects\":{\"Document\":\"' +\n '\",' +\n '\"Folder\":\"' +\n '' +\n '\",' +\n '\"Call\":\"' +\n '\",' +\n '\"Email\":\"' +\n '\",' +\n '\"Conversation\":\"' +\n '\",' +\n '\"Info\":\"' +\n '' +\n '\"}}',\n ),\n dst:\n '[' +\n '{\"type\":\"domainStory:workObjectDocument\",\"name\":\"\",\"id\":\"shape_3792\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"x\":302,\"y\":102},' +\n '{\"type\":\"domainStory:actorPerson\",\"name\":\"\",\"id\":\"shape_4666\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"x\":103,\"y\":93},' +\n '{\"type\":\"domainStory:activity\",\"name\":\"\",\"id\":\"connection_4884\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"number\":1,' +\n '\"waypoints\":[{\"original\":{\"x\":141,\"y\":131},\"x\":186,\"y\":133},{\"original\":{\"x\":340,\"y\":140},\"x\":302,\"y\":138}],' +\n '\"source\":\"shape_4666\",\"target\":\"shape_3792\"}]',\n};\n","export const SVG_LINK = 'http://www.w3.org/2000/svg';\nexport const X_OFFSET_UTIL = '8';\nexport const TEXTSPAN_TITLE_HEIGHT = 30;\nexport const TEXTSPAN_DESCRIPTION_HEIGHT = 15;\nexport const DEFAULT_PADDING = 15;\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { ExportDialogData } from 'src/app/tools/export/domain/dialog/exportDialogData';\nimport { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';\n\n@Component({\n selector: 'app-export-dialog',\n templateUrl: './export-dialog.component.html',\n styleUrls: ['./export-dialog.component.scss'],\n})\nexport class ExportDialogComponent implements OnInit {\n title: string;\n options: {\n text: string;\n tooltip: string;\n fn: any;\n }[];\n withTitle: BehaviorSubject;\n useWhiteBackground: BehaviorSubject;\n\n constructor(\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: ExportDialogData,\n ) {\n this.withTitle = new BehaviorSubject(true);\n this.useWhiteBackground = new BehaviorSubject(true);\n this.title = data.title;\n this.options = data.options;\n }\n\n ngOnInit(): void {}\n\n doOption(i: number): void {\n this.options[i].fn(this.withTitle.value, this.useWhiteBackground.value);\n this.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n updateWithTitle($event: Event) {\n // @ts-ignore\n this.withTitle.next($event.target.checked);\n }\n\n updateUseWhiteBackground($event: Event) {\n // @ts-ignore\n this.useWhiteBackground.next($event.target.checked);\n }\n}\n","\n

{{ title }}

\n \n
\n \n
\n\n
\n\n
\n \n @for (option of options; track option; let i = $index) {\n \n {{ option.text }}\n \n }\n
\n
\n","import { ExportDialogComponent } from './export-dialog/export-dialog.component';\nimport { CommonModule } from '@angular/common';\nimport { MaterialModule } from '../../../material.module';\nimport { NgModule } from '@angular/core';\n\n@NgModule({\n declarations: [ExportDialogComponent],\n exports: [ExportDialogComponent],\n imports: [CommonModule, MaterialModule],\n})\nexport class ExportModule {}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { IconSetConfigurationService } from 'src/app/tools/icon-set-config/services/icon-set-configuration.service';\nimport { sanitizeForDesktop } from 'src/app/utils/sanitizer';\nimport { TitleService } from 'src/app/tools/title/services/title.service';\nimport { ConfigAndDST } from 'src/app/tools/export/domain/export/configAndDst';\nimport { DirtyFlagService } from 'src/app/domain/services/dirty-flag.service';\nimport { PngService } from 'src/app/tools/export/services/png.service';\nimport { SvgService } from 'src/app/tools/export/services/svg.service';\nimport { Subscription } from 'rxjs';\nimport { RendererService } from '../../modeler/services/renderer.service';\nimport { HtmlPresentationService } from './html-presentation.service';\nimport { formatDate } from '@angular/common';\nimport { environment } from '../../../../environments/environment';\nimport {\n ExportDialogData,\n ExportOption,\n} from '../domain/dialog/exportDialogData';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { ExportDialogComponent } from '../presentation/export-dialog/export-dialog.component';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n} from '../../../domain/entities/constants';\nimport { ModelerService } from '../../modeler/services/modeler.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { DialogService } from '../../../domain/services/dialog.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ExportService implements OnDestroy {\n titleSubscription: Subscription;\n descriptionSubscription: Subscription;\n\n title = '';\n description = '';\n\n constructor(\n private configurationService: IconSetConfigurationService,\n private titleService: TitleService,\n private dirtyFlagService: DirtyFlagService,\n private pngService: PngService,\n private svgService: SvgService,\n private htmlPresentationService: HtmlPresentationService,\n private rendererService: RendererService,\n private modelerService: ModelerService,\n private dialogService: DialogService,\n private snackbar: MatSnackBar,\n ) {\n this.titleSubscription = this.titleService.title$.subscribe(\n (title: string) => {\n this.title = title;\n },\n );\n this.descriptionSubscription = this.titleService.description$.subscribe(\n (description: string) => {\n this.description = description;\n },\n );\n }\n\n ngOnDestroy(): void {\n this.titleSubscription.unsubscribe();\n this.descriptionSubscription.unsubscribe();\n }\n\n isDomainStoryExportable(): boolean {\n return this.rendererService.getStory().length >= 1;\n }\n\n createConfigAndDST(DomainStory: any): ConfigAndDST {\n return new ConfigAndDST(\n this.configurationService.getCurrentConfigurationForExport(),\n DomainStory,\n );\n }\n\n downloadDST(): void {\n const dst = this.getStoryForDownload();\n const configAndDST = this.createConfigAndDST(dst);\n const json = JSON.stringify(configAndDST, null, 2);\n\n const filename = sanitizeForDesktop(\n this.title + '_' + this.getCurrentDateString(),\n );\n\n this.downloadFile(\n json,\n 'data:text/plain;charset=utf-8,',\n filename,\n '.egn',\n true,\n );\n }\n\n private downloadFile(\n data: string,\n datatype: string,\n filename: string,\n fileEnding: string,\n makeClean: boolean,\n ) {\n const element = document.createElement('a');\n element.setAttribute('href', datatype + encodeURIComponent(data));\n element.setAttribute('download', filename + fileEnding);\n\n element.style.display = 'none';\n document.body.appendChild(element);\n\n element.click();\n\n if (makeClean) {\n this.dirtyFlagService.makeClean();\n }\n\n document.body.removeChild(element);\n }\n\n downloadSVG(withTitle: boolean, useWhiteBackground: boolean): void {\n const story = this.getStoryForDownload();\n const dst = this.createConfigAndDST(story);\n\n const svgData = this.svgService.createSVGData(\n this.title,\n this.description,\n dst,\n withTitle,\n useWhiteBackground,\n );\n\n this.downloadFile(\n svgData,\n 'data:application/bpmn20-xml;charset=UTF-8,',\n sanitizeForDesktop(this.title + '_' + this.getCurrentDateString()),\n '.egn.svg',\n true,\n );\n }\n\n downloadPNG(withTitle: boolean): void {\n const canvas = document.getElementById('canvas');\n if (canvas) {\n const container = canvas.getElementsByClassName('djs-container');\n const svgElements = container[0].getElementsByTagName('svg');\n const outerSVGElement = svgElements[0];\n const viewport = outerSVGElement.getElementsByClassName('viewport')[0];\n const layerBase = viewport.getElementsByClassName('layer-base')[0];\n\n const image = document.createElement('img');\n\n // removes unwanted black dots in image\n let svg = this.pngService.extractSVG(viewport, outerSVGElement);\n\n svg = this.pngService.prepareSVG(\n svg,\n layerBase,\n this.description,\n this.title,\n withTitle,\n );\n\n image.onload = () => {\n const tempCanvas = document.createElement('canvas');\n\n // add a 10px buffer to the right and lower boundary\n tempCanvas.width = this.pngService.getWidth() + 10;\n tempCanvas.height = this.pngService.getHeight() + 10;\n\n const ctx = tempCanvas.getContext('2d');\n if (ctx) {\n // fill with white background\n ctx.rect(0, 0, tempCanvas.width, tempCanvas.height);\n ctx.fillStyle = 'white';\n ctx.fill();\n\n ctx.drawImage(image, 0, 0);\n }\n\n const png64 = tempCanvas.toDataURL('image/png');\n const ele = document.createElement('a');\n ele.setAttribute(\n 'download',\n sanitizeForDesktop(this.title) +\n '_' +\n this.getCurrentDateString() +\n '.png',\n );\n ele.setAttribute('href', png64);\n document.body.appendChild(ele);\n ele.click();\n document.body.removeChild(ele);\n\n // image source has to be removed to circumvent browser caching\n image.src = '';\n };\n image.onchange = image.onload;\n\n image.width = this.pngService.getWidth();\n image.height = this.pngService.getHeight();\n\n image.src = 'data:image/svg+xml,' + svg;\n }\n }\n\n downloadHTMLPresentation(modeler: any): void {\n const filename = sanitizeForDesktop(\n this.title + '_' + this.getCurrentDateString(),\n );\n this.htmlPresentationService\n .downloadHTMLPresentation(filename, modeler)\n .then();\n }\n\n private getStoryForDownload(): unknown[] {\n const story = this.rendererService.getStory() as unknown[];\n story.push({ info: this.titleService.getDescription() });\n story.push({ version: environment.version });\n return story;\n }\n\n private getCurrentDateString(): string {\n return formatDate(new Date(), 'YYYY-MM-dd', 'en-GB');\n }\n\n openDownloadDialog() {\n if (this.isDomainStoryExportable()) {\n const SVGDownloadOption = new ExportOption(\n 'SVG',\n 'Download an SVG-Image with the Domain-Story embedded. Can be used to save and share your Domain-Story.',\n (withTitle: boolean, useWhiteBackground: boolean) =>\n this.downloadSVG(withTitle, useWhiteBackground),\n );\n const EGNDownloadOption = new ExportOption(\n 'EGN',\n 'Download an EGN-File with the Domain-Story. Can be used to save and share your Domain-Story.',\n () => this.downloadDST(),\n );\n const PNGDownloadOption = new ExportOption(\n 'PNG',\n 'Download a PNG-Image of the Domain-Story. This does not include the Domain-Story!',\n (withTitle: boolean) => this.downloadPNG(withTitle),\n );\n const HTMLDownloadOption = new ExportOption(\n 'HTML-Presentation',\n 'Download an HTML-Presentation. This does not include the Domain-Story!',\n () => this.downloadHTMLPresentation(this.modelerService.getModeler()),\n );\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n config.data = new ExportDialogData('Export', [\n SVGDownloadOption,\n EGNDownloadOption,\n PNGDownloadOption,\n HTMLDownloadOption,\n ]);\n\n this.dialogService.openDialog(ExportDialogComponent, config);\n } else {\n this.snackbar.open('No Domain Story to be exported', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_INFO,\n });\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { sanitizeForDesktop } from '../../../utils/sanitizer';\nimport { ReplayService } from '../../replay/services/replay.service';\n// @ts-ignore\nimport doT from 'dot';\nimport { TitleService } from '../../title/services/title.service';\nimport { StoryCreatorService } from '../../replay/services/story-creator.service';\n\n@Injectable({\n providedIn: 'root',\n})\n/**\n * Initial idea and PR from https://github.com/indika-dev\n */\nexport class HtmlPresentationService {\n constructor(\n private replayService: ReplayService,\n private titleService: TitleService,\n private storyCreatorService: StoryCreatorService,\n ) {}\n\n private multiplexSecret: any;\n private multiplexId: any;\n\n private static viewBoxCoordinates(svg: any): any {\n const ViewBoxCoordinate =\n /width=\"([^\"]+)\"\\s+height=\"([^\"]+)\"\\s+viewBox=\"([^\"]+)\"/;\n const match = svg.match(ViewBoxCoordinate);\n return match[3];\n }\n\n /*\n ---------------------------\n SVG handling starts here\n ----------------------------\n */\n\n async downloadHTMLPresentation(\n filename: string,\n modeler: any,\n ): Promise {\n const svgData = [];\n // export all sentences of domain story\n this.replayService.startReplay();\n try {\n const result = await modeler.saveSVG({});\n this.fixActivityMarkersForEachSentence(\n result,\n this.replayService.getCurrentSentenceNumber(),\n );\n svgData.push({\n content: HtmlPresentationService.createSVGData(result.svg),\n transition: 'slide',\n });\n } catch (err) {\n alert('There was an error exporting the SVG.\\n' + err);\n }\n while (\n this.replayService.getCurrentSentenceNumber() <\n this.replayService.getMaxSentenceNumber()\n ) {\n this.replayService.nextSentence();\n try {\n const result = await modeler.saveSVG({});\n this.fixActivityMarkersForEachSentence(\n result,\n this.replayService.getCurrentSentenceNumber(),\n );\n svgData.push({\n content: HtmlPresentationService.createSVGData(result.svg),\n transition: 'slide',\n });\n } catch (err) {\n alert('There was an error exporting the SVG.\\n' + err);\n }\n }\n this.replayService.stopReplay();\n\n // create download for presentation\n const revealjsTemplate = document.getElementById('revealjs-template');\n const dots = doT.template(revealjsTemplate?.innerHTML);\n const revealjsData = {\n script: 'script',\n title: this.titleService.getTitle(),\n description: this.titleService.getDescription(),\n sentences: svgData,\n multiplexSecret: this.multiplexSecret,\n multiplexId: this.multiplexId,\n };\n const element = document.createElement('a');\n element.setAttribute(\n 'href',\n 'data:text/html;charset=UTF-8,' +\n this.fixMalformedHtmlScript(dots, revealjsData),\n );\n element.setAttribute('download', sanitizeForDesktop(filename) + '.html');\n element.style.display = 'none';\n document.body.appendChild(element);\n element.click();\n document.body.removeChild(element);\n }\n\n private fixMalformedHtmlScript(\n dots: any,\n revealjsData: {\n multiplexId: any;\n sentences: any[];\n multiplexSecret: any;\n description: string;\n title: string;\n script: string;\n },\n ) {\n return dots(revealjsData).replace(''),\n result.svg.indexOf('') + 7,\n );\n const split = defs.split(' {\n const idToReplace = id.substring(4, id.length - 1);\n const newId =\n idToReplace.slice(0, id.length - 5) +\n 'customId' +\n sectionIndex +\n idToReplace.slice(idToReplace.length - 2);\n // @ts-ignore\n result.svg = result.svg.replaceAll(idToReplace, newId);\n });\n newDefs += '= 72) {\n fix = true;\n // https://www.chromestatus.com/features/5656049583390720\n }\n } else if (name.includes('Firefox')) {\n fix = true;\n\n // versionNumber of implementation unknown\n }\n if (fix) {\n while (svg.includes('#')) {\n svg = svg.replace('#', '%23');\n }\n }\n return svg;\n }\n\n findMostOuterElements(svg: HTMLElement): Box {\n let xLeft = 0;\n let xRight = 0;\n let yUp = 0;\n let yDown = 0;\n\n const elements = svg.getElementsByClassName('djs-group');\n\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n const sub = element.children;\n\n let elXLeft: number;\n let elXRight: number;\n let elYUp: number;\n let elYDown: number;\n\n const transform = sub[0].getAttribute('transform');\n if (transform) {\n let nums;\n\n if (transform.includes('matrix')) {\n transform.replace('matrix(', '');\n transform.replace(')', '');\n nums = transform.split(' ');\n elXLeft = parseInt(nums[4]);\n elYUp = parseInt(nums[5]);\n } else {\n transform.replace('translate(', '');\n transform.replace(')', '');\n nums = transform.split(' ');\n elXLeft = parseInt(nums[0]);\n elYUp = parseInt(nums[1]);\n }\n\n const rects = sub[0].getElementsByTagName('rect');\n const outerRect = rects[rects.length - 1];\n\n const width = outerRect.getAttribute('width');\n\n elXRight = elXLeft + parseInt(width != null ? width : '0');\n elYDown = elYUp + sub[0].getBoundingClientRect().height;\n } else {\n const rects = element.getElementsByTagName('rect');\n const outerRect = rects[rects.length - 1];\n\n const x = outerRect.getAttribute('x');\n const y = outerRect.getAttribute('y');\n\n elXLeft = parseInt(x != null ? x : '0');\n elYUp = parseInt(y != null ? y : '0');\n\n const width = outerRect.getAttribute('width');\n const height = outerRect.getAttribute('height');\n\n elXRight = elXLeft + parseInt(width != null ? width : '0');\n elYDown = elYUp + parseInt(height != null ? height : '0') + 20; // Add 20 px as Padding for text at the bottom\n }\n if (elXLeft < xLeft) {\n xLeft = elXLeft;\n }\n if (elXRight > xRight) {\n xRight = elXRight;\n }\n if (elYUp < yUp) {\n yUp = elYUp;\n }\n if (elYDown > yDown) {\n yDown = elYDown;\n }\n }\n\n yUp -= 75; // we need to adjust yUp to have space for the title and description\n\n return {\n xLeft,\n xRight,\n yUp,\n yDown,\n };\n }\n\n prepareSVG(\n svg: string,\n layerBase: any,\n description: string,\n title: string,\n withTitle: boolean,\n ): string {\n const box = this.findMostOuterElements(layerBase);\n let viewBoxIndex = svg.indexOf('width=\"');\n\n this.calculateWidthAndHeight(box);\n\n const { insertText, dynamicHeightOffset } =\n createTitleAndDescriptionSVGElement(\n 0,\n title,\n description,\n box.xLeft + 10,\n box.yUp + 20,\n this.width,\n );\n if (withTitle) {\n this.height += dynamicHeightOffset;\n }\n\n const bounds = this.createBounds(box, dynamicHeightOffset);\n\n const dataStart = svg.substring(0, viewBoxIndex);\n viewBoxIndex = svg.indexOf('style=\"');\n\n const dataEnd = svg.substring(viewBoxIndex);\n dataEnd.substring(viewBoxIndex);\n\n svg = dataStart + bounds + dataEnd;\n\n const insertIndex = svg.indexOf('') + 20;\n\n if (withTitle) {\n svg = [\n svg.slice(0, insertIndex),\n insertText,\n svg.slice(insertIndex),\n ].join('');\n }\n svg = this.URIHashtagFix(svg);\n\n return svg;\n }\n\n private createBounds(box: Box, extraHeight: number) {\n return (\n 'width=\"' +\n this.width +\n '\" height=\"' +\n this.height +\n '\" viewBox=\" ' +\n box.xLeft +\n ' ' +\n (box.yUp - extraHeight) +\n ' ' +\n this.width +\n ' ' +\n this.height +\n '\" '\n );\n }\n\n /**\n * Calculate the Width and Height of the Bounding Box for the PNG so no Parts are cut off\n */\n private calculateWidthAndHeight(box: Box): [number, number] {\n if (box.xLeft < 0) {\n if (box.xRight < 0) {\n this.width = Math.abs(box.xLeft - box.xRight);\n } else {\n this.width = Math.abs(box.xLeft) + box.xRight;\n }\n } else {\n this.width = box.xRight - box.xLeft;\n }\n\n if (box.yUp < 0) {\n if (box.yDown < 0) {\n this.height = Math.abs(box.yUp - box.yDown);\n } else {\n this.height = Math.abs(box.yUp) + box.yDown;\n }\n } else {\n this.height = box.yDown - box.yUp;\n }\n\n // if the domain-Story is smaller than 300px in width or height, increase its dimensions\n if (this.height < 300) {\n this.height += 300;\n box.yUp -= 150;\n box.yDown += 150;\n }\n if (this.width < 300) {\n this.width += 300;\n box.xLeft -= 150;\n box.xRight += 150;\n }\n return [this.height, this.width];\n }\n\n extractSVG(viewport: any, outerSVGElement: any): string {\n const layerResizers = viewport.getElementsByClassName('layer-resizers');\n const layerOverlays = viewport.getElementsByClassName('layer-overlays');\n const transform = viewport.getAttribute('transform');\n const translate = viewport.getAttribute('translate');\n\n if (layerResizers[0]) {\n layerResizers[0].parentNode.removeChild(layerResizers[0]);\n }\n if (layerOverlays[0]) {\n layerOverlays[0].parentNode.removeChild(layerOverlays[0]);\n }\n\n // remove canvas scrolling and scaling before serializeToString of SVG\n if (transform) {\n viewport.removeAttribute('transform');\n }\n if (translate) {\n viewport.removeAttribute('translate');\n }\n\n const svg = new XMLSerializer().serializeToString(outerSVGElement);\n\n // re-add canvas scrolling and scaling\n if (transform) {\n viewport.setAttribute('transform', transform);\n }\n if (translate) {\n viewport.setAttribute('translate', translate);\n }\n return svg;\n }\n\n getWidth(): number {\n return this.width;\n }\n\n getHeight(): number {\n return this.height;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ConfigAndDST } from 'src/app/tools/export/domain/export/configAndDst';\nimport { createTitleAndDescriptionSVGElement } from 'src/app/tools/export/services/exportUtil';\nimport { ModelerService } from '../../modeler/services/modeler.service';\nimport {\n DEFAULT_PADDING,\n TEXTSPAN_TITLE_HEIGHT,\n} from '../domain/export/exportConstants';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SvgService {\n private cacheData = '';\n\n constructor(private modelerService: ModelerService) {}\n\n createSVGData(\n title: string,\n description: string,\n dst: ConfigAndDST,\n withTitle: boolean,\n useWhiteBackground: boolean,\n ): string {\n this.cacheData = this.modelerService.getEncoded();\n\n let domainStorySvg = structuredClone(this.cacheData);\n\n let viewBoxIndex = domainStorySvg.indexOf('width=\"');\n\n let { width, height, viewBox } = this.viewBoxCoordinates(domainStorySvg);\n\n // The value of the viewBox attribute is a list of four numbers separated by whitespace\n // and/or a comma: min-x, min-y, width, and height. min-x and min-y represent the smallest\n // X and Y coordinates that the viewBox may have (the origin coordinates of the viewBox)\n // and the width and height specify the viewBox size. The resulting viewBox is a\n // rectangle in user space mapped to the bounds of the viewport of an SVG element.\n // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox\n\n let min_x: number;\n let viewBoxWidth: number;\n let min_y: number;\n let viewBoxHeight: number;\n const splitViewBox = viewBox.split(/\\s/);\n\n min_x = +splitViewBox[0];\n min_y = +splitViewBox[1];\n viewBoxWidth = +splitViewBox[2];\n viewBoxHeight = +splitViewBox[3];\n\n // Set minimum width to ensure title and description are displayed reasonably\n if (viewBoxWidth < 300) {\n viewBoxWidth += 300;\n width += 300;\n }\n\n const { insertText, dynamicHeightOffset } =\n createTitleAndDescriptionSVGElement(\n 0,\n title,\n description,\n min_x,\n min_y,\n width,\n );\n\n const bounds = this.createBounds(\n width,\n height,\n min_x,\n min_y,\n viewBoxWidth,\n viewBoxHeight,\n withTitle,\n dynamicHeightOffset,\n );\n\n const dataStart = domainStorySvg.substring(0, viewBoxIndex);\n viewBoxIndex = domainStorySvg.indexOf('\" version');\n\n const dataEnd = domainStorySvg.substring(viewBoxIndex);\n dataEnd.substring(viewBoxIndex);\n\n domainStorySvg = dataStart + bounds + dataEnd;\n\n const insertIndex = this.findIndexToInsertData(domainStorySvg);\n\n if (withTitle) {\n domainStorySvg =\n domainStorySvg.slice(0, insertIndex) +\n insertText +\n domainStorySvg.slice(insertIndex);\n }\n\n if (useWhiteBackground) {\n const svgIndex = domainStorySvg.indexOf('width=\"');\n const backgroundColorWhite = 'style=\"background-color:white\" ';\n domainStorySvg =\n domainStorySvg.slice(0, svgIndex) +\n backgroundColorWhite +\n domainStorySvg.slice(svgIndex);\n }\n\n return this.appendDST(domainStorySvg, dst);\n }\n\n private findIndexToInsertData(data: string) {\n let insertIndex = data.indexOf('');\n if (insertIndex < 0) {\n insertIndex = data.indexOf('version=\"1.2\">') + 14;\n } else {\n insertIndex += 7;\n }\n return insertIndex;\n }\n\n private createBounds(\n width: number,\n height: number,\n min_x: number,\n min_y: number,\n viewBoxWidth: number,\n viewBoxHeight: number,\n withTitle: boolean,\n dynamicHeightOffset: number,\n ): string {\n height = withTitle\n ? height + dynamicHeightOffset + TEXTSPAN_TITLE_HEIGHT\n : height;\n min_x = min_x - DEFAULT_PADDING;\n min_y = withTitle\n ? min_y - dynamicHeightOffset - TEXTSPAN_TITLE_HEIGHT\n : min_y;\n viewBoxHeight = withTitle\n ? viewBoxHeight +\n dynamicHeightOffset +\n TEXTSPAN_TITLE_HEIGHT +\n DEFAULT_PADDING\n : viewBoxHeight;\n viewBoxWidth = viewBoxWidth + DEFAULT_PADDING;\n\n return `width=\"${width}\" height=\"${height}\" viewBox=\"${min_x} ${min_y} ${viewBoxWidth} ${viewBoxHeight}`;\n }\n\n private viewBoxCoordinates(svg: string): {\n width: number;\n height: number;\n viewBox: string;\n } {\n const ViewBoxCoordinate =\n /width=\"([^\"]+)\"\\s+height=\"([^\"]+)\"\\s+viewBox=\"([^\"]+)\"/;\n const match = svg.match(ViewBoxCoordinate);\n if (match) {\n return { width: +match[1], height: +match[2], viewBox: match[3] };\n }\n return { width: 0, height: 0, viewBox: '' };\n }\n\n private appendDST(data: string, dst: ConfigAndDST): string {\n data += '\\n';\n return data;\n }\n}\n","import { Dictionary } from 'src/app/domain/entities/dictionary';\n\nexport let appendedIcons = new Dictionary();\n\n// These SVGs are used to render the actors/work objects on the canvas and in the iconset configuration. For palette and context pad, icons.css is used.\nexport const allIcons = {\n Person:\n '',\n Group:\n '',\n Pet: '',\n Conversation:\n '',\n World:\n '',\n Store:\n '',\n Theater:\n '',\n Business:\n '',\n Water:\n '',\n Hotel:\n '',\n Dining:\n '',\n 'Gas-station':\n '',\n 'Meeting-room':\n '',\n Courthouse:\n '',\n Flag: '',\n Place:\n '',\n Car: '',\n Bus: '',\n Train:\n '',\n Truck:\n '',\n Taxi: '',\n Bike: '',\n Boat: '',\n Motorcycle:\n '',\n Plane:\n '',\n 'Flight-takeoff':\n '',\n 'Flight-landing':\n '',\n Shuttle:\n '',\n Walking:\n '',\n Traffic:\n '',\n Commute:\n '',\n System:\n '',\n Printer:\n '',\n Document:\n '',\n Folder:\n '',\n Call: '',\n Email:\n '',\n Copyright:\n '',\n DNS: '',\n Settings:\n '',\n Cellphone:\n '',\n Update:\n '',\n Briefcase:\n '',\n Microphone:\n '',\n Signal:\n '',\n Key: '',\n Pencil:\n '',\n Sum: '',\n Headset:\n '',\n Keyboard:\n '',\n Mouse:\n '',\n Router:\n '',\n Scanner:\n '',\n Security:\n '',\n Desktop:\n '',\n 'Speaker-phone':\n '',\n Tablet:\n '',\n Label:\n '',\n Receipt:\n '',\n Calendar:\n '',\n Cloud:\n '',\n Assessment:\n '',\n Dashboard:\n '',\n 'Pie-chart':\n '',\n Problem:\n '',\n 'Picture-as-PDF':\n '',\n Grid: '',\n Watch:\n '',\n Euro: '',\n Dollar:\n '',\n Info: '',\n Alarm:\n '',\n Wrench:\n '',\n 'Circle-Arrows':\n '',\n 'Credit-Card':\n '',\n Favorite:\n '',\n Gavel:\n '',\n Blind:\n '',\n Hourglass:\n '',\n Time: '',\n Search:\n '',\n Shopping:\n '',\n 'Thumb-up':\n '',\n 'Thumb-down':\n '',\n 'Thumb-up-down':\n '',\n Couch:\n '',\n Attach:\n '',\n Ruler:\n '',\n Education:\n '',\n 'How-To-Reg':\n '',\n 'View-List':\n '',\n Accessible:\n '',\n 'Account-Circle':\n '',\n Assignment:\n '',\n Battery:\n '',\n Book: '',\n Bug: '',\n 'Change-History':\n '',\n 'Check-Circle':\n '',\n Code: '',\n 'Contact-Mail':\n '',\n Crop: '',\n DVR: '',\n Error:\n '',\n Extension:\n '',\n Face: '',\n Fastfood:\n '',\n Fingerprint:\n '',\n Hand: '',\n Help: '',\n Image:\n '',\n Lightbulb:\n '',\n Lock: '',\n Loyalty:\n '',\n 'Picture-in-Picture':\n '',\n Portrait:\n '',\n Rocket:\n '',\n Satellite:\n '',\n Share:\n '',\n Slideshow:\n '',\n Star: '',\n Sun: '',\n Table:\n '',\n Videocam:\n '',\n Wysiwyg:\n '',\n};\n\nexport function getAllStandardIconKeys(): string[] {\n const allIconsDict = new Dictionary();\n\n allIconsDict.addEach(allIcons);\n\n return allIconsDict.keysArray();\n}\n\nexport function overrideAppendedIcons(newIcons: Dictionary): void {\n appendedIcons = newIcons;\n}\n\nexport function updateAppendedIcons(newIcons: Dictionary): void {\n for (const key in newIcons.keysArray().entries()) {\n appendedIcons.add(newIcons.get(key), key);\n }\n}\n","import { Dictionary } from 'src/app/domain/entities/dictionary';\nimport {\n overrideAppendedIcons,\n updateAppendedIcons,\n} from 'src/app/tools/icon-set-config/domain/allIcons';\nimport { Configuration } from 'src/app/domain/entities/configuration';\nimport { INITIAL_ICON_SET_NAME } from '../../../domain/entities/constants';\nimport { IconSetConfiguration } from '../../../domain/entities/icon-set-configuration';\n\nexport class IconConfiguration {\n domainName = INITIAL_ICON_SET_NAME;\n\n private allIconDictionary: Dictionary;\n\n constructor(allIconDictionary: Dictionary) {\n this.allIconDictionary = allIconDictionary;\n }\n\n /**\n * Select the Iconset which you want to use\n */\n getDefaultConf(): Configuration {\n return defaultConf;\n }\n\n updateAllIconRegistry(allIconDictionary: Dictionary): void {\n this.allIconDictionary = allIconDictionary;\n }\n\n appendSRCFile(\n actors: string[],\n actorsDict: Dictionary,\n workObjects: string[],\n workObjectsDict: Dictionary,\n ): void {\n const newAppendedIcons: { [key: string]: any } = {};\n\n actors.forEach((name: string) => {\n if (!this.allIconDictionary.has(name)) {\n newAppendedIcons[name] = actorsDict.get(name);\n }\n });\n\n workObjects.forEach((name: string) => {\n if (!this.allIconDictionary.has(name)) {\n newAppendedIcons[name] = workObjectsDict.get(name);\n }\n });\n const appen = new Dictionary();\n Object.keys(newAppendedIcons).forEach((key) => {\n appen.set(key, newAppendedIcons[key]);\n });\n\n updateAppendedIcons(appen);\n }\n\n createCustomConf(iconSetConfiguration: IconSetConfiguration): Configuration {\n this.domainName = iconSetConfiguration.name;\n\n let actors = iconSetConfiguration.actors;\n let workObjects = iconSetConfiguration.workObjects;\n\n this.appendSRCFile(\n actors.keysArray(),\n actors,\n workObjects.keysArray(),\n workObjects,\n );\n\n return new Configuration(actors.keysArray(), workObjects.keysArray());\n }\n}\n\n/**\n * Default Iconset\n */\nexport const defaultConf = {\n actors: ['Person', 'Group', 'System'],\n workObjects: ['Document', 'Folder', 'Call', 'Email', 'Conversation', 'Info'],\n};\n","export enum IconFilterEnum {\n ICON_FILTER_ACTOR = 'ICON_FILTER_ACTOR',\n ICON_FILTER_WORKOBJECT = 'ICON_FILTER_WORKOBJECT',\n ICON_FILTER_UNASSIGNED = 'ICON_FILTER_UNASSIGNED',\n ICON_FILTER_NONE = 'ICON_FILTER_NONE',\n}\n","import { AfterViewChecked, Component, Input } from '@angular/core';\nimport { IconListItem } from '../../domain/iconListItem';\n\n@Component({\n selector: 'app-details-list-item',\n templateUrl: './details-list-item.component.html',\n styleUrls: ['./details-list-item.component.scss'],\n})\nexport class DetailsListItemComponent implements AfterViewChecked {\n @Input()\n icon!: IconListItem;\n\n private iconInitiated = false;\n\n get id(): string {\n return (\n 'domain-configuration-details-icon-' +\n this.icon.name.toLowerCase() +\n '-' +\n (this.icon.isWorkObject ? 'workobject' : 'actor')\n );\n }\n\n get name(): string {\n return this.icon.name;\n }\n\n ngAfterViewChecked(): void {\n this.createIcon();\n }\n\n private createIcon(): void {\n const img = document.getElementById(this.id) as HTMLImageElement;\n if (img && !this.iconInitiated) {\n img.src = '' + this.icon.svg;\n this.iconInitiated = true;\n }\n }\n}\n","
\n \"{{\n {{ icon.name }}\n
\n","import { AfterViewChecked, Component, Input, OnInit } from '@angular/core';\nimport { IconListItem } from '../../domain/iconListItem';\nimport { BehaviorSubject } from 'rxjs';\nimport { IconSetCustomizationService } from '../../services/icon-set-customization.service';\n\n@Component({\n selector: 'app-icon-list-item',\n templateUrl: './icon-list-item.component.html',\n styleUrls: ['./icon-list-item.component.scss'],\n})\nexport class IconListItemComponent implements OnInit, AfterViewChecked {\n @Input()\n iconName: string = '';\n\n private iconInitiated = false;\n\n // @ts-ignore\n icon = new BehaviorSubject({});\n\n isActor: boolean = false;\n isWorkobject: boolean = false;\n isNone: boolean = true;\n\n get name(): string {\n return this.iconName;\n }\n\n get id() {\n return 'domain-configuration-icon-' + this.iconName;\n }\n\n constructor(\n private iconSetCustomizationService: IconSetCustomizationService,\n ) {}\n\n ngOnInit(): void {\n this.icon = this.iconSetCustomizationService.getIconForName(this.iconName);\n if (!this.icon) {\n return;\n }\n\n this.icon.subscribe((value) => {\n this.isActor = value.isActor;\n this.isWorkobject = value.isWorkObject;\n this.isNone = !(value.isActor || value.isWorkObject);\n });\n this.isActor = this.icon.value.isActor;\n this.isWorkobject = this.icon.value.isWorkObject;\n this.isNone = !(this.icon.value.isActor || this.icon.value.isWorkObject);\n }\n\n ngAfterViewChecked(): void {\n this.createIcon();\n }\n\n private createIcon(): void {\n const img = document.getElementById(this.id) as HTMLImageElement;\n if (img && !this.iconInitiated) {\n img.src = '' + this.icon?.value?.svg;\n this.iconInitiated = true;\n }\n }\n\n toggleNone() {\n this.iconSetCustomizationService.setAsUnassigned(\n this.iconName,\n this.icon.value.isActor,\n );\n }\n\n toggleActor(): void {\n this.iconSetCustomizationService.setAsActor(true, this.iconName);\n }\n\n toggleWorkobject(): void {\n this.iconSetCustomizationService.setAsWorkobject(true, this.iconName);\n }\n}\n","
\n
\n \"{{\n
{{ name }}
\n
\n
\n \n \n None\n \n \n Actor\n \n \n Workobject\n \n \n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MaterialModule } from '../../../material.module';\nimport { DetailsListItemComponent } from './details-list-item/details-list-item.component';\nimport { IconListItemComponent } from './icon-list-item/icon-list-item.component';\nimport { IconSetConfigurationComponent } from './icon-set-configuration/icon-set-configuration.component';\nimport { IconSetDetailsComponent } from './icon-set-details/icon-set-details.component';\n\n@NgModule({\n declarations: [\n DetailsListItemComponent,\n IconListItemComponent,\n IconSetConfigurationComponent,\n IconSetDetailsComponent,\n ],\n exports: [\n DetailsListItemComponent,\n IconListItemComponent,\n IconSetConfigurationComponent,\n IconSetDetailsComponent,\n ],\n imports: [CommonModule, MaterialModule],\n})\nexport class IconSetConfigModule {}\n","import { Component, OnInit } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { Dictionary } from 'src/app/domain/entities/dictionary';\nimport { IconSetConfigurationService } from 'src/app/tools/icon-set-config/services/icon-set-configuration.service';\nimport {\n ICON_PREFIX,\n IconDictionaryService,\n} from 'src/app/tools/icon-set-config/services/icon-dictionary.service';\nimport { ElementRegistryService } from 'src/app/domain/services/element-registry.service';\nimport { sanitizeIconName } from 'src/app/utils/sanitizer';\nimport { ElementTypes } from '../../../../domain/entities/elementTypes';\nimport { IconFilterEnum } from '../../domain/iconFilterEnum';\nimport { IconSetCustomizationService } from '../../services/icon-set-customization.service';\nimport { CustomIconSetConfiguration } from '../../../../domain/entities/custom-icon-set-configuration';\n\n@Component({\n selector: 'app-icon-set-configuration',\n templateUrl: './icon-set-configuration.component.html',\n styleUrls: ['./icon-set-configuration.component.scss'],\n})\nexport class IconSetConfigurationComponent implements OnInit {\n private iconSetConfigurationTypes: CustomIconSetConfiguration;\n\n filter = new BehaviorSubject(IconFilterEnum.ICON_FILTER_NONE);\n\n selectedActors = new BehaviorSubject([]);\n selectedWorkobjects = new BehaviorSubject([]);\n\n allIcons: BehaviorSubject;\n allIconNames = new BehaviorSubject([]);\n allFilteredIconNames = new BehaviorSubject([]);\n\n constructor(\n private iconSetConfigurationService: IconSetConfigurationService,\n private iconDictionaryService: IconDictionaryService,\n private iconSetCustomizationService: IconSetCustomizationService,\n private elementRegistryService: ElementRegistryService,\n ) {\n this.iconSetConfigurationTypes =\n this.iconSetCustomizationService.getIconSetConfiguration().value;\n\n this.allIcons = new BehaviorSubject(\n this.iconDictionaryService.getFullDictionary(),\n );\n this.allIcons.subscribe((allIcons) => {\n this.allIconNames.next(allIcons.keysArray().sort(this.sortByName));\n });\n\n this.selectedActors = this.iconSetCustomizationService.selectedActors$;\n this.selectedWorkobjects =\n this.iconSetCustomizationService.selectedWorkobjects$;\n }\n\n ngOnInit(): void {\n this.filter.subscribe((type) => {\n let allFiltered = this.getFilteredNamesForType(type);\n this.allFilteredIconNames.next(allFiltered.sort(this.sortByName));\n });\n }\n\n private sortByName(a: string, b: string): number {\n return a.toLowerCase().localeCompare(b.toLowerCase());\n }\n\n /** Default Icon Set **/\n loadMinimalIconConfigurationWithDefaultIcons(): void {\n this.iconSetCustomizationService.resetIconSet();\n }\n\n loadInitialConfiguration(): void {\n this.iconSetCustomizationService.cancel();\n }\n\n /** Persist Icon Set **/\n saveIconSet(): void {\n this.iconSetCustomizationService.saveIconSet(\n this.elementRegistryService.getUsedIcons(),\n );\n }\n\n exportIconSet(): void {\n this.iconSetCustomizationService.exportIconSet();\n }\n\n /** Add Custom Icon **/\n startIconUpload(): void {\n document.getElementById('importIcon')?.click();\n }\n\n importIcon(): void {\n // @ts-ignore\n const files = document.getElementById('importIcon').files;\n for (let iconInputFile of files) {\n const reader = new FileReader();\n const name = sanitizeIconName(iconInputFile.name);\n const iconName = name + '-custom'; // this suffix helps users to see which icons they uploaded; it should not be used to check if an icon is actually custom or not since this convention was introduce after v1.3.0 and is therefore not reliable information\n\n reader.onloadend = (e: ProgressEvent) => {\n if (e.target) {\n const src: string = e.target.result as unknown as string;\n this.iconDictionaryService.addIMGToIconDictionary(src, iconName);\n // TODO: td: What kind of type is it here?\n this.iconDictionaryService.registerIconForBPMN(\n iconName,\n ICON_PREFIX + iconName.toLowerCase(),\n ElementTypes.ACTOR,\n );\n\n this.allIcons.next(this.iconDictionaryService.getFullDictionary());\n this.filter.next(this.filter.value);\n\n this.iconSetCustomizationService.addNewIcon(iconName);\n }\n };\n reader.readAsDataURL(iconInputFile);\n }\n }\n\n /** Import Icon Set **/\n startIconSetImport(): void {\n document.getElementById('importDomain')?.click();\n }\n\n importIconSet(): void {\n // @ts-ignore\n const iconSetInputFile = document.getElementById('importDomain').files[0];\n const reader = new FileReader();\n\n reader.onloadend = (e: ProgressEvent) => {\n const configFromFile = JSON.parse(\n e.target?.result as unknown as string,\n ) as {\n name: string;\n actors: { [key: string]: any };\n workObjects: { [key: string]: any };\n };\n const config =\n this.iconSetConfigurationService.createIconSetConfiguration(\n configFromFile,\n );\n this.iconSetConfigurationService.loadConfiguration(config, false);\n\n this.iconSetCustomizationService.importConfiguration(config);\n\n this.allIcons.next(this.iconDictionaryService.getFullDictionary());\n this.filter.next(this.filter.value);\n };\n\n reader.readAsText(iconSetInputFile);\n }\n\n /** Filter **/\n filterForActors(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_ACTOR) {\n this.filter.next(IconFilterEnum.ICON_FILTER_ACTOR);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterForWorkobjects(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_WORKOBJECT) {\n this.filter.next(IconFilterEnum.ICON_FILTER_WORKOBJECT);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterForUnassigned(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_UNASSIGNED) {\n this.filter.next(IconFilterEnum.ICON_FILTER_UNASSIGNED);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterByNameAndType($event: any) {\n const filteredByNameAndType = this.getFilteredNamesForType(\n this.filter.value,\n ).filter((name) =>\n name.toLowerCase().includes($event.target.value.toLowerCase()),\n );\n this.allFilteredIconNames.next(filteredByNameAndType.sort(this.sortByName));\n }\n\n private getFilteredNamesForType(type: IconFilterEnum): string[] {\n let allFiltered: string[] = [];\n switch (type) {\n case IconFilterEnum.ICON_FILTER_NONE:\n allFiltered = this.allIconNames.value;\n break;\n case IconFilterEnum.ICON_FILTER_ACTOR:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.iconSetCustomizationService.isIconActor(name),\n );\n break;\n case IconFilterEnum.ICON_FILTER_WORKOBJECT:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.iconSetCustomizationService.isIconWorkObject(name),\n );\n break;\n case IconFilterEnum.ICON_FILTER_UNASSIGNED:\n allFiltered = this.allIconNames.value.filter(\n (name) =>\n !this.iconSetCustomizationService.isIconActor(name) &&\n !this.iconSetCustomizationService.isIconWorkObject(name),\n );\n break;\n }\n return allFiltered;\n }\n}\n","
\n
\n
\n
\n
Filter by assignment:
\n \n None\n \n \n Actors\n \n \n Workobjects\n \n \n
\n
\n \n \n home \n \n \n close\n \n
\n \n
\n \n unarchive\n \n \n \n
\n
\n
\n @for (iconName of allFilteredIconNames | async; track iconName) {\n \n }\n
\n
\n \n
\n","import { Component, OnInit } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { IconSetCustomizationService } from 'src/app/tools/icon-set-config/services/icon-set-customization.service';\nimport { IconListItem } from 'src/app/tools/icon-set-config/domain/iconListItem';\nimport { TitleService } from 'src/app/tools/title/services/title.service';\n\n@Component({\n selector: 'app-icon-set-details',\n templateUrl: './icon-set-details.component.html',\n styleUrls: ['./icon-set-details.component.scss'],\n})\nexport class IconSetDetailsComponent implements OnInit {\n iconSetName: Observable;\n\n private draggedList: string = '';\n private draggedIndex = 0;\n\n selectedActors$ = this.customizationService.selectedActors$;\n selectedWorkobjects$ = this.customizationService.selectedWorkobjects$;\n\n constructor(\n private customizationService: IconSetCustomizationService,\n titleService: TitleService,\n ) {\n this.iconSetName = titleService.iconSetName$;\n }\n\n ngOnInit(): void {}\n\n changeName(event: Event): void {\n // @ts-ignore\n this.customizationService.changeName(event.target.value);\n }\n\n getIconForName(iconName: string): IconListItem {\n return this.customizationService.getIconForName(iconName).value;\n }\n\n allowDrop($event: DragEvent, listName: string) {\n if (this.draggedList === listName) {\n $event.preventDefault();\n }\n }\n\n onDrop($event: DragEvent, iconName: string, actors: boolean, index: number) {\n let list;\n if (actors) {\n list = this.selectedActors$;\n } else {\n list = this.selectedWorkobjects$;\n }\n const sortedList = list.value;\n const item = sortedList[this.draggedIndex];\n sortedList.splice(this.draggedIndex, 1);\n sortedList.splice(index, 0, item);\n list.next(sortedList);\n\n if (actors) {\n this.customizationService.setSelectedActors(sortedList);\n } else {\n this.customizationService.setSelectedWorkObject(sortedList);\n }\n }\n\n onDragStart(index: number, draggedList: string) {\n this.draggedList = draggedList;\n this.draggedIndex = index;\n }\n}\n","
\n
\n
\n
\n \n \n \n
\n
\n
\n

Order of Actors

\n \n @for (\n iconName of selectedActors$ | async;\n track iconName;\n let i = $index\n ) {\n \n \n \n }\n \n
\n
\n

Order of Work Objects

\n \n @for (\n iconName of selectedWorkobjects$ | async;\n track iconName;\n let i = $index\n ) {\n \n \n \n }\n \n
\n
\n","import { Injectable } from '@angular/core';\nimport { BusinessObject } from 'src/app/domain/entities/businessObject';\nimport { Configuration } from 'src/app/domain/entities/configuration';\nimport { Dictionary } from 'src/app/domain/entities/dictionary';\nimport { ElementTypes } from 'src/app/domain/entities/elementTypes';\nimport {\n defaultConf,\n IconConfiguration,\n} from 'src/app/tools/icon-set-config/domain/iconConfiguration';\nimport {\n allIcons,\n appendedIcons,\n} from 'src/app/tools/icon-set-config/domain/allIcons';\nimport { sanitizeIconName } from '../../../utils/sanitizer';\nimport getIconId = ElementTypes.getIconId;\nimport { IconSetConfiguration } from '../../../domain/entities/icon-set-configuration';\n\nexport const ICON_PREFIX = 'icon-domain-story-';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconDictionaryService {\n private actorIconDictionary = new Dictionary();\n private workObjectDictionary = new Dictionary();\n\n private allIconDictionary = new Dictionary();\n private iconDictionaryForBPMN = new Dictionary();\n\n private customConfiguration?: IconSetConfiguration;\n\n private readonly iconConfig: IconConfiguration;\n\n constructor() {\n this.allIconDictionary.addEach(allIcons);\n this.iconConfig = new IconConfiguration(this.allIconDictionary);\n }\n\n initTypeDictionaries(actors: string[], workObjects: string[]): void {\n if (!actors || actors.length == 0) {\n actors = defaultConf.actors;\n }\n if (!workObjects || workObjects.length == 0) {\n workObjects = defaultConf.workObjects;\n }\n\n const allTypes = new Dictionary();\n allTypes.addEach(allIcons);\n allTypes.appendDict(this.getAppendedIconDictionary());\n\n this.initDictionary(\n actors,\n allTypes,\n this.actorIconDictionary,\n ElementTypes.ACTOR,\n );\n this.initDictionary(\n workObjects,\n allTypes,\n this.workObjectDictionary,\n ElementTypes.WORKOBJECT,\n );\n }\n\n private initDictionary(\n keys: string[],\n allTypes: Dictionary,\n dictionary: Dictionary,\n elementType: ElementTypes,\n ) {\n dictionary.clear();\n for (const key of keys) {\n dictionary.add(allTypes.get(key), key);\n }\n\n dictionary.keysArray().forEach((name) => {\n this.registerIconForBPMN(\n name,\n ICON_PREFIX + sanitizeIconName(name.toLowerCase()),\n elementType,\n );\n });\n }\n\n getCurrentIconConfigurationForBPMN(): Configuration {\n if (this.customConfiguration) {\n return this.iconConfig.createCustomConf(this.customConfiguration);\n }\n return this.iconConfig.getDefaultConf();\n }\n\n allInTypeDictionary(type: ElementTypes, elements: BusinessObject[]): boolean {\n let collection: Dictionary;\n if (type === ElementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (type === ElementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n\n let allIn = true;\n if (elements) {\n elements.forEach((element) => {\n if (!collection.has(getIconId(element.type))) {\n allIn = false;\n }\n });\n } else {\n return false;\n }\n return allIn;\n }\n\n /** Load Icons from Configuration **/\n addIconsFromIconSetConfiguration(\n dictionaryType: ElementTypes,\n iconTypes: string[],\n ): void {\n let collection: Dictionary;\n if (dictionaryType === ElementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (dictionaryType === ElementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n\n const allTypes = new Dictionary();\n allTypes.addEach(allIcons);\n allTypes.appendDict(appendedIcons);\n\n iconTypes.forEach((name) => {\n if (!collection.has(name)) {\n const src = allTypes.get(name);\n if (src) {\n this.registerIconForType(dictionaryType, name, src);\n this.registerIconForBPMN(\n name,\n sanitizeIconName(ICON_PREFIX + name.toLowerCase()),\n dictionaryType,\n );\n }\n }\n });\n }\n\n /** Add Icon(s) to Dictionary **/\n registerIconForBPMN(\n name: string,\n src: string,\n elementType: ElementTypes,\n ): void {\n if (name.includes(elementType)) {\n throw new Error('Should not include elementType');\n }\n\n this.iconDictionaryForBPMN.set(`${elementType}${name}`, src);\n }\n\n addIconsToTypeDictionary(\n actorIcons: BusinessObject[],\n workObjectIcons: BusinessObject[],\n ) {\n if (!this.allInTypeDictionary(ElementTypes.ACTOR, actorIcons)) {\n this.addIconsFromIconSetConfiguration(\n ElementTypes.ACTOR,\n actorIcons.map((element) => getIconId(element.type)),\n );\n }\n if (!this.allInTypeDictionary(ElementTypes.WORKOBJECT, workObjectIcons)) {\n this.addIconsFromIconSetConfiguration(\n ElementTypes.WORKOBJECT,\n workObjectIcons.map((element) => getIconId(element.type)),\n );\n }\n }\n\n registerIconForType(type: ElementTypes, name: string, src: string): void {\n if (name.includes(type)) {\n throw new Error('Name should not include type!');\n }\n\n let collection = new Dictionary();\n if (type === ElementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (type === ElementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n collection.add(src, name);\n }\n\n unregisterIconForType(type: ElementTypes, name: string): void {\n if (name.includes(type)) {\n throw new Error('Name should not include type!');\n }\n\n let collection = new Dictionary();\n if (type === ElementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (type === ElementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n collection.delete(name);\n }\n\n updateIconRegistries(\n actors: BusinessObject[],\n workObjects: BusinessObject[],\n config: IconSetConfiguration,\n ): void {\n const elements: BusinessObject[] = [];\n\n actors.forEach((a) => elements.push(a));\n workObjects.forEach((w) => elements.push(w));\n\n const customIcons = new Dictionary();\n\n const actorsDict = new Dictionary();\n const workObjectsDict = new Dictionary();\n config.actors.keysArray().forEach((key) => {\n actorsDict.set(key, config.actors.get(key));\n });\n config.workObjects.keysArray().forEach((key) => {\n workObjectsDict.set(key, config.workObjects.get(key));\n });\n\n this.extractCustomIconsFromDictionary(actorsDict, customIcons);\n this.extractCustomIconsFromDictionary(workObjectsDict, customIcons);\n\n elements.forEach((element) => {\n const name = sanitizeIconName(\n element.type\n .replace(ElementTypes.ACTOR, '')\n .replace(ElementTypes.WORKOBJECT, ''),\n );\n if (\n (element.type.includes(ElementTypes.ACTOR) ||\n element.type.includes(ElementTypes.WORKOBJECT)) &&\n !this.getFullDictionary().has(name)\n ) {\n let elementType;\n if (element.type.includes(ElementTypes.ACTOR)) {\n elementType = ElementTypes.ACTOR;\n } else {\n elementType = ElementTypes.WORKOBJECT;\n }\n this.registerIconForBPMN(\n ICON_PREFIX + name.toLowerCase(),\n getIconId(element.type),\n elementType,\n );\n }\n });\n\n this.addNewIconsToDictionary(customIcons);\n this.addIconsToTypeDictionary(actors, workObjects);\n }\n\n private extractCustomIconsFromDictionary(\n elementDictionary: Dictionary,\n customIcons: Dictionary,\n ) {\n elementDictionary.keysArray().forEach((name) => {\n const sanitizedName = sanitizeIconName(name);\n if (!this.getFullDictionary().has(sanitizedName)) {\n customIcons.add(elementDictionary.get(name), sanitizedName);\n }\n });\n }\n\n /** Add new Icon(s) **/\n\n private addNewIconsToDictionary(customIcons: Dictionary) {\n customIcons.keysArray().forEach((key) => {\n const custom = customIcons.get(key);\n this.addIMGToIconDictionary(custom, key);\n });\n this.addIconsToCss(customIcons);\n }\n\n addIMGToIconDictionary(input: string, name: string): void {\n appendedIcons.set(name, input);\n }\n\n addIconsToCss(customIcons: Dictionary) {\n const sheetEl = document.getElementById('iconsCss');\n customIcons.keysArray().forEach((key) => {\n const src = customIcons.get(key);\n const iconStyle =\n '.' +\n ICON_PREFIX +\n sanitizeIconName(key.toLowerCase()) +\n '::before{ content: url(\"data:image/svg+xml;utf8,' +\n this.wrapSRCInSVG(src) +\n '\"); margin: 3px;}';\n // @ts-ignore\n sheetEl?.sheet?.insertRule(iconStyle, sheetEl.sheet.cssRules.length);\n });\n }\n\n private wrapSRCInSVG(src: string): string {\n return (\n \"\"\n );\n }\n\n /** Getter & Setter **/\n\n getFullDictionary(): Dictionary {\n const fullDictionary = new Dictionary();\n fullDictionary.appendDict(this.allIconDictionary);\n fullDictionary.appendDict(this.getAppendedIconDictionary());\n return fullDictionary;\n }\n\n getAppendedIconDictionary(): Dictionary {\n const appendedDict = new Dictionary();\n appendedIcons.keysArray().forEach((key) => {\n if (!this.allIconDictionary.has(key)) {\n appendedDict.set(key, appendedIcons.get(key));\n }\n });\n return appendedDict;\n }\n\n getTypeDictionary(type: ElementTypes): Dictionary {\n if (type === ElementTypes.ACTOR) {\n return this.actorIconDictionary;\n } else if (type === ElementTypes.WORKOBJECT) {\n return this.workObjectDictionary;\n }\n return new Dictionary();\n }\n\n getTypeDictionaryKeys(type: ElementTypes): string[] {\n return this.getTypeDictionary(type).keysArray();\n }\n\n getTypeIconSRC(type: ElementTypes, name: string): string | null {\n if (type === ElementTypes.ACTOR) {\n return this.actorIconDictionary.get(name);\n } else if (type === ElementTypes.WORKOBJECT) {\n return this.workObjectDictionary.get(name);\n }\n return null;\n }\n\n getIconForBPMN(elementType: ElementTypes, name: string): string | null {\n return this.iconDictionaryForBPMN.get(`${elementType}${name}`);\n }\n\n getIconSource(name: string): string | null {\n if (this.allIconDictionary.has(name)) {\n return this.allIconDictionary.get(name);\n } else if (appendedIcons.has(name)) {\n return appendedIcons.get(name);\n }\n return null;\n }\n\n getElementsOfType(\n elements: BusinessObject[],\n type: ElementTypes,\n ): BusinessObject[] {\n const elementOfType: any = [];\n elements.forEach((element) => {\n if (element.type.includes(type)) {\n elementOfType.push(element);\n }\n });\n return elementOfType;\n }\n\n getAllIconDictionary(): Dictionary {\n return this.allIconDictionary;\n }\n\n getActorsDictionary(): Dictionary {\n return this.actorIconDictionary;\n }\n\n getWorkObjectsDictionary(): Dictionary {\n return this.workObjectDictionary;\n }\n\n getIconConfiguration(): IconConfiguration {\n return this.iconConfig;\n }\n\n setCustomConfiguration(customConfiguration: IconSetConfiguration): void {\n this.customConfiguration = customConfiguration;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/domain/services/element-registry.service';\nimport { IconDictionaryService } from 'src/app/tools/icon-set-config/services/icon-dictionary.service';\nimport { Dictionary } from 'src/app/domain/entities/dictionary';\nimport { ElementTypes } from 'src/app/domain/entities/elementTypes';\nimport { defaultConf } from '../domain/iconConfiguration';\nimport { TitleService } from '../../title/services/title.service';\nimport {\n ICON_SET_CONFIGURATION_TAG,\n INITIAL_ICON_SET_NAME,\n} from '../../../domain/entities/constants';\nimport { IconSetConfiguration } from '../../../domain/entities/icon-set-configuration';\nimport { IconSetConfigurationForExport } from '../../../domain/entities/icon-set-configuration-for-export';\nimport { CustomIconSetConfiguration } from '../../../domain/entities/custom-icon-set-configuration';\nimport { StorageService } from '../../../domain/services/storage.service';\nimport { sanitizeIconName } from '../../../utils/sanitizer';\n\nexport interface FileConfiguration {\n name: string;\n actors: { [p: string]: any };\n workObjects: { [p: string]: any };\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconSetConfigurationService {\n constructor(\n private iconDictionaryService: IconDictionaryService,\n private elementRegistryService: ElementRegistryService,\n private titleService: TitleService,\n private storageService: StorageService,\n ) {}\n\n setIconSetName(iconSetName: string): void {\n this.titleService.setIconSetName(\n iconSetName ? iconSetName : INITIAL_ICON_SET_NAME,\n );\n }\n\n exportConfiguration(): void {\n const iconSetConfiguration = this.getCurrentConfigurationForExport();\n if (!iconSetConfiguration) {\n return;\n }\n\n const configJSONString = JSON.stringify(iconSetConfiguration, null, 2);\n const filename = this.titleService.getIconSetName();\n const element = document.createElement('a');\n\n element.setAttribute(\n 'href',\n 'data:text/plain;charset=utf-8,' + encodeURIComponent(configJSONString),\n );\n element.setAttribute('download', filename + '.iconset');\n element.style.display = 'none';\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n }\n\n loadConfiguration(\n customConfig: IconSetConfiguration,\n updateIconSetName = true,\n ): void {\n let actorDict = new Dictionary();\n let workObjectDict = new Dictionary();\n\n if (customConfig.actors.keysArray()) {\n actorDict = customConfig.actors;\n workObjectDict = customConfig.workObjects;\n } else {\n actorDict.addEach(customConfig.actors);\n workObjectDict.addEach(customConfig.workObjects);\n }\n\n const actorKeys = actorDict.keysArray();\n const workObjectKeys = workObjectDict.keysArray();\n\n this.iconDictionaryService.updateIconRegistries([], [], customConfig);\n\n this.iconDictionaryService\n .getIconConfiguration()\n .appendSRCFile(actorKeys, actorDict, workObjectKeys, workObjectDict);\n\n this.iconDictionaryService.addIconsFromIconSetConfiguration(\n ElementTypes.ACTOR,\n actorKeys.map((a) => ElementTypes.ACTOR + a),\n );\n this.iconDictionaryService.addIconsFromIconSetConfiguration(\n ElementTypes.WORKOBJECT,\n workObjectKeys.map((w) => ElementTypes.WORKOBJECT + w),\n );\n\n if (updateIconSetName) {\n const configurationName = customConfig.name;\n this.setIconSetName(configurationName);\n }\n }\n\n getCurrentConfiguration(): IconSetConfiguration | undefined {\n const actors = this.iconDictionaryService.getActorsDictionary();\n const workObjects = this.iconDictionaryService.getWorkObjectsDictionary();\n\n let iconSetConfiguration;\n\n if (actors.size() > 0 && workObjects.size() > 0) {\n iconSetConfiguration = this.createConfigFromDictionaries(\n actors,\n workObjects,\n );\n }\n return iconSetConfiguration;\n }\n\n getCurrentConfigurationForExport():\n | IconSetConfigurationForExport\n | undefined {\n const currentConfiguration = this.getCurrentConfiguration();\n\n if (currentConfiguration) {\n const actors: any = {};\n const workObjects: any = {};\n\n currentConfiguration.actors.all().forEach((entry) => {\n actors[entry.key] = entry.value;\n });\n currentConfiguration.workObjects.all().forEach((entry) => {\n workObjects[entry.key] = entry.value;\n });\n\n return {\n name: currentConfiguration.name,\n actors: actors,\n workObjects: workObjects,\n };\n }\n return;\n }\n\n getCurrentConfigurationNamesWithoutPrefix(): CustomIconSetConfiguration {\n return {\n name: this.titleService.getIconSetName() || INITIAL_ICON_SET_NAME,\n actors: this.iconDictionaryService\n .getActorsDictionary()\n .keysArray()\n .map((a) => a.replace(ElementTypes.ACTOR, '')),\n workObjects: this.iconDictionaryService\n .getWorkObjectsDictionary()\n .keysArray()\n .map((w) => w.replace(ElementTypes.WORKOBJECT, '')),\n };\n }\n\n createMinimalConfigurationWithDefaultIcons(): IconSetConfiguration {\n const minimalConfig = this.createConfigFromCanvas();\n\n defaultConf.actors.forEach((iconName) => {\n minimalConfig.actors.add(\n this.iconDictionaryService.getIconSource(iconName),\n iconName,\n );\n });\n defaultConf.workObjects.forEach((iconName) => {\n minimalConfig.workObjects.add(\n this.iconDictionaryService.getIconSource(iconName),\n iconName,\n );\n });\n\n return minimalConfig;\n }\n\n private createConfigFromDictionaries(\n actorsDict: Dictionary,\n workObjectsDict: Dictionary,\n ): IconSetConfiguration {\n const actorNames = actorsDict.keysArray();\n const workobjectNames = workObjectsDict.keysArray();\n const newActors = new Dictionary();\n const newWorkobjects = new Dictionary();\n\n // Fill Configuration from Canvas-Objects\n actorNames.forEach((actor) => {\n newActors.add(\n actorsDict.get(actor),\n actor.replace(ElementTypes.ACTOR, ''),\n );\n });\n workobjectNames.forEach((workObject) => {\n newWorkobjects.add(\n workObjectsDict.get(workObject),\n workObject.replace(ElementTypes.WORKOBJECT, ''),\n );\n });\n\n return {\n name: this.titleService.getIconSetName(),\n actors: newActors,\n workObjects: newWorkobjects,\n };\n }\n\n public createIconSetConfiguration(\n fileConfiguration: FileConfiguration,\n ): IconSetConfiguration {\n const actorsDict = new Dictionary();\n const workObjectsDict = new Dictionary();\n Object.keys(fileConfiguration.actors).forEach((key) => {\n let icon = fileConfiguration.actors[key];\n if (icon) {\n // make sure the actor has an icon\n actorsDict.add(icon, sanitizeIconName(key));\n }\n });\n\n Object.keys(fileConfiguration.workObjects).forEach((key) => {\n let icon = fileConfiguration.workObjects[key];\n if (icon) {\n // make sure the work object has an icon\n workObjectsDict.add(icon, sanitizeIconName(key));\n }\n });\n\n return {\n name: fileConfiguration.name,\n actors: actorsDict,\n workObjects: workObjectsDict,\n };\n }\n\n public getStoredIconSetConfiguration(): IconSetConfiguration | undefined {\n const iconSetString = this.storageService.get(ICON_SET_CONFIGURATION_TAG);\n\n if (!iconSetString) {\n return;\n } else {\n const configurationFromFile = this.createIconSetConfiguration(\n JSON.parse(iconSetString),\n );\n if (this.checkValidityOfConfiguration(configurationFromFile)) {\n return configurationFromFile;\n }\n }\n return;\n }\n\n public setStoredIconSetConfiguration(config: IconSetConfiguration): void {\n const actors: {\n [p: string]: any;\n } = {};\n config.actors.keysArray().forEach((key) => {\n actors[key] = config.actors.get(key);\n });\n const workObjects: {\n [p: string]: any;\n } = {};\n config.workObjects.keysArray().forEach((key) => {\n workObjects[key] = config.workObjects.get(key);\n });\n\n const configForStorage = {\n name: config.name,\n actors: actors,\n workObjects: workObjects,\n };\n\n this.storageService.set(\n ICON_SET_CONFIGURATION_TAG,\n JSON.stringify(configForStorage, null, 2),\n );\n }\n\n private createConfigFromCanvas(): IconSetConfiguration {\n const config = {\n name: INITIAL_ICON_SET_NAME,\n actors: new Dictionary(),\n workObjects: new Dictionary(),\n };\n\n let allCanvasObjects = this.elementRegistryService.getAllCanvasObjects();\n\n allCanvasObjects\n .map((e) => e.businessObject)\n .forEach((element) => {\n const type = element.type\n .replace(ElementTypes.ACTOR, '')\n .replace(ElementTypes.WORKOBJECT, '');\n if (element.type.includes(ElementTypes.ACTOR)) {\n let src = this.iconDictionaryService.getIconSource(type) || '';\n config.actors.add(src, type);\n } else if (element.type.includes(ElementTypes.WORKOBJECT)) {\n let src = this.iconDictionaryService.getIconSource(type) || '';\n config.workObjects.add(src, type);\n }\n });\n\n return config;\n }\n\n private checkValidityOfConfiguration(\n iconSetConfiguration: IconSetConfiguration,\n ) {\n return (\n iconSetConfiguration.actors.keysArray().length > 1 &&\n iconSetConfiguration.workObjects.keysArray().length > 1 &&\n !iconSetConfiguration.actors\n .all()\n .some((e) => typeof e.value !== 'string') &&\n !iconSetConfiguration.workObjects\n .all()\n .some((e) => typeof e.value !== 'string')\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { UsedIconList } from 'src/app/domain/entities/UsedIconList';\nimport { ElementRegistryService } from 'src/app/domain/services/element-registry.service';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_DURATION_LONGER,\n SNACKBAR_INFO,\n SNACKBAR_SUCCESS,\n} from '../../../domain/entities/constants';\nimport { Dictionary } from '../../../domain/entities/dictionary';\nimport { ElementTypes } from '../../../domain/entities/elementTypes';\nimport { IconListItem } from '../domain/iconListItem';\nimport { TitleService } from '../../title/services/title.service';\nimport { IconSetConfigurationService } from './icon-set-configuration.service';\nimport { IconDictionaryService } from './icon-dictionary.service';\nimport getIconId = ElementTypes.getIconId;\nimport { IconSetConfiguration } from '../../../domain/entities/icon-set-configuration';\nimport { CustomIconSetConfiguration } from '../../../domain/entities/custom-icon-set-configuration';\n\n/**\n * We are not allowed to call ImportDomainStoryService directly,\n * so we use this \"interface\" instead.\n */\nexport abstract class IconSetChangedService {\n public abstract iconConfigrationChanged(): Observable;\n public abstract getConfiguration(): IconSetConfiguration;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconSetCustomizationService {\n private readonly iconSetConfigurationTypes: BehaviorSubject;\n\n private allIconListItems = new Dictionary();\n\n private configurationHasChanged = false;\n\n selectedActors$ = new BehaviorSubject([]);\n selectedWorkobjects$ = new BehaviorSubject([]);\n private changedIconSetConfiguration: IconSetConfiguration | undefined;\n\n constructor(\n private iconSetConfigurationService: IconSetConfigurationService,\n private iconDictionaryService: IconDictionaryService,\n iconSetChangedService: IconSetChangedService,\n private titleService: TitleService,\n private elementRegistryService: ElementRegistryService,\n private snackbar: MatSnackBar,\n ) {\n this.iconSetConfigurationTypes = new BehaviorSubject(\n this.iconSetConfigurationService.getCurrentConfigurationNamesWithoutPrefix(),\n );\n\n this.selectedWorkobjects$.next(\n this.iconSetConfigurationTypes.value.workObjects,\n );\n this.selectedActors$.next(this.iconSetConfigurationTypes.value.actors);\n\n iconDictionaryService\n .getAllIconDictionary()\n .keysArray()\n .forEach((iconName) => {\n this.addIconToAllIconList(iconName);\n });\n\n iconSetChangedService.iconConfigrationChanged().subscribe((config) => {\n this.importConfiguration(config);\n });\n\n const storedIconSetConfiguration =\n this.iconSetConfigurationService.getStoredIconSetConfiguration();\n if (storedIconSetConfiguration) {\n this.importConfiguration(storedIconSetConfiguration, false);\n }\n }\n\n importConfiguration(\n customConfig: IconSetConfiguration,\n saveIconSet = true,\n ): void {\n const actorKeys = customConfig.actors.keysArray();\n const workObjectKeys = customConfig.workObjects.keysArray();\n const usedIcons = this.elementRegistryService.getUsedIcons();\n\n this.changeName(customConfig.name);\n actorKeys.forEach((iconName) => {\n if (!this.allIconListItems.has(iconName)) {\n this.addIconToAllIconList(iconName);\n }\n const selectedActorNames = this.selectedActors$.value;\n if (!selectedActorNames.includes(iconName)) {\n this.selectActor(iconName);\n }\n });\n this.selectedActors$.value.forEach((iconName) => {\n if (\n !actorKeys.includes(iconName) &&\n !usedIcons.actors.includes(iconName)\n ) {\n this.deselectActor(iconName);\n }\n });\n workObjectKeys.forEach((iconName) => {\n if (!this.allIconListItems.has(iconName)) {\n this.addIconToAllIconList(iconName);\n }\n const selectedWorkobjectNames = this.selectedWorkobjects$.value;\n if (!selectedWorkobjectNames.includes(iconName)) {\n this.selectWorkObject(iconName);\n }\n });\n this.selectedWorkobjects$.value.forEach((iconName) => {\n if (\n !workObjectKeys.includes(iconName) &&\n !usedIcons.workobjects.includes(iconName)\n ) {\n this.deselectWorkobject(iconName);\n }\n });\n if (saveIconSet) {\n this.saveIconSet(usedIcons, true);\n }\n }\n\n /** Getter & Setter **/\n getIconSetConfiguration(): BehaviorSubject {\n return this.iconSetConfigurationTypes;\n }\n\n getIconForName(iconName: string): BehaviorSubject {\n return this.allIconListItems.get(iconName);\n }\n\n isIconActor(iconName: string): boolean {\n return (\n this.iconSetConfigurationTypes.value.actors.filter(\n (actor: string) => actor === iconName,\n ).length > 0\n );\n }\n\n isIconWorkObject(iconName: string): boolean {\n return (\n this.iconSetConfigurationTypes.value.workObjects.filter(\n (workObject: string) => workObject === iconName,\n ).length > 0\n );\n }\n\n changeName(iconSetName: string): void {\n this.titleService.setIconSetName(iconSetName);\n const changedIconSet = this.iconSetConfigurationTypes.value;\n changedIconSet.name = iconSetName;\n this.iconSetConfigurationTypes.next(changedIconSet);\n }\n\n /** Selected Icons **/\n setAsUnassigned(iconName: string, isActor: boolean): void {\n if (isActor) {\n this.deselectActor(iconName);\n } else {\n this.deselectWorkobject(iconName);\n }\n this.updateIcon(false, false, iconName);\n }\n\n setAsActor(isActor: boolean, actor: string): void {\n if (isActor) {\n this.updateIcon(true, false, actor);\n this.selectActor(actor);\n this.deselectWorkobject(actor);\n } else {\n this.deselectActor(actor);\n this.updateIcon(false, false, actor);\n }\n }\n\n setAsWorkobject(isWorkobject: boolean, workobject: string): void {\n if (isWorkobject) {\n this.updateIcon(false, true, workobject);\n this.selectWorkObject(workobject);\n this.deselectActor(workobject);\n } else {\n this.deselectWorkobject(workobject);\n this.updateIcon(false, false, workobject);\n }\n }\n\n selectActor(actor: string): void {\n const value = this.iconSetConfigurationTypes.value;\n if (!value.actors.includes(actor)) {\n value.actors.push(actor);\n this.iconSetConfigurationTypes.next(value);\n this.updateActorSubject();\n }\n }\n\n selectWorkObject(workObject: string): void {\n const value = this.iconSetConfigurationTypes.value;\n if (!value.workObjects.includes(workObject)) {\n value.workObjects.push(workObject);\n this.iconSetConfigurationTypes.next(value);\n this.updateWorkObjectSubject();\n }\n }\n\n deselectActor(actor: string): void {\n if (this.iconSetConfigurationTypes) {\n this.iconSetConfigurationTypes.next({\n name: this.iconSetConfigurationTypes.value.name,\n actors: this.iconSetConfigurationTypes.value.actors.filter(\n (a: string) => !a.includes(actor),\n ),\n workObjects: this.iconSetConfigurationTypes.value.workObjects,\n });\n }\n this.updateActorSubject();\n }\n\n deselectWorkobject(workobject: string): void {\n if (this.iconSetConfigurationTypes) {\n this.iconSetConfigurationTypes.next({\n name: this.iconSetConfigurationTypes.value.name,\n actors: this.iconSetConfigurationTypes.value.actors,\n workObjects: this.iconSetConfigurationTypes.value.workObjects.filter(\n (w: string) => !w.includes(workobject),\n ),\n });\n }\n this.updateWorkObjectSubject();\n }\n\n setSelectedWorkObject(sortedList: string[]): void {\n const value = this.iconSetConfigurationTypes.value;\n value.workObjects = sortedList;\n this.iconSetConfigurationTypes.next(value);\n this.updateWorkObjectSubject();\n }\n\n setSelectedActors(sortedList: string[]): void {\n const value = this.iconSetConfigurationTypes.value;\n value.actors = sortedList;\n this.iconSetConfigurationTypes.next(value);\n this.updateActorSubject();\n }\n\n private updateActorSubject(): void {\n this.selectedActors$.next(this.iconSetConfigurationTypes.value.actors);\n this.configurationHasChanged = true;\n }\n\n private updateWorkObjectSubject(): void {\n this.selectedWorkobjects$.next(\n this.iconSetConfigurationTypes.value.workObjects,\n );\n this.configurationHasChanged = true;\n }\n\n /** Revert Icon Set **/\n resetIconSet(): void {\n const defaultConfig =\n this.iconSetConfigurationService.createMinimalConfigurationWithDefaultIcons();\n\n this.selectedWorkobjects$.value.forEach((workObjectName) => {\n if (!defaultConfig.workObjects.has(workObjectName)) {\n this.deselectWorkobject(workObjectName);\n }\n });\n this.selectedActors$.value.forEach((actorName) => {\n if (!defaultConfig.actors.has(actorName)) {\n this.deselectActor(actorName);\n }\n });\n\n this.iconSetConfigurationTypes.next({\n name: defaultConfig.name,\n actors: defaultConfig.actors.keysArray(),\n workObjects: defaultConfig.workObjects.keysArray(),\n } as CustomIconSetConfiguration);\n\n this.updateAllIconBehaviourSubjects();\n }\n\n cancel(): void {\n this.iconSetConfigurationTypes.next(\n this.iconSetConfigurationService.getCurrentConfigurationNamesWithoutPrefix(),\n );\n this.updateAllIconBehaviourSubjects();\n this.resetToInitialConfiguration();\n }\n\n private resetToInitialConfiguration(): void {\n this.updateActorSubject();\n this.updateWorkObjectSubject();\n }\n\n /** Persist Icon Set **/\n saveIconSet(usedIcons: UsedIconList, imported = false): void {\n const changedActors: string[] = [];\n const changedWorkobjects: string[] = [];\n if (this.configurationHasChanged) {\n const changedIconSet = this.createIconSetConfiguration();\n\n const configurationActors = changedIconSet.actors.keysArray();\n usedIcons?.actors.forEach((actor) => {\n if (\n !configurationActors?.includes(actor) &&\n !changedActors.includes(actor)\n ) {\n changedActors.push(actor);\n }\n });\n const configurationWorkobjects = changedIconSet.workObjects.keysArray();\n usedIcons?.workobjects.forEach((workobject) => {\n if (\n !configurationWorkobjects?.includes(workobject) &&\n !changedWorkobjects.includes(workobject)\n ) {\n changedWorkobjects.push(workobject);\n }\n });\n\n if (!changedActors.length && !changedWorkobjects.length) {\n this.changedIconSetConfiguration = changedIconSet;\n\n this.updateIcons(changedIconSet);\n\n this.iconSetConfigurationService.setStoredIconSetConfiguration(\n this.changedIconSetConfiguration,\n );\n this.snackbar.open(\n imported\n ? 'Configuration imported successfully'\n : 'Configuration saved successfully',\n undefined,\n {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n },\n );\n }\n } else {\n this.snackbar.open(\n imported\n ? 'No configuration to be imported'\n : 'No configuration to be saved',\n undefined,\n {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_INFO,\n },\n );\n }\n if (changedActors.length || changedWorkobjects.length) {\n if (changedActors.length) {\n const actors = changedActors.join(', ');\n this.snackbar.open(\n `The following icons are already in use as actors and cannot be changed: ${actors}`,\n undefined,\n {\n duration: SNACKBAR_DURATION_LONGER,\n panelClass: SNACKBAR_INFO,\n },\n );\n }\n if (changedWorkobjects.length) {\n const workobjects = changedWorkobjects.join(', ');\n this.snackbar.open(\n `The following icons are already in use as work objects and cannot be changed: ${workobjects}`,\n undefined,\n {\n duration: SNACKBAR_DURATION_LONGER,\n panelClass: SNACKBAR_INFO,\n },\n );\n }\n }\n }\n\n exportIconSet(): void {\n this.iconSetConfigurationService.exportConfiguration();\n }\n\n getAndClearSavedConfiguration(): IconSetConfiguration | undefined {\n const temp = this.changedIconSetConfiguration;\n this.changedIconSetConfiguration = undefined;\n\n return temp;\n }\n\n private createIconSetConfiguration(): IconSetConfiguration {\n const actors = new Dictionary();\n const workObjects = new Dictionary();\n\n this.iconSetConfigurationTypes.value.actors.forEach((name: string) => {\n actors.add(this.iconDictionaryService.getIconSource(name), name);\n });\n this.iconSetConfigurationTypes.value.workObjects.forEach((name: string) => {\n workObjects.add(this.iconDictionaryService.getIconSource(name), name);\n });\n\n return {\n name: this.iconSetConfigurationTypes.value.name || '',\n actors,\n workObjects,\n };\n }\n\n /** Update Icons **/\n addNewIcon(iconName: string): void {\n const iconDict = new Dictionary();\n iconDict.add(this.getSrcForIcon(iconName), iconName);\n this.iconDictionaryService.addIconsToCss(iconDict);\n this.addIconToAllIconList(iconName);\n }\n\n private addIconToAllIconList(iconName: string): void {\n this.allIconListItems.add(\n new BehaviorSubject({\n name: iconName,\n svg: this.getSrcForIcon(iconName),\n isActor: this.isIconActor(iconName),\n isWorkObject: this.isIconWorkObject(iconName),\n }),\n iconName,\n );\n }\n\n private updateIcon(\n isActor: boolean,\n isWorkobject: boolean,\n iconName: string,\n ) {\n const iconBehaviourSubject = this.getIconForName(iconName);\n const icon = iconBehaviourSubject.value;\n icon.isActor = isActor;\n icon.isWorkObject = isWorkobject;\n\n iconBehaviourSubject.next(icon);\n }\n\n private updateAllIconBehaviourSubjects(): void {\n const customIconSetConfiguration = this.iconSetConfigurationTypes.value;\n this.allIconListItems.keysArray().forEach((iconName) => {\n if (customIconSetConfiguration.actors.includes(iconName)) {\n this.updateIcon(true, false, iconName);\n } else if (customIconSetConfiguration.workObjects.includes(iconName)) {\n this.updateIcon(false, true, iconName);\n } else {\n this.updateIcon(false, false, iconName);\n }\n });\n }\n\n private getSrcForIcon(name: string): string {\n let iconName: string;\n if (name.includes(ElementTypes.DOMAINSTORY)) {\n // TODO: td: This returns empty every time!\n iconName = getIconId(name);\n } else {\n iconName = name;\n }\n const rawSrc = this.iconDictionaryService.getIconSource(iconName);\n\n if (!rawSrc) {\n return '';\n }\n\n if (rawSrc.startsWith('data')) {\n return rawSrc;\n } else {\n return 'data:image/svg+xml,' + rawSrc;\n }\n }\n\n private updateIcons(changedIconSet: IconSetConfiguration) {\n this.allIconListItems\n .keysArray()\n .forEach((item) => this.setAsUnassigned(item, this.isIconActor(item)));\n changedIconSet.actors.keysArray().forEach((actor) => {\n this.iconDictionaryService.registerIconForType(\n ElementTypes.ACTOR,\n actor,\n this.iconDictionaryService.getFullDictionary().get(actor),\n );\n this.iconDictionaryService.unregisterIconForType(\n ElementTypes.WORKOBJECT,\n actor,\n );\n this.setAsActor(true, actor);\n });\n changedIconSet.workObjects.keysArray().forEach((workObject) => {\n this.iconDictionaryService.registerIconForType(\n ElementTypes.WORKOBJECT,\n workObject,\n this.iconDictionaryService.getFullDictionary().get(workObject),\n );\n this.iconDictionaryService.unregisterIconForType(\n ElementTypes.ACTOR,\n workObject,\n );\n this.setAsWorkobject(true, workObject);\n });\n }\n}\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';\n\n@Component({\n selector: 'app-import-dialog',\n templateUrl: './import-dialog.component.html',\n styleUrls: ['./import-dialog.component.scss'],\n})\nexport class ImportDialogComponent implements OnInit {\n fn: any;\n fileUrl: BehaviorSubject;\n\n constructor(\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: () => {},\n ) {\n this.fileUrl = new BehaviorSubject('');\n this.fn = data;\n }\n\n ngOnInit(): void {}\n\n doImport(): void {\n this.fn(this.fileUrl.value);\n this.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n updateUrl($event: Event) {\n // @ts-ignore\n this.fileUrl.next($event.target.value);\n }\n}\n","\n \n \n\n\n
\n
\n \n \n Import\n \n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MaterialModule } from '../../../material.module';\nimport { ImportDialogComponent } from './import-dialog/import-dialog.component';\n\n@NgModule({\n declarations: [ImportDialogComponent],\n exports: [ImportDialogComponent],\n imports: [CommonModule, MaterialModule],\n})\nexport class ImportModule {}\n","import { EventEmitter, Injectable, OnDestroy } from '@angular/core';\nimport { IconDictionaryService } from 'src/app/tools/icon-set-config/services/icon-dictionary.service';\nimport { Dictionary } from 'src/app/domain/entities/dictionary';\nimport { ElementTypes } from 'src/app/domain/entities/elementTypes';\nimport { TitleService } from 'src/app/tools/title/services/title.service';\nimport { ImportRepairService } from 'src/app/tools/import/services/import-repair.service';\nimport { Observable, Subscription } from 'rxjs';\nimport { RendererService } from 'src/app/tools/modeler/services/renderer.service';\nimport { BusinessObject } from 'src/app/domain/entities/businessObject';\nimport { DialogService } from '../../../domain/services/dialog.service';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_TITLE,\n SNACKBAR_DURATION,\n SNACKBAR_DURATION_LONG,\n SNACKBAR_DURATION_LONGER,\n SNACKBAR_ERROR,\n SNACKBAR_INFO,\n} from '../../../domain/entities/constants';\nimport { IconSetConfigurationService } from '../../icon-set-config/services/icon-set-configuration.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { IconSetConfiguration } from '../../../domain/entities/icon-set-configuration';\nimport { IconSetChangedService } from '../../icon-set-config/services/icon-set-customization.service';\nimport { ModelerService } from '../../modeler/services/modeler.service';\nimport { ImportDialogComponent } from '../presentation/import-dialog/import-dialog.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ImportDomainStoryService\n implements OnDestroy, IconSetChangedService\n{\n titleSubscription: Subscription;\n descriptionSubscription: Subscription;\n\n title = INITIAL_TITLE;\n description = INITIAL_DESCRIPTION;\n private importedConfiguration: IconSetConfiguration | null = null;\n\n private importedConfigurationEmitter =\n new EventEmitter();\n\n constructor(\n private iconDictionaryService: IconDictionaryService,\n private importRepairService: ImportRepairService,\n private titleService: TitleService,\n private rendererService: RendererService,\n private dialogService: DialogService,\n private iconSetConfigurationService: IconSetConfigurationService,\n private modelerService: ModelerService,\n private snackbar: MatSnackBar,\n ) {\n this.titleSubscription = this.titleService.title$.subscribe(\n (title: string) => {\n this.title = title;\n },\n );\n this.descriptionSubscription = this.titleService.description$.subscribe(\n (description: string) => {\n this.description = description;\n },\n );\n }\n\n ngOnDestroy(): void {\n this.titleSubscription.unsubscribe();\n this.descriptionSubscription.unsubscribe();\n }\n\n iconConfigrationChanged(): Observable {\n return this.importedConfigurationEmitter.asObservable();\n }\n\n getConfiguration(): IconSetConfiguration {\n const config: IconSetConfiguration = {\n name: this.importedConfiguration?.name || '',\n actors: this.importedConfiguration?.actors || new Dictionary(),\n workObjects: this.importedConfiguration?.workObjects || new Dictionary(),\n };\n this.importedConfiguration = null;\n return config;\n }\n\n performImport(): void {\n // @ts-ignore\n const file = document.getElementById('import').files[0];\n const filename = file.name;\n\n const dstSvgPattern = /.*(.dst)(\\s*\\(\\d+\\)){0,1}\\.svg/;\n const egnSvgPattern = /.*(.egn)(\\s*\\(\\d+\\)){0,1}\\.svg/;\n\n if (filename.endsWith('.dst')) {\n this.importDST(file, filename, false);\n } else if (filename.match(dstSvgPattern)) {\n this.importDST(file, filename, true);\n } else if (filename.endsWith('.egn')) {\n this.importEGN(file, filename, false);\n } else if (filename.match(egnSvgPattern)) {\n this.importEGN(file, filename, true);\n }\n this.modelerService.commandStackChanged();\n }\n\n importFromUrl(fileUrl: string): void {\n if (!fileUrl.startsWith('http')) {\n this.snackbar.open('Url not valid', undefined, {\n duration: SNACKBAR_DURATION_LONG,\n panelClass: SNACKBAR_ERROR,\n });\n return;\n }\n fetch(fileUrl)\n .then((response) => {\n return response.blob();\n })\n .then((blob) => {\n const string = fileUrl.split('/');\n const filename = string[string.length - 1].replace(/%20/g, ' ');\n\n if (!filename) {\n throw new Error('Unable to extract filename from URL');\n }\n\n const dstSvgPattern = /.*(.dst)(\\s*\\(\\d+\\)){0,1}\\.svg/;\n const egnSvgPattern = /.*(.egn)(\\s*\\(\\d+\\)){0,1}\\.svg/;\n\n if (filename.endsWith('.dst')) {\n this.importDST(blob, filename, false);\n } else if (filename.match(dstSvgPattern)) {\n this.importDST(blob, filename, true);\n } else if (filename.endsWith('.egn')) {\n this.importEGN(blob, filename, false);\n } else if (filename.match(egnSvgPattern)) {\n this.importEGN(blob, filename, true);\n } else {\n this.snackbar.open('Url not valid', undefined, {\n duration: SNACKBAR_DURATION_LONG,\n panelClass: SNACKBAR_ERROR,\n });\n }\n this.modelerService.commandStackChanged();\n })\n .catch(() =>\n this.snackbar.open('Cross-origin request blocked', undefined, {\n duration: SNACKBAR_DURATION_LONG,\n panelClass: SNACKBAR_ERROR,\n }),\n );\n }\n\n openUploadUrlDialog(): void {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n config.data = (fileUrl: string) => this.importFromUrl(fileUrl);\n this.dialogService.openDialog(ImportDialogComponent, config);\n }\n\n importDST(input: Blob, filename: string, isSVG: boolean): void {\n const fileReader = new FileReader();\n const titleText = this.restoreTitleFromFileName(filename, isSVG);\n\n // no need to put this on the commandStack\n this.titleService.updateTitleAndDescription(titleText, null, false);\n\n fileReader.onloadend = (e) => {\n if (e && e.target) {\n this.fileReaderFunction(e.target.result, isSVG, false);\n }\n };\n\n fileReader.readAsText(input);\n }\n\n importEGN(input: Blob, filename: string, isSVG: boolean): void {\n const fileReader = new FileReader();\n const titleText = this.restoreTitleFromFileName(filename, isSVG);\n\n // no need to put this on the commandStack\n this.titleService.updateTitleAndDescription(titleText, null, false);\n\n fileReader.onloadend = (e) => {\n if (e && e.target) {\n this.fileReaderFunction(e.target.result, isSVG, true);\n }\n };\n\n fileReader.readAsText(input);\n }\n\n private fileReaderFunction(\n text: string | ArrayBuffer | null,\n isSVG: boolean,\n isEGN: boolean,\n ): void {\n let dstText;\n if (typeof text === 'string') {\n if (isSVG) {\n dstText = this.removeXMLComments(text);\n } else {\n dstText = text;\n }\n\n let elements: any[];\n let config: IconSetConfiguration;\n let configFromFile: {\n name: string;\n actors: { [key: string]: any };\n workObjects: { [key: string]: any };\n };\n\n let dstAndConfig = this.extractDstAndConfig(dstText);\n if (dstAndConfig == null) {\n return;\n }\n\n // current implementation\n if (dstAndConfig.domain) {\n configFromFile = isEGN\n ? dstAndConfig.domain\n : JSON.parse(dstAndConfig.domain);\n config =\n this.iconSetConfigurationService.createIconSetConfiguration(\n configFromFile,\n );\n elements = isEGN ? dstAndConfig.dst : JSON.parse(dstAndConfig.dst);\n } else {\n // legacy implementation\n if (dstAndConfig.config) {\n configFromFile = JSON.parse(dstAndConfig.config);\n config =\n this.iconSetConfigurationService.createIconSetConfiguration(\n configFromFile,\n );\n elements = JSON.parse(dstAndConfig.dst);\n } else {\n // implementation prior to configuration\n elements = JSON.parse(dstText);\n config =\n this.iconSetConfigurationService.createMinimalConfigurationWithDefaultIcons();\n }\n }\n\n this.importRepairService.removeWhitespacesFromIcons(elements);\n\n const configChanged = this.checkConfigForChanges(config);\n\n let lastElement = elements[elements.length - 1];\n if (!lastElement.id) {\n lastElement = elements.pop();\n let importVersionNumber = lastElement;\n\n // if the last element has the importedVersionNumber has the tag version,\n // then there exists another meta tag 'info' for the description\n if (importVersionNumber.version) {\n lastElement = elements.pop();\n }\n\n if (importVersionNumber.version) {\n importVersionNumber = importVersionNumber.version as string;\n } else {\n importVersionNumber = '?';\n this.snackbar.open(`The version number is unreadable.`, undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_ERROR,\n });\n }\n elements = this.handleVersionNumber(importVersionNumber, elements);\n }\n\n if (\n !this.importRepairService.checkForUnreferencedElementsInActivitiesAndRepair(\n elements,\n )\n ) {\n this.showBrokenImportDialog();\n }\n\n this.titleService.updateTitleAndDescription(\n this.title,\n lastElement.info,\n false,\n );\n\n this.importRepairService.adjustPositions(elements);\n\n this.updateIconRegistries(elements, config);\n this.rendererService.importStory(elements, configChanged, config);\n }\n }\n\n private handleVersionNumber(\n importVersionNumber: string,\n elements: BusinessObject[],\n ): BusinessObject[] {\n const versionPrefix = +importVersionNumber.substring(\n 0,\n importVersionNumber.lastIndexOf('.'),\n );\n if (versionPrefix <= 0.5) {\n elements =\n this.importRepairService.updateCustomElementsPreviousV050(elements);\n this.showPreviousV050Dialog(versionPrefix);\n }\n return elements;\n }\n\n private extractDstAndConfig(dstText: string) {\n let dstAndConfig = null;\n try {\n dstAndConfig = JSON.parse(dstText);\n } catch (e) {\n this.showBrokenImportDialog();\n }\n return dstAndConfig;\n }\n\n private removeXMLComments(xmlText: string): string {\n xmlText = xmlText.substring(xmlText.indexOf(''));\n while (xmlText.includes('')) {\n xmlText = xmlText.replace('', '');\n }\n xmlText = xmlText.replace('', '');\n xmlText = xmlText.replace('', '');\n return xmlText;\n }\n\n checkConfigForChanges(iconSetConfiguration: IconSetConfiguration): boolean {\n const newActorKeys = iconSetConfiguration.actors.keysArray();\n const newWorkObjectKeys = iconSetConfiguration.workObjects.keysArray();\n\n const currentActorKeys = this.iconDictionaryService.getTypeDictionaryKeys(\n ElementTypes.ACTOR,\n );\n const currentWorkobjectKeys =\n this.iconDictionaryService.getTypeDictionaryKeys(ElementTypes.WORKOBJECT);\n\n let changed = false;\n\n if (\n newActorKeys.length !== currentActorKeys.length ||\n newWorkObjectKeys.length !== currentWorkobjectKeys.length\n ) {\n return true;\n }\n\n for (let i = 0; i < newActorKeys.length; i++) {\n changed =\n this.clearName(currentActorKeys[i]) !== this.clearName(newActorKeys[i]);\n if (changed) {\n i = newActorKeys.length;\n }\n }\n if (changed) {\n return changed;\n }\n for (let i = 0; i < newWorkObjectKeys.length; i++) {\n changed =\n this.clearName(currentWorkobjectKeys[i]) !==\n this.clearName(newWorkObjectKeys[i]);\n if (changed) {\n i = newWorkObjectKeys.length;\n }\n }\n return changed;\n }\n\n private clearName(name: string): string {\n return name\n .replace(ElementTypes.ACTOR, '')\n .replace(ElementTypes.WORKOBJECT, '');\n }\n\n private updateIconRegistries(\n elements: BusinessObject[],\n config: IconSetConfiguration,\n ): void {\n const actorIcons = this.iconDictionaryService.getElementsOfType(\n elements,\n ElementTypes.ACTOR,\n );\n const workObjectIcons = this.iconDictionaryService.getElementsOfType(\n elements,\n ElementTypes.WORKOBJECT,\n );\n this.iconDictionaryService.updateIconRegistries(\n actorIcons,\n workObjectIcons,\n config,\n );\n\n this.setImportedConfigurationAndEmit(config);\n }\n\n private showPreviousV050Dialog(version: number): void {\n const message = `Your domain story was created with Egon version ${version}. The file format has since changed.\n Your Domain Story was converted to the new format. Please check if it is complete.`;\n\n this.snackbar.open(message, undefined, {\n duration: SNACKBAR_DURATION_LONGER,\n panelClass: SNACKBAR_INFO,\n });\n }\n\n private setImportedConfigurationAndEmit(config: IconSetConfiguration) {\n this.importedConfiguration = config;\n this.importedConfigurationEmitter.emit(config);\n }\n\n private showBrokenImportDialog() {\n const message = `Error during import: The imported domain story is not complete. Please check if there are elements missing from the canvas.`;\n\n this.snackbar.open(message, undefined, {\n duration: SNACKBAR_DURATION_LONGER,\n panelClass: SNACKBAR_ERROR,\n });\n }\n\n private restoreTitleFromFileName(filename: string, isSVG: boolean): string {\n let title;\n\n const domainStoryRegex = /_\\d+-\\d+-\\d+( ?_?-?\\(\\d+\\))?(-?\\d)?(.dst|.egn)/;\n const svgRegex = /_\\d+-\\d+-\\d+( ?_?-?\\(\\d+\\))?(-?\\d)?(.dst|.egn).svg/;\n\n const egnSuffix = '.egn';\n const dstSuffix = '.dst';\n const svgSuffix = '.svg';\n\n let filenameWithoutDateSuffix = filename.replace(\n isSVG ? svgRegex : domainStoryRegex,\n '',\n );\n filenameWithoutDateSuffix = filenameWithoutDateSuffix\n .replace(svgSuffix, '')\n .replace(dstSuffix, '')\n .replace(egnSuffix, '');\n title = filenameWithoutDateSuffix;\n return title;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementTypes } from 'src/app/domain/entities/elementTypes';\nimport { BusinessObject } from 'src/app/domain/entities/businessObject';\nimport { Waypoint } from 'src/app/domain/entities/waypoint';\nimport { ActivityBusinessObject } from '../../../domain/entities/activityBusinessObject';\n\n/**\n * Repairs broken Domain Stories so that it can be rendered onto the canvas\n * by removing activities and connections that reference elements that don't exists\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ImportRepairService {\n checkForUnreferencedElementsInActivitiesAndRepair(\n elements: BusinessObject[],\n ): boolean {\n const activities: ActivityBusinessObject[] = [];\n const objectIDs: string[] = [];\n\n let complete = true;\n\n elements.forEach((element) => {\n const type = element.type;\n if (type === ElementTypes.ACTIVITY || type === ElementTypes.CONNECTION) {\n activities.push(element as ActivityBusinessObject);\n } else {\n objectIDs.push(element.id);\n }\n });\n\n activities.forEach((activity) => {\n const source = activity.source;\n const target = activity.target;\n if (!objectIDs.includes(source) || !objectIDs.includes(target)) {\n complete = false;\n const activityIndex = elements.indexOf(activity);\n elements = elements.splice(activityIndex, 1);\n }\n });\n return complete;\n }\n\n /**\n * Ensure backwards compatibility.\n * Previously Document had no special name and was just addressed as workObject\n * Bubble was renamed to Conversation\n */\n updateCustomElementsPreviousV050(\n elements: BusinessObject[],\n ): BusinessObject[] {\n for (const element of elements) {\n if (element.type === ElementTypes.WORKOBJECT) {\n element.type = ElementTypes.WORKOBJECT + 'Document';\n } else if (element.type === ElementTypes.WORKOBJECT + 'Bubble') {\n element.type = ElementTypes.WORKOBJECT + 'Conversation';\n }\n }\n return elements;\n }\n\n /**\n * Adjusts Positions of Elements to ensure the Domain Story starts in the visible parts of the canvas\n */\n adjustPositions(elements: BusinessObject[]): void {\n let xLeft = 0;\n let yUp = 0;\n let isFirst = true;\n\n this.findFirstElement(elements, isFirst, xLeft, yUp);\n\n if (xLeft < 75 || xLeft > 150 || yUp < 0 || yUp > 50) {\n // add Padding for the Palette and the top\n xLeft -= 75;\n yUp -= 50;\n\n elements.forEach((element) =>\n this.adjustElementPosition(element, xLeft, yUp),\n );\n }\n }\n\n private adjustElementPosition(\n element: BusinessObject,\n xLeft: number,\n yUp: number,\n ): void {\n if (\n element.type === ElementTypes.ACTIVITY ||\n element.type === ElementTypes.CONNECTION\n ) {\n const waypoints = (element as ActivityBusinessObject).waypoints;\n waypoints.forEach((point: Waypoint) => {\n point.x -= xLeft;\n point.y -= yUp;\n\n if (point.original) {\n point.original.x = point.x;\n point.original.y = point.y;\n }\n });\n } else {\n element.x -= xLeft;\n element.y -= yUp;\n }\n }\n\n private findFirstElement(\n elements: BusinessObject[],\n isFirst: boolean,\n xLeft: number,\n yUp: number,\n ) {\n elements.forEach((element) => {\n let elXLeft;\n let elYUp;\n if (\n element.type !== ElementTypes.ACTIVITY &&\n element.type !== ElementTypes.CONNECTION\n ) {\n if (isFirst) {\n xLeft = element.x;\n yUp = element.y;\n isFirst = false;\n }\n elXLeft = element.x;\n elYUp = element.y;\n if (elXLeft < xLeft) {\n xLeft = elXLeft;\n }\n if (elYUp < yUp) {\n yUp = elYUp;\n }\n }\n });\n }\n\n // Early versions of Egon allowed Whitespaces in Icon names which are now not supported anymore.\n // To find the right icon in the dictionary, they need to be replaced.\n removeWhitespacesFromIcons(elements: BusinessObject[]) {\n elements.forEach((bo) => {\n if (bo.type) {\n bo.type = bo.type.replace(/ /g, '-');\n }\n });\n }\n}\n","import { Component } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'app-label-dictionary-dialog',\n templateUrl: './label-dictionary-dialog.component.html',\n styleUrls: ['./label-dictionary-dialog.component.scss'],\n})\nexport class LabelDictionaryDialogComponent {\n constructor(\n private dialogRef: MatDialogRef,\n ) {}\n\n close(): void {\n this.dialogRef.close();\n }\n}\n","\n

Label Dictionary

\n \n
\n","import { NgModule } from '@angular/core';\nimport { LabelDictionaryComponent } from './label-dictionary/label-dictionary.component';\nimport { LabelDictionaryDialogComponent } from './label-dictionary-dialog/label-dictionary-dialog.component';\nimport { CommonModule } from '@angular/common';\nimport { MaterialModule } from '../../../material.module';\n\n@NgModule({\n declarations: [LabelDictionaryComponent, LabelDictionaryDialogComponent],\n exports: [LabelDictionaryComponent, LabelDictionaryDialogComponent],\n imports: [CommonModule, MaterialModule],\n})\nexport class LabelDictionaryModule {}\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Output,\n} from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { WorkObjectLabelEntry } from '../../domain/workObjectLabelEntry';\nimport { LabelEntry } from '../../domain/labelEntry';\nimport { LabelDictionaryService } from '../../services/label-dictionary.service';\nimport { initializeLabelEditingProvider } from '../../../modeler/bpmn/modeler/labeling/dsLabelEditingProvider';\n\n@Component({\n selector: 'app-label-dictionary',\n templateUrl: './label-dictionary.component.html',\n styleUrls: ['./label-dictionary.component.scss'],\n})\nexport class LabelDictionaryComponent implements AfterViewInit {\n workobjectEntriesSubject: BehaviorSubject;\n activityEntriesSubject: BehaviorSubject;\n\n workObjectEntries: WorkObjectLabelEntry[];\n activityEntries: LabelEntry[];\n\n @Output()\n closeEmitter: EventEmitter = new EventEmitter();\n\n constructor(\n private labelDictionaryService: LabelDictionaryService,\n private cd: ChangeDetectorRef,\n ) {\n this.labelDictionaryService.createLabelDictionaries();\n this.workObjectEntries = this.labelDictionaryService.getWorkObjectLabels();\n this.activityEntries = this.labelDictionaryService.getActivityLabels();\n\n this.workobjectEntriesSubject = new BehaviorSubject(this.workObjectEntries);\n this.activityEntriesSubject = new BehaviorSubject(this.activityEntries);\n }\n\n ngAfterViewInit(): void {\n this.labelDictionaryService.createLabelDictionaries();\n this.workobjectEntriesSubject.next(\n this.labelDictionaryService.getWorkObjectLabels(),\n );\n this.activityEntriesSubject.next(\n this.labelDictionaryService.getActivityLabels(),\n );\n this.cd.detectChanges();\n }\n\n save(): void {\n this.workObjectEntries = this.workobjectEntriesSubject.value;\n this.activityEntries = this.activityEntriesSubject.value;\n\n const activityNames: string[] = [];\n const originalActivityNames: string[] = [];\n\n const workObjectNames: string[] = [];\n const originalWorkObjectNames: string[] = [];\n\n this.activityEntries\n .filter((a) => a.name !== a.originalName)\n .forEach((activity) => {\n activityNames.push(activity.name);\n originalActivityNames.push(activity.originalName);\n });\n\n this.workObjectEntries\n .filter((w) => w.name !== w.originalName)\n .forEach((workobject) => {\n workObjectNames.push(workobject.name);\n originalWorkObjectNames.push(workobject.originalName);\n });\n\n this.labelDictionaryService.massRenameLabels(\n activityNames,\n originalActivityNames,\n workObjectNames,\n originalWorkObjectNames,\n );\n this.closeEmitter.emit();\n }\n\n cancel(): void {\n this.workObjectEntries.forEach((w) => {\n w.name = w.originalName;\n });\n this.activityEntries.forEach((a) => {\n a.name = a.originalName;\n });\n\n this.workobjectEntriesSubject.next(this.workObjectEntries);\n this.activityEntriesSubject.next(this.activityEntries);\n }\n\n updateActivityEntry($event: Event, activityEntry: LabelEntry) {\n let entries = this.activityEntriesSubject.value;\n entries.filter(\n (e) => e.originalName === activityEntry.originalName,\n // @ts-ignore\n )[0].name = $event.target.value;\n this.activityEntriesSubject.next(entries);\n }\n\n updateWorkobjectEntry($event: Event, workobjectEntry: LabelEntry) {\n let entries = this.workobjectEntriesSubject.value;\n entries.filter(\n (e) => e.originalName === workobjectEntry.originalName,\n // @ts-ignore\n )[0].name = $event.target.value;\n this.workobjectEntriesSubject.next(entries);\n }\n\n preventDefault(event: Event): void {\n event.preventDefault();\n }\n\n close(): void {\n this.closeEmitter.emit();\n }\n}\n","
\n
\n

Work Objects

\n \n @for (\n workobjectEntry of workobjectEntriesSubject | async;\n track workobjectEntry\n ) {\n \n \n \n \n \n }\n \n
\n
\n

Activities

\n \n @for (\n activityEntry of activityEntriesSubject | async;\n track activityEntry\n ) {\n \n \n \n \n \n }\n \n
\n
\n\n \n \n\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/domain/services/element-registry.service';\nimport { ElementTypes } from 'src/app/domain/entities/elementTypes';\nimport { MassNamingService } from 'src/app/tools/label-dictionary/services/mass-naming.service';\nimport { IconDictionaryService } from '../../icon-set-config/services/icon-dictionary.service';\nimport { WorkObjectLabelEntry } from '../domain/workObjectLabelEntry';\nimport { LabelEntry } from '../domain/labelEntry';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { LabelDictionaryDialogComponent } from '../presentation/label-dictionary-dialog/label-dictionary-dialog.component';\nimport {\n SNACKBAR_DURATION_LONGER,\n SNACKBAR_INFO,\n} from '../../../domain/entities/constants';\nimport { DialogService } from '../../../domain/services/dialog.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { CanvasObject } from '../../../domain/entities/canvasObject';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LabelDictionaryService {\n activityLabels: LabelEntry[] = [];\n workObjektLabels: WorkObjectLabelEntry[] = [];\n\n constructor(\n private massNamingService: MassNamingService,\n private elementRegistryService: ElementRegistryService,\n private iconDictionaryService: IconDictionaryService,\n private dialogService: DialogService,\n private snackbar: MatSnackBar,\n ) {}\n\n openLabelDictionary() {\n const isActivityWithLabel = (element: CanvasObject) =>\n element.type.includes(ElementTypes.ACTIVITY) &&\n element.businessObject.name;\n const isWorkObjectWithLabel = (element: CanvasObject) =>\n element.type.includes(ElementTypes.WORKOBJECT) &&\n element.businessObject.name;\n\n const hasAtLeastOneLabel = this.elementRegistryService\n .getAllCanvasObjects()\n .some(\n (element) =>\n isActivityWithLabel(element) || isWorkObjectWithLabel(element),\n );\n if (hasAtLeastOneLabel) {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n this.dialogService.openDialog(LabelDictionaryDialogComponent, config);\n } else {\n this.snackbar.open(\n 'There are currently no activities or work objects with labels on the canvas',\n undefined,\n {\n duration: SNACKBAR_DURATION_LONGER,\n panelClass: SNACKBAR_INFO,\n },\n );\n }\n }\n\n createLabelDictionaries(): void {\n this.activityLabels = [];\n this.workObjektLabels = [];\n\n const allObjects = this.elementRegistryService.getAllCanvasObjects();\n\n allObjects.forEach((element) => {\n const name = element.businessObject.name;\n if (\n name &&\n name.length > 0 &&\n element.type.includes(ElementTypes.ACTIVITY) &&\n !this.activityLabels.map((a) => a.name).includes(name)\n ) {\n this.activityLabels.push({\n name,\n originalName: name,\n });\n } else if (\n name &&\n name.length > 0 &&\n element.type.includes(ElementTypes.WORKOBJECT) &&\n !this.workObjektLabels.map((e) => e.name).includes(name)\n ) {\n const iconName = element.type.replace(ElementTypes.WORKOBJECT, '');\n let icon = this.iconDictionaryService.getIconSource(iconName);\n if (!icon) {\n return;\n }\n if (!icon.startsWith('data')) {\n icon = 'data:image/svg+xml,' + icon;\n }\n this.workObjektLabels.push({\n name,\n originalName: name,\n icon,\n });\n }\n });\n this.activityLabels.sort((a, b) => {\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\n });\n this.workObjektLabels.sort((a, b) => {\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\n });\n }\n\n getActivityLabels(): LabelEntry[] {\n return this.activityLabels.slice();\n }\n\n getWorkObjectLabels(): WorkObjectLabelEntry[] {\n return this.workObjektLabels.slice();\n }\n\n getUniqueWorkObjectNames(): String[] {\n const workObjects = this.elementRegistryService.getAllWorkobjects();\n return [\n ...new Set(\n workObjects\n .filter((workObject) => {\n return !!workObject.businessObject.name;\n })\n .map((workObject) => workObject.businessObject.name),\n ),\n ];\n }\n\n massRenameLabels(\n activityNames: string[],\n originalActivityNames: string[],\n workObjectNames: string[],\n originalWorkObjectNames: string[],\n ): void {\n for (let i = 0; i < originalActivityNames.length; i++) {\n if (!activityNames[i]) {\n activityNames[i] = '';\n }\n if (!(activityNames[i] == originalActivityNames[i])) {\n this.massNamingService.massChangeNames(\n originalActivityNames[i],\n activityNames[i],\n ElementTypes.ACTIVITY,\n );\n }\n }\n for (let i = 0; i < originalWorkObjectNames.length; i++) {\n if (!workObjectNames[i]) {\n workObjectNames[i] = '';\n }\n if (!(workObjectNames[i] == originalWorkObjectNames[i])) {\n this.massNamingService.massChangeNames(\n originalWorkObjectNames[i],\n workObjectNames[i],\n ElementTypes.WORKOBJECT,\n );\n }\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/domain/services/element-registry.service';\nimport { CanvasObject } from 'src/app/domain/entities/canvasObject';\nimport { ElementTypes } from '../../../domain/entities/elementTypes';\nimport { CommandStackService } from '../../../domain/services/command-stack.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MassNamingService {\n constructor(\n private elementRegistryService: ElementRegistryService,\n private commandStackService: CommandStackService,\n ) {}\n\n massChangeNames(\n oldValue: string,\n newValue: string,\n type: ElementTypes,\n ): void {\n const allRelevantObjects: CanvasObject[] = [];\n\n this.elementRegistryService.getAllCanvasObjects().forEach((element) => {\n if (\n element.type.includes(type) &&\n element.businessObject.name === oldValue\n ) {\n allRelevantObjects.push(element);\n }\n });\n\n const context = {\n elements: allRelevantObjects,\n newValue,\n };\n\n this.commandStackService.execute('domainStoryObjects.massRename', context);\n }\n}\n","import { FormControl, FormGroup, Validators } from '@angular/forms';\n\nexport interface ActivityDialogForm {\n activityLabel: FormControl;\n activityNumber: FormControl;\n multipleNumbers: FormControl;\n}\n\nexport namespace ActivityDialogForm {\n export function create(\n activityLabel: string,\n activityNumber: number | null,\n numberIsAllowedMultipleTimes: boolean,\n ): FormGroup {\n return new FormGroup({\n activityLabel: new FormControl(activityLabel, {\n nonNullable: true,\n }),\n activityNumber: new FormControl(activityNumber, [\n Validators.required,\n ]),\n multipleNumbers: new FormControl(numberIsAllowedMultipleTimes, {\n nonNullable: true,\n }),\n });\n }\n}\n","import { ActivityCanvasObject } from '../../../domain/entities/activityCanvasObject';\n\nexport class ActivityDialogData {\n activity: ActivityCanvasObject;\n numberIsAllowedMultipleTimes: boolean;\n showNumberFields: boolean;\n\n saveFN: any;\n\n constructor(\n activity: ActivityCanvasObject,\n numberIsAllowedMultipleTimes: boolean,\n showNumberFields: boolean,\n saveFN: any,\n ) {\n this.activity = activity;\n this.numberIsAllowedMultipleTimes = numberIsAllowedMultipleTimes;\n this.showNumberFields = showNumberFields;\n this.saveFN = saveFN;\n }\n}\n","import { Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { FormGroup } from '@angular/forms';\nimport { ActivityDialogData } from 'src/app/tools/modeler/domain/activityDialogData';\nimport { ActivityCanvasObject } from '../../../../domain/entities/activityCanvasObject';\nimport { ActivityDialogForm } from '../../domain/activity-dialog-form';\n\n@Component({\n selector: 'app-activity-dialog',\n templateUrl: './activity-dialog.component.html',\n styleUrls: ['./activity-dialog.component.scss'],\n})\nexport class ActivityDialogComponent {\n form: FormGroup;\n activityLabel: string;\n activityNumber: number | null;\n numberIsAllowedMultipleTimes: boolean;\n showNumberFields: boolean;\n activity: ActivityCanvasObject;\n\n saveFN: any;\n\n constructor(\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: ActivityDialogData,\n ) {\n this.activity = data.activity;\n this.activityLabel = data.activity.businessObject.name;\n this.numberIsAllowedMultipleTimes = data.numberIsAllowedMultipleTimes;\n this.activityNumber = data.activity.businessObject.number ?? null;\n this.showNumberFields = data.showNumberFields;\n\n this.saveFN = data.saveFN;\n\n this.form = ActivityDialogForm.create(\n this.activityLabel,\n this.activityNumber,\n this.numberIsAllowedMultipleTimes,\n );\n\n this.form.controls.activityNumber.valueChanges.subscribe(\n (activityNumber) => {\n if (activityNumber !== null) {\n if (activityNumber < 1) {\n this.form.controls.activityNumber.setValue(1);\n }\n }\n },\n );\n }\n\n onSubmit(): void {\n this.numberIsAllowedMultipleTimes = !this.numberIsAllowedMultipleTimes;\n this.form.patchValue({\n multipleNumbers: this.numberIsAllowedMultipleTimes,\n });\n }\n\n save(): void {\n this.saveFN({\n activity: this.activity,\n ...this.form.value,\n });\n this.dialogRef.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n preventDefault(event: Event) {\n event.preventDefault();\n }\n}\n","\n

Edit Activity

\n
\n
\n \n Number\n \n \n \n multiple\n
\n \n Label\n \n \n
\n
\n\n\n \n \n\n","import { NgModule } from '@angular/core';\nimport { ActivityDialogComponent } from './activity-dialog/activity-dialog.component';\nimport { ModelerComponent } from './modeler/modeler.component';\nimport { CommonModule } from '@angular/common';\nimport { MaterialModule } from '../../../material.module';\nimport { ReactiveFormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [ActivityDialogComponent, ModelerComponent],\n exports: [ActivityDialogComponent, ModelerComponent],\n imports: [CommonModule, MaterialModule, ReactiveFormsModule],\n})\nexport class ModelerModule {}\n","import { Component, OnInit } from '@angular/core';\nimport { ModelerService } from '../../services/modeler.service';\n\n@Component({\n selector: 'app-modeler',\n templateUrl: './modeler.component.html',\n styleUrls: ['./modeler.component.scss'],\n})\nexport class ModelerComponent implements OnInit {\n constructor(private modelerService: ModelerService) {}\n\n ngOnInit(): void {\n this.modelerService.postInit();\n }\n}\n","
\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from '../../../domain/services/element-registry.service';\nimport { ElementTypes } from '../../../domain/entities/elementTypes';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { ActivityDialogData } from '../domain/activityDialogData';\nimport { ActivityDialogComponent } from '../presentation/activity-dialog/activity-dialog.component';\nimport { DialogService } from '../../../domain/services/dialog.service';\nimport { TitleService } from '../../title/services/title.service';\nimport { ActivityCanvasObject } from '../../../domain/entities/activityCanvasObject';\nimport { positionsMatch } from '../../../utils/mathExtensions';\nimport { CommandStackService } from '../../../domain/services/command-stack.service';\n\nimport { toggleStashUse } from '../bpmn/modeler/labeling/dsLabelEditingProvider';\nimport {\n getMultipleNumberRegistry,\n getNumberRegistry,\n setNumberIsMultiple,\n updateExistingNumbersAtEditing,\n} from '../bpmn/modeler/numbering/numbering';\nimport activityUpdateHandler from '../bpmn/modeler/updateHandler/activityUpdateHandlers';\n\nimport massRenameHandler from '../bpmn/modeler/updateHandler/massRenameHandler';\nimport elementUpdateHandler from '../bpmn/modeler/updateHandler/elementUpdateHandler';\nimport headlineAndDescriptionUpdateHandler from '../bpmn/modeler/updateHandler/headlineAndDescriptionUpdateHandler';\nimport { ReplayService } from '../../replay/services/replay.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class InitializerService {\n constructor(\n private elementRegistryService: ElementRegistryService,\n private replayService: ReplayService,\n private dialogService: DialogService,\n private commandStackService: CommandStackService,\n private titleService: TitleService,\n ) {}\n\n propagateDomainStoryModelerClassesToServices(\n commandStack: any,\n elementRegistry: any,\n canvas: any,\n selection: any,\n modeler: any,\n ): void {\n this.commandStackService.setCommandStack(commandStack);\n this.elementRegistryService.setElementRegistry(elementRegistry);\n }\n\n initializeDomainStoryModelerEventHandlers(\n commandStack: any,\n eventBus: any,\n ): void {\n activityUpdateHandler(commandStack, eventBus);\n massRenameHandler(commandStack, eventBus);\n elementUpdateHandler(commandStack, eventBus);\n headlineAndDescriptionUpdateHandler(commandStack, this.titleService);\n }\n\n initiateEventBusListeners(eventBus: any, commandStack: any): void {\n eventBus.on('element.dblclick', (e: any) => {\n if (!this.replayService.getReplayOn()) {\n const element = e.element;\n if (element.type === ElementTypes.ACTIVITY) {\n // override the doubleClickListener on activities\n this.activityDoubleClick(element, eventBus, commandStack);\n } else {\n const renderedNumberRegistry = getNumberRegistry();\n\n // add a DoubleClickListener to the number on activities\n if (renderedNumberRegistry.length > 1) {\n const allActivities =\n this.elementRegistryService.getActivitiesFromActors();\n\n if (allActivities.length > 0) {\n const htmlCanvas = document.getElementById('canvas');\n if (htmlCanvas) {\n const container =\n htmlCanvas.getElementsByClassName('djs-container');\n const svgElements = container[0].getElementsByTagName('svg');\n const outerSVGElement = svgElements[0];\n const viewport =\n outerSVGElement.getElementsByClassName('viewport')[0];\n let transform = viewport.getAttribute('transform');\n\n let transformX = 0;\n let transformY = 0;\n let zoomX = 1;\n let zoomY = 1;\n let nums;\n\n const clickX = e.originalEvent.offsetX;\n const clickY = e.originalEvent.offsetY;\n\n // adjust for zoom and panning\n if (transform) {\n transform = transform.replace('matrix(', '');\n transform.replace(')', '');\n nums = transform.split(',');\n zoomX = parseFloat(nums[0]);\n zoomY = parseFloat(nums[3]);\n transformX = parseInt(nums[4], undefined);\n transformY = parseInt(nums[5], undefined);\n }\n\n const width = 25 * zoomX;\n const height = 22 * zoomY;\n\n for (let i = 1; i < renderedNumberRegistry.length; i++) {\n const currentNum = renderedNumberRegistry[i];\n if (currentNum) {\n const tspan = currentNum.getElementsByTagName('tspan')[0];\n const tx = tspan.getAttribute('x');\n const ty = tspan.getAttribute('y');\n const tNumber = parseInt(tspan.innerHTML, undefined);\n\n const elementX = Math.floor(\n tx * zoomX + (transformX - 11 * zoomX),\n );\n const elementY = Math.floor(\n ty * zoomY + (transformY - 15 * zoomY),\n );\n\n allActivities.forEach((activity: ActivityCanvasObject) => {\n const activityNumber = activity.businessObject.number;\n if (activityNumber === tNumber) {\n if (\n positionsMatch(\n width,\n height,\n elementX,\n elementY,\n clickX,\n clickY,\n )\n ) {\n this.activityDoubleClick(\n activity,\n eventBus,\n commandStack,\n );\n }\n }\n });\n }\n }\n }\n }\n }\n }\n }\n });\n\n // when in replay, do not allow any interaction on the canvas\n eventBus.on(\n [\n 'element.click',\n 'element.dblclick',\n 'element.mousedown',\n 'drag.init',\n 'canvas.viewbox.changing',\n 'autoPlace',\n 'popupMenu.open',\n ],\n 10000000000,\n (event: any) => {\n if (this.replayService.getReplayOn()) {\n event.stopPropagation();\n event.preventDefault();\n }\n },\n );\n\n let pasteColor: string[] = [];\n let pasteText: string[] = [];\n let pasteHeight: number[] = [];\n eventBus.on('copyPaste.pasteElement', 10000, (e: any) => {\n pasteColor.push(e.descriptor.oldBusinessObject.pickedColor);\n if (\n e.descriptor.oldBusinessObject.type.includes(\n ElementTypes.TEXTANNOTATION,\n )\n ) {\n pasteText.push(e.descriptor.oldBusinessObject.text ?? '');\n pasteHeight.push(e.descriptor.oldBusinessObject.height);\n }\n });\n\n eventBus.on('create.end', (e: any) => {\n if (!pasteColor) {\n return;\n }\n for (let elementsKey in e.elements) {\n const element = e.elements[elementsKey];\n if (element.businessObject.type.includes(ElementTypes.TEXTANNOTATION)) {\n element.businessObject.text = pasteText[0];\n element.businessObject.number = pasteHeight[0];\n element.businessObject.height = pasteHeight[0];\n pasteText.shift();\n pasteHeight.shift();\n }\n element.businessObject.pickedColor = pasteColor[parseInt(elementsKey)];\n eventBus.fire('element.changed', { element });\n }\n pasteColor = [];\n pasteText = [];\n pasteHeight = [];\n });\n }\n\n /** Overrrides for Canvas Functions **/\n private activityDoubleClick(\n activity: ActivityCanvasObject,\n eventBus: any,\n commandStack: any,\n ): void {\n const source = activity.source;\n\n // ensure the right number when changing the direction of an activity\n toggleStashUse(false);\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n if (\n activity.businessObject.number &&\n source &&\n source.type.includes(ElementTypes.ACTOR)\n ) {\n config.data = new ActivityDialogData(\n activity,\n getMultipleNumberRegistry()[activity.businessObject.number],\n true,\n (data: any) =>\n this.saveActivityInputLabel(data, eventBus, commandStack),\n );\n } else if (source && source.type.includes(ElementTypes.WORKOBJECT)) {\n config.data = new ActivityDialogData(\n activity,\n false,\n false,\n (activityData: any) =>\n this.saveActivityInputLabel(activityData, eventBus, commandStack),\n );\n }\n this.dialogService.openDialog(ActivityDialogComponent, config);\n }\n\n private saveActivityInputLabel(\n activityData: any,\n eventBus: any,\n commandStack: any,\n ): void {\n const label = activityData.activityLabel;\n const hasNumber = activityData.activityNumber ?? false;\n const activityNumber = activityData.activityNumber;\n const multipleNumberAllowed = activityData.multipleNumbers ?? false;\n const element = activityData.activity;\n\n const activitiesFromActors =\n this.elementRegistryService.getActivitiesFromActors();\n const index = activitiesFromActors.indexOf(element);\n\n activitiesFromActors.splice(index, 1);\n if (hasNumber) {\n setNumberIsMultiple(activityNumber, multipleNumberAllowed);\n }\n element.businessObject.multipleNumberAllowed = multipleNumberAllowed;\n\n let options: any;\n if (hasNumber) {\n options = {\n businessObject: element.businessObject,\n newLabel: label,\n newNumber: activityNumber,\n element,\n };\n } else {\n options = {\n businessObject: element.businessObject,\n newLabel: label,\n element,\n };\n }\n\n commandStack.execute('activity.changed', options);\n if (element.businessObject.multipleNumberAllowed !== false) {\n if (getMultipleNumberRegistry()[activityNumber] === false) {\n updateExistingNumbersAtEditing(\n activitiesFromActors,\n activityNumber,\n eventBus,\n );\n }\n } else if (element.businessObject.multipleNumberAllowed === false) {\n updateExistingNumbersAtEditing(\n activitiesFromActors,\n activityNumber,\n eventBus,\n );\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { assign } from 'min-dash';\nimport DomainStoryModeler from 'src/app/tools/modeler/bpmn';\nimport { InitializerService } from './initializer.service';\nimport { ElementRegistryService } from '../../../domain/services/element-registry.service';\nimport { IconDictionaryService } from '../../icon-set-config/services/icon-dictionary.service';\nimport { IconSetConfigurationService } from '../../icon-set-config/services/icon-set-configuration.service';\nimport { BusinessObject } from '../../../domain/entities/businessObject';\nimport { ActivityBusinessObject } from '../../../domain/entities/activityBusinessObject';\nimport { updateMultipleNumberRegistry } from '../bpmn/modeler/numbering/numbering';\nimport { IconSetConfiguration } from '../../../domain/entities/icon-set-configuration';\nimport { StorageService } from '../../../domain/services/storage.service';\nimport {\n SNACKBAR_DURATION_LONGER,\n SNACKBAR_INFO,\n VERSION_KEY,\n} from '../../../domain/entities/constants';\nimport { environment } from '../../../../environments/environment';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ModelerService {\n constructor(\n private initializerService: InitializerService,\n private elementRegistryService: ElementRegistryService,\n private iconDictionaryService: IconDictionaryService,\n private iconSetConfigurationService: IconSetConfigurationService,\n private storageService: StorageService,\n private snackbar: MatSnackBar,\n ) {}\n\n private modeler: any;\n private canvas: any;\n private elementRegistry: any;\n private commandStack: any;\n private selection: any;\n private eventBus: any;\n\n private encoded: string | undefined;\n\n postInit(): void {\n this.checkCurrentVersion();\n\n const storedIconSetConfiguration =\n this.iconSetConfigurationService.getStoredIconSetConfiguration();\n if (storedIconSetConfiguration) {\n this.iconDictionaryService.setCustomConfiguration(\n storedIconSetConfiguration,\n );\n this.iconSetConfigurationService.loadConfiguration(\n storedIconSetConfiguration,\n );\n }\n this.modeler = new DomainStoryModeler({\n container: '#canvas',\n keyboard: {\n bindTo: document,\n },\n\n // Disable BPMN-SearchModule and re-enable browser Search\n additionalModules: [\n {\n bpmnSearch: ['value', 'foo'],\n },\n ],\n });\n\n if (this.modeler.get) {\n this.canvas = this.modeler.get('canvas');\n this.elementRegistry = this.modeler.get('elementRegistry');\n this.eventBus = this.modeler.get('eventBus');\n this.commandStack = this.modeler.get('commandStack');\n this.selection = this.modeler.get('selection');\n }\n\n this.initializerService.initializeDomainStoryModelerEventHandlers(\n this.commandStack,\n this.eventBus,\n );\n this.initializerService.propagateDomainStoryModelerClassesToServices(\n this.commandStack,\n this.elementRegistry,\n this.canvas,\n this.selection,\n this.modeler,\n );\n\n const exportArtifacts = this.debounce(this.saveSVG, 500);\n if (this.modeler.get) {\n this.modeler.on('commandStack.changed', exportArtifacts);\n }\n\n this.initializerService.initiateEventBusListeners(\n this.eventBus,\n this.commandStack,\n );\n\n this.modeler.createDiagram();\n // expose bpmnjs to window for debugging purposes\n assign(window, { bpmnjs: this.modeler });\n\n this.startDebounce();\n }\n\n private checkCurrentVersion() {\n const version = this.storageService.get(VERSION_KEY);\n if (version === null) {\n this.storageService.set(VERSION_KEY, environment.version);\n }\n\n if (version !== null && version !== environment.version) {\n this.snackbar\n .open(\n \"Egon was updated. Clear your browser's local storage.\",\n 'More information',\n {\n duration: SNACKBAR_DURATION_LONGER,\n panelClass: SNACKBAR_INFO,\n },\n )\n .onAction()\n .subscribe(() => {\n window.open('https://egon.io/howto#launching-egon');\n });\n }\n }\n\n restart(\n iconSetConfiguration?: IconSetConfiguration,\n domainStory?: BusinessObject[],\n ): void {\n const currentStory =\n domainStory != undefined\n ? domainStory\n : this.elementRegistryService\n .createObjectListForDSTDownload()\n .map((e) => e.businessObject);\n if (!iconSetConfiguration) {\n iconSetConfiguration =\n this.iconSetConfigurationService.getStoredIconSetConfiguration();\n }\n if (iconSetConfiguration) {\n this.iconSetConfigurationService.setStoredIconSetConfiguration(\n iconSetConfiguration,\n );\n this.iconDictionaryService.setCustomConfiguration(iconSetConfiguration);\n this.iconSetConfigurationService.loadConfiguration(iconSetConfiguration);\n }\n\n this.elementRegistryService.clear();\n this.modeler?.destroy();\n this.postInit();\n updateMultipleNumberRegistry(\n currentStory\n .filter((bo) => bo.type === 'domainStory:activity')\n .map((bo) => bo)\n .filter((bo) => bo.number !== null),\n );\n if (currentStory && this.modeler.get) {\n this.modeler.importCustomElements(currentStory);\n }\n }\n\n /** Interactions with the Modeler **/\n getModeler(): any {\n return this.modeler;\n }\n\n commandStackChanged(): void {\n // to update the title of the svg, we need to tell the command stack, that a value has changed\n this.eventBus.fire(\n 'commandStack.changed',\n this.debounce(this.saveSVG, 500),\n );\n }\n\n startDebounce(): void {\n this.debounce(this.saveSVG, 500);\n }\n\n debounce(fn: any, timeout: number): any {\n return () => {\n let timer;\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(() => {\n // tslint:disable-next-line:no-unused-expression\n fn(this.modeler).then((svg: string) => {\n this.encoded = svg;\n }) as Promise;\n }, timeout);\n };\n }\n\n getEncoded(): string {\n return this.encoded ? this.encoded : '';\n }\n\n async saveSVG(modeler: any): Promise {\n try {\n const result = await modeler.saveSVG();\n return result.svg;\n } catch (err) {\n alert('There was an error saving the SVG.\\n' + err);\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ModelerService } from 'src/app/tools/modeler/services/modeler.service';\nimport { BusinessObject } from 'src/app/domain/entities/businessObject';\nimport { ElementRegistryService } from 'src/app/domain/services/element-registry.service';\nimport { DirtyFlagService } from 'src/app/domain/services/dirty-flag.service';\nimport { IconSetConfiguration } from '../../../domain/entities/icon-set-configuration';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RendererService {\n constructor(\n private modelerService: ModelerService,\n private elementRegistryService: ElementRegistryService,\n private dirtyFlagService: DirtyFlagService,\n ) {}\n\n renderStory(domainStory: BusinessObject[]): void {\n this.modelerService.getModeler().importCustomElements(domainStory);\n }\n\n reset(): void {\n this.renderStory([]);\n this.dirtyFlagService.makeClean();\n }\n\n importStory(\n domainStory: BusinessObject[],\n configurationChange: boolean,\n config?: IconSetConfiguration,\n makeClean = true,\n ): void {\n this.modelerService.restart(config, domainStory);\n this.renderStory(domainStory);\n\n this.elementRegistryService.correctInitialize();\n\n this.modelerService.commandStackChanged();\n this.modelerService.startDebounce();\n\n if (makeClean) {\n this.dirtyFlagService.makeClean();\n }\n }\n\n getStory(): BusinessObject[] {\n return this.elementRegistryService\n .createObjectListForDSTDownload()\n .map((c) => c.businessObject);\n }\n}\n","export const NUMBER_BACKGROUND_COLOR = 'white';\nexport const NUMBER_COLOR = 'black';\nexport const STROKE_WIDTH = '1.5';\n\nexport const HIGHLIGHT_NUMBER_BACKGROUNG_COLOR = '#43acbf';\nexport const HIGHLIGHT_NUMBER_COLOR = 'black';\nexport const HIGHLIGHT_STROKE_WIDTH = '4';\n","import { Injectable } from '@angular/core';\nimport { BusinessObject } from 'src/app/domain/entities/businessObject';\nimport { ElementRegistryService } from 'src/app/domain/services/element-registry.service';\nimport { ElementTypes } from 'src/app/domain/entities/elementTypes';\nimport { StorySentence } from 'src/app/tools/replay/domain/storySentence';\nimport {\n HIGHLIGHT_NUMBER_BACKGROUNG_COLOR,\n HIGHLIGHT_NUMBER_COLOR,\n HIGHLIGHT_STROKE_WIDTH,\n NUMBER_BACKGROUND_COLOR,\n NUMBER_COLOR,\n STROKE_WIDTH,\n} from '../domain/replayConstants';\n\n@Injectable({\n providedIn: 'root',\n})\n/**\n * Manipulates the DOM during replay to only show the elements of the current Sentence\n */\nexport class DomManipulationService {\n constructor(private elementRegistryService: ElementRegistryService) {}\n\n showAll(): void {\n this.removeHighlights();\n this.elementRegistryService\n .getAllCanvasObjects()\n .slice()\n .concat(this.elementRegistryService.getAllGroups().slice())\n .map((e) => e.businessObject)\n .forEach((element) => {\n const domObject = document.querySelector(\n '[data-element-id=' + element.id + ']',\n );\n // @ts-ignore\n domObject.style.display = 'block';\n });\n }\n\n showSentence(\n replaySentence: StorySentence,\n previousSentence?: StorySentence,\n ): void {\n this.removeHighlights();\n const notShown = this.getAllNotShown(replaySentence.objects);\n\n notShown.forEach((element) => {\n const domObject = document.querySelector(\n '[data-element-id=' + element.id + ']',\n );\n if (domObject) {\n // @ts-ignore\n domObject.style.display = 'none';\n }\n });\n\n this.highlightSentence(\n previousSentence\n ? replaySentence.objects.filter(\n (o) => !previousSentence.objects.includes(o),\n )\n : replaySentence.objects,\n );\n\n replaySentence.objects.forEach((element) => {\n const domObject = document.querySelector(\n '[data-element-id=' + element.id + ']',\n );\n if (domObject) {\n // @ts-ignore\n domObject.style.display = 'block';\n }\n });\n }\n\n getNumberDomForActivity(activity: SVGPolylineElement): any {\n const numberText =\n activity.parentElement?.getElementsByClassName('djs-labelNumber')[0] ??\n '';\n const circle = (numberText as HTMLElement)?.previousSibling ?? '';\n return {\n numberBackgroundDom: circle,\n numberTextDom: numberText,\n };\n }\n\n private removeHighlights(): void {\n const allActivities = this.elementRegistryService.getAllActivities();\n const allConnections = this.elementRegistryService.getAllConnections();\n\n allActivities.forEach((activity) => {\n const querySelector = document.querySelector(\n '[data-element-id=' + activity.id + ']',\n );\n if (querySelector) {\n const activityDomObject =\n querySelector.getElementsByTagName('polyline')[0];\n\n activityDomObject.style.stroke =\n activity.businessObject.pickedColor || 'black';\n activityDomObject.style.strokeWidth = STROKE_WIDTH;\n\n const { numberBackgroundDom, numberTextDom } =\n this.getNumberDomForActivity(activityDomObject);\n if (numberBackgroundDom && numberTextDom) {\n numberBackgroundDom.style.fill = NUMBER_BACKGROUND_COLOR;\n numberTextDom.style.fill = NUMBER_COLOR;\n }\n }\n });\n\n allConnections.forEach((connection) => {\n // @ts-ignore\n const connectionDomObject = document\n .querySelector('[data-element-id=' + connection.id + ']')\n .getElementsByTagName('polyline')[0];\n\n connectionDomObject.style.stroke =\n connection.businessObject.pickedColor || 'black';\n connectionDomObject.style.strokeWidth = '1.5';\n });\n }\n\n private highlightSentence(sentenceObjects: BusinessObject[]): void {\n sentenceObjects\n .filter((e) => e.type === ElementTypes.ACTIVITY)\n .forEach((activity) => {\n const querySelector = document.querySelector(\n '[data-element-id=' + activity.id + ']',\n );\n if (querySelector) {\n const activityDomObject =\n querySelector.getElementsByTagName('polyline')[0];\n\n activityDomObject.style.strokeWidth = HIGHLIGHT_STROKE_WIDTH;\n\n const { numberBackgroundDom, numberTextDom } =\n this.getNumberDomForActivity(activityDomObject);\n if (numberTextDom && numberBackgroundDom) {\n numberBackgroundDom.style.fill = HIGHLIGHT_NUMBER_BACKGROUNG_COLOR;\n numberTextDom.style.fill = HIGHLIGHT_NUMBER_COLOR;\n }\n }\n });\n }\n\n private getAllNotShown(shownElements: BusinessObject[]): BusinessObject[] {\n const notShownElements: BusinessObject[] = [];\n const allObjects = this.elementRegistryService\n .getAllCanvasObjects()\n .concat(this.elementRegistryService.getAllGroups());\n\n allObjects.forEach((element) => {\n if (!shownElements.includes(element.businessObject)) {\n notShownElements.push(element.businessObject);\n }\n });\n return notShownElements;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DomManipulationService } from 'src/app/tools/replay/services/dom-manipulation.service';\nimport { StorySentence } from 'src/app/tools/replay/domain/storySentence';\nimport { StoryCreatorService } from './story-creator.service';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION_LONG,\n SNACKBAR_INFO,\n} from '../../../domain/entities/constants';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReplayService {\n private story: StorySentence[] = [];\n private currentSentence = new BehaviorSubject(-1);\n private maxSentenceNumber = new BehaviorSubject(0);\n private replayOnSubject = new BehaviorSubject(false);\n\n currentSentence$: Observable = this.currentSentence.asObservable();\n maxSentenceNumber$: Observable =\n this.maxSentenceNumber.asObservable();\n replayOn$ = this.replayOnSubject.asObservable();\n\n constructor(\n private domManipulationService: DomManipulationService,\n private storyCreatorService: StoryCreatorService,\n private snackbar: MatSnackBar,\n ) {}\n\n setReplayState(state: boolean): void {\n this.replayOnSubject.next(state);\n }\n\n getReplayOn(): boolean {\n return this.replayOnSubject.value;\n }\n\n isReplayable(): boolean {\n return this.storyCreatorService.traceActivitiesAndCreateStory().length > 0;\n }\n\n initializeReplay(story: StorySentence[]): void {\n this.currentSentence.next(1);\n this.story = story;\n this.maxSentenceNumber.next(this.story.length);\n }\n\n getCurrentSentenceNumber(): number {\n return this.currentSentence.value;\n }\n\n getMaxSentenceNumber(): number {\n return this.maxSentenceNumber.value;\n }\n\n nextSentence(): void {\n if (this.currentSentence.value < this.story.length) {\n this.currentSentence.next(this.currentSentence.value + 1);\n this.showCurrentSentence();\n }\n }\n\n previousSentence(): void {\n if (this.currentSentence.value > 1) {\n this.currentSentence.next(this.currentSentence.value - 1);\n this.showCurrentSentence();\n }\n }\n\n private showCurrentSentence() {\n this.domManipulationService.showSentence(\n this.story[this.currentSentence.value - 1],\n this.currentSentence.value > 1\n ? this.story[this.currentSentence.value - 2]\n : undefined,\n );\n }\n\n startReplay(checkSequenceNumbers = false): void {\n const story = this.storyCreatorService.traceActivitiesAndCreateStory();\n\n if (checkSequenceNumbers) {\n const missingSentences =\n this.storyCreatorService.getMissingSentences(story);\n if (missingSentences.length > 0) {\n const sentence = missingSentences.join(', ');\n this.snackbar.open(\n missingSentences.length === 1\n ? `The Domain Story is not complete. Sentence ${sentence} is missing.`\n : `The Domain Story is not complete. Sentences ${sentence} are missing.`,\n undefined,\n {\n duration: SNACKBAR_DURATION_LONG,\n panelClass: SNACKBAR_INFO,\n },\n );\n return;\n }\n }\n\n this.initializeReplay(story);\n if (this.story.length > 0) {\n this.setReplayState(true);\n this.domManipulationService.showSentence(\n this.story[this.currentSentence.getValue() - 1],\n );\n } else {\n this.snackbar.open('You need a Domain Story for replay.', undefined, {\n duration: SNACKBAR_DURATION_LONG,\n panelClass: SNACKBAR_INFO,\n });\n }\n }\n\n stopReplay(): void {\n this.currentSentence.next(-1);\n this.maxSentenceNumber.next(0);\n this.setReplayState(false);\n this.domManipulationService.showAll();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementTypes } from '../../../domain/entities/elementTypes';\nimport { ActivityCanvasObject } from '../../../domain/entities/activityCanvasObject';\nimport { BusinessObject } from '../../../domain/entities/businessObject';\nimport { CanvasObject } from '../../../domain/entities/canvasObject';\nimport { ElementRegistryService } from '../../../domain/services/element-registry.service';\nimport { StorySentence } from '../domain/storySentence';\nimport { Dictionary } from '../../../domain/entities/dictionary';\nimport { ActivityBusinessObject } from '../../../domain/entities/activityBusinessObject';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StoryCreatorService {\n constructor(private elementRegistryService: ElementRegistryService) {}\n\n traceActivitiesAndCreateStory(): StorySentence[] {\n const tracedActivityMap = new Dictionary();\n const story: StorySentence[] = [];\n const activities = this.elementRegistryService.getActivitiesFromActors();\n const tracedActivityMapKeys: number[] = [];\n activities.forEach((activity) => {\n const activityNumber = Number(activity.businessObject.number); // Sometimes the activityNumber is a string for some reason\n const tracedItem = tracedActivityMap.get(`${activityNumber}`) ?? [];\n if (!tracedActivityMapKeys.includes(activityNumber)) {\n tracedActivityMapKeys.push(activityNumber);\n }\n tracedItem.push(activity);\n tracedActivityMap.set(`${activityNumber}`, tracedItem);\n });\n\n let storyIndex = 0;\n tracedActivityMapKeys.forEach((key) => {\n this.createSentence(tracedActivityMap, key, story, storyIndex);\n storyIndex++;\n });\n\n this.addGroupsToLastSentence(story);\n return story;\n }\n\n private createSentence(\n tracedActivityMap: Dictionary,\n tracedActivityMapKey: number,\n story: StorySentence[],\n storyIndex: number,\n ): void {\n let tracedActivity = tracedActivityMap.get(`${tracedActivityMapKey}`) ?? [];\n const sentenceObjects = this.getSentenceObjects(tracedActivity);\n const highlightedElements = sentenceObjects.map((t) => t.id);\n if (storyIndex > 0) {\n story[storyIndex - 1].objects.forEach((object) => {\n if (!sentenceObjects.includes(object)) {\n sentenceObjects.push(object);\n }\n });\n }\n story[storyIndex] = {\n highlightedObjects: highlightedElements,\n objects: sentenceObjects,\n };\n }\n\n getMissingSentences(story: StorySentence[]): number[] {\n // if the story is empty, no sequence number is missing\n if (!story || story.length === 0) {\n return [];\n }\n\n // collect all sequence numbers of the story\n const allActivityNumbersFromActors: number[] = story.map((sentence) => {\n // find all activity numbers of the ActivityBusinessObject\n // and returned the highest one\n const allActivityNumbers = sentence.objects.map((businessObject) => {\n if (businessObject.type.includes('activity')) {\n const activity = businessObject as ActivityBusinessObject;\n return activity.number ?? 0;\n } else {\n return 0;\n }\n });\n return Math.max(...allActivityNumbers);\n });\n\n const highestSequenceNumber: number = Math.max(\n ...allActivityNumbersFromActors,\n );\n\n const missingSentences: number[] = [];\n // with a high sequence number like 1_000_000, this could be led\n // to long calculation or completely stop from Egon.io\n for (let i = 1; i <= highestSequenceNumber; i++) {\n if (!allActivityNumbersFromActors.includes(i)) {\n missingSentences.push(i);\n }\n }\n return missingSentences;\n }\n\n private getSentenceObjects(\n tracedActivity: ActivityCanvasObject[],\n ): BusinessObject[] {\n const initialSource: CanvasObject[] = [];\n const activities = tracedActivity;\n const targetObjects: CanvasObject[] = [];\n const actorTextAnnotations: CanvasObject[] = [];\n\n tracedActivity.forEach((parallelSentence: ActivityCanvasObject) => {\n initialSource.push(parallelSentence.source);\n\n const firstTarget = parallelSentence.target;\n targetObjects.push(firstTarget);\n\n // check the outgoing activities for each target\n for (const checkTarget of targetObjects) {\n if (\n checkTarget.businessObject &&\n !checkTarget.businessObject.type.includes('actor') &&\n checkTarget.outgoing\n ) {\n // check the target for each outgoing activity\n checkTarget.outgoing.forEach((activity: ActivityCanvasObject) => {\n activities.push(activity);\n const activityTarget = activity.target;\n if (activityTarget && !targetObjects.includes(activityTarget)) {\n targetObjects.push(activityTarget);\n }\n });\n }\n }\n });\n initialSource.forEach((actor) =>\n this.addTextAnnotationsForActorOrGroup(actor, actorTextAnnotations),\n );\n targetObjects.forEach((target) => {\n if (target.businessObject.type.includes(ElementTypes.ACTOR)) {\n this.addTextAnnotationsForActorOrGroup(target, actorTextAnnotations);\n }\n });\n\n return initialSource\n .map((e) => e.businessObject)\n .concat(activities.map((a) => a.businessObject))\n .concat(targetObjects.map((t) => t.businessObject))\n .concat(actorTextAnnotations.map((ta) => ta.businessObject));\n }\n\n private addTextAnnotationsForActorOrGroup(\n object: CanvasObject,\n objectTextAnnotations: CanvasObject[],\n ) {\n object.outgoing?.forEach((connection) => {\n // connections outgoing from actors or groups without number must be connections to text annotations\n if (!connection.businessObject.number) {\n objectTextAnnotations.push(connection);\n objectTextAnnotations.push(connection.target);\n }\n });\n }\n\n private addGroupsToLastSentence(story: StorySentence[]): void {\n const groups = this.elementRegistryService.getAllGroups() as CanvasObject[];\n const annotationsForGroups: CanvasObject[] = [];\n groups.forEach((group) =>\n this.addTextAnnotationsForActorOrGroup(group, annotationsForGroups),\n );\n if (groups.length > 0 && story.length > 0) {\n story[story.length - 1].objects = story[story.length - 1].objects\n .concat(groups.map((g) => g.businessObject))\n .concat(annotationsForGroups.map((a) => a.businessObject));\n }\n }\n}\n","import { FormControl, FormGroup } from '@angular/forms';\n\nexport interface TitleDialogForm {\n title: FormControl;\n description: FormControl;\n}\n\nexport namespace TitleDialogForm {\n export function create(\n titel: string,\n description: string,\n ): FormGroup {\n return new FormGroup({\n title: new FormControl(titel),\n description: new FormControl(description),\n });\n }\n}\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { FormGroup } from '@angular/forms';\nimport { TitleService } from 'src/app/tools/title/services/title.service';\nimport { TitleDialogForm } from '../../domain/title-dialog-form';\nimport { DirtyFlagService } from '../../../../domain/services/dirty-flag.service';\n\n@Component({\n selector: 'app-header-dialog',\n templateUrl: './title-dialog.component.html',\n styleUrls: ['./title-dialog.component.scss'],\n})\nexport class TitleDialogComponent implements OnInit {\n form!: FormGroup;\n\n constructor(\n private dialogRef: MatDialogRef,\n private titleService: TitleService,\n private dirtyFlagService: DirtyFlagService,\n ) {}\n\n ngOnInit(): void {\n const title = this.titleService.getTitle();\n const description = this.titleService.getDescription();\n\n this.form = TitleDialogForm.create(title, description);\n }\n\n save(): void {\n if (this.form.dirty) {\n this.dirtyFlagService.makeDirty();\n\n this.titleService.updateTitleAndDescription(\n this.form.getRawValue().title,\n this.form.getRawValue().description,\n true,\n );\n }\n this.dialogRef.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n preventDefault(event: Event) {\n event.preventDefault();\n }\n}\n","\n
\n \n Title\n \n \n
\n \n Description\n \n \n
\n
\n\n\n \n \n\n","import { NgModule } from '@angular/core';\nimport { TitleDialogComponent } from './title-dialog/title-dialog.component';\nimport { CommonModule } from '@angular/common';\nimport { MaterialModule } from '../../../material.module';\nimport { ReactiveFormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [TitleDialogComponent],\n exports: [TitleDialogComponent],\n imports: [CommonModule, MaterialModule, ReactiveFormsModule],\n})\nexport class TitleModule {}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { environment } from '../../../../environments/environment';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_ICON_SET_NAME,\n INITIAL_TITLE,\n} from '../../../domain/entities/constants';\nimport { CommandStackService } from '../../../domain/services/command-stack.service';\nimport { DialogService } from '../../../domain/services/dialog.service';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { TitleDialogComponent } from '../presentation/title-dialog/title-dialog.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TitleService {\n private titleSubject = new BehaviorSubject(INITIAL_TITLE);\n private descriptionSubject = new BehaviorSubject(INITIAL_DESCRIPTION);\n private iconSetNameSubject = new BehaviorSubject(\n INITIAL_ICON_SET_NAME,\n );\n private showDescriptionSubject = new BehaviorSubject(true);\n\n title$ = this.titleSubject.asObservable();\n description$ = this.descriptionSubject.asObservable();\n showDescription$ = this.showDescriptionSubject.asObservable();\n iconSetName$ = this.iconSetNameSubject.asObservable();\n\n constructor(\n private commandStackService: CommandStackService,\n private dialogService: DialogService,\n ) {}\n\n openHeaderDialog(): void {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n this.dialogService.openDialog(TitleDialogComponent, config);\n }\n\n updateTitleAndDescription(\n title: string | null,\n description: string | null,\n allowUndo: boolean,\n ): void {\n if (allowUndo) {\n this.fireTitleAndDescriptionUpdate(title, description);\n } else {\n this.updateTitle(title);\n this.updateDescription(description);\n }\n }\n\n reset(): void {\n this.updateTitleAndDescription(INITIAL_TITLE, INITIAL_DESCRIPTION, false);\n }\n\n private updateTitle(inputTitle: string | null): void {\n const title =\n !inputTitle || inputTitle.trim().length === 0\n ? INITIAL_TITLE\n : inputTitle;\n\n this.titleSubject.next(title);\n document.title = title === INITIAL_TITLE ? 'egon.io' : title;\n }\n\n private updateDescription(description: string | null): void {\n this.descriptionSubject.next(description ?? this.descriptionSubject.value);\n }\n\n setShowDescription(show: boolean): void {\n this.showDescriptionSubject.next(show);\n }\n\n setIconSetName(name: string): void {\n this.iconSetNameSubject.next(name);\n }\n\n getTitle(): string {\n return this.titleSubject.value;\n }\n\n getDescription(): string {\n return this.descriptionSubject.value;\n }\n\n getIconSetName(): string {\n return this.iconSetNameSubject.value;\n }\n\n getVersion(): string {\n return environment.version;\n }\n\n hasTitleOrDescription(): boolean {\n return (\n (this.getTitle().trim().length > 0 &&\n this.getTitle() !== INITIAL_TITLE) ||\n (this.getDescription().trim().length > 0 &&\n this.getDescription() !== INITIAL_DESCRIPTION)\n );\n }\n\n private fireTitleAndDescriptionUpdate(\n newTitle: string | null,\n newDescription: string | null,\n ): void {\n const context = {\n newTitle,\n newDescription,\n };\n this.commandStackService.execute(\n 'story.updateHeadlineAndDescription',\n context,\n );\n }\n}\n","export function rgbaToHex(rgba: string) {\n const [r, g, b, a] = rgba.match(/\\d+(\\.\\d+)?/g)!.map((it) => +it);\n const red = r.toString(16).padStart(2, '0');\n const green = g.toString(16).padStart(2, '0');\n const blue = b.toString(16).padStart(2, '0');\n const alpha = Math.round(a * 255)\n .toString(16)\n .padStart(2, '0');\n return `#${red}${green}${blue}${alpha}`;\n}\n\nconst isValidHex = (hex: string) => /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);\nconst getChunksFromString = (st: string, chunkSize: number) =>\n st.match(new RegExp(`.{${chunkSize}}`, 'g')) ?? [];\nconst convertHexUnitTo256 = (hexStr: string) =>\n parseInt(hexStr.repeat(2 / hexStr.length), 16);\nconst getAlphafloat = (a: number | undefined) => {\n if (typeof a !== 'undefined') {\n return Math.round((a / 255 + Number.EPSILON) * 100) / 100; // Runden auf 2 oder weniger Nachkommastellen\n }\n return 1;\n};\n\nexport const isHexWithAlpha = (hex: string | null | undefined) =>\n hex?.startsWith('#') && (hex?.length === 5 || hex?.length === 9);\n\nexport const hexToRGBA = (hex: string) => {\n if (!isValidHex(hex)) {\n throw new Error('Invalid HEX');\n }\n const chunkSize = Math.floor((hex.length - 1) / 3); // 1 falls hex 3-4 Stellen, 2 falls hex 6 oder 8 Stellen\n const hexArr = getChunksFromString(hex.slice(1), chunkSize);\n const [r, g, b, a] = hexArr.map(convertHexUnitTo256);\n return `rgba(${r},${g},${b},${getAlphafloat(a)})`;\n};\n","'use strict';\n\n// convert rad to deg\nexport function degrees(radians: number): number {\n return (radians * 180) / Math.PI;\n}\n\n// calculate the angle between two points in 2D\nexport function angleBetween(\n startPoint: Point,\n endPoint: Point,\n): number | undefined {\n let quadrant;\n\n // determine in which quadrant we are\n if (startPoint.x <= endPoint.x) {\n if (startPoint.y >= endPoint.y) {\n quadrant = 0;\n } // upper right quadrant\n else {\n quadrant = 3;\n } // lower right quadrant\n } else {\n if (startPoint.y >= endPoint.y) {\n quadrant = 1;\n } // upper left Quadrant\n else {\n quadrant = 2;\n } // lower left quadrant\n }\n\n const adjacent = Math.abs(startPoint.y - endPoint.y);\n const opposite = Math.abs(startPoint.x - endPoint.x);\n\n // since the arcus-tangens only gives values between 0 and 90, we have to adjust for the quadrant we are in\n\n if (quadrant === 0) {\n return 90 - degrees(Math.atan2(opposite, adjacent));\n }\n if (quadrant === 1) {\n return 90 + degrees(Math.atan2(opposite, adjacent));\n }\n if (quadrant === 2) {\n return 270 - degrees(Math.atan2(opposite, adjacent));\n }\n if (quadrant === 3) {\n return 270 + degrees(Math.atan2(opposite, adjacent));\n }\n return undefined;\n}\n\nexport function positionsMatch(\n width: number,\n height: number,\n elementX: number,\n elementY: number,\n clickX: number,\n clickY: number,\n): boolean {\n if (clickX > elementX && clickX < elementX + width) {\n if (clickY > elementY && clickY < elementY + height) {\n return true;\n }\n }\n return false;\n}\n\nexport class Point {\n y = 0;\n x = 0;\n}\n","'use strict';\n\n// sanitize user-Input to be Desktop-Filename safe\nexport function sanitizeForDesktop(str: string): string {\n const map: { [key: string]: string } = {\n '/': '',\n '\\\\': '',\n ':': '',\n '*': '',\n '?': '',\n '\"': '',\n '<': '',\n '>': '',\n '|': '',\n };\n const reg = /[/\\\\:*?\"<>|]/gi;\n return str ? str.replace(reg, (match) => map[match]) : '';\n}\n\nexport function sanitizeIconName(name: string): string {\n if (!name) {\n return '';\n }\n let nameWithoutFileEnding =\n name.lastIndexOf('.') > 0 ? name.substring(0, name.lastIndexOf('.')) : name;\n const map: { [key: string]: string } = {\n '/': '',\n '\\\\': '',\n ':': '',\n '*': '',\n '?': '',\n '\"': '',\n '<': '',\n '>': '',\n '|': '',\n '(': '',\n ')': '',\n ' ': '-',\n };\n const reg = /[/\\\\:*?\"<>|() ]/gi;\n return nameWithoutFileEnding.trim().replace(reg, (match) => map[match]);\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\n\n@Component({\n selector: 'app-header-buttons',\n templateUrl: './header-buttons.component.html',\n styleUrls: ['./header-buttons.component.scss'],\n})\nexport class HeaderButtonsComponent {\n @Input()\n hasDomainStory = false;\n @Input()\n hasTitle = false;\n @Input()\n isReplaying: boolean | null = false;\n @Input()\n isDirty: boolean | null = false;\n @Input()\n isReplayable = false;\n\n @Output()\n import = new EventEmitter();\n @Output()\n openSettings = new EventEmitter();\n @Output()\n startReplay = new EventEmitter();\n @Output()\n stopReplay = new EventEmitter();\n @Output()\n previousSentence = new EventEmitter();\n @Output()\n nextSentence = new EventEmitter();\n @Output()\n newStory = new EventEmitter();\n @Output()\n showKeyboardShortCuts = new EventEmitter();\n @Output()\n openLabelDictionary = new EventEmitter();\n @Output()\n openDownloadDialog = new EventEmitter();\n @Output()\n openUploadUrlDialog = new EventEmitter();\n}\n","@if (!isReplaying) {\n
\n \n play_arrow \n \n\n \n unarchive \n \n\n \n cloud_upload \n \n\n \n \n @if (!isDirty) {\n \n archive\n \n }\n @if (isDirty) {\n archive \n }\n \n \n \n spellcheck\n \n \n \n \n keyboard \n \n \n note_add \n \n
\n}\n@if (isReplaying) {\n
\n \n skip_previous \n \n \n skip_next \n \n \n stop \n \n
\n}\n","import { Component } from '@angular/core';\nimport { combineLatest, map, Observable } from 'rxjs';\nimport { TitleService } from '../../../../tools/title/services/title.service';\nimport { ReplayService } from '../../../../tools/replay/services/replay.service';\nimport { ImportDomainStoryService } from '../../../../tools/import/services/import-domain-story.service';\nimport { SettingsService } from '../../../services/settings/settings.service';\nimport { RendererService } from '../../../../tools/modeler/services/renderer.service';\nimport { DirtyFlagService } from '../../../../domain/services/dirty-flag.service';\nimport { DialogService } from '../../../../domain/services/dialog.service';\nimport { ExportService } from '../../../../tools/export/services/export.service';\nimport { LabelDictionaryService } from '../../../../tools/label-dictionary/services/label-dictionary.service';\n\n@Component({\n selector: 'app-header',\n templateUrl: './header.component.html',\n styleUrls: ['./header.component.scss'],\n})\nexport class HeaderComponent {\n title$ = this.titleService.title$;\n description$ = this.titleService.description$;\n showDescription$ = this.titleService.showDescription$;\n\n isReplay$: Observable;\n isDirty$: Observable;\n sentenceDescription$: Observable;\n showDescription: Observable;\n\n constructor(\n private titleService: TitleService,\n private replayService: ReplayService,\n private importService: ImportDomainStoryService,\n private settingsService: SettingsService,\n private renderService: RendererService,\n private dirtyFlagService: DirtyFlagService,\n private dialogService: DialogService,\n private exportService: ExportService,\n private labelDictionaryService: LabelDictionaryService,\n ) {\n this.isReplay$ = this.replayService.replayOn$;\n this.isDirty$ = this.dirtyFlagService.dirty$;\n\n this.sentenceDescription$ = combineLatest([\n this.replayService.currentSentence$,\n this.replayService.maxSentenceNumber$,\n ]).pipe(map(([sentence, count]) => `${sentence}/${count}`));\n\n this.showDescription = this.titleService.showDescription$;\n }\n\n openHeaderDialog(): void {\n this.titleService.openHeaderDialog();\n }\n\n openSettings(): void {\n this.settingsService.open();\n }\n\n setShowDescription(show: boolean): void {\n this.titleService.setShowDescription(show);\n }\n\n createNewDomainStory(): void {\n this.titleService.reset();\n this.renderService.reset();\n }\n\n onImport(): void {\n this.importService.performImport();\n }\n\n startReplay(): void {\n this.replayService.startReplay(true);\n }\n\n stopReplay(): void {\n this.replayService.stopReplay();\n }\n\n previousSentence(): void {\n this.replayService.previousSentence();\n }\n\n nextSentence(): void {\n this.replayService.nextSentence();\n }\n\n openKeyboardShortcutsDialog(): void {\n this.dialogService.openKeyboardShortcutsDialog();\n }\n\n openLabelDictionary(): void {\n this.labelDictionaryService.openLabelDictionary();\n }\n\n openDownloadDialog(): void {\n this.exportService.openDownloadDialog();\n }\n\n openUploadUrlDialog(): void {\n this.importService.openUploadUrlDialog();\n }\n\n get hasDomainStory() {\n return this.exportService.isDomainStoryExportable();\n }\n\n get hasTitle(): boolean {\n return this.titleService.hasTitleOrDescription();\n }\n\n get isReplayable() {\n return this.replayService.isReplayable();\n }\n}\n","\n \n @if (showDescription | async) {\n \n \n expand_less\n \n \n }\n @if (!(showDescription | async)) {\n \n \n expand_more\n \n }\n
\n \n {{ title$ | async }}\n edit \n \n
\n\n \n\n @if (isReplay$ | async) {\n \n Sentence: {{ sentenceDescription$ | async }}\n }\n\n \n \n
\n
\n@if (showDescription$ | async) {\n \n {{ description$ | async }}\n \n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-general-settings',\n templateUrl: './general-settings.component.html',\n styleUrls: ['./general-settings.component.scss'],\n})\nexport class GeneralSettingsComponent {}\n","
\n \n
\n","import { Component } from '@angular/core';\nimport { SettingsService } from 'src/app/workbench/services/settings/settings.service';\nimport { ModelerService } from 'src/app/tools/modeler/services/modeler.service';\nimport { BehaviorSubject } from 'rxjs';\nimport { IconSetCustomizationService } from '../../../tools/icon-set-config/services/icon-set-customization.service';\nimport { IconSetConfiguration } from '../../../domain/entities/icon-set-configuration';\n\n@Component({\n selector: 'app-settings',\n templateUrl: './settings.component.html',\n styleUrls: ['./settings.component.scss'],\n})\nexport class SettingsComponent {\n iconSetConfiguration: IconSetConfiguration | undefined;\n showGeneralSettings = new BehaviorSubject(false);\n showIconSetCustomization = new BehaviorSubject(true);\n\n constructor(\n private settingsService: SettingsService,\n private modelerService: ModelerService,\n private iconSetCustomizationService: IconSetCustomizationService,\n ) {}\n\n close(): void {\n const savedConfiguration =\n this.iconSetCustomizationService.getAndClearSavedConfiguration();\n if (savedConfiguration) {\n this.modelerService.restart(savedConfiguration);\n }\n this.settingsService.close();\n }\n\n openGeneralSettings() {\n this.showGeneralSettings.next(true);\n this.showIconSetCustomization.next(false);\n }\n\n openIconSetCustomization() {\n this.showGeneralSettings.next(false);\n this.showIconSetCustomization.next(true);\n }\n}\n","
\n \n \n \n
\n \n Customize Icons for Your Domain\n \n \n General Settings\n \n
\n
\n
\n\n @if (showGeneralSettings | async) {\n \n }\n @if (showIconSetCustomization | async) {\n \n }\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MaterialModule } from '../../material.module';\nimport { HeaderComponent } from './header/header/header.component';\nimport { HeaderButtonsComponent } from './header/header-buttons/header-buttons.component';\nimport { GeneralSettingsComponent } from './settings/general/general-settings.component';\nimport { SettingsComponent } from './settings/settings.component';\nimport { IconSetConfigModule } from '../../tools/icon-set-config/presentation/icon-set-config.module';\nimport { AutosaveModule } from '../../tools/autosave/presentation/autosave.module';\n\n@NgModule({\n declarations: [\n HeaderComponent,\n HeaderButtonsComponent,\n GeneralSettingsComponent,\n SettingsComponent,\n ],\n exports: [\n HeaderComponent,\n HeaderButtonsComponent,\n GeneralSettingsComponent,\n SettingsComponent,\n ],\n imports: [\n CommonModule,\n FormsModule,\n MaterialModule,\n IconSetConfigModule,\n AutosaveModule,\n ],\n})\nexport class WorkbenchModule {}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SettingsService {\n private showSettings = new BehaviorSubject(false);\n showSettings$ = this.showSettings.asObservable();\n\n close(): void {\n this.showSettings.next(false);\n }\n\n open(): void {\n this.showSettings.next(true);\n }\n}\n","// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build --configuration production` replaces `environment.ts` with `environment.prod.ts`.\n// The list of file replacements can be found in `angular.json`.\n\nexport const environment = {\n production: false,\n version: '2.1.0-dev',\n};\n\n/*\n * For easier debugging in development mode, you can import the following file\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\n *\n * This import should be commented out in production mode because it will have a negative impact\n * on performance if an error is thrown.\n */\n// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.\n","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic()\n .bootstrapModule(AppModule)\n .catch((err) => console.error(err));\n"],"names":["SVG_LINK","TEXTSPAN_DESCRIPTION_HEIGHT","TEXTSPAN_TITLE_HEIGHT","X_OFFSET_UTIL","dynamicHeightOffset","createTitleAndDescriptionSVGElement","initDynamicHeightOffset","title","description","min_x","min_y","width","replace","titleElement","createTitle","descriptionElement","createDescription","insertText","text","tempCanvas","document","createElement","ctx","getContext","font","createTextSpans","descriptionParts","split","i","length","yOffset","heightOffset","fontSize","textSpans","words","removeLeadingEmptyStrings","textTag","textSpan","createElementNS","textNode","createTextNode","setAttribute","appendChild","j","firstChild","data","len","measureText","slice","outerHTML","stringArray","firstNonEmptyIndex","findIndex","string","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","y","height","name","replaceShape","replaceOptions","ReplaceMenuProvider","_dsReplace","$inject","getEntries","entries","includes","ACTOR","actorReplaceOptions","WORKOBJECT","workObjectReplaceOptions","_createEntries","menuEntries","self","definition","entry","_createMenuEntry","action","replaceAction","label","className","actionName","iconDictionaryService","initializeReplaceOptions","iconDictionary","actorTypes","getTypeDictionary","replaceOption","keysArray","actorType","typeName","toLowerCase","getIconForBPMN","workObjectTypes","workObjectType","ContextPadProvider","bind","generateAutomaticNumber","getAllStandardIconKeys","hexToRGBA","isHexWithAlpha","rgbaToHex","dirtyFlagService","initializeContextPadProvider","dirtyFlag","DomainStoryContextPadProvider","injector","connect","translate","contextPad","popupMenu","replaceMenuProvider","commandStack","eventBus","startConnect","selectedElement","invoke","cached","getContextPadEntries","addEventListener","event","executeCommandStack","registerProvider","pickedColor","dispatchEvent","CustomEvent","detail","color","allStandardIconKeys","actions","autoActivate","start","addColorChange","addConnectWithActivity","addTextAnnotation","addActors","appendAction","addWorkObjects","addChangeWorkObjectTypeMenu","addChangeActorTypeMenu","delete","deleteGroup","group","click","removeGroup","makeDirty","moveDeleteActionToEndOfArray","removeElements","TEXTANNOTATION","changeDirection","position","getReplaceMenuPosition","cursor","open","colorChange","dragstart","icon","context","newNumber","execute","Y_OFFSET","diagramContainer","getContainer","pad","getPad","html","diagramRect","getBoundingClientRect","padRect","top","left","appendStart","shape","createShape","hints","getSelectedBusinessObject","oldColor","newColor","selectedBusinessObject","BpmnElementFactory","DEFAULT_LABEL_SIZE","DomainStoryIdFactory","DomainStoryElementFactory","bpmnFactory","moddle","domainStoryIdFactory","elementType","attrs","baseCreate","test","registerId","getId","key","set","value","$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","isCustomIcon","isCustomSvgIcon","RENDERER_IDS","numbers","DEFAULT_COLOR","_iconDictionaryService","_elementRegistryService","_dirtyFlagService","initializeRenderer","elementRegistryService","DomainStoryRenderer","styles","textRenderer","pathMap","rendererId","next","markers","computeStyle","generateActivityNumber","parentGfx","box","numberStash","semantic","use","number","newRenderedNumber","renderNumber","numberStyle","fitBox","style","getExternalStyle","fill","backgroundBoxStyle","fontFamily","backgroundDotStyle","renderEmbeddedLabel","align","padding","renderLabel","renderExternalLabel","waypoints","lines","startPoint","selected","endPoint","angle","alignment","boxWidth","xStart","abs","textAlign","wordWrap","overflowWrap","hyphens","renderExternalNumber","String","createText","add","setCoordinates","circle","radius","d","stroke","innerHTML","manipulateInnerHTMLXLabel","manipulateInnerHTMLYLabel","attributes","nodeValue","offset","result","Number","drawGroup","rect","drawRect","applyColorToCustomSvgIcon","iconSvg","rest","base64Svg","svg","atob","coloredSvg","applyColorToIcon","encodedColoredSvg","btoa","match","some","it","replaceAll","index","indexOf","substring","getIconSvg","dataURL","drawActor","svgDynamicSizeAttributes","iconSRC","getTypeIconSRC","getIconId","actor","drawWorkObject","workObject","useColorForActivity","strokeWidth","strokeLinejoin","markerEnd","marker","drawActivity","p","adjustForTextOverlap","fixConnectionInHTML","parentElement","checkIfPointOverlapsText","point","lineOffset","getLineOffset","objects","getElementsByClassName","data_id","item","getAttribute","object","getElementsByTagName","tspans","tspan","wantedConnection","polylines","drawDSConnection","strokeDasharray","drawAnnotation","textElement","textPathData","getScaledPath","xScaleFactor","yScaleFactor","containerWidth","containerHeight","mx","my","drawPath","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","startsWith","search","pos","correctInitialize","getShapePath","drawConnection","every","reduce","RuleProvider","is","HIGH_PRIORITY","MIN_SIZE","isDomainStory","isDomainStoryGroup","isActor","isWorkObject","isActivity","isAnnotation","canConnect","canResize","newBounds","lowerLeft","lowerRight","upperRight","canAttach","Array","canConnectToAnnotation","DomainStoryRules","init","canCreate","addRule","host","s","undefined","hover","pick","CommandInterceptor","collectionAdd","remove","collectionRemove","reworkGroupElements","DomainStoryUpdater","bpmnjs","updateCustomElement","e","DOMAINSTORY","updateCustomConnection","newTarget","newSource","copyWaypoints","executed","ifDomainStoryElement","reverted","fn","DomainStoryPalette","ElementFactory","CreateModule","PathMap","PopupMenuModule","ContextPadModule","CommandStack","UpdateLabelHandler","headlineAndDescriptionUpdateHandler","DSModeling","__depends__","__init__","domainStoryRenderer","paletteProvider","domainStoryRules","domainStoryUpdater","contextPadProvider","elementFactoryBpmn","updateLabelHandler","svgRemove","MARKER_HIDDEN","MARKER_LABEL_HIDDEN","DSLabelEditingPreview","defaultLayer","getDefaultLayer","absoluteElementBBox","gfx","on","activeProvider","active","getAbsoluteBBox","getStrokeColor","labelTarget","dy","newElementHeight","max","removeMarker","autocomplete","getLabel","dictionaryService","stashUse","initializeLabelEditingProvider","labelingDictionary","toggleStashUse","focusElement","setTimeout","focus","DSLabelEditingProvider","directEditing","resizeHandles","_canvas","_textRenderer","_updateLabelHandler","activateDirectEdit","complete","isActive","cancel","removeResizers","createAutocomplete","canExecute","isTouch","editingBox","force","activate","getUniqueWorkObjectNames","bounds","getEditingBBox","resizable","autoResize","bbox","zoom","defaultStyle","getDefaultStyle","defaultFontSize","defaultLineHeight","lineHeight","fontWeight","minWidth","maxWidth","minHeight","paddingTop","paddingBottom","paddingLeft","paddingRight","update","newLabel","activeContextText","updateLabel","getLabelAttr","getNumberAttr","getNumber","setLabel","setNumber","textNumber","selectPartOfActivity","angleActivity","selectedActivity","linelength","fontsize","input","workObjectNames","closeAllLists","currentFocus","filteredWorkObjectNames","autocompleteList","autocompleteItem","val","parentNode","toUpperCase","visibility","onkeydown","getElementById","keyCode","addActive","preventDefault","removeActive","classList","survivor","removeChild","ChangeSupportModule","DirectEditingModule","dSlabelEditingProvider","dSlabelEditingPreview","str","amountWaypoints","determinedPosition","xPos","yPos","labelPositionX","labelPositionY","offsetX","scaledAngle","offsetY","Modeling","_commandStack","updateNumber","oldShape","newShape","newData","numberRegistry","multipleNumberRegistry","canvasElementRegistry","initializeNumbering","canvasElementRegistryService","updateMultipleNumberRegistry","activityBusinessObjects","activity","multipleNumberAllowed","boxHeight","fixedOffsetX","fixedOffsetY","angleDependantOffsetX","angleDependantOffsetY","elementActivity","usedNumbers","wantedNumber","activitiesFromActors","getActivitiesFromActors","updateExistingNumbersAtGeneration","updateExistingNumbersAtEditing","sortedActivities","oldMultipleNumberRegistry","currentNumber","setNumberOfActivity","getNumbersAndIDs","iDWithNumber","activities","renderedNumber","setNumberIsMultiple","multi","getNumberRegistry","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","splice","undoGroupRework","elementUpdateHandler","element_colorChange","removeGroupWithoutChildren","child","titleService","handlerFunction","oldTitle","getTitle","oldDescription","getDescription","updateTitleAndDescription","newTitle","newDescription","DSMassRenameHandler","massRename","relevantElements","confirm","newValue","getExternalLabelMid","isLabelExternal","hasExternalLabel","isLabel","getBusinessObject","NULL_DIMENSIONS","labelCenter","createLabel","setText","postExecute","trim","removeShape","bo","getLayoutedBounds","resizeShape","numberTarget","innerShape","superParent","svgShape","querySelector","svgGroup","svgGroupParent","BehaviorSubject","environment","ColorPickerDirective","BLACK","BLUE","CYAN","DARK_PINK","GREEN","GREY","LIGHT_PINK","LIME","ORANGE","PURPLE","RED","SNACKBAR_DURATION_LONG","SNACKBAR_INFO","YELLOW","i0","ɵɵelement","AppComponent","constructor","settingsService","exportService","autosaveService","cd","snackbar","replayService","version","skipNextColorUpdate","colorBox","showSettings$","showDescription$","ctrlKey","stopPropagation","isDomainStoryExportable","downloadDST","getReplayOn","nextSentence","previousSentence","colorPicker","closeDialog","customEvent","openDialog","duration","panelClass","ngOnInit","onColorChanged","ngAfterViewInit","loadLatestDraft","detectChanges","_","ɵɵdirectiveInject","i1","SettingsService","i2","TitleService","i3","ExportService","i4","AutosaveService","ChangeDetectorRef","i5","MatSnackBar","i6","ReplayService","_2","selectors","viewQuery","AppComponent_Query","rf","ɵɵelementStart","ɵɵtwoWayListener","AppComponent_Template_input_colorPickerChange_1_listener","$event","ɵɵtwoWayBindingSet","ɵɵlistener","AppComponent_Template_input_colorPickerClose_1_listener","ɵɵelementEnd","ɵɵtemplate","AppComponent_Conditional_2_Template","ɵɵtext","ɵɵadvance","ɵɵstyleProp","ɵɵproperty","ɵɵtwoWayProperty","ɵɵconditional","ɵɵpipeBind1","ɵɵclassProp","ɵɵtextInterpolate","APP_INITIALIZER","BrowserModule","MAT_CHECKBOX_DEFAULT_OPTIONS","NoopAnimationsModule","ImportDomainStoryService","LabelDictionaryService","ElementRegistryService","IconSetConfigurationService","UntypedFormBuilder","IconDictionaryService","MaterialModule","ColorPickerModule","DirtyFlagService","IconSetChangedService","WorkbenchModule","DomainModule","AutosaveModule","ExportModule","IconSetConfigModule","ImportModule","LabelDictionaryModule","ModelerModule","TitleModule","AppModule","ngDoBootstrap","app","componentElement","body","bootstrap","ɵɵinject","_3","provide","useValue","clickAction","useFactory","initialize","deps","useExisting","imports","declarations","labelDictionaryService","Configuration","INITIAL_TITLE","INITIAL_DESCRIPTION","INITIAL_ICON_SET_NAME","ICON_SET_CONFIGURATION_TAG","VERSION_KEY","DEFAULT_AUTOSAVES_ENABLED","DEFAULT_AUTOSAVES_MAX_DRAFTS","DEFAULT_AUTOSAVES_INTERVAL","SNACKBAR_DURATION","SNACKBAR_DURATION_LONGER","SNACKBAR_SUCCESS","SNACKBAR_ERROR","IMPLICIT_ROOT_ID","all","size","isEmpty","Entry","addEach","clear","filter","found","InfoDialogData","infoText","isInfo","isLink","linkText","InfoDialogComponent","CommonModule","exports","MAT_DIALOG_DATA","ɵɵtextInterpolate1","ctx_r0","ɵɵpropertyInterpolate","ɵɵsanitizeUrl","InfoDialogComponent_Conditional_5_Template_button_click_1_listener","ɵɵrestoreView","_r2","ɵɵnextContext","ɵɵresetView","close","dialogRef","showConfirmButton","hasLink","span","scrollHeight","MatDialogRef","decls","vars","consts","template","InfoDialogComponent_Template","InfoDialogComponent_Conditional_3_Template","InfoDialogComponent_Conditional_4_Template","InfoDialogComponent_Conditional_5_Template","CommandStackService","setCommandStack","payload","factory","ɵfac","providedIn","MatDialogConfig","DialogService","matDialog","dialog","openKeyboardShortcutsDialog","shortCutText","disableClose","autoFocus","MatDialog","isDirtySubject","dirty$","asObservable","makeClean","dirty","fullyInitialized","registry","__implicitroot","setElementRegistry","_elements","createObjectListForDSTDownload","allObjectsFromCanvas","getAllCanvasObjects","getAllGroups","objectList","fillListOfCanvasObjects","canvasElement","unshift","getAllActivities","getAllConnections","allObjects","groupObjects","checkChildForGroup","currentGroup","pop","registryElementNames","sort","activityCanvasA","activityCanvasB","activityNumberA","activityNumberB","getUsedIcons","getAllActors","workobjects","getAllWorkobjects","a","w","co","StorageService","setItem","stringify","json","MatDialogModule","MatFormFieldModule","MatInputModule","MatToolbarModule","MatExpansionModule","MatCardModule","MatSnackBarModule","MatButtonModule","MatGridListModule","MatButtonToggleModule","MatListModule","MatCheckboxModule","AutosaveOptionsComponent_Conditional_0_Template_button_click_20_listener","_r1","activated_r2","ɵɵreference","interval_r3","drafts_r4","ctx_r4","save","checked","configuration_r6","activated","interval","maxDrafts","AutosaveOptionsComponent","autosaveConfiguration","setConfiguration","AutosaveConfigurationService","AutosaveOptionsComponent_Template","AutosaveOptionsComponent_Conditional_0_Template","tmp_0_0","configuration$","AutosaveSettingsComponent","AutosaveSettingsComponent_Template","AutosavedDraftsComponent_Conditional_7_For_2_Template_button_click_6_listener","draft_r3","$implicit","ctx_r3","loadDraft","date","ɵɵrepeaterCreate","AutosavedDraftsComponent_Conditional_7_For_2_Template","ɵɵrepeaterTrackByIdentity","AutosavedDraftsComponent_Conditional_7_Template_button_click_5_listener","removeAllDrafts","ɵɵrepeater","drafts","AutosavedDraftsComponent","subscription","autosavedDraftsChanged$","subscribe","initDrafts","loadCurrentDrafts","draft","AutosavedDraftsComponent_Template","AutosavedDraftsComponent_Conditional_7_Template","AutosavedDraftsComponent_Conditional_8_Template","ɵɵtextInterpolate2","FormsModule","ReplaySubject","AUTOSAVE_CONFIGURATION_TAG","defaultConfiguration","storageService","configurationSubject","initializeConfiguration","loadConfiguration","saveConfiguration","Subject","DRAFTS_TAG","rendererService","iconSetConfigurationService","updateConfiguration","readDrafts","sortDrafts","configFromFile","configAndDST","domain","createIconSetConfiguration","story","dst","actorIcons","getElementsOfType","workObjectIcons","updateIconRegistries","importStory","stopTimer","startTimer","autosaveTimer","clearInterval","setInterval","savedDrafts","newDraft","createDraft","isChanged","isSame","isDraftEmpty","writeDrafts","b","getStory","createConfigAndDST","Date","toString","aDate","bDate","RendererService","i7","i8","ExportDialogData","ExportOption","tooltip","ConfigAndDST","testConfigAndDst","DEFAULT_PADDING","ExportDialogComponent_For_18_Template_button_click_0_listener","i_r2","$index","ctx_r2","doOption","option_r4","ExportDialogComponent","withTitle","useWhiteBackground","updateWithTitle","updateUseWhiteBackground","ExportDialogComponent_Template","ExportDialogComponent_Template_input_change_4_listener","ExportDialogComponent_Template_input_change_9_listener","ExportDialogComponent_Template_button_click_15_listener","ExportDialogComponent_For_18_Template","sanitizeForDesktop","formatDate","pngService","svgService","htmlPresentationService","modelerService","dialogService","titleSubscription","title$","descriptionSubscription","description$","ngOnDestroy","unsubscribe","DomainStory","getCurrentConfigurationForExport","getStoryForDownload","filename","getCurrentDateString","downloadFile","datatype","fileEnding","encodeURIComponent","display","downloadSVG","svgData","createSVGData","downloadPNG","container","svgElements","outerSVGElement","viewport","layerBase","image","extractSVG","prepareSVG","onload","getWidth","getHeight","fillStyle","drawImage","png64","toDataURL","ele","onchange","downloadHTMLPresentation","modeler","then","info","openDownloadDialog","SVGDownloadOption","EGNDownloadOption","PNGDownloadOption","HTMLDownloadOption","getModeler","PngService","SvgService","HtmlPresentationService","ModelerService","i9","i10","doT","storyCreatorService","viewBoxCoordinates","ViewBoxCoordinate","_this","_asyncToGenerator","startReplay","saveSVG","fixActivityMarkersForEachSentence","getCurrentSentenceNumber","content","transition","err","alert","getMaxSentenceNumber","stopReplay","revealjsTemplate","dots","revealjsData","script","sentences","multiplexSecret","multiplexId","fixMalformedHtmlScript","structuredClone","viewBoxIndex","xLeft","yUp","splitViewBox","dataStart","dataEnd","createBounds","sectionIndex","newDefs","ids","idToReplace","newId","StoryCreatorService","browserSpecs","ua","navigator","userAgent","tem","M","exec","appName","appVersion","URIHashtagFix","fix","browser","parseInt","findMostOuterElements","xRight","yDown","sub","elXLeft","elXRight","elYUp","elYDown","transform","nums","rects","outerRect","calculateWidthAndHeight","insertIndex","join","extraHeight","layerResizers","layerOverlays","removeAttribute","XMLSerializer","serializeToString","cacheData","getEncoded","domainStorySvg","viewBoxWidth","viewBoxHeight","findIndexToInsertData","svgIndex","backgroundColorWhite","appendDST","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","Accessible","Assignment","Battery","Book","Bug","Code","Crop","DVR","Extension","Face","Fastfood","Fingerprint","Hand","Help","Image","Lightbulb","Lock","Loyalty","Portrait","Rocket","Satellite","Share","Slideshow","Star","Sun","Table","Videocam","Wysiwyg","allIconsDict","newIcons","updateAppendedIcons","IconConfiguration","allIconDictionary","domainName","getDefaultConf","defaultConf","updateAllIconRegistry","appendSRCFile","actorsDict","workObjectsDict","newAppendedIcons","appen","createCustomConf","iconSetConfiguration","IconFilterEnum","DetailsListItemComponent","iconInitiated","ngAfterViewChecked","createIcon","img","inputs","DetailsListItemComponent_Template","IconListItemComponent","iconName","iconSetCustomizationService","isWorkobject","isNone","getIconForName","toggleNone","setAsUnassigned","toggleActor","setAsActor","toggleWorkobject","setAsWorkobject","IconSetCustomizationService","IconListItemComponent_Template","IconListItemComponent_Template_mat_button_toggle_change_7_listener","IconListItemComponent_Template_mat_button_toggle_change_10_listener","IconListItemComponent_Template_mat_button_toggle_change_13_listener","IconSetConfigurationComponent","IconSetDetailsComponent","ICON_PREFIX","sanitizeIconName","iconName_r1","ICON_FILTER_NONE","selectedActors","selectedWorkobjects","allIconNames","allFilteredIconNames","iconSetConfigurationTypes","getIconSetConfiguration","getFullDictionary","sortByName","selectedActors$","selectedWorkobjects$","allFiltered","getFilteredNamesForType","localeCompare","loadMinimalIconConfigurationWithDefaultIcons","resetIconSet","loadInitialConfiguration","saveIconSet","exportIconSet","startIconUpload","importIcon","files","iconInputFile","reader","FileReader","onloadend","addIMGToIconDictionary","registerIconForBPMN","addNewIcon","readAsDataURL","startIconSetImport","importIconSet","iconSetInputFile","importConfiguration","readAsText","filterForActors","ICON_FILTER_ACTOR","filterForWorkobjects","ICON_FILTER_WORKOBJECT","filterForUnassigned","ICON_FILTER_UNASSIGNED","filterByNameAndType","filteredByNameAndType","isIconActor","isIconWorkObject","IconSetConfigurationComponent_Template","IconSetConfigurationComponent_Template_button_click_6_listener","IconSetConfigurationComponent_Template_button_click_10_listener","IconSetConfigurationComponent_Template_button_click_14_listener","IconSetConfigurationComponent_Template_input_input_18_listener","IconSetConfigurationComponent_Template_button_click_20_listener","IconSetConfigurationComponent_Template_input_change_23_listener","IconSetConfigurationComponent_Template_button_click_24_listener","IconSetConfigurationComponent_Template_button_click_27_listener","IconSetConfigurationComponent_Template_button_click_31_listener","IconSetConfigurationComponent_Template_button_click_35_listener","IconSetConfigurationComponent_Template_input_change_38_listener","IconSetConfigurationComponent_Template_button_click_39_listener","IconSetConfigurationComponent_For_44_Template","IconSetDetailsComponent_For_12_Template_mat_list_item_dragover_0_listener","ctx_r1","allowDrop","IconSetDetailsComponent_For_12_Template_mat_list_item_dragstart_0_listener","i_r3","onDragStart","IconSetDetailsComponent_For_12_Template_mat_list_item_drop_0_listener","iconName_r5","onDrop","IconSetDetailsComponent_For_19_Template_mat_list_item_dragover_0_listener","_r6","IconSetDetailsComponent_For_19_Template_mat_list_item_dragstart_0_listener","i_r7","IconSetDetailsComponent_For_19_Template_mat_list_item_drop_0_listener","ctx_r7","iconName_r9","customizationService","draggedList","draggedIndex","iconSetName","iconSetName$","changeName","listName","list","sortedList","setSelectedActors","setSelectedWorkObject","IconSetDetailsComponent_Template","IconSetDetailsComponent_Template_input_input_5_listener","IconSetDetailsComponent_For_12_Template","IconSetDetailsComponent_For_19_Template","actorIconDictionary","workObjectDictionary","iconDictionaryForBPMN","iconConfig","allTypes","initDictionary","dictionary","customConfiguration","allInTypeDictionary","collection","allIn","addIconsFromIconSetConfiguration","dictionaryType","iconTypes","registerIconForType","addIconsToTypeDictionary","unregisterIconForType","extractCustomIconsFromDictionary","addNewIconsToDictionary","elementDictionary","sanitizedName","custom","addIconsToCss","fullDictionary","appendedDict","getTypeDictionaryKeys","getIconSource","elementOfType","getAllIconDictionary","getActorsDictionary","getWorkObjectsDictionary","getIconConfiguration","setCustomConfiguration","setIconSetName","exportConfiguration","configJSONString","getIconSetName","customConfig","updateIconSetName","actorDict","workObjectDict","actorKeys","workObjectKeys","configurationName","getCurrentConfiguration","createConfigFromDictionaries","currentConfiguration","getCurrentConfigurationNamesWithoutPrefix","createMinimalConfigurationWithDefaultIcons","minimalConfig","createConfigFromCanvas","actorNames","workobjectNames","newActors","newWorkobjects","fileConfiguration","getStoredIconSetConfiguration","iconSetString","configurationFromFile","checkValidityOfConfiguration","setStoredIconSetConfiguration","configForStorage","allCanvasObjects","iconSetChangedService","allIconListItems","configurationHasChanged","addIconToAllIconList","iconConfigrationChanged","storedIconSetConfiguration","usedIcons","selectedActorNames","selectActor","deselectActor","selectedWorkobjectNames","selectWorkObject","deselectWorkobject","changedIconSet","updateIcon","workobject","updateActorSubject","updateWorkObjectSubject","defaultConfig","workObjectName","actorName","updateAllIconBehaviourSubjects","resetToInitialConfiguration","imported","changedActors","changedWorkobjects","configurationActors","configurationWorkobjects","changedIconSetConfiguration","updateIcons","getAndClearSavedConfiguration","temp","iconDict","getSrcForIcon","iconBehaviourSubject","customIconSetConfiguration","rawSrc","ImportDialogComponent","fileUrl","doImport","updateUrl","ImportDialogComponent_Template","ImportDialogComponent_Template_input_input_4_listener","ImportDialogComponent_Template_button_click_9_listener","ImportDialogComponent_Template_button_click_11_listener","EventEmitter","importRepairService","importedConfiguration","importedConfigurationEmitter","getConfiguration","performImport","file","dstSvgPattern","egnSvgPattern","endsWith","importDST","importEGN","commandStackChanged","importFromUrl","fetch","response","blob","catch","openUploadUrlDialog","isSVG","fileReader","titleText","restoreTitleFromFileName","fileReaderFunction","isEGN","dstText","removeXMLComments","dstAndConfig","extractDstAndConfig","removeWhitespacesFromIcons","configChanged","checkConfigForChanges","lastElement","importVersionNumber","handleVersionNumber","checkForUnreferencedElementsInActivitiesAndRepair","showBrokenImportDialog","adjustPositions","versionPrefix","lastIndexOf","updateCustomElementsPreviousV050","showPreviousV050Dialog","xmlText","newActorKeys","newWorkObjectKeys","currentActorKeys","currentWorkobjectKeys","changed","clearName","setImportedConfigurationAndEmit","message","emit","domainStoryRegex","svgRegex","egnSuffix","dstSuffix","svgSuffix","filenameWithoutDateSuffix","ImportRepairService","objectIDs","activityIndex","isFirst","findFirstElement","adjustElementPosition","LabelDictionaryDialogComponent","LabelDictionaryDialogComponent_Template","LabelDictionaryDialogComponent_Template_app_label_dictionary_closeEmitter_3_listener","LabelDictionaryComponent","MatDialogContent","LabelDictionaryComponent_For_6_Template_input_change_2_listener","workobjectEntry_r2","updateWorkobjectEntry","LabelDictionaryComponent_For_13_Template_textarea_change_2_listener","activityEntry_r5","_r4","updateActivityEntry","LabelDictionaryComponent_For_13_Template_textarea_keydown_enter_2_listener","LabelDictionaryComponent_For_13_Template_textarea_keyup_enter_2_listener","LabelDictionaryComponent_For_13_Template_textarea_keyup_escape_2_listener","closeEmitter","createLabelDictionaries","workObjectEntries","getWorkObjectLabels","activityEntries","getActivityLabels","workobjectEntriesSubject","activityEntriesSubject","activityNames","originalActivityNames","originalWorkObjectNames","originalName","massRenameLabels","activityEntry","workobjectEntry","outputs","LabelDictionaryComponent_Template","LabelDictionaryComponent_For_6_Template","LabelDictionaryComponent_For_13_Template","LabelDictionaryComponent_Template_button_click_16_listener","LabelDictionaryComponent_Template_button_click_18_listener","massNamingService","activityLabels","workObjektLabels","openLabelDictionary","isActivityWithLabel","isWorkObjectWithLabel","hasAtLeastOneLabel","Set","massChangeNames","MassNamingService","commandStackService","oldValue","allRelevantObjects","FormControl","FormGroup","Validators","ActivityDialogForm","activityLabel","activityNumber","numberIsAllowedMultipleTimes","nonNullable","required","multipleNumbers","ActivityDialogData","showNumberFields","saveFN","ActivityDialogComponent","form","controls","valueChanges","setValue","onSubmit","patchValue","ActivityDialogComponent_Template","ActivityDialogComponent_Template_input_change_9_listener","ActivityDialogComponent_Template_textarea_keydown_enter_14_listener","ActivityDialogComponent_Template_textarea_keyup_enter_14_listener","ActivityDialogComponent_Template_textarea_keyup_escape_14_listener","ActivityDialogComponent_Template_button_click_16_listener","ActivityDialogComponent_Template_button_click_18_listener","ModelerComponent","ReactiveFormsModule","postInit","ModelerComponent_Template","positionsMatch","massRenameHandler","InitializerService","propagateDomainStoryModelerClassesToServices","selection","initializeDomainStoryModelerEventHandlers","initiateEventBusListeners","activityDoubleClick","renderedNumberRegistry","allActivities","htmlCanvas","transformX","transformY","zoomX","zoomY","clickX","originalEvent","clickY","parseFloat","currentNum","tx","ty","tNumber","elementX","elementY","pasteColor","pasteText","pasteHeight","descriptor","oldBusinessObject","elementsKey","shift","saveActivityInputLabel","activityData","hasNumber","initializerService","checkCurrentVersion","keyboard","bindTo","additionalModules","bpmnSearch","exportArtifacts","debounce","window","startDebounce","onAction","restart","domainStory","currentStory","destroy","timeout","timer","clearTimeout","encoded","renderStory","reset","configurationChange","c","NUMBER_BACKGROUND_COLOR","NUMBER_COLOR","STROKE_WIDTH","HIGHLIGHT_NUMBER_BACKGROUNG_COLOR","HIGHLIGHT_NUMBER_COLOR","HIGHLIGHT_STROKE_WIDTH","DomManipulationService","showAll","removeHighlights","domObject","showSentence","replaySentence","notShown","getAllNotShown","highlightSentence","o","getNumberDomForActivity","numberText","previousSibling","numberBackgroundDom","numberTextDom","allConnections","activityDomObject","connectionDomObject","sentenceObjects","shownElements","notShownElements","domManipulationService","currentSentence","maxSentenceNumber","replayOnSubject","currentSentence$","maxSentenceNumber$","replayOn$","setReplayState","state","isReplayable","traceActivitiesAndCreateStory","initializeReplay","showCurrentSentence","checkSequenceNumbers","missingSentences","getMissingSentences","sentence","getValue","tracedActivityMap","tracedActivityMapKeys","tracedItem","storyIndex","createSentence","addGroupsToLastSentence","tracedActivityMapKey","tracedActivity","getSentenceObjects","highlightedElements","t","highlightedObjects","allActivityNumbersFromActors","allActivityNumbers","highestSequenceNumber","initialSource","targetObjects","actorTextAnnotations","parallelSentence","firstTarget","checkTarget","activityTarget","addTextAnnotationsForActorOrGroup","ta","objectTextAnnotations","annotationsForGroups","g","TitleDialogForm","titel","TitleDialogComponent","getRawValue","TitleDialogComponent_Template","TitleDialogComponent_Template_textarea_keydown_enter_10_listener","TitleDialogComponent_Template_textarea_keyup_enter_10_listener","TitleDialogComponent_Template_textarea_keyup_escape_10_listener","TitleDialogComponent_Template_button_click_12_listener","TitleDialogComponent_Template_button_click_14_listener","titleSubject","descriptionSubject","iconSetNameSubject","showDescriptionSubject","openHeaderDialog","allowUndo","fireTitleAndDescriptionUpdate","updateTitle","updateDescription","inputTitle","setShowDescription","show","getVersion","hasTitleOrDescription","rgba","red","padStart","green","blue","alpha","round","isValidHex","hex","getChunksFromString","st","chunkSize","RegExp","convertHexUnitTo256","hexStr","repeat","getAlphafloat","EPSILON","hexArr","degrees","radians","PI","quadrant","adjacent","opposite","atan2","Point","reg","nameWithoutFileEnding","HeaderButtonsComponent_Conditional_0_Template_button_click_1_listener","HeaderButtonsComponent_Conditional_0_Template_button_click_7_listener","HeaderButtonsComponent_Conditional_0_Template_input_change_10_listener","import","HeaderButtonsComponent_Conditional_0_Template_button_click_11_listener","HeaderButtonsComponent_Conditional_0_Conditional_12_Template","HeaderButtonsComponent_Conditional_0_Conditional_13_Template","HeaderButtonsComponent_Conditional_0_Template_button_click_14_listener","HeaderButtonsComponent_Conditional_0_Template_button_click_17_listener","openSettings","HeaderButtonsComponent_Conditional_0_Template_button_click_20_listener","showKeyboardShortCuts","HeaderButtonsComponent_Conditional_0_Template_button_click_23_listener","newStory","hasDomainStory","hasTitle","isDirty","HeaderButtonsComponent_Conditional_1_Template_button_click_1_listener","_r3","HeaderButtonsComponent_Conditional_1_Template_button_click_4_listener","HeaderButtonsComponent_Conditional_1_Template_button_click_7_listener","HeaderButtonsComponent","isReplaying","HeaderButtonsComponent_Template","HeaderButtonsComponent_Conditional_0_Template","HeaderButtonsComponent_Conditional_1_Template","combineLatest","HeaderComponent_Conditional_2_Template_button_click_0_listener","HeaderComponent_Conditional_4_Template_button_click_0_listener","sentenceDescription$","HeaderComponent","importService","renderService","isReplay$","isDirty$","pipe","count","showDescription","createNewDomainStory","onImport","HeaderComponent_Template","HeaderComponent_Conditional_2_Template","HeaderComponent_Conditional_4_Template","HeaderComponent_Template_span_click_7_listener","HeaderComponent_Conditional_13_Template","HeaderComponent_Template_app_header_buttons_import_16_listener","HeaderComponent_Template_app_header_buttons_openSettings_16_listener","HeaderComponent_Template_app_header_buttons_startReplay_16_listener","HeaderComponent_Template_app_header_buttons_stopReplay_16_listener","HeaderComponent_Template_app_header_buttons_nextSentence_16_listener","HeaderComponent_Template_app_header_buttons_previousSentence_16_listener","HeaderComponent_Template_app_header_buttons_newStory_16_listener","HeaderComponent_Template_app_header_buttons_showKeyboardShortCuts_16_listener","HeaderComponent_Template_app_header_buttons_openLabelDictionary_16_listener","HeaderComponent_Template_app_header_buttons_openDownloadDialog_16_listener","HeaderComponent_Template_app_header_buttons_openUploadUrlDialog_16_listener","HeaderComponent_Conditional_19_Template","GeneralSettingsComponent","GeneralSettingsComponent_Template","SettingsComponent","showGeneralSettings","showIconSetCustomization","savedConfiguration","openGeneralSettings","openIconSetCustomization","SettingsComponent_Template","SettingsComponent_Template_button_click_3_listener","SettingsComponent_Template_button_click_7_listener","SettingsComponent_Template_button_click_11_listener","SettingsComponent_Conditional_15_Template","SettingsComponent_Conditional_17_Template","showSettings","production","enableProdMode","__NgCli_bootstrap_1","platformBrowser","bootstrapModule","console","error"],"sourceRoot":"webpack:///","x_google_ignoreList":[]} \ No newline at end of file +{"version":3,"file":"main.js","mappings":";;;;;;;;;;;;;;AAK0C;AAE1C,IAAII,mBAAmB,GAAG,CAAC;AAE3B;AACM,SAAUC,mCAAmCA,CACjDC,uBAAuB,EACvBC,KAAK,EACLC,WAAW,EACXC,KAAK,EACLC,KAAK,EACLC,KAAK;EAELP,mBAAmB,GAAGE,uBAAuB;EAE7CC,KAAK,GAAGA,KAAK,CAACK,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;EAErD,IAAIC,YAAY,GAAGC,WAAW,CAACP,KAAK,EAAEI,KAAK,CAAC;EAE5C,IAAII,kBAAkB,GAAGC,iBAAiB,CAACR,WAAW,EAAEG,KAAK,CAAC;EAE9D;EAEA,IAAIM,UAAU,GACZ,qGAA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AE,KAAK;EACjBjuC,OAAO,EAAE;CACV;AAED;;;;;;;AAOA;;;;;;;;;;;;;;;;AChB+C;AAGF;AACY;AAEzD,IAAI3B,kEAAW,CAAC4vC,UAAU,EAAE;EAC1BC,6DAAc,EAAE;AAClB;AAEAC,sEAAA,EAAwB,CACrBE,eAAe,CAAC5oC,sDAAS,CAAC,CAC1B2wB,KAAK,CAAElc,GAAG,IAAKo0B,OAAO,CAACC,KAAK,CAACr0B,GAAG,CAAC,CAAC","sources":["./src/app/tools/export/services/exportUtil.js","./src/app/tools/modeler/bpmn/index.js","./src/app/tools/modeler/bpmn/modeler/change-icon/replace.js","./src/app/tools/modeler/bpmn/modeler/change-icon/replaceMenuProvider.js","./src/app/tools/modeler/bpmn/modeler/change-icon/replaceOptions.js","./src/app/tools/modeler/bpmn/modeler/context-pad/domainStoryContextPadProvider.js","./src/app/tools/modeler/bpmn/modeler/domainStoryElementFactory.js","./src/app/tools/modeler/bpmn/modeler/domainStoryIdFactory.js","./src/app/tools/modeler/bpmn/modeler/domainStoryRenderer.js","./src/app/tools/modeler/bpmn/modeler/domainStoryRules.js","./src/app/tools/modeler/bpmn/modeler/domainStoryUpdater.js","./src/app/tools/modeler/bpmn/modeler/index.js","./src/app/tools/modeler/bpmn/modeler/labeling/dsLabelEditingPreview.js","./src/app/tools/modeler/bpmn/modeler/labeling/dsLabelEditingProvider.js","./src/app/tools/modeler/bpmn/modeler/labeling/dsLabelUtil.js","./src/app/tools/modeler/bpmn/modeler/labeling/index.js","./src/app/tools/modeler/bpmn/modeler/labeling/position.js","./src/app/tools/modeler/bpmn/modeler/modeling/dSModeling.js","./src/app/tools/modeler/bpmn/modeler/modeling/index.js","./src/app/tools/modeler/bpmn/modeler/numbering/numbering.js","./src/app/tools/modeler/bpmn/modeler/palette/domainStoryPalette.js","./src/app/tools/modeler/bpmn/modeler/updateHandler/activityUpdateHandlers.js","./src/app/tools/modeler/bpmn/modeler/updateHandler/elementUpdateHandler.js","./src/app/tools/modeler/bpmn/modeler/updateHandler/headlineAndDescriptionUpdateHandler.js","./src/app/tools/modeler/bpmn/modeler/updateHandler/massRenameHandler.js","./src/app/tools/modeler/bpmn/modeler/updateHandler/updateLabelHandler.js","./src/app/tools/modeler/bpmn/modeler/util.js","./src/app/app.component.ts","./src/app/app.component.html","./src/app/app.module.ts","./src/app/domain/entities/configuration.ts","./src/app/domain/entities/constants.ts","./src/app/domain/entities/dictionary.ts","./src/app/domain/entities/elementTypes.ts","./src/app/domain/entities/infoDialogData.ts","./src/app/domain/presentation/domain.module.ts","./src/app/domain/presentation/info-dialog/info-dialog.component.ts","./src/app/domain/presentation/info-dialog/info-dialog.component.html","./src/app/domain/services/command-stack.service.ts","./src/app/domain/services/dialog.service.ts","./src/app/domain/services/dirty-flag.service.ts","./src/app/domain/services/element-registry.service.ts","./src/app/domain/services/storage.service.ts","./src/app/material.module.ts","./src/app/tools/autosave/presentation/AutosaveOptions/autosave-options.component.ts","./src/app/tools/autosave/presentation/AutosaveOptions/autosave-options.component.html","./src/app/tools/autosave/presentation/AutosaveSettings/autosave-settings.component.ts","./src/app/tools/autosave/presentation/AutosaveSettings/autosave-settings.component.html","./src/app/tools/autosave/presentation/AutosavedDrafts/autosaved-drafts.component.ts","./src/app/tools/autosave/presentation/AutosavedDrafts/autosaved-drafts.component.html","./src/app/tools/autosave/presentation/autosave.module.ts","./src/app/tools/autosave/services/autosave-configuration.service.ts","./src/app/tools/autosave/services/autosave.service.ts","./src/app/tools/export/domain/dialog/exportDialogData.ts","./src/app/tools/export/domain/export/configAndDst.ts","./src/app/tools/export/domain/export/exportConstants.ts","./src/app/tools/export/presentation/export-dialog/export-dialog.component.ts","./src/app/tools/export/presentation/export-dialog/export-dialog.component.html","./src/app/tools/export/presentation/export.module.ts","./src/app/tools/export/services/export.service.ts","./src/app/tools/export/services/html-presentation.service.ts","./src/app/tools/export/services/png.service.ts","./src/app/tools/export/services/svg.service.ts","./src/app/tools/icon-set-config/domain/allIcons.ts","./src/app/tools/icon-set-config/domain/iconConfiguration.ts","./src/app/tools/icon-set-config/domain/iconFilterEnum.ts","./src/app/tools/icon-set-config/presentation/details-list-item/details-list-item.component.ts","./src/app/tools/icon-set-config/presentation/details-list-item/details-list-item.component.html","./src/app/tools/icon-set-config/presentation/icon-list-item/icon-list-item.component.ts","./src/app/tools/icon-set-config/presentation/icon-list-item/icon-list-item.component.html","./src/app/tools/icon-set-config/presentation/icon-set-config.module.ts","./src/app/tools/icon-set-config/presentation/icon-set-configuration/icon-set-configuration.component.ts","./src/app/tools/icon-set-config/presentation/icon-set-configuration/icon-set-configuration.component.html","./src/app/tools/icon-set-config/presentation/icon-set-details/icon-set-details.component.ts","./src/app/tools/icon-set-config/presentation/icon-set-details/icon-set-details.component.html","./src/app/tools/icon-set-config/services/icon-dictionary.service.ts","./src/app/tools/icon-set-config/services/icon-set-configuration.service.ts","./src/app/tools/icon-set-config/services/icon-set-customization.service.ts","./src/app/tools/import/directive/dragDrop.directive.ts","./src/app/tools/import/presentation/import-dialog/import-dialog.component.ts","./src/app/tools/import/presentation/import-dialog/import-dialog.component.html","./src/app/tools/import/presentation/import.module.ts","./src/app/tools/import/services/import-domain-story.service.ts","./src/app/tools/import/services/import-repair.service.ts","./src/app/tools/label-dictionary/presentation/label-dictionary-dialog/label-dictionary-dialog.component.ts","./src/app/tools/label-dictionary/presentation/label-dictionary-dialog/label-dictionary-dialog.component.html","./src/app/tools/label-dictionary/presentation/label-dictionary.module.ts","./src/app/tools/label-dictionary/presentation/label-dictionary/label-dictionary.component.ts","./src/app/tools/label-dictionary/presentation/label-dictionary/label-dictionary.component.html","./src/app/tools/label-dictionary/services/label-dictionary.service.ts","./src/app/tools/label-dictionary/services/mass-naming.service.ts","./src/app/tools/modeler/domain/activity-dialog-form.ts","./src/app/tools/modeler/domain/activityDialogData.ts","./src/app/tools/modeler/presentation/activity-dialog/activity-dialog.component.ts","./src/app/tools/modeler/presentation/activity-dialog/activity-dialog.component.html","./src/app/tools/modeler/presentation/modeler.module.ts","./src/app/tools/modeler/presentation/modeler/modeler.component.ts","./src/app/tools/modeler/presentation/modeler/modeler.component.html","./src/app/tools/modeler/services/initializer.service.ts","./src/app/tools/modeler/services/modeler.service.ts","./src/app/tools/modeler/services/renderer.service.ts","./src/app/tools/replay/domain/replayConstants.ts","./src/app/tools/replay/services/dom-manipulation.service.ts","./src/app/tools/replay/services/replay.service.ts","./src/app/tools/replay/services/story-creator.service.ts","./src/app/tools/title/domain/title-dialog-form.ts","./src/app/tools/title/presentation/title-dialog/title-dialog.component.ts","./src/app/tools/title/presentation/title-dialog/title-dialog.component.html","./src/app/tools/title/presentation/title.module.ts","./src/app/tools/title/services/title.service.ts","./src/app/utils/colorConverter.ts","./src/app/utils/mathExtensions.ts","./src/app/utils/sanitizer.ts","./src/app/workbench/presentation/header/header-buttons/header-buttons.component.ts","./src/app/workbench/presentation/header/header-buttons/header-buttons.component.html","./src/app/workbench/presentation/header/header/header.component.ts","./src/app/workbench/presentation/header/header/header.component.html","./src/app/workbench/presentation/settings/general/general-settings.component.ts","./src/app/workbench/presentation/settings/general/general-settings.component.html","./src/app/workbench/presentation/settings/settings.component.ts","./src/app/workbench/presentation/settings/settings.component.html","./src/app/workbench/presentation/workbench.module.ts","./src/app/workbench/services/settings/settings.service.ts","./src/environments/environment.ts","./src/main.ts"],"sourcesContent":["import {\n SVG_LINK,\n TEXTSPAN_DESCRIPTION_HEIGHT,\n TEXTSPAN_TITLE_HEIGHT,\n X_OFFSET_UTIL,\n} from \"../domain/export/exportConstants\";\n\nlet dynamicHeightOffset = 0;\n\n// Has to be js File so we can access te correct non-standard HTML-Properties without excessive usage of ts-ignore\nexport function createTitleAndDescriptionSVGElement(\n initDynamicHeightOffset,\n title,\n description,\n min_x,\n min_y,\n width,\n) {\n dynamicHeightOffset = initDynamicHeightOffset;\n\n title = title.replace(\"<\", \"\").replace(\">\", \"\");\n\n let titleElement = createTitle(title, width);\n\n let descriptionElement = createDescription(description, width);\n\n // to display the title and description in the SVG-file, we need to add a container for our text-elements\n\n let insertText =\n '' +\n titleElement +\n descriptionElement +\n \"\";\n return { insertText, dynamicHeightOffset: dynamicHeightOffset };\n}\n\nfunction createTitle(text, width) {\n let tempCanvas = document.createElement(\"canvas\");\n let ctx = tempCanvas.getContext(\"2d\");\n ctx.font = \"30px Arial\";\n\n return createTextSpans(text, width, ctx, 10, TEXTSPAN_TITLE_HEIGHT, 30);\n}\n\nfunction createDescription(text, width) {\n let description = \"\";\n let descriptionParts = text.split(\"
\");\n\n let tempCanvas = document.createElement(\"canvas\");\n let ctx = tempCanvas.getContext(\"2d\");\n ctx.font = \"12px Arial\";\n\n for (let i = 0; i < descriptionParts.length; i++) {\n description += createTextSpans(\n descriptionParts[i],\n width,\n ctx,\n 0,\n TEXTSPAN_DESCRIPTION_HEIGHT,\n 12,\n );\n }\n return description;\n}\n\nfunction createTextSpans(text, width, ctx, yOffset, heightOffset, fontSize) {\n let textSpans = \"\";\n let words = text.split(\" \");\n\n // every leading empty strings in the array must be removed, otherwise the text elements\n // will not be filled with text\n words = removeLeadingEmptyStrings(words);\n\n let textTag =\n '';\n\n let textSpan = document.createElementNS(SVG_LINK, \"tspan\");\n let textNode = document.createTextNode(words[0]);\n\n textSpan.setAttribute(\"x\", X_OFFSET_UTIL);\n textSpan.setAttribute(\"y\", yOffset + dynamicHeightOffset);\n textSpan.setAttribute(\"font-size\", fontSize);\n textSpan.appendChild(textNode);\n\n for (let j = 1; j < words.length; j++) {\n if (textSpan.firstChild && textSpan.firstChild.data) {\n let len = textSpan.firstChild.data.length;\n textNode.data += \" \" + words[j];\n\n if (ctx.measureText(textNode.data).width > width - 16) {\n dynamicHeightOffset += heightOffset;\n textSpan.firstChild.data = textSpan.firstChild.data.slice(0, len); // remove overflow word\n\n textSpans += textTag + textSpan.outerHTML + \"\"; // append line\n\n // create new textspan for line break\n textSpan = document.createElementNS(SVG_LINK, \"tspan\");\n textNode = document.createTextNode(words[j]);\n textSpan.setAttribute(\"x\", X_OFFSET_UTIL);\n textSpan.setAttribute(\"y\", yOffset + dynamicHeightOffset);\n textSpan.appendChild(textNode);\n }\n }\n }\n dynamicHeightOffset += heightOffset;\n\n textSpans += textTag + textSpan.outerHTML + \"\";\n return textSpans;\n}\n\nfunction removeLeadingEmptyStrings(stringArray) {\n const firstNonEmptyIndex = stringArray.findIndex((string) => string !== \"\");\n return stringArray.slice(\n firstNonEmptyIndex === -1 ? stringArray.length : firstNonEmptyIndex,\n );\n}\n","import Modeler from \"bpmn-js/lib/Modeler\";\nimport ResizeModule from \"diagram-js/lib/features/resize\";\nimport { assign, isArray } from \"min-dash\";\nimport inherits from \"inherits\";\n\nimport DomainStoryModule from \"./modeler\";\nimport LabelEditingModule from \"./modeler/labeling\";\nimport ModelingModule from \"./modeler/modeling\";\nimport { ElementTypes } from \"../../../domain/entities/elementTypes\";\n\nexport default function DomainStoryModeler(options) {\n Modeler.call(this, options);\n\n this._customElements = [];\n this._groupElements = [];\n}\n\ninherits(DomainStoryModeler, Modeler);\n\nDomainStoryModeler.prototype._modules = [].concat(\n DomainStoryModeler.prototype._modules,\n [DomainStoryModule, LabelEditingModule, ModelingModule],\n [ResizeModule],\n);\n\n/**\n * add a single custom element to the underlying diagram\n *\n * @param {Object} customElement\n */\nDomainStoryModeler.prototype._addCustomShape = function (customElement) {\n let parentId = customElement.parent;\n delete customElement.children;\n delete customElement.parent;\n this._customElements.push(customElement);\n\n let canvas = this.get(\"canvas\"),\n elementFactory = this.get(\"elementFactory\");\n\n let customAttrs = assign({ businessObject: customElement }, customElement);\n let customShape = elementFactory.create(\"shape\", customAttrs);\n\n if (isGroup(customElement)) {\n this._groupElements[customElement.id] = customShape;\n }\n\n if (parentId) {\n let parentShape = this._groupElements[parentId];\n\n if (isGroup(parentShape)) {\n return canvas.addShape(customShape, parentShape, parentShape.id);\n }\n }\n return canvas.addShape(customShape);\n};\n\nDomainStoryModeler.prototype._addCustomConnection = function (customElement) {\n this._customElements.push(customElement);\n\n let canvas = this.get(\"canvas\"),\n elementFactory = this.get(\"elementFactory\"),\n elementRegistry = this.get(\"elementRegistry\");\n\n let customAttrs = assign({ businessObject: customElement }, customElement);\n\n let connection = elementFactory.create(\n \"connection\",\n assign(customAttrs, {\n source: elementRegistry.get(customElement.source),\n target: elementRegistry.get(customElement.target),\n }),\n elementRegistry.get(customElement.source).parent,\n );\n\n return canvas.addConnection(connection);\n};\n\n//** We import BusinessObjects, not the whole Canvas Object!!!!!!!!\nDomainStoryModeler.prototype.importCustomElements = function (elements) {\n this.get(\"eventBus\").fire(\"diagram.clear\", {});\n this._customElements = [];\n this._groupElements = [];\n\n this.addCustomElements(elements);\n};\n\n/**\n * add a number of custom elements and connections to the underlying diagram.\n *\n * @param {Array} customElements\n */\nDomainStoryModeler.prototype.addCustomElements = function (customElements) {\n if (!isArray(customElements)) {\n throw new Error(\"argument must be an array\");\n }\n\n let shapes = [],\n connections = [],\n groups = [];\n\n customElements.forEach(function (customElement) {\n if (isConnection(customElement)) {\n connections.push(customElement);\n } else if (isGroup(customElement)) {\n groups.push(customElement);\n } else {\n shapes.push(customElement);\n }\n });\n\n // add groups before shapes and shapes before connections so that connections\n // can already rely on the shapes being part of the diagram\n groups.forEach(this._addCustomShape, this);\n shapes.forEach(this._addCustomShape, this);\n connections.forEach(this._addCustomConnection, this);\n};\n\n/**\n * get custom elements with their current status.\n *\n * @return {Array} custom elements on the diagram\n */\nDomainStoryModeler.prototype.getCustomElements = function () {\n return this._customElements;\n};\n\n// override standard function to prevent default elements on canvas\nDomainStoryModeler.prototype.createDiagram = function (done) {};\n\nfunction isConnection(element) {\n return (\n element.type === ElementTypes.ACTIVITY ||\n element.type === ElementTypes.CONNECTION\n );\n}\n\nfunction isGroup(element) {\n return element && element.type === ElementTypes.GROUP;\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\n/**\n * service that allow replacing of elements.\n */\nexport default function Replace(modeling) {\n this._modeling = modeling;\n}\n\n/**\n * @param {Element} oldElement - element to be replaced\n * @param {Object} newElementData - containing information about the new Element, for example height, width, type.\n * @param modeling\n */\nfunction replaceElement(oldElement, newElementData, modeling) {\n let newElement = setCenterOfElement(newElementData, oldElement, modeling);\n let outgoingActivities = newElement.outgoing;\n let incomingActivities = newElement.incoming;\n\n outgoingActivities.forEach((element) => {\n element.businessObject.source = newElement.id;\n });\n\n incomingActivities.forEach((element) => {\n element.businessObject.target = newElement.id;\n });\n\n return newElement;\n}\n\nfunction setCenterOfElement(newElementData, oldElement, modeling) {\n newElementData.x = Math.ceil(\n oldElement.x + (newElementData.width || oldElement.width) / 2,\n );\n newElementData.y = Math.ceil(\n oldElement.y + (newElementData.height || oldElement.height) / 2,\n );\n\n assign(newElementData, { name: oldElement.businessObject.name });\n\n return modeling.replaceShape(oldElement, newElementData, {});\n}\n\nReplace.prototype.replaceElement = replaceElement;\n","\"use strict\";\n\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport Replace from \"./replace\";\nimport * as replaceOptions from \"./replaceOptions\";\n\nimport { forEach } from \"min-dash\";\n\n/**\n * This module is an element agnostic replace menu provider for the popup menu.\n */\nexport default function ReplaceMenuProvider(modeling) {\n this._dsReplace = new Replace(modeling);\n this._modeling = modeling;\n}\n\nReplaceMenuProvider.$inject = [\"modeling\"];\n\n/**\n * Get all entries from replaceOptions for the given element and apply filters\n * on them. Get for example only elements, which are different from the current one.\n *\n * @param {djs.model.Base} element\n *\n * @return {Array} a list of menu entry items\n */\nReplaceMenuProvider.prototype.getEntries = function (element) {\n let entries;\n if (element.type.includes(ElementTypes.ACTOR)) {\n entries = replaceOptions.actorReplaceOptions(element.type);\n } else if (element.type.includes(ElementTypes.WORKOBJECT)) {\n entries = replaceOptions.workObjectReplaceOptions(element.type);\n }\n\n return this._createEntries(element, entries);\n};\n\n/**\n * Creates an array of menu entry objects for a given element and filters the replaceOptions\n * according to a filter function.\n *\n * @param {djs.model.Base} element\n * @param {Object} replaceOptions\n *\n * @return {Array} a list of menu items\n */\nReplaceMenuProvider.prototype._createEntries = function (\n element,\n replaceOptions,\n) {\n let menuEntries = [];\n\n let self = this;\n\n forEach(replaceOptions, function (definition) {\n let entry = self._createMenuEntry(definition, element);\n\n menuEntries.push(entry);\n });\n\n return menuEntries;\n};\n\n/**\n * Creates and returns a single menu entry item.\n *\n * @param {Object} definition a single replace options definition object\n * @param {djs.model.Base} element\n * @param {Function} [action] an action callback function which gets called when\n * the menu entry is being triggered.\n *\n * @return {Object} menu entry item\n */\nReplaceMenuProvider.prototype._createMenuEntry = function (\n definition,\n element,\n action,\n) {\n let replaceElement = this._dsReplace.replaceElement;\n let modeling = this._modeling;\n let replaceAction = function () {\n return replaceElement(element, definition.target, modeling);\n };\n\n action = action || replaceAction;\n\n return {\n label: definition.label,\n className: definition.className,\n id: definition.actionName,\n action: action,\n };\n};\n","import { ElementTypes } from \"src/app/domain/entities/elementTypes\";\n\nlet iconDictionaryService;\n\nexport function initializeReplaceOptions(iconDictionary) {\n iconDictionaryService = iconDictionary;\n}\n\nexport function actorReplaceOptions(name) {\n const actorTypes = iconDictionaryService.getTypeDictionary(\n ElementTypes.ACTOR,\n );\n\n let replaceOption = {};\n let i = 0;\n\n actorTypes.keysArray().forEach((actorType) => {\n if (!name.includes(actorType)) {\n const typeName = actorType;\n replaceOption[i] = {\n label: \"Change to \" + typeName,\n actionName: \"replace-with-actor-\" + typeName.toLowerCase(),\n className: iconDictionaryService.getIconForBPMN(\n ElementTypes.ACTOR,\n actorType,\n ),\n target: {\n type: `${ElementTypes.ACTOR}${actorType}`,\n },\n };\n i++;\n }\n });\n return replaceOption;\n}\n\nexport function workObjectReplaceOptions(name) {\n const workObjectTypes = iconDictionaryService.getTypeDictionary(\n ElementTypes.WORKOBJECT,\n );\n\n let replaceOption = {};\n let i = 0;\n\n workObjectTypes.keysArray().forEach((workObjectType) => {\n if (!name.includes(workObjectType)) {\n const typeName = workObjectType;\n replaceOption[i] = {\n label: \"Change to \" + typeName,\n actionName: \"replace-with-actor-\" + typeName,\n className: iconDictionaryService.getIconForBPMN(\n ElementTypes.WORKOBJECT,\n workObjectType,\n ),\n target: {\n type: `${ElementTypes.WORKOBJECT}${workObjectType}`,\n },\n };\n }\n i++;\n });\n return replaceOption;\n}\n","\"use strict\";\n\nimport inherits from \"inherits\";\n\nimport ContextPadProvider from \"bpmn-js/lib/features/context-pad/ContextPadProvider\";\n\nimport { assign, bind } from \"min-dash\";\nimport { generateAutomaticNumber } from \"../numbering/numbering\";\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport { getAllStandardIconKeys } from \"src/app/tools/icon-set-config/domain/allIcons\";\nimport {\n hexToRGBA,\n isHexWithAlpha,\n rgbaToHex,\n} from \"../../../../../utils/colorConverter\";\n\nlet dirtyFlagService;\nlet iconDictionaryService;\n\nexport function initializeContextPadProvider(dirtyFlag, iconDictionary) {\n dirtyFlagService = dirtyFlag;\n iconDictionaryService = iconDictionary;\n}\n\nexport default function DomainStoryContextPadProvider(\n injector,\n connect,\n translate,\n elementFactory,\n create,\n canvas,\n contextPad,\n popupMenu,\n replaceMenuProvider,\n commandStack,\n eventBus,\n modeling,\n) {\n let startConnect;\n let selectedElement;\n\n injector.invoke(ContextPadProvider, this);\n\n let cached = bind(this.getContextPadEntries, this);\n\n document.addEventListener(\"pickedColor\", (event) => {\n if (selectedElement) {\n executeCommandStack(event);\n }\n });\n\n popupMenu.registerProvider(\"ds-replace\", replaceMenuProvider);\n popupMenu.registerProvider(\"bpmn-replace\", replaceMenuProvider);\n\n this.getContextPadEntries = function (element) {\n selectedElement = element;\n\n let pickedColor = selectedElement.businessObject.pickedColor;\n\n if (isHexWithAlpha(pickedColor)) {\n pickedColor = hexToRGBA(pickedColor);\n }\n document.dispatchEvent(\n new CustomEvent(\"defaultColor\", {\n detail: {\n color: pickedColor ?? \"#000000\",\n },\n }),\n );\n\n const allStandardIconKeys = getAllStandardIconKeys();\n let actions = cached(element);\n\n startConnect = function (event, element, autoActivate) {\n connect.start(event, element, autoActivate);\n };\n\n if (element.type.includes(ElementTypes.WORKOBJECT)) {\n addColorChange(actions);\n addConnectWithActivity(actions, startConnect);\n addTextAnnotation(actions);\n addActors(appendAction, actions);\n addWorkObjects(appendAction, actions);\n addChangeWorkObjectTypeMenu(actions);\n } else if (element.type.includes(ElementTypes.ACTOR)) {\n addColorChange(actions);\n addConnectWithActivity(actions, startConnect);\n addTextAnnotation(actions);\n addWorkObjects(appendAction, actions);\n addChangeActorTypeMenu(actions);\n } else if (element.type.includes(ElementTypes.GROUP)) {\n delete actions.delete;\n addTextAnnotation(actions);\n assign(actions, {\n deleteGroup: {\n group: \"edit\",\n className: \"bpmn-icon-trash\",\n title: \"Remove Group without Child-Elements\",\n action: {\n click: function (event, element) {\n modeling.removeGroup(element);\n dirtyFlagService.makeDirty();\n },\n },\n },\n });\n addColorChange(actions);\n } else if (element.type.includes(ElementTypes.ACTIVITY)) {\n moveDeleteActionToEndOfArray(actions);\n\n addColorChange(actions);\n\n assign(actions, {\n delete: {\n group: \"edit\",\n className: \"bpmn-icon-trash\",\n title: \"Remove\",\n action: {\n click: function (event, element) {\n modeling.removeElements({ element });\n dirtyFlagService.makeDirty();\n },\n },\n },\n });\n } else if (element.type.includes(ElementTypes.TEXTANNOTATION)) {\n addColorChange(actions);\n }\n\n return actions;\n };\n\n function moveDeleteActionToEndOfArray(actions) {\n delete actions.delete;\n\n assign(actions, {\n changeDirection: {\n group: \"edit\",\n className: \"icon-domain-story-changeDirection\",\n title: translate(\"Change direction\"),\n action: {\n // event needs to be addressed\n click: function (event, element) {\n changeDirection(element);\n },\n },\n },\n });\n }\n\n function addChangeActorTypeMenu(actions) {\n assign(actions, {\n replace: {\n group: \"edit\",\n className: \"bpmn-icon-screw-wrench\",\n title: translate(\"Change type\"),\n action: {\n click: function (event, element) {\n let position = assign(getReplaceMenuPosition(element), {\n cursor: { x: event.x, y: event.y },\n });\n popupMenu.open(element, \"ds-replace\", position);\n },\n },\n },\n });\n }\n\n function addColorChange(actions) {\n assign(actions, {\n colorChange: {\n group: \"edit\",\n className: \"icon-domain-story-color-picker\",\n title: translate(\"Change color\"),\n action: {\n click: function (event, element) {\n document.dispatchEvent(new CustomEvent(\"openColorPicker\"));\n },\n },\n },\n });\n }\n\n function addTextAnnotation(actions) {\n assign(actions, {\n \"append.text-annotation\": appendAction(\n ElementTypes.TEXTANNOTATION,\n \"bpmn-icon-text-annotation\",\n \"textannotation\",\n \"connect\",\n ),\n });\n }\n\n function addConnectWithActivity(actions, startConnect) {\n assign(actions, {\n connect: {\n group: \"connect\",\n className: \"bpmn-icon-connection\",\n title: translate(\"Connect with activity\"),\n action: {\n click: startConnect,\n dragstart: startConnect,\n },\n },\n });\n }\n\n function addWorkObjects(appendAction, actions) {\n let workObjectTypes = iconDictionaryService.getTypeDictionary(\n ElementTypes.WORKOBJECT,\n );\n workObjectTypes.keysArray().forEach((workObjectType) => {\n let name = workObjectType;\n let icon = iconDictionaryService.getIconForBPMN(\n ElementTypes.WORKOBJECT,\n workObjectType,\n );\n let action = [];\n action[\"append.workObject\" + name] = appendAction(\n `${ElementTypes.WORKOBJECT}${workObjectType}`,\n icon,\n name,\n \"workObjects\",\n );\n assign(actions, action);\n });\n }\n\n function addActors(appendAction, actions) {\n let actorTypes = iconDictionaryService.getTypeDictionary(\n ElementTypes.ACTOR,\n );\n actorTypes.keysArray().forEach((actorType) => {\n let name = actorType;\n let icon = iconDictionaryService.getIconForBPMN(\n ElementTypes.ACTOR,\n actorType,\n );\n let action = [];\n action[\"append.actor\" + name] = appendAction(\n `${ElementTypes.ACTOR}${actorType}`,\n icon,\n name,\n \"actors\",\n );\n assign(actions, action);\n });\n }\n\n function addChangeWorkObjectTypeMenu(actions) {\n assign(actions, {\n replace: {\n group: \"edit\",\n className: \"bpmn-icon-screw-wrench\",\n title: translate(\"Change type\"),\n action: {\n click: function (event, element) {\n let position = assign(getReplaceMenuPosition(element), {\n cursor: { x: event.x, y: event.y },\n });\n popupMenu.open(element, \"ds-replace\", position);\n },\n },\n },\n });\n }\n\n function changeDirection(element) {\n let context;\n let businessObject = element.businessObject;\n let newNumber;\n\n if (element.source.type.includes(ElementTypes.ACTOR)) {\n newNumber = 0;\n } else {\n newNumber = generateAutomaticNumber(element, commandStack);\n }\n context = {\n businessObject: businessObject,\n newNumber: newNumber,\n element: element,\n };\n commandStack.execute(\"activity.directionChange\", context);\n }\n\n function getReplaceMenuPosition(element) {\n let Y_OFFSET = 5;\n\n let diagramContainer = canvas.getContainer(),\n pad = contextPad.getPad(element).html;\n\n let diagramRect = diagramContainer.getBoundingClientRect(),\n padRect = pad.getBoundingClientRect();\n\n let top = padRect.top - diagramRect.top;\n let left = padRect.left - diagramRect.left;\n\n return {\n x: left,\n y: top + padRect.height + Y_OFFSET,\n };\n }\n\n /**\n * create an append action\n *\n * @param {String} type\n * @param {String} className\n * @param {String} [title]\n * @param {String} group\n * @param {Object} [options]\n *\n * @return {Object} descriptor\n */\n function appendAction(type, className, title, group, options) {\n if (typeof title !== \"string\") {\n options = title;\n title = translate(\"{type}\", { type: type.replace(/^domainStory:/, \"\") });\n }\n\n function appendStart(event, element) {\n let shape = elementFactory.createShape(assign({ type: type }, options));\n let context = {\n elements: [shape],\n hints: {},\n source: element,\n };\n create.start(event, shape, context);\n }\n\n return {\n group: group,\n className: className,\n title: \"Append \" + title,\n action: {\n dragstart: startConnect,\n click: appendStart,\n },\n };\n }\n\n function getSelectedBusinessObject(event) {\n const oldColor = selectedElement.businessObject.pickedColor;\n let newColor = event.detail.color;\n if (isHexWithAlpha(oldColor)) {\n newColor = rgbaToHex(newColor);\n }\n\n return {\n businessObject: selectedElement.businessObject,\n newColor: newColor,\n element: selectedElement,\n };\n }\n\n function executeCommandStack(event) {\n const selectedBusinessObject = getSelectedBusinessObject(event);\n\n commandStack.execute(\"element.colorChange\", selectedBusinessObject);\n dirtyFlagService.makeDirty();\n }\n}\n\ninherits(DomainStoryContextPadProvider, ContextPadProvider);\n\nDomainStoryContextPadProvider.$inject = [\n \"injector\",\n \"connect\",\n \"translate\",\n \"elementFactory\",\n \"create\",\n \"canvas\",\n \"contextPad\",\n \"popupMenu\",\n \"replaceMenuProvider\",\n \"commandStack\",\n \"eventBus\",\n \"modeling\",\n];\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\nimport inherits from \"inherits\";\n\nimport BpmnElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\n\nimport { DEFAULT_LABEL_SIZE } from \"bpmn-js/lib/util/LabelUtil\";\n\nimport DomainStoryIdFactory from \"./domainStoryIdFactory\";\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\n\n/**\n * A custom factory that knows how to create BPMN _and_ custom elements.\n */\nexport default function DomainStoryElementFactory(bpmnFactory, moddle) {\n BpmnElementFactory.call(this, bpmnFactory, moddle);\n\n let self = this;\n let domainStoryIdFactory = new DomainStoryIdFactory();\n\n /**\n * create a diagram-js element with the given type (any of shape, connection, label).\n *\n * @param {String} elementType\n * @param {Object} attrs\n *\n * @return {djs.model.Base}\n */\n this.create = function (elementType, attrs) {\n let type = attrs.type;\n\n if (elementType === \"label\") {\n return self.baseCreate(\n elementType,\n assign({ type: \"label\" }, DEFAULT_LABEL_SIZE, attrs),\n );\n }\n\n // add type to businessObject if custom\n if (/^domainStory:/.test(type)) {\n if (!attrs.businessObject) {\n attrs.businessObject = {\n type: type,\n name: attrs.name ? attrs.name : \"\",\n };\n }\n\n if (attrs.id) {\n domainStoryIdFactory.registerId(attrs.id);\n } else {\n attrs.id = domainStoryIdFactory.getId(elementType);\n }\n assign(attrs.businessObject, {\n id: attrs.id,\n });\n\n let id = attrs.id;\n attrs.businessObject.get = function (key) {\n if (key === \"id\") {\n return id;\n }\n };\n attrs.businessObject.set = function (key, value) {\n if (key === \"id\") {\n assign(attrs.businessObject, { id: value });\n }\n };\n\n if (!attrs.businessObject.$type) {\n assign(attrs.businessObject, { $type: \"Element\" });\n }\n assign(attrs.businessObject, { di: {} });\n if (!attrs.businessObject.$descriptor) {\n assign(attrs.businessObject, { $descriptor: {} });\n }\n\n // add width and height if shape\n if (\n (!/:activity$/.test(type) || !/:connection$/.test(type)) &&\n !((/:group$/.test(type) && attrs.height) || attrs.width)\n ) {\n assign(attrs, self._getCustomElementSize(type));\n }\n\n if (!(\"$instanceOf\" in attrs.businessObject)) {\n // ensure we can use ModelUtil#is for type checks\n Object.defineProperty(attrs.businessObject, \"$instanceOf\", {\n value: function (type) {\n return this.type === type;\n },\n });\n }\n\n return self.baseCreate(elementType, attrs);\n }\n\n return self.createBpmnElement(elementType, attrs);\n };\n}\n\ninherits(DomainStoryElementFactory, BpmnElementFactory);\n\nDomainStoryElementFactory.$inject = [\"bpmnFactory\", \"moddle\"];\n\n/**\n * returns the default size of custom shapes.\n *\n * the following example shows an interface on how\n * to setup the custom shape's dimensions.\n * *\n * @param {String} type\n *\n * @return {Dimensions} a {width, height} object representing the size of the element\n */\nDomainStoryElementFactory.prototype._getCustomElementSize = function (type) {\n let shapes = {\n __default: { width: 75, height: 75 },\n [ElementTypes.TEXTANNOTATION]: { width: 100, height: 30 },\n [ElementTypes.GROUP]: { width: 525, height: 275 },\n };\n\n return shapes[type] || shapes.__default;\n};\n\nclass Dimensions {\n width;\n height;\n}\n","\"use strict\";\n\nlet idList = [];\n\nexport default function DomainStoryIdFactory() {}\n\nDomainStoryIdFactory.prototype.getId = function (type) {\n return generateId(type);\n};\n\nDomainStoryIdFactory.prototype.registerId = function (id) {\n idList.push(id);\n};\n\nfunction generateId(type) {\n let idNumber = fourDigitsId();\n\n let id = type + \"_\" + idSuffix(idNumber);\n\n while (containsId(id)) {\n idNumber++;\n\n id = type + \"_\" + idSuffix(idNumber);\n }\n\n idList.push(id);\n return id;\n}\n\nfunction idSuffix(idNumber) {\n let id;\n if (idNumber > 9999) {\n id = 0;\n } else if (idNumber < 10) {\n id = \"000\" + idNumber;\n } else if (idNumber < 100) {\n id = \"00\" + idNumber;\n } else if (idNumber < 1000) {\n id = \"0\" + idNumber;\n } else {\n id = \"\" + idNumber;\n }\n return id;\n}\n\nfunction fourDigitsId() {\n return Math.floor(Math.random() * 10000);\n}\n\nexport function containsId(id) {\n let same = false;\n idList.forEach((element) => {\n if (id === element) {\n same = true;\n }\n });\n return same;\n}\n","\"use strict\";\n\nimport inherits from \"inherits\";\nimport BaseRenderer from \"diagram-js/lib/draw/BaseRenderer\";\nimport Ids from \"ids\";\nimport { getAnnotationBoxHeight } from \"src/app/tools/modeler/bpmn/modeler/labeling/dsLabelEditingPreview\";\nimport { componentsToPath, createLine } from \"diagram-js/lib/util/RenderUtil\";\nimport {\n append as svgAppend,\n attr as svgAttr,\n classes as svgClasses,\n create as svgCreate,\n} from \"tiny-svg\";\nimport { query as domQuery } from \"min-dom\";\nimport { assign, isObject } from \"min-dash\";\nimport { getNumberStash } from \"src/app/tools/modeler/bpmn/modeler/labeling/dsLabelEditingProvider\";\nimport {\n addNumberToRegistry,\n generateAutomaticNumber,\n numberBoxDefinitions,\n} from \"src/app/tools/modeler/bpmn/modeler/numbering/numbering\";\n\nimport { calculateTextWidth } from \"src/app/tools/modeler/bpmn/modeler/labeling/dsLabelUtil\";\nimport {\n countLines,\n labelPosition,\n} from \"src/app/tools/modeler/bpmn/modeler/labeling/position\";\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport { angleBetween } from \"../../../../utils/mathExtensions\";\nimport { isCustomIcon, isCustomSvgIcon } from \"./util\";\n\nlet RENDERER_IDS = new Ids();\nlet numbers = [];\nconst DEFAULT_COLOR = \"#000000\";\n\n/**\n * a renderer that knows how to render custom elements.\n */\nlet _iconDictionaryService;\nlet _elementRegistryService;\nlet _dirtyFlagService;\n\nexport function initializeRenderer(\n iconDictionaryService,\n elementRegistryService,\n dirtyFlagService,\n) {\n _iconDictionaryService = iconDictionaryService;\n _elementRegistryService = elementRegistryService;\n _dirtyFlagService = dirtyFlagService;\n}\n\nexport default function DomainStoryRenderer(\n eventBus,\n styles,\n canvas,\n textRenderer,\n pathMap,\n commandStack,\n) {\n BaseRenderer.call(this, eventBus, 2000);\n\n let rendererId = RENDERER_IDS.next();\n let markers = {};\n let computeStyle = styles.computeStyle;\n\n // generate the automatic Number for an activity originating from an actor\n function generateActivityNumber(parentGfx, element, box) {\n // whenever we want to edit an activity, it gets redrawn as a new object\n // and the custom information is lost,\n // so we stash it before the editing occurs and set the value here\n\n let numberStash = getNumberStash();\n let semantic = element.businessObject;\n\n if (numberStash.use) {\n semantic.number = numberStash.number;\n }\n\n numbers[semantic.number] = true;\n box.x -= 26;\n box.y -= 16;\n\n if (semantic.number < 10) {\n box.x += 3;\n }\n\n let newRenderedNumber = renderNumber(\n parentGfx,\n semantic.number,\n numberStyle(box),\n element.type,\n );\n addNumberToRegistry(newRenderedNumber, semantic.number);\n }\n\n // style functions\n function numberStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n position: \"absolute\",\n }),\n };\n }\n\n function backgroundBoxStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n fontSize: 50,\n position: \"absolute\",\n fontFamily: \"Courier New\",\n }),\n };\n }\n\n function backgroundDotStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"white\",\n fontSize: 150,\n position: \"absolute\",\n fontFamily: \"Courier\",\n }),\n };\n }\n\n // render functions\n // render label associated with actors and workobjects\n function renderEmbeddedLabel(parentGfx, element, align, padding) {\n let businessObject = element.businessObject;\n return renderLabel(\n parentGfx,\n businessObject.name,\n {\n box: element,\n align: align,\n padding: padding ? padding : 0,\n style: {\n fill: \"#000000\",\n },\n },\n element.type,\n );\n }\n\n // render label associated with activities\n function renderExternalLabel(parentGfx, element) {\n let semantic = element.businessObject;\n let waypoints = element.waypoints;\n let lines = countLines(semantic.name);\n\n if (element.waypoints != null) {\n let position = labelPosition(waypoints, lines);\n let startPoint = element.waypoints[position.selected];\n let endPoint = element.waypoints[position.selected + 1];\n let angle = angleBetween(startPoint, endPoint);\n let alignment = \"left\";\n let boxWidth = 500;\n let xStart = position.x;\n\n // if the activity is horizontal, we want to center the label\n if (angle === 0 || angle === 180) {\n boxWidth = Math.abs(startPoint.x - endPoint.x);\n alignment = \"center\";\n xStart =\n (startPoint.x + endPoint.x) / 2 - calculateTextWidth(semantic.name);\n }\n\n let box = {\n textAlign: alignment,\n width: boxWidth,\n height: 30,\n x: xStart,\n y: position.y,\n };\n\n if (semantic.name && semantic.name.length) {\n return renderLabel(\n parentGfx,\n semantic.name,\n {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n wordWrap: \"break-word\",\n overflowWrap: \"break-word\",\n hyphens: \"auto\",\n }),\n },\n element.type,\n );\n }\n }\n }\n\n // render the number associated with an activity\n function renderExternalNumber(parentGfx, element) {\n if (element && element.source) {\n let semantic = element.businessObject;\n\n let box = numberBoxDefinitions(element);\n\n if (\n semantic.number == null &&\n element.source.type &&\n element.source.type.includes(ElementTypes.ACTOR)\n ) {\n generateAutomaticNumber(element, commandStack);\n }\n\n // render the background for the number\n if (semantic.number && element.source.type.includes(ElementTypes.ACTOR)) {\n generateActivityNumber(parentGfx, element, box);\n } else {\n semantic.number = null;\n }\n }\n }\n\n // render a number on the canvas\n function renderNumber(parentGfx, number, options, type) {\n if (number < 10) {\n number = String(number);\n }\n number = String(number);\n let text = textRenderer.createText(number || \"\", options);\n let height = 0;\n\n svgClasses(text).add(\"djs-labelNumber\");\n\n setCoordinates(type, text, options, height, parentGfx);\n\n // !IMPORTANT!\n // When converting svg-files via Inkscape or Photoshop the svg-circle is converted to a black dot that obscures the number.\n // To circumvent this, we draw an arc.\n let circle = svgCreate(\"path\");\n let radius = 11;\n let x = options.box.x + 18 + (number > 9 ? 3 : 0);\n let y = options.box.y - radius + 7;\n svgAttr(circle, {\n d: `\n M ${x} ${y}\n m ${radius},0\n a ${radius},${radius} 0 1,0 ${-radius * 2},0\n a ${radius},${radius} 0 1,0 ${radius * 2},0\n `,\n fill: \"white\",\n stroke: \"black\",\n });\n\n svgAppend(parentGfx, circle);\n svgAppend(parentGfx, text);\n\n return text;\n }\n\n // the coordinates of the activity label must be set directly and will not be taken from the box\n function setCoordinates(type, text, options, height, parentGfx) {\n if (/:activity$/.test(type)) {\n text.innerHTML = manipulateInnerHTMLXLabel(\n text.children,\n options.box.x,\n 0,\n );\n text.innerHTML = manipulateInnerHTMLYLabel(\n text.children,\n options.box.y,\n 0,\n );\n } else if (/:actor/.test(type)) {\n height = parentGfx.firstChild.attributes.height.nodeValue;\n text.innerHTML = manipulateInnerHTMLYLabel(text.children, height, 0);\n } else if (/:workObject/.test(type)) {\n height = parentGfx.firstChild.attributes.height.nodeValue;\n text.innerHTML = manipulateInnerHTMLYLabel(text.children, height, 26);\n }\n }\n\n // render a label on the canvas\n function renderLabel(parentGfx, label, options, type) {\n let text = textRenderer.createText(label || \"\", options);\n let height = 0;\n\n svgClasses(text).add(\"djs-label\");\n setCoordinates(type, text, options, height, parentGfx);\n\n svgAppend(parentGfx, text);\n return text;\n }\n\n // determine the Y-coordinate of the label / number to be rendered\n function manipulateInnerHTMLYLabel(children, y, offset) {\n if (children) {\n let result = \"\";\n for (let i = 0; i < children.length; i++) {\n result += children[i].outerHTML.replace(\n /y=\"-?\\d*.\\d*\"/,\n 'y=\"' + (Number(y) + offset + 14 * i) + '\"',\n );\n }\n return result;\n }\n }\n\n // determine the X-coordinate of the label / number to be rendered\n function manipulateInnerHTMLXLabel(children, x, offset) {\n if (children) {\n let result = \"\";\n for (let i = 0; i < children.length; i++) {\n result += children[i].outerHTML.replace(\n /x=\"-?\\d*.\\d*\"/,\n 'x=\"' + (Number(x) + offset + 14) + '\"',\n );\n }\n return result;\n }\n }\n\n // draw functions\n this.drawGroup = function (parentGfx, element) {\n if (!element.businessObject.pickedColor) {\n element.businessObject.pickedColor = DEFAULT_COLOR;\n }\n let rect = drawRect(\n parentGfx,\n element.width,\n element.height,\n 0,\n assign(\n {\n fill: \"none\",\n stroke: element.businessObject.pickedColor,\n },\n element.attrs,\n ),\n );\n renderEmbeddedLabel(parentGfx, element, \"left-top\", 8);\n\n return rect;\n };\n\n function applyColorToCustomSvgIcon(pickedColor, iconSvg) {\n if (!pickedColor) {\n return iconSvg;\n }\n const [rest, base64Svg] = iconSvg.split(\"base64,\");\n const svg = atob(base64Svg);\n const coloredSvg = applyColorToIcon(pickedColor, svg);\n const encodedColoredSvg = btoa(coloredSvg);\n return rest + \"base64,\" + encodedColoredSvg;\n }\n\n function applyColorToIcon(pickedColor = DEFAULT_COLOR, iconSvg) {\n const match = iconSvg.match(\n /fill=\\s*\"(?!none).*?\"|fill:\\s*[#r]\\w*[;\\s]{1}/,\n );\n if (match && match.some((it) => it)) {\n return iconSvg\n .replaceAll(/fill=\\s*\"(?!none).*?\"/g, `fill=\"${pickedColor} \"`)\n .replaceAll(/fill:\\s*[#r]\\w*[;\\s]{1}/g, `fill:${pickedColor};`);\n } else {\n const index = iconSvg.indexOf(\"' +\n ''\n );\n } else {\n return applyColorToIcon(pickedColor, icon);\n }\n }\n\n this.drawActor = function (parent, element) {\n let svgDynamicSizeAttributes = {\n width: element.width,\n height: element.height,\n };\n let iconSRC = _iconDictionaryService.getTypeIconSRC(\n ElementTypes.ACTOR,\n ElementTypes.getIconId(element.type),\n );\n iconSRC = getIconSvg(iconSRC, element);\n let actor = svgCreate(iconSRC);\n\n svgAttr(actor, svgDynamicSizeAttributes);\n svgAppend(parent, actor);\n\n renderEmbeddedLabel(parent, element, \"center\", -5);\n return actor;\n };\n\n this.drawWorkObject = function (parent, element) {\n let svgDynamicSizeAttributes = {\n width: element.width * 0.65,\n height: element.height * 0.65,\n x: element.width / 2 - 25,\n y: element.height / 2 - 25,\n },\n workObject;\n let iconSRC = _iconDictionaryService.getTypeIconSRC(\n ElementTypes.WORKOBJECT,\n ElementTypes.getIconId(element.type),\n );\n iconSRC = getIconSvg(iconSRC, element);\n workObject = svgCreate(iconSRC);\n\n svgAttr(workObject, svgDynamicSizeAttributes);\n svgAppend(parent, workObject);\n renderEmbeddedLabel(parent, element, \"center\", -5);\n\n return workObject;\n };\n\n function useColorForActivity(element) {\n if (!element.businessObject.pickedColor) {\n element.businessObject.pickedColor = \"black\";\n }\n let attrs = \"\";\n return computeStyle(attrs, {\n stroke: element.businessObject.pickedColor,\n fill: \"none\",\n strokeWidth: 1.5,\n strokeLinejoin: \"round\",\n markerEnd: marker(\n \"activity\",\n \"black\",\n element.businessObject.pickedColor,\n ),\n });\n }\n\n this.drawActivity = function (p, element) {\n adjustForTextOverlap(element);\n\n if (element) {\n let attrs = useColorForActivity(element);\n\n let x = svgAppend(p, createLine(element.waypoints, attrs));\n renderExternalLabel(p, element);\n renderExternalNumber(p, element);\n\n // just adjusting the start- and endpoint of the connection-element moves only the drawn connection,\n // not the interactive line. This can be fixed by manually overriding the points of the interactive polyline\n // in the HTMl with the points of the drawn one.\n // this however does not adjust the surrounding box of the connection.\n fixConnectionInHTML(p.parentElement);\n\n return x;\n }\n };\n\n function checkIfPointOverlapsText(point, source) {\n if (point.y > source.y + 60) {\n if (point.x > source.x + 3 && point.x < source.x + 72) {\n let lineOffset = getLineOffset(source);\n if (source.y + 75 + lineOffset > point.y) {\n point.y += lineOffset;\n }\n }\n }\n }\n\n function adjustForTextOverlap(element) {\n let source = element.source;\n let target = element.target;\n\n let waypoints = element.waypoints;\n let startPoint = waypoints[0];\n let endPoint = waypoints[waypoints.length - 1];\n\n if (startPoint && endPoint && source && target) {\n checkIfPointOverlapsText(startPoint, source);\n checkIfPointOverlapsText(endPoint, source);\n }\n }\n\n function getLineOffset(element) {\n let id = element.id;\n let offset = 0;\n\n let objects = document.getElementsByClassName(\"djs-element djs-shape\");\n for (let i = 0; i < objects.length; i++) {\n let data_id = objects.item(i).getAttribute(\"data-element-id\");\n if (data_id === id) {\n let object = objects.item(i);\n let text = object.getElementsByTagName(\"text\")[0];\n let tspans = text.getElementsByTagName(\"tspan\");\n let tspan = tspans[tspans.length - 1];\n offset = tspan.getAttribute(\"y\");\n }\n }\n return offset - 70;\n }\n\n function fixConnectionInHTML(wantedConnection) {\n if (wantedConnection) {\n let polylines = wantedConnection.getElementsByTagName(\"polyline\");\n if (polylines.length > 1) {\n polylines[1].setAttribute(\n \"points\",\n polylines[0].getAttribute(\"points\"),\n );\n }\n }\n }\n\n this.drawDSConnection = function (p, element) {\n let attrs = \"\";\n attrs = computeStyle(attrs, {\n stroke: element.businessObject.pickedColor ?? \"black\",\n strokeWidth: 1.5,\n strokeLinejoin: \"round\",\n strokeDasharray: \"5, 5\",\n });\n\n return svgAppend(p, createLine(element.waypoints, attrs));\n };\n\n this.drawAnnotation = function (parentGfx, element) {\n let style = {\n fill: \"none\",\n stroke: \"none\",\n };\n\n let text = element.businessObject.text || \"\";\n if (element.businessObject.text) {\n let height = element.height ?? 0;\n\n if (height === 0 && element.businessObject.number) {\n height = element.businessObject.number;\n }\n assign(element, {\n height: height,\n });\n\n // for some reason the keyword height is not exported, so we use another, which we know will be exported,\n // to ensure persistent annotation heights between sessions\n assign(element.businessObject, {\n number: height,\n });\n }\n\n let textElement = drawRect(\n parentGfx,\n element.width,\n element.height,\n 0,\n 0,\n style,\n );\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n drawPath(parentGfx, textPathData, {\n stroke: element.businessObject.pickedColor ?? \"black\",\n });\n\n renderLabel(parentGfx, text, {\n box: element,\n align: \"left-top\",\n padding: 5,\n style: {\n fill: element.businessObject.pickedColor ?? \"black\",\n },\n });\n\n return textElement;\n };\n\n // draw helper functions\n function drawPath(parentGfx, d, attrs) {\n attrs = computeStyle(attrs, [\"no-fill\"], {\n strokeWidth: 2,\n stroke: \"black\",\n });\n\n let path = svgCreate(\"path\");\n svgAttr(path, { d: d });\n svgAttr(path, attrs);\n\n svgAppend(parentGfx, path);\n\n return path;\n }\n\n function drawRect(parentGfx, width, height, r, offset, attrs) {\n if (isObject(offset)) {\n attrs = offset;\n offset = 0;\n }\n\n offset = offset || 0;\n attrs = computeStyle(attrs, {\n stroke: \"black\",\n strokeWidth: 2,\n fill: \"white\",\n });\n\n let rect = svgCreate(\"rect\");\n svgAttr(rect, {\n x: offset,\n y: offset,\n width: width - offset * 2,\n height: height - offset * 2,\n rx: r,\n ry: r,\n });\n\n svgAttr(rect, attrs);\n svgAppend(parentGfx, rect);\n\n return rect;\n }\n\n // marker functions\n function marker(type, fill, stroke) {\n let id = type + \"-\" + fill + \"-\" + stroke + \"-\" + rendererId;\n\n if (!markers[id]) {\n createMarker(type, fill, stroke);\n }\n return \"url(#\" + id + \")\";\n }\n\n function createMarker(type, fill, stroke) {\n let id = type + \"-\" + fill + \"-\" + stroke + \"-\" + rendererId;\n\n if (type === \"activity\") {\n let sequenceflowEnd = svgCreate(\"path\");\n svgAttr(sequenceflowEnd, { d: \"M 1 5 L 11 10 L 1 15 Z\" });\n\n addMarker(id, {\n element: sequenceflowEnd,\n ref: { x: 11, y: 10 },\n scale: 0.5,\n attrs: {\n fill: stroke,\n stroke: stroke,\n },\n });\n }\n }\n\n function addMarker(id, options) {\n let attrs = assign(\n {\n fill: \"black\",\n strokeWidth: 1,\n strokeLinecap: \"round\",\n strokeDasharray: \"none\",\n },\n options.attrs,\n );\n\n let ref = options.ref || { x: 0, y: 0 };\n let scale = options.scale || 1;\n\n // resetting stroke dash array\n if (attrs.strokeDasharray === \"none\") {\n attrs.strokeDasharray = [10000, 1];\n }\n\n let marker = svgCreate(\"marker\");\n\n svgAttr(options.element, attrs);\n svgAppend(marker, options.element);\n svgAttr(marker, {\n id: id,\n viewBox: \"0 0 20 20\",\n refX: ref.x,\n refY: ref.y,\n markerWidth: 20 * scale,\n markerHeight: 20 * scale,\n orient: \"auto\",\n });\n\n let defs = domQuery(\"defs\", canvas._svg);\n if (!defs) {\n defs = svgCreate(\"defs\");\n svgAppend(canvas._svg, defs);\n }\n svgAppend(defs, marker);\n markers[id] = marker;\n }\n\n // path functions\n this.getWorkObjectPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n\n this.getGroupPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n\n this.getActivityPath = function (connection) {\n let waypoints = connection.waypoints.map(function (p) {\n return p.original || p;\n });\n\n let activityPath = [[\"M\", waypoints[0].x, waypoints[0].y]];\n\n waypoints.forEach(function (waypoint, index) {\n if (index !== 0) {\n activityPath.push([\"L\", waypoint.x, waypoint.y]);\n }\n });\n return componentsToPath(activityPath);\n };\n\n this.getActorPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n}\n\ninherits(DomainStoryRenderer, BaseRenderer);\n\nDomainStoryRenderer.$inject = [\n \"eventBus\",\n \"styles\",\n \"canvas\",\n \"textRenderer\",\n \"pathMap\",\n \"commandStack\",\n];\n\nDomainStoryRenderer.prototype.canRender = function (element) {\n return /^domainStory:/.test(element.type);\n};\n\nDomainStoryRenderer.prototype.drawShape = function (p, element) {\n // polyfill for tests\n if (!String.prototype.startsWith) {\n Object.defineProperty(String.prototype, \"startsWith\", {\n value: function (search, pos) {\n pos = !pos || pos < 0 ? 0 : +pos;\n return this.substring(pos, pos + search.length) === search;\n },\n });\n }\n\n let type = element.type;\n element.businessObject.type = type;\n\n _elementRegistryService.correctInitialize();\n _dirtyFlagService.makeDirty();\n\n if (type.includes(ElementTypes.ACTOR)) {\n return this.drawActor(p, element);\n } else if (type.includes(ElementTypes.WORKOBJECT)) {\n return this.drawWorkObject(p, element);\n } else if (type.includes(ElementTypes.TEXTANNOTATION)) {\n return this.drawAnnotation(p, element);\n } else if (type.includes(ElementTypes.GROUP)) {\n return this.drawGroup(p, element);\n }\n};\n\nDomainStoryRenderer.prototype.getShapePath = function (shape) {\n let type = shape.type;\n\n if (type.includes(ElementTypes.ACTOR)) {\n return this.getActorPath(shape);\n } else if (type.includes(ElementTypes.WORKOBJECT)) {\n return this.getWorkObjectPath(shape);\n } else if (type.includes(ElementTypes.GROUP)) {\n return this.getGroupPath(shape);\n }\n};\n\nDomainStoryRenderer.prototype.drawConnection = function (p, element) {\n let type = element.type;\n\n _dirtyFlagService.makeDirty();\n\n // fixes activities that were copy-pasted\n if (!element.businessObject.type) {\n element.businessObject.type = type;\n }\n if (type === ElementTypes.ACTIVITY) {\n return this.drawActivity(p, element);\n } else if (type === ElementTypes.CONNECTION) {\n return this.drawDSConnection(p, element);\n }\n};\n\n// creates a SVG path that describes a rectangle which encloses the given shape.\nfunction getRectPath(shape) {\n let offset = 5;\n let x = shape.x,\n y = shape.y,\n width = shape.width / 2 + offset,\n height = shape.height / 2 + offset;\n\n return [\n [\"M\", x, y],\n [\"l\", width, 0],\n [\"l\", width, height],\n [\"l\", -width, height],\n [\"l\", -width, 0],\n [\"z\"],\n ];\n}\n","\"use strict\";\n\nimport { assign, every, reduce } from \"min-dash\";\n\nimport inherits from \"inherits\";\n\nimport RuleProvider from \"diagram-js/lib/features/rules/RuleProvider\";\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport { is } from \"./util\";\n\nconst HIGH_PRIORITY = 1500;\nconst MIN_SIZE = 125;\n\nfunction isDomainStory(element) {\n return element && /^domainStory:/.test(element.type);\n}\n\nfunction isDomainStoryGroup(element) {\n return element && /^domainStory:group/.test(element.type);\n}\n\nfunction isActor(element) {\n return element && /^domainStory:actor\\w*/.test(element.type);\n}\n\nfunction isWorkObject(element) {\n return element && /^domainStory:workObject/.test(element.type);\n}\n\nfunction isActivity(element) {\n return element && /^domainStory:activity/.test(element.type);\n}\n\nfunction isConnection(element) {\n return element && /^domainStory:connection/.test(element.type);\n}\n\nfunction isAnnotation(element) {\n return element && /^domainStory:textAnnotation/.test(element.type);\n}\n\n/**\n * can source and target be connected?\n */\nfunction canConnect(source, target) {\n // only judge about two custom elements\n if (\n isDomainStoryGroup(target) ||\n !isDomainStory(source) ||\n !isDomainStory(target)\n ) {\n return;\n }\n\n // do not allow a connection from one element to itself\n if (source === target) {\n return;\n }\n\n // do not allow a connection between two actors\n if (isActor(source) && isActor(target)) {\n return;\n }\n\n // do not allow a connection, where the source or target is an activity\n if (isActivity(source) || isActivity(target)) {\n return;\n }\n\n // do not allow a connection, where the source or target is an annotation connection\n if (isConnection(source) || isConnection(target)) {\n return;\n }\n\n // do not allow a connection to a connection(the special type of connection between an element and a comment box)\n // when the target is an annotation, the connection type is an annotation connection instead of an activity\n if (isAnnotation(target)) {\n return { type: ElementTypes.CONNECTION };\n }\n\n return { type: ElementTypes.ACTIVITY };\n}\n\nfunction canResize(shape, newBounds) {\n if (is(shape, ElementTypes.GROUP)) {\n if (newBounds) {\n let lowerLeft = { x: shape.x, y: shape.y + shape.height };\n let lowerRight = { x: shape.x + shape.width, y: shape.y + shape.height };\n let upperRight = { x: shape.x + shape.width, y: shape.y };\n\n if (newBounds.x !== shape.x && newBounds.y !== shape.y) {\n // upper left\n if (newBounds.x > lowerRight.x - MIN_SIZE) {\n assign(newBounds, { x: lowerRight.x - MIN_SIZE });\n }\n if (newBounds.y > lowerRight.y - MIN_SIZE) {\n assign(newBounds, { y: lowerRight.y - MIN_SIZE });\n }\n }\n\n if (newBounds.x !== shape.x && newBounds.y === shape.y) {\n // lower left\n if (newBounds.x > upperRight.x - MIN_SIZE) {\n assign(newBounds, { x: upperRight.x - MIN_SIZE });\n }\n }\n\n if (newBounds.x === shape.x && newBounds.y !== shape.y) {\n // upper right\n if (newBounds.y > lowerLeft.y - MIN_SIZE) {\n assign(newBounds, { y: lowerLeft.y - MIN_SIZE });\n }\n }\n\n if (newBounds.height < MIN_SIZE) {\n assign(newBounds, {\n height: MIN_SIZE,\n });\n }\n if (newBounds.width < MIN_SIZE) {\n assign(newBounds, {\n width: MIN_SIZE,\n });\n }\n }\n return true;\n }\n\n return false;\n}\n\nfunction canAttach(elements, target, source) {\n if (!Array.isArray(elements)) {\n elements = [elements];\n }\n\n // disallow appending as boundary event\n if (source) {\n return false;\n }\n\n // only (re-)attach one element at a time\n if (elements.length !== 1) {\n return false;\n }\n\n // allow default move operation\n if (!target) {\n return true;\n }\n\n // only allow drop on DomainStory Elements\n if (!isDomainStory(target)) {\n return false;\n }\n\n return \"attach\";\n}\n\nfunction canConnectToAnnotation(source, target, connection) {\n // do not allow an activity connect to an annotation\n if (isActivity(connection) && isAnnotation(target)) {\n return false;\n }\n\n // do not allow an annotation connection between two annotations\n if (\n isConnection(connection) &&\n isAnnotation(source) &&\n isAnnotation(target)\n ) {\n return false;\n }\n\n // do not allow an annotation connection between an actor or workObject and anything except an annotation\n return !(\n isConnection(connection) &&\n !isAnnotation(target) &&\n (isActor(source) || isWorkObject(source))\n );\n}\n\n/**\n * specific rules for custom elements\n */\nexport default function DomainStoryRules(eventBus) {\n RuleProvider.call(this, eventBus);\n}\n\ninherits(DomainStoryRules, RuleProvider);\n\nDomainStoryRules.$inject = [\"eventBus\"];\n\nDomainStoryRules.prototype.init = function () {\n /**\n * can shape be created on target container?\n */\n function canCreate(shape, target) {\n // only judge about custom elements\n if (!isDomainStory(shape)) {\n return;\n }\n\n // allow creation just on groups\n return !isDomainStory(target) || isDomainStoryGroup(target);\n }\n\n this.addRule(\"elements.create\", function (context) {\n const elements = context.elements,\n position = context.position,\n target = context.target;\n\n return every(elements, function (element) {\n if (isConnection(element)) {\n return canConnect(element.source, element.target, element);\n }\n\n if (element.host) {\n return canAttach(element, element.host, null, position);\n }\n\n return canCreate(element, target, null, position);\n });\n });\n\n this.addRule(\"elements.move\", HIGH_PRIORITY, function (context) {\n let target = context.target,\n shapes = context.shapes;\n\n let type;\n\n // do not allow mixed movements of custom / BPMN shapes\n // if any shape cannot be moved, the group cannot be moved, too\n\n // reject, if we have at least one\n // custom element that cannot be moved\n return reduce(\n shapes,\n function (result, s) {\n if (type === undefined) {\n type = isDomainStory(s);\n }\n\n if (type !== isDomainStory(s) || result === false) {\n return false;\n }\n\n return canCreate(s, target);\n },\n undefined,\n );\n });\n\n this.addRule(\"shape.create\", HIGH_PRIORITY, function (context) {\n let target = context.target,\n shape = context.shape;\n\n return canCreate(shape, target);\n });\n\n this.addRule(\"connection.create\", HIGH_PRIORITY, function (context) {\n let source = context.source,\n target = context.target;\n\n return canConnect(source, target);\n });\n\n this.addRule(\"connection.reconnect\", HIGH_PRIORITY, function (context) {\n let connection = context.connection,\n source = context.hover || context.source,\n target = context.target;\n\n // --------------------------------------------------------------\n let result = canConnectToAnnotation(source, target, connection);\n\n if (!result) {\n return;\n }\n\n // --------------------------------------------------------------\n\n return canConnect(source, target, connection);\n });\n\n this.addRule(\"shape.resize\", function (context) {\n let shape = context.shape,\n newBounds = context.newBounds;\n\n return canResize(shape, newBounds);\n });\n};\n\nDomainStoryRules.prototype.canConnect = canConnect;\nDomainStoryRules.prototype.canAttach = canAttach;\nDomainStoryRules.prototype.isDomainStory = isDomainStory;\nDomainStoryRules.prototype.canResize = canResize;\n","\"use strict\";\n\nimport inherits from \"inherits\";\n\nimport { pick, assign } from \"min-dash\";\n\nimport CommandInterceptor from \"diagram-js/lib/command/CommandInterceptor\";\n\nimport {\n add as collectionAdd,\n remove as collectionRemove,\n} from \"diagram-js/lib/util/Collections\";\n\nimport { reworkGroupElements } from \"./util\";\nimport { ElementTypes } from \"../../../../domain/entities/elementTypes\";\n\n/**\n * a handler responsible for updating the custom element's businessObject\n * once changes on the diagram happen.\n */\nexport default function DomainStoryUpdater(eventBus, bpmnjs) {\n CommandInterceptor.call(this, eventBus);\n\n function updateCustomElement(e) {\n let context = e.context,\n shape = context.shape,\n businessObject = shape.businessObject;\n\n if (!shape || !shape.type.includes(ElementTypes.DOMAINSTORY)) {\n return;\n }\n\n let parent = shape.parent;\n let customElements = bpmnjs._customElements;\n\n // make sure element is added / removed from bpmnjs.customElements\n if (!parent) {\n collectionRemove(customElements, businessObject);\n } else {\n collectionAdd(customElements, businessObject);\n }\n\n // save custom element position\n assign(businessObject, pick(shape, [\"x\", \"y\"]));\n\n // save custom element size if resizable\n if (shape.type === ElementTypes.GROUP) {\n assign(businessObject, pick(shape, [\"height\", \"width\"]));\n\n // rework the child-parent relations if a group was moved, such that all Objects that are visually in the group are also associated with it\n // since we do not have access to the standard-canvas object here, we cannot use the function correctGroupChildren() from DSLabelUtil\n if (parent != null) {\n reworkGroupElements(parent, shape);\n }\n }\n if (\n shape &&\n shape.parent &&\n \"type\" in shape.parent &&\n shape.parent.type === ElementTypes.GROUP\n ) {\n assign(businessObject, {\n parent: shape.parent.id,\n });\n }\n }\n\n function updateCustomConnection(e) {\n let context = e.context,\n connection = context.connection,\n source = connection.source,\n target = connection.target,\n businessObject = connection.businessObject;\n\n if (e.newTarget) {\n target = e.newTarget;\n }\n if (e.newSource) {\n source = e.newSource;\n }\n\n let parent = connection.parent;\n let customElements = bpmnjs._customElements;\n\n // make sure element is added / removed from bpmnjs.customElements\n if (!parent) {\n collectionRemove(customElements, businessObject);\n } else {\n collectionAdd(customElements, businessObject);\n }\n\n // update waypoints\n assign(businessObject, {\n waypoints: copyWaypoints(connection),\n });\n\n if (source) {\n if (!businessObject.source) {\n assign(businessObject, { source: source.id });\n } else {\n businessObject.source = source.id;\n }\n }\n if (target) {\n if (!businessObject.target) {\n assign(businessObject, { target: target.id });\n } else {\n businessObject.target = target.id;\n }\n }\n }\n\n function copyWaypoints(connection) {\n return connection.waypoints.map(function (p) {\n if (p.original) {\n return {\n original: {\n x: p.original.x,\n y: p.original.y,\n },\n x: p.x,\n y: p.y,\n };\n } else {\n return {\n x: p.x,\n y: p.y,\n };\n }\n });\n }\n\n this.executed(\n [\n \"shape.create\",\n \"shape.move\",\n \"shape.delete\",\n \"shape.resize\",\n \"shape.removeGroupWithChildren\",\n ],\n ifDomainStoryElement(updateCustomElement),\n );\n\n this.reverted(\n [\n \"shape.create\",\n \"shape.move\",\n \"shape.delete\",\n \"shape.resize\",\n \"shape.removeGroupWithChildren\",\n ],\n ifDomainStoryElement(updateCustomElement),\n );\n\n this.executed(\n [\n \"connection.create\",\n \"connection.reconnect\",\n \"connection.updateWaypoints\",\n \"connection.delete\",\n \"connection.layout\",\n \"connection.move\",\n ],\n ifDomainStoryElement(updateCustomConnection),\n );\n\n this.reverted(\n [\n \"connection.create\",\n \"connection.reconnect\",\n \"connection.updateWaypoints\",\n \"connection.delete\",\n \"connection.layout\",\n \"connection.move\",\n ],\n ifDomainStoryElement(updateCustomConnection),\n );\n}\n\n// check if element in the context of an event is a domainStory element\nfunction ifDomainStoryElement(fn) {\n return (event) => {\n const context = event.context;\n const element = context.shape || context.connection;\n\n if (isDomainStory(element)) {\n fn(event);\n }\n };\n}\n\nfunction isDomainStory(element) {\n return element && /domainStory:/.test(element.type);\n}\n\ninherits(DomainStoryUpdater, CommandInterceptor);\n\nDomainStoryUpdater.$inject = [\"eventBus\", \"bpmnjs\"];\n","\"use strict\";\n\nimport DomainStoryElementFactory from \"./domainStoryElementFactory\";\nimport DomainStoryRenderer from \"./domainStoryRenderer\";\nimport DomainStoryPalette from \"./palette/domainStoryPalette\";\nimport DomainStoryRules from \"./domainStoryRules\";\nimport DomainStoryUpdater from \"./domainStoryUpdater\";\nimport ElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\nimport CreateModule from \"diagram-js/lib/features/create\";\nimport PathMap from \"bpmn-js/lib/draw/PathMap\";\nimport PopupMenuModule from \"bpmn-js/lib/features/popup-menu\";\nimport ContextPadModule from \"diagram-js/lib/features/context-pad\";\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"./updateHandler/updateLabelHandler\";\nimport headlineAndDescriptionUpdateHandler from \"./updateHandler/headlineAndDescriptionUpdateHandler\";\nimport DomainStoryContextPadProvider from \"./context-pad/domainStoryContextPadProvider\";\nimport ReplaceMenuProvider from \"./change-icon/replaceMenuProvider\";\nimport DSModeling from \"./modeling/dSModeling\";\n\nexport default {\n __depends__: [CreateModule, ContextPadModule, PopupMenuModule],\n __init__: [\n \"domainStoryRenderer\",\n \"paletteProvider\",\n \"domainStoryRules\",\n \"domainStoryUpdater\",\n \"contextPadProvider\",\n \"replaceMenuProvider\",\n ],\n elementFactory: [\"type\", DomainStoryElementFactory],\n domainStoryRenderer: [\"type\", DomainStoryRenderer],\n paletteProvider: [\"type\", DomainStoryPalette],\n domainStoryRules: [\"type\", DomainStoryRules],\n domainStoryUpdater: [\"type\", DomainStoryUpdater],\n contextPadProvider: [\"type\", DomainStoryContextPadProvider],\n elementFactoryBpmn: [\"type\", ElementFactory],\n pathMap: [\"type\", PathMap],\n replaceMenuProvider: [\"type\", ReplaceMenuProvider],\n commandStack: [\"type\", CommandStack],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n headlineAndDescriptionUpdateHandler: [\n \"type\",\n headlineAndDescriptionUpdateHandler,\n ],\n modeling: [\"type\", DSModeling],\n};\n","\"use strict\";\n\nimport {\n append as svgAppend,\n attr as svgAttr,\n create as svgCreate,\n remove as svgRemove,\n} from \"tiny-svg\";\n\nimport { translate } from \"diagram-js/lib/util/SvgTransformUtil\";\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport { is } from \"../util\";\n\nconst MARKER_HIDDEN = \"djs-element-hidden\",\n MARKER_LABEL_HIDDEN = \"djs-label-hidden\";\n\nexport default function DSLabelEditingPreview(eventBus, canvas, pathMap) {\n let self = this;\n\n let defaultLayer = canvas.getDefaultLayer();\n let element, absoluteElementBBox, gfx;\n\n eventBus.on(\"directEditing.activate\", function (context) {\n let activeProvider = context.active;\n\n element = activeProvider.element.label || activeProvider.element;\n\n // text annotation\n if (is(element, ElementTypes.TEXTANNOTATION)) {\n absoluteElementBBox = canvas.getAbsoluteBBox(element);\n gfx = svgCreate(\"g\");\n\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n let path = (self.path = svgCreate(\"path\"));\n\n svgAttr(path, {\n d: textPathData,\n strokeWidth: 2,\n stroke: getStrokeColor(element),\n });\n\n svgAppend(gfx, path);\n\n svgAppend(defaultLayer, gfx);\n\n translate(gfx, element.x, element.y);\n }\n\n if (is(element, ElementTypes.TEXTANNOTATION) || element.labelTarget) {\n canvas.addMarker(element, MARKER_HIDDEN);\n } else if (\n element.type.includes(ElementTypes.ACTOR) ||\n element.type.includes(ElementTypes.WORKOBJECT) ||\n element.type.includes(ElementTypes.ACTIVITY) ||\n element.type.includes(ElementTypes.GROUP)\n ) {\n canvas.addMarker(element, MARKER_LABEL_HIDDEN);\n }\n });\n\n eventBus.on(\"directEditing.resize\", function (context) {\n // text annotation\n if (is(element, ElementTypes.TEXTANNOTATION)) {\n let height = context.height,\n dy = context.dy;\n\n let newElementHeight = Math.max(\n (element.height / absoluteElementBBox.height) * (height + dy),\n 0,\n );\n\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: newElementHeight,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n svgAttr(self.path, {\n d: textPathData,\n });\n }\n });\n\n eventBus.on(\n [\"directEditing.complete\", \"directEditing.cancel\"],\n function (context) {\n let activeProvider = context.active;\n\n if (activeProvider) {\n canvas.removeMarker(\n activeProvider.element.label || activeProvider.element,\n MARKER_HIDDEN,\n );\n canvas.removeMarker(element, MARKER_LABEL_HIDDEN);\n }\n\n element = undefined;\n absoluteElementBBox = undefined;\n\n if (gfx) {\n svgRemove(gfx);\n\n gfx = undefined;\n }\n },\n );\n}\n\nDSLabelEditingPreview.$inject = [\"eventBus\", \"canvas\", \"pathMap\"];\n\n// helpers ///////////////////\n\nfunction getStrokeColor() {\n return \"black\";\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\nimport { autocomplete, getLabel } from \"./dsLabelUtil\";\n\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport { is } from \"../util\";\n\nlet dictionaryService;\n\nlet numberStash = 0;\nlet stashUse = false;\n\nexport function initializeLabelEditingProvider(labelingDictionary) {\n dictionaryService = labelingDictionary;\n}\n\nexport function getNumberStash() {\n let number = { use: stashUse, number: numberStash };\n stashUse = false;\n return number;\n}\n\nexport function toggleStashUse(use) {\n stashUse = use;\n}\n\nexport function focusElement(element) {\n // Opening a Angular Dialog seems to mess with the focus logic somehow.\n // My guess is that is makes the mousedown event passive, which prevents \"preventDefault\" from intercepting.\n // I am not sure how to fix it, but this seems to be a workaround.\n setTimeout(() => element.focus(), 0);\n}\n\nexport default function DSLabelEditingProvider(\n eventBus,\n canvas,\n directEditing,\n modeling,\n resizeHandles,\n textRenderer,\n updateLabelHandler,\n) {\n this._canvas = canvas;\n this._modeling = modeling;\n this._textRenderer = textRenderer;\n this._updateLabelHandler = updateLabelHandler;\n\n directEditing.registerProvider(this);\n\n // listen to dblclick on non-root elements\n eventBus.on(\"element.dblclick\", function (event) {\n activateDirectEdit(event.element, true);\n if (is(event.element, ElementTypes.ACTIVITY)) {\n // if we edit an activity, we do not want the standard editing box\n numberStash = event.element.businessObject.number;\n stashUse = true;\n directEditing.complete();\n }\n });\n\n // complete on followup canvas operation\n eventBus.on(\n [\n \"element.mousedown\",\n \"drag.init\",\n \"canvas.viewbox.changing\",\n \"autoPlace\",\n \"popupMenu.open\",\n ],\n function () {\n if (directEditing.isActive()) {\n directEditing.complete();\n }\n },\n );\n\n // cancel on command stack changes\n eventBus.on([\"commandStack.changed\"], function () {\n if (directEditing.isActive()) {\n directEditing.cancel();\n }\n });\n\n eventBus.on(\"directEditing.activate\", function (event) {\n resizeHandles.removeResizers();\n let element = event.active.element;\n createAutocomplete(element);\n });\n\n eventBus.on(\"create.end\", 500, function (event) {\n let element = event.shape,\n canExecute = event.context.canExecute,\n isTouch = event.isTouch;\n\n if (isTouch) {\n return;\n }\n\n if (!canExecute) {\n return;\n }\n if (!is(element, ElementTypes.ACTIVITY)) {\n activateDirectEdit(element);\n }\n let editingBox = document.getElementsByClassName(\n \"djs-direct-editing-content\",\n );\n focusElement(editingBox.item(0));\n });\n\n eventBus.on(\"autoPlace.end\", 500, function (event) {\n activateDirectEdit(event.shape);\n });\n\n function activateDirectEdit(element, force) {\n if (\n force ||\n element.businessObject.type.includes(ElementTypes.DOMAINSTORY)\n ) {\n directEditing.activate(element);\n }\n }\n\n function createAutocomplete(element) {\n let editingBox = document.getElementsByClassName(\n \"djs-direct-editing-content\",\n );\n focusElement(editingBox.item(0));\n autocomplete(\n editingBox[0],\n dictionaryService.getUniqueWorkObjectNames(),\n element,\n eventBus,\n );\n }\n}\n\nDSLabelEditingProvider.$inject = [\n \"eventBus\",\n \"canvas\",\n \"directEditing\",\n \"modeling\",\n \"resizeHandles\",\n \"textRenderer\",\n \"updateLabelHandler\",\n];\n\n/**\n * activate direct editing for activities and text annotations.\n *\n * @param {djs.model.Base} element\n *\n * @return {Object} an object with properties bounds (position and size), text and options\n */\nDSLabelEditingProvider.prototype.activate = function (element) {\n // text\n if (element.id === \"__implicitrootbase\") {\n return;\n }\n let text = getLabel(element);\n\n if (text === undefined) {\n return;\n }\n\n let context = {\n text: text,\n };\n\n // bounds\n let bounds = this.getEditingBBox(element);\n\n assign(context, bounds);\n\n let options = {};\n\n if (is(element, ElementTypes.TEXTANNOTATION)) {\n assign(options, {\n resizable: true,\n autoResize: true,\n });\n }\n\n assign(context, {\n options: options,\n });\n\n return context;\n};\n\n/**\n * get the editing bounding box based on the element's size and position\n *\n * @param {djs.model.Base} element\n *\n * @return {Object} an object containing information about position\n * and size (fixed or minimum and/or maximum)\n */\nDSLabelEditingProvider.prototype.getEditingBBox = function (element) {\n let canvas = this._canvas;\n\n let target = element.label || element;\n\n let bbox = canvas.getAbsoluteBBox(target);\n\n // default position\n let bounds = { x: bbox.x, y: bbox.y };\n\n /** The canvas is an object from bpmn-js. The IDE might say that zoom is deprecated,\n * because it thinks that canvas is the standard HTML element.**/\n let zoom = canvas.zoom();\n let defaultStyle = this._textRenderer.getDefaultStyle();\n\n // take zoom into account\n let defaultFontSize = defaultStyle.fontSize * zoom,\n defaultLineHeight = defaultStyle.lineHeight;\n\n let style = {\n fontFamily: this._textRenderer.getDefaultStyle().fontFamily,\n fontWeight: this._textRenderer.getDefaultStyle().fontWeight,\n };\n\n // adjust for groups\n if (is(element, ElementTypes.GROUP)) {\n assign(bounds, {\n minWidth: bbox.width / 2.5 > 125 ? bbox.width / 2.5 : 125,\n maxWidth: bbox.width,\n minHeight: 30 * zoom,\n x: bbox.x,\n y: bbox.y,\n });\n\n assign(style, {\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n textAlign: \"left\",\n });\n }\n\n if (\n // we can't use util's is() function here because the type contains the name of the icon\n /^domainStory:actor\\w*/.test(element.type) ||\n /^domainStory:workObject\\w*/.test(element.type)\n ) {\n assign(bounds, {\n width: bbox.width,\n minHeight: 30,\n y: bbox.y + bbox.height - 20,\n x: bbox.x,\n });\n\n assign(style, {\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n });\n }\n\n // text annotations\n if (is(element, ElementTypes.TEXTANNOTATION)) {\n assign(bounds, {\n width: bbox.width,\n height: bbox.height,\n minWidth: 30 * zoom,\n minHeight: 10 * zoom,\n });\n\n assign(style, {\n textAlign: \"left\",\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n });\n }\n\n return { bounds: bounds, style: style };\n};\n\nDSLabelEditingProvider.prototype.update = function (\n element,\n newLabel,\n activeContextText,\n bounds,\n) {\n let newBounds, bbox;\n\n if (is(element, ElementTypes.TEXTANNOTATION)) {\n bbox = this._canvas.getAbsoluteBBox(element);\n\n newBounds = {\n x: element.x,\n y: element.y,\n width: (element.width / bbox.width) * bounds.width,\n height: (element.height / bbox.height) * bounds.height,\n };\n }\n\n this._modeling.updateLabel(element, newLabel, newBounds);\n};\n","\"use strict\";\n\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport { is } from \"../util\";\n\nfunction getLabelAttr(semantic) {\n if (\n semantic.type.includes(ElementTypes.ACTOR) ||\n semantic.type.includes(ElementTypes.WORKOBJECT) ||\n semantic.type.includes(ElementTypes.ACTIVITY) ||\n semantic.type.includes(ElementTypes.GROUP)\n ) {\n return \"name\";\n }\n if (semantic.type.includes(ElementTypes.TEXTANNOTATION)) {\n return \"text\";\n }\n}\n\nfunction getNumberAttr(semantic) {\n if (is(semantic, ElementTypes.ACTIVITY)) {\n return \"number\";\n }\n}\n\nexport function getLabel(element) {\n let semantic;\n if (element.businessObject) {\n semantic = element.businessObject;\n } else {\n semantic = element;\n }\n let attr = getLabelAttr(semantic);\n if (attr && semantic) {\n return semantic[attr] || \"\";\n }\n}\n\nexport function getNumber(element) {\n let semantic = element.businessObject,\n attr = getNumberAttr(semantic);\n\n if (attr) {\n return semantic[attr] || \"\";\n }\n}\n\nexport function setLabel(element, text) {\n let semantic;\n if (element.businessObject) {\n semantic = element.businessObject;\n } else {\n semantic = element;\n }\n let attr = getLabelAttr(semantic);\n\n if (attr) {\n semantic[attr] = text;\n }\n return element;\n}\n\nexport function setNumber(element, textNumber) {\n let semantic = element.businessObject,\n attr = getNumberAttr(semantic);\n\n if (attr) {\n semantic[attr] = textNumber;\n }\n\n return element;\n}\n\n// select at which part of the activity the label should be attached to\nexport function selectPartOfActivity(waypoints, angleActivity) {\n let selectedActivity = 0;\n let linelength = 49;\n\n for (let i = 0; i < waypoints.length; i++) {\n if (angleActivity[i] === 0 || angleActivity[i] === 180) {\n let length = Math.abs(waypoints[i].x - waypoints[i + 1].x);\n if (length > linelength) {\n selectedActivity = i;\n }\n }\n }\n return selectedActivity;\n}\n\n// approximate the width of the label text, standard fontsize: 11\nexport function calculateTextWidth(text) {\n if (!text) {\n return 0;\n }\n\n let fontsize = text.length * 5.1;\n fontsize = fontsize / 2;\n\n // add an initial offset to the absolute middle of the activity\n fontsize += 20;\n return fontsize;\n}\n\n/**\n * copied from https://www.w3schools.com/howto/howto_js_autocomplete.asp on 18.09.2018\n */\nexport function autocomplete(input, workObjectNames, element, eventBus) {\n closeAllLists();\n\n /* the autocomplete function takes three arguments,\n the text field element and an array of possible autocompleted values and an optional element to which it is appended:*/\n let currentFocus, filteredWorkObjectNames;\n\n /* execute a function when someone writes in the text field:*/\n input.addEventListener(\"input\", function () {\n if (workObjectNames.length === 0) {\n return;\n }\n\n /* the direct editing field of actors and workobjects is a recycled html-element and has old values that need to be overridden*/\n if (element.type.includes(ElementTypes.WORKOBJECT)) {\n this.value = this.innerHTML;\n }\n let autocompleteList,\n autocompleteItem,\n val = this.value;\n\n /* close any already open lists of autocompleted values*/\n closeAllLists();\n currentFocus = -1;\n\n /* create a DIV element that will contain the items (values):*/\n autocompleteList = document.createElement(\"DIV\");\n autocompleteList.setAttribute(\"id\", \"autocomplete-list\");\n autocompleteList.setAttribute(\"class\", \"autocomplete-items\");\n\n /* append the DIV element as a child of the autocomplete container:*/\n this.parentNode.appendChild(autocompleteList);\n\n /* for each item in the array...*/\n filteredWorkObjectNames = [];\n for (const name of workObjectNames) {\n /* check if the item starts with the same letters as the text field value:*/\n if (val) {\n if (name.substring(0, val.length).toUpperCase() === val.toUpperCase()) {\n /* create a DIV element for each matching element:*/\n autocompleteItem = document.createElement(\"DIV\");\n\n /* make the matching letters bold:*/\n autocompleteItem.innerHTML =\n \"\" +\n name.substring(0, val.length) +\n \"\" +\n name.substring(val.length);\n\n /* insert an input field that will hold the current name:*/\n autocompleteItem.innerHTML +=\n \"\";\n autocompleteList.appendChild(autocompleteItem);\n\n filteredWorkObjectNames.push(name);\n }\n }\n }\n\n // if we edit an actor, we do not want auto-complete, since actors generally are unique\n if (element.type.includes(ElementTypes.ACTOR)) {\n autocompleteList.style.visibility = \"hidden\";\n }\n });\n\n /* execute a function presses a key on the keyboard:*/\n input.onkeydown = function (e) {\n let autocompleteList = document.getElementById(\"autocomplete-list\");\n if (autocompleteList) {\n autocompleteList = autocompleteList.getElementsByTagName(\"div\");\n }\n if (e.keyCode === 40) {\n /* If the arrow DOWN key is pressed,\n increase the currentFocus letiable:*/\n currentFocus++;\n\n /* and and make the current item more visible:*/\n addActive(autocompleteList);\n } else if (e.keyCode === 38) {\n // up\n /* If the arrow UP key is pressed,\n decrease the currentFocus letiable:*/\n currentFocus--;\n\n /* and and make the current item more visible:*/\n addActive(autocompleteList);\n } else if (e.keyCode === 13) {\n e.preventDefault();\n /* If the ENTER key is pressed, prevent the form from being submitted,*/\n if (currentFocus > -1) {\n element.businessObject.name = filteredWorkObjectNames[currentFocus];\n eventBus.fire(\"element.changed\", { element });\n }\n }\n };\n\n function addActive(autocompleteList) {\n /* a function to classify an item as \"active\":*/\n if (!autocompleteList || autocompleteList.length < 1) return false;\n\n /* start by removing the \"active\" class on all items:*/\n removeActive(autocompleteList);\n if (currentFocus >= autocompleteList.length) currentFocus = 0;\n if (currentFocus < 0) currentFocus = autocompleteList.length - 1;\n\n /* add class \"autocomplete-active\":*/\n autocompleteList[currentFocus].classList.add(\"autocomplete-active\");\n }\n\n function removeActive(autocompleteList) {\n /* a function to remove the \"active\" class from all autocomplete items:*/\n if (autocompleteList.length > 1) {\n for (const item of autocompleteList) {\n item.classList.remove(\"autocomplete-active\");\n }\n }\n }\n\n function closeAllLists(survivor) {\n /* close all autocomplete lists in the document,\n except the one passed as an argument:*/\n let autocompleteList =\n document.getElementsByClassName(\"autocomplete-items\");\n for (const item of autocompleteList) {\n if (survivor != item && survivor != input) {\n item.parentNode.removeChild(item);\n }\n }\n }\n\n /* execute a function when someone clicks in the document:*/\n document.addEventListener(\"click\", function (e) {\n closeAllLists(e.target);\n });\n}\n","\"use strict\";\n\nimport ChangeSupportModule from \"diagram-js/lib/features/change-support\";\nimport ResizeModule from \"diagram-js/lib/features/resize\";\nimport DirectEditingModule from \"diagram-js-direct-editing\";\n\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"../updateHandler/updateLabelHandler\";\nimport DSLabelEditingPreview from \"./dsLabelEditingPreview\";\nimport DSLabelEditingProvider from \"./dsLabelEditingProvider\";\nimport DSModeling from \"../modeling/dSModeling\";\n\nexport default {\n __depends__: [ChangeSupportModule, ResizeModule, DirectEditingModule],\n __init__: [\"dSlabelEditingProvider\", \"dSlabelEditingPreview\"],\n dSlabelEditingProvider: [\"type\", DSLabelEditingProvider],\n dSlabelEditingPreview: [\"type\", DSLabelEditingPreview],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n commandStack: [\"type\", CommandStack],\n modeling: [\"type \", DSModeling],\n};\n","\"use strict\";\n\nimport { selectPartOfActivity } from \"./dsLabelUtil\";\nimport { angleBetween } from \"src/app/utils/mathExtensions\";\n\nexport function countLines(str) {\n return str.split(/\\r\\n|\\r|\\n/).length;\n}\n\n// determine the position of the label at the activity\nexport function labelPosition(waypoints, lines = 1) {\n let amountWaypoints = waypoints.length;\n let determinedPosition;\n let xPos;\n let yPos;\n\n if (amountWaypoints > 2) {\n let angleActivity = new Array(amountWaypoints - 1);\n for (let i = 0; i < amountWaypoints - 1; i++) {\n // calculate the angles of the activities\n angleActivity[i] = angleBetween(waypoints[i], waypoints[i + 1]);\n }\n\n let selectedActivity = selectPartOfActivity(waypoints, angleActivity);\n\n xPos = labelPositionX(\n waypoints[selectedActivity],\n waypoints[selectedActivity + 1],\n );\n yPos = labelPositionY(\n waypoints[selectedActivity],\n waypoints[selectedActivity + 1],\n lines,\n );\n\n determinedPosition = {\n x: xPos,\n y: yPos,\n selected: selectedActivity,\n };\n\n return determinedPosition;\n } else {\n xPos = labelPositionX(waypoints[0], waypoints[1]);\n yPos = labelPositionY(waypoints[0], waypoints[1], lines);\n\n determinedPosition = {\n x: xPos,\n y: yPos,\n selected: 0,\n };\n\n return determinedPosition;\n }\n}\n\n// calculate the X position of the label\nexport function labelPositionX(startPoint, endPoint) {\n let angle = angleBetween(startPoint, endPoint);\n let offsetX = 0;\n let scaledAngle = 0;\n if (angle === 0 || angle === 180 || angle === 90 || angle === 270) {\n offsetX = 0;\n } else if (angle > 0 && angle < 90) {\n // endpoint in upper right quadrant\n offsetX = 5 - angle / 6;\n } else if (angle > 90 && angle < 180) {\n // endpoint in upper left quadrant\n scaledAngle = angle - 90;\n offsetX = 5 - scaledAngle / 18;\n } else if (angle > 180 && angle < 270) {\n // endpoint in lower left quadrant\n scaledAngle = angle - 180;\n offsetX = scaledAngle / 18;\n } else if (angle > 270) {\n // endpoint in lower right quadrant\n scaledAngle = angle - 270;\n offsetX = 5 - scaledAngle / 6;\n }\n return offsetX + (startPoint.x + endPoint.x) / 2;\n}\n\n// calculate the Y position of the label\nexport function labelPositionY(startPoint, endPoint, lines = 1) {\n let angle = angleBetween(startPoint, endPoint);\n let offsetY = 0;\n let scaledAngle = 0;\n\n if (angle === 0 || angle === 180) {\n offsetY = 15;\n } else if (angle === 90 || angle === 270) {\n offsetY = 0;\n } else if (angle > 0 && angle < 90) {\n // endpoint in upper right quadrant\n offsetY = 15 - angle / 6;\n } else if (angle > 90 && angle < 180) {\n // endpoint in upper left quadrant\n scaledAngle = angle - 90;\n offsetY = (-scaledAngle / 9) * lines;\n } else if (angle > 180 && angle < 270) {\n // endpoint in lower left quadrant\n scaledAngle = angle - 180;\n offsetY = 15 - scaledAngle / 3;\n } else if (angle > 270) {\n // endpoint in lower right quadrant\n scaledAngle = angle - 270;\n offsetY = (-scaledAngle / 9) * lines;\n }\n return offsetY + (startPoint.y + endPoint.y) / 2;\n}\n","\"use strict\";\n\nimport Modeling from \"bpmn-js/lib/features/modeling/Modeling\";\n\nimport { inherits } from \"util\";\n\nexport default function DSModeling(\n eventBus,\n elementFactory,\n commandStack,\n domainStoryRules,\n) {\n Modeling.call(this, eventBus, elementFactory, commandStack, domainStoryRules);\n}\n\nModeling.prototype.updateLabel = function (element, newLabel, newBounds) {\n if (\n element.businessObject\n ? newLabel !== element.businessObject.name\n : newLabel !== element.name\n ) {\n if (/^domainStory:/.test(element.type)) {\n this._commandStack.execute(\"element.updateCustomLabel\", {\n element: element,\n newLabel: newLabel,\n newBounds: newBounds,\n });\n } else {\n this._commandStack.execute(\"element.updateLabel\", {\n element: element,\n newLabel: newLabel,\n newBounds: newBounds,\n });\n }\n }\n};\n\nModeling.prototype.updateNumber = function (element, newNumber, newBounds) {\n if (\n element.businessObject\n ? newNumber !== element.businessObject.number\n : newNumber !== element.number\n ) {\n if (/^domainStory:/.test(element.type)) {\n this._commandStack.execute(\"element.updateCustomLabel\", {\n element: element,\n newNumber: newNumber,\n newBounds: newBounds,\n });\n } else {\n this._commandStack.execute(\"element.updateLabel\", {\n element: element,\n newNumber: newNumber,\n newBounds: newBounds,\n });\n }\n }\n};\n\nModeling.prototype.replaceShape = function (oldShape, newShape, hints) {\n let context = {\n oldShape: oldShape,\n newData: newShape,\n hints: hints || {},\n };\n\n this._commandStack.execute(\"shape.replace\", context);\n return context.newShape;\n};\n\nModeling.prototype.removeGroup = function (element) {\n this._commandStack.execute(\"shape.removeGroupWithoutChildren\", {\n element: element,\n });\n this.removeElements({ element });\n};\n\ninherits(DSModeling, Modeling);\n\nDSModeling.$inject = [\n \"eventBus\",\n \"elementFactory\",\n \"commandStack\",\n \"domainStoryRules\",\n];\n","\"use strict\";\n\nimport DomainStoryPalette from \"../palette/domainStoryPalette\";\nimport ElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\nimport CreateModule from \"diagram-js/lib/features/create\";\nimport PathMap from \"bpmn-js/lib/draw/PathMap\";\nimport PopupMenuModule from \"bpmn-js/lib/features/popup-menu\";\nimport ContextPadModule from \"diagram-js/lib/features/context-pad\";\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"../updateHandler/updateLabelHandler\";\nimport DomainStoryUpdater from \"../domainStoryUpdater\";\nimport DomainStoryElementFactory from \"../domainStoryElementFactory\";\nimport headlineAndDescriptionUpdateHandler from \"../updateHandler/headlineAndDescriptionUpdateHandler\";\nimport DomainStoryRenderer from \"../domainStoryRenderer\";\nimport DSModeling from \"./dSModeling\";\nimport DomainStoryRules from \"../domainStoryRules\";\nimport ReplaceMenuProvider from \"../change-icon/replaceMenuProvider\";\nimport DomainStoryContextPadProvider from \"../context-pad/domainStoryContextPadProvider\";\n\nexport default {\n __depends__: [CreateModule, ContextPadModule, PopupMenuModule],\n __init__: [\n \"domainStoryRenderer\",\n \"paletteProvider\",\n \"domainStoryRules\",\n \"domainStoryUpdater\",\n \"contextPadProvider\",\n \"replaceMenuProvider\",\n ],\n elementFactory: [\"type\", DomainStoryElementFactory],\n domainStoryRenderer: [\"type\", DomainStoryRenderer],\n paletteProvider: [\"type\", DomainStoryPalette],\n domainStoryRules: [\"type\", DomainStoryRules],\n domainStoryUpdater: [\"type\", DomainStoryUpdater],\n contextPadProvider: [\"type\", DomainStoryContextPadProvider],\n elementFactoryBpmn: [\"type\", ElementFactory],\n pathMap: [\"type\", PathMap],\n replaceMenuProvider: [\"type\", ReplaceMenuProvider],\n commandStack: [\"type\", CommandStack],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n headlineAndDescriptionUpdateHandler: [\n \"type\",\n headlineAndDescriptionUpdateHandler,\n ],\n modeling: [\"type\", DSModeling],\n};\n","\"use strict\";\n\nimport { angleBetween } from \"src/app/utils/mathExtensions\";\n\nlet numberRegistry = [];\nlet multipleNumberRegistry = [false];\n\nlet canvasElementRegistry;\n\nexport function initializeNumbering(canvasElementRegistryService) {\n canvasElementRegistry = canvasElementRegistryService;\n}\n\nexport function updateMultipleNumberRegistry(activityBusinessObjects) {\n activityBusinessObjects.forEach(\n (activity) =>\n (multipleNumberRegistry[activity.number] =\n activity.multipleNumberAllowed),\n );\n}\n\n// defines the box for activity numbers\nexport function numberBoxDefinitions(element) {\n let alignment = \"center\";\n let boxWidth = 30;\n let boxHeight = 30;\n let angle = 0;\n if (element.waypoints.length > 1) {\n angle = angleBetween(\n // Start of first arrow segment\n element.waypoints[0],\n // End of first arrow segment\n element.waypoints[1],\n );\n }\n let x = element.waypoints[0].x;\n let y = element.waypoints[0].y;\n\n let fixedOffsetX = 0;\n let fixedOffsetY = 0;\n let angleDependantOffsetX = 0;\n let angleDependantOffsetY = 0;\n\n // Fine tune positioning of sequence number above beginning of first arrow segment\n if (angle >= 0 && angle <= 45) {\n fixedOffsetX = 25;\n angleDependantOffsetY = 20 * (1 - angle / 45);\n } else if (angle <= 90) {\n fixedOffsetX = 5;\n angleDependantOffsetX = 15 * (1 - (angle - 45) / 45);\n } else if (angle <= 135) {\n fixedOffsetX = 5;\n angleDependantOffsetX = -20 * ((angle - 90) / 45);\n } else if (angle <= 180) {\n fixedOffsetX = -15;\n angleDependantOffsetY = 20 * ((angle - 135) / 45);\n } else if (angle <= 225) {\n fixedOffsetX = -15;\n fixedOffsetY = 15;\n angleDependantOffsetY = 25 * ((angle - 180) / 45);\n } else if (angle <= 270) {\n fixedOffsetX = 5;\n angleDependantOffsetX = -20 * (1 - (angle - 225) / 45);\n fixedOffsetY = 40;\n } else if (angle <= 315) {\n fixedOffsetX = 5;\n angleDependantOffsetX = 25 * ((angle - 270) / 45);\n fixedOffsetY = 40;\n } else {\n fixedOffsetX = 25;\n fixedOffsetY = 20;\n angleDependantOffsetY = 15 * (1 - (angle - 315) / 45);\n }\n\n x = x + fixedOffsetX + angleDependantOffsetX;\n y = y + fixedOffsetY + angleDependantOffsetY;\n\n return {\n textAlign: alignment,\n width: boxWidth,\n height: boxHeight,\n x: x,\n y: y,\n };\n}\n\n// determine the next available number that is not yet used\nexport function generateAutomaticNumber(elementActivity, commandStack) {\n const semantic = elementActivity.businessObject;\n const usedNumbers = [0];\n let wantedNumber = -1;\n\n const activitiesFromActors = canvasElementRegistry.getActivitiesFromActors();\n\n activitiesFromActors.forEach((element) => {\n if (element.businessObject.number) {\n usedNumbers.push(+element.businessObject.number);\n }\n });\n for (let i = 0; i < usedNumbers.length; i++) {\n if (!usedNumbers.includes(i)) {\n if (!usedNumbers.includes(i)) {\n wantedNumber = i;\n i = usedNumbers.length;\n }\n }\n }\n if (wantedNumber === -1) {\n wantedNumber = usedNumbers.length;\n }\n\n updateExistingNumbersAtGeneration(\n activitiesFromActors,\n wantedNumber,\n commandStack,\n );\n semantic.number = wantedNumber;\n return wantedNumber;\n}\n\n// update the numbers at the activities when generating a new activity\nexport function updateExistingNumbersAtGeneration(\n activitiesFromActors,\n wantedNumber,\n commandStack,\n) {\n activitiesFromActors.forEach((element) => {\n let number = +element.businessObject.number;\n\n if (number >= wantedNumber) {\n wantedNumber++;\n setTimeout(function () {\n commandStack.execute(\"activity.changed\", {\n businessObject: element.businessObject,\n newLabel: element.businessObject.name,\n newNumber: number,\n element: element,\n });\n }, 10);\n }\n });\n}\n\n// update the numbers at the activities when editing an activity\nexport function updateExistingNumbersAtEditing(\n activitiesFromActors,\n wantedNumber,\n eventBus,\n) {\n // get a sorted list of all activities that could need changing\n let sortedActivities = [[]];\n activitiesFromActors.forEach((activity) => {\n if (!sortedActivities[activity.businessObject.number]) {\n sortedActivities[activity.businessObject.number] = [];\n }\n sortedActivities[activity.businessObject.number].push(activity);\n });\n\n // set the number of each activity to the next highest number, starting from the number, we overrode\n let oldMultipleNumberRegistry = [...multipleNumberRegistry];\n let currentNumber = wantedNumber;\n for (\n currentNumber;\n currentNumber < sortedActivities.length;\n currentNumber++\n ) {\n if (sortedActivities[currentNumber]) {\n wantedNumber++;\n multipleNumberRegistry[wantedNumber] =\n oldMultipleNumberRegistry[currentNumber];\n setNumberOfActivity(\n sortedActivities[currentNumber],\n wantedNumber,\n eventBus,\n );\n }\n }\n}\n\n// get the IDs of activities with their associated number, only returns activities that are originating from an actor\nexport function getNumbersAndIDs() {\n let iDWithNumber = [];\n let activities = canvasElementRegistry.getActivitiesFromActors();\n\n for (let i = activities.length - 1; i >= 0; i--) {\n let id = activities[i].businessObject.id;\n let number = activities[i].businessObject.number;\n iDWithNumber.push({ id: id, number: number });\n }\n return iDWithNumber;\n}\n\nexport function addNumberToRegistry(renderedNumber, number) {\n numberRegistry[number] = renderedNumber;\n}\n\nexport function setNumberIsMultiple(number, multi) {\n multipleNumberRegistry[number] = multi;\n}\n\n/**\n * @returns copy of registry\n */\nexport function getNumberRegistry() {\n return numberRegistry.slice(0);\n}\n\nexport function getMultipleNumberRegistry() {\n return multipleNumberRegistry.slice(0);\n}\n\nfunction setNumberOfActivity(elementArray, wantedNumber, eventBus) {\n if (elementArray) {\n elementArray.forEach((element) => {\n if (element) {\n let businessObject = element.businessObject;\n if (businessObject) {\n businessObject.number = wantedNumber;\n }\n eventBus.fire(\"element.changed\", { element });\n }\n });\n }\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\nimport { overrideAppendedIcons } from \"src/app/tools/icon-set-config/domain/allIcons\";\nimport { Dictionary } from \"src/app/domain/entities/dictionary\";\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport { APPENDED_ICONS_TAG } from \"src/app/domain/entities/constants\";\n\nlet iconDictionary;\nlet configuration;\n\nexport function initializePalette(iconDictionaryService, configurationService) {\n iconDictionary = iconDictionaryService;\n configuration = configurationService;\n}\n\nexport default function PaletteProvider(\n palette,\n create,\n elementFactory,\n spaceTool,\n lassoTool,\n) {\n this._create = create;\n this._elementFactory = elementFactory;\n this._spaceTool = spaceTool;\n this._lassoTool = lassoTool;\n\n palette.registerProvider(this);\n}\n\nPaletteProvider.$inject = [\n \"palette\",\n \"create\",\n \"elementFactory\",\n \"spaceTool\",\n \"lassoTool\",\n \"modeling\",\n];\n\nPaletteProvider.prototype.getPaletteEntries = function () {\n let actions = {},\n create = this._create,\n elementFactory = this._elementFactory,\n spaceTool = this._spaceTool,\n lassoTool = this._lassoTool;\n\n function createAction(type, group, className, title, options) {\n function createListener(event) {\n let shape = elementFactory.createShape(assign({ type: type }, options));\n\n assign(shape.businessObject, {\n id: shape.id,\n });\n\n if (options) {\n shape.businessObject.di.isExpanded = options.isExpanded;\n }\n\n create.start(event, shape);\n }\n\n let shortType = type.replace(/^domainStory:/, \"\");\n\n return {\n group: group,\n className: className,\n title: \"Create \" + title || \"Create \" + shortType,\n action: {\n dragstart: createListener,\n click: createListener,\n },\n };\n }\n\n return initPalette(actions, spaceTool, lassoTool, createAction);\n};\n\nfunction appendCSSStyleCheat(customIcons) {\n const sheetEl = document.createElement(\"style\");\n document.head.appendChild(sheetEl);\n\n let customIconDict = new Dictionary();\n\n customIconDict.appendDict(customIcons);\n let customIconDictKeys = customIconDict.keysArray();\n\n customIconDictKeys.forEach((name) => {\n if (iconDictionary.getAppendedIconDictionary().has(name)) {\n let src = customIconDict.get(name);\n\n const iconStyle =\n \".icon-domain-story-\" +\n name.toLowerCase() +\n \"::before{\" +\n \" display: block;\" +\n ' content: url(\"data:image/svg+xml;utf8,' +\n wrapSRCInSVG(src) +\n '\");' +\n \" margin: 3px;}\";\n sheetEl.sheet.insertRule(iconStyle, sheetEl.sheet.cssRules.length);\n }\n });\n}\n\nfunction initPalette(actions, spaceTool, lassoTool, createAction) {\n let config = iconDictionary?.getCurrentIconConfigurationForBPMN();\n\n let customIcons = localStorage.getItem(APPENDED_ICONS_TAG);\n\n if (customIcons) {\n customIcons = JSON.parse(customIcons);\n if (customIconsLegacy(customIcons)) {\n customIcons = convertLegacyAppendedIconsToDict(customIcons);\n }\n if (customIcons.entries && customIcons.entries.forEach) {\n const customIconsDict = new Dictionary();\n customIcons.entries.forEach((entry) => {\n customIconsDict.putEntry(entry);\n });\n overrideAppendedIcons(customIconsDict);\n appendCSSStyleCheat(customIcons);\n }\n }\n\n iconDictionary?.initTypeDictionaries(config.actors, config.workObjects);\n\n let actorTypes = iconDictionary?.getTypeDictionary(ElementTypes.ACTOR);\n\n actorTypes?.keysArray().forEach((name) => {\n addCanvasObjectTypes(\n name,\n createAction,\n actions,\n \"actor\",\n ElementTypes.ACTOR,\n );\n });\n\n assign(actions, {\n \"actor-separator\": {\n group: \"actor\",\n separator: true,\n },\n });\n\n let workObjectTypes = iconDictionary?.getTypeDictionary(\n ElementTypes.WORKOBJECT,\n );\n\n workObjectTypes?.keysArray().forEach((name) => {\n addCanvasObjectTypes(\n name,\n createAction,\n actions,\n \"actor\",\n ElementTypes.WORKOBJECT,\n );\n });\n\n assign(actions, {\n \"workObject-separator\": {\n group: \"workObject\",\n separator: true,\n },\n \"domainStory-group\": createAction(\n ElementTypes.GROUP,\n \"group\",\n \"icon-domain-story-tool-group\",\n \"group\",\n ),\n \"group-separator\": {\n group: \"group\",\n separator: true,\n },\n \"lasso-tool\": {\n group: \"tools\",\n className: \"bpmn-icon-lasso-tool\",\n title: \"Activate the lasso tool\",\n action: {\n click: function (event) {\n lassoTool.activateSelection(event);\n },\n },\n },\n \"space-tool\": {\n group: \"tools\",\n className: \"bpmn-icon-space-tool\",\n title: \"Activate the create/remove space tool\",\n action: {\n click: function (event) {\n spaceTool.activateSelection(event);\n },\n },\n },\n });\n\n return actions;\n}\n\nfunction addCanvasObjectTypes(\n name,\n createAction,\n actions,\n className,\n elementType,\n) {\n let icon = iconDictionary.getIconForBPMN(elementType, name);\n\n let action = [];\n action[\"domainStory-\" + className + name] = createAction(\n `${elementType}${name}`,\n className,\n icon,\n name,\n );\n assign(actions, action);\n}\n\nfunction customIconsLegacy(customIcons) {\n return !(\n Object.keys(customIcons).length === 1 &&\n Object.keys(customIcons)[0] === \"entries\"\n );\n}\n\nfunction convertLegacyAppendedIconsToDict(customIcons) {\n let dict = new Dictionary();\n Object.keys(customIcons).forEach((key) => {\n dict.set(key, customIcons[key]);\n });\n return dict;\n}\n\n// For some reason its important to use ' in the content for the Palette and ContextPad\n// Do not change!\nfunction wrapSRCInSVG(src) {\n return (\n \"\" +\n \"\"\n );\n}\n","\"use strict\";\n\nimport { getNumbersAndIDs } from \"../numbering/numbering\";\n\n/**\n * commandStack Handler for changes at activities\n */\n\nlet canvasElementRegistry;\nexport function initializeActivityUpdateHandler(canvasElementRegistryService) {\n canvasElementRegistry = canvasElementRegistryService;\n}\n\nexport default function activityUpdateHandler(commandStack, eventBus) {\n commandStack.registerHandler(\n \"activity.directionChange\",\n activity_directionChange,\n );\n commandStack.registerHandler(\"activity.changed\", activity_changed);\n\n // update the activity from the activity-dialog, either with or without number\n // and change other activities too, to keep the numbers consistent\n function activity_changed(modeling) {\n this.preExecute = function (context) {\n context.oldLabel = context.businessObject.name || \" \";\n\n let oldNumbersWithIDs = getNumbersAndIDs();\n modeling.updateLabel(context.businessObject, context.newLabel);\n modeling.updateNumber(context.businessObject, context.newNumber);\n\n context.oldNumber = context.businessObject.number;\n context.oldNumbersWithIDs = oldNumbersWithIDs;\n };\n\n this.execute = function (context) {\n let businessObject = context.businessObject;\n let element = context.element;\n\n if (context.newLabel && context.newLabel.length < 1) {\n context.newLabel = \" \";\n }\n\n businessObject.name = context.newLabel;\n businessObject.number = context.newNumber;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n semantic.name = context.oldLabel;\n semantic.number = context.oldNumber;\n\n revertAutomaticNumberGenerationChange(\n context.oldNumbersWithIDs,\n eventBus,\n );\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n\n // change the direction of a single activity without affecting other activities\n function activity_directionChange(modeling) {\n this.preExecute = function (context) {\n context.oldNumber = context.businessObject.number;\n context.oldWaypoints = context.element.waypoints;\n context.name = context.businessObject.name;\n\n if (!context.oldNumber) {\n context.oldNumber = 0;\n }\n modeling.updateNumber(context.businessObject, context.newNumber);\n };\n\n this.execute = function (context) {\n let businessObject = context.businessObject;\n let element = context.element;\n let swapSource = element.source;\n let newWaypoints = [];\n let waypoints = element.waypoints;\n\n for (let i = waypoints.length - 1; i >= 0; i--) {\n newWaypoints.push(waypoints[i]);\n }\n\n element.source = element.target;\n businessObject.source = businessObject.target;\n element.target = swapSource;\n businessObject.target = swapSource.id;\n\n businessObject.name = context.name;\n businessObject.number = context.newNumber;\n element.waypoints = newWaypoints;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n let swapSource = element.source;\n\n element.source = element.target;\n semantic.source = semantic.target;\n element.target = swapSource;\n semantic.target = swapSource.id;\n\n semantic.name = context.name;\n\n semantic.number = context.oldNumber;\n element.waypoints = context.oldWaypoints;\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n}\n\n// reverts the automatic changed done by the automatic number-generation at editing\nfunction revertAutomaticNumberGenerationChange(iDWithNumber, eventBus) {\n let activities = canvasElementRegistry?.getActivitesFromActors();\n for (let i = activities.length - 1; i >= 0; i--) {\n for (let j = iDWithNumber.length - 1; j >= 0; j--) {\n if (iDWithNumber[j].id.includes(activities[i].businessObject.id)) {\n let element = activities[i];\n element.businessObject.number = iDWithNumber[j].number;\n j = -5;\n eventBus.fire(\"element.changed\", { element });\n iDWithNumber.splice(j, 1);\n }\n }\n }\n}\n","\"use strict\";\n\nimport { undoGroupRework } from \"../util\";\nimport { ElementTypes } from \"../../../../../domain/entities/elementTypes\";\n\nexport default function elementUpdateHandler(commandStack, eventBus) {\n commandStack.registerHandler(\"element.colorChange\", element_colorChange);\n commandStack.registerHandler(\n \"shape.removeGroupWithoutChildren\",\n removeGroupWithoutChildren,\n );\n\n function element_colorChange() {\n this.preExecute = function (context) {\n context.oldColor = context.businessObject.pickedColor;\n };\n\n this.execute = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n\n if (\n semantic.type.includes(ElementTypes.TEXTANNOTATION) &&\n element.incoming[0]\n ) {\n element.incoming[0].businessObject.pickedColor = context.newColor;\n eventBus.fire(\"element.changed\", { element: element.incoming[0] });\n }\n\n semantic.pickedColor = context.newColor;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n\n if (\n semantic.type.includes(ElementTypes.TEXTANNOTATION) &&\n element.incoming[0]\n ) {\n element.incoming[0].businessObject.pickedColor = context.oldColor;\n eventBus.fire(\"element.changed\", { element: element.incoming[0] });\n }\n\n semantic.pickedColor = context.oldColor;\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n\n function removeGroupWithoutChildren() {\n this.preExecute = function (ctx) {\n ctx.parent = ctx.element.parent;\n ctx.children = ctx.element.children.slice();\n };\n\n this.execute = function (ctx) {\n let element = ctx.element;\n ctx.children.forEach((child) => {\n undoGroupRework(element, child);\n eventBus.fire(\"element.changed\", { element: child });\n });\n eventBus.fire(\"shape.remove\", { element });\n };\n\n this.revert = function (ctx) {\n let element = ctx.element;\n eventBus.fire(\"shape.added\", { element });\n\n ctx.element.children.forEach((child) => {\n reworkGroupElements(element, child);\n });\n };\n }\n}\n","export default function headlineAndDescriptionUpdateHandler(\n commandStack,\n titleService,\n) {\n commandStack.registerHandler(\n \"story.updateHeadlineAndDescription\",\n handlerFunction,\n );\n\n function handlerFunction() {\n this.execute = function (ctx) {\n ctx.oldTitle = titleService.getTitle();\n ctx.oldDescription = titleService.getDescription();\n\n titleService.updateTitleAndDescription(\n ctx.newTitle,\n ctx.newDescription,\n false,\n );\n };\n\n this.revert = function (ctx) {\n titleService.updateTitleAndDescription(\n ctx.oldTitle,\n ctx.oldDescription,\n false,\n );\n };\n }\n}\n","\"use strict\";\n\nexport default function DSMassRenameHandler(commandStack, eventBus) {\n commandStack.registerHandler(\"domainStoryObjects.massRename\", massRename);\n\n function massRename(modeling) {\n this.preExecute = function (context) {\n let relevantElements = context.elements;\n\n context.oldLabel = relevantElements[0].businessObject.name;\n\n relevantElements.forEach((element) => {\n modeling.updateLabel(element.businessObject, confirm.newValue);\n });\n };\n\n this.execute = function (context) {\n let relevantElements = context.elements;\n relevantElements.forEach((element) => {\n let semantic = element.businessObject;\n semantic.name = context.newValue;\n\n eventBus.fire(\"element.changed\", { element });\n });\n };\n\n this.revert = function (context) {\n let relevantElements = context.elements;\n relevantElements.forEach((element) => {\n let semantic = element.businessObject;\n semantic.name = context.oldLabel;\n\n eventBus.fire(\"element.changed\", { element });\n });\n };\n }\n}\n","\"use strict\";\n\nimport {\n setLabel,\n getLabel,\n setNumber,\n getNumber,\n} from \"../labeling/dsLabelUtil\";\n\nimport {\n getExternalLabelMid,\n isLabelExternal,\n hasExternalLabel,\n isLabel,\n} from \"bpmn-js/lib/util/LabelUtil\";\n\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\nimport { getBusinessObject, is } from \"../util\";\n\nconst NULL_DIMENSIONS = {\n width: 0,\n height: 0,\n};\n\n/**\n * a handler that updates the text of a BPMN element.\n */\nexport default function UpdateLabelHandler(\n modeling,\n textRenderer,\n commandStack,\n) {\n commandStack.registerHandler(\"element.updateCustomLabel\", handlerFunction);\n\n function handlerFunction() {\n /**\n * Set the label and return the changed elements.\n *\n * Element parameter can be label itself or connection (i.e. sequence flow).\n *\n * @param {djs.model.Base} element\n * @param {String} text\n */\n\n this.preExecute = function (ctx) {\n let element = ctx.element,\n businessObject = element.businessObject,\n newLabel = ctx.newLabel,\n newNumber = ctx.newNumber;\n\n if (\n !isLabel(element) &&\n isLabelExternal(element) &&\n !hasExternalLabel(element) &&\n (newLabel !== \"\" || newNumber !== \"\")\n ) {\n // create label\n let paddingTop = 7;\n\n let labelCenter = getExternalLabelMid(element);\n\n labelCenter = {\n x: labelCenter.x,\n y: labelCenter.y + paddingTop,\n };\n\n modeling.createLabel(element, labelCenter, {\n id: businessObject.id + \"_label\",\n businessObject: businessObject,\n });\n }\n };\n\n this.execute = function (ctx) {\n ctx.oldLabel = getLabel(ctx.element);\n ctx.oldNumber = getNumber(ctx.element);\n return setText(ctx.element, ctx.newLabel, ctx.newNumber);\n };\n\n this.revert = function (ctx) {\n return setText(ctx.element, ctx.oldLabel, ctx.oldNumber);\n };\n\n this.postExecute = function (ctx) {\n let element = ctx.element,\n label = element.label || element,\n newLabel = ctx.newLabel,\n newBounds = ctx.newBounds;\n\n if (isLabel(label) && newLabel.trim() === \"\") {\n modeling.removeShape(label);\n\n return;\n }\n\n // ignore internal labels for elements except text annotations\n if (\n !isLabelExternal(element) &&\n !is(element, ElementTypes.TEXTANNOTATION)\n ) {\n return;\n }\n\n let bo = getBusinessObject(label);\n\n let text = bo.name || bo.text;\n\n // don't resize without text\n if (!text) {\n return;\n }\n\n // resize element based on label _or_ pre-defined bounds\n if (typeof newBounds === \"undefined\") {\n newBounds = textRenderer.getLayoutedBounds(label, text);\n }\n\n // setting newBounds to false or _null_ will\n // disable the postExecute resize operation\n if (newBounds) {\n modeling.resizeShape(label, newBounds, NULL_DIMENSIONS);\n }\n };\n }\n}\n\nfunction setText(element, text, textNumber) {\n // external label if present\n let label = element.label || element;\n\n let number = element.number || element;\n\n let labelTarget = element.labelTarget || element;\n\n let numberTarget = element.numberTarget || element;\n setLabel(label, text);\n setNumber(number, textNumber);\n\n return [label, labelTarget, number, numberTarget];\n}\n\nUpdateLabelHandler.$inject = [\"modeling\", \"textRenderer\", \"commandStack\"];\n","// TODO: this will not work for actors and work objects as the name of the icon is part of the type\nexport function is(element, type) {\n const bo = getBusinessObject(element);\n\n return bo && bo.type === type;\n}\n\nexport function getBusinessObject(element) {\n return (element && element.businessObject) || element;\n}\n\nexport function reworkGroupElements(parent, shape) {\n parent.children.slice().forEach((innerShape) => {\n if (innerShape.id !== shape.id) {\n if (innerShape.x >= shape.x && innerShape.x <= shape.x + shape.width) {\n if (innerShape.y >= shape.y && innerShape.y <= shape.y + shape.height) {\n innerShape.parent = shape;\n if (!shape.children.includes(innerShape)) {\n shape.children.push(innerShape);\n }\n }\n }\n }\n });\n}\n\nexport function undoGroupRework(parent, shape) {\n const superParent = parent.parent;\n\n parent.children.remove(shape);\n superParent.children.add(shape);\n\n shape.parent = superParent;\n\n const svgShape = document.querySelector(\n \"[data-element-id=\" + shape.id + \"]\",\n ).parentElement;\n const svgGroup = svgShape.parentElement;\n const svgGroupParent = svgGroup.parentElement.parentElement;\n svgGroup.removeChild(svgShape);\n svgGroupParent.appendChild(svgShape);\n}\n\nexport function isCustomIcon(icon) {\n // default icons are provided as SVG\n // custom icons are provided as \"Data URL\" with a base64-encoded image as payload\n return icon.startsWith(\"data\");\n}\n\nexport function isCustomSvgIcon(icon) {\n // default icons are provided as SVG\n // custom icons are provided as \"Data URL\" with a base64-encoded image as payload\n return icon.startsWith(\"data:image/svg\");\n}\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n OnInit,\n ViewChild,\n} from '@angular/core';\nimport { SettingsService } from 'src/app/workbench/services/settings/settings.service';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { TitleService } from './tools/title/services/title.service';\nimport { ExportService } from './tools/export/services/export.service';\nimport { ReplayService } from './tools/replay/services/replay.service';\nimport { environment } from '../environments/environment';\nimport { ColorPickerDirective } from 'ngx-color-picker';\nimport { AutosaveService } from './tools/autosave/services/autosave.service';\nimport {\n BLACK,\n BLUE,\n CYAN,\n DARK_PINK,\n GREEN,\n GREY,\n LIGHT_PINK,\n LIME,\n ORANGE,\n PURPLE,\n RED,\n SNACKBAR_DURATION,\n SNACKBAR_DURATION_LONG,\n SNACKBAR_INFO,\n YELLOW,\n} from './domain/entities/constants';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { ModelerService } from './tools/modeler/services/modeler.service';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.scss'],\n})\nexport class AppComponent implements OnInit, AfterViewInit {\n showSettings$: Observable | BehaviorSubject;\n showDescription$: Observable;\n version: string = environment.version;\n color: string = BLACK;\n\n @ViewChild(ColorPickerDirective, { static: false })\n colorPicker!: ColorPickerDirective;\n\n skipNextColorUpdate = false;\n\n // define preset colors that have good contrast on white background and are compatible to EventStorming notation\n colorBox: string[] = [\n YELLOW,\n ORANGE,\n RED,\n LIGHT_PINK,\n DARK_PINK,\n PURPLE,\n BLUE,\n CYAN,\n GREEN,\n LIME,\n GREY,\n BLACK,\n ];\n\n constructor(\n private settingsService: SettingsService,\n private titleService: TitleService,\n private exportService: ExportService,\n private autosaveService: AutosaveService,\n private cd: ChangeDetectorRef,\n private snackbar: MatSnackBar,\n replayService: ReplayService,\n private modelerService: ModelerService,\n ) {\n this.showSettings$ = new BehaviorSubject(false);\n this.showDescription$ = new BehaviorSubject(true);\n\n document.addEventListener('keydown', (e: KeyboardEvent) => {\n if (e.ctrlKey && e.key === 's') {\n e.preventDefault();\n e.stopPropagation();\n if (this.exportService.isDomainStoryExportable()) {\n this.exportService.downloadDST();\n }\n }\n if (e.ctrlKey && e.key === 'l') {\n e.preventDefault();\n e.stopPropagation();\n document.getElementById('import')?.click();\n }\n if (\n (e.key === 'ArrowRight' || e.key === 'ArrowUp') &&\n replayService.getReplayOn()\n ) {\n e.preventDefault();\n e.stopPropagation();\n replayService.nextSentence();\n }\n if (\n (e.key === 'ArrowLeft' || e.key === 'ArrowDown') &&\n replayService.getReplayOn()\n ) {\n e.preventDefault();\n e.stopPropagation();\n replayService.previousSentence();\n }\n if (e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n this.skipNextColorUpdate = true;\n this.colorPicker.closeDialog();\n }\n });\n\n document.addEventListener('defaultColor', (event: Event) => {\n const customEvent = event as CustomEvent;\n if (customEvent.detail.color === 'black') {\n this.color = BLACK;\n } else {\n this.color = customEvent.detail.color;\n }\n });\n\n document.addEventListener('openColorPicker', () => {\n this.colorPicker.openDialog();\n });\n\n document.addEventListener('errorColoringOnlySvg', () => {\n this.snackbar.open('Only SVG icons can be colored', undefined, {\n duration: SNACKBAR_DURATION_LONG,\n panelClass: SNACKBAR_INFO,\n });\n });\n }\n\n ngOnInit(): void {\n this.modelerService.postInit();\n this.showDescription$ = this.titleService.showDescription$;\n this.showSettings$ = this.settingsService.showSettings$;\n }\n\n onColorChanged(color: string) {\n if (this.skipNextColorUpdate) {\n this.skipNextColorUpdate = false;\n return;\n }\n document.dispatchEvent(\n new CustomEvent('pickedColor', { detail: { color: color } }),\n );\n }\n\n ngAfterViewInit(): void {\n this.autosaveService.loadLatestDraft();\n this.cd.detectChanges();\n }\n}\n","
\n \n\n @if (showSettings$ | async) {\n \n }\n \n \n \n
\n
\n\n \n \n \"Egon\n egon.io\n version: \n {{ version }}\n by \n \"WPS\n WPS\n \n\n \n Privacy\n \n\n \n Imprint\n \n \n\n","import {\n APP_INITIALIZER,\n ApplicationRef,\n DoBootstrap,\n NgModule,\n} from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport {\n MAT_CHECKBOX_DEFAULT_OPTIONS,\n MatCheckboxDefaultOptions,\n} from '@angular/material/checkbox';\n\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { AppComponent } from 'src/app/app.component';\nimport { ImportDomainStoryService } from 'src/app/tools/import/services/import-domain-story.service';\nimport { LabelDictionaryService } from 'src/app/tools/label-dictionary/services/label-dictionary.service';\nimport { ElementRegistryService } from 'src/app/domain/services/element-registry.service';\nimport { IconSetConfigurationService } from 'src/app/tools/icon-set-config/services/icon-set-configuration.service';\nimport { UntypedFormBuilder } from '@angular/forms';\nimport { IconDictionaryService } from 'src/app/tools/icon-set-config/services/icon-dictionary.service';\nimport { AutosaveService } from './tools/autosave/services/autosave.service';\nimport { MaterialModule } from './material.module';\nimport { ColorPickerModule } from 'ngx-color-picker';\nimport { DirtyFlagService } from './domain/services/dirty-flag.service';\nimport { IconSetChangedService } from './tools/icon-set-config/services/icon-set-customization.service';\nimport { initializeContextPadProvider } from './tools/modeler/bpmn/modeler/context-pad/domainStoryContextPadProvider';\nimport { initializePalette } from './tools/modeler/bpmn/modeler/palette/domainStoryPalette';\nimport { initializeRenderer } from './tools/modeler/bpmn/modeler/domainStoryRenderer';\nimport { initializeLabelEditingProvider } from './tools/modeler/bpmn/modeler/labeling/dsLabelEditingProvider';\nimport { initializeReplaceOptions } from './tools/modeler/bpmn/modeler/change-icon/replaceOptions';\nimport { initializeNumbering } from './tools/modeler/bpmn/modeler/numbering/numbering';\nimport { initializeActivityUpdateHandler } from './tools/modeler/bpmn/modeler/updateHandler/activityUpdateHandlers';\nimport { WorkbenchModule } from './workbench/presentation/workbench.module';\nimport { DomainModule } from './domain/presentation/domain.module';\nimport { AutosaveModule } from './tools/autosave/presentation/autosave.module';\nimport { ExportModule } from './tools/export/presentation/export.module';\nimport { IconSetConfigModule } from './tools/icon-set-config/presentation/icon-set-config.module';\nimport { ImportModule } from './tools/import/presentation/import.module';\nimport { LabelDictionaryModule } from './tools/label-dictionary/presentation/label-dictionary.module';\nimport { ModelerModule } from './tools/modeler/presentation/modeler.module';\nimport { TitleModule } from './tools/title/presentation/title.module';\nimport { DragDirective } from './tools/import/directive/dragDrop.directive';\n\n@NgModule({\n declarations: [AppComponent],\n imports: [\n BrowserModule,\n NoopAnimationsModule,\n MaterialModule,\n ColorPickerModule,\n WorkbenchModule,\n AutosaveModule,\n ExportModule,\n IconSetConfigModule,\n ImportModule,\n LabelDictionaryModule,\n ModelerModule,\n TitleModule,\n DomainModule,\n DragDirective,\n ],\n providers: [\n UntypedFormBuilder,\n {\n provide: MAT_CHECKBOX_DEFAULT_OPTIONS,\n useValue: { clickAction: 'noop' } as MatCheckboxDefaultOptions,\n },\n {\n provide: APP_INITIALIZER,\n useFactory: initialize,\n multi: true,\n deps: [\n DirtyFlagService,\n IconDictionaryService,\n IconSetConfigurationService,\n ElementRegistryService,\n LabelDictionaryService,\n ],\n },\n {\n provide: IconSetChangedService,\n useExisting: ImportDomainStoryService,\n },\n ],\n})\nexport class AppModule implements DoBootstrap {\n constructor(private autosaveService: AutosaveService) {\n // autosaveService wird so automatisch initialisiert, auf keinen Fall entfernen!\n }\n\n ngDoBootstrap(app: ApplicationRef): void {\n const componentElement = document.createElement('app-root');\n document.body.append(componentElement);\n app.bootstrap(AppComponent);\n }\n}\n\nfunction initialize(\n dirtyFlagService: DirtyFlagService,\n iconDictionaryService: IconDictionaryService,\n configurationService: IconSetConfigurationService,\n elementRegistryService: ElementRegistryService,\n labelDictionaryService: LabelDictionaryService,\n) {\n return () => {\n initializeContextPadProvider(dirtyFlagService, iconDictionaryService);\n\n /** The Palette and the Context Menu need the Icons present in the Domain,\n * so the IconDictionaryService and the IconSetConfigurationService needs to be given to the Palette **/\n initializePalette(iconDictionaryService, configurationService);\n initializeRenderer(\n iconDictionaryService,\n elementRegistryService,\n dirtyFlagService,\n );\n initializeLabelEditingProvider(labelDictionaryService);\n initializeReplaceOptions(iconDictionaryService);\n initializeNumbering(elementRegistryService);\n initializeActivityUpdateHandler(elementRegistryService);\n };\n}\n","export class Configuration {\n actors: string[];\n workObjects: string[];\n\n constructor(actors: string[], workObjects: string[]) {\n this.actors = actors;\n this.workObjects = workObjects;\n }\n}\n","/** DEFAULT VALUES **/\nexport const INITIAL_TITLE = '< title >';\nexport const INITIAL_DESCRIPTION = '';\nexport const INITIAL_ICON_SET_NAME = 'default';\n\n/** LocalStorageTags **/\nexport const APPENDED_ICONS_TAG = 'appendedIcons';\n// String value of tag should not be renamed, because existing configurations would not load\nexport const ICON_SET_CONFIGURATION_TAG = 'iconSetConfigurationTag';\n\n/** Version Key **/\nexport const VERSION_KEY = 'versionKey';\n\n/** AUTOSAVE DEFAULTS **/\nexport const DEFAULT_AUTOSAVES_ENABLED = true;\nexport const DEFAULT_AUTOSAVES_MAX_DRAFTS = 5;\nexport const DEFAULT_AUTOSAVES_INTERVAL = 30;\n\n/** SNACKBAR **/\nexport const SNACKBAR_DURATION = 2000;\nexport const SNACKBAR_DURATION_LONG = 4000;\nexport const SNACKBAR_DURATION_LONGER = 6000;\nexport const SNACKBAR_SUCCESS = 'snackbar_success';\nexport const SNACKBAR_ERROR = 'snackbar_error';\nexport const SNACKBAR_INFO = 'snackbar_info';\n\n/** BPMN_RELEVANT_CONSTANTS **/\nexport const IMPLICIT_ROOT_ID = '__implicitroot';\n\n/** COLOR PICKER DEFAULT COLORS **/\nexport const YELLOW = '#FDD835';\nexport const ORANGE = '#FB8C00';\nexport const RED = '#D32F2F';\nexport const LIGHT_PINK = '#F48FB1';\nexport const DARK_PINK = '#EC407A';\nexport const PURPLE = '#8E24AA';\nexport const BLUE = '#1E88E5';\nexport const CYAN = '#00ACC1';\nexport const GREEN = '#43A047';\nexport const LIME = '#C0CA33';\nexport const GREY = '#9E9E9E';\nexport const BLACK = '#000000';\n","export class Dictionary {\n private entries: Entry[];\n\n constructor() {\n this.entries = [];\n }\n\n get length(): number {\n return this.entries.length;\n }\n\n all(): Entry[] {\n return this.entries;\n }\n\n size(): number {\n return this.entries.length;\n }\n\n isEmpty(): boolean {\n return this.entries.length <= 0;\n }\n\n has(key: string): boolean {\n return this.entries.some((entry) => entry.key === key);\n }\n\n set(key: string, value: any): void {\n if (!this.has(key)) {\n this.entries.push(new Entry(value, key));\n }\n }\n\n add(value: any, key: string): void {\n this.set(key, value);\n }\n\n putEntry(entry: Entry): void {\n if (!this.has(entry.key)) {\n this.entries.push(new Entry(entry.value, entry.key));\n }\n }\n\n keysArray(): string[] {\n return this.entries.map((entry) => entry.key);\n }\n\n addEach(object: any): void {\n Object.keys(object).forEach((key) => {\n this.set(key, object[key]);\n });\n }\n\n appendDict(dict: Dictionary): void {\n dict.entries.forEach((entry) => this.putEntry(entry));\n }\n\n clear(): void {\n this.entries = [];\n }\n\n delete(key: string): void {\n this.entries = this.entries.filter((entry) => entry.key !== key);\n }\n\n get(key: string): any {\n const found = this.entries.filter((entry) => entry.key === key);\n return found[0] ? found[0].value : null;\n }\n}\n\nexport class Entry {\n value: any;\n key: string;\n\n constructor(value: any, key: string) {\n this.value = value;\n this.key = key;\n }\n}\n","export enum ElementTypes {\n ACTIVITY = 'domainStory:activity',\n CONNECTION = 'domainStory:connection',\n ACTOR = 'domainStory:actor',\n WORKOBJECT = 'domainStory:workObject',\n GROUP = 'domainStory:group',\n TEXTANNOTATION = 'domainStory:textAnnotation',\n DOMAINSTORY = 'domainStory:',\n}\n\nexport namespace ElementTypes {\n export function getIconId(type: string): string {\n if (type.startsWith(ElementTypes.ACTOR)) {\n return type.replace(ElementTypes.ACTOR, '');\n } else if (type.startsWith(ElementTypes.WORKOBJECT)) {\n return type.replace(ElementTypes.WORKOBJECT, '');\n }\n return '';\n }\n}\n","export class InfoDialogData {\n title: string;\n infoText: string;\n isInfo: boolean;\n isLink: boolean;\n linkText: string | undefined;\n\n constructor(\n title: string,\n infoText: string,\n isInfo: boolean,\n isLink: boolean = false,\n linkText?: string,\n ) {\n this.title = title;\n this.infoText = infoText;\n this.isInfo = isInfo;\n this.isLink = isLink;\n this.linkText = linkText;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { InfoDialogComponent } from './info-dialog/info-dialog.component';\nimport { CommonModule } from '@angular/common';\nimport { MaterialModule } from '../../material.module';\n\n@NgModule({\n declarations: [InfoDialogComponent],\n exports: [InfoDialogComponent],\n imports: [CommonModule, MaterialModule],\n})\nexport class DomainModule {}\n","import { AfterViewInit, Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { InfoDialogData } from 'src/app/domain/entities/infoDialogData';\n\n@Component({\n selector: 'app-info-dialog',\n templateUrl: './info-dialog.component.html',\n styleUrls: ['./info-dialog.component.scss'],\n})\nexport class InfoDialogComponent implements AfterViewInit {\n title: string;\n infoText: string;\n showConfirmButton: boolean;\n hasLink: boolean;\n linkText: string;\n\n constructor(\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: InfoDialogData,\n ) {\n this.title = data.title;\n this.infoText = data.infoText;\n this.showConfirmButton = !data.isInfo;\n this.hasLink = data.isLink;\n this.linkText = data.linkText || '';\n }\n\n ngAfterViewInit() {\n const span = document.getElementsByClassName(\n 'readOnlyText',\n )[0] as HTMLTextAreaElement;\n span.style.height = span.scrollHeight + 'px';\n }\n\n close(): void {\n this.dialogRef.close();\n }\n}\n","\n

{{ title }}

\n @if (infoText != \"\") {\n {{ infoText }} \n }\n @if (hasLink) {\n {{ linkText }}\n }\n
\n\n@if (showConfirmButton) {\n \n \n \n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CommandStackService {\n private commandStack: any;\n\n constructor() {}\n\n setCommandStack(commandStack: any): void {\n this.commandStack = commandStack;\n }\n\n execute(action: string, payload: any) {\n this.commandStack.execute(action, payload);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\nimport { ComponentType } from '@angular/cdk/overlay';\nimport { InfoDialogData } from '../entities/infoDialogData';\nimport { InfoDialogComponent } from '../presentation/info-dialog/info-dialog.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DialogService {\n constructor(private matDialog: MatDialog) {}\n\n openDialog(dialog: ComponentType, config: MatDialogConfig): void {\n this.matDialog.open(dialog, config);\n }\n\n openKeyboardShortcutsDialog(): void {\n const title = 'Keyboard Shortcuts';\n const shortCutText =\n 'Undo:\\t\\t\\t\\t\\tctrl + Z \\n' +\n 'Redo:\\t\\t\\t\\t\\tctrl + Y OR ctrl + shift + Z\\n' +\n 'Select All:\\t\\t\\t\\tctrl + A\\n' +\n 'Export as EGN:\\t\\t\\tctrl + S\\n' +\n 'Import Domain Story: \\tctrl + L\\n' +\n 'Search for text:\\t\\t\\tctrl + F\\n' +\n 'Direct editing:\\t\\t\\tE\\n' +\n 'Hand tool:\\t\\t\\t\\tH\\n' +\n 'Lasso tool:\\t\\t\\t\\tL\\n' +\n 'Space tool:\\t\\t\\t\\tS';\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n config.data = new InfoDialogData(title, shortCutText, true);\n\n this.openDialog(InfoDialogComponent, config);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DirtyFlagService {\n private isDirtySubject = new BehaviorSubject(false);\n dirty$ = this.isDirtySubject.asObservable();\n\n makeDirty(): void {\n this.isDirtySubject.next(true);\n }\n\n makeClean(): void {\n this.isDirtySubject.next(false);\n }\n\n get dirty(): boolean {\n return this.isDirtySubject.value;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { ElementTypes } from 'src/app/domain/entities/elementTypes';\nimport { CanvasObject } from 'src/app/domain/entities/canvasObject';\nimport { GroupCanvasObject } from '../entities/groupCanvasObject';\nimport { ActivityCanvasObject } from '../entities/activityCanvasObject';\nimport { UsedIconList } from 'src/app/domain/entities/UsedIconList';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ElementRegistryService {\n private registry: any;\n private fullyInitialized = false;\n\n /**\n * Initially the registry has only the root-Element.\n * Once the canvas has bees initialized, we adjust the reference to point to the elements on the canvas for convenience\n */\n correctInitialize(): void {\n if (!this.fullyInitialized) {\n if (this.registry.__implicitroot) {\n this.registry = this.registry.__implicitroot.element.children;\n this.fullyInitialized = true;\n }\n }\n }\n\n setElementRegistry(registry: any): void {\n this.registry = registry._elements;\n }\n\n clear(): void {\n this.registry = null;\n this.fullyInitialized = false;\n }\n\n createObjectListForDSTDownload(): CanvasObject[] {\n if (this.registry) {\n const allObjectsFromCanvas = this.getAllCanvasObjects();\n const groups = this.getAllGroups();\n\n const objectList: CanvasObject[] = [];\n\n this.fillListOfCanvasObjects(allObjectsFromCanvas, objectList, groups);\n\n return objectList;\n }\n return [];\n }\n\n private fillListOfCanvasObjects(\n allObjectsFromCanvas: CanvasObject[],\n objectList: CanvasObject[],\n groups: GroupCanvasObject[],\n ): void {\n allObjectsFromCanvas.forEach((canvasElement) => {\n if (canvasElement.type === ElementTypes.ACTIVITY) {\n objectList.push(canvasElement);\n }\n\n // ensure that Activities are always after Actors, Workobjects and Groups in .dst files\n else {\n if (canvasElement.type === ElementTypes.TEXTANNOTATION) {\n canvasElement.businessObject.width = canvasElement.width;\n canvasElement.businessObject.height = canvasElement.height;\n }\n if (!objectList.includes(canvasElement)) {\n objectList.unshift(canvasElement);\n }\n }\n });\n\n groups.forEach((group) => {\n objectList.push(group);\n });\n }\n\n getAllActivities(): ActivityCanvasObject[] {\n const activities: ActivityCanvasObject[] = [];\n\n this.getAllCanvasObjects().forEach((element) => {\n if (element.type.includes(ElementTypes.ACTIVITY)) {\n activities.push(element as ActivityCanvasObject);\n }\n });\n return activities;\n }\n\n getAllConnections(): ActivityCanvasObject[] {\n const connections: ActivityCanvasObject[] = [];\n this.getAllCanvasObjects().forEach((element) => {\n const type = element.type;\n if (type === ElementTypes.CONNECTION) {\n connections.push(element as ActivityCanvasObject);\n }\n });\n return connections;\n }\n\n getAllCanvasObjects(): CanvasObject[] {\n const allObjects: CanvasObject[] = [];\n const groupObjects: GroupCanvasObject[] = [];\n\n this.checkChildForGroup(groupObjects, allObjects);\n\n // for each memorized group, remove it from the group-array and check its children, whether they are groups or not\n // if a child is a group, memorize it in the group-array\n // other children should already be in the allObjects list\n let i = groupObjects.length - 1;\n while (groupObjects.length >= 1) {\n const currentGroup = groupObjects.pop();\n // @ts-ignore\n currentGroup.children.forEach((child: CanvasObject) => {\n const type = child.type;\n if (type.includes(ElementTypes.GROUP)) {\n groupObjects.push(child as GroupCanvasObject);\n }\n });\n i = groupObjects.length - 1;\n }\n return allObjects;\n }\n\n // returns all groups on the canvas and inside other groups\n getAllGroups(): GroupCanvasObject[] {\n const groupObjects: GroupCanvasObject[] = [];\n const allObjects: CanvasObject[] = [];\n\n this.checkChildForGroup(groupObjects, allObjects);\n\n for (const group of groupObjects) {\n group.children?.forEach((child: CanvasObject) => {\n if (child.type.includes(ElementTypes.GROUP)) {\n groupObjects.push(child as GroupCanvasObject);\n }\n });\n }\n return groupObjects;\n }\n\n private checkChildForGroup(\n groupObjects: GroupCanvasObject[],\n allObjects: CanvasObject[],\n ): void {\n const registryElementNames = Object.keys(this.registry);\n for (let name of registryElementNames) {\n const entry = this.registry[name].element;\n if (entry.businessObject) {\n const type = entry.type;\n if (type && type.includes(ElementTypes.GROUP)) {\n // if it is a group, memorize this for later\n groupObjects.push(entry);\n } else if (type) {\n allObjects.push(entry);\n }\n }\n }\n }\n\n // get a list of activities, that originate from an actor-type\n getActivitiesFromActors(): ActivityCanvasObject[] {\n const activitiesFromActors: ActivityCanvasObject[] = [];\n const activities = this.getAllActivities();\n\n activities.forEach((activity: ActivityCanvasObject) => {\n if (activity.source?.type.includes(ElementTypes.ACTOR)) {\n activitiesFromActors.push(activity);\n }\n });\n\n // sort by activityBusinessObject number\n activitiesFromActors.sort(\n (\n activityCanvasA: ActivityCanvasObject,\n activityCanvasB: ActivityCanvasObject,\n ) => {\n const activityNumberA = Number(activityCanvasA.businessObject.number);\n const activityNumberB = Number(activityCanvasB.businessObject.number);\n\n return activityNumberA - activityNumberB;\n },\n );\n\n return activitiesFromActors;\n }\n\n getUsedIcons(): UsedIconList {\n const actors = this.getAllActors();\n const workobjects = this.getAllWorkobjects();\n\n return {\n actors: actors.map((a) => a.type.replace(ElementTypes.ACTOR, '')),\n workobjects: workobjects.map((w) =>\n w.type.replace(ElementTypes.WORKOBJECT, ''),\n ),\n };\n }\n\n private getAllActors() {\n return this.getAllCanvasObjects().filter((co) =>\n co.type.includes(ElementTypes.ACTOR),\n );\n }\n\n getAllWorkobjects() {\n return this.getAllCanvasObjects().filter((co) =>\n co.type.includes(ElementTypes.WORKOBJECT),\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StorageService {\n set(key: string, value: any) {\n localStorage.setItem(key, JSON.stringify(value));\n }\n\n get(key: string): any {\n const json = localStorage.getItem(key);\n if (json) {\n return JSON.parse(json);\n }\n return null;\n }\n}\n","import { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { NgModule } from '@angular/core';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatGridListModule } from '@angular/material/grid-list';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { MatListModule } from '@angular/material/list';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\n@NgModule({\n imports: [\n MatButtonModule,\n MatButtonToggleModule,\n MatListModule,\n MatCheckboxModule,\n MatDialogModule,\n MatFormFieldModule,\n MatGridListModule,\n MatInputModule,\n MatToolbarModule,\n MatExpansionModule,\n MatSnackBarModule,\n MatCardModule,\n ],\n exports: [\n MatButtonModule,\n MatButtonToggleModule,\n MatListModule,\n MatCheckboxModule,\n MatDialogModule,\n MatFormFieldModule,\n MatGridListModule,\n MatInputModule,\n MatToolbarModule,\n MatExpansionModule,\n MatSnackBarModule,\n MatCardModule,\n ],\n})\nexport class MaterialModule {}\n","import { Component } from '@angular/core';\nimport { AutosaveConfigurationService } from '../../services/autosave-configuration.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_ERROR,\n SNACKBAR_SUCCESS,\n} from 'src/app/domain/entities/constants';\n\n@Component({\n selector: 'app-autosave-options',\n templateUrl: './autosave-options.component.html',\n styleUrls: ['./autosave-options.component.scss'],\n})\nexport class AutosaveOptionsComponent {\n constructor(\n protected autosaveConfiguration: AutosaveConfigurationService,\n private snackbar: MatSnackBar,\n ) {}\n\n save(activated: boolean, maxDrafts: number, interval: number) {\n if (\n this.autosaveConfiguration.setConfiguration({\n activated,\n maxDrafts,\n interval,\n })\n ) {\n this.snackbar.open('Settings for Autosave saved', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n });\n } else {\n this.snackbar.open(\n 'Unable to save settings for Autosave - please try again',\n undefined,\n {\n duration: 2 * SNACKBAR_DURATION,\n panelClass: SNACKBAR_ERROR,\n },\n );\n }\n }\n}\n","@if (autosaveConfiguration.configuration$ | async; as configuration) {\n \n \n Autosave Options\n \n \n
\n \n Enabled\n
\n
\n Interval [sec]\n \n
\n
\n Max. Drafts\n \n
\n \n Apply\n \n
\n
\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-autosave-settings',\n templateUrl: './autosave-settings.component.html',\n styleUrls: ['./autosave-settings.component.scss'],\n})\nexport class AutosaveSettingsComponent {}\n","\n\n","import { Component, OnInit } from '@angular/core';\nimport { AutosaveService } from '../../services/autosave.service';\nimport { Draft } from '../../domain/draft';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_SUCCESS,\n} from 'src/app/domain/entities/constants';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'app-autosaved-drafts',\n templateUrl: './autosaved-drafts.component.html',\n styleUrls: ['./autosaved-drafts.component.scss'],\n})\nexport class AutosavedDraftsComponent implements OnInit {\n drafts: Draft[] = [];\n subscription: Subscription;\n\n constructor(\n private autosaveService: AutosaveService,\n private snackbar: MatSnackBar,\n ) {\n this.subscription = this.autosaveService.autosavedDraftsChanged$.subscribe(\n () => this.initDrafts(),\n );\n }\n\n ngOnInit(): void {\n this.initDrafts();\n }\n\n initDrafts() {\n this.drafts = this.autosaveService.loadCurrentDrafts();\n }\n\n loadDraft(draft: Draft): void {\n this.autosaveService.loadDraft(draft);\n this.snackbar.open('Draft loaded', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n });\n }\n\n removeAllDrafts() {\n this.autosaveService.removeAllDrafts();\n }\n}\n","\n \n \n History\n \n {{ drafts.length ? drafts.length : \"no\" }}\n {{ drafts.length > 1 ? \"drafts\" : \"draft\" }} available\n \n \n @if (drafts.length) {\n
\n @for (draft of drafts; track draft) {\n
\n
\n
{{ draft.title }}
\n
{{ draft.date }}
\n
\n \n Load Draft\n \n
\n }\n
\n
\n \n Remove All Drafts\n \n
\n
\n } @else {\n No drafts found.\n }\n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AutosaveSettingsComponent } from './AutosaveSettings/autosave-settings.component';\nimport { AutosaveOptionsComponent } from './AutosaveOptions/autosave-options.component';\nimport { AutosavedDraftsComponent } from './AutosavedDrafts/autosaved-drafts.component';\nimport { FormsModule } from '@angular/forms';\nimport { MaterialModule } from '../../../material.module';\n\n@NgModule({\n declarations: [\n AutosaveSettingsComponent,\n AutosaveOptionsComponent,\n AutosavedDraftsComponent,\n ],\n exports: [AutosaveSettingsComponent],\n imports: [CommonModule, FormsModule, MaterialModule],\n})\nexport class AutosaveModule {}\n","import { Injectable } from '@angular/core';\nimport { ReplaySubject } from 'rxjs';\nimport { StorageService } from '../../../domain/services/storage.service';\nimport { AutosaveConfiguration } from '../domain/autosave-configuration';\nimport {\n DEFAULT_AUTOSAVES_MAX_DRAFTS,\n DEFAULT_AUTOSAVES_ENABLED,\n DEFAULT_AUTOSAVES_INTERVAL,\n} from 'src/app/domain/entities/constants';\n\nconst AUTOSAVE_CONFIGURATION_TAG = 'autosaveConfiguration';\n\nconst defaultConfiguration: AutosaveConfiguration = {\n activated: DEFAULT_AUTOSAVES_ENABLED,\n interval: DEFAULT_AUTOSAVES_INTERVAL,\n maxDrafts: DEFAULT_AUTOSAVES_MAX_DRAFTS,\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AutosaveConfigurationService {\n private configuration = defaultConfiguration;\n\n private readonly configurationSubject =\n new ReplaySubject(1);\n readonly configuration$ = this.configurationSubject.asObservable();\n\n constructor(private storageService: StorageService) {\n this.initializeConfiguration();\n }\n\n private initializeConfiguration() {\n this.loadConfiguration();\n this.configurationSubject.next(this.configuration);\n }\n\n setConfiguration(configuration: AutosaveConfiguration): boolean {\n try {\n this.configuration = configuration;\n this.saveConfiguration();\n this.configurationSubject.next(configuration);\n return true;\n } catch {\n return false;\n }\n }\n\n private loadConfiguration() {\n this.configuration =\n this.storageService.get(AUTOSAVE_CONFIGURATION_TAG) ??\n defaultConfiguration;\n }\n\n private saveConfiguration() {\n this.storageService.set(AUTOSAVE_CONFIGURATION_TAG, this.configuration);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { RendererService } from '../../modeler/services/renderer.service';\nimport { ExportService } from '../../export/services/export.service';\nimport { Draft } from '../domain/draft';\nimport { AutosaveConfigurationService } from './autosave-configuration.service';\nimport { IconDictionaryService } from '../../icon-set-config/services/icon-dictionary.service';\nimport { ElementTypes } from '../../../domain/entities/elementTypes';\nimport { StorageService } from '../../../domain/services/storage.service';\nimport { TitleService } from '../../title/services/title.service';\nimport { AutosaveConfiguration } from '../domain/autosave-configuration';\nimport { Subject } from 'rxjs';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_TITLE,\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n} from '../../../domain/entities/constants';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { IconSetConfigurationService } from '../../icon-set-config/services/icon-set-configuration.service';\n\nexport const DRAFTS_TAG = 'autosaveDrafts';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AutosaveService {\n private autosaveTimer: any;\n autosavedDraftsChanged$ = new Subject();\n\n constructor(\n private autosaveConfiguration: AutosaveConfigurationService,\n private exportService: ExportService,\n private iconDictionaryService: IconDictionaryService,\n private rendererService: RendererService,\n private snackbar: MatSnackBar,\n private storageService: StorageService,\n private titleService: TitleService,\n private iconSetConfigurationService: IconSetConfigurationService,\n ) {\n this.autosaveConfiguration.configuration$.subscribe((configuration) =>\n this.updateConfiguration(configuration),\n );\n }\n\n loadCurrentDrafts(): Draft[] {\n const drafts = this.readDrafts();\n this.sortDrafts(drafts);\n return drafts;\n }\n\n loadDraft(draft: Draft): void {\n const configFromFile = draft.configAndDST.domain;\n const config =\n this.iconSetConfigurationService.createIconSetConfiguration(\n configFromFile,\n );\n const story = JSON.parse(draft.configAndDST.dst);\n\n this.titleService.updateTitleAndDescription(\n draft.title,\n draft.description,\n false,\n );\n\n const actorIcons = this.iconDictionaryService.getElementsOfType(\n story,\n ElementTypes.ACTOR,\n );\n const workObjectIcons = this.iconDictionaryService.getElementsOfType(\n story,\n ElementTypes.WORKOBJECT,\n );\n this.iconDictionaryService.updateIconRegistries(\n actorIcons,\n workObjectIcons,\n config,\n );\n this.rendererService.importStory(story, true, config, false);\n }\n\n removeAllDrafts() {\n this.storageService.set(DRAFTS_TAG, []);\n this.autosavedDraftsChanged$.next();\n }\n\n loadLatestDraft() {\n const drafts = this.readDrafts();\n if (drafts.length === 0) {\n return;\n }\n this.loadDraft(drafts[0]);\n }\n\n private updateConfiguration(configuration: AutosaveConfiguration) {\n this.stopTimer();\n\n if (configuration.activated) {\n this.startTimer(configuration.interval, configuration.maxDrafts);\n }\n }\n\n private stopTimer(): void {\n if (this.autosaveTimer) {\n clearInterval(this.autosaveTimer);\n this.autosaveTimer = undefined;\n }\n }\n\n private startTimer(interval: number, maxDrafts: number): void {\n this.autosaveTimer = setInterval(() => {\n const savedDrafts = this.loadCurrentDrafts();\n const newDraft = this.createDraft();\n let isChanged = maxDrafts > 0;\n if (savedDrafts.length > 0) {\n isChanged = isChanged && !this.isSame(newDraft, savedDrafts[0]);\n }\n if (isChanged && !this.isDraftEmpty(newDraft)) {\n savedDrafts.unshift(newDraft);\n while (savedDrafts.length > maxDrafts) {\n savedDrafts.pop();\n }\n this.writeDrafts(savedDrafts);\n this.snackbar.open('Draft Saved', undefined, {\n panelClass: SNACKBAR_INFO,\n duration: SNACKBAR_DURATION,\n });\n this.autosavedDraftsChanged$.next();\n }\n }, interval * 1000);\n }\n\n private isDraftEmpty(draft: Draft) {\n const configAndDST = draft.configAndDST ?? { dst: '[]' };\n return (\n draft.title === INITIAL_TITLE &&\n draft.description === INITIAL_DESCRIPTION &&\n JSON.parse(configAndDST.dst).length === 0\n );\n }\n\n private isSame(a: Draft, b: Draft) {\n return (\n a.title === b.title &&\n a.description === b.description &&\n JSON.stringify(a.configAndDST) === JSON.stringify(b.configAndDST)\n );\n }\n\n private writeDrafts(drafts: Draft[]) {\n this.storageService.set(DRAFTS_TAG, drafts);\n }\n\n private readDrafts(): Draft[] {\n return this.storageService.get(DRAFTS_TAG) ?? [];\n }\n\n private createDraft(): Draft {\n const dst = JSON.stringify(this.rendererService.getStory(), null, 2);\n const configAndDST = this.exportService.createConfigAndDST(dst);\n\n const date = new Date().toString().slice(0, 25);\n\n return {\n title: this.titleService.getTitle(),\n description: this.titleService.getDescription(),\n configAndDST,\n date,\n };\n }\n\n private sortDrafts(drafts: Draft[]): void {\n drafts.sort((a: Draft, b: Draft) => {\n const aDate = Date.parse(a.date);\n const bDate = Date.parse(b.date);\n return aDate > bDate ? 0 : 1;\n });\n }\n}\n","export class ExportDialogData {\n title: string;\n options: ExportOption[];\n\n constructor(title: string, options: ExportOption[]) {\n this.title = title;\n this.options = options;\n }\n}\n\nexport class ExportOption {\n text: string;\n fn: any;\n tooltip: string;\n\n constructor(text: string, tooltip: string, fn: any) {\n this.text = text;\n this.tooltip = tooltip;\n this.fn = fn;\n }\n}\n","export class ConfigAndDST {\n domain: any;\n dst: any;\n\n constructor(domain: any, dst: any) {\n this.domain = domain;\n this.dst = dst;\n }\n}\n\nexport const testConfigAndDst: ConfigAndDST = {\n domain: JSON.parse(\n '{\"name\":\"\",' +\n '\"actors\":{\"Person\":\"' +\n '' +\n '\",' +\n '\"Group\":\"' +\n '' +\n '\",' +\n '\"System\":\"' +\n '\"},' +\n '\"workObjects\":{\"Document\":\"' +\n '\",' +\n '\"Folder\":\"' +\n '' +\n '\",' +\n '\"Call\":\"' +\n '\",' +\n '\"Email\":\"' +\n '\",' +\n '\"Conversation\":\"' +\n '\",' +\n '\"Info\":\"' +\n '' +\n '\"}}',\n ),\n dst:\n '[' +\n '{\"type\":\"domainStory:workObjectDocument\",\"name\":\"\",\"id\":\"shape_3792\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"x\":302,\"y\":102},' +\n '{\"type\":\"domainStory:actorPerson\",\"name\":\"\",\"id\":\"shape_4666\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"x\":103,\"y\":93},' +\n '{\"type\":\"domainStory:activity\",\"name\":\"\",\"id\":\"connection_4884\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"number\":1,' +\n '\"waypoints\":[{\"original\":{\"x\":141,\"y\":131},\"x\":186,\"y\":133},{\"original\":{\"x\":340,\"y\":140},\"x\":302,\"y\":138}],' +\n '\"source\":\"shape_4666\",\"target\":\"shape_3792\"}]',\n};\n","export const SVG_LINK = 'http://www.w3.org/2000/svg';\nexport const X_OFFSET_UTIL = '8';\nexport const TEXTSPAN_TITLE_HEIGHT = 30;\nexport const TEXTSPAN_DESCRIPTION_HEIGHT = 15;\nexport const DEFAULT_PADDING = 15;\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { ExportDialogData } from 'src/app/tools/export/domain/dialog/exportDialogData';\nimport { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';\n\n@Component({\n selector: 'app-export-dialog',\n templateUrl: './export-dialog.component.html',\n styleUrls: ['./export-dialog.component.scss'],\n})\nexport class ExportDialogComponent implements OnInit {\n title: string;\n options: {\n text: string;\n tooltip: string;\n fn: any;\n }[];\n withTitle: BehaviorSubject;\n useWhiteBackground: BehaviorSubject;\n\n constructor(\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: ExportDialogData,\n ) {\n this.withTitle = new BehaviorSubject(true);\n this.useWhiteBackground = new BehaviorSubject(true);\n this.title = data.title;\n this.options = data.options;\n }\n\n ngOnInit(): void {}\n\n doOption(i: number): void {\n this.options[i].fn(this.withTitle.value, this.useWhiteBackground.value);\n this.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n updateWithTitle($event: Event) {\n // @ts-ignore\n this.withTitle.next($event.target.checked);\n }\n\n updateUseWhiteBackground($event: Event) {\n // @ts-ignore\n this.useWhiteBackground.next($event.target.checked);\n }\n}\n","\n

{{ title }}

\n \n
\n \n
\n\n
\n\n
\n \n @for (option of options; track option; let i = $index) {\n \n {{ option.text }}\n \n }\n
\n
\n","import { ExportDialogComponent } from './export-dialog/export-dialog.component';\nimport { CommonModule } from '@angular/common';\nimport { MaterialModule } from '../../../material.module';\nimport { NgModule } from '@angular/core';\n\n@NgModule({\n declarations: [ExportDialogComponent],\n exports: [ExportDialogComponent],\n imports: [CommonModule, MaterialModule],\n})\nexport class ExportModule {}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { IconSetConfigurationService } from 'src/app/tools/icon-set-config/services/icon-set-configuration.service';\nimport { sanitizeForDesktop } from 'src/app/utils/sanitizer';\nimport { TitleService } from 'src/app/tools/title/services/title.service';\nimport { ConfigAndDST } from 'src/app/tools/export/domain/export/configAndDst';\nimport { DirtyFlagService } from 'src/app/domain/services/dirty-flag.service';\nimport { PngService } from 'src/app/tools/export/services/png.service';\nimport { SvgService } from 'src/app/tools/export/services/svg.service';\nimport { Subscription } from 'rxjs';\nimport { RendererService } from '../../modeler/services/renderer.service';\nimport { HtmlPresentationService } from './html-presentation.service';\nimport { formatDate } from '@angular/common';\nimport { environment } from '../../../../environments/environment';\nimport {\n ExportDialogData,\n ExportOption,\n} from '../domain/dialog/exportDialogData';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { ExportDialogComponent } from '../presentation/export-dialog/export-dialog.component';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n} from '../../../domain/entities/constants';\nimport { ModelerService } from '../../modeler/services/modeler.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { DialogService } from '../../../domain/services/dialog.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ExportService implements OnDestroy {\n titleSubscription: Subscription;\n descriptionSubscription: Subscription;\n\n title = '';\n description = '';\n\n constructor(\n private configurationService: IconSetConfigurationService,\n private titleService: TitleService,\n private dirtyFlagService: DirtyFlagService,\n private pngService: PngService,\n private svgService: SvgService,\n private htmlPresentationService: HtmlPresentationService,\n private rendererService: RendererService,\n private modelerService: ModelerService,\n private dialogService: DialogService,\n private snackbar: MatSnackBar,\n ) {\n this.titleSubscription = this.titleService.title$.subscribe(\n (title: string) => {\n this.title = title;\n },\n );\n this.descriptionSubscription = this.titleService.description$.subscribe(\n (description: string) => {\n this.description = description;\n },\n );\n }\n\n ngOnDestroy(): void {\n this.titleSubscription.unsubscribe();\n this.descriptionSubscription.unsubscribe();\n }\n\n isDomainStoryExportable(): boolean {\n return this.rendererService.getStory().length >= 1;\n }\n\n createConfigAndDST(DomainStory: any): ConfigAndDST {\n return new ConfigAndDST(\n this.configurationService.getCurrentConfigurationForExport(),\n DomainStory,\n );\n }\n\n downloadDST(): void {\n const dst = this.getStoryForDownload();\n const configAndDST = this.createConfigAndDST(dst);\n const json = JSON.stringify(configAndDST, null, 2);\n\n const filename = sanitizeForDesktop(\n this.title + '_' + this.getCurrentDateString(),\n );\n\n this.downloadFile(\n json,\n 'data:text/plain;charset=utf-8,',\n filename,\n '.egn',\n true,\n );\n }\n\n private downloadFile(\n data: string,\n datatype: string,\n filename: string,\n fileEnding: string,\n makeClean: boolean,\n ) {\n const element = document.createElement('a');\n element.setAttribute('href', datatype + encodeURIComponent(data));\n element.setAttribute('download', filename + fileEnding);\n\n element.style.display = 'none';\n document.body.appendChild(element);\n\n element.click();\n\n if (makeClean) {\n this.dirtyFlagService.makeClean();\n }\n\n document.body.removeChild(element);\n }\n\n downloadSVG(withTitle: boolean, useWhiteBackground: boolean): void {\n const story = this.getStoryForDownload();\n const dst = this.createConfigAndDST(story);\n\n const svgData = this.svgService.createSVGData(\n this.title,\n this.description,\n dst,\n withTitle,\n useWhiteBackground,\n );\n\n this.downloadFile(\n svgData,\n 'data:application/bpmn20-xml;charset=UTF-8,',\n sanitizeForDesktop(this.title + '_' + this.getCurrentDateString()),\n '.egn.svg',\n true,\n );\n }\n\n downloadPNG(withTitle: boolean): void {\n const canvas = document.getElementById('canvas');\n if (canvas) {\n const container = canvas.getElementsByClassName('djs-container');\n const svgElements = container[0].getElementsByTagName('svg');\n const outerSVGElement = svgElements[0];\n const viewport = outerSVGElement.getElementsByClassName('viewport')[0];\n const layerBase = viewport.getElementsByClassName('layer-base')[0];\n\n const image = document.createElement('img');\n\n // removes unwanted black dots in image\n let svg = this.pngService.extractSVG(viewport, outerSVGElement);\n\n svg = this.pngService.prepareSVG(\n svg,\n layerBase,\n this.description,\n this.title,\n withTitle,\n );\n\n image.onload = () => {\n const tempCanvas = document.createElement('canvas');\n\n // add a 10px buffer to the right and lower boundary\n tempCanvas.width = this.pngService.getWidth() + 10;\n tempCanvas.height = this.pngService.getHeight() + 10;\n\n const ctx = tempCanvas.getContext('2d');\n if (ctx) {\n // fill with white background\n ctx.rect(0, 0, tempCanvas.width, tempCanvas.height);\n ctx.fillStyle = 'white';\n ctx.fill();\n\n ctx.drawImage(image, 0, 0);\n }\n\n const png64 = tempCanvas.toDataURL('image/png');\n const ele = document.createElement('a');\n ele.setAttribute(\n 'download',\n sanitizeForDesktop(this.title) +\n '_' +\n this.getCurrentDateString() +\n '.png',\n );\n ele.setAttribute('href', png64);\n document.body.appendChild(ele);\n ele.click();\n document.body.removeChild(ele);\n\n // image source has to be removed to circumvent browser caching\n image.src = '';\n };\n image.onchange = image.onload;\n\n image.width = this.pngService.getWidth();\n image.height = this.pngService.getHeight();\n\n image.src = 'data:image/svg+xml,' + svg;\n }\n }\n\n downloadHTMLPresentation(modeler: any): void {\n const filename = sanitizeForDesktop(\n this.title + '_' + this.getCurrentDateString(),\n );\n this.htmlPresentationService\n .downloadHTMLPresentation(filename, modeler)\n .then();\n }\n\n private getStoryForDownload(): unknown[] {\n const story = this.rendererService.getStory() as unknown[];\n story.push({ info: this.titleService.getDescription() });\n story.push({ version: environment.version });\n return story;\n }\n\n private getCurrentDateString(): string {\n return formatDate(new Date(), 'YYYY-MM-dd', 'en-GB');\n }\n\n openDownloadDialog() {\n if (this.isDomainStoryExportable()) {\n const SVGDownloadOption = new ExportOption(\n 'SVG',\n 'Download an SVG-Image with the Domain-Story embedded. Can be used to save and share your Domain-Story.',\n (withTitle: boolean, useWhiteBackground: boolean) =>\n this.downloadSVG(withTitle, useWhiteBackground),\n );\n const EGNDownloadOption = new ExportOption(\n 'EGN',\n 'Download an EGN-File with the Domain-Story. Can be used to save and share your Domain-Story.',\n () => this.downloadDST(),\n );\n const PNGDownloadOption = new ExportOption(\n 'PNG',\n 'Download a PNG-Image of the Domain-Story. This does not include the Domain-Story!',\n (withTitle: boolean) => this.downloadPNG(withTitle),\n );\n const HTMLDownloadOption = new ExportOption(\n 'HTML-Presentation',\n 'Download an HTML-Presentation. This does not include the Domain-Story!',\n () => this.downloadHTMLPresentation(this.modelerService.getModeler()),\n );\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n config.data = new ExportDialogData('Export', [\n SVGDownloadOption,\n EGNDownloadOption,\n PNGDownloadOption,\n HTMLDownloadOption,\n ]);\n\n this.dialogService.openDialog(ExportDialogComponent, config);\n } else {\n this.snackbar.open('No Domain Story to be exported', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_INFO,\n });\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { sanitizeForDesktop } from '../../../utils/sanitizer';\nimport { ReplayService } from '../../replay/services/replay.service';\n// @ts-ignore\nimport doT from 'dot';\nimport { TitleService } from '../../title/services/title.service';\nimport { StoryCreatorService } from '../../replay/services/story-creator.service';\n\n@Injectable({\n providedIn: 'root',\n})\n/**\n * Initial idea and PR from https://github.com/indika-dev\n */\nexport class HtmlPresentationService {\n constructor(\n private replayService: ReplayService,\n private titleService: TitleService,\n private storyCreatorService: StoryCreatorService,\n ) {}\n\n private multiplexSecret: any;\n private multiplexId: any;\n\n private static viewBoxCoordinates(svg: any): any {\n const ViewBoxCoordinate =\n /width=\"([^\"]+)\"\\s+height=\"([^\"]+)\"\\s+viewBox=\"([^\"]+)\"/;\n const match = svg.match(ViewBoxCoordinate);\n return match[3];\n }\n\n /*\n ---------------------------\n SVG handling starts here\n ----------------------------\n */\n\n async downloadHTMLPresentation(\n filename: string,\n modeler: any,\n ): Promise {\n const svgData = [];\n // export all sentences of domain story\n this.replayService.startReplay();\n try {\n const result = await modeler.saveSVG({});\n this.fixActivityMarkersForEachSentence(\n result,\n this.replayService.getCurrentSentenceNumber(),\n );\n svgData.push({\n content: HtmlPresentationService.createSVGData(result.svg),\n transition: 'slide',\n });\n } catch (err) {\n alert('There was an error exporting the SVG.\\n' + err);\n }\n while (\n this.replayService.getCurrentSentenceNumber() <\n this.replayService.getMaxSentenceNumber()\n ) {\n this.replayService.nextSentence();\n try {\n const result = await modeler.saveSVG({});\n this.fixActivityMarkersForEachSentence(\n result,\n this.replayService.getCurrentSentenceNumber(),\n );\n svgData.push({\n content: HtmlPresentationService.createSVGData(result.svg),\n transition: 'slide',\n });\n } catch (err) {\n alert('There was an error exporting the SVG.\\n' + err);\n }\n }\n this.replayService.stopReplay();\n\n // create download for presentation\n const revealjsTemplate = document.getElementById('revealjs-template');\n const dots = doT.template(revealjsTemplate?.innerHTML);\n const revealjsData = {\n script: 'script',\n title: this.titleService.getTitle(),\n description: this.titleService.getDescription(),\n sentences: svgData,\n multiplexSecret: this.multiplexSecret,\n multiplexId: this.multiplexId,\n };\n const element = document.createElement('a');\n element.setAttribute(\n 'href',\n 'data:text/html;charset=UTF-8,' +\n this.fixMalformedHtmlScript(dots, revealjsData),\n );\n element.setAttribute('download', sanitizeForDesktop(filename) + '.html');\n element.style.display = 'none';\n document.body.appendChild(element);\n element.click();\n document.body.removeChild(element);\n }\n\n private fixMalformedHtmlScript(\n dots: any,\n revealjsData: {\n multiplexId: any;\n sentences: any[];\n multiplexSecret: any;\n description: string;\n title: string;\n script: string;\n },\n ) {\n return dots(revealjsData).replace(''),\n result.svg.indexOf('') + 7,\n );\n const split = defs.split(' {\n const idToReplace = id.substring(4, id.length - 1);\n const newId =\n idToReplace.slice(0, id.length - 5) +\n 'customId' +\n sectionIndex +\n idToReplace.slice(idToReplace.length - 2);\n // @ts-ignore\n result.svg = result.svg.replaceAll(idToReplace, newId);\n });\n newDefs += '= 72) {\n fix = true;\n // https://www.chromestatus.com/features/5656049583390720\n }\n } else if (name.includes('Firefox')) {\n fix = true;\n\n // versionNumber of implementation unknown\n }\n if (fix) {\n while (svg.includes('#')) {\n svg = svg.replace('#', '%23');\n }\n }\n return svg;\n }\n\n findMostOuterElements(svg: HTMLElement): Box {\n let xLeft = 0;\n let xRight = 0;\n let yUp = 0;\n let yDown = 0;\n\n const elements = svg.getElementsByClassName('djs-group');\n\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n const sub = element.children;\n\n let elXLeft: number;\n let elXRight: number;\n let elYUp: number;\n let elYDown: number;\n\n const transform = sub[0].getAttribute('transform');\n if (transform) {\n let nums;\n\n if (transform.includes('matrix')) {\n transform.replace('matrix(', '');\n transform.replace(')', '');\n nums = transform.split(' ');\n elXLeft = parseInt(nums[4]);\n elYUp = parseInt(nums[5]);\n } else {\n transform.replace('translate(', '');\n transform.replace(')', '');\n nums = transform.split(' ');\n elXLeft = parseInt(nums[0]);\n elYUp = parseInt(nums[1]);\n }\n\n const rects = sub[0].getElementsByTagName('rect');\n const outerRect = rects[rects.length - 1];\n\n const width = outerRect.getAttribute('width');\n\n elXRight = elXLeft + parseInt(width != null ? width : '0');\n elYDown = elYUp + sub[0].getBoundingClientRect().height;\n } else {\n const rects = element.getElementsByTagName('rect');\n const outerRect = rects[rects.length - 1];\n\n const x = outerRect.getAttribute('x');\n const y = outerRect.getAttribute('y');\n\n elXLeft = parseInt(x != null ? x : '0');\n elYUp = parseInt(y != null ? y : '0');\n\n const width = outerRect.getAttribute('width');\n const height = outerRect.getAttribute('height');\n\n elXRight = elXLeft + parseInt(width != null ? width : '0');\n elYDown = elYUp + parseInt(height != null ? height : '0') + 20; // Add 20 px as Padding for text at the bottom\n }\n if (elXLeft < xLeft) {\n xLeft = elXLeft;\n }\n if (elXRight > xRight) {\n xRight = elXRight;\n }\n if (elYUp < yUp) {\n yUp = elYUp;\n }\n if (elYDown > yDown) {\n yDown = elYDown;\n }\n }\n\n yUp -= 75; // we need to adjust yUp to have space for the title and description\n\n return {\n xLeft,\n xRight,\n yUp,\n yDown,\n };\n }\n\n prepareSVG(\n svg: string,\n layerBase: any,\n description: string,\n title: string,\n withTitle: boolean,\n ): string {\n const box = this.findMostOuterElements(layerBase);\n let viewBoxIndex = svg.indexOf('width=\"');\n\n this.calculateWidthAndHeight(box);\n\n const { insertText, dynamicHeightOffset } =\n createTitleAndDescriptionSVGElement(\n 0,\n title,\n description,\n box.xLeft + 10,\n box.yUp + 20,\n this.width,\n );\n if (withTitle) {\n this.height += dynamicHeightOffset;\n }\n\n const bounds = this.createBounds(box, dynamicHeightOffset);\n\n const dataStart = svg.substring(0, viewBoxIndex);\n viewBoxIndex = svg.indexOf('style=\"');\n\n const dataEnd = svg.substring(viewBoxIndex);\n dataEnd.substring(viewBoxIndex);\n\n svg = dataStart + bounds + dataEnd;\n\n const insertIndex = svg.indexOf('') + 20;\n\n if (withTitle) {\n svg = [\n svg.slice(0, insertIndex),\n insertText,\n svg.slice(insertIndex),\n ].join('');\n }\n svg = this.URIHashtagFix(svg);\n\n return svg;\n }\n\n private createBounds(box: Box, extraHeight: number) {\n return (\n 'width=\"' +\n this.width +\n '\" height=\"' +\n this.height +\n '\" viewBox=\" ' +\n box.xLeft +\n ' ' +\n (box.yUp - extraHeight) +\n ' ' +\n this.width +\n ' ' +\n this.height +\n '\" '\n );\n }\n\n /**\n * Calculate the Width and Height of the Bounding Box for the PNG so no Parts are cut off\n */\n private calculateWidthAndHeight(box: Box): [number, number] {\n if (box.xLeft < 0) {\n if (box.xRight < 0) {\n this.width = Math.abs(box.xLeft - box.xRight);\n } else {\n this.width = Math.abs(box.xLeft) + box.xRight;\n }\n } else {\n this.width = box.xRight - box.xLeft;\n }\n\n if (box.yUp < 0) {\n if (box.yDown < 0) {\n this.height = Math.abs(box.yUp - box.yDown);\n } else {\n this.height = Math.abs(box.yUp) + box.yDown;\n }\n } else {\n this.height = box.yDown - box.yUp;\n }\n\n // if the domain-Story is smaller than 300px in width or height, increase its dimensions\n if (this.height < 300) {\n this.height += 300;\n box.yUp -= 150;\n box.yDown += 150;\n }\n if (this.width < 300) {\n this.width += 300;\n box.xLeft -= 150;\n box.xRight += 150;\n }\n return [this.height, this.width];\n }\n\n extractSVG(viewport: any, outerSVGElement: any): string {\n const layerResizers = viewport.getElementsByClassName('layer-resizers');\n const layerOverlays = viewport.getElementsByClassName('layer-overlays');\n const transform = viewport.getAttribute('transform');\n const translate = viewport.getAttribute('translate');\n\n if (layerResizers[0]) {\n layerResizers[0].parentNode.removeChild(layerResizers[0]);\n }\n if (layerOverlays[0]) {\n layerOverlays[0].parentNode.removeChild(layerOverlays[0]);\n }\n\n // remove canvas scrolling and scaling before serializeToString of SVG\n if (transform) {\n viewport.removeAttribute('transform');\n }\n if (translate) {\n viewport.removeAttribute('translate');\n }\n\n const svg = new XMLSerializer().serializeToString(outerSVGElement);\n\n // re-add canvas scrolling and scaling\n if (transform) {\n viewport.setAttribute('transform', transform);\n }\n if (translate) {\n viewport.setAttribute('translate', translate);\n }\n return svg;\n }\n\n getWidth(): number {\n return this.width;\n }\n\n getHeight(): number {\n return this.height;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ConfigAndDST } from 'src/app/tools/export/domain/export/configAndDst';\nimport { createTitleAndDescriptionSVGElement } from 'src/app/tools/export/services/exportUtil';\nimport { ModelerService } from '../../modeler/services/modeler.service';\nimport {\n DEFAULT_PADDING,\n TEXTSPAN_TITLE_HEIGHT,\n} from '../domain/export/exportConstants';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SvgService {\n private cacheData = '';\n\n constructor(private modelerService: ModelerService) {}\n\n createSVGData(\n title: string,\n description: string,\n dst: ConfigAndDST,\n withTitle: boolean,\n useWhiteBackground: boolean,\n ): string {\n this.cacheData = this.modelerService.getEncoded();\n\n let domainStorySvg = structuredClone(this.cacheData);\n\n let viewBoxIndex = domainStorySvg.indexOf('width=\"');\n\n let { width, height, viewBox } = this.viewBoxCoordinates(domainStorySvg);\n\n // The value of the viewBox attribute is a list of four numbers separated by whitespace\n // and/or a comma: min-x, min-y, width, and height. min-x and min-y represent the smallest\n // X and Y coordinates that the viewBox may have (the origin coordinates of the viewBox)\n // and the width and height specify the viewBox size. The resulting viewBox is a\n // rectangle in user space mapped to the bounds of the viewport of an SVG element.\n // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox\n\n let min_x: number;\n let viewBoxWidth: number;\n let min_y: number;\n let viewBoxHeight: number;\n const splitViewBox = viewBox.split(/\\s/);\n\n min_x = +splitViewBox[0];\n min_y = +splitViewBox[1];\n viewBoxWidth = +splitViewBox[2];\n viewBoxHeight = +splitViewBox[3];\n\n // Set minimum width to ensure title and description are displayed reasonably\n if (viewBoxWidth < 300) {\n viewBoxWidth += 300;\n width += 300;\n }\n\n const { insertText, dynamicHeightOffset } =\n createTitleAndDescriptionSVGElement(\n 0,\n title,\n description,\n min_x,\n min_y,\n width,\n );\n\n const bounds = this.createBounds(\n width,\n height,\n min_x,\n min_y,\n viewBoxWidth,\n viewBoxHeight,\n withTitle,\n dynamicHeightOffset,\n );\n\n const dataStart = domainStorySvg.substring(0, viewBoxIndex);\n viewBoxIndex = domainStorySvg.indexOf('\" version');\n\n const dataEnd = domainStorySvg.substring(viewBoxIndex);\n dataEnd.substring(viewBoxIndex);\n\n domainStorySvg = dataStart + bounds + dataEnd;\n\n const insertIndex = this.findIndexToInsertData(domainStorySvg);\n\n if (withTitle) {\n domainStorySvg =\n domainStorySvg.slice(0, insertIndex) +\n insertText +\n domainStorySvg.slice(insertIndex);\n }\n\n if (useWhiteBackground) {\n const svgIndex = domainStorySvg.indexOf('width=\"');\n const backgroundColorWhite = 'style=\"background-color:white\" ';\n domainStorySvg =\n domainStorySvg.slice(0, svgIndex) +\n backgroundColorWhite +\n domainStorySvg.slice(svgIndex);\n }\n\n return this.appendDST(domainStorySvg, dst);\n }\n\n private findIndexToInsertData(data: string) {\n let insertIndex = data.indexOf('');\n if (insertIndex < 0) {\n insertIndex = data.indexOf('version=\"1.2\">') + 14;\n } else {\n insertIndex += 7;\n }\n return insertIndex;\n }\n\n private createBounds(\n width: number,\n height: number,\n min_x: number,\n min_y: number,\n viewBoxWidth: number,\n viewBoxHeight: number,\n withTitle: boolean,\n dynamicHeightOffset: number,\n ): string {\n height = withTitle\n ? height + dynamicHeightOffset + TEXTSPAN_TITLE_HEIGHT\n : height;\n min_x = min_x - DEFAULT_PADDING;\n min_y = withTitle\n ? min_y - dynamicHeightOffset - TEXTSPAN_TITLE_HEIGHT\n : min_y;\n viewBoxHeight = withTitle\n ? viewBoxHeight +\n dynamicHeightOffset +\n TEXTSPAN_TITLE_HEIGHT +\n DEFAULT_PADDING\n : viewBoxHeight;\n viewBoxWidth = viewBoxWidth + DEFAULT_PADDING;\n\n return `width=\"${width}\" height=\"${height}\" viewBox=\"${min_x} ${min_y} ${viewBoxWidth} ${viewBoxHeight}`;\n }\n\n private viewBoxCoordinates(svg: string): {\n width: number;\n height: number;\n viewBox: string;\n } {\n const ViewBoxCoordinate =\n /width=\"([^\"]+)\"\\s+height=\"([^\"]+)\"\\s+viewBox=\"([^\"]+)\"/;\n const match = svg.match(ViewBoxCoordinate);\n if (match) {\n return { width: +match[1], height: +match[2], viewBox: match[3] };\n }\n return { width: 0, height: 0, viewBox: '' };\n }\n\n private appendDST(data: string, dst: ConfigAndDST): string {\n data += '\\n';\n return data;\n }\n}\n","import { Dictionary } from 'src/app/domain/entities/dictionary';\n\nexport let appendedIcons = new Dictionary();\n\n// These SVGs are used to render the actors/work objects on the canvas and in the iconset configuration. For palette and context pad, icons.css is used.\nexport const allIcons = {\n Person:\n '',\n Group:\n '',\n Pet: '',\n Conversation:\n '',\n World:\n '',\n Store:\n '',\n Theater:\n '',\n Business:\n '',\n Water:\n '',\n Hotel:\n '',\n Dining:\n '',\n 'Gas-station':\n '',\n 'Meeting-room':\n '',\n Courthouse:\n '',\n Flag: '',\n Place:\n '',\n Car: '',\n Bus: '',\n Train:\n '',\n Truck:\n '',\n Taxi: '',\n Bike: '',\n Boat: '',\n Motorcycle:\n '',\n Plane:\n '',\n 'Flight-takeoff':\n '',\n 'Flight-landing':\n '',\n Shuttle:\n '',\n Walking:\n '',\n Traffic:\n '',\n Commute:\n '',\n System:\n '',\n Printer:\n '',\n Document:\n '',\n Folder:\n '',\n Call: '',\n Email:\n '',\n Copyright:\n '',\n DNS: '',\n Settings:\n '',\n Cellphone:\n '',\n Update:\n '',\n Briefcase:\n '',\n Microphone:\n '',\n Signal:\n '',\n Key: '',\n Pencil:\n '',\n Sum: '',\n Headset:\n '',\n Keyboard:\n '',\n Mouse:\n '',\n Router:\n '',\n Scanner:\n '',\n Security:\n '',\n Desktop:\n '',\n 'Speaker-phone':\n '',\n Tablet:\n '',\n Label:\n '',\n Receipt:\n '',\n Calendar:\n '',\n Cloud:\n '',\n Assessment:\n '',\n Dashboard:\n '',\n 'Pie-chart':\n '',\n Problem:\n '',\n 'Picture-as-PDF':\n '',\n Grid: '',\n Watch:\n '',\n Euro: '',\n Dollar:\n '',\n Info: '',\n Alarm:\n '',\n Wrench:\n '',\n 'Circle-Arrows':\n '',\n 'Credit-Card':\n '',\n Favorite:\n '',\n Gavel:\n '',\n Blind:\n '',\n Hourglass:\n '',\n Time: '',\n Search:\n '',\n Shopping:\n '',\n 'Thumb-up':\n '',\n 'Thumb-down':\n '',\n 'Thumb-up-down':\n '',\n Couch:\n '',\n Attach:\n '',\n Ruler:\n '',\n Education:\n '',\n 'How-To-Reg':\n '',\n 'View-List':\n '',\n Accessible:\n '',\n 'Account-Circle':\n '',\n Assignment:\n '',\n Battery:\n '',\n Book: '',\n Bug: '',\n 'Change-History':\n '',\n 'Check-Circle':\n '',\n Code: '',\n 'Contact-Mail':\n '',\n Crop: '',\n DVR: '',\n Error:\n '',\n Extension:\n '',\n Face: '',\n Fastfood:\n '',\n Fingerprint:\n '',\n Hand: '',\n Help: '',\n Image:\n '',\n Lightbulb:\n '',\n Lock: '',\n Loyalty:\n '',\n 'Picture-in-Picture':\n '',\n Portrait:\n '',\n Rocket:\n '',\n Satellite:\n '',\n Share:\n '',\n Slideshow:\n '',\n Star: '',\n Sun: '',\n Table:\n '',\n Videocam:\n '',\n Wysiwyg:\n '',\n};\n\nexport function getAllStandardIconKeys(): string[] {\n const allIconsDict = new Dictionary();\n\n allIconsDict.addEach(allIcons);\n\n return allIconsDict.keysArray();\n}\n\nexport function overrideAppendedIcons(newIcons: Dictionary): void {\n appendedIcons = newIcons;\n}\n\nexport function updateAppendedIcons(newIcons: Dictionary): void {\n for (const key in newIcons.keysArray().entries()) {\n appendedIcons.add(newIcons.get(key), key);\n }\n}\n","import { Dictionary } from 'src/app/domain/entities/dictionary';\nimport {\n overrideAppendedIcons,\n updateAppendedIcons,\n} from 'src/app/tools/icon-set-config/domain/allIcons';\nimport { Configuration } from 'src/app/domain/entities/configuration';\nimport { INITIAL_ICON_SET_NAME } from '../../../domain/entities/constants';\nimport { IconSetConfiguration } from '../../../domain/entities/icon-set-configuration';\n\nexport class IconConfiguration {\n domainName = INITIAL_ICON_SET_NAME;\n\n private allIconDictionary: Dictionary;\n\n constructor(allIconDictionary: Dictionary) {\n this.allIconDictionary = allIconDictionary;\n }\n\n /**\n * Select the Iconset which you want to use\n */\n getDefaultConf(): Configuration {\n return defaultConf;\n }\n\n updateAllIconRegistry(allIconDictionary: Dictionary): void {\n this.allIconDictionary = allIconDictionary;\n }\n\n appendSRCFile(\n actors: string[],\n actorsDict: Dictionary,\n workObjects: string[],\n workObjectsDict: Dictionary,\n ): void {\n const newAppendedIcons: { [key: string]: any } = {};\n\n actors.forEach((name: string) => {\n if (!this.allIconDictionary.has(name)) {\n newAppendedIcons[name] = actorsDict.get(name);\n }\n });\n\n workObjects.forEach((name: string) => {\n if (!this.allIconDictionary.has(name)) {\n newAppendedIcons[name] = workObjectsDict.get(name);\n }\n });\n const appen = new Dictionary();\n Object.keys(newAppendedIcons).forEach((key) => {\n appen.set(key, newAppendedIcons[key]);\n });\n\n updateAppendedIcons(appen);\n }\n\n createCustomConf(iconSetConfiguration: IconSetConfiguration): Configuration {\n this.domainName = iconSetConfiguration.name;\n\n let actors = iconSetConfiguration.actors;\n let workObjects = iconSetConfiguration.workObjects;\n\n this.appendSRCFile(\n actors.keysArray(),\n actors,\n workObjects.keysArray(),\n workObjects,\n );\n\n return new Configuration(actors.keysArray(), workObjects.keysArray());\n }\n}\n\n/**\n * Default Iconset\n */\nexport const defaultConf = {\n actors: ['Person', 'Group', 'System'],\n workObjects: ['Document', 'Folder', 'Call', 'Email', 'Conversation', 'Info'],\n};\n","export enum IconFilterEnum {\n ICON_FILTER_ACTOR = 'ICON_FILTER_ACTOR',\n ICON_FILTER_WORKOBJECT = 'ICON_FILTER_WORKOBJECT',\n ICON_FILTER_UNASSIGNED = 'ICON_FILTER_UNASSIGNED',\n ICON_FILTER_NONE = 'ICON_FILTER_NONE',\n}\n","import { AfterViewChecked, Component, Input } from '@angular/core';\nimport { IconListItem } from '../../domain/iconListItem';\n\n@Component({\n selector: 'app-details-list-item',\n templateUrl: './details-list-item.component.html',\n styleUrls: ['./details-list-item.component.scss'],\n})\nexport class DetailsListItemComponent implements AfterViewChecked {\n @Input()\n icon!: IconListItem;\n\n private iconInitiated = false;\n\n get id(): string {\n return (\n 'domain-configuration-details-icon-' +\n this.icon.name.toLowerCase() +\n '-' +\n (this.icon.isWorkObject ? 'workobject' : 'actor')\n );\n }\n\n get name(): string {\n return this.icon.name;\n }\n\n ngAfterViewChecked(): void {\n this.createIcon();\n }\n\n private createIcon(): void {\n const img = document.getElementById(this.id) as HTMLImageElement;\n if (img && !this.iconInitiated) {\n img.src = '' + this.icon.svg;\n this.iconInitiated = true;\n }\n }\n}\n","
\n \"{{\n {{ icon.name }}\n
\n","import { AfterViewChecked, Component, Input, OnInit } from '@angular/core';\nimport { IconListItem } from '../../domain/iconListItem';\nimport { BehaviorSubject } from 'rxjs';\nimport { IconSetCustomizationService } from '../../services/icon-set-customization.service';\n\n@Component({\n selector: 'app-icon-list-item',\n templateUrl: './icon-list-item.component.html',\n styleUrls: ['./icon-list-item.component.scss'],\n})\nexport class IconListItemComponent implements OnInit, AfterViewChecked {\n @Input()\n iconName: string = '';\n\n private iconInitiated = false;\n\n // @ts-ignore\n icon = new BehaviorSubject({});\n\n isActor: boolean = false;\n isWorkobject: boolean = false;\n isNone: boolean = true;\n\n get name(): string {\n return this.iconName;\n }\n\n get id() {\n return 'domain-configuration-icon-' + this.iconName;\n }\n\n constructor(\n private iconSetCustomizationService: IconSetCustomizationService,\n ) {}\n\n ngOnInit(): void {\n this.icon = this.iconSetCustomizationService.getIconForName(this.iconName);\n if (!this.icon) {\n return;\n }\n\n this.icon.subscribe((value) => {\n this.isActor = value.isActor;\n this.isWorkobject = value.isWorkObject;\n this.isNone = !(value.isActor || value.isWorkObject);\n });\n this.isActor = this.icon.value.isActor;\n this.isWorkobject = this.icon.value.isWorkObject;\n this.isNone = !(this.icon.value.isActor || this.icon.value.isWorkObject);\n }\n\n ngAfterViewChecked(): void {\n this.createIcon();\n }\n\n private createIcon(): void {\n const img = document.getElementById(this.id) as HTMLImageElement;\n if (img && !this.iconInitiated) {\n img.src = '' + this.icon?.value?.svg;\n this.iconInitiated = true;\n }\n }\n\n toggleNone() {\n this.iconSetCustomizationService.setAsUnassigned(\n this.iconName,\n this.icon.value.isActor,\n );\n }\n\n toggleActor(): void {\n this.iconSetCustomizationService.setAsActor(true, this.iconName);\n }\n\n toggleWorkobject(): void {\n this.iconSetCustomizationService.setAsWorkobject(true, this.iconName);\n }\n}\n","
\n
\n \"{{\n
{{ name }}
\n
\n
\n \n \n None\n \n \n Actor\n \n \n Workobject\n \n \n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MaterialModule } from '../../../material.module';\nimport { DetailsListItemComponent } from './details-list-item/details-list-item.component';\nimport { IconListItemComponent } from './icon-list-item/icon-list-item.component';\nimport { IconSetConfigurationComponent } from './icon-set-configuration/icon-set-configuration.component';\nimport { IconSetDetailsComponent } from './icon-set-details/icon-set-details.component';\n\n@NgModule({\n declarations: [\n DetailsListItemComponent,\n IconListItemComponent,\n IconSetConfigurationComponent,\n IconSetDetailsComponent,\n ],\n exports: [\n DetailsListItemComponent,\n IconListItemComponent,\n IconSetConfigurationComponent,\n IconSetDetailsComponent,\n ],\n imports: [CommonModule, MaterialModule],\n})\nexport class IconSetConfigModule {}\n","import { Component, OnInit } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { Dictionary } from 'src/app/domain/entities/dictionary';\nimport { IconSetConfigurationService } from 'src/app/tools/icon-set-config/services/icon-set-configuration.service';\nimport {\n ICON_PREFIX,\n IconDictionaryService,\n} from 'src/app/tools/icon-set-config/services/icon-dictionary.service';\nimport { ElementRegistryService } from 'src/app/domain/services/element-registry.service';\nimport { sanitizeIconName } from 'src/app/utils/sanitizer';\nimport { ElementTypes } from '../../../../domain/entities/elementTypes';\nimport { IconFilterEnum } from '../../domain/iconFilterEnum';\nimport { IconSetCustomizationService } from '../../services/icon-set-customization.service';\nimport { CustomIconSetConfiguration } from '../../../../domain/entities/custom-icon-set-configuration';\n\n@Component({\n selector: 'app-icon-set-configuration',\n templateUrl: './icon-set-configuration.component.html',\n styleUrls: ['./icon-set-configuration.component.scss'],\n})\nexport class IconSetConfigurationComponent implements OnInit {\n private iconSetConfigurationTypes: CustomIconSetConfiguration;\n\n filter = new BehaviorSubject(IconFilterEnum.ICON_FILTER_NONE);\n\n selectedActors = new BehaviorSubject([]);\n selectedWorkobjects = new BehaviorSubject([]);\n\n allIcons: BehaviorSubject;\n allIconNames = new BehaviorSubject([]);\n allFilteredIconNames = new BehaviorSubject([]);\n\n constructor(\n private iconSetConfigurationService: IconSetConfigurationService,\n private iconDictionaryService: IconDictionaryService,\n private iconSetCustomizationService: IconSetCustomizationService,\n private elementRegistryService: ElementRegistryService,\n ) {\n this.iconSetConfigurationTypes =\n this.iconSetCustomizationService.getIconSetConfiguration().value;\n\n this.allIcons = new BehaviorSubject(\n this.iconDictionaryService.getFullDictionary(),\n );\n this.allIcons.subscribe((allIcons) => {\n this.allIconNames.next(allIcons.keysArray().sort(this.sortByName));\n });\n\n this.selectedActors = this.iconSetCustomizationService.selectedActors$;\n this.selectedWorkobjects =\n this.iconSetCustomizationService.selectedWorkobjects$;\n }\n\n ngOnInit(): void {\n this.filter.subscribe((type) => {\n let allFiltered = this.getFilteredNamesForType(type);\n this.allFilteredIconNames.next(allFiltered.sort(this.sortByName));\n });\n }\n\n private sortByName(a: string, b: string): number {\n return a.toLowerCase().localeCompare(b.toLowerCase());\n }\n\n /** Default Icon Set **/\n loadMinimalIconConfigurationWithDefaultIcons(): void {\n this.iconSetCustomizationService.resetIconSet();\n }\n\n loadInitialConfiguration(): void {\n this.iconSetCustomizationService.cancel();\n }\n\n /** Persist Icon Set **/\n saveIconSet(): void {\n this.iconSetCustomizationService.saveIconSet(\n this.elementRegistryService.getUsedIcons(),\n );\n }\n\n exportIconSet(): void {\n this.iconSetCustomizationService.exportIconSet();\n }\n\n /** Add Custom Icon **/\n startIconUpload(): void {\n document.getElementById('importIcon')?.click();\n }\n\n importIcon(): void {\n // @ts-ignore\n const files = document.getElementById('importIcon').files;\n for (let iconInputFile of files) {\n const reader = new FileReader();\n const name = sanitizeIconName(iconInputFile.name);\n const iconName = name + '-custom'; // this suffix helps users to see which icons they uploaded; it should not be used to check if an icon is actually custom or not since this convention was introduce after v1.3.0 and is therefore not reliable information\n\n reader.onloadend = (e: ProgressEvent) => {\n if (e.target) {\n const src: string = e.target.result as unknown as string;\n this.iconDictionaryService.addIMGToIconDictionary(src, iconName);\n // TODO: td: What kind of type is it here?\n this.iconDictionaryService.registerIconForBPMN(\n iconName,\n ICON_PREFIX + iconName.toLowerCase(),\n ElementTypes.ACTOR,\n );\n\n this.allIcons.next(this.iconDictionaryService.getFullDictionary());\n this.filter.next(this.filter.value);\n\n this.iconSetCustomizationService.addNewIcon(iconName);\n }\n };\n reader.readAsDataURL(iconInputFile);\n }\n }\n\n /** Import Icon Set **/\n startIconSetImport(): void {\n document.getElementById('importDomain')?.click();\n }\n\n importIconSet(): void {\n // @ts-ignore\n const iconSetInputFile = document.getElementById('importDomain').files[0];\n const reader = new FileReader();\n\n reader.onloadend = (e: ProgressEvent) => {\n const configFromFile = JSON.parse(\n e.target?.result as unknown as string,\n ) as {\n name: string;\n actors: { [key: string]: any };\n workObjects: { [key: string]: any };\n };\n const config =\n this.iconSetConfigurationService.createIconSetConfiguration(\n configFromFile,\n );\n this.iconSetConfigurationService.loadConfiguration(config, false);\n\n this.iconSetCustomizationService.importConfiguration(config);\n\n this.allIcons.next(this.iconDictionaryService.getFullDictionary());\n this.filter.next(this.filter.value);\n };\n\n reader.readAsText(iconSetInputFile);\n }\n\n /** Filter **/\n filterForActors(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_ACTOR) {\n this.filter.next(IconFilterEnum.ICON_FILTER_ACTOR);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterForWorkobjects(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_WORKOBJECT) {\n this.filter.next(IconFilterEnum.ICON_FILTER_WORKOBJECT);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterForUnassigned(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_UNASSIGNED) {\n this.filter.next(IconFilterEnum.ICON_FILTER_UNASSIGNED);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterByNameAndType($event: any) {\n const filteredByNameAndType = this.getFilteredNamesForType(\n this.filter.value,\n ).filter((name) =>\n name.toLowerCase().includes($event.target.value.toLowerCase()),\n );\n this.allFilteredIconNames.next(filteredByNameAndType.sort(this.sortByName));\n }\n\n private getFilteredNamesForType(type: IconFilterEnum): string[] {\n let allFiltered: string[] = [];\n switch (type) {\n case IconFilterEnum.ICON_FILTER_NONE:\n allFiltered = this.allIconNames.value;\n break;\n case IconFilterEnum.ICON_FILTER_ACTOR:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.iconSetCustomizationService.isIconActor(name),\n );\n break;\n case IconFilterEnum.ICON_FILTER_WORKOBJECT:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.iconSetCustomizationService.isIconWorkObject(name),\n );\n break;\n case IconFilterEnum.ICON_FILTER_UNASSIGNED:\n allFiltered = this.allIconNames.value.filter(\n (name) =>\n !this.iconSetCustomizationService.isIconActor(name) &&\n !this.iconSetCustomizationService.isIconWorkObject(name),\n );\n break;\n }\n return allFiltered;\n }\n}\n","
\n
\n
\n
\n
Filter by assignment:
\n \n None\n \n \n Actors\n \n \n Workobjects\n \n \n
\n
\n \n \n home \n \n \n close\n \n
\n \n
\n \n unarchive\n \n \n \n
\n
\n
\n @for (iconName of allFilteredIconNames | async; track iconName) {\n \n }\n
\n
\n \n
\n","import { Component, OnInit } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { IconSetCustomizationService } from 'src/app/tools/icon-set-config/services/icon-set-customization.service';\nimport { IconListItem } from 'src/app/tools/icon-set-config/domain/iconListItem';\nimport { TitleService } from 'src/app/tools/title/services/title.service';\n\n@Component({\n selector: 'app-icon-set-details',\n templateUrl: './icon-set-details.component.html',\n styleUrls: ['./icon-set-details.component.scss'],\n})\nexport class IconSetDetailsComponent implements OnInit {\n iconSetName: Observable;\n\n private draggedList: string = '';\n private draggedIndex = 0;\n\n selectedActors$ = this.customizationService.selectedActors$;\n selectedWorkobjects$ = this.customizationService.selectedWorkobjects$;\n\n constructor(\n private customizationService: IconSetCustomizationService,\n titleService: TitleService,\n ) {\n this.iconSetName = titleService.iconSetName$;\n }\n\n ngOnInit(): void {}\n\n changeName(event: Event): void {\n // @ts-ignore\n this.customizationService.changeName(event.target.value);\n }\n\n getIconForName(iconName: string): IconListItem {\n return this.customizationService.getIconForName(iconName).value;\n }\n\n allowDrop($event: DragEvent, listName: string) {\n if (this.draggedList === listName) {\n $event.preventDefault();\n }\n }\n\n onDrop($event: DragEvent, iconName: string, actors: boolean, index: number) {\n let list;\n if (actors) {\n list = this.selectedActors$;\n } else {\n list = this.selectedWorkobjects$;\n }\n const sortedList = list.value;\n const item = sortedList[this.draggedIndex];\n sortedList.splice(this.draggedIndex, 1);\n sortedList.splice(index, 0, item);\n list.next(sortedList);\n\n if (actors) {\n this.customizationService.setSelectedActors(sortedList);\n } else {\n this.customizationService.setSelectedWorkObject(sortedList);\n }\n }\n\n onDragStart(index: number, draggedList: string) {\n this.draggedList = draggedList;\n this.draggedIndex = index;\n }\n}\n","
\n
\n
\n
\n \n \n \n
\n
\n
\n

Order of Actors

\n \n @for (\n iconName of selectedActors$ | async;\n track iconName;\n let i = $index\n ) {\n \n \n \n }\n \n
\n
\n

Order of Work Objects

\n \n @for (\n iconName of selectedWorkobjects$ | async;\n track iconName;\n let i = $index\n ) {\n \n \n \n }\n \n
\n
\n","import { Injectable } from '@angular/core';\nimport { BusinessObject } from 'src/app/domain/entities/businessObject';\nimport { Configuration } from 'src/app/domain/entities/configuration';\nimport { Dictionary } from 'src/app/domain/entities/dictionary';\nimport { ElementTypes } from 'src/app/domain/entities/elementTypes';\nimport {\n defaultConf,\n IconConfiguration,\n} from 'src/app/tools/icon-set-config/domain/iconConfiguration';\nimport {\n allIcons,\n appendedIcons,\n} from 'src/app/tools/icon-set-config/domain/allIcons';\nimport { sanitizeIconName } from '../../../utils/sanitizer';\nimport getIconId = ElementTypes.getIconId;\nimport { IconSetConfiguration } from '../../../domain/entities/icon-set-configuration';\n\nexport const ICON_PREFIX = 'icon-domain-story-';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconDictionaryService {\n private actorIconDictionary = new Dictionary();\n private workObjectDictionary = new Dictionary();\n\n private allIconDictionary = new Dictionary();\n private iconDictionaryForBPMN = new Dictionary();\n\n private customConfiguration?: IconSetConfiguration;\n\n private readonly iconConfig: IconConfiguration;\n\n constructor() {\n this.allIconDictionary.addEach(allIcons);\n this.iconConfig = new IconConfiguration(this.allIconDictionary);\n }\n\n initTypeDictionaries(actors: string[], workObjects: string[]): void {\n if (!actors || actors.length == 0) {\n actors = defaultConf.actors;\n }\n if (!workObjects || workObjects.length == 0) {\n workObjects = defaultConf.workObjects;\n }\n\n const allTypes = new Dictionary();\n allTypes.addEach(allIcons);\n allTypes.appendDict(this.getAppendedIconDictionary());\n\n this.initDictionary(\n actors,\n allTypes,\n this.actorIconDictionary,\n ElementTypes.ACTOR,\n );\n this.initDictionary(\n workObjects,\n allTypes,\n this.workObjectDictionary,\n ElementTypes.WORKOBJECT,\n );\n }\n\n private initDictionary(\n keys: string[],\n allTypes: Dictionary,\n dictionary: Dictionary,\n elementType: ElementTypes,\n ) {\n dictionary.clear();\n for (const key of keys) {\n dictionary.add(allTypes.get(key), key);\n }\n\n dictionary.keysArray().forEach((name) => {\n this.registerIconForBPMN(\n name,\n ICON_PREFIX + sanitizeIconName(name.toLowerCase()),\n elementType,\n );\n });\n }\n\n getCurrentIconConfigurationForBPMN(): Configuration {\n if (this.customConfiguration) {\n return this.iconConfig.createCustomConf(this.customConfiguration);\n }\n return this.iconConfig.getDefaultConf();\n }\n\n allInTypeDictionary(type: ElementTypes, elements: BusinessObject[]): boolean {\n let collection: Dictionary;\n if (type === ElementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (type === ElementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n\n let allIn = true;\n if (elements) {\n elements.forEach((element) => {\n if (!collection.has(getIconId(element.type))) {\n allIn = false;\n }\n });\n } else {\n return false;\n }\n return allIn;\n }\n\n /** Load Icons from Configuration **/\n addIconsFromIconSetConfiguration(\n dictionaryType: ElementTypes,\n iconTypes: string[],\n ): void {\n let collection: Dictionary;\n if (dictionaryType === ElementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (dictionaryType === ElementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n\n const allTypes = new Dictionary();\n allTypes.addEach(allIcons);\n allTypes.appendDict(appendedIcons);\n\n iconTypes.forEach((name) => {\n if (!collection.has(name)) {\n const src = allTypes.get(name);\n if (src) {\n this.registerIconForType(dictionaryType, name, src);\n this.registerIconForBPMN(\n name,\n sanitizeIconName(ICON_PREFIX + name.toLowerCase()),\n dictionaryType,\n );\n }\n }\n });\n }\n\n /** Add Icon(s) to Dictionary **/\n registerIconForBPMN(\n name: string,\n src: string,\n elementType: ElementTypes,\n ): void {\n if (name.includes(elementType)) {\n throw new Error('Should not include elementType');\n }\n\n this.iconDictionaryForBPMN.set(`${elementType}${name}`, src);\n }\n\n addIconsToTypeDictionary(\n actorIcons: BusinessObject[],\n workObjectIcons: BusinessObject[],\n ) {\n if (!this.allInTypeDictionary(ElementTypes.ACTOR, actorIcons)) {\n this.addIconsFromIconSetConfiguration(\n ElementTypes.ACTOR,\n actorIcons.map((element) => getIconId(element.type)),\n );\n }\n if (!this.allInTypeDictionary(ElementTypes.WORKOBJECT, workObjectIcons)) {\n this.addIconsFromIconSetConfiguration(\n ElementTypes.WORKOBJECT,\n workObjectIcons.map((element) => getIconId(element.type)),\n );\n }\n }\n\n registerIconForType(type: ElementTypes, name: string, src: string): void {\n if (name.includes(type)) {\n throw new Error('Name should not include type!');\n }\n\n let collection = new Dictionary();\n if (type === ElementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (type === ElementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n collection.add(src, name);\n }\n\n unregisterIconForType(type: ElementTypes, name: string): void {\n if (name.includes(type)) {\n throw new Error('Name should not include type!');\n }\n\n let collection = new Dictionary();\n if (type === ElementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (type === ElementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n collection.delete(name);\n }\n\n updateIconRegistries(\n actors: BusinessObject[],\n workObjects: BusinessObject[],\n config: IconSetConfiguration,\n ): void {\n const elements: BusinessObject[] = [];\n\n actors.forEach((a) => elements.push(a));\n workObjects.forEach((w) => elements.push(w));\n\n const customIcons = new Dictionary();\n\n const actorsDict = new Dictionary();\n const workObjectsDict = new Dictionary();\n config.actors.keysArray().forEach((key) => {\n actorsDict.set(key, config.actors.get(key));\n });\n config.workObjects.keysArray().forEach((key) => {\n workObjectsDict.set(key, config.workObjects.get(key));\n });\n\n this.extractCustomIconsFromDictionary(actorsDict, customIcons);\n this.extractCustomIconsFromDictionary(workObjectsDict, customIcons);\n\n elements.forEach((element) => {\n const name = sanitizeIconName(\n element.type\n .replace(ElementTypes.ACTOR, '')\n .replace(ElementTypes.WORKOBJECT, ''),\n );\n if (\n (element.type.includes(ElementTypes.ACTOR) ||\n element.type.includes(ElementTypes.WORKOBJECT)) &&\n !this.getFullDictionary().has(name)\n ) {\n let elementType;\n if (element.type.includes(ElementTypes.ACTOR)) {\n elementType = ElementTypes.ACTOR;\n } else {\n elementType = ElementTypes.WORKOBJECT;\n }\n this.registerIconForBPMN(\n ICON_PREFIX + name.toLowerCase(),\n getIconId(element.type),\n elementType,\n );\n }\n });\n\n this.addNewIconsToDictionary(customIcons);\n this.addIconsToTypeDictionary(actors, workObjects);\n }\n\n private extractCustomIconsFromDictionary(\n elementDictionary: Dictionary,\n customIcons: Dictionary,\n ) {\n elementDictionary.keysArray().forEach((name) => {\n const sanitizedName = sanitizeIconName(name);\n if (!this.getFullDictionary().has(sanitizedName)) {\n customIcons.add(elementDictionary.get(name), sanitizedName);\n }\n });\n }\n\n /** Add new Icon(s) **/\n\n private addNewIconsToDictionary(customIcons: Dictionary) {\n customIcons.keysArray().forEach((key) => {\n const custom = customIcons.get(key);\n this.addIMGToIconDictionary(custom, key);\n });\n this.addIconsToCss(customIcons);\n }\n\n addIMGToIconDictionary(input: string, name: string): void {\n appendedIcons.set(name, input);\n }\n\n addIconsToCss(customIcons: Dictionary) {\n const sheetEl = document.getElementById('iconsCss');\n customIcons.keysArray().forEach((key) => {\n const src = customIcons.get(key);\n const iconStyle =\n '.' +\n ICON_PREFIX +\n sanitizeIconName(key.toLowerCase()) +\n '::before{ content: url(\"data:image/svg+xml;utf8,' +\n this.wrapSRCInSVG(src) +\n '\"); margin: 3px;}';\n // @ts-ignore\n sheetEl?.sheet?.insertRule(iconStyle, sheetEl.sheet.cssRules.length);\n });\n }\n\n private wrapSRCInSVG(src: string): string {\n return (\n \"\"\n );\n }\n\n /** Getter & Setter **/\n\n getFullDictionary(): Dictionary {\n const fullDictionary = new Dictionary();\n fullDictionary.appendDict(this.allIconDictionary);\n fullDictionary.appendDict(this.getAppendedIconDictionary());\n return fullDictionary;\n }\n\n getAppendedIconDictionary(): Dictionary {\n const appendedDict = new Dictionary();\n appendedIcons.keysArray().forEach((key) => {\n if (!this.allIconDictionary.has(key)) {\n appendedDict.set(key, appendedIcons.get(key));\n }\n });\n return appendedDict;\n }\n\n getTypeDictionary(type: ElementTypes): Dictionary {\n if (type === ElementTypes.ACTOR) {\n return this.actorIconDictionary;\n } else if (type === ElementTypes.WORKOBJECT) {\n return this.workObjectDictionary;\n }\n return new Dictionary();\n }\n\n getTypeDictionaryKeys(type: ElementTypes): string[] {\n return this.getTypeDictionary(type).keysArray();\n }\n\n getTypeIconSRC(type: ElementTypes, name: string): string | null {\n if (type === ElementTypes.ACTOR) {\n return this.actorIconDictionary.get(name);\n } else if (type === ElementTypes.WORKOBJECT) {\n return this.workObjectDictionary.get(name);\n }\n return null;\n }\n\n getIconForBPMN(elementType: ElementTypes, name: string): string | null {\n return this.iconDictionaryForBPMN.get(`${elementType}${name}`);\n }\n\n getIconSource(name: string): string | null {\n if (this.allIconDictionary.has(name)) {\n return this.allIconDictionary.get(name);\n } else if (appendedIcons.has(name)) {\n return appendedIcons.get(name);\n }\n return null;\n }\n\n getElementsOfType(\n elements: BusinessObject[],\n type: ElementTypes,\n ): BusinessObject[] {\n const elementOfType: any = [];\n elements.forEach((element) => {\n if (element.type.includes(type)) {\n elementOfType.push(element);\n }\n });\n return elementOfType;\n }\n\n getAllIconDictionary(): Dictionary {\n return this.allIconDictionary;\n }\n\n getActorsDictionary(): Dictionary {\n return this.actorIconDictionary;\n }\n\n getWorkObjectsDictionary(): Dictionary {\n return this.workObjectDictionary;\n }\n\n getIconConfiguration(): IconConfiguration {\n return this.iconConfig;\n }\n\n setCustomConfiguration(customConfiguration: IconSetConfiguration): void {\n this.customConfiguration = customConfiguration;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/domain/services/element-registry.service';\nimport { IconDictionaryService } from 'src/app/tools/icon-set-config/services/icon-dictionary.service';\nimport { Dictionary } from 'src/app/domain/entities/dictionary';\nimport { ElementTypes } from 'src/app/domain/entities/elementTypes';\nimport { defaultConf } from '../domain/iconConfiguration';\nimport { TitleService } from '../../title/services/title.service';\nimport {\n ICON_SET_CONFIGURATION_TAG,\n INITIAL_ICON_SET_NAME,\n} from '../../../domain/entities/constants';\nimport { IconSetConfiguration } from '../../../domain/entities/icon-set-configuration';\nimport { IconSetConfigurationForExport } from '../../../domain/entities/icon-set-configuration-for-export';\nimport { CustomIconSetConfiguration } from '../../../domain/entities/custom-icon-set-configuration';\nimport { StorageService } from '../../../domain/services/storage.service';\nimport { sanitizeIconName } from '../../../utils/sanitizer';\n\nexport interface FileConfiguration {\n name: string;\n actors: { [p: string]: any };\n workObjects: { [p: string]: any };\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconSetConfigurationService {\n constructor(\n private iconDictionaryService: IconDictionaryService,\n private elementRegistryService: ElementRegistryService,\n private titleService: TitleService,\n private storageService: StorageService,\n ) {}\n\n setIconSetName(iconSetName: string): void {\n this.titleService.setIconSetName(\n iconSetName ? iconSetName : INITIAL_ICON_SET_NAME,\n );\n }\n\n exportConfiguration(): void {\n const iconSetConfiguration = this.getCurrentConfigurationForExport();\n if (!iconSetConfiguration) {\n return;\n }\n\n const configJSONString = JSON.stringify(iconSetConfiguration, null, 2);\n const filename = this.titleService.getIconSetName();\n const element = document.createElement('a');\n\n element.setAttribute(\n 'href',\n 'data:text/plain;charset=utf-8,' + encodeURIComponent(configJSONString),\n );\n element.setAttribute('download', filename + '.iconset');\n element.style.display = 'none';\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n }\n\n loadConfiguration(\n customConfig: IconSetConfiguration,\n updateIconSetName = true,\n ): void {\n let actorDict = new Dictionary();\n let workObjectDict = new Dictionary();\n\n if (customConfig.actors.keysArray()) {\n actorDict = customConfig.actors;\n workObjectDict = customConfig.workObjects;\n } else {\n actorDict.addEach(customConfig.actors);\n workObjectDict.addEach(customConfig.workObjects);\n }\n\n const actorKeys = actorDict.keysArray();\n const workObjectKeys = workObjectDict.keysArray();\n\n this.iconDictionaryService.updateIconRegistries([], [], customConfig);\n\n this.iconDictionaryService\n .getIconConfiguration()\n .appendSRCFile(actorKeys, actorDict, workObjectKeys, workObjectDict);\n\n this.iconDictionaryService.addIconsFromIconSetConfiguration(\n ElementTypes.ACTOR,\n actorKeys.map((a) => ElementTypes.ACTOR + a),\n );\n this.iconDictionaryService.addIconsFromIconSetConfiguration(\n ElementTypes.WORKOBJECT,\n workObjectKeys.map((w) => ElementTypes.WORKOBJECT + w),\n );\n\n if (updateIconSetName) {\n const configurationName = customConfig.name;\n this.setIconSetName(configurationName);\n }\n }\n\n getCurrentConfiguration(): IconSetConfiguration | undefined {\n const actors = this.iconDictionaryService.getActorsDictionary();\n const workObjects = this.iconDictionaryService.getWorkObjectsDictionary();\n\n let iconSetConfiguration;\n\n if (actors.size() > 0 && workObjects.size() > 0) {\n iconSetConfiguration = this.createConfigFromDictionaries(\n actors,\n workObjects,\n );\n }\n return iconSetConfiguration;\n }\n\n getCurrentConfigurationForExport():\n | IconSetConfigurationForExport\n | undefined {\n const currentConfiguration = this.getCurrentConfiguration();\n\n if (currentConfiguration) {\n const actors: any = {};\n const workObjects: any = {};\n\n currentConfiguration.actors.all().forEach((entry) => {\n actors[entry.key] = entry.value;\n });\n currentConfiguration.workObjects.all().forEach((entry) => {\n workObjects[entry.key] = entry.value;\n });\n\n return {\n name: currentConfiguration.name,\n actors: actors,\n workObjects: workObjects,\n };\n }\n return;\n }\n\n getCurrentConfigurationNamesWithoutPrefix(): CustomIconSetConfiguration {\n return {\n name: this.titleService.getIconSetName() || INITIAL_ICON_SET_NAME,\n actors: this.iconDictionaryService\n .getActorsDictionary()\n .keysArray()\n .map((a) => a.replace(ElementTypes.ACTOR, '')),\n workObjects: this.iconDictionaryService\n .getWorkObjectsDictionary()\n .keysArray()\n .map((w) => w.replace(ElementTypes.WORKOBJECT, '')),\n };\n }\n\n createMinimalConfigurationWithDefaultIcons(): IconSetConfiguration {\n const minimalConfig = this.createConfigFromCanvas();\n\n defaultConf.actors.forEach((iconName) => {\n minimalConfig.actors.add(\n this.iconDictionaryService.getIconSource(iconName),\n iconName,\n );\n });\n defaultConf.workObjects.forEach((iconName) => {\n minimalConfig.workObjects.add(\n this.iconDictionaryService.getIconSource(iconName),\n iconName,\n );\n });\n\n return minimalConfig;\n }\n\n private createConfigFromDictionaries(\n actorsDict: Dictionary,\n workObjectsDict: Dictionary,\n ): IconSetConfiguration {\n const actorNames = actorsDict.keysArray();\n const workobjectNames = workObjectsDict.keysArray();\n const newActors = new Dictionary();\n const newWorkobjects = new Dictionary();\n\n // Fill Configuration from Canvas-Objects\n actorNames.forEach((actor) => {\n newActors.add(\n actorsDict.get(actor),\n actor.replace(ElementTypes.ACTOR, ''),\n );\n });\n workobjectNames.forEach((workObject) => {\n newWorkobjects.add(\n workObjectsDict.get(workObject),\n workObject.replace(ElementTypes.WORKOBJECT, ''),\n );\n });\n\n return {\n name: this.titleService.getIconSetName(),\n actors: newActors,\n workObjects: newWorkobjects,\n };\n }\n\n public createIconSetConfiguration(\n fileConfiguration: FileConfiguration,\n ): IconSetConfiguration {\n const actorsDict = new Dictionary();\n const workObjectsDict = new Dictionary();\n Object.keys(fileConfiguration.actors).forEach((key) => {\n let icon = fileConfiguration.actors[key];\n if (icon) {\n // make sure the actor has an icon\n actorsDict.add(icon, sanitizeIconName(key));\n }\n });\n\n Object.keys(fileConfiguration.workObjects).forEach((key) => {\n let icon = fileConfiguration.workObjects[key];\n if (icon) {\n // make sure the work object has an icon\n workObjectsDict.add(icon, sanitizeIconName(key));\n }\n });\n\n return {\n name: fileConfiguration.name,\n actors: actorsDict,\n workObjects: workObjectsDict,\n };\n }\n\n public getStoredIconSetConfiguration(): IconSetConfiguration | undefined {\n const iconSetString = this.storageService.get(ICON_SET_CONFIGURATION_TAG);\n\n if (!iconSetString) {\n return;\n } else {\n const configurationFromFile = this.createIconSetConfiguration(\n JSON.parse(iconSetString),\n );\n if (this.checkValidityOfConfiguration(configurationFromFile)) {\n return configurationFromFile;\n }\n }\n return;\n }\n\n public setStoredIconSetConfiguration(config: IconSetConfiguration): void {\n const actors: {\n [p: string]: any;\n } = {};\n config.actors.keysArray().forEach((key) => {\n actors[key] = config.actors.get(key);\n });\n const workObjects: {\n [p: string]: any;\n } = {};\n config.workObjects.keysArray().forEach((key) => {\n workObjects[key] = config.workObjects.get(key);\n });\n\n const configForStorage = {\n name: config.name,\n actors: actors,\n workObjects: workObjects,\n };\n\n this.storageService.set(\n ICON_SET_CONFIGURATION_TAG,\n JSON.stringify(configForStorage, null, 2),\n );\n }\n\n private createConfigFromCanvas(): IconSetConfiguration {\n const config = {\n name: INITIAL_ICON_SET_NAME,\n actors: new Dictionary(),\n workObjects: new Dictionary(),\n };\n\n let allCanvasObjects = this.elementRegistryService.getAllCanvasObjects();\n\n allCanvasObjects\n .map((e) => e.businessObject)\n .forEach((element) => {\n const type = element.type\n .replace(ElementTypes.ACTOR, '')\n .replace(ElementTypes.WORKOBJECT, '');\n if (element.type.includes(ElementTypes.ACTOR)) {\n let src = this.iconDictionaryService.getIconSource(type) || '';\n config.actors.add(src, type);\n } else if (element.type.includes(ElementTypes.WORKOBJECT)) {\n let src = this.iconDictionaryService.getIconSource(type) || '';\n config.workObjects.add(src, type);\n }\n });\n\n return config;\n }\n\n private checkValidityOfConfiguration(\n iconSetConfiguration: IconSetConfiguration,\n ) {\n return (\n iconSetConfiguration.actors.keysArray().length > 1 &&\n iconSetConfiguration.workObjects.keysArray().length > 1 &&\n !iconSetConfiguration.actors\n .all()\n .some((e) => typeof e.value !== 'string') &&\n !iconSetConfiguration.workObjects\n .all()\n .some((e) => typeof e.value !== 'string')\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { UsedIconList } from 'src/app/domain/entities/UsedIconList';\nimport { ElementRegistryService } from 'src/app/domain/services/element-registry.service';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_DURATION_LONGER,\n SNACKBAR_INFO,\n SNACKBAR_SUCCESS,\n} from '../../../domain/entities/constants';\nimport { Dictionary } from '../../../domain/entities/dictionary';\nimport { ElementTypes } from '../../../domain/entities/elementTypes';\nimport { IconListItem } from '../domain/iconListItem';\nimport { TitleService } from '../../title/services/title.service';\nimport { IconSetConfigurationService } from './icon-set-configuration.service';\nimport { IconDictionaryService } from './icon-dictionary.service';\nimport getIconId = ElementTypes.getIconId;\nimport { IconSetConfiguration } from '../../../domain/entities/icon-set-configuration';\nimport { CustomIconSetConfiguration } from '../../../domain/entities/custom-icon-set-configuration';\n\n/**\n * We are not allowed to call ImportDomainStoryService directly,\n * so we use this \"interface\" instead.\n */\nexport abstract class IconSetChangedService {\n public abstract iconConfigrationChanged(): Observable;\n public abstract getConfiguration(): IconSetConfiguration;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconSetCustomizationService {\n private readonly iconSetConfigurationTypes: BehaviorSubject;\n\n private allIconListItems = new Dictionary();\n\n private configurationHasChanged = false;\n\n selectedActors$ = new BehaviorSubject([]);\n selectedWorkobjects$ = new BehaviorSubject([]);\n private changedIconSetConfiguration: IconSetConfiguration | undefined;\n\n constructor(\n private iconSetConfigurationService: IconSetConfigurationService,\n private iconDictionaryService: IconDictionaryService,\n iconSetChangedService: IconSetChangedService,\n private titleService: TitleService,\n private elementRegistryService: ElementRegistryService,\n private snackbar: MatSnackBar,\n ) {\n this.iconSetConfigurationTypes = new BehaviorSubject(\n this.iconSetConfigurationService.getCurrentConfigurationNamesWithoutPrefix(),\n );\n\n this.selectedWorkobjects$.next(\n this.iconSetConfigurationTypes.value.workObjects,\n );\n this.selectedActors$.next(this.iconSetConfigurationTypes.value.actors);\n\n iconDictionaryService\n .getAllIconDictionary()\n .keysArray()\n .forEach((iconName) => {\n this.addIconToAllIconList(iconName);\n });\n\n iconSetChangedService.iconConfigrationChanged().subscribe((config) => {\n this.importConfiguration(config);\n });\n\n const storedIconSetConfiguration =\n this.iconSetConfigurationService.getStoredIconSetConfiguration();\n if (storedIconSetConfiguration) {\n this.importConfiguration(storedIconSetConfiguration, false);\n }\n }\n\n importConfiguration(\n customConfig: IconSetConfiguration,\n saveIconSet = true,\n ): void {\n const actorKeys = customConfig.actors.keysArray();\n const workObjectKeys = customConfig.workObjects.keysArray();\n const usedIcons = this.elementRegistryService.getUsedIcons();\n\n this.changeName(customConfig.name);\n actorKeys.forEach((iconName) => {\n if (!this.allIconListItems.has(iconName)) {\n this.addIconToAllIconList(iconName);\n }\n const selectedActorNames = this.selectedActors$.value;\n if (!selectedActorNames.includes(iconName)) {\n this.selectActor(iconName);\n }\n });\n this.selectedActors$.value.forEach((iconName) => {\n if (\n !actorKeys.includes(iconName) &&\n !usedIcons.actors.includes(iconName)\n ) {\n this.deselectActor(iconName);\n }\n });\n workObjectKeys.forEach((iconName) => {\n if (!this.allIconListItems.has(iconName)) {\n this.addIconToAllIconList(iconName);\n }\n const selectedWorkobjectNames = this.selectedWorkobjects$.value;\n if (!selectedWorkobjectNames.includes(iconName)) {\n this.selectWorkObject(iconName);\n }\n });\n this.selectedWorkobjects$.value.forEach((iconName) => {\n if (\n !workObjectKeys.includes(iconName) &&\n !usedIcons.workobjects.includes(iconName)\n ) {\n this.deselectWorkobject(iconName);\n }\n });\n if (saveIconSet) {\n this.saveIconSet(usedIcons, true);\n }\n }\n\n /** Getter & Setter **/\n getIconSetConfiguration(): BehaviorSubject {\n return this.iconSetConfigurationTypes;\n }\n\n getIconForName(iconName: string): BehaviorSubject {\n return this.allIconListItems.get(iconName);\n }\n\n isIconActor(iconName: string): boolean {\n return (\n this.iconSetConfigurationTypes.value.actors.filter(\n (actor: string) => actor === iconName,\n ).length > 0\n );\n }\n\n isIconWorkObject(iconName: string): boolean {\n return (\n this.iconSetConfigurationTypes.value.workObjects.filter(\n (workObject: string) => workObject === iconName,\n ).length > 0\n );\n }\n\n changeName(iconSetName: string): void {\n this.titleService.setIconSetName(iconSetName);\n const changedIconSet = this.iconSetConfigurationTypes.value;\n changedIconSet.name = iconSetName;\n this.iconSetConfigurationTypes.next(changedIconSet);\n }\n\n /** Selected Icons **/\n setAsUnassigned(iconName: string, isActor: boolean): void {\n if (isActor) {\n this.deselectActor(iconName);\n } else {\n this.deselectWorkobject(iconName);\n }\n this.updateIcon(false, false, iconName);\n }\n\n setAsActor(isActor: boolean, actor: string): void {\n if (isActor) {\n this.updateIcon(true, false, actor);\n this.selectActor(actor);\n this.deselectWorkobject(actor);\n } else {\n this.deselectActor(actor);\n this.updateIcon(false, false, actor);\n }\n }\n\n setAsWorkobject(isWorkobject: boolean, workobject: string): void {\n if (isWorkobject) {\n this.updateIcon(false, true, workobject);\n this.selectWorkObject(workobject);\n this.deselectActor(workobject);\n } else {\n this.deselectWorkobject(workobject);\n this.updateIcon(false, false, workobject);\n }\n }\n\n selectActor(actor: string): void {\n const value = this.iconSetConfigurationTypes.value;\n if (!value.actors.includes(actor)) {\n value.actors.push(actor);\n this.iconSetConfigurationTypes.next(value);\n this.updateActorSubject();\n }\n }\n\n selectWorkObject(workObject: string): void {\n const value = this.iconSetConfigurationTypes.value;\n if (!value.workObjects.includes(workObject)) {\n value.workObjects.push(workObject);\n this.iconSetConfigurationTypes.next(value);\n this.updateWorkObjectSubject();\n }\n }\n\n deselectActor(actor: string): void {\n if (this.iconSetConfigurationTypes) {\n this.iconSetConfigurationTypes.next({\n name: this.iconSetConfigurationTypes.value.name,\n actors: this.iconSetConfigurationTypes.value.actors.filter(\n (a: string) => !a.includes(actor),\n ),\n workObjects: this.iconSetConfigurationTypes.value.workObjects,\n });\n }\n this.updateActorSubject();\n }\n\n deselectWorkobject(workobject: string): void {\n if (this.iconSetConfigurationTypes) {\n this.iconSetConfigurationTypes.next({\n name: this.iconSetConfigurationTypes.value.name,\n actors: this.iconSetConfigurationTypes.value.actors,\n workObjects: this.iconSetConfigurationTypes.value.workObjects.filter(\n (w: string) => !w.includes(workobject),\n ),\n });\n }\n this.updateWorkObjectSubject();\n }\n\n setSelectedWorkObject(sortedList: string[]): void {\n const value = this.iconSetConfigurationTypes.value;\n value.workObjects = sortedList;\n this.iconSetConfigurationTypes.next(value);\n this.updateWorkObjectSubject();\n }\n\n setSelectedActors(sortedList: string[]): void {\n const value = this.iconSetConfigurationTypes.value;\n value.actors = sortedList;\n this.iconSetConfigurationTypes.next(value);\n this.updateActorSubject();\n }\n\n private updateActorSubject(): void {\n this.selectedActors$.next(this.iconSetConfigurationTypes.value.actors);\n this.configurationHasChanged = true;\n }\n\n private updateWorkObjectSubject(): void {\n this.selectedWorkobjects$.next(\n this.iconSetConfigurationTypes.value.workObjects,\n );\n this.configurationHasChanged = true;\n }\n\n /** Revert Icon Set **/\n resetIconSet(): void {\n const defaultConfig =\n this.iconSetConfigurationService.createMinimalConfigurationWithDefaultIcons();\n\n this.selectedWorkobjects$.value.forEach((workObjectName) => {\n if (!defaultConfig.workObjects.has(workObjectName)) {\n this.deselectWorkobject(workObjectName);\n }\n });\n this.selectedActors$.value.forEach((actorName) => {\n if (!defaultConfig.actors.has(actorName)) {\n this.deselectActor(actorName);\n }\n });\n\n this.iconSetConfigurationTypes.next({\n name: defaultConfig.name,\n actors: defaultConfig.actors.keysArray(),\n workObjects: defaultConfig.workObjects.keysArray(),\n } as CustomIconSetConfiguration);\n\n this.updateAllIconBehaviourSubjects();\n }\n\n cancel(): void {\n this.iconSetConfigurationTypes.next(\n this.iconSetConfigurationService.getCurrentConfigurationNamesWithoutPrefix(),\n );\n this.updateAllIconBehaviourSubjects();\n this.resetToInitialConfiguration();\n }\n\n private resetToInitialConfiguration(): void {\n this.updateActorSubject();\n this.updateWorkObjectSubject();\n }\n\n /** Persist Icon Set **/\n saveIconSet(usedIcons: UsedIconList, imported = false): void {\n const changedActors: string[] = [];\n const changedWorkobjects: string[] = [];\n if (this.configurationHasChanged) {\n const changedIconSet = this.createIconSetConfiguration();\n\n const configurationActors = changedIconSet.actors.keysArray();\n usedIcons?.actors.forEach((actor) => {\n if (\n !configurationActors?.includes(actor) &&\n !changedActors.includes(actor)\n ) {\n changedActors.push(actor);\n }\n });\n const configurationWorkobjects = changedIconSet.workObjects.keysArray();\n usedIcons?.workobjects.forEach((workobject) => {\n if (\n !configurationWorkobjects?.includes(workobject) &&\n !changedWorkobjects.includes(workobject)\n ) {\n changedWorkobjects.push(workobject);\n }\n });\n\n if (!changedActors.length && !changedWorkobjects.length) {\n this.changedIconSetConfiguration = changedIconSet;\n\n this.updateIcons(changedIconSet);\n\n this.iconSetConfigurationService.setStoredIconSetConfiguration(\n this.changedIconSetConfiguration,\n );\n this.snackbar.open(\n imported\n ? 'Configuration imported successfully'\n : 'Configuration saved successfully',\n undefined,\n {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n },\n );\n }\n } else {\n this.snackbar.open(\n imported\n ? 'No configuration to be imported'\n : 'No configuration to be saved',\n undefined,\n {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_INFO,\n },\n );\n }\n if (changedActors.length || changedWorkobjects.length) {\n if (changedActors.length) {\n const actors = changedActors.join(', ');\n this.snackbar.open(\n `The following icons are already in use as actors and cannot be changed: ${actors}`,\n undefined,\n {\n duration: SNACKBAR_DURATION_LONGER,\n panelClass: SNACKBAR_INFO,\n },\n );\n }\n if (changedWorkobjects.length) {\n const workobjects = changedWorkobjects.join(', ');\n this.snackbar.open(\n `The following icons are already in use as work objects and cannot be changed: ${workobjects}`,\n undefined,\n {\n duration: SNACKBAR_DURATION_LONGER,\n panelClass: SNACKBAR_INFO,\n },\n );\n }\n }\n }\n\n exportIconSet(): void {\n this.iconSetConfigurationService.exportConfiguration();\n }\n\n getAndClearSavedConfiguration(): IconSetConfiguration | undefined {\n const temp = this.changedIconSetConfiguration;\n this.changedIconSetConfiguration = undefined;\n\n return temp;\n }\n\n private createIconSetConfiguration(): IconSetConfiguration {\n const actors = new Dictionary();\n const workObjects = new Dictionary();\n\n this.iconSetConfigurationTypes.value.actors.forEach((name: string) => {\n actors.add(this.iconDictionaryService.getIconSource(name), name);\n });\n this.iconSetConfigurationTypes.value.workObjects.forEach((name: string) => {\n workObjects.add(this.iconDictionaryService.getIconSource(name), name);\n });\n\n return {\n name: this.iconSetConfigurationTypes.value.name || '',\n actors,\n workObjects,\n };\n }\n\n /** Update Icons **/\n addNewIcon(iconName: string): void {\n const iconDict = new Dictionary();\n iconDict.add(this.getSrcForIcon(iconName), iconName);\n this.iconDictionaryService.addIconsToCss(iconDict);\n this.addIconToAllIconList(iconName);\n }\n\n private addIconToAllIconList(iconName: string): void {\n this.allIconListItems.add(\n new BehaviorSubject({\n name: iconName,\n svg: this.getSrcForIcon(iconName),\n isActor: this.isIconActor(iconName),\n isWorkObject: this.isIconWorkObject(iconName),\n }),\n iconName,\n );\n }\n\n private updateIcon(\n isActor: boolean,\n isWorkobject: boolean,\n iconName: string,\n ) {\n const iconBehaviourSubject = this.getIconForName(iconName);\n const icon = iconBehaviourSubject.value;\n icon.isActor = isActor;\n icon.isWorkObject = isWorkobject;\n\n iconBehaviourSubject.next(icon);\n }\n\n private updateAllIconBehaviourSubjects(): void {\n const customIconSetConfiguration = this.iconSetConfigurationTypes.value;\n this.allIconListItems.keysArray().forEach((iconName) => {\n if (customIconSetConfiguration.actors.includes(iconName)) {\n this.updateIcon(true, false, iconName);\n } else if (customIconSetConfiguration.workObjects.includes(iconName)) {\n this.updateIcon(false, true, iconName);\n } else {\n this.updateIcon(false, false, iconName);\n }\n });\n }\n\n private getSrcForIcon(name: string): string {\n let iconName: string;\n if (name.includes(ElementTypes.DOMAINSTORY)) {\n // TODO: td: This returns empty every time!\n iconName = getIconId(name);\n } else {\n iconName = name;\n }\n const rawSrc = this.iconDictionaryService.getIconSource(iconName);\n\n if (!rawSrc) {\n return '';\n }\n\n if (rawSrc.startsWith('data')) {\n return rawSrc;\n } else {\n return 'data:image/svg+xml,' + rawSrc;\n }\n }\n\n private updateIcons(changedIconSet: IconSetConfiguration) {\n this.allIconListItems\n .keysArray()\n .forEach((item) => this.setAsUnassigned(item, this.isIconActor(item)));\n changedIconSet.actors.keysArray().forEach((actor) => {\n this.iconDictionaryService.registerIconForType(\n ElementTypes.ACTOR,\n actor,\n this.iconDictionaryService.getFullDictionary().get(actor),\n );\n this.iconDictionaryService.unregisterIconForType(\n ElementTypes.WORKOBJECT,\n actor,\n );\n this.setAsActor(true, actor);\n });\n changedIconSet.workObjects.keysArray().forEach((workObject) => {\n this.iconDictionaryService.registerIconForType(\n ElementTypes.WORKOBJECT,\n workObject,\n this.iconDictionaryService.getFullDictionary().get(workObject),\n );\n this.iconDictionaryService.unregisterIconForType(\n ElementTypes.ACTOR,\n workObject,\n );\n this.setAsWorkobject(true, workObject);\n });\n }\n}\n","import { Directive, HostBinding, HostListener } from '@angular/core';\nimport { ImportDomainStoryService } from '../services/import-domain-story.service';\nimport {\n SNACKBAR_DURATION_LONG,\n SNACKBAR_ERROR,\n} from '../../../domain/entities/constants';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\n@Directive({\n standalone: true,\n selector: '[appDrag]',\n})\nexport class DragDirective {\n @HostBinding('style.background') private background = '';\n\n constructor(\n private importDomainStoryService: ImportDomainStoryService,\n private snackbar: MatSnackBar,\n ) {}\n\n @HostListener('dragover', ['$event']) public onDragOver(evt: DragEvent) {\n evt.preventDefault();\n evt.stopPropagation();\n this.background = '#999';\n }\n\n @HostListener('dragleave', ['$event']) public onDragLeave(evt: DragEvent) {\n evt.preventDefault();\n evt.stopPropagation();\n this.background = '';\n }\n\n @HostListener('drop', ['$event']) public onDrop(evt: DragEvent) {\n evt.preventDefault();\n evt.stopPropagation();\n this.background = '';\n\n if (evt.dataTransfer?.files[0]) {\n this.importDomainStoryService.performDropImport(\n evt.dataTransfer.files[0],\n );\n } else {\n this.snackbar.open('Nothing to import', undefined, {\n duration: SNACKBAR_DURATION_LONG,\n panelClass: SNACKBAR_ERROR,\n });\n }\n }\n}\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';\n\n@Component({\n selector: 'app-import-dialog',\n templateUrl: './import-dialog.component.html',\n styleUrls: ['./import-dialog.component.scss'],\n})\nexport class ImportDialogComponent implements OnInit {\n fn: any;\n fileUrl: BehaviorSubject;\n\n constructor(\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: () => {},\n ) {\n this.fileUrl = new BehaviorSubject('');\n this.fn = data;\n }\n\n ngOnInit(): void {}\n\n doImport(): void {\n this.fn(this.fileUrl.value);\n this.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n updateUrl($event: Event) {\n // @ts-ignore\n this.fileUrl.next($event.target.value);\n }\n}\n","\n \n \n\n\n
\n
\n \n \n Import\n \n
\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MaterialModule } from '../../../material.module';\nimport { ImportDialogComponent } from './import-dialog/import-dialog.component';\n\n@NgModule({\n declarations: [ImportDialogComponent],\n exports: [ImportDialogComponent],\n imports: [CommonModule, MaterialModule],\n})\nexport class ImportModule {}\n","import { EventEmitter, Injectable, OnDestroy } from '@angular/core';\nimport { IconDictionaryService } from 'src/app/tools/icon-set-config/services/icon-dictionary.service';\nimport { Dictionary } from 'src/app/domain/entities/dictionary';\nimport { ElementTypes } from 'src/app/domain/entities/elementTypes';\nimport { TitleService } from 'src/app/tools/title/services/title.service';\nimport { ImportRepairService } from 'src/app/tools/import/services/import-repair.service';\nimport { Observable, Subscription } from 'rxjs';\nimport { RendererService } from 'src/app/tools/modeler/services/renderer.service';\nimport { BusinessObject } from 'src/app/domain/entities/businessObject';\nimport { DialogService } from '../../../domain/services/dialog.service';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_TITLE,\n SNACKBAR_DURATION,\n SNACKBAR_DURATION_LONG,\n SNACKBAR_DURATION_LONGER,\n SNACKBAR_ERROR,\n SNACKBAR_INFO,\n} from '../../../domain/entities/constants';\nimport { IconSetConfigurationService } from '../../icon-set-config/services/icon-set-configuration.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { IconSetConfiguration } from '../../../domain/entities/icon-set-configuration';\nimport { IconSetChangedService } from '../../icon-set-config/services/icon-set-customization.service';\nimport { ModelerService } from '../../modeler/services/modeler.service';\nimport { ImportDialogComponent } from '../presentation/import-dialog/import-dialog.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ImportDomainStoryService\n implements OnDestroy, IconSetChangedService\n{\n titleSubscription: Subscription;\n descriptionSubscription: Subscription;\n\n title = INITIAL_TITLE;\n description = INITIAL_DESCRIPTION;\n private importedConfiguration: IconSetConfiguration | null = null;\n\n private importedConfigurationEmitter =\n new EventEmitter();\n\n constructor(\n private iconDictionaryService: IconDictionaryService,\n private importRepairService: ImportRepairService,\n private titleService: TitleService,\n private rendererService: RendererService,\n private dialogService: DialogService,\n private iconSetConfigurationService: IconSetConfigurationService,\n private modelerService: ModelerService,\n private snackbar: MatSnackBar,\n ) {\n this.titleSubscription = this.titleService.title$.subscribe(\n (title: string) => {\n this.title = title;\n },\n );\n this.descriptionSubscription = this.titleService.description$.subscribe(\n (description: string) => {\n this.description = description;\n },\n );\n }\n\n ngOnDestroy(): void {\n this.titleSubscription.unsubscribe();\n this.descriptionSubscription.unsubscribe();\n }\n\n iconConfigrationChanged(): Observable {\n return this.importedConfigurationEmitter.asObservable();\n }\n\n getConfiguration(): IconSetConfiguration {\n const config: IconSetConfiguration = {\n name: this.importedConfiguration?.name || '',\n actors: this.importedConfiguration?.actors || new Dictionary(),\n workObjects: this.importedConfiguration?.workObjects || new Dictionary(),\n };\n this.importedConfiguration = null;\n return config;\n }\n\n performImport(): void {\n // @ts-ignore\n const file = document.getElementById('import').files[0];\n const filename = file.name;\n\n const dstSvgPattern = /.*(.dst)(\\s*\\(\\d+\\)){0,1}\\.svg/;\n const egnSvgPattern = /.*(.egn)(\\s*\\(\\d+\\)){0,1}\\.svg/;\n\n if (filename.endsWith('.dst')) {\n this.importDST(file, filename, false);\n } else if (filename.match(dstSvgPattern)) {\n this.importDST(file, filename, true);\n } else if (filename.endsWith('.egn')) {\n this.importEGN(file, filename, false);\n } else if (filename.match(egnSvgPattern)) {\n this.importEGN(file, filename, true);\n }\n this.modelerService.commandStackChanged();\n }\n\n performDropImport(file: File): void {\n const filename = file.name;\n\n const dstSvgPattern = /.*(.dst)(\\s*\\(\\d+\\)){0,1}\\.svg/;\n const egnSvgPattern = /.*(.egn)(\\s*\\(\\d+\\)){0,1}\\.svg/;\n\n if (filename.endsWith('.dst')) {\n this.importDST(file, filename, false);\n } else if (filename.match(dstSvgPattern)) {\n this.importDST(file, filename, true);\n } else if (filename.endsWith('.egn')) {\n this.importEGN(file, filename, false);\n } else if (filename.match(egnSvgPattern)) {\n this.importEGN(file, filename, true);\n } else {\n this.snackbar.open('File not supported', undefined, {\n duration: SNACKBAR_DURATION_LONG,\n panelClass: SNACKBAR_ERROR,\n });\n }\n this.modelerService.commandStackChanged();\n }\n\n importFromUrl(fileUrl: string): void {\n if (!fileUrl.startsWith('http')) {\n this.snackbar.open('Url not valid', undefined, {\n duration: SNACKBAR_DURATION_LONG,\n panelClass: SNACKBAR_ERROR,\n });\n return;\n }\n fetch(fileUrl)\n .then((response) => {\n return response.blob();\n })\n .then((blob) => {\n const string = fileUrl.split('/');\n const filename = string[string.length - 1].replace(/%20/g, ' ');\n\n if (!filename) {\n throw new Error('Unable to extract filename from URL');\n }\n\n const dstSvgPattern = /.*(.dst)(\\s*\\(\\d+\\)){0,1}\\.svg/;\n const egnSvgPattern = /.*(.egn)(\\s*\\(\\d+\\)){0,1}\\.svg/;\n\n if (filename.endsWith('.dst')) {\n this.importDST(blob, filename, false);\n } else if (filename.match(dstSvgPattern)) {\n this.importDST(blob, filename, true);\n } else if (filename.endsWith('.egn')) {\n this.importEGN(blob, filename, false);\n } else if (filename.match(egnSvgPattern)) {\n this.importEGN(blob, filename, true);\n } else {\n this.snackbar.open('Url not valid', undefined, {\n duration: SNACKBAR_DURATION_LONG,\n panelClass: SNACKBAR_ERROR,\n });\n }\n this.modelerService.commandStackChanged();\n })\n .catch(() =>\n this.snackbar.open('Cross-origin request blocked', undefined, {\n duration: SNACKBAR_DURATION_LONG,\n panelClass: SNACKBAR_ERROR,\n }),\n );\n }\n\n openUploadUrlDialog(): void {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n config.data = (fileUrl: string) => this.importFromUrl(fileUrl);\n this.dialogService.openDialog(ImportDialogComponent, config);\n }\n\n importDST(input: Blob, filename: string, isSVG: boolean): void {\n const fileReader = new FileReader();\n const titleText = this.restoreTitleFromFileName(filename, isSVG);\n\n // no need to put this on the commandStack\n this.titleService.updateTitleAndDescription(titleText, null, false);\n\n fileReader.onloadend = (e) => {\n if (e && e.target) {\n this.fileReaderFunction(e.target.result, isSVG, false);\n }\n };\n\n fileReader.readAsText(input);\n }\n\n importEGN(input: Blob, filename: string, isSVG: boolean): void {\n const fileReader = new FileReader();\n const titleText = this.restoreTitleFromFileName(filename, isSVG);\n\n // no need to put this on the commandStack\n this.titleService.updateTitleAndDescription(titleText, null, false);\n\n fileReader.onloadend = (e) => {\n if (e && e.target) {\n this.fileReaderFunction(e.target.result, isSVG, true);\n }\n };\n\n fileReader.readAsText(input);\n }\n\n private fileReaderFunction(\n text: string | ArrayBuffer | null,\n isSVG: boolean,\n isEGN: boolean,\n ): void {\n let dstText;\n if (typeof text === 'string') {\n if (isSVG) {\n dstText = this.removeXMLComments(text);\n } else {\n dstText = text;\n }\n\n let elements: any[];\n let config: IconSetConfiguration;\n let configFromFile: {\n name: string;\n actors: { [key: string]: any };\n workObjects: { [key: string]: any };\n };\n\n let dstAndConfig = this.extractDstAndConfig(dstText);\n if (dstAndConfig == null) {\n return;\n }\n\n // current implementation\n if (dstAndConfig.domain) {\n configFromFile = isEGN\n ? dstAndConfig.domain\n : JSON.parse(dstAndConfig.domain);\n config =\n this.iconSetConfigurationService.createIconSetConfiguration(\n configFromFile,\n );\n elements = isEGN ? dstAndConfig.dst : JSON.parse(dstAndConfig.dst);\n } else {\n // legacy implementation\n if (dstAndConfig.config) {\n configFromFile = JSON.parse(dstAndConfig.config);\n config =\n this.iconSetConfigurationService.createIconSetConfiguration(\n configFromFile,\n );\n elements = JSON.parse(dstAndConfig.dst);\n } else {\n // implementation prior to configuration\n elements = JSON.parse(dstText);\n config =\n this.iconSetConfigurationService.createMinimalConfigurationWithDefaultIcons();\n }\n }\n\n this.importRepairService.removeWhitespacesFromIcons(elements);\n\n const configChanged = this.checkConfigForChanges(config);\n\n let lastElement = elements[elements.length - 1];\n if (!lastElement.id) {\n lastElement = elements.pop();\n let importVersionNumber = lastElement;\n\n // if the last element has the importedVersionNumber has the tag version,\n // then there exists another meta tag 'info' for the description\n if (importVersionNumber.version) {\n lastElement = elements.pop();\n }\n\n if (importVersionNumber.version) {\n importVersionNumber = importVersionNumber.version as string;\n } else {\n importVersionNumber = '?';\n this.snackbar.open(`The version number is unreadable.`, undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_ERROR,\n });\n }\n elements = this.handleVersionNumber(importVersionNumber, elements);\n }\n\n if (\n !this.importRepairService.checkForUnreferencedElementsInActivitiesAndRepair(\n elements,\n )\n ) {\n this.showBrokenImportDialog();\n }\n\n this.titleService.updateTitleAndDescription(\n this.title,\n lastElement.info,\n false,\n );\n\n this.importRepairService.adjustPositions(elements);\n\n this.updateIconRegistries(elements, config);\n this.rendererService.importStory(elements, configChanged, config);\n }\n }\n\n private handleVersionNumber(\n importVersionNumber: string,\n elements: BusinessObject[],\n ): BusinessObject[] {\n const versionPrefix = +importVersionNumber.substring(\n 0,\n importVersionNumber.lastIndexOf('.'),\n );\n if (versionPrefix <= 0.5) {\n elements =\n this.importRepairService.updateCustomElementsPreviousV050(elements);\n this.showPreviousV050Dialog(versionPrefix);\n }\n return elements;\n }\n\n private extractDstAndConfig(dstText: string) {\n let dstAndConfig = null;\n try {\n dstAndConfig = JSON.parse(dstText);\n } catch (e) {\n this.showBrokenImportDialog();\n }\n return dstAndConfig;\n }\n\n private removeXMLComments(xmlText: string): string {\n xmlText = xmlText.substring(xmlText.indexOf(''));\n while (xmlText.includes('')) {\n xmlText = xmlText.replace('', '');\n }\n xmlText = xmlText.replace('', '');\n xmlText = xmlText.replace('', '');\n return xmlText;\n }\n\n checkConfigForChanges(iconSetConfiguration: IconSetConfiguration): boolean {\n const newActorKeys = iconSetConfiguration.actors.keysArray();\n const newWorkObjectKeys = iconSetConfiguration.workObjects.keysArray();\n\n const currentActorKeys = this.iconDictionaryService.getTypeDictionaryKeys(\n ElementTypes.ACTOR,\n );\n const currentWorkobjectKeys =\n this.iconDictionaryService.getTypeDictionaryKeys(ElementTypes.WORKOBJECT);\n\n let changed = false;\n\n if (\n newActorKeys.length !== currentActorKeys.length ||\n newWorkObjectKeys.length !== currentWorkobjectKeys.length\n ) {\n return true;\n }\n\n for (let i = 0; i < newActorKeys.length; i++) {\n changed =\n this.clearName(currentActorKeys[i]) !== this.clearName(newActorKeys[i]);\n if (changed) {\n i = newActorKeys.length;\n }\n }\n if (changed) {\n return changed;\n }\n for (let i = 0; i < newWorkObjectKeys.length; i++) {\n changed =\n this.clearName(currentWorkobjectKeys[i]) !==\n this.clearName(newWorkObjectKeys[i]);\n if (changed) {\n i = newWorkObjectKeys.length;\n }\n }\n return changed;\n }\n\n private clearName(name: string): string {\n return name\n .replace(ElementTypes.ACTOR, '')\n .replace(ElementTypes.WORKOBJECT, '');\n }\n\n private updateIconRegistries(\n elements: BusinessObject[],\n config: IconSetConfiguration,\n ): void {\n const actorIcons = this.iconDictionaryService.getElementsOfType(\n elements,\n ElementTypes.ACTOR,\n );\n const workObjectIcons = this.iconDictionaryService.getElementsOfType(\n elements,\n ElementTypes.WORKOBJECT,\n );\n this.iconDictionaryService.updateIconRegistries(\n actorIcons,\n workObjectIcons,\n config,\n );\n\n this.setImportedConfigurationAndEmit(config);\n }\n\n private showPreviousV050Dialog(version: number): void {\n const message = `Your domain story was created with Egon version ${version}. The file format has since changed.\n Your Domain Story was converted to the new format. Please check if it is complete.`;\n\n this.snackbar.open(message, undefined, {\n duration: SNACKBAR_DURATION_LONGER,\n panelClass: SNACKBAR_INFO,\n });\n }\n\n private setImportedConfigurationAndEmit(config: IconSetConfiguration) {\n this.importedConfiguration = config;\n this.importedConfigurationEmitter.emit(config);\n }\n\n private showBrokenImportDialog() {\n const message = `Error during import: The imported domain story is not complete. Please check if there are elements missing from the canvas.`;\n\n this.snackbar.open(message, undefined, {\n duration: SNACKBAR_DURATION_LONGER,\n panelClass: SNACKBAR_ERROR,\n });\n }\n\n private restoreTitleFromFileName(filename: string, isSVG: boolean): string {\n let title;\n\n const domainStoryRegex = /_\\d+-\\d+-\\d+( ?_?-?\\(\\d+\\))?(-?\\d)?(.dst|.egn)/;\n const svgRegex = /_\\d+-\\d+-\\d+( ?_?-?\\(\\d+\\))?(-?\\d)?(.dst|.egn).svg/;\n\n const egnSuffix = '.egn';\n const dstSuffix = '.dst';\n const svgSuffix = '.svg';\n\n let filenameWithoutDateSuffix = filename.replace(\n isSVG ? svgRegex : domainStoryRegex,\n '',\n );\n filenameWithoutDateSuffix = filenameWithoutDateSuffix\n .replace(svgSuffix, '')\n .replace(dstSuffix, '')\n .replace(egnSuffix, '');\n title = filenameWithoutDateSuffix;\n return title;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementTypes } from 'src/app/domain/entities/elementTypes';\nimport { BusinessObject } from 'src/app/domain/entities/businessObject';\nimport { Waypoint } from 'src/app/domain/entities/waypoint';\nimport { ActivityBusinessObject } from '../../../domain/entities/activityBusinessObject';\n\n/**\n * Repairs broken Domain Stories so that it can be rendered onto the canvas\n * by removing activities and connections that reference elements that don't exists\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ImportRepairService {\n checkForUnreferencedElementsInActivitiesAndRepair(\n elements: BusinessObject[],\n ): boolean {\n const activities: ActivityBusinessObject[] = [];\n const objectIDs: string[] = [];\n\n let complete = true;\n\n elements.forEach((element) => {\n const type = element.type;\n if (type === ElementTypes.ACTIVITY || type === ElementTypes.CONNECTION) {\n activities.push(element as ActivityBusinessObject);\n } else {\n objectIDs.push(element.id);\n }\n });\n\n activities.forEach((activity) => {\n const source = activity.source;\n const target = activity.target;\n if (!objectIDs.includes(source) || !objectIDs.includes(target)) {\n complete = false;\n const activityIndex = elements.indexOf(activity);\n elements = elements.splice(activityIndex, 1);\n }\n });\n return complete;\n }\n\n /**\n * Ensure backwards compatibility.\n * Previously Document had no special name and was just addressed as workObject\n * Bubble was renamed to Conversation\n */\n updateCustomElementsPreviousV050(\n elements: BusinessObject[],\n ): BusinessObject[] {\n for (const element of elements) {\n if (element.type === ElementTypes.WORKOBJECT) {\n element.type = ElementTypes.WORKOBJECT + 'Document';\n } else if (element.type === ElementTypes.WORKOBJECT + 'Bubble') {\n element.type = ElementTypes.WORKOBJECT + 'Conversation';\n }\n }\n return elements;\n }\n\n /**\n * Adjusts Positions of Elements to ensure the Domain Story starts in the visible parts of the canvas\n */\n adjustPositions(elements: BusinessObject[]): void {\n let xLeft = 0;\n let yUp = 0;\n let isFirst = true;\n\n this.findFirstElement(elements, isFirst, xLeft, yUp);\n\n if (xLeft < 75 || xLeft > 150 || yUp < 0 || yUp > 50) {\n // add Padding for the Palette and the top\n xLeft -= 75;\n yUp -= 50;\n\n elements.forEach((element) =>\n this.adjustElementPosition(element, xLeft, yUp),\n );\n }\n }\n\n private adjustElementPosition(\n element: BusinessObject,\n xLeft: number,\n yUp: number,\n ): void {\n if (\n element.type === ElementTypes.ACTIVITY ||\n element.type === ElementTypes.CONNECTION\n ) {\n const waypoints = (element as ActivityBusinessObject).waypoints;\n waypoints.forEach((point: Waypoint) => {\n point.x -= xLeft;\n point.y -= yUp;\n\n if (point.original) {\n point.original.x = point.x;\n point.original.y = point.y;\n }\n });\n } else {\n element.x -= xLeft;\n element.y -= yUp;\n }\n }\n\n private findFirstElement(\n elements: BusinessObject[],\n isFirst: boolean,\n xLeft: number,\n yUp: number,\n ) {\n elements.forEach((element) => {\n let elXLeft;\n let elYUp;\n if (\n element.type !== ElementTypes.ACTIVITY &&\n element.type !== ElementTypes.CONNECTION\n ) {\n if (isFirst) {\n xLeft = element.x;\n yUp = element.y;\n isFirst = false;\n }\n elXLeft = element.x;\n elYUp = element.y;\n if (elXLeft < xLeft) {\n xLeft = elXLeft;\n }\n if (elYUp < yUp) {\n yUp = elYUp;\n }\n }\n });\n }\n\n // Early versions of Egon allowed Whitespaces in Icon names which are now not supported anymore.\n // To find the right icon in the dictionary, they need to be replaced.\n removeWhitespacesFromIcons(elements: BusinessObject[]) {\n elements.forEach((bo) => {\n if (bo.type) {\n bo.type = bo.type.replace(/ /g, '-');\n }\n });\n }\n}\n","import { Component } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'app-label-dictionary-dialog',\n templateUrl: './label-dictionary-dialog.component.html',\n styleUrls: ['./label-dictionary-dialog.component.scss'],\n})\nexport class LabelDictionaryDialogComponent {\n constructor(\n private dialogRef: MatDialogRef,\n ) {}\n\n close(): void {\n this.dialogRef.close();\n }\n}\n","\n

Label Dictionary

\n \n
\n","import { NgModule } from '@angular/core';\nimport { LabelDictionaryComponent } from './label-dictionary/label-dictionary.component';\nimport { LabelDictionaryDialogComponent } from './label-dictionary-dialog/label-dictionary-dialog.component';\nimport { CommonModule } from '@angular/common';\nimport { MaterialModule } from '../../../material.module';\n\n@NgModule({\n declarations: [LabelDictionaryComponent, LabelDictionaryDialogComponent],\n exports: [LabelDictionaryComponent, LabelDictionaryDialogComponent],\n imports: [CommonModule, MaterialModule],\n})\nexport class LabelDictionaryModule {}\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Output,\n} from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { WorkObjectLabelEntry } from '../../domain/workObjectLabelEntry';\nimport { LabelEntry } from '../../domain/labelEntry';\nimport { LabelDictionaryService } from '../../services/label-dictionary.service';\nimport { initializeLabelEditingProvider } from '../../../modeler/bpmn/modeler/labeling/dsLabelEditingProvider';\n\n@Component({\n selector: 'app-label-dictionary',\n templateUrl: './label-dictionary.component.html',\n styleUrls: ['./label-dictionary.component.scss'],\n})\nexport class LabelDictionaryComponent implements AfterViewInit {\n workobjectEntriesSubject: BehaviorSubject;\n activityEntriesSubject: BehaviorSubject;\n\n workObjectEntries: WorkObjectLabelEntry[];\n activityEntries: LabelEntry[];\n\n @Output()\n closeEmitter: EventEmitter = new EventEmitter();\n\n constructor(\n private labelDictionaryService: LabelDictionaryService,\n private cd: ChangeDetectorRef,\n ) {\n this.labelDictionaryService.createLabelDictionaries();\n this.workObjectEntries = this.labelDictionaryService.getWorkObjectLabels();\n this.activityEntries = this.labelDictionaryService.getActivityLabels();\n\n this.workobjectEntriesSubject = new BehaviorSubject(this.workObjectEntries);\n this.activityEntriesSubject = new BehaviorSubject(this.activityEntries);\n }\n\n ngAfterViewInit(): void {\n this.labelDictionaryService.createLabelDictionaries();\n this.workobjectEntriesSubject.next(\n this.labelDictionaryService.getWorkObjectLabels(),\n );\n this.activityEntriesSubject.next(\n this.labelDictionaryService.getActivityLabels(),\n );\n this.cd.detectChanges();\n }\n\n save(): void {\n this.workObjectEntries = this.workobjectEntriesSubject.value;\n this.activityEntries = this.activityEntriesSubject.value;\n\n const activityNames: string[] = [];\n const originalActivityNames: string[] = [];\n\n const workObjectNames: string[] = [];\n const originalWorkObjectNames: string[] = [];\n\n this.activityEntries\n .filter((a) => a.name !== a.originalName)\n .forEach((activity) => {\n activityNames.push(activity.name);\n originalActivityNames.push(activity.originalName);\n });\n\n this.workObjectEntries\n .filter((w) => w.name !== w.originalName)\n .forEach((workobject) => {\n workObjectNames.push(workobject.name);\n originalWorkObjectNames.push(workobject.originalName);\n });\n\n this.labelDictionaryService.massRenameLabels(\n activityNames,\n originalActivityNames,\n workObjectNames,\n originalWorkObjectNames,\n );\n this.closeEmitter.emit();\n }\n\n cancel(): void {\n this.workObjectEntries.forEach((w) => {\n w.name = w.originalName;\n });\n this.activityEntries.forEach((a) => {\n a.name = a.originalName;\n });\n\n this.workobjectEntriesSubject.next(this.workObjectEntries);\n this.activityEntriesSubject.next(this.activityEntries);\n }\n\n updateActivityEntry($event: Event, activityEntry: LabelEntry) {\n let entries = this.activityEntriesSubject.value;\n entries.filter(\n (e) => e.originalName === activityEntry.originalName,\n // @ts-ignore\n )[0].name = $event.target.value;\n this.activityEntriesSubject.next(entries);\n }\n\n updateWorkobjectEntry($event: Event, workobjectEntry: LabelEntry) {\n let entries = this.workobjectEntriesSubject.value;\n entries.filter(\n (e) => e.originalName === workobjectEntry.originalName,\n // @ts-ignore\n )[0].name = $event.target.value;\n this.workobjectEntriesSubject.next(entries);\n }\n\n preventDefault(event: Event): void {\n event.preventDefault();\n }\n\n close(): void {\n this.closeEmitter.emit();\n }\n}\n","
\n
\n

Work Objects

\n \n @for (\n workobjectEntry of workobjectEntriesSubject | async;\n track workobjectEntry\n ) {\n \n \n \n \n \n }\n \n
\n
\n

Activities

\n \n @for (\n activityEntry of activityEntriesSubject | async;\n track activityEntry\n ) {\n \n \n \n \n \n }\n \n
\n
\n\n \n \n\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/domain/services/element-registry.service';\nimport { ElementTypes } from 'src/app/domain/entities/elementTypes';\nimport { MassNamingService } from 'src/app/tools/label-dictionary/services/mass-naming.service';\nimport { IconDictionaryService } from '../../icon-set-config/services/icon-dictionary.service';\nimport { WorkObjectLabelEntry } from '../domain/workObjectLabelEntry';\nimport { LabelEntry } from '../domain/labelEntry';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { LabelDictionaryDialogComponent } from '../presentation/label-dictionary-dialog/label-dictionary-dialog.component';\nimport {\n SNACKBAR_DURATION_LONGER,\n SNACKBAR_INFO,\n} from '../../../domain/entities/constants';\nimport { DialogService } from '../../../domain/services/dialog.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { CanvasObject } from '../../../domain/entities/canvasObject';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LabelDictionaryService {\n activityLabels: LabelEntry[] = [];\n workObjektLabels: WorkObjectLabelEntry[] = [];\n\n constructor(\n private massNamingService: MassNamingService,\n private elementRegistryService: ElementRegistryService,\n private iconDictionaryService: IconDictionaryService,\n private dialogService: DialogService,\n private snackbar: MatSnackBar,\n ) {}\n\n openLabelDictionary() {\n const isActivityWithLabel = (element: CanvasObject) =>\n element.type.includes(ElementTypes.ACTIVITY) &&\n element.businessObject.name;\n const isWorkObjectWithLabel = (element: CanvasObject) =>\n element.type.includes(ElementTypes.WORKOBJECT) &&\n element.businessObject.name;\n\n const hasAtLeastOneLabel = this.elementRegistryService\n .getAllCanvasObjects()\n .some(\n (element) =>\n isActivityWithLabel(element) || isWorkObjectWithLabel(element),\n );\n if (hasAtLeastOneLabel) {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n this.dialogService.openDialog(LabelDictionaryDialogComponent, config);\n } else {\n this.snackbar.open(\n 'There are currently no activities or work objects with labels on the canvas',\n undefined,\n {\n duration: SNACKBAR_DURATION_LONGER,\n panelClass: SNACKBAR_INFO,\n },\n );\n }\n }\n\n createLabelDictionaries(): void {\n this.activityLabels = [];\n this.workObjektLabels = [];\n\n const allObjects = this.elementRegistryService.getAllCanvasObjects();\n\n allObjects.forEach((element) => {\n const name = element.businessObject.name;\n if (\n name &&\n name.length > 0 &&\n element.type.includes(ElementTypes.ACTIVITY) &&\n !this.activityLabels.map((a) => a.name).includes(name)\n ) {\n this.activityLabels.push({\n name,\n originalName: name,\n });\n } else if (\n name &&\n name.length > 0 &&\n element.type.includes(ElementTypes.WORKOBJECT) &&\n !this.workObjektLabels.map((e) => e.name).includes(name)\n ) {\n const iconName = element.type.replace(ElementTypes.WORKOBJECT, '');\n let icon = this.iconDictionaryService.getIconSource(iconName);\n if (!icon) {\n return;\n }\n if (!icon.startsWith('data')) {\n icon = 'data:image/svg+xml,' + icon;\n }\n this.workObjektLabels.push({\n name,\n originalName: name,\n icon,\n });\n }\n });\n this.activityLabels.sort((a, b) => {\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\n });\n this.workObjektLabels.sort((a, b) => {\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\n });\n }\n\n getActivityLabels(): LabelEntry[] {\n return this.activityLabels.slice();\n }\n\n getWorkObjectLabels(): WorkObjectLabelEntry[] {\n return this.workObjektLabels.slice();\n }\n\n getUniqueWorkObjectNames(): String[] {\n const workObjects = this.elementRegistryService.getAllWorkobjects();\n return [\n ...new Set(\n workObjects\n .filter((workObject) => {\n return !!workObject.businessObject.name;\n })\n .map((workObject) => workObject.businessObject.name),\n ),\n ];\n }\n\n massRenameLabels(\n activityNames: string[],\n originalActivityNames: string[],\n workObjectNames: string[],\n originalWorkObjectNames: string[],\n ): void {\n for (let i = 0; i < originalActivityNames.length; i++) {\n if (!activityNames[i]) {\n activityNames[i] = '';\n }\n if (!(activityNames[i] == originalActivityNames[i])) {\n this.massNamingService.massChangeNames(\n originalActivityNames[i],\n activityNames[i],\n ElementTypes.ACTIVITY,\n );\n }\n }\n for (let i = 0; i < originalWorkObjectNames.length; i++) {\n if (!workObjectNames[i]) {\n workObjectNames[i] = '';\n }\n if (!(workObjectNames[i] == originalWorkObjectNames[i])) {\n this.massNamingService.massChangeNames(\n originalWorkObjectNames[i],\n workObjectNames[i],\n ElementTypes.WORKOBJECT,\n );\n }\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/domain/services/element-registry.service';\nimport { CanvasObject } from 'src/app/domain/entities/canvasObject';\nimport { ElementTypes } from '../../../domain/entities/elementTypes';\nimport { CommandStackService } from '../../../domain/services/command-stack.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MassNamingService {\n constructor(\n private elementRegistryService: ElementRegistryService,\n private commandStackService: CommandStackService,\n ) {}\n\n massChangeNames(\n oldValue: string,\n newValue: string,\n type: ElementTypes,\n ): void {\n const allRelevantObjects: CanvasObject[] = [];\n\n this.elementRegistryService.getAllCanvasObjects().forEach((element) => {\n if (\n element.type.includes(type) &&\n element.businessObject.name === oldValue\n ) {\n allRelevantObjects.push(element);\n }\n });\n\n const context = {\n elements: allRelevantObjects,\n newValue,\n };\n\n this.commandStackService.execute('domainStoryObjects.massRename', context);\n }\n}\n","import { FormControl, FormGroup, Validators } from '@angular/forms';\n\nexport interface ActivityDialogForm {\n activityLabel: FormControl;\n activityNumber: FormControl;\n multipleNumbers: FormControl;\n}\n\nexport namespace ActivityDialogForm {\n export function create(\n activityLabel: string,\n activityNumber: number | null,\n numberIsAllowedMultipleTimes: boolean,\n ): FormGroup {\n return new FormGroup({\n activityLabel: new FormControl(activityLabel, {\n nonNullable: true,\n }),\n activityNumber: new FormControl(activityNumber, [\n Validators.required,\n ]),\n multipleNumbers: new FormControl(numberIsAllowedMultipleTimes, {\n nonNullable: true,\n }),\n });\n }\n}\n","import { ActivityCanvasObject } from '../../../domain/entities/activityCanvasObject';\n\nexport class ActivityDialogData {\n activity: ActivityCanvasObject;\n numberIsAllowedMultipleTimes: boolean;\n showNumberFields: boolean;\n\n saveFN: any;\n\n constructor(\n activity: ActivityCanvasObject,\n numberIsAllowedMultipleTimes: boolean,\n showNumberFields: boolean,\n saveFN: any,\n ) {\n this.activity = activity;\n this.numberIsAllowedMultipleTimes = numberIsAllowedMultipleTimes;\n this.showNumberFields = showNumberFields;\n this.saveFN = saveFN;\n }\n}\n","import { Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { FormGroup } from '@angular/forms';\nimport { ActivityDialogData } from 'src/app/tools/modeler/domain/activityDialogData';\nimport { ActivityCanvasObject } from '../../../../domain/entities/activityCanvasObject';\nimport { ActivityDialogForm } from '../../domain/activity-dialog-form';\n\n@Component({\n selector: 'app-activity-dialog',\n templateUrl: './activity-dialog.component.html',\n styleUrls: ['./activity-dialog.component.scss'],\n})\nexport class ActivityDialogComponent {\n form: FormGroup;\n activityLabel: string;\n activityNumber: number | null;\n numberIsAllowedMultipleTimes: boolean;\n showNumberFields: boolean;\n activity: ActivityCanvasObject;\n\n saveFN: any;\n\n constructor(\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: ActivityDialogData,\n ) {\n this.activity = data.activity;\n this.activityLabel = data.activity.businessObject.name;\n this.numberIsAllowedMultipleTimes = data.numberIsAllowedMultipleTimes;\n this.activityNumber = data.activity.businessObject.number ?? null;\n this.showNumberFields = data.showNumberFields;\n\n this.saveFN = data.saveFN;\n\n this.form = ActivityDialogForm.create(\n this.activityLabel,\n this.activityNumber,\n this.numberIsAllowedMultipleTimes,\n );\n\n this.form.controls.activityNumber.valueChanges.subscribe(\n (activityNumber) => {\n if (activityNumber !== null) {\n if (activityNumber < 1) {\n this.form.controls.activityNumber.setValue(1);\n }\n }\n },\n );\n }\n\n onSubmit(): void {\n this.numberIsAllowedMultipleTimes = !this.numberIsAllowedMultipleTimes;\n this.form.patchValue({\n multipleNumbers: this.numberIsAllowedMultipleTimes,\n });\n }\n\n save(): void {\n this.saveFN({\n activity: this.activity,\n ...this.form.value,\n });\n this.dialogRef.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n preventDefault(event: Event) {\n event.preventDefault();\n }\n}\n","\n

Edit Activity

\n
\n
\n \n Number\n \n \n \n multiple\n
\n \n Label\n \n \n
\n
\n\n\n \n \n\n","import { NgModule } from '@angular/core';\nimport { ActivityDialogComponent } from './activity-dialog/activity-dialog.component';\nimport { ModelerComponent } from './modeler/modeler.component';\nimport { CommonModule } from '@angular/common';\nimport { MaterialModule } from '../../../material.module';\nimport { ReactiveFormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [ActivityDialogComponent, ModelerComponent],\n exports: [ActivityDialogComponent, ModelerComponent],\n imports: [CommonModule, MaterialModule, ReactiveFormsModule],\n})\nexport class ModelerModule {}\n","import { Component, OnInit } from '@angular/core';\nimport { ModelerService } from '../../services/modeler.service';\n\n@Component({\n selector: 'app-modeler',\n templateUrl: './modeler.component.html',\n styleUrls: ['./modeler.component.scss'],\n})\nexport class ModelerComponent implements OnInit {\n constructor(private modelerService: ModelerService) {}\n\n ngOnInit(): void {\n this.modelerService.postInit();\n }\n}\n","
\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from '../../../domain/services/element-registry.service';\nimport { ElementTypes } from '../../../domain/entities/elementTypes';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { ActivityDialogData } from '../domain/activityDialogData';\nimport { ActivityDialogComponent } from '../presentation/activity-dialog/activity-dialog.component';\nimport { DialogService } from '../../../domain/services/dialog.service';\nimport { TitleService } from '../../title/services/title.service';\nimport { ActivityCanvasObject } from '../../../domain/entities/activityCanvasObject';\nimport { positionsMatch } from '../../../utils/mathExtensions';\nimport { CommandStackService } from '../../../domain/services/command-stack.service';\n\nimport { toggleStashUse } from '../bpmn/modeler/labeling/dsLabelEditingProvider';\nimport {\n getMultipleNumberRegistry,\n getNumberRegistry,\n setNumberIsMultiple,\n updateExistingNumbersAtEditing,\n} from '../bpmn/modeler/numbering/numbering';\nimport activityUpdateHandler from '../bpmn/modeler/updateHandler/activityUpdateHandlers';\n\nimport massRenameHandler from '../bpmn/modeler/updateHandler/massRenameHandler';\nimport elementUpdateHandler from '../bpmn/modeler/updateHandler/elementUpdateHandler';\nimport headlineAndDescriptionUpdateHandler from '../bpmn/modeler/updateHandler/headlineAndDescriptionUpdateHandler';\nimport { ReplayService } from '../../replay/services/replay.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class InitializerService {\n constructor(\n private elementRegistryService: ElementRegistryService,\n private replayService: ReplayService,\n private dialogService: DialogService,\n private commandStackService: CommandStackService,\n private titleService: TitleService,\n ) {}\n\n propagateDomainStoryModelerClassesToServices(\n commandStack: any,\n elementRegistry: any,\n canvas: any,\n selection: any,\n modeler: any,\n ): void {\n this.commandStackService.setCommandStack(commandStack);\n this.elementRegistryService.setElementRegistry(elementRegistry);\n }\n\n initializeDomainStoryModelerEventHandlers(\n commandStack: any,\n eventBus: any,\n ): void {\n activityUpdateHandler(commandStack, eventBus);\n massRenameHandler(commandStack, eventBus);\n elementUpdateHandler(commandStack, eventBus);\n headlineAndDescriptionUpdateHandler(commandStack, this.titleService);\n }\n\n initiateEventBusListeners(eventBus: any, commandStack: any): void {\n eventBus.on('element.dblclick', (e: any) => {\n if (!this.replayService.getReplayOn()) {\n const element = e.element;\n if (element.type === ElementTypes.ACTIVITY) {\n // override the doubleClickListener on activities\n this.activityDoubleClick(element, eventBus, commandStack);\n } else {\n const renderedNumberRegistry = getNumberRegistry();\n\n // add a DoubleClickListener to the number on activities\n if (renderedNumberRegistry.length > 1) {\n const allActivities =\n this.elementRegistryService.getActivitiesFromActors();\n\n if (allActivities.length > 0) {\n const htmlCanvas = document.getElementById('canvas');\n if (htmlCanvas) {\n const container =\n htmlCanvas.getElementsByClassName('djs-container');\n const svgElements = container[0].getElementsByTagName('svg');\n const outerSVGElement = svgElements[0];\n const viewport =\n outerSVGElement.getElementsByClassName('viewport')[0];\n let transform = viewport.getAttribute('transform');\n\n let transformX = 0;\n let transformY = 0;\n let zoomX = 1;\n let zoomY = 1;\n let nums;\n\n const clickX = e.originalEvent.offsetX;\n const clickY = e.originalEvent.offsetY;\n\n // adjust for zoom and panning\n if (transform) {\n transform = transform.replace('matrix(', '');\n transform.replace(')', '');\n nums = transform.split(',');\n zoomX = parseFloat(nums[0]);\n zoomY = parseFloat(nums[3]);\n transformX = parseInt(nums[4], undefined);\n transformY = parseInt(nums[5], undefined);\n }\n\n const width = 25 * zoomX;\n const height = 22 * zoomY;\n\n for (let i = 1; i < renderedNumberRegistry.length; i++) {\n const currentNum = renderedNumberRegistry[i];\n if (currentNum) {\n const tspan = currentNum.getElementsByTagName('tspan')[0];\n const tx = tspan.getAttribute('x');\n const ty = tspan.getAttribute('y');\n const tNumber = parseInt(tspan.innerHTML, undefined);\n\n const elementX = Math.floor(\n tx * zoomX + (transformX - 11 * zoomX),\n );\n const elementY = Math.floor(\n ty * zoomY + (transformY - 15 * zoomY),\n );\n\n allActivities.forEach((activity: ActivityCanvasObject) => {\n const activityNumber = activity.businessObject.number;\n if (activityNumber === tNumber) {\n if (\n positionsMatch(\n width,\n height,\n elementX,\n elementY,\n clickX,\n clickY,\n )\n ) {\n this.activityDoubleClick(\n activity,\n eventBus,\n commandStack,\n );\n }\n }\n });\n }\n }\n }\n }\n }\n }\n }\n });\n\n // when in replay, do not allow any interaction on the canvas\n eventBus.on(\n [\n 'element.click',\n 'element.dblclick',\n 'element.mousedown',\n 'drag.init',\n 'canvas.viewbox.changing',\n 'autoPlace',\n 'popupMenu.open',\n ],\n 10000000000,\n (event: any) => {\n if (this.replayService.getReplayOn()) {\n event.stopPropagation();\n event.preventDefault();\n }\n },\n );\n\n let pasteColor: string[] = [];\n let pasteText: string[] = [];\n let pasteHeight: number[] = [];\n eventBus.on('copyPaste.pasteElement', 10000, (e: any) => {\n pasteColor.push(e.descriptor.oldBusinessObject.pickedColor);\n if (\n e.descriptor.oldBusinessObject.type.includes(\n ElementTypes.TEXTANNOTATION,\n )\n ) {\n pasteText.push(e.descriptor.oldBusinessObject.text ?? '');\n pasteHeight.push(e.descriptor.oldBusinessObject.height);\n }\n });\n\n eventBus.on('create.end', (e: any) => {\n if (!pasteColor) {\n return;\n }\n for (let elementsKey in e.elements) {\n const element = e.elements[elementsKey];\n if (element.businessObject.type.includes(ElementTypes.TEXTANNOTATION)) {\n element.businessObject.text = pasteText[0];\n element.businessObject.number = pasteHeight[0];\n element.businessObject.height = pasteHeight[0];\n pasteText.shift();\n pasteHeight.shift();\n }\n element.businessObject.pickedColor = pasteColor[parseInt(elementsKey)];\n eventBus.fire('element.changed', { element });\n }\n pasteColor = [];\n pasteText = [];\n pasteHeight = [];\n });\n }\n\n /** Overrrides for Canvas Functions **/\n private activityDoubleClick(\n activity: ActivityCanvasObject,\n eventBus: any,\n commandStack: any,\n ): void {\n const source = activity.source;\n\n // ensure the right number when changing the direction of an activity\n toggleStashUse(false);\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n if (\n activity.businessObject.number &&\n source &&\n source.type.includes(ElementTypes.ACTOR)\n ) {\n config.data = new ActivityDialogData(\n activity,\n getMultipleNumberRegistry()[activity.businessObject.number],\n true,\n (data: any) =>\n this.saveActivityInputLabel(data, eventBus, commandStack),\n );\n } else if (source && source.type.includes(ElementTypes.WORKOBJECT)) {\n config.data = new ActivityDialogData(\n activity,\n false,\n false,\n (activityData: any) =>\n this.saveActivityInputLabel(activityData, eventBus, commandStack),\n );\n }\n this.dialogService.openDialog(ActivityDialogComponent, config);\n }\n\n private saveActivityInputLabel(\n activityData: any,\n eventBus: any,\n commandStack: any,\n ): void {\n const label = activityData.activityLabel;\n const hasNumber = activityData.activityNumber ?? false;\n const activityNumber = activityData.activityNumber;\n const multipleNumberAllowed = activityData.multipleNumbers ?? false;\n const element = activityData.activity;\n\n const activitiesFromActors =\n this.elementRegistryService.getActivitiesFromActors();\n const index = activitiesFromActors.indexOf(element);\n\n activitiesFromActors.splice(index, 1);\n if (hasNumber) {\n setNumberIsMultiple(activityNumber, multipleNumberAllowed);\n }\n element.businessObject.multipleNumberAllowed = multipleNumberAllowed;\n\n let options: any;\n if (hasNumber) {\n options = {\n businessObject: element.businessObject,\n newLabel: label,\n newNumber: activityNumber,\n element,\n };\n } else {\n options = {\n businessObject: element.businessObject,\n newLabel: label,\n element,\n };\n }\n\n commandStack.execute('activity.changed', options);\n if (element.businessObject.multipleNumberAllowed !== false) {\n if (getMultipleNumberRegistry()[activityNumber] === false) {\n updateExistingNumbersAtEditing(\n activitiesFromActors,\n activityNumber,\n eventBus,\n );\n }\n } else if (element.businessObject.multipleNumberAllowed === false) {\n updateExistingNumbersAtEditing(\n activitiesFromActors,\n activityNumber,\n eventBus,\n );\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { assign } from 'min-dash';\nimport DomainStoryModeler from 'src/app/tools/modeler/bpmn';\nimport { InitializerService } from './initializer.service';\nimport { ElementRegistryService } from '../../../domain/services/element-registry.service';\nimport { IconDictionaryService } from '../../icon-set-config/services/icon-dictionary.service';\nimport { IconSetConfigurationService } from '../../icon-set-config/services/icon-set-configuration.service';\nimport { BusinessObject } from '../../../domain/entities/businessObject';\nimport { ActivityBusinessObject } from '../../../domain/entities/activityBusinessObject';\nimport { updateMultipleNumberRegistry } from '../bpmn/modeler/numbering/numbering';\nimport { IconSetConfiguration } from '../../../domain/entities/icon-set-configuration';\nimport { StorageService } from '../../../domain/services/storage.service';\nimport {\n SNACKBAR_DURATION_LONGER,\n SNACKBAR_INFO,\n VERSION_KEY,\n} from '../../../domain/entities/constants';\nimport { environment } from '../../../../environments/environment';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ModelerService {\n constructor(\n private initializerService: InitializerService,\n private elementRegistryService: ElementRegistryService,\n private iconDictionaryService: IconDictionaryService,\n private iconSetConfigurationService: IconSetConfigurationService,\n private storageService: StorageService,\n private snackbar: MatSnackBar,\n ) {}\n\n private modeler: any;\n private canvas: any;\n private elementRegistry: any;\n private commandStack: any;\n private selection: any;\n private eventBus: any;\n\n private encoded: string | undefined;\n\n postInit(): void {\n this.checkCurrentVersion();\n\n const storedIconSetConfiguration =\n this.iconSetConfigurationService.getStoredIconSetConfiguration();\n if (storedIconSetConfiguration) {\n this.iconDictionaryService.setCustomConfiguration(\n storedIconSetConfiguration,\n );\n this.iconSetConfigurationService.loadConfiguration(\n storedIconSetConfiguration,\n );\n }\n this.modeler = new DomainStoryModeler({\n container: '#canvas',\n keyboard: {\n bindTo: document,\n },\n\n // Disable BPMN-SearchModule and re-enable browser Search\n additionalModules: [\n {\n bpmnSearch: ['value', 'foo'],\n },\n ],\n });\n\n if (this.modeler.get) {\n this.canvas = this.modeler.get('canvas');\n this.elementRegistry = this.modeler.get('elementRegistry');\n this.eventBus = this.modeler.get('eventBus');\n this.commandStack = this.modeler.get('commandStack');\n this.selection = this.modeler.get('selection');\n }\n\n this.initializerService.initializeDomainStoryModelerEventHandlers(\n this.commandStack,\n this.eventBus,\n );\n this.initializerService.propagateDomainStoryModelerClassesToServices(\n this.commandStack,\n this.elementRegistry,\n this.canvas,\n this.selection,\n this.modeler,\n );\n\n const exportArtifacts = this.debounce(this.saveSVG, 500);\n if (this.modeler.get) {\n this.modeler.on('commandStack.changed', exportArtifacts);\n }\n\n this.initializerService.initiateEventBusListeners(\n this.eventBus,\n this.commandStack,\n );\n\n this.modeler.createDiagram();\n // expose bpmnjs to window for debugging purposes\n assign(window, { bpmnjs: this.modeler });\n\n this.startDebounce();\n }\n\n private checkCurrentVersion() {\n const version = this.storageService.get(VERSION_KEY);\n if (version === null) {\n this.storageService.set(VERSION_KEY, environment.version);\n }\n\n if (version !== null && version !== environment.version) {\n this.snackbar\n .open(\n \"Egon was updated. Clear your browser's local storage.\",\n 'More information',\n {\n duration: SNACKBAR_DURATION_LONGER,\n panelClass: SNACKBAR_INFO,\n },\n )\n .onAction()\n .subscribe(() => {\n window.open('https://egon.io/howto#launching-egon');\n });\n }\n }\n\n restart(\n iconSetConfiguration?: IconSetConfiguration,\n domainStory?: BusinessObject[],\n ): void {\n const currentStory =\n domainStory != undefined\n ? domainStory\n : this.elementRegistryService\n .createObjectListForDSTDownload()\n .map((e) => e.businessObject);\n if (!iconSetConfiguration) {\n iconSetConfiguration =\n this.iconSetConfigurationService.getStoredIconSetConfiguration();\n }\n if (iconSetConfiguration) {\n this.iconSetConfigurationService.setStoredIconSetConfiguration(\n iconSetConfiguration,\n );\n this.iconDictionaryService.setCustomConfiguration(iconSetConfiguration);\n this.iconSetConfigurationService.loadConfiguration(iconSetConfiguration);\n }\n\n this.elementRegistryService.clear();\n this.modeler?.destroy();\n this.postInit();\n updateMultipleNumberRegistry(\n currentStory\n .filter((bo) => bo.type === 'domainStory:activity')\n .map((bo) => bo)\n .filter((bo) => bo.number !== null),\n );\n if (currentStory && this.modeler.get) {\n this.modeler.importCustomElements(currentStory);\n }\n }\n\n /** Interactions with the Modeler **/\n getModeler(): any {\n return this.modeler;\n }\n\n commandStackChanged(): void {\n // to update the title of the svg, we need to tell the command stack, that a value has changed\n this.eventBus.fire(\n 'commandStack.changed',\n this.debounce(this.saveSVG, 500),\n );\n }\n\n startDebounce(): void {\n this.debounce(this.saveSVG, 500);\n }\n\n debounce(fn: any, timeout: number): any {\n return () => {\n let timer;\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(() => {\n // tslint:disable-next-line:no-unused-expression\n fn(this.modeler).then((svg: string) => {\n this.encoded = svg;\n }) as Promise;\n }, timeout);\n };\n }\n\n getEncoded(): string {\n return this.encoded ? this.encoded : '';\n }\n\n async saveSVG(modeler: any): Promise {\n try {\n const result = await modeler.saveSVG();\n return result.svg;\n } catch (err) {\n alert('There was an error saving the SVG.\\n' + err);\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ModelerService } from 'src/app/tools/modeler/services/modeler.service';\nimport { BusinessObject } from 'src/app/domain/entities/businessObject';\nimport { ElementRegistryService } from 'src/app/domain/services/element-registry.service';\nimport { DirtyFlagService } from 'src/app/domain/services/dirty-flag.service';\nimport { IconSetConfiguration } from '../../../domain/entities/icon-set-configuration';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RendererService {\n constructor(\n private modelerService: ModelerService,\n private elementRegistryService: ElementRegistryService,\n private dirtyFlagService: DirtyFlagService,\n ) {}\n\n renderStory(domainStory: BusinessObject[]): void {\n this.modelerService.getModeler().importCustomElements(domainStory);\n }\n\n reset(): void {\n this.renderStory([]);\n this.dirtyFlagService.makeClean();\n }\n\n importStory(\n domainStory: BusinessObject[],\n configurationChange: boolean,\n config?: IconSetConfiguration,\n makeClean = true,\n ): void {\n this.modelerService.restart(config, domainStory);\n this.renderStory(domainStory);\n\n this.elementRegistryService.correctInitialize();\n\n this.modelerService.commandStackChanged();\n this.modelerService.startDebounce();\n\n if (makeClean) {\n this.dirtyFlagService.makeClean();\n }\n }\n\n getStory(): BusinessObject[] {\n return this.elementRegistryService\n .createObjectListForDSTDownload()\n .map((c) => c.businessObject);\n }\n}\n","export const NUMBER_BACKGROUND_COLOR = 'white';\nexport const NUMBER_COLOR = 'black';\nexport const STROKE_WIDTH = '1.5';\n\nexport const HIGHLIGHT_NUMBER_BACKGROUNG_COLOR = '#43acbf';\nexport const HIGHLIGHT_NUMBER_COLOR = 'black';\nexport const HIGHLIGHT_STROKE_WIDTH = '4';\n","import { Injectable } from '@angular/core';\nimport { BusinessObject } from 'src/app/domain/entities/businessObject';\nimport { ElementRegistryService } from 'src/app/domain/services/element-registry.service';\nimport { ElementTypes } from 'src/app/domain/entities/elementTypes';\nimport { StorySentence } from 'src/app/tools/replay/domain/storySentence';\nimport {\n HIGHLIGHT_NUMBER_BACKGROUNG_COLOR,\n HIGHLIGHT_NUMBER_COLOR,\n HIGHLIGHT_STROKE_WIDTH,\n NUMBER_BACKGROUND_COLOR,\n NUMBER_COLOR,\n STROKE_WIDTH,\n} from '../domain/replayConstants';\n\n@Injectable({\n providedIn: 'root',\n})\n/**\n * Manipulates the DOM during replay to only show the elements of the current Sentence\n */\nexport class DomManipulationService {\n constructor(private elementRegistryService: ElementRegistryService) {}\n\n showAll(): void {\n this.removeHighlights();\n this.elementRegistryService\n .getAllCanvasObjects()\n .slice()\n .concat(this.elementRegistryService.getAllGroups().slice())\n .map((e) => e.businessObject)\n .forEach((element) => {\n const domObject = document.querySelector(\n '[data-element-id=' + element.id + ']',\n );\n // @ts-ignore\n domObject.style.display = 'block';\n });\n }\n\n showSentence(\n replaySentence: StorySentence,\n previousSentence?: StorySentence,\n ): void {\n this.removeHighlights();\n const notShown = this.getAllNotShown(replaySentence.objects);\n\n notShown.forEach((element) => {\n const domObject = document.querySelector(\n '[data-element-id=' + element.id + ']',\n );\n if (domObject) {\n // @ts-ignore\n domObject.style.display = 'none';\n }\n });\n\n this.highlightSentence(\n previousSentence\n ? replaySentence.objects.filter(\n (o) => !previousSentence.objects.includes(o),\n )\n : replaySentence.objects,\n );\n\n replaySentence.objects.forEach((element) => {\n const domObject = document.querySelector(\n '[data-element-id=' + element.id + ']',\n );\n if (domObject) {\n // @ts-ignore\n domObject.style.display = 'block';\n }\n });\n }\n\n getNumberDomForActivity(activity: SVGPolylineElement): any {\n const numberText =\n activity.parentElement?.getElementsByClassName('djs-labelNumber')[0] ??\n '';\n const circle = (numberText as HTMLElement)?.previousSibling ?? '';\n return {\n numberBackgroundDom: circle,\n numberTextDom: numberText,\n };\n }\n\n private removeHighlights(): void {\n const allActivities = this.elementRegistryService.getAllActivities();\n const allConnections = this.elementRegistryService.getAllConnections();\n\n allActivities.forEach((activity) => {\n const querySelector = document.querySelector(\n '[data-element-id=' + activity.id + ']',\n );\n if (querySelector) {\n const activityDomObject =\n querySelector.getElementsByTagName('polyline')[0];\n\n activityDomObject.style.stroke =\n activity.businessObject.pickedColor || 'black';\n activityDomObject.style.strokeWidth = STROKE_WIDTH;\n\n const { numberBackgroundDom, numberTextDom } =\n this.getNumberDomForActivity(activityDomObject);\n if (numberBackgroundDom && numberTextDom) {\n numberBackgroundDom.style.fill = NUMBER_BACKGROUND_COLOR;\n numberTextDom.style.fill = NUMBER_COLOR;\n }\n }\n });\n\n allConnections.forEach((connection) => {\n // @ts-ignore\n const connectionDomObject = document\n .querySelector('[data-element-id=' + connection.id + ']')\n .getElementsByTagName('polyline')[0];\n\n connectionDomObject.style.stroke =\n connection.businessObject.pickedColor || 'black';\n connectionDomObject.style.strokeWidth = '1.5';\n });\n }\n\n private highlightSentence(sentenceObjects: BusinessObject[]): void {\n sentenceObjects\n .filter((e) => e.type === ElementTypes.ACTIVITY)\n .forEach((activity) => {\n const querySelector = document.querySelector(\n '[data-element-id=' + activity.id + ']',\n );\n if (querySelector) {\n const activityDomObject =\n querySelector.getElementsByTagName('polyline')[0];\n\n activityDomObject.style.strokeWidth = HIGHLIGHT_STROKE_WIDTH;\n\n const { numberBackgroundDom, numberTextDom } =\n this.getNumberDomForActivity(activityDomObject);\n if (numberTextDom && numberBackgroundDom) {\n numberBackgroundDom.style.fill = HIGHLIGHT_NUMBER_BACKGROUNG_COLOR;\n numberTextDom.style.fill = HIGHLIGHT_NUMBER_COLOR;\n }\n }\n });\n }\n\n private getAllNotShown(shownElements: BusinessObject[]): BusinessObject[] {\n const notShownElements: BusinessObject[] = [];\n const allObjects = this.elementRegistryService\n .getAllCanvasObjects()\n .concat(this.elementRegistryService.getAllGroups());\n\n allObjects.forEach((element) => {\n if (!shownElements.includes(element.businessObject)) {\n notShownElements.push(element.businessObject);\n }\n });\n return notShownElements;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { DomManipulationService } from 'src/app/tools/replay/services/dom-manipulation.service';\nimport { StorySentence } from 'src/app/tools/replay/domain/storySentence';\nimport { StoryCreatorService } from './story-creator.service';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION_LONG,\n SNACKBAR_INFO,\n} from '../../../domain/entities/constants';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReplayService {\n private story: StorySentence[] = [];\n private currentSentence = new BehaviorSubject(-1);\n private maxSentenceNumber = new BehaviorSubject(0);\n private replayOnSubject = new BehaviorSubject(false);\n\n currentSentence$: Observable = this.currentSentence.asObservable();\n maxSentenceNumber$: Observable =\n this.maxSentenceNumber.asObservable();\n replayOn$ = this.replayOnSubject.asObservable();\n\n constructor(\n private domManipulationService: DomManipulationService,\n private storyCreatorService: StoryCreatorService,\n private snackbar: MatSnackBar,\n ) {}\n\n setReplayState(state: boolean): void {\n this.replayOnSubject.next(state);\n }\n\n getReplayOn(): boolean {\n return this.replayOnSubject.value;\n }\n\n isReplayable(): boolean {\n return this.storyCreatorService.traceActivitiesAndCreateStory().length > 0;\n }\n\n initializeReplay(story: StorySentence[]): void {\n this.currentSentence.next(1);\n this.story = story;\n this.maxSentenceNumber.next(this.story.length);\n }\n\n getCurrentSentenceNumber(): number {\n return this.currentSentence.value;\n }\n\n getMaxSentenceNumber(): number {\n return this.maxSentenceNumber.value;\n }\n\n nextSentence(): void {\n if (this.currentSentence.value < this.story.length) {\n this.currentSentence.next(this.currentSentence.value + 1);\n this.showCurrentSentence();\n }\n }\n\n previousSentence(): void {\n if (this.currentSentence.value > 1) {\n this.currentSentence.next(this.currentSentence.value - 1);\n this.showCurrentSentence();\n }\n }\n\n private showCurrentSentence() {\n this.domManipulationService.showSentence(\n this.story[this.currentSentence.value - 1],\n this.currentSentence.value > 1\n ? this.story[this.currentSentence.value - 2]\n : undefined,\n );\n }\n\n startReplay(checkSequenceNumbers = false): void {\n const story = this.storyCreatorService.traceActivitiesAndCreateStory();\n\n if (checkSequenceNumbers) {\n const missingSentences =\n this.storyCreatorService.getMissingSentences(story);\n if (missingSentences.length > 0) {\n const sentence = missingSentences.join(', ');\n this.snackbar.open(\n missingSentences.length === 1\n ? `The Domain Story is not complete. Sentence ${sentence} is missing.`\n : `The Domain Story is not complete. Sentences ${sentence} are missing.`,\n undefined,\n {\n duration: SNACKBAR_DURATION_LONG,\n panelClass: SNACKBAR_INFO,\n },\n );\n return;\n }\n }\n\n this.initializeReplay(story);\n if (this.story.length > 0) {\n this.setReplayState(true);\n this.domManipulationService.showSentence(\n this.story[this.currentSentence.getValue() - 1],\n );\n } else {\n this.snackbar.open('You need a Domain Story for replay.', undefined, {\n duration: SNACKBAR_DURATION_LONG,\n panelClass: SNACKBAR_INFO,\n });\n }\n }\n\n stopReplay(): void {\n this.currentSentence.next(-1);\n this.maxSentenceNumber.next(0);\n this.setReplayState(false);\n this.domManipulationService.showAll();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementTypes } from '../../../domain/entities/elementTypes';\nimport { ActivityCanvasObject } from '../../../domain/entities/activityCanvasObject';\nimport { BusinessObject } from '../../../domain/entities/businessObject';\nimport { CanvasObject } from '../../../domain/entities/canvasObject';\nimport { ElementRegistryService } from '../../../domain/services/element-registry.service';\nimport { StorySentence } from '../domain/storySentence';\nimport { Dictionary } from '../../../domain/entities/dictionary';\nimport { ActivityBusinessObject } from '../../../domain/entities/activityBusinessObject';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StoryCreatorService {\n constructor(private elementRegistryService: ElementRegistryService) {}\n\n traceActivitiesAndCreateStory(): StorySentence[] {\n const tracedActivityMap = new Dictionary();\n const story: StorySentence[] = [];\n const activities = this.elementRegistryService.getActivitiesFromActors();\n const tracedActivityMapKeys: number[] = [];\n activities.forEach((activity) => {\n const activityNumber = Number(activity.businessObject.number); // Sometimes the activityNumber is a string for some reason\n const tracedItem = tracedActivityMap.get(`${activityNumber}`) ?? [];\n if (!tracedActivityMapKeys.includes(activityNumber)) {\n tracedActivityMapKeys.push(activityNumber);\n }\n tracedItem.push(activity);\n tracedActivityMap.set(`${activityNumber}`, tracedItem);\n });\n\n let storyIndex = 0;\n tracedActivityMapKeys.forEach((key) => {\n this.createSentence(tracedActivityMap, key, story, storyIndex);\n storyIndex++;\n });\n\n this.addGroupsToLastSentence(story);\n return story;\n }\n\n private createSentence(\n tracedActivityMap: Dictionary,\n tracedActivityMapKey: number,\n story: StorySentence[],\n storyIndex: number,\n ): void {\n let tracedActivity = tracedActivityMap.get(`${tracedActivityMapKey}`) ?? [];\n const sentenceObjects = this.getSentenceObjects(tracedActivity);\n const highlightedElements = sentenceObjects.map((t) => t.id);\n if (storyIndex > 0) {\n story[storyIndex - 1].objects.forEach((object) => {\n if (!sentenceObjects.includes(object)) {\n sentenceObjects.push(object);\n }\n });\n }\n story[storyIndex] = {\n highlightedObjects: highlightedElements,\n objects: sentenceObjects,\n };\n }\n\n getMissingSentences(story: StorySentence[]): number[] {\n // if the story is empty, no sequence number is missing\n if (!story || story.length === 0) {\n return [];\n }\n\n // collect all sequence numbers of the story\n const allActivityNumbersFromActors: number[] = story.map((sentence) => {\n // find all activity numbers of the ActivityBusinessObject\n // and returned the highest one\n const allActivityNumbers = sentence.objects.map((businessObject) => {\n if (businessObject.type.includes('activity')) {\n const activity = businessObject as ActivityBusinessObject;\n return activity.number ?? 0;\n } else {\n return 0;\n }\n });\n return Math.max(...allActivityNumbers);\n });\n\n const highestSequenceNumber: number = Math.max(\n ...allActivityNumbersFromActors,\n );\n\n const missingSentences: number[] = [];\n // with a high sequence number like 1_000_000, this could be led\n // to long calculation or completely stop from Egon.io\n for (let i = 1; i <= highestSequenceNumber; i++) {\n if (!allActivityNumbersFromActors.includes(i)) {\n missingSentences.push(i);\n }\n }\n return missingSentences;\n }\n\n private getSentenceObjects(\n tracedActivity: ActivityCanvasObject[],\n ): BusinessObject[] {\n const initialSource: CanvasObject[] = [];\n const activities = tracedActivity;\n const targetObjects: CanvasObject[] = [];\n const actorTextAnnotations: CanvasObject[] = [];\n\n tracedActivity.forEach((parallelSentence: ActivityCanvasObject) => {\n initialSource.push(parallelSentence.source);\n\n const firstTarget = parallelSentence.target;\n targetObjects.push(firstTarget);\n\n // check the outgoing activities for each target\n for (const checkTarget of targetObjects) {\n if (\n checkTarget.businessObject &&\n !checkTarget.businessObject.type.includes('actor') &&\n checkTarget.outgoing\n ) {\n // check the target for each outgoing activity\n checkTarget.outgoing.forEach((activity: ActivityCanvasObject) => {\n activities.push(activity);\n const activityTarget = activity.target;\n if (activityTarget && !targetObjects.includes(activityTarget)) {\n targetObjects.push(activityTarget);\n }\n });\n }\n }\n });\n initialSource.forEach((actor) =>\n this.addTextAnnotationsForActorOrGroup(actor, actorTextAnnotations),\n );\n targetObjects.forEach((target) => {\n if (target.businessObject.type.includes(ElementTypes.ACTOR)) {\n this.addTextAnnotationsForActorOrGroup(target, actorTextAnnotations);\n }\n });\n\n return initialSource\n .map((e) => e.businessObject)\n .concat(activities.map((a) => a.businessObject))\n .concat(targetObjects.map((t) => t.businessObject))\n .concat(actorTextAnnotations.map((ta) => ta.businessObject));\n }\n\n private addTextAnnotationsForActorOrGroup(\n object: CanvasObject,\n objectTextAnnotations: CanvasObject[],\n ) {\n object.outgoing?.forEach((connection) => {\n // connections outgoing from actors or groups without number must be connections to text annotations\n if (!connection.businessObject.number) {\n objectTextAnnotations.push(connection);\n objectTextAnnotations.push(connection.target);\n }\n });\n }\n\n private addGroupsToLastSentence(story: StorySentence[]): void {\n const groups = this.elementRegistryService.getAllGroups() as CanvasObject[];\n const annotationsForGroups: CanvasObject[] = [];\n groups.forEach((group) =>\n this.addTextAnnotationsForActorOrGroup(group, annotationsForGroups),\n );\n if (groups.length > 0 && story.length > 0) {\n story[story.length - 1].objects = story[story.length - 1].objects\n .concat(groups.map((g) => g.businessObject))\n .concat(annotationsForGroups.map((a) => a.businessObject));\n }\n }\n}\n","import { FormControl, FormGroup } from '@angular/forms';\n\nexport interface TitleDialogForm {\n title: FormControl;\n description: FormControl;\n}\n\nexport namespace TitleDialogForm {\n export function create(\n titel: string,\n description: string,\n ): FormGroup {\n return new FormGroup({\n title: new FormControl(titel),\n description: new FormControl(description),\n });\n }\n}\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { FormGroup } from '@angular/forms';\nimport { TitleService } from 'src/app/tools/title/services/title.service';\nimport { TitleDialogForm } from '../../domain/title-dialog-form';\nimport { DirtyFlagService } from '../../../../domain/services/dirty-flag.service';\n\n@Component({\n selector: 'app-header-dialog',\n templateUrl: './title-dialog.component.html',\n styleUrls: ['./title-dialog.component.scss'],\n})\nexport class TitleDialogComponent implements OnInit {\n form!: FormGroup;\n\n constructor(\n private dialogRef: MatDialogRef,\n private titleService: TitleService,\n private dirtyFlagService: DirtyFlagService,\n ) {}\n\n ngOnInit(): void {\n const title = this.titleService.getTitle();\n const description = this.titleService.getDescription();\n\n this.form = TitleDialogForm.create(title, description);\n }\n\n save(): void {\n if (this.form.dirty) {\n this.dirtyFlagService.makeDirty();\n\n this.titleService.updateTitleAndDescription(\n this.form.getRawValue().title,\n this.form.getRawValue().description,\n true,\n );\n }\n this.dialogRef.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n preventDefault(event: Event) {\n event.preventDefault();\n }\n}\n","\n
\n \n Title\n \n \n
\n \n Description\n \n \n
\n
\n\n\n \n \n\n","import { NgModule } from '@angular/core';\nimport { TitleDialogComponent } from './title-dialog/title-dialog.component';\nimport { CommonModule } from '@angular/common';\nimport { MaterialModule } from '../../../material.module';\nimport { ReactiveFormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [TitleDialogComponent],\n exports: [TitleDialogComponent],\n imports: [CommonModule, MaterialModule, ReactiveFormsModule],\n})\nexport class TitleModule {}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { environment } from '../../../../environments/environment';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_ICON_SET_NAME,\n INITIAL_TITLE,\n} from '../../../domain/entities/constants';\nimport { CommandStackService } from '../../../domain/services/command-stack.service';\nimport { DialogService } from '../../../domain/services/dialog.service';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { TitleDialogComponent } from '../presentation/title-dialog/title-dialog.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TitleService {\n private titleSubject = new BehaviorSubject(INITIAL_TITLE);\n private descriptionSubject = new BehaviorSubject(INITIAL_DESCRIPTION);\n private iconSetNameSubject = new BehaviorSubject(\n INITIAL_ICON_SET_NAME,\n );\n private showDescriptionSubject = new BehaviorSubject(true);\n\n title$ = this.titleSubject.asObservable();\n description$ = this.descriptionSubject.asObservable();\n showDescription$ = this.showDescriptionSubject.asObservable();\n iconSetName$ = this.iconSetNameSubject.asObservable();\n\n constructor(\n private commandStackService: CommandStackService,\n private dialogService: DialogService,\n ) {}\n\n openHeaderDialog(): void {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n this.dialogService.openDialog(TitleDialogComponent, config);\n }\n\n updateTitleAndDescription(\n title: string | null,\n description: string | null,\n allowUndo: boolean,\n ): void {\n if (allowUndo) {\n this.fireTitleAndDescriptionUpdate(title, description);\n } else {\n this.updateTitle(title);\n this.updateDescription(description);\n }\n }\n\n reset(): void {\n this.updateTitleAndDescription(INITIAL_TITLE, INITIAL_DESCRIPTION, false);\n }\n\n private updateTitle(inputTitle: string | null): void {\n const title =\n !inputTitle || inputTitle.trim().length === 0\n ? INITIAL_TITLE\n : inputTitle;\n\n this.titleSubject.next(title);\n document.title = title === INITIAL_TITLE ? 'egon.io' : title;\n }\n\n private updateDescription(description: string | null): void {\n this.descriptionSubject.next(description ?? this.descriptionSubject.value);\n }\n\n setShowDescription(show: boolean): void {\n this.showDescriptionSubject.next(show);\n }\n\n setIconSetName(name: string): void {\n this.iconSetNameSubject.next(name);\n }\n\n getTitle(): string {\n return this.titleSubject.value;\n }\n\n getDescription(): string {\n return this.descriptionSubject.value;\n }\n\n getIconSetName(): string {\n return this.iconSetNameSubject.value;\n }\n\n getVersion(): string {\n return environment.version;\n }\n\n hasTitleOrDescription(): boolean {\n return (\n (this.getTitle().trim().length > 0 &&\n this.getTitle() !== INITIAL_TITLE) ||\n (this.getDescription().trim().length > 0 &&\n this.getDescription() !== INITIAL_DESCRIPTION)\n );\n }\n\n private fireTitleAndDescriptionUpdate(\n newTitle: string | null,\n newDescription: string | null,\n ): void {\n const context = {\n newTitle,\n newDescription,\n };\n this.commandStackService.execute(\n 'story.updateHeadlineAndDescription',\n context,\n );\n }\n}\n","export function rgbaToHex(rgba: string) {\n const [r, g, b, a] = rgba.match(/\\d+(\\.\\d+)?/g)!.map((it) => +it);\n const red = r.toString(16).padStart(2, '0');\n const green = g.toString(16).padStart(2, '0');\n const blue = b.toString(16).padStart(2, '0');\n const alpha = Math.round(a * 255)\n .toString(16)\n .padStart(2, '0');\n return `#${red}${green}${blue}${alpha}`;\n}\n\nconst isValidHex = (hex: string) => /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);\nconst getChunksFromString = (st: string, chunkSize: number) =>\n st.match(new RegExp(`.{${chunkSize}}`, 'g')) ?? [];\nconst convertHexUnitTo256 = (hexStr: string) =>\n parseInt(hexStr.repeat(2 / hexStr.length), 16);\nconst getAlphafloat = (a: number | undefined) => {\n if (typeof a !== 'undefined') {\n return Math.round((a / 255 + Number.EPSILON) * 100) / 100; // Runden auf 2 oder weniger Nachkommastellen\n }\n return 1;\n};\n\nexport const isHexWithAlpha = (hex: string | null | undefined) =>\n hex?.startsWith('#') && (hex?.length === 5 || hex?.length === 9);\n\nexport const hexToRGBA = (hex: string) => {\n if (!isValidHex(hex)) {\n throw new Error('Invalid HEX');\n }\n const chunkSize = Math.floor((hex.length - 1) / 3); // 1 falls hex 3-4 Stellen, 2 falls hex 6 oder 8 Stellen\n const hexArr = getChunksFromString(hex.slice(1), chunkSize);\n const [r, g, b, a] = hexArr.map(convertHexUnitTo256);\n return `rgba(${r},${g},${b},${getAlphafloat(a)})`;\n};\n","'use strict';\n\n// convert rad to deg\nexport function degrees(radians: number): number {\n return (radians * 180) / Math.PI;\n}\n\n// calculate the angle between two points in 2D\nexport function angleBetween(\n startPoint: Point,\n endPoint: Point,\n): number | undefined {\n let quadrant;\n\n // determine in which quadrant we are\n if (startPoint.x <= endPoint.x) {\n if (startPoint.y >= endPoint.y) {\n quadrant = 0;\n } // upper right quadrant\n else {\n quadrant = 3;\n } // lower right quadrant\n } else {\n if (startPoint.y >= endPoint.y) {\n quadrant = 1;\n } // upper left Quadrant\n else {\n quadrant = 2;\n } // lower left quadrant\n }\n\n const adjacent = Math.abs(startPoint.y - endPoint.y);\n const opposite = Math.abs(startPoint.x - endPoint.x);\n\n // since the arcus-tangens only gives values between 0 and 90, we have to adjust for the quadrant we are in\n\n if (quadrant === 0) {\n return 90 - degrees(Math.atan2(opposite, adjacent));\n }\n if (quadrant === 1) {\n return 90 + degrees(Math.atan2(opposite, adjacent));\n }\n if (quadrant === 2) {\n return 270 - degrees(Math.atan2(opposite, adjacent));\n }\n if (quadrant === 3) {\n return 270 + degrees(Math.atan2(opposite, adjacent));\n }\n return undefined;\n}\n\nexport function positionsMatch(\n width: number,\n height: number,\n elementX: number,\n elementY: number,\n clickX: number,\n clickY: number,\n): boolean {\n if (clickX > elementX && clickX < elementX + width) {\n if (clickY > elementY && clickY < elementY + height) {\n return true;\n }\n }\n return false;\n}\n\nexport class Point {\n y = 0;\n x = 0;\n}\n","'use strict';\n\n// sanitize user-Input to be Desktop-Filename safe\nexport function sanitizeForDesktop(str: string): string {\n const map: { [key: string]: string } = {\n '/': '',\n '\\\\': '',\n ':': '',\n '*': '',\n '?': '',\n '\"': '',\n '<': '',\n '>': '',\n '|': '',\n };\n const reg = /[/\\\\:*?\"<>|]/gi;\n return str ? str.replace(reg, (match) => map[match]) : '';\n}\n\nexport function sanitizeIconName(name: string): string {\n if (!name) {\n return '';\n }\n let nameWithoutFileEnding =\n name.lastIndexOf('.') > 0 ? name.substring(0, name.lastIndexOf('.')) : name;\n const map: { [key: string]: string } = {\n '/': '',\n '\\\\': '',\n ':': '',\n '*': '',\n '?': '',\n '\"': '',\n '<': '',\n '>': '',\n '|': '',\n '(': '',\n ')': '',\n ' ': '-',\n };\n const reg = /[/\\\\:*?\"<>|() ]/gi;\n return nameWithoutFileEnding.trim().replace(reg, (match) => map[match]);\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\n\n@Component({\n selector: 'app-header-buttons',\n templateUrl: './header-buttons.component.html',\n styleUrls: ['./header-buttons.component.scss'],\n})\nexport class HeaderButtonsComponent {\n @Input()\n hasDomainStory = false;\n @Input()\n hasTitle = false;\n @Input()\n isReplaying: boolean | null = false;\n @Input()\n isDirty: boolean | null = false;\n @Input()\n isReplayable = false;\n\n @Output()\n import = new EventEmitter();\n @Output()\n openSettings = new EventEmitter();\n @Output()\n startReplay = new EventEmitter();\n @Output()\n stopReplay = new EventEmitter();\n @Output()\n previousSentence = new EventEmitter();\n @Output()\n nextSentence = new EventEmitter();\n @Output()\n newStory = new EventEmitter();\n @Output()\n showKeyboardShortCuts = new EventEmitter();\n @Output()\n openLabelDictionary = new EventEmitter();\n @Output()\n openDownloadDialog = new EventEmitter();\n @Output()\n openUploadUrlDialog = new EventEmitter();\n}\n","@if (!isReplaying) {\n
\n \n play_arrow \n \n\n \n unarchive \n \n\n \n cloud_upload \n \n\n \n \n @if (!isDirty) {\n \n archive\n \n }\n @if (isDirty) {\n archive \n }\n \n \n \n spellcheck\n \n \n \n \n keyboard \n \n \n note_add \n \n
\n}\n@if (isReplaying) {\n
\n \n skip_previous \n \n \n skip_next \n \n \n stop \n \n
\n}\n","import { Component } from '@angular/core';\nimport { combineLatest, map, Observable } from 'rxjs';\nimport { TitleService } from '../../../../tools/title/services/title.service';\nimport { ReplayService } from '../../../../tools/replay/services/replay.service';\nimport { ImportDomainStoryService } from '../../../../tools/import/services/import-domain-story.service';\nimport { SettingsService } from '../../../services/settings/settings.service';\nimport { RendererService } from '../../../../tools/modeler/services/renderer.service';\nimport { DirtyFlagService } from '../../../../domain/services/dirty-flag.service';\nimport { DialogService } from '../../../../domain/services/dialog.service';\nimport { ExportService } from '../../../../tools/export/services/export.service';\nimport { LabelDictionaryService } from '../../../../tools/label-dictionary/services/label-dictionary.service';\n\n@Component({\n selector: 'app-header',\n templateUrl: './header.component.html',\n styleUrls: ['./header.component.scss'],\n})\nexport class HeaderComponent {\n title$ = this.titleService.title$;\n description$ = this.titleService.description$;\n showDescription$ = this.titleService.showDescription$;\n\n isReplay$: Observable;\n isDirty$: Observable;\n sentenceDescription$: Observable;\n showDescription: Observable;\n\n constructor(\n private titleService: TitleService,\n private replayService: ReplayService,\n private importService: ImportDomainStoryService,\n private settingsService: SettingsService,\n private renderService: RendererService,\n private dirtyFlagService: DirtyFlagService,\n private dialogService: DialogService,\n private exportService: ExportService,\n private labelDictionaryService: LabelDictionaryService,\n ) {\n this.isReplay$ = this.replayService.replayOn$;\n this.isDirty$ = this.dirtyFlagService.dirty$;\n\n this.sentenceDescription$ = combineLatest([\n this.replayService.currentSentence$,\n this.replayService.maxSentenceNumber$,\n ]).pipe(map(([sentence, count]) => `${sentence}/${count}`));\n\n this.showDescription = this.titleService.showDescription$;\n }\n\n openHeaderDialog(): void {\n this.titleService.openHeaderDialog();\n }\n\n openSettings(): void {\n this.settingsService.open();\n }\n\n setShowDescription(show: boolean): void {\n this.titleService.setShowDescription(show);\n }\n\n createNewDomainStory(): void {\n this.titleService.reset();\n this.renderService.reset();\n }\n\n onImport(): void {\n this.importService.performImport();\n }\n\n startReplay(): void {\n this.replayService.startReplay(true);\n }\n\n stopReplay(): void {\n this.replayService.stopReplay();\n }\n\n previousSentence(): void {\n this.replayService.previousSentence();\n }\n\n nextSentence(): void {\n this.replayService.nextSentence();\n }\n\n openKeyboardShortcutsDialog(): void {\n this.dialogService.openKeyboardShortcutsDialog();\n }\n\n openLabelDictionary(): void {\n this.labelDictionaryService.openLabelDictionary();\n }\n\n openDownloadDialog(): void {\n this.exportService.openDownloadDialog();\n }\n\n openUploadUrlDialog(): void {\n this.importService.openUploadUrlDialog();\n }\n\n get hasDomainStory() {\n return this.exportService.isDomainStoryExportable();\n }\n\n get hasTitle(): boolean {\n return this.titleService.hasTitleOrDescription();\n }\n\n get isReplayable() {\n return this.replayService.isReplayable();\n }\n}\n","\n \n @if (showDescription | async) {\n \n \n expand_less\n \n \n }\n @if (!(showDescription | async)) {\n \n \n expand_more\n \n }\n
\n \n {{ title$ | async }}\n edit \n \n
\n\n \n\n @if (isReplay$ | async) {\n \n Sentence: {{ sentenceDescription$ | async }}\n }\n\n \n \n
\n
\n@if (showDescription$ | async) {\n \n {{ description$ | async }}\n \n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-general-settings',\n templateUrl: './general-settings.component.html',\n styleUrls: ['./general-settings.component.scss'],\n})\nexport class GeneralSettingsComponent {}\n","
\n \n
\n","import { Component } from '@angular/core';\nimport { SettingsService } from 'src/app/workbench/services/settings/settings.service';\nimport { ModelerService } from 'src/app/tools/modeler/services/modeler.service';\nimport { BehaviorSubject } from 'rxjs';\nimport { IconSetCustomizationService } from '../../../tools/icon-set-config/services/icon-set-customization.service';\nimport { IconSetConfiguration } from '../../../domain/entities/icon-set-configuration';\n\n@Component({\n selector: 'app-settings',\n templateUrl: './settings.component.html',\n styleUrls: ['./settings.component.scss'],\n})\nexport class SettingsComponent {\n iconSetConfiguration: IconSetConfiguration | undefined;\n showGeneralSettings = new BehaviorSubject(false);\n showIconSetCustomization = new BehaviorSubject(true);\n\n constructor(\n private settingsService: SettingsService,\n private modelerService: ModelerService,\n private iconSetCustomizationService: IconSetCustomizationService,\n ) {}\n\n close(): void {\n const savedConfiguration =\n this.iconSetCustomizationService.getAndClearSavedConfiguration();\n if (savedConfiguration) {\n this.modelerService.restart(savedConfiguration);\n }\n this.settingsService.close();\n }\n\n openGeneralSettings() {\n this.showGeneralSettings.next(true);\n this.showIconSetCustomization.next(false);\n }\n\n openIconSetCustomization() {\n this.showGeneralSettings.next(false);\n this.showIconSetCustomization.next(true);\n }\n}\n","
\n \n \n \n
\n \n Customize Icons for Your Domain\n \n \n General Settings\n \n
\n
\n
\n\n @if (showGeneralSettings | async) {\n \n }\n @if (showIconSetCustomization | async) {\n \n }\n
\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MaterialModule } from '../../material.module';\nimport { HeaderComponent } from './header/header/header.component';\nimport { HeaderButtonsComponent } from './header/header-buttons/header-buttons.component';\nimport { GeneralSettingsComponent } from './settings/general/general-settings.component';\nimport { SettingsComponent } from './settings/settings.component';\nimport { IconSetConfigModule } from '../../tools/icon-set-config/presentation/icon-set-config.module';\nimport { AutosaveModule } from '../../tools/autosave/presentation/autosave.module';\n\n@NgModule({\n declarations: [\n HeaderComponent,\n HeaderButtonsComponent,\n GeneralSettingsComponent,\n SettingsComponent,\n ],\n exports: [\n HeaderComponent,\n HeaderButtonsComponent,\n GeneralSettingsComponent,\n SettingsComponent,\n ],\n imports: [\n CommonModule,\n FormsModule,\n MaterialModule,\n IconSetConfigModule,\n AutosaveModule,\n ],\n})\nexport class WorkbenchModule {}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SettingsService {\n private showSettings = new BehaviorSubject(false);\n showSettings$ = this.showSettings.asObservable();\n\n close(): void {\n this.showSettings.next(false);\n }\n\n open(): void {\n this.showSettings.next(true);\n }\n}\n","// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build --configuration production` replaces `environment.ts` with `environment.prod.ts`.\n// The list of file replacements can be found in `angular.json`.\n\nexport const environment = {\n production: false,\n version: '2.1.0-dev',\n};\n\n/*\n * For easier debugging in development mode, you can import the following file\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\n *\n * This import should be commented out in production mode because it will have a negative impact\n * on performance if an error is thrown.\n */\n// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.\n","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic()\n .bootstrapModule(AppModule)\n .catch((err) => console.error(err));\n"],"names":["SVG_LINK","TEXTSPAN_DESCRIPTION_HEIGHT","TEXTSPAN_TITLE_HEIGHT","X_OFFSET_UTIL","dynamicHeightOffset","createTitleAndDescriptionSVGElement","initDynamicHeightOffset","title","description","min_x","min_y","width","replace","titleElement","createTitle","descriptionElement","createDescription","insertText","text","tempCanvas","document","createElement","ctx","getContext","font","createTextSpans","descriptionParts","split","i","length","yOffset","heightOffset","fontSize","textSpans","words","removeLeadingEmptyStrings","textTag","textSpan","createElementNS","textNode","createTextNode","setAttribute","appendChild","j","firstChild","data","len","measureText","slice","outerHTML","stringArray","firstNonEmptyIndex","findIndex","string","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","y","height","name","replaceShape","replaceOptions","ReplaceMenuProvider","_dsReplace","$inject","getEntries","entries","includes","ACTOR","actorReplaceOptions","WORKOBJECT","workObjectReplaceOptions","_createEntries","menuEntries","self","definition","entry","_createMenuEntry","action","replaceAction","label","className","actionName","iconDictionaryService","initializeReplaceOptions","iconDictionary","actorTypes","getTypeDictionary","replaceOption","keysArray","actorType","typeName","toLowerCase","getIconForBPMN","workObjectTypes","workObjectType","ContextPadProvider","bind","generateAutomaticNumber","getAllStandardIconKeys","hexToRGBA","isHexWithAlpha","rgbaToHex","dirtyFlagService","initializeContextPadProvider","dirtyFlag","DomainStoryContextPadProvider","injector","connect","translate","contextPad","popupMenu","replaceMenuProvider","commandStack","eventBus","startConnect","selectedElement","invoke","cached","getContextPadEntries","addEventListener","event","executeCommandStack","registerProvider","pickedColor","dispatchEvent","CustomEvent","detail","color","allStandardIconKeys","actions","autoActivate","start","addColorChange","addConnectWithActivity","addTextAnnotation","addActors","appendAction","addWorkObjects","addChangeWorkObjectTypeMenu","addChangeActorTypeMenu","delete","deleteGroup","group","click","removeGroup","makeDirty","moveDeleteActionToEndOfArray","removeElements","TEXTANNOTATION","changeDirection","position","getReplaceMenuPosition","cursor","open","colorChange","dragstart","icon","context","newNumber","execute","Y_OFFSET","diagramContainer","getContainer","pad","getPad","html","diagramRect","getBoundingClientRect","padRect","top","left","appendStart","shape","createShape","hints","getSelectedBusinessObject","oldColor","newColor","selectedBusinessObject","BpmnElementFactory","DEFAULT_LABEL_SIZE","DomainStoryIdFactory","DomainStoryElementFactory","bpmnFactory","moddle","domainStoryIdFactory","elementType","attrs","baseCreate","test","registerId","getId","key","set","value","$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","isCustomIcon","isCustomSvgIcon","RENDERER_IDS","numbers","DEFAULT_COLOR","_iconDictionaryService","_elementRegistryService","_dirtyFlagService","initializeRenderer","elementRegistryService","DomainStoryRenderer","styles","textRenderer","pathMap","rendererId","next","markers","computeStyle","generateActivityNumber","parentGfx","box","numberStash","semantic","use","number","newRenderedNumber","renderNumber","numberStyle","fitBox","style","getExternalStyle","fill","backgroundBoxStyle","fontFamily","backgroundDotStyle","renderEmbeddedLabel","align","padding","renderLabel","renderExternalLabel","waypoints","lines","startPoint","selected","endPoint","angle","alignment","boxWidth","xStart","abs","textAlign","wordWrap","overflowWrap","hyphens","renderExternalNumber","String","createText","add","setCoordinates","circle","radius","d","stroke","innerHTML","manipulateInnerHTMLXLabel","manipulateInnerHTMLYLabel","attributes","nodeValue","offset","result","Number","drawGroup","rect","drawRect","applyColorToCustomSvgIcon","iconSvg","rest","base64Svg","svg","atob","coloredSvg","applyColorToIcon","encodedColoredSvg","btoa","match","some","it","replaceAll","index","indexOf","substring","getIconSvg","dataURL","drawActor","svgDynamicSizeAttributes","iconSRC","getTypeIconSRC","getIconId","actor","drawWorkObject","workObject","useColorForActivity","strokeWidth","strokeLinejoin","markerEnd","marker","drawActivity","p","adjustForTextOverlap","fixConnectionInHTML","parentElement","checkIfPointOverlapsText","point","lineOffset","getLineOffset","objects","getElementsByClassName","data_id","item","getAttribute","object","getElementsByTagName","tspans","tspan","wantedConnection","polylines","drawDSConnection","strokeDasharray","drawAnnotation","textElement","textPathData","getScaledPath","xScaleFactor","yScaleFactor","containerWidth","containerHeight","mx","my","drawPath","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","startsWith","search","pos","correctInitialize","getShapePath","drawConnection","every","reduce","RuleProvider","is","HIGH_PRIORITY","MIN_SIZE","isDomainStory","isDomainStoryGroup","isActor","isWorkObject","isActivity","isAnnotation","canConnect","canResize","newBounds","lowerLeft","lowerRight","upperRight","canAttach","Array","canConnectToAnnotation","DomainStoryRules","init","canCreate","addRule","host","s","undefined","hover","pick","CommandInterceptor","collectionAdd","remove","collectionRemove","reworkGroupElements","DomainStoryUpdater","bpmnjs","updateCustomElement","e","DOMAINSTORY","updateCustomConnection","newTarget","newSource","copyWaypoints","executed","ifDomainStoryElement","reverted","fn","DomainStoryPalette","ElementFactory","CreateModule","PathMap","PopupMenuModule","ContextPadModule","CommandStack","UpdateLabelHandler","headlineAndDescriptionUpdateHandler","DSModeling","__depends__","__init__","domainStoryRenderer","paletteProvider","domainStoryRules","domainStoryUpdater","contextPadProvider","elementFactoryBpmn","updateLabelHandler","svgRemove","MARKER_HIDDEN","MARKER_LABEL_HIDDEN","DSLabelEditingPreview","defaultLayer","getDefaultLayer","absoluteElementBBox","gfx","on","activeProvider","active","getAbsoluteBBox","getStrokeColor","labelTarget","dy","newElementHeight","max","removeMarker","autocomplete","getLabel","dictionaryService","stashUse","initializeLabelEditingProvider","labelingDictionary","toggleStashUse","focusElement","setTimeout","focus","DSLabelEditingProvider","directEditing","resizeHandles","_canvas","_textRenderer","_updateLabelHandler","activateDirectEdit","complete","isActive","cancel","removeResizers","createAutocomplete","canExecute","isTouch","editingBox","force","activate","getUniqueWorkObjectNames","bounds","getEditingBBox","resizable","autoResize","bbox","zoom","defaultStyle","getDefaultStyle","defaultFontSize","defaultLineHeight","lineHeight","fontWeight","minWidth","maxWidth","minHeight","paddingTop","paddingBottom","paddingLeft","paddingRight","update","newLabel","activeContextText","updateLabel","getLabelAttr","getNumberAttr","getNumber","setLabel","setNumber","textNumber","selectPartOfActivity","angleActivity","selectedActivity","linelength","fontsize","input","workObjectNames","closeAllLists","currentFocus","filteredWorkObjectNames","autocompleteList","autocompleteItem","val","parentNode","toUpperCase","visibility","onkeydown","getElementById","keyCode","addActive","preventDefault","removeActive","classList","survivor","removeChild","ChangeSupportModule","DirectEditingModule","dSlabelEditingProvider","dSlabelEditingPreview","str","amountWaypoints","determinedPosition","xPos","yPos","labelPositionX","labelPositionY","offsetX","scaledAngle","offsetY","Modeling","_commandStack","updateNumber","oldShape","newShape","newData","numberRegistry","multipleNumberRegistry","canvasElementRegistry","initializeNumbering","canvasElementRegistryService","updateMultipleNumberRegistry","activityBusinessObjects","activity","multipleNumberAllowed","boxHeight","fixedOffsetX","fixedOffsetY","angleDependantOffsetX","angleDependantOffsetY","elementActivity","usedNumbers","wantedNumber","activitiesFromActors","getActivitiesFromActors","updateExistingNumbersAtGeneration","updateExistingNumbersAtEditing","sortedActivities","oldMultipleNumberRegistry","currentNumber","setNumberOfActivity","getNumbersAndIDs","iDWithNumber","activities","renderedNumber","setNumberIsMultiple","multi","getNumberRegistry","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","splice","undoGroupRework","elementUpdateHandler","element_colorChange","removeGroupWithoutChildren","child","titleService","handlerFunction","oldTitle","getTitle","oldDescription","getDescription","updateTitleAndDescription","newTitle","newDescription","DSMassRenameHandler","massRename","relevantElements","confirm","newValue","getExternalLabelMid","isLabelExternal","hasExternalLabel","isLabel","getBusinessObject","NULL_DIMENSIONS","labelCenter","createLabel","setText","postExecute","trim","removeShape","bo","getLayoutedBounds","resizeShape","numberTarget","innerShape","superParent","svgShape","querySelector","svgGroup","svgGroupParent","BehaviorSubject","environment","ColorPickerDirective","BLACK","BLUE","CYAN","DARK_PINK","GREEN","GREY","LIGHT_PINK","LIME","ORANGE","PURPLE","RED","SNACKBAR_DURATION_LONG","SNACKBAR_INFO","YELLOW","i0","ɵɵelement","AppComponent","constructor","settingsService","exportService","autosaveService","cd","snackbar","replayService","modelerService","version","skipNextColorUpdate","colorBox","showSettings$","showDescription$","ctrlKey","stopPropagation","isDomainStoryExportable","downloadDST","getReplayOn","nextSentence","previousSentence","colorPicker","closeDialog","customEvent","openDialog","duration","panelClass","ngOnInit","postInit","onColorChanged","ngAfterViewInit","loadLatestDraft","detectChanges","_","ɵɵdirectiveInject","i1","SettingsService","i2","TitleService","i3","ExportService","i4","AutosaveService","ChangeDetectorRef","i5","MatSnackBar","i6","ReplayService","i7","ModelerService","_2","selectors","viewQuery","AppComponent_Query","rf","ɵɵelementStart","ɵɵtwoWayListener","AppComponent_Template_input_colorPickerChange_1_listener","$event","ɵɵtwoWayBindingSet","ɵɵlistener","AppComponent_Template_input_colorPickerClose_1_listener","ɵɵelementEnd","ɵɵtemplate","AppComponent_Conditional_2_Template","ɵɵtext","ɵɵadvance","ɵɵstyleProp","ɵɵproperty","ɵɵtwoWayProperty","ɵɵconditional","ɵɵpipeBind1","ɵɵclassProp","ɵɵtextInterpolate","APP_INITIALIZER","BrowserModule","MAT_CHECKBOX_DEFAULT_OPTIONS","NoopAnimationsModule","ImportDomainStoryService","LabelDictionaryService","ElementRegistryService","IconSetConfigurationService","UntypedFormBuilder","IconDictionaryService","MaterialModule","ColorPickerModule","DirtyFlagService","IconSetChangedService","WorkbenchModule","DomainModule","AutosaveModule","ExportModule","IconSetConfigModule","ImportModule","LabelDictionaryModule","ModelerModule","TitleModule","DragDirective","AppModule","ngDoBootstrap","app","componentElement","body","bootstrap","ɵɵinject","_3","provide","useValue","clickAction","useFactory","initialize","deps","useExisting","imports","declarations","labelDictionaryService","Configuration","INITIAL_TITLE","INITIAL_DESCRIPTION","INITIAL_ICON_SET_NAME","ICON_SET_CONFIGURATION_TAG","VERSION_KEY","DEFAULT_AUTOSAVES_ENABLED","DEFAULT_AUTOSAVES_MAX_DRAFTS","DEFAULT_AUTOSAVES_INTERVAL","SNACKBAR_DURATION","SNACKBAR_DURATION_LONGER","SNACKBAR_SUCCESS","SNACKBAR_ERROR","IMPLICIT_ROOT_ID","all","size","isEmpty","Entry","addEach","clear","filter","found","InfoDialogData","infoText","isInfo","isLink","linkText","InfoDialogComponent","CommonModule","exports","MAT_DIALOG_DATA","ɵɵtextInterpolate1","ctx_r0","ɵɵpropertyInterpolate","ɵɵsanitizeUrl","InfoDialogComponent_Conditional_5_Template_button_click_1_listener","ɵɵrestoreView","_r2","ɵɵnextContext","ɵɵresetView","close","dialogRef","showConfirmButton","hasLink","span","scrollHeight","MatDialogRef","decls","vars","consts","template","InfoDialogComponent_Template","InfoDialogComponent_Conditional_3_Template","InfoDialogComponent_Conditional_4_Template","InfoDialogComponent_Conditional_5_Template","CommandStackService","setCommandStack","payload","factory","ɵfac","providedIn","MatDialogConfig","DialogService","matDialog","dialog","openKeyboardShortcutsDialog","shortCutText","disableClose","autoFocus","MatDialog","isDirtySubject","dirty$","asObservable","makeClean","dirty","fullyInitialized","registry","__implicitroot","setElementRegistry","_elements","createObjectListForDSTDownload","allObjectsFromCanvas","getAllCanvasObjects","getAllGroups","objectList","fillListOfCanvasObjects","canvasElement","unshift","getAllActivities","getAllConnections","allObjects","groupObjects","checkChildForGroup","currentGroup","pop","registryElementNames","sort","activityCanvasA","activityCanvasB","activityNumberA","activityNumberB","getUsedIcons","getAllActors","workobjects","getAllWorkobjects","a","w","co","StorageService","setItem","stringify","json","MatDialogModule","MatFormFieldModule","MatInputModule","MatToolbarModule","MatExpansionModule","MatCardModule","MatSnackBarModule","MatButtonModule","MatGridListModule","MatButtonToggleModule","MatListModule","MatCheckboxModule","AutosaveOptionsComponent_Conditional_0_Template_button_click_20_listener","_r1","activated_r2","ɵɵreference","interval_r3","drafts_r4","ctx_r4","save","checked","configuration_r6","activated","interval","maxDrafts","AutosaveOptionsComponent","autosaveConfiguration","setConfiguration","AutosaveConfigurationService","AutosaveOptionsComponent_Template","AutosaveOptionsComponent_Conditional_0_Template","tmp_0_0","configuration$","AutosaveSettingsComponent","AutosaveSettingsComponent_Template","AutosavedDraftsComponent_Conditional_7_For_2_Template_button_click_6_listener","draft_r3","$implicit","ctx_r3","loadDraft","date","ɵɵrepeaterCreate","AutosavedDraftsComponent_Conditional_7_For_2_Template","ɵɵrepeaterTrackByIdentity","AutosavedDraftsComponent_Conditional_7_Template_button_click_5_listener","removeAllDrafts","ɵɵrepeater","drafts","AutosavedDraftsComponent","subscription","autosavedDraftsChanged$","subscribe","initDrafts","loadCurrentDrafts","draft","AutosavedDraftsComponent_Template","AutosavedDraftsComponent_Conditional_7_Template","AutosavedDraftsComponent_Conditional_8_Template","ɵɵtextInterpolate2","FormsModule","ReplaySubject","AUTOSAVE_CONFIGURATION_TAG","defaultConfiguration","storageService","configurationSubject","initializeConfiguration","loadConfiguration","saveConfiguration","Subject","DRAFTS_TAG","rendererService","iconSetConfigurationService","updateConfiguration","readDrafts","sortDrafts","configFromFile","configAndDST","domain","createIconSetConfiguration","story","dst","actorIcons","getElementsOfType","workObjectIcons","updateIconRegistries","importStory","stopTimer","startTimer","autosaveTimer","clearInterval","setInterval","savedDrafts","newDraft","createDraft","isChanged","isSame","isDraftEmpty","writeDrafts","b","getStory","createConfigAndDST","Date","toString","aDate","bDate","RendererService","i8","ExportDialogData","ExportOption","tooltip","ConfigAndDST","testConfigAndDst","DEFAULT_PADDING","ExportDialogComponent_For_18_Template_button_click_0_listener","i_r2","$index","ctx_r2","doOption","option_r4","ExportDialogComponent","withTitle","useWhiteBackground","updateWithTitle","updateUseWhiteBackground","ExportDialogComponent_Template","ExportDialogComponent_Template_input_change_4_listener","ExportDialogComponent_Template_input_change_9_listener","ExportDialogComponent_Template_button_click_15_listener","ExportDialogComponent_For_18_Template","sanitizeForDesktop","formatDate","pngService","svgService","htmlPresentationService","dialogService","titleSubscription","title$","descriptionSubscription","description$","ngOnDestroy","unsubscribe","DomainStory","getCurrentConfigurationForExport","getStoryForDownload","filename","getCurrentDateString","downloadFile","datatype","fileEnding","encodeURIComponent","display","downloadSVG","svgData","createSVGData","downloadPNG","container","svgElements","outerSVGElement","viewport","layerBase","image","extractSVG","prepareSVG","onload","getWidth","getHeight","fillStyle","drawImage","png64","toDataURL","ele","onchange","downloadHTMLPresentation","modeler","then","info","openDownloadDialog","SVGDownloadOption","EGNDownloadOption","PNGDownloadOption","HTMLDownloadOption","getModeler","PngService","SvgService","HtmlPresentationService","i9","i10","doT","storyCreatorService","viewBoxCoordinates","ViewBoxCoordinate","_this","_asyncToGenerator","startReplay","saveSVG","fixActivityMarkersForEachSentence","getCurrentSentenceNumber","content","transition","err","alert","getMaxSentenceNumber","stopReplay","revealjsTemplate","dots","revealjsData","script","sentences","multiplexSecret","multiplexId","fixMalformedHtmlScript","structuredClone","viewBoxIndex","xLeft","yUp","splitViewBox","dataStart","dataEnd","createBounds","sectionIndex","newDefs","ids","idToReplace","newId","StoryCreatorService","browserSpecs","ua","navigator","userAgent","tem","M","exec","appName","appVersion","URIHashtagFix","fix","browser","parseInt","findMostOuterElements","xRight","yDown","sub","elXLeft","elXRight","elYUp","elYDown","transform","nums","rects","outerRect","calculateWidthAndHeight","insertIndex","join","extraHeight","layerResizers","layerOverlays","removeAttribute","XMLSerializer","serializeToString","cacheData","getEncoded","domainStorySvg","viewBoxWidth","viewBoxHeight","findIndexToInsertData","svgIndex","backgroundColorWhite","appendDST","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","Accessible","Assignment","Battery","Book","Bug","Code","Crop","DVR","Extension","Face","Fastfood","Fingerprint","Hand","Help","Image","Lightbulb","Lock","Loyalty","Portrait","Rocket","Satellite","Share","Slideshow","Star","Sun","Table","Videocam","Wysiwyg","allIconsDict","newIcons","updateAppendedIcons","IconConfiguration","allIconDictionary","domainName","getDefaultConf","defaultConf","updateAllIconRegistry","appendSRCFile","actorsDict","workObjectsDict","newAppendedIcons","appen","createCustomConf","iconSetConfiguration","IconFilterEnum","DetailsListItemComponent","iconInitiated","ngAfterViewChecked","createIcon","img","inputs","DetailsListItemComponent_Template","IconListItemComponent","iconName","iconSetCustomizationService","isWorkobject","isNone","getIconForName","toggleNone","setAsUnassigned","toggleActor","setAsActor","toggleWorkobject","setAsWorkobject","IconSetCustomizationService","IconListItemComponent_Template","IconListItemComponent_Template_mat_button_toggle_change_7_listener","IconListItemComponent_Template_mat_button_toggle_change_10_listener","IconListItemComponent_Template_mat_button_toggle_change_13_listener","IconSetConfigurationComponent","IconSetDetailsComponent","ICON_PREFIX","sanitizeIconName","iconName_r1","ICON_FILTER_NONE","selectedActors","selectedWorkobjects","allIconNames","allFilteredIconNames","iconSetConfigurationTypes","getIconSetConfiguration","getFullDictionary","sortByName","selectedActors$","selectedWorkobjects$","allFiltered","getFilteredNamesForType","localeCompare","loadMinimalIconConfigurationWithDefaultIcons","resetIconSet","loadInitialConfiguration","saveIconSet","exportIconSet","startIconUpload","importIcon","files","iconInputFile","reader","FileReader","onloadend","addIMGToIconDictionary","registerIconForBPMN","addNewIcon","readAsDataURL","startIconSetImport","importIconSet","iconSetInputFile","importConfiguration","readAsText","filterForActors","ICON_FILTER_ACTOR","filterForWorkobjects","ICON_FILTER_WORKOBJECT","filterForUnassigned","ICON_FILTER_UNASSIGNED","filterByNameAndType","filteredByNameAndType","isIconActor","isIconWorkObject","IconSetConfigurationComponent_Template","IconSetConfigurationComponent_Template_button_click_6_listener","IconSetConfigurationComponent_Template_button_click_10_listener","IconSetConfigurationComponent_Template_button_click_14_listener","IconSetConfigurationComponent_Template_input_input_18_listener","IconSetConfigurationComponent_Template_button_click_20_listener","IconSetConfigurationComponent_Template_input_change_23_listener","IconSetConfigurationComponent_Template_button_click_24_listener","IconSetConfigurationComponent_Template_button_click_27_listener","IconSetConfigurationComponent_Template_button_click_31_listener","IconSetConfigurationComponent_Template_button_click_35_listener","IconSetConfigurationComponent_Template_input_change_38_listener","IconSetConfigurationComponent_Template_button_click_39_listener","IconSetConfigurationComponent_For_44_Template","IconSetDetailsComponent_For_12_Template_mat_list_item_dragover_0_listener","ctx_r1","allowDrop","IconSetDetailsComponent_For_12_Template_mat_list_item_dragstart_0_listener","i_r3","onDragStart","IconSetDetailsComponent_For_12_Template_mat_list_item_drop_0_listener","iconName_r5","onDrop","IconSetDetailsComponent_For_19_Template_mat_list_item_dragover_0_listener","_r6","IconSetDetailsComponent_For_19_Template_mat_list_item_dragstart_0_listener","i_r7","IconSetDetailsComponent_For_19_Template_mat_list_item_drop_0_listener","ctx_r7","iconName_r9","customizationService","draggedList","draggedIndex","iconSetName","iconSetName$","changeName","listName","list","sortedList","setSelectedActors","setSelectedWorkObject","IconSetDetailsComponent_Template","IconSetDetailsComponent_Template_input_input_5_listener","IconSetDetailsComponent_For_12_Template","IconSetDetailsComponent_For_19_Template","actorIconDictionary","workObjectDictionary","iconDictionaryForBPMN","iconConfig","allTypes","initDictionary","dictionary","customConfiguration","allInTypeDictionary","collection","allIn","addIconsFromIconSetConfiguration","dictionaryType","iconTypes","registerIconForType","addIconsToTypeDictionary","unregisterIconForType","extractCustomIconsFromDictionary","addNewIconsToDictionary","elementDictionary","sanitizedName","custom","addIconsToCss","fullDictionary","appendedDict","getTypeDictionaryKeys","getIconSource","elementOfType","getAllIconDictionary","getActorsDictionary","getWorkObjectsDictionary","getIconConfiguration","setCustomConfiguration","setIconSetName","exportConfiguration","configJSONString","getIconSetName","customConfig","updateIconSetName","actorDict","workObjectDict","actorKeys","workObjectKeys","configurationName","getCurrentConfiguration","createConfigFromDictionaries","currentConfiguration","getCurrentConfigurationNamesWithoutPrefix","createMinimalConfigurationWithDefaultIcons","minimalConfig","createConfigFromCanvas","actorNames","workobjectNames","newActors","newWorkobjects","fileConfiguration","getStoredIconSetConfiguration","iconSetString","configurationFromFile","checkValidityOfConfiguration","setStoredIconSetConfiguration","configForStorage","allCanvasObjects","iconSetChangedService","allIconListItems","configurationHasChanged","addIconToAllIconList","iconConfigrationChanged","storedIconSetConfiguration","usedIcons","selectedActorNames","selectActor","deselectActor","selectedWorkobjectNames","selectWorkObject","deselectWorkobject","changedIconSet","updateIcon","workobject","updateActorSubject","updateWorkObjectSubject","defaultConfig","workObjectName","actorName","updateAllIconBehaviourSubjects","resetToInitialConfiguration","imported","changedActors","changedWorkobjects","configurationActors","configurationWorkobjects","changedIconSetConfiguration","updateIcons","getAndClearSavedConfiguration","temp","iconDict","getSrcForIcon","iconBehaviourSubject","customIconSetConfiguration","rawSrc","importDomainStoryService","background","onDragOver","evt","onDragLeave","dataTransfer","performDropImport","hostVars","hostBindings","DragDirective_HostBindings","DragDirective_dragover_HostBindingHandler","DragDirective_dragleave_HostBindingHandler","DragDirective_drop_HostBindingHandler","ImportDialogComponent","fileUrl","doImport","updateUrl","ImportDialogComponent_Template","ImportDialogComponent_Template_input_input_4_listener","ImportDialogComponent_Template_button_click_9_listener","ImportDialogComponent_Template_button_click_11_listener","EventEmitter","importRepairService","importedConfiguration","importedConfigurationEmitter","getConfiguration","performImport","file","dstSvgPattern","egnSvgPattern","endsWith","importDST","importEGN","commandStackChanged","importFromUrl","fetch","response","blob","catch","openUploadUrlDialog","isSVG","fileReader","titleText","restoreTitleFromFileName","fileReaderFunction","isEGN","dstText","removeXMLComments","dstAndConfig","extractDstAndConfig","removeWhitespacesFromIcons","configChanged","checkConfigForChanges","lastElement","importVersionNumber","handleVersionNumber","checkForUnreferencedElementsInActivitiesAndRepair","showBrokenImportDialog","adjustPositions","versionPrefix","lastIndexOf","updateCustomElementsPreviousV050","showPreviousV050Dialog","xmlText","newActorKeys","newWorkObjectKeys","currentActorKeys","currentWorkobjectKeys","changed","clearName","setImportedConfigurationAndEmit","message","emit","domainStoryRegex","svgRegex","egnSuffix","dstSuffix","svgSuffix","filenameWithoutDateSuffix","ImportRepairService","objectIDs","activityIndex","isFirst","findFirstElement","adjustElementPosition","LabelDictionaryDialogComponent","LabelDictionaryDialogComponent_Template","LabelDictionaryDialogComponent_Template_app_label_dictionary_closeEmitter_3_listener","LabelDictionaryComponent","MatDialogContent","LabelDictionaryComponent_For_6_Template_input_change_2_listener","workobjectEntry_r2","updateWorkobjectEntry","LabelDictionaryComponent_For_13_Template_textarea_change_2_listener","activityEntry_r5","_r4","updateActivityEntry","LabelDictionaryComponent_For_13_Template_textarea_keydown_enter_2_listener","LabelDictionaryComponent_For_13_Template_textarea_keyup_enter_2_listener","LabelDictionaryComponent_For_13_Template_textarea_keyup_escape_2_listener","closeEmitter","createLabelDictionaries","workObjectEntries","getWorkObjectLabels","activityEntries","getActivityLabels","workobjectEntriesSubject","activityEntriesSubject","activityNames","originalActivityNames","originalWorkObjectNames","originalName","massRenameLabels","activityEntry","workobjectEntry","outputs","LabelDictionaryComponent_Template","LabelDictionaryComponent_For_6_Template","LabelDictionaryComponent_For_13_Template","LabelDictionaryComponent_Template_button_click_16_listener","LabelDictionaryComponent_Template_button_click_18_listener","massNamingService","activityLabels","workObjektLabels","openLabelDictionary","isActivityWithLabel","isWorkObjectWithLabel","hasAtLeastOneLabel","Set","massChangeNames","MassNamingService","commandStackService","oldValue","allRelevantObjects","FormControl","FormGroup","Validators","ActivityDialogForm","activityLabel","activityNumber","numberIsAllowedMultipleTimes","nonNullable","required","multipleNumbers","ActivityDialogData","showNumberFields","saveFN","ActivityDialogComponent","form","controls","valueChanges","setValue","onSubmit","patchValue","ActivityDialogComponent_Template","ActivityDialogComponent_Template_input_change_9_listener","ActivityDialogComponent_Template_textarea_keydown_enter_14_listener","ActivityDialogComponent_Template_textarea_keyup_enter_14_listener","ActivityDialogComponent_Template_textarea_keyup_escape_14_listener","ActivityDialogComponent_Template_button_click_16_listener","ActivityDialogComponent_Template_button_click_18_listener","ModelerComponent","ReactiveFormsModule","ModelerComponent_Template","positionsMatch","massRenameHandler","InitializerService","propagateDomainStoryModelerClassesToServices","selection","initializeDomainStoryModelerEventHandlers","initiateEventBusListeners","activityDoubleClick","renderedNumberRegistry","allActivities","htmlCanvas","transformX","transformY","zoomX","zoomY","clickX","originalEvent","clickY","parseFloat","currentNum","tx","ty","tNumber","elementX","elementY","pasteColor","pasteText","pasteHeight","descriptor","oldBusinessObject","elementsKey","shift","saveActivityInputLabel","activityData","hasNumber","initializerService","checkCurrentVersion","keyboard","bindTo","additionalModules","bpmnSearch","exportArtifacts","debounce","window","startDebounce","onAction","restart","domainStory","currentStory","destroy","timeout","timer","clearTimeout","encoded","renderStory","reset","configurationChange","c","NUMBER_BACKGROUND_COLOR","NUMBER_COLOR","STROKE_WIDTH","HIGHLIGHT_NUMBER_BACKGROUNG_COLOR","HIGHLIGHT_NUMBER_COLOR","HIGHLIGHT_STROKE_WIDTH","DomManipulationService","showAll","removeHighlights","domObject","showSentence","replaySentence","notShown","getAllNotShown","highlightSentence","o","getNumberDomForActivity","numberText","previousSibling","numberBackgroundDom","numberTextDom","allConnections","activityDomObject","connectionDomObject","sentenceObjects","shownElements","notShownElements","domManipulationService","currentSentence","maxSentenceNumber","replayOnSubject","currentSentence$","maxSentenceNumber$","replayOn$","setReplayState","state","isReplayable","traceActivitiesAndCreateStory","initializeReplay","showCurrentSentence","checkSequenceNumbers","missingSentences","getMissingSentences","sentence","getValue","tracedActivityMap","tracedActivityMapKeys","tracedItem","storyIndex","createSentence","addGroupsToLastSentence","tracedActivityMapKey","tracedActivity","getSentenceObjects","highlightedElements","t","highlightedObjects","allActivityNumbersFromActors","allActivityNumbers","highestSequenceNumber","initialSource","targetObjects","actorTextAnnotations","parallelSentence","firstTarget","checkTarget","activityTarget","addTextAnnotationsForActorOrGroup","ta","objectTextAnnotations","annotationsForGroups","g","TitleDialogForm","titel","TitleDialogComponent","getRawValue","TitleDialogComponent_Template","TitleDialogComponent_Template_textarea_keydown_enter_10_listener","TitleDialogComponent_Template_textarea_keyup_enter_10_listener","TitleDialogComponent_Template_textarea_keyup_escape_10_listener","TitleDialogComponent_Template_button_click_12_listener","TitleDialogComponent_Template_button_click_14_listener","titleSubject","descriptionSubject","iconSetNameSubject","showDescriptionSubject","openHeaderDialog","allowUndo","fireTitleAndDescriptionUpdate","updateTitle","updateDescription","inputTitle","setShowDescription","show","getVersion","hasTitleOrDescription","rgba","red","padStart","green","blue","alpha","round","isValidHex","hex","getChunksFromString","st","chunkSize","RegExp","convertHexUnitTo256","hexStr","repeat","getAlphafloat","EPSILON","hexArr","degrees","radians","PI","quadrant","adjacent","opposite","atan2","Point","reg","nameWithoutFileEnding","HeaderButtonsComponent_Conditional_0_Template_button_click_1_listener","HeaderButtonsComponent_Conditional_0_Template_button_click_7_listener","HeaderButtonsComponent_Conditional_0_Template_input_change_10_listener","import","HeaderButtonsComponent_Conditional_0_Template_button_click_11_listener","HeaderButtonsComponent_Conditional_0_Conditional_12_Template","HeaderButtonsComponent_Conditional_0_Conditional_13_Template","HeaderButtonsComponent_Conditional_0_Template_button_click_14_listener","HeaderButtonsComponent_Conditional_0_Template_button_click_17_listener","openSettings","HeaderButtonsComponent_Conditional_0_Template_button_click_20_listener","showKeyboardShortCuts","HeaderButtonsComponent_Conditional_0_Template_button_click_23_listener","newStory","hasDomainStory","hasTitle","isDirty","HeaderButtonsComponent_Conditional_1_Template_button_click_1_listener","_r3","HeaderButtonsComponent_Conditional_1_Template_button_click_4_listener","HeaderButtonsComponent_Conditional_1_Template_button_click_7_listener","HeaderButtonsComponent","isReplaying","HeaderButtonsComponent_Template","HeaderButtonsComponent_Conditional_0_Template","HeaderButtonsComponent_Conditional_1_Template","combineLatest","HeaderComponent_Conditional_2_Template_button_click_0_listener","HeaderComponent_Conditional_4_Template_button_click_0_listener","sentenceDescription$","HeaderComponent","importService","renderService","isReplay$","isDirty$","pipe","count","showDescription","createNewDomainStory","onImport","HeaderComponent_Template","HeaderComponent_Conditional_2_Template","HeaderComponent_Conditional_4_Template","HeaderComponent_Template_span_click_7_listener","HeaderComponent_Conditional_13_Template","HeaderComponent_Template_app_header_buttons_import_16_listener","HeaderComponent_Template_app_header_buttons_openSettings_16_listener","HeaderComponent_Template_app_header_buttons_startReplay_16_listener","HeaderComponent_Template_app_header_buttons_stopReplay_16_listener","HeaderComponent_Template_app_header_buttons_nextSentence_16_listener","HeaderComponent_Template_app_header_buttons_previousSentence_16_listener","HeaderComponent_Template_app_header_buttons_newStory_16_listener","HeaderComponent_Template_app_header_buttons_showKeyboardShortCuts_16_listener","HeaderComponent_Template_app_header_buttons_openLabelDictionary_16_listener","HeaderComponent_Template_app_header_buttons_openDownloadDialog_16_listener","HeaderComponent_Template_app_header_buttons_openUploadUrlDialog_16_listener","HeaderComponent_Conditional_19_Template","GeneralSettingsComponent","GeneralSettingsComponent_Template","SettingsComponent","showGeneralSettings","showIconSetCustomization","savedConfiguration","openGeneralSettings","openIconSetCustomization","SettingsComponent_Template","SettingsComponent_Template_button_click_3_listener","SettingsComponent_Template_button_click_7_listener","SettingsComponent_Template_button_click_11_listener","SettingsComponent_Conditional_15_Template","SettingsComponent_Conditional_17_Template","showSettings","production","enableProdMode","__NgCli_bootstrap_1","platformBrowser","bootstrapModule","console","error"],"sourceRoot":"webpack:///","x_google_ignoreList":[]} \ No newline at end of file