ng-select2-component 13.0.5 → 13.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,7 +3,6 @@ import { CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
|
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { EventEmitter, TemplateRef, numberAttribute, booleanAttribute, Component, Optional, Self, Attribute, Input, HostBinding, Output, ViewChild, ViewChildren, HostListener, Directive, NgModule } from '@angular/core';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
6
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
7
6
|
import * as i1 from '@angular/cdk/scrolling';
|
|
8
7
|
import * as i2 from '@angular/forms';
|
|
9
8
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
@@ -351,7 +350,7 @@ class Select2 {
|
|
|
351
350
|
return this._multiple;
|
|
352
351
|
}
|
|
353
352
|
set multiple(value) {
|
|
354
|
-
this._multiple =
|
|
353
|
+
this._multiple = value;
|
|
355
354
|
this.ngOnInit();
|
|
356
355
|
}
|
|
357
356
|
/** minimal data of show the search field */
|
|
@@ -598,7 +597,6 @@ class Select2 {
|
|
|
598
597
|
event.stopPropagation();
|
|
599
598
|
}
|
|
600
599
|
toggleOpenAndClose(focus = true, open, event) {
|
|
601
|
-
console.error();
|
|
602
600
|
if (this.disabled) {
|
|
603
601
|
return;
|
|
604
602
|
}
|
|
@@ -703,7 +701,7 @@ class Select2 {
|
|
|
703
701
|
}
|
|
704
702
|
if (writeValue) {
|
|
705
703
|
// refresh current selected value
|
|
706
|
-
this.writeValue(this.value);
|
|
704
|
+
this.writeValue(this._control ? this._control.value : this.value);
|
|
707
705
|
}
|
|
708
706
|
this.filteredData = result;
|
|
709
707
|
this._changeDetectorRef.markForCheck();
|
|
@@ -773,7 +771,6 @@ class Select2 {
|
|
|
773
771
|
if (this.isOpen) {
|
|
774
772
|
this.isOpen = false;
|
|
775
773
|
this.close.emit(this);
|
|
776
|
-
console.error();
|
|
777
774
|
this.selectionElement?.focus();
|
|
778
775
|
}
|
|
779
776
|
value = this.option.value;
|
|
@@ -826,11 +823,9 @@ class Select2 {
|
|
|
826
823
|
this.toggleOpenAndClose(true, true, event);
|
|
827
824
|
event.preventDefault();
|
|
828
825
|
}
|
|
829
|
-
else if (this._testKey(event, ['Escape', 'Tab', 9, 27])) {
|
|
826
|
+
else if (this._testKey(event, ['Escape', 'Tab', 9, 27]) && this.isOpen) {
|
|
830
827
|
this.toggleOpenAndClose(false);
|
|
831
|
-
|
|
832
|
-
event.preventDefault();
|
|
833
|
-
}
|
|
828
|
+
event.preventDefault();
|
|
834
829
|
this._onTouched();
|
|
835
830
|
}
|
|
836
831
|
}
|
|
@@ -1069,7 +1064,7 @@ class Select2 {
|
|
|
1069
1064
|
: this.listPosition === 'above';
|
|
1070
1065
|
}
|
|
1071
1066
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: Select2, deps: [{ token: i1.ViewportRuler }, { token: i0.ChangeDetectorRef }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i2.NgControl, optional: true, self: true }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1072
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: Select2, selector: "select2", inputs: { data: "data", minCharForSearch: ["minCharForSearch", "minCharForSearch", numberAttribute], displaySearchStatus: "displaySearchStatus", placeholder: "placeholder", limitSelection: ["limitSelection", "limitSelection", numberAttribute], listPosition: "listPosition", multiple: "multiple", overlay: ["overlay", "overlay", booleanAttribute], styleMode: "styleMode", noResultMessage: "noResultMessage", maxResults: ["maxResults", "maxResults", numberAttribute], maxResultsMessage: "maxResultsMessage", infiniteScrollDistance: ["infiniteScrollDistance", "infiniteScrollDistance", numberAttribute], infiniteScrollThrottle: ["infiniteScrollThrottle", "infiniteScrollThrottle", numberAttribute], infiniteScroll: ["infiniteScroll", "infiniteScroll", booleanAttribute], autoCreate: ["autoCreate", "autoCreate", booleanAttribute], noLabelTemplate: ["noLabelTemplate", "noLabelTemplate", booleanAttribute], editPattern: "editPattern", templates: "templates", resultMaxHeight: "resultMaxHeight", customSearchEnabled: ["customSearchEnabled", "customSearchEnabled", booleanAttribute], minCountForSearch: ["minCountForSearch", "minCountForSearch", numberAttribute], id: "id", required: ["required", "required", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], hideSelectedItems: ["hideSelectedItems", "hideSelectedItems", booleanAttribute], readonly: ["readonly", "readonly", booleanAttribute], value: "value", tabIndex: ["tabIndex", "tabIndex", numberAttribute], resettable: ["resettable", "resettable", booleanAttribute], resetSelectedValue: "resetSelectedValue" }, outputs: { update: "update", open: "open", close: "close", focus: "focus", blur: "blur", search: "search", scroll: "scroll", removeOption: "removeOption" }, host: { listeners: { "document:click": "clickDetection($event)" }, properties: { "id": "this.id", "attr.aria-invalid": "this.ariaInvalid", "class.material": "this.classMaterial", "class.nostyle": "this.classNostyle", "class.select2-above": "this.select2above" } }, viewQueries: [{ propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true }, { propertyName: "selection", first: true, predicate: ["selection"], descendants: true, static: true }, { propertyName: "resultContainer", first: true, predicate: ["results"], descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }, { propertyName: "results", predicate: ["result"], descendants: true }], ngImport: i0, template: "<div class=\"select2-label\" (click)=\"toggleOpenAndClose()\">\n <ng-content select=\"select2-label\"></ng-content>\n <span *ngIf=\"required\" class=\"select2-required\"></span>\n</div>\n<div\n class=\"select2 select2-container select2-container--default\"\n [class.select2-container--focus]=\"focused\"\n [class.select2-container--below]=\"!select2above\"\n [class.select2-container--above]=\"select2above\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-container--disabled]=\"disabled\"\n>\n <div\n class=\"selection\"\n #selection\n #trigger=\"cdkOverlayOrigin\"\n [tabindex]=\"!this.isOpen ? tabIndex : '-1'\"\n (click)=\"toggleOpenAndClose()\"\n (focus)=\"focusin()\"\n (blur)=\"focusout()\"\n (keydown)=\"openKey($event)\"\n cdkOverlayOrigin\n [class.select2-focused]=\"focused\"\n >\n <div\n class=\"select2-selection\"\n [class.select2-selection--multiple]=\"multiple\"\n [class.select2-selection--single]=\"!multiple\"\n role=\"combobox\"\n >\n <span *ngIf=\"!multiple\" class=\"select2-selection__rendered\" [title]=\"select2Option?.label || ''\">\n <span *ngIf=\"!select2Option\"> </span>\n <ng-container *ngIf=\"select2Option\">\n <span\n *ngIf=\"!hasTemplate(select2Option, 'option') || noLabelTemplate; else template\"\n [innerHTML]=\"select2Option.label\"\n ></span>\n <ng-template #template>\n <ng-container *ngTemplateOutlet=\"getTemplate(select2Option, 'option'); context: select2Option\">\n </ng-container>\n </ng-template>\n </ng-container>\n <span [class.select2-selection__placeholder__option]=\"option\" class=\"select2-selection__placeholder\">{{\n placeholder\n }}</span>\n </span>\n <span\n (click)=\"reset($event)\"\n *ngIf=\"\n !multiple && resettable && resetSelectedValue !== value && select2Option && !(disabled || readonly)\n \"\n class=\"select2-selection__reset\"\n role=\"presentation\"\n >\u00D7</span\n >\n <span *ngIf=\"!multiple\" class=\"select2-selection__arrow\" role=\"presentation\"> </span>\n <ul *ngIf=\"multiple\" class=\"select2-selection__rendered\">\n <span\n *ngIf=\"!autoCreate\"\n [class.select2-selection__placeholder__option]=\"select2Options?.length > 0\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder }}</span\n >\n <li\n *ngFor=\"let op of option; trackBy: trackBy\"\n class=\"select2-selection__choice\"\n [title]=\"op.label\"\n tabindex=\"0\"\n (keydown.enter)=\"removeSelection($event, op)\"\n >\n <span\n *ngIf=\"!(disabled || readonly)\"\n (click)=\"removeSelection($event, op)\"\n class=\"select2-selection__choice__remove\"\n role=\"presentation\"\n >\u00D7</span\n >\n <span\n *ngIf=\"!hasTemplate(op, 'option') || noLabelTemplate; else templateMultiple\"\n [innerHTML]=\"op.label\"\n ></span>\n <ng-template #templateMultiple>\n <ng-container *ngTemplateOutlet=\"getTemplate(op, 'option'); context: op\"></ng-container>\n </ng-template>\n </li>\n <li\n *ngIf=\"autoCreate\"\n class=\"select2-selection__auto-create\"\n (focus)=\"stopEvent($event)\"\n (blur)=\"stopEvent($event)\"\n >\n <input\n [id]=\"id + '-create-field'\"\n (click)=\"toggleOpenAndClose(false, true); stopEvent($event)\"\n (keydown)=\"keyDown($event, true)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-create__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n />\n </li>\n </ul>\n </div>\n </div>\n <ng-container *ngIf=\"!overlay\">\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n </ng-container>\n\n <div class=\"select2-subscript-wrapper\">\n <ng-content select=\"select2-hint\"></ng-content>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"select2-overlay-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"this.isOpen && overlay\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHeight]=\"overlayHeight\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"toggleOpenAndClose()\"\n>\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #containerTemplate>\n <div\n class=\"select2-container select2-container--default select2-container-dropdown\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-overlay]=\"overlay\"\n [class.select2-position-auto]=\"listPosition === 'auto'\"\n >\n <div\n #dropdown\n class=\"select2-dropdown\"\n [class.select2-dropdown--below]=\"!select2above\"\n [class.select2-dropdown--above]=\"select2above\"\n >\n <div class=\"select2-search select2-search--dropdown\" [class.select2-search--hide]=\"hideSearch()\">\n <input\n #searchInput\n [id]=\"id + '-search-field'\"\n [value]=\"searchText\"\n (keydown)=\"keyDown($event)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-search__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [attr.tabindex]=\"this.isOpen ? tabIndex : '-1'\"\n />\n </div>\n <div class=\"select2-results\">\n <ul\n #results\n class=\"select2-results__options\"\n [style.max-height]=\"resultMaxHeight\"\n role=\"tree\"\n tabindex=\"-1\"\n infiniteScroll\n [infiniteScrollDisabled]=\"!infiniteScroll && !isOpen\"\n [infiniteScrollDistance]=\"infiniteScrollDistance\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle\"\n [infiniteScrollContainer]=\"results\"\n (scrolled)=\"onScroll('down')\"\n (scrolledUp)=\"onScroll('up')\"\n (keydown)=\"keyDown($event)\"\n >\n <ng-container *ngFor=\"let groupOrOption of filteredData; index as i; trackBy: trackBy\">\n <li *ngIf=\"groupOrOption.options\" class=\"select2-results__option\" role=\"group\">\n <strong\n *ngIf=\"!hasTemplate(groupOrOption, 'group'); else optGroup\"\n [attr.class]=\"\n 'select2-results__group' +\n (groupOrOption.classes ? ' ' + groupOrOption.classes : '')\n \"\n [innerHTML]=\"groupOrOption.label\"\n ></strong>\n <ng-template #optGroup>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'group'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n\n <ul class=\"select2-results__options select2-results__options--nested\">\n <li\n *ngFor=\"let option of groupOrOption.options; index as j; trackBy: trackBy\"\n #result\n [id]=\"option.id || id + '-option-' + i + '-' + j\"\n [class]=\"getOptionStyle(option)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n <div\n *ngIf=\"!hasTemplate(option, 'option'); else liGroup\"\n class=\"select2-label-content\"\n [innerHTML]=\"option.label\"\n ></div>\n <ng-template #liGroup>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"\n >\n </ng-container>\n </ng-template>\n </li>\n </ul>\n </li>\n <li\n *ngIf=\"!groupOrOption.options\"\n #result\n [id]=\"groupOrOption.id || id + '-option-' + i\"\n [class]=\"getOptionStyle(groupOrOption)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(groupOrOption)\"\n [attr.aria-disabled]=\"isDisabled(groupOrOption)\"\n (mouseenter)=\"mouseenter(groupOrOption)\"\n (click)=\"click(groupOrOption)\"\n >\n <div\n *ngIf=\"!hasTemplate(groupOrOption, 'option'); else li\"\n [innerHTML]=\"groupOrOption.label\"\n class=\"select2-label-content\"\n ></div>\n <ng-template #li>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'option'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n </li>\n </ng-container>\n <li\n class=\"select2-no-result select2-results__option\"\n *ngIf=\"!filteredData?.length && noResultMessage\"\n [innerHTML]=\"noResultMessage\"\n ></li>\n <li\n class=\"select2-too-much-result select2-results__option\"\n *ngIf=\"maxResultsExceeded\"\n [innerHTML]=\"maxResultsMessage\"\n ></li>\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [".select2-label{color:var(--select2-label-text-color, #000)}.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;width:100%}.select2-container .select2-container-dropdown{position:absolute;width:0px;opacity:0}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:var(--select2-single-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding:var(--select2-selection-padding, 0 0 0 8px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:var(--select2-multiple-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-flex;overflow:hidden;padding-left:8px;padding-bottom:2px;text-overflow:ellipsis;white-space:nowrap;flex-wrap:wrap;gap:var(--select2-selection-multiple-gap, 2px 5px)}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-selection__auto-create{flex:1 1 150px;min-width:150px;display:flex}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field{width:100%;border:0}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field:focus{border:0;outline:0}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background:var(--select2-dropdown-background, white);border:1px solid var(--select2-dropdown-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);box-sizing:border-box;display:block;position:absolute;width:100%;z-index:1051;height:0;overflow:hidden}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:var(--select2-option-padding, 6px);-webkit-user-select:none;user-select:none;color:var(--select2-option-text-color, #000)}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{width:100%;opacity:1}.select2-container--open .select2-dropdown{overflow:auto;height:auto}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;bottom:27px;display:flex;flex-direction:column-reverse}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99}.select2-required:before{content:\"*\";color:var(--select2-required-color, red)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2-container--default .select2-selection--single{background:var(--select2-selection-background, #fff);border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);display:flex}.select2-container--default .select2-selection--single .select2-selection__rendered{color:var(--select2-selection-text-color, #111);line-height:var(--select2-selection-line-height, 28px)}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:var(--select2-placeholder-color, #999)}.select2-container--default .select2-selection--single .select2-selection__placeholder span{overflow:hidden;white-space:nowrap;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__reset,.select2-container--default .select2-selection--single .select2-selection__arrow{display:flex;width:20px;align-items:center;justify-content:center}.select2-container--default .select2-selection--single .select2-selection__arrow:before{content:\" \";border-color:var(--select2-arrow-color, #888) transparent;border-style:solid;border-width:5px 4px 0;height:0;width:0}.select2-container--default .select2-selection--single .select2-selection__reset{color:var(--select2-reset-color, #999)}.select2-container--default.select2-container--disabled .select2-selection--single{background:var(--select2-selection-disabled-background, #eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:before{border-color:transparent transparent var(--select2-arrow-color, #888);border-width:0 4px 5px}.select2-container--default .select2-selection--multiple{background:var(--select2-selection-background, #fff);border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);cursor:text;display:flex}.select2-container--default .select2-selection--multiple .select2-selection__rendered{flex:1 1 auto;box-sizing:border-box;list-style:none;margin:0;padding:var(--select2-selection-multiple-padding, 2px 5px);width:100%;min-height:1em;align-items:center}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none;line-height:var(--select2-selection-choice-line-height, 20px)}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;width:100%;color:var(--select2-placeholder-color, #999);margin-top:5px;float:left;overflow:hidden;white-space:nowrap;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--multiple .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{color:var(--select2-selection-choice-text-color, #000);background:var(--select2-selection-choice-background, #e4e4e4);border:1px solid var(--select2-selection-choice-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);cursor:default;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:var(--select2-selection-choice-close-color, #999);cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:var(--select2-selection-choice-hover-close-color, #333)}.select2-container--default.select2-container--focused .select2-selection--multiple{border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default.select2-container--disabled .select2-selection--multiple{background:var(--select2-selection-disabled-background, #eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid var(--select2-search-border-color, #aaa);background:1px solid var(--select2-search-background, #fff);border-radius:var(--select2-search-border-radius, 0px)}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:none;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:var(--select2-option-disabled-text-color, #999);background:var(--select2-option-disabled-background, transparent)}.select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-option-selected-text-color, #000);background:var(--select2-option-selected-background, #ddd)}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-option-highlighted-background, #5897fb);color:var(--select2-option-highlighted-text-color, #fff)}.select2-container--default .select2-results__option--hide{display:none}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px;color:var(--select2-option-group-text-color, gray);background:var(--select2-option-group-background, transparent)}.select2-no-result{color:var(--select2-no-result-color, #888);font-style:var(--select2-no-result-font-style, italic)}.select2-too-much-result{color:var(--select2-too-much-result-color, #888);font-style:var(--select2-too-much-font-style, italic)}:host.nostyle .select2-dropdown{border-color:transparent}:host.nostyle .select2-selection--single,:host.nostyle .select2-selection--multiple{background:transparent;border-color:transparent}:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{background:transparent;border-color:transparent}:host.material{display:inline-block;width:300px}:host.material>.select2-container{padding-bottom:1.29688em;vertical-align:inherit}:host.material>.select2-container .selection{padding:.4375em 0;border-top:.84375em solid transparent;display:inline-flex;align-items:baseline;width:100%;height:auto}:host.material .select2-container--default .select2-selection--single,:host.material .select2-container--default .select2-selection--multiple{width:100%;border:0;border-radius:0;height:24px;box-sizing:border-box}:host.material .select2-container--default .select2-selection--single:before,:host.material .select2-container--default .select2-selection--multiple:before{content:\" \";display:block;position:absolute;bottom:1.65em;background:var(--select2-material-underline, #ddd);height:1px;width:100%}:host.material .select2-container--default .select2-selection--single:after,:host.material .select2-container--default .select2-selection--multiple:after{content:\" \";display:block;position:absolute;bottom:1.63em;background:var(--select2-material-underline-active, #5a419e);height:2px;width:0%;left:50%;transition:none}:host.material .select2-container--default .select2-selection--single .select2-selection__rendered,:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding-left:1px;line-height:inherit}:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;color:var(--select2-material-placeholder-color, rgba(0, 0, 0, .38));transition:transform .3s;position:absolute;transform-origin:0 21px;left:0;top:20px}:host.material .select2-container--default .select2-container--open{left:0;bottom:1.6em}:host.material .select2-container--default .select2-selection__placeholder__option{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}:host.material .select2-container--default .select2-selection__arrow{top:20px}:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default.select2-container--open .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after{transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%;left:0%}:host.material .select2-container--default .select2-dropdown{border-radius:0;border:0;box-shadow:0 5px 5px #00000080}:host.material .select2-container--default .select2-results__option[aria-selected=true],:host.material .select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-material-option-selected-background, rgba(0, 0, 0, .04));color:var(--select2-material-option-highlighted-text-color, #000)}:host.material .select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-material-option-selected-text-color, #ff5722)}:host.material .select2-container--default.select2-container--disabled .select2-selection--single,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before{background:var(--select2-material-underline-disabled, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-size:4px 1px;background-repeat:repeat-x;background-position:0 bottom}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:after{background:var(--select2-material-underline-invalid, red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--single,:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:0}:host.material .select2-subscript-wrapper{position:absolute;top:calc(100% - 1.72917em);font-size:75%;color:var(--select2-hint-text-color, #888)}::ng-deep .select2-overlay-backdrop{background:var(--select2-overlay-backdrop, transparent)}::ng-deep .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-bottom:0;margin-top:28px}@supports (-moz-appearance: none){select2.material .select2-container--default .select2-selection--single,select2.material .select2-container--default .select2-selection--multiple{height:26px}}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i4.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: i5.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }] }); }
|
|
1067
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: Select2, selector: "select2", inputs: { data: "data", minCharForSearch: ["minCharForSearch", "minCharForSearch", numberAttribute], displaySearchStatus: "displaySearchStatus", placeholder: "placeholder", limitSelection: ["limitSelection", "limitSelection", numberAttribute], listPosition: "listPosition", multiple: ["multiple", "multiple", booleanAttribute], overlay: ["overlay", "overlay", booleanAttribute], styleMode: "styleMode", noResultMessage: "noResultMessage", maxResults: ["maxResults", "maxResults", numberAttribute], maxResultsMessage: "maxResultsMessage", infiniteScrollDistance: ["infiniteScrollDistance", "infiniteScrollDistance", numberAttribute], infiniteScrollThrottle: ["infiniteScrollThrottle", "infiniteScrollThrottle", numberAttribute], infiniteScroll: ["infiniteScroll", "infiniteScroll", booleanAttribute], autoCreate: ["autoCreate", "autoCreate", booleanAttribute], noLabelTemplate: ["noLabelTemplate", "noLabelTemplate", booleanAttribute], editPattern: "editPattern", templates: "templates", resultMaxHeight: "resultMaxHeight", customSearchEnabled: ["customSearchEnabled", "customSearchEnabled", booleanAttribute], minCountForSearch: ["minCountForSearch", "minCountForSearch", numberAttribute], id: "id", required: ["required", "required", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], hideSelectedItems: ["hideSelectedItems", "hideSelectedItems", booleanAttribute], readonly: ["readonly", "readonly", booleanAttribute], value: "value", tabIndex: ["tabIndex", "tabIndex", numberAttribute], resettable: ["resettable", "resettable", booleanAttribute], resetSelectedValue: "resetSelectedValue" }, outputs: { update: "update", open: "open", close: "close", focus: "focus", blur: "blur", search: "search", scroll: "scroll", removeOption: "removeOption" }, host: { listeners: { "document:click": "clickDetection($event)" }, properties: { "id": "this.id", "attr.aria-invalid": "this.ariaInvalid", "class.material": "this.classMaterial", "class.nostyle": "this.classNostyle", "class.select2-above": "this.select2above" } }, viewQueries: [{ propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true }, { propertyName: "selection", first: true, predicate: ["selection"], descendants: true, static: true }, { propertyName: "resultContainer", first: true, predicate: ["results"], descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }, { propertyName: "results", predicate: ["result"], descendants: true }], ngImport: i0, template: "<div class=\"select2-label\" (click)=\"toggleOpenAndClose()\">\n <ng-content select=\"select2-label\"></ng-content>\n <span *ngIf=\"required\" class=\"select2-required\"></span>\n</div>\n<div\n class=\"select2 select2-container select2-container--default\"\n [class.select2-container--focus]=\"focused\"\n [class.select2-container--below]=\"!select2above\"\n [class.select2-container--above]=\"select2above\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-container--disabled]=\"disabled\"\n>\n <div\n class=\"selection\"\n #selection\n #trigger=\"cdkOverlayOrigin\"\n [tabindex]=\"!this.isOpen ? tabIndex : '-1'\"\n (click)=\"toggleOpenAndClose()\"\n (focus)=\"focusin()\"\n (blur)=\"focusout()\"\n (keydown)=\"openKey($event)\"\n cdkOverlayOrigin\n [class.select2-focused]=\"focused\"\n >\n <div\n class=\"select2-selection\"\n [class.select2-selection--multiple]=\"multiple\"\n [class.select2-selection--single]=\"!multiple\"\n role=\"combobox\"\n >\n <span *ngIf=\"!multiple\" class=\"select2-selection__rendered\" [title]=\"select2Option?.label || ''\">\n <span *ngIf=\"!select2Option\"> </span>\n <ng-container *ngIf=\"select2Option\">\n <span\n *ngIf=\"!hasTemplate(select2Option, 'option') || noLabelTemplate; else template\"\n [innerHTML]=\"select2Option.label\"\n ></span>\n <ng-template #template>\n <ng-container *ngTemplateOutlet=\"getTemplate(select2Option, 'option'); context: select2Option\">\n </ng-container>\n </ng-template>\n </ng-container>\n <span [class.select2-selection__placeholder__option]=\"option\" class=\"select2-selection__placeholder\">{{\n placeholder\n }}</span>\n </span>\n <span\n (click)=\"reset($event)\"\n *ngIf=\"\n !multiple && resettable && resetSelectedValue !== value && select2Option && !(disabled || readonly)\n \"\n class=\"select2-selection__reset\"\n role=\"presentation\"\n >\u00D7</span\n >\n <span *ngIf=\"!multiple\" class=\"select2-selection__arrow\" role=\"presentation\"> </span>\n <ul *ngIf=\"multiple\" class=\"select2-selection__rendered\">\n <span\n *ngIf=\"!autoCreate\"\n [class.select2-selection__placeholder__option]=\"select2Options?.length > 0\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder }}</span\n >\n <li\n *ngFor=\"let op of option; trackBy: trackBy\"\n class=\"select2-selection__choice\"\n [title]=\"op.label\"\n tabindex=\"0\"\n (keydown.enter)=\"removeSelection($event, op)\"\n >\n <span\n *ngIf=\"!(disabled || readonly)\"\n (click)=\"removeSelection($event, op)\"\n class=\"select2-selection__choice__remove\"\n role=\"presentation\"\n >\u00D7</span\n >\n <span\n *ngIf=\"!hasTemplate(op, 'option') || noLabelTemplate; else templateMultiple\"\n [innerHTML]=\"op.label\"\n ></span>\n <ng-template #templateMultiple>\n <ng-container *ngTemplateOutlet=\"getTemplate(op, 'option'); context: op\"></ng-container>\n </ng-template>\n </li>\n <li\n *ngIf=\"autoCreate\"\n class=\"select2-selection__auto-create\"\n (focus)=\"stopEvent($event)\"\n (blur)=\"stopEvent($event)\"\n >\n <input\n [id]=\"id + '-create-field'\"\n (click)=\"toggleOpenAndClose(false, true); stopEvent($event)\"\n (keydown)=\"keyDown($event, true)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-create__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n />\n </li>\n </ul>\n </div>\n </div>\n <ng-container *ngIf=\"!overlay\">\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n </ng-container>\n\n <div class=\"select2-subscript-wrapper\">\n <ng-content select=\"select2-hint\"></ng-content>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"select2-overlay-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"this.isOpen && overlay\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHeight]=\"overlayHeight\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"toggleOpenAndClose()\"\n>\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #containerTemplate>\n <div\n class=\"select2-container select2-container--default select2-container-dropdown\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-overlay]=\"overlay\"\n [class.select2-position-auto]=\"listPosition === 'auto'\"\n >\n <div\n #dropdown\n class=\"select2-dropdown\"\n [class.select2-dropdown--below]=\"!select2above\"\n [class.select2-dropdown--above]=\"select2above\"\n >\n <div class=\"select2-search select2-search--dropdown\" [class.select2-search--hide]=\"hideSearch()\">\n <input\n #searchInput\n [id]=\"id + '-search-field'\"\n [value]=\"searchText\"\n (keydown)=\"keyDown($event)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-search__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [attr.tabindex]=\"this.isOpen ? tabIndex : '-1'\"\n />\n </div>\n <div class=\"select2-results\">\n <ul\n #results\n class=\"select2-results__options\"\n [style.max-height]=\"resultMaxHeight\"\n role=\"tree\"\n tabindex=\"-1\"\n infiniteScroll\n [infiniteScrollDisabled]=\"!infiniteScroll && !isOpen\"\n [infiniteScrollDistance]=\"infiniteScrollDistance\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle\"\n [infiniteScrollContainer]=\"results\"\n (scrolled)=\"onScroll('down')\"\n (scrolledUp)=\"onScroll('up')\"\n (keydown)=\"keyDown($event)\"\n >\n <ng-container *ngFor=\"let groupOrOption of filteredData; index as i; trackBy: trackBy\">\n <li *ngIf=\"groupOrOption.options\" class=\"select2-results__option\" role=\"group\">\n <strong\n *ngIf=\"!hasTemplate(groupOrOption, 'group'); else optGroup\"\n [attr.class]=\"\n 'select2-results__group' +\n (groupOrOption.classes ? ' ' + groupOrOption.classes : '')\n \"\n [innerHTML]=\"groupOrOption.label\"\n ></strong>\n <ng-template #optGroup>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'group'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n\n <ul class=\"select2-results__options select2-results__options--nested\">\n <li\n *ngFor=\"let option of groupOrOption.options; index as j; trackBy: trackBy\"\n #result\n [id]=\"option.id || id + '-option-' + i + '-' + j\"\n [class]=\"getOptionStyle(option)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n <div\n *ngIf=\"!hasTemplate(option, 'option'); else liGroup\"\n class=\"select2-label-content\"\n [innerHTML]=\"option.label\"\n ></div>\n <ng-template #liGroup>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"\n >\n </ng-container>\n </ng-template>\n </li>\n </ul>\n </li>\n <li\n *ngIf=\"!groupOrOption.options\"\n #result\n [id]=\"groupOrOption.id || id + '-option-' + i\"\n [class]=\"getOptionStyle(groupOrOption)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(groupOrOption)\"\n [attr.aria-disabled]=\"isDisabled(groupOrOption)\"\n (mouseenter)=\"mouseenter(groupOrOption)\"\n (click)=\"click(groupOrOption)\"\n >\n <div\n *ngIf=\"!hasTemplate(groupOrOption, 'option'); else li\"\n [innerHTML]=\"groupOrOption.label\"\n class=\"select2-label-content\"\n ></div>\n <ng-template #li>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'option'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n </li>\n </ng-container>\n <li\n class=\"select2-no-result select2-results__option\"\n *ngIf=\"!filteredData?.length && noResultMessage\"\n [innerHTML]=\"noResultMessage\"\n ></li>\n <li\n class=\"select2-too-much-result select2-results__option\"\n *ngIf=\"maxResultsExceeded\"\n [innerHTML]=\"maxResultsMessage\"\n ></li>\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [".select2-label{color:var(--select2-label-text-color, #000)}.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;width:100%}.select2-container .select2-container-dropdown{position:absolute;width:0px;opacity:0}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:var(--select2-single-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding:var(--select2-selection-padding, 0 0 0 8px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:var(--select2-multiple-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-flex;overflow:hidden;padding-left:8px;padding-bottom:2px;text-overflow:ellipsis;white-space:nowrap;flex-wrap:wrap;gap:var(--select2-selection-multiple-gap, 2px 5px)}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-selection__auto-create{flex:1 1 150px;min-width:150px;display:flex}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field{width:100%;border:0}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field:focus{border:0;outline:0}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background:var(--select2-dropdown-background, white);border:1px solid var(--select2-dropdown-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);box-sizing:border-box;display:block;position:absolute;width:100%;z-index:1051;height:0;overflow:hidden}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:var(--select2-option-padding, 6px);-webkit-user-select:none;user-select:none;color:var(--select2-option-text-color, #000)}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{width:100%;opacity:1}.select2-container--open .select2-dropdown{overflow:auto;height:auto}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;bottom:27px;display:flex;flex-direction:column-reverse}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99}.select2-required:before{content:\"*\";color:var(--select2-required-color, red)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2-container--default .select2-selection--single{background:var(--select2-selection-background, #fff);border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);display:flex}.select2-container--default .select2-selection--single .select2-selection__rendered{color:var(--select2-selection-text-color, #111);line-height:var(--select2-selection-line-height, 28px)}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:var(--select2-placeholder-color, #999)}.select2-container--default .select2-selection--single .select2-selection__placeholder span{overflow:hidden;white-space:nowrap;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__reset,.select2-container--default .select2-selection--single .select2-selection__arrow{display:flex;width:20px;align-items:center;justify-content:center}.select2-container--default .select2-selection--single .select2-selection__arrow:before{content:\" \";border-color:var(--select2-arrow-color, #888) transparent;border-style:solid;border-width:5px 4px 0;height:0;width:0}.select2-container--default .select2-selection--single .select2-selection__reset{color:var(--select2-reset-color, #999)}.select2-container--default.select2-container--disabled .select2-selection--single{background:var(--select2-selection-disabled-background, #eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:before{border-color:transparent transparent var(--select2-arrow-color, #888);border-width:0 4px 5px}.select2-container--default .select2-selection--multiple{background:var(--select2-selection-background, #fff);border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);cursor:text;display:flex}.select2-container--default .select2-selection--multiple .select2-selection__rendered{flex:1 1 auto;box-sizing:border-box;list-style:none;margin:0;padding:var(--select2-selection-multiple-padding, 2px 5px);width:100%;min-height:1em;align-items:center}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none;line-height:var(--select2-selection-choice-line-height, 20px)}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;width:100%;color:var(--select2-placeholder-color, #999);margin-top:5px;float:left;overflow:hidden;white-space:nowrap;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--multiple .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{color:var(--select2-selection-choice-text-color, #000);background:var(--select2-selection-choice-background, #e4e4e4);border:1px solid var(--select2-selection-choice-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);cursor:default;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:var(--select2-selection-choice-close-color, #999);cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:var(--select2-selection-choice-hover-close-color, #333)}.select2-container--default.select2-container--focused .select2-selection--multiple{border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default.select2-container--disabled .select2-selection--multiple{background:var(--select2-selection-disabled-background, #eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid var(--select2-search-border-color, #aaa);background:1px solid var(--select2-search-background, #fff);border-radius:var(--select2-search-border-radius, 0px)}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:none;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:var(--select2-option-disabled-text-color, #999);background:var(--select2-option-disabled-background, transparent)}.select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-option-selected-text-color, #000);background:var(--select2-option-selected-background, #ddd)}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-option-highlighted-background, #5897fb);color:var(--select2-option-highlighted-text-color, #fff)}.select2-container--default .select2-results__option--hide{display:none}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px;color:var(--select2-option-group-text-color, gray);background:var(--select2-option-group-background, transparent)}.select2-no-result{color:var(--select2-no-result-color, #888);font-style:var(--select2-no-result-font-style, italic)}.select2-too-much-result{color:var(--select2-too-much-result-color, #888);font-style:var(--select2-too-much-font-style, italic)}:host.nostyle .select2-dropdown{border-color:transparent}:host.nostyle .select2-selection--single,:host.nostyle .select2-selection--multiple{background:transparent;border-color:transparent}:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{background:transparent;border-color:transparent}:host.material{display:inline-block;width:300px}:host.material>.select2-container{padding-bottom:1.29688em;vertical-align:inherit}:host.material>.select2-container .selection{padding:.4375em 0;border-top:.84375em solid transparent;display:inline-flex;align-items:baseline;width:100%;height:auto}:host.material .select2-container--default .select2-selection--single,:host.material .select2-container--default .select2-selection--multiple{width:100%;border:0;border-radius:0;height:24px;box-sizing:border-box}:host.material .select2-container--default .select2-selection--single:before,:host.material .select2-container--default .select2-selection--multiple:before{content:\" \";display:block;position:absolute;bottom:1.65em;background:var(--select2-material-underline, #ddd);height:1px;width:100%}:host.material .select2-container--default .select2-selection--single:after,:host.material .select2-container--default .select2-selection--multiple:after{content:\" \";display:block;position:absolute;bottom:1.63em;background:var(--select2-material-underline-active, #5a419e);height:2px;width:0%;left:50%;transition:none}:host.material .select2-container--default .select2-selection--single .select2-selection__rendered,:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding-left:1px;line-height:inherit}:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;color:var(--select2-material-placeholder-color, rgba(0, 0, 0, .38));transition:transform .3s;position:absolute;transform-origin:0 21px;left:0;top:20px}:host.material .select2-container--default .select2-container--open{left:0;bottom:1.6em}:host.material .select2-container--default .select2-selection__placeholder__option{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}:host.material .select2-container--default .select2-selection__arrow{top:20px}:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default.select2-container--open .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after{transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%;left:0%}:host.material .select2-container--default .select2-dropdown{border-radius:0;border:0;box-shadow:0 5px 5px #00000080}:host.material .select2-container--default .select2-results__option[aria-selected=true],:host.material .select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-material-option-selected-background, rgba(0, 0, 0, .04));color:var(--select2-material-option-highlighted-text-color, #000)}:host.material .select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-material-option-selected-text-color, #ff5722)}:host.material .select2-container--default.select2-container--disabled .select2-selection--single,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before{background:var(--select2-material-underline-disabled, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-size:4px 1px;background-repeat:repeat-x;background-position:0 bottom}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:after{background:var(--select2-material-underline-invalid, red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--single,:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:0}:host.material .select2-subscript-wrapper{position:absolute;top:calc(100% - 1.72917em);font-size:75%;color:var(--select2-hint-text-color, #888)}::ng-deep .select2-overlay-backdrop{background:var(--select2-overlay-backdrop, transparent)}::ng-deep .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-bottom:0;margin-top:28px}@supports (-moz-appearance: none){select2.material .select2-container--default .select2-selection--single,select2.material .select2-container--default .select2-selection--multiple{height:26px}}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i4.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: i5.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }] }); }
|
|
1073
1068
|
}
|
|
1074
1069
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: Select2, decorators: [{
|
|
1075
1070
|
type: Component,
|
|
@@ -1101,7 +1096,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
1101
1096
|
}], listPosition: [{
|
|
1102
1097
|
type: Input
|
|
1103
1098
|
}], multiple: [{
|
|
1104
|
-
type: Input
|
|
1099
|
+
type: Input,
|
|
1100
|
+
args: [{ transform: booleanAttribute }]
|
|
1105
1101
|
}], overlay: [{
|
|
1106
1102
|
type: Input,
|
|
1107
1103
|
args: [{ transform: booleanAttribute }]
|