diff --git a/app-latest-build/main.js b/app-latest-build/main.js index 763834b..39f932a 100644 --- a/app-latest-build/main.js +++ b/app-latest-build/main.js @@ -5479,50 +5479,28 @@ __webpack_require__.r(__webpack_exports__); -function ExportDialogComponent_Conditional_16_Template(rf, ctx) { +function ExportDialogComponent_For_22_Template(rf, ctx) { if (rf & 1) { const _r1 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵgetCurrentView"](); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](0, "br"); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](1, "label", 4)(2, "input", 5); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtwoWayListener"]("ngModelChange", function ExportDialogComponent_Conditional_16_Template_input_ngModelChange_2_listener($event) { - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrestoreView"](_r1); - const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"](); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtwoWayBindingSet"](ctx_r1.seconds, $event) || (ctx_r1.seconds = $event); - return _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵresetView"]($event); - }); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](3, " Set delay for animation time "); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); - } - if (rf & 2) { - const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"](); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtwoWayProperty"]("ngModel", ctx_r1.seconds); - } -} -function ExportDialogComponent_For_23_Template(rf, ctx) { - if (rf & 1) { - const _r3 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵgetCurrentView"](); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "button", 6); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function ExportDialogComponent_For_23_Template_button_click_0_listener() { - const i_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrestoreView"](_r3).$index; - const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"](); - return _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵresetView"](ctx_r1.doOption(i_r4)); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "button", 4); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function ExportDialogComponent_For_22_Template_button_click_0_listener() { + const i_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrestoreView"](_r1).$index; + const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵresetView"](ctx_r2.doOption(i_r2)); }); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); } if (rf & 2) { - const option_r5 = ctx.$implicit; - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("title", option_r5.tooltip); + const option_r4 = ctx.$implicit; + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("title", option_r4.tooltip); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", option_r5.text, " "); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", option_r4.text, " "); } } class ExportDialogComponent { constructor(dialogRef, data) { this.dialogRef = dialogRef; - this.seconds = 1; this.isAnimatedSvgExport = false; this.withTitle = new rxjs_internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_2__.BehaviorSubject(true); this.useWhiteBackground = new rxjs_internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_2__.BehaviorSubject(true); @@ -5532,7 +5510,7 @@ class ExportDialogComponent { ngOnInit() {} doOption(i) { if (this.isAnimatedSvgExport) { - this.options[i].fn(this.withTitle.value, this.useWhiteBackground.value, this.seconds); + this.options[i].fn(this.withTitle.value, this.useWhiteBackground.value, this.isAnimatedSvgExport); } else { this.options[i].fn(this.withTitle.value, this.useWhiteBackground.value); } @@ -5555,9 +5533,9 @@ class ExportDialogComponent { static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({ type: ExportDialogComponent, selectors: [["app-export-dialog"]], - decls: 24, - vars: 9, - consts: [["type", "checkbox", 3, "change", "checked"], ["type", "checkbox", 3, "ngModelChange", "ngModel"], ["mat-flat-button", "", 3, "click"], ["mat-stroked-button", "", 1, "mr-1", 3, "title"], [1, "ml-2"], ["type", "number", "max", "5", "min", "1", 1, "number-input", 3, "ngModelChange", "ngModel"], ["mat-stroked-button", "", 1, "mr-1", 3, "click", "title"]], + decls: 23, + vars: 8, + consts: [["type", "checkbox", 3, "change", "checked"], ["type", "checkbox", 3, "ngModelChange", "ngModel"], ["mat-flat-button", "", 3, "click"], ["mat-stroked-button", "", 1, "mr-1", 3, "title"], ["mat-stroked-button", "", 1, "mr-1", 3, "click", "title"]], template: function ExportDialogComponent_Template(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "mat-dialog-content")(1, "h2"); @@ -5588,36 +5566,32 @@ class ExportDialogComponent { }); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](15, " Export animated SVG "); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](16, ExportDialogComponent_Conditional_16_Template, 4, 1); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](17, "mat-dialog-actions"); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](18, "br"); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](19, "div")(20, "button", 2); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function ExportDialogComponent_Template_button_click_20_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](16, "mat-dialog-actions"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](17, "br"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](18, "div")(19, "button", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function ExportDialogComponent_Template_button_click_19_listener() { return ctx.close(); }); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](21, "Cancel"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](20, "Cancel"); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrepeaterCreate"](22, ExportDialogComponent_For_23_Template, 2, 2, "button", 3, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrepeaterTrackByIdentity"]); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrepeaterCreate"](21, ExportDialogComponent_For_22_Template, 2, 2, "button", 3, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrepeaterTrackByIdentity"]); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()(); } if (rf & 2) { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](ctx.title); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("checked", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](5, 5, ctx.withTitle)); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("checked", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](5, 4, ctx.withTitle)); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](5); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("checked", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](10, 7, ctx.useWhiteBackground)); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("checked", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](10, 6, ctx.useWhiteBackground)); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](5); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtwoWayProperty"]("ngModel", ctx.isAnimatedSvgExport); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵconditional"](16, ctx.isAnimatedSvgExport ? 16 : -1); - _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](6); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](7); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrepeater"](ctx.options); } }, - dependencies: [_angular_material_button__WEBPACK_IMPORTED_MODULE_4__.MatButton, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__.MatDialogActions, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__.MatDialogContent, _angular_forms__WEBPACK_IMPORTED_MODULE_5__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_5__.NumberValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_5__.CheckboxControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_5__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_5__.MinValidator, _angular_forms__WEBPACK_IMPORTED_MODULE_5__.MaxValidator, _angular_forms__WEBPACK_IMPORTED_MODULE_5__.NgModel, _angular_common__WEBPACK_IMPORTED_MODULE_6__.AsyncPipe], + dependencies: [_angular_material_button__WEBPACK_IMPORTED_MODULE_4__.MatButton, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__.MatDialogActions, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__.MatDialogContent, _angular_forms__WEBPACK_IMPORTED_MODULE_5__.CheckboxControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_5__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_5__.NgModel, _angular_common__WEBPACK_IMPORTED_MODULE_6__.AsyncPipe], styles: [".ml-2[_ngcontent-%COMP%] {\n margin-left: 2rem;\n}\n\n.number-input[_ngcontent-%COMP%] {\n margin-right: 0.5rem;\n padding: 0.25rem 0.5rem;\n border-radius: 0.25rem;\n max-width: 5rem;\n}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy9hcHAvdG9vbHMvZXhwb3J0L3ByZXNlbnRhdGlvbi9leHBvcnQtZGlhbG9nL2V4cG9ydC1kaWFsb2cuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxpQkFBQTtBQUNGOztBQUVBO0VBQ0Usb0JBQUE7RUFDQSx1QkFBQTtFQUNBLHNCQUFBO0VBQ0EsZUFBQTtBQUNGIiwic291cmNlc0NvbnRlbnQiOlsiLm1sLTIge1xuICBtYXJnaW4tbGVmdDogMnJlbTtcbn1cblxuLm51bWJlci1pbnB1dCB7XG4gIG1hcmdpbi1yaWdodDogMC41cmVtO1xuICBwYWRkaW5nOiAwLjI1cmVtIDAuNXJlbTtcbiAgYm9yZGVyLXJhZGl1czogMC4yNXJlbTtcbiAgbWF4LXdpZHRoOiA1cmVtO1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ== */"] }); } @@ -5763,10 +5737,10 @@ class ExportService { } document.body.removeChild(element); } - downloadSVG(withTitle, useWhiteBackground, seconds) { + downloadSVG(withTitle, useWhiteBackground, isAnimated) { const story = this.getStoryForDownload(); const dst = this.createConfigAndDST(story); - const svgData = this.svgService.createSVGData(this.title, this.description, dst, withTitle, useWhiteBackground, seconds); + const svgData = this.svgService.createSVGData(this.title, this.description, dst, withTitle, useWhiteBackground, isAnimated); this.downloadFile(svgData, 'data:application/bpmn20-xml;charset=UTF-8,', (0,src_app_utils_sanitizer__WEBPACK_IMPORTED_MODULE_0__.sanitizeForDesktop)(this.title + '_' + this.getCurrentDateString()), '.egn.svg', true); } downloadPNG(withTitle) { @@ -5829,7 +5803,7 @@ class ExportService { } openDownloadDialog() { if (this.isDomainStoryExportable()) { - const SVGDownloadOption = new _domain_dialog_exportDialogData__WEBPACK_IMPORTED_MODULE_3__.ExportOption('SVG', 'Download an SVG-Image with the Domain-Story embedded. Can be used to save and share your Domain-Story.', (withTitle, useWhiteBackground, seconds) => this.downloadSVG(withTitle, useWhiteBackground, seconds)); + const SVGDownloadOption = new _domain_dialog_exportDialogData__WEBPACK_IMPORTED_MODULE_3__.ExportOption('SVG', 'Download an SVG-Image with the Domain-Story embedded. Can be used to save and share your Domain-Story.', (withTitle, useWhiteBackground, isAnimated) => this.downloadSVG(withTitle, useWhiteBackground, isAnimated)); const EGNDownloadOption = new _domain_dialog_exportDialogData__WEBPACK_IMPORTED_MODULE_3__.ExportOption('EGN', 'Download an EGN-File with the Domain-Story. Can be used to save and share your Domain-Story.', () => this.downloadDST()); const PNGDownloadOption = new _domain_dialog_exportDialogData__WEBPACK_IMPORTED_MODULE_3__.ExportOption('PNG', 'Download a PNG-Image of the Domain-Story. This does not include the Domain-Story!', withTitle => this.downloadPNG(withTitle)); const HTMLDownloadOption = new _domain_dialog_exportDialogData__WEBPACK_IMPORTED_MODULE_3__.ExportOption('HTML-Presentation', 'Download an HTML-Presentation. This does not include the Domain-Story!', () => this.downloadHTMLPresentation(this.modelerService.getModeler())); @@ -6293,23 +6267,11 @@ class SvgService { this.storyCreatorService = storyCreatorService; this.cacheData = ''; } - createSVGData(title, description, dst, withTitle, useWhiteBackground, seconds = undefined) { + createSVGData(title, description, dst, withTitle, useWhiteBackground, isAnimated = false) { this.cacheData = this.modelerService.getEncoded(); let domainStorySvg = structuredClone(this.cacheData); - if (seconds) { - const story = this.storyCreatorService.traceActivitiesAndCreateStory(); - let endSeconds = 0; - const usedElementId = []; - story.forEach(sentence => { - const objects = sentence.objects.filter(it => !usedElementId.includes(it.id)); - objects.forEach(objectId => { - usedElementId.push(objectId.id); - const index = domainStorySvg.indexOf(objectId.id); - const insertIndex = domainStorySvg.indexOf('>', index) + 1; - domainStorySvg = `${domainStorySvg.slice(0, insertIndex)} ${domainStorySvg.slice(insertIndex)}`; - }); - endSeconds += seconds; - }); + if (isAnimated) { + domainStorySvg = this.createAnimatedSvg(domainStorySvg); } let viewBoxIndex = domainStorySvg.indexOf('width="'); let { @@ -6358,6 +6320,47 @@ class SvgService { } return this.appendDST(domainStorySvg, dst); } + createAnimatedSvg(domainStorySvg) { + const story = this.storyCreatorService.traceActivitiesAndCreateStory(); + const usedElementId = []; + const storyLength = story.length; + const visibleTimeInPercent = Math.floor(100 / storyLength); + const durationOfAnimation = storyLength * 1.5; + let senteceCounter = 1; + let currentVisibleTimeInPercent = visibleTimeInPercent; + let previouVisibleTimeInPercent = visibleTimeInPercent; + story.forEach(sentence => { + const objects = sentence.objects.filter(it => !usedElementId.includes(it.id)); + objects.forEach(objectId => { + usedElementId.push(objectId.id); + const idIndex = domainStorySvg.indexOf(objectId.id); + const insertIdIndex = domainStorySvg.indexOf('>', idIndex); + domainStorySvg = `${domainStorySvg.slice(0, insertIdIndex)} id="group${senteceCounter}" ${domainStorySvg.slice(insertIdIndex)}`; + const index = domainStorySvg.indexOf(objectId.id); + const insertIndex = domainStorySvg.indexOf('>', index) + 1; + if (senteceCounter > 1) { + domainStorySvg = `${domainStorySvg.slice(0, insertIndex)} + ${domainStorySvg.slice(insertIndex)}`; + } + }); + senteceCounter += 1; + previouVisibleTimeInPercent = currentVisibleTimeInPercent; + currentVisibleTimeInPercent = visibleTimeInPercent * senteceCounter; + }); + return domainStorySvg; + } findIndexToInsertData(data) { let insertIndex = data.indexOf(''); if (insertIndex < 0) { diff --git a/app-latest-build/main.js.map b/app-latest-build/main.js.map index ecdb8e3..c288a03 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,kBAAk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sDAAS,CAAC,CAC1B0xB,KAAK,CAAEhc,GAAG,IAAK20B,OAAO,CAAC5X,KAAK,CAAC/c,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/iconFilterOptions.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/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.getIconsAssignedAs(\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.getIconsAssignedAs(\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 {\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 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.getIconsAssignedAs(\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.getIconsAssignedAs(\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 { Dictionary } from \"src/app/domain/entities/dictionary\";\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\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.getCustomIconsDictionary().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 iconDictionary?.initTypeDictionaries(config.actors, config.workObjects);\n\n let actorTypes = iconDictionary?.getIconsAssignedAs(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?.getIconsAssignedAs(\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\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 \"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/** LocalStorage KEYS **/\nexport const ICON_SET_CONFIGURATION_KEY = 'iconSetConfiguration';\nexport const DRAFTS_KEY = 'autosaveDrafts';\nexport const VERSION_KEY = 'version';\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 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\n const seenIds = new Set();\n\n return groupObjects.filter((groupObject) => {\n const isNewId = !seenIds.has(groupObject.id);\n if (isNewId) {\n seenIds.add(groupObject.id);\n }\n return isNewId;\n });\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 DRAFTS_KEY,\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\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_KEY, []);\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_KEY, drafts);\n }\n\n private readDrafts(): Draft[] {\n return this.storageService.get(DRAFTS_KEY) ?? [];\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 seconds: number = 1;\n isAnimatedSvgExport: boolean = false;\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 if (this.isAnimatedSvgExport) {\n this.options[i].fn(\n this.withTitle.value,\n this.useWhiteBackground.value,\n this.seconds,\n );\n } else {\n this.options[i].fn(this.withTitle.value, this.useWhiteBackground.value);\n }\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 @if (isAnimatedSvgExport) {\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';\nimport { FormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [ExportDialogComponent],\n exports: [ExportDialogComponent],\n imports: [CommonModule, MaterialModule, FormsModule],\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(\n withTitle: boolean,\n useWhiteBackground: boolean,\n seconds: number | undefined,\n ): 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 seconds,\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 (\n withTitle: boolean,\n useWhiteBackground: boolean,\n seconds: number | undefined,\n ) => this.downloadSVG(withTitle, useWhiteBackground, seconds),\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';\nimport { StoryCreatorService } from '../../replay/services/story-creator.service';\nimport { StorySentence } from '../../replay/domain/storySentence';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SvgService {\n private cacheData = '';\n\n constructor(\n private modelerService: ModelerService,\n private storyCreatorService: StoryCreatorService,\n ) {}\n\n createSVGData(\n title: string,\n description: string,\n dst: ConfigAndDST,\n withTitle: boolean,\n useWhiteBackground: boolean,\n seconds: number | undefined = undefined,\n ): string {\n this.cacheData = this.modelerService.getEncoded();\n\n let domainStorySvg = structuredClone(this.cacheData);\n\n if (seconds) {\n const story: StorySentence[] =\n this.storyCreatorService.traceActivitiesAndCreateStory();\n let endSeconds = 0;\n const usedElementId: string[] = [];\n story.forEach((sentence) => {\n const objects = sentence.objects.filter(\n (it) => !usedElementId.includes(it.id),\n );\n objects.forEach((objectId) => {\n usedElementId.push(objectId.id);\n const index = domainStorySvg.indexOf(objectId.id);\n const insertIndex = domainStorySvg.indexOf('>', index) + 1;\n domainStorySvg = `${domainStorySvg.slice(0, insertIndex)} ${domainStorySvg.slice(insertIndex)}`;\n });\n endSeconds += seconds;\n });\n }\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 customIcons = 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 builtInIcons = {\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 addCustomIcons(newIcons: Dictionary): void {\n for (const key in newIcons.keysArray().entries()) {\n customIcons.add(newIcons.get(key), key);\n }\n}\n","import { Dictionary } from 'src/app/domain/entities/dictionary';\nimport { addCustomIcons } 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 { IconSet } from '../../../domain/entities/iconSet';\n\nexport class IconConfiguration {\n iconSetName = INITIAL_ICON_SET_NAME;\n\n private allIconDictionary: Dictionary;\n\n constructor(allIconDictionary: Dictionary) {\n this.allIconDictionary = allIconDictionary;\n }\n\n getDefaultConf(): Configuration {\n return defaultIconSet;\n }\n\n addCustomIcons(\n actors: string[],\n actorsDict: Dictionary,\n workObjects: string[],\n workObjectsDict: Dictionary,\n ): void {\n const newCustomIcons: { [key: string]: any } = {};\n\n actors.forEach((name: string) => {\n if (!this.allIconDictionary.has(name)) {\n newCustomIcons[name] = actorsDict.get(name);\n }\n });\n\n workObjects.forEach((name: string) => {\n if (!this.allIconDictionary.has(name)) {\n newCustomIcons[name] = workObjectsDict.get(name);\n }\n });\n\n const customIcons = new Dictionary();\n Object.keys(newCustomIcons).forEach((key) => {\n customIcons.set(key, newCustomIcons[key]);\n });\n\n addCustomIcons(customIcons);\n }\n\n createCustomConf(iconSetConfiguration: IconSet): Configuration {\n this.iconSetName = iconSetConfiguration.name;\n\n let actors = iconSetConfiguration.actors;\n let workObjects = iconSetConfiguration.workObjects;\n\n this.addCustomIcons(\n actors.keysArray(),\n actors,\n workObjects.keysArray(),\n workObjects,\n );\n\n return new Configuration(actors.keysArray(), workObjects.keysArray());\n }\n}\n\nexport const defaultIconSet = {\n actors: ['Person', 'Group', 'System'],\n workObjects: ['Document', 'Folder', 'Call', 'Email', 'Conversation', 'Info'],\n};\n","export enum IconFilterOptions {\n ONLY_ACTORS = 'ICON_FILTER_ACTOR',\n ONLY_WORKOBJECTS = 'ICON_FILTER_WORKOBJECT',\n ONLY_UNASSIGNED = 'ICON_FILTER_UNASSIGNED',\n NO_FILTER = '',\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 { IconFilterOptions } from '../../domain/iconFilterOptions';\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(IconFilterOptions.NO_FILTER);\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 !== IconFilterOptions.ONLY_ACTORS) {\n this.filter.next(IconFilterOptions.ONLY_ACTORS);\n } else {\n this.filter.next(IconFilterOptions.NO_FILTER);\n }\n }\n\n filterForWorkobjects(): void {\n if (this.filter.value !== IconFilterOptions.ONLY_WORKOBJECTS) {\n this.filter.next(IconFilterOptions.ONLY_WORKOBJECTS);\n } else {\n this.filter.next(IconFilterOptions.NO_FILTER);\n }\n }\n\n filterForUnassigned(): void {\n if (this.filter.value !== IconFilterOptions.ONLY_UNASSIGNED) {\n this.filter.next(IconFilterOptions.ONLY_UNASSIGNED);\n } else {\n this.filter.next(IconFilterOptions.NO_FILTER);\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: IconFilterOptions): string[] {\n let allFiltered: string[] = [];\n switch (type) {\n case IconFilterOptions.NO_FILTER:\n allFiltered = this.allIconNames.value;\n break;\n case IconFilterOptions.ONLY_ACTORS:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.iconSetCustomizationService.isIconActor(name),\n );\n break;\n case IconFilterOptions.ONLY_WORKOBJECTS:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.iconSetCustomizationService.isIconWorkObject(name),\n );\n break;\n case IconFilterOptions.ONLY_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 Work Objects\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 defaultIconSet,\n IconConfiguration,\n} from 'src/app/tools/icon-set-config/domain/iconConfiguration';\nimport {\n builtInIcons,\n customIcons,\n} from 'src/app/tools/icon-set-config/domain/allIcons';\nimport { sanitizeIconName } from '../../../utils/sanitizer';\nimport getIconId = ElementTypes.getIconId;\nimport { IconSet } from '../../../domain/entities/iconSet';\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 builtInIconsDictionary = new Dictionary();\n private iconDictionaryForBPMN = new Dictionary();\n\n private customConfiguration?: IconSet;\n\n private readonly iconConfig: IconConfiguration;\n\n constructor() {\n this.builtInIconsDictionary.addEach(builtInIcons);\n this.iconConfig = new IconConfiguration(this.builtInIconsDictionary);\n }\n\n initTypeDictionaries(actors: string[], workObjects: string[]): void {\n if (!actors || actors.length == 0) {\n actors = defaultIconSet.actors;\n }\n if (!workObjects || workObjects.length == 0) {\n workObjects = defaultIconSet.workObjects;\n }\n\n const allTypes = new Dictionary();\n allTypes.addEach(builtInIcons);\n allTypes.appendDict(this.getCustomIconsDictionary());\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(builtInIcons);\n allTypes.appendDict(customIcons);\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: IconSet,\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 customIcons.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.builtInIconsDictionary);\n fullDictionary.appendDict(this.getCustomIconsDictionary());\n return fullDictionary;\n }\n\n getCustomIconsDictionary(): Dictionary {\n const appendedDict = new Dictionary();\n customIcons.keysArray().forEach((key) => {\n if (!this.builtInIconsDictionary.has(key)) {\n appendedDict.set(key, customIcons.get(key));\n }\n });\n return appendedDict;\n }\n\n getIconsAssignedAs(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 getNamesOfIconsAssignedAs(type: ElementTypes): string[] {\n return this.getIconsAssignedAs(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.builtInIconsDictionary.has(name)) {\n return this.builtInIconsDictionary.get(name);\n } else if (customIcons.has(name)) {\n return customIcons.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.builtInIconsDictionary;\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: IconSet): 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 { defaultIconSet } from '../domain/iconConfiguration';\nimport { TitleService } from '../../title/services/title.service';\nimport {\n ICON_SET_CONFIGURATION_KEY,\n INITIAL_ICON_SET_NAME,\n} from '../../../domain/entities/constants';\nimport { IconSet } from '../../../domain/entities/iconSet';\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(customConfig: IconSet, updateIconSetName = true): 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 .addCustomIcons(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(): IconSet | 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(): IconSet {\n const minimalConfig = this.createConfigFromCanvas();\n\n defaultIconSet.actors.forEach((iconName) => {\n minimalConfig.actors.add(\n this.iconDictionaryService.getIconSource(iconName),\n iconName,\n );\n });\n defaultIconSet.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 ): IconSet {\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 ): IconSet {\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(): IconSet | undefined {\n const iconSetString = this.storageService.get(ICON_SET_CONFIGURATION_KEY);\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: IconSet): 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_KEY,\n JSON.stringify(configForStorage, null, 2),\n );\n }\n\n private createConfigFromCanvas(): IconSet {\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(iconSetConfiguration: IconSet) {\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 { IconSet } from '../../../domain/entities/iconSet';\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(): IconSet;\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: IconSet | 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(customConfig: IconSet, saveIconSet = true): 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(): IconSet | undefined {\n const temp = this.changedIconSetConfiguration;\n this.changedIconSetConfiguration = undefined;\n\n return temp;\n }\n\n private createIconSetConfiguration(): IconSet {\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: IconSet) {\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 SNACKBAR_SUCCESS,\n} from '../../../domain/entities/constants';\nimport { IconSetConfigurationService } from '../../icon-set-config/services/icon-set-configuration.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { IconSet } from '../../../domain/entities/iconSet';\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: IconSet | null = null;\n\n private importedConfigurationEmitter = 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(): IconSet {\n const config: IconSet = {\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\n this.import(file, file.name);\n this.modelerService.commandStackChanged();\n }\n\n performDropImport(file: File): void {\n if (this.isSupportedFileEnding(file.name)) {\n this.import(file, file.name);\n } else {\n this.snackbar.open('File type 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\n fileUrl = this.convertToDownloadableUrl(fileUrl);\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]\n .replace(/%20/g, ' ')\n .replace(/(\\.egn\\.svg).*/, '$1');\n\n if (!filename) {\n throw new Error('Unable to extract filename from URL');\n }\n\n if (this.isSupportedFileEnding(filename)) {\n this.import(blob, filename);\n } else {\n this.snackbar.open('File type not supported', 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 private convertToDownloadableUrl(fileUrl: string): string {\n // Convert GitHub URLs to raw content\n const githubPattern = /https:\\/\\/github\\.com\\/(.+)\\/(blob|blame)\\/(.+)/;\n if (githubPattern.test(fileUrl)) {\n fileUrl = fileUrl.replace(\n githubPattern,\n 'https://raw.githubusercontent.com/$1/$3',\n );\n }\n\n //Convert Dropbox URLs to dl content\n const dropboxPattern = /https:\\/\\/www\\.dropbox\\.com\\/(.+)/;\n if (dropboxPattern.test(fileUrl)) {\n fileUrl = fileUrl.replace(dropboxPattern, 'https://dl.dropbox.com/$1');\n }\n\n return fileUrl;\n }\n\n private isSupportedFileEnding(filename: string) {\n let isSupported = false;\n\n const dstSvgPattern = /.*(.dst)(\\s*\\(\\d+\\)){0,1}\\.svg/;\n const egnSvgPattern = /.*(.egn)(\\s*\\(\\d+\\)){0,1}\\.svg/;\n\n if (filename != null) {\n isSupported =\n filename.endsWith('.dst') ||\n filename.endsWith('.egn') ||\n filename.match(dstSvgPattern) != null ||\n filename.match(egnSvgPattern) != null;\n }\n\n return isSupported;\n }\n\n openImportFromUrlDialog(): 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 import(input: Blob, filename: string): void {\n const egnSvgPattern = /.*(.egn)(\\s*\\(\\d+\\)){0,1}\\.svg/;\n const isSVG = filename.endsWith('.svg');\n let isEGN = filename.endsWith('.egn');\n\n if (isSVG) {\n isEGN = filename.match(egnSvgPattern) != null;\n }\n\n try {\n const fileReader = new FileReader();\n\n const titleText = this.restoreTitleFromFileName(filename, isSVG);\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, isEGN);\n }\n };\n fileReader.readAsText(input);\n this.importSuccessful();\n } catch (error) {\n this.importFailed();\n }\n }\n\n private fileReaderFunction(\n text: string | ArrayBuffer | null,\n isSvgFile: boolean,\n isEgnFormat: boolean,\n ): void {\n let contentAsJson;\n if (typeof text === 'string') {\n if (isSvgFile) {\n contentAsJson = this.extractJsonFromSvgComment(text);\n } else {\n contentAsJson = text;\n }\n\n let elements: any[];\n let iconSetConfig: IconSet;\n let iconSetFromFile: {\n name: string;\n actors: { [key: string]: any };\n workObjects: { [key: string]: any };\n };\n\n let storyAndIconSet = this.extractStoryAndIconSet(contentAsJson);\n if (storyAndIconSet == null) {\n return;\n }\n\n // current implementation\n if (storyAndIconSet.domain) {\n iconSetFromFile = isEgnFormat\n ? storyAndIconSet.domain\n : JSON.parse(storyAndIconSet.domain);\n iconSetConfig =\n this.iconSetConfigurationService.createIconSetConfiguration(\n iconSetFromFile,\n );\n elements = isEgnFormat\n ? storyAndIconSet.dst\n : JSON.parse(storyAndIconSet.dst);\n } else {\n // legacy implementation\n if (storyAndIconSet.config) {\n iconSetFromFile = JSON.parse(storyAndIconSet.config);\n iconSetConfig =\n this.iconSetConfigurationService.createIconSetConfiguration(\n iconSetFromFile,\n );\n elements = JSON.parse(storyAndIconSet.dst);\n } else {\n // even older legacy implementation (prior to configurable icon set):\n elements = JSON.parse(contentAsJson);\n iconSetConfig =\n this.iconSetConfigurationService.createMinimalConfigurationWithDefaultIcons();\n }\n }\n\n this.importRepairService.removeWhitespacesFromIcons(elements);\n\n const configChanged = this.checkConfigForChanges(iconSetConfig);\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 tag 'version',\n // then there exists another tag 'info' for the description\n if (importVersionNumber.version) {\n lastElement = elements.pop();\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, iconSetConfig);\n this.rendererService.importStory(elements, configChanged, iconSetConfig);\n }\n }\n\n private importSuccessful() {\n this.snackbar.open('Import successful', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n });\n }\n\n private importFailed() {\n this.snackbar.open('Import failed', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_ERROR,\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 extractStoryAndIconSet(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 extractJsonFromSvgComment(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: IconSet): boolean {\n const newActorKeys = iconSetConfiguration.actors.keysArray();\n const newWorkObjectKeys = iconSetConfiguration.workObjects.keysArray();\n\n const currentActorKeys =\n this.iconDictionaryService.getNamesOfIconsAssignedAs(ElementTypes.ACTOR);\n const currentWorkobjectKeys =\n this.iconDictionaryService.getNamesOfIconsAssignedAs(\n ElementTypes.WORKOBJECT,\n );\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: IconSet,\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: IconSet) {\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 { CommonModule } from '@angular/common';\nimport { MaterialModule } from '../../../material.module';\nimport { ReactiveFormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [ActivityDialogComponent],\n exports: [ActivityDialogComponent],\n imports: [CommonModule, MaterialModule, ReactiveFormsModule],\n})\nexport class ModelerModule {}\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 { IconSet } from '../../../domain/entities/iconSet';\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?: IconSet,\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 { IconSet } from '../../../domain/entities/iconSet';\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?: IconSet,\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 openImportFromUrlDialog = 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 openImportFromUrlDialog(): void {\n this.importService.openImportFromUrlDialog();\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 { IconSet } from '../../../domain/entities/iconSet';\n\n@Component({\n selector: 'app-settings',\n templateUrl: './settings.component.html',\n styleUrls: ['./settings.component.scss'],\n})\nexport class SettingsComponent {\n iconSetConfiguration: IconSet | 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.2.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","getIconsAssignedAs","replaceOption","keysArray","actorType","typeName","toLowerCase","getIconForBPMN","workObjectTypes","workObjectType","ContextPadProvider","bind","generateAutomaticNumber","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","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","Dictionary","configuration","initializePalette","configurationService","PaletteProvider","palette","spaceTool","lassoTool","_create","_elementFactory","_spaceTool","_lassoTool","getPaletteEntries","createAction","createListener","isExpanded","shortType","initPalette","appendCSSStyleCheat","customIcons","sheetEl","head","customIconDict","appendDict","customIconDictKeys","getCustomIconsDictionary","has","src","iconStyle","wrapSRCInSVG","sheet","insertRule","cssRules","config","getCurrentIconConfigurationForBPMN","initTypeDictionaries","actors","workObjects","addCanvasObjectTypes","separator","activateSelection","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_KEY","DRAFTS_KEY","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","putEntry","addEach","keys","dict","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","seenIds","Set","groupObject","isNewId","registryElementNames","sort","activityCanvasA","activityCanvasB","activityNumberA","activityNumberB","getUsedIcons","getAllActors","workobjects","getAllWorkobjects","a","w","co","StorageService","localStorage","setItem","JSON","stringify","json","getItem","parse","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","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_Conditional_16_Template_input_ngModelChange_2_listener","ctx_r1","seconds","ExportDialogComponent_For_23_Template_button_click_0_listener","i_r4","_r3","$index","doOption","option_r5","ExportDialogComponent","isAnimatedSvgExport","withTitle","useWhiteBackground","updateWithTitle","updateUseWhiteBackground","ExportDialogComponent_Template","ExportDialogComponent_Template_input_change_4_listener","ExportDialogComponent_Template_input_change_9_listener","ExportDialogComponent_Template_input_ngModelChange_14_listener","ExportDialogComponent_Conditional_16_Template","ExportDialogComponent_Template_button_click_20_listener","ExportDialogComponent_For_23_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","traceActivitiesAndCreateStory","endSeconds","usedElementId","sentence","objectId","viewBoxWidth","viewBoxHeight","findIndexToInsertData","svgIndex","backgroundColorWhite","appendDST","builtInIcons","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","addCustomIcons","newIcons","IconConfiguration","allIconDictionary","iconSetName","getDefaultConf","defaultIconSet","actorsDict","workObjectsDict","newCustomIcons","createCustomConf","iconSetConfiguration","IconFilterOptions","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","NO_FILTER","selectedActors","selectedWorkobjects","allIconNames","allFilteredIconNames","iconSetConfigurationTypes","getIconSetConfiguration","allIcons","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","ONLY_ACTORS","filterForWorkobjects","ONLY_WORKOBJECTS","filterForUnassigned","ONLY_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","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$","changeName","listName","list","sortedList","setSelectedActors","setSelectedWorkObject","IconSetDetailsComponent_Template","IconSetDetailsComponent_Template_input_input_5_listener","IconSetDetailsComponent_For_12_Template","IconSetDetailsComponent_For_19_Template","actorIconDictionary","workObjectDictionary","builtInIconsDictionary","iconDictionaryForBPMN","iconConfig","allTypes","initDictionary","dictionary","customConfiguration","allInTypeDictionary","collection","allIn","addIconsFromIconSetConfiguration","dictionaryType","iconTypes","registerIconForType","addIconsToTypeDictionary","unregisterIconForType","extractCustomIconsFromDictionary","addNewIconsToDictionary","elementDictionary","sanitizedName","custom","addIconsToCss","fullDictionary","appendedDict","getNamesOfIconsAssignedAs","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","import","commandStackChanged","isSupportedFileEnding","importFromUrl","convertToDownloadableUrl","fetch","response","blob","catch","githubPattern","dropboxPattern","isSupported","dstSvgPattern","egnSvgPattern","endsWith","openImportFromUrlDialog","isSVG","isEGN","fileReader","titleText","restoreTitleFromFileName","fileReaderFunction","importSuccessful","error","importFailed","isSvgFile","isEgnFormat","contentAsJson","extractJsonFromSvgComment","iconSetConfig","iconSetFromFile","storyAndIconSet","extractStoryAndIconSet","removeWhitespacesFromIcons","configChanged","checkConfigForChanges","lastElement","importVersionNumber","handleVersionNumber","checkForUnreferencedElementsInActivitiesAndRepair","showBrokenImportDialog","adjustPositions","versionPrefix","lastIndexOf","updateCustomElementsPreviousV050","showPreviousV050Dialog","dstText","dstAndConfig","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","ctx_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","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","ReactiveFormsModule","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","initializeReplay","showCurrentSentence","checkSequenceNumbers","missingSentences","getMissingSentences","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","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","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_openImportFromUrlDialog_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"],"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,S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ACdQ,2GAAmB,EACnBF,wFAAc;IAAA2D,OAAA,GAVdykC,4EAAe,EACfT,mGAAsB,EACtBoC,kGAAwB,EACxBE,2EAAiB;EAAA;AAAA;;;;;;;;;;;;;;;;ACrBkB;;AAKjC,MAAOvtC,eAAe;EAH5BnC,YAAA;IAIU,KAAAswC,YAAY,GAAG,IAAI1xC,iDAAe,CAAC,KAAK,CAAC;IACjD,KAAA+B,aAAa,GAAG,IAAI,CAAC2vC,YAAY,CAACvkC,YAAY,EAAE;;EAEhDhC,KAAKA,CAAA;IACH,IAAI,CAACumC,YAAY,CAACzvD,IAAI,CAAC,KAAK,CAAC;EAC/B;EAEAjG,IAAIA,CAAA;IACF,IAAI,CAAC01D,YAAY,CAACzvD,IAAI,CAAC,IAAI,CAAC;EAC9B;EAAC,QAAAmhB,CAAA;qBAVUG,eAAe;EAAA;EAAA,QAAAc,EAAA;WAAfd,eAAe;IAAA8I,OAAA,EAAf9I,eAAe,CAAA+I,IAAA;IAAAC,UAAA,EAFd;EAAM;;;;;;;;;;;;;;;ACJpB;AACA;AACA;AAEO,MAAMtM,WAAW,GAAG;EACzB0xC,UAAU,EAAE,KAAK;EACjB/vC,OAAO,EAAE;CACV;AAED;;;;;;;AAOA;;;;;;;;;;;;;;;;AChB+C;AAGF;AACY;AAEzD,IAAI3B,kEAAW,CAAC0xC,UAAU,EAAE;EAC1BC,6DAAc,EAAE;AAClB;AAEAC,sEAAA,EAAwB,CACrBE,eAAe,CAAC1qC,sDAAS,CAAC,CAC1BgyB,KAAK,CAAEzc,GAAG,IAAKo1B,OAAO,CAAC5X,KAAK,CAACxd,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/iconFilterOptions.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/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.getIconsAssignedAs(\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.getIconsAssignedAs(\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 {\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 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.getIconsAssignedAs(\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.getIconsAssignedAs(\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 { Dictionary } from \"src/app/domain/entities/dictionary\";\nimport { ElementTypes } from \"src/app/domain/entities/elementTypes\";\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.getCustomIconsDictionary().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 iconDictionary?.initTypeDictionaries(config.actors, config.workObjects);\n\n let actorTypes = iconDictionary?.getIconsAssignedAs(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?.getIconsAssignedAs(\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\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 \"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/** LocalStorage KEYS **/\nexport const ICON_SET_CONFIGURATION_KEY = 'iconSetConfiguration';\nexport const DRAFTS_KEY = 'autosaveDrafts';\nexport const VERSION_KEY = 'version';\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 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\n const seenIds = new Set();\n\n return groupObjects.filter((groupObject) => {\n const isNewId = !seenIds.has(groupObject.id);\n if (isNewId) {\n seenIds.add(groupObject.id);\n }\n return isNewId;\n });\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 DRAFTS_KEY,\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\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_KEY, []);\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_KEY, drafts);\n }\n\n private readDrafts(): Draft[] {\n return this.storageService.get(DRAFTS_KEY) ?? [];\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 isAnimatedSvgExport: boolean = false;\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 if (this.isAnimatedSvgExport) {\n this.options[i].fn(\n this.withTitle.value,\n this.useWhiteBackground.value,\n this.isAnimatedSvgExport,\n );\n } else {\n this.options[i].fn(this.withTitle.value, this.useWhiteBackground.value);\n }\n this.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n updateWithTitle($event: Event) {\n // @ts-ignore\n this.withTitle.next($event.target.checked);\n }\n\n updateUseWhiteBackground($event: Event) {\n // @ts-ignore\n this.useWhiteBackground.next($event.target.checked);\n }\n}\n","\n

{{ title }}

\n \n
\n \n
\n \n
\n\n
\n\n
\n \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';\nimport { FormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [ExportDialogComponent],\n exports: [ExportDialogComponent],\n imports: [CommonModule, MaterialModule, FormsModule],\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(\n withTitle: boolean,\n useWhiteBackground: boolean,\n isAnimated: boolean,\n ): 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 isAnimated,\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 (\n withTitle: boolean,\n useWhiteBackground: boolean,\n isAnimated: boolean,\n ) => this.downloadSVG(withTitle, useWhiteBackground, isAnimated),\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';\nimport { StoryCreatorService } from '../../replay/services/story-creator.service';\nimport { StorySentence } from '../../replay/domain/storySentence';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SvgService {\n private cacheData = '';\n\n constructor(\n private modelerService: ModelerService,\n private storyCreatorService: StoryCreatorService,\n ) {}\n\n createSVGData(\n title: string,\n description: string,\n dst: ConfigAndDST,\n withTitle: boolean,\n useWhiteBackground: boolean,\n isAnimated: boolean = false,\n ): string {\n this.cacheData = this.modelerService.getEncoded();\n\n let domainStorySvg = structuredClone(this.cacheData);\n\n if (isAnimated) {\n domainStorySvg = this.createAnimatedSvg(domainStorySvg);\n }\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 createAnimatedSvg(domainStorySvg: string) {\n const story: StorySentence[] =\n this.storyCreatorService.traceActivitiesAndCreateStory();\n const usedElementId: string[] = [];\n const storyLength = story.length;\n const visibleTimeInPercent = Math.floor(100 / storyLength);\n const durationOfAnimation = storyLength * 1.5;\n let senteceCounter = 1;\n let currentVisibleTimeInPercent = visibleTimeInPercent;\n let previouVisibleTimeInPercent = visibleTimeInPercent;\n story.forEach((sentence) => {\n const objects = sentence.objects.filter(\n (it) => !usedElementId.includes(it.id),\n );\n objects.forEach((objectId) => {\n usedElementId.push(objectId.id);\n const idIndex = domainStorySvg.indexOf(objectId.id);\n const insertIdIndex = domainStorySvg.indexOf('>', idIndex);\n domainStorySvg = `${domainStorySvg.slice(0, insertIdIndex)} id=\"group${senteceCounter}\" ${domainStorySvg.slice(insertIdIndex)}`;\n\n const index = domainStorySvg.indexOf(objectId.id);\n const insertIndex = domainStorySvg.indexOf('>', index) + 1;\n if (senteceCounter > 1) {\n domainStorySvg = `${domainStorySvg.slice(0, insertIndex)}\n ${domainStorySvg.slice(insertIndex)}`;\n }\n });\n senteceCounter += 1;\n previouVisibleTimeInPercent = currentVisibleTimeInPercent;\n currentVisibleTimeInPercent = visibleTimeInPercent * senteceCounter;\n });\n return domainStorySvg;\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 customIcons = 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 builtInIcons = {\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 addCustomIcons(newIcons: Dictionary): void {\n for (const key in newIcons.keysArray().entries()) {\n customIcons.add(newIcons.get(key), key);\n }\n}\n","import { Dictionary } from 'src/app/domain/entities/dictionary';\nimport { addCustomIcons } 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 { IconSet } from '../../../domain/entities/iconSet';\n\nexport class IconConfiguration {\n iconSetName = INITIAL_ICON_SET_NAME;\n\n private allIconDictionary: Dictionary;\n\n constructor(allIconDictionary: Dictionary) {\n this.allIconDictionary = allIconDictionary;\n }\n\n getDefaultConf(): Configuration {\n return defaultIconSet;\n }\n\n addCustomIcons(\n actors: string[],\n actorsDict: Dictionary,\n workObjects: string[],\n workObjectsDict: Dictionary,\n ): void {\n const newCustomIcons: { [key: string]: any } = {};\n\n actors.forEach((name: string) => {\n if (!this.allIconDictionary.has(name)) {\n newCustomIcons[name] = actorsDict.get(name);\n }\n });\n\n workObjects.forEach((name: string) => {\n if (!this.allIconDictionary.has(name)) {\n newCustomIcons[name] = workObjectsDict.get(name);\n }\n });\n\n const customIcons = new Dictionary();\n Object.keys(newCustomIcons).forEach((key) => {\n customIcons.set(key, newCustomIcons[key]);\n });\n\n addCustomIcons(customIcons);\n }\n\n createCustomConf(iconSetConfiguration: IconSet): Configuration {\n this.iconSetName = iconSetConfiguration.name;\n\n let actors = iconSetConfiguration.actors;\n let workObjects = iconSetConfiguration.workObjects;\n\n this.addCustomIcons(\n actors.keysArray(),\n actors,\n workObjects.keysArray(),\n workObjects,\n );\n\n return new Configuration(actors.keysArray(), workObjects.keysArray());\n }\n}\n\nexport const defaultIconSet = {\n actors: ['Person', 'Group', 'System'],\n workObjects: ['Document', 'Folder', 'Call', 'Email', 'Conversation', 'Info'],\n};\n","export enum IconFilterOptions {\n ONLY_ACTORS = 'ICON_FILTER_ACTOR',\n ONLY_WORKOBJECTS = 'ICON_FILTER_WORKOBJECT',\n ONLY_UNASSIGNED = 'ICON_FILTER_UNASSIGNED',\n NO_FILTER = '',\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 { IconFilterOptions } from '../../domain/iconFilterOptions';\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(IconFilterOptions.NO_FILTER);\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 !== IconFilterOptions.ONLY_ACTORS) {\n this.filter.next(IconFilterOptions.ONLY_ACTORS);\n } else {\n this.filter.next(IconFilterOptions.NO_FILTER);\n }\n }\n\n filterForWorkobjects(): void {\n if (this.filter.value !== IconFilterOptions.ONLY_WORKOBJECTS) {\n this.filter.next(IconFilterOptions.ONLY_WORKOBJECTS);\n } else {\n this.filter.next(IconFilterOptions.NO_FILTER);\n }\n }\n\n filterForUnassigned(): void {\n if (this.filter.value !== IconFilterOptions.ONLY_UNASSIGNED) {\n this.filter.next(IconFilterOptions.ONLY_UNASSIGNED);\n } else {\n this.filter.next(IconFilterOptions.NO_FILTER);\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: IconFilterOptions): string[] {\n let allFiltered: string[] = [];\n switch (type) {\n case IconFilterOptions.NO_FILTER:\n allFiltered = this.allIconNames.value;\n break;\n case IconFilterOptions.ONLY_ACTORS:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.iconSetCustomizationService.isIconActor(name),\n );\n break;\n case IconFilterOptions.ONLY_WORKOBJECTS:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.iconSetCustomizationService.isIconWorkObject(name),\n );\n break;\n case IconFilterOptions.ONLY_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 Work Objects\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 defaultIconSet,\n IconConfiguration,\n} from 'src/app/tools/icon-set-config/domain/iconConfiguration';\nimport {\n builtInIcons,\n customIcons,\n} from 'src/app/tools/icon-set-config/domain/allIcons';\nimport { sanitizeIconName } from '../../../utils/sanitizer';\nimport getIconId = ElementTypes.getIconId;\nimport { IconSet } from '../../../domain/entities/iconSet';\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 builtInIconsDictionary = new Dictionary();\n private iconDictionaryForBPMN = new Dictionary();\n\n private customConfiguration?: IconSet;\n\n private readonly iconConfig: IconConfiguration;\n\n constructor() {\n this.builtInIconsDictionary.addEach(builtInIcons);\n this.iconConfig = new IconConfiguration(this.builtInIconsDictionary);\n }\n\n initTypeDictionaries(actors: string[], workObjects: string[]): void {\n if (!actors || actors.length == 0) {\n actors = defaultIconSet.actors;\n }\n if (!workObjects || workObjects.length == 0) {\n workObjects = defaultIconSet.workObjects;\n }\n\n const allTypes = new Dictionary();\n allTypes.addEach(builtInIcons);\n allTypes.appendDict(this.getCustomIconsDictionary());\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(builtInIcons);\n allTypes.appendDict(customIcons);\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: IconSet,\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 customIcons.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.builtInIconsDictionary);\n fullDictionary.appendDict(this.getCustomIconsDictionary());\n return fullDictionary;\n }\n\n getCustomIconsDictionary(): Dictionary {\n const appendedDict = new Dictionary();\n customIcons.keysArray().forEach((key) => {\n if (!this.builtInIconsDictionary.has(key)) {\n appendedDict.set(key, customIcons.get(key));\n }\n });\n return appendedDict;\n }\n\n getIconsAssignedAs(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 getNamesOfIconsAssignedAs(type: ElementTypes): string[] {\n return this.getIconsAssignedAs(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.builtInIconsDictionary.has(name)) {\n return this.builtInIconsDictionary.get(name);\n } else if (customIcons.has(name)) {\n return customIcons.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.builtInIconsDictionary;\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: IconSet): 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 { defaultIconSet } from '../domain/iconConfiguration';\nimport { TitleService } from '../../title/services/title.service';\nimport {\n ICON_SET_CONFIGURATION_KEY,\n INITIAL_ICON_SET_NAME,\n} from '../../../domain/entities/constants';\nimport { IconSet } from '../../../domain/entities/iconSet';\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(customConfig: IconSet, updateIconSetName = true): 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 .addCustomIcons(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(): IconSet | 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(): IconSet {\n const minimalConfig = this.createConfigFromCanvas();\n\n defaultIconSet.actors.forEach((iconName) => {\n minimalConfig.actors.add(\n this.iconDictionaryService.getIconSource(iconName),\n iconName,\n );\n });\n defaultIconSet.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 ): IconSet {\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 ): IconSet {\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(): IconSet | undefined {\n const iconSetString = this.storageService.get(ICON_SET_CONFIGURATION_KEY);\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: IconSet): 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_KEY,\n JSON.stringify(configForStorage, null, 2),\n );\n }\n\n private createConfigFromCanvas(): IconSet {\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(iconSetConfiguration: IconSet) {\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 { IconSet } from '../../../domain/entities/iconSet';\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(): IconSet;\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: IconSet | 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(customConfig: IconSet, saveIconSet = true): 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(): IconSet | undefined {\n const temp = this.changedIconSetConfiguration;\n this.changedIconSetConfiguration = undefined;\n\n return temp;\n }\n\n private createIconSetConfiguration(): IconSet {\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: IconSet) {\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 SNACKBAR_SUCCESS,\n} from '../../../domain/entities/constants';\nimport { IconSetConfigurationService } from '../../icon-set-config/services/icon-set-configuration.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { IconSet } from '../../../domain/entities/iconSet';\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: IconSet | null = null;\n\n private importedConfigurationEmitter = 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(): IconSet {\n const config: IconSet = {\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\n this.import(file, file.name);\n this.modelerService.commandStackChanged();\n }\n\n performDropImport(file: File): void {\n if (this.isSupportedFileEnding(file.name)) {\n this.import(file, file.name);\n } else {\n this.snackbar.open('File type 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\n fileUrl = this.convertToDownloadableUrl(fileUrl);\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]\n .replace(/%20/g, ' ')\n .replace(/(\\.egn\\.svg).*/, '$1');\n\n if (!filename) {\n throw new Error('Unable to extract filename from URL');\n }\n\n if (this.isSupportedFileEnding(filename)) {\n this.import(blob, filename);\n } else {\n this.snackbar.open('File type not supported', 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 private convertToDownloadableUrl(fileUrl: string): string {\n // Convert GitHub URLs to raw content\n const githubPattern = /https:\\/\\/github\\.com\\/(.+)\\/(blob|blame)\\/(.+)/;\n if (githubPattern.test(fileUrl)) {\n fileUrl = fileUrl.replace(\n githubPattern,\n 'https://raw.githubusercontent.com/$1/$3',\n );\n }\n\n //Convert Dropbox URLs to dl content\n const dropboxPattern = /https:\\/\\/www\\.dropbox\\.com\\/(.+)/;\n if (dropboxPattern.test(fileUrl)) {\n fileUrl = fileUrl.replace(dropboxPattern, 'https://dl.dropbox.com/$1');\n }\n\n return fileUrl;\n }\n\n private isSupportedFileEnding(filename: string) {\n let isSupported = false;\n\n const dstSvgPattern = /.*(.dst)(\\s*\\(\\d+\\)){0,1}\\.svg/;\n const egnSvgPattern = /.*(.egn)(\\s*\\(\\d+\\)){0,1}\\.svg/;\n\n if (filename != null) {\n isSupported =\n filename.endsWith('.dst') ||\n filename.endsWith('.egn') ||\n filename.match(dstSvgPattern) != null ||\n filename.match(egnSvgPattern) != null;\n }\n\n return isSupported;\n }\n\n openImportFromUrlDialog(): 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 import(input: Blob, filename: string): void {\n const egnSvgPattern = /.*(.egn)(\\s*\\(\\d+\\)){0,1}\\.svg/;\n const isSVG = filename.endsWith('.svg');\n let isEGN = filename.endsWith('.egn');\n\n if (isSVG) {\n isEGN = filename.match(egnSvgPattern) != null;\n }\n\n try {\n const fileReader = new FileReader();\n\n const titleText = this.restoreTitleFromFileName(filename, isSVG);\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, isEGN);\n }\n };\n fileReader.readAsText(input);\n this.importSuccessful();\n } catch (error) {\n this.importFailed();\n }\n }\n\n private fileReaderFunction(\n text: string | ArrayBuffer | null,\n isSvgFile: boolean,\n isEgnFormat: boolean,\n ): void {\n let contentAsJson;\n if (typeof text === 'string') {\n if (isSvgFile) {\n contentAsJson = this.extractJsonFromSvgComment(text);\n } else {\n contentAsJson = text;\n }\n\n let elements: any[];\n let iconSetConfig: IconSet;\n let iconSetFromFile: {\n name: string;\n actors: { [key: string]: any };\n workObjects: { [key: string]: any };\n };\n\n let storyAndIconSet = this.extractStoryAndIconSet(contentAsJson);\n if (storyAndIconSet == null) {\n return;\n }\n\n // current implementation\n if (storyAndIconSet.domain) {\n iconSetFromFile = isEgnFormat\n ? storyAndIconSet.domain\n : JSON.parse(storyAndIconSet.domain);\n iconSetConfig =\n this.iconSetConfigurationService.createIconSetConfiguration(\n iconSetFromFile,\n );\n elements = isEgnFormat\n ? storyAndIconSet.dst\n : JSON.parse(storyAndIconSet.dst);\n } else {\n // legacy implementation\n if (storyAndIconSet.config) {\n iconSetFromFile = JSON.parse(storyAndIconSet.config);\n iconSetConfig =\n this.iconSetConfigurationService.createIconSetConfiguration(\n iconSetFromFile,\n );\n elements = JSON.parse(storyAndIconSet.dst);\n } else {\n // even older legacy implementation (prior to configurable icon set):\n elements = JSON.parse(contentAsJson);\n iconSetConfig =\n this.iconSetConfigurationService.createMinimalConfigurationWithDefaultIcons();\n }\n }\n\n this.importRepairService.removeWhitespacesFromIcons(elements);\n\n const configChanged = this.checkConfigForChanges(iconSetConfig);\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 tag 'version',\n // then there exists another tag 'info' for the description\n if (importVersionNumber.version) {\n lastElement = elements.pop();\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, iconSetConfig);\n this.rendererService.importStory(elements, configChanged, iconSetConfig);\n }\n }\n\n private importSuccessful() {\n this.snackbar.open('Import successful', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n });\n }\n\n private importFailed() {\n this.snackbar.open('Import failed', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_ERROR,\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 extractStoryAndIconSet(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 extractJsonFromSvgComment(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: IconSet): boolean {\n const newActorKeys = iconSetConfiguration.actors.keysArray();\n const newWorkObjectKeys = iconSetConfiguration.workObjects.keysArray();\n\n const currentActorKeys =\n this.iconDictionaryService.getNamesOfIconsAssignedAs(ElementTypes.ACTOR);\n const currentWorkobjectKeys =\n this.iconDictionaryService.getNamesOfIconsAssignedAs(\n ElementTypes.WORKOBJECT,\n );\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: IconSet,\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: IconSet) {\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 { CommonModule } from '@angular/common';\nimport { MaterialModule } from '../../../material.module';\nimport { ReactiveFormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [ActivityDialogComponent],\n exports: [ActivityDialogComponent],\n imports: [CommonModule, MaterialModule, ReactiveFormsModule],\n})\nexport class ModelerModule {}\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 { IconSet } from '../../../domain/entities/iconSet';\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?: IconSet,\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 { IconSet } from '../../../domain/entities/iconSet';\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?: IconSet,\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 openImportFromUrlDialog = 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 openImportFromUrlDialog(): void {\n this.importService.openImportFromUrlDialog();\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 { IconSet } from '../../../domain/entities/iconSet';\n\n@Component({\n selector: 'app-settings',\n templateUrl: './settings.component.html',\n styleUrls: ['./settings.component.scss'],\n})\nexport class SettingsComponent {\n iconSetConfiguration: IconSet | 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.2.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","getIconsAssignedAs","replaceOption","keysArray","actorType","typeName","toLowerCase","getIconForBPMN","workObjectTypes","workObjectType","ContextPadProvider","bind","generateAutomaticNumber","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","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","Dictionary","configuration","initializePalette","configurationService","PaletteProvider","palette","spaceTool","lassoTool","_create","_elementFactory","_spaceTool","_lassoTool","getPaletteEntries","createAction","createListener","isExpanded","shortType","initPalette","appendCSSStyleCheat","customIcons","sheetEl","head","customIconDict","appendDict","customIconDictKeys","getCustomIconsDictionary","has","src","iconStyle","wrapSRCInSVG","sheet","insertRule","cssRules","config","getCurrentIconConfigurationForBPMN","initTypeDictionaries","actors","workObjects","addCanvasObjectTypes","separator","activateSelection","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_KEY","DRAFTS_KEY","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","putEntry","addEach","keys","dict","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","seenIds","Set","groupObject","isNewId","registryElementNames","sort","activityCanvasA","activityCanvasB","activityNumberA","activityNumberB","getUsedIcons","getAllActors","workobjects","getAllWorkobjects","a","w","co","StorageService","localStorage","setItem","JSON","stringify","json","getItem","parse","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","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_22_Template_button_click_0_listener","i_r2","$index","ctx_r2","doOption","option_r4","ExportDialogComponent","isAnimatedSvgExport","withTitle","useWhiteBackground","updateWithTitle","updateUseWhiteBackground","ExportDialogComponent_Template","ExportDialogComponent_Template_input_change_4_listener","ExportDialogComponent_Template_input_change_9_listener","ExportDialogComponent_Template_input_ngModelChange_14_listener","ExportDialogComponent_Template_button_click_19_listener","ExportDialogComponent_For_22_Template","sanitizeForDesktop","formatDate","pngService","svgService","htmlPresentationService","dialogService","titleSubscription","title$","descriptionSubscription","description$","ngOnDestroy","unsubscribe","DomainStory","getCurrentConfigurationForExport","getStoryForDownload","filename","getCurrentDateString","downloadFile","datatype","fileEnding","encodeURIComponent","display","downloadSVG","isAnimated","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","createAnimatedSvg","viewBoxWidth","viewBoxHeight","findIndexToInsertData","svgIndex","backgroundColorWhite","appendDST","traceActivitiesAndCreateStory","usedElementId","storyLength","visibleTimeInPercent","durationOfAnimation","senteceCounter","currentVisibleTimeInPercent","previouVisibleTimeInPercent","sentence","objectId","idIndex","insertIdIndex","builtInIcons","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","addCustomIcons","newIcons","IconConfiguration","allIconDictionary","iconSetName","getDefaultConf","defaultIconSet","actorsDict","workObjectsDict","newCustomIcons","createCustomConf","iconSetConfiguration","IconFilterOptions","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","NO_FILTER","selectedActors","selectedWorkobjects","allIconNames","allFilteredIconNames","iconSetConfigurationTypes","getIconSetConfiguration","allIcons","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","ONLY_ACTORS","filterForWorkobjects","ONLY_WORKOBJECTS","filterForUnassigned","ONLY_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$","changeName","listName","list","sortedList","setSelectedActors","setSelectedWorkObject","IconSetDetailsComponent_Template","IconSetDetailsComponent_Template_input_input_5_listener","IconSetDetailsComponent_For_12_Template","IconSetDetailsComponent_For_19_Template","actorIconDictionary","workObjectDictionary","builtInIconsDictionary","iconDictionaryForBPMN","iconConfig","allTypes","initDictionary","dictionary","customConfiguration","allInTypeDictionary","collection","allIn","addIconsFromIconSetConfiguration","dictionaryType","iconTypes","registerIconForType","addIconsToTypeDictionary","unregisterIconForType","extractCustomIconsFromDictionary","addNewIconsToDictionary","elementDictionary","sanitizedName","custom","addIconsToCss","fullDictionary","appendedDict","getNamesOfIconsAssignedAs","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","import","commandStackChanged","isSupportedFileEnding","importFromUrl","convertToDownloadableUrl","fetch","response","blob","catch","githubPattern","dropboxPattern","isSupported","dstSvgPattern","egnSvgPattern","endsWith","openImportFromUrlDialog","isSVG","isEGN","fileReader","titleText","restoreTitleFromFileName","fileReaderFunction","importSuccessful","error","importFailed","isSvgFile","isEgnFormat","contentAsJson","extractJsonFromSvgComment","iconSetConfig","iconSetFromFile","storyAndIconSet","extractStoryAndIconSet","removeWhitespacesFromIcons","configChanged","checkConfigForChanges","lastElement","importVersionNumber","handleVersionNumber","checkForUnreferencedElementsInActivitiesAndRepair","showBrokenImportDialog","adjustPositions","versionPrefix","lastIndexOf","updateCustomElementsPreviousV050","showPreviousV050Dialog","dstText","dstAndConfig","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","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","ReactiveFormsModule","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","initializeReplay","showCurrentSentence","checkSequenceNumbers","missingSentences","getMissingSentences","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","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_openImportFromUrlDialog_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"],"sourceRoot":"webpack:///","x_google_ignoreList":[]} \ No newline at end of file