@recursyve/nice-data-filter-kit 14.2.3 → 14.3.1

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 (76) hide show
  1. package/esm2020/lib/components/base-list/store/base-list.service.mjs +1 -1
  2. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/advanced-filters-trigger.directive.mjs +83 -0
  3. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.component.mjs +83 -0
  4. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.constant.mjs +3 -0
  5. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.form.mjs +127 -0
  6. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.module.mjs +146 -0
  7. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/button/advanced-filters-button.component.mjs +42 -0
  8. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/filter-selection/filter-selection.component.mjs +49 -0
  9. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/models/icons.model.mjs +24 -0
  10. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/providers/async-typeahead.provider.mjs +32 -0
  11. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/public-api.mjs +6 -0
  12. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/rule/components/date/date-filter.component.mjs +40 -0
  13. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/rule/components/filter.component.mjs +29 -0
  14. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/rule/components/number/number-filter.component.mjs +28 -0
  15. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/rule/components/radio/radio-filter.component.mjs +30 -0
  16. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/rule/components/select/select-filter.component.mjs +56 -0
  17. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/rule/components/text/text-filter.component.mjs +31 -0
  18. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/rule/rule.component.mjs +71 -0
  19. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/utils/advanced-filters.utils.mjs +83 -0
  20. package/esm2020/lib/components/nice-filter-view/components/export-buttons/export-buttons.component.mjs +10 -7
  21. package/esm2020/lib/components/nice-filter-view/directives/mat-sort.mjs +4 -1
  22. package/esm2020/lib/components/nice-filter-view/directives/query-params.directive.mjs +17 -10
  23. package/esm2020/lib/components/nice-filter-view/nice-base-filter-view.component.mjs +46 -12
  24. package/esm2020/lib/components/nice-filter-view/pipes/filter-group-icon.pipe.mjs +32 -0
  25. package/esm2020/lib/components/nice-filter-view/public-api.mjs +2 -1
  26. package/esm2020/lib/components/nice-filter-view/store/nice-filter-view.query.mjs +7 -1
  27. package/esm2020/lib/components/nice-filter-view/store/nice-filter-view.service.mjs +11 -1
  28. package/esm2020/lib/components/nice-filter-view/store/nice-filter-view.store.mjs +5 -1
  29. package/esm2020/lib/components/query-builder/pipes/filter-group-icon.pipe.mjs +9 -4
  30. package/esm2020/lib/directive/selectable-list/providers/selectable-list-content.service.mjs +11 -1
  31. package/esm2020/lib/directive/selectable-list/selectable-list-checkbox.directive.mjs +17 -3
  32. package/esm2020/lib/directive/selectable-list/selectable-list.directive.mjs +55 -12
  33. package/esm2020/lib/directive/selectable-list/store/selectable-list-state.service.mjs +45 -16
  34. package/esm2020/lib/directive/selectable-list/store/selectable-list.service.mjs +10 -6
  35. package/fesm2015/recursyve-nice-data-filter-kit.mjs +1195 -214
  36. package/fesm2015/recursyve-nice-data-filter-kit.mjs.map +1 -1
  37. package/fesm2020/recursyve-nice-data-filter-kit.mjs +1190 -213
  38. package/fesm2020/recursyve-nice-data-filter-kit.mjs.map +1 -1
  39. package/lib/components/base-list/store/base-list.service.d.ts +1 -1
  40. package/lib/components/nice-filter-view/components/advanced-filters/advanced-filters-trigger.directive.d.ts +27 -0
  41. package/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.component.d.ts +27 -0
  42. package/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.constant.d.ts +2 -0
  43. package/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.form.d.ts +20 -0
  44. package/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.module.d.ts +41 -0
  45. package/lib/components/nice-filter-view/components/advanced-filters/button/advanced-filters-button.component.d.ts +17 -0
  46. package/lib/components/nice-filter-view/components/advanced-filters/filter-selection/filter-selection.component.d.ts +16 -0
  47. package/lib/components/nice-filter-view/components/advanced-filters/models/icons.model.d.ts +11 -0
  48. package/lib/components/nice-filter-view/components/advanced-filters/providers/async-typeahead.provider.d.ts +18 -0
  49. package/lib/components/nice-filter-view/components/advanced-filters/public-api.d.ts +5 -0
  50. package/lib/components/nice-filter-view/components/advanced-filters/rule/components/date/date-filter.component.d.ts +9 -0
  51. package/lib/components/nice-filter-view/components/advanced-filters/rule/components/filter.component.d.ts +13 -0
  52. package/lib/components/nice-filter-view/components/advanced-filters/rule/components/number/number-filter.component.d.ts +6 -0
  53. package/lib/components/nice-filter-view/components/advanced-filters/rule/components/radio/radio-filter.component.d.ts +8 -0
  54. package/lib/components/nice-filter-view/components/advanced-filters/rule/components/select/select-filter.component.d.ts +14 -0
  55. package/lib/components/nice-filter-view/components/advanced-filters/rule/components/text/text-filter.component.d.ts +8 -0
  56. package/lib/components/nice-filter-view/components/advanced-filters/rule/rule.component.d.ts +26 -0
  57. package/lib/components/nice-filter-view/components/advanced-filters/utils/advanced-filters.utils.d.ts +11 -0
  58. package/lib/components/nice-filter-view/components/export-buttons/export-buttons.component.d.ts +2 -1
  59. package/lib/components/nice-filter-view/directives/query-params.directive.d.ts +2 -1
  60. package/lib/components/nice-filter-view/nice-base-filter-view.component.d.ts +7 -0
  61. package/lib/components/nice-filter-view/pipes/filter-group-icon.pipe.d.ts +11 -0
  62. package/lib/components/nice-filter-view/public-api.d.ts +1 -0
  63. package/lib/components/nice-filter-view/store/nice-filter-view.query.d.ts +2 -0
  64. package/lib/components/nice-filter-view/store/nice-filter-view.service.d.ts +1 -0
  65. package/lib/components/nice-filter-view/store/nice-filter-view.store.d.ts +1 -0
  66. package/lib/components/query-builder/pipes/filter-group-icon.pipe.d.ts +3 -3
  67. package/lib/directive/selectable-list/providers/selectable-list-content.service.d.ts +5 -0
  68. package/lib/directive/selectable-list/selectable-list-checkbox.directive.d.ts +4 -2
  69. package/lib/directive/selectable-list/selectable-list.directive.d.ts +13 -4
  70. package/lib/directive/selectable-list/store/selectable-list-state.service.d.ts +12 -2
  71. package/lib/directive/selectable-list/store/selectable-list.service.d.ts +5 -2
  72. package/package.json +1 -1
  73. package/src/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.theme.scss +25 -0
  74. package/src/lib/components/nice-filter-view/components/advanced-filters/filter-selection/filter-selection.theme.scss +29 -0
  75. package/src/lib/components/nice-filter-view/components/advanced-filters/rule/rule.theme.scss +96 -0
  76. package/src/lib/nice-data-filter.theme.scss +2 -0
@@ -1,24 +1,24 @@
1
1
  import { plainToInstance } from 'class-transformer';
2
2
  import { map, takeUntil, debounceTime, switchMap, distinctUntilChanged } from 'rxjs/operators';
3
3
  import { HttpParams } from '@angular/common/http';
4
- import * as i5$1 from '@recursyve/nice-ui-kit.v2';
5
- import { isNullOrUndefined, ObjectUtils, FileUtils, ArrayUtils, ExportBottomSheetComponent, NiceLoadingSpinnerModule, NiceTypeaheadModule, NiceExportBottomSheetModule } from '@recursyve/nice-ui-kit.v2';
4
+ import * as i5 from '@recursyve/nice-ui-kit.v2';
5
+ import { isNullOrUndefined, ObjectUtils, FileUtils, ArrayUtils, ExportBottomSheetComponent, NiceLoadingSpinnerModule, NiceTypeaheadModule, NiceExportBottomSheetModule, NiceAsyncTypeaheadProvider, NICE_ASYNC_TYPEAHEAD_PROVIDER, NiceAsyncTypeaheadModule } from '@recursyve/nice-ui-kit.v2';
6
6
  import * as i0 from '@angular/core';
7
7
  import { Directive, Input, NgModule, Injectable, Inject, InjectionToken, Optional, Pipe, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, HostListener, forwardRef, TemplateRef, ContentChild, ContentChildren, ViewChild, QueryList } from '@angular/core';
8
8
  import { Store, StoreConfig, Query, arrayAdd, arrayUpsert, arrayRemove, EntityStore, QueryEntity, EntityActions } from '@datorama/akita';
9
- import { combineLatest, Subject, firstValueFrom, of, tap } from 'rxjs';
9
+ import { combineLatest, Subject, firstValueFrom, of, lastValueFrom, startWith, tap, distinct, take } from 'rxjs';
10
10
  import { __decorate, __metadata, __awaiter, __rest } from 'tslib';
11
11
  import * as i2 from '@angular/router';
12
12
  import { RouterModule } from '@angular/router';
13
- import * as i3$3 from '@angular/material/bottom-sheet';
13
+ import * as i3$4 from '@angular/material/bottom-sheet';
14
14
  import { MatBottomSheetModule } from '@angular/material/bottom-sheet';
15
- import * as i6 from '@angular/common';
15
+ import * as i2$1 from '@angular/common';
16
16
  import { CommonModule, AsyncPipe, NgIf, NgTemplateOutlet } from '@angular/common';
17
17
  import * as i1$1 from '@angular/forms';
18
- import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
18
+ import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
19
19
  import * as i8 from '@angular/material/button';
20
20
  import { MatButtonModule } from '@angular/material/button';
21
- import * as i5 from '@angular/material/icon';
21
+ import * as i4$1 from '@angular/material/icon';
22
22
  import { MatIconModule } from '@angular/material/icon';
23
23
  import * as i10 from '@angular/material/tooltip';
24
24
  import { MatTooltipModule } from '@angular/material/tooltip';
@@ -31,30 +31,33 @@ import { MatTableModule } from '@angular/material/table';
31
31
  import * as i14 from '@angular/material/sort';
32
32
  import { MatSortModule } from '@angular/material/sort';
33
33
  import * as i4 from '@angular/material/core';
34
- import { NativeDateAdapter, MAT_DATE_LOCALE, MatRippleModule, DateAdapter } from '@angular/material/core';
34
+ import { NativeDateAdapter, MAT_DATE_LOCALE, MatRippleModule, DateAdapter, MatOptionModule } from '@angular/material/core';
35
35
  import * as i1$3 from '@recursyve/ngx-form-generator';
36
- import { Control, Required, Array as Array$1, GeneratedFormGroup, ngxFormGeneratorFactory } from '@recursyve/ngx-form-generator';
36
+ import { Control, Required, Array as Array$1, GeneratedFormGroup, ngxFormGeneratorFactory, AddValidatorIf, NgxFormGeneratorProvider } from '@recursyve/ngx-form-generator';
37
37
  import { ComponentPortal } from '@angular/cdk/portal';
38
38
  import * as i3 from '@angular/material/list';
39
39
  import { MatListModule } from '@angular/material/list';
40
40
  import * as i1 from '@angular/cdk/overlay';
41
41
  import { OverlayModule } from '@angular/cdk/overlay';
42
- import * as i2$1 from '@angular/cdk/platform';
43
- import * as i2$2 from '@angular/material/form-field';
44
- import * as i6$1 from '@angular/material/select';
42
+ import * as i2$2 from '@angular/cdk/platform';
43
+ import * as i3$1 from '@angular/material/form-field';
44
+ import { MatFormFieldModule } from '@angular/material/form-field';
45
+ import * as i6 from '@angular/material/select';
45
46
  import { MatSelectModule } from '@angular/material/select';
46
- import * as i3$1 from '@angular/material/input';
47
+ import * as i3$2 from '@angular/material/input';
47
48
  import { MatInputModule } from '@angular/material/input';
48
- import * as i4$1 from 'ngx-mask';
49
+ import * as i4$2 from 'ngx-mask';
49
50
  import { NgxMaskModule } from 'ngx-mask';
50
- import * as i3$2 from '@angular/material/radio';
51
+ import * as i3$3 from '@angular/material/radio';
51
52
  import { MatRadioModule } from '@angular/material/radio';
52
- import * as i5$2 from '@angular/material/datepicker';
53
+ import * as i5$1 from '@angular/material/datepicker';
53
54
  import { MatDatepickerModule } from '@angular/material/datepicker';
54
55
  import * as i1$2 from '@ngx-translate/core';
55
56
  import { TranslateModule } from '@ngx-translate/core';
56
57
  import * as i18 from '@angular/material/badge';
57
58
  import { MatBadgeModule } from '@angular/material/badge';
59
+ import * as i8$1 from '@angular/material/button-toggle';
60
+ import { MatButtonToggleModule } from '@angular/material/button-toggle';
58
61
  import * as i1$4 from '@angular/material/checkbox';
59
62
 
60
63
  class QueryParamsUtils {
@@ -1376,6 +1379,9 @@ class FilterGroupIconPipe {
1376
1379
  this.service = service;
1377
1380
  }
1378
1381
  transform(value) {
1382
+ if (!this.service) {
1383
+ return null;
1384
+ }
1379
1385
  const icon = this.service.getFilterGroupIconClass(value);
1380
1386
  if (typeof icon === "string") {
1381
1387
  return {
@@ -1385,14 +1391,18 @@ class FilterGroupIconPipe {
1385
1391
  return icon;
1386
1392
  }
1387
1393
  }
1388
- FilterGroupIconPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FilterGroupIconPipe, deps: [{ token: NiceFilterGroupService }], target: i0.ɵɵFactoryTarget.Pipe });
1394
+ FilterGroupIconPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FilterGroupIconPipe, deps: [{ token: NiceFilterGroupService, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
1389
1395
  FilterGroupIconPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.3", ngImport: i0, type: FilterGroupIconPipe, name: "filterGroupIcon" });
1390
1396
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FilterGroupIconPipe, decorators: [{
1391
1397
  type: Pipe,
1392
1398
  args: [{
1393
1399
  name: "filterGroupIcon"
1394
1400
  }]
1395
- }], ctorParameters: function () { return [{ type: NiceFilterGroupService }]; } });
1401
+ }], ctorParameters: function () {
1402
+ return [{ type: NiceFilterGroupService, decorators: [{
1403
+ type: Optional
1404
+ }] }];
1405
+ } });
1396
1406
 
1397
1407
  class FilterSelectionComponent {
1398
1408
  constructor() {
@@ -1414,7 +1424,7 @@ class FilterSelectionComponent {
1414
1424
  }
1415
1425
  }
1416
1426
  FilterSelectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FilterSelectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1417
- FilterSelectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: FilterSelectionComponent, selector: "nice-filter-selection", inputs: { filterConfigs: "filterConfigs", loading: "loading" }, outputs: { filterSelected: "filterSelected" }, ngImport: i0, template: "<mat-card class=\"flex flex-row flex-wrap filter-selection-container\" [niceLoadingOverlay]=\"loading\">\n <mat-list class=\"flex flex-col flex-full\" [class.double-groups]=\"filterGroups.length > 1\" *ngFor=\"let group of filterGroups\">\n <mat-list-item *ngIf=\"group[0].key | filterGroupIcon as icon\">\n <i mat-list-icon class=\"text-accent fal\" [ngClass]=\"icon.class\" *ngIf=\"icon.class\"></i>\n <mat-icon mat-list-icon class=\"text-accent\" [svgIcon]=\"icon.svgIcon\" *ngIf=\"icon.svgIcon\"></mat-icon>\n <mat-icon mat-list-icon class=\"text-accent\" *ngIf=\"icon.matIcon\">{{ icon.matIcon }}</mat-icon>\n <strong mat-line>{{ group[0].name }}</strong>\n </mat-list-item>\n <mat-list-item (click)=\"selectFilter(filter)\" mat-ripple class=\"filter\" *ngFor=\"let filter of group[1]\">\n {{ filter?.name }}\n </mat-list-item>\n </mat-list>\n</mat-card>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i11.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "component", type: i3.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { kind: "component", type: i3.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { kind: "directive", type: i4.MatLine, selector: "[mat-line], [matLine]" }, { kind: "directive", type: i3.MatListIconCssMatStyler, selector: "[mat-list-icon], [matListIcon]" }, { kind: "directive", type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5$1.NiceLoadingDirective, selector: "[niceLoadingOverlay]", inputs: ["niceLoadingOverlay"] }, { kind: "pipe", type: FilterGroupIconPipe, name: "filterGroupIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1427
+ FilterSelectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: FilterSelectionComponent, selector: "nice-filter-selection", inputs: { filterConfigs: "filterConfigs", loading: "loading" }, outputs: { filterSelected: "filterSelected" }, ngImport: i0, template: "<mat-card class=\"flex flex-row flex-wrap filter-selection-container\" [niceLoadingOverlay]=\"loading\">\n <mat-list class=\"flex flex-col flex-full\" [class.double-groups]=\"filterGroups.length > 1\" *ngFor=\"let group of filterGroups\">\n <mat-list-item *ngIf=\"group[0].key | filterGroupIcon as icon\">\n <i mat-list-icon class=\"text-accent fal\" [ngClass]=\"icon.class\" *ngIf=\"icon.class\"></i>\n <mat-icon mat-list-icon class=\"text-accent\" [svgIcon]=\"icon.svgIcon\" *ngIf=\"icon.svgIcon\"></mat-icon>\n <mat-icon mat-list-icon class=\"text-accent\" *ngIf=\"icon.matIcon\">{{ icon.matIcon }}</mat-icon>\n <strong mat-line>{{ group[0].name }}</strong>\n </mat-list-item>\n <mat-list-item (click)=\"selectFilter(filter)\" mat-ripple class=\"filter\" *ngFor=\"let filter of group[1]\">\n {{ filter?.name }}\n </mat-list-item>\n </mat-list>\n</mat-card>\n", dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i11.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "component", type: i3.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { kind: "component", type: i3.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { kind: "directive", type: i4.MatLine, selector: "[mat-line], [matLine]" }, { kind: "directive", type: i3.MatListIconCssMatStyler, selector: "[mat-list-icon], [matListIcon]" }, { kind: "directive", type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.NiceLoadingDirective, selector: "[niceLoadingOverlay]", inputs: ["niceLoadingOverlay"] }, { kind: "pipe", type: FilterGroupIconPipe, name: "filterGroupIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1418
1428
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FilterSelectionComponent, decorators: [{
1419
1429
  type: Component,
1420
1430
  args: [{ selector: "nice-filter-selection", encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-card class=\"flex flex-row flex-wrap filter-selection-container\" [niceLoadingOverlay]=\"loading\">\n <mat-list class=\"flex flex-col flex-full\" [class.double-groups]=\"filterGroups.length > 1\" *ngFor=\"let group of filterGroups\">\n <mat-list-item *ngIf=\"group[0].key | filterGroupIcon as icon\">\n <i mat-list-icon class=\"text-accent fal\" [ngClass]=\"icon.class\" *ngIf=\"icon.class\"></i>\n <mat-icon mat-list-icon class=\"text-accent\" [svgIcon]=\"icon.svgIcon\" *ngIf=\"icon.svgIcon\"></mat-icon>\n <mat-icon mat-list-icon class=\"text-accent\" *ngIf=\"icon.matIcon\">{{ icon.matIcon }}</mat-icon>\n <strong mat-line>{{ group[0].name }}</strong>\n </mat-list-item>\n <mat-list-item (click)=\"selectFilter(filter)\" mat-ripple class=\"filter\" *ngFor=\"let filter of group[1]\">\n {{ filter?.name }}\n </mat-list-item>\n </mat-list>\n</mat-card>\n" }]
@@ -1481,12 +1491,12 @@ class QueryBuilderTriggerDirective {
1481
1491
  return this.platform.ANDROID || this.platform.IOS;
1482
1492
  }
1483
1493
  }
1484
- QueryBuilderTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: QueryBuilderTriggerDirective, deps: [{ token: i1.OverlayPositionBuilder }, { token: i0.ElementRef }, { token: i1.Overlay }, { token: i2$1.Platform }], target: i0.ɵɵFactoryTarget.Directive });
1494
+ QueryBuilderTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: QueryBuilderTriggerDirective, deps: [{ token: i1.OverlayPositionBuilder }, { token: i0.ElementRef }, { token: i1.Overlay }, { token: i2$2.Platform }], target: i0.ɵɵFactoryTarget.Directive });
1485
1495
  QueryBuilderTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: QueryBuilderTriggerDirective, selector: "[niceQueryBuilderTrigger]", inputs: { queryBuilderFilters: "queryBuilderFilters", queryBuilderFiltersLoading: "queryBuilderFiltersLoading" }, outputs: { queryBuilderFilterSelected: "queryBuilderFilterSelected" }, host: { listeners: { "click": "click()" } }, ngImport: i0 });
1486
1496
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: QueryBuilderTriggerDirective, decorators: [{
1487
1497
  type: Directive,
1488
1498
  args: [{ selector: "[niceQueryBuilderTrigger]" }]
1489
- }], ctorParameters: function () { return [{ type: i1.OverlayPositionBuilder }, { type: i0.ElementRef }, { type: i1.Overlay }, { type: i2$1.Platform }]; }, propDecorators: { queryBuilderFilters: [{
1499
+ }], ctorParameters: function () { return [{ type: i1.OverlayPositionBuilder }, { type: i0.ElementRef }, { type: i1.Overlay }, { type: i2$2.Platform }]; }, propDecorators: { queryBuilderFilters: [{
1490
1500
  type: Input
1491
1501
  }], queryBuilderFiltersLoading: [{
1492
1502
  type: Input
@@ -1497,7 +1507,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
1497
1507
  args: ["click"]
1498
1508
  }] } });
1499
1509
 
1500
- class FilterComponent {
1510
+ class FilterComponent$1 {
1501
1511
  constructor() {
1502
1512
  this.propagateChanges = (_) => { };
1503
1513
  }
@@ -1517,14 +1527,14 @@ class FilterComponent {
1517
1527
  this.propagateChanges(value);
1518
1528
  }
1519
1529
  }
1520
- FilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1521
- FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: FilterComponent, selector: "ng-component", ngImport: i0, template: ``, isInline: true });
1522
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FilterComponent, decorators: [{
1530
+ FilterComponent$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FilterComponent$1, deps: [], target: i0.ɵɵFactoryTarget.Component });
1531
+ FilterComponent$1.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: FilterComponent$1, selector: "ng-component", ngImport: i0, template: ``, isInline: true });
1532
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FilterComponent$1, decorators: [{
1523
1533
  type: Component,
1524
1534
  args: [{ template: `` }]
1525
1535
  }] });
1526
1536
 
1527
- class SelectFilterComponent extends FilterComponent {
1537
+ class SelectFilterComponent extends FilterComponent$1 {
1528
1538
  constructor(filterService) {
1529
1539
  super();
1530
1540
  this.filterService = filterService;
@@ -1587,7 +1597,7 @@ SelectFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
1587
1597
  useExisting: forwardRef(() => SelectFilterComponent),
1588
1598
  multi: true
1589
1599
  }
1590
- ], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<mat-form-field class=\"flex-auto\">\n <nice-typeahead *ngIf=\"!filterConfig.lazyLoading\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [items]=\"values\"\n bindValue=\"id\"\n bindLabel=\"name\"\n ></nice-typeahead>\n\n <nice-typeahead *ngIf=\"filterConfig.lazyLoading\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [items]=\"values\"\n [typeahead]=\"search$\"\n bindValue=\"id\"\n bindLabel=\"name\"\n ></nice-typeahead>\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i5$1.NiceTypeaheadComponent, selector: "nice-typeahead", inputs: ["items", "labelFormatFn", "required", "disabled", "placeholder", "emptyPlaceholder", "allowNotFoundItems", "panelClass", "bindValue", "bindLabel", "typeahead", "page$", "loading", "loadingPage", "searchFn", "optionTemplate"], outputs: ["change"] }], encapsulation: i0.ViewEncapsulation.None });
1600
+ ], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<mat-form-field class=\"flex-auto\">\n <nice-typeahead *ngIf=\"!filterConfig.lazyLoading\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [items]=\"values\"\n bindValue=\"id\"\n bindLabel=\"name\"\n ></nice-typeahead>\n\n <nice-typeahead *ngIf=\"filterConfig.lazyLoading\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [items]=\"values\"\n [typeahead]=\"search$\"\n bindValue=\"id\"\n bindLabel=\"name\"\n ></nice-typeahead>\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i5.NiceTypeaheadComponent, selector: "nice-typeahead", inputs: ["items", "labelFormatFn", "required", "disabled", "placeholder", "emptyPlaceholder", "allowNotFoundItems", "panelClass", "bindValue", "bindLabel", "typeahead", "page$", "loading", "loadingPage", "searchFn", "optionTemplate"], outputs: ["change"] }], encapsulation: i0.ViewEncapsulation.None });
1591
1601
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: SelectFilterComponent, decorators: [{
1592
1602
  type: Component,
1593
1603
  args: [{ selector: "nice-select-filter", encapsulation: ViewEncapsulation.None, providers: [
@@ -1605,7 +1615,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
1605
1615
  type: Input
1606
1616
  }] } });
1607
1617
 
1608
- class TextFilterComponent extends FilterComponent {
1618
+ class TextFilterComponent extends FilterComponent$1 {
1609
1619
  }
1610
1620
  TextFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TextFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1611
1621
  TextFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: TextFilterComponent, selector: "nice-text-filter", inputs: { filterConfig: "filterConfig" }, providers: [
@@ -1614,7 +1624,7 @@ TextFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
1614
1624
  useExisting: forwardRef(() => TextFilterComponent),
1615
1625
  multi: true
1616
1626
  }
1617
- ], usesInheritance: true, ngImport: i0, template: "<mat-form-field class=\"flex-auto\">\n <input matInput [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\" [mask]=\"(filterConfig?.mask) || ''\" [validation]=\"false\" type=\"text\" />\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i4$1.MaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "triggerOnMaskChange"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }], encapsulation: i0.ViewEncapsulation.None });
1627
+ ], usesInheritance: true, ngImport: i0, template: "<mat-form-field class=\"flex-auto\">\n <input matInput [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\" [mask]=\"(filterConfig?.mask) || ''\" [validation]=\"false\" type=\"text\" />\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$2.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: "directive", type: i4$2.MaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "triggerOnMaskChange"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }], encapsulation: i0.ViewEncapsulation.None });
1618
1628
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TextFilterComponent, decorators: [{
1619
1629
  type: Component,
1620
1630
  args: [{ selector: "nice-text-filter", encapsulation: ViewEncapsulation.None, providers: [
@@ -1628,7 +1638,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
1628
1638
  type: Input
1629
1639
  }] } });
1630
1640
 
1631
- class NumberFilterComponent extends FilterComponent {
1641
+ class NumberFilterComponent extends FilterComponent$1 {
1632
1642
  }
1633
1643
  NumberFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NumberFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1634
1644
  NumberFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NumberFilterComponent, selector: "nice-number-filter", providers: [
@@ -1637,7 +1647,7 @@ NumberFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
1637
1647
  useExisting: forwardRef(() => NumberFilterComponent),
1638
1648
  multi: true
1639
1649
  }
1640
- ], usesInheritance: true, ngImport: i0, template: "<mat-form-field class=\"flex-auto\">\n <input matInput [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\" type=\"number\" />\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i1$1.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$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }], encapsulation: i0.ViewEncapsulation.None });
1650
+ ], usesInheritance: true, ngImport: i0, template: "<mat-form-field class=\"flex-auto\">\n <input matInput [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\" type=\"number\" />\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i1$1.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$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$2.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"] }], encapsulation: i0.ViewEncapsulation.None });
1641
1651
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NumberFilterComponent, decorators: [{
1642
1652
  type: Component,
1643
1653
  args: [{ selector: "nice-number-filter", encapsulation: ViewEncapsulation.None, providers: [
@@ -1649,7 +1659,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
1649
1659
  ], template: "<mat-form-field class=\"flex-auto\">\n <input matInput [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\" type=\"number\" />\n</mat-form-field>\n" }]
1650
1660
  }] });
1651
1661
 
1652
- class RadioFilterComponent extends FilterComponent {
1662
+ class RadioFilterComponent extends FilterComponent$1 {
1653
1663
  }
1654
1664
  RadioFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: RadioFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1655
1665
  RadioFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: RadioFilterComponent, selector: "nice-radio-filter", inputs: { filterConfig: "filterConfig" }, providers: [
@@ -1658,7 +1668,7 @@ RadioFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
1658
1668
  useExisting: forwardRef(() => RadioFilterComponent),
1659
1669
  multi: true
1660
1670
  }
1661
- ], usesInheritance: true, ngImport: i0, template: "<mat-radio-group class=\"flex-auto\" [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\">\n <mat-radio-button class=\"mx-4\" *ngFor=\"let option of filterConfig.options\" [value]=\"option?.key\">\n {{ option?.name }}\n </mat-radio-button>\n</mat-radio-group>\n", dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$2.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i3$2.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }], encapsulation: i0.ViewEncapsulation.None });
1671
+ ], usesInheritance: true, ngImport: i0, template: "<mat-radio-group class=\"flex-auto\" [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\">\n <mat-radio-button class=\"mx-4\" *ngFor=\"let option of filterConfig.options\" [value]=\"option?.key\">\n {{ option?.name }}\n </mat-radio-button>\n</mat-radio-group>\n", dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$3.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i3$3.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }], encapsulation: i0.ViewEncapsulation.None });
1662
1672
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: RadioFilterComponent, decorators: [{
1663
1673
  type: Component,
1664
1674
  args: [{ selector: "nice-radio-filter", encapsulation: ViewEncapsulation.None, providers: [
@@ -1672,7 +1682,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
1672
1682
  type: Input
1673
1683
  }] } });
1674
1684
 
1675
- class DateFilterComponent extends FilterComponent {
1685
+ class DateFilterComponent extends FilterComponent$1 {
1676
1686
  constructor(icons) {
1677
1687
  super();
1678
1688
  this.icons = icons;
@@ -1685,7 +1695,7 @@ DateFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
1685
1695
  useExisting: forwardRef(() => DateFilterComponent),
1686
1696
  multi: true
1687
1697
  }
1688
- ], usesInheritance: true, ngImport: i0, template: "<mat-form-field class=\"flex-auto\">\n <input matInput [matDatepicker]=\"picker\" [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\" />\n <mat-datepicker-toggle matSuffix [for]=\"picker\">\n <mat-icon matDatepickerToggleIcon [svgIcon]=\"icons.datePicker.svgIcon\">{{ icons.datePicker.matIcon }}</mat-icon>\n </mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i2$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$2.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5$2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i5$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i5$2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i5$2.MatDatepickerToggleIcon, selector: "[matDatepickerToggleIcon]" }], encapsulation: i0.ViewEncapsulation.None });
1698
+ ], usesInheritance: true, ngImport: i0, template: "<mat-form-field class=\"flex-auto\">\n <input matInput [matDatepicker]=\"picker\" [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\" />\n <mat-datepicker-toggle matSuffix [for]=\"picker\">\n <mat-icon matDatepickerToggleIcon [svgIcon]=\"icons.datePicker.svgIcon\">{{ icons.datePicker.matIcon }}</mat-icon>\n </mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i3$2.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$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i5$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i5$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i5$1.MatDatepickerToggleIcon, selector: "[matDatepickerToggleIcon]" }], encapsulation: i0.ViewEncapsulation.None });
1689
1699
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: DateFilterComponent, decorators: [{
1690
1700
  type: Component,
1691
1701
  args: [{ selector: "nice-date-filter", encapsulation: ViewEncapsulation.None, providers: [
@@ -1757,7 +1767,7 @@ class RuleComponent {
1757
1767
  }
1758
1768
  }
1759
1769
  RuleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: RuleComponent, deps: [{ token: QUERY_BUILDER_ICONS, optional: true }, { token: i1$1.FormGroupName }], target: i0.ɵɵFactoryTarget.Component });
1760
- RuleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: RuleComponent, selector: "nice-rule", inputs: { filterConfigs: "filterConfigs" }, outputs: { remove: "remove" }, ngImport: i0, template: "<div class=\"flex flex-row justify-start items-center gap-2.5\">\n <button\n class=\"select-filter\"\n mat-raised-button\n color=\"accent\"\n niceQueryBuilderTrigger\n [queryBuilderFilters]=\"filterConfigs\"\n (queryBuilderFilterSelected)=\"onUpdateFilterConfig($event)\"\n >\n <div class=\"flex flex-row justify-between items-center\">\n <div class=\"config-name\">{{ filterConfig?.name }}</div>\n <mat-icon [svgIcon]=\"icons.arrowDown.svgIcon\">{{ icons.arrowDown.matIcon }}</mat-icon>\n </div>\n </button>\n <div class=\"flex flex-col md:flex-row flex-auto justify-start items-center gap-2.5\">\n <mat-form-field class=\"rule-form-field\">\n <mat-select\n class=\"rule-operator\"\n [ngModel]=\"filterOperator\"\n (ngModelChange)=\"onUpdateFilterOperator($event)\"\n >\n <mat-option *ngFor=\"let operator of filterConfig?.operators\" [value]=\"operator.id\">\n {{ operator?.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div class=\"flex flex-col flex-grow flex-shrink md:flex-row flex-wrap\" [formGroup]=\"formGroup\">\n <ng-container formArrayName=\"rules\">\n <div\n class=\"rule-container flex flex-col md:flex-row flex-full justify-start items-center gap-2.5\"\n [class.is-double-input]=\"!!isDoubleInput\"\n [class.is-single-input]=\"!isDoubleInput\"\n [formGroupName]=\"i\"\n *ngFor=\"let rule of rules.controls; let i = index\"\n >\n <ng-container *ngIf=\"isSingleInput\">\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter *ngSwitchCase=\"'text'\" class=\"flex flex-auto\" formControlName=\"value\" [filterConfig]=\"filterConfig\"></nice-text-filter>\n <nice-number-filter *ngSwitchCase=\"'number'\" class=\"flex flex-auto\" formControlName=\"value\"></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n class=\"flex flex-auto mb-4\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-select-filter>\n <nice-date-filter *ngSwitchCase=\"'date'\" class=\"flex flex-auto\" formControlName=\"value\"></nice-date-filter>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isDoubleInput\">\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter\n *ngSwitchCase=\"'text'\"\n [filterConfig]=\"filterConfig\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n ></nice-text-filter>\n <nice-number-filter\n *ngSwitchCase=\"'number'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n ></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n class=\"flex flex-auto mb-4\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-select-filter>\n <nice-date-filter\n *ngSwitchCase=\"'date'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n ></nice-date-filter>\n </ng-container>\n <h3 class=\"aligned-text\">\n {{ \"components.query_builder.rule.conditions.and\" | translate }}\n </h3>\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter\n *ngSwitchCase=\"'text'\"\n [filterConfig]=\"filterConfig\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n ></nice-text-filter>\n <nice-number-filter\n *ngSwitchCase=\"'number'\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n ></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n class=\"flex flex-auto mb-4\"\n formControlName=\"secondValue\"\n [filterConfig]=\"filterConfig\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n [filterConfig]=\"filterConfig\"\n ></nice-select-filter>\n <nice-date-filter\n *ngSwitchCase=\"'date'\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n ></nice-date-filter>\n </ng-container>\n </ng-container>\n <div class=\"rule-buttons flex flex-row gap-2\">\n <button mat-mini-fab class=\"or-button aligned-button\" (click)=\"onClickOr()\">\n {{ \"components.query_builder.rule.conditions.or\" | translate }}\n </button>\n <button class=\"aligned-button\" mat-icon-button color=\"warn\" (click)=\"onClickDelete(i)\">\n <mat-icon [svgIcon]=\"icons.delete.svgIcon\">{{ icons.delete.matIcon }}</mat-icon>\n </button>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i2$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i6$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: QueryBuilderTriggerDirective, selector: "[niceQueryBuilderTrigger]", inputs: ["queryBuilderFilters", "queryBuilderFiltersLoading"], outputs: ["queryBuilderFilterSelected"] }, { kind: "component", type: SelectFilterComponent, selector: "nice-select-filter", inputs: ["filterConfig"] }, { kind: "component", type: TextFilterComponent, selector: "nice-text-filter", inputs: ["filterConfig"] }, { kind: "component", type: NumberFilterComponent, selector: "nice-number-filter" }, { kind: "component", type: RadioFilterComponent, selector: "nice-radio-filter", inputs: ["filterConfig"] }, { kind: "component", type: DateFilterComponent, selector: "nice-date-filter" }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
1770
+ RuleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: RuleComponent, selector: "nice-rule", inputs: { filterConfigs: "filterConfigs" }, outputs: { remove: "remove" }, ngImport: i0, template: "<div class=\"flex flex-row justify-start items-center gap-2.5\">\n <button\n class=\"select-filter\"\n mat-raised-button\n color=\"accent\"\n niceQueryBuilderTrigger\n [queryBuilderFilters]=\"filterConfigs\"\n (queryBuilderFilterSelected)=\"onUpdateFilterConfig($event)\"\n >\n <div class=\"flex flex-row justify-between items-center\">\n <div class=\"config-name\">{{ filterConfig?.name }}</div>\n <mat-icon [svgIcon]=\"icons.arrowDown.svgIcon\">{{ icons.arrowDown.matIcon }}</mat-icon>\n </div>\n </button>\n <div class=\"flex flex-col md:flex-row flex-auto justify-start items-center gap-2.5\">\n <mat-form-field class=\"rule-form-field\">\n <mat-select\n class=\"rule-operator\"\n [ngModel]=\"filterOperator\"\n (ngModelChange)=\"onUpdateFilterOperator($event)\"\n >\n <mat-option *ngFor=\"let operator of filterConfig?.operators\" [value]=\"operator.id\">\n {{ operator?.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div class=\"flex flex-col flex-grow flex-shrink md:flex-row flex-wrap\" [formGroup]=\"formGroup\">\n <ng-container formArrayName=\"rules\">\n <div\n class=\"rule-container flex flex-col md:flex-row flex-full justify-start items-center gap-2.5\"\n [class.is-double-input]=\"!!isDoubleInput\"\n [class.is-single-input]=\"!isDoubleInput\"\n [formGroupName]=\"i\"\n *ngFor=\"let rule of rules.controls; let i = index\"\n >\n <ng-container *ngIf=\"isSingleInput\">\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter *ngSwitchCase=\"'text'\" class=\"flex flex-auto\" formControlName=\"value\" [filterConfig]=\"filterConfig\"></nice-text-filter>\n <nice-number-filter *ngSwitchCase=\"'number'\" class=\"flex flex-auto\" formControlName=\"value\"></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n class=\"flex flex-auto mb-4\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-select-filter>\n <nice-date-filter *ngSwitchCase=\"'date'\" class=\"flex flex-auto\" formControlName=\"value\"></nice-date-filter>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isDoubleInput\">\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter\n *ngSwitchCase=\"'text'\"\n [filterConfig]=\"filterConfig\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n ></nice-text-filter>\n <nice-number-filter\n *ngSwitchCase=\"'number'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n ></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n class=\"flex flex-auto mb-4\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-select-filter>\n <nice-date-filter\n *ngSwitchCase=\"'date'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n ></nice-date-filter>\n </ng-container>\n <h3 class=\"aligned-text\">\n {{ \"components.query_builder.rule.conditions.and\" | translate }}\n </h3>\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter\n *ngSwitchCase=\"'text'\"\n [filterConfig]=\"filterConfig\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n ></nice-text-filter>\n <nice-number-filter\n *ngSwitchCase=\"'number'\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n ></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n class=\"flex flex-auto mb-4\"\n formControlName=\"secondValue\"\n [filterConfig]=\"filterConfig\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n [filterConfig]=\"filterConfig\"\n ></nice-select-filter>\n <nice-date-filter\n *ngSwitchCase=\"'date'\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n ></nice-date-filter>\n </ng-container>\n </ng-container>\n <div class=\"rule-buttons flex flex-row gap-2\">\n <button mat-mini-fab class=\"or-button aligned-button\" (click)=\"onClickOr()\">\n {{ \"components.query_builder.rule.conditions.or\" | translate }}\n </button>\n <button class=\"aligned-button\" mat-icon-button color=\"warn\" (click)=\"onClickDelete(i)\">\n <mat-icon [svgIcon]=\"icons.delete.svgIcon\">{{ icons.delete.matIcon }}</mat-icon>\n </button>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: QueryBuilderTriggerDirective, selector: "[niceQueryBuilderTrigger]", inputs: ["queryBuilderFilters", "queryBuilderFiltersLoading"], outputs: ["queryBuilderFilterSelected"] }, { kind: "component", type: SelectFilterComponent, selector: "nice-select-filter", inputs: ["filterConfig"] }, { kind: "component", type: TextFilterComponent, selector: "nice-text-filter", inputs: ["filterConfig"] }, { kind: "component", type: NumberFilterComponent, selector: "nice-number-filter" }, { kind: "component", type: RadioFilterComponent, selector: "nice-radio-filter", inputs: ["filterConfig"] }, { kind: "component", type: DateFilterComponent, selector: "nice-date-filter" }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
1761
1771
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: RuleComponent, decorators: [{
1762
1772
  type: Component,
1763
1773
  args: [{ selector: "nice-rule", encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-row justify-start items-center gap-2.5\">\n <button\n class=\"select-filter\"\n mat-raised-button\n color=\"accent\"\n niceQueryBuilderTrigger\n [queryBuilderFilters]=\"filterConfigs\"\n (queryBuilderFilterSelected)=\"onUpdateFilterConfig($event)\"\n >\n <div class=\"flex flex-row justify-between items-center\">\n <div class=\"config-name\">{{ filterConfig?.name }}</div>\n <mat-icon [svgIcon]=\"icons.arrowDown.svgIcon\">{{ icons.arrowDown.matIcon }}</mat-icon>\n </div>\n </button>\n <div class=\"flex flex-col md:flex-row flex-auto justify-start items-center gap-2.5\">\n <mat-form-field class=\"rule-form-field\">\n <mat-select\n class=\"rule-operator\"\n [ngModel]=\"filterOperator\"\n (ngModelChange)=\"onUpdateFilterOperator($event)\"\n >\n <mat-option *ngFor=\"let operator of filterConfig?.operators\" [value]=\"operator.id\">\n {{ operator?.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div class=\"flex flex-col flex-grow flex-shrink md:flex-row flex-wrap\" [formGroup]=\"formGroup\">\n <ng-container formArrayName=\"rules\">\n <div\n class=\"rule-container flex flex-col md:flex-row flex-full justify-start items-center gap-2.5\"\n [class.is-double-input]=\"!!isDoubleInput\"\n [class.is-single-input]=\"!isDoubleInput\"\n [formGroupName]=\"i\"\n *ngFor=\"let rule of rules.controls; let i = index\"\n >\n <ng-container *ngIf=\"isSingleInput\">\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter *ngSwitchCase=\"'text'\" class=\"flex flex-auto\" formControlName=\"value\" [filterConfig]=\"filterConfig\"></nice-text-filter>\n <nice-number-filter *ngSwitchCase=\"'number'\" class=\"flex flex-auto\" formControlName=\"value\"></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n class=\"flex flex-auto mb-4\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-select-filter>\n <nice-date-filter *ngSwitchCase=\"'date'\" class=\"flex flex-auto\" formControlName=\"value\"></nice-date-filter>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isDoubleInput\">\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter\n *ngSwitchCase=\"'text'\"\n [filterConfig]=\"filterConfig\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n ></nice-text-filter>\n <nice-number-filter\n *ngSwitchCase=\"'number'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n ></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n class=\"flex flex-auto mb-4\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-select-filter>\n <nice-date-filter\n *ngSwitchCase=\"'date'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n ></nice-date-filter>\n </ng-container>\n <h3 class=\"aligned-text\">\n {{ \"components.query_builder.rule.conditions.and\" | translate }}\n </h3>\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter\n *ngSwitchCase=\"'text'\"\n [filterConfig]=\"filterConfig\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n ></nice-text-filter>\n <nice-number-filter\n *ngSwitchCase=\"'number'\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n ></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n class=\"flex flex-auto mb-4\"\n formControlName=\"secondValue\"\n [filterConfig]=\"filterConfig\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n [filterConfig]=\"filterConfig\"\n ></nice-select-filter>\n <nice-date-filter\n *ngSwitchCase=\"'date'\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n ></nice-date-filter>\n </ng-container>\n </ng-container>\n <div class=\"rule-buttons flex flex-row gap-2\">\n <button mat-mini-fab class=\"or-button aligned-button\" (click)=\"onClickOr()\">\n {{ \"components.query_builder.rule.conditions.or\" | translate }}\n </button>\n <button class=\"aligned-button\" mat-icon-button color=\"warn\" (click)=\"onClickDelete(i)\">\n <mat-icon [svgIcon]=\"icons.delete.svgIcon\">{{ icons.delete.matIcon }}</mat-icon>\n </button>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n" }]
@@ -1826,7 +1836,7 @@ NiceQueryBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
1826
1836
  provide: GeneratedFormGroup,
1827
1837
  useFactory: ngxFormGeneratorFactory(QueryBuilderForm)
1828
1838
  }
1829
- ], ngImport: i0, template: "<div class=\"rules-container flex flex-col\" *ngIf=\"!loading\" [formGroup]=\"formGroup\">\n <ng-container formArrayName=\"rules\">\n <nice-rule\n *ngFor=\"let rule of rules.controls; let i = index\"\n (remove)=\"onClickDeleteRule(i)\"\n [filterConfigs]=\"filterConfigs\"\n [formGroupName]=\"i\"\n ></nice-rule>\n </ng-container>\n <div class=\"flex justify-between\">\n <button\n class=\"add-button add-rule-button\"\n mat-mini-fab\n niceQueryBuilderTrigger\n [queryBuilderFilters]=\"filterConfigs\"\n (queryBuilderFilterSelected)=\"onClickAddRule($event)\"\n >\n <mat-icon [svgIcon]=\"icons.add.svgIcon\">{{ icons.add.matIcon }}</mat-icon>\n </button>\n <div class=\"flex flex-col md:flex-row gap-4\">\n <!-- TODO: Support saved reports -->\n <!--<button mat-button color=\"primary\" (click)=\"onClickSaveReport()\" *ngIf=\"canSave\">\n <mat-icon class=\"mr-8\" fxHide.lt-md>save</mat-icon>\n {{ \"components.query_builder.save_report\" | translate }}\n </button>\n <button mat-button color=\"primary\" (click)=\"onClickUpdateReport()\" *ngIf=\"!canSave\">\n <mat-icon class=\"mr-8\" fxHide.lt-md>save</mat-icon>\n {{ \"components.query_builder.update_report\" | translate }}\n </button>-->\n <button mat-stroked-button color=\"accent\" (click)=\"onClickApply()\">\n {{ \"components.query_builder.update\" | translate }}\n <mat-icon [svgIcon]=\"icons.refresh.svgIcon\">{{ icons.refresh.matIcon }}</mat-icon>\n </button>\n </div>\n </div>\n</div>\n", styles: ["nice-query-builder .rules-container{position:relative}nice-query-builder .rules-container:before{content:\"\";position:absolute;top:32px;bottom:32px;left:46px;width:4px;background:rgba(0,0,0,.12)}nice-query-builder .save-report-button{height:36px}nice-query-builder .add-rule-button{margin-left:28px;margin-right:28px}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: QueryBuilderTriggerDirective, selector: "[niceQueryBuilderTrigger]", inputs: ["queryBuilderFilters", "queryBuilderFiltersLoading"], outputs: ["queryBuilderFilterSelected"] }, { kind: "component", type: RuleComponent, selector: "nice-rule", inputs: ["filterConfigs"], outputs: ["remove"] }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
1839
+ ], ngImport: i0, template: "<div class=\"rules-container flex flex-col\" *ngIf=\"!loading\" [formGroup]=\"formGroup\">\n <ng-container formArrayName=\"rules\">\n <nice-rule\n *ngFor=\"let rule of rules.controls; let i = index\"\n (remove)=\"onClickDeleteRule(i)\"\n [filterConfigs]=\"filterConfigs\"\n [formGroupName]=\"i\"\n ></nice-rule>\n </ng-container>\n <div class=\"flex justify-between\">\n <button\n class=\"add-button add-rule-button\"\n mat-mini-fab\n niceQueryBuilderTrigger\n [queryBuilderFilters]=\"filterConfigs\"\n (queryBuilderFilterSelected)=\"onClickAddRule($event)\"\n >\n <mat-icon [svgIcon]=\"icons.add.svgIcon\">{{ icons.add.matIcon }}</mat-icon>\n </button>\n <div class=\"flex flex-col md:flex-row gap-4\">\n <!-- TODO: Support saved reports -->\n <!--<button mat-button color=\"primary\" (click)=\"onClickSaveReport()\" *ngIf=\"canSave\">\n <mat-icon class=\"mr-8\" fxHide.lt-md>save</mat-icon>\n {{ \"components.query_builder.save_report\" | translate }}\n </button>\n <button mat-button color=\"primary\" (click)=\"onClickUpdateReport()\" *ngIf=\"!canSave\">\n <mat-icon class=\"mr-8\" fxHide.lt-md>save</mat-icon>\n {{ \"components.query_builder.update_report\" | translate }}\n </button>-->\n <button mat-stroked-button color=\"accent\" (click)=\"onClickApply()\">\n {{ \"components.query_builder.update\" | translate }}\n <mat-icon [svgIcon]=\"icons.refresh.svgIcon\">{{ icons.refresh.matIcon }}</mat-icon>\n </button>\n </div>\n </div>\n</div>\n", styles: ["nice-query-builder .rules-container{position:relative}nice-query-builder .rules-container:before{content:\"\";position:absolute;top:32px;bottom:32px;left:46px;width:4px;background:rgba(0,0,0,.12)}nice-query-builder .save-report-button{height:36px}nice-query-builder .add-rule-button{margin-left:28px;margin-right:28px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: QueryBuilderTriggerDirective, selector: "[niceQueryBuilderTrigger]", inputs: ["queryBuilderFilters", "queryBuilderFiltersLoading"], outputs: ["queryBuilderFilterSelected"] }, { kind: "component", type: RuleComponent, selector: "nice-rule", inputs: ["filterConfigs"], outputs: ["remove"] }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
1830
1840
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceQueryBuilderComponent, decorators: [{
1831
1841
  type: Component,
1832
1842
  args: [{ selector: "nice-query-builder", encapsulation: ViewEncapsulation.None, providers: [
@@ -2080,12 +2090,12 @@ class NiceBaseListComponent {
2080
2090
  }
2081
2091
  }
2082
2092
  }
2083
- NiceBaseListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceBaseListComponent, deps: [{ token: ENABLE_QUERY_BUILDER, optional: true }, { token: BASE_LIST_ICONS }, { token: BASE_LIST_LAYOUT }, { token: TABLE_COLUMNS }, { token: EXPORTS_SETTINGS$1 }, { token: NiceBaseListQuery }, { token: NiceBaseListService }, { token: i2.ActivatedRoute }, { token: i3$3.MatBottomSheet }, { token: i2.Router }, { token: i5$1.NiceMediaWatcherService }], target: i0.ɵɵFactoryTarget.Component });
2093
+ NiceBaseListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceBaseListComponent, deps: [{ token: ENABLE_QUERY_BUILDER, optional: true }, { token: BASE_LIST_ICONS }, { token: BASE_LIST_LAYOUT }, { token: TABLE_COLUMNS }, { token: EXPORTS_SETTINGS$1 }, { token: NiceBaseListQuery }, { token: NiceBaseListService }, { token: i2.ActivatedRoute }, { token: i3$4.MatBottomSheet }, { token: i2.Router }, { token: i5.NiceMediaWatcherService }], target: i0.ɵɵFactoryTarget.Component });
2084
2094
  NiceBaseListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceBaseListComponent, selector: "nice-base-list", inputs: { mode: "mode", layout: "layout", layoutContent: "layoutContent", autoChangeLayout: "autoChangeLayout", baseRoute: "baseRoute", routeFn: "routeFn", navigateFn: "navigateFn", autoLoad: "autoLoad", pageTitle: "pageTitle", canExport: "canExport", disableRouting: "disableRouting", customExport: "customExport", queryParams: "queryParams", configQueryParams: "configQueryParams" }, outputs: { newPage: "newPage" }, providers: [
2085
2095
  NiceBaseListQuery,
2086
2096
  NiceBaseListService,
2087
2097
  NiceBaseListStore
2088
- ], queries: [{ propertyName: "title", first: true, predicate: NiceBaseListTitleDirective, descendants: true, read: TemplateRef }, { propertyName: "table", first: true, predicate: NiceBaseListTableDirective, descendants: true }, { propertyName: "cards", first: true, predicate: NiceBaseListCardsDirective, descendants: true, read: TemplateRef }, { propertyName: "customContent", first: true, predicate: NiceBaseListCustomContentDirective, descendants: true, read: TemplateRef }, { propertyName: "filters", first: true, predicate: NiceBaseListFiltersDirective, descendants: true, read: TemplateRef }, { propertyName: "emptyState", first: true, predicate: NiceBaseListEmptyStateDirective, descendants: true, read: TemplateRef }, { propertyName: "emptySearchResultState", first: true, predicate: NiceBaseListEmptySearchResultStateDirective, descendants: true, read: TemplateRef }, { propertyName: "buttons", predicate: NiceBaseListButtonsDirective }], usesOnChanges: true, ngImport: i0, template: "<div class=\"list page-layout carded fullwidth inner-scroll\" *ngIf=\"layout === 'page'; else content\">\n <div class=\"center\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n</div>\n\n<ng-template #content>\n <ng-container *ngIf=\"listLayout.xl\">\n <div class=\"hidden xl:block\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.xl, active: xlActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.lg\">\n <div class=\"hidden lg:block xl:hidden\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.lg, active: lgActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.md\">\n <div class=\"hidden md:block lg:hidden\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.md, active: mdActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.sm\">\n <div class=\"hidden sm:block md:hidden\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.sm, active: smActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.xs\">\n <div class=\"block sm:hidden\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.xs, active: xsActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <div\n [class.hidden]=\"!!listLayout.xs\"\n [class.block]=\"!listLayout.xs\"\n [class.sm:hidden]=\"!!listLayout.sm\"\n [class.sm:block]=\"!listLayout.sm\"\n [class.md:hidden]=\"!!listLayout.md\"\n [class.md:block]=\"!listLayout.md\"\n [class.lg:hidden]=\"!!listLayout.lg\"\n [class.lg:block]=\"!listLayout.lg\"\n [class.xl:hidden]=\"!!listLayout.xl\"\n [class.xl:block]=\"!listLayout.xl\"\n >\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.default, active: defaultActive$ | async }\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #pageLayout let-layout=\"layout\" let-active=\"active\">\n <ng-container *ngIf=\"layout?.length; else isObject\">\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: { classes: ['flex flex-col'], items: layout }, active }\"></ng-container>\n </ng-container>\n\n <ng-template #isObject>\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: layout, active }\"></ng-container>\n </ng-template>\n</ng-template>\n\n<ng-template #contentLayout let-layout=\"layout\" let-active=\"active\">\n <div [ngClass]=\"layout.classes\">\n <ng-container *ngFor=\"let item of layout.items\">\n <ng-container *ngIf=\"item.name; else childIsLayout\">\n <ng-container *ngTemplateOutlet=\"layoutItem; context: { item: item, active }\"></ng-container>\n </ng-container>\n <ng-template #childIsLayout>\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: item, active }\"></ng-container>\n </ng-template>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #layoutItem let-item=\"item\" let-active=\"active\">\n <ng-container *ngIf=\"item.name === 'title' && title\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'search'\">\n <div [ngClass]=\"item.classes\">\n <div class=\"search-wrapper mx-md-0\">\n <div class=\"search flex flex-auto justify-start items-center\">\n <mat-icon [svgIcon]=\"icons.search.svgIcon\">{{ icons.search.matIcon }}</mat-icon>\n <input [ngModel]=\"searchQuery$ | async\" (ngModelChange)=\"onUpdateSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n\n <ng-container *ngIf=\"searchButtons\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"searchButtons\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"enableQueryBuilder\">\n <button\n *ngIf=\"!(showQueryBuilder$ | async) && !(rulesCount$ | async) && (filterConfig$ | async).length > 0\"\n mat-icon-button\n niceQueryBuilderTrigger\n [queryBuilderFilters]=\"filterConfig$ | async\"\n [queryBuilderFiltersLoading]=\"(filterConfigLoading$ | async) || false\"\n (queryBuilderFilterSelected)=\"onQueryBuilderFilterSelected($event)\"\n [matTooltip]=\"'general.query_builder.show_advanced_search' | translate\"\n >\n <mat-icon\n [svgIcon]=\"icons.queryBuilder.svgIcon\"\n [matBadge]=\"rulesCount$ | async\"\n [matBadgeHidden]=\"!(rulesCount$ | async)\"\n matBadgeColor=\"accent\"\n >\n {{ icons.queryBuilder.matIcon }}\n </mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"!(showQueryBuilder$ | async) && (rulesCount$ | async)\"\n [disabled]=\"filterConfigLoading$ | async\"\n (click)=\"clickToggleShowQueryBuilder()\"\n [matTooltip]=\"'general.query_builder.show_advanced_search' | translate\"\n >\n <mat-icon\n [svgIcon]=\"icons.queryBuilder.svgIcon\"\n [matBadge]=\"rulesCount$ | async\"\n [matBadgeHidden]=\"!(rulesCount$ | async)\"\n matBadgeColor=\"accent\"\n >\n {{ icons.queryBuilder.matIcon }}\n </mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"showQueryBuilder$ | async\"\n (click)=\"clickToggleShowQueryBuilder()\"\n [matTooltip]=\"'general.query_builder.close_advanced_search' | translate\"\n >\n <mat-icon [svgIcon]=\"icons.close.svgIcon\">{{ icons.close.matIcon }}</mat-icon>\n </button>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'prefixButtons' && prefixButtons\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"prefixButtons\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'suffixButtons' && suffixButtons\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"suffixButtons\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'exportButtons' && canExport\">\n <div [ngClass]=\"item.classes\" [class.mr-2]=\"!!suffixButtons\" [class.ml-2]=\"!!prefixButtons\">\n <button\n (click)=\"clickPrint()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.print' | translate\"\n class=\"list-button mr-2\"\n mat-mini-fab\n >\n <mat-icon [svgIcon]=\"icons.print.svgIcon\">{{ icons.print.matIcon }}</mat-icon>\n </button>\n\n <button\n (click)=\"clickExport()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.export' | translate\"\n class=\"list-button mr-2\"\n mat-mini-fab\n >\n <mat-icon [svgIcon]=\"icons.download.svgIcon\">{{ icons.download.matIcon }}</mat-icon>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'content'\">\n <ng-container *ngIf=\"((isEmpty$ | async) && emptyState) || ((isSearchResultEmpty$ | async) && emptySearchResultState); else showData\">\n\n <ng-container *ngIf=\"(isSearchResultEmpty$ | async)\">\n <ng-container *ngTemplateOutlet=\"emptySearchResultState\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"isEmpty$ | async\">\n <ng-container *ngTemplateOutlet=\"emptyState\"></ng-container>\n </ng-container>\n\n </ng-container>\n <ng-template #showData>\n <ng-container *ngIf=\"layoutContent === 'table' && table\">\n <ng-container *ngTemplateOutlet=\"tableLayout; context: { item: item, active }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"layoutContent === 'cards' && cards\">\n <ng-container *ngTemplateOutlet=\"cardsLayout; context: { item: item, active }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"layoutContent === 'custom' && customContent\">\n <ng-container *ngTemplateOutlet=\"customLayout; context: { item: item, active }\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'pagination' && layoutContent !== 'custom'\">\n <div [ngClass]=\"item.classes\">\n <mat-paginator\n (page)=\"onUpdatePage($event)\"\n [length]=\"recordsFiltered$ | async\"\n [pageIndex]=\"index$ | async\"\n [pageSizeOptions]=\"defaultPageSizeOptions\"\n [pageSize]=\"length$ | async\"\n [showFirstLastButtons]=\"true\"\n >\n </mat-paginator>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'queryBuilder' && enableQueryBuilder\">\n <div class=\"flex flex-col\" *ngIf=\"showQueryBuilder$ | async\">\n <mat-card class=\"my-4\" [niceLoadingOverlay]=\"filterConfigLoading$ | async\">\n <mat-card-content class=\"flex flex-col\">\n <div class=\"flex-auto\">\n <nice-query-builder\n [filterConfigs]=\"filterConfig$ | async\"\n [ngModel]=\"rules$ | async\"\n (ngModelChange)=\"onUpdateRules($event)\"\n (close)=\"clickToggleShowQueryBuilder()\"\n ></nice-query-builder>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'filters' && filters\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"filters\"></ng-container>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #tableLayout let-item=\"item\">\n <div [ngClass]=\"item.classes\">\n <div\n [niceLoadingOverlay]=\"loading$ | async\"\n class=\"content-card base-list flex flex-col justify-between\"\n >\n <mat-table\n (matSortChange)=\"onUpdateSort($event)\"\n [dataSource]=\"data$\"\n [matSortActive]=\"(sortColumn$ | async) || ''\"\n [matSortDirection]=\"(sortDirection$ | async) || ''\"\n class=\"flex flex-col flex-auto\"\n matSort\n >\n <mat-header-row *matHeaderRowDef=\"columnNames; sticky: table.stickyHeader\"></mat-header-row>\n\n <ng-container *ngFor=\"let column of columns\" [matColumnDef]=\"column.id\">\n <ng-container *ngIf=\"column.sortable\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n <ng-container\n *ngTemplateOutlet=\"table.template; context: { column: column.id, header: true }\"\n ></ng-container>\n </mat-header-cell>\n </ng-container>\n <ng-container *ngIf=\"!column.sortable\">\n <mat-header-cell *matHeaderCellDef>\n <ng-container\n *ngTemplateOutlet=\"table.template; context: { column: column.id, header: true }\"\n ></ng-container>\n </mat-header-cell>\n </ng-container>\n\n <mat-cell *matCellDef=\"let item\">\n <ng-container\n *ngTemplateOutlet=\"table.template; context: { column: column.id, data: true, item: item }\"\n ></ng-container>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngIf=\"disableRouting; else withRouting\">\n <mat-row *matRowDef=\"let item; columns: columnNames;\" class=\"item\"></mat-row>\n </ng-container>\n\n <ng-template #withRouting>\n <mat-row\n *matRowDef=\"let item; columns: columnNames;\"\n (click)=\"navigate(item)\"\n class=\"item clickable\"\n matRipple\n >\n </mat-row>\n </ng-template>\n </mat-table>\n </div>\n </div>\n</ng-template>\n\n<ng-template #cardsLayout let-item=\"item\" let-active=\"active\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngFor=\"let data of data$ | async\">\n <ng-container *ngTemplateOutlet=\"cards; context: { item: data, active }\"></ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #customLayout let-item=\"item\" let-active=\"active\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"customContent; context: { $implicit: data$ | async, data: data$ | async, total: recordsFiltered$ | async, active }\"></ng-container>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i11.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i11.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { kind: "component", type: i12.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "directive", type: i5$1.NiceLoadingDirective, selector: "[niceLoadingOverlay]", inputs: ["niceLoadingOverlay"] }, { kind: "component", type: i13.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i13.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i13.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i13.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i13.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i13.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i13.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i13.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i13.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i13.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i14.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i14.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: NiceQueryBuilderComponent, selector: "nice-query-builder", inputs: ["filterConfigs", "currentSavedReport", "loading"], outputs: ["close", "createReport", "updateReport"] }, { kind: "directive", type: QueryBuilderTriggerDirective, selector: "[niceQueryBuilderTrigger]", inputs: ["queryBuilderFilters", "queryBuilderFiltersLoading"], outputs: ["queryBuilderFilterSelected"] }, { kind: "directive", type: i18.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgeColor", "matBadgeOverlap", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }] });
2098
+ ], queries: [{ propertyName: "title", first: true, predicate: NiceBaseListTitleDirective, descendants: true, read: TemplateRef }, { propertyName: "table", first: true, predicate: NiceBaseListTableDirective, descendants: true }, { propertyName: "cards", first: true, predicate: NiceBaseListCardsDirective, descendants: true, read: TemplateRef }, { propertyName: "customContent", first: true, predicate: NiceBaseListCustomContentDirective, descendants: true, read: TemplateRef }, { propertyName: "filters", first: true, predicate: NiceBaseListFiltersDirective, descendants: true, read: TemplateRef }, { propertyName: "emptyState", first: true, predicate: NiceBaseListEmptyStateDirective, descendants: true, read: TemplateRef }, { propertyName: "emptySearchResultState", first: true, predicate: NiceBaseListEmptySearchResultStateDirective, descendants: true, read: TemplateRef }, { propertyName: "buttons", predicate: NiceBaseListButtonsDirective }], usesOnChanges: true, ngImport: i0, template: "<div class=\"list page-layout carded fullwidth inner-scroll\" *ngIf=\"layout === 'page'; else content\">\n <div class=\"center\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n</div>\n\n<ng-template #content>\n <ng-container *ngIf=\"listLayout.xl\">\n <div class=\"hidden xl:block\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.xl, active: xlActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.lg\">\n <div class=\"hidden lg:block xl:hidden\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.lg, active: lgActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.md\">\n <div class=\"hidden md:block lg:hidden\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.md, active: mdActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.sm\">\n <div class=\"hidden sm:block md:hidden\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.sm, active: smActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.xs\">\n <div class=\"block sm:hidden\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.xs, active: xsActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <div\n [class.hidden]=\"!!listLayout.xs\"\n [class.block]=\"!listLayout.xs\"\n [class.sm:hidden]=\"!!listLayout.sm\"\n [class.sm:block]=\"!listLayout.sm\"\n [class.md:hidden]=\"!!listLayout.md\"\n [class.md:block]=\"!listLayout.md\"\n [class.lg:hidden]=\"!!listLayout.lg\"\n [class.lg:block]=\"!listLayout.lg\"\n [class.xl:hidden]=\"!!listLayout.xl\"\n [class.xl:block]=\"!listLayout.xl\"\n >\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.default, active: defaultActive$ | async }\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #pageLayout let-layout=\"layout\" let-active=\"active\">\n <ng-container *ngIf=\"layout?.length; else isObject\">\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: { classes: ['flex flex-col'], items: layout }, active }\"></ng-container>\n </ng-container>\n\n <ng-template #isObject>\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: layout, active }\"></ng-container>\n </ng-template>\n</ng-template>\n\n<ng-template #contentLayout let-layout=\"layout\" let-active=\"active\">\n <div [ngClass]=\"layout.classes\">\n <ng-container *ngFor=\"let item of layout.items\">\n <ng-container *ngIf=\"item.name; else childIsLayout\">\n <ng-container *ngTemplateOutlet=\"layoutItem; context: { item: item, active }\"></ng-container>\n </ng-container>\n <ng-template #childIsLayout>\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: item, active }\"></ng-container>\n </ng-template>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #layoutItem let-item=\"item\" let-active=\"active\">\n <ng-container *ngIf=\"item.name === 'title' && title\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'search'\">\n <div [ngClass]=\"item.classes\">\n <div class=\"search-wrapper mx-md-0\">\n <div class=\"search flex flex-auto justify-start items-center\">\n <mat-icon [svgIcon]=\"icons.search.svgIcon\">{{ icons.search.matIcon }}</mat-icon>\n <input [ngModel]=\"searchQuery$ | async\" (ngModelChange)=\"onUpdateSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n\n <ng-container *ngIf=\"searchButtons\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"searchButtons\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"enableQueryBuilder\">\n <button\n *ngIf=\"!(showQueryBuilder$ | async) && !(rulesCount$ | async) && (filterConfig$ | async).length > 0\"\n mat-icon-button\n niceQueryBuilderTrigger\n [queryBuilderFilters]=\"filterConfig$ | async\"\n [queryBuilderFiltersLoading]=\"(filterConfigLoading$ | async) || false\"\n (queryBuilderFilterSelected)=\"onQueryBuilderFilterSelected($event)\"\n [matTooltip]=\"'general.query_builder.show_advanced_search' | translate\"\n >\n <mat-icon\n [svgIcon]=\"icons.queryBuilder.svgIcon\"\n [matBadge]=\"rulesCount$ | async\"\n [matBadgeHidden]=\"!(rulesCount$ | async)\"\n matBadgeColor=\"accent\"\n >\n {{ icons.queryBuilder.matIcon }}\n </mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"!(showQueryBuilder$ | async) && (rulesCount$ | async)\"\n [disabled]=\"filterConfigLoading$ | async\"\n (click)=\"clickToggleShowQueryBuilder()\"\n [matTooltip]=\"'general.query_builder.show_advanced_search' | translate\"\n >\n <mat-icon\n [svgIcon]=\"icons.queryBuilder.svgIcon\"\n [matBadge]=\"rulesCount$ | async\"\n [matBadgeHidden]=\"!(rulesCount$ | async)\"\n matBadgeColor=\"accent\"\n >\n {{ icons.queryBuilder.matIcon }}\n </mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"showQueryBuilder$ | async\"\n (click)=\"clickToggleShowQueryBuilder()\"\n [matTooltip]=\"'general.query_builder.close_advanced_search' | translate\"\n >\n <mat-icon [svgIcon]=\"icons.close.svgIcon\">{{ icons.close.matIcon }}</mat-icon>\n </button>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'prefixButtons' && prefixButtons\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"prefixButtons\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'suffixButtons' && suffixButtons\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"suffixButtons\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'exportButtons' && canExport\">\n <div [ngClass]=\"item.classes\" [class.mr-2]=\"!!suffixButtons\" [class.ml-2]=\"!!prefixButtons\">\n <button\n (click)=\"clickPrint()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.print' | translate\"\n class=\"list-button mr-2\"\n mat-mini-fab\n >\n <mat-icon [svgIcon]=\"icons.print.svgIcon\">{{ icons.print.matIcon }}</mat-icon>\n </button>\n\n <button\n (click)=\"clickExport()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.export' | translate\"\n class=\"list-button mr-2\"\n mat-mini-fab\n >\n <mat-icon [svgIcon]=\"icons.download.svgIcon\">{{ icons.download.matIcon }}</mat-icon>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'content'\">\n <ng-container *ngIf=\"((isEmpty$ | async) && emptyState) || ((isSearchResultEmpty$ | async) && emptySearchResultState); else showData\">\n\n <ng-container *ngIf=\"(isSearchResultEmpty$ | async)\">\n <ng-container *ngTemplateOutlet=\"emptySearchResultState\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"isEmpty$ | async\">\n <ng-container *ngTemplateOutlet=\"emptyState\"></ng-container>\n </ng-container>\n\n </ng-container>\n <ng-template #showData>\n <ng-container *ngIf=\"layoutContent === 'table' && table\">\n <ng-container *ngTemplateOutlet=\"tableLayout; context: { item: item, active }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"layoutContent === 'cards' && cards\">\n <ng-container *ngTemplateOutlet=\"cardsLayout; context: { item: item, active }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"layoutContent === 'custom' && customContent\">\n <ng-container *ngTemplateOutlet=\"customLayout; context: { item: item, active }\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'pagination' && layoutContent !== 'custom'\">\n <div [ngClass]=\"item.classes\">\n <mat-paginator\n (page)=\"onUpdatePage($event)\"\n [length]=\"recordsFiltered$ | async\"\n [pageIndex]=\"index$ | async\"\n [pageSizeOptions]=\"defaultPageSizeOptions\"\n [pageSize]=\"length$ | async\"\n [showFirstLastButtons]=\"true\"\n >\n </mat-paginator>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'queryBuilder' && enableQueryBuilder\">\n <div class=\"flex flex-col\" *ngIf=\"showQueryBuilder$ | async\">\n <mat-card class=\"my-4\" [niceLoadingOverlay]=\"filterConfigLoading$ | async\">\n <mat-card-content class=\"flex flex-col\">\n <div class=\"flex-auto\">\n <nice-query-builder\n [filterConfigs]=\"filterConfig$ | async\"\n [ngModel]=\"rules$ | async\"\n (ngModelChange)=\"onUpdateRules($event)\"\n (close)=\"clickToggleShowQueryBuilder()\"\n ></nice-query-builder>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'filters' && filters\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"filters\"></ng-container>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #tableLayout let-item=\"item\">\n <div [ngClass]=\"item.classes\">\n <div\n [niceLoadingOverlay]=\"loading$ | async\"\n class=\"content-card base-list flex flex-col justify-between\"\n >\n <mat-table\n (matSortChange)=\"onUpdateSort($event)\"\n [dataSource]=\"data$\"\n [matSortActive]=\"(sortColumn$ | async) || ''\"\n [matSortDirection]=\"(sortDirection$ | async) || ''\"\n class=\"flex flex-col flex-auto\"\n matSort\n >\n <mat-header-row *matHeaderRowDef=\"columnNames; sticky: table.stickyHeader\"></mat-header-row>\n\n <ng-container *ngFor=\"let column of columns\" [matColumnDef]=\"column.id\">\n <ng-container *ngIf=\"column.sortable\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n <ng-container\n *ngTemplateOutlet=\"table.template; context: { column: column.id, header: true }\"\n ></ng-container>\n </mat-header-cell>\n </ng-container>\n <ng-container *ngIf=\"!column.sortable\">\n <mat-header-cell *matHeaderCellDef>\n <ng-container\n *ngTemplateOutlet=\"table.template; context: { column: column.id, header: true }\"\n ></ng-container>\n </mat-header-cell>\n </ng-container>\n\n <mat-cell *matCellDef=\"let item\">\n <ng-container\n *ngTemplateOutlet=\"table.template; context: { column: column.id, data: true, item: item }\"\n ></ng-container>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngIf=\"disableRouting; else withRouting\">\n <mat-row *matRowDef=\"let item; columns: columnNames;\" class=\"item\"></mat-row>\n </ng-container>\n\n <ng-template #withRouting>\n <mat-row\n *matRowDef=\"let item; columns: columnNames;\"\n (click)=\"navigate(item)\"\n class=\"item clickable\"\n matRipple\n >\n </mat-row>\n </ng-template>\n </mat-table>\n </div>\n </div>\n</ng-template>\n\n<ng-template #cardsLayout let-item=\"item\" let-active=\"active\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngFor=\"let data of data$ | async\">\n <ng-container *ngTemplateOutlet=\"cards; context: { item: data, active }\"></ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #customLayout let-item=\"item\" let-active=\"active\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"customContent; context: { $implicit: data$ | async, data: data$ | async, total: recordsFiltered$ | async, active }\"></ng-container>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i11.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i11.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { kind: "component", type: i12.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "directive", type: i5.NiceLoadingDirective, selector: "[niceLoadingOverlay]", inputs: ["niceLoadingOverlay"] }, { kind: "component", type: i13.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i13.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i13.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i13.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i13.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i13.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i13.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i13.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i13.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i13.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i14.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i14.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: NiceQueryBuilderComponent, selector: "nice-query-builder", inputs: ["filterConfigs", "currentSavedReport", "loading"], outputs: ["close", "createReport", "updateReport"] }, { kind: "directive", type: QueryBuilderTriggerDirective, selector: "[niceQueryBuilderTrigger]", inputs: ["queryBuilderFilters", "queryBuilderFiltersLoading"], outputs: ["queryBuilderFilterSelected"] }, { kind: "directive", type: i18.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgeColor", "matBadgeOverlap", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }] });
2089
2099
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceBaseListComponent, decorators: [{
2090
2100
  type: Component,
2091
2101
  args: [{ selector: "nice-base-list", providers: [
@@ -2111,7 +2121,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
2111
2121
  }] }, { type: undefined, decorators: [{
2112
2122
  type: Inject,
2113
2123
  args: [EXPORTS_SETTINGS$1]
2114
- }] }, { type: NiceBaseListQuery }, { type: NiceBaseListService }, { type: i2.ActivatedRoute }, { type: i3$3.MatBottomSheet }, { type: i2.Router }, { type: i5$1.NiceMediaWatcherService }];
2124
+ }] }, { type: NiceBaseListQuery }, { type: NiceBaseListService }, { type: i2.ActivatedRoute }, { type: i3$4.MatBottomSheet }, { type: i2.Router }, { type: i5.NiceMediaWatcherService }];
2115
2125
  }, propDecorators: { title: [{
2116
2126
  type: ContentChild,
2117
2127
  args: [NiceBaseListTitleDirective, { read: TemplateRef }]
@@ -2191,7 +2201,7 @@ class NiceCustomDateAdapter extends NativeDateAdapter {
2191
2201
  return date.getUTCFullYear();
2192
2202
  }
2193
2203
  }
2194
- NiceCustomDateAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceCustomDateAdapter, deps: [{ token: i1$2.TranslateService }, { token: MAT_DATE_LOCALE }, { token: i2$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
2204
+ NiceCustomDateAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceCustomDateAdapter, deps: [{ token: i1$2.TranslateService }, { token: MAT_DATE_LOCALE }, { token: i2$2.Platform }], target: i0.ɵɵFactoryTarget.Injectable });
2195
2205
  NiceCustomDateAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceCustomDateAdapter });
2196
2206
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceCustomDateAdapter, decorators: [{
2197
2207
  type: Injectable
@@ -2199,10 +2209,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
2199
2209
  return [{ type: i1$2.TranslateService }, { type: undefined, decorators: [{
2200
2210
  type: Inject,
2201
2211
  args: [MAT_DATE_LOCALE]
2202
- }] }, { type: i2$1.Platform }];
2212
+ }] }, { type: i2$2.Platform }];
2203
2213
  } });
2204
2214
 
2205
- const defaultIcons$1 = {
2215
+ const defaultIcons$2 = {
2206
2216
  add: {
2207
2217
  matIcon: "add"
2208
2218
  },
@@ -2228,7 +2238,7 @@ class NiceQueryBuilderModule {
2228
2238
  providers: [
2229
2239
  {
2230
2240
  provide: QUERY_BUILDER_ICONS,
2231
- useValue: Object.assign(Object.assign({}, defaultIcons$1), ((_a = options === null || options === void 0 ? void 0 : options.icons) !== null && _a !== void 0 ? _a : {}))
2241
+ useValue: Object.assign(Object.assign({}, defaultIcons$2), ((_a = options === null || options === void 0 ? void 0 : options.icons) !== null && _a !== void 0 ? _a : {}))
2232
2242
  }
2233
2243
  ]
2234
2244
  };
@@ -2317,7 +2327,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
2317
2327
  }]
2318
2328
  }] });
2319
2329
 
2320
- const defaultIcons = {
2330
+ const defaultIcons$1 = {
2321
2331
  search: {
2322
2332
  matIcon: "search"
2323
2333
  },
@@ -2347,7 +2357,7 @@ class NiceBaseListModule {
2347
2357
  },
2348
2358
  {
2349
2359
  provide: BASE_LIST_ICONS,
2350
- useValue: Object.assign(Object.assign({}, defaultIcons), ((_b = options === null || options === void 0 ? void 0 : options.icons) !== null && _b !== void 0 ? _b : {}))
2360
+ useValue: Object.assign(Object.assign({}, defaultIcons$1), ((_b = options === null || options === void 0 ? void 0 : options.icons) !== null && _b !== void 0 ? _b : {}))
2351
2361
  },
2352
2362
  ...((options === null || options === void 0 ? void 0 : options.queryBuilder) ? [
2353
2363
  {
@@ -2588,12 +2598,12 @@ class NiceMultiStateListComponent extends NiceBaseListComponent {
2588
2598
  this.setColumns(columns);
2589
2599
  }
2590
2600
  }
2591
- NiceMultiStateListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceMultiStateListComponent, deps: [{ token: ENABLE_QUERY_BUILDER, optional: true }, { token: BASE_LIST_ICONS }, { token: BASE_LIST_LAYOUT }, { token: EXPORTS_SETTINGS$1 }, { token: NiceMultiStateListQuery }, { token: i2.ActivatedRoute }, { token: i3$3.MatBottomSheet }, { token: i2.Router }, { token: i5$1.NiceMediaWatcherService }, { token: NiceMultiStateListService }], target: i0.ɵɵFactoryTarget.Component });
2601
+ NiceMultiStateListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceMultiStateListComponent, deps: [{ token: ENABLE_QUERY_BUILDER, optional: true }, { token: BASE_LIST_ICONS }, { token: BASE_LIST_LAYOUT }, { token: EXPORTS_SETTINGS$1 }, { token: NiceMultiStateListQuery }, { token: i2.ActivatedRoute }, { token: i3$4.MatBottomSheet }, { token: i2.Router }, { token: i5.NiceMediaWatcherService }, { token: NiceMultiStateListService }], target: i0.ɵɵFactoryTarget.Component });
2592
2602
  NiceMultiStateListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceMultiStateListComponent, selector: "nice-multi-state-list", inputs: { state: "state" }, providers: [
2593
2603
  NiceMultiStateListQuery,
2594
2604
  NiceMultiStateListService,
2595
2605
  NiceMultiStateListStore
2596
- ], usesInheritance: true, ngImport: i0, template: "<div class=\"list page-layout carded fullwidth inner-scroll\" *ngIf=\"layout === 'page'; else content\">\n <div class=\"center\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n</div>\n\n<ng-template #content>\n <ng-container *ngIf=\"listLayout.xl\">\n <div class=\"hidden xl:block\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.xl, active: xlActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.lg\">\n <div class=\"hidden lg:block xl:hidden\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.lg, active: lgActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.md\">\n <div class=\"hidden md:block lg:hidden\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.md, active: mdActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.sm\">\n <div class=\"hidden sm:block md:hidden\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.sm, active: smActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.xs\">\n <div class=\"block sm:hidden\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.xs, active: xsActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <div\n [class.hidden]=\"!!listLayout.xs\"\n [class.block]=\"!listLayout.xs\"\n [class.sm:hidden]=\"!!listLayout.sm\"\n [class.sm:block]=\"!listLayout.sm\"\n [class.md:hidden]=\"!!listLayout.md\"\n [class.md:block]=\"!listLayout.md\"\n [class.lg:hidden]=\"!!listLayout.lg\"\n [class.lg:block]=\"!listLayout.lg\"\n [class.xl:hidden]=\"!!listLayout.xl\"\n [class.xl:block]=\"!listLayout.xl\"\n >\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.default, active: defaultActive$ | async }\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #pageLayout let-layout=\"layout\" let-active=\"active\">\n <ng-container *ngIf=\"layout?.length; else isObject\">\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: { classes: ['flex flex-col'], items: layout }, active }\"></ng-container>\n </ng-container>\n\n <ng-template #isObject>\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: layout, active }\"></ng-container>\n </ng-template>\n</ng-template>\n\n<ng-template #contentLayout let-layout=\"layout\" let-active=\"active\">\n <div [ngClass]=\"layout.classes\">\n <ng-container *ngFor=\"let item of layout.items\">\n <ng-container *ngIf=\"item.name; else childIsLayout\">\n <ng-container *ngTemplateOutlet=\"layoutItem; context: { item: item, active }\"></ng-container>\n </ng-container>\n <ng-template #childIsLayout>\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: item, active }\"></ng-container>\n </ng-template>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #layoutItem let-item=\"item\" let-active=\"active\">\n <ng-container *ngIf=\"item.name === 'title' && title\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'search'\">\n <div [ngClass]=\"item.classes\">\n <div class=\"search-wrapper mx-md-0\">\n <div class=\"search flex flex-auto justify-start items-center\">\n <mat-icon [svgIcon]=\"icons.search.svgIcon\">{{ icons.search.matIcon }}</mat-icon>\n <input [ngModel]=\"searchQuery$ | async\" (ngModelChange)=\"onUpdateSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n\n <ng-container *ngIf=\"searchButtons\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"searchButtons\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"enableQueryBuilder\">\n <button\n *ngIf=\"!(showQueryBuilder$ | async) && !(rulesCount$ | async) && (filterConfig$ | async).length > 0\"\n mat-icon-button\n niceQueryBuilderTrigger\n [queryBuilderFilters]=\"filterConfig$ | async\"\n [queryBuilderFiltersLoading]=\"(filterConfigLoading$ | async) || false\"\n (queryBuilderFilterSelected)=\"onQueryBuilderFilterSelected($event)\"\n [matTooltip]=\"'general.query_builder.show_advanced_search' | translate\"\n >\n <mat-icon\n [svgIcon]=\"icons.queryBuilder.svgIcon\"\n [matBadge]=\"rulesCount$ | async\"\n [matBadgeHidden]=\"!(rulesCount$ | async)\"\n matBadgeColor=\"accent\"\n >\n {{ icons.queryBuilder.matIcon }}\n </mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"!(showQueryBuilder$ | async) && (rulesCount$ | async)\"\n [disabled]=\"filterConfigLoading$ | async\"\n (click)=\"clickToggleShowQueryBuilder()\"\n [matTooltip]=\"'general.query_builder.show_advanced_search' | translate\"\n >\n <mat-icon\n [svgIcon]=\"icons.queryBuilder.svgIcon\"\n [matBadge]=\"rulesCount$ | async\"\n [matBadgeHidden]=\"!(rulesCount$ | async)\"\n matBadgeColor=\"accent\"\n >\n {{ icons.queryBuilder.matIcon }}\n </mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"showQueryBuilder$ | async\"\n (click)=\"clickToggleShowQueryBuilder()\"\n [matTooltip]=\"'general.query_builder.close_advanced_search' | translate\"\n >\n <mat-icon [svgIcon]=\"icons.close.svgIcon\">{{ icons.close.matIcon }}</mat-icon>\n </button>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'prefixButtons' && prefixButtons\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"prefixButtons\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'suffixButtons' && suffixButtons\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"suffixButtons\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'exportButtons' && canExport\">\n <div [ngClass]=\"item.classes\" [class.mr-2]=\"!!suffixButtons\" [class.ml-2]=\"!!prefixButtons\">\n <button\n (click)=\"clickPrint()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.print' | translate\"\n class=\"list-button mr-2\"\n mat-mini-fab\n >\n <mat-icon [svgIcon]=\"icons.print.svgIcon\">{{ icons.print.matIcon }}</mat-icon>\n </button>\n\n <button\n (click)=\"clickExport()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.export' | translate\"\n class=\"list-button mr-2\"\n mat-mini-fab\n >\n <mat-icon [svgIcon]=\"icons.download.svgIcon\">{{ icons.download.matIcon }}</mat-icon>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'content'\">\n <ng-container *ngIf=\"((isEmpty$ | async) && emptyState) || ((isSearchResultEmpty$ | async) && emptySearchResultState); else showData\">\n\n <ng-container *ngIf=\"(isSearchResultEmpty$ | async)\">\n <ng-container *ngTemplateOutlet=\"emptySearchResultState\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"isEmpty$ | async\">\n <ng-container *ngTemplateOutlet=\"emptyState\"></ng-container>\n </ng-container>\n\n </ng-container>\n <ng-template #showData>\n <ng-container *ngIf=\"layoutContent === 'table' && table\">\n <ng-container *ngTemplateOutlet=\"tableLayout; context: { item: item, active }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"layoutContent === 'cards' && cards\">\n <ng-container *ngTemplateOutlet=\"cardsLayout; context: { item: item, active }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"layoutContent === 'custom' && customContent\">\n <ng-container *ngTemplateOutlet=\"customLayout; context: { item: item, active }\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'pagination' && layoutContent !== 'custom'\">\n <div [ngClass]=\"item.classes\">\n <mat-paginator\n (page)=\"onUpdatePage($event)\"\n [length]=\"recordsFiltered$ | async\"\n [pageIndex]=\"index$ | async\"\n [pageSizeOptions]=\"defaultPageSizeOptions\"\n [pageSize]=\"length$ | async\"\n [showFirstLastButtons]=\"true\"\n >\n </mat-paginator>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'queryBuilder' && enableQueryBuilder\">\n <div class=\"flex flex-col\" *ngIf=\"showQueryBuilder$ | async\">\n <mat-card class=\"my-4\" [niceLoadingOverlay]=\"filterConfigLoading$ | async\">\n <mat-card-content class=\"flex flex-col\">\n <div class=\"flex-auto\">\n <nice-query-builder\n [filterConfigs]=\"filterConfig$ | async\"\n [ngModel]=\"rules$ | async\"\n (ngModelChange)=\"onUpdateRules($event)\"\n (close)=\"clickToggleShowQueryBuilder()\"\n ></nice-query-builder>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'filters' && filters\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"filters\"></ng-container>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #tableLayout let-item=\"item\">\n <div [ngClass]=\"item.classes\">\n <div\n [niceLoadingOverlay]=\"loading$ | async\"\n class=\"content-card base-list flex flex-col justify-between\"\n >\n <mat-table\n (matSortChange)=\"onUpdateSort($event)\"\n [dataSource]=\"data$\"\n [matSortActive]=\"(sortColumn$ | async) || ''\"\n [matSortDirection]=\"(sortDirection$ | async) || ''\"\n class=\"flex flex-col flex-auto\"\n matSort\n >\n <mat-header-row *matHeaderRowDef=\"columnNames; sticky: table.stickyHeader\"></mat-header-row>\n\n <ng-container *ngFor=\"let column of columns\" [matColumnDef]=\"column.id\">\n <ng-container *ngIf=\"column.sortable\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n <ng-container\n *ngTemplateOutlet=\"table.template; context: { column: column.id, header: true }\"\n ></ng-container>\n </mat-header-cell>\n </ng-container>\n <ng-container *ngIf=\"!column.sortable\">\n <mat-header-cell *matHeaderCellDef>\n <ng-container\n *ngTemplateOutlet=\"table.template; context: { column: column.id, header: true }\"\n ></ng-container>\n </mat-header-cell>\n </ng-container>\n\n <mat-cell *matCellDef=\"let item\">\n <ng-container\n *ngTemplateOutlet=\"table.template; context: { column: column.id, data: true, item: item }\"\n ></ng-container>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngIf=\"disableRouting; else withRouting\">\n <mat-row *matRowDef=\"let item; columns: columnNames;\" class=\"item\"></mat-row>\n </ng-container>\n\n <ng-template #withRouting>\n <mat-row\n *matRowDef=\"let item; columns: columnNames;\"\n (click)=\"navigate(item)\"\n class=\"item clickable\"\n matRipple\n >\n </mat-row>\n </ng-template>\n </mat-table>\n </div>\n </div>\n</ng-template>\n\n<ng-template #cardsLayout let-item=\"item\" let-active=\"active\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngFor=\"let data of data$ | async\">\n <ng-container *ngTemplateOutlet=\"cards; context: { item: data, active }\"></ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #customLayout let-item=\"item\" let-active=\"active\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"customContent; context: { $implicit: data$ | async, data: data$ | async, total: recordsFiltered$ | async, active }\"></ng-container>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i11.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i11.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { kind: "component", type: i12.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "directive", type: i5$1.NiceLoadingDirective, selector: "[niceLoadingOverlay]", inputs: ["niceLoadingOverlay"] }, { kind: "component", type: i13.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i13.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i13.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i13.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i13.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i13.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i13.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i13.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i13.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i13.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i14.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i14.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: NiceQueryBuilderComponent, selector: "nice-query-builder", inputs: ["filterConfigs", "currentSavedReport", "loading"], outputs: ["close", "createReport", "updateReport"] }, { kind: "directive", type: QueryBuilderTriggerDirective, selector: "[niceQueryBuilderTrigger]", inputs: ["queryBuilderFilters", "queryBuilderFiltersLoading"], outputs: ["queryBuilderFilterSelected"] }, { kind: "directive", type: i18.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgeColor", "matBadgeOverlap", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }] });
2606
+ ], usesInheritance: true, ngImport: i0, template: "<div class=\"list page-layout carded fullwidth inner-scroll\" *ngIf=\"layout === 'page'; else content\">\n <div class=\"center\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n</div>\n\n<ng-template #content>\n <ng-container *ngIf=\"listLayout.xl\">\n <div class=\"hidden xl:block\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.xl, active: xlActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.lg\">\n <div class=\"hidden lg:block xl:hidden\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.lg, active: lgActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.md\">\n <div class=\"hidden md:block lg:hidden\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.md, active: mdActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.sm\">\n <div class=\"hidden sm:block md:hidden\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.sm, active: smActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"listLayout.xs\">\n <div class=\"block sm:hidden\">\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.xs, active: xsActive$ | async }\"></ng-container>\n </div>\n </ng-container>\n\n <div\n [class.hidden]=\"!!listLayout.xs\"\n [class.block]=\"!listLayout.xs\"\n [class.sm:hidden]=\"!!listLayout.sm\"\n [class.sm:block]=\"!listLayout.sm\"\n [class.md:hidden]=\"!!listLayout.md\"\n [class.md:block]=\"!listLayout.md\"\n [class.lg:hidden]=\"!!listLayout.lg\"\n [class.lg:block]=\"!listLayout.lg\"\n [class.xl:hidden]=\"!!listLayout.xl\"\n [class.xl:block]=\"!listLayout.xl\"\n >\n <ng-container *ngTemplateOutlet=\"pageLayout; context: { layout: listLayout.default, active: defaultActive$ | async }\"></ng-container>\n </div>\n</ng-template>\n\n<ng-template #pageLayout let-layout=\"layout\" let-active=\"active\">\n <ng-container *ngIf=\"layout?.length; else isObject\">\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: { classes: ['flex flex-col'], items: layout }, active }\"></ng-container>\n </ng-container>\n\n <ng-template #isObject>\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: layout, active }\"></ng-container>\n </ng-template>\n</ng-template>\n\n<ng-template #contentLayout let-layout=\"layout\" let-active=\"active\">\n <div [ngClass]=\"layout.classes\">\n <ng-container *ngFor=\"let item of layout.items\">\n <ng-container *ngIf=\"item.name; else childIsLayout\">\n <ng-container *ngTemplateOutlet=\"layoutItem; context: { item: item, active }\"></ng-container>\n </ng-container>\n <ng-template #childIsLayout>\n <ng-container *ngTemplateOutlet=\"contentLayout; context: { layout: item, active }\"></ng-container>\n </ng-template>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #layoutItem let-item=\"item\" let-active=\"active\">\n <ng-container *ngIf=\"item.name === 'title' && title\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'search'\">\n <div [ngClass]=\"item.classes\">\n <div class=\"search-wrapper mx-md-0\">\n <div class=\"search flex flex-auto justify-start items-center\">\n <mat-icon [svgIcon]=\"icons.search.svgIcon\">{{ icons.search.matIcon }}</mat-icon>\n <input [ngModel]=\"searchQuery$ | async\" (ngModelChange)=\"onUpdateSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n\n <ng-container *ngIf=\"searchButtons\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"searchButtons\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"enableQueryBuilder\">\n <button\n *ngIf=\"!(showQueryBuilder$ | async) && !(rulesCount$ | async) && (filterConfig$ | async).length > 0\"\n mat-icon-button\n niceQueryBuilderTrigger\n [queryBuilderFilters]=\"filterConfig$ | async\"\n [queryBuilderFiltersLoading]=\"(filterConfigLoading$ | async) || false\"\n (queryBuilderFilterSelected)=\"onQueryBuilderFilterSelected($event)\"\n [matTooltip]=\"'general.query_builder.show_advanced_search' | translate\"\n >\n <mat-icon\n [svgIcon]=\"icons.queryBuilder.svgIcon\"\n [matBadge]=\"rulesCount$ | async\"\n [matBadgeHidden]=\"!(rulesCount$ | async)\"\n matBadgeColor=\"accent\"\n >\n {{ icons.queryBuilder.matIcon }}\n </mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"!(showQueryBuilder$ | async) && (rulesCount$ | async)\"\n [disabled]=\"filterConfigLoading$ | async\"\n (click)=\"clickToggleShowQueryBuilder()\"\n [matTooltip]=\"'general.query_builder.show_advanced_search' | translate\"\n >\n <mat-icon\n [svgIcon]=\"icons.queryBuilder.svgIcon\"\n [matBadge]=\"rulesCount$ | async\"\n [matBadgeHidden]=\"!(rulesCount$ | async)\"\n matBadgeColor=\"accent\"\n >\n {{ icons.queryBuilder.matIcon }}\n </mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"showQueryBuilder$ | async\"\n (click)=\"clickToggleShowQueryBuilder()\"\n [matTooltip]=\"'general.query_builder.close_advanced_search' | translate\"\n >\n <mat-icon [svgIcon]=\"icons.close.svgIcon\">{{ icons.close.matIcon }}</mat-icon>\n </button>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'prefixButtons' && prefixButtons\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"prefixButtons\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'suffixButtons' && suffixButtons\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"suffixButtons\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'exportButtons' && canExport\">\n <div [ngClass]=\"item.classes\" [class.mr-2]=\"!!suffixButtons\" [class.ml-2]=\"!!prefixButtons\">\n <button\n (click)=\"clickPrint()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.print' | translate\"\n class=\"list-button mr-2\"\n mat-mini-fab\n >\n <mat-icon [svgIcon]=\"icons.print.svgIcon\">{{ icons.print.matIcon }}</mat-icon>\n </button>\n\n <button\n (click)=\"clickExport()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.export' | translate\"\n class=\"list-button mr-2\"\n mat-mini-fab\n >\n <mat-icon [svgIcon]=\"icons.download.svgIcon\">{{ icons.download.matIcon }}</mat-icon>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'content'\">\n <ng-container *ngIf=\"((isEmpty$ | async) && emptyState) || ((isSearchResultEmpty$ | async) && emptySearchResultState); else showData\">\n\n <ng-container *ngIf=\"(isSearchResultEmpty$ | async)\">\n <ng-container *ngTemplateOutlet=\"emptySearchResultState\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"isEmpty$ | async\">\n <ng-container *ngTemplateOutlet=\"emptyState\"></ng-container>\n </ng-container>\n\n </ng-container>\n <ng-template #showData>\n <ng-container *ngIf=\"layoutContent === 'table' && table\">\n <ng-container *ngTemplateOutlet=\"tableLayout; context: { item: item, active }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"layoutContent === 'cards' && cards\">\n <ng-container *ngTemplateOutlet=\"cardsLayout; context: { item: item, active }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"layoutContent === 'custom' && customContent\">\n <ng-container *ngTemplateOutlet=\"customLayout; context: { item: item, active }\"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'pagination' && layoutContent !== 'custom'\">\n <div [ngClass]=\"item.classes\">\n <mat-paginator\n (page)=\"onUpdatePage($event)\"\n [length]=\"recordsFiltered$ | async\"\n [pageIndex]=\"index$ | async\"\n [pageSizeOptions]=\"defaultPageSizeOptions\"\n [pageSize]=\"length$ | async\"\n [showFirstLastButtons]=\"true\"\n >\n </mat-paginator>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'queryBuilder' && enableQueryBuilder\">\n <div class=\"flex flex-col\" *ngIf=\"showQueryBuilder$ | async\">\n <mat-card class=\"my-4\" [niceLoadingOverlay]=\"filterConfigLoading$ | async\">\n <mat-card-content class=\"flex flex-col\">\n <div class=\"flex-auto\">\n <nice-query-builder\n [filterConfigs]=\"filterConfig$ | async\"\n [ngModel]=\"rules$ | async\"\n (ngModelChange)=\"onUpdateRules($event)\"\n (close)=\"clickToggleShowQueryBuilder()\"\n ></nice-query-builder>\n </div>\n </mat-card-content>\n </mat-card>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.name === 'filters' && filters\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"filters\"></ng-container>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #tableLayout let-item=\"item\">\n <div [ngClass]=\"item.classes\">\n <div\n [niceLoadingOverlay]=\"loading$ | async\"\n class=\"content-card base-list flex flex-col justify-between\"\n >\n <mat-table\n (matSortChange)=\"onUpdateSort($event)\"\n [dataSource]=\"data$\"\n [matSortActive]=\"(sortColumn$ | async) || ''\"\n [matSortDirection]=\"(sortDirection$ | async) || ''\"\n class=\"flex flex-col flex-auto\"\n matSort\n >\n <mat-header-row *matHeaderRowDef=\"columnNames; sticky: table.stickyHeader\"></mat-header-row>\n\n <ng-container *ngFor=\"let column of columns\" [matColumnDef]=\"column.id\">\n <ng-container *ngIf=\"column.sortable\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n <ng-container\n *ngTemplateOutlet=\"table.template; context: { column: column.id, header: true }\"\n ></ng-container>\n </mat-header-cell>\n </ng-container>\n <ng-container *ngIf=\"!column.sortable\">\n <mat-header-cell *matHeaderCellDef>\n <ng-container\n *ngTemplateOutlet=\"table.template; context: { column: column.id, header: true }\"\n ></ng-container>\n </mat-header-cell>\n </ng-container>\n\n <mat-cell *matCellDef=\"let item\">\n <ng-container\n *ngTemplateOutlet=\"table.template; context: { column: column.id, data: true, item: item }\"\n ></ng-container>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngIf=\"disableRouting; else withRouting\">\n <mat-row *matRowDef=\"let item; columns: columnNames;\" class=\"item\"></mat-row>\n </ng-container>\n\n <ng-template #withRouting>\n <mat-row\n *matRowDef=\"let item; columns: columnNames;\"\n (click)=\"navigate(item)\"\n class=\"item clickable\"\n matRipple\n >\n </mat-row>\n </ng-template>\n </mat-table>\n </div>\n </div>\n</ng-template>\n\n<ng-template #cardsLayout let-item=\"item\" let-active=\"active\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngFor=\"let data of data$ | async\">\n <ng-container *ngTemplateOutlet=\"cards; context: { item: data, active }\"></ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #customLayout let-item=\"item\" let-active=\"active\">\n <div [ngClass]=\"item.classes\">\n <ng-container *ngTemplateOutlet=\"customContent; context: { $implicit: data$ | async, data: data$ | async, total: recordsFiltered$ | async, active }\"></ng-container>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i11.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i11.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { kind: "component", type: i12.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "directive", type: i5.NiceLoadingDirective, selector: "[niceLoadingOverlay]", inputs: ["niceLoadingOverlay"] }, { kind: "component", type: i13.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i13.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i13.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i13.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i13.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i13.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i13.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i13.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i13.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i13.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i14.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i14.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: NiceQueryBuilderComponent, selector: "nice-query-builder", inputs: ["filterConfigs", "currentSavedReport", "loading"], outputs: ["close", "createReport", "updateReport"] }, { kind: "directive", type: QueryBuilderTriggerDirective, selector: "[niceQueryBuilderTrigger]", inputs: ["queryBuilderFilters", "queryBuilderFiltersLoading"], outputs: ["queryBuilderFilterSelected"] }, { kind: "directive", type: i18.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgeColor", "matBadgeOverlap", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }] });
2597
2607
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceMultiStateListComponent, decorators: [{
2598
2608
  type: Component,
2599
2609
  args: [{ selector: "nice-multi-state-list", providers: [
@@ -2616,7 +2626,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
2616
2626
  }] }, { type: undefined, decorators: [{
2617
2627
  type: Inject,
2618
2628
  args: [EXPORTS_SETTINGS$1]
2619
- }] }, { type: NiceMultiStateListQuery }, { type: i2.ActivatedRoute }, { type: i3$3.MatBottomSheet }, { type: i2.Router }, { type: i5$1.NiceMediaWatcherService }, { type: NiceMultiStateListService }];
2629
+ }] }, { type: NiceMultiStateListQuery }, { type: i2.ActivatedRoute }, { type: i3$4.MatBottomSheet }, { type: i2.Router }, { type: i5.NiceMediaWatcherService }, { type: NiceMultiStateListService }];
2620
2630
  }, propDecorators: { state: [{
2621
2631
  type: Input
2622
2632
  }] } });
@@ -2737,17 +2747,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
2737
2747
  }]
2738
2748
  }] });
2739
2749
 
2740
- class NiceFilterDataDirective {
2741
- constructor(template) {
2742
- this.template = template;
2750
+ class AdvancedFiltersUtils {
2751
+ static isSingleInput(filterOperator) {
2752
+ if (!filterOperator) {
2753
+ return false;
2754
+ }
2755
+ return AdvancedFiltersUtils.singleInputOperators.includes(filterOperator);
2756
+ }
2757
+ static isDoubleInput(filterOperator) {
2758
+ if (!filterOperator) {
2759
+ return false;
2760
+ }
2761
+ return AdvancedFiltersUtils.doubleInputOperators.includes(filterOperator);
2762
+ }
2763
+ static isNoInput(filterOperator) {
2764
+ if (!filterOperator) {
2765
+ return false;
2766
+ }
2767
+ return AdvancedFiltersUtils.noInputOperators.includes(filterOperator);
2768
+ }
2769
+ static createRule(config, operator) {
2770
+ var _a, _b, _c;
2771
+ const base = {
2772
+ id: config.id,
2773
+ operation: operator || config.operators[0].id
2774
+ };
2775
+ switch (config.type) {
2776
+ case FilterType.Text:
2777
+ return Object.assign(Object.assign({}, base), { value: AdvancedFiltersUtils.isDoubleInput(operator) ? ["", ""] : "" });
2778
+ case FilterType.Select:
2779
+ return Object.assign(Object.assign({}, base), { value: AdvancedFiltersUtils.isDoubleInput(operator) ? [null, null] : null });
2780
+ case FilterType.Date:
2781
+ return Object.assign(Object.assign({}, base), { value: AdvancedFiltersUtils.isDoubleInput(operator) ? [new Date(), new Date()] : new Date() });
2782
+ case FilterType.Radio:
2783
+ return Object.assign(Object.assign({}, base), { value: AdvancedFiltersUtils.isDoubleInput(operator)
2784
+ ? [(_a = config.options) === null || _a === void 0 ? void 0 : _a[0].key, (_b = config.options) === null || _b === void 0 ? void 0 : _b[0].key]
2785
+ : (_c = config.options) === null || _c === void 0 ? void 0 : _c[0].key });
2786
+ case FilterType.Number:
2787
+ return Object.assign(Object.assign({}, base), { value: AdvancedFiltersUtils.isDoubleInput(operator) ? [0, 0] : 0 });
2788
+ }
2743
2789
  }
2744
2790
  }
2745
- NiceFilterDataDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterDataDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
2746
- NiceFilterDataDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterDataDirective, selector: "[niceFilterData]", ngImport: i0 });
2747
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterDataDirective, decorators: [{
2748
- type: Directive,
2749
- args: [{ selector: "[niceFilterData]" }]
2750
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
2791
+ AdvancedFiltersUtils.noInputOperators = [
2792
+ FilterOperatorTypes.IsEmpty,
2793
+ FilterOperatorTypes.IsNotEmpty,
2794
+ FilterOperatorTypes.IsNull,
2795
+ FilterOperatorTypes.IsNotNull,
2796
+ FilterOperatorTypes.None
2797
+ ];
2798
+ AdvancedFiltersUtils.singleInputOperators = [
2799
+ FilterOperatorTypes.Equal,
2800
+ FilterOperatorTypes.NotEqual,
2801
+ FilterOperatorTypes.Less,
2802
+ FilterOperatorTypes.LessOrEqual,
2803
+ FilterOperatorTypes.Greater,
2804
+ FilterOperatorTypes.GreaterOrEqual,
2805
+ FilterOperatorTypes.BeginsWith,
2806
+ FilterOperatorTypes.NotBeginsWith,
2807
+ FilterOperatorTypes.EndsWith,
2808
+ FilterOperatorTypes.NotEndsWith,
2809
+ FilterOperatorTypes.Contains,
2810
+ FilterOperatorTypes.NotContains
2811
+ ];
2812
+ AdvancedFiltersUtils.doubleInputOperators = [
2813
+ FilterOperatorTypes.Between,
2814
+ FilterOperatorTypes.NotBetween
2815
+ ];
2816
+
2817
+ const ADVANCED_FILTER_ICONS = new InjectionToken("advanced_filter_icons");
2751
2818
 
2752
2819
  const EXPORTS_SETTINGS = new InjectionToken("exports_settings");
2753
2820
  const FILTER_VIEW_ICONS = new InjectionToken("filter_view_icons");
@@ -2858,6 +2925,10 @@ class NiceFilterViewStore extends EntityStore {
2858
2925
  }
2859
2926
  return parameters;
2860
2927
  }
2928
+ getSubState(name) {
2929
+ const { subStates } = this.getValue();
2930
+ return subStates[name];
2931
+ }
2861
2932
  }
2862
2933
  NiceFilterViewStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewStore, deps: [{ token: FILTER_VIEW_STATE }, { token: FILTER_VIEW_STORE }], target: i0.ɵɵFactoryTarget.Injectable });
2863
2934
  NiceFilterViewStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewStore });
@@ -2878,6 +2949,9 @@ class NiceFilterViewQuery extends QueryEntity {
2878
2949
  super(store);
2879
2950
  this.store = store;
2880
2951
  }
2952
+ selectSubState(name) {
2953
+ return this.select((state) => state.subStates[name]);
2954
+ }
2881
2955
  selectFilterConfigLoading() {
2882
2956
  return this.select("filterConfigLoading");
2883
2957
  }
@@ -2893,6 +2967,9 @@ class NiceFilterViewQuery extends QueryEntity {
2893
2967
  getParameters() {
2894
2968
  return this.store.getParameters(this.store.getValue().filterParameters);
2895
2969
  }
2970
+ getSubState(name) {
2971
+ return this.store.getSubState(name);
2972
+ }
2896
2973
  }
2897
2974
  NiceFilterViewQuery.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewQuery, deps: [{ token: NiceFilterViewStore }], target: i0.ɵɵFactoryTarget.Injectable });
2898
2975
  NiceFilterViewQuery.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewQuery });
@@ -2900,22 +2977,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
2900
2977
  type: Injectable
2901
2978
  }], ctorParameters: function () { return [{ type: NiceFilterViewStore }]; } });
2902
2979
 
2903
- class NiceFilterCustomDataViewComponent {
2904
- constructor(query) {
2905
- this.query = query;
2906
- this.data$ = this.query.selectAll();
2907
- }
2908
- }
2909
- NiceFilterCustomDataViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterCustomDataViewComponent, deps: [{ token: NiceFilterViewQuery }], target: i0.ɵɵFactoryTarget.Component });
2910
- NiceFilterCustomDataViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterCustomDataViewComponent, selector: "nice-filter-custom-data-view, div[nice-filter-custom-data-view]", queries: [{ propertyName: "content", first: true, predicate: NiceFilterDataDirective, descendants: true, read: TemplateRef }], ngImport: i0, template: "<ng-container *ngIf=\"content\">\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: data$ | async }\"></ng-container>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
2911
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterCustomDataViewComponent, decorators: [{
2912
- type: Component,
2913
- args: [{ selector: "nice-filter-custom-data-view, div[nice-filter-custom-data-view]", encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"content\">\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: data$ | async }\"></ng-container>\n</ng-container>\n" }]
2914
- }], ctorParameters: function () { return [{ type: NiceFilterViewQuery }]; }, propDecorators: { content: [{
2915
- type: ContentChild,
2916
- args: [NiceFilterDataDirective, { read: TemplateRef }]
2917
- }] } });
2918
-
2919
2980
  class NiceFilterViewService {
2920
2981
  constructor(store, filterService) {
2921
2982
  this.store = store;
@@ -2929,6 +2990,11 @@ class NiceFilterViewService {
2929
2990
  disabled: true
2930
2991
  });
2931
2992
  }
2993
+ updateSubState(name, value) {
2994
+ this.store.update((state) => ({
2995
+ subStates: Object.assign(Object.assign({}, state.subStates), { [name]: value })
2996
+ }));
2997
+ }
2932
2998
  enable() {
2933
2999
  this.store.update({
2934
3000
  disabled: false
@@ -3046,6 +3112,8 @@ class NiceFilterViewService {
3046
3112
  const { filterParameters } = this.store.getValue();
3047
3113
  const newRules = {
3048
3114
  order: filterParameters.order,
3115
+ start: 0,
3116
+ length: filterParameters.length,
3049
3117
  rules
3050
3118
  };
3051
3119
  this.setParameters(newRules, reload);
@@ -3130,126 +3198,905 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
3130
3198
  }] }];
3131
3199
  } });
3132
3200
 
3133
- class NiceFilterExportButtonsComponent {
3134
- constructor(icons, exportsSettings, query, service, bottomSheet) {
3135
- this.icons = icons;
3136
- this.exportsSettings = exportsSettings;
3137
- this.query = query;
3201
+ class NiceFilterGroupIconPipe {
3202
+ constructor(service) {
3138
3203
  this.service = service;
3139
- this.bottomSheet = bottomSheet;
3140
- this.customExport = [];
3141
- this.downloadFileName = "data";
3142
- this.loading$ = this.query.selectLoading();
3143
3204
  }
3144
- clickExport() {
3145
- const exports = [];
3146
- if (this.exportsSettings.xlsx) {
3147
- exports.push({
3148
- type: "xlsx",
3149
- onClickExport: () => this.clickXlsx()
3150
- });
3151
- }
3152
- if (this.exportsSettings.csv) {
3153
- exports.push({
3154
- type: "csv",
3155
- onClickExport: () => this.clickCsv()
3156
- });
3205
+ transform(value) {
3206
+ if (!this.service) {
3207
+ return null;
3157
3208
  }
3158
- if (this.exportsSettings.pdf) {
3159
- exports.push({
3160
- type: "pdf",
3161
- onClickExport: () => this.clickPdf()
3162
- });
3209
+ const icon = this.service.getFilterGroupIconClass(value);
3210
+ if (typeof icon === "string") {
3211
+ return {
3212
+ class: icon
3213
+ };
3163
3214
  }
3164
- this.bottomSheet.open(ExportBottomSheetComponent, {
3165
- data: {
3166
- exportStrategies: [
3167
- ...exports,
3168
- ...this.customExport
3169
- ]
3170
- }
3171
- });
3215
+ return icon;
3172
3216
  }
3173
- clickXlsx() {
3174
- this.service.downloadData("xlsx", this.downloadFileName);
3217
+ }
3218
+ NiceFilterGroupIconPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterGroupIconPipe, deps: [{ token: NiceFilterGroupService, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
3219
+ NiceFilterGroupIconPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterGroupIconPipe, name: "niceFilterGroupIcon" });
3220
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterGroupIconPipe, decorators: [{
3221
+ type: Pipe,
3222
+ args: [{
3223
+ name: "niceFilterGroupIcon"
3224
+ }]
3225
+ }], ctorParameters: function () {
3226
+ return [{ type: NiceFilterGroupService, decorators: [{
3227
+ type: Optional
3228
+ }] }];
3229
+ } });
3230
+
3231
+ class NiceAdvancedFilterSelectionComponent {
3232
+ constructor(query) {
3233
+ this.query = query;
3234
+ this.filterSelected = new EventEmitter();
3235
+ this.loading$ = this.query.selectFilterConfigLoading();
3236
+ this.filterGroups$ = this.query.selectFilterConfig().pipe(map((config) => {
3237
+ const groups = ArrayUtils.uniqueObjects(config.map(x => x.group), x => x === null || x === void 0 ? void 0 : x.key);
3238
+ const result = [];
3239
+ for (const group of groups) {
3240
+ if (!group) {
3241
+ continue;
3242
+ }
3243
+ result.push([group, config.filter(x => { var _a; return ((_a = x.group) === null || _a === void 0 ? void 0 : _a.key) === group.key; })]);
3244
+ }
3245
+ return result.sort(([, a], [, b]) => b.length - a.length);
3246
+ }));
3175
3247
  }
3176
- clickCsv() {
3177
- this.service.downloadData("csv", this.downloadFileName);
3248
+ selectFilter(filterConfigurationModel) {
3249
+ this.filterSelected.emit(filterConfigurationModel);
3178
3250
  }
3179
- clickPrint() {
3180
- this.service.printData();
3251
+ trackGroups(index, value) {
3252
+ var _a, _b;
3253
+ return (_b = (_a = value[0]) === null || _a === void 0 ? void 0 : _a.key) !== null && _b !== void 0 ? _b : index;
3181
3254
  }
3182
- clickPdf() {
3183
- this.service.downloadData("pdf", this.downloadFileName);
3255
+ trackFilter(index, value) {
3256
+ var _a;
3257
+ return (_a = value.id) !== null && _a !== void 0 ? _a : index;
3184
3258
  }
3185
3259
  }
3186
- NiceFilterExportButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterExportButtonsComponent, deps: [{ token: FILTER_VIEW_ICONS }, { token: EXPORTS_SETTINGS }, { token: NiceFilterViewQuery }, { token: NiceFilterViewService }, { token: i3$3.MatBottomSheet }], target: i0.ɵɵFactoryTarget.Component });
3187
- NiceFilterExportButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterExportButtonsComponent, selector: "nice-filter-export-buttons, div[nice-filter-export-buttons]", inputs: { customExport: "customExport", downloadFileName: "downloadFileName" }, ngImport: i0, template: "<button\n (click)=\"clickPrint()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.print' | translate\"\n class=\"export-button\"\n mat-mini-fab\n>\n <mat-icon [svgIcon]=\"icons.print.svgIcon\">{{ icons.print.matIcon }}</mat-icon>\n</button>\n\n<button\n (click)=\"clickExport()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.export' | translate\"\n class=\"export-button\"\n mat-mini-fab\n>\n <mat-icon [svgIcon]=\"icons.download.svgIcon\">{{ icons.download.matIcon }}</mat-icon>\n</button>\n", styles: [""], dependencies: [{ kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
3188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterExportButtonsComponent, decorators: [{
3260
+ NiceAdvancedFilterSelectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedFilterSelectionComponent, deps: [{ token: NiceFilterViewQuery }], target: i0.ɵɵFactoryTarget.Component });
3261
+ NiceAdvancedFilterSelectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceAdvancedFilterSelectionComponent, selector: "nice-advanced-filter-selection", outputs: { filterSelected: "filterSelected" }, ngImport: i0, template: "<mat-card class=\"flex flex-row flex-wrap filter-selection-container\" [niceLoadingOverlay]=\"loading$ | async\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\" *ngIf=\"filterGroups$ | async as filterGroups\">\n <div class=\"flex flex-col\" *ngFor=\"let group of filterGroups; trackBy: trackGroups\">\n <div class=\"filter-group flex items-center gap-4 pb-4\">\n <ng-container *ngIf=\"group[0].key | niceFilterGroupIcon as icon\">\n <i mat-list-icon class=\"group-icon fal\" [ngClass]=\"icon.class\" *ngIf=\"icon.class\"></i>\n <mat-icon mat-list-icon class=\"group-icon\" [svgIcon]=\"icon.svgIcon\" *ngIf=\"icon.svgIcon\"></mat-icon>\n <mat-icon mat-list-icon class=\"group-icon\" *ngIf=\"icon.matIcon\">{{ icon.matIcon }}</mat-icon>\n </ng-container>\n\n <strong class=\"group-name\">{{ group[0].name }}</strong>\n </div>\n\n <div class=\"filter-item\" matRipple *ngFor=\"let filter of group[1]; trackBy: trackFilter\" (click)=\"selectFilter(filter)\">\n {{ filter?.name }}\n </div>\n </div>\n </div>\n</mat-card>\n", dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i11.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "directive", type: i3.MatListIconCssMatStyler, selector: "[mat-list-icon], [matListIcon]" }, { kind: "directive", type: i5.NiceLoadingDirective, selector: "[niceLoadingOverlay]", inputs: ["niceLoadingOverlay"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: NiceFilterGroupIconPipe, name: "niceFilterGroupIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
3262
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedFilterSelectionComponent, decorators: [{
3189
3263
  type: Component,
3190
- args: [{ selector: "nice-filter-export-buttons, div[nice-filter-export-buttons]", encapsulation: ViewEncapsulation.None, template: "<button\n (click)=\"clickPrint()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.print' | translate\"\n class=\"export-button\"\n mat-mini-fab\n>\n <mat-icon [svgIcon]=\"icons.print.svgIcon\">{{ icons.print.matIcon }}</mat-icon>\n</button>\n\n<button\n (click)=\"clickExport()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.export' | translate\"\n class=\"export-button\"\n mat-mini-fab\n>\n <mat-icon [svgIcon]=\"icons.download.svgIcon\">{{ icons.download.matIcon }}</mat-icon>\n</button>\n" }]
3191
- }], ctorParameters: function () {
3192
- return [{ type: undefined, decorators: [{
3193
- type: Inject,
3194
- args: [FILTER_VIEW_ICONS]
3195
- }] }, { type: undefined, decorators: [{
3196
- type: Inject,
3197
- args: [EXPORTS_SETTINGS]
3198
- }] }, { type: NiceFilterViewQuery }, { type: NiceFilterViewService }, { type: i3$3.MatBottomSheet }];
3199
- }, propDecorators: { customExport: [{
3200
- type: Input
3201
- }], downloadFileName: [{
3202
- type: Input
3264
+ args: [{ selector: "nice-advanced-filter-selection", encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-card class=\"flex flex-row flex-wrap filter-selection-container\" [niceLoadingOverlay]=\"loading$ | async\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\" *ngIf=\"filterGroups$ | async as filterGroups\">\n <div class=\"flex flex-col\" *ngFor=\"let group of filterGroups; trackBy: trackGroups\">\n <div class=\"filter-group flex items-center gap-4 pb-4\">\n <ng-container *ngIf=\"group[0].key | niceFilterGroupIcon as icon\">\n <i mat-list-icon class=\"group-icon fal\" [ngClass]=\"icon.class\" *ngIf=\"icon.class\"></i>\n <mat-icon mat-list-icon class=\"group-icon\" [svgIcon]=\"icon.svgIcon\" *ngIf=\"icon.svgIcon\"></mat-icon>\n <mat-icon mat-list-icon class=\"group-icon\" *ngIf=\"icon.matIcon\">{{ icon.matIcon }}</mat-icon>\n </ng-container>\n\n <strong class=\"group-name\">{{ group[0].name }}</strong>\n </div>\n\n <div class=\"filter-item\" matRipple *ngFor=\"let filter of group[1]; trackBy: trackFilter\" (click)=\"selectFilter(filter)\">\n {{ filter?.name }}\n </div>\n </div>\n </div>\n</mat-card>\n" }]
3265
+ }], ctorParameters: function () { return [{ type: NiceFilterViewQuery }]; }, propDecorators: { filterSelected: [{
3266
+ type: Output
3203
3267
  }] } });
3204
3268
 
3205
- class NiceFilterExportDirective {
3206
- constructor(service) {
3269
+ class AdvancedFiltersTriggerDirective {
3270
+ constructor(query, service, overlayPositionBuilder, elementRef, overlay, platform, injector) {
3271
+ this.query = query;
3207
3272
  this.service = service;
3208
- this.downloadFileName = "data";
3273
+ this.overlayPositionBuilder = overlayPositionBuilder;
3274
+ this.elementRef = elementRef;
3275
+ this.overlay = overlay;
3276
+ this.platform = platform;
3277
+ this.injector = injector;
3278
+ this.position = "bottomCenter";
3279
+ this.advancedFilterSelected = new EventEmitter();
3209
3280
  }
3210
- onClick() {
3211
- this.service.downloadData(this.type, this.downloadFileName);
3281
+ get connectedPosition() {
3282
+ if (this.position === "topRight") {
3283
+ return {
3284
+ originX: "end",
3285
+ originY: "top",
3286
+ overlayX: "start",
3287
+ overlayY: "top",
3288
+ offsetX: 15
3289
+ };
3290
+ }
3291
+ return {
3292
+ originX: "center",
3293
+ originY: "bottom",
3294
+ overlayX: "center",
3295
+ overlayY: "top"
3296
+ };
3297
+ }
3298
+ click() {
3299
+ const positionStrategy = this.overlayPositionBuilder.flexibleConnectedTo(this.elementRef).withPositions([
3300
+ this.connectedPosition
3301
+ ]);
3302
+ this.overlayRef = this.overlay.create({
3303
+ positionStrategy,
3304
+ hasBackdrop: true,
3305
+ backdropClass: "cdk-overlay-transparent-backdrop",
3306
+ scrollStrategy: this.overlay.scrollStrategies.block()
3307
+ });
3308
+ const filterSelectionPortal = new ComponentPortal(NiceAdvancedFilterSelectionComponent, null, this.injector);
3309
+ this.filterSelectionRef = this.overlayRef.attach(filterSelectionPortal);
3310
+ this.updateFilterSelectionComponent();
3311
+ this.overlayRef.backdropClick().subscribe(() => this.close());
3312
+ }
3313
+ close() {
3314
+ this.overlayRef.dispose();
3315
+ }
3316
+ updateFilterSelectionComponent() {
3317
+ if (!this.filterSelectionRef) {
3318
+ return;
3319
+ }
3320
+ this.filterSelectionRef.instance.filterSelected.subscribe((filter) => {
3321
+ this.advancedFilterSelected.emit(filter);
3322
+ this.close();
3323
+ });
3212
3324
  }
3213
3325
  }
3214
- NiceFilterExportDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterExportDirective, deps: [{ token: NiceFilterViewService }], target: i0.ɵɵFactoryTarget.Directive });
3215
- NiceFilterExportDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterExportDirective, selector: "[niceFilterExport]", inputs: { type: "type", downloadFileName: "downloadFileName" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
3216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterExportDirective, decorators: [{
3326
+ AdvancedFiltersTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: AdvancedFiltersTriggerDirective, deps: [{ token: NiceFilterViewQuery }, { token: NiceFilterViewService }, { token: i1.OverlayPositionBuilder }, { token: i0.ElementRef }, { token: i1.Overlay }, { token: i2$2.Platform }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
3327
+ AdvancedFiltersTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: AdvancedFiltersTriggerDirective, selector: "[niceAdvancedFiltersTrigger]", inputs: { position: "position" }, outputs: { advancedFilterSelected: "advancedFilterSelected" }, host: { listeners: { "click": "click()" } }, exportAs: ["niceAdvancedFiltersTrigger"], ngImport: i0 });
3328
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: AdvancedFiltersTriggerDirective, decorators: [{
3217
3329
  type: Directive,
3218
- args: [{ selector: "[niceFilterExport]" }]
3219
- }], ctorParameters: function () { return [{ type: NiceFilterViewService }]; }, propDecorators: { type: [{
3330
+ args: [{ selector: "[niceAdvancedFiltersTrigger]", exportAs: "niceAdvancedFiltersTrigger" }]
3331
+ }], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: NiceFilterViewService }, { type: i1.OverlayPositionBuilder }, { type: i0.ElementRef }, { type: i1.Overlay }, { type: i2$2.Platform }, { type: i0.Injector }]; }, propDecorators: { position: [{
3220
3332
  type: Input
3221
- }], downloadFileName: [{
3222
- type: Input
3223
- }], onClick: [{
3333
+ }], advancedFilterSelected: [{
3334
+ type: Output
3335
+ }], click: [{
3224
3336
  type: HostListener,
3225
3337
  args: ["click"]
3226
3338
  }] } });
3227
3339
 
3228
- class NiceFilterInfiniteScrollDataViewComponent {
3229
- constructor(query, service) {
3340
+ class NiceAdvancedFiltersButtonComponent {
3341
+ constructor(icons, query, service) {
3342
+ this.icons = icons;
3230
3343
  this.query = query;
3231
3344
  this.service = service;
3232
- this.data$ = this.query.selectAll();
3345
+ this.shouldShowAdvancedFilters$ = this.query.selectSubState("showAdvancedFilters");
3346
+ this.hasParameters$ = this.query.selectFilterParameters().pipe(map((parameter) => { var _a; return !!((_a = parameter.rules) === null || _a === void 0 ? void 0 : _a.length); }));
3233
3347
  }
3234
- loadNextPage() {
3235
- return __awaiter(this, void 0, void 0, function* () {
3236
- const { filterParameters } = this.query.getValue();
3237
- this.service.setMode("accumulated");
3238
- yield this.service.setParameters(Object.assign(Object.assign({}, filterParameters), { start: filterParameters.start + filterParameters.length }), true);
3239
- });
3348
+ clickToggleShowAdvancedFilters() {
3349
+ this.service.updateSubState("showAdvancedFilters", !this.query.getSubState("showAdvancedFilters"));
3350
+ }
3351
+ onSelectedFilter(filter) {
3352
+ const rule = AdvancedFiltersUtils.createRule(filter);
3353
+ this.service.setRules([{ condition: "and", rules: [rule] }], false);
3354
+ this.service.updateSubState("showAdvancedFilters", true);
3240
3355
  }
3241
3356
  }
3242
- NiceFilterInfiniteScrollDataViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterInfiniteScrollDataViewComponent, deps: [{ token: NiceFilterViewQuery }, { token: NiceFilterViewService }], target: i0.ɵɵFactoryTarget.Component });
3243
- NiceFilterInfiniteScrollDataViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterInfiniteScrollDataViewComponent, selector: "nice-filter-infinite-scroll-data-view, div[nice-filter-infinite-scroll-data-view]", queries: [{ propertyName: "content", first: true, predicate: NiceFilterDataDirective, descendants: true, read: TemplateRef }], ngImport: i0, template: "<ng-container *ngIf=\"content\">\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: data$ | async }\"></ng-container>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
3244
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterInfiniteScrollDataViewComponent, decorators: [{
3357
+ NiceAdvancedFiltersButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedFiltersButtonComponent, deps: [{ token: ADVANCED_FILTER_ICONS, optional: true }, { token: NiceFilterViewQuery }, { token: NiceFilterViewService }], target: i0.ɵɵFactoryTarget.Component });
3358
+ NiceAdvancedFiltersButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceAdvancedFiltersButtonComponent, selector: "nice-advanced-filters-button", ngImport: i0, template: "<div class=\"relative\">\n <ng-container *ngIf=\"(hasParameters$ | async) && (shouldShowAdvancedFilters$ | async) !== true\">\n <div class=\"absolute top-2 right-2 w-1 h-1 rounded bg-accent\"></div>\n\n <button mat-icon-button (click)=\"clickToggleShowAdvancedFilters()\">\n <mat-icon [svgIcon]=\"icons.queryBuilder.svgIcon\">{{ icons.queryBuilder.matIcon }}</mat-icon>\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"shouldShowAdvancedFilters$ | async\">\n <button mat-icon-button (click)=\"clickToggleShowAdvancedFilters()\">\n <mat-icon [svgIcon]=\"icons.close.svgIcon\">{{ icons.close.matIcon }}</mat-icon>\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"(hasParameters$ | async) !== true && (shouldShowAdvancedFilters$ | async) !== true\">\n <button mat-icon-button niceAdvancedFiltersTrigger (advancedFilterSelected)=\"onSelectedFilter($event)\">\n <mat-icon [svgIcon]=\"icons.queryBuilder.svgIcon\">{{ icons.queryBuilder.matIcon }}</mat-icon>\n </button>\n </ng-container>\n</div>\n", styles: ["nice-advanced-filters-button{width:40px;height:40px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: AdvancedFiltersTriggerDirective, selector: "[niceAdvancedFiltersTrigger]", inputs: ["position"], outputs: ["advancedFilterSelected"], exportAs: ["niceAdvancedFiltersTrigger"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
3359
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedFiltersButtonComponent, decorators: [{
3245
3360
  type: Component,
3246
- args: [{ selector: "nice-filter-infinite-scroll-data-view, div[nice-filter-infinite-scroll-data-view]", encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"content\">\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: data$ | async }\"></ng-container>\n</ng-container>\n" }]
3247
- }], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: NiceFilterViewService }]; }, propDecorators: { content: [{
3248
- type: ContentChild,
3249
- args: [NiceFilterDataDirective, { read: TemplateRef }]
3250
- }] } });
3361
+ args: [{ selector: "nice-advanced-filters-button", encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"relative\">\n <ng-container *ngIf=\"(hasParameters$ | async) && (shouldShowAdvancedFilters$ | async) !== true\">\n <div class=\"absolute top-2 right-2 w-1 h-1 rounded bg-accent\"></div>\n\n <button mat-icon-button (click)=\"clickToggleShowAdvancedFilters()\">\n <mat-icon [svgIcon]=\"icons.queryBuilder.svgIcon\">{{ icons.queryBuilder.matIcon }}</mat-icon>\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"shouldShowAdvancedFilters$ | async\">\n <button mat-icon-button (click)=\"clickToggleShowAdvancedFilters()\">\n <mat-icon [svgIcon]=\"icons.close.svgIcon\">{{ icons.close.matIcon }}</mat-icon>\n </button>\n </ng-container>\n\n <ng-container *ngIf=\"(hasParameters$ | async) !== true && (shouldShowAdvancedFilters$ | async) !== true\">\n <button mat-icon-button niceAdvancedFiltersTrigger (advancedFilterSelected)=\"onSelectedFilter($event)\">\n <mat-icon [svgIcon]=\"icons.queryBuilder.svgIcon\">{{ icons.queryBuilder.matIcon }}</mat-icon>\n </button>\n </ng-container>\n</div>\n", styles: ["nice-advanced-filters-button{width:40px;height:40px}\n"] }]
3362
+ }], ctorParameters: function () {
3363
+ return [{ type: undefined, decorators: [{
3364
+ type: Optional
3365
+ }, {
3366
+ type: Inject,
3367
+ args: [ADVANCED_FILTER_ICONS]
3368
+ }] }, { type: NiceFilterViewQuery }, { type: NiceFilterViewService }];
3369
+ } });
3251
3370
 
3252
- class NiceFilterSearchComponent {
3371
+ class FilterFormValues {
3372
+ }
3373
+ __decorate([
3374
+ Control(),
3375
+ Required(),
3376
+ __metadata("design:type", Object)
3377
+ ], FilterFormValues.prototype, "value", void 0);
3378
+ __decorate([
3379
+ Control(),
3380
+ AddValidatorIf(({ parent }) => parent.needsTwoValues, Validators.required),
3381
+ __metadata("design:type", Object)
3382
+ ], FilterFormValues.prototype, "secondValue", void 0);
3383
+ class FilterForm {
3384
+ constructor(value) {
3385
+ if (!value) {
3386
+ return;
3387
+ }
3388
+ if (value.id) {
3389
+ const rule = value;
3390
+ const needsTwoValues = QBFilterUtils.isDoubleInput(rule.operation);
3391
+ Object.assign(this, {
3392
+ id: rule.id,
3393
+ operation: rule.operation,
3394
+ condition: "or",
3395
+ needsTwoValues,
3396
+ values: [
3397
+ {
3398
+ value: needsTwoValues ? rule.value[0] : rule.value,
3399
+ secondValue: needsTwoValues ? rule.value[1] : undefined
3400
+ }
3401
+ ]
3402
+ });
3403
+ return;
3404
+ }
3405
+ const query = value;
3406
+ const firstRule = query.rules[0];
3407
+ if (!query.rules.every((rule) => rule.id === firstRule.id)) {
3408
+ return;
3409
+ }
3410
+ const firstRuleNeedsTwoValues = QBFilterUtils.isDoubleInput(firstRule.operation);
3411
+ Object.assign(this, {
3412
+ id: firstRule.id,
3413
+ operation: firstRule.operation,
3414
+ condition: query.condition,
3415
+ needsTwoValues: firstRuleNeedsTwoValues,
3416
+ values: query.rules.map((rule) => ({
3417
+ value: firstRuleNeedsTwoValues ? rule.value[0] : rule.value,
3418
+ secondValue: firstRuleNeedsTwoValues ? rule.value[1] : undefined
3419
+ }))
3420
+ });
3421
+ return;
3422
+ }
3423
+ transform() {
3424
+ if (this.values.length === 1) {
3425
+ const value = this.values[0];
3426
+ return {
3427
+ id: this.id,
3428
+ operation: this.operation,
3429
+ value: this.needsTwoValues ? [value.value, value.secondValue] : value.value
3430
+ };
3431
+ }
3432
+ return {
3433
+ condition: this.condition,
3434
+ rules: this.values.map((value) => ({
3435
+ id: this.id,
3436
+ operation: this.operation,
3437
+ value: this.needsTwoValues ? [value.value, value.secondValue] : value.value
3438
+ }))
3439
+ };
3440
+ }
3441
+ }
3442
+ __decorate([
3443
+ Control(),
3444
+ Required(),
3445
+ __metadata("design:type", String)
3446
+ ], FilterForm.prototype, "id", void 0);
3447
+ __decorate([
3448
+ Control(),
3449
+ Required(),
3450
+ __metadata("design:type", String)
3451
+ ], FilterForm.prototype, "operation", void 0);
3452
+ __decorate([
3453
+ Control(),
3454
+ __metadata("design:type", Boolean)
3455
+ ], FilterForm.prototype, "needsTwoValues", void 0);
3456
+ __decorate([
3457
+ Control(),
3458
+ Required(),
3459
+ __metadata("design:type", String)
3460
+ ], FilterForm.prototype, "condition", void 0);
3461
+ __decorate([
3462
+ Array$1(FilterFormValues),
3463
+ __metadata("design:type", Array$1)
3464
+ ], FilterForm.prototype, "values", void 0);
3465
+ class AdvancedFiltersForm {
3466
+ constructor(query) {
3467
+ if (!query) {
3468
+ return;
3469
+ }
3470
+ if (!(query === null || query === void 0 ? void 0 : query.rules)) {
3471
+ this.rules = [];
3472
+ this.condition = "and";
3473
+ }
3474
+ this.condition = query.condition;
3475
+ this.rules = query.rules.map(x => new FilterForm(x));
3476
+ }
3477
+ transform() {
3478
+ return {
3479
+ condition: this.condition,
3480
+ rules: this.rules.map((rule) => rule.transform())
3481
+ };
3482
+ }
3483
+ }
3484
+ __decorate([
3485
+ Array$1(FilterForm),
3486
+ __metadata("design:type", Array$1)
3487
+ ], AdvancedFiltersForm.prototype, "rules", void 0);
3488
+ __decorate([
3489
+ Control({ defaultValue: "and" }),
3490
+ Required(),
3491
+ __metadata("design:type", String)
3492
+ ], AdvancedFiltersForm.prototype, "condition", void 0);
3493
+
3494
+ class AdvancedFiltersAsyncTypeaheadProvider extends NiceAsyncTypeaheadProvider {
3495
+ constructor(filterService) {
3496
+ super();
3497
+ this.filterService = filterService;
3498
+ this.resource = "advancedFilter";
3499
+ }
3500
+ getById(id, options) {
3501
+ return lastValueFrom(this.filterService.searchFilterResourceValue(options.filterConfig, id));
3502
+ }
3503
+ search(searchQuery, page, options) {
3504
+ return __awaiter(this, void 0, void 0, function* () {
3505
+ const res = yield lastValueFrom(this.filterService.searchFilterValue(options.filterConfig, searchQuery));
3506
+ return {
3507
+ items: res,
3508
+ nextPage: null
3509
+ };
3510
+ });
3511
+ }
3512
+ format(item) {
3513
+ return item.name;
3514
+ }
3515
+ }
3516
+ AdvancedFiltersAsyncTypeaheadProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: AdvancedFiltersAsyncTypeaheadProvider, deps: [{ token: NiceFilterService }], target: i0.ɵɵFactoryTarget.Injectable });
3517
+ AdvancedFiltersAsyncTypeaheadProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: AdvancedFiltersAsyncTypeaheadProvider });
3518
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: AdvancedFiltersAsyncTypeaheadProvider, decorators: [{
3519
+ type: Injectable
3520
+ }], ctorParameters: function () { return [{ type: NiceFilterService }]; } });
3521
+
3522
+ class FilterComponent {
3523
+ constructor() {
3524
+ this.propagateChanges = (_) => { };
3525
+ }
3526
+ get value() {
3527
+ return this._value;
3528
+ }
3529
+ registerOnTouched(fn) {
3530
+ // NO-OP
3531
+ }
3532
+ registerOnChange(fn) {
3533
+ this.propagateChanges = fn;
3534
+ }
3535
+ writeValue(value) {
3536
+ this._value = value;
3537
+ }
3538
+ onValueChange(value) {
3539
+ this.propagateChanges(value);
3540
+ }
3541
+ }
3542
+ FilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3543
+ FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: FilterComponent, selector: "ng-component", ngImport: i0, template: ``, isInline: true });
3544
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FilterComponent, decorators: [{
3545
+ type: Component,
3546
+ args: [{ template: `` }]
3547
+ }] });
3548
+
3549
+ class NiceAdvancedDateFilterComponent extends FilterComponent {
3550
+ constructor(icons) {
3551
+ super();
3552
+ this.icons = icons;
3553
+ }
3554
+ }
3555
+ NiceAdvancedDateFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedDateFilterComponent, deps: [{ token: ADVANCED_FILTER_ICONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });
3556
+ NiceAdvancedDateFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceAdvancedDateFilterComponent, selector: "nice-advanced-date-filter", providers: [
3557
+ {
3558
+ provide: NG_VALUE_ACCESSOR,
3559
+ useExisting: forwardRef(() => NiceAdvancedDateFilterComponent),
3560
+ multi: true
3561
+ }
3562
+ ], usesInheritance: true, ngImport: i0, template: "<mat-form-field appearance=\"outline\" class=\"flex-auto\">\n <input matInput [matDatepicker]=\"picker\" [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\" />\n <mat-datepicker-toggle matSuffix [for]=\"picker\">\n <mat-icon matDatepickerToggleIcon [svgIcon]=\"icons.datePicker.svgIcon\">{{ icons.datePicker.matIcon }}</mat-icon>\n </mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$2.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$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i5$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i5$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i5$1.MatDatepickerToggleIcon, selector: "[matDatepickerToggleIcon]" }], encapsulation: i0.ViewEncapsulation.None });
3563
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedDateFilterComponent, decorators: [{
3564
+ type: Component,
3565
+ args: [{ selector: "nice-advanced-date-filter", encapsulation: ViewEncapsulation.None, providers: [
3566
+ {
3567
+ provide: NG_VALUE_ACCESSOR,
3568
+ useExisting: forwardRef(() => NiceAdvancedDateFilterComponent),
3569
+ multi: true
3570
+ }
3571
+ ], template: "<mat-form-field appearance=\"outline\" class=\"flex-auto\">\n <input matInput [matDatepicker]=\"picker\" [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\" />\n <mat-datepicker-toggle matSuffix [for]=\"picker\">\n <mat-icon matDatepickerToggleIcon [svgIcon]=\"icons.datePicker.svgIcon\">{{ icons.datePicker.matIcon }}</mat-icon>\n </mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n</mat-form-field>\n" }]
3572
+ }], ctorParameters: function () {
3573
+ return [{ type: undefined, decorators: [{
3574
+ type: Optional
3575
+ }, {
3576
+ type: Inject,
3577
+ args: [ADVANCED_FILTER_ICONS]
3578
+ }] }];
3579
+ } });
3580
+
3581
+ class NiceAdvancedNumberFilterComponent extends FilterComponent {
3582
+ }
3583
+ NiceAdvancedNumberFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedNumberFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3584
+ NiceAdvancedNumberFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceAdvancedNumberFilterComponent, selector: "nice-advanced-number-filter", providers: [
3585
+ {
3586
+ provide: NG_VALUE_ACCESSOR,
3587
+ useExisting: forwardRef(() => NiceAdvancedNumberFilterComponent),
3588
+ multi: true
3589
+ }
3590
+ ], usesInheritance: true, ngImport: i0, template: "<mat-form-field appearance=\"outline\" class=\"flex-auto\">\n <input matInput [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\" type=\"number\" />\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i1$1.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$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$2.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"] }], encapsulation: i0.ViewEncapsulation.None });
3591
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedNumberFilterComponent, decorators: [{
3592
+ type: Component,
3593
+ args: [{ selector: "nice-advanced-number-filter", encapsulation: ViewEncapsulation.None, providers: [
3594
+ {
3595
+ provide: NG_VALUE_ACCESSOR,
3596
+ useExisting: forwardRef(() => NiceAdvancedNumberFilterComponent),
3597
+ multi: true
3598
+ }
3599
+ ], template: "<mat-form-field appearance=\"outline\" class=\"flex-auto\">\n <input matInput [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\" type=\"number\" />\n</mat-form-field>\n" }]
3600
+ }] });
3601
+
3602
+ class NiceAdvancedRadioFilterComponent extends FilterComponent {
3603
+ }
3604
+ NiceAdvancedRadioFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedRadioFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3605
+ NiceAdvancedRadioFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceAdvancedRadioFilterComponent, selector: "nice-advanced-radio-filter", inputs: { filterConfig: "filterConfig" }, providers: [
3606
+ {
3607
+ provide: NG_VALUE_ACCESSOR,
3608
+ useExisting: forwardRef(() => NiceAdvancedRadioFilterComponent),
3609
+ multi: true
3610
+ }
3611
+ ], usesInheritance: true, ngImport: i0, template: "<mat-radio-group appearance=\"outline\" class=\"flex-auto\" [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\">\n <mat-radio-button class=\"mx-4\" *ngFor=\"let option of filterConfig.options\" [value]=\"option?.key\">\n {{ option?.name }}\n </mat-radio-button>\n</mat-radio-group>\n", dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i3$3.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], encapsulation: i0.ViewEncapsulation.None });
3612
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedRadioFilterComponent, decorators: [{
3613
+ type: Component,
3614
+ args: [{ selector: "nice-advanced-radio-filter", encapsulation: ViewEncapsulation.None, providers: [
3615
+ {
3616
+ provide: NG_VALUE_ACCESSOR,
3617
+ useExisting: forwardRef(() => NiceAdvancedRadioFilterComponent),
3618
+ multi: true
3619
+ }
3620
+ ], template: "<mat-radio-group appearance=\"outline\" class=\"flex-auto\" [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\">\n <mat-radio-button class=\"mx-4\" *ngFor=\"let option of filterConfig.options\" [value]=\"option?.key\">\n {{ option?.name }}\n </mat-radio-button>\n</mat-radio-group>\n" }]
3621
+ }], propDecorators: { filterConfig: [{
3622
+ type: Input
3623
+ }] } });
3624
+
3625
+ class NiceAdvancedSelectFilterComponent extends FilterComponent {
3626
+ constructor() {
3627
+ super(...arguments);
3628
+ this.values = [];
3629
+ }
3630
+ ngOnInit() {
3631
+ return __awaiter(this, void 0, void 0, function* () {
3632
+ if (!this.filterConfig.lazyLoading) {
3633
+ this.values = this.filterConfig.values;
3634
+ }
3635
+ });
3636
+ }
3637
+ ngOnChanges(changes) {
3638
+ if ("filterConfig" in changes) {
3639
+ if (!this.filterConfig.lazyLoading) {
3640
+ this.values = this.filterConfig.values;
3641
+ }
3642
+ else {
3643
+ this.values = [];
3644
+ }
3645
+ }
3646
+ }
3647
+ onValueChange(value) {
3648
+ super.onValueChange(value);
3649
+ }
3650
+ writeValue(value) {
3651
+ super.writeValue(value);
3652
+ }
3653
+ }
3654
+ NiceAdvancedSelectFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedSelectFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3655
+ NiceAdvancedSelectFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceAdvancedSelectFilterComponent, selector: "nice-advanced-select-filter", inputs: { filterConfig: "filterConfig" }, providers: [
3656
+ {
3657
+ provide: NG_VALUE_ACCESSOR,
3658
+ useExisting: forwardRef(() => NiceAdvancedSelectFilterComponent),
3659
+ multi: true
3660
+ }
3661
+ ], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<mat-form-field appearance=\"outline\" class=\"flex-auto\">\n <nice-typeahead\n *ngIf=\"!filterConfig.lazyLoading\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [items]=\"values\"\n bindValue=\"id\"\n bindLabel=\"name\"\n ></nice-typeahead>\n\n <nice-async-typeahead\n *ngIf=\"filterConfig.lazyLoading\"\n resource=\"advancedFilter\"\n [searchOptions]=\"{ filterConfig }\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n ></nice-async-typeahead>\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.NiceTypeaheadComponent, selector: "nice-typeahead", inputs: ["items", "labelFormatFn", "required", "disabled", "placeholder", "emptyPlaceholder", "allowNotFoundItems", "panelClass", "bindValue", "bindLabel", "typeahead", "page$", "loading", "loadingPage", "searchFn", "optionTemplate"], outputs: ["change"] }, { kind: "component", type: i5.NiceAsyncTypeaheadComponent, selector: "nice-async-typeahead", inputs: ["resource", "searchOptions", "preloadResource", "allowNotFoundItems", "panelClass", "bindValue", "bindLabel", "placeholder", "emptyPlaceholder", "optionTemplate", "filterFn", "labelFormatFn", "disabled", "value", "required"], outputs: ["entityRemoved", "selected"] }], encapsulation: i0.ViewEncapsulation.None });
3662
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedSelectFilterComponent, decorators: [{
3663
+ type: Component,
3664
+ args: [{ selector: "nice-advanced-select-filter", encapsulation: ViewEncapsulation.None, providers: [
3665
+ {
3666
+ provide: NG_VALUE_ACCESSOR,
3667
+ useExisting: forwardRef(() => NiceAdvancedSelectFilterComponent),
3668
+ multi: true
3669
+ }
3670
+ ], template: "<mat-form-field appearance=\"outline\" class=\"flex-auto\">\n <nice-typeahead\n *ngIf=\"!filterConfig.lazyLoading\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [items]=\"values\"\n bindValue=\"id\"\n bindLabel=\"name\"\n ></nice-typeahead>\n\n <nice-async-typeahead\n *ngIf=\"filterConfig.lazyLoading\"\n resource=\"advancedFilter\"\n [searchOptions]=\"{ filterConfig }\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n ></nice-async-typeahead>\n</mat-form-field>\n" }]
3671
+ }], propDecorators: { filterConfig: [{
3672
+ type: Input
3673
+ }] } });
3674
+
3675
+ class NiceAdvancedTextFilterComponent extends FilterComponent {
3676
+ }
3677
+ NiceAdvancedTextFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedTextFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3678
+ NiceAdvancedTextFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceAdvancedTextFilterComponent, selector: "nice-advanced-text-filter", inputs: { filterConfig: "filterConfig" }, providers: [
3679
+ {
3680
+ provide: NG_VALUE_ACCESSOR,
3681
+ useExisting: forwardRef(() => NiceAdvancedTextFilterComponent),
3682
+ multi: true
3683
+ }
3684
+ ], usesInheritance: true, ngImport: i0, template: "<mat-form-field appearance=\"outline\" class=\"flex-auto\">\n <input matInput [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\" [mask]=\"(filterConfig?.mask) || ''\" [validation]=\"false\" type=\"text\" />\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$2.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: "directive", type: i4$2.MaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "triggerOnMaskChange"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }], encapsulation: i0.ViewEncapsulation.None });
3685
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedTextFilterComponent, decorators: [{
3686
+ type: Component,
3687
+ args: [{ selector: "nice-advanced-text-filter", encapsulation: ViewEncapsulation.None, providers: [
3688
+ {
3689
+ provide: NG_VALUE_ACCESSOR,
3690
+ useExisting: forwardRef(() => NiceAdvancedTextFilterComponent),
3691
+ multi: true
3692
+ }
3693
+ ], template: "<mat-form-field appearance=\"outline\" class=\"flex-auto\">\n <input matInput [ngModel]=\"value\" (ngModelChange)=\"onValueChange($event)\" [mask]=\"(filterConfig?.mask) || ''\" [validation]=\"false\" type=\"text\" />\n</mat-form-field>\n" }]
3694
+ }], propDecorators: { filterConfig: [{
3695
+ type: Input
3696
+ }] } });
3697
+
3698
+ class NiceAdvancedRuleComponent {
3699
+ constructor(icons, formGroupName) {
3700
+ this.icons = icons;
3701
+ this.formGroupName = formGroupName;
3702
+ this.remove = new EventEmitter();
3703
+ }
3704
+ get filterConfig() {
3705
+ var _a;
3706
+ const ruleId = this.formGroup.get("id").value;
3707
+ return (_a = this.filterConfigs) === null || _a === void 0 ? void 0 : _a.find(f => f.id === ruleId);
3708
+ }
3709
+ ngOnInit() {
3710
+ this.formGroup = this.formGroupName.control;
3711
+ this.valuesFormArray = this.formGroup.get("values");
3712
+ const operationFormControl = this.formGroup.get("operation");
3713
+ this.isSingleInput$ = operationFormControl.valueChanges.pipe(startWith(operationFormControl.value), map((operation) => !AdvancedFiltersUtils.isDoubleInput(operation) && !AdvancedFiltersUtils.isNoInput(operation)));
3714
+ this.isDoubleInput$ = operationFormControl.valueChanges.pipe(startWith(operationFormControl.value), map((operation) => AdvancedFiltersUtils.isDoubleInput(operation)));
3715
+ }
3716
+ onUpdateFilterConfig(config) {
3717
+ const rule = AdvancedFiltersUtils.createRule(config);
3718
+ this.valuesFormArray.clear({ emitEvent: false });
3719
+ this.formGroup.patchValue(new FilterForm(rule));
3720
+ }
3721
+ addValue(index) {
3722
+ this.valuesFormArray.insert(index, {});
3723
+ }
3724
+ removeValue(i) {
3725
+ this.valuesFormArray.removeAt(i);
3726
+ if (!this.valuesFormArray.length) {
3727
+ this.remove.emit();
3728
+ }
3729
+ }
3730
+ }
3731
+ NiceAdvancedRuleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedRuleComponent, deps: [{ token: ADVANCED_FILTER_ICONS, optional: true }, { token: i1$1.FormGroupName }], target: i0.ɵɵFactoryTarget.Component });
3732
+ NiceAdvancedRuleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceAdvancedRuleComponent, selector: "nice-advanced-rule", inputs: { filterConfigs: "filterConfigs" }, outputs: { remove: "remove" }, ngImport: i0, template: "<div class=\"flex flex-row gap-4\" [formGroup]=\"formGroup\">\n <div class=\"basis-80\">\n <button\n class=\"select-filter w-full\"\n mat-stroked-button\n niceAdvancedFiltersTrigger\n originX=\"start\"\n (advancedFilterSelected)=\"onUpdateFilterConfig($event)\"\n >\n <div class=\"flex flex-row justify-between items-center w-full\">\n <div class=\"config-name\">{{ filterConfig?.name }}</div>\n <mat-icon [svgIcon]=\"icons.arrowDown.svgIcon\">{{ icons.arrowDown.matIcon }}</mat-icon>\n </div>\n </button>\n </div>\n\n <div class=\"flex flex-col basis-44 gap-4\">\n <mat-form-field appearance=\"outline\" class=\"rule-form-field\">\n <mat-select class=\"rule-operator\" formControlName=\"operation\">\n <mat-option *ngFor=\"let operator of filterConfig?.operators\" [value]=\"operator.id\">\n {{ operator?.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <ng-container *ngIf=\"valuesFormArray.controls.length > 1\">\n <mat-button-toggle-group class=\"condition-toggle\" formControlName=\"condition\">\n <mat-button-toggle value=\"and\">{{ \"components.nice_advanced_filters.rule.conditions.and\" | translate }}</mat-button-toggle>\n <mat-button-toggle value=\"or\">{{ \"components.nice_advanced_filters.rule.conditions.or\" | translate }}</mat-button-toggle>\n </mat-button-toggle-group>\n </ng-container>\n </div>\n\n <div class=\"flex flex-col flex-auto gap-4\" formArrayName=\"values\">\n <div class=\"flex items-center gap-4\" [formGroupName]=\"i\" *ngFor=\"let _ of valuesFormArray.controls; let i = index\">\n <div class=\"rule-container flex flex-col md:flex-row flex-auto justify-start items-center gap-2.5\">\n <ng-container *ngIf=\"isSingleInput$ | async\">\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-advanced-text-filter *ngSwitchCase=\"'text'\" class=\"flex flex-auto\" formControlName=\"value\" [filterConfig]=\"filterConfig\"></nice-advanced-text-filter>\n <nice-advanced-number-filter *ngSwitchCase=\"'number'\" class=\"flex flex-auto\" formControlName=\"value\"></nice-advanced-number-filter>\n <nice-advanced-radio-filter\n *ngSwitchCase=\"'radio'\"\n class=\"flex flex-auto mb-4\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-advanced-radio-filter>\n <nice-advanced-select-filter\n *ngSwitchCase=\"'select'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-advanced-select-filter>\n <nice-advanced-date-filter *ngSwitchCase=\"'date'\" class=\"flex flex-auto\" formControlName=\"value\"></nice-advanced-date-filter>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isDoubleInput$ | async\">\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-advanced-text-filter\n *ngSwitchCase=\"'text'\"\n [filterConfig]=\"filterConfig\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n ></nice-advanced-text-filter>\n <nice-advanced-number-filter\n *ngSwitchCase=\"'number'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n ></nice-advanced-number-filter>\n <nice-advanced-radio-filter\n *ngSwitchCase=\"'radio'\"\n class=\"flex flex-auto mb-4\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-advanced-radio-filter>\n <nice-advanced-select-filter\n *ngSwitchCase=\"'select'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-advanced-select-filter>\n <nice-advanced-date-filter\n *ngSwitchCase=\"'date'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n ></nice-advanced-date-filter>\n </ng-container>\n <h3 class=\"aligned-text\">\n {{ \"components.nice_advanced_filters.rule.conditions.and\" | translate }}\n </h3>\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-advanced-text-filter\n *ngSwitchCase=\"'text'\"\n [filterConfig]=\"filterConfig\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n ></nice-advanced-text-filter>\n <nice-advanced-number-filter\n *ngSwitchCase=\"'number'\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n ></nice-advanced-number-filter>\n <nice-advanced-radio-filter\n *ngSwitchCase=\"'radio'\"\n class=\"flex flex-auto mb-4\"\n formControlName=\"secondValue\"\n [filterConfig]=\"filterConfig\"\n ></nice-advanced-radio-filter>\n <nice-advanced-select-filter\n *ngSwitchCase=\"'select'\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n [filterConfig]=\"filterConfig\"\n ></nice-advanced-select-filter>\n <nice-advanced-date-filter\n *ngSwitchCase=\"'date'\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n ></nice-advanced-date-filter>\n </ng-container>\n </ng-container>\n </div>\n\n <div class=\"basis-12\">\n <button class=\"add-button\" mat-icon-button (click)=\"addValue(i + 1)\">\n <mat-icon [svgIcon]=\"icons.add.svgIcon\">{{ icons.add.matIcon }}</mat-icon>\n </button>\n </div>\n\n <div class=\"basis-12\">\n <button class=\"remove-button\" mat-icon-button (click)=\"removeValue(i)\">\n <mat-icon [svgIcon]=\"icons.delete.svgIcon\">{{ icons.delete.matIcon }}</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i8$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i8$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: NiceAdvancedDateFilterComponent, selector: "nice-advanced-date-filter" }, { kind: "component", type: NiceAdvancedNumberFilterComponent, selector: "nice-advanced-number-filter" }, { kind: "component", type: NiceAdvancedRadioFilterComponent, selector: "nice-advanced-radio-filter", inputs: ["filterConfig"] }, { kind: "component", type: NiceAdvancedSelectFilterComponent, selector: "nice-advanced-select-filter", inputs: ["filterConfig"] }, { kind: "component", type: NiceAdvancedTextFilterComponent, selector: "nice-advanced-text-filter", inputs: ["filterConfig"] }, { kind: "directive", type: AdvancedFiltersTriggerDirective, selector: "[niceAdvancedFiltersTrigger]", inputs: ["position"], outputs: ["advancedFilterSelected"], exportAs: ["niceAdvancedFiltersTrigger"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
3733
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedRuleComponent, decorators: [{
3734
+ type: Component,
3735
+ args: [{ selector: "nice-advanced-rule", encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-row gap-4\" [formGroup]=\"formGroup\">\n <div class=\"basis-80\">\n <button\n class=\"select-filter w-full\"\n mat-stroked-button\n niceAdvancedFiltersTrigger\n originX=\"start\"\n (advancedFilterSelected)=\"onUpdateFilterConfig($event)\"\n >\n <div class=\"flex flex-row justify-between items-center w-full\">\n <div class=\"config-name\">{{ filterConfig?.name }}</div>\n <mat-icon [svgIcon]=\"icons.arrowDown.svgIcon\">{{ icons.arrowDown.matIcon }}</mat-icon>\n </div>\n </button>\n </div>\n\n <div class=\"flex flex-col basis-44 gap-4\">\n <mat-form-field appearance=\"outline\" class=\"rule-form-field\">\n <mat-select class=\"rule-operator\" formControlName=\"operation\">\n <mat-option *ngFor=\"let operator of filterConfig?.operators\" [value]=\"operator.id\">\n {{ operator?.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <ng-container *ngIf=\"valuesFormArray.controls.length > 1\">\n <mat-button-toggle-group class=\"condition-toggle\" formControlName=\"condition\">\n <mat-button-toggle value=\"and\">{{ \"components.nice_advanced_filters.rule.conditions.and\" | translate }}</mat-button-toggle>\n <mat-button-toggle value=\"or\">{{ \"components.nice_advanced_filters.rule.conditions.or\" | translate }}</mat-button-toggle>\n </mat-button-toggle-group>\n </ng-container>\n </div>\n\n <div class=\"flex flex-col flex-auto gap-4\" formArrayName=\"values\">\n <div class=\"flex items-center gap-4\" [formGroupName]=\"i\" *ngFor=\"let _ of valuesFormArray.controls; let i = index\">\n <div class=\"rule-container flex flex-col md:flex-row flex-auto justify-start items-center gap-2.5\">\n <ng-container *ngIf=\"isSingleInput$ | async\">\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-advanced-text-filter *ngSwitchCase=\"'text'\" class=\"flex flex-auto\" formControlName=\"value\" [filterConfig]=\"filterConfig\"></nice-advanced-text-filter>\n <nice-advanced-number-filter *ngSwitchCase=\"'number'\" class=\"flex flex-auto\" formControlName=\"value\"></nice-advanced-number-filter>\n <nice-advanced-radio-filter\n *ngSwitchCase=\"'radio'\"\n class=\"flex flex-auto mb-4\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-advanced-radio-filter>\n <nice-advanced-select-filter\n *ngSwitchCase=\"'select'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-advanced-select-filter>\n <nice-advanced-date-filter *ngSwitchCase=\"'date'\" class=\"flex flex-auto\" formControlName=\"value\"></nice-advanced-date-filter>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isDoubleInput$ | async\">\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-advanced-text-filter\n *ngSwitchCase=\"'text'\"\n [filterConfig]=\"filterConfig\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n ></nice-advanced-text-filter>\n <nice-advanced-number-filter\n *ngSwitchCase=\"'number'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n ></nice-advanced-number-filter>\n <nice-advanced-radio-filter\n *ngSwitchCase=\"'radio'\"\n class=\"flex flex-auto mb-4\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-advanced-radio-filter>\n <nice-advanced-select-filter\n *ngSwitchCase=\"'select'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-advanced-select-filter>\n <nice-advanced-date-filter\n *ngSwitchCase=\"'date'\"\n class=\"flex flex-auto\"\n formControlName=\"value\"\n ></nice-advanced-date-filter>\n </ng-container>\n <h3 class=\"aligned-text\">\n {{ \"components.nice_advanced_filters.rule.conditions.and\" | translate }}\n </h3>\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-advanced-text-filter\n *ngSwitchCase=\"'text'\"\n [filterConfig]=\"filterConfig\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n ></nice-advanced-text-filter>\n <nice-advanced-number-filter\n *ngSwitchCase=\"'number'\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n ></nice-advanced-number-filter>\n <nice-advanced-radio-filter\n *ngSwitchCase=\"'radio'\"\n class=\"flex flex-auto mb-4\"\n formControlName=\"secondValue\"\n [filterConfig]=\"filterConfig\"\n ></nice-advanced-radio-filter>\n <nice-advanced-select-filter\n *ngSwitchCase=\"'select'\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n [filterConfig]=\"filterConfig\"\n ></nice-advanced-select-filter>\n <nice-advanced-date-filter\n *ngSwitchCase=\"'date'\"\n class=\"flex flex-auto\"\n formControlName=\"secondValue\"\n ></nice-advanced-date-filter>\n </ng-container>\n </ng-container>\n </div>\n\n <div class=\"basis-12\">\n <button class=\"add-button\" mat-icon-button (click)=\"addValue(i + 1)\">\n <mat-icon [svgIcon]=\"icons.add.svgIcon\">{{ icons.add.matIcon }}</mat-icon>\n </button>\n </div>\n\n <div class=\"basis-12\">\n <button class=\"remove-button\" mat-icon-button (click)=\"removeValue(i)\">\n <mat-icon [svgIcon]=\"icons.delete.svgIcon\">{{ icons.delete.matIcon }}</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>\n" }]
3736
+ }], ctorParameters: function () {
3737
+ return [{ type: undefined, decorators: [{
3738
+ type: Optional
3739
+ }, {
3740
+ type: Inject,
3741
+ args: [ADVANCED_FILTER_ICONS]
3742
+ }] }, { type: i1$1.FormGroupName }];
3743
+ }, propDecorators: { filterConfigs: [{
3744
+ type: Input
3745
+ }], remove: [{
3746
+ type: Output
3747
+ }] } });
3748
+
3749
+ class NiceAdvancedFiltersComponent {
3750
+ constructor(icons, formGroup, query, service, changeDetectorRef) {
3751
+ this.icons = icons;
3752
+ this.formGroup = formGroup;
3753
+ this.query = query;
3754
+ this.service = service;
3755
+ this.changeDetectorRef = changeDetectorRef;
3756
+ this.config$ = this.query.selectFilterConfig();
3757
+ this.rulesFormArray = this.formGroup.get("rules");
3758
+ this.rules$ = this.rulesFormArray.valueChanges.pipe(startWith(this.rulesFormArray.value));
3759
+ }
3760
+ ngOnInit() {
3761
+ var _a;
3762
+ const { filterParameters } = this.query.getValue();
3763
+ if ((_a = filterParameters.rules) === null || _a === void 0 ? void 0 : _a.length) {
3764
+ this.formGroup.patchValue(new AdvancedFiltersForm(filterParameters.rules[0]));
3765
+ }
3766
+ }
3767
+ onClickAddRule(filterConfigurationModel) {
3768
+ this.rulesFormArray.push(new FilterForm(AdvancedFiltersUtils.createRule(filterConfigurationModel)));
3769
+ this.changeDetectorRef.markForCheck();
3770
+ }
3771
+ onClickDeleteRule(index) {
3772
+ this.rulesFormArray.removeAt(index);
3773
+ if (!this.rulesFormArray.length) {
3774
+ this.service.setRules([], true);
3775
+ this.onClose();
3776
+ }
3777
+ }
3778
+ onClose() {
3779
+ this.service.updateSubState("showAdvancedFilters", false);
3780
+ }
3781
+ onRefresh() {
3782
+ this.service.setRules(this.formGroup.getRawValue().transform(), true);
3783
+ }
3784
+ }
3785
+ NiceAdvancedFiltersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedFiltersComponent, deps: [{ token: ADVANCED_FILTER_ICONS, optional: true }, { token: i1$3.GeneratedFormGroup }, { token: NiceFilterViewQuery }, { token: NiceFilterViewService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
3786
+ NiceAdvancedFiltersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceAdvancedFiltersComponent, selector: "nice-advanced-filters", providers: [
3787
+ NgxFormGeneratorProvider.forFeature([AdvancedFiltersForm]),
3788
+ {
3789
+ provide: NICE_ASYNC_TYPEAHEAD_PROVIDER,
3790
+ useClass: AdvancedFiltersAsyncTypeaheadProvider,
3791
+ multi: true
3792
+ }
3793
+ ], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" [formGroup]=\"formGroup\">\n <div class=\"advanced-filter-title\">{{ \"components.nice_advanced_filters.title\" | translate }}</div>\n\n <div class=\"flex flex-row gap-12\">\n <div class=\"advanced-filter-condition\">{{ \"components.nice_advanced_filters.conditions.should_match\" | translate }}</div>\n\n <mat-radio-group formControlName=\"condition\">\n <mat-radio-button value=\"and\"><span class=\"ml-4 mr-8\">{{ \"components.nice_advanced_filters.conditions.every\" | translate }}</span></mat-radio-button>\n <mat-radio-button value=\"or\"><span class=\"ml-4 mr-8\">{{ \"components.nice_advanced_filters.conditions.some\" | translate }}</span></mat-radio-button>\n </mat-radio-group>\n </div>\n\n <div class=\"flex flex-col gap-4\" formArrayName=\"rules\" *ngFor=\"let _ of rulesFormArray.controls; let i = index\">\n <nice-advanced-rule [filterConfigs]=\"config$ | async\" [formGroupName]=\"i\" (remove)=\"onClickDeleteRule(i)\"></nice-advanced-rule>\n </div>\n\n <div>\n <button class=\"add-condition\" mat-stroked-button color=\"accent\" niceAdvancedFiltersTrigger position=\"topRight\" (advancedFilterSelected)=\"onClickAddRule($event)\">\n <div class=\"flex items-center gap-4\">\n <mat-icon [svgIcon]=\"icons.add.svgIcon\">{{ icons.add.matIcon }}</mat-icon>\n\n <div>{{ \"components.nice_advanced_filters.add_condition\" | translate }}</div>\n </div>\n </button>\n </div>\n\n <div class=\"flex gap-6 justify-end pt-4\">\n <button class=\"close-button\" mat-button color=\"accent\" (click)=\"onClose()\">\n <div class=\"flex items-center gap-4\">\n <mat-icon [svgIcon]=\"icons.close.svgIcon\">{{ icons.close.matIcon }}</mat-icon>\n\n <div>{{ \"components.nice_advanced_filters.close\" | translate }}</div>\n </div>\n </button>\n\n <button class=\"refresh-button\" mat-flat-button color=\"accent\" (click)=\"onRefresh()\">\n <div class=\"flex items-center gap-4\">\n <mat-icon [svgIcon]=\"icons.refresh.svgIcon\">{{ icons.refresh.matIcon }}</mat-icon>\n\n <div>{{ \"components.nice_advanced_filters.refresh\" | translate }}</div>\n </div>\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i3$3.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i3$3.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: NiceAdvancedRuleComponent, selector: "nice-advanced-rule", inputs: ["filterConfigs"], outputs: ["remove"] }, { kind: "directive", type: AdvancedFiltersTriggerDirective, selector: "[niceAdvancedFiltersTrigger]", inputs: ["position"], outputs: ["advancedFilterSelected"], exportAs: ["niceAdvancedFiltersTrigger"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
3794
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedFiltersComponent, decorators: [{
3795
+ type: Component,
3796
+ args: [{ selector: "nice-advanced-filters", encapsulation: ViewEncapsulation.None, providers: [
3797
+ NgxFormGeneratorProvider.forFeature([AdvancedFiltersForm]),
3798
+ {
3799
+ provide: NICE_ASYNC_TYPEAHEAD_PROVIDER,
3800
+ useClass: AdvancedFiltersAsyncTypeaheadProvider,
3801
+ multi: true
3802
+ }
3803
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col gap-4\" [formGroup]=\"formGroup\">\n <div class=\"advanced-filter-title\">{{ \"components.nice_advanced_filters.title\" | translate }}</div>\n\n <div class=\"flex flex-row gap-12\">\n <div class=\"advanced-filter-condition\">{{ \"components.nice_advanced_filters.conditions.should_match\" | translate }}</div>\n\n <mat-radio-group formControlName=\"condition\">\n <mat-radio-button value=\"and\"><span class=\"ml-4 mr-8\">{{ \"components.nice_advanced_filters.conditions.every\" | translate }}</span></mat-radio-button>\n <mat-radio-button value=\"or\"><span class=\"ml-4 mr-8\">{{ \"components.nice_advanced_filters.conditions.some\" | translate }}</span></mat-radio-button>\n </mat-radio-group>\n </div>\n\n <div class=\"flex flex-col gap-4\" formArrayName=\"rules\" *ngFor=\"let _ of rulesFormArray.controls; let i = index\">\n <nice-advanced-rule [filterConfigs]=\"config$ | async\" [formGroupName]=\"i\" (remove)=\"onClickDeleteRule(i)\"></nice-advanced-rule>\n </div>\n\n <div>\n <button class=\"add-condition\" mat-stroked-button color=\"accent\" niceAdvancedFiltersTrigger position=\"topRight\" (advancedFilterSelected)=\"onClickAddRule($event)\">\n <div class=\"flex items-center gap-4\">\n <mat-icon [svgIcon]=\"icons.add.svgIcon\">{{ icons.add.matIcon }}</mat-icon>\n\n <div>{{ \"components.nice_advanced_filters.add_condition\" | translate }}</div>\n </div>\n </button>\n </div>\n\n <div class=\"flex gap-6 justify-end pt-4\">\n <button class=\"close-button\" mat-button color=\"accent\" (click)=\"onClose()\">\n <div class=\"flex items-center gap-4\">\n <mat-icon [svgIcon]=\"icons.close.svgIcon\">{{ icons.close.matIcon }}</mat-icon>\n\n <div>{{ \"components.nice_advanced_filters.close\" | translate }}</div>\n </div>\n </button>\n\n <button class=\"refresh-button\" mat-flat-button color=\"accent\" (click)=\"onRefresh()\">\n <div class=\"flex items-center gap-4\">\n <mat-icon [svgIcon]=\"icons.refresh.svgIcon\">{{ icons.refresh.matIcon }}</mat-icon>\n\n <div>{{ \"components.nice_advanced_filters.refresh\" | translate }}</div>\n </div>\n </button>\n </div>\n</div>\n" }]
3804
+ }], ctorParameters: function () {
3805
+ return [{ type: undefined, decorators: [{
3806
+ type: Optional
3807
+ }, {
3808
+ type: Inject,
3809
+ args: [ADVANCED_FILTER_ICONS]
3810
+ }] }, { type: i1$3.GeneratedFormGroup }, { type: NiceFilterViewQuery }, { type: NiceFilterViewService }, { type: i0.ChangeDetectorRef }];
3811
+ } });
3812
+
3813
+ const defaultIcons = {
3814
+ add: {
3815
+ matIcon: "add"
3816
+ },
3817
+ close: {
3818
+ matIcon: "close"
3819
+ },
3820
+ refresh: {
3821
+ matIcon: "refresh"
3822
+ },
3823
+ delete: {
3824
+ matIcon: "delete"
3825
+ },
3826
+ arrowDown: {
3827
+ matIcon: "arrow_drop_down"
3828
+ },
3829
+ datePicker: {
3830
+ matIcon: "today"
3831
+ },
3832
+ queryBuilder: {
3833
+ matIcon: "filter_list"
3834
+ }
3835
+ };
3836
+
3837
+ class NiceAdvancedFiltersModule {
3838
+ static forRoot(options) {
3839
+ var _a;
3840
+ return {
3841
+ ngModule: NiceAdvancedFiltersModule,
3842
+ providers: [
3843
+ {
3844
+ provide: ADVANCED_FILTER_ICONS,
3845
+ useValue: Object.assign(Object.assign({}, defaultIcons), ((_a = options === null || options === void 0 ? void 0 : options.icons) !== null && _a !== void 0 ? _a : {}))
3846
+ },
3847
+ (options === null || options === void 0 ? void 0 : options.filterGroupService) ? {
3848
+ provide: NiceFilterGroupService,
3849
+ useClass: options.filterGroupService
3850
+ } : undefined
3851
+ ].filter((provider) => !!provider)
3852
+ };
3853
+ }
3854
+ }
3855
+ NiceAdvancedFiltersModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedFiltersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3856
+ NiceAdvancedFiltersModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedFiltersModule, declarations: [NiceAdvancedFiltersComponent,
3857
+ NiceAdvancedFiltersButtonComponent,
3858
+ NiceAdvancedFilterSelectionComponent,
3859
+ NiceAdvancedRuleComponent,
3860
+ NiceAdvancedDateFilterComponent,
3861
+ NiceAdvancedNumberFilterComponent,
3862
+ NiceAdvancedRadioFilterComponent,
3863
+ NiceAdvancedSelectFilterComponent,
3864
+ NiceAdvancedTextFilterComponent,
3865
+ AdvancedFiltersTriggerDirective,
3866
+ NiceFilterGroupIconPipe], imports: [CommonModule,
3867
+ ReactiveFormsModule,
3868
+ MatRadioModule,
3869
+ MatCardModule,
3870
+ MatListModule,
3871
+ NiceLoadingSpinnerModule,
3872
+ MatIconModule,
3873
+ MatRippleModule,
3874
+ MatButtonModule,
3875
+ MatFormFieldModule,
3876
+ MatOptionModule,
3877
+ MatSelectModule,
3878
+ FormsModule,
3879
+ MatInputModule,
3880
+ MatButtonToggleModule,
3881
+ TranslateModule,
3882
+ MatDatepickerModule,
3883
+ NiceTypeaheadModule,
3884
+ NgxMaskModule,
3885
+ NiceAsyncTypeaheadModule], exports: [NiceAdvancedFiltersComponent, NiceAdvancedFiltersButtonComponent, AdvancedFiltersTriggerDirective] });
3886
+ NiceAdvancedFiltersModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedFiltersModule, imports: [CommonModule,
3887
+ ReactiveFormsModule,
3888
+ MatRadioModule,
3889
+ MatCardModule,
3890
+ MatListModule,
3891
+ NiceLoadingSpinnerModule,
3892
+ MatIconModule,
3893
+ MatRippleModule,
3894
+ MatButtonModule,
3895
+ MatFormFieldModule,
3896
+ MatOptionModule,
3897
+ MatSelectModule,
3898
+ FormsModule,
3899
+ MatInputModule,
3900
+ MatButtonToggleModule,
3901
+ TranslateModule,
3902
+ MatDatepickerModule,
3903
+ NiceTypeaheadModule,
3904
+ NgxMaskModule,
3905
+ NiceAsyncTypeaheadModule] });
3906
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedFiltersModule, decorators: [{
3907
+ type: NgModule,
3908
+ args: [{
3909
+ imports: [
3910
+ CommonModule,
3911
+ ReactiveFormsModule,
3912
+ MatRadioModule,
3913
+ MatCardModule,
3914
+ MatListModule,
3915
+ NiceLoadingSpinnerModule,
3916
+ MatIconModule,
3917
+ MatRippleModule,
3918
+ MatButtonModule,
3919
+ MatFormFieldModule,
3920
+ MatOptionModule,
3921
+ MatSelectModule,
3922
+ FormsModule,
3923
+ MatInputModule,
3924
+ MatButtonToggleModule,
3925
+ TranslateModule,
3926
+ MatDatepickerModule,
3927
+ NiceTypeaheadModule,
3928
+ NgxMaskModule,
3929
+ NiceAsyncTypeaheadModule
3930
+ ],
3931
+ declarations: [
3932
+ NiceAdvancedFiltersComponent,
3933
+ NiceAdvancedFiltersButtonComponent,
3934
+ NiceAdvancedFilterSelectionComponent,
3935
+ NiceAdvancedRuleComponent,
3936
+ NiceAdvancedDateFilterComponent,
3937
+ NiceAdvancedNumberFilterComponent,
3938
+ NiceAdvancedRadioFilterComponent,
3939
+ NiceAdvancedSelectFilterComponent,
3940
+ NiceAdvancedTextFilterComponent,
3941
+ AdvancedFiltersTriggerDirective,
3942
+ NiceFilterGroupIconPipe
3943
+ ],
3944
+ providers: [],
3945
+ exports: [NiceAdvancedFiltersComponent, NiceAdvancedFiltersButtonComponent, AdvancedFiltersTriggerDirective],
3946
+ }]
3947
+ }] });
3948
+
3949
+ class NiceFilterDataDirective {
3950
+ constructor(template) {
3951
+ this.template = template;
3952
+ }
3953
+ }
3954
+ NiceFilterDataDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterDataDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
3955
+ NiceFilterDataDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterDataDirective, selector: "[niceFilterData]", ngImport: i0 });
3956
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterDataDirective, decorators: [{
3957
+ type: Directive,
3958
+ args: [{ selector: "[niceFilterData]" }]
3959
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
3960
+
3961
+ class NiceFilterCustomDataViewComponent {
3962
+ constructor(query) {
3963
+ this.query = query;
3964
+ this.data$ = this.query.selectAll();
3965
+ }
3966
+ }
3967
+ NiceFilterCustomDataViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterCustomDataViewComponent, deps: [{ token: NiceFilterViewQuery }], target: i0.ɵɵFactoryTarget.Component });
3968
+ NiceFilterCustomDataViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterCustomDataViewComponent, selector: "nice-filter-custom-data-view, div[nice-filter-custom-data-view]", queries: [{ propertyName: "content", first: true, predicate: NiceFilterDataDirective, descendants: true, read: TemplateRef }], ngImport: i0, template: "<ng-container *ngIf=\"content\">\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: data$ | async }\"></ng-container>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
3969
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterCustomDataViewComponent, decorators: [{
3970
+ type: Component,
3971
+ args: [{ selector: "nice-filter-custom-data-view, div[nice-filter-custom-data-view]", encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"content\">\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: data$ | async }\"></ng-container>\n</ng-container>\n" }]
3972
+ }], ctorParameters: function () { return [{ type: NiceFilterViewQuery }]; }, propDecorators: { content: [{
3973
+ type: ContentChild,
3974
+ args: [NiceFilterDataDirective, { read: TemplateRef }]
3975
+ }] } });
3976
+
3977
+ class NiceFilterExportButtonsComponent {
3978
+ constructor(icons, exportsSettings, query, service, bottomSheet) {
3979
+ this.icons = icons;
3980
+ this.exportsSettings = exportsSettings;
3981
+ this.query = query;
3982
+ this.service = service;
3983
+ this.bottomSheet = bottomSheet;
3984
+ this.customExport = [];
3985
+ this.downloadFileName = "data";
3986
+ this.canPrint = true;
3987
+ this.loading$ = this.query.selectLoading();
3988
+ }
3989
+ clickExport() {
3990
+ const exports = [];
3991
+ if (this.exportsSettings.xlsx) {
3992
+ exports.push({
3993
+ type: "xlsx",
3994
+ onClickExport: () => this.clickXlsx()
3995
+ });
3996
+ }
3997
+ if (this.exportsSettings.csv) {
3998
+ exports.push({
3999
+ type: "csv",
4000
+ onClickExport: () => this.clickCsv()
4001
+ });
4002
+ }
4003
+ if (this.exportsSettings.pdf) {
4004
+ exports.push({
4005
+ type: "pdf",
4006
+ onClickExport: () => this.clickPdf()
4007
+ });
4008
+ }
4009
+ this.bottomSheet.open(ExportBottomSheetComponent, {
4010
+ data: {
4011
+ exportStrategies: [
4012
+ ...exports,
4013
+ ...this.customExport
4014
+ ]
4015
+ }
4016
+ });
4017
+ }
4018
+ clickXlsx() {
4019
+ this.service.downloadData("xlsx", this.downloadFileName);
4020
+ }
4021
+ clickCsv() {
4022
+ this.service.downloadData("csv", this.downloadFileName);
4023
+ }
4024
+ clickPrint() {
4025
+ this.service.printData();
4026
+ }
4027
+ clickPdf() {
4028
+ this.service.downloadData("pdf", this.downloadFileName);
4029
+ }
4030
+ }
4031
+ NiceFilterExportButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterExportButtonsComponent, deps: [{ token: FILTER_VIEW_ICONS }, { token: EXPORTS_SETTINGS }, { token: NiceFilterViewQuery }, { token: NiceFilterViewService }, { token: i3$4.MatBottomSheet }], target: i0.ɵɵFactoryTarget.Component });
4032
+ NiceFilterExportButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterExportButtonsComponent, selector: "nice-filter-export-buttons, div[nice-filter-export-buttons]", inputs: { customExport: "customExport", downloadFileName: "downloadFileName", canPrint: "canPrint" }, ngImport: i0, template: "<button\n *ngIf=\"canPrint\"\n (click)=\"clickPrint()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.print' | translate\"\n class=\"export-button\"\n mat-mini-fab\n>\n <mat-icon [svgIcon]=\"icons.print.svgIcon\">{{ icons.print.matIcon }}</mat-icon>\n</button>\n\n<button\n (click)=\"clickExport()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.export' | translate\"\n class=\"export-button\"\n mat-mini-fab\n>\n <mat-icon [svgIcon]=\"icons.download.svgIcon\">{{ icons.download.matIcon }}</mat-icon>\n</button>\n", styles: [""], dependencies: [{ kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i10.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
4033
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterExportButtonsComponent, decorators: [{
4034
+ type: Component,
4035
+ args: [{ selector: "nice-filter-export-buttons, div[nice-filter-export-buttons]", encapsulation: ViewEncapsulation.None, template: "<button\n *ngIf=\"canPrint\"\n (click)=\"clickPrint()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.print' | translate\"\n class=\"export-button\"\n mat-mini-fab\n>\n <mat-icon [svgIcon]=\"icons.print.svgIcon\">{{ icons.print.matIcon }}</mat-icon>\n</button>\n\n<button\n (click)=\"clickExport()\"\n [disabled]=\"loading$ | async\"\n [matTooltip]=\"'general.export' | translate\"\n class=\"export-button\"\n mat-mini-fab\n>\n <mat-icon [svgIcon]=\"icons.download.svgIcon\">{{ icons.download.matIcon }}</mat-icon>\n</button>\n" }]
4036
+ }], ctorParameters: function () {
4037
+ return [{ type: undefined, decorators: [{
4038
+ type: Inject,
4039
+ args: [FILTER_VIEW_ICONS]
4040
+ }] }, { type: undefined, decorators: [{
4041
+ type: Inject,
4042
+ args: [EXPORTS_SETTINGS]
4043
+ }] }, { type: NiceFilterViewQuery }, { type: NiceFilterViewService }, { type: i3$4.MatBottomSheet }];
4044
+ }, propDecorators: { customExport: [{
4045
+ type: Input
4046
+ }], downloadFileName: [{
4047
+ type: Input
4048
+ }], canPrint: [{
4049
+ type: Input
4050
+ }] } });
4051
+
4052
+ class NiceFilterExportDirective {
4053
+ constructor(service) {
4054
+ this.service = service;
4055
+ this.downloadFileName = "data";
4056
+ }
4057
+ onClick() {
4058
+ this.service.downloadData(this.type, this.downloadFileName);
4059
+ }
4060
+ }
4061
+ NiceFilterExportDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterExportDirective, deps: [{ token: NiceFilterViewService }], target: i0.ɵɵFactoryTarget.Directive });
4062
+ NiceFilterExportDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterExportDirective, selector: "[niceFilterExport]", inputs: { type: "type", downloadFileName: "downloadFileName" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
4063
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterExportDirective, decorators: [{
4064
+ type: Directive,
4065
+ args: [{ selector: "[niceFilterExport]" }]
4066
+ }], ctorParameters: function () { return [{ type: NiceFilterViewService }]; }, propDecorators: { type: [{
4067
+ type: Input
4068
+ }], downloadFileName: [{
4069
+ type: Input
4070
+ }], onClick: [{
4071
+ type: HostListener,
4072
+ args: ["click"]
4073
+ }] } });
4074
+
4075
+ class NiceFilterInfiniteScrollDataViewComponent {
4076
+ constructor(query, service) {
4077
+ this.query = query;
4078
+ this.service = service;
4079
+ this.data$ = this.query.selectAll();
4080
+ }
4081
+ loadNextPage() {
4082
+ return __awaiter(this, void 0, void 0, function* () {
4083
+ const { filterParameters } = this.query.getValue();
4084
+ this.service.setMode("accumulated");
4085
+ yield this.service.setParameters(Object.assign(Object.assign({}, filterParameters), { start: filterParameters.start + filterParameters.length }), true);
4086
+ });
4087
+ }
4088
+ }
4089
+ NiceFilterInfiniteScrollDataViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterInfiniteScrollDataViewComponent, deps: [{ token: NiceFilterViewQuery }, { token: NiceFilterViewService }], target: i0.ɵɵFactoryTarget.Component });
4090
+ NiceFilterInfiniteScrollDataViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterInfiniteScrollDataViewComponent, selector: "nice-filter-infinite-scroll-data-view, div[nice-filter-infinite-scroll-data-view]", queries: [{ propertyName: "content", first: true, predicate: NiceFilterDataDirective, descendants: true, read: TemplateRef }], ngImport: i0, template: "<ng-container *ngIf=\"content\">\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: data$ | async }\"></ng-container>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
4091
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterInfiniteScrollDataViewComponent, decorators: [{
4092
+ type: Component,
4093
+ args: [{ selector: "nice-filter-infinite-scroll-data-view, div[nice-filter-infinite-scroll-data-view]", encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"content\">\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: data$ | async }\"></ng-container>\n</ng-container>\n" }]
4094
+ }], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: NiceFilterViewService }]; }, propDecorators: { content: [{
4095
+ type: ContentChild,
4096
+ args: [NiceFilterDataDirective, { read: TemplateRef }]
4097
+ }] } });
4098
+
4099
+ class NiceFilterSearchComponent {
3253
4100
  constructor(icons, query, service) {
3254
4101
  this.icons = icons;
3255
4102
  this.query = query;
@@ -3280,7 +4127,7 @@ class NiceFilterSearchComponent {
3280
4127
  }
3281
4128
  }
3282
4129
  NiceFilterSearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterSearchComponent, deps: [{ token: FILTER_VIEW_ICONS }, { token: NiceFilterViewQuery }, { token: NiceFilterViewService }], target: i0.ɵɵFactoryTarget.Component });
3283
- NiceFilterSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterSearchComponent, selector: "nice-filter-search", inputs: { appearance: "appearance" }, ngImport: i0, template: "<div\n class=\"search-wrapper mx-md-0\"\n [class.nice-search-default]=\"appearance === 'default'\"\n [class.nice-search-outlined]=\"appearance === 'outlined'\"\n [class.nice-search-legacy]=\"appearance === 'legacy'\"\n [class.nice-search-custom]=\"appearance === 'custom'\"\n>\n <div class=\"search flex flex-auto justify-start items-center\">\n <mat-icon [svgIcon]=\"icons.search.svgIcon\">{{ icons.search.matIcon }}</mat-icon>\n <input [ngModel]=\"searchQuery$ | async\" (ngModelChange)=\"onUpdateSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n\n <ng-content select=\"[niceFilterSearchButtons]\"></ng-content>\n </div>\n</div>\n", styles: ["nice-filter-search .search-wrapper{width:100%;max-width:480px;overflow:hidden}nice-filter-search .search-wrapper.nice-search-default{box-shadow:0 4px 12px #0000001f;border-radius:5px}nice-filter-search .search-wrapper.nice-search-outlined{border-radius:5px}nice-filter-search .search-wrapper.nice-search-legacy{box-shadow:0 3px 3px -2px #0000000f,0 3px 4px #0000000b,0 1px 8px #00000009;border-radius:28px}nice-filter-search .search-wrapper .search{width:100%;height:48px;line-height:48px;padding:0 18px}nice-filter-search .search-wrapper .search input{width:100%;height:48px;min-height:48px;max-height:48px;padding:0 16px;border:none;outline:none}\n"], dependencies: [{ kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
4130
+ NiceFilterSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterSearchComponent, selector: "nice-filter-search", inputs: { appearance: "appearance" }, ngImport: i0, template: "<div\n class=\"search-wrapper mx-md-0\"\n [class.nice-search-default]=\"appearance === 'default'\"\n [class.nice-search-outlined]=\"appearance === 'outlined'\"\n [class.nice-search-legacy]=\"appearance === 'legacy'\"\n [class.nice-search-custom]=\"appearance === 'custom'\"\n>\n <div class=\"search flex flex-auto justify-start items-center\">\n <mat-icon [svgIcon]=\"icons.search.svgIcon\">{{ icons.search.matIcon }}</mat-icon>\n <input [ngModel]=\"searchQuery$ | async\" (ngModelChange)=\"onUpdateSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n\n <ng-content select=\"[niceFilterSearchButtons]\"></ng-content>\n </div>\n</div>\n", styles: ["nice-filter-search .search-wrapper{width:100%;max-width:480px;overflow:hidden}nice-filter-search .search-wrapper.nice-search-default{box-shadow:0 4px 12px #0000001f;border-radius:5px}nice-filter-search .search-wrapper.nice-search-outlined{border-radius:5px}nice-filter-search .search-wrapper.nice-search-legacy{box-shadow:0 3px 3px -2px #0000000f,0 3px 4px #0000000b,0 1px 8px #00000009;border-radius:28px}nice-filter-search .search-wrapper .search{width:100%;height:48px;line-height:48px;padding:0 18px}nice-filter-search .search-wrapper .search input{width:100%;height:48px;min-height:48px;max-height:48px;padding:0 16px;border:none;outline:none}\n"], dependencies: [{ kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
3284
4131
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterSearchComponent, decorators: [{
3285
4132
  type: Component,
3286
4133
  args: [{ selector: "nice-filter-search", encapsulation: ViewEncapsulation.None, template: "<div\n class=\"search-wrapper mx-md-0\"\n [class.nice-search-default]=\"appearance === 'default'\"\n [class.nice-search-outlined]=\"appearance === 'outlined'\"\n [class.nice-search-legacy]=\"appearance === 'legacy'\"\n [class.nice-search-custom]=\"appearance === 'custom'\"\n>\n <div class=\"search flex flex-auto justify-start items-center\">\n <mat-icon [svgIcon]=\"icons.search.svgIcon\">{{ icons.search.matIcon }}</mat-icon>\n <input [ngModel]=\"searchQuery$ | async\" (ngModelChange)=\"onUpdateSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n\n <ng-content select=\"[niceFilterSearchButtons]\"></ng-content>\n </div>\n</div>\n", styles: ["nice-filter-search .search-wrapper{width:100%;max-width:480px;overflow:hidden}nice-filter-search .search-wrapper.nice-search-default{box-shadow:0 4px 12px #0000001f;border-radius:5px}nice-filter-search .search-wrapper.nice-search-outlined{border-radius:5px}nice-filter-search .search-wrapper.nice-search-legacy{box-shadow:0 3px 3px -2px #0000000f,0 3px 4px #0000000b,0 1px 8px #00000009;border-radius:28px}nice-filter-search .search-wrapper .search{width:100%;height:48px;line-height:48px;padding:0 18px}nice-filter-search .search-wrapper .search input{width:100%;height:48px;min-height:48px;max-height:48px;padding:0 16px;border:none;outline:none}\n"] }]
@@ -3340,6 +4187,9 @@ class NiceFilterMatSortSortingDirective {
3340
4187
  return;
3341
4188
  }
3342
4189
  const { order } = res;
4190
+ if (!order) {
4191
+ return;
4192
+ }
3343
4193
  this.sort.direction = order.direction;
3344
4194
  this.sort.active = order.column;
3345
4195
  });
@@ -3393,7 +4243,10 @@ class NiceFilterQueryParamsDirective {
3393
4243
  this.router = router;
3394
4244
  this.init = new EventEmitter();
3395
4245
  this.unsubscribeAll$ = new Subject();
3396
- this.initialized = false;
4246
+ this._initialized = false;
4247
+ }
4248
+ get initialized() {
4249
+ return this._initialized;
3397
4250
  }
3398
4251
  ngOnInit() {
3399
4252
  this.query.selectFilterParameters().pipe(takeUntil(this.unsubscribeAll$)).subscribe((parameters) => {
@@ -3422,13 +4275,18 @@ class NiceFilterQueryParamsDirective {
3422
4275
  });
3423
4276
  }
3424
4277
  loadQueryParams() {
3425
- this.route.queryParams
3426
- .pipe(takeUntil(this.unsubscribeAll$), map((params) => {
4278
+ combineLatest([
4279
+ this.route.queryParams.pipe(map((params) => params.start), distinct()),
4280
+ this.route.queryParams.pipe(map((params) => params.length), distinct()),
4281
+ this.route.queryParams.pipe(map((params) => params.order), distinct()),
4282
+ this.route.queryParams.pipe(map((params) => params.search), distinct()),
4283
+ this.route.queryParams.pipe(map((params) => params.rules), distinct()),
4284
+ ]).pipe(takeUntil(this.unsubscribeAll$), map(() => {
4285
+ const params = this.route.snapshot.queryParams;
3427
4286
  return {
3428
4287
  params: QueryParamsUtils.extractFilterParameters(params)
3429
4288
  };
3430
- }))
3431
- .subscribe(({ params }) => {
4289
+ })).subscribe(({ params }) => {
3432
4290
  if (!QueryParamsUtils.hasFilterParameters(params) || Object.keys(params).length === 0) {
3433
4291
  params = Object.assign({}, this.query.getValue().filterParameters);
3434
4292
  }
@@ -3437,10 +4295,9 @@ class NiceFilterQueryParamsDirective {
3437
4295
  !filterResult) {
3438
4296
  this.service.setParameters(params, false);
3439
4297
  }
3440
- if (!this.initialized) {
3441
- this.initialized = true;
4298
+ if (!this._initialized) {
4299
+ this._initialized = true;
3442
4300
  this.init.emit();
3443
- this.service.filter();
3444
4301
  }
3445
4302
  });
3446
4303
  }
@@ -3487,16 +4344,8 @@ class NiceBaseFilterViewComponent {
3487
4344
  if (mode) {
3488
4345
  this.filterViewService.setMode(mode);
3489
4346
  }
3490
- const { autoLoad: defaultAutoLoad } = this.filterViewQuery.getValue();
3491
- if (autoLoad && defaultAutoLoad) {
3492
- this.filterViewService.filter();
3493
- }
3494
- else {
3495
- this.filterViewService.setAutoLoad(autoLoad);
3496
- }
3497
- if (loadConfig) {
3498
- this.filterViewService.loadConfig(configQueryParams);
3499
- }
4347
+ this.autoLoad(autoLoad);
4348
+ this.loadConfig(loadConfig, configQueryParams);
3500
4349
  this.filterViewLoading$ = this.filterViewQuery.selectLoading();
3501
4350
  }
3502
4351
  /**
@@ -3550,9 +4399,38 @@ class NiceBaseFilterViewComponent {
3550
4399
  removeRule(id, reload = true) {
3551
4400
  this.filterViewService.removeRule(id, reload);
3552
4401
  }
4402
+ autoLoad(autoLoad) {
4403
+ const { autoLoad: defaultAutoLoad } = this.filterViewQuery.getValue();
4404
+ if (!this.queryParams) {
4405
+ if (autoLoad && defaultAutoLoad) {
4406
+ this.filterViewService.filter();
4407
+ }
4408
+ else {
4409
+ this.filterViewService.setAutoLoad(autoLoad);
4410
+ }
4411
+ return;
4412
+ }
4413
+ if (!autoLoad && defaultAutoLoad) {
4414
+ this.filterViewService.setAutoLoad(autoLoad);
4415
+ return;
4416
+ }
4417
+ this.queryParams.init.pipe(take(1)).subscribe(() => this.loadData());
4418
+ }
4419
+ loadConfig(loadConfig, configQueryParams) {
4420
+ if (loadConfig === true) {
4421
+ this.filterViewService.loadConfig(configQueryParams);
4422
+ return;
4423
+ }
4424
+ if (loadConfig === false) {
4425
+ return;
4426
+ }
4427
+ if (this.advancedFiltersButton || this.advancedFilters) {
4428
+ this.filterViewService.loadConfig(configQueryParams);
4429
+ }
4430
+ }
3553
4431
  }
3554
4432
  NiceBaseFilterViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceBaseFilterViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3555
- NiceBaseFilterViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceBaseFilterViewComponent, selector: "ng-component", viewQueries: [{ propertyName: "filterViewService", first: true, predicate: NiceFilterViewComponent, descendants: true, read: NiceFilterViewService, static: true }, { propertyName: "filterViewQuery", first: true, predicate: NiceFilterViewComponent, descendants: true, read: NiceFilterViewQuery, static: true }], ngImport: i0, template: ``, isInline: true });
4433
+ NiceBaseFilterViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceBaseFilterViewComponent, selector: "ng-component", viewQueries: [{ propertyName: "filterViewService", first: true, predicate: NiceFilterViewComponent, descendants: true, read: NiceFilterViewService, static: true }, { propertyName: "filterViewQuery", first: true, predicate: NiceFilterViewComponent, descendants: true, read: NiceFilterViewQuery, static: true }, { propertyName: "queryParams", first: true, predicate: NiceFilterQueryParamsDirective, descendants: true, static: true }, { propertyName: "advancedFiltersButton", first: true, predicate: NiceAdvancedFiltersButtonComponent, descendants: true, static: true }, { propertyName: "advancedFilters", first: true, predicate: NiceAdvancedFiltersComponent, descendants: true, static: true }], ngImport: i0, template: ``, isInline: true });
3556
4434
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceBaseFilterViewComponent, decorators: [{
3557
4435
  type: Component,
3558
4436
  args: [{
@@ -3564,6 +4442,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
3564
4442
  }], filterViewQuery: [{
3565
4443
  type: ViewChild,
3566
4444
  args: [NiceFilterViewComponent, { read: NiceFilterViewQuery, static: true }]
4445
+ }], queryParams: [{
4446
+ type: ViewChild,
4447
+ args: [NiceFilterQueryParamsDirective, { static: true }]
4448
+ }], advancedFiltersButton: [{
4449
+ type: ViewChild,
4450
+ args: [NiceAdvancedFiltersButtonComponent, { static: true }]
4451
+ }], advancedFilters: [{
4452
+ type: ViewChild,
4453
+ args: [NiceAdvancedFiltersComponent, { static: true }]
3567
4454
  }] } });
3568
4455
 
3569
4456
  class NiceFilterViewModule {
@@ -3574,7 +4461,7 @@ class NiceFilterViewModule {
3574
4461
  providers: [
3575
4462
  {
3576
4463
  provide: FILTER_VIEW_ICONS,
3577
- useValue: Object.assign(Object.assign({}, defaultIcons), ((_a = options === null || options === void 0 ? void 0 : options.icons) !== null && _a !== void 0 ? _a : {}))
4464
+ useValue: Object.assign(Object.assign({}, defaultIcons$1), ((_a = options === null || options === void 0 ? void 0 : options.icons) !== null && _a !== void 0 ? _a : {}))
3578
4465
  }
3579
4466
  ].filter(x => !!x)
3580
4467
  };
@@ -3727,8 +4614,10 @@ class SelectableListStateQuery extends QueryEntity {
3727
4614
  }
3728
4615
 
3729
4616
  class SelectableListStateService {
3730
- constructor(store, preloadService, options) {
4617
+ constructor(store, route, router, preloadService, options) {
3731
4618
  this.store = store;
4619
+ this.route = route;
4620
+ this.router = router;
3732
4621
  this.preloadService = preloadService;
3733
4622
  this.options = options;
3734
4623
  }
@@ -3770,14 +4659,26 @@ class SelectableListStateService {
3770
4659
  this.store.update((state) => ({
3771
4660
  unselectedEntity: arrayRemove(state.unselectedEntity, id)
3772
4661
  }));
3773
- if (!this.preloadService) {
3774
- this.store.add({
3775
- [this.idKey]: id,
3776
- loaded: false
3777
- });
4662
+ this.store.add({
4663
+ [this.idKey]: id,
4664
+ loaded: false
4665
+ });
4666
+ if (this.preloadService) {
4667
+ const entity = yield this.preloadService.loadEntityById(id);
4668
+ this.store.upsert(id, Object.assign(Object.assign({}, entity), { loaded: true }));
4669
+ }
4670
+ });
4671
+ }
4672
+ selectMany(ids, active) {
4673
+ return __awaiter(this, void 0, void 0, function* () {
4674
+ this.store.add(ids.map((id) => ({
4675
+ [this.idKey]: id,
4676
+ loaded: false
4677
+ })));
4678
+ if (active) {
4679
+ this.store.setActive(active);
4680
+ yield this.loadEntities(true);
3778
4681
  }
3779
- const entity = yield this.preloadService.loadEntityById(id);
3780
- return this.store.add(Object.assign(Object.assign({}, entity), { loaded: true }));
3781
4682
  });
3782
4683
  }
3783
4684
  selectEntity(entity) {
@@ -3785,11 +4686,11 @@ class SelectableListStateService {
3785
4686
  this.store.update((state) => ({
3786
4687
  unselectedEntity: arrayRemove(state.unselectedEntity, entity[this.idKey])
3787
4688
  }));
3788
- if (!this.preloadService) {
3789
- return this.store.upsert(entity[this.idKey], Object.assign(Object.assign({}, entity), { loaded: true }));
4689
+ this.store.upsert(entity[this.idKey], Object.assign(Object.assign({}, entity), { loaded: true }));
4690
+ if (this.preloadService) {
4691
+ const preloadedEntity = yield this.preloadService.reloadEntity(entity);
4692
+ this.store.upsert(preloadedEntity[this.idKey], Object.assign(Object.assign({}, preloadedEntity), { loaded: true }));
3790
4693
  }
3791
- const preloadedEntity = yield this.preloadService.reloadEntity(entity);
3792
- return this.store.upsert(preloadedEntity[this.idKey], Object.assign(Object.assign({}, preloadedEntity), { loaded: true }));
3793
4694
  });
3794
4695
  }
3795
4696
  selectManyEntities(entities) {
@@ -3798,7 +4699,7 @@ class SelectableListStateService {
3798
4699
  return this.store.upsertMany(entities.map((entity) => (Object.assign(Object.assign({}, entity), { loaded: true }))));
3799
4700
  }
3800
4701
  const preloadedEntities = yield this.preloadService.reloadEntities(entities);
3801
- return this.store.upsertMany(preloadedEntities.map((preloadedEntity) => (Object.assign(Object.assign({}, preloadedEntity), { loaded: true }))));
4702
+ this.store.upsertMany(preloadedEntities.map((preloadedEntity) => (Object.assign(Object.assign({}, preloadedEntity), { loaded: true }))));
3802
4703
  });
3803
4704
  }
3804
4705
  unselectAll() {
@@ -3823,6 +4724,9 @@ class SelectableListStateService {
3823
4724
  unselectManyEntities(entities) {
3824
4725
  this.store.remove(entities.map((entity) => entity[this.idKey]));
3825
4726
  }
4727
+ updateEntity(entity) {
4728
+ this.store.update(entity[this.idKey], entity);
4729
+ }
3826
4730
  setEntities(ids, activeId) {
3827
4731
  return __awaiter(this, void 0, void 0, function* () {
3828
4732
  this.store.update({
@@ -3836,6 +4740,7 @@ class SelectableListStateService {
3836
4740
  if (activeId) {
3837
4741
  this.store.setActive(activeId);
3838
4742
  }
4743
+ yield this.loadEntities(true);
3839
4744
  });
3840
4745
  }
3841
4746
  next() {
@@ -3929,11 +4834,26 @@ class SelectableListStateService {
3929
4834
  }
3930
4835
  return toLoad;
3931
4836
  }
4837
+ generateQueryParams() {
4838
+ const { ids, active } = this.store.getValue();
4839
+ return {
4840
+ selection: ids.length ? ids : null,
4841
+ selected: active !== null && active !== void 0 ? active : null
4842
+ };
4843
+ }
4844
+ setQueryParams() {
4845
+ this.router.navigate([], {
4846
+ queryParams: this.generateQueryParams(),
4847
+ queryParamsHandling: "merge"
4848
+ });
4849
+ }
3932
4850
  }
3933
4851
 
3934
4852
  class SelectableListService {
3935
- constructor(providers) {
4853
+ constructor(providers, route, router) {
3936
4854
  this.providers = providers;
4855
+ this.route = route;
4856
+ this.router = router;
3937
4857
  this.stores = new Map();
3938
4858
  }
3939
4859
  createState(name, options) {
@@ -3951,10 +4871,10 @@ class SelectableListService {
3951
4871
  const provider = (_a = this.providers) === null || _a === void 0 ? void 0 : _a.find((p) => p.state === stateName);
3952
4872
  const state = this.getState(stateName);
3953
4873
  if (state) {
3954
- return new SelectableListStateService(state.store, provider, options);
4874
+ return new SelectableListStateService(state.store, this.route, this.router, provider, options);
3955
4875
  }
3956
4876
  const newState = this.createState(stateName, options);
3957
- return new SelectableListStateService(newState.store, provider, options);
4877
+ return new SelectableListStateService(newState.store, this.route, this.router, provider, options);
3958
4878
  }
3959
4879
  query(stateName) {
3960
4880
  const state = this.getState(stateName);
@@ -3964,7 +4884,7 @@ class SelectableListService {
3964
4884
  return state.query;
3965
4885
  }
3966
4886
  }
3967
- SelectableListService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: SelectableListService, deps: [{ token: NICE_PRELOAD_SELECTED_ENTITIES_PROVIDER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
4887
+ SelectableListService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: SelectableListService, deps: [{ token: NICE_PRELOAD_SELECTED_ENTITIES_PROVIDER, optional: true }, { token: i2.ActivatedRoute }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
3968
4888
  SelectableListService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: SelectableListService, providedIn: "root" });
3969
4889
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: SelectableListService, decorators: [{
3970
4890
  type: Injectable,
@@ -3975,13 +4895,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
3975
4895
  }, {
3976
4896
  type: Inject,
3977
4897
  args: [NICE_PRELOAD_SELECTED_ENTITIES_PROVIDER]
3978
- }] }];
4898
+ }] }, { type: i2.ActivatedRoute }, { type: i2.Router }];
3979
4899
  } });
3980
4900
 
3981
4901
  class SelectableListContentService {
3982
4902
  constructor() {
3983
4903
  this._state = null;
3984
4904
  this._checkboxes = new QueryList();
4905
+ this.defaultOptions = { idKey: "id", preloadWindow: 2 };
4906
+ }
4907
+ get options() {
4908
+ var _a;
4909
+ return (_a = this._options) !== null && _a !== void 0 ? _a : this.defaultOptions;
3985
4910
  }
3986
4911
  get state() {
3987
4912
  return this._state;
@@ -3989,6 +4914,9 @@ class SelectableListContentService {
3989
4914
  get checkboxes() {
3990
4915
  return this._checkboxes;
3991
4916
  }
4917
+ setOptions(options) {
4918
+ this._options = Object.assign(Object.assign({}, this.defaultOptions), options);
4919
+ }
3992
4920
  setState(state) {
3993
4921
  this._state = state;
3994
4922
  }
@@ -4009,6 +4937,7 @@ class NiceSelectableListCheckboxDirective {
4009
4937
  this.service = service;
4010
4938
  this.selectableListService = selectableListService;
4011
4939
  this.unsubscribeAll$ = new Subject();
4940
+ this.initialized = false;
4012
4941
  }
4013
4942
  get currentId() {
4014
4943
  if (!this.selectableEntity || !this.selectableListStateService) {
@@ -4029,6 +4958,12 @@ class NiceSelectableListCheckboxDirective {
4029
4958
  ngOnDestroy() {
4030
4959
  this.unsubscribeAll$.next();
4031
4960
  this.unsubscribeAll$.complete();
4961
+ this.initialized = false;
4962
+ }
4963
+ ngDoCheck() {
4964
+ if (this.selectPage && !this.initialized) {
4965
+ this.updateCheckboxState();
4966
+ }
4032
4967
  }
4033
4968
  handleSelectableEntity() {
4034
4969
  if (this.checkbox.checked) {
@@ -4067,7 +5002,6 @@ class NiceSelectableListCheckboxDirective {
4067
5002
  }
4068
5003
  handleSelectPage() {
4069
5004
  this.selectableListStateQuery.selectCount().subscribe(() => this.updateCheckboxState());
4070
- this.service.checkboxes.changes.pipe(takeUntil(this.unsubscribeAll$)).subscribe(() => this.updateCheckboxState());
4071
5005
  this.checkbox.change.pipe(takeUntil(this.unsubscribeAll$)).subscribe((value) => {
4072
5006
  for (const checkbox of this.service.checkboxes) {
4073
5007
  if (checkbox.selectPage) {
@@ -4079,11 +5013,19 @@ class NiceSelectableListCheckboxDirective {
4079
5013
  });
4080
5014
  }
4081
5015
  updateCheckboxState() {
5016
+ const count = this.selectableListStateQuery.getCount();
4082
5017
  const checkboxes = this.service.checkboxes.filter((checkbox) => !checkbox.selectPage);
4083
5018
  if (!checkboxes.length) {
5019
+ if (!count) {
5020
+ this.checkbox.indeterminate = false;
5021
+ this.checkbox.checked = false;
5022
+ return;
5023
+ }
5024
+ this.checkbox.indeterminate = true;
5025
+ this.checkbox.checked = false;
4084
5026
  return;
4085
5027
  }
4086
- const count = this.selectableListStateQuery.getCount();
5028
+ this.initialized = true;
4087
5029
  if (!count) {
4088
5030
  this.checkbox.indeterminate = false;
4089
5031
  this.checkbox.checked = false;
@@ -4157,28 +5099,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
4157
5099
 
4158
5100
  // tslint:disable-next-line:directive-class-suffix
4159
5101
  class NiceSelectableListDirective {
4160
- constructor(service) {
5102
+ constructor(service, selectableListService, route) {
4161
5103
  this.service = service;
4162
- this.defaultOptions = { idKey: "id", preloadWindow: 2 };
5104
+ this.selectableListService = selectableListService;
5105
+ this.route = route;
5106
+ this.unsubscribeAll$ = new Subject();
5107
+ this.unsubscribeQuerySub$ = new Subject();
4163
5108
  }
4164
5109
  ngOnInit() {
4165
- if (!this.options) {
4166
- this.options = Object.assign({}, this.defaultOptions);
4167
- }
5110
+ combineLatest([
5111
+ this.route.queryParams.pipe(map((params) => params.selection), distinct()),
5112
+ this.route.queryParams.pipe(map((params) => params.selected), distinct())
5113
+ ]).pipe(takeUntil(this.unsubscribeAll$)).subscribe(([selection, selected]) => {
5114
+ if (!selection) {
5115
+ this.stateService.setQueryParams();
5116
+ return;
5117
+ }
5118
+ const newSelection = typeof selection === "string" ? [+selection] : selection.map((s) => +s);
5119
+ const newSelected = selected ? +selected : null;
5120
+ const { ids, active } = this.stateQuery.getValue();
5121
+ if (!ids.length || !ids.every((id) => newSelection.includes(id))) {
5122
+ this.stateService.setEntities(newSelection, newSelected);
5123
+ return;
5124
+ }
5125
+ if (newSelected && active !== newSelected) {
5126
+ this.stateService.setActive(newSelected);
5127
+ }
5128
+ });
5129
+ }
5130
+ ngOnDestroy() {
5131
+ this.unsubscribeAll$.next();
5132
+ this.unsubscribeAll$.complete();
5133
+ this.unsubscribeQuerySub$.next();
5134
+ this.unsubscribeQuerySub$.complete();
4168
5135
  }
4169
5136
  ngOnChanges(changes) {
4170
5137
  if ("options" in changes) {
4171
- this.options = Object.assign(Object.assign({}, this.defaultOptions), changes.options.currentValue);
5138
+ this.service.setOptions(this.options);
4172
5139
  }
4173
5140
  if ("state" in changes) {
4174
5141
  this.service.setState(this.state);
5142
+ this.stateService = this.selectableListService.withState(this.state);
5143
+ this.stateQuery = this.selectableListService.query(this.state);
5144
+ this.listenOnStateChanges();
4175
5145
  }
4176
5146
  }
4177
5147
  ngAfterContentInit() {
4178
5148
  this.service.setCheckboxes(this.checkboxes);
4179
5149
  }
5150
+ listenOnStateChanges() {
5151
+ this.unsubscribeQuerySub$.next();
5152
+ this.stateQuery.selectEntityAction([
5153
+ EntityActions.Add,
5154
+ EntityActions.Remove,
5155
+ EntityActions.Set
5156
+ ]).pipe(takeUntil(this.unsubscribeQuerySub$)).subscribe(() => {
5157
+ this.stateService.setQueryParams();
5158
+ });
5159
+ this.stateQuery.selectActiveId().pipe(takeUntil(this.unsubscribeQuerySub$)).subscribe(() => this.stateService.setQueryParams());
5160
+ }
4180
5161
  }
4181
- NiceSelectableListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListDirective, deps: [{ token: SelectableListContentService }], target: i0.ɵɵFactoryTarget.Directive });
5162
+ NiceSelectableListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListDirective, deps: [{ token: SelectableListContentService }, { token: SelectableListService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Directive });
4182
5163
  NiceSelectableListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceSelectableListDirective, selector: "[niceSelectableList]", inputs: { state: "state", options: "options" }, providers: [SelectableListContentService], queries: [{ propertyName: "checkboxes", predicate: NiceSelectableListCheckboxDirective, descendants: true }], usesOnChanges: true, ngImport: i0 });
4183
5164
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListDirective, decorators: [{
4184
5165
  type: Directive,
@@ -4186,7 +5167,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
4186
5167
  selector: "[niceSelectableList]",
4187
5168
  providers: [SelectableListContentService]
4188
5169
  }]
4189
- }], ctorParameters: function () { return [{ type: SelectableListContentService }]; }, propDecorators: { state: [{
5170
+ }], ctorParameters: function () { return [{ type: SelectableListContentService }, { type: SelectableListService }, { type: i2.ActivatedRoute }]; }, propDecorators: { state: [{
4190
5171
  type: Input
4191
5172
  }], options: [{
4192
5173
  type: Input
@@ -4236,5 +5217,5 @@ String.prototype.toTableColumn = function (sortableOrOptions, nullLast) {
4236
5217
  * Generated bundle index. Do not edit.
4237
5218
  */
4238
5219
 
4239
- export { DateFilterComponent, FilterComponent, FilterGroupIconPipe, FilterOperatorTypes, FilterSelectionComponent, FilterType, FilterUtils, LayoutContent, NiceBaseFilterViewComponent, NiceBaseListButtonsDirective, NiceBaseListCardsDirective, NiceBaseListComponent, NiceBaseListCustomContentDirective, NiceBaseListDirectiveModule, NiceBaseListEmptySearchResultStateDirective, NiceBaseListEmptyStateDirective, NiceBaseListFiltersDirective, NiceBaseListModule, NiceBaseListQuery, NiceBaseListService, NiceBaseListStore, NiceBaseListTableDirective, NiceBaseListTitleDirective, NiceCustomDateAdapter, NiceFilterApi, NiceFilterCustomDataViewComponent, NiceFilterDataDirective, NiceFilterExportButtonsComponent, NiceFilterExportDirective, NiceFilterGroupService, NiceFilterInfiniteScrollDataViewComponent, NiceFilterMatPaginatorPaginationDirective, NiceFilterMatSortSortingDirective, NiceFilterMatTableViewDirective, NiceFilterQueryParamsDirective, NiceFilterSearchComponent, NiceFilterService, NiceFilterViewComponent, NiceFilterViewModule, NiceFilterViewQuery, NiceFilterViewService, NiceListState, NiceMultiStateFilterService, NiceMultiStateListComponent, NiceMultiStateListModule, NiceMultiStateListQuery, NiceMultiStateListService, NiceMultiStateListStore, NicePreloadSelectedEntitiesProvider, NiceQueryBuilderComponent, NiceQueryBuilderModule, NiceSavedReportService, NiceSelectableListCheckboxDirective, NiceSelectableListDirective, NiceSelectableListModule, NiceSelectableListSelectAllDirective, NumberFilterComponent, OrderUtils, QBFilterUtils, QueryBuilderTriggerDirective, RadioFilterComponent, RuleComponent, SelectFilterComponent, SelectableListService, SelectableListStateQuery, SelectableListStateService, StringUtils, TableColumns, TextFilterComponent, defaultLayout, initialBaseListState, initialValue$1 as initialValue, mixinNiceFilterApi };
5220
+ export { AdvancedFiltersForm, AdvancedFiltersTriggerDirective, DateFilterComponent, FilterComponent$1 as FilterComponent, FilterForm, FilterFormValues, FilterGroupIconPipe, FilterOperatorTypes, FilterSelectionComponent, FilterType, FilterUtils, LayoutContent, NiceAdvancedFiltersButtonComponent, NiceAdvancedFiltersComponent, NiceAdvancedFiltersModule, NiceBaseFilterViewComponent, NiceBaseListButtonsDirective, NiceBaseListCardsDirective, NiceBaseListComponent, NiceBaseListCustomContentDirective, NiceBaseListDirectiveModule, NiceBaseListEmptySearchResultStateDirective, NiceBaseListEmptyStateDirective, NiceBaseListFiltersDirective, NiceBaseListModule, NiceBaseListQuery, NiceBaseListService, NiceBaseListStore, NiceBaseListTableDirective, NiceBaseListTitleDirective, NiceCustomDateAdapter, NiceFilterApi, NiceFilterCustomDataViewComponent, NiceFilterDataDirective, NiceFilterExportButtonsComponent, NiceFilterExportDirective, NiceFilterGroupService, NiceFilterInfiniteScrollDataViewComponent, NiceFilterMatPaginatorPaginationDirective, NiceFilterMatSortSortingDirective, NiceFilterMatTableViewDirective, NiceFilterQueryParamsDirective, NiceFilterSearchComponent, NiceFilterService, NiceFilterViewComponent, NiceFilterViewModule, NiceFilterViewQuery, NiceFilterViewService, NiceListState, NiceMultiStateFilterService, NiceMultiStateListComponent, NiceMultiStateListModule, NiceMultiStateListQuery, NiceMultiStateListService, NiceMultiStateListStore, NicePreloadSelectedEntitiesProvider, NiceQueryBuilderComponent, NiceQueryBuilderModule, NiceSavedReportService, NiceSelectableListCheckboxDirective, NiceSelectableListDirective, NiceSelectableListModule, NiceSelectableListSelectAllDirective, NumberFilterComponent, OrderUtils, QBFilterUtils, QueryBuilderTriggerDirective, RadioFilterComponent, RuleComponent, SelectFilterComponent, SelectableListService, SelectableListStateQuery, SelectableListStateService, StringUtils, TableColumns, TextFilterComponent, defaultLayout, initialBaseListState, initialValue$1 as initialValue, mixinNiceFilterApi };
4240
5221
  //# sourceMappingURL=recursyve-nice-data-filter-kit.mjs.map