From 809faec6a70daeff6b813070e1641ebfe3687413 Mon Sep 17 00:00:00 2001 From: Michele Santoro Date: Fri, 17 May 2024 16:41:32 +0200 Subject: [PATCH] Fixing constraint reference problem When there are reference with constraint there are using every time the reference one not that one that are defined inside the Model. --- .../src/fixtures/valid-documentation.html | 2 +- .../external-characteristic-reference.cy.ts | 4 +- .../external-constraint-reference.cy.ts | 4 +- .../external-entity-reference.cy.ts | 4 +- ...nal-property-reference-with-children.cy.ts | 4 +- .../external-property-reference.cy.ts | 4 +- .../drag-and-drop/new-elements.cy.ts | 6 +- .../external-characteristic-reference.cy.ts | 4 +- .../external-constraint-reference.cy.ts | 4 +- .../external-entity-reference.cy.ts | 4 +- ...nal-property-reference-with-children.cy.ts | 4 +- .../external-property-reference.cy.ts | 4 +- .../editor/create-recursive-element.cy.ts | 6 +- .../editor/edit-abstract-entity.cy.ts | 8 +- .../editor/edit-abstract-property.cy.ts | 8 +- .../src/integration/editor/edit-aspect.cy.ts | 14 +-- .../editor/edit-characteristic.cy.ts | 92 +++++++++---------- .../integration/editor/edit-collection.cy.ts | 4 +- .../src/integration/editor/edit-either.cy.ts | 30 +++--- .../src/integration/editor/edit-entity.cy.ts | 16 ++-- .../edit-enumeration-entity-values.cy.ts | 50 +++++----- .../src/integration/editor/edit-events.cy.ts | 12 +-- .../integration/editor/edit-operation.cy.ts | 66 ++++++------- .../integration/editor/edit-property.cy.ts | 28 +++--- .../editor/edit-time-series-entity.cy.ts | 32 +++---- .../src/integration/editor/edit-trait.cy.ts | 2 +- .../src/integration/editor/edit-unit.cy.ts | 16 ++-- .../entity-that-extends-external-entity.cy.ts | 8 +- .../editor/file-resource-entity.cy.ts | 2 +- .../editor/load-anonymous-elements.cy.ts | 2 +- ...ernal-references-different-namespace.cy.ts | 24 ++--- ...d-external-references-same-namespace.cy.ts | 22 ++--- ...rnal-references-with-cross-reference.cy.ts | 24 ++--- .../src/integration/editor/load-model.cy.ts | 2 +- .../editor/migrate-common-attributes.cy.ts | 58 ++++++------ .../integration/editor/point3d-entity.cy.ts | 4 +- .../integration/editor/search-element.cy.ts | 6 +- .../create-edit-entity-value.cy.ts | 12 +-- .../load-edit-modal-entity-value.cy.ts | 24 ++--- .../generation/generate-open-api.cy.ts | 16 ++-- .../settings/change-model-namespace.cy.ts | 10 +- .../settings/language-settings.cy.ts | 2 +- core/apps/ame-e2e/src/plugins/index.js | 2 +- core/apps/ame-e2e/src/support/api-mocks.ts | 6 +- core/apps/ame-e2e/src/support/commands.ts | 42 ++++----- core/apps/ame/src/app/app.component.ts | 2 +- .../editor-canvas/editor-canvas.component.ts | 12 +-- .../components/loading/loading.component.ts | 4 +- core/apps/ame/src/app/startup.service.ts | 14 +-- core/apps/ame/src/index.html | 2 +- core/electron-libs/windows-manager.js | 2 +- core/libs/api/src/lib/migrator-api.service.ts | 6 +- core/libs/api/src/lib/model-api.service.ts | 42 ++++----- .../api/src/lib/model-validator.service.ts | 6 +- .../src/lib/domain-model-to-rdf.service.ts | 4 +- .../src/lib/rdf-list/rdf-list-helper.ts | 2 +- .../src/lib/rdf-list/rdf-list.service.spec.ts | 12 +-- .../src/lib/rdf-list/rdf-list.service.ts | 21 +++-- .../src/lib/rdf-node/rdf-node.service.ts | 37 ++++---- .../abstract-entity/abstract-entity.ts | 8 +- .../abstract-property-visitor.ts | 2 +- .../src/lib/visitor/aspect/aspect-visitor.ts | 6 +- .../src/lib/visitor/base-visitor.ts | 2 +- .../characteristic/characteristic-visitor.ts | 28 +++--- .../constraint/constraint-visitor.spec.ts | 6 +- .../visitor/constraint/constraint-visitor.ts | 8 +- .../entity-instance-visitor.spec.ts | 2 +- .../entity-instance-visitor.ts | 10 +- .../lib/visitor/entity/entity-visitor.spec.ts | 2 +- .../src/lib/visitor/entity/entity-visitor.ts | 4 +- .../src/lib/visitor/event/event-visitor.ts | 6 +- .../visitor/operation/operation-visitor.ts | 8 +- .../visitor/property/property-visitor.spec.ts | 2 +- .../lib/visitor/property/property-visitor.ts | 9 +- .../src/lib/visitor/unit/unit-visitor.ts | 11 ++- core/libs/cache/src/lib/cached-file.ts | 11 ++- .../models/entity-inheritance-connector.ts | 10 +- .../src/lib/models/inheritance-connector.ts | 2 +- .../models/property-inheritance-connector.ts | 2 +- ...bstract-entity--abstract-entity.service.ts | 4 +- ...tract-entity--abstract-property.service.ts | 6 +- .../abstract-entity--property.service.ts | 7 +- ...act-property--abstract-property.service.ts | 4 +- .../aspect--property.service.ts | 2 +- .../characteristic--entity.service.ts | 2 +- .../collection--characteristic.service.ts | 5 +- .../either--left-characteristic.service.ts | 5 +- .../either--right-characteristic.service.ts | 5 +- .../entity--abstract-entity.service.ts | 6 +- .../entity--entity.service.ts | 4 +- .../entity--property.service.ts | 5 +- .../operation--output-property.service.ts | 5 +- .../property--abstract-property.service.ts | 4 +- .../property--characteristic.service.ts | 5 +- .../property--property.service.ts | 2 +- .../property--structured-value.service.ts | 2 +- .../structured-value--property.service.ts | 6 +- .../src/lib/shape-connector-util.ts | 8 +- .../src/lib/shape-connector.service.spec.ts | 8 +- .../src/lib/shape-connector.service.ts | 4 +- ...tract-entity-connection-handler.service.ts | 4 +- .../aspect-connection-handler.service.ts | 2 +- ...aracteristic-connection-handler.service.ts | 12 +-- .../constraint-connection-handler.service.ts | 4 +- .../either-connection-handler.service.ts | 4 +- .../entity-connection-handler.service.ts | 4 +- ...entity-value-connection-handler.service.ts | 7 +- .../event-connection-handler.service.ts | 4 +- .../operation-connection-handler.service.ts | 4 +- .../property-connection-handler.service.ts | 4 +- ...ctured-value-connection-handler.service.ts | 4 +- .../trait-connection-handler.service.ts | 4 +- .../confirm-dialog.component.ts | 5 +- .../connect-with-dialog.component.spec.ts | 10 +- .../connect-with-dialog.component.ts | 2 +- .../structured-value-properties.component.ts | 7 +- ...ructured-value-property-field.component.ts | 4 +- .../predefined-rules.service.ts | 4 +- .../structured-value.component.ts | 13 ++- .../element-list/element-list.component.ts | 2 +- .../entity-instance-modal-table.component.ts | 12 ++- .../entity-instance-modal.component.ts | 4 +- .../entity-instance-table.component.ts | 21 +++-- .../entity-instance-view.component.ts | 2 +- .../entity-instance.service.ts | 2 +- .../utils/EntityInstanceUtil.ts | 6 +- .../description-input-field.component.ts | 2 +- .../locate-element.component.ts | 5 +- .../name-input-field.component.ts | 6 +- .../preferred-name-input-field.component.ts | 2 +- .../see-input-field.component.ts | 12 +-- ...cteristic-name-dropdown-field.component.ts | 12 +-- .../data-type-input-field.component.ts | 12 +-- ...ault-value-entity-input-field.component.ts | 4 +- .../default-value-input-field.component.ts | 6 +- ...nt-characteristic-input-field.component.ts | 10 +- .../left-input-field.component.ts | 10 +- .../right-input-field.component.ts | 10 +- .../unit-input-field.component.ts | 12 ++- .../values-input-field.component.ts | 11 ++- ...onstraint-name-dropdown-field.component.ts | 4 +- .../encoding-input-field.component.ts | 4 +- .../integer-input-field.component.ts | 4 +- .../language-code-input-field.component.ts | 10 +- .../locale-code-input-field.component.ts | 10 +- .../lower-bound-input-field.component.ts | 7 +- .../max-length-input-field.component.ts | 2 +- .../max-value-input-field.component.ts | 7 +- .../min-length-input-field.component.ts | 2 +- .../min-value-input-field.component.ts | 7 +- ...-expression-value-input-field.component.ts | 4 +- .../scale-input-field.component.ts | 4 +- .../upper-bound-input-field.component.ts | 7 +- .../fields/dropdown-field.component.ts | 4 +- .../extends-field/extends-field.component.ts | 8 +- .../fields/input-field.component.ts | 16 ++-- .../input-chiplist-field.component.ts | 9 +- .../output-input-field.component.ts | 11 ++- .../example-value-input-field.component.ts | 2 +- .../code-input-field.component.ts | 2 +- ...conversion-factor-input-field.component.ts | 2 +- ...conversion-factor-input-field.component.ts | 2 +- .../quantity-kinds-input-field.component.ts | 4 +- .../reference-unit-input-field.component.ts | 4 +- .../symbol-input-field.component.ts | 2 +- .../model-element-editor-component.ts | 2 +- .../properties-button.component.ts | 5 +- .../properties-modal.component.ts | 2 +- .../shape-settings.component.ts | 2 +- .../shared-settings-title.component.ts | 5 +- .../lib/editor-dialog/editor-model.service.ts | 2 +- .../services/shape-settings.service.ts | 6 +- .../validators/editor-dialog-validators.ts | 5 +- .../aasx-generation-modal.component.ts | 4 +- .../generate-async-api.component.ts | 6 +- .../generate-documentation.component.ts | 10 +- .../generate-open-api.component.ts | 10 +- .../components/help/document.component.ts | 2 +- .../language-selector-modal.component.ts | 5 +- .../notifications/notifications.component.ts | 2 +- .../text-model-loader-modal.component.ts | 5 +- .../editor-toolbar.component.ts | 2 +- .../services/file-handling.service.ts | 42 ++++----- .../services/file-upload.service.ts | 2 +- .../services/generate-handling.service.ts | 14 +-- core/libs/editor/src/lib/editor.service.ts | 56 +++++------ .../large-file-warning-dialog.ts | 2 +- .../open-element-window.component.ts | 4 +- .../preview-dialog.component.ts | 7 +- .../rename-model/rename-model.component.ts | 4 +- .../save-model-dialog.component.ts | 6 +- .../src/lib/instantiator.service.ts | 12 +-- .../abstract-entity-instantiator.ts | 2 +- ...-constraint-characteristic-instantiator.ts | 2 +- .../characteristic-instantiator.ts | 5 +- .../instantiators/constraint-instantiator.ts | 16 ++-- .../lib/instantiators/entity-instantiator.ts | 6 +- .../entity-value-instantiator.ts | 6 +- .../lib/instantiators/event-instantiator.ts | 2 +- .../instantiators/operation-instantiator.ts | 2 +- .../predefined-characteristic-instantiator.ts | 22 ++--- .../samm-e-predefined-entity-instantiator.ts | 8 +- ...samm-e-predefined-property-instantiator.ts | 10 +- .../state-characteristic-instantiator.ts | 2 +- .../lib/instantiators/unit-instantiator.ts | 2 +- .../lib/meta-model-element-instantiator.ts | 8 +- .../loader-filters/src/lib/filters.service.ts | 6 +- .../src/lib/filters/default-filter.ts | 12 +-- .../src/lib/filters/properties-filter.ts | 12 +-- .../src/lib/models/filter-relations.ts | 2 +- .../src/lib/aspect-meta-model/base.ts | 6 +- .../default-abstract-entity.ts | 2 +- .../default-abstract-property.ts | 8 +- .../lib/aspect-meta-model/default-aspect.ts | 2 +- .../default-characteristic.ts | 7 +- .../src/lib/aspect-meta-model/default-code.ts | 7 +- .../aspect-meta-model/default-collection.ts | 2 +- .../lib/aspect-meta-model/default-duration.ts | 8 +- .../lib/aspect-meta-model/default-either.ts | 8 +- .../default-encoding-constraint.ts | 7 +- .../default-entity-instance.ts | 2 +- .../lib/aspect-meta-model/default-entity.ts | 2 +- .../aspect-meta-model/default-enumeration.ts | 2 +- .../lib/aspect-meta-model/default-event.ts | 9 +- .../default-fixed-point-constraint.ts | 8 +- .../default-language-constraint.ts | 7 +- .../default-length-constraint.ts | 8 +- .../src/lib/aspect-meta-model/default-list.ts | 2 +- .../default-locale-constraint.ts | 7 +- .../aspect-meta-model/default-operation.ts | 2 +- .../lib/aspect-meta-model/default-property.ts | 2 +- .../aspect-meta-model/default-quantifiable.ts | 8 +- .../default-quantity-kind.ts | 7 +- .../default-range-constraint.ts | 2 +- .../default-regular-expression-constraint.ts | 7 +- .../src/lib/aspect-meta-model/default-set.ts | 2 +- .../aspect-meta-model/default-sorted-set.ts | 2 +- .../lib/aspect-meta-model/default-state.ts | 2 +- .../default-structured-value.ts | 2 +- .../aspect-meta-model/default-timeseries.ts | 2 +- .../lib/aspect-meta-model/default-trait.ts | 2 +- .../src/lib/aspect-meta-model/default-unit.ts | 2 +- .../abstract-entity-model.service.ts | 2 +- .../abstract-property-model.service.ts | 2 +- .../element-service/aspect-model.service.ts | 2 +- .../base-entity-model.service.ts | 4 +- .../characteristic-model.service.ts | 4 +- .../constraint-model.service.ts | 2 +- .../element-service/element-model.service.ts | 6 +- .../element-service/entity-model.service.ts | 2 +- .../entity-value-model.service.ts | 2 +- .../element-service/event-model.service.ts | 5 +- .../operation-model.service.ts | 2 +- .../file-resource-remove.service.ts | 5 +- .../point3d-remove.service.ts | 5 +- .../timeseries-entity-remove.service.ts | 5 +- .../element-service/property-model.service.ts | 2 +- .../quantifiable-model.service.ts | 2 +- .../element-service/trait-model.service.ts | 2 +- .../lib/element-service/unit-model.service.ts | 2 +- .../services/model-element-naming.service.ts | 5 +- .../loading-migrating.component.ts | 6 +- .../migration-status.component.ts | 6 +- .../start-migrating.component.ts | 2 +- .../version-migration.component.ts | 13 +-- .../libs/migrator/src/lib/migrator.service.ts | 12 +-- .../src/lib/helpers/mx-graph-helper.ts | 2 +- .../lib/helpers/mx-graph-visitor-helper.ts | 4 +- .../src/lib/renderers/mx-graph-renderer.ts | 2 +- .../lib/renderers/shape-language-remover.ts | 2 +- .../lib/services/mx-graph-setup.service.ts | 12 +-- .../mx-graph-shape-overlay.service.ts | 18 ++-- .../src/lib/services/mx-graph.service.ts | 10 +- .../abstract-entity-render.service.ts | 2 +- .../abstract-property-render.service.ts | 2 +- .../base-entity-renderer.service.ts | 10 +- .../render-models/base-render-service.ts | 6 +- .../characteristic-render.service.ts | 18 ++-- .../render-models/entity-render.service.ts | 2 +- .../entity-value-render.service.ts | 6 +- .../enumeration-render.service.ts | 6 +- .../render-models/model-render.service.ts | 2 +- .../render-models/property-render.service.ts | 4 +- .../render-models/unit-render.service.ts | 4 +- .../mx-graph/src/lib/themes/theme.service.ts | 2 +- .../select-namespaces.component.ts | 6 +- .../components/summary/summary.component.ts | 2 +- .../validate/validate.components.ts | 5 +- .../file-conflict/file-conflict.component.ts | 5 +- .../components/summary/summary.component.ts | 7 +- .../validate/validate.components.ts | 5 +- .../clipboard-copy-button.component.ts | 2 +- .../components/error/error.component.ts | 5 +- .../workspace-summary.component.ts | 7 +- .../lib/shared/models/namespace-session.ts | 2 +- .../services/namespaces-manager.service.ts | 12 +-- .../rdf/src/lib/services/model.service.ts | 14 +-- .../lib/services/rdf-serializer.service.ts | 6 +- core/libs/rdf/src/lib/services/rdf.service.ts | 6 +- core/libs/rdf/src/lib/utils/rdf-model-util.ts | 4 +- .../language-settings.component.ts | 7 +- .../setting-dialog.component.ts | 8 +- .../editor-configuration.component.ts | 5 +- .../src/lib/services/settings-form.service.ts | 4 +- .../language-configuration-update.strategy.ts | 7 +- .../lib/components/alert/alert.component.ts | 5 +- .../loading-screen.component.ts | 5 +- .../shared/src/lib/http-error.interceptor.ts | 13 ++- .../src/lib/model/electron-signals.model.ts | 4 +- .../src/lib/model/file-content.model.ts | 5 +- .../shared/src/lib/model/namespace.model.ts | 5 +- .../src/lib/model/notification.model.ts | 7 +- .../lib/services/electron-tunnel.service.ts | 50 +++++----- .../services/model-saving-tracker.service.ts | 4 +- .../draggable-element.component.ts | 6 +- .../sidebar-samm-elements.component.ts | 5 +- .../sidebar/src/lib/sidebar-state.service.ts | 13 ++- .../src/lib/sidebar/sidebar.component.ts | 2 +- .../workspace-file-elements.component.ts | 6 +- .../workspace-file-list.component.ts | 2 +- .../workspace-migrate.component.ts | 5 +- .../src/lib/workspace/workspace.component.ts | 2 +- .../services/language-translation.service.ts | 4 +- .../elements-search.component.ts | 2 +- .../files-search/files-search.component.ts | 14 +-- core/libs/utils/src/lib/utils.ts | 2 +- core/libs/vocabulary/src/lib/samm.ts | 5 +- 327 files changed, 1405 insertions(+), 1094 deletions(-) diff --git a/core/apps/ame-e2e/src/fixtures/valid-documentation.html b/core/apps/ame-e2e/src/fixtures/valid-documentation.html index c71898e6..721a6ae1 100644 --- a/core/apps/ame-e2e/src/fixtures/valid-documentation.html +++ b/core/apps/ame-e2e/src/fixtures/valid-documentation.html @@ -11,7 +11,7 @@ ~ SPDX-License-Identifier: MPL-2.0 --> - + Test Documentation diff --git a/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-characteristic-reference.cy.ts b/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-characteristic-reference.cy.ts index 1fcde57b..b6953c0a 100644 --- a/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-characteristic-reference.cy.ts +++ b/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-characteristic-reference.cy.ts @@ -39,7 +39,7 @@ describe('Test drag and drop ext characteristic', () => { }, { fixture: `/external-reference/different-namespace/without-childrens/${fileName}`, - } + }, ); cy.visitDefault().then(() => @@ -61,7 +61,7 @@ describe('Test drag and drop ext characteristic', () => { expect(rdf).to.contain(':property1 a samm:Property'); expect(rdf).to.contain('samm:characteristic ext-different:ExternalCharacteristic'); expect(rdf).not.contain(':ExternalCharacteristic a samm:Characteristic'); - }) + }), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-constraint-reference.cy.ts b/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-constraint-reference.cy.ts index b31cf119..8fca650f 100644 --- a/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-constraint-reference.cy.ts +++ b/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-constraint-reference.cy.ts @@ -41,7 +41,7 @@ describe('Test drag and drop ext constraint', () => { }, { fixture: `/external-reference/different-namespace/without-childrens/${fileName}`, - } + }, ); cy.visitDefault().then(() => @@ -71,7 +71,7 @@ describe('Test drag and drop ext constraint', () => { expect(rdf).to.contain(':Characteristic1 a samm:Characteristic'); expect(rdf).to.contain('samm-c:constraint ext-different:ExternalConstraint'); expect(rdf).not.contain(':ExternalConstraint a samm:Constraint'); - }) + }), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-entity-reference.cy.ts b/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-entity-reference.cy.ts index 6829673a..40ad7a86 100644 --- a/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-entity-reference.cy.ts +++ b/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-entity-reference.cy.ts @@ -38,7 +38,7 @@ describe('Test drag and drop', () => { }, { fixture: `/external-reference/different-namespace/without-childrens/${fileName}`, - } + }, ); cy.visitDefault().then(() => @@ -64,7 +64,7 @@ describe('Test drag and drop', () => { expect(rdf).to.contain('samm:dataType ext-different:ExternalEntity'); expect(rdf).not.contain(':ExternalEntity a samm:Entity'); - }) + }), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-property-reference-with-children.cy.ts b/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-property-reference-with-children.cy.ts index 8a180269..1ae173c7 100644 --- a/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-property-reference-with-children.cy.ts +++ b/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-property-reference-with-children.cy.ts @@ -38,7 +38,7 @@ describe('Test drag and drop ext properties', () => { }, { fixture: `/external-reference/different-namespace/with-childrens/${fileName}`, - } + }, ); cy.visitDefault().then(() => @@ -69,7 +69,7 @@ describe('Test drag and drop ext properties', () => { expect(rdf).not.contain('samm:characteristic samm-c:Boolean'); expect(rdf).not.contain(':ChildrenCharacteristic2 a samm:Characteristic'); expect(rdf).not.contain(':ChildrenEntity2 a samm:Entity'); - }) + }), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-property-reference.cy.ts b/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-property-reference.cy.ts index 0a22d6cc..6346f00d 100644 --- a/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-property-reference.cy.ts +++ b/core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-property-reference.cy.ts @@ -38,7 +38,7 @@ describe('Test drag and drop ext properties', () => { }, { fixture: `/external-reference/different-namespace/without-childrens/${fileName}`, - } + }, ); cy.visitDefault().then(() => @@ -63,7 +63,7 @@ describe('Test drag and drop ext properties', () => { expect(rdf).to.contain(':Characteristic1 a samm:Characteristic'); expect(rdf).not.contain(':externalProperty a samm:Property'); - }) + }), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/drag-and-drop/new-elements.cy.ts b/core/apps/ame-e2e/src/integration/drag-and-drop/new-elements.cy.ts index 31d73d22..2a27a04a 100644 --- a/core/apps/ame-e2e/src/integration/drag-and-drop/new-elements.cy.ts +++ b/core/apps/ame-e2e/src/integration/drag-and-drop/new-elements.cy.ts @@ -49,7 +49,9 @@ describe('Test drag and drop', () => { .then(() => cy.clickConnectShapes('AspectDefault', 'operation1')) .then(() => - cyHelp.hasAddInputAndOutputShapeOverlay('operation1').then(hasInputAndOutputOverlay => expect(hasInputAndOutputOverlay).equal(true)) + cyHelp + .hasAddInputAndOutputShapeOverlay('operation1') + .then(hasInputAndOutputOverlay => expect(hasInputAndOutputOverlay).equal(true)), ) .then(() => cy.clickConnectShapes('property2', 'Trait1')) @@ -77,7 +79,7 @@ describe('Test drag and drop', () => { expect(aspect.properties[1].property.characteristic.name).to.equals('Trait1'); expect(aspect.properties[1].property.characteristic.baseCharacteristic.name).to.equals('Characteristic1'); expect(aspect.properties[1].property.characteristic.baseCharacteristic.dataType.name).to.equals('Entity1'); - }) + }), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-characteristic-reference.cy.ts b/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-characteristic-reference.cy.ts index aae3654e..8c7ad9d4 100644 --- a/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-characteristic-reference.cy.ts +++ b/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-characteristic-reference.cy.ts @@ -41,7 +41,7 @@ describe('Test drag and drop ext characteristic', () => { }, { fixture: `/external-reference/same-namespace/without-childrens/${fileName}`, - } + }, ); cy.visitDefault().then(() => @@ -62,7 +62,7 @@ describe('Test drag and drop ext characteristic', () => { expect(rdf).to.contain(':property1 a samm:Property'); expect(rdf).to.contain('samm:characteristic :ExternalCharacteristic'); expect(rdf).not.contain(':ExternalCharacteristic a samm:Characteristic'); - }) + }), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-constraint-reference.cy.ts b/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-constraint-reference.cy.ts index 5e614efb..5a487ea7 100644 --- a/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-constraint-reference.cy.ts +++ b/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-constraint-reference.cy.ts @@ -43,7 +43,7 @@ describe('Test drag and drop ext constraint', () => { }, { fixture: `/external-reference/same-namespace/without-childrens/${fileName}`, - } + }, ); cy.visitDefault().then(() => @@ -71,7 +71,7 @@ describe('Test drag and drop ext constraint', () => { expect(rdf).to.contain(':Characteristic1 a samm:Characteristic'); expect(rdf).to.contain('samm-c:constraint :ExternalConstraint'); expect(rdf).not.contain(':ExternalConstraint a samm:Constraint'); - }) + }), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-entity-reference.cy.ts b/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-entity-reference.cy.ts index 3914c089..11e334c4 100644 --- a/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-entity-reference.cy.ts +++ b/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-entity-reference.cy.ts @@ -38,7 +38,7 @@ describe('Test drag and drop', () => { }, { fixture: `/external-reference/same-namespace/without-childrens/${fileName}`, - } + }, ); cy.visitDefault().then(() => @@ -62,7 +62,7 @@ describe('Test drag and drop', () => { expect(rdf).to.contain('samm:dataType :ExternalEntity'); expect(rdf).not.contain(':ExternalEntity a samm:Entity'); - }) + }), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-property-reference-with-children.cy.ts b/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-property-reference-with-children.cy.ts index 8bc7c9c9..e2d5f855 100644 --- a/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-property-reference-with-children.cy.ts +++ b/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-property-reference-with-children.cy.ts @@ -38,7 +38,7 @@ describe('Test drag and drop ext properties', () => { }, { fixture: `/external-reference/same-namespace/with-childrens/${fileName}`, - } + }, ); cy.visitDefault().then(() => @@ -66,7 +66,7 @@ describe('Test drag and drop ext properties', () => { expect(rdf).not.contain('samm:characteristic samm-c:Boolean'); expect(rdf).not.contain(':ChildrenCharacteristic2 a samm:Characteristic'); expect(rdf).not.contain(':ChildrenEntity2 a samm:Entity'); - }) + }), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-property-reference.cy.ts b/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-property-reference.cy.ts index b9790aab..08d84845 100644 --- a/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-property-reference.cy.ts +++ b/core/apps/ame-e2e/src/integration/drag-and-drop/same-namespace/external-property-reference.cy.ts @@ -38,7 +38,7 @@ describe('Test drag and drop ext properties', () => { }, { fixture: `/external-reference/same-namespace/without-childrens/${fileName}`, - } + }, ); cy.visitDefault().then(() => @@ -60,7 +60,7 @@ describe('Test drag and drop ext properties', () => { expect(rdf).to.contain('samm:characteristic :Characteristic1'); expect(rdf).to.contain(':Characteristic1 a samm:Characteristic'); expect(rdf).not.contain(':externalProperty a samm:Property'); - }) + }), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/editor/create-recursive-element.cy.ts b/core/apps/ame-e2e/src/integration/editor/create-recursive-element.cy.ts index e4729a5b..5116f835 100644 --- a/core/apps/ame-e2e/src/integration/editor/create-recursive-element.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/create-recursive-element.cy.ts @@ -81,10 +81,10 @@ describe('Test create recursive element', () => { expect(rdf).to.contain(':newProperty3 a samm:Property;\n' + ' samm:characteristic :NewCharacteristic.'); cy.getAspect().then(aspect => { expect(aspect.properties[0].property.characteristic.dataType.properties[0].property.characteristic.name).to.equal( - 'NewCharacteristic' + 'NewCharacteristic', ); expect(aspect.properties[0].property.characteristic.dataType.properties[1].property.characteristic.name).to.equal( - 'NewCharacteristic' + 'NewCharacteristic', ); }); cyHelp.hasAddShapeOverlay('newProperty2').then(addShapeIcon => expect(addShapeIcon).to.be.false); @@ -122,7 +122,7 @@ describe('Test create recursive element', () => { expect(rdf).to.contain(':newProperty2 a samm:Property;\n' + ' samm:characteristic :Property1Trait.'); expect(rdf).to.contain(':newProperty3 a samm:Property;\n' + ' samm:characteristic :Property1Trait.'); expect(rdf).to.contain( - ':Property1Trait a samm-c:Trait;\n' + ' samm-c:baseCharacteristic :Characteristic1;\n' + ' samm-c:constraint :Constraint1.' + ':Property1Trait a samm-c:Trait;\n' + ' samm-c:baseCharacteristic :Characteristic1;\n' + ' samm-c:constraint :Constraint1.', ); expect(rdf).to.contain(':Constraint1 a samm:Constraint.\n'); expect(rdf).to.contain(':Characteristic1 a samm:Characteristic;\n' + ' samm:dataType :NewEntity.'); diff --git a/core/apps/ame-e2e/src/integration/editor/edit-abstract-entity.cy.ts b/core/apps/ame-e2e/src/integration/editor/edit-abstract-entity.cy.ts index 1ff944f5..32cee77d 100644 --- a/core/apps/ame-e2e/src/integration/editor/edit-abstract-entity.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/edit-abstract-entity.cy.ts @@ -74,7 +74,7 @@ describe('Create and Edit Abstract Entity', () => { .then(() => cy.get(FIELD_preferredNameen).focus().clear().type('New preferred Name')) .then(() => cyHelp.clickSaveButton()) .then(() => - cy.getCellLabel('AbstractEntity1', META_MODEL_preferredName).should('eq', `${META_MODEL_preferredName} = New preferred Name @en`) + cy.getCellLabel('AbstractEntity1', META_MODEL_preferredName).should('eq', `${META_MODEL_preferredName} = New preferred Name @en`), ) .then(() => cy.getUpdatedRDF()) .then(rdf => expect(rdf).to.contain('samm:preferredName "New preferred Name"@en')); @@ -86,7 +86,7 @@ describe('Create and Edit Abstract Entity', () => { .then(() => cy.get(FIELD_descriptionen).focus().clear().type('New description')) .then(() => cyHelp.clickSaveButton()) .then(() => - cy.getCellLabel('AbstractEntity1', META_MODEL_description).should('eq', `${META_MODEL_description} = New description @en`) + cy.getCellLabel('AbstractEntity1', META_MODEL_description).should('eq', `${META_MODEL_description} = New description @en`), ) .then(() => cy.getUpdatedRDF().then(rdf => expect(rdf).to.contain('samm:description "New description"@en'))); }); @@ -99,7 +99,7 @@ describe('Create and Edit Abstract Entity', () => { .then(() => cy .getCellLabel('AbstractEntity1', META_MODEL_see) - .should('eq', `${META_MODEL_see} = urn:irdi:eclass:0173-1#02-AAO677,urn:irdi:iec:0112/2///62683#ACC011#001`) + .should('eq', `${META_MODEL_see} = urn:irdi:eclass:0173-1#02-AAO677,urn:irdi:iec:0112/2///62683#ACC011#001`), ) .then(() => cy.getUpdatedRDF()) .then(rdf => expect(rdf).to.contain('samm:see , ')); @@ -156,7 +156,7 @@ describe('Create and Edit Abstract Entity', () => { it('should reconnect to AbstractEntity1', () => { cy.then(() => cy.clickConnectShapes('Entity1', 'AbstractEntity1')).then(() => - cy.getCellLabel('Entity1', 'extends').should('eq', 'extends = AbstractEntity1') + cy.getCellLabel('Entity1', 'extends').should('eq', 'extends = AbstractEntity1'), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/editor/edit-abstract-property.cy.ts b/core/apps/ame-e2e/src/integration/editor/edit-abstract-property.cy.ts index 24602b7d..b0634332 100644 --- a/core/apps/ame-e2e/src/integration/editor/edit-abstract-property.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/edit-abstract-property.cy.ts @@ -73,7 +73,7 @@ describe('Create and Edit Abstract Property', () => { .then(() => cy .getCellLabel('abstractProperty1', META_MODEL_preferredName) - .should('eq', `${META_MODEL_preferredName} = New preferred Name @en`) + .should('eq', `${META_MODEL_preferredName} = New preferred Name @en`), ) .then(() => cy.getUpdatedRDF()) .then(rdf => expect(rdf).to.contain('samm:preferredName "New preferred Name"@en')); @@ -85,7 +85,7 @@ describe('Create and Edit Abstract Property', () => { .then(() => cy.get(FIELD_descriptionen).focus().clear().type('New description')) .then(() => cyHelp.clickSaveButton()) .then(() => - cy.getCellLabel('abstractProperty1', META_MODEL_description).should('eq', `${META_MODEL_description} = New description @en`) + cy.getCellLabel('abstractProperty1', META_MODEL_description).should('eq', `${META_MODEL_description} = New description @en`), ) .then(() => cy.getUpdatedRDF().then(rdf => expect(rdf).to.contain('samm:description "New description"@en'))); }); @@ -98,7 +98,7 @@ describe('Create and Edit Abstract Property', () => { .then(() => cy .getCellLabel('abstractProperty1', META_MODEL_see) - .should('eq', `${META_MODEL_see} = urn:irdi:eclass:0173-1#02-AAO677,urn:irdi:iec:0112/2///62683#ACC011#001`) + .should('eq', `${META_MODEL_see} = urn:irdi:eclass:0173-1#02-AAO677,urn:irdi:iec:0112/2///62683#ACC011#001`), ) .then(() => cy.getUpdatedRDF()) .then(rdf => expect(rdf).to.contain('samm:see , ')); @@ -107,7 +107,7 @@ describe('Create and Edit Abstract Property', () => { .then(() => cy.removeSeeElements().addSeeElements('urn:irdi:eclass:0173-1#02-AAO677')) .then(() => cyHelp.clickSaveButton()) .then(() => - cy.getCellLabel('abstractProperty1', META_MODEL_see).should('eq', `${META_MODEL_see} = urn:irdi:eclass:0173-1#02-AAO677`) + cy.getCellLabel('abstractProperty1', META_MODEL_see).should('eq', `${META_MODEL_see} = urn:irdi:eclass:0173-1#02-AAO677`), ) .then(() => cy.getUpdatedRDF()) .then(rdf => expect(rdf).to.contain('samm:see ')); diff --git a/core/apps/ame-e2e/src/integration/editor/edit-aspect.cy.ts b/core/apps/ame-e2e/src/integration/editor/edit-aspect.cy.ts index 285c3b1f..6133f520 100644 --- a/core/apps/ame-e2e/src/integration/editor/edit-aspect.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/edit-aspect.cy.ts @@ -97,7 +97,7 @@ describe('Test editing Aspect', () => { .then(() => cy .getCellLabel('NewAspect', META_MODEL_preferredName) - .should('eq', `${META_MODEL_preferredName} = New Preffered Name for Aspect @en`) + .should('eq', `${META_MODEL_preferredName} = New Preffered Name for Aspect @en`), ) .then(() => cy.getUpdatedRDF()) .then(rdf => expect(rdf).to.contain('samm:preferredName "New Preffered Name for Aspect"@en')) @@ -113,7 +113,7 @@ describe('Test editing Aspect', () => { .then(() => cy .getCellLabel('NewAspect', META_MODEL_description) - .should('eq', `${META_MODEL_description} = New description for the aspect model @en`) + .should('eq', `${META_MODEL_description} = New description for the aspect model @en`), ) .then(() => cy.getUpdatedRDF().then(rdf => expect(rdf).to.contain('samm:description "New description for the aspect model"@en'))) .then(() => cy.getAspect().then(aspect => expect(aspect.getDescription('en')).to.equal('New description for the aspect model'))); @@ -127,16 +127,16 @@ describe('Test editing Aspect', () => { .then(() => cy .getCellLabel('NewAspect', META_MODEL_see) - .should('eq', `${META_MODEL_see} = http://www.seeA.de,http://www.seeB.de,http://www.seeC.de`) + .should('eq', `${META_MODEL_see} = http://www.seeA.de,http://www.seeB.de,http://www.seeC.de`), ) .then(() => - cy.getUpdatedRDF().then(rdf => expect(rdf).to.contain('samm:see , , ')) + cy.getUpdatedRDF().then(rdf => expect(rdf).to.contain('samm:see , , ')), ) .then(() => cy.getAspect().then(aspect => { expect(aspect.getSeeReferences()).to.have.length(3); expect(aspect.getSeeReferences()[2]).to.equal('http://www.seeC.de'); - }) + }), ); cy.dbClickShape('NewAspect') .then(() => cy.removeSeeElements('http://www.seeB.de')) @@ -148,7 +148,7 @@ describe('Test editing Aspect', () => { cy.getAspect().then(aspect => { expect(aspect.getSeeReferences()).to.have.length(2); expect(aspect.getSeeReferences()[1]).to.equal('http://www.seeC.de'); - }) + }), ); }); @@ -161,7 +161,7 @@ describe('Test editing Aspect', () => { .then(() => cy .getCellLabel('NewAspect', META_MODEL_see) - .should('eq', `${META_MODEL_see} = urn:irdi:eclass:0173-1#02-AAO677,urn:irdi:iec:0112/2///62683#ACC011#001`) + .should('eq', `${META_MODEL_see} = urn:irdi:eclass:0173-1#02-AAO677,urn:irdi:iec:0112/2///62683#ACC011#001`), ) .then(() => cy.getUpdatedRDF()) .then(rdf => expect(rdf).to.contain('samm:see , ')) diff --git a/core/apps/ame-e2e/src/integration/editor/edit-characteristic.cy.ts b/core/apps/ame-e2e/src/integration/editor/edit-characteristic.cy.ts index 314ff24d..45e7425f 100644 --- a/core/apps/ame-e2e/src/integration/editor/edit-characteristic.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/edit-characteristic.cy.ts @@ -70,25 +70,25 @@ describe('Test editing Characteristic', () => { cy.shapeExists('Characteristic1') .then(() => cy.dbClickShape('Characteristic1')) .then(() => - cy.get(FIELD_descriptionen).clear({force: true}).type('New description for the new created characteristic', {force: true}) + cy.get(FIELD_descriptionen).clear({force: true}).type('New description for the new created characteristic', {force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cy .getCellLabel('Characteristic1', META_MODEL_description) - .should('eq', `${META_MODEL_description} = New description for the new created characteristic @en`) + .should('eq', `${META_MODEL_description} = New description for the new created characteristic @en`), ) .then(() => - cy.getUpdatedRDF().then(rdf => expect(rdf).to.contain('samm:description "New description for the new created characteristic"@en')) + cy.getUpdatedRDF().then(rdf => expect(rdf).to.contain('samm:description "New description for the new created characteristic"@en')), ) .then(() => cy .getAspect() .then(aspect => expect(aspect.properties[0].property.characteristic.getDescription('en')).to.equal( - 'New description for the new created characteristic' - ) - ) + 'New description for the new created characteristic', + ), + ), ); }); @@ -104,7 +104,7 @@ describe('Test editing Characteristic', () => { .get('.mat-mdc-option') .eq(1) .contains('integer') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cy.getCellLabel('Characteristic1', META_MODEL_dataType).should('eq', `${META_MODEL_dataType} = integer`)) @@ -119,24 +119,24 @@ describe('Test editing Characteristic', () => { .then(() => cy .getCellLabel('Characteristic1', META_MODEL_see) - .should('eq', `${META_MODEL_see} = http://www.see1.de,http://www.see2.de,http://www.see3.de`) + .should('eq', `${META_MODEL_see} = http://www.see1.de,http://www.see2.de,http://www.see3.de`), ) .then(() => - cy.getUpdatedRDF().then(rdf => expect(rdf).to.contain('samm:see , , ')) + cy.getUpdatedRDF().then(rdf => expect(rdf).to.contain('samm:see , , ')), ) .then(() => cy.getAspect().then(aspect => { expect(aspect.properties[0].property.characteristic.getSeeReferences()).to.have.length(3); expect(aspect.properties[0].property.characteristic.getSeeReferences()[2]).to.equal('http://www.see3.de'); - }) + }), ); cy.dbClickShape('Characteristic1') .then(() => cy.removeSeeElements('http://www.see2.de')) .then(() => cyHelp.clickSaveButton()) .then(() => - cy.getCellLabel('Characteristic1', META_MODEL_see).should('eq', `${META_MODEL_see} = http://www.see1.de,http://www.see3.de`) + cy.getCellLabel('Characteristic1', META_MODEL_see).should('eq', `${META_MODEL_see} = http://www.see1.de,http://www.see3.de`), ) .then(() => cy.getUpdatedRDF()) .then(rdf => expect(rdf).to.contain('samm:see , ')) @@ -144,7 +144,7 @@ describe('Test editing Characteristic', () => { cy.getAspect().then(aspect => { expect(aspect.properties[0].property.characteristic.getSeeReferences()).to.have.length(2); expect(aspect.properties[0].property.characteristic.getSeeReferences()[1]).to.equal('http://www.see3.de'); - }) + }), ); }); @@ -157,7 +157,7 @@ describe('Test editing Characteristic', () => { .then(() => cy .getCellLabel('Characteristic1', META_MODEL_see) - .should('eq', `${META_MODEL_see} = urn:irdi:eclass:0173-1#02-AAO677,urn:irdi:iec:0112/2///62683#ACC011#001`) + .should('eq', `${META_MODEL_see} = urn:irdi:eclass:0173-1#02-AAO677,urn:irdi:iec:0112/2///62683#ACC011#001`), ) .then(() => cy.getUpdatedRDF()) .then(rdf => expect(rdf).to.contain('samm:see , ')) @@ -188,7 +188,7 @@ describe('Test editing Characteristic', () => { .then(() => cyHelp.clickSaveButton()) .then(() => - cy.getCellLabel('Characteristic1', META_MODEL_preferredName).should('eq', `${META_MODEL_preferredName} = new-preferredName @en`) + cy.getCellLabel('Characteristic1', META_MODEL_preferredName).should('eq', `${META_MODEL_preferredName} = new-preferredName @en`), ) .then(() => cy.getUpdatedRDF()) .then(rdf => expect(rdf).to.contain('samm:preferredName "new-preferredName"@en')) @@ -242,7 +242,7 @@ describe('Test editing Characteristic', () => { .then(() => cy.dbClickShape('NewCharacteristic')) .then(() => cy.get(FIELD_characteristicName).click({force: true}).get('mat-option').contains('Measurement').click({force: true})) .then(() => - cy.get(FIELD_unit).clear({force: true}).type('amper', {force: true}).get('mat-option').contains('ampere').click({force: true}) + cy.get(FIELD_unit).clear({force: true}).type('amper', {force: true}).get('mat-option').contains('ampere').click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cy.getAspect()) @@ -262,7 +262,7 @@ describe('Test editing Characteristic', () => { ' samm:dataType xsd:integer;\n' + ' samm:description "New description for the new created characteristic"@en;\n' + ' samm:see ;\n' + - ' samm:preferredName "new-preferredName"@en.' + ' samm:preferredName "new-preferredName"@en.', ); }) .then(() => cy.getAspect()) @@ -285,7 +285,7 @@ describe('Test editing Characteristic', () => { ' samm:see ;\n' + ' samm:preferredName "new-preferredName"@en;\n' + ' samm-c:values' + - ' (1 2 "a"^^xsd:integer "b"^^xsd:integer 3 4).' + ' (1 2 "a"^^xsd:integer "b"^^xsd:integer 3 4).', ); }) .then(() => cy.getAspect()) @@ -305,8 +305,8 @@ describe('Test editing Characteristic', () => { ' samm:description "New description for the new created characteristic"@en;\n' + ' samm:see ;\n' + ' samm:preferredName "new-preferredName"@en;\n' + - ' samm-c:values (2 "b"^^xsd:integer 3).' - ) + ' samm-c:values (2 "b"^^xsd:integer 3).', + ), ); }); @@ -314,7 +314,7 @@ describe('Test editing Characteristic', () => { cy.shapeExists('NewCharacteristic') .then(() => cy.dbClickShape('NewCharacteristic')) .then(() => - cy.get(FIELD_characteristicName).click({force: true}).get('mat-option').contains('MultiLanguageText').click({force: true}) + cy.get(FIELD_characteristicName).click({force: true}).get('mat-option').contains('MultiLanguageText').click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cyHelp.getAddShapePlusIcon('MultiLanguageText').then(addShapeIcon => expect(addShapeIcon).to.be.false)); @@ -363,8 +363,8 @@ describe('Test editing Characteristic', () => { ':NewAspect a samm:Aspect;\n' + ' samm:properties (:property1 :property2);\n' + ' samm:operations ();\n' + - ' samm:events ().' - ) + ' samm:events ().', + ), ); }); }); @@ -413,7 +413,7 @@ describe('Structured Value Characteristic', () => { cy .get(`[data-cy="property-${groups[index]}"] [data-cy="property-element"]`) .eq(placeNumber) - .should('have.value', properties[index]) + .should('have.value', properties[index]), ) .then(() => cy.get(`[data-cy="property-${groups[index]}"] [data-cy="property-element"]`).eq(placeNumber).should('not.be.enabled')); } @@ -443,12 +443,12 @@ describe('Structured Value Characteristic', () => { .then(() => cy .shapeExists('UsernameCharacteristic') - .then(() => cyHelp.hasAddShapeOverlay('UsernameCharacteristic').then(addShapeIcon => expect(addShapeIcon).to.be.false)) + .then(() => cyHelp.hasAddShapeOverlay('UsernameCharacteristic').then(addShapeIcon => expect(addShapeIcon).to.be.false)), ) .then(() => cy .shapeExists('HostCharacteristic') - .then(() => cyHelp.hasAddShapeOverlay('HostCharacteristic').then(addShapeIcon => expect(addShapeIcon).to.be.false)) + .then(() => cyHelp.hasAddShapeOverlay('HostCharacteristic').then(addShapeIcon => expect(addShapeIcon).to.be.false)), ) .then(() => cy.dbClickShape('Characteristic1')) .then(() => cy.get(FIELD_deconstructionRuleInput).should('not.be.enabled')) @@ -458,7 +458,7 @@ describe('Structured Value Characteristic', () => { ':Characteristic1 a samm-c:StructuredValue;\n' + ' samm:dataType xsd:string;\n' + ' samm-c:deconstructionRule "([\\\\w\\\\.-]+)@([\\\\w\\\\.-]+\\\\.\\\\w{2,4})";\n' + - ' samm-c:elements (:username "@" :host).' + ' samm-c:elements (:username "@" :host).', ); }); } @@ -469,12 +469,12 @@ describe('Structured Value Characteristic', () => { startApplication() .then(() => cy.dbClickShape('Characteristic1')) .then(() => - cy.get(FIELD_characteristicName).click({force: true}).get('mat-option').contains('StructuredValue').click({force: true}) + cy.get(FIELD_characteristicName).click({force: true}).get('mat-option').contains('StructuredValue').click({force: true}), ) .then(() => cy.get(FIELD_deconstructionRuleSelect).click({force: true})) .then(() => cy.get('[value="--custom-rule--"]').click({force: true})) .then(() => - cy.get(FIELD_deconstructionRuleInput).clear({force: true}).type('example-(group1)-splitter-(group2)-(group3)', {force: true}) + cy.get(FIELD_deconstructionRuleInput).clear({force: true}).type('example-(group1)-splitter-(group2)-(group3)', {force: true}), ) .then(() => cy.wait(500)) .then(() => cy.get(FIELD_elementsModalButton).click({force: true})) @@ -501,7 +501,7 @@ describe('Structured Value Characteristic', () => { cy.dbClickShape('Characteristic1') .then(() => cy.get(FIELD_deconstructionRuleSelect).should('contain', 'Custom Rule')) .then(() => - cy.get(FIELD_deconstructionRuleInput).should('be.enabled').should('have.value', 'example-(group1)-splitter-(group2)-(group3)') + cy.get(FIELD_deconstructionRuleInput).should('be.enabled').should('have.value', 'example-(group1)-splitter-(group2)-(group3)'), ) .then(() => cy.get(FIELD_elementsModalButton).click({force: true})) .then(() => shouldHaveValues(['(group1)', '(group2)', '(group3)'], ['group1Property', 'group2Property', 'group3Property'])) @@ -516,17 +516,17 @@ describe('Structured Value Characteristic', () => { .then(() => cy .shapeExists('Characteristic2') - .then(() => cyHelp.hasAddShapeOverlay('Characteristic2').then(addShapeIcon => expect(addShapeIcon).to.be.false)) + .then(() => cyHelp.hasAddShapeOverlay('Characteristic2').then(addShapeIcon => expect(addShapeIcon).to.be.false)), ) .then(() => cy .shapeExists('Characteristic3') - .then(() => cyHelp.hasAddShapeOverlay('Characteristic3').then(addShapeIcon => expect(addShapeIcon).to.be.false)) + .then(() => cyHelp.hasAddShapeOverlay('Characteristic3').then(addShapeIcon => expect(addShapeIcon).to.be.false)), ) .then(() => cy .shapeExists('Characteristic4') - .then(() => cyHelp.hasAddShapeOverlay('Characteristic4').then(addShapeIcon => expect(addShapeIcon).to.be.false)) + .then(() => cyHelp.hasAddShapeOverlay('Characteristic4').then(addShapeIcon => expect(addShapeIcon).to.be.false)), ); }); @@ -536,7 +536,7 @@ describe('Structured Value Characteristic', () => { ':Characteristic1 a samm-c:StructuredValue;\n' + ' samm:dataType xsd:string;\n' + ' samm-c:deconstructionRule "example-(group1)-splitter-(group2)-(group3)";\n' + - ' samm-c:elements ("example-" :group1Property "-splitter-" :group2Property "-" :group3Property).' + ' samm-c:elements ("example-" :group1Property "-splitter-" :group2Property "-" :group3Property).', ); }); }); @@ -551,7 +551,7 @@ describe('Structured Value Characteristic', () => { startApplication() .then(() => cy.dbClickShape('Characteristic1')) .then(() => - cy.get(FIELD_characteristicName).click({force: true}).get('mat-option').contains('StructuredValue').click({force: true}) + cy.get(FIELD_characteristicName).click({force: true}).get('mat-option').contains('StructuredValue').click({force: true}), ) .then(() => cy.get(FIELD_deconstructionRuleSelect).click({force: true})) .then(() => cy.contains('ISO 8601 Date').click({force: true})) @@ -567,17 +567,17 @@ describe('Structured Value Characteristic', () => { .then(() => cy .shapeExists('YearCharacteristic') - .then(() => cyHelp.hasAddShapeOverlay('YearCharacteristic').then(addShapeIcon => expect(addShapeIcon).to.be.false)) + .then(() => cyHelp.hasAddShapeOverlay('YearCharacteristic').then(addShapeIcon => expect(addShapeIcon).to.be.false)), ) .then(() => cy .shapeExists('MonthCharacteristic') - .then(() => cyHelp.hasAddShapeOverlay('MonthCharacteristic').then(addShapeIcon => expect(addShapeIcon).to.be.false)) + .then(() => cyHelp.hasAddShapeOverlay('MonthCharacteristic').then(addShapeIcon => expect(addShapeIcon).to.be.false)), ) .then(() => cy .shapeExists('DayCharacteristic') - .then(() => cyHelp.hasAddShapeOverlay('DayCharacteristic').then(addShapeIcon => expect(addShapeIcon).to.be.false)) + .then(() => cyHelp.hasAddShapeOverlay('DayCharacteristic').then(addShapeIcon => expect(addShapeIcon).to.be.false)), ) .then(() => cy.dbClickShape('Characteristic1')) .then(() => cy.get(FIELD_deconstructionRuleInput).should('not.be.enabled')) @@ -587,7 +587,7 @@ describe('Structured Value Characteristic', () => { ':Characteristic1 a samm-c:StructuredValue;\n' + ' samm:dataType xsd:string;\n' + ' samm-c:deconstructionRule "(\\\\d{4})-(\\\\d{2})-(\\\\d{2})";\n' + - ' samm-c:elements (:year "-" :month "-" :day).' + ' samm-c:elements (:year "-" :month "-" :day).', ); }); }); @@ -596,7 +596,7 @@ describe('Structured Value Characteristic', () => { startApplication() .then(() => cy.dbClickShape('Characteristic1')) .then(() => - cy.get(FIELD_characteristicName).click({force: true}).get('mat-option').contains('StructuredValue').click({force: true}) + cy.get(FIELD_characteristicName).click({force: true}).get('mat-option').contains('StructuredValue').click({force: true}), ) .then(() => cy.get(FIELD_deconstructionRuleSelect).click({force: true})) .then(() => cy.contains('Hex-encoded color').click({force: true})) @@ -612,17 +612,17 @@ describe('Structured Value Characteristic', () => { .then(() => cy .shapeExists('RedCharacteristic') - .then(() => cyHelp.hasAddShapeOverlay('RedCharacteristic').then(addShapeIcon => expect(addShapeIcon).to.be.false)) + .then(() => cyHelp.hasAddShapeOverlay('RedCharacteristic').then(addShapeIcon => expect(addShapeIcon).to.be.false)), ) .then(() => cy .shapeExists('GreenCharacteristic') - .then(() => cyHelp.hasAddShapeOverlay('GreenCharacteristic').then(addShapeIcon => expect(addShapeIcon).to.be.false)) + .then(() => cyHelp.hasAddShapeOverlay('GreenCharacteristic').then(addShapeIcon => expect(addShapeIcon).to.be.false)), ) .then(() => cy .shapeExists('BlueCharacteristic') - .then(() => cyHelp.hasAddShapeOverlay('BlueCharacteristic').then(addShapeIcon => expect(addShapeIcon).to.be.false)) + .then(() => cyHelp.hasAddShapeOverlay('BlueCharacteristic').then(addShapeIcon => expect(addShapeIcon).to.be.false)), ) .then(() => cy.dbClickShape('Characteristic1')) .then(() => cy.get(FIELD_deconstructionRuleInput).should('not.be.enabled')) @@ -632,7 +632,7 @@ describe('Structured Value Characteristic', () => { ':Characteristic1 a samm-c:StructuredValue;\n' + ' samm:dataType xsd:string;\n' + ' samm-c:deconstructionRule "0x([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})";\n' + - ' samm-c:elements ("0x" :red :green :blue).' + ' samm-c:elements ("0x" :red :green :blue).', ); }); }); @@ -664,7 +664,7 @@ describe('Structured Value Characteristic', () => { ':Characteristic1 a samm-c:StructuredValue;\n' + ' samm:dataType xsd:string;\n' + ' samm-c:deconstructionRule "([\\\\w\\\\.-]+)@([\\\\w\\\\.-]+\\\\.\\\\w{2,4})";\n' + - ' samm-c:elements (:property2 "@").' + ' samm-c:elements (:property2 "@").', ); }); }); @@ -684,7 +684,7 @@ describe('Structured Value Characteristic', () => { ':Characteristic1 a samm-c:StructuredValue;\n' + ' samm:dataType xsd:string;\n' + ' samm-c:deconstructionRule "([\\\\w\\\\.-]+)@([\\\\w\\\\.-]+\\\\.\\\\w{2,4})";\n' + - ' samm-c:elements (:property2 "@" :property3).' + ' samm-c:elements (:property2 "@" :property3).', ); }); }); @@ -702,7 +702,7 @@ describe('Structured Value Characteristic', () => { ':Characteristic1 a samm-c:StructuredValue;\n' + ' samm:dataType xsd:string;\n' + ' samm-c:deconstructionRule "([\\\\w\\\\.-]+)@([\\\\w\\\\.-]+\\\\.\\\\w{2,4})(regex)";\n' + - ' samm-c:elements (:property2 "@" :property3 :property4).' + ' samm-c:elements (:property2 "@" :property3 :property4).', ); }); }); diff --git a/core/apps/ame-e2e/src/integration/editor/edit-collection.cy.ts b/core/apps/ame-e2e/src/integration/editor/edit-collection.cy.ts index 665bed33..2e47b21e 100644 --- a/core/apps/ame-e2e/src/integration/editor/edit-collection.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/edit-collection.cy.ts @@ -207,7 +207,7 @@ describe('Test editing different Collections', () => { .type('Characteristic2', {force: true}) .get('mat-option') .contains('Characteristic2') - .click({force: true}) + .click({force: true}), ) .then(() => cy.get(SELECTOR_editorSaveButton).focus().click({force: true})) .then(() => cy.getUpdatedRDF()) @@ -229,7 +229,7 @@ describe('Test editing different Collections', () => { .type('Entity1', {force: true}) .get('.mat-mdc-option') .contains('Entity1') - .click({force: true}) + .click({force: true}), ) .then(() => cy.get(SELECTOR_editorSaveButton).focus().click({force: true})) .then(() => cy.getUpdatedRDF()) diff --git a/core/apps/ame-e2e/src/integration/editor/edit-either.cy.ts b/core/apps/ame-e2e/src/integration/editor/edit-either.cy.ts index 6ef6e7ae..f58c985e 100644 --- a/core/apps/ame-e2e/src/integration/editor/edit-either.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/edit-either.cy.ts @@ -49,7 +49,7 @@ describe('Test editing Either', () => { .type('LeftCharacteristic', {force: true}) .get('mat-option') .contains('LeftCharacteristic') - .click({force: true}) + .click({force: true}), ) .then(() => cy @@ -58,7 +58,7 @@ describe('Test editing Either', () => { .type('RightCharacteristic', {force: true}) .get('mat-option') .contains('RightCharacteristic') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cyHelp.hasAddLeftAndRightShapeOverlay('Either1')) @@ -94,11 +94,11 @@ describe('Test editing Either', () => { cy.getCellLabel('Either1', META_MODEL_preferredName).should('eq', `${META_MODEL_preferredName} = new-preferredName @en`); cy.getCellLabel('Either1', META_MODEL_description).should( 'eq', - `${META_MODEL_description} = New description for the new created characteristic @en` + `${META_MODEL_description} = New description for the new created characteristic @en`, ); cy.getCellLabel('Either1', META_MODEL_see).should( 'eq', - `${META_MODEL_see} = http://www.see1.de,http://www.see2.de,http://www.see3.de` + `${META_MODEL_see} = http://www.see1.de,http://www.see2.de,http://www.see3.de`, ); }) .then(() => cy.getUpdatedRDF()) @@ -111,7 +111,7 @@ describe('Test editing Either', () => { .then(aspect => { expect(aspect.properties[0].property.characteristic.getPreferredName('en')).to.equal('new-preferredName'); expect(aspect.properties[0].property.characteristic.getDescription('en')).to.equal( - 'New description for the new created characteristic' + 'New description for the new created characteristic', ); expect(aspect.properties[0].property.characteristic.getSeeReferences()).to.have.length(3); expect(aspect.properties[0].property.characteristic.getSeeReferences()[2]).to.equal('http://www.see3.de'); @@ -130,7 +130,7 @@ describe('Test editing Either', () => { .type('NewLeftCharacteristic', {force: true}) .get('mat-option') .contains('LeftCharacteristic') - .click({force: true}) + .click({force: true}), ) .then(() => cy.get(SELECTOR_editorSaveButton).should('be.disabled')) .then(() => @@ -140,7 +140,7 @@ describe('Test editing Either', () => { .type('NewRightCharacteristic', {force: true}) .get('mat-option') .contains('RightCharacteristic') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cy.getAspect()) @@ -206,7 +206,7 @@ describe('Test editing Either', () => { .type('LeftCharacteristic', {force: true}) .get('mat-option') .contains('LeftCharacteristic') - .click({force: true}) + .click({force: true}), ) .then(() => cy @@ -215,7 +215,7 @@ describe('Test editing Either', () => { .type('RightCharacteristic', {force: true}) .get('mat-option') .contains('RightCharacteristic') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cy.dbClickShape('Either1')) @@ -253,7 +253,7 @@ describe('Test editing Either', () => { .type('LeftCharacteristic', {force: true}) .get('mat-option') .contains('LeftCharacteristic') - .click({force: true}) + .click({force: true}), ) .then(() => cy @@ -262,7 +262,7 @@ describe('Test editing Either', () => { .type('RightCharacteristic', {force: true}) .get('mat-option') .contains('RightCharacteristic') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cy.shapeExists('LeftCharacteristic')) @@ -317,7 +317,7 @@ describe('Test editing Either', () => { .type('NewCharacteristic', {force: true}) .get('mat-option') .contains('NewCharacteristic') - .click({force: true}) + .click({force: true}), ) .then(() => cy @@ -326,7 +326,7 @@ describe('Test editing Either', () => { .type('NewCharacteristic', {force: true}) .get('mat-option') .contains('NewCharacteristic') - .click({force: true}) + .click({force: true}), ) .then(() => cy.get(SELECTOR_notificationsBtn).click({force: true})) .then(() => { @@ -342,7 +342,7 @@ describe('Test editing Either', () => { .type('Characteristic1', {force: true}) .get('mat-option') .contains('Characteristic1') - .click({force: true}) + .click({force: true}), ) .then(() => cy @@ -351,7 +351,7 @@ describe('Test editing Either', () => { .type('Characteristic1', {force: true}) .get('mat-option') .contains('Characteristic1') - .click({force: true}) + .click({force: true}), ) .then(() => cy.get(SELECTOR_notificationsBtn).click({force: true})) .then(() => { diff --git a/core/apps/ame-e2e/src/integration/editor/edit-entity.cy.ts b/core/apps/ame-e2e/src/integration/editor/edit-entity.cy.ts index 7f4f76f7..3edfa4ad 100644 --- a/core/apps/ame-e2e/src/integration/editor/edit-entity.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/edit-entity.cy.ts @@ -137,7 +137,7 @@ describe('Test editing Entity', () => { cy.get(FIELD_name).clear().type('entity23$%$'); cy.get('ame-name-input-field mat-error').should( 'contain', - 'Please start with an upper case character followed by letters/numerals.' + 'Please start with an upper case character followed by letters/numerals.', ); }) .then(() => cy.get(FIELD_name).clear()) @@ -170,7 +170,7 @@ describe('Test editing Entity', () => { .then(() => cy .getCellLabel('NewEntity', META_MODEL_preferredName) - .should('eq', `${META_MODEL_preferredName} = New Preffered Name for entity @en`) + .should('eq', `${META_MODEL_preferredName} = New Preffered Name for entity @en`), ) .then(() => cy.getUpdatedRDF()) .then(rdf => expect(rdf).to.contain('samm:preferredName "New Preffered Name for entity"@en')); @@ -182,15 +182,15 @@ describe('Test editing Entity', () => { .then(() => cy.get(FIELD_descriptionen).clear({force: true}).type('New description for the entity', {force: true})) .then(() => cyHelp.clickSaveButton()) .then(() => - cy.getCellLabel('NewEntity', META_MODEL_description).should('eq', `${META_MODEL_description} = New description for the entity @en`) + cy.getCellLabel('NewEntity', META_MODEL_description).should('eq', `${META_MODEL_description} = New description for the entity @en`), ) .then(() => cy.getUpdatedRDF().then(rdf => expect(rdf).to.contain('samm:description "New description for the entity"@en'))) .then(() => cy .getAspect() .then(aspect => - expect(aspect.properties[0].property.characteristic.dataType.getDescription('en')).to.equal('New description for the entity') - ) + expect(aspect.properties[0].property.characteristic.dataType.getDescription('en')).to.equal('New description for the entity'), + ), ); }); @@ -204,7 +204,7 @@ describe('Test editing Entity', () => { expect(rdf).to.contain('samm:properties (:newProperty2 :property3)'); cy.clickShape('NewEntity').then(shape => assert.isNotNull(shape)); cy.getAspect().then(aspect => - expect(aspect.properties[0].property.characteristic.dataType.properties[0].property.name).to.equal('newProperty2') + expect(aspect.properties[0].property.characteristic.dataType.properties[0].property.name).to.equal('newProperty2'), ); }); }); @@ -301,7 +301,7 @@ describe('Test editing Entity', () => { ':NewAspect a samm:Aspect;\n' + ' samm:properties (:property1 :property4);\n' + ' samm:operations ();\n' + - ' samm:events ().' + ' samm:events ().', ); }); }); @@ -344,7 +344,7 @@ describe('Test editing Entity', () => { ':NewAspect a samm:Aspect;\n' + ' samm:properties (:property1 :property4);\n' + ' samm:operations ();\n' + - ' samm:events ().' + ' samm:events ().', ); }); }); diff --git a/core/apps/ame-e2e/src/integration/editor/edit-enumeration-entity-values.cy.ts b/core/apps/ame-e2e/src/integration/editor/edit-enumeration-entity-values.cy.ts index 8b091115..c9ece225 100644 --- a/core/apps/ame-e2e/src/integration/editor/edit-enumeration-entity-values.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/edit-enumeration-entity-values.cy.ts @@ -49,7 +49,7 @@ describe('Test enumeration entity instance', () => { .then(() => cy.dbClickShape('Characteristic1')) .then(() => cy.get(FIELD_clearDataTypeBtn).click({force: true})) .then(() => - cy.get(FIELD_dataType).clear().type('NewEntity', {force: true}).get('.mat-mdc-option').contains('NewEntity').click({force: true}) + cy.get(FIELD_dataType).clear().type('NewEntity', {force: true}).get('.mat-mdc-option').contains('NewEntity').click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cy.shapeExists('NewEntity')) @@ -72,7 +72,7 @@ describe('Test enumeration entity instance', () => { .type('ev2', {force: true}) .get('.mat-mdc-option') .contains('ev2') - .click({force: true}) + .click({force: true}), ) .then(() => cy @@ -83,7 +83,7 @@ describe('Test enumeration entity instance', () => { .type('ev3', {force: true}) .get('.mat-mdc-option') .contains('ev3') - .click({force: true}) + .click({force: true}), ) .then(() => cy.get(SELECTOR_entitySaveButton).click({force: true})) .then(() => cy.wait(200)) @@ -146,7 +146,7 @@ describe('Test enumeration entity instance', () => { cy.getUpdatedRDF().then(rdf => { expect(rdf).to.contain(':property4 "ev2Value".'); expect(rdf).to.contain(':property5 "ev3Value".'); - }) + }), ); }); @@ -365,10 +365,10 @@ describe('Test enumeration entity instance', () => { .then(() => cy.dbClickShape('edit2')) .then(() => cy.get(FIELD_name).should('exist').clear({force: true}).type('editOnlyOnEntityValue', {force: true})) .then(() => - cy.get(FIELD_propertyValueNotComplex).eq(0).should('exist').clear({force: true}).type('editOnlyOnEntityValueProp2', {force: true}) + cy.get(FIELD_propertyValueNotComplex).eq(0).should('exist').clear({force: true}).type('editOnlyOnEntityValueProp2', {force: true}), ) .then(() => - cy.get(FIELD_propertyValueNotComplex).eq(1).should('exist').clear({force: true}).type('editOnlyOnEntityValueProp3', {force: true}) + cy.get(FIELD_propertyValueNotComplex).eq(1).should('exist').clear({force: true}).type('editOnlyOnEntityValueProp3', {force: true}), ) .then(() => cyHelp.clickSaveButton().wait(200)) @@ -413,7 +413,7 @@ describe('Test enumeration entity instance', () => { .get(SELECTOR_editorSaveButton) .should('be.disabled') .then(() => cy.get(FIELD_propertyValueNotComplex).eq(0).should('exist').clear().type('editOnlyOnEntityValueProp2')) - .then(() => cyHelp.clickSaveButton()) + .then(() => cyHelp.clickSaveButton()), ); }); @@ -510,8 +510,8 @@ describe('Test enumeration entity instance', () => { ':Entity1 a samm:Entity;\n' + ' samm:properties ().\n' + ':FillGapEntityValue a :Entity1.\n' + - ':EntityInstance1 a :Entity1.' - ) + ':EntityInstance1 a :Entity1.', + ), ); }); @@ -537,7 +537,7 @@ describe('Test enumeration entity instance', () => { ' samm-c:values (:FillGapEntityValue).\n' + ':Entity1 a samm:Entity;\n' + ' samm:properties ().\n' + - ':FillGapEntityValue a :Entity1.' + ':FillGapEntityValue a :Entity1.', ); }); }); @@ -567,7 +567,7 @@ describe('Test enumeration entity instance', () => { .type('NewEntity', {force: true}) .get('.mat-mdc-option') .contains('NewEntity') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cy.shapeExists('NewEntity')); @@ -589,7 +589,7 @@ describe('Test enumeration entity instance', () => { .type('NewEntity', {force: true}) .get('.mat-mdc-option') .contains('NewEntity') - .click({force: true}) + .click({force: true}), ) .then(() => cy.get(SELECTOR_addEntityValue).click({force: true}).wait(200)) .then(() => cy.get(FIELD_entityValueName).should('exist').type('EntityInstance')) @@ -612,12 +612,12 @@ describe('Test enumeration entity instance', () => { .then(() => cy.clickAddShapePlusIcon('property3')) .then(() => cy.dbClickShape('Characteristic2')) .then(() => - cy.get(FIELD_dataType).clear({force: true}).type('langString', {force: true}).get(FIELD_dataTypeOption).eq(0).click({force: true}) + cy.get(FIELD_dataType).clear({force: true}).type('langString', {force: true}).get(FIELD_dataTypeOption).eq(0).click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cy.dbClickShape('Characteristic3')) .then(() => - cy.get(FIELD_dataType).clear({force: true}).type('langString', {force: true}).get(FIELD_dataTypeOption).eq(0).click({force: true}) + cy.get(FIELD_dataType).clear({force: true}).type('langString', {force: true}).get(FIELD_dataTypeOption).eq(0).click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cy.dbClickShape('Characteristic1')) @@ -635,7 +635,7 @@ describe('Test enumeration entity instance', () => { .type('de', {force: true}) .get('.mat-mdc-option') .contains('de') - .click({force: true}) + .click({force: true}), ) .then(() => cy @@ -646,7 +646,7 @@ describe('Test enumeration entity instance', () => { .type('aa', {force: true}) .get('.mat-mdc-option') .contains('aa') - .click({force: true}) + .click({force: true}), ) .then(() => cy.get(SELECTOR_entitySaveButton).click({force: true}).wait(200)) .then(() => cy.get(SELECTOR_addEntityValue).click({force: true}).wait(200)) @@ -662,7 +662,7 @@ describe('Test enumeration entity instance', () => { .type('aa', {force: true}) .get('.mat-mdc-option') .contains('aa') - .click({force: true}) + .click({force: true}), ) .then(() => cy @@ -673,7 +673,7 @@ describe('Test enumeration entity instance', () => { .type('de', {force: true}) .get('.mat-mdc-option') .contains('de') - .click({force: true}) + .click({force: true}), ) .then(() => cy.get(SELECTOR_entitySaveButton).click({force: true}).wait(200)) .then(() => cyHelp.clickSaveButton()) @@ -689,7 +689,7 @@ describe('Test enumeration entity instance', () => { .type('en', {force: true}) .get('.mat-mdc-option') .contains('en') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton().wait(200)) .then(() => cy.dbClickShape('Characteristic1')) @@ -747,7 +747,7 @@ describe('Test enumeration entity instance', () => { .type('ev1', {force: true}) .get('.mat-mdc-option') .contains('ev1') - .click({force: true}) + .click({force: true}), ) .then(() => cy.get(SELECTOR_entitySaveButton).click({force: true}).wait(200)) .then(() => cy.get(SELECTOR_addEntityValue).click({force: true}).wait(200)) @@ -761,7 +761,7 @@ describe('Test enumeration entity instance', () => { .type('ev2', {force: true}) .get('.mat-mdc-option') .contains('ev2') - .click({force: true}) + .click({force: true}), ) .then(() => cy.get(SELECTOR_entitySaveButton).click({force: true}).wait(200)) .then(() => cyHelp.clickSaveButton()) @@ -778,7 +778,7 @@ describe('Test enumeration entity instance', () => { .type('ev3', {force: true}) .get('.mat-mdc-option') .contains('ev3') - .click({force: true}) + .click({force: true}), ) .then(() => cy.get(SELECTOR_entitySaveButton).click({force: true}).wait(200)) .then(() => cy.get(SELECTOR_addEntityValue).click({force: true}).wait(200)) @@ -792,7 +792,7 @@ describe('Test enumeration entity instance', () => { .type('ev4', {force: true}) .get('.mat-mdc-option') .contains('ev4') - .click({force: true}) + .click({force: true}), ) .then(() => cy.get(SELECTOR_entitySaveButton).click({force: true}).wait(200)) .then(() => cyHelp.clickSaveButton()) @@ -822,7 +822,7 @@ describe('Test enumeration entity instance', () => { .type('ev2', {force: true}) .get('.mat-mdc-option') .contains('ev2') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton().wait(200)) .then(() => { @@ -849,7 +849,7 @@ describe('Test enumeration entity instance', () => { .type('ev4', {force: true}) .get('.mat-mdc-option') .contains('ev4') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton().wait(200)) .then(() => { diff --git a/core/apps/ame-e2e/src/integration/editor/edit-events.cy.ts b/core/apps/ame-e2e/src/integration/editor/edit-events.cy.ts index 3d66b4e2..006f941c 100644 --- a/core/apps/ame-e2e/src/integration/editor/edit-events.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/edit-events.cy.ts @@ -61,7 +61,7 @@ describe('Test edit Events', () => { expect(aspect.events[0].name).to.equal('event1'); expect(aspect.events[0].parameters[0].property.name).to.equal('property2'); expect(aspect.events[0].parameters[1].property.name).to.equal('property3'); - }) + }), ) .then(() => cy.getUpdatedRDF().then(rdf => { @@ -71,7 +71,7 @@ describe('Test edit Events', () => { expect(rdf).to.contain('samm:parameters (:property2 :property3)'); expect(rdf).to.contain(':property2 a samm:Property'); expect(rdf).to.contain(':property3 a samm:Property'); - }) + }), ); }); @@ -87,7 +87,7 @@ describe('Test edit Events', () => { expect(aspect.events[0].parameters).to.have.length(2); expect(aspect.events[0].parameters[0].property.name).to.equal('property2'); expect(aspect.events[0].parameters[1].property.name).to.equal('property3'); - }) + }), ) .then(() => cy.getUpdatedRDF().then(rdf => { @@ -97,7 +97,7 @@ describe('Test edit Events', () => { expect(rdf).to.contain('samm:parameters (:property2 :property3)'); expect(rdf).to.contain(':property2 a samm:Property'); expect(rdf).to.contain(':property3 a samm:Property'); - }) + }), ); }); @@ -111,7 +111,7 @@ describe('Test edit Events', () => { expect(aspect.events[0].name).to.equal('newEvent'); expect(aspect.events[0].parameters).to.have.length(1); expect(aspect.events[0].parameters[0].property.name).to.equal('property3'); - }) + }), ) .then(() => cy.getUpdatedRDF().then(rdf => { @@ -121,7 +121,7 @@ describe('Test edit Events', () => { expect(rdf).to.contain('samm:parameters (:property3)'); expect(rdf).not.contain(':property2 a samm:Property'); expect(rdf).to.contain(':property3 a samm:Property'); - }) + }), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/editor/edit-operation.cy.ts b/core/apps/ame-e2e/src/integration/editor/edit-operation.cy.ts index b183cf94..6c1c35ee 100644 --- a/core/apps/ame-e2e/src/integration/editor/edit-operation.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/edit-operation.cy.ts @@ -45,7 +45,7 @@ describe('Test edit operation', () => { expect(aspect.operations[0].input[1].property.name).to.equal('property3'); expect(aspect.operations[0].input[2].property.name).to.equal('property4'); expect(aspect.operations[0].output.property.name).to.equal('property5'); - }) + }), ) .then(() => cy.getUpdatedRDF().then(rdf => { @@ -58,7 +58,7 @@ describe('Test edit operation', () => { expect(rdf).to.contain(':property3 a samm:Property'); expect(rdf).to.contain(':property4 a samm:Property'); expect(rdf).to.contain(':property5 a samm:Property'); - }) + }), ); }); @@ -76,7 +76,7 @@ describe('Test edit operation', () => { expect(aspect.operations[0].input[1].property.name).to.equal('property3'); expect(aspect.operations[0].input[2].property.name).to.equal('property4'); expect(aspect.operations[0].output.property.name).to.equal('property5'); - }) + }), ) .then(() => cy.getUpdatedRDF().then(rdf => { @@ -89,7 +89,7 @@ describe('Test edit operation', () => { expect(rdf).to.contain(':property3 a samm:Property'); expect(rdf).to.contain(':property4 a samm:Property'); expect(rdf).to.contain(':property5 a samm:Property'); - }) + }), ); }); @@ -106,7 +106,7 @@ describe('Test edit operation', () => { expect(aspect.operations[0].input).to.have.length(1); expect(aspect.operations[0].input[0].property.name).to.equal('property3'); expect(aspect.operations[0].output.property.name).to.equal('property5'); - }) + }), ) .then(() => cy.getUpdatedRDF().then(rdf => { @@ -119,7 +119,7 @@ describe('Test edit operation', () => { expect(rdf).to.contain(':property3 a samm:Property'); expect(rdf).not.contain(':property4 a samm:Property'); expect(rdf).to.contain(':property5 a samm:Property'); - }) + }), ); }); @@ -134,7 +134,7 @@ describe('Test edit operation', () => { expect(aspect.operations[0].input).to.have.length(1); expect(aspect.operations[0].input[0].property.name).to.equal('property3'); expect(aspect.operations[0].output).to.be.null; - }) + }), ) .then(() => cy.getUpdatedRDF().then(rdf => { @@ -145,7 +145,7 @@ describe('Test edit operation', () => { expect(rdf).not.contain('samm:output :property5'); expect(rdf).to.contain(':property3 a samm:Property'); expect(rdf).not.contain(':property5 a samm:Property'); - }) + }), ); }); @@ -159,7 +159,7 @@ describe('Test edit operation', () => { .type('addInputProperty1', {force: true}) .get('mat-option') .contains('addInputProperty1') - .click({force: true}) + .click({force: true}), ) .then(() => cy @@ -168,7 +168,7 @@ describe('Test edit operation', () => { .type('addInputProperty2', {force: true}) .get('mat-option') .contains('addInputProperty2') - .click({force: true}) + .click({force: true}), ) .then(() => cy @@ -177,7 +177,7 @@ describe('Test edit operation', () => { .type('addOutputProperty1', {force: true}) .get('mat-option') .contains('addOutputProperty1') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => @@ -189,7 +189,7 @@ describe('Test edit operation', () => { expect(aspect.operations[0].input[1].property.name).to.equal('addInputProperty1'); expect(aspect.operations[0].input[2].property.name).to.equal('addInputProperty2'); expect(aspect.operations[0].output.property.name).to.equals('addOutputProperty1'); - }) + }), ) .then(() => cy.getUpdatedRDF().then(rdf => { @@ -202,7 +202,7 @@ describe('Test edit operation', () => { expect(rdf).to.contain(':addInputProperty1 a samm:Property'); expect(rdf).to.contain(':addInputProperty2 a samm:Property'); expect(rdf).to.contain(':addOutputProperty1 a samm:Property'); - }) + }), ); }); @@ -219,7 +219,7 @@ describe('Test edit operation', () => { expect(aspect.operations[0].input).to.have.length(1); expect(aspect.operations[0].input[0].property.name).to.equal('addInputProperty1'); expect(aspect.operations[0].output.property.name).to.equals('addOutputProperty1'); - }) + }), ) .then(() => cy.getUpdatedRDF().then(rdf => { @@ -232,7 +232,7 @@ describe('Test edit operation', () => { expect(rdf).to.contain(':addInputProperty1 a samm:Property'); expect(rdf).to.contain(':addInputProperty2 a samm:Property'); expect(rdf).to.contain(':addOutputProperty1 a samm:Property'); - }) + }), ); }); @@ -247,7 +247,7 @@ describe('Test edit operation', () => { .type('addNewOutputProperty1', {force: true}) .get('mat-option') .contains('addNewOutputProperty1') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => @@ -257,7 +257,7 @@ describe('Test edit operation', () => { expect(aspect.operations[0].input).to.have.length(1); expect(aspect.operations[0].input[0].property.name).to.equal('addInputProperty1'); expect(aspect.operations[0].output.property.name).to.equals('addNewOutputProperty1'); - }) + }), ) .then(() => cy.getUpdatedRDF().then(rdf => { @@ -271,7 +271,7 @@ describe('Test edit operation', () => { expect(rdf).to.contain(':addInputProperty2 a samm:Property'); expect(rdf).to.contain(':addOutputProperty1 a samm:Property'); expect(rdf).to.contain(':addNewOutputProperty1 a samm:Property'); - }) + }), ); }); @@ -286,7 +286,7 @@ describe('Test edit operation', () => { .type('addNewOutputProperty1', {force: true}) .get('mat-option') .contains('addNewOutputProperty1') - .click({force: true}) + .click({force: true}), ) .then(() => cy @@ -295,7 +295,7 @@ describe('Test edit operation', () => { .type('addNewOutputProperty2', {force: true}) .get('mat-option') .contains('addNewOutputProperty2') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => @@ -306,7 +306,7 @@ describe('Test edit operation', () => { expect(aspect.operations[0].input[0].property.name).to.equal('addInputProperty1'); expect(aspect.operations[0].input[1].property.name).to.equal('addNewOutputProperty1'); expect(aspect.operations[0].output.property.name).to.equals('addNewOutputProperty2'); - }) + }), ) .then(() => cy.getUpdatedRDF().then(rdf => { @@ -321,7 +321,7 @@ describe('Test edit operation', () => { expect(rdf).to.contain(':addOutputProperty1 a samm:Property'); expect(rdf).to.contain(':addNewOutputProperty1 a samm:Property'); expect(rdf).to.contain(':addNewOutputProperty2 a samm:Property'); - }) + }), ) .then(() => cy.dbClickShape('newOperation')) .then(() => cy.get('[data-cy="input"]').eq(1).click({force: true})) @@ -333,7 +333,7 @@ describe('Test edit operation', () => { .type('addNewOutputProperty1', {force: true}) .get('mat-option') .contains('addNewOutputProperty1') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => @@ -343,7 +343,7 @@ describe('Test edit operation', () => { expect(aspect.operations[0].input).to.have.length(1); expect(aspect.operations[0].input[0].property.name).to.equal('addInputProperty1'); expect(aspect.operations[0].output.property.name).to.equals('addNewOutputProperty1'); - }) + }), ) .then(() => cy.getUpdatedRDF().then(rdf => { @@ -358,7 +358,7 @@ describe('Test edit operation', () => { expect(rdf).to.contain(':addOutputProperty1 a samm:Property'); expect(rdf).to.contain(':addNewOutputProperty1 a samm:Property'); expect(rdf).to.contain(':addNewOutputProperty2 a samm:Property'); - }) + }), ); }); @@ -372,7 +372,7 @@ describe('Test edit operation', () => { .type('addNewOutputProperty1', {force: true}) .get('mat-option') .contains('addNewOutputProperty1') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => @@ -383,7 +383,7 @@ describe('Test edit operation', () => { expect(aspect.operations[0].input[0].property.name).to.equal('addInputProperty1'); expect(aspect.operations[0].input[1].property.name).to.equal('addNewOutputProperty1'); expect(aspect.operations[0].output.property.name).to.equals('addNewOutputProperty1'); - }) + }), ) .then(() => cy.getUpdatedRDF().then(rdf => { @@ -397,7 +397,7 @@ describe('Test edit operation', () => { expect(rdf).to.contain(':addInputProperty2 a samm:Property'); expect(rdf).to.contain(':addOutputProperty1 a samm:Property'); expect(rdf).to.contain(':addNewOutputProperty1 a samm:Property'); - }) + }), ) .then(() => cy.dbClickShape('newOperation')) .then(() => cy.get('[data-cy="clear-output-button"]').click({force: true})) @@ -408,7 +408,7 @@ describe('Test edit operation', () => { .type('addNewOutputProperty2', {force: true}) .get('mat-option') .contains('addNewOutputProperty2') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => @@ -419,7 +419,7 @@ describe('Test edit operation', () => { expect(aspect.operations[0].input[0].property.name).to.equal('addInputProperty1'); expect(aspect.operations[0].input[1].property.name).to.equal('addNewOutputProperty1'); expect(aspect.operations[0].output.property.name).to.equals('addNewOutputProperty2'); - }) + }), ) .then(() => cy.getUpdatedRDF().then(rdf => { @@ -433,7 +433,7 @@ describe('Test edit operation', () => { expect(rdf).to.contain(':addInputProperty2 a samm:Property'); expect(rdf).to.contain(':addOutputProperty1 a samm:Property'); expect(rdf).to.contain(':addNewOutputProperty1 a samm:Property'); - }) + }), ); }); @@ -449,7 +449,7 @@ describe('Test edit operation', () => { expect(aspect.operations[0].name).to.equal('newOperation'); expect(aspect.operations[0].input).to.have.length(0); expect(aspect.operations[0].output.property.name).to.equals('addNewOutputProperty2'); - }) + }), ) .then(() => cy.getUpdatedRDF().then(rdf => { @@ -462,7 +462,7 @@ describe('Test edit operation', () => { expect(rdf).to.contain(':addInputProperty1 a samm:Property'); expect(rdf).to.contain(':addInputProperty2 a samm:Property'); expect(rdf).to.contain(':addOutputProperty1 a samm:Property'); - }) + }), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/editor/edit-property.cy.ts b/core/apps/ame-e2e/src/integration/editor/edit-property.cy.ts index ed657220..ae718a19 100644 --- a/core/apps/ame-e2e/src/integration/editor/edit-property.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/edit-property.cy.ts @@ -88,7 +88,7 @@ describe('Test edit property', () => { }, { fixture: `/external-reference/same-namespace/with-childrens/${fileNameOne}`, - } + }, ); cy.visitDefault(); @@ -98,7 +98,7 @@ describe('Test edit property', () => { .then(() => cy.dbClickShape('property1')) .then(() => cy.get(FIELD_name).clear({force: true}).type('externalPropertyWithChildren ', {force: true}).wait(1000)) .then(() => - cy.get('ame-name-input-field mat-error').contains('Please start with a lower case character followed by letters/numerals.') + cy.get('ame-name-input-field mat-error').contains('Please start with a lower case character followed by letters/numerals.'), ); }); @@ -138,7 +138,7 @@ describe('Test edit property', () => { .then(() => cy .getCellLabel('property1', META_MODEL_preferredName) - .should('eq', `${META_MODEL_preferredName} = New Preffered Name for property @en`) + .should('eq', `${META_MODEL_preferredName} = New Preffered Name for property @en`), ) .then(() => cy.getUpdatedRDF()) .then(rdf => expect(rdf).to.contain('samm:preferredName "New Preffered Name for property"@en')); @@ -152,7 +152,7 @@ describe('Test edit property', () => { .then(() => cy .getCellLabel('property1', META_MODEL_description) - .should('eq', `${META_MODEL_description} = New description for the property @en`) + .should('eq', `${META_MODEL_description} = New description for the property @en`), ) .then(() => cy.getUpdatedRDF().then(rdf => expect(rdf).to.contain('samm:description "New description for the property"@en'))); }); @@ -165,16 +165,16 @@ describe('Test edit property', () => { .then(() => cy .getCellLabel('property1', META_MODEL_see) - .should('eq', `${META_MODEL_see} = http://www.seeA.de,http://www.seeB.de,http://www.seeC.de`) + .should('eq', `${META_MODEL_see} = http://www.seeA.de,http://www.seeB.de,http://www.seeC.de`), ) .then(() => - cy.getUpdatedRDF().then(rdf => expect(rdf).to.contain('samm:see , , ')) + cy.getUpdatedRDF().then(rdf => expect(rdf).to.contain('samm:see , , ')), ) .then(() => cy.getAspect().then(aspect => { expect(aspect.properties[0].property.getSeeReferences()).to.have.length(3); expect(aspect.properties[0].property.getSeeReferences()[2]).to.equal('http://www.seeC.de'); - }) + }), ); cy.dbClickShape('property1') .then(() => cy.removeSeeElements('http://www.seeB.de')) @@ -186,7 +186,7 @@ describe('Test edit property', () => { cy.getAspect().then(aspect => { expect(aspect.properties[0].property.getSeeReferences()).to.have.length(2); expect(aspect.properties[0].property.getSeeReferences()[1]).to.equal('http://www.seeC.de'); - }) + }), ); }); @@ -199,7 +199,7 @@ describe('Test edit property', () => { .then(() => cy .getCellLabel('property1', META_MODEL_see) - .should('eq', `${META_MODEL_see} = urn:irdi:eclass:0173-1#02-AAO677,urn:irdi:iec:0112/2///62683#ACC011#001`) + .should('eq', `${META_MODEL_see} = urn:irdi:eclass:0173-1#02-AAO677,urn:irdi:iec:0112/2///62683#ACC011#001`), ) .then(() => cy.getUpdatedRDF()) .then(rdf => expect(rdf).to.contain('samm:see , ')) @@ -386,7 +386,7 @@ describe('Test edit property', () => { ':NewAspect a samm:Aspect;\n' + ' samm:properties (:newProperty :property1);\n' + ' samm:operations ();\n' + - ' samm:events ().\n' + ' samm:events ().\n', ); expect(rdf).to.contain(':newProperty a samm:Property;\n' + ' samm:characteristic :Characteristic1.'); }); @@ -411,7 +411,7 @@ describe('Test edit property', () => { .then(() => cy.getUpdatedRDF()) .then(rdf => { expect(rdf).to.contain( - ':AspectDefault a samm:Aspect;\n' + ' samm:properties (:property1);\n' + ' samm:operations ();\n' + ' samm:events ().\n' + ':AspectDefault a samm:Aspect;\n' + ' samm:properties (:property1);\n' + ' samm:operations ();\n' + ' samm:events ().\n', ); expect(rdf).to.contain(':property1 a samm:Property;\n' + ' samm:characteristic :Characteristic1.'); expect(rdf).to.contain(':Characteristic1 a samm:Characteristic;\n' + ' samm:dataType :Entity1.'); @@ -446,7 +446,7 @@ describe('Test edit property', () => { .then(() => cy.getUpdatedRDF()) .then(rdf => { expect(rdf).to.contain( - ':AspectDefault a samm:Aspect;\n' + ' samm:properties (:property1);\n' + ' samm:operations ();\n' + ' samm:events ().\n' + ':AspectDefault a samm:Aspect;\n' + ' samm:properties (:property1);\n' + ' samm:operations ();\n' + ' samm:events ().\n', ); expect(rdf).to.contain(':property1 a samm:Property;\n' + ' samm:characteristic :Characteristic1.'); expect(rdf).to.contain(':Characteristic1 a samm:Characteristic;\n' + ' samm:dataType :NewEntity.'); @@ -493,7 +493,7 @@ describe('Test edit property', () => { ':NewAspect a samm:Aspect;\n' + ' samm:properties (:property1 :property3);\n' + ' samm:operations ();\n' + - ' samm:events ().\n' + ' samm:events ().\n', ); expect(rdf).to.contain(':property3 a samm:Property.\n'); expect(rdf).to.contain(':NewEntity a samm:Entity;\n' + ' samm:properties (:newProperty :property2).'); @@ -583,7 +583,7 @@ describe('Test edit property', () => { ' samm:payloadName "payloadName"\n' + ']);\n' + ' samm:operations ();\n' + - ' samm:events ().' + ' samm:events ().', ); }); }); diff --git a/core/apps/ame-e2e/src/integration/editor/edit-time-series-entity.cy.ts b/core/apps/ame-e2e/src/integration/editor/edit-time-series-entity.cy.ts index 038dcacb..328c6dd8 100644 --- a/core/apps/ame-e2e/src/integration/editor/edit-time-series-entity.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/edit-time-series-entity.cy.ts @@ -39,8 +39,8 @@ describe('Time Series Entity', () => { .getCellLabel('Entity1', 'description') .should( 'eq', - 'Inherited\ndescription = An Entity which represents a key/value pair. The key is the timestamp when the value was recorded and the value is the value which was recorded. @en' - ) + 'Inherited\ndescription = An Entity which represents a key/value pair. The key is the timestamp when the value was recorded and the value is the value which was recorded. @en', + ), ) .then(() => cy.clickShape('TimeSeriesEntity')) .then(() => cy.getCellLabel('TimeSeriesEntity', 'preferredName').should('eq', 'preferredName = Time Series Entity @en')) @@ -49,8 +49,8 @@ describe('Time Series Entity', () => { .getCellLabel('TimeSeriesEntity', 'description') .should( 'eq', - 'description = An Entity which represents a key/value pair. The key is the timestamp when the value was recorded and the value is the value which was recorded. @en' - ) + 'description = An Entity which represents a key/value pair. The key is the timestamp when the value was recorded and the value is the value which was recorded. @en', + ), ) .then(() => cy.clickShape('[value]')) .then(() => cy.getCellLabel('[value]', 'extends').should('eq', 'extends = value')) @@ -58,19 +58,19 @@ describe('Time Series Entity', () => { .then(() => cy .getCellLabel('[value]', 'description') - .should('eq', 'Inherited\ndescription = The value that was recorded and is part of a time series. @en') + .should('eq', 'Inherited\ndescription = The value that was recorded and is part of a time series. @en'), ) .then(() => cy.clickShape('value')) .then(() => cy.getCellLabel('value', 'preferredName').should('eq', 'preferredName = Value @en')) .then(() => - cy.getCellLabel('value', 'description').should('eq', 'description = The value that was recorded and is part of a time series. @en') + cy.getCellLabel('value', 'description').should('eq', 'description = The value that was recorded and is part of a time series. @en'), ) .then(() => cy.clickShape('timestamp')) .then(() => cy.getCellLabel('timestamp', 'preferredName').should('eq', 'preferredName = Timestamp @en')) .then(() => cy .getCellLabel('timestamp', 'description') - .should('eq', 'description = The specific point in time when the corresponding value was recorded. @en') + .should('eq', 'description = The specific point in time when the corresponding value was recorded. @en'), ) .then(() => cy.clickShape('Timestamp')) .then(() => cy.getCellLabel('Timestamp', 'preferredName').should('eq', 'preferredName = Timestamp @en')) @@ -78,7 +78,7 @@ describe('Time Series Entity', () => { .then(() => cy .getCellLabel('Timestamp', 'description') - .should('eq', 'description = Describes a Property which contains the date and time with an optional timezone. @en') + .should('eq', 'description = Describes a Property which contains the date and time with an optional timezone. @en'), ); }); @@ -150,8 +150,8 @@ describe('Time Series Entity', () => { .getCellLabel('Entity1', 'description') .should( 'eq', - 'Inherited\ndescription = An Entity which represents a key/value pair. The key is the timestamp when the value was recorded and the value is the value which was recorded. @en' - ) + 'Inherited\ndescription = An Entity which represents a key/value pair. The key is the timestamp when the value was recorded and the value is the value which was recorded. @en', + ), ) .then(() => cy.clickShape('TimeSeriesEntity')) @@ -161,8 +161,8 @@ describe('Time Series Entity', () => { .getCellLabel('TimeSeriesEntity', 'description') .should( 'eq', - 'description = An Entity which represents a key/value pair. The key is the timestamp when the value was recorded and the value is the value which was recorded. @en' - ) + 'description = An Entity which represents a key/value pair. The key is the timestamp when the value was recorded and the value is the value which was recorded. @en', + ), ) .then(() => cy.clickShape('[value]')) @@ -171,13 +171,13 @@ describe('Time Series Entity', () => { .then(() => cy .getCellLabel('[value]', 'description') - .should('eq', 'Inherited\ndescription = The value that was recorded and is part of a time series. @en') + .should('eq', 'Inherited\ndescription = The value that was recorded and is part of a time series. @en'), ) .then(() => cy.clickShape('value')) .then(() => cy.getCellLabel('value', 'preferredName').should('eq', 'preferredName = Value @en')) .then(() => - cy.getCellLabel('value', 'description').should('eq', 'description = The value that was recorded and is part of a time series. @en') + cy.getCellLabel('value', 'description').should('eq', 'description = The value that was recorded and is part of a time series. @en'), ) .then(() => cy.clickShape('timestamp')) @@ -185,7 +185,7 @@ describe('Time Series Entity', () => { .then(() => cy .getCellLabel('timestamp', 'description') - .should('eq', 'description = The specific point in time when the corresponding value was recorded. @en') + .should('eq', 'description = The specific point in time when the corresponding value was recorded. @en'), ) .then(() => cy.clickShape('Timestamp')) @@ -194,7 +194,7 @@ describe('Time Series Entity', () => { .then(() => cy .getCellLabel('Timestamp', 'description') - .should('eq', 'description = Describes a Property which contains the date and time with an optional timezone. @en') + .should('eq', 'description = Describes a Property which contains the date and time with an optional timezone. @en'), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/editor/edit-trait.cy.ts b/core/apps/ame-e2e/src/integration/editor/edit-trait.cy.ts index 58e7d75d..7e47de75 100644 --- a/core/apps/ame-e2e/src/integration/editor/edit-trait.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/edit-trait.cy.ts @@ -41,7 +41,7 @@ describe('Test editing Trait', () => { // expect(rdf).to.contain('samm:description "New description for the new created trait"@en'); cy.getAspect().then(aspect => { expect(aspect.properties[0].property.characteristic.getDescription('en')).to.equal( - 'New description for the new created trait' + 'New description for the new created trait', ); }); }); diff --git a/core/apps/ame-e2e/src/integration/editor/edit-unit.cy.ts b/core/apps/ame-e2e/src/integration/editor/edit-unit.cy.ts index dcd499ce..7c0c692f 100644 --- a/core/apps/ame-e2e/src/integration/editor/edit-unit.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/edit-unit.cy.ts @@ -30,7 +30,7 @@ describe('Test editing Unit', () => { .type('CustomUnit1', {force: true}) .get('mat-option') .contains('CustomUnit1') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cyHelp.hasAddShapeOverlay('Quantifiable1')) @@ -61,7 +61,7 @@ describe('Test editing Unit', () => { .type('CustomUnit2', {force: true}) .get('mat-option') .contains('CustomUnit2') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => { @@ -115,7 +115,7 @@ describe('Test editing Unit', () => { .type('CustomUnit2', {force: true}) .get('mat-option') .contains('CustomUnit2') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cy.clickShape('CustomUnit2')) @@ -124,7 +124,7 @@ describe('Test editing Unit', () => { cy.getAspect().then(aspect => { expect(aspect.properties[0].property.characteristic.name).to.equal('Quantifiable1'); expect(aspect.properties[0].property.characteristic.unit).to.be.null; - }) + }), ) .then(() => cy.getUpdatedRDF().then(rdf => { @@ -135,7 +135,7 @@ describe('Test editing Unit', () => { expect(rdf).not.contain('CustomUnit2 a samm:Unit'); expect(rdf).not.contain('samm-c:unit :CustomUnit1'); expect(rdf).not.contain('samm-c:unit :CustomUnit2'); - }) + }), ); }); @@ -148,7 +148,7 @@ describe('Test editing Unit', () => { .type('CustomUnit1', {force: true}) .get('mat-option') .contains('CustomUnit1') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cy.dbClickShape('Quantifiable1')) @@ -180,7 +180,7 @@ describe('Test editing Unit', () => { .type('CustomUnit1', {force: true}) .get('mat-option') .contains('CustomUnit1') - .click({force: true}) + .click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cyHelp.hasAddShapeOverlay('Duration1')) @@ -248,7 +248,7 @@ describe('Test editing Unit', () => { .get('mat-option') .last() .contains('metre') - .click({force: true}) + .click({force: true}), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/editor/entity-that-extends-external-entity.cy.ts b/core/apps/ame-e2e/src/integration/editor/entity-that-extends-external-entity.cy.ts index a5a18b06..de658b05 100644 --- a/core/apps/ame-e2e/src/integration/editor/entity-that-extends-external-entity.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/entity-that-extends-external-entity.cy.ts @@ -29,9 +29,9 @@ describe('Test loading aspect with extended external Entity', () => { .wait(500) .get('.mat-mdc-cell') .contains( - ' The Aspect model contains an external reference that is not included in the namespace file structure or is invalid' + ' The Aspect model contains an external reference that is not included in the namespace file structure or is invalid', ) - .should('exist') + .should('exist'), ) .then(() => cy.wait(500).get(SELECTOR_notificationsDialogCloseButton).click({force: true})); }); @@ -54,7 +54,7 @@ describe('Test loading aspect with extended external Entity', () => { }, { fixture: '/external-reference/same-namespace/model-with-entity.txt', - } + }, ); cy.visitDefault(); @@ -94,7 +94,7 @@ describe('Test loading aspect with extended external Entity', () => { }, { fixture: '/external-reference/different-namespace/model-with-entity.txt', - } + }, ); cy.visitDefault(); diff --git a/core/apps/ame-e2e/src/integration/editor/file-resource-entity.cy.ts b/core/apps/ame-e2e/src/integration/editor/file-resource-entity.cy.ts index fdad50f4..32dc6717 100644 --- a/core/apps/ame-e2e/src/integration/editor/file-resource-entity.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/file-resource-entity.cy.ts @@ -57,7 +57,7 @@ describe('Time Series Entity', () => { .then(() => cy .getCellLabel('MimeType', 'description') - .should('eq', 'description = A MIME type as defined in RFC 2046, for example "application/pdf. @en') + .should('eq', 'description = A MIME type as defined in RFC 2046, for example "application/pdf. @en'), ); }); diff --git a/core/apps/ame-e2e/src/integration/editor/load-anonymous-elements.cy.ts b/core/apps/ame-e2e/src/integration/editor/load-anonymous-elements.cy.ts index 229d64a7..8484e1ab 100644 --- a/core/apps/ame-e2e/src/integration/editor/load-anonymous-elements.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/load-anonymous-elements.cy.ts @@ -59,7 +59,7 @@ describe('Test load aspect model with anonymous elements', () => { ':Characteristic3 a samm:Characteristic;\n' + ' samm:dataType xsd:string.\n' + ':Constraint1 a samm:Constraint.\n' + - ':Constraint2 a samm:Constraint.' + ':Constraint2 a samm:Constraint.', ); }); }); diff --git a/core/apps/ame-e2e/src/integration/editor/load-external-references-different-namespace.cy.ts b/core/apps/ame-e2e/src/integration/editor/load-external-references-different-namespace.cy.ts index 3faebdb8..f914f9ef 100644 --- a/core/apps/ame-e2e/src/integration/editor/load-external-references-different-namespace.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/load-external-references-different-namespace.cy.ts @@ -29,7 +29,7 @@ describe('Test drag and drop', () => { }, { fixture: '/external-reference/different-namespace/with-childrens/external-property-reference.txt', - } + }, ); cy.visitDefault(); @@ -85,7 +85,7 @@ describe('Test drag and drop', () => { }, { fixture: '/external-reference/different-namespace/with-childrens/external-property-reference.txt', - } + }, ); cy.visitDefault(); @@ -138,7 +138,7 @@ describe('Test drag and drop', () => { }, { fixture: '/external-reference/different-namespace/with-childrens/external-operation-reference.txt', - } + }, ); cy.visitDefault(); @@ -213,7 +213,7 @@ describe('Test drag and drop', () => { }, { fixture: '/external-reference/different-namespace/with-childrens/external-characteristic-reference.txt', - } + }, ); cy.visitDefault(); @@ -270,7 +270,7 @@ describe('Test drag and drop', () => { }, { fixture: '/external-reference/different-namespace/with-childrens/external-entity-reference.txt', - } + }, ); cy.visitDefault(); @@ -326,7 +326,7 @@ describe('Test drag and drop', () => { }, { fixture: '/external-reference/different-namespace/without-childrens/external-unit-reference.txt', - } + }, ); cy.visitDefault(); @@ -379,7 +379,7 @@ describe('Test drag and drop', () => { }, { fixture: '/external-reference/different-namespace/without-childrens/external-entity-reference.txt', - } + }, ); cy.intercept( @@ -390,7 +390,7 @@ describe('Test drag and drop', () => { }, { fixture: '/external-reference/different-namespace/without-childrens/external-characteristic-reference.txt', - } + }, ); cy.intercept( @@ -401,7 +401,7 @@ describe('Test drag and drop', () => { }, { fixture: '/external-reference/different-namespace/without-childrens/external-property-reference.txt', - } + }, ); cy.intercept( @@ -412,7 +412,7 @@ describe('Test drag and drop', () => { }, { fixture: '/external-reference/different-namespace/without-childrens/external-operation-reference.txt', - } + }, ); cy.intercept( @@ -423,7 +423,7 @@ describe('Test drag and drop', () => { }, { fixture: '/external-reference/different-namespace/with-childrens/external-trait-reference.txt', - } + }, ); cy.intercept( @@ -434,7 +434,7 @@ describe('Test drag and drop', () => { }, { fixture: '/external-reference/different-namespace/without-childrens/external-constraint-reference.txt', - } + }, ); cy.visitDefault(); diff --git a/core/apps/ame-e2e/src/integration/editor/load-external-references-same-namespace.cy.ts b/core/apps/ame-e2e/src/integration/editor/load-external-references-same-namespace.cy.ts index 13c91cf8..83d77a58 100644 --- a/core/apps/ame-e2e/src/integration/editor/load-external-references-same-namespace.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/load-external-references-same-namespace.cy.ts @@ -32,7 +32,7 @@ describe('Test load external reference with same namespace', () => { }, { fixture: '/external-reference/same-namespace/with-childrens/external-property-reference.txt', - } + }, ); cy.visitDefault(); @@ -91,7 +91,7 @@ describe('Test load external reference with same namespace', () => { }, { fixture: '/external-reference/same-namespace/with-childrens/external-operation-reference.txt', - } + }, ); cy.visitDefault(); @@ -169,7 +169,7 @@ describe('Test load external reference with same namespace', () => { }, { fixture: '/external-reference/same-namespace/with-childrens/external-characteristic-reference.txt', - } + }, ); cy.visitDefault(); @@ -226,7 +226,7 @@ describe('Test load external reference with same namespace', () => { }, { fixture: '/external-reference/same-namespace/without-childrens/external-unit-reference.txt', - } + }, ); cy.visitDefault(); @@ -275,7 +275,7 @@ describe('Test load external reference with same namespace', () => { }, { fixture: '/external-reference/same-namespace/with-childrens/external-entity-reference.txt', - } + }, ); cy.visitDefault(); @@ -338,7 +338,7 @@ describe('Test load external reference with same namespace', () => { }, { fixture: '/external-reference/same-namespace/without-childrens/external-entity-reference.txt', - } + }, ); cy.intercept( @@ -349,7 +349,7 @@ describe('Test load external reference with same namespace', () => { }, { fixture: '/external-reference/same-namespace/without-childrens/external-characteristic-reference.txt', - } + }, ); cy.intercept( @@ -360,7 +360,7 @@ describe('Test load external reference with same namespace', () => { }, { fixture: '/external-reference/same-namespace/without-childrens/external-property-reference.txt', - } + }, ); cy.intercept( @@ -371,7 +371,7 @@ describe('Test load external reference with same namespace', () => { }, { fixture: '/external-reference/same-namespace/without-childrens/external-operation-reference.txt', - } + }, ); cy.intercept( @@ -382,7 +382,7 @@ describe('Test load external reference with same namespace', () => { }, { fixture: '/external-reference/same-namespace/with-childrens/external-trait-reference.txt', - } + }, ); cy.intercept( @@ -393,7 +393,7 @@ describe('Test load external reference with same namespace', () => { }, { fixture: '/external-reference/same-namespace/without-childrens/external-constraint-reference.txt', - } + }, ); cy.visitDefault(); diff --git a/core/apps/ame-e2e/src/integration/editor/load-external-references-with-cross-reference.cy.ts b/core/apps/ame-e2e/src/integration/editor/load-external-references-with-cross-reference.cy.ts index a7f3b541..1932d181 100644 --- a/core/apps/ame-e2e/src/integration/editor/load-external-references-with-cross-reference.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/load-external-references-with-cross-reference.cy.ts @@ -43,7 +43,7 @@ describe('Test load external reference with cross references', () => { }, { fixture: '/external-reference/cross-references/same-namespace/external-entity-reference.txt', - } + }, ); cy.intercept( @@ -54,7 +54,7 @@ describe('Test load external reference with cross references', () => { }, { fixture: '/external-reference/cross-references/same-namespace/external-characteristic-reference.txt', - } + }, ); cy.intercept( @@ -65,7 +65,7 @@ describe('Test load external reference with cross references', () => { }, { fixture: '/external-reference/cross-references/same-namespace/external-property-reference.txt', - } + }, ); cy.intercept( @@ -76,7 +76,7 @@ describe('Test load external reference with cross references', () => { }, { fixture: '/external-reference/cross-references/same-namespace/external-operation-reference.txt', - } + }, ); // Different Namespace @@ -88,7 +88,7 @@ describe('Test load external reference with cross references', () => { }, { fixture: '/external-reference/cross-references/different-namespace/external-entity-reference.txt', - } + }, ); cy.intercept( @@ -99,7 +99,7 @@ describe('Test load external reference with cross references', () => { }, { fixture: '/external-reference/cross-references/different-namespace/external-characteristic-reference.txt', - } + }, ); cy.intercept( @@ -110,7 +110,7 @@ describe('Test load external reference with cross references', () => { }, { fixture: '/external-reference/cross-references/different-namespace/external-property-reference.txt', - } + }, ); cy.intercept( @@ -121,7 +121,7 @@ describe('Test load external reference with cross references', () => { }, { fixture: '/external-reference/cross-references/different-namespace/external-operation-reference.txt', - } + }, ); cy.visitDefault(); @@ -201,7 +201,7 @@ describe('Test load external reference with cross references', () => { }, { fixture: '/external-reference/cross-references/mixing-namespace/external-entity-reference.txt', - } + }, ); cy.intercept( @@ -212,7 +212,7 @@ describe('Test load external reference with cross references', () => { }, { fixture: '/external-reference/cross-references/mixing-namespace/external-property-reference.txt', - } + }, ); cy.intercept( @@ -223,7 +223,7 @@ describe('Test load external reference with cross references', () => { }, { fixture: '/external-reference/cross-references/mixing-namespace/external-operation-reference.txt', - } + }, ); // Different Namespace @@ -235,7 +235,7 @@ describe('Test load external reference with cross references', () => { }, { fixture: '/external-reference/cross-references/mixing-namespace/external-characteristic-reference.txt', - } + }, ); cy.visitDefault(); diff --git a/core/apps/ame-e2e/src/integration/editor/load-model.cy.ts b/core/apps/ame-e2e/src/integration/editor/load-model.cy.ts index 4d95fb89..3577fc7b 100644 --- a/core/apps/ame-e2e/src/integration/editor/load-model.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/load-model.cy.ts @@ -124,7 +124,7 @@ describe('Test load different characteristics', () => { cy.dbClickShape('TestMeasurement') .then(() => cy.get('button[data-cy="clear-dataType-button"]').click({force: true})) .then(() => - cy.get(FIELD_dataType).clear({force: true}).type('double', {force: true}).get(FIELD_dataTypeOption).eq(0).click({force: true}) + cy.get(FIELD_dataType).clear({force: true}).type('double', {force: true}).get(FIELD_dataTypeOption).eq(0).click({force: true}), ) .then(() => cyHelp.clickSaveButton()) .then(() => cy.getUpdatedRDF().then(rdf => expect(rdf).to.contain('samm:dataType xsd:double'))); diff --git a/core/apps/ame-e2e/src/integration/editor/migrate-common-attributes.cy.ts b/core/apps/ame-e2e/src/integration/editor/migrate-common-attributes.cy.ts index 42ef6db5..89d61150 100644 --- a/core/apps/ame-e2e/src/integration/editor/migrate-common-attributes.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/migrate-common-attributes.cy.ts @@ -43,7 +43,7 @@ describe('Test migration of common attributes on Constraint/Characteristic type .then(() => cy.addSeeElements('http://see.de')) .then(() => cy.get('button[data-cy="clear-dataType-button"]').click({force: true})) .then(() => - cy.get(FIELD_dataType).clear({force: true}).type('string', {force: true}).get(FIELD_dataTypeOption).eq(1).click({force: true}) + cy.get(FIELD_dataType).clear({force: true}).type('string', {force: true}).get(FIELD_dataTypeOption).eq(1).click({force: true}), ) .then(() => cy.get(SELECTOR_editorSaveButton).click({force: true})) .then(() => cy.getUpdatedRDF()) @@ -53,8 +53,8 @@ describe('Test migration of common attributes on Constraint/Characteristic type ' samm:dataType xsd:string;\n' + ' samm:preferredName "testPreferredName"@en;\n' + ' samm:description "testDescription"@en;\n' + - ' samm:see .' - ) + ' samm:see .', + ), ); }); @@ -70,8 +70,8 @@ describe('Test migration of common attributes on Constraint/Characteristic type ' samm:dataType xsd:string;\n' + ' samm:preferredName "testPreferredName"@en;\n' + ' samm:description "testDescription"@en;\n' + - ' samm:see .' - ) + ' samm:see .', + ), ); }); @@ -91,7 +91,7 @@ describe('Test migration of common attributes on Constraint/Characteristic type .type('Characteristic', {force: true}) .get('mat-option') .contains('Characteristic2') - .click({force: true}) + .click({force: true}), ) .then(() => cy.get(SELECTOR_editorSaveButton).click({force: true})) .then(() => cy.getUpdatedRDF()) @@ -101,7 +101,7 @@ describe('Test migration of common attributes on Constraint/Characteristic type ' samm:preferredName "testPreferredName"@en;\n' + ' samm:description "testDescription"@en;\n' + ' samm:see ;\n' + - ' samm-c:elementCharacteristic :Characteristic2.' + ' samm-c:elementCharacteristic :Characteristic2.', ); }); }); @@ -118,8 +118,8 @@ describe('Test migration of common attributes on Constraint/Characteristic type ' samm:preferredName "testPreferredName"@en;\n' + ' samm:description "testDescription"@en;\n' + ' samm:see ;\n' + - ' samm-c:elementCharacteristic :Characteristic2.' - ) + ' samm-c:elementCharacteristic :Characteristic2.', + ), ); }); @@ -135,8 +135,8 @@ describe('Test migration of common attributes on Constraint/Characteristic type ' samm:preferredName "testPreferredName"@en;\n' + ' samm:description "testDescription"@en;\n' + ' samm:see ;\n' + - ' samm-c:elementCharacteristic :Characteristic2.' - ) + ' samm-c:elementCharacteristic :Characteristic2.', + ), ); }); @@ -152,8 +152,8 @@ describe('Test migration of common attributes on Constraint/Characteristic type ' samm:preferredName "testPreferredName"@en;\n' + ' samm:description "testDescription"@en;\n' + ' samm:see ;\n' + - ' samm-c:elementCharacteristic :Characteristic2.' - ) + ' samm-c:elementCharacteristic :Characteristic2.', + ), ); }); @@ -169,8 +169,8 @@ describe('Test migration of common attributes on Constraint/Characteristic type ' samm:preferredName "testPreferredName"@en;\n' + ' samm:description "testDescription"@en;\n' + ' samm:see ;\n' + - ' samm-c:elementCharacteristic :Characteristic2.\n' - ) + ' samm-c:elementCharacteristic :Characteristic2.\n', + ), ); }); @@ -187,7 +187,7 @@ describe('Test migration of common attributes on Constraint/Characteristic type ' samm:preferredName "testPreferredName"@en;\n' + ' samm:description "testDescription"@en;\n' + ' samm:see ;\n' + - ' samm-c:values ("1" "2" "a" "b" "3" "4").' + ' samm-c:values ("1" "2" "a" "b" "3" "4").', ); }); }); @@ -221,8 +221,8 @@ describe('Test migration of common attributes on Constraint/Characteristic type ' samm:preferredName "testPreferredName"@en;\n' + ' samm:description "testDescription"@en;\n' + ' samm:see ;\n' + - ' samm-c:unit unit:commonYear.' - ) + ' samm-c:unit unit:commonYear.', + ), ); }); @@ -241,8 +241,8 @@ describe('Test migration of common attributes on Constraint/Characteristic type ' samm:preferredName "testPreferredName"@en;\n' + ' samm:description "testDescription"@en;\n' + ' samm:see ;\n' + - ' samm-c:unit unit:ampere.' - ) + ' samm-c:unit unit:ampere.', + ), ); }); @@ -257,8 +257,8 @@ describe('Test migration of common attributes on Constraint/Characteristic type ':Characteristic1 a samm-c:SingleEntity;\n' + ' samm:preferredName "testPreferredName"@en;\n' + ' samm:description "testDescription"@en;\n' + - ' samm:see .' - ) + ' samm:see .', + ), ); }); @@ -275,8 +275,8 @@ describe('Test migration of common attributes on Constraint/Characteristic type ':Characteristic1 a samm-c:SingleEntity;\n' + ' samm:preferredName "testPreferredName"@en;\n' + ' samm:description "testDescription"@en;\n' + - ' samm:see .' - ) + ' samm:see .', + ), ); }); @@ -297,15 +297,15 @@ describe('Test migration of common attributes on Constraint/Characteristic type ' samm:preferredName "testPreferredName"@en;\n' + ' samm:description "testDescription"@en;\n' + ' samm:see ;\n' + - ' samm-c:unit unit:acre.' - ) + ' samm-c:unit unit:acre.', + ), ) .then(() => cy.dbClickShape('Characteristic1')) .then(() => cy.get(FIELD_characteristicName).click({force: true}).get('mat-option').contains('Duration').click({force: true})) .then(() => cy.get(FIELD_unit).should('have.value', 'acre')) .then(() => cy.get('[data-cy=clear-unit-button]').click({force: true})) .then(() => - cy.get(FIELD_unit).clear({force: true}).type('day').get('mat-option[data-unit-cy="day"]').contains('day').click({force: true}) + cy.get(FIELD_unit).clear({force: true}).type('day').get('mat-option[data-unit-cy="day"]').contains('day').click({force: true}), ) .then(() => cy.get(SELECTOR_editorSaveButton).click({force: true})) .then(() => cy.getUpdatedRDF()) @@ -316,8 +316,8 @@ describe('Test migration of common attributes on Constraint/Characteristic type ' samm:preferredName "testPreferredName"@en;\n' + ' samm:description "testDescription"@en;\n' + ' samm:see ;\n' + - ' samm-c:unit unit:day.' - ) + ' samm-c:unit unit:day.', + ), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/editor/point3d-entity.cy.ts b/core/apps/ame-e2e/src/integration/editor/point3d-entity.cy.ts index 01055b26..917c43dc 100644 --- a/core/apps/ame-e2e/src/integration/editor/point3d-entity.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/point3d-entity.cy.ts @@ -36,13 +36,13 @@ describe('Time Series Entity', () => { .then(() => cy .getCellLabel('Entity1', 'description') - .should('eq', 'Inherited\ndescription = Defines a position in a three dimensional space. @en') + .should('eq', 'Inherited\ndescription = Defines a position in a three dimensional space. @en'), ) .then(() => cy.clickShape('Point3d')) .then(() => cy.getCellLabel('Point3d', 'preferredName').should('eq', 'preferredName = Point 3D @en')) .then(() => - cy.getCellLabel('Point3d', 'description').should('eq', 'description = Defines a position in a three dimensional space. @en') + cy.getCellLabel('Point3d', 'description').should('eq', 'description = Defines a position in a three dimensional space. @en'), ) .then(() => cy.clickShape('[x]')) diff --git a/core/apps/ame-e2e/src/integration/editor/search-element.cy.ts b/core/apps/ame-e2e/src/integration/editor/search-element.cy.ts index 499605ce..a2da1ce9 100644 --- a/core/apps/ame-e2e/src/integration/editor/search-element.cy.ts +++ b/core/apps/ame-e2e/src/integration/editor/search-element.cy.ts @@ -35,7 +35,7 @@ describe('Test search for element', () => { expect(listing).to.have.length(5); }) .get('.mat-mdc-option') - .each(option => expect(option).to.contain('property')) + .each(option => expect(option).to.contain('property')), ); }); }); @@ -77,7 +77,7 @@ describe('Test search for element', () => { .get('.mat-mdc-option') .each(option => expect(option).to.contain('Characteristic1')) .click({force: true}) - .then(() => cy.contains('Characteristic1').should('be.visible')) + .then(() => cy.contains('Characteristic1').should('be.visible')), ); }); @@ -98,7 +98,7 @@ describe('Test search for element', () => { .get('.mat-mdc-option') .each(option => expect(option).to.contain('property5')) .click({force: true}) - .then(() => cy.contains('property5').should('be.visible')) + .then(() => cy.contains('property5').should('be.visible')), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/export/lang-string/create-edit-entity-value.cy.ts b/core/apps/ame-e2e/src/integration/export/lang-string/create-edit-entity-value.cy.ts index 77b1f539..da48e114 100644 --- a/core/apps/ame-e2e/src/integration/export/lang-string/create-edit-entity-value.cy.ts +++ b/core/apps/ame-e2e/src/integration/export/lang-string/create-edit-entity-value.cy.ts @@ -67,7 +67,7 @@ describe('Create and edit Entity value RDF lang string properties in edit view t .then(() => cy.get(SELECTOR_addEntityValue).click()) .then(() => cy.get(FIELD_entityValueName).should('exist').type('ev1')) .then(() => - cy.get(FIELD_propertyValueComplex).eq(0).should('exist').clear().type('ev2').get('.mat-mdc-option').contains('ev2').click() + cy.get(FIELD_propertyValueComplex).eq(0).should('exist').clear().type('ev2').get('.mat-mdc-option').contains('ev2').click(), ) .then(() => cy.get('[data-cy="property3Value"]').should('exist').clear().type('ev3')) .then(() => cy.get('[data-cy="property4Value"]').should('exist').clear().type('ev4')) @@ -150,25 +150,25 @@ describe('Create and edit Entity value RDF lang string properties in edit view t .then(() => cy.get(SELECTOR_addEntityValue).click()) .then(() => cy.get(FIELD_entityValueName).should('exist').type('ev1')) .then(() => - cy.get(FIELD_propertyValueComplex).eq(0).should('exist').clear().type('ev2').get('.mat-mdc-option').contains('ev2').click() + cy.get(FIELD_propertyValueComplex).eq(0).should('exist').clear().type('ev2').get('.mat-mdc-option').contains('ev2').click(), ) .then(() => cy.get('[data-cy="property3Value"]').should('exist').clear().type('ev3')) .then(() => - cy.get(FIELD_propertyLanguageValue).eq(0).should('exist').clear().type('en').get('.mat-mdc-option').contains('en').click() + cy.get(FIELD_propertyLanguageValue).eq(0).should('exist').clear().type('en').get('.mat-mdc-option').contains('en').click(), ) .then(() => cy.get('[data-cy="property3Add"]').click()) .then(() => cy.get('[data-cy="property3Value"]').eq(1).should('exist').clear().type('ev4')) .then(() => - cy.get(FIELD_propertyLanguageValue).eq(1).should('exist').clear().type('de').get('.mat-mdc-option').contains('de').click() + cy.get(FIELD_propertyLanguageValue).eq(1).should('exist').clear().type('de').get('.mat-mdc-option').contains('de').click(), ) .then(() => cy.get('[data-cy="property4Value"]').should('exist').clear().type('ev5')) .then(() => - cy.get(FIELD_propertyLanguageValue).eq(2).should('exist').clear().type('en').get('.mat-mdc-option').contains('en').click() + cy.get(FIELD_propertyLanguageValue).eq(2).should('exist').clear().type('en').get('.mat-mdc-option').contains('en').click(), ) .then(() => cy.get('[data-cy="property4Add"]').click()) .then(() => cy.get('[data-cy="property4Value"]').eq(1).should('exist').clear().type('ev6')) .then(() => - cy.get(FIELD_propertyLanguageValue).eq(3).should('exist').clear().type('de').get('.mat-mdc-option').contains('de').click() + cy.get(FIELD_propertyLanguageValue).eq(3).should('exist').clear().type('de').get('.mat-mdc-option').contains('de').click(), ) .then(() => cy.get(SELECTOR_entitySaveButton).click().wait(200)) .then(() => cyHelp.clickSaveButton()) diff --git a/core/apps/ame-e2e/src/integration/export/lang-string/load-edit-modal-entity-value.cy.ts b/core/apps/ame-e2e/src/integration/export/lang-string/load-edit-modal-entity-value.cy.ts index 25d96aaa..c877a561 100644 --- a/core/apps/ame-e2e/src/integration/export/lang-string/load-edit-modal-entity-value.cy.ts +++ b/core/apps/ame-e2e/src/integration/export/lang-string/load-edit-modal-entity-value.cy.ts @@ -36,22 +36,22 @@ describe('Loading and edit Entity value RDF lang string properties on modal test .then(() => cy.get('[data-cy="modeCodeValue"]').type('30')) .then(() => cy.get('[data-cy="modeDescriptionValue"]').type('DescriptionOne')) .then(() => - cy.get(FIELD_propertyLanguageValue).eq(0).should('exist').clear().type('de').get('.mat-mdc-option').contains('de').click() + cy.get(FIELD_propertyLanguageValue).eq(0).should('exist').clear().type('de').get('.mat-mdc-option').contains('de').click(), ) .then(() => cy.get('[data-cy="modeDescriptionAdd"]').click()) .then(() => cy.get('[data-cy="modeDescriptionValue"]').eq(1).type('DescriptionTwo')) .then(() => - cy.get(FIELD_propertyLanguageValue).eq(1).should('exist').clear().type('en').get('.mat-mdc-option').contains('en').click() + cy.get(FIELD_propertyLanguageValue).eq(1).should('exist').clear().type('en').get('.mat-mdc-option').contains('en').click(), ) .then(() => cy.get('[data-cy="modeDescriptionAdd"]').click()) .then(() => cy.get('[data-cy="modeDescriptionValue"]').eq(2).type('DescriptionThree')) .then(() => - cy.get(FIELD_propertyLanguageValue).eq(2).should('exist').clear().type('en').get('.mat-mdc-option').contains('en').click() + cy.get(FIELD_propertyLanguageValue).eq(2).should('exist').clear().type('en').get('.mat-mdc-option').contains('en').click(), ) .then(() => cy.get('[data-cy="modeDescriptionRemove"]').eq(0).click()) .then(() => cy.get('[data-cy="modeValueValue"]').type('Value')) .then(() => - cy.get(FIELD_propertyLanguageValue).eq(2).should('exist').clear().type('en').get('.mat-mdc-option').contains('en').click() + cy.get(FIELD_propertyLanguageValue).eq(2).should('exist').clear().type('en').get('.mat-mdc-option').contains('en').click(), ) .then(() => cy.get(SELECTOR_entitySaveButton).click()); @@ -125,7 +125,7 @@ describe('Loading and edit Entity value RDF lang string properties on modal test ':modeValue "Value"@en', ], }, - ]) + ]), ); }); @@ -137,32 +137,32 @@ describe('Loading and edit Entity value RDF lang string properties on modal test .then(() => cy.get('[data-cy="modeCodeValue"]').type('30')) .then(() => cy.get('[data-cy="modeDescriptionValue"]').type('DescriptionOne')) .then(() => - cy.get(FIELD_propertyLanguageValue).eq(0).should('exist').clear().type('de').get('.mat-mdc-option').contains('de').click() + cy.get(FIELD_propertyLanguageValue).eq(0).should('exist').clear().type('de').get('.mat-mdc-option').contains('de').click(), ) .then(() => cy.get('[data-cy="modeDescriptionAdd"]').click()) .then(() => cy.get('[data-cy="modeDescriptionValue"]').eq(1).type('DescriptionTwo')) .then(() => - cy.get(FIELD_propertyLanguageValue).eq(1).should('exist').clear().type('en').get('.mat-mdc-option').contains('en').click() + cy.get(FIELD_propertyLanguageValue).eq(1).should('exist').clear().type('en').get('.mat-mdc-option').contains('en').click(), ) .then(() => cy.get('[data-cy="modeDescriptionAdd"]').click()) .then(() => cy.get('[data-cy="modeDescriptionValue"]').eq(2).type('DescriptionThree')) .then(() => - cy.get(FIELD_propertyLanguageValue).eq(2).should('exist').clear().type('en').get('.mat-mdc-option').contains('en').click() + cy.get(FIELD_propertyLanguageValue).eq(2).should('exist').clear().type('en').get('.mat-mdc-option').contains('en').click(), ) .then(() => cy.get('[data-cy="modeDescriptionRemove"]').eq(0).click()) .then(() => cy.get('[data-cy="modeValueValue"]').type('ValueOne')) .then(() => - cy.get(FIELD_propertyLanguageValue).eq(2).should('exist').clear().type('en').get('.mat-mdc-option').contains('en').click() + cy.get(FIELD_propertyLanguageValue).eq(2).should('exist').clear().type('en').get('.mat-mdc-option').contains('en').click(), ) .then(() => cy.get('[data-cy="modeValueAdd"]').click()) .then(() => cy.get('[data-cy="modeValueValue"]').eq(1).type('ValueTwo')) .then(() => - cy.get(FIELD_propertyLanguageValue).eq(3).should('exist').clear().type('de').get('.mat-mdc-option').contains('de').click() + cy.get(FIELD_propertyLanguageValue).eq(3).should('exist').clear().type('de').get('.mat-mdc-option').contains('de').click(), ) .then(() => cy.get('[data-cy="modeValueAdd"]').click()) .then(() => cy.get('[data-cy="modeValueValue"]').eq(2).type('ValueThree')) .then(() => - cy.get(FIELD_propertyLanguageValue).eq(4).should('exist').clear().type('de').get('.mat-mdc-option').contains('de').click() + cy.get(FIELD_propertyLanguageValue).eq(4).should('exist').clear().type('de').get('.mat-mdc-option').contains('de').click(), ) .then(() => cy.get('[data-cy="modeValueRemove"]').eq(0).click()) .then(() => cy.get(SELECTOR_entitySaveButton).click()); @@ -239,7 +239,7 @@ describe('Loading and edit Entity value RDF lang string properties on modal test ':modeValue ("ValueOne"@en "ValueThree"@de)', ], }, - ]) + ]), ); }); }); diff --git a/core/apps/ame-e2e/src/integration/generation/generate-open-api.cy.ts b/core/apps/ame-e2e/src/integration/generation/generate-open-api.cy.ts index b3323156..22beae42 100644 --- a/core/apps/ame-e2e/src/integration/generation/generate-open-api.cy.ts +++ b/core/apps/ame-e2e/src/integration/generation/generate-open-api.cy.ts @@ -43,7 +43,7 @@ describe('Test generation and download of open api specification', () => { .then(() => cy.get(GENERATION_tbOutputButton_JSON).click()) .then(() => cy.get(GENERATION_tbBaseUrlInput).focus().clear().blur()) .then(() => - cy.get(GENERATION_tbBaseUrlInputError).should('exist').should('be.visible').should('contain.text', 'Please add a valid url') + cy.get(GENERATION_tbBaseUrlInputError).should('exist').should('be.visible').should('contain.text', 'Please add a valid url'), ) .then(() => cy.get(GENERATION_tbBaseUrlInput).focus().type('https://example.com').blur()) .then(() => cy.get(GENERATION_tbGenerateOpenApiButton).click().wait(5000)) @@ -63,7 +63,7 @@ describe('Test generation and download of open api specification', () => { .get(GENERATION_resourcePathTitle) .should('exist') .should('be.visible') - .should('contain.text', 'Resource Path - The resource path for the Aspect API endpoints') + .should('contain.text', 'Resource Path - The resource path for the Aspect API endpoints'), ) .then(() => cy.get(GENERATION_resourcePathInput).should('exist').should('be.visible').focus().clear().blur()) .then(() => @@ -71,7 +71,7 @@ describe('Test generation and download of open api specification', () => { .get(GENERATION_resourcePathRequiredError) .should('exist') .should('be.visible') - .should('contain.text', 'Resource path is required') + .should('contain.text', 'Resource path is required'), ) .then(() => checkResourcePath()) .then(() => cy.get(GENERATION_uploadTitle).should('exist').should('be.visible').should('contain.text', 'Upload JSON File')) @@ -81,7 +81,7 @@ describe('Test generation and download of open api specification', () => { .get(GENERATION_uploadFileRequireError) .should('exist') .should('be.visible') - .should('contain.text', 'JSON file is required - a variable has been defined in the resource path.') + .should('contain.text', 'JSON file is required - a variable has been defined in the resource path.'), ) .then(() => cy.get(GENERATION_uploadContentFileInput).attachFile('valid-json.json')) .then(() => cy.get(GENERATION_uploadContent).should('not.exist')) @@ -98,7 +98,7 @@ describe('Test generation and download of open api specification', () => { .then(() => cy.get(GENERATION_tbOutputButton_YAML).click()) .then(() => cy.get(GENERATION_tbBaseUrlInput).focus().clear().blur()) .then(() => - cy.get(GENERATION_tbBaseUrlInputError).should('exist').should('be.visible').should('contain.text', 'Please add a valid url') + cy.get(GENERATION_tbBaseUrlInputError).should('exist').should('be.visible').should('contain.text', 'Please add a valid url'), ) .then(() => cy.get(GENERATION_tbBaseUrlInput).focus().type('https://example.com').blur()) .then(() => cy.get(GENERATION_tbGenerateOpenApiButton).click({force: true}).wait(5000)) @@ -116,7 +116,7 @@ describe('Test generation and download of open api specification', () => { .get(GENERATION_resourcePathTitle) .should('exist') .should('be.visible') - .should('contain.text', 'Resource Path - The resource path for the Aspect API endpoints') + .should('contain.text', 'Resource Path - The resource path for the Aspect API endpoints'), ) .then(() => cy.get(GENERATION_resourcePathInput).should('exist').should('be.visible').focus().clear().blur()) .then(() => @@ -124,7 +124,7 @@ describe('Test generation and download of open api specification', () => { .get(GENERATION_resourcePathRequiredError) .should('exist') .should('be.visible') - .should('contain.text', 'Resource path is required') + .should('contain.text', 'Resource path is required'), ) .then(() => checkResourcePath()) .then(() => cy.get(GENERATION_uploadTitle).should('exist').should('be.visible').should('contain.text', 'Upload YAML File')) @@ -134,7 +134,7 @@ describe('Test generation and download of open api specification', () => { .get(GENERATION_uploadFileRequireError) .should('exist') .should('be.visible') - .should('contain.text', 'YAML file is required - a variable has been defined in the resource path.') + .should('contain.text', 'YAML file is required - a variable has been defined in the resource path.'), ) .then(() => cy.get(GENERATION_uploadContentFileInput).attachFile('valid-yml.yml')) .then(() => cy.get(GENERATION_uploadContent).should('not.exist')) diff --git a/core/apps/ame-e2e/src/integration/settings/change-model-namespace.cy.ts b/core/apps/ame-e2e/src/integration/settings/change-model-namespace.cy.ts index 61fa0728..26a52ab3 100644 --- a/core/apps/ame-e2e/src/integration/settings/change-model-namespace.cy.ts +++ b/core/apps/ame-e2e/src/integration/settings/change-model-namespace.cy.ts @@ -63,7 +63,7 @@ describe('Test namespace settings dialog', () => { }, { fixture: '/change-namespace/aspect-workspace-one.txt', - } + }, ); cy.saveAspectModelToWorkspace().then(() => cy.get(SELECTOR_workspaceBtn).click()); @@ -81,7 +81,7 @@ describe('Test namespace settings dialog', () => { }, { fixture: '/change-namespace/aspect-workspace-two.txt', - } + }, ); openNamespaceSettings() @@ -114,7 +114,7 @@ describe('Test namespace settings dialog', () => { }, { fixture: '/change-namespace/aspect-workspace-one.txt', - } + }, ); cy.intercept( @@ -125,7 +125,7 @@ describe('Test namespace settings dialog', () => { }, { fixture: '/change-namespace/aspect-workspace-two.txt', - } + }, ); cy.intercept( @@ -136,7 +136,7 @@ describe('Test namespace settings dialog', () => { }, { fixture: '/change-namespace/aspect-workspace-three.txt', - } + }, ); cy.dbClickShape('AspectDefault') diff --git a/core/apps/ame-e2e/src/integration/settings/language-settings.cy.ts b/core/apps/ame-e2e/src/integration/settings/language-settings.cy.ts index 150a5bc6..473bbebc 100644 --- a/core/apps/ame-e2e/src/integration/settings/language-settings.cy.ts +++ b/core/apps/ame-e2e/src/integration/settings/language-settings.cy.ts @@ -38,7 +38,7 @@ describe('Test language settings', () => { .then(() => cy.get('[data-cy=langCode]').should('exist').should('have.value', 'English (en)')) .then(() => cy.get('[data-cy="addLang"]').click({force: true})) .then(() => - cy.get('[data-cy="langCode"]').get('input:last').type('German').wait(1500).get('.mat-mdc-option:first').click({force: true}) + cy.get('[data-cy="langCode"]').get('input:last').type('German').wait(1500).get('.mat-mdc-option:first').click({force: true}), ); cy.wait(1000) .then(() => cy.get('[data-cy="settingsDialogApplyButton"]').click({force: true})) diff --git a/core/apps/ame-e2e/src/plugins/index.js b/core/apps/ame-e2e/src/plugins/index.js index 067272d6..2f6a61ae 100644 --- a/core/apps/ame-e2e/src/plugins/index.js +++ b/core/apps/ame-e2e/src/plugins/index.js @@ -31,6 +31,6 @@ module.exports = on => { ], }, }, - }) + }), ); }; diff --git a/core/apps/ame-e2e/src/support/api-mocks.ts b/core/apps/ame-e2e/src/support/api-mocks.ts index c4dafbc4..116af2f6 100644 --- a/core/apps/ame-e2e/src/support/api-mocks.ts +++ b/core/apps/ame-e2e/src/support/api-mocks.ts @@ -46,8 +46,8 @@ export function setUpDynamicModellingInterceptors(namespacesConfig: InterceptorC ...acc, [value.name]: value.files.map(f => f.name), }), - {} - ) + {}, + ), ); // Set up files content to return @@ -60,7 +60,7 @@ export function setUpDynamicModellingInterceptors(namespacesConfig: InterceptorC url: 'http://localhost:9091/ame/api/models', headers: {namespace: value.name, 'file-name': file.name}, }, - file.response + file.response, ); }); }); diff --git a/core/apps/ame-e2e/src/support/commands.ts b/core/apps/ame-e2e/src/support/commands.ts index cb6c1d4e..8fd0242c 100644 --- a/core/apps/ame-e2e/src/support/commands.ts +++ b/core/apps/ame-e2e/src/support/commands.ts @@ -283,7 +283,7 @@ declare global { targetShapeParams: { name: string; fields?: object[]; - } + }, ): Chainable; } } @@ -304,7 +304,7 @@ Cypress.Commands.add('getHTMLCell', (name: string) => cy.get(`[data-cell-id="${name}"]`).then($el => { $el.get(0).scrollIntoView({block: 'center'}); return $el; - }) + }), ); Cypress.Commands.add('dbClickShape', (name: string) => { @@ -336,7 +336,7 @@ Cypress.Commands.add('clickAddShapePlusIcon', (name: string) => plusIcon.fireEvent(new mxEventObject(mxEvent.CLICK)); return foundShape; }) - .wait(250) + .wait(250), ); Cypress.Commands.add('clickAddInputShapeIcon', (name: string) => @@ -354,7 +354,7 @@ Cypress.Commands.add('clickAddInputShapeIcon', (name: string) => inputIcon.fireEvent(new mxEventObject(mxEvent.CLICK)); return foundShape; }) - .wait(250) + .wait(250), ); Cypress.Commands.add('clickAddOutputShapeIcon', (name: string) => @@ -372,7 +372,7 @@ Cypress.Commands.add('clickAddOutputShapeIcon', (name: string) => outputIcon.fireEvent(new mxEventObject(mxEvent.CLICK)); return foundShape; }) - .wait(250) + .wait(250), ); Cypress.Commands.add('clickAddLeftShapeIcon', (name: string) => @@ -390,7 +390,7 @@ Cypress.Commands.add('clickAddLeftShapeIcon', (name: string) => leftIcon.fireEvent(new mxEventObject(mxEvent.CLICK)); return foundShape; }) - .wait(250) + .wait(250), ); Cypress.Commands.add('clickAddRightShapeIcon', (name: string) => @@ -408,7 +408,7 @@ Cypress.Commands.add('clickAddRightShapeIcon', (name: string) => rightIcon.fireEvent(new mxEventObject(mxEvent.CLICK)); return foundShape; }) - .wait(250) + .wait(250), ); Cypress.Commands.add('clickAddTraitPlusIcon', (characteristicName: string) => @@ -426,14 +426,14 @@ Cypress.Commands.add('clickAddTraitPlusIcon', (characteristicName: string) => constraintIcon.fireEvent(new mxEventObject(mxEvent.CLICK)); return foundShape; }) - .wait(250) + .wait(250), ); Cypress.Commands.add('clickConnectShapes', (nameSource, nameTarget) => cy .then(() => cyHelp.clickShape(nameSource)) .then(() => cyHelp.clickShape(nameTarget, true)) - .then(() => cy.get(SELECTOR_tbConnectButton).click({force: true})) + .then(() => cy.get(SELECTOR_tbConnectButton).click({force: true})), ); Cypress.Commands.add('getFormField', (name: string) => cy.get(`[ng-reflect-model="${name}"]`)); @@ -459,7 +459,7 @@ Cypress.Commands.add('dragElement', (selector: string, x: number, y: number) => .trigger('pointerdown', {button: 0, force: true}) .trigger('pointermove', {clientX: graphX, clientY: graphY, force: true, waitForAnimations: true}) .then(() => cy.get('#graph > svg').click(graphX, graphY, {force: true}).trigger('pointerup', {force: true})); - }) + }), ); Cypress.Commands.add('getUpdatedRDF', () => @@ -471,7 +471,7 @@ Cypress.Commands.add('getUpdatedRDF', () => resolve(win['angular.rdfService'].serializeModel(modelContent)); }); }); - }) + }), ); Cypress.Commands.add('getByText', name => cy.contains(new RegExp('^' + name + '$', 'g'))); @@ -493,7 +493,7 @@ Cypress.Commands.add('shapesConnected', (sourceShapeName: string, targetShapeNam if (!shapesConnected) { throw new Error(`Shape ${sourceShapeName} is not connected to ${targetShapeName}`); } - }) + }), ); Cypress.Commands.add('startModellingInvalidModel', () => { @@ -536,25 +536,25 @@ Cypress.Commands.add('openGenerationOpenApiSpec', () => { cy.intercept( 'POST', 'http://localhost:9091/ame/api/generate/open-api-spec?language=en&output=json&baseUrl=https://example.com&includeQueryApi=false&useSemanticVersion=false&pagingOption=NO_PAGING&resourcePath=null&ymlProperties=&jsonProperties=', - {fixture: 'valid-open-api.json'} + {fixture: 'valid-open-api.json'}, ); cy.intercept( 'POST', 'http://localhost:9091/ame/api/generate/open-api-spec?language=en&output=yaml&baseUrl=https://example.com&includeQueryApi=false&useSemanticVersion=false&pagingOption=NO_PAGING&resourcePath=null&ymlProperties=&jsonProperties=', - {fixture: 'valid-open-api.yaml'} + {fixture: 'valid-open-api.yaml'}, ); cy.intercept( 'POST', 'http://localhost:9091/ame/api/generate/open-api-spec?language=en&output=json&baseUrl=https://example.com&includeQueryApi=false&useSemanticVersion=false&pagingOption=NO_PAGING&resourcePath=/resource/%7BresourceId%7D&ymlProperties=&jsonProperties=%7B%0A%20%20%22key%22:%20%22value%22%0A%7D', - {fixture: 'valid-open-api.json'} + {fixture: 'valid-open-api.json'}, ); cy.intercept( 'POST', 'http://localhost:9091/ame/api/generate/open-api-spec?language=en&output=yaml&baseUrl=https://example.com&includeQueryApi=false&useSemanticVersion=false&pagingOption=NO_PAGING&resourcePath=/resource/%7BresourceId%7D&ymlProperties=resourceId:%0A%20%20name:%20resourceId%0A%20%20in:%20path%0A%20%20description:%20An%20example%20resource%20Id.%0A%20%20required:%20true%0A%20%20schema:%0A%20%20%20%20type:%20string%0A&jsonProperties=', - {fixture: 'valid-open-api.yaml'} + {fixture: 'valid-open-api.yaml'}, ); return cy.window().then(win => { @@ -567,19 +567,19 @@ Cypress.Commands.add('openGenerationAsyncApiSpec', () => { cy.intercept( 'POST', 'http://localhost:9091/ame/api/generate/async-api-spec?language=en&output=json&applicationId=application:id&channelAddress=foo/bar&useSemanticVersion=false&writeSeparateFiles=false', - {fixture: 'valid-open-api.json'} + {fixture: 'valid-open-api.json'}, ); cy.intercept( 'POST', 'http://localhost:9091/ame/api/generate/async-api-spec?language=en&output=yaml&applicationId=application:id&channelAddress=foo/bar&useSemanticVersion=false&writeSeparateFiles=false', - {fixture: 'valid-open-api.json'} + {fixture: 'valid-open-api.json'}, ); cy.intercept( 'POST', 'http://localhost:9091/ame/api/generate/async-api-spec?language=en&output=json&applicationId=application:id&channelAddress=foo/bar&useSemanticVersion=false&writeSeparateFiles=true', - {fixture: 'valid-open-api.json'} + {fixture: 'valid-open-api.json'}, ); return cy.window().then(win => { @@ -653,7 +653,7 @@ Cypress.Commands.add( targetShapeParams: { name: string; fields?: object[]; - } + }, ) => { return cy.window().then(win => { const sourceCell = cyHelp.findShapeByName(sourceShapeParams.name, win); @@ -667,5 +667,5 @@ Cypress.Commands.add( const mxGraphAttributeService: MxGraphAttributeService = win['angular.mxGraphAttributeService']; return mxGraphAttributeService.graph.getOutgoingEdges(sourceCell).some(edge => edge.target === targetCell); }); - } + }, ); diff --git a/core/apps/ame/src/app/app.component.ts b/core/apps/ame/src/app/app.component.ts index 656e091c..96f51b7f 100644 --- a/core/apps/ame/src/app/app.component.ts +++ b/core/apps/ame/src/app/app.component.ts @@ -45,7 +45,7 @@ export class AppComponent implements OnInit { private fileHandlingService: FileHandlingService, private translate: LanguageTranslationService, private searchesStateService: SearchesStateService, - private router: Router + private router: Router, ) { this.domainModelToRdf.listenForStoreUpdates(); } diff --git a/core/apps/ame/src/app/components/editor-canvas/editor-canvas.component.ts b/core/apps/ame/src/app/components/editor-canvas/editor-canvas.component.ts index b1857fad..faeea411 100644 --- a/core/apps/ame/src/app/components/editor-canvas/editor-canvas.component.ts +++ b/core/apps/ame/src/app/components/editor-canvas/editor-canvas.component.ts @@ -74,13 +74,13 @@ export class EditorCanvasComponent implements AfterViewInit, OnInit, OnDestroy { private changeDetector: ChangeDetectorRef, private editorService: EditorService, private configurationService: ConfigurationService, - public searchesStateService: SearchesStateService + public searchesStateService: SearchesStateService, ) { this.isShapeSettingsOpened$ = this.shapeSettingsStateService.onSettingsOpened$.asObservable(); this.isShapeSettingsOpened$.subscribe(() => requestAnimationFrame(() => { this.changeDetector.detectChanges(); - }) + }), ); } @@ -91,15 +91,15 @@ export class EditorCanvasComponent implements AfterViewInit, OnInit, OnDestroy { map(params => params?.get('urn')), filter(urn => !!urn), tap(urn => - this.mxGraphService.navigateToCellByUrn(urn) ? this.shapeSettingsService.editSelectedCell() : this.closeShapeSettings() + this.mxGraphService.navigateToCellByUrn(urn) ? this.shapeSettingsService.editSelectedCell() : this.closeShapeSettings(), ), switchMap(() => this.router.navigate([], { relativeTo: this.activatedRoute, queryParams: {urn: null}, queryParamsHandling: 'merge', - }) - ) + }), + ), ) .subscribe(); } @@ -162,7 +162,7 @@ export class EditorCanvasComponent implements AfterViewInit, OnInit, OnDestroy { .pipe( debounceTime(250), tap(event => this.mxGraphService.setScrollPosition(event)), - takeUntil(this.unsubscribe) + takeUntil(this.unsubscribe), ) .subscribe(); } diff --git a/core/apps/ame/src/app/components/loading/loading.component.ts b/core/apps/ame/src/app/components/loading/loading.component.ts index a6294198..6f9071e8 100644 --- a/core/apps/ame/src/app/components/loading/loading.component.ts +++ b/core/apps/ame/src/app/components/loading/loading.component.ts @@ -29,7 +29,7 @@ export class LoadingComponent implements AfterViewInit, OnDestroy { private router: Router, private electronTunnel: ElectronTunnelService, private modelApiService: ModelApiService, - private ngZone: NgZone + private ngZone: NgZone, ) {} ngAfterViewInit(): void { @@ -76,7 +76,7 @@ export class LoadingComponent implements AfterViewInit, OnDestroy { const {namespace, file} = data.options; return this.modelApiService.getAspectMetaModel(`${namespace}:${file}`); - }) + }), ); } } diff --git a/core/apps/ame/src/app/startup.service.ts b/core/apps/ame/src/app/startup.service.ts index 78e63fb3..ad2778a7 100644 --- a/core/apps/ame/src/app/startup.service.ts +++ b/core/apps/ame/src/app/startup.service.ts @@ -43,7 +43,7 @@ export class StartupService { private fileHandlingService: FileHandlingService, private mxGraphService: MxGraphService, private translate: LanguageTranslationService, - private ngZone: NgZone + private ngZone: NgZone, ) {} listenForLoading() { @@ -62,8 +62,8 @@ export class StartupService { }), take(1), switchMap(({isFirstWindow, model}) => - (isFirstWindow ? this.migratorService.startMigrating() : of(null)).pipe(switchMap(() => this.loadModel(model))) - ) + (isFirstWindow ? this.migratorService.startMigrating() : of(null)).pipe(switchMap(() => this.loadModel(model))), + ), ) .subscribe(() => { this.sidebarService.workspace.refresh(); @@ -77,7 +77,7 @@ export class StartupService { this.loadingScreenService.open({ title: this.translate.language.LOADING_SCREEN_DIALOG.MODEL_LOADING, content: this.translate.language.LOADING_SCREEN_DIALOG.MODEL_LOADING_WAIT, - }) + }), ); return this.electronSignalsService.call('requestWindowData').pipe( tap(data => (options = data.options)), @@ -90,13 +90,13 @@ export class StartupService { fromWorkspace: options?.fromWorkspace, editElementUrn: options?.editElement, }) - : of(this.fileHandlingService.createEmptyModel()) - ) + : of(this.fileHandlingService.createEmptyModel()), + ), ), tap(() => { this.modelSaveTracker.updateSavedModel(); this.loadingScreenService.close(); - }) + }), ); } } diff --git a/core/apps/ame/src/index.html b/core/apps/ame/src/index.html index ab27cf62..80ebbdcb 100644 --- a/core/apps/ame/src/index.html +++ b/core/apps/ame/src/index.html @@ -11,7 +11,7 @@ ~ SPDX-License-Identifier: MPL-2.0 --> - + diff --git a/core/electron-libs/windows-manager.js b/core/electron-libs/windows-manager.js index cb917754..0288a579 100644 --- a/core/electron-libs/windows-manager.js +++ b/core/electron-libs/windows-manager.js @@ -226,7 +226,7 @@ class WindowsManager { const createdWindow = options ? this.state.activeWindows.find( winInfo => - options.namespace === winInfo.options?.namespace && winInfo.options?.file === options.file && winInfo.options?.fromWorkspace + options.namespace === winInfo.options?.namespace && winInfo.options?.file === options.file && winInfo.options?.fromWorkspace, ) : null; diff --git a/core/libs/api/src/lib/migrator-api.service.ts b/core/libs/api/src/lib/migrator-api.service.ts index 305aab57..37c8349a 100644 --- a/core/libs/api/src/lib/migrator-api.service.ts +++ b/core/libs/api/src/lib/migrator-api.service.ts @@ -44,7 +44,7 @@ export class MigratorApiService { private http: HttpClient, private browserService: BrowserService, private modelApiService: ModelApiService, - private editorService: EditorService + private editorService: EditorService, ) { if (this.browserService.isStartedAsElectronApp() && !window.location.search.includes('?e2e=true')) { const remote = window.require('@electron/remote'); @@ -57,8 +57,8 @@ export class MigratorApiService { .loadExternalModels() .pipe( map((rdfModels: RdfModel[]) => - rdfModels.some(rdfModel => ExporterHelper.isVersionOutdated(rdfModel?.samm.version, this.config.currentSammVersion)) - ) + rdfModels.some(rdfModel => ExporterHelper.isVersionOutdated(rdfModel?.samm.version, this.config.currentSammVersion)), + ), ); } diff --git a/core/libs/api/src/lib/model-api.service.ts b/core/libs/api/src/lib/model-api.service.ts index 83a5d3f5..58dbea71 100644 --- a/core/libs/api/src/lib/model-api.service.ts +++ b/core/libs/api/src/lib/model-api.service.ts @@ -40,7 +40,7 @@ export class ModelApiService { private http: HttpClient, private loggerService: LogService, private browserService: BrowserService, - private modelValidatorService: ModelValidatorService + private modelValidatorService: ModelValidatorService, ) { if (this.browserService.isStartedAsElectronApp() && !window.location.search.includes('?e2e=true')) { const remote = window.require('@electron/remote'); @@ -60,7 +60,7 @@ export class ModelApiService { }) .pipe( timeout(this.requestTimeout), - catchError(res => throwError(() => res)) + catchError(res => throwError(() => res)), ); } @@ -72,7 +72,7 @@ export class ModelApiService { }) .pipe( timeout(this.requestTimeout), - catchError(res => throwError(() => res)) + catchError(res => throwError(() => res)), ); } @@ -84,7 +84,7 @@ export class ModelApiService { }) .pipe( timeout(this.requestTimeout), - catchError(res => throwError(() => res)) + catchError(res => throwError(() => res)), ); } @@ -101,7 +101,7 @@ export class ModelApiService { }) .pipe( timeout(this.requestTimeout), - catchError(res => throwError(() => res)) + catchError(res => throwError(() => res)), ); } @@ -117,7 +117,7 @@ export class ModelApiService { catchError(res => { res.error = JSON.parse(res.error)?.error; return throwError(() => res); - }) + }), ); } @@ -139,7 +139,7 @@ export class ModelApiService { }) .pipe( timeout(this.requestTimeout), - catchError(res => throwError(() => res)) + catchError(res => throwError(() => res)), ); } @@ -152,7 +152,7 @@ export class ModelApiService { .pipe( timeout(this.requestTimeout), catchError(res => throwError(() => res)), - retry(3) + retry(3), ); } @@ -171,9 +171,9 @@ export class ModelApiService { map(data => { return Object.keys(data).reduce( (fileNames, namespace) => [...fileNames, ...data[namespace].map((fileName: string) => `${namespace}:${fileName}`)], - [] + [], ); - }) + }), ); } @@ -185,11 +185,11 @@ export class ModelApiService { ...files, this.getAspectMetaModel(absoluteFileName).pipe(map(aspectMetaModel => new FileContentModel(absoluteFileName, aspectMetaModel))), ], - [] - ) + [], + ), ), mergeMap((files$: Observable[]) => (files$.length ? forkJoin(files$) : of([]))), - catchError(() => of([])) + catchError(() => of([])), ); } @@ -212,7 +212,7 @@ export class ModelApiService { }) .pipe( timeout(this.requestTimeout), - catchError(res => throwError(() => res)) + catchError(res => throwError(() => res)), ); } @@ -223,7 +223,7 @@ export class ModelApiService { }) .pipe( timeout(this.requestTimeout), - catchError(res => throwError(() => res)) + catchError(res => throwError(() => res)), ); } @@ -235,7 +235,7 @@ export class ModelApiService { }) .pipe( timeout(this.requestTimeout), - catchError(res => throwError(() => res)) + catchError(res => throwError(() => res)), ); } @@ -253,7 +253,7 @@ export class ModelApiService { */ validate(rdfContent: string, showNotifications = true): Observable> { return this.getViolationError(rdfContent).pipe( - tap(errors => showNotifications && this.modelValidatorService.notifyCorrectableErrors(errors)) + tap(errors => showNotifications && this.modelValidatorService.notifyCorrectableErrors(errors)), ); } @@ -265,7 +265,7 @@ export class ModelApiService { .pipe( timeout(this.requestTimeout), map((data: any) => data.violationErrors), - catchError(res => throwError(() => res)) + catchError(res => throwError(() => res)), ); } @@ -291,7 +291,7 @@ export class ModelApiService { catchError(res => { res.error = openApi.output === 'yaml' ? JSON.parse(res.error)?.error : res.error.error; return throwError(() => res); - }) + }), ); } @@ -314,7 +314,7 @@ export class ModelApiService { catchError(res => { res.error = asyncApi.output === 'yaml' ? JSON.parse(res.error)?.error : res.error.error; return throwError(() => res); - }) + }), ); } @@ -390,7 +390,7 @@ export class ModelApiService { } } return throwError(() => 'Server error'); - }) + }), ); } } diff --git a/core/libs/api/src/lib/model-validator.service.ts b/core/libs/api/src/lib/model-validator.service.ts index 1a2afb52..ed89d735 100644 --- a/core/libs/api/src/lib/model-validator.service.ts +++ b/core/libs/api/src/lib/model-validator.service.ts @@ -20,7 +20,11 @@ import {ViolationError} from '@ame/editor'; providedIn: 'root', }) export class ModelValidatorService { - constructor(private mxGraphService: MxGraphService, private notificationsService: NotificationsService, private logService: LogService) { + constructor( + private mxGraphService: MxGraphService, + private notificationsService: NotificationsService, + private logService: LogService, + ) { this.notificationsService.clearNotifications(); } diff --git a/core/libs/aspect-exporter/src/lib/domain-model-to-rdf.service.ts b/core/libs/aspect-exporter/src/lib/domain-model-to-rdf.service.ts index 80b0a71a..e3326099 100644 --- a/core/libs/aspect-exporter/src/lib/domain-model-to-rdf.service.ts +++ b/core/libs/aspect-exporter/src/lib/domain-model-to-rdf.service.ts @@ -74,14 +74,14 @@ export class DomainModelToRdfService { private eventVisitorService: EventVisitor, private unitVisitorService: UnitVisitor, private modelService: ModelService, - private cleanupVisitorService: CleanupVisitor + private cleanupVisitorService: CleanupVisitor, ) {} listenForStoreUpdates() { this.modelService.visitorAnnouncer$ .pipe( filter(() => !this.working), - tap(() => (this.working = true)) + tap(() => (this.working = true)), ) .subscribe(({observer}) => { try { diff --git a/core/libs/aspect-exporter/src/lib/rdf-list/rdf-list-helper.ts b/core/libs/aspect-exporter/src/lib/rdf-list/rdf-list-helper.ts index 2a08b279..bf7fb541 100644 --- a/core/libs/aspect-exporter/src/lib/rdf-list/rdf-list-helper.ts +++ b/core/libs/aspect-exporter/src/lib/rdf-list/rdf-list-helper.ts @@ -38,7 +38,7 @@ export class RdfListHelper { return DataFactory.literal( modelElement, - source.dataType && !(source instanceof DefaultStructuredValue) ? DataFactory.namedNode(source.dataType.getUrn()) : undefined + source.dataType && !(source instanceof DefaultStructuredValue) ? DataFactory.namedNode(source.dataType.getUrn()) : undefined, ); }); diff --git a/core/libs/aspect-exporter/src/lib/rdf-list/rdf-list.service.spec.ts b/core/libs/aspect-exporter/src/lib/rdf-list/rdf-list.service.spec.ts index 52af55c2..c904d782 100644 --- a/core/libs/aspect-exporter/src/lib/rdf-list/rdf-list.service.spec.ts +++ b/core/libs/aspect-exporter/src/lib/rdf-list/rdf-list.service.spec.ts @@ -201,7 +201,7 @@ describe('RDF Helper', () => { new DefaultProperty('1', 'property1', 'property1', null), new DefaultProperty('1', 'property2', 'property2', null), new DefaultProperty('1', 'property3', 'property3', null), - new DefaultProperty('1', 'property4', 'property4', null) + new DefaultProperty('1', 'property4', 'property4', null), ); shouldBeListAndHave({first: 4, rest: 4, list: getList()}); }); @@ -215,7 +215,7 @@ describe('RDF Helper', () => { service.push( aspect, new DefaultProperty('1', 'property2', 'property2', null), - new DefaultProperty('1', 'property1', 'property1', null) + new DefaultProperty('1', 'property1', 'property1', null), ); shouldBeListAndHave({first: 2, rest: 2, list: getList()}); }); @@ -299,7 +299,7 @@ describe('RDF Helper', () => { new DefaultOperation('1', 'operation1', 'operation1', null), new DefaultOperation('1', 'operation2', 'operation2', null), new DefaultOperation('1', 'operation3', 'operation3', null), - new DefaultOperation('1', 'operation4', 'operation4', null) + new DefaultOperation('1', 'operation4', 'operation4', null), ); shouldBeListAndHave({first: 4, rest: 4, list: getList()}); }); @@ -313,7 +313,7 @@ describe('RDF Helper', () => { service.push( aspect, new DefaultOperation('1', 'operation2', 'operation2', null), - new DefaultOperation('1', 'operation1', 'operation1', null) + new DefaultOperation('1', 'operation1', 'operation1', null), ); shouldBeListAndHave({first: 2, rest: 2, list: getList()}); }); @@ -384,7 +384,7 @@ describe('RDF Helper', () => { new DefaultProperty('1', 'property1', 'property1', null), new DefaultProperty('1', 'property2', 'property2', null), new DefaultProperty('1', 'property3', 'property3', null), - new DefaultProperty('1', 'property4', 'property4', null) + new DefaultProperty('1', 'property4', 'property4', null), ); shouldBeListAndHave({first: 4, rest: 4, list: getList()}); }); @@ -398,7 +398,7 @@ describe('RDF Helper', () => { service.push( entity, new DefaultProperty('1', 'property2', 'property2', null), - new DefaultProperty('1', 'property1', 'property1', null) + new DefaultProperty('1', 'property1', 'property1', null), ); shouldBeListAndHave({first: 2, rest: 2, list: getList()}); }); diff --git a/core/libs/aspect-exporter/src/lib/rdf-list/rdf-list.service.ts b/core/libs/aspect-exporter/src/lib/rdf-list/rdf-list.service.ts index d2639992..10956c1c 100644 --- a/core/libs/aspect-exporter/src/lib/rdf-list/rdf-list.service.ts +++ b/core/libs/aspect-exporter/src/lib/rdf-list/rdf-list.service.ts @@ -48,7 +48,10 @@ export class RdfListService implements CreateEmptyRdfList, EmptyRdfList { return this.rdfModel.SAMM(); } - constructor(private nodeService: RdfNodeService, private modelService: ModelService) { + constructor( + private nodeService: RdfNodeService, + private modelService: ModelService, + ) { if (!environment.production) { window['angular.rdfListService'] = this; } @@ -64,7 +67,7 @@ export class RdfListService implements CreateEmptyRdfList, EmptyRdfList { const listElements = this.getListElements(list); const elementsToBeAdded = RdfListHelper.resolveNewElements( source, - filterDuplicates ? RdfListHelper.filterDuplicates(filteredList, listElements) : filteredList + filterDuplicates ? RdfListHelper.filterDuplicates(filteredList, listElements) : filteredList, ); if (!elementsToBeAdded.listElements.length) { @@ -131,7 +134,7 @@ export class RdfListService implements CreateEmptyRdfList, EmptyRdfList { { elementsToKeep: [], blankNodesToRemove: [], - } + }, ); this.store.removeQuads([...this.getQuads(list), ...blankNodesToRemove]); @@ -143,7 +146,7 @@ export class RdfListService implements CreateEmptyRdfList, EmptyRdfList { this.emptyList(source, property); this.createNewList( DataFactory.namedNode(source.aspectModelUrn), - RdfListConstants.getPredicateByKey(property, this.samm, this.rdfModel.SAMMC()) + RdfListConstants.getPredicateByKey(property, this.samm, this.rdfModel.SAMMC()), ); } @@ -184,14 +187,14 @@ export class RdfListService implements CreateEmptyRdfList, EmptyRdfList { this.store.addQuad( element.blankNode, this.samm.PropertyProperty(), - DataFactory.namedNode(element.metaModelElement.property.aspectModelUrn) + DataFactory.namedNode(element.metaModelElement.property.aspectModelUrn), ); if (element.metaModelElement.keys.optional) { this.store.addQuad( element.blankNode, this.samm.OptionalProperty(), - DataFactory.literal(`${element.metaModelElement.keys.optional}`, DataFactory.namedNode(simpleDataTypes.boolean.isDefinedBy)) + DataFactory.literal(`${element.metaModelElement.keys.optional}`, DataFactory.namedNode(simpleDataTypes.boolean.isDefinedBy)), ); } @@ -199,7 +202,7 @@ export class RdfListService implements CreateEmptyRdfList, EmptyRdfList { this.store.addQuad( element.blankNode, this.samm.NotInPayloadProperty(), - DataFactory.literal(`${element.metaModelElement.keys.notInPayload}`, DataFactory.namedNode(simpleDataTypes.boolean.isDefinedBy)) + DataFactory.literal(`${element.metaModelElement.keys.notInPayload}`, DataFactory.namedNode(simpleDataTypes.boolean.isDefinedBy)), ); } @@ -207,7 +210,7 @@ export class RdfListService implements CreateEmptyRdfList, EmptyRdfList { this.store.addQuad( element.blankNode, this.samm.payloadNameProperty(), - DataFactory.literal(`${element.metaModelElement.keys.payloadName}`, DataFactory.namedNode(simpleDataTypes.string.isDefinedBy)) + DataFactory.literal(`${element.metaModelElement.keys.payloadName}`, DataFactory.namedNode(simpleDataTypes.string.isDefinedBy)), ); } } @@ -310,7 +313,7 @@ export class RdfListService implements CreateEmptyRdfList, EmptyRdfList { const nextParent = index === nodes.length - 1 ? this.samm.RdfNil() : DataFactory.blankNode(); quads.push( DataFactory.triple(previousParent, this.samm.RdfFirst(), node), - DataFactory.triple(previousParent, this.samm.RdfRest(), nextParent) + DataFactory.triple(previousParent, this.samm.RdfRest(), nextParent), ); previousParent = nextParent; }); diff --git a/core/libs/aspect-exporter/src/lib/rdf-node/rdf-node.service.ts b/core/libs/aspect-exporter/src/lib/rdf-node/rdf-node.service.ts index 8d98d79f..d7321539 100644 --- a/core/libs/aspect-exporter/src/lib/rdf-node/rdf-node.service.ts +++ b/core/libs/aspect-exporter/src/lib/rdf-node/rdf-node.service.ts @@ -24,7 +24,10 @@ import {BasePropertiesInterface, LocaleInterface} from './interfaces'; providedIn: 'root', }) export class RdfNodeService { - constructor(public loggerService: LogService, public modelService: ModelService) {} + constructor( + public loggerService: LogService, + public modelService: ModelService, + ) {} /** * Removes the quads corresponding to the given properties of an element. @@ -46,8 +49,8 @@ export class RdfNodeService { DataFactory.namedNode(metaModelElement.aspectModelUrn), DataFactory.namedNode(rdfModel.SAMM().getAspectModelUrn(property)), null, - null - )?.[0] + null, + )?.[0], ) .filter(quad => quad); // filter null/undefined } @@ -70,7 +73,7 @@ export class RdfNodeService { const newElement = DataFactory.triple( DataFactory.namedNode(metaModelElement.aspectModelUrn), rdfModel.SAMM().RdfType(), - DataFactory.namedNode(RdfModelUtil.getFullQualifiedModelName(metaModelElement)) + DataFactory.namedNode(RdfModelUtil.getFullQualifiedModelName(metaModelElement)), ); rdfModel.store.addQuad(newElement); } @@ -84,7 +87,7 @@ export class RdfNodeService { DataFactory.namedNode(metaModelElement.aspectModelUrn), DataFactory.namedNode(rdfModel.SAMM().getAspectModelUrn(key)), null, - null + null, ); if (outdatedQuad?.length) { @@ -114,7 +117,7 @@ export class RdfNodeService { this.addDatatype( metaModelElement, samm.getAspectModelUrn(key), - encodingsList.find((el: any) => el.value === propKey).isDefinedBy + encodingsList.find((el: any) => el.value === propKey).isDefinedBy, ); break; } @@ -168,8 +171,8 @@ export class RdfNodeService { DataFactory.triple( DataFactory.namedNode(metaModelElement.aspectModelUrn), DataFactory.namedNode(rdfModel.SAMM().getAspectModelUrn(key)), - DataFactory.literal(localeValue.value, localeValue.language) - ) + DataFactory.literal(localeValue.value, localeValue.language), + ), ); }); break; @@ -202,8 +205,8 @@ export class RdfNodeService { DataFactory.triple( DataFactory.namedNode(metaModelElement.aspectModelUrn), DataFactory.namedNode(rdfModel.SAMM().getAspectModelUrn(key)), - DataFactory.literal(localeValue.value, localeValue.language) - ) + DataFactory.literal(localeValue.value, localeValue.language), + ), ); }); } @@ -212,7 +215,7 @@ export class RdfNodeService { metaModelElement: BaseMetaModelElement, properties: BasePropertiesInterface, key: string, - aspectModelUrn: string + aspectModelUrn: string, ) { const arrayProperty: string[] = properties[key]; arrayProperty.forEach(property => { @@ -224,7 +227,7 @@ export class RdfNodeService { metaModelElement: BaseMetaModelElement, aspectModelUrn: string, value: string | number | boolean, - encodeUrn?: boolean + encodeUrn?: boolean, ) { if (!value && value !== 0) { return; @@ -235,8 +238,8 @@ export class RdfNodeService { DataFactory.triple( DataFactory.namedNode(metaModelElement.aspectModelUrn), DataFactory.namedNode(aspectModelUrn), - DataFactory.namedNode(encodeUrn ? encodeURIComponent(`${value}`) : `${value}`) - ) + DataFactory.namedNode(encodeUrn ? encodeURIComponent(`${value}`) : `${value}`), + ), ); } @@ -244,7 +247,7 @@ export class RdfNodeService { metaModelElement: BaseMetaModelElement, value: string | number | boolean, aspectModelUrn: string, - characteristicType?: Type + characteristicType?: Type, ) { if (!value && value !== 0) { return; @@ -255,8 +258,8 @@ export class RdfNodeService { DataFactory.triple( DataFactory.namedNode(metaModelElement.aspectModelUrn), DataFactory.namedNode(aspectModelUrn), - DataFactory.literal(`${value}`, RdfModelUtil.resolveAccurateType(metaModelElement, aspectModelUrn, rdfModel, characteristicType)) - ) + DataFactory.literal(`${value}`, RdfModelUtil.resolveAccurateType(metaModelElement, aspectModelUrn, rdfModel, characteristicType)), + ), ); } } diff --git a/core/libs/aspect-exporter/src/lib/visitor/abstract-entity/abstract-entity.ts b/core/libs/aspect-exporter/src/lib/visitor/abstract-entity/abstract-entity.ts index 5527a4e2..ee03bc88 100644 --- a/core/libs/aspect-exporter/src/lib/visitor/abstract-entity/abstract-entity.ts +++ b/core/libs/aspect-exporter/src/lib/visitor/abstract-entity/abstract-entity.ts @@ -25,7 +25,11 @@ export class AbstractEntityVisitor extends BaseVisitor { private store: Store; private samm: Samm; - constructor(public rdfNodeService: RdfNodeService, public rdfListService: RdfListService, public rdfService: RdfService) { + constructor( + public rdfNodeService: RdfNodeService, + public rdfListService: RdfListService, + public rdfService: RdfService, + ) { super(rdfService); } @@ -72,7 +76,7 @@ export class AbstractEntityVisitor extends BaseVisitor { this.store.addQuad( DataFactory.namedNode(entity.aspectModelUrn), this.samm.ExtendsProperty(), - DataFactory.namedNode(entity.extendedElement.aspectModelUrn) + DataFactory.namedNode(entity.extendedElement.aspectModelUrn), ); this.setPrefix(entity.extendedElement.aspectModelUrn); } diff --git a/core/libs/aspect-exporter/src/lib/visitor/abstract-property/abstract-property-visitor.ts b/core/libs/aspect-exporter/src/lib/visitor/abstract-property/abstract-property-visitor.ts index 6a37bc59..6d8875a8 100644 --- a/core/libs/aspect-exporter/src/lib/visitor/abstract-property/abstract-property-visitor.ts +++ b/core/libs/aspect-exporter/src/lib/visitor/abstract-property/abstract-property-visitor.ts @@ -69,7 +69,7 @@ export class AbstractPropertyVisitor extends BaseVisitor { - constructor(public rdfNodeService: RdfNodeService, public rdfListService: RdfListService, rdfService: RdfService) { + constructor( + public rdfNodeService: RdfNodeService, + public rdfListService: RdfListService, + rdfService: RdfService, + ) { super(rdfService); } diff --git a/core/libs/aspect-exporter/src/lib/visitor/base-visitor.ts b/core/libs/aspect-exporter/src/lib/visitor/base-visitor.ts index 1378457b..7d9ba73a 100644 --- a/core/libs/aspect-exporter/src/lib/visitor/base-visitor.ts +++ b/core/libs/aspect-exporter/src/lib/visitor/base-visitor.ts @@ -27,7 +27,7 @@ export abstract class BaseVisitor { } const externalRdfModel = this.rdfService.externalRdfModels.find( - rdfModel => rdfModel.store.getQuads(DataFactory.namedNode(aspectModelUrn), null, null, null).length > 0 + rdfModel => rdfModel.store.getQuads(DataFactory.namedNode(aspectModelUrn), null, null, null).length > 0, ); const alias = externalRdfModel?.getAliasByNamespace(namespace); this.rdfService.currentRdfModel.addPrefix(alias, namespace); diff --git a/core/libs/aspect-exporter/src/lib/visitor/characteristic/characteristic-visitor.ts b/core/libs/aspect-exporter/src/lib/visitor/characteristic/characteristic-visitor.ts index 3a07ab7f..d5e31f3c 100644 --- a/core/libs/aspect-exporter/src/lib/visitor/characteristic/characteristic-visitor.ts +++ b/core/libs/aspect-exporter/src/lib/visitor/characteristic/characteristic-visitor.ts @@ -73,7 +73,11 @@ export class CharacteristicVisitor extends BaseVisitor { DefaultStructuredValue: (characteristic: DefaultStructuredValue) => this.updateStructuredValue(characteristic), }; - constructor(private rdfNodeService: RdfNodeService, private rdfListService: RdfListService, rdfService: RdfService) { + constructor( + private rdfNodeService: RdfNodeService, + private rdfListService: RdfListService, + rdfService: RdfService, + ) { super(rdfService); } @@ -98,14 +102,14 @@ export class CharacteristicVisitor extends BaseVisitor { this.store.addQuad( DataFactory.namedNode(characteristic.aspectModelUrn), this.sammC.BaseCharacteristicProperty(), - DataFactory.namedNode(characteristic.baseCharacteristic.aspectModelUrn) + DataFactory.namedNode(characteristic.baseCharacteristic.aspectModelUrn), ); this.setPrefix(characteristic.baseCharacteristic.aspectModelUrn); } // update constraints this.store.removeQuads( - this.store.getQuads(DataFactory.namedNode(characteristic.aspectModelUrn), this.sammC.ConstraintProperty(), null, null) + this.store.getQuads(DataFactory.namedNode(characteristic.aspectModelUrn), this.sammC.ConstraintProperty(), null, null), ); for (const constraint of characteristic.constraints || []) { @@ -117,8 +121,8 @@ export class CharacteristicVisitor extends BaseVisitor { DataFactory.triple( DataFactory.namedNode(characteristic.aspectModelUrn), this.sammC.ConstraintProperty(), - DataFactory.namedNode(constraint.aspectModelUrn) - ) + DataFactory.namedNode(constraint.aspectModelUrn), + ), ); this.setPrefix(constraint.aspectModelUrn); } @@ -158,7 +162,7 @@ export class CharacteristicVisitor extends BaseVisitor { } else { object = DataFactory.literal( characteristic.defaultValue.toString(), - characteristic.dataType ? DataFactory.namedNode(characteristic.dataType?.getUrn()) : undefined + characteristic.dataType ? DataFactory.namedNode(characteristic.dataType?.getUrn()) : undefined, ); } @@ -188,7 +192,7 @@ export class CharacteristicVisitor extends BaseVisitor { this.store.addQuad( DataFactory.namedNode(characteristic.aspectModelUrn), this.sammC.EitherLeftProperty(), - DataFactory.namedNode(characteristic.left.aspectModelUrn) + DataFactory.namedNode(characteristic.left.aspectModelUrn), ); this.setPrefix(characteristic.left.aspectModelUrn); } @@ -198,7 +202,7 @@ export class CharacteristicVisitor extends BaseVisitor { this.store.addQuad( DataFactory.namedNode(characteristic.aspectModelUrn), this.sammC.EitherRightProperty(), - DataFactory.namedNode(characteristic.right.aspectModelUrn) + DataFactory.namedNode(characteristic.right.aspectModelUrn), ); this.setPrefix(characteristic.right.aspectModelUrn); } @@ -214,7 +218,7 @@ export class CharacteristicVisitor extends BaseVisitor { this.store.addQuad( DataFactory.namedNode(characteristic.aspectModelUrn), this.sammC.DeconstructionRuleProperty(), - DataFactory.literal(characteristic.deconstructionRule) + DataFactory.literal(characteristic.deconstructionRule), ); // update elements @@ -265,7 +269,7 @@ export class CharacteristicVisitor extends BaseVisitor { this.store.addQuad( DataFactory.namedNode(characteristic.aspectModelUrn), this.sammC.UnitProperty(), - DataFactory.namedNode(characteristic.unit.aspectModelUrn) + DataFactory.namedNode(characteristic.unit.aspectModelUrn), ); this.setPrefix(characteristic.unit.aspectModelUrn); } @@ -278,7 +282,7 @@ export class CharacteristicVisitor extends BaseVisitor { this.store.addQuad( DataFactory.namedNode(characteristic.aspectModelUrn), this.sammC.ElementCharacteristicProperty(), - DataFactory.namedNode(characteristic.elementCharacteristic.aspectModelUrn) + DataFactory.namedNode(characteristic.elementCharacteristic.aspectModelUrn), ); this.setPrefix(characteristic.elementCharacteristic.aspectModelUrn); } @@ -307,7 +311,7 @@ export class CharacteristicVisitor extends BaseVisitor { this.removeOldAndAddNewReference( DataFactory.namedNode(parent.aspectModelUrn), parent instanceof DefaultCollection ? this.sammC.ElementCharacteristicProperty() : this.samm.CharacteristicProperty(), - DataFactory.namedNode(characteristic.aspectModelUrn) + DataFactory.namedNode(characteristic.aspectModelUrn), ); } diff --git a/core/libs/aspect-exporter/src/lib/visitor/constraint/constraint-visitor.spec.ts b/core/libs/aspect-exporter/src/lib/visitor/constraint/constraint-visitor.spec.ts index bf590c8c..14138dff 100644 --- a/core/libs/aspect-exporter/src/lib/visitor/constraint/constraint-visitor.spec.ts +++ b/core/libs/aspect-exporter/src/lib/visitor/constraint/constraint-visitor.spec.ts @@ -39,7 +39,7 @@ describe('Constraint Visitor', () => { const rdfModel = { store: new Store(), SAMM: jest.fn(() => new Samm('')), - SAMMC: jest.fn(() => ({ConstraintProperty: () => 'constraintProperty'} as any)), + SAMMC: jest.fn(() => ({ConstraintProperty: () => 'constraintProperty'}) as any), hasNamespace: jest.fn(() => false), addPrefix: jest.fn(() => {}), }; @@ -51,7 +51,7 @@ describe('Constraint Visitor', () => { BoundDefinition.AT_MOST, BoundDefinition.AT_LEAST, 0, - 100 + 100, ); const fixedPointConstraint = new DefaultFixedPointConstraint('1', 'samm#fixedPointConstraint', 'fixedPointConstraint', 1, 2); const lengthConstraint = new DefaultLengthConstraint('1', 'samm#lengthConstraint', 'lengthConstraint', 100, 200); @@ -61,7 +61,7 @@ describe('Constraint Visitor', () => { '1', 'samm#regularExpressionConstraint', 'regularExpressionConstraint', - 'regularExpressionValue' + 'regularExpressionValue', ); const localeConstraint = new DefaultLocaleConstraint('1', 'samm#localeConstraint', 'localeConstraint', 'en'); diff --git a/core/libs/aspect-exporter/src/lib/visitor/constraint/constraint-visitor.ts b/core/libs/aspect-exporter/src/lib/visitor/constraint/constraint-visitor.ts index 26089d63..f6928026 100644 --- a/core/libs/aspect-exporter/src/lib/visitor/constraint/constraint-visitor.ts +++ b/core/libs/aspect-exporter/src/lib/visitor/constraint/constraint-visitor.ts @@ -52,7 +52,11 @@ export class ConstraintVisitor extends BaseVisitor { DefaultLocaleConstraint: (constraint: DefaultLocaleConstraint) => this.updateLocale(constraint), }; - constructor(public rdfNodeService: RdfNodeService, public mxGraphService: MxGraphService, rdfService: RdfService) { + constructor( + public rdfNodeService: RdfNodeService, + public mxGraphService: MxGraphService, + rdfService: RdfService, + ) { super(rdfService); } @@ -135,7 +139,7 @@ export class ConstraintVisitor extends BaseVisitor { DataFactory.namedNode(parent.aspectModelUrn), this.sammC.ConstraintProperty(), DataFactory.namedNode(constraint.aspectModelUrn), - DataFactory.namedNode(constraint.aspectModelUrn) + DataFactory.namedNode(constraint.aspectModelUrn), ); }); } diff --git a/core/libs/aspect-exporter/src/lib/visitor/entity-instance/entity-instance-visitor.spec.ts b/core/libs/aspect-exporter/src/lib/visitor/entity-instance/entity-instance-visitor.spec.ts index 4e0ccbe2..9acc77f1 100644 --- a/core/libs/aspect-exporter/src/lib/visitor/entity-instance/entity-instance-visitor.spec.ts +++ b/core/libs/aspect-exporter/src/lib/visitor/entity-instance/entity-instance-visitor.spec.ts @@ -28,7 +28,7 @@ class MockRDFModel { rdfModel = { store: new Store(), SAMM: jest.fn(() => new Samm('')), - SAMMC: jest.fn(() => ({ConstraintProperty: () => 'constraintProperty'} as any)), + SAMMC: jest.fn(() => ({ConstraintProperty: () => 'constraintProperty'}) as any), hasNamespace: jest.fn(() => false), addPrefix: jest.fn(() => {}), } as any; diff --git a/core/libs/aspect-exporter/src/lib/visitor/entity-instance/entity-instance-visitor.ts b/core/libs/aspect-exporter/src/lib/visitor/entity-instance/entity-instance-visitor.ts index 90174959..4799ee4f 100644 --- a/core/libs/aspect-exporter/src/lib/visitor/entity-instance/entity-instance-visitor.ts +++ b/core/libs/aspect-exporter/src/lib/visitor/entity-instance/entity-instance-visitor.ts @@ -22,7 +22,11 @@ import {Samm} from '@ame/vocabulary'; @Injectable() export class EntityInstanceVisitor extends BaseVisitor { - constructor(private rdfListService: RdfListService, public modelService: ModelService, rdfService: RdfService) { + constructor( + private rdfListService: RdfListService, + public modelService: ModelService, + rdfService: RdfService, + ) { super(rdfService); } @@ -51,7 +55,7 @@ export class EntityInstanceVisitor extends BaseVisitor { { propertyCollectionWithLangString: [], property: [], - } + }, ); if (propertyCollectionWithLangString.length) { @@ -109,7 +113,7 @@ export class EntityInstanceVisitor extends BaseVisitor { rdfModel.store.addQuad( DataFactory.namedNode(entityValue.aspectModelUrn), rdfModel.SAMM().RdfType(), - DataFactory.namedNode(entityValue.entity.aspectModelUrn) + DataFactory.namedNode(entityValue.entity.aspectModelUrn), ); } } diff --git a/core/libs/aspect-exporter/src/lib/visitor/entity/entity-visitor.spec.ts b/core/libs/aspect-exporter/src/lib/visitor/entity/entity-visitor.spec.ts index e717838c..8bc86234 100644 --- a/core/libs/aspect-exporter/src/lib/visitor/entity/entity-visitor.spec.ts +++ b/core/libs/aspect-exporter/src/lib/visitor/entity/entity-visitor.spec.ts @@ -29,7 +29,7 @@ describe('Entity Visitor', () => { const rdfModel = { store: new Store(), SAMM: jest.fn(() => new Samm('')), - SAMMC: jest.fn(() => ({ConstraintProperty: () => 'constraintProperty'} as any)), + SAMMC: jest.fn(() => ({ConstraintProperty: () => 'constraintProperty'}) as any), hasNamespace: jest.fn(() => false), addPrefix: jest.fn(() => {}), }; diff --git a/core/libs/aspect-exporter/src/lib/visitor/entity/entity-visitor.ts b/core/libs/aspect-exporter/src/lib/visitor/entity/entity-visitor.ts index 94aeeaa4..5ca8f709 100644 --- a/core/libs/aspect-exporter/src/lib/visitor/entity/entity-visitor.ts +++ b/core/libs/aspect-exporter/src/lib/visitor/entity/entity-visitor.ts @@ -30,7 +30,7 @@ export class EntityVisitor extends BaseVisitor { public rdfNodeService: RdfNodeService, public graphService: MxGraphService, public rdfListService: RdfListService, - public rdfService: RdfService + public rdfService: RdfService, ) { super(rdfService); } @@ -87,7 +87,7 @@ export class EntityVisitor extends BaseVisitor { this.store.addQuad( DataFactory.namedNode(entity.aspectModelUrn), this.samm.ExtendsProperty(), - DataFactory.namedNode(entity.extendedElement.aspectModelUrn) + DataFactory.namedNode(entity.extendedElement.aspectModelUrn), ); this.setPrefix(entity.extendedElement.aspectModelUrn); } diff --git a/core/libs/aspect-exporter/src/lib/visitor/event/event-visitor.ts b/core/libs/aspect-exporter/src/lib/visitor/event/event-visitor.ts index c37cf6d3..0575723a 100644 --- a/core/libs/aspect-exporter/src/lib/visitor/event/event-visitor.ts +++ b/core/libs/aspect-exporter/src/lib/visitor/event/event-visitor.ts @@ -24,7 +24,11 @@ export class EventVisitor extends BaseVisitor { return this.rdfNodeService.modelService.currentRdfModel.store; } - constructor(private rdfNodeService: RdfNodeService, rdfService: RdfService, public rdfListService: RdfListService) { + constructor( + private rdfNodeService: RdfNodeService, + rdfService: RdfService, + public rdfListService: RdfListService, + ) { super(rdfService); } diff --git a/core/libs/aspect-exporter/src/lib/visitor/operation/operation-visitor.ts b/core/libs/aspect-exporter/src/lib/visitor/operation/operation-visitor.ts index 88956c53..622c401a 100644 --- a/core/libs/aspect-exporter/src/lib/visitor/operation/operation-visitor.ts +++ b/core/libs/aspect-exporter/src/lib/visitor/operation/operation-visitor.ts @@ -24,7 +24,11 @@ export class OperationVisitor extends BaseVisitor { return this.rdfNodeService.modelService.currentRdfModel.store; } - constructor(private rdfNodeService: RdfNodeService, rdfService: RdfService, public rdfListService: RdfListService) { + constructor( + private rdfNodeService: RdfNodeService, + rdfService: RdfService, + public rdfListService: RdfListService, + ) { super(rdfService); } @@ -67,7 +71,7 @@ export class OperationVisitor extends BaseVisitor { this.store.addQuad( DataFactory.namedNode(operation.aspectModelUrn), this.rdfService.currentRdfModel.samm.OutputProperty(), - DataFactory.namedNode(property.aspectModelUrn) + DataFactory.namedNode(property.aspectModelUrn), ); } } diff --git a/core/libs/aspect-exporter/src/lib/visitor/property/property-visitor.spec.ts b/core/libs/aspect-exporter/src/lib/visitor/property/property-visitor.spec.ts index 0576a7a0..3efa217d 100644 --- a/core/libs/aspect-exporter/src/lib/visitor/property/property-visitor.spec.ts +++ b/core/libs/aspect-exporter/src/lib/visitor/property/property-visitor.spec.ts @@ -29,7 +29,7 @@ describe('Property Visitor', () => { const rdfModel = { store: new Store(), SAMM: jest.fn(() => new Samm('')), - SAMMC: jest.fn(() => ({ConstraintProperty: () => 'constraintProperty'} as any)), + SAMMC: jest.fn(() => ({ConstraintProperty: () => 'constraintProperty'}) as any), hasNamespace: jest.fn(() => false), addPrefix: jest.fn(() => {}), }; diff --git a/core/libs/aspect-exporter/src/lib/visitor/property/property-visitor.ts b/core/libs/aspect-exporter/src/lib/visitor/property/property-visitor.ts index e9c8766f..e41de3d4 100644 --- a/core/libs/aspect-exporter/src/lib/visitor/property/property-visitor.ts +++ b/core/libs/aspect-exporter/src/lib/visitor/property/property-visitor.ts @@ -24,7 +24,10 @@ export class PropertyVisitor extends BaseVisitor { return this.rdfNodeService.modelService.currentRdfModel.store; } - constructor(public rdfNodeService: RdfNodeService, rdfService: RdfService) { + constructor( + public rdfNodeService: RdfNodeService, + rdfService: RdfService, + ) { super(rdfService); } @@ -64,7 +67,7 @@ export class PropertyVisitor extends BaseVisitor { this.store.addQuad( DataFactory.namedNode(property.aspectModelUrn), this.rdfService.currentRdfModel.samm.CharacteristicProperty(), - DataFactory.namedNode(property.characteristic.aspectModelUrn) + DataFactory.namedNode(property.characteristic.aspectModelUrn), ); } @@ -77,7 +80,7 @@ export class PropertyVisitor extends BaseVisitor { this.store.addQuad( DataFactory.namedNode(property.aspectModelUrn), this.rdfService.currentRdfModel.samm.ExtendsProperty(), - DataFactory.namedNode(property.extendedElement.aspectModelUrn) + DataFactory.namedNode(property.extendedElement.aspectModelUrn), ); } } diff --git a/core/libs/aspect-exporter/src/lib/visitor/unit/unit-visitor.ts b/core/libs/aspect-exporter/src/lib/visitor/unit/unit-visitor.ts index d2d2f6dd..2619c3a7 100644 --- a/core/libs/aspect-exporter/src/lib/visitor/unit/unit-visitor.ts +++ b/core/libs/aspect-exporter/src/lib/visitor/unit/unit-visitor.ts @@ -29,7 +29,10 @@ export class UnitVisitor extends BaseVisitor { return this.rdfNodeService.modelService.currentRdfModel.SAMM(); } - constructor(private rdfNodeService: RdfNodeService, rdfService: RdfService) { + constructor( + private rdfNodeService: RdfNodeService, + rdfService: RdfService, + ) { super(rdfService); } @@ -64,7 +67,7 @@ export class UnitVisitor extends BaseVisitor { this.store.addQuad( DataFactory.namedNode(unit.aspectModelUrn), this.samm.ReferenceUnitProperty(), - DataFactory.namedNode(unit.referenceUnit.aspectModelUrn) + DataFactory.namedNode(unit.referenceUnit.aspectModelUrn), ); this.setPrefix(unit.referenceUnit.aspectModelUrn); } @@ -81,8 +84,8 @@ export class UnitVisitor extends BaseVisitor { DataFactory.triple( DataFactory.namedNode(unit.aspectModelUrn), this.samm.QuantityKindProperty(), - DataFactory.namedNode(quantityKind.aspectModelUrn) - ) + DataFactory.namedNode(quantityKind.aspectModelUrn), + ), ); this.setPrefix(quantityKind.aspectModelUrn); diff --git a/core/libs/cache/src/lib/cached-file.ts b/core/libs/cache/src/lib/cached-file.ts index 2e404189..22eef218 100644 --- a/core/libs/cache/src/lib/cached-file.ts +++ b/core/libs/cache/src/lib/cached-file.ts @@ -44,7 +44,10 @@ export class CachedFile { } } - constructor(public fileName: string, public namespace: string) {} + constructor( + public fileName: string, + public namespace: string, + ) {} resolveElement(instance: T & IsNamed): T { const aspectModelUrn = instance.aspectModelUrn; @@ -138,7 +141,7 @@ export class CachedFile { getCachedEntityValues(): Array { return Array.from(this.cachedElements.values()).reduce( (acc: DefaultEntityInstance[], item: any) => (item instanceof DefaultEntityInstance ? [...acc, item] : acc), - [] + [], ); } @@ -155,14 +158,14 @@ export class CachedFile { getCachedUnits(): Array { return Array.from(this.cachedElements.values()).reduce( (acc: DefaultUnit[], item: any) => (item instanceof DefaultUnit && !item.isPredefined() ? [...acc, item] : acc), - [] + [], ); } getCachedEvents(): Array { return Array.from(this.cachedElements.values()).reduce( (acc: DefaultEvent[], item: any) => (item instanceof DefaultEvent && !item.isPredefined() ? [...acc, item] : acc), - [] + [], ); } diff --git a/core/libs/connection/src/lib/models/entity-inheritance-connector.ts b/core/libs/connection/src/lib/models/entity-inheritance-connector.ts index 8183d1a4..c573b989 100644 --- a/core/libs/connection/src/lib/models/entity-inheritance-connector.ts +++ b/core/libs/connection/src/lib/models/entity-inheritance-connector.ts @@ -30,7 +30,7 @@ export class EntityInheritanceConnector extends InheritanceConnector { protected filtersService: FiltersService, protected translate: LanguageTranslationService, protected propertyAbstractPropertyConnector?: PropertyAbstractPropertyConnectionHandler, - protected entityPropertyConnector?: EntityPropertyConnectionHandler + protected entityPropertyConnector?: EntityPropertyConnectionHandler, ) { super(mxGraphService, mxGraphAttributeService, sammLangService, notificationsService, translate); } @@ -39,7 +39,7 @@ export class EntityInheritanceConnector extends InheritanceConnector { parentMetaModel: DefaultEntity, childMetaModel: DefaultAbstractEntity | DefaultEntity, parent: mxgraph.mxCell, - child: mxgraph.mxCell + child: mxgraph.mxCell, ) { if (parentMetaModel.extendedElement?.aspectModelUrn === childMetaModel.aspectModelUrn) { return; @@ -50,7 +50,7 @@ export class EntityInheritanceConnector extends InheritanceConnector { .filter( abstractProperty => abstractProperty instanceof DefaultAbstractProperty && - !childMetaModel.allProperties?.some(({property: p}) => p.extendedElement?.aspectModelUrn === abstractProperty.aspectModelUrn) + !childMetaModel.allProperties?.some(({property: p}) => p.extendedElement?.aspectModelUrn === abstractProperty.aspectModelUrn), ); const newProperties = abstractProperties.map(abstractProperty => { @@ -72,7 +72,7 @@ export class EntityInheritanceConnector extends InheritanceConnector { for (let i = 0; i < newProperties.length; i++) { const propertyCell = this.mxGraphService.renderModelElement( - this.filtersService.createNode(newProperties[i], {parent: parentMetaModel}) + this.filtersService.createNode(newProperties[i], {parent: parentMetaModel}), ); this.entityPropertyConnector.connect(parentMetaModel, newProperties[i], parent, propertyCell); @@ -80,7 +80,7 @@ export class EntityInheritanceConnector extends InheritanceConnector { newProperties[i], abstractProperties[i], propertyCell, - this.mxGraphService.resolveCellByModelElement(abstractProperties[i]) + this.mxGraphService.resolveCellByModelElement(abstractProperties[i]), ); } diff --git a/core/libs/connection/src/lib/models/inheritance-connector.ts b/core/libs/connection/src/lib/models/inheritance-connector.ts index f147966d..bfc6bf92 100644 --- a/core/libs/connection/src/lib/models/inheritance-connector.ts +++ b/core/libs/connection/src/lib/models/inheritance-connector.ts @@ -25,7 +25,7 @@ export abstract class InheritanceConnector { protected mxGraphAttributeService: MxGraphAttributeService, protected sammLangService: SammLanguageSettingsService, protected notificationsService: NotificationsService, - protected translate: LanguageTranslationService + protected translate: LanguageTranslationService, ) {} public connect(parentMetaModel: BaseMetaModelElement, childMetaModel: BaseMetaModelElement, parentCell: mxCell, childCell: mxCell) { diff --git a/core/libs/connection/src/lib/models/property-inheritance-connector.ts b/core/libs/connection/src/lib/models/property-inheritance-connector.ts index 24635b84..05cb7ae1 100644 --- a/core/libs/connection/src/lib/models/property-inheritance-connector.ts +++ b/core/libs/connection/src/lib/models/property-inheritance-connector.ts @@ -26,7 +26,7 @@ export class PropertyInheritanceConnector extends InheritanceConnector { protected mxGraphAttributeService: MxGraphAttributeService, protected sammLangService: SammLanguageSettingsService, protected notificationsService: NotificationsService, - protected translate: LanguageTranslationService + protected translate: LanguageTranslationService, ) { super(mxGraphService, mxGraphAttributeService, sammLangService, notificationsService, translate); } diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/abstract-entity--abstract-entity.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/abstract-entity--abstract-entity.service.ts index 3e29816c..3f6b4b63 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/abstract-entity--abstract-entity.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/abstract-entity--abstract-entity.service.ts @@ -34,7 +34,7 @@ export class AbstractEntityAbstractEntityConnectionHandler protected sammLangService: SammLanguageSettingsService, protected filtersService: FiltersService, protected translate: LanguageTranslationService, - private notificationService: NotificationsService + private notificationService: NotificationsService, ) { super(mxGraphService, mxGraphAttributeService, sammLangService, notificationService, filtersService, translate); } @@ -43,7 +43,7 @@ export class AbstractEntityAbstractEntityConnectionHandler parentMetaModel: DefaultAbstractEntity, childMetaModel: DefaultAbstractEntity, parentCell: mxgraph.mxCell, - childCell: mxgraph.mxCell + childCell: mxgraph.mxCell, ) { if (MxGraphHelper.isEntityCycleInheritance(childCell, parentMetaModel, this.mxGraphService.graph)) { this.notificationService.warning({ diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/abstract-entity--abstract-property.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/abstract-entity--abstract-property.service.ts index 124bf7b4..8ebc14ce 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/abstract-entity--abstract-property.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/abstract-entity--abstract-property.service.ts @@ -32,14 +32,14 @@ export class AbstractEntityAbstractPropertyConnectionHandler private entityInstanceService: EntityInstanceService, private propertyAbstractPropertyConnector: PropertyAbstractPropertyConnectionHandler, private entityPropertyConnector: EntityPropertyConnectionHandler, - private filtersService: FiltersService + private filtersService: FiltersService, ) {} public connect( parentMetaModel: DefaultAbstractEntity, childMetaModel: DefaultAbstractProperty, parentCell: mxgraph.mxCell, - childCell: mxgraph.mxCell + childCell: mxgraph.mxCell, ) { if (!parentMetaModel.properties.find(({property}) => property.aspectModelUrn === childMetaModel.aspectModelUrn)) { const overWrittenProperty = {property: childMetaModel, keys: {}}; @@ -56,7 +56,7 @@ export class AbstractEntityAbstractPropertyConnectionHandler for (const grandParent of grandParents) { const grandParentElement = MxGraphHelper.getModelElement(grandParent); const alreadyExtended = grandParentElement.properties.some( - ({property}) => property.extendedElement?.aspectModelUrn === childMetaModel.aspectModelUrn + ({property}) => property.extendedElement?.aspectModelUrn === childMetaModel.aspectModelUrn, ); if (alreadyExtended) { diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/abstract-entity--property.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/abstract-entity--property.service.ts index 2f7776d3..19cbb948 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/abstract-entity--property.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/abstract-entity--property.service.ts @@ -22,13 +22,16 @@ import {mxgraph} from 'mxgraph-factory'; providedIn: 'root', }) export class AbstractEntityPropertyConnectionHandler implements MultiShapeConnector { - constructor(private mxGraphService: MxGraphService, private entityInstanceService: EntityInstanceService) {} + constructor( + private mxGraphService: MxGraphService, + private entityInstanceService: EntityInstanceService, + ) {} public connect( parentMetaModel: DefaultAbstractEntity, childMetaModel: DefaultProperty, parentCell: mxgraph.mxCell, - childCell: mxgraph.mxCell + childCell: mxgraph.mxCell, ) { if (!parentMetaModel.properties.find(({property}) => property.aspectModelUrn === childMetaModel.aspectModelUrn)) { const overWrittenProperty = {property: childMetaModel, keys: {}}; diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/abstract-property--abstract-property.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/abstract-property--abstract-property.service.ts index ae01b6d4..447ffc73 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/abstract-property--abstract-property.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/abstract-property--abstract-property.service.ts @@ -32,7 +32,7 @@ export class AbstractPropertyAbstractPropertyConnectionHandler protected mxGraphAttributeService: MxGraphAttributeService, protected sammLangService: SammLanguageSettingsService, protected translate: LanguageTranslationService, - private notificationService: NotificationsService + private notificationService: NotificationsService, ) { super(mxGraphService, mxGraphAttributeService, sammLangService, notificationService, translate); } @@ -41,7 +41,7 @@ export class AbstractPropertyAbstractPropertyConnectionHandler parentMetaModel: DefaultAbstractProperty, childMetaModel: DefaultAbstractProperty, parentCell: mxgraph.mxCell, - childCell: mxgraph.mxCell + childCell: mxgraph.mxCell, ) { if (this.hasEntityParent(parentCell)) { this.notificationsService.warning({ diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/aspect--property.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/aspect--property.service.ts index d1b976e7..564f5c7a 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/aspect--property.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/aspect--property.service.ts @@ -27,7 +27,7 @@ export class AspectPropertyConnectionHandler implements MultiShapeConnector property === childMetaModel)) { parentMetaModel.properties.push({property: childMetaModel, keys: {}}); diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/characteristic--entity.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/characteristic--entity.service.ts index 73fa138f..641b8d2c 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/characteristic--entity.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/characteristic--entity.service.ts @@ -42,7 +42,7 @@ export class CharacteristicEntityConnectionHandler implements MultiShapeConnecto private mxGraphShapeOverlayService: MxGraphShapeOverlayService, private sammLangService: SammLanguageSettingsService, private namespacesCacheService: NamespacesCacheService, - private notificationsService: NotificationsService + private notificationsService: NotificationsService, ) {} connect(parentMetaModel: DefaultCharacteristic, childMetaModel: DefaultEntity, parent: mxgraph.mxCell, child: mxgraph.mxCell): void { diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/collection--characteristic.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/collection--characteristic.service.ts index 7f6a118c..df7209f6 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/collection--characteristic.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/collection--characteristic.service.ts @@ -21,7 +21,10 @@ import {mxgraph} from 'mxgraph-factory'; providedIn: 'root', }) export class CollectionCharacteristicConnectionHandler implements MultiShapeConnector { - constructor(private mxGraphService: MxGraphService, private mxGraphAttributeService: MxGraphAttributeService) {} + constructor( + private mxGraphService: MxGraphService, + private mxGraphAttributeService: MxGraphAttributeService, + ) {} public connect(parentMetaModel: DefaultCollection, childMetaModel: DefaultCharacteristic, parent: mxgraph.mxCell, child: mxgraph.mxCell) { this.mxGraphAttributeService.graph.getOutgoingEdges(parent).forEach(outEdge => { diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/either--left-characteristic.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/either--left-characteristic.service.ts index f3b97f1c..0158d298 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/either--left-characteristic.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/either--left-characteristic.service.ts @@ -21,7 +21,10 @@ import {mxgraph} from 'mxgraph-factory'; providedIn: 'root', }) export class EitherCharacteristicLeftConnectionHandler implements MultiShapeConnector { - constructor(private mxGraphService: MxGraphService, private mxGraphAttributeService: MxGraphAttributeService) {} + constructor( + private mxGraphService: MxGraphService, + private mxGraphAttributeService: MxGraphAttributeService, + ) {} public connect(parentMetaModel: DefaultEither, childMetaModel: DefaultCharacteristic, parent: mxgraph.mxCell, child: mxgraph.mxCell) { parentMetaModel.left = childMetaModel; diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/either--right-characteristic.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/either--right-characteristic.service.ts index 71529c82..81cdf192 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/either--right-characteristic.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/either--right-characteristic.service.ts @@ -21,7 +21,10 @@ import {mxgraph} from 'mxgraph-factory'; providedIn: 'root', }) export class EitherCharacteristicRightConnectionHandler implements MultiShapeConnector { - constructor(private mxGraphService: MxGraphService, private mxGraphAttributeService: MxGraphAttributeService) {} + constructor( + private mxGraphService: MxGraphService, + private mxGraphAttributeService: MxGraphAttributeService, + ) {} public connect(parentMetaModel: DefaultEither, childMetaModel: DefaultCharacteristic, parent: mxgraph.mxCell, child: mxgraph.mxCell) { parentMetaModel.right = childMetaModel; diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/entity--abstract-entity.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/entity--abstract-entity.service.ts index 39cbd15d..d0fc667d 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/entity--abstract-entity.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/entity--abstract-entity.service.ts @@ -38,7 +38,7 @@ export class EntityAbstractEntityConnectionHandler protected entityPropertyConnector: EntityPropertyConnectionHandler, protected filtersService: FiltersService, protected translate: LanguageTranslationService, - private notificationService: NotificationsService + private notificationService: NotificationsService, ) { super( mxGraphService, @@ -48,7 +48,7 @@ export class EntityAbstractEntityConnectionHandler filtersService, translate, propertyAbstractPropertyConnector, - entityPropertyConnector + entityPropertyConnector, ); } @@ -56,7 +56,7 @@ export class EntityAbstractEntityConnectionHandler parentMetaModel: DefaultEntity, childMetaModel: DefaultAbstractEntity, parent: mxgraph.mxCell, - child: mxgraph.mxCell + child: mxgraph.mxCell, ): void { if (MxGraphHelper.isEntityCycleInheritance(child, parentMetaModel, this.mxGraphService.graph)) { this.notificationService.warning({ diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/entity--entity.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/entity--entity.service.ts index cb37a057..996f547d 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/entity--entity.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/entity--entity.service.ts @@ -35,7 +35,7 @@ export class EntityEntityConnectionHandler extends EntityInheritanceConnector im protected entityPropertyConnector: EntityPropertyConnectionHandler, protected filtersService: FiltersService, protected translate: LanguageTranslationService, - private notificationService: NotificationsService + private notificationService: NotificationsService, ) { super( mxGraphService, @@ -45,7 +45,7 @@ export class EntityEntityConnectionHandler extends EntityInheritanceConnector im filtersService, translate, propertyAbstractPropertyConnector, - entityPropertyConnector + entityPropertyConnector, ); } diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/entity--property.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/entity--property.service.ts index ac1f8bd2..95207f1a 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/entity--property.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/entity--property.service.ts @@ -22,7 +22,10 @@ import {mxgraph} from 'mxgraph-factory'; providedIn: 'root', }) export class EntityPropertyConnectionHandler implements MultiShapeConnector { - constructor(private mxGraphService: MxGraphService, private entityInstanceService: EntityInstanceService) {} + constructor( + private mxGraphService: MxGraphService, + private entityInstanceService: EntityInstanceService, + ) {} public connect(parentMetaModel: DefaultEntity, childMetaModel: DefaultProperty, parentCell: mxgraph.mxCell, childCell: mxgraph.mxCell) { if (!parentMetaModel.properties.find(({property}) => property.aspectModelUrn === childMetaModel.aspectModelUrn)) { diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/operation--output-property.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/operation--output-property.service.ts index aaaa0391..076ebd8e 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/operation--output-property.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/operation--output-property.service.ts @@ -21,7 +21,10 @@ import {mxgraph} from 'mxgraph-factory'; providedIn: 'root', }) export class OperationPropertyOutputConnectionHandler implements MultiShapeConnectorWithProperty { - constructor(private mxGraphService: MxGraphService, private mxGraphAttributeService: MxGraphAttributeService) {} + constructor( + private mxGraphService: MxGraphService, + private mxGraphAttributeService: MxGraphAttributeService, + ) {} public connect(parentMetaModel: DefaultOperation, childMetaModel: DefaultProperty, parent: mxgraph.mxCell, child: mxgraph.mxCell) { parentMetaModel.output = {property: childMetaModel, keys: {}}; diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/property--abstract-property.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/property--abstract-property.service.ts index 33dbd4be..e4cc5778 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/property--abstract-property.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/property--abstract-property.service.ts @@ -32,7 +32,7 @@ export class PropertyAbstractPropertyConnectionHandler protected mxGraphAttributeService: MxGraphAttributeService, protected sammLangService: SammLanguageSettingsService, protected translate: LanguageTranslationService, - private notificationService: NotificationsService + private notificationService: NotificationsService, ) { super(mxGraphService, mxGraphAttributeService, sammLangService, notificationService, translate); } @@ -41,7 +41,7 @@ export class PropertyAbstractPropertyConnectionHandler parentMetaModel: DefaultProperty, childMetaModel: DefaultAbstractProperty, parentCell: mxgraph.mxCell, - childCell: mxgraph.mxCell + childCell: mxgraph.mxCell, ) { if (this.hasEntityParent(parentCell)) { this.notificationsService.warning({ diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/property--characteristic.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/property--characteristic.service.ts index c9d76ef3..73d68148 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/property--characteristic.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/property--characteristic.service.ts @@ -22,7 +22,10 @@ import {mxgraph} from 'mxgraph-factory'; providedIn: 'root', }) export class PropertyCharacteristicConnectionHandler implements MultiShapeConnector { - constructor(private mxGraphService: MxGraphService, private mxGraphAttributeService: MxGraphAttributeService) {} + constructor( + private mxGraphService: MxGraphService, + private mxGraphAttributeService: MxGraphAttributeService, + ) {} public connect(parentMetaModel: DefaultProperty, childMetaModel: DefaultCharacteristic, parent: mxgraph.mxCell, child: mxgraph.mxCell) { this.mxGraphAttributeService.graph.getOutgoingEdges(parent).forEach((outEdge: mxgraph.mxCell) => { diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/property--property.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/property--property.service.ts index 6838453b..b274ebc2 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/property--property.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/property--property.service.ts @@ -32,7 +32,7 @@ export class PropertyPropertyConnectionHandler protected mxGraphAttributeService: MxGraphAttributeService, protected sammLangService: SammLanguageSettingsService, protected translate: LanguageTranslationService, - private notificationService: NotificationsService + private notificationService: NotificationsService, ) { super(mxGraphService, mxGraphAttributeService, sammLangService, notificationService, translate); } diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/property--structured-value.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/property--structured-value.service.ts index e49665cd..93decaa9 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/property--structured-value.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/property--structured-value.service.ts @@ -25,7 +25,7 @@ import {MxGraphHelper} from '@ame/mx-graph'; export class PropertyStructuredValueConnectionHandler implements MultiShapeConnector { constructor( private notificationsService: NotificationsService, - private propertyCharacteristicConnectionHandler: PropertyCharacteristicConnectionHandler + private propertyCharacteristicConnectionHandler: PropertyCharacteristicConnectionHandler, ) {} connect(parentMetaModel: DefaultProperty, childMetaModel: DefaultStructuredValue, parent: mxgraph.mxCell, child: mxgraph.mxCell): void { diff --git a/core/libs/connection/src/lib/multi-shape-connection-handlers/structured-value--property.service.ts b/core/libs/connection/src/lib/multi-shape-connection-handlers/structured-value--property.service.ts index f3ef5c26..620c23a7 100644 --- a/core/libs/connection/src/lib/multi-shape-connection-handlers/structured-value--property.service.ts +++ b/core/libs/connection/src/lib/multi-shape-connection-handlers/structured-value--property.service.ts @@ -31,7 +31,7 @@ export class StructuredValueCharacteristicPropertyConnectionHandler private mxGraphAttributeService: MxGraphAttributeService, private namespacesCacheService: NamespacesCacheService, private sammLangService: SammLanguageSettingsService, - private notificationsService: NotificationsService + private notificationsService: NotificationsService, ) {} connect(parentMetaModel: DefaultStructuredValue, childMetaModel: DefaultProperty, first: mxgraph.mxCell, second: mxgraph.mxCell): void { @@ -73,7 +73,7 @@ export class StructuredValueCharacteristicPropertyConnectionHandler isStartsWithDelimiter ? parentMetaModel.elements.unshift(element) : isEndsWithDelimiter - ? parentMetaModel.elements.push(element) - : undefined; + ? parentMetaModel.elements.push(element) + : undefined; } } diff --git a/core/libs/connection/src/lib/shape-connector-util.ts b/core/libs/connection/src/lib/shape-connector-util.ts index 22752465..e51b4f5a 100644 --- a/core/libs/connection/src/lib/shape-connector-util.ts +++ b/core/libs/connection/src/lib/shape-connector-util.ts @@ -112,7 +112,7 @@ export class ShapeConnectorUtil { static isEitherCharacteristicLeftConnection( parentModel: BaseMetaModelElement, childModel: BaseMetaModelElement, - modelInfo: ModelInfo + modelInfo: ModelInfo, ): boolean { return parentModel instanceof DefaultEither && childModel instanceof DefaultCharacteristic && modelInfo === ModelInfo.IS_EITHER_LEFT; } @@ -120,7 +120,7 @@ export class ShapeConnectorUtil { static isEitherCharacteristicRightConnection( parentModel: BaseMetaModelElement, childModel: BaseMetaModelElement, - modelInfo: ModelInfo + modelInfo: ModelInfo, ): boolean { return parentModel instanceof DefaultEither && childModel instanceof DefaultCharacteristic && modelInfo === ModelInfo.IS_EITHER_RIGHT; } @@ -128,7 +128,7 @@ export class ShapeConnectorUtil { static isOperationPropertyInputConnection( parentModel: BaseMetaModelElement, childModel: BaseMetaModelElement, - modelInfo: ModelInfo + modelInfo: ModelInfo, ): boolean { return this.isOperationPropertyConnection(parentModel, childModel) && modelInfo === ModelInfo.IS_OPERATION_INPUT; } @@ -136,7 +136,7 @@ export class ShapeConnectorUtil { static isOperationPropertyOutputConnection( parentModel: BaseMetaModelElement, childModel: BaseMetaModelElement, - modelInfo: ModelInfo + modelInfo: ModelInfo, ): boolean { return this.isOperationPropertyConnection(parentModel, childModel) && modelInfo === ModelInfo.IS_OPERATION_OUTPUT; } diff --git a/core/libs/connection/src/lib/shape-connector.service.spec.ts b/core/libs/connection/src/lib/shape-connector.service.spec.ts index 3c8baa22..441a1026 100644 --- a/core/libs/connection/src/lib/shape-connector.service.spec.ts +++ b/core/libs/connection/src/lib/shape-connector.service.spec.ts @@ -267,16 +267,16 @@ describe('Test Shape connector service', () => { entityConnectionHandler = TestBed.inject(EntityConnectionHandler) as jest.Mocked; abstractEntityConnectionHandler = TestBed.inject(AbstractEntityConnectionHandler) as jest.Mocked; propertyCharacteristicConnectionHandler = TestBed.inject( - PropertyCharacteristicConnectionHandler + PropertyCharacteristicConnectionHandler, ) as jest.Mocked; characteristicEntityConnectionHandler = TestBed.inject( - CharacteristicEntityConnectionHandler + CharacteristicEntityConnectionHandler, ) as jest.Mocked; traitWithCharacteristicOrConstraintConnectionHandler = TestBed.inject( - TraitWithCharacteristicOrConstraintConnectionHandler + TraitWithCharacteristicOrConstraintConnectionHandler, ) as jest.Mocked; collectionCharacteristicConnectionHandler = TestBed.inject( - CollectionCharacteristicConnectionHandler + CollectionCharacteristicConnectionHandler, ) as jest.Mocked; entityPropertyConnectionHandler = TestBed.inject(EntityPropertyConnectionHandler) as jest.Mocked; traitConnectionHandler = TestBed.inject(TraitConnectionHandler) as jest.Mocked; diff --git a/core/libs/connection/src/lib/shape-connector.service.ts b/core/libs/connection/src/lib/shape-connector.service.ts index 2486c012..6591fdf6 100644 --- a/core/libs/connection/src/lib/shape-connector.service.ts +++ b/core/libs/connection/src/lib/shape-connector.service.ts @@ -117,7 +117,7 @@ export class ShapeConnectorService { private enumerationEntityValueConnectionHandler: EnumerationEntityValueConnectionHandler, private characteristicUnitConnectionHandler: CharacteristicUnitConnectionHandler, private structuredValuePropertyConnectionHandler: StructuredValueCharacteristicPropertyConnectionHandler, - private translate: LanguageTranslationService + private translate: LanguageTranslationService, ) { if (!environment.production) { window['angular.shapeConnectorService'] = this; @@ -210,7 +210,7 @@ export class ShapeConnectorService { childModel: BaseMetaModelElement, parentSource: mxCell, childSource: mxCell, - modelInfo?: ModelInfo + modelInfo?: ModelInfo, ): boolean { let connectionHandler: MultiShapeConnector; diff --git a/core/libs/connection/src/lib/single-connection-handlers/abstract-entity-connection-handler.service.ts b/core/libs/connection/src/lib/single-connection-handlers/abstract-entity-connection-handler.service.ts index 2a9d9482..16f80eaf 100644 --- a/core/libs/connection/src/lib/single-connection-handlers/abstract-entity-connection-handler.service.ts +++ b/core/libs/connection/src/lib/single-connection-handlers/abstract-entity-connection-handler.service.ts @@ -38,14 +38,14 @@ export class AbstractEntityConnectionHandler implements SingleShapeConnector = {property: abstractProperty, keys: {}}; abstractEntity.properties.push(overWrittenProperty as any); diff --git a/core/libs/connection/src/lib/single-connection-handlers/aspect-connection-handler.service.ts b/core/libs/connection/src/lib/single-connection-handlers/aspect-connection-handler.service.ts index d037498c..21488da3 100644 --- a/core/libs/connection/src/lib/single-connection-handlers/aspect-connection-handler.service.ts +++ b/core/libs/connection/src/lib/single-connection-handlers/aspect-connection-handler.service.ts @@ -25,7 +25,7 @@ export class AspectConnectionHandler implements SingleShapeConnector { constructor( private mxGraphService: MxGraphService, private modelElementNamingService: ModelElementNamingService, - private filtersService: FiltersService + private filtersService: FiltersService, ) {} public connect(aspect: Aspect, source: mxgraph.mxCell) { diff --git a/core/libs/connection/src/lib/single-connection-handlers/characteristic-connection-handler.service.ts b/core/libs/connection/src/lib/single-connection-handlers/characteristic-connection-handler.service.ts index 194f688e..0862351e 100644 --- a/core/libs/connection/src/lib/single-connection-handlers/characteristic-connection-handler.service.ts +++ b/core/libs/connection/src/lib/single-connection-handlers/characteristic-connection-handler.service.ts @@ -54,7 +54,7 @@ export class CharacteristicConnectionHandler implements SingleShapeConnector { private mxGraphService: MxGraphService, private modelElementNamingService: ModelElementNamingService, private entityInstanceService: EntityInstanceService, - private filtersService: FiltersService + private filtersService: FiltersService, ) {} public connect(entity: Entity, source: mxgraph.mxCell) { const defaultProperty = DefaultProperty.createInstance(); const metaModelElement = this.modelElementNamingService.resolveMetaModelElement(defaultProperty); const child = this.mxGraphService.renderModelElement( - this.filtersService.createNode(metaModelElement, {parent: MxGraphHelper.getModelElement(source)}) + this.filtersService.createNode(metaModelElement, {parent: MxGraphHelper.getModelElement(source)}), ); const overWrittenProperty = {property: defaultProperty, keys: {}}; entity.properties.push(overWrittenProperty); diff --git a/core/libs/connection/src/lib/single-connection-handlers/entity-value-connection-handler.service.ts b/core/libs/connection/src/lib/single-connection-handlers/entity-value-connection-handler.service.ts index 7321411f..c98187a1 100644 --- a/core/libs/connection/src/lib/single-connection-handlers/entity-value-connection-handler.service.ts +++ b/core/libs/connection/src/lib/single-connection-handlers/entity-value-connection-handler.service.ts @@ -22,11 +22,14 @@ import {mxgraph} from 'mxgraph-factory'; providedIn: 'root', }) export class EntityValueConnectionHandler implements SingleShapeConnector { - constructor(private mxGraphService: MxGraphService, private filtersService: FiltersService) {} + constructor( + private mxGraphService: MxGraphService, + private filtersService: FiltersService, + ) {} public connect(entityValue: DefaultEntityInstance, source: mxgraph.mxCell) { const child = this.mxGraphService.renderModelElement( - this.filtersService.createNode(entityValue, {parent: MxGraphHelper.getModelElement(source)}) + this.filtersService.createNode(entityValue, {parent: MxGraphHelper.getModelElement(source)}), ); // connect: EntityValue - Enumeration diff --git a/core/libs/connection/src/lib/single-connection-handlers/event-connection-handler.service.ts b/core/libs/connection/src/lib/single-connection-handlers/event-connection-handler.service.ts index 60248029..1aab84b7 100644 --- a/core/libs/connection/src/lib/single-connection-handlers/event-connection-handler.service.ts +++ b/core/libs/connection/src/lib/single-connection-handlers/event-connection-handler.service.ts @@ -25,14 +25,14 @@ export class EventConnectionHandler implements SingleShapeConnector private mxGraphService: MxGraphService, private modelElementNamingService: ModelElementNamingService, private mxGraphShapeOverlayService: MxGraphShapeOverlayService, - private filtersService: FiltersService + private filtersService: FiltersService, ) {} public connect(property: Property, source: mxgraph.mxCell) { @@ -37,7 +37,7 @@ export class PropertyConnectionHandler implements SingleShapeConnector property.characteristic = DefaultCharacteristic.createInstance(); const metaModelElement = this.modelElementNamingService.resolveMetaModelElement(property.characteristic); const child = this.mxGraphService.renderModelElement( - this.filtersService.createNode(metaModelElement, {parent: MxGraphHelper.getModelElement(source)}) + this.filtersService.createNode(metaModelElement, {parent: MxGraphHelper.getModelElement(source)}), ); property.characteristic = metaModelElement; this.mxGraphService.assignToParent(child, source); diff --git a/core/libs/connection/src/lib/single-connection-handlers/structured-value-connection-handler.service.ts b/core/libs/connection/src/lib/single-connection-handlers/structured-value-connection-handler.service.ts index 6172e556..89c80cce 100644 --- a/core/libs/connection/src/lib/single-connection-handlers/structured-value-connection-handler.service.ts +++ b/core/libs/connection/src/lib/single-connection-handlers/structured-value-connection-handler.service.ts @@ -31,7 +31,7 @@ export class StructuredValueConnectionHandler implements SingleShapeConnector) {} + constructor( + @Inject(MAT_DIALOG_DATA) public data: DialogOptions, + private dialogRef: MatDialogRef, + ) {} closeAndGiveResult(result: ConfirmDialogEnum) { this.dialogRef.close(result); diff --git a/core/libs/editor/src/lib/connect-with-dialog/connect-with-dialog.component.spec.ts b/core/libs/editor/src/lib/connect-with-dialog/connect-with-dialog.component.spec.ts index 98c75e41..50aea317 100644 --- a/core/libs/editor/src/lib/connect-with-dialog/connect-with-dialog.component.spec.ts +++ b/core/libs/editor/src/lib/connect-with-dialog/connect-with-dialog.component.spec.ts @@ -30,12 +30,12 @@ const cell: Cell = { style: 'aspect', }; const cells: Cell[] = [ - {style: 'property', getMetaModelElement: () => ({element: new DefaultProperty('property', 'property', 'property', null)} as any)}, + {style: 'property', getMetaModelElement: () => ({element: new DefaultProperty('property', 'property', 'property', null)}) as any}, { style: 'characteristic', - getMetaModelElement: () => ({element: new DefaultCharacteristic('characteristic', 'characteristic', 'characteristic')} as any), + getMetaModelElement: () => ({element: new DefaultCharacteristic('characteristic', 'characteristic', 'characteristic')}) as any, }, - {style: 'entity', getMetaModelElement: () => ({element: new DefaultEntity('entity', 'entity', 'entity', [])} as any)}, + {style: 'entity', getMetaModelElement: () => ({element: new DefaultEntity('entity', 'entity', 'entity', [])}) as any}, ]; describe('RdfNodeService', () => { @@ -109,7 +109,7 @@ describe('RdfNodeService', () => { model: new DefaultProperty('property', 'property', 'property', null), cell: {} as any, }, - 'property' + 'property', ); expect(result).toBe(true); }); @@ -120,7 +120,7 @@ describe('RdfNodeService', () => { model: new DefaultProperty('property', 'property', 'property', null), cell: {} as any, }, - 'aspect' + 'aspect', ); expect(result).toBe(false); }); diff --git a/core/libs/editor/src/lib/connect-with-dialog/connect-with-dialog.component.ts b/core/libs/editor/src/lib/connect-with-dialog/connect-with-dialog.component.ts index 7272ed8c..28ec0b15 100644 --- a/core/libs/editor/src/lib/connect-with-dialog/connect-with-dialog.component.ts +++ b/core/libs/editor/src/lib/connect-with-dialog/connect-with-dialog.component.ts @@ -38,7 +38,7 @@ export class ConnectWithDialogComponent { constructor( private mxGraphService: MxGraphService, private dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public connectWithCell + @Inject(MAT_DIALOG_DATA) public connectWithCell, ) { this.connectWithModel = MxGraphHelper.getModelElement(connectWithCell); this.elements = this.mxGraphService.getAllCells().map(e => { diff --git a/core/libs/editor/src/lib/editor-dialog/components/characteristics/structured-value/elements-input-field/structured-value-properties/structured-value-properties.component.ts b/core/libs/editor/src/lib/editor-dialog/components/characteristics/structured-value/elements-input-field/structured-value-properties/structured-value-properties.component.ts index 739ce256..761df674 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/characteristics/structured-value/elements-input-field/structured-value-properties/structured-value-properties.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/characteristics/structured-value/elements-input-field/structured-value-properties/structured-value-properties.component.ts @@ -26,11 +26,14 @@ export class StructuredValuePropertiesComponent implements OnInit { public dataSource: MatTableDataSource; public form = new FormGroup({}); - constructor(@Inject(MAT_DIALOG_DATA) private data, private dialogRef: MatDialogRef) {} + constructor( + @Inject(MAT_DIALOG_DATA) private data, + private dialogRef: MatDialogRef, + ) {} ngOnInit() { this.dataSource = new MatTableDataSource( - this.data.groups.map(group => ({data: group, regex: group.text, property: group.property || ''})) + this.data.groups.map(group => ({data: group, regex: group.text, property: group.property || ''})), ); for (const group of this.data.groups || []) { this.form.addControl(this.getKey(group), new FormControl(group.property?.property, [Validators.required])); diff --git a/core/libs/editor/src/lib/editor-dialog/components/characteristics/structured-value/elements-input-field/structured-value-property-field/structured-value-property-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/characteristics/structured-value/elements-input-field/structured-value-property-field/structured-value-property-field.component.ts index 777bd746..26974d3d 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/characteristics/structured-value/elements-input-field/structured-value-property-field/structured-value-property-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/characteristics/structured-value/elements-input-field/structured-value-property-field/structured-value-property-field.component.ts @@ -44,12 +44,12 @@ export class StructuredValuePropertyFieldComponent implements OnInit { value: this.overwrittenProperty?.property?.name || '', disabled: !!this.overwrittenProperty?.property?.name || this.overwrittenProperty?.property?.isExternalReference(), }, - [Validators.required, EditorDialogValidators.namingLowerCase] + [Validators.required, EditorDialogValidators.namingLowerCase], ); this.filteredProperties$ = this.control.valueChanges.pipe( startWith([]), debounceTime(250), - map(value => this.currentCacheFile.getCachedProperties().filter(property => property.name.includes(value))) + map(value => this.currentCacheFile.getCachedProperties().filter(property => property.name.includes(value))), ); } diff --git a/core/libs/editor/src/lib/editor-dialog/components/characteristics/structured-value/predefined-rules.service.ts b/core/libs/editor/src/lib/editor-dialog/components/characteristics/structured-value/predefined-rules.service.ts index ce164533..46a86dea 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/characteristics/structured-value/predefined-rules.service.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/characteristics/structured-value/predefined-rules.service.ts @@ -116,7 +116,7 @@ export class PredefinedRulesService { version, namespace + property.label, property.label, - this.createCharacteristic(property.characteristic) + this.createCharacteristic(property.characteristic), ), keys: {}, }; @@ -133,7 +133,7 @@ export class PredefinedRulesService { version, namespace + characteristic.name, characteristic.name, - new DefaultScalar(characteristic.type.isDefinedBy) + new DefaultScalar(characteristic.type.isDefinedBy), ); } } diff --git a/core/libs/editor/src/lib/editor-dialog/components/characteristics/structured-value/structured-value.component.ts b/core/libs/editor/src/lib/editor-dialog/components/characteristics/structured-value/structured-value.component.ts index ac89e12d..90680041 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/characteristics/structured-value/structured-value.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/characteristics/structured-value/structured-value.component.ts @@ -58,7 +58,10 @@ export class StructuredValueComponent extends InputFieldComponent ev.filter(entityValue => entityValue.name.startsWith(value))) + map(ev => ev.filter(entityValue => entityValue.name.startsWith(value))), ); } @@ -178,7 +182,7 @@ export class EntityInstanceModalTableComponent implements OnChanges, OnDestroy { this.subscriptions.add( languageInputControl.valueChanges.subscribe(value => { this.changeLanguageInput(entityValueProp.key.property.name, value); - }) + }), ); const languageFormGroup = this.fb.group({ @@ -192,7 +196,7 @@ export class EntityInstanceModalTableComponent implements OnChanges, OnDestroy { private changeLanguageInput(name: string, value: string): void { this.filteredLanguageValues$[name] = of(locale.all.filter(lang => lang.tag)).pipe( startWith(locale.all), - map(local => local.filter(lang => lang.tag.startsWith(value))) + map(local => local.filter(lang => lang.tag.startsWith(value))), ); } diff --git a/core/libs/editor/src/lib/editor-dialog/components/entity-instance/entity-instance-modal/entity-instance-modal.component.ts b/core/libs/editor/src/lib/editor-dialog/components/entity-instance/entity-instance-modal/entity-instance-modal.component.ts index 2621889d..d133fe4a 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/entity-instance/entity-instance-modal/entity-instance-modal.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/entity-instance/entity-instance-modal/entity-instance-modal.component.ts @@ -58,7 +58,7 @@ export class EntityInstanceModalComponent { @Inject(MAT_DIALOG_DATA) private data: NewEntityInstanceDialogOptions, private dialogRef: MatDialogRef, private editorModelService: EditorModelService, - private namespacesCacheService: NamespacesCacheService + private namespacesCacheService: NamespacesCacheService, ) { this.complexValues = data.complexValues; this.enumeration = data.metaModel as DefaultEnumeration; @@ -80,7 +80,7 @@ export class EntityInstanceModalComponent { }); this.entity.allProperties.forEach((element: OverWrittenProperty) => - this.propertiesForm.setControl(element.property.name, new FormArray([])) + this.propertiesForm.setControl(element.property.name, new FormArray([])), ); } diff --git a/core/libs/editor/src/lib/editor-dialog/components/entity-instance/entity-instance-table/entity-instance-table.component.ts b/core/libs/editor/src/lib/editor-dialog/components/entity-instance/entity-instance-table/entity-instance-table.component.ts index 9bb3e725..12d30590 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/entity-instance/entity-instance-table/entity-instance-table.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/entity-instance/entity-instance-table/entity-instance-table.component.ts @@ -66,7 +66,10 @@ export class EntityInstanceTableComponent extends InputFieldComponent this.createEntityValueProp(prop)); - }) + }), ); } @@ -137,7 +140,7 @@ export class EntityInstanceTableComponent extends InputFieldComponent ValidationErrors | null, propertyValue: string | number | boolean | DefaultEntityInstance, - propertyLanguage: string + propertyLanguage: string, ): void { // Ensure the properties FormArray exists and is correctly initialized const propertiesFormArray = this.ensurePropertiesFormArray(property.name); @@ -164,7 +167,7 @@ export class EntityInstanceTableComponent extends InputFieldComponent ev.filter(entityValue => entityValue.name.startsWith(value))) + map(ev => ev.filter(entityValue => entityValue.name.startsWith(value))), ); } @@ -206,7 +209,7 @@ export class EntityInstanceTableComponent extends InputFieldComponent lang.tag)).pipe( startWith(locale.all), - map(local => local.filter(lang => lang.tag.startsWith(value))) + map(local => local.filter(lang => lang.tag.startsWith(value))), ); } @@ -254,7 +257,7 @@ export class EntityInstanceTableComponent extends InputFieldComponent { this.changeLanguageInput(entityValueProp.key.property.name, value); - }) + }), ); const languageFormGroup = this.fb.group({ diff --git a/core/libs/editor/src/lib/editor-dialog/components/entity-instance/entity-instance-view/entity-instance-view.component.ts b/core/libs/editor/src/lib/editor-dialog/components/entity-instance/entity-instance-view/entity-instance-view.component.ts index 87217403..b5e8f549 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/entity-instance/entity-instance-view/entity-instance-view.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/entity-instance/entity-instance-view/entity-instance-view.component.ts @@ -131,7 +131,7 @@ export class EntityInstanceViewComponent implements OnInit, OnDestroy { newValue.forEach(value => value?.properties.forEach(innerVal => { innerVal.isComplex = innerVal.value instanceof DefaultEntityInstance; - }) + }), ); return newValue.filter(value => value instanceof DefaultEntityInstance); } diff --git a/core/libs/editor/src/lib/editor-dialog/components/entity-instance/entity-instance-view/entity-instance.service.ts b/core/libs/editor/src/lib/editor-dialog/components/entity-instance/entity-instance-view/entity-instance.service.ts index a32e8148..7544e227 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/entity-instance/entity-instance-view/entity-instance.service.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/entity-instance/entity-instance-view/entity-instance.service.ts @@ -30,7 +30,7 @@ export class EntityInstanceService { constructor( private namespacesCacheService: NamespacesCacheService, private confirmDialogService: ConfirmDialogService, - private notifications: NotificationsService + private notifications: NotificationsService, ) {} onPropertyRemove(property: DefaultProperty, acceptCallback: Function) { diff --git a/core/libs/editor/src/lib/editor-dialog/components/entity-instance/utils/EntityInstanceUtil.ts b/core/libs/editor/src/lib/editor-dialog/components/entity-instance/utils/EntityInstanceUtil.ts index 799d7067..b33b495f 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/entity-instance/utils/EntityInstanceUtil.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/entity-instance/utils/EntityInstanceUtil.ts @@ -86,7 +86,7 @@ export class EntityInstanceUtil { entityValues: DefaultEntityInstance[], currentCachedFile: CachedFile, form: FormGroup, - entity: Entity | DefaultEntityInstance + entity: Entity | DefaultEntityInstance, ): boolean { if (!this.isEntityNameValid(entityValueName, form, entityValues)) { return false; @@ -110,7 +110,7 @@ export class EntityInstanceUtil { entityValueName: string, namespace: string, currentCachedFile: CachedFile, - form: FormGroup + form: FormGroup, ): boolean { return ( !currentCachedFile.getElement(`${namespace}#${entityValueName}`) && @@ -182,7 +182,7 @@ export class EntityInstanceUtil { entityValueName, urn, characteristic?.dataType as DefaultEntity, - (characteristic?.dataType?.['properties'] as OverWrittenProperty[]) || [] + (characteristic?.dataType?.['properties'] as OverWrittenProperty[]) || [], ); const newEntityValues = form.get('newEntityValues'); diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/base/description-input-field/description-input-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/base/description-input-field/description-input-field.component.ts index 30e85a0d..08399973 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/base/description-input-field/description-input-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/base/description-input-field/description-input-field.component.ts @@ -92,7 +92,7 @@ export class DescriptionInputFieldComponent extends InputFieldComponent (this.element = element)); } diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/base/name-input-field/name-input-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/base/name-input-field/name-input-field.component.ts index fc3477fe..9b16aa2d 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/base/name-input-field/name-input-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/base/name-input-field/name-input-field.component.ts @@ -69,8 +69,8 @@ export class NameInputFieldComponent extends InputFieldComponent { this.chipList.errorState = status === 'INVALID'; - }) + }), ); } @@ -112,8 +112,8 @@ export class SeeInputFieldComponent extends InputFieldComponent - name?.toLowerCase().includes(fieldValue?.toLowerCase()) && !this.elements.find(el => el.urn === aspectModelUrn) - ) - ) + name?.toLowerCase().includes(fieldValue?.toLowerCase()) && !this.elements.find(el => el.urn === aspectModelUrn), + ), + ), ); } diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/characteristic-name-dropdown-field/characteristic-name-dropdown-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/characteristic-name-dropdown-field/characteristic-name-dropdown-field.component.ts index d6e6c5dd..e5bf3e10 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/characteristic-name-dropdown-field/characteristic-name-dropdown-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/characteristic-name-dropdown-field/characteristic-name-dropdown-field.component.ts @@ -60,7 +60,7 @@ export class CharacteristicNameDropdownFieldComponent extends DropdownFieldCompo public modelService: ModelService, public languageSettings: SammLanguageSettingsService, private namespacesCacheService: NamespacesCacheService, - private modelElementNamingService: ModelElementNamingService + private modelElementNamingService: ModelElementNamingService, ) { super(editorModelService, modelService, languageSettings); } @@ -72,7 +72,7 @@ export class CharacteristicNameDropdownFieldComponent extends DropdownFieldCompo this.selectedMetaModelElement = this.metaModelElement; this.setMetaModelClassName(); this.selectedCharacteristic.emit(this.metaModelClassName as CharacteristicClassType); - }) + }), ); } @@ -86,7 +86,7 @@ export class CharacteristicNameDropdownFieldComponent extends DropdownFieldCompo this.metaModelElement = newCharacteristicType; if (!this.unitInstantiator) { this.unitInstantiator = new UnitInstantiator( - new MetaModelElementInstantiator(this.modelService.currentRdfModel, this.namespacesCacheService.currentCachedFile) + new MetaModelElementInstantiator(this.modelService.currentRdfModel, this.namespacesCacheService.currentCachedFile), ); } @@ -161,11 +161,11 @@ export class CharacteristicNameDropdownFieldComponent extends DropdownFieldCompo const sammC = this.modelService.currentRdfModel.SAMMC(); if (!this.defaultCharacteristicInstantiator) { this.defaultCharacteristicInstantiator = new PredefinedCharacteristicInstantiator( - new MetaModelElementInstantiator(this.modelService.currentRdfModel, this.namespacesCacheService.currentCachedFile) + new MetaModelElementInstantiator(this.modelService.currentRdfModel, this.namespacesCacheService.currentCachedFile), ); } return this.defaultCharacteristicInstantiator.createCharacteristic( - DataFactory.namedNode(`${sammC.getNamespace()}${characteristicName}`) + DataFactory.namedNode(`${sammC.getNamespace()}${characteristicName}`), ); } @@ -177,7 +177,7 @@ export class CharacteristicNameDropdownFieldComponent extends DropdownFieldCompo unit => unit.quantityKinds && unit.quantityKinds.includes('time') && - unit.name.toLowerCase().indexOf(oldMetaModelElement[oldKey].name.toLowerCase()) >= 0 + unit.name.toLowerCase().indexOf(oldMetaModelElement[oldKey].name.toLowerCase()) >= 0, ); if (matchedUnit) { this.metaModelElement[oldKey] = this.unitInstantiator.getUnit(matchedUnit.name); diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/data-type-input-field/data-type-input-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/data-type-input-field/data-type-input-field.component.ts index af1e7c54..d3f9ed28 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/data-type-input-field/data-type-input-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/data-type-input-field/data-type-input-field.component.ts @@ -46,7 +46,7 @@ export class DataTypeInputFieldComponent extends InputFieldComponent (value ? types.filter(type => this.inSearchList(type, value)) : types)), - startWith(types) + startWith(types), ); } @@ -186,7 +186,7 @@ export class DataTypeInputFieldComponent extends InputFieldComponent this.mxGraphService.graph .getIncomingEdges(firstEdge.source) - .some(secondEdge => MxGraphHelper.getModelElement(secondEdge.source) instanceof DefaultStructuredValue) + .some(secondEdge => MxGraphHelper.getModelElement(secondEdge.source) instanceof DefaultStructuredValue), ); } } diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/default-value-entity-input-field/default-value-entity-input-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/default-value-entity-input-field/default-value-entity-input-field.component.ts index 17222db3..bd942436 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/default-value-entity-input-field/default-value-entity-input-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/default-value-entity-input-field/default-value-entity-input-field.component.ts @@ -46,7 +46,7 @@ export class DefaultValueEntityInputFieldComponent extends InputFieldComponent { const entityValues = this.parentForm?.get('chipList')?.value; this.entityValues = entityValues?.filter(({name}: DefaultEntityInstance) => name.includes(value)); - }) + }), ); } } diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/default-value-input-field/default-value-input-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/default-value-input-field/default-value-input-field.component.ts index a9ce692a..5901e833 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/default-value-input-field/default-value-input-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/default-value-input-field/default-value-input-field.component.ts @@ -43,8 +43,8 @@ export class DefaultValueInputFieldComponent extends InputFieldComponent public namespacesCacheService: NamespacesCacheService, private notificationsService: NotificationsService, private validators: EditorDialogValidators, - public rdfService: RdfService + public rdfService: RdfService, ) { super(); this.fieldName = 'leftCharacteristic'; @@ -73,8 +73,8 @@ export class LeftInputFieldComponent extends InputFieldComponent EditorDialogValidators.disabled, this.validators.duplicateNameWithDifferentType(this.metaModelElement, DefaultCharacteristic), ], - } - ) + }, + ), ); this.parentForm.setControl( @@ -82,14 +82,14 @@ export class LeftInputFieldComponent extends InputFieldComponent new FormControl({ value: eitherLeft, disabled: this.metaModelElement?.isExternalReference(), - }) + }), ); this.leftControl = this.parentForm.get('left') as FormControl; this.leftCharacteristicControl = this.parentForm.get('leftCharacteristic') as FormControl; this.filteredCharacteristicTypes$ = this.initFilteredCharacteristicTypes(this.leftControl, this.metaModelElement.aspectModelUrn).pipe( - map(charList => charList.filter(char => char.urn !== this.parentForm.get('rightCharacteristic')?.value?.aspectModelUrn)) + map(charList => charList.filter(char => char.urn !== this.parentForm.get('rightCharacteristic')?.value?.aspectModelUrn)), ); } diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/right-input-field/right-input-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/right-input-field/right-input-field.component.ts index f432aaf8..b69704de 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/right-input-field/right-input-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/right-input-field/right-input-field.component.ts @@ -34,7 +34,7 @@ export class RightInputFieldComponent extends InputFieldComponent constructor( private notificationsService: NotificationsService, public rdfService: RdfService, - private validators: EditorDialogValidators + private validators: EditorDialogValidators, ) { super(); this.fieldName = 'rightCharacteristic'; @@ -71,22 +71,22 @@ export class RightInputFieldComponent extends InputFieldComponent EditorDialogValidators.disabled, this.validators.duplicateNameWithDifferentType(this.metaModelElement, DefaultCharacteristic), ], - } - ) + }, + ), ); this.parentForm.setControl( 'rightCharacteristic', new FormControl({ value: eitherRight, disabled: this.metaModelElement?.isExternalReference(), - }) + }), ); this.rightControl = this.parentForm.get('right') as FormControl; this.rightCharacteristicControl = this.parentForm.get('rightCharacteristic') as FormControl; this.filteredCharacteristicTypes$ = this.initFilteredCharacteristicTypes(this.rightControl, this.metaModelElement.aspectModelUrn).pipe( - map(charList => charList.filter(char => char.urn !== this.parentForm.get('leftCharacteristic')?.value?.aspectModelUrn)) + map(charList => charList.filter(char => char.urn !== this.parentForm.get('leftCharacteristic')?.value?.aspectModelUrn)), ); } diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/unit-input-field/unit-input-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/unit-input-field/unit-input-field.component.ts index dc839785..6d8888fc 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/unit-input-field/unit-input-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/unit-input-field/unit-input-field.component.ts @@ -40,10 +40,14 @@ export class UnitInputFieldComponent unitDisplayControl: FormControl; private unitInstantiator: UnitInstantiator; - constructor(private modelService: ModelService, private rdfService: RdfService, private validators: EditorDialogValidators) { + constructor( + private modelService: ModelService, + private rdfService: RdfService, + private validators: EditorDialogValidators, + ) { super(); this.unitInstantiator = new UnitInstantiator( - new MetaModelElementInstantiator(this.modelService.currentRdfModel, this.currentCachedFile) + new MetaModelElementInstantiator(this.modelService.currentRdfModel, this.currentCachedFile), ); this.fieldName = 'unit'; } @@ -95,8 +99,8 @@ export class UnitInputFieldComponent value: unit, disabled: this.metaModelElement?.isExternalReference(), }, - this.unitRequired ? Validators.required : null - ) + this.unitRequired ? Validators.required : null, + ), ); this.parentForm.setControl('changedUnit', new FormControl(this.getPredefinedUnit(unitName) || unit)); diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/values-input-field/values-input-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/values-input-field/values-input-field.component.ts index 8be72e22..8d06e78c 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/values-input-field/values-input-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/characteristic/values-input-field/values-input-field.component.ts @@ -41,7 +41,10 @@ export class ValuesInputFieldComponent extends InputFieldComponent this.changeValuesByDataType(value)) + .subscribe(value => this.changeValuesByDataType(value)), ); this.formSubscription.add( this.parentForm.get('dataTypeEntity')?.valueChanges.subscribe(entity => { this.hasComplexValues = !!entity; - }) + }), ); } diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/constraints/constraint-name-dropdown-field/constraint-name-dropdown-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/constraints/constraint-name-dropdown-field/constraint-name-dropdown-field.component.ts index bc273f4b..fdd82787 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/constraints/constraint-name-dropdown-field/constraint-name-dropdown-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/constraints/constraint-name-dropdown-field/constraint-name-dropdown-field.component.ts @@ -44,7 +44,7 @@ export class ConstraintNameDropdownFieldComponent extends DropdownFieldComponent public editorModelService: EditorModelService, public modelService: ModelService, public namespacesCacheService: NamespacesCacheService, - public languageSettings: SammLanguageSettingsService + public languageSettings: SammLanguageSettingsService, ) { super(editorModelService, modelService, languageSettings); } @@ -56,7 +56,7 @@ export class ConstraintNameDropdownFieldComponent extends DropdownFieldComponent this.selectedMetaModelElement = this.metaModelElement; this.setMetaModelClassName(); this.selectedConstraint.emit(this.metaModelClassName); - }) + }), ); } diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/constraints/encoding-input-field/encoding-input-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/constraints/encoding-input-field/encoding-input-field.component.ts index c218c240..06261100 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/constraints/encoding-input-field/encoding-input-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/constraints/encoding-input-field/encoding-input-field.component.ts @@ -60,8 +60,8 @@ export class EncodingInputFieldComponent extends InputFieldComponent lang.location == null && - (lang.tag.toLowerCase().includes(enteredLang.toLowerCase()) || lang.name.toLowerCase().includes(enteredLang.toLowerCase())) - ) + (lang.tag.toLowerCase().includes(enteredLang.toLowerCase()) || lang.name.toLowerCase().includes(enteredLang.toLowerCase())), + ), ) : null; } @@ -72,15 +72,15 @@ export class LanguageCodeInputFieldComponent extends InputFieldComponent { this.doFilterLanguages(value); - }) + }), ); } } diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/constraints/locale-code-input-field/locale-code-input-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/constraints/locale-code-input-field/locale-code-input-field.component.ts index 2f8c1b91..9ce98c6d 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/constraints/locale-code-input-field/locale-code-input-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/constraints/locale-code-input-field/locale-code-input-field.component.ts @@ -47,8 +47,8 @@ export class LocaleCodeInputFieldComponent extends InputFieldComponent lang.location != null && - (lang.tag.toLowerCase().includes(enteredLang.toLowerCase()) || lang.name.toLowerCase().includes(enteredLang.toLowerCase())) - ) + (lang.tag.toLowerCase().includes(enteredLang.toLowerCase()) || lang.name.toLowerCase().includes(enteredLang.toLowerCase())), + ), ) : null; } @@ -73,15 +73,15 @@ export class LocaleCodeInputFieldComponent extends InputFieldComponent { this.doFilterLanguages(value); - }) + }), ); } } diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/constraints/lower-bound-input-field/lower-bound-input-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/constraints/lower-bound-input-field/lower-bound-input-field.component.ts index 66113a1d..fe5c1e12 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/constraints/lower-bound-input-field/lower-bound-input-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/constraints/lower-bound-input-field/lower-bound-input-field.component.ts @@ -25,7 +25,10 @@ import {InputFieldComponent} from '../../input-field.component'; export class LowerBoundInputFieldComponent extends InputFieldComponent implements OnInit, OnDestroy { public lowerBoundDefinitionList = []; - constructor(public dataTypeService: DataTypeService, public mxGraphService: MxGraphService) { + constructor( + public dataTypeService: DataTypeService, + public mxGraphService: MxGraphService, + ) { super(); this.resetFormOnDestroy = false; this.fieldName = 'lowerBoundDefinition'; @@ -54,7 +57,7 @@ export class LowerBoundInputFieldComponent extends InputFieldComponent implements OnInit, OnDestroy { public rangeConstraintDataType: Type; - constructor(public dataTypeService: DataTypeService, public mxGraphService: MxGraphService) { + constructor( + public dataTypeService: DataTypeService, + public mxGraphService: MxGraphService, + ) { super(); this.resetFormOnDestroy = false; this.fieldName = 'maxValue'; @@ -62,7 +65,7 @@ export class MaxValueInputFieldComponent extends InputFieldComponent implements OnInit, OnDestroy { public rangeConstraintDataType: Type; - constructor(public dataTypeService: DataTypeService, public mxGraphService: MxGraphService) { + constructor( + public dataTypeService: DataTypeService, + public mxGraphService: MxGraphService, + ) { super(); this.resetFormOnDestroy = false; this.fieldName = 'minValue'; @@ -61,7 +64,7 @@ export class MinValueInputFieldComponent extends InputFieldComponent implements OnInit, OnDestroy { public upperBoundDefinitionList = []; - constructor(public dataTypeService: DataTypeService, public mxGraphService: MxGraphService) { + constructor( + public dataTypeService: DataTypeService, + public mxGraphService: MxGraphService, + ) { super(); this.resetFormOnDestroy = false; this.fieldName = 'upperBoundDefinition'; @@ -54,7 +57,7 @@ export class UpperBoundInputFieldComponent extends InputFieldComponent { this.metaModelElement = metaModelElement; - }) + }), ); } diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/entity/extends-field/extends-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/entity/extends-field/extends-field.component.ts index 7ecf289a..80f8ba29 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/entity/extends-field/extends-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/entity/extends-field/extends-field.component.ts @@ -48,7 +48,7 @@ export class EntityExtendsFieldComponent extends InputFieldComponent implem return this.metaModelDialogService.getMetaModelElement().pipe( tap(metaModelElement => { this.metaModelElement = metaModelElement; - }) + }), ); } @@ -138,7 +138,7 @@ export abstract class InputFieldComponent implem return [...entities, ...this.searchExtEntity(value)]?.filter(type => this.inSearchList(type, value)); }), - startWith([]) + startWith([]), ); } @@ -159,7 +159,7 @@ export abstract class InputFieldComponent implem return [...entities, ...this.searchExtAbstractEntity(value)]?.filter(type => this.inSearchList(type, value)); }), - startWith([]) + startWith([]), ); } @@ -175,7 +175,7 @@ export abstract class InputFieldComponent implem })); return [...properties, ...this.searchExtProperty(value)]?.filter(type => this.inSearchList(type, value)); }), - startWith([]) + startWith([]), ); } @@ -191,7 +191,7 @@ export abstract class InputFieldComponent implem })); return [...properties, ...this.searchExtProperty(value)]?.filter(type => this.inSearchList(type, value)); }), - startWith([]) + startWith([]), ); } @@ -211,7 +211,7 @@ export abstract class InputFieldComponent implem return [...characteristics, ...this.searchExtCharacteristic(value)]?.filter(type => this.inSearchList(type, value)); }), - startWith([]) + startWith([]), ); } @@ -226,7 +226,7 @@ export abstract class InputFieldComponent implem } return searchService.search(value, units, unitSearchOption); }), - startWith(units) + startWith(units), ); } @@ -239,7 +239,7 @@ export abstract class InputFieldComponent implem } return searchService.search(value, units, unitSearchOption); }), - startWith(units) + startWith(units), ); } diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/operation/input-chiplist-field/input-chiplist-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/operation/input-chiplist-field/input-chiplist-field.component.ts index 5b45e4df..aa5fa709 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/operation/input-chiplist-field/input-chiplist-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/operation/input-chiplist-field/input-chiplist-field.component.ts @@ -37,7 +37,10 @@ export class InputChiplistFieldComponent extends InputFieldComponent; - constructor(public rdfService: RdfService, private validators: EditorDialogValidators) { + constructor( + public rdfService: RdfService, + private validators: EditorDialogValidators, + ) { super(); } @@ -70,7 +73,7 @@ export class InputChiplistFieldComponent extends InputFieldComponent im new FormControl({ value: this.metaModelElement?.code, disabled: this.metaModelDialogService.isReadOnly() || this.metaModelElement?.isExternalReference(), - }) + }), ); } } diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/unit/conversion-factor-input-field/conversion-factor-input-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/unit/conversion-factor-input-field/conversion-factor-input-field.component.ts index 81ed8ceb..65bd7aaf 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/unit/conversion-factor-input-field/conversion-factor-input-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/unit/conversion-factor-input-field/conversion-factor-input-field.component.ts @@ -31,7 +31,7 @@ export class ConversionFactorInputFieldComponent extends InputFieldComponent { return value ? this.supportedQuantityKinds?.filter(qk => qk.startsWith(value)) : this.supportedQuantityKinds; - }) + }), ); } diff --git a/core/libs/editor/src/lib/editor-dialog/components/fields/unit/reference-unit-input-field/reference-unit-input-field.component.ts b/core/libs/editor/src/lib/editor-dialog/components/fields/unit/reference-unit-input-field/reference-unit-input-field.component.ts index 69914ee2..d1e1c457 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/fields/unit/reference-unit-input-field/reference-unit-input-field.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/fields/unit/reference-unit-input-field/reference-unit-input-field.component.ts @@ -38,7 +38,7 @@ export class ReferenceUnitInputFieldComponent extends InputFieldComponent new FormControl({ value: this.metaModelElement?.symbol, disabled: this.metaModelDialogService.isReadOnly() || this.metaModelElement?.isExternalReference(), - }) + }), ); } } diff --git a/core/libs/editor/src/lib/editor-dialog/components/model-element-editor-component.ts b/core/libs/editor/src/lib/editor-dialog/components/model-element-editor-component.ts index d423da53..57b0fdd3 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/model-element-editor-component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/model-element-editor-component.ts @@ -40,7 +40,7 @@ export abstract class ModelElementEditorComponent { this.metaModelElement = metaModelElement; - }) + }), ); } diff --git a/core/libs/editor/src/lib/editor-dialog/components/properties/properties-button/properties-button.component.ts b/core/libs/editor/src/lib/editor-dialog/components/properties/properties-button/properties-button.component.ts index 4d115534..2f455248 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/properties/properties-button/properties-button.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/properties/properties-button/properties-button.component.ts @@ -44,7 +44,10 @@ export class PropertiesButtonComponent implements OnInit { return this.metaModelElement?.isPredefined(); } - constructor(private matDialog: MatDialog, private metaModelDialogService: EditorModelService) {} + constructor( + private matDialog: MatDialog, + private metaModelDialogService: EditorModelService, + ) {} ngOnInit(): void { this.metaModelDialogService.getMetaModelElement().subscribe((metaModelElement: BaseMetaModelElement) => { diff --git a/core/libs/editor/src/lib/editor-dialog/components/properties/properties-modal/properties-modal.component.ts b/core/libs/editor/src/lib/editor-dialog/components/properties/properties-modal/properties-modal.component.ts index 5a098389..98e130fa 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/properties/properties-modal/properties-modal.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/properties/properties-modal/properties-modal.component.ts @@ -62,7 +62,7 @@ export class PropertiesModalComponent implements OnInit, AfterViewInit { private formBuilder: FormBuilder, private dialogRef: MatDialogRef, private cacheService: NamespacesCacheService, - @Inject(MAT_DIALOG_DATA) public data: PropertiesDialogData + @Inject(MAT_DIALOG_DATA) public data: PropertiesDialogData, ) {} ngOnInit() { diff --git a/core/libs/editor/src/lib/editor-dialog/components/shape-settings/shape-settings.component.ts b/core/libs/editor/src/lib/editor-dialog/components/shape-settings/shape-settings.component.ts index f9861aff..21e688f1 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/shape-settings/shape-settings.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/shape-settings/shape-settings.component.ts @@ -58,7 +58,7 @@ export class ShapeSettingsComponent implements OnInit, OnChanges, OnDestroy { private loggerService: LogService, private languageSettings: SammLanguageSettingsService, private changeDetector: ChangeDetectorRef, - private translate: LanguageTranslationService + private translate: LanguageTranslationService, ) {} ngOnChanges(): void { diff --git a/core/libs/editor/src/lib/editor-dialog/components/shape-settings/shared-settings-title/shared-settings-title.component.ts b/core/libs/editor/src/lib/editor-dialog/components/shape-settings/shared-settings-title/shared-settings-title.component.ts index 8233ece7..2852cd02 100644 --- a/core/libs/editor/src/lib/editor-dialog/components/shape-settings/shared-settings-title/shared-settings-title.component.ts +++ b/core/libs/editor/src/lib/editor-dialog/components/shape-settings/shared-settings-title/shared-settings-title.component.ts @@ -40,7 +40,10 @@ export class SharedSettingsTitleComponent implements OnInit { elementName: string; - constructor(private cd: ChangeDetectorRef, private translate: LanguageTranslationService) {} + constructor( + private cd: ChangeDetectorRef, + private translate: LanguageTranslationService, + ) {} ngOnInit(): void { this.elementName = this.getTitle(); diff --git a/core/libs/editor/src/lib/editor-dialog/editor-model.service.ts b/core/libs/editor/src/lib/editor-dialog/editor-model.service.ts index 1dfe80dd..dac6fe8d 100644 --- a/core/libs/editor/src/lib/editor-dialog/editor-model.service.ts +++ b/core/libs/editor/src/lib/editor-dialog/editor-model.service.ts @@ -64,7 +64,7 @@ export class EditorModelService { if (!this.characteristicInstantiator) { this.characteristicInstantiator = new CharacteristicInstantiator( - new MetaModelElementInstantiator(this.modelService.currentRdfModel, null) + new MetaModelElementInstantiator(this.modelService.currentRdfModel, null), ); } diff --git a/core/libs/editor/src/lib/editor-dialog/services/shape-settings.service.ts b/core/libs/editor/src/lib/editor-dialog/services/shape-settings.service.ts index 9332a75b..9968a288 100644 --- a/core/libs/editor/src/lib/editor-dialog/services/shape-settings.service.ts +++ b/core/libs/editor/src/lib/editor-dialog/services/shape-settings.service.ts @@ -40,7 +40,7 @@ export class ShapeSettingsService { private openReferencedElementService: OpenReferencedElementService, private namespaceCacheService: NamespacesCacheService, private translate: LanguageTranslationService, - private ngZone: NgZone + private ngZone: NgZone, ) {} setGraphListeners() { @@ -58,7 +58,7 @@ export class ShapeSettingsService { setHotKeysActions() { this.editorService.bindAction( 'deleteElement', - mxUtils.bind(this, () => this.ngZone.run(() => this.editorService.deleteSelectedElements())) + mxUtils.bind(this, () => this.ngZone.run(() => this.editorService.deleteSelectedElements())), ); this.mxGraphService.graph.container.addEventListener('wheel', evt => { @@ -79,7 +79,7 @@ export class ShapeSettingsService { mxEvent.MOVE_CELLS, mxUtils.bind(this, () => { this.ngZone.run(() => (this.mxGraphAttributeService.graph.resetEdgesOnMove = true)); - }) + }), ); } diff --git a/core/libs/editor/src/lib/editor-dialog/validators/editor-dialog-validators.ts b/core/libs/editor/src/lib/editor-dialog/validators/editor-dialog-validators.ts index c46423e1..cbb5c7c8 100644 --- a/core/libs/editor/src/lib/editor-dialog/validators/editor-dialog-validators.ts +++ b/core/libs/editor/src/lib/editor-dialog/validators/editor-dialog-validators.ts @@ -20,7 +20,10 @@ import {RdfService} from '@ame/rdf/services'; @Injectable({providedIn: 'root'}) export class EditorDialogValidators { - constructor(private namespaceCacheService: NamespacesCacheService, private rdfService: RdfService) {} + constructor( + private namespaceCacheService: NamespacesCacheService, + private rdfService: RdfService, + ) {} static namingLowerCase(control: AbstractControl) { if (!control?.value) { diff --git a/core/libs/editor/src/lib/editor-toolbar/components/aasx-generation-modal/aasx-generation-modal.component.ts b/core/libs/editor/src/lib/editor-toolbar/components/aasx-generation-modal/aasx-generation-modal.component.ts index 8f94dfbc..79b34f04 100644 --- a/core/libs/editor/src/lib/editor-toolbar/components/aasx-generation-modal/aasx-generation-modal.component.ts +++ b/core/libs/editor/src/lib/editor-toolbar/components/aasx-generation-modal/aasx-generation-modal.component.ts @@ -31,7 +31,7 @@ export class AASXGenerationModalComponent { private modelApiService: ModelApiService, private modelService: ModelService, private rdfService: RdfService, - private dialogRef: MatDialogRef + private dialogRef: MatDialogRef, ) {} generate() { @@ -53,7 +53,7 @@ export class AASXGenerationModalComponent { finalize(() => { this.isGenerating = false; this.dialogRef.close(); - }) + }), ) .subscribe(); } diff --git a/core/libs/editor/src/lib/editor-toolbar/components/generate-async-api/generate-async-api.component.ts b/core/libs/editor/src/lib/editor-toolbar/components/generate-async-api/generate-async-api.component.ts index 53002675..33eb8685 100644 --- a/core/libs/editor/src/lib/editor-toolbar/components/generate-async-api/generate-async-api.component.ts +++ b/core/libs/editor/src/lib/editor-toolbar/components/generate-async-api/generate-async-api.component.ts @@ -54,7 +54,7 @@ export class GenerateAsyncApiComponent implements OnInit, OnDestroy { private dialogRef: MatDialogRef, private languageService: SammLanguageSettingsService, private modelService: ModelService, - private editorService: EditorService + private editorService: EditorService, ) {} ngOnInit(): void { @@ -89,9 +89,9 @@ export class GenerateAsyncApiComponent implements OnInit, OnDestroy { finalize(() => { this.isGenerating = false; this.dialogRef.close(); - }) + }), ) - .subscribe() + .subscribe(), ); } diff --git a/core/libs/editor/src/lib/editor-toolbar/components/generate-documentation/generate-documentation.component.ts b/core/libs/editor/src/lib/editor-toolbar/components/generate-documentation/generate-documentation.component.ts index 0ab6838f..8300fc4d 100644 --- a/core/libs/editor/src/lib/editor-toolbar/components/generate-documentation/generate-documentation.component.ts +++ b/core/libs/editor/src/lib/editor-toolbar/components/generate-documentation/generate-documentation.component.ts @@ -44,7 +44,7 @@ export class GenerateDocumentationComponent { private namespaceCacheService: NamespacesCacheService, private modelService: ModelService, private modelApiService: ModelApiService, - private editorService: EditorService + private editorService: EditorService, ) { this.languages = this.languageService.getSammLanguageCodes().map(tag => locale.getByTag(tag)); this.languageControl = new FormControl(this.languages[0].tag); @@ -60,7 +60,7 @@ export class GenerateDocumentationComponent { finalize(() => { this.isGenerating = false; this.dialogRef.close(); - }) + }), ) .subscribe(); } @@ -77,13 +77,13 @@ export class GenerateDocumentationComponent { new Blob([data], { type: 'text/html', }), - !this.modelService.loadedAspect ? this.currentCachedFile.fileName : `${this.modelService.loadedAspect.name}-documentation.html` - ) + !this.modelService.loadedAspect ? this.currentCachedFile.fileName : `${this.modelService.loadedAspect.name}-documentation.html`, + ), ), finalize(() => { this.isGenerating = false; this.dialogRef.close(); - }) + }), ) .subscribe(); } diff --git a/core/libs/editor/src/lib/editor-toolbar/components/generate-open-api/generate-open-api.component.ts b/core/libs/editor/src/lib/editor-toolbar/components/generate-open-api/generate-open-api.component.ts index b908e841..50c1c98c 100644 --- a/core/libs/editor/src/lib/editor-toolbar/components/generate-open-api/generate-open-api.component.ts +++ b/core/libs/editor/src/lib/editor-toolbar/components/generate-open-api/generate-open-api.component.ts @@ -89,7 +89,7 @@ export class GenerateOpenApiComponent implements OnInit, OnDestroy { private modelService: ModelService, private editorService: EditorService, private notificationsService: NotificationsService, - private translate: LanguageTranslationService + private translate: LanguageTranslationService, ) {} ngOnInit(): void { @@ -134,7 +134,7 @@ export class GenerateOpenApiComponent implements OnInit, OnDestroy { } resourcePathControl?.updateValueAndValidity(); - }) + }), ); this.subscriptions.add( @@ -143,7 +143,7 @@ export class GenerateOpenApiComponent implements OnInit, OnDestroy { const hasBrackets = /{.*}/.test(resourcePath); hasBrackets ? fileControl?.setValidators(Validators.required) : fileControl?.setValidators(null); fileControl?.updateValueAndValidity(); - }) + }), ); } @@ -222,9 +222,9 @@ export class GenerateOpenApiComponent implements OnInit, OnDestroy { finalize(() => { this.isGenerating = false; this.dialogRef.close(); - }) + }), ) - .subscribe() + .subscribe(), ); } diff --git a/core/libs/editor/src/lib/editor-toolbar/components/help/document.component.ts b/core/libs/editor/src/lib/editor-toolbar/components/help/document.component.ts index ee338355..ce361116 100644 --- a/core/libs/editor/src/lib/editor-toolbar/components/help/document.component.ts +++ b/core/libs/editor/src/lib/editor-toolbar/components/help/document.component.ts @@ -27,7 +27,7 @@ export class DocumentComponent { constructor( private dialogRef: MatDialogRef, @Inject(APP_CONFIG) public config: AppConfig, - private browserService: BrowserService + private browserService: BrowserService, ) {} openLink(event: MouseEvent) { diff --git a/core/libs/editor/src/lib/editor-toolbar/components/language-sector-modal/language-selector-modal.component.ts b/core/libs/editor/src/lib/editor-toolbar/components/language-sector-modal/language-selector-modal.component.ts index 8e288eae..e746f068 100644 --- a/core/libs/editor/src/lib/editor-toolbar/components/language-sector-modal/language-selector-modal.component.ts +++ b/core/libs/editor/src/lib/editor-toolbar/components/language-sector-modal/language-selector-modal.component.ts @@ -24,7 +24,10 @@ export class LanguageSelectorModalComponent { public languages: locale.ILocale[] = []; public languageControl: FormControl; - constructor(private dialogRef: MatDialogRef, private languageService: SammLanguageSettingsService) { + constructor( + private dialogRef: MatDialogRef, + private languageService: SammLanguageSettingsService, + ) { this.languages = this.languageService.getSammLanguageCodes().map(tag => locale.getByTag(tag)); this.languageControl = new FormControl(this.languages[0].tag); diff --git a/core/libs/editor/src/lib/editor-toolbar/components/notifications/notifications.component.ts b/core/libs/editor/src/lib/editor-toolbar/components/notifications/notifications.component.ts index 42f1b7a9..dfe9feb6 100644 --- a/core/libs/editor/src/lib/editor-toolbar/components/notifications/notifications.component.ts +++ b/core/libs/editor/src/lib/editor-toolbar/components/notifications/notifications.component.ts @@ -29,7 +29,7 @@ export class NotificationsComponent implements OnInit { private dialogRef: MatDialogRef, public notificationsService: NotificationsService, public router: Router, - private activatedRoute: ActivatedRoute + private activatedRoute: ActivatedRoute, ) {} ngOnInit() { diff --git a/core/libs/editor/src/lib/editor-toolbar/components/text-model-loader-modal/text-model-loader-modal.component.ts b/core/libs/editor/src/lib/editor-toolbar/components/text-model-loader-modal/text-model-loader-modal.component.ts index a7de0e7b..493fd559 100644 --- a/core/libs/editor/src/lib/editor-toolbar/components/text-model-loader-modal/text-model-loader-modal.component.ts +++ b/core/libs/editor/src/lib/editor-toolbar/components/text-model-loader-modal/text-model-loader-modal.component.ts @@ -34,7 +34,10 @@ import {MatDialogRef} from '@angular/material/dialog'; ], }) export class TextModelLoaderModalComponent { - constructor(private fileHandlingService: FileHandlingService, private matDialogRef: MatDialogRef) {} + constructor( + private fileHandlingService: FileHandlingService, + private matDialogRef: MatDialogRef, + ) {} loadModel(modelText: string) { this.matDialogRef.close(); diff --git a/core/libs/editor/src/lib/editor-toolbar/editor-toolbar.component.ts b/core/libs/editor/src/lib/editor-toolbar/editor-toolbar.component.ts index a79ebc8f..595c7101 100644 --- a/core/libs/editor/src/lib/editor-toolbar/editor-toolbar.component.ts +++ b/core/libs/editor/src/lib/editor-toolbar/editor-toolbar.component.ts @@ -60,7 +60,7 @@ export class EditorToolbarComponent implements AfterViewInit, OnInit, OnDestroy private mxGraphShapeSelectorService: MxGraphShapeSelectorService, private matDialog: MatDialog, private shapeSettingsService: ShapeSettingsService, - private mxGraphService: MxGraphService + private mxGraphService: MxGraphService, ) {} ngOnInit(): void { diff --git a/core/libs/editor/src/lib/editor-toolbar/services/file-handling.service.ts b/core/libs/editor/src/lib/editor-toolbar/services/file-handling.service.ts index 06533406..eebda9ff 100644 --- a/core/libs/editor/src/lib/editor-toolbar/services/file-handling.service.ts +++ b/core/libs/editor/src/lib/editor-toolbar/services/file-handling.service.ts @@ -97,7 +97,7 @@ export class FileHandlingService { private modelSaveTracker: ModelSavingTrackerService, private fileUploadService: FileUploadService, private shapeSettingsStateService: ShapeSettingsStateService, - private mxGraphService: MxGraphService + private mxGraphService: MxGraphService, ) { if (!environment.production) { window['angular.fileHandlingService'] = this; @@ -139,7 +139,7 @@ export class FileHandlingService { this.shapeSettingsStateService.closeShapeSettings(); } this.sidebarService.workspace.close(); - }) + }), ); } @@ -183,9 +183,9 @@ export class FileHandlingService { if (this.shapeSettingsStateService.isShapeSettingOpened) { this.shapeSettingsStateService.closeShapeSettings(); } - }) - ) - ) + }), + ), + ), ) .subscribe(); } @@ -259,7 +259,7 @@ export class FileHandlingService { timeout: 5000, }); }), - first() + first(), ); } @@ -289,7 +289,7 @@ export class FileHandlingService { tap(formattedModel => { const header = this.configurationService.getSettings().copyrightHeader.join('\n'); saveAs(new Blob([header + '\n\n' + formattedModel], {type: 'text/turtle;charset=utf-8'}), fileName); - }) + }), ); }), catchError(error => { @@ -301,7 +301,7 @@ export class FileHandlingService { }); return throwError(() => error); }), - finalize(() => this.loadingScreenService.close()) + finalize(() => this.loadingScreenService.close()), ); } @@ -322,7 +322,7 @@ export class FileHandlingService { finalize(() => { this.modelSaveTracker.updateSavedModel(); this.loadingScreenService.close(); - }) + }), ); } @@ -330,7 +330,7 @@ export class FileHandlingService { this.resolveModelFileContent(fileInfo) .pipe( switchMap(fileInfo => this.addFileToNamespace(fileInfo)), - first() + first(), ) .subscribe(); } @@ -346,7 +346,7 @@ export class FileHandlingService { addFileToNamespace(fileInfo: FileInfoParsed): Observable { return this.addFileToWorkspace(fileInfo.path, fileInfo.content, {showNotifications: true}).pipe( - map(() => this.electronSignalsService.call('requestRefreshWorkspaces')) + map(() => this.electronSignalsService.call('requestRefreshWorkspaces')), ); } @@ -357,8 +357,8 @@ export class FileHandlingService { content: readFile(file), path: of(file.path), name: of(file.path.split('/').pop()), - }) - ) + }), + ), ); } @@ -368,7 +368,7 @@ export class FileHandlingService { replace: string[]; keep: string[]; }, - showLoading = true + showLoading = true, ): Observable { const loadingOptions: LoadingScreenOptions = { title: this.translate.language.LOADING_SCREEN_DIALOG.WORKSPACE_IMPORT, @@ -388,7 +388,7 @@ export class FileHandlingService { return of(null); }), - finalize(() => (showLoading ? this.loadingScreenService.close() : null)) + finalize(() => (showLoading ? this.loadingScreenService.close() : null)), ); } @@ -439,7 +439,7 @@ export class FileHandlingService { } return throwError(() => error); }), - finalize(() => (uploadOptions.showLoading ? this.loadingScreenService.close() : null)) + finalize(() => (uploadOptions.showLoading ? this.loadingScreenService.close() : null)), ); } @@ -488,7 +488,7 @@ export class FileHandlingService { this.logService.logError(`Error occurred while validating the current model (${JSON.stringify(error)})`); return throwError(() => 'Validation completed with errors'); }), - finalize(() => localStorage.removeItem('validating')) + finalize(() => localStorage.removeItem('validating')), ); } @@ -501,12 +501,12 @@ export class FileHandlingService { entry.files.forEach(file => { const fileName = `${entry.namespace}:${file}`; requests.push(this.importFile(fileName)); - }) + }), ); return requests; }), - switchMap(requests => forkJoin(requests)) + switchMap(requests => forkJoin(requests)), ); } @@ -518,7 +518,7 @@ export class FileHandlingService { private getFilesReplacement( files: string[], - {keep, replace}: {replace: string[]; keep: string[]} + {keep, replace}: {replace: string[]; keep: string[]}, ): {namespace: string; files: string[]}[] { // Should "keep" files be excluded? return Array.from(new Set([...keep, ...replace])).map(namespace => ({ @@ -586,7 +586,7 @@ export class FileHandlingService { } return of(confirm); - }) + }), ); } diff --git a/core/libs/editor/src/lib/editor-toolbar/services/file-upload.service.ts b/core/libs/editor/src/lib/editor-toolbar/services/file-upload.service.ts index 7a605366..92abaad0 100644 --- a/core/libs/editor/src/lib/editor-toolbar/services/file-upload.service.ts +++ b/core/libs/editor/src/lib/editor-toolbar/services/file-upload.service.ts @@ -48,7 +48,7 @@ export class FileUploadService { return fromEvent(fileInput, 'change').pipe( switchMap(() => (fileInput?.files?.length ? [fileInput.files[0]] : [])), first(), - finalize(() => this.removeFileInput(fileInput)) + finalize(() => this.removeFileInput(fileInput)), ); } diff --git a/core/libs/editor/src/lib/editor-toolbar/services/generate-handling.service.ts b/core/libs/editor/src/lib/editor-toolbar/services/generate-handling.service.ts index 7b784606..c8b88421 100644 --- a/core/libs/editor/src/lib/editor-toolbar/services/generate-handling.service.ts +++ b/core/libs/editor/src/lib/editor-toolbar/services/generate-handling.service.ts @@ -47,7 +47,7 @@ export class GenerateHandlingService { private loadingScreenService: LoadingScreenService, private namespaceCacheService: NamespacesCacheService, private translate: LanguageTranslationService, - private fileHandlingService: FileHandlingService + private fileHandlingService: FileHandlingService, ) { if (!environment.production) { window['angular.generateHandlingService'] = this; @@ -113,10 +113,10 @@ export class GenerateHandlingService { this.openPreview( this.translate.language.GENERATE_HANDLING.JSON_PAYLOAD_PREVIEW, this.formatStringToJson(data), - !this.modelService.loadedAspect ? this.currentCachedFile.fileName : `${this.modelService.loadedAspect.name}-sample.json` + !this.modelService.loadedAspect ? this.currentCachedFile.fileName : `${this.modelService.loadedAspect.name}-sample.json`, ); }), - finalize(() => this.loadingScreenService.close()) + finalize(() => this.loadingScreenService.close()), ); } @@ -155,11 +155,11 @@ export class GenerateHandlingService { this.openPreview( this.translate.language.GENERATE_HANDLING.JSON_SCHEMA_PREVIEW, this.formatStringToJson(data), - !this.modelService.loadedAspect ? this.currentCachedFile.fileName : `${this.modelService.loadedAspect.name}-schema.json` + !this.modelService.loadedAspect ? this.currentCachedFile.fileName : `${this.modelService.loadedAspect.name}-schema.json`, ); - }) - ) - ) + }), + ), + ), ); } diff --git a/core/libs/editor/src/lib/editor.service.ts b/core/libs/editor/src/lib/editor.service.ts index 90afea8f..d00c2f48 100644 --- a/core/libs/editor/src/lib/editor.service.ts +++ b/core/libs/editor/src/lib/editor.service.ts @@ -129,7 +129,7 @@ export class EditorService { private translate: LanguageTranslationService, private browserService: BrowserService, private injector: Injector, - private ngZone: NgZone + private ngZone: NgZone, ) { if (!environment.production) { window['angular.editorService'] = this; @@ -155,7 +155,7 @@ export class EditorService { } }); }), - null + null, ); // TODO: Check this when refactoring editor service @@ -185,7 +185,7 @@ export class EditorService { } }); }); - }) + }), ); // increase performance by not passing the event to the parent(s) @@ -216,10 +216,10 @@ export class EditorService { return this.rdfService.isSameModelContent(fileName, fileContent, currentModel).pipe( switchMap(isSameModelContent => - !isSameModelContent ? this.openReloadConfirmationDialog(currentModel.absoluteAspectModelFileName) : of(false) + !isSameModelContent ? this.openReloadConfirmationDialog(currentModel.absoluteAspectModelFileName) : of(false), ), switchMap(isApprove => (isApprove ? this.loadNewAspectModel({rdfAspectModel: fileContent}) : of(null))), - map(() => this.rdfService.currentRdfModel) + map(() => this.rdfService.currentRdfModel), ); } @@ -251,13 +251,13 @@ export class EditorService { rdfModel, payload.rdfAspectModel, payload.namespaceFileName || rdfModel.absoluteAspectModelFileName, - payload.editElementUrn - ) + payload.editElementUrn, + ), ), tap(() => { this.modelSavingTracker.updateSavedModel(); const [namespace, version, file] = (payload.namespaceFileName || this.rdfService.currentRdfModel.absoluteAspectModelFileName).split( - ':' + ':', ); if (this.browserService.isStartedAsElectronApp() || window.require) { @@ -270,13 +270,13 @@ export class EditorService { if (!payload.isDefault) { this.notificationsService.info({title: 'Aspect Model loaded', timeout: 3000}); } - }) + }), ); } loadExternalAspectModel(extRefAbsoluteAspectModelFileName: string): CachedFile { const extRdfModel = this.rdfService.externalRdfModels.find( - extRef => extRef.absoluteAspectModelFileName === extRefAbsoluteAspectModelFileName + extRef => extRef.absoluteAspectModelFileName === extRefAbsoluteAspectModelFileName, ); const fileName = extRdfModel.aspectModelFileName; let foundCachedFile = this.namespaceCacheService.getFile([extRdfModel.getAspectModelUrn(), fileName]); @@ -295,11 +295,11 @@ export class EditorService { mergeMap((fileContentModels: Array) => fileContentModels.length ? forkJoin(fileContentModels.map(fileContent => this.rdfService.loadExternalReferenceModelIntoStore(fileContent))) - : of([] as Array) + : of([] as Array), ), tap(extRdfModel => { extRdfModel.forEach(extRdfModel => this.loadExternalAspectModel(extRdfModel.absoluteAspectModelFileName)); - }) + }), ); } @@ -308,14 +308,14 @@ export class EditorService { .getAllNamespacesFilesContent() .pipe( mergeMap((fileContentModels: FileContentModel[]) => - fileContentModels.length ? this.rdfService.parseModels(fileContentModels) : of([]) - ) + fileContentModels.length ? this.rdfService.parseModels(fileContentModels) : of([]), + ), ); } removeAspectModelFileFromStore(aspectModelFileName: string) { const index = this.rdfService.externalRdfModels.findIndex( - extRdfModel => extRdfModel.absoluteAspectModelFileName === aspectModelFileName + extRdfModel => extRdfModel.absoluteAspectModelFileName === aspectModelFileName, ); this.rdfService.externalRdfModels.splice(index, 1); } @@ -340,7 +340,7 @@ export class EditorService { timeout: 5000, }); return throwError(() => err.error); - }) + }), ); } @@ -367,7 +367,7 @@ export class EditorService { this.notificationsService.error({title: 'Error on loading the aspect model', message: error}); // TODO: Use 'null' instead of empty object (requires thorough testing) return of({} as null); - }) + }), ) .subscribe(); } @@ -384,7 +384,7 @@ export class EditorService { this.mxGraphShapeOverlayService, this.namespaceCacheService, this.sammLangService, - rdfModel + rdfModel, ); const elements = this.namespaceCacheService.currentCachedFile.getAllElements(); @@ -404,7 +404,7 @@ export class EditorService { filter(response => response !== 'cancel'), tap(() => this.toggleLoadingScreen()), delay(500), // Wait for modal animation - switchMap(() => this.graphUpdateWorkflow(mxGraphRenderer, elements)) + switchMap(() => this.graphUpdateWorkflow(mxGraphRenderer, elements)), ) .subscribe({ next: () => this.finalizeGraphUpdate(editElementUrn), @@ -461,7 +461,7 @@ export class EditorService { const urn: string = element.dataset.urn; this.ngZone.run(() => this.createElement(x, y, elementType, urn)); }, - dragElement + dragElement, ); ds.setGuidesEnabled(true); } @@ -506,7 +506,7 @@ export class EditorService { this.mxGraphShapeOverlayService, this.namespaceCacheService, this.sammLangService, - null + null, ); this.mxGraphService.setCoordinatesForNextCellRender(x, y); @@ -619,7 +619,7 @@ export class EditorService { this.mxGraphAttributeService.graph.setCellStyles( mxConstants.STYLE_STROKECOLOR, 'black', - this.mxGraphService.graph.getOutgoingEdges(cell).map(edge => edge.target) + this.mxGraphService.graph.getOutgoingEdges(cell).map(edge => edge.target), ); this.elementModelService.deleteElement(cell); }); @@ -743,7 +743,7 @@ export class EditorService { return timer(this.settings.validationTimerSeconds * 1000); }, - }) + }), ); } @@ -754,7 +754,7 @@ export class EditorService { switchMap(value => localStorage.getItem(ValidateStatus.validating) ? throwError(() => ({type: SaveValidateErrorsCodes.validationInProgress})) - : of(value) + : of(value), ), switchMap(() => { localStorage.setItem(ValidateStatus.validating, 'yes'); @@ -762,7 +762,7 @@ export class EditorService { return rdfModel ? this.modelApiService.validate(this.rdfService.serializeModel(rdfModel)) : throwError(() => ({type: SaveValidateErrorsCodes.emptyModel})); - }) + }), ); } @@ -788,12 +788,12 @@ export class EditorService { this.namespaceCacheService.currentCachedFile.hasCachedElements() && !this.rdfService.currentRdfModel.aspectModelFileName.includes('empty.ttl') ? this.saveModel().pipe(first()) - : of([]) + : of([]), ), tap(() => this.enableAutoSave()), retry({ delay: () => timer(this.settings.saveTimerSeconds * 1000), - }) + }), ); } @@ -813,7 +813,7 @@ export class EditorService { this.logService.logError('Error on saving aspect model', error); this.notificationsService.error({title: this.translate.language.NOTIFICATION_SERVICE.ASPECT_SAVED_ERROR}); return of({}); - }) + }), ); } diff --git a/core/libs/editor/src/lib/large-file-warning-dialog/large-file-warning-dialog.ts b/core/libs/editor/src/lib/large-file-warning-dialog/large-file-warning-dialog.ts index 2786d8f0..25345aa7 100644 --- a/core/libs/editor/src/lib/large-file-warning-dialog/large-file-warning-dialog.ts +++ b/core/libs/editor/src/lib/large-file-warning-dialog/large-file-warning-dialog.ts @@ -24,7 +24,7 @@ export class LargeFileWarningComponent { constructor( private namespacesCacheService: NamespacesCacheService, private dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) private data: {elementsCount: number} + @Inject(MAT_DIALOG_DATA) private data: {elementsCount: number}, ) { this.elementsCount = data?.elementsCount || 0; } diff --git a/core/libs/editor/src/lib/open-element-window/open-element-window.component.ts b/core/libs/editor/src/lib/open-element-window/open-element-window.component.ts index ed15818f..cf0059b3 100644 --- a/core/libs/editor/src/lib/open-element-window/open-element-window.component.ts +++ b/core/libs/editor/src/lib/open-element-window/open-element-window.component.ts @@ -47,7 +47,7 @@ export class OpenElementWindowComponent implements OnInit { private rdfService: RdfService, private modelApiService: ModelApiService, private notificationService: NotificationsService, - @Inject(MAT_DIALOG_DATA) private elementInfo: {urn: string; file: string} + @Inject(MAT_DIALOG_DATA) private elementInfo: {urn: string; file: string}, ) {} ngOnInit() { @@ -77,7 +77,7 @@ export class OpenElementWindowComponent implements OnInit { this.notificationService.error({title: 'Could not open file', message: `${this.elementInfo.file} could not be opened.`}); this.dialogRef.close(); return of(error); - }) + }), ) .subscribe(); } diff --git a/core/libs/editor/src/lib/preview-dialog/preview-dialog.component.ts b/core/libs/editor/src/lib/preview-dialog/preview-dialog.component.ts index 9d3a7242..5a81f90a 100644 --- a/core/libs/editor/src/lib/preview-dialog/preview-dialog.component.ts +++ b/core/libs/editor/src/lib/preview-dialog/preview-dialog.component.ts @@ -34,7 +34,10 @@ export class PreviewDialogComponent { public title: string; public fileName: string; - constructor(@Inject(MAT_DIALOG_DATA) private data: PreviewDialogOptions, private dialogRef: MatDialogRef) { + constructor( + @Inject(MAT_DIALOG_DATA) private data: PreviewDialogOptions, + private dialogRef: MatDialogRef, + ) { this.title = data.title; this.content = data.content; this.initialContent = data.content; @@ -50,7 +53,7 @@ export class PreviewDialogComponent { new Blob([this.content], { type: 'application/json;charset=utf-8', }), - this.fileName + this.fileName, ); } diff --git a/core/libs/editor/src/lib/rename-model/rename-model.component.ts b/core/libs/editor/src/lib/rename-model/rename-model.component.ts index b35f9f27..8a4d2642 100644 --- a/core/libs/editor/src/lib/rename-model/rename-model.component.ts +++ b/core/libs/editor/src/lib/rename-model/rename-model.component.ts @@ -29,7 +29,7 @@ export class RenameModelComponent { @Inject(MAT_DIALOG_DATA) public data: {namespaces: string; rdfModel: RdfModel}, private dialogRef: MatDialogRef, private rdfService: RdfService, - private modelApiService: ModelApiService + private modelApiService: ModelApiService, ) { const rdfModel = this.rdfService.currentRdfModel; this.modelApiService.getNamespacesAppendWithFiles().subscribe(namespaces => { @@ -51,7 +51,7 @@ export class RenameModelComponent { return this.dialogRef.close( result && { name: this.fileNameControl.value.endsWith('.ttl') ? this.fileNameControl.value : `${this.fileNameControl.value}.ttl`, - } + }, ); } } diff --git a/core/libs/editor/src/lib/save-model-dialog/save-model-dialog.component.ts b/core/libs/editor/src/lib/save-model-dialog/save-model-dialog.component.ts index 29c9ac49..d4a0fafd 100644 --- a/core/libs/editor/src/lib/save-model-dialog/save-model-dialog.component.ts +++ b/core/libs/editor/src/lib/save-model-dialog/save-model-dialog.component.ts @@ -22,7 +22,11 @@ import {EditorService} from '@ame/editor'; export class SaveModelDialogComponent { public disabledButton = false; - constructor(private matDialogRef: MatDialogRef, private editorService: EditorService, private zone: NgZone) {} + constructor( + private matDialogRef: MatDialogRef, + private editorService: EditorService, + private zone: NgZone, + ) {} close(destroyWindow: boolean) { this.matDialogRef.close(destroyWindow); diff --git a/core/libs/instantiator/src/lib/instantiator.service.ts b/core/libs/instantiator/src/lib/instantiator.service.ts index 262b6357..9f5ba067 100644 --- a/core/libs/instantiator/src/lib/instantiator.service.ts +++ b/core/libs/instantiator/src/lib/instantiator.service.ts @@ -40,7 +40,7 @@ export class InstantiatorService { private namespaceCacheService: NamespacesCacheService, public rdfService: RdfService, public notificationsService: NotificationsService, - public translate: LanguageTranslationService + public translate: LanguageTranslationService, ) {} public instantiateFile(rdfModel: RdfModel, cachedFile: CachedFile, fileName: string): CachedFile { @@ -58,7 +58,7 @@ export class InstantiatorService { this.namespaceCacheService, new Map>(), this.notificationsService, - this.translate + this.translate, ); if (aspect) { @@ -70,7 +70,7 @@ export class InstantiatorService { .getSubjects(null, null, null) .reduce( (subjects, subject) => (!Util.isBlankNode(subject) && !cachedFile.getElement(subject.value) ? [...subjects, subject] : subjects), - [] + [], ); metaModelElementInstantiator.isIsolated = true; @@ -91,7 +91,7 @@ export class InstantiatorService { subject: Quad_Subject, rdfModel: RdfModel, cachedFile: CachedFile, - metaModelElementInstantiator: MetaModelElementInstantiator + metaModelElementInstantiator: MetaModelElementInstantiator, ) { const samm = rdfModel.SAMM(); const sammC = rdfModel.SAMMC(); @@ -176,7 +176,7 @@ export class InstantiatorService { if (samm.isAbstractEntity(elementType)) { const entity = new AbstractEntityInstantiator(metaModelElementInstantiator).createAbstractEntity( - rdfModel.store.getQuads(subject, null, null, null) + rdfModel.store.getQuads(subject, null, null, null), ); if (entity) { cachedFile.resolveElement(entity); @@ -187,7 +187,7 @@ export class InstantiatorService { if (RdfModelUtil.isEntityValue(elementType, metaModelElementInstantiator)) { const entityValue = new EntityValueInstantiator(metaModelElementInstantiator).createEntityValue( rdfModel.store.getQuads(subject, null, null, null), - subject + subject, ); if (entityValue) { cachedFile.resolveElement(entityValue); diff --git a/core/libs/instantiator/src/lib/instantiators/abstract-entity-instantiator.ts b/core/libs/instantiator/src/lib/instantiators/abstract-entity-instantiator.ts index fcd7ae2c..28b86b41 100644 --- a/core/libs/instantiator/src/lib/instantiators/abstract-entity-instantiator.ts +++ b/core/libs/instantiator/src/lib/instantiators/abstract-entity-instantiator.ts @@ -72,7 +72,7 @@ export class AbstractEntityInstantiator { if (samm.isPropertiesProperty(quad.predicate.value)) { defaultAbstractEntity.properties = this.metaModelElementInstantiator.getProperties( DataFactory.namedNode(quad.subject.value), - samm.PropertiesProperty() + samm.PropertiesProperty(), ); defaultAbstractEntity.children.push(...defaultAbstractEntity.properties.map(e => e.property)); diff --git a/core/libs/instantiator/src/lib/instantiators/base-constraint-characteristic-instantiator.ts b/core/libs/instantiator/src/lib/instantiators/base-constraint-characteristic-instantiator.ts index 9f23331b..8d323143 100644 --- a/core/libs/instantiator/src/lib/instantiators/base-constraint-characteristic-instantiator.ts +++ b/core/libs/instantiator/src/lib/instantiators/base-constraint-characteristic-instantiator.ts @@ -26,7 +26,7 @@ export class BaseConstraintCharacteristicInstantiator { constructor( protected metaModelElementInstantiator: MetaModelElementInstantiator, - public nextProcessor?: BaseConstraintCharacteristicInstantiator + public nextProcessor?: BaseConstraintCharacteristicInstantiator, ) { this.samm = metaModelElementInstantiator.samm; this.sammC = metaModelElementInstantiator.sammC; diff --git a/core/libs/instantiator/src/lib/instantiators/characteristic-instantiator.ts b/core/libs/instantiator/src/lib/instantiators/characteristic-instantiator.ts index cd55f597..c9c376c2 100644 --- a/core/libs/instantiator/src/lib/instantiators/characteristic-instantiator.ts +++ b/core/libs/instantiator/src/lib/instantiators/characteristic-instantiator.ts @@ -33,7 +33,10 @@ export class CharacteristicInstantiator extends BaseConstraintCharacteristicInst return this.metaModelElementInstantiator.fileName; } - constructor(protected metaModelElementInstantiator: MetaModelElementInstantiator, public nextProcessor?: CharacteristicInstantiator) { + constructor( + protected metaModelElementInstantiator: MetaModelElementInstantiator, + public nextProcessor?: CharacteristicInstantiator, + ) { super(metaModelElementInstantiator, nextProcessor); this.standardCharacteristicInstantiator = new PredefinedCharacteristicInstantiator(metaModelElementInstantiator); } diff --git a/core/libs/instantiator/src/lib/instantiators/constraint-instantiator.ts b/core/libs/instantiator/src/lib/instantiators/constraint-instantiator.ts index a19b23b0..bf49b282 100644 --- a/core/libs/instantiator/src/lib/instantiators/constraint-instantiator.ts +++ b/core/libs/instantiator/src/lib/instantiators/constraint-instantiator.ts @@ -25,26 +25,28 @@ export class ConstraintInstantiator extends BaseConstraintCharacteristicInstanti return this.metaModelElementInstantiator.rdfModel; } - constructor(protected metaModelElementInstantiator: MetaModelElementInstantiator, public nextProcessor?: ConstraintInstantiator) { + constructor( + protected metaModelElementInstantiator: MetaModelElementInstantiator, + public nextProcessor?: ConstraintInstantiator, + ) { super(metaModelElementInstantiator, nextProcessor); } create(quad: Quad): Constraint { - const extReference = this.namespaceCacheService.findElementOnExtReference(quad.object.value); - if (extReference) { - extReference.setExternalReference(true); - return extReference; + let constraint = this.cachedFile.getElement(quad.object.value); + if (constraint) { + return constraint; } if (!this.rdfModel.store.getQuads(quad.object, null, null, null).length) { const {externalReference} = this.metaModelElementInstantiator.getExternalElement( quad.object, - this.rdfModel.isExternalRef + this.rdfModel.isExternalRef, ); return externalReference; } - const constraint = super.create(quad); + constraint = super.create(quad); constraint.setExternalReference(this.rdfModel.isExternalRef); constraint.fileName = this.metaModelElementInstantiator.fileName; diff --git a/core/libs/instantiator/src/lib/instantiators/entity-instantiator.ts b/core/libs/instantiator/src/lib/instantiators/entity-instantiator.ts index a454b9ce..f76883d6 100644 --- a/core/libs/instantiator/src/lib/instantiators/entity-instantiator.ts +++ b/core/libs/instantiator/src/lib/instantiators/entity-instantiator.ts @@ -49,7 +49,7 @@ export class EntityInstantiator { quads.forEach(quad => { if (samm.isExtendsProperty(quad.predicate.value)) { const externalElement = this.metaModelElementInstantiator.namespaceCacheService.findElementOnExtReference( - quad.object.value + quad.object.value, ); if (externalElement) { @@ -75,7 +75,7 @@ export class EntityInstantiator { defaultEntity.extendedElement = entityInstance(); } else { defaultEntity.extendedElement = new AbstractEntityInstantiator(this.metaModelElementInstantiator).createAbstractEntity( - storedQuads + storedQuads, ); } @@ -90,7 +90,7 @@ export class EntityInstantiator { this.metaModelElementInstantiator.getProperties( DataFactory.namedNode(quad.subject.value), samm.PropertiesProperty(), - defaultEntity + defaultEntity, ); } }); diff --git a/core/libs/instantiator/src/lib/instantiators/entity-value-instantiator.ts b/core/libs/instantiator/src/lib/instantiators/entity-value-instantiator.ts index d5573495..28180470 100644 --- a/core/libs/instantiator/src/lib/instantiators/entity-value-instantiator.ts +++ b/core/libs/instantiator/src/lib/instantiators/entity-value-instantiator.ts @@ -41,7 +41,7 @@ export class EntityValueInstantiator { if (!quads.length) { const {externalReference} = this.metaModelElementInstantiator.getExternalElement( object, - this.rdfModel.isExternalRef + this.rdfModel.isExternalRef, ); if (externalReference) { return externalReference; @@ -88,7 +88,7 @@ export class EntityValueInstantiator { return ( this.cachedFile.getElement(quad.object.value) || new EntityInstantiator(this.metaModelElementInstantiator).createEntity( - this.metaModelElementInstantiator.rdfModel.findAnyProperty(DataFactory.namedNode(quad.object.value)) + this.metaModelElementInstantiator.rdfModel.findAnyProperty(DataFactory.namedNode(quad.object.value)), ) ); } @@ -145,7 +145,7 @@ export class EntityValueInstantiator { const value = new EntityValueInstantiator(this.metaModelElementInstantiator).createEntityValue( this.metaModelElementInstantiator.rdfModel.findAnyProperty(property.object as NamedNode), - property.object + property.object, ); this.metaModelElementInstantiator.getProperty({quad: property.predicate}, (overwrittenProperty: OverWrittenProperty) => { defaultEntityValue.addProperty(overwrittenProperty, value); diff --git a/core/libs/instantiator/src/lib/instantiators/event-instantiator.ts b/core/libs/instantiator/src/lib/instantiators/event-instantiator.ts index 82a7ee71..083b5369 100644 --- a/core/libs/instantiator/src/lib/instantiators/event-instantiator.ts +++ b/core/libs/instantiator/src/lib/instantiators/event-instantiator.ts @@ -50,7 +50,7 @@ export class EventInstantiator { if (samm.isParametersProperty(quad.predicate.value)) { event.parameters = this.metaModelElementInstantiator.getProperties( DataFactory.namedNode(quad.subject.value), - samm.ParametersProperty() + samm.ParametersProperty(), ); } }); diff --git a/core/libs/instantiator/src/lib/instantiators/operation-instantiator.ts b/core/libs/instantiator/src/lib/instantiators/operation-instantiator.ts index 2a32976d..47d225eb 100644 --- a/core/libs/instantiator/src/lib/instantiators/operation-instantiator.ts +++ b/core/libs/instantiator/src/lib/instantiators/operation-instantiator.ts @@ -51,7 +51,7 @@ export class OperationInstantiator { operation.input = this.metaModelElementInstantiator.getProperties( DataFactory.namedNode(quad.subject.value), samm.InputProperty(), - operation + operation, ); operation.input && operation.children.push(...operation.input.map(i => i.property)); } else if (samm.isOutputProperty(quad.predicate.value)) { diff --git a/core/libs/instantiator/src/lib/instantiators/predefined-characteristic-instantiator.ts b/core/libs/instantiator/src/lib/instantiators/predefined-characteristic-instantiator.ts index 1a9d9dcf..07637d6c 100644 --- a/core/libs/instantiator/src/lib/instantiators/predefined-characteristic-instantiator.ts +++ b/core/libs/instantiator/src/lib/instantiators/predefined-characteristic-instantiator.ts @@ -41,14 +41,14 @@ export class PredefinedCharacteristicInstantiator { metaModelElementInstantiator.samm.version, metaModelElementInstantiator.sammC.getAspectModelUrn('Text'), 'Text', - new DefaultScalar(simpleDataTypes['string'].isDefinedBy) + new DefaultScalar(simpleDataTypes['string'].isDefinedBy), ); characteristic.addPreferredName('en', 'Text'); characteristic.addDescription( 'en', 'Describes a Property which contains plain text. ' + - 'This is intended exclusively for human readable strings, not for identifiers, measurement values, etc.' + 'This is intended exclusively for human readable strings, not for identifiers, measurement values, etc.', ); return characteristic; @@ -59,7 +59,7 @@ export class PredefinedCharacteristicInstantiator { metaModelElementInstantiator.samm.version, metaModelElementInstantiator.sammC.getAspectModelUrn('Timestamp'), 'Timestamp', - new DefaultScalar(simpleDataTypes['dateTime'].isDefinedBy) + new DefaultScalar(simpleDataTypes['dateTime'].isDefinedBy), ); characteristic.addPreferredName('en', 'Timestamp'); @@ -73,14 +73,14 @@ export class PredefinedCharacteristicInstantiator { metaModelElementInstantiator.samm.version, metaModelElementInstantiator.sammC.getAspectModelUrn('MultiLanguageText'), 'MultiLanguageText', - new DefaultScalar(simpleDataTypes['langString'].isDefinedBy) + new DefaultScalar(simpleDataTypes['langString'].isDefinedBy), ); characteristic.addPreferredName('en', 'Multi-Language Text'); characteristic.addDescription( 'en', 'Describes a Property which contains plain text in multiple languages.' + - ' This is intended exclusively for human readable strings, not for identifiers, measurement values, etc.' + ' This is intended exclusively for human readable strings, not for identifiers, measurement values, etc.', ); return characteristic; @@ -91,7 +91,7 @@ export class PredefinedCharacteristicInstantiator { metaModelElementInstantiator.samm.version, metaModelElementInstantiator.sammC.getAspectModelUrn('Boolean'), 'Boolean', - new DefaultScalar(`${simpleDataTypes['boolean'].isDefinedBy}`) + new DefaultScalar(`${simpleDataTypes['boolean'].isDefinedBy}`), ); characteristic.addPreferredName('en', 'Boolean'); @@ -105,7 +105,7 @@ export class PredefinedCharacteristicInstantiator { metaModelElementInstantiator.samm.version, metaModelElementInstantiator.sammC.getAspectModelUrn('Locale'), 'Locale', - new DefaultScalar(`${simpleDataTypes['string'].isDefinedBy}`) + new DefaultScalar(`${simpleDataTypes['string'].isDefinedBy}`), ); characteristic.addPreferredName('en', 'Locale'); @@ -119,7 +119,7 @@ export class PredefinedCharacteristicInstantiator { metaModelElementInstantiator.samm.version, metaModelElementInstantiator.sammC.getAspectModelUrn('Language'), 'Language', - new DefaultScalar(`${simpleDataTypes['string'].isDefinedBy}`) + new DefaultScalar(`${simpleDataTypes['string'].isDefinedBy}`), ); characteristic.addPreferredName('en', 'Language'); @@ -133,7 +133,7 @@ export class PredefinedCharacteristicInstantiator { metaModelElementInstantiator.samm.version, metaModelElementInstantiator.sammC.getAspectModelUrn('UnitReference'), 'UnitReference', - new DefaultScalar(`${simpleDataTypes['curie'].isDefinedBy}`) + new DefaultScalar(`${simpleDataTypes['curie'].isDefinedBy}`), ); characteristic.addPreferredName('en', 'Unit Reference'); @@ -147,7 +147,7 @@ export class PredefinedCharacteristicInstantiator { metaModelElementInstantiator.samm.version, metaModelElementInstantiator.sammC.getAspectModelUrn('ResourcePath'), 'ResourcePath', - new DefaultScalar(`${simpleDataTypes['anyURI'].isDefinedBy}`) + new DefaultScalar(`${simpleDataTypes['anyURI'].isDefinedBy}`), ); characteristic.addPreferredName('en', 'Resource Path'); @@ -161,7 +161,7 @@ export class PredefinedCharacteristicInstantiator { metaModelElementInstantiator.samm.version, metaModelElementInstantiator.sammC.getAspectModelUrn('MimeType'), 'MimeType', - new DefaultScalar(`${simpleDataTypes['string'].isDefinedBy}`) + new DefaultScalar(`${simpleDataTypes['string'].isDefinedBy}`), ); characteristic.addPreferredName('en', 'MIME Type'); diff --git a/core/libs/instantiator/src/lib/instantiators/samm-e-predefined-entity-instantiator.ts b/core/libs/instantiator/src/lib/instantiators/samm-e-predefined-entity-instantiator.ts index eb9e5abc..b5ce9e64 100644 --- a/core/libs/instantiator/src/lib/instantiators/samm-e-predefined-entity-instantiator.ts +++ b/core/libs/instantiator/src/lib/instantiators/samm-e-predefined-entity-instantiator.ts @@ -39,13 +39,13 @@ export class PredefinedEntityInstantiator { {property: timestampProperty, keys: {}}, {property: valueProperty, keys: {}}, ], - true + true, ); timeSeriesEntity.addPreferredName('en', 'Time Series Entity'); timeSeriesEntity.addDescription( 'en', - 'An Entity which represents a key/value pair. The key is the timestamp when the value was recorded and the value is the value which was recorded.' + 'An Entity which represents a key/value pair. The key is the timestamp when the value was recorded and the value is the value which was recorded.', ); timestampProperty.parents.push(timeSeriesEntity); @@ -66,7 +66,7 @@ export class PredefinedEntityInstantiator { {property: propertyInstances[sammE.yProperty](), keys: {}}, {property: propertyInstances[sammE.zProperty](), keys: {}}, ], - true + true, ); point3dEntity.addPreferredName('en', 'Point 3D'); @@ -89,7 +89,7 @@ export class PredefinedEntityInstantiator { {property: propertyInstances[sammE.resourceProperty](), keys: {}}, {property: propertyInstances[sammE.mimeTypeProperty](), keys: {}}, ], - true + true, ); fileResourceEntity.addPreferredName('en', 'File Resource'); diff --git a/core/libs/instantiator/src/lib/instantiators/samm-e-predefined-property-instantiator.ts b/core/libs/instantiator/src/lib/instantiators/samm-e-predefined-property-instantiator.ts index dd1e9d33..4642a1bb 100644 --- a/core/libs/instantiator/src/lib/instantiators/samm-e-predefined-property-instantiator.ts +++ b/core/libs/instantiator/src/lib/instantiators/samm-e-predefined-property-instantiator.ts @@ -43,7 +43,7 @@ export class PredefinedPropertyInstantiator { this.metaModelElementInstantiator.sammE.getNamespace() + PredefinedProperties.timestamp, PredefinedProperties.timestamp, defaultCharacteristicInstantiator.createTimestampCharacteristic(this.metaModelElementInstantiator), - true + true, ); timestampProperty.addPreferredName('en', 'Timestamp'); @@ -61,7 +61,7 @@ export class PredefinedPropertyInstantiator { this.metaModelElementInstantiator.sammE.getNamespace() + PredefinedProperties.value, PredefinedProperties.value, '', - true + true, ); valueProperty.addPreferredName('en', 'Value'); @@ -76,7 +76,7 @@ export class PredefinedPropertyInstantiator { this.metaModelElementInstantiator.sammE.getNamespace() + coordinate, coordinate, '', - true + true, ); valueProperty.addPreferredName('en', coordinates[coordinate].preferredName); @@ -93,7 +93,7 @@ export class PredefinedPropertyInstantiator { this.metaModelElementInstantiator.sammE.getNamespace() + PredefinedProperties.resource, PredefinedProperties.resource, defaultCharacteristicInstantiator.createResourcePathCharacteristic(this.metaModelElementInstantiator), - true + true, ); resourceProperty.addPreferredName('en', 'Resource'); @@ -114,7 +114,7 @@ export class PredefinedPropertyInstantiator { PredefinedProperties.mimeType, defaultCharacteristicInstantiator.createMimeTypeCharacteristic(this.metaModelElementInstantiator), true, - 'application/json' + 'application/json', ); mimeTypeProperty.addPreferredName('en', 'MIME Type'); diff --git a/core/libs/instantiator/src/lib/instantiators/state-characteristic-instantiator.ts b/core/libs/instantiator/src/lib/instantiators/state-characteristic-instantiator.ts index 1b196e31..e11093ec 100644 --- a/core/libs/instantiator/src/lib/instantiators/state-characteristic-instantiator.ts +++ b/core/libs/instantiator/src/lib/instantiators/state-characteristic-instantiator.ts @@ -38,7 +38,7 @@ export class StateCharacteristicInstantiator extends EnumerationCharacteristicIn defaultEnumeration.name, defaultEnumeration.values, null, - defaultEnumeration.dataType + defaultEnumeration.dataType, ); defaultState.fileName = this.metaModelElementInstantiator.fileName; diff --git a/core/libs/instantiator/src/lib/instantiators/unit-instantiator.ts b/core/libs/instantiator/src/lib/instantiators/unit-instantiator.ts index e6374a54..69427e45 100644 --- a/core/libs/instantiator/src/lib/instantiators/unit-instantiator.ts +++ b/core/libs/instantiator/src/lib/instantiators/unit-instantiator.ts @@ -51,7 +51,7 @@ export class UnitInstantiator { this.samm.version, `${this.metaModelElementInstantiator.sammU.getDefaultQuantityKindsUri()}#${quantityKind.name}`, quantityKind.name, - quantityKind.label + quantityKind.label, ) : null; } diff --git a/core/libs/instantiator/src/lib/meta-model-element-instantiator.ts b/core/libs/instantiator/src/lib/meta-model-element-instantiator.ts index 0241bc1f..3aaa3b10 100644 --- a/core/libs/instantiator/src/lib/meta-model-element-instantiator.ts +++ b/core/libs/instantiator/src/lib/meta-model-element-instantiator.ts @@ -93,7 +93,7 @@ export class MetaModelElementInstantiator { public namespaceCacheService?: NamespacesCacheService, public recursiveModelElements?: Map>, public notificationsService?: NotificationsService, - public translate?: LanguageTranslationService + public translate?: LanguageTranslationService, ) { this.samm = this.rdfModel.samm; this.sammC = this.rdfModel.sammC; @@ -119,7 +119,7 @@ export class MetaModelElementInstantiator { getProperties( subject: Quad_Subject, predicate: NamedNode, - parent?: DefaultAspect | DefaultEntity | DefaultOperation + parent?: DefaultAspect | DefaultEntity | DefaultOperation, ): Array { const properties: Array = []; this.rdfModel.store.getQuads(subject, predicate, null, null).forEach(propertyQuad => { @@ -458,7 +458,7 @@ export class MetaModelElementInstantiator { */ getExternalElement( quad: NamedNode | Quad_Object, - skipSetExternal = false + skipSetExternal = false, ): { externalRdfModel: RdfModel; externalReference: T; @@ -504,7 +504,7 @@ export class MetaModelElementInstantiator { getRdfModelByElement(quad: NamedNode | Quad_Object): RdfModel { return this.instantiatorService.rdfService.externalRdfModels.find( - (extRdfModel: RdfModel) => extRdfModel.store.getQuads(quad, null, null, null).length + (extRdfModel: RdfModel) => extRdfModel.store.getQuads(quad, null, null, null).length, ); } diff --git a/core/libs/loader-filters/src/lib/filters.service.ts b/core/libs/loader-filters/src/lib/filters.service.ts index 91701f28..583e9751 100644 --- a/core/libs/loader-filters/src/lib/filters.service.ts +++ b/core/libs/loader-filters/src/lib/filters.service.ts @@ -50,7 +50,7 @@ export class FiltersService { private injector: Injector, private loadingScreen: LoadingScreenService, private translate: LanguageTranslationService, - @Inject(FILTER_ATTRIBUTES) private filterAttributesService: FilterAttributesService + @Inject(FILTER_ATTRIBUTES) private filterAttributesService: FilterAttributesService, ) { window['_filter'] = this; this.selectDefaultFilter(); @@ -111,7 +111,7 @@ export class FiltersService { this.injector.get(MxGraphShapeOverlayService), namespaceCacheService, this.injector.get(SammLanguageSettingsService), - this.injector.get(ModelService).getLoadedAspectModel().rdfModel + this.injector.get(ModelService).getLoadedAspectModel().rdfModel, ); const currentFile = namespaceCacheService.currentCachedFile; @@ -134,7 +134,7 @@ export class FiltersService { if (selectedCell) mxGraphService.navigateToCellByUrn(selectedModelElement.aspectModelUrn); return editorService.validate(); - }) + }), ) .subscribe(() => { localStorage.removeItem('validating'); diff --git a/core/libs/loader-filters/src/lib/filters/default-filter.ts b/core/libs/loader-filters/src/lib/filters/default-filter.ts index a69456bb..3836ed65 100644 --- a/core/libs/loader-filters/src/lib/filters/default-filter.ts +++ b/core/libs/loader-filters/src/lib/filters/default-filter.ts @@ -113,12 +113,12 @@ export class DefaultFilter implements FilterLoader { return parent instanceof DefaultEntityInstance && !(element instanceof DefaultEntityInstance) ? EdgeStyles.entityValueEntityEdge : MxGraphHelper.isOptionalProperty(element as DefaultProperty, parent) - ? EdgeStyles.optionalPropertyEdge - : element instanceof DefaultAbstractProperty && parent instanceof DefaultProperty - ? EdgeStyles.abstractPropertyEdge - : abstractRelations[parent?.className]?.includes(element?.className) - ? EdgeStyles.abstractElementEdge - : EdgeStyles.defaultEdge; + ? EdgeStyles.optionalPropertyEdge + : element instanceof DefaultAbstractProperty && parent instanceof DefaultProperty + ? EdgeStyles.abstractPropertyEdge + : abstractRelations[parent?.className]?.includes(element?.className) + ? EdgeStyles.abstractElementEdge + : EdgeStyles.defaultEdge; } getShapeGeometry(element: BaseMetaModelElement): ShapeGeometry { diff --git a/core/libs/loader-filters/src/lib/filters/properties-filter.ts b/core/libs/loader-filters/src/lib/filters/properties-filter.ts index 8f3007a1..e4637e88 100644 --- a/core/libs/loader-filters/src/lib/filters/properties-filter.ts +++ b/core/libs/loader-filters/src/lib/filters/properties-filter.ts @@ -148,10 +148,10 @@ export class PropertiesFilterLoader implements FilterLoader { return element instanceof DefaultAspect ? 'aspect' : element instanceof DefaultProperty - ? 'property' - : element instanceof DefaultEntity - ? 'filteredProperties_entity' - : 'filteredProperties_either'; + ? 'property' + : element instanceof DefaultEntity + ? 'filteredProperties_entity' + : 'filteredProperties_either'; } hasOverlay(element?: BaseMetaModelElement): boolean { @@ -160,7 +160,7 @@ export class PropertiesFilterLoader implements FilterLoader { private generateEitherTree( element: DefaultEither, - parentNode: ModelTree + parentNode: ModelTree, ): [ModelTree, ModelTree] { return [ this.generateTree(element.left, {notAllowed: [DefaultEntity], parent: element, parentNode}), @@ -187,7 +187,7 @@ export class PropertiesFilterLoader implements FilterLoader { private isAllowed(element: BaseMetaModelElement, options: ModelTreeOptions = {}): boolean { return allowedElements.some( - allowedElement => element instanceof allowedElement && !(options.notAllowed || [])?.some(c => element instanceof c) + allowedElement => element instanceof allowedElement && !(options.notAllowed || [])?.some(c => element instanceof c), ); } diff --git a/core/libs/loader-filters/src/lib/models/filter-relations.ts b/core/libs/loader-filters/src/lib/models/filter-relations.ts index b9f714af..92b569e8 100644 --- a/core/libs/loader-filters/src/lib/models/filter-relations.ts +++ b/core/libs/loader-filters/src/lib/models/filter-relations.ts @@ -38,7 +38,7 @@ export class FilterRelation { public exceptInFilter: { [ModelFilter.DEFAULT]?: ClassReference[]; [ModelFilter.PROPERTIES]?: ClassReference[]; - } = {} + } = {}, ) { if (!this.exceptInFilter[ModelFilter.DEFAULT]) { this.exceptInFilter[ModelFilter.DEFAULT] = []; diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/base.ts b/core/libs/meta-model/src/lib/aspect-meta-model/base.ts index cd6350b4..1edbb668 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/base.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/base.ts @@ -56,7 +56,11 @@ export abstract class Base implements BaseMetaModelElement { abstract get className(): string; - protected constructor(public metaModelVersion: string, public aspectModelUrn: string, public name: string) { + protected constructor( + public metaModelVersion: string, + public aspectModelUrn: string, + public name: string, + ) { this.preferredNames = new Map(); this.descriptions = new Map(); diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-abstract-entity.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-abstract-entity.ts index 1575e2cc..98953392 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-abstract-entity.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-abstract-entity.ts @@ -38,7 +38,7 @@ export class DefaultAbstractEntity extends CanExtendsWithProperties implements E aspectModelUrn: string, name: string, public properties: OverWrittenProperty[] = [], - predefined = false + predefined = false, ) { super(metaModelVersion, aspectModelUrn, name); this.predefined = predefined; diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-abstract-property.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-abstract-property.ts index 9ed0eced..bfedb231 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-abstract-property.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-abstract-property.ts @@ -29,7 +29,13 @@ export class DefaultAbstractProperty extends CanExtend implements AbstractProper return 'DefaultAbstractProperty'; } - constructor(metaModelVersion: string, aspectModelUrn: string, name: string, public exampleValue?: any, predefined = false) { + constructor( + metaModelVersion: string, + aspectModelUrn: string, + name: string, + public exampleValue?: any, + predefined = false, + ) { super(metaModelVersion, aspectModelUrn, name); this.predefined = predefined; } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-aspect.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-aspect.ts index f82d22aa..92f2ebef 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-aspect.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-aspect.ts @@ -41,7 +41,7 @@ export class DefaultAspect extends Base implements Aspect { public properties: Array = [], public operations: Array = [], public events: Array = [], - public isCollectionAspect: boolean = false + public isCollectionAspect: boolean = false, ) { super(metaModelVersion, aspectModelUrn, name); } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-characteristic.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-characteristic.ts index 123273c9..19f734f5 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-characteristic.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-characteristic.ts @@ -32,7 +32,12 @@ export class DefaultCharacteristic extends Base implements Characteristic { return 'DefaultCharacteristic'; } - constructor(metaModelVersion: string, aspectModelUrn: string, name: string, public dataType?: Type) { + constructor( + metaModelVersion: string, + aspectModelUrn: string, + name: string, + public dataType?: Type, + ) { super(metaModelVersion, aspectModelUrn, name); } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-code.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-code.ts index 40812111..c49d2e95 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-code.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-code.ts @@ -23,7 +23,12 @@ export class DefaultCode extends DefaultCharacteristic { return 'DefaultCode'; } - constructor(metaModelVersion: string, aspectModelUrn: string, name: string, public dataType?: Type) { + constructor( + metaModelVersion: string, + aspectModelUrn: string, + name: string, + public dataType?: Type, + ) { super(metaModelVersion, aspectModelUrn, name, dataType); } } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-collection.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-collection.ts index 6994cc28..f0223f35 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-collection.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-collection.ts @@ -33,7 +33,7 @@ export class DefaultCollection extends DefaultCharacteristic implements Collecti aspectModelUrn: string, name: string, public elementCharacteristic?: Characteristic, - dataType?: Type + dataType?: Type, ) { super(metaModelVersion, aspectModelUrn, name, dataType); } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-duration.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-duration.ts index faf04a99..3159e675 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-duration.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-duration.ts @@ -23,7 +23,13 @@ export class DefaultDuration extends DefaultQuantifiable { return 'DefaultDuration'; } - constructor(metaModelVersion: string, aspectModelUrn: string, name: string, dataType?: Type, public unit?: Unit) { + constructor( + metaModelVersion: string, + aspectModelUrn: string, + name: string, + dataType?: Type, + public unit?: Unit, + ) { super(metaModelVersion, aspectModelUrn, name, dataType); } } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-either.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-either.ts index 3a281ba5..1c17b582 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-either.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-either.ts @@ -27,7 +27,13 @@ export class DefaultEither extends DefaultCharacteristic implements Either { return 'DefaultEither'; } - constructor(metaModelVersion: string, aspectModelUrn: string, name: string, public left: Characteristic, public right: Characteristic) { + constructor( + metaModelVersion: string, + aspectModelUrn: string, + name: string, + public left: Characteristic, + public right: Characteristic, + ) { super(metaModelVersion, aspectModelUrn, name); } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-encoding-constraint.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-encoding-constraint.ts index 368c0b08..578b8318 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-encoding-constraint.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-encoding-constraint.ts @@ -25,7 +25,12 @@ export class DefaultEncodingConstraint extends DefaultConstraint implements Enco return 'DefaultEncodingConstraint'; } - constructor(metaModelVersion: string, aspectModelUrn: string, name: string, public value: string) { + constructor( + metaModelVersion: string, + aspectModelUrn: string, + name: string, + public value: string, + ) { super(metaModelVersion, aspectModelUrn, name); } } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-entity-instance.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-entity-instance.ts index 2a304aa7..0cc2c887 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-entity-instance.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-entity-instance.ts @@ -48,7 +48,7 @@ export class DefaultEntityInstance extends Base implements EntityInstance { public name: string, public aspectModelUrn: string, public entity: DefaultEntity, - properties?: OverWrittenProperty[] + properties?: OverWrittenProperty[], ) { super(metaModelVersion, aspectModelUrn, name); this.properties = properties?.map(key => ({key, value: ''})) || []; diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-entity.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-entity.ts index 3f9ec4ad..215bf815 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-entity.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-entity.ts @@ -37,7 +37,7 @@ export class DefaultEntity extends CanExtendsWithProperties implements Entity { aspectModelUrn: string, name: string, public properties: OverWrittenProperty[] = [], - predefined = false + predefined = false, ) { super(metaModelVersion, aspectModelUrn, name); this.predefined = predefined; diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-enumeration.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-enumeration.ts index 313fdd43..007dbf65 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-enumeration.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-enumeration.ts @@ -36,7 +36,7 @@ export class DefaultEnumeration extends DefaultCharacteristic implements Enumera aspectModelUrn: string, name: string, public values: Array, - dataType?: Type + dataType?: Type, ) { super(metaModelVersion, aspectModelUrn, name, dataType); } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-event.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-event.ts index e15db5c3..ed8e71b2 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-event.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-event.ts @@ -28,13 +28,18 @@ export class DefaultEvent extends Base implements Event { return 'DefaultEvent'; } - constructor(metaModelVersion: string, aspectModelUrn: string, name: string, public parameters: Array = []) { + constructor( + metaModelVersion: string, + aspectModelUrn: string, + name: string, + public parameters: Array = [], + ) { super(metaModelVersion, aspectModelUrn, name); } delete(baseMetalModelElement: BaseMetaModelElement) { this.parameters = this.parameters.filter( - overwrittenProperty => overwrittenProperty.property.aspectModelUrn !== baseMetalModelElement.aspectModelUrn + overwrittenProperty => overwrittenProperty.property.aspectModelUrn !== baseMetalModelElement.aspectModelUrn, ); } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-fixed-point-constraint.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-fixed-point-constraint.ts index 169a7579..6c60b07b 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-fixed-point-constraint.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-fixed-point-constraint.ts @@ -26,7 +26,13 @@ export class DefaultFixedPointConstraint extends DefaultConstraint implements Fi return 'DefaultFixedPointConstraint'; } - constructor(metaModelVersion: string, aspectModelUrn: string, name: string, public scale: number, public integer: number) { + constructor( + metaModelVersion: string, + aspectModelUrn: string, + name: string, + public scale: number, + public integer: number, + ) { super(metaModelVersion, aspectModelUrn, name); } } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-language-constraint.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-language-constraint.ts index 7fcdfa6c..375f02fe 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-language-constraint.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-language-constraint.ts @@ -26,7 +26,12 @@ export class DefaultLanguageConstraint extends DefaultConstraint implements Lang return 'DefaultLanguageConstraint'; } - constructor(metaModelVersion: string, aspectModelUrn: string, name: string, public languageCode: string) { + constructor( + metaModelVersion: string, + aspectModelUrn: string, + name: string, + public languageCode: string, + ) { super(metaModelVersion, aspectModelUrn, name); } } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-length-constraint.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-length-constraint.ts index c9d92d08..1f0f953f 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-length-constraint.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-length-constraint.ts @@ -27,7 +27,13 @@ export class DefaultLengthConstraint extends DefaultConstraint implements Length return 'DefaultLengthConstraint'; } - constructor(metaModelVersion: string, aspectModelUrn: string, name: string, public minValue?: number, public maxValue?: number) { + constructor( + metaModelVersion: string, + aspectModelUrn: string, + name: string, + public minValue?: number, + public maxValue?: number, + ) { super(metaModelVersion, aspectModelUrn, name); } } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-list.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-list.ts index a8c5c01b..5620b789 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-list.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-list.ts @@ -28,7 +28,7 @@ export class DefaultList extends DefaultCollection { aspectModelUrn: string, name: string, public elementCharacteristic?: Characteristic, - dataType?: Type + dataType?: Type, ) { super(metaModelVersion, aspectModelUrn, name, elementCharacteristic, dataType); } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-locale-constraint.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-locale-constraint.ts index 7a7af44b..162a1448 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-locale-constraint.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-locale-constraint.ts @@ -26,7 +26,12 @@ export class DefaultLocaleConstraint extends DefaultConstraint implements Locale return 'DefaultLocaleConstraint'; } - constructor(metaModelVersion: string, aspectModelUrn: string, name: string, public localeCode: string) { + constructor( + metaModelVersion: string, + aspectModelUrn: string, + name: string, + public localeCode: string, + ) { super(metaModelVersion, aspectModelUrn, name); } } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-operation.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-operation.ts index 9f8d5dea..868be4fe 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-operation.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-operation.ts @@ -33,7 +33,7 @@ export class DefaultOperation extends Base implements Operation { aspectModelUrn: string, name: string, public input: Array = [], - public output?: OverWrittenProperty + public output?: OverWrittenProperty, ) { super(metaModelVersion, aspectModelUrn, name); } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-property.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-property.ts index 60591d9e..10031964 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-property.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-property.ts @@ -42,7 +42,7 @@ export class DefaultProperty extends CanExtend implements Property { name: string, public characteristic: Characteristic, predefined = false, - public exampleValue?: any + public exampleValue?: any, ) { super(metaModelVersion, aspectModelUrn, name); this.predefined = predefined; diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-quantifiable.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-quantifiable.ts index a403bb71..e6a67e25 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-quantifiable.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-quantifiable.ts @@ -29,7 +29,13 @@ export class DefaultQuantifiable extends DefaultCharacteristic implements Quanti return 'DefaultQuantifiable'; } - constructor(metaModelVersion: string, aspectModelUrn: string, name: string, dataType?: Type, public unit?: Unit) { + constructor( + metaModelVersion: string, + aspectModelUrn: string, + name: string, + dataType?: Type, + public unit?: Unit, + ) { super(metaModelVersion, aspectModelUrn, name, dataType); } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-quantity-kind.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-quantity-kind.ts index 04b669ac..d9023204 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-quantity-kind.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-quantity-kind.ts @@ -22,7 +22,12 @@ export class DefaultQuantityKind extends Base implements QuantityKind { return 'DefaultQuantityKind'; } - constructor(metaModelVersion: string, aspectModelUrn: string, name: string, public label: string) { + constructor( + metaModelVersion: string, + aspectModelUrn: string, + name: string, + public label: string, + ) { super(metaModelVersion, aspectModelUrn, name); } } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-range-constraint.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-range-constraint.ts index ef48efc4..8dcacc98 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-range-constraint.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-range-constraint.ts @@ -35,7 +35,7 @@ export class DefaultRangeConstraint extends DefaultConstraint implements RangeCo public upperBoundDefinition: BoundDefinition, public lowerBoundDefinition: BoundDefinition, public minValue?: any, - public maxValue?: any + public maxValue?: any, ) { super(metaModelVersion, aspectModelUrn, name); } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-regular-expression-constraint.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-regular-expression-constraint.ts index d10e0fd1..cf39b2c5 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-regular-expression-constraint.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-regular-expression-constraint.ts @@ -26,7 +26,12 @@ export class DefaultRegularExpressionConstraint extends DefaultConstraint implem return 'DefaultRegularExpressionConstraint'; } - constructor(metaModelVersion: string, aspectModelUrn: string, name: string, public value: string) { + constructor( + metaModelVersion: string, + aspectModelUrn: string, + name: string, + public value: string, + ) { super(metaModelVersion, aspectModelUrn, name); } } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-set.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-set.ts index 112a2982..90f928b6 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-set.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-set.ts @@ -28,7 +28,7 @@ export class DefaultSet extends DefaultCollection { aspectModelUrn: string, name: string, public elementCharacteristic?: Characteristic, - dataType?: Type + dataType?: Type, ) { super(metaModelVersion, aspectModelUrn, name, elementCharacteristic, dataType); } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-sorted-set.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-sorted-set.ts index aa3f3c12..30e51ab9 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-sorted-set.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-sorted-set.ts @@ -28,7 +28,7 @@ export class DefaultSortedSet extends DefaultCollection { aspectModelUrn: string, name: string, public elementCharacteristic?: Characteristic, - dataType?: Type + dataType?: Type, ) { super(metaModelVersion, aspectModelUrn, name, elementCharacteristic, dataType); } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-state.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-state.ts index 31d79053..55925ad6 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-state.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-state.ts @@ -33,7 +33,7 @@ export class DefaultState extends DefaultEnumeration implements State { name: string, values: Array, public defaultValue: DefaultEntityInstance | string | number, - dataType?: Type + dataType?: Type, ) { super(metaModelVersion, aspectModelUrn, name, values, dataType); } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-structured-value.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-structured-value.ts index 307d8208..9666cd75 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-structured-value.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-structured-value.ts @@ -55,7 +55,7 @@ export class DefaultStructuredValue extends DefaultCharacteristic implements Str name: string, public deconstructionRule: string, public elements: Array, - dataType?: Type + dataType?: Type, ) { super(metaModelVersion, aspectModelUrn, name, dataType); } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-timeseries.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-timeseries.ts index b1f46c77..2da7ed6e 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-timeseries.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-timeseries.ts @@ -29,7 +29,7 @@ export class DefaultTimeSeries extends DefaultSortedSet { aspectModelUrn: string, name: string, public elementCharacteristic?: Characteristic, - dataType?: Type + dataType?: Type, ) { super(metaModelVersion, aspectModelUrn, name, elementCharacteristic, dataType); } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-trait.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-trait.ts index 449c10a6..891b4f46 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-trait.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-trait.ts @@ -33,7 +33,7 @@ export class DefaultTrait extends DefaultCharacteristic implements Trait { aspectModelUrn: string, name: string, public baseCharacteristic?: Characteristic, - public constraints?: Array + public constraints?: Array, ) { super(metaModelVersion, aspectModelUrn, name); } diff --git a/core/libs/meta-model/src/lib/aspect-meta-model/default-unit.ts b/core/libs/meta-model/src/lib/aspect-meta-model/default-unit.ts index 7a2aa0ea..938ea88d 100644 --- a/core/libs/meta-model/src/lib/aspect-meta-model/default-unit.ts +++ b/core/libs/meta-model/src/lib/aspect-meta-model/default-unit.ts @@ -43,7 +43,7 @@ export class DefaultUnit extends Base implements Unit { public referenceUnit?: Unit, public conversionFactor?: string, public numericConversionFactor?: string, - public quantityKinds: Array = [] + public quantityKinds: Array = [], ) { super(metaModelVersion, aspectModelUrn, name); } diff --git a/core/libs/meta-model/src/lib/element-service/abstract-entity-model.service.ts b/core/libs/meta-model/src/lib/element-service/abstract-entity-model.service.ts index 1f2be029..98f2a459 100644 --- a/core/libs/meta-model/src/lib/element-service/abstract-entity-model.service.ts +++ b/core/libs/meta-model/src/lib/element-service/abstract-entity-model.service.ts @@ -45,7 +45,7 @@ export class AbstractEntityModelService extends BaseModelService { private mxGraphAttributeService: MxGraphAttributeService, private abstractEntityRenderer: AbstractEntityRenderService, private baseEntityModel: BaseEntityModelService, - private languageService: SammLanguageSettingsService + private languageService: SammLanguageSettingsService, ) { super(); } diff --git a/core/libs/meta-model/src/lib/element-service/abstract-property-model.service.ts b/core/libs/meta-model/src/lib/element-service/abstract-property-model.service.ts index 5e0d00fd..6bc89be1 100644 --- a/core/libs/meta-model/src/lib/element-service/abstract-property-model.service.ts +++ b/core/libs/meta-model/src/lib/element-service/abstract-property-model.service.ts @@ -25,7 +25,7 @@ export class AbstractPropertyModelService extends BaseModelService { private mxGraphService: MxGraphService, private abstractPropertyRenderer: AbstractPropertyRenderService, private mxGraphAttributeService: MxGraphAttributeService, - private languageService: SammLanguageSettingsService + private languageService: SammLanguageSettingsService, ) { super(); } diff --git a/core/libs/meta-model/src/lib/element-service/aspect-model.service.ts b/core/libs/meta-model/src/lib/element-service/aspect-model.service.ts index 16506276..fd2df378 100644 --- a/core/libs/meta-model/src/lib/element-service/aspect-model.service.ts +++ b/core/libs/meta-model/src/lib/element-service/aspect-model.service.ts @@ -25,7 +25,7 @@ export class AspectModelService extends BaseModelService { private aspectRenderer: AspectRenderService, private titleService: TitleService, private mxGraphService: MxGraphService, - private sidebarStateService: SidebarStateService + private sidebarStateService: SidebarStateService, ) { super(); } diff --git a/core/libs/meta-model/src/lib/element-service/base-entity-model.service.ts b/core/libs/meta-model/src/lib/element-service/base-entity-model.service.ts index 0a4a84d9..51787523 100644 --- a/core/libs/meta-model/src/lib/element-service/base-entity-model.service.ts +++ b/core/libs/meta-model/src/lib/element-service/base-entity-model.service.ts @@ -26,7 +26,7 @@ export class BaseEntityModelService { private mxGraphService: MxGraphService, private notificationService: NotificationsService, private shapeConnectorService: ShapeConnectorService, - private translate: LanguageTranslationService + private translate: LanguageTranslationService, ) {} checkExtendedElement(metaModelElement: CanExtend, extendedElement: CanExtend) { @@ -50,7 +50,7 @@ export class BaseEntityModelService { metaModelElement, extendedElement, this.mxGraphService.resolveCellByModelElement(metaModelElement), - resolvedCell + resolvedCell, ); } diff --git a/core/libs/meta-model/src/lib/element-service/characteristic-model.service.ts b/core/libs/meta-model/src/lib/element-service/characteristic-model.service.ts index 9c017b73..652d062d 100644 --- a/core/libs/meta-model/src/lib/element-service/characteristic-model.service.ts +++ b/core/libs/meta-model/src/lib/element-service/characteristic-model.service.ts @@ -48,7 +48,7 @@ export class CharacteristicModelService extends BaseModelService { private mxGraphService: MxGraphService, private characteristicRenderer: CharacteristicRenderService, private enumerationRenderer: EnumerationRenderService, - private filtersService: FiltersService + private filtersService: FiltersService, ) { super(); } @@ -228,7 +228,7 @@ export class CharacteristicModelService extends BaseModelService { private handleQuantifiableUnit( metaModelElement: DefaultQuantifiable, form: {[key: string]: any}, - originalModelElement?: DefaultQuantifiable + originalModelElement?: DefaultQuantifiable, ) { if (metaModelElement.unit) { if ( diff --git a/core/libs/meta-model/src/lib/element-service/constraint-model.service.ts b/core/libs/meta-model/src/lib/element-service/constraint-model.service.ts index b61c84fa..e817a71b 100644 --- a/core/libs/meta-model/src/lib/element-service/constraint-model.service.ts +++ b/core/libs/meta-model/src/lib/element-service/constraint-model.service.ts @@ -34,7 +34,7 @@ export class ConstraintModelService extends BaseModelService { private mxGraphAttributeService: MxGraphAttributeService, private mxGraphService: MxGraphService, private constraintRenderer: ConstraintRenderService, - private filtersService: FiltersService + private filtersService: FiltersService, ) { super(); } diff --git a/core/libs/meta-model/src/lib/element-service/element-model.service.ts b/core/libs/meta-model/src/lib/element-service/element-model.service.ts index 6c286e26..144cf43a 100644 --- a/core/libs/meta-model/src/lib/element-service/element-model.service.ts +++ b/core/libs/meta-model/src/lib/element-service/element-model.service.ts @@ -47,7 +47,7 @@ export class ElementModelService { private renameModelService: RenameModelDialogService, private notificationService: NotificationsService, private translate: LanguageTranslationService, - private zone: NgZone + private zone: NgZone, ) {} get currentCachedFile() { @@ -239,7 +239,7 @@ export class ElementModelService { source.extendedElement = null; edge.source['configuration'].fields = MxGraphVisitorHelper.getElementProperties( MxGraphHelper.getModelElement(edge.source), - this.sammLangService + this.sammLangService, ); this.mxGraphService.graph.labelChanged(edge.source, MxGraphHelper.createPropertiesLabel(edge.source)); this.removeConnectionBetweenElements(edge, source, target); @@ -301,7 +301,7 @@ export class ElementModelService { private decoupleEnumerationFromEntityValue( sourceModelElement: BaseMetaModelElement, targetModelElement: BaseMetaModelElement, - edge: mxgraph.mxCell + edge: mxgraph.mxCell, ): void { if (sourceModelElement instanceof DefaultEnumeration && targetModelElement instanceof DefaultEntityInstance) { const entityValueIndex = sourceModelElement.values.indexOf(targetModelElement); diff --git a/core/libs/meta-model/src/lib/element-service/entity-model.service.ts b/core/libs/meta-model/src/lib/element-service/entity-model.service.ts index e8b0df9f..09869fab 100644 --- a/core/libs/meta-model/src/lib/element-service/entity-model.service.ts +++ b/core/libs/meta-model/src/lib/element-service/entity-model.service.ts @@ -43,7 +43,7 @@ export class EntityModelService extends BaseModelService { private mxGraphAttributeService: MxGraphAttributeService, private entityRenderer: EntityRenderService, private languageService: SammLanguageSettingsService, - private baseEntityModel: BaseEntityModelService + private baseEntityModel: BaseEntityModelService, ) { super(); } diff --git a/core/libs/meta-model/src/lib/element-service/entity-value-model.service.ts b/core/libs/meta-model/src/lib/element-service/entity-value-model.service.ts index ffac1760..b8967ae4 100644 --- a/core/libs/meta-model/src/lib/element-service/entity-value-model.service.ts +++ b/core/libs/meta-model/src/lib/element-service/entity-value-model.service.ts @@ -82,7 +82,7 @@ export class EntityValueModelService extends BaseModelService { private findPropertyInEntities( entities: Array, - propertyName: string + propertyName: string, ): OverWrittenProperty { for (const entity of entities) { const property = entity.properties.find(prop => prop.property.name === propertyName); diff --git a/core/libs/meta-model/src/lib/element-service/event-model.service.ts b/core/libs/meta-model/src/lib/element-service/event-model.service.ts index e28d2719..c37edd3b 100644 --- a/core/libs/meta-model/src/lib/element-service/event-model.service.ts +++ b/core/libs/meta-model/src/lib/element-service/event-model.service.ts @@ -19,7 +19,10 @@ import {EventRenderService, MxGraphService} from '@ame/mx-graph'; @Injectable({providedIn: 'root'}) export class EventModelService extends BaseModelService { - constructor(private mxGraphService: MxGraphService, private aspectRenderer: EventRenderService) { + constructor( + private mxGraphService: MxGraphService, + private aspectRenderer: EventRenderService, + ) { super(); } diff --git a/core/libs/meta-model/src/lib/element-service/operation-model.service.ts b/core/libs/meta-model/src/lib/element-service/operation-model.service.ts index 7ee00811..f96779e9 100644 --- a/core/libs/meta-model/src/lib/element-service/operation-model.service.ts +++ b/core/libs/meta-model/src/lib/element-service/operation-model.service.ts @@ -27,7 +27,7 @@ export class OperationModelService extends BaseModelService { private mxGraphAttributeService: MxGraphAttributeService, private shapeConnectorService: ShapeConnectorService, private mxGraphService: MxGraphService, - private operationRender: OperationRenderService + private operationRender: OperationRenderService, ) { super(); } diff --git a/core/libs/meta-model/src/lib/element-service/predefined-elements/file-resource-remove.service.ts b/core/libs/meta-model/src/lib/element-service/predefined-elements/file-resource-remove.service.ts index 12a1c003..fdc76e51 100644 --- a/core/libs/meta-model/src/lib/element-service/predefined-elements/file-resource-remove.service.ts +++ b/core/libs/meta-model/src/lib/element-service/predefined-elements/file-resource-remove.service.ts @@ -22,7 +22,10 @@ import {PredefinedEntities, PredefinedProperties} from '@ame/vocabulary'; providedIn: 'root', }) export class FileResourceRemoveService implements PredefinedRemove { - constructor(private modelRootService: ModelRootService, private mxGraphService: MxGraphService) {} + constructor( + private modelRootService: ModelRootService, + private mxGraphService: MxGraphService, + ) {} delete(cell: mxgraph.mxCell): boolean { if (!cell) { diff --git a/core/libs/meta-model/src/lib/element-service/predefined-elements/point3d-remove.service.ts b/core/libs/meta-model/src/lib/element-service/predefined-elements/point3d-remove.service.ts index 99c4997c..1c8d25cd 100644 --- a/core/libs/meta-model/src/lib/element-service/predefined-elements/point3d-remove.service.ts +++ b/core/libs/meta-model/src/lib/element-service/predefined-elements/point3d-remove.service.ts @@ -22,7 +22,10 @@ import {PredefinedRemove} from './predefined-remove.type'; providedIn: 'root', }) export class Point3dRemoveService implements PredefinedRemove { - constructor(private modelRootService: ModelRootService, private mxGraphService: MxGraphService) {} + constructor( + private modelRootService: ModelRootService, + private mxGraphService: MxGraphService, + ) {} delete(cell: mxgraph.mxCell): boolean { const modelElement = MxGraphHelper.getModelElement(cell); diff --git a/core/libs/meta-model/src/lib/element-service/predefined-elements/timeseries-entity-remove.service.ts b/core/libs/meta-model/src/lib/element-service/predefined-elements/timeseries-entity-remove.service.ts index 0136b404..34f25ff3 100644 --- a/core/libs/meta-model/src/lib/element-service/predefined-elements/timeseries-entity-remove.service.ts +++ b/core/libs/meta-model/src/lib/element-service/predefined-elements/timeseries-entity-remove.service.ts @@ -22,7 +22,10 @@ import {PredefinedRemove} from './predefined-remove.type'; providedIn: 'root', }) export class TimeSeriesEntityRemoveService implements PredefinedRemove { - constructor(private mxGraphService: MxGraphService, private modelRootService: ModelRootService) {} + constructor( + private mxGraphService: MxGraphService, + private modelRootService: ModelRootService, + ) {} public delete(cell: mxgraph.mxCell) { const modelElement = MxGraphHelper.getModelElement(cell); diff --git a/core/libs/meta-model/src/lib/element-service/property-model.service.ts b/core/libs/meta-model/src/lib/element-service/property-model.service.ts index 37a13d1e..36b2936f 100644 --- a/core/libs/meta-model/src/lib/element-service/property-model.service.ts +++ b/core/libs/meta-model/src/lib/element-service/property-model.service.ts @@ -27,7 +27,7 @@ export class PropertyModelService extends BaseModelService { private mxGraphService: MxGraphService, private sammLangService: SammLanguageSettingsService, private propertyRenderer: PropertyRenderService, - private mxGraphAttributeService: MxGraphAttributeService + private mxGraphAttributeService: MxGraphAttributeService, ) { super(); } diff --git a/core/libs/meta-model/src/lib/element-service/quantifiable-model.service.ts b/core/libs/meta-model/src/lib/element-service/quantifiable-model.service.ts index 2e5a1d8d..16ac93be 100644 --- a/core/libs/meta-model/src/lib/element-service/quantifiable-model.service.ts +++ b/core/libs/meta-model/src/lib/element-service/quantifiable-model.service.ts @@ -21,7 +21,7 @@ export class QuantifiableModelService extends BaseModelService { constructor( private mxGraphShapeOverlayService: MxGraphShapeOverlayService, private mxGraphAttributeService: MxGraphAttributeService, - private mxGraphService: MxGraphService + private mxGraphService: MxGraphService, ) { super(); } diff --git a/core/libs/meta-model/src/lib/element-service/trait-model.service.ts b/core/libs/meta-model/src/lib/element-service/trait-model.service.ts index 0248fc5c..a97868f1 100644 --- a/core/libs/meta-model/src/lib/element-service/trait-model.service.ts +++ b/core/libs/meta-model/src/lib/element-service/trait-model.service.ts @@ -38,7 +38,7 @@ export class TraitModelService extends BaseModelService { private mxGraphShapeOverlayService: MxGraphShapeOverlayService, private mxGraphService: MxGraphService, private shapeConnectorService: ShapeConnectorService, - private traitRendererService: TraitRenderService + private traitRendererService: TraitRenderService, ) { super(); } diff --git a/core/libs/meta-model/src/lib/element-service/unit-model.service.ts b/core/libs/meta-model/src/lib/element-service/unit-model.service.ts index fc5f2ea0..fa46d5c3 100644 --- a/core/libs/meta-model/src/lib/element-service/unit-model.service.ts +++ b/core/libs/meta-model/src/lib/element-service/unit-model.service.ts @@ -31,7 +31,7 @@ export class UnitModelService extends BaseModelService { private mxGraphShapeOverlayService: MxGraphShapeOverlayService, private mxGraphAttributeService: MxGraphAttributeService, private mxGraphService: MxGraphService, - private unitRenderer: UnitRenderService + private unitRenderer: UnitRenderService, ) { super(); } diff --git a/core/libs/meta-model/src/lib/services/model-element-naming.service.ts b/core/libs/meta-model/src/lib/services/model-element-naming.service.ts index 690c7ce7..37835bf6 100644 --- a/core/libs/meta-model/src/lib/services/model-element-naming.service.ts +++ b/core/libs/meta-model/src/lib/services/model-element-naming.service.ts @@ -20,7 +20,10 @@ import {RdfService} from '@ame/rdf/services'; providedIn: 'root', }) export class ModelElementNamingService { - constructor(private namespacesCacheService: NamespacesCacheService, private rdfService: RdfService) {} + constructor( + private namespacesCacheService: NamespacesCacheService, + private rdfService: RdfService, + ) {} /** * Creates a new instance of the element and assigns it a default name * diff --git a/core/libs/migrator/src/lib/components/loading-migrating/loading-migrating.component.ts b/core/libs/migrator/src/lib/components/loading-migrating/loading-migrating.component.ts index f37a21a7..c609c6b8 100644 --- a/core/libs/migrator/src/lib/components/loading-migrating/loading-migrating.component.ts +++ b/core/libs/migrator/src/lib/components/loading-migrating/loading-migrating.component.ts @@ -22,7 +22,11 @@ import {catchError, of} from 'rxjs'; styleUrls: ['./loading-migrating.component.scss'], }) export class LoadingMigratingComponent implements OnInit { - constructor(private migratorApiService: MigratorApiService, private router: Router, private ngZone: NgZone) {} + constructor( + private migratorApiService: MigratorApiService, + private router: Router, + private ngZone: NgZone, + ) {} ngOnInit(): void { this.migratorApiService diff --git a/core/libs/migrator/src/lib/components/migration-status/migration-status.component.ts b/core/libs/migrator/src/lib/components/migration-status/migration-status.component.ts index 2a62e6e0..5b1ba549 100644 --- a/core/libs/migrator/src/lib/components/migration-status/migration-status.component.ts +++ b/core/libs/migrator/src/lib/components/migration-status/migration-status.component.ts @@ -57,7 +57,7 @@ export class MigrationStatusComponent implements OnInit { private editorService: EditorService, private router: Router, private ngZone: NgZone, - @Inject(APP_CONFIG) public config: AppConfig + @Inject(APP_CONFIG) public config: AppConfig, ) {} ngOnInit(): void { @@ -96,7 +96,7 @@ export class MigrationStatusComponent implements OnInit { ]; } else { this.filteredErrorFiles[status.namespace].push( - this.createErrorFileItem(fileStatus.name, fileStatus.message, status.namespace, rdfModels) + this.createErrorFileItem(fileStatus.name, fileStatus.message, status.namespace, rdfModels), ); } continue; @@ -118,7 +118,7 @@ export class MigrationStatusComponent implements OnInit { ]; } else { this.filteredErrorFiles[status.namespace].push( - this.createErrorFileItem(fileStatus.name, fileStatus.message, status.namespace, rdfModels) + this.createErrorFileItem(fileStatus.name, fileStatus.message, status.namespace, rdfModels), ); } this.hasErrors = true; diff --git a/core/libs/migrator/src/lib/components/start-migrating/start-migrating.component.ts b/core/libs/migrator/src/lib/components/start-migrating/start-migrating.component.ts index c4c6f8d0..7ee79917 100644 --- a/core/libs/migrator/src/lib/components/start-migrating/start-migrating.component.ts +++ b/core/libs/migrator/src/lib/components/start-migrating/start-migrating.component.ts @@ -31,7 +31,7 @@ export class StartMigratingComponent { @Inject(APP_CONFIG) public config: AppConfig, private migratorApiService: MigratorApiService, private router: Router, - private ngZone: NgZone + private ngZone: NgZone, ) {} migrate() { diff --git a/core/libs/migrator/src/lib/components/version-migration/version-migration.component.ts b/core/libs/migrator/src/lib/components/version-migration/version-migration.component.ts index ebb50be8..7b6db003 100644 --- a/core/libs/migrator/src/lib/components/version-migration/version-migration.component.ts +++ b/core/libs/migrator/src/lib/components/version-migration/version-migration.component.ts @@ -50,7 +50,7 @@ export class VersionMigrationComponent implements OnInit { private editorService: EditorService, private logService: LogService, private router: Router, - private ngZone: NgZone + private ngZone: NgZone, ) {} ngOnInit(): void { @@ -61,7 +61,7 @@ export class VersionMigrationComponent implements OnInit { map(namespaces => this.prepareNamespaces(namespaces)), tap(namespaces => (this.namespaces = namespaces)), switchMap(() => this.rewriteStores()), - switchMap(modelsTobeDeleted => this.rewriteAndDeleteModels(modelsTobeDeleted)) + switchMap(modelsTobeDeleted => this.rewriteAndDeleteModels(modelsTobeDeleted)), ) .subscribe({ complete: () => this.navigateToMigrationSuccess(), @@ -82,8 +82,8 @@ export class VersionMigrationComponent implements OnInit { this.deleteModels(modelsTobeDeleted).subscribe({ complete: () => this.electronSignalsService.call('requestRefreshWorkspaces'), error: err => this.logService.logError('Error when deleting old Aspect Model to new version', err), - }) - ) + }), + ), ); } @@ -110,7 +110,8 @@ export class VersionMigrationComponent implements OnInit { for (const namespace in this.namespaces) { for (let i = 0; i < this.namespaces[namespace].length; i++) { const rdfModel = this.rdfService.externalRdfModels.find( - rdf => rdf.getPrefixes()[''].startsWith(`urn:samm:${namespace}`) && rdf.aspectModelFileName === this.namespaces[namespace][i].name + rdf => + rdf.getPrefixes()[''].startsWith(`urn:samm:${namespace}`) && rdf.aspectModelFileName === this.namespaces[namespace][i].name, ); const serializedUpdatedModel = this.rewriteStore(rdfModel, this.namespaces[namespace][i]); if (serializedUpdatedModel) { @@ -159,7 +160,7 @@ export class VersionMigrationComponent implements OnInit { rdfModel.store.addQuad( oldSubjectValue !== newSubjectValue ? DataFactory.namedNode(newSubjectValue) : subject, oldPredicateValue !== newPredicateValue ? DataFactory.namedNode(newPredicateValue) : predicate, - oldObjectValue !== newObjectValue ? DataFactory.namedNode(newObjectValue) : object + oldObjectValue !== newObjectValue ? DataFactory.namedNode(newObjectValue) : object, ); rdfModel.store.removeQuad(subject, predicate, object); diff --git a/core/libs/migrator/src/lib/migrator.service.ts b/core/libs/migrator/src/lib/migrator.service.ts index 35a83ead..7c89e77a 100644 --- a/core/libs/migrator/src/lib/migrator.service.ts +++ b/core/libs/migrator/src/lib/migrator.service.ts @@ -45,7 +45,7 @@ export class MigratorService { private router: Router, private migratorApi: MigratorApiService, private modelApiService: ModelApiService, - private notificationsService: NotificationsService + private notificationsService: NotificationsService, ) {} public startMigrating() { @@ -60,9 +60,9 @@ export class MigratorService { this.router.navigate([{outlets: {migrator: null}}]); } return dialog$; - }) - ) - ) + }), + ), + ), ); } @@ -91,7 +91,7 @@ export class MigratorService { } return of(dialog$); }), - catchError(() => of(dialog$)) + catchError(() => of(dialog$)), ); } @@ -134,7 +134,7 @@ export class MigratorService { tap(() => { this._dialog = null; this.router.navigate([{outlets: {migrator: null}}]); - }) + }), ); } } diff --git a/core/libs/mx-graph/src/lib/helpers/mx-graph-helper.ts b/core/libs/mx-graph/src/lib/helpers/mx-graph-helper.ts index d83f14aa..9ac82fce 100644 --- a/core/libs/mx-graph/src/lib/helpers/mx-graph-helper.ts +++ b/core/libs/mx-graph/src/lib/helpers/mx-graph-helper.ts @@ -144,7 +144,7 @@ export class MxGraphHelper { .some(firstEdge => graph .getIncomingEdges(firstEdge.source) - .some(secondEdge => MxGraphHelper.getModelElement(secondEdge.source) instanceof DefaultStructuredValue) + .some(secondEdge => MxGraphHelper.getModelElement(secondEdge.source) instanceof DefaultStructuredValue), ); } diff --git a/core/libs/mx-graph/src/lib/helpers/mx-graph-visitor-helper.ts b/core/libs/mx-graph/src/lib/helpers/mx-graph-visitor-helper.ts index ac52f690..0a53c826 100644 --- a/core/libs/mx-graph/src/lib/helpers/mx-graph-visitor-helper.ts +++ b/core/libs/mx-graph/src/lib/helpers/mx-graph-visitor-helper.ts @@ -170,12 +170,12 @@ export class MxGraphVisitorHelper { if (metaModelElement.getSeeReferences()?.length > 0 || (metaModelElement as CanExtend)?.extendedSee?.length) { let extended = false; let elements = (metaModelElement.getSeeReferences() || []).map(e => - e.startsWith('urn:samm') && e.includes('#') ? e.split('#')[1] : e + e.startsWith('urn:samm') && e.includes('#') ? e.split('#')[1] : e, ); if (!elements.length) { elements = (metaModelElement as CanExtend)?.extendedSee.map(e => - e.startsWith('urn:samm') && e.includes('#') ? e.split('#')[1] : e + e.startsWith('urn:samm') && e.includes('#') ? e.split('#')[1] : e, ); extended = true; } diff --git a/core/libs/mx-graph/src/lib/renderers/mx-graph-renderer.ts b/core/libs/mx-graph/src/lib/renderers/mx-graph-renderer.ts index 8c2469e1..63463aad 100644 --- a/core/libs/mx-graph/src/lib/renderers/mx-graph-renderer.ts +++ b/core/libs/mx-graph/src/lib/renderers/mx-graph-renderer.ts @@ -51,7 +51,7 @@ export class MxGraphRenderer implements ModelRenderer { private mxGraphShapeOverlayService: MxGraphShapeOverlayService, private namespacesCacheService: NamespacesCacheService, private sammLangService: SammLanguageSettingsService, - private rdfModel: RdfModel + private rdfModel: RdfModel, ) { this.shapes = new Map(); } diff --git a/core/libs/mx-graph/src/lib/renderers/shape-language-remover.ts b/core/libs/mx-graph/src/lib/renderers/shape-language-remover.ts index 30e35fb5..4e32f696 100644 --- a/core/libs/mx-graph/src/lib/renderers/shape-language-remover.ts +++ b/core/libs/mx-graph/src/lib/renderers/shape-language-remover.ts @@ -22,7 +22,7 @@ export class ShapeLanguageRemover { private mxGraphService: MxGraphService, private mxGraphShapeSelectorService: MxGraphShapeSelectorService, private logService: LogService, - private mxGraphAttributeService: MxGraphAttributeService + private mxGraphAttributeService: MxGraphAttributeService, ) {} removeUnnecessaryLanguages(): BaseMetaModelElement { diff --git a/core/libs/mx-graph/src/lib/services/mx-graph-setup.service.ts b/core/libs/mx-graph/src/lib/services/mx-graph-setup.service.ts index 754c9644..f2a55b84 100644 --- a/core/libs/mx-graph/src/lib/services/mx-graph-setup.service.ts +++ b/core/libs/mx-graph/src/lib/services/mx-graph-setup.service.ts @@ -47,13 +47,13 @@ export class MxGraphSetupService { private mxGraphShapeSelectorService: MxGraphShapeSelectorService, private mxGraphAttributeService: MxGraphAttributeService, private translate: LanguageTranslationService, - private ngZone: NgZone + private ngZone: NgZone, ) {} setUp() { this.ngZone.runOutsideAngular(() => { const editor = (this.mxGraphAttributeService.editor = new mxEditor( - mxUtils.load(this.appConfig.editorConfiguration).getDocumentElement() + mxUtils.load(this.appConfig.editorConfiguration).getDocumentElement(), )); this.graph = this.mxGraphAttributeService.graph = (editor as any).graph; @@ -203,7 +203,7 @@ export class MxGraphSetupService { private getPagePadding() { return new mxPoint( Math.max(0, Math.round(this.graph.container.offsetWidth - 34)), - Math.max(0, Math.round(this.graph.container.offsetHeight - 34)) + Math.max(0, Math.round(this.graph.container.offsetHeight - 34)), ); } @@ -255,7 +255,7 @@ export class MxGraphSetupService { this.graph.view.scale * (this.graph.view.translate.x + layout.x * page.width), this.graph.view.scale * (this.graph.view.translate.y + layout.y * page.height), this.graph.view.scale * layout.width * page.width, - this.graph.view.scale * layout.height * page.height + this.graph.view.scale * layout.height * page.height, ); } @@ -349,7 +349,7 @@ export class MxGraphSetupService { this.resolveAssetsIcon(AssetsPath.OpenIcon), () => { this.bindingsService.fireAction('editElement'); - } + }, ); if (selectedCells.length === 2) { @@ -362,7 +362,7 @@ export class MxGraphSetupService { this.resolveAssetsIcon(AssetsPath.ConnectionOnIcon), () => { this.bindingsService.fireAction('connect-with'); - } + }, ); } diff --git a/core/libs/mx-graph/src/lib/services/mx-graph-shape-overlay.service.ts b/core/libs/mx-graph/src/lib/services/mx-graph-shape-overlay.service.ts index f3b9c93a..b845773d 100644 --- a/core/libs/mx-graph/src/lib/services/mx-graph-shape-overlay.service.ts +++ b/core/libs/mx-graph/src/lib/services/mx-graph-shape-overlay.service.ts @@ -50,7 +50,7 @@ export class MxGraphShapeOverlayService { private mxGraphAttributeService: MxGraphAttributeService, private filtersService: FiltersService, private sammLangService: SammLanguageSettingsService, - private injector: Injector + private injector: Injector, ) {} removeOverlay(cell: mxgraph.mxCell, overlay?: mxgraph.mxCellOverlay): void { @@ -91,8 +91,8 @@ export class MxGraphShapeOverlayService { baseMetaModelElement instanceof DefaultProperty && baseMetaModelElement.characteristic ? this.removeOverlay(cell, MxGraphHelper.getNewShapeOverlayButton(cell)) : baseMetaModelElement instanceof DefaultCharacteristic && !(baseMetaModelElement instanceof DefaultEither) - ? this.removeCharacteristicOverlays(cell) - : undefined; + ? this.removeCharacteristicOverlays(cell) + : undefined; } createIconShapeOverlay(svgFileName: string, tooltip: string): mxgraph.mxCellOverlay { @@ -176,7 +176,7 @@ export class MxGraphShapeOverlayService { ModelInfo.IS_EITHER_LEFT, -elementOffset, 'arrow-left-frame', - mxConstants.ALIGN_LEFT + mxConstants.ALIGN_LEFT, ); this.createConnectorElement( @@ -185,7 +185,7 @@ export class MxGraphShapeOverlayService { ModelInfo.IS_EITHER_RIGHT, elementOffset, 'arrow-right-frame', - mxConstants.ALIGN_RIGHT + mxConstants.ALIGN_RIGHT, ); return; @@ -198,7 +198,7 @@ export class MxGraphShapeOverlayService { ModelInfo.IS_OPERATION_INPUT, -elementOffset, 'arrow-up-frame', - mxConstants.ALIGN_LEFT + mxConstants.ALIGN_LEFT, ); this.createConnectorElement( @@ -207,7 +207,7 @@ export class MxGraphShapeOverlayService { ModelInfo.IS_OPERATION_OUTPUT, elementOffset, 'arrow-down-frame', - mxConstants.ALIGN_RIGHT + mxConstants.ALIGN_RIGHT, ); return; @@ -248,7 +248,7 @@ export class MxGraphShapeOverlayService { modelInfo: ModelInfo, offset = 0, svgFileName = 'add-frame', - align = mxConstants.ALIGN_CENTER + align = mxConstants.ALIGN_CENTER, ): void { const modelElement = MxGraphHelper.getModelElement(cell); if (!this.filtersService.currentFilter.hasOverlay(modelElement)) return; @@ -413,7 +413,7 @@ export class MxGraphShapeOverlayService { geometry.y, geometry.width, geometry.height, - node.shape.mxGraphStyle + node.shape.mxGraphStyle, ); const rdfService = this.injector.get(RdfService); diff --git a/core/libs/mx-graph/src/lib/services/mx-graph.service.ts b/core/libs/mx-graph/src/lib/services/mx-graph.service.ts index 62ce7fca..133b2e8a 100644 --- a/core/libs/mx-graph/src/lib/services/mx-graph.service.ts +++ b/core/libs/mx-graph/src/lib/services/mx-graph.service.ts @@ -62,7 +62,7 @@ export class MxGraphService { private mxGraphAttributeService: MxGraphAttributeService, private notificationsService: NotificationsService, private themeService: ThemeService, - public mxGraphShapeSelectorService: MxGraphShapeSelectorService + public mxGraphShapeSelectorService: MxGraphShapeSelectorService, ) { this.document = mxUtils.createXmlDocument(); if (!environment.production) { @@ -162,7 +162,7 @@ export class MxGraphService { const geometry = this.mxGraphGeometryProviderService.createGeometry( node, (configuration && configuration.geometry.x) || this.nextCellCoordinates?.x || 0, - (configuration && configuration.geometry.y) || this.nextCellCoordinates?.y || 0 + (configuration && configuration.geometry.y) || this.nextCellCoordinates?.y || 0, ); this.nextCellCoordinates = null; @@ -281,7 +281,7 @@ export class MxGraphService { for (const cell of cells) { this.graph.resizeCell( cell, - this.mxGraphGeometryProviderService.createGeometry(MxGraphHelper.getElementNode(cell), cell?.geometry?.x, cell?.geometry?.y) + this.mxGraphGeometryProviderService.createGeometry(MxGraphHelper.getElementNode(cell), cell?.geometry?.x, cell?.geometry?.y), ); const modelElement = MxGraphHelper.getModelElement(cell); if (MxGraphHelper.isComplexEnumeration(modelElement)) { @@ -540,7 +540,7 @@ export class MxGraphService { entityValueToUpdate.value.aspectModelUrn === deletedEntityValue.aspectModelUrn ) entityValueToUpdate.value = ''; - }) + }), ); } @@ -553,7 +553,7 @@ export class MxGraphService { deletedEntityValueCells .filter(entityValueCell => entityValueCell.isVertex()) .forEach(entityValueCell => - this.updateEntityValuesWithReference(MxGraphHelper.getModelElement(entityValueCell)) + this.updateEntityValuesWithReference(MxGraphHelper.getModelElement(entityValueCell)), ); } diff --git a/core/libs/mx-graph/src/lib/services/render-models/abstract-entity-render.service.ts b/core/libs/mx-graph/src/lib/services/render-models/abstract-entity-render.service.ts index aa8dd2da..8451ab25 100644 --- a/core/libs/mx-graph/src/lib/services/render-models/abstract-entity-render.service.ts +++ b/core/libs/mx-graph/src/lib/services/render-models/abstract-entity-render.service.ts @@ -29,7 +29,7 @@ export class AbstractEntityRenderService extends BaseRenderService { mxGraphService: MxGraphService, sammLangService: SammLanguageSettingsService, rdfService: RdfService, - private baseEntityRenderer: BaseEntityRendererService + private baseEntityRenderer: BaseEntityRendererService, ) { super(mxGraphService, sammLangService, rdfService); } diff --git a/core/libs/mx-graph/src/lib/services/render-models/abstract-property-render.service.ts b/core/libs/mx-graph/src/lib/services/render-models/abstract-property-render.service.ts index a7318235..73badf85 100644 --- a/core/libs/mx-graph/src/lib/services/render-models/abstract-property-render.service.ts +++ b/core/libs/mx-graph/src/lib/services/render-models/abstract-property-render.service.ts @@ -35,7 +35,7 @@ export class AbstractPropertyRenderService extends BaseRenderService { sammLangService: SammLanguageSettingsService, rdfService: RdfService, private namespacesCacheService: NamespacesCacheService, - private shapeConnectorService: ShapeConnectorService + private shapeConnectorService: ShapeConnectorService, ) { super(mxGraphService, sammLangService, rdfService); } diff --git a/core/libs/mx-graph/src/lib/services/render-models/base-entity-renderer.service.ts b/core/libs/mx-graph/src/lib/services/render-models/base-entity-renderer.service.ts index e17203f3..5e7c89f9 100644 --- a/core/libs/mx-graph/src/lib/services/render-models/base-entity-renderer.service.ts +++ b/core/libs/mx-graph/src/lib/services/render-models/base-entity-renderer.service.ts @@ -37,7 +37,7 @@ export class BaseEntityRendererService { private namespacesCacheService: NamespacesCacheService, private shapeConnectorService: ShapeConnectorService, private mxGraphShapeOverlayService: MxGraphShapeOverlayService, - private rdfService: RdfService + private rdfService: RdfService, ) {} public handleExtendsElement(cell: mxgraph.mxCell) { @@ -66,7 +66,7 @@ export class BaseEntityRendererService { this.mxGraphShapeOverlayService, this.namespacesCacheService, this.sammLangService, - this.rdfService.currentRdfModel + this.rdfService.currentRdfModel, ); const extendsElement = metaModelElement.extendedElement as DefaultAbstractEntity; @@ -100,7 +100,7 @@ export class BaseEntityRendererService { private hasPredefinedAbstractEntity(cell: mxgraph.mxCell): mxgraph.mxCell { const children = this.mxGraphService.graph.getOutgoingEdges(cell).map(e => e.target); const predefinedEntityInstantiator = new PredefinedEntityInstantiator( - new MetaModelElementInstantiator(this.rdfService.currentRdfModel, this.namespacesCacheService.currentCachedFile) + new MetaModelElementInstantiator(this.rdfService.currentRdfModel, this.namespacesCacheService.currentCachedFile), ); for (const child of children) { @@ -136,7 +136,7 @@ export class BaseEntityRendererService { const childrenEdges = this.mxGraphService.graph.getOutgoingEdges(cell); const entityChildEdge = childrenEdges.find(edge => - [DefaultEntity, DefaultAbstractEntity].some(c => MxGraphHelper.getModelElement(edge.target) instanceof c) + [DefaultEntity, DefaultAbstractEntity].some(c => MxGraphHelper.getModelElement(edge.target) instanceof c), ); if (!entityChildEdge) { @@ -153,7 +153,7 @@ export class BaseEntityRendererService { } return entityChildModelElement.properties.some( - ({property}) => property.aspectModelUrn === childModelElement.extendedElement?.aspectModelUrn + ({property}) => property.aspectModelUrn === childModelElement.extendedElement?.aspectModelUrn, ); }); diff --git a/core/libs/mx-graph/src/lib/services/render-models/base-render-service.ts b/core/libs/mx-graph/src/lib/services/render-models/base-render-service.ts index e3301ef7..3b5b58dc 100644 --- a/core/libs/mx-graph/src/lib/services/render-models/base-render-service.ts +++ b/core/libs/mx-graph/src/lib/services/render-models/base-render-service.ts @@ -27,7 +27,7 @@ export abstract class BaseRenderService { constructor( protected mxGraphService: MxGraphService, protected sammLangService: SammLanguageSettingsService, - protected rdfService: RdfService + protected rdfService: RdfService, ) {} public abstract isApplicable(cell: mxgraph.mxCell): boolean; @@ -57,7 +57,7 @@ export abstract class BaseRenderService { } const keys: OverWrittenPropertyKeys = modelElement.properties.find( - ({property: prop}) => prop.aspectModelUrn === property.aspectModelUrn + ({property: prop}) => prop.aspectModelUrn === property.aspectModelUrn, ).keys; this.mxGraphService.removeCells([e]); @@ -68,7 +68,7 @@ export abstract class BaseRenderService { null, e.source, e.target, - keys.optional ? 'optionalPropertyEdge' : 'defaultEdge' + keys.optional ? 'optionalPropertyEdge' : 'defaultEdge', ); }); } diff --git a/core/libs/mx-graph/src/lib/services/render-models/characteristic-render.service.ts b/core/libs/mx-graph/src/lib/services/render-models/characteristic-render.service.ts index 1003f0a4..28bf0b5e 100644 --- a/core/libs/mx-graph/src/lib/services/render-models/characteristic-render.service.ts +++ b/core/libs/mx-graph/src/lib/services/render-models/characteristic-render.service.ts @@ -53,7 +53,7 @@ export class CharacteristicRenderService extends BaseRenderService { private shapeConnectorService: ShapeConnectorService, private unitRendererService: UnitRenderService, private mxGraphShapeOverlayService: MxGraphShapeOverlayService, - private namespacesCacheService: NamespacesCacheService + private namespacesCacheService: NamespacesCacheService, ) { super(mxGraphService, sammLangService, rdfService); } @@ -113,7 +113,7 @@ export class CharacteristicRenderService extends BaseRenderService { this.metaModelElement, element.property, cell, - propertyCell || this.mxGraphService.renderModelElement(this.filtersService.createNode(element.property, {parent: modelElement})) + propertyCell || this.mxGraphService.renderModelElement(this.filtersService.createNode(element.property, {parent: modelElement})), ); propertyCell = this.mxGraphService.resolveCellByModelElement(element.property); @@ -131,20 +131,20 @@ export class CharacteristicRenderService extends BaseRenderService { propertyCell, childCharacteristicCell || this.mxGraphService.renderModelElement( - this.filtersService.createNode(element.property.characteristic, {parent: element.property}) - ) + this.filtersService.createNode(element.property.characteristic, {parent: element.property}), + ), ); childCharacteristicCell = this.mxGraphService.resolveCellByModelElement(element.property.characteristic); childCharacteristicCell['configuration'].fields = MxGraphVisitorHelper.getElementProperties( element.property.characteristic, - this.sammLangService + this.sammLangService, ); this.graph.labelChanged(childCharacteristicCell, MxGraphHelper.createPropertiesLabel(childCharacteristicCell)); this.mxGraphShapeOverlayService.removeOverlay( childCharacteristicCell, - MxGraphHelper.getNewShapeOverlayButton(childCharacteristicCell) + MxGraphHelper.getNewShapeOverlayButton(childCharacteristicCell), ); } } @@ -188,7 +188,7 @@ export class CharacteristicRenderService extends BaseRenderService { childCell ? childCell : this.mxGraphService.renderModelElement(this.filtersService.createNode(cachedCharacteristic, {parent: this.metaModelElement})), - modelInfo + modelInfo, ); } @@ -213,7 +213,7 @@ export class CharacteristicRenderService extends BaseRenderService { } const edgesToRemove = cell.edges?.filter( - edge => MxGraphHelper.getModelElement(edge.target).aspectModelUrn !== modelElement.aspectModelUrn + edge => MxGraphHelper.getModelElement(edge.target).aspectModelUrn !== modelElement.aspectModelUrn, ); this.mxGraphService.removeCells(edgesToRemove || []); } @@ -358,7 +358,7 @@ export class CharacteristicRenderService extends BaseRenderService { childCell ? childCell : this.mxGraphService.renderModelElement(this.filtersService.createNode(cachedCharacteristic, {parent: this.metaModelElement})), - ModelInfo.IS_CHARACTERISTIC + ModelInfo.IS_CHARACTERISTIC, ); } else { this.removeCharacteristic(cell, this.metaModelElement); diff --git a/core/libs/mx-graph/src/lib/services/render-models/entity-render.service.ts b/core/libs/mx-graph/src/lib/services/render-models/entity-render.service.ts index a0182ba6..bd0ba3c2 100644 --- a/core/libs/mx-graph/src/lib/services/render-models/entity-render.service.ts +++ b/core/libs/mx-graph/src/lib/services/render-models/entity-render.service.ts @@ -29,7 +29,7 @@ export class EntityRenderService extends BaseRenderService { mxGraphService: MxGraphService, sammLangService: SammLanguageSettingsService, rdfService: RdfService, - private baseEntityRenderer: BaseEntityRendererService + private baseEntityRenderer: BaseEntityRendererService, ) { super(mxGraphService, sammLangService, rdfService); } diff --git a/core/libs/mx-graph/src/lib/services/render-models/entity-value-render.service.ts b/core/libs/mx-graph/src/lib/services/render-models/entity-value-render.service.ts index 265e4b18..f24d8d31 100644 --- a/core/libs/mx-graph/src/lib/services/render-models/entity-value-render.service.ts +++ b/core/libs/mx-graph/src/lib/services/render-models/entity-value-render.service.ts @@ -37,7 +37,7 @@ export class EntityValueRenderService extends BaseRenderService { rdfService: RdfService, private mxGraphShapeOverlay: MxGraphShapeOverlayService, private shapeConnectorService: ShapeConnectorService, - private mxGraphAttributeService: MxGraphAttributeService + private mxGraphAttributeService: MxGraphAttributeService, ) { super(mxGraphService, sammLangService, rdfService); } @@ -141,7 +141,7 @@ export class EntityValueRenderService extends BaseRenderService { this.mxGraphService.assignToParent( this.mxGraphService.resolveCellByModelElement(child.entity), this.mxGraphService.resolveCellByModelElement(child), - EdgeStyles.entityValueEntityEdge + EdgeStyles.entityValueEntityEdge, ); } @@ -149,7 +149,7 @@ export class EntityValueRenderService extends BaseRenderService { this.mxGraphService.assignToParent( this.mxGraphService.resolveCellByModelElement(child), this.mxGraphService.resolveCellByModelElement(parent), - EdgeStyles.entityValueEntityEdge + EdgeStyles.entityValueEntityEdge, ); } diff --git a/core/libs/mx-graph/src/lib/services/render-models/enumeration-render.service.ts b/core/libs/mx-graph/src/lib/services/render-models/enumeration-render.service.ts index fdb509bd..528a8c8e 100644 --- a/core/libs/mx-graph/src/lib/services/render-models/enumeration-render.service.ts +++ b/core/libs/mx-graph/src/lib/services/render-models/enumeration-render.service.ts @@ -54,7 +54,7 @@ export class EnumerationRenderService extends BaseRenderService { private entityValueRenderer: EntityValueRenderService, private mxGraphShapeOverlayService: MxGraphShapeOverlayService, private unitRendererService: UnitRenderService, - private namespaceCacheService: NamespacesCacheService + private namespaceCacheService: NamespacesCacheService, ) { super(mxGraphService, sammLangService, rdfService); } @@ -126,7 +126,7 @@ export class EnumerationRenderService extends BaseRenderService { this.namespaceCacheService.currentCachedFile.removeElement(modelElement.aspectModelUrn); } return edge.target; - }) + }), ); } @@ -158,7 +158,7 @@ export class EnumerationRenderService extends BaseRenderService { if (newDataType instanceof DefaultEntity) { const entityCell = this.mxGraphService.renderModelElement( - this.filtersService.createNode(newDataType, {parent: MxGraphHelper.getModelElement(cell)}) + this.filtersService.createNode(newDataType, {parent: MxGraphHelper.getModelElement(cell)}), ); this.shapeConnectorService.connectShapes(MxGraphHelper.getModelElement(cell), newDataType, cell, entityCell); } diff --git a/core/libs/mx-graph/src/lib/services/render-models/model-render.service.ts b/core/libs/mx-graph/src/lib/services/render-models/model-render.service.ts index 9de5243d..ccd72031 100644 --- a/core/libs/mx-graph/src/lib/services/render-models/model-render.service.ts +++ b/core/libs/mx-graph/src/lib/services/render-models/model-render.service.ts @@ -41,7 +41,7 @@ export class ModelRenderService { private enumerationRenderService: EnumerationRenderService, private eventRenderService: EventRenderService, private unitRenderService: UnitRenderService, - private constraintRenderService: ConstraintRenderService + private constraintRenderService: ConstraintRenderService, ) {} update(cell: mxgraph.mxCell) { diff --git a/core/libs/mx-graph/src/lib/services/render-models/property-render.service.ts b/core/libs/mx-graph/src/lib/services/render-models/property-render.service.ts index 93296b10..bf014e12 100644 --- a/core/libs/mx-graph/src/lib/services/render-models/property-render.service.ts +++ b/core/libs/mx-graph/src/lib/services/render-models/property-render.service.ts @@ -32,7 +32,7 @@ export class PropertyRenderService extends BaseRenderService { sammLangService: SammLanguageSettingsService, rdfService: RdfService, private namespacesCacheService: NamespacesCacheService, - private shapeConnectorService: ShapeConnectorService + private shapeConnectorService: ShapeConnectorService, ) { super(mxGraphService, sammLangService, rdfService); } @@ -60,7 +60,7 @@ export class PropertyRenderService extends BaseRenderService { const entityCell = resolvedCell ? resolvedCell : this.mxGraphService.renderModelElement( - node.children.find(childNode => childNode.element.aspectModelUrn === extendsElement.aspectModelUrn) + node.children.find(childNode => childNode.element.aspectModelUrn === extendsElement.aspectModelUrn), ); this.shapeConnectorService.connectShapes(metaModelElement, extendsElement, cell, entityCell); } diff --git a/core/libs/mx-graph/src/lib/services/render-models/unit-render.service.ts b/core/libs/mx-graph/src/lib/services/render-models/unit-render.service.ts index 9f584fc1..ba1dcd6e 100644 --- a/core/libs/mx-graph/src/lib/services/render-models/unit-render.service.ts +++ b/core/libs/mx-graph/src/lib/services/render-models/unit-render.service.ts @@ -35,7 +35,7 @@ export class UnitRenderService extends BaseRenderService { sammLangService: SammLanguageSettingsService, rdfService: RdfService, private mxGraphShapeOverlayService: MxGraphShapeOverlayService, - private namespacesCacheService: NamespacesCacheService + private namespacesCacheService: NamespacesCacheService, ) { super(mxGraphService, sammLangService, rdfService); } @@ -49,7 +49,7 @@ export class UnitRenderService extends BaseRenderService { this.mxGraphShapeOverlayService, this.namespacesCacheService, this.sammLangService, - null + null, ).renderUnit(this.filterService.createNode(unit, {parent: MxGraphHelper.getModelElement(parentCell)}), parentCell); } diff --git a/core/libs/mx-graph/src/lib/themes/theme.service.ts b/core/libs/mx-graph/src/lib/themes/theme.service.ts index 5b8a2624..b608eca7 100644 --- a/core/libs/mx-graph/src/lib/themes/theme.service.ts +++ b/core/libs/mx-graph/src/lib/themes/theme.service.ts @@ -72,7 +72,7 @@ export class ThemeService { shapeStyle + [...Object.entries(this.theme[shapeStyle]), ...Object.entries(this.getDefaultShapesColors)].reduce( (acc, [key, value]) => `${acc};${key}=${value}`, - '' + '', ) ); } diff --git a/core/libs/namespace-manager/src/lib/namespace-exporter/components/select-namespaces/select-namespaces.component.ts b/core/libs/namespace-manager/src/lib/namespace-exporter/components/select-namespaces/select-namespaces.component.ts index 7061a815..465e4f94 100644 --- a/core/libs/namespace-manager/src/lib/namespace-exporter/components/select-namespaces/select-namespaces.component.ts +++ b/core/libs/namespace-manager/src/lib/namespace-exporter/components/select-namespaces/select-namespaces.component.ts @@ -55,7 +55,7 @@ export class SelectNamespacesComponent implements OnInit { private namespacesManager: NamespacesManagerService, private editorService: EditorService, private router: Router, - @Inject(APP_CONFIG) public config: AppConfig + @Inject(APP_CONFIG) public config: AppConfig, ) {} ngOnInit(): void { @@ -63,7 +63,7 @@ export class SelectNamespacesComponent implements OnInit { .loadModels() .pipe( first(), - tap(models => (this.namespacesDependencies = this.getNamespacesDependencies(models))) + tap(models => (this.namespacesDependencies = this.getNamespacesDependencies(models))), ) .subscribe(); } @@ -100,7 +100,7 @@ export class SelectNamespacesComponent implements OnInit { } nDependency.dependencies = Array.from( - new Set([...nDependency.dependencies, ...this.getDependentNamespaces(rdfModel.getNamespaces())]) + new Set([...nDependency.dependencies, ...this.getDependentNamespaces(rdfModel.getNamespaces())]), ); nDependency.files = Array.from(new Set([...nDependency.files, fileName])); return acc; diff --git a/core/libs/namespace-manager/src/lib/namespace-exporter/components/summary/summary.component.ts b/core/libs/namespace-manager/src/lib/namespace-exporter/components/summary/summary.component.ts index 501bd521..cd4a96c2 100644 --- a/core/libs/namespace-manager/src/lib/namespace-exporter/components/summary/summary.component.ts +++ b/core/libs/namespace-manager/src/lib/namespace-exporter/components/summary/summary.component.ts @@ -34,7 +34,7 @@ export class ExportSummaryComponent { private modelApiService: ModelApiService, private dialogRef: MatDialogRef, private notificationService: NotificationsService, - private translate: LanguageTranslationService + private translate: LanguageTranslationService, ) {} export() { diff --git a/core/libs/namespace-manager/src/lib/namespace-exporter/components/validate/validate.components.ts b/core/libs/namespace-manager/src/lib/namespace-exporter/components/validate/validate.components.ts index ccc0168c..0738efa7 100644 --- a/core/libs/namespace-manager/src/lib/namespace-exporter/components/validate/validate.components.ts +++ b/core/libs/namespace-manager/src/lib/namespace-exporter/components/validate/validate.components.ts @@ -22,7 +22,10 @@ import {NamespacesSessionInterface} from '../../../shared/models'; styleUrls: [`validate.components.scss`], }) export class ExportValidateComponent implements OnInit { - constructor(private router: Router, @Inject(NAMESPACES_SESSION) private namespacesSession: NamespacesSessionInterface) {} + constructor( + private router: Router, + @Inject(NAMESPACES_SESSION) private namespacesSession: NamespacesSessionInterface, + ) {} ngOnInit() { this.namespacesSession.state.validating$.subscribe({ diff --git a/core/libs/namespace-manager/src/lib/namespace-importer/components/file-conflict/file-conflict.component.ts b/core/libs/namespace-manager/src/lib/namespace-importer/components/file-conflict/file-conflict.component.ts index e6342674..d31513cf 100644 --- a/core/libs/namespace-manager/src/lib/namespace-importer/components/file-conflict/file-conflict.component.ts +++ b/core/libs/namespace-manager/src/lib/namespace-importer/components/file-conflict/file-conflict.component.ts @@ -24,7 +24,10 @@ export class FileConflictComponent { public namespacesToReplace: string[] = []; public conflictFiles: any; - constructor(@Inject(NAMESPACES_SESSION) private importSession: NamespacesSessionInterface, private router: Router) { + constructor( + @Inject(NAMESPACES_SESSION) private importSession: NamespacesSessionInterface, + private router: Router, + ) { this.conflictFiles = this.importSession.conflictFiles; this.namespacesToReplace = [...this.conflictFiles.replace]; } diff --git a/core/libs/namespace-manager/src/lib/namespace-importer/components/summary/summary.component.ts b/core/libs/namespace-manager/src/lib/namespace-importer/components/summary/summary.component.ts index 63b33611..48c5d1ef 100644 --- a/core/libs/namespace-manager/src/lib/namespace-importer/components/summary/summary.component.ts +++ b/core/libs/namespace-manager/src/lib/namespace-importer/components/summary/summary.component.ts @@ -29,7 +29,10 @@ export class ImportSummaryComponent { public missingElements: MissingElement[] = this.importSession.missingElements; - constructor(private dialogRef: MatDialogRef, private fileHandlingService: FileHandlingService) {} + constructor( + private dialogRef: MatDialogRef, + private fileHandlingService: FileHandlingService, + ) {} importFiles() { this.dialogRef.close(); @@ -39,7 +42,7 @@ export class ImportSummaryComponent { .importFilesToWorkspace(this.importSession.files, this.importSession.conflictFiles) .pipe( tap(() => this.importSession.state.importing$.next(false)), - take(1) + take(1), ) .subscribe(() => { this.electronSignalsService.call('requestRefreshWorkspaces'); diff --git a/core/libs/namespace-manager/src/lib/namespace-importer/components/validate/validate.components.ts b/core/libs/namespace-manager/src/lib/namespace-importer/components/validate/validate.components.ts index 0e4a85ef..cd725b58 100644 --- a/core/libs/namespace-manager/src/lib/namespace-importer/components/validate/validate.components.ts +++ b/core/libs/namespace-manager/src/lib/namespace-importer/components/validate/validate.components.ts @@ -22,7 +22,10 @@ import {NamespacesSessionInterface} from '../../../shared/models'; styleUrls: [`validate.components.scss`], }) export class ImportValidateComponent implements OnInit { - constructor(private router: Router, @Inject(NAMESPACES_SESSION) private importSession: NamespacesSessionInterface) {} + constructor( + private router: Router, + @Inject(NAMESPACES_SESSION) private importSession: NamespacesSessionInterface, + ) {} ngOnInit() { this.importSession.state.validating$.subscribe({ diff --git a/core/libs/namespace-manager/src/lib/shared/components/clipboard-copy-button/clipboard-copy-button.component.ts b/core/libs/namespace-manager/src/lib/shared/components/clipboard-copy-button/clipboard-copy-button.component.ts index d596d67c..1c619726 100644 --- a/core/libs/namespace-manager/src/lib/shared/components/clipboard-copy-button/clipboard-copy-button.component.ts +++ b/core/libs/namespace-manager/src/lib/shared/components/clipboard-copy-button/clipboard-copy-button.component.ts @@ -36,7 +36,7 @@ export class ClipboardCopyButtonComponent { missingElements: this.namespaceSession.missingElements, }, null, - 2 + 2, ); try { diff --git a/core/libs/namespace-manager/src/lib/shared/components/error/error.component.ts b/core/libs/namespace-manager/src/lib/shared/components/error/error.component.ts index a0d16ae2..eb49c334 100644 --- a/core/libs/namespace-manager/src/lib/shared/components/error/error.component.ts +++ b/core/libs/namespace-manager/src/lib/shared/components/error/error.component.ts @@ -33,7 +33,10 @@ export class ErrorComponent { type: ERROR_TYPES.UNKNOWN, }; - constructor(@Inject(NAMESPACES_SESSION) private session: NamespacesSessionInterface, private notificationService: NotificationsService) { + constructor( + @Inject(NAMESPACES_SESSION) private session: NamespacesSessionInterface, + private notificationService: NotificationsService, + ) { this.session.state.validating$.pipe(first()).subscribe({ error: (error: any) => { this.error.message = error?.error?.error?.message || this.error.message; diff --git a/core/libs/namespace-manager/src/lib/shared/components/workspace-summary/workspace-summary.component.ts b/core/libs/namespace-manager/src/lib/shared/components/workspace-summary/workspace-summary.component.ts index bc73a183..6f6c6eff 100644 --- a/core/libs/namespace-manager/src/lib/shared/components/workspace-summary/workspace-summary.component.ts +++ b/core/libs/namespace-manager/src/lib/shared/components/workspace-summary/workspace-summary.component.ts @@ -40,7 +40,10 @@ export class WorkspaceSummaryComponent { public violations: Violation[] = this.importSession.violations; public errors: ViolationError[]; - constructor(private notificationService: NotificationsService, private translate: LanguageTranslationService) {} + constructor( + private notificationService: NotificationsService, + private translate: LanguageTranslationService, + ) {} async copySummaryToClipboard() { const textToClipboard = JSON.stringify( @@ -50,7 +53,7 @@ export class WorkspaceSummaryComponent { missingElements: this.missingElements, }, null, - 2 + 2, ); try { diff --git a/core/libs/namespace-manager/src/lib/shared/models/namespace-session.ts b/core/libs/namespace-manager/src/lib/shared/models/namespace-session.ts index fa8f956d..9e0857ff 100644 --- a/core/libs/namespace-manager/src/lib/shared/models/namespace-session.ts +++ b/core/libs/namespace-manager/src/lib/shared/models/namespace-session.ts @@ -85,7 +85,7 @@ export class NamespacesSession implements NamespacesSessionInterface { { replace: new Set(), keep: new Set(), - } + }, ); this.conflictFiles.keep = Array.from(keep); diff --git a/core/libs/namespace-manager/src/lib/shared/services/namespaces-manager.service.ts b/core/libs/namespace-manager/src/lib/shared/services/namespaces-manager.service.ts index c3037fd7..46f79195 100644 --- a/core/libs/namespace-manager/src/lib/shared/services/namespaces-manager.service.ts +++ b/core/libs/namespace-manager/src/lib/shared/services/namespaces-manager.service.ts @@ -37,7 +37,7 @@ export class NamespacesManagerService { private router: Router, private editorService: EditorService, private fileUploadService: FileUploadService, - private sidebarService: SidebarStateService + private sidebarService: SidebarStateService, ) { if (!environment.production) { window['angular.namespacesManagerService'] = this; @@ -48,7 +48,7 @@ export class NamespacesManagerService { this.resolveNamespacesFile(fileInfo) .pipe( switchMap(file => this.importNamespaces(file)), - first() + first(), ) .subscribe(); } @@ -67,14 +67,14 @@ export class NamespacesManagerService { this.setOnClose(() => { this.editorService.loadExternalModels().subscribe(() => this.sidebarService.workspace.refresh()); this.router.navigate([{outlets: {'import-namespaces': null}}]); - }) + }), ), switchMap(() => this.modelApiService.uploadZip(zip)), tap(result => { this.session.parseResponse(result); this.session.state.validating$.next(false); }), - catchError(e => of(this.session.state.validating$.error(e))) + catchError(e => of(this.session.state.validating$.error(e))), ); } @@ -89,7 +89,7 @@ export class NamespacesManagerService { tap(() => { const cb = () => this.router.navigate([{outlets: {'export-namespaces': null}}]); this.setOnClose(cb); - }) + }), ); } @@ -100,7 +100,7 @@ export class NamespacesManagerService { this.session.parseResponse(result); this.session.state.validating$.next(false); }), - catchError(err => of(this.session.state.validating$.error(err))) + catchError(err => of(this.session.state.validating$.error(err))), ); } diff --git a/core/libs/rdf/src/lib/services/model.service.ts b/core/libs/rdf/src/lib/services/model.service.ts index c301066b..2707e66d 100644 --- a/core/libs/rdf/src/lib/services/model.service.ts +++ b/core/libs/rdf/src/lib/services/model.service.ts @@ -59,7 +59,7 @@ export class ModelService { private modelApiService: ModelApiService, private notificationsService: NotificationsService, private instantiatorService: InstantiatorService, - private logService: LogService + private logService: LogService, ) { if (!environment.production) { window['angular.modelService'] = this; @@ -93,7 +93,7 @@ export class ModelService { if (sammVersion > this.config.currentSammVersion) { return throwError( () => `The provided Aspect Model is using SAMM version ${sammVersion} which is too high. - The Aspect Model Editor is currently based on SAMM ${this.config.currentSammVersion}.` + The Aspect Model Editor is currently based on SAMM ${this.config.currentSammVersion}.`, ); } @@ -114,8 +114,8 @@ export class ModelService { console.groupEnd(); this.logService.logError(`Error while loading the model. ${JSON.stringify(error.message)}.`); return error.message; - }) - ) + }), + ), ); } catch (error: any) { console.groupCollapsed('model.service -> loadRDFmodel', error); @@ -137,9 +137,9 @@ export class ModelService { this.notificationsService.info({ title: `Successfully migrated from SAMM Version ${sammVersion} to SAMM version ${this.config.currentSammVersion} SAMM version`, timeout: 5000, - }) + }), ), - switchMap(migratedAspectModel => this.rdfService.loadModel(migratedAspectModel).pipe(first())) + switchMap(migratedAspectModel => this.rdfService.loadModel(migratedAspectModel).pipe(first())), ); } @@ -166,7 +166,7 @@ export class ModelService { saveModel() { const synchronizedModel = this.synchronizeModelToRdf(); return (synchronizedModel || throwError(() => ({type: SaveValidateErrorsCodes.desynchronized}))).pipe( - switchMap(() => this.rdfService.saveModel(this.rdfModel)) + switchMap(() => this.rdfService.saveModel(this.rdfModel)), ); } diff --git a/core/libs/rdf/src/lib/services/rdf-serializer.service.ts b/core/libs/rdf/src/lib/services/rdf-serializer.service.ts index ac871261..3d64823a 100644 --- a/core/libs/rdf/src/lib/services/rdf-serializer.service.ts +++ b/core/libs/rdf/src/lib/services/rdf-serializer.service.ts @@ -34,7 +34,7 @@ export class RdfSerializerService { null, null, null, - null + null, ); let rdfContent = ''; @@ -96,7 +96,7 @@ export class RdfSerializerService { return DataFactory.quad( quad.subject, quad.predicate, - DataFactory.namedNode(quad.object.value.replace(originalNamespace, newNamespace)) + DataFactory.namedNode(quad.object.value.replace(originalNamespace, newNamespace)), ); } @@ -112,7 +112,7 @@ export class RdfSerializerService { writer.addQuad( this._namedNode(quad.subject.value), this._namedNode(quad.predicate.value), - writer.list(blankNodes.map(({object}) => object)) + writer.list(blankNodes.map(({object}) => object)), ); } } diff --git a/core/libs/rdf/src/lib/services/rdf.service.ts b/core/libs/rdf/src/lib/services/rdf.service.ts index 5a6f83d1..b67e6492 100644 --- a/core/libs/rdf/src/lib/services/rdf.service.ts +++ b/core/libs/rdf/src/lib/services/rdf.service.ts @@ -47,7 +47,7 @@ export class RdfService { private configurationService: ConfigurationService, private translation: LanguageTranslationService, private browserService: BrowserService, - @Inject(APP_CONFIG) public config: AppConfig + @Inject(APP_CONFIG) public config: AppConfig, ) { if (!environment.production) { window['angular.rdfService'] = this; @@ -77,7 +77,7 @@ export class RdfService { return this.modelApiService.saveModel(content, rdfModel.absoluteAspectModelFileName); }), - switchMap(() => this.loadExternalReferenceModelIntoStore(new FileContentModel(rdfModel.absoluteAspectModelFileName, rdfContent))) + switchMap(() => this.loadExternalReferenceModelIntoStore(new FileContentModel(rdfModel.absoluteAspectModelFileName, rdfContent))), ); } @@ -219,7 +219,7 @@ export class RdfService { removeExternalRdfModel(modelName: string): void { this.externalRdfModels = this.externalRdfModels.reduce( (models, model) => (model.absoluteAspectModelFileName !== modelName ? [...models, model] : models), - [] + [], ); } } diff --git a/core/libs/rdf/src/lib/utils/rdf-model-util.ts b/core/libs/rdf/src/lib/utils/rdf-model-util.ts index 50433ee9..1509fc37 100644 --- a/core/libs/rdf/src/lib/utils/rdf-model-util.ts +++ b/core/libs/rdf/src/lib/utils/rdf-model-util.ts @@ -75,7 +75,7 @@ export class RdfModelUtil { metaModelElement: BaseMetaModelElement, predicateUrn: string, rdfModel: RdfModel, - characteristicType: Type + characteristicType: Type, ): NamedNode { const samm = rdfModel.SAMM(); const sammC = rdfModel.SAMMC(); @@ -244,7 +244,7 @@ export class RdfModelUtil { DataFactory.namedNode(elementType), null, metaModelElementInstantiator.samm.Entity(), - null + null, ); if (quads.length) { diff --git a/core/libs/settings-dialog/src/lib/components/model-configuration/language-settings/language-settings.component.ts b/core/libs/settings-dialog/src/lib/components/model-configuration/language-settings/language-settings.component.ts index fde30df2..1139d1dc 100644 --- a/core/libs/settings-dialog/src/lib/components/model-configuration/language-settings/language-settings.component.ts +++ b/core/libs/settings-dialog/src/lib/components/model-configuration/language-settings/language-settings.component.ts @@ -27,7 +27,10 @@ export class LanguageSettingsComponent implements OnInit { form: FormGroup; filteredOptions: Observable[] = []; - constructor(private translate: LanguageTranslationService, private formService: SettingsFormService) {} + constructor( + private translate: LanguageTranslationService, + private formService: SettingsFormService, + ) {} ngOnInit(): void { this.form = this.formService.getForm().get('languageConfiguration') as FormGroup; @@ -59,7 +62,7 @@ export class LanguageSettingsComponent implements OnInit { private getFilteredOptionsObservable(control: AbstractControl): Observable { return control.valueChanges.pipe( startWith(''), - map(value => this.filterOptions(this.getLanguageName(value))) + map(value => this.filterOptions(this.getLanguageName(value))), ); } diff --git a/core/libs/settings-dialog/src/lib/components/settings-dialog/setting-dialog.component.ts b/core/libs/settings-dialog/src/lib/components/settings-dialog/setting-dialog.component.ts index fd7b1ea5..8461ba11 100644 --- a/core/libs/settings-dialog/src/lib/components/settings-dialog/setting-dialog.component.ts +++ b/core/libs/settings-dialog/src/lib/components/settings-dialog/setting-dialog.component.ts @@ -111,14 +111,14 @@ export class SettingDialogComponent { treeControl = new FlatTreeControl( node => node.level, - node => node.expandable + node => node.expandable, ); treeFlattener = new MatTreeFlattener( this._transformer, node => node.level, node => node.expandable, - node => node.children + node => node.children, ); dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener); @@ -141,7 +141,7 @@ export class SettingDialogComponent { private mxGraphShapeSelectorService: MxGraphShapeSelectorService, private loadingScreen: LoadingScreenService, private titleService: TitleService, - private namespaceCacheService: NamespacesCacheService + private namespaceCacheService: NamespacesCacheService, ) { this.initializeComponent(); } @@ -292,7 +292,7 @@ export class SettingDialogComponent { this.mxGraphService, this.mxGraphShapeSelectorService, this.logService, - this.mxGraphAttributeService + this.mxGraphAttributeService, ).removeUnnecessaryLanguages(); }); } finally { diff --git a/core/libs/settings-dialog/src/lib/components/system-configuration/editor-configuration/editor-configuration.component.ts b/core/libs/settings-dialog/src/lib/components/system-configuration/editor-configuration/editor-configuration.component.ts index d224f2ff..540a02ef 100644 --- a/core/libs/settings-dialog/src/lib/components/system-configuration/editor-configuration/editor-configuration.component.ts +++ b/core/libs/settings-dialog/src/lib/components/system-configuration/editor-configuration/editor-configuration.component.ts @@ -29,7 +29,10 @@ export class EditorConfigurationComponent implements OnInit { form: FormGroup; settings: Settings; - constructor(private formService: SettingsFormService, private themeService: ThemeService) {} + constructor( + private formService: SettingsFormService, + private themeService: ThemeService, + ) {} ngOnInit(): void { this.form = this.formService.getForm().get('editorConfiguration') as FormGroup; diff --git a/core/libs/settings-dialog/src/lib/services/settings-form.service.ts b/core/libs/settings-dialog/src/lib/services/settings-form.service.ts index 92e063be..d2a7b611 100644 --- a/core/libs/settings-dialog/src/lib/services/settings-form.service.ts +++ b/core/libs/settings-dialog/src/lib/services/settings-form.service.ts @@ -59,7 +59,7 @@ export class SettingsFormService { private editorConfigStrategy: EditorConfigurationUpdateStrategy, private languageConfigStrategy: LanguageConfigurationUpdateStrategy, private namespaceConfigStrategy: NamespaceConfigurationUpdateStrategy, - private copyrightHeaderUpdateStrategy: CopyrightHeaderUpdateStrategy + private copyrightHeaderUpdateStrategy: CopyrightHeaderUpdateStrategy, ) { this.strategies = [ this.automatedWorkflowStrategy, @@ -160,7 +160,7 @@ export class SettingsFormService { aspectModelArray.push( this.formBuilder.group({ language: [value, Validators.required], - }) + }), ); } diff --git a/core/libs/settings-dialog/src/lib/strategy/language-configuration-update.strategy.ts b/core/libs/settings-dialog/src/lib/strategy/language-configuration-update.strategy.ts index d182f301..2755946c 100644 --- a/core/libs/settings-dialog/src/lib/strategy/language-configuration-update.strategy.ts +++ b/core/libs/settings-dialog/src/lib/strategy/language-configuration-update.strategy.ts @@ -22,7 +22,10 @@ import {ElectronTunnelService} from '@ame/shared'; providedIn: 'root', }) export class LanguageConfigurationUpdateStrategy implements SettingsUpdateStrategy { - constructor(private translate: LanguageTranslationService, private electronTunnelService: ElectronTunnelService) {} + constructor( + private translate: LanguageTranslationService, + private electronTunnelService: ElectronTunnelService, + ) {} updateSettings(form: FormGroup, settings: Settings): void { const languageConfiguration = form.get('languageConfiguration'); @@ -34,7 +37,7 @@ export class LanguageConfigurationUpdateStrategy implements SettingsUpdateStrate localStorage.setItem('applicationLanguage', userInterfaceLang); settings.aspectModelLanguages = (languageConfiguration.get('aspectModel') as FormArray).controls.map( - control => control.get('language')?.value.tag + control => control.get('language')?.value.tag, ); } } diff --git a/core/libs/shared/src/lib/components/alert/alert.component.ts b/core/libs/shared/src/lib/components/alert/alert.component.ts index 384e9820..0f489938 100644 --- a/core/libs/shared/src/lib/components/alert/alert.component.ts +++ b/core/libs/shared/src/lib/components/alert/alert.component.ts @@ -21,7 +21,10 @@ import {AlertOptions} from '@ame/shared'; styleUrls: ['./alert.component.scss'], }) export class AlertComponent { - constructor(@Inject(MAT_DIALOG_DATA) public data: AlertOptions, private dialogRef: MatDialogRef) {} + constructor( + @Inject(MAT_DIALOG_DATA) public data: AlertOptions, + private dialogRef: MatDialogRef, + ) {} close(event: MouseEvent) { if (this.data.leftButtonAction && typeof this.data.leftButtonAction === 'function') { diff --git a/core/libs/shared/src/lib/components/loading-screen/loading-screen.component.ts b/core/libs/shared/src/lib/components/loading-screen/loading-screen.component.ts index 3e124b61..b0c06172 100644 --- a/core/libs/shared/src/lib/components/loading-screen/loading-screen.component.ts +++ b/core/libs/shared/src/lib/components/loading-screen/loading-screen.component.ts @@ -21,7 +21,10 @@ import {LoadingScreenOptions} from '@ame/shared'; styleUrls: ['./loading-screen.component.scss'], }) export class LoadingScreenComponent { - constructor(@Inject(MAT_DIALOG_DATA) public data: LoadingScreenOptions, private dialog: MatDialogRef) {} + constructor( + @Inject(MAT_DIALOG_DATA) public data: LoadingScreenOptions, + private dialog: MatDialogRef, + ) {} close() { if (typeof this.data.closeButtonAction === 'function') { diff --git a/core/libs/shared/src/lib/http-error.interceptor.ts b/core/libs/shared/src/lib/http-error.interceptor.ts index 351caf7e..1cfc18a4 100644 --- a/core/libs/shared/src/lib/http-error.interceptor.ts +++ b/core/libs/shared/src/lib/http-error.interceptor.ts @@ -19,7 +19,10 @@ import {LogService, NotificationsService} from './services'; @Injectable({providedIn: 'root'}) export class HttpErrorInterceptor implements HttpInterceptor { - constructor(private loggerService: LogService, private notificationsService: NotificationsService) {} + constructor( + private loggerService: LogService, + private notificationsService: NotificationsService, + ) {} private isError400(error): boolean { return error instanceof HttpErrorResponse && error.status === 400; @@ -38,8 +41,8 @@ export class HttpErrorInterceptor implements HttpInterceptor { retryWhen(errors => errors.pipe( concatMap((error, index) => iif(() => index < 3 && this.isError404(error), of(error), throwError(error))), - delay(2000) - ) + delay(2000), + ), ), catchError(error => { // Skip handling of 400 which must be done in the related component @@ -47,11 +50,11 @@ export class HttpErrorInterceptor implements HttpInterceptor { const messageDetail = 'Please try again later. In case if it happens again, please contact us'; this.notificationsService.error({title: error.statusText, message: messageDetail}); this.loggerService.logError( - `Oops! We're sorry! An error (${error.status} ${error.statusText}) happened we could not handle. ${messageDetail}` + `Oops! We're sorry! An error (${error.status} ${error.statusText}) happened we could not handle. ${messageDetail}`, ); } return throwError(error); - }) + }), ); } } diff --git a/core/libs/shared/src/lib/model/electron-signals.model.ts b/core/libs/shared/src/lib/model/electron-signals.model.ts index 81807cd6..5df400c8 100644 --- a/core/libs/shared/src/lib/model/electron-signals.model.ts +++ b/core/libs/shared/src/lib/model/electron-signals.model.ts @@ -49,14 +49,14 @@ export interface ElectronSignals { call(listener: K): ElectronReturnDataOnly[K]; call( listener: K, - payload: ElectronPayloadAndReturn[K]['payload'] + payload: ElectronPayloadAndReturn[K]['payload'], ): ElectronPayloadAndReturn[K]['return']; addListener(listener: K, callback: (payload: ElectronPayloadOnly[K]) => void): void; addListener(listener: K, callback: () => void): void; addListener( listener: K, - callback: (payload: ElectronPayloadAndReturn[K]['payload']) => ElectronPayloadAndReturn[K]['return'] + callback: (payload: ElectronPayloadAndReturn[K]['payload']) => ElectronPayloadAndReturn[K]['return'], ): void; removeListener(listener: K, callback: Function): void; diff --git a/core/libs/shared/src/lib/model/file-content.model.ts b/core/libs/shared/src/lib/model/file-content.model.ts index ed50c688..097e93dd 100644 --- a/core/libs/shared/src/lib/model/file-content.model.ts +++ b/core/libs/shared/src/lib/model/file-content.model.ts @@ -12,5 +12,8 @@ */ export class FileContentModel { - constructor(public fileName: string, public aspectMetaModel: string) {} + constructor( + public fileName: string, + public aspectMetaModel: string, + ) {} } diff --git a/core/libs/shared/src/lib/model/namespace.model.ts b/core/libs/shared/src/lib/model/namespace.model.ts index 2d15c113..77f63046 100644 --- a/core/libs/shared/src/lib/model/namespace.model.ts +++ b/core/libs/shared/src/lib/model/namespace.model.ts @@ -27,7 +27,10 @@ export class NamespaceModel { return Object.values(this.fileStatus).reduce((acc: boolean, {outdated}) => acc || outdated, false); } - constructor(public name: string, public files: string[]) {} + constructor( + public name: string, + public files: string[], + ) {} setFileStatus(file: string, version: string, outdated: boolean) { this.fileStatus[file] = this.fileStatus[file] ? {...this.fileStatus[file], version, outdated} : {version, outdated}; diff --git a/core/libs/shared/src/lib/model/notification.model.ts b/core/libs/shared/src/lib/model/notification.model.ts index bff9e307..aba42a31 100644 --- a/core/libs/shared/src/lib/model/notification.model.ts +++ b/core/libs/shared/src/lib/model/notification.model.ts @@ -17,7 +17,12 @@ export class NotificationModel { public expanded = false; public date: Date = new Date(); - constructor(public title?: string, public description?: string, public link?: string, public type?: NotificationType) {} + constructor( + public title?: string, + public description?: string, + public link?: string, + public type?: NotificationType, + ) {} get formattedTime(): string { return this.date.toLocaleTimeString(); diff --git a/core/libs/shared/src/lib/services/electron-tunnel.service.ts b/core/libs/shared/src/lib/services/electron-tunnel.service.ts index e10285dc..4e6543f6 100644 --- a/core/libs/shared/src/lib/services/electron-tunnel.service.ts +++ b/core/libs/shared/src/lib/services/electron-tunnel.service.ts @@ -68,7 +68,7 @@ export class ElectronTunnelService { private matDialog: MatDialog, private searchesStateService: SearchesStateService, private translate: LanguageTranslationService, - private ngZone: NgZone + private ngZone: NgZone, ) {} sendTranslationsToElectron(language: string): void { @@ -146,7 +146,7 @@ export class ElectronTunnelService { }, }); }); - }) + }), ); } @@ -241,13 +241,13 @@ export class ElectronTunnelService { this.electronSignalsService.call('unlockFile', { namespace: options?.namespace, file: options?.file, - }) + }), ), - map(() => close) + map(() => close), ) - : of(close) + : of(close), ), - catchError(() => of(true)) + catchError(() => of(true)), ) .subscribe((close: boolean) => { close && this.ipcRenderer.send(ElectronEvents.REQUEST_CLOSE_WINDOW, windowId); @@ -309,14 +309,14 @@ export class ElectronTunnelService { this.electronSignalsService.addListener('lockFile', ({namespace, file}) => { return this.modelApiService.lockFile(namespace, file).pipe( take(1), - tap(() => this.electronSignalsService.call('addLock', {namespace, file})) + tap(() => this.electronSignalsService.call('addLock', {namespace, file})), ); }); this.electronSignalsService.addListener('unlockFile', ({namespace, file}) => { return this.modelApiService.unlockFile(namespace, file).pipe( take(1), - tap(() => this.electronSignalsService.call('removeLock', {namespace, file})) + tap(() => this.electronSignalsService.call('removeLock', {namespace, file})), ); }); @@ -357,7 +357,7 @@ export class ElectronTunnelService { }); this.ipcRenderer.on(ElectronEvents.SIGNAL_LOAD_FILE, (_: unknown, fileInfo: FileInfo) => - this.ngZone.run(() => this.fileHandlingService.onLoadModel(fileInfo)) + this.ngZone.run(() => this.fileHandlingService.onLoadModel(fileInfo)), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_LOAD_FROM_TEXT, () => { @@ -365,7 +365,7 @@ export class ElectronTunnelService { }); this.ipcRenderer.on(ElectronEvents.SIGNAL_LOAD_SPECIFIC_FILE, (_: unknown, fileInfo: FileInfo) => - this.ngZone.run(() => this.fileHandlingService.onLoadModel(fileInfo)) + this.ngZone.run(() => this.fileHandlingService.onLoadModel(fileInfo)), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_NEW_WINDOW, () => { @@ -373,20 +373,20 @@ export class ElectronTunnelService { }); this.ipcRenderer.on(ElectronEvents.SIGNAL_IMPORT_TO_WORKSPACE, (_: unknown, fileInfo: FileInfo) => - this.ngZone.run(() => this.fileHandlingService.onAddFileToNamespace(fileInfo)) + this.ngZone.run(() => this.fileHandlingService.onAddFileToNamespace(fileInfo)), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_IMPORT_NAMESPACES, (_: unknown, fileInfo: FileInfo) => - this.ngZone.run(() => this.namespacesManagerService.onImportNamespaces(fileInfo)) + this.ngZone.run(() => this.namespacesManagerService.onImportNamespaces(fileInfo)), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_COPY_TO_CLIPBOARD, () => this.ngZone.run(() => this.fileHandlingService.onCopyToClipboard())); this.ipcRenderer.on(ElectronEvents.SIGNAL_SAVE_TO_WORKSPACE, () => - this.ngZone.run(() => this.fileHandlingService.onSaveAspectModelToWorkspace()) + this.ngZone.run(() => this.fileHandlingService.onSaveAspectModelToWorkspace()), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_EXPORT_MODEL, () => - this.ngZone.run(() => this.fileHandlingService.onExportAsAspectModelFile()) + this.ngZone.run(() => this.fileHandlingService.onExportAsAspectModelFile()), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_EXPORT_NAMESPACES, () => - this.ngZone.run(() => this.namespacesManagerService.onExportNamespaces()) + this.ngZone.run(() => this.namespacesManagerService.onExportNamespaces()), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_SHOW_HIDE_TOOLBAR, () => { @@ -395,42 +395,42 @@ export class ElectronTunnelService { this.ipcRenderer.on(ElectronEvents.SIGNAL_SHOW_HIDE_MINIMAP, () => this.ngZone.run(() => this.configurationService.toggleEditorMap())); this.ipcRenderer.on(ElectronEvents.SIGNAL_FILTER_MODEL_BY, (_: unknown, rule: ModelFilter) => - this.ngZone.run(() => this.filtersService.renderByFilter(rule)) + this.ngZone.run(() => this.filtersService.renderByFilter(rule)), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_ZOOM_IN, () => this.ngZone.run(() => this.editorService.zoomIn())); this.ipcRenderer.on(ElectronEvents.SIGNAL_ZOOM_OUT, () => this.ngZone.run(() => this.editorService.zoomOut())); this.ipcRenderer.on(ElectronEvents.SIGNAL_ZOOM_TO_FIT, () => this.ngZone.run(() => this.editorService.fit())); this.ipcRenderer.on(ElectronEvents.SIGNAL_ZOOM_TO_ACTUAL, () => this.ngZone.run(() => this.editorService.actualSize())); this.ipcRenderer.on(ElectronEvents.SIGNAL_OPEN_SELECTED_ELEMENT, () => - this.ngZone.run(() => this.shapeSettingsService.editSelectedCell()) + this.ngZone.run(() => this.shapeSettingsService.editSelectedCell()), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_REMOVE_SELECTED_ELEMENT, () => - this.ngZone.run(() => this.editorService.deleteSelectedElements()) + this.ngZone.run(() => this.editorService.deleteSelectedElements()), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_COLLAPSE_EXPAND_MODEL, () => this.ngZone.run(() => this.editorService.toggleExpand())); this.ipcRenderer.on(ElectronEvents.SIGNAL_FORMAT_MODEL, () => this.ngZone.run(() => this.editorService.formatModel())); this.ipcRenderer.on(ElectronEvents.SIGNAL_CONNECT_ELEMENTS, () => - this.ngZone.run(() => this.shapeConnectorService.connectSelectedElements()) + this.ngZone.run(() => this.shapeConnectorService.connectSelectedElements()), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_VALIDATE_MODEL, () => this.ngZone.run(() => this.fileHandlingService.onValidateFile())); this.ipcRenderer.on(ElectronEvents.SIGNAL_GENERATE_HTML_DOCUMENTATION, () => - this.ngZone.run(() => this.generateHandlingService.onGenerateDocumentation()) + this.ngZone.run(() => this.generateHandlingService.onGenerateDocumentation()), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_GENERATE_OPEN_API_SPECIFICATION, () => - this.ngZone.run(() => this.generateHandlingService.onGenerateOpenApiSpec()) + this.ngZone.run(() => this.generateHandlingService.onGenerateOpenApiSpec()), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_GENERATE_ASYNC_API_SPECIFICATION, () => - this.ngZone.run(() => this.generateHandlingService.onGenerateAsyncApiSpec()) + this.ngZone.run(() => this.generateHandlingService.onGenerateAsyncApiSpec()), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_GENERATE_AASX_XML, () => - this.ngZone.run(() => this.generateHandlingService.onGenerateAASXFile()) + this.ngZone.run(() => this.generateHandlingService.onGenerateAASXFile()), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_GENERATE_JSON_PAYLOAD, () => - this.ngZone.run(() => this.generateHandlingService.onGenerateJsonSample()) + this.ngZone.run(() => this.generateHandlingService.onGenerateJsonSample()), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_GENERATE_JSON_SCHEMA, () => - this.ngZone.run(() => this.generateHandlingService.onGenerateJsonSchema()) + this.ngZone.run(() => this.generateHandlingService.onGenerateJsonSchema()), ); this.ipcRenderer.on(ElectronEvents.SIGNAL_SEARCH_ELEMENTS, () => { diff --git a/core/libs/shared/src/lib/services/model-saving-tracker.service.ts b/core/libs/shared/src/lib/services/model-saving-tracker.service.ts index 9bc92e65..89aa04bd 100644 --- a/core/libs/shared/src/lib/services/model-saving-tracker.service.ts +++ b/core/libs/shared/src/lib/services/model-saving-tracker.service.ts @@ -27,13 +27,13 @@ export class ModelSavingTrackerService { private get currentModel$() { return this.modelService.synchronizeModelToRdf().pipe( take(1), - map(() => this.rdfService.serializeModel(this.rdfService.currentRdfModel)) + map(() => this.rdfService.serializeModel(this.rdfService.currentRdfModel)), ); } public get isSaved$() { return this.currentModel$.pipe( - map(currentModel => (!this.firstLoad && this.savedModel === currentModel) || !this.mxGraphService.getAllCells()?.length) + map(currentModel => (!this.firstLoad && this.savedModel === currentModel) || !this.mxGraphService.getAllCells()?.length), ); } diff --git a/core/libs/sidebar/src/lib/draggable-element/draggable-element.component.ts b/core/libs/sidebar/src/lib/draggable-element/draggable-element.component.ts index 60df09c4..c8b786d7 100644 --- a/core/libs/sidebar/src/lib/draggable-element/draggable-element.component.ts +++ b/core/libs/sidebar/src/lib/draggable-element/draggable-element.component.ts @@ -24,7 +24,11 @@ export class DraggableElementComponent implements AfterViewInit { @Input() type: ElementType; @Input() urn?: string = ''; - constructor(public editorService: EditorService, private elementRef: ElementRef, private renderer: Renderer2) {} + constructor( + public editorService: EditorService, + private elementRef: ElementRef, + private renderer: Renderer2, + ) {} ngAfterViewInit(): void { this.elementRef.nativeElement.dataset.type = this.type; diff --git a/core/libs/sidebar/src/lib/sidebar-samm-elements/sidebar-samm-elements.component.ts b/core/libs/sidebar/src/lib/sidebar-samm-elements/sidebar-samm-elements.component.ts index 7e5d4c5b..e093814c 100644 --- a/core/libs/sidebar/src/lib/sidebar-samm-elements/sidebar-samm-elements.component.ts +++ b/core/libs/sidebar/src/lib/sidebar-samm-elements/sidebar-samm-elements.component.ts @@ -44,7 +44,10 @@ export class SidebarSAMMElementsComponent { return !this.mxGraphService.getAllCells()?.length; } - constructor(private modelService: ModelService, private mxGraphService: MxGraphService) {} + constructor( + private modelService: ModelService, + private mxGraphService: MxGraphService, + ) {} public isAspectAvailable(): Aspect { return this.modelService.loadedAspect; diff --git a/core/libs/sidebar/src/lib/sidebar-state.service.ts b/core/libs/sidebar/src/lib/sidebar-state.service.ts index c2c3eaf1..6e56e763 100644 --- a/core/libs/sidebar/src/lib/sidebar-state.service.ts +++ b/core/libs/sidebar/src/lib/sidebar-state.service.ts @@ -50,7 +50,10 @@ class Selection { #selection$ = new BehaviorSubject<{namespace: string; file: string}>(null); public selection$ = this.#selection$.asObservable(); - constructor(public namespace?: string, public file?: string) {} + constructor( + public namespace?: string, + public file?: string, + ) {} public select(namespace: string, file: string) { if (namespace && file) { @@ -137,7 +140,7 @@ export class SidebarStateService { private rdfService: RdfService, private modelApiService: ModelApiService, private notificationService: NotificationsService, - private browserService: BrowserService + private browserService: BrowserService, ) { this.manageSidebars(); requestAnimationFrame(() => { @@ -179,9 +182,9 @@ export class SidebarStateService { this.notificationService.error({ title: 'Could not retrieve the namespaces!', message: !err.status ? 'Please try to close and reopen the application.' : '', - }) - ) - ) + }), + ), + ), ); } diff --git a/core/libs/sidebar/src/lib/sidebar/sidebar.component.ts b/core/libs/sidebar/src/lib/sidebar/sidebar.component.ts index 1d637a4e..95c75066 100644 --- a/core/libs/sidebar/src/lib/sidebar/sidebar.component.ts +++ b/core/libs/sidebar/src/lib/sidebar/sidebar.component.ts @@ -32,7 +32,7 @@ export class SidebarComponent implements OnInit, OnDestroy { requestAnimationFrame(() => { this.changeDetector.detectChanges(); }); - }) + }), ); } diff --git a/core/libs/sidebar/src/lib/workspace/workspace-file-elements/workspace-file-elements.component.ts b/core/libs/sidebar/src/lib/workspace/workspace-file-elements/workspace-file-elements.component.ts index 8e5c3465..aa6891c9 100644 --- a/core/libs/sidebar/src/lib/workspace/workspace-file-elements/workspace-file-elements.component.ts +++ b/core/libs/sidebar/src/lib/workspace/workspace-file-elements/workspace-file-elements.component.ts @@ -47,7 +47,11 @@ export class WorkspaceFileElementsComponent implements OnInit { private searchThrottle: NodeJS.Timeout; - constructor(private editorService: EditorService, private mxGraphService: MxGraphService, private changeDetector: ChangeDetectorRef) {} + constructor( + private editorService: EditorService, + private mxGraphService: MxGraphService, + private changeDetector: ChangeDetectorRef, + ) {} ngOnInit(): void { this.selection$.pipe(filter(Boolean)).subscribe(({namespace, file}) => { diff --git a/core/libs/sidebar/src/lib/workspace/workspace-file-list/workspace-file-list.component.ts b/core/libs/sidebar/src/lib/workspace/workspace-file-list/workspace-file-list.component.ts index 31b59214..b613fd74 100644 --- a/core/libs/sidebar/src/lib/workspace/workspace-file-list/workspace-file-list.component.ts +++ b/core/libs/sidebar/src/lib/workspace/workspace-file-list/workspace-file-list.component.ts @@ -56,7 +56,7 @@ export class WorkspaceFileListComponent implements OnInit, OnDestroy { private fileHandlingService: FileHandlingService, private changeDetector: ChangeDetectorRef, private translate: LanguageTranslationService, - private ngZone: NgZone + private ngZone: NgZone, ) {} ngOnInit(): void { diff --git a/core/libs/sidebar/src/lib/workspace/workspace-migrate/workspace-migrate.component.ts b/core/libs/sidebar/src/lib/workspace/workspace-migrate/workspace-migrate.component.ts index 8e9cb049..ac6ebe1e 100644 --- a/core/libs/sidebar/src/lib/workspace/workspace-migrate/workspace-migrate.component.ts +++ b/core/libs/sidebar/src/lib/workspace/workspace-migrate/workspace-migrate.component.ts @@ -24,7 +24,10 @@ import {Subscription} from 'rxjs'; export class WorkspaceMigrateComponent implements OnDestroy { private subscription = new Subscription(); - constructor(private migratorService: MigratorService, private sidebarService: SidebarStateService) {} + constructor( + private migratorService: MigratorService, + private sidebarService: SidebarStateService, + ) {} ngOnDestroy() { this.subscription.unsubscribe(); diff --git a/core/libs/sidebar/src/lib/workspace/workspace.component.ts b/core/libs/sidebar/src/lib/workspace/workspace.component.ts index 5df2cce9..91e89635 100644 --- a/core/libs/sidebar/src/lib/workspace/workspace.component.ts +++ b/core/libs/sidebar/src/lib/workspace/workspace.component.ts @@ -44,7 +44,7 @@ export class WorkspaceComponent implements OnInit, OnDestroy { finalize(() => { this.loading = false; this.changeDetector.detectChanges(); - }) + }), ) .subscribe(); this.subscription.add(refreshing$); diff --git a/core/libs/translation/src/lib/services/language-translation.service.ts b/core/libs/translation/src/lib/services/language-translation.service.ts index a2eef8a6..558d444a 100644 --- a/core/libs/translation/src/lib/services/language-translation.service.ts +++ b/core/libs/translation/src/lib/services/language-translation.service.ts @@ -44,7 +44,7 @@ export class LanguageTranslationService { const onLangChangeSubscription$ = this.translate.onLangChange .pipe( switchMap((event: LangChangeEvent) => this.getTranslation(event.lang)), - finalize(() => onLangChangeSubscription$.unsubscribe()) + finalize(() => onLangChangeSubscription$.unsubscribe()), ) .subscribe(); } @@ -52,7 +52,7 @@ export class LanguageTranslationService { getTranslation(language: string): Observable { const getTranslateSubscription$ = this.translate.getTranslation(language).pipe( tap((translation: Translation) => (this.language = translation)), - finalize(() => getTranslateSubscription$.unsubscribe()) + finalize(() => getTranslateSubscription$.unsubscribe()), ); return getTranslateSubscription$; diff --git a/core/libs/utils/src/lib/components/elements-search/elements-search.component.ts b/core/libs/utils/src/lib/components/elements-search/elements-search.component.ts index 94d2adbf..be163ef1 100644 --- a/core/libs/utils/src/lib/components/elements-search/elements-search.component.ts +++ b/core/libs/utils/src/lib/components/elements-search/elements-search.component.ts @@ -59,7 +59,7 @@ export class ElementsSearchComponent { private searchesStateService: SearchesStateService, private confirmDialogService: ConfirmDialogService, private searchService: SearchService, - private translate: LanguageTranslationService + private translate: LanguageTranslationService, ) { this.searchControl.valueChanges.pipe(startWith(''), throttleTime(150)).subscribe(value => { this.elements = this.searchService diff --git a/core/libs/utils/src/lib/components/files-search/files-search.component.ts b/core/libs/utils/src/lib/components/files-search/files-search.component.ts index bff59209..908f1dc2 100644 --- a/core/libs/utils/src/lib/components/files-search/files-search.component.ts +++ b/core/libs/utils/src/lib/components/files-search/files-search.component.ts @@ -72,7 +72,7 @@ export class FilesSearchComponent { private saveModelDialog: SaveModelDialogService, private fileHandlingService: FileHandlingService, private searchService: SearchService, - private translate: LanguageTranslationService + private translate: LanguageTranslationService, ) { this.loading = true; this.parseFiles(this.namespaces); @@ -93,7 +93,7 @@ export class FilesSearchComponent { .afterClosed() .pipe( filter(result => result), - switchMap(result => (result === 'open-in' ? this.loadModel(file, namespace) : this.openWindow(file, namespace))) + switchMap(result => (result === 'open-in' ? this.loadModel(file, namespace) : this.openWindow(file, namespace))), ) .subscribe(console.log); @@ -116,7 +116,7 @@ export class FilesSearchComponent { private checkUnsavedChanges(): Observable { return this.modelSavingTracker.isSaved$.pipe( first(), - switchMap(isSaved => (isSaved ? of(true) : this.saveModelDialog.openDialog())) + switchMap(isSaved => (isSaved ? of(true) : this.saveModelDialog.openDialog())), ); } @@ -141,8 +141,8 @@ export class FilesSearchComponent { namespace, file, fromWorkspace: true, - }) - ) + }), + ), ); } @@ -154,8 +154,8 @@ export class FilesSearchComponent { message: fileStatus.errored ? this.translate.language.SEARCHES.FILES.NOTIFICATIONS.ERROR_MESSAGE : fileStatus.loaded - ? this.translate.language.SEARCHES.FILES.NOTIFICATIONS.ALREADY_LOADED_FILE_MESSAGE - : this.translate.language.SEARCHES.FILES.NOTIFICATIONS.LOCKED_FILE_MESSAGE, + ? this.translate.language.SEARCHES.FILES.NOTIFICATIONS.ALREADY_LOADED_FILE_MESSAGE + : this.translate.language.SEARCHES.FILES.NOTIFICATIONS.LOCKED_FILE_MESSAGE, }); return 'invalid-file'; } diff --git a/core/libs/utils/src/lib/utils.ts b/core/libs/utils/src/lib/utils.ts index 80c6af1a..09311d20 100644 --- a/core/libs/utils/src/lib/utils.ts +++ b/core/libs/utils/src/lib/utils.ts @@ -76,7 +76,7 @@ export const setUniqueElementName = ( modelElement: BaseMetaModelElement, rdfModel: RdfModel, namespaceCacheService: NamespacesCacheService, - name?: string + name?: string, ) => { name = name || `${modelElement.className}`.replace('Default', ''); diff --git a/core/libs/vocabulary/src/lib/samm.ts b/core/libs/vocabulary/src/lib/samm.ts index 31191903..2cb9c6a7 100644 --- a/core/libs/vocabulary/src/lib/samm.ts +++ b/core/libs/vocabulary/src/lib/samm.ts @@ -21,7 +21,10 @@ export class Samm { private alias = 'samm'; - constructor(public version: string, public identifier: string = 'urn:samm:org.eclipse.esmf.samm:') {} + constructor( + public version: string, + public identifier: string = 'urn:samm:org.eclipse.esmf.samm:', + ) {} static isDefaultNamespaceUri(value: string) { return (