Skip to content

Commit

Permalink
131 data type mask modifications (#133)
Browse files Browse the repository at this point in the history
* added tabs for data types and exception types
* reworked tab components
  • Loading branch information
Julian-Mueller-GIP authored Dec 11, 2024
1 parent 3981675 commit 7042cb1
Show file tree
Hide file tree
Showing 43 changed files with 1,114 additions and 394 deletions.
49 changes: 25 additions & 24 deletions document/datatype.component.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,16 @@
<div class="area-wrapper" xc-i18n-context="datatype">
<div class="datatype-header">
<type-info-area
xc-i18n-context="type-info-area"
[typeInfoArea]="dataType.typeInfoArea"
(triggerAction)="performModellingAction($event)"
[documentModel]="document"
[showConverterButton]="true"
[showBaseTypeAutocomplete]="true"
[showAbstractCheckbox]="true"
></type-info-area>
<global-storable-properties-area
*ngIf="isStorable"
xc-i18n-context="global-storable-properties-area"
[propertiesArea]="dataType.globalStorablePropertyArea"
(triggerAction)="performModellingAction($event)"
[documentModel]="document"
></global-storable-properties-area>
<type-documentation-area
xc-i18n-context="type-documentation-area"
[documentationArea]="dataType.documentationArea"
(triggerAction)="performModellingAction($event)"
[documentModel]="document"
[lines]="8"
></type-documentation-area>
<div class="type-info-area">
<type-info-area
xc-i18n-context="type-info-area"
[typeInfoArea]="dataType.typeInfoArea"
(triggerAction)="performModellingAction($event)"
[documentModel]="document"
[showConverterButton]="true"
[showBaseTypeAutocomplete]="true"
[showAbstractCheckbox]="true"
></type-info-area>
</div>
<div class="lib-area">
<lib-area
xc-i18n-context="lib-area"
Expand All @@ -41,6 +29,10 @@

<div class="datatype-body">
<section class="members">
<!-- Datatype Details -->
<div class="detail-items">
<details-item [detailsItem]="detailsItem"></details-item>
</div>
<!-- Inherited Variables -->
<member-area
*ngIf="dataType.hasBaseType()"
Expand Down Expand Up @@ -122,6 +114,15 @@
</section>

<section class="details">
<datatype-details
*ngIf="selectedDetailsItem"
xc-i18n-context="datatype-details"
[dataType]="dataType"
[detailsItem]="selectedDetailsItem"
(triggerAction)="performModellingAction($event)"
[documentModel]="document"
[isStorable]="isStorable"
></datatype-details>
<member-variable-details
*ngIf="selectedVariable"
xc-i18n-context="member-variable-details"
Expand All @@ -140,4 +141,4 @@
></method-details>
</section>
</div>
</div>
</div>
15 changes: 8 additions & 7 deletions document/datatype.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down Expand Up @@ -82,6 +79,10 @@
margin: 2px 0 0 2px;
overflow: auto;
}

.detail-items {
padding: 8px;
}
}
}
}
}
10 changes: 6 additions & 4 deletions document/datatype.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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({
Expand All @@ -44,7 +45,6 @@ export class DataTypeComponent extends TypeDocumentComponent<DataTypeDocumentMod
overriddenServicesCollapsed = false;
memberServicesCollapsed = false;


constructor(injector: Injector) {
super(injector);

Expand All @@ -54,8 +54,11 @@ export class DataTypeComponent extends TypeDocumentComponent<DataTypeDocumentMod
const exceptionType = new XoExceptionType();
const dataTypeTypeLabelArea = new XoDataTypeTypeLabelArea();
const memberVariableArea = new XoMemberVariableArea();
const metaTagArea = new XoMetaTagArea();
/* eslint-enable @typescript-eslint/no-unused-vars */

this.detailsItem = new XoDetailsItem();
this.detailsItem.name = 'Data Type Details';
this.selectedDetailsItem = this.detailsItem;
}


Expand All @@ -68,7 +71,6 @@ export class DataTypeComponent extends TypeDocumentComponent<DataTypeDocumentMod
return !!this.dataType.globalStorablePropertyArea.isStorable;
}


addMemberVariable() {
this.performModellingAction({
type: ModellingActionType.insert,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<xc-tab-bar class="zeta-scrollbar"
[xc-tab-bar-items]="tabBarItems" [(xc-tab-bar-selection)]="tabBarSelection"
></xc-tab-bar>
Original file line number Diff line number Diff line change
@@ -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;
}
}
/*
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* 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;
}
}
}
}
Loading

0 comments on commit 7042cb1

Please sign in to comment.