@enigmatry/entry-components 1.14.19-alpha.0.4 → 1.15.1-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 (41) hide show
  1. package/dialog/dialogs/alert/entry-alert-dialog.component.d.ts +1 -1
  2. package/dialog/dialogs/confirm/entry-confirm-dialog.component.d.ts +1 -1
  3. package/dialog/dialogs/entry-dialog.component.d.ts +1 -1
  4. package/dialog/entry-dialog-buttons-alignment.type.d.ts +1 -1
  5. package/esm2020/dialog/dialogs/alert/entry-alert-dialog.component.mjs +3 -3
  6. package/esm2020/dialog/dialogs/confirm/entry-confirm-dialog.component.mjs +3 -3
  7. package/esm2020/dialog/dialogs/entry-dialog.component.mjs +3 -3
  8. package/esm2020/dialog/entry-dialog.module.mjs +4 -4
  9. package/esm2020/dialog/entry-dialog.service.mjs +3 -3
  10. package/esm2020/header/entry-header.component.mjs +3 -3
  11. package/esm2020/header/entry-header.module.mjs +4 -4
  12. package/esm2020/search-filter/entry-search-filter.component.mjs +3 -3
  13. package/esm2020/search-filter/entry-search-filter.module.mjs +4 -4
  14. package/esm2020/search-filter/search-filter-input/search-filter-input.component.mjs +5 -5
  15. package/esm2020/toolbar/entry-toolbar.component.mjs +3 -3
  16. package/esm2020/toolbar/entry-toolbar.module.mjs +4 -4
  17. package/esm2020/validation/entry-display-control-validation.directive.mjs +3 -3
  18. package/esm2020/validation/entry-form-errors.component.mjs +4 -4
  19. package/esm2020/validation/entry-validation.module.mjs +4 -4
  20. package/fesm2015/enigmatry-entry-components-dialog.mjs +16 -16
  21. package/fesm2015/enigmatry-entry-components-header.mjs +7 -7
  22. package/fesm2015/enigmatry-entry-components-search-filter.mjs +12 -12
  23. package/fesm2015/enigmatry-entry-components-search-filter.mjs.map +1 -1
  24. package/fesm2015/enigmatry-entry-components-toolbar.mjs +7 -7
  25. package/fesm2015/enigmatry-entry-components-validation.mjs +11 -11
  26. package/fesm2015/enigmatry-entry-components-validation.mjs.map +1 -1
  27. package/fesm2020/enigmatry-entry-components-dialog.mjs +16 -16
  28. package/fesm2020/enigmatry-entry-components-header.mjs +7 -7
  29. package/fesm2020/enigmatry-entry-components-search-filter.mjs +12 -12
  30. package/fesm2020/enigmatry-entry-components-search-filter.mjs.map +1 -1
  31. package/fesm2020/enigmatry-entry-components-toolbar.mjs +7 -7
  32. package/fesm2020/enigmatry-entry-components-validation.mjs +11 -11
  33. package/fesm2020/enigmatry-entry-components-validation.mjs.map +1 -1
  34. package/header/entry-header.component.d.ts +1 -1
  35. package/package.json +8 -8
  36. package/search-filter/entry-search-filter.component.d.ts +1 -1
  37. package/search-filter/search-filter-input/search-filter-input.component.d.ts +1 -1
  38. package/search-filter/search-filter-params.type.d.ts +1 -1
  39. package/toolbar/entry-toolbar.component.d.ts +1 -1
  40. package/validation/entry-display-control-validation.directive.d.ts +1 -1
  41. package/validation/entry-form-errors.component.d.ts +1 -1
@@ -4,9 +4,9 @@ import * as i2 from '@angular/forms';
4
4
  import { UntypedFormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
5
  import * as i1 from '@angular/common';
6
6
  import { CommonModule } from '@angular/common';
7
- import * as i3 from '@angular/material/form-field';
8
- import * as i4 from '@angular/material/input';
7
+ import * as i3 from '@angular/material/input';
9
8
  import { MatInputModule } from '@angular/material/input';
9
+ import * as i4 from '@angular/material/form-field';
10
10
  import * as i5 from '@angular/material/select';
11
11
  import { MatSelectModule } from '@angular/material/select';
12
12
  import * as i6 from '@angular/material/core';
@@ -37,9 +37,9 @@ class EntrySearchFilterInputComponent {
37
37
  this.controlType = ControlType;
38
38
  }
39
39
  }
40
- EntrySearchFilterInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntrySearchFilterInputComponent, deps: [{ token: ENTRY_SEARCH_FILTER_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
41
- EntrySearchFilterInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: EntrySearchFilterInputComponent, selector: "entry-search-filter-input", inputs: { searchFilter: "searchFilter", form: "form" }, ngImport: i0, template: "<mat-form-field [formGroup]=\"form\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n\n <div [ngSwitch]=\"searchFilter.controlType\">\n\n <input *ngSwitchCase=\"controlType.text\"\n [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\"\n [type]=\"searchFilter.type\" matInput [placeholder]=\"searchFilter.placeholder\" [maxlength]=\"searchFilter.maxLength\">\n\n <mat-select *ngSwitchCase=\"controlType.select\"\n [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\" [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\n </div>\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: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { 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: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.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: i5.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
42
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntrySearchFilterInputComponent, decorators: [{
40
+ EntrySearchFilterInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntrySearchFilterInputComponent, deps: [{ token: ENTRY_SEARCH_FILTER_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
41
+ EntrySearchFilterInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: EntrySearchFilterInputComponent, selector: "entry-search-filter-input", inputs: { searchFilter: "searchFilter", form: "form" }, ngImport: i0, template: "<mat-form-field [formGroup]=\"form\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n\n <div [ngSwitch]=\"searchFilter.controlType\">\n\n <input *ngSwitchCase=\"controlType.text\"\n [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\"\n [type]=\"searchFilter.type\" matInput [placeholder]=\"searchFilter.placeholder\" [maxlength]=\"searchFilter.maxLength\">\n\n <mat-select *ngSwitchCase=\"controlType.select\"\n [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\" [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\n </div>\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: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { 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 });
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntrySearchFilterInputComponent, decorators: [{
43
43
  type: Component,
44
44
  args: [{ selector: 'entry-search-filter-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field [formGroup]=\"form\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n\n <div [ngSwitch]=\"searchFilter.controlType\">\n\n <input *ngSwitchCase=\"controlType.text\"\n [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\"\n [type]=\"searchFilter.type\" matInput [placeholder]=\"searchFilter.placeholder\" [maxlength]=\"searchFilter.maxLength\">\n\n <mat-select *ngSwitchCase=\"controlType.select\"\n [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\" [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\n </div>\n</mat-form-field>" }]
45
45
  }], ctorParameters: function () { return [{ type: EntrySearchFilterConfig, decorators: [{
@@ -81,9 +81,9 @@ class EntrySearchFilterComponent {
81
81
  return new UntypedFormGroup(group);
82
82
  }
83
83
  }
84
- EntrySearchFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntrySearchFilterComponent, deps: [{ token: ENTRY_SEARCH_FILTER_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
85
- EntrySearchFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: EntrySearchFilterComponent, selector: "entry-search-filter", inputs: { searchFilters: "searchFilters" }, outputs: { searchFilterChange: "searchFilterChange" }, ngImport: i0, template: "<div class=\"search-form-container\">\r\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"searchFilterForm\">\r\n <div class=\"search-form-fields\">\r\n <div *ngFor=\"let searchFilter of searchFilters\" class=\"search-form-field\">\r\n <entry-search-filter-input [searchFilter]=\"searchFilter\" [form]=\"searchFilterForm\">\r\n </entry-search-filter-input>\r\n </div>\r\n <div>\r\n <button type=\"button\" class=\"mat-raised-button mat-accent\" type=\"submit\">\r\n {{config.applyButtonText}}\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n</div>", styles: [".search-form-fields{display:flex;align-items:flex-start}.search-form-fields .search-form-field{width:200px}\n"], 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: EntrySearchFilterInputComponent, selector: "entry-search-filter-input", inputs: ["searchFilter", "form"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntrySearchFilterComponent, decorators: [{
84
+ EntrySearchFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntrySearchFilterComponent, deps: [{ token: ENTRY_SEARCH_FILTER_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
85
+ EntrySearchFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: EntrySearchFilterComponent, selector: "entry-search-filter", inputs: { searchFilters: "searchFilters" }, outputs: { searchFilterChange: "searchFilterChange" }, ngImport: i0, template: "<div class=\"search-form-container\">\r\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"searchFilterForm\">\r\n <div class=\"search-form-fields\">\r\n <div *ngFor=\"let searchFilter of searchFilters\" class=\"search-form-field\">\r\n <entry-search-filter-input [searchFilter]=\"searchFilter\" [form]=\"searchFilterForm\">\r\n </entry-search-filter-input>\r\n </div>\r\n <div>\r\n <button type=\"button\" class=\"mat-raised-button mat-accent\" type=\"submit\">\r\n {{config.applyButtonText}}\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n</div>", styles: [".search-form-fields{display:flex;align-items:flex-start}.search-form-fields .search-form-field{width:200px}\n"], 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: EntrySearchFilterInputComponent, selector: "entry-search-filter-input", inputs: ["searchFilter", "form"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
86
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntrySearchFilterComponent, decorators: [{
87
87
  type: Component,
88
88
  args: [{ selector: 'entry-search-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"search-form-container\">\r\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"searchFilterForm\">\r\n <div class=\"search-form-fields\">\r\n <div *ngFor=\"let searchFilter of searchFilters\" class=\"search-form-field\">\r\n <entry-search-filter-input [searchFilter]=\"searchFilter\" [form]=\"searchFilterForm\">\r\n </entry-search-filter-input>\r\n </div>\r\n <div>\r\n <button type=\"button\" class=\"mat-raised-button mat-accent\" type=\"submit\">\r\n {{config.applyButtonText}}\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n</div>", styles: [".search-form-fields{display:flex;align-items:flex-start}.search-form-fields .search-form-field{width:200px}\n"] }]
89
89
  }], ctorParameters: function () { return [{ type: EntrySearchFilterConfig, decorators: [{
@@ -164,21 +164,21 @@ class SelectFilterOption {
164
164
 
165
165
  class EntrySearchFilterModule {
166
166
  }
167
- EntrySearchFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntrySearchFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
168
- EntrySearchFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: EntrySearchFilterModule, declarations: [EntrySearchFilterComponent,
167
+ EntrySearchFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntrySearchFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
168
+ EntrySearchFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: EntrySearchFilterModule, declarations: [EntrySearchFilterComponent,
169
169
  EntrySearchFilterInputComponent], imports: [CommonModule,
170
170
  FormsModule,
171
171
  ReactiveFormsModule,
172
172
  MatInputModule,
173
173
  MatButtonModule,
174
174
  MatSelectModule], exports: [EntrySearchFilterComponent] });
175
- EntrySearchFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntrySearchFilterModule, imports: [CommonModule,
175
+ EntrySearchFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntrySearchFilterModule, imports: [CommonModule,
176
176
  FormsModule,
177
177
  ReactiveFormsModule,
178
178
  MatInputModule,
179
179
  MatButtonModule,
180
180
  MatSelectModule] });
181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntrySearchFilterModule, decorators: [{
181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntrySearchFilterModule, decorators: [{
182
182
  type: NgModule,
183
183
  args: [{
184
184
  declarations: [
@@ -1 +1 @@
1
- {"version":3,"file":"enigmatry-entry-components-search-filter.mjs","sources":["../../../../libs/entry-components/search-filter/search-filter-config.model.ts","../../../../libs/entry-components/search-filter/search-filter-input/control-type.model.ts","../../../../libs/entry-components/search-filter/search-filter-input/search-filter-input.component.ts","../../../../libs/entry-components/search-filter/search-filter-input/search-filter-input.component.html","../../../../libs/entry-components/search-filter/entry-search-filter.component.ts","../../../../libs/entry-components/search-filter/entry-search-filter.component.html","../../../../libs/entry-components/search-filter/search-filter-input/search-filter-base.model.ts","../../../../libs/entry-components/search-filter/search-filter-input/inputs/text-search-filter.model.ts","../../../../libs/entry-components/search-filter/search-filter-input/inputs/select-search-filter.model.ts","../../../../libs/entry-components/search-filter/search-filter-input/inputs/select-filter-option.model.ts","../../../../libs/entry-components/search-filter/entry-search-filter.module.ts","../../../../libs/entry-components/search-filter/enigmatry-entry-components-search-filter.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/**\n * Used to provide default configurations on module level.\n */\nexport class EntrySearchFilterConfig {\n /** Apply search filters button label (default 'Apply') */\n applyButtonText: string;\n /** Label for 'none selected' select filter option */\n noneSelectedOptionText: string;\n\n constructor(config: Partial<EntrySearchFilterConfig> = {}) {\n this.applyButtonText = config.applyButtonText ?? 'Apply';\n this.noneSelectedOptionText = config.noneSelectedOptionText ?? 'None';\n }\n}\nexport const ENTRY_SEARCH_FILTER_CONFIG = new InjectionToken<EntrySearchFilterConfig>(\n 'EntrySearchFilterConfig',\n {\n providedIn: 'root',\n factory: () => new EntrySearchFilterConfig()\n }\n);\n","export class ControlType {\n static text = 'text-input';\n static select = 'select-input';\n}\n","import { ChangeDetectionStrategy, Component, Inject, Input } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\nimport { ControlType } from './control-type.model';\nimport { ENTRY_SEARCH_FILTER_CONFIG, EntrySearchFilterConfig } from '../search-filter-config.model';\nimport { SearchFilterBase } from './search-filter-base.model';\n\n@Component({\n selector: 'entry-search-filter-input',\n templateUrl: './search-filter-input.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class EntrySearchFilterInputComponent<T> {\n /** Configuration of the search filters inputs that will be displayed in the search-filter component. */\n @Input() searchFilter: SearchFilterBase<T>;\n /** Form group to which the search-filter input component will be added. */\n @Input() form: UntypedFormGroup;\n\n controlType = ControlType;\n\n constructor(@Inject(ENTRY_SEARCH_FILTER_CONFIG) public config: EntrySearchFilterConfig) { }\n}\n","<mat-form-field [formGroup]=\"form\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n\n <div [ngSwitch]=\"searchFilter.controlType\">\n\n <input *ngSwitchCase=\"controlType.text\"\n [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\"\n [type]=\"searchFilter.type\" matInput [placeholder]=\"searchFilter.placeholder\" [maxlength]=\"searchFilter.maxLength\">\n\n <mat-select *ngSwitchCase=\"controlType.select\"\n [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\" [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\n </div>\n</mat-form-field>","import { ChangeDetectionStrategy, Component, EventEmitter, Inject, Input, OnInit, Output } from '@angular/core';\r\nimport { UntypedFormGroup } from '@angular/forms';\r\nimport { SearchFilterParams } from './search-filter-params.type';\r\nimport { ENTRY_SEARCH_FILTER_CONFIG, EntrySearchFilterConfig } from './search-filter-config.model';\r\nimport { SearchFilterBase } from './search-filter-input/search-filter-base.model';\r\n\r\n/**\r\n * Entry SearchFilter component.\r\n */\r\n@Component({\r\n selector: 'entry-search-filter',\r\n templateUrl: './entry-search-filter.component.html',\r\n styleUrls: ['./entry-search-filter.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class EntrySearchFilterComponent implements OnInit {\r\n\r\n /** Configuration of the search filters inputs that will be displayed in the search-filter component. */\r\n @Input() searchFilters: SearchFilterBase<any>[] = [];\r\n /**\r\n * Emits the change in SearchFilterParams so the containing component can apply them and retrieve the filtered results.\r\n */\r\n @Output() searchFilterChange = new EventEmitter<SearchFilterParams>();\r\n\r\n searchFilterForm!: UntypedFormGroup;\r\n\r\n constructor(@Inject(ENTRY_SEARCH_FILTER_CONFIG) public config: EntrySearchFilterConfig) { }\r\n\r\n ngOnInit() {\r\n this.searchFilterForm = this.toFormGroup(this.searchFilters);\r\n }\r\n\r\n onSubmit() {\r\n const formValue = this.searchFilterForm.value;\r\n this.searchFilterChange.emit(formValue);\r\n }\r\n\r\n toFormGroup(searchFilters: SearchFilterBase<any>[]) {\r\n const group: any = {};\r\n searchFilters.forEach(searchFilter => {\r\n const formControl = searchFilter.toFormControl();\r\n group[searchFilter.key] = formControl;\r\n searchFilter.formControl = formControl;\r\n });\r\n return new UntypedFormGroup(group);\r\n }\r\n}\r\n\r\n","<div class=\"search-form-container\">\r\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"searchFilterForm\">\r\n <div class=\"search-form-fields\">\r\n <div *ngFor=\"let searchFilter of searchFilters\" class=\"search-form-field\">\r\n <entry-search-filter-input [searchFilter]=\"searchFilter\" [form]=\"searchFilterForm\">\r\n </entry-search-filter-input>\r\n </div>\r\n <div>\r\n <button type=\"button\" class=\"mat-raised-button mat-accent\" type=\"submit\">\r\n {{config.applyButtonText}}\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n</div>","import { FormControl } from '@angular/forms';\n\n/**\n * Base Entry search filter input component.\n */\nexport class SearchFilterBase<T> {\n /** Unique search-filter input key */\n key: string;\n /** Default value to be displayed/selected in the input control */\n value: T | undefined;\n /** Label text to be displayed for the search-filter input control */\n label: string;\n /** Placeholder text for search-filter input control */\n placeholder: string;\n /** Type of input control e.g. 'email' */\n type: string;\n /** Control type to be overridden in implementing class, used to render the proper input type e.g. 'text-input' */\n controlType: string;\n /** Max text length to be entered in the input component (default is 256) */\n maxLength: number;\n /** A reference to the form control it represents */\n formControl: FormControl<T>;\n\n constructor(options: Partial<SearchFilterBase<T>> = {}) {\n this.value = options.value;\n this.key = options.key || '';\n this.label = options.label || '';\n this.placeholder = options.placeholder || '';\n this.controlType = options.controlType || '';\n this.type = options.type || '';\n this.maxLength = options.maxLength || 256;\n }\n\n setValue(value: T | undefined) {\n this.value = value;\n if (this.formControl) {\n this.formControl.patchValue(value);\n }\n }\n\n toFormControl(): FormControl<T> {\n return new FormControl<T>(this.value);\n }\n}\n","import { ControlType } from '../control-type.model';\nimport { SearchFilterBase } from '../search-filter-base.model';\n\n/**\n * Search filter text input filed configuration.\n */\nexport class TextSearchFilter extends SearchFilterBase<string> {\n override controlType = ControlType.text;\n}\n","import { Observable } from 'rxjs';\nimport { ControlType } from '../control-type.model';\nimport { SearchFilterBase } from '../search-filter-base.model';\nimport { SelectFilterOption } from './select-filter-option.model';\n\n/**\n * Search filter select input field configuration. Select options can be provided as fixed list (`options`)\n * or observable (dynamic) list (`options$`).\n */\nexport class SelectSearchFilter<T> extends SearchFilterBase<T> {\n override controlType = ControlType.select;\n /** Fixed list of select filter options (default is empty list) */\n options: SelectFilterOption<T>[] = [];\n /** Observable (dynamic) list of select filter options */\n options$: Observable<SelectFilterOption<T>[]> | undefined;\n /**\n * Enables selection of multiple options (default is true).\n * If it is set to false, 'none selected' option becomes available as a first option.\n * */\n multiSelect = true;\n\n constructor(options: Partial<SelectSearchFilter<T>> = {}) {\n super(options);\n this.options = options.options;\n this.options$ = options.options$;\n this.multiSelect = options.multiSelect;\n }\n}\n","/** Model used to populate select filter options. */\nexport class SelectFilterOption<T> {\n constructor(\n /** Key used as a value for selected option */\n public key: T,\n /** String value used as display label of select option */\n public label: string) {}\n}\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatSelectModule } from '@angular/material/select';\r\n\r\nimport { EntrySearchFilterComponent } from './entry-search-filter.component';\r\nimport { EntrySearchFilterInputComponent } from './search-filter-input/search-filter-input.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n EntrySearchFilterComponent,\r\n EntrySearchFilterInputComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatInputModule,\r\n MatButtonModule,\r\n MatSelectModule\r\n ],\r\n exports: [\r\n EntrySearchFilterComponent\r\n ]\r\n})\r\nexport class EntrySearchFilterModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i3.EntrySearchFilterInputComponent"],"mappings":";;;;;;;;;;;;;;AAEA;;AAEG;MACU,uBAAuB,CAAA;AAMhC,IAAA,WAAA,CAAY,SAA2C,EAAE,EAAA;QACrD,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,IAAI,OAAO,CAAC;QACzD,IAAI,CAAC,sBAAsB,GAAG,MAAM,CAAC,sBAAsB,IAAI,MAAM,CAAC;KACzE;AACJ,CAAA;MACY,0BAA0B,GAAG,IAAI,cAAc,CACxD,yBAAyB,EACzB;AACI,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,IAAI,uBAAuB,EAAE;AAC/C,CAAA;;MCrBQ,WAAW,CAAA;;AACb,WAAI,CAAA,IAAA,GAAG,YAAY,CAAC;AACpB,WAAM,CAAA,MAAA,GAAG,cAAc;;MCSrB,+BAA+B,CAAA;AAQ1C,IAAA,WAAA,CAAuD,MAA+B,EAAA;QAA/B,IAAM,CAAA,M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vB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAvB,uBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,iBAfhC,0BAA0B;AAC1B,QAAA,+BAA+B,aAG/B,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,cAAc;QACd,eAAe;AACf,QAAA,eAAe,aAGf,0BAA0B,CAAA,EAAA,CAAA,CAAA;AAGjB,uBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YAXhC,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,cAAc;QACd,eAAe;QACf,eAAe,CAAA,EAAA,CAAA,CAAA;2FAMN,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAjBnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,0BAA0B;wBAC1B,+BAA+B;AAChC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,cAAc;wBACd,eAAe;wBACf,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,0BAA0B;AAC3B,qBAAA;AACF,iBAAA,CAAA;;;AC1BD;;AAEG;;;;"}
1
+ {"version":3,"file":"enigmatry-entry-components-search-filter.mjs","sources":["../../../../libs/entry-components/search-filter/search-filter-config.model.ts","../../../../libs/entry-components/search-filter/search-filter-input/control-type.model.ts","../../../../libs/entry-components/search-filter/search-filter-input/search-filter-input.component.ts","../../../../libs/entry-components/search-filter/search-filter-input/search-filter-input.component.html","../../../../libs/entry-components/search-filter/entry-search-filter.component.ts","../../../../libs/entry-components/search-filter/entry-search-filter.component.html","../../../../libs/entry-components/search-filter/search-filter-input/search-filter-base.model.ts","../../../../libs/entry-components/search-filter/search-filter-input/inputs/text-search-filter.model.ts","../../../../libs/entry-components/search-filter/search-filter-input/inputs/select-search-filter.model.ts","../../../../libs/entry-components/search-filter/search-filter-input/inputs/select-filter-option.model.ts","../../../../libs/entry-components/search-filter/entry-search-filter.module.ts","../../../../libs/entry-components/search-filter/enigmatry-entry-components-search-filter.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/**\n * Used to provide default configurations on module level.\n */\nexport class EntrySearchFilterConfig {\n /** Apply search filters button label (default 'Apply') */\n applyButtonText: string;\n /** Label for 'none selected' select filter option */\n noneSelectedOptionText: string;\n\n constructor(config: Partial<EntrySearchFilterConfig> = {}) {\n this.applyButtonText = config.applyButtonText ?? 'Apply';\n this.noneSelectedOptionText = config.noneSelectedOptionText ?? 'None';\n }\n}\nexport const ENTRY_SEARCH_FILTER_CONFIG = new InjectionToken<EntrySearchFilterConfig>(\n 'EntrySearchFilterConfig',\n {\n providedIn: 'root',\n factory: () => new EntrySearchFilterConfig()\n }\n);\n","export class ControlType {\n static text = 'text-input';\n static select = 'select-input';\n}\n","import { ChangeDetectionStrategy, Component, Inject, Input } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\nimport { ControlType } from './control-type.model';\nimport { ENTRY_SEARCH_FILTER_CONFIG, EntrySearchFilterConfig } from '../search-filter-config.model';\nimport { SearchFilterBase } from './search-filter-base.model';\n\n@Component({\n selector: 'entry-search-filter-input',\n templateUrl: './search-filter-input.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class EntrySearchFilterInputComponent<T> {\n /** Configuration of the search filters inputs that will be displayed in the search-filter component. */\n @Input() searchFilter: SearchFilterBase<T>;\n /** Form group to which the search-filter input component will be added. */\n @Input() form: UntypedFormGroup;\n\n controlType = ControlType;\n\n constructor(@Inject(ENTRY_SEARCH_FILTER_CONFIG) public config: EntrySearchFilterConfig) { }\n}\n","<mat-form-field [formGroup]=\"form\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n\n <div [ngSwitch]=\"searchFilter.controlType\">\n\n <input *ngSwitchCase=\"controlType.text\"\n [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\"\n [type]=\"searchFilter.type\" matInput [placeholder]=\"searchFilter.placeholder\" [maxlength]=\"searchFilter.maxLength\">\n\n <mat-select *ngSwitchCase=\"controlType.select\"\n [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\" [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\n </div>\n</mat-form-field>","import { ChangeDetectionStrategy, Component, EventEmitter, Inject, Input, OnInit, Output } from '@angular/core';\r\nimport { UntypedFormGroup } from '@angular/forms';\r\nimport { SearchFilterParams } from './search-filter-params.type';\r\nimport { ENTRY_SEARCH_FILTER_CONFIG, EntrySearchFilterConfig } from './search-filter-config.model';\r\nimport { SearchFilterBase } from './search-filter-input/search-filter-base.model';\r\n\r\n/**\r\n * Entry SearchFilter component.\r\n */\r\n@Component({\r\n selector: 'entry-search-filter',\r\n templateUrl: './entry-search-filter.component.html',\r\n styleUrls: ['./entry-search-filter.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class EntrySearchFilterComponent implements OnInit {\r\n\r\n /** Configuration of the search filters inputs that will be displayed in the search-filter component. */\r\n @Input() searchFilters: SearchFilterBase<any>[] = [];\r\n /**\r\n * Emits the change in SearchFilterParams so the containing component can apply them and retrieve the filtered results.\r\n */\r\n @Output() searchFilterChange = new EventEmitter<SearchFilterParams>();\r\n\r\n searchFilterForm!: UntypedFormGroup;\r\n\r\n constructor(@Inject(ENTRY_SEARCH_FILTER_CONFIG) public config: EntrySearchFilterConfig) { }\r\n\r\n ngOnInit() {\r\n this.searchFilterForm = this.toFormGroup(this.searchFilters);\r\n }\r\n\r\n onSubmit() {\r\n const formValue = this.searchFilterForm.value;\r\n this.searchFilterChange.emit(formValue);\r\n }\r\n\r\n toFormGroup(searchFilters: SearchFilterBase<any>[]) {\r\n const group: any = {};\r\n searchFilters.forEach(searchFilter => {\r\n const formControl = searchFilter.toFormControl();\r\n group[searchFilter.key] = formControl;\r\n searchFilter.formControl = formControl;\r\n });\r\n return new UntypedFormGroup(group);\r\n }\r\n}\r\n\r\n","<div class=\"search-form-container\">\r\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"searchFilterForm\">\r\n <div class=\"search-form-fields\">\r\n <div *ngFor=\"let searchFilter of searchFilters\" class=\"search-form-field\">\r\n <entry-search-filter-input [searchFilter]=\"searchFilter\" [form]=\"searchFilterForm\">\r\n </entry-search-filter-input>\r\n </div>\r\n <div>\r\n <button type=\"button\" class=\"mat-raised-button mat-accent\" type=\"submit\">\r\n {{config.applyButtonText}}\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n</div>","import { FormControl } from '@angular/forms';\n\n/**\n * Base Entry search filter input component.\n */\nexport class SearchFilterBase<T> {\n /** Unique search-filter input key */\n key: string;\n /** Default value to be displayed/selected in the input control */\n value: T | undefined;\n /** Label text to be displayed for the search-filter input control */\n label: string;\n /** Placeholder text for search-filter input control */\n placeholder: string;\n /** Type of input control e.g. 'email' */\n type: string;\n /** Control type to be overridden in implementing class, used to render the proper input type e.g. 'text-input' */\n controlType: string;\n /** Max text length to be entered in the input component (default is 256) */\n maxLength: number;\n /** A reference to the form control it represents */\n formControl: FormControl<T>;\n\n constructor(options: Partial<SearchFilterBase<T>> = {}) {\n this.value = options.value;\n this.key = options.key || '';\n this.label = options.label || '';\n this.placeholder = options.placeholder || '';\n this.controlType = options.controlType || '';\n this.type = options.type || '';\n this.maxLength = options.maxLength || 256;\n }\n\n setValue(value: T | undefined) {\n this.value = value;\n if (this.formControl) {\n this.formControl.patchValue(value);\n }\n }\n\n toFormControl(): FormControl<T> {\n return new FormControl<T>(this.value);\n }\n}\n","import { ControlType } from '../control-type.model';\nimport { SearchFilterBase } from '../search-filter-base.model';\n\n/**\n * Search filter text input filed configuration.\n */\nexport class TextSearchFilter extends SearchFilterBase<string> {\n override controlType = ControlType.text;\n}\n","import { Observable } from 'rxjs';\nimport { ControlType } from '../control-type.model';\nimport { SearchFilterBase } from '../search-filter-base.model';\nimport { SelectFilterOption } from './select-filter-option.model';\n\n/**\n * Search filter select input field configuration. Select options can be provided as fixed list (`options`)\n * or observable (dynamic) list (`options$`).\n */\nexport class SelectSearchFilter<T> extends SearchFilterBase<T> {\n override controlType = ControlType.select;\n /** Fixed list of select filter options (default is empty list) */\n options: SelectFilterOption<T>[] = [];\n /** Observable (dynamic) list of select filter options */\n options$: Observable<SelectFilterOption<T>[]> | undefined;\n /**\n * Enables selection of multiple options (default is true).\n * If it is set to false, 'none selected' option becomes available as a first option.\n * */\n multiSelect = true;\n\n constructor(options: Partial<SelectSearchFilter<T>> = {}) {\n super(options);\n this.options = options.options;\n this.options$ = options.options$;\n this.multiSelect = options.multiSelect;\n }\n}\n","/** Model used to populate select filter options. */\nexport class SelectFilterOption<T> {\n constructor(\n /** Key used as a value for selected option */\n public key: T,\n /** String value used as display label of select option */\n public label: string) {}\n}\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatSelectModule } from '@angular/material/select';\r\n\r\nimport { EntrySearchFilterComponent } from './entry-search-filter.component';\r\nimport { EntrySearchFilterInputComponent } from './search-filter-input/search-filter-input.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n EntrySearchFilterComponent,\r\n EntrySearchFilterInputComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatInputModule,\r\n MatButtonModule,\r\n MatSelectModule\r\n ],\r\n exports: [\r\n EntrySearchFilterComponent\r\n ]\r\n})\r\nexport class EntrySearchFilterModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i3.EntrySearchFilterInputComponent"],"mappings":";;;;;;;;;;;;;;AAEA;;AAEG;MACU,uBAAuB,CAAA;AAMhC,IAAA,WAAA,CAAY,SAA2C,EAAE,EAAA;QACrD,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,IAAI,OAAO,CAAC;QACzD,IAAI,CAAC,sBAAsB,GAAG,MAAM,CAAC,sBAAsB,IAAI,MAAM,CAAC;KACzE;AACJ,CAAA;MACY,0BAA0B,GAAG,IAAI,cAAc,CACxD,yBAAyB,EACzB;AACI,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,IAAI,uBAAuB,EAAE;AAC/C,CAAA;;MCrBQ,WAAW,CAAA;;AACb,WAAI,CAAA,IAAA,GAAG,YAAY,CAAC;AACpB,WAAM,CAAA,MAAA,GAAG,cAAc;;MCSrB,+BAA+B,CAAA;AAQ1C,IAAA,WAAA,CAAuD,MAA+B,EAAA;QAA/B,IAAM,CAAA,MAAA,GAAN,MAAM,CAAyB;QAFtF,IAAW,CAAA,WAAA,GAAG,WAAW,CAAC;KAEiE;;AARhF,+BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,kBAQtB,0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QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,iBAfhC,0BAA0B;AAC1B,QAAA,+BAA+B,aAG/B,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,cAAc;QACd,eAAe;AACf,QAAA,eAAe,aAGf,0BAA0B,CAAA,EAAA,CAAA,CAAA;AAGjB,uBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YAXhC,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,cAAc;QACd,eAAe;QACf,eAAe,CAAA,EAAA,CAAA,CAAA;2FAMN,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAjBnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,0BAA0B;wBAC1B,+BAA+B;AAChC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,cAAc;wBACd,eAAe;wBACf,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,0BAA0B;AAC3B,qBAAA;AACF,iBAAA,CAAA;;;AC1BD;;AAEG;;;;"}
@@ -28,9 +28,9 @@ class EntryToolbarComponent {
28
28
  this.menuOpened = false;
29
29
  }
30
30
  }
31
- EntryToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntryToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
32
- EntryToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: EntryToolbarComponent, selector: "entry-toolbar", inputs: { title: "title", titleUri: "titleUri", titleLogoSrc: "titleLogoSrc", hideTitle: "hideTitle" }, ngImport: i0, template: "<header class=\"entry-toolbar\">\n <nav class=\"entry-toolbar-nav\">\n <div class=\"entry-toolbar-data\">\n <div class=\"entry-toolbar-logo\">\n <a *ngIf=\"!hideTitle\" [href]=\"titleUri\">\n <span *ngIf=\"!titleLogoSrc\">{{title}}</span>\n <img *ngIf=\"titleLogoSrc\" [src]=\"titleLogoSrc\"/>\n </a>\n </div>\n\n <div class=\"entry-toolbar-nav-toggle\"\n (click)=\"menuOpened = !menuOpened\"\n [ngClass]=\"{'show-toolbar-icon': menuOpened === true}\">\n <i class=\"nav-toggle-menu\">\n <span class=\"icon-menu\"></span>\n </i>\n <i class=\"nav-toggle-close\">\n <span class=\"icon-close\"></span>\n </i>\n </div>\n </div>\n <span class=\"entry-toolbar-content\"\n [ngClass]=\"{'show-toolbar-content': menuOpened === true}\">\n <ng-content></ng-content>\n </span>\n </nav>\n</header>", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntryToolbarComponent, decorators: [{
31
+ EntryToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
32
+ EntryToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: EntryToolbarComponent, selector: "entry-toolbar", inputs: { title: "title", titleUri: "titleUri", titleLogoSrc: "titleLogoSrc", hideTitle: "hideTitle" }, ngImport: i0, template: "<header class=\"entry-toolbar\">\n <nav class=\"entry-toolbar-nav\">\n <div class=\"entry-toolbar-data\">\n <div class=\"entry-toolbar-logo\">\n <a *ngIf=\"!hideTitle\" [href]=\"titleUri\">\n <span *ngIf=\"!titleLogoSrc\">{{title}}</span>\n <img *ngIf=\"titleLogoSrc\" [src]=\"titleLogoSrc\"/>\n </a>\n </div>\n\n <div class=\"entry-toolbar-nav-toggle\"\n (click)=\"menuOpened = !menuOpened\"\n [ngClass]=\"{'show-toolbar-icon': menuOpened === true}\">\n <i class=\"nav-toggle-menu\">\n <span class=\"icon-menu\"></span>\n </i>\n <i class=\"nav-toggle-close\">\n <span class=\"icon-close\"></span>\n </i>\n </div>\n </div>\n <span class=\"entry-toolbar-content\"\n [ngClass]=\"{'show-toolbar-content': menuOpened === true}\">\n <ng-content></ng-content>\n </span>\n </nav>\n</header>", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryToolbarComponent, decorators: [{
34
34
  type: Component,
35
35
  args: [{ selector: 'entry-toolbar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header class=\"entry-toolbar\">\n <nav class=\"entry-toolbar-nav\">\n <div class=\"entry-toolbar-data\">\n <div class=\"entry-toolbar-logo\">\n <a *ngIf=\"!hideTitle\" [href]=\"titleUri\">\n <span *ngIf=\"!titleLogoSrc\">{{title}}</span>\n <img *ngIf=\"titleLogoSrc\" [src]=\"titleLogoSrc\"/>\n </a>\n </div>\n\n <div class=\"entry-toolbar-nav-toggle\"\n (click)=\"menuOpened = !menuOpened\"\n [ngClass]=\"{'show-toolbar-icon': menuOpened === true}\">\n <i class=\"nav-toggle-menu\">\n <span class=\"icon-menu\"></span>\n </i>\n <i class=\"nav-toggle-close\">\n <span class=\"icon-close\"></span>\n </i>\n </div>\n </div>\n <span class=\"entry-toolbar-content\"\n [ngClass]=\"{'show-toolbar-content': menuOpened === true}\">\n <ng-content></ng-content>\n </span>\n </nav>\n</header>" }]
36
36
  }], propDecorators: { title: [{
@@ -45,10 +45,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
45
45
 
46
46
  class EntryToolbarModule {
47
47
  }
48
- EntryToolbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntryToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
49
- EntryToolbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: EntryToolbarModule, declarations: [EntryToolbarComponent], imports: [CommonModule], exports: [EntryToolbarComponent] });
50
- EntryToolbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntryToolbarModule, imports: [CommonModule] });
51
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntryToolbarModule, decorators: [{
48
+ EntryToolbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
49
+ EntryToolbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: EntryToolbarModule, declarations: [EntryToolbarComponent], imports: [CommonModule], exports: [EntryToolbarComponent] });
50
+ EntryToolbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryToolbarModule, imports: [CommonModule] });
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryToolbarModule, decorators: [{
52
52
  type: NgModule,
53
53
  args: [{
54
54
  declarations: [
@@ -18,13 +18,13 @@ import { MatInputModule } from '@angular/material/input';
18
18
  */
19
19
  class EntryFormErrorsComponent {
20
20
  }
21
- EntryFormErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntryFormErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
22
- EntryFormErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: EntryFormErrorsComponent, selector: "entry-form-errors", inputs: { form: "form" }, ngImport: i0, template: `
21
+ EntryFormErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryFormErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
22
+ EntryFormErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: EntryFormErrorsComponent, selector: "entry-form-errors", inputs: { form: "form" }, ngImport: i0, template: `
23
23
  <div *ngIf="form.errors">
24
24
  <mat-error *ngFor="let error of form.errors.general">{{error}}</mat-error>
25
25
  </div>
26
- `, isInline: true, 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.MatError, selector: "mat-error", inputs: ["id"] }], changeDetection: i0.ChangeDetectionStrategy.Default });
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntryFormErrorsComponent, decorators: [{
26
+ `, isInline: true, 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.MatError, selector: "mat-error, [matError]", inputs: ["id"] }], changeDetection: i0.ChangeDetectionStrategy.Default });
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryFormErrorsComponent, decorators: [{
28
28
  type: Component,
29
29
  args: [{
30
30
  selector: 'entry-form-errors',
@@ -152,9 +152,9 @@ class EntryDisplayControlValidationDirective {
152
152
  return [errorsString, serverErrorsString].filter(x => x !== '').join(', ');
153
153
  }
154
154
  }
155
- EntryDisplayControlValidationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntryDisplayControlValidationDirective, deps: [{ token: ENTRY_VALIDATION_CONFIG }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
156
- EntryDisplayControlValidationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: EntryDisplayControlValidationDirective, selector: "[entryDisplayControlValidation]", inputs: { control: "control" }, ngImport: i0 });
157
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntryDisplayControlValidationDirective, decorators: [{
155
+ EntryDisplayControlValidationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryDisplayControlValidationDirective, deps: [{ token: ENTRY_VALIDATION_CONFIG }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
156
+ EntryDisplayControlValidationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: EntryDisplayControlValidationDirective, selector: "[entryDisplayControlValidation]", inputs: { control: "control" }, ngImport: i0 });
157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryDisplayControlValidationDirective, decorators: [{
158
158
  type: Directive,
159
159
  args: [{
160
160
  selector: '[entryDisplayControlValidation]'
@@ -168,18 +168,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
168
168
 
169
169
  class EntryValidationModule {
170
170
  }
171
- EntryValidationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntryValidationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
172
- EntryValidationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: EntryValidationModule, declarations: [EntryFormErrorsComponent,
171
+ EntryValidationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryValidationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
172
+ EntryValidationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: EntryValidationModule, declarations: [EntryFormErrorsComponent,
173
173
  EntryDisplayControlValidationDirective], imports: [CommonModule,
174
174
  FormsModule,
175
175
  ReactiveFormsModule,
176
176
  MatInputModule], exports: [EntryFormErrorsComponent,
177
177
  EntryDisplayControlValidationDirective] });
178
- EntryValidationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntryValidationModule, imports: [CommonModule,
178
+ EntryValidationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryValidationModule, imports: [CommonModule,
179
179
  FormsModule,
180
180
  ReactiveFormsModule,
181
181
  MatInputModule] });
182
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EntryValidationModule, decorators: [{
182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryValidationModule, decorators: [{
183
183
  type: NgModule,
184
184
  args: [{
185
185
  declarations: [
@@ -1 +1 @@
1
- {"version":3,"file":"enigmatry-entry-components-validation.mjs","sources":["../../../../libs/entry-components/validation/entry-form-errors.component.ts","../../../../libs/entry-components/validation/entry-validation-config.model.ts","../../../../libs/entry-components/validation/entry-validation.ts","../../../../libs/entry-components/validation/entry-display-control-validation.directive.ts","../../../../libs/entry-components/validation/entry-validation.module.ts","../../../../libs/entry-components/validation/enigmatry-entry-components-validation.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\n\n/**\n * A component used to display generic (form level) server side validation messages.\n * The messages are displayed as a list, each message in a new row.\n *\n * @example\n * ```html\n * <entry-form-errors [form]=\"myForm\">\n * </entry-form-errors>\n * ```\n */\n@Component({\n selector: 'entry-form-errors',\n template: `\n <div *ngIf=\"form.errors\">\n <mat-error *ngFor=\"let error of form.errors.general\">{{error}}</mat-error>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.Default\n})\nexport class EntryFormErrorsComponent {\n /** A form group for which the validation errors are being displayed. */\n @Input() form: UntypedFormGroup;\n}\n","import { InjectionToken } from '@angular/core';\nimport { AbstractControl } from '@angular/forms';\n\n/** Used to configure mapping between validation keys and messages */\nexport interface IEntryValidationMessage {\n /** Validation key (e.g. '_required_', '_minlength_', '_email_', etc.) */\n name: string;\n /**\n * Validation message. Can be static string or expression returning string\n * (when messages need to be resolved dynamically: parametrization, localization, etc.).\n */\n message: string | ((control: AbstractControl) => string);\n}\n\n/**\n * Used to provide default configurations on module level.\n */\nexport class EntryValidationConfig {\n /**\n * Validation key to message configuration on module level. Used to configure client side validation messages\n * for standard validators (_required_, _minLength_, _email_, etc.).\n *\n * **NOTE:** If using _Formly_ package to render forms, this configuration should not be used.\n * Instead, use `FormlyModule` to configure validation messages.\n *\n * @example\n * ```ts\n * new EntryValidationConfig() {\n * validationMessages: [\n * { name: 'required': message: 'This field is mandatory' },\n * { name: 'minlength', message: (control: AbstractControl) => `Minimal length is ${control.errors.minlength.requiredLength}`}\n * ]\n * }\n * ```\n */\n validationMessages: IEntryValidationMessage[];\n\n constructor(config: Partial<EntryValidationConfig> = {}) {\n this.validationMessages = config.validationMessages ?? [];\n }\n}\n\n/**\n * Entry validation injection token of EntryValidationConfig type containing validation default configurations.\n * Can be updated with custom configuration.\n *\n * Defaults:\n * - validationMessages: []\n */\nexport const ENTRY_VALIDATION_CONFIG = new InjectionToken<EntryValidationConfig>(\n 'EntryValidationConfig',\n {\n providedIn: 'root',\n factory: () => new EntryValidationConfig()\n }\n);\n","import { AbstractControl, FormArray, FormGroup, UntypedFormGroup, ValidationErrors } from '@angular/forms';\nimport { IValidationProblemDetails } from './validation-problem-details.interface';\n\n/** A key used to map server side validation errors on form level */\nconst FORM_ERROR_KEY = 'general';\n/** A key used to map server side validation errors on form field level */\nconst FORM_FIELD_ERROR_KEY = 'fromServer';\n\nconst getFormControl = (formControl: AbstractControl | null | undefined, keys: string[]): AbstractControl | null | undefined => {\n if (keys.length === 0) {\n return formControl;\n }\n if (formControl instanceof FormGroup) {\n return getFormControl(formControl.controls[keys[0].charAt(0).toLowerCase() + keys[0].slice(1)], keys.slice(1));\n }\n if (formControl instanceof FormArray && +keys[0] >= 0) {\n return getFormControl(formControl.controls[+keys[0]], keys.slice(1));\n }\n return null;\n};\n\n/**\n * Applies validation errors received from server side to the form.\n * The errors are applied to multiple levels: form, form group, form array, and form field.\n *\n * @param error Server side validation errors response.\n * @param form Form to apply validation errors to.\n */\nconst setServerSideValidationErrors = (error: IValidationProblemDetails, form: UntypedFormGroup) => {\n form.setErrors(null);\n const validationErrors = error?.errors;\n const formErrors: ValidationErrors = {};\n\n if (validationErrors) {\n // eslint-disable-next-line guard-for-in\n for (const key in validationErrors) {\n const control = getFormControl(form, key.split(/[.[\\]]+/gu));\n\n if (control) {\n const fieldErrors = {} as ValidationErrors;\n fieldErrors[FORM_FIELD_ERROR_KEY] = validationErrors[key];\n control.setErrors(fieldErrors);\n control.markAsTouched();\n } else {\n formErrors[FORM_ERROR_KEY] =\n formErrors[FORM_ERROR_KEY]?.concat(validationErrors[key]) || validationErrors[key];\n }\n }\n } else {\n formErrors[FORM_ERROR_KEY] = [`An error occurred on the server.`];\n }\n\n form.setErrors(formErrors);\n};\n\nexport {\n FORM_FIELD_ERROR_KEY,\n setServerSideValidationErrors\n};\n","import { Directive, ElementRef, Inject, Input, OnDestroy, OnInit } from '@angular/core';\nimport { ENTRY_VALIDATION_CONFIG, EntryValidationConfig } from './entry-validation-config.model';\nimport { AbstractControl, FormControlStatus } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { FORM_FIELD_ERROR_KEY } from './entry-validation';\n\n/**\n * A directive that displays configured validation messages or server side validations for given form control.\n * The messages are separated with coma(,) and displayed as _innerHTML_ value of host component.\n *\n * @example\n * ```html\n * <div entryDisplayControlValidation [control]=\"myForm.controls.firstName\">\n * </div\n * ```\n */\n@Directive({\n selector: '[entryDisplayControlValidation]'\n})\nexport class EntryDisplayControlValidationDirective implements OnInit, OnDestroy {\n /** Form control for which the validation messages are displayed for. */\n @Input() control: AbstractControl;\n\n private _controlSubscription: Subscription | undefined;\n\n constructor(\n @Inject(ENTRY_VALIDATION_CONFIG) private readonly _config: EntryValidationConfig,\n private readonly _element: ElementRef) {}\n\n ngOnInit(): void {\n this._controlSubscription = this.control.statusChanges\n .subscribe((controlStatus: FormControlStatus) => {\n if (controlStatus === 'INVALID') {\n this._element.nativeElement.innerText = this.extractValidationMessages();\n }\n });\n }\n\n ngOnDestroy(): void {\n if (this._controlSubscription) {\n this._controlSubscription.unsubscribe();\n }\n }\n\n private extractValidationMessages(): string {\n if (!this.control.errors) {\n return '';\n }\n const errorsString = this._config.validationMessages\n .map(validationMessage => this.control.errors[validationMessage.name]\n ? typeof(validationMessage.message) === 'string'\n ? validationMessage.message : validationMessage.message(this.control)\n : ''\n )\n .filter(message => message !== '')\n .join(', ');\n\n const serverErrors = this.control.errors[FORM_FIELD_ERROR_KEY];\n const serverErrorsString = serverErrors instanceof Array ? serverErrors.join(', ') : '';\n\n return [errorsString, serverErrorsString].filter(x => x !== '').join(', ');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EntryFormErrorsComponent } from './entry-form-errors.component';\nimport { MatInputModule } from '@angular/material/input';\nimport { EntryDisplayControlValidationDirective } from './entry-display-control-validation.directive';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [\n EntryFormErrorsComponent,\n EntryDisplayControlValidationDirective\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n MatInputModule\n ],\n exports: [\n EntryFormErrorsComponent,\n EntryDisplayControlValidationDirective\n ]\n})\nexport class EntryValidationModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAGA;;;;;;;;;AASG;MAUU,wBAAwB,CAAA;;qHAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxB,wBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,EAPzB,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,cAAA,EAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,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A,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,iBAd9B,wBAAwB;AACxB,QAAA,sCAAsC,aAGtC,YAAY;QACZ,WAAW;QACX,mBAAmB;AACnB,QAAA,cAAc,aAGd,wBAAwB;QACxB,sCAAsC,CAAA,EAAA,CAAA,CAAA;AAG7B,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAV9B,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,cAAc,CAAA,EAAA,CAAA,CAAA;2FAOL,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAhBjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,wBAAwB;wBACxB,sCAAsC;AACvC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,cAAc;AACf,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,wBAAwB;wBACxB,sCAAsC;AACvC,qBAAA;AACF,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
1
+ {"version":3,"file":"enigmatry-entry-components-validation.mjs","sources":["../../../../libs/entry-components/validation/entry-form-errors.component.ts","../../../../libs/entry-components/validation/entry-validation-config.model.ts","../../../../libs/entry-components/validation/entry-validation.ts","../../../../libs/entry-components/validation/entry-display-control-validation.directive.ts","../../../../libs/entry-components/validation/entry-validation.module.ts","../../../../libs/entry-components/validation/enigmatry-entry-components-validation.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\n\n/**\n * A component used to display generic (form level) server side validation messages.\n * The messages are displayed as a list, each message in a new row.\n *\n * @example\n * ```html\n * <entry-form-errors [form]=\"myForm\">\n * </entry-form-errors>\n * ```\n */\n@Component({\n selector: 'entry-form-errors',\n template: `\n <div *ngIf=\"form.errors\">\n <mat-error *ngFor=\"let error of form.errors.general\">{{error}}</mat-error>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.Default\n})\nexport class EntryFormErrorsComponent {\n /** A form group for which the validation errors are being displayed. */\n @Input() form: UntypedFormGroup;\n}\n","import { InjectionToken } from '@angular/core';\nimport { AbstractControl } from '@angular/forms';\n\n/** Used to configure mapping between validation keys and messages */\nexport interface IEntryValidationMessage {\n /** Validation key (e.g. '_required_', '_minlength_', '_email_', etc.) */\n name: string;\n /**\n * Validation message. Can be static string or expression returning string\n * (when messages need to be resolved dynamically: parametrization, localization, etc.).\n */\n message: string | ((control: AbstractControl) => string);\n}\n\n/**\n * Used to provide default configurations on module level.\n */\nexport class EntryValidationConfig {\n /**\n * Validation key to message configuration on module level. Used to configure client side validation messages\n * for standard validators (_required_, _minLength_, _email_, etc.).\n *\n * **NOTE:** If using _Formly_ package to render forms, this configuration should not be used.\n * Instead, use `FormlyModule` to configure validation messages.\n *\n * @example\n * ```ts\n * new EntryValidationConfig() {\n * validationMessages: [\n * { name: 'required': message: 'This field is mandatory' },\n * { name: 'minlength', message: (control: AbstractControl) => `Minimal length is ${control.errors.minlength.requiredLength}`}\n * ]\n * }\n * ```\n */\n validationMessages: IEntryValidationMessage[];\n\n constructor(config: Partial<EntryValidationConfig> = {}) {\n this.validationMessages = config.validationMessages ?? [];\n }\n}\n\n/**\n * Entry validation injection token of EntryValidationConfig type containing validation default configurations.\n * Can be updated with custom configuration.\n *\n * Defaults:\n * - validationMessages: []\n */\nexport const ENTRY_VALIDATION_CONFIG = new InjectionToken<EntryValidationConfig>(\n 'EntryValidationConfig',\n {\n providedIn: 'root',\n factory: () => new EntryValidationConfig()\n }\n);\n","import { AbstractControl, FormArray, FormGroup, UntypedFormGroup, ValidationErrors } from '@angular/forms';\nimport { IValidationProblemDetails } from './validation-problem-details.interface';\n\n/** A key used to map server side validation errors on form level */\nconst FORM_ERROR_KEY = 'general';\n/** A key used to map server side validation errors on form field level */\nconst FORM_FIELD_ERROR_KEY = 'fromServer';\n\nconst getFormControl = (formControl: AbstractControl | null | undefined, keys: string[]): AbstractControl | null | undefined => {\n if (keys.length === 0) {\n return formControl;\n }\n if (formControl instanceof FormGroup) {\n return getFormControl(formControl.controls[keys[0].charAt(0).toLowerCase() + keys[0].slice(1)], keys.slice(1));\n }\n if (formControl instanceof FormArray && +keys[0] >= 0) {\n return getFormControl(formControl.controls[+keys[0]], keys.slice(1));\n }\n return null;\n};\n\n/**\n * Applies validation errors received from server side to the form.\n * The errors are applied to multiple levels: form, form group, form array, and form field.\n *\n * @param error Server side validation errors response.\n * @param form Form to apply validation errors to.\n */\nconst setServerSideValidationErrors = (error: IValidationProblemDetails, form: UntypedFormGroup) => {\n form.setErrors(null);\n const validationErrors = error?.errors;\n const formErrors: ValidationErrors = {};\n\n if (validationErrors) {\n // eslint-disable-next-line guard-for-in\n for (const key in validationErrors) {\n const control = getFormControl(form, key.split(/[.[\\]]+/gu));\n\n if (control) {\n const fieldErrors = {} as ValidationErrors;\n fieldErrors[FORM_FIELD_ERROR_KEY] = validationErrors[key];\n control.setErrors(fieldErrors);\n control.markAsTouched();\n } else {\n formErrors[FORM_ERROR_KEY] =\n formErrors[FORM_ERROR_KEY]?.concat(validationErrors[key]) || validationErrors[key];\n }\n }\n } else {\n formErrors[FORM_ERROR_KEY] = [`An error occurred on the server.`];\n }\n\n form.setErrors(formErrors);\n};\n\nexport {\n FORM_FIELD_ERROR_KEY,\n setServerSideValidationErrors\n};\n","import { Directive, ElementRef, Inject, Input, OnDestroy, OnInit } from '@angular/core';\nimport { ENTRY_VALIDATION_CONFIG, EntryValidationConfig } from './entry-validation-config.model';\nimport { AbstractControl, FormControlStatus } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { FORM_FIELD_ERROR_KEY } from './entry-validation';\n\n/**\n * A directive that displays configured validation messages or server side validations for given form control.\n * The messages are separated with coma(,) and displayed as _innerHTML_ value of host component.\n *\n * @example\n * ```html\n * <div entryDisplayControlValidation [control]=\"myForm.controls.firstName\">\n * </div\n * ```\n */\n@Directive({\n selector: '[entryDisplayControlValidation]'\n})\nexport class EntryDisplayControlValidationDirective implements OnInit, OnDestroy {\n /** Form control for which the validation messages are displayed for. */\n @Input() control: AbstractControl;\n\n private _controlSubscription: Subscription | undefined;\n\n constructor(\n @Inject(ENTRY_VALIDATION_CONFIG) private readonly _config: EntryValidationConfig,\n private readonly _element: ElementRef) {}\n\n ngOnInit(): void {\n this._controlSubscription = this.control.statusChanges\n .subscribe((controlStatus: FormControlStatus) => {\n if (controlStatus === 'INVALID') {\n this._element.nativeElement.innerText = this.extractValidationMessages();\n }\n });\n }\n\n ngOnDestroy(): void {\n if (this._controlSubscription) {\n this._controlSubscription.unsubscribe();\n }\n }\n\n private extractValidationMessages(): string {\n if (!this.control.errors) {\n return '';\n }\n const errorsString = this._config.validationMessages\n .map(validationMessage => this.control.errors[validationMessage.name]\n ? typeof(validationMessage.message) === 'string'\n ? validationMessage.message : validationMessage.message(this.control)\n : ''\n )\n .filter(message => message !== '')\n .join(', ');\n\n const serverErrors = this.control.errors[FORM_FIELD_ERROR_KEY];\n const serverErrorsString = serverErrors instanceof Array ? serverErrors.join(', ') : '';\n\n return [errorsString, serverErrorsString].filter(x => x !== '').join(', ');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EntryFormErrorsComponent } from './entry-form-errors.component';\nimport { MatInputModule } from '@angular/material/input';\nimport { EntryDisplayControlValidationDirective } from './entry-display-control-validation.directive';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [\n EntryFormErrorsComponent,\n EntryDisplayControlValidationDirective\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n MatInputModule\n ],\n exports: [\n EntryFormErrorsComponent,\n EntryDisplayControlValidationDirective\n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,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAV9B,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,cAAc,CAAA,EAAA,CAAA,CAAA;2FAOL,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAhBjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,wBAAwB;wBACxB,sCAAsC;AACvC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,cAAc;AACf,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,wBAAwB;wBACxB,sCAAsC;AACvC,qBAAA;AACF,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
@@ -2,5 +2,5 @@ import * as i0 from "@angular/core";
2
2
  export declare class EntryHeaderComponent {
3
3
  title: string;
4
4
  static ɵfac: i0.ɵɵFactoryDeclaration<EntryHeaderComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<EntryHeaderComponent, "entry-header", never, { "title": "title"; }, {}, never, ["[buttons]", "[content]"], false>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<EntryHeaderComponent, "entry-header", never, { "title": "title"; }, {}, never, ["[buttons]", "[content]"], false, never>;
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enigmatry/entry-components",
3
- "version": "1.14.19-alpha.0.4",
3
+ "version": "1.15.1-preview.2",
4
4
  "author": "Enigmatry",
5
5
  "description": "Enigmatry entry angular material components",
6
6
  "homepage": "https://github.com/enigmatry/entry-angular-building-blocks/tree/master/libs/entry-components#readme",
@@ -10,13 +10,13 @@
10
10
  },
11
11
  "license": "Apache-2.0",
12
12
  "peerDependencies": {
13
- "@angular/animations": "^14.0.0",
14
- "@angular/cdk": "^14.0.0",
15
- "@angular/common": "^14.0.0",
16
- "@angular/core": "^14.0.0",
17
- "@angular/material": "^14.0.0",
18
- "@angular/forms": "^14.0.0",
19
- "@angular/platform-browser": "^14.0.0"
13
+ "@angular/animations": "^15.0.0",
14
+ "@angular/cdk": "^15.0.0",
15
+ "@angular/common": "^15.0.0",
16
+ "@angular/core": "^15.0.0",
17
+ "@angular/material": "^15.0.0",
18
+ "@angular/forms": "^15.0.0",
19
+ "@angular/platform-browser": "^15.0.0"
20
20
  },
21
21
  "dependencies": {
22
22
  "tslib": "^2.3.0"
@@ -21,5 +21,5 @@ export declare class EntrySearchFilterComponent implements OnInit {
21
21
  onSubmit(): void;
22
22
  toFormGroup(searchFilters: SearchFilterBase<any>[]): UntypedFormGroup;
23
23
  static ɵfac: i0.ɵɵFactoryDeclaration<EntrySearchFilterComponent, never>;
24
- static ɵcmp: i0.ɵɵComponentDeclaration<EntrySearchFilterComponent, "entry-search-filter", never, { "searchFilters": "searchFilters"; }, { "searchFilterChange": "searchFilterChange"; }, never, never, false>;
24
+ static ɵcmp: i0.ɵɵComponentDeclaration<EntrySearchFilterComponent, "entry-search-filter", never, { "searchFilters": "searchFilters"; }, { "searchFilterChange": "searchFilterChange"; }, never, never, false, never>;
25
25
  }
@@ -12,5 +12,5 @@ export declare class EntrySearchFilterInputComponent<T> {
12
12
  controlType: typeof ControlType;
13
13
  constructor(config: EntrySearchFilterConfig);
14
14
  static ɵfac: i0.ɵɵFactoryDeclaration<EntrySearchFilterInputComponent<any>, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<EntrySearchFilterInputComponent<any>, "entry-search-filter-input", never, { "searchFilter": "searchFilter"; "form": "form"; }, {}, never, never, false>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<EntrySearchFilterInputComponent<any>, "entry-search-filter-input", never, { "searchFilter": "searchFilter"; "form": "form"; }, {}, never, never, false, never>;
16
16
  }
@@ -2,6 +2,6 @@
2
2
  * SearchFilterParams are the same type as @angular/router type Params,
3
3
  * containing a collection of query URL parameters for easy integration.
4
4
  */
5
- export declare type SearchFilterParams = {
5
+ export type SearchFilterParams = {
6
6
  [key: string]: any;
7
7
  };
@@ -24,5 +24,5 @@ export declare class EntryToolbarComponent {
24
24
  hideTitle: boolean;
25
25
  menuOpened: boolean;
26
26
  static ɵfac: i0.ɵɵFactoryDeclaration<EntryToolbarComponent, never>;
27
- static ɵcmp: i0.ɵɵComponentDeclaration<EntryToolbarComponent, "entry-toolbar", never, { "title": "title"; "titleUri": "titleUri"; "titleLogoSrc": "titleLogoSrc"; "hideTitle": "hideTitle"; }, {}, never, ["*"], false>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<EntryToolbarComponent, "entry-toolbar", never, { "title": "title"; "titleUri": "titleUri"; "titleLogoSrc": "titleLogoSrc"; "hideTitle": "hideTitle"; }, {}, never, ["*"], false, never>;
28
28
  }
@@ -23,5 +23,5 @@ export declare class EntryDisplayControlValidationDirective implements OnInit, O
23
23
  ngOnDestroy(): void;
24
24
  private extractValidationMessages;
25
25
  static ɵfac: i0.ɵɵFactoryDeclaration<EntryDisplayControlValidationDirective, never>;
26
- static ɵdir: i0.ɵɵDirectiveDeclaration<EntryDisplayControlValidationDirective, "[entryDisplayControlValidation]", never, { "control": "control"; }, {}, never, never, false>;
26
+ static ɵdir: i0.ɵɵDirectiveDeclaration<EntryDisplayControlValidationDirective, "[entryDisplayControlValidation]", never, { "control": "control"; }, {}, never, never, false, never>;
27
27
  }
@@ -14,5 +14,5 @@ export declare class EntryFormErrorsComponent {
14
14
  /** A form group for which the validation errors are being displayed. */
15
15
  form: UntypedFormGroup;
16
16
  static ɵfac: i0.ɵɵFactoryDeclaration<EntryFormErrorsComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<EntryFormErrorsComponent, "entry-form-errors", never, { "form": "form"; }, {}, never, never, false>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<EntryFormErrorsComponent, "entry-form-errors", never, { "form": "form"; }, {}, never, never, false, never>;
18
18
  }