From 7042cb19d0022be0493305116a465f36f8e3677c Mon Sep 17 00:00:00 2001
From: Julian-Mueller-GIP
<139366124+Julian-Mueller-GIP@users.noreply.github.com>
Date: Wed, 11 Dec 2024 11:13:07 +0100
Subject: [PATCH] 131 data type mask modifications (#133)
* added tabs for data types and exception types
* reworked tab components
---
document/datatype.component.html | 49 ++---
document/datatype.component.scss | 15 +-
document/datatype.component.ts | 10 +-
.../datatype-details.component.html | 3 +
.../datatype-details.component.scss} | 81 ++++----
.../datatype-details.component.ts | 182 ++++++++++++++++++
.../exceptiontype-details.component.html | 3 +
.../exceptiontype-details.component.scss | 34 ++++
.../exceptiontype-details.component.ts | 115 +++++++++++
.../member-variable-details.component.ts | 76 ++++----
.../method-details.component.ts | 80 ++++----
.../datatype/tabs/datatype-tab.component.ts | 103 ++++++----
.../datatype-storable-tab.component.html | 6 +
.../datatype-storable-tab.component.scss | 25 +++
.../datatype-storable-tab.component.ts | 30 +++
.../member-variable-meta-tab.component.ts | 94 ---------
.../method/method-meta-tab.component.html | 21 --
.../shared/documentation-tab.component.html | 7 +
.../shared/documentation-tab.component.scss | 25 +++
.../shared/documentation-tab.component.ts | 36 ++++
.../tabs/shared/meta-tab.component.html | 8 +
.../tabs/shared/meta-tab.component.scss | 25 +++
.../tabs/shared/meta-tab.component.ts | 44 +++++
document/exceptiontype.component.html | 22 ++-
document/exceptiontype.component.scss | 10 +-
document/exceptiontype.component.ts | 11 +-
document/servicegroup.component.html | 16 +-
document/servicegroup.component.scss | 11 +-
.../details-item/details-item.component.html | 3 +
.../details-item/details-item.component.scss | 55 ++++++
.../details-item/details-item.component.ts | 42 ++++
.../meta-tag-area.component.html} | 2 +-
.../meta-tag-area.component.scss} | 2 +-
.../meta-tag-area/meta-tag-area.component.ts} | 71 ++++---
.../meta-tag-rich-list.component.html | 0
.../meta-tag-rich-list.component.scss | 0
.../meta-tag-rich-list.component.ts | 0
document/type-document.component.ts | 21 +-
locale/pmod.DE.ts | 40 +++-
locale/pmod.EN.ts | 40 +++-
processmodeller.module.ts | 49 +++--
xo/data-type.model.ts | 8 +-
xo/details-item.model.ts | 33 ++++
43 files changed, 1114 insertions(+), 394 deletions(-)
create mode 100644 document/datatype/datatype-details/datatype-details.component.html
rename document/datatype/{tabs/member-variable/member-variable-meta-tab.component.scss => datatype-details/datatype-details.component.scss} (66%)
create mode 100644 document/datatype/datatype-details/datatype-details.component.ts
create mode 100644 document/datatype/exceptiontype-details/exceptiontype-details.component.html
create mode 100644 document/datatype/exceptiontype-details/exceptiontype-details.component.scss
create mode 100644 document/datatype/exceptiontype-details/exceptiontype-details.component.ts
create mode 100644 document/datatype/tabs/datatype/datatype-storable-tab.component.html
create mode 100644 document/datatype/tabs/datatype/datatype-storable-tab.component.scss
create mode 100644 document/datatype/tabs/datatype/datatype-storable-tab.component.ts
delete mode 100644 document/datatype/tabs/member-variable/member-variable-meta-tab.component.ts
delete mode 100644 document/datatype/tabs/method/method-meta-tab.component.html
create mode 100644 document/datatype/tabs/shared/documentation-tab.component.html
create mode 100644 document/datatype/tabs/shared/documentation-tab.component.scss
create mode 100644 document/datatype/tabs/shared/documentation-tab.component.ts
create mode 100644 document/datatype/tabs/shared/meta-tab.component.html
create mode 100644 document/datatype/tabs/shared/meta-tab.component.scss
create mode 100644 document/datatype/tabs/shared/meta-tab.component.ts
create mode 100644 document/shared/details-item/details-item.component.html
create mode 100644 document/shared/details-item/details-item.component.scss
create mode 100644 document/shared/details-item/details-item.component.ts
rename document/{datatype/tabs/member-variable/member-variable-meta-tab.component.html => shared/meta-tag-area/meta-tag-area.component.html} (90%)
rename document/{datatype/tabs/method/method-meta-tab.component.scss => shared/meta-tag-area/meta-tag-area.component.scss} (99%)
rename document/{datatype/tabs/method/method-meta-tab.component.ts => shared/meta-tag-area/meta-tag-area.component.ts} (58%)
rename document/{datatype/tabs/member-variable => shared}/meta-tag-rich-list/meta-tag-rich-list.component.html (100%)
rename document/{datatype/tabs/member-variable => shared}/meta-tag-rich-list/meta-tag-rich-list.component.scss (100%)
rename document/{datatype/tabs/member-variable => shared}/meta-tag-rich-list/meta-tag-rich-list.component.ts (100%)
create mode 100644 xo/details-item.model.ts
diff --git a/document/datatype.component.html b/document/datatype.component.html
index c51730e..e81b2d1 100644
--- a/document/datatype.component.html
+++ b/document/datatype.component.html
@@ -1,28 +1,16 @@
\ No newline at end of file
+
diff --git a/document/datatype.component.scss b/document/datatype.component.scss
index 427647b..3551109 100644
--- a/document/datatype.component.scss
+++ b/document/datatype.component.scss
@@ -35,8 +35,8 @@
flex: 0 1 auto;
height: 216px;
- type-documentation-area {
- padding-top: 12px;
+ .type-info-area {
+ flex: 0.7;
}
& > *:not(:first-child) {
@@ -49,10 +49,7 @@
}
.lib-area {
- display: flex;
- flex-direction: column;
- flex: 0 0 200px;
- overflow: auto;
+ flex: 0.3;
& > *:not(:last-child) {
margin-bottom: 12px;
@@ -82,6 +79,10 @@
margin: 2px 0 0 2px;
overflow: auto;
}
+
+ .detail-items {
+ padding: 8px;
+ }
}
}
-}
\ No newline at end of file
+}
diff --git a/document/datatype.component.ts b/document/datatype.component.ts
index 783d651..aef3bd6 100644
--- a/document/datatype.component.ts
+++ b/document/datatype.component.ts
@@ -17,6 +17,8 @@
*/
import { Component, Injector } from '@angular/core';
+import { XoDetailsItem } from '@pmod/xo/details-item.model';
+
import { ModellingActionType } from '../api/xmom.service';
import { XoDataTypeTypeLabelArea } from '../xo/data-type-type-label-area.model';
import { XoDataType } from '../xo/data-type.model';
@@ -28,7 +30,6 @@ import { XoMemberVariable } from '../xo/member-variable.model';
import { DataTypeDocumentModel } from './model/data-type-document.model';
import { SelectionService } from './selection.service';
import { TypeDocumentComponent } from './type-document.component';
-import { XoMetaTagArea } from '@pmod/xo/meta-tag-area.model';
@Component({
@@ -44,7 +45,6 @@ export class DataTypeComponent extends TypeDocumentComponent
diff --git a/document/datatype/tabs/member-variable/member-variable-meta-tab.component.scss b/document/datatype/datatype-details/datatype-details.component.scss
similarity index 66%
rename from document/datatype/tabs/member-variable/member-variable-meta-tab.component.scss
rename to document/datatype/datatype-details/datatype-details.component.scss
index 2b6cfcb..aa5a854 100644
--- a/document/datatype/tabs/member-variable/member-variable-meta-tab.component.scss
+++ b/document/datatype/datatype-details/datatype-details.component.scss
@@ -1,47 +1,34 @@
-/*
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- * Copyright 2024 Xyna GmbH, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- */
- @import 'const';
-
-:host {
- display: flex;
- flex-direction: column;
- flex: 1 1 auto;
-
- .items-row {
- display: flex;
- flex-direction: row;
- flex: 0 1 auto;
- padding: 10px;
- background-color: $color-gray-1;
-
- .input {
- margin: 5px 0px 7px 0px;
- ::ng-deep .mat-mdc-form-field-subscript-wrapper {
- display: none;
- }
- }
-
- .add {
- align-items: center;
- }
- }
-
- .rich-list {
- padding: 10px;
- }
-}
\ No newline at end of file
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Copyright 2024 Xyna GmbH, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+@import 'const';
+
+
+:host {
+ display: flex;
+ flex-direction: column;
+ flex: 1 1 auto;
+
+ ::ng-deep {
+ .mat-mdc-tab-group .mat-mdc-tab-body-wrapper .mat-mdc-tab-body {
+ scrollbar-width: thin;
+ .mat-mdc-tab-body-content {
+ background: unset;
+ }
+ }
+ }
+}
diff --git a/document/datatype/datatype-details/datatype-details.component.ts b/document/datatype/datatype-details/datatype-details.component.ts
new file mode 100644
index 0000000..05f45c2
--- /dev/null
+++ b/document/datatype/datatype-details/datatype-details.component.ts
@@ -0,0 +1,182 @@
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Copyright 2024 Xyna GmbH, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Injector, Input, OnDestroy, Optional } from '@angular/core';
+
+import { XoDataType } from '@pmod/xo/data-type.model';
+import { XoDetailsItem } from '@pmod/xo/details-item.model';
+import { I18nService } from '@zeta/i18n';
+import { XcTabBarItem } from '@zeta/xc';
+
+import { BehaviorSubject, Subject } from 'rxjs';
+
+import { XoRuntimeContext } from '../../../xo/runtime-context.model';
+import { ComponentMappingService } from '../../component-mapping.service';
+import { DocumentService } from '../../document.service';
+import { WorkflowDetailLevelService } from '../../workflow-detail-level.service';
+import { ModellingItemComponent } from '../../workflow/shared/modelling-object.component';
+import { BaseTabData, DataTypeTabData, DocumentationTabData, DocumentTabData, MetaTabData } from '../tabs/datatype-tab.component';
+import { DataTypeStorableTabComponent } from '../tabs/datatype/datatype-storable-tab.component';
+import { DocumentationTabComponent } from '../tabs/shared/documentation-tab.component';
+import { MetaTabComponent } from '../tabs/shared/meta-tab.component';
+
+
+@Component({
+ selector: 'datatype-details',
+ templateUrl: './datatype-details.component.html',
+ styleUrls: ['./datatype-details.component.scss'],
+ changeDetection: ChangeDetectionStrategy.OnPush
+})
+export class DataTypeDetailsComponent extends ModellingItemComponent implements OnDestroy {
+
+ @Input()
+ dataTypeRTC: XoRuntimeContext = null;
+
+ @Input()
+ set isStorable(value: boolean) {
+ if (value !== this._isStorable) {
+ this._isStorable = value;
+ this.updateTabBarItemList();
+ }
+ }
+
+ get dataType(): XoDataType {
+ return this.getModel() as XoDataType;
+ }
+
+ @Input()
+ set dataType(value: XoDataType) {
+ this.setModel(value);
+ if (value) {
+ this.refreshTabs();
+ }
+ this.cdr.markForCheck();
+ }
+
+ @Input()
+ set detailsItem(value: XoDetailsItem) {
+ if (value) {
+ this.refreshTabs();
+ }
+ this.cdr.markForCheck();
+ }
+
+ private _isStorable = false;
+
+ docTabUpdate: Subject = new BehaviorSubject(this.buildDocTabData());
+ metaTabUpdate: Subject = new BehaviorSubject(this.buildMetaTabData());
+ dataTypeTabUpdate: Subject = new BehaviorSubject(this.buildDataTypeTabData());
+
+ readonly documentationTabItem: XcTabBarItem> = {
+ closable: false,
+ component: DocumentationTabComponent,
+ name: this.i18nService.translate('pmod.datatype.type-documentation-area.documentation-label'),
+ data: >{
+ documentModel: this.documentModel,
+ performAction: this.performAction.bind(this),
+ update: this.docTabUpdate.asObservable()
+ }
+ };
+
+ readonly metaTagsTabItem: XcTabBarItem> = {
+ closable: false,
+ component: MetaTabComponent,
+ name: 'Meta',
+ data: >{
+ documentModel: this.documentModel,
+ performAction: this.performAction.bind(this),
+ update: this.metaTabUpdate.asObservable()
+ }
+ };
+
+ readonly storableTabItem: XcTabBarItem> = {
+ closable: false,
+ component: DataTypeStorableTabComponent,
+ name: 'ODS Information',
+ data: >{
+ documentModel: this.documentModel,
+ performAction: this.performAction.bind(this),
+ update: this.dataTypeTabUpdate.asObservable()
+ }
+ };
+
+ tabBarSelection: XcTabBarItem>;
+ tabBarItems: XcTabBarItem>[];
+
+ constructor(
+ elementRef: ElementRef,
+ componentMappingService: ComponentMappingService,
+ documentService: DocumentService,
+ detailLevelService: WorkflowDetailLevelService,
+ private readonly i18nService: I18nService,
+ private readonly cdr: ChangeDetectorRef,
+ @Optional() injector: Injector
+ ) {
+ super(elementRef, componentMappingService, documentService, detailLevelService, injector);
+ this.tabBarSelection = this.documentationTabItem;
+ this.updateTabBarItemList();
+ }
+
+ ngOnDestroy() {
+ this.docTabUpdate.complete();
+ this.metaTabUpdate.complete();
+ this.dataTypeTabUpdate.complete();
+ super.ngOnDestroy();
+ }
+
+ protected lockedChanged() {
+ this.cdr.markForCheck();
+ }
+
+
+ private buildDocTabData(): DocumentationTabData {
+ return {
+ documentationArea: this.dataType?.documentationArea,
+ readonly: this.readonly
+ };
+ }
+
+ private buildMetaTabData(): MetaTabData {
+ return {
+ metaTagArea: this.dataType?.metaTagArea,
+ objectIdKey: '',
+ objectId: '',
+ readonly: this.readonly
+ };
+ }
+
+ private buildDataTypeTabData(): DataTypeTabData {
+ return {
+ dataType: this.dataType,
+ readonly: this.readonly
+ };
+ }
+
+ private updateTabBarItemList() {
+ this.tabBarItems = [this.documentationTabItem, this.metaTagsTabItem];
+ if (this._isStorable) {
+ this.tabBarItems.push(this.storableTabItem);
+ }
+ this.cdr.markForCheck();
+ }
+
+ private refreshTabs() {
+ this.docTabUpdate.next(this.buildDocTabData());
+ this.metaTabUpdate.next(this.buildMetaTabData());
+ this.dataTypeTabUpdate.next(this.buildDataTypeTabData());
+ }
+}
diff --git a/document/datatype/exceptiontype-details/exceptiontype-details.component.html b/document/datatype/exceptiontype-details/exceptiontype-details.component.html
new file mode 100644
index 0000000..8f598e5
--- /dev/null
+++ b/document/datatype/exceptiontype-details/exceptiontype-details.component.html
@@ -0,0 +1,3 @@
+
diff --git a/document/datatype/exceptiontype-details/exceptiontype-details.component.scss b/document/datatype/exceptiontype-details/exceptiontype-details.component.scss
new file mode 100644
index 0000000..aa5a854
--- /dev/null
+++ b/document/datatype/exceptiontype-details/exceptiontype-details.component.scss
@@ -0,0 +1,34 @@
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Copyright 2024 Xyna GmbH, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+@import 'const';
+
+
+:host {
+ display: flex;
+ flex-direction: column;
+ flex: 1 1 auto;
+
+ ::ng-deep {
+ .mat-mdc-tab-group .mat-mdc-tab-body-wrapper .mat-mdc-tab-body {
+ scrollbar-width: thin;
+ .mat-mdc-tab-body-content {
+ background: unset;
+ }
+ }
+ }
+}
diff --git a/document/datatype/exceptiontype-details/exceptiontype-details.component.ts b/document/datatype/exceptiontype-details/exceptiontype-details.component.ts
new file mode 100644
index 0000000..6b0ea0d
--- /dev/null
+++ b/document/datatype/exceptiontype-details/exceptiontype-details.component.ts
@@ -0,0 +1,115 @@
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Copyright 2024 Xyna GmbH, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Injector, Input, OnDestroy, Optional } from '@angular/core';
+
+import { XoDetailsItem } from '@pmod/xo/details-item.model';
+import { XoExceptionType } from '@pmod/xo/exception-type.model';
+import { I18nService } from '@zeta/i18n';
+import { XcTabBarItem } from '@zeta/xc';
+
+import { BehaviorSubject, Subject } from 'rxjs';
+
+import { ComponentMappingService } from '../../component-mapping.service';
+import { DocumentService } from '../../document.service';
+import { WorkflowDetailLevelService } from '../../workflow-detail-level.service';
+import { ModellingItemComponent } from '../../workflow/shared/modelling-object.component';
+import { BaseTabData, DocumentationTabData, DocumentTabData } from '../tabs/datatype-tab.component';
+import { DocumentationTabComponent } from '../tabs/shared/documentation-tab.component';
+
+
+@Component({
+ selector: 'exceptiontype-details',
+ templateUrl: './exceptiontype-details.component.html',
+ styleUrls: ['./exceptiontype-details.component.scss'],
+ changeDetection: ChangeDetectionStrategy.OnPush
+})
+export class ExceptionTypeDetailsComponent extends ModellingItemComponent implements OnDestroy {
+
+ get exceptionType(): XoExceptionType {
+ return this.getModel() as XoExceptionType;
+ }
+
+ @Input()
+ set exceptionType(value: XoExceptionType) {
+ this.setModel(value);
+ if (value) {
+ this.docTabUpdate.next(this.buildDocTabData());
+ }
+ this.cdr.markForCheck();
+ }
+
+ @Input()
+ set detailsItem(value: XoDetailsItem) {
+ if (value) {
+ this.docTabUpdate.next(this.buildDocTabData());
+ }
+ this.cdr.markForCheck();
+ }
+
+ docTabUpdate: Subject = new BehaviorSubject(this.buildDocTabData());
+
+ readonly documentationTabItem: XcTabBarItem> = {
+ closable: false,
+ component: DocumentationTabComponent,
+ name: this.i18nService.translate('pmod.datatype.type-documentation-area.documentation-label'),
+ data: >{
+ documentModel: this.documentModel,
+ performAction: this.performAction.bind(this),
+ update: this.docTabUpdate.asObservable()
+ }
+ };
+
+ tabBarSelection: XcTabBarItem>;
+ tabBarItems: XcTabBarItem>[];
+
+ constructor(
+ elementRef: ElementRef,
+ componentMappingService: ComponentMappingService,
+ documentService: DocumentService,
+ detailLevelService: WorkflowDetailLevelService,
+ private readonly i18nService: I18nService,
+ private readonly cdr: ChangeDetectorRef,
+ @Optional() injector: Injector
+ ) {
+ super(elementRef, componentMappingService, documentService, detailLevelService, injector);
+ this.tabBarSelection = this.documentationTabItem;
+ this.updateTabBarItemList();
+ }
+
+ ngOnDestroy() {
+ this.docTabUpdate.complete();
+ super.ngOnDestroy();
+ }
+
+ protected lockedChanged() {
+ this.cdr.markForCheck();
+ }
+
+
+ private buildDocTabData(): DocumentationTabData {
+ return {
+ documentationArea: this.exceptionType?.documentationArea,
+ readonly: this.readonly
+ };
+ }
+
+ private updateTabBarItemList() {
+ this.tabBarItems = [this.documentationTabItem];
+ this.cdr.markForCheck();
+ }
+}
diff --git a/document/datatype/member-variable-details/member-variable-details.component.ts b/document/datatype/member-variable-details/member-variable-details.component.ts
index d7c9218..53752fb 100644
--- a/document/datatype/member-variable-details/member-variable-details.component.ts
+++ b/document/datatype/member-variable-details/member-variable-details.component.ts
@@ -19,17 +19,18 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Inje
import { XcTabBarItem } from '@zeta/xc';
+import { BehaviorSubject, Subject } from 'rxjs';
+
import { WorkflowDetailLevelService } from '../../../document/workflow-detail-level.service';
import { XoMemberVariable } from '../../../xo/member-variable.model';
import { XoRuntimeContext } from '../../../xo/runtime-context.model';
import { ComponentMappingService } from '../../component-mapping.service';
import { DocumentService } from '../../document.service';
import { ModellingItemComponent } from '../../workflow/shared/modelling-object.component';
-import { MemberVariableStorableTabComponent } from '../tabs/member-variable/member-variable-storable-tab.component';
-import { DatatypeTabData, VariableTabData } from '../tabs/datatype-tab.component';
+import { BaseTabData, DocumentTabData, MetaTabData, VariableTabData } from '../tabs/datatype-tab.component';
import { MemberVariableBaseTabComponent } from '../tabs/member-variable/member-variable-base-tab.component';
-import { BehaviorSubject, Subject } from 'rxjs';
-import { MemberVariableMetaTabComponent } from '../tabs/member-variable/member-variable-meta-tab.component';
+import { MemberVariableStorableTabComponent } from '../tabs/member-variable/member-variable-storable-tab.component';
+import { MetaTabComponent } from '../tabs/shared/meta-tab.component';
@Component({
@@ -52,44 +53,59 @@ export class MemberVariableDetailsComponent extends ModellingItemComponent imple
}
private _isStorable = false;
+ get memberVariable(): XoMemberVariable {
+ return this.getModel() as XoMemberVariable;
+ }
+
+ @Input()
+ set memberVariable(value: XoMemberVariable) {
+ this.setModel(value);
+ if (value) {
+ this.baseTabItem.name = this.memberVariable?.label ?? 'Base';
+ this.memberTabUpdate.next(this.buildMemberTabData());
+ this.metaTabUpdate.next(this.buildMetaTabData());
+ }
+ this.cdr.markForCheck();
+ }
- tabUpdate: Subject = new BehaviorSubject(this.buildDatatypeTabData());
+ memberTabUpdate: Subject = new BehaviorSubject(this.buildMemberTabData());
+ metaTabUpdate: Subject = new BehaviorSubject(this.buildMetaTabData());
- readonly baseTabItem: XcTabBarItem> = {
+ readonly baseTabItem: XcTabBarItem> = {
closable: false,
component: MemberVariableBaseTabComponent,
name: 'Base',
- data: >{
+ data: >{
documentModel: this.documentModel,
performAction: this.performAction.bind(this),
- update: this.tabUpdate.asObservable()
+ update: this.memberTabUpdate.asObservable()
}
};
- readonly metaTabItem: XcTabBarItem> = {
+ readonly metaTabItem: XcTabBarItem> = {
closable: false,
- component: MemberVariableMetaTabComponent,
+ component: MetaTabComponent,
name: 'Meta',
- data: >{
+ data: >{
documentModel: this.documentModel,
performAction: this.performAction.bind(this),
- update: this.tabUpdate.asObservable()
+ update: this.metaTabUpdate.asObservable()
}
};
- readonly storableTabItem: XcTabBarItem> = {
+ readonly storableTabItem: XcTabBarItem> = {
closable: false,
component: MemberVariableStorableTabComponent,
name: 'Storable',
- data: >{
+ data: >{
documentModel: this.documentModel,
performAction: this.performAction.bind(this),
- update: this.tabUpdate.asObservable()
+ update: this.memberTabUpdate.asObservable()
}
};
- tabBarSelection: XcTabBarItem>;
- tabBarItems: XcTabBarItem>[];
+ tabBarSelection: XcTabBarItem>;
+ tabBarItems: XcTabBarItem>[];
constructor(
elementRef: ElementRef,
@@ -105,7 +121,8 @@ export class MemberVariableDetailsComponent extends ModellingItemComponent imple
}
ngOnDestroy() {
- this.tabUpdate.complete();
+ this.memberTabUpdate.complete();
+ this.metaTabUpdate.complete();
super.ngOnDestroy();
}
@@ -115,7 +132,7 @@ export class MemberVariableDetailsComponent extends ModellingItemComponent imple
}
- private buildDatatypeTabData(): VariableTabData {
+ private buildMemberTabData(): VariableTabData {
return {
variable: this.memberVariable,
dataTypeRTC: this.dataTypeRTC,
@@ -123,20 +140,13 @@ export class MemberVariableDetailsComponent extends ModellingItemComponent imple
};
}
-
- get memberVariable(): XoMemberVariable {
- return this.getModel() as XoMemberVariable;
- }
-
-
- @Input()
- set memberVariable(value: XoMemberVariable) {
- this.setModel(value);
- if (value) {
- this.baseTabItem.name = this.memberVariable?.label ?? 'Base';
- this.tabUpdate.next(this.buildDatatypeTabData());
- }
- this.cdr.markForCheck();
+ private buildMetaTabData(): MetaTabData {
+ return {
+ metaTagArea: this.memberVariable?.metaTagArea,
+ objectIdKey: 'members',
+ objectId: this.memberVariable?.name,
+ readonly: this.readonly
+ };
}
private updateTabBarItemList() {
diff --git a/document/datatype/method-details/method-details.component.ts b/document/datatype/method-details/method-details.component.ts
index 40c1771..47f7aff 100644
--- a/document/datatype/method-details/method-details.component.ts
+++ b/document/datatype/method-details/method-details.component.ts
@@ -17,20 +17,20 @@
*/
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Injector, Input, OnDestroy, Optional } from '@angular/core';
+import { I18nService } from '@zeta/i18n';
import { XcTabBarItem } from '@zeta/xc';
+import { BehaviorSubject, Subject } from 'rxjs';
import { WorkflowDetailLevelService } from '../../../document/workflow-detail-level.service';
import { XoMethod } from '../../../xo/method.model';
import { ComponentMappingService } from '../../component-mapping.service';
import { DocumentService } from '../../document.service';
import { ModellingItemComponent } from '../../workflow/shared/modelling-object.component';
-import { DatatypeTabData, MethodTabData } from '../tabs/datatype-tab.component';
+import { BaseTabData, DocumentTabData, MetaTabData, MethodTabData } from '../tabs/datatype-tab.component';
import { MethodBaseTabComponent } from '../tabs/method/method-base-tab.component';
-import { MethodMetaTabComponent } from '../tabs/method/method-meta-tab.component';
-import { BehaviorSubject, Subject } from 'rxjs';
import { MethodImplementationTabComponent } from '../tabs/method/method-implementation-tab.component';
-import { I18nService } from '@zeta/i18n';
+import { MetaTabComponent } from '../tabs/shared/meta-tab.component';
@Component({
@@ -41,44 +41,59 @@ import { I18nService } from '@zeta/i18n';
})
export class MethodDetailsComponent extends ModellingItemComponent implements OnDestroy {
- tabUpdate: Subject = new BehaviorSubject(this.buildDatatypeTabData());
+ get method(): XoMethod {
+ return this.getModel() as XoMethod;
+ }
+
+ @Input()
+ set method(value: XoMethod) {
+ this.setModel(value);
+ if (value) {
+ this.baseTabItem.name = this.method?.label ?? 'Base';
+ this.methodTabUpdate.next(this.buildMethodTabData());
+ this.metaTabUpdate.next(this.buildMetaTabData());
+ }
+ this.cdr.markForCheck();
+ }
+
+ methodTabUpdate: Subject = new BehaviorSubject(this.buildMethodTabData());
+ metaTabUpdate: Subject = new BehaviorSubject(this.buildMetaTabData());
- readonly baseTabItem: XcTabBarItem> = {
+ readonly baseTabItem: XcTabBarItem> = {
closable: false,
component: MethodBaseTabComponent,
name: 'Base',
- data: >{
+ data: >{
documentModel: this.documentModel,
performAction: this.performAction.bind(this),
- update: this.tabUpdate.asObservable()
+ update: this.methodTabUpdate.asObservable()
}
};
- readonly metaTabItem: XcTabBarItem> = {
+ readonly metaTabItem: XcTabBarItem> = {
closable: false,
- component: MethodMetaTabComponent,
+ component: MetaTabComponent,
name: 'Meta',
- data: >{
+ data: >{
documentModel: this.documentModel,
performAction: this.performAction.bind(this),
- update: this.tabUpdate.asObservable()
+ update: this.metaTabUpdate.asObservable()
}
};
- readonly implementationTabItem: XcTabBarItem> = {
+ readonly implementationTabItem: XcTabBarItem> = {
closable: false,
component: MethodImplementationTabComponent,
name: this.i18nService.translate('pmod.datatype.method-details.implementation'),
- data: >{
+ data: >{
documentModel: this.documentModel,
performAction: this.performAction.bind(this),
- update: this.tabUpdate.asObservable()
+ update: this.methodTabUpdate.asObservable()
}
};
-
- tabBarSelection: XcTabBarItem>;
- tabBarItems: XcTabBarItem>[];
+ tabBarSelection: XcTabBarItem>;
+ tabBarItems: XcTabBarItem>[];
constructor(
@@ -97,7 +112,8 @@ export class MethodDetailsComponent extends ModellingItemComponent implements On
ngOnDestroy() {
- this.tabUpdate.complete();
+ this.methodTabUpdate.complete();
+ this.metaTabUpdate.complete();
super.ngOnDestroy();
}
@@ -107,29 +123,21 @@ export class MethodDetailsComponent extends ModellingItemComponent implements On
}
- get method(): XoMethod {
- return this.getModel() as XoMethod;
- }
-
-
- @Input()
- set method(value: XoMethod) {
- this.setModel(value);
- if (value) {
- this.baseTabItem.name = this.method?.label ?? 'Base';
- this.tabUpdate.next(this.buildDatatypeTabData());
- }
- this.cdr.markForCheck();
- }
-
-
- private buildDatatypeTabData(): MethodTabData {
+ private buildMethodTabData(): MethodTabData {
return {
method: this.method,
readonly: this.readonly
};
}
+ private buildMetaTabData(): MetaTabData {
+ return {
+ metaTagArea: this.method?.metaTagArea,
+ objectIdKey: 'services',
+ objectId: this.method?.name,
+ readonly: this.readonly
+ };
+ }
private updateTabBarItemList() {
this.tabBarItems = [this.baseTabItem, this.metaTabItem, this.implementationTabItem];
diff --git a/document/datatype/tabs/datatype-tab.component.ts b/document/datatype/tabs/datatype-tab.component.ts
index d89bef6..397c1a5 100644
--- a/document/datatype/tabs/datatype-tab.component.ts
+++ b/document/datatype/tabs/datatype-tab.component.ts
@@ -1,21 +1,22 @@
/*
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- * Copyright 2024 Xyna GmbH, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- */
+* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+* Copyright 2024 Xyna GmbH, Germany
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+*/
import { ChangeDetectorRef, Component, Injector, OnDestroy, Optional } from '@angular/core';
+
import { ModellingActionType } from '@pmod/api/xmom.service';
import { DocumentService } from '@pmod/document/document.service';
import { DocumentItem, DocumentModel } from '@pmod/document/model/document.model';
@@ -26,31 +27,51 @@ import { XoChangeMemberVariableIsListRequest } from '@pmod/xo/change-member-vari
import { XoDataType } from '@pmod/xo/data-type.model';
import { XoDynamicMethod } from '@pmod/xo/dynamic-method.model';
import { XoMemberVariable } from '@pmod/xo/member-variable.model';
+import { XoMetaTagArea } from '@pmod/xo/meta-tag-area.model';
import { XoMethod } from '@pmod/xo/method.model';
import { XoModellingItem } from '@pmod/xo/modelling-item.model';
import { XoMoveModellingObjectRequest } from '@pmod/xo/move-modelling-object-request.model';
import { XoRequest } from '@pmod/xo/request.model';
import { XoRuntimeContext } from '@pmod/xo/runtime-context.model';
import { XoStaticMethod } from '@pmod/xo/static-method.model';
+import { XoTextArea } from '@pmod/xo/text-area.model';
import { FullQualifiedName } from '@zeta/api';
import { XcTabComponent } from '@zeta/xc';
+
import { Observable, Subject, takeUntil } from 'rxjs';
-export interface DatatypeTabData {
+
+export interface DocumentTabData {
documentModel: DocumentModel;
performAction: (action: TriggeredAction) => void;
update: Observable;
}
-export interface VariableTabData {
+export interface BaseTabData {
+ readonly: boolean;
+}
+
+export interface DocumentationTabData extends BaseTabData {
+ documentationArea: XoTextArea;
+}
+
+export interface MetaTabData extends BaseTabData {
+ metaTagArea: XoMetaTagArea;
+ objectIdKey: string;
+ objectId: string;
+}
+
+export interface DataTypeTabData extends BaseTabData {
+ dataType: XoDataType;
+}
+
+export interface VariableTabData extends BaseTabData {
variable: XoMemberVariable;
dataTypeRTC: XoRuntimeContext;
- readonly: boolean;
}
-export interface MethodTabData {
+export interface MethodTabData extends BaseTabData {
method: XoMethod;
- readonly: boolean;
}
@@ -60,11 +81,19 @@ export interface MethodTabData {
@Component({
template: ''
})
-export abstract class DatatypeTabComponent extends XcTabComponent> implements OnDestroy {
+export abstract class DatatypeTabComponent extends XcTabComponent> implements OnDestroy {
private readonly destroySubject = new Subject();
protected tabData: D;
+ get readonly(): boolean {
+ return this.tabData?.readonly;
+ }
+
+ get documentModel(): DocumentModel {
+ return this.injectedData.documentModel;
+ }
+
constructor(
protected readonly documentService: DocumentService,
protected readonly cdr: ChangeDetectorRef,
@@ -88,10 +117,6 @@ export abstract class DatatypeTabComponent extends XcTabComponent {
- return this.injectedData.documentModel;
- }
-
performAction(action: TriggeredAction): void {
this.injectedData.performAction(action);
@@ -101,16 +126,23 @@ export abstract class DatatypeTabComponent extends XcTabComponent {
+export abstract class DatatypeDetailsTabComponent extends DatatypeTabComponent {
- get memberVariable(): XoMemberVariable {
- return this.tabData?.variable;
+ get dataType(): XoDataType {
+ return this.tabData?.dataType;
}
+}
- get readonly(): boolean {
- return this.tabData?.readonly;
+@Component({
+ template: ''
+})
+export abstract class DatatypeVariableTabComponent extends DatatypeTabComponent {
+
+
+ get memberVariable(): XoMemberVariable {
+ return this.tabData?.variable;
}
@@ -164,11 +196,6 @@ export abstract class DatatypeMethodTabComponent extends DatatypeTabComponent
diff --git a/document/datatype/tabs/datatype/datatype-storable-tab.component.scss b/document/datatype/tabs/datatype/datatype-storable-tab.component.scss
new file mode 100644
index 0000000..537a439
--- /dev/null
+++ b/document/datatype/tabs/datatype/datatype-storable-tab.component.scss
@@ -0,0 +1,25 @@
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Copyright 2024 Xyna GmbH, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+@import 'const';
+
+:host {
+ display: flex;
+ flex-direction: column;
+ flex: 1 1 100%;
+ padding: 10px;
+}
diff --git a/document/datatype/tabs/datatype/datatype-storable-tab.component.ts b/document/datatype/tabs/datatype/datatype-storable-tab.component.ts
new file mode 100644
index 0000000..3c80d3c
--- /dev/null
+++ b/document/datatype/tabs/datatype/datatype-storable-tab.component.ts
@@ -0,0 +1,30 @@
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Copyright 2024 Xyna GmbH, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+import { ChangeDetectionStrategy, Component } from '@angular/core';
+
+import { DatatypeDetailsTabComponent } from '../datatype-tab.component';
+
+
+@Component({
+ templateUrl: './datatype-storable-tab.component.html',
+ styleUrls: ['./datatype-storable-tab.component.scss'],
+ changeDetection: ChangeDetectionStrategy.OnPush
+})
+export class DataTypeStorableTabComponent extends DatatypeDetailsTabComponent {
+
+}
diff --git a/document/datatype/tabs/member-variable/member-variable-meta-tab.component.ts b/document/datatype/tabs/member-variable/member-variable-meta-tab.component.ts
deleted file mode 100644
index 9c84abf..0000000
--- a/document/datatype/tabs/member-variable/member-variable-meta-tab.component.ts
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- * Copyright 2024 Xyna GmbH, Germany
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- */
-import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Injector, Optional } from '@angular/core';
-import { DataTypeService } from '@pmod/document/datatype.service';
-import { DocumentService } from '@pmod/document/document.service';
-import { I18nService } from '@zeta/i18n';
-import { XcRichListItem } from '@zeta/xc';
-import { MetaTagComponent, MetaTagRichListData } from './meta-tag-rich-list/meta-tag-rich-list.component';
-import { DatatypeVariableTabComponent } from '../datatype-tab.component';
-import { XoMetaTag } from '@pmod/xo/meta-tag.model';
-import { HttpMethod, ModellingActionType } from '@pmod/api/xmom.service';
-import { XoMetaTagRequest } from '@pmod/xo/meta-tag-request.model';
-import { Subject } from 'rxjs';
-
-@Component({
- templateUrl: './member-variable-meta-tab.component.html',
- styleUrls: ['./member-variable-meta-tab.component.scss'],
- changeDetection: ChangeDetectionStrategy.OnPush
-})
-export class MemberVariableMetaTabComponent extends DatatypeVariableTabComponent {
-
- metaTagsItems: XcRichListItem[];
- newTag: string;
- removeSubject: Subject = new Subject();
-
- constructor(
- documentService: DocumentService,
- private readonly dataTypeService: DataTypeService,
- private readonly i18n: I18nService,
- cdr: ChangeDetectorRef,
- @Optional() injector: Injector
- ) {
- super(documentService, cdr, injector);
-
- this.untilDestroyed(this.injectedData.update).subscribe(() => {
- this.refreshRichList();
- });
-
- this.untilDestroyed(this.removeSubject.asObservable()).subscribe(metaTag => {
- this.removeMetaTag(metaTag);
- });
- }
-
- private refreshRichList() {
- this.metaTagsItems = this.memberVariable.metaTagArea.metaTags.map(tag =>
- >{
- component: MetaTagComponent,
- data: {
- metaTag: tag,
- removeSubject: this.removeSubject
- }
- }
- );
- }
-
- addMetaTag() {
- const metaTag: XoMetaTag = new XoMetaTag();
- metaTag.tag = this.newTag;
- const request: XoMetaTagRequest = new XoMetaTagRequest();
- request.metaTag = metaTag;
- this.performAction({
- type: ModellingActionType.meta,
- objectIdKey: 'members',
- objectId: this.memberVariable.name,
- request: request,
- method: HttpMethod.PUT
- });
- }
-
- removeMetaTag(metaTag: XoMetaTag) {
- this.performAction({
- type: ModellingActionType.meta,
- objectIdKey: 'members',
- objectId: this.memberVariable.name,
- method: HttpMethod.DELETE,
- paramSet: {metaTagId: metaTag.id}
- });
- }
-}
diff --git a/document/datatype/tabs/method/method-meta-tab.component.html b/document/datatype/tabs/method/method-meta-tab.component.html
deleted file mode 100644
index e1813bb..0000000
--- a/document/datatype/tabs/method/method-meta-tab.component.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/document/datatype/tabs/shared/documentation-tab.component.html b/document/datatype/tabs/shared/documentation-tab.component.html
new file mode 100644
index 0000000..b31b7b3
--- /dev/null
+++ b/document/datatype/tabs/shared/documentation-tab.component.html
@@ -0,0 +1,7 @@
+
diff --git a/document/datatype/tabs/shared/documentation-tab.component.scss b/document/datatype/tabs/shared/documentation-tab.component.scss
new file mode 100644
index 0000000..537a439
--- /dev/null
+++ b/document/datatype/tabs/shared/documentation-tab.component.scss
@@ -0,0 +1,25 @@
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Copyright 2024 Xyna GmbH, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+@import 'const';
+
+:host {
+ display: flex;
+ flex-direction: column;
+ flex: 1 1 100%;
+ padding: 10px;
+}
diff --git a/document/datatype/tabs/shared/documentation-tab.component.ts b/document/datatype/tabs/shared/documentation-tab.component.ts
new file mode 100644
index 0000000..9a3157d
--- /dev/null
+++ b/document/datatype/tabs/shared/documentation-tab.component.ts
@@ -0,0 +1,36 @@
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Copyright 2024 Xyna GmbH, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+import { ChangeDetectionStrategy, Component } from '@angular/core';
+
+import { XoTextArea } from '@pmod/xo/text-area.model';
+
+import { DatatypeTabComponent, DocumentationTabData } from '../datatype-tab.component';
+
+
+@Component({
+ templateUrl: './documentation-tab.component.html',
+ styleUrls: ['./documentation-tab.component.scss'],
+ changeDetection: ChangeDetectionStrategy.OnPush
+})
+export class DocumentationTabComponent extends DatatypeTabComponent {
+
+ get documentationArea(): XoTextArea {
+ return this.tabData?.documentationArea;
+ }
+
+}
diff --git a/document/datatype/tabs/shared/meta-tab.component.html b/document/datatype/tabs/shared/meta-tab.component.html
new file mode 100644
index 0000000..71442a4
--- /dev/null
+++ b/document/datatype/tabs/shared/meta-tab.component.html
@@ -0,0 +1,8 @@
+
diff --git a/document/datatype/tabs/shared/meta-tab.component.scss b/document/datatype/tabs/shared/meta-tab.component.scss
new file mode 100644
index 0000000..53d7454
--- /dev/null
+++ b/document/datatype/tabs/shared/meta-tab.component.scss
@@ -0,0 +1,25 @@
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Copyright 2024 Xyna GmbH, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+ @import 'const';
+
+:host {
+ display: flex;
+ flex-direction: column;
+ flex: 1 1 auto;
+ padding: 10px;
+}
diff --git a/document/datatype/tabs/shared/meta-tab.component.ts b/document/datatype/tabs/shared/meta-tab.component.ts
new file mode 100644
index 0000000..1c01a00
--- /dev/null
+++ b/document/datatype/tabs/shared/meta-tab.component.ts
@@ -0,0 +1,44 @@
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Copyright 2024 Xyna GmbH, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+import { ChangeDetectionStrategy, Component } from '@angular/core';
+
+import { XoMetaTagArea } from '@pmod/xo/meta-tag-area.model';
+
+import { DatatypeTabComponent, MetaTabData } from '../datatype-tab.component';
+
+
+@Component({
+ templateUrl: './meta-tab.component.html',
+ styleUrls: ['./meta-tab.component.scss'],
+ changeDetection: ChangeDetectionStrategy.OnPush
+})
+export class MetaTabComponent extends DatatypeTabComponent {
+
+ get metaTagArea(): XoMetaTagArea {
+ return this.tabData?.metaTagArea;
+ }
+
+ get objectIdKey(): string {
+ return this.tabData?.objectIdKey;
+ }
+
+ get objectId(): string {
+ return this.tabData?.objectId;
+ }
+
+}
diff --git a/document/exceptiontype.component.html b/document/exceptiontype.component.html
index 7c7af3f..5601a90 100644
--- a/document/exceptiontype.component.html
+++ b/document/exceptiontype.component.html
@@ -1,5 +1,4 @@
-
-
\ No newline at end of file
+
diff --git a/document/exceptiontype.component.scss b/document/exceptiontype.component.scss
index 2e3e128..4effbb7 100644
--- a/document/exceptiontype.component.scss
+++ b/document/exceptiontype.component.scss
@@ -40,10 +40,9 @@
}
type-info-area {
- flex: 0.4;
+ flex: 0.7;
}
- type-documentation-area,
exception-messages-area {
padding-top: 12px;
flex: 0.3;
@@ -70,12 +69,17 @@
padding: 0 2px;
overflow: auto;
}
+
.details {
display: flex;
flex: 1 1 auto;
margin: 2px 0 0 2px;
overflow: auto;
}
+
+ .detail-items {
+ padding: 8px;
+ }
}
}
-}
\ No newline at end of file
+}
diff --git a/document/exceptiontype.component.ts b/document/exceptiontype.component.ts
index de95209..9c030df 100644
--- a/document/exceptiontype.component.ts
+++ b/document/exceptiontype.component.ts
@@ -15,7 +15,9 @@
* limitations under the License.
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
-import { Component } from '@angular/core';
+import { Component, Injector } from '@angular/core';
+
+import { XoDetailsItem } from '@pmod/xo/details-item.model';
import { ModellingActionType } from '../api/xmom.service';
import { XoExceptionType } from '../xo/exception-type.model';
@@ -42,6 +44,13 @@ export class ExceptionTypeComponent extends TypeDocumentComponent
\ No newline at end of file
+
diff --git a/document/servicegroup.component.scss b/document/servicegroup.component.scss
index d807894..ed7b050 100644
--- a/document/servicegroup.component.scss
+++ b/document/servicegroup.component.scss
@@ -44,11 +44,12 @@
padding: 8px;
}
+ .type-info-area {
+ flex: 0.7;
+ }
+
.lib-area {
- display: flex;
- flex-direction: column;
- flex: 0 0 200px;
- overflow: auto;
+ flex: 0.3;
& > *:not(:last-child) {
margin-bottom: 12px;
@@ -83,4 +84,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/document/shared/details-item/details-item.component.html b/document/shared/details-item/details-item.component.html
new file mode 100644
index 0000000..09ddc17
--- /dev/null
+++ b/document/shared/details-item/details-item.component.html
@@ -0,0 +1,3 @@
+
+ {{detailsItem.name | xcI18n}}
+
diff --git a/document/shared/details-item/details-item.component.scss b/document/shared/details-item/details-item.component.scss
new file mode 100644
index 0000000..934c489
--- /dev/null
+++ b/document/shared/details-item/details-item.component.scss
@@ -0,0 +1,55 @@
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Copyright 2024 Xyna GmbH, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+@import "const";
+
+$menu-width: 20px;
+
+
+:host {
+ width: 100%;
+ display: flex;
+ flex: 0 1 auto;
+ margin: 2px;
+ z-index: $service-step-label-z;
+ border-radius: $service-step-border-radius;
+ overflow: hidden;
+
+ &:focus, &.selected {
+ outline: none;
+
+ .label {
+ color: $color-invert;
+ background-color: $color-primary;
+ }
+ }
+
+ .label {
+ padding: 8px $menu-width 8px $menu-width;
+
+ color: $color-normal;
+ background-color: $color-invert;
+ flex: 1 1 auto;
+ font-weight: bold;
+ font-size: $pmod-medium;
+
+ max-width: 374px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+}
diff --git a/document/shared/details-item/details-item.component.ts b/document/shared/details-item/details-item.component.ts
new file mode 100644
index 0000000..849ce60
--- /dev/null
+++ b/document/shared/details-item/details-item.component.ts
@@ -0,0 +1,42 @@
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Copyright 2024 Xyna GmbH, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+
+import { Component, Input } from '@angular/core';
+
+import { XoDetailsItem } from '@pmod/xo/details-item.model';
+
+import { SelectableModellingObjectComponent } from '../../workflow/shared/selectable-modelling-object.component';
+
+
+@Component({
+ selector: 'details-item',
+ templateUrl: './details-item.component.html',
+ styleUrls: ['./details-item.component.scss']
+})
+export class DetailsItemComponent extends SelectableModellingObjectComponent {
+
+ @Input()
+ set detailsItem(value: XoDetailsItem) {
+ this.setModel(value);
+ }
+
+ get detailsItem(): XoDetailsItem {
+ return this.getModel() as XoDetailsItem;
+ }
+
+}
diff --git a/document/datatype/tabs/member-variable/member-variable-meta-tab.component.html b/document/shared/meta-tag-area/meta-tag-area.component.html
similarity index 90%
rename from document/datatype/tabs/member-variable/member-variable-meta-tab.component.html
rename to document/shared/meta-tag-area/meta-tag-area.component.html
index e1813bb..85c7671 100644
--- a/document/datatype/tabs/member-variable/member-variable-meta-tab.component.html
+++ b/document/shared/meta-tag-area/meta-tag-area.component.html
@@ -18,4 +18,4 @@
-
\ No newline at end of file
+
diff --git a/document/datatype/tabs/method/method-meta-tab.component.scss b/document/shared/meta-tag-area/meta-tag-area.component.scss
similarity index 99%
rename from document/datatype/tabs/method/method-meta-tab.component.scss
rename to document/shared/meta-tag-area/meta-tag-area.component.scss
index 2b6cfcb..fb0c099 100644
--- a/document/datatype/tabs/method/method-meta-tab.component.scss
+++ b/document/shared/meta-tag-area/meta-tag-area.component.scss
@@ -44,4 +44,4 @@
.rich-list {
padding: 10px;
}
-}
\ No newline at end of file
+}
diff --git a/document/datatype/tabs/method/method-meta-tab.component.ts b/document/shared/meta-tag-area/meta-tag-area.component.ts
similarity index 58%
rename from document/datatype/tabs/method/method-meta-tab.component.ts
rename to document/shared/meta-tag-area/meta-tag-area.component.ts
index c5e2e84..61c32b1 100644
--- a/document/datatype/tabs/method/method-meta-tab.component.ts
+++ b/document/shared/meta-tag-area/meta-tag-area.component.ts
@@ -15,49 +15,70 @@
* limitations under the License.
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
-import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Injector, Optional } from '@angular/core';
-import { DataTypeService } from '@pmod/document/datatype.service';
+import { Component, ElementRef, Injector, Input, Optional } from '@angular/core';
+
+import { HttpMethod, ModellingActionType } from '@pmod/api/xmom.service';
+import { ComponentMappingService } from '@pmod/document/component-mapping.service';
import { DocumentService } from '@pmod/document/document.service';
+import { MetaTagComponent, MetaTagRichListData } from '@pmod/document/shared/meta-tag-rich-list/meta-tag-rich-list.component';
+import { ModellingObjectComponent } from '@pmod/document/workflow/shared/modelling-object.component';
+import { XoMetaTagArea } from '@pmod/xo/meta-tag-area.model';
+import { XoMetaTagRequest } from '@pmod/xo/meta-tag-request.model';
+import { XoMetaTag } from '@pmod/xo/meta-tag.model';
+import { ApiService } from '@zeta/api';
import { I18nService } from '@zeta/i18n';
-import { DatatypeMethodTabComponent } from '../datatype-tab.component';
import { XcRichListItem } from '@zeta/xc';
-import { MetaTagComponent, MetaTagRichListData } from '../member-variable/meta-tag-rich-list/meta-tag-rich-list.component';
-import { XoMetaTag } from '@pmod/xo/meta-tag.model';
-import { HttpMethod, ModellingActionType } from '@pmod/api/xmom.service';
-import { XoMetaTagRequest } from '@pmod/xo/meta-tag-request.model';
+
import { Subject } from 'rxjs';
+import { WorkflowDetailLevelService } from '../../workflow-detail-level.service';
+
+
@Component({
- templateUrl: './method-meta-tab.component.html',
- styleUrls: ['./method-meta-tab.component.scss'],
- changeDetection: ChangeDetectionStrategy.OnPush
+ selector: 'meta-tag-area',
+ templateUrl: './meta-tag-area.component.html',
+ styleUrl: './meta-tag-area.component.scss'
})
-export class MethodMetaTabComponent extends DatatypeMethodTabComponent {
+export class MetaTagAreaComponent extends ModellingObjectComponent {
+
+ get metaTagArea(): XoMetaTagArea {
+ return this.getModel() as XoMetaTagArea;
+ }
+
+ @Input()
+ set metaTagArea(value: XoMetaTagArea) {
+ this.setModel(value);
+ this.updateRichList();
+ }
+
+ @Input()
+ objectIdKey = '';
+
+ @Input()
+ objectId = '';
metaTagsItems: XcRichListItem[] = [];
newTag: string;
removeSubject: Subject = new Subject();
constructor(
+ elementRef: ElementRef,
+ componentMappingService: ComponentMappingService,
documentService: DocumentService,
- private readonly dataTypeService: DataTypeService,
- private readonly i18n: I18nService,
- cdr: ChangeDetectorRef,
+ private readonly i18nService: I18nService,
+ private readonly apiService: ApiService,
+ detailLevelService: WorkflowDetailLevelService,
@Optional() injector: Injector
) {
- super(documentService, cdr, injector);
-
- this.untilDestroyed(this.injectedData.update).subscribe(() => {
- this.refreshRichList();
- });
+ super(elementRef, componentMappingService, documentService, detailLevelService, injector);
this.untilDestroyed(this.removeSubject.asObservable()).subscribe(metaTag => {
this.removeMetaTag(metaTag);
});
}
- private refreshRichList() {
- this.metaTagsItems = this.method.metaTagArea.metaTags.map(tag =>
+ private updateRichList() {
+ this.metaTagsItems = this.metaTagArea.metaTags.map(tag =>
>{
component: MetaTagComponent,
data: {
@@ -75,8 +96,8 @@ export class MethodMetaTabComponent extends DatatypeMethodTabComponent {
request.metaTag = metaTag;
this.performAction({
type: ModellingActionType.meta,
- objectIdKey: 'services',
- objectId: this.method.name,
+ objectIdKey: this.objectIdKey,
+ objectId: this.objectId,
request: request,
method: HttpMethod.PUT
});
@@ -85,8 +106,8 @@ export class MethodMetaTabComponent extends DatatypeMethodTabComponent {
removeMetaTag(metaTag: XoMetaTag) {
this.performAction({
type: ModellingActionType.meta,
- objectIdKey: 'services',
- objectId: this.method.name,
+ objectIdKey: this.objectIdKey,
+ objectId: this.objectId,
method: HttpMethod.DELETE,
paramSet: {metaTagId: metaTag.id}
});
diff --git a/document/datatype/tabs/member-variable/meta-tag-rich-list/meta-tag-rich-list.component.html b/document/shared/meta-tag-rich-list/meta-tag-rich-list.component.html
similarity index 100%
rename from document/datatype/tabs/member-variable/meta-tag-rich-list/meta-tag-rich-list.component.html
rename to document/shared/meta-tag-rich-list/meta-tag-rich-list.component.html
diff --git a/document/datatype/tabs/member-variable/meta-tag-rich-list/meta-tag-rich-list.component.scss b/document/shared/meta-tag-rich-list/meta-tag-rich-list.component.scss
similarity index 100%
rename from document/datatype/tabs/member-variable/meta-tag-rich-list/meta-tag-rich-list.component.scss
rename to document/shared/meta-tag-rich-list/meta-tag-rich-list.component.scss
diff --git a/document/datatype/tabs/member-variable/meta-tag-rich-list/meta-tag-rich-list.component.ts b/document/shared/meta-tag-rich-list/meta-tag-rich-list.component.ts
similarity index 100%
rename from document/datatype/tabs/member-variable/meta-tag-rich-list/meta-tag-rich-list.component.ts
rename to document/shared/meta-tag-rich-list/meta-tag-rich-list.component.ts
diff --git a/document/type-document.component.ts b/document/type-document.component.ts
index ccd5336..8662fc1 100644
--- a/document/type-document.component.ts
+++ b/document/type-document.component.ts
@@ -18,6 +18,7 @@
import { Component, Injector } from '@angular/core';
import { XoArea } from '@pmod/xo/area.model';
+import { XoDetailsItem } from '@pmod/xo/details-item.model';
import { XoMethod } from '@pmod/xo/method.model';
import { XoContainerArea } from '@pmod/xo/modelling-item.model';
@@ -35,11 +36,13 @@ export class TypeDocumentComponent extends DocumentComp
selectedVariable: XoMemberVariable;
selectedMethod: XoMethod;
+ selectedDetailsItem: XoDetailsItem;
selectionAreaName: string;
selectedItemName: string;
selectedItemLabel: string;
+ detailsItem: XoDetailsItem;
constructor(injector: Injector) {
super(injector);
@@ -47,14 +50,14 @@ export class TypeDocumentComponent extends DocumentComp
// watch for selection changes
this.untilDestroyed(this.selectionService.selectionChange).subscribe(selectable => {
const model = selectable?.getModel();
- if (model instanceof XoMemberVariable || model instanceof XoMethod) {
+ if (model instanceof XoMemberVariable || model instanceof XoMethod || model instanceof XoDetailsItem) {
this.selectItem(model);
}
});
// remember name and label before sending any request to the server
this.untilDestroyed(this.documentService.xmomService.beforeActionTriggered).pipe(filter(() => this.document.tabActive)).subscribe(() => {
- const selected = this.selectedVariable ?? this.selectedMethod;
+ const selected = this.selectedVariable ?? this.selectedMethod ?? this.selectedDetailsItem;
this.selectedItemName = selected?.name;
this.selectedItemLabel = selected?.label;
});
@@ -73,19 +76,25 @@ export class TypeDocumentComponent extends DocumentComp
}
- selectItem(item: XoMemberVariable | XoMethod) {
+ selectItem(item: XoMemberVariable | XoMethod | XoDetailsItem) {
this.selectedVariable = item instanceof XoMemberVariable ? item : undefined;
- this.selectedMethod = item instanceof XoMethod ? item : undefined;
+ this.selectedMethod = item instanceof XoMethod ? item : undefined;
+ this.selectedDetailsItem = item instanceof XoDetailsItem ? item : undefined;
- this.selectionAreaName = (item.parent as XoArea).name;
+ this.selectionAreaName = (item.parent as XoArea)?.name;
this.selectedItemName = item.name;
this.selectedItemLabel = item.label;
}
-
restoreSelectedItem() {
+ if (this.selectedDetailsItem) {
+ this.selectedDetailsItem = new XoDetailsItem(); // only to trigger refresh of datatype-details.component
+ return;
+ }
+
this.selectedVariable = undefined;
this.selectedMethod = undefined;
+ this.selectedDetailsItem = undefined;
// returns item with specified name
const getItemByName = (items: (XoMemberVariable | XoMethod)[], name: string) =>
diff --git a/locale/pmod.DE.ts b/locale/pmod.DE.ts
index 30c3dec..bee6e9b 100644
--- a/locale/pmod.DE.ts
+++ b/locale/pmod.DE.ts
@@ -617,11 +617,11 @@ export const PMOD_DE: I18nTranslation[] = [
// global-storable-properties-area
{
- key: 'pmod.datatype.global-storable-properties-area.ods-name',
+ key: 'pmod.datatype.datatype-details.global-storable-properties-area.ods-name',
value: 'ODS Name'
},
{
- key: 'pmod.datatype.global-storable-properties-area.use-historization',
+ key: 'pmod.datatype.datatype-details.global-storable-properties-area.use-historization',
value: 'Verlauf nutzen'
},
@@ -650,6 +650,34 @@ export const PMOD_DE: I18nTranslation[] = [
pronunciationLanguage: 'en-US'
},
+ // datatype-details
+ {
+ key: 'pmod.datatype.datatype-details.type-documentation-area.documentation-label',
+ value: 'Dokumentation'
+ },
+ {
+ key: 'Data Type Details',
+ value: 'Datentyp Details'
+ },
+ {
+ key: 'pmod.datatype.datatype-details.meta-tag-area.tooltip-add-meta-tag',
+ value: 'Meta Tag hinzufügen'
+ },
+ {
+ key: 'pmod.datatype.datatype-details.meta-tag-area.meta-tag.tooltip-delete',
+ value: 'Meta Tag entfernen'
+ },
+
+ // exceptiontype-details
+ {
+ key: 'pmod.datatype.exceptiontype-details.type-documentation-area.documentation-label',
+ value: 'Dokumentation'
+ },
+ {
+ key: 'Exception Type Details',
+ value: 'Exception Typ Details'
+ },
+
// member-area
{
key: 'pmod.datatype.member-area.Inherited Variables',
@@ -722,11 +750,11 @@ export const PMOD_DE: I18nTranslation[] = [
value: 'Storable Property'
},
{
- key: 'pmod.datatype.member-variable-details.tooltip-add-meta-tag',
+ key: 'pmod.datatype.member-variable-details.meta-tag-area.tooltip-add-meta-tag',
value: 'Meta Tag hinzufügen'
},
{
- key: 'pmod.datatype.member-variable-details.meta-tag.tooltip-delete',
+ key: 'pmod.datatype.member-variable-details.meta-tag-area.meta-tag.tooltip-delete',
value: 'Meta Tag entfernen'
},
@@ -790,11 +818,11 @@ export const PMOD_DE: I18nTranslation[] = [
value: 'Öffnen'
},
{
- key: 'pmod.datatype.method-details.tooltip-add-meta-tag',
+ key: 'pmod.datatype.method-details.meta-tag-area.tooltip-add-meta-tag',
value: 'Meta Tag hinzufügen'
},
{
- key: 'pmod.datatype.method-details.meta-tag.tooltip-delete',
+ key: 'pmod.datatype.method-details.meta-tag-area.meta-tag.tooltip-delete',
value: 'Meta Tag entfernen'
},
diff --git a/locale/pmod.EN.ts b/locale/pmod.EN.ts
index 1df3265..5089b54 100644
--- a/locale/pmod.EN.ts
+++ b/locale/pmod.EN.ts
@@ -595,11 +595,11 @@ export const PMOD_EN: I18nTranslation[] = [
// global-storable-properties-area
{
- key: 'pmod.datatype.global-storable-properties-area.ods-name',
+ key: 'pmod.datatype.datatype-details.global-storable-properties-area.ods-name',
value: 'ODS Name'
},
{
- key: 'pmod.datatype.global-storable-properties-area.use-historization',
+ key: 'pmod.datatype.datatype-details.global-storable-properties-area.use-historization',
value: 'Use Historization'
},
@@ -625,6 +625,34 @@ export const PMOD_EN: I18nTranslation[] = [
value: 'Java Shared Libraries'
},
+ // datatype-details
+ {
+ key: 'pmod.datatype.datatype-details.type-documentation-area.documentation-label',
+ value: 'Documentation'
+ },
+ {
+ key: 'Data Type Details',
+ value: 'Data Type Details'
+ },
+ {
+ key: 'pmod.datatype.datatype-details.meta-tag-area.tooltip-add-meta-tag',
+ value: 'add meta tag'
+ },
+ {
+ key: 'pmod.datatype.datatype-details.meta-tag-area.meta-tag.tooltip-delete',
+ value: 'remove meta tag'
+ },
+
+ // exceptiontype-details
+ {
+ key: 'pmod.datatype.exceptiontype-details.type-documentation-area.documentation-label',
+ value: 'Documentation'
+ },
+ {
+ key: 'Exception Type Details',
+ value: 'Exception Type Details'
+ },
+
// member-area
{
key: 'pmod.datatype.member-area.Inherited Variables',
@@ -697,11 +725,11 @@ export const PMOD_EN: I18nTranslation[] = [
value: 'Storable Properties'
},
{
- key: 'pmod.datatype.member-variable-details.tooltip-add-meta-tag',
+ key: 'pmod.datatype.member-variable-details.meta-tag-area.tooltip-add-meta-tag',
value: 'add meta tag'
},
{
- key: 'pmod.datatype.member-variable-details.meta-tag.tooltip-delete',
+ key: 'pmod.datatype.member-variable-details.meta-tag-area.meta-tag.tooltip-delete',
value: 'remove meta tag'
},
@@ -765,11 +793,11 @@ export const PMOD_EN: I18nTranslation[] = [
value: 'Implementation'
},
{
- key: 'pmod.datatype.method-details.tooltip-add-meta-tag',
+ key: 'pmod.datatype.method-details.meta-tag-area.tooltip-add-meta-tag',
value: 'add meta tag'
},
{
- key: 'pmod.datatype.method-details.meta-tag.tooltip-delete',
+ key: 'pmod.datatype.method-details.meta-tag-area.meta-tag.tooltip-delete',
value: 'remove meta tag'
},
diff --git a/processmodeller.module.ts b/processmodeller.module.ts
index 5484b55..a5eed17 100644
--- a/processmodeller.module.ts
+++ b/processmodeller.module.ts
@@ -17,18 +17,24 @@
*/
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
+import { FormsModule } from '@angular/forms';
import { FactoryManagerModule } from '@fman/factory-manager.module';
import { I18nService } from '@zeta/i18n';
+import { QueryParameterService } from '@zeta/nav/query-parameter.service';
import { ZetaModule } from '@zeta/zeta.module';
+import { MonacoEditorModule } from 'ngx-monaco-editor-v2';
+
import { XmomService } from './api/xmom.service';
import { ComponentMappingService } from './document/component-mapping.service';
import { DataTypeComponent } from './document/datatype.component';
import { DataTypeService } from './document/datatype.service';
import { CodingComponent } from './document/datatype/coding/coding.component';
+import { DataTypeDetailsComponent } from './document/datatype/datatype-details/datatype-details.component';
import { ExceptionMessageRichListItemComponent } from './document/datatype/exception-message-rich-list-item/exception-message-rich-list-item.component';
import { ExceptionMessagesAreaComponent } from './document/datatype/exception-messages-area/exception-messages-area.component';
+import { ExceptionTypeDetailsComponent } from './document/datatype/exceptiontype-details/exceptiontype-details.component';
import { GlobalStorablePropertiesAreaComponent } from './document/datatype/global-storable-properties-area/global-storable-properties-area.component';
import { MemberServiceComponent } from './document/datatype/member-service/member-service.component';
import { MemberVariableAreaComponent } from './document/datatype/member-variable-area/member-variable-area.component';
@@ -38,6 +44,13 @@ import { MethodDetailsComponent } from './document/datatype/method-details/metho
import { MethodImplementationComponent } from './document/datatype/method-implementation/method-implementation.component';
import { ServiceAreaComponent } from './document/datatype/service-area/service-area.component';
import { StorablePropertiesAreaComponent } from './document/datatype/storable-properties-area/storable-properties-area.component';
+import { DataTypeStorableTabComponent } from './document/datatype/tabs/datatype/datatype-storable-tab.component';
+import { MemberVariableBaseTabComponent } from './document/datatype/tabs/member-variable/member-variable-base-tab.component';
+import { MemberVariableStorableTabComponent } from './document/datatype/tabs/member-variable/member-variable-storable-tab.component';
+import { MethodBaseTabComponent } from './document/datatype/tabs/method/method-base-tab.component';
+import { MethodImplementationTabComponent } from './document/datatype/tabs/method/method-implementation-tab.component';
+import { DocumentationTabComponent } from './document/datatype/tabs/shared/documentation-tab.component';
+import { MetaTabComponent } from './document/datatype/tabs/shared/meta-tab.component';
import { TypeDocumentationAreaComponent } from './document/datatype/type-documentation-area/type-documentation-area.component';
import { ShowGUIModelModalModule } from './document/datatype/type-info-area/show-gui-model-modal/show-gui-model-modal.module';
import { TypeInfoAreaComponent } from './document/datatype/type-info-area/type-info-area.component';
@@ -49,12 +62,17 @@ import { ConstantDialogComponent } from './document/modal/constant-dialog/consta
import { ErrorDialogComponent } from './document/modal/error-dialog/error-dialog.component';
import { RepairDialogComponent } from './document/modal/repair-dialog/repair-dialog.component';
import { RepairEntryComponent } from './document/modal/repair-dialog/repair-entry/repair-entry.component';
+import { PluginService } from './document/plugin.service';
import { SelectionService } from './document/selection.service';
import { ServiceGroupComponent } from './document/servicegroup.component';
-import { LibAreaComponent } from './document/shared/lib-area/lib-area.component';
+import { DetailsItemComponent } from './document/shared/details-item/details-item.component';
import { JavaSharedLibAreaComponent } from './document/shared/java-shared-lib-area/java-shared-lib-area.component';
import { JavaSharedLibItemComponent } from './document/shared/java-shared-lib-area/java-shared-lib-item.component';
+import { LibAreaComponent } from './document/shared/lib-area/lib-area.component';
+import { LibItemComponent } from './document/shared/lib-area/lib-item.component';
import { MemberAreaComponent } from './document/shared/member-area/member-area.component';
+import { MetaTagAreaComponent } from './document/shared/meta-tag-area/meta-tag-area.component';
+import { MetaTagComponent } from './document/shared/meta-tag-rich-list/meta-tag-rich-list.component';
import { TypeDocumentComponent } from './document/type-document.component';
import { WorkflowDetailLevelService } from './document/workflow-detail-level.service';
import { WorkflowDocumentComponent } from './document/workflow-document.component';
@@ -119,7 +137,11 @@ import { VariableAreaChoiceComponent } from './document/workflow/variable-area/v
import { VariableAreaDocumentComponent } from './document/workflow/variable-area/variable-area-document.component';
import { VariableAreaServiceComponent } from './document/workflow/variable-area/variable-area-service.component';
import { VariableAreaComponent } from './document/workflow/variable-area/variable-area.component';
+import { VariableTreeNodeComponent } from './document/workflow/variable-tree-node/variable-tree-node.component';
+import { VariableTreeComponent } from './document/workflow/variable-tree/variable-tree.component';
import { VariableComponent } from './document/workflow/variable/variable.component';
+import { FlowCanvasComponent } from './document/workflow/visual-mapping/flow-canvas/flow-canvas.component';
+import { VisualMappingComponent } from './document/workflow/visual-mapping/visual-mapping.component';
import { WorkflowComponent } from './document/workflow/workflow/workflow.component';
import { PmodOutsideListenerDirective } from './misc/directives/pmod-outside-listener.directives';
import { LabelPathDialogComponent } from './misc/modal/label-path-dialog/label-path-dialog.component';
@@ -148,22 +170,6 @@ import { XMOMListComponent } from './navigation/xmom/xmom-list.component';
import { ProcessmodellerComponent } from './processmodeller.component';
import { ToolbarComponent } from './toolbar/toolbar.component';
import { WorkflowDetailSettingsService } from './workflow-detail-settings.service';
-import { QueryParameterService } from '@zeta/nav/query-parameter.service';
-import { VisualMappingComponent } from './document/workflow/visual-mapping/visual-mapping.component';
-import { VariableTreeComponent } from './document/workflow/variable-tree/variable-tree.component';
-import { VariableTreeNodeComponent } from './document/workflow/variable-tree-node/variable-tree-node.component';
-import { FlowCanvasComponent } from './document/workflow/visual-mapping/flow-canvas/flow-canvas.component';
-import { PluginService } from './document/plugin.service';
-import { MemberVariableBaseTabComponent } from './document/datatype/tabs/member-variable/member-variable-base-tab.component';
-import { MemberVariableMetaTabComponent } from './document/datatype/tabs/member-variable/member-variable-meta-tab.component';
-import { MemberVariableStorableTabComponent } from './document/datatype/tabs/member-variable/member-variable-storable-tab.component';
-import { MetaTagComponent } from './document/datatype/tabs/member-variable/meta-tag-rich-list/meta-tag-rich-list.component';
-import { MethodMetaTabComponent } from './document/datatype/tabs/method/method-meta-tab.component';
-import { MethodBaseTabComponent } from './document/datatype/tabs/method/method-base-tab.component';
-import { MethodImplementationTabComponent } from './document/datatype/tabs/method/method-implementation-tab.component';
-import { LibItemComponent } from './document/shared/lib-area/lib-item.component';
-import { MonacoEditorModule } from 'ngx-monaco-editor-v2';
-import { FormsModule } from '@angular/forms';
@NgModule({
@@ -195,8 +201,12 @@ import { FormsModule } from '@angular/forms';
ContentAreaComponent,
DataflowComponent,
DataTypeComponent,
+ DataTypeDetailsComponent,
+ DataTypeStorableTabComponent,
+ DetailsItemComponent,
DetailsComponent,
DocumentationAreaComponent,
+ DocumentationTabComponent,
DropIndicatorComponent,
ErrorDialogComponent,
ErrorItemComponent,
@@ -206,6 +216,7 @@ import { FormsModule } from '@angular/forms';
ExceptionMessagesAreaComponent,
ExceptionMessageRichListItemComponent,
ExceptionTypeComponent,
+ ExceptionTypeDetailsComponent,
FactoryComponent,
FilterCriterionAreaComponent,
FlowCanvasComponent,
@@ -238,12 +249,12 @@ import { FormsModule } from '@angular/forms';
MemberVariableComponent,
MemberVariableBaseTabComponent,
MemberVariableDetailsComponent,
- MemberVariableMetaTabComponent,
MemberVariableStorableTabComponent,
+ MetaTabComponent,
+ MetaTagAreaComponent,
MetaTagComponent,
MethodBaseTabComponent,
MethodDetailsComponent,
- MethodMetaTabComponent,
MethodImplementationComponent,
MethodImplementationTabComponent,
ModContentEditableDirective,
diff --git a/xo/data-type.model.ts b/xo/data-type.model.ts
index eecd63c..ab33459 100644
--- a/xo/data-type.model.ts
+++ b/xo/data-type.model.ts
@@ -22,10 +22,11 @@ import { BehaviorSubject, Observable } from 'rxjs';
import { DeploymentState, XmomObjectType } from '../api/xmom-types';
import { XoDataTypeTypeLabelArea } from './data-type-type-label-area.model';
import { XoGlobalStorablePropertyArea } from './global-storable-property-area.model';
-import { XoLibrariesArea } from './libraries-area.model';
import { XoJavaSharedLibrariesArea } from './java-shared-libraries-area.model';
+import { XoLibrariesArea } from './libraries-area.model';
import { XoMemberMethodArea } from './member-method-area.model';
import { XoMemberVariableArea } from './member-variable-area.model';
+import { XoMetaTagArea } from './meta-tag-area.model';
import { XoMethod } from './method.model';
import { XoModellingItem } from './modelling-item.model';
import { XoTextArea } from './text-area.model';
@@ -62,6 +63,10 @@ export class XoDataType extends XoXmomItem {
@XoTransient()
documentationArea: XoTextArea;
+ @XoProperty(XoMemberVariableArea)
+ @XoTransient()
+ metaTagArea: XoMetaTagArea;
+
@XoProperty(XoMemberVariableArea)
@XoTransient()
inheritedVarsArea: XoMemberVariableArea;
@@ -106,6 +111,7 @@ export class XoDataType extends XoXmomItem {
case XoXmomItem.SHARED_LIBS_AREA: this.javaSharedLibrariesArea = area as XoJavaSharedLibrariesArea; break;
case XoXmomItem.INHERITED_VARS_AREA: this.inheritedVarsArea = area as XoMemberVariableArea; break;
case XoXmomItem.MEMBER_VARS_AREA: this.memberVarsArea = area as XoMemberVariableArea; break;
+ case XoDataType.META_TAG_AREA_NAME: this.metaTagArea = area as XoMetaTagArea; break;
case XoDataType.GLOBAL_STORABLE_PROPERTIES_AREA: this.globalStorablePropertyArea = area as XoGlobalStorablePropertyArea; break;
case XoDataType.OVERRIDDEN_METHODS_AREA: this.overriddenMethodsArea = area as XoMemberMethodArea; break;
case XoDataType.MEMBER_METHODS_AREA: this.memberMethodsArea = area as XoMemberMethodArea; break;
diff --git a/xo/details-item.model.ts b/xo/details-item.model.ts
new file mode 100644
index 0000000..a9ad80e
--- /dev/null
+++ b/xo/details-item.model.ts
@@ -0,0 +1,33 @@
+/*
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * Copyright 2024 Xyna GmbH, Germany
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+import { XoArray, XoArrayClass, XoObjectClass, XoProperty } from '@zeta/api';
+
+import { XoXmomItem } from './xmom-item.model';
+
+
+@XoObjectClass(XoXmomItem, 'xmcp.processmodeller.datatypes.datatypemodeller', 'DetailsItem')
+export class XoDetailsItem extends XoXmomItem {
+
+ @XoProperty()
+ name: string;
+}
+
+@XoArrayClass(XoDetailsItem)
+export class XoDetailsItemArray extends XoArray {
+
+}