From: Eltanany Shaaban Date: Wed, 10 Feb 2021 09:59:52 +0000 (+0200) Subject: detect paste change in ace-editor X-Git-Tag: 1.1.0~12^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F65%2F117665%2F1;p=ccsdk%2Fcds.git detect paste change in ace-editor Issue-ID: CCSDK-3149 Signed-off-by: Eltanany Shaaban Change-Id: I0d636ba3d2a7b6097083f18763f8eba92187d179 --- diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html index f33f66020..12396209f 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html @@ -28,7 +28,7 @@
  • - +

    + [autoUpdateContent]="true" [durationBeforeCallback]="1000" [theme]="'eclipse'" + (textChanged)="textChanged($event)" #editor style="height:250px;"> @@ -818,7 +840,7 @@
  • 1. Use Copy and paste option or
  • 2. Write them manually in the editor below
  • - 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(); 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(); + } }