@recursyve/ngx-material-components 20.0.2 → 21.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/recursyve-ngx-material-components-chip-list.mjs +11 -11
- package/fesm2022/recursyve-ngx-material-components-chip-list.mjs.map +1 -1
- package/fesm2022/recursyve-ngx-material-components-common.mjs +3 -3
- package/fesm2022/recursyve-ngx-material-components-dropzone.mjs +27 -27
- package/fesm2022/recursyve-ngx-material-components-dropzone.mjs.map +1 -1
- package/fesm2022/recursyve-ngx-material-components-form-field-error.mjs +6 -6
- package/fesm2022/recursyve-ngx-material-components-form-field-error.mjs.map +1 -1
- package/fesm2022/recursyve-ngx-material-components-loading.mjs +9 -9
- package/fesm2022/recursyve-ngx-material-components-loading.mjs.map +1 -1
- package/fesm2022/recursyve-ngx-material-components-typeahead.mjs +111 -40
- package/fesm2022/recursyve-ngx-material-components-typeahead.mjs.map +1 -1
- package/package.json +11 -11
- package/{typeahead/index.d.ts → types/recursyve-ngx-material-components-typeahead.d.ts} +21 -8
- /package/{chip-list/index.d.ts → types/recursyve-ngx-material-components-chip-list.d.ts} +0 -0
- /package/{common/index.d.ts → types/recursyve-ngx-material-components-common.d.ts} +0 -0
- /package/{dropzone/index.d.ts → types/recursyve-ngx-material-components-dropzone.d.ts} +0 -0
- /package/{form-field-error/index.d.ts → types/recursyve-ngx-material-components-form-field-error.d.ts} +0 -0
- /package/{loading/index.d.ts → types/recursyve-ngx-material-components-loading.d.ts} +0 -0
- /package/{index.d.ts → types/recursyve-ngx-material-components.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, DestroyRef, signal, computed, Injectable, Component, input, output, viewChild, ElementRef, ChangeDetectorRef, effect, ViewChildren, Directive, booleanAttribute, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, DestroyRef, signal, computed, Injectable, Component, input, output, viewChild, ElementRef, ChangeDetectorRef, effect, ViewChildren, Directive, booleanAttribute, untracked, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
-
import { Subject, switchMap,
|
|
4
|
+
import { Subject, switchMap, EMPTY, defer, map, catchError, finalize, tap, startWith, merge, debounceTime, distinctUntilChanged, take, takeUntil } from 'rxjs';
|
|
5
5
|
import { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
|
6
6
|
import { NgClass, NgTemplateOutlet } from '@angular/common';
|
|
7
7
|
import * as i1 from '@angular/forms';
|
|
@@ -31,7 +31,7 @@ class NiceTypeaheadService {
|
|
|
31
31
|
_request = signal(null, ...(ngDevMode ? [{ debugName: "_request" }] : []));
|
|
32
32
|
_nextRequest = signal(null, ...(ngDevMode ? [{ debugName: "_nextRequest" }] : []));
|
|
33
33
|
_preloaded = signal(false, ...(ngDevMode ? [{ debugName: "_preloaded" }] : []));
|
|
34
|
-
|
|
34
|
+
_autoSelectMode = signal("none", ...(ngDevMode ? [{ debugName: "_autoSelectMode" }] : []));
|
|
35
35
|
_loading = signal(true, ...(ngDevMode ? [{ debugName: "_loading" }] : []));
|
|
36
36
|
items = this._items.asReadonly();
|
|
37
37
|
active = this._active.asReadonly();
|
|
@@ -45,16 +45,30 @@ class NiceTypeaheadService {
|
|
|
45
45
|
throw new Error("No provider found for resource " + resource);
|
|
46
46
|
}
|
|
47
47
|
this.resourceProvider = provider;
|
|
48
|
-
if (options?.
|
|
49
|
-
this.
|
|
48
|
+
if (options?.autoSelectMode) {
|
|
49
|
+
this._autoSelectMode.set(options.autoSelectMode);
|
|
50
50
|
}
|
|
51
51
|
if (options?.searchOptions) {
|
|
52
52
|
this._searchOptions.set(options.searchOptions);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
autoSelect(items) {
|
|
56
|
+
if (this._autoSelectMode() === "first_result" && !this._preloaded()) {
|
|
57
|
+
this._preloaded.set(true);
|
|
58
|
+
this._active.set(items[0]);
|
|
59
|
+
}
|
|
60
|
+
if (this._autoSelectMode() === "single_result" && items.length === 1) {
|
|
61
|
+
this._preloaded.set(true);
|
|
62
|
+
this._active.set(items[0]);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
55
65
|
setSearchOptions(options) {
|
|
56
66
|
this._searchOptions.set(options);
|
|
57
67
|
}
|
|
68
|
+
patchSearchOptions(options) {
|
|
69
|
+
const currentOptions = this._searchOptions();
|
|
70
|
+
this._searchOptions.set({ ...currentOptions, ...options });
|
|
71
|
+
}
|
|
58
72
|
setActive(active) {
|
|
59
73
|
this._active.set(active);
|
|
60
74
|
}
|
|
@@ -62,7 +76,13 @@ class NiceTypeaheadService {
|
|
|
62
76
|
this.fetchActive$.next({ id });
|
|
63
77
|
}
|
|
64
78
|
reload() {
|
|
65
|
-
|
|
79
|
+
const onFinish = new Subject();
|
|
80
|
+
this.fetchResources$.next({
|
|
81
|
+
page: 0,
|
|
82
|
+
searchQuery: this._request()?.searchQuery ?? "",
|
|
83
|
+
onFinish
|
|
84
|
+
});
|
|
85
|
+
return onFinish.asObservable();
|
|
66
86
|
}
|
|
67
87
|
reloadActive() {
|
|
68
88
|
const active = this._active();
|
|
@@ -78,17 +98,18 @@ class NiceTypeaheadService {
|
|
|
78
98
|
this._items.set(items);
|
|
79
99
|
}
|
|
80
100
|
search(searchQuery) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
});
|
|
101
|
+
const onFinish = new Subject();
|
|
102
|
+
this.fetchResources$.next({ searchQuery, page: 0, onFinish });
|
|
103
|
+
return onFinish.asObservable();
|
|
85
104
|
}
|
|
86
105
|
loadMore() {
|
|
87
106
|
const nextRequest = this._nextRequest();
|
|
88
107
|
if (!nextRequest || this._loading()) {
|
|
89
|
-
return;
|
|
108
|
+
return EMPTY;
|
|
90
109
|
}
|
|
91
|
-
|
|
110
|
+
const onFinish = new Subject();
|
|
111
|
+
this.fetchResources$.next({ ...nextRequest, onFinish });
|
|
112
|
+
return onFinish.asObservable();
|
|
92
113
|
}
|
|
93
114
|
fetchActive(request) {
|
|
94
115
|
return defer(() => {
|
|
@@ -114,6 +135,11 @@ class NiceTypeaheadService {
|
|
|
114
135
|
fetchResources(request) {
|
|
115
136
|
return defer(() => {
|
|
116
137
|
if (!this.resourceProvider) {
|
|
138
|
+
const error = new Error("Resource provider not initialized");
|
|
139
|
+
if (request.onFinish) {
|
|
140
|
+
request.onFinish.error(error);
|
|
141
|
+
request.onFinish.complete();
|
|
142
|
+
}
|
|
117
143
|
return EMPTY;
|
|
118
144
|
}
|
|
119
145
|
this._loading.set(true);
|
|
@@ -138,9 +164,23 @@ class NiceTypeaheadService {
|
|
|
138
164
|
else {
|
|
139
165
|
this._nextRequest.set(null);
|
|
140
166
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
167
|
+
}), tap({
|
|
168
|
+
next: () => {
|
|
169
|
+
if (request.onFinish) {
|
|
170
|
+
request.onFinish.next();
|
|
171
|
+
request.onFinish.complete();
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
error: (error) => {
|
|
175
|
+
if (request.onFinish) {
|
|
176
|
+
request.onFinish.error(error);
|
|
177
|
+
request.onFinish.complete();
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
finalize: () => {
|
|
181
|
+
if (request.onFinish && !request.onFinish.closed) {
|
|
182
|
+
request.onFinish.complete();
|
|
183
|
+
}
|
|
144
184
|
}
|
|
145
185
|
}), catchError(() => EMPTY), finalize(() => {
|
|
146
186
|
this._loading.set(false);
|
|
@@ -152,10 +192,10 @@ class NiceTypeaheadService {
|
|
|
152
192
|
}
|
|
153
193
|
return this.resourceProvider.format(item);
|
|
154
194
|
}
|
|
155
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
156
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
195
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: NiceTypeaheadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
196
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: NiceTypeaheadService });
|
|
157
197
|
}
|
|
158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: NiceTypeaheadService, decorators: [{
|
|
159
199
|
type: Injectable
|
|
160
200
|
}] });
|
|
161
201
|
|
|
@@ -168,10 +208,10 @@ function provideAsyncTypeaheadResources(providers) {
|
|
|
168
208
|
}
|
|
169
209
|
|
|
170
210
|
class NiceTypeaheadSearchIcon {
|
|
171
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
172
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
211
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: NiceTypeaheadSearchIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
212
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.5", 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=\"currentColor\" 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=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"></path>\n</svg>\n" });
|
|
173
213
|
}
|
|
174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
214
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: NiceTypeaheadSearchIcon, decorators: [{
|
|
175
215
|
type: Component,
|
|
176
216
|
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=\"currentColor\" 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=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"></path>\n</svg>\n" }]
|
|
177
217
|
}] });
|
|
@@ -618,7 +658,7 @@ class NiceTypeaheadBase {
|
|
|
618
658
|
// because the typing sequence can include the space key.
|
|
619
659
|
}
|
|
620
660
|
else if (!isTyping &&
|
|
621
|
-
|
|
661
|
+
keyCode === ENTER &&
|
|
622
662
|
manager.activeItem &&
|
|
623
663
|
!hasModifierKey(event)) {
|
|
624
664
|
event.preventDefault();
|
|
@@ -639,22 +679,27 @@ class NiceTypeaheadBase {
|
|
|
639
679
|
}
|
|
640
680
|
return false;
|
|
641
681
|
}
|
|
642
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
643
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "
|
|
682
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: NiceTypeaheadBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
683
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.0.5", 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 });
|
|
644
684
|
}
|
|
645
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
685
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: NiceTypeaheadBase, decorators: [{
|
|
646
686
|
type: Directive
|
|
647
687
|
}], ctorParameters: () => [], propDecorators: { options: [{
|
|
648
688
|
type: ViewChildren,
|
|
649
689
|
args: [MatOption]
|
|
650
|
-
}] } });
|
|
690
|
+
}], noItemsFoundLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noItemsFoundLabel", required: false }] }], labelProperty: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelProperty", required: false }] }], formatLabelFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatLabelFn", required: false }] }], optionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTemplate", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], canRemoveValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "canRemoveValue", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }], _input: [{ type: i0.ViewChild, args: ["input", { isSignal: true }] }], _panel: [{ type: i0.ViewChild, args: ["panel", { isSignal: true }] }], _overlayDir: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkConnectedOverlay), { isSignal: true }] }] } });
|
|
651
691
|
|
|
652
692
|
class NiceAsyncTypeahead extends NiceTypeaheadBase {
|
|
653
693
|
resource = input.required(...(ngDevMode ? [{ debugName: "resource" }] : []));
|
|
654
694
|
searchOptions = input(null, ...(ngDevMode ? [{ debugName: "searchOptions" }] : []));
|
|
655
|
-
|
|
695
|
+
autoSelectMode = input("none", ...(ngDevMode ? [{ debugName: "autoSelectMode" }] : []));
|
|
696
|
+
/**
|
|
697
|
+
* @deprecated Use autoSelectMode instead
|
|
698
|
+
*/
|
|
699
|
+
autoSelectFirstValue = input(false, { ...(ngDevMode ? { debugName: "autoSelectFirstValue" } : {}), transform: booleanAttribute });
|
|
656
700
|
filteredValues = computed(() => this.service.items(), ...(ngDevMode ? [{ debugName: "filteredValues" }] : []));
|
|
657
701
|
optionsContainer = viewChild("optionsContainer", ...(ngDevMode ? [{ debugName: "optionsContainer" }] : []));
|
|
702
|
+
prefilled = signal(false, ...(ngDevMode ? [{ debugName: "prefilled" }] : []));
|
|
658
703
|
service = inject(NiceTypeaheadService);
|
|
659
704
|
_compareWith = (o1, o2) => {
|
|
660
705
|
if (!(typeof o1 === "object" && o1 && typeof o2 === "object" && o2)) {
|
|
@@ -684,12 +729,20 @@ class NiceAsyncTypeahead extends NiceTypeaheadBase {
|
|
|
684
729
|
effect(() => {
|
|
685
730
|
this.value = this.service.active();
|
|
686
731
|
});
|
|
732
|
+
effect(() => {
|
|
733
|
+
if (this.focused) {
|
|
734
|
+
return;
|
|
735
|
+
}
|
|
736
|
+
const items = this.service.items();
|
|
737
|
+
untracked(() => this.service.autoSelect(items));
|
|
738
|
+
});
|
|
687
739
|
}
|
|
688
740
|
ngOnInit() {
|
|
689
741
|
super.ngOnInit();
|
|
742
|
+
const autoSelectMode = this.autoSelectMode() ?? (this.autoSelectFirstValue() ? "first_result" : "none");
|
|
690
743
|
const searchOptions = this.optionsContainer();
|
|
691
744
|
this.service.init(this.resource(), {
|
|
692
|
-
|
|
745
|
+
autoSelectMode: autoSelectMode,
|
|
693
746
|
...(searchOptions && { searchOptions: searchOptions })
|
|
694
747
|
});
|
|
695
748
|
}
|
|
@@ -703,9 +756,14 @@ class NiceAsyncTypeahead extends NiceTypeaheadBase {
|
|
|
703
756
|
}
|
|
704
757
|
onFocusChanged(isFocused) {
|
|
705
758
|
super.onFocusChanged(isFocused);
|
|
706
|
-
if (isFocused) {
|
|
707
|
-
|
|
759
|
+
if (!isFocused) {
|
|
760
|
+
return;
|
|
761
|
+
}
|
|
762
|
+
if (this.prefilled()) {
|
|
763
|
+
this.prefilled.set(false);
|
|
764
|
+
return;
|
|
708
765
|
}
|
|
766
|
+
this._searchControl.patchValue("");
|
|
709
767
|
}
|
|
710
768
|
formatLabel(item) {
|
|
711
769
|
return this.service.formatLabel(item);
|
|
@@ -720,11 +778,24 @@ class NiceAsyncTypeahead extends NiceTypeaheadBase {
|
|
|
720
778
|
this._selectOptionByValue(option.value);
|
|
721
779
|
this.stateChanges.next();
|
|
722
780
|
}
|
|
781
|
+
prefill(searchQuery) {
|
|
782
|
+
this.prefilled.set(true);
|
|
783
|
+
this._searchControl.patchValue(searchQuery);
|
|
784
|
+
}
|
|
785
|
+
search(searchQuery) {
|
|
786
|
+
this.service.search(searchQuery);
|
|
787
|
+
}
|
|
723
788
|
setSearchOptions(options) {
|
|
724
789
|
this.service.setSearchOptions(options);
|
|
725
790
|
}
|
|
791
|
+
setActive(active) {
|
|
792
|
+
this.service.setActive(active);
|
|
793
|
+
}
|
|
794
|
+
patchSearchOptions(options) {
|
|
795
|
+
this.service.patchSearchOptions(options);
|
|
796
|
+
}
|
|
726
797
|
reload() {
|
|
727
|
-
this.service.reload();
|
|
798
|
+
return this.service.reload();
|
|
728
799
|
}
|
|
729
800
|
reloadActive() {
|
|
730
801
|
this.service.reloadActive();
|
|
@@ -741,13 +812,13 @@ class NiceAsyncTypeahead extends NiceTypeaheadBase {
|
|
|
741
812
|
this.lastScrollHeight = target.scrollHeight;
|
|
742
813
|
}
|
|
743
814
|
}
|
|
744
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
745
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
815
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: NiceAsyncTypeahead, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
816
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", 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 }, autoSelectMode: { classPropertyName: "autoSelectMode", publicName: "autoSelectMode", isSignal: true, isRequired: false, transformFunction: null }, autoSelectFirstValue: { classPropertyName: "autoSelectFirstValue", publicName: "autoSelectFirstValue", 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: [
|
|
746
817
|
{ provide: MatFormFieldControl, useExisting: NiceAsyncTypeahead },
|
|
747
818
|
NiceTypeaheadService
|
|
748
|
-
], 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], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { 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 });
|
|
819
|
+
], 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", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], 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], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { 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 });
|
|
749
820
|
}
|
|
750
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
821
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: NiceAsyncTypeahead, decorators: [{
|
|
751
822
|
type: Component,
|
|
752
823
|
args: [{ selector: "nice-async-typeahead", imports: [
|
|
753
824
|
CdkOverlayOrigin,
|
|
@@ -782,7 +853,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
|
|
|
782
853
|
"(focus)": "onFocusChanged(true)",
|
|
783
854
|
"(blur)": "onFocusChanged(false)"
|
|
784
855
|
}, 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"] }]
|
|
785
|
-
}], ctorParameters: () => [] });
|
|
856
|
+
}], ctorParameters: () => [], propDecorators: { resource: [{ type: i0.Input, args: [{ isSignal: true, alias: "resource", required: true }] }], searchOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchOptions", required: false }] }], autoSelectMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoSelectMode", required: false }] }], autoSelectFirstValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoSelectFirstValue", required: false }] }], optionsContainer: [{ type: i0.ViewChild, args: ["optionsContainer", { isSignal: true }] }] } });
|
|
786
857
|
|
|
787
858
|
class NiceTypeahead extends NiceTypeaheadBase {
|
|
788
859
|
values = input.required(...(ngDevMode ? [{ debugName: "values" }] : []));
|
|
@@ -819,10 +890,10 @@ class NiceTypeahead extends NiceTypeaheadBase {
|
|
|
819
890
|
return false;
|
|
820
891
|
});
|
|
821
892
|
}
|
|
822
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
823
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", 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], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { 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 });
|
|
893
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: NiceTypeahead, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
894
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", 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", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], 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], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { 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 });
|
|
824
895
|
}
|
|
825
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
896
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: NiceTypeahead, decorators: [{
|
|
826
897
|
type: Component,
|
|
827
898
|
args: [{ selector: "nice-typeahead", imports: [
|
|
828
899
|
CdkOverlayOrigin,
|
|
@@ -854,7 +925,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
|
|
|
854
925
|
"(focus)": "onFocusChanged(true)",
|
|
855
926
|
"(blur)": "onFocusChanged(false)"
|
|
856
927
|
}, 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"] }]
|
|
857
|
-
}] });
|
|
928
|
+
}], propDecorators: { values: [{ type: i0.Input, args: [{ isSignal: true, alias: "values", required: true }] }], searchFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchFn", required: false }] }] } });
|
|
858
929
|
|
|
859
930
|
/**
|
|
860
931
|
* Generated bundle index. Do not edit.
|