@enigmatry/entry-components 15.0.1-preview.6 → 15.1.0-preview.2

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.
Files changed (64) hide show
  1. package/README.md +5 -0
  2. package/esm2020/modules/entry-components.module.mjs +5 -1
  3. package/esm2020/public-api.mjs +2 -1
  4. package/esm2020/search-filter/autocomplete/autocomplete-search-filter.component.mjs +50 -0
  5. package/esm2020/search-filter/autocomplete/autocomplete-search-filter.model.mjs +19 -0
  6. package/esm2020/search-filter/control-type.mjs +7 -0
  7. package/esm2020/search-filter/entry-search-filter.component.mjs +19 -6
  8. package/esm2020/search-filter/entry-search-filter.module.mjs +14 -8
  9. package/esm2020/search-filter/public-api.mjs +6 -5
  10. package/esm2020/search-filter/search-filter-base.model.mjs +26 -0
  11. package/esm2020/search-filter/select/select-search-filter.component.mjs +28 -0
  12. package/esm2020/search-filter/select/select-search-filter.model.mjs +23 -0
  13. package/esm2020/search-filter/select-option.model.mjs +12 -0
  14. package/esm2020/search-filter/text/text-search-filter.component.mjs +18 -0
  15. package/esm2020/search-filter/text/text-search-filter.model.mjs +12 -0
  16. package/esm2020/spinner/enigmatry-entry-components-spinner.mjs +5 -0
  17. package/esm2020/spinner/entry-spinner/spinner.component.mjs +81 -0
  18. package/esm2020/spinner/public-api.mjs +3 -0
  19. package/esm2020/spinner/spinner-overlay-container.mjs +42 -0
  20. package/esm2020/spinner/spinner.module.mjs +32 -0
  21. package/fesm2015/enigmatry-entry-components-search-filter.mjs +116 -33
  22. package/fesm2015/enigmatry-entry-components-search-filter.mjs.map +1 -1
  23. package/fesm2015/enigmatry-entry-components-spinner.mjs +156 -0
  24. package/fesm2015/enigmatry-entry-components-spinner.mjs.map +1 -0
  25. package/fesm2015/enigmatry-entry-components.mjs +5 -0
  26. package/fesm2015/enigmatry-entry-components.mjs.map +1 -1
  27. package/fesm2020/enigmatry-entry-components-search-filter.mjs +115 -33
  28. package/fesm2020/enigmatry-entry-components-search-filter.mjs.map +1 -1
  29. package/fesm2020/enigmatry-entry-components-spinner.mjs +153 -0
  30. package/fesm2020/enigmatry-entry-components-spinner.mjs.map +1 -0
  31. package/fesm2020/enigmatry-entry-components.mjs +5 -0
  32. package/fesm2020/enigmatry-entry-components.mjs.map +1 -1
  33. package/modules/entry-components.module.d.ts +3 -2
  34. package/package.json +9 -1
  35. package/public-api.d.ts +1 -0
  36. package/search-filter/README.md +45 -17
  37. package/search-filter/autocomplete/autocomplete-search-filter.component.d.ts +21 -0
  38. package/search-filter/autocomplete/autocomplete-search-filter.model.d.ts +19 -0
  39. package/search-filter/control-type.d.ts +5 -0
  40. package/search-filter/entry-search-filter.component.d.ts +9 -1
  41. package/search-filter/entry-search-filter.module.d.ts +11 -9
  42. package/search-filter/public-api.d.ts +5 -4
  43. package/search-filter/{search-filter-input/search-filter-base.model.d.ts → search-filter-base.model.d.ts} +3 -2
  44. package/search-filter/select/select-search-filter.component.d.ts +14 -0
  45. package/search-filter/{search-filter-input/inputs → select}/select-search-filter.model.d.ts +5 -4
  46. package/search-filter/{search-filter-input/inputs/select-filter-option.model.d.ts → select-option.model.d.ts} +2 -2
  47. package/search-filter/text/text-search-filter.component.d.ts +10 -0
  48. package/search-filter/{search-filter-input/inputs → text}/text-search-filter.model.d.ts +2 -1
  49. package/spinner/README.md +37 -0
  50. package/spinner/entry-spinner/spinner.component.d.ts +24 -0
  51. package/spinner/index.d.ts +5 -0
  52. package/spinner/public-api.d.ts +2 -0
  53. package/spinner/spinner-overlay-container.d.ts +17 -0
  54. package/spinner/spinner.module.d.ts +10 -0
  55. package/styles/modules/_default-theme.scss +12 -4
  56. package/styles/modules/vendors/angular-material/_typography-generator.scss +14 -7
  57. package/esm2020/search-filter/search-filter-input/control-type.model.mjs +0 -5
  58. package/esm2020/search-filter/search-filter-input/inputs/select-filter-option.model.mjs +0 -12
  59. package/esm2020/search-filter/search-filter-input/inputs/select-search-filter.model.mjs +0 -23
  60. package/esm2020/search-filter/search-filter-input/inputs/text-search-filter.model.mjs +0 -12
  61. package/esm2020/search-filter/search-filter-input/search-filter-base.model.mjs +0 -25
  62. package/esm2020/search-filter/search-filter-input/search-filter-input.component.mjs +0 -36
  63. package/search-filter/search-filter-input/control-type.model.d.ts +0 -4
  64. package/search-filter/search-filter-input/search-filter-input.component.d.ts +0 -18
@@ -0,0 +1,81 @@
1
+ import { Overlay, OverlayConfig, OverlayContainer } from '@angular/cdk/overlay';
2
+ import { TemplatePortal } from '@angular/cdk/portal';
3
+ import { ChangeDetectionStrategy, Component, Input, ViewChild } from '@angular/core';
4
+ import { SpinnerOverlayContainer } from '../spinner-overlay-container';
5
+ import * as i0 from "@angular/core";
6
+ import * as i1 from "@angular/cdk/overlay";
7
+ import * as i2 from "@angular/material/progress-spinner";
8
+ export class EntrySpinnerComponent {
9
+ constructor(overlay, viewContainerRef, overlayContainer, elementRef) {
10
+ this.overlay = overlay;
11
+ this.viewContainerRef = viewContainerRef;
12
+ this.overlayContainer = overlayContainer;
13
+ this.elementRef = elementRef;
14
+ this.color = 'primary';
15
+ this.diameter = 30;
16
+ this.fullscreen = false;
17
+ this.hasBackgroundOverlay = true;
18
+ }
19
+ ngOnInit() {
20
+ this.createOverlay();
21
+ this.overlayRef.attach(new TemplatePortal(this.templateRef, this.viewContainerRef));
22
+ }
23
+ ngOnDestroy() {
24
+ this.disposeOverlayRef();
25
+ }
26
+ createOverlay() {
27
+ const overlayConfig = new OverlayConfig({
28
+ hasBackdrop: this.hasBackgroundOverlay,
29
+ positionStrategy: this.overlay.position()
30
+ .global()
31
+ .centerHorizontally()
32
+ .centerVertically()
33
+ });
34
+ this.configureOverlayContainer();
35
+ this.overlayRef = this.overlay.create(overlayConfig);
36
+ }
37
+ configureOverlayContainer() {
38
+ let appendTo = this.elementRef.nativeElement;
39
+ if (this.fullscreen) {
40
+ appendTo = document.body;
41
+ }
42
+ this.overlayContainer
43
+ .configure(appendTo, { fullscreen: this.fullscreen });
44
+ }
45
+ disposeOverlayRef() {
46
+ if (this.overlayRef) {
47
+ this.overlayRef.detach();
48
+ this.overlayRef.dispose();
49
+ }
50
+ }
51
+ }
52
+ EntrySpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntrySpinnerComponent, deps: [{ token: i1.Overlay }, { token: i0.ViewContainerRef }, { token: i1.OverlayContainer }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
53
+ EntrySpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntrySpinnerComponent, selector: "entry-spinner", inputs: { color: "color", diameter: "diameter", fullscreen: "fullscreen", hasBackgroundOverlay: "hasBackgroundOverlay" }, providers: [
54
+ Overlay,
55
+ {
56
+ provide: OverlayContainer,
57
+ useClass: SpinnerOverlayContainer
58
+ }
59
+ ], viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["matSpinner"], descendants: true, static: true }], ngImport: i0, template: "<ng-template #matSpinner>\r\n\t<mat-spinner [diameter]=\"diameter\" [color]=\"color\"></mat-spinner>\r\n</ng-template>", dependencies: [{ kind: "component", type: i2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntrySpinnerComponent, decorators: [{
61
+ type: Component,
62
+ args: [{ selector: 'entry-spinner', providers: [
63
+ Overlay,
64
+ {
65
+ provide: OverlayContainer,
66
+ useClass: SpinnerOverlayContainer
67
+ }
68
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #matSpinner>\r\n\t<mat-spinner [diameter]=\"diameter\" [color]=\"color\"></mat-spinner>\r\n</ng-template>" }]
69
+ }], ctorParameters: function () { return [{ type: i1.Overlay }, { type: i0.ViewContainerRef }, { type: i1.OverlayContainer }, { type: i0.ElementRef }]; }, propDecorators: { color: [{
70
+ type: Input
71
+ }], diameter: [{
72
+ type: Input
73
+ }], fullscreen: [{
74
+ type: Input
75
+ }], hasBackgroundOverlay: [{
76
+ type: Input
77
+ }], templateRef: [{
78
+ type: ViewChild,
79
+ args: ['matSpinner', { static: true }]
80
+ }] } });
81
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bpbm5lci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2VudHJ5LWNvbXBvbmVudHMvc3Bpbm5lci9lbnRyeS1zcGlubmVyL3NwaW5uZXIuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9lbnRyeS1jb21wb25lbnRzL3NwaW5uZXIvZW50cnktc3Bpbm5lci9zcGlubmVyLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxPQUFPLEVBQUUsYUFBYSxFQUFFLGdCQUFnQixFQUFjLE1BQU0sc0JBQXNCLENBQUM7QUFDNUYsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ3JELE9BQU8sRUFDTCx1QkFBdUIsRUFBRSxTQUFTLEVBQ3RCLEtBQUssRUFDSSxTQUFTLEVBQy9CLE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLDhCQUE4QixDQUFDOzs7O0FBY3ZFLE1BQU0sT0FBTyxxQkFBcUI7SUFXaEMsWUFDVSxPQUFnQixFQUNoQixnQkFBa0MsRUFDbEMsZ0JBQWtDLEVBQ2xDLFVBQW1DO1FBSG5DLFlBQU8sR0FBUCxPQUFPLENBQVM7UUFDaEIscUJBQWdCLEdBQWhCLGdCQUFnQixDQUFrQjtRQU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jpem9udGFsbHkoKVxuICAgICAgICAuY2VudGVyVmVydGljYWxseSgpXG4gICAgfSk7XG4gICAgdGhpcy5jb25maWd1cmVPdmVybGF5Q29udGFpbmVyKCk7XG4gICAgdGhpcy5vdmVybGF5UmVmID0gdGhpcy5vdmVybGF5LmNyZWF0ZShvdmVybGF5Q29uZmlnKTtcbiAgfVxuXG4gIHByaXZhdGUgY29uZmlndXJlT3ZlcmxheUNvbnRhaW5lcigpIHtcbiAgICBsZXQgYXBwZW5kVG8gPSB0aGlzLmVsZW1lbnRSZWYubmF0aXZlRWxlbWVudDtcbiAgICBpZiAodGhpcy5mdWxsc2NyZWVuKSB7XG4gICAgICBhcHBlbmRUbyA9IGRvY3VtZW50LmJvZHk7XG4gICAgfVxuICAgICh0aGlzLm92ZXJsYXlDb250YWluZXIgYXMgU3Bpbm5lck92ZXJsYXlDb250YWluZXIpXG4gICAgICAuY29uZmlndXJlKGFwcGVuZFRvLCB7IGZ1bGxzY3JlZW46IHRoaXMuZnVsbHNjcmVlbiB9KTtcbiAgfVxuXG4gIHByaXZhdGUgZGlzcG9zZU92ZXJsYXlSZWYoKSB7XG4gICAgaWYgKHRoaXMub3ZlcmxheVJlZikge1xuICAgICAgdGhpcy5vdmVybGF5UmVmLmRldGFjaCgpO1xuICAgICAgdGhpcy5vdmVybGF5UmVmLmRpc3Bvc2UoKTtcbiAgICB9XG4gIH1cbn1cbiIsIjxuZy10ZW1wbGF0ZSAjbWF0U3Bpbm5lcj5cclxuXHQ8bWF0LXNwaW5uZXIgW2RpYW1ldGVyXT1cImRpYW1ldGVyXCIgW2NvbG9yXT1cImNvbG9yXCI+PC9tYXQtc3Bpbm5lcj5cclxuPC9uZy10ZW1wbGF0ZT4iXX0=
@@ -0,0 +1,3 @@
1
+ export { EntrySpinnerComponent } from './entry-spinner/spinner.component';
2
+ export { EntrySpinnerModule } from './spinner.module';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvZW50cnktY29tcG9uZW50cy9zcGlubmVyL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0sbUNBQW1DLENBQUM7QUFDMUUsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sa0JBQWtCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBFbnRyeVNwaW5uZXJDb21wb25lbnQgfSBmcm9tICcuL2VudHJ5LXNwaW5uZXIvc3Bpbm5lci5jb21wb25lbnQnO1xuZXhwb3J0IHsgRW50cnlTcGlubmVyTW9kdWxlIH0gZnJvbSAnLi9zcGlubmVyLm1vZHVsZSc7XG4iXX0=
@@ -0,0 +1,42 @@
1
+ import { OverlayContainer } from '@angular/cdk/overlay';
2
+ import { DOCUMENT } from '@angular/common';
3
+ import { Inject, Injectable } from '@angular/core';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/cdk/platform";
6
+ export class SpinnerOverlayContainer extends OverlayContainer {
7
+ constructor(document, platform) {
8
+ super(document, platform);
9
+ this._appendTo = this._document.body;
10
+ }
11
+ configure(appendTo, options) {
12
+ this._appendTo = appendTo;
13
+ this._options = options;
14
+ }
15
+ getContainerElement() {
16
+ if (!this._containerElement) {
17
+ this.createContainer();
18
+ }
19
+ return this._containerElement;
20
+ }
21
+ ngOnDestroy() {
22
+ this._containerElement?.remove();
23
+ }
24
+ createContainer() {
25
+ const containerClass = 'cdk-overlay-container';
26
+ const { fullscreen } = this._options;
27
+ const container = this._document.createElement('div');
28
+ container.classList.add(containerClass);
29
+ container.style.position = fullscreen ? 'fixed' : 'absolute';
30
+ this._appendTo.appendChild(container);
31
+ this._containerElement = container;
32
+ }
33
+ }
34
+ SpinnerOverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpinnerOverlayContainer, deps: [{ token: DOCUMENT }, { token: i1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
35
+ SpinnerOverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpinnerOverlayContainer });
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SpinnerOverlayContainer, decorators: [{
37
+ type: Injectable
38
+ }], ctorParameters: function () { return [{ type: Document, decorators: [{
39
+ type: Inject,
40
+ args: [DOCUMENT]
41
+ }] }, { type: i1.Platform }]; } });
42
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bpbm5lci1vdmVybGF5LWNvbnRhaW5lci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvZW50cnktY29tcG9uZW50cy9zcGlubmVyL3NwaW5uZXItb3ZlcmxheS1jb250YWluZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFFeEQsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQzNDLE9BQU8sRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFhLE1BQU0sZUFBZSxDQUFDOzs7QUFHOUQsTUFBTSxPQUFPLHVCQUF3QixTQUFRLGdCQUFnQjtJQUszRCxZQUE4QixRQUFrQixFQUFFLFFBQWtCO1FBQ2xFLEtBQUssQ0FBQyxRQUFRLEVBQUUsUUFBUSxDQUFDLENBQUM7UUFKcEIsY0FBUyxHQUFnQixJQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQztJQUtyRCxDQUFDO0lBRUQsU0FBUyxDQUFD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luZXJFbGVtZW50KSB7XHJcbiAgICAgIHRoaXMuY3JlYXRlQ29udGFpbmVyKCk7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gdGhpcy5fY29udGFpbmVyRWxlbWVudDtcclxuICB9XHJcblxyXG4gIG5nT25EZXN0cm95KCkge1xyXG4gICAgdGhpcy5fY29udGFpbmVyRWxlbWVudD8ucmVtb3ZlKCk7XHJcbiAgfVxyXG5cclxuICBwcml2YXRlIGNyZWF0ZUNvbnRhaW5lcigpOiB2b2lkIHtcclxuICAgIGNvbnN0IGNvbnRhaW5lckNsYXNzID0gJ2Nkay1vdmVybGF5LWNvbnRhaW5lcic7XHJcbiAgICBjb25zdCB7IGZ1bGxzY3JlZW4gfSA9IHRoaXMuX29wdGlvbnM7XHJcblxyXG4gICAgY29uc3QgY29udGFpbmVyID0gdGhpcy5fZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7XHJcbiAgICBjb250YWluZXIuY2xhc3NMaXN0LmFkZChjb250YWluZXJDbGFzcyk7XHJcblxyXG4gICAgY29udGFpbmVyLnN0eWxlLnBvc2l0aW9uID0gZnVsbHNjcmVlbiA/ICdmaXhlZCcgOiAnYWJzb2x1dGUnO1xyXG4gICAgdGhpcy5fYXBwZW5kVG8uYXBwZW5kQ2hpbGQoY29udGFpbmVyKTtcclxuICAgIHRoaXMuX2NvbnRhaW5lckVsZW1lbnQgPSBjb250YWluZXI7XHJcbiAgfVxyXG59XHJcbiJdfQ==
@@ -0,0 +1,32 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { NgModule } from '@angular/core';
3
+ import { OverlayModule } from '@angular/cdk/overlay';
4
+ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
5
+ import { EntrySpinnerComponent } from './entry-spinner/spinner.component';
6
+ import * as i0 from "@angular/core";
7
+ export class EntrySpinnerModule {
8
+ }
9
+ EntrySpinnerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntrySpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10
+ EntrySpinnerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: EntrySpinnerModule, declarations: [EntrySpinnerComponent], imports: [CommonModule,
11
+ OverlayModule,
12
+ MatProgressSpinnerModule], exports: [EntrySpinnerComponent] });
13
+ EntrySpinnerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntrySpinnerModule, imports: [CommonModule,
14
+ OverlayModule,
15
+ MatProgressSpinnerModule] });
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntrySpinnerModule, decorators: [{
17
+ type: NgModule,
18
+ args: [{
19
+ declarations: [
20
+ EntrySpinnerComponent
21
+ ],
22
+ imports: [
23
+ CommonModule,
24
+ OverlayModule,
25
+ MatProgressSpinnerModule
26
+ ],
27
+ exports: [
28
+ EntrySpinnerComponent
29
+ ]
30
+ }]
31
+ }] });
32
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bpbm5lci5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2VudHJ5LWNvbXBvbmVudHMvc3Bpbm5lci9zcGlubmVyLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDckQsT0FBTyxFQUFFLHdCQUF3QixFQUFFLE1BQU0sb0NBQW9DLENBQUM7QUFDOUUsT0FBTyxFQUFFLHFCQ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gICBNYXRQcm9ncmVzc1NwaW5uZXJNb2R1bGVcbiAgXSxcbiAgZXhwb3J0czogW1xuICAgIEVudHJ5U3Bpbm5lckNvbXBvbmVudFxuICBdXG59KVxuZXhwb3J0IGNsYXNzIEVudHJ5U3Bpbm5lck1vZHVsZSB7IH1cbiJdfQ==
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, Inject, Input, EventEmitter, Output, NgModule } from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Input, Inject, ViewChild, EventEmitter, Output, NgModule } from '@angular/core';
3
3
  import * as i2 from '@angular/forms';
4
- import { UntypedFormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
4
+ import { FormControlName, UntypedFormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
5
  import { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';
6
6
  import * as i1 from '@angular/common';
7
7
  import { CommonModule } from '@angular/common';
@@ -9,13 +9,16 @@ import * as i3$1 from '@angular/material/button';
9
9
  import { MatButtonModule } from '@angular/material/button';
10
10
  import * as i4$1 from '@enigmatry/entry-components/button';
11
11
  import { EntryButtonModule } from '@enigmatry/entry-components/button';
12
- import * as i3 from '@angular/material/input';
12
+ import * as i2$1 from '@angular/material/input';
13
13
  import { MatInputModule } from '@angular/material/input';
14
- import * as i4 from '@angular/material/form-field';
15
- import * as i5 from '@angular/material/select';
14
+ import * as i3 from '@angular/material/form-field';
15
+ import * as i4 from '@angular/material/select';
16
16
  import { MatSelectModule } from '@angular/material/select';
17
- import * as i6 from '@angular/material/core';
18
- import { MatTooltipModule } from '@angular/material/tooltip';
17
+ import * as i5 from '@angular/material/core';
18
+ import { of, Subject } from 'rxjs';
19
+ import { takeUntil, filter, debounceTime, tap } from 'rxjs/operators';
20
+ import * as i6 from '@angular/material/autocomplete';
21
+ import { MatAutocompleteModule } from '@angular/material/autocomplete';
19
22
 
20
23
  /**
21
24
  * Used to provide entry search filter configuration on module level.
@@ -35,27 +38,36 @@ function provideEntrySearchFilterConfig(config) {
35
38
  return provideConfig(ENTRY_SEARCH_FILTER_CONFIG, () => new EntrySearchFilterConfig(config));
36
39
  }
37
40
 
38
- class ControlType {
41
+ var ControlType;
42
+ (function (ControlType) {
43
+ ControlType["text"] = "text-input";
44
+ ControlType["select"] = "select-input";
45
+ ControlType["autocomplete"] = "autocomplete-input";
46
+ })(ControlType || (ControlType = {}));
47
+
48
+ class TextSearchFilterComponent {
39
49
  }
40
- ControlType.text = 'text-input';
41
- ControlType.select = 'select-input';
50
+ TextSearchFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TextSearchFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
51
+ TextSearchFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TextSearchFilterComponent, selector: "entry-text-search-filter", inputs: { searchFilter: "searchFilter", form: "form" }, ngImport: i0, template: "<mat-form-field [formGroup]=\"form\" subscriptSizing=\"dynamic\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n <input [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\" [type]=\"searchFilter.type\" matInput\n [placeholder]=\"searchFilter.placeholder\" [maxlength]=\"searchFilter.maxLength\">\n</mat-form-field>", dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TextSearchFilterComponent, decorators: [{
53
+ type: Component,
54
+ args: [{ selector: 'entry-text-search-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field [formGroup]=\"form\" subscriptSizing=\"dynamic\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n <input [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\" [type]=\"searchFilter.type\" matInput\n [placeholder]=\"searchFilter.placeholder\" [maxlength]=\"searchFilter.maxLength\">\n</mat-form-field>" }]
55
+ }], propDecorators: { searchFilter: [{
56
+ type: Input
57
+ }], form: [{
58
+ type: Input
59
+ }] } });
42
60
 
43
- class EntrySearchFilterInputComponent {
61
+ class SelectSearchFilterComponent {
44
62
  constructor(config) {
45
63
  this.config = config;
46
64
  }
47
- get textSearchFilter() {
48
- return this.searchFilter.controlType === ControlType.text && this.searchFilter;
49
- }
50
- get selectSearchFilter() {
51
- return this.searchFilter.controlType === ControlType.select && this.searchFilter;
52
- }
53
65
  }
54
- EntrySearchFilterInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntrySearchFilterInputComponent, deps: [{ token: ENTRY_SEARCH_FILTER_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
55
- EntrySearchFilterInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntrySearchFilterInputComponent, selector: "entry-search-filter-input", inputs: { searchFilter: "searchFilter", form: "form" }, ngImport: i0, template: "<mat-form-field [formGroup]=\"form\" subscriptSizing=\"dynamic\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n\n <ng-container *ngIf=\"textSearchFilter as searchFilter\">\n <input [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\" [type]=\"searchFilter.type\" matInput\n [placeholder]=\"searchFilter.placeholder\" [maxlength]=\"searchFilter.maxLength\">\n </ng-container>\n\n <ng-container *ngIf=\"selectSearchFilter as searchFilter\">\n <mat-select [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\" [multiple]=\"searchFilter.multiSelect\">\n <mat-option *ngIf=\"!searchFilter.multiSelect\" [value]=\"undefined\">\n {{config.noneSelectedOptionText}}\n </mat-option>\n <div *ngIf=\"searchFilter.options$ !== undefined; else fixedSelectValues\">\n <mat-option *ngFor=\"let option of searchFilter.options$ | async\"\n [value]=\"option.key\">{{option.label}}</mat-option>\n </div>\n <ng-template #fixedSelectValues>\n <mat-option *ngFor=\"let option of searchFilter.options\" [value]=\"option.key\">{{option.label}}</mat-option>\n </ng-template>\n </mat-select>\n </ng-container>\n\n</mat-form-field>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntrySearchFilterInputComponent, decorators: [{
66
+ SelectSearchFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectSearchFilterComponent, deps: [{ token: ENTRY_SEARCH_FILTER_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
67
+ SelectSearchFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SelectSearchFilterComponent, selector: "entry-select-search-filter", inputs: { searchFilter: "searchFilter", form: "form" }, ngImport: i0, template: "<mat-form-field [formGroup]=\"form\" subscriptSizing=\"dynamic\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n <mat-select [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\" [multiple]=\"searchFilter.multiSelect\">\n <mat-option *ngIf=\"!searchFilter.multiSelect\" [value]=\"undefined\">\n {{config.noneSelectedOptionText}}\n </mat-option>\n <ng-container *ngIf=\"searchFilter.options$ !== undefined; else fixedSelectValues\">\n <mat-option *ngFor=\"let option of searchFilter.options$ | async\"\n [value]=\"option.key\">{{option.label}}</mat-option>\n </ng-container>\n <ng-template #fixedSelectValues>\n <mat-option *ngFor=\"let option of searchFilter.options\" [value]=\"option.key\">{{option.label}}</mat-option>\n </ng-template>\n </mat-select>\n</mat-form-field>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectSearchFilterComponent, decorators: [{
57
69
  type: Component,
58
- args: [{ selector: 'entry-search-filter-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field [formGroup]=\"form\" subscriptSizing=\"dynamic\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n\n <ng-container *ngIf=\"textSearchFilter as searchFilter\">\n <input [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\" [type]=\"searchFilter.type\" matInput\n [placeholder]=\"searchFilter.placeholder\" [maxlength]=\"searchFilter.maxLength\">\n </ng-container>\n\n <ng-container *ngIf=\"selectSearchFilter as searchFilter\">\n <mat-select [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\" [multiple]=\"searchFilter.multiSelect\">\n <mat-option *ngIf=\"!searchFilter.multiSelect\" [value]=\"undefined\">\n {{config.noneSelectedOptionText}}\n </mat-option>\n <div *ngIf=\"searchFilter.options$ !== undefined; else fixedSelectValues\">\n <mat-option *ngFor=\"let option of searchFilter.options$ | async\"\n [value]=\"option.key\">{{option.label}}</mat-option>\n </div>\n <ng-template #fixedSelectValues>\n <mat-option *ngFor=\"let option of searchFilter.options\" [value]=\"option.key\">{{option.label}}</mat-option>\n </ng-template>\n </mat-select>\n </ng-container>\n\n</mat-form-field>" }]
70
+ args: [{ selector: 'entry-select-search-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field [formGroup]=\"form\" subscriptSizing=\"dynamic\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n <mat-select [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\" [multiple]=\"searchFilter.multiSelect\">\n <mat-option *ngIf=\"!searchFilter.multiSelect\" [value]=\"undefined\">\n {{config.noneSelectedOptionText}}\n </mat-option>\n <ng-container *ngIf=\"searchFilter.options$ !== undefined; else fixedSelectValues\">\n <mat-option *ngFor=\"let option of searchFilter.options$ | async\"\n [value]=\"option.key\">{{option.label}}</mat-option>\n </ng-container>\n <ng-template #fixedSelectValues>\n <mat-option *ngFor=\"let option of searchFilter.options\" [value]=\"option.key\">{{option.label}}</mat-option>\n </ng-template>\n </mat-select>\n</mat-form-field>" }]
59
71
  }], ctorParameters: function () {
60
72
  return [{ type: EntrySearchFilterConfig, decorators: [{
61
73
  type: Inject,
@@ -67,6 +79,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
67
79
  type: Input
68
80
  }] } });
69
81
 
82
+ class AutocompleteSearchFilterComponent {
83
+ constructor(cdr) {
84
+ this.cdr = cdr;
85
+ this.options$ = of([]);
86
+ this.options = [];
87
+ this.destroy$ = new Subject();
88
+ this.displayFn = (selectedKey) => { var _a; return (_a = this.options.find(x => x.key === selectedKey)) === null || _a === void 0 ? void 0 : _a.label; };
89
+ }
90
+ ngAfterViewInit() {
91
+ this.searchField
92
+ .valueChanges
93
+ .pipe(takeUntil(this.destroy$), filter(value => (value === null || value === void 0 ? void 0 : value.length) >= this.searchFilter.minimumCharacters), debounceTime(this.searchFilter.debounceTime))
94
+ .subscribe(searchValue => {
95
+ // call search and retrieve options
96
+ this.options$ = this.searchFilter.search(searchValue)
97
+ .pipe(tap(options => this.options = options));
98
+ // mark for check because of the debounce
99
+ this.cdr.markForCheck();
100
+ });
101
+ }
102
+ ngOnDestroy() {
103
+ this.destroy$.next();
104
+ this.destroy$.complete();
105
+ }
106
+ }
107
+ AutocompleteSearchFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AutocompleteSearchFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
108
+ AutocompleteSearchFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AutocompleteSearchFilterComponent, selector: "entry-autocomplete-search-filter", inputs: { searchFilter: "searchFilter", form: "form" }, viewQueries: [{ propertyName: "searchField", first: true, predicate: FormControlName, descendants: true }], ngImport: i0, template: "<mat-form-field [formGroup]=\"form\" subscriptSizing=\"dynamic\">\n <mat-label>{{searchFilter.label}}</mat-label>\n <input type=\"text\" matInput [placeholder]=\"searchFilter.placeholder\"\n [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\" [matAutocomplete]=\"auto\">\n <mat-autocomplete [displayWith]=\"displayFn\" #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of options$ | async\" [value]=\"option.key\">\n {{option.label}}\n </mat-option>\n </mat-autocomplete>\n</mat-form-field>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i6.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AutocompleteSearchFilterComponent, decorators: [{
110
+ type: Component,
111
+ args: [{ selector: 'entry-autocomplete-search-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field [formGroup]=\"form\" subscriptSizing=\"dynamic\">\n <mat-label>{{searchFilter.label}}</mat-label>\n <input type=\"text\" matInput [placeholder]=\"searchFilter.placeholder\"\n [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\" [matAutocomplete]=\"auto\">\n <mat-autocomplete [displayWith]=\"displayFn\" #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let option of options$ | async\" [value]=\"option.key\">\n {{option.label}}\n </mat-option>\n </mat-autocomplete>\n</mat-form-field>" }]
112
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { searchFilter: [{
113
+ type: Input
114
+ }], form: [{
115
+ type: Input
116
+ }], searchField: [{
117
+ type: ViewChild,
118
+ args: [FormControlName]
119
+ }] } });
120
+
70
121
  /**
71
122
  * Entry SearchFilter component.
72
123
  */
@@ -79,6 +130,7 @@ class EntrySearchFilterComponent {
79
130
  * Emits the change in SearchFilterParams so the containing component can apply them and retrieve the filtered results.
80
131
  */
81
132
  this.searchFilterChange = new EventEmitter();
133
+ this.controlType = ControlType;
82
134
  }
83
135
  ngOnInit() {
84
136
  this.searchFilterForm = this.toFormGroup(this.searchFilters);
@@ -96,12 +148,21 @@ class EntrySearchFilterComponent {
96
148
  });
97
149
  return new UntypedFormGroup(group);
98
150
  }
151
+ asTextSearchFilter(searchFilter) {
152
+ return searchFilter;
153
+ }
154
+ asSelectSearchFilter(searchFilter) {
155
+ return searchFilter;
156
+ }
157
+ asAutocompleteSearchFilter(searchFilter) {
158
+ return searchFilter;
159
+ }
99
160
  }
100
161
  EntrySearchFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntrySearchFilterComponent, deps: [{ token: ENTRY_SEARCH_FILTER_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
101
- EntrySearchFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntrySearchFilterComponent, selector: "entry-search-filter", inputs: { searchFilters: "searchFilters" }, outputs: { searchFilterChange: "searchFilterChange" }, ngImport: i0, template: "<form (ngSubmit)=\"onSubmit()\" [formGroup]=\"searchFilterForm\" class=\"search-form-container entry-form\">\r\n <div *ngFor=\"let searchFilter of searchFilters\" class=\"form-field\">\r\n <entry-search-filter-input [searchFilter]=\"searchFilter\" [form]=\"searchFilterForm\">\r\n </entry-search-filter-input>\r\n </div>\r\n <div class=\"entry-search-filter-actions\">\r\n <button mat-button entry-submit-button>\r\n <span>{{config.applyButtonText}}</span>\r\n </button>\r\n </div>\r\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i4$1.EntryButtonDirective, selector: "[mat-button][entry-submit-button],[mat-button][entry-cancel-button]" }, { kind: "component", type: EntrySearchFilterInputComponent, selector: "entry-search-filter-input", inputs: ["searchFilter", "form"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
162
+ EntrySearchFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntrySearchFilterComponent, selector: "entry-search-filter", inputs: { searchFilters: "searchFilters" }, outputs: { searchFilterChange: "searchFilterChange" }, ngImport: i0, template: "<form (ngSubmit)=\"onSubmit()\" [formGroup]=\"searchFilterForm\" class=\"search-form-container entry-form\">\r\n <div *ngFor=\"let searchFilter of searchFilters\" class=\"form-field\">\r\n <ng-container [ngSwitch]=\"searchFilter.controlType\">\r\n <entry-text-search-filter *ngSwitchCase=\"controlType.text\" [searchFilter]=\"asTextSearchFilter(searchFilter)\" [form]=\"searchFilterForm\"></entry-text-search-filter>\r\n <entry-select-search-filter *ngSwitchCase=\"controlType.select\" [searchFilter]=\"asSelectSearchFilter(searchFilter)\" [form]=\"searchFilterForm\"></entry-select-search-filter>\r\n <entry-autocomplete-search-filter *ngSwitchCase=\"controlType.autocomplete\" [searchFilter]=\"asAutocompleteSearchFilter(searchFilter)\" [form]=\"searchFilterForm\"></entry-autocomplete-search-filter>\r\n </ng-container>\r\n </div>\r\n <div class=\"entry-search-filter-actions\">\r\n <button mat-button entry-submit-button>\r\n <span>{{config.applyButtonText}}</span>\r\n </button>\r\n </div>\r\n</form>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i4$1.EntryButtonDirective, selector: "[mat-button][entry-submit-button],[mat-button][entry-cancel-button]" }, { kind: "component", type: TextSearchFilterComponent, selector: "entry-text-search-filter", inputs: ["searchFilter", "form"] }, { kind: "component", type: SelectSearchFilterComponent, selector: "entry-select-search-filter", inputs: ["searchFilter", "form"] }, { kind: "component", type: AutocompleteSearchFilterComponent, selector: "entry-autocomplete-search-filter", inputs: ["searchFilter", "form"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
102
163
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntrySearchFilterComponent, decorators: [{
103
164
  type: Component,
104
- args: [{ selector: 'entry-search-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form (ngSubmit)=\"onSubmit()\" [formGroup]=\"searchFilterForm\" class=\"search-form-container entry-form\">\r\n <div *ngFor=\"let searchFilter of searchFilters\" class=\"form-field\">\r\n <entry-search-filter-input [searchFilter]=\"searchFilter\" [form]=\"searchFilterForm\">\r\n </entry-search-filter-input>\r\n </div>\r\n <div class=\"entry-search-filter-actions\">\r\n <button mat-button entry-submit-button>\r\n <span>{{config.applyButtonText}}</span>\r\n </button>\r\n </div>\r\n</form>" }]
165
+ args: [{ selector: 'entry-search-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form (ngSubmit)=\"onSubmit()\" [formGroup]=\"searchFilterForm\" class=\"search-form-container entry-form\">\r\n <div *ngFor=\"let searchFilter of searchFilters\" class=\"form-field\">\r\n <ng-container [ngSwitch]=\"searchFilter.controlType\">\r\n <entry-text-search-filter *ngSwitchCase=\"controlType.text\" [searchFilter]=\"asTextSearchFilter(searchFilter)\" [form]=\"searchFilterForm\"></entry-text-search-filter>\r\n <entry-select-search-filter *ngSwitchCase=\"controlType.select\" [searchFilter]=\"asSelectSearchFilter(searchFilter)\" [form]=\"searchFilterForm\"></entry-select-search-filter>\r\n <entry-autocomplete-search-filter *ngSwitchCase=\"controlType.autocomplete\" [searchFilter]=\"asAutocompleteSearchFilter(searchFilter)\" [form]=\"searchFilterForm\"></entry-autocomplete-search-filter>\r\n </ng-container>\r\n </div>\r\n <div class=\"entry-search-filter-actions\">\r\n <button mat-button entry-submit-button>\r\n <span>{{config.applyButtonText}}</span>\r\n </button>\r\n </div>\r\n</form>" }]
105
166
  }], ctorParameters: function () {
106
167
  return [{ type: EntrySearchFilterConfig, decorators: [{
107
168
  type: Inject,
@@ -122,8 +183,8 @@ class SearchFilterBase {
122
183
  this.key = options.key || '';
123
184
  this.label = options.label || '';
124
185
  this.placeholder = options.placeholder || '';
125
- this.controlType = options.controlType || '';
126
- this.type = options.type || '';
186
+ this.controlType = options.controlType || ControlType.text;
187
+ this.type = options.type || ControlType.text;
127
188
  this.maxLength = options.maxLength || 256;
128
189
  }
129
190
  setValue(value) {
@@ -168,8 +229,26 @@ class SelectSearchFilter extends SearchFilterBase {
168
229
  }
169
230
  }
170
231
 
171
- /** Model used to populate select filter options. */
172
- class SelectFilterOption {
232
+ /**
233
+ * Search filter autocomplete field configuration. Options for the autocomplete are provided
234
+ * indirectly via the search function that takes a string and returns an observable array of
235
+ * SelectOption<T>
236
+ */
237
+ class AutocompleteSearchFilter extends SearchFilterBase {
238
+ constructor(options = {}) {
239
+ var _a, _b;
240
+ super(options);
241
+ this.controlType = ControlType.autocomplete;
242
+ this.search = options.search;
243
+ this.placeholder = options.placeholder;
244
+ this.label = options.label;
245
+ this.debounceTime = (_a = options.debounceTime) !== null && _a !== void 0 ? _a : 300;
246
+ this.minimumCharacters = (_b = options.minimumCharacters) !== null && _b !== void 0 ? _b : 3;
247
+ }
248
+ }
249
+
250
+ /** Model used to populate select or autocomplete options. */
251
+ class SelectOption {
173
252
  constructor(
174
253
  /** Key used as a value for selected option */
175
254
  key,
@@ -184,14 +263,16 @@ class EntrySearchFilterModule {
184
263
  }
185
264
  EntrySearchFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntrySearchFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
186
265
  EntrySearchFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: EntrySearchFilterModule, declarations: [EntrySearchFilterComponent,
187
- EntrySearchFilterInputComponent], imports: [CommonModule,
266
+ TextSearchFilterComponent,
267
+ SelectSearchFilterComponent,
268
+ AutocompleteSearchFilterComponent], imports: [CommonModule,
188
269
  FormsModule,
189
270
  ReactiveFormsModule,
190
271
  MatInputModule,
191
272
  MatButtonModule,
192
273
  EntryButtonModule,
193
274
  MatSelectModule,
194
- MatTooltipModule], exports: [EntrySearchFilterComponent] });
275
+ MatAutocompleteModule], exports: [EntrySearchFilterComponent] });
195
276
  EntrySearchFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntrySearchFilterModule, imports: [CommonModule,
196
277
  FormsModule,
197
278
  ReactiveFormsModule,
@@ -199,13 +280,15 @@ EntrySearchFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
199
280
  MatButtonModule,
200
281
  EntryButtonModule,
201
282
  MatSelectModule,
202
- MatTooltipModule] });
283
+ MatAutocompleteModule] });
203
284
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntrySearchFilterModule, decorators: [{
204
285
  type: NgModule,
205
286
  args: [{
206
287
  declarations: [
207
288
  EntrySearchFilterComponent,
208
- EntrySearchFilterInputComponent
289
+ TextSearchFilterComponent,
290
+ SelectSearchFilterComponent,
291
+ AutocompleteSearchFilterComponent
209
292
  ],
210
293
  imports: [
211
294
  CommonModule,
@@ -215,7 +298,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
215
298
  MatButtonModule,
216
299
  EntryButtonModule,
217
300
  MatSelectModule,
218
- MatTooltipModule
301
+ MatAutocompleteModule
219
302
  ],
220
303
  exports: [
221
304
  EntrySearchFilterComponent
@@ -227,5 +310,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
227
310
  * Generated bundle index. Do not edit.
228
311
  */
229
312
 
230
- export { ENTRY_SEARCH_FILTER_CONFIG, EntrySearchFilterComponent, EntrySearchFilterConfig, EntrySearchFilterModule, SearchFilterBase, SelectFilterOption, SelectSearchFilter, TextSearchFilter, provideEntrySearchFilterConfig };
313
+ export { AutocompleteSearchFilter, ENTRY_SEARCH_FILTER_CONFIG, EntrySearchFilterComponent, EntrySearchFilterConfig, EntrySearchFilterModule, SearchFilterBase, SelectOption, SelectSearchFilter, TextSearchFilter, provideEntrySearchFilterConfig };
231
314
  //# sourceMappingURL=enigmatry-entry-components-search-filter.mjs.map