@agorapulse/ui-components 16.2.22 → 16.3.0
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/agorapulse-ui-components-16.3.0.tgz +0 -0
- package/autocomplete/autocomplete.component.d.ts +3 -3
- package/esm2022/autocomplete/autocomplete.component.mjs +21 -8
- package/esm2022/datepicker/datepicker.component.mjs +3 -3
- package/esm2022/form-field/agorapulse-ui-components-form-field.mjs +5 -0
- package/esm2022/form-field/form-field.component.mjs +11 -0
- package/esm2022/form-field/public_api.mjs +2 -0
- package/esm2022/form-message/agorapulse-ui-components-form-message.mjs +5 -0
- package/esm2022/form-message/form-message.component.mjs +34 -0
- package/esm2022/form-message/public_api.mjs +2 -0
- package/esm2022/index.mjs +4 -4
- package/esm2022/input/input.directive.mjs +19 -0
- package/esm2022/input/public_api.mjs +2 -2
- package/esm2022/input-group/agorapulse-ui-components-input-group.mjs +5 -0
- package/esm2022/input-group/input-group.component.mjs +14 -0
- package/esm2022/input-group/public_api.mjs +2 -0
- package/esm2022/labels/label.component.mjs +3 -3
- package/esm2022/legacy/input/agorapulse-ui-components-legacy-input.mjs +5 -0
- package/esm2022/{input → legacy/input}/input.component.mjs +4 -1
- package/esm2022/legacy/input/public_api.mjs +2 -0
- package/esm2022/legacy/select/agorapulse-ui-components-legacy-select.mjs +5 -0
- package/esm2022/legacy/select/public_api.mjs +2 -0
- package/esm2022/{select → legacy/select}/select.component.mjs +5 -2
- package/esm2022/legacy/textarea/agorapulse-ui-components-legacy-textarea.mjs +5 -0
- package/esm2022/legacy/textarea/public_api.mjs +2 -0
- package/esm2022/{textarea → legacy/textarea}/textarea.component.mjs +4 -1
- package/esm2022/select/ap-select.module.mjs +72 -0
- package/esm2022/select/dropdown-group-item/dropdown-group-item.component.mjs +52 -0
- package/esm2022/select/dropdown-item-multiple-one-line/dropdown-item-multiple-one-line.component.mjs +61 -0
- package/esm2022/select/dropdown-item-multiple-two-lines/dropdown-item-multiple-two-lines.component.mjs +65 -0
- package/esm2022/select/dropdown-item-single-one-line/dropdown-item-single-one-line.component.mjs +39 -0
- package/esm2022/select/dropdown-item-single-two-lines/dropdown-item-single-two-lines.component.mjs +43 -0
- package/esm2022/select/dropdown-search-form/dropdown-search-form.component.mjs +77 -0
- package/esm2022/select/public_api.mjs +13 -2
- package/esm2022/select/select-base.directive.mjs +69 -0
- package/esm2022/select/select-label-multiple/select-label-multiple.component.mjs +111 -0
- package/esm2022/select/select-label-single/select-label-single.component.mjs +27 -0
- package/esm2022/select/select-multiple.directive.mjs +34 -0
- package/esm2022/select/select-single.directive.mjs +34 -0
- package/esm2022/textarea/public_api.mjs +2 -2
- package/esm2022/textarea/textarea.directive.mjs +40 -0
- package/fesm2022/agorapulse-ui-components-autocomplete.mjs +20 -7
- package/fesm2022/agorapulse-ui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-datepicker.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-datepicker.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-form-field.mjs +18 -0
- package/fesm2022/agorapulse-ui-components-form-field.mjs.map +1 -0
- package/fesm2022/agorapulse-ui-components-form-message.mjs +41 -0
- package/fesm2022/agorapulse-ui-components-form-message.mjs.map +1 -0
- package/fesm2022/agorapulse-ui-components-input-group.mjs +21 -0
- package/fesm2022/agorapulse-ui-components-input-group.mjs.map +1 -0
- package/fesm2022/agorapulse-ui-components-input.mjs +16 -184
- package/fesm2022/agorapulse-ui-components-input.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-labels.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-labels.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-legacy-input.mjs +197 -0
- package/fesm2022/agorapulse-ui-components-legacy-input.mjs.map +1 -0
- package/fesm2022/agorapulse-ui-components-legacy-select.mjs +460 -0
- package/fesm2022/agorapulse-ui-components-legacy-select.mjs.map +1 -0
- package/fesm2022/agorapulse-ui-components-legacy-textarea.mjs +162 -0
- package/fesm2022/agorapulse-ui-components-legacy-textarea.mjs.map +1 -0
- package/fesm2022/agorapulse-ui-components-select.mjs +562 -395
- package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-textarea.mjs +29 -141
- package/fesm2022/agorapulse-ui-components-textarea.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components.mjs +3 -3
- package/fesm2022/agorapulse-ui-components.mjs.map +1 -1
- package/form-field/form-field.component.d.ts +5 -0
- package/form-field/index.d.ts +5 -0
- package/form-field/public_api.d.ts +1 -0
- package/form-message/form-message.component.d.ts +12 -0
- package/form-message/index.d.ts +5 -0
- package/form-message/public_api.d.ts +1 -0
- package/index.d.ts +3 -3
- package/input/input.directive.d.ts +7 -0
- package/input/public_api.d.ts +1 -1
- package/input-group/index.d.ts +5 -0
- package/input-group/input-group.component.d.ts +6 -0
- package/input-group/public_api.d.ts +1 -0
- package/legacy/input/index.d.ts +5 -0
- package/{input → legacy/input}/input.component.d.ts +3 -0
- package/legacy/input/public_api.d.ts +1 -0
- package/legacy/select/index.d.ts +5 -0
- package/legacy/select/public_api.d.ts +1 -0
- package/{select → legacy/select}/select.component.d.ts +4 -1
- package/legacy/textarea/index.d.ts +5 -0
- package/legacy/textarea/public_api.d.ts +1 -0
- package/{textarea → legacy/textarea}/textarea.component.d.ts +3 -0
- package/package.json +37 -1
- package/select/ap-select.module.d.ts +16 -0
- package/select/dropdown-group-item/dropdown-group-item.component.d.ts +16 -0
- package/select/dropdown-item-multiple-one-line/dropdown-item-multiple-one-line.component.d.ts +20 -0
- package/select/dropdown-item-multiple-two-lines/dropdown-item-multiple-two-lines.component.d.ts +21 -0
- package/select/dropdown-item-single-one-line/dropdown-item-single-one-line.component.d.ts +12 -0
- package/select/dropdown-item-single-two-lines/dropdown-item-single-two-lines.component.d.ts +13 -0
- package/select/dropdown-search-form/dropdown-search-form.component.d.ts +22 -0
- package/select/public_api.d.ts +12 -1
- package/select/select-base.directive.d.ts +18 -0
- package/select/select-label-multiple/select-label-multiple.component.d.ts +29 -0
- package/select/select-label-single/select-label-single.component.d.ts +8 -0
- package/select/select-multiple.directive.d.ts +10 -0
- package/select/select-single.directive.d.ts +10 -0
- package/snackbars-thread/component/snackbars-thread.component.d.ts +1 -1
- package/textarea/public_api.d.ts +1 -1
- package/textarea/textarea.directive.d.ts +11 -0
- package/agorapulse-ui-components-16.2.22.tgz +0 -0
|
@@ -1,306 +1,377 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ViewEncapsulation, Input, EventEmitter, ChangeDetectionStrategy, Output, ViewChild, signal, TemplateRef, inject, ElementRef, EnvironmentInjector, computed, runInInjectionContext, effect, Renderer2, ViewContainerRef, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { BadgeComponent } from '@agorapulse/ui-components/badge';
|
|
4
4
|
import { CheckboxComponent } from '@agorapulse/ui-components/checkbox';
|
|
5
|
-
import {
|
|
5
|
+
import { TooltipDirective } from '@agorapulse/ui-components/tooltip';
|
|
6
|
+
import { NgIf, NgFor, NgSwitch, NgSwitchCase } from '@angular/common';
|
|
7
|
+
import { AvatarComponent } from '@agorapulse/ui-components/avatar';
|
|
8
|
+
import { SymbolComponent, SymbolRegistry, apCheck2, apAdd2022 } from '@agorapulse/ui-symbol';
|
|
9
|
+
import { LoaderComponent } from '@agorapulse/ui-animations';
|
|
10
|
+
import { InputDirective } from '@agorapulse/ui-components/input';
|
|
11
|
+
import { InputGroupComponent } from '@agorapulse/ui-components/input-group';
|
|
12
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
13
|
+
import * as i1 from '@angular/forms';
|
|
14
|
+
import { FormsModule } from '@angular/forms';
|
|
15
|
+
import { BehaviorSubject, filter } from 'rxjs';
|
|
6
16
|
import { LabelComponent } from '@agorapulse/ui-components/labels';
|
|
7
17
|
import { TagComponent } from '@agorapulse/ui-components/tag';
|
|
8
|
-
import {
|
|
9
|
-
import { NgIf, NgFor, NgTemplateOutlet, AsyncPipe, SlicePipe } from '@angular/common';
|
|
10
|
-
import * as i0 from '@angular/core';
|
|
11
|
-
import { forwardRef, inject, DestroyRef, ElementRef, signal, EventEmitter, computed, EnvironmentInjector, runInInjectionContext, effect, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, HostBinding, Input, Output } from '@angular/core';
|
|
12
|
-
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
13
|
-
import * as i1 from '@angular/forms';
|
|
14
|
-
import { NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
15
|
-
import * as i2 from '@ng-select/ng-select';
|
|
16
|
-
import { NgSelectModule } from '@ng-select/ng-select';
|
|
17
|
-
import { debounceTime, skip, tap, switchMap, fromEvent, of } from 'rxjs';
|
|
18
|
+
import { NgSelectComponent } from '@ng-select/ng-select';
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class SelectComponent {
|
|
25
|
-
symbolRegistry = inject(SymbolRegistry);
|
|
26
|
-
destroyRef = inject(DestroyRef);
|
|
27
|
-
elementRef = inject(ElementRef);
|
|
28
|
-
searchInput;
|
|
29
|
-
inlineLabelElement;
|
|
20
|
+
class DropdownGroupItemComponent {
|
|
21
|
+
groupLabel;
|
|
22
|
+
groupTag;
|
|
23
|
+
selectableGroup = false;
|
|
24
|
+
children = [];
|
|
30
25
|
select;
|
|
31
|
-
hovered = false;
|
|
32
|
-
optionsSignal = signal([]);
|
|
33
|
-
set options(options) {
|
|
34
|
-
this.optionsSignal.set(options);
|
|
35
|
-
this.filteredOptionsSignal.set(options);
|
|
36
|
-
}
|
|
37
|
-
ariaLabel;
|
|
38
|
-
ariaLabelledBy;
|
|
39
|
-
ariaDescribedBy;
|
|
40
|
-
appendTo = 'body';
|
|
41
|
-
clearable = false;
|
|
42
|
-
description;
|
|
43
26
|
disabled = false;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
this.
|
|
48
|
-
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
this.elementRef.nativeElement.style.setProperty('--placeholder-padding-left', `${this.inlineLabelElement.nativeElement.clientWidth}px`);
|
|
27
|
+
disabledTooltip;
|
|
28
|
+
isGroupIntermediate() {
|
|
29
|
+
const selectedChildren = this.children.filter((child) => child.selected && !child.disabled);
|
|
30
|
+
const selectableChildren = this.children.filter((child) => !child.disabled);
|
|
31
|
+
return selectedChildren.length > 0 && selectedChildren.length < selectableChildren.length;
|
|
52
32
|
}
|
|
53
|
-
|
|
54
|
-
return this.
|
|
33
|
+
isGroupChecked() {
|
|
34
|
+
return this.children.every((child) => child.selected || child.disabled);
|
|
55
35
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
group = false;
|
|
59
|
-
selectableGroup = true;
|
|
60
|
-
label = '';
|
|
61
|
-
multiple = false;
|
|
62
|
-
only = false;
|
|
63
|
-
onlyText = 'Only';
|
|
64
|
-
placeholder = 'Select...';
|
|
65
|
-
selectAll = false;
|
|
66
|
-
selectAllText = 'Select all';
|
|
67
|
-
unselectAllText = 'Unselect all';
|
|
68
|
-
searchable = false;
|
|
69
|
-
searchPlaceholder = 'Search...';
|
|
70
|
-
searchFn = this.defaultSearchFn;
|
|
71
|
-
notFoundText = 'No results found';
|
|
72
|
-
loadingText = 'Loading items';
|
|
73
|
-
set displayType(displayType) {
|
|
74
|
-
this.displayTypeSignal.set(displayType);
|
|
36
|
+
isGroupDisabled() {
|
|
37
|
+
return this.children.every((child) => child.disabled);
|
|
75
38
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
39
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DropdownGroupItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
40
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.10", type: DropdownGroupItemComponent, isStandalone: true, selector: "ap-dropdown-group-item", inputs: { groupLabel: "groupLabel", groupTag: "groupTag", selectableGroup: "selectableGroup", children: "children", select: "select", disabled: "disabled", disabledTooltip: "disabledTooltip" }, ngImport: i0, template: "<div\n class=\"group\"\n [apTooltip]=\"disabledTooltip\"\n [apTooltipDisabled]=\"!disabled\">\n <ap-checkbox\n *ngIf=\"selectableGroup; else groupLabelTpl\"\n [name]=\"'option-group-selection-' + groupLabel\"\n [disabled]=\"isGroupDisabled() || disabled\"\n [indeterminate]=\"isGroupIntermediate()\"\n [checked]=\"isGroupChecked()\">\n <span class=\"group-label\">\n {{ groupLabel }}\n </span>\n <ap-badge\n *ngIf=\"groupTag\"\n color=\"blue\">\n {{ groupTag }}\n </ap-badge>\n </ap-checkbox>\n <ng-template #groupLabelTpl>\n <span class=\"group-label\" [title]=\"groupLabel\">\n {{ groupLabel }}\n </span>\n <ap-badge\n *ngIf=\"groupTag\"\n color=\"blue\">\n {{ groupTag }}\n </ap-badge>\n </ng-template>\n</div>\n", styles: ["ap-dropdown-group-item{display:block;width:100%}\n"], dependencies: [{ kind: "component", type: BadgeComponent, selector: "ap-badge", inputs: ["color"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CheckboxComponent, selector: "ap-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "indeterminate", "checked", "required", "name"], outputs: ["change"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltipPosition", "apTooltip", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
41
|
+
}
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DropdownGroupItemComponent, decorators: [{
|
|
43
|
+
type: Component,
|
|
44
|
+
args: [{ selector: 'ap-dropdown-group-item', encapsulation: ViewEncapsulation.None, standalone: true, imports: [BadgeComponent, NgIf, CheckboxComponent, TooltipDirective], template: "<div\n class=\"group\"\n [apTooltip]=\"disabledTooltip\"\n [apTooltipDisabled]=\"!disabled\">\n <ap-checkbox\n *ngIf=\"selectableGroup; else groupLabelTpl\"\n [name]=\"'option-group-selection-' + groupLabel\"\n [disabled]=\"isGroupDisabled() || disabled\"\n [indeterminate]=\"isGroupIntermediate()\"\n [checked]=\"isGroupChecked()\">\n <span class=\"group-label\">\n {{ groupLabel }}\n </span>\n <ap-badge\n *ngIf=\"groupTag\"\n color=\"blue\">\n {{ groupTag }}\n </ap-badge>\n </ap-checkbox>\n <ng-template #groupLabelTpl>\n <span class=\"group-label\" [title]=\"groupLabel\">\n {{ groupLabel }}\n </span>\n <ap-badge\n *ngIf=\"groupTag\"\n color=\"blue\">\n {{ groupTag }}\n </ap-badge>\n </ng-template>\n</div>\n", styles: ["ap-dropdown-group-item{display:block;width:100%}\n"] }]
|
|
45
|
+
}], propDecorators: { groupLabel: [{
|
|
46
|
+
type: Input,
|
|
47
|
+
args: [{ required: true }]
|
|
48
|
+
}], groupTag: [{
|
|
49
|
+
type: Input
|
|
50
|
+
}], selectableGroup: [{
|
|
51
|
+
type: Input
|
|
52
|
+
}], children: [{
|
|
53
|
+
type: Input,
|
|
54
|
+
args: [{ required: true }]
|
|
55
|
+
}], select: [{
|
|
56
|
+
type: Input,
|
|
57
|
+
args: [{
|
|
58
|
+
required: true,
|
|
59
|
+
}]
|
|
60
|
+
}], disabled: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], disabledTooltip: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}] } });
|
|
65
|
+
|
|
66
|
+
class DropdownItemMultipleOneLineComponent {
|
|
67
|
+
text;
|
|
68
|
+
selected;
|
|
69
|
+
htmlId;
|
|
70
|
+
disabled = false;
|
|
71
|
+
avatarUrl;
|
|
72
|
+
disabledTooltip;
|
|
73
|
+
badgeText;
|
|
74
|
+
dividerEnabled = false;
|
|
75
|
+
onlyEnabled = false;
|
|
76
|
+
onlyText;
|
|
77
|
+
selectOnly = new EventEmitter();
|
|
78
|
+
checkbox;
|
|
79
|
+
onSelectOnly() {
|
|
80
|
+
this.selectOnly.emit();
|
|
81
|
+
this.checkbox.focus();
|
|
87
82
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
83
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DropdownItemMultipleOneLineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
84
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.10", type: DropdownItemMultipleOneLineComponent, isStandalone: true, selector: "ap-dropdown-item-multiple-one-line", inputs: { text: "text", selected: "selected", htmlId: "htmlId", disabled: "disabled", avatarUrl: "avatarUrl", disabledTooltip: "disabledTooltip", badgeText: "badgeText", dividerEnabled: "dividerEnabled", onlyEnabled: "onlyEnabled", onlyText: "onlyText" }, outputs: { selectOnly: "selectOnly" }, viewQueries: [{ propertyName: "checkbox", first: true, predicate: CheckboxComponent, descendants: true }], ngImport: i0, template: "<div\n class=\"disabled-opaque\"\n [apTooltip]=\"disabledTooltip\"\n [apTooltipDisabled]=\"!disabled\"></div>\n<div class=\"option multiple\">\n <ap-checkbox\n #checkbox\n [checked]=\"selected\"\n [disabled]=\"disabled\"\n [name]=\"'option-selection-' + htmlId\">\n <ap-avatar\n *ngIf=\"avatarUrl\"\n [size]=\"24\"\n [profilePicture]=\"avatarUrl\"\n [username]=\"text\"\n [showInitials]=\"true\" />\n <span\n class=\"option-item\"\n [title]=\"text\">\n {{ text }}\n </span>\n <ap-badge\n *ngIf=\"badgeText\"\n color=\"blue\">\n {{ badgeText }}\n </ap-badge>\n\n <button\n *ngIf=\"onlyEnabled && !disabled\"\n class=\"standalone-link\"\n type=\"button\"\n (click)=\"$event.preventDefault(); $event.stopPropagation(); onSelectOnly()\">\n {{ onlyText }}\n </button>\n </ap-checkbox>\n</div>\n<div\n *ngIf=\"dividerEnabled\"\n class=\"divider\"></div>\n", styles: ["ap-dropdown-item-multiple-one-line .option{display:flex;gap:var(--ref-spacing-xxs)}ap-dropdown-item-multiple-one-line .option ap-checkbox label{display:flex;gap:var(--ref-spacing-xxs);align-items:center}\n"], dependencies: [{ kind: "component", type: CheckboxComponent, selector: "ap-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "indeterminate", "checked", "required", "name"], outputs: ["change"] }, { kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["alternativeText", "anonymous", "username", "network", "online", "profilePicture", "showInitials", "alt", "rounded", "size"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BadgeComponent, selector: "ap-badge", inputs: ["color"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltipPosition", "apTooltip", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
85
|
+
}
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DropdownItemMultipleOneLineComponent, decorators: [{
|
|
87
|
+
type: Component,
|
|
88
|
+
args: [{ selector: 'ap-dropdown-item-multiple-one-line', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [SymbolComponent, CheckboxComponent, AvatarComponent, NgIf, BadgeComponent, TooltipDirective], template: "<div\n class=\"disabled-opaque\"\n [apTooltip]=\"disabledTooltip\"\n [apTooltipDisabled]=\"!disabled\"></div>\n<div class=\"option multiple\">\n <ap-checkbox\n #checkbox\n [checked]=\"selected\"\n [disabled]=\"disabled\"\n [name]=\"'option-selection-' + htmlId\">\n <ap-avatar\n *ngIf=\"avatarUrl\"\n [size]=\"24\"\n [profilePicture]=\"avatarUrl\"\n [username]=\"text\"\n [showInitials]=\"true\" />\n <span\n class=\"option-item\"\n [title]=\"text\">\n {{ text }}\n </span>\n <ap-badge\n *ngIf=\"badgeText\"\n color=\"blue\">\n {{ badgeText }}\n </ap-badge>\n\n <button\n *ngIf=\"onlyEnabled && !disabled\"\n class=\"standalone-link\"\n type=\"button\"\n (click)=\"$event.preventDefault(); $event.stopPropagation(); onSelectOnly()\">\n {{ onlyText }}\n </button>\n </ap-checkbox>\n</div>\n<div\n *ngIf=\"dividerEnabled\"\n class=\"divider\"></div>\n", styles: ["ap-dropdown-item-multiple-one-line .option{display:flex;gap:var(--ref-spacing-xxs)}ap-dropdown-item-multiple-one-line .option ap-checkbox label{display:flex;gap:var(--ref-spacing-xxs);align-items:center}\n"] }]
|
|
89
|
+
}], propDecorators: { text: [{
|
|
90
|
+
type: Input,
|
|
91
|
+
args: [{ required: true }]
|
|
92
|
+
}], selected: [{
|
|
93
|
+
type: Input,
|
|
94
|
+
args: [{ required: true }]
|
|
95
|
+
}], htmlId: [{
|
|
96
|
+
type: Input,
|
|
97
|
+
args: [{ required: true }]
|
|
98
|
+
}], disabled: [{
|
|
99
|
+
type: Input
|
|
100
|
+
}], avatarUrl: [{
|
|
101
|
+
type: Input
|
|
102
|
+
}], disabledTooltip: [{
|
|
103
|
+
type: Input
|
|
104
|
+
}], badgeText: [{
|
|
105
|
+
type: Input
|
|
106
|
+
}], dividerEnabled: [{
|
|
107
|
+
type: Input
|
|
108
|
+
}], onlyEnabled: [{
|
|
109
|
+
type: Input
|
|
110
|
+
}], onlyText: [{
|
|
111
|
+
type: Input
|
|
112
|
+
}], selectOnly: [{
|
|
113
|
+
type: Output
|
|
114
|
+
}], checkbox: [{
|
|
115
|
+
type: ViewChild,
|
|
116
|
+
args: [CheckboxComponent]
|
|
117
|
+
}] } });
|
|
118
|
+
|
|
119
|
+
class DropdownItemMultipleTwoLinesComponent {
|
|
120
|
+
text;
|
|
121
|
+
caption;
|
|
122
|
+
selected;
|
|
123
|
+
htmlId;
|
|
124
|
+
disabled = false;
|
|
125
|
+
avatarUrl;
|
|
126
|
+
disabledTooltip;
|
|
127
|
+
badgeText;
|
|
128
|
+
dividerEnabled = false;
|
|
129
|
+
onlyEnabled = false;
|
|
130
|
+
onlyText;
|
|
131
|
+
selectOnly = new EventEmitter();
|
|
132
|
+
checkbox;
|
|
133
|
+
onSelectOnly() {
|
|
134
|
+
this.selectOnly.emit();
|
|
135
|
+
this.checkbox.focus();
|
|
136
|
+
}
|
|
137
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DropdownItemMultipleTwoLinesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
138
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.10", type: DropdownItemMultipleTwoLinesComponent, isStandalone: true, selector: "ap-dropdown-item-multiple-two-lines", inputs: { text: "text", caption: "caption", selected: "selected", htmlId: "htmlId", disabled: "disabled", avatarUrl: "avatarUrl", disabledTooltip: "disabledTooltip", badgeText: "badgeText", dividerEnabled: "dividerEnabled", onlyEnabled: "onlyEnabled", onlyText: "onlyText" }, outputs: { selectOnly: "selectOnly" }, viewQueries: [{ propertyName: "checkbox", first: true, predicate: CheckboxComponent, descendants: true }], ngImport: i0, template: "<div\n class=\"disabled-opaque\"\n [apTooltip]=\"disabledTooltip\"\n [apTooltipDisabled]=\"!disabled\"></div>\n<div class=\"option multiple with-caption\">\n <ap-checkbox\n [checked]=\"selected\"\n [disabled]=\"disabled\"\n [name]=\"'option-selection-' + htmlId\">\n <ap-avatar\n *ngIf=\"avatarUrl\"\n [size]=\"24\"\n [profilePicture]=\"avatarUrl\"\n [username]=\"text\"\n [showInitials]=\"true\" />\n <div class=\"texts\">\n <div class=\"first-line\">\n <span\n class=\"label\"\n [title]=\"text\">\n {{ text }}\n </span>\n <ap-badge\n *ngIf=\"badgeText\"\n color=\"blue\">\n {{ badgeText }}\n </ap-badge>\n </div>\n <span\n class=\"caption\"\n [title]=\"caption\">\n {{ caption }}\n </span>\n </div>\n <button\n *ngIf=\"onlyEnabled && !disabled\"\n class=\"standalone-link\"\n type=\"button\"\n (click)=\"$event.preventDefault(); $event.stopPropagation(); onSelectOnly()\">\n {{ onlyText }}\n </button>\n </ap-checkbox>\n</div>\n<div\n *ngIf=\"dividerEnabled\"\n class=\"divider\"></div>\n", styles: ["ap-dropdown-item-multiple-two-lines .option{display:flex;gap:var(--ref-spacing-xxs)}ap-dropdown-item-multiple-two-lines .option ap-checkbox label{display:flex;gap:var(--ref-spacing-xxs);align-items:center}ap-dropdown-item-multiple-two-lines .option .texts{flex:1;overflow:auto;display:flex;flex-direction:column}ap-dropdown-item-multiple-two-lines .option .texts .first-line{display:flex;align-items:center;gap:var(--ref-spacing-xxs)}ap-dropdown-item-multiple-two-lines .option .texts .first-line .label{display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"], dependencies: [{ kind: "component", type: CheckboxComponent, selector: "ap-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "indeterminate", "checked", "required", "name"], outputs: ["change"] }, { kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["alternativeText", "anonymous", "username", "network", "online", "profilePicture", "showInitials", "alt", "rounded", "size"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BadgeComponent, selector: "ap-badge", inputs: ["color"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltipPosition", "apTooltip", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
139
|
+
}
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DropdownItemMultipleTwoLinesComponent, decorators: [{
|
|
141
|
+
type: Component,
|
|
142
|
+
args: [{ selector: 'ap-dropdown-item-multiple-two-lines', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [SymbolComponent, CheckboxComponent, AvatarComponent, NgIf, BadgeComponent, TooltipDirective], template: "<div\n class=\"disabled-opaque\"\n [apTooltip]=\"disabledTooltip\"\n [apTooltipDisabled]=\"!disabled\"></div>\n<div class=\"option multiple with-caption\">\n <ap-checkbox\n [checked]=\"selected\"\n [disabled]=\"disabled\"\n [name]=\"'option-selection-' + htmlId\">\n <ap-avatar\n *ngIf=\"avatarUrl\"\n [size]=\"24\"\n [profilePicture]=\"avatarUrl\"\n [username]=\"text\"\n [showInitials]=\"true\" />\n <div class=\"texts\">\n <div class=\"first-line\">\n <span\n class=\"label\"\n [title]=\"text\">\n {{ text }}\n </span>\n <ap-badge\n *ngIf=\"badgeText\"\n color=\"blue\">\n {{ badgeText }}\n </ap-badge>\n </div>\n <span\n class=\"caption\"\n [title]=\"caption\">\n {{ caption }}\n </span>\n </div>\n <button\n *ngIf=\"onlyEnabled && !disabled\"\n class=\"standalone-link\"\n type=\"button\"\n (click)=\"$event.preventDefault(); $event.stopPropagation(); onSelectOnly()\">\n {{ onlyText }}\n </button>\n </ap-checkbox>\n</div>\n<div\n *ngIf=\"dividerEnabled\"\n class=\"divider\"></div>\n", styles: ["ap-dropdown-item-multiple-two-lines .option{display:flex;gap:var(--ref-spacing-xxs)}ap-dropdown-item-multiple-two-lines .option ap-checkbox label{display:flex;gap:var(--ref-spacing-xxs);align-items:center}ap-dropdown-item-multiple-two-lines .option .texts{flex:1;overflow:auto;display:flex;flex-direction:column}ap-dropdown-item-multiple-two-lines .option .texts .first-line{display:flex;align-items:center;gap:var(--ref-spacing-xxs)}ap-dropdown-item-multiple-two-lines .option .texts .first-line .label{display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"] }]
|
|
143
|
+
}], propDecorators: { text: [{
|
|
144
|
+
type: Input,
|
|
145
|
+
args: [{ required: true }]
|
|
146
|
+
}], caption: [{
|
|
147
|
+
type: Input,
|
|
148
|
+
args: [{ required: true }]
|
|
149
|
+
}], selected: [{
|
|
150
|
+
type: Input,
|
|
151
|
+
args: [{ required: true }]
|
|
152
|
+
}], htmlId: [{
|
|
153
|
+
type: Input,
|
|
154
|
+
args: [{ required: true }]
|
|
155
|
+
}], disabled: [{
|
|
156
|
+
type: Input
|
|
157
|
+
}], avatarUrl: [{
|
|
158
|
+
type: Input
|
|
159
|
+
}], disabledTooltip: [{
|
|
160
|
+
type: Input
|
|
161
|
+
}], badgeText: [{
|
|
162
|
+
type: Input
|
|
163
|
+
}], dividerEnabled: [{
|
|
164
|
+
type: Input
|
|
165
|
+
}], onlyEnabled: [{
|
|
166
|
+
type: Input
|
|
167
|
+
}], onlyText: [{
|
|
168
|
+
type: Input
|
|
169
|
+
}], selectOnly: [{
|
|
170
|
+
type: Output
|
|
171
|
+
}], checkbox: [{
|
|
172
|
+
type: ViewChild,
|
|
173
|
+
args: [CheckboxComponent]
|
|
174
|
+
}] } });
|
|
175
|
+
|
|
176
|
+
class DropdownItemSingleOneLineComponent {
|
|
177
|
+
text;
|
|
178
|
+
selected;
|
|
179
|
+
disabled = false;
|
|
180
|
+
avatarUrl;
|
|
181
|
+
disabledTooltip;
|
|
182
|
+
badgeText;
|
|
183
|
+
dividerEnabled = false;
|
|
184
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DropdownItemSingleOneLineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
185
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.10", type: DropdownItemSingleOneLineComponent, isStandalone: true, selector: "ap-dropdown-item-single-one-line", inputs: { text: "text", selected: "selected", disabled: "disabled", avatarUrl: "avatarUrl", disabledTooltip: "disabledTooltip", badgeText: "badgeText", dividerEnabled: "dividerEnabled" }, ngImport: i0, template: "<div\n class=\"disabled-opaque\"\n [apTooltip]=\"disabledTooltip\"\n [apTooltipDisabled]=\"!disabled\"></div>\n<div class=\"option\">\n <ap-avatar\n *ngIf=\"avatarUrl\"\n [size]=\"24\"\n [profilePicture]=\"avatarUrl\"\n [username]=\"text\"\n [showInitials]=\"true\" />\n <span\n class=\"option-item\"\n [title]=\"text\">\n {{ text }}\n </span>\n <ap-badge\n *ngIf=\"badgeText\"\n color=\"blue\">\n {{ badgeText }}\n </ap-badge>\n <ap-symbol\n *ngIf=\"selected\"\n class=\"option-selected\"\n symbolId=\"check-2\"\n color=\"electric-blue\"\n size=\"micro\" />\n</div>\n<div\n *ngIf=\"dividerEnabled\"\n class=\"divider\"></div>\n", styles: ["ap-dropdown-item-single-one-line .option{display:flex;gap:var(--ref-spacing-xxs)}ap-dropdown-item-single-one-line .option .option-selected{margin-left:auto}\n"], dependencies: [{ kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }, { kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["alternativeText", "anonymous", "username", "network", "online", "profilePicture", "showInitials", "alt", "rounded", "size"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BadgeComponent, selector: "ap-badge", inputs: ["color"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltipPosition", "apTooltip", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
186
|
+
}
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DropdownItemSingleOneLineComponent, decorators: [{
|
|
188
|
+
type: Component,
|
|
189
|
+
args: [{ selector: 'ap-dropdown-item-single-one-line', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [SymbolComponent, AvatarComponent, NgIf, BadgeComponent, TooltipDirective], template: "<div\n class=\"disabled-opaque\"\n [apTooltip]=\"disabledTooltip\"\n [apTooltipDisabled]=\"!disabled\"></div>\n<div class=\"option\">\n <ap-avatar\n *ngIf=\"avatarUrl\"\n [size]=\"24\"\n [profilePicture]=\"avatarUrl\"\n [username]=\"text\"\n [showInitials]=\"true\" />\n <span\n class=\"option-item\"\n [title]=\"text\">\n {{ text }}\n </span>\n <ap-badge\n *ngIf=\"badgeText\"\n color=\"blue\">\n {{ badgeText }}\n </ap-badge>\n <ap-symbol\n *ngIf=\"selected\"\n class=\"option-selected\"\n symbolId=\"check-2\"\n color=\"electric-blue\"\n size=\"micro\" />\n</div>\n<div\n *ngIf=\"dividerEnabled\"\n class=\"divider\"></div>\n", styles: ["ap-dropdown-item-single-one-line .option{display:flex;gap:var(--ref-spacing-xxs)}ap-dropdown-item-single-one-line .option .option-selected{margin-left:auto}\n"] }]
|
|
190
|
+
}], propDecorators: { text: [{
|
|
191
|
+
type: Input,
|
|
192
|
+
args: [{ required: true }]
|
|
193
|
+
}], selected: [{
|
|
194
|
+
type: Input,
|
|
195
|
+
args: [{ required: true }]
|
|
196
|
+
}], disabled: [{
|
|
197
|
+
type: Input
|
|
198
|
+
}], avatarUrl: [{
|
|
199
|
+
type: Input
|
|
200
|
+
}], disabledTooltip: [{
|
|
201
|
+
type: Input
|
|
202
|
+
}], badgeText: [{
|
|
203
|
+
type: Input
|
|
204
|
+
}], dividerEnabled: [{
|
|
205
|
+
type: Input
|
|
206
|
+
}] } });
|
|
207
|
+
|
|
208
|
+
class DropdownItemSingleTwoLinesComponent {
|
|
209
|
+
text;
|
|
210
|
+
caption;
|
|
211
|
+
selected;
|
|
212
|
+
disabled = false;
|
|
213
|
+
avatarUrl;
|
|
214
|
+
disabledTooltip;
|
|
215
|
+
badgeText;
|
|
216
|
+
dividerEnabled = false;
|
|
217
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DropdownItemSingleTwoLinesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
218
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.10", type: DropdownItemSingleTwoLinesComponent, isStandalone: true, selector: "ap-dropdown-item-single-two-lines", inputs: { text: "text", caption: "caption", selected: "selected", disabled: "disabled", avatarUrl: "avatarUrl", disabledTooltip: "disabledTooltip", badgeText: "badgeText", dividerEnabled: "dividerEnabled" }, ngImport: i0, template: "<div\n class=\"disabled-opaque\"\n [apTooltip]=\"disabledTooltip\"\n [apTooltipDisabled]=\"!disabled\"></div>\n<div class=\"option with-caption\">\n <ap-avatar\n *ngIf=\"avatarUrl\"\n [size]=\"24\"\n [profilePicture]=\"avatarUrl\"\n [username]=\"text\"\n [showInitials]=\"true\" />\n <div class=\"texts\">\n <div class=\"first-line\">\n <span\n class=\"label\"\n [title]=\"text\">\n {{ text }}\n </span>\n <ap-badge\n *ngIf=\"badgeText\"\n color=\"blue\">\n {{ badgeText }}\n </ap-badge>\n </div>\n <span\n class=\"caption\"\n [title]=\"caption\">\n {{ caption }}\n </span>\n </div>\n <ap-symbol\n *ngIf=\"selected\"\n class=\"option-selected\"\n symbolId=\"check-2\"\n color=\"electric-blue\"\n size=\"micro\" />\n</div>\n<div\n *ngIf=\"dividerEnabled\"\n class=\"divider\"></div>\n", styles: ["ap-dropdown-item-single-two-lines .option{display:flex;gap:var(--ref-spacing-xxs)}ap-dropdown-item-single-two-lines .option .option-selected{margin-left:auto}ap-dropdown-item-single-two-lines .option .texts{flex:1;overflow:auto;display:flex;flex-direction:column}ap-dropdown-item-single-two-lines .option .texts .first-line{display:flex;align-items:center;gap:var(--ref-spacing-xxs)}ap-dropdown-item-single-two-lines .option .texts .first-line .label{display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"], dependencies: [{ kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }, { kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["alternativeText", "anonymous", "username", "network", "online", "profilePicture", "showInitials", "alt", "rounded", "size"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BadgeComponent, selector: "ap-badge", inputs: ["color"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltipPosition", "apTooltip", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
219
|
+
}
|
|
220
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DropdownItemSingleTwoLinesComponent, decorators: [{
|
|
221
|
+
type: Component,
|
|
222
|
+
args: [{ selector: 'ap-dropdown-item-single-two-lines', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [SymbolComponent, AvatarComponent, NgIf, BadgeComponent, TooltipDirective], template: "<div\n class=\"disabled-opaque\"\n [apTooltip]=\"disabledTooltip\"\n [apTooltipDisabled]=\"!disabled\"></div>\n<div class=\"option with-caption\">\n <ap-avatar\n *ngIf=\"avatarUrl\"\n [size]=\"24\"\n [profilePicture]=\"avatarUrl\"\n [username]=\"text\"\n [showInitials]=\"true\" />\n <div class=\"texts\">\n <div class=\"first-line\">\n <span\n class=\"label\"\n [title]=\"text\">\n {{ text }}\n </span>\n <ap-badge\n *ngIf=\"badgeText\"\n color=\"blue\">\n {{ badgeText }}\n </ap-badge>\n </div>\n <span\n class=\"caption\"\n [title]=\"caption\">\n {{ caption }}\n </span>\n </div>\n <ap-symbol\n *ngIf=\"selected\"\n class=\"option-selected\"\n symbolId=\"check-2\"\n color=\"electric-blue\"\n size=\"micro\" />\n</div>\n<div\n *ngIf=\"dividerEnabled\"\n class=\"divider\"></div>\n", styles: ["ap-dropdown-item-single-two-lines .option{display:flex;gap:var(--ref-spacing-xxs)}ap-dropdown-item-single-two-lines .option .option-selected{margin-left:auto}ap-dropdown-item-single-two-lines .option .texts{flex:1;overflow:auto;display:flex;flex-direction:column}ap-dropdown-item-single-two-lines .option .texts .first-line{display:flex;align-items:center;gap:var(--ref-spacing-xxs)}ap-dropdown-item-single-two-lines .option .texts .first-line .label{display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"] }]
|
|
223
|
+
}], propDecorators: { text: [{
|
|
224
|
+
type: Input,
|
|
225
|
+
args: [{ required: true }]
|
|
226
|
+
}], caption: [{
|
|
227
|
+
type: Input,
|
|
228
|
+
args: [{ required: true }]
|
|
229
|
+
}], selected: [{
|
|
230
|
+
type: Input,
|
|
231
|
+
args: [{ required: true }]
|
|
232
|
+
}], disabled: [{
|
|
233
|
+
type: Input
|
|
234
|
+
}], avatarUrl: [{
|
|
235
|
+
type: Input
|
|
236
|
+
}], disabledTooltip: [{
|
|
237
|
+
type: Input
|
|
238
|
+
}], badgeText: [{
|
|
239
|
+
type: Input
|
|
240
|
+
}], dividerEnabled: [{
|
|
241
|
+
type: Input
|
|
242
|
+
}] } });
|
|
243
|
+
|
|
244
|
+
class DropdownSearchFormComponent {
|
|
245
|
+
searchPlaceholder = '';
|
|
246
|
+
createNewEnabled = false;
|
|
247
|
+
createText = 'Create';
|
|
248
|
+
select;
|
|
249
|
+
inputSearch;
|
|
250
|
+
notFoundTpl;
|
|
251
|
+
loadingTpl;
|
|
252
|
+
createNewTpl;
|
|
94
253
|
createNew = new EventEmitter();
|
|
95
|
-
valueChanges = new EventEmitter();
|
|
96
|
-
_controlValueAccessorChangeFn;
|
|
97
|
-
onTouched;
|
|
98
|
-
displayTypeSignal = signal('text');
|
|
99
|
-
enabledOptions = computed(() => {
|
|
100
|
-
return this.optionsSignal().filter((value) => {
|
|
101
|
-
if (typeof value === 'string') {
|
|
102
|
-
return value;
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
return this.optionDisabled && !value[this.optionDisabled];
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
itemHoveredSignal = signal(null);
|
|
110
|
-
filteredOptionsSignal = signal([]);
|
|
111
|
-
loadingSignal = signal(false);
|
|
112
|
-
selectedValuesSignal = signal([]);
|
|
113
254
|
searchTermSignal = signal('');
|
|
114
|
-
searchTerm$ =
|
|
115
|
-
maximumDisplayValuesSignal = signal(-1);
|
|
116
|
-
hiddenCountSignal = signal(0);
|
|
117
|
-
allSelectedSignal = computed(() => {
|
|
118
|
-
return this.selectedValuesSignal().length === this.enabledOptions().length;
|
|
119
|
-
});
|
|
120
|
-
partialySelectedSignal = computed(() => {
|
|
121
|
-
return this.selectedValuesSignal().length > 0 && this.selectedValuesSignal().length < this.enabledOptions().length;
|
|
122
|
-
});
|
|
123
|
-
injector = inject(EnvironmentInjector);
|
|
124
|
-
selectValueContainer;
|
|
125
|
-
selectValueContainerWidthSignal = signal(0);
|
|
255
|
+
searchTerm$ = new BehaviorSubject('');
|
|
126
256
|
constructor() {
|
|
127
|
-
this.symbolRegistry.registerSymbols([apCheck2, apAlertCircle, apCheckCircle, apSearchAlternate, apAdd2022, apDeleteNoCircle]);
|
|
128
|
-
}
|
|
129
|
-
writeValue(selectedValues = []) {
|
|
130
|
-
this.selectedValuesSignal.set(selectedValues);
|
|
131
|
-
}
|
|
132
|
-
registerOnChange(fn) {
|
|
133
|
-
this._controlValueAccessorChangeFn = fn;
|
|
134
|
-
}
|
|
135
|
-
registerOnTouched(fn) {
|
|
136
|
-
this.onTouched = fn;
|
|
137
|
-
}
|
|
138
|
-
setDisabledState(isDisabled) {
|
|
139
|
-
this.disabled = isDisabled;
|
|
140
|
-
}
|
|
141
|
-
ngOnInit() {
|
|
142
|
-
if (this.multiple && (!this.displayTypeSignal() || this.displayTypeSignal() === 'text')) {
|
|
143
|
-
console.warn('Display type "text" is not supported for multiple select. Switching to "label".');
|
|
144
|
-
this.displayTypeSignal.set('label');
|
|
145
|
-
}
|
|
146
257
|
this.searchTerm$
|
|
147
|
-
.pipe(
|
|
148
|
-
|
|
149
|
-
this.
|
|
150
|
-
|
|
151
|
-
this.loadingSignal.set(false);
|
|
152
|
-
}), takeUntilDestroyed(this.destroyRef))
|
|
153
|
-
.subscribe((options) => {
|
|
154
|
-
this.optionsSignal.set(options);
|
|
258
|
+
.pipe(filter(() => !!this.select), takeUntilDestroyed())
|
|
259
|
+
.subscribe(term => {
|
|
260
|
+
this.searchTermSignal.set(term);
|
|
261
|
+
this.select.filter(term);
|
|
155
262
|
});
|
|
156
263
|
}
|
|
157
264
|
ngAfterViewInit() {
|
|
158
|
-
if (this.inlineLabelElement) {
|
|
159
|
-
this.elementRef.nativeElement.style.setProperty('--placeholder-padding-left', `${this.inlineLabelElement.nativeElement.clientWidth}px`);
|
|
160
|
-
}
|
|
161
|
-
this.selectValueContainer = this.select.element.getElementsByClassName('ng-value-container')[0];
|
|
162
|
-
if (this.multiple) {
|
|
163
|
-
fromEvent(window, 'resize')
|
|
164
|
-
.pipe(debounceTime(200), takeUntilDestroyed(this.destroyRef))
|
|
165
|
-
.subscribe(() => {
|
|
166
|
-
this.updateSelectValueContainerWidthSignal();
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
this.updateSelectValueContainerWidthSignal();
|
|
170
|
-
runInInjectionContext(this.injector, () => {
|
|
171
|
-
effect(() => {
|
|
172
|
-
if (this.multiple) {
|
|
173
|
-
const selectedValues = this.selectedValuesSignal();
|
|
174
|
-
const selectValueContainerWidthSignal = this.selectValueContainerWidthSignal();
|
|
175
|
-
const timeout = setTimeout(() => {
|
|
176
|
-
this.calculateResponsiveLabels(selectValueContainerWidthSignal, selectedValues);
|
|
177
|
-
}, 100);
|
|
178
|
-
return () => {
|
|
179
|
-
clearTimeout(timeout);
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
return;
|
|
183
|
-
}, {
|
|
184
|
-
allowSignalWrites: true,
|
|
185
|
-
});
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
onSearchTermChange(searchTerm) {
|
|
189
|
-
this.searchTermSignal.set(searchTerm);
|
|
190
|
-
}
|
|
191
|
-
defaultSearchFn(term) {
|
|
192
|
-
return of(this.filteredOptionsSignal().filter((option) => {
|
|
193
|
-
if (typeof option === 'string') {
|
|
194
|
-
return option.toLowerCase().includes(term.toLowerCase());
|
|
195
|
-
}
|
|
196
|
-
if (this.optionLabel) {
|
|
197
|
-
return String(option[this.optionLabel]).toLowerCase().includes(term.toLowerCase());
|
|
198
|
-
}
|
|
199
|
-
return option;
|
|
200
|
-
}));
|
|
201
|
-
}
|
|
202
|
-
isGroupIndeterminate(children) {
|
|
203
|
-
return children.some((child) => child.selected) && !this.isGroupChecked(children);
|
|
204
|
-
}
|
|
205
|
-
isGroupDisabled(children) {
|
|
206
|
-
return children.every((child) => child.disabled);
|
|
207
|
-
}
|
|
208
|
-
isGroupChecked(children) {
|
|
209
|
-
return children.every((child) => child.disabled || child.selected) && !this.isGroupDisabled(children);
|
|
210
|
-
}
|
|
211
|
-
onSelectOnly(item) {
|
|
212
|
-
if (typeof item === 'string') {
|
|
213
|
-
this.selectedValuesSignal.set([item]);
|
|
214
|
-
}
|
|
215
|
-
else {
|
|
216
|
-
this.optionValue ? this.selectedValuesSignal.set([item[this.optionValue]]) : this.selectedValuesSignal.set([item]);
|
|
217
|
-
}
|
|
218
|
-
this.callControlValueAccessorChangeFn();
|
|
219
|
-
}
|
|
220
|
-
onSelectOpened() {
|
|
221
265
|
setTimeout(() => {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
onHoverItem(htmlid) {
|
|
231
|
-
if (!this.multiple || this.disabled) {
|
|
232
|
-
return;
|
|
233
|
-
}
|
|
234
|
-
this.itemHoveredSignal.set(htmlid);
|
|
235
|
-
}
|
|
236
|
-
onLeaveItem() {
|
|
237
|
-
if (!this.multiple || this.disabled) {
|
|
238
|
-
return;
|
|
266
|
+
this.inputSearch.nativeElement.focus();
|
|
267
|
+
}, 100);
|
|
268
|
+
this.select.notFoundTemplate = this.notFoundTpl;
|
|
269
|
+
this.select.loadingTextTemplate = this.loadingTpl;
|
|
270
|
+
if (this.createNewEnabled) {
|
|
271
|
+
this.select.footerTemplate = this.createNewTpl;
|
|
239
272
|
}
|
|
240
|
-
this.itemHoveredSignal.set(null);
|
|
241
|
-
}
|
|
242
|
-
onToggleAll() {
|
|
243
|
-
if (this.partialySelectedSignal() || this.allSelectedSignal()) {
|
|
244
|
-
this.selectedValuesSignal.set([]);
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
this.selectedValuesSignal.set(this.enabledOptions().map((value) => {
|
|
248
|
-
if (typeof value === 'string') {
|
|
249
|
-
return value;
|
|
250
|
-
}
|
|
251
|
-
return this.optionValue ? value[this.optionValue] : value;
|
|
252
|
-
}));
|
|
253
|
-
}
|
|
254
|
-
this.callControlValueAccessorChangeFn();
|
|
255
|
-
}
|
|
256
|
-
onSelectedValuesChange(selectedValues) {
|
|
257
|
-
this.selectedValuesSignal.set(selectedValues);
|
|
258
|
-
this.callControlValueAccessorChangeFn();
|
|
259
|
-
}
|
|
260
|
-
onOpenSelect() {
|
|
261
|
-
this.select.open();
|
|
262
|
-
}
|
|
263
|
-
onInlineInputEnter() {
|
|
264
|
-
this.hovered = true;
|
|
265
|
-
}
|
|
266
|
-
onInlineInputLeave() {
|
|
267
|
-
this.hovered = false;
|
|
268
273
|
}
|
|
269
274
|
onCreateNew() {
|
|
270
275
|
this.createNew.emit(this.searchTermSignal());
|
|
271
|
-
this.select.close();
|
|
272
276
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
277
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DropdownSearchFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
278
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.10", type: DropdownSearchFormComponent, isStandalone: true, selector: "ap-dropdown-search-form", inputs: { searchPlaceholder: "searchPlaceholder", createNewEnabled: "createNewEnabled", createText: "createText", select: "select" }, outputs: { createNew: "createNew" }, viewQueries: [{ propertyName: "inputSearch", first: true, predicate: ["inputSearch"], descendants: true }, { propertyName: "notFoundTpl", first: true, predicate: ["notFoundTpl"], descendants: true, read: TemplateRef }, { propertyName: "loadingTpl", first: true, predicate: ["loadingTpl"], descendants: true, read: TemplateRef }, { propertyName: "createNewTpl", first: true, predicate: ["createNewTpl"], descendants: true, read: TemplateRef }], ngImport: i0, template: "<ap-input-group class=\"dropdown-search-input\">\n <ap-symbol symbolId=\"search-alternate\" />\n <input\n #inputSearch\n apInput\n [placeholder]=\"searchPlaceholder\"\n [ngModel]=\"searchTermSignal()\"\n (ngModelChange)=\"searchTerm$.next($event)\" />\n</ap-input-group>\n\n<ng-template #notFoundTpl>\n <div class=\"option not-found\">\n <span>{{ select.notFoundText ? select.notFoundText : 'Not found text' }}</span>\n </div>\n</ng-template>\n\n<ng-template #loadingTpl>\n <div class=\"loading-state\">\n <ap-loader diameter=\"30\" />\n <span>\n {{ select.loadingText ? select.loadingText : 'Loading Items'}}\n </span>\n </div>\n</ng-template>\n\n<ng-template #createNewTpl let-searchTerm=\"searchTerm\">\n <button\n class=\"create-new\"\n type=\"button\"\n (click)=\"onCreateNew()\">\n <ap-symbol\n symbolId=\"add-2022\"\n size=\"micro\" />\n <span>\n {{ createText }}\n </span>\n <ng-container *ngIf=\"searchTerm\">\"{{ searchTerm }}\"</ng-container>\n </button>\n</ng-template>", styles: ["ap-dropdown-search-form .dropdown-search-input .ap-input-group{width:100%}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: InputGroupComponent, selector: "ap-input-group", inputs: ["symbolPosition"] }, { kind: "directive", type: InputDirective, selector: "[apInput]" }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LoaderComponent, selector: "ap-loader", inputs: ["color", "diameter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
279
|
+
}
|
|
280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DropdownSearchFormComponent, decorators: [{
|
|
281
|
+
type: Component,
|
|
282
|
+
args: [{ selector: 'ap-dropdown-search-form', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgIf, InputGroupComponent, InputDirective, SymbolComponent, FormsModule, LoaderComponent], template: "<ap-input-group class=\"dropdown-search-input\">\n <ap-symbol symbolId=\"search-alternate\" />\n <input\n #inputSearch\n apInput\n [placeholder]=\"searchPlaceholder\"\n [ngModel]=\"searchTermSignal()\"\n (ngModelChange)=\"searchTerm$.next($event)\" />\n</ap-input-group>\n\n<ng-template #notFoundTpl>\n <div class=\"option not-found\">\n <span>{{ select.notFoundText ? select.notFoundText : 'Not found text' }}</span>\n </div>\n</ng-template>\n\n<ng-template #loadingTpl>\n <div class=\"loading-state\">\n <ap-loader diameter=\"30\" />\n <span>\n {{ select.loadingText ? select.loadingText : 'Loading Items'}}\n </span>\n </div>\n</ng-template>\n\n<ng-template #createNewTpl let-searchTerm=\"searchTerm\">\n <button\n class=\"create-new\"\n type=\"button\"\n (click)=\"onCreateNew()\">\n <ap-symbol\n symbolId=\"add-2022\"\n size=\"micro\" />\n <span>\n {{ createText }}\n </span>\n <ng-container *ngIf=\"searchTerm\">\"{{ searchTerm }}\"</ng-container>\n </button>\n</ng-template>", styles: ["ap-dropdown-search-form .dropdown-search-input .ap-input-group{width:100%}\n"] }]
|
|
283
|
+
}], ctorParameters: function () { return []; }, propDecorators: { searchPlaceholder: [{
|
|
284
|
+
type: Input
|
|
285
|
+
}], createNewEnabled: [{
|
|
286
|
+
type: Input
|
|
287
|
+
}], createText: [{
|
|
288
|
+
type: Input
|
|
289
|
+
}], select: [{
|
|
290
|
+
type: Input,
|
|
291
|
+
args: [{
|
|
292
|
+
required: true,
|
|
293
|
+
}]
|
|
294
|
+
}], inputSearch: [{
|
|
295
|
+
type: ViewChild,
|
|
296
|
+
args: ['inputSearch']
|
|
297
|
+
}], notFoundTpl: [{
|
|
298
|
+
type: ViewChild,
|
|
299
|
+
args: ['notFoundTpl', { read: TemplateRef }]
|
|
300
|
+
}], loadingTpl: [{
|
|
301
|
+
type: ViewChild,
|
|
302
|
+
args: ['loadingTpl', { read: TemplateRef }]
|
|
303
|
+
}], createNewTpl: [{
|
|
304
|
+
type: ViewChild,
|
|
305
|
+
args: ['createNewTpl', { read: TemplateRef }]
|
|
306
|
+
}], createNew: [{
|
|
307
|
+
type: Output
|
|
308
|
+
}] } });
|
|
309
|
+
|
|
310
|
+
class SelectLabelMultipleComponent {
|
|
311
|
+
set _displayType(displayType) {
|
|
312
|
+
this.displayTypeSignal.set(displayType);
|
|
280
313
|
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
this.
|
|
314
|
+
set _selectedItems(selectedItems) {
|
|
315
|
+
if (selectedItems.length !== this.selectedItemsSignal().length ||
|
|
316
|
+
selectedItems.some(item => this.selectedItemsSignal().indexOf(item) === -1)) {
|
|
317
|
+
this.selectedItemsSignal.set(selectedItems);
|
|
285
318
|
}
|
|
286
319
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
320
|
+
set _bindLabel(bindLabel) {
|
|
321
|
+
this.bindLabelSignal.set(bindLabel);
|
|
322
|
+
}
|
|
323
|
+
set _bindValue(bindValue) {
|
|
324
|
+
this.bindValueSignal.set(bindValue);
|
|
325
|
+
}
|
|
326
|
+
set _bindAvatarUrl(bindAvatarUrl) {
|
|
327
|
+
this.bindAvatarUrlSignal.set(bindAvatarUrl);
|
|
328
|
+
}
|
|
329
|
+
removeItem = new EventEmitter();
|
|
330
|
+
elementRef = inject(ElementRef);
|
|
331
|
+
injector = inject(EnvironmentInjector);
|
|
332
|
+
displayTypeSignal = signal('label');
|
|
333
|
+
selectedItemsSignal = signal([]);
|
|
334
|
+
bindLabelSignal = signal('');
|
|
335
|
+
bindValueSignal = signal('');
|
|
336
|
+
bindAvatarUrlSignal = signal('');
|
|
337
|
+
selectedLabels = computed(() => {
|
|
338
|
+
return this.selectedItemsSignal().map(item => {
|
|
339
|
+
return {
|
|
340
|
+
label: this.bindLabelSignal() ? item[this.bindLabelSignal()] : item,
|
|
341
|
+
avatarUrl: this.bindAvatarUrlSignal() ? item[this.bindAvatarUrlSignal()] : '',
|
|
342
|
+
value: item,
|
|
343
|
+
};
|
|
344
|
+
});
|
|
345
|
+
});
|
|
346
|
+
valueContainerWidth = signal(0);
|
|
347
|
+
hiddenCountSignal = signal(0);
|
|
348
|
+
trackByItem = (_, item) => (this.bindValueSignal() ? item.value[this.bindValueSignal()] : item.value);
|
|
349
|
+
ngAfterViewInit() {
|
|
350
|
+
const parentWidth = this.elementRef.nativeElement.parentElement?.offsetWidth;
|
|
351
|
+
this.valueContainerWidth.set(parentWidth ?? 0);
|
|
352
|
+
runInInjectionContext(this.injector, () => {
|
|
353
|
+
effect(() => {
|
|
354
|
+
const selectedValues = this.selectedItemsSignal();
|
|
355
|
+
const selectValueContainerWidthSignal = this.valueContainerWidth() - 30;
|
|
356
|
+
const timeout = setTimeout(() => {
|
|
357
|
+
this.calculateResponsiveLabels(selectValueContainerWidthSignal, selectedValues);
|
|
358
|
+
}, 100);
|
|
359
|
+
return () => {
|
|
360
|
+
clearTimeout(timeout);
|
|
361
|
+
};
|
|
362
|
+
}, {
|
|
363
|
+
allowSignalWrites: true,
|
|
364
|
+
});
|
|
365
|
+
});
|
|
293
366
|
}
|
|
294
367
|
calculateResponsiveLabels(containerWidth, selectedValues) {
|
|
295
|
-
if (
|
|
296
|
-
this.hiddenCountSignal.set(0);
|
|
368
|
+
if (containerWidth === 0 || !selectedValues.length) {
|
|
297
369
|
return;
|
|
298
370
|
}
|
|
299
|
-
const itemsContainer = this.selectValueContainer.getElementsByClassName('multiple-item')[0];
|
|
300
|
-
const items = this.selectValueContainer.getElementsByClassName('item');
|
|
301
371
|
let totalWidth = 0;
|
|
302
372
|
let hiddenCount = 0;
|
|
303
373
|
const itemGap = 4;
|
|
374
|
+
const items = this.elementRef.nativeElement.getElementsByClassName('item');
|
|
304
375
|
for (let index = 0; index < items.length; index++) {
|
|
305
376
|
const item = items[index];
|
|
306
377
|
const itemWidth = item.clientWidth + itemGap;
|
|
@@ -313,145 +384,241 @@ class SelectComponent {
|
|
|
313
384
|
hiddenCount++;
|
|
314
385
|
}
|
|
315
386
|
}
|
|
316
|
-
|
|
387
|
+
this.elementRef.nativeElement.getElementsByClassName('multiple-item')[0].style.maxWidth = `${totalWidth}px`;
|
|
317
388
|
this.hiddenCountSignal.set(hiddenCount);
|
|
318
389
|
}
|
|
319
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type:
|
|
320
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.10", type: SelectComponent, isStandalone: true, selector: "ap-select", inputs: { options: "options", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", ariaDescribedBy: "ariaDescribedBy", appendTo: "appendTo", clearable: "clearable", description: "description", disabled: "disabled", selectId: "selectId", inlineLabel: "inlineLabel", create: "create", createText: "createText", group: "group", selectableGroup: "selectableGroup", label: "label", multiple: "multiple", only: "only", onlyText: "onlyText", placeholder: "placeholder", selectAll: "selectAll", selectAllText: "selectAllText", unselectAllText: "unselectAllText", searchable: "searchable", searchPlaceholder: "searchPlaceholder", searchFn: "searchFn", notFoundText: "notFoundText", loadingText: "loadingText", displayType: "displayType", optionLabel: "optionLabel", optionCaption: "optionCaption", optionDivider: "optionDivider", optionProfileImageUrl: "optionProfileImageUrl", optionBadgeLabel: "optionBadgeLabel", optionValue: "optionValue", optionDisabled: "optionDisabled", optionGroupLabel: "optionGroupLabel", optionGroupTag: "optionGroupTag", maximumDisplayOptions: "maximumDisplayOptions", customOptionTemplate: "customOptionTemplate", customLabelTemplate: "customLabelTemplate", customMultiLabelTemplate: "customMultiLabelTemplate", errorMessage: "errorMessage", successMessage: "successMessage", compareWith: "compareWith" }, outputs: { createNew: "createNew", valueChanges: "valueChanges" }, host: { properties: { "class.hovered": "this.hovered", "class.inline": "this.inlineLabel" } }, providers: [SELECT_VALUE_ACCESSOR], viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "inlineLabelElement", first: true, predicate: ["inlineLabel"], descendants: true }, { propertyName: "select", first: true, predicate: ["select"], descendants: true }], ngImport: i0, template: "<label\n *ngIf=\"label && !inlineLabel\"\n [for]=\"selectId\">\n <span>\n {{ label }}\n </span>\n <span\n *ngIf=\"description\"\n class=\"description\">\n {{ description }}\n </span>\n</label>\n\n<div\n *ngIf=\"inlineLabel\"\n #inlineLabel\n tabindex=\"0\"\n class=\"inline-label\"\n (click)=\"onOpenSelect()\"\n (keydown.enter)=\"onOpenSelect()\"\n (mouseenter)=\"onInlineInputEnter()\"\n (mouseleave)=\"onInlineInputLeave()\">\n <label\n *ngIf=\"label && inlineLabel\"\n class=\"label\"\n [for]=\"selectId\">\n <span>\n {{ label }}\n </span>\n </label>\n <div class=\"divider\"></div>\n</div>\n\n<ng-select\n #select\n class=\"ap-select\"\n [tabIndex]=\"0\"\n [clearable]=\"clearable\"\n [placeholder]=\"placeholder\"\n [labelForId]=\"selectId\"\n [searchable]=\"false\"\n [closeOnSelect]=\"!multiple\"\n [bindValue]=\"optionValue ? optionValue : ''\"\n [groupBy]=\"group ? optionGroupLabel : ''\"\n [multiple]=\"multiple\"\n [disabled]=\"disabled\"\n [markFirst]=\"false\"\n [selectableGroup]=\"selectableGroup\"\n [selectableGroupAsModel]=\"false\"\n [appendTo]=\"appendTo\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.aria-describedby]=\"ariaDescribedBy || null\"\n [attr.aria-disabled]=\"disabled?.toString()\"\n [items]=\"optionsSignal()\"\n [compareWith]=\"compareWith\"\n [loading]=\"loadingSignal()\"\n [ngModel]=\"selectedValuesSignal()\"\n [class.with-error]=\"errorMessage\"\n [class.with-success]=\"successMessage\"\n (ngModelChange)=\"onSelectedValuesChange($event)\"\n (open)=\"onSelectOpened()\">\n <ng-container *ngIf=\"searchable || selectAll\">\n <ng-template\n let-item=\"item\"\n ng-header-tmp>\n <ng-container *ngIf=\"searchable\">\n <ap-input\n #searchInput\n tabindex=\"0\"\n name=\"search-input\"\n class=\"full-width\"\n symbolId=\"search-alternate\"\n symbolPosition=\"right\"\n [placeholder]=\"searchPlaceholder\"\n [ngModel]=\"searchTermSignal()\"\n (ngModelChange)=\"onSearchTermChange($event)\" />\n </ng-container>\n <ng-container *ngIf=\"selectAll\">\n <ap-checkbox\n class=\"select-all-checkbox\"\n name=\"option-group-select-all\"\n [indeterminate]=\"partialySelectedSignal()\"\n [checked]=\"allSelectedSignal()\"\n (click)=\"onToggleAll()\">\n <span>\n {{ partialySelectedSignal() || allSelectedSignal() ? unselectAllText : selectAllText }}\n </span>\n </ap-checkbox>\n </ng-container>\n </ng-template>\n </ng-container>\n <ng-template\n let-item=\"item\"\n let-item$=\"item$\"\n ng-optgroup-tmp>\n <div\n class=\"group\"\n [class.with-search]=\"searchable\"\n [class.with-select-all]=\"selectAll\">\n <ng-container *ngIf=\"!multiple\">\n <span class=\"group-label\">\n {{ item[optionGroupLabel] }}\n </span>\n <ap-badge\n *ngIf=\"optionGroupTag && optionGroupTag[item[optionGroupLabel]]\"\n color=\"blue\">\n {{ optionGroupTag[item[optionGroupLabel]] }}\n </ap-badge>\n </ng-container>\n <ng-container *ngIf=\"multiple\">\n <ap-checkbox\n *ngIf=\"selectableGroup\"\n [name]=\"'option-group-selection-' + item['group']\"\n [indeterminate]=\"isGroupIndeterminate(item$.children)\"\n [checked]=\"isGroupChecked(item$.children)\">\n <span class=\"group-label\">\n {{ item[optionGroupLabel] }}\n </span>\n <ap-badge\n *ngIf=\"optionGroupTag && optionGroupTag[item[optionGroupLabel]]\"\n color=\"blue\">\n {{ optionGroupTag[item[optionGroupLabel]] }}\n </ap-badge>\n </ap-checkbox>\n <span\n *ngIf=\"!selectableGroup\"\n class=\"group-label\">\n {{ item[optionGroupLabel] }}\n </span>\n </ng-container>\n </div>\n </ng-template>\n <ng-template\n let-items=\"items\"\n let-item$=\"item$\"\n ng-multi-label-tmp>\n <ng-container>\n <div class=\"multiple-item\">\n <ng-container *ngIf=\"!customMultiLabelTemplate\">\n <ng-container *ngFor=\"let item of items\">\n <ng-container *ngIf=\"optionLabel && item[optionLabel]\">\n <ng-container *ngIf=\"displayTypeSignal() === 'text' || !displayTypeSignal()\">\n <span\n class=\"item text-item\"\n [title]=\"item[optionLabel]\">\n {{ item[optionLabel] }}\n </span>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'label'\">\n <ap-label\n color=\"blue\"\n class=\"item\"\n removable=\"true\"\n [content]=\"item[optionLabel]\"\n (remove)=\"removeSelectedItem($event, item)\" />\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'tag'\">\n <ap-tag\n class=\"item text-item\"\n clearable=\"true\"\n (clear)=\"removeSelectedItem($event, item)\">\n <ap-avatar\n *ngIf=\"optionProfileImageUrl\"\n size=\"24\"\n [profilePicture]=\"item[optionProfileImageUrl] ?? ''\"\n [username]=\"optionLabel && item[optionLabel] ? item[optionLabel] : ''\"\n [showInitials]=\"true\" />\n {{ item[optionLabel] }}\n </ap-tag>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'withAvatar'\">\n <div class=\"item with-avatar\">\n <ap-avatar\n *ngIf=\"optionProfileImageUrl\"\n size=\"24\"\n [profilePicture]=\"item[optionProfileImageUrl] ?? ''\"\n [username]=\"optionLabel && item[optionLabel] ? item[optionLabel] : ''\"\n [showInitials]=\"true\" />\n <span\n class=\"text-item\"\n [title]=\"item[optionLabel]\">\n {{ item[optionLabel] }}\n </span>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!optionLabel || !item[optionLabel]\">\n <ng-container *ngIf=\"displayTypeSignal() === 'text' || !displayTypeSignal()\">\n <span\n class=\"item text-item\"\n [title]=\"item\">\n {{ item }}\n </span>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'label'\">\n <ap-label\n class=\"item\"\n color=\"blue\"\n [removable]=\"multiple\"\n [content]=\"item\"\n (remove)=\"removeSelectedItem($event, item)\" />\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'tag'\">\n <ap-tag\n class=\"item text-item\"\n [clearable]=\"multiple\"\n (clear)=\"removeSelectedItem($event, item)\">\n {{ item }}\n </ap-tag>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'withAvatar'\">\n <div class=\"item with-avatar\">\n <ap-avatar\n *ngIf=\"optionProfileImageUrl\"\n size=\"24\"\n [profilePicture]=\"item[optionProfileImageUrl] ?? ''\"\n [username]=\"optionLabel && item[optionLabel] ? item[optionLabel] : ''\"\n [showInitials]=\"true\" />\n <span class=\"text-item\">\n {{ item }}\n </span>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"customMultiLabelTemplate\">\n <ng-container *ngTemplateOutlet=\"customMultiLabelTemplate; context: { options: items }\" />\n </ng-container>\n </div>\n <div\n *ngIf=\"hiddenCountSignal() > 0\"\n class=\"remaining\">\n <ng-container *ngIf=\"displayTypeSignal() === 'text' || displayTypeSignal() === 'withAvatar' || !displayTypeSignal()\">\n <span class=\"text-item\">+{{ hiddenCountSignal() }}</span>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'tag'\">\n <ap-tag\n class=\"text-item\"\n clearable=\"false\">\n +{{ hiddenCountSignal() }}\n </ap-tag>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'label'\">\n <ap-label\n color=\"blue\"\n [removable]=\"false\"\n [content]=\"'+' + hiddenCountSignal()\" />\n </ng-container>\n </div>\n </ng-container>\n </ng-template>\n <ng-template ng-loadingtext-tmp>\n <div class=\"loading-state\">\n <ap-loader diameter=\"30\" />\n <span>\n {{ loadingText }}\n </span>\n </div>\n </ng-template>\n <ng-template ng-loadingspinner-tmp></ng-template>\n <ng-container *ngIf=\"create\">\n <ng-template ng-footer-tmp>\n <button\n class=\"create-new\"\n type=\"button\"\n (click)=\"onCreateNew()\">\n <ap-symbol\n symbolId=\"add-2022\"\n size=\"micro\" />\n <span>\n {{ createText }}\n </span>\n <ng-container *ngIf=\"searchTermSignal()\">\"{{ searchTermSignal() }}\"</ng-container>\n </button>\n </ng-template>\n </ng-container>\n <ng-template\n let-item=\"item\"\n let-item$=\"item$\"\n ng-option-tmp>\n <ng-container\n *ngIf=\"(!optionLabel || !item[optionLabel]) && item && (!optionDivider || !item[optionDivider]) && !customOptionTemplate\">\n <div class=\"option\">\n <span\n class=\"option-item\"\n [title]=\"item\">\n {{ item }}\n </span>\n <ng-container *ngIf=\"item$.selected && !multiple\">\n <ap-symbol\n symbolId=\"check-2\"\n color=\"electric-blue\"\n size=\"micro\" />\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf=\"(optionLabel && item[optionLabel]) || customOptionTemplate\">\n <div\n class=\"option\"\n [class.with-caption]=\"optionCaption && item[optionCaption]\"\n [class.multiple]=\"multiple\"\n (mouseenter)=\"onHoverItem(item$.htmlId)\"\n (mouseleave)=\"onLeaveItem()\">\n <ng-container *ngTemplateOutlet=\"contentItem; context: { item: item, item$: item$ }\" />\n </div>\n </ng-container>\n <ng-container *ngIf=\"optionDivider && item[optionDivider]\">\n <div class=\"divider\"></div>\n </ng-container>\n </ng-template>\n <ng-template\n let-item=\"item\"\n ng-label-tmp>\n <ng-container *ngIf=\"customLabelTemplate\">\n <ng-container *ngTemplateOutlet=\"customLabelTemplate; context: { option: item }\" />\n </ng-container>\n <ng-container *ngIf=\"!optionLabel && !customLabelTemplate\">\n <ng-container *ngIf=\"displayTypeSignal() === 'text' || !displayTypeSignal()\">\n <span\n class=\"text-item\"\n [title]=\"item\">\n {{ item }}\n </span>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'label'\">\n <ap-label\n color=\"blue\"\n [removable]=\"multiple\"\n [content]=\"item\"\n (remove)=\"removeSelectedItem($event, item)\" />\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'tag'\">\n <ap-tag\n class=\"text-item\"\n [clearable]=\"multiple\"\n (clear)=\"removeSelectedItem($event, item)\">\n {{ item }}\n </ap-tag>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'withAvatar'\">\n <span class=\"text-item\">\n {{ item }}\n </span>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"optionLabel && !customLabelTemplate\">\n <ng-container *ngIf=\"displayTypeSignal() === 'text' || !displayTypeSignal()\">\n <span class=\"text-item\">\n {{ item[optionLabel] }}\n </span>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'label'\">\n <ap-label\n color=\"blue\"\n [removable]=\"multiple\"\n [content]=\"item[optionLabel]\"\n (remove)=\"removeSelectedItem($event, item)\" />\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'tag'\">\n <ap-tag\n class=\"text-item\"\n [clearable]=\"multiple\"\n [title]=\"item[optionLabel]\"\n (clear)=\"removeSelectedItem($event, item)\">\n <ap-avatar\n *ngIf=\"optionProfileImageUrl\"\n size=\"24\"\n [profilePicture]=\"item[optionProfileImageUrl] ?? ''\"\n [username]=\"optionLabel && item[optionLabel] ? item[optionLabel] : ''\"\n [showInitials]=\"true\" />\n {{ item[optionLabel] }}\n </ap-tag>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'withAvatar'\">\n <div class=\"with-avatar\">\n <ap-avatar\n *ngIf=\"optionProfileImageUrl\"\n size=\"24\"\n [profilePicture]=\"item[optionProfileImageUrl] ?? ''\"\n [username]=\"optionLabel && item[optionLabel] ? item[optionLabel] : ''\"\n [showInitials]=\"true\" />\n <span\n class=\"text-item\"\n [title]=\"item[optionLabel]\">\n {{ item[optionLabel] }}\n </span>\n </div>\n </ng-container>\n </ng-container>\n </ng-template>\n <ng-template ng-notfound-tmp>\n <div class=\"option not-found\">\n {{ notFoundText }}\n </div>\n </ng-template>\n</ng-select>\n\n<ng-template\n #contentItem\n let-item=\"item\"\n let-item$=\"item$\">\n <ng-container *ngIf=\"multiple\">\n <div class=\"disabled-opaque\"></div>\n <ap-checkbox\n *ngIf=\"multiple\"\n [checked]=\"item$.selected\"\n [disabled]=\"item$.disabled\"\n [name]=\"'option-selection-' + item$.htmlId\">\n <ng-container *ngTemplateOutlet=\"textItem; context: { item: item, item$: item$ }\" />\n </ap-checkbox>\n </ng-container>\n <ng-container *ngIf=\"!multiple\">\n <div class=\"disabled-opaque\"></div>\n <ng-container *ngTemplateOutlet=\"textItem; context: { item: item, item$: item$ }\" />\n </ng-container>\n</ng-template>\n\n<ng-template\n #textItem\n let-item=\"item\"\n let-item$=\"item$\">\n <div class=\"content\">\n <ng-container *ngIf=\"!customOptionTemplate\">\n <ng-container *ngIf=\"!optionLabel\">\n <span class=\"item\">\n {{ item }}\n </span>\n </ng-container>\n <ng-container *ngIf=\"optionProfileImageUrl\">\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"item[optionProfileImageUrl] ?? ''\"\n [username]=\"optionLabel && item[optionLabel] ? item[optionLabel] : ''\"\n [showInitials]=\"true\" />\n </ng-container>\n <ng-container *ngIf=\"optionLabel && item[optionLabel]\">\n <div class=\"texts\">\n <div class=\"first-line\">\n <span\n class=\"label\"\n [title]=\"item[optionLabel]\">\n {{ item[optionLabel] }}\n </span>\n <ng-container *ngIf=\"optionBadgeLabel && item[optionBadgeLabel]\">\n <ap-badge color=\"blue\">{{ item[optionBadgeLabel] }}</ap-badge>\n </ng-container>\n </div>\n <ng-container *ngIf=\"optionCaption && item[optionCaption]\">\n <span\n class=\"caption\"\n [title]=\"item[optionCaption]\">\n {{ item[optionCaption] }}\n </span>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"customOptionTemplate\">\n <ng-container *ngTemplateOutlet=\"customOptionTemplate; context: { option: item }\" />\n </ng-container>\n <ng-container *ngIf=\"only && !item$.disabled && itemHoveredSignal() === item$.htmlId && multiple\">\n <button\n class=\"standalone-link\"\n type=\"button\"\n (click)=\"onSelectOnly(item)\">\n {{ onlyText }}\n </button>\n </ng-container>\n <ng-container *ngIf=\"item$.selected && !multiple\">\n <ap-symbol\n symbolId=\"check-2\"\n color=\"electric-blue\"\n size=\"micro\" />\n </ng-container>\n </div>\n</ng-template>\n\n<div\n *ngIf=\"errorMessage\"\n class=\"form-message error\">\n <ap-symbol\n symbolId=\"alert-circle\"\n size=\"micro\" />\n <span>\n {{ errorMessage }}\n </span>\n</div>\n\n<div\n *ngIf=\"successMessage\"\n class=\"form-message success\">\n <ap-symbol\n symbolId=\"check-circle\"\n size=\"micro\" />\n <span>\n {{ successMessage }}\n </span>\n</div>\n", styles: ["ap-select{--placeholder-padding-left: 0px;display:flex;flex-direction:column;position:relative;gap:var(--ref-spacing-xxs);font-family:var(--ref-font-family);font-size:var(--ref-font-size-sm)}ap-select.inline .inline-label{display:flex;align-items:center;position:absolute;z-index:10000;top:0;left:0;height:100%;padding-left:var(--ref-spacing-xs);box-sizing:border-box;color:var(--comp-select-inline-label-text-color)}ap-select.inline .inline-label:hover{cursor:pointer}ap-select.inline .inline-label .label{display:flex;z-index:10;font-size:var(--comp-select-inline-label-text-size);line-height:var(--comp-select-inline-label-text-line-height);font-family:var(--comp-select-inline-label-text-font-family);font-weight:var(--comp-select-inline-label-text-font-weight);color:var(--comp-select-inline-label-text-color)}ap-select.inline .inline-label .label:hover{cursor:pointer}ap-select.inline .inline-label .label span{width:-moz-fit-content;width:fit-content}ap-select.inline .inline-label .divider{height:18px;max-height:18px;width:1px;margin:0 8px;background-color:var(--comp-select-separator-color);border-radius:1px}ap-select.inline .ng-select .ng-value-container{padding-left:calc(var(--placeholder-padding-left))!important}ap-select.hovered .ng-select-container{border-color:var(--ref-color-grey-40)!important}ap-select label{display:flex;flex-direction:column;gap:var(--comp-forms-label-spacing-vertical);font-size:var(--comp-forms-label-size);font-weight:var(--comp-forms-label-font-weight);line-height:var(--comp-forms-label-line-height);font-family:var(--comp-forms-label-font-family);color:var(--comp-forms-label-text-color)}ap-select label .description{font-size:var(--comp-forms-label-description-text-size);font-weight:var(--comp-forms-label-description-text-font-weight);line-height:var(--comp-forms-label-description-text-line-height);font-family:var(--comp-forms-label-description-text-font-family);color:var(--comp-forms-label-description-text-color)}ap-select.invalid:not([disabled]):not(.transparent) .ng-select-container,ap-select.ng-invalid.ng-dirty.ng-touched:not([disabled]):not(.transparent) .ng-select-container{border-color:var(--comp-input-border-error-color)}ap-select.valid:not([disabled]):not(.transparent) .ng-select-container{border:1px solid var(--comp-input-border-success-color)}.ng-select.ap-select .ng-select-container{border-color:var(--ref-color-grey-20)}.ng-select.ap-select .ng-select-container:hover{box-shadow:none;cursor:pointer;border-color:var(--ref-color-grey-40)!important}.ng-select.ap-select .ng-select-container .ng-value-container{overflow-x:auto;overflow-y:hidden}.ng-select.ap-select .ng-select-container .ng-value-container:hover,.ng-select.ap-select .ng-select-container .ng-value-container input:hover{cursor:pointer}.ng-select.ap-select.ng-select-opened.ng-select-bottom .ng-select-container,.ng-select.ap-select.ng-select-opened.ng-select-top .ng-select-container{border-radius:var(--ref-border-radius-sm);border-color:var(--ref-color-grey-20)}.ng-select.ap-select.ng-select-opened .ng-arrow{border-color:transparent transparent var(--ref-color-electric-blue-100)}.ng-select.ap-select.ng-select-opened .ng-select-container:hover{border-color:var(--ref-color-electric-blue-100)!important}.ng-select.ap-select.ng-select-single .ng-value-container .ng-value{overflow:visible!important;width:100%;display:flex}.ng-select.ap-select.ng-select-single .ng-value-container .ng-value span.text-item{display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding-right:var(--ref-spacing-xxs)}.ng-select.ap-select.ng-select-single .ng-value-container .ng-value span{display:inline-block}.ng-select.ap-select.ng-select-single .ng-value-container .ng-value ap-tag{width:100%;margin-right:var(--ref-spacing-xxs)}.ng-select.ap-select.ng-select-single .ng-value-container .ng-value ap-tag div{overflow:auto}.ng-select.ap-select.ng-select-single .ng-value-container .ng-value ap-label{margin-right:var(--ref-spacing-xxs)}.ng-select.ap-select.ng-select-single .ng-value-container .ng-value ap-label .label{overflow:auto}.ng-select.ap-select.ng-select-multiple .ng-select-container .ng-value-container{padding-left:12px;flex-wrap:nowrap;overflow:hidden}.ng-select.ap-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{top:0!important}.ng-select.ap-select.ng-select-disabled .ng-select-container{background-color:var(--ref-color-grey-20);border-color:var(--ref-color-grey-20);color:var(--ref-color-grey-100)}.ng-select.ap-select.ng-select-disabled .ng-select-container:hover{cursor:default!important;background-color:var(--ref-color-grey-20)!important;border-color:var(--ref-color-grey-20)!important}.ng-select.ap-select.ng-select-disabled .ng-select-container .ng-placeholder{color:var(--ref-color-grey-60)!important}.ng-select.ap-select.ng-select-disabled .ng-select-container .ng-value-container:hover{cursor:default!important}.ng-select.ap-select .ng-value-container{padding-left:12px;height:100%;position:relative;padding-top:0!important}.ng-select.ap-select .ng-value-container .ng-placeholder{position:absolute;padding-left:0!important;color:var(--ref-color-grey-60);font-weight:var(--ref-font-weight-regular);font-size:var(--ref-font-size-sm);line-height:var(--ref-font-line-height-sm)}.ng-select.ap-select .ng-value-container .multiple-item{display:flex;align-items:center;gap:var(--ref-spacing-xxxs)}.ng-select.ap-select .ng-value-container .multiple-item .item{visibility:hidden}.ng-select.ap-select .ng-value-container .multiple-item .text-item{color:var(--ref-color-grey-100);font-size:var(--ref-font-size-sm);line-height:var(--ref-font-line-height-sm)}.ng-select.ap-select .ng-value-container .with-avatar{display:flex;align-items:center;gap:var(--ref-spacing-xxxs)}.ng-select.ap-select .ng-value-container .ng-value{margin:0!important}.ng-select.ap-select .ng-value-container .ng-input{position:unset!important;padding:0!important;height:100%!important}.ng-select.ap-select .ng-value-container .ng-input input{height:100%;color:var(--ref-color-grey-100)!important;caret-color:var(--ref-color-grey-100)!important;border-radius:unset}.ng-select.ap-select.with-error .ng-select-container{border-color:var(--comp-input-border-error-color)}.ng-select.ap-select.with-success .ng-select-container{border-color:var(--comp-input-border-success-color)}.ng-dropdown-panel.ap-select,.ap-select .ng-select-container+.ng-dropdown-panel{overflow:hidden;border:none;box-shadow:var(--comp-select-shadow);padding:var(--comp-select-padding-vertical) 0;background-color:var(--comp-select-background-color)}.ng-dropdown-panel.ap-select.ng-select-bottom,.ap-select .ng-select-container+.ng-dropdown-panel.ng-select-bottom{margin-top:var(--ref-spacing-xxxs);border-radius:var(--ref-border-radius-sm)}.ng-dropdown-panel.ap-select .ng-option,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option{box-sizing:border-box;padding:0;position:relative}.ng-dropdown-panel.ap-select .ng-option .ng-option-label,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option .ng-option-label{padding:0}.ng-dropdown-panel.ap-select .ng-option.ng-option-child,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-child{padding-left:0}.ng-dropdown-panel.ap-select .ng-option:hover:not(.ng-option-disabled) .option,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option:hover:not(.ng-option-disabled) .option{background-color:var(--ref-color-electric-blue-10)}.ng-dropdown-panel.ap-select .ng-option:active:not(.ng-option-disabled) .option,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option:active:not(.ng-option-disabled) .option{background-color:var(--ref-color-electric-blue-20)}.ng-dropdown-panel.ap-select .ng-option:focus:not(.ng-option-disabled) .option,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option:focus:not(.ng-option-disabled) .option{background-color:var(--ref-color-electric-blue-20)}.ng-dropdown-panel.ap-select .ng-option.ng-option-selected,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected{background-color:transparent}.ng-dropdown-panel.ap-select .ng-option.ng-option-selected .option,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected .option{font-family:var(--comp-select-one-line-selected-text-font-family);font-size:var(--comp-select-one-line-selected-text-size);line-height:var(--comp-select-one-line-selected-text-line-height);font-weight:var(--comp-select-one-line-selected-text-font-weight)}.ng-dropdown-panel.ap-select .ng-option.ng-option-selected .option:not(.multiple),.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected .option:not(.multiple){background-color:var(--ref-color-electric-blue-10);color:var(--ref-color-electric-blue-150)}.ng-dropdown-panel.ap-select .ng-option.ng-option-selected .option:not(.multiple) .label,.ng-dropdown-panel.ap-select .ng-option.ng-option-selected .option:not(.multiple) .caption,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected .option:not(.multiple) .label,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected .option:not(.multiple) .caption{color:var(--ref-color-electric-blue-150)}.ng-dropdown-panel.ap-select .ng-option.ng-option-selected .option .label,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected .option .label{font-family:var(--comp-select-one-line-selected-text-font-family);font-size:var(--comp-select-one-line-selected-text-size);line-height:var(--comp-select-one-line-selected-text-line-height);font-weight:var(--comp-select-one-line-selected-text-font-weight);color:var(--ref-color-grey-100)}.ng-dropdown-panel.ap-select .ng-option.ng-option-selected.ng-option-marked,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected.ng-option-marked{background-color:transparent}.ng-dropdown-panel.ap-select .ng-option.ng-option-selected.ng-option-marked .option,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected.ng-option-marked .option{background-color:var(--ref-color-electric-blue-10)}.ng-dropdown-panel.ap-select .ng-option.ng-option-selected.ng-option-marked .option span,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected.ng-option-marked .option span{color:var(--ref-color-electric-blue-150)}.ng-dropdown-panel.ap-select .ng-option.ng-option-marked,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-marked{background-color:transparent}.ng-dropdown-panel.ap-select .ng-option.ng-option-marked:hover,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-marked:hover{background-color:transparent}.ng-dropdown-panel.ap-select .ng-option.ng-option-marked .option span,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-marked .option span{color:var(--ref-color-grey-100)}.ng-dropdown-panel.ap-select .ng-option.ng-option-marked .option .label,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-marked .option .label{color:var(--ref-color-grey-100)}.ng-dropdown-panel.ap-select .ng-option.ng-option-marked .option .caption,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-marked .option .caption{color:var(--ref-color-grey-80)}.ng-dropdown-panel.ap-select .ng-option.ng-option-marked .option.multiple .label,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-marked .option.multiple .label{color:var(--ref-color-grey-100)}.ng-dropdown-panel.ap-select .ng-option.ng-option-marked .option.multiple .caption,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-marked .option.multiple .caption{color:var(--ref-color-grey-80)}.ng-dropdown-panel.ap-select .ng-option.ng-option-disabled,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-disabled{color:var(--ref-color-grey-40)}.ng-dropdown-panel.ap-select .ng-option.ng-option-disabled .disabled-opaque,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-disabled .disabled-opaque{position:absolute;inset:0;opacity:.6;background-color:var(--ref-color-white);cursor:default;width:100%;height:100%;z-index:999}.ng-dropdown-panel.ap-select .loading-state,.ap-select .ng-select-container+.ng-dropdown-panel .loading-state{display:flex;justify-content:center;align-items:center;flex-direction:column;gap:var(--ref-spacing-xxs);min-height:90px;max-height:90px;padding:var(--ref-spacing-md) var(--ref-spacing-sm) var(--ref-spacing-sm);box-sizing:border-box}.ng-dropdown-panel.ap-select .loading-state span,.ap-select .ng-select-container+.ng-dropdown-panel .loading-state span{font-size:var(--ref-font-size-sm);line-height:var(--ref-font-line-height-sm);font-style:italic;font-weight:var(--ref-font-weight-regular);color:var(--ref-color-grey-80)}.ng-dropdown-panel.ap-select .group,.ap-select .ng-select-container+.ng-dropdown-panel .group{display:flex;align-items:center;width:100%;gap:var(--ref-spacing-xxs);padding:var(--comp-select-group-padding-horizontal) var(--comp-select-group-padding-vertical)}.ng-dropdown-panel.ap-select .group ap-checkbox,.ap-select .ng-select-container+.ng-dropdown-panel .group ap-checkbox{width:100%}.ng-dropdown-panel.ap-select .group ap-checkbox .checkbox,.ap-select .ng-select-container+.ng-dropdown-panel .group ap-checkbox .checkbox{width:100%}.ng-dropdown-panel.ap-select .group ap-checkbox .checkbox label,.ap-select .ng-select-container+.ng-dropdown-panel .group ap-checkbox .checkbox label{display:flex;gap:var(--ref-spacing-xxs);flex:1}.ng-dropdown-panel.ap-select .divider,.ap-select .ng-select-container+.ng-dropdown-panel .divider{width:100%;height:1px;background-color:var(--comp-select-separator-color);margin:var(--ref-spacing-xxs) 0}.ng-dropdown-panel.ap-select .create-new,.ap-select .ng-select-container+.ng-dropdown-panel .create-new{display:flex;align-items:center;border:none;width:100%;background-color:transparent;gap:var(--ref-spacing-xxxs);color:var(--ref-color-electric-blue-150);font-weight:var(--ref-font-weight-bold);font-family:var(--ref-font-family);cursor:pointer;padding:var(--comp-select-search-bar-bottom-link-margin-top) var(--comp-select-search-bar-bottom-link-padding-horizontal) var(--comp-select-search-bar-bottom-link-padding-bottom) var(--comp-select-search-bar-bottom-link-padding-horizontal);line-height:var(--ref-font-line-height-sm);font-size:var(--ref-font-size-sm)}.ng-dropdown-panel.ap-select .create-new:hover,.ap-select .ng-select-container+.ng-dropdown-panel .create-new:hover{color:var(--ref-color-electric-blue-100)}.ng-dropdown-panel.ap-select .create-new:active,.ap-select .ng-select-container+.ng-dropdown-panel .create-new:active{color:var(--ref-color-electric-blue-150)}.ng-dropdown-panel.ap-select .option,.ap-select .ng-select-container+.ng-dropdown-panel .option{display:flex;align-items:center;box-sizing:border-box;min-height:var(--comp-select-one-line-height);max-height:var(--comp-select-one-line-height);color:var(--comp-select-one-line-text-color);background-color:var(--comp-select-one-line-background-color);font-family:var(--comp-select-one-line-text-font-family);font-size:var(--comp-select-one-line-text-size);font-weight:var(--comp-select-one-line-text-font-weight);line-height:var(--comp-select-one-line-text-line-height);padding:var(--ref-spacing-xxs) var(--comp-select-one-line-padding-horizontal)}.ng-dropdown-panel.ap-select .option ap-checkbox,.ap-select .ng-select-container+.ng-dropdown-panel .option ap-checkbox{width:100%}.ng-dropdown-panel.ap-select .option ap-checkbox .checkbox,.ap-select .ng-select-container+.ng-dropdown-panel .option ap-checkbox .checkbox{width:100%}.ng-dropdown-panel.ap-select .option ap-checkbox .checkbox label,.ap-select .ng-select-container+.ng-dropdown-panel .option ap-checkbox .checkbox label{flex:1;overflow:auto}.ng-dropdown-panel.ap-select .option .option-item,.ap-select .ng-select-container+.ng-dropdown-panel .option .option-item{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:inline-block;flex:1}.ng-dropdown-panel.ap-select .option.not-found,.ap-select .ng-select-container+.ng-dropdown-panel .option.not-found{padding:var(--ref-spacing-xs) var(--ref-spacing-sm) var(--ref-spacing-xxxs) var(--ref-spacing-sm)}.ng-dropdown-panel.ap-select .option .content,.ap-select .ng-select-container+.ng-dropdown-panel .option .content{display:flex;align-items:center;gap:var(--comp-select-one-line-spacing);flex:1;width:100%}.ng-dropdown-panel.ap-select .option .content .item,.ap-select .ng-select-container+.ng-dropdown-panel .option .content .item{flex:1}.ng-dropdown-panel.ap-select .option .content .texts,.ap-select .ng-select-container+.ng-dropdown-panel .option .content .texts{flex:1;overflow:auto;display:flex;flex-direction:column}.ng-dropdown-panel.ap-select .option .content .texts .first-line,.ap-select .ng-select-container+.ng-dropdown-panel .option .content .texts .first-line{display:flex;align-items:center;gap:var(--ref-spacing-xxs)}.ng-dropdown-panel.ap-select .option .content .texts .first-line .label,.ap-select .ng-select-container+.ng-dropdown-panel .option .content .texts .first-line .label{display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.ng-dropdown-panel.ap-select .option .content ap-symbol,.ap-select .ng-select-container+.ng-dropdown-panel .option .content ap-symbol{color:var(--ref-color-electric-blue-100)}.ng-dropdown-panel.ap-select .option .content ap-symbol div.svg,.ap-select .ng-select-container+.ng-dropdown-panel .option .content ap-symbol div.svg{color:var(--ref-color-electric-blue-100)}.ng-dropdown-panel.ap-select .option .label,.ap-select .ng-select-container+.ng-dropdown-panel .option .label{font-family:var(--comp-select-one-line-text-font-family);font-size:var(--comp-select-one-line-text-size);font-weight:var(--comp-select-one-line-text-font-weight);line-height:var(--comp-select-one-line-text-line-height)}.ng-dropdown-panel.ap-select .option.with-caption,.ap-select .ng-select-container+.ng-dropdown-panel .option.with-caption{padding:var(--ref-spacing-xxs) var(--comp-select-one-line-padding-horizontal);min-height:var(--comp-select-two-line-height);max-height:var(--comp-select-two-line-height)}.ng-dropdown-panel.ap-select .option.with-caption .label,.ap-select .ng-select-container+.ng-dropdown-panel .option.with-caption .label{font-weight:var(--comp-select-two-line-title-text-font-weight);font-family:var(--comp-select-two-line-title-text-font-family);font-size:var(--comp-select-two-line-title-text-size);line-height:var(--comp-select-two-line-title-text-line-height);color:var(--comp-select-two-line-title-text-color)}.ng-dropdown-panel.ap-select .option.with-caption .caption,.ap-select .ng-select-container+.ng-dropdown-panel .option.with-caption .caption{font-weight:var(--comp-select-two-line-caption-text-font-weight);font-family:var(--comp-select-two-line-caption-text-font-family);font-size:var(--comp-select-two-line-caption-text-size);line-height:var(--comp-select-two-line-caption-text-line-height);color:var(--comp-select-two-line-caption-text-color);display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.ng-dropdown-panel.ap-select .ng-dropdown-panel-items,.ap-select .ng-select-container+.ng-dropdown-panel .ng-dropdown-panel-items{padding:0}.ng-dropdown-panel.ap-select .ng-optgroup,.ap-select .ng-select-container+.ng-dropdown-panel .ng-optgroup{display:flex;align-items:center;padding:0}.ng-dropdown-panel.ap-select .ng-optgroup:first-child .with-search,.ng-dropdown-panel.ap-select .ng-optgroup:first-child .with-select-all,.ap-select .ng-select-container+.ng-dropdown-panel .ng-optgroup:first-child .with-search,.ap-select .ng-select-container+.ng-dropdown-panel .ng-optgroup:first-child .with-select-all{border:none}.ng-dropdown-panel.ap-select .ng-optgroup .group,.ap-select .ng-select-container+.ng-dropdown-panel .ng-optgroup .group{display:flex;width:100%;height:100%;background-color:var(--comp-select-group-background-color);min-height:32px;box-sizing:border-box;max-height:50px;padding:var(--comp-select-group-padding-vertical) var(--comp-select-group-padding-horizontal);border-top:1px solid var(--comp-select-group-border-top-color)}.ng-dropdown-panel.ap-select .ng-optgroup .group .group-label,.ap-select .ng-select-container+.ng-dropdown-panel .ng-optgroup .group .group-label{font-weight:var(--comp-select-group-text-font-weight);font-size:var(--comp-select-group-text-size);line-height:var(--comp-select-group-text-line-height);font-family:var(--comp-select-group-text-font-family);color:var(--comp-select-group-text-color)}.ng-dropdown-panel.ap-select .ng-dropdown-header,.ap-select .ng-select-container+.ng-dropdown-panel .ng-dropdown-header{padding:0 var(--comp-select-search-bar-padding-horizontal) var(--comp-select-search-bar-margin-bottom) var(--comp-select-search-bar-padding-horizontal);border-bottom:1px solid var(--comp-select-search-bar-border-bottom-color)}.ng-dropdown-panel.ap-select .ng-dropdown-header .select-all-checkbox,.ap-select .ng-select-container+.ng-dropdown-panel .ng-dropdown-header .select-all-checkbox{padding-left:var(--ref-spacing-xxs);height:var(--comp-select-one-line-height)}.ng-dropdown-panel.ap-select .ng-dropdown-footer,.ap-select .ng-select-container+.ng-dropdown-panel .ng-dropdown-footer{cursor:pointer;padding:0;border-top:1px solid var(--ref-color-grey-10)}.ng-dropdown-panel.ap-select .standalone-link,.ap-select .ng-select-container+.ng-dropdown-panel .standalone-link{color:var(--ref-color-electric-blue-150);font-weight:var(--ref-font-weight-bold);font-family:var(--ref-font-family);background-color:transparent;border:none;line-height:var(--ref-font-line-height-sm);font-size:var(--ref-font-size-sm);cursor:pointer}.ng-dropdown-panel.ap-select .standalone-link:hover,.ap-select .ng-select-container+.ng-dropdown-panel .standalone-link:hover{color:var(--ref-color-electric-blue-100)}.ng-dropdown-panel.ap-select .standalone-link:active,.ap-select .ng-select-container+.ng-dropdown-panel .standalone-link:active{color:var(--ref-color-electric-blue-150)}.form-message{font-size:var(--comp-forms-status-text-size);font-weight:var(--comp-forms-status-text-font-weight);line-height:var(--comp-forms-status-text-line-height);font-family:var(--comp-forms-status-text-font-family);margin:0;display:flex;gap:var(--ref-spacing-xxxs)}.form-message.error{color:var(--comp-forms-status-text-error-color)}.form-message.error ap-symbol{color:var(--comp-forms-status-icon-error-color)}.form-message.success{color:var(--comp-forms-status-text-success-color)}.form-message.success ap-symbol{color:var(--comp-forms-status-icon-success-color)}form.ng-submitted ap-select.ng-valid .ng-select-container{border-color:var(--comp-input-border-success-color)}form.ng-submitted ap-select.ng-invalid .ng-select-container{border-color:var(--comp-input-border-error-color)}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i2.NgOptgroupTemplateDirective, selector: "[ng-optgroup-tmp]" }, { kind: "directive", type: i2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i2.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "directive", type: i2.NgMultiLabelTemplateDirective, selector: "[ng-multi-label-tmp]" }, { kind: "directive", type: i2.NgHeaderTemplateDirective, selector: "[ng-header-tmp]" }, { kind: "directive", type: i2.NgFooterTemplateDirective, selector: "[ng-footer-tmp]" }, { kind: "directive", type: i2.NgNotFoundTemplateDirective, selector: "[ng-notfound-tmp]" }, { kind: "directive", type: i2.NgLoadingTextTemplateDirective, selector: "[ng-loadingtext-tmp]" }, { kind: "directive", type: i2.NgLoadingSpinnerTemplateDirective, selector: "[ng-loadingspinner-tmp]" }, { kind: "component", type: InputComponent, selector: "ap-input", inputs: ["ariaLabel", "ariaLabelledBy", "ariaDescribedBy", "disabled", "clearable", "inputType", "inputId", "name", "label", "description", "prefix", "suffix", "required", "placeholder", "errorMessage", "successMessage", "symbolId", "symbolPosition"], outputs: ["focus", "blur", "keyup"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }, { kind: "component", type: CheckboxComponent, selector: "ap-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "disabled", "indeterminate", "checked", "required", "name"], outputs: ["change"] }, { kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["alternativeText", "anonymous", "username", "network", "online", "profilePicture", "showInitials", "alt", "rounded", "size"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LabelComponent, selector: "ap-label", inputs: ["content", "selectorWidth", "removable"], outputs: ["remove"] }, { kind: "component", type: TagComponent, selector: "ap-tag", inputs: ["clearable", "color"], outputs: ["clear"] }, { kind: "component", type: BadgeComponent, selector: "ap-badge", inputs: ["color"] }, { kind: "component", type: LoaderComponent, selector: "ap-loader", inputs: ["color", "diameter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
390
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: SelectLabelMultipleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
391
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.10", type: SelectLabelMultipleComponent, isStandalone: true, selector: "ap-select-label-multiple", inputs: { _displayType: ["displayType", "_displayType"], _selectedItems: ["selectedItems", "_selectedItems"], _bindLabel: ["bindLabel", "_bindLabel"], _bindValue: ["bindValue", "_bindValue"], _bindAvatarUrl: ["bindAvatarUrl", "_bindAvatarUrl"] }, outputs: { removeItem: "removeItem" }, ngImport: i0, template: "<div class=\"multiple-item\">\n <ng-container *ngFor=\"let item of selectedLabels(); trackBy: trackByItem\">\n <ap-label\n *ngIf=\"displayTypeSignal() === 'label'\"\n class=\"item\"\n color=\"blue\"\n removable=\"true\"\n [content]=\"item.label\"\n (remove)=\"removeItem.emit(item.value)\" />\n <ap-tag\n *ngIf=\"displayTypeSignal() === 'tag'\"\n class=\"item text-item\"\n clearable=\"true\"\n color=\"grey\"\n (clear)=\"removeItem.emit(item.value)\">\n <ap-avatar\n *ngIf=\"item.avatarUrl\"\n [size]=\"16\"\n [profilePicture]=\"item.avatarUrl\"\n [username]=\"item.label\"\n [showInitials]=\"true\" />\n {{ item.label }}\n </ap-tag>\n </ng-container>\n</div>\n<div\n *ngIf=\"hiddenCountSignal() > 0\"\n class=\"remaining\">\n <ap-tag\n *ngIf=\"displayTypeSignal() === 'tag'\"\n class=\"text-item\"\n color=\"grey\"\n clearable=\"false\">\n +{{ hiddenCountSignal() }}\n </ap-tag>\n <ap-label\n *ngIf=\"displayTypeSignal() === 'label'\"\n color=\"blue\"\n removable=\"false\"\n [content]=\"'+' + hiddenCountSignal()\" />\n</div>\n", styles: ["ap-select-label-multiple{display:flex}\n"], dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LabelComponent, selector: "ap-label", inputs: ["content", "selectorWidth", "removable"], outputs: ["remove"] }, { kind: "component", type: TagComponent, selector: "ap-tag", inputs: ["clearable", "color"], outputs: ["clear"] }, { kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["alternativeText", "anonymous", "username", "network", "online", "profilePicture", "showInitials", "alt", "rounded", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
321
392
|
}
|
|
322
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type:
|
|
393
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: SelectLabelMultipleComponent, decorators: [{
|
|
323
394
|
type: Component,
|
|
324
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush,
|
|
325
|
-
|
|
326
|
-
NgFor,
|
|
327
|
-
ReactiveFormsModule,
|
|
328
|
-
FormsModule,
|
|
329
|
-
NgSelectModule,
|
|
330
|
-
InputComponent,
|
|
331
|
-
SymbolComponent,
|
|
332
|
-
AsyncPipe,
|
|
333
|
-
SlicePipe,
|
|
334
|
-
CheckboxComponent,
|
|
335
|
-
AvatarComponent,
|
|
336
|
-
NgTemplateOutlet,
|
|
337
|
-
LabelComponent,
|
|
338
|
-
TagComponent,
|
|
339
|
-
BadgeComponent,
|
|
340
|
-
LoaderComponent,
|
|
341
|
-
], providers: [SELECT_VALUE_ACCESSOR], encapsulation: ViewEncapsulation.None, template: "<label\n *ngIf=\"label && !inlineLabel\"\n [for]=\"selectId\">\n <span>\n {{ label }}\n </span>\n <span\n *ngIf=\"description\"\n class=\"description\">\n {{ description }}\n </span>\n</label>\n\n<div\n *ngIf=\"inlineLabel\"\n #inlineLabel\n tabindex=\"0\"\n class=\"inline-label\"\n (click)=\"onOpenSelect()\"\n (keydown.enter)=\"onOpenSelect()\"\n (mouseenter)=\"onInlineInputEnter()\"\n (mouseleave)=\"onInlineInputLeave()\">\n <label\n *ngIf=\"label && inlineLabel\"\n class=\"label\"\n [for]=\"selectId\">\n <span>\n {{ label }}\n </span>\n </label>\n <div class=\"divider\"></div>\n</div>\n\n<ng-select\n #select\n class=\"ap-select\"\n [tabIndex]=\"0\"\n [clearable]=\"clearable\"\n [placeholder]=\"placeholder\"\n [labelForId]=\"selectId\"\n [searchable]=\"false\"\n [closeOnSelect]=\"!multiple\"\n [bindValue]=\"optionValue ? optionValue : ''\"\n [groupBy]=\"group ? optionGroupLabel : ''\"\n [multiple]=\"multiple\"\n [disabled]=\"disabled\"\n [markFirst]=\"false\"\n [selectableGroup]=\"selectableGroup\"\n [selectableGroupAsModel]=\"false\"\n [appendTo]=\"appendTo\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.aria-describedby]=\"ariaDescribedBy || null\"\n [attr.aria-disabled]=\"disabled?.toString()\"\n [items]=\"optionsSignal()\"\n [compareWith]=\"compareWith\"\n [loading]=\"loadingSignal()\"\n [ngModel]=\"selectedValuesSignal()\"\n [class.with-error]=\"errorMessage\"\n [class.with-success]=\"successMessage\"\n (ngModelChange)=\"onSelectedValuesChange($event)\"\n (open)=\"onSelectOpened()\">\n <ng-container *ngIf=\"searchable || selectAll\">\n <ng-template\n let-item=\"item\"\n ng-header-tmp>\n <ng-container *ngIf=\"searchable\">\n <ap-input\n #searchInput\n tabindex=\"0\"\n name=\"search-input\"\n class=\"full-width\"\n symbolId=\"search-alternate\"\n symbolPosition=\"right\"\n [placeholder]=\"searchPlaceholder\"\n [ngModel]=\"searchTermSignal()\"\n (ngModelChange)=\"onSearchTermChange($event)\" />\n </ng-container>\n <ng-container *ngIf=\"selectAll\">\n <ap-checkbox\n class=\"select-all-checkbox\"\n name=\"option-group-select-all\"\n [indeterminate]=\"partialySelectedSignal()\"\n [checked]=\"allSelectedSignal()\"\n (click)=\"onToggleAll()\">\n <span>\n {{ partialySelectedSignal() || allSelectedSignal() ? unselectAllText : selectAllText }}\n </span>\n </ap-checkbox>\n </ng-container>\n </ng-template>\n </ng-container>\n <ng-template\n let-item=\"item\"\n let-item$=\"item$\"\n ng-optgroup-tmp>\n <div\n class=\"group\"\n [class.with-search]=\"searchable\"\n [class.with-select-all]=\"selectAll\">\n <ng-container *ngIf=\"!multiple\">\n <span class=\"group-label\">\n {{ item[optionGroupLabel] }}\n </span>\n <ap-badge\n *ngIf=\"optionGroupTag && optionGroupTag[item[optionGroupLabel]]\"\n color=\"blue\">\n {{ optionGroupTag[item[optionGroupLabel]] }}\n </ap-badge>\n </ng-container>\n <ng-container *ngIf=\"multiple\">\n <ap-checkbox\n *ngIf=\"selectableGroup\"\n [name]=\"'option-group-selection-' + item['group']\"\n [indeterminate]=\"isGroupIndeterminate(item$.children)\"\n [checked]=\"isGroupChecked(item$.children)\">\n <span class=\"group-label\">\n {{ item[optionGroupLabel] }}\n </span>\n <ap-badge\n *ngIf=\"optionGroupTag && optionGroupTag[item[optionGroupLabel]]\"\n color=\"blue\">\n {{ optionGroupTag[item[optionGroupLabel]] }}\n </ap-badge>\n </ap-checkbox>\n <span\n *ngIf=\"!selectableGroup\"\n class=\"group-label\">\n {{ item[optionGroupLabel] }}\n </span>\n </ng-container>\n </div>\n </ng-template>\n <ng-template\n let-items=\"items\"\n let-item$=\"item$\"\n ng-multi-label-tmp>\n <ng-container>\n <div class=\"multiple-item\">\n <ng-container *ngIf=\"!customMultiLabelTemplate\">\n <ng-container *ngFor=\"let item of items\">\n <ng-container *ngIf=\"optionLabel && item[optionLabel]\">\n <ng-container *ngIf=\"displayTypeSignal() === 'text' || !displayTypeSignal()\">\n <span\n class=\"item text-item\"\n [title]=\"item[optionLabel]\">\n {{ item[optionLabel] }}\n </span>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'label'\">\n <ap-label\n color=\"blue\"\n class=\"item\"\n removable=\"true\"\n [content]=\"item[optionLabel]\"\n (remove)=\"removeSelectedItem($event, item)\" />\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'tag'\">\n <ap-tag\n class=\"item text-item\"\n clearable=\"true\"\n (clear)=\"removeSelectedItem($event, item)\">\n <ap-avatar\n *ngIf=\"optionProfileImageUrl\"\n size=\"24\"\n [profilePicture]=\"item[optionProfileImageUrl] ?? ''\"\n [username]=\"optionLabel && item[optionLabel] ? item[optionLabel] : ''\"\n [showInitials]=\"true\" />\n {{ item[optionLabel] }}\n </ap-tag>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'withAvatar'\">\n <div class=\"item with-avatar\">\n <ap-avatar\n *ngIf=\"optionProfileImageUrl\"\n size=\"24\"\n [profilePicture]=\"item[optionProfileImageUrl] ?? ''\"\n [username]=\"optionLabel && item[optionLabel] ? item[optionLabel] : ''\"\n [showInitials]=\"true\" />\n <span\n class=\"text-item\"\n [title]=\"item[optionLabel]\">\n {{ item[optionLabel] }}\n </span>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!optionLabel || !item[optionLabel]\">\n <ng-container *ngIf=\"displayTypeSignal() === 'text' || !displayTypeSignal()\">\n <span\n class=\"item text-item\"\n [title]=\"item\">\n {{ item }}\n </span>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'label'\">\n <ap-label\n class=\"item\"\n color=\"blue\"\n [removable]=\"multiple\"\n [content]=\"item\"\n (remove)=\"removeSelectedItem($event, item)\" />\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'tag'\">\n <ap-tag\n class=\"item text-item\"\n [clearable]=\"multiple\"\n (clear)=\"removeSelectedItem($event, item)\">\n {{ item }}\n </ap-tag>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'withAvatar'\">\n <div class=\"item with-avatar\">\n <ap-avatar\n *ngIf=\"optionProfileImageUrl\"\n size=\"24\"\n [profilePicture]=\"item[optionProfileImageUrl] ?? ''\"\n [username]=\"optionLabel && item[optionLabel] ? item[optionLabel] : ''\"\n [showInitials]=\"true\" />\n <span class=\"text-item\">\n {{ item }}\n </span>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"customMultiLabelTemplate\">\n <ng-container *ngTemplateOutlet=\"customMultiLabelTemplate; context: { options: items }\" />\n </ng-container>\n </div>\n <div\n *ngIf=\"hiddenCountSignal() > 0\"\n class=\"remaining\">\n <ng-container *ngIf=\"displayTypeSignal() === 'text' || displayTypeSignal() === 'withAvatar' || !displayTypeSignal()\">\n <span class=\"text-item\">+{{ hiddenCountSignal() }}</span>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'tag'\">\n <ap-tag\n class=\"text-item\"\n clearable=\"false\">\n +{{ hiddenCountSignal() }}\n </ap-tag>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'label'\">\n <ap-label\n color=\"blue\"\n [removable]=\"false\"\n [content]=\"'+' + hiddenCountSignal()\" />\n </ng-container>\n </div>\n </ng-container>\n </ng-template>\n <ng-template ng-loadingtext-tmp>\n <div class=\"loading-state\">\n <ap-loader diameter=\"30\" />\n <span>\n {{ loadingText }}\n </span>\n </div>\n </ng-template>\n <ng-template ng-loadingspinner-tmp></ng-template>\n <ng-container *ngIf=\"create\">\n <ng-template ng-footer-tmp>\n <button\n class=\"create-new\"\n type=\"button\"\n (click)=\"onCreateNew()\">\n <ap-symbol\n symbolId=\"add-2022\"\n size=\"micro\" />\n <span>\n {{ createText }}\n </span>\n <ng-container *ngIf=\"searchTermSignal()\">\"{{ searchTermSignal() }}\"</ng-container>\n </button>\n </ng-template>\n </ng-container>\n <ng-template\n let-item=\"item\"\n let-item$=\"item$\"\n ng-option-tmp>\n <ng-container\n *ngIf=\"(!optionLabel || !item[optionLabel]) && item && (!optionDivider || !item[optionDivider]) && !customOptionTemplate\">\n <div class=\"option\">\n <span\n class=\"option-item\"\n [title]=\"item\">\n {{ item }}\n </span>\n <ng-container *ngIf=\"item$.selected && !multiple\">\n <ap-symbol\n symbolId=\"check-2\"\n color=\"electric-blue\"\n size=\"micro\" />\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf=\"(optionLabel && item[optionLabel]) || customOptionTemplate\">\n <div\n class=\"option\"\n [class.with-caption]=\"optionCaption && item[optionCaption]\"\n [class.multiple]=\"multiple\"\n (mouseenter)=\"onHoverItem(item$.htmlId)\"\n (mouseleave)=\"onLeaveItem()\">\n <ng-container *ngTemplateOutlet=\"contentItem; context: { item: item, item$: item$ }\" />\n </div>\n </ng-container>\n <ng-container *ngIf=\"optionDivider && item[optionDivider]\">\n <div class=\"divider\"></div>\n </ng-container>\n </ng-template>\n <ng-template\n let-item=\"item\"\n ng-label-tmp>\n <ng-container *ngIf=\"customLabelTemplate\">\n <ng-container *ngTemplateOutlet=\"customLabelTemplate; context: { option: item }\" />\n </ng-container>\n <ng-container *ngIf=\"!optionLabel && !customLabelTemplate\">\n <ng-container *ngIf=\"displayTypeSignal() === 'text' || !displayTypeSignal()\">\n <span\n class=\"text-item\"\n [title]=\"item\">\n {{ item }}\n </span>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'label'\">\n <ap-label\n color=\"blue\"\n [removable]=\"multiple\"\n [content]=\"item\"\n (remove)=\"removeSelectedItem($event, item)\" />\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'tag'\">\n <ap-tag\n class=\"text-item\"\n [clearable]=\"multiple\"\n (clear)=\"removeSelectedItem($event, item)\">\n {{ item }}\n </ap-tag>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'withAvatar'\">\n <span class=\"text-item\">\n {{ item }}\n </span>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"optionLabel && !customLabelTemplate\">\n <ng-container *ngIf=\"displayTypeSignal() === 'text' || !displayTypeSignal()\">\n <span class=\"text-item\">\n {{ item[optionLabel] }}\n </span>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'label'\">\n <ap-label\n color=\"blue\"\n [removable]=\"multiple\"\n [content]=\"item[optionLabel]\"\n (remove)=\"removeSelectedItem($event, item)\" />\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'tag'\">\n <ap-tag\n class=\"text-item\"\n [clearable]=\"multiple\"\n [title]=\"item[optionLabel]\"\n (clear)=\"removeSelectedItem($event, item)\">\n <ap-avatar\n *ngIf=\"optionProfileImageUrl\"\n size=\"24\"\n [profilePicture]=\"item[optionProfileImageUrl] ?? ''\"\n [username]=\"optionLabel && item[optionLabel] ? item[optionLabel] : ''\"\n [showInitials]=\"true\" />\n {{ item[optionLabel] }}\n </ap-tag>\n </ng-container>\n <ng-container *ngIf=\"displayTypeSignal() === 'withAvatar'\">\n <div class=\"with-avatar\">\n <ap-avatar\n *ngIf=\"optionProfileImageUrl\"\n size=\"24\"\n [profilePicture]=\"item[optionProfileImageUrl] ?? ''\"\n [username]=\"optionLabel && item[optionLabel] ? item[optionLabel] : ''\"\n [showInitials]=\"true\" />\n <span\n class=\"text-item\"\n [title]=\"item[optionLabel]\">\n {{ item[optionLabel] }}\n </span>\n </div>\n </ng-container>\n </ng-container>\n </ng-template>\n <ng-template ng-notfound-tmp>\n <div class=\"option not-found\">\n {{ notFoundText }}\n </div>\n </ng-template>\n</ng-select>\n\n<ng-template\n #contentItem\n let-item=\"item\"\n let-item$=\"item$\">\n <ng-container *ngIf=\"multiple\">\n <div class=\"disabled-opaque\"></div>\n <ap-checkbox\n *ngIf=\"multiple\"\n [checked]=\"item$.selected\"\n [disabled]=\"item$.disabled\"\n [name]=\"'option-selection-' + item$.htmlId\">\n <ng-container *ngTemplateOutlet=\"textItem; context: { item: item, item$: item$ }\" />\n </ap-checkbox>\n </ng-container>\n <ng-container *ngIf=\"!multiple\">\n <div class=\"disabled-opaque\"></div>\n <ng-container *ngTemplateOutlet=\"textItem; context: { item: item, item$: item$ }\" />\n </ng-container>\n</ng-template>\n\n<ng-template\n #textItem\n let-item=\"item\"\n let-item$=\"item$\">\n <div class=\"content\">\n <ng-container *ngIf=\"!customOptionTemplate\">\n <ng-container *ngIf=\"!optionLabel\">\n <span class=\"item\">\n {{ item }}\n </span>\n </ng-container>\n <ng-container *ngIf=\"optionProfileImageUrl\">\n <ap-avatar\n size=\"24\"\n [profilePicture]=\"item[optionProfileImageUrl] ?? ''\"\n [username]=\"optionLabel && item[optionLabel] ? item[optionLabel] : ''\"\n [showInitials]=\"true\" />\n </ng-container>\n <ng-container *ngIf=\"optionLabel && item[optionLabel]\">\n <div class=\"texts\">\n <div class=\"first-line\">\n <span\n class=\"label\"\n [title]=\"item[optionLabel]\">\n {{ item[optionLabel] }}\n </span>\n <ng-container *ngIf=\"optionBadgeLabel && item[optionBadgeLabel]\">\n <ap-badge color=\"blue\">{{ item[optionBadgeLabel] }}</ap-badge>\n </ng-container>\n </div>\n <ng-container *ngIf=\"optionCaption && item[optionCaption]\">\n <span\n class=\"caption\"\n [title]=\"item[optionCaption]\">\n {{ item[optionCaption] }}\n </span>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"customOptionTemplate\">\n <ng-container *ngTemplateOutlet=\"customOptionTemplate; context: { option: item }\" />\n </ng-container>\n <ng-container *ngIf=\"only && !item$.disabled && itemHoveredSignal() === item$.htmlId && multiple\">\n <button\n class=\"standalone-link\"\n type=\"button\"\n (click)=\"onSelectOnly(item)\">\n {{ onlyText }}\n </button>\n </ng-container>\n <ng-container *ngIf=\"item$.selected && !multiple\">\n <ap-symbol\n symbolId=\"check-2\"\n color=\"electric-blue\"\n size=\"micro\" />\n </ng-container>\n </div>\n</ng-template>\n\n<div\n *ngIf=\"errorMessage\"\n class=\"form-message error\">\n <ap-symbol\n symbolId=\"alert-circle\"\n size=\"micro\" />\n <span>\n {{ errorMessage }}\n </span>\n</div>\n\n<div\n *ngIf=\"successMessage\"\n class=\"form-message success\">\n <ap-symbol\n symbolId=\"check-circle\"\n size=\"micro\" />\n <span>\n {{ successMessage }}\n </span>\n</div>\n", styles: ["ap-select{--placeholder-padding-left: 0px;display:flex;flex-direction:column;position:relative;gap:var(--ref-spacing-xxs);font-family:var(--ref-font-family);font-size:var(--ref-font-size-sm)}ap-select.inline .inline-label{display:flex;align-items:center;position:absolute;z-index:10000;top:0;left:0;height:100%;padding-left:var(--ref-spacing-xs);box-sizing:border-box;color:var(--comp-select-inline-label-text-color)}ap-select.inline .inline-label:hover{cursor:pointer}ap-select.inline .inline-label .label{display:flex;z-index:10;font-size:var(--comp-select-inline-label-text-size);line-height:var(--comp-select-inline-label-text-line-height);font-family:var(--comp-select-inline-label-text-font-family);font-weight:var(--comp-select-inline-label-text-font-weight);color:var(--comp-select-inline-label-text-color)}ap-select.inline .inline-label .label:hover{cursor:pointer}ap-select.inline .inline-label .label span{width:-moz-fit-content;width:fit-content}ap-select.inline .inline-label .divider{height:18px;max-height:18px;width:1px;margin:0 8px;background-color:var(--comp-select-separator-color);border-radius:1px}ap-select.inline .ng-select .ng-value-container{padding-left:calc(var(--placeholder-padding-left))!important}ap-select.hovered .ng-select-container{border-color:var(--ref-color-grey-40)!important}ap-select label{display:flex;flex-direction:column;gap:var(--comp-forms-label-spacing-vertical);font-size:var(--comp-forms-label-size);font-weight:var(--comp-forms-label-font-weight);line-height:var(--comp-forms-label-line-height);font-family:var(--comp-forms-label-font-family);color:var(--comp-forms-label-text-color)}ap-select label .description{font-size:var(--comp-forms-label-description-text-size);font-weight:var(--comp-forms-label-description-text-font-weight);line-height:var(--comp-forms-label-description-text-line-height);font-family:var(--comp-forms-label-description-text-font-family);color:var(--comp-forms-label-description-text-color)}ap-select.invalid:not([disabled]):not(.transparent) .ng-select-container,ap-select.ng-invalid.ng-dirty.ng-touched:not([disabled]):not(.transparent) .ng-select-container{border-color:var(--comp-input-border-error-color)}ap-select.valid:not([disabled]):not(.transparent) .ng-select-container{border:1px solid var(--comp-input-border-success-color)}.ng-select.ap-select .ng-select-container{border-color:var(--ref-color-grey-20)}.ng-select.ap-select .ng-select-container:hover{box-shadow:none;cursor:pointer;border-color:var(--ref-color-grey-40)!important}.ng-select.ap-select .ng-select-container .ng-value-container{overflow-x:auto;overflow-y:hidden}.ng-select.ap-select .ng-select-container .ng-value-container:hover,.ng-select.ap-select .ng-select-container .ng-value-container input:hover{cursor:pointer}.ng-select.ap-select.ng-select-opened.ng-select-bottom .ng-select-container,.ng-select.ap-select.ng-select-opened.ng-select-top .ng-select-container{border-radius:var(--ref-border-radius-sm);border-color:var(--ref-color-grey-20)}.ng-select.ap-select.ng-select-opened .ng-arrow{border-color:transparent transparent var(--ref-color-electric-blue-100)}.ng-select.ap-select.ng-select-opened .ng-select-container:hover{border-color:var(--ref-color-electric-blue-100)!important}.ng-select.ap-select.ng-select-single .ng-value-container .ng-value{overflow:visible!important;width:100%;display:flex}.ng-select.ap-select.ng-select-single .ng-value-container .ng-value span.text-item{display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding-right:var(--ref-spacing-xxs)}.ng-select.ap-select.ng-select-single .ng-value-container .ng-value span{display:inline-block}.ng-select.ap-select.ng-select-single .ng-value-container .ng-value ap-tag{width:100%;margin-right:var(--ref-spacing-xxs)}.ng-select.ap-select.ng-select-single .ng-value-container .ng-value ap-tag div{overflow:auto}.ng-select.ap-select.ng-select-single .ng-value-container .ng-value ap-label{margin-right:var(--ref-spacing-xxs)}.ng-select.ap-select.ng-select-single .ng-value-container .ng-value ap-label .label{overflow:auto}.ng-select.ap-select.ng-select-multiple .ng-select-container .ng-value-container{padding-left:12px;flex-wrap:nowrap;overflow:hidden}.ng-select.ap-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{top:0!important}.ng-select.ap-select.ng-select-disabled .ng-select-container{background-color:var(--ref-color-grey-20);border-color:var(--ref-color-grey-20);color:var(--ref-color-grey-100)}.ng-select.ap-select.ng-select-disabled .ng-select-container:hover{cursor:default!important;background-color:var(--ref-color-grey-20)!important;border-color:var(--ref-color-grey-20)!important}.ng-select.ap-select.ng-select-disabled .ng-select-container .ng-placeholder{color:var(--ref-color-grey-60)!important}.ng-select.ap-select.ng-select-disabled .ng-select-container .ng-value-container:hover{cursor:default!important}.ng-select.ap-select .ng-value-container{padding-left:12px;height:100%;position:relative;padding-top:0!important}.ng-select.ap-select .ng-value-container .ng-placeholder{position:absolute;padding-left:0!important;color:var(--ref-color-grey-60);font-weight:var(--ref-font-weight-regular);font-size:var(--ref-font-size-sm);line-height:var(--ref-font-line-height-sm)}.ng-select.ap-select .ng-value-container .multiple-item{display:flex;align-items:center;gap:var(--ref-spacing-xxxs)}.ng-select.ap-select .ng-value-container .multiple-item .item{visibility:hidden}.ng-select.ap-select .ng-value-container .multiple-item .text-item{color:var(--ref-color-grey-100);font-size:var(--ref-font-size-sm);line-height:var(--ref-font-line-height-sm)}.ng-select.ap-select .ng-value-container .with-avatar{display:flex;align-items:center;gap:var(--ref-spacing-xxxs)}.ng-select.ap-select .ng-value-container .ng-value{margin:0!important}.ng-select.ap-select .ng-value-container .ng-input{position:unset!important;padding:0!important;height:100%!important}.ng-select.ap-select .ng-value-container .ng-input input{height:100%;color:var(--ref-color-grey-100)!important;caret-color:var(--ref-color-grey-100)!important;border-radius:unset}.ng-select.ap-select.with-error .ng-select-container{border-color:var(--comp-input-border-error-color)}.ng-select.ap-select.with-success .ng-select-container{border-color:var(--comp-input-border-success-color)}.ng-dropdown-panel.ap-select,.ap-select .ng-select-container+.ng-dropdown-panel{overflow:hidden;border:none;box-shadow:var(--comp-select-shadow);padding:var(--comp-select-padding-vertical) 0;background-color:var(--comp-select-background-color)}.ng-dropdown-panel.ap-select.ng-select-bottom,.ap-select .ng-select-container+.ng-dropdown-panel.ng-select-bottom{margin-top:var(--ref-spacing-xxxs);border-radius:var(--ref-border-radius-sm)}.ng-dropdown-panel.ap-select .ng-option,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option{box-sizing:border-box;padding:0;position:relative}.ng-dropdown-panel.ap-select .ng-option .ng-option-label,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option .ng-option-label{padding:0}.ng-dropdown-panel.ap-select .ng-option.ng-option-child,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-child{padding-left:0}.ng-dropdown-panel.ap-select .ng-option:hover:not(.ng-option-disabled) .option,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option:hover:not(.ng-option-disabled) .option{background-color:var(--ref-color-electric-blue-10)}.ng-dropdown-panel.ap-select .ng-option:active:not(.ng-option-disabled) .option,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option:active:not(.ng-option-disabled) .option{background-color:var(--ref-color-electric-blue-20)}.ng-dropdown-panel.ap-select .ng-option:focus:not(.ng-option-disabled) .option,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option:focus:not(.ng-option-disabled) .option{background-color:var(--ref-color-electric-blue-20)}.ng-dropdown-panel.ap-select .ng-option.ng-option-selected,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected{background-color:transparent}.ng-dropdown-panel.ap-select .ng-option.ng-option-selected .option,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected .option{font-family:var(--comp-select-one-line-selected-text-font-family);font-size:var(--comp-select-one-line-selected-text-size);line-height:var(--comp-select-one-line-selected-text-line-height);font-weight:var(--comp-select-one-line-selected-text-font-weight)}.ng-dropdown-panel.ap-select .ng-option.ng-option-selected .option:not(.multiple),.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected .option:not(.multiple){background-color:var(--ref-color-electric-blue-10);color:var(--ref-color-electric-blue-150)}.ng-dropdown-panel.ap-select .ng-option.ng-option-selected .option:not(.multiple) .label,.ng-dropdown-panel.ap-select .ng-option.ng-option-selected .option:not(.multiple) .caption,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected .option:not(.multiple) .label,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected .option:not(.multiple) .caption{color:var(--ref-color-electric-blue-150)}.ng-dropdown-panel.ap-select .ng-option.ng-option-selected .option .label,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected .option .label{font-family:var(--comp-select-one-line-selected-text-font-family);font-size:var(--comp-select-one-line-selected-text-size);line-height:var(--comp-select-one-line-selected-text-line-height);font-weight:var(--comp-select-one-line-selected-text-font-weight);color:var(--ref-color-grey-100)}.ng-dropdown-panel.ap-select .ng-option.ng-option-selected.ng-option-marked,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected.ng-option-marked{background-color:transparent}.ng-dropdown-panel.ap-select .ng-option.ng-option-selected.ng-option-marked .option,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected.ng-option-marked .option{background-color:var(--ref-color-electric-blue-10)}.ng-dropdown-panel.ap-select .ng-option.ng-option-selected.ng-option-marked .option span,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-selected.ng-option-marked .option span{color:var(--ref-color-electric-blue-150)}.ng-dropdown-panel.ap-select .ng-option.ng-option-marked,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-marked{background-color:transparent}.ng-dropdown-panel.ap-select .ng-option.ng-option-marked:hover,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-marked:hover{background-color:transparent}.ng-dropdown-panel.ap-select .ng-option.ng-option-marked .option span,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-marked .option span{color:var(--ref-color-grey-100)}.ng-dropdown-panel.ap-select .ng-option.ng-option-marked .option .label,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-marked .option .label{color:var(--ref-color-grey-100)}.ng-dropdown-panel.ap-select .ng-option.ng-option-marked .option .caption,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-marked .option .caption{color:var(--ref-color-grey-80)}.ng-dropdown-panel.ap-select .ng-option.ng-option-marked .option.multiple .label,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-marked .option.multiple .label{color:var(--ref-color-grey-100)}.ng-dropdown-panel.ap-select .ng-option.ng-option-marked .option.multiple .caption,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-marked .option.multiple .caption{color:var(--ref-color-grey-80)}.ng-dropdown-panel.ap-select .ng-option.ng-option-disabled,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-disabled{color:var(--ref-color-grey-40)}.ng-dropdown-panel.ap-select .ng-option.ng-option-disabled .disabled-opaque,.ap-select .ng-select-container+.ng-dropdown-panel .ng-option.ng-option-disabled .disabled-opaque{position:absolute;inset:0;opacity:.6;background-color:var(--ref-color-white);cursor:default;width:100%;height:100%;z-index:999}.ng-dropdown-panel.ap-select .loading-state,.ap-select .ng-select-container+.ng-dropdown-panel .loading-state{display:flex;justify-content:center;align-items:center;flex-direction:column;gap:var(--ref-spacing-xxs);min-height:90px;max-height:90px;padding:var(--ref-spacing-md) var(--ref-spacing-sm) var(--ref-spacing-sm);box-sizing:border-box}.ng-dropdown-panel.ap-select .loading-state span,.ap-select .ng-select-container+.ng-dropdown-panel .loading-state span{font-size:var(--ref-font-size-sm);line-height:var(--ref-font-line-height-sm);font-style:italic;font-weight:var(--ref-font-weight-regular);color:var(--ref-color-grey-80)}.ng-dropdown-panel.ap-select .group,.ap-select .ng-select-container+.ng-dropdown-panel .group{display:flex;align-items:center;width:100%;gap:var(--ref-spacing-xxs);padding:var(--comp-select-group-padding-horizontal) var(--comp-select-group-padding-vertical)}.ng-dropdown-panel.ap-select .group ap-checkbox,.ap-select .ng-select-container+.ng-dropdown-panel .group ap-checkbox{width:100%}.ng-dropdown-panel.ap-select .group ap-checkbox .checkbox,.ap-select .ng-select-container+.ng-dropdown-panel .group ap-checkbox .checkbox{width:100%}.ng-dropdown-panel.ap-select .group ap-checkbox .checkbox label,.ap-select .ng-select-container+.ng-dropdown-panel .group ap-checkbox .checkbox label{display:flex;gap:var(--ref-spacing-xxs);flex:1}.ng-dropdown-panel.ap-select .divider,.ap-select .ng-select-container+.ng-dropdown-panel .divider{width:100%;height:1px;background-color:var(--comp-select-separator-color);margin:var(--ref-spacing-xxs) 0}.ng-dropdown-panel.ap-select .create-new,.ap-select .ng-select-container+.ng-dropdown-panel .create-new{display:flex;align-items:center;border:none;width:100%;background-color:transparent;gap:var(--ref-spacing-xxxs);color:var(--ref-color-electric-blue-150);font-weight:var(--ref-font-weight-bold);font-family:var(--ref-font-family);cursor:pointer;padding:var(--comp-select-search-bar-bottom-link-margin-top) var(--comp-select-search-bar-bottom-link-padding-horizontal) var(--comp-select-search-bar-bottom-link-padding-bottom) var(--comp-select-search-bar-bottom-link-padding-horizontal);line-height:var(--ref-font-line-height-sm);font-size:var(--ref-font-size-sm)}.ng-dropdown-panel.ap-select .create-new:hover,.ap-select .ng-select-container+.ng-dropdown-panel .create-new:hover{color:var(--ref-color-electric-blue-100)}.ng-dropdown-panel.ap-select .create-new:active,.ap-select .ng-select-container+.ng-dropdown-panel .create-new:active{color:var(--ref-color-electric-blue-150)}.ng-dropdown-panel.ap-select .option,.ap-select .ng-select-container+.ng-dropdown-panel .option{display:flex;align-items:center;box-sizing:border-box;min-height:var(--comp-select-one-line-height);max-height:var(--comp-select-one-line-height);color:var(--comp-select-one-line-text-color);background-color:var(--comp-select-one-line-background-color);font-family:var(--comp-select-one-line-text-font-family);font-size:var(--comp-select-one-line-text-size);font-weight:var(--comp-select-one-line-text-font-weight);line-height:var(--comp-select-one-line-text-line-height);padding:var(--ref-spacing-xxs) var(--comp-select-one-line-padding-horizontal)}.ng-dropdown-panel.ap-select .option ap-checkbox,.ap-select .ng-select-container+.ng-dropdown-panel .option ap-checkbox{width:100%}.ng-dropdown-panel.ap-select .option ap-checkbox .checkbox,.ap-select .ng-select-container+.ng-dropdown-panel .option ap-checkbox .checkbox{width:100%}.ng-dropdown-panel.ap-select .option ap-checkbox .checkbox label,.ap-select .ng-select-container+.ng-dropdown-panel .option ap-checkbox .checkbox label{flex:1;overflow:auto}.ng-dropdown-panel.ap-select .option .option-item,.ap-select .ng-select-container+.ng-dropdown-panel .option .option-item{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:inline-block;flex:1}.ng-dropdown-panel.ap-select .option.not-found,.ap-select .ng-select-container+.ng-dropdown-panel .option.not-found{padding:var(--ref-spacing-xs) var(--ref-spacing-sm) var(--ref-spacing-xxxs) var(--ref-spacing-sm)}.ng-dropdown-panel.ap-select .option .content,.ap-select .ng-select-container+.ng-dropdown-panel .option .content{display:flex;align-items:center;gap:var(--comp-select-one-line-spacing);flex:1;width:100%}.ng-dropdown-panel.ap-select .option .content .item,.ap-select .ng-select-container+.ng-dropdown-panel .option .content .item{flex:1}.ng-dropdown-panel.ap-select .option .content .texts,.ap-select .ng-select-container+.ng-dropdown-panel .option .content .texts{flex:1;overflow:auto;display:flex;flex-direction:column}.ng-dropdown-panel.ap-select .option .content .texts .first-line,.ap-select .ng-select-container+.ng-dropdown-panel .option .content .texts .first-line{display:flex;align-items:center;gap:var(--ref-spacing-xxs)}.ng-dropdown-panel.ap-select .option .content .texts .first-line .label,.ap-select .ng-select-container+.ng-dropdown-panel .option .content .texts .first-line .label{display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.ng-dropdown-panel.ap-select .option .content ap-symbol,.ap-select .ng-select-container+.ng-dropdown-panel .option .content ap-symbol{color:var(--ref-color-electric-blue-100)}.ng-dropdown-panel.ap-select .option .content ap-symbol div.svg,.ap-select .ng-select-container+.ng-dropdown-panel .option .content ap-symbol div.svg{color:var(--ref-color-electric-blue-100)}.ng-dropdown-panel.ap-select .option .label,.ap-select .ng-select-container+.ng-dropdown-panel .option .label{font-family:var(--comp-select-one-line-text-font-family);font-size:var(--comp-select-one-line-text-size);font-weight:var(--comp-select-one-line-text-font-weight);line-height:var(--comp-select-one-line-text-line-height)}.ng-dropdown-panel.ap-select .option.with-caption,.ap-select .ng-select-container+.ng-dropdown-panel .option.with-caption{padding:var(--ref-spacing-xxs) var(--comp-select-one-line-padding-horizontal);min-height:var(--comp-select-two-line-height);max-height:var(--comp-select-two-line-height)}.ng-dropdown-panel.ap-select .option.with-caption .label,.ap-select .ng-select-container+.ng-dropdown-panel .option.with-caption .label{font-weight:var(--comp-select-two-line-title-text-font-weight);font-family:var(--comp-select-two-line-title-text-font-family);font-size:var(--comp-select-two-line-title-text-size);line-height:var(--comp-select-two-line-title-text-line-height);color:var(--comp-select-two-line-title-text-color)}.ng-dropdown-panel.ap-select .option.with-caption .caption,.ap-select .ng-select-container+.ng-dropdown-panel .option.with-caption .caption{font-weight:var(--comp-select-two-line-caption-text-font-weight);font-family:var(--comp-select-two-line-caption-text-font-family);font-size:var(--comp-select-two-line-caption-text-size);line-height:var(--comp-select-two-line-caption-text-line-height);color:var(--comp-select-two-line-caption-text-color);display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.ng-dropdown-panel.ap-select .ng-dropdown-panel-items,.ap-select .ng-select-container+.ng-dropdown-panel .ng-dropdown-panel-items{padding:0}.ng-dropdown-panel.ap-select .ng-optgroup,.ap-select .ng-select-container+.ng-dropdown-panel .ng-optgroup{display:flex;align-items:center;padding:0}.ng-dropdown-panel.ap-select .ng-optgroup:first-child .with-search,.ng-dropdown-panel.ap-select .ng-optgroup:first-child .with-select-all,.ap-select .ng-select-container+.ng-dropdown-panel .ng-optgroup:first-child .with-search,.ap-select .ng-select-container+.ng-dropdown-panel .ng-optgroup:first-child .with-select-all{border:none}.ng-dropdown-panel.ap-select .ng-optgroup .group,.ap-select .ng-select-container+.ng-dropdown-panel .ng-optgroup .group{display:flex;width:100%;height:100%;background-color:var(--comp-select-group-background-color);min-height:32px;box-sizing:border-box;max-height:50px;padding:var(--comp-select-group-padding-vertical) var(--comp-select-group-padding-horizontal);border-top:1px solid var(--comp-select-group-border-top-color)}.ng-dropdown-panel.ap-select .ng-optgroup .group .group-label,.ap-select .ng-select-container+.ng-dropdown-panel .ng-optgroup .group .group-label{font-weight:var(--comp-select-group-text-font-weight);font-size:var(--comp-select-group-text-size);line-height:var(--comp-select-group-text-line-height);font-family:var(--comp-select-group-text-font-family);color:var(--comp-select-group-text-color)}.ng-dropdown-panel.ap-select .ng-dropdown-header,.ap-select .ng-select-container+.ng-dropdown-panel .ng-dropdown-header{padding:0 var(--comp-select-search-bar-padding-horizontal) var(--comp-select-search-bar-margin-bottom) var(--comp-select-search-bar-padding-horizontal);border-bottom:1px solid var(--comp-select-search-bar-border-bottom-color)}.ng-dropdown-panel.ap-select .ng-dropdown-header .select-all-checkbox,.ap-select .ng-select-container+.ng-dropdown-panel .ng-dropdown-header .select-all-checkbox{padding-left:var(--ref-spacing-xxs);height:var(--comp-select-one-line-height)}.ng-dropdown-panel.ap-select .ng-dropdown-footer,.ap-select .ng-select-container+.ng-dropdown-panel .ng-dropdown-footer{cursor:pointer;padding:0;border-top:1px solid var(--ref-color-grey-10)}.ng-dropdown-panel.ap-select .standalone-link,.ap-select .ng-select-container+.ng-dropdown-panel .standalone-link{color:var(--ref-color-electric-blue-150);font-weight:var(--ref-font-weight-bold);font-family:var(--ref-font-family);background-color:transparent;border:none;line-height:var(--ref-font-line-height-sm);font-size:var(--ref-font-size-sm);cursor:pointer}.ng-dropdown-panel.ap-select .standalone-link:hover,.ap-select .ng-select-container+.ng-dropdown-panel .standalone-link:hover{color:var(--ref-color-electric-blue-100)}.ng-dropdown-panel.ap-select .standalone-link:active,.ap-select .ng-select-container+.ng-dropdown-panel .standalone-link:active{color:var(--ref-color-electric-blue-150)}.form-message{font-size:var(--comp-forms-status-text-size);font-weight:var(--comp-forms-status-text-font-weight);line-height:var(--comp-forms-status-text-line-height);font-family:var(--comp-forms-status-text-font-family);margin:0;display:flex;gap:var(--ref-spacing-xxxs)}.form-message.error{color:var(--comp-forms-status-text-error-color)}.form-message.error ap-symbol{color:var(--comp-forms-status-icon-error-color)}.form-message.success{color:var(--comp-forms-status-text-success-color)}.form-message.success ap-symbol{color:var(--comp-forms-status-icon-success-color)}form.ng-submitted ap-select.ng-valid .ng-select-container{border-color:var(--comp-input-border-success-color)}form.ng-submitted ap-select.ng-invalid .ng-select-container{border-color:var(--comp-input-border-error-color)}\n"] }]
|
|
342
|
-
}], ctorParameters: function () { return []; }, propDecorators: { searchInput: [{
|
|
343
|
-
type: ViewChild,
|
|
344
|
-
args: ['searchInput']
|
|
345
|
-
}], inlineLabelElement: [{
|
|
346
|
-
type: ViewChild,
|
|
347
|
-
args: ['inlineLabel']
|
|
348
|
-
}], select: [{
|
|
349
|
-
type: ViewChild,
|
|
350
|
-
args: ['select']
|
|
351
|
-
}], hovered: [{
|
|
352
|
-
type: HostBinding,
|
|
353
|
-
args: ['class.hovered']
|
|
354
|
-
}], options: [{
|
|
395
|
+
args: [{ selector: 'ap-select-label-multiple', standalone: true, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgFor, NgIf, LabelComponent, TagComponent, AvatarComponent], template: "<div class=\"multiple-item\">\n <ng-container *ngFor=\"let item of selectedLabels(); trackBy: trackByItem\">\n <ap-label\n *ngIf=\"displayTypeSignal() === 'label'\"\n class=\"item\"\n color=\"blue\"\n removable=\"true\"\n [content]=\"item.label\"\n (remove)=\"removeItem.emit(item.value)\" />\n <ap-tag\n *ngIf=\"displayTypeSignal() === 'tag'\"\n class=\"item text-item\"\n clearable=\"true\"\n color=\"grey\"\n (clear)=\"removeItem.emit(item.value)\">\n <ap-avatar\n *ngIf=\"item.avatarUrl\"\n [size]=\"16\"\n [profilePicture]=\"item.avatarUrl\"\n [username]=\"item.label\"\n [showInitials]=\"true\" />\n {{ item.label }}\n </ap-tag>\n </ng-container>\n</div>\n<div\n *ngIf=\"hiddenCountSignal() > 0\"\n class=\"remaining\">\n <ap-tag\n *ngIf=\"displayTypeSignal() === 'tag'\"\n class=\"text-item\"\n color=\"grey\"\n clearable=\"false\">\n +{{ hiddenCountSignal() }}\n </ap-tag>\n <ap-label\n *ngIf=\"displayTypeSignal() === 'label'\"\n color=\"blue\"\n removable=\"false\"\n [content]=\"'+' + hiddenCountSignal()\" />\n</div>\n", styles: ["ap-select-label-multiple{display:flex}\n"] }]
|
|
396
|
+
}], propDecorators: { _displayType: [{
|
|
355
397
|
type: Input,
|
|
356
|
-
args: [{
|
|
357
|
-
}],
|
|
358
|
-
type: Input
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
}],
|
|
364
|
-
type: Input
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
}],
|
|
370
|
-
type:
|
|
371
|
-
}]
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
}],
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
}],
|
|
383
|
-
|
|
384
|
-
}], selectableGroup: [{
|
|
398
|
+
args: [{ alias: 'displayType' }]
|
|
399
|
+
}], _selectedItems: [{
|
|
400
|
+
type: Input,
|
|
401
|
+
args: [{ required: true, alias: 'selectedItems' }]
|
|
402
|
+
}], _bindLabel: [{
|
|
403
|
+
type: Input,
|
|
404
|
+
args: [{ alias: 'bindLabel' }]
|
|
405
|
+
}], _bindValue: [{
|
|
406
|
+
type: Input,
|
|
407
|
+
args: [{ alias: 'bindValue' }]
|
|
408
|
+
}], _bindAvatarUrl: [{
|
|
409
|
+
type: Input,
|
|
410
|
+
args: [{ alias: 'bindAvatarUrl' }]
|
|
411
|
+
}], removeItem: [{
|
|
412
|
+
type: Output
|
|
413
|
+
}] } });
|
|
414
|
+
|
|
415
|
+
class SelectLabelSingleComponent {
|
|
416
|
+
displayType = 'text';
|
|
417
|
+
label;
|
|
418
|
+
avatarUrl;
|
|
419
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: SelectLabelSingleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
420
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.10", type: SelectLabelSingleComponent, isStandalone: true, selector: "ap-select-label-single", inputs: { displayType: "displayType", label: "label", avatarUrl: "avatarUrl" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"displayType\">\n <ng-container *ngSwitchCase=\"'text'\">\n <span\n class=\"text-item\"\n [title]=\"label\">\n {{ label }}\n </span>\n </ng-container>\n <ng-container *ngSwitchCase=\"'label'\">\n <ap-label\n color=\"blue\"\n [removable]=\"false\"\n [content]=\"label\" />\n </ng-container>\n <ng-container *ngSwitchCase=\"'tag'\">\n <ap-tag\n class=\"text-item\"\n color=\"grey\">\n <ap-avatar\n *ngIf=\"avatarUrl\"\n [size]=\"16\"\n [username]=\"label\"\n [showInitials]=\"true\"\n [profilePicture]=\"avatarUrl\" />\n {{ label }}\n </ap-tag>\n </ng-container>\n <ng-container *ngSwitchCase=\"'withAvatar'\">\n <ap-avatar\n [size]=\"24\"\n [username]=\"label\"\n [showInitials]=\"true\"\n [profilePicture]=\"avatarUrl\" />\n <span class=\"text-item\">\n {{ label }}\n </span>\n </ng-container>\n</ng-container>\n", styles: ["ap-select-label-single{display:flex;gap:var(--ref-spacing-xxs);width:100%;align-items:center}\n"], dependencies: [{ kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: LabelComponent, selector: "ap-label", inputs: ["content", "selectorWidth", "removable"], outputs: ["remove"] }, { kind: "component", type: TagComponent, selector: "ap-tag", inputs: ["clearable", "color"], outputs: ["clear"] }, { kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["alternativeText", "anonymous", "username", "network", "online", "profilePicture", "showInitials", "alt", "rounded", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
421
|
+
}
|
|
422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: SelectLabelSingleComponent, decorators: [{
|
|
423
|
+
type: Component,
|
|
424
|
+
args: [{ selector: 'ap-select-label-single', standalone: true, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgSwitch, NgSwitchCase, LabelComponent, TagComponent, AvatarComponent], template: "<ng-container [ngSwitch]=\"displayType\">\n <ng-container *ngSwitchCase=\"'text'\">\n <span\n class=\"text-item\"\n [title]=\"label\">\n {{ label }}\n </span>\n </ng-container>\n <ng-container *ngSwitchCase=\"'label'\">\n <ap-label\n color=\"blue\"\n [removable]=\"false\"\n [content]=\"label\" />\n </ng-container>\n <ng-container *ngSwitchCase=\"'tag'\">\n <ap-tag\n class=\"text-item\"\n color=\"grey\">\n <ap-avatar\n *ngIf=\"avatarUrl\"\n [size]=\"16\"\n [username]=\"label\"\n [showInitials]=\"true\"\n [profilePicture]=\"avatarUrl\" />\n {{ label }}\n </ap-tag>\n </ng-container>\n <ng-container *ngSwitchCase=\"'withAvatar'\">\n <ap-avatar\n [size]=\"24\"\n [username]=\"label\"\n [showInitials]=\"true\"\n [profilePicture]=\"avatarUrl\" />\n <span class=\"text-item\">\n {{ label }}\n </span>\n </ng-container>\n</ng-container>\n", styles: ["ap-select-label-single{display:flex;gap:var(--ref-spacing-xxs);width:100%;align-items:center}\n"] }]
|
|
425
|
+
}], propDecorators: { displayType: [{
|
|
385
426
|
type: Input
|
|
386
427
|
}], label: [{
|
|
428
|
+
type: Input,
|
|
429
|
+
args: [{
|
|
430
|
+
required: true,
|
|
431
|
+
}]
|
|
432
|
+
}], avatarUrl: [{
|
|
387
433
|
type: Input
|
|
388
|
-
}]
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
434
|
+
}] } });
|
|
435
|
+
|
|
436
|
+
class SelectBaseDirective {
|
|
437
|
+
inlineLabel;
|
|
438
|
+
symbolId;
|
|
439
|
+
selectComponent = inject(NgSelectComponent);
|
|
440
|
+
el = inject(ElementRef);
|
|
441
|
+
renderer = inject(Renderer2);
|
|
442
|
+
viewContainerRef = inject(ViewContainerRef);
|
|
443
|
+
symbolRegistry = inject(SymbolRegistry);
|
|
444
|
+
constructor() {
|
|
445
|
+
this.selectComponent.appendTo = 'body';
|
|
446
|
+
this.selectComponent.searchable = false;
|
|
447
|
+
this.selectComponent.clearable = false;
|
|
448
|
+
this.selectComponent.markFirst = false;
|
|
449
|
+
this.selectComponent.selectableGroupAsModel = false;
|
|
450
|
+
this.selectComponent.tabIndex = 0;
|
|
451
|
+
this.symbolRegistry.registerSymbols([apCheck2, apAdd2022]);
|
|
452
|
+
}
|
|
453
|
+
ngOnInit() {
|
|
454
|
+
if (this.symbolId) {
|
|
455
|
+
this.addInlineSymbol(this.symbolId);
|
|
456
|
+
}
|
|
457
|
+
if (this.inlineLabel) {
|
|
458
|
+
this.addInlineLabel(this.inlineLabel);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
ngAfterViewInit() {
|
|
462
|
+
if (!this.selectComponent.optionTemplate) {
|
|
463
|
+
throw new Error('optionTemplate is required for apSelect');
|
|
464
|
+
}
|
|
465
|
+
if (this.selectComponent.groupBy && !this.selectComponent.optgroupTemplate) {
|
|
466
|
+
throw new Error('optgroupTemplate is required for apSelect');
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
addInlineSymbol(symbolId) {
|
|
470
|
+
const componentRef = this.viewContainerRef.createComponent(SymbolComponent);
|
|
471
|
+
componentRef.instance.symbolId = symbolId;
|
|
472
|
+
componentRef.location.nativeElement.classList.add('inline-symbol');
|
|
473
|
+
// add class to component
|
|
474
|
+
this.renderer.insertBefore(this.el.nativeElement.getElementsByClassName('ng-select-container').item(0), componentRef.location.nativeElement, this.el.nativeElement.getElementsByClassName('ng-value-container').item(0));
|
|
475
|
+
}
|
|
476
|
+
addInlineLabel(label) {
|
|
477
|
+
const labelElement = this.renderer.createElement('label');
|
|
478
|
+
this.renderer.setProperty(labelElement, 'textContent', label);
|
|
479
|
+
this.renderer.addClass(labelElement, 'inline-label'); // Add appropriate CSS class
|
|
480
|
+
this.renderer.insertBefore(this.el.nativeElement.getElementsByClassName('ng-select-container').item(0), labelElement, this.el.nativeElement.getElementsByClassName('ng-value-container').item(0));
|
|
481
|
+
}
|
|
482
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: SelectBaseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
483
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.10", type: SelectBaseDirective, isStandalone: true, selector: "ng-select[apSelect]", inputs: { inlineLabel: "inlineLabel", symbolId: "symbolId" }, host: { classAttribute: "ap-select" }, ngImport: i0 });
|
|
484
|
+
}
|
|
485
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: SelectBaseDirective, decorators: [{
|
|
486
|
+
type: Directive,
|
|
487
|
+
args: [{
|
|
488
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
489
|
+
selector: 'ng-select[apSelect]',
|
|
490
|
+
standalone: true,
|
|
491
|
+
host: {
|
|
492
|
+
class: 'ap-select',
|
|
493
|
+
},
|
|
494
|
+
}]
|
|
495
|
+
}], ctorParameters: function () { return []; }, propDecorators: { inlineLabel: [{
|
|
496
|
+
type: Input
|
|
497
|
+
}], symbolId: [{
|
|
445
498
|
type: Input
|
|
446
|
-
}], createNew: [{
|
|
447
|
-
type: Output
|
|
448
|
-
}], valueChanges: [{
|
|
449
|
-
type: Output
|
|
450
499
|
}] } });
|
|
451
500
|
|
|
501
|
+
class SelectMultipleDirective {
|
|
502
|
+
selectComponent = inject(NgSelectComponent);
|
|
503
|
+
constructor() {
|
|
504
|
+
this.selectComponent.multiple = true;
|
|
505
|
+
this.selectComponent.closeOnSelect = false;
|
|
506
|
+
}
|
|
507
|
+
ngAfterViewInit() {
|
|
508
|
+
if (!this.selectComponent.multiLabelTemplate) {
|
|
509
|
+
throw new Error('multiLabelTemplate is required for apSelectMultiple');
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: SelectMultipleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
513
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.10", type: SelectMultipleDirective, isStandalone: true, selector: "ng-select[apSelectMultiple]", hostDirectives: [{ directive: SelectBaseDirective, inputs: ["inlineLabel", "inlineLabel", "symbolId", "symbolId"] }], ngImport: i0 });
|
|
514
|
+
}
|
|
515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: SelectMultipleDirective, decorators: [{
|
|
516
|
+
type: Directive,
|
|
517
|
+
args: [{
|
|
518
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
519
|
+
selector: 'ng-select[apSelectMultiple]',
|
|
520
|
+
standalone: true,
|
|
521
|
+
hostDirectives: [
|
|
522
|
+
{
|
|
523
|
+
directive: SelectBaseDirective,
|
|
524
|
+
inputs: ['inlineLabel', 'symbolId'],
|
|
525
|
+
},
|
|
526
|
+
],
|
|
527
|
+
}]
|
|
528
|
+
}], ctorParameters: function () { return []; } });
|
|
529
|
+
|
|
530
|
+
class SelectSingleDirective {
|
|
531
|
+
selectComponent = inject(NgSelectComponent);
|
|
532
|
+
constructor() {
|
|
533
|
+
this.selectComponent.multiple = false;
|
|
534
|
+
this.selectComponent.closeOnSelect = true;
|
|
535
|
+
}
|
|
536
|
+
ngAfterViewInit() {
|
|
537
|
+
if (!this.selectComponent.labelTemplate) {
|
|
538
|
+
throw new Error('labelTemplate is required for apSelectSingle');
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: SelectSingleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
542
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.10", type: SelectSingleDirective, isStandalone: true, selector: "ng-select[apSelectSingle]", hostDirectives: [{ directive: SelectBaseDirective, inputs: ["inlineLabel", "inlineLabel", "symbolId", "symbolId"] }], ngImport: i0 });
|
|
543
|
+
}
|
|
544
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: SelectSingleDirective, decorators: [{
|
|
545
|
+
type: Directive,
|
|
546
|
+
args: [{
|
|
547
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
548
|
+
selector: 'ng-select[apSelectSingle]',
|
|
549
|
+
standalone: true,
|
|
550
|
+
hostDirectives: [
|
|
551
|
+
{
|
|
552
|
+
directive: SelectBaseDirective,
|
|
553
|
+
inputs: ['inlineLabel', 'symbolId'],
|
|
554
|
+
},
|
|
555
|
+
],
|
|
556
|
+
}]
|
|
557
|
+
}], ctorParameters: function () { return []; } });
|
|
558
|
+
|
|
559
|
+
class ApSelectModule {
|
|
560
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ApSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
561
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.10", ngImport: i0, type: ApSelectModule, imports: [SelectMultipleDirective,
|
|
562
|
+
SelectSingleDirective,
|
|
563
|
+
DropdownItemSingleOneLineComponent,
|
|
564
|
+
DropdownItemSingleTwoLinesComponent,
|
|
565
|
+
DropdownItemMultipleOneLineComponent,
|
|
566
|
+
DropdownItemMultipleTwoLinesComponent,
|
|
567
|
+
SelectLabelSingleComponent,
|
|
568
|
+
SelectLabelMultipleComponent,
|
|
569
|
+
DropdownSearchFormComponent,
|
|
570
|
+
DropdownGroupItemComponent], exports: [SelectMultipleDirective,
|
|
571
|
+
SelectSingleDirective,
|
|
572
|
+
DropdownItemSingleOneLineComponent,
|
|
573
|
+
DropdownItemSingleTwoLinesComponent,
|
|
574
|
+
DropdownItemMultipleOneLineComponent,
|
|
575
|
+
DropdownItemMultipleTwoLinesComponent,
|
|
576
|
+
SelectLabelSingleComponent,
|
|
577
|
+
SelectLabelMultipleComponent,
|
|
578
|
+
DropdownSearchFormComponent,
|
|
579
|
+
DropdownGroupItemComponent] });
|
|
580
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ApSelectModule, imports: [DropdownItemSingleOneLineComponent,
|
|
581
|
+
DropdownItemSingleTwoLinesComponent,
|
|
582
|
+
DropdownItemMultipleOneLineComponent,
|
|
583
|
+
DropdownItemMultipleTwoLinesComponent,
|
|
584
|
+
SelectLabelSingleComponent,
|
|
585
|
+
SelectLabelMultipleComponent,
|
|
586
|
+
DropdownSearchFormComponent,
|
|
587
|
+
DropdownGroupItemComponent] });
|
|
588
|
+
}
|
|
589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ApSelectModule, decorators: [{
|
|
590
|
+
type: NgModule,
|
|
591
|
+
args: [{
|
|
592
|
+
imports: [
|
|
593
|
+
SelectMultipleDirective,
|
|
594
|
+
SelectSingleDirective,
|
|
595
|
+
DropdownItemSingleOneLineComponent,
|
|
596
|
+
DropdownItemSingleTwoLinesComponent,
|
|
597
|
+
DropdownItemMultipleOneLineComponent,
|
|
598
|
+
DropdownItemMultipleTwoLinesComponent,
|
|
599
|
+
SelectLabelSingleComponent,
|
|
600
|
+
SelectLabelMultipleComponent,
|
|
601
|
+
DropdownSearchFormComponent,
|
|
602
|
+
DropdownGroupItemComponent,
|
|
603
|
+
],
|
|
604
|
+
exports: [
|
|
605
|
+
SelectMultipleDirective,
|
|
606
|
+
SelectSingleDirective,
|
|
607
|
+
DropdownItemSingleOneLineComponent,
|
|
608
|
+
DropdownItemSingleTwoLinesComponent,
|
|
609
|
+
DropdownItemMultipleOneLineComponent,
|
|
610
|
+
DropdownItemMultipleTwoLinesComponent,
|
|
611
|
+
SelectLabelSingleComponent,
|
|
612
|
+
SelectLabelMultipleComponent,
|
|
613
|
+
DropdownSearchFormComponent,
|
|
614
|
+
DropdownGroupItemComponent,
|
|
615
|
+
],
|
|
616
|
+
}]
|
|
617
|
+
}] });
|
|
618
|
+
|
|
452
619
|
/**
|
|
453
620
|
* Generated bundle index. Do not edit.
|
|
454
621
|
*/
|
|
455
622
|
|
|
456
|
-
export {
|
|
623
|
+
export { ApSelectModule, DropdownGroupItemComponent, DropdownItemMultipleOneLineComponent, DropdownItemMultipleTwoLinesComponent, DropdownItemSingleOneLineComponent, DropdownItemSingleTwoLinesComponent, DropdownSearchFormComponent, SelectBaseDirective, SelectLabelMultipleComponent, SelectLabelSingleComponent, SelectMultipleDirective, SelectSingleDirective };
|
|
457
624
|
//# sourceMappingURL=agorapulse-ui-components-select.mjs.map
|