Socket
Socket
Sign inDemoInstall

ng2-tag-input

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-tag-input - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

3

dist/components/events-actions.js

@@ -34,3 +34,4 @@ "use strict";

items.forEach(function (item) {
var condition = item.indexOf(lowercaseValue) === 0 && _this.items.indexOf(item) === -1;
var condition = item.toLowerCase().indexOf(lowercaseValue) === 0 &&
_this.items.indexOf(item) === -1;
if (condition) {

@@ -37,0 +38,0 @@ itemsMatching.push(item);

import { ElementRef, EventEmitter, Renderer, OnInit } from '@angular/core';
import { TagInputAccessor } from './accessor';
export declare class TagInput extends TagInputAccessor implements OnInit {
export declare class TagInputComponent extends TagInputAccessor implements OnInit {
private element;

@@ -5,0 +5,0 @@ private renderer;

@@ -23,7 +23,6 @@ "use strict";

var keypress_actions_1 = require('./keypress-actions');
var icon_1 = require('./icon/icon');
var input_manager_1 = require('./input-manager');
var TagInput = (function (_super) {
__extends(TagInput, _super);
function TagInput(element, renderer) {
var TagInputComponent = (function (_super) {
__extends(TagInputComponent, _super);
function TagInputComponent(element, renderer) {
_super.call(this);

@@ -55,3 +54,3 @@ this.element = element;

}
TagInput.prototype.removeItem = function (item) {
TagInputComponent.prototype.removeItem = function (item) {
this.items = this.items.filter(function (_item) { return _item !== item; }).slice(0);

@@ -64,3 +63,3 @@ if (this.selectedTag === item) {

};
TagInput.prototype.addItem = function (isFromAutocomplete) {
TagInputComponent.prototype.addItem = function (isFromAutocomplete) {
if (isFromAutocomplete === void 0) { isFromAutocomplete = false; }

@@ -82,3 +81,3 @@ if (this.autocomplete && this.dropdown.state.selectedItem && !isFromAutocomplete) {

};
TagInput.prototype.selectItem = function (item) {
TagInputComponent.prototype.selectItem = function (item) {
if (this.readonly) {

@@ -92,7 +91,7 @@ var el = this.element.nativeElement;

};
TagInput.prototype.fireEvents = function (eventName, $event) {
TagInputComponent.prototype.fireEvents = function (eventName, $event) {
var _this = this;
this.listeners[eventName].forEach(function (listener) { return listener.call(_this, $event); });
};
TagInput.prototype.handleKeydown = function ($event, item) {
TagInputComponent.prototype.handleKeydown = function ($event, item) {
var action = keypress_actions_1.getAction($event.keyCode || $event.which);

@@ -103,12 +102,12 @@ var itemIndex = this.items.indexOf(item);

};
TagInput.prototype.setInputValue = function (value) {
TagInputComponent.prototype.setInputValue = function (value) {
var item = value ? this.transform(value) : '';
var control = this.getControl();
control.updateValue(item);
control.setValue(item);
return item;
};
TagInput.prototype.getControl = function () {
return this.form.find('item');
TagInputComponent.prototype.getControl = function () {
return this.form.get('item');
};
TagInput.prototype.focus = function () {
TagInputComponent.prototype.focus = function () {
if (this.readonly) {

@@ -119,6 +118,6 @@ return;

};
TagInput.prototype.blur = function () {
TagInputComponent.prototype.blur = function () {
this.input.blur.call(this);
};
Object.defineProperty(TagInput.prototype, "maxItemsReached", {
Object.defineProperty(TagInputComponent.prototype, "maxItemsReached", {
get: function () {

@@ -130,3 +129,3 @@ return this.maxItems !== undefined && this.items.length >= this.maxItems;

});
TagInput.prototype.escapeDropdown = function ($event) {
TagInputComponent.prototype.escapeDropdown = function ($event) {
var isArrowUp = $event.keyCode === 38;

@@ -138,3 +137,3 @@ var isFirstItemsSelected = this.dropdown.menu.items.first.isSelected;

};
TagInput.prototype.ngOnInit = function () {
TagInputComponent.prototype.ngOnInit = function () {
events_actions_1.addListener.call(this, constants_1.KEYDOWN, events_actions_1.backSpaceListener);

@@ -151,7 +150,7 @@ events_actions_1.addListener.call(this, constants_1.KEYDOWN, events_actions_1.customSeparatorKeys, this.separatorKeys.length > 0);

};
TagInput.prototype.ngAfterViewChecked = function () {
TagInputComponent.prototype.ngAfterViewChecked = function () {
this.input.element = this.input.element || this.element.nativeElement.querySelector('input');
this.tagElements = this.element.nativeElement.querySelectorAll('.tag');
};
TagInput.prototype.ngAfterViewInit = function () {
TagInputComponent.prototype.ngAfterViewInit = function () {
var vm = this;

@@ -180,63 +179,62 @@ vm.hasTemplate = vm.template && vm.template.nativeElement.childElementCount > 0;

__metadata('design:type', Array)
], TagInput.prototype, "separatorKeys", void 0);
], TagInputComponent.prototype, "separatorKeys", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', String)
], TagInput.prototype, "placeholder", void 0);
], TagInputComponent.prototype, "placeholder", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', String)
], TagInput.prototype, "secondaryPlaceholder", void 0);
], TagInputComponent.prototype, "secondaryPlaceholder", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Number)
], TagInput.prototype, "maxItems", void 0);
], TagInputComponent.prototype, "maxItems", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Boolean)
], TagInput.prototype, "readonly", void 0);
], TagInputComponent.prototype, "readonly", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Function)
], TagInput.prototype, "transform", void 0);
], TagInputComponent.prototype, "transform", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Object)
], TagInput.prototype, "validators", void 0);
], TagInputComponent.prototype, "validators", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Boolean)
], TagInput.prototype, "autocomplete", void 0);
], TagInputComponent.prototype, "autocomplete", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Array)
], TagInput.prototype, "autocompleteItems", void 0);
], TagInputComponent.prototype, "autocompleteItems", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Boolean)
], TagInput.prototype, "onlyFromAutocomplete", void 0);
], TagInputComponent.prototype, "onlyFromAutocomplete", void 0);
__decorate([
core_1.Output(),
__metadata('design:type', Object)
], TagInput.prototype, "onAdd", void 0);
], TagInputComponent.prototype, "onAdd", void 0);
__decorate([
core_1.Output(),
__metadata('design:type', Object)
], TagInput.prototype, "onRemove", void 0);
], TagInputComponent.prototype, "onRemove", void 0);
__decorate([
core_1.Output(),
__metadata('design:type', Object)
], TagInput.prototype, "onSelect", void 0);
], TagInputComponent.prototype, "onSelect", void 0);
__decorate([
core_1.ViewChild('template'),
__metadata('design:type', core_1.ElementRef)
], TagInput.prototype, "template", void 0);
], TagInputComponent.prototype, "template", void 0);
__decorate([
core_1.ViewChild(ng2_material_dropdown_1.Ng2Dropdown),
__metadata('design:type', Object)
], TagInput.prototype, "dropdown", void 0);
TagInput = __decorate([
], TagInputComponent.prototype, "dropdown", void 0);
TagInputComponent = __decorate([
core_1.Component({
selector: 'tag-input',
directives: [icon_1.DeleteIcon].concat(ng2_material_dropdown_1.NG2_DROPDOWN_DIRECTIVES, [forms_1.REACTIVE_FORM_DIRECTIVES]),
providers: [{

@@ -251,6 +249,6 @@ provide: forms_1.NG_VALUE_ACCESSOR,

__metadata('design:paramtypes', [core_1.ElementRef, core_1.Renderer])
], TagInput);
return TagInput;
], TagInputComponent);
return TagInputComponent;
}(accessor_1.TagInputAccessor));
exports.TagInput = TagInput;
exports.TagInputComponent = TagInputComponent;
//# sourceMappingURL=tag-input.js.map
{
"name": "ng2-tag-input",
"version": "0.3.0",
"version": "0.3.1",
"description": "Tag Input component for Angular 2",

@@ -22,11 +22,9 @@ "scripts": {

"devDependencies": {
"@angular/common": "^2.0.0-rc.6",
"@angular/compiler": "^2.0.0-rc.6",
"@angular/core": "^2.0.0-rc.6",
"@angular/forms": "^2.0.0-rc.6",
"@angular/http": "^2.0.0-rc.6",
"@angular/platform-browser": "^2.0.0-rc.6",
"@angular/platform-browser-dynamic": "^2.0.0-rc.6",
"@angular/platform-server": "^2.0.0-rc.6",
"@angular/router": "^2.0.0-rc.2",
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"autoprefixer": "^6.3.7",

@@ -52,3 +50,3 @@ "awesome-typescript-loader": "~0.16.2",

"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.11",
"rxjs": "5.0.0-beta.12",
"sass-loader": "^3.2.3",

@@ -66,6 +64,6 @@ "source-map-loader": "^0.1.5",

"webpack-merge": "^0.8.4",
"zone.js": "0.6.17"
"zone.js": "0.6.23"
},
"dependencies": {
"ng2-material-dropdown": "^0.3.1"
"ng2-material-dropdown": "^0.3.2"
},

@@ -72,0 +70,0 @@ "keywords": [

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