@enigmatry/entry-components 19.0.1-preview.1 → 20.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/button/index.d.ts +54 -3
- package/common/index.d.ts +243 -3
- package/date-time-picker/index.d.ts +100 -3
- package/dialog/index.d.ts +197 -3
- package/fesm2022/enigmatry-entry-components-button.mjs +19 -30
- package/fesm2022/enigmatry-entry-components-button.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-common.mjs +129 -133
- package/fesm2022/enigmatry-entry-components-common.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-date-time-picker.mjs +53 -50
- package/fesm2022/enigmatry-entry-components-date-time-picker.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-dialog.mjs +53 -78
- package/fesm2022/enigmatry-entry-components-dialog.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-file-input.mjs +55 -51
- package/fesm2022/enigmatry-entry-components-file-input.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-permissions.mjs +28 -23
- package/fesm2022/enigmatry-entry-components-permissions.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-search-filter.mjs +83 -97
- package/fesm2022/enigmatry-entry-components-search-filter.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-spinner.mjs +21 -21
- package/fesm2022/enigmatry-entry-components-spinner.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-table.mjs +77 -86
- package/fesm2022/enigmatry-entry-components-table.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-validation.mjs +43 -47
- package/fesm2022/enigmatry-entry-components-validation.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components.mjs +6 -6
- package/fesm2022/enigmatry-entry-components.mjs.map +1 -1
- package/file-input/index.d.ts +87 -5
- package/index.d.ts +37 -3
- package/package.json +10 -8
- package/permissions/index.d.ts +40 -5
- package/search-filter/index.d.ts +225 -3
- package/spinner/index.d.ts +34 -5
- package/styles/modules/components/toggle/_generator.scss +3 -2
- package/styles/modules/vendors/angular-material/_generator.scss +1 -0
- package/styles/modules/vendors/angular-material/_typography-generator.scss +2 -0
- package/table/README.md +6 -3
- package/table/index.d.ts +260 -4
- package/validation/index.d.ts +123 -3
- package/button/entry-button-config.d.ts +0 -30
- package/button/entry-button.directive.d.ts +0 -18
- package/button/entry-button.module.d.ts +0 -9
- package/button/public-api.d.ts +0 -3
- package/common/common.module.d.ts +0 -14
- package/common/constants.d.ts +0 -2
- package/common/date-time/entry-date-time-adapter.d.ts +0 -41
- package/common/date-time/entry-date-time-formats.d.ts +0 -25
- package/common/date-time/entry-time-adapter.d.ts +0 -9
- package/common/date-time/index.d.ts +0 -4
- package/common/date-time/native-time-adapter.d.ts +0 -13
- package/common/directives/auto-disable-button.directive.d.ts +0 -26
- package/common/directives/index.d.ts +0 -4
- package/common/directives/ng-control-accessor.directive.d.ts +0 -12
- package/common/directives/noop-control-value-accessor.d.ts +0 -10
- package/common/directives/scroll-to-invalid-control.directive.d.ts +0 -18
- package/common/event-plugins/abstract.plugin.d.ts +0 -40
- package/common/event-plugins/debounce.plugin.d.ts +0 -15
- package/common/event-plugins/index.d.ts +0 -2
- package/common/event-plugins/throttle.plugin.d.ts +0 -15
- package/common/interceptors/accept-language.interceptor.d.ts +0 -16
- package/common/interceptors/index.d.ts +0 -1
- package/common/public-api.d.ts +0 -6
- package/common/utils/index.d.ts +0 -1
- package/common/utils/provide-config.d.ts +0 -3
- package/date-time-picker/date-time-picker-config.model.d.ts +0 -20
- package/date-time-picker/date-time-picker.component.d.ts +0 -38
- package/date-time-picker/date-time-picker.module.d.ts +0 -17
- package/date-time-picker/public-api.d.ts +0 -3
- package/date-time-picker/time-picker.component.d.ts +0 -26
- package/dialog/dialogs/alert/entry-alert-dialog-data.interface.d.ts +0 -18
- package/dialog/dialogs/alert/entry-alert-dialog.component.d.ts +0 -13
- package/dialog/dialogs/confirm/entry-confirm-dialog-data.interface.d.ts +0 -8
- package/dialog/dialogs/confirm/entry-confirm-dialog.component.d.ts +0 -13
- package/dialog/dialogs/entry-dialog.component.d.ts +0 -43
- package/dialog/dialogs/error/entry-error-dialog-data.interface.d.ts +0 -9
- package/dialog/dialogs/error/entry-error-dialog.component.d.ts +0 -15
- package/dialog/entry-dialog-buttons-alignment.type.d.ts +0 -2
- package/dialog/entry-dialog-config.model.d.ts +0 -33
- package/dialog/entry-dialog.module.d.ts +0 -15
- package/dialog/entry-dialog.service.d.ts +0 -55
- package/dialog/public-api.d.ts +0 -11
- package/file-input/entry-file-input.component.d.ts +0 -74
- package/file-input/entry-file-input.module.d.ts +0 -12
- package/file-input/public-api.d.ts +0 -2
- package/modules/entry-components.module.d.ts +0 -28
- package/permissions/permission-type.d.ts +0 -3
- package/permissions/permission.directive.d.ts +0 -11
- package/permissions/permission.guard.d.ts +0 -2
- package/permissions/permission.module.d.ts +0 -9
- package/permissions/permission.pipe.d.ts +0 -11
- package/permissions/permission.service.d.ts +0 -4
- package/permissions/public-api.d.ts +0 -5
- package/public-api.d.ts +0 -10
- package/search-filter/autocomplete/autocomplete-search-filter.component.d.ts +0 -22
- package/search-filter/autocomplete/autocomplete-search-filter.model.d.ts +0 -19
- package/search-filter/control-type.d.ts +0 -7
- package/search-filter/date/date-search-filter.component.d.ts +0 -10
- package/search-filter/date/date-search-filter.model.d.ts +0 -8
- package/search-filter/date-time/date-time-search-filter.component.d.ts +0 -10
- package/search-filter/date-time/date-time-search-filter.model.d.ts +0 -8
- package/search-filter/entry-search-filter.component.d.ts +0 -38
- package/search-filter/entry-search-filter.module.d.ts +0 -22
- package/search-filter/public-api.d.ts +0 -11
- package/search-filter/search-filter-base.model.d.ts +0 -26
- package/search-filter/search-filter-config.model.d.ts +0 -16
- package/search-filter/search-filter-params.type.d.ts +0 -7
- package/search-filter/select/select-search-filter.component.d.ts +0 -14
- package/search-filter/select/select-search-filter.model.d.ts +0 -21
- package/search-filter/select-option.model.d.ts +0 -12
- package/search-filter/text/text-search-filter.component.d.ts +0 -10
- package/search-filter/text/text-search-filter.model.d.ts +0 -8
- package/spinner/entry-spinner/spinner.component.d.ts +0 -24
- package/spinner/public-api.d.ts +0 -2
- package/spinner/spinner-overlay-container.d.ts +0 -17
- package/spinner/spinner.module.d.ts +0 -10
- package/table/components/entry-cell/entry-cell.component.d.ts +0 -10
- package/table/components/entry-cell-context-menu/entry-cell-context-menu.component.d.ts +0 -18
- package/table/components/entry-cell-formatted-value/entry-cell-formatted-value.component.d.ts +0 -10
- package/table/components/entry-table/entry-table.component.d.ts +0 -82
- package/table/components/index.d.ts +0 -4
- package/table/entry-table.module.d.ts +0 -20
- package/table/interfaces/cell-template.d.ts +0 -4
- package/table/interfaces/column-def.d.ts +0 -20
- package/table/interfaces/column-sort-prop.d.ts +0 -5
- package/table/interfaces/column-type-parameter.d.ts +0 -9
- package/table/interfaces/column-type.d.ts +0 -1
- package/table/interfaces/context-menu-item.d.ts +0 -7
- package/table/interfaces/entry-table-config.d.ts +0 -33
- package/table/interfaces/index.d.ts +0 -12
- package/table/interfaces/paged-query.d.ts +0 -15
- package/table/interfaces/pagination.d.ts +0 -19
- package/table/interfaces/row-class-formatter.d.ts +0 -3
- package/table/interfaces/row-context-menu-formatter.d.ts +0 -4
- package/table/interfaces/row-selection-formatter.d.ts +0 -4
- package/table/public-api.d.ts +0 -3
- package/validation/entry-display-control-validation.directive.d.ts +0 -27
- package/validation/entry-form-errors.component.d.ts +0 -18
- package/validation/entry-validation-config.model.d.ts +0 -48
- package/validation/entry-validation.d.ts +0 -15
- package/validation/entry-validation.module.d.ts +0 -11
- package/validation/public-api.d.ts +0 -6
- package/validation/validation-problem-details.interface.d.ts +0 -9
|
@@ -1,30 +1,37 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Input, ChangeDetectionStrategy, Component, inject, ChangeDetectorRef, EventEmitter, Output, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { FormControl, UntypedFormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import { createInjectionToken, provideConfig,
|
|
5
|
+
import { createInjectionToken, provideConfig, EntryDateTimeAdapter, ENTRY_MAT_DATE_TIME_FORMATS } from '@enigmatry/entry-components/common';
|
|
6
6
|
import * as i1$1 from '@angular/common';
|
|
7
7
|
import { CommonModule } from '@angular/common';
|
|
8
8
|
import * as i3$1 from '@angular/material/button';
|
|
9
9
|
import { MatButtonModule } from '@angular/material/button';
|
|
10
10
|
import * as i4$2 from '@enigmatry/entry-components/button';
|
|
11
11
|
import { EntryButtonModule } from '@enigmatry/entry-components/button';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i4 from '@enigmatry/entry-components/validation';
|
|
13
13
|
import { EntryValidationModule } from '@enigmatry/entry-components/validation';
|
|
14
14
|
import * as i2 from '@angular/material/input';
|
|
15
15
|
import { MatInputModule } from '@angular/material/input';
|
|
16
|
-
import * as
|
|
17
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
18
|
-
import * as i4 from '@angular/material/select';
|
|
16
|
+
import * as i4$1 from '@angular/material/select';
|
|
19
17
|
import { MatSelectModule } from '@angular/material/select';
|
|
20
|
-
import * as i5$1 from '@angular/material/core';
|
|
21
|
-
import { MAT_DATE_FORMATS, DateAdapter } from '@angular/material/core';
|
|
22
18
|
import { of, Subject } from 'rxjs';
|
|
23
19
|
import { takeUntil, tap, filter, debounceTime } from 'rxjs/operators';
|
|
24
|
-
import * as
|
|
20
|
+
import * as i5 from '@angular/material/autocomplete';
|
|
25
21
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
26
|
-
import
|
|
22
|
+
import { MAT_DATE_FORMATS, DateAdapter } from '@angular/material/core';
|
|
23
|
+
import * as i3 from '@angular/material/datepicker';
|
|
27
24
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
25
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
26
|
+
|
|
27
|
+
var ControlType;
|
|
28
|
+
(function (ControlType) {
|
|
29
|
+
ControlType["text"] = "text-input";
|
|
30
|
+
ControlType["select"] = "select-input";
|
|
31
|
+
ControlType["autocomplete"] = "autocomplete-input";
|
|
32
|
+
ControlType["date"] = "date-input";
|
|
33
|
+
ControlType["dateTime"] = "date-time-input";
|
|
34
|
+
})(ControlType || (ControlType = {}));
|
|
28
35
|
|
|
29
36
|
/**
|
|
30
37
|
* Used to provide entry search filter configuration on module level.
|
|
@@ -39,26 +46,15 @@ const ENTRY_SEARCH_FILTER_CONFIG = createInjectionToken(new EntrySearchFilterCon
|
|
|
39
46
|
/**
|
|
40
47
|
* Can be used to provide entry search filter configuration.
|
|
41
48
|
*/
|
|
42
|
-
|
|
43
|
-
return provideConfig(ENTRY_SEARCH_FILTER_CONFIG, () => new EntrySearchFilterConfig(config));
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
var ControlType;
|
|
47
|
-
(function (ControlType) {
|
|
48
|
-
ControlType["text"] = "text-input";
|
|
49
|
-
ControlType["select"] = "select-input";
|
|
50
|
-
ControlType["autocomplete"] = "autocomplete-input";
|
|
51
|
-
ControlType["date"] = "date-input";
|
|
52
|
-
ControlType["dateTime"] = "date-time-input";
|
|
53
|
-
})(ControlType || (ControlType = {}));
|
|
49
|
+
const provideEntrySearchFilterConfig = (config) => provideConfig(ENTRY_SEARCH_FILTER_CONFIG, () => new EntrySearchFilterConfig(config));
|
|
54
50
|
|
|
55
51
|
class TextSearchFilterComponent {
|
|
56
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
57
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
52
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: TextSearchFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
53
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", type: TextSearchFilterComponent, isStandalone: false, 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-error entryDisplayControlValidation [control]=\"form.get(searchFilter.key)!\"></mat-error>\n</mat-form-field>", dependencies: [{ 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.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: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.EntryDisplayControlValidationDirective, selector: "[entryDisplayControlValidation]", inputs: ["control"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
58
54
|
}
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: TextSearchFilterComponent, decorators: [{
|
|
60
56
|
type: Component,
|
|
61
|
-
args: [{ selector: 'entry-text-search-filter', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, 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-error entryDisplayControlValidation [control]=\"form.get(searchFilter.key)
|
|
57
|
+
args: [{ selector: 'entry-text-search-filter', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, 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-error entryDisplayControlValidation [control]=\"form.get(searchFilter.key)!\"></mat-error>\n</mat-form-field>" }]
|
|
62
58
|
}], propDecorators: { searchFilter: [{
|
|
63
59
|
type: Input
|
|
64
60
|
}], form: [{
|
|
@@ -66,31 +62,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
|
|
|
66
62
|
}] } });
|
|
67
63
|
|
|
68
64
|
class SelectSearchFilterComponent {
|
|
69
|
-
constructor(
|
|
70
|
-
this.config =
|
|
65
|
+
constructor() {
|
|
66
|
+
this.config = inject(ENTRY_SEARCH_FILTER_CONFIG);
|
|
71
67
|
}
|
|
72
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
73
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
68
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: SelectSearchFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
69
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", type: SelectSearchFilterComponent, isStandalone: false, 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 && searchFilter.showNoneOption\" [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-error entryDisplayControlValidation [control]=\"form.get(searchFilter.key)!\"></mat-error>\n</mat-form-field>", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i4$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i4.EntryDisplayControlValidationDirective, selector: "[entryDisplayControlValidation]", inputs: ["control"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
74
70
|
}
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: SelectSearchFilterComponent, decorators: [{
|
|
76
72
|
type: Component,
|
|
77
|
-
args: [{ selector: 'entry-select-search-filter', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, 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-error entryDisplayControlValidation [control]=\"form.get(searchFilter.key)
|
|
78
|
-
}],
|
|
79
|
-
type: Inject,
|
|
80
|
-
args: [ENTRY_SEARCH_FILTER_CONFIG]
|
|
81
|
-
}] }], propDecorators: { searchFilter: [{
|
|
73
|
+
args: [{ selector: 'entry-select-search-filter', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, 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 && searchFilter.showNoneOption\" [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-error entryDisplayControlValidation [control]=\"form.get(searchFilter.key)!\"></mat-error>\n</mat-form-field>" }]
|
|
74
|
+
}], propDecorators: { searchFilter: [{
|
|
82
75
|
type: Input
|
|
83
76
|
}], form: [{
|
|
84
77
|
type: Input
|
|
85
78
|
}] } });
|
|
86
79
|
|
|
87
80
|
class AutocompleteSearchFilterComponent {
|
|
88
|
-
constructor(
|
|
89
|
-
this.cdr = cdr;
|
|
81
|
+
constructor() {
|
|
90
82
|
this.searchField = new FormControl('');
|
|
91
83
|
this.options$ = of([]);
|
|
92
84
|
this.destroy$ = new Subject();
|
|
93
|
-
this.
|
|
85
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
86
|
+
this.displayFn = (_selectedValue) => this.searchFilter.formControl.value?.label ?? '';
|
|
94
87
|
this.onSelected = (event) => {
|
|
95
88
|
this.searchFilter.formControl.patchValue(event.option.value);
|
|
96
89
|
this.searchField.patchValue(event.option.value.label, { emitEvent: false });
|
|
@@ -99,7 +92,7 @@ class AutocompleteSearchFilterComponent {
|
|
|
99
92
|
ngAfterViewInit() {
|
|
100
93
|
this.searchField
|
|
101
94
|
.valueChanges
|
|
102
|
-
.pipe(takeUntil(this.destroy$), tap(value => this.clearFilterIfLabelMismatch(value)), filter(value => value
|
|
95
|
+
.pipe(takeUntil(this.destroy$), tap(value => this.clearFilterIfLabelMismatch(value)), filter(value => !!value && value.length >= this.searchFilter.minimumCharacters), debounceTime(this.searchFilter.debounceTime))
|
|
103
96
|
.subscribe(searchValue => {
|
|
104
97
|
// call search and retrieve options
|
|
105
98
|
this.options$ = this.searchFilter.search(searchValue);
|
|
@@ -118,29 +111,29 @@ class AutocompleteSearchFilterComponent {
|
|
|
118
111
|
this.searchField.patchValue(null, { emitEvent: false });
|
|
119
112
|
}
|
|
120
113
|
}
|
|
121
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
122
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
114
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: AutocompleteSearchFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
115
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", type: AutocompleteSearchFilterComponent, isStandalone: false, selector: "entry-autocomplete-search-filter", inputs: { searchFilter: "searchFilter" }, ngImport: i0, template: "<mat-form-field subscriptSizing=\"dynamic\">\n <mat-label>{{searchFilter.label}}</mat-label>\n <input type=\"text\" matInput [placeholder]=\"searchFilter.placeholder\"\n [formControl]=\"searchField\" [id]=\"searchFilter.key\" [matAutocomplete]=\"auto\">\n <mat-autocomplete [displayWith]=\"displayFn\" #auto=\"matAutocomplete\" (optionSelected)=\"onSelected($event)\">\n <mat-option *ngFor=\"let option of options$ | async\" [value]=\"option\">\n {{option.label}}\n </mat-option>\n </mat-autocomplete>\n <mat-error entryDisplayControlValidation [control]=\"searchField\"></mat-error>\n</mat-form-field>", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: "directive", type: i2.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: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i4$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i4.EntryDisplayControlValidationDirective, selector: "[entryDisplayControlValidation]", inputs: ["control"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
123
116
|
}
|
|
124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: AutocompleteSearchFilterComponent, decorators: [{
|
|
125
118
|
type: Component,
|
|
126
119
|
args: [{ selector: 'entry-autocomplete-search-filter', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<mat-form-field subscriptSizing=\"dynamic\">\n <mat-label>{{searchFilter.label}}</mat-label>\n <input type=\"text\" matInput [placeholder]=\"searchFilter.placeholder\"\n [formControl]=\"searchField\" [id]=\"searchFilter.key\" [matAutocomplete]=\"auto\">\n <mat-autocomplete [displayWith]=\"displayFn\" #auto=\"matAutocomplete\" (optionSelected)=\"onSelected($event)\">\n <mat-option *ngFor=\"let option of options$ | async\" [value]=\"option\">\n {{option.label}}\n </mat-option>\n </mat-autocomplete>\n <mat-error entryDisplayControlValidation [control]=\"searchField\"></mat-error>\n</mat-form-field>" }]
|
|
127
|
-
}],
|
|
120
|
+
}], propDecorators: { searchFilter: [{
|
|
128
121
|
type: Input
|
|
129
122
|
}] } });
|
|
130
123
|
|
|
131
124
|
class DateTimeSearchFilterComponent {
|
|
132
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
133
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
125
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: DateTimeSearchFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
126
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", type: DateTimeSearchFilterComponent, isStandalone: false, selector: "entry-date-time-search-filter", inputs: { searchFilter: "searchFilter", form: "form" }, providers: [
|
|
134
127
|
{ provide: MAT_DATE_FORMATS, useFactory: () => inject(ENTRY_MAT_DATE_TIME_FORMATS) },
|
|
135
128
|
{ provide: DateAdapter, useClass: EntryDateTimeAdapter }
|
|
136
|
-
], ngImport: i0, template: "<mat-form-field class=\"date-time-search-field\" [formGroup]=\"form\" subscriptSizing=\"dynamic\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n <input matInput [formControlName]=\"searchFilter.key\" [matDatepicker]=\"picker\" [id]=\"searchFilter.key\">\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error entryDisplayControlValidation [control]=\"form.get(searchFilter.key)
|
|
129
|
+
], ngImport: i0, template: "<mat-form-field class=\"date-time-search-field\" [formGroup]=\"form\" subscriptSizing=\"dynamic\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n <input matInput [formControlName]=\"searchFilter.key\" [matDatepicker]=\"picker\" [id]=\"searchFilter.key\">\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error entryDisplayControlValidation [control]=\"form.get(searchFilter.key)!\"></mat-error>\n</mat-form-field>", dependencies: [{ 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.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: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i3.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i3.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i3.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i4.EntryDisplayControlValidationDirective, selector: "[entryDisplayControlValidation]", inputs: ["control"] }] }); }
|
|
137
130
|
}
|
|
138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: DateTimeSearchFilterComponent, decorators: [{
|
|
139
132
|
type: Component,
|
|
140
133
|
args: [{ selector: 'entry-date-time-search-filter', providers: [
|
|
141
134
|
{ provide: MAT_DATE_FORMATS, useFactory: () => inject(ENTRY_MAT_DATE_TIME_FORMATS) },
|
|
142
135
|
{ provide: DateAdapter, useClass: EntryDateTimeAdapter }
|
|
143
|
-
], standalone: false, template: "<mat-form-field class=\"date-time-search-field\" [formGroup]=\"form\" subscriptSizing=\"dynamic\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n <input matInput [formControlName]=\"searchFilter.key\" [matDatepicker]=\"picker\" [id]=\"searchFilter.key\">\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error entryDisplayControlValidation [control]=\"form.get(searchFilter.key)
|
|
136
|
+
], standalone: false, template: "<mat-form-field class=\"date-time-search-field\" [formGroup]=\"form\" subscriptSizing=\"dynamic\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n <input matInput [formControlName]=\"searchFilter.key\" [matDatepicker]=\"picker\" [id]=\"searchFilter.key\">\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error entryDisplayControlValidation [control]=\"form.get(searchFilter.key)!\"></mat-error>\n</mat-form-field>" }]
|
|
144
137
|
}], propDecorators: { searchFilter: [{
|
|
145
138
|
type: Input
|
|
146
139
|
}], form: [{
|
|
@@ -148,12 +141,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
|
|
|
148
141
|
}] } });
|
|
149
142
|
|
|
150
143
|
class DateSearchFilterComponent {
|
|
151
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
152
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
144
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: DateSearchFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
145
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", type: DateSearchFilterComponent, isStandalone: false, selector: "entry-date-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 matInput [formControlName]=\"searchFilter.key\" [matDatepicker]=\"picker\" [id]=\"searchFilter.key\">\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error entryDisplayControlValidation [control]=\"form.get(searchFilter.key)!\"></mat-error>\n</mat-form-field>", dependencies: [{ 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.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: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i3.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i3.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i3.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i4.EntryDisplayControlValidationDirective, selector: "[entryDisplayControlValidation]", inputs: ["control"] }] }); }
|
|
153
146
|
}
|
|
154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: DateSearchFilterComponent, decorators: [{
|
|
155
148
|
type: Component,
|
|
156
|
-
args: [{ selector: 'entry-date-search-filter', standalone: false, template: "<mat-form-field [formGroup]=\"form\" subscriptSizing=\"dynamic\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n <input matInput [formControlName]=\"searchFilter.key\" [matDatepicker]=\"picker\" [id]=\"searchFilter.key\">\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error entryDisplayControlValidation [control]=\"form.get(searchFilter.key)
|
|
149
|
+
args: [{ selector: 'entry-date-search-filter', standalone: false, template: "<mat-form-field [formGroup]=\"form\" subscriptSizing=\"dynamic\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n <input matInput [formControlName]=\"searchFilter.key\" [matDatepicker]=\"picker\" [id]=\"searchFilter.key\">\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-error entryDisplayControlValidation [control]=\"form.get(searchFilter.key)!\"></mat-error>\n</mat-form-field>" }]
|
|
157
150
|
}], propDecorators: { searchFilter: [{
|
|
158
151
|
type: Input
|
|
159
152
|
}], form: [{
|
|
@@ -164,8 +157,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
|
|
|
164
157
|
* Entry SearchFilter component.
|
|
165
158
|
*/
|
|
166
159
|
class EntrySearchFilterComponent {
|
|
167
|
-
constructor(
|
|
168
|
-
this.config = config;
|
|
160
|
+
constructor() {
|
|
169
161
|
/** Configuration of the search filters inputs that will be displayed in the search-filter component. */
|
|
170
162
|
this.searchFilters = [];
|
|
171
163
|
/**
|
|
@@ -173,6 +165,21 @@ class EntrySearchFilterComponent {
|
|
|
173
165
|
*/
|
|
174
166
|
this.searchFilterChange = new EventEmitter();
|
|
175
167
|
this.controlType = ControlType;
|
|
168
|
+
this.config = inject(ENTRY_SEARCH_FILTER_CONFIG);
|
|
169
|
+
this.toFormGroup = (searchFilters) => {
|
|
170
|
+
const group = {};
|
|
171
|
+
searchFilters.forEach(searchFilter => {
|
|
172
|
+
const formControl = searchFilter.toFormControl();
|
|
173
|
+
group[searchFilter.key] = formControl;
|
|
174
|
+
searchFilter.formControl = formControl;
|
|
175
|
+
});
|
|
176
|
+
return new UntypedFormGroup(group);
|
|
177
|
+
};
|
|
178
|
+
this.asTextSearchFilter = (searchFilter) => searchFilter;
|
|
179
|
+
this.asSelectSearchFilter = (searchFilter) => searchFilter;
|
|
180
|
+
this.asAutocompleteSearchFilter = (searchFilter) => searchFilter;
|
|
181
|
+
this.asDateTimeSearchFilter = (searchFilter) => searchFilter;
|
|
182
|
+
this.asDateSearchFilter = (searchFilter) => searchFilter;
|
|
176
183
|
}
|
|
177
184
|
ngOnInit() {
|
|
178
185
|
this.searchFilterForm = this.toFormGroup(this.searchFilters);
|
|
@@ -181,40 +188,13 @@ class EntrySearchFilterComponent {
|
|
|
181
188
|
const formValue = this.searchFilterForm.value;
|
|
182
189
|
this.searchFilterChange.emit(formValue);
|
|
183
190
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
searchFilters.forEach(searchFilter => {
|
|
187
|
-
const formControl = searchFilter.toFormControl();
|
|
188
|
-
group[searchFilter.key] = formControl;
|
|
189
|
-
searchFilter.formControl = formControl;
|
|
190
|
-
});
|
|
191
|
-
return new UntypedFormGroup(group);
|
|
192
|
-
}
|
|
193
|
-
asTextSearchFilter(searchFilter) {
|
|
194
|
-
return searchFilter;
|
|
195
|
-
}
|
|
196
|
-
asSelectSearchFilter(searchFilter) {
|
|
197
|
-
return searchFilter;
|
|
198
|
-
}
|
|
199
|
-
asAutocompleteSearchFilter(searchFilter) {
|
|
200
|
-
return searchFilter;
|
|
201
|
-
}
|
|
202
|
-
asDateTimeSearchFilter(searchFilter) {
|
|
203
|
-
return searchFilter;
|
|
204
|
-
}
|
|
205
|
-
asDateSearchFilter(searchFilter) {
|
|
206
|
-
return searchFilter;
|
|
207
|
-
}
|
|
208
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntrySearchFilterComponent, deps: [{ token: ENTRY_SEARCH_FILTER_CONFIG }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
209
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.3", type: EntrySearchFilterComponent, isStandalone: false, 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 <entry-form-errors [form]=\"searchFilterForm\"></entry-form-errors>\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)\"></entry-autocomplete-search-filter>\r\n <entry-date-time-search-filter *ngSwitchCase=\"controlType.dateTime\" [searchFilter]=\"asDateTimeSearchFilter(searchFilter)\" [form]=\"searchFilterForm\"></entry-date-time-search-filter>\r\n <entry-date-search-filter *ngSwitchCase=\"controlType.date\" [searchFilter]=\"asDateSearchFilter(searchFilter)\" [form]=\"searchFilterForm\"></entry-date-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$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.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] ", exportAs: ["matButton"] }, { kind: "directive", type: i4$2.EntryButtonDirective, selector: "[mat-button][entry-submit-button],[mat-button][entry-cancel-button]" }, { kind: "component", type: i5.EntryFormErrorsComponent, selector: "entry-form-errors", inputs: ["form"] }, { 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"] }, { kind: "component", type: DateTimeSearchFilterComponent, selector: "entry-date-time-search-filter", inputs: ["searchFilter", "form"] }, { kind: "component", type: DateSearchFilterComponent, selector: "entry-date-search-filter", inputs: ["searchFilter", "form"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
191
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntrySearchFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
192
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", type: EntrySearchFilterComponent, isStandalone: false, 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 <entry-form-errors [form]=\"searchFilterForm\"></entry-form-errors>\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)\"></entry-autocomplete-search-filter>\r\n <entry-date-time-search-filter *ngSwitchCase=\"controlType.dateTime\" [searchFilter]=\"asDateTimeSearchFilter(searchFilter)\" [form]=\"searchFilterForm\"></entry-date-time-search-filter>\r\n <entry-date-search-filter *ngSwitchCase=\"controlType.date\" [searchFilter]=\"asDateSearchFilter(searchFilter)\" [form]=\"searchFilterForm\"></entry-date-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$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: i4$2.EntryButtonDirective, selector: "[mat-button][entry-submit-button],[mat-button][entry-cancel-button]" }, { kind: "component", type: i4.EntryFormErrorsComponent, selector: "entry-form-errors", inputs: ["form"] }, { 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"] }, { kind: "component", type: DateTimeSearchFilterComponent, selector: "entry-date-time-search-filter", inputs: ["searchFilter", "form"] }, { kind: "component", type: DateSearchFilterComponent, selector: "entry-date-search-filter", inputs: ["searchFilter", "form"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
210
193
|
}
|
|
211
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntrySearchFilterComponent, decorators: [{
|
|
212
195
|
type: Component,
|
|
213
196
|
args: [{ selector: 'entry-search-filter', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<form (ngSubmit)=\"onSubmit()\" [formGroup]=\"searchFilterForm\" class=\"search-form-container entry-form\">\r\n <entry-form-errors [form]=\"searchFilterForm\"></entry-form-errors>\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)\"></entry-autocomplete-search-filter>\r\n <entry-date-time-search-filter *ngSwitchCase=\"controlType.dateTime\" [searchFilter]=\"asDateTimeSearchFilter(searchFilter)\" [form]=\"searchFilterForm\"></entry-date-time-search-filter>\r\n <entry-date-search-filter *ngSwitchCase=\"controlType.date\" [searchFilter]=\"asDateSearchFilter(searchFilter)\" [form]=\"searchFilterForm\"></entry-date-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>" }]
|
|
214
|
-
}],
|
|
215
|
-
type: Inject,
|
|
216
|
-
args: [ENTRY_SEARCH_FILTER_CONFIG]
|
|
217
|
-
}] }], propDecorators: { searchFilters: [{
|
|
197
|
+
}], propDecorators: { searchFilters: [{
|
|
218
198
|
type: Input
|
|
219
199
|
}], searchFilterChange: [{
|
|
220
200
|
type: Output
|
|
@@ -225,13 +205,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
|
|
|
225
205
|
*/
|
|
226
206
|
class SearchFilterBase {
|
|
227
207
|
constructor(options = {}) {
|
|
208
|
+
this.maxPossibleLength = 256;
|
|
228
209
|
this.value = options.value;
|
|
229
210
|
this.key = options.key || '';
|
|
230
211
|
this.label = options.label || '';
|
|
231
212
|
this.placeholder = options.placeholder || '';
|
|
232
213
|
this.controlType = options.controlType || ControlType.text;
|
|
233
214
|
this.type = options.type || ControlType.text;
|
|
234
|
-
this.maxLength = options.maxLength ||
|
|
215
|
+
this.maxLength = options.maxLength || this.maxPossibleLength;
|
|
235
216
|
}
|
|
236
217
|
setValue(value) {
|
|
237
218
|
this.value = value;
|
|
@@ -269,9 +250,11 @@ class SelectSearchFilter extends SearchFilterBase {
|
|
|
269
250
|
* If it is set to false, 'none selected' option becomes available as a first option.
|
|
270
251
|
* */
|
|
271
252
|
this.multiSelect = true;
|
|
272
|
-
this.
|
|
253
|
+
this.showNoneOption = true;
|
|
254
|
+
this.options = options.options ?? [];
|
|
273
255
|
this.options$ = options.options$;
|
|
274
|
-
this.multiSelect = options.multiSelect;
|
|
256
|
+
this.multiSelect = !!options.multiSelect;
|
|
257
|
+
this.showNoneOption = !!options.showNoneOption;
|
|
275
258
|
}
|
|
276
259
|
}
|
|
277
260
|
|
|
@@ -284,11 +267,14 @@ class AutocompleteSearchFilter extends SearchFilterBase {
|
|
|
284
267
|
constructor(options = {}) {
|
|
285
268
|
super(options);
|
|
286
269
|
this.controlType = ControlType.autocomplete;
|
|
270
|
+
this.defaultMinimumCharacters = 3;
|
|
271
|
+
this.defaultDebounceTime = 300;
|
|
272
|
+
if (!options.search) {
|
|
273
|
+
throw new Error('Search function must be provided for AutocompleteSearchFilter');
|
|
274
|
+
}
|
|
287
275
|
this.search = options.search;
|
|
288
|
-
this.
|
|
289
|
-
this.
|
|
290
|
-
this.debounceTime = options.debounceTime ?? 300;
|
|
291
|
-
this.minimumCharacters = options.minimumCharacters ?? 3;
|
|
276
|
+
this.debounceTime = options.debounceTime ?? this.defaultDebounceTime;
|
|
277
|
+
this.minimumCharacters = options.minimumCharacters ?? this.defaultMinimumCharacters;
|
|
292
278
|
}
|
|
293
279
|
}
|
|
294
280
|
|
|
@@ -325,8 +311,8 @@ class DateSearchFilter extends SearchFilterBase {
|
|
|
325
311
|
}
|
|
326
312
|
|
|
327
313
|
class EntrySearchFilterModule {
|
|
328
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
329
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
314
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntrySearchFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
315
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.2", ngImport: i0, type: EntrySearchFilterModule, declarations: [EntrySearchFilterComponent,
|
|
330
316
|
TextSearchFilterComponent,
|
|
331
317
|
SelectSearchFilterComponent,
|
|
332
318
|
AutocompleteSearchFilterComponent,
|
|
@@ -342,7 +328,7 @@ class EntrySearchFilterModule {
|
|
|
342
328
|
MatDatepickerModule,
|
|
343
329
|
MatFormFieldModule,
|
|
344
330
|
EntryValidationModule], exports: [EntrySearchFilterComponent] }); }
|
|
345
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
331
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntrySearchFilterModule, imports: [CommonModule,
|
|
346
332
|
FormsModule,
|
|
347
333
|
ReactiveFormsModule,
|
|
348
334
|
MatInputModule,
|
|
@@ -354,7 +340,7 @@ class EntrySearchFilterModule {
|
|
|
354
340
|
MatFormFieldModule,
|
|
355
341
|
EntryValidationModule] }); }
|
|
356
342
|
}
|
|
357
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
343
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntrySearchFilterModule, decorators: [{
|
|
358
344
|
type: NgModule,
|
|
359
345
|
args: [{
|
|
360
346
|
declarations: [
|