Socket
Socket
Sign inDemoInstall

select2-component

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

select2-component - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

2

angular-variables.d.ts

@@ -5,2 +5,2 @@ /**

*/
export declare const angularTemplateHtml = "<div [class]=\"containerStyle\"><div class=\"selection\" #selection [attr.tabindex]=\"!this.isOpen ? tabIndex : '-1'\" (click)=\"toggleOpenAndClose()\" (focus)=\"focusin()\" (blur)=\"focusout()\" (keydown)=\"openKey($event)\" [class.select2-focused]=\"focused\"><div [class]=\"selectionStyle\" role=\"combobox\"><span *ngIf=\"!multiple\" class=\"select2-selection__rendered\" [title]=\"option ? option.label : ''\"><span *ngIf=\"!option\">&nbsp;</span><ng-container *ngIf=\"option\">{{option.label}}</ng-container><span [class.select2-selection__placeholder__option]=\"option\" class=\"select2-selection__placeholder\">{{placeholder}}</span></span><span *ngIf=\"!multiple\" class=\"select2-selection__arrow\" role=\"presentation\"><b role=\"presentation\"></b></span><ul *ngIf=\"multiple\" class=\"select2-selection__rendered\"><span [class.select2-selection__placeholder__option]=\"option?.length > 0\" class=\"select2-selection__placeholder\">{{placeholder}}</span><li *ngFor=\"let op of option; trackBy: trackBy\" class=\"select2-selection__choice\" [title]=\"op.label\"><span (click)=\"removeSelection($event, op)\" class=\"select2-selection__choice__remove\" role=\"presentation\">×</span>{{op.label}}</li></ul></div><div class=\"select2-subscript-wrapper\"><ng-content select=\"select2-hint\"></ng-content></div></div><div [class]=\"dropdownStyle\"><div class=\"select2-dropdown select2-dropdown--below\"><div [class]=\"searchStyle\"><input #searchInput [id]=\"id + '-search-field'\" [(value)]=\"searchText\" (keydown)=\"keyDown($event)\" (keyup)=\"searchUpdate($event)\" class=\"select2-search__field\" type=\"search\" role=\"textbox\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" [attr.tabindex]=\"this.isOpen ? tabIndex : '-1'\"></div><div class=\"select2-results\"><ul #results class=\"select2-results__options\" role=\"tree\" tabindex=\"-1\" (keydown)=\"keyDown($event)\"><ng-template ngFor [ngForOf]=\"filteredData\" let-groupOrOption [ngForTrackBy]=\"trackBy\"><li *ngIf=\"groupOrOption.options\" class=\"select2-results__option\" role=\"group\"><strong [attr.class]=\"'select2-results__group' + (groupOrOption.classes ? ' ' + groupOrOption.classes : '')\">{{groupOrOption.label}}</strong><ul class=\"select2-results__options select2-results__options--nested\"><li *ngFor=\"let option of groupOrOption.options; trackBy:trackBy\" [class]=\"getOptionStyle(option)\" role=\"treeitem\" [attr.aria-selected]=\"isSelected(option)\" [attr.aria-disabled]=\"isDisabled(option)\" (mouseenter)=\"mouseenter(option)\" (click)=\"click(option)\">{{option.label}}</li></ul></li><li *ngIf=\"!groupOrOption.options\" [class]=\"getOptionStyle(groupOrOption)\" role=\"treeitem\" [attr.aria-selected]=\"isSelected(groupOrOption)\" [attr.aria-disabled]=\"isDisabled(groupOrOption)\" (mouseenter)=\"mouseenter(groupOrOption)\" (click)=\"click(groupOrOption)\">{{groupOrOption.label}}</li></ng-template></ul></div></div></div></div>";
export declare const angularTemplateHtml: string;

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

"use strict";
/**

@@ -2,0 +3,0 @@ * This file is generated by 'file2variable-cli'

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

"use strict";
import * as tslib_1 from "tslib";
import { Component, Directive, Input, Output, EventEmitter, ElementRef, ViewChild, Optional, Self, ChangeDetectorRef, ViewEncapsulation, Attribute, } from "@angular/core";
import { FormGroupDirective, NgControl, NgForm, } from "@angular/forms";
import { Subject } from "rxjs";
import { Subject } from "rxjs/Subject";
import * as common from "./common";

@@ -9,3 +10,3 @@ export * from "./common";

var nextUniqueId = 0;
var Select2Hint = /** @class */ (function () {
var Select2Hint = (function () {
function Select2Hint() {

@@ -19,3 +20,3 @@ }

export { Select2Hint };
var Select2 = /** @class */ (function () {
var Select2 = (function () {
function Select2(_changeDetectorRef, _parentForm, _parentFormGroup, _control, tabIndex) {

@@ -22,0 +23,0 @@ this._changeDetectorRef = _changeDetectorRef;

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

"use strict";
import * as tslib_1 from "tslib";

@@ -8,3 +9,3 @@ import { NgModule } from "@angular/core";

*/
var Select2Module = /** @class */ (function () {
var Select2Module = (function () {
function Select2Module() {

@@ -11,0 +12,0 @@ }

@@ -5,2 +5,2 @@ /**

*/
export declare const angularTemplateHtml = "<div [class]=\"containerStyle\"><div class=\"selection\" #selection [attr.tabindex]=\"!this.isOpen ? tabIndex : '-1'\" (click)=\"toggleOpenAndClose()\" (focus)=\"focusin()\" (blur)=\"focusout()\" (keydown)=\"openKey($event)\" [class.select2-focused]=\"focused\"><div [class]=\"selectionStyle\" role=\"combobox\"><span *ngIf=\"!multiple\" class=\"select2-selection__rendered\" [title]=\"option ? option.label : ''\"><span *ngIf=\"!option\">&nbsp;</span><ng-container *ngIf=\"option\">{{option.label}}</ng-container><span [class.select2-selection__placeholder__option]=\"option\" class=\"select2-selection__placeholder\">{{placeholder}}</span></span><span *ngIf=\"!multiple\" class=\"select2-selection__arrow\" role=\"presentation\"><b role=\"presentation\"></b></span><ul *ngIf=\"multiple\" class=\"select2-selection__rendered\"><span [class.select2-selection__placeholder__option]=\"option?.length > 0\" class=\"select2-selection__placeholder\">{{placeholder}}</span><li *ngFor=\"let op of option; trackBy: trackBy\" class=\"select2-selection__choice\" [title]=\"op.label\"><span (click)=\"removeSelection($event, op)\" class=\"select2-selection__choice__remove\" role=\"presentation\">×</span>{{op.label}}</li></ul></div><div class=\"select2-subscript-wrapper\"><ng-content select=\"select2-hint\"></ng-content></div></div><div [class]=\"dropdownStyle\"><div class=\"select2-dropdown select2-dropdown--below\"><div [class]=\"searchStyle\"><input #searchInput [id]=\"id + '-search-field'\" [(value)]=\"searchText\" (keydown)=\"keyDown($event)\" (keyup)=\"searchUpdate($event)\" class=\"select2-search__field\" type=\"search\" role=\"textbox\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" [attr.tabindex]=\"this.isOpen ? tabIndex : '-1'\"></div><div class=\"select2-results\"><ul #results class=\"select2-results__options\" role=\"tree\" tabindex=\"-1\" (keydown)=\"keyDown($event)\"><ng-template ngFor [ngForOf]=\"filteredData\" let-groupOrOption [ngForTrackBy]=\"trackBy\"><li *ngIf=\"groupOrOption.options\" class=\"select2-results__option\" role=\"group\"><strong [attr.class]=\"'select2-results__group' + (groupOrOption.classes ? ' ' + groupOrOption.classes : '')\">{{groupOrOption.label}}</strong><ul class=\"select2-results__options select2-results__options--nested\"><li *ngFor=\"let option of groupOrOption.options; trackBy:trackBy\" [class]=\"getOptionStyle(option)\" role=\"treeitem\" [attr.aria-selected]=\"isSelected(option)\" [attr.aria-disabled]=\"isDisabled(option)\" (mouseenter)=\"mouseenter(option)\" (click)=\"click(option)\">{{option.label}}</li></ul></li><li *ngIf=\"!groupOrOption.options\" [class]=\"getOptionStyle(groupOrOption)\" role=\"treeitem\" [attr.aria-selected]=\"isSelected(groupOrOption)\" [attr.aria-disabled]=\"isDisabled(groupOrOption)\" (mouseenter)=\"mouseenter(groupOrOption)\" (click)=\"click(groupOrOption)\">{{groupOrOption.label}}</li></ng-template></ul></div></div></div></div>";
export declare const angularTemplateHtml: string;

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

"use strict";
/**

@@ -2,0 +3,0 @@ * This file is generated by 'file2variable-cli'

@@ -0,4 +1,5 @@

"use strict";
import { Component, Directive, Input, Output, EventEmitter, ElementRef, ViewChild, Optional, Self, ChangeDetectorRef, ViewEncapsulation, Attribute, } from "@angular/core";
import { FormGroupDirective, NgControl, NgForm, ControlValueAccessor, } from "@angular/forms";
import { Subject } from "rxjs";
import { FormGroupDirective, NgControl, NgForm, } from "@angular/forms";
import { Subject } from "rxjs/Subject";
import * as common from "./common";

@@ -8,9 +9,14 @@ export * from "./common";

var nextUniqueId = 0;
var Select2Hint = /** @class */ (function () {
var Select2Hint = (function () {
function Select2Hint() {
}
Select2Hint.decorators = [
{ type: Directive, args: [{ selector: "select2-hint" },] },
];
/** @nocollapse */
Select2Hint.ctorParameters = function () { return []; };
return Select2Hint;
}());
export { Select2Hint };
var Select2 = /** @class */ (function () {
var Select2 = (function () {
function Select2(_changeDetectorRef, _parentForm, _parentFormGroup, _control, tabIndex) {

@@ -21,2 +27,29 @@ this._changeDetectorRef = _changeDetectorRef;

this._control = _control;
this.update = new EventEmitter();
this.open = new EventEmitter();
this.search = new EventEmitter();
this.option = null;
this.isOpen = false;
this.hoveringValue = null;
this.innerSearchText = "";
this.lastScrollTopIndex = 0;
// tslint:disable:member-ordering
// tslint:disable:variable-name
this._stateChanges = new Subject();
/** Whether the element is focused or not. */
this.focused = false;
/** View -> model callback called when select has been touched */
this._onTouched = function () {
// do nothing
};
/** View -> model callback called when value changes */
this._onChange = function () {
// do nothing
};
this._disabled = false;
this._required = false;
this._readonly = false;
this._clickDetection = false;
this._uid = "select2-" + nextUniqueId++;
this._previousNativeValue = this._value;
this.id = this.id;

@@ -518,4 +551,45 @@ this._tabIndex = parseInt(tabIndex, 10) || 0;

};
Select2.decorators = [
{ type: Component, args: [{
selector: "select2",
template: angularTemplateHtml,
encapsulation: ViewEncapsulation.None,
host: {
"[id]": "id",
"[attr.aria-invalid]": "_isErrorState()",
"[class.material]": "material === '' || this.material == true",
},
},] },
];
/** @nocollapse */
Select2.ctorParameters = function () { return [
{ type: ChangeDetectorRef, },
{ type: NgForm, decorators: [{ type: Optional },] },
{ type: FormGroupDirective, decorators: [{ type: Optional },] },
{ type: NgControl, decorators: [{ type: Self }, { type: Optional },] },
{ type: undefined, decorators: [{ type: Attribute, args: ["tabindex",] },] },
]; };
Select2.propDecorators = {
"data": [{ type: Input },],
"minCountForSearch": [{ type: Input },],
"placeholder": [{ type: Input },],
"customSearchEnabled": [{ type: Input },],
"multiple": [{ type: Input },],
"material": [{ type: Input },],
"editPattern": [{ type: Input },],
"update": [{ type: Output },],
"open": [{ type: Output },],
"search": [{ type: Output },],
"selection": [{ type: ViewChild, args: ["selection",] },],
"results": [{ type: ViewChild, args: ["results",] },],
"searchInput": [{ type: ViewChild, args: ["searchInput",] },],
"id": [{ type: Input },],
"required": [{ type: Input },],
"disabled": [{ type: Input },],
"readonly": [{ type: Input },],
"value": [{ type: Input },],
"tabIndex": [{ type: Input },],
};
return Select2;
}());
export { Select2 };

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

"use strict";
/**

@@ -2,0 +3,0 @@ * @fileoverview This file is generated by the Angular template compiler.

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

"use strict";
import { NgModule } from "@angular/core";

@@ -7,15 +8,26 @@ import { CommonModule } from "@angular/common";

*/
var /**
* @public
*/
Select2Module = /** @class */ (function () {
var Select2Module = (function () {
function Select2Module() {
}
Select2Module.decorators = [
{ type: NgModule, args: [{
declarations: [
Select2Hint,
Select2,
],
imports: [
CommonModule,
],
exports: [
Select2Hint,
Select2,
],
},] },
];
/** @nocollapse */
Select2Module.ctorParameters = function () { return []; };
return Select2Module;
}());
/**
* @public
*/
export { Select2Module };
export * from "./angular.component";
export * from "./common";

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

"use strict";
/**

@@ -2,0 +3,0 @@ * @fileoverview This file is generated by the Angular template compiler.

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

"use strict";
export var timeout = 200;

@@ -2,0 +3,0 @@ var unicodePatterns = [

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

"use strict";
export var timeout = 200;

@@ -2,0 +3,0 @@ var unicodePatterns = [

{
"name": "select2-component",
"version": "4.0.0",
"version": "4.0.1",
"description": "A vuejs, reactjs and angular select component.",

@@ -65,3 +65,3 @@ "main": "index.js",

"tslint": "5.8.0",
"typescript": "2.6.1",
"typescript": "2.4.2",
"vue": "2.5.3",

@@ -68,0 +68,0 @@ "vue-class-component": "6.0.0",

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

"use strict";
import * as tslib_1 from "tslib";

@@ -9,3 +10,3 @@ import * as React from "react";

*/
var Select2 = /** @class */ (function (_super) {
var Select2 = (function (_super) {
tslib_1.__extends(Select2, _super);

@@ -12,0 +13,0 @@ function Select2() {

@@ -5,2 +5,2 @@ /**

*/
export declare const vueTemplateHtml = "<div :class=\"containerStyle\"><div class=\"selection\" @click=\"toggleOpenAndClose()\"><div :class=\"selectionStyle\" role=\"combobox\"><span v-if=\"!multiple\" class=\"select2-selection__rendered\" :title=\"option ? option.label : ''\"><template v-if=\"option\"><component v-if=\"option.component\" :is=\"option.component\" :option=\"option\"></component><template v-else>{{option.label}}</template></template><span v-else class=\"select2-selection__placeholder\">{{placeholder}}</span></span><span v-if=\"!multiple\" class=\"select2-selection__arrow\" role=\"presentation\"><b role=\"presentation\"></b></span><ul v-if=\"multiple\" class=\"select2-selection__rendered\"><li v-for=\"(op, i) in option\" :key=\"i\" class=\"select2-selection__choice\" :title=\"op.label\"><span @click=\"removeSelection($event, op)\" class=\"select2-selection__choice__remove\" role=\"presentation\">×</span>{{op.label}}</li></ul></div></div><div :class=\"dropdownStyle\"><div class=\"select2-dropdown select2-dropdown--below\"><div :class=\"searchStyle\"><input ref=\"searchInput\" v-model=\"searchText\" @keydown=\"keyDown($event)\" @focusout=\"focusout()\" class=\"select2-search__field\" type=\"search\" role=\"textbox\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\"></div><div class=\"select2-results\"><ul ref=\"results\" class=\"select2-results__options\" role=\"tree\" tabindex=\"-1\" @keydown=\"keyDown($event)\" @focusout=\"focusout()\"><template v-for=\"(groupOrOption, i) in filteredData\" :key=\"i\"><li v-if=\"groupOrOption.options\" class=\"select2-results__option\" role=\"group\"><strong class=\"select2-results__group\">{{groupOrOption.label}}</strong><ul class=\"select2-results__options select2-results__options--nested\"><li v-for=\"(option, j) in groupOrOption.options\" :key=\"j\" :class=\"getOptionStyle(option.value)\" role=\"treeitem\" :aria-selected=\"isSelected(option)\" :aria-disabled=\"isDisabled(option)\" @mouseenter=\"mouseenter(option)\" @click=\"click(option)\"><component v-if=\"option.component\" :is=\"option.component\" :option=\"option\"></component><template v-else>{{option.label}}</template></li></ul></li><li v-else :class=\"getOptionStyle(groupOrOption.value)\" role=\"treeitem\" :aria-selected=\"isSelected(groupOrOption)\" :aria-disabled=\"isDisabled(groupOrOption)\" @mouseenter=\"mouseenter(groupOrOption)\" @click=\"click(groupOrOption)\"><component v-if=\"groupOrOption.component\" :is=\"groupOrOption.component\" :option=\"groupOrOption\"></component><template v-else>{{groupOrOption.label}}</template></li></template></ul></div></div></div></div>";
export declare const vueTemplateHtml: string;

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

"use strict";
/**

@@ -2,0 +3,0 @@ * This file is generated by 'file2variable-cli'

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

"use strict";
import * as tslib_1 from "tslib";

@@ -7,3 +8,3 @@ import Vue from "vue";

import { vueTemplateHtml } from "./vue-variables";
var Select2 = /** @class */ (function (_super) {
var Select2 = (function (_super) {
tslib_1.__extends(Select2, _super);

@@ -10,0 +11,0 @@ function Select2() {

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