diff --git a/app-latest-build/main.js b/app-latest-build/main.js index d69a88e..cca45cc 100644 --- a/app-latest-build/main.js +++ b/app-latest-build/main.js @@ -345,7 +345,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! min-dash */ 81410); /* harmony import */ var _numbering_numbering__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../numbering/numbering */ 91490); /* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); -/* harmony import */ var src_app_Domain_Domain_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/Domain/Domain-Configuration/allIcons */ 13960); +/* harmony import */ var src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/Domain/Icon-Set-Configuration/allIcons */ 57488); @@ -379,7 +379,7 @@ function DomainStoryContextPadProvider(injector, connect, translate, elementFact popupMenu.registerProvider("ds-replace", replaceMenuProvider); popupMenu.registerProvider("bpmn-replace", replaceMenuProvider); this.getContextPadEntries = function (element) { - const allStandardIconKeys = (0,src_app_Domain_Domain_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.getAllStandardIconKeys)(); + const allStandardIconKeys = (0,src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.getAllStandardIconKeys)(); let actions = cached(element); startConnect = function (event, element, autoActivate) { connect.start(event, element, autoActivate); @@ -3043,7 +3043,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ initializePalette: () => (/* binding */ initializePalette) /* harmony export */ }); /* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dash */ 81410); -/* harmony import */ var src_app_Domain_Domain_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Domain-Configuration/allIcons */ 13960); +/* harmony import */ var src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Icon-Set-Configuration/allIcons */ 57488); /* harmony import */ var src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Common/dictionary/dictionary */ 54972); /* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); /* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Domain/Common/constants */ 90816); @@ -3130,7 +3130,7 @@ function initPalette(actions, spaceTool, lassoTool, createAction) { customIcons.entries.forEach(entry => { customIconsDict.putEntry(entry); }); - (0,src_app_Domain_Domain_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_0__.overrideAppendedIcons)(customIconsDict); + (0,src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_0__.overrideAppendedIcons)(customIconsDict); appendCSSStyleCheat(customIcons); } } @@ -3781,10 +3781,10 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ DEFAULT_AUTOSAVES_ENABLED: () => (/* binding */ DEFAULT_AUTOSAVES_ENABLED), /* harmony export */ DEFAULT_AUTOSAVES_INTERVAL: () => (/* binding */ DEFAULT_AUTOSAVES_INTERVAL), /* harmony export */ DEFAULT_AUTOSAVES_MAX_DRAFTS: () => (/* binding */ DEFAULT_AUTOSAVES_MAX_DRAFTS), -/* harmony export */ DOMAIN_CONFIGURATION_TAG: () => (/* binding */ DOMAIN_CONFIGURATION_TAG), +/* harmony export */ ICON_SET_CONFIGURATION_TAG: () => (/* binding */ ICON_SET_CONFIGURATION_TAG), /* harmony export */ IMPLICIT_ROOT_ID: () => (/* binding */ IMPLICIT_ROOT_ID), /* harmony export */ INITIAL_DESCRIPTION: () => (/* binding */ INITIAL_DESCRIPTION), -/* harmony export */ INITIAL_DOMAIN_NAME: () => (/* binding */ INITIAL_DOMAIN_NAME), +/* harmony export */ INITIAL_ICON_SET_NAME: () => (/* binding */ INITIAL_ICON_SET_NAME), /* harmony export */ INITIAL_TITLE: () => (/* binding */ INITIAL_TITLE), /* harmony export */ SNACKBAR_DURATION: () => (/* binding */ SNACKBAR_DURATION), /* harmony export */ SNACKBAR_ERROR: () => (/* binding */ SNACKBAR_ERROR), @@ -3794,10 +3794,11 @@ __webpack_require__.r(__webpack_exports__); /** DEFAULT VALUES **/ const INITIAL_TITLE = '< title >'; const INITIAL_DESCRIPTION = ''; -const INITIAL_DOMAIN_NAME = 'default'; +const INITIAL_ICON_SET_NAME = 'default'; /** LocalStorageTags **/ const APPENDED_ICONS_TAG = 'appendedIcons'; -const DOMAIN_CONFIGURATION_TAG = 'domainConfigurationTag'; +// String value of tag should not be renamed, because existing configurations would not load +const ICON_SET_CONFIGURATION_TAG = 'domainConfigurationTag'; /** AUTOSAVE DEFAULTS **/ const DEFAULT_AUTOSAVES_ENABLED = true; const DEFAULT_AUTOSAVES_MAX_DRAFTS = 5; @@ -3904,50 +3905,6 @@ class Entry { /***/ }), -/***/ 82011: -/*!******************************************************!*\ - !*** ./src/app/Domain/Common/domainConfiguration.ts ***! - \******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ fromConfigurationFromFile: () => (/* binding */ fromConfigurationFromFile), -/* harmony export */ testCustomDomainConfiguration: () => (/* binding */ testCustomDomainConfiguration) -/* harmony export */ }); -/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ 90816); -/* harmony import */ var _businessObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./businessObject */ 78828); -/* harmony import */ var _elementTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./elementTypes */ 30236); -/* harmony import */ var _dictionary_dictionary__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dictionary/dictionary */ 54972); - - - - -const actor = structuredClone(_businessObject__WEBPACK_IMPORTED_MODULE_1__.testBusinessObject); -actor.type = _elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR; -const testCustomDomainConfiguration = { - name: _constants__WEBPACK_IMPORTED_MODULE_0__.INITIAL_DOMAIN_NAME, - actors: ['Person'], - workObjects: ['Document'] -}; -function fromConfigurationFromFile(configFromFile) { - const actorsDict = new _dictionary_dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary(); - const workObjectsDict = new _dictionary_dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary(); - Object.keys(configFromFile.actors).forEach(key => { - actorsDict.add(configFromFile.actors[key], key); - }); - Object.keys(configFromFile.workObjects).forEach(key => { - workObjectsDict.add(configFromFile.workObjects[key], key); - }); - return { - name: configFromFile.name, - actors: actorsDict, - workObjects: workObjectsDict - }; -} - -/***/ }), - /***/ 30236: /*!***********************************************!*\ !*** ./src/app/Domain/Common/elementTypes.ts ***! @@ -3983,7 +3940,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ defaultConf: () => (/* binding */ defaultConf) /* harmony export */ }); /* harmony import */ var src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/dictionary/dictionary */ 54972); -/* harmony import */ var src_app_Domain_Domain_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Domain-Configuration/allIcons */ 13960); +/* harmony import */ var src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Icon-Set-Configuration/allIcons */ 57488); /* harmony import */ var src_app_Domain_Common_configuration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Domain/Common/configuration */ 80775); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ 90816); @@ -3992,7 +3949,7 @@ __webpack_require__.r(__webpack_exports__); class IconConfiguration { constructor(allIconDictionary) { - this.domainName = _constants__WEBPACK_IMPORTED_MODULE_3__.INITIAL_DOMAIN_NAME; + this.domainName = _constants__WEBPACK_IMPORTED_MODULE_3__.INITIAL_ICON_SET_NAME; this.allIconDictionary = allIconDictionary; } /** @@ -4020,7 +3977,7 @@ class IconConfiguration { Object.keys(newAppendedIcons).forEach(key => { appen.set(key, newAppendedIcons[key]); }); - (0,src_app_Domain_Domain_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_1__.overrideAppendedIcons)(appen); + (0,src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_1__.overrideAppendedIcons)(appen); } createCustomConf(domainConfiguration) { this.domainName = domainConfiguration.name; @@ -4050,6 +4007,50 @@ const defaultConf = { /***/ }), +/***/ 84738: +/*!*******************************************************!*\ + !*** ./src/app/Domain/Common/iconSetConfiguration.ts ***! + \*******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ fromConfigurationFromFile: () => (/* binding */ fromConfigurationFromFile), +/* harmony export */ testCustomIconSetConfiguration: () => (/* binding */ testCustomIconSetConfiguration) +/* harmony export */ }); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ 90816); +/* harmony import */ var _businessObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./businessObject */ 78828); +/* harmony import */ var _elementTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./elementTypes */ 30236); +/* harmony import */ var _dictionary_dictionary__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dictionary/dictionary */ 54972); + + + + +const actor = structuredClone(_businessObject__WEBPACK_IMPORTED_MODULE_1__.testBusinessObject); +actor.type = _elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR; +const testCustomIconSetConfiguration = { + name: _constants__WEBPACK_IMPORTED_MODULE_0__.INITIAL_ICON_SET_NAME, + actors: ['Person'], + workObjects: ['Document'] +}; +function fromConfigurationFromFile(configFromFile) { + const actorsDict = new _dictionary_dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary(); + const workObjectsDict = new _dictionary_dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary(); + Object.keys(configFromFile.actors).forEach(key => { + actorsDict.add(configFromFile.actors[key], key); + }); + Object.keys(configFromFile.workObjects).forEach(key => { + workObjectsDict.add(configFromFile.workObjects[key], key); + }); + return { + name: configFromFile.name, + actors: actorsDict, + workObjects: workObjectsDict + }; +} + +/***/ }), + /***/ 93703: /*!*****************************************************!*\ !*** ./src/app/Domain/Dialog/activityDialogData.ts ***! @@ -4146,10 +4147,54 @@ const HIGHLIGHT_STROKE_WIDTH = '4'; /***/ }), -/***/ 13960: -/*!*********************************************************!*\ - !*** ./src/app/Domain/Domain-Configuration/allIcons.ts ***! - \*********************************************************/ +/***/ 74306: +/*!***********************************************!*\ + !*** ./src/app/Domain/Export/configAndDst.ts ***! + \***********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ConfigAndDST: () => (/* binding */ ConfigAndDST), +/* harmony export */ testConfigAndDst: () => (/* binding */ testConfigAndDst) +/* harmony export */ }); +class ConfigAndDST { + constructor(domain, dst) { + this.domain = domain; + this.dst = dst; + } +} +const testConfigAndDst = { + domain: JSON.parse('{"name":"",' + '"actors":{"Person":"' + '' + '",' + '"Group":"' + '' + '",' + '"System":"' + '"},' + '"workObjects":{"Document":"' + '",' + '"Folder":"' + '' + '",' + '"Call":"' + '",' + '"Email":"' + '",' + '"Conversation":"' + '",' + '"Info":"' + '' + '"}}'), + dst: '[' + '{"type":"domainStory:workObjectDocument","name":"","id":"shape_3792","$type":"Element","di":{},"$descriptor":{},"pickedColor":"black","x":302,"y":102},' + '{"type":"domainStory:actorPerson","name":"","id":"shape_4666","$type":"Element","di":{},"$descriptor":{},"pickedColor":"black","x":103,"y":93},' + '{"type":"domainStory:activity","name":"","id":"connection_4884","$type":"Element","di":{},"$descriptor":{},"pickedColor":"black","number":1,' + '"waypoints":[{"original":{"x":141,"y":131},"x":186,"y":133},{"original":{"x":340,"y":140},"x":302,"y":138}],' + '"source":"shape_4666","target":"shape_3792"}]' +}; + +/***/ }), + +/***/ 27901: +/*!**************************************************!*\ + !*** ./src/app/Domain/Export/exportConstants.ts ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SVG_LINK: () => (/* binding */ SVG_LINK), +/* harmony export */ TEXTSPAN_DESCRIPTION_HEIGHT: () => (/* binding */ TEXTSPAN_DESCRIPTION_HEIGHT), +/* harmony export */ TEXTSPAN_TITLE_HEIGHT: () => (/* binding */ TEXTSPAN_TITLE_HEIGHT), +/* harmony export */ X_OFFSET_UTIL: () => (/* binding */ X_OFFSET_UTIL) +/* harmony export */ }); +const SVG_LINK = 'http://www.w3.org/2000/svg'; +const X_OFFSET_UTIL = '8'; +const TEXTSPAN_TITLE_HEIGHT = 30; +const TEXTSPAN_DESCRIPTION_HEIGHT = 15; + +/***/ }), + +/***/ 57488: +/*!***********************************************************!*\ + !*** ./src/app/Domain/Icon-Set-Configuration/allIcons.ts ***! + \***********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -4266,10 +4311,10 @@ function overrideAppendedIcons(newIcons) { /***/ }), -/***/ 16289: -/*!***************************************************************!*\ - !*** ./src/app/Domain/Domain-Configuration/iconFilterEnum.ts ***! - \***************************************************************/ +/***/ 36105: +/*!*****************************************************************!*\ + !*** ./src/app/Domain/Icon-Set-Configuration/iconFilterEnum.ts ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -4286,50 +4331,6 @@ var IconFilterEnum; /***/ }), -/***/ 74306: -/*!***********************************************!*\ - !*** ./src/app/Domain/Export/configAndDst.ts ***! - \***********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ ConfigAndDST: () => (/* binding */ ConfigAndDST), -/* harmony export */ testConfigAndDst: () => (/* binding */ testConfigAndDst) -/* harmony export */ }); -class ConfigAndDST { - constructor(domain, dst) { - this.domain = domain; - this.dst = dst; - } -} -const testConfigAndDst = { - domain: JSON.parse('{"name":"",' + '"actors":{"Person":"' + '' + '",' + '"Group":"' + '' + '",' + '"System":"' + '"},' + '"workObjects":{"Document":"' + '",' + '"Folder":"' + '' + '",' + '"Call":"' + '",' + '"Email":"' + '",' + '"Conversation":"' + '",' + '"Info":"' + '' + '"}}'), - dst: '[' + '{"type":"domainStory:workObjectDocument","name":"","id":"shape_3792","$type":"Element","di":{},"$descriptor":{},"pickedColor":"black","x":302,"y":102},' + '{"type":"domainStory:actorPerson","name":"","id":"shape_4666","$type":"Element","di":{},"$descriptor":{},"pickedColor":"black","x":103,"y":93},' + '{"type":"domainStory:activity","name":"","id":"connection_4884","$type":"Element","di":{},"$descriptor":{},"pickedColor":"black","number":1,' + '"waypoints":[{"original":{"x":141,"y":131},"x":186,"y":133},{"original":{"x":340,"y":140},"x":302,"y":138}],' + '"source":"shape_4666","target":"shape_3792"}]' -}; - -/***/ }), - -/***/ 27901: -/*!**************************************************!*\ - !*** ./src/app/Domain/Export/exportConstants.ts ***! - \**************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ SVG_LINK: () => (/* binding */ SVG_LINK), -/* harmony export */ TEXTSPAN_DESCRIPTION_HEIGHT: () => (/* binding */ TEXTSPAN_DESCRIPTION_HEIGHT), -/* harmony export */ TEXTSPAN_TITLE_HEIGHT: () => (/* binding */ TEXTSPAN_TITLE_HEIGHT), -/* harmony export */ X_OFFSET_UTIL: () => (/* binding */ X_OFFSET_UTIL) -/* harmony export */ }); -const SVG_LINK = 'http://www.w3.org/2000/svg'; -const X_OFFSET_UTIL = '8'; -const TEXTSPAN_TITLE_HEIGHT = 30; -const TEXTSPAN_DESCRIPTION_HEIGHT = 15; - -/***/ }), - /***/ 90684: /*!*****************************************************!*\ !*** ./src/app/Modules/autosave-settings.module.ts ***! @@ -4423,10 +4424,10 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ SettingsModule: () => (/* binding */ SettingsModule) /* harmony export */ }); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/common */ 39191); -/* harmony import */ var src_app_Presentation_DomainConfiguration_domain_configuration_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Presentation/DomainConfiguration/domain-configuration.component */ 97394); +/* harmony import */ var src_app_Presentation_DomainConfiguration_icon_set_configuration_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Presentation/DomainConfiguration/icon-set-configuration.component */ 38574); /* harmony import */ var _Presentation_DomainConfiguration_icon_list_item_icon_list_item_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Presentation/DomainConfiguration/icon-list-item/icon-list-item.component */ 58414); /* harmony import */ var _Presentation_DomainConfiguration_details_list_item_details_list_item_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Presentation/DomainConfiguration/details-list-item/details-list-item.component */ 62748); -/* harmony import */ var _Presentation_DomainConfiguration_domain_details_domain_details_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Presentation/DomainConfiguration/domain-details/domain-details.component */ 1508); +/* harmony import */ var _Presentation_DomainConfiguration_icon_set_details_icon_set_details_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Presentation/DomainConfiguration/icon-set-details/icon-set-details.component */ 79052); /* harmony import */ var _Presentation_Settings_General_general_settings_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Presentation/Settings/General/general-settings.component */ 423); /* harmony import */ var _Presentation_LabelDictionary_label_dictionary_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Presentation/LabelDictionary/label-dictionary.component */ 86328); /* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/forms */ 48015); @@ -4457,9 +4458,9 @@ class SettingsModule { } (function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵsetNgModuleScope"](SettingsModule, { - declarations: [src_app_Presentation_DomainConfiguration_domain_configuration_component__WEBPACK_IMPORTED_MODULE_0__.DomainConfigurationComponent, _Presentation_Settings_General_general_settings_component__WEBPACK_IMPORTED_MODULE_4__.GeneralSettingsComponent, _Presentation_LabelDictionary_label_dictionary_component__WEBPACK_IMPORTED_MODULE_5__.LabelDictionaryComponent, _Presentation_DomainConfiguration_icon_list_item_icon_list_item_component__WEBPACK_IMPORTED_MODULE_1__.IconListItemComponent, _Presentation_DomainConfiguration_details_list_item_details_list_item_component__WEBPACK_IMPORTED_MODULE_2__.DetailsListItemComponent, _Presentation_DomainConfiguration_domain_details_domain_details_component__WEBPACK_IMPORTED_MODULE_3__.DomainDetailsComponent], + declarations: [src_app_Presentation_DomainConfiguration_icon_set_configuration_component__WEBPACK_IMPORTED_MODULE_0__.IconSetConfigurationComponent, _Presentation_Settings_General_general_settings_component__WEBPACK_IMPORTED_MODULE_4__.GeneralSettingsComponent, _Presentation_LabelDictionary_label_dictionary_component__WEBPACK_IMPORTED_MODULE_5__.LabelDictionaryComponent, _Presentation_DomainConfiguration_icon_list_item_icon_list_item_component__WEBPACK_IMPORTED_MODULE_1__.IconListItemComponent, _Presentation_DomainConfiguration_details_list_item_details_list_item_component__WEBPACK_IMPORTED_MODULE_2__.DetailsListItemComponent, _Presentation_DomainConfiguration_icon_set_details_icon_set_details_component__WEBPACK_IMPORTED_MODULE_3__.IconSetDetailsComponent], imports: [_autosave_settings_module__WEBPACK_IMPORTED_MODULE_7__.AutosaveSettingsModule, _angular_common__WEBPACK_IMPORTED_MODULE_9__.CommonModule, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.FormsModule, _material_module__WEBPACK_IMPORTED_MODULE_6__.MaterialModule], - exports: [_Presentation_Settings_General_general_settings_component__WEBPACK_IMPORTED_MODULE_4__.GeneralSettingsComponent, src_app_Presentation_DomainConfiguration_domain_configuration_component__WEBPACK_IMPORTED_MODULE_0__.DomainConfigurationComponent, _Presentation_LabelDictionary_label_dictionary_component__WEBPACK_IMPORTED_MODULE_5__.LabelDictionaryComponent] + exports: [_Presentation_Settings_General_general_settings_component__WEBPACK_IMPORTED_MODULE_4__.GeneralSettingsComponent, src_app_Presentation_DomainConfiguration_icon_set_configuration_component__WEBPACK_IMPORTED_MODULE_0__.IconSetConfigurationComponent, _Presentation_LabelDictionary_label_dictionary_component__WEBPACK_IMPORTED_MODULE_5__.LabelDictionaryComponent] }); })(); @@ -5381,90 +5382,222 @@ class DetailsListItemComponent { /***/ }), -/***/ 97394: -/*!************************************************************************************!*\ - !*** ./src/app/Presentation/DomainConfiguration/domain-configuration.component.ts ***! - \************************************************************************************/ +/***/ 58414: +/*!*********************************************************************************************!*\ + !*** ./src/app/Presentation/DomainConfiguration/icon-list-item/icon-list-item.component.ts ***! + \*********************************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ DomainConfigurationComponent: () => (/* binding */ DomainConfigurationComponent) +/* harmony export */ IconListItemComponent: () => (/* binding */ IconListItemComponent) /* harmony export */ }); -/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rxjs */ 95536); -/* harmony import */ var src_app_Domain_Common_domainConfiguration__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/domainConfiguration */ 82011); -/* harmony import */ var src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Utils/sanitizer */ 66107); -/* harmony import */ var _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Domain/Common/elementTypes */ 30236); -/* harmony import */ var _Domain_Domain_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Domain/Domain-Configuration/iconFilterEnum */ 16289); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/core */ 96623); -/* harmony import */ var src_app_Service_DomainConfiguration_domain_configuration_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/Service/DomainConfiguration/domain-configuration.service */ 68449); -/* harmony import */ var src_app_Service_DomainConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/Service/DomainConfiguration/icon-dictionary.service */ 29662); -/* harmony import */ var _Service_DomainConfiguration_domain_customization_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Service/DomainConfiguration/domain-customization.service */ 42854); -/* harmony import */ var src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/Service/ElementRegistry/element-registry.service */ 67613); -/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/common */ 39191); -/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/material/button */ 95912); -/* harmony import */ var _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/material/grid-list */ 84533); -/* harmony import */ var _angular_material_input__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/material/input */ 29836); -/* harmony import */ var _icon_list_item_icon_list_item_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./icon-list-item/icon-list-item.component */ 58414); -/* harmony import */ var _domain_details_domain_details_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./domain-details/domain-details.component */ 1508); - - - - - - - - - - - - +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ 95536); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _Service_IconSetConfiguration_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Service/IconSetConfiguration/icon-set-customization.service */ 87007); +/* harmony import */ var _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/button-toggle */ 68529); -function DomainConfigurationComponent_mat_grid_tile_46_Template(rf, ctx) { - if (rf & 1) { - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](0, "mat-grid-tile", 24); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelement"](1, "app-icon-list-item", 25); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); +class IconListItemComponent { + get name() { + return this.iconName; } - if (rf & 2) { - const iconName_r1 = ctx.$implicit; - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵproperty"]("colspan", 1)("rowspan", 1); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵadvance"](); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵproperty"]("iconName", iconName_r1); + get id() { + return 'domain-configuration-icon-' + this.iconName; } -} -class DomainConfigurationComponent { - constructor(configurationService, iconDictionaryService, domainCustomizationService, elementRegistryService) { - this.configurationService = configurationService; - this.iconDictionaryService = iconDictionaryService; + constructor(domainCustomizationService) { this.domainCustomizationService = domainCustomizationService; - this.elementRegistryService = elementRegistryService; - this.filter = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject(_Domain_Domain_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_NONE); - this.selectedActors = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject([]); - this.selectedWorkobjects = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject([]); - this.allIconNames = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject([]); - this.allFilteredIconNames = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject([]); - this.domainConfigurationTypes = this.domainCustomizationService.getDomainConfiguration().value; - this.allIcons = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject(this.iconDictionaryService.getFullDictionary()); - this.allIcons.subscribe(allIcons => { - this.allIconNames.next(allIcons.keysArray().sort(this.sortByName)); - }); - this.selectedActors = this.domainCustomizationService.selectedActors$; - this.selectedWorkobjects = this.domainCustomizationService.selectedWorkobjects$; + this.iconName = ''; + this.iconInitiated = false; + // @ts-ignore + this.icon = new rxjs__WEBPACK_IMPORTED_MODULE_1__.BehaviorSubject({}); + this.isActor = false; + this.isWorkobject = false; + this.isNone = true; } ngOnInit() { - this.filter.subscribe(type => { - let allFiltered = this.getFilteredNamesForType(type); - this.allFilteredIconNames.next(allFiltered.sort(this.sortByName)); + this.icon = this.domainCustomizationService.getIconForName(this.iconName); + if (!this.icon) { + return; + } + this.icon.subscribe(value => { + this.isActor = value.isActor; + this.isWorkobject = value.isWorkObject; + this.isNone = !(value.isActor || value.isWorkObject); }); + this.isActor = this.icon.value.isActor; + this.isWorkobject = this.icon.value.isWorkObject; + this.isNone = !(this.icon.value.isActor || this.icon.value.isWorkObject); } - sortByName(a, b) { - if (a.includes('_custom') == b.includes('_custom')) { - if (a < b) return -1;else { - return 1; + ngAfterViewChecked() { + this.createIcon(); + } + createIcon() { + const img = document.getElementById(this.id); + if (img && !this.iconInitiated) { + img.src = '' + this.icon.value?.svg; + this.iconInitiated = true; + } + } + toggleNone() { + this.domainCustomizationService.setAsUnassigned(this.iconName, this.icon.value.isActor); + } + toggleActor() { + this.domainCustomizationService.setAsActor(true, this.iconName); + } + toggleWorkobject() { + this.domainCustomizationService.setAsWorkobject(true, this.iconName); + } + static #_ = this.ɵfac = function IconListItemComponent_Factory(t) { + return new (t || IconListItemComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](_Service_IconSetConfiguration_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_0__.IconSetCustomizationService)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineComponent"]({ + type: IconListItemComponent, + selectors: [["app-icon-list-item"]], + inputs: { + iconName: "iconName" + }, + decls: 16, + vars: 13, + consts: [[1, "IconContainer"], [1, "content"], ["src", "", 1, "icon", 3, "id", "alt"], [1, "name"], [1, "footer"], [3, "change", "value", "checked"], [1, "toggleButtonTitle"]], + template: function IconListItemComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](0, "div", 0)(1, "div", 1); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](2, "img", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](3, "div", 3); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](4); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](5, "div", 4)(6, "mat-button-toggle-group")(7, "mat-button-toggle", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵlistener"]("change", function IconListItemComponent_Template_mat_button_toggle_change_7_listener() { + return ctx.toggleNone(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](8, "span", 6); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](9, "None"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](10, "mat-button-toggle", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵlistener"]("change", function IconListItemComponent_Template_mat_button_toggle_change_10_listener() { + return ctx.toggleActor(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](11, "span", 6); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](12, "Actor"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](13, "mat-button-toggle", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵlistener"]("change", function IconListItemComponent_Template_mat_button_toggle_change_13_listener() { + return ctx.toggleWorkobject(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](14, "span", 6); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](15, "Workobject"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()()()()(); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵpropertyInterpolate"]("id", ctx.id); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵpropertyInterpolate"]("alt", ctx.name); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtextInterpolate"](ctx.name); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](3); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("value", ctx.isNone)("checked", ctx.isNone); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](3); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵclassProp"]("activeMatButtonActor", ctx.isActor); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("value", ctx.isActor)("checked", ctx.isActor); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](3); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵclassProp"]("activeMatButtonWorkObject", ctx.isWorkobject); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("value", ctx.isWorkobject)("checked", ctx.isWorkobject); + } + }, + dependencies: [_angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_3__.MatButtonToggleGroup, _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_3__.MatButtonToggle], + styles: [".IconContainer[_ngcontent-%COMP%] {\n width: 170px;\n height: 170px;\n}\n\n.content[_ngcontent-%COMP%] {\n display: grid;\n grid-template-rows: auto auto;\n justify-items: center;\n}\n\n.icon[_ngcontent-%COMP%] {\n width: 50px;\n height: 50px;\n}\n\n.name[_ngcontent-%COMP%] {\n word-wrap: anywhere;\n max-height: 75px;\n overflow: hidden;\n padding-bottom: 2px;\n}\n\n.footer[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n}\n.footer[_ngcontent-%COMP%] .mat-button-toggle-label-content {\n font-size: 10pt !important;\n padding: 0 5px !important;\n line-height: inherit !important;\n}\n.footer[_ngcontent-%COMP%] .activeMatButtonActor button {\n background-color: #43acbf;\n color: #ffffff;\n}\n.footer[_ngcontent-%COMP%] .activ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gIGJhY2tncm91bmQtY29sb3I6ICMwMTY4Yjc7XG4gICAgY29sb3I6ICNmZmZmZmY7XG4gIH1cbn1cbiJdLCJzb3VyY2VSb290IjoiIn0= */"] + }); +} + +/***/ }), + +/***/ 38574: +/*!**************************************************************************************!*\ + !*** ./src/app/Presentation/DomainConfiguration/icon-set-configuration.component.ts ***! + \**************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ IconSetConfigurationComponent: () => (/* binding */ IconSetConfigurationComponent) +/* harmony export */ }); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rxjs */ 95536); +/* harmony import */ var src_app_Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/iconSetConfiguration */ 84738); +/* harmony import */ var src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Utils/sanitizer */ 66107); +/* harmony import */ var _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Domain/Common/elementTypes */ 30236); +/* harmony import */ var _Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Domain/Icon-Set-Configuration/iconFilterEnum */ 36105); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var src_app_Service_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/Service/IconSetConfiguration/icon-set-configuration.service */ 10200); +/* harmony import */ var src_app_Service_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/Service/IconSetConfiguration/icon-dictionary.service */ 93689); +/* harmony import */ var _Service_IconSetConfiguration_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Service/IconSetConfiguration/icon-set-customization.service */ 87007); +/* harmony import */ var src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/Service/ElementRegistry/element-registry.service */ 67613); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/material/button */ 95912); +/* harmony import */ var _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/material/grid-list */ 84533); +/* harmony import */ var _angular_material_input__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/material/input */ 29836); +/* harmony import */ var _icon_list_item_icon_list_item_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./icon-list-item/icon-list-item.component */ 58414); +/* harmony import */ var _icon_set_details_icon_set_details_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./icon-set-details/icon-set-details.component */ 79052); + + + + + + + + + + + + + + + + +function IconSetConfigurationComponent_mat_grid_tile_46_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](0, "mat-grid-tile", 24); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelement"](1, "app-icon-list-item", 25); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); + } + if (rf & 2) { + const iconName_r1 = ctx.$implicit; + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵproperty"]("colspan", 1)("rowspan", 1); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵproperty"]("iconName", iconName_r1); + } +} +class IconSetConfigurationComponent { + constructor(configurationService, iconDictionaryService, iconSetCustomizationService, elementRegistryService) { + this.configurationService = configurationService; + this.iconDictionaryService = iconDictionaryService; + this.iconSetCustomizationService = iconSetCustomizationService; + this.elementRegistryService = elementRegistryService; + this.filter = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject(_Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_NONE); + this.selectedActors = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject([]); + this.selectedWorkobjects = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject([]); + this.allIconNames = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject([]); + this.allFilteredIconNames = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject([]); + this.iconSetConfigurationTypes = this.iconSetCustomizationService.getIconSetConfiguration().value; + this.allIcons = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject(this.iconDictionaryService.getFullDictionary()); + this.allIcons.subscribe(allIcons => { + this.allIconNames.next(allIcons.keysArray().sort(this.sortByName)); + }); + this.selectedActors = this.iconSetCustomizationService.selectedActors$; + this.selectedWorkobjects = this.iconSetCustomizationService.selectedWorkobjects$; + } + ngOnInit() { + this.filter.subscribe(type => { + let allFiltered = this.getFilteredNamesForType(type); + this.allFilteredIconNames.next(allFiltered.sort(this.sortByName)); + }); + } + sortByName(a, b) { + if (a.includes('_custom') == b.includes('_custom')) { + if (a < b) return -1;else { + return 1; } } else { if (a.includes('_custom')) { @@ -5474,19 +5607,19 @@ class DomainConfigurationComponent { } } } - /** Default Domain **/ + /** Default Icon Set **/ loadMinimalIconConfigurationWithDefaultIcons() { - this.domainCustomizationService.resetDomain(); + this.iconSetCustomizationService.resetIconSet(); } loadInitialConfiguration() { - this.domainCustomizationService.cancel(); + this.iconSetCustomizationService.cancel(); } - /** Persist Domain **/ - saveDomain() { - this.domainCustomizationService.saveDomain(this.elementRegistryService.getUsedIcons()); + /** Persist Icon Set **/ + saveIconSet() { + this.iconSetCustomizationService.saveIconSet(this.elementRegistryService.getUsedIcons()); } - exportDomain() { - this.domainCustomizationService.exportDomain(); + exportIconSet() { + this.iconSetCustomizationService.exportIconSet(); } /** Add Custom Icon **/ startIconUpload() { @@ -5507,48 +5640,48 @@ class DomainConfigurationComponent { this.iconDictionaryService.registerIconForBPMN(iconName, src, _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR); this.allIcons.next(this.iconDictionaryService.getFullDictionary()); this.filter.next(this.filter.value); - this.domainCustomizationService.addNewIcon(iconName); + this.iconSetCustomizationService.addNewIcon(iconName); } }; reader.readAsDataURL(iconInputFile); } } - /** Import Domain **/ - startDomainImport() { + /** Import Icon Set **/ + startIconSetImport() { document.getElementById('importDomain')?.click(); } - importDomain() { + importIconSet() { // @ts-ignore - const domainInputFile = document.getElementById('importDomain').files[0]; + const iconSetInputFile = document.getElementById('importDomain').files[0]; const reader = new FileReader(); reader.onloadend = e => { const configFromFile = JSON.parse(e.target?.result); - const config = (0,src_app_Domain_Common_domainConfiguration__WEBPACK_IMPORTED_MODULE_0__.fromConfigurationFromFile)(configFromFile); + const config = (0,src_app_Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_0__.fromConfigurationFromFile)(configFromFile); this.configurationService.loadConfiguration(config, false); - this.domainCustomizationService.importConfiguration(config); + this.iconSetCustomizationService.importConfiguration(config); }; - reader.readAsText(domainInputFile); + reader.readAsText(iconSetInputFile); } /** Filter **/ filterForActors() { - if (this.filter.value !== _Domain_Domain_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_ACTOR) { - this.filter.next(_Domain_Domain_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_ACTOR); + if (this.filter.value !== _Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_ACTOR) { + this.filter.next(_Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_ACTOR); } else { - this.filter.next(_Domain_Domain_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_NONE); + this.filter.next(_Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_NONE); } } filterForWorkobjects() { - if (this.filter.value !== _Domain_Domain_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_WORKOBJECT) { - this.filter.next(_Domain_Domain_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_WORKOBJECT); + if (this.filter.value !== _Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_WORKOBJECT) { + this.filter.next(_Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_WORKOBJECT); } else { - this.filter.next(_Domain_Domain_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_NONE); + this.filter.next(_Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_NONE); } } filterForUnassigned() { - if (this.filter.value !== _Domain_Domain_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_UNASSIGNED) { - this.filter.next(_Domain_Domain_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_UNASSIGNED); + if (this.filter.value !== _Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_UNASSIGNED) { + this.filter.next(_Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_UNASSIGNED); } else { - this.filter.next(_Domain_Domain_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_NONE); + this.filter.next(_Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_NONE); } } filterByNameAndType($event) { @@ -5558,38 +5691,38 @@ class DomainConfigurationComponent { getFilteredNamesForType(type) { let allFiltered = []; switch (type) { - case _Domain_Domain_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_NONE: + case _Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_NONE: allFiltered = this.allIconNames.value; break; - case _Domain_Domain_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_ACTOR: - allFiltered = this.allIconNames.value.filter(name => this.domainCustomizationService.isIconActor(name)); + case _Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_ACTOR: + allFiltered = this.allIconNames.value.filter(name => this.iconSetCustomizationService.isIconActor(name)); break; - case _Domain_Domain_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_WORKOBJECT: - allFiltered = this.allIconNames.value.filter(name => this.domainCustomizationService.isIconWorkObject(name)); + case _Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_WORKOBJECT: + allFiltered = this.allIconNames.value.filter(name => this.iconSetCustomizationService.isIconWorkObject(name)); break; - case _Domain_Domain_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_UNASSIGNED: - allFiltered = this.allIconNames.value.filter(name => !this.domainCustomizationService.isIconActor(name) && !this.domainCustomizationService.isIconWorkObject(name)); + case _Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_UNASSIGNED: + allFiltered = this.allIconNames.value.filter(name => !this.iconSetCustomizationService.isIconActor(name) && !this.iconSetCustomizationService.isIconWorkObject(name)); break; } return allFiltered; } - static #_ = this.ɵfac = function DomainConfigurationComponent_Factory(t) { - return new (t || DomainConfigurationComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](src_app_Service_DomainConfiguration_domain_configuration_service__WEBPACK_IMPORTED_MODULE_4__.DomainConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](src_app_Service_DomainConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](_Service_DomainConfiguration_domain_customization_service__WEBPACK_IMPORTED_MODULE_6__.DomainCustomizationService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_7__.ElementRegistryService)); + static #_ = this.ɵfac = function IconSetConfigurationComponent_Factory(t) { + return new (t || IconSetConfigurationComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](src_app_Service_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_4__.IconSetConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](src_app_Service_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](_Service_IconSetConfiguration_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_6__.IconSetCustomizationService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_7__.ElementRegistryService)); }; static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdefineComponent"]({ - type: DomainConfigurationComponent, - selectors: [["app-domain-configuration"]], + type: IconSetConfigurationComponent, + selectors: [["app-icon-set-configuration"]], decls: 49, vars: 15, - consts: [[1, "content"], [1, "header"], [1, "searchbar"], ["mat-button", "", "title", "Unassigned Icons", 3, "click"], ["mat-button", "", "title", "Actors", 3, "click"], ["mat-button", "", "title", "Workobjects", 3, "click"], ["matInput", "", "type", "text", "placeholder", "Filter by name", 1, "textInput", 3, "input"], [1, "buttons"], ["mat-button", "", "title", "Upload Icon", 3, "click"], [1, "material-icons-outlined", "materialIconButton"], ["type", "file", "multiple", "", "accept", ".svg, image/png, image/jpeg, image/gif, image/bpmn", "id", "importIcon", "name", "file", "onclick", "this.value=null", 2, "display", "none", 3, "change"], ["mat-button", "", "title", "Reset to default icon set", 1, "button", 3, "click"], ["mat-button", "", "title", "Cancel changes", 3, "click"], [1, "divider"], ["mat-button", "", "title", "Save icon set", 3, "click"], ["mat-button", "", "title", "Import icon set", 3, "click"], ["type", "file", "accept", ".domain", "id", "importDomain", "name", "file", "onclick", "this.value=null", 2, "display", "none", 3, "change"], ["mat-button", "", "title", "Export icon set", 3, "click"], [1, "domainConfiguration"], [1, "icons"], [1, "iconList", "smallScrollbar"], ["cols", "8", "rowHeight", "170px"], [3, "colspan", "rowspan", 4, "ngFor", "ngForOf"], [1, "domainDetails"], [3, "colspan", "rowspan"], [1, "iconListItem", 3, "iconName"]], - template: function DomainConfigurationComponent_Template(rf, ctx) { + consts: [[1, "content"], [1, "header"], [1, "searchbar"], ["mat-button", "", "title", "Unassigned Icons", 3, "click"], ["mat-button", "", "title", "Actors", 3, "click"], ["mat-button", "", "title", "Workobjects", 3, "click"], ["matInput", "", "type", "text", "placeholder", "Filter by name", 1, "textInput", 3, "input"], [1, "buttons"], ["mat-button", "", "title", "Upload Icon", 3, "click"], [1, "material-icons-outlined", "materialIconButton"], ["type", "file", "multiple", "", "accept", ".svg, image/png, image/jpeg, image/gif, image/bpmn", "id", "importIcon", "name", "file", "onclick", "this.value=null", 2, "display", "none", 3, "change"], ["mat-button", "", "title", "Reset to default icon set", 1, "button", 3, "click"], ["mat-button", "", "title", "Cancel changes", 3, "click"], [1, "divider"], ["mat-button", "", "title", "Save icon set", 3, "click"], ["mat-button", "", "title", "Import icon set", 3, "click"], ["type", "file", "accept", ".domain", "id", "importDomain", "name", "file", "onclick", "this.value=null", 2, "display", "none", 3, "change"], ["mat-button", "", "title", "Export icon set", 3, "click"], [1, "iconSetConfiguration"], [1, "icons"], [1, "iconList", "smallScrollbar"], ["cols", "8", "rowHeight", "170px"], [3, "colspan", "rowspan", 4, "ngFor", "ngForOf"], [1, "iconSetDetails"], [3, "colspan", "rowspan"], [1, "iconListItem", 3, "iconName"]], + template: function IconSetConfigurationComponent_Template(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](0, "div", 0)(1, "div")(2, "div", 1)(3, "div", 2)(4, "div"); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](5, "Filter by assignment:"); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](6, "button", 3); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](7, "async"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function DomainConfigurationComponent_Template_button_click_6_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_6_listener() { return ctx.filterForUnassigned(); }); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](8, "span"); @@ -5597,7 +5730,7 @@ class DomainConfigurationComponent { _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](10, "button", 4); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](11, "async"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function DomainConfigurationComponent_Template_button_click_10_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_10_listener() { return ctx.filterForActors(); }); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](12, "span"); @@ -5605,38 +5738,38 @@ class DomainConfigurationComponent { _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](14, "button", 5); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](15, "async"); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function DomainConfigurationComponent_Template_button_click_14_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_14_listener() { return ctx.filterForWorkobjects(); }); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](16, "span"); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](17, "Workobjects"); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](18, "input", 6); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("input", function DomainConfigurationComponent_Template_input_input_18_listener($event) { + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("input", function IconSetConfigurationComponent_Template_input_input_18_listener($event) { return ctx.filterByNameAndType($event); }); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](19, "div", 7)(20, "button", 8); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function DomainConfigurationComponent_Template_button_click_20_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_20_listener() { return ctx.startIconUpload(); }); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](21, "span", 9); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](22, "upload"); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](23, "input", 10); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("change", function DomainConfigurationComponent_Template_input_change_23_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("change", function IconSetConfigurationComponent_Template_input_change_23_listener() { return ctx.importIcon(); }); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](24, "button", 11); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function DomainConfigurationComponent_Template_button_click_24_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_24_listener() { return ctx.loadMinimalIconConfigurationWithDefaultIcons(); }); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](25, "span", 9); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](26, " home "); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](27, "button", 12); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function DomainConfigurationComponent_Template_button_click_27_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_27_listener() { return ctx.loadInitialConfiguration(); }); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](28, "span", 9); @@ -5644,37 +5777,37 @@ class DomainConfigurationComponent { _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelement"](30, "div", 13); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](31, "button", 14); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function DomainConfigurationComponent_Template_button_click_31_listener() { - return ctx.saveDomain(); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_31_listener() { + return ctx.saveIconSet(); }); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](32, "span", 9); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](33, "save"); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelement"](34, "div", 13); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](35, "button", 15); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function DomainConfigurationComponent_Template_button_click_35_listener() { - return ctx.startDomainImport(); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_35_listener() { + return ctx.startIconSetImport(); }); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](36, "span", 9); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](37, "unarchive"); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](38, "input", 16); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("change", function DomainConfigurationComponent_Template_input_change_38_listener() { - return ctx.importDomain(); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("change", function IconSetConfigurationComponent_Template_input_change_38_listener() { + return ctx.importIconSet(); }); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](39, "button", 17); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function DomainConfigurationComponent_Template_button_click_39_listener() { - return ctx.exportDomain(); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_39_listener() { + return ctx.exportIconSet(); }); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](40, "span", 9); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](41, "archive"); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()()()(); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](42, "div", 18)(43, "div", 19)(44, "div", 20)(45, "mat-grid-list", 21); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtemplate"](46, DomainConfigurationComponent_mat_grid_tile_46_Template, 2, 3, "mat-grid-tile", 22); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtemplate"](46, IconSetConfigurationComponent_mat_grid_tile_46_Template, 2, 3, "mat-grid-tile", 22); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](47, "async"); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()()()()(); - _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelement"](48, "app-domain-details", 23); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelement"](48, "app-icon-set-details", 23); _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); } if (rf & 2) { @@ -5688,25 +5821,25 @@ class DomainConfigurationComponent { _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵproperty"]("ngForOf", _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipeBind1"](47, 13, ctx.allFilteredIconNames)); } }, - dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_12__.NgForOf, _angular_material_button__WEBPACK_IMPORTED_MODULE_13__.MatButton, _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_14__.MatGridList, _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_14__.MatGridTile, _angular_material_input__WEBPACK_IMPORTED_MODULE_15__.MatInput, _icon_list_item_icon_list_item_component__WEBPACK_IMPORTED_MODULE_8__.IconListItemComponent, _domain_details_domain_details_component__WEBPACK_IMPORTED_MODULE_9__.DomainDetailsComponent, _angular_common__WEBPACK_IMPORTED_MODULE_12__.AsyncPipe], - styles: [".content[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: auto 250px;\n}\n\n.header[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: max-content auto;\n height: 46px;\n border-bottom: #ccc 2px solid;\n}\n\n.searchbar[_ngcontent-%COMP%] {\n display: inline-flex;\n margin-left: 15px;\n margin-right: 15px;\n align-self: center;\n align-items: center;\n justify-self: left;\n height: inherit;\n border-right: #ccc 2px solid;\n}\n\n.buttons[_ngcontent-%COMP%] {\n display: inline-flex;\n align-self: center;\n align-items: center;\n justify-self: right;\n height: inherit;\n}\n.buttons[_ngcontent-%COMP%] .mat-button {\n min-width: 36px;\n}\n\n.divider[_ngcontent-%COMP%] {\n border-left: #ccc 2px solid;\n height: inherit;\n}\n\n.button[_ngcontent-%COMP%] {\n width: 36px;\n}\n\n.mat-button[_ngcontent-%COMP%] {\n color: #666666;\n}\n\n.domainConfiguration[_ngcontent-%COMP%] {\n padding-left: 10px;\n padding-bottom: 5px;\n margin-top: 15px;\n height: 100%;\n}\n\n.icons[_ngcontent-%COMP%] {\n display: grid;\n grid-template-rows: 2rem auto;\n height: 100%;\n grid-row-gap: 1px;\n}\n\n.activeActor[_ngcontent-%COMP%] {\n background-color: #42aebb;\n color: white;\n}\n\n.activeNone[_ngcontent-%COMP%] {\n background-color: #e0e0e0;\n color: black;\n}\n\n.activeWorkObject[_ngcontent-%COMP%] {\n background-color: #42aebb;\n color: white;\n}\n\n.textInput[_ngcontent-%COMP%] {\n width: 300px;\n margin-left: 15px;\n margin-right: 5px;\n border: #666666 1px solid;\n}\n\n.iconList[_ngcontent-%COMP%] {\n display: grid;\n overflow-y: scroll;\n height: calc(100vh - 130px);\n}\n\n.domainDetails[_ngcontent-%COMP%] {\n overflow-y: scroll;\n width: 250px;\n height: calc(100vh - 65px);\n}\n\n .mat-grid-tile .mat-grid-tile-content {\n justify-content: inherit;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRvbWFpbi1jb25maWd1cmF0aW9uLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsYUFBQTtFQUNBLGlDQUFBO0FBQ0Y7O0FBRUE7RUFDRSxhQUFBO0VBQ0EsdUNBQUE7RUFDQSxZQUFBO0VBQ0EsNkJBQUE7QUFDRjs7QUFFQTtFQUNFLG9CQUFBO0VBQ0EsaUJBQUE7RUFDQSxrQkFBQTtFQUNBLGtCQUFBO0VBQ0EsbUJBQUE7RUFDQSxrQkFBQTtFQUNBLGVBQUE7RUFDQSw0QkFBQTtBQUNGOztBQUVBO0VBQ0Usb0JBQUE7RUFDQSxrQkFBQTtFQUNBLG1CQUFBO0VBQ0EsbUJBQUE7RUFDQSxlQUFBO0FBQ0Y7QUFDRTtFQUNFLGVBQUE7QUFDS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vdW5kLWNvbG9yOiAjNDJhZWJiO1xuICBjb2xvcjogd2hpdGU7XG59XG5cbi5hY3RpdmVOb25lIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogI2UwZTBlMDtcbiAgY29sb3I6IGJsYWNrO1xufVxuXG4uYWN0aXZlV29ya09iamVjdCB7XG4gIGJhY2tncm91bmQtY29sb3I6ICM0MmFlYmI7XG4gIGNvbG9yOiB3aGl0ZTtcbn1cblxuLnRleHRJbnB1dCB7XG4gIHdpZHRoOiAzMDBweDtcbiAgbWFyZ2luLWxlZnQ6IDE1cHg7XG4gIG1hcmdpbi1yaWdodDogNXB4O1xuICBib3JkZXI6ICM2NjY2NjYgMXB4IHNvbGlkO1xufVxuXG4uaWNvbkxpc3Qge1xuICBkaXNwbGF5OiBncmlkO1xuICBvdmVyZmxvdy15OiBzY3JvbGw7XG4gIGhlaWdodDogY2FsYygxMDB2aCAtIDEzMHB4KTtcbn1cblxuLmRvbWFpbkRldGFpbHMge1xuICBvdmVyZmxvdy15OiBzY3JvbGw7XG4gIHdpZHRoOiAyNTBweDtcbiAgaGVpZ2h0OiBjYWxjKDEwMHZoIC0gNjVweCk7XG59XG5cbjo6bmctZGVlcC5tYXQtZ3JpZC10aWxlIHtcbiAgLm1hdC1ncmlkLXRpbGUtY29udGVudCB7XG4gICAganVzdGlmeS1jb250ZW50OiBpbmhlcml0O1xuICB9XG59XG4iXSwic291cmNlUm9vdCI6IiJ9 */"] + dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_12__.NgForOf, _angular_material_button__WEBPACK_IMPORTED_MODULE_13__.MatButton, _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_14__.MatGridList, _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_14__.MatGridTile, _angular_material_input__WEBPACK_IMPORTED_MODULE_15__.MatInput, _icon_list_item_icon_list_item_component__WEBPACK_IMPORTED_MODULE_8__.IconListItemComponent, _icon_set_details_icon_set_details_component__WEBPACK_IMPORTED_MODULE_9__.IconSetDetailsComponent, _angular_common__WEBPACK_IMPORTED_MODULE_12__.AsyncPipe], + styles: [".content[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: auto 250px;\n}\n\n.header[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: max-content auto;\n height: 46px;\n border-bottom: #ccc 2px solid;\n}\n\n.searchbar[_ngcontent-%COMP%] {\n display: inline-flex;\n margin-left: 15px;\n margin-right: 15px;\n align-self: center;\n align-items: center;\n justify-self: left;\n height: inherit;\n border-right: #ccc 2px solid;\n}\n\n.buttons[_ngcontent-%COMP%] {\n display: inline-flex;\n align-self: center;\n align-items: center;\n justify-self: right;\n height: inherit;\n}\n.buttons[_ngcontent-%COMP%] .mat-button {\n min-width: 36px;\n}\n\n.divider[_ngcontent-%COMP%] {\n border-left: #ccc 2px solid;\n height: inherit;\n}\n\n.button[_ngcontent-%COMP%] {\n width: 36px;\n}\n\n.mat-button[_ngcontent-%COMP%] {\n color: #666666;\n}\n\n.iconSetConfiguration[_ngcontent-%COMP%] {\n padding-left: 10px;\n padding-bottom: 5px;\n margin-top: 15px;\n height: 100%;\n}\n\n.icons[_ngcontent-%COMP%] {\n display: grid;\n grid-template-rows: 2rem auto;\n height: 100%;\n grid-row-gap: 1px;\n}\n\n.activeActor[_ngcontent-%COMP%] {\n background-color: #42aebb;\n color: white;\n}\n\n.activeNone[_ngcontent-%COMP%] {\n background-color: #e0e0e0;\n color: black;\n}\n\n.activeWorkObject[_ngcontent-%COMP%] {\n background-color: #42aebb;\n color: white;\n}\n\n.textInput[_ngcontent-%COMP%] {\n width: 300px;\n margin-left: 15px;\n margin-right: 5px;\n border: #666666 1px solid;\n}\n\n.iconList[_ngcontent-%COMP%] {\n display: grid;\n overflow-y: scroll;\n height: calc(100vh - 130px);\n}\n\n.iconSetDetails[_ngcontent-%COMP%] {\n overflow-y: scroll;\n width: 250px;\n height: calc(100vh - 65px);\n}\n\n .mat-grid-tile .mat-grid-tile-content {\n justify-content: inherit;\n}\n/*# s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B3aWR0aDogMjUwcHg7XG4gIGhlaWdodDogY2FsYygxMDB2aCAtIDY1cHgpO1xufVxuXG46Om5nLWRlZXAubWF0LWdyaWQtdGlsZSB7XG4gIC5tYXQtZ3JpZC10aWxlLWNvbnRlbnQge1xuICAgIGp1c3RpZnktY29udGVudDogaW5oZXJpdDtcbiAgfVxufVxuIl0sInNvdXJjZVJvb3QiOiIifQ== */"] }); } /***/ }), -/***/ 1508: -/*!*********************************************************************************************!*\ - !*** ./src/app/Presentation/DomainConfiguration/domain-details/domain-details.component.ts ***! - \*********************************************************************************************/ +/***/ 79052: +/*!*************************************************************************************************!*\ + !*** ./src/app/Presentation/DomainConfiguration/icon-set-details/icon-set-details.component.ts ***! + \*************************************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ DomainDetailsComponent: () => (/* binding */ DomainDetailsComponent) +/* harmony export */ IconSetDetailsComponent: () => (/* binding */ IconSetDetailsComponent) /* harmony export */ }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ 96623); -/* harmony import */ var src_app_Service_DomainConfiguration_domain_customization_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Service/DomainConfiguration/domain-customization.service */ 42854); +/* harmony import */ var src_app_Service_IconSetConfiguration_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Service/IconSetConfiguration/icon-set-customization.service */ 87007); /* harmony import */ var src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Service/Title/title.service */ 69672); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ 39191); /* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ 48015); @@ -5723,19 +5856,19 @@ __webpack_require__.r(__webpack_exports__); -function DomainDetailsComponent_mat_list_item_12_Template(rf, ctx) { +function IconSetDetailsComponent_mat_list_item_12_Template(rf, ctx) { if (rf & 1) { const _r1 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵgetCurrentView"](); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "mat-list-item", 7); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("dragover", function DomainDetailsComponent_mat_list_item_12_Template_mat_list_item_dragover_0_listener($event) { + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("dragover", function IconSetDetailsComponent_mat_list_item_12_Template_mat_list_item_dragover_0_listener($event) { _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r1); const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](); return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r1.allowDrop($event, "actorList")); - })("dragstart", function DomainDetailsComponent_mat_list_item_12_Template_mat_list_item_dragstart_0_listener() { + })("dragstart", function IconSetDetailsComponent_mat_list_item_12_Template_mat_list_item_dragstart_0_listener() { const i_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r1).index; const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](); return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r1.onDragStart(i_r3, "actorList")); - })("drop", function DomainDetailsComponent_mat_list_item_12_Template_mat_list_item_drop_0_listener($event) { + })("drop", function IconSetDetailsComponent_mat_list_item_12_Template_mat_list_item_drop_0_listener($event) { const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r1); const iconName_r5 = ctx_r3.$implicit; const i_r3 = ctx_r3.index; @@ -5752,19 +5885,19 @@ function DomainDetailsComponent_mat_list_item_12_Template(rf, ctx) { _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("icon", ctx_r1.getIconForName(iconName_r5)); } } -function DomainDetailsComponent_mat_list_item_18_Template(rf, ctx) { +function IconSetDetailsComponent_mat_list_item_18_Template(rf, ctx) { if (rf & 1) { const _r6 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵgetCurrentView"](); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "mat-list-item", 7); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("dragover", function DomainDetailsComponent_mat_list_item_18_Template_mat_list_item_dragover_0_listener($event) { + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("dragover", function IconSetDetailsComponent_mat_list_item_18_Template_mat_list_item_dragover_0_listener($event) { _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r6); const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](); return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r1.allowDrop($event, "workobjectList")); - })("dragstart", function DomainDetailsComponent_mat_list_item_18_Template_mat_list_item_dragstart_0_listener() { + })("dragstart", function IconSetDetailsComponent_mat_list_item_18_Template_mat_list_item_dragstart_0_listener() { const i_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r6).index; const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](); return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r1.onDragStart(i_r7, "workobjectList")); - })("drop", function DomainDetailsComponent_mat_list_item_18_Template_mat_list_item_drop_0_listener($event) { + })("drop", function IconSetDetailsComponent_mat_list_item_18_Template_mat_list_item_drop_0_listener($event) { const ctx_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r6); const iconName_r9 = ctx_r7.$implicit; const i_r7 = ctx_r7.index; @@ -5781,14 +5914,14 @@ function DomainDetailsComponent_mat_list_item_18_Template(rf, ctx) { _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("icon", ctx_r1.getIconForName(iconName_r9)); } } -class DomainDetailsComponent { +class IconSetDetailsComponent { constructor(customizationService, titleService) { this.customizationService = customizationService; this.draggedList = ''; this.draggedIndex = 0; this.selectedActors$ = this.customizationService.selectedActors$; this.selectedWorkobjects$ = this.customizationService.selectedWorkobjects$; - this.domainName = titleService.domainName$; + this.iconSetName = titleService.iconSetName$; } ngOnInit() {} changeName(event) { @@ -5825,23 +5958,23 @@ class DomainDetailsComponent { this.draggedList = draggedList; this.draggedIndex = index; } - static #_ = this.ɵfac = function DomainDetailsComponent_Factory(t) { - return new (t || DomainDetailsComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](src_app_Service_DomainConfiguration_domain_customization_service__WEBPACK_IMPORTED_MODULE_0__.DomainCustomizationService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_1__.TitleService)); + static #_ = this.ɵfac = function IconSetDetailsComponent_Factory(t) { + return new (t || IconSetDetailsComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](src_app_Service_IconSetConfiguration_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_0__.IconSetCustomizationService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_1__.TitleService)); }; static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineComponent"]({ - type: DomainDetailsComponent, - selectors: [["app-domain-details"]], + type: IconSetDetailsComponent, + selectors: [["app-icon-set-details"]], decls: 20, vars: 9, - consts: [[1, "details", "smallScrollbar"], [1, "domainDetails", "bottom-border"], [1, "inputWidth"], ["matInput", "", "type", "text", 3, "input", "value"], [1, "actorList", "bottom-border"], ["class", "compactItem", "draggable", "true", 3, "dragover", "dragstart", "drop", 4, "ngFor", "ngForOf"], [1, "workobjectList"], ["draggable", "true", 1, "compactItem", 3, "dragover", "dragstart", "drop"], [3, "icon"]], - template: function DomainDetailsComponent_Template(rf, ctx) { + consts: [[1, "details", "smallScrollbar"], [1, "iconSetDetails", "bottom-border"], [1, "inputWidth"], ["matInput", "", "type", "text", 3, "input", "value"], [1, "actorList", "bottom-border"], ["class", "compactItem", "draggable", "true", 3, "dragover", "dragstart", "drop", 4, "ngFor", "ngForOf"], [1, "workobjectList"], ["draggable", "true", 1, "compactItem", 3, "dragover", "dragstart", "drop"], [3, "icon"]], + template: function IconSetDetailsComponent_Template(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "h3"); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](3, "Icon Set Name"); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](4, "form")(5, "mat-form-field", 2)(6, "input", 3); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](7, "async"); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("input", function DomainDetailsComponent_Template_input_input_6_listener($event) { + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("input", function IconSetDetailsComponent_Template_input_input_6_listener($event) { return ctx.changeName($event); }); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()()()(); @@ -5849,20 +5982,20 @@ class DomainDetailsComponent { _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](10, "Order of Actors"); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](11, "mat-list"); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](12, DomainDetailsComponent_mat_list_item_12_Template, 2, 1, "mat-list-item", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](12, IconSetDetailsComponent_mat_list_item_12_Template, 2, 1, "mat-list-item", 5); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](13, "async"); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()(); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](14, "div", 6)(15, "h3"); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](16, "Order of Work Objects"); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"](); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](17, "mat-list"); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](18, DomainDetailsComponent_mat_list_item_18_Template, 2, 1, "mat-list-item", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](18, IconSetDetailsComponent_mat_list_item_18_Template, 2, 1, "mat-list-item", 5); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](19, "async"); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()()(); } if (rf & 2) { _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](6); - _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("value", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](7, 3, ctx.domainName)); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("value", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](7, 3, ctx.iconSetName)); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](6); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngForOf", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](13, 5, ctx.selectedActors$)); _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](6); @@ -5870,216 +6003,84 @@ class DomainDetailsComponent { } }, dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_4__.NgForOf, _angular_forms__WEBPACK_IMPORTED_MODULE_5__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_5__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_5__.NgForm, _angular_material_list__WEBPACK_IMPORTED_MODULE_6__.MatList, _angular_material_list__WEBPACK_IMPORTED_MODULE_6__.MatListItem, _angular_material_form_field__WEBPACK_IMPORTED_MODULE_7__.MatFormField, _angular_material_input__WEBPACK_IMPORTED_MODULE_8__.MatInput, _details_list_item_details_list_item_component__WEBPACK_IMPORTED_MODULE_2__.DetailsListItemComponent, _angular_common__WEBPACK_IMPORTED_MODULE_4__.AsyncPipe], - styles: [".details[_ngcontent-%COMP%] {\n display: grid;\n grid-template-rows: 68px auto auto;\n min-height: 100vh;\n grid-row-gap: 1px;\n overflow-y: scroll;\n overflow-x: hidden;\n width: 250px;\n border-left: solid 1px #ccc;\n}\n\n.domainDetails[_ngcontent-%COMP%] {\n margin-top: 10px;\n}\n.domainDetails[_ngcontent-%COMP%] .mat-mdc-form-field-infix {\n border: none;\n padding-bottom: 0 !important;\n padding-top: 0 !important;\n}\n.domainDetails[_ngcontent-%COMP%] .mdc-text-field {\n padding-left: 0 !important;\n}\n\n.compactItem[_ngcontent-%COMP%] {\n height: 40px !important;\n}\n\n.fullWidth[_ngcontent-%COMP%] {\n width: 100%;\n padding-left: 15px;\n}\n\n.inputWidth[_ngcontent-%COMP%] {\n width: 200px;\n padding-left: 15px;\n height: 46px;\n}\n\nh3[_ngcontent-%COMP%] {\n padding-left: 15px;\n margin-bottom: 0;\n font-weight: bold;\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JvcmRlci1sZWZ0OiBzb2xpZCAxcHggI2NjYztcbn1cblxuLmRvbWFpbkRldGFpbHMge1xuICBtYXJnaW4tdG9wOiAxMHB4O1xuXG4gIDo6bmctZGVlcC5tYXQtbWRjLWZvcm0tZmllbGQtaW5maXgge1xuICAgIGJvcmRlcjogbm9uZTtcbiAgICBwYWRkaW5nLWJvdHRvbTogMCAhaW1wb3J0YW50O1xuICAgIHBhZGRpbmctdG9wOiAwICFpbXBvcnRhbnQ7XG4gIH1cblxuICA6Om5nLWRlZXAubWRjLXRleHQtZmllbGQge1xuICAgIHBhZGRpbmctbGVmdDogMCAhaW1wb3J0YW50O1xuICB9XG59XG5cbi5jb21wYWN0SXRlbSB7XG4gIGhlaWdodDogNDBweCAhaW1wb3J0YW50O1xufVxuXG4uZnVsbFdpZHRoIHtcbiAgd2lkdGg6IDEwMCU7XG4gIHBhZGRpbmctbGVmdDogMTVweDtcbn1cblxuLmlucHV0V2lkdGgge1xuICB3aWR0aDogMjAwcHg7XG4gIHBhZGRpbmctbGVmdDogMTVweDtcbiAgaGVpZ2h0OiA0NnB4O1xufVxuXG5oMyB7XG4gIHBhZGRpbmctbGVmdDogMTVweDtcbiAgbWFyZ2luLWJvdHRvbTogMDtcbiAgZm9udC13ZWlnaHQ6IGJvbGQ7XG59XG5cbm1hdC1saXN0IHtcbiAgb3ZlcmZsb3c6IGF1dG87XG4gIHBhZGRpbmctdG9wOiAwO1xufVxuXG4uYm90dG9tLWJvcmRlciB7XG4gIGJvcmRlci1ib3R0b206IDJweCBzb2xpZCAjY2NjO1xufVxuIl19 */\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy9hcHAvUHJlc2VudGF0aW9uL0RvbWFpbkNvbmZpZ3VyYXRpb24vZG9tYWluLWRldGFpbHMvZG9tYWluLWRldGFpbHMuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYX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xuICB9XG5cbiAgOjpuZy1kZWVwLm1kYy10ZXh0LWZpZWxkIHtcbiAgICBwYWRkaW5nLWxlZnQ6IDAgIWltcG9ydGFudDtcbiAgfVxufVxuXG4uY29tcGFjdEl0ZW0ge1xuICBoZWlnaHQ6IDQwcHggIWltcG9ydGFudDtcbn1cblxuLmZ1bGxXaWR0aCB7XG4gIHdpZHRoOiAxMDAlO1xuICBwYWRkaW5nLWxlZnQ6IDE1cHg7XG59XG5cbi5pbnB1dFdpZHRoIHtcbiAgd2lkdGg6IDIwMHB4O1xuICBwYWRkaW5nLWxlZnQ6IDE1cHg7XG4gIGhlaWdodDogNDZweDtcbn1cblxuaDMge1xuICBwYWRkaW5nLWxlZnQ6IDE1cHg7XG4gIG1hcmdpbi1ib3R0b206IDA7XG4gIGZvbnQtd2VpZ2h0OiBib2xkO1xufVxuXG5tYXQtbGlzdCB7XG4gIG92ZXJmbG93OiBhdXRvO1xuICBwYWRkaW5nLXRvcDogMDtcbn1cblxuLmJvdHRvbS1ib3JkZXIge1xuICBib3JkZXItYm90dG9tOiAycHggc29saWQgI2NjYztcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0= */"] + styles: [".details[_ngcontent-%COMP%] {\n display: grid;\n grid-template-rows: 68px auto auto;\n min-height: 100vh;\n grid-row-gap: 1px;\n overflow-y: scroll;\n overflow-x: hidden;\n width: 250px;\n border-left: solid 1px #ccc;\n}\n\n.iconSetDetails[_ngcontent-%COMP%] {\n margin-top: 10px;\n}\n.iconSetDetails[_ngcontent-%COMP%] .mat-mdc-form-field-infix {\n border: none;\n padding-bottom: 0 !important;\n padding-top: 0 !important;\n}\n.iconSetDetails[_ngcontent-%COMP%] .mdc-text-field {\n padding-left: 0 !important;\n}\n\n.compactItem[_ngcontent-%COMP%] {\n height: 40px !important;\n}\n\n.fullWidth[_ngcontent-%COMP%] {\n width: 100%;\n padding-left: 15px;\n}\n\n.inputWidth[_ngcontent-%COMP%] {\n width: 200px;\n padding-left: 15px;\n height: 46px;\n}\n\nh3[_ngcontent-%COMP%] {\n padding-left: 15px;\n margin-bottom: 0;\n font-weight: bold;\n}\n\nmat-list[_ngcontent-%COMP%] {\n overflow: auto;\n padding-top: 0;\n}\n\n.bottom-border[_ngcontent-%COMP%] {\n border-bottom: 2px solid #ccc;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImljb24tc2V0LWRldGFpbHMuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxhQUFBO0VBQ0Esa0NBQUE7RUFDQSxpQkFBQTtFQUNBLGlCQUFBO0VBQ0Esa0JBQUE7RUFDQSxrQkFBQTtFQUNBLFlBQUE7RUFDQSwyQkFBQTtBQUNGOztBQUVBO0VBQ0UsZ0JBQUE7QUFDRjtBQUNFO0VBQ0UsWUFBQTtFQUNBLDRCQUFBO0VBQ0EseUJBQUE7QUFDSjtBQUVFO0VBQ0UsMEJBQUE7QUFBSjs7QUFJQTtFQUNFLHVCQUFBO0FBREY7O0FBSUE7RUFDRSxXQUFBO0VBQ0Esa0JBQUE7QUFERjs7QUFJQTtFQUNFLFlBQUE7RUFDQSxrQkFBQTtFQUNBLFlBQUE7QUFERjs7QUFJQTtFQUNFLGtCQUFBO0VBQ0EsZ0JBQUE7RUFDQSxpQkFBQTtBQURGOztBQUlBO0VBQ0UsY0FBQTtFQUNBLGNBQUE7QUFERjs7QUFJQTtFQUNFLDZCQUFBO0FBREYiLCJmaWxlIjoiaWNvbi1zZXQtZGV0YWlscy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5kZXRhaWxzIHtcbiAgZGlzcGxheTogZ3JpZDtcbiAgZ3JpZC10ZW1wbGF0ZS1yb3dzOiA2OHB4IGF1dG8gYXV0bztcbiAgbWluLWhlaWdodDogMTAwdmg7XG4gIGdyaWQtcm93LWdhcDogMXB4O1xuICBvdmVyZmxvdy15OiBzY3JvbG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ogbm9uZTtcbiAgICBwYWRkaW5nLWJvdHRvbTogMCAhaW1wb3J0YW50O1xuICAgIHBhZGRpbmctdG9wOiAwICFpbXBvcnRhbnQ7XG4gIH1cblxuICA6Om5nLWRlZXAubWRjLXRleHQtZmllbGQge1xuICAgIHBhZGRpbmctbGVmdDogMCAhaW1wb3J0YW50O1xuICB9XG59XG5cbi5jb21wYWN0SXRlbSB7XG4gIGhlaWdodDogNDBweCAhaW1wb3J0YW50O1xufVxuXG4uZnVsbFdpZHRoIHtcbiAgd2lkdGg6IDEwMCU7XG4gIHBhZGRpbmctbGVmdDogMTVweDtcbn1cblxuLmlucHV0V2lkdGgge1xuICB3aWR0aDogMjAwcHg7XG4gIHBhZGRpbmctbGVmdDogMTVweDtcbiAgaGVpZ2h0OiA0NnB4O1xufVxuXG5oMyB7XG4gIHBhZGRpbmctbGVmdDogMTVweDtcbiAgbWFyZ2luLWJvdHRvbTogMDtcbiAgZm9udC13ZWlnaHQ6IGJvbGQ7XG59XG5cbm1hdC1saXN0IHtcbiAgb3ZlcmZsb3c6IGF1dG87XG4gIHBhZGRpbmctdG9wOiAwO1xufVxuXG4uYm90dG9tLWJvcmRlciB7XG4gIGJvcmRlci1ib3R0b206IDJweCBzb2xpZCAjY2NjO1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ== */"] }); } /***/ }), -/***/ 58414: -/*!*********************************************************************************************!*\ - !*** ./src/app/Presentation/DomainConfiguration/icon-list-item/icon-list-item.component.ts ***! - \*********************************************************************************************/ +/***/ 20409: +/*!*****************************************************************!*\ + !*** ./src/app/Presentation/Header/header-buttons.component.ts ***! + \*****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ IconListItemComponent: () => (/* binding */ IconListItemComponent) +/* harmony export */ HeaderButtonsComponent: () => (/* binding */ HeaderButtonsComponent) /* harmony export */ }); -/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ 95536); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 96623); -/* harmony import */ var _Service_DomainConfiguration_domain_customization_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Service/DomainConfiguration/domain-customization.service */ 42854); -/* harmony import */ var _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/button-toggle */ 68529); +/* harmony import */ var _Domain_Dialog_exportDialogData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Domain/Dialog/exportDialogData */ 83064); +/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @angular/material/dialog */ 72768); +/* harmony import */ var _Dialog_export_dialog_export_dialog_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Dialog/export-dialog/export-dialog.component */ 97218); +/* harmony import */ var _Domain_Dialog_infoDialogData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Domain/Dialog/infoDialogData */ 45574); +/* harmony import */ var _Dialog_info_dialog_info_dialog_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Dialog/info-dialog/info-dialog.component */ 16266); +/* harmony import */ var _Dialog_label_dictionary_dialog_label_dictionary_dialog_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Dialog/label-dictionary-dialog/label-dictionary-dialog.component */ 23958); +/* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _Service_Settings_settings_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Service/Settings/settings.service */ 58124); +/* harmony import */ var _Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Service/Modeler/modeler.service */ 74676); +/* harmony import */ var _Service_Replay_replay_state_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Service/Replay/replay-state.service */ 67820); +/* harmony import */ var _Service_DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Service/DirtyFlag/dirty-flag.service */ 89791); +/* harmony import */ var _Service_Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Service/Dialog/dialog.service */ 4730); +/* harmony import */ var _Service_Replay_replay_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Service/Replay/replay.service */ 94788); +/* harmony import */ var _Service_Export_export_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Service/Export/export.service */ 98106); +/* harmony import */ var _Service_Import_import_domain_story_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Service/Import/import-domain-story.service */ 23779); +/* harmony import */ var _Service_Title_title_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../Service/Title/title.service */ 69672); +/* harmony import */ var _Service_Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../Service/Renderer/renderer.service */ 94896); +/* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @angular/common */ 39191); -class IconListItemComponent { - get name() { - return this.iconName; - } - get id() { - return 'domain-configuration-icon-' + this.iconName; + + + + + + + + + + + + + + + + +function HeaderButtonsComponent_div_0_span_9_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](0, "span", 14); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](1, " archive "); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"](); } - constructor(domainCustomizationService) { - this.domainCustomizationService = domainCustomizationService; - this.iconName = ''; - this.iconInitiated = false; - // @ts-ignore - this.icon = new rxjs__WEBPACK_IMPORTED_MODULE_1__.BehaviorSubject({}); - this.isActor = false; - this.isWorkobject = false; - this.isNone = true; +} +function HeaderButtonsComponent_div_0_span_11_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](0, "span", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](1, " archive "); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"](); } - ngOnInit() { - this.icon = this.domainCustomizationService.getIconForName(this.iconName); - if (!this.icon) { - return; - } - this.icon.subscribe(value => { - this.isActor = value.isActor; - this.isWorkobject = value.isWorkObject; - this.isNone = !(value.isActor || value.isWorkObject); - }); - this.isActor = this.icon.value.isActor; - this.isWorkobject = this.icon.value.isWorkObject; - this.isNone = !(this.icon.value.isActor || this.icon.value.isWorkObject); - } - ngAfterViewChecked() { - this.createIcon(); - } - createIcon() { - const img = document.getElementById(this.id); - if (img && !this.iconInitiated) { - img.src = '' + this.icon.value?.svg; - this.iconInitiated = true; - } - } - toggleNone() { - this.domainCustomizationService.setAsUnassigned(this.iconName, this.icon.value.isActor); - } - toggleActor() { - this.domainCustomizationService.setAsActor(true, this.iconName); - } - toggleWorkobject() { - this.domainCustomizationService.setAsWorkobject(true, this.iconName); - } - static #_ = this.ɵfac = function IconListItemComponent_Factory(t) { - return new (t || IconListItemComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](_Service_DomainConfiguration_domain_customization_service__WEBPACK_IMPORTED_MODULE_0__.DomainCustomizationService)); - }; - static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineComponent"]({ - type: IconListItemComponent, - selectors: [["app-icon-list-item"]], - inputs: { - iconName: "iconName" - }, - decls: 16, - vars: 13, - consts: [[1, "IconContainer"], [1, "content"], ["src", "", 1, "icon", 3, "id", "alt"], [1, "name"], [1, "footer"], [3, "change", "value", "checked"], [1, "toggleButtonTitle"]], - template: function IconListItemComponent_Template(rf, ctx) { - if (rf & 1) { - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](0, "div", 0)(1, "div", 1); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](2, "img", 2); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](3, "div", 3); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](4); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()(); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](5, "div", 4)(6, "mat-button-toggle-group")(7, "mat-button-toggle", 5); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵlistener"]("change", function IconListItemComponent_Template_mat_button_toggle_change_7_listener() { - return ctx.toggleNone(); - }); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](8, "span", 6); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](9, "None"); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()(); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](10, "mat-button-toggle", 5); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵlistener"]("change", function IconListItemComponent_Template_mat_button_toggle_change_10_listener() { - return ctx.toggleActor(); - }); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](11, "span", 6); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](12, "Actor"); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()(); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](13, "mat-button-toggle", 5); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵlistener"]("change", function IconListItemComponent_Template_mat_button_toggle_change_13_listener() { - return ctx.toggleWorkobject(); - }); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](14, "span", 6); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](15, "Workobject"); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()()()()(); - } - if (rf & 2) { - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](2); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵpropertyInterpolate"]("id", ctx.id); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵpropertyInterpolate"]("alt", ctx.name); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](2); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtextInterpolate"](ctx.name); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](3); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("value", ctx.isNone)("checked", ctx.isNone); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](3); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵclassProp"]("activeMatButtonActor", ctx.isActor); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("value", ctx.isActor)("checked", ctx.isActor); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](3); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵclassProp"]("activeMatButtonWorkObject", ctx.isWorkobject); - _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("value", ctx.isWorkobject)("checked", ctx.isWorkobject); - } - }, - dependencies: [_angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_3__.MatButtonToggleGroup, _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_3__.MatButtonToggle], - styles: [".IconContainer[_ngcontent-%COMP%] {\n width: 170px;\n height: 170px;\n}\n\n.content[_ngcontent-%COMP%] {\n display: grid;\n grid-template-rows: auto auto;\n justify-items: center;\n}\n\n.icon[_ngcontent-%COMP%] {\n width: 50px;\n height: 50px;\n}\n\n.name[_ngcontent-%COMP%] {\n word-wrap: anywhere;\n max-height: 75px;\n overflow: hidden;\n padding-bottom: 2px;\n}\n\n.footer[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n}\n.footer[_ngcontent-%COMP%] .mat-button-toggle-label-content {\n font-size: 10pt !important;\n padding: 0 5px !important;\n line-height: inherit !important;\n}\n.footer[_ngcontent-%COMP%] .activeMatButtonActor button {\n background-color: #43acbf;\n color: #ffffff;\n}\n.footer[_ngcontent-%COMP%] .activeMatButtonWorkObject button {\n background-color: #0168b7;\n color: #ffffff;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImljb24tbGlzdC1pdGVtLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsWUFBQTtFQUNBLGFBQUE7QUFDRjs7QUFFQTtFQUNFLGFBQUE7RUFDQSw2QkFBQTtFQUNBLHFCQUFBO0FBQ0Y7O0FBRUE7RUFDRSxXQUFBO0VBQ0EsWUFBQTtBQUNGOztBQUVBO0VBQ0UsbUJBQUE7RUFDQSxnQkFBQTtFQUNBLGdCQUFBO0VBQ0EsbUJBQUE7QUFDRjs7QUFFQTtFQUNFLGFBQUE7RUFDQSx1QkFBQTtBQUNGO0FBQ0U7RUFDRSwwQkFBQTtFQUNBLHlCQUFBO0VBQ0EsK0JBQUE7QUFDSjtBQUVFO0VBQ0UseUJBQUE7RUFDQSxjQUFBO0FBQUo7QUFHRTtFQUNFLHlCQUFBO0VBQ0EsY0FBQTtBQURKIiwiZ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9vdGVyIHtcbiAgZGlzcGxheTogZmxleDtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cbiAgOjpuZy1kZWVwLm1hdC1idXR0b24tdG9nZ2xlLWxhYmVsLWNvbnRlbnQge1xuICAgIGZvbnQtc2l6ZTogMTBwdCAhaW1wb3J0YW50O1xuICAgIHBhZGRpbmc6IDAgNXB4ICFpbXBvcnRhbnQ7XG4gICAgbGluZS1oZWlnaHQ6IGluaGVyaXQgIWltcG9ydGFudDtcbiAgfVxuXG4gIDo6bmctZGVlcC5hY3RpdmVNYXRCdXR0b25BY3RvciBidXR0b24ge1xuICAgIGJhY2tncm91bmQtY29sb3I6ICM0M2FjYmY7XG4gICAgY29sb3I6ICNmZmZmZmY7XG4gIH1cblxuICA6Om5nLWRlZXAuYWN0aXZlTWF0QnV0dG9uV29ya09iamVjdCBidXR0b24ge1xuICAgIGJhY2tncm91bmQtY29sb3I6ICMwMTY4Yjc7XG4gICAgY29sb3I6ICNmZmZmZmY7XG4gIH1cbn1cbiJdLCJzb3VyY2VSb290IjoiIn0= */"] - }); -} - -/***/ }), - -/***/ 20409: -/*!*****************************************************************!*\ - !*** ./src/app/Presentation/Header/header-buttons.component.ts ***! - \*****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ HeaderButtonsComponent: () => (/* binding */ HeaderButtonsComponent) -/* harmony export */ }); -/* harmony import */ var _Domain_Dialog_exportDialogData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Domain/Dialog/exportDialogData */ 83064); -/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @angular/material/dialog */ 72768); -/* harmony import */ var _Dialog_export_dialog_export_dialog_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Dialog/export-dialog/export-dialog.component */ 97218); -/* harmony import */ var _Domain_Dialog_infoDialogData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Domain/Dialog/infoDialogData */ 45574); -/* harmony import */ var _Dialog_info_dialog_info_dialog_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Dialog/info-dialog/info-dialog.component */ 16266); -/* harmony import */ var _Dialog_label_dictionary_dialog_label_dictionary_dialog_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Dialog/label-dictionary-dialog/label-dictionary-dialog.component */ 23958); -/* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @angular/core */ 96623); -/* harmony import */ var _Service_Settings_settings_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Service/Settings/settings.service */ 58124); -/* harmony import */ var _Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Service/Modeler/modeler.service */ 74676); -/* harmony import */ var _Service_Replay_replay_state_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Service/Replay/replay-state.service */ 67820); -/* harmony import */ var _Service_DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Service/DirtyFlag/dirty-flag.service */ 89791); -/* harmony import */ var _Service_Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Service/Dialog/dialog.service */ 4730); -/* harmony import */ var _Service_Replay_replay_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Service/Replay/replay.service */ 94788); -/* harmony import */ var _Service_Export_export_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Service/Export/export.service */ 98106); -/* harmony import */ var _Service_Import_import_domain_story_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Service/Import/import-domain-story.service */ 23779); -/* harmony import */ var _Service_Title_title_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../Service/Title/title.service */ 69672); -/* harmony import */ var _Service_Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../Service/Renderer/renderer.service */ 94896); -/* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); -/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @angular/common */ 39191); - - - - - - - - - - - - - - - - - - - - -function HeaderButtonsComponent_div_0_span_9_Template(rf, ctx) { - if (rf & 1) { - _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](0, "span", 14); - _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](1, " archive "); - _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"](); - } -} -function HeaderButtonsComponent_div_0_span_11_Template(rf, ctx) { - if (rf & 1) { - _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](0, "span", 2); - _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](1, " archive "); - _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"](); - } -} -function HeaderButtonsComponent_div_0_Template(rf, ctx) { - if (rf & 1) { - const _r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵgetCurrentView"](); - _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](0, "div")(1, "button", 1); - _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function HeaderButtonsComponent_div_0_Template_button_click_1_listener() { - _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵrestoreView"](_r1); - const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"](); - return _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵresetView"](ctx_r1.startReplay()); +} +function HeaderButtonsComponent_div_0_Template(rf, ctx) { + if (rf & 1) { + const _r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵgetCurrentView"](); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](0, "div")(1, "button", 1); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function HeaderButtonsComponent_div_0_Template_button_click_1_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵrestoreView"](_r1); + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵresetView"](ctx_r1.startReplay()); }); _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](2, "span", 2); _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](3, " play_arrow "); @@ -6730,10 +6731,10 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ 96623); /* harmony import */ var src_app_Service_Settings_settings_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Service/Settings/settings.service */ 58124); /* harmony import */ var src_app_Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Service/Modeler/modeler.service */ 74676); -/* harmony import */ var _Service_DomainConfiguration_domain_customization_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Service/DomainConfiguration/domain-customization.service */ 42854); +/* harmony import */ var _Service_IconSetConfiguration_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Service/IconSetConfiguration/icon-set-customization.service */ 87007); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/common */ 39191); /* harmony import */ var _General_general_settings_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./General/general-settings.component */ 423); -/* harmony import */ var src_app_Presentation_DomainConfiguration_domain_configuration_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/Presentation/DomainConfiguration/domain-configuration.component */ 97394); +/* harmony import */ var src_app_Presentation_DomainConfiguration_icon_set_configuration_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/Presentation/DomainConfiguration/icon-set-configuration.component */ 38574); /* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/material/button */ 95912); /* harmony import */ var _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/material/toolbar */ 31165); @@ -6751,9 +6752,9 @@ function SettingsComponent_app_general_settings_15_Template(rf, ctx) { _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](0, "app-general-settings"); } } -function SettingsComponent_app_domain_configuration_17_Template(rf, ctx) { +function SettingsComponent_app_icon_set_configuration_17_Template(rf, ctx) { if (rf & 1) { - _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](0, "app-domain-configuration", 10); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](0, "app-icon-set-configuration", 10); } } class SettingsComponent { @@ -6780,7 +6781,7 @@ class SettingsComponent { this.showDomainCustomization.next(true); } static #_ = this.ɵfac = function SettingsComponent_Factory(t) { - return new (t || SettingsComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](src_app_Service_Settings_settings_service__WEBPACK_IMPORTED_MODULE_0__.SettingsService), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](src_app_Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_1__.ModelerService), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](_Service_DomainConfiguration_domain_customization_service__WEBPACK_IMPORTED_MODULE_2__.DomainCustomizationService)); + return new (t || SettingsComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](src_app_Service_Settings_settings_service__WEBPACK_IMPORTED_MODULE_0__.SettingsService), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](src_app_Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_1__.ModelerService), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](_Service_IconSetConfiguration_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_2__.IconSetCustomizationService)); }; static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdefineComponent"]({ type: SettingsComponent, @@ -6815,7 +6816,7 @@ class SettingsComponent { _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()()()()(); _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](15, SettingsComponent_app_general_settings_15_Template, 1, 0, "app-general-settings", 8); _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipe"](16, "async"); - _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](17, SettingsComponent_app_domain_configuration_17_Template, 1, 0, "app-domain-configuration", 9); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](17, SettingsComponent_app_icon_set_configuration_17_Template, 1, 0, "app-icon-set-configuration", 9); _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipe"](18, "async"); _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"](); } @@ -6830,7 +6831,7 @@ class SettingsComponent { _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipeBind1"](18, 12, ctx.showDomainCustomization)); } }, - dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_7__.NgIf, _General_general_settings_component__WEBPACK_IMPORTED_MODULE_3__.GeneralSettingsComponent, src_app_Presentation_DomainConfiguration_domain_configuration_component__WEBPACK_IMPORTED_MODULE_4__.DomainConfigurationComponent, _angular_material_button__WEBPACK_IMPORTED_MODULE_8__.MatButton, _angular_material_button__WEBPACK_IMPORTED_MODULE_8__.MatIconButton, _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_9__.MatToolbar, _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_9__.MatToolbarRow, _angular_common__WEBPACK_IMPORTED_MODULE_7__.AsyncPipe], + dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_7__.NgIf, _General_general_settings_component__WEBPACK_IMPORTED_MODULE_3__.GeneralSettingsComponent, src_app_Presentation_DomainConfiguration_icon_set_configuration_component__WEBPACK_IMPORTED_MODULE_4__.IconSetConfigurationComponent, _angular_material_button__WEBPACK_IMPORTED_MODULE_8__.MatButton, _angular_material_button__WEBPACK_IMPORTED_MODULE_8__.MatIconButton, _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_9__.MatToolbar, _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_9__.MatToolbarRow, _angular_common__WEBPACK_IMPORTED_MODULE_7__.AsyncPipe], styles: ["mat-toolbar[_ngcontent-%COMP%] *[_ngcontent-%COMP%] {\n color: white;\n}\n\napp-general-settings[_ngcontent-%COMP%] {\n overflow-y: auto;\n}\n\n.settings[_ngcontent-%COMP%] {\n display: grid;\n grid-template-rows: 65px auto;\n width: 100%;\n height: 100%;\n}\n.settings[_ngcontent-%COMP%] .mat-button {\n padding: 0;\n}\n.settings[_ngcontent-%COMP%] .materialIconButton[_ngcontent-%COMP%] {\n margin-top: 0;\n margin-right: 5px;\n padding: 0;\n}\n\n.highlight[_ngcontent-%COMP%] {\n border: 2px solid white;\n}\n\n.tab[_ngcontent-%COMP%] {\n display: inline-block;\n height: calc(100% - 10px);\n width: 100%;\n overflow: hidden;\n}\n\n .mat-tab-label, .mat-tab-label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DogMTAwJTtcbiAgaGVpZ2h0OiAxMDAlO1xuXG4gIDo6bmctZGVlcC5tYXQtYnV0dG9uIHtcbiAgICBwYWRkaW5nOiAwO1xuICB9XG5cbiAgLm1hdGVyaWFsSWNvbkJ1dHRvbiB7XG4gICAgbWFyZ2luLXRvcDogMDtcbiAgICBtYXJnaW4tcmlnaHQ6IDVweDtcbiAgICBwYWRkaW5nOiAwO1xuICB9XG59XG5cbi5oaWdobGlnaHQge1xuICBib3JkZXI6IDJweCBzb2xpZCB3aGl0ZTtcbn1cblxuLnRhYiB7XG4gIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgaGVpZ2h0OiBjYWxjKDEwMCUgLSAxMHB4KTtcbiAgd2lkdGg6IDEwMCU7XG4gIG92ZXJmbG93OiBoaWRkZW47XG59XG5cbjo6bmctZGVlcC5tYXQtdGFiLWxhYmVsLFxuOjpuZy1kZWVwLm1hdC10YWItbGFiZWwtYWN0aXZlIHtcbiAgaGVpZ2h0OiAzMHB4ICFpbXBvcnRhbnQ7XG59XG4iXSwic291cmNlUm9vdCI6IiJ9 */"] }); } @@ -6913,13 +6914,13 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ DRAFTS_TAG: () => (/* binding */ DRAFTS_TAG) /* harmony export */ }); /* harmony import */ var _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Domain/Common/elementTypes */ 30236); -/* harmony import */ var _Domain_Common_domainConfiguration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Domain/Common/domainConfiguration */ 82011); +/* harmony import */ var _Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Domain/Common/iconSetConfiguration */ 84738); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rxjs */ 63150); /* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/core */ 96623); /* harmony import */ var _autosave_configuration_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./autosave-configuration.service */ 97237); /* harmony import */ var _Export_export_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Export/export.service */ 98106); -/* harmony import */ var _DomainConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../DomainConfiguration/icon-dictionary.service */ 29662); +/* harmony import */ var _IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../IconSetConfiguration/icon-dictionary.service */ 93689); /* harmony import */ var _Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Renderer/renderer.service */ 94896); /* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); /* harmony import */ var _BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../BrowserStorage/storage.service */ 59298); @@ -6956,7 +6957,7 @@ class AutosaveService { } loadDraft(draft) { const configFromFile = draft.configAndDST.domain; - const config = (0,_Domain_Common_domainConfiguration__WEBPACK_IMPORTED_MODULE_1__.fromConfigurationFromFile)(configFromFile); + const config = (0,_Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_1__.fromConfigurationFromFile)(configFromFile); const story = JSON.parse(draft.configAndDST.dst); this.titleService.updateTitleAndDescription(draft.title, draft.description, false); const actorIcons = this.iconDictionaryService.getElementsOfType(story, _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR); @@ -7040,7 +7041,7 @@ class AutosaveService { }); } static #_ = this.ɵfac = function AutosaveService_Factory(t) { - return new (t || AutosaveService)(_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_autosave_configuration_service__WEBPACK_IMPORTED_MODULE_3__.AutosaveConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_Export_export_service__WEBPACK_IMPORTED_MODULE_4__.ExportService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_DomainConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_6__.RendererService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_11__.MatSnackBar), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_7__.StorageService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_Title_title_service__WEBPACK_IMPORTED_MODULE_8__.TitleService)); + return new (t || AutosaveService)(_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_autosave_configuration_service__WEBPACK_IMPORTED_MODULE_3__.AutosaveConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_Export_export_service__WEBPACK_IMPORTED_MODULE_4__.ExportService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_6__.RendererService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_11__.MatSnackBar), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_7__.StorageService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_Title_title_service__WEBPACK_IMPORTED_MODULE_8__.TitleService)); }; static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdefineInjectable"]({ token: AutosaveService, @@ -7062,7 +7063,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export */ StorageService: () => (/* binding */ StorageService) /* harmony export */ }); /* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); -/* harmony import */ var _Domain_Common_domainConfiguration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Domain/Common/domainConfiguration */ 82011); +/* harmony import */ var _Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Domain/Common/iconSetConfiguration */ 84738); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 96623); @@ -7084,19 +7085,19 @@ class StorageService { checkValidityOfConfiguration(configuratioFromFile) { return configuratioFromFile.actors.keysArray().length > 1 && configuratioFromFile.workObjects.keysArray().length > 1 && !configuratioFromFile.actors.all().some(e => typeof e.value !== 'string') && !configuratioFromFile.workObjects.all().some(e => typeof e.value !== 'string'); } - getStoredDomainConfiguration() { - const domainString = localStorage.getItem(_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.DOMAIN_CONFIGURATION_TAG); - if (!domainString) { + getStoredIconSetConfiguration() { + const iconSetString = localStorage.getItem(_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.ICON_SET_CONFIGURATION_TAG); + if (!iconSetString) { return; } else { - const configuratioFromFile = (0,_Domain_Common_domainConfiguration__WEBPACK_IMPORTED_MODULE_1__.fromConfigurationFromFile)(JSON.parse(domainString)); - if (this.checkValidityOfConfiguration(configuratioFromFile)) { - return configuratioFromFile; + const configurationFromFile = (0,_Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_1__.fromConfigurationFromFile)(JSON.parse(iconSetString)); + if (this.checkValidityOfConfiguration(configurationFromFile)) { + return configurationFromFile; } } return; } - setStoredDomainConfiguration(config) { + setStoredIconSetConfiguration(config) { const actors = {}; config.actors.keysArray().forEach(key => { actors[key] = config.actors.get(key); @@ -7110,7 +7111,7 @@ class StorageService { actors: actors, workObjects: workObjects }; - localStorage.setItem(_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.DOMAIN_CONFIGURATION_TAG, JSON.stringify(configForStorage, null, 2)); + localStorage.setItem(_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.ICON_SET_CONFIGURATION_TAG, JSON.stringify(configForStorage, null, 2)); } static #_ = this.ɵfac = function StorageService_Factory(t) { return new (t || StorageService)(); @@ -7364,195 +7365,201 @@ class DomManipulationService { /***/ }), -/***/ 68449: -/*!*****************************************************************************!*\ - !*** ./src/app/Service/DomainConfiguration/domain-configuration.service.ts ***! - \*****************************************************************************/ +/***/ 67613: +/*!*********************************************************************!*\ + !*** ./src/app/Service/ElementRegistry/element-registry.service.ts ***! + \*********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ DomainConfigurationService: () => (/* binding */ DomainConfigurationService) +/* harmony export */ ElementRegistryService: () => (/* binding */ ElementRegistryService) /* harmony export */ }); -/* harmony import */ var src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/dictionary/dictionary */ 54972); -/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); -/* harmony import */ var _Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Domain/Common/iconConfiguration */ 34752); -/* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/core */ 96623); -/* harmony import */ var src_app_Service_DomainConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/Service/DomainConfiguration/icon-dictionary.service */ 29662); -/* harmony import */ var src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/Service/ElementRegistry/element-registry.service */ 67613); -/* harmony import */ var _Title_title_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Title/title.service */ 69672); - - - - - - +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); -class DomainConfigurationService { - constructor(iconDictionaryService, elementRegistryService, titleService) { - this.iconDictionaryService = iconDictionaryService; - this.elementRegistryService = elementRegistryService; - this.titleService = titleService; - } - setDomainName(domainName) { - this.titleService.setDomainName(domainName ? domainName : _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_3__.INITIAL_DOMAIN_NAME); +class ElementRegistryService { + constructor() { + this.fullyInitialized = false; } - exportConfiguration() { - const domainConfiguration = this.getCurrentConfigurationForExport(); - if (!domainConfiguration) { - return; + /** + * Initially the registry has only the root-Element. + * Once the canvas has bees initialized, we adjust the reference to point to the elements on the canvas for convenience + */ + correctInitialize() { + if (!this.fullyInitialized) { + if (this.registry.__implicitroot) { + this.registry = this.registry.__implicitroot.element.children; + this.fullyInitialized = true; + } } - const configJSONString = JSON.stringify(domainConfiguration, null, 2); - const filename = this.titleService.getDomainName(); - const element = document.createElement('a'); - element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(configJSONString)); - element.setAttribute('download', filename + '.domain'); - element.style.display = 'none'; - document.body.appendChild(element); - element.click(); - document.body.removeChild(element); } - loadConfiguration(customConfig, updateDomainName = true) { - let actorDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - let workObjectDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - if (customConfig.actors.keysArray()) { - actorDict = customConfig.actors; - workObjectDict = customConfig.workObjects; - } else { - actorDict.addEach(customConfig.actors); - workObjectDict.addEach(customConfig.workObjects); - } - const actorKeys = actorDict.keysArray(); - const workObjectKeys = workObjectDict.keysArray(); - this.iconDictionaryService.updateIconRegistries([], [], customConfig); - this.iconDictionaryService.getIconConfiguration().appendSRCFile(actorKeys, actorDict, workObjectKeys, workObjectDict); - this.iconDictionaryService.addIconsFromDomainConfiguration(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, actorKeys.map(a => src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR + a)); - this.iconDictionaryService.addIconsFromDomainConfiguration(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, workObjectKeys.map(w => src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT + w)); - if (updateDomainName) { - const configurationName = customConfig.name; - this.setDomainName(configurationName); - } + setElementRegistry(registry) { + this.registry = registry._elements; } - getCurrentConfiguration() { - const actors = this.iconDictionaryService.getActorsDictionary(); - const workObjects = this.iconDictionaryService.getWorkObjectsDictionary(); - let domainConfiguration; - if (actors.size() > 0 && workObjects.size() > 0) { - domainConfiguration = this.createConfigFromDictionaries(actors, workObjects); - } - return domainConfiguration; + clear() { + this.registry = null; + this.fullyInitialized = false; } - getCurrentConfigurationForExport() { - const currentConfiguration = this.getCurrentConfiguration(); - if (currentConfiguration) { - const actors = {}; - const workObjects = {}; - currentConfiguration.actors.all().forEach(entry => { - actors[entry.key] = entry.value; - }); - currentConfiguration.workObjects.all().forEach(entry => { - workObjects[entry.key] = entry.value; - }); - return { - name: currentConfiguration.name, - actors: actors, - workObjects: workObjects - }; + createObjectListForDSTDownload() { + if (this.registry) { + const allObjectsFromCanvas = this.getAllCanvasObjects(); + const groups = this.getAllGroups(); + const objectList = []; + this.fillListOfCanvasObjects(allObjectsFromCanvas, objectList, groups); + return objectList; } - return; - } - getCurrentConfigurationNamesWithoutPrefix() { - return { - name: this.titleService.getDomainName() || _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_3__.INITIAL_DOMAIN_NAME, - actors: this.iconDictionaryService.getActorsDictionary().keysArray().map(a => a.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, '')), - workObjects: this.iconDictionaryService.getWorkObjectsDictionary().keysArray().map(w => w.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, '')) - }; + return []; } - createMinimalConfigurationWithDefaultIcons() { - const minimalConfig = this.createConfigFromCanvas(); - _Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__.defaultConf.actors.forEach(iconName => { - minimalConfig.actors.add(this.iconDictionaryService.getIconSource(iconName), iconName); + fillListOfCanvasObjects(allObjectsFromCanvas, objectList, groups) { + allObjectsFromCanvas.forEach(canvasElement => { + if (canvasElement.type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTIVITY) { + objectList.push(canvasElement); + } + // ensure that Activities are always after Actors, Workobjects and Groups in .dst files + else { + if (canvasElement.type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.TEXTANNOTATION) { + canvasElement.businessObject.width = canvasElement.width; + canvasElement.businessObject.height = canvasElement.height; + } + if (!objectList.includes(canvasElement)) { + objectList.unshift(canvasElement); + } + } }); - _Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__.defaultConf.workObjects.forEach(iconName => { - minimalConfig.workObjects.add(this.iconDictionaryService.getIconSource(iconName), iconName); + groups.forEach(group => { + objectList.push(group); }); - return minimalConfig; } - createConfigFromDictionaries(actorsDict, workObjectsDict) { - const actorNames = actorsDict.keysArray(); - const workobjectNames = workObjectsDict.keysArray(); - const newActors = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - const newWorkobjects = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - // Fill Configuration from Canvas-Objects - actorNames.forEach(actor => { - newActors.add(actorsDict.get(actor), actor.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, '')); + getAllActivities() { + const activities = []; + this.getAllCanvasObjects().forEach(element => { + if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTIVITY)) { + activities.push(element); + } }); - workobjectNames.forEach(workObject => { - newWorkobjects.add(workObjectsDict.get(workObject), workObject.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, '')); + return activities; + } + getAllConnections() { + const connections = []; + this.getAllCanvasObjects().forEach(element => { + const type = element.type; + if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.CONNECTION) { + connections.push(element); + } }); - return { - name: this.titleService.getDomainName(), - actors: newActors, - workObjects: newWorkobjects - }; + return connections; } - createConfigFromCanvas() { - const config = { - name: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_3__.INITIAL_DOMAIN_NAME, - actors: new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(), - workObjects: new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary() - }; - let allCanvasObjects = this.elementRegistryService.getAllCanvasObjects(); - allCanvasObjects.map(e => e.businessObject).forEach(element => { - const type = element.type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, '').replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, ''); - if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR)) { - let src = this.iconDictionaryService.getIconSource(type) || ''; - config.actors.add(src, type); - } else if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT)) { - let src = this.iconDictionaryService.getIconSource(type) || ''; - config.workObjects.add(src, type); + getAllCanvasObjects() { + const allObjects = []; + const groupObjects = []; + this.checkChildForGroup(groupObjects, allObjects); + // for each memorized group, remove it from the group-array and check its children, whether they are groups or not + // if a child is a group, memorize it in the group-array + // other children should already be in the allObjects list + let i = groupObjects.length - 1; + while (groupObjects.length >= 1) { + const currentGroup = groupObjects.pop(); + // @ts-ignore + currentGroup.children.forEach(child => { + const type = child.type; + if (type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.GROUP)) { + groupObjects.push(child); + } + }); + i = groupObjects.length - 1; + } + return allObjects; + } + // returns all groups on the canvas and inside other groups + getAllGroups() { + const groupObjects = []; + const allObjects = []; + this.checkChildForGroup(groupObjects, allObjects); + for (const group of groupObjects) { + group.children?.forEach(child => { + if (child.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.GROUP)) { + groupObjects.push(child); + } + }); + } + return groupObjects; + } + checkChildForGroup(groupObjects, allObjects) { + const registryElementNames = Object.keys(this.registry); + for (let name of registryElementNames) { + const entry = this.registry[name].element; + if (entry.businessObject) { + const type = entry.type; + if (type && type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.GROUP)) { + // if it is a group, memorize this for later + groupObjects.push(entry); + } else if (type) { + allObjects.push(entry); + } + } + } + } + // get a list of activities, that originate from an actor-type + getActivitiesFromActors() { + const activitiesFromActors = []; + const activities = this.getAllActivities(); + activities.forEach(activity => { + if (activity.source?.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR)) { + activitiesFromActors.push(activity); } }); - return config; + return activitiesFromActors; + } + getUsedIcons() { + const actors = this.getAllActors(); + const workobjects = this.getAllWorkobjects(); + return { + actors: actors.map(a => a.type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR, '')), + workobjects: workobjects.map(w => w.type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT, '')) + }; + } + getAllActors() { + return this.getAllCanvasObjects().filter(co => co.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR)); + } + getAllWorkobjects() { + return this.getAllCanvasObjects().filter(co => co.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT)); } - static #_ = this.ɵfac = function DomainConfigurationService_Factory(t) { - return new (t || DomainConfigurationService)(_angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵinject"](src_app_Service_DomainConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_4__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵinject"](src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_5__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵinject"](_Title_title_service__WEBPACK_IMPORTED_MODULE_6__.TitleService)); + static #_ = this.ɵfac = function ElementRegistryService_Factory(t) { + return new (t || ElementRegistryService)(); }; - static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵdefineInjectable"]({ - token: DomainConfigurationService, - factory: DomainConfigurationService.ɵfac, + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ + token: ElementRegistryService, + factory: ElementRegistryService.ɵfac, providedIn: 'root' }); } /***/ }), -/***/ 42854: -/*!*****************************************************************************!*\ - !*** ./src/app/Service/DomainConfiguration/domain-customization.service.ts ***! - \*****************************************************************************/ +/***/ 98106: +/*!**************************************************!*\ + !*** ./src/app/Service/Export/export.service.ts ***! + \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ DomainCustomizationService: () => (/* binding */ DomainCustomizationService) +/* harmony export */ ExportService: () => (/* binding */ ExportService) /* harmony export */ }); -/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs */ 95536); -/* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); -/* harmony import */ var _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Domain/Common/dictionary/dictionary */ 54972); -/* harmony import */ var _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Domain/Common/elementTypes */ 30236); -/* harmony import */ var _Utils_naming__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Utils/naming */ 28714); +/* harmony import */ var src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Utils/sanitizer */ 66107); +/* harmony import */ var src_app_Domain_Export_configAndDst__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Export/configAndDst */ 74306); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../environments/environment */ 45312); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/core */ 96623); -/* harmony import */ var _domain_configuration_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./domain-configuration.service */ 68449); -/* harmony import */ var _icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./icon-dictionary.service */ 29662); -/* harmony import */ var _Import_import_domain_story_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Import/import-domain-story.service */ 23779); -/* harmony import */ var _Title_title_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Title/title.service */ 69672); -/* harmony import */ var _BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../BrowserStorage/storage.service */ 59298); -/* harmony import */ var src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/Service/ElementRegistry/element-registry.service */ 67613); -/* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); - +/* harmony import */ var src_app_Service_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/Service/IconSetConfiguration/icon-set-configuration.service */ 10200); +/* harmony import */ var src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/Service/Title/title.service */ 69672); +/* harmony import */ var src_app_Service_DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/Service/DirtyFlag/dirty-flag.service */ 89791); +/* harmony import */ var src_app_Service_Export_png_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/Service/Export/png.service */ 11503); +/* harmony import */ var src_app_Service_Export_svg_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/Service/Export/svg.service */ 29298); +/* harmony import */ var _html_presentation_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./html-presentation.service */ 72680); +/* harmony import */ var _Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Renderer/renderer.service */ 94896); @@ -7565,1474 +7572,1468 @@ __webpack_require__.r(__webpack_exports__); -class DomainCustomizationService { - constructor(configurationService, iconDictionaryService, importService, titleService, storageService, elementRegistryService, snackbar) { +class ExportService { + constructor(configurationService, titleService, dirtyFlagService, pngService, svgService, htmlPresentationService, rendererService) { this.configurationService = configurationService; - this.iconDictionaryService = iconDictionaryService; - this.importService = importService; this.titleService = titleService; - this.storageService = storageService; - this.elementRegistryService = elementRegistryService; - this.snackbar = snackbar; - this.allIconListItems = new _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary(); - this.configurationHasChanged = false; - this.selectedActors$ = new rxjs__WEBPACK_IMPORTED_MODULE_10__.BehaviorSubject([]); - this.selectedWorkobjects$ = new rxjs__WEBPACK_IMPORTED_MODULE_10__.BehaviorSubject([]); - this.domainConfigurationTypes = new rxjs__WEBPACK_IMPORTED_MODULE_10__.BehaviorSubject(this.configurationService.getCurrentConfigurationNamesWithoutPrefix()); - this.selectedWorkobjects$.next(this.domainConfigurationTypes.value.workObjects); - this.selectedActors$.next(this.domainConfigurationTypes.value.actors); - iconDictionaryService.getAllIconDictionary().keysArray().forEach(iconName => { - this.addIconToAllIconList(iconName); - }); - importService.importedConfigurationEvent.subscribe(config => { - this.importConfiguration(config); - }); - const storedDomainConfiguration = this.storageService.getStoredDomainConfiguration(); - if (storedDomainConfiguration) { - this.importConfiguration(storedDomainConfiguration, false); - } - const importedConfiguration = this.importService.getImportedConfiguration(); - if (importedConfiguration) { - this.importConfiguration(importedConfiguration, false); - } - } - importConfiguration(customConfig, saveDomain = true) { - const actorKeys = customConfig.actors.keysArray(); - const workObjectKeys = customConfig.workObjects.keysArray(); - this.changeName(customConfig.name); - actorKeys.forEach(iconName => { - if (!this.allIconListItems.has(iconName)) { - this.addIconToAllIconList(iconName); - } - const selectedActorNames = this.selectedActors$.value; - if (!selectedActorNames.includes(iconName)) { - this.selectActor(iconName); - } + this.dirtyFlagService = dirtyFlagService; + this.pngService = pngService; + this.svgService = svgService; + this.htmlPresentationService = htmlPresentationService; + this.rendererService = rendererService; + this.title = ''; + this.description = ''; + this.titleSubscription = this.titleService.title$.subscribe(title => { + this.title = title; }); - workObjectKeys.forEach(iconName => { - if (!this.allIconListItems.has(iconName)) { - this.addIconToAllIconList(iconName); - } - const selectedWorkobjectNames = this.selectedWorkobjects$.value; - if (!selectedWorkobjectNames.includes(iconName)) { - this.selectWorkObject(iconName); - } + this.descriptionSubscription = this.titleService.description$.subscribe(description => { + this.description = description; }); - if (saveDomain) { - this.saveDomain(this.elementRegistryService.getUsedIcons(), true); - } } - /** Getter & Setter **/ - getDomainConfiguration() { - return this.domainConfigurationTypes; + ngOnDestroy() { + this.titleSubscription.unsubscribe(); + this.descriptionSubscription.unsubscribe(); } - getIconForName(iconName) { - return this.allIconListItems.get(iconName); + isDomainStoryExportable() { + return this.rendererService.getStory().length >= 1; } - isIconActor(iconName) { - return this.domainConfigurationTypes.value.actors.filter(actor => actor === iconName).length > 0; + createConfigAndDST(DomainStory) { + return new src_app_Domain_Export_configAndDst__WEBPACK_IMPORTED_MODULE_1__.ConfigAndDST(this.configurationService.getCurrentConfigurationForExport(), DomainStory); } - isIconWorkObject(iconName) { - return this.domainConfigurationTypes.value.workObjects.filter(workObject => workObject === iconName).length > 0; + downloadDST() { + const dst = this.getStoryForDownload(); + const configAndDST = this.createConfigAndDST(dst); + const json = JSON.stringify(configAndDST, null, 2); + const filename = (0,src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_0__.sanitizeForDesktop)(this.title + '_' + this.getCurrentDateString()); + this.downloadFile(json, 'data:text/plain;charset=utf-8,', filename, '.egn', true); } - changeName(domainName) { - this.titleService.setDomainName(domainName); - const changedDomain = this.domainConfigurationTypes.value; - changedDomain.name = domainName; - this.domainConfigurationTypes.next(changedDomain); + downloadFile(data, datatype, filename, fileEnding, makeClean) { + const element = document.createElement('a'); + element.setAttribute('href', datatype + encodeURIComponent(data)); + element.setAttribute('download', filename + fileEnding); + element.style.display = 'none'; + document.body.appendChild(element); + element.click(); + if (makeClean) { + this.dirtyFlagService.makeClean(); + } + document.body.removeChild(element); } - /** Selected Icons **/ - setAsUnassigned(iconName, isActor) { - if (isActor) { - this.deselectActor(iconName); - } else { - this.deselectWorkobject(iconName); - } - this.updateIcon(false, false, iconName); - } - setAsActor(isActor, actor) { - if (isActor) { - this.updateIcon(true, false, actor); - this.selectActor(actor); - this.deselectWorkobject(actor); - } else { - this.deselectActor(actor); - this.updateIcon(false, false, actor); - } - } - setAsWorkobject(isWorkobject, workobject) { - if (isWorkobject) { - this.updateIcon(false, true, workobject); - this.selectWorkObject(workobject); - this.deselectActor(workobject); - } else { - this.deselectWorkobject(workobject); - this.updateIcon(false, false, workobject); - } - } - selectActor(actor) { - const value = this.domainConfigurationTypes.value; - if (!value.actors.includes(actor)) { - value.actors.push(actor); - this.domainConfigurationTypes.next(value); - this.updateActorSubject(); - } - } - selectWorkObject(workObject) { - const value = this.domainConfigurationTypes.value; - if (!value.workObjects.includes(workObject)) { - value.workObjects.push(workObject); - this.domainConfigurationTypes.next(value); - this.updateWorkObjectSubject(); - } - } - deselectActor(actor) { - if (this.domainConfigurationTypes) { - this.domainConfigurationTypes.next({ - name: this.domainConfigurationTypes.value.name, - actors: this.domainConfigurationTypes.value.actors.filter(a => !a.includes(actor)), - workObjects: this.domainConfigurationTypes.value.workObjects - }); - } - this.updateActorSubject(); - } - deselectWorkobject(workobject) { - if (this.domainConfigurationTypes) { - this.domainConfigurationTypes.next({ - name: this.domainConfigurationTypes.value.name, - actors: this.domainConfigurationTypes.value.actors, - workObjects: this.domainConfigurationTypes.value.workObjects.filter(w => !w.includes(workobject)) - }); - } - this.updateWorkObjectSubject(); - } - setSelectedWorkObject(sortedList) { - const value = this.domainConfigurationTypes.value; - value.workObjects = sortedList; - this.domainConfigurationTypes.next(value); - this.updateWorkObjectSubject(); - } - setSelectedActors(sortedList) { - const value = this.domainConfigurationTypes.value; - value.actors = sortedList; - this.domainConfigurationTypes.next(value); - this.updateActorSubject(); - } - updateActorSubject() { - this.selectedActors$.next(this.domainConfigurationTypes.value.actors); - this.configurationHasChanged = true; - } - updateWorkObjectSubject() { - this.selectedWorkobjects$.next(this.domainConfigurationTypes.value.workObjects); - this.configurationHasChanged = true; - } - /** Revert Domain **/ - resetDomain() { - const defaultConfig = this.configurationService.createMinimalConfigurationWithDefaultIcons(); - this.selectedWorkobjects$.value.forEach(workObjectName => { - if (!defaultConfig.workObjects.has(workObjectName)) { - this.deselectWorkobject(workObjectName); - } - }); - this.selectedActors$.value.forEach(actorName => { - if (!defaultConfig.actors.has(actorName)) { - this.deselectActor(actorName); - } - }); - this.domainConfigurationTypes.next({ - name: defaultConfig.name, - actors: defaultConfig.actors.keysArray(), - workObjects: defaultConfig.workObjects.keysArray() - }); - this.updateAllIconBehaviourSubjects(); - } - cancel() { - this.domainConfigurationTypes.next(this.configurationService.getCurrentConfigurationNamesWithoutPrefix()); - this.updateAllIconBehaviourSubjects(); - this.resetToInitialConfiguration(); - } - resetToInitialConfiguration() { - this.updateActorSubject(); - this.updateWorkObjectSubject(); + downloadSVG(withTitle, useWhiteBackground) { + const story = this.getStoryForDownload(); + const dst = this.createConfigAndDST(story); + const svgData = this.svgService.createSVGData(this.title, this.description, dst, withTitle, useWhiteBackground); + this.downloadFile(svgData, 'data:application/bpmn20-xml;charset=UTF-8,', (0,src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_0__.sanitizeForDesktop)(this.title + '_' + this.getCurrentDateString()), '.egn.svg', true); } - /** Persist Domain **/ - saveDomain(usedIcons, imported = false) { - const changedActors = []; - const changedWorkobjects = []; - if (this.configurationHasChanged) { - const changedDomain = this.createDomainConfiguration(); - const configurationActors = changedDomain.actors.keysArray(); - usedIcons?.actors.forEach(actor => { - if (!configurationActors?.includes(actor) && !changedActors.includes(actor)) { - changedActors.push(actor); - } - }); - const configurationWorkobjects = changedDomain.workObjects.keysArray(); - usedIcons?.workobjects.forEach(workobject => { - if (!configurationWorkobjects?.includes(workobject) && !changedWorkobjects.includes(workobject)) { - changedWorkobjects.push(workobject); + downloadPNG(withTitle) { + const canvas = document.getElementById('canvas'); + if (canvas) { + const container = canvas.getElementsByClassName('djs-container'); + const svgElements = container[0].getElementsByTagName('svg'); + const outerSVGElement = svgElements[0]; + const viewport = outerSVGElement.getElementsByClassName('viewport')[0]; + const layerBase = viewport.getElementsByClassName('layer-base')[0]; + const image = document.createElement('img'); + // removes unwanted black dots in image + let svg = this.pngService.extractSVG(viewport, outerSVGElement); + svg = this.pngService.prepareSVG(svg, layerBase, this.description, this.title, withTitle); + image.onload = () => { + const tempCanvas = document.createElement('canvas'); + // add a 10px buffer to the right and lower boundary + tempCanvas.width = this.pngService.getWidth() + 10; + tempCanvas.height = this.pngService.getHeight() + 10; + const ctx = tempCanvas.getContext('2d'); + if (ctx) { + // fill with white background + ctx.rect(0, 0, tempCanvas.width, tempCanvas.height); + ctx.fillStyle = 'white'; + ctx.fill(); + ctx.drawImage(image, 0, 0); } - }); - if (!changedActors.length && !changedWorkobjects.length) { - this.changedDomainConfiguration = changedDomain; - this.updateIcons(changedDomain); - this.storageService.setStoredDomainConfiguration(this.changedDomainConfiguration); - this.snackbar.open(imported ? 'Configuration imported successfully' : 'Configuration saved successfully', undefined, { - duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION, - panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_SUCCESS - }); - } - } else { - this.snackbar.open(imported ? 'No configuration to be imported' : 'No configuration to be saved', undefined, { - duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION, - panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_INFO - }); - } - if (changedActors.length || changedWorkobjects.length) { - if (changedActors.length) { - const actors = changedActors.join(', '); - this.snackbar.open(`The following icons are already in use as actors and cannot be changed: ${actors}`, undefined, { - duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION * 3, - panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_INFO - }); - } - if (changedWorkobjects.length) { - const workobjects = changedWorkobjects.join(', '); - this.snackbar.open(`The following icons are already in use as workobjects and cannot be changed: ${workobjects}`, undefined, { - duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION * 3, - panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_INFO - }); - } + const png64 = tempCanvas.toDataURL('image/png'); + const ele = document.createElement('a'); + ele.setAttribute('download', (0,src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_0__.sanitizeForDesktop)(this.title) + '_' + this.getCurrentDateString() + '.png'); + ele.setAttribute('href', png64); + document.body.appendChild(ele); + ele.click(); + document.body.removeChild(ele); + // image source has to be removed to circumvent browser caching + image.src = ''; + }; + image.onchange = image.onload; + image.width = this.pngService.getWidth(); + image.height = this.pngService.getHeight(); + image.src = 'data:image/svg+xml,' + svg; } } - exportDomain() { - this.configurationService.exportConfiguration(); - } - getAndClearSavedConfiguration() { - const temp = this.changedDomainConfiguration; - this.changedDomainConfiguration = undefined; - return temp; + downloadHTMLPresentation() { + const filename = (0,src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_0__.sanitizeForDesktop)(this.title + '_' + this.getCurrentDateString()); + this.htmlPresentationService.downloadHTMLPresentation(filename).then(); } - createDomainConfiguration() { - const actors = new _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary(); - const workObjects = new _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary(); - this.domainConfigurationTypes.value.actors.forEach(name => { - actors.add(this.iconDictionaryService.getIconSource(name), name); - }); - this.domainConfigurationTypes.value.workObjects.forEach(name => { - workObjects.add(this.iconDictionaryService.getIconSource(name), name); + getStoryForDownload() { + const story = this.rendererService.getStory(); + story.push({ + info: this.titleService.getDescription() }); - return { - name: this.domainConfigurationTypes.value.name || '', - actors, - workObjects - }; - } - /** Update Icons **/ - addNewIcon(iconName) { - const iconDict = new _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary(); - iconDict.add(this.getSrcForIcon(iconName), iconName); - this.iconDictionaryService.addIconsToCss(iconDict); - this.addIconToAllIconList(iconName); - } - addIconToAllIconList(iconName) { - this.allIconListItems.add(new rxjs__WEBPACK_IMPORTED_MODULE_10__.BehaviorSubject({ - name: iconName, - svg: this.getSrcForIcon(iconName), - isActor: this.isIconActor(iconName), - isWorkObject: this.isIconWorkObject(iconName) - }), iconName); - } - updateIcon(isActor, isWorkobject, iconName) { - const iconBehaviourSubject = this.getIconForName(iconName); - const icon = iconBehaviourSubject.value; - icon.isActor = isActor; - icon.isWorkObject = isWorkobject; - iconBehaviourSubject.next(icon); - } - updateAllIconBehaviourSubjects() { - const customDomainConfiguration = this.domainConfigurationTypes.value; - this.allIconListItems.keysArray().forEach(iconName => { - if (customDomainConfiguration.actors.includes(iconName)) { - this.updateIcon(true, false, iconName); - } else if (customDomainConfiguration.workObjects.includes(iconName)) { - this.updateIcon(false, true, iconName); - } else { - this.updateIcon(false, false, iconName); - } + story.push({ + version: _environments_environment__WEBPACK_IMPORTED_MODULE_2__.environment.version }); + return story; } - getSrcForIcon(name) { - let iconName; - if (name.includes(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.DOMAINSTORY)) { - // TODO: td: This returns empty every time! - iconName = (0,_Utils_naming__WEBPACK_IMPORTED_MODULE_3__.getNameFromType)(name); - } else { - iconName = name; - } - const rawSrc = this.iconDictionaryService.getIconSource(iconName); - if (!rawSrc) { - return ''; - } - if (rawSrc.startsWith('data')) { - return rawSrc; - } else { - return 'data:image/svg+xml,' + rawSrc; - } - } - updateIcons(changedDomain) { - this.allIconListItems.keysArray().forEach(item => this.setAsUnassigned(item, this.isIconActor(item))); - changedDomain.actors.keysArray().forEach(actor => { - this.iconDictionaryService.registerIconForType(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR, actor, this.iconDictionaryService.getFullDictionary().get(actor)); - this.iconDictionaryService.unregisterIconForType(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.WORKOBJECT, actor); - this.setAsActor(true, actor); - }); - changedDomain.workObjects.keysArray().forEach(workObject => { - this.iconDictionaryService.registerIconForType(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.WORKOBJECT, workObject, this.iconDictionaryService.getFullDictionary().get(workObject)); - this.iconDictionaryService.unregisterIconForType(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR, workObject); - this.setAsWorkobject(true, workObject); - }); + getCurrentDateString() { + return (0,_angular_common__WEBPACK_IMPORTED_MODULE_10__.formatDate)(new Date(), 'YYYY-MM-dd', 'en-GB'); } - static #_ = this.ɵfac = function DomainCustomizationService_Factory(t) { - return new (t || DomainCustomizationService)(_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_domain_configuration_service__WEBPACK_IMPORTED_MODULE_4__.DomainConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_Import_import_domain_story_service__WEBPACK_IMPORTED_MODULE_6__.ImportDomainStoryService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_Title_title_service__WEBPACK_IMPORTED_MODULE_7__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_8__.StorageService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_9__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_12__.MatSnackBar)); + static #_ = this.ɵfac = function ExportService_Factory(t) { + return new (t || ExportService)(_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_3__.IconSetConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_4__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_5__.DirtyFlagService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_Export_png_service__WEBPACK_IMPORTED_MODULE_6__.PngService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_Export_svg_service__WEBPACK_IMPORTED_MODULE_7__.SvgService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_html_presentation_service__WEBPACK_IMPORTED_MODULE_8__.HtmlPresentationService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_9__.RendererService)); }; static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵdefineInjectable"]({ - token: DomainCustomizationService, - factory: DomainCustomizationService.ɵfac, + token: ExportService, + factory: ExportService.ɵfac, providedIn: 'root' }); } /***/ }), -/***/ 29662: -/*!************************************************************************!*\ - !*** ./src/app/Service/DomainConfiguration/icon-dictionary.service.ts ***! - \************************************************************************/ +/***/ 72680: +/*!*************************************************************!*\ + !*** ./src/app/Service/Export/html-presentation.service.ts ***! + \*************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ ICON_PREFIX: () => (/* binding */ ICON_PREFIX), -/* harmony export */ IconDictionaryService: () => (/* binding */ IconDictionaryService) +/* harmony export */ HtmlPresentationService: () => (/* binding */ HtmlPresentationService) /* harmony export */ }); -/* harmony import */ var src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/dictionary/dictionary */ 54972); -/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); -/* harmony import */ var src_app_Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Domain/Common/iconConfiguration */ 34752); -/* harmony import */ var src_app_Domain_Domain_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/Domain/Domain-Configuration/allIcons */ 13960); -/* harmony import */ var _Utils_naming__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Utils/naming */ 28714); -/* harmony import */ var _Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Utils/sanitizer */ 66107); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/core */ 96623); - +/* harmony import */ var _home_runner_work_egon_io_egon_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 56207); +/* harmony import */ var _Utils_sanitizer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/sanitizer */ 66107); +/* harmony import */ var dot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dot */ 13280); +/* harmony import */ var dot__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(dot__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _Replay_replay_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Replay/replay.service */ 94788); +/* harmony import */ var _Title_title_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Title/title.service */ 69672); +// @ts-ignore -const ICON_PREFIX = 'icon-domain-story-'; -class IconDictionaryService { - constructor() { - this.actorIconDictionary = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - this.workObjectDictionary = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - this.allIconDictionary = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - this.iconDictionaryForBPMN = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - this.allIconDictionary.addEach(src_app_Domain_Domain_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.allIcons); - this.iconConfig = new src_app_Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__.IconConfiguration(this.allIconDictionary); - } - initTypeDictionaries(actors, workObjects) { - if (!actors || actors.length == 0) { - actors = src_app_Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__.defaultConf.actors; - } - if (!workObjects || workObjects.length == 0) { - workObjects = src_app_Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__.defaultConf.workObjects; - } - const allTypes = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - allTypes.addEach(src_app_Domain_Domain_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.allIcons); - allTypes.appendDict(this.getAppendedIconDictionary()); - this.initDictionary(actors, allTypes, this.actorIconDictionary, src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR); - this.initDictionary(workObjects, allTypes, this.workObjectDictionary, src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT); - } - initDictionary(keys, allTypes, dictionary, elementType) { - dictionary.clear(); - for (const key of keys) { - dictionary.add(allTypes.get(key), key); - } - dictionary.keysArray().forEach(name => { - this.registerIconForBPMN(name, ICON_PREFIX + (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.sanitizeIconName)(name.toLowerCase()), elementType); - }); +/** + * Initial idea and PR from https://github.com/indika-dev + */ +class HtmlPresentationService { + constructor(replayService, titleService) { + this.replayService = replayService; + this.titleService = titleService; } - getCurrentIconConfigurationForBPMN() { - if (this.customConfiguration) { - return this.iconConfig.createCustomConf(this.customConfiguration); - } - return this.iconConfig.getDefaultConf(); + setModelerClasses(canvas, selection, modeler) { + this.modeler = modeler; } - allInTypeDictionary(type, elements) { - let collection; - if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { - collection = this.actorIconDictionary; - } else if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { - collection = this.workObjectDictionary; - } - let allIn = true; - if (elements) { - elements.forEach(element => { - if (!collection.has((0,_Utils_naming__WEBPACK_IMPORTED_MODULE_4__.getNameFromType)(element.type))) { - allIn = false; - } - }); - } else { - return false; - } - return allIn; + static viewBoxCoordinates(svg) { + const ViewBoxCoordinate = /width="([^"]+)"\s+height="([^"]+)"\s+viewBox="([^"]+)"/; + const match = svg.match(ViewBoxCoordinate); + return match[3]; } - /** Load Icons from Configuration **/ - addIconsFromDomainConfiguration(dictionaryType, iconTypes) { - let collection; - if (dictionaryType === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { - collection = this.actorIconDictionary; - } else if (dictionaryType === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { - collection = this.workObjectDictionary; - } - const allTypes = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - allTypes.addEach(src_app_Domain_Domain_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.allIcons); - allTypes.appendDict(src_app_Domain_Domain_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons); - iconTypes.forEach(name => { - if (!collection.has(name)) { - const src = allTypes.get(name); - if (src) { - this.registerIconForType(dictionaryType, name, src); - this.registerIconForBPMN(name, (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.sanitizeIconName)(ICON_PREFIX + name.toLowerCase()), dictionaryType); + /* + --------------------------- + SVG handling starts here + ---------------------------- + */ + downloadHTMLPresentation(filename) { + var _this = this; + return (0,_home_runner_work_egon_io_egon_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + const svgData = []; + // export all sentences of domain story + _this.replayService.startReplay(); + try { + const result = yield _this.modeler.saveSVG({}); + _this.fixActivityMarkersForEachSentence(result, _this.replayService.getCurrentSentenceNumber()); + svgData.push({ + content: HtmlPresentationService.createSVGData(result.svg), + transition: 'slide' + }); + } catch (err) { + alert('There was an error exporting the SVG.\n' + err); + } + while (_this.replayService.getCurrentSentenceNumber() < _this.replayService.getMaxSentenceNumber()) { + _this.replayService.nextSentence(); + try { + const result = yield _this.modeler.saveSVG({}); + _this.fixActivityMarkersForEachSentence(result, _this.replayService.getCurrentSentenceNumber()); + svgData.push({ + content: HtmlPresentationService.createSVGData(result.svg), + transition: 'slide' + }); + } catch (err) { + alert('There was an error exporting the SVG.\n' + err); } } - }); + _this.replayService.stopReplay(); + // create download for presentation + const revealjsTemplate = document.getElementById('revealjs-template'); + const dots = dot__WEBPACK_IMPORTED_MODULE_2___default().template(revealjsTemplate?.innerHTML); + const revealjsData = { + script: 'script', + title: _this.titleService.getTitle(), + description: _this.titleService.getDescription(), + sentences: svgData, + multiplexSecret: _this.multiplexSecret, + multiplexId: _this.multiplexId + }; + const element = document.createElement('a'); + element.setAttribute('href', 'data:text/html;charset=UTF-8,' + _this.fixMalformedHtmlScript(dots, revealjsData)); + element.setAttribute('download', (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_1__.sanitizeForDesktop)(filename) + '.html'); + element.style.display = 'none'; + document.body.appendChild(element); + element.click(); + document.body.removeChild(element); + })(); } - /** Add Icon(s) to Dictionary **/ - registerIconForBPMN(name, src, elementType) { - if (name.includes(elementType)) { - throw new Error('Should not include elementType'); - } - this.iconDictionaryForBPMN.set(`${elementType}${name}`, src); + fixMalformedHtmlScript(dots, revealjsData) { + return dots(revealjsData).replace(' (0,_Utils_naming__WEBPACK_IMPORTED_MODULE_4__.getNameFromType)(element.type))); - } - if (!this.allInTypeDictionary(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, workObjectIcons)) { - this.addIconsFromDomainConfiguration(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, workObjectIcons.map(element => (0,_Utils_naming__WEBPACK_IMPORTED_MODULE_4__.getNameFromType)(element.type))); + // tslint:disable-next-line:align + static createSVGData(svg) { + let data = structuredClone(svg); + // to ensure that the title and description are inside the SVG container and do not overlap with any elements, + // we change the confines of the SVG viewbox + let viewBoxIndex = data.indexOf('width="'); + const viewBox = HtmlPresentationService.viewBoxCoordinates(data); + let xLeft; + let width; + let yUp; + let height; + const splitViewBox = viewBox.split(/\s/); + xLeft = +splitViewBox[0]; + yUp = +splitViewBox[1]; + width = +splitViewBox[2]; + height = +splitViewBox[3]; + if (width < 300) { + width += 300; } + const dataStart = data.substring(0, viewBoxIndex); + viewBoxIndex = data.indexOf('" version'); + const dataEnd = data.substring(viewBoxIndex); + dataEnd.substring(viewBoxIndex); + data = dataStart + this.createBounds(xLeft, yUp, width, height) + dataEnd; + return encodeURIComponent(data); } - registerIconForType(type, name, src) { - if (name.includes(type)) { - throw new Error('Name should not include type!'); - } - let collection = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { - collection = this.actorIconDictionary; - } else if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { - collection = this.workObjectDictionary; - } - collection.add(src, name); + static createBounds(xLeft, yUp, width, height) { + return 'width="100%"' + ' height="100%" ' + ' preserveAspectRatio="xMidYMid meet"' + ' viewBox="' + xLeft + ' ' + yUp + ' ' + (xLeft + width) + ' ' + (yUp + height); } - unregisterIconForType(type, name) { - if (name.includes(type)) { - throw new Error('Name should not include type!'); - } - let collection = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { - collection = this.actorIconDictionary; - } else if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { - collection = this.workObjectDictionary; + /** + * There is a Problem in the HTML-Presentation, where the Arrow-Heads of the Activities are not shown after the 4th sentence + * This is due to the fact, that the marker for the Arrow-Head is defined in each sentence with the same ID + * When the 5th sentence is reached, the first marker is set to display none, which propagates to all other markers + * + * To fix this, for each sentence the marker and its references are renamed + */ + fixActivityMarkersForEachSentence(result, sectionIndex) { + const defs = result.svg.substring(result.svg.indexOf(''), result.svg.indexOf('') + 7); + const split = defs.split(' { + const idToReplace = id.substring(4, id.length - 1); + const newId = idToReplace.slice(0, id.length - 5) + 'customId' + sectionIndex + idToReplace.slice(idToReplace.length - 2); + // @ts-ignore + result.svg = result.svg.replaceAll(idToReplace, newId); + }); + newDefs += ' elements.push(a)); - workObjects.forEach(w => elements.push(w)); - const customIcons = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - const actorsDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - const workObjectsDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - config.actors.keysArray().forEach(key => { - actorsDict.set(key, config.actors.get(key)); - }); - config.workObjects.keysArray().forEach(key => { - workObjectsDict.set(key, config.workObjects.get(key)); - }); - this.extractCustomIconsFromDictionary(actorsDict, customIcons); - this.extractCustomIconsFromDictionary(workObjectsDict, customIcons); - elements.forEach(element => { - const name = (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.sanitizeIconName)(element.type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, '').replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, '')); - if ((element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) || element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT)) && !this.getFullDictionary().has(name)) { - let elementType; - if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR)) { - elementType = src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR; - } else { - elementType = src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT; - } - this.registerIconForBPMN(ICON_PREFIX + name.toLowerCase(), (0,_Utils_naming__WEBPACK_IMPORTED_MODULE_4__.getNameFromType)(element.type), elementType); - } - }); - this.addNewIconsToDictionary(customIcons); - this.addIconsToTypeDictionary(actors, workObjects); - } - extractCustomIconsFromDictionary(elementDictionary, customIcons) { - elementDictionary.keysArray().forEach(name => { - const sanitizedName = (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.sanitizeIconName)(name); - if (!this.getFullDictionary().has(sanitizedName)) { - customIcons.add(elementDictionary.get(name), sanitizedName); - } - }); - } - /** Add new Icon(s) **/ - addNewIconsToDictionary(customIcons) { - customIcons.keysArray().forEach(key => { - const custom = customIcons.get(key); - this.addIMGToIconDictionary(custom.src, key); - }); - this.addIconsToCss(customIcons); - } - addIMGToIconDictionary(input, name) { - src_app_Domain_Domain_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons.set(name, input); - } - addIconsToCss(customIcons) { - const sheetEl = document.getElementById('iconsCss'); - customIcons.keysArray().forEach(key => { - const src = customIcons.get(key); - const iconStyle = '.' + ICON_PREFIX + (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.sanitizeIconName)(key.toLowerCase()) + '::before{ content: url("data:image/svg+xml;utf8,' + this.wrapSRCInSVG(src) + '"); margin: 3px;}'; - // @ts-ignore - sheetEl?.sheet?.insertRule(iconStyle, sheetEl.sheet.cssRules.length); - }); - } - wrapSRCInSVG(src) { - return ""; - } - /** Getter & Setter **/ - getFullDictionary() { - const fullDictionary = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - fullDictionary.appendDict(this.allIconDictionary); - fullDictionary.appendDict(this.getAppendedIconDictionary()); - return fullDictionary; - } - getAppendedIconDictionary() { - const appendedDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - src_app_Domain_Domain_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons.keysArray().forEach(key => { - if (!this.allIconDictionary.has(key)) { - appendedDict.set(key, src_app_Domain_Domain_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons.get(key)); - } - }); - return appendedDict; - } - getTypeDictionary(type) { - if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { - return this.actorIconDictionary; - } else if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { - return this.workObjectDictionary; - } - return new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); - } - getTypeDictionaryKeys(type) { - return this.getTypeDictionary(type).keysArray(); - } - getTypeIconSRC(type, name) { - if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { - return this.actorIconDictionary.get(name); - } else if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { - return this.workObjectDictionary.get(name); - } - return null; - } - getIconForBPMN(elementType, name) { - return this.iconDictionaryForBPMN.get(`${elementType}${name}`); - } - getIconSource(name) { - if (this.allIconDictionary.has(name)) { - return this.allIconDictionary.get(name); - } else if (src_app_Domain_Domain_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons.has(name)) { - return src_app_Domain_Domain_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons.get(name); - } - return null; - } - getElementsOfType(elements, type) { - const elementOfType = []; - elements.forEach(element => { - if (element.type.includes(type)) { - elementOfType.push(element); - } - }); - return elementOfType; - } - getAllIconDictionary() { - return this.allIconDictionary; - } - getActorsDictionary() { - return this.actorIconDictionary; - } - getWorkObjectsDictionary() { - return this.workObjectDictionary; - } - getIconConfiguration() { - return this.iconConfig; - } - setCustomConfiguration(customConfiguration) { - this.customConfiguration = customConfiguration; - } - static #_ = this.ɵfac = function IconDictionaryService_Factory(t) { - return new (t || IconDictionaryService)(); + static #_ = this.ɵfac = function HtmlPresentationService_Factory(t) { + return new (t || HtmlPresentationService)(_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵinject"](_Replay_replay_service__WEBPACK_IMPORTED_MODULE_3__.ReplayService), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵinject"](_Title_title_service__WEBPACK_IMPORTED_MODULE_4__.TitleService)); }; - static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdefineInjectable"]({ - token: IconDictionaryService, - factory: IconDictionaryService.ɵfac, + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdefineInjectable"]({ + token: HtmlPresentationService, + factory: HtmlPresentationService.ɵfac, providedIn: 'root' }); } /***/ }), -/***/ 67613: -/*!*********************************************************************!*\ - !*** ./src/app/Service/ElementRegistry/element-registry.service.ts ***! - \*********************************************************************/ +/***/ 11503: +/*!***********************************************!*\ + !*** ./src/app/Service/Export/png.service.ts ***! + \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ ElementRegistryService: () => (/* binding */ ElementRegistryService) +/* harmony export */ PngService: () => (/* binding */ PngService) /* harmony export */ }); -/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var src_app_Service_Export_exportUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Service/Export/exportUtil */ 70908); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); -class ElementRegistryService { +class PngService { constructor() { - this.fullyInitialized = false; + this.width = 0; + this.height = 0; } - /** - * Initially the registry has only the root-Element. - * Once the canvas has bees initialized, we adjust the reference to point to the elements on the canvas for convenience - */ - correctInitialize() { - if (!this.fullyInitialized) { - if (this.registry.__implicitroot) { - this.registry = this.registry.__implicitroot.element.children; - this.fullyInitialized = true; + browserSpecs() { + const ua = navigator.userAgent; + let tem; + let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []; + if (/trident/i.test(M[1])) { + tem = /\brv[ :]+(\d+)/g.exec(ua) || []; + return { + name: 'IE', + version: tem[1] || '' + }; + } + if (M[1] === 'Chrome') { + tem = ua.match(/\b(OPR|Edge)\/(\d+)/); + if (tem != null) { + return { + name: tem[1].replace('OPR', 'Opera'), + version: tem[2] + }; } } - } - setElementRegistry(registry) { - this.registry = registry._elements; - } - clear() { - this.registry = null; - this.fullyInitialized = false; - } - createObjectListForDSTDownload() { - if (this.registry) { - const allObjectsFromCanvas = this.getAllCanvasObjects(); - const groups = this.getAllGroups(); - const objectList = []; - this.fillListOfCanvasObjects(allObjectsFromCanvas, objectList, groups); - return objectList; + M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?']; + // tslint:disable-next-line:no-conditional-assignment + if ((tem = ua.match(/version\/(\d+)/i)) != null) { + M.splice(1, 1, tem[1]); } - return []; - } - fillListOfCanvasObjects(allObjectsFromCanvas, objectList, groups) { - allObjectsFromCanvas.forEach(canvasElement => { - if (canvasElement.type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTIVITY) { - objectList.push(canvasElement); - } - // ensure that Activities are always after Actors, Workobjects and Groups in .dst files - else { - if (canvasElement.type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.TEXTANNOTATION) { - canvasElement.businessObject.width = canvasElement.width; - canvasElement.businessObject.height = canvasElement.height; - } - if (!objectList.includes(canvasElement)) { - objectList.unshift(canvasElement); - } - } - }); - groups.forEach(group => { - objectList.push(group); - }); + return { + name: M[0], + version: M[1] + }; } - getAllActivities() { - const activities = []; - this.getAllCanvasObjects().forEach(element => { - if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTIVITY)) { - activities.push(element); + /** Needed for an SVG-Fix in CHrome where the # needs to be replaced by %23 **/ + URIHashtagFix(svg) { + let fix = false; + const browser = this.browserSpecs(); + const name = browser.name; + const version = parseInt(browser.version); + // only implemented in chrome and firefox at the moment + if (name.includes('Chrome')) { + if (version >= 72) { + fix = true; + // https://www.chromestatus.com/features/5656049583390720 } - }); - return activities; - } - getAllConnections() { - const connections = []; - this.getAllCanvasObjects().forEach(element => { - const type = element.type; - if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.CONNECTION) { - connections.push(element); + } else if (name.includes('Firefox')) { + fix = true; + // versionNumber of implementation unknown + } + + if (fix) { + while (svg.includes('#')) { + svg = svg.replace('#', '%23'); } - }); - return connections; - } - getAllCanvasObjects() { - const allObjects = []; - const groupObjects = []; - this.checkChildForGroup(groupObjects, allObjects); - // for each memorized group, remove it from the group-array and check its children, whether they are groups or not - // if a child is a group, memorize it in the group-array - // other children should already be in the allObjects list - let i = groupObjects.length - 1; - while (groupObjects.length >= 1) { - const currentGroup = groupObjects.pop(); - // @ts-ignore - currentGroup.children.forEach(child => { - const type = child.type; - if (type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.GROUP)) { - groupObjects.push(child); - } - }); - i = groupObjects.length - 1; } - return allObjects; + return svg; } - // returns all groups on the canvas and inside other groups - getAllGroups() { - const groupObjects = []; - const allObjects = []; - this.checkChildForGroup(groupObjects, allObjects); - for (const group of groupObjects) { - group.children?.forEach(child => { - if (child.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.GROUP)) { - groupObjects.push(child); + findMostOuterElements(svg) { + let xLeft = 0; + let xRight = 0; + let yUp = 0; + let yDown = 0; + const elements = svg.getElementsByClassName('djs-group'); + // tslint:disable-next-line:prefer-for-of + for (let i = 0; i < elements.length; i++) { + const element = elements[i]; + const sub = element.children; + let elXLeft; + let elXRight; + let elYUp; + let elYDown; + const transform = sub[0].getAttribute('transform'); + if (transform) { + let nums; + if (transform.includes('matrix')) { + transform.replace('matrix(', ''); + transform.replace(')', ''); + nums = transform.split(' '); + elXLeft = parseInt(nums[4]); + elYUp = parseInt(nums[5]); + } else { + transform.replace('translate(', ''); + transform.replace(')', ''); + nums = transform.split(' '); + elXLeft = parseInt(nums[0]); + elYUp = parseInt(nums[1]); } - }); + const rects = sub[0].getElementsByTagName('rect'); + const outerRect = rects[rects.length - 1]; + const width = outerRect.getAttribute('width'); + elXRight = elXLeft + parseInt(width != null ? width : '0'); + elYDown = elYUp + sub[0].getBoundingClientRect().height; + } else { + const rects = element.getElementsByTagName('rect'); + const outerRect = rects[rects.length - 1]; + const x = outerRect.getAttribute('x'); + const y = outerRect.getAttribute('y'); + elXLeft = parseInt(x != null ? x : '0'); + elYUp = parseInt(y != null ? y : '0'); + const width = outerRect.getAttribute('width'); + const height = outerRect.getAttribute('height'); + elXRight = elXLeft + parseInt(width != null ? width : '0'); + elYDown = elYUp + parseInt(height != null ? height : '0') + 20; // Add 20 px as Padding for text at the bottom + } + + if (elXLeft < xLeft) { + xLeft = elXLeft; + } + if (elXRight > xRight) { + xRight = elXRight; + } + if (elYUp < yUp) { + yUp = elYUp; + } + if (elYDown > yDown) { + yDown = elYDown; + } } - return groupObjects; + yUp -= 75; // we need to adjust yUp to have space for the title and description + return { + xLeft, + xRight, + yUp, + yDown + }; } - checkChildForGroup(groupObjects, allObjects) { - const registryElementNames = Object.keys(this.registry); - for (let name of registryElementNames) { - const entry = this.registry[name].element; - if (entry.businessObject) { - const type = entry.type; - if (type && type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.GROUP)) { - // if it is a group, memorize this for later - groupObjects.push(entry); - } else if (type) { - allObjects.push(entry); - } - } + prepareSVG(svg, layerBase, description, title, withTitle) { + const box = this.findMostOuterElements(layerBase); + let viewBoxIndex = svg.indexOf('width="'); + this.calculateWidthAndHeight(box); + const { + insertText, + extraHeight + } = (0,src_app_Service_Export_exportUtil__WEBPACK_IMPORTED_MODULE_0__.createTitleAndDescriptionSVGElement)(title, description, box.xLeft + 10, box.yUp + 20, this.width); + if (withTitle) { + this.height += extraHeight; + } + const bounds = this.createBounds(box, extraHeight); + const dataStart = svg.substring(0, viewBoxIndex); + viewBoxIndex = svg.indexOf('style="'); + const dataEnd = svg.substring(viewBoxIndex); + dataEnd.substring(viewBoxIndex); + svg = dataStart + bounds + dataEnd; + const insertIndex = svg.indexOf('') + 20; + if (withTitle) { + svg = [svg.slice(0, insertIndex), insertText, svg.slice(insertIndex)].join(''); } + svg = this.URIHashtagFix(svg); + return svg; } - // get a list of activities, that originate from an actor-type - getActivitiesFromActors() { - const activitiesFromActors = []; - const activities = this.getAllActivities(); - activities.forEach(activity => { - if (activity.source?.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR)) { - activitiesFromActors.push(activity); + createBounds(box, extraHeight) { + return 'width="' + this.width + '" height="' + this.height + '" viewBox=" ' + box.xLeft + ' ' + (box.yUp - extraHeight) + ' ' + this.width + ' ' + this.height + '" '; + } + /** + * Calculate the Width and Height of the Bounding Box for the PNG so no Parts are cut off + */ + calculateWidthAndHeight(box) { + if (box.xLeft < 0) { + if (box.xRight < 0) { + this.width = Math.abs(box.xLeft - box.xRight); + } else { + this.width = Math.abs(box.xLeft) + box.xRight; } - }); - return activitiesFromActors; + } else { + this.width = box.xRight - box.xLeft; + } + if (box.yUp < 0) { + if (box.yDown < 0) { + this.height = Math.abs(box.yUp - box.yDown); + } else { + this.height = Math.abs(box.yUp) + box.yDown; + } + } else { + this.height = box.yDown - box.yUp; + } + // if the domain-Story is smaller than 300px in width or height, increase its dimensions + if (this.height < 300) { + this.height += 300; + box.yUp -= 150; + box.yDown += 150; + } + if (this.width < 300) { + this.width += 300; + box.xLeft -= 150; + box.xRight += 150; + } + return [this.height, this.width]; } - getUsedIcons() { - const actors = this.getAllActors(); - const workobjects = this.getAllWorkobjects(); - return { - actors: actors.map(a => a.type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR, '')), - workobjects: workobjects.map(w => w.type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT, '')) - }; + extractSVG(viewport, outerSVGElement) { + const layerResizers = viewport.getElementsByClassName('layer-resizers'); + const layerOverlays = viewport.getElementsByClassName('layer-overlays'); + const transform = viewport.getAttribute('transform'); + const translate = viewport.getAttribute('translate'); + if (layerResizers[0]) { + layerResizers[0].parentNode.removeChild(layerResizers[0]); + } + if (layerOverlays[0]) { + layerOverlays[0].parentNode.removeChild(layerOverlays[0]); + } + // remove canvas scrolling and scaling before serializeToString of SVG + if (transform) { + viewport.removeAttribute('transform'); + } + if (translate) { + viewport.removeAttribute('translate'); + } + const svg = new XMLSerializer().serializeToString(outerSVGElement); + // re-add canvas scrolling and scaling + if (transform) { + viewport.setAttribute('transform', transform); + } + if (translate) { + viewport.setAttribute('translate', translate); + } + return svg; } - getAllActors() { - return this.getAllCanvasObjects().filter(co => co.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR)); + getWidth() { + return this.width; } - getAllWorkobjects() { - return this.getAllCanvasObjects().filter(co => co.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT)); + getHeight() { + return this.height; } - static #_ = this.ɵfac = function ElementRegistryService_Factory(t) { - return new (t || ElementRegistryService)(); + static #_ = this.ɵfac = function PngService_Factory(t) { + return new (t || PngService)(); }; static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ - token: ElementRegistryService, - factory: ElementRegistryService.ɵfac, + token: PngService, + factory: PngService.ɵfac, providedIn: 'root' }); } /***/ }), -/***/ 98106: -/*!**************************************************!*\ - !*** ./src/app/Service/Export/export.service.ts ***! - \**************************************************/ +/***/ 29298: +/*!***********************************************!*\ + !*** ./src/app/Service/Export/svg.service.ts ***! + \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ ExportService: () => (/* binding */ ExportService) +/* harmony export */ SvgService: () => (/* binding */ SvgService) /* harmony export */ }); -/* harmony import */ var src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Utils/sanitizer */ 66107); -/* harmony import */ var src_app_Domain_Export_configAndDst__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Export/configAndDst */ 74306); -/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/common */ 39191); -/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../environments/environment */ 45312); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/core */ 96623); -/* harmony import */ var src_app_Service_DomainConfiguration_domain_configuration_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/Service/DomainConfiguration/domain-configuration.service */ 68449); -/* harmony import */ var src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/Service/Title/title.service */ 69672); -/* harmony import */ var src_app_Service_DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/Service/DirtyFlag/dirty-flag.service */ 89791); -/* harmony import */ var src_app_Service_Export_png_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/Service/Export/png.service */ 11503); -/* harmony import */ var src_app_Service_Export_svg_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/Service/Export/svg.service */ 29298); -/* harmony import */ var _html_presentation_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./html-presentation.service */ 72680); -/* harmony import */ var _Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Renderer/renderer.service */ 94896); - - - - - - - - - +/* harmony import */ var src_app_Service_Export_exportUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Service/Export/exportUtil */ 70908); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Modeler/modeler.service */ 74676); -class ExportService { - constructor(configurationService, titleService, dirtyFlagService, pngService, svgService, htmlPresentationService, rendererService) { - this.configurationService = configurationService; - this.titleService = titleService; - this.dirtyFlagService = dirtyFlagService; - this.pngService = pngService; - this.svgService = svgService; - this.htmlPresentationService = htmlPresentationService; - this.rendererService = rendererService; - this.title = ''; - this.description = ''; - this.titleSubscription = this.titleService.title$.subscribe(title => { - this.title = title; - }); - this.descriptionSubscription = this.titleService.description$.subscribe(description => { - this.description = description; - }); - } - ngOnDestroy() { - this.titleSubscription.unsubscribe(); - this.descriptionSubscription.unsubscribe(); - } - isDomainStoryExportable() { - return this.rendererService.getStory().length >= 1; - } - createConfigAndDST(DomainStory) { - return new src_app_Domain_Export_configAndDst__WEBPACK_IMPORTED_MODULE_1__.ConfigAndDST(this.configurationService.getCurrentConfigurationForExport(), DomainStory); +class SvgService { + constructor(modelerService) { + this.modelerService = modelerService; + this.cacheData = ''; } - downloadDST() { - const dst = this.getStoryForDownload(); - const configAndDST = this.createConfigAndDST(dst); - const json = JSON.stringify(configAndDST, null, 2); - const filename = (0,src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_0__.sanitizeForDesktop)(this.title + '_' + this.getCurrentDateString()); - this.downloadFile(json, 'data:text/plain;charset=utf-8,', filename, '.egn', true); + createSVGData(title, description, dst, withTitle, useWhiteBackground) { + this.cacheData = this.modelerService.getEncoded(); + let data = structuredClone(this.cacheData); + let viewBoxIndex = data.indexOf('width="'); + let { + width, + height, + viewBox + } = this.viewBoxCoordinates(data); + let xLeft; + let xRight; + let yUp; + let yDown; + const splitViewBox = viewBox.split(/\s/); + xLeft = +splitViewBox[0]; + yUp = +splitViewBox[1]; + xRight = +splitViewBox[2]; + yDown = +splitViewBox[3]; + if (xRight < 300) { + xRight += 300; + width += 300; + } + const { + insertText + } = (0,src_app_Service_Export_exportUtil__WEBPACK_IMPORTED_MODULE_0__.createTitleAndDescriptionSVGElement)(title, description, xLeft, yUp, width); + const bounds = this.createBounds(width, height, xLeft, yUp, xRight, yDown, withTitle); + const dataStart = data.substring(0, viewBoxIndex); + viewBoxIndex = data.indexOf('" version'); + const dataEnd = data.substring(viewBoxIndex); + dataEnd.substring(viewBoxIndex); + data = dataStart + bounds + dataEnd; + const insertIndex = this.findIndexToInsertData(data); + if (withTitle) { + data = data.slice(0, insertIndex) + insertText + data.slice(insertIndex); + } + if (useWhiteBackground) { + const svgIndex = data.indexOf('width="'); + const backgroundColorWhite = 'style="background-color:white" '; + data = data.slice(0, svgIndex) + backgroundColorWhite + data.slice(svgIndex); + } + return this.appendDST(data, dst); } - downloadFile(data, datatype, filename, fileEnding, makeClean) { - const element = document.createElement('a'); - element.setAttribute('href', datatype + encodeURIComponent(data)); - element.setAttribute('download', filename + fileEnding); - element.style.display = 'none'; - document.body.appendChild(element); - element.click(); - if (makeClean) { - this.dirtyFlagService.makeClean(); + findIndexToInsertData(data) { + let insertIndex = data.indexOf(''); + if (insertIndex < 0) { + insertIndex = data.indexOf('version="1.2">') + 14; + } else { + insertIndex += 7; } - document.body.removeChild(element); + return insertIndex; } - downloadSVG(withTitle, useWhiteBackground) { - const story = this.getStoryForDownload(); - const dst = this.createConfigAndDST(story); - const svgData = this.svgService.createSVGData(this.title, this.description, dst, withTitle, useWhiteBackground); - this.downloadFile(svgData, 'data:application/bpmn20-xml;charset=UTF-8,', (0,src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_0__.sanitizeForDesktop)(this.title + '_' + this.getCurrentDateString()), '.egn.svg', true); + createBounds(width, height, xLeft, yUp, xRight, yDown, withTitle) { + return 'width="' + width + '" height=" ' + height + '" viewBox="' + xLeft + ' ' + (withTitle ? yUp - 80 : yUp) + ' ' + xRight + ' ' + (yDown + 30); } - downloadPNG(withTitle) { - const canvas = document.getElementById('canvas'); - if (canvas) { - const container = canvas.getElementsByClassName('djs-container'); - const svgElements = container[0].getElementsByTagName('svg'); - const outerSVGElement = svgElements[0]; - const viewport = outerSVGElement.getElementsByClassName('viewport')[0]; - const layerBase = viewport.getElementsByClassName('layer-base')[0]; - const image = document.createElement('img'); - // removes unwanted black dots in image - let svg = this.pngService.extractSVG(viewport, outerSVGElement); - svg = this.pngService.prepareSVG(svg, layerBase, this.description, this.title, withTitle); - image.onload = () => { - const tempCanvas = document.createElement('canvas'); - // add a 10px buffer to the right and lower boundary - tempCanvas.width = this.pngService.getWidth() + 10; - tempCanvas.height = this.pngService.getHeight() + 10; - const ctx = tempCanvas.getContext('2d'); - if (ctx) { - // fill with white background - ctx.rect(0, 0, tempCanvas.width, tempCanvas.height); - ctx.fillStyle = 'white'; - ctx.fill(); - ctx.drawImage(image, 0, 0); - } - const png64 = tempCanvas.toDataURL('image/png'); - const ele = document.createElement('a'); - ele.setAttribute('download', (0,src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_0__.sanitizeForDesktop)(this.title) + '_' + this.getCurrentDateString() + '.png'); - ele.setAttribute('href', png64); - document.body.appendChild(ele); - ele.click(); - document.body.removeChild(ele); - // image source has to be removed to circumvent browser caching - image.src = ''; + viewBoxCoordinates(svg) { + const ViewBoxCoordinate = /width="([^"]+)"\s+height="([^"]+)"\s+viewBox="([^"]+)"/; + const match = svg.match(ViewBoxCoordinate); + if (match) { + return { + width: +match[1], + height: +match[2], + viewBox: match[3] }; - image.onchange = image.onload; - image.width = this.pngService.getWidth(); - image.height = this.pngService.getHeight(); - image.src = 'data:image/svg+xml,' + svg; } + return { + width: 0, + height: 0, + viewBox: '' + }; } - downloadHTMLPresentation() { - const filename = (0,src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_0__.sanitizeForDesktop)(this.title + '_' + this.getCurrentDateString()); - this.htmlPresentationService.downloadHTMLPresentation(filename).then(); - } - getStoryForDownload() { - const story = this.rendererService.getStory(); - story.push({ - info: this.titleService.getDescription() - }); - story.push({ - version: _environments_environment__WEBPACK_IMPORTED_MODULE_2__.environment.version - }); - return story; - } - getCurrentDateString() { - return (0,_angular_common__WEBPACK_IMPORTED_MODULE_10__.formatDate)(new Date(), 'YYYY-MM-dd', 'en-GB'); + appendDST(data, dst) { + data += '\n'; + return data; } - static #_ = this.ɵfac = function ExportService_Factory(t) { - return new (t || ExportService)(_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_DomainConfiguration_domain_configuration_service__WEBPACK_IMPORTED_MODULE_3__.DomainConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_4__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_5__.DirtyFlagService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_Export_png_service__WEBPACK_IMPORTED_MODULE_6__.PngService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_Export_svg_service__WEBPACK_IMPORTED_MODULE_7__.SvgService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_html_presentation_service__WEBPACK_IMPORTED_MODULE_8__.HtmlPresentationService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_9__.RendererService)); + static #_ = this.ɵfac = function SvgService_Factory(t) { + return new (t || SvgService)(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵinject"](_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_1__.ModelerService)); }; - static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵdefineInjectable"]({ - token: ExportService, - factory: ExportService.ɵfac, + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineInjectable"]({ + token: SvgService, + factory: SvgService.ɵfac, providedIn: 'root' }); } /***/ }), -/***/ 72680: -/*!*************************************************************!*\ - !*** ./src/app/Service/Export/html-presentation.service.ts ***! - \*************************************************************/ +/***/ 93689: +/*!*************************************************************************!*\ + !*** ./src/app/Service/IconSetConfiguration/icon-dictionary.service.ts ***! + \*************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ HtmlPresentationService: () => (/* binding */ HtmlPresentationService) +/* harmony export */ ICON_PREFIX: () => (/* binding */ ICON_PREFIX), +/* harmony export */ IconDictionaryService: () => (/* binding */ IconDictionaryService) /* harmony export */ }); -/* harmony import */ var _home_runner_work_egon_io_egon_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 56207); -/* harmony import */ var _Utils_sanitizer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/sanitizer */ 66107); -/* harmony import */ var dot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dot */ 13280); -/* harmony import */ var dot__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(dot__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ 96623); -/* harmony import */ var _Replay_replay_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Replay/replay.service */ 94788); -/* harmony import */ var _Title_title_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Title/title.service */ 69672); +/* harmony import */ var src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/dictionary/dictionary */ 54972); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var src_app_Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Domain/Common/iconConfiguration */ 34752); +/* harmony import */ var src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/Domain/Icon-Set-Configuration/allIcons */ 57488); +/* harmony import */ var _Utils_naming__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Utils/naming */ 28714); +/* harmony import */ var _Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Utils/sanitizer */ 66107); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/core */ 96623); -// @ts-ignore -/** - * Initial idea and PR from https://github.com/indika-dev - */ -class HtmlPresentationService { - constructor(replayService, titleService) { - this.replayService = replayService; - this.titleService = titleService; + +const ICON_PREFIX = 'icon-domain-story-'; +class IconDictionaryService { + constructor() { + this.actorIconDictionary = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + this.workObjectDictionary = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + this.allIconDictionary = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + this.iconDictionaryForBPMN = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + this.allIconDictionary.addEach(src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.allIcons); + this.iconConfig = new src_app_Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__.IconConfiguration(this.allIconDictionary); } - setModelerClasses(canvas, selection, modeler) { - this.modeler = modeler; + initTypeDictionaries(actors, workObjects) { + if (!actors || actors.length == 0) { + actors = src_app_Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__.defaultConf.actors; + } + if (!workObjects || workObjects.length == 0) { + workObjects = src_app_Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__.defaultConf.workObjects; + } + const allTypes = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + allTypes.addEach(src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.allIcons); + allTypes.appendDict(this.getAppendedIconDictionary()); + this.initDictionary(actors, allTypes, this.actorIconDictionary, src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR); + this.initDictionary(workObjects, allTypes, this.workObjectDictionary, src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT); } - static viewBoxCoordinates(svg) { - const ViewBoxCoordinate = /width="([^"]+)"\s+height="([^"]+)"\s+viewBox="([^"]+)"/; - const match = svg.match(ViewBoxCoordinate); - return match[3]; + initDictionary(keys, allTypes, dictionary, elementType) { + dictionary.clear(); + for (const key of keys) { + dictionary.add(allTypes.get(key), key); + } + dictionary.keysArray().forEach(name => { + this.registerIconForBPMN(name, ICON_PREFIX + (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.sanitizeIconName)(name.toLowerCase()), elementType); + }); } - /* - --------------------------- - SVG handling starts here - ---------------------------- - */ - downloadHTMLPresentation(filename) { - var _this = this; - return (0,_home_runner_work_egon_io_egon_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { - const svgData = []; - // export all sentences of domain story - _this.replayService.startReplay(); - try { - const result = yield _this.modeler.saveSVG({}); - _this.fixActivityMarkersForEachSentence(result, _this.replayService.getCurrentSentenceNumber()); - svgData.push({ - content: HtmlPresentationService.createSVGData(result.svg), - transition: 'slide' - }); - } catch (err) { - alert('There was an error exporting the SVG.\n' + err); - } - while (_this.replayService.getCurrentSentenceNumber() < _this.replayService.getMaxSentenceNumber()) { - _this.replayService.nextSentence(); - try { - const result = yield _this.modeler.saveSVG({}); - _this.fixActivityMarkersForEachSentence(result, _this.replayService.getCurrentSentenceNumber()); - svgData.push({ - content: HtmlPresentationService.createSVGData(result.svg), - transition: 'slide' - }); - } catch (err) { - alert('There was an error exporting the SVG.\n' + err); + getCurrentIconConfigurationForBPMN() { + if (this.customConfiguration) { + return this.iconConfig.createCustomConf(this.customConfiguration); + } + return this.iconConfig.getDefaultConf(); + } + allInTypeDictionary(type, elements) { + let collection; + if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { + collection = this.actorIconDictionary; + } else if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { + collection = this.workObjectDictionary; + } + let allIn = true; + if (elements) { + elements.forEach(element => { + if (!collection.has((0,_Utils_naming__WEBPACK_IMPORTED_MODULE_4__.getNameFromType)(element.type))) { + allIn = false; + } + }); + } else { + return false; + } + return allIn; + } + /** Load Icons from Configuration **/ + addIconsFromIconSetConfiguration(dictionaryType, iconTypes) { + let collection; + if (dictionaryType === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { + collection = this.actorIconDictionary; + } else if (dictionaryType === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { + collection = this.workObjectDictionary; + } + const allTypes = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + allTypes.addEach(src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.allIcons); + allTypes.appendDict(src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons); + iconTypes.forEach(name => { + if (!collection.has(name)) { + const src = allTypes.get(name); + if (src) { + this.registerIconForType(dictionaryType, name, src); + this.registerIconForBPMN(name, (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.sanitizeIconName)(ICON_PREFIX + name.toLowerCase()), dictionaryType); } } - _this.replayService.stopReplay(); - // create download for presentation - const revealjsTemplate = document.getElementById('revealjs-template'); - const dots = dot__WEBPACK_IMPORTED_MODULE_2___default().template(revealjsTemplate?.innerHTML); - const revealjsData = { - script: 'script', - title: _this.titleService.getTitle(), - description: _this.titleService.getDescription(), - sentences: svgData, - multiplexSecret: _this.multiplexSecret, - multiplexId: _this.multiplexId - }; - const element = document.createElement('a'); - element.setAttribute('href', 'data:text/html;charset=UTF-8,' + _this.fixMalformedHtmlScript(dots, revealjsData)); - element.setAttribute('download', (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_1__.sanitizeForDesktop)(filename) + '.html'); - element.style.display = 'none'; - document.body.appendChild(element); - element.click(); - document.body.removeChild(element); - })(); + }); } - fixMalformedHtmlScript(dots, revealjsData) { - return dots(revealjsData).replace(' (0,_Utils_naming__WEBPACK_IMPORTED_MODULE_4__.getNameFromType)(element.type))); + } + if (!this.allInTypeDictionary(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, workObjectIcons)) { + this.addIconsFromIconSetConfiguration(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, workObjectIcons.map(element => (0,_Utils_naming__WEBPACK_IMPORTED_MODULE_4__.getNameFromType)(element.type))); } - const dataStart = data.substring(0, viewBoxIndex); - viewBoxIndex = data.indexOf('" version'); - const dataEnd = data.substring(viewBoxIndex); - dataEnd.substring(viewBoxIndex); - data = dataStart + this.createBounds(xLeft, yUp, width, height) + dataEnd; - return encodeURIComponent(data); } - static createBounds(xLeft, yUp, width, height) { - return 'width="100%"' + ' height="100%" ' + ' preserveAspectRatio="xMidYMid meet"' + ' viewBox="' + xLeft + ' ' + yUp + ' ' + (xLeft + width) + ' ' + (yUp + height); + registerIconForType(type, name, src) { + if (name.includes(type)) { + throw new Error('Name should not include type!'); + } + let collection = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { + collection = this.actorIconDictionary; + } else if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { + collection = this.workObjectDictionary; + } + collection.add(src, name); } - /** - * There is a Problem in the HTML-Presentation, where the Arrow-Heads of the Activities are not shown after the 4th sentence - * This is due to the fact, that the marker for the Arrow-Head is defined in each sentence with the same ID - * When the 5th sentence is reached, the first marker is set to display none, which propagates to all other markers - * - * To fix this, for each sentence the marker and its references are renamed - */ - fixActivityMarkersForEachSentence(result, sectionIndex) { - const defs = result.svg.substring(result.svg.indexOf(''), result.svg.indexOf('') + 7); - const split = defs.split(' { - const idToReplace = id.substring(4, id.length - 1); - const newId = idToReplace.slice(0, id.length - 5) + 'customId' + sectionIndex + idToReplace.slice(idToReplace.length - 2); - // @ts-ignore - result.svg = result.svg.replaceAll(idToReplace, newId); + unregisterIconForType(type, name) { + if (name.includes(type)) { + throw new Error('Name should not include type!'); + } + let collection = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { + collection = this.actorIconDictionary; + } else if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { + collection = this.workObjectDictionary; + } + collection.delete(name); + } + updateIconRegistries(actors, workObjects, config) { + const elements = []; + actors.forEach(a => elements.push(a)); + workObjects.forEach(w => elements.push(w)); + const customIcons = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + const actorsDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + const workObjectsDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + config.actors.keysArray().forEach(key => { + actorsDict.set(key, config.actors.get(key)); + }); + config.workObjects.keysArray().forEach(key => { + workObjectsDict.set(key, config.workObjects.get(key)); + }); + this.extractCustomIconsFromDictionary(actorsDict, customIcons); + this.extractCustomIconsFromDictionary(workObjectsDict, customIcons); + elements.forEach(element => { + const name = (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.sanitizeIconName)(element.type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, '').replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, '')); + if ((element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) || element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT)) && !this.getFullDictionary().has(name)) { + let elementType; + if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR)) { + elementType = src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR; + } else { + elementType = src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT; + } + this.registerIconForBPMN(ICON_PREFIX + name.toLowerCase(), (0,_Utils_naming__WEBPACK_IMPORTED_MODULE_4__.getNameFromType)(element.type), elementType); + } + }); + this.addNewIconsToDictionary(customIcons); + this.addIconsToTypeDictionary(actors, workObjects); + } + extractCustomIconsFromDictionary(elementDictionary, customIcons) { + elementDictionary.keysArray().forEach(name => { + const sanitizedName = (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.sanitizeIconName)(name); + if (!this.getFullDictionary().has(sanitizedName)) { + customIcons.add(elementDictionary.get(name), sanitizedName); + } + }); + } + /** Add new Icon(s) **/ + addNewIconsToDictionary(customIcons) { + customIcons.keysArray().forEach(key => { + const custom = customIcons.get(key); + this.addIMGToIconDictionary(custom.src, key); + }); + this.addIconsToCss(customIcons); + } + addIMGToIconDictionary(input, name) { + src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons.set(name, input); + } + addIconsToCss(customIcons) { + const sheetEl = document.getElementById('iconsCss'); + customIcons.keysArray().forEach(key => { + const src = customIcons.get(key); + const iconStyle = '.' + ICON_PREFIX + (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.sanitizeIconName)(key.toLowerCase()) + '::before{ content: url("data:image/svg+xml;utf8,' + this.wrapSRCInSVG(src) + '"); margin: 3px;}'; + // @ts-ignore + sheetEl?.sheet?.insertRule(iconStyle, sheetEl.sheet.cssRules.length); + }); + } + wrapSRCInSVG(src) { + return ""; + } + /** Getter & Setter **/ + getFullDictionary() { + const fullDictionary = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + fullDictionary.appendDict(this.allIconDictionary); + fullDictionary.appendDict(this.getAppendedIconDictionary()); + return fullDictionary; + } + getAppendedIconDictionary() { + const appendedDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons.keysArray().forEach(key => { + if (!this.allIconDictionary.has(key)) { + appendedDict.set(key, src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons.get(key)); + } + }); + return appendedDict; + } + getTypeDictionary(type) { + if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { + return this.actorIconDictionary; + } else if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { + return this.workObjectDictionary; + } + return new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + } + getTypeDictionaryKeys(type) { + return this.getTypeDictionary(type).keysArray(); + } + getTypeIconSRC(type, name) { + if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { + return this.actorIconDictionary.get(name); + } else if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { + return this.workObjectDictionary.get(name); + } + return null; + } + getIconForBPMN(elementType, name) { + return this.iconDictionaryForBPMN.get(`${elementType}${name}`); + } + getIconSource(name) { + if (this.allIconDictionary.has(name)) { + return this.allIconDictionary.get(name); + } else if (src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons.has(name)) { + return src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons.get(name); + } + return null; + } + getElementsOfType(elements, type) { + const elementOfType = []; + elements.forEach(element => { + if (element.type.includes(type)) { + elementOfType.push(element); + } + }); + return elementOfType; + } + getAllIconDictionary() { + return this.allIconDictionary; + } + getActorsDictionary() { + return this.actorIconDictionary; + } + getWorkObjectsDictionary() { + return this.workObjectDictionary; + } + getIconConfiguration() { + return this.iconConfig; + } + setCustomConfiguration(customConfiguration) { + this.customConfiguration = customConfiguration; + } + static #_ = this.ɵfac = function IconDictionaryService_Factory(t) { + return new (t || IconDictionaryService)(); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdefineInjectable"]({ + token: IconDictionaryService, + factory: IconDictionaryService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 10200: +/*!********************************************************************************!*\ + !*** ./src/app/Service/IconSetConfiguration/icon-set-configuration.service.ts ***! + \********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ IconSetConfigurationService: () => (/* binding */ IconSetConfigurationService) +/* harmony export */ }); +/* harmony import */ var src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/dictionary/dictionary */ 54972); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var _Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Domain/Common/iconConfiguration */ 34752); +/* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var src_app_Service_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/Service/IconSetConfiguration/icon-dictionary.service */ 93689); +/* harmony import */ var src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/Service/ElementRegistry/element-registry.service */ 67613); +/* harmony import */ var _Title_title_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Title/title.service */ 69672); + + + + + + + + +class IconSetConfigurationService { + constructor(iconDictionaryService, elementRegistryService, titleService) { + this.iconDictionaryService = iconDictionaryService; + this.elementRegistryService = elementRegistryService; + this.titleService = titleService; + } + setIconSetName(iconSetName) { + this.titleService.setIconSetName(iconSetName ? iconSetName : _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_3__.INITIAL_ICON_SET_NAME); + } + exportConfiguration() { + const iconSetConfiguration = this.getCurrentConfigurationForExport(); + if (!iconSetConfiguration) { + return; + } + const configJSONString = JSON.stringify(iconSetConfiguration, null, 2); + const filename = this.titleService.getIconSetName(); + const element = document.createElement('a'); + element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(configJSONString)); + element.setAttribute('download', filename + '.iconset'); + element.style.display = 'none'; + document.body.appendChild(element); + element.click(); + document.body.removeChild(element); + } + loadConfiguration(customConfig, updateIconSetName = true) { + let actorDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + let workObjectDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + if (customConfig.actors.keysArray()) { + actorDict = customConfig.actors; + workObjectDict = customConfig.workObjects; + } else { + actorDict.addEach(customConfig.actors); + workObjectDict.addEach(customConfig.workObjects); + } + const actorKeys = actorDict.keysArray(); + const workObjectKeys = workObjectDict.keysArray(); + this.iconDictionaryService.updateIconRegistries([], [], customConfig); + this.iconDictionaryService.getIconConfiguration().appendSRCFile(actorKeys, actorDict, workObjectKeys, workObjectDict); + this.iconDictionaryService.addIconsFromIconSetConfiguration(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, actorKeys.map(a => src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR + a)); + this.iconDictionaryService.addIconsFromIconSetConfiguration(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, workObjectKeys.map(w => src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT + w)); + if (updateIconSetName) { + const configurationName = customConfig.name; + this.setIconSetName(configurationName); + } + } + getCurrentConfiguration() { + const actors = this.iconDictionaryService.getActorsDictionary(); + const workObjects = this.iconDictionaryService.getWorkObjectsDictionary(); + let iconSetConfiguration; + if (actors.size() > 0 && workObjects.size() > 0) { + iconSetConfiguration = this.createConfigFromDictionaries(actors, workObjects); + } + return iconSetConfiguration; + } + getCurrentConfigurationForExport() { + const currentConfiguration = this.getCurrentConfiguration(); + if (currentConfiguration) { + const actors = {}; + const workObjects = {}; + currentConfiguration.actors.all().forEach(entry => { + actors[entry.key] = entry.value; }); - newDefs += ' { + workObjects[entry.key] = entry.value; + }); + return { + name: currentConfiguration.name, + actors: actors, + workObjects: workObjects + }; + } + return; + } + getCurrentConfigurationNamesWithoutPrefix() { + return { + name: this.titleService.getIconSetName() || _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_3__.INITIAL_ICON_SET_NAME, + actors: this.iconDictionaryService.getActorsDictionary().keysArray().map(a => a.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, '')), + workObjects: this.iconDictionaryService.getWorkObjectsDictionary().keysArray().map(w => w.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, '')) + }; + } + createMinimalConfigurationWithDefaultIcons() { + const minimalConfig = this.createConfigFromCanvas(); + _Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__.defaultConf.actors.forEach(iconName => { + minimalConfig.actors.add(this.iconDictionaryService.getIconSource(iconName), iconName); + }); + _Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__.defaultConf.workObjects.forEach(iconName => { + minimalConfig.workObjects.add(this.iconDictionaryService.getIconSource(iconName), iconName); + }); + return minimalConfig; + } + createConfigFromDictionaries(actorsDict, workObjectsDict) { + const actorNames = actorsDict.keysArray(); + const workobjectNames = workObjectsDict.keysArray(); + const newActors = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + const newWorkobjects = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + // Fill Configuration from Canvas-Objects + actorNames.forEach(actor => { + newActors.add(actorsDict.get(actor), actor.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, '')); + }); + workobjectNames.forEach(workObject => { + newWorkobjects.add(workObjectsDict.get(workObject), workObject.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, '')); + }); + return { + name: this.titleService.getIconSetName(), + actors: newActors, + workObjects: newWorkobjects + }; + } + createConfigFromCanvas() { + const config = { + name: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_3__.INITIAL_ICON_SET_NAME, + actors: new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(), + workObjects: new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary() + }; + let allCanvasObjects = this.elementRegistryService.getAllCanvasObjects(); + allCanvasObjects.map(e => e.businessObject).forEach(element => { + const type = element.type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, '').replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, ''); + if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR)) { + let src = this.iconDictionaryService.getIconSource(type) || ''; + config.actors.add(src, type); + } else if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT)) { + let src = this.iconDictionaryService.getIconSource(type) || ''; + config.workObjects.add(src, type); + } + }); + return config; + } + static #_ = this.ɵfac = function IconSetConfigurationService_Factory(t) { + return new (t || IconSetConfigurationService)(_angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵinject"](src_app_Service_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_4__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵinject"](src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_5__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵinject"](_Title_title_service__WEBPACK_IMPORTED_MODULE_6__.TitleService)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵdefineInjectable"]({ + token: IconSetConfigurationService, + factory: IconSetConfigurationService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 87007: +/*!********************************************************************************!*\ + !*** ./src/app/Service/IconSetConfiguration/icon-set-customization.service.ts ***! + \********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ IconSetCustomizationService: () => (/* binding */ IconSetCustomizationService) +/* harmony export */ }); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs */ 95536); +/* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); +/* harmony import */ var _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Domain/Common/dictionary/dictionary */ 54972); +/* harmony import */ var _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Domain/Common/elementTypes */ 30236); +/* harmony import */ var _Utils_naming__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Utils/naming */ 28714); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./icon-set-configuration.service */ 10200); +/* harmony import */ var _icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./icon-dictionary.service */ 93689); +/* harmony import */ var _Import_import_domain_story_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Import/import-domain-story.service */ 23779); +/* harmony import */ var _Title_title_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Title/title.service */ 69672); +/* harmony import */ var _BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../BrowserStorage/storage.service */ 59298); +/* harmony import */ var src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/Service/ElementRegistry/element-registry.service */ 67613); +/* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); + + + + + + + + + + + + + +class IconSetCustomizationService { + constructor(configurationService, iconDictionaryService, importService, titleService, storageService, elementRegistryService, snackbar) { + this.configurationService = configurationService; + this.iconDictionaryService = iconDictionaryService; + this.importService = importService; + this.titleService = titleService; + this.storageService = storageService; + this.elementRegistryService = elementRegistryService; + this.snackbar = snackbar; + this.allIconListItems = new _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary(); + this.configurationHasChanged = false; + this.selectedActors$ = new rxjs__WEBPACK_IMPORTED_MODULE_10__.BehaviorSubject([]); + this.selectedWorkobjects$ = new rxjs__WEBPACK_IMPORTED_MODULE_10__.BehaviorSubject([]); + this.iconSetConfigurationTypes = new rxjs__WEBPACK_IMPORTED_MODULE_10__.BehaviorSubject(this.configurationService.getCurrentConfigurationNamesWithoutPrefix()); + this.selectedWorkobjects$.next(this.iconSetConfigurationTypes.value.workObjects); + this.selectedActors$.next(this.iconSetConfigurationTypes.value.actors); + iconDictionaryService.getAllIconDictionary().keysArray().forEach(iconName => { + this.addIconToAllIconList(iconName); + }); + importService.importedConfigurationEvent.subscribe(config => { + this.importConfiguration(config); + }); + const storedIconSetConfiguration = this.storageService.getStoredIconSetConfiguration(); + if (storedIconSetConfiguration) { + this.importConfiguration(storedIconSetConfiguration, false); + } + const importedConfiguration = this.importService.getImportedConfiguration(); + if (importedConfiguration) { + this.importConfiguration(importedConfiguration, false); + } + } + importConfiguration(customConfig, saveIconSet = true) { + const actorKeys = customConfig.actors.keysArray(); + const workObjectKeys = customConfig.workObjects.keysArray(); + this.changeName(customConfig.name); + actorKeys.forEach(iconName => { + if (!this.allIconListItems.has(iconName)) { + this.addIconToAllIconList(iconName); + } + const selectedActorNames = this.selectedActors$.value; + if (!selectedActorNames.includes(iconName)) { + this.selectActor(iconName); + } + }); + workObjectKeys.forEach(iconName => { + if (!this.allIconListItems.has(iconName)) { + this.addIconToAllIconList(iconName); + } + const selectedWorkobjectNames = this.selectedWorkobjects$.value; + if (!selectedWorkobjectNames.includes(iconName)) { + this.selectWorkObject(iconName); + } + }); + if (saveIconSet) { + this.saveIconSet(this.elementRegistryService.getUsedIcons(), true); + } + } + /** Getter & Setter **/ + getIconSetConfiguration() { + return this.iconSetConfigurationTypes; + } + getIconForName(iconName) { + return this.allIconListItems.get(iconName); + } + isIconActor(iconName) { + return this.iconSetConfigurationTypes.value.actors.filter(actor => actor === iconName).length > 0; + } + isIconWorkObject(iconName) { + return this.iconSetConfigurationTypes.value.workObjects.filter(workObject => workObject === iconName).length > 0; + } + changeName(iconSetName) { + this.titleService.setIconSetName(iconSetName); + const changedIconSet = this.iconSetConfigurationTypes.value; + changedIconSet.name = iconSetName; + this.iconSetConfigurationTypes.next(changedIconSet); + } + /** Selected Icons **/ + setAsUnassigned(iconName, isActor) { + if (isActor) { + this.deselectActor(iconName); + } else { + this.deselectWorkobject(iconName); } - result.svg = result.svg.replace(defs, newDefs); + this.updateIcon(false, false, iconName); } - static #_ = this.ɵfac = function HtmlPresentationService_Factory(t) { - return new (t || HtmlPresentationService)(_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵinject"](_Replay_replay_service__WEBPACK_IMPORTED_MODULE_3__.ReplayService), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵinject"](_Title_title_service__WEBPACK_IMPORTED_MODULE_4__.TitleService)); - }; - static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdefineInjectable"]({ - token: HtmlPresentationService, - factory: HtmlPresentationService.ɵfac, - providedIn: 'root' - }); -} - -/***/ }), - -/***/ 11503: -/*!***********************************************!*\ - !*** ./src/app/Service/Export/png.service.ts ***! - \***********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ PngService: () => (/* binding */ PngService) -/* harmony export */ }); -/* harmony import */ var src_app_Service_Export_exportUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Service/Export/exportUtil */ 70908); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); - - -class PngService { - constructor() { - this.width = 0; - this.height = 0; + setAsActor(isActor, actor) { + if (isActor) { + this.updateIcon(true, false, actor); + this.selectActor(actor); + this.deselectWorkobject(actor); + } else { + this.deselectActor(actor); + this.updateIcon(false, false, actor); + } } - browserSpecs() { - const ua = navigator.userAgent; - let tem; - let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []; - if (/trident/i.test(M[1])) { - tem = /\brv[ :]+(\d+)/g.exec(ua) || []; - return { - name: 'IE', - version: tem[1] || '' - }; + setAsWorkobject(isWorkobject, workobject) { + if (isWorkobject) { + this.updateIcon(false, true, workobject); + this.selectWorkObject(workobject); + this.deselectActor(workobject); + } else { + this.deselectWorkobject(workobject); + this.updateIcon(false, false, workobject); } - if (M[1] === 'Chrome') { - tem = ua.match(/\b(OPR|Edge)\/(\d+)/); - if (tem != null) { - return { - name: tem[1].replace('OPR', 'Opera'), - version: tem[2] - }; - } + } + selectActor(actor) { + const value = this.iconSetConfigurationTypes.value; + if (!value.actors.includes(actor)) { + value.actors.push(actor); + this.iconSetConfigurationTypes.next(value); + this.updateActorSubject(); } - M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?']; - // tslint:disable-next-line:no-conditional-assignment - if ((tem = ua.match(/version\/(\d+)/i)) != null) { - M.splice(1, 1, tem[1]); + } + selectWorkObject(workObject) { + const value = this.iconSetConfigurationTypes.value; + if (!value.workObjects.includes(workObject)) { + value.workObjects.push(workObject); + this.iconSetConfigurationTypes.next(value); + this.updateWorkObjectSubject(); } - return { - name: M[0], - version: M[1] - }; } - /** Needed for an SVG-Fix in CHrome where the # needs to be replaced by %23 **/ - URIHashtagFix(svg) { - let fix = false; - const browser = this.browserSpecs(); - const name = browser.name; - const version = parseInt(browser.version); - // only implemented in chrome and firefox at the moment - if (name.includes('Chrome')) { - if (version >= 72) { - fix = true; - // https://www.chromestatus.com/features/5656049583390720 - } - } else if (name.includes('Firefox')) { - fix = true; - // versionNumber of implementation unknown + deselectActor(actor) { + if (this.iconSetConfigurationTypes) { + this.iconSetConfigurationTypes.next({ + name: this.iconSetConfigurationTypes.value.name, + actors: this.iconSetConfigurationTypes.value.actors.filter(a => !a.includes(actor)), + workObjects: this.iconSetConfigurationTypes.value.workObjects + }); } - - if (fix) { - while (svg.includes('#')) { - svg = svg.replace('#', '%23'); - } + this.updateActorSubject(); + } + deselectWorkobject(workobject) { + if (this.iconSetConfigurationTypes) { + this.iconSetConfigurationTypes.next({ + name: this.iconSetConfigurationTypes.value.name, + actors: this.iconSetConfigurationTypes.value.actors, + workObjects: this.iconSetConfigurationTypes.value.workObjects.filter(w => !w.includes(workobject)) + }); } - return svg; + this.updateWorkObjectSubject(); } - findMostOuterElements(svg) { - let xLeft = 0; - let xRight = 0; - let yUp = 0; - let yDown = 0; - const elements = svg.getElementsByClassName('djs-group'); - // tslint:disable-next-line:prefer-for-of - for (let i = 0; i < elements.length; i++) { - const element = elements[i]; - const sub = element.children; - let elXLeft; - let elXRight; - let elYUp; - let elYDown; - const transform = sub[0].getAttribute('transform'); - if (transform) { - let nums; - if (transform.includes('matrix')) { - transform.replace('matrix(', ''); - transform.replace(')', ''); - nums = transform.split(' '); - elXLeft = parseInt(nums[4]); - elYUp = parseInt(nums[5]); - } else { - transform.replace('translate(', ''); - transform.replace(')', ''); - nums = transform.split(' '); - elXLeft = parseInt(nums[0]); - elYUp = parseInt(nums[1]); - } - const rects = sub[0].getElementsByTagName('rect'); - const outerRect = rects[rects.length - 1]; - const width = outerRect.getAttribute('width'); - elXRight = elXLeft + parseInt(width != null ? width : '0'); - elYDown = elYUp + sub[0].getBoundingClientRect().height; - } else { - const rects = element.getElementsByTagName('rect'); - const outerRect = rects[rects.length - 1]; - const x = outerRect.getAttribute('x'); - const y = outerRect.getAttribute('y'); - elXLeft = parseInt(x != null ? x : '0'); - elYUp = parseInt(y != null ? y : '0'); - const width = outerRect.getAttribute('width'); - const height = outerRect.getAttribute('height'); - elXRight = elXLeft + parseInt(width != null ? width : '0'); - elYDown = elYUp + parseInt(height != null ? height : '0') + 20; // Add 20 px as Padding for text at the bottom - } - - if (elXLeft < xLeft) { - xLeft = elXLeft; - } - if (elXRight > xRight) { - xRight = elXRight; - } - if (elYUp < yUp) { - yUp = elYUp; + setSelectedWorkObject(sortedList) { + const value = this.iconSetConfigurationTypes.value; + value.workObjects = sortedList; + this.iconSetConfigurationTypes.next(value); + this.updateWorkObjectSubject(); + } + setSelectedActors(sortedList) { + const value = this.iconSetConfigurationTypes.value; + value.actors = sortedList; + this.iconSetConfigurationTypes.next(value); + this.updateActorSubject(); + } + updateActorSubject() { + this.selectedActors$.next(this.iconSetConfigurationTypes.value.actors); + this.configurationHasChanged = true; + } + updateWorkObjectSubject() { + this.selectedWorkobjects$.next(this.iconSetConfigurationTypes.value.workObjects); + this.configurationHasChanged = true; + } + /** Revert Icon Set **/ + resetIconSet() { + const defaultConfig = this.configurationService.createMinimalConfigurationWithDefaultIcons(); + this.selectedWorkobjects$.value.forEach(workObjectName => { + if (!defaultConfig.workObjects.has(workObjectName)) { + this.deselectWorkobject(workObjectName); } - if (elYDown > yDown) { - yDown = elYDown; + }); + this.selectedActors$.value.forEach(actorName => { + if (!defaultConfig.actors.has(actorName)) { + this.deselectActor(actorName); } - } - yUp -= 75; // we need to adjust yUp to have space for the title and description - return { - xLeft, - xRight, - yUp, - yDown - }; + }); + this.iconSetConfigurationTypes.next({ + name: defaultConfig.name, + actors: defaultConfig.actors.keysArray(), + workObjects: defaultConfig.workObjects.keysArray() + }); + this.updateAllIconBehaviourSubjects(); } - prepareSVG(svg, layerBase, description, title, withTitle) { - const box = this.findMostOuterElements(layerBase); - let viewBoxIndex = svg.indexOf('width="'); - this.calculateWidthAndHeight(box); - const { - insertText, - extraHeight - } = (0,src_app_Service_Export_exportUtil__WEBPACK_IMPORTED_MODULE_0__.createTitleAndDescriptionSVGElement)(title, description, box.xLeft + 10, box.yUp + 20, this.width); - if (withTitle) { - this.height += extraHeight; - } - const bounds = this.createBounds(box, extraHeight); - const dataStart = svg.substring(0, viewBoxIndex); - viewBoxIndex = svg.indexOf('style="'); - const dataEnd = svg.substring(viewBoxIndex); - dataEnd.substring(viewBoxIndex); - svg = dataStart + bounds + dataEnd; - const insertIndex = svg.indexOf('') + 20; - if (withTitle) { - svg = [svg.slice(0, insertIndex), insertText, svg.slice(insertIndex)].join(''); - } - svg = this.URIHashtagFix(svg); - return svg; + cancel() { + this.iconSetConfigurationTypes.next(this.configurationService.getCurrentConfigurationNamesWithoutPrefix()); + this.updateAllIconBehaviourSubjects(); + this.resetToInitialConfiguration(); } - createBounds(box, extraHeight) { - return 'width="' + this.width + '" height="' + this.height + '" viewBox=" ' + box.xLeft + ' ' + (box.yUp - extraHeight) + ' ' + this.width + ' ' + this.height + '" '; + resetToInitialConfiguration() { + this.updateActorSubject(); + this.updateWorkObjectSubject(); } - /** - * Calculate the Width and Height of the Bounding Box for the PNG so no Parts are cut off - */ - calculateWidthAndHeight(box) { - if (box.xLeft < 0) { - if (box.xRight < 0) { - this.width = Math.abs(box.xLeft - box.xRight); - } else { - this.width = Math.abs(box.xLeft) + box.xRight; + /** Persist Icon Set **/ + saveIconSet(usedIcons, imported = false) { + const changedActors = []; + const changedWorkobjects = []; + if (this.configurationHasChanged) { + const changedIconSet = this.createIconSetConfiguration(); + const configurationActors = changedIconSet.actors.keysArray(); + usedIcons?.actors.forEach(actor => { + if (!configurationActors?.includes(actor) && !changedActors.includes(actor)) { + changedActors.push(actor); + } + }); + const configurationWorkobjects = changedIconSet.workObjects.keysArray(); + usedIcons?.workobjects.forEach(workobject => { + if (!configurationWorkobjects?.includes(workobject) && !changedWorkobjects.includes(workobject)) { + changedWorkobjects.push(workobject); + } + }); + if (!changedActors.length && !changedWorkobjects.length) { + this.changedIconSetConfiguration = changedIconSet; + this.updateIcons(changedIconSet); + this.storageService.setStoredIconSetConfiguration(this.changedIconSetConfiguration); + this.snackbar.open(imported ? 'Configuration imported successfully' : 'Configuration saved successfully', undefined, { + duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION, + panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_SUCCESS + }); } } else { - this.width = box.xRight - box.xLeft; + this.snackbar.open(imported ? 'No configuration to be imported' : 'No configuration to be saved', undefined, { + duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION, + panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_INFO + }); } - if (box.yUp < 0) { - if (box.yDown < 0) { - this.height = Math.abs(box.yUp - box.yDown); - } else { - this.height = Math.abs(box.yUp) + box.yDown; + if (changedActors.length || changedWorkobjects.length) { + if (changedActors.length) { + const actors = changedActors.join(', '); + this.snackbar.open(`The following icons are already in use as actors and cannot be changed: ${actors}`, undefined, { + duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION * 3, + panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_INFO + }); + } + if (changedWorkobjects.length) { + const workobjects = changedWorkobjects.join(', '); + this.snackbar.open(`The following icons are already in use as workobjects and cannot be changed: ${workobjects}`, undefined, { + duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION * 3, + panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_INFO + }); } - } else { - this.height = box.yDown - box.yUp; - } - // if the domain-Story is smaller than 300px in width or height, increase its dimensions - if (this.height < 300) { - this.height += 300; - box.yUp -= 150; - box.yDown += 150; - } - if (this.width < 300) { - this.width += 300; - box.xLeft -= 150; - box.xRight += 150; } - return [this.height, this.width]; } - extractSVG(viewport, outerSVGElement) { - const layerResizers = viewport.getElementsByClassName('layer-resizers'); - const layerOverlays = viewport.getElementsByClassName('layer-overlays'); - const transform = viewport.getAttribute('transform'); - const translate = viewport.getAttribute('translate'); - if (layerResizers[0]) { - layerResizers[0].parentNode.removeChild(layerResizers[0]); - } - if (layerOverlays[0]) { - layerOverlays[0].parentNode.removeChild(layerOverlays[0]); - } - // remove canvas scrolling and scaling before serializeToString of SVG - if (transform) { - viewport.removeAttribute('transform'); - } - if (translate) { - viewport.removeAttribute('translate'); - } - const svg = new XMLSerializer().serializeToString(outerSVGElement); - // re-add canvas scrolling and scaling - if (transform) { - viewport.setAttribute('transform', transform); - } - if (translate) { - viewport.setAttribute('translate', translate); - } - return svg; + exportIconSet() { + this.configurationService.exportConfiguration(); } - getWidth() { - return this.width; + getAndClearSavedConfiguration() { + const temp = this.changedIconSetConfiguration; + this.changedIconSetConfiguration = undefined; + return temp; } - getHeight() { - return this.height; + createIconSetConfiguration() { + const actors = new _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary(); + const workObjects = new _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary(); + this.iconSetConfigurationTypes.value.actors.forEach(name => { + actors.add(this.iconDictionaryService.getIconSource(name), name); + }); + this.iconSetConfigurationTypes.value.workObjects.forEach(name => { + workObjects.add(this.iconDictionaryService.getIconSource(name), name); + }); + return { + name: this.iconSetConfigurationTypes.value.name || '', + actors, + workObjects + }; } - static #_ = this.ɵfac = function PngService_Factory(t) { - return new (t || PngService)(); - }; - static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ - token: PngService, - factory: PngService.ɵfac, - providedIn: 'root' - }); -} - -/***/ }), - -/***/ 29298: -/*!***********************************************!*\ - !*** ./src/app/Service/Export/svg.service.ts ***! - \***********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ SvgService: () => (/* binding */ SvgService) -/* harmony export */ }); -/* harmony import */ var src_app_Service_Export_exportUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Service/Export/exportUtil */ 70908); -/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 96623); -/* harmony import */ var _Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Modeler/modeler.service */ 74676); - - - -class SvgService { - constructor(modelerService) { - this.modelerService = modelerService; - this.cacheData = ''; + /** Update Icons **/ + addNewIcon(iconName) { + const iconDict = new _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary(); + iconDict.add(this.getSrcForIcon(iconName), iconName); + this.iconDictionaryService.addIconsToCss(iconDict); + this.addIconToAllIconList(iconName); } - createSVGData(title, description, dst, withTitle, useWhiteBackground) { - this.cacheData = this.modelerService.getEncoded(); - let data = structuredClone(this.cacheData); - let viewBoxIndex = data.indexOf('width="'); - let { - width, - height, - viewBox - } = this.viewBoxCoordinates(data); - let xLeft; - let xRight; - let yUp; - let yDown; - const splitViewBox = viewBox.split(/\s/); - xLeft = +splitViewBox[0]; - yUp = +splitViewBox[1]; - xRight = +splitViewBox[2]; - yDown = +splitViewBox[3]; - if (xRight < 300) { - xRight += 300; - width += 300; - } - const { - insertText - } = (0,src_app_Service_Export_exportUtil__WEBPACK_IMPORTED_MODULE_0__.createTitleAndDescriptionSVGElement)(title, description, xLeft, yUp, width); - const bounds = this.createBounds(width, height, xLeft, yUp, xRight, yDown, withTitle); - const dataStart = data.substring(0, viewBoxIndex); - viewBoxIndex = data.indexOf('" version'); - const dataEnd = data.substring(viewBoxIndex); - dataEnd.substring(viewBoxIndex); - data = dataStart + bounds + dataEnd; - const insertIndex = this.findIndexToInsertData(data); - if (withTitle) { - data = data.slice(0, insertIndex) + insertText + data.slice(insertIndex); - } - if (useWhiteBackground) { - const svgIndex = data.indexOf('width="'); - const backgroundColorWhite = 'style="background-color:white" '; - data = data.slice(0, svgIndex) + backgroundColorWhite + data.slice(svgIndex); - } - return this.appendDST(data, dst); + addIconToAllIconList(iconName) { + this.allIconListItems.add(new rxjs__WEBPACK_IMPORTED_MODULE_10__.BehaviorSubject({ + name: iconName, + svg: this.getSrcForIcon(iconName), + isActor: this.isIconActor(iconName), + isWorkObject: this.isIconWorkObject(iconName) + }), iconName); } - findIndexToInsertData(data) { - let insertIndex = data.indexOf(''); - if (insertIndex < 0) { - insertIndex = data.indexOf('version="1.2">') + 14; - } else { - insertIndex += 7; - } - return insertIndex; + updateIcon(isActor, isWorkobject, iconName) { + const iconBehaviourSubject = this.getIconForName(iconName); + const icon = iconBehaviourSubject.value; + icon.isActor = isActor; + icon.isWorkObject = isWorkobject; + iconBehaviourSubject.next(icon); } - createBounds(width, height, xLeft, yUp, xRight, yDown, withTitle) { - return 'width="' + width + '" height=" ' + height + '" viewBox="' + xLeft + ' ' + (withTitle ? yUp - 80 : yUp) + ' ' + xRight + ' ' + (yDown + 30); + updateAllIconBehaviourSubjects() { + const customIconSetConfiguration = this.iconSetConfigurationTypes.value; + this.allIconListItems.keysArray().forEach(iconName => { + if (customIconSetConfiguration.actors.includes(iconName)) { + this.updateIcon(true, false, iconName); + } else if (customIconSetConfiguration.workObjects.includes(iconName)) { + this.updateIcon(false, true, iconName); + } else { + this.updateIcon(false, false, iconName); + } + }); } - viewBoxCoordinates(svg) { - const ViewBoxCoordinate = /width="([^"]+)"\s+height="([^"]+)"\s+viewBox="([^"]+)"/; - const match = svg.match(ViewBoxCoordinate); - if (match) { - return { - width: +match[1], - height: +match[2], - viewBox: match[3] - }; + getSrcForIcon(name) { + let iconName; + if (name.includes(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.DOMAINSTORY)) { + // TODO: td: This returns empty every time! + iconName = (0,_Utils_naming__WEBPACK_IMPORTED_MODULE_3__.getNameFromType)(name); + } else { + iconName = name; + } + const rawSrc = this.iconDictionaryService.getIconSource(iconName); + if (!rawSrc) { + return ''; + } + if (rawSrc.startsWith('data')) { + return rawSrc; + } else { + return 'data:image/svg+xml,' + rawSrc; } - return { - width: 0, - height: 0, - viewBox: '' - }; } - appendDST(data, dst) { - data += '\n'; - return data; + updateIcons(changedIconSet) { + this.allIconListItems.keysArray().forEach(item => this.setAsUnassigned(item, this.isIconActor(item))); + changedIconSet.actors.keysArray().forEach(actor => { + this.iconDictionaryService.registerIconForType(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR, actor, this.iconDictionaryService.getFullDictionary().get(actor)); + this.iconDictionaryService.unregisterIconForType(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.WORKOBJECT, actor); + this.setAsActor(true, actor); + }); + changedIconSet.workObjects.keysArray().forEach(workObject => { + this.iconDictionaryService.registerIconForType(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.WORKOBJECT, workObject, this.iconDictionaryService.getFullDictionary().get(workObject)); + this.iconDictionaryService.unregisterIconForType(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR, workObject); + this.setAsWorkobject(true, workObject); + }); } - static #_ = this.ɵfac = function SvgService_Factory(t) { - return new (t || SvgService)(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵinject"](_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_1__.ModelerService)); + static #_ = this.ɵfac = function IconSetCustomizationService_Factory(t) { + return new (t || IconSetCustomizationService)(_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_4__.IconSetConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_Import_import_domain_story_service__WEBPACK_IMPORTED_MODULE_6__.ImportDomainStoryService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_Title_title_service__WEBPACK_IMPORTED_MODULE_7__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_8__.StorageService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_9__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_12__.MatSnackBar)); }; - static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineInjectable"]({ - token: SvgService, - factory: SvgService.ɵfac, + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵdefineInjectable"]({ + token: IconSetCustomizationService, + factory: IconSetCustomizationService.ɵfac, providedIn: 'root' }); } @@ -9052,18 +9053,18 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/core */ 96623); /* harmony import */ var src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/dictionary/dictionary */ 54972); /* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); -/* harmony import */ var src_app_Domain_Common_domainConfiguration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Domain/Common/domainConfiguration */ 82011); +/* harmony import */ var src_app_Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Domain/Common/iconSetConfiguration */ 84738); /* harmony import */ var _Presentation_Dialog_info_dialog_info_dialog_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Presentation/Dialog/info-dialog/info-dialog.component */ 16266); /* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/material/dialog */ 72768); /* harmony import */ var _Domain_Dialog_infoDialogData__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Domain/Dialog/infoDialogData */ 45574); /* harmony import */ var _Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Utils/sanitizer */ 66107); /* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); -/* harmony import */ var src_app_Service_DomainConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/Service/DomainConfiguration/icon-dictionary.service */ 29662); +/* harmony import */ var src_app_Service_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/Service/IconSetConfiguration/icon-dictionary.service */ 93689); /* harmony import */ var src_app_Service_Import_import_repair_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/Service/Import/import-repair.service */ 75158); /* harmony import */ var src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/Service/Title/title.service */ 69672); /* harmony import */ var src_app_Service_Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! src/app/Service/Renderer/renderer.service */ 94896); /* harmony import */ var _Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Dialog/dialog.service */ 4730); -/* harmony import */ var _DomainConfiguration_domain_configuration_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../DomainConfiguration/domain-configuration.service */ 68449); +/* harmony import */ var _IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../IconSetConfiguration/icon-set-configuration.service */ 10200); /* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); @@ -9160,13 +9161,13 @@ class ImportDomainStoryService { // current implementation if (dstAndConfig.domain) { configFromFile = isEGN ? dstAndConfig.domain : JSON.parse(dstAndConfig.domain); - config = (0,src_app_Domain_Common_domainConfiguration__WEBPACK_IMPORTED_MODULE_2__.fromConfigurationFromFile)(configFromFile); + config = (0,src_app_Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_2__.fromConfigurationFromFile)(configFromFile); elements = isEGN ? dstAndConfig.dst : JSON.parse(dstAndConfig.dst); } else { // legacy implementation if (dstAndConfig.config) { configFromFile = JSON.parse(dstAndConfig.config); - config = (0,src_app_Domain_Common_domainConfiguration__WEBPACK_IMPORTED_MODULE_2__.fromConfigurationFromFile)(configFromFile); + config = (0,src_app_Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_2__.fromConfigurationFromFile)(configFromFile); elements = JSON.parse(dstAndConfig.dst); } else { // implementation prior to configuration @@ -9286,7 +9287,7 @@ class ImportDomainStoryService { this.dialogService.openDialog(_Presentation_Dialog_info_dialog_info_dialog_component__WEBPACK_IMPORTED_MODULE_3__.InfoDialogComponent, config); } static #_ = this.ɵfac = function ImportDomainStoryService_Factory(t) { - return new (t || ImportDomainStoryService)(_angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](src_app_Service_DomainConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_7__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](src_app_Service_Import_import_repair_service__WEBPACK_IMPORTED_MODULE_8__.ImportRepairService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_9__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](src_app_Service_Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_10__.RendererService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](_Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_11__.DialogService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](_DomainConfiguration_domain_configuration_service__WEBPACK_IMPORTED_MODULE_12__.DomainConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_15__.MatSnackBar)); + return new (t || ImportDomainStoryService)(_angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](src_app_Service_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_7__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](src_app_Service_Import_import_repair_service__WEBPACK_IMPORTED_MODULE_8__.ImportRepairService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_9__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](src_app_Service_Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_10__.RendererService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](_Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_11__.DialogService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_12__.IconSetConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_15__.MatSnackBar)); }; static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵdefineInjectable"]({ token: ImportDomainStoryService, @@ -9432,7 +9433,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 96623); /* harmony import */ var src_app_Service_LabelDictionary_mass_naming_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Service/LabelDictionary/mass-naming.service */ 37509); /* harmony import */ var src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Service/ElementRegistry/element-registry.service */ 67613); -/* harmony import */ var _DomainConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DomainConfiguration/icon-dictionary.service */ 29662); +/* harmony import */ var _IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../IconSetConfiguration/icon-dictionary.service */ 93689); @@ -9511,7 +9512,7 @@ class LabelDictionaryService { } } static #_ = this.ɵfac = function LabelDictionaryService_Factory(t) { - return new (t || LabelDictionaryService)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](src_app_Service_LabelDictionary_mass_naming_service__WEBPACK_IMPORTED_MODULE_1__.MassNamingService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_2__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_DomainConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_3__.IconDictionaryService)); + return new (t || LabelDictionaryService)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](src_app_Service_LabelDictionary_mass_naming_service__WEBPACK_IMPORTED_MODULE_1__.MassNamingService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_2__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_3__.IconDictionaryService)); }; static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({ token: LabelDictionaryService, @@ -9595,9 +9596,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Modeler_modeler_updateHandler_elementUpdateHandler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Modeler/modeler/updateHandler/elementUpdateHandler */ 88298); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @angular/core */ 96623); /* harmony import */ var _DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../DirtyFlag/dirty-flag.service */ 89791); -/* harmony import */ var _DomainConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../DomainConfiguration/icon-dictionary.service */ 29662); +/* harmony import */ var _IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../IconSetConfiguration/icon-dictionary.service */ 93689); /* harmony import */ var _ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../ElementRegistry/element-registry.service */ 67613); -/* harmony import */ var _DomainConfiguration_domain_configuration_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../DomainConfiguration/domain-configuration.service */ 68449); +/* harmony import */ var _IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../IconSetConfiguration/icon-set-configuration.service */ 10200); /* harmony import */ var _LabelDictionary_label_dictionary_service__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../LabelDictionary/label-dictionary.service */ 59783); /* harmony import */ var _Replay_replay_state_service__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../Replay/replay-state.service */ 67820); /* harmony import */ var _Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../Dialog/dialog.service */ 4730); @@ -9790,7 +9791,7 @@ class InitializerService { } } static #_ = this.ɵfac = function InitializerService_Factory(t) { - return new (t || InitializerService)(_angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_14__.DirtyFlagService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_DomainConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_15__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_16__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_DomainConfiguration_domain_configuration_service__WEBPACK_IMPORTED_MODULE_17__.DomainConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_LabelDictionary_label_dictionary_service__WEBPACK_IMPORTED_MODULE_18__.LabelDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_Replay_replay_state_service__WEBPACK_IMPORTED_MODULE_19__.ReplayStateService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_20__.DialogService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_CommandStack_command_stack_service__WEBPACK_IMPORTED_MODULE_21__.CommandStackService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_Title_title_service__WEBPACK_IMPORTED_MODULE_22__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_Export_html_presentation_service__WEBPACK_IMPORTED_MODULE_23__.HtmlPresentationService)); + return new (t || InitializerService)(_angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_14__.DirtyFlagService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_15__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_16__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_17__.IconSetConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_LabelDictionary_label_dictionary_service__WEBPACK_IMPORTED_MODULE_18__.LabelDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_Replay_replay_state_service__WEBPACK_IMPORTED_MODULE_19__.ReplayStateService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_20__.DialogService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_CommandStack_command_stack_service__WEBPACK_IMPORTED_MODULE_21__.CommandStackService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_Title_title_service__WEBPACK_IMPORTED_MODULE_22__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_Export_html_presentation_service__WEBPACK_IMPORTED_MODULE_23__.HtmlPresentationService)); }; static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵdefineInjectable"]({ token: InitializerService, @@ -9817,8 +9818,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/core */ 96623); /* harmony import */ var _initializer_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./initializer.service */ 33666); /* harmony import */ var _ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ElementRegistry/element-registry.service */ 67613); -/* harmony import */ var _DomainConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DomainConfiguration/icon-dictionary.service */ 29662); -/* harmony import */ var _DomainConfiguration_domain_configuration_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../DomainConfiguration/domain-configuration.service */ 68449); +/* harmony import */ var _IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../IconSetConfiguration/icon-dictionary.service */ 93689); +/* harmony import */ var _IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../IconSetConfiguration/icon-set-configuration.service */ 10200); /* harmony import */ var _BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../BrowserStorage/storage.service */ 59298); @@ -9838,7 +9839,7 @@ class ModelerService { this.storageService = storageService; } postInit() { - const storedDomainConfiguration = this.storageService.getStoredDomainConfiguration(); + const storedDomainConfiguration = this.storageService.getStoredIconSetConfiguration(); if (storedDomainConfiguration) { this.iconDictionaryService.setCustomConfiguration(storedDomainConfiguration); this.domainConfigurationService.loadConfiguration(storedDomainConfiguration); @@ -9878,10 +9879,10 @@ class ModelerService { restart(domainConfiguration, domainStory) { const currentStory = domainStory != undefined ? domainStory : this.elementRegistryService.createObjectListForDSTDownload().map(e => e.businessObject); if (!domainConfiguration) { - domainConfiguration = this.storageService.getStoredDomainConfiguration(); + domainConfiguration = this.storageService.getStoredIconSetConfiguration(); } if (domainConfiguration) { - this.storageService.setStoredDomainConfiguration(domainConfiguration); + this.storageService.setStoredIconSetConfiguration(domainConfiguration); this.iconDictionaryService.setCustomConfiguration(domainConfiguration); this.domainConfigurationService.loadConfiguration(domainConfiguration); } @@ -9931,7 +9932,7 @@ class ModelerService { })(); } static #_ = this.ɵfac = function ModelerService_Factory(t) { - return new (t || ModelerService)(_angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵinject"](_initializer_service__WEBPACK_IMPORTED_MODULE_2__.InitializerService), _angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵinject"](_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_3__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵinject"](_DomainConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_4__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵinject"](_DomainConfiguration_domain_configuration_service__WEBPACK_IMPORTED_MODULE_5__.DomainConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵinject"](_BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_6__.StorageService)); + return new (t || ModelerService)(_angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵinject"](_initializer_service__WEBPACK_IMPORTED_MODULE_2__.InitializerService), _angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵinject"](_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_3__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵinject"](_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_4__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵinject"](_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_5__.IconSetConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵinject"](_BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_6__.StorageService)); }; static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵdefineInjectable"]({ token: ModelerService, @@ -10311,12 +10312,12 @@ class TitleService { this.commandStackService = commandStackService; this.titleSubject = new rxjs__WEBPACK_IMPORTED_MODULE_3__.BehaviorSubject(_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_1__.INITIAL_TITLE); this.descriptionSubject = new rxjs__WEBPACK_IMPORTED_MODULE_3__.BehaviorSubject(_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_1__.INITIAL_DESCRIPTION); - this.domainNameSubject = new rxjs__WEBPACK_IMPORTED_MODULE_3__.BehaviorSubject(_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_1__.INITIAL_DOMAIN_NAME); + this.iconSetNameSubject = new rxjs__WEBPACK_IMPORTED_MODULE_3__.BehaviorSubject(_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_1__.INITIAL_ICON_SET_NAME); this.showDescriptionSubject = new rxjs__WEBPACK_IMPORTED_MODULE_3__.BehaviorSubject(true); this.title$ = this.titleSubject.asObservable(); this.description$ = this.descriptionSubject.asObservable(); this.showDescription$ = this.showDescriptionSubject.asObservable(); - this.domainName$ = this.domainNameSubject.asObservable(); + this.iconSetName$ = this.iconSetNameSubject.asObservable(); } updateTitleAndDescription(title, description, allowUndo) { if (allowUndo) { @@ -10340,8 +10341,8 @@ class TitleService { setShowDescription(show) { this.showDescriptionSubject.next(show); } - setDomainName(name) { - this.domainNameSubject.next(name); + setIconSetName(name) { + this.iconSetNameSubject.next(name); } getTitle() { return this.titleSubject.value; @@ -10349,8 +10350,8 @@ class TitleService { getDescription() { return this.descriptionSubject.value; } - getDomainName() { - return this.domainNameSubject.value; + getIconSetName() { + return this.iconSetNameSubject.value; } getVersion() { return _environments_environment__WEBPACK_IMPORTED_MODULE_0__.environment.version; @@ -10732,14 +10733,14 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var src_app_Service_LabelDictionary_label_dictionary_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/Service/LabelDictionary/label-dictionary.service */ 59783); /* harmony import */ var src_app_Service_Replay_replay_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/Service/Replay/replay.service */ 94788); /* harmony import */ var src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! src/app/Service/ElementRegistry/element-registry.service */ 67613); -/* harmony import */ var src_app_Service_DomainConfiguration_domain_configuration_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! src/app/Service/DomainConfiguration/domain-configuration.service */ 68449); +/* harmony import */ var src_app_Service_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! src/app/Service/IconSetConfiguration/icon-set-configuration.service */ 10200); /* harmony import */ var src_app_Service_LabelDictionary_mass_naming_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! src/app/Service/LabelDictionary/mass-naming.service */ 37509); /* harmony import */ var src_app_Presentation_Dialog_info_dialog_info_dialog_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! src/app/Presentation/Dialog/info-dialog/info-dialog.component */ 16266); /* harmony import */ var src_app_Presentation_Dialog_export_dialog_export_dialog_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! src/app/Presentation/Dialog/export-dialog/export-dialog.component */ 97218); /* harmony import */ var src_app_Presentation_Dialog_activity_dialog_activity_dialog_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! src/app/Presentation/Dialog/activity-dialog/activity-dialog.component */ 63954); /* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @angular/forms */ 48015); /* harmony import */ var src_app_Presentation_Dialog_header_dialog_header_dialog_component__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! src/app/Presentation/Dialog/header-dialog/header-dialog.component */ 21270); -/* harmony import */ var src_app_Service_DomainConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! src/app/Service/DomainConfiguration/icon-dictionary.service */ 29662); +/* harmony import */ var src_app_Service_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! src/app/Service/IconSetConfiguration/icon-dictionary.service */ 93689); /* harmony import */ var src_app_Presentation_Canvas_modeler_component__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! src/app/Presentation/Canvas/modeler.component */ 29383); /* harmony import */ var src_app_Modules_settings_module__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! src/app/Modules/settings.module */ 47261); /* harmony import */ var _Service_Autosave_autosave_service__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Service/Autosave/autosave.service */ 30534); @@ -10795,7 +10796,7 @@ class AppModule { type: AppModule }); static #_3 = this.ɵinj = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_24__["ɵɵdefineInjector"]({ - providers: [_Service_Autosave_autosave_service__WEBPACK_IMPORTED_MODULE_20__.AutosaveService, src_app_Service_Export_export_service__WEBPACK_IMPORTED_MODULE_3__.ExportService, src_app_Service_Import_import_domain_story_service__WEBPACK_IMPORTED_MODULE_4__.ImportDomainStoryService, src_app_Service_Import_import_repair_service__WEBPACK_IMPORTED_MODULE_5__.ImportRepairService, src_app_Service_DomainConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_17__.IconDictionaryService, src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_7__.TitleService, src_app_Service_LabelDictionary_label_dictionary_service__WEBPACK_IMPORTED_MODULE_8__.LabelDictionaryService, src_app_Service_Replay_replay_service__WEBPACK_IMPORTED_MODULE_9__.ReplayService, src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_10__.ElementRegistryService, src_app_Service_DomainConfiguration_domain_configuration_service__WEBPACK_IMPORTED_MODULE_11__.DomainConfigurationService, src_app_Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_6__.ModelerService, src_app_Service_LabelDictionary_mass_naming_service__WEBPACK_IMPORTED_MODULE_12__.MassNamingService, _angular_forms__WEBPACK_IMPORTED_MODULE_25__.UntypedFormBuilder, { + providers: [_Service_Autosave_autosave_service__WEBPACK_IMPORTED_MODULE_20__.AutosaveService, src_app_Service_Export_export_service__WEBPACK_IMPORTED_MODULE_3__.ExportService, src_app_Service_Import_import_domain_story_service__WEBPACK_IMPORTED_MODULE_4__.ImportDomainStoryService, src_app_Service_Import_import_repair_service__WEBPACK_IMPORTED_MODULE_5__.ImportRepairService, src_app_Service_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_17__.IconDictionaryService, src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_7__.TitleService, src_app_Service_LabelDictionary_label_dictionary_service__WEBPACK_IMPORTED_MODULE_8__.LabelDictionaryService, src_app_Service_Replay_replay_service__WEBPACK_IMPORTED_MODULE_9__.ReplayService, src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_10__.ElementRegistryService, src_app_Service_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_11__.IconSetConfigurationService, src_app_Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_6__.ModelerService, src_app_Service_LabelDictionary_mass_naming_service__WEBPACK_IMPORTED_MODULE_12__.MassNamingService, _angular_forms__WEBPACK_IMPORTED_MODULE_25__.UntypedFormBuilder, { provide: _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_26__.MAT_CHECKBOX_DEFAULT_OPTIONS, useValue: { clickAction: 'noop' diff --git a/app-latest-build/main.js.map b/app-latest-build/main.js.map index 79bf252..107fade 100644 --- a/app-latest-build/main.js.map +++ b/app-latest-build/main.js.map @@ -1 +1 @@ -{"version":3,"file":"main.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAA0C;AACgB;AACf;AACX;AAEU;AACU;AACJ;AACa;AAE/C,SAAUS,kBAAkBA,CAACC,OAAO;EAChDV,2DAAO,CAACW,IAAI,CAAC,IAAI,EAAED,OAAO,CAAC;EAE3B,IAAI,CAACE,eAAe,GAAG,EAAE;EACzB,IAAI,CAACC,cAAc,GAAG,EAAE;AAC1B;AAEAT,+CAAQ,CAACK,kBAAkB,EAAET,2DAAO,CAAC;AAErCS,kBAAkB,CAACK,SAAS,CAACC,QAAQ,GAAG,EAAE,CAACC,MAAM,CAC/CP,kBAAkB,CAACK,SAAS,CAACC,QAAQ,EACrC,CAACV,gDAAiB,EAAEC,yDAAkB,EAAEC,yDAAc,CAAC,EACvD,CAACN,sEAAY,CAAC,CACf;AAED;;;;;AAKAQ,kBAAkB,CAACK,SAAS,CAACG,eAAe,GAAG,UAAUC,aAAa;EACpE,IAAIC,QAAQ,GAAGD,aAAa,CAACE,MAAM;EACnC,OAAOF,aAAa,C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C,KAAK,CAAC7P,GAAG,CAAC,CAAC","sources":["./src/app/Modeler/index.js","./src/app/Modeler/modeler/change-icon/replace.js","./src/app/Modeler/modeler/change-icon/replaceMenuProvider.js","./src/app/Modeler/modeler/change-icon/replaceOptions.js","./src/app/Modeler/modeler/context-pad/domainStoryContextPadProvider.js","./src/app/Modeler/modeler/domainStoryElementFactory.js","./src/app/Modeler/modeler/domainStoryIdFactory.js","./src/app/Modeler/modeler/domainStoryRenderer.js","./src/app/Modeler/modeler/domainStoryRules.js","./src/app/Modeler/modeler/domainStoryUpdater.js","./src/app/Modeler/modeler/index.js","./src/app/Modeler/modeler/labeling/dsLabelEditingPreview.js","./src/app/Modeler/modeler/labeling/dsLabelEditingProvider.js","./src/app/Modeler/modeler/labeling/dsLabelUtil.js","./src/app/Modeler/modeler/labeling/index.js","./src/app/Modeler/modeler/labeling/position.js","./src/app/Modeler/modeler/modeling/dSModeling.js","./src/app/Modeler/modeler/modeling/index.js","./src/app/Modeler/modeler/numbering/numbering.js","./src/app/Modeler/modeler/palette/domainStoryPalette.js","./src/app/Modeler/modeler/updateHandler/activityUpdateHandlers.js","./src/app/Modeler/modeler/updateHandler/elementUpdateHandler.js","./src/app/Modeler/modeler/updateHandler/headlineAndDescriptionUpdateHandler.js","./src/app/Modeler/modeler/updateHandler/massRenameHandler.js","./src/app/Modeler/modeler/updateHandler/updateLabelHandler.js","./src/app/Modeler/modeler/util.js","./src/app/Service/Export/exportUtil.js","./src/app/Domain/Common/businessObject.ts","./src/app/Domain/Common/configuration.ts","./src/app/Domain/Common/constants.ts","./src/app/Domain/Common/dictionary/dictionary.ts","./src/app/Domain/Common/domainConfiguration.ts","./src/app/Domain/Common/elementTypes.ts","./src/app/Domain/Common/iconConfiguration.ts","./src/app/Domain/Dialog/activityDialogData.ts","./src/app/Domain/Dialog/exportDialogData.ts","./src/app/Domain/Dialog/infoDialogData.ts","./src/app/Domain/DomManipulation/replayConstants.ts","./src/app/Domain/Domain-Configuration/allIcons.ts","./src/app/Domain/Domain-Configuration/iconFilterEnum.ts","./src/app/Domain/Export/configAndDst.ts","./src/app/Domain/Export/exportConstants.ts","./src/app/Modules/autosave-settings.module.ts","./src/app/Modules/domain-story-modeler-module.module.ts","./src/app/Modules/settings.module.ts","./src/app/Presentation/Autosave/AutosaveOptions/autosave-options.component.ts","./src/app/Presentation/Autosave/AutosaveOptions/autosave-options.component.html","./src/app/Presentation/Autosave/AutosaveSettings/autosave-settings.component.ts","./src/app/Presentation/Autosave/AutosaveSettings/autosave-settings.component.html","./src/app/Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component.ts","./src/app/Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component.html","./src/app/Presentation/Canvas/modeler.component.ts","./src/app/Presentation/Canvas/modeler.component.html","./src/app/Presentation/Dialog/activity-dialog/activity-dialog.component.ts","./src/app/Presentation/Dialog/activity-dialog/activity-dialog.component.html","./src/app/Presentation/Dialog/export-dialog/export-dialog.component.ts","./src/app/Presentation/Dialog/export-dialog/export-dialog.component.html","./src/app/Presentation/Dialog/header-dialog/header-dialog.component.ts","./src/app/Presentation/Dialog/header-dialog/header-dialog.component.html","./src/app/Presentation/Dialog/info-dialog/info-dialog.component.ts","./src/app/Presentation/Dialog/info-dialog/info-dialog.component.html","./src/app/Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component.ts","./src/app/Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component.html","./src/app/Presentation/DomainConfiguration/details-list-item/details-list-item.component.ts","./src/app/Presentation/DomainConfiguration/details-list-item/details-list-item.component.html","./src/app/Presentation/DomainConfiguration/domain-configuration.component.ts","./src/app/Presentation/DomainConfiguration/domain-configuration.component.html","./src/app/Presentation/DomainConfiguration/domain-details/domain-details.component.ts","./src/app/Presentation/DomainConfiguration/domain-details/domain-details.component.html","./src/app/Presentation/DomainConfiguration/icon-list-item/icon-list-item.component.ts","./src/app/Presentation/DomainConfiguration/icon-list-item/icon-list-item.component.html","./src/app/Presentation/Header/header-buttons.component.ts","./src/app/Presentation/Header/header-buttons.component.html","./src/app/Presentation/Header/header.component.ts","./src/app/Presentation/Header/header.component.html","./src/app/Presentation/LabelDictionary/label-dictionary.component.ts","./src/app/Presentation/LabelDictionary/label-dictionary.component.html","./src/app/Presentation/Settings/General/general-settings.component.ts","./src/app/Presentation/Settings/General/general-settings.component.html","./src/app/Presentation/Settings/settings.component.ts","./src/app/Presentation/Settings/settings.component.html","./src/app/Service/Autosave/autosave-configuration.service.ts","./src/app/Service/Autosave/autosave.service.ts","./src/app/Service/BrowserStorage/storage.service.ts","./src/app/Service/CommandStack/command-stack.service.ts","./src/app/Service/Dialog/dialog.service.ts","./src/app/Service/DirtyFlag/dirty-flag.service.ts","./src/app/Service/DomManipulation/dom-manipulation.service.ts","./src/app/Service/DomainConfiguration/domain-configuration.service.ts","./src/app/Service/DomainConfiguration/domain-customization.service.ts","./src/app/Service/DomainConfiguration/icon-dictionary.service.ts","./src/app/Service/ElementRegistry/element-registry.service.ts","./src/app/Service/Export/export.service.ts","./src/app/Service/Export/html-presentation.service.ts","./src/app/Service/Export/png.service.ts","./src/app/Service/Export/svg.service.ts","./src/app/Service/Import/import-domain-story.service.ts","./src/app/Service/Import/import-repair.service.ts","./src/app/Service/LabelDictionary/label-dictionary.service.ts","./src/app/Service/LabelDictionary/mass-naming.service.ts","./src/app/Service/Modeler/initializer.service.ts","./src/app/Service/Modeler/modeler.service.ts","./src/app/Service/Renderer/renderer.service.ts","./src/app/Service/Replay/replay-state.service.ts","./src/app/Service/Replay/replay.service.ts","./src/app/Service/Replay/storyCreator/story-creator.service.ts","./src/app/Service/Settings/settings.service.ts","./src/app/Service/Title/title.service.ts","./src/app/Utils/mathExtensions.ts","./src/app/Utils/naming.ts","./src/app/Utils/sanitizer.ts","./src/app/app.component.ts","./src/app/app.component.html","./src/app/app.module.ts","./src/app/material.module.ts","./src/environments/environment.ts","./src/main.ts"],"sourcesContent":["import Modeler from \"bpmn-js/lib/Modeler\";\nimport ResizeModule from \"diagram-js/lib/features/resize\";\nimport { assign, isArray } from \"min-dash\";\nimport inherits from \"inherits\";\n\nimport DomainStoryModule from \"./modeler\";\nimport LabelEditingModule from \"./modeler/labeling\";\nimport ModelingModule from \"./modeler/modeling\";\nimport { elementTypes } from \"../Domain/Common/elementTypes\";\n\nexport default function DomainStoryModeler(options) {\n Modeler.call(this, options);\n\n this._customElements = [];\n this._groupElements = [];\n}\n\ninherits(DomainStoryModeler, Modeler);\n\nDomainStoryModeler.prototype._modules = [].concat(\n DomainStoryModeler.prototype._modules,\n [DomainStoryModule, LabelEditingModule, ModelingModule],\n [ResizeModule],\n);\n\n/**\n * add a single custom element to the underlying diagram\n *\n * @param {Object} customElement\n */\nDomainStoryModeler.prototype._addCustomShape = function (customElement) {\n let parentId = customElement.parent;\n delete customElement.children;\n delete customElement.parent;\n this._customElements.push(customElement);\n\n let canvas = this.get(\"canvas\"),\n elementFactory = this.get(\"elementFactory\");\n\n let customAttrs = assign({ businessObject: customElement }, customElement);\n let customShape = elementFactory.create(\"shape\", customAttrs);\n\n if (isGroup(customElement)) {\n this._groupElements[customElement.id] = customShape;\n }\n\n if (parentId) {\n let parentShape = this._groupElements[parentId];\n\n if (isGroup(parentShape)) {\n return canvas.addShape(customShape, parentShape, parentShape.id);\n }\n }\n return canvas.addShape(customShape);\n};\n\nDomainStoryModeler.prototype._addCustomConnection = function (customElement) {\n this._customElements.push(customElement);\n\n let canvas = this.get(\"canvas\"),\n elementFactory = this.get(\"elementFactory\"),\n elementRegistry = this.get(\"elementRegistry\");\n\n let customAttrs = assign({ businessObject: customElement }, customElement);\n\n let connection = elementFactory.create(\n \"connection\",\n assign(customAttrs, {\n source: elementRegistry.get(customElement.source),\n target: elementRegistry.get(customElement.target),\n }),\n elementRegistry.get(customElement.source).parent,\n );\n\n return canvas.addConnection(connection);\n};\n\n//** We import BusinessObjects, not the whole Canvas Object!!!!!!!!\nDomainStoryModeler.prototype.importCustomElements = function (elements) {\n this.get(\"eventBus\").fire(\"diagram.clear\", {});\n this._customElements = [];\n this._groupElements = [];\n\n this.addCustomElements(elements);\n};\n\n/**\n * add a number of custom elements and connections to the underlying diagram.\n *\n * @param {Array} customElements\n */\nDomainStoryModeler.prototype.addCustomElements = function (customElements) {\n if (!isArray(customElements)) {\n throw new Error(\"argument must be an array\");\n }\n\n let shapes = [],\n connections = [],\n groups = [];\n\n customElements.forEach(function (customElement) {\n if (isConnection(customElement)) {\n connections.push(customElement);\n } else if (isGroup(customElement)) {\n groups.push(customElement);\n } else {\n shapes.push(customElement);\n }\n });\n\n // add groups before shapes and shapes before connections so that connections\n // can already rely on the shapes being part of the diagram\n groups.forEach(this._addCustomShape, this);\n shapes.forEach(this._addCustomShape, this);\n connections.forEach(this._addCustomConnection, this);\n};\n\n/**\n * get custom elements with their current status.\n *\n * @return {Array} custom elements on the diagram\n */\nDomainStoryModeler.prototype.getCustomElements = function () {\n return this._customElements;\n};\n\n// override standard function to prevent default elements on canvas\nDomainStoryModeler.prototype.createDiagram = function (done) {};\n\nfunction isConnection(element) {\n return (\n element.type === elementTypes.ACTIVITY ||\n element.type === elementTypes.CONNECTION\n );\n}\n\nfunction isGroup(element) {\n return element && element.type === elementTypes.GROUP;\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\n/**\n * service that allow replacing of elements.\n */\nexport default function Replace(modeling) {\n this._modeling = modeling;\n}\n\n/**\n * @param {Element} oldElement - element to be replaced\n * @param {Object} newElementData - containing information about the new Element, for example height, width, type.\n * @param modeling\n */\nfunction replaceElement(oldElement, newElementData, modeling) {\n // let modeling = this._modeling;\n\n let newElement = setCenterOfElement(newElementData, oldElement, modeling);\n let outgoingActivities = newElement.outgoing;\n let incomingActivities = newElement.incoming;\n\n outgoingActivities.forEach((element) => {\n element.businessObject.source = newElement.id;\n });\n\n incomingActivities.forEach((element) => {\n element.businessObject.target = newElement.id;\n });\n\n return newElement;\n}\n\nfunction setCenterOfElement(newElementData, oldElement, modeling) {\n newElementData.x = Math.ceil(\n oldElement.x + (newElementData.width || oldElement.width) / 2,\n );\n newElementData.y = Math.ceil(\n oldElement.y + (newElementData.height || oldElement.height) / 2,\n );\n\n assign(newElementData, { name: oldElement.businessObject.name });\n\n return modeling.replaceShape(oldElement, newElementData, {});\n}\n\nReplace.prototype.replaceElement = replaceElement;\n","\"use strict\";\n\nimport Replace from \"./replace\";\nimport * as replaceOptions from \"./replaceOptions\";\n\nimport { forEach } from \"min-dash\";\n\n/**\n * This module is an element agnostic replace menu provider for the popup menu.\n */\nexport default function ReplaceMenuProvider(modeling) {\n this._dsReplace = new Replace(modeling);\n this._modeling = modeling;\n}\n\nReplaceMenuProvider.$inject = [\"modeling\"];\n\n/**\n * Get all entries from replaceOptions for the given element and apply filters\n * on them. Get for example only elements, which are different from the current one.\n *\n * @param {djs.model.Base} element\n *\n * @return {Array} a list of menu entry items\n */\nReplaceMenuProvider.prototype.getEntries = function (element) {\n let entries;\n if (element.type.includes(\"actor\")) {\n entries = replaceOptions.actorReplaceOptions(element.type);\n } else if (element.type.includes(\"workObject\")) {\n entries = replaceOptions.workObjectReplaceOptions(element.type);\n }\n\n return this._createEntries(element, entries);\n};\n\n/**\n * Creates an array of menu entry objects for a given element and filters the replaceOptions\n * according to a filter function.\n *\n * @param {djs.model.Base} element\n * @param {Object} replaceOptions\n *\n * @return {Array} a list of menu items\n */\nReplaceMenuProvider.prototype._createEntries = function (\n element,\n replaceOptions,\n) {\n let menuEntries = [];\n\n let self = this;\n\n forEach(replaceOptions, function (definition) {\n let entry = self._createMenuEntry(definition, element);\n\n menuEntries.push(entry);\n });\n\n return menuEntries;\n};\n\n/**\n * Creates and returns a single menu entry item.\n *\n * @param {Object} definition a single replace options definition object\n * @param {djs.model.Base} element\n * @param {Function} [action] an action callback function which gets called when\n * the menu entry is being triggered.\n *\n * @return {Object} menu entry item\n */\nReplaceMenuProvider.prototype._createMenuEntry = function (\n definition,\n element,\n action,\n) {\n let replaceElement = this._dsReplace.replaceElement;\n let modeling = this._modeling;\n let replaceAction = function () {\n return replaceElement(element, definition.target, modeling);\n };\n\n action = action || replaceAction;\n\n return {\n label: definition.label,\n className: definition.className,\n id: definition.actionName,\n action: action,\n };\n};\n","import { elementTypes } from \"src/app/Domain/Common/elementTypes\";\n\nlet iconDictionaryService;\n\nexport function initializeReplaceOptions(iconDictionary) {\n iconDictionaryService = iconDictionary;\n}\n\nexport function actorReplaceOptions(name) {\n const actorTypes = iconDictionaryService.getTypeDictionary(\n elementTypes.ACTOR,\n );\n\n let replaceOption = {};\n let i = 0;\n\n actorTypes.keysArray().forEach((actorType) => {\n if (!name.includes(actorType)) {\n const typeName = actorType;\n replaceOption[i] = {\n label: \"Change to \" + typeName,\n actionName: \"replace-with-actor-\" + typeName.toLowerCase(),\n className: iconDictionaryService.getIconForBPMN(\n elementTypes.ACTOR,\n actorType,\n ),\n target: {\n type: `${elementTypes.ACTOR}${actorType}`,\n },\n };\n i++;\n }\n });\n return replaceOption;\n}\n\nexport function workObjectReplaceOptions(name) {\n const workObjectTypes = iconDictionaryService.getTypeDictionary(\n elementTypes.WORKOBJECT,\n );\n\n let replaceOption = {};\n let i = 0;\n\n workObjectTypes.keysArray().forEach((workObjectType) => {\n if (!name.includes(workObjectType)) {\n const typeName = workObjectType;\n replaceOption[i] = {\n label: \"Change to \" + typeName,\n actionName: \"replace-with-actor-\" + typeName,\n className: iconDictionaryService.getIconForBPMN(\n elementTypes.WORKOBJECT,\n workObjectType,\n ),\n target: {\n type: `${elementTypes.WORKOBJECT}${workObjectType}`,\n },\n };\n }\n i++;\n });\n return replaceOption;\n}\n","\"use strict\";\n\nimport inherits from \"inherits\";\n\nimport ContextPadProvider from \"bpmn-js/lib/features/context-pad/ContextPadProvider\";\n\nimport { assign, bind } from \"min-dash\";\nimport { generateAutomaticNumber } from \"../numbering/numbering\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { getAllStandardIconKeys } from \"src/app/Domain/Domain-Configuration/allIcons\";\n\nlet dirtyFlagService;\nlet iconDictionaryService;\n\nexport function initializeContextPadProvider(dirtyFlag, iconDictionary) {\n dirtyFlagService = dirtyFlag;\n iconDictionaryService = iconDictionary;\n}\n\nexport default function DomainStoryContextPadProvider(\n injector,\n connect,\n translate,\n elementFactory,\n create,\n canvas,\n contextPad,\n popupMenu,\n replaceMenuProvider,\n commandStack,\n eventBus,\n modeling,\n) {\n let startConnect;\n let selectedElement;\n\n injector.invoke(ContextPadProvider, this);\n let autoPlace = injector.get(\"autoPlace\", false);\n\n let cached = bind(this.getContextPadEntries, this);\n\n const colorPicker = document.getElementById(\"colorPicker\");\n colorPicker.onchange = (ev) => {\n const context = {\n businessObject: selectedElement.businessObject,\n newColor: ev.target.value,\n element: selectedElement,\n };\n\n commandStack.execute(\"element.colorChange\", context);\n dirtyFlagService.makeDirty();\n };\n\n popupMenu.registerProvider(\"ds-replace\", replaceMenuProvider);\n popupMenu.registerProvider(\"bpmn-replace\", replaceMenuProvider);\n\n this.getContextPadEntries = function (element) {\n const allStandardIconKeys = getAllStandardIconKeys();\n let actions = cached(element);\n\n startConnect = function (event, element, autoActivate) {\n connect.start(event, element, autoActivate);\n };\n\n if (element.type.includes(elementTypes.WORKOBJECT)) {\n if (\n allStandardIconKeys.includes(\n element.type.replace(elementTypes.WORKOBJECT, \"\"),\n )\n ) {\n addColorChange(actions);\n }\n addConnectWithActivity(actions, startConnect);\n addTextAnnotation(actions);\n addActors(appendAction, actions);\n addWorkObjects(appendAction, actions);\n addChangeWorkObjectTypeMenu(actions);\n } else if (element.type.includes(elementTypes.ACTOR)) {\n if (\n allStandardIconKeys.includes(\n element.type.replace(elementTypes.ACTOR, \"\"),\n )\n ) {\n addColorChange(actions);\n }\n addConnectWithActivity(actions, startConnect);\n addTextAnnotation(actions);\n addWorkObjects(appendAction, actions);\n addChangeActorTypeMenu(actions);\n } else if (element.type.includes(elementTypes.GROUP)) {\n delete actions.delete;\n addTextAnnotation(actions);\n assign(actions, {\n deleteGroup: {\n group: \"edit\",\n className: \"bpmn-icon-trash\",\n title: \"Remove Group without Child-Elements\",\n action: {\n click: function (event, element) {\n modeling.removeGroup(element);\n dirtyFlagService.makeDirty();\n },\n },\n },\n });\n addColorChange(actions);\n } else if (element.type.includes(elementTypes.ACTIVITY)) {\n moveDeleteActionToEndOfArray(actions);\n\n addColorChange(actions);\n\n assign(actions, {\n delete: {\n group: \"edit\",\n className: \"bpmn-icon-trash\",\n title: \"Remove\",\n action: {\n click: function (event, element) {\n modeling.removeElements({ element });\n dirtyFlagService.makeDirty();\n },\n },\n },\n });\n }\n\n return actions;\n };\n\n function moveDeleteActionToEndOfArray(actions) {\n delete actions.delete;\n\n assign(actions, {\n changeDirection: {\n group: \"edit\",\n className: \"icon-domain-story-changeDirection\",\n title: translate(\"Change direction\"),\n action: {\n // event needs to be addressed\n click: function (event, element) {\n changeDirection(element);\n },\n },\n },\n });\n }\n\n function addChangeActorTypeMenu(actions) {\n assign(actions, {\n replace: {\n group: \"edit\",\n className: \"bpmn-icon-screw-wrench\",\n title: translate(\"Change type\"),\n action: {\n click: function (event, element) {\n let position = assign(getReplaceMenuPosition(element), {\n cursor: { x: event.x, y: event.y },\n });\n popupMenu.open(element, \"ds-replace\", position);\n },\n },\n },\n });\n }\n\n function addColorChange(actions) {\n assign(actions, {\n colorChange: {\n group: \"edit\",\n className: \"icon-domain-story-color-picker\",\n title: translate(\"Change color\"),\n action: {\n click: function (event, element) {\n selectedElement = element;\n colorPicker.click();\n },\n },\n },\n });\n }\n\n function addTextAnnotation(actions) {\n assign(actions, {\n \"append.text-annotation\": appendAction(\n elementTypes.TEXTANNOTATION,\n \"bpmn-icon-text-annotation\",\n \"textannotation\",\n \"connect\",\n ),\n });\n }\n\n function addConnectWithActivity(actions, startConnect) {\n assign(actions, {\n connect: {\n group: \"connect\",\n className: \"bpmn-icon-connection\",\n title: translate(\"Connect with activity\"),\n action: {\n click: startConnect,\n dragstart: startConnect,\n },\n },\n });\n }\n\n function addWorkObjects(appendAction, actions) {\n let workObjectTypes = iconDictionaryService.getTypeDictionary(\n elementTypes.WORKOBJECT,\n );\n workObjectTypes.keysArray().forEach((workObjectType) => {\n let name = workObjectType;\n let icon = iconDictionaryService.getIconForBPMN(\n elementTypes.WORKOBJECT,\n workObjectType,\n );\n let action = [];\n action[\"append.workObject\" + name] = appendAction(\n `${elementTypes.WORKOBJECT}${workObjectType}`,\n icon,\n name,\n \"workObjects\",\n );\n assign(actions, action);\n });\n }\n\n function addActors(appendAction, actions) {\n let actorTypes = iconDictionaryService.getTypeDictionary(\n elementTypes.ACTOR,\n );\n actorTypes.keysArray().forEach((actorType) => {\n let name = actorType;\n let icon = iconDictionaryService.getIconForBPMN(\n elementTypes.ACTOR,\n actorType,\n );\n let action = [];\n action[\"append.actor\" + name] = appendAction(\n `${elementTypes.ACTOR}${actorType}`,\n icon,\n name,\n \"actors\",\n );\n assign(actions, action);\n });\n }\n\n function addChangeWorkObjectTypeMenu(actions) {\n assign(actions, {\n replace: {\n group: \"edit\",\n className: \"bpmn-icon-screw-wrench\",\n title: translate(\"Change type\"),\n action: {\n click: function (event, element) {\n let position = assign(getReplaceMenuPosition(element), {\n cursor: { x: event.x, y: event.y },\n });\n popupMenu.open(element, \"ds-replace\", position);\n },\n },\n },\n });\n }\n\n function changeDirection(element) {\n let context;\n let businessObject = element.businessObject;\n let newNumber;\n\n if (element.source.type.includes(elementTypes.ACTOR)) {\n newNumber = 0;\n } else {\n newNumber = generateAutomaticNumber(element, commandStack);\n }\n context = {\n businessObject: businessObject,\n newNumber: newNumber,\n element: element,\n };\n commandStack.execute(\"activity.directionChange\", context);\n }\n\n function getReplaceMenuPosition(element) {\n let Y_OFFSET = 5;\n\n let diagramContainer = canvas.getContainer(),\n pad = contextPad.getPad(element).html;\n\n let diagramRect = diagramContainer.getBoundingClientRect(),\n padRect = pad.getBoundingClientRect();\n\n let top = padRect.top - diagramRect.top;\n let left = padRect.left - diagramRect.left;\n\n return {\n x: left,\n y: top + padRect.height + Y_OFFSET,\n };\n }\n\n /**\n * create an append action\n *\n * @param {String} type\n * @param {String} className\n * @param {String} [title]\n * @param {String} group\n * @param {Object} [options]\n *\n * @return {Object} descriptor\n */\n function appendAction(type, className, title, group, options) {\n if (typeof title !== \"string\") {\n options = title;\n title = translate(\"{type}\", { type: type.replace(/^domainStory:/, \"\") });\n }\n\n function appendStart(event, element) {\n let shape = elementFactory.createShape(assign({ type: type }, options));\n let context = {\n elements: [shape],\n hints: {},\n source: element,\n };\n create.start(event, shape, context);\n }\n\n return {\n group: group,\n className: className,\n title: \"Append \" + title,\n action: {\n dragstart: startConnect,\n click: appendStart,\n },\n };\n }\n}\n\ninherits(DomainStoryContextPadProvider, ContextPadProvider);\n\nDomainStoryContextPadProvider.$inject = [\n \"injector\",\n \"connect\",\n \"translate\",\n \"elementFactory\",\n \"create\",\n \"canvas\",\n \"contextPad\",\n \"popupMenu\",\n \"replaceMenuProvider\",\n \"commandStack\",\n \"eventBus\",\n \"modeling\",\n];\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\nimport inherits from \"inherits\";\n\nimport BpmnElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\n\nimport { DEFAULT_LABEL_SIZE } from \"bpmn-js/lib/util/LabelUtil\";\n\nimport DomainStoryIdFactory from \"./domainStoryIdFactory\";\n\n/**\n * A custom factory that knows how to create BPMN _and_ custom elements.\n */\nexport default function DomainStoryElementFactory(bpmnFactory, moddle) {\n BpmnElementFactory.call(this, bpmnFactory, moddle);\n\n let self = this;\n let domainStoryIdFactory = new DomainStoryIdFactory();\n\n /**\n * create a diagram-js element with the given type (any of shape, connection, label).\n *\n * @param {String} elementType\n * @param {Object} attrs\n *\n * @return {djs.model.Base}\n */\n this.create = function (elementType, attrs) {\n let type = attrs.type;\n\n if (elementType === \"label\") {\n return self.baseCreate(\n elementType,\n assign({ type: \"label\" }, DEFAULT_LABEL_SIZE, attrs),\n );\n }\n\n // add type to businessObject if custom\n if (/^domainStory:/.test(type)) {\n if (!attrs.businessObject) {\n attrs.businessObject = {\n type: type,\n name: attrs.name ? attrs.name : \"\",\n };\n }\n\n if (attrs.id) {\n domainStoryIdFactory.registerId(attrs.id);\n } else {\n attrs.id = domainStoryIdFactory.getId(elementType);\n }\n assign(attrs.businessObject, {\n id: attrs.id,\n });\n\n let id = attrs.id;\n attrs.businessObject.get = function (key) {\n if (key === \"id\") {\n return id;\n }\n };\n attrs.businessObject.set = function (key, value) {\n if (key === \"id\") {\n assign(attrs.businessObject, { id: value });\n }\n };\n\n if (!attrs.businessObject.$type) {\n assign(attrs.businessObject, { $type: \"Element\" });\n }\n assign(attrs.businessObject, { di: {} });\n if (!attrs.businessObject.$descriptor) {\n assign(attrs.businessObject, { $descriptor: {} });\n }\n\n // add width and height if shape\n if (\n (!/:activity$/.test(type) || !/:connection$/.test(type)) &&\n !((/:group$/.test(type) && attrs.height) || attrs.width)\n ) {\n assign(attrs, self._getCustomElementSize(type));\n }\n\n if (!(\"$instanceOf\" in attrs.businessObject)) {\n // ensure we can use ModelUtil#is for type checks\n Object.defineProperty(attrs.businessObject, \"$instanceOf\", {\n value: function (type) {\n return this.type === type;\n },\n });\n }\n\n return self.baseCreate(elementType, attrs);\n }\n\n return self.createBpmnElement(elementType, attrs);\n };\n}\n\ninherits(DomainStoryElementFactory, BpmnElementFactory);\n\nDomainStoryElementFactory.$inject = [\"bpmnFactory\", \"moddle\"];\n\n/**\n * returns the default size of custom shapes.\n *\n * the following example shows an interface on how\n * to setup the custom shape's dimensions.\n * *\n * @param {String} type\n *\n * @return {Dimensions} a {width, height} object representing the size of the element\n */\nDomainStoryElementFactory.prototype._getCustomElementSize = function (type) {\n let shapes = {\n __default: { width: 75, height: 75 },\n \"domainStory:textAnnotation\": { width: 100, height: 30 },\n \"domainStory:group\": { width: 525, height: 275 },\n };\n\n return shapes[type] || shapes.__default;\n};\n\nclass Dimensions {\n width;\n height;\n}\n","\"use strict\";\n\nlet idList = [];\n\nexport default function DomainStoryIdFactory() {}\n\nDomainStoryIdFactory.prototype.getId = function (type) {\n return generateId(type);\n};\n\nDomainStoryIdFactory.prototype.registerId = function (id) {\n idList.push(id);\n};\n\nfunction generateId(type) {\n let idNumber = fourDigitsId();\n\n let id = type + \"_\" + idSuffix(idNumber);\n\n while (containsId(id)) {\n idNumber++;\n\n id = type + \"_\" + idSuffix(idNumber);\n }\n\n idList.push(id);\n return id;\n}\n\nfunction idSuffix(idNumber) {\n let id;\n if (idNumber > 9999) {\n id = 0;\n } else if (idNumber < 10) {\n id = \"000\" + idNumber;\n } else if (idNumber < 100) {\n id = \"00\" + idNumber;\n } else if (idNumber < 1000) {\n id = \"0\" + idNumber;\n } else {\n id = \"\" + idNumber;\n }\n return id;\n}\n\nfunction fourDigitsId() {\n return Math.floor(Math.random() * 10000);\n}\n\nexport function containsId(id) {\n let same = false;\n idList.forEach((element) => {\n if (id === element) {\n same = true;\n }\n });\n return same;\n}\n","\"use strict\";\n\nimport inherits from \"inherits\";\nimport BaseRenderer from \"diagram-js/lib/draw/BaseRenderer\";\nimport Ids from \"ids\";\nimport { getAnnotationBoxHeight } from \"./labeling/dsLabelEditingPreview\";\nimport { componentsToPath, createLine } from \"diagram-js/lib/util/RenderUtil\";\nimport {\n append as svgAppend,\n attr as svgAttr,\n classes as svgClasses,\n create as svgCreate,\n} from \"tiny-svg\";\nimport { query as domQuery } from \"min-dom\";\nimport { assign, isObject } from \"min-dash\";\nimport { getNumberStash } from \"./labeling/dsLabelEditingProvider\";\nimport {\n addNumberToRegistry,\n generateAutomaticNumber,\n numberBoxDefinitions,\n} from \"./numbering/numbering\";\n\nimport { calculateTextWidth } from \"./labeling/dsLabelUtil\";\nimport { countLines, labelPosition } from \"./labeling/position\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { angleBetween } from \"../../Utils/mathExtensions\";\nimport { getNameFromType } from \"../../Utils/naming\";\n\nlet RENDERER_IDS = new Ids();\nlet numbers = [];\nconst DEFAULT_COLOR = \"black\";\n\n/**\n * a renderer that knows how to render custom elements.\n */\nlet iconDictionary;\nlet elementRegistry;\nlet dirtyFlag;\n\nexport function initializeRenderer(\n iconDictionaryService,\n elementRegistryService,\n dirtyFlagService,\n) {\n iconDictionary = iconDictionaryService;\n elementRegistry = elementRegistryService;\n dirtyFlag = dirtyFlagService;\n}\n\nexport default function DomainStoryRenderer(\n eventBus,\n styles,\n canvas,\n textRenderer,\n pathMap,\n commandStack,\n) {\n BaseRenderer.call(this, eventBus, 2000);\n\n let rendererId = RENDERER_IDS.next();\n let markers = {};\n let computeStyle = styles.computeStyle;\n\n // generate the automatic Number for an activity originating from an actor\n function generateActivityNumber(parentGfx, element, box) {\n // whenever we want to edit an activity, it gets redrawn as a new object\n // and the custom information is lost,\n // so we stash it before the editing occurs and set the value here\n\n let numberStash = getNumberStash();\n let semantic = element.businessObject;\n\n if (numberStash.use) {\n semantic.number = numberStash.number;\n }\n\n numbers[semantic.number] = true;\n\n let newRenderedNumber = renderNumber(\n parentGfx,\n semantic.number,\n numberStyle(box),\n element.type,\n );\n addNumberToRegistry(newRenderedNumber, semantic.number);\n }\n\n // style functions\n function numberStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n position: \"absolute\",\n }),\n };\n }\n\n function backgroundBoxStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n fontSize: 50,\n position: \"absolute\",\n fontFamily: \"Courier New\",\n }),\n };\n }\n\n function backgroundDotStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"white\",\n fontSize: 150,\n position: \"absolute\",\n fontFamily: \"Courier\",\n }),\n };\n }\n\n // render functions\n // render label associated with actors and workobjects\n function renderEmbeddedLabel(parentGfx, element, align, padding) {\n let businessObject = element.businessObject;\n return renderLabel(\n parentGfx,\n businessObject.name,\n {\n box: element,\n align: align,\n padding: padding ? padding : 0,\n style: {\n fill: \"#000000\",\n },\n },\n element.type,\n );\n }\n\n // render label associated with activities\n function renderExternalLabel(parentGfx, element) {\n let semantic = element.businessObject;\n let waypoints = element.waypoints;\n let lines = countLines(semantic.name);\n\n if (element.waypoints != null) {\n let position = labelPosition(waypoints, lines);\n let startPoint = element.waypoints[position.selected];\n let endPoint = element.waypoints[position.selected + 1];\n let angle = angleBetween(startPoint, endPoint);\n let alignment = \"left\";\n let boxWidth = 500;\n let xStart = position.x;\n\n // if the activity is horizontal, we want to center the label\n if (angle === 0 || angle === 180) {\n boxWidth = Math.abs(startPoint.x - endPoint.x);\n alignment = \"center\";\n xStart =\n (startPoint.x + endPoint.x) / 2 - calculateTextWidth(semantic.name);\n }\n\n let box = {\n textAlign: alignment,\n width: boxWidth,\n height: 30,\n x: xStart,\n y: position.y,\n };\n\n if (semantic.name && semantic.name.length) {\n return renderLabel(\n parentGfx,\n semantic.name,\n {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n wordWrap: \"break-word\",\n overflowWrap: \"break-word\",\n hyphens: \"auto\",\n }),\n },\n element.type,\n );\n }\n }\n }\n\n // render the number associated with an activity\n function renderExternalNumber(parentGfx, element) {\n if (element && element.source) {\n let semantic = element.businessObject;\n\n let box = numberBoxDefinitions(element);\n\n if (\n semantic.number == null &&\n element.source.type &&\n element.source.type.includes(elementTypes.ACTOR)\n ) {\n generateAutomaticNumber(element, commandStack);\n }\n\n // render the background for the number\n if (semantic.number && element.source.type.includes(elementTypes.ACTOR)) {\n generateActivityNumber(parentGfx, element, box);\n } else {\n semantic.number = null;\n }\n }\n }\n\n // render a number on the canvas\n function renderNumber(parentGfx, number, options, type) {\n if (number < 10) {\n number = String(number);\n }\n number = String(number);\n let text = textRenderer.createText(number || \"\", options);\n let height = 0;\n\n svgClasses(text).add(\"djs-labelNumber\");\n\n setCoordinates(type, text, options, height, parentGfx);\n\n svgAppend(parentGfx, text);\n\n drawCircle(parentGfx, options, number.length);\n\n return text;\n }\n\n function drawCircle(parentGfx, options, textLength) {\n const circle = svgCreate(\"circle\");\n svgAttr(circle, {\n cx: options.box.x + 15 + textLength * 3,\n cy: options.box.y - 4,\n r: \"10\",\n style: \"fill:transparent;stroke:black;stroke-width:1\",\n });\n svgAppend(parentGfx, circle);\n }\n\n // the coordinates of the activity label must be set directly and will not be taken from the box\n function setCoordinates(type, text, options, height, parentGfx) {\n if (/:activity$/.test(type)) {\n text.innerHTML = manipulateInnerHTMLXLabel(\n text.children,\n options.box.x,\n 0,\n );\n text.innerHTML = manipulateInnerHTMLYLabel(\n text.children,\n options.box.y,\n 0,\n );\n } else if (/:actor/.test(type)) {\n height = parentGfx.firstChild.attributes.height.nodeValue;\n text.innerHTML = manipulateInnerHTMLYLabel(text.children, height, 0);\n } else if (/:workObject/.test(type)) {\n height = parentGfx.firstChild.attributes.height.nodeValue;\n text.innerHTML = manipulateInnerHTMLYLabel(text.children, height, 26);\n }\n }\n\n // render a label on the canvas\n function renderLabel(parentGfx, label, options, type) {\n let text = textRenderer.createText(label || \"\", options);\n let height = 0;\n\n svgClasses(text).add(\"djs-label\");\n setCoordinates(type, text, options, height, parentGfx);\n\n svgAppend(parentGfx, text);\n return text;\n }\n\n // determine the Y-coordinate of the label / number to be rendered\n function manipulateInnerHTMLYLabel(children, y, offset) {\n if (children) {\n let result = \"\";\n for (let i = 0; i < children.length; i++) {\n result += children[i].outerHTML.replace(\n /y=\"-?\\d*.\\d*\"/,\n 'y=\"' + (Number(y) + offset + 14 * i) + '\"',\n );\n }\n return result;\n }\n }\n\n // determine the X-coordinate of the label / number to be rendered\n function manipulateInnerHTMLXLabel(children, x, offset) {\n if (children) {\n let result = \"\";\n for (let i = 0; i < children.length; i++) {\n result += children[i].outerHTML.replace(\n /x=\"-?\\d*.\\d*\"/,\n 'x=\"' + (Number(x) + offset + 14) + '\"',\n );\n }\n return result;\n }\n }\n\n // draw functions\n this.drawGroup = function (parentGfx, element) {\n if (!element.businessObject.pickedColor) {\n element.businessObject.pickedColor = DEFAULT_COLOR;\n }\n let rect = drawRect(\n parentGfx,\n element.width,\n element.height,\n 0,\n assign(\n {\n fill: \"none\",\n stroke: element.businessObject.pickedColor,\n },\n element.attrs,\n ),\n );\n renderEmbeddedLabel(parentGfx, element, \"left-top\", 8);\n\n return rect;\n };\n\n function useColorForElement(element, iconSRC) {\n if (!element.businessObject.pickedColor) {\n element.businessObject.pickedColor = DEFAULT_COLOR;\n }\n const match = iconSRC.match(/fill=\".*?\"/);\n if (match && match.length > 1) {\n return iconSRC.replace(\n /fill=\".*?\"/,\n 'fill=\"' + element.businessObject.pickedColor + '\"',\n );\n } else {\n const index = iconSRC.indexOf(\"' +\n ''\n );\n } else {\n return useColorForElement(element, iconSRC);\n }\n }\n\n this.drawActor = function (parent, element) {\n let svgDynamicSizeAttributes = {\n width: element.width,\n height: element.height,\n },\n actor;\n let iconSRC = iconDictionary.getTypeIconSRC(\n elementTypes.ACTOR,\n getNameFromType(element.type),\n );\n iconSRC = getIconSrc(iconSRC, element);\n actor = svgCreate(iconSRC);\n\n svgAttr(actor, svgDynamicSizeAttributes);\n svgAppend(parent, actor);\n\n renderEmbeddedLabel(parent, element, \"center\", -5);\n return actor;\n };\n\n this.drawWorkObject = function (parent, element) {\n let svgDynamicSizeAttributes = {\n width: element.width * 0.65,\n height: element.height * 0.65,\n x: element.width / 2 - 25,\n y: element.height / 2 - 25,\n },\n workObject;\n let iconSRC = iconDictionary.getTypeIconSRC(\n elementTypes.WORKOBJECT,\n getNameFromType(element.type),\n );\n iconSRC = getIconSrc(iconSRC, element);\n workObject = svgCreate(iconSRC);\n\n svgAttr(workObject, svgDynamicSizeAttributes);\n svgAppend(parent, workObject);\n renderEmbeddedLabel(parent, element, \"center\", -5);\n\n return workObject;\n };\n\n function useColorForActivity(element) {\n if (!element.businessObject.pickedColor) {\n element.businessObject.pickedColor = \"black\";\n }\n let attrs = \"\";\n return computeStyle(attrs, {\n stroke: element.businessObject.pickedColor,\n fill: \"none\",\n strokeWidth: 1.5,\n strokeLinejoin: \"round\",\n markerEnd: marker(\n \"activity\",\n \"black\",\n element.businessObject.pickedColor,\n ),\n });\n }\n\n this.drawActivity = function (p, element) {\n adjustForTextOverlap(element);\n\n if (element) {\n let attrs = useColorForActivity(element);\n\n let x = svgAppend(p, createLine(element.waypoints, attrs));\n renderExternalLabel(p, element);\n renderExternalNumber(p, element);\n\n // just adjusting the start- and endpoint of the connection-element moves only the drawn connection,\n // not the interactive line. This can be fixed by manually overriding the points of the interactive polyline\n // in the HTMl with the points of the drawn one.\n // this however does not adjust the surrounding box of the connection.\n fixConnectionInHTML(p.parentElement);\n\n return x;\n }\n };\n\n function checkIfPointOverlapsText(point, source) {\n if (point.y > source.y + 60) {\n if (point.x > source.x + 3 && point.x < source.x + 72) {\n let lineOffset = getLineOffset(source);\n if (source.y + 75 + lineOffset > point.y) {\n point.y += lineOffset;\n }\n }\n }\n }\n\n function adjustForTextOverlap(element) {\n let source = element.source;\n let target = element.target;\n\n let waypoints = element.waypoints;\n let startPoint = waypoints[0];\n let endPoint = waypoints[waypoints.length - 1];\n\n if (startPoint && endPoint && source && target) {\n checkIfPointOverlapsText(startPoint, source);\n checkIfPointOverlapsText(endPoint, source);\n }\n }\n\n function getLineOffset(element) {\n let id = element.id;\n let offset = 0;\n\n let objects = document.getElementsByClassName(\"djs-element djs-shape\");\n for (let i = 0; i < objects.length; i++) {\n let data_id = objects.item(i).getAttribute(\"data-element-id\");\n if (data_id === id) {\n let object = objects.item(i);\n let text = object.getElementsByTagName(\"text\")[0];\n let tspans = text.getElementsByTagName(\"tspan\");\n let tspan = tspans[tspans.length - 1];\n offset = tspan.getAttribute(\"y\");\n }\n }\n return offset - 70;\n }\n\n function fixConnectionInHTML(wantedConnection) {\n if (wantedConnection) {\n let polylines = wantedConnection.getElementsByTagName(\"polyline\");\n if (polylines.length > 1) {\n polylines[1].setAttribute(\n \"points\",\n polylines[0].getAttribute(\"points\"),\n );\n }\n }\n }\n\n this.drawDSConnection = function (p, element) {\n let attrs = \"\";\n attrs = computeStyle(attrs, {\n stroke: \"#000000\",\n strokeWidth: 1.5,\n strokeLinejoin: \"round\",\n strokeDasharray: \"5, 5\",\n });\n\n return svgAppend(p, createLine(element.waypoints, attrs));\n };\n\n this.drawAnnotation = function (parentGfx, element) {\n let style = {\n fill: \"none\",\n stroke: \"none\",\n };\n\n let text = element.businessObject.text || \"\";\n if (element.businessObject.text) {\n let height = getAnnotationBoxHeight();\n\n if (height === 0 && element.businessObject.number) {\n height = element.businessObject.number;\n }\n assign(element, {\n height: height,\n });\n\n // for some reason the keyword height is not exported, so we use another, which we know will be exported,\n // to ensure persistent annotation heights between sessions\n assign(element.businessObject, {\n number: height,\n });\n }\n\n let textElement = drawRect(\n parentGfx,\n element.width,\n element.height,\n 0,\n 0,\n style,\n );\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n drawPath(parentGfx, textPathData, {\n stroke: \"black\",\n });\n\n renderLabel(parentGfx, text, {\n box: element,\n align: \"left-top\",\n padding: 5,\n style: {\n fill: \"black\",\n },\n });\n\n return textElement;\n };\n\n // draw helper functions\n function drawPath(parentGfx, d, attrs) {\n attrs = computeStyle(attrs, [\"no-fill\"], {\n strokeWidth: 2,\n stroke: \"black\",\n });\n\n let path = svgCreate(\"path\");\n svgAttr(path, { d: d });\n svgAttr(path, attrs);\n\n svgAppend(parentGfx, path);\n\n return path;\n }\n\n function drawRect(parentGfx, width, height, r, offset, attrs) {\n if (isObject(offset)) {\n attrs = offset;\n offset = 0;\n }\n\n offset = offset || 0;\n attrs = computeStyle(attrs, {\n stroke: \"black\",\n strokeWidth: 2,\n fill: \"white\",\n });\n\n let rect = svgCreate(\"rect\");\n svgAttr(rect, {\n x: offset,\n y: offset,\n width: width - offset * 2,\n height: height - offset * 2,\n rx: r,\n ry: r,\n });\n\n svgAttr(rect, attrs);\n svgAppend(parentGfx, rect);\n\n return rect;\n }\n\n // marker functions\n function marker(type, fill, stroke) {\n let id = type + \"-\" + fill + \"-\" + stroke + \"-\" + rendererId;\n\n if (!markers[id]) {\n createMarker(type, fill, stroke);\n }\n return \"url(#\" + id + \")\";\n }\n\n function createMarker(type, fill, stroke) {\n let id = type + \"-\" + fill + \"-\" + stroke + \"-\" + rendererId;\n\n if (type === \"activity\") {\n let sequenceflowEnd = svgCreate(\"path\");\n svgAttr(sequenceflowEnd, { d: \"M 1 5 L 11 10 L 1 15 Z\" });\n\n addMarker(id, {\n element: sequenceflowEnd,\n ref: { x: 11, y: 10 },\n scale: 0.5,\n attrs: {\n fill: stroke,\n stroke: stroke,\n },\n });\n }\n }\n\n function addMarker(id, options) {\n let attrs = assign(\n {\n fill: \"black\",\n strokeWidth: 1,\n strokeLinecap: \"round\",\n strokeDasharray: \"none\",\n },\n options.attrs,\n );\n\n let ref = options.ref || { x: 0, y: 0 };\n let scale = options.scale || 1;\n\n // resetting stroke dash array\n if (attrs.strokeDasharray === \"none\") {\n attrs.strokeDasharray = [10000, 1];\n }\n\n let marker = svgCreate(\"marker\");\n\n svgAttr(options.element, attrs);\n svgAppend(marker, options.element);\n svgAttr(marker, {\n id: id,\n viewBox: \"0 0 20 20\",\n refX: ref.x,\n refY: ref.y,\n markerWidth: 20 * scale,\n markerHeight: 20 * scale,\n orient: \"auto\",\n });\n\n let defs = domQuery(\"defs\", canvas._svg);\n if (!defs) {\n defs = svgCreate(\"defs\");\n svgAppend(canvas._svg, defs);\n }\n svgAppend(defs, marker);\n markers[id] = marker;\n }\n\n // path functions\n this.getWorkObjectPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n\n this.getGroupPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n\n this.getActivityPath = function (connection) {\n let waypoints = connection.waypoints.map(function (p) {\n return p.original || p;\n });\n\n let activityPath = [[\"M\", waypoints[0].x, waypoints[0].y]];\n\n waypoints.forEach(function (waypoint, index) {\n if (index !== 0) {\n activityPath.push([\"L\", waypoint.x, waypoint.y]);\n }\n });\n return componentsToPath(activityPath);\n };\n\n this.getActorPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n}\n\ninherits(DomainStoryRenderer, BaseRenderer);\n\nDomainStoryRenderer.$inject = [\n \"eventBus\",\n \"styles\",\n \"canvas\",\n \"textRenderer\",\n \"pathMap\",\n \"commandStack\",\n];\n\nDomainStoryRenderer.prototype.canRender = function (element) {\n return /^domainStory:/.test(element.type);\n};\n\nDomainStoryRenderer.prototype.drawShape = function (p, element) {\n // polyfill for tests\n if (!String.prototype.startsWith) {\n Object.defineProperty(String.prototype, \"startsWith\", {\n value: function (search, pos) {\n pos = !pos || pos < 0 ? 0 : +pos;\n return this.substring(pos, pos + search.length) === search;\n },\n });\n }\n\n let type = element.type;\n element.businessObject.type = type;\n\n elementRegistry.correctInitialize();\n dirtyFlag.makeDirty();\n\n if (type.includes(elementTypes.ACTOR)) {\n return this.drawActor(p, element);\n } else if (type.includes(elementTypes.WORKOBJECT)) {\n return this.drawWorkObject(p, element);\n } else if (type.includes(elementTypes.TEXTANNOTATION)) {\n return this.drawAnnotation(p, element);\n } else if (type.includes(elementTypes.GROUP)) {\n return this.drawGroup(p, element);\n }\n};\n\nDomainStoryRenderer.prototype.getShapePath = function (shape) {\n let type = shape.type;\n\n if (type.includes(elementTypes.ACTOR)) {\n return this.getActorPath(shape);\n } else if (type.includes(elementTypes.WORKOBJECT)) {\n return this.getWorkObjectPath(shape);\n } else if (type.includes(elementTypes.GROUP)) {\n return this.getGroupPath(shape);\n }\n};\n\nDomainStoryRenderer.prototype.drawConnection = function (p, element) {\n let type = element.type;\n\n dirtyFlag.makeDirty();\n\n // fixes activities that were copy-pasted\n if (!element.businessObject.type) {\n element.businessObject.type = type;\n }\n if (type === elementTypes.ACTIVITY) {\n return this.drawActivity(p, element);\n } else if (type === elementTypes.CONNECTION) {\n return this.drawDSConnection(p, element);\n }\n};\n\n// creates a SVG path that describes a rectangle which encloses the given shape.\nfunction getRectPath(shape) {\n let offset = 5;\n let x = shape.x,\n y = shape.y,\n width = shape.width / 2 + offset,\n height = shape.height / 2 + offset;\n\n return [\n [\"M\", x, y],\n [\"l\", width, 0],\n [\"l\", width, height],\n [\"l\", -width, height],\n [\"l\", -width, 0],\n [\"z\"],\n ];\n}\n","\"use strict\";\n\nimport { assign, every, reduce } from \"min-dash\";\n\nimport inherits from \"inherits\";\n\nimport RuleProvider from \"diagram-js/lib/features/rules/RuleProvider\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { is } from \"./util\";\n\nconst HIGH_PRIORITY = 1500;\nconst MIN_SIZE = 125;\n\nfunction isDomainStory(element) {\n return element && /^domainStory:/.test(element.type);\n}\n\nfunction isDomainStoryGroup(element) {\n return element && /^domainStory:group/.test(element.type);\n}\n\nfunction isActor(element) {\n return element && /^domainStory:actor\\w*/.test(element.type);\n}\n\nfunction isWorkObject(element) {\n return element && /^domainStory:workObject/.test(element.type);\n}\n\nfunction isActivity(element) {\n return element && /^domainStory:activity/.test(element.type);\n}\n\nfunction isConnection(element) {\n return element && /^domainStory:connection/.test(element.type);\n}\n\nfunction isAnnotation(element) {\n return element && /^domainStory:textAnnotation/.test(element.type);\n}\n\n/**\n * can source and target be connected?\n */\nfunction canConnect(source, target) {\n // only judge about two custom elements\n if (\n isDomainStoryGroup(target) ||\n !isDomainStory(source) ||\n !isDomainStory(target)\n ) {\n return;\n }\n\n // do not allow a connection from one element to itself\n if (source === target) {\n return;\n }\n\n // do not allow a connection between two actors\n if (isActor(source) && isActor(target)) {\n return;\n }\n\n // do not allow a connection, where the source or target is an activity\n if (isActivity(source) || isActivity(target)) {\n return;\n }\n\n // do not allow a connection, where the source or target is an annotation connection\n if (isConnection(source) || isConnection(target)) {\n return;\n }\n\n // do not allow a connection to a connection(the special type of connection between an element and a comment box)\n // when the target is an annotation, the connection type is an annotation connection instead of an activity\n if (isAnnotation(target)) {\n return { type: elementTypes.CONNECTION };\n }\n\n return { type: elementTypes.ACTIVITY };\n}\n\nfunction canResize(shape, newBounds) {\n if (is(shape, elementTypes.GROUP)) {\n if (newBounds) {\n let lowerLeft = { x: shape.x, y: shape.y + shape.height };\n let lowerRight = { x: shape.x + shape.width, y: shape.y + shape.height };\n let upperRight = { x: shape.x + shape.width, y: shape.y };\n\n if (newBounds.x !== shape.x && newBounds.y !== shape.y) {\n // upper left\n if (newBounds.x > lowerRight.x - MIN_SIZE) {\n assign(newBounds, { x: lowerRight.x - MIN_SIZE });\n }\n if (newBounds.y > lowerRight.y - MIN_SIZE) {\n assign(newBounds, { y: lowerRight.y - MIN_SIZE });\n }\n }\n\n if (newBounds.x !== shape.x && newBounds.y === shape.y) {\n // lower left\n if (newBounds.x > upperRight.x - MIN_SIZE) {\n assign(newBounds, { x: upperRight.x - MIN_SIZE });\n }\n }\n\n if (newBounds.x === shape.x && newBounds.y !== shape.y) {\n // upper right\n if (newBounds.y > lowerLeft.y - MIN_SIZE) {\n assign(newBounds, { y: lowerLeft.y - MIN_SIZE });\n }\n }\n\n if (newBounds.height < MIN_SIZE) {\n assign(newBounds, {\n height: MIN_SIZE,\n });\n }\n if (newBounds.width < MIN_SIZE) {\n assign(newBounds, {\n width: MIN_SIZE,\n });\n }\n }\n return true;\n }\n\n return false;\n}\n\nfunction canAttach(elements, target, source) {\n if (!Array.isArray(elements)) {\n elements = [elements];\n }\n\n // disallow appending as boundary event\n if (source) {\n return false;\n }\n\n // only (re-)attach one element at a time\n if (elements.length !== 1) {\n return false;\n }\n\n // allow default move operation\n if (!target) {\n return true;\n }\n\n // only allow drop on DomainStory Elements\n if (!isDomainStory(target)) {\n return false;\n }\n\n return \"attach\";\n}\n\nfunction canConnectToAnnotation(source, target, connection) {\n // do not allow an activity connect to an annotation\n if (isActivity(connection) && isAnnotation(target)) {\n return false;\n }\n\n // do not allow an annotation connection between two annotations\n if (\n isConnection(connection) &&\n isAnnotation(source) &&\n isAnnotation(target)\n ) {\n return false;\n }\n\n // do not allow an annotation connection between an actor or workObject and anything except an annotation\n return !(\n isConnection(connection) &&\n !isAnnotation(target) &&\n (isActor(source) || isWorkObject(source))\n );\n}\n\n/**\n * specific rules for custom elements\n */\nexport default function DomainStoryRules(eventBus) {\n RuleProvider.call(this, eventBus);\n}\n\ninherits(DomainStoryRules, RuleProvider);\n\nDomainStoryRules.$inject = [\"eventBus\"];\n\nDomainStoryRules.prototype.init = function () {\n /**\n * can shape be created on target container?\n */\n function canCreate(shape, target) {\n // only judge about custom elements\n if (!isDomainStory(shape)) {\n return;\n }\n\n // allow creation just on groups\n return !isDomainStory(target) || isDomainStoryGroup(target);\n }\n\n this.addRule(\"elements.create\", function (context) {\n const elements = context.elements,\n position = context.position,\n target = context.target;\n\n return every(elements, function (element) {\n if (isConnection(element)) {\n return canConnect(element.source, element.target, element);\n }\n\n if (element.host) {\n return canAttach(element, element.host, null, position);\n }\n\n return canCreate(element, target, null, position);\n });\n });\n\n this.addRule(\"elements.move\", HIGH_PRIORITY, function (context) {\n let target = context.target,\n shapes = context.shapes;\n\n let type;\n\n // do not allow mixed movements of custom / BPMN shapes\n // if any shape cannot be moved, the group cannot be moved, too\n\n // reject, if we have at least one\n // custom element that cannot be moved\n return reduce(\n shapes,\n function (result, s) {\n if (type === undefined) {\n type = isDomainStory(s);\n }\n\n if (type !== isDomainStory(s) || result === false) {\n return false;\n }\n\n return canCreate(s, target);\n },\n undefined,\n );\n });\n\n this.addRule(\"shape.create\", HIGH_PRIORITY, function (context) {\n let target = context.target,\n shape = context.shape;\n\n return canCreate(shape, target);\n });\n\n this.addRule(\"connection.create\", HIGH_PRIORITY, function (context) {\n let source = context.source,\n target = context.target;\n\n return canConnect(source, target);\n });\n\n this.addRule(\"connection.reconnect\", HIGH_PRIORITY, function (context) {\n let connection = context.connection,\n source = context.hover || context.source,\n target = context.target;\n\n // --------------------------------------------------------------\n let result = canConnectToAnnotation(source, target, connection);\n\n if (!result) {\n return;\n }\n\n // --------------------------------------------------------------\n\n return canConnect(source, target, connection);\n });\n\n this.addRule(\"shape.resize\", function (context) {\n let shape = context.shape,\n newBounds = context.newBounds;\n\n return canResize(shape, newBounds);\n });\n};\n\nDomainStoryRules.prototype.canConnect = canConnect;\nDomainStoryRules.prototype.canAttach = canAttach;\nDomainStoryRules.prototype.isDomainStory = isDomainStory;\nDomainStoryRules.prototype.canResize = canResize;\n","\"use strict\";\n\nimport inherits from \"inherits\";\n\nimport { pick, assign } from \"min-dash\";\n\nimport CommandInterceptor from \"diagram-js/lib/command/CommandInterceptor\";\n\nimport {\n add as collectionAdd,\n remove as collectionRemove,\n} from \"diagram-js/lib/util/Collections\";\n\nimport { reworkGroupElements } from \"./util\";\nimport { elementTypes } from \"../../Domain/Common/elementTypes\";\n\n/**\n * a handler responsible for updating the custom element's businessObject\n * once changes on the diagram happen.\n */\nexport default function DomainStoryUpdater(eventBus, bpmnjs) {\n CommandInterceptor.call(this, eventBus);\n\n function updateCustomElement(e) {\n let context = e.context,\n shape = context.shape,\n businessObject = shape.businessObject;\n\n if (!shape || !shape.type.includes(elementTypes.DOMAINSTORY)) {\n return;\n }\n\n let parent = shape.parent;\n let customElements = bpmnjs._customElements;\n\n // make sure element is added / removed from bpmnjs.customElements\n if (!parent) {\n collectionRemove(customElements, businessObject);\n } else {\n collectionAdd(customElements, businessObject);\n }\n\n // save custom element position\n assign(businessObject, pick(shape, [\"x\", \"y\"]));\n\n // save custom element size if resizable\n if (shape.type === elementTypes.GROUP) {\n assign(businessObject, pick(shape, [\"height\", \"width\"]));\n\n // rework the child-parent relations if a group was moved, such that all Objects that are visually in the group are also associated with it\n // since we do not have access to the standard-canvas object here, we cannot use the function correctGroupChildren() from DSLabelUtil\n if (parent != null) {\n reworkGroupElements(parent, shape);\n }\n }\n if (\n shape &&\n shape.parent &&\n \"type\" in shape.parent &&\n shape.parent.type === elementTypes.GROUP\n ) {\n assign(businessObject, {\n parent: shape.parent.id,\n });\n }\n }\n\n function updateCustomConnection(e) {\n let context = e.context,\n connection = context.connection,\n source = connection.source,\n target = connection.target,\n businessObject = connection.businessObject;\n\n if (e.newTarget) {\n target = e.newTarget;\n }\n if (e.newSource) {\n source = e.newSource;\n }\n\n let parent = connection.parent;\n let customElements = bpmnjs._customElements;\n\n // make sure element is added / removed from bpmnjs.customElements\n if (!parent) {\n collectionRemove(customElements, businessObject);\n } else {\n collectionAdd(customElements, businessObject);\n }\n\n // update waypoints\n assign(businessObject, {\n waypoints: copyWaypoints(connection),\n });\n\n if (source) {\n if (!businessObject.source) {\n assign(businessObject, { source: source.id });\n } else {\n businessObject.source = source.id;\n }\n }\n if (target) {\n if (!businessObject.target) {\n assign(businessObject, { target: target.id });\n } else {\n businessObject.target = target.id;\n }\n }\n }\n\n function copyWaypoints(connection) {\n return connection.waypoints.map(function (p) {\n if (p.original) {\n return {\n original: {\n x: p.original.x,\n y: p.original.y,\n },\n x: p.x,\n y: p.y,\n };\n } else {\n return {\n x: p.x,\n y: p.y,\n };\n }\n });\n }\n\n this.executed(\n [\n \"shape.create\",\n \"shape.move\",\n \"shape.delete\",\n \"shape.resize\",\n \"shape.removeGroupWithChildren\",\n ],\n ifDomainStoryElement(updateCustomElement),\n );\n\n this.reverted(\n [\n \"shape.create\",\n \"shape.move\",\n \"shape.delete\",\n \"shape.resize\",\n \"shape.removeGroupWithChildren\",\n ],\n ifDomainStoryElement(updateCustomElement),\n );\n\n this.executed(\n [\n \"connection.create\",\n \"connection.reconnect\",\n \"connection.updateWaypoints\",\n \"connection.delete\",\n \"connection.layout\",\n \"connection.move\",\n ],\n ifDomainStoryElement(updateCustomConnection),\n );\n\n this.reverted(\n [\n \"connection.create\",\n \"connection.reconnect\",\n \"connection.updateWaypoints\",\n \"connection.delete\",\n \"connection.layout\",\n \"connection.move\",\n ],\n ifDomainStoryElement(updateCustomConnection),\n );\n}\n\n// check if element in the context of an event is a domainStory element\nfunction ifDomainStoryElement(fn) {\n return (event) => {\n const context = event.context;\n const element = context.shape || context.connection;\n\n if (isDomainStory(element)) {\n fn(event);\n }\n };\n}\n\nfunction isDomainStory(element) {\n return element && /domainStory:/.test(element.type);\n}\n\ninherits(DomainStoryUpdater, CommandInterceptor);\n\nDomainStoryUpdater.$inject = [\"eventBus\", \"bpmnjs\"];\n","\"use strict\";\n\nimport DomainStoryElementFactory from \"./domainStoryElementFactory\";\nimport DomainStoryRenderer from \"./domainStoryRenderer\";\nimport DomainStoryPalette from \"./palette/domainStoryPalette\";\nimport DomainStoryRules from \"./domainStoryRules\";\nimport DomainStoryUpdater from \"./domainStoryUpdater\";\nimport ElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\nimport CreateModule from \"diagram-js/lib/features/create\";\nimport PathMap from \"bpmn-js/lib/draw/PathMap\";\nimport PopupMenuModule from \"bpmn-js/lib/features/popup-menu\";\nimport ContextPadModule from \"diagram-js/lib/features/context-pad\";\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"./updateHandler/updateLabelHandler\";\nimport headlineAndDescriptionUpdateHandler from \"./updateHandler/headlineAndDescriptionUpdateHandler\";\nimport DomainStoryContextPadProvider from \"./context-pad/domainStoryContextPadProvider\";\nimport ReplaceMenuProvider from \"./change-icon/replaceMenuProvider\";\nimport DSModeling from \"./modeling/dSModeling\";\n\nexport default {\n __depends__: [CreateModule, ContextPadModule, PopupMenuModule],\n __init__: [\n \"domainStoryRenderer\",\n \"paletteProvider\",\n \"domainStoryRules\",\n \"domainStoryUpdater\",\n \"contextPadProvider\",\n \"replaceMenuProvider\",\n ],\n elementFactory: [\"type\", DomainStoryElementFactory],\n domainStoryRenderer: [\"type\", DomainStoryRenderer],\n paletteProvider: [\"type\", DomainStoryPalette],\n domainStoryRules: [\"type\", DomainStoryRules],\n domainStoryUpdater: [\"type\", DomainStoryUpdater],\n contextPadProvider: [\"type\", DomainStoryContextPadProvider],\n elementFactoryBpmn: [\"type\", ElementFactory],\n pathMap: [\"type\", PathMap],\n replaceMenuProvider: [\"type\", ReplaceMenuProvider],\n commandStack: [\"type\", CommandStack],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n headlineAndDescriptionUpdateHandler: [\n \"type\",\n headlineAndDescriptionUpdateHandler,\n ],\n modeling: [\"type\", DSModeling],\n};\n","\"use strict\";\n\nimport {\n append as svgAppend,\n attr as svgAttr,\n create as svgCreate,\n remove as svgRemove,\n} from \"tiny-svg\";\n\nimport { translate } from \"diagram-js/lib/util/SvgTransformUtil\";\nimport { elementTypes } from \"../../../Domain/Common/elementTypes\";\nimport { is } from \"../util\";\n\nconst MARKER_HIDDEN = \"djs-element-hidden\",\n MARKER_LABEL_HIDDEN = \"djs-label-hidden\";\n\nlet annotationBoxHeight = 0;\n\nexport function getAnnotationBoxHeight() {\n return annotationBoxHeight;\n}\n\nexport default function DSLabelEditingPreview(eventBus, canvas, pathMap) {\n let self = this;\n\n let defaultLayer = canvas.getDefaultLayer();\n let element, absoluteElementBBox, gfx;\n\n eventBus.on(\"directEditing.activate\", function (context) {\n let activeProvider = context.active;\n\n element = activeProvider.element.label || activeProvider.element;\n\n // text annotation\n if (is(element, elementTypes.TEXTANNOTATION)) {\n absoluteElementBBox = canvas.getAbsoluteBBox(element);\n\n gfx = svgCreate(\"g\");\n\n annotationBoxHeight = element.height;\n\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n let path = (self.path = svgCreate(\"path\"));\n\n svgAttr(path, {\n d: textPathData,\n strokeWidth: 2,\n stroke: getStrokeColor(element),\n });\n\n svgAppend(gfx, path);\n\n svgAppend(defaultLayer, gfx);\n\n translate(gfx, element.x, element.y);\n }\n\n if (is(element, elementTypes.TEXTANNOTATION) || element.labelTarget) {\n canvas.addMarker(element, MARKER_HIDDEN);\n } else if (\n element.type.includes(elementTypes.ACTOR) ||\n element.type.includes(elementTypes.WORKOBJECT) ||\n element.type.includes(elementTypes.ACTIVITY) ||\n element.type.includes(elementTypes.GROUP)\n ) {\n canvas.addMarker(element, MARKER_LABEL_HIDDEN);\n }\n });\n\n eventBus.on(\"directEditing.resize\", function (context) {\n // text annotation\n if (is(element, elementTypes.TEXTANNOTATION)) {\n let height = context.height,\n dy = context.dy;\n\n let newElementHeight = Math.max(\n (element.height / absoluteElementBBox.height) * (height + dy),\n 0,\n );\n annotationBoxHeight = newElementHeight;\n\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: newElementHeight,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n svgAttr(self.path, {\n d: textPathData,\n });\n }\n });\n\n eventBus.on(\n [\"directEditing.complete\", \"directEditing.cancel\"],\n function (context) {\n let activeProvider = context.active;\n\n if (activeProvider) {\n canvas.removeMarker(\n activeProvider.element.label || activeProvider.element,\n MARKER_HIDDEN,\n );\n canvas.removeMarker(element, MARKER_LABEL_HIDDEN);\n }\n\n element = undefined;\n absoluteElementBBox = undefined;\n\n if (gfx) {\n svgRemove(gfx);\n\n gfx = undefined;\n }\n },\n );\n}\n\nDSLabelEditingPreview.$inject = [\"eventBus\", \"canvas\", \"pathMap\"];\n\n// helpers ///////////////////\n\nfunction getStrokeColor() {\n return \"black\";\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\nimport { autocomplete, getLabel } from \"./dsLabelUtil\";\n\nimport { isAny } from \"bpmn-js/lib/features/modeling/util/ModelingUtil\";\n\nimport {\n getExternalLabelMid,\n hasExternalLabel,\n isLabel,\n isLabelExternal,\n} from \"bpmn-js/lib/util/LabelUtil\";\n\nimport { elementTypes } from \"../../../Domain/Common/elementTypes\";\nimport { is } from \"../util\";\n\nlet dictionaryService;\n\nlet numberStash = 0;\nlet stashUse = false;\n\nexport function initializeLabelEditingProvider(labelingDictionary) {\n dictionaryService = labelingDictionary;\n}\n\nexport function getNumberStash() {\n let number = { use: stashUse, number: numberStash };\n stashUse = false;\n return number;\n}\n\nexport function toggleStashUse(use) {\n stashUse = use;\n}\n\nexport function focusElement(element) {\n // Opening a Angular Dialog seems to mess with the focus logic somehow.\n // My guess is that is makes the mousedown event passive, which prevents \"preventDefault\" from intercepting.\n // I am not sure how to fix it, but this seems to be a workaround.\n setTimeout(() => element.focus(), 0);\n}\n\nexport default function DSLabelEditingProvider(\n eventBus,\n canvas,\n directEditing,\n modeling,\n resizeHandles,\n textRenderer,\n updateLabelHandler,\n) {\n this._canvas = canvas;\n this._modeling = modeling;\n this._textRenderer = textRenderer;\n this._updateLabelHandler = updateLabelHandler;\n\n directEditing.registerProvider(this);\n\n // listen to dblclick on non-root elements\n eventBus.on(\"element.dblclick\", function (event) {\n activateDirectEdit(event.element, true);\n if (is(event.element, elementTypes.ACTIVITY)) {\n // if we edit an activity, we do not want the standard editing box\n numberStash = event.element.businessObject.number;\n stashUse = true;\n directEditing.complete();\n }\n });\n\n // complete on followup canvas operation\n eventBus.on(\n [\n \"element.mousedown\",\n \"drag.init\",\n \"canvas.viewbox.changing\",\n \"autoPlace\",\n \"popupMenu.open\",\n ],\n function () {\n if (directEditing.isActive()) {\n directEditing.complete();\n }\n },\n );\n\n // cancel on command stack changes\n eventBus.on([\"commandStack.changed\"], function () {\n if (directEditing.isActive()) {\n directEditing.cancel();\n }\n });\n\n eventBus.on(\"directEditing.activate\", function (event) {\n resizeHandles.removeResizers();\n let element = event.active.element;\n createAutocomplete(element);\n });\n\n eventBus.on(\"create.end\", 500, function (event) {\n let element = event.shape,\n canExecute = event.context.canExecute,\n isTouch = event.isTouch;\n\n if (isTouch) {\n return;\n }\n\n if (!canExecute) {\n return;\n }\n if (!is(element, elementTypes.ACTIVITY)) {\n activateDirectEdit(element);\n }\n let editingBox = document.getElementsByClassName(\n \"djs-direct-editing-content\",\n );\n focusElement(editingBox.item(0));\n });\n\n eventBus.on(\"autoPlace.end\", 500, function (event) {\n activateDirectEdit(event.shape);\n });\n\n function activateDirectEdit(element, force) {\n if (\n force ||\n isAny(element, [elementTypes.TEXTANNOTATION]) ||\n element.businessObject.type.includes(elementTypes.DOMAINSTORY)\n ) {\n directEditing.activate(element);\n }\n }\n\n function createAutocomplete(element) {\n let editingBox = document.getElementsByClassName(\n \"djs-direct-editing-content\",\n );\n focusElement(editingBox.item(0));\n autocomplete(\n editingBox[0],\n dictionaryService.getUniqueWorkObjectNames(),\n element,\n eventBus,\n );\n }\n}\n\nDSLabelEditingProvider.$inject = [\n \"eventBus\",\n \"canvas\",\n \"directEditing\",\n \"modeling\",\n \"resizeHandles\",\n \"textRenderer\",\n \"updateLabelHandler\",\n];\n\n/**\n * activate direct editing for activities and text annotations.\n *\n * @param {djs.model.Base} element\n *\n * @return {Object} an object with properties bounds (position and size), text and options\n */\nDSLabelEditingProvider.prototype.activate = function (element) {\n // text\n if (element.id === \"__implicitrootbase\") {\n return;\n }\n let text = getLabel(element);\n\n if (text === undefined) {\n return;\n }\n\n let context = {\n text: text,\n };\n\n // bounds\n let bounds = this.getEditingBBox(element);\n\n assign(context, bounds);\n\n let options = {};\n\n // external labels\n if (isLabelExternal(element)) {\n assign(options, {\n autoResize: true,\n });\n }\n\n // text annotations\n if (is(element, elementTypes.TEXTANNOTATION)) {\n assign(options, {\n resizable: true,\n autoResize: true,\n });\n }\n\n assign(context, {\n options: options,\n });\n\n return context;\n};\n\n/**\n * get the editing bounding box based on the element's size and position\n *\n * @param {djs.model.Base} element\n *\n * @return {Object} an object containing information about position\n * and size (fixed or minimum and/or maximum)\n */\nDSLabelEditingProvider.prototype.getEditingBBox = function (element) {\n let canvas = this._canvas;\n\n let target = element.label || element;\n\n let bbox = canvas.getAbsoluteBBox(target);\n\n let mid = {\n x: bbox.x + bbox.width / 2,\n y: bbox.y + bbox.height / 2,\n };\n\n // default position\n let bounds = { x: bbox.x, y: bbox.y };\n\n /** The cavnas is an Object from BPMN, the IDE might say, that zoom is deprecated,\n * because it thinks canvas is the standard HTMLElement. -> Needs to stay toom **/\n let zoom = canvas.zoom();\n let defaultStyle = this._textRenderer.getDefaultStyle(),\n externalStyle = this._textRenderer.getExternalStyle();\n\n // take zoom into account\n let externalFontSize = externalStyle.fontSize * zoom,\n externalLineHeight = externalStyle.lineHeight,\n defaultFontSize = defaultStyle.fontSize * zoom,\n defaultLineHeight = defaultStyle.lineHeight;\n\n let style = {\n fontFamily: this._textRenderer.getDefaultStyle().fontFamily,\n fontWeight: this._textRenderer.getDefaultStyle().fontWeight,\n };\n\n // adjust for groups\n if (is(element, elementTypes.GROUP)) {\n assign(bounds, {\n minWidth: bbox.width / 2.5 > 125 ? bbox.width / 2.5 : 125,\n maxWidth: bbox.width,\n minHeight: 30 * zoom,\n x: bbox.x,\n y: bbox.y,\n });\n\n assign(style, {\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n textAlign: \"left\",\n });\n }\n\n // internal labels for tasks and collapsed call activities,\n // sub processes and participants\n if (\n /^domainStory:actor\\w*/.test(element.type) ||\n /^domainStory:workObject\\w*/.test(element.type)\n ) {\n assign(bounds, {\n width: bbox.width,\n minHeight: 30,\n y: bbox.y + bbox.height - 20,\n x: bbox.x,\n });\n\n assign(style, {\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n });\n }\n\n let width = 90 * zoom,\n paddingTop = 7 * zoom,\n paddingBottom = 4 * zoom;\n\n // external labels for events, data elements, gateways and connections\n if (target.labelTarget) {\n assign(bounds, {\n width: width,\n height: bbox.height + paddingTop + paddingBottom,\n x: mid.x - width / 2,\n y: bbox.y - paddingTop,\n });\n\n assign(style, {\n fontSize: externalFontSize + \"px\",\n lineHeight: externalLineHeight,\n paddingTop: paddingTop + \"px\",\n paddingBottom: paddingBottom + \"px\",\n });\n }\n\n // external label not yet created\n if (\n isLabelExternal(target) &&\n !hasExternalLabel(target) &&\n !isLabel(target)\n ) {\n let externalLabelMid = getExternalLabelMid(element);\n\n let absoluteBBox = canvas.getAbsoluteBBox({\n x: externalLabelMid.x,\n y: externalLabelMid.y,\n width: 0,\n height: 0,\n });\n\n let height = externalFontSize + paddingTop + paddingBottom;\n\n assign(bounds, {\n width: width,\n height: height,\n x: absoluteBBox.x - width / 2,\n y: absoluteBBox.y - height / 2,\n });\n\n assign(style, {\n fontSize: externalFontSize + \"px\",\n lineHeight: externalLineHeight,\n paddingTop: paddingTop + \"px\",\n paddingBottom: paddingBottom + \"px\",\n });\n }\n\n // text annotations\n if (is(element, elementTypes.TEXTANNOTATION)) {\n assign(bounds, {\n width: bbox.width,\n height: bbox.height,\n minWidth: 30 * zoom,\n minHeight: 10 * zoom,\n });\n\n assign(style, {\n textAlign: \"left\",\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n });\n }\n\n return { bounds: bounds, style: style };\n};\n\nDSLabelEditingProvider.prototype.update = function (\n element,\n newLabel,\n activeContextText,\n bounds,\n) {\n let newBounds, bbox;\n\n if (is(element, elementTypes.TEXTANNOTATION)) {\n bbox = this._canvas.getAbsoluteBBox(element);\n\n newBounds = {\n x: element.x,\n y: element.y,\n width: (element.width / bbox.width) * bounds.width,\n height: (element.height / bbox.height) * bounds.height,\n };\n }\n\n this._modeling.updateLabel(element, newLabel, newBounds);\n};\n","\"use strict\";\n\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { is } from \"../util\";\n\nfunction getLabelAttr(semantic) {\n if (\n semantic.type.includes(elementTypes.ACTOR) ||\n semantic.type.includes(elementTypes.WORKOBJECT) ||\n semantic.type.includes(elementTypes.ACTIVITY) ||\n semantic.type.includes(elementTypes.GROUP)\n ) {\n return \"name\";\n }\n\n if (is(semantic, elementTypes.TEXTANNOTATION)) {\n return \"text\";\n }\n}\n\nfunction getNumberAttr(semantic) {\n if (is(semantic, elementTypes.ACTIVITY)) {\n return \"number\";\n }\n}\n\nexport function getLabel(element) {\n let semantic;\n if (element.businessObject) {\n semantic = element.businessObject;\n } else {\n semantic = element;\n }\n let attr = getLabelAttr(semantic);\n if (attr && semantic) {\n return semantic[attr] || \"\";\n }\n}\n\nexport function getNumber(element) {\n let semantic = element.businessObject,\n attr = getNumberAttr(semantic);\n\n if (attr) {\n return semantic[attr] || \"\";\n }\n}\n\nexport function setLabel(element, text) {\n let semantic;\n if (element.businessObject) {\n semantic = element.businessObject;\n } else {\n semantic = element;\n }\n let attr = getLabelAttr(semantic);\n\n if (attr) {\n semantic[attr] = text;\n }\n return element;\n}\n\nexport function setNumber(element, textNumber) {\n let semantic = element.businessObject,\n attr = getNumberAttr(semantic);\n\n if (attr) {\n semantic[attr] = textNumber;\n }\n\n return element;\n}\n\n// select at which part of the activity the label should be attached to\nexport function selectPartOfActivity(waypoints, angleActivity) {\n let selectedActivity = 0;\n let linelength = 49;\n\n for (let i = 0; i < waypoints.length; i++) {\n if (angleActivity[i] === 0 || angleActivity[i] === 180) {\n let length = Math.abs(waypoints[i].x - waypoints[i + 1].x);\n if (length > linelength) {\n selectedActivity = i;\n }\n }\n }\n return selectedActivity;\n}\n\n// approximate the width of the label text, standard fontsize: 11\nexport function calculateTextWidth(text) {\n if (!text) {\n return 0;\n }\n\n let fontsize = text.length * 5.1;\n fontsize = fontsize / 2;\n\n // add an initial offset to the absolute middle of the activity\n fontsize += 20;\n return fontsize;\n}\n\n/**\n * copied from https://www.w3schools.com/howto/howto_js_autocomplete.asp on 18.09.2018\n */\nexport function autocomplete(input, workObjectNames, element, eventBus) {\n closeAllLists();\n\n /* the autocomplete function takes three arguments,\n the text field element and an array of possible autocompleted values and an optional element to which it is appended:*/\n let currentFocus, filteredWorkObjectNames;\n\n /* execute a function when someone writes in the text field:*/\n input.addEventListener(\"input\", function () {\n if (workObjectNames.length === 0) {\n return;\n }\n\n /* the direct editing field of actors and workobjects is a recycled html-element and has old values that need to be overridden*/\n if (element.type.includes(elementTypes.WORKOBJECT)) {\n this.value = this.innerHTML;\n }\n let autocompleteList,\n autocompleteItem,\n val = this.value;\n\n /* close any already open lists of autocompleted values*/\n closeAllLists();\n currentFocus = -1;\n\n /* create a DIV element that will contain the items (values):*/\n autocompleteList = document.createElement(\"DIV\");\n autocompleteList.setAttribute(\"id\", \"autocomplete-list\");\n autocompleteList.setAttribute(\"class\", \"autocomplete-items\");\n\n /* append the DIV element as a child of the autocomplete container:*/\n this.parentNode.appendChild(autocompleteList);\n\n /* for each item in the array...*/\n filteredWorkObjectNames = [];\n for (const name of workObjectNames) {\n /* check if the item starts with the same letters as the text field value:*/\n if (val) {\n if (name.substring(0, val.length).toUpperCase() === val.toUpperCase()) {\n /* create a DIV element for each matching element:*/\n autocompleteItem = document.createElement(\"DIV\");\n\n /* make the matching letters bold:*/\n autocompleteItem.innerHTML =\n \"\" +\n name.substring(0, val.length) +\n \"\" +\n name.substring(val.length);\n\n /* insert an input field that will hold the current name:*/\n autocompleteItem.innerHTML +=\n \"\";\n autocompleteList.appendChild(autocompleteItem);\n\n filteredWorkObjectNames.push(name);\n }\n }\n }\n\n // if we edit an actor, we do not want auto-complete, since actors generally are unique\n if (element.type.includes(elementTypes.ACTOR)) {\n autocompleteList.style.visibility = \"hidden\";\n }\n });\n\n /* execute a function presses a key on the keyboard:*/\n input.onkeydown = function (e) {\n let autocompleteList = document.getElementById(\"autocomplete-list\");\n if (autocompleteList) {\n autocompleteList = autocompleteList.getElementsByTagName(\"div\");\n }\n if (e.keyCode === 40) {\n /* If the arrow DOWN key is pressed,\n increase the currentFocus letiable:*/\n currentFocus++;\n\n /* and and make the current item more visible:*/\n addActive(autocompleteList);\n } else if (e.keyCode === 38) {\n // up\n /* If the arrow UP key is pressed,\n decrease the currentFocus letiable:*/\n currentFocus--;\n\n /* and and make the current item more visible:*/\n addActive(autocompleteList);\n } else if (e.keyCode === 13) {\n e.preventDefault();\n /* If the ENTER key is pressed, prevent the form from being submitted,*/\n if (currentFocus > -1) {\n element.businessObject.name = filteredWorkObjectNames[currentFocus];\n eventBus.fire(\"element.changed\", { element });\n }\n }\n };\n\n function addActive(autocompleteList) {\n /* a function to classify an item as \"active\":*/\n if (!autocompleteList || autocompleteList.length < 1) return false;\n\n /* start by removing the \"active\" class on all items:*/\n removeActive(autocompleteList);\n if (currentFocus >= autocompleteList.length) currentFocus = 0;\n if (currentFocus < 0) currentFocus = autocompleteList.length - 1;\n\n /* add class \"autocomplete-active\":*/\n autocompleteList[currentFocus].classList.add(\"autocomplete-active\");\n }\n\n function removeActive(autocompleteList) {\n /* a function to remove the \"active\" class from all autocomplete items:*/\n if (autocompleteList.length > 1) {\n for (const item of autocompleteList) {\n item.classList.remove(\"autocomplete-active\");\n }\n }\n }\n\n function closeAllLists(survivor) {\n /* close all autocomplete lists in the document,\n except the one passed as an argument:*/\n let autocompleteList =\n document.getElementsByClassName(\"autocomplete-items\");\n for (const item of autocompleteList) {\n if (survivor != item && survivor != input) {\n item.parentNode.removeChild(item);\n }\n }\n }\n\n /* execute a function when someone clicks in the document:*/\n document.addEventListener(\"click\", function (e) {\n closeAllLists(e.target);\n });\n}\n","\"use strict\";\n\nimport ChangeSupportModule from \"diagram-js/lib/features/change-support\";\nimport ResizeModule from \"diagram-js/lib/features/resize\";\nimport DirectEditingModule from \"diagram-js-direct-editing\";\n\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"../updateHandler/updateLabelHandler\";\nimport DSLabelEditingPreview from \"./dsLabelEditingPreview\";\nimport DSLabelEditingProvider from \"./dsLabelEditingProvider\";\nimport DSModeling from \"../modeling/dSModeling\";\n\nexport default {\n __depends__: [ChangeSupportModule, ResizeModule, DirectEditingModule],\n __init__: [\"dSlabelEditingProvider\", \"dSlabelEditingPreview\"],\n dSlabelEditingProvider: [\"type\", DSLabelEditingProvider],\n dSlabelEditingPreview: [\"type\", DSLabelEditingPreview],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n commandStack: [\"type\", CommandStack],\n modeling: [\"type \", DSModeling],\n};\n","\"use strict\";\n\nimport { selectPartOfActivity } from \"./dsLabelUtil\";\nimport { angleBetween } from \"../../../Utils/mathExtensions\";\n\nexport function countLines(str) {\n return str.split(/\\r\\n|\\r|\\n/).length;\n}\n\n// determine the position of the label at the activity\nexport function labelPosition(waypoints, lines = 1) {\n let amountWaypoints = waypoints.length;\n let determinedPosition;\n let xPos;\n let yPos;\n\n if (amountWaypoints > 2) {\n let angleActivity = new Array(amountWaypoints - 1);\n for (let i = 0; i < amountWaypoints - 1; i++) {\n // calculate the angles of the activities\n angleActivity[i] = angleBetween(waypoints[i], waypoints[i + 1]);\n }\n\n let selectedActivity = selectPartOfActivity(waypoints, angleActivity);\n\n xPos = labelPositionX(\n waypoints[selectedActivity],\n waypoints[selectedActivity + 1],\n );\n yPos = labelPositionY(\n waypoints[selectedActivity],\n waypoints[selectedActivity + 1],\n lines,\n );\n\n determinedPosition = {\n x: xPos,\n y: yPos,\n selected: selectedActivity,\n };\n\n return determinedPosition;\n } else {\n xPos = labelPositionX(waypoints[0], waypoints[1]);\n yPos = labelPositionY(waypoints[0], waypoints[1], lines);\n\n determinedPosition = {\n x: xPos,\n y: yPos,\n selected: 0,\n };\n\n return determinedPosition;\n }\n}\n\n// calculate the X position of the label\nexport function labelPositionX(startPoint, endPoint) {\n let angle = angleBetween(startPoint, endPoint);\n let offsetX = 0;\n let scaledAngle = 0;\n if (angle === 0 || angle === 180 || angle === 90 || angle === 270) {\n offsetX = 0;\n } else if (angle > 0 && angle < 90) {\n // endpoint in upper right quadrant\n offsetX = 5 - angle / 6;\n } else if (angle > 90 && angle < 180) {\n // endpoint in upper left quadrant\n scaledAngle = angle - 90;\n offsetX = 5 - scaledAngle / 18;\n } else if (angle > 180 && angle < 270) {\n // endpoint in lower left quadrant\n scaledAngle = angle - 180;\n offsetX = scaledAngle / 18;\n } else if (angle > 270) {\n // endpoint in lower right quadrant\n scaledAngle = angle - 270;\n offsetX = 5 - scaledAngle / 6;\n }\n return offsetX + (startPoint.x + endPoint.x) / 2;\n}\n\n// calculate the Y position of the label\nexport function labelPositionY(startPoint, endPoint, lines = 1) {\n let angle = angleBetween(startPoint, endPoint);\n let offsetY = 0;\n let scaledAngle = 0;\n\n if (angle === 0 || angle === 180) {\n offsetY = 15;\n } else if (angle === 90 || angle === 270) {\n offsetY = 0;\n } else if (angle > 0 && angle < 90) {\n // endpoint in upper right quadrant\n offsetY = 15 - angle / 6;\n } else if (angle > 90 && angle < 180) {\n // endpoint in upper left quadrant\n scaledAngle = angle - 90;\n offsetY = (-scaledAngle / 9) * lines;\n } else if (angle > 180 && angle < 270) {\n // endpoint in lower left quadrant\n scaledAngle = angle - 180;\n offsetY = 15 - scaledAngle / 3;\n } else if (angle > 270) {\n // endpoint in lower right quadrant\n scaledAngle = angle - 270;\n offsetY = (-scaledAngle / 9) * lines;\n }\n return offsetY + (startPoint.y + endPoint.y) / 2;\n}\n","\"use strict\";\n\nimport Modeling from \"bpmn-js/lib/features/modeling/Modeling\";\n\nimport { inherits } from \"util\";\n\nexport default function DSModeling(\n eventBus,\n elementFactory,\n commandStack,\n domainStoryRules,\n) {\n Modeling.call(this, eventBus, elementFactory, commandStack, domainStoryRules);\n}\n\nModeling.prototype.updateLabel = function (element, newLabel, newBounds) {\n if (\n element.businessObject\n ? newLabel !== element.businessObject.name\n : newLabel !== element.name\n ) {\n if (/^domainStory:/.test(element.type)) {\n this._commandStack.execute(\"element.updateCustomLabel\", {\n element: element,\n newLabel: newLabel,\n newBounds: newBounds,\n });\n } else {\n this._commandStack.execute(\"element.updateLabel\", {\n element: element,\n newLabel: newLabel,\n newBounds: newBounds,\n });\n }\n }\n};\n\nModeling.prototype.updateNumber = function (element, newNumber, newBounds) {\n if (\n element.businessObject\n ? newNumber !== element.businessObject.number\n : newNumber !== element.number\n ) {\n if (/^domainStory:/.test(element.type)) {\n this._commandStack.execute(\"element.updateCustomLabel\", {\n element: element,\n newNumber: newNumber,\n newBounds: newBounds,\n });\n } else {\n this._commandStack.execute(\"element.updateLabel\", {\n element: element,\n newNumber: newNumber,\n newBounds: newBounds,\n });\n }\n }\n};\n\nModeling.prototype.replaceShape = function (oldShape, newShape, hints) {\n let context = {\n oldShape: oldShape,\n newData: newShape,\n hints: hints || {},\n };\n\n this._commandStack.execute(\"shape.replace\", context);\n return context.newShape;\n};\n\nModeling.prototype.removeGroup = function (element) {\n this._commandStack.execute(\"shape.removeGroupWithoutChildren\", {\n element: element,\n });\n this.removeElements({ element });\n};\n\ninherits(DSModeling, Modeling);\n\nDSModeling.$inject = [\n \"eventBus\",\n \"elementFactory\",\n \"commandStack\",\n \"domainStoryRules\",\n];\n","\"use strict\";\n\nimport DomainStoryPalette from \"../palette/domainStoryPalette\";\nimport ElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\nimport CreateModule from \"diagram-js/lib/features/create\";\nimport PathMap from \"bpmn-js/lib/draw/PathMap\";\nimport PopupMenuModule from \"bpmn-js/lib/features/popup-menu\";\nimport ContextPadModule from \"diagram-js/lib/features/context-pad\";\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"../updateHandler/updateLabelHandler\";\nimport DomainStoryUpdater from \"../domainStoryUpdater\";\nimport DomainStoryElementFactory from \"../domainStoryElementFactory\";\nimport headlineAndDescriptionUpdateHandler from \"../updateHandler/headlineAndDescriptionUpdateHandler\";\nimport DomainStoryRenderer from \"../domainStoryRenderer\";\nimport DSModeling from \"./dSModeling\";\nimport DomainStoryRules from \"../domainStoryRules\";\nimport ReplaceMenuProvider from \"../change-icon/replaceMenuProvider\";\nimport DomainStoryContextPadProvider from \"../context-pad/domainStoryContextPadProvider\";\n\nexport default {\n __depends__: [CreateModule, ContextPadModule, PopupMenuModule],\n __init__: [\n \"domainStoryRenderer\",\n \"paletteProvider\",\n \"domainStoryRules\",\n \"domainStoryUpdater\",\n \"contextPadProvider\",\n \"replaceMenuProvider\",\n ],\n elementFactory: [\"type\", DomainStoryElementFactory],\n domainStoryRenderer: [\"type\", DomainStoryRenderer],\n paletteProvider: [\"type\", DomainStoryPalette],\n domainStoryRules: [\"type\", DomainStoryRules],\n domainStoryUpdater: [\"type\", DomainStoryUpdater],\n contextPadProvider: [\"type\", DomainStoryContextPadProvider],\n elementFactoryBpmn: [\"type\", ElementFactory],\n pathMap: [\"type\", PathMap],\n replaceMenuProvider: [\"type\", ReplaceMenuProvider],\n commandStack: [\"type\", CommandStack],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n headlineAndDescriptionUpdateHandler: [\n \"type\",\n headlineAndDescriptionUpdateHandler,\n ],\n modeling: [\"type\", DSModeling],\n};\n","\"use strict\";\n\nimport { labelPosition } from \"../labeling/position\";\nimport { angleBetween } from \"../../../Utils/mathExtensions\";\n\nlet numberRegistry = [];\nlet multipleNumberRegistry = [false];\n\nlet canvasElementRegistry;\n\nexport function initializeNumbering(canvasElementRegistryService) {\n canvasElementRegistry = canvasElementRegistryService;\n}\n\n// defines the box for activity numbers\nexport function numberBoxDefinitions(element) {\n let alignment = \"center\";\n let boxWidth = 30;\n let boxHeight = 30;\n let position = labelPosition(element.waypoints);\n let angle = 0;\n if (element.waypoints.length > 1) {\n angle = angleBetween(\n element.waypoints[element.waypoints.length - 2],\n element.waypoints[element.waypoints.length - 1],\n );\n }\n let x = position.x;\n let y = position.y;\n\n // TODO: Use trigonometric functions to make the positioning more consistent.\n // This would require to touch the label code as well.\n if (angle >= 0 && angle <= 45) {\n y = y - 30 + angle / 2;\n x = x - 25 - angle / 2;\n } else if (angle <= 90) {\n y = y - 10 + (angle - 45) / 4.5;\n x = x - 35 - angle / 9;\n } else if (angle <= 145) {\n y = y + angle / 7.25;\n x = x - 45 - angle / 14.5;\n } else if (angle < 180) {\n y = y + 20 + angle / 9;\n x = x - 50 + angle / 4.5;\n } else if (angle <= 225) {\n y = y - 45 + angle / 12.25;\n x = x + 10 - angle / 6.125;\n } else if (angle <= 270) {\n y = y - 80 + angle / 3.375;\n x = x - 5 - angle / 6.125;\n } else if (angle <= 315) {\n y = y - 135 + angle / 2;\n x = x - 50;\n } else {\n y = y + 22.5 + (angle - 315) / 6;\n x = x - 50 + (angle - 315) / 1.8;\n }\n\n return {\n textAlign: alignment,\n width: boxWidth,\n height: boxHeight,\n x: x,\n y: y,\n };\n}\n\n// determine the next available number that is not yet used\nexport function generateAutomaticNumber(elementActivity, commandStack) {\n const semantic = elementActivity.businessObject;\n const usedNumbers = [0];\n let wantedNumber = -1;\n\n const activitiesFromActors = canvasElementRegistry.getActivitiesFromActors();\n\n activitiesFromActors.forEach((element) => {\n if (element.businessObject.number) {\n usedNumbers.push(+element.businessObject.number);\n }\n });\n for (let i = 0; i < usedNumbers.length; i++) {\n if (!usedNumbers.includes(i)) {\n if (!usedNumbers.includes(i)) {\n wantedNumber = i;\n i = usedNumbers.length;\n }\n }\n }\n if (wantedNumber === -1) {\n wantedNumber = usedNumbers.length;\n }\n\n updateExistingNumbersAtGeneration(\n activitiesFromActors,\n wantedNumber,\n commandStack,\n );\n semantic.number = wantedNumber;\n return wantedNumber;\n}\n\n// update the numbers at the activities when generating a new activity\nexport function updateExistingNumbersAtGeneration(\n activitiesFromActors,\n wantedNumber,\n commandStack,\n) {\n activitiesFromActors.forEach((element) => {\n let number = +element.businessObject.number;\n\n if (number >= wantedNumber) {\n wantedNumber++;\n setTimeout(function () {\n commandStack.execute(\"activity.changed\", {\n businessObject: element.businessObject,\n newLabel: element.businessObject.name,\n newNumber: number,\n element: element,\n });\n }, 10);\n }\n });\n}\n\n// update the numbers at the activities when editing an activity\nexport function updateExistingNumbersAtEditing(\n activitiesFromActors,\n wantedNumber,\n eventBus,\n) {\n // get a sorted list of all activities that could need changing\n let sortedActivities = [[]];\n activitiesFromActors.forEach((activity) => {\n if (!sortedActivities[activity.businessObject.number]) {\n sortedActivities[activity.businessObject.number] = [];\n }\n sortedActivities[activity.businessObject.number].push(activity);\n });\n\n // set the number of each activity to the next highest number, starting from the number, we overrode\n let currentNumber = wantedNumber;\n for (\n currentNumber;\n currentNumber < sortedActivities.length;\n currentNumber++\n ) {\n if (sortedActivities[currentNumber]) {\n wantedNumber++;\n setNumberOfActivity(\n sortedActivities[currentNumber],\n wantedNumber,\n eventBus,\n );\n }\n }\n}\n\n// get the IDs of activities with their associated number, only returns activities that are originating from an actor\nexport function getNumbersAndIDs() {\n let iDWithNumber = [];\n let activities = canvasElementRegistry.getActivitiesFromActors();\n\n for (let i = activities.length - 1; i >= 0; i--) {\n let id = activities[i].businessObject.id;\n let number = activities[i].businessObject.number;\n iDWithNumber.push({ id: id, number: number });\n }\n return iDWithNumber;\n}\n\nexport function addNumberToRegistry(renderedNumber, number) {\n numberRegistry[number] = renderedNumber;\n}\n\nexport function setNumberIsMultiple(number, multi) {\n multipleNumberRegistry[number] = multi;\n}\n\n/**\n * @returns copy of registry\n */\nexport function getNumberRegistry() {\n return numberRegistry.slice(0);\n}\n\nexport function getMultipleNumberRegistry() {\n return multipleNumberRegistry.slice(0);\n}\n\nfunction setNumberOfActivity(elementArray, wantedNumber, eventBus) {\n if (elementArray) {\n elementArray.forEach((element) => {\n if (element) {\n let businessObject = element.businessObject;\n if (businessObject) {\n businessObject.number = wantedNumber;\n }\n eventBus.fire(\"element.changed\", { element });\n }\n });\n }\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\nimport { overrideAppendedIcons } from \"src/app/Domain/Domain-Configuration/allIcons\";\nimport { Dictionary } from \"src/app/Domain/Common/dictionary/dictionary\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { APPENDED_ICONS_TAG } from \"../../../Domain/Common/constants\";\n\n/**\n * A palette that allows you to create BPMN _and_ custom elements.\n */\n\nlet iconDictionary;\nlet configuration;\n\nexport function initializePalette(iconDictionaryService, configurationService) {\n iconDictionary = iconDictionaryService;\n configuration = configurationService;\n}\n\nexport default function PaletteProvider(\n palette,\n create,\n elementFactory,\n spaceTool,\n lassoTool,\n) {\n this._create = create;\n this._elementFactory = elementFactory;\n this._spaceTool = spaceTool;\n this._lassoTool = lassoTool;\n\n palette.registerProvider(this);\n}\n\nPaletteProvider.$inject = [\n \"palette\",\n \"create\",\n \"elementFactory\",\n \"spaceTool\",\n \"lassoTool\",\n \"modeling\",\n];\n\nPaletteProvider.prototype.getPaletteEntries = function () {\n let actions = {},\n create = this._create,\n elementFactory = this._elementFactory,\n spaceTool = this._spaceTool,\n lassoTool = this._lassoTool;\n\n function createAction(type, group, className, title, options) {\n function createListener(event) {\n let shape = elementFactory.createShape(assign({ type: type }, options));\n\n assign(shape.businessObject, {\n id: shape.id,\n });\n\n if (options) {\n shape.businessObject.di.isExpanded = options.isExpanded;\n }\n\n create.start(event, shape);\n }\n\n let shortType = type.replace(/^domainStory:/, \"\");\n\n return {\n group: group,\n className: className,\n title: \"Create \" + title || \"Create \" + shortType,\n action: {\n dragstart: createListener,\n click: createListener,\n },\n };\n }\n\n return initPalette(actions, spaceTool, lassoTool, createAction);\n};\n\nfunction appendCSSStyleCheat(customIcons) {\n const sheetEl = document.createElement(\"style\");\n document.head.appendChild(sheetEl);\n\n let customIconDict = new Dictionary();\n\n customIconDict.appendDict(customIcons);\n let customIconDictKeys = customIconDict.keysArray();\n\n customIconDictKeys.forEach((name) => {\n if (iconDictionary.getAppendedIconDictionary().has(name)) {\n let src = customIconDict.get(name);\n\n const iconStyle =\n \".icon-domain-story-\" +\n name.toLowerCase() +\n \"::before{\" +\n \" display: block;\" +\n ' content: url(\"data:image/svg+xml;utf8,' +\n wrapSRCInSVG(src) +\n '\");' +\n \" margin: 3px;}\";\n sheetEl.sheet.insertRule(iconStyle, sheetEl.sheet.cssRules.length);\n }\n });\n}\n\nfunction initPalette(actions, spaceTool, lassoTool, createAction) {\n let config = iconDictionary?.getCurrentIconConfigurationForBPMN();\n\n let customIcons = localStorage.getItem(APPENDED_ICONS_TAG);\n\n if (customIcons) {\n customIcons = JSON.parse(customIcons);\n if (customIconsLegacy(customIcons)) {\n customIcons = convertLegacyAppendedIconsToDict(customIcons);\n }\n if (customIcons.entries && customIcons.entries.forEach) {\n const customIconsDict = new Dictionary();\n customIcons.entries.forEach((entry) => {\n customIconsDict.putEntry(entry);\n });\n overrideAppendedIcons(customIconsDict);\n appendCSSStyleCheat(customIcons);\n }\n }\n\n iconDictionary?.initTypeDictionaries(config.actors, config.workObjects);\n\n let actorTypes = iconDictionary?.getTypeDictionary(elementTypes.ACTOR);\n\n actorTypes?.keysArray().forEach((name) => {\n addCanvasObjectTypes(\n name,\n createAction,\n actions,\n \"actor\",\n elementTypes.ACTOR,\n );\n });\n\n assign(actions, {\n \"actor-separator\": {\n group: \"actor\",\n separator: true,\n },\n });\n\n let workObjectTypes = iconDictionary?.getTypeDictionary(\n elementTypes.WORKOBJECT,\n );\n\n workObjectTypes?.keysArray().forEach((name) => {\n addCanvasObjectTypes(\n name,\n createAction,\n actions,\n \"actor\",\n elementTypes.WORKOBJECT,\n );\n });\n\n assign(actions, {\n \"workObject-separator\": {\n group: \"workObject\",\n separator: true,\n },\n \"domainStory-group\": createAction(\n elementTypes.GROUP,\n \"group\",\n \"icon-domain-story-tool-group\",\n \"group\",\n ),\n \"group-separator\": {\n group: \"group\",\n separator: true,\n },\n \"lasso-tool\": {\n group: \"tools\",\n className: \"bpmn-icon-lasso-tool\",\n title: \"Activate the lasso tool\",\n action: {\n click: function (event) {\n lassoTool.activateSelection(event);\n },\n },\n },\n \"space-tool\": {\n group: \"tools\",\n className: \"bpmn-icon-space-tool\",\n title: \"Activate the create/remove space tool\",\n action: {\n click: function (event) {\n spaceTool.activateSelection(event);\n },\n },\n },\n });\n\n return actions;\n}\n\nfunction addCanvasObjectTypes(\n name,\n createAction,\n actions,\n className,\n elementType,\n) {\n let icon = iconDictionary.getIconForBPMN(elementType, name);\n\n let action = [];\n action[\"domainStory-\" + className + name] = createAction(\n `${elementType}${name}`,\n className,\n icon,\n name,\n );\n assign(actions, action);\n}\n\nfunction customIconsLegacy(customIcons) {\n return !(\n Object.keys(customIcons).length === 1 &&\n Object.keys(customIcons)[0] === \"entries\"\n );\n}\n\nfunction convertLegacyAppendedIconsToDict(customIcons) {\n let dict = new Dictionary();\n Object.keys(customIcons).forEach((key) => {\n dict.set(key, customIcons[key]);\n });\n return dict;\n}\n\n// For some reason its important to use ' in the content for the Palette and ContextPad\n// Do not change!\nfunction wrapSRCInSVG(src) {\n return (\n \"\" +\n \"\"\n );\n}\n","\"use strict\";\n\nimport { getNumbersAndIDs } from \"../numbering/numbering\";\n\n/**\n * commandStack Handler for changes at activities\n */\n\nlet canvasElementRegistry;\nexport function initializeActivityUpdateHandler(canvasElementRegistryService) {\n canvasElementRegistry = canvasElementRegistryService;\n}\n\nexport default function activityUpdateHandler(commandStack, eventBus) {\n commandStack.registerHandler(\n \"activity.directionChange\",\n activity_directionChange,\n );\n commandStack.registerHandler(\"activity.changed\", activity_changed);\n\n // update the activity from the activity-dialog, either with or without number\n // and change other activities too, to keep the numbers consistent\n function activity_changed(modeling) {\n this.preExecute = function (context) {\n context.oldLabel = context.businessObject.name || \" \";\n\n let oldNumbersWithIDs = getNumbersAndIDs();\n modeling.updateLabel(context.businessObject, context.newLabel);\n modeling.updateNumber(context.businessObject, context.newNumber);\n\n context.oldNumber = context.businessObject.number;\n context.oldNumbersWithIDs = oldNumbersWithIDs;\n };\n\n this.execute = function (context) {\n let businessObject = context.businessObject;\n let element = context.element;\n\n if (context.newLabel && context.newLabel.length < 1) {\n context.newLabel = \" \";\n }\n\n businessObject.name = context.newLabel;\n businessObject.number = context.newNumber;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n semantic.name = context.oldLabel;\n semantic.number = context.oldNumber;\n\n revertAutomaticNumberGenerationChange(\n context.oldNumbersWithIDs,\n eventBus,\n );\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n\n // change the direction of a single activity without affecting other activities\n function activity_directionChange(modeling) {\n this.preExecute = function (context) {\n context.oldNumber = context.businessObject.number;\n context.oldWaypoints = context.element.waypoints;\n context.name = context.businessObject.name;\n\n if (!context.oldNumber) {\n context.oldNumber = 0;\n }\n modeling.updateNumber(context.businessObject, context.newNumber);\n };\n\n this.execute = function (context) {\n let businessObject = context.businessObject;\n let element = context.element;\n let swapSource = element.source;\n let newWaypoints = [];\n let waypoints = element.waypoints;\n\n for (let i = waypoints.length - 1; i >= 0; i--) {\n newWaypoints.push(waypoints[i]);\n }\n\n element.source = element.target;\n businessObject.source = businessObject.target;\n element.target = swapSource;\n businessObject.target = swapSource.id;\n\n businessObject.name = context.name;\n businessObject.number = context.newNumber;\n element.waypoints = newWaypoints;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n let swapSource = element.source;\n\n element.source = element.target;\n semantic.source = semantic.target;\n element.target = swapSource;\n semantic.target = swapSource.id;\n\n semantic.name = context.name;\n\n semantic.number = context.oldNumber;\n element.waypoints = context.oldWaypoints;\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n}\n\n// reverts the automatic changed done by the automatic number-generation at editing\nfunction revertAutomaticNumberGenerationChange(iDWithNumber, eventBus) {\n let activities = canvasElementRegistry?.getActivitesFromActors();\n for (let i = activities.length - 1; i >= 0; i--) {\n for (let j = iDWithNumber.length - 1; j >= 0; j--) {\n if (iDWithNumber[j].id.includes(activities[i].businessObject.id)) {\n let element = activities[i];\n element.businessObject.number = iDWithNumber[j].number;\n j = -5;\n eventBus.fire(\"element.changed\", { element });\n iDWithNumber.splice(j, 1);\n }\n }\n }\n}\n","\"use strict\";\n\nimport { undoGroupRework } from \"../util\";\n\nexport default function elementUpdateHandler(commandStack, eventBus) {\n commandStack.registerHandler(\"element.colorChange\", element_colorChange);\n commandStack.registerHandler(\n \"shape.removeGroupWithoutChildren\",\n removeGroupWithoutChildren,\n );\n\n function element_colorChange() {\n this.preExecute = function (context) {\n context.oldColor = context.businessObject.pickedColor;\n };\n\n this.execute = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n\n semantic.pickedColor = context.newColor;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n\n semantic.pickedColor = context.oldColor;\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n\n function removeGroupWithoutChildren() {\n this.preExecute = function (ctx) {\n ctx.parent = ctx.element.parent;\n ctx.children = ctx.element.children.slice();\n };\n\n this.execute = function (ctx) {\n let element = ctx.element;\n ctx.children.forEach((child) => {\n undoGroupRework(element, child);\n eventBus.fire(\"element.changed\", { element: child });\n });\n eventBus.fire(\"shape.remove\", { element });\n };\n\n this.revert = function (ctx) {\n let element = ctx.element;\n eventBus.fire(\"shape.added\", { element });\n\n ctx.element.children.forEach((child) => {\n reworkGroupElements(element, child);\n });\n };\n }\n}\n","/**\n * a handler that updates the text of a BPMN element.\n */\nexport default function headlineAndDescriptionUpdateHandler(\n commandStack,\n titleService,\n) {\n commandStack.registerHandler(\n \"story.updateHeadlineAndDescription\",\n handlerFunction,\n );\n\n function handlerFunction() {\n this.execute = function (ctx) {\n ctx.oldTitle = titleService.getTitle();\n ctx.oldDescription = titleService.getDescription();\n\n titleService.updateTitleAndDescription(\n ctx.newTitle,\n ctx.newDescription,\n false,\n );\n };\n\n this.revert = function (ctx) {\n titleService.updateTitleAndDescription(\n ctx.oldTitle,\n ctx.oldDescription,\n false,\n );\n };\n }\n}\n","\"use strict\";\n\nexport default function DSMassRenameHandler(commandStack, eventBus) {\n commandStack.registerHandler(\"domainStoryObjects.massRename\", massRename);\n\n function massRename(modeling) {\n this.preExecute = function (context) {\n let relevantElements = context.elements;\n\n context.oldLabel = relevantElements[0].businessObject.name;\n\n relevantElements.forEach((element) => {\n modeling.updateLabel(element.businessObject, confirm.newValue);\n });\n };\n\n this.execute = function (context) {\n let relevantElements = context.elements;\n relevantElements.forEach((element) => {\n let semantic = element.businessObject;\n semantic.name = context.newValue;\n\n eventBus.fire(\"element.changed\", { element });\n });\n };\n\n this.revert = function (context) {\n let relevantElements = context.elements;\n relevantElements.forEach((element) => {\n let semantic = element.businessObject;\n semantic.name = context.oldLabel;\n\n eventBus.fire(\"element.changed\", { element });\n });\n };\n }\n}\n","\"use strict\";\n\nimport {\n setLabel,\n getLabel,\n setNumber,\n getNumber,\n} from \"../labeling/dsLabelUtil\";\n\nimport {\n getExternalLabelMid,\n isLabelExternal,\n hasExternalLabel,\n isLabel,\n} from \"bpmn-js/lib/util/LabelUtil\";\n\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { getBusinessObject, is } from \"../util\";\n\nconst NULL_DIMENSIONS = {\n width: 0,\n height: 0,\n};\n\n/**\n * a handler that updates the text of a BPMN element.\n */\nexport default function UpdateLabelHandler(\n modeling,\n textRenderer,\n commandStack,\n) {\n commandStack.registerHandler(\"element.updateCustomLabel\", handlerFunction);\n\n function handlerFunction() {\n /**\n * Set the label and return the changed elements.\n *\n * Element parameter can be label itself or connection (i.e. sequence flow).\n *\n * @param {djs.model.Base} element\n * @param {String} text\n */\n\n this.preExecute = function (ctx) {\n let element = ctx.element,\n businessObject = element.businessObject,\n newLabel = ctx.newLabel,\n newNumber = ctx.newNumber;\n\n if (\n !isLabel(element) &&\n isLabelExternal(element) &&\n !hasExternalLabel(element) &&\n (newLabel !== \"\" || newNumber !== \"\")\n ) {\n // create label\n let paddingTop = 7;\n\n let labelCenter = getExternalLabelMid(element);\n\n labelCenter = {\n x: labelCenter.x,\n y: labelCenter.y + paddingTop,\n };\n\n modeling.createLabel(element, labelCenter, {\n id: businessObject.id + \"_label\",\n businessObject: businessObject,\n });\n }\n };\n\n this.execute = function (ctx) {\n ctx.oldLabel = getLabel(ctx.element);\n ctx.oldNumber = getNumber(ctx.element);\n return setText(ctx.element, ctx.newLabel, ctx.newNumber);\n };\n\n this.revert = function (ctx) {\n return setText(ctx.element, ctx.oldLabel, ctx.oldNumber);\n };\n\n this.postExecute = function (ctx) {\n let element = ctx.element,\n label = element.label || element,\n newLabel = ctx.newLabel,\n newBounds = ctx.newBounds;\n\n if (isLabel(label) && newLabel.trim() === \"\") {\n modeling.removeShape(label);\n\n return;\n }\n\n // ignore internal labels for elements except text annotations\n if (\n !isLabelExternal(element) &&\n !is(element, elementTypes.TEXTANNOTATION)\n ) {\n return;\n }\n\n let bo = getBusinessObject(label);\n\n let text = bo.name || bo.text;\n\n // don't resize without text\n if (!text) {\n return;\n }\n\n // resize element based on label _or_ pre-defined bounds\n if (typeof newBounds === \"undefined\") {\n newBounds = textRenderer.getLayoutedBounds(label, text);\n }\n\n // setting newBounds to false or _null_ will\n // disable the postExecute resize operation\n if (newBounds) {\n modeling.resizeShape(label, newBounds, NULL_DIMENSIONS);\n }\n };\n }\n}\n\nfunction setText(element, text, textNumber) {\n // external label if present\n let label = element.label || element;\n\n let number = element.number || element;\n\n let labelTarget = element.labelTarget || element;\n\n let numberTarget = element.numberTarget || element;\n setLabel(label, text);\n setNumber(number, textNumber);\n\n return [label, labelTarget, number, numberTarget];\n}\n\nUpdateLabelHandler.$inject = [\"modeling\", \"textRenderer\", \"commandStack\"];\n","import { some } from \"min-dash\";\n\nexport function is(element, type) {\n const bo = getBusinessObject(element);\n\n return bo && typeof bo.$instanceOf == \"function\" && bo.$instanceOf(type);\n}\n\nexport function getBusinessObject(element) {\n return (element && element.businessObject) || element;\n}\n\nexport function isAny(element, types) {\n return some(types, function (t) {\n return is(element, t);\n });\n}\n\nexport function reworkGroupElements(parent, shape) {\n parent.children.slice().forEach((innerShape) => {\n if (innerShape.id !== shape.id) {\n if (innerShape.x >= shape.x && innerShape.x <= shape.x + shape.width) {\n if (innerShape.y >= shape.y && innerShape.y <= shape.y + shape.height) {\n innerShape.parent = shape;\n if (!shape.children.includes(innerShape)) {\n shape.children.push(innerShape);\n }\n }\n }\n }\n });\n}\n\nexport function undoGroupRework(parent, shape) {\n const superParent = parent.parent;\n\n parent.children.remove(shape);\n superParent.children.add(shape);\n\n shape.parent = superParent;\n\n const svgShape = document.querySelector(\n \"[data-element-id=\" + shape.id + \"]\",\n ).parentElement;\n const svgGroup = svgShape.parentElement;\n const svgGroupParent = svgGroup.parentElement.parentElement;\n svgGroup.removeChild(svgShape);\n svgGroupParent.appendChild(svgShape);\n}\n","import {\n SVG_LINK,\n TEXTSPAN_DESCRIPTION_HEIGHT,\n TEXTSPAN_TITLE_HEIGHT,\n X_OFFSET_UTIL,\n} from \"../../Domain/Export/exportConstants\";\n\nlet extraHeight = 0;\n\n// Has to be js File so we can access te correct non-standard HTML-Properties without excessive usage of ts-ignore\nexport function createTitleAndDescriptionSVGElement(\n title,\n description,\n xLeft,\n yUp,\n width,\n) {\n title = title.replace(\"<\", \"\").replace(\">\", \"\");\n\n let titleElement = createTitle(title, width);\n let descriptionElement = createDescription(description, width);\n\n // to display the title and description in the SVG-file, we need to add a container for our text-elements\n let insertText =\n '' +\n titleElement +\n descriptionElement +\n \"\";\n return { insertText, extraHeight };\n}\n\nfunction createTitle(text, width) {\n let tempCanvas = document.createElement(\"canvas\");\n let ctx = tempCanvas.getContext(\"2d\");\n ctx.font = \"30px Arial\";\n\n return createTextSpans(text, width, ctx, 10, TEXTSPAN_TITLE_HEIGHT, 30);\n}\n\nfunction createDescription(text, width) {\n let description = \"\";\n let descriptionParts = text.split(\"
\");\n\n let tempCanvas = document.createElement(\"canvas\");\n let ctx = tempCanvas.getContext(\"2d\");\n ctx.font = \"12px Arial\";\n\n for (let i = 0; i < descriptionParts.length; i++) {\n description += createTextSpans(\n descriptionParts[i],\n width,\n ctx,\n 0,\n TEXTSPAN_DESCRIPTION_HEIGHT,\n 12,\n );\n }\n return description;\n}\n\nfunction createTextSpans(text, width, ctx, yOffset, heightOffset, fontSize) {\n let textSpans = \"\";\n let words = text.split(\" \");\n\n let textTag =\n '';\n\n let textSpan = document.createElementNS(SVG_LINK, \"tspan\");\n let textNode = document.createTextNode(words[0]);\n\n textSpan.setAttribute(\"x\", X_OFFSET_UTIL);\n textSpan.setAttribute(\"y\", yOffset + extraHeight);\n textSpan.setAttribute(\"font-size\", fontSize);\n textSpan.appendChild(textNode);\n\n for (let j = 1; j < words.length; j++) {\n if (textSpan.firstChild && textSpan.firstChild.data) {\n let len = textSpan.firstChild.data.length;\n textNode.data += \" \" + words[j];\n\n if (ctx.measureText(textNode.data).width > width - 16) {\n extraHeight += heightOffset;\n textSpan.firstChild.data = textSpan.firstChild.data.slice(0, len); // remove overflow word\n\n textSpans += textTag + textSpan.outerHTML + \"\"; // append line\n\n // create new textspan for line break\n textSpan = document.createElementNS(SVG_LINK, \"tspan\");\n textNode = document.createTextNode(words[j]);\n textSpan.setAttribute(\"x\", X_OFFSET_UTIL);\n textSpan.setAttribute(\"y\", yOffset + extraHeight);\n textSpan.appendChild(textNode);\n }\n }\n }\n extraHeight += heightOffset;\n\n textSpans += textTag + textSpan.outerHTML + \"\";\n return textSpans;\n}\n","import { elementTypes } from './elementTypes';\n\nexport interface BusinessObject {\n $descriptor: any;\n $type: any;\n di: any;\n get: any;\n set: any;\n\n id: string;\n name: string;\n\n type: string;\n\n x: number;\n y: number;\n height: number | undefined;\n width: number | undefined;\n pickedColor: string | undefined;\n}\n\nexport const testBusinessObject: BusinessObject = {\n $descriptor: undefined,\n $type: undefined,\n di: undefined,\n get: undefined,\n set: undefined,\n\n id: 'test',\n name: 'test',\n\n type: elementTypes.WORKOBJECT,\n\n x: 0,\n y: 0,\n height: 38,\n width: 38,\n pickedColor: undefined,\n};\n","export class Configuration {\n actors: string[];\n workObjects: string[];\n\n constructor(actors: string[], workObjects: string[]) {\n this.actors = actors;\n this.workObjects = workObjects;\n }\n}\n","/** DEFAULT VALUES **/\nexport const INITIAL_TITLE = '< title >';\nexport const INITIAL_DESCRIPTION = '';\nexport const INITIAL_DOMAIN_NAME = 'default';\n\n/** LocalStorageTags **/\nexport const APPENDED_ICONS_TAG = 'appendedIcons';\nexport const DOMAIN_CONFIGURATION_TAG = 'domainConfigurationTag';\n\n/** AUTOSAVE DEFAULTS **/\nexport const DEFAULT_AUTOSAVES_ENABLED = true;\nexport const DEFAULT_AUTOSAVES_MAX_DRAFTS = 5;\nexport const DEFAULT_AUTOSAVES_INTERVAL = 30;\n\n/** SNACKBAR **/\nexport const SNACKBAR_DURATION = 2000;\nexport const SNACKBAR_SUCCESS = 'snackbar_success';\nexport const SNACKBAR_ERROR = 'snackbar_error';\nexport const SNACKBAR_INFO = 'snackbar_info';\n\n/** BPMN_RELEVANT_CONSTANTS **/\nexport const IMPLICIT_ROOT_ID = '__implicitroot';\n","export class Dictionary {\n private entries: Entry[];\n\n constructor() {\n this.entries = [];\n }\n\n get length(): number {\n return this.entries.length;\n }\n\n all(): Entry[] {\n return this.entries;\n }\n\n size(): number {\n return this.entries.length;\n }\n\n isEmpty(): boolean {\n return this.entries.length <= 0;\n }\n\n has(key: string): boolean {\n return this.entries.some((entry) => entry.key === key);\n }\n\n set(key: string, value: any): void {\n if (!this.has(key)) {\n this.entries.push(new Entry(value, key));\n }\n }\n\n add(value: any, key: string): void {\n this.set(key, value);\n }\n\n putEntry(entry: Entry): void {\n if (!this.has(entry.key)) {\n this.entries.push(new Entry(entry.value, entry.key));\n }\n }\n\n keysArray(): string[] {\n return this.entries.map((entry) => entry.key);\n }\n\n addEach(object: any): void {\n Object.keys(object).forEach((key) => {\n this.set(key, object[key]);\n });\n }\n\n appendDict(dict: Dictionary): void {\n dict.entries.forEach((entry) => this.putEntry(entry));\n }\n\n clear(): void {\n this.entries = [];\n }\n\n delete(key: string): void {\n this.entries = this.entries.filter((entry) => entry.key !== key);\n }\n\n get(key: string): any {\n const found = this.entries.filter((entry) => entry.key === key);\n return found[0] ? found[0].value : null;\n }\n\n sort(fn: (a: Entry, b: Entry) => number) {\n this.entries.sort(fn);\n }\n\n sortByName() {\n this.entries.sort((a: Entry, b: Entry) => {\n if (a.key.includes('_custom') == b.key.includes('_custom')) {\n if (a.key < b.key) return -1;\n else {\n return 1;\n }\n } else {\n if (a.key.includes('_custom')) {\n return -1;\n } else {\n return 1;\n }\n }\n });\n }\n}\n\nexport class Entry {\n value: any;\n key: string;\n\n constructor(value: any, key: string) {\n this.value = value;\n this.key = key;\n }\n}\n","import { INITIAL_DOMAIN_NAME } from './constants';\nimport { testBusinessObject } from './businessObject';\nimport { elementTypes } from './elementTypes';\nimport { Dictionary } from './dictionary/dictionary';\n\nexport interface DomainConfiguration {\n name: string;\n actors: Dictionary;\n workObjects: Dictionary;\n}\n\nexport interface DomainConfigurationForExport {\n name: string;\n actors: any;\n workObjects: any;\n}\n\nexport interface CustomDomainConfiguration {\n name: string;\n actors: string[];\n workObjects: string[];\n}\nconst actor = structuredClone(testBusinessObject);\nactor.type = elementTypes.ACTOR;\n\nexport const testCustomDomainConfiguration: CustomDomainConfiguration = {\n name: INITIAL_DOMAIN_NAME,\n actors: ['Person'],\n workObjects: ['Document'],\n};\n\nexport function fromConfigurationFromFile(configFromFile: {\n name: string;\n actors: { [p: string]: any };\n workObjects: { [p: string]: any };\n}) {\n const actorsDict = new Dictionary();\n const workObjectsDict = new Dictionary();\n Object.keys(configFromFile.actors).forEach((key) => {\n actorsDict.add(configFromFile.actors[key], key);\n });\n Object.keys(configFromFile.workObjects).forEach((key) => {\n workObjectsDict.add(configFromFile.workObjects[key], key);\n });\n\n return {\n name: configFromFile.name,\n actors: actorsDict,\n workObjects: workObjectsDict,\n };\n}\n","export enum elementTypes {\n ACTIVITY = 'domainStory:activity',\n CONNECTION = 'domainStory:connection',\n ACTOR = 'domainStory:actor',\n WORKOBJECT = 'domainStory:workObject',\n GROUP = 'domainStory:group',\n TEXTANNOTATION = 'domainStory:textAnnotation',\n DOMAINSTORY = 'domainStory:',\n}\n","import { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { overrideAppendedIcons } from 'src/app/Domain/Domain-Configuration/allIcons';\nimport { Configuration } from 'src/app/Domain/Common/configuration';\nimport { DomainConfiguration } from 'src/app/Domain/Common/domainConfiguration';\nimport { INITIAL_DOMAIN_NAME } from './constants';\n\nexport class IconConfiguration {\n domainName = INITIAL_DOMAIN_NAME;\n\n private allIconDictionary: Dictionary;\n\n constructor(allIconDictionary: Dictionary) {\n this.allIconDictionary = allIconDictionary;\n }\n\n /**\n * Select the Iconset which you want to use\n */\n getDefaultConf(): Configuration {\n return defaultConf;\n }\n\n updateAllIconRegistry(allIconDictionary: Dictionary): void {\n this.allIconDictionary = allIconDictionary;\n }\n\n appendSRCFile(\n actors: string[],\n actorsDict: Dictionary,\n workObjects: string[],\n workObjectsDict: Dictionary,\n ): void {\n const newAppendedIcons: { [key: string]: any } = {};\n\n actors.forEach((name: string) => {\n if (!this.allIconDictionary.has(name)) {\n newAppendedIcons[name] = actorsDict.get(name);\n }\n });\n\n workObjects.forEach((name: string) => {\n if (!this.allIconDictionary.has(name)) {\n newAppendedIcons[name] = workObjectsDict.get(name);\n }\n });\n const appen = new Dictionary();\n Object.keys(newAppendedIcons).forEach((key) => {\n appen.set(key, newAppendedIcons[key]);\n });\n\n overrideAppendedIcons(appen);\n }\n\n createCustomConf(domainConfiguration: DomainConfiguration): Configuration {\n this.domainName = domainConfiguration.name;\n\n let actors = domainConfiguration.actors;\n let workObjects = domainConfiguration.workObjects;\n\n this.appendSRCFile(\n actors.keysArray(),\n actors,\n workObjects.keysArray(),\n workObjects,\n );\n\n return new Configuration(actors.keysArray(), workObjects.keysArray());\n }\n}\n\n/* eslint no-unused-vars: 0*/\n\n/**\n * All Icons as one Set\n * There are more Icons than fit in the palette.\n * This is just for reference\n */\nconst allIconsConf = {\n actors: ['Person', 'Group', 'System', 'Pet'],\n workObjects: [\n 'Place',\n 'Flag',\n 'World',\n 'Water',\n 'Store',\n 'Theater',\n 'Business',\n 'Meeting-room',\n 'Hotel',\n 'Dining',\n 'Courthouse',\n 'Gas-station',\n 'Car',\n 'Bus',\n 'Train',\n 'Truck',\n 'Taxi',\n 'Bike',\n 'Boat',\n 'Motorcycle',\n 'Plane',\n 'Flight-takeoff',\n 'Flight-landing',\n 'Shuttle',\n 'Walking',\n 'Traffic',\n 'Commute',\n 'Document',\n 'Folder',\n 'Call',\n 'Email',\n 'Copyright',\n 'Briefcase',\n 'Attach',\n 'Ruler',\n 'Sum',\n 'Conversation',\n 'Update',\n 'Cellphone',\n 'Speaker-phone',\n 'Signal',\n 'Key',\n 'Pencil',\n 'How-To-Reg',\n 'Settings',\n 'Grid',\n 'Label',\n 'Receipt',\n 'Calendar',\n 'Wrench',\n 'Headset',\n 'Keyboard',\n 'Mouse',\n 'Microphone',\n 'Router',\n 'Scanner',\n 'Printer',\n 'DNS',\n 'Security',\n 'Cloud',\n 'Desktop',\n 'Tablet',\n 'Assessment',\n 'Dashboard',\n 'Pie-chart',\n 'View-List',\n 'Euro',\n 'Dollar',\n 'Info',\n 'Alarm',\n 'Problem',\n 'Circle-Arrows',\n 'Picture-as-PDF',\n 'Credit-Card',\n 'Shopping',\n 'Favorite',\n 'Gavel',\n 'Blind',\n 'Hourglass',\n 'Time',\n 'Search',\n 'Thumb-up',\n 'Thumb-down',\n 'Thumb-up-down',\n 'Couch',\n 'Education',\n 'Watch',\n ],\n};\n\n/**\n * Default Iconset\n */\nexport const defaultConf = {\n actors: ['Person', 'Group', 'System'],\n workObjects: ['Document', 'Folder', 'Call', 'Email', 'Conversation', 'Info'],\n};\n","import { ActivityCanvasObject } from '../Common/activityCanvasObject';\n\nexport class ActivityDialogData {\n activity: ActivityCanvasObject;\n numberIsAllowedMultipleTimes: boolean;\n showNumberFields: boolean;\n\n saveFN: any;\n\n constructor(\n activity: ActivityCanvasObject,\n numberIsAllowedMultipleTimes: boolean,\n showNumberFields: boolean,\n saveFN: any,\n ) {\n this.activity = activity;\n this.numberIsAllowedMultipleTimes = numberIsAllowedMultipleTimes;\n this.showNumberFields = showNumberFields;\n this.saveFN = saveFN;\n }\n}\n","export class ExportDialogData {\n title: string;\n options: ExportOption[];\n\n constructor(title: string, options: ExportOption[]) {\n this.title = title;\n this.options = options;\n }\n}\n\nexport class ExportOption {\n text: string;\n fn: any;\n tooltip: string;\n\n constructor(text: string, tooltip: string, fn: any) {\n this.text = text;\n this.tooltip = tooltip;\n this.fn = fn;\n }\n}\n","export class InfoDialogData {\n title: string;\n infoText: string;\n isInfo: boolean;\n isLink: boolean;\n linkText: string | undefined;\n\n constructor(\n title: string,\n infoText: string,\n isInfo: boolean,\n isLink: boolean = false,\n linkText?: string,\n ) {\n this.title = title;\n this.infoText = infoText;\n this.isInfo = isInfo;\n this.isLink = isLink;\n this.linkText = linkText;\n }\n}\n","export const NUMBER_BACKGROUND_COLOR = 'white';\nexport const NUMBER_COLOR = 'black';\nexport const STROKE_WIDTH = '1.5';\n\nexport const HIGHLIGHT_NUMBER_BACKGROUNG_COLOR = '#43acbf';\nexport const HIGHLIGHT_NUMBER_COLOR = 'black';\nexport const HIGHLIGHT_COLOR = 'black';\nexport const HIGHLIGHT_STROKE_WIDTH = '4';\n","import { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\n\nexport let appendedIcons = new Dictionary();\nexport const allIcons = {\n Person:\n '',\n Group:\n '',\n Pet: '',\n Conversation:\n '',\n World:\n '',\n Store:\n '',\n Theater:\n '',\n Business:\n '',\n Water:\n '',\n Hotel:\n '',\n Dining:\n '',\n 'Gas-station':\n '',\n 'Meeting-room':\n '',\n Courthouse:\n '',\n Flag: '',\n Place:\n '',\n Car: '',\n Bus: '',\n Train:\n '',\n Truck:\n '',\n Taxi: '',\n Bike: '',\n Boat: '',\n Motorcycle:\n '',\n Plane:\n '',\n 'Flight-takeoff':\n '',\n 'Flight-landing':\n '',\n Shuttle:\n '',\n Walking:\n '',\n Traffic:\n '',\n Commute:\n '',\n System:\n '',\n Printer:\n '',\n Document:\n '',\n Folder:\n '',\n Call: '',\n Email:\n '',\n Copyright:\n '',\n DNS: '',\n Settings:\n '',\n Cellphone:\n '',\n Update:\n '',\n Briefcase:\n '',\n Microphone:\n '',\n Signal:\n '',\n Key: '',\n Pencil:\n '',\n Sum: '',\n Headset:\n '',\n Keyboard:\n '',\n Mouse:\n '',\n Router:\n '',\n Scanner:\n '',\n Security:\n '',\n Desktop:\n '',\n 'Speaker-phone':\n '',\n Tablet:\n '',\n Label:\n '',\n Receipt:\n '',\n Calendar:\n '',\n Cloud:\n '',\n Assessment:\n '',\n Dashboard:\n '',\n 'Pie-chart':\n '',\n Problem:\n '',\n 'Picture-as-PDF':\n '',\n Grid: '',\n Watch:\n '',\n Euro: '',\n Dollar:\n '',\n Info: '',\n Alarm:\n '',\n Wrench:\n '',\n 'Circle-Arrows':\n '',\n 'Credit-Card':\n '',\n Favorite:\n '',\n Gavel:\n '',\n Blind:\n '',\n Hourglass:\n '',\n Time: '',\n Search:\n '',\n Shopping:\n '',\n 'Thumb-up':\n '',\n 'Thumb-down':\n '',\n 'Thumb-up-down':\n '',\n Couch:\n '',\n Attach:\n '',\n Ruler:\n '',\n Education:\n '',\n 'How-To-Reg':\n '',\n 'View-List':\n '',\n};\n\nexport function getAllStandardIconKeys(): string[] {\n const allIconsDict = new Dictionary();\n\n allIconsDict.addEach(allIcons);\n\n return allIconsDict.keysArray();\n}\n\nexport function overrideAppendedIcons(newIcons: Dictionary): void {\n appendedIcons = newIcons;\n}\n","export enum IconFilterEnum {\n ICON_FILTER_ACTOR = 'ICON_FILTER_ACTOR',\n ICON_FILTER_WORKOBJECT = 'ICON_FILTER_WORKOBJECT',\n ICON_FILTER_UNASSIGNED = 'ICON_FILTER_UNASSIGNED',\n ICON_FILTER_NONE = 'ICON_FILTER_NONE',\n}\n","export class ConfigAndDST {\n domain: any;\n dst: any;\n\n constructor(domain: any, dst: any) {\n this.domain = domain;\n this.dst = dst;\n }\n}\n\nexport const testConfigAndDst: ConfigAndDST = {\n domain: JSON.parse(\n '{\"name\":\"\",' +\n '\"actors\":{\"Person\":\"' +\n '' +\n '\",' +\n '\"Group\":\"' +\n '' +\n '\",' +\n '\"System\":\"' +\n '\"},' +\n '\"workObjects\":{\"Document\":\"' +\n '\",' +\n '\"Folder\":\"' +\n '' +\n '\",' +\n '\"Call\":\"' +\n '\",' +\n '\"Email\":\"' +\n '\",' +\n '\"Conversation\":\"' +\n '\",' +\n '\"Info\":\"' +\n '' +\n '\"}}',\n ),\n dst:\n '[' +\n '{\"type\":\"domainStory:workObjectDocument\",\"name\":\"\",\"id\":\"shape_3792\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"x\":302,\"y\":102},' +\n '{\"type\":\"domainStory:actorPerson\",\"name\":\"\",\"id\":\"shape_4666\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"x\":103,\"y\":93},' +\n '{\"type\":\"domainStory:activity\",\"name\":\"\",\"id\":\"connection_4884\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"number\":1,' +\n '\"waypoints\":[{\"original\":{\"x\":141,\"y\":131},\"x\":186,\"y\":133},{\"original\":{\"x\":340,\"y\":140},\"x\":302,\"y\":138}],' +\n '\"source\":\"shape_4666\",\"target\":\"shape_3792\"}]',\n};\n","export const SVG_LINK = 'http://www.w3.org/2000/svg';\nexport const X_OFFSET_UTIL = '8';\nexport const TEXTSPAN_TITLE_HEIGHT = 30;\nexport const TEXTSPAN_DESCRIPTION_HEIGHT = 15;\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AutosaveSettingsComponent } from '../Presentation/Autosave/AutosaveSettings/autosave-settings.component';\nimport { AutosaveOptionsComponent } from '../Presentation/Autosave/AutosaveOptions/autosave-options.component';\nimport { AutosavedDraftsComponent } from '../Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component';\nimport { FormsModule } from '@angular/forms';\nimport { MaterialModule } from '../material.module';\n\n@NgModule({\n declarations: [\n AutosaveSettingsComponent,\n AutosaveOptionsComponent,\n AutosavedDraftsComponent,\n ],\n exports: [AutosaveSettingsComponent],\n imports: [CommonModule, FormsModule, MaterialModule],\n})\nexport class AutosaveSettingsModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { HeaderButtonsComponent } from '../Presentation/Header/header-buttons.component';\n\n@NgModule({\n declarations: [HeaderButtonsComponent],\n exports: [HeaderButtonsComponent],\n imports: [CommonModule],\n})\nexport class DomainStoryModelerModuleModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DomainConfigurationComponent } from 'src/app/Presentation/DomainConfiguration/domain-configuration.component';\nimport { IconListItemComponent } from '../Presentation/DomainConfiguration/icon-list-item/icon-list-item.component';\nimport { DetailsListItemComponent } from '../Presentation/DomainConfiguration/details-list-item/details-list-item.component';\nimport { DomainDetailsComponent } from '../Presentation/DomainConfiguration/domain-details/domain-details.component';\nimport { GeneralSettingsComponent } from '../Presentation/Settings/General/general-settings.component';\nimport { LabelDictionaryComponent } from '../Presentation/LabelDictionary/label-dictionary.component';\nimport { FormsModule } from '@angular/forms';\nimport { MaterialModule } from '../material.module';\nimport { AutosaveSettingsModule } from './autosave-settings.module';\n\n@NgModule({\n declarations: [\n DomainConfigurationComponent,\n GeneralSettingsComponent,\n LabelDictionaryComponent,\n IconListItemComponent,\n DetailsListItemComponent,\n DomainDetailsComponent,\n ],\n exports: [\n GeneralSettingsComponent,\n DomainConfigurationComponent,\n LabelDictionaryComponent,\n ],\n imports: [AutosaveSettingsModule, CommonModule, FormsModule, MaterialModule],\n})\nexport class SettingsModule {}\n","import { Component } from '@angular/core';\nimport { AutosaveConfigurationService } from '../../../Service/Autosave/autosave-configuration.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_ERROR,\n SNACKBAR_SUCCESS,\n} from 'src/app/Domain/Common/constants';\n\n@Component({\n selector: 'app-autosave-options',\n templateUrl: './autosave-options.component.html',\n styleUrls: ['./autosave-options.component.scss'],\n})\nexport class AutosaveOptionsComponent {\n constructor(\n protected autosaveConfiguration: AutosaveConfigurationService,\n private snackbar: MatSnackBar,\n ) {}\n\n save(activated: boolean, maxDrafts: number, interval: number) {\n if (\n this.autosaveConfiguration.setConfiguration({\n activated,\n maxDrafts,\n interval,\n })\n ) {\n this.snackbar.open('Settings for Autosave saved', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n });\n } else {\n this.snackbar.open(\n 'Unable to save settings for Autosave - please try again',\n undefined,\n {\n duration: 2 * SNACKBAR_DURATION,\n panelClass: SNACKBAR_ERROR,\n },\n );\n }\n }\n}\n","\n \n Autosave Options\n \n \n
\n \n Enabled\n
\n
\n Interval [sec]\n \n
\n
\n Max. Drafts\n \n
\n \n Apply\n \n
\n
\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-autosave-settings',\n templateUrl: './autosave-settings.component.html',\n styleUrls: ['./autosave-settings.component.scss'],\n})\nexport class AutosaveSettingsComponent {}\n","\n\n","import { Component, OnInit } from '@angular/core';\nimport { AutosaveService } from '../../../Service/Autosave/autosave.service';\nimport { Draft } from '../../../Domain/Autosave/draft';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_SUCCESS,\n} from 'src/app/Domain/Common/constants';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'app-autosaved-drafts',\n templateUrl: './autosaved-drafts.component.html',\n styleUrls: ['./autosaved-drafts.component.scss'],\n})\nexport class AutosavedDraftsComponent implements OnInit {\n drafts: Draft[] = [];\n subscription: Subscription;\n\n constructor(\n private autosaveService: AutosaveService,\n private snackbar: MatSnackBar,\n ) {\n this.subscription = this.autosaveService.autosavedDraftsChanged$.subscribe(\n () => this.initDrafts(),\n );\n }\n\n ngOnInit(): void {\n this.initDrafts();\n }\n\n initDrafts() {\n this.drafts = this.autosaveService.loadCurrentDrafts();\n }\n\n loadDraft(draft: Draft): void {\n this.autosaveService.loadDraft(draft);\n this.snackbar.open('Draft loaded', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n });\n }\n\n removeAllDrafts() {\n this.autosaveService.removeAllDrafts();\n }\n}\n","\n \n \n History\n \n {{ drafts.length ? drafts.length : \"no\" }}\n {{ drafts.length > 1 ? \"drafts\" : \"draft\" }} available\n \n \n
\n
\n
\n
{{ draft.title }}
\n
{{ draft.date }}
\n
\n \n Load Draft\n \n
\n
\n
\n \n Remove All Drafts\n \n
\n
\n
\n
\n\nNo drafts found.\n","import { Component, OnInit } from '@angular/core';\nimport { ModelerService } from '../../Service/Modeler/modeler.service';\nimport { AutosaveService } from '../../Service/Autosave/autosave.service';\n\n@Component({\n selector: 'app-modeler',\n templateUrl: './modeler.component.html',\n styleUrls: ['./modeler.component.scss'],\n})\nexport class ModelerComponent implements OnInit {\n constructor(\n private modelerService: ModelerService,\n private autosaveService: AutosaveService,\n ) {}\n\n ngOnInit(): void {\n this.modelerService.postInit();\n this.autosaveService.loadLatestDraft();\n }\n}\n","
\n","import { AfterViewInit, Component, Inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\nimport { ActivityDialogData } from 'src/app/Domain/Dialog/activityDialogData';\nimport { ActivityCanvasObject } from '../../../Domain/Common/activityCanvasObject';\n\n@Component({\n selector: 'app-activity-dialog',\n templateUrl: './activity-dialog.component.html',\n styleUrls: ['./activity-dialog.component.scss'],\n})\nexport class ActivityDialogComponent {\n form: UntypedFormGroup;\n activityLabel: string;\n activityNumber: number | undefined;\n numberIsAllowedMultipleTimes: boolean;\n showNumberFields: boolean;\n activity: ActivityCanvasObject;\n\n saveFN: any;\n\n constructor(\n private fb: UntypedFormBuilder,\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: ActivityDialogData,\n ) {\n this.activity = data.activity;\n this.activityLabel = data.activity.businessObject.name;\n this.numberIsAllowedMultipleTimes = data.numberIsAllowedMultipleTimes;\n this.activityNumber = data.activity.businessObject.number;\n this.showNumberFields = data.showNumberFields;\n\n this.saveFN = data.saveFN;\n\n this.form = this.fb.group({\n activityLabel: [this.activityLabel, []],\n activityNumber: [this.activityNumber, []],\n multipleNumbers: [this.numberIsAllowedMultipleTimes, []],\n });\n }\n\n onSubmit(): void {\n this.numberIsAllowedMultipleTimes = !this.numberIsAllowedMultipleTimes;\n this.form.patchValue({\n multipleNumbers: this.numberIsAllowedMultipleTimes,\n });\n }\n\n save(): void {\n this.saveFN({\n activity: this.activity,\n ...this.form.value,\n });\n this.dialogRef.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n preventDefault(event: Event) {\n event.preventDefault();\n }\n}\n","\n

Edit Activity

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

{{ title }}

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

{{ title }}

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

Label Dictionary

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

Icon Set Name

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

Order of Actors

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

Order of Work Objects

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

Workobjects

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

Activities

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

Edit Activity

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

{{ title }}

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

{{ title }}

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

Label Dictionary

\n \n
\n","import { AfterViewChecked, Component, Input } from '@angular/core';\nimport { IconListItem } from '../../../Domain/Icon-Set-Configuration/iconListItem';\n\n@Component({\n selector: 'app-details-list-item',\n templateUrl: './details-list-item.component.html',\n styleUrls: ['./details-list-item.component.scss'],\n})\nexport class DetailsListItemComponent implements AfterViewChecked {\n @Input()\n icon!: IconListItem;\n\n private iconInitiated = false;\n\n get id(): string {\n return (\n 'domain-configuration-details-icon-' +\n this.icon.name.toLowerCase() +\n '-' +\n (this.icon.isWorkObject ? 'workobject' : 'actor')\n );\n }\n\n get name(): string {\n return this.icon.name;\n }\n\n ngAfterViewChecked(): void {\n this.createIcon();\n }\n\n private createIcon(): void {\n const img = document.getElementById(this.id) as HTMLImageElement;\n if (img && !this.iconInitiated) {\n img.src = '' + this.icon.svg;\n this.iconInitiated = true;\n }\n }\n}\n","
\n \"{{\n {{ icon.name }}\n
\n","import { AfterViewChecked, Component, Input, OnInit } from '@angular/core';\nimport { IconListItem } from '../../../Domain/Icon-Set-Configuration/iconListItem';\nimport { BehaviorSubject } from 'rxjs';\nimport { IconSetCustomizationService } from '../../../Service/IconSetConfiguration/icon-set-customization.service';\n\n@Component({\n selector: 'app-icon-list-item',\n templateUrl: './icon-list-item.component.html',\n styleUrls: ['./icon-list-item.component.scss'],\n})\nexport class IconListItemComponent implements OnInit, AfterViewChecked {\n @Input()\n iconName: string = '';\n\n private iconInitiated = false;\n\n // @ts-ignore\n icon = new BehaviorSubject({});\n\n isActor: boolean = false;\n isWorkobject: boolean = false;\n isNone: boolean = true;\n\n get name(): string {\n return this.iconName;\n }\n\n get id() {\n return 'domain-configuration-icon-' + this.iconName;\n }\n\n constructor(\n private domainCustomizationService: IconSetCustomizationService,\n ) {}\n\n ngOnInit(): void {\n this.icon = this.domainCustomizationService.getIconForName(this.iconName);\n if (!this.icon) {\n return;\n }\n\n this.icon.subscribe((value) => {\n this.isActor = value.isActor;\n this.isWorkobject = value.isWorkObject;\n this.isNone = !(value.isActor || value.isWorkObject);\n });\n this.isActor = this.icon.value.isActor;\n this.isWorkobject = this.icon.value.isWorkObject;\n this.isNone = !(this.icon.value.isActor || this.icon.value.isWorkObject);\n }\n\n ngAfterViewChecked(): void {\n this.createIcon();\n }\n\n private createIcon(): void {\n const img = document.getElementById(this.id) as HTMLImageElement;\n if (img && !this.iconInitiated) {\n img.src = '' + this.icon.value?.svg;\n this.iconInitiated = true;\n }\n }\n\n toggleNone() {\n this.domainCustomizationService.setAsUnassigned(\n this.iconName,\n this.icon.value.isActor,\n );\n }\n\n toggleActor(): void {\n this.domainCustomizationService.setAsActor(true, this.iconName);\n }\n\n toggleWorkobject(): void {\n this.domainCustomizationService.setAsWorkobject(true, this.iconName);\n }\n}\n","
\n
\n \"{{\n
{{ name }}
\n
\n
\n \n \n None\n \n \n Actor\n \n \n Workobject\n \n \n
\n
\n","import { Component, OnInit } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport {\n CustomIconSetConfiguration,\n fromConfigurationFromFile,\n} from 'src/app/Domain/Common/iconSetConfiguration';\nimport { IconSetConfigurationService } from 'src/app/Service/IconSetConfiguration/icon-set-configuration.service';\nimport { IconDictionaryService } from 'src/app/Service/IconSetConfiguration/icon-dictionary.service';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { sanitizeIconName } from 'src/app/Utils/sanitizer';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { IconFilterEnum } from '../../Domain/Icon-Set-Configuration/iconFilterEnum';\nimport { IconSetCustomizationService } from '../../Service/IconSetConfiguration/icon-set-customization.service';\n\n@Component({\n selector: 'app-icon-set-configuration',\n templateUrl: './icon-set-configuration.component.html',\n styleUrls: ['./icon-set-configuration.component.scss'],\n})\nexport class IconSetConfigurationComponent implements OnInit {\n private iconSetConfigurationTypes: CustomIconSetConfiguration;\n\n filter = new BehaviorSubject(IconFilterEnum.ICON_FILTER_NONE);\n\n selectedActors = new BehaviorSubject([]);\n selectedWorkobjects = new BehaviorSubject([]);\n\n allIcons: BehaviorSubject;\n allIconNames = new BehaviorSubject([]);\n allFilteredIconNames = new BehaviorSubject([]);\n\n constructor(\n private configurationService: IconSetConfigurationService,\n private iconDictionaryService: IconDictionaryService,\n private iconSetCustomizationService: IconSetCustomizationService,\n private elementRegistryService: ElementRegistryService,\n ) {\n this.iconSetConfigurationTypes =\n this.iconSetCustomizationService.getIconSetConfiguration().value;\n\n this.allIcons = new BehaviorSubject(\n this.iconDictionaryService.getFullDictionary(),\n );\n this.allIcons.subscribe((allIcons) => {\n this.allIconNames.next(allIcons.keysArray().sort(this.sortByName));\n });\n\n this.selectedActors = this.iconSetCustomizationService.selectedActors$;\n this.selectedWorkobjects =\n this.iconSetCustomizationService.selectedWorkobjects$;\n }\n\n ngOnInit(): void {\n this.filter.subscribe((type) => {\n let allFiltered = this.getFilteredNamesForType(type);\n this.allFilteredIconNames.next(allFiltered.sort(this.sortByName));\n });\n }\n\n private sortByName(a: string, b: string): number {\n if (a.includes('_custom') == b.includes('_custom')) {\n if (a < b) return -1;\n else {\n return 1;\n }\n } else {\n if (a.includes('_custom')) {\n return -1;\n } else {\n return 1;\n }\n }\n }\n\n /** Default Icon Set **/\n loadMinimalIconConfigurationWithDefaultIcons(): void {\n this.iconSetCustomizationService.resetIconSet();\n }\n\n loadInitialConfiguration(): void {\n this.iconSetCustomizationService.cancel();\n }\n\n /** Persist Icon Set **/\n saveIconSet(): void {\n this.iconSetCustomizationService.saveIconSet(\n this.elementRegistryService.getUsedIcons(),\n );\n }\n\n exportIconSet(): void {\n this.iconSetCustomizationService.exportIconSet();\n }\n\n /** Add Custom Icon **/\n startIconUpload(): void {\n document.getElementById('importIcon')?.click();\n }\n\n importIcon(): void {\n // @ts-ignore\n const files = document.getElementById('importIcon').files;\n for (let iconInputFile of files) {\n const reader = new FileReader();\n const name = sanitizeIconName(iconInputFile.name);\n const iconName = name + '_custom';\n\n reader.onloadend = (e: ProgressEvent) => {\n if (e.target) {\n const src: string = e.target.result as unknown as string;\n this.iconDictionaryService.addIMGToIconDictionary(src, iconName);\n // TODO: td: What kind of type is it here?\n this.iconDictionaryService.registerIconForBPMN(\n iconName,\n src,\n elementTypes.ACTOR,\n );\n\n this.allIcons.next(this.iconDictionaryService.getFullDictionary());\n this.filter.next(this.filter.value);\n\n this.iconSetCustomizationService.addNewIcon(iconName);\n }\n };\n reader.readAsDataURL(iconInputFile);\n }\n }\n\n /** Import Icon Set **/\n startIconSetImport(): void {\n document.getElementById('importDomain')?.click();\n }\n\n importIconSet(): void {\n // @ts-ignore\n const iconSetInputFile = document.getElementById('importDomain').files[0];\n const reader = new FileReader();\n\n reader.onloadend = (e: ProgressEvent) => {\n const configFromFile = JSON.parse(\n e.target?.result as unknown as string,\n ) as {\n name: string;\n actors: { [key: string]: any };\n workObjects: { [key: string]: any };\n };\n const config = fromConfigurationFromFile(configFromFile);\n this.configurationService.loadConfiguration(config, false);\n\n this.iconSetCustomizationService.importConfiguration(config);\n };\n\n reader.readAsText(iconSetInputFile);\n }\n\n /** Filter **/\n filterForActors(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_ACTOR) {\n this.filter.next(IconFilterEnum.ICON_FILTER_ACTOR);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterForWorkobjects(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_WORKOBJECT) {\n this.filter.next(IconFilterEnum.ICON_FILTER_WORKOBJECT);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterForUnassigned(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_UNASSIGNED) {\n this.filter.next(IconFilterEnum.ICON_FILTER_UNASSIGNED);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterByNameAndType($event: any) {\n const filteredByNameAndType = this.getFilteredNamesForType(\n this.filter.value,\n ).filter((name) =>\n name.toLowerCase().includes($event.target.value.toLowerCase()),\n );\n this.allFilteredIconNames.next(filteredByNameAndType.sort(this.sortByName));\n }\n\n private getFilteredNamesForType(type: IconFilterEnum): string[] {\n let allFiltered: string[] = [];\n switch (type) {\n case IconFilterEnum.ICON_FILTER_NONE:\n allFiltered = this.allIconNames.value;\n break;\n case IconFilterEnum.ICON_FILTER_ACTOR:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.iconSetCustomizationService.isIconActor(name),\n );\n break;\n case IconFilterEnum.ICON_FILTER_WORKOBJECT:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.iconSetCustomizationService.isIconWorkObject(name),\n );\n break;\n case IconFilterEnum.ICON_FILTER_UNASSIGNED:\n allFiltered = this.allIconNames.value.filter(\n (name) =>\n !this.iconSetCustomizationService.isIconActor(name) &&\n !this.iconSetCustomizationService.isIconWorkObject(name),\n );\n break;\n }\n return allFiltered;\n }\n}\n","
\n
\n
\n
\n
Filter by assignment:
\n \n None\n \n \n Actors\n \n \n Workobjects\n \n \n
\n
\n \n \n home \n \n \n close\n \n
\n \n
\n \n unarchive\n \n \n \n
\n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n\n \n
\n","import { Component, OnInit } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { IconSetCustomizationService } from 'src/app/Service/IconSetConfiguration/icon-set-customization.service';\nimport { IconListItem } from 'src/app/Domain/Icon-Set-Configuration/iconListItem';\nimport { TitleService } from 'src/app/Service/Title/title.service';\n\n@Component({\n selector: 'app-icon-set-details',\n templateUrl: './icon-set-details.component.html',\n styleUrls: ['./icon-set-details.component.scss'],\n})\nexport class IconSetDetailsComponent implements OnInit {\n iconSetName: Observable;\n\n private draggedList: string = '';\n private draggedIndex = 0;\n\n selectedActors$ = this.customizationService.selectedActors$;\n selectedWorkobjects$ = this.customizationService.selectedWorkobjects$;\n\n constructor(\n private customizationService: IconSetCustomizationService,\n titleService: TitleService,\n ) {\n this.iconSetName = titleService.iconSetName$;\n }\n\n ngOnInit(): void {}\n\n changeName(event: Event): void {\n // @ts-ignore\n this.customizationService.changeName(event.target.value);\n }\n\n getIconForName(iconName: string): IconListItem {\n return this.customizationService.getIconForName(iconName).value;\n }\n\n allowDrop($event: DragEvent, listName: string) {\n if (this.draggedList === listName) {\n $event.preventDefault();\n }\n }\n\n onDrop($event: DragEvent, iconName: string, actors: boolean, index: number) {\n let list;\n if (actors) {\n list = this.selectedActors$;\n } else {\n list = this.selectedWorkobjects$;\n }\n const sortedList = list.value;\n const item = sortedList[this.draggedIndex];\n sortedList.splice(this.draggedIndex, 1);\n sortedList.splice(index, 0, item);\n list.next(sortedList);\n\n if (actors) {\n this.customizationService.setSelectedActors(sortedList);\n } else {\n this.customizationService.setSelectedWorkObject(sortedList);\n }\n }\n\n onDragStart(index: number, draggedList: string) {\n this.draggedList = draggedList;\n this.draggedIndex = index;\n }\n}\n","
\n
\n

Icon Set Name

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

Order of Actors

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

Order of Work Objects

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

Workobjects

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

Activities

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