@recursyve/ngx-material-components 19.0.0-beta.11 → 19.0.0-beta.12

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.
@@ -0,0 +1,26 @@
1
+ import { OnInit } from "@angular/core";
2
+ import { ControlValueAccessor } from "@angular/forms";
3
+ import { NiceChipListItems } from "./items/chip-list-items";
4
+ import * as i0 from "@angular/core";
5
+ export declare class NiceChipListDirective<T> implements ControlValueAccessor, OnInit {
6
+ readonly withItemList: import("@angular/core").InputSignal<NiceChipListItems<T>>;
7
+ readonly reloadOnSelected: import("@angular/core").InputSignal<boolean>;
8
+ readonly separatorKeyboardCodes: import("@angular/core").InputSignal<string[]>;
9
+ private readonly elementRef;
10
+ private readonly injector;
11
+ private readonly asyncTypeahead;
12
+ private readonly ngControl;
13
+ private readonly values;
14
+ private propagateChanges?;
15
+ constructor();
16
+ onKeyDown(event: KeyboardEvent): void;
17
+ ngOnInit(): void;
18
+ writeValue(obj: T[] | null): void;
19
+ registerOnChange(fn: (_: T[]) => void): void;
20
+ registerOnTouched(): void;
21
+ private setupAsyncTypeahead;
22
+ private addValue;
23
+ private updateTypeaheadSearchOptions;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<NiceChipListDirective<any>, never>;
25
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NiceChipListDirective<any>, "input[niceChipList], nice-async-typeahead[niceChipList]", never, { "withItemList": { "alias": "withItemList"; "required": true; "isSignal": true; }; "reloadOnSelected": { "alias": "reloadOnSelected"; "required": false; "isSignal": true; }; "separatorKeyboardCodes": { "alias": "separatorKeyboardCodes"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
26
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class NiceChipListItemsClearIcon {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<NiceChipListItemsClearIcon, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<NiceChipListItemsClearIcon, "nice-chip-list-items-clear-icon", never, {}, {}, never, never, true, never>;
5
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./chip-list";
2
+ export * from "./items/chip-list-items";
@@ -0,0 +1,14 @@
1
+ import { Injector, Signal } from "@angular/core";
2
+ import { Observable } from "rxjs";
3
+ import * as i0 from "@angular/core";
4
+ export declare class NiceChipListItems<T> {
5
+ readonly removeChip: import("@angular/core").OutputEmitterRef<number>;
6
+ protected readonly injector: Injector;
7
+ items?: Signal<T[]>;
8
+ formatLabelFn?: (value: T) => string;
9
+ setItemsReactivity(items$: Observable<T[]>): void;
10
+ setFormatLabel(fn: (value: T) => string): void;
11
+ remove(index: number): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<NiceChipListItems<any>, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<NiceChipListItems<any>, "nice-chip-list-items", never, {}, { "removeChip": "removeChip"; }, never, never, true, never>;
14
+ }
@@ -0,0 +1,156 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, inject, ElementRef, Injector, signal, effect, untracked, HostListener, Directive, Component, output, ChangeDetectionStrategy } from '@angular/core';
3
+ import { toObservable, toSignal } from '@angular/core/rxjs-interop';
4
+ import { NgControl } from '@angular/forms';
5
+ import { NiceAsyncTypeahead } from '@recursyve/ngx-material-components/typeahead';
6
+ import { MatChipSet, MatChipRemove, MatChipRow } from '@angular/material/chips';
7
+
8
+ class NiceChipListDirective {
9
+ withItemList = input.required();
10
+ reloadOnSelected = input(true);
11
+ separatorKeyboardCodes = input(["Enter"]);
12
+ elementRef = inject(ElementRef);
13
+ injector = inject(Injector);
14
+ asyncTypeahead = inject(NiceAsyncTypeahead, { optional: true });
15
+ ngControl = inject(NgControl, { optional: true });
16
+ values = signal([]);
17
+ propagateChanges;
18
+ constructor() {
19
+ if (this.ngControl) {
20
+ this.ngControl.valueAccessor = this;
21
+ }
22
+ effect(() => {
23
+ untracked(() => this.updateTypeaheadSearchOptions(this.values()));
24
+ });
25
+ }
26
+ onKeyDown(event) {
27
+ if (this.asyncTypeahead) {
28
+ return;
29
+ }
30
+ if (!this.separatorKeyboardCodes().includes(event.code)) {
31
+ return;
32
+ }
33
+ if (!this.elementRef.nativeElement.validity.valid) {
34
+ return;
35
+ }
36
+ this.addValue(this.elementRef.nativeElement.value);
37
+ this.elementRef.nativeElement.value = "";
38
+ event.preventDefault();
39
+ }
40
+ ngOnInit() {
41
+ this.setupAsyncTypeahead();
42
+ const parentElement = this.elementRef.nativeElement.parentElement;
43
+ if (parentElement.classList.contains("mat-mdc-form-field-infix")) {
44
+ parentElement.style.alignItems = "flex-start";
45
+ parentElement.style.flexDirection = "column-reverse";
46
+ }
47
+ const withItemList = this.withItemList();
48
+ withItemList.setItemsReactivity(toObservable(this.values, { injector: this.injector }));
49
+ withItemList.removeChip.subscribe((index) => {
50
+ const values = [...this.values()];
51
+ values.splice(index, 1);
52
+ this.propagateChanges?.(values);
53
+ this.values.set(values);
54
+ });
55
+ if (this.asyncTypeahead) {
56
+ withItemList.setFormatLabel((item) => this.asyncTypeahead.formatLabel(item));
57
+ }
58
+ }
59
+ writeValue(obj) {
60
+ if (!obj) {
61
+ this.values.set([]);
62
+ }
63
+ else if (Array.isArray(obj)) {
64
+ this.values.set([...obj]);
65
+ }
66
+ }
67
+ registerOnChange(fn) {
68
+ this.propagateChanges = fn;
69
+ }
70
+ registerOnTouched() {
71
+ return;
72
+ }
73
+ setupAsyncTypeahead() {
74
+ if (!this.asyncTypeahead) {
75
+ return;
76
+ }
77
+ this.asyncTypeahead.selected
78
+ .subscribe((value) => {
79
+ if (!value) {
80
+ return;
81
+ }
82
+ this.asyncTypeahead?.removeActiveValue();
83
+ this.addValue(value);
84
+ });
85
+ }
86
+ addValue(value) {
87
+ const values = [...this.values()];
88
+ if (values.includes(value)) {
89
+ return;
90
+ }
91
+ values.push(value);
92
+ this.propagateChanges?.(values);
93
+ this.values.set(values);
94
+ }
95
+ updateTypeaheadSearchOptions(ignore) {
96
+ if (!this.asyncTypeahead) {
97
+ return;
98
+ }
99
+ const searchOptions = this.asyncTypeahead.searchOptions();
100
+ this.asyncTypeahead.setSearchOptions({ ...(searchOptions ?? {}), ignore });
101
+ }
102
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceChipListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
103
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.10", type: NiceChipListDirective, isStandalone: true, selector: "input[niceChipList], nice-async-typeahead[niceChipList]", inputs: { withItemList: { classPropertyName: "withItemList", publicName: "withItemList", isSignal: true, isRequired: true, transformFunction: null }, reloadOnSelected: { classPropertyName: "reloadOnSelected", publicName: "reloadOnSelected", isSignal: true, isRequired: false, transformFunction: null }, separatorKeyboardCodes: { classPropertyName: "separatorKeyboardCodes", publicName: "separatorKeyboardCodes", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0 });
104
+ }
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceChipListDirective, decorators: [{
106
+ type: Directive,
107
+ args: [{
108
+ selector: "input[niceChipList], nice-async-typeahead[niceChipList]"
109
+ }]
110
+ }], ctorParameters: () => [], propDecorators: { onKeyDown: [{
111
+ type: HostListener,
112
+ args: ["keydown", ["$event"]]
113
+ }] } });
114
+
115
+ class NiceChipListItemsClearIcon {
116
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceChipListItemsClearIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
117
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: NiceChipListItemsClearIcon, isStandalone: true, selector: "nice-chip-list-items-clear-icon", ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm5.49 16.07a1 1 0 0 1 -1.41 1.42l-3.9 -3.9a0.25 0.25 0 0 0 -0.36 0l-3.9 3.9a1 1 0 1 1 -1.41 -1.42l3.9 -3.89a0.25 0.25 0 0 0 0 -0.36l-3.9 -3.9a1 1 0 0 1 1.41 -1.41l3.9 3.9a0.25 0.25 0 0 0 0.36 0l3.9 -3.9a1 1 0 0 1 1.41 1.41l-3.9 3.9a0.25 0.25 0 0 0 0 0.36Z\" fill=\"currentColor\" stroke-width=\"1\"></path>\n</svg>\n" });
118
+ }
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceChipListItemsClearIcon, decorators: [{
120
+ type: Component,
121
+ args: [{ selector: "nice-chip-list-items-clear-icon", template: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm5.49 16.07a1 1 0 0 1 -1.41 1.42l-3.9 -3.9a0.25 0.25 0 0 0 -0.36 0l-3.9 3.9a1 1 0 1 1 -1.41 -1.42l3.9 -3.89a0.25 0.25 0 0 0 0 -0.36l-3.9 -3.9a1 1 0 0 1 1.41 -1.41l3.9 3.9a0.25 0.25 0 0 0 0.36 0l3.9 -3.9a1 1 0 0 1 1.41 1.41l-3.9 3.9a0.25 0.25 0 0 0 0 0.36Z\" fill=\"currentColor\" stroke-width=\"1\"></path>\n</svg>\n" }]
122
+ }] });
123
+
124
+ class NiceChipListItems {
125
+ removeChip = output();
126
+ injector = inject(Injector);
127
+ items;
128
+ formatLabelFn;
129
+ setItemsReactivity(items$) {
130
+ this.items = toSignal(items$, { injector: this.injector, initialValue: [] });
131
+ }
132
+ setFormatLabel(fn) {
133
+ this.formatLabelFn = fn;
134
+ }
135
+ remove(index) {
136
+ this.removeChip.emit(index);
137
+ }
138
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceChipListItems, deps: [], target: i0.ɵɵFactoryTarget.Component });
139
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: NiceChipListItems, isStandalone: true, selector: "nice-chip-list-items", outputs: { removeChip: "removeChip" }, ngImport: i0, template: "@if (items) {\n <mat-chip-set>\n @for (item of items(); track item) {\n <mat-chip-row [highlighted]=\"true\" (removed)=\"remove($index)\">\n @if (formatLabelFn) {\n {{ formatLabelFn(item) }}\n } @else {\n {{ item }}\n }\n\n <button matChipRemove>\n <nice-chip-list-items-clear-icon />\n </button>\n </mat-chip-row>\n }\n </mat-chip-set>\n}\n", styles: ["nice-chip-list-items-clear-icon{margin-top:-1px;width:16px;height:16px}\n"], dependencies: [{ kind: "component", type: MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { kind: "directive", type: MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "component", type: NiceChipListItemsClearIcon, selector: "nice-chip-list-items-clear-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
140
+ }
141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceChipListItems, decorators: [{
142
+ type: Component,
143
+ args: [{ selector: "nice-chip-list-items", imports: [
144
+ MatChipSet,
145
+ MatChipRemove,
146
+ MatChipRow,
147
+ NiceChipListItemsClearIcon
148
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (items) {\n <mat-chip-set>\n @for (item of items(); track item) {\n <mat-chip-row [highlighted]=\"true\" (removed)=\"remove($index)\">\n @if (formatLabelFn) {\n {{ formatLabelFn(item) }}\n } @else {\n {{ item }}\n }\n\n <button matChipRemove>\n <nice-chip-list-items-clear-icon />\n </button>\n </mat-chip-row>\n }\n </mat-chip-set>\n}\n", styles: ["nice-chip-list-items-clear-icon{margin-top:-1px;width:16px;height:16px}\n"] }]
149
+ }] });
150
+
151
+ /**
152
+ * Generated bundle index. Do not edit.
153
+ */
154
+
155
+ export { NiceChipListDirective, NiceChipListItems };
156
+ //# sourceMappingURL=recursyve-ngx-material-components-chip-list.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recursyve-ngx-material-components-chip-list.mjs","sources":["../../../src/material-components/chip-list/chip-list.ts","../../../src/material-components/chip-list/icons/clear/chip-list-items-clear-icon.ts","../../../src/material-components/chip-list/icons/clear/chip-list-items-clear-icon.svg","../../../src/material-components/chip-list/items/chip-list-items.ts","../../../src/material-components/chip-list/items/chip-list-items.html","../../../src/material-components/chip-list/recursyve-ngx-material-components-chip-list.ts"],"sourcesContent":["import {\n Directive,\n effect,\n ElementRef,\n HostListener,\n inject,\n Injector,\n input,\n OnInit,\n signal,\n untracked\n} from \"@angular/core\";\nimport { toObservable } from \"@angular/core/rxjs-interop\";\nimport { ControlValueAccessor, NgControl } from \"@angular/forms\";\nimport { NiceAsyncTypeahead } from \"@recursyve/ngx-material-components/typeahead\";\nimport { NiceChipListItems } from \"./items/chip-list-items\";\n\n@Directive({\n selector: \"input[niceChipList], nice-async-typeahead[niceChipList]\"\n})\nexport class NiceChipListDirective<T> implements ControlValueAccessor, OnInit {\n public readonly withItemList = input.required<NiceChipListItems<T>>();\n public readonly reloadOnSelected = input<boolean>(true);\n public readonly separatorKeyboardCodes = input<string[]>([\"Enter\"]);\n\n private readonly elementRef = inject(ElementRef);\n private readonly injector = inject(Injector);\n private readonly asyncTypeahead = inject<NiceAsyncTypeahead<T>>(NiceAsyncTypeahead, { optional: true });\n private readonly ngControl = inject<NgControl>(NgControl, { optional: true });\n\n private readonly values = signal<T[]>([]);\n\n private propagateChanges?: (_: T[]) => void;\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n\n effect(() => {\n untracked(() => this.updateTypeaheadSearchOptions(this.values()));\n });\n }\n\n @HostListener(\"keydown\", [\"$event\"])\n public onKeyDown(event: KeyboardEvent): void {\n if (this.asyncTypeahead) {\n return;\n }\n\n if (!this.separatorKeyboardCodes().includes(event.code)) {\n return;\n }\n\n if (!this.elementRef.nativeElement.validity.valid) {\n return;\n }\n\n this.addValue(this.elementRef.nativeElement.value);\n this.elementRef.nativeElement.value = \"\";\n event.preventDefault();\n }\n\n public ngOnInit(): void {\n this.setupAsyncTypeahead();\n\n const parentElement = this.elementRef.nativeElement.parentElement;\n if (parentElement.classList.contains(\"mat-mdc-form-field-infix\")) {\n parentElement.style.alignItems = \"flex-start\";\n parentElement.style.flexDirection = \"column-reverse\";\n }\n\n const withItemList = this.withItemList();\n withItemList.setItemsReactivity(toObservable(this.values, { injector: this.injector }));\n withItemList.removeChip.subscribe((index) => {\n const values = [...this.values()];\n values.splice(index, 1);\n\n this.propagateChanges?.(values);\n this.values.set(values);\n });\n\n if (this.asyncTypeahead) {\n withItemList.setFormatLabel((item) => this.asyncTypeahead!.formatLabel(item));\n }\n }\n\n public writeValue(obj: T[] | null): void {\n if (!obj) {\n this.values.set([]);\n } else if (Array.isArray(obj)) {\n this.values.set([...obj]);\n }\n }\n\n public registerOnChange(fn: (_: T[]) => void): void {\n this.propagateChanges = fn;\n }\n\n public registerOnTouched(): void {\n return;\n }\n\n private setupAsyncTypeahead(): void {\n if (!this.asyncTypeahead) {\n return;\n }\n\n this.asyncTypeahead.selected\n .subscribe((value) => {\n if (!value) {\n return;\n }\n\n this.asyncTypeahead?.removeActiveValue();\n this.addValue(value);\n });\n }\n\n private addValue(value: T): void {\n const values = [...this.values()];\n if (values.includes(value)) {\n return;\n }\n\n values.push(value);\n this.propagateChanges?.(values);\n this.values.set(values);\n }\n\n private updateTypeaheadSearchOptions(ignore: T[]): void {\n if (!this.asyncTypeahead) {\n return;\n }\n\n const searchOptions = this.asyncTypeahead.searchOptions();\n this.asyncTypeahead.setSearchOptions({ ...(searchOptions ?? {}), ignore });\n }\n}\n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"nice-chip-list-items-clear-icon\",\n templateUrl: \"chip-list-items-clear-icon.svg\"\n})\nexport class NiceChipListItemsClearIcon {}\n","<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm5.49 16.07a1 1 0 0 1 -1.41 1.42l-3.9 -3.9a0.25 0.25 0 0 0 -0.36 0l-3.9 3.9a1 1 0 1 1 -1.41 -1.42l3.9 -3.89a0.25 0.25 0 0 0 0 -0.36l-3.9 -3.9a1 1 0 0 1 1.41 -1.41l3.9 3.9a0.25 0.25 0 0 0 0.36 0l3.9 -3.9a1 1 0 0 1 1.41 1.41l-3.9 3.9a0.25 0.25 0 0 0 0 0.36Z\" fill=\"currentColor\" stroke-width=\"1\"></path>\n</svg>\n","import { ChangeDetectionStrategy, Component, inject, Injector, output, Signal } from \"@angular/core\";\nimport { toSignal } from \"@angular/core/rxjs-interop\";\nimport { MatChipRemove, MatChipRow, MatChipSet } from \"@angular/material/chips\";\nimport { Observable } from \"rxjs\";\nimport { NiceChipListItemsClearIcon } from \"../icons/clear/chip-list-items-clear-icon\";\n\n@Component({\n selector: \"nice-chip-list-items\",\n templateUrl: \"./chip-list-items.html\",\n styleUrls: [\"./chip-list-items.scss\"],\n imports: [\n MatChipSet,\n MatChipRemove,\n MatChipRow,\n NiceChipListItemsClearIcon\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NiceChipListItems<T> {\n public readonly removeChip = output<number>();\n\n protected readonly injector = inject(Injector);\n\n public items?: Signal<T[]>;\n public formatLabelFn?: (value: T) => string;\n\n public setItemsReactivity(items$: Observable<T[]>): void {\n this.items = toSignal(items$, { injector: this.injector, initialValue: [] });\n }\n\n public setFormatLabel(fn: (value: T) => string): void {\n this.formatLabelFn = fn;\n }\n\n public remove(index: number): void {\n this.removeChip.emit(index);\n }\n}\n","@if (items) {\n <mat-chip-set>\n @for (item of items(); track item) {\n <mat-chip-row [highlighted]=\"true\" (removed)=\"remove($index)\">\n @if (formatLabelFn) {\n {{ formatLabelFn(item) }}\n } @else {\n {{ item }}\n }\n\n <button matChipRemove>\n <nice-chip-list-items-clear-icon />\n </button>\n </mat-chip-row>\n }\n </mat-chip-set>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAoBa,qBAAqB,CAAA;AACd,IAAA,YAAY,GAAG,KAAK,CAAC,QAAQ,EAAwB;AACrD,IAAA,gBAAgB,GAAG,KAAK,CAAU,IAAI,CAAC;AACvC,IAAA,sBAAsB,GAAG,KAAK,CAAW,CAAC,OAAO,CAAC,CAAC;AAElD,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC3B,cAAc,GAAG,MAAM,CAAwB,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACtF,SAAS,GAAG,MAAM,CAAY,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAE5D,IAAA,MAAM,GAAG,MAAM,CAAM,EAAE,CAAC;AAEjC,IAAA,gBAAgB;AAExB,IAAA,WAAA,GAAA;AACI,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,aAAa,GAAG,IAAI;;QAGvC,MAAM,CAAC,MAAK;AACR,YAAA,SAAS,CAAC,MAAM,IAAI,CAAC,4BAA4B,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;AACrE,SAAC,CAAC;;AAIC,IAAA,SAAS,CAAC,KAAoB,EAAA;AACjC,QAAA,IAAI,IAAI,CAAC,cAAc,EAAE;YACrB;;AAGJ,QAAA,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,IAA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,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACV,0BAA0B,EAAA,QAAA,EAAA,iCAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAIrB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAZ7B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAGvB,OAAA,EAAA;wBACL,UAAU;wBACV,aAAa;wBACb,UAAU;wBACV;qBACH,EACgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,qgBAAA,EAAA,MAAA,EAAA,CAAA,2EAAA,CAAA,EAAA;;;AEhBnD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, DestroyRef, signal, computed, Injectable, input, viewChild, ElementRef, ChangeDetectorRef, effect, ViewChildren, Directive, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { InjectionToken, inject, DestroyRef, signal, computed, Injectable, Component, input, output, viewChild, ElementRef, ChangeDetectorRef, effect, ViewChildren, Directive, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
3
3
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
4
  import { Subject, switchMap, defer, EMPTY, map, catchError, finalize, startWith, merge, debounceTime, distinctUntilChanged, take, takeUntil } from 'rxjs';
5
5
  import { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
@@ -8,7 +8,7 @@ import * as i1 from '@angular/forms';
8
8
  import { FormBuilder, NgControl, Validators, FormGroupDirective, NgForm, ReactiveFormsModule } from '@angular/forms';
9
9
  import { MatIconButton } from '@angular/material/button';
10
10
  import { ErrorStateMatcher, _ErrorStateTracker, _getOptionScrollPosition, MatOption } from '@angular/material/core';
11
- import { MAT_FORM_FIELD, MatFormField, MatFormFieldControl } from '@angular/material/form-field';
11
+ import { MAT_FORM_FIELD, MatFormField, MatPrefix, MatFormFieldControl } from '@angular/material/form-field';
12
12
  import { MatInput } from '@angular/material/input';
13
13
  import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
14
14
  import { SelectionModel } from '@angular/cdk/collections';
@@ -151,6 +151,15 @@ function provideAsyncTypeaheadResources(providers) {
151
151
  }));
152
152
  }
153
153
 
154
+ class NiceTypeaheadSearchIcon {
155
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTypeaheadSearchIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
156
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: NiceTypeaheadSearchIcon, isStandalone: true, selector: "nice-typeahead-search-icon", ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M1.4720451262 13.356970375A9.063 9.063 0 1 0 18.154024235 6.267298379a9.063 9.063 0 1 0 -16.6819791088 7.089671996Z\" fill=\"none\" stroke=\"#000000\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"></path>\n <path d=\"m16.221 16.22 7.029 7.03\" fill=\"none\" stroke=\"#000000\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"></path>\n</svg>\n" });
157
+ }
158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTypeaheadSearchIcon, decorators: [{
159
+ type: Component,
160
+ args: [{ selector: "nice-typeahead-search-icon", template: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M1.4720451262 13.356970375A9.063 9.063 0 1 0 18.154024235 6.267298379a9.063 9.063 0 1 0 -16.6819791088 7.089671996Z\" fill=\"none\" stroke=\"#000000\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"></path>\n <path d=\"m16.221 16.22 7.029 7.03\" fill=\"none\" stroke=\"#000000\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"></path>\n</svg>\n" }]
161
+ }] });
162
+
154
163
  /**
155
164
  * Implementation of the same panel and overlay logic as the official Angular MatSelect.
156
165
  * This used some of the logic from MatSelect to make this component look and feel like a MatSelect.
@@ -163,6 +172,7 @@ class NiceTypeaheadBase {
163
172
  optionTemplate = input();
164
173
  panelClass = input([]);
165
174
  canRemoveValue = input(true);
175
+ selected = output();
166
176
  static nextId = 0;
167
177
  _input = viewChild("input");
168
178
  _panel = viewChild("panel");
@@ -237,6 +247,7 @@ class NiceTypeaheadBase {
237
247
  const hasAssigned = this._assignValue(value);
238
248
  if (hasAssigned) {
239
249
  this._onChange?.(value);
250
+ this.selected.emit(value);
240
251
  }
241
252
  }
242
253
  get empty() {
@@ -258,9 +269,7 @@ class NiceTypeaheadBase {
258
269
  return this._panelOpen;
259
270
  }
260
271
  constructor() {
261
- effect(() => {
262
- this._input()?.nativeElement.focus();
263
- });
272
+ effect(() => this._input()?.nativeElement.focus());
264
273
  if (this.ngControl) {
265
274
  // Note: we provide the value accessor through here, instead of
266
275
  // the `providers` to avoid running into a circular import.
@@ -617,7 +626,7 @@ class NiceTypeaheadBase {
617
626
  return false;
618
627
  }
619
628
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTypeaheadBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
620
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.10", type: NiceTypeaheadBase, isStandalone: true, inputs: { noItemsFoundLabel: { classPropertyName: "noItemsFoundLabel", publicName: "noItemsFoundLabel", isSignal: true, isRequired: false, transformFunction: null }, labelProperty: { classPropertyName: "labelProperty", publicName: "labelProperty", isSignal: true, isRequired: false, transformFunction: null }, formatLabelFn: { classPropertyName: "formatLabelFn", publicName: "formatLabelFn", isSignal: true, isRequired: false, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, canRemoveValue: { classPropertyName: "canRemoveValue", publicName: "canRemoveValue", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_input", first: true, predicate: ["input"], descendants: true, isSignal: true }, { propertyName: "_panel", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "_overlayDir", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }, { propertyName: "options", predicate: MatOption, descendants: true }], ngImport: i0 });
629
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.10", type: NiceTypeaheadBase, isStandalone: true, inputs: { noItemsFoundLabel: { classPropertyName: "noItemsFoundLabel", publicName: "noItemsFoundLabel", isSignal: true, isRequired: false, transformFunction: null }, labelProperty: { classPropertyName: "labelProperty", publicName: "labelProperty", isSignal: true, isRequired: false, transformFunction: null }, formatLabelFn: { classPropertyName: "formatLabelFn", publicName: "formatLabelFn", isSignal: true, isRequired: false, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, canRemoveValue: { classPropertyName: "canRemoveValue", publicName: "canRemoveValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, viewQueries: [{ propertyName: "_input", first: true, predicate: ["input"], descendants: true, isSignal: true }, { propertyName: "_panel", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "_overlayDir", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }, { propertyName: "options", predicate: MatOption, descendants: true }], ngImport: i0 });
621
630
  }
622
631
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTypeaheadBase, decorators: [{
623
632
  type: Directive
@@ -648,14 +657,8 @@ class NiceAsyncTypeahead extends NiceTypeaheadBase {
648
657
  lastScrollHeight = 0;
649
658
  constructor() {
650
659
  super();
651
- effect(() => {
652
- this.service.setSearchOptions(this.searchOptions());
653
- }, {
654
- allowSignalWrites: true
655
- });
656
- effect(() => this.service.search(this._searchValue()), {
657
- allowSignalWrites: true
658
- });
660
+ effect(() => this.service.setSearchOptions(this.searchOptions()));
661
+ effect(() => this.service.search(this._searchValue()));
659
662
  effect(() => {
660
663
  const container = this.optionsContainer();
661
664
  if (!container) {
@@ -681,6 +684,9 @@ class NiceAsyncTypeahead extends NiceTypeaheadBase {
681
684
  super.removeActiveValue();
682
685
  this.service.setActive(null);
683
686
  }
687
+ setSearchOptions(options) {
688
+ this.service.setSearchOptions(options);
689
+ }
684
690
  onScroll(event) {
685
691
  const target = event.target;
686
692
  const threshold = (this.scrollThresholdPercent * 100 * target.scrollHeight) / 100;
@@ -697,7 +703,7 @@ class NiceAsyncTypeahead extends NiceTypeaheadBase {
697
703
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: NiceAsyncTypeahead, isStandalone: true, selector: "nice-async-typeahead", inputs: { resource: { classPropertyName: "resource", publicName: "resource", isSignal: true, isRequired: true, transformFunction: null }, searchOptions: { classPropertyName: "searchOptions", publicName: "searchOptions", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "combobox", "aria-haspopup": "listbox" }, listeners: { "keydown": "_handleKeydown($event)", "focus": "onFocusChanged(true)", "blur": "onFocusChanged(false)" }, properties: { "attr.id": "id", "attr.aria-controls": "panelOpen ? id + \"-panel\" : null", "attr.aria-expanded": "panelOpen", "attr.aria-required": "required.toString()", "attr.aria-disabled": "disabled.toString()", "attr.aria-invalid": "errorState", "class.nice-typeahead-disabled": "disabled", "class.nice-typeahead-invalid": "errorState", "class.nice-typeahead-required": "required", "class.nice-typeahead-empty": "empty" }, classAttribute: "nice-typeahead" }, providers: [
698
704
  { provide: MatFormFieldControl, useExisting: NiceAsyncTypeahead },
699
705
  NiceTypeaheadService
700
- ], viewQueries: [{ propertyName: "optionsContainer", first: true, predicate: ["optionsContainer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n class=\"nice-typeahead\"\n cdk-overlay-origin\n>\n <div class=\"nice-typeahead-value\">\n @if (_empty()) {\n <span class=\"nice-typeahead-placeholder mat-mdc-select-min-line\">{{ _placeholder() }}</span>\n } @else {\n <span class=\"nice-typeahead-value-text\">\n <span class=\"mat-mdc-select-min-line\">\n @if (_value(); as activeValue) {\n {{ formatLabel(activeValue) }}\n }\n </span>\n </span>\n }\n </div>\n\n <div class=\"nice-typeahead-suffix\">\n @if (_empty()) {\n <div class=\"mat-mdc-select-arrow\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M7 10l5 5 5-5z\"></path>\n </svg>\n </div>\n } @else if (canRemoveValue()) {\n <button class=\"nice-typeahead-remove\" mat-icon-button (click)=\"$event.stopPropagation(); removeActiveValue()\">\n <svg viewBox=\"0 -960 960 960\">\n <path d=\"m291-240-51-51 189-189-189-189 51-51 189 189 189-189 51 51-189 189 189 189-51 51-189-189-189 189Z\"/>\n </svg>\n </button>\n }\n </div>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"_overlayWidth\"\n [cdkConnectedOverlayOrigin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\n (attach)=\"_onAttached()\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n #panel\n role=\"listbox\"\n tabindex=\"-1\"\n class=\"nice-typeahead-panel nice-typeahead--open nice-typehead-animations-enabled\"\n [ngClass]=\"panelClass()\"\n [attr.id]=\"id + '-panel'\"\n (keydown)=\"_handleKeydown($event)\"\n (scrollend)=\"_handleScrollEnd()\"\n >\n <div class=\"nice-typeahead-search-input\">\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <input\n #input\n class=\"nice-typeahead__input\"\n matInput\n [formControl]=\"_searchControl\"\n >\n </mat-form-field>\n </div>\n\n <div #optionsContainer class=\"nice-typeahead-options\" role=\"presentation\">\n @for (item of filteredValues(); track item) {\n <mat-option [value]=\"item\">\n @if (optionTemplate(); as optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: item }\"></ng-container>\n } @else {\n {{ formatLabel(item) }}\n }\n </mat-option>\n } @empty {\n <mat-option disabled>\n <span class=\"nice-typeahead__no-items\">\n {{ noItemsFoundLabel() }}\n </span>\n </mat-option>\n }\n </div>\n </div>\n</ng-template>\n", styles: ["nice-typeahead,nice-async-typeahead{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-app-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-app-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-app-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-app-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-app-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-app-body-large-tracking))}nice-typeahead.nice-typeahead-disabled,nice-async-typeahead.nice-typeahead-disabled{color:var(--mat-select-disabled-trigger-text-color)}nice-typeahead.nice-typeahead-disabled .mat-mdc-select-arrow,nice-typeahead.nice-typeahead-disabled .nice-typeahead-remove,nice-async-typeahead.nice-typeahead-disabled .mat-mdc-select-arrow,nice-async-typeahead.nice-typeahead-disabled .nice-typeahead-remove{color:var(--mat-select-disabled-trigger-text-color)}nice-typeahead.nice-typeahead-invalid .mat-mdc-select-arrow,nice-async-typeahead.nice-typeahead-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}nice-typeahead .nice-typeahead,nice-async-typeahead .nice-typeahead{width:100%;display:inline-flex;align-items:center;justify-content:space-between;cursor:pointer;position:relative;box-sizing:border-box}nice-typeahead .nice-typeahead-suffix,nice-async-typeahead .nice-typeahead-suffix{height:24px;flex-shrink:0;display:inline-flex;align-items:center;--mdc-icon-button-state-layer-size: 24px}nice-typeahead .nice-typeahead-suffix .nice-typeahead-remove,nice-async-typeahead .nice-typeahead-suffix .nice-typeahead-remove{margin-right:-6px}nice-typeahead .nice-typeahead-value,nice-async-typeahead .nice-typeahead-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nice-typeahead .nice-typeahead-value-text,nice-async-typeahead .nice-typeahead-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}nice-typeahead .mat-mdc-select-min-line:empty:before,nice-async-typeahead .mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}nice-typeahead .nice-typeahead__input,nice-async-typeahead .nice-typeahead__input{border:none;outline:none;box-shadow:none;background:none;padding:0;margin:0;color:inherit}.mat-mdc-form-field-type-nice-typeahead:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-nice-typeahead.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}@keyframes _nice-typeahead-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _nice-typeahead-exit{0%{opacity:1}to{opacity:0}}div.nice-typeahead-panel{width:100%;outline:0;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color, var(--mat-app-surface-container))}div.nice-typeahead-panel .nice-typeahead-search-input{padding-left:8px;padding-right:8px;padding-bottom:8px}div.nice-typeahead-panel .nice-typeahead-search-input .mat-mdc-form-field,div.nice-typeahead-panel .nice-typeahead-search-input .mat-mdc-form-field-infix{width:100%}div.nice-typeahead-panel .nice-typeahead-options{overflow:auto;max-height:384px}div.nice-typeahead-panel{box-shadow:var(--mat-select-container-elevation-shadow)}.nice-typehead-animations-enabled{animation:_nice-typeahead-enter .12s cubic-bezier(0,0,.2,1)}.nice-typehead-animations-enabled.mat-select-panel-exit{animation:_nice-typeahead-exit .1s linear}\n"], dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
706
+ ], viewQueries: [{ propertyName: "optionsContainer", first: true, predicate: ["optionsContainer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n class=\"nice-typeahead\"\n cdk-overlay-origin\n>\n <div class=\"nice-typeahead-value\">\n @if (_empty()) {\n <span class=\"nice-typeahead-placeholder mat-mdc-select-min-line\">{{ _placeholder() }}</span>\n } @else {\n <span class=\"nice-typeahead-value-text\">\n <span class=\"mat-mdc-select-min-line\">\n @if (_value(); as activeValue) {\n {{ formatLabel(activeValue) }}\n }\n </span>\n </span>\n }\n </div>\n\n <div class=\"nice-typeahead-suffix\">\n @if (_empty()) {\n <div class=\"mat-mdc-select-arrow\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M7 10l5 5 5-5z\"></path>\n </svg>\n </div>\n } @else if (canRemoveValue()) {\n <button class=\"nice-typeahead-remove\" mat-icon-button (click)=\"$event.stopPropagation(); removeActiveValue()\">\n <svg viewBox=\"0 -960 960 960\">\n <path d=\"m291-240-51-51 189-189-189-189 51-51 189 189 189-189 51 51-189 189 189 189-51 51-189-189-189 189Z\"/>\n </svg>\n </button>\n }\n </div>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"_overlayWidth\"\n [cdkConnectedOverlayOrigin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\n (attach)=\"_onAttached()\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n #panel\n role=\"listbox\"\n tabindex=\"-1\"\n class=\"nice-typeahead-panel nice-typeahead--open nice-typehead-animations-enabled\"\n [ngClass]=\"panelClass()\"\n [attr.id]=\"id + '-panel'\"\n (keydown)=\"_handleKeydown($event)\"\n (scrollend)=\"_handleScrollEnd()\"\n >\n <div class=\"nice-typeahead-search-input\">\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <input\n #input\n class=\"nice-typeahead__input\"\n matInput\n [formControl]=\"_searchControl\"\n >\n\n <nice-typeahead-search-icon matIconPrefix />\n </mat-form-field>\n </div>\n\n <div #optionsContainer class=\"nice-typeahead-options\" role=\"presentation\">\n @for (item of filteredValues(); track item) {\n <mat-option [value]=\"item\">\n @if (optionTemplate(); as optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: item }\"></ng-container>\n } @else {\n {{ formatLabel(item) }}\n }\n </mat-option>\n } @empty {\n <mat-option disabled>\n <span class=\"nice-typeahead__no-items\">\n {{ noItemsFoundLabel() }}\n </span>\n </mat-option>\n }\n </div>\n </div>\n</ng-template>\n", styles: ["nice-typeahead,nice-async-typeahead{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-app-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-app-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-app-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-app-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-app-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-app-body-large-tracking))}nice-typeahead.nice-typeahead-disabled,nice-async-typeahead.nice-typeahead-disabled{color:var(--mat-select-disabled-trigger-text-color)}nice-typeahead.nice-typeahead-disabled .mat-mdc-select-arrow,nice-typeahead.nice-typeahead-disabled .nice-typeahead-remove,nice-async-typeahead.nice-typeahead-disabled .mat-mdc-select-arrow,nice-async-typeahead.nice-typeahead-disabled .nice-typeahead-remove{color:var(--mat-select-disabled-trigger-text-color)}nice-typeahead.nice-typeahead-invalid .mat-mdc-select-arrow,nice-async-typeahead.nice-typeahead-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}nice-typeahead .nice-typeahead,nice-async-typeahead .nice-typeahead{width:100%;display:inline-flex;align-items:center;justify-content:space-between;cursor:pointer;position:relative;box-sizing:border-box}nice-typeahead .nice-typeahead-suffix,nice-async-typeahead .nice-typeahead-suffix{height:24px;flex-shrink:0;display:inline-flex;align-items:center;--mdc-icon-button-state-layer-size: 24px}nice-typeahead .nice-typeahead-suffix .nice-typeahead-remove,nice-async-typeahead .nice-typeahead-suffix .nice-typeahead-remove{margin-right:-6px}nice-typeahead .nice-typeahead-value,nice-async-typeahead .nice-typeahead-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nice-typeahead .nice-typeahead-value-text,nice-async-typeahead .nice-typeahead-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}nice-typeahead .mat-mdc-select-min-line:empty:before,nice-async-typeahead .mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}nice-typeahead .nice-typeahead__input,nice-async-typeahead .nice-typeahead__input{border:none;outline:none;box-shadow:none;background:none;padding:0;margin:0;color:inherit}.mat-mdc-form-field-type-nice-typeahead:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-nice-typeahead.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}@keyframes _nice-typeahead-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _nice-typeahead-exit{0%{opacity:1}to{opacity:0}}div.nice-typeahead-panel{width:100%;outline:0;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color, var(--mat-app-surface-container))}div.nice-typeahead-panel nice-typeahead-search-icon{width:16px;height:16px;margin-right:8px;margin-left:16px}div.nice-typeahead-panel nice-typeahead-search-icon svg{width:16px;height:16px}div.nice-typeahead-panel .nice-typeahead-search-input{padding-left:8px;padding-right:8px;padding-bottom:8px}div.nice-typeahead-panel .nice-typeahead-search-input .mat-mdc-form-field,div.nice-typeahead-panel .nice-typeahead-search-input .mat-mdc-form-field-infix{width:100%}div.nice-typeahead-panel .nice-typeahead-options{overflow:auto;max-height:384px}div.nice-typeahead-panel{box-shadow:var(--mat-select-container-elevation-shadow)}.nice-typehead-animations-enabled{animation:_nice-typeahead-enter .12s cubic-bezier(0,0,.2,1)}.nice-typehead-animations-enabled.mat-select-panel-exit{animation:_nice-typeahead-exit .1s linear}\n"], dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NiceTypeaheadSearchIcon, selector: "nice-typeahead-search-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
701
707
  }
702
708
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceAsyncTypeahead, decorators: [{
703
709
  type: Component,
@@ -709,8 +715,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
709
715
  MatFormField,
710
716
  MatInput,
711
717
  MatIconButton,
718
+ MatPrefix,
712
719
  NgClass,
713
- NgTemplateOutlet
720
+ NgTemplateOutlet,
721
+ NiceTypeaheadSearchIcon
714
722
  ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
715
723
  { provide: MatFormFieldControl, useExisting: NiceAsyncTypeahead },
716
724
  NiceTypeaheadService
@@ -731,7 +739,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
731
739
  "(keydown)": "_handleKeydown($event)",
732
740
  "(focus)": "onFocusChanged(true)",
733
741
  "(blur)": "onFocusChanged(false)"
734
- }, template: "<div\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n class=\"nice-typeahead\"\n cdk-overlay-origin\n>\n <div class=\"nice-typeahead-value\">\n @if (_empty()) {\n <span class=\"nice-typeahead-placeholder mat-mdc-select-min-line\">{{ _placeholder() }}</span>\n } @else {\n <span class=\"nice-typeahead-value-text\">\n <span class=\"mat-mdc-select-min-line\">\n @if (_value(); as activeValue) {\n {{ formatLabel(activeValue) }}\n }\n </span>\n </span>\n }\n </div>\n\n <div class=\"nice-typeahead-suffix\">\n @if (_empty()) {\n <div class=\"mat-mdc-select-arrow\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M7 10l5 5 5-5z\"></path>\n </svg>\n </div>\n } @else if (canRemoveValue()) {\n <button class=\"nice-typeahead-remove\" mat-icon-button (click)=\"$event.stopPropagation(); removeActiveValue()\">\n <svg viewBox=\"0 -960 960 960\">\n <path d=\"m291-240-51-51 189-189-189-189 51-51 189 189 189-189 51 51-189 189 189 189-51 51-189-189-189 189Z\"/>\n </svg>\n </button>\n }\n </div>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"_overlayWidth\"\n [cdkConnectedOverlayOrigin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\n (attach)=\"_onAttached()\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n #panel\n role=\"listbox\"\n tabindex=\"-1\"\n class=\"nice-typeahead-panel nice-typeahead--open nice-typehead-animations-enabled\"\n [ngClass]=\"panelClass()\"\n [attr.id]=\"id + '-panel'\"\n (keydown)=\"_handleKeydown($event)\"\n (scrollend)=\"_handleScrollEnd()\"\n >\n <div class=\"nice-typeahead-search-input\">\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <input\n #input\n class=\"nice-typeahead__input\"\n matInput\n [formControl]=\"_searchControl\"\n >\n </mat-form-field>\n </div>\n\n <div #optionsContainer class=\"nice-typeahead-options\" role=\"presentation\">\n @for (item of filteredValues(); track item) {\n <mat-option [value]=\"item\">\n @if (optionTemplate(); as optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: item }\"></ng-container>\n } @else {\n {{ formatLabel(item) }}\n }\n </mat-option>\n } @empty {\n <mat-option disabled>\n <span class=\"nice-typeahead__no-items\">\n {{ noItemsFoundLabel() }}\n </span>\n </mat-option>\n }\n </div>\n </div>\n</ng-template>\n", styles: ["nice-typeahead,nice-async-typeahead{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-app-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-app-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-app-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-app-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-app-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-app-body-large-tracking))}nice-typeahead.nice-typeahead-disabled,nice-async-typeahead.nice-typeahead-disabled{color:var(--mat-select-disabled-trigger-text-color)}nice-typeahead.nice-typeahead-disabled .mat-mdc-select-arrow,nice-typeahead.nice-typeahead-disabled .nice-typeahead-remove,nice-async-typeahead.nice-typeahead-disabled .mat-mdc-select-arrow,nice-async-typeahead.nice-typeahead-disabled .nice-typeahead-remove{color:var(--mat-select-disabled-trigger-text-color)}nice-typeahead.nice-typeahead-invalid .mat-mdc-select-arrow,nice-async-typeahead.nice-typeahead-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}nice-typeahead .nice-typeahead,nice-async-typeahead .nice-typeahead{width:100%;display:inline-flex;align-items:center;justify-content:space-between;cursor:pointer;position:relative;box-sizing:border-box}nice-typeahead .nice-typeahead-suffix,nice-async-typeahead .nice-typeahead-suffix{height:24px;flex-shrink:0;display:inline-flex;align-items:center;--mdc-icon-button-state-layer-size: 24px}nice-typeahead .nice-typeahead-suffix .nice-typeahead-remove,nice-async-typeahead .nice-typeahead-suffix .nice-typeahead-remove{margin-right:-6px}nice-typeahead .nice-typeahead-value,nice-async-typeahead .nice-typeahead-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nice-typeahead .nice-typeahead-value-text,nice-async-typeahead .nice-typeahead-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}nice-typeahead .mat-mdc-select-min-line:empty:before,nice-async-typeahead .mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}nice-typeahead .nice-typeahead__input,nice-async-typeahead .nice-typeahead__input{border:none;outline:none;box-shadow:none;background:none;padding:0;margin:0;color:inherit}.mat-mdc-form-field-type-nice-typeahead:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-nice-typeahead.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}@keyframes _nice-typeahead-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _nice-typeahead-exit{0%{opacity:1}to{opacity:0}}div.nice-typeahead-panel{width:100%;outline:0;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color, var(--mat-app-surface-container))}div.nice-typeahead-panel .nice-typeahead-search-input{padding-left:8px;padding-right:8px;padding-bottom:8px}div.nice-typeahead-panel .nice-typeahead-search-input .mat-mdc-form-field,div.nice-typeahead-panel .nice-typeahead-search-input .mat-mdc-form-field-infix{width:100%}div.nice-typeahead-panel .nice-typeahead-options{overflow:auto;max-height:384px}div.nice-typeahead-panel{box-shadow:var(--mat-select-container-elevation-shadow)}.nice-typehead-animations-enabled{animation:_nice-typeahead-enter .12s cubic-bezier(0,0,.2,1)}.nice-typehead-animations-enabled.mat-select-panel-exit{animation:_nice-typeahead-exit .1s linear}\n"] }]
742
+ }, template: "<div\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n class=\"nice-typeahead\"\n cdk-overlay-origin\n>\n <div class=\"nice-typeahead-value\">\n @if (_empty()) {\n <span class=\"nice-typeahead-placeholder mat-mdc-select-min-line\">{{ _placeholder() }}</span>\n } @else {\n <span class=\"nice-typeahead-value-text\">\n <span class=\"mat-mdc-select-min-line\">\n @if (_value(); as activeValue) {\n {{ formatLabel(activeValue) }}\n }\n </span>\n </span>\n }\n </div>\n\n <div class=\"nice-typeahead-suffix\">\n @if (_empty()) {\n <div class=\"mat-mdc-select-arrow\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M7 10l5 5 5-5z\"></path>\n </svg>\n </div>\n } @else if (canRemoveValue()) {\n <button class=\"nice-typeahead-remove\" mat-icon-button (click)=\"$event.stopPropagation(); removeActiveValue()\">\n <svg viewBox=\"0 -960 960 960\">\n <path d=\"m291-240-51-51 189-189-189-189 51-51 189 189 189-189 51 51-189 189 189 189-51 51-189-189-189 189Z\"/>\n </svg>\n </button>\n }\n </div>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"_overlayWidth\"\n [cdkConnectedOverlayOrigin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\n (attach)=\"_onAttached()\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n #panel\n role=\"listbox\"\n tabindex=\"-1\"\n class=\"nice-typeahead-panel nice-typeahead--open nice-typehead-animations-enabled\"\n [ngClass]=\"panelClass()\"\n [attr.id]=\"id + '-panel'\"\n (keydown)=\"_handleKeydown($event)\"\n (scrollend)=\"_handleScrollEnd()\"\n >\n <div class=\"nice-typeahead-search-input\">\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <input\n #input\n class=\"nice-typeahead__input\"\n matInput\n [formControl]=\"_searchControl\"\n >\n\n <nice-typeahead-search-icon matIconPrefix />\n </mat-form-field>\n </div>\n\n <div #optionsContainer class=\"nice-typeahead-options\" role=\"presentation\">\n @for (item of filteredValues(); track item) {\n <mat-option [value]=\"item\">\n @if (optionTemplate(); as optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: item }\"></ng-container>\n } @else {\n {{ formatLabel(item) }}\n }\n </mat-option>\n } @empty {\n <mat-option disabled>\n <span class=\"nice-typeahead__no-items\">\n {{ noItemsFoundLabel() }}\n </span>\n </mat-option>\n }\n </div>\n </div>\n</ng-template>\n", styles: ["nice-typeahead,nice-async-typeahead{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-app-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-app-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-app-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-app-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-app-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-app-body-large-tracking))}nice-typeahead.nice-typeahead-disabled,nice-async-typeahead.nice-typeahead-disabled{color:var(--mat-select-disabled-trigger-text-color)}nice-typeahead.nice-typeahead-disabled .mat-mdc-select-arrow,nice-typeahead.nice-typeahead-disabled .nice-typeahead-remove,nice-async-typeahead.nice-typeahead-disabled .mat-mdc-select-arrow,nice-async-typeahead.nice-typeahead-disabled .nice-typeahead-remove{color:var(--mat-select-disabled-trigger-text-color)}nice-typeahead.nice-typeahead-invalid .mat-mdc-select-arrow,nice-async-typeahead.nice-typeahead-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}nice-typeahead .nice-typeahead,nice-async-typeahead .nice-typeahead{width:100%;display:inline-flex;align-items:center;justify-content:space-between;cursor:pointer;position:relative;box-sizing:border-box}nice-typeahead .nice-typeahead-suffix,nice-async-typeahead .nice-typeahead-suffix{height:24px;flex-shrink:0;display:inline-flex;align-items:center;--mdc-icon-button-state-layer-size: 24px}nice-typeahead .nice-typeahead-suffix .nice-typeahead-remove,nice-async-typeahead .nice-typeahead-suffix .nice-typeahead-remove{margin-right:-6px}nice-typeahead .nice-typeahead-value,nice-async-typeahead .nice-typeahead-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nice-typeahead .nice-typeahead-value-text,nice-async-typeahead .nice-typeahead-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}nice-typeahead .mat-mdc-select-min-line:empty:before,nice-async-typeahead .mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}nice-typeahead .nice-typeahead__input,nice-async-typeahead .nice-typeahead__input{border:none;outline:none;box-shadow:none;background:none;padding:0;margin:0;color:inherit}.mat-mdc-form-field-type-nice-typeahead:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-nice-typeahead.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}@keyframes _nice-typeahead-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _nice-typeahead-exit{0%{opacity:1}to{opacity:0}}div.nice-typeahead-panel{width:100%;outline:0;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color, var(--mat-app-surface-container))}div.nice-typeahead-panel nice-typeahead-search-icon{width:16px;height:16px;margin-right:8px;margin-left:16px}div.nice-typeahead-panel nice-typeahead-search-icon svg{width:16px;height:16px}div.nice-typeahead-panel .nice-typeahead-search-input{padding-left:8px;padding-right:8px;padding-bottom:8px}div.nice-typeahead-panel .nice-typeahead-search-input .mat-mdc-form-field,div.nice-typeahead-panel .nice-typeahead-search-input .mat-mdc-form-field-infix{width:100%}div.nice-typeahead-panel .nice-typeahead-options{overflow:auto;max-height:384px}div.nice-typeahead-panel{box-shadow:var(--mat-select-container-elevation-shadow)}.nice-typehead-animations-enabled{animation:_nice-typeahead-enter .12s cubic-bezier(0,0,.2,1)}.nice-typehead-animations-enabled.mat-select-panel-exit{animation:_nice-typeahead-exit .1s linear}\n"] }]
735
743
  }], ctorParameters: () => [] });
736
744
 
737
745
  class NiceTypeahead extends NiceTypeaheadBase {
@@ -770,7 +778,7 @@ class NiceTypeahead extends NiceTypeaheadBase {
770
778
  });
771
779
  }
772
780
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTypeahead, deps: null, target: i0.ɵɵFactoryTarget.Component });
773
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: NiceTypeahead, isStandalone: true, selector: "nice-typeahead", inputs: { values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: true, transformFunction: null }, searchFn: { classPropertyName: "searchFn", publicName: "searchFn", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "combobox", "aria-haspopup": "listbox" }, listeners: { "keydown": "_handleKeydown($event)", "focus": "onFocusChanged(true)", "blur": "onFocusChanged(false)" }, properties: { "attr.id": "id", "attr.aria-controls": "panelOpen ? id + \"-panel\" : null", "attr.aria-expanded": "panelOpen", "attr.aria-required": "required.toString()", "attr.aria-disabled": "disabled.toString()", "attr.aria-invalid": "errorState", "class.nice-typeahead-disabled": "disabled", "class.nice-typeahead-invalid": "errorState", "class.nice-typeahead-required": "required", "class.nice-typeahead-empty": "empty" }, classAttribute: "nice-typeahead" }, providers: [{ provide: MatFormFieldControl, useExisting: NiceTypeahead }], usesInheritance: true, ngImport: i0, template: "<div\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n class=\"nice-typeahead\"\n cdk-overlay-origin\n>\n <div class=\"nice-typeahead-value\">\n @if (_empty()) {\n <span class=\"nice-typeahead-placeholder mat-mdc-select-min-line\">{{ _placeholder() }}</span>\n } @else {\n <span class=\"nice-typeahead-value-text\">\n <span class=\"mat-mdc-select-min-line\">\n @if (_value(); as activeValue) {\n {{ formatLabel(activeValue) }}\n }\n </span>\n </span>\n }\n </div>\n\n <div class=\"nice-typeahead-suffix\">\n @if (_empty()) {\n <div class=\"mat-mdc-select-arrow\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M7 10l5 5 5-5z\"></path>\n </svg>\n </div>\n } @else if (canRemoveValue()) {\n <button class=\"nice-typeahead-remove\" mat-icon-button (click)=\"$event.stopPropagation(); removeActiveValue()\">\n <svg viewBox=\"0 -960 960 960\">\n <path d=\"m291-240-51-51 189-189-189-189 51-51 189 189 189-189 51 51-189 189 189 189-51 51-189-189-189 189Z\"/>\n </svg>\n </button>\n }\n </div>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"_overlayWidth\"\n [cdkConnectedOverlayOrigin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\n (attach)=\"_onAttached()\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n #panel\n role=\"listbox\"\n tabindex=\"-1\"\n class=\"nice-typeahead-panel nice-typeahead--open nice-typehead-animations-enabled\"\n [ngClass]=\"panelClass()\"\n [attr.id]=\"id + '-panel'\"\n (keydown)=\"_handleKeydown($event)\"\n (scrollend)=\"_handleScrollEnd()\"\n >\n <div class=\"nice-typeahead-search-input\">\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <input\n #input\n class=\"nice-typeahead__input\"\n matInput\n [formControl]=\"_searchControl\"\n >\n </mat-form-field>\n </div>\n\n <div #optionsContainer class=\"nice-typeahead-options\" role=\"presentation\">\n @for (item of filteredValues(); track item) {\n <mat-option [value]=\"item\">\n @if (optionTemplate(); as optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: item }\"></ng-container>\n } @else {\n {{ formatLabel(item) }}\n }\n </mat-option>\n } @empty {\n <mat-option disabled>\n <span class=\"nice-typeahead__no-items\">\n {{ noItemsFoundLabel() }}\n </span>\n </mat-option>\n }\n </div>\n </div>\n</ng-template>\n", styles: ["nice-typeahead,nice-async-typeahead{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-app-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-app-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-app-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-app-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-app-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-app-body-large-tracking))}nice-typeahead.nice-typeahead-disabled,nice-async-typeahead.nice-typeahead-disabled{color:var(--mat-select-disabled-trigger-text-color)}nice-typeahead.nice-typeahead-disabled .mat-mdc-select-arrow,nice-typeahead.nice-typeahead-disabled .nice-typeahead-remove,nice-async-typeahead.nice-typeahead-disabled .mat-mdc-select-arrow,nice-async-typeahead.nice-typeahead-disabled .nice-typeahead-remove{color:var(--mat-select-disabled-trigger-text-color)}nice-typeahead.nice-typeahead-invalid .mat-mdc-select-arrow,nice-async-typeahead.nice-typeahead-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}nice-typeahead .nice-typeahead,nice-async-typeahead .nice-typeahead{width:100%;display:inline-flex;align-items:center;justify-content:space-between;cursor:pointer;position:relative;box-sizing:border-box}nice-typeahead .nice-typeahead-suffix,nice-async-typeahead .nice-typeahead-suffix{height:24px;flex-shrink:0;display:inline-flex;align-items:center;--mdc-icon-button-state-layer-size: 24px}nice-typeahead .nice-typeahead-suffix .nice-typeahead-remove,nice-async-typeahead .nice-typeahead-suffix .nice-typeahead-remove{margin-right:-6px}nice-typeahead .nice-typeahead-value,nice-async-typeahead .nice-typeahead-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nice-typeahead .nice-typeahead-value-text,nice-async-typeahead .nice-typeahead-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}nice-typeahead .mat-mdc-select-min-line:empty:before,nice-async-typeahead .mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}nice-typeahead .nice-typeahead__input,nice-async-typeahead .nice-typeahead__input{border:none;outline:none;box-shadow:none;background:none;padding:0;margin:0;color:inherit}.mat-mdc-form-field-type-nice-typeahead:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-nice-typeahead.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}@keyframes _nice-typeahead-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _nice-typeahead-exit{0%{opacity:1}to{opacity:0}}div.nice-typeahead-panel{width:100%;outline:0;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color, var(--mat-app-surface-container))}div.nice-typeahead-panel .nice-typeahead-search-input{padding-left:8px;padding-right:8px;padding-bottom:8px}div.nice-typeahead-panel .nice-typeahead-search-input .mat-mdc-form-field,div.nice-typeahead-panel .nice-typeahead-search-input .mat-mdc-form-field-infix{width:100%}div.nice-typeahead-panel .nice-typeahead-options{overflow:auto;max-height:384px}div.nice-typeahead-panel{box-shadow:var(--mat-select-container-elevation-shadow)}.nice-typehead-animations-enabled{animation:_nice-typeahead-enter .12s cubic-bezier(0,0,.2,1)}.nice-typehead-animations-enabled.mat-select-panel-exit{animation:_nice-typeahead-exit .1s linear}\n"], dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
781
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: NiceTypeahead, isStandalone: true, selector: "nice-typeahead", inputs: { values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: true, transformFunction: null }, searchFn: { classPropertyName: "searchFn", publicName: "searchFn", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "combobox", "aria-haspopup": "listbox" }, listeners: { "keydown": "_handleKeydown($event)", "focus": "onFocusChanged(true)", "blur": "onFocusChanged(false)" }, properties: { "attr.id": "id", "attr.aria-controls": "panelOpen ? id + \"-panel\" : null", "attr.aria-expanded": "panelOpen", "attr.aria-required": "required.toString()", "attr.aria-disabled": "disabled.toString()", "attr.aria-invalid": "errorState", "class.nice-typeahead-disabled": "disabled", "class.nice-typeahead-invalid": "errorState", "class.nice-typeahead-required": "required", "class.nice-typeahead-empty": "empty" }, classAttribute: "nice-typeahead" }, providers: [{ provide: MatFormFieldControl, useExisting: NiceTypeahead }], usesInheritance: true, ngImport: i0, template: "<div\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n class=\"nice-typeahead\"\n cdk-overlay-origin\n>\n <div class=\"nice-typeahead-value\">\n @if (_empty()) {\n <span class=\"nice-typeahead-placeholder mat-mdc-select-min-line\">{{ _placeholder() }}</span>\n } @else {\n <span class=\"nice-typeahead-value-text\">\n <span class=\"mat-mdc-select-min-line\">\n @if (_value(); as activeValue) {\n {{ formatLabel(activeValue) }}\n }\n </span>\n </span>\n }\n </div>\n\n <div class=\"nice-typeahead-suffix\">\n @if (_empty()) {\n <div class=\"mat-mdc-select-arrow\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M7 10l5 5 5-5z\"></path>\n </svg>\n </div>\n } @else if (canRemoveValue()) {\n <button class=\"nice-typeahead-remove\" mat-icon-button (click)=\"$event.stopPropagation(); removeActiveValue()\">\n <svg viewBox=\"0 -960 960 960\">\n <path d=\"m291-240-51-51 189-189-189-189 51-51 189 189 189-189 51 51-189 189 189 189-51 51-189-189-189 189Z\"/>\n </svg>\n </button>\n }\n </div>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"_overlayWidth\"\n [cdkConnectedOverlayOrigin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\n (attach)=\"_onAttached()\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n #panel\n role=\"listbox\"\n tabindex=\"-1\"\n class=\"nice-typeahead-panel nice-typeahead--open nice-typehead-animations-enabled\"\n [ngClass]=\"panelClass()\"\n [attr.id]=\"id + '-panel'\"\n (keydown)=\"_handleKeydown($event)\"\n (scrollend)=\"_handleScrollEnd()\"\n >\n <div class=\"nice-typeahead-search-input\">\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <input\n #input\n class=\"nice-typeahead__input\"\n matInput\n [formControl]=\"_searchControl\"\n >\n\n <nice-typeahead-search-icon matIconPrefix />\n </mat-form-field>\n </div>\n\n <div #optionsContainer class=\"nice-typeahead-options\" role=\"presentation\">\n @for (item of filteredValues(); track item) {\n <mat-option [value]=\"item\">\n @if (optionTemplate(); as optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: item }\"></ng-container>\n } @else {\n {{ formatLabel(item) }}\n }\n </mat-option>\n } @empty {\n <mat-option disabled>\n <span class=\"nice-typeahead__no-items\">\n {{ noItemsFoundLabel() }}\n </span>\n </mat-option>\n }\n </div>\n </div>\n</ng-template>\n", styles: ["nice-typeahead,nice-async-typeahead{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-app-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-app-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-app-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-app-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-app-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-app-body-large-tracking))}nice-typeahead.nice-typeahead-disabled,nice-async-typeahead.nice-typeahead-disabled{color:var(--mat-select-disabled-trigger-text-color)}nice-typeahead.nice-typeahead-disabled .mat-mdc-select-arrow,nice-typeahead.nice-typeahead-disabled .nice-typeahead-remove,nice-async-typeahead.nice-typeahead-disabled .mat-mdc-select-arrow,nice-async-typeahead.nice-typeahead-disabled .nice-typeahead-remove{color:var(--mat-select-disabled-trigger-text-color)}nice-typeahead.nice-typeahead-invalid .mat-mdc-select-arrow,nice-async-typeahead.nice-typeahead-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}nice-typeahead .nice-typeahead,nice-async-typeahead .nice-typeahead{width:100%;display:inline-flex;align-items:center;justify-content:space-between;cursor:pointer;position:relative;box-sizing:border-box}nice-typeahead .nice-typeahead-suffix,nice-async-typeahead .nice-typeahead-suffix{height:24px;flex-shrink:0;display:inline-flex;align-items:center;--mdc-icon-button-state-layer-size: 24px}nice-typeahead .nice-typeahead-suffix .nice-typeahead-remove,nice-async-typeahead .nice-typeahead-suffix .nice-typeahead-remove{margin-right:-6px}nice-typeahead .nice-typeahead-value,nice-async-typeahead .nice-typeahead-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nice-typeahead .nice-typeahead-value-text,nice-async-typeahead .nice-typeahead-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}nice-typeahead .mat-mdc-select-min-line:empty:before,nice-async-typeahead .mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}nice-typeahead .nice-typeahead__input,nice-async-typeahead .nice-typeahead__input{border:none;outline:none;box-shadow:none;background:none;padding:0;margin:0;color:inherit}.mat-mdc-form-field-type-nice-typeahead:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-nice-typeahead.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}@keyframes _nice-typeahead-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _nice-typeahead-exit{0%{opacity:1}to{opacity:0}}div.nice-typeahead-panel{width:100%;outline:0;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color, var(--mat-app-surface-container))}div.nice-typeahead-panel nice-typeahead-search-icon{width:16px;height:16px;margin-right:8px;margin-left:16px}div.nice-typeahead-panel nice-typeahead-search-icon svg{width:16px;height:16px}div.nice-typeahead-panel .nice-typeahead-search-input{padding-left:8px;padding-right:8px;padding-bottom:8px}div.nice-typeahead-panel .nice-typeahead-search-input .mat-mdc-form-field,div.nice-typeahead-panel .nice-typeahead-search-input .mat-mdc-form-field-infix{width:100%}div.nice-typeahead-panel .nice-typeahead-options{overflow:auto;max-height:384px}div.nice-typeahead-panel{box-shadow:var(--mat-select-container-elevation-shadow)}.nice-typehead-animations-enabled{animation:_nice-typeahead-enter .12s cubic-bezier(0,0,.2,1)}.nice-typehead-animations-enabled.mat-select-panel-exit{animation:_nice-typeahead-exit .1s linear}\n"], dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NiceTypeaheadSearchIcon, selector: "nice-typeahead-search-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
774
782
  }
775
783
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTypeahead, decorators: [{
776
784
  type: Component,
@@ -782,8 +790,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
782
790
  MatFormField,
783
791
  MatInput,
784
792
  MatIconButton,
793
+ MatPrefix,
785
794
  NgClass,
786
- NgTemplateOutlet
795
+ NgTemplateOutlet,
796
+ NiceTypeaheadSearchIcon
787
797
  ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: MatFormFieldControl, useExisting: NiceTypeahead }], host: {
788
798
  "role": "combobox",
789
799
  "aria-haspopup": "listbox",
@@ -801,7 +811,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
801
811
  "(keydown)": "_handleKeydown($event)",
802
812
  "(focus)": "onFocusChanged(true)",
803
813
  "(blur)": "onFocusChanged(false)"
804
- }, template: "<div\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n class=\"nice-typeahead\"\n cdk-overlay-origin\n>\n <div class=\"nice-typeahead-value\">\n @if (_empty()) {\n <span class=\"nice-typeahead-placeholder mat-mdc-select-min-line\">{{ _placeholder() }}</span>\n } @else {\n <span class=\"nice-typeahead-value-text\">\n <span class=\"mat-mdc-select-min-line\">\n @if (_value(); as activeValue) {\n {{ formatLabel(activeValue) }}\n }\n </span>\n </span>\n }\n </div>\n\n <div class=\"nice-typeahead-suffix\">\n @if (_empty()) {\n <div class=\"mat-mdc-select-arrow\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M7 10l5 5 5-5z\"></path>\n </svg>\n </div>\n } @else if (canRemoveValue()) {\n <button class=\"nice-typeahead-remove\" mat-icon-button (click)=\"$event.stopPropagation(); removeActiveValue()\">\n <svg viewBox=\"0 -960 960 960\">\n <path d=\"m291-240-51-51 189-189-189-189 51-51 189 189 189-189 51 51-189 189 189 189-51 51-189-189-189 189Z\"/>\n </svg>\n </button>\n }\n </div>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"_overlayWidth\"\n [cdkConnectedOverlayOrigin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\n (attach)=\"_onAttached()\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n #panel\n role=\"listbox\"\n tabindex=\"-1\"\n class=\"nice-typeahead-panel nice-typeahead--open nice-typehead-animations-enabled\"\n [ngClass]=\"panelClass()\"\n [attr.id]=\"id + '-panel'\"\n (keydown)=\"_handleKeydown($event)\"\n (scrollend)=\"_handleScrollEnd()\"\n >\n <div class=\"nice-typeahead-search-input\">\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <input\n #input\n class=\"nice-typeahead__input\"\n matInput\n [formControl]=\"_searchControl\"\n >\n </mat-form-field>\n </div>\n\n <div #optionsContainer class=\"nice-typeahead-options\" role=\"presentation\">\n @for (item of filteredValues(); track item) {\n <mat-option [value]=\"item\">\n @if (optionTemplate(); as optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: item }\"></ng-container>\n } @else {\n {{ formatLabel(item) }}\n }\n </mat-option>\n } @empty {\n <mat-option disabled>\n <span class=\"nice-typeahead__no-items\">\n {{ noItemsFoundLabel() }}\n </span>\n </mat-option>\n }\n </div>\n </div>\n</ng-template>\n", styles: ["nice-typeahead,nice-async-typeahead{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-app-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-app-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-app-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-app-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-app-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-app-body-large-tracking))}nice-typeahead.nice-typeahead-disabled,nice-async-typeahead.nice-typeahead-disabled{color:var(--mat-select-disabled-trigger-text-color)}nice-typeahead.nice-typeahead-disabled .mat-mdc-select-arrow,nice-typeahead.nice-typeahead-disabled .nice-typeahead-remove,nice-async-typeahead.nice-typeahead-disabled .mat-mdc-select-arrow,nice-async-typeahead.nice-typeahead-disabled .nice-typeahead-remove{color:var(--mat-select-disabled-trigger-text-color)}nice-typeahead.nice-typeahead-invalid .mat-mdc-select-arrow,nice-async-typeahead.nice-typeahead-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}nice-typeahead .nice-typeahead,nice-async-typeahead .nice-typeahead{width:100%;display:inline-flex;align-items:center;justify-content:space-between;cursor:pointer;position:relative;box-sizing:border-box}nice-typeahead .nice-typeahead-suffix,nice-async-typeahead .nice-typeahead-suffix{height:24px;flex-shrink:0;display:inline-flex;align-items:center;--mdc-icon-button-state-layer-size: 24px}nice-typeahead .nice-typeahead-suffix .nice-typeahead-remove,nice-async-typeahead .nice-typeahead-suffix .nice-typeahead-remove{margin-right:-6px}nice-typeahead .nice-typeahead-value,nice-async-typeahead .nice-typeahead-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nice-typeahead .nice-typeahead-value-text,nice-async-typeahead .nice-typeahead-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}nice-typeahead .mat-mdc-select-min-line:empty:before,nice-async-typeahead .mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}nice-typeahead .nice-typeahead__input,nice-async-typeahead .nice-typeahead__input{border:none;outline:none;box-shadow:none;background:none;padding:0;margin:0;color:inherit}.mat-mdc-form-field-type-nice-typeahead:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-nice-typeahead.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}@keyframes _nice-typeahead-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _nice-typeahead-exit{0%{opacity:1}to{opacity:0}}div.nice-typeahead-panel{width:100%;outline:0;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color, var(--mat-app-surface-container))}div.nice-typeahead-panel .nice-typeahead-search-input{padding-left:8px;padding-right:8px;padding-bottom:8px}div.nice-typeahead-panel .nice-typeahead-search-input .mat-mdc-form-field,div.nice-typeahead-panel .nice-typeahead-search-input .mat-mdc-form-field-infix{width:100%}div.nice-typeahead-panel .nice-typeahead-options{overflow:auto;max-height:384px}div.nice-typeahead-panel{box-shadow:var(--mat-select-container-elevation-shadow)}.nice-typehead-animations-enabled{animation:_nice-typeahead-enter .12s cubic-bezier(0,0,.2,1)}.nice-typehead-animations-enabled.mat-select-panel-exit{animation:_nice-typeahead-exit .1s linear}\n"] }]
814
+ }, template: "<div\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n class=\"nice-typeahead\"\n cdk-overlay-origin\n>\n <div class=\"nice-typeahead-value\">\n @if (_empty()) {\n <span class=\"nice-typeahead-placeholder mat-mdc-select-min-line\">{{ _placeholder() }}</span>\n } @else {\n <span class=\"nice-typeahead-value-text\">\n <span class=\"mat-mdc-select-min-line\">\n @if (_value(); as activeValue) {\n {{ formatLabel(activeValue) }}\n }\n </span>\n </span>\n }\n </div>\n\n <div class=\"nice-typeahead-suffix\">\n @if (_empty()) {\n <div class=\"mat-mdc-select-arrow\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M7 10l5 5 5-5z\"></path>\n </svg>\n </div>\n } @else if (canRemoveValue()) {\n <button class=\"nice-typeahead-remove\" mat-icon-button (click)=\"$event.stopPropagation(); removeActiveValue()\">\n <svg viewBox=\"0 -960 960 960\">\n <path d=\"m291-240-51-51 189-189-189-189 51-51 189 189 189-189 51 51-189 189 189 189-51 51-189-189-189 189Z\"/>\n </svg>\n </button>\n }\n </div>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"_overlayWidth\"\n [cdkConnectedOverlayOrigin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\n (attach)=\"_onAttached()\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n #panel\n role=\"listbox\"\n tabindex=\"-1\"\n class=\"nice-typeahead-panel nice-typeahead--open nice-typehead-animations-enabled\"\n [ngClass]=\"panelClass()\"\n [attr.id]=\"id + '-panel'\"\n (keydown)=\"_handleKeydown($event)\"\n (scrollend)=\"_handleScrollEnd()\"\n >\n <div class=\"nice-typeahead-search-input\">\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <input\n #input\n class=\"nice-typeahead__input\"\n matInput\n [formControl]=\"_searchControl\"\n >\n\n <nice-typeahead-search-icon matIconPrefix />\n </mat-form-field>\n </div>\n\n <div #optionsContainer class=\"nice-typeahead-options\" role=\"presentation\">\n @for (item of filteredValues(); track item) {\n <mat-option [value]=\"item\">\n @if (optionTemplate(); as optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: item }\"></ng-container>\n } @else {\n {{ formatLabel(item) }}\n }\n </mat-option>\n } @empty {\n <mat-option disabled>\n <span class=\"nice-typeahead__no-items\">\n {{ noItemsFoundLabel() }}\n </span>\n </mat-option>\n }\n </div>\n </div>\n</ng-template>\n", styles: ["nice-typeahead,nice-async-typeahead{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-app-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-app-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-app-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-app-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-app-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-app-body-large-tracking))}nice-typeahead.nice-typeahead-disabled,nice-async-typeahead.nice-typeahead-disabled{color:var(--mat-select-disabled-trigger-text-color)}nice-typeahead.nice-typeahead-disabled .mat-mdc-select-arrow,nice-typeahead.nice-typeahead-disabled .nice-typeahead-remove,nice-async-typeahead.nice-typeahead-disabled .mat-mdc-select-arrow,nice-async-typeahead.nice-typeahead-disabled .nice-typeahead-remove{color:var(--mat-select-disabled-trigger-text-color)}nice-typeahead.nice-typeahead-invalid .mat-mdc-select-arrow,nice-async-typeahead.nice-typeahead-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}nice-typeahead .nice-typeahead,nice-async-typeahead .nice-typeahead{width:100%;display:inline-flex;align-items:center;justify-content:space-between;cursor:pointer;position:relative;box-sizing:border-box}nice-typeahead .nice-typeahead-suffix,nice-async-typeahead .nice-typeahead-suffix{height:24px;flex-shrink:0;display:inline-flex;align-items:center;--mdc-icon-button-state-layer-size: 24px}nice-typeahead .nice-typeahead-suffix .nice-typeahead-remove,nice-async-typeahead .nice-typeahead-suffix .nice-typeahead-remove{margin-right:-6px}nice-typeahead .nice-typeahead-value,nice-async-typeahead .nice-typeahead-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nice-typeahead .nice-typeahead-value-text,nice-async-typeahead .nice-typeahead-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}nice-typeahead .mat-mdc-select-min-line:empty:before,nice-async-typeahead .mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}nice-typeahead .nice-typeahead__input,nice-async-typeahead .nice-typeahead__input{border:none;outline:none;box-shadow:none;background:none;padding:0;margin:0;color:inherit}.mat-mdc-form-field-type-nice-typeahead:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-nice-typeahead.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}@keyframes _nice-typeahead-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _nice-typeahead-exit{0%{opacity:1}to{opacity:0}}div.nice-typeahead-panel{width:100%;outline:0;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color, var(--mat-app-surface-container))}div.nice-typeahead-panel nice-typeahead-search-icon{width:16px;height:16px;margin-right:8px;margin-left:16px}div.nice-typeahead-panel nice-typeahead-search-icon svg{width:16px;height:16px}div.nice-typeahead-panel .nice-typeahead-search-input{padding-left:8px;padding-right:8px;padding-bottom:8px}div.nice-typeahead-panel .nice-typeahead-search-input .mat-mdc-form-field,div.nice-typeahead-panel .nice-typeahead-search-input .mat-mdc-form-field-infix{width:100%}div.nice-typeahead-panel .nice-typeahead-options{overflow:auto;max-height:384px}div.nice-typeahead-panel{box-shadow:var(--mat-select-container-elevation-shadow)}.nice-typehead-animations-enabled{animation:_nice-typeahead-enter .12s cubic-bezier(0,0,.2,1)}.nice-typehead-animations-enabled.mat-select-panel-exit{animation:_nice-typeahead-exit .1s linear}\n"] }]
805
815
  }] });
806
816
 
807
817
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"recursyve-ngx-material-components-typeahead.mjs","sources":["../../../src/material-components/typeahead/providers/async-typeahead.provider.ts","../../../src/material-components/typeahead/constants.ts","../../../src/material-components/typeahead/providers/async-typeahead.service.ts","../../../src/material-components/typeahead/provider.ts","../../../src/material-components/typeahead/typeahead-base.ts","../../../src/material-components/typeahead/async-typeahead.ts","../../../src/material-components/typeahead/typeahead.html","../../../src/material-components/typeahead/typeahead.ts","../../../src/material-components/typeahead/recursyve-ngx-material-components-typeahead.ts"],"sourcesContent":["import { Observable } from \"rxjs\";\n\nexport type NiceAsyncTypeaheadSearchResult<T> = {\n items: T[];\n nextPage: number | null;\n}\n\nexport abstract class NiceAsyncTypeaheadResourceProvider<T, ID = number, Options = object> {\n public abstract resource: string;\n\n public abstract search(\n searchQuery: string,\n page: number,\n options?: Options\n ): Observable<NiceAsyncTypeaheadSearchResult<T>>;\n\n public abstract getById(id: ID, options?: Options): Observable<T>;\n\n public abstract format(item: T): string;\n}\n","import { InjectionToken } from \"@angular/core\";\n\nexport const NICE_ASYNC_TYPEAHEAD_RESOURCES_PROVIDER = new InjectionToken(\"nice_async_typeahead_provider\");\n","import { computed, DestroyRef, inject, Injectable, signal } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { catchError, defer, EMPTY, finalize, map, Observable, Subject, switchMap } from \"rxjs\";\nimport { NICE_ASYNC_TYPEAHEAD_RESOURCES_PROVIDER } from \"../constants\";\nimport { NiceAsyncTypeaheadResourceProvider } from \"./async-typeahead.provider\";\n\nexport type AsyncTypeaheadRequests = {\n page: number;\n searchQuery?: string;\n};\n\nexport type FetchActiveRequest = {\n id: number | string;\n};\n\n@Injectable()\nexport class NiceTypeaheadService<T extends object> {\n private readonly resources = inject<NiceAsyncTypeaheadResourceProvider<unknown>[]>(\n NICE_ASYNC_TYPEAHEAD_RESOURCES_PROVIDER, { optional: true }\n ) ?? [];\n private readonly destroyRef = inject(DestroyRef);\n\n private readonly fetchResources$ = new Subject<AsyncTypeaheadRequests>();\n private readonly fetchActive$ = new Subject<FetchActiveRequest>();\n private resourceProvider: NiceAsyncTypeaheadResourceProvider<T, string | number> | null = null;\n\n private readonly _items = signal<T[]>([]);\n private readonly _active = signal<T | null>(null);\n private readonly _searchOptions = signal<object | null>(null);\n private readonly _request = signal<AsyncTypeaheadRequests | null>(null);\n private readonly _nextRequest = signal<AsyncTypeaheadRequests | null>(null);\n private readonly _loading = signal(true);\n\n public readonly items = this._items.asReadonly();\n public readonly active = this._active.asReadonly();\n public readonly loading = this._loading.asReadonly();\n public readonly isLastPage = computed(() => !this._nextRequest());\n\n public init(resource: string): void {\n this.fetchResources$.pipe(takeUntilDestroyed(this.destroyRef)).pipe(\n switchMap((request) => this.fetchResources(request))\n ).subscribe();\n this.fetchActive$.pipe(takeUntilDestroyed(this.destroyRef)).pipe(\n switchMap((request) => this.fetchActive(request))\n ).subscribe();\n\n const provider = this.resources.find((resources) => resources.resource === resource);\n if (provider) {\n this.resourceProvider = provider as NiceAsyncTypeaheadResourceProvider<T>;\n }\n }\n\n public setSearchOptions(options: object | null): void {\n this._searchOptions.set(options);\n }\n\n public setActive(active: T | null): void {\n this._active.set(active);\n }\n\n public setActiveFromId(id: number | string): void {\n this.fetchActive$.next({ id });\n }\n\n public reloadActive(): void {\n const active = this._active();\n if (!active || !(\"id\" in active)) {\n return;\n }\n\n if (!(typeof active.id === \"number\" || typeof active.id === \"string\")) {\n return;\n }\n\n this.setActiveFromId(active.id);\n }\n\n public setItems(items: T[]): void {\n this._items.set(items);\n }\n\n public search(searchQuery: string): void {\n this.fetchResources$.next({\n searchQuery,\n page: 0\n });\n }\n\n public loadMore(): void {\n const nextRequest = this._nextRequest();\n if (!nextRequest || this._loading()) {\n return;\n }\n\n this.fetchResources$.next(nextRequest);\n }\n\n public fetchActive(request: FetchActiveRequest): Observable<void> {\n return defer(() => {\n if (!this.resourceProvider) {\n return EMPTY;\n }\n\n this._loading.set(true);\n\n const localItem = this._items().find((item) => \"id\" in item && item.id === request.id);\n if (localItem) {\n this._loading.set(false);\n this._items.set([localItem]);\n this._active.set(localItem);\n return EMPTY;\n }\n\n return this.resourceProvider.getById(request.id)\n }).pipe(\n map((item) => {\n this._items.set([item]);\n this._active.set(item);\n }),\n catchError(() => EMPTY),\n finalize(() => {\n this._loading.set(false);\n })\n );\n }\n\n public fetchResources(request: AsyncTypeaheadRequests): Observable<void> {\n return defer(() => {\n if (!this.resourceProvider) {\n return EMPTY;\n }\n\n this._loading.set(true);\n this._request.set(request);\n\n return this.resourceProvider.search(request.searchQuery ?? \"\", request.page, this._searchOptions() ?? {});\n }).pipe(\n map((result) => {\n if (request.page === 0) {\n this._items.set(result.items as T[]);\n } else {\n this._items.set([\n ...this._items(),\n ...(result.items as T[])\n ]);\n }\n\n if (result.nextPage) {\n this._nextRequest.set({\n ...request,\n page: result.nextPage\n });\n } else {\n this._nextRequest.set(null);\n }\n }),\n catchError(() => EMPTY),\n finalize(() => {\n this._loading.set(false);\n })\n );\n }\n\n public formatLabel(item: T): string {\n if (!this.resourceProvider) {\n return \"\";\n }\n\n return this.resourceProvider.format(item);\n }\n}\n","import { Provider, Type } from \"@angular/core\";\nimport { NICE_ASYNC_TYPEAHEAD_RESOURCES_PROVIDER } from \"./constants\";\nimport { NiceAsyncTypeaheadResourceProvider } from \"./providers/async-typeahead.provider\";\n\nexport function provideAsyncTypeaheadResources(\n providers: Type<NiceAsyncTypeaheadResourceProvider<unknown, unknown>>[]\n): Provider[] {\n return providers.map((provider) => ({\n provide: NICE_ASYNC_TYPEAHEAD_RESOURCES_PROVIDER,\n useClass: provider,\n multi: true\n }));\n}\n","import { ActiveDescendantKeyManager } from \"@angular/cdk/a11y\";\nimport { SelectionModel } from \"@angular/cdk/collections\";\nimport { DOWN_ARROW, ENTER, hasModifierKey, LEFT_ARROW, RIGHT_ARROW, SPACE, UP_ARROW } from \"@angular/cdk/keycodes\";\nimport { CdkConnectedOverlay, CdkOverlayOrigin } from \"@angular/cdk/overlay\";\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n computed,\n DestroyRef,\n Directive, DoCheck,\n effect,\n ElementRef,\n inject,\n input,\n OnDestroy,\n OnInit,\n QueryList,\n signal,\n TemplateRef,\n viewChild,\n ViewChildren\n} from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { ControlValueAccessor, FormBuilder, FormGroupDirective, NgControl, NgForm, Validators } from \"@angular/forms\";\nimport {\n _ErrorStateTracker,\n _getOptionScrollPosition, ErrorStateMatcher,\n MatOption,\n MatOptionSelectionChange\n} from \"@angular/material/core\";\nimport { MAT_FORM_FIELD, MatFormField, MatFormFieldControl } from \"@angular/material/form-field\";\nimport {\n debounceTime,\n defer,\n distinctUntilChanged,\n merge,\n Observable,\n startWith,\n Subject,\n switchMap,\n take,\n takeUntil\n} from \"rxjs\";\n\n/**\n * Implementation of the same panel and overlay logic as the official Angular MatSelect.\n * This used some of the logic from MatSelect to make this component look and feel like a MatSelect.\n */\n@Directive()\nexport class NiceTypeaheadBase<T>\n implements\n MatFormFieldControl<T>,\n ControlValueAccessor,\n OnInit,\n AfterViewInit,\n DoCheck,\n OnDestroy\n{\n @ViewChildren(MatOption)\n private readonly options!: QueryList<MatOption>;\n\n public readonly noItemsFoundLabel = input<string>(\"No items found\");\n public readonly labelProperty = input<string>();\n public readonly formatLabelFn = input<((value: T) => string)>();\n public readonly optionTemplate = input<TemplateRef<{ $implicit: T }>>();\n public readonly panelClass = input<string | string[]>([]);\n public readonly canRemoveValue = input<boolean>(true);\n\n private static nextId = 0;\n\n protected readonly _input = viewChild<ElementRef<HTMLInputElement>>(\"input\");\n protected readonly _panel = viewChild<ElementRef<HTMLElement>>(\"panel\");\n protected readonly _overlayDir = viewChild(CdkConnectedOverlay);\n\n protected _errorStateTracker?: _ErrorStateTracker;\n\n protected _required: boolean | null = null;\n protected _focused = false;\n protected _disabled = false;\n protected _panelOpen = false;\n protected _compareWith = (o1: T, o2: T) => o1 === o2;\n\n protected readonly _value = signal<T | null>(null);\n protected readonly _empty = computed(() => !this._value());\n protected readonly _placeholder = signal(\"\");\n protected readonly _searchValue = signal(\"\");\n\n protected readonly _elementRef = inject(ElementRef);\n protected readonly _destroyRef = inject(DestroyRef);\n protected readonly _changeDetectorRef = inject(ChangeDetectorRef);\n protected readonly _fb = inject(FormBuilder);\n\n protected readonly _searchControl = this._fb.nonNullable.control(\"\");\n protected readonly _initialized = new Subject<void>();\n\n protected readonly _parentFormField = inject<MatFormField>(MAT_FORM_FIELD, { optional: true });\n\n public readonly id: string = `nice-typeahead-${NiceTypeaheadBase.nextId++}`;\n public readonly controlType: string = \"nice-typeahead\";\n public readonly stateChanges = new Subject<void>();\n public readonly optionSelectionChanges: Observable<MatOptionSelectionChange> = defer(() => {\n const options = this.options;\n\n if (options) {\n return options.changes.pipe(\n startWith(options),\n switchMap(() => merge(...options.map(option => option.onSelectionChange))),\n );\n }\n\n return this._initialized.pipe(switchMap(() => this.optionSelectionChanges));\n });\n\n public readonly ngControl = inject(NgControl, { optional: true, self: true });\n\n public readonly _panelDoneAnimatingStream = new Subject<string>();\n\n public _keyManager!: ActiveDescendantKeyManager<MatOption>;\n public _preferredOverlayOrigin?: CdkOverlayOrigin | ElementRef;\n public _overlayWidth!: string | number;\n public _selectionModel!: SelectionModel<MatOption>;\n public _onChange?: (value: T | null) => void;\n public _onTouched?: () => void;\n\n public get placeholder(): string {\n return this._placeholder();\n }\n\n public set placeholder(placeholder) {\n this._placeholder.set(placeholder);\n this.stateChanges.next();\n }\n\n public get focused(): boolean {\n return this._focused;\n }\n\n public set focused(isFocused: boolean) {\n this._focused = isFocused;\n this.stateChanges.next();\n }\n\n public get required(): boolean {\n return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;\n }\n\n public set required(isRequired: boolean) {\n this._required = isRequired;\n this.stateChanges.next();\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n\n public set disabled(value: boolean) {\n this._disabled = value;\n this.stateChanges.next();\n }\n\n public get value(): T | null {\n return this._value();\n }\n\n public set value(value: T | null) {\n const hasAssigned = this._assignValue(value);\n\n if (hasAssigned) {\n this._onChange?.(value);\n }\n }\n\n public get empty(): boolean {\n return !this._value();\n }\n\n public get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n public get errorState(): boolean {\n return this._errorStateTracker?.errorState ?? false;\n }\n\n public set errorState(value: boolean) {\n if (!this._errorStateTracker) {\n return;\n }\n\n this._errorStateTracker.errorState = value;\n }\n\n public get panelOpen(): boolean {\n return this._panelOpen;\n }\n\n constructor() {\n effect(() => {\n this._input()?.nativeElement.focus();\n });\n\n if (this.ngControl) {\n // Note: we provide the value accessor through here, instead of\n // the `providers` to avoid running into a circular import.\n this.ngControl.valueAccessor = this;\n }\n\n const defaultErrorStateMatcher = inject(ErrorStateMatcher);\n const ngControl = inject(NgControl, { optional: true, self: true });\n const parentFormGroup = inject(FormGroupDirective, { optional: true });\n const parentForm = inject(NgForm, { optional: true });\n this._errorStateTracker = new _ErrorStateTracker(\n defaultErrorStateMatcher,\n ngControl,\n parentFormGroup,\n parentForm,\n this.stateChanges,\n );\n }\n\n public ngOnInit(): void {\n this._selectionModel = new SelectionModel<MatOption>();\n\n this._searchControl.valueChanges.pipe(\n takeUntilDestroyed(this._destroyRef),\n debounceTime(250),\n distinctUntilChanged()\n ).subscribe((value) => this._searchValue.set(value));\n }\n\n public ngAfterViewInit(): void {\n this._initialized.next();\n this._initialized.complete();\n\n this._initKeyManager();\n\n this.options.changes.pipe(startWith(null), takeUntilDestroyed(this._destroyRef)).subscribe(() => {\n this._resetOptions();\n this._initializeSelection();\n });\n }\n\n public ngDoCheck(): void {\n if (this.ngControl) {\n this.updateErrorState();\n }\n }\n\n public ngOnDestroy(): void {\n this.stateChanges.complete();\n }\n\n public onContainerClick(event: MouseEvent): void {\n if (this.disabled) {\n return;\n }\n\n this.stateChanges.next();\n if ((event.target as Element).tagName.toLowerCase() !== \"input\") {\n this.onFocusChanged(true);\n }\n }\n\n public setDescribedByIds(ids: string[]): void {\n const controlElement = this._elementRef.nativeElement.querySelector(\".nice-typeahead\");\n if (!controlElement) {\n return;\n }\n\n controlElement.setAttribute(\"aria-describedby\", ids.join(\" \"));\n }\n\n public onFocusChanged(isFocused: boolean): void {\n this.focused = isFocused;\n this.stateChanges.next();\n\n if (isFocused) {\n this.open();\n }\n }\n\n public writeValue(value: T): void {\n this._assignValue(value);\n }\n\n public registerOnChange(fn: (value: T | null) => void) {\n this._onChange = fn;\n }\n\n public registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n public setDisabledState(isDisabled: boolean): void {\n this._disabled = isDisabled;\n this._changeDetectorRef.markForCheck();\n this.stateChanges.next();\n }\n\n public formatLabel(item: T): string {\n if (typeof item === \"string\") {\n return item;\n }\n\n const fn = this.formatLabelFn();\n if (fn) {\n return fn(item);\n }\n\n const property = this.labelProperty();\n if (!property) {\n return item?.toString() ?? \"\";\n }\n\n if (!(typeof item === \"object\") || item === null) {\n return item?.toString() ?? \"\";\n }\n\n if (property in item) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return item[property];\n }\n\n return item.toString();\n }\n\n public removeActiveValue(): void {\n this.value = null;\n this._selectionModel.clear();\n this._keyManager.setActiveItem(-1);\n this._changeDetectorRef.markForCheck();\n }\n\n public updateErrorState(): void {\n this._errorStateTracker?.updateErrorState();\n }\n\n public open(): void {\n if (!this._canOpen()) {\n return;\n }\n\n // It's important that we read this as late as possible, because doing so earlier will\n // return a different element since it's based on queries in the form field which may\n // not have run yet. Also this needs to be assigned before we measure the overlay width.\n if (this._parentFormField) {\n this._preferredOverlayOrigin = this._parentFormField.getConnectedOverlayOrigin();\n }\n\n this._overlayWidth = this._getOverlayWidth(this._preferredOverlayOrigin);\n this._panelOpen = true;\n this._keyManager.withHorizontalOrientation(null);\n this._changeDetectorRef.markForCheck();\n\n // Required for the MDC form field to pick up when the overlay has been opened.\n this.stateChanges.next();\n }\n\n public close(): void {\n if (!this._panelOpen) {\n return;\n }\n\n this._focused = false;\n this._panelOpen = false;\n this._changeDetectorRef.markForCheck();\n\n this._searchValue.set(\"\");\n\n this._onTouched?.();\n\n // Required for the MDC form field to pick up when the overlay has been closed.\n this.stateChanges.next();\n }\n\n public focus(options?: FocusOptions): void {\n this._elementRef.nativeElement.focus(options);\n }\n\n public _handleKeydown(event: KeyboardEvent): void {\n if (this.disabled) {\n return;\n }\n\n if (this.panelOpen) {\n this._handleOpenKeydown(event);\n } else {\n this._handleClosedKeydown(event);\n }\n }\n\n public _handleScrollEnd(): void {\n console.log(\"scroll end\")\n }\n\n protected _canOpen(): boolean {\n return !this._panelOpen && !this.disabled;\n }\n\n protected _onAttached(): void {\n this._overlayDir()?.positionChange.pipe(take(1)).subscribe(() => {\n this._changeDetectorRef.detectChanges();\n this._positioningSettled();\n });\n }\n\n protected _initKeyManager() {\n this._keyManager = new ActiveDescendantKeyManager<MatOption>(this.options)\n .withVerticalOrientation()\n .withHomeAndEnd()\n .withPageUpDown()\n .withAllowedModifierKeys([\"shiftKey\"])\n .skipPredicate(this._skipPredicate);\n\n this._keyManager.tabOut.subscribe(() => {\n if (this.panelOpen) {\n if (this._keyManager.activeItem) {\n this._keyManager.activeItem._selectViaInteraction();\n }\n\n this.focus();\n this.close();\n }\n });\n\n this._keyManager.change.subscribe(() => {\n if (this._panelOpen && this._panel()) {\n this._scrollOptionIntoView(this._keyManager.activeItemIndex || 0);\n } else if (!this._panelOpen && this._keyManager.activeItem) {\n this._keyManager.activeItem._selectViaInteraction();\n }\n });\n }\n\n protected _getOverlayWidth(preferredOrigin?: ElementRef<ElementRef> | CdkOverlayOrigin): string | number {\n const refToMeasure =\n preferredOrigin instanceof CdkOverlayOrigin\n ? preferredOrigin.elementRef\n : preferredOrigin || this._elementRef;\n return refToMeasure.nativeElement.getBoundingClientRect().width;\n }\n\n protected _skipPredicate = (option: MatOption) => {\n if (this.panelOpen) {\n return false;\n }\n\n return option.disabled;\n };\n\n protected _positioningSettled() {\n this._scrollOptionIntoView(this._keyManager.activeItemIndex || 0);\n }\n\n protected _scrollOptionIntoView(index: number): void {\n const option = this.options.toArray()[index];\n if (!option) {\n return;\n }\n\n const panel = this._panel()?.nativeElement;\n if (!panel) {\n return;\n }\n\n const element = option._getHostElement();\n if (index === 0) {\n // If we've got one group label before the option and we're at the top option,\n // scroll the list to the top. This is better UX than scrolling the list to the\n // top of the option, because it allows the user to read the top group's label.\n panel.scrollTop = 0;\n } else {\n panel.scrollTop = _getOptionScrollPosition(\n element.offsetTop,\n element.offsetHeight,\n panel.scrollTop,\n panel.offsetHeight,\n );\n }\n }\n\n protected _resetOptions(): void {\n this.optionSelectionChanges.pipe(\n takeUntil(this.options.changes),\n takeUntilDestroyed(this._destroyRef)\n ).subscribe((event) => {\n this._onSelect(event.source);\n\n if (event.isUserInput && this._panelOpen) {\n this.close();\n this.focus();\n }\n });\n }\n\n protected _onSelect(option: MatOption): void {\n this.value = option.value;\n this._setSelectionByValue(option.value);\n this._selectOptionByValue(option.value);\n\n this.stateChanges.next();\n }\n\n protected _initializeSelection(): void {\n // Defer setting the value in order to avoid the \"Expression\n // has changed after it was checked\" errors from Angular.\n Promise.resolve().then(() => {\n if (this.ngControl) {\n this._value.set(this.ngControl.value);\n }\n\n const _value = this.value;\n if (_value) {\n this._selectOptionByValue(_value);\n }\n this._setSelectionByValue(_value);\n\n this._highlightCorrectOption();\n this.stateChanges.next();\n });\n }\n\n protected _setSelectionByValue(value: T | null): void {\n this.options.forEach(option => option.setInactiveStyles());\n this._selectionModel.clear();\n\n const correspondingOption = value ? this._selectOptionByValue(value) : null;\n\n // Shift focus to the active item. Note that we shouldn't do this in multiple\n // mode, because we don't know what option the user interacted with last.\n if (correspondingOption) {\n correspondingOption.select(false);\n this._keyManager.updateActiveItem(correspondingOption);\n } else if (!this.panelOpen) {\n // Otherwise reset the highlighted option. Note that we only want to do this while\n // closed, because doing it while open can shift the user's focus unnecessarily.\n this._keyManager.updateActiveItem(-1);\n }\n\n this._changeDetectorRef.markForCheck();\n }\n\n\n protected _selectOptionByValue(value: T): MatOption | undefined {\n const correspondingOption = this.options.find((option: MatOption) => {\n // Skip options that are already in the model. This allows us to handle cases\n // where the same primitive value is selected multiple times.\n if (this._selectionModel.isSelected(option)) {\n return false;\n }\n\n try {\n // Treat null as a special reset value.\n return option.value != null && this._compareWith(option.value, value);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (error) {\n return false;\n }\n });\n\n if (correspondingOption) {\n this._selectionModel.select(correspondingOption);\n }\n\n return correspondingOption;\n }\n\n protected _highlightCorrectOption(): void {\n if (!this._keyManager) {\n return;\n }\n\n if (this.empty) {\n // Find the index of the first *enabled* option. Avoid calling `_keyManager.setActiveItem`\n // because it activates the first option that passes the skip predicate, rather than the\n // first *enabled* option.\n let firstEnabledOptionIndex = -1;\n for (let index = 0; index < this.options.length; index++) {\n const option = this.options.get(index)!;\n if (!option.disabled) {\n firstEnabledOptionIndex = index;\n break;\n }\n }\n\n this._keyManager.setActiveItem(firstEnabledOptionIndex);\n } else {\n this._keyManager.setActiveItem(this._selectionModel.selected[0]);\n }\n }\n\n\n protected _handleClosedKeydown(event: KeyboardEvent): void {\n const keyCode = event.keyCode;\n const isArrowKey =\n keyCode === DOWN_ARROW ||\n keyCode === UP_ARROW ||\n keyCode === LEFT_ARROW ||\n keyCode === RIGHT_ARROW;\n const isOpenKey = keyCode === ENTER || keyCode === SPACE;\n const manager = this._keyManager;\n\n // Open the select on ALT + arrow key to match the native <select>\n if (\n (!manager.isTyping() && isOpenKey && !hasModifierKey(event)) ||\n (event.altKey && isArrowKey)\n ) {\n event.preventDefault(); // prevents the page from scrolling down when pressing space\n this.open();\n }\n }\n\n protected _handleOpenKeydown(event: KeyboardEvent): void {\n const manager = this._keyManager;\n const keyCode = event.keyCode;\n const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW;\n const isTyping = manager.isTyping();\n\n if (isArrowKey && event.altKey) {\n // Close the select on ALT + arrow key to match the native <select>\n event.preventDefault();\n this.close();\n // Don't do anything in this case if the user is typing,\n // because the typing sequence can include the space key.\n } else if (\n !isTyping &&\n (keyCode === ENTER || keyCode === SPACE) &&\n manager.activeItem &&\n !hasModifierKey(event)\n ) {\n event.preventDefault();\n manager.activeItem._selectViaInteraction();\n } else {\n manager.onKeydown(event);\n }\n }\n\n protected _assignValue(newValue: T | null): boolean {\n // Always re-assign an array, because it might have been mutated.\n if (newValue !== this.value) {\n if (this.options) {\n this._setSelectionByValue(newValue);\n }\n\n this._value.set(newValue);\n return true;\n }\n return false;\n }\n}\n","import { CdkConnectedOverlay, CdkOverlayOrigin } from \"@angular/cdk/overlay\";\nimport { NgClass, NgTemplateOutlet } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n OnInit,\n viewChild,\n ViewEncapsulation\n} from \"@angular/core\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\nimport { MatIconButton } from \"@angular/material/button\";\nimport { MatOption } from \"@angular/material/core\";\nimport { MatFormField, MatFormFieldControl } from \"@angular/material/form-field\";\nimport { MatInput } from \"@angular/material/input\";\nimport { NiceTypeaheadBase } from \"./typeahead-base\";\nimport { NiceTypeaheadService } from \"./providers\";\n\n@Component({\n selector: \"nice-async-typeahead\",\n imports: [\n CdkOverlayOrigin,\n CdkConnectedOverlay,\n ReactiveFormsModule,\n MatOption,\n MatFormField,\n MatInput,\n MatIconButton,\n NgClass,\n NgTemplateOutlet\n ],\n templateUrl: \"./typeahead.html\",\n styleUrl: \"./typeahead.scss\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: MatFormFieldControl, useExisting: NiceAsyncTypeahead },\n NiceTypeaheadService\n ],\n host: {\n \"role\": \"combobox\",\n \"aria-haspopup\": \"listbox\",\n \"class\": \"nice-typeahead\",\n \"[attr.id]\": \"id\",\n \"[attr.aria-controls]\": \"panelOpen ? id + \\\"-panel\\\" : null\",\n \"[attr.aria-expanded]\": \"panelOpen\",\n \"[attr.aria-required]\": \"required.toString()\",\n \"[attr.aria-disabled]\": \"disabled.toString()\",\n \"[attr.aria-invalid]\": \"errorState\",\n \"[class.nice-typeahead-disabled]\": \"disabled\",\n \"[class.nice-typeahead-invalid]\": \"errorState\",\n \"[class.nice-typeahead-required]\": \"required\",\n \"[class.nice-typeahead-empty]\": \"empty\",\n \"(keydown)\": \"_handleKeydown($event)\",\n \"(focus)\": \"onFocusChanged(true)\",\n \"(blur)\": \"onFocusChanged(false)\"\n }\n})\nexport class NiceAsyncTypeahead<T, S extends object = object> extends NiceTypeaheadBase<T> implements OnInit {\n public readonly resource = input.required<string>();\n public readonly searchOptions = input<S | null>(null);\n\n public readonly filteredValues = computed(() => this.service.items());\n\n protected readonly optionsContainer = viewChild<ElementRef<HTMLElement>>(\"optionsContainer\");\n\n private readonly service = inject(NiceTypeaheadService);\n\n protected override _compareWith = (o1: T, o2: T) => {\n if (!(typeof o1 === \"object\" && o1 && typeof o2 === \"object\" && o2)) {\n return o1 === o2;\n }\n\n if (!(\"id\" in o1) || !(\"id\" in o2)) {\n return o1 === o2;\n }\n\n return o1.id === o2.id;\n };\n\n /**\n * Infinite scroll internal state\n */\n private readonly scrollThresholdPercent = 0.99;\n private lastScrollHeight = 0;\n\n constructor() {\n super();\n\n effect(() => {\n this.service.setSearchOptions(this.searchOptions());\n }, {\n allowSignalWrites: true\n });\n\n effect(() => this.service.search(this._searchValue()), {\n allowSignalWrites: true\n });\n\n effect(() => {\n const container = this.optionsContainer();\n if (!container) {\n return;\n }\n\n container.nativeElement.addEventListener(\"scroll\", this.onScroll.bind(this));\n });\n }\n\n public override ngOnInit(): void {\n super.ngOnInit();\n\n this.service.init(this.resource());\n }\n\n public override onFocusChanged(isFocused: boolean): void {\n super.onFocusChanged(isFocused);\n\n if (isFocused) {\n this._searchControl.patchValue(\"\");\n }\n }\n\n public override formatLabel(item: T): string {\n return this.service.formatLabel(item);\n }\n\n public override removeActiveValue() {\n super.removeActiveValue();\n\n this.service.setActive(null);\n }\n\n protected onScroll(event: Event): void {\n const target = event.target as HTMLElement;\n const threshold = (this.scrollThresholdPercent * 100 * target.scrollHeight) / 100;\n const current = target.scrollTop + target.clientHeight;\n\n if (this.lastScrollHeight > target.scrollHeight) {\n this.lastScrollHeight = 0;\n }\n\n if (current > threshold && this.lastScrollHeight < target.scrollHeight) {\n this.service.loadMore();\n this.lastScrollHeight = target.scrollHeight;\n }\n }\n}\n","<div\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n class=\"nice-typeahead\"\n cdk-overlay-origin\n>\n <div class=\"nice-typeahead-value\">\n @if (_empty()) {\n <span class=\"nice-typeahead-placeholder mat-mdc-select-min-line\">{{ _placeholder() }}</span>\n } @else {\n <span class=\"nice-typeahead-value-text\">\n <span class=\"mat-mdc-select-min-line\">\n @if (_value(); as activeValue) {\n {{ formatLabel(activeValue) }}\n }\n </span>\n </span>\n }\n </div>\n\n <div class=\"nice-typeahead-suffix\">\n @if (_empty()) {\n <div class=\"mat-mdc-select-arrow\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M7 10l5 5 5-5z\"></path>\n </svg>\n </div>\n } @else if (canRemoveValue()) {\n <button class=\"nice-typeahead-remove\" mat-icon-button (click)=\"$event.stopPropagation(); removeActiveValue()\">\n <svg viewBox=\"0 -960 960 960\">\n <path d=\"m291-240-51-51 189-189-189-189 51-51 189 189 189-189 51 51-189 189 189 189-51 51-189-189-189 189Z\"/>\n </svg>\n </button>\n }\n </div>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"_overlayWidth\"\n [cdkConnectedOverlayOrigin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\n (attach)=\"_onAttached()\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n #panel\n role=\"listbox\"\n tabindex=\"-1\"\n class=\"nice-typeahead-panel nice-typeahead--open nice-typehead-animations-enabled\"\n [ngClass]=\"panelClass()\"\n [attr.id]=\"id + '-panel'\"\n (keydown)=\"_handleKeydown($event)\"\n (scrollend)=\"_handleScrollEnd()\"\n >\n <div class=\"nice-typeahead-search-input\">\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <input\n #input\n class=\"nice-typeahead__input\"\n matInput\n [formControl]=\"_searchControl\"\n >\n </mat-form-field>\n </div>\n\n <div #optionsContainer class=\"nice-typeahead-options\" role=\"presentation\">\n @for (item of filteredValues(); track item) {\n <mat-option [value]=\"item\">\n @if (optionTemplate(); as optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: item }\"></ng-container>\n } @else {\n {{ formatLabel(item) }}\n }\n </mat-option>\n } @empty {\n <mat-option disabled>\n <span class=\"nice-typeahead__no-items\">\n {{ noItemsFoundLabel() }}\n </span>\n </mat-option>\n }\n </div>\n </div>\n</ng-template>\n","import { CdkConnectedOverlay, CdkOverlayOrigin } from \"@angular/cdk/overlay\";\nimport { NgClass, NgTemplateOutlet } from \"@angular/common\";\nimport { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from \"@angular/core\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\nimport { MatIconButton } from \"@angular/material/button\";\nimport { MatOption } from \"@angular/material/core\";\nimport { MatFormField, MatFormFieldControl } from \"@angular/material/form-field\";\nimport { MatInput } from \"@angular/material/input\";\nimport { NiceTypeaheadBase } from \"./typeahead-base\";\n\nexport type SearchFunction<T> = (search: string, item: T) => boolean;\n\n@Component({\n selector: \"nice-typeahead\",\n imports: [\n CdkOverlayOrigin,\n CdkConnectedOverlay,\n ReactiveFormsModule,\n MatOption,\n MatFormField,\n MatInput,\n MatIconButton,\n NgClass,\n NgTemplateOutlet\n ],\n templateUrl: \"./typeahead.html\",\n styleUrl: \"./typeahead.scss\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: MatFormFieldControl, useExisting: NiceTypeahead }],\n host: {\n \"role\": \"combobox\",\n \"aria-haspopup\": \"listbox\",\n \"class\": \"nice-typeahead\",\n \"[attr.id]\": \"id\",\n \"[attr.aria-controls]\": \"panelOpen ? id + \\\"-panel\\\" : null\",\n \"[attr.aria-expanded]\": \"panelOpen\",\n \"[attr.aria-required]\": \"required.toString()\",\n \"[attr.aria-disabled]\": \"disabled.toString()\",\n \"[attr.aria-invalid]\": \"errorState\",\n \"[class.nice-typeahead-disabled]\": \"disabled\",\n \"[class.nice-typeahead-invalid]\": \"errorState\",\n \"[class.nice-typeahead-required]\": \"required\",\n \"[class.nice-typeahead-empty]\": \"empty\",\n \"(keydown)\": \"_handleKeydown($event)\",\n \"(focus)\": \"onFocusChanged(true)\",\n \"(blur)\": \"onFocusChanged(false)\"\n }\n})\nexport class NiceTypeahead<T> extends NiceTypeaheadBase<T> {\n public readonly values = input.required<T[]>();\n public readonly searchFn = input<SearchFunction<T>>();\n\n public readonly filteredValues = computed(() => this.filterValuesFromSearch(this._searchValue(), this.values()));\n\n public override onFocusChanged(isFocused: boolean): void {\n super.onFocusChanged(isFocused);\n\n if (isFocused) {\n this._searchControl.patchValue(\"\");\n }\n }\n\n public filterValuesFromSearch(searchValue: string, values: T[]): T[] {\n if (!searchValue) {\n return values;\n }\n\n const _searchValue = searchValue.toLowerCase();\n const fn = this.searchFn();\n if (fn) {\n return values.filter((v) => fn(_searchValue, v));\n }\n\n return values.filter((v) => {\n if (typeof v === \"string\") {\n return v.toLowerCase().includes(_searchValue);\n }\n\n const property = this.labelProperty();\n if (!property) {\n return false;\n }\n\n if (typeof v === \"object\" && v && property in v) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return v[property].toString().toLowerCase().includes(_searchValue);\n }\n\n return false;\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAOsB,kCAAkC,CAAA;AAYvD;;ACjBM,MAAM,uCAAuC,GAAG,IAAI,cAAc,CAAC,+BAA+B,CAAC;;MCc7F,oBAAoB,CAAA;AACZ,IAAA,SAAS,GAAG,MAAM,CAC/B,uCAAuC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAC9D,IAAI,EAAE;AACU,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAE/B,IAAA,eAAe,GAAG,IAAI,OAAO,EAA0B;AACvD,IAAA,YAAY,GAAG,IAAI,OAAO,EAAsB;IACzD,gBAAgB,GAAkE,IAAI;AAE7E,IAAA,MAAM,GAAG,MAAM,CAAM,EAAE,CAAC;AACxB,IAAA,OAAO,GAAG,MAAM,CAAW,IAAI,CAAC;AAChC,IAAA,cAAc,GAAG,MAAM,CAAgB,IAAI,CAAC;AAC5C,IAAA,QAAQ,GAAG,MAAM,CAAgC,IAAI,CAAC;AACtD,IAAA,YAAY,GAAG,MAAM,CAAgC,IAAI,CAAC;AAC1D,IAAA,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC;AAExB,IAAA,KAAK,G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B,EAAE,qBAAqB;AAC7C,wBAAA,sBAAsB,EAAE,qBAAqB;AAC7C,wBAAA,qBAAqB,EAAE,YAAY;AACnC,wBAAA,iCAAiC,EAAE,UAAU;AAC7C,wBAAA,gCAAgC,EAAE,YAAY;AAC9C,wBAAA,iCAAiC,EAAE,UAAU;AAC7C,wBAAA,8BAA8B,EAAE,OAAO;AACvC,wBAAA,WAAW,EAAE,wBAAwB;AACrC,wBAAA,SAAS,EAAE,sBAAsB;AACjC,wBAAA,QAAQ,EAAE;AACb,qBAAA,EAAA,QAAA,EAAA,00GAAA,EAAA,MAAA,EAAA,CAAA,wnHAAA,CAAA,EAAA;;;AC/CL;;AAEG;;;;"}
1
+ {"version":3,"file":"recursyve-ngx-material-components-typeahead.mjs","sources":["../../../src/material-components/typeahead/providers/async-typeahead.provider.ts","../../../src/material-components/typeahead/constants.ts","../../../src/material-components/typeahead/providers/async-typeahead.service.ts","../../../src/material-components/typeahead/provider.ts","../../../src/material-components/typeahead/icons/search/typeahead-search-icon.ts","../../../src/material-components/typeahead/icons/search/typeahead-search-icon.svg","../../../src/material-components/typeahead/typeahead-base.ts","../../../src/material-components/typeahead/async-typeahead.ts","../../../src/material-components/typeahead/typeahead.html","../../../src/material-components/typeahead/typeahead.ts","../../../src/material-components/typeahead/recursyve-ngx-material-components-typeahead.ts"],"sourcesContent":["import { Observable } from \"rxjs\";\n\nexport type NiceAsyncTypeaheadSearchResult<T> = {\n items: T[];\n nextPage: number | null;\n}\n\nexport abstract class NiceAsyncTypeaheadResourceProvider<T, ID = number, Options = object> {\n public abstract resource: string;\n\n public abstract search(\n searchQuery: string,\n page: number,\n options?: Options\n ): Observable<NiceAsyncTypeaheadSearchResult<T>>;\n\n public abstract getById(id: ID, options?: Options): Observable<T>;\n\n public abstract format(item: T): string;\n}\n","import { InjectionToken } from \"@angular/core\";\n\nexport const NICE_ASYNC_TYPEAHEAD_RESOURCES_PROVIDER = new InjectionToken(\"nice_async_typeahead_provider\");\n","import { computed, DestroyRef, inject, Injectable, signal } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { catchError, defer, EMPTY, finalize, map, Observable, Subject, switchMap } from \"rxjs\";\nimport { NICE_ASYNC_TYPEAHEAD_RESOURCES_PROVIDER } from \"../constants\";\nimport { NiceAsyncTypeaheadResourceProvider } from \"./async-typeahead.provider\";\n\nexport type AsyncTypeaheadRequests = {\n page: number;\n searchQuery?: string;\n};\n\nexport type FetchActiveRequest = {\n id: number | string;\n};\n\n@Injectable()\nexport class NiceTypeaheadService<T extends object> {\n private readonly resources = inject<NiceAsyncTypeaheadResourceProvider<unknown>[]>(\n NICE_ASYNC_TYPEAHEAD_RESOURCES_PROVIDER, { optional: true }\n ) ?? [];\n private readonly destroyRef = inject(DestroyRef);\n\n private readonly fetchResources$ = new Subject<AsyncTypeaheadRequests>();\n private readonly fetchActive$ = new Subject<FetchActiveRequest>();\n private resourceProvider: NiceAsyncTypeaheadResourceProvider<T, string | number> | null = null;\n\n private readonly _items = signal<T[]>([]);\n private readonly _active = signal<T | null>(null);\n private readonly _searchOptions = signal<object | null>(null);\n private readonly _request = signal<AsyncTypeaheadRequests | null>(null);\n private readonly _nextRequest = signal<AsyncTypeaheadRequests | null>(null);\n private readonly _loading = signal(true);\n\n public readonly items = this._items.asReadonly();\n public readonly active = this._active.asReadonly();\n public readonly loading = this._loading.asReadonly();\n public readonly isLastPage = computed(() => !this._nextRequest());\n\n public init(resource: string): void {\n this.fetchResources$.pipe(takeUntilDestroyed(this.destroyRef)).pipe(\n switchMap((request) => this.fetchResources(request))\n ).subscribe();\n this.fetchActive$.pipe(takeUntilDestroyed(this.destroyRef)).pipe(\n switchMap((request) => this.fetchActive(request))\n ).subscribe();\n\n const provider = this.resources.find((resources) => resources.resource === resource);\n if (provider) {\n this.resourceProvider = provider as NiceAsyncTypeaheadResourceProvider<T>;\n }\n }\n\n public setSearchOptions(options: object | null): void {\n this._searchOptions.set(options);\n }\n\n public setActive(active: T | null): void {\n this._active.set(active);\n }\n\n public setActiveFromId(id: number | string): void {\n this.fetchActive$.next({ id });\n }\n\n public reloadActive(): void {\n const active = this._active();\n if (!active || !(\"id\" in active)) {\n return;\n }\n\n if (!(typeof active.id === \"number\" || typeof active.id === \"string\")) {\n return;\n }\n\n this.setActiveFromId(active.id);\n }\n\n public setItems(items: T[]): void {\n this._items.set(items);\n }\n\n public search(searchQuery: string): void {\n this.fetchResources$.next({\n searchQuery,\n page: 0\n });\n }\n\n public loadMore(): void {\n const nextRequest = this._nextRequest();\n if (!nextRequest || this._loading()) {\n return;\n }\n\n this.fetchResources$.next(nextRequest);\n }\n\n public fetchActive(request: FetchActiveRequest): Observable<void> {\n return defer(() => {\n if (!this.resourceProvider) {\n return EMPTY;\n }\n\n this._loading.set(true);\n\n const localItem = this._items().find((item) => \"id\" in item && item.id === request.id);\n if (localItem) {\n this._loading.set(false);\n this._items.set([localItem]);\n this._active.set(localItem);\n return EMPTY;\n }\n\n return this.resourceProvider.getById(request.id)\n }).pipe(\n map((item) => {\n this._items.set([item]);\n this._active.set(item);\n }),\n catchError(() => EMPTY),\n finalize(() => {\n this._loading.set(false);\n })\n );\n }\n\n public fetchResources(request: AsyncTypeaheadRequests): Observable<void> {\n return defer(() => {\n if (!this.resourceProvider) {\n return EMPTY;\n }\n\n this._loading.set(true);\n this._request.set(request);\n\n return this.resourceProvider.search(request.searchQuery ?? \"\", request.page, this._searchOptions() ?? {});\n }).pipe(\n map((result) => {\n if (request.page === 0) {\n this._items.set(result.items as T[]);\n } else {\n this._items.set([\n ...this._items(),\n ...(result.items as T[])\n ]);\n }\n\n if (result.nextPage) {\n this._nextRequest.set({\n ...request,\n page: result.nextPage\n });\n } else {\n this._nextRequest.set(null);\n }\n }),\n catchError(() => EMPTY),\n finalize(() => {\n this._loading.set(false);\n })\n );\n }\n\n public formatLabel(item: T): string {\n if (!this.resourceProvider) {\n return \"\";\n }\n\n return this.resourceProvider.format(item);\n }\n}\n","import { Provider, Type } from \"@angular/core\";\nimport { NICE_ASYNC_TYPEAHEAD_RESOURCES_PROVIDER } from \"./constants\";\nimport { NiceAsyncTypeaheadResourceProvider } from \"./providers/async-typeahead.provider\";\n\nexport function provideAsyncTypeaheadResources(\n providers: Type<NiceAsyncTypeaheadResourceProvider<unknown, unknown>>[]\n): Provider[] {\n return providers.map((provider) => ({\n provide: NICE_ASYNC_TYPEAHEAD_RESOURCES_PROVIDER,\n useClass: provider,\n multi: true\n }));\n}\n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"nice-typeahead-search-icon\",\n templateUrl: \"typeahead-search-icon.svg\"\n})\nexport class NiceTypeaheadSearchIcon {}\n","<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M1.4720451262 13.356970375A9.063 9.063 0 1 0 18.154024235 6.267298379a9.063 9.063 0 1 0 -16.6819791088 7.089671996Z\" fill=\"none\" stroke=\"#000000\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"></path>\n <path d=\"m16.221 16.22 7.029 7.03\" fill=\"none\" stroke=\"#000000\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"></path>\n</svg>\n","import { ActiveDescendantKeyManager } from \"@angular/cdk/a11y\";\nimport { SelectionModel } from \"@angular/cdk/collections\";\nimport { DOWN_ARROW, ENTER, hasModifierKey, LEFT_ARROW, RIGHT_ARROW, SPACE, UP_ARROW } from \"@angular/cdk/keycodes\";\nimport { CdkConnectedOverlay, CdkOverlayOrigin } from \"@angular/cdk/overlay\";\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n computed,\n DestroyRef,\n Directive, DoCheck,\n effect,\n ElementRef,\n inject,\n input,\n OnDestroy,\n OnInit, output,\n QueryList,\n signal,\n TemplateRef,\n viewChild,\n ViewChildren\n} from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { ControlValueAccessor, FormBuilder, FormGroupDirective, NgControl, NgForm, Validators } from \"@angular/forms\";\nimport {\n _ErrorStateTracker,\n _getOptionScrollPosition, ErrorStateMatcher,\n MatOption,\n MatOptionSelectionChange\n} from \"@angular/material/core\";\nimport { MAT_FORM_FIELD, MatFormField, MatFormFieldControl } from \"@angular/material/form-field\";\nimport {\n debounceTime,\n defer,\n distinctUntilChanged,\n merge,\n Observable,\n startWith,\n Subject,\n switchMap,\n take,\n takeUntil\n} from \"rxjs\";\n\n/**\n * Implementation of the same panel and overlay logic as the official Angular MatSelect.\n * This used some of the logic from MatSelect to make this component look and feel like a MatSelect.\n */\n@Directive()\nexport class NiceTypeaheadBase<T>\n implements\n MatFormFieldControl<T>,\n ControlValueAccessor,\n OnInit,\n AfterViewInit,\n DoCheck,\n OnDestroy\n{\n @ViewChildren(MatOption)\n private readonly options!: QueryList<MatOption>;\n\n public readonly noItemsFoundLabel = input<string>(\"No items found\");\n public readonly labelProperty = input<string>();\n public readonly formatLabelFn = input<((value: T) => string)>();\n public readonly optionTemplate = input<TemplateRef<{ $implicit: T }>>();\n public readonly panelClass = input<string | string[]>([]);\n public readonly canRemoveValue = input<boolean>(true);\n\n public readonly selected = output<T | null>();\n\n private static nextId = 0;\n\n protected readonly _input = viewChild<ElementRef<HTMLInputElement>>(\"input\");\n protected readonly _panel = viewChild<ElementRef<HTMLElement>>(\"panel\");\n protected readonly _overlayDir = viewChild(CdkConnectedOverlay);\n\n protected _errorStateTracker?: _ErrorStateTracker;\n\n protected _required: boolean | null = null;\n protected _focused = false;\n protected _disabled = false;\n protected _panelOpen = false;\n protected _compareWith = (o1: T, o2: T) => o1 === o2;\n\n protected readonly _value = signal<T | null>(null);\n protected readonly _empty = computed(() => !this._value());\n protected readonly _placeholder = signal(\"\");\n protected readonly _searchValue = signal(\"\");\n\n protected readonly _elementRef = inject(ElementRef);\n protected readonly _destroyRef = inject(DestroyRef);\n protected readonly _changeDetectorRef = inject(ChangeDetectorRef);\n protected readonly _fb = inject(FormBuilder);\n\n protected readonly _searchControl = this._fb.nonNullable.control(\"\");\n protected readonly _initialized = new Subject<void>();\n\n protected readonly _parentFormField = inject<MatFormField>(MAT_FORM_FIELD, { optional: true });\n\n public readonly id: string = `nice-typeahead-${NiceTypeaheadBase.nextId++}`;\n public readonly controlType: string = \"nice-typeahead\";\n public readonly stateChanges = new Subject<void>();\n public readonly optionSelectionChanges: Observable<MatOptionSelectionChange> = defer(() => {\n const options = this.options;\n\n if (options) {\n return options.changes.pipe(\n startWith(options),\n switchMap(() => merge(...options.map(option => option.onSelectionChange))),\n );\n }\n\n return this._initialized.pipe(switchMap(() => this.optionSelectionChanges));\n });\n\n public readonly ngControl = inject(NgControl, { optional: true, self: true });\n\n public readonly _panelDoneAnimatingStream = new Subject<string>();\n\n public _keyManager!: ActiveDescendantKeyManager<MatOption>;\n public _preferredOverlayOrigin?: CdkOverlayOrigin | ElementRef;\n public _overlayWidth!: string | number;\n public _selectionModel!: SelectionModel<MatOption>;\n public _onChange?: (value: T | null) => void;\n public _onTouched?: () => void;\n\n public get placeholder(): string {\n return this._placeholder();\n }\n\n public set placeholder(placeholder) {\n this._placeholder.set(placeholder);\n this.stateChanges.next();\n }\n\n public get focused(): boolean {\n return this._focused;\n }\n\n public set focused(isFocused: boolean) {\n this._focused = isFocused;\n this.stateChanges.next();\n }\n\n public get required(): boolean {\n return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;\n }\n\n public set required(isRequired: boolean) {\n this._required = isRequired;\n this.stateChanges.next();\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n\n public set disabled(value: boolean) {\n this._disabled = value;\n this.stateChanges.next();\n }\n\n public get value(): T | null {\n return this._value();\n }\n\n public set value(value: T | null) {\n const hasAssigned = this._assignValue(value);\n\n if (hasAssigned) {\n this._onChange?.(value);\n this.selected.emit(value);\n }\n }\n\n public get empty(): boolean {\n return !this._value();\n }\n\n public get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n public get errorState(): boolean {\n return this._errorStateTracker?.errorState ?? false;\n }\n\n public set errorState(value: boolean) {\n if (!this._errorStateTracker) {\n return;\n }\n\n this._errorStateTracker.errorState = value;\n }\n\n public get panelOpen(): boolean {\n return this._panelOpen;\n }\n\n constructor() {\n effect(() => this._input()?.nativeElement.focus());\n\n if (this.ngControl) {\n // Note: we provide the value accessor through here, instead of\n // the `providers` to avoid running into a circular import.\n this.ngControl.valueAccessor = this;\n }\n\n const defaultErrorStateMatcher = inject(ErrorStateMatcher);\n const ngControl = inject(NgControl, { optional: true, self: true });\n const parentFormGroup = inject(FormGroupDirective, { optional: true });\n const parentForm = inject(NgForm, { optional: true });\n this._errorStateTracker = new _ErrorStateTracker(\n defaultErrorStateMatcher,\n ngControl,\n parentFormGroup,\n parentForm,\n this.stateChanges,\n );\n }\n\n public ngOnInit(): void {\n this._selectionModel = new SelectionModel<MatOption>();\n\n this._searchControl.valueChanges.pipe(\n takeUntilDestroyed(this._destroyRef),\n debounceTime(250),\n distinctUntilChanged()\n ).subscribe((value) => this._searchValue.set(value));\n }\n\n public ngAfterViewInit(): void {\n this._initialized.next();\n this._initialized.complete();\n\n this._initKeyManager();\n\n this.options.changes.pipe(startWith(null), takeUntilDestroyed(this._destroyRef)).subscribe(() => {\n this._resetOptions();\n this._initializeSelection();\n });\n }\n\n public ngDoCheck(): void {\n if (this.ngControl) {\n this.updateErrorState();\n }\n }\n\n public ngOnDestroy(): void {\n this.stateChanges.complete();\n }\n\n public onContainerClick(event: MouseEvent): void {\n if (this.disabled) {\n return;\n }\n\n this.stateChanges.next();\n if ((event.target as Element).tagName.toLowerCase() !== \"input\") {\n this.onFocusChanged(true);\n }\n }\n\n public setDescribedByIds(ids: string[]): void {\n const controlElement = this._elementRef.nativeElement.querySelector(\".nice-typeahead\");\n if (!controlElement) {\n return;\n }\n\n controlElement.setAttribute(\"aria-describedby\", ids.join(\" \"));\n }\n\n public onFocusChanged(isFocused: boolean): void {\n this.focused = isFocused;\n this.stateChanges.next();\n\n if (isFocused) {\n this.open();\n }\n }\n\n public writeValue(value: T): void {\n this._assignValue(value);\n }\n\n public registerOnChange(fn: (value: T | null) => void) {\n this._onChange = fn;\n }\n\n public registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n public setDisabledState(isDisabled: boolean): void {\n this._disabled = isDisabled;\n this._changeDetectorRef.markForCheck();\n this.stateChanges.next();\n }\n\n public formatLabel(item: T): string {\n if (typeof item === \"string\") {\n return item;\n }\n\n const fn = this.formatLabelFn();\n if (fn) {\n return fn(item);\n }\n\n const property = this.labelProperty();\n if (!property) {\n return item?.toString() ?? \"\";\n }\n\n if (!(typeof item === \"object\") || item === null) {\n return item?.toString() ?? \"\";\n }\n\n if (property in item) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return item[property];\n }\n\n return item.toString();\n }\n\n public removeActiveValue(): void {\n this.value = null;\n this._selectionModel.clear();\n this._keyManager.setActiveItem(-1);\n this._changeDetectorRef.markForCheck();\n }\n\n public updateErrorState(): void {\n this._errorStateTracker?.updateErrorState();\n }\n\n public open(): void {\n if (!this._canOpen()) {\n return;\n }\n\n // It's important that we read this as late as possible, because doing so earlier will\n // return a different element since it's based on queries in the form field which may\n // not have run yet. Also this needs to be assigned before we measure the overlay width.\n if (this._parentFormField) {\n this._preferredOverlayOrigin = this._parentFormField.getConnectedOverlayOrigin();\n }\n\n this._overlayWidth = this._getOverlayWidth(this._preferredOverlayOrigin);\n this._panelOpen = true;\n this._keyManager.withHorizontalOrientation(null);\n this._changeDetectorRef.markForCheck();\n\n // Required for the MDC form field to pick up when the overlay has been opened.\n this.stateChanges.next();\n }\n\n public close(): void {\n if (!this._panelOpen) {\n return;\n }\n\n this._focused = false;\n this._panelOpen = false;\n this._changeDetectorRef.markForCheck();\n\n this._searchValue.set(\"\");\n\n this._onTouched?.();\n\n // Required for the MDC form field to pick up when the overlay has been closed.\n this.stateChanges.next();\n }\n\n public focus(options?: FocusOptions): void {\n this._elementRef.nativeElement.focus(options);\n }\n\n public _handleKeydown(event: KeyboardEvent): void {\n if (this.disabled) {\n return;\n }\n\n if (this.panelOpen) {\n this._handleOpenKeydown(event);\n } else {\n this._handleClosedKeydown(event);\n }\n }\n\n public _handleScrollEnd(): void {\n console.log(\"scroll end\")\n }\n\n protected _canOpen(): boolean {\n return !this._panelOpen && !this.disabled;\n }\n\n protected _onAttached(): void {\n this._overlayDir()?.positionChange.pipe(take(1)).subscribe(() => {\n this._changeDetectorRef.detectChanges();\n this._positioningSettled();\n });\n }\n\n protected _initKeyManager() {\n this._keyManager = new ActiveDescendantKeyManager<MatOption>(this.options)\n .withVerticalOrientation()\n .withHomeAndEnd()\n .withPageUpDown()\n .withAllowedModifierKeys([\"shiftKey\"])\n .skipPredicate(this._skipPredicate);\n\n this._keyManager.tabOut.subscribe(() => {\n if (this.panelOpen) {\n if (this._keyManager.activeItem) {\n this._keyManager.activeItem._selectViaInteraction();\n }\n\n this.focus();\n this.close();\n }\n });\n\n this._keyManager.change.subscribe(() => {\n if (this._panelOpen && this._panel()) {\n this._scrollOptionIntoView(this._keyManager.activeItemIndex || 0);\n } else if (!this._panelOpen && this._keyManager.activeItem) {\n this._keyManager.activeItem._selectViaInteraction();\n }\n });\n }\n\n protected _getOverlayWidth(preferredOrigin?: ElementRef<ElementRef> | CdkOverlayOrigin): string | number {\n const refToMeasure =\n preferredOrigin instanceof CdkOverlayOrigin\n ? preferredOrigin.elementRef\n : preferredOrigin || this._elementRef;\n return refToMeasure.nativeElement.getBoundingClientRect().width;\n }\n\n protected _skipPredicate = (option: MatOption) => {\n if (this.panelOpen) {\n return false;\n }\n\n return option.disabled;\n };\n\n protected _positioningSettled() {\n this._scrollOptionIntoView(this._keyManager.activeItemIndex || 0);\n }\n\n protected _scrollOptionIntoView(index: number): void {\n const option = this.options.toArray()[index];\n if (!option) {\n return;\n }\n\n const panel = this._panel()?.nativeElement;\n if (!panel) {\n return;\n }\n\n const element = option._getHostElement();\n if (index === 0) {\n // If we've got one group label before the option and we're at the top option,\n // scroll the list to the top. This is better UX than scrolling the list to the\n // top of the option, because it allows the user to read the top group's label.\n panel.scrollTop = 0;\n } else {\n panel.scrollTop = _getOptionScrollPosition(\n element.offsetTop,\n element.offsetHeight,\n panel.scrollTop,\n panel.offsetHeight,\n );\n }\n }\n\n protected _resetOptions(): void {\n this.optionSelectionChanges.pipe(\n takeUntil(this.options.changes),\n takeUntilDestroyed(this._destroyRef)\n ).subscribe((event) => {\n this._onSelect(event.source);\n\n if (event.isUserInput && this._panelOpen) {\n this.close();\n this.focus();\n }\n });\n }\n\n protected _onSelect(option: MatOption): void {\n this.value = option.value;\n this._setSelectionByValue(option.value);\n this._selectOptionByValue(option.value);\n\n this.stateChanges.next();\n }\n\n protected _initializeSelection(): void {\n // Defer setting the value in order to avoid the \"Expression\n // has changed after it was checked\" errors from Angular.\n Promise.resolve().then(() => {\n if (this.ngControl) {\n this._value.set(this.ngControl.value);\n }\n\n const _value = this.value;\n if (_value) {\n this._selectOptionByValue(_value);\n }\n this._setSelectionByValue(_value);\n\n this._highlightCorrectOption();\n this.stateChanges.next();\n });\n }\n\n protected _setSelectionByValue(value: T | null): void {\n this.options.forEach(option => option.setInactiveStyles());\n this._selectionModel.clear();\n\n const correspondingOption = value ? this._selectOptionByValue(value) : null;\n\n // Shift focus to the active item. Note that we shouldn't do this in multiple\n // mode, because we don't know what option the user interacted with last.\n if (correspondingOption) {\n correspondingOption.select(false);\n this._keyManager.updateActiveItem(correspondingOption);\n } else if (!this.panelOpen) {\n // Otherwise reset the highlighted option. Note that we only want to do this while\n // closed, because doing it while open can shift the user's focus unnecessarily.\n this._keyManager.updateActiveItem(-1);\n }\n\n this._changeDetectorRef.markForCheck();\n }\n\n\n protected _selectOptionByValue(value: T): MatOption | undefined {\n const correspondingOption = this.options.find((option: MatOption) => {\n // Skip options that are already in the model. This allows us to handle cases\n // where the same primitive value is selected multiple times.\n if (this._selectionModel.isSelected(option)) {\n return false;\n }\n\n try {\n // Treat null as a special reset value.\n return option.value != null && this._compareWith(option.value, value);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (error) {\n return false;\n }\n });\n\n if (correspondingOption) {\n this._selectionModel.select(correspondingOption);\n }\n\n return correspondingOption;\n }\n\n protected _highlightCorrectOption(): void {\n if (!this._keyManager) {\n return;\n }\n\n if (this.empty) {\n // Find the index of the first *enabled* option. Avoid calling `_keyManager.setActiveItem`\n // because it activates the first option that passes the skip predicate, rather than the\n // first *enabled* option.\n let firstEnabledOptionIndex = -1;\n for (let index = 0; index < this.options.length; index++) {\n const option = this.options.get(index)!;\n if (!option.disabled) {\n firstEnabledOptionIndex = index;\n break;\n }\n }\n\n this._keyManager.setActiveItem(firstEnabledOptionIndex);\n } else {\n this._keyManager.setActiveItem(this._selectionModel.selected[0]);\n }\n }\n\n\n protected _handleClosedKeydown(event: KeyboardEvent): void {\n const keyCode = event.keyCode;\n const isArrowKey =\n keyCode === DOWN_ARROW ||\n keyCode === UP_ARROW ||\n keyCode === LEFT_ARROW ||\n keyCode === RIGHT_ARROW;\n const isOpenKey = keyCode === ENTER || keyCode === SPACE;\n const manager = this._keyManager;\n\n // Open the select on ALT + arrow key to match the native <select>\n if (\n (!manager.isTyping() && isOpenKey && !hasModifierKey(event)) ||\n (event.altKey && isArrowKey)\n ) {\n event.preventDefault(); // prevents the page from scrolling down when pressing space\n this.open();\n }\n }\n\n protected _handleOpenKeydown(event: KeyboardEvent): void {\n const manager = this._keyManager;\n const keyCode = event.keyCode;\n const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW;\n const isTyping = manager.isTyping();\n\n if (isArrowKey && event.altKey) {\n // Close the select on ALT + arrow key to match the native <select>\n event.preventDefault();\n this.close();\n // Don't do anything in this case if the user is typing,\n // because the typing sequence can include the space key.\n } else if (\n !isTyping &&\n (keyCode === ENTER || keyCode === SPACE) &&\n manager.activeItem &&\n !hasModifierKey(event)\n ) {\n event.preventDefault();\n manager.activeItem._selectViaInteraction();\n } else {\n manager.onKeydown(event);\n }\n }\n\n protected _assignValue(newValue: T | null): boolean {\n // Always re-assign an array, because it might have been mutated.\n if (newValue !== this.value) {\n if (this.options) {\n this._setSelectionByValue(newValue);\n }\n\n this._value.set(newValue);\n return true;\n }\n return false;\n }\n}\n","import { CdkConnectedOverlay, CdkOverlayOrigin } from \"@angular/cdk/overlay\";\nimport { NgClass, NgTemplateOutlet } from \"@angular/common\";\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n OnInit,\n viewChild,\n ViewEncapsulation\n} from \"@angular/core\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\nimport { MatIconButton } from \"@angular/material/button\";\nimport { MatOption } from \"@angular/material/core\";\nimport { MatFormField, MatFormFieldControl, MatPrefix } from \"@angular/material/form-field\";\nimport { MatInput } from \"@angular/material/input\";\nimport { NiceTypeaheadSearchIcon } from \"./icons/search/typeahead-search-icon\";\nimport { NiceTypeaheadService } from \"./providers\";\nimport { NiceTypeaheadBase } from \"./typeahead-base\";\n\n@Component({\n selector: \"nice-async-typeahead\",\n imports: [\n CdkOverlayOrigin,\n CdkConnectedOverlay,\n ReactiveFormsModule,\n MatOption,\n MatFormField,\n MatInput,\n MatIconButton,\n MatPrefix,\n NgClass,\n NgTemplateOutlet,\n NiceTypeaheadSearchIcon\n ],\n templateUrl: \"./typeahead.html\",\n styleUrl: \"./typeahead.scss\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: MatFormFieldControl, useExisting: NiceAsyncTypeahead },\n NiceTypeaheadService\n ],\n host: {\n \"role\": \"combobox\",\n \"aria-haspopup\": \"listbox\",\n \"class\": \"nice-typeahead\",\n \"[attr.id]\": \"id\",\n \"[attr.aria-controls]\": \"panelOpen ? id + \\\"-panel\\\" : null\",\n \"[attr.aria-expanded]\": \"panelOpen\",\n \"[attr.aria-required]\": \"required.toString()\",\n \"[attr.aria-disabled]\": \"disabled.toString()\",\n \"[attr.aria-invalid]\": \"errorState\",\n \"[class.nice-typeahead-disabled]\": \"disabled\",\n \"[class.nice-typeahead-invalid]\": \"errorState\",\n \"[class.nice-typeahead-required]\": \"required\",\n \"[class.nice-typeahead-empty]\": \"empty\",\n \"(keydown)\": \"_handleKeydown($event)\",\n \"(focus)\": \"onFocusChanged(true)\",\n \"(blur)\": \"onFocusChanged(false)\"\n }\n})\nexport class NiceAsyncTypeahead<T, S extends object = object> extends NiceTypeaheadBase<T> implements OnInit {\n public readonly resource = input.required<string>();\n public readonly searchOptions = input<S | null>(null);\n\n public readonly filteredValues = computed(() => this.service.items());\n\n protected readonly optionsContainer = viewChild<ElementRef<HTMLElement>>(\"optionsContainer\");\n\n private readonly service = inject(NiceTypeaheadService);\n\n protected override _compareWith = (o1: T, o2: T) => {\n if (!(typeof o1 === \"object\" && o1 && typeof o2 === \"object\" && o2)) {\n return o1 === o2;\n }\n\n if (!(\"id\" in o1) || !(\"id\" in o2)) {\n return o1 === o2;\n }\n\n return o1.id === o2.id;\n };\n\n /**\n * Infinite scroll internal state\n */\n private readonly scrollThresholdPercent = 0.99;\n private lastScrollHeight = 0;\n\n constructor() {\n super();\n\n effect(() => this.service.setSearchOptions(this.searchOptions()));\n\n effect(() => this.service.search(this._searchValue()));\n\n effect(() => {\n const container = this.optionsContainer();\n if (!container) {\n return;\n }\n\n container.nativeElement.addEventListener(\"scroll\", this.onScroll.bind(this));\n });\n }\n\n public override ngOnInit(): void {\n super.ngOnInit();\n\n this.service.init(this.resource());\n }\n\n public override onFocusChanged(isFocused: boolean): void {\n super.onFocusChanged(isFocused);\n\n if (isFocused) {\n this._searchControl.patchValue(\"\");\n }\n }\n\n public override formatLabel(item: T): string {\n return this.service.formatLabel(item);\n }\n\n public override removeActiveValue() {\n super.removeActiveValue();\n\n this.service.setActive(null);\n }\n\n public setSearchOptions(options: S | null): void {\n this.service.setSearchOptions(options);\n }\n\n protected onScroll(event: Event): void {\n const target = event.target as HTMLElement;\n const threshold = (this.scrollThresholdPercent * 100 * target.scrollHeight) / 100;\n const current = target.scrollTop + target.clientHeight;\n\n if (this.lastScrollHeight > target.scrollHeight) {\n this.lastScrollHeight = 0;\n }\n\n if (current > threshold && this.lastScrollHeight < target.scrollHeight) {\n this.service.loadMore();\n this.lastScrollHeight = target.scrollHeight;\n }\n }\n}\n","<div\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n class=\"nice-typeahead\"\n cdk-overlay-origin\n>\n <div class=\"nice-typeahead-value\">\n @if (_empty()) {\n <span class=\"nice-typeahead-placeholder mat-mdc-select-min-line\">{{ _placeholder() }}</span>\n } @else {\n <span class=\"nice-typeahead-value-text\">\n <span class=\"mat-mdc-select-min-line\">\n @if (_value(); as activeValue) {\n {{ formatLabel(activeValue) }}\n }\n </span>\n </span>\n }\n </div>\n\n <div class=\"nice-typeahead-suffix\">\n @if (_empty()) {\n <div class=\"mat-mdc-select-arrow\">\n <svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M7 10l5 5 5-5z\"></path>\n </svg>\n </div>\n } @else if (canRemoveValue()) {\n <button class=\"nice-typeahead-remove\" mat-icon-button (click)=\"$event.stopPropagation(); removeActiveValue()\">\n <svg viewBox=\"0 -960 960 960\">\n <path d=\"m291-240-51-51 189-189-189-189 51-51 189 189 189-189 51 51-189 189 189 189-51 51-189-189-189 189Z\"/>\n </svg>\n </button>\n }\n </div>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayWidth]=\"_overlayWidth\"\n [cdkConnectedOverlayOrigin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\n (attach)=\"_onAttached()\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n #panel\n role=\"listbox\"\n tabindex=\"-1\"\n class=\"nice-typeahead-panel nice-typeahead--open nice-typehead-animations-enabled\"\n [ngClass]=\"panelClass()\"\n [attr.id]=\"id + '-panel'\"\n (keydown)=\"_handleKeydown($event)\"\n (scrollend)=\"_handleScrollEnd()\"\n >\n <div class=\"nice-typeahead-search-input\">\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\">\n <input\n #input\n class=\"nice-typeahead__input\"\n matInput\n [formControl]=\"_searchControl\"\n >\n\n <nice-typeahead-search-icon matIconPrefix />\n </mat-form-field>\n </div>\n\n <div #optionsContainer class=\"nice-typeahead-options\" role=\"presentation\">\n @for (item of filteredValues(); track item) {\n <mat-option [value]=\"item\">\n @if (optionTemplate(); as optionTemplate) {\n <ng-container *ngTemplateOutlet=\"optionTemplate; context: { $implicit: item }\"></ng-container>\n } @else {\n {{ formatLabel(item) }}\n }\n </mat-option>\n } @empty {\n <mat-option disabled>\n <span class=\"nice-typeahead__no-items\">\n {{ noItemsFoundLabel() }}\n </span>\n </mat-option>\n }\n </div>\n </div>\n</ng-template>\n","import { CdkConnectedOverlay, CdkOverlayOrigin } from \"@angular/cdk/overlay\";\nimport { NgClass, NgTemplateOutlet } from \"@angular/common\";\nimport { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from \"@angular/core\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\nimport { MatIconButton } from \"@angular/material/button\";\nimport { MatOption } from \"@angular/material/core\";\nimport { MatFormField, MatFormFieldControl, MatPrefix } from \"@angular/material/form-field\";\nimport { MatInput } from \"@angular/material/input\";\nimport { NiceTypeaheadSearchIcon } from \"./icons/search/typeahead-search-icon\";\nimport { NiceTypeaheadBase } from \"./typeahead-base\";\n\nexport type SearchFunction<T> = (search: string, item: T) => boolean;\n\n@Component({\n selector: \"nice-typeahead\",\n imports: [\n CdkOverlayOrigin,\n CdkConnectedOverlay,\n ReactiveFormsModule,\n MatOption,\n MatFormField,\n MatInput,\n MatIconButton,\n MatPrefix,\n NgClass,\n NgTemplateOutlet,\n NiceTypeaheadSearchIcon\n ],\n templateUrl: \"./typeahead.html\",\n styleUrl: \"./typeahead.scss\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: MatFormFieldControl, useExisting: NiceTypeahead }],\n host: {\n \"role\": \"combobox\",\n \"aria-haspopup\": \"listbox\",\n \"class\": \"nice-typeahead\",\n \"[attr.id]\": \"id\",\n \"[attr.aria-controls]\": \"panelOpen ? id + \\\"-panel\\\" : null\",\n \"[attr.aria-expanded]\": \"panelOpen\",\n \"[attr.aria-required]\": \"required.toString()\",\n \"[attr.aria-disabled]\": \"disabled.toString()\",\n \"[attr.aria-invalid]\": \"errorState\",\n \"[class.nice-typeahead-disabled]\": \"disabled\",\n \"[class.nice-typeahead-invalid]\": \"errorState\",\n \"[class.nice-typeahead-required]\": \"required\",\n \"[class.nice-typeahead-empty]\": \"empty\",\n \"(keydown)\": \"_handleKeydown($event)\",\n \"(focus)\": \"onFocusChanged(true)\",\n \"(blur)\": \"onFocusChanged(false)\"\n }\n})\nexport class NiceTypeahead<T> extends NiceTypeaheadBase<T> {\n public readonly values = input.required<T[]>();\n public readonly searchFn = input<SearchFunction<T>>();\n\n public readonly filteredValues = computed(() => this.filterValuesFromSearch(this._searchValue(), this.values()));\n\n public override onFocusChanged(isFocused: boolean): void {\n super.onFocusChanged(isFocused);\n\n if (isFocused) {\n this._searchControl.patchValue(\"\");\n }\n }\n\n public filterValuesFromSearch(searchValue: string, values: T[]): T[] {\n if (!searchValue) {\n return values;\n }\n\n const _searchValue = searchValue.toLowerCase();\n const fn = this.searchFn();\n if (fn) {\n return values.filter((v) => fn(_searchValue, v));\n }\n\n return values.filter((v) => {\n if (typeof v === \"string\") {\n return v.toLowerCase().includes(_searchValue);\n }\n\n const property = this.labelProperty();\n if (!property) {\n return false;\n }\n\n if (typeof v === \"object\" && v && property in v) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return v[property].toString().toLowerCase().includes(_search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C1B,SAAA,EAAA,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAe,aAAA,EAAE,CAAC,EACnE,IAAA,EAAA;AACF,wBAAA,MAAM,EAAE,UAAU;AAClB,wBAAA,eAAe,EAAE,SAAS;AAC1B,wBAAA,OAAO,EAAE,gBAAgB;AACzB,wBAAA,WAAW,EAAE,IAAI;AACjB,wBAAA,sBAAsB,EAAE,oCAAoC;AAC5D,wBAAA,sBAAsB,EAAE,WAAW;AACnC,wBAAA,sBAAsB,EAAE,qBAAqB;AAC7C,wBAAA,sBAAsB,EAAE,qBAAqB;AAC7C,wBAAA,qBAAqB,EAAE,YAAY;AACnC,wBAAA,iCAAiC,EAAE,UAAU;AAC7C,wBAAA,gCAAgC,EAAE,YAAY;AAC9C,wBAAA,iCAAiC,EAAE,UAAU;AAC7C,wBAAA,8BAA8B,EAAE,OAAO;AACvC,wBAAA,WAAW,EAAE,wBAAwB;AACrC,wBAAA,SAAS,EAAE,sBAAsB;AACjC,wBAAA,QAAQ,EAAE;AACb,qBAAA,EAAA,QAAA,EAAA,04GAAA,EAAA,MAAA,EAAA,CAAA,ozHAAA,CAAA,EAAA;;;AClDL;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recursyve/ngx-material-components",
3
- "version": "19.0.0-beta.11",
3
+ "version": "19.0.0-beta.12",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.0",
6
6
  "@angular/core": "^19.2.0"
@@ -19,6 +19,10 @@
19
19
  "types": "./index.d.ts",
20
20
  "default": "./fesm2022/recursyve-ngx-material-components.mjs"
21
21
  },
22
+ "./chip-list": {
23
+ "types": "./chip-list/index.d.ts",
24
+ "default": "./fesm2022/recursyve-ngx-material-components-chip-list.mjs"
25
+ },
22
26
  "./form-field-error": {
23
27
  "types": "./form-field-error/index.d.ts",
24
28
  "default": "./fesm2022/recursyve-ngx-material-components-form-field-error.mjs"
@@ -32,4 +36,4 @@
32
36
  "default": "./fesm2022/recursyve-ngx-material-components-typeahead.mjs"
33
37
  }
34
38
  }
35
- }
39
+ }
@@ -18,6 +18,7 @@ export declare class NiceAsyncTypeahead<T, S extends object = object> extends Ni
18
18
  onFocusChanged(isFocused: boolean): void;
19
19
  formatLabel(item: T): string;
20
20
  removeActiveValue(): void;
21
+ setSearchOptions(options: S | null): void;
21
22
  protected onScroll(event: Event): void;
22
23
  static ɵfac: i0.ɵɵFactoryDeclaration<NiceAsyncTypeahead<any, any>, never>;
23
24
  static ɵcmp: i0.ɵɵComponentDeclaration<NiceAsyncTypeahead<any, any>, "nice-async-typeahead", never, { "resource": { "alias": "resource"; "required": true; "isSignal": true; }; "searchOptions": { "alias": "searchOptions"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class NiceTypeaheadSearchIcon {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<NiceTypeaheadSearchIcon, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<NiceTypeaheadSearchIcon, "nice-typeahead-search-icon", never, {}, {}, never, never, true, never>;
5
+ }
@@ -21,6 +21,7 @@ export declare class NiceTypeaheadBase<T> implements MatFormFieldControl<T>, Con
21
21
  }> | undefined>;
22
22
  readonly panelClass: import("@angular/core").InputSignal<string | string[]>;
23
23
  readonly canRemoveValue: import("@angular/core").InputSignal<boolean>;
24
+ readonly selected: import("@angular/core").OutputEmitterRef<T | null>;
24
25
  private static nextId;
25
26
  protected readonly _input: import("@angular/core").Signal<ElementRef<HTMLInputElement> | undefined>;
26
27
  protected readonly _panel: import("@angular/core").Signal<ElementRef<HTMLElement> | undefined>;
@@ -106,5 +107,5 @@ export declare class NiceTypeaheadBase<T> implements MatFormFieldControl<T>, Con
106
107
  protected _handleOpenKeydown(event: KeyboardEvent): void;
107
108
  protected _assignValue(newValue: T | null): boolean;
108
109
  static ɵfac: i0.ɵɵFactoryDeclaration<NiceTypeaheadBase<any>, never>;
109
- static ɵdir: i0.ɵɵDirectiveDeclaration<NiceTypeaheadBase<any>, never, never, { "noItemsFoundLabel": { "alias": "noItemsFoundLabel"; "required": false; "isSignal": true; }; "labelProperty": { "alias": "labelProperty"; "required": false; "isSignal": true; }; "formatLabelFn": { "alias": "formatLabelFn"; "required": false; "isSignal": true; }; "optionTemplate": { "alias": "optionTemplate"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "canRemoveValue": { "alias": "canRemoveValue"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
110
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NiceTypeaheadBase<any>, never, never, { "noItemsFoundLabel": { "alias": "noItemsFoundLabel"; "required": false; "isSignal": true; }; "labelProperty": { "alias": "labelProperty"; "required": false; "isSignal": true; }; "formatLabelFn": { "alias": "formatLabelFn"; "required": false; "isSignal": true; }; "optionTemplate": { "alias": "optionTemplate"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "canRemoveValue": { "alias": "canRemoveValue"; "required": false; "isSignal": true; }; }, { "selected": "selected"; }, never, never, true, never>;
110
111
  }