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

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.2.9 to 0.3.0

5

dist/modules/components/tag-input.d.ts

@@ -16,2 +16,5 @@ import { ElementRef, EventEmitter, Renderer, OnInit } from '@angular/core';

onlyFromAutocomplete: boolean;
errorMessages: {
[key: string]: string;
};
onAdd: EventEmitter<string>;

@@ -37,2 +40,3 @@ onRemove: EventEmitter<string>;

handleKeydown($event: any, item: string): void;
errors: string[];
private setInputValue(value);

@@ -43,3 +47,2 @@ private getControl();

private maxItemsReached;
private escapeDropdown($event);
ngOnInit(): void;

@@ -46,0 +49,0 @@ ngAfterViewChecked(): void;

22

dist/modules/components/tag-input.js

@@ -40,2 +40,3 @@ "use strict";

this.onlyFromAutocomplete = false;
this.errorMessages = {};
this.onAdd = new core_1.EventEmitter();

@@ -100,2 +101,12 @@ this.onRemove = new core_1.EventEmitter();

};
Object.defineProperty(TagInputComponent.prototype, "errors", {
get: function () {
var _this = this;
return Object.keys(this.errorMessages)
.filter(function (err) { return _this.form.get('item').hasError(err); })
.map(function (err) { return _this.errorMessages[err]; });
},
enumerable: true,
configurable: true
});
TagInputComponent.prototype.setInputValue = function (value) {

@@ -126,9 +137,2 @@ var item = value ? this.transform(value) : '';

});
TagInputComponent.prototype.escapeDropdown = function ($event) {
var isArrowUp = $event.keyCode === 38;
var isFirstItemsSelected = this.dropdown.menu.items.first.isSelected;
if (isArrowUp && isFirstItemsSelected) {
this.focus();
}
};
TagInputComponent.prototype.ngOnInit = function () {

@@ -212,2 +216,6 @@ events_actions_1.addListener.call(this, constants_1.KEYDOWN, events_actions_1.backSpaceListener);

__decorate([
core_1.Input(),
__metadata('design:type', Object)
], TagInputComponent.prototype, "errorMessages", void 0);
__decorate([
core_1.Output(),

@@ -214,0 +222,0 @@ __metadata('design:type', Object)

{
"name": "ng2-tag-input",
"version": "0.2.9",
"version": "0.3.0",
"description": "Tag Input component for Angular 2",

@@ -5,0 +5,0 @@ "scripts": {

@@ -64,2 +64,3 @@ # Angular2 Tag Input [![Build Status](https://travis-ci.org/Gbuomprisco/ng2-tag-input.svg?branch=develop)](https://travis-ci.org/Gbuomprisco/ng2-tag-input)

- **`validators`** - [**`?Validators[]`**] - an array of Validators (custom or Angular's) that will validate the tag before adding it to the list of items. It is possible to use multiple validators.
- **`errorMessages`** - [**`?Object{error: message}`**] - an object whose key is the name of the error (ex. required) and the value is the message you want to display to your users
- **`autocomplete`** - [**`?boolean`**] - if true, it adds an autocomplete component from which is possible to select items

@@ -66,0 +67,0 @@ - **`autocompleteItems`** - [**`?string[]`**] - an array of items to populate the autocomplete dropdown

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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