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.7 to 0.2.8

README.md

3

dist/components/events-actions.js

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

__metadata('design:type', Array)
], TagInputComponent.prototype, "separatorKeys", void 0);
], TagInput.prototype, "separatorKeys", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', String)
], TagInputComponent.prototype, "placeholder", void 0);
], TagInput.prototype, "placeholder", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', String)
], TagInputComponent.prototype, "secondaryPlaceholder", void 0);
], TagInput.prototype, "secondaryPlaceholder", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Number)
], TagInputComponent.prototype, "maxItems", void 0);
], TagInput.prototype, "maxItems", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Boolean)
], TagInputComponent.prototype, "readonly", void 0);
], TagInput.prototype, "readonly", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Function)
], TagInputComponent.prototype, "transform", void 0);
], TagInput.prototype, "transform", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Object)
], TagInputComponent.prototype, "validators", void 0);
], TagInput.prototype, "validators", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Boolean)
], TagInputComponent.prototype, "autocomplete", void 0);
], TagInput.prototype, "autocomplete", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Array)
], TagInputComponent.prototype, "autocompleteItems", void 0);
], TagInput.prototype, "autocompleteItems", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', Boolean)
], TagInputComponent.prototype, "onlyFromAutocomplete", void 0);
], TagInput.prototype, "onlyFromAutocomplete", void 0);
__decorate([
core_1.Output(),
__metadata('design:type', Object)
], TagInputComponent.prototype, "onAdd", void 0);
], TagInput.prototype, "onAdd", void 0);
__decorate([
core_1.Output(),
__metadata('design:type', Object)
], TagInputComponent.prototype, "onRemove", void 0);
], TagInput.prototype, "onRemove", void 0);
__decorate([
core_1.Output(),
__metadata('design:type', Object)
], TagInputComponent.prototype, "onSelect", void 0);
], TagInput.prototype, "onSelect", void 0);
__decorate([
core_1.ViewChild('template'),
__metadata('design:type', core_1.ElementRef)
], TagInputComponent.prototype, "template", void 0);
], TagInput.prototype, "template", void 0);
__decorate([
core_1.ViewChild(ng2_material_dropdown_1.Ng2Dropdown),
__metadata('design:type', Object)
], TagInputComponent.prototype, "dropdown", void 0);
TagInputComponent = __decorate([
], TagInput.prototype, "dropdown", void 0);
TagInput = __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: [{

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

__metadata('design:paramtypes', [core_1.ElementRef, core_1.Renderer])
], TagInputComponent);
return TagInputComponent;
], TagInput);
return TagInput;
}(accessor_1.TagInputAccessor));
exports.TagInputComponent = TagInputComponent;
exports.TagInput = TagInput;
//# sourceMappingURL=tag-input.js.map

@@ -1,6 +0,5 @@

declare const Ng2Dropdown: any;
declare const Ng2DropdownMenu: any;
declare const Ng2MenuItem: any;
declare const Ng2DropdownButton: any;
declare const Ng2DropdownModule: any;
export { Ng2Dropdown, Ng2DropdownMenu, Ng2DropdownButton, Ng2MenuItem, Ng2DropdownModule };
export declare const Ng2Dropdown: any;
export declare const Ng2DropdownMenu: any;
export declare const Ng2MenuItem: any;
export declare const Ng2DropdownButton: any;
export declare const Ng2DropdownModule: any;
"use strict";
var components = require('./dist/ng2-dropdown.bundle.js');
var Ng2Dropdown = components.Ng2Dropdown;
exports.Ng2Dropdown = Ng2Dropdown;
var Ng2DropdownMenu = components.Ng2DropdownMenu;
exports.Ng2DropdownMenu = Ng2DropdownMenu;
var Ng2MenuItem = components.Ng2MenuItem;
exports.Ng2MenuItem = Ng2MenuItem;
var Ng2DropdownButton = components.Ng2DropdownButton;
exports.Ng2DropdownButton = Ng2DropdownButton;
var Ng2DropdownModule = components.Ng2DropdownModule;
exports.Ng2DropdownModule = Ng2DropdownModule;
var components = require('./ng2-dropdown.bundle.js');
exports.Ng2Dropdown = components.Ng2Dropdown;
exports.Ng2DropdownMenu = components.Ng2DropdownMenu;
exports.Ng2MenuItem = components.Ng2MenuItem;
exports.Ng2DropdownButton = components.Ng2DropdownButton;
exports.Ng2DropdownModule = components.Ng2DropdownModule;
//# sourceMappingURL=index.js.map
{
"name": "ng2-tag-input",
"version": "0.2.7",
"version": "0.2.8",
"description": "Tag Input component for Angular 2",

@@ -67,3 +67,3 @@ "scripts": {

"dependencies": {
"ng2-material-dropdown": "^0.2.9"
"ng2-material-dropdown": "^0.3.1"
},

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

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 too big to display

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