@coreui/angular-pro 4.2.18 → 4.2.20
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.
- package/esm2020/lib/date-range-picker/date-range-picker/date-range-picker.component.mjs +1 -1
- package/esm2020/lib/multi-select/multi-select/multi-select.component.mjs +26 -23
- package/esm2020/lib/multi-select/multi-select-option/multi-select-option.component.mjs +3 -3
- package/esm2020/lib/multi-select/multi-select.module.mjs +1 -1
- package/fesm2015/coreui-angular-pro.mjs +27 -25
- package/fesm2015/coreui-angular-pro.mjs.map +1 -1
- package/fesm2020/coreui-angular-pro.mjs +27 -24
- package/fesm2020/coreui-angular-pro.mjs.map +1 -1
- package/lib/multi-select/multi-select/multi-select.component.d.ts +1 -1
- package/package.json +3 -3
|
@@ -8349,9 +8349,9 @@ class MultiSelectOptionComponent {
|
|
|
8349
8349
|
getLabel() {
|
|
8350
8350
|
return (this.label ?? this.value);
|
|
8351
8351
|
}
|
|
8352
|
-
focus(origin) {
|
|
8352
|
+
focus(origin = 'program') {
|
|
8353
8353
|
if (this.dropdownVisible) {
|
|
8354
|
-
this.focusMonitor.focusVia(this.elementRef, origin
|
|
8354
|
+
this.focusMonitor.focusVia(this.elementRef, origin, { preventScroll: false });
|
|
8355
8355
|
this.changeDetectorRef.markForCheck();
|
|
8356
8356
|
}
|
|
8357
8357
|
}
|
|
@@ -8709,20 +8709,20 @@ class MultiSelectComponent {
|
|
|
8709
8709
|
if ($event.key === 'Escape') {
|
|
8710
8710
|
this.visible = false;
|
|
8711
8711
|
this.searchValue = '';
|
|
8712
|
-
this.setFocus();
|
|
8712
|
+
this.setFocus('keyboard', 'onKeyUp');
|
|
8713
8713
|
return;
|
|
8714
8714
|
}
|
|
8715
8715
|
if (['Enter', ' ', 'ArrowDown'].includes($event.key) && [this.inputElement?.nativeElement, this.elementRef.nativeElement].includes($event.target)) {
|
|
8716
8716
|
this.visible = true;
|
|
8717
8717
|
if (!this.search) {
|
|
8718
|
-
this.setFocus();
|
|
8718
|
+
this.setFocus('keyboard', 'onKeyUp');
|
|
8719
8719
|
}
|
|
8720
8720
|
return;
|
|
8721
8721
|
}
|
|
8722
8722
|
if ($event.key === 'Tab' && $event.target === this.elementRef.nativeElement) {
|
|
8723
8723
|
this.visible = true;
|
|
8724
8724
|
if (!this.search) {
|
|
8725
|
-
this.setFocus();
|
|
8725
|
+
this.setFocus('keyboard', 'onKeyUp');
|
|
8726
8726
|
}
|
|
8727
8727
|
return;
|
|
8728
8728
|
}
|
|
@@ -8740,11 +8740,11 @@ class MultiSelectComponent {
|
|
|
8740
8740
|
return;
|
|
8741
8741
|
if (!this.visible) {
|
|
8742
8742
|
this.visible = true;
|
|
8743
|
-
this.setFocus();
|
|
8743
|
+
this.setFocus('mouse', 'onClick');
|
|
8744
8744
|
}
|
|
8745
8745
|
else if ([this.dropdown.nativeElement].includes($event.target)) {
|
|
8746
8746
|
this.visible = false;
|
|
8747
|
-
this.setFocus();
|
|
8747
|
+
this.setFocus('mouse', 'onClick');
|
|
8748
8748
|
}
|
|
8749
8749
|
}
|
|
8750
8750
|
set searchValue(value) {
|
|
@@ -8779,13 +8779,12 @@ class MultiSelectComponent {
|
|
|
8779
8779
|
}
|
|
8780
8780
|
ngOnChanges(changes) {
|
|
8781
8781
|
if (changes['value']) {
|
|
8782
|
-
|
|
8782
|
+
const valueChanges = changes['value'];
|
|
8783
|
+
if (valueChanges.currentValue.length === 0) {
|
|
8783
8784
|
this.clearAllOptions();
|
|
8784
8785
|
}
|
|
8785
8786
|
else {
|
|
8786
|
-
this.
|
|
8787
|
-
this.selectOption(option, changes['value'].currentValue.includes(option.value));
|
|
8788
|
-
});
|
|
8787
|
+
this.selectOptions();
|
|
8789
8788
|
}
|
|
8790
8789
|
this.selectedOptionsUpdate();
|
|
8791
8790
|
}
|
|
@@ -8809,6 +8808,7 @@ class MultiSelectComponent {
|
|
|
8809
8808
|
multiselectSubscribe(subscribe = true) {
|
|
8810
8809
|
if (subscribe) {
|
|
8811
8810
|
this.multiSelectOptionsSubscription = this.multiSelectOptions.changes.subscribe(change => {
|
|
8811
|
+
// console.log('multiSelectOptions change', change)
|
|
8812
8812
|
this.selectOptions();
|
|
8813
8813
|
});
|
|
8814
8814
|
this.multiselectVisibleSubscription = this.multiSelectService.multiSelectVisible$.subscribe((visible) => {
|
|
@@ -8826,7 +8826,7 @@ class MultiSelectComponent {
|
|
|
8826
8826
|
// close dropdown for single select (!multiple)
|
|
8827
8827
|
this.visible = false;
|
|
8828
8828
|
this.searchValue = '';
|
|
8829
|
-
this.setFocus();
|
|
8829
|
+
this.setFocus('program', 'multiselectSubscribe');
|
|
8830
8830
|
}
|
|
8831
8831
|
// todo?
|
|
8832
8832
|
// if (!!option) {
|
|
@@ -8843,7 +8843,7 @@ class MultiSelectComponent {
|
|
|
8843
8843
|
selectOptions() {
|
|
8844
8844
|
this.multiSelectOptions?.forEach((option, index) => {
|
|
8845
8845
|
option.optionsStyle = this.optionsStyle;
|
|
8846
|
-
option.selected = option.value !== undefined ? this.value.includes(option.value)
|
|
8846
|
+
option.selected = option.value !== undefined ? this.value.includes(option.value) : !!option.selected;
|
|
8847
8847
|
});
|
|
8848
8848
|
}
|
|
8849
8849
|
clearAllOptions($event) {
|
|
@@ -8852,7 +8852,10 @@ class MultiSelectComponent {
|
|
|
8852
8852
|
option.selected = false;
|
|
8853
8853
|
});
|
|
8854
8854
|
this.selectedOptionsUpdate();
|
|
8855
|
-
|
|
8855
|
+
if ($event) {
|
|
8856
|
+
this.searchValue = '';
|
|
8857
|
+
this.setFocus('program', 'clearAllOptions');
|
|
8858
|
+
}
|
|
8856
8859
|
}
|
|
8857
8860
|
selectAllOptions() {
|
|
8858
8861
|
this.multiSelectOptions.forEach((option, index) => {
|
|
@@ -8862,12 +8865,15 @@ class MultiSelectComponent {
|
|
|
8862
8865
|
this.selectedOptionsUpdate();
|
|
8863
8866
|
}
|
|
8864
8867
|
handleTagRemove($event) {
|
|
8865
|
-
this.setFocus();
|
|
8868
|
+
this.setFocus('program', 'handleTagRemove');
|
|
8866
8869
|
}
|
|
8867
|
-
setFocus() {
|
|
8870
|
+
setFocus(origin = 'program', methodName) {
|
|
8868
8871
|
if (this.disabled)
|
|
8869
8872
|
return;
|
|
8870
|
-
this.
|
|
8873
|
+
const element = this.inputElement ?? this.elementRef;
|
|
8874
|
+
const preventScroll = origin === 'program';
|
|
8875
|
+
this.focusMonitor?.focusVia(element, origin, { preventScroll: preventScroll });
|
|
8876
|
+
// console.log('setFocus', origin, methodName, 'preventScroll:', preventScroll );
|
|
8871
8877
|
}
|
|
8872
8878
|
filterOptions(value) {
|
|
8873
8879
|
const searchString = value.toLowerCase() ?? '';
|
|
@@ -8920,11 +8926,7 @@ class MultiSelectComponent {
|
|
|
8920
8926
|
}
|
|
8921
8927
|
}
|
|
8922
8928
|
selectOption(option, selected) {
|
|
8923
|
-
|
|
8924
|
-
if (item === option) {
|
|
8925
|
-
option.selected = selected;
|
|
8926
|
-
}
|
|
8927
|
-
});
|
|
8929
|
+
option.selected = selected;
|
|
8928
8930
|
this.selectedOptionsUpdate();
|
|
8929
8931
|
}
|
|
8930
8932
|
selectedOptionsUpdate() {
|
|
@@ -8938,6 +8940,7 @@ class MultiSelectComponent {
|
|
|
8938
8940
|
setFocusMonitor(monitor) {
|
|
8939
8941
|
if (monitor && !this.disabled) {
|
|
8940
8942
|
this.focusMonitorSubscription = this.focusMonitor?.monitor(this.elementRef, true).subscribe((origin) => {
|
|
8943
|
+
// console.log('focusMonitorSubscription', this.elementRef, origin);
|
|
8941
8944
|
this.ngZone.run(() => {
|
|
8942
8945
|
this.subtreeFocused = this.focusOrigin(origin);
|
|
8943
8946
|
this.changeDetectorRef?.markForCheck();
|
|
@@ -8956,7 +8959,7 @@ MultiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
|
|
|
8956
8959
|
{
|
|
8957
8960
|
provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MultiSelectComponent), multi: true
|
|
8958
8961
|
}
|
|
8959
|
-
], queries: [{ propertyName: "multiSelectOptions", predicate: MultiSelectOptionComponent, descendants: true }], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "dropdownMenu", first: true, predicate: ["dropdownMenu"], descendants: true }, { propertyName: "dropdownToggle", first: true, predicate: DropdownToggleDirective, descendants: true }, { propertyName: "dropdown", first: true, predicate: DropdownComponent, descendants: true, read: ElementRef }], exportAs: ["cMultiSelect"], usesOnChanges: true, ngImport: i0, template: "<c-dropdown #dropdown=\"cDropdown\" [autoClose]=\"'outside'\" class=\"picker\" [ngClass]=\"multiselectClasses\"\n [(visible)]=\"visible\" [popperOptions]=\"popperjsOptions\">\n <div [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle #dropdownToggle=\"cDropdownToggle\">\n <div class=\"form-multi-select-selection\">\n <ng-template [ngIf]=\"selectionType === 'tags'\">\n <c-multi-select-tag *ngFor=\"let option of selectedOptions; index as i\"\n (remove)=\"handleTagRemove($event)\"\n [option]=\"option\"\n tabindex=\"-1\">\n </c-multi-select-tag>\n </ng-template>\n <ng-template [ngIf]=\"selectionType === 'text' && !!selectedOptionsText\">\n <span class=\"form-multi-select-search\">{{ selectedOptionsText }}</span>\n </ng-template>\n <ng-template [ngIf]=\"selectionType === 'counter'\">\n <span *ngIf=\"counterTextType === 'string'; else pluralMap\">{{ counterText }}</span>\n <ng-template #pluralMap>\n <span>{{selectedOptions.length}} {{ selectedOptions.length | i18nPlural: selectionTypeCounterTextPluralMap ?? { other: counterText } }}</span>\n </ng-template>\n </ng-template>\n <!-- <ng-template [ngIf]=\"!search && selectedOptions.length === 0 && selectionType !== 'counter'\">-->\n <!-- <span class=\"form-multi-select-search\">{{ placeholder }}</span>-->\n <!-- </ng-template>-->\n </div>\n\n <input\n #inputElement\n (keydown)=\"handleSearchKeyDown($event)\"\n [(ngModel)]=\"searchValue\"\n [disabled]=\"disabled || !search\"\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search) }\"\n [attr.placeholder]=\"selectedOptions.length === 0 && selectionType !== 'counter' ? placeholder : null\"\n autocomplete=\"off\"\n tabindex=\"{{ disabled ? '-1' : '0' }}\"\n type=\"text\"\n >\n\n <button\n (click)=\"clearAllOptions($event)\"\n *ngIf=\"cleaner && selectedOptions.length > 0 && !disabled\"\n [disabled]=\"disabled || !isDropdownVisible\"\n aria-label=\"Clear all\"\n class=\"form-multi-select-selection-cleaner\"\n ></button>\n </div>\n\n <div *ngIf=\"!disabled\" class=\"\" cDropdownMenu #dropdownMenu=\"cDropdownMenu\" [visible]=\"dropdown.visible\">\n <ng-template [ngIfElse]=\"optionsEmpty\" [ngIf]=\"visibleOptions > 0\">\n <button (click)=\"selectAllOptions()\" *ngIf=\"selectAll && multiple\" class=\"form-multi-select-all\">\n {{ selectAllLabel }}\n </button>\n <div #multiselectOptionsDiv\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflow: 'scroll' } : {}\"\n class=\"form-multi-select-options\"\n >\n <ng-content></ng-content>\n </div>\n </ng-template>\n <ng-template #optionsEmpty>\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\n </ng-template>\n </div>\n</c-dropdown>\n", styles: [":host{display:block}:host:focus-visible{outline:none}:host.cdk-focused:not(.disabled) .form-multi-select{color:var(--cui-form-multi-select-focus-color, rgba(44, 56, 74, .95));background-color:var(--cui-form-multi-select-focus-bg, #fff);border-color:var(--cui-form-multi-select-focus-border-color, #6557e4);box-shadow:0 0 0 .25rem #321fdb40}:host:not(.cdk-focused) .form-multi-select:not(.show) input.form-multi-select-search:not([placeholder]){width:.1rem;margin-inline-start:0}:host .form-multi-select-search[size]{display:inline}:host .form-multi-select-selection-tags .form-multi-select-search{height:1.5rem}:host-context(.dark-theme)::ng-deep .form-multi-select-optgroup-label{color:var(--cui-form-multi-select-disabled-color)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DropdownComponent, selector: "c-dropdown", inputs: ["alignment", "autoClose", "dark", "direction", "placement", "popper", "popperOptions", "variant", "visible"], outputs: ["visibleChange"], exportAs: ["cDropdown"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[cDropdownToggle]", inputs: ["dropdownComponent", "disabled", "caret", "split"], exportAs: ["cDropdownToggle"] }, { kind: "directive", type: DropdownMenuDirective, selector: "[cDropdownMenu]", inputs: ["alignment", "visible", "dark"], exportAs: ["cDropdownMenu"] }, { kind: "component", type: MultiSelectTagComponent, selector: "c-multi-select-tag", inputs: ["option"], outputs: ["remove"] }, { kind: "pipe", type: i1$1.I18nPluralPipe, name: "i18nPlural" }] });
|
|
8962
|
+
], queries: [{ propertyName: "multiSelectOptions", predicate: MultiSelectOptionComponent, descendants: true }], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "dropdownMenu", first: true, predicate: ["dropdownMenu"], descendants: true }, { propertyName: "dropdownToggle", first: true, predicate: DropdownToggleDirective, descendants: true }, { propertyName: "dropdown", first: true, predicate: DropdownComponent, descendants: true, read: ElementRef }], exportAs: ["cMultiSelect"], usesOnChanges: true, ngImport: i0, template: "<c-dropdown #dropdown=\"cDropdown\" [autoClose]=\"'outside'\" class=\"picker\" [ngClass]=\"multiselectClasses\"\r\n [(visible)]=\"visible\" [popperOptions]=\"popperjsOptions\">\r\n <div [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle #dropdownToggle=\"cDropdownToggle\">\r\n <div class=\"form-multi-select-selection\">\r\n <ng-template [ngIf]=\"selectionType === 'tags'\">\r\n <c-multi-select-tag *ngFor=\"let option of selectedOptions; index as i\"\r\n (remove)=\"handleTagRemove($event)\"\r\n [option]=\"option\"\r\n tabindex=\"-1\">\r\n </c-multi-select-tag>\r\n </ng-template>\r\n <ng-template [ngIf]=\"selectionType === 'text' && !!selectedOptionsText\">\r\n <span class=\"form-multi-select-search\">{{ selectedOptionsText }}</span>\r\n </ng-template>\r\n <ng-template [ngIf]=\"selectionType === 'counter'\">\r\n <span *ngIf=\"counterTextType === 'string'; else pluralMap\">{{ counterText }}</span>\r\n <ng-template #pluralMap>\r\n <span>{{selectedOptions.length}} {{ selectedOptions.length | i18nPlural: selectionTypeCounterTextPluralMap ?? { other: counterText } }}</span>\r\n </ng-template>\r\n </ng-template>\r\n <!-- <ng-template [ngIf]=\"!search && selectedOptions.length === 0 && selectionType !== 'counter'\">-->\r\n <!-- <span class=\"form-multi-select-search\">{{ placeholder }}</span>-->\r\n <!-- </ng-template>-->\r\n </div>\r\n\r\n <input\r\n #inputElement\r\n (keydown)=\"handleSearchKeyDown($event)\"\r\n [(ngModel)]=\"searchValue\"\r\n [disabled]=\"disabled || !search\"\r\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search) }\"\r\n [attr.placeholder]=\"selectedOptions.length === 0 && selectionType !== 'counter' ? placeholder : null\"\r\n autocomplete=\"off\"\r\n tabindex=\"{{ disabled ? '-1' : '0' }}\"\r\n type=\"text\"\r\n >\r\n\r\n <button\r\n (click)=\"clearAllOptions($event)\"\r\n *ngIf=\"cleaner && selectedOptions.length > 0 && !disabled\"\r\n [disabled]=\"disabled || !isDropdownVisible\"\r\n aria-label=\"Clear all\"\r\n class=\"form-multi-select-selection-cleaner\"\r\n ></button>\r\n </div>\r\n\r\n <div *ngIf=\"!disabled\" class=\"\" cDropdownMenu #dropdownMenu=\"cDropdownMenu\" [visible]=\"dropdown.visible\">\r\n <ng-template [ngIfElse]=\"optionsEmpty\" [ngIf]=\"visibleOptions > 0\">\r\n <button (click)=\"selectAllOptions()\" *ngIf=\"selectAll && multiple\" class=\"form-multi-select-all\">\r\n {{ selectAllLabel }}\r\n </button>\r\n <div #multiselectOptionsDiv\r\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflow: 'scroll' } : {}\"\r\n class=\"form-multi-select-options\"\r\n >\r\n <ng-content></ng-content>\r\n </div>\r\n </ng-template>\r\n <ng-template #optionsEmpty>\r\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\r\n </ng-template>\r\n </div>\r\n</c-dropdown>\r\n", styles: [":host{display:block}:host:focus-visible{outline:none}:host.cdk-focused:not(.disabled) .form-multi-select{color:var(--cui-form-multi-select-focus-color, rgba(44, 56, 74, .95));background-color:var(--cui-form-multi-select-focus-bg, #fff);border-color:var(--cui-form-multi-select-focus-border-color, #6557e4);box-shadow:0 0 0 .25rem #321fdb40}:host:not(.cdk-focused) .form-multi-select:not(.show) input.form-multi-select-search:not([placeholder]){width:.1rem;margin-inline-start:0}:host .form-multi-select-search[size]{display:inline}:host .form-multi-select-selection-tags .form-multi-select-search{height:1.5rem}:host-context(.dark-theme)::ng-deep .form-multi-select-optgroup-label{color:var(--cui-form-multi-select-disabled-color)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DropdownComponent, selector: "c-dropdown", inputs: ["alignment", "autoClose", "dark", "direction", "placement", "popper", "popperOptions", "variant", "visible"], outputs: ["visibleChange"], exportAs: ["cDropdown"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[cDropdownToggle]", inputs: ["dropdownComponent", "disabled", "caret", "split"], exportAs: ["cDropdownToggle"] }, { kind: "directive", type: DropdownMenuDirective, selector: "[cDropdownMenu]", inputs: ["alignment", "visible", "dark"], exportAs: ["cDropdownMenu"] }, { kind: "component", type: MultiSelectTagComponent, selector: "c-multi-select-tag", inputs: ["option"], outputs: ["remove"] }, { kind: "pipe", type: i1$1.I18nPluralPipe, name: "i18nPlural" }] });
|
|
8960
8963
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MultiSelectComponent, decorators: [{
|
|
8961
8964
|
type: Component,
|
|
8962
8965
|
args: [{ selector: 'c-multi-select', exportAs: 'cMultiSelect', providers: [
|
|
@@ -8964,7 +8967,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
8964
8967
|
{
|
|
8965
8968
|
provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MultiSelectComponent), multi: true
|
|
8966
8969
|
}
|
|
8967
|
-
], template: "<c-dropdown #dropdown=\"cDropdown\" [autoClose]=\"'outside'\" class=\"picker\" [ngClass]=\"multiselectClasses\"\n [(visible)]=\"visible\" [popperOptions]=\"popperjsOptions\">\n <div [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle #dropdownToggle=\"cDropdownToggle\">\n <div class=\"form-multi-select-selection\">\n <ng-template [ngIf]=\"selectionType === 'tags'\">\n <c-multi-select-tag *ngFor=\"let option of selectedOptions; index as i\"\n (remove)=\"handleTagRemove($event)\"\n [option]=\"option\"\n tabindex=\"-1\">\n </c-multi-select-tag>\n </ng-template>\n <ng-template [ngIf]=\"selectionType === 'text' && !!selectedOptionsText\">\n <span class=\"form-multi-select-search\">{{ selectedOptionsText }}</span>\n </ng-template>\n <ng-template [ngIf]=\"selectionType === 'counter'\">\n <span *ngIf=\"counterTextType === 'string'; else pluralMap\">{{ counterText }}</span>\n <ng-template #pluralMap>\n <span>{{selectedOptions.length}} {{ selectedOptions.length | i18nPlural: selectionTypeCounterTextPluralMap ?? { other: counterText } }}</span>\n </ng-template>\n </ng-template>\n <!-- <ng-template [ngIf]=\"!search && selectedOptions.length === 0 && selectionType !== 'counter'\">-->\n <!-- <span class=\"form-multi-select-search\">{{ placeholder }}</span>-->\n <!-- </ng-template>-->\n </div>\n\n <input\n #inputElement\n (keydown)=\"handleSearchKeyDown($event)\"\n [(ngModel)]=\"searchValue\"\n [disabled]=\"disabled || !search\"\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search) }\"\n [attr.placeholder]=\"selectedOptions.length === 0 && selectionType !== 'counter' ? placeholder : null\"\n autocomplete=\"off\"\n tabindex=\"{{ disabled ? '-1' : '0' }}\"\n type=\"text\"\n >\n\n <button\n (click)=\"clearAllOptions($event)\"\n *ngIf=\"cleaner && selectedOptions.length > 0 && !disabled\"\n [disabled]=\"disabled || !isDropdownVisible\"\n aria-label=\"Clear all\"\n class=\"form-multi-select-selection-cleaner\"\n ></button>\n </div>\n\n <div *ngIf=\"!disabled\" class=\"\" cDropdownMenu #dropdownMenu=\"cDropdownMenu\" [visible]=\"dropdown.visible\">\n <ng-template [ngIfElse]=\"optionsEmpty\" [ngIf]=\"visibleOptions > 0\">\n <button (click)=\"selectAllOptions()\" *ngIf=\"selectAll && multiple\" class=\"form-multi-select-all\">\n {{ selectAllLabel }}\n </button>\n <div #multiselectOptionsDiv\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflow: 'scroll' } : {}\"\n class=\"form-multi-select-options\"\n >\n <ng-content></ng-content>\n </div>\n </ng-template>\n <ng-template #optionsEmpty>\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\n </ng-template>\n </div>\n</c-dropdown>\n", styles: [":host{display:block}:host:focus-visible{outline:none}:host.cdk-focused:not(.disabled) .form-multi-select{color:var(--cui-form-multi-select-focus-color, rgba(44, 56, 74, .95));background-color:var(--cui-form-multi-select-focus-bg, #fff);border-color:var(--cui-form-multi-select-focus-border-color, #6557e4);box-shadow:0 0 0 .25rem #321fdb40}:host:not(.cdk-focused) .form-multi-select:not(.show) input.form-multi-select-search:not([placeholder]){width:.1rem;margin-inline-start:0}:host .form-multi-select-search[size]{display:inline}:host .form-multi-select-selection-tags .form-multi-select-search{height:1.5rem}:host-context(.dark-theme)::ng-deep .form-multi-select-optgroup-label{color:var(--cui-form-multi-select-disabled-color)}\n"] }]
|
|
8970
|
+
], template: "<c-dropdown #dropdown=\"cDropdown\" [autoClose]=\"'outside'\" class=\"picker\" [ngClass]=\"multiselectClasses\"\r\n [(visible)]=\"visible\" [popperOptions]=\"popperjsOptions\">\r\n <div [caret]=\"false\" [disabled]=\"disabled\" cDropdownToggle #dropdownToggle=\"cDropdownToggle\">\r\n <div class=\"form-multi-select-selection\">\r\n <ng-template [ngIf]=\"selectionType === 'tags'\">\r\n <c-multi-select-tag *ngFor=\"let option of selectedOptions; index as i\"\r\n (remove)=\"handleTagRemove($event)\"\r\n [option]=\"option\"\r\n tabindex=\"-1\">\r\n </c-multi-select-tag>\r\n </ng-template>\r\n <ng-template [ngIf]=\"selectionType === 'text' && !!selectedOptionsText\">\r\n <span class=\"form-multi-select-search\">{{ selectedOptionsText }}</span>\r\n </ng-template>\r\n <ng-template [ngIf]=\"selectionType === 'counter'\">\r\n <span *ngIf=\"counterTextType === 'string'; else pluralMap\">{{ counterText }}</span>\r\n <ng-template #pluralMap>\r\n <span>{{selectedOptions.length}} {{ selectedOptions.length | i18nPlural: selectionTypeCounterTextPluralMap ?? { other: counterText } }}</span>\r\n </ng-template>\r\n </ng-template>\r\n <!-- <ng-template [ngIf]=\"!search && selectedOptions.length === 0 && selectionType !== 'counter'\">-->\r\n <!-- <span class=\"form-multi-select-search\">{{ placeholder }}</span>-->\r\n <!-- </ng-template>-->\r\n </div>\r\n\r\n <input\r\n #inputElement\r\n (keydown)=\"handleSearchKeyDown($event)\"\r\n [(ngModel)]=\"searchValue\"\r\n [disabled]=\"disabled || !search\"\r\n [ngClass]=\"{ 'form-multi-select-search': true, disabled: (disabled || !search) }\"\r\n [attr.placeholder]=\"selectedOptions.length === 0 && selectionType !== 'counter' ? placeholder : null\"\r\n autocomplete=\"off\"\r\n tabindex=\"{{ disabled ? '-1' : '0' }}\"\r\n type=\"text\"\r\n >\r\n\r\n <button\r\n (click)=\"clearAllOptions($event)\"\r\n *ngIf=\"cleaner && selectedOptions.length > 0 && !disabled\"\r\n [disabled]=\"disabled || !isDropdownVisible\"\r\n aria-label=\"Clear all\"\r\n class=\"form-multi-select-selection-cleaner\"\r\n ></button>\r\n </div>\r\n\r\n <div *ngIf=\"!disabled\" class=\"\" cDropdownMenu #dropdownMenu=\"cDropdownMenu\" [visible]=\"dropdown.visible\">\r\n <ng-template [ngIfElse]=\"optionsEmpty\" [ngIf]=\"visibleOptions > 0\">\r\n <button (click)=\"selectAllOptions()\" *ngIf=\"selectAll && multiple\" class=\"form-multi-select-all\">\r\n {{ selectAllLabel }}\r\n </button>\r\n <div #multiselectOptionsDiv\r\n [ngStyle]=\"optionsMaxHeight !== 'auto' ? { 'maxHeight.px': optionsMaxHeight, overflow: 'scroll' } : {}\"\r\n class=\"form-multi-select-options\"\r\n >\r\n <ng-content></ng-content>\r\n </div>\r\n </ng-template>\r\n <ng-template #optionsEmpty>\r\n <div class=\"form-multi-select-options-empty\">{{ searchNoResultsLabel }}</div>\r\n </ng-template>\r\n </div>\r\n</c-dropdown>\r\n", styles: [":host{display:block}:host:focus-visible{outline:none}:host.cdk-focused:not(.disabled) .form-multi-select{color:var(--cui-form-multi-select-focus-color, rgba(44, 56, 74, .95));background-color:var(--cui-form-multi-select-focus-bg, #fff);border-color:var(--cui-form-multi-select-focus-border-color, #6557e4);box-shadow:0 0 0 .25rem #321fdb40}:host:not(.cdk-focused) .form-multi-select:not(.show) input.form-multi-select-search:not([placeholder]){width:.1rem;margin-inline-start:0}:host .form-multi-select-search[size]{display:inline}:host .form-multi-select-selection-tags .form-multi-select-search{height:1.5rem}:host-context(.dark-theme)::ng-deep .form-multi-select-optgroup-label{color:var(--cui-form-multi-select-disabled-color)}\n"] }]
|
|
8968
8971
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }, { type: i1$3.FocusMonitor }, { type: MultiSelectService }, { type: i0.IterableDiffers }]; }, propDecorators: { cleaner: [{
|
|
8969
8972
|
type: Input
|
|
8970
8973
|
}], disabled: [{
|