diff options
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation')
2 files changed, 11 insertions, 2 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 51cf9f974..cb4869dec 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 @@ -3,7 +3,7 @@ <li>1. Use Copy and paste option or</li> <li>2. Write them manually in the editor below</li> </ul> -<ace-editor [(text)]="dslDefinition.content" [mode]="'javascript'" [autoUpdateContent]="true" +<ace-editor (paste)="onPaste($event)" [(text)]="dslDefinition.content" [mode]="'javascript'" [autoUpdateContent]="true" [durationBeforeCallback]="1000" (textChanged)="textChanged($event)" [theme]="'eclipse'" #editor style="height:340px;"> </ace-editor> diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/dsl-definitions-tab/dsl-definitions-tab.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/dsl-definitions-tab/dsl-definitions-tab.component.ts index 1297bc14e..b2f2693b6 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/dsl-definitions-tab/dsl-definitions-tab.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/dsl-definitions-tab/dsl-definitions-tab.component.ts @@ -1,4 +1,4 @@ -import {Component, OnInit} from '@angular/core'; +import {Component, EventEmitter, OnInit, Output} from '@angular/core'; import {DslDefinition} from '../mapping-models/CBAPacakge.model'; import {PackageCreationStore} from '../package-creation.store'; @@ -10,6 +10,7 @@ import {PackageCreationStore} from '../package-creation.store'; export class DslDefinitionsTabComponent implements OnInit { dslDefinition: DslDefinition = new DslDefinition(); + @Output() changeEvent = new EventEmitter<string>(); lang = 'json'; constructor(private packageCreationStore: PackageCreationStore) { @@ -27,4 +28,12 @@ export class DslDefinitionsTabComponent implements OnInit { textChanged(event) { this.packageCreationStore.changeDslDefinition(this.dslDefinition); } + + callParent(): void { + this.changeEvent.next('some changes to enable save '); + } + + onPaste($event: ClipboardEvent) { + this.callParent(); + } } |