fabric8-analytics-dependency-editor
Advanced tools
Comparing version 0.0.25 to 0.0.26
{ | ||
"name": "fabric8-analytics-dependency-editor", | ||
"version": "0.0.25", | ||
"version": "0.0.26", | ||
"description": "Dependency editor", | ||
@@ -5,0 +5,0 @@ "main": "bundles/fabric8-analytics-dep-editor.umd.js", |
@@ -14,2 +14,3 @@ import { OnInit, OnChanges, OnDestroy } from '@angular/core'; | ||
queryString: any; | ||
categoryString: string; | ||
dependencySearchString: string; | ||
@@ -38,2 +39,3 @@ dependencySearchResult: Array<DependencySearchItem>; | ||
toast: boolean; | ||
categoriesStore: Array<any>; | ||
private addDependencySubscription; | ||
@@ -45,2 +47,3 @@ constructor(service: DependencyEditorService, errorMessageHandler: ErrorMessageHandler); | ||
getCategories(): void; | ||
resetCategoryStore(fromIndex: number): void; | ||
getCategoryPayload(categoryResult: any): any; | ||
@@ -58,3 +61,4 @@ getCategoriesSecurity(payload: any): void; | ||
handleUserInputKeyPress(event: KeyboardEvent): void; | ||
handleCategoryClick(tag: string, index: number): void; | ||
addedTags(): void; | ||
} |
@@ -1,2 +0,2 @@ | ||
import { Component, Input, ViewChild } from '@angular/core'; | ||
import { Component, Input, ViewEncapsulation, ViewChild } from '@angular/core'; | ||
import { DependencyEditorService } from '../shared/dependency-editor.service'; | ||
@@ -26,2 +26,3 @@ import { ErrorMessageHandler } from '../shared/error-message-handler'; | ||
this.toast = false; | ||
this.categoriesStore = []; | ||
this.addDependencySubscription = null; | ||
@@ -71,5 +72,12 @@ } | ||
_this.categoryResult = []; | ||
_this.categoriesStore = []; | ||
_this.categoriesStore.push({ | ||
isOpened: true | ||
}); | ||
for (var key in _this.categorySearchResult) { | ||
if (_this.categorySearchResult.hasOwnProperty(key)) { | ||
_this.categoryResult.push(_this.categorySearchResult[key]); | ||
_this.categoriesStore.push({ | ||
isOpened: false | ||
}); | ||
} | ||
@@ -87,2 +95,9 @@ } | ||
}; | ||
AddDependencyComponent.prototype.resetCategoryStore = function (fromIndex) { | ||
for (var i = fromIndex; i < this.categoriesStore.length; ++i) { | ||
if (this.categoriesStore[i].isOpened) { | ||
this.categoriesStore[i].isOpened = false; | ||
} | ||
} | ||
}; | ||
AddDependencyComponent.prototype.getCategoryPayload = function (categoryResult) { | ||
@@ -224,2 +239,8 @@ var payload = {}; | ||
}; | ||
AddDependencyComponent.prototype.handleCategoryClick = function (tag, index) { | ||
this.queryString = ''; | ||
this.categoryString = tag + '$$' + true; | ||
this.resetCategoryStore(0); | ||
this.categoriesStore[index].isOpened = true; | ||
}; | ||
AddDependencyComponent.prototype.addedTags = function () { | ||
@@ -230,4 +251,3 @@ var _this = this; | ||
this.categoryResult.forEach(function (i) { | ||
count++; | ||
_this.tagZero = count; | ||
count += i.packages.length || 0; | ||
i.packages.forEach(function (x) { | ||
@@ -246,2 +266,3 @@ _this.masterTags.push({ | ||
}); | ||
this.tagZero = count; | ||
this.categoryResult.forEach(function (i) { | ||
@@ -283,3 +304,4 @@ i.packages.forEach(function (x) { | ||
styles: [require('./add-dependency.component.css').toString()], | ||
template: require('./add-dependency.component.html') | ||
template: require('./add-dependency.component.html')), | ||
encapsulation: ViewEncapsulation.None | ||
},] }, | ||
@@ -286,0 +308,0 @@ ]; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"AddDependencyComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"app-add-dependency","styleUrls":["./add-dependency.component.css"],"templateUrl":"./add-dependency.component.html"}]}],"members":{"boosterInfo":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"dependencies":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"dependencyAdded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"existDependencies":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"modalPackagePreview":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild"},"arguments":["PackagePreview"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../shared/dependency-editor.service","name":"DependencyEditorService"},{"__symbolic":"reference","module":"../shared/error-message-handler","name":"ErrorMessageHandler"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"getDependencies":[{"__symbolic":"method"}],"getCategories":[{"__symbolic":"method"}],"getCategoryPayload":[{"__symbolic":"method"}],"getCategoriesSecurity":[{"__symbolic":"method"}],"changeTagname":[{"__symbolic":"method"}],"listenInputSearch":[{"__symbolic":"method"}],"addDependency":[{"__symbolic":"method"}],"addSearchDependency":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"removeDependency":[{"__symbolic":"method"}],"showPackageModal":[{"__symbolic":"method"}],"closemodal":[{"__symbolic":"method"}],"showDependency":[{"__symbolic":"method"}],"handleUserInputKeyPress":[{"__symbolic":"method"}],"addedTags":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"AddDependencyComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"app-add-dependency","styleUrls":["./add-dependency.component.css"],"templateUrl":"./add-dependency.component.html"}]}],"members":{"boosterInfo":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"dependencies":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"dependencyAdded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"existDependencies":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"modalPackagePreview":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild"},"arguments":["PackagePreview"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../shared/dependency-editor.service","name":"DependencyEditorService"},{"__symbolic":"reference","module":"../shared/error-message-handler","name":"ErrorMessageHandler"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"getDependencies":[{"__symbolic":"method"}],"getCategories":[{"__symbolic":"method"}],"getCategoryPayload":[{"__symbolic":"method"}],"getCategoriesSecurity":[{"__symbolic":"method"}],"changeTagname":[{"__symbolic":"method"}],"listenInputSearch":[{"__symbolic":"method"}],"addDependency":[{"__symbolic":"method"}],"addSearchDependency":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"removeDependency":[{"__symbolic":"method"}],"showPackageModal":[{"__symbolic":"method"}],"closemodal":[{"__symbolic":"method"}],"showDependency":[{"__symbolic":"method"}],"handleUserInputKeyPress":[{"__symbolic":"method"}],"addedTags":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"AddDependencyComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"app-add-dependency","styleUrls":["./add-dependency.component.css"],"templateUrl":"./add-dependency.component.html","encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation"},"member":"None"}}]}],"members":{"boosterInfo":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"dependencies":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"dependencyAdded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"existDependencies":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"modalPackagePreview":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild"},"arguments":["PackagePreview"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../shared/dependency-editor.service","name":"DependencyEditorService"},{"__symbolic":"reference","module":"../shared/error-message-handler","name":"ErrorMessageHandler"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"getDependencies":[{"__symbolic":"method"}],"getCategories":[{"__symbolic":"method"}],"resetCategoryStore":[{"__symbolic":"method"}],"getCategoryPayload":[{"__symbolic":"method"}],"getCategoriesSecurity":[{"__symbolic":"method"}],"changeTagname":[{"__symbolic":"method"}],"listenInputSearch":[{"__symbolic":"method"}],"addDependency":[{"__symbolic":"method"}],"addSearchDependency":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"removeDependency":[{"__symbolic":"method"}],"showPackageModal":[{"__symbolic":"method"}],"closemodal":[{"__symbolic":"method"}],"showDependency":[{"__symbolic":"method"}],"handleUserInputKeyPress":[{"__symbolic":"method"}],"handleCategoryClick":[{"__symbolic":"method"}],"addedTags":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"AddDependencyComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"app-add-dependency","styleUrls":["./add-dependency.component.css"],"templateUrl":"./add-dependency.component.html","encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation"},"member":"None"}}]}],"members":{"boosterInfo":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"dependencies":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"dependencyAdded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"existDependencies":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"modalPackagePreview":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild"},"arguments":["PackagePreview"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../shared/dependency-editor.service","name":"DependencyEditorService"},{"__symbolic":"reference","module":"../shared/error-message-handler","name":"ErrorMessageHandler"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"getDependencies":[{"__symbolic":"method"}],"getCategories":[{"__symbolic":"method"}],"resetCategoryStore":[{"__symbolic":"method"}],"getCategoryPayload":[{"__symbolic":"method"}],"getCategoriesSecurity":[{"__symbolic":"method"}],"changeTagname":[{"__symbolic":"method"}],"listenInputSearch":[{"__symbolic":"method"}],"addDependency":[{"__symbolic":"method"}],"addSearchDependency":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"removeDependency":[{"__symbolic":"method"}],"showPackageModal":[{"__symbolic":"method"}],"closemodal":[{"__symbolic":"method"}],"showDependency":[{"__symbolic":"method"}],"handleUserInputKeyPress":[{"__symbolic":"method"}],"handleCategoryClick":[{"__symbolic":"method"}],"addedTags":[{"__symbolic":"method"}]}}}}] |
@@ -6,3 +6,10 @@ import { Pipe } from '@angular/core'; | ||
FilterPipe.prototype.transform = function (value, input) { | ||
if (input) { | ||
if (input && value) { | ||
if (input.indexOf('$$') !== -1) { | ||
var cat_1 = input.split('$$')[0]; | ||
if (cat_1 !== 'All') { | ||
return value.filter(function (i) { return i.category === cat_1; }); | ||
} | ||
return value; | ||
} | ||
input = input.toLowerCase(); | ||
@@ -9,0 +16,0 @@ return value.filter(function (el) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
351668
3099