@recursyve/ngx-material-components 19.0.0-beta.20 → 19.0.0-beta.21
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/chip-list/chip-list.d.ts +26 -0
- package/chip-list/icons/clear/chip-list-items-clear-icon.d.ts +5 -0
- package/chip-list/index.d.ts +2 -41
- package/chip-list/items/chip-list-items.d.ts +14 -0
- package/common/index.d.ts +4 -24
- package/common/provider.d.ts +3 -0
- package/common/translater/constant.d.ts +2 -0
- package/common/translater/options.d.ts +7 -0
- package/common/translater/translate-pipe.d.ts +8 -0
- package/common/translater/translater.d.ts +1 -0
- package/dropzone/config.d.ts +42 -0
- package/dropzone/constant.d.ts +2 -0
- package/dropzone/dropzone.d.ts +42 -0
- package/dropzone/dropzone.directive.d.ts +12 -0
- package/dropzone/icons/delete/delete-icon.component.d.ts +5 -0
- package/dropzone/icons/file/file-icon.component.d.ts +5 -0
- package/dropzone/icons/image/image-icon.component.d.ts +5 -0
- package/dropzone/index.d.ts +6 -125
- package/dropzone/models.d.ts +20 -0
- package/dropzone/options.d.ts +4 -0
- package/dropzone/pipes/file-size.pipe.d.ts +10 -0
- package/dropzone/preview/file-preview.d.ts +14 -0
- package/dropzone/provider.d.ts +3 -0
- package/fesm2022/recursyve-ngx-material-components-chip-list.mjs +13 -13
- 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-common.mjs.map +1 -1
- package/fesm2022/recursyve-ngx-material-components-dropzone.mjs +35 -35
- 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 +10 -10
- package/fesm2022/recursyve-ngx-material-components-loading.mjs.map +1 -1
- package/fesm2022/recursyve-ngx-material-components-typeahead.mjs +49 -46
- package/fesm2022/recursyve-ngx-material-components-typeahead.mjs.map +1 -1
- package/form-field-error/constant.d.ts +3 -0
- package/form-field-error/error-transformer.d.ts +13 -0
- package/form-field-error/form-field-error.d.ts +8 -0
- package/form-field-error/form-field-error.directive.d.ts +17 -0
- package/form-field-error/index.d.ts +4 -53
- package/form-field-error/options.d.ts +9 -0
- package/form-field-error/provider.d.ts +3 -0
- package/index.d.ts +1 -3
- package/loading/constant.d.ts +2 -0
- package/loading/index.d.ts +3 -31
- package/loading/loading-spinner.d.ts +9 -0
- package/loading/loading.d.ts +13 -0
- package/loading/options.d.ts +4 -0
- package/loading/provider.d.ts +3 -0
- package/package.json +7 -7
- package/typeahead/async-typeahead.d.ts +34 -0
- package/typeahead/constants.d.ts +2 -0
- package/typeahead/icons/search/typeahead-search-icon.d.ts +5 -0
- package/typeahead/index.d.ts +4 -216
- package/typeahead/provider.d.ts +3 -0
- package/typeahead/providers/async-typeahead.provider.d.ts +11 -0
- package/typeahead/providers/async-typeahead.service.d.ts +48 -0
- package/typeahead/providers/index.d.ts +2 -0
- package/typeahead/typeahead-base.d.ts +111 -0
- package/typeahead/typeahead.d.ts +12 -0
|
@@ -7,13 +7,13 @@ import { MatProgressSpinner } from '@angular/material/progress-spinner';
|
|
|
7
7
|
const NICE_LOADING_OPTIONS = new InjectionToken("nice_loading_options");
|
|
8
8
|
|
|
9
9
|
class NiceLoadingSpinner {
|
|
10
|
-
loading = input(false
|
|
11
|
-
mode = input("indeterminate"
|
|
12
|
-
diameter = input(50
|
|
13
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
14
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
10
|
+
loading = input(false);
|
|
11
|
+
mode = input("indeterminate");
|
|
12
|
+
diameter = input(50);
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceLoadingSpinner, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.10", type: NiceLoadingSpinner, isStandalone: true, selector: "nice-loading-spinner", inputs: { loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, diameter: { classPropertyName: "diameter", publicName: "diameter", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<mat-spinner [diameter]=\"diameter()\" [mode]=\"mode()\"></mat-spinner>\n", styles: [":host{display:inline-block}\n"], dependencies: [{ kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] });
|
|
15
15
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceLoadingSpinner, decorators: [{
|
|
17
17
|
type: Component,
|
|
18
18
|
args: [{ selector: "nice-loading-spinner", imports: [MatProgressSpinner], template: "<mat-spinner [diameter]=\"diameter()\" [mode]=\"mode()\"></mat-spinner>\n", styles: [":host{display:inline-block}\n"] }]
|
|
19
19
|
}] });
|
|
@@ -21,7 +21,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
|
|
|
21
21
|
class NiceLoadingDirective {
|
|
22
22
|
options = inject(NICE_LOADING_OPTIONS, { optional: true });
|
|
23
23
|
overlay = inject(Overlay);
|
|
24
|
-
loading = input(null,
|
|
24
|
+
loading = input(null, { alias: "niceLoadingOverlay" });
|
|
25
25
|
overlayRef = null;
|
|
26
26
|
_loading = false;
|
|
27
27
|
constructor() {
|
|
@@ -57,10 +57,10 @@ class NiceLoadingDirective {
|
|
|
57
57
|
this.overlayRef.detach();
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
61
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
60
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceLoadingDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
61
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.10", type: NiceLoadingDirective, isStandalone: true, selector: "[niceLoadingOverlay]", inputs: { loading: { classPropertyName: "loading", publicName: "niceLoadingOverlay", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
62
62
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceLoadingDirective, decorators: [{
|
|
64
64
|
type: Directive,
|
|
65
65
|
args: [{ selector: "[niceLoadingOverlay]", standalone: true }]
|
|
66
66
|
}], ctorParameters: () => [] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recursyve-ngx-material-components-loading.mjs","sources":["../../../src/material-components/loading/constant.ts","../../../src/material-components/loading/loading-spinner.ts","../../../src/material-components/loading/loading-spinner.html","../../../src/material-components/loading/loading.ts","../../../src/material-components/loading/provider.ts","../../../src/material-components/loading/recursyve-ngx-material-components-loading.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nexport const NICE_LOADING_OPTIONS = new InjectionToken(\"nice_loading_options\");\n","import { Component, input } from \"@angular/core\";\nimport { MatProgressSpinner, ProgressSpinnerMode } from \"@angular/material/progress-spinner\";\n\n@Component({\n selector: \"nice-loading-spinner\",\n templateUrl: \"loading-spinner.html\",\n styleUrls: [\"./loading-spinner.scss\"],\n imports: [MatProgressSpinner]\n})\nexport class NiceLoadingSpinner {\n public readonly loading = input<boolean>(false);\n public readonly mode = input<ProgressSpinnerMode>(\"indeterminate\");\n public readonly diameter = input(50);\n}\n","<mat-spinner [diameter]=\"diameter()\" [mode]=\"mode()\"></mat-spinner>\n","import { Overlay, OverlayRef } from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport { Directive, effect, inject, input, OnDestroy } from \"@angular/core\";\nimport { NICE_LOADING_OPTIONS } from \"./constant\";\nimport { NiceLoadingSpinner } from \"./loading-spinner\";\nimport { NiceLoadingOptions } from \"./options\";\n\n@Directive({ selector: \"[niceLoadingOverlay]\", standalone: true })\nexport class NiceLoadingDirective implements OnDestroy {\n private readonly options = inject<NiceLoadingOptions>(NICE_LOADING_OPTIONS, { optional: true });\n private readonly overlay = inject(Overlay);\n\n public loading = input<boolean | null>(null, { alias: \"niceLoadingOverlay\" });\n\n private overlayRef: OverlayRef | null = null;\n private _loading = false;\n\n constructor() {\n effect(() => {\n if (this.loading() === this._loading) {\n return;\n }\n\n this._loading = this.loading() ?? false;\n if (!this.overlayRef) {\n this.overlayRef = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .global()\n .centerHorizontally()\n .centerVertically(),\n hasBackdrop: true,\n panelClass: \"nice-loading-overlay\"\n });\n }\n\n if (this._loading) {\n this.overlayRef.attach(new ComponentPortal(this.options?.customLoading ?? NiceLoadingSpinner));\n } else {\n this.overlayRef.detach();\n }\n });\n }\n\n public ngOnDestroy(): void {\n if (!this.overlayRef) {\n return;\n }\n\n if (this.overlayRef.hasAttached()) {\n this.overlayRef.detach();\n }\n }\n}\n","import { Provider } from \"@angular/core\";\nimport { NiceLoadingOptions } from \"./options\";\nimport { NICE_LOADING_OPTIONS } from \"./constant\";\n\nexport function provideNiceLoadingOptions(options: NiceLoadingOptions): Provider {\n return {\n provide: NICE_LOADING_OPTIONS,\n useValue: options\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEO,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAAC,sBAAsB,CAAC;;MCOjE,kBAAkB,CAAA;AACX,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,
|
|
1
|
+
{"version":3,"file":"recursyve-ngx-material-components-loading.mjs","sources":["../../../src/material-components/loading/constant.ts","../../../src/material-components/loading/loading-spinner.ts","../../../src/material-components/loading/loading-spinner.html","../../../src/material-components/loading/loading.ts","../../../src/material-components/loading/provider.ts","../../../src/material-components/loading/recursyve-ngx-material-components-loading.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nexport const NICE_LOADING_OPTIONS = new InjectionToken(\"nice_loading_options\");\n","import { Component, input } from \"@angular/core\";\nimport { MatProgressSpinner, ProgressSpinnerMode } from \"@angular/material/progress-spinner\";\n\n@Component({\n selector: \"nice-loading-spinner\",\n templateUrl: \"loading-spinner.html\",\n styleUrls: [\"./loading-spinner.scss\"],\n imports: [MatProgressSpinner]\n})\nexport class NiceLoadingSpinner {\n public readonly loading = input<boolean>(false);\n public readonly mode = input<ProgressSpinnerMode>(\"indeterminate\");\n public readonly diameter = input(50);\n}\n","<mat-spinner [diameter]=\"diameter()\" [mode]=\"mode()\"></mat-spinner>\n","import { Overlay, OverlayRef } from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport { Directive, effect, inject, input, OnDestroy } from \"@angular/core\";\nimport { NICE_LOADING_OPTIONS } from \"./constant\";\nimport { NiceLoadingSpinner } from \"./loading-spinner\";\nimport { NiceLoadingOptions } from \"./options\";\n\n@Directive({ selector: \"[niceLoadingOverlay]\", standalone: true })\nexport class NiceLoadingDirective implements OnDestroy {\n private readonly options = inject<NiceLoadingOptions>(NICE_LOADING_OPTIONS, { optional: true });\n private readonly overlay = inject(Overlay);\n\n public loading = input<boolean | null>(null, { alias: \"niceLoadingOverlay\" });\n\n private overlayRef: OverlayRef | null = null;\n private _loading = false;\n\n constructor() {\n effect(() => {\n if (this.loading() === this._loading) {\n return;\n }\n\n this._loading = this.loading() ?? false;\n if (!this.overlayRef) {\n this.overlayRef = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .global()\n .centerHorizontally()\n .centerVertically(),\n hasBackdrop: true,\n panelClass: \"nice-loading-overlay\"\n });\n }\n\n if (this._loading) {\n this.overlayRef.attach(new ComponentPortal(this.options?.customLoading ?? NiceLoadingSpinner));\n } else {\n this.overlayRef.detach();\n }\n });\n }\n\n public ngOnDestroy(): void {\n if (!this.overlayRef) {\n return;\n }\n\n if (this.overlayRef.hasAttached()) {\n this.overlayRef.detach();\n }\n }\n}\n","import { Provider } from \"@angular/core\";\nimport { NiceLoadingOptions } from \"./options\";\nimport { NICE_LOADING_OPTIONS } from \"./constant\";\n\nexport function provideNiceLoadingOptions(options: NiceLoadingOptions): Provider {\n return {\n provide: NICE_LOADING_OPTIONS,\n useValue: options\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEO,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAAC,sBAAsB,CAAC;;MCOjE,kBAAkB,CAAA;AACX,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,CAAC;AAC/B,IAAA,IAAI,GAAG,KAAK,CAAsB,eAAe,CAAC;AAClD,IAAA,QAAQ,GAAG,KAAK,CAAC,EAAE,CAAC;wGAH3B,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECT/B,2EACA,EAAA,MAAA,EAAA,CAAA,+BAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDMc,kBAAkB,EAAA,QAAA,EAAA,mCAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,OAAA,EAAA,UAAA,EAAA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAEnB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAN9B,SAAS;+BACI,sBAAsB,EAAA,OAAA,EAGvB,CAAC,kBAAkB,CAAC,EAAA,QAAA,EAAA,2EAAA,EAAA,MAAA,EAAA,CAAA,+BAAA,CAAA,EAAA;;;MECpB,oBAAoB,CAAA;IACZ,OAAO,GAAG,MAAM,CAAqB,oBAAoB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC9E,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAEnC,OAAO,GAAG,KAAK,CAAiB,IAAI,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAErE,UAAU,GAAsB,IAAI;IACpC,QAAQ,GAAG,KAAK;AAExB,IAAA,WAAA,GAAA;QACI,MAAM,CAAC,MAAK;YACR,IAAI,IAAI,CAAC,OAAO,EAAE,KAAK,IAAI,CAAC,QAAQ,EAAE;gBAClC;;YAGJ,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,IAAI,KAAK;AACvC,YAAA,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBAClB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;oBAClC,gBAAgB,EAAE,IAAI,CAAC;AAClB,yBAAA,QAAQ;AACR,yBAAA,MAAM;AACN,yBAAA,kBAAkB;AAClB,yBAAA,gBAAgB,EAAE;AACvB,oBAAA,WAAW,EAAE,IAAI;AACjB,oBAAA,UAAU,EAAE;AACf,iBAAA,CAAC;;AAGN,YAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;AACf,gBAAA,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,aAAa,IAAI,kBAAkB,CAAC,CAAC;;iBAC3F;AACH,gBAAA,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;;AAEhC,SAAC,CAAC;;IAGC,WAAW,GAAA;AACd,QAAA,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAClB;;AAGJ,QAAA,IAAI,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,EAAE;AAC/B,YAAA,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;;;wGA1CvB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,QAAQ,EAAE,sBAAsB,EAAE,UAAU,EAAE,IAAI,EAAE;;;ACH3D,SAAU,yBAAyB,CAAC,OAA2B,EAAA;IACjE,OAAO;AACH,QAAA,OAAO,EAAE,oBAAoB;AAC7B,QAAA,QAAQ,EAAE;KACb;AACL;;ACTA;;AAEG;;;;"}
|
|
@@ -25,18 +25,18 @@ class NiceTypeaheadService {
|
|
|
25
25
|
fetchResources$ = new Subject();
|
|
26
26
|
fetchActive$ = new Subject();
|
|
27
27
|
resourceProvider = null;
|
|
28
|
-
_items = signal([]
|
|
29
|
-
_active = signal(null
|
|
30
|
-
_searchOptions = signal(null
|
|
31
|
-
_request = signal(null
|
|
32
|
-
_nextRequest = signal(null
|
|
33
|
-
_preloaded = signal(false
|
|
34
|
-
_autoSelectFirstValue = signal(false
|
|
35
|
-
_loading = signal(true
|
|
28
|
+
_items = signal([]);
|
|
29
|
+
_active = signal(null);
|
|
30
|
+
_searchOptions = signal(null);
|
|
31
|
+
_request = signal(null);
|
|
32
|
+
_nextRequest = signal(null);
|
|
33
|
+
_preloaded = signal(false);
|
|
34
|
+
_autoSelectFirstValue = signal(false);
|
|
35
|
+
_loading = signal(true);
|
|
36
36
|
items = this._items.asReadonly();
|
|
37
37
|
active = this._active.asReadonly();
|
|
38
38
|
loading = this._loading.asReadonly();
|
|
39
|
-
isLastPage = computed(() => !this._nextRequest()
|
|
39
|
+
isLastPage = computed(() => !this._nextRequest());
|
|
40
40
|
init(resource, options) {
|
|
41
41
|
this.fetchResources$.pipe(takeUntilDestroyed(this.destroyRef)).pipe(switchMap((request) => this.fetchResources(request))).subscribe();
|
|
42
42
|
this.fetchActive$.pipe(takeUntilDestroyed(this.destroyRef)).pipe(switchMap((request) => this.fetchActive(request))).subscribe();
|
|
@@ -186,10 +186,10 @@ class NiceTypeaheadService {
|
|
|
186
186
|
}
|
|
187
187
|
return this.resourceProvider.format(item);
|
|
188
188
|
}
|
|
189
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
190
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
189
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTypeaheadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
190
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTypeaheadService });
|
|
191
191
|
}
|
|
192
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTypeaheadService, decorators: [{
|
|
193
193
|
type: Injectable
|
|
194
194
|
}] });
|
|
195
195
|
|
|
@@ -202,10 +202,10 @@ function provideAsyncTypeaheadResources(providers) {
|
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
class NiceTypeaheadSearchIcon {
|
|
205
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
206
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
205
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTypeaheadSearchIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
206
|
+
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=\"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" });
|
|
207
207
|
}
|
|
208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTypeaheadSearchIcon, decorators: [{
|
|
209
209
|
type: Component,
|
|
210
210
|
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" }]
|
|
211
211
|
}] });
|
|
@@ -216,27 +216,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
|
|
|
216
216
|
*/
|
|
217
217
|
class NiceTypeaheadBase {
|
|
218
218
|
options;
|
|
219
|
-
noItemsFoundLabel = input("No items found"
|
|
220
|
-
labelProperty = input(
|
|
221
|
-
formatLabelFn = input(
|
|
222
|
-
optionTemplate = input(
|
|
223
|
-
panelClass = input([]
|
|
224
|
-
canRemoveValue = input(true
|
|
219
|
+
noItemsFoundLabel = input("No items found");
|
|
220
|
+
labelProperty = input();
|
|
221
|
+
formatLabelFn = input();
|
|
222
|
+
optionTemplate = input();
|
|
223
|
+
panelClass = input([]);
|
|
224
|
+
canRemoveValue = input(true);
|
|
225
225
|
selected = output();
|
|
226
226
|
static nextId = 0;
|
|
227
|
-
_input = viewChild("input"
|
|
228
|
-
_panel = viewChild("panel"
|
|
229
|
-
_overlayDir = viewChild(CdkConnectedOverlay
|
|
227
|
+
_input = viewChild("input");
|
|
228
|
+
_panel = viewChild("panel");
|
|
229
|
+
_overlayDir = viewChild(CdkConnectedOverlay);
|
|
230
230
|
_errorStateTracker;
|
|
231
231
|
_required = null;
|
|
232
232
|
_focused = false;
|
|
233
233
|
_disabled = false;
|
|
234
234
|
_panelOpen = false;
|
|
235
235
|
_compareWith = (o1, o2) => o1 === o2;
|
|
236
|
-
_value = signal(null
|
|
237
|
-
_empty = computed(() => !this._value()
|
|
238
|
-
_placeholder = signal(""
|
|
239
|
-
_searchValue = signal(""
|
|
236
|
+
_value = signal(null);
|
|
237
|
+
_empty = computed(() => !this._value());
|
|
238
|
+
_placeholder = signal("");
|
|
239
|
+
_searchValue = signal("");
|
|
240
240
|
_elementRef = inject(ElementRef);
|
|
241
241
|
_destroyRef = inject(DestroyRef);
|
|
242
242
|
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
@@ -673,10 +673,10 @@ class NiceTypeaheadBase {
|
|
|
673
673
|
}
|
|
674
674
|
return false;
|
|
675
675
|
}
|
|
676
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
677
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "
|
|
676
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTypeaheadBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
677
|
+
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 });
|
|
678
678
|
}
|
|
679
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
679
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTypeaheadBase, decorators: [{
|
|
680
680
|
type: Directive
|
|
681
681
|
}], ctorParameters: () => [], propDecorators: { options: [{
|
|
682
682
|
type: ViewChildren,
|
|
@@ -684,11 +684,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
|
|
|
684
684
|
}] } });
|
|
685
685
|
|
|
686
686
|
class NiceAsyncTypeahead extends NiceTypeaheadBase {
|
|
687
|
-
resource = input.required(
|
|
688
|
-
searchOptions = input(null
|
|
689
|
-
autoSelectFirstValue = input(false,
|
|
690
|
-
filteredValues = computed(() => this.service.items()
|
|
691
|
-
optionsContainer = viewChild("optionsContainer"
|
|
687
|
+
resource = input.required();
|
|
688
|
+
searchOptions = input(null);
|
|
689
|
+
autoSelectFirstValue = input(false, { transform: booleanAttribute });
|
|
690
|
+
filteredValues = computed(() => this.service.items());
|
|
691
|
+
optionsContainer = viewChild("optionsContainer");
|
|
692
692
|
service = inject(NiceTypeaheadService);
|
|
693
693
|
_compareWith = (o1, o2) => {
|
|
694
694
|
if (!(typeof o1 === "object" && o1 && typeof o2 === "object" && o2)) {
|
|
@@ -757,6 +757,9 @@ class NiceAsyncTypeahead extends NiceTypeaheadBase {
|
|
|
757
757
|
setSearchOptions(options) {
|
|
758
758
|
this.service.setSearchOptions(options);
|
|
759
759
|
}
|
|
760
|
+
setActive(active) {
|
|
761
|
+
this.service.setActive(active);
|
|
762
|
+
}
|
|
760
763
|
patchSearchOptions(options) {
|
|
761
764
|
this.service.patchSearchOptions(options);
|
|
762
765
|
}
|
|
@@ -778,13 +781,13 @@ class NiceAsyncTypeahead extends NiceTypeaheadBase {
|
|
|
778
781
|
this.lastScrollHeight = target.scrollHeight;
|
|
779
782
|
}
|
|
780
783
|
}
|
|
781
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
782
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
784
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceAsyncTypeahead, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
785
|
+
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 }, 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: [
|
|
783
786
|
{ provide: MatFormFieldControl, useExisting: NiceAsyncTypeahead },
|
|
784
787
|
NiceTypeaheadService
|
|
785
|
-
], 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 });
|
|
788
|
+
], 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 });
|
|
786
789
|
}
|
|
787
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
790
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceAsyncTypeahead, decorators: [{
|
|
788
791
|
type: Component,
|
|
789
792
|
args: [{ selector: "nice-async-typeahead", imports: [
|
|
790
793
|
CdkOverlayOrigin,
|
|
@@ -822,9 +825,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
|
|
|
822
825
|
}], ctorParameters: () => [] });
|
|
823
826
|
|
|
824
827
|
class NiceTypeahead extends NiceTypeaheadBase {
|
|
825
|
-
values = input.required(
|
|
826
|
-
searchFn = input(
|
|
827
|
-
filteredValues = computed(() => this.filterValuesFromSearch(this._searchValue(), this.values())
|
|
828
|
+
values = input.required();
|
|
829
|
+
searchFn = input();
|
|
830
|
+
filteredValues = computed(() => this.filterValuesFromSearch(this._searchValue(), this.values()));
|
|
828
831
|
onFocusChanged(isFocused) {
|
|
829
832
|
super.onFocusChanged(isFocused);
|
|
830
833
|
if (isFocused) {
|
|
@@ -856,10 +859,10 @@ class NiceTypeahead extends NiceTypeaheadBase {
|
|
|
856
859
|
return false;
|
|
857
860
|
});
|
|
858
861
|
}
|
|
859
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
860
|
-
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 });
|
|
862
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTypeahead, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
863
|
+
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 });
|
|
861
864
|
}
|
|
862
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
865
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NiceTypeahead, decorators: [{
|
|
863
866
|
type: Component,
|
|
864
867
|
args: [{ selector: "nice-typeahead", imports: [
|
|
865
868
|
CdkOverlayOrigin,
|