<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> -->
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>
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>
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>
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>
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;
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');
this.dtOptions = {
pagingType: 'full_numbers',
pageLength: 25,
- // destroy: true,
- // retrieve: true,
+ destroy: true,
+ retrieve: true,
};
}
ngOnDestroy(): void {
// Do not forget to unsubscribe the event
this.dtTrigger.unsubscribe();
+ this.resTableDtTrigger.unsubscribe();
}
}
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',
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() {
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({
}
.ace_line,
.ace-eclipse .ace_print-margin{
- background: #fff;
+ /* background: #fff; */
}
.ace_editor{
height: 55vh !important;