Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-tag-select

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-tag-select - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

angular-tag-select-2.1.0.tgz

1

angular-tag-select.d.ts

@@ -6,2 +6,3 @@ /**

export { TagFilterPipe as ɵb } from './lib/tag-filter.pipe';
export { TagSelectTrComponent as ɵc } from './lib/tag-select-tr/tag-select-tr.component';
export { TagSelectComponent as ɵa } from './lib/tag-select/tag-select.component';

2

angular-tag-select.metadata.json

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":4,"metadata":{"AngularTagSelectModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":8,"character":11},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":8,"character":25}],"declarations":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵb"}],"exports":[{"__symbolic":"reference","name":"ɵa"}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"ats-tag-select","template":"<h5>Selected {{ tagItemIdentiferPlural ? tagItemIdentiferPlural : 'Tags' }}</h5>\n<ul class=\"selected-tag-list\">\n\t<li *ngFor=\"let tag of selectedTags\">\n\t\t<i (click)=\"toggleTag(tag)\" class=\"fa fa-times\"></i>\n\t\t{{ tag.display }}\n\t</li>\n</ul>\n<h5>Available {{ tagItemIdentiferPlural ? tagItemIdentiferPlural : 'Tags' }}</h5>\n<div class=\"filter-input\">\n\t<label for=\"filterTextInput\">Filter Tags in List</label>\n\t<input (keyup)=\"countFilteredTags()\" name=\"filterTextInput\" type=\"text\" placeholder=\"Filter Tags in List\" [(ngModel)]=\"filterText\">\n</div>\n<ul class=\"possible-tag-list\">\n\t<li *ngFor=\"let tag of possibleTags | tagFilter:filterText\" (click)=\"toggleTag(tag)\">\n\t\t<i class=\"{{ iconClasses.iconPrefix }}\" [ngClass]=\"setIconNgClassName(tag)\"></i>\n\t\t{{ tag.display }}\n\t</li>\n\t<li *ngIf=\"filteredTagsLength === 0\" (click)=\"dynamicallyAddTag()\">\n\t\t<i class=\"{{ iconClasses.iconPrefix + ' ' + iconClasses.dynamicallyAddIconClass }}\"></i>\n\t\tAdd new tag\n\t\t<strong>{{ filterText }}</strong>\n\t</li>\n</ul>\n","styles":[".selected-tag-list{list-style-type:none;border:1px solid #000;padding:15px 20px;width:100%;box-sizing:border-box}.selected-tag-list li{display:inline-block;padding:5px 5px 5px 10px;border:1px solid #000;border-radius:5px;margin:0 5px}.selected-tag-list i{display:inline-block;margin-right:8px;cursor:pointer;transition:color .2s ease}.selected-tag-list i:hover{color:red}.possible-tag-list{list-style-type:none;border:1px solid #000;margin:0;padding:0;width:100%;box-sizing:border-box}.possible-tag-list li{padding:8px 15px;cursor:pointer;transition:all .2s ease}.possible-tag-list li:hover{background-color:#f2f2f2}"]}]}],"members":{"tagsSelectedAtStart":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":2}}]}],"tagsToSelect":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":2}}]}],"tagMapping":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":2}}]}],"tagItemIdentiferPlural":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":2}}]}],"iconClasses":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":2}}]}],"canDynamicallyAdd":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":49,"character":2}}]}],"selectedTagsUpdated":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":50,"character":2}}]}],"dynamicallyAddNewTag":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":51,"character":2}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"countFilteredTags":[{"__symbolic":"method"}],"dynamicallyAddTag":[{"__symbolic":"method"}],"selectTagsAtStart":[{"__symbolic":"method"}],"buildPossibleTagsList":[{"__symbolic":"method"}],"toggleTag":[{"__symbolic":"method"}],"isTagSelected":[{"__symbolic":"method"}],"setIconNgClassName":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":3,"character":1},"arguments":[{"name":"tagFilter"}]}],"members":{"transform":[{"__symbolic":"method"}]}}},"origins":{"AngularTagSelectModule":"./lib/angular-tag-select-lib.module","ɵa":"./lib/tag-select/tag-select.component","ɵb":"./lib/tag-filter.pipe"},"importAs":"angular-tag-select"}
{"__symbolic":"module","version":4,"metadata":{"AngularTagSelectModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":8,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":9,"character":11},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":9,"character":25}],"declarations":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"ɵc"}],"exports":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵc"}]}]}],"members":{}},"Tag":{"__symbolic":"interface"},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"ats-tag-select","template":"<h5>Selected {{ tagItemIdentiferPlural ? tagItemIdentiferPlural : 'Tags' }}</h5>\n<ul class=\"selected-tag-list\">\n\t<li *ngFor=\"let tag of selectedTags\">\n\t\t<i (click)=\"toggleTag(tag)\" class=\"fa fa-times\"></i>\n\t\t{{ tag.display }}\n\t</li>\n</ul>\n<h5>Available {{ tagItemIdentiferPlural ? tagItemIdentiferPlural : 'Tags' }}</h5>\n<div class=\"filter-input\">\n\t<label for=\"filterTextInput\">Filter Tags in List</label>\n\t<input (keyup)=\"countFilteredTags()\" name=\"filterTextInput\" type=\"text\" placeholder=\"Filter Tags in List\" [(ngModel)]=\"filterText\">\n</div>\n<ul class=\"possible-tag-list\">\n\t<li *ngFor=\"let tag of possibleTags | tagFilter:filterText\" (click)=\"toggleTag(tag)\">\n\t\t<i class=\"{{ iconClasses.iconPrefix }}\" [ngClass]=\"setIconNgClassName(tag)\"></i>\n\t\t{{ tag.display }}\n\t</li>\n\t<li *ngIf=\"filteredTagsLength === 0\" (click)=\"dynamicallyAddTag()\">\n\t\t<i class=\"{{ iconClasses.iconPrefix + ' ' + iconClasses.dynamicallyAddIconClass }}\"></i>\n\t\tAdd new tag\n\t\t<strong>{{ filterText }}</strong>\n\t</li>\n</ul>\n","styles":[".selected-tag-list{list-style-type:none;border:1px solid #000;padding:15px 20px;width:100%;box-sizing:border-box}.selected-tag-list li{display:inline-block;padding:5px 5px 5px 10px;border:1px solid #000;border-radius:5px;margin:0 5px}.selected-tag-list i{display:inline-block;margin-right:8px;cursor:pointer;transition:color .2s ease}.selected-tag-list i:hover{color:red}.possible-tag-list{list-style-type:none;border:1px solid #000;margin:0;padding:0;width:100%;box-sizing:border-box}.possible-tag-list li{padding:8px 15px;cursor:pointer;transition:all .2s ease}.possible-tag-list li:hover{background-color:#f2f2f2}"]}]}],"members":{"tagsSelectedAtStart":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":2}}]}],"tagsToSelect":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":2}}]}],"tagMapping":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":2}}]}],"tagItemIdentiferPlural":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":2}}]}],"iconClasses":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":2}}]}],"canDynamicallyAdd":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":49,"character":2}}]}],"selectedTagsUpdated":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":50,"character":2}}]}],"dynamicallyAddNewTag":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":51,"character":2}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"countFilteredTags":[{"__symbolic":"method"}],"dynamicallyAddTag":[{"__symbolic":"method"}],"selectTagsAtStart":[{"__symbolic":"method"}],"buildPossibleTagsList":[{"__symbolic":"method"}],"toggleTag":[{"__symbolic":"method"}],"isTagSelected":[{"__symbolic":"method"}],"setIconNgClassName":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":3,"character":1},"arguments":[{"name":"tagFilter"}]}],"members":{"transform":[{"__symbolic":"method"}]}},"ɵc":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"ats-tag-select-tr","template":"<ng-container *ngTemplateOutlet=\"layoutTemplate; context: ctx\">\n</ng-container>\n","styles":[""]}]}],"members":{"layoutTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":11,"character":2},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"TemplateRef","line":11,"character":15}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":2}}]}],"tagsSelectedAtStart":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":2}}]}],"tagsToSelect":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":2}}]}],"tagMapping":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":2}}]}],"selectedTagsUpdated":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":17,"character":2}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"updateContext":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"selectTagsAtStart":[{"__symbolic":"method"}],"buildPossibleTagsList":[{"__symbolic":"method"}]}}},"origins":{"AngularTagSelectModule":"./lib/angular-tag-select-lib.module","Tag":"./lib/tag","ɵa":"./lib/tag-select/tag-select.component","ɵb":"./lib/tag-filter.pipe","ɵc":"./lib/tag-select-tr/tag-select-tr.component"},"importAs":"angular-tag-select"}

@@ -260,2 +260,151 @@ (function (global, factory) {

*/
var TagSelectTrComponent = (function () {
function TagSelectTrComponent() {
var _this = this;
this.selectedTagsUpdated = new core.EventEmitter();
this.possibleTags = [];
this.selectedTags = [];
this.toggleTag = function (tag) {
var /** @type {?} */ selectedIndex = _this.selectedTags.findIndex(function (selected) { return selected.value === tag.value; });
if (selectedIndex === -1) {
_this.selectedTags.push(tag);
}
else {
_this.selectedTags.splice(selectedIndex, 1);
}
_this.selectedTagsUpdated.emit(_this.selectedTags);
};
this.ctx = {
tagsSelectedAtStart: this.tagsSelectedAtStart,
possibleTags: this.possibleTags,
selectedTags: this.selectedTags,
fns: {
toggleTag: this.toggleTag,
},
};
}
/**
* @return {?}
*/
TagSelectTrComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () { };
/**
* @param {?} key
* @param {?} value
* @return {?}
*/
TagSelectTrComponent.prototype.updateContext = /**
* @param {?} key
* @param {?} value
* @return {?}
*/
function (key, value) {
this.ctx[key] = value;
};
/**
* @return {?}
*/
TagSelectTrComponent.prototype.ngOnChanges = /**
* @return {?}
*/
function () {
if (this.tagsToSelect && this.tagsToSelect.length > 0) {
this.buildPossibleTagsList();
}
if (this.tagsToSelect && this.tagsSelectedAtStart) {
this.selectTagsAtStart();
}
};
/**
* @return {?}
*/
TagSelectTrComponent.prototype.selectTagsAtStart = /**
* @return {?}
*/
function () {
var _this = this;
var _loop_1 = function (item) {
var /** @type {?} */ found = this_1.possibleTags.find(function (tag) { return tag.value === item[_this.tagMapping.value]; });
if (found) {
this_1.toggleTag(found);
}
};
var this_1 = this;
try {
for (var _a = __values(this.tagsSelectedAtStart), _b = _a.next(); !_b.done; _b = _a.next()) {
var item = _b.value;
_loop_1(item);
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_b && !_b.done && (_c = _a.return))
_c.call(_a);
}
finally {
if (e_1)
throw e_1.error;
}
}
this.updateContext('tagsSelectedAtStart', this.tagsSelectedAtStart);
var e_1, _c;
};
/**
* @return {?}
*/
TagSelectTrComponent.prototype.buildPossibleTagsList = /**
* @return {?}
*/
function () {
this.possibleTags = [];
try {
for (var _a = __values(this.tagsToSelect), _b = _a.next(); !_b.done; _b = _a.next()) {
var item = _b.value;
this.possibleTags.push({ value: item[this.tagMapping.value], display: item[this.tagMapping.display] });
}
}
catch (e_2_1) {
e_2 = { error: e_2_1 };
}
finally {
try {
if (_b && !_b.done && (_c = _a.return))
_c.call(_a);
}
finally {
if (e_2)
throw e_2.error;
}
}
this.updateContext('possibleTags', this.possibleTags);
var e_2, _c;
};
TagSelectTrComponent.decorators = [
{ type: core.Component, args: [{
selector: 'ats-tag-select-tr',
template: "<ng-container *ngTemplateOutlet=\"layoutTemplate; context: ctx\">\n</ng-container>\n",
styles: [""],
},] },
];
/** @nocollapse */
TagSelectTrComponent.ctorParameters = function () { return []; };
TagSelectTrComponent.propDecorators = {
layoutTemplate: [{ type: core.ContentChild, args: [core.TemplateRef,] }, { type: core.Input }],
tagsSelectedAtStart: [{ type: core.Input }],
tagsToSelect: [{ type: core.Input }],
tagMapping: [{ type: core.Input }],
selectedTagsUpdated: [{ type: core.Output }]
};
return TagSelectTrComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
var AngularTagSelectModule = (function () {

@@ -267,4 +416,4 @@ function AngularTagSelectModule() {

imports: [common.CommonModule, forms.FormsModule],
declarations: [TagSelectComponent, TagFilterPipe],
exports: [TagSelectComponent],
declarations: [TagSelectComponent, TagFilterPipe, TagSelectTrComponent],
exports: [TagSelectComponent, TagSelectTrComponent],
},] },

@@ -287,2 +436,3 @@ ];

exports.ɵb = TagFilterPipe;
exports.ɵc = TagSelectTrComponent;
exports.ɵa = TagSelectComponent;

@@ -294,2 +444,2 @@

//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci10YWctc2VsZWN0LnVtZC5qcy5tYXAiLCJzb3VyY2VzIjpbbnVsbCwibmc6Ly9hbmd1bGFyLXRhZy1zZWxlY3QvbGliL3RhZy1maWx0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b24gX19hc3NpZ24odCkge1xyXG4gICAgICAgIGZvciAodmFyIHMsIGkgPSAxLCBuID0gYXJndW1lbnRzLmxlbmd0aDsgaSA8IG47IGkrKykge1xyXG4gICAgICAgICAgICBzID0gYXJndW1lbnRzW2ldO1xyXG4gICAgICAgICAgICBmb3IgKHZhciBwIGluIHMpIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocywgcCkpIHRbcF0gPSBzW3BdO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gdDtcclxuICAgIH1cclxuICAgIHJldHVybiBfX2Fzc2lnbi5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gX19yZXN0KHMsIGUpIHtcclxuICAgIHZhciB0ID0ge307XHJcbiAgICBmb3IgKHZhciBwIGluIHMpIGlmIChPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwocywgcCkgJiYgZS5pbmRleE9mKHApIDwgMClcclxuICAgICAgICB0W3BdID0gc1twXTtcclxuICAgIGlmIChzICE9IG51bGwgJiYgdHlwZW9mIE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMgPT09IFwiZnVuY3Rpb25cIilcclxuICAgICAgICBmb3IgKHZhciBpID0gMCwgcCA9IE9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMocyk7IGkgPCBwLmxlbmd0aDsgaSsrKSBpZiAoZS5pbmRleE9mKHBbaV0pIDwgMClcclxuICAgICAgICAgICAgdFtwW2ldXSA9IHNbcFtpXV07XHJcbiAgICByZXR1cm4gdDtcclxufVxyXG5cclxuZXhwb3J0IGZ1bmN0aW9uIF9fZGVjb3JhdGUoZGVjb3JhdG9ycywgdGFyZ2V0LCBrZXksIGRlc2MpIHtcclxuICAgIHZhciBjID0gYXJndW1lbnRzLmxlbmd0aCwgciA9IGMgPCAzID8gdGFyZ2V0IDogZGVzYyA9PT0gbnVsbC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gICAgICAgIGlmIChmKSB0aHJvdyBuZXcgVHlwZUVycm9yKFwiR2VuZXJhdG9yIGlzIGFscmVhZHkgZXhlY3V0aW5nLlwiKTtcclxuICAgICAgICB3aGlsZSAoXykgdHJ5IHtcclxuICAgICAgICAgICAgaWYgKGYgPSAxLCB5ICYmICh0ID0gb3BbMF0gJiAyID8geVtcInJldHVyblwiXSA6IG9wWzBdID8geVtcInRocm93XCJdIHx8ICgodCA9IHlbXCJyZXR1cm5cIl0pICYmIHQuY2FsbCh5KSwgMCkgOiB5Lm5leHQpICYmICEodCA9IHQuY2FsbCh5LCBvcFsxXSkpLmRvbmUpIHJldHVybiB0O1xyXG4gICAgICAgICAgICBpZiAoeSA9IDAsIHQpIG9wID0gW29wWzBdICYgMiwgdC52YWx1ZV07XHJcbiAgICAgICAgICAgIHN3aXRjaCAob3BbMF0pIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgMDogY2FzZSAxOiB0ID0gb3A7IGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiBfLmxhYmVsKys7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB8fCBvcFswXSA9PT0gMikpIHsgXyA9IDA7IGNvbnRpbnVlOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSAzICYmICghdCB8fCAob3BbMV0gPiB0WzB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cclxuICAgIHJldHVybiB7XHJcbiAgICAgICAgbmV4dDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBpZiAobyAmJiBpID49IG8ubGVuZ3RoKSBvID0gdm9pZCAwO1xyXG4gICAgICAgICAgICByZXR1cm4geyB2YWx1ZTogbyAmJiBvW2krK10sIGRvbmU6ICFvIH07XHJcbiAgICAgICAgfVxyXG4gICAgfTtcclxufVxyXG5cclxuZXhwb3J0IGZ1bmN0aW9uIF9fcmVhZChvLCBuKSB7XHJcbiAgICB2YXIgbSA9IHR5cGVvZiBTeW1ib2wgPT09IFwiZnVuY3Rpb25cIiAmJiBvW1N5bWJvbC5pdGVyYXRvcl07XHJcbiAgICBpZiAoIW0pIHJldHVybiBvO1xyXG4gICAgdmFyIGkgPSBtLmNhbGwobyksIHIsIGFyID0gW10sIGU7XHJcbiAgICB0cnkge1xyXG4gICAgICAgIHdoaWxlICgobiA9PT0gdm9pZCAwIHx8IG4tLSA+IDApICYmICEociA9IGkubmV4dCgpKS5kb25lKSBhci5wdXNoKHIudmFsdWUpO1xyXG4gICAgfVxyXG4gICAgY2F0Y2ggKGVycm9yKSB7IGUgPSB7IGVycm9yOiBlcnJvciB9OyB9XHJcbiAgICBmaW5hbGx5IHtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBpZiAociAmJiAhci5kb25lICYmIChtID0gaVtcInJldHVyblwiXSkpIG0uY2FsbChpKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZmluYWxseSB7IGlmIChlKSB0aHJvdyBlLmVycm9yOyB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gYXI7XHJcbn1cclxuXHJcbmV4cG9ydCBmdW5jdGlvbiBfX3NwcmVhZCgpIHtcclxuICAgIGZvciAodmFyIGFyID0gW10sIGkgPSAwOyBpIDwgYXJndW1lbnRzLmxlbmd0aDsgaSsrKVxyXG4gICAgICAgIGFyID0gYXIuY29uY2F0KF9fcmVhZChhcmd1bWVudHNbaV0pKTtcclxu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0FBQyxLQUFLLENBQUMsRUFBRSxPQUFPLEVBQUUsSUFBSSxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsT0FBTyxDQUFDLEVBQUUsQ0FBQyxDQUFDO3FCQUN2Rzs7Ozs7Ozs7Ozs7Ozs7O2dCQUNELElBQUksQ0FBQyxhQUFhLENBQUMsY0FBYyxFQUFFLElBQUksQ0FBQyxZQUFZLENBQUMsQ0FBQzs7YUFDdEQ7O29CQW5EREMsY0FBUyxTQUFDO3dCQUNWLFFBQVEsRUFBRSxtQkFBbUI7d0JBQzdCLFFBQVEsRUFBRSxzRkFFVjt3QkFDQSxNQUFNLEVBQUUsQ0FBQyxFQUFFLENBQUM7cUJBQ1o7Ozs7O3FDQUVDRyxpQkFBWSxTQUFDQyxnQkFBVyxjQUN4QkgsVUFBSzswQ0FFTEEsVUFBSzttQ0FDTEEsVUFBSztpQ0FDTEEsVUFBSzswQ0FDTEMsV0FBTTs7bUNBakJSOzs7Ozs7O0FDQUE7Ozs7b0JBUUNHLGFBQVEsU0FBQzt3QkFDVCxPQUFPLEVBQUUsQ0FBQ0MsbUJBQVksRUFBRUMsaUJBQVcsQ0FBQzt3QkFDcEMsWUFBWSxFQUFFLENBQUMsa0JBQWtCLEVBQUUsYUFBYSxFQUFFLG9CQUFvQixDQUFDO3dCQUN2RSxPQUFPLEVBQUUsQ0FBQyxrQkFBa0IsRUFBRSxvQkFBb0IsQ0FBQztxQkFDbkQ7O3FDQVpEOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms")):"function"==typeof define&&define.amd?define("angular-tag-select",["exports","@angular/core","@angular/common","@angular/forms"],e):e(t["angular-tag-select"]={},t.ng.core,t.ng.common,t.ng.forms)}(this,function(t,e,s,a){"use strict";function o(t){var e="function"==typeof Symbol&&t[Symbol.iterator],s=0;return e?e.call(t):{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}}}var n=function(){function t(){}return t.prototype.transform=function(t,e){return t.filter(function(t){return-1<t.display.toLowerCase().indexOf(e)||("string"==typeof t.value?-1<t.value.toLowerCase().indexOf(e):t.value===+e)})},t.decorators=[{type:e.Pipe,args:[{name:"tagFilter"}]}],t}(),i=function(){function t(){this.iconClasses={iconPrefix:"fa",checkedIconClass:"fa-check-square-o",uncheckedIconClass:"fa-square-o",dynamicallyAddIconClass:"fa-plus"},this.canDynamicallyAdd=!1,this.selectedTagsUpdated=new e.EventEmitter,this.dynamicallyAddNewTag=new e.EventEmitter,this.possibleTags=[],this.selectedTags=[],this.filterText=""}return t.prototype.ngOnInit=function(){},t.prototype.ngOnChanges=function(){this.tagsToSelect&&0<this.tagsToSelect.length&&this.buildPossibleTagsList(),this.tagsToSelect&&this.tagsSelectedAtStart&&this.selectTagsAtStart()},t.prototype.countFilteredTags=function(){this.filteredTagsLength=(new n).transform(this.possibleTags,this.filterText).length},t.prototype.dynamicallyAddTag=function(){this.dynamicallyAddNewTag.emit(this.filterText),this.filterText="",this.countFilteredTags()},t.prototype.selectTagsAtStart=function(){var s=this;console.log("starting with selected tags: ",this.tagsSelectedAtStart);var t,e,a=function(e){var t=n.possibleTags.find(function(t){return t.value===e[s.tagMapping.value]});t&&n.toggleTag(t)},n=this;try{for(var i=o(this.tagsSelectedAtStart),l=i.next();!l.done;l=i.next()){a(l.value)}}catch(r){t={error:r}}finally{try{l&&!l.done&&(e=i["return"])&&e.call(i)}finally{if(t)throw t.error}}},t.prototype.buildPossibleTagsList=function(){this.possibleTags=[];try{for(var t=o(this.tagsToSelect),e=t.next();!e.done;e=t.next()){var s=e.value;this.possibleTags.push({value:s[this.tagMapping.value],display:s[this.tagMapping.display]})}}catch(i){a={error:i}}finally{try{e&&!e.done&&(n=t["return"])&&n.call(t)}finally{if(a)throw a.error}}var a,n},t.prototype.toggleTag=function(e){var t=this.selectedTags.findIndex(function(t){return t.value===e.value});-1===t?this.selectedTags.push(e):this.selectedTags.splice(t,1),this.selectedTagsUpdated.emit(this.selectedTags)},t.prototype.isTagSelected=function(e){return-1<this.selectedTags.findIndex(function(t){return t.value===e.value})},t.prototype.setIconNgClassName=function(t){return this.isTagSelected(t)?this.iconClasses.checkedIconClass:this.iconClasses.uncheckedIconClass},t.decorators=[{type:e.Component,args:[{selector:"ats-tag-select",template:'<h5>Selected {{ tagItemIdentiferPlural ? tagItemIdentiferPlural : \'Tags\' }}</h5>\n<ul class="selected-tag-list">\n\t<li *ngFor="let tag of selectedTags">\n\t\t<i (click)="toggleTag(tag)" class="fa fa-times"></i>\n\t\t{{ tag.display }}\n\t</li>\n</ul>\n<h5>Available {{ tagItemIdentiferPlural ? tagItemIdentiferPlural : \'Tags\' }}</h5>\n<div class="filter-input">\n\t<label for="filterTextInput">Filter Tags in List</label>\n\t<input (keyup)="countFilteredTags()" name="filterTextInput" type="text" placeholder="Filter Tags in List" [(ngModel)]="filterText">\n</div>\n<ul class="possible-tag-list">\n\t<li *ngFor="let tag of possibleTags | tagFilter:filterText" (click)="toggleTag(tag)">\n\t\t<i class="{{ iconClasses.iconPrefix }}" [ngClass]="setIconNgClassName(tag)"></i>\n\t\t{{ tag.display }}\n\t</li>\n\t<li *ngIf="filteredTagsLength === 0" (click)="dynamicallyAddTag()">\n\t\t<i class="{{ iconClasses.iconPrefix + \' \' + iconClasses.dynamicallyAddIconClass }}"></i>\n\t\tAdd new tag\n\t\t<strong>{{ filterText }}</strong>\n\t</li>\n</ul>\n',styles:[".selected-tag-list{list-style-type:none;border:1px solid #000;padding:15px 20px;width:100%;box-sizing:border-box}.selected-tag-list li{display:inline-block;padding:5px 5px 5px 10px;border:1px solid #000;border-radius:5px;margin:0 5px}.selected-tag-list i{display:inline-block;margin-right:8px;cursor:pointer;transition:color .2s ease}.selected-tag-list i:hover{color:red}.possible-tag-list{list-style-type:none;border:1px solid #000;margin:0;padding:0;width:100%;box-sizing:border-box}.possible-tag-list li{padding:8px 15px;cursor:pointer;transition:all .2s ease}.possible-tag-list li:hover{background-color:#f2f2f2}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={tagsSelectedAtStart:[{type:e.Input}],tagsToSelect:[{type:e.Input}],tagMapping:[{type:e.Input}],tagItemIdentiferPlural:[{type:e.Input}],iconClasses:[{type:e.Input}],canDynamicallyAdd:[{type:e.Input}],selectedTagsUpdated:[{type:e.Output}],dynamicallyAddNewTag:[{type:e.Output}]},t}(),l=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule,a.FormsModule],declarations:[i,n],exports:[i]}]}],t}();t.AngularTagSelectModule=l,t.ɵb=n,t.ɵa=i,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms")):"function"==typeof define&&define.amd?define("angular-tag-select",["exports","@angular/core","@angular/common","@angular/forms"],e):e(t["angular-tag-select"]={},t.ng.core,t.ng.common,t.ng.forms)}(this,function(t,e,s,a){"use strict";function r(t){var e="function"==typeof Symbol&&t[Symbol.iterator],s=0;return e?e.call(t):{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}}}var n=function(){function t(){}return t.prototype.transform=function(t,e){return t.filter(function(t){return-1<t.display.toLowerCase().indexOf(e)||("string"==typeof t.value?-1<t.value.toLowerCase().indexOf(e):t.value===+e)})},t.decorators=[{type:e.Pipe,args:[{name:"tagFilter"}]}],t}(),i=function(){function t(){this.iconClasses={iconPrefix:"fa",checkedIconClass:"fa-check-square-o",uncheckedIconClass:"fa-square-o",dynamicallyAddIconClass:"fa-plus"},this.canDynamicallyAdd=!1,this.selectedTagsUpdated=new e.EventEmitter,this.dynamicallyAddNewTag=new e.EventEmitter,this.possibleTags=[],this.selectedTags=[],this.filterText=""}return t.prototype.ngOnInit=function(){},t.prototype.ngOnChanges=function(){this.tagsToSelect&&0<this.tagsToSelect.length&&this.buildPossibleTagsList(),this.tagsToSelect&&this.tagsSelectedAtStart&&this.selectTagsAtStart()},t.prototype.countFilteredTags=function(){this.filteredTagsLength=(new n).transform(this.possibleTags,this.filterText).length},t.prototype.dynamicallyAddTag=function(){this.dynamicallyAddNewTag.emit(this.filterText),this.filterText="",this.countFilteredTags()},t.prototype.selectTagsAtStart=function(){var s=this;console.log("starting with selected tags: ",this.tagsSelectedAtStart);var t,e,a=function(e){var t=n.possibleTags.find(function(t){return t.value===e[s.tagMapping.value]});t&&n.toggleTag(t)},n=this;try{for(var i=r(this.tagsSelectedAtStart),l=i.next();!l.done;l=i.next()){a(l.value)}}catch(o){t={error:o}}finally{try{l&&!l.done&&(e=i["return"])&&e.call(i)}finally{if(t)throw t.error}}},t.prototype.buildPossibleTagsList=function(){this.possibleTags=[];try{for(var t=r(this.tagsToSelect),e=t.next();!e.done;e=t.next()){var s=e.value;this.possibleTags.push({value:s[this.tagMapping.value],display:s[this.tagMapping.display]})}}catch(i){a={error:i}}finally{try{e&&!e.done&&(n=t["return"])&&n.call(t)}finally{if(a)throw a.error}}var a,n},t.prototype.toggleTag=function(e){var t=this.selectedTags.findIndex(function(t){return t.value===e.value});-1===t?this.selectedTags.push(e):this.selectedTags.splice(t,1),this.selectedTagsUpdated.emit(this.selectedTags)},t.prototype.isTagSelected=function(e){return-1<this.selectedTags.findIndex(function(t){return t.value===e.value})},t.prototype.setIconNgClassName=function(t){return this.isTagSelected(t)?this.iconClasses.checkedIconClass:this.iconClasses.uncheckedIconClass},t.decorators=[{type:e.Component,args:[{selector:"ats-tag-select",template:'<h5>Selected {{ tagItemIdentiferPlural ? tagItemIdentiferPlural : \'Tags\' }}</h5>\n<ul class="selected-tag-list">\n\t<li *ngFor="let tag of selectedTags">\n\t\t<i (click)="toggleTag(tag)" class="fa fa-times"></i>\n\t\t{{ tag.display }}\n\t</li>\n</ul>\n<h5>Available {{ tagItemIdentiferPlural ? tagItemIdentiferPlural : \'Tags\' }}</h5>\n<div class="filter-input">\n\t<label for="filterTextInput">Filter Tags in List</label>\n\t<input (keyup)="countFilteredTags()" name="filterTextInput" type="text" placeholder="Filter Tags in List" [(ngModel)]="filterText">\n</div>\n<ul class="possible-tag-list">\n\t<li *ngFor="let tag of possibleTags | tagFilter:filterText" (click)="toggleTag(tag)">\n\t\t<i class="{{ iconClasses.iconPrefix }}" [ngClass]="setIconNgClassName(tag)"></i>\n\t\t{{ tag.display }}\n\t</li>\n\t<li *ngIf="filteredTagsLength === 0" (click)="dynamicallyAddTag()">\n\t\t<i class="{{ iconClasses.iconPrefix + \' \' + iconClasses.dynamicallyAddIconClass }}"></i>\n\t\tAdd new tag\n\t\t<strong>{{ filterText }}</strong>\n\t</li>\n</ul>\n',styles:[".selected-tag-list{list-style-type:none;border:1px solid #000;padding:15px 20px;width:100%;box-sizing:border-box}.selected-tag-list li{display:inline-block;padding:5px 5px 5px 10px;border:1px solid #000;border-radius:5px;margin:0 5px}.selected-tag-list i{display:inline-block;margin-right:8px;cursor:pointer;transition:color .2s ease}.selected-tag-list i:hover{color:red}.possible-tag-list{list-style-type:none;border:1px solid #000;margin:0;padding:0;width:100%;box-sizing:border-box}.possible-tag-list li{padding:8px 15px;cursor:pointer;transition:all .2s ease}.possible-tag-list li:hover{background-color:#f2f2f2}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={tagsSelectedAtStart:[{type:e.Input}],tagsToSelect:[{type:e.Input}],tagMapping:[{type:e.Input}],tagItemIdentiferPlural:[{type:e.Input}],iconClasses:[{type:e.Input}],canDynamicallyAdd:[{type:e.Input}],selectedTagsUpdated:[{type:e.Output}],dynamicallyAddNewTag:[{type:e.Output}]},t}(),l=function(){function t(){var s=this;this.selectedTagsUpdated=new e.EventEmitter,this.possibleTags=[],this.selectedTags=[],this.toggleTag=function(e){var t=s.selectedTags.findIndex(function(t){return t.value===e.value});-1===t?s.selectedTags.push(e):s.selectedTags.splice(t,1),s.selectedTagsUpdated.emit(s.selectedTags)},this.ctx={tagsSelectedAtStart:this.tagsSelectedAtStart,possibleTags:this.possibleTags,selectedTags:this.selectedTags,fns:{toggleTag:this.toggleTag}}}return t.prototype.ngOnInit=function(){},t.prototype.updateContext=function(t,e){this.ctx[t]=e},t.prototype.ngOnChanges=function(){this.tagsToSelect&&0<this.tagsToSelect.length&&this.buildPossibleTagsList(),this.tagsToSelect&&this.tagsSelectedAtStart&&this.selectTagsAtStart()},t.prototype.selectTagsAtStart=function(){var t,e,s=this,a=function(e){var t=n.possibleTags.find(function(t){return t.value===e[s.tagMapping.value]});t&&n.toggleTag(t)},n=this;try{for(var i=r(this.tagsSelectedAtStart),l=i.next();!l.done;l=i.next()){a(l.value)}}catch(o){t={error:o}}finally{try{l&&!l.done&&(e=i["return"])&&e.call(i)}finally{if(t)throw t.error}}this.updateContext("tagsSelectedAtStart",this.tagsSelectedAtStart)},t.prototype.buildPossibleTagsList=function(){this.possibleTags=[];try{for(var t=r(this.tagsToSelect),e=t.next();!e.done;e=t.next()){var s=e.value;this.possibleTags.push({value:s[this.tagMapping.value],display:s[this.tagMapping.display]})}}catch(i){a={error:i}}finally{try{e&&!e.done&&(n=t["return"])&&n.call(t)}finally{if(a)throw a.error}}var a,n;this.updateContext("possibleTags",this.possibleTags)},t.decorators=[{type:e.Component,args:[{selector:"ats-tag-select-tr",template:'<ng-container *ngTemplateOutlet="layoutTemplate; context: ctx">\n</ng-container>\n',styles:[""]}]}],t.ctorParameters=function(){return[]},t.propDecorators={layoutTemplate:[{type:e.ContentChild,args:[e.TemplateRef]},{type:e.Input}],tagsSelectedAtStart:[{type:e.Input}],tagsToSelect:[{type:e.Input}],tagMapping:[{type:e.Input}],selectedTagsUpdated:[{type:e.Output}]},t}(),o=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule,a.FormsModule],declarations:[i,n,l],exports:[i,l]}]}],t}();t.AngularTagSelectModule=o,t.ɵb=n,t.ɵc=l,t.ɵa=i,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=angular-tag-select.umd.min.js.map

@@ -10,4 +10,5 @@ /**

export { TagFilterPipe as ɵb } from './lib/tag-filter.pipe';
export { TagSelectTrComponent as ɵc } from './lib/tag-select-tr/tag-select-tr.component';
export { TagSelectComponent as ɵa } from './lib/tag-select/tag-select.component';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci10YWctc2VsZWN0LmpzIiwic291cmNlUm9vdCI6Im5nOi8vYW5ndWxhci10YWctc2VsZWN0LyIsInNvdXJjZXMiOlsiYW5ndWxhci10YWctc2VsZWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSx1Q0FBYyxjQUFjLENBQUM7QUFFN0IsT0FBTyxFQUFDLGFBQWEsSUFBSSxFQUFFLEVBQUMsTUFBTSx1QkFBdUIsQ0FBQztBQUMxRCxPQUFPLEVBQUMsa0JBQWtCLElBQUksRUFBRSxFQUFDLE1BQU0sdUNBQXVDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG5cbmV4cG9ydCB7VGFnRmlsdGVyUGlwZSBhcyDJtWJ9IGZyb20gJy4vbGliL3RhZy1maWx0ZXIucGlwZSc7XG5leHBvcnQge1RhZ1NlbGVjdENvbXBvbmVudCBhcyDJtWF9IGZyb20gJy4vbGliL3RhZy1zZWxlY3QvdGFnLXNlbGVjdC5jb21wb25lbnQnOyJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci10YWctc2VsZWN0LmpzIiwic291cmNlUm9vdCI6Im5nOi8vYW5ndWxhci10YWctc2VsZWN0LyIsInNvdXJjZXMiOlsiYW5ndWxhci10YWctc2VsZWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSx1Q0FBYyxjQUFjLENBQUM7QUFFN0IsT0FBTyxFQUFDLGFBQWEsSUFBSSxFQUFFLEVBQUMsTUFBTSx1QkFBdUIsQ0FBQztBQUMxRCxPQUFPLEVBQUMsb0JBQW9CLElBQUksRUFBRSxFQUFDLE1BQU0sNkNBQTZDLENBQUM7QUFDdkYsT0FBTyxFQUFDLGtCQUFrQixJQUFJLEVBQUUsRUFBQyxNQUFNLHVDQUF1QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpY19hcGknO1xuXG5leHBvcnQge1RhZ0ZpbHRlclBpcGUgYXMgybVifSBmcm9tICcuL2xpYi90YWctZmlsdGVyLnBpcGUnO1xuZXhwb3J0IHtUYWdTZWxlY3RUckNvbXBvbmVudCBhcyDJtWN9IGZyb20gJy4vbGliL3RhZy1zZWxlY3QtdHIvdGFnLXNlbGVjdC10ci5jb21wb25lbnQnO1xuZXhwb3J0IHtUYWdTZWxlY3RDb21wb25lbnQgYXMgybVhfSBmcm9tICcuL2xpYi90YWctc2VsZWN0L3RhZy1zZWxlY3QuY29tcG9uZW50JzsiXX0=

@@ -10,2 +10,3 @@ /**

import { TagFilterPipe } from './tag-filter.pipe';
import { TagSelectTrComponent } from './tag-select-tr/tag-select-tr.component';
export class AngularTagSelectModule {

@@ -16,7 +17,7 @@ }

imports: [CommonModule, FormsModule],
declarations: [TagSelectComponent, TagFilterPipe],
exports: [TagSelectComponent],
declarations: [TagSelectComponent, TagFilterPipe, TagSelectTrComponent],
exports: [TagSelectComponent, TagSelectTrComponent],
},] },
];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci10YWctc2VsZWN0LWxpYi5tb2R1bGUuanMiLCJzb3VyY2VS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nRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBhbmd1bGFyLXRhZy1zZWxlY3QtbGliXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvYW5ndWxhci10YWctc2VsZWN0LWxpYi5tb2R1bGUnO1xuIl19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItdGFnLXNlbGVjdC8iLCJzb3VyY2VzIjpbInB1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUlBLHVDQUFjLHFDQUFxQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBhbmd1bGFyLXRhZy1zZWxlY3QtbGliXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvYW5ndWxhci10YWctc2VsZWN0LWxpYi5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdGFnJztcbiJdfQ==

@@ -10,4 +10,5 @@ /**

export { TagFilterPipe as ɵb } from './lib/tag-filter.pipe';
export { TagSelectTrComponent as ɵc } from './lib/tag-select-tr/tag-select-tr.component';
export { TagSelectComponent as ɵa } from './lib/tag-select/tag-select.component';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci10YWctc2VsZWN0LmpzIiwic291cmNlUm9vdCI6Im5nOi8vYW5ndWxhci10YWctc2VsZWN0LyIsInNvdXJjZXMiOlsiYW5ndWxhci10YWctc2VsZWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSx1Q0FBYyxjQUFjLENBQUM7QUFFN0IsT0FBTyxFQUFDLGFBQWEsSUFBSSxFQUFFLEVBQUMsTUFBTSx1QkFBdUIsQ0FBQ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YWctZmlsdGVyLnBpcGUnO1xuZXhwb3J0IHtUYWdTZWxlY3RUckNvbXBvbmVudCBhcyDJtWN9IGZyb20gJy4vbGliL3RhZy1zZWxlY3QtdHIvdGFnLXNlbGVjdC10ci5jb21wb25lbnQnO1xuZXhwb3J0IHtUYWdTZWxlY3RDb21wb25lbnQgYXMgybVhfSBmcm9tICcuL2xpYi90YWctc2VsZWN0L3RhZy1zZWxlY3QuY29tcG9uZW50JzsiXX0=

@@ -10,2 +10,3 @@ /**

import { TagFilterPipe } from './tag-filter.pipe';
import { TagSelectTrComponent } from './tag-select-tr/tag-select-tr.component';
var AngularTagSelectModule = /** @class */ (function () {

@@ -17,4 +18,4 @@ function AngularTagSelectModule() {

imports: [CommonModule, FormsModule],
declarations: [TagSelectComponent, TagFilterPipe],
exports: [TagSelectComponent],
declarations: [TagSelectComponent, TagFilterPipe, TagSelectTrComponent],
exports: [TagSelectComponent, TagSelectTrComponent],
},] },

@@ -26,2 +27,2 @@ ];

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci10YWctc2VsZWN0LWxpYi5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9hbmd1bGFyLXRhZy1zZWxlY3QvIiwic291cmNlcyI6WyJsaWIvYW5ndWxhci10YWctc2VsZWN0LWxpYi5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUU3QyxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQztBQUN2RSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sbUJBQW1CLEN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GFnU2VsZWN0VHJDb21wb25lbnQgfSBmcm9tICcuL3RhZy1zZWxlY3QtdHIvdGFnLXNlbGVjdC10ci5jb21wb25lbnQnO1xuXG5ATmdNb2R1bGUoe1xuXHRpbXBvcnRzOiBbQ29tbW9uTW9kdWxlLCBGb3Jtc01vZHVsZV0sXG5cdGRlY2xhcmF0aW9uczogW1RhZ1NlbGVjdENvbXBvbmVudCwgVGFnRmlsdGVyUGlwZSwgVGFnU2VsZWN0VHJDb21wb25lbnRdLFxuXHRleHBvcnRzOiBbVGFnU2VsZWN0Q29tcG9uZW50LCBUYWdTZWxlY3RUckNvbXBvbmVudF0sXG59KVxuZXhwb3J0IGNsYXNzIEFuZ3VsYXJUYWdTZWxlY3RNb2R1bGUge31cbiJdfQ==

@@ -10,2 +10,2 @@ /**

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItdGFnLXNlbGVjdC8iLCJzb3VyY2VzIjpbInB1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUlBLHVDQUFjLHFDQUFxQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBhbmd1bGFyLXRhZy1zZWxlY3QtbGliXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvYW5ndWxhci10YWctc2VsZWN0LWxpYi5tb2R1bGUnO1xuIl19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2FuZ3VsYXItdGFnLXNlbGVjdC8iLCJzb3VyY2VzIjpbInB1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUlBLHVDQUFjLHFDQUFxQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBhbmd1bGFyLXRhZy1zZWxlY3QtbGliXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvYW5ndWxhci10YWctc2VsZWN0LWxpYi5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdGFnJztcbiJdfQ==

@@ -1,2 +0,2 @@

import { Pipe, Component, Input, EventEmitter, Output, NgModule } from '@angular/core';
import { Pipe, Component, Input, EventEmitter, Output, ContentChild, TemplateRef, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

@@ -174,2 +174,95 @@ import { FormsModule } from '@angular/forms';

*/
class TagSelectTrComponent {
constructor() {
this.selectedTagsUpdated = new EventEmitter();
this.possibleTags = [];
this.selectedTags = [];
this.toggleTag = (tag) => {
const /** @type {?} */ selectedIndex = this.selectedTags.findIndex((selected) => selected.value === tag.value);
if (selectedIndex === -1) {
this.selectedTags.push(tag);
}
else {
this.selectedTags.splice(selectedIndex, 1);
}
this.selectedTagsUpdated.emit(this.selectedTags);
};
this.ctx = {
tagsSelectedAtStart: this.tagsSelectedAtStart,
possibleTags: this.possibleTags,
selectedTags: this.selectedTags,
fns: {
toggleTag: this.toggleTag,
},
};
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @param {?} key
* @param {?} value
* @return {?}
*/
updateContext(key, value) {
this.ctx[key] = value;
}
/**
* @return {?}
*/
ngOnChanges() {
if (this.tagsToSelect && this.tagsToSelect.length > 0) {
this.buildPossibleTagsList();
}
if (this.tagsToSelect && this.tagsSelectedAtStart) {
this.selectTagsAtStart();
}
}
/**
* @return {?}
*/
selectTagsAtStart() {
for (const /** @type {?} */ item of this.tagsSelectedAtStart) {
const /** @type {?} */ found = this.possibleTags.find((tag) => tag.value === item[this.tagMapping.value]);
if (found) {
this.toggleTag(found);
}
}
this.updateContext('tagsSelectedAtStart', this.tagsSelectedAtStart);
}
/**
* @return {?}
*/
buildPossibleTagsList() {
this.possibleTags = [];
for (const /** @type {?} */ item of this.tagsToSelect) {
this.possibleTags.push({ value: item[this.tagMapping.value], display: item[this.tagMapping.display] });
}
this.updateContext('possibleTags', this.possibleTags);
}
}
TagSelectTrComponent.decorators = [
{ type: Component, args: [{
selector: 'ats-tag-select-tr',
template: `<ng-container *ngTemplateOutlet="layoutTemplate; context: ctx">
</ng-container>
`,
styles: [``],
},] },
];
/** @nocollapse */
TagSelectTrComponent.ctorParameters = () => [];
TagSelectTrComponent.propDecorators = {
layoutTemplate: [{ type: ContentChild, args: [TemplateRef,] }, { type: Input }],
tagsSelectedAtStart: [{ type: Input }],
tagsToSelect: [{ type: Input }],
tagMapping: [{ type: Input }],
selectedTagsUpdated: [{ type: Output }]
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
class AngularTagSelectModule {

@@ -180,4 +273,4 @@ }

imports: [CommonModule, FormsModule],
declarations: [TagSelectComponent, TagFilterPipe],
exports: [TagSelectComponent],
declarations: [TagSelectComponent, TagFilterPipe, TagSelectTrComponent],
exports: [TagSelectComponent, TagSelectTrComponent],
},] },

@@ -196,4 +289,4 @@ ];

export { AngularTagSelectModule, TagFilterPipe as ɵb, TagSelectComponent as ɵa };
export { AngularTagSelectModule, TagFilterPipe as ɵb, TagSelectTrComponent as ɵc, TagSelectComponent as ɵa };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhci10YWctc2VsZWN0LmpzLm1hcCIsInNvdXJjZXMiOlsibmc6Ly9hbmd1bGFyLXRhZy1zZWxlY3QvbGliL3RhZy1maWx0ZXIucGlwZS50cyIsIm5nOi8vYW5ndWxhci10YWctc2VsZWN0L2xpYi90YWctc2VsZWN0L3RhZy1zZWxlY3QuY29tcG9uZW50LnRzIiwibmc6Ly9hbmd1bGFyLXRhZy1zZWxlY3QvbGliL2FuZ3VsYXItdGFnLXNlbGVjdC1saWIubW9kd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pipe, Component, Input, EventEmitter, Output, NgModule } from '@angular/core';
import { Pipe, Component, Input, EventEmitter, Output, ContentChild, TemplateRef, NgModule } from '@angular/core';
import { __values } from 'tslib';

@@ -220,2 +220,139 @@ import { CommonModule } from '@angular/common';

*/
var TagSelectTrComponent = /** @class */ (function () {
function TagSelectTrComponent() {
var _this = this;
this.selectedTagsUpdated = new EventEmitter();
this.possibleTags = [];
this.selectedTags = [];
this.toggleTag = function (tag) {
var /** @type {?} */ selectedIndex = _this.selectedTags.findIndex(function (selected) { return selected.value === tag.value; });
if (selectedIndex === -1) {
_this.selectedTags.push(tag);
}
else {
_this.selectedTags.splice(selectedIndex, 1);
}
_this.selectedTagsUpdated.emit(_this.selectedTags);
};
this.ctx = {
tagsSelectedAtStart: this.tagsSelectedAtStart,
possibleTags: this.possibleTags,
selectedTags: this.selectedTags,
fns: {
toggleTag: this.toggleTag,
},
};
}
/**
* @return {?}
*/
TagSelectTrComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () { };
/**
* @param {?} key
* @param {?} value
* @return {?}
*/
TagSelectTrComponent.prototype.updateContext = /**
* @param {?} key
* @param {?} value
* @return {?}
*/
function (key, value) {
this.ctx[key] = value;
};
/**
* @return {?}
*/
TagSelectTrComponent.prototype.ngOnChanges = /**
* @return {?}
*/
function () {
if (this.tagsToSelect && this.tagsToSelect.length > 0) {
this.buildPossibleTagsList();
}
if (this.tagsToSelect && this.tagsSelectedAtStart) {
this.selectTagsAtStart();
}
};
/**
* @return {?}
*/
TagSelectTrComponent.prototype.selectTagsAtStart = /**
* @return {?}
*/
function () {
var _this = this;
var _loop_1 = function (item) {
var /** @type {?} */ found = this_1.possibleTags.find(function (tag) { return tag.value === item[_this.tagMapping.value]; });
if (found) {
this_1.toggleTag(found);
}
};
var this_1 = this;
try {
for (var _a = __values(this.tagsSelectedAtStart), _b = _a.next(); !_b.done; _b = _a.next()) {
var item = _b.value;
_loop_1(item);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
}
finally { if (e_1) throw e_1.error; }
}
this.updateContext('tagsSelectedAtStart', this.tagsSelectedAtStart);
var e_1, _c;
};
/**
* @return {?}
*/
TagSelectTrComponent.prototype.buildPossibleTagsList = /**
* @return {?}
*/
function () {
this.possibleTags = [];
try {
for (var _a = __values(this.tagsToSelect), _b = _a.next(); !_b.done; _b = _a.next()) {
var item = _b.value;
this.possibleTags.push({ value: item[this.tagMapping.value], display: item[this.tagMapping.display] });
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
}
finally { if (e_2) throw e_2.error; }
}
this.updateContext('possibleTags', this.possibleTags);
var e_2, _c;
};
TagSelectTrComponent.decorators = [
{ type: Component, args: [{
selector: 'ats-tag-select-tr',
template: "<ng-container *ngTemplateOutlet=\"layoutTemplate; context: ctx\">\n</ng-container>\n",
styles: [""],
},] },
];
/** @nocollapse */
TagSelectTrComponent.ctorParameters = function () { return []; };
TagSelectTrComponent.propDecorators = {
layoutTemplate: [{ type: ContentChild, args: [TemplateRef,] }, { type: Input }],
tagsSelectedAtStart: [{ type: Input }],
tagsToSelect: [{ type: Input }],
tagMapping: [{ type: Input }],
selectedTagsUpdated: [{ type: Output }]
};
return TagSelectTrComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
var AngularTagSelectModule = /** @class */ (function () {

@@ -227,4 +364,4 @@ function AngularTagSelectModule() {

imports: [CommonModule, FormsModule],
declarations: [TagSelectComponent, TagFilterPipe],
exports: [TagSelectComponent],
declarations: [TagSelectComponent, TagFilterPipe, TagSelectTrComponent],
exports: [TagSelectComponent, TagSelectTrComponent],
},] },

@@ -245,4 +382,4 @@ ];

export { AngularTagSelectModule, TagFilterPipe as ɵb, TagSelectComponent as ɵa };
export { AngularTagSelectModule, TagFilterPipe as ɵb, TagSelectTrComponent as ɵc, TagSelectComponent as ɵa };
//#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sQ0FBQyxrQkFBa0IsRUFBRSxhQUFhLEVBQUUsb0JBQW9CLENBQUM7b0JBQ3ZFLE9BQU8sRUFBRSxDQUFDLGtCQUFrQixFQUFFLG9CQUFvQixDQUFDO2lCQUNuRDs7aUNBWkQ7Ozs7Ozs7Ozs7Ozs7OzsifQ==

@@ -16,3 +16,3 @@ {

"homepage": "http://ats.oss.prestonlamb.com",
"version": "2.0.0",
"version": "2.1.0",
"license": "MIT",

@@ -19,0 +19,0 @@ "keywords": [

export * from './lib/angular-tag-select-lib.module';
export * from './lib/tag';

@@ -9,2 +9,4 @@ # TagSelect

There are two different components exported from this module: `TagSelectComponent` and `TagSelectTrComponent`. `TagSelectTrComponent`, selector `ats-tag-select-tr`, uses `TemplateRef`s in angular to allow the developer who's implementing the component to have full control over the styles. The making of the list of possible tags, selecting tags, and removing tags is all done in the component. But all visual work is done by the implementing developer. [Visit this StackBlitz project](https://stackblitz.com/edit/template-ref-examples) to view a demo of this in action. The inputs and outputs below marked with an asterisk are on both components in the module.
Here is a description of the inputs and outputs, as well as how to style the component:

@@ -14,11 +16,11 @@

`tagMapping`: This is an object with two attributes, `value` and `display`. The value of the those attributes should be the names of the fields for the objects that the people will be selecting.
`tagMapping`\*: This is an object with two attributes, `value` and `display`. The value of the those attributes should be the names of the fields for the objects that the people will be selecting.
So let's say your list of objects that you want the user to select has an `id` and a `name` (with possibly other attributes as well). Your tag mapping object should look like this: `{ value: 'id', display: 'name' }`. A list will be built inside the component that shows the possible tags and the selected tags using this mapping.
`tagsToSelect`: The master list of items the user will be able to select. It doesn't matter what attributes the objects in the array have, as long as you pass in a `tagMapping` object that tells the component which attributes are the important ones.
`tagsToSelect`\*: The master list of items the user will be able to select. It doesn't matter what attributes the objects in the array have, as long as you pass in a `tagMapping` object that tells the component which attributes are the important ones.
`tagItemIdentifierPlural`: A string (plural) to describe the tags. This means if you pass in nothing, the component will say "Availble Tags" and "Selected Tags". But if you pass in "Classes", it would say "Available Classes" and "Selected Classes".
`tagsSelectedAtStart`: This is an array of the same elements that you passed in for `tagsToSelect`. These are items that should start out as selected when the component is loaded. It uses the same `tagMapping` object to find which ones should be selected.
`tagsSelectedAtStart`\*: This is an array of the same elements that you passed in for `tagsToSelect`. These are items that should start out as selected when the component is loaded. It uses the same `tagMapping` object to find which ones should be selected.

@@ -41,3 +43,3 @@ `iconClasses`: An object with four attributes: `iconPrefix`, `checkedIconClass`, `uncheckedIconClass`, `dynamicallyAddIconClass`. They default to the following:

###Outputs
`selectedTagsUpdated`: This output emits a list of items that have been selected. The array is of objects with two attributes, `id` and `value`. Use this list to determine what the user has selected.
`selectedTagsUpdated`\*: This output emits a list of items that have been selected. The array is of objects with two attributes, `id` and `value`. Use this list to determine what the user has selected.

@@ -59,4 +61,22 @@ `dynamicallyAddNewTag`: This output emits a string value of the tag that the user wants to dynamically add. Nothing is actually going to be done in the component; you need to add the new item to your list in whatever way you need to. Add it to the `tagsToSelect` input array, and to the `tagsSelectedAtStart` array and the selection will be automatically updated. Here's an example of how you can add it to the test:

For now, overwrite the styles in this component by adding style rules in your app that overwrite the styles on the elements of this component. There are two `ul`s to style: `.selected-tag-list` and `.possible-tag-list`. Look in `src/app/tag-select/tag-select/tag-select.component.scss` to see the styles that are used by default.
The `TagSelectTr` component allow you to essentially pass in your own, custom components to display parts of the tag selecting experience. Here's an example of what you may do:
```
<ats-tag-select-tr [tagsToSelect]="myPossibleTags" [tagMapping]="myTagMapping" (selectedTagsUpdated)="savedSelectedTags = $event">
<ng-template let-selectedTags="selectedTags" let-possibleTags="possibleTags" let-fns="fns">
<app-selected-tag-list [selectedTags]="selectedTags" (emitRemoveTag)="fns.toggleTag($event)"></app-selected-tag-list>
<app-possible-tag-list (emitTagSelected)="fns.toggleTag($event)" [possibleTags]="possibleTags" [selectedTags]="selectedTags"></app-possible-tag-list>
</ng-template>
</ats-tag-select-tr>
```
The `TagSelectTr` component provides a context with the following values:
- `tagsSelectedAtStart`: this is a copy of the input that is provided
- `possibleTags`: this is a copy of the list that the component builds of tags that are possible to select
- `selectedTags`: this is a copy of the list that the component builds of selected tags
- `fns`: this is an object with a reference to the `toggleTag` function, which can be called to toggle a tag as selected or not.
When using the `TagSelectComponent`, you can overwrite the styles by adding style rules in your app that overwrite the styles on the elements of this component. There are two `ul`s to style: `.selected-tag-list` and `.possible-tag-list`. Look in `src/app/tag-select/tag-select/tag-select.component.scss` to see the styles that are used by default.
You can overwrite the styles like this:

@@ -71,1 +91,3 @@

Not ideal, I know, to throw `!important` around, and on some rules you may not have to, but you will to change border colors and margins, etc. that are already set.
\* Input/Output is available in both the `TagSelectTrComponent` and the `TagSelectComponent`.

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc