From eb0b9c19775ad45bbd8d06da51cbc296e1f17db7 Mon Sep 17 00:00:00 2001 From: Eltanany Shaaban Date: Wed, 10 Feb 2021 11:59:52 +0200 Subject: detect paste change in ace-editor Issue-ID: CCSDK-3149 Signed-off-by: Eltanany Shaaban Change-Id: I0d636ba3d2a7b6097083f18763f8eba92187d179 --- .../configuration-dashboard.component.html | 316 +++++++++++---------- .../dsl-definitions-tab.component.html | 2 +- .../dsl-definitions-tab.component.ts | 11 +- 3 files changed, 180 insertions(+), 149 deletions(-) (limited to 'cds-ui/designer-client/src') 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(); + } } -- cgit 1.2.3-korg