aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src
diff options
context:
space:
mode:
Diffstat (limited to 'cds-ui/designer-client/src')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/dsl-definitions-tab/dsl-definitions-tab.component.html2
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.html2
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html2
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html13
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.ts11
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.html8
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/template-mapping.component.ts11
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/source-editor/source-editor.component.ts12
-rw-r--r--cds-ui/designer-client/src/styles.css81
9 files changed, 83 insertions, 59 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/dsl-definitions-tab/dsl-definitions-tab.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/dsl-definitions-tab/dsl-definitions-tab.component.html
index 2c0400a63..e93ee72ca 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/dsl-definitions-tab/dsl-definitions-tab.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/dsl-definitions-tab/dsl-definitions-tab.component.html
@@ -4,7 +4,7 @@
<li>2. Write them manually </li>
</ul>
<ace-editor [(text)]="dslDefinition.content" [mode]="'javascript'" [autoUpdateContent]="true"
- [durationBeforeCallback]="1000" (textChanged)="textChanged($event)" [theme]="'tomorrow_night_bright'" #editor style="height:300px;">
+ [durationBeforeCallback]="1000" (textChanged)="textChanged($event)" [theme]="'eclipse'" #editor style="height:300px;">
</ace-editor>
<!-- <app-source-editor [lang]="'javascript'" (textChanged)="textChanged($event)" [(text)]="dslDefinition.content"></app-source-editor> -->
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.html
index 593dc1d0e..c2356a4ee 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.html
@@ -75,7 +75,7 @@
data-parent="#accordion">
<div class="card-body">
<ace-editor [(text)]="file.value" (textChange)="textChanges($event,file.key)" [mode]="'json'"
- [autoUpdateContent]="true" [durationBeforeCallback]="1000" [theme]="'tomorrow_night_bright'"
+ [autoUpdateContent]="true" [durationBeforeCallback]="1000" [theme]="'eclipse'"
#editor style="height:300px;">
</ace-editor>
</div>
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html
index 6688a9202..e859062be 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html
@@ -60,7 +60,7 @@
data-parent="#accordion-script">
<div class="card-body">
<ace-editor [(text)]="file.value" (textChange)="textChanges($event,file.key)" [mode]="'kotlin'"
- [autoUpdateContent]="true" [durationBeforeCallback]="1000" [theme]="'tomorrow_night_bright'"
+ [autoUpdateContent]="true" [durationBeforeCallback]="1000" [theme]="'eclipse'"
#editor style="height:300px;">
</ace-editor>
</div>
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html
index 99b085507..8acdd6546 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html
@@ -5,7 +5,7 @@
class="fa fa-chevron-left mr-2"></i>Template List</button>
</div>
<div class="col text-right">
- <button (click)="cancel()" [disabled]="fileName?.length <=0" class="btn btn-outline-secondary">Cancel</button>
+ <button (click)="cancel()" [hidden]="fileName?.length <=0" class="btn btn-outline-secondary">Clear</button>
<button (click)="saveToStore()" [disabled]="fileName?.length <=0" class="btn btn-primary">Finish</button>
</div>
</div>
@@ -70,7 +70,7 @@
data-target="#templateModal"><b>Import
File</b></a></div>
<div class="editor-container mb-4">
- <app-source-editor (textChange)="textChanges($event,templateInfo.fileName)"
+ <app-source-editor [lang]="'velocity'" (textChange)="textChanges($event,templateInfo.fileName)"
[(text)]="templateFileContent"></app-source-editor>
</div>
</div>
@@ -116,7 +116,7 @@
</div>
</div>
- <div id="mapping-table" [hidden]="resourceDictionaryRes?.length == 0" class="mx-4 my-2">
+ <div id="mapping-table" [hidden]="resourceDictionaryRes?.length == 0" class="mapping-table mx-4 my-2">
<table datatable [dtOptions]="initDtOptions" [dtTrigger]="dtTrigger" class="row-border hover">
<thead>
<tr>
@@ -165,7 +165,7 @@
</table>
</div>
- <div id="mapping-table-res" [hidden]="mappingRes?.length == 0" class="mx-4 my-2">
+ <div id="mapping-table-res" [hidden]="mappingRes?.length == 0" class="mapping-table mx-4 my-2">
<table datatable [dtOptions]="dtOptions" [dtTrigger]="resTableDtTrigger" class="row-border hover">
<thead>
<tr>
@@ -252,7 +252,8 @@
<tr *ngFor="let item of uploadedFiles; let i=index">
<th width="40"><img src="assets/img/icon-file-code.svg" /></th>
<th>{{ item.name }}</th>
- <th (click)="removeFile(i)" width="40" class="text-right"><img src="assets/img/icon-remove-file.svg" /></th>
+ <th (click)="removeFile(i)" width="40" class="text-right"><img
+ src="assets/img/icon-remove-file.svg" /></th>
</tr>
</thead>
</table>
@@ -270,4 +271,4 @@
</div>
</div>
</div>
-</div> \ No newline at end of file
+</div>
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.ts
index 5feb76e06..334b3f484 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.ts
@@ -9,7 +9,6 @@ import { Mapping, MappingAdapter } from '../../mapping-models/mappingAdapter.mod
import { PackageCreationUtils } from '../../package-creation.utils';
import { JsonConvert, Any } from 'json2typescript';
import { ToastrService } from 'ngx-toastr';
-import { ActivatedRoute } from '@angular/router';
import { SharedService } from '../shared-service';
declare var $: any;
@@ -54,16 +53,11 @@ export class TemplMappCreationComponent implements OnInit, OnDestroy {
private templateStore: TemplateStore,
private packageCreationUtils: PackageCreationUtils,
private toastr: ToastrService,
- private router: ActivatedRoute,
private sharedService: SharedService
) {
}
ngOnInit() {
- if (this.router.snapshot.paramMap.has('id')) {
- console.log('URL contains Id');
- this.sharedService.enableEdit();
- }
this.templateStore.state$.subscribe(templateInfo => {
// init Template&mapping vars
console.log('Oninit');
@@ -118,8 +112,8 @@ export class TemplMappCreationComponent implements OnInit, OnDestroy {
this.dtOptions = {
pagingType: 'full_numbers',
pageLength: 25,
- // destroy: true,
- // retrieve: true,
+ destroy: true,
+ retrieve: true,
};
}
@@ -382,6 +376,7 @@ export class TemplMappCreationComponent implements OnInit, OnDestroy {
ngOnDestroy(): void {
// Do not forget to unsubscribe the event
this.dtTrigger.unsubscribe();
+ this.resTableDtTrigger.unsubscribe();
}
}
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.html
index 3a7b0225e..e49b25a0c 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.html
@@ -1,5 +1,5 @@
<a (click)="openCreationView()" class="create-template-mapping-button">
- <i class="fa fa-plus"></i> <span>Create</span>
+ <i class="fa fa-plus"></i> <span>Create Template</span>
</a>
@@ -8,7 +8,7 @@
<div class="card">
<div class="card-header" id="headingThree">
<h5 class="mb-0 d-flex justify-content-between">
- <button class="btn" data-toggle="collapse" data-target="#collapseThree"
+ <button class="btn regularTitle" data-toggle="collapse" data-target="#collapseThree"
aria-expanded="true" aria-controls="collapseThree">
Template and Mapping List
</button>
@@ -21,7 +21,7 @@
<div class="row">
<!-- <div class="col-4" style="color:white" *ngFor="let file of templates.files | keyvalue; let mapIndex = index">-->
<div class="col-4" *ngFor="let file of getKeys(templateAndMappingMap)">
- <a class="template-mapping-list" [ngClass]="{'active':currentFile == file}">
+ <a class="template-mapping-list float" [ngClass]="{'active':currentFile == file}">
<p (click)="setSourceCodeEditor(file)">{{file}}</p>
<span *ngIf="getValue(file).isMapping">Mapping</span>
<span *ngIf="getValue(file).isTemplate">Template</span>
@@ -62,4 +62,4 @@
</div>
</div>
</div>
-</div> \ No newline at end of file
+</div>
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/template-mapping.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/template-mapping.component.ts
index d2e25ef6f..662d8d3f3 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/template-mapping.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/template-mapping.component.ts
@@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { PackageCreationStore } from '../package-creation.store';
+import { SharedService } from './shared-service';
@Component({
selector: 'app-template-mapping',
@@ -11,17 +12,25 @@ export class TemplateMappingComponent implements OnInit {
creationView = false;
listView = true;
- constructor(private route: ActivatedRoute, private pakcageStore: PackageCreationStore) {
+ constructor(
+ private route: ActivatedRoute,
+ private pakcageStore: PackageCreationStore,
+ private sharedService: SharedService
+ ) {
}
ngOnInit() {
+
if (this.route.snapshot.paramMap.has('id')) {
console.log('Edit mode');
this.creationView = true;
this.listView = false;
+ console.log('URL contains Id');
+ this.sharedService.enableEdit();
} else {
console.log('Create mode');
this.pakcageStore.clear();
+ this.sharedService.disableEdit();
}
}
openCreationView() {
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/source-editor/source-editor.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/source-editor/source-editor.component.ts
index 8f4c376a3..977bf97e7 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/source-editor/source-editor.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/source-editor/source-editor.component.ts
@@ -30,13 +30,11 @@ export class SourceEditorComponent implements OnInit, AfterViewInit {
this.editor.setTheme('eclipse');
this.editor.getEditor().setOptions({
enableBasicAutocompletion: true,
- // fontSize: '14pt',
- // maxLines: 4096,
- // behavioursEnabled: true,
- // wrapBehavioursEnabled: true,
- // showPrintMargin: true,
- // indentedSoftWrap: true,
- // wrap: true,
+ highlightSelectedWord: true,
+ maxLines: Infinity,
+ enableSnippets: true,
+ enableLiveAutocompletion: true,
+ showFoldWidgets: true,
});
this.editor.getEditor().commands.addCommand({
diff --git a/cds-ui/designer-client/src/styles.css b/cds-ui/designer-client/src/styles.css
index 164a459c3..df5d51507 100644
--- a/cds-ui/designer-client/src/styles.css
+++ b/cds-ui/designer-client/src/styles.css
@@ -558,6 +558,7 @@ height: 40px;
}
.addPaackage-card .card-body img{
width: 30%;
+ vertical-align: text-top;
}
.addPaackage-card a{
margin: 0;
@@ -1162,7 +1163,7 @@ height: 40px;
margin-bottom: 6px !important;
}
.btn-import-package{
- margin-bottom: 4px !important;
+ margin-bottom: 15px !important;
}
.btn-create-package,
.btn-create-package:hover{
@@ -2543,6 +2544,13 @@ hr{
.template-mapping-accordion{
width: 100%;
}
+.card-header .btn.regularTitle{
+ padding-left: 0 !important;
+ padding-right: 0 !important;
+ color: #1B3E6F;
+ font-size: 13px;
+ font-weight: bold;
+}
.template-mapping-accordion .accordian-title{
color: #C3CDDB !important;
font-size: 12px !important;
@@ -2653,7 +2661,7 @@ hr{
}
.ace_line,
.ace-eclipse .ace_print-margin{
- background: #fff;
+ /* background: #fff; */
}
.ace_editor{
height: 55vh !important;
@@ -2686,7 +2694,7 @@ hr{
.breadcrumb-header li{
list-style: none;
display: inline-block;
- font-size: 12px;
+ font-size: 14px;
}
.breadcrumb-header li:last-child::after{
@@ -2777,6 +2785,15 @@ padding: 0 10px 0 0;
border-radius: 4px;
box-shadow: 0 2px 6px 0 rgba(47, 83, 151, 0.3);
}
+.template-mapping-list p,
+.template-mapping-list:hover p{
+ margin-bottom: 0;
+ width: 60%;
+ display: inline-block !important;
+}
+.template-mapping-list:hover p{
+ width: 90%;
+}
.template-mapping-list:hover{
opacity: .9;
}
@@ -2785,7 +2802,7 @@ padding: 0 10px 0 0;
background: #fff;
border: solid 1px #E9F3FF;
color: #2A81ED;
- font-size: 8px;
+ font-size: 9px;
float: right;
border-radius: 50px;
padding: 3px 10px;
@@ -2798,12 +2815,13 @@ padding: 0 10px 0 0;
display: none;
position: absolute;
right: 21px;
- top: 7px;
+ top: 2px;
border: 0;
background: transparent;
}
.deleteTemplate i{
- color: #FF6469;
+ color: #FF6469 !important;
+ font-size: 16px;
}
.template-mapping-list:hover .deleteTemplate{
display: inline;
@@ -2909,7 +2927,7 @@ margin-right: 5px;
.template-mapping-action button{
border-radius: 50px;
padding: 4px 20px;
- font-size: 14px;
+ font-size: 13px;
}
.template-mapping-action .btn-primary{
background:#5DBDBA !important ;
@@ -2948,34 +2966,37 @@ margin-right: 5px;
.dataTables_filter input{
color: #1B3E6F;
background: url(../src/assets/img/icon-search.svg) 9px center no-repeat;
- padding: 4px 9px 4px 24px;
+ padding: 4px 9px 4px 24px !important;
border: solid 1px #ECEDF2;
border-radius: 4px;
}
.dataTables_filter input:focus{
box-shadow: 0 2px 6px 0 rgba(47, 83, 151, 0.1);
}
-#mapping-table th,
-#mapping-table td{
+.mapping-table th,
+.mapping-table td{
width: auto !important;
- padding: 7px 20px 7px 0;
- border-bottom: solid 1px #ECEDF2;
+ padding: 7px 20px 7px 0 !important;
+ border-bottom: solid 1px #ECEDF2 !important;
font-size: 13px;
}
-#mapping-table th:first-child,
-#mapping-table td:first-child{
- padding-left: 20px;
+.mapping-table th:first-child,
+.mapping-table td:first-child{
+ padding-left: 20px !important;
}
-#mapping-table tbody tr:hover{
- background-color: #F4F9FE;
+.mapping-table thead th{
+ border-bottom-color: #ECEDF2 !important;
+}
+.mapping-table tbody tr:hover{
+ background-color: #F4F9FE !important;
}
-#mapping-table th{
- padding-top: 10px;
- padding-bottom: 10px;
+.mapping-table th{
+ padding-top: 10px !important;
+ padding-bottom: 10px !important;
background: #F4F9FE;
}
-#mapping-table td{
- border-top: 0;
+.mapping-table td{
+ border-top: 0 !important;
}
table.dataTable.no-footer{
margin-bottom: 9px;
@@ -3021,30 +3042,30 @@ table.dataTable.no-footer{
background: none !important;
border: 0 !important;
}
-#mapping-table .form-control,
-#mapping-table .custom-select{
+.mapping-table .form-control,
+.mapping-table .custom-select{
padding: 10px 6px;
border-color: #EEF4F9;
font-size: 14px;
line-height: 12px;
color: #1B3E6F;
}
-#mapping-table .form-control{
+.mapping-table .form-control{
box-shadow: 0 2px 4px rgba(47,83,151,0.1);
}
-#mapping-table tbody tr:hover .form-control:focus,
-#mapping-table tbody tr:hover .custom-select{
+.mapping-table tbody tr:hover .form-control:focus,
+.mapping-table tbody tr:hover .custom-select{
background-color: #fff !important;
}
-#mapping-table .custom-select{
+.mapping-table .custom-select{
background-color: #F4F9FE;
color: #1B3E6F;
}
-#mapping-table .form-control:disabled{
+.mapping-table .form-control:disabled{
padding-left: 0;
box-shadow: none;
border: 0;
- background: transparent;
+ background: transparent !important;
color: #1B3E6F;
}