summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary
diff options
context:
space:
mode:
authorAhmedEldeeb50 <ahmed.eldeeb.ext@orange.com>2020-06-23 17:28:21 +0200
committerAhmedEldeeb50 <ahmed.eldeeb.ext@orange.com>2020-06-23 17:28:21 +0200
commit3cda867a2c5e86c3ba7173b456a2db19daf49036 (patch)
treebedcaa310932fcec84bc9693b5b83e37fe9746fa /cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary
parent7434214a2126de38769b35896d8e776aeb8fded3 (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')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.ts3
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts14
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/resource-dictionary-creation.component.ts15
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/sources-template/sources-template.component.ts46
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-dashboard/filterby-tags/filterby-tags.component.ts128
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-dashboard/search-dictionary/search-dictionary.component.ts8
6 files changed, 109 insertions, 105 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.ts
index 92b27c24c..157a5aa25 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-editor/dictionary-editor.component.ts
@@ -25,8 +25,9 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./dictionary-editor.component.css']
})
export class DictionaryEditorComponent implements OnInit {
+ text = '';
constructor() {
- }
+ }
ngOnInit() {
}
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts
index d5c4a109b..aa975f87a 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts
@@ -25,22 +25,22 @@ import { DictionaryCreationStore } from '../dictionary-creation.store';
import { MetaData } from '../../model/metaData.model';
@Component({
- selector: 'app-dictionary-metadata',
- templateUrl: './dictionary-metadata.component.html',
- styleUrls: ['./dictionary-metadata.component.css']
+ selector: 'app-dictionary-metadata',
+ templateUrl: './dictionary-metadata.component.html',
+ styleUrls: ['./dictionary-metadata.component.css']
})
export class DictionaryMetadataComponent implements OnInit {
- packageNameAndVersionEnables = true;
+ packageNameAndVersionEnables = true;
counter = 0;
tags = new Set<string>();
- private metaDataTab: MetaData = new MetaData();
- private errorMessage: string;
+ metaDataTab: MetaData = new MetaData();
+ errorMessage: string;
constructor(
private route: ActivatedRoute,
private dictionaryCreationService: DictionaryCreationService,
private dictionaryCreationStore: DictionaryCreationStore
- ) {}
+ ) { }
ngOnInit() {
this.dictionaryCreationStore.state$.subscribe(element => {
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/resource-dictionary-creation.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/resource-dictionary-creation.component.ts
index 1a3484bae..e32db8a37 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/resource-dictionary-creation.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/resource-dictionary-creation.component.ts
@@ -36,20 +36,21 @@ export class ResourceDictionaryCreationComponent implements OnInit {
}
modes: object[] = [
- {name: 'Designer Mode', style: 'mode-icon icon-designer-mode'},
- {name: 'Scripting Mode', style: 'mode-icon icon-scripting-mode'}
+ { name: 'Designer Mode', style: 'mode-icon icon-designer-mode' },
+ { name: 'Scripting Mode', style: 'mode-icon icon-scripting-mode' }
];
- private metaDataTab: DictionaryModel = new DictionaryModel();
- private definition: Definition = new Definition();
+ metaDataTab: DictionaryModel = new DictionaryModel();
+ definition: Definition = new Definition();
+ createDate = '';
- @ViewChild(DictionaryMetadataComponent, {static: false})
+ @ViewChild(DictionaryMetadataComponent, { static: false })
private metadataTabComponent: DictionaryMetadataComponent;
- @ViewChild(SourcesTemplateComponent, {static: false})
+ @ViewChild(SourcesTemplateComponent, { static: false })
private sourcesTemplateComponent: SourcesTemplateComponent;
- @ViewChild('nameit', {static: true})
+ @ViewChild('nameit', { static: true })
private elementRef: ElementRef;
ngOnInit() {
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);
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-dashboard/filterby-tags/filterby-tags.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-dashboard/filterby-tags/filterby-tags.component.ts
index bdf6bd1ea..3ad1b34e0 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-dashboard/filterby-tags/filterby-tags.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-dashboard/filterby-tags/filterby-tags.component.ts
@@ -23,78 +23,78 @@ import { DictionaryModel, DictionaryPage } from '../../model/dictionary.model';
import { DictionaryStore } from '../../dictionary.store';
@Component({
- selector: 'app-filterby-tags',
- templateUrl: './filterby-tags.component.html',
- styleUrls: ['./filterby-tags.component.css']
+ selector: 'app-filterby-tags',
+ templateUrl: './filterby-tags.component.html',
+ styleUrls: ['./filterby-tags.component.css']
})
export class FilterbyTagsComponent implements OnInit {
- page: DictionaryPage;
- tags: string[] = [];
- viewedTags: string[] = [];
- searchTag = '';
- viewedDictionary: DictionaryModel[] = [];
- private checkBoxTages = '';
- currentPage = 0;
+ page: DictionaryPage;
+ tags: string[] = [];
+ viewedTags: string[] = [];
+ searchTag = '';
+ viewedDictionary: DictionaryModel[] = [];
+ checkBoxTages = '';
+ currentPage = 0;
- constructor(private dictionaryStore: DictionaryStore) {
- this.dictionaryStore.state$.subscribe(state => {
- console.log(state);
- if (state.page) {
- this.viewedDictionary = state.page.content;
- this.tags = [];
- if (state.currentPage !== this.currentPage) {
- this.checkBoxTages = '';
- this.currentPage = state.currentPage;
- }
- this.viewedDictionary.forEach(element => {
- element.tags.split(',').forEach(tag => {
- this.tags.push(tag.trim());
- });
- this.tags.push('All');
- this.tags = this.tags.filter((value, index, self) => self.indexOf(value) === index);
- this.assignTags();
- });
- }
- });
- }
+ constructor(private dictionaryStore: DictionaryStore) {
+ this.dictionaryStore.state$.subscribe(state => {
+ console.log(state);
+ if (state.page) {
+ this.viewedDictionary = state.page.content;
+ this.tags = [];
+ if (state.currentPage !== this.currentPage) {
+ this.checkBoxTages = '';
+ this.currentPage = state.currentPage;
+ }
+ this.viewedDictionary.forEach(element => {
+ element.tags.split(',').forEach(tag => {
+ this.tags.push(tag.trim());
+ });
+ this.tags.push('All');
+ this.tags = this.tags.filter((value, index, self) => self.indexOf(value) === index);
+ this.assignTags();
+ });
+ }
+ });
+ }
- ngOnInit() {
+ ngOnInit() {
- }
+ }
- reloadChanges(event: any) {
- this.searchTag = event.target.value;
- this.filterItem(this.searchTag);
- }
+ reloadChanges(event: any) {
+ this.searchTag = event.target.value;
+ this.filterItem(this.searchTag);
+ }
- private assignTags() {
- this.viewedTags = this.tags;
- }
+ private assignTags() {
+ this.viewedTags = this.tags;
+ }
- private filterItem(value) {
- if (!value) {
- this.assignTags();
- }
- this.viewedTags = this.tags.filter(
- item => item.toLowerCase().indexOf(value.toLowerCase()) > -1
- );
- }
+ private filterItem(value) {
+ if (!value) {
+ this.assignTags();
+ }
+ this.viewedTags = this.tags.filter(
+ item => item.toLowerCase().indexOf(value.toLowerCase()) > -1
+ );
+ }
- reloadDictionary(event: any) {
- if (!event.target.checked) {
- this.checkBoxTages = this.checkBoxTages.replace(event.target.id + ',', '')
- .replace(event.target.id, '');
- } else {
- this.checkBoxTages += event.target.id.trim() + ',';
- }
- const tagsSelected = this.checkBoxTages.split(',').filter(item => {
- if (item) {
- return true;
- }
- }).map((item) => {
- return item.trim();
- });
- this.dictionaryStore.filterByTags(tagsSelected);
- }
+ reloadDictionary(event: any) {
+ if (!event.target.checked) {
+ this.checkBoxTages = this.checkBoxTages.replace(event.target.id + ',', '')
+ .replace(event.target.id, '');
+ } else {
+ this.checkBoxTages += event.target.id.trim() + ',';
+ }
+ const tagsSelected = this.checkBoxTages.split(',').filter(item => {
+ if (item) {
+ return true;
+ }
+ }).map((item) => {
+ return item.trim();
+ });
+ this.dictionaryStore.filterByTags(tagsSelected);
+ }
}
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-dashboard/search-dictionary/search-dictionary.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-dashboard/search-dictionary/search-dictionary.component.ts
index 76e40cf7d..d1fb4fc85 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-dashboard/search-dictionary/search-dictionary.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-dashboard/search-dictionary/search-dictionary.component.ts
@@ -27,16 +27,16 @@ import { DictionaryStore } from '../../dictionary.store';
styleUrls: ['./search-dictionary.component.css']
})
export class SearchDictionaryComponent implements OnInit {
- private searchQuery = '';
+ searchQuery = '';
constructor(private dictionaryStore: DictionaryStore) {
}
ngOnInit() {
}
searchDictionary(event: any) {
- this.searchQuery = event.target.value;
- this.searchQuery = this.searchQuery.trim();
- this.dictionaryStore.search(this.searchQuery);
+ this.searchQuery = event.target.value;
+ this.searchQuery = this.searchQuery.trim();
+ this.dictionaryStore.search(this.searchQuery);
}
}