diff options
author | 2020-06-23 17:28:21 +0200 | |
---|---|---|
committer | 2020-06-23 17:28:21 +0200 | |
commit | 3cda867a2c5e86c3ba7173b456a2db19daf49036 (patch) | |
tree | bedcaa310932fcec84bc9693b5b83e37fe9746fa /cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/sources-template | |
parent | 7434214a2126de38769b35896d8e776aeb8fded3 (diff) |
Fix "npm run build" errors
Issue-ID: CCSDK-2474
Signed-off-by: AhmedEldeeb50 <ahmed.eldeeb.ext@orange.com>
Change-Id: I1577ea0f576f4000c77f94d52d22d4c2212525b2
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/sources-template')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/sources-template/sources-template.component.ts | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/sources-template/sources-template.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/sources-template/sources-template.component.ts index 4a4f215cd..1b70a17ef 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/sources-template/sources-template.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/sources-template/sources-template.component.ts @@ -17,7 +17,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ -import { Component, OnInit} from '@angular/core'; +import { Component, OnInit } from '@angular/core'; import { CdkDragDrop, moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop'; import { SourcesStore } from './sources.store'; @@ -36,13 +36,15 @@ export class SourcesTemplateComponent implements OnInit { selectItem: boolean; ddSource = []; checked: boolean; + searchText = ''; + text = ''; selectedArray = []; constructor(private sourcesStore: SourcesStore) { this.sourcesStore.state$.subscribe(sources => { this.sources = sources.sources; for (const key in this.sources) { if (key) { - const sourceObj = { name: key, value: JSON.stringify(this.sources[key] )}; + const sourceObj = { name: key, value: JSON.stringify(this.sources[key]) }; this.option.push(sourceObj); } } @@ -58,27 +60,27 @@ export class SourcesTemplateComponent implements OnInit { } drop(event: CdkDragDrop<string[]>) { - this.ddSource = []; - if (event.previousContainer === event.container) { - moveItemInArray(event.container.data, event.previousIndex, event.currentIndex); - } else { - transferArrayItem(event.previousContainer.data, - event.container.data, - event.previousIndex, - event.currentIndex); - } + this.ddSource = []; + if (event.previousContainer === event.container) { + moveItemInArray(event.container.data, event.previousIndex, event.currentIndex); + } else { + transferArrayItem(event.previousContainer.data, + event.container.data, + event.previousIndex, + event.currentIndex); + } - for (const key2 in this.sources) { - if (key2) { - const originalSources = this.sourcesOptions; - for (const key of originalSources) { - if (key.name === key2) { - const obj = `{${key.name}: ${key.value}}`; - this.ddSource.push(obj); - } + for (const key2 in this.sources) { + if (key2) { + const originalSources = this.sourcesOptions; + for (const key of originalSources) { + if (key.name === key2) { + const obj = `{${key.name}: ${key.value}}`; + this.ddSource.push(obj); } } } + } } searchDictionary(event: any) { @@ -98,9 +100,9 @@ export class SourcesTemplateComponent implements OnInit { const editedData = JSON.parse(event); const originalSources = this.sources; for (const key in originalSources) { - if (key === item.name) { - this.sources[key] = editedData; - } + if (key === item.name) { + this.sources[key] = editedData; + } } this.option = []; this.sourcesStore.changeSources(this.sources); |