@recursyve/nice-data-filter-kit 14.4.0 → 14.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,16 @@
1
1
  import { plainToInstance } from 'class-transformer';
2
2
  import { map, takeUntil, debounceTime, switchMap, distinctUntilChanged, withLatestFrom } from 'rxjs/operators';
3
3
  import { HttpParams } from '@angular/common/http';
4
- import * as i5 from '@recursyve/nice-ui-kit.v2';
4
+ import * as i5$1 from '@recursyve/nice-ui-kit.v2';
5
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
- import { Directive, Input, NgModule, Injectable, Inject, InjectionToken, Optional, Pipe, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, HostListener, forwardRef, TemplateRef, ContentChild, ContentChildren, ViewChild, QueryList } from '@angular/core';
7
+ import { Directive, Input, NgModule, Injectable, Inject, InjectionToken, Optional, Pipe, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, HostListener, forwardRef, TemplateRef, ContentChild, ContentChildren, QueryList, ViewChild } from '@angular/core';
8
8
  import { Store, StoreConfig, Query, arrayAdd, arrayUpsert, arrayRemove, EntityStore, QueryEntity, EntityActions } from '@datorama/akita';
9
9
  import { combineLatest, Subject, firstValueFrom, of, lastValueFrom, startWith, tap, distinct, take } from 'rxjs';
10
10
  import { __decorate, __metadata } from 'tslib';
11
11
  import * as i2 from '@angular/router';
12
12
  import { RouterModule } from '@angular/router';
13
- import * as i3$4 from '@angular/material/bottom-sheet';
13
+ import * as i4$2 from '@angular/material/bottom-sheet';
14
14
  import { MatBottomSheetModule } from '@angular/material/bottom-sheet';
15
15
  import * as i2$1 from '@angular/common';
16
16
  import { CommonModule, AsyncPipe, NgIf, NgTemplateOutlet } from '@angular/common';
@@ -18,7 +18,7 @@ import * as i1$1 from '@angular/forms';
18
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 i4$1 from '@angular/material/icon';
21
+ import * as i5 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';
@@ -46,11 +46,11 @@ import * as i6 from '@angular/material/select';
46
46
  import { MatSelectModule } from '@angular/material/select';
47
47
  import * as i3$2 from '@angular/material/input';
48
48
  import { MatInputModule } from '@angular/material/input';
49
- import * as i4$2 from 'ngx-mask';
49
+ import * as i4$1 from 'ngx-mask';
50
50
  import { NgxMaskModule } from 'ngx-mask';
51
51
  import * as i3$3 from '@angular/material/radio';
52
52
  import { MatRadioModule } from '@angular/material/radio';
53
- import * as i5$1 from '@angular/material/datepicker';
53
+ import * as i5$2 from '@angular/material/datepicker';
54
54
  import { MatDatepickerModule } from '@angular/material/datepicker';
55
55
  import * as i1$2 from '@ngx-translate/core';
56
56
  import { TranslateModule } from '@ngx-translate/core';
@@ -571,7 +571,8 @@ class FilterUtils {
571
571
  rules: filterParameters.rules ?? []
572
572
  },
573
573
  order: OrderUtils.combineOrders(filterParameters.order, filterParameters.fallbackOrder),
574
- data: filterParameters.data
574
+ data: filterParameters.data,
575
+ groupBy: filterParameters.groupBy
575
576
  };
576
577
  }
577
578
  static filterChangeNeedsRefresh(currentFilters, newFilters) {
@@ -1448,7 +1449,7 @@ class FilterSelectionComponent {
1448
1449
  }
1449
1450
  }
1450
1451
  FilterSelectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FilterSelectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1451
- 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 });
1452
+ 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: 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 });
1452
1453
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: FilterSelectionComponent, decorators: [{
1453
1454
  type: Component,
1454
1455
  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" }]
@@ -1617,7 +1618,7 @@ SelectFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
1617
1618
  useExisting: forwardRef(() => SelectFilterComponent),
1618
1619
  multi: true
1619
1620
  }
1620
- ], 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 });
1621
+ ], 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$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 });
1621
1622
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: SelectFilterComponent, decorators: [{
1622
1623
  type: Component,
1623
1624
  args: [{ selector: "nice-select-filter", encapsulation: ViewEncapsulation.None, providers: [
@@ -1642,7 +1643,7 @@ TextFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
1642
1643
  useExisting: forwardRef(() => TextFilterComponent),
1643
1644
  multi: true
1644
1645
  }
1645
- ], 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 });
1646
+ ], 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$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 });
1646
1647
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TextFilterComponent, decorators: [{
1647
1648
  type: Component,
1648
1649
  args: [{ selector: "nice-text-filter", encapsulation: ViewEncapsulation.None, providers: [
@@ -1713,7 +1714,7 @@ DateFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
1713
1714
  useExisting: forwardRef(() => DateFilterComponent),
1714
1715
  multi: true
1715
1716
  }
1716
- ], 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 });
1717
+ ], 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: 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$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 });
1717
1718
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: DateFilterComponent, decorators: [{
1718
1719
  type: Component,
1719
1720
  args: [{ selector: "nice-date-filter", encapsulation: ViewEncapsulation.None, providers: [
@@ -1781,7 +1782,7 @@ class RuleComponent {
1781
1782
  }
1782
1783
  }
1783
1784
  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 });
1784
- 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 });
1785
+ 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: i5.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 });
1785
1786
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: RuleComponent, decorators: [{
1786
1787
  type: Component,
1787
1788
  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" }]
@@ -1848,7 +1849,7 @@ NiceQueryBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
1848
1849
  provide: GeneratedFormGroup,
1849
1850
  useFactory: ngxFormGeneratorFactory(QueryBuilderForm)
1850
1851
  }
1851
- ], 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 });
1852
+ ], 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: 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 });
1852
1853
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceQueryBuilderComponent, decorators: [{
1853
1854
  type: Component,
1854
1855
  args: [{ selector: "nice-query-builder", encapsulation: ViewEncapsulation.None, providers: [
@@ -2094,12 +2095,12 @@ class NiceBaseListComponent {
2094
2095
  }
2095
2096
  }
2096
2097
  }
2097
- 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 });
2098
+ 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: i4$2.MatBottomSheet }, { token: i2.Router }, { token: i5$1.NiceMediaWatcherService }], target: i0.ɵɵFactoryTarget.Component });
2098
2099
  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: [
2099
2100
  NiceBaseListQuery,
2100
2101
  NiceBaseListService,
2101
2102
  NiceBaseListStore
2102
- ], 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" }] });
2103
+ ], 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: 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: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }] });
2103
2104
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceBaseListComponent, decorators: [{
2104
2105
  type: Component,
2105
2106
  args: [{ selector: "nice-base-list", providers: [
@@ -2124,7 +2125,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
2124
2125
  }] }, { type: undefined, decorators: [{
2125
2126
  type: Inject,
2126
2127
  args: [EXPORTS_SETTINGS$1]
2127
- }] }, { type: NiceBaseListQuery }, { type: NiceBaseListService }, { type: i2.ActivatedRoute }, { type: i3$4.MatBottomSheet }, { type: i2.Router }, { type: i5.NiceMediaWatcherService }]; }, propDecorators: { title: [{
2128
+ }] }, { type: NiceBaseListQuery }, { type: NiceBaseListService }, { type: i2.ActivatedRoute }, { type: i4$2.MatBottomSheet }, { type: i2.Router }, { type: i5$1.NiceMediaWatcherService }]; }, propDecorators: { title: [{
2128
2129
  type: ContentChild,
2129
2130
  args: [NiceBaseListTitleDirective, { read: TemplateRef }]
2130
2131
  }], buttons: [{
@@ -2600,12 +2601,12 @@ class NiceMultiStateListComponent extends NiceBaseListComponent {
2600
2601
  this.setColumns(columns);
2601
2602
  }
2602
2603
  }
2603
- 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 });
2604
+ 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: i4$2.MatBottomSheet }, { token: i2.Router }, { token: i5$1.NiceMediaWatcherService }, { token: NiceMultiStateListService }], target: i0.ɵɵFactoryTarget.Component });
2604
2605
  NiceMultiStateListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceMultiStateListComponent, selector: "nice-multi-state-list", inputs: { state: "state" }, providers: [
2605
2606
  NiceMultiStateListQuery,
2606
2607
  NiceMultiStateListService,
2607
2608
  NiceMultiStateListStore
2608
- ], 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" }] });
2609
+ ], 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: 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: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }] });
2609
2610
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceMultiStateListComponent, decorators: [{
2610
2611
  type: Component,
2611
2612
  args: [{ selector: "nice-multi-state-list", providers: [
@@ -2627,7 +2628,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
2627
2628
  }] }, { type: undefined, decorators: [{
2628
2629
  type: Inject,
2629
2630
  args: [EXPORTS_SETTINGS$1]
2630
- }] }, { type: NiceMultiStateListQuery }, { type: i2.ActivatedRoute }, { type: i3$4.MatBottomSheet }, { type: i2.Router }, { type: i5.NiceMediaWatcherService }, { type: NiceMultiStateListService }]; }, propDecorators: { state: [{
2631
+ }] }, { type: NiceMultiStateListQuery }, { type: i2.ActivatedRoute }, { type: i4$2.MatBottomSheet }, { type: i2.Router }, { type: i5$1.NiceMediaWatcherService }, { type: NiceMultiStateListService }]; }, propDecorators: { state: [{
2631
2632
  type: Input
2632
2633
  }] } });
2633
2634
 
@@ -2987,14 +2988,30 @@ class NiceFilterViewService {
2987
2988
  this.store.setLoading(false);
2988
2989
  }
2989
2990
  }
2990
- async downloadData(type, downloadFileName) {
2991
+ async downloadData(type, downloadFileName, ids) {
2991
2992
  const { filterParameters, disabled } = this.store.getValue();
2992
2993
  if (disabled) {
2993
2994
  return;
2994
2995
  }
2996
+ const parameters = {
2997
+ ...filterParameters,
2998
+ rules: filterParameters?.rules ? [...filterParameters.rules] : []
2999
+ };
3000
+ if (ids?.length) {
3001
+ parameters.rules.push({
3002
+ condition: "and",
3003
+ rules: [
3004
+ {
3005
+ id: "id",
3006
+ operation: FilterOperatorTypes.In,
3007
+ value: ids
3008
+ }
3009
+ ]
3010
+ });
3011
+ }
2995
3012
  try {
2996
3013
  this.store.setLoading(true);
2997
- const result = await firstValueFrom(this.filterService.getFile(type, this.store.getParameters(filterParameters)));
3014
+ const result = await firstValueFrom(this.filterService.getFile(type, this.store.getParameters(parameters)));
2998
3015
  FileUtils.downloadFile(`${downloadFileName}.${type}`, result);
2999
3016
  }
3000
3017
  catch (e) {
@@ -3275,7 +3292,7 @@ class NiceAdvancedFilterSelectionComponent {
3275
3292
  }
3276
3293
  }
3277
3294
  NiceAdvancedFilterSelectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedFilterSelectionComponent, deps: [{ token: NiceFilterViewQuery }], target: i0.ɵɵFactoryTarget.Component });
3278
- 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.md:grid-cols-2]=\"filterGroups.length >= 2\" class=\"grid grid-cols-1 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 });
3295
+ 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.md:grid-cols-2]=\"filterGroups.length >= 2\" class=\"grid grid-cols-1 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$1.NiceLoadingDirective, selector: "[niceLoadingOverlay]", inputs: ["niceLoadingOverlay"] }, { kind: "component", type: i5.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 });
3279
3296
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedFilterSelectionComponent, decorators: [{
3280
3297
  type: Component,
3281
3298
  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.md:grid-cols-2]=\"filterGroups.length >= 2\" class=\"grid grid-cols-1 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" }]
@@ -3375,7 +3392,7 @@ class NiceAdvancedFiltersButtonComponent {
3375
3392
  }
3376
3393
  }
3377
3394
  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 });
3378
- 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 });
3395
+ 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: i5.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 });
3379
3396
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedFiltersButtonComponent, decorators: [{
3380
3397
  type: Component,
3381
3398
  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"] }]
@@ -3569,7 +3586,7 @@ NiceAdvancedDateFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion:
3569
3586
  useExisting: forwardRef(() => NiceAdvancedDateFilterComponent),
3570
3587
  multi: true
3571
3588
  }
3572
- ], 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 });
3589
+ ], 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: i5.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$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 });
3573
3590
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedDateFilterComponent, decorators: [{
3574
3591
  type: Component,
3575
3592
  args: [{ selector: "nice-advanced-date-filter", encapsulation: ViewEncapsulation.None, providers: [
@@ -3664,7 +3681,7 @@ NiceAdvancedSelectFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion
3664
3681
  useExisting: forwardRef(() => NiceAdvancedSelectFilterComponent),
3665
3682
  multi: true
3666
3683
  }
3667
- ], 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 });
3684
+ ], 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$1.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$1.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 });
3668
3685
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedSelectFilterComponent, decorators: [{
3669
3686
  type: Component,
3670
3687
  args: [{ selector: "nice-advanced-select-filter", encapsulation: ViewEncapsulation.None, providers: [
@@ -3687,7 +3704,7 @@ NiceAdvancedTextFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion:
3687
3704
  useExisting: forwardRef(() => NiceAdvancedTextFilterComponent),
3688
3705
  multi: true
3689
3706
  }
3690
- ], 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 });
3707
+ ], 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$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 });
3691
3708
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedTextFilterComponent, decorators: [{
3692
3709
  type: Component,
3693
3710
  args: [{ selector: "nice-advanced-text-filter", encapsulation: ViewEncapsulation.None, providers: [
@@ -3734,7 +3751,7 @@ class NiceAdvancedRuleComponent {
3734
3751
  }
3735
3752
  }
3736
3753
  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 });
3737
- 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 });
3754
+ 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: i5.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 });
3738
3755
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedRuleComponent, decorators: [{
3739
3756
  type: Component,
3740
3757
  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" }]
@@ -3795,7 +3812,7 @@ NiceAdvancedFiltersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14
3795
3812
  useClass: AdvancedFiltersAsyncTypeaheadProvider,
3796
3813
  multi: true
3797
3814
  }
3798
- ], 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 });
3815
+ ], 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: i5.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 });
3799
3816
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceAdvancedFiltersComponent, decorators: [{
3800
3817
  type: Component,
3801
3818
  args: [{ selector: "nice-advanced-filters", encapsulation: ViewEncapsulation.None, providers: [
@@ -3979,929 +3996,701 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
3979
3996
  args: [NiceFilterDataDirective, { read: TemplateRef }]
3980
3997
  }] } });
3981
3998
 
3982
- class NiceFilterExportButtonsComponent {
3983
- constructor(icons, exportsSettings, query, service, bottomSheet) {
3984
- this.icons = icons;
3985
- this.exportsSettings = exportsSettings;
3986
- this.query = query;
3987
- this.service = service;
3988
- this.bottomSheet = bottomSheet;
3989
- this.customExport = [];
3990
- this.downloadFileName = "data";
3991
- this.canPrint = true;
3992
- this.loading$ = this.query.selectLoading();
3999
+ const NICE_PRELOAD_SELECTED_ENTITIES_PROVIDER = new InjectionToken("nice_preload_selected_entities_provider");
4000
+
4001
+ class NiceSelectableListStateQuery extends QueryEntity {
4002
+ constructor(store) {
4003
+ super(store);
3993
4004
  }
3994
- clickExport() {
3995
- const exports = [];
3996
- if (this.exportsSettings.xlsx) {
3997
- exports.push({
3998
- type: "xlsx",
3999
- onClickExport: () => this.clickXlsx()
4000
- });
4001
- }
4002
- if (this.exportsSettings.csv) {
4003
- exports.push({
4004
- type: "csv",
4005
- onClickExport: () => this.clickCsv()
4006
- });
4007
- }
4008
- if (this.exportsSettings.pdf) {
4009
- exports.push({
4010
- type: "pdf",
4011
- onClickExport: () => this.clickPdf()
4012
- });
4013
- }
4014
- this.bottomSheet.open(ExportBottomSheetComponent, {
4015
- data: {
4016
- exportStrategies: [
4017
- ...exports,
4018
- ...this.customExport
4019
- ]
4020
- }
4005
+ selectActiveViewIndex() {
4006
+ return this.select(({ ids, active }) => {
4007
+ const index = ids.indexOf(active);
4008
+ return index + 1;
4021
4009
  });
4022
4010
  }
4023
- clickXlsx() {
4024
- this.service.downloadData("xlsx", this.downloadFileName);
4025
- }
4026
- clickCsv() {
4027
- this.service.downloadData("csv", this.downloadFileName);
4028
- }
4029
- clickPrint() {
4030
- this.service.printData();
4011
+ selectFirstActive() {
4012
+ return this.select(({ ids, active }) => {
4013
+ if (!ids.length) {
4014
+ return true;
4015
+ }
4016
+ return ids[0] === active;
4017
+ });
4031
4018
  }
4032
- clickPdf() {
4033
- this.service.downloadData("pdf", this.downloadFileName);
4019
+ selectLastActive() {
4020
+ return this.select(({ ids, active }) => {
4021
+ if (!ids.length) {
4022
+ return true;
4023
+ }
4024
+ return ids[ids.length - 1] === active;
4025
+ });
4034
4026
  }
4035
4027
  }
4036
- 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 });
4037
- 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 });
4038
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterExportButtonsComponent, decorators: [{
4039
- type: Component,
4040
- 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" }]
4041
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
4042
- type: Inject,
4043
- args: [FILTER_VIEW_ICONS]
4044
- }] }, { type: undefined, decorators: [{
4045
- type: Inject,
4046
- args: [EXPORTS_SETTINGS]
4047
- }] }, { type: NiceFilterViewQuery }, { type: NiceFilterViewService }, { type: i3$4.MatBottomSheet }]; }, propDecorators: { customExport: [{
4048
- type: Input
4049
- }], downloadFileName: [{
4050
- type: Input
4051
- }], canPrint: [{
4052
- type: Input
4053
- }] } });
4054
4028
 
4055
- class NiceFilterExportDirective {
4056
- constructor(service) {
4057
- this.service = service;
4058
- this.downloadFileName = "data";
4029
+ class NiceSelectableListStateService {
4030
+ constructor(store, route, router, preloadService, options) {
4031
+ this.store = store;
4032
+ this.route = route;
4033
+ this.router = router;
4034
+ this.preloadService = preloadService;
4035
+ this.options = options;
4059
4036
  }
4060
- onClick() {
4061
- this.service.downloadData(this.type, this.downloadFileName);
4037
+ get idKey() {
4038
+ return this.options?.idKey ?? "id";
4062
4039
  }
4063
- }
4064
- NiceFilterExportDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterExportDirective, deps: [{ token: NiceFilterViewService }], target: i0.ɵɵFactoryTarget.Directive });
4065
- 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 });
4066
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterExportDirective, decorators: [{
4067
- type: Directive,
4068
- args: [{ selector: "[niceFilterExport]" }]
4069
- }], ctorParameters: function () { return [{ type: NiceFilterViewService }]; }, propDecorators: { type: [{
4070
- type: Input
4071
- }], downloadFileName: [{
4072
- type: Input
4073
- }], onClick: [{
4074
- type: HostListener,
4075
- args: ["click"]
4076
- }] } });
4077
-
4078
- class NiceFilterInfiniteScrollDataViewComponent {
4079
- constructor(query, service) {
4080
- this.query = query;
4081
- this.service = service;
4082
- this.data$ = this.query.selectAll();
4040
+ get preloadedWindow() {
4041
+ return this.options?.preloadWindow ?? 2;
4083
4042
  }
4084
- async loadNextPage() {
4085
- const { filterParameters, filterResult } = this.query.getValue();
4086
- this.service.setMode("accumulated");
4087
- if (filterResult && filterResult.values.length >= filterResult.total) {
4088
- return;
4043
+ setActive(entity) {
4044
+ this.store.setActive(entity[this.idKey]);
4045
+ }
4046
+ getIndex(identifier) {
4047
+ const { ids } = this.store.getValue();
4048
+ const index = ids.indexOf(identifier);
4049
+ return index + 1;
4050
+ }
4051
+ async selectAll(options) {
4052
+ if (!this.preloadService) {
4053
+ return this.store.update({
4054
+ allSelected: true
4055
+ });
4089
4056
  }
4090
- this.service.setParameters({
4091
- ...filterParameters,
4092
- start: filterParameters.start + filterParameters.length
4057
+ const ids = await this.preloadService.loadAllEntities(options);
4058
+ this.store.set(ids.map((id) => ({
4059
+ [this.idKey]: id,
4060
+ loaded: false
4061
+ })));
4062
+ return this.store.update({
4063
+ allSelected: true
4093
4064
  });
4094
- this.service.filter();
4095
4065
  }
4096
- }
4097
- 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 });
4098
- 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 });
4099
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterInfiniteScrollDataViewComponent, decorators: [{
4100
- type: Component,
4101
- 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" }]
4102
- }], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: NiceFilterViewService }]; }, propDecorators: { content: [{
4103
- type: ContentChild,
4104
- args: [NiceFilterDataDirective, { read: TemplateRef }]
4105
- }] } });
4106
-
4107
- class NiceFilterSearchComponent {
4108
- constructor(icons, query, service) {
4109
- this.icons = icons;
4110
- this.query = query;
4111
- this.service = service;
4112
- this.appearance = "default";
4113
- this.searchQuery$ = this.query.selectFilterParameters().pipe(map(f => f.search));
4114
- this.unsubscribeAll$ = new Subject();
4115
- this.searchText$ = new Subject();
4116
- }
4117
- ngOnInit() {
4118
- this.searchText$
4119
- .pipe(takeUntil(this.unsubscribeAll$), debounceTime(300), distinctUntilChanged(), tap((search) => {
4120
- const { mode } = this.query.getValue();
4121
- if (mode === "accumulated") {
4122
- this.service.resetPaging();
4123
- }
4124
- const { filterParameters } = this.query.getValue();
4125
- this.service.setParameters({
4126
- ...filterParameters,
4127
- search
4066
+ async select(id) {
4067
+ this.store.update((state) => ({
4068
+ unselectedEntity: arrayRemove(state.unselectedEntity, id)
4069
+ }));
4070
+ this.store.add({
4071
+ [this.idKey]: id,
4072
+ loaded: false
4073
+ });
4074
+ if (this.preloadService) {
4075
+ const entity = await this.preloadService.loadEntityById(id);
4076
+ this.store.upsert(id, {
4077
+ ...entity,
4078
+ loaded: true
4128
4079
  });
4129
- this.service.filter();
4130
- }))
4131
- .subscribe();
4080
+ }
4132
4081
  }
4133
- ngOnDestroy() {
4134
- this.unsubscribeAll$.next();
4135
- this.unsubscribeAll$.complete();
4082
+ async selectMany(ids, active) {
4083
+ this.store.add(ids.map((id) => ({
4084
+ [this.idKey]: id,
4085
+ loaded: false
4086
+ })));
4087
+ if (active) {
4088
+ this.store.setActive(active);
4089
+ await this.loadEntities(true);
4090
+ }
4136
4091
  }
4137
- onUpdateSearch(search) {
4138
- this.searchText$.next(search);
4092
+ async selectEntity(entity) {
4093
+ this.store.update((state) => ({
4094
+ unselectedEntity: arrayRemove(state.unselectedEntity, entity[this.idKey])
4095
+ }));
4096
+ this.store.upsert(entity[this.idKey], { ...entity, loaded: true });
4097
+ if (this.preloadService) {
4098
+ const preloadedEntity = await this.preloadService.reloadEntity(entity);
4099
+ this.store.upsert(preloadedEntity[this.idKey], { ...preloadedEntity, loaded: true });
4100
+ }
4139
4101
  }
4140
- }
4141
- 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 });
4142
- 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 });
4143
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterSearchComponent, decorators: [{
4144
- type: Component,
4145
- 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"] }]
4146
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
4147
- type: Inject,
4148
- args: [FILTER_VIEW_ICONS]
4149
- }] }, { type: NiceFilterViewQuery }, { type: NiceFilterViewService }]; }, propDecorators: { appearance: [{
4150
- type: Input
4151
- }] } });
4152
-
4153
- class NiceFilterMatPaginatorPaginationDirective {
4154
- constructor(query, service, paginator) {
4155
- this.query = query;
4156
- this.service = service;
4157
- this.paginator = paginator;
4158
- this.unsubscribeAll$ = new Subject();
4102
+ async selectManyEntities(entities) {
4103
+ if (!this.preloadService) {
4104
+ return this.store.upsertMany(entities.map((entity) => ({ ...entity, loaded: true })));
4105
+ }
4106
+ const preloadedEntities = await this.preloadService.reloadEntities(entities);
4107
+ this.store.upsertMany(preloadedEntities.map((preloadedEntity) => ({ ...preloadedEntity, loaded: true })));
4159
4108
  }
4160
- ngOnInit() {
4161
- this.query.selectFilterResult().pipe(takeUntil(this.unsubscribeAll$)).subscribe((res) => {
4162
- if (!res) {
4163
- return;
4164
- }
4165
- const { page, total } = res;
4166
- this.paginator.pageIndex = page.number;
4167
- this.paginator.pageSize = page.size;
4168
- this.paginator.length = total;
4169
- });
4170
- this.paginator.page.pipe(takeUntil(this.unsubscribeAll$)).subscribe((page) => {
4171
- const { filterParameters } = this.query.getValue();
4172
- this.service.setParameters({
4173
- ...filterParameters,
4174
- start: page.pageIndex * page.pageSize,
4175
- length: page.pageSize
4176
- });
4177
- this.service.filter();
4109
+ unselectAll() {
4110
+ this.store.set([]);
4111
+ return this.store.update({
4112
+ allSelected: false,
4113
+ unselectedEntity: []
4178
4114
  });
4179
4115
  }
4180
- ngOnDestroy() {
4181
- this.unsubscribeAll$.next();
4182
- this.unsubscribeAll$.complete();
4116
+ unselect(id) {
4117
+ this.store.update((state) => ({
4118
+ unselectedEntity: arrayAdd(state.unselectedEntity, id)
4119
+ }));
4120
+ this.store.remove(id);
4183
4121
  }
4184
- }
4185
- NiceFilterMatPaginatorPaginationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterMatPaginatorPaginationDirective, deps: [{ token: NiceFilterViewQuery }, { token: NiceFilterViewService }, { token: i12.MatPaginator }], target: i0.ɵɵFactoryTarget.Directive });
4186
- NiceFilterMatPaginatorPaginationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterMatPaginatorPaginationDirective, selector: "mat-paginator[niceFilterPagination]", ngImport: i0 });
4187
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterMatPaginatorPaginationDirective, decorators: [{
4188
- type: Directive,
4189
- args: [{ selector: "mat-paginator[niceFilterPagination]" }]
4190
- }], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: NiceFilterViewService }, { type: i12.MatPaginator }]; } });
4191
-
4192
- class NiceFilterMatSortSortingDirective {
4193
- constructor(query, service, sort) {
4194
- this.query = query;
4195
- this.service = service;
4196
- this.sort = sort;
4197
- this.unsubscribeAll$ = new Subject();
4122
+ unselectEntity(entity) {
4123
+ this.store.update((state) => ({
4124
+ unselectedEntity: arrayAdd(state.unselectedEntity, entity[this.idKey])
4125
+ }));
4126
+ this.store.remove(entity[this.idKey]);
4198
4127
  }
4199
- ngOnInit() {
4200
- this.query.selectFilterParameters().pipe(takeUntil(this.unsubscribeAll$)).subscribe((res) => {
4201
- if (!res) {
4202
- return;
4203
- }
4204
- const { order } = res;
4205
- if (!order) {
4206
- return;
4207
- }
4208
- this.sort.direction = order.direction;
4209
- this.sort.active = order.column;
4210
- });
4211
- this.sort.sortChange.pipe(takeUntil(this.unsubscribeAll$)).subscribe((sort) => {
4212
- const { filterParameters } = this.query.getValue();
4213
- if (!sort.direction) {
4214
- const { order, ...values } = filterParameters;
4215
- this.service.setParameters({
4216
- ...values,
4217
- order: {}
4218
- });
4219
- }
4220
- else {
4221
- this.service.setParameters({
4222
- ...filterParameters,
4223
- order: {
4224
- column: sort.active,
4225
- direction: sort.direction
4226
- }
4227
- });
4228
- }
4229
- this.service.filter();
4230
- });
4128
+ unselectManyEntities(entities) {
4129
+ this.store.remove(entities.map((entity) => entity[this.idKey]));
4231
4130
  }
4232
- ngOnDestroy() {
4233
- this.unsubscribeAll$.next();
4234
- this.unsubscribeAll$.complete();
4131
+ updateEntity(entity) {
4132
+ this.store.update(entity[this.idKey], entity);
4235
4133
  }
4236
- }
4237
- NiceFilterMatSortSortingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterMatSortSortingDirective, deps: [{ token: NiceFilterViewQuery }, { token: NiceFilterViewService }, { token: i14.MatSort }], target: i0.ɵɵFactoryTarget.Directive });
4238
- NiceFilterMatSortSortingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterMatSortSortingDirective, selector: "mat-table[matSort][niceFilterSorting]", ngImport: i0 });
4239
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterMatSortSortingDirective, decorators: [{
4240
- type: Directive,
4241
- args: [{ selector: "mat-table[matSort][niceFilterSorting]" }]
4242
- }], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: NiceFilterViewService }, { type: i14.MatSort }]; } });
4243
-
4244
- class NiceFilterMatTableViewDirective {
4245
- constructor(query, table) {
4246
- this.query = query;
4247
- this.table = table;
4134
+ async setEntities(ids, activeId) {
4135
+ this.store.update({
4136
+ unselectedEntity: [],
4137
+ allSelected: false
4138
+ });
4139
+ this.store.set(ids.map((id) => ({
4140
+ [this.idKey]: id,
4141
+ loaded: false
4142
+ })));
4143
+ if (activeId) {
4144
+ this.store.setActive(activeId);
4145
+ }
4146
+ await this.loadEntities(true);
4248
4147
  }
4249
- ngOnInit() {
4250
- this.table.dataSource = this.query.selectAll();
4148
+ async next() {
4149
+ const { ids, active } = this.store.getValue();
4150
+ const index = ids.indexOf(active);
4151
+ await this.loadActiveEntity(ids[index + 1], 1);
4251
4152
  }
4252
- }
4253
- NiceFilterMatTableViewDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterMatTableViewDirective, deps: [{ token: NiceFilterViewQuery }, { token: i13.MatTable }], target: i0.ɵɵFactoryTarget.Directive });
4254
- NiceFilterMatTableViewDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterMatTableViewDirective, selector: "mat-table[niceFilterDataView]", ngImport: i0 });
4255
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterMatTableViewDirective, decorators: [{
4256
- type: Directive,
4257
- args: [{ selector: "mat-table[niceFilterDataView]" }]
4258
- }], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: i13.MatTable }]; } });
4259
-
4260
- class NiceFilterQueryParamsDirective {
4261
- constructor(query, service, route, router) {
4262
- this.query = query;
4263
- this.service = service;
4264
- this.route = route;
4265
- this.router = router;
4266
- this.init = new EventEmitter();
4267
- this.unsubscribeAll$ = new Subject();
4268
- this._initialized = false;
4153
+ async previous() {
4154
+ const { ids, active } = this.store.getValue();
4155
+ const index = ids.indexOf(active);
4156
+ await this.loadActiveEntity(ids[index - 1], -1);
4269
4157
  }
4270
- get initialized() {
4271
- return this._initialized;
4158
+ async first() {
4159
+ const { ids } = this.store.getValue();
4160
+ await this.loadActiveEntity(ids[0], 1);
4272
4161
  }
4273
- ngOnInit() {
4274
- this.query.selectFilterParameters().pipe(takeUntil(this.unsubscribeAll$)).subscribe((parameters) => {
4275
- this.updateQueryParams(parameters);
4276
- });
4277
- this.loadQueryParams();
4162
+ async last() {
4163
+ const { ids } = this.store.getValue();
4164
+ await this.loadActiveEntity(ids[ids.length - 1], -1);
4278
4165
  }
4279
- ngOnDestroy() {
4280
- this.unsubscribeAll$.next();
4281
- this.unsubscribeAll$.complete();
4166
+ async removeActive() {
4167
+ const { active, ids } = this.store.getValue();
4168
+ const index = ids.indexOf(active);
4169
+ this.store.remove(active);
4170
+ if (index === (ids.length - 1)) {
4171
+ await this.loadActiveEntity(ids[index - 1], -1);
4172
+ }
4173
+ else {
4174
+ await this.loadActiveEntity(ids[index + 1], 1);
4175
+ }
4282
4176
  }
4283
- updateQueryParams(parameters) {
4284
- if (!this.route) {
4177
+ async loadActiveEntity(id, direction) {
4178
+ try {
4179
+ this.store.setActive(id);
4180
+ const { entities } = this.store.getValue();
4181
+ if (!entities[+id + direction * this.preloadedWindow]?.loaded) {
4182
+ await this.loadEntities(false);
4183
+ }
4184
+ }
4185
+ catch (e) {
4186
+ this.store.setError(e);
4187
+ }
4188
+ }
4189
+ async loadEntities(loadExtremity) {
4190
+ if (!this.preloadService) {
4285
4191
  return;
4286
4192
  }
4287
- const params = { ...parameters };
4288
- const { mode } = this.query.getValue();
4289
- if (mode === "accumulated") {
4290
- delete params.start;
4291
- delete params.length;
4193
+ const toLoad = this.getListIdToLoad(loadExtremity);
4194
+ if (!toLoad.length) {
4195
+ return;
4292
4196
  }
4293
- this.router.navigate([], {
4294
- relativeTo: this.route,
4295
- queryParams: QueryParamsUtils.filterParametersToParamsMap(params),
4296
- queryParamsHandling: "merge"
4297
- });
4197
+ const entities = await this.preloadService.loadEntitiesById(toLoad);
4198
+ this.store.upsertMany(entities.map((entity) => ({ ...entity, loaded: true })));
4298
4199
  }
4299
- loadQueryParams() {
4300
- combineLatest([
4301
- this.route.queryParams.pipe(map((params) => params.start), distinct()),
4302
- this.route.queryParams.pipe(map((params) => params.length), distinct()),
4303
- this.route.queryParams.pipe(map((params) => params.order), distinct()),
4304
- this.route.queryParams.pipe(map((params) => params.search), distinct()),
4305
- this.route.queryParams.pipe(map((params) => params.rules), distinct()),
4306
- ]).pipe(takeUntil(this.unsubscribeAll$), map(() => {
4307
- const params = this.route.snapshot.queryParams;
4308
- return {
4309
- params: QueryParamsUtils.extractFilterParameters(params)
4310
- };
4311
- })).subscribe(({ params }) => {
4312
- if (!QueryParamsUtils.hasFilterParameters(params) || Object.keys(params).length === 0) {
4313
- params = { ...this.query.getValue().filterParameters };
4200
+ getListIdToLoad(loadExtremity) {
4201
+ const { active, ids, entities } = this.store.getValue();
4202
+ const from = ids.indexOf(active) - this.preloadedWindow > 0 ? ids.indexOf(active) - this.preloadedWindow : 0;
4203
+ const to = ids.indexOf(active) + this.preloadedWindow < ids.length - 1
4204
+ ? ids.indexOf(active) + this.preloadedWindow
4205
+ : ids.length - 1;
4206
+ const toLoad = [];
4207
+ if (loadExtremity) {
4208
+ if (ids.length <= 2) {
4209
+ return ids;
4314
4210
  }
4315
- const { filterParameters, filterResult } = this.query.getValue();
4316
- if (FilterUtils.filterChangeNeedsRefresh(filterParameters, params) ||
4317
- !filterResult) {
4318
- this.service.setParameters({
4319
- ...params,
4320
- fallbackOrder: filterParameters.fallbackOrder
4321
- });
4211
+ toLoad.push(ids[0], ids[ids.length - 1]);
4212
+ }
4213
+ for (let i = from; i <= to; i++) {
4214
+ if (ids[i] === null || ids[0] === undefined) {
4215
+ continue;
4322
4216
  }
4323
- if (!this._initialized) {
4324
- this._initialized = true;
4325
- this.init.emit();
4217
+ if (!toLoad.includes(ids[i]) && !entities[ids[i]]?.loaded) {
4218
+ toLoad.push(ids[i]);
4326
4219
  }
4220
+ }
4221
+ return toLoad;
4222
+ }
4223
+ generateQueryParams() {
4224
+ const { ids, active } = this.store.getValue();
4225
+ return {
4226
+ selection: ids.length ? ids : null,
4227
+ selected: active ?? null
4228
+ };
4229
+ }
4230
+ setQueryParams() {
4231
+ this.router.navigate([], {
4232
+ queryParams: this.generateQueryParams(),
4233
+ queryParamsHandling: "merge"
4327
4234
  });
4328
4235
  }
4329
4236
  }
4330
- NiceFilterQueryParamsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterQueryParamsDirective, deps: [{ token: NiceFilterViewQuery }, { token: NiceFilterViewService }, { token: i2.ActivatedRoute }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Directive });
4331
- NiceFilterQueryParamsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterQueryParamsDirective, selector: "nice-filter-view[niceFilterQueryParams]", outputs: { init: "init" }, ngImport: i0 });
4332
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterQueryParamsDirective, decorators: [{
4333
- type: Directive,
4334
- args: [{ selector: "nice-filter-view[niceFilterQueryParams]" }]
4335
- }], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: NiceFilterViewService }, { type: i2.ActivatedRoute }, { type: i2.Router }]; }, propDecorators: { init: [{
4336
- type: Output
4337
- }] } });
4338
-
4339
- class NiceFilterViewComponent {
4340
- constructor(service) {
4341
- this.service = service;
4342
- this.queryParams = {};
4343
- }
4344
- ngOnChanges(changes) {
4345
- if ("queryParams" in changes) {
4346
- this.service.setQueryParams(this.queryParams);
4347
- }
4348
- }
4349
- }
4350
- NiceFilterViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewComponent, deps: [{ token: NiceFilterViewService }], target: i0.ɵɵFactoryTarget.Component });
4351
- NiceFilterViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterViewComponent, selector: "nice-filter-view", inputs: { queryParams: "queryParams" }, providers: [
4352
- NiceFilterViewQuery,
4353
- NiceFilterViewService,
4354
- NiceFilterViewStore
4355
- ], usesOnChanges: true, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""], encapsulation: i0.ViewEncapsulation.None });
4356
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewComponent, decorators: [{
4357
- type: Component,
4358
- args: [{ selector: "nice-filter-view", encapsulation: ViewEncapsulation.None, providers: [
4359
- NiceFilterViewQuery,
4360
- NiceFilterViewService,
4361
- NiceFilterViewStore
4362
- ], template: "<ng-content></ng-content>\n" }]
4363
- }], ctorParameters: function () { return [{ type: NiceFilterViewService }]; }, propDecorators: { queryParams: [{
4364
- type: Input
4365
- }] } });
4366
4237
 
4367
- class NiceBaseFilterViewComponent {
4368
- ngOnInit(autoLoad = true, { mode, loadConfig, configQueryParams } = {}) {
4369
- if (mode) {
4370
- this.filterViewService.setMode(mode);
4371
- }
4372
- this.autoLoad(autoLoad);
4373
- this.loadConfig(loadConfig, configQueryParams);
4374
- this.filterViewLoading$ = this.filterViewQuery.selectLoading();
4375
- }
4376
- /**
4377
- * Call the filter endpoint with the current filter parameters.
4378
- */
4379
- loadData() {
4380
- this.filterViewService.filter();
4381
- }
4382
- /**
4383
- * Disable the filter view. This will stop calling any api routes.
4384
- */
4385
- disable() {
4386
- this.filterViewService.disable();
4387
- }
4388
- /**
4389
- * Enable the filter view. This will resume calling any api routes.
4390
- */
4391
- enable() {
4392
- this.filterViewService.enable();
4238
+ class NiceSelectableListService {
4239
+ constructor(providers, route, router) {
4240
+ this.providers = providers;
4241
+ this.route = route;
4242
+ this.router = router;
4243
+ this.stores = new Map();
4393
4244
  }
4394
- /**
4395
- * Update the loading state
4396
- */
4397
- setLoading(loading) {
4398
- this.filterViewService.setLoading(loading);
4245
+ createState(name, options) {
4246
+ const store = new EntityStore({ allSelected: false, unselectedEntity: [] }, { name, idKey: options?.idKey });
4247
+ const query = new NiceSelectableListStateQuery(store);
4248
+ const state = { store, query };
4249
+ this.stores.set(name, state);
4250
+ return state;
4399
4251
  }
4400
- /**
4401
- * Set a set of rules that won't be saved in the current filterParameters config.
4402
- * NOTE: These rules will be injected in each filter request.
4403
- */
4404
- setBaseRules(rule, reload = true) {
4405
- this.filterViewService.setBaseRules(rule, reload);
4252
+ getState(name) {
4253
+ return this.stores.get(name);
4406
4254
  }
4407
- /**
4408
- * Reset all rules with a new set of rules.
4409
- */
4410
- setRules(rules, reload = true) {
4411
- this.filterViewService.setRules(rules);
4412
- if (reload) {
4413
- this.filterViewService.filter();
4255
+ withState(stateName, options) {
4256
+ const provider = this.providers?.find((p) => p.state === stateName);
4257
+ const state = this.getState(stateName);
4258
+ if (state) {
4259
+ return new NiceSelectableListStateService(state.store, this.route, this.router, provider, options);
4414
4260
  }
4261
+ const newState = this.createState(stateName, options);
4262
+ return new NiceSelectableListStateService(newState.store, this.route, this.router, provider, options);
4415
4263
  }
4416
- /**
4417
- * Add or update a rule.
4418
- * NOTE: This will only check for rules in the first element of the rules array in the current filterParameters.
4419
- */
4420
- upsertRule(id, newRule, reload = true) {
4421
- this.filterViewService.upsertRule(id, newRule);
4422
- if (reload) {
4423
- this.filterViewService.filter();
4264
+ query(stateName) {
4265
+ const state = this.getState(stateName);
4266
+ if (!state) {
4267
+ throw new Error("No state found");
4424
4268
  }
4269
+ return state.query;
4425
4270
  }
4426
- /**
4427
- * Remove a rule.
4428
- * NOTE: This will only check for rules in the first element of the rules array in the current filterParameters.
4429
- */
4430
- removeRule(id, reload = true) {
4431
- this.filterViewService.removeRule(id);
4432
- if (reload) {
4433
- this.filterViewService.filter();
4434
- }
4271
+ }
4272
+ NiceSelectableListService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListService, deps: [{ token: NICE_PRELOAD_SELECTED_ENTITIES_PROVIDER, optional: true }, { token: i2.ActivatedRoute }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
4273
+ NiceSelectableListService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListService, providedIn: "root" });
4274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListService, decorators: [{
4275
+ type: Injectable,
4276
+ args: [{ providedIn: "root" }]
4277
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
4278
+ type: Optional
4279
+ }, {
4280
+ type: Inject,
4281
+ args: [NICE_PRELOAD_SELECTED_ENTITIES_PROVIDER]
4282
+ }] }, { type: i2.ActivatedRoute }, { type: i2.Router }]; } });
4283
+
4284
+ class NiceFilterExportButtonsComponent {
4285
+ constructor(icons, exportsSettings, niceFilterViewQuery, niceFilterViewService, selectableListService, query, service, bottomSheet) {
4286
+ this.icons = icons;
4287
+ this.exportsSettings = exportsSettings;
4288
+ this.niceFilterViewQuery = niceFilterViewQuery;
4289
+ this.niceFilterViewService = niceFilterViewService;
4290
+ this.selectableListService = selectableListService;
4291
+ this.query = query;
4292
+ this.service = service;
4293
+ this.bottomSheet = bottomSheet;
4294
+ this.customExport = [];
4295
+ this.downloadFileName = "data";
4296
+ this.canPrint = true;
4297
+ this.loading$ = this.query.selectLoading();
4435
4298
  }
4436
- autoLoad(autoLoad) {
4437
- const { autoLoad: defaultAutoLoad } = this.filterViewQuery.getValue();
4438
- if (!this.queryParams) {
4439
- if (autoLoad && defaultAutoLoad) {
4440
- this.filterViewService.filter();
4299
+ clickExport() {
4300
+ const exports = [];
4301
+ const subState = this.niceFilterViewQuery.getSubState("selectable");
4302
+ let selected = [];
4303
+ if (subState?.stateName) {
4304
+ selected = this.selectableListService.query(subState.stateName).getAll().map((entity) => entity.id);
4305
+ }
4306
+ if (this.exportsSettings.xlsx) {
4307
+ exports.push({
4308
+ type: "xlsx",
4309
+ onClickExport: () => this.clickXlsx()
4310
+ });
4311
+ if (selected.length) {
4312
+ exports.push({
4313
+ type: "selected_xlsx",
4314
+ onClickExport: () => this.clickXlsx(selected)
4315
+ });
4441
4316
  }
4442
- else {
4443
- this.filterViewService.setAutoLoad(autoLoad);
4317
+ }
4318
+ if (this.exportsSettings.csv) {
4319
+ exports.push({
4320
+ type: "csv",
4321
+ onClickExport: () => this.clickCsv()
4322
+ });
4323
+ if (selected.length) {
4324
+ exports.push({
4325
+ type: "selected_csv",
4326
+ onClickExport: () => this.clickCsv(selected)
4327
+ });
4444
4328
  }
4445
- return;
4446
4329
  }
4447
- if (!autoLoad && defaultAutoLoad) {
4448
- this.filterViewService.setAutoLoad(autoLoad);
4449
- return;
4330
+ if (this.exportsSettings.pdf) {
4331
+ exports.push({
4332
+ type: "pdf",
4333
+ onClickExport: () => this.clickPdf()
4334
+ });
4335
+ if (selected.length) {
4336
+ exports.push({
4337
+ type: "selected_pdf",
4338
+ onClickExport: () => this.clickPdf(selected)
4339
+ });
4340
+ }
4450
4341
  }
4451
- this.queryParams.init.pipe(take(1)).subscribe(() => this.loadData());
4342
+ this.bottomSheet.open(ExportBottomSheetComponent, {
4343
+ data: {
4344
+ exportStrategies: [
4345
+ ...exports,
4346
+ ...this.customExport
4347
+ ]
4348
+ }
4349
+ });
4452
4350
  }
4453
- loadConfig(loadConfig, configQueryParams) {
4454
- if (loadConfig === true) {
4455
- this.filterViewService.loadConfig(configQueryParams);
4456
- return;
4457
- }
4458
- if (loadConfig === false) {
4459
- return;
4460
- }
4461
- if (this.advancedFiltersButton || this.advancedFilters) {
4462
- this.filterViewService.loadConfig(configQueryParams);
4463
- }
4351
+ clickXlsx(ids) {
4352
+ this.service.downloadData("xlsx", this.downloadFileName, ids);
4353
+ }
4354
+ clickCsv(ids) {
4355
+ this.service.downloadData("csv", this.downloadFileName, ids);
4356
+ }
4357
+ clickPrint() {
4358
+ this.service.printData();
4359
+ }
4360
+ clickPdf(ids) {
4361
+ this.service.downloadData("pdf", this.downloadFileName, ids);
4464
4362
  }
4465
4363
  }
4466
- NiceBaseFilterViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceBaseFilterViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4467
- 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 });
4468
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceBaseFilterViewComponent, decorators: [{
4364
+ 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: NiceSelectableListService }, { token: NiceFilterViewQuery }, { token: NiceFilterViewService }, { token: i4$2.MatBottomSheet }], target: i0.ɵɵFactoryTarget.Component });
4365
+ 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: i5.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 });
4366
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterExportButtonsComponent, decorators: [{
4469
4367
  type: Component,
4470
- args: [{
4471
- template: ``
4472
- }]
4473
- }], propDecorators: { filterViewService: [{
4474
- type: ViewChild,
4475
- args: [NiceFilterViewComponent, { read: NiceFilterViewService, static: true }]
4476
- }], filterViewQuery: [{
4477
- type: ViewChild,
4478
- args: [NiceFilterViewComponent, { read: NiceFilterViewQuery, static: true }]
4479
- }], queryParams: [{
4480
- type: ViewChild,
4481
- args: [NiceFilterQueryParamsDirective, { static: true }]
4482
- }], advancedFiltersButton: [{
4483
- type: ViewChild,
4484
- args: [NiceAdvancedFiltersButtonComponent, { static: true }]
4485
- }], advancedFilters: [{
4486
- type: ViewChild,
4487
- args: [NiceAdvancedFiltersComponent, { static: true }]
4368
+ 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" }]
4369
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
4370
+ type: Inject,
4371
+ args: [FILTER_VIEW_ICONS]
4372
+ }] }, { type: undefined, decorators: [{
4373
+ type: Inject,
4374
+ args: [EXPORTS_SETTINGS]
4375
+ }] }, { type: NiceFilterViewQuery }, { type: NiceFilterViewService }, { type: NiceSelectableListService }, { type: NiceFilterViewQuery }, { type: NiceFilterViewService }, { type: i4$2.MatBottomSheet }]; }, propDecorators: { customExport: [{
4376
+ type: Input
4377
+ }], downloadFileName: [{
4378
+ type: Input
4379
+ }], canPrint: [{
4380
+ type: Input
4488
4381
  }] } });
4489
4382
 
4490
- class NiceFilterViewModule {
4491
- static forRoot(options) {
4492
- return {
4493
- ngModule: NiceFilterViewModule,
4494
- providers: [
4495
- {
4496
- provide: FILTER_VIEW_ICONS,
4497
- useValue: {
4498
- ...defaultIcons$1,
4499
- ...(options?.icons ?? {})
4500
- }
4501
- }
4502
- ].filter(x => !!x)
4503
- };
4383
+ class NiceFilterExportDirective {
4384
+ constructor(service) {
4385
+ this.service = service;
4386
+ this.downloadFileName = "data";
4504
4387
  }
4505
- static providerFactory(options) {
4506
- return [
4507
- {
4508
- provide: NiceFilterService,
4509
- useClass: options.filterService
4510
- },
4511
- {
4512
- provide: EXPORTS_SETTINGS,
4513
- useValue: options.exports ?? {
4514
- pdf: true,
4515
- xlsx: true,
4516
- csv: true
4517
- }
4518
- },
4519
- {
4520
- provide: FILTER_VIEW_STATE,
4521
- useValue: options.state ?? {}
4522
- },
4523
- {
4524
- provide: FILTER_VIEW_STORE,
4525
- useValue: options.store ?? { name: "nice-filter-view", resettable: true }
4526
- }
4527
- ].filter(x => !!x);
4388
+ onClick() {
4389
+ this.service.downloadData(this.type, this.downloadFileName);
4528
4390
  }
4529
4391
  }
4530
- NiceFilterViewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4531
- NiceFilterViewModulemod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewModule, declarations: [NiceFilterViewComponent,
4532
- NiceFilterCustomDataViewComponent,
4533
- NiceFilterExportButtonsComponent,
4534
- NiceFilterInfiniteScrollDataViewComponent,
4535
- NiceFilterSearchComponent,
4536
- NiceFilterDataDirective,
4537
- NiceFilterExportDirective,
4538
- NiceFilterMatTableViewDirective,
4539
- NiceFilterMatSortSortingDirective,
4540
- NiceFilterMatPaginatorPaginationDirective,
4541
- NiceFilterQueryParamsDirective], imports: [TranslateModule,
4542
- MatIconModule,
4543
- FormsModule,
4544
- AsyncPipe,
4545
- NgIf,
4546
- NgTemplateOutlet,
4547
- MatTooltipModule,
4548
- MatButtonModule,
4549
- MatBottomSheetModule,
4550
- NiceExportBottomSheetModule], exports: [NiceFilterViewComponent,
4551
- NiceFilterCustomDataViewComponent,
4552
- NiceFilterExportButtonsComponent,
4553
- NiceFilterInfiniteScrollDataViewComponent,
4554
- NiceFilterSearchComponent,
4555
- NiceFilterDataDirective,
4556
- NiceFilterExportDirective,
4557
- NiceFilterMatTableViewDirective,
4558
- NiceFilterMatSortSortingDirective,
4559
- NiceFilterMatPaginatorPaginationDirective,
4560
- NiceFilterQueryParamsDirective] });
4561
- NiceFilterViewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewModule, imports: [TranslateModule,
4562
- MatIconModule,
4563
- FormsModule,
4564
- MatTooltipModule,
4565
- MatButtonModule,
4566
- MatBottomSheetModule,
4567
- NiceExportBottomSheetModule] });
4568
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewModule, decorators: [{
4569
- type: NgModule,
4570
- args: [{
4571
- imports: [
4572
- TranslateModule,
4573
- MatIconModule,
4574
- FormsModule,
4575
- AsyncPipe,
4576
- NgIf,
4577
- NgTemplateOutlet,
4578
- MatTooltipModule,
4579
- MatButtonModule,
4580
- MatBottomSheetModule,
4581
- NiceExportBottomSheetModule
4582
- ],
4583
- declarations: [
4584
- NiceFilterViewComponent,
4585
- NiceFilterCustomDataViewComponent,
4586
- NiceFilterExportButtonsComponent,
4587
- NiceFilterInfiniteScrollDataViewComponent,
4588
- NiceFilterSearchComponent,
4589
- NiceFilterDataDirective,
4590
- NiceFilterExportDirective,
4591
- NiceFilterMatTableViewDirective,
4592
- NiceFilterMatSortSortingDirective,
4593
- NiceFilterMatPaginatorPaginationDirective,
4594
- NiceFilterQueryParamsDirective
4595
- ],
4596
- providers: [],
4597
- exports: [
4598
- NiceFilterViewComponent,
4599
- NiceFilterCustomDataViewComponent,
4600
- NiceFilterExportButtonsComponent,
4601
- NiceFilterInfiniteScrollDataViewComponent,
4602
- NiceFilterSearchComponent,
4603
- NiceFilterDataDirective,
4604
- NiceFilterExportDirective,
4605
- NiceFilterMatTableViewDirective,
4606
- NiceFilterMatSortSortingDirective,
4607
- NiceFilterMatPaginatorPaginationDirective,
4608
- NiceFilterQueryParamsDirective
4609
- ],
4610
- }]
4611
- }] });
4612
-
4613
- class NicePreloadSelectedEntitiesProvider {
4614
- }
4615
- NicePreloadSelectedEntitiesProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NicePreloadSelectedEntitiesProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4616
- NicePreloadSelectedEntitiesProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NicePreloadSelectedEntitiesProvider });
4617
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NicePreloadSelectedEntitiesProvider, decorators: [{
4618
- type: Injectable
4619
- }] });
4620
-
4621
- const NICE_PRELOAD_SELECTED_ENTITIES_PROVIDER = new InjectionToken("nice_preload_selected_entities_provider");
4392
+ NiceFilterExportDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterExportDirective, deps: [{ token: NiceFilterViewService }], target: i0.ɵɵFactoryTarget.Directive });
4393
+ NiceFilterExportDirectivedir = 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 });
4394
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterExportDirective, decorators: [{
4395
+ type: Directive,
4396
+ args: [{ selector: "[niceFilterExport]" }]
4397
+ }], ctorParameters: function () { return [{ type: NiceFilterViewService }]; }, propDecorators: { type: [{
4398
+ type: Input
4399
+ }], downloadFileName: [{
4400
+ type: Input
4401
+ }], onClick: [{
4402
+ type: HostListener,
4403
+ args: ["click"]
4404
+ }] } });
4622
4405
 
4623
- class NiceSelectableListStateQuery extends QueryEntity {
4624
- constructor(store) {
4625
- super(store);
4626
- }
4627
- selectActiveViewIndex() {
4628
- return this.select(({ ids, active }) => {
4629
- const index = ids.indexOf(active);
4630
- return index + 1;
4631
- });
4632
- }
4633
- selectFirstActive() {
4634
- return this.select(({ ids, active }) => {
4635
- if (!ids.length) {
4636
- return true;
4637
- }
4638
- return ids[0] === active;
4639
- });
4406
+ class NiceFilterInfiniteScrollDataViewComponent {
4407
+ constructor(query, service) {
4408
+ this.query = query;
4409
+ this.service = service;
4410
+ this.data$ = this.query.selectAll();
4640
4411
  }
4641
- selectLastActive() {
4642
- return this.select(({ ids, active }) => {
4643
- if (!ids.length) {
4644
- return true;
4645
- }
4646
- return ids[ids.length - 1] === active;
4412
+ async loadNextPage() {
4413
+ const { filterParameters, filterResult } = this.query.getValue();
4414
+ this.service.setMode("accumulated");
4415
+ if (filterResult && filterResult.values.length >= filterResult.total) {
4416
+ return;
4417
+ }
4418
+ this.service.setParameters({
4419
+ ...filterParameters,
4420
+ start: filterParameters.start + filterParameters.length
4647
4421
  });
4422
+ this.service.filter();
4648
4423
  }
4649
4424
  }
4425
+ 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 });
4426
+ 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 });
4427
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterInfiniteScrollDataViewComponent, decorators: [{
4428
+ type: Component,
4429
+ 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" }]
4430
+ }], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: NiceFilterViewService }]; }, propDecorators: { content: [{
4431
+ type: ContentChild,
4432
+ args: [NiceFilterDataDirective, { read: TemplateRef }]
4433
+ }] } });
4650
4434
 
4651
- class NiceSelectableListStateService {
4652
- constructor(store, route, router, preloadService, options) {
4653
- this.store = store;
4654
- this.route = route;
4655
- this.router = router;
4656
- this.preloadService = preloadService;
4657
- this.options = options;
4658
- }
4659
- get idKey() {
4660
- return this.options?.idKey ?? "id";
4661
- }
4662
- get preloadedWindow() {
4663
- return this.options?.preloadWindow ?? 2;
4664
- }
4665
- setActive(entity) {
4666
- this.store.setActive(entity[this.idKey]);
4667
- }
4668
- getIndex(identifier) {
4669
- const { ids } = this.store.getValue();
4670
- const index = ids.indexOf(identifier);
4671
- return index + 1;
4672
- }
4673
- async selectAll(options) {
4674
- if (!this.preloadService) {
4675
- return this.store.update({
4676
- allSelected: true
4677
- });
4678
- }
4679
- const ids = await this.preloadService.loadAllEntities(options);
4680
- this.store.set(ids.map((id) => ({
4681
- [this.idKey]: id,
4682
- loaded: false
4683
- })));
4684
- return this.store.update({
4685
- allSelected: true
4686
- });
4687
- }
4688
- async select(id) {
4689
- this.store.update((state) => ({
4690
- unselectedEntity: arrayRemove(state.unselectedEntity, id)
4691
- }));
4692
- this.store.add({
4693
- [this.idKey]: id,
4694
- loaded: false
4695
- });
4696
- if (this.preloadService) {
4697
- const entity = await this.preloadService.loadEntityById(id);
4698
- this.store.upsert(id, {
4699
- ...entity,
4700
- loaded: true
4701
- });
4702
- }
4703
- }
4704
- async selectMany(ids, active) {
4705
- this.store.add(ids.map((id) => ({
4706
- [this.idKey]: id,
4707
- loaded: false
4708
- })));
4709
- if (active) {
4710
- this.store.setActive(active);
4711
- await this.loadEntities(true);
4712
- }
4713
- }
4714
- async selectEntity(entity) {
4715
- this.store.update((state) => ({
4716
- unselectedEntity: arrayRemove(state.unselectedEntity, entity[this.idKey])
4717
- }));
4718
- this.store.upsert(entity[this.idKey], { ...entity, loaded: true });
4719
- if (this.preloadService) {
4720
- const preloadedEntity = await this.preloadService.reloadEntity(entity);
4721
- this.store.upsert(preloadedEntity[this.idKey], { ...preloadedEntity, loaded: true });
4722
- }
4723
- }
4724
- async selectManyEntities(entities) {
4725
- if (!this.preloadService) {
4726
- return this.store.upsertMany(entities.map((entity) => ({ ...entity, loaded: true })));
4727
- }
4728
- const preloadedEntities = await this.preloadService.reloadEntities(entities);
4729
- this.store.upsertMany(preloadedEntities.map((preloadedEntity) => ({ ...preloadedEntity, loaded: true })));
4730
- }
4731
- unselectAll() {
4732
- this.store.set([]);
4733
- return this.store.update({
4734
- allSelected: false,
4735
- unselectedEntity: []
4736
- });
4737
- }
4738
- unselect(id) {
4739
- this.store.update((state) => ({
4740
- unselectedEntity: arrayAdd(state.unselectedEntity, id)
4741
- }));
4742
- this.store.remove(id);
4743
- }
4744
- unselectEntity(entity) {
4745
- this.store.update((state) => ({
4746
- unselectedEntity: arrayAdd(state.unselectedEntity, entity[this.idKey])
4747
- }));
4748
- this.store.remove(entity[this.idKey]);
4749
- }
4750
- unselectManyEntities(entities) {
4751
- this.store.remove(entities.map((entity) => entity[this.idKey]));
4752
- }
4753
- updateEntity(entity) {
4754
- this.store.update(entity[this.idKey], entity);
4755
- }
4756
- async setEntities(ids, activeId) {
4757
- this.store.update({
4758
- unselectedEntity: [],
4759
- allSelected: false
4760
- });
4761
- this.store.set(ids.map((id) => ({
4762
- [this.idKey]: id,
4763
- loaded: false
4764
- })));
4765
- if (activeId) {
4766
- this.store.setActive(activeId);
4767
- }
4768
- await this.loadEntities(true);
4769
- }
4770
- async next() {
4771
- const { ids, active } = this.store.getValue();
4772
- const index = ids.indexOf(active);
4773
- await this.loadActiveEntity(ids[index + 1], 1);
4435
+ class NiceFilterSearchComponent {
4436
+ constructor(icons, query, service) {
4437
+ this.icons = icons;
4438
+ this.query = query;
4439
+ this.service = service;
4440
+ this.appearance = "default";
4441
+ this.searchQuery$ = this.query.selectFilterParameters().pipe(map(f => f.search));
4442
+ this.unsubscribeAll$ = new Subject();
4443
+ this.searchText$ = new Subject();
4774
4444
  }
4775
- async previous() {
4776
- const { ids, active } = this.store.getValue();
4777
- const index = ids.indexOf(active);
4778
- await this.loadActiveEntity(ids[index - 1], -1);
4445
+ ngOnInit() {
4446
+ this.searchText$
4447
+ .pipe(takeUntil(this.unsubscribeAll$), debounceTime(300), distinctUntilChanged(), tap((search) => {
4448
+ const { mode } = this.query.getValue();
4449
+ if (mode === "accumulated") {
4450
+ this.service.resetPaging();
4451
+ }
4452
+ const { filterParameters } = this.query.getValue();
4453
+ this.service.setParameters({
4454
+ ...filterParameters,
4455
+ search
4456
+ });
4457
+ this.service.filter();
4458
+ }))
4459
+ .subscribe();
4779
4460
  }
4780
- async first() {
4781
- const { ids } = this.store.getValue();
4782
- await this.loadActiveEntity(ids[0], 1);
4461
+ ngOnDestroy() {
4462
+ this.unsubscribeAll$.next();
4463
+ this.unsubscribeAll$.complete();
4783
4464
  }
4784
- async last() {
4785
- const { ids } = this.store.getValue();
4786
- await this.loadActiveEntity(ids[ids.length - 1], -1);
4465
+ onUpdateSearch(search) {
4466
+ this.searchText$.next(search);
4787
4467
  }
4788
- async removeActive() {
4789
- const { active, ids } = this.store.getValue();
4790
- const index = ids.indexOf(active);
4791
- this.store.remove(active);
4792
- if (index === (ids.length - 1)) {
4793
- await this.loadActiveEntity(ids[index - 1], -1);
4794
- }
4795
- else {
4796
- await this.loadActiveEntity(ids[index + 1], 1);
4797
- }
4468
+ }
4469
+ 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 });
4470
+ 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: i2$1.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
4471
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterSearchComponent, decorators: [{
4472
+ type: Component,
4473
+ 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"] }]
4474
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
4475
+ type: Inject,
4476
+ args: [FILTER_VIEW_ICONS]
4477
+ }] }, { type: NiceFilterViewQuery }, { type: NiceFilterViewService }]; }, propDecorators: { appearance: [{
4478
+ type: Input
4479
+ }] } });
4480
+
4481
+ class NiceFilterMatPaginatorPaginationDirective {
4482
+ constructor(query, service, paginator) {
4483
+ this.query = query;
4484
+ this.service = service;
4485
+ this.paginator = paginator;
4486
+ this.unsubscribeAll$ = new Subject();
4798
4487
  }
4799
- async loadActiveEntity(id, direction) {
4800
- try {
4801
- this.store.setActive(id);
4802
- const { entities } = this.store.getValue();
4803
- if (!entities[+id + direction * this.preloadedWindow]?.loaded) {
4804
- await this.loadEntities(false);
4488
+ ngOnInit() {
4489
+ this.query.selectFilterResult().pipe(takeUntil(this.unsubscribeAll$)).subscribe((res) => {
4490
+ if (!res) {
4491
+ return;
4805
4492
  }
4806
- }
4807
- catch (e) {
4808
- this.store.setError(e);
4809
- }
4493
+ const { page, total } = res;
4494
+ this.paginator.pageIndex = page.number;
4495
+ this.paginator.pageSize = page.size;
4496
+ this.paginator.length = total;
4497
+ });
4498
+ this.paginator.page.pipe(takeUntil(this.unsubscribeAll$)).subscribe((page) => {
4499
+ const { filterParameters } = this.query.getValue();
4500
+ this.service.setParameters({
4501
+ ...filterParameters,
4502
+ start: page.pageIndex * page.pageSize,
4503
+ length: page.pageSize
4504
+ });
4505
+ this.service.filter();
4506
+ });
4810
4507
  }
4811
- async loadEntities(loadExtremity) {
4812
- if (!this.preloadService) {
4813
- return;
4814
- }
4815
- const toLoad = this.getListIdToLoad(loadExtremity);
4816
- if (!toLoad.length) {
4817
- return;
4818
- }
4819
- const entities = await this.preloadService.loadEntitiesById(toLoad);
4820
- this.store.upsertMany(entities.map((entity) => ({ ...entity, loaded: true })));
4508
+ ngOnDestroy() {
4509
+ this.unsubscribeAll$.next();
4510
+ this.unsubscribeAll$.complete();
4821
4511
  }
4822
- getListIdToLoad(loadExtremity) {
4823
- const { active, ids, entities } = this.store.getValue();
4824
- const from = ids.indexOf(active) - this.preloadedWindow > 0 ? ids.indexOf(active) - this.preloadedWindow : 0;
4825
- const to = ids.indexOf(active) + this.preloadedWindow < ids.length - 1
4826
- ? ids.indexOf(active) + this.preloadedWindow
4827
- : ids.length - 1;
4828
- const toLoad = [];
4829
- if (loadExtremity) {
4830
- if (ids.length <= 2) {
4831
- return ids;
4512
+ }
4513
+ NiceFilterMatPaginatorPaginationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterMatPaginatorPaginationDirective, deps: [{ token: NiceFilterViewQuery }, { token: NiceFilterViewService }, { token: i12.MatPaginator }], target: i0.ɵɵFactoryTarget.Directive });
4514
+ NiceFilterMatPaginatorPaginationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterMatPaginatorPaginationDirective, selector: "mat-paginator[niceFilterPagination]", ngImport: i0 });
4515
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterMatPaginatorPaginationDirective, decorators: [{
4516
+ type: Directive,
4517
+ args: [{ selector: "mat-paginator[niceFilterPagination]" }]
4518
+ }], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: NiceFilterViewService }, { type: i12.MatPaginator }]; } });
4519
+
4520
+ class NiceFilterMatSortSortingDirective {
4521
+ constructor(query, service, sort) {
4522
+ this.query = query;
4523
+ this.service = service;
4524
+ this.sort = sort;
4525
+ this.unsubscribeAll$ = new Subject();
4526
+ }
4527
+ ngOnInit() {
4528
+ this.query.selectFilterParameters().pipe(takeUntil(this.unsubscribeAll$)).subscribe((res) => {
4529
+ if (!res) {
4530
+ return;
4832
4531
  }
4833
- toLoad.push(ids[0], ids[ids.length - 1]);
4834
- }
4835
- for (let i = from; i <= to; i++) {
4836
- if (ids[i] === null || ids[0] === undefined) {
4837
- continue;
4532
+ const { order } = res;
4533
+ if (!order) {
4534
+ return;
4838
4535
  }
4839
- if (!toLoad.includes(ids[i]) && !entities[ids[i]]?.loaded) {
4840
- toLoad.push(ids[i]);
4536
+ this.sort.direction = order.direction;
4537
+ this.sort.active = order.column;
4538
+ });
4539
+ this.sort.sortChange.pipe(takeUntil(this.unsubscribeAll$)).subscribe((sort) => {
4540
+ const { filterParameters } = this.query.getValue();
4541
+ if (!sort.direction) {
4542
+ const { order, ...values } = filterParameters;
4543
+ this.service.setParameters({
4544
+ ...values,
4545
+ order: {}
4546
+ });
4841
4547
  }
4842
- }
4843
- return toLoad;
4548
+ else {
4549
+ this.service.setParameters({
4550
+ ...filterParameters,
4551
+ order: {
4552
+ column: sort.active,
4553
+ direction: sort.direction
4554
+ }
4555
+ });
4556
+ }
4557
+ this.service.filter();
4558
+ });
4844
4559
  }
4845
- generateQueryParams() {
4846
- const { ids, active } = this.store.getValue();
4847
- return {
4848
- selection: ids.length ? ids : null,
4849
- selected: active ?? null
4850
- };
4560
+ ngOnDestroy() {
4561
+ this.unsubscribeAll$.next();
4562
+ this.unsubscribeAll$.complete();
4851
4563
  }
4852
- setQueryParams() {
4853
- this.router.navigate([], {
4854
- queryParams: this.generateQueryParams(),
4855
- queryParamsHandling: "merge"
4856
- });
4564
+ }
4565
+ NiceFilterMatSortSortingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterMatSortSortingDirective, deps: [{ token: NiceFilterViewQuery }, { token: NiceFilterViewService }, { token: i14.MatSort }], target: i0.ɵɵFactoryTarget.Directive });
4566
+ NiceFilterMatSortSortingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterMatSortSortingDirective, selector: "mat-table[matSort][niceFilterSorting]", ngImport: i0 });
4567
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterMatSortSortingDirective, decorators: [{
4568
+ type: Directive,
4569
+ args: [{ selector: "mat-table[matSort][niceFilterSorting]" }]
4570
+ }], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: NiceFilterViewService }, { type: i14.MatSort }]; } });
4571
+
4572
+ class NiceFilterMatTableViewDirective {
4573
+ constructor(query, table) {
4574
+ this.query = query;
4575
+ this.table = table;
4576
+ }
4577
+ ngOnInit() {
4578
+ this.table.dataSource = this.query.selectAll();
4857
4579
  }
4858
4580
  }
4581
+ NiceFilterMatTableViewDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterMatTableViewDirective, deps: [{ token: NiceFilterViewQuery }, { token: i13.MatTable }], target: i0.ɵɵFactoryTarget.Directive });
4582
+ NiceFilterMatTableViewDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterMatTableViewDirective, selector: "mat-table[niceFilterDataView]", ngImport: i0 });
4583
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterMatTableViewDirective, decorators: [{
4584
+ type: Directive,
4585
+ args: [{ selector: "mat-table[niceFilterDataView]" }]
4586
+ }], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: i13.MatTable }]; } });
4859
4587
 
4860
- class NiceSelectableListService {
4861
- constructor(providers, route, router) {
4862
- this.providers = providers;
4588
+ class NiceFilterQueryParamsDirective {
4589
+ constructor(query, service, route, router) {
4590
+ this.query = query;
4591
+ this.service = service;
4863
4592
  this.route = route;
4864
4593
  this.router = router;
4865
- this.stores = new Map();
4594
+ this.init = new EventEmitter();
4595
+ this.unsubscribeAll$ = new Subject();
4596
+ this._initialized = false;
4866
4597
  }
4867
- createState(name, options) {
4868
- const store = new EntityStore({ allSelected: false, unselectedEntity: [] }, { name, idKey: options?.idKey });
4869
- const query = new NiceSelectableListStateQuery(store);
4870
- const state = { store, query };
4871
- this.stores.set(name, state);
4872
- return state;
4598
+ get initialized() {
4599
+ return this._initialized;
4873
4600
  }
4874
- getState(name) {
4875
- return this.stores.get(name);
4601
+ ngOnInit() {
4602
+ this.query.selectFilterParameters().pipe(takeUntil(this.unsubscribeAll$)).subscribe((parameters) => {
4603
+ this.updateQueryParams(parameters);
4604
+ });
4605
+ this.loadQueryParams();
4606
+ }
4607
+ ngOnDestroy() {
4608
+ this.unsubscribeAll$.next();
4609
+ this.unsubscribeAll$.complete();
4610
+ }
4611
+ updateQueryParams(parameters) {
4612
+ if (!this.route) {
4613
+ return;
4614
+ }
4615
+ const params = { ...parameters };
4616
+ const { mode } = this.query.getValue();
4617
+ if (mode === "accumulated") {
4618
+ delete params.start;
4619
+ delete params.length;
4620
+ }
4621
+ this.router.navigate([], {
4622
+ relativeTo: this.route,
4623
+ queryParams: QueryParamsUtils.filterParametersToParamsMap(params),
4624
+ queryParamsHandling: "merge"
4625
+ });
4626
+ }
4627
+ loadQueryParams() {
4628
+ combineLatest([
4629
+ this.route.queryParams.pipe(map((params) => params.start), distinct()),
4630
+ this.route.queryParams.pipe(map((params) => params.length), distinct()),
4631
+ this.route.queryParams.pipe(map((params) => params.order), distinct()),
4632
+ this.route.queryParams.pipe(map((params) => params.search), distinct()),
4633
+ this.route.queryParams.pipe(map((params) => params.rules), distinct()),
4634
+ ]).pipe(takeUntil(this.unsubscribeAll$), map(() => {
4635
+ const params = this.route.snapshot.queryParams;
4636
+ return {
4637
+ params: QueryParamsUtils.extractFilterParameters(params)
4638
+ };
4639
+ })).subscribe(({ params }) => {
4640
+ if (!QueryParamsUtils.hasFilterParameters(params) || Object.keys(params).length === 0) {
4641
+ params = { ...this.query.getValue().filterParameters };
4642
+ }
4643
+ const { filterParameters, filterResult } = this.query.getValue();
4644
+ if (FilterUtils.filterChangeNeedsRefresh(filterParameters, params) ||
4645
+ !filterResult) {
4646
+ this.service.setParameters({
4647
+ ...params,
4648
+ fallbackOrder: filterParameters.fallbackOrder
4649
+ });
4650
+ }
4651
+ if (!this._initialized) {
4652
+ this._initialized = true;
4653
+ this.init.emit();
4654
+ }
4655
+ });
4876
4656
  }
4877
- withState(stateName, options) {
4878
- const provider = this.providers?.find((p) => p.state === stateName);
4879
- const state = this.getState(stateName);
4880
- if (state) {
4881
- return new NiceSelectableListStateService(state.store, this.route, this.router, provider, options);
4882
- }
4883
- const newState = this.createState(stateName, options);
4884
- return new NiceSelectableListStateService(newState.store, this.route, this.router, provider, options);
4657
+ }
4658
+ NiceFilterQueryParamsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterQueryParamsDirective, deps: [{ token: NiceFilterViewQuery }, { token: NiceFilterViewService }, { token: i2.ActivatedRoute }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Directive });
4659
+ NiceFilterQueryParamsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterQueryParamsDirective, selector: "nice-filter-view[niceFilterQueryParams]", outputs: { init: "init" }, ngImport: i0 });
4660
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterQueryParamsDirective, decorators: [{
4661
+ type: Directive,
4662
+ args: [{ selector: "nice-filter-view[niceFilterQueryParams]" }]
4663
+ }], ctorParameters: function () { return [{ type: NiceFilterViewQuery }, { type: NiceFilterViewService }, { type: i2.ActivatedRoute }, { type: i2.Router }]; }, propDecorators: { init: [{
4664
+ type: Output
4665
+ }] } });
4666
+
4667
+ class NiceFilterViewComponent {
4668
+ constructor(service) {
4669
+ this.service = service;
4670
+ this.queryParams = {};
4885
4671
  }
4886
- query(stateName) {
4887
- const state = this.getState(stateName);
4888
- if (!state) {
4889
- throw new Error("No state found");
4672
+ ngOnChanges(changes) {
4673
+ if ("queryParams" in changes) {
4674
+ this.service.setQueryParams(this.queryParams);
4890
4675
  }
4891
- return state.query;
4892
4676
  }
4893
4677
  }
4894
- NiceSelectableListService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListService, deps: [{ token: NICE_PRELOAD_SELECTED_ENTITIES_PROVIDER, optional: true }, { token: i2.ActivatedRoute }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
4895
- NiceSelectableListServiceprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListService, providedIn: "root" });
4896
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListService, decorators: [{
4897
- type: Injectable,
4898
- args: [{ providedIn: "root" }]
4899
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
4900
- type: Optional
4901
- }, {
4902
- type: Inject,
4903
- args: [NICE_PRELOAD_SELECTED_ENTITIES_PROVIDER]
4904
- }] }, { type: i2.ActivatedRoute }, { type: i2.Router }]; } });
4678
+ NiceFilterViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewComponent, deps: [{ token: NiceFilterViewService }], target: i0.ɵɵFactoryTarget.Component });
4679
+ NiceFilterViewComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceFilterViewComponent, selector: "nice-filter-view", inputs: { queryParams: "queryParams" }, providers: [
4680
+ NiceFilterViewQuery,
4681
+ NiceFilterViewService,
4682
+ NiceFilterViewStore
4683
+ ], usesOnChanges: true, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""], encapsulation: i0.ViewEncapsulation.None });
4684
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewComponent, decorators: [{
4685
+ type: Component,
4686
+ args: [{ selector: "nice-filter-view", encapsulation: ViewEncapsulation.None, providers: [
4687
+ NiceFilterViewQuery,
4688
+ NiceFilterViewService,
4689
+ NiceFilterViewStore
4690
+ ], template: "<ng-content></ng-content>\n" }]
4691
+ }], ctorParameters: function () { return [{ type: NiceFilterViewService }]; }, propDecorators: { queryParams: [{
4692
+ type: Input
4693
+ }] } });
4905
4694
 
4906
4695
  class SelectableListContentService {
4907
4696
  constructor() {
@@ -5038,30 +4827,369 @@ class NiceSelectableListCheckboxDirective {
5038
4827
  this.checkbox.checked = false;
5039
4828
  return;
5040
4829
  }
5041
- if (count !== checkboxes.length) {
5042
- this.checkbox.indeterminate = true;
5043
- this.checkbox.checked = false;
4830
+ if (count !== checkboxes.length) {
4831
+ this.checkbox.indeterminate = true;
4832
+ this.checkbox.checked = false;
4833
+ return;
4834
+ }
4835
+ if (count === checkboxes.length) {
4836
+ this.checkbox.checked = true;
4837
+ this.checkbox.indeterminate = false;
4838
+ }
4839
+ }
4840
+ }
4841
+ NiceSelectableListCheckboxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListCheckboxDirective, deps: [{ token: i1$4.MatCheckbox }, { token: SelectableListContentService }, { token: NiceSelectableListService }], target: i0.ɵɵFactoryTarget.Directive });
4842
+ NiceSelectableListCheckboxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceSelectableListCheckboxDirective, selector: "mat-checkbox[niceSelectableListCheckbox]", inputs: { selectableEntity: "selectableEntity", selectPage: "selectPage" }, ngImport: i0 });
4843
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListCheckboxDirective, decorators: [{
4844
+ type: Directive,
4845
+ args: [{
4846
+ selector: "mat-checkbox[niceSelectableListCheckbox]"
4847
+ }]
4848
+ }], ctorParameters: function () { return [{ type: i1$4.MatCheckbox }, { type: SelectableListContentService }, { type: NiceSelectableListService }]; }, propDecorators: { selectableEntity: [{
4849
+ type: Input
4850
+ }], selectPage: [{
4851
+ type: Input
4852
+ }] } });
4853
+
4854
+ // tslint:disable-next-line:directive-class-suffix
4855
+ class NiceSelectableListDirective {
4856
+ constructor(service, selectableListService, route) {
4857
+ this.service = service;
4858
+ this.selectableListService = selectableListService;
4859
+ this.route = route;
4860
+ this.unsubscribeAll$ = new Subject();
4861
+ this.unsubscribeQuerySub$ = new Subject();
4862
+ }
4863
+ ngOnInit() {
4864
+ combineLatest([
4865
+ this.route.queryParams.pipe(map((params) => params.selection), distinct()),
4866
+ this.route.queryParams.pipe(map((params) => params.selected), distinct())
4867
+ ]).pipe(takeUntil(this.unsubscribeAll$)).subscribe(([selection, selected]) => {
4868
+ if (!selection) {
4869
+ this.stateService.setQueryParams();
4870
+ return;
4871
+ }
4872
+ const newSelection = typeof selection === "string" ? [+selection] : selection.map((s) => +s);
4873
+ const newSelected = selected ? +selected : null;
4874
+ const { ids, active } = this.stateQuery.getValue();
4875
+ if (!ids.length || !ids.every((id) => newSelection.includes(id))) {
4876
+ this.stateService.setEntities(newSelection, newSelected);
4877
+ return;
4878
+ }
4879
+ if (newSelected && active !== newSelected) {
4880
+ this.stateService.setActive(newSelected);
4881
+ }
4882
+ });
4883
+ }
4884
+ ngOnDestroy() {
4885
+ this.unsubscribeAll$.next();
4886
+ this.unsubscribeAll$.complete();
4887
+ this.unsubscribeQuerySub$.next();
4888
+ this.unsubscribeQuerySub$.complete();
4889
+ }
4890
+ ngOnChanges(changes) {
4891
+ if ("options" in changes) {
4892
+ this.service.setOptions(this.options);
4893
+ }
4894
+ if ("state" in changes) {
4895
+ this.service.setState(this.state);
4896
+ this.stateService = this.selectableListService.withState(this.state);
4897
+ this.stateQuery = this.selectableListService.query(this.state);
4898
+ this.listenOnStateChanges();
4899
+ }
4900
+ }
4901
+ ngAfterContentInit() {
4902
+ this.service.setCheckboxes(this.checkboxes);
4903
+ }
4904
+ listenOnStateChanges() {
4905
+ this.unsubscribeQuerySub$.next();
4906
+ this.stateQuery.selectEntityAction([
4907
+ EntityActions.Add,
4908
+ EntityActions.Remove,
4909
+ EntityActions.Set
4910
+ ]).pipe(takeUntil(this.unsubscribeQuerySub$)).subscribe(() => {
4911
+ this.stateService.setQueryParams();
4912
+ });
4913
+ this.stateQuery.selectActiveId().pipe(takeUntil(this.unsubscribeQuerySub$)).subscribe(() => this.stateService.setQueryParams());
4914
+ }
4915
+ }
4916
+ NiceSelectableListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListDirective, deps: [{ token: SelectableListContentService }, { token: NiceSelectableListService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Directive });
4917
+ 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 });
4918
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListDirective, decorators: [{
4919
+ type: Directive,
4920
+ args: [{
4921
+ selector: "[niceSelectableList]",
4922
+ providers: [SelectableListContentService]
4923
+ }]
4924
+ }], ctorParameters: function () { return [{ type: SelectableListContentService }, { type: NiceSelectableListService }, { type: i2.ActivatedRoute }]; }, propDecorators: { state: [{
4925
+ type: Input
4926
+ }], options: [{
4927
+ type: Input
4928
+ }], checkboxes: [{
4929
+ type: ContentChildren,
4930
+ args: [NiceSelectableListCheckboxDirective, { descendants: true }]
4931
+ }] } });
4932
+
4933
+ class NiceBaseFilterViewComponent {
4934
+ ngOnInit(autoLoad = true, { mode, loadConfig, configQueryParams } = {}) {
4935
+ if (mode) {
4936
+ this.filterViewService.setMode(mode);
4937
+ }
4938
+ this.autoLoad(autoLoad);
4939
+ this.loadConfig(loadConfig, configQueryParams);
4940
+ this.filterViewLoading$ = this.filterViewQuery.selectLoading();
4941
+ if (this.selectableListDirective) {
4942
+ this.filterViewService.updateSubState("selectable", { stateName: this.selectableListDirective.state });
4943
+ }
4944
+ }
4945
+ /**
4946
+ * Call the filter endpoint with the current filter parameters.
4947
+ */
4948
+ loadData() {
4949
+ this.filterViewService.filter();
4950
+ }
4951
+ /**
4952
+ * Disable the filter view. This will stop calling any api routes.
4953
+ */
4954
+ disable() {
4955
+ this.filterViewService.disable();
4956
+ }
4957
+ /**
4958
+ * Enable the filter view. This will resume calling any api routes.
4959
+ */
4960
+ enable() {
4961
+ this.filterViewService.enable();
4962
+ }
4963
+ /**
4964
+ * Update the loading state
4965
+ */
4966
+ setLoading(loading) {
4967
+ this.filterViewService.setLoading(loading);
4968
+ }
4969
+ /**
4970
+ * Set a set of rules that won't be saved in the current filterParameters config.
4971
+ * NOTE: These rules will be injected in each filter request.
4972
+ */
4973
+ setBaseRules(rule, reload = true) {
4974
+ this.filterViewService.setBaseRules(rule, reload);
4975
+ }
4976
+ /**
4977
+ * Reset all rules with a new set of rules.
4978
+ */
4979
+ setRules(rules, reload = true) {
4980
+ this.filterViewService.setRules(rules);
4981
+ if (reload) {
4982
+ this.filterViewService.filter();
4983
+ }
4984
+ }
4985
+ /**
4986
+ * Add or update a rule.
4987
+ * NOTE: This will only check for rules in the first element of the rules array in the current filterParameters.
4988
+ */
4989
+ upsertRule(id, newRule, reload = true) {
4990
+ this.filterViewService.upsertRule(id, newRule);
4991
+ if (reload) {
4992
+ this.filterViewService.filter();
4993
+ }
4994
+ }
4995
+ /**
4996
+ * Remove a rule.
4997
+ * NOTE: This will only check for rules in the first element of the rules array in the current filterParameters.
4998
+ */
4999
+ removeRule(id, reload = true) {
5000
+ this.filterViewService.removeRule(id);
5001
+ if (reload) {
5002
+ this.filterViewService.filter();
5003
+ }
5004
+ }
5005
+ autoLoad(autoLoad) {
5006
+ const { autoLoad: defaultAutoLoad } = this.filterViewQuery.getValue();
5007
+ if (!this.queryParams) {
5008
+ if (autoLoad && defaultAutoLoad) {
5009
+ this.filterViewService.filter();
5010
+ }
5011
+ else {
5012
+ this.filterViewService.setAutoLoad(autoLoad);
5013
+ }
5014
+ return;
5015
+ }
5016
+ if (!autoLoad && defaultAutoLoad) {
5017
+ this.filterViewService.setAutoLoad(autoLoad);
5018
+ return;
5019
+ }
5020
+ this.queryParams.init.pipe(take(1)).subscribe(() => this.loadData());
5021
+ }
5022
+ loadConfig(loadConfig, configQueryParams) {
5023
+ if (loadConfig === true) {
5024
+ this.filterViewService.loadConfig(configQueryParams);
5044
5025
  return;
5045
5026
  }
5046
- if (count === checkboxes.length) {
5047
- this.checkbox.checked = true;
5048
- this.checkbox.indeterminate = false;
5027
+ if (loadConfig === false) {
5028
+ return;
5029
+ }
5030
+ if (this.advancedFiltersButton || this.advancedFilters) {
5031
+ this.filterViewService.loadConfig(configQueryParams);
5049
5032
  }
5050
5033
  }
5051
5034
  }
5052
- NiceSelectableListCheckboxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListCheckboxDirective, deps: [{ token: i1$4.MatCheckbox }, { token: SelectableListContentService }, { token: NiceSelectableListService }], target: i0.ɵɵFactoryTarget.Directive });
5053
- NiceSelectableListCheckboxDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceSelectableListCheckboxDirective, selector: "mat-checkbox[niceSelectableListCheckbox]", inputs: { selectableEntity: "selectableEntity", selectPage: "selectPage" }, ngImport: i0 });
5054
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListCheckboxDirective, decorators: [{
5055
- type: Directive,
5035
+ NiceBaseFilterViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceBaseFilterViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5036
+ NiceBaseFilterViewComponentcmp = 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 }, { propertyName: "selectableListDirective", first: true, predicate: NiceSelectableListDirective, descendants: true, static: true }], ngImport: i0, template: ``, isInline: true });
5037
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceBaseFilterViewComponent, decorators: [{
5038
+ type: Component,
5056
5039
  args: [{
5057
- selector: "mat-checkbox[niceSelectableListCheckbox]"
5040
+ template: ``
5058
5041
  }]
5059
- }], ctorParameters: function () { return [{ type: i1$4.MatCheckbox }, { type: SelectableListContentService }, { type: NiceSelectableListService }]; }, propDecorators: { selectableEntity: [{
5060
- type: Input
5061
- }], selectPage: [{
5062
- type: Input
5042
+ }], propDecorators: { filterViewService: [{
5043
+ type: ViewChild,
5044
+ args: [NiceFilterViewComponent, { read: NiceFilterViewService, static: true }]
5045
+ }], filterViewQuery: [{
5046
+ type: ViewChild,
5047
+ args: [NiceFilterViewComponent, { read: NiceFilterViewQuery, static: true }]
5048
+ }], queryParams: [{
5049
+ type: ViewChild,
5050
+ args: [NiceFilterQueryParamsDirective, { static: true }]
5051
+ }], advancedFiltersButton: [{
5052
+ type: ViewChild,
5053
+ args: [NiceAdvancedFiltersButtonComponent, { static: true }]
5054
+ }], advancedFilters: [{
5055
+ type: ViewChild,
5056
+ args: [NiceAdvancedFiltersComponent, { static: true }]
5057
+ }], selectableListDirective: [{
5058
+ type: ViewChild,
5059
+ args: [NiceSelectableListDirective, { static: true }]
5063
5060
  }] } });
5064
5061
 
5062
+ class NiceFilterViewModule {
5063
+ static forRoot(options) {
5064
+ return {
5065
+ ngModule: NiceFilterViewModule,
5066
+ providers: [
5067
+ {
5068
+ provide: FILTER_VIEW_ICONS,
5069
+ useValue: {
5070
+ ...defaultIcons$1,
5071
+ ...(options?.icons ?? {})
5072
+ }
5073
+ }
5074
+ ].filter(x => !!x)
5075
+ };
5076
+ }
5077
+ static providerFactory(options) {
5078
+ return [
5079
+ {
5080
+ provide: NiceFilterService,
5081
+ useClass: options.filterService
5082
+ },
5083
+ {
5084
+ provide: EXPORTS_SETTINGS,
5085
+ useValue: options.exports ?? {
5086
+ pdf: true,
5087
+ xlsx: true,
5088
+ csv: true
5089
+ }
5090
+ },
5091
+ {
5092
+ provide: FILTER_VIEW_STATE,
5093
+ useValue: options.state ?? {}
5094
+ },
5095
+ {
5096
+ provide: FILTER_VIEW_STORE,
5097
+ useValue: options.store ?? { name: "nice-filter-view", resettable: true }
5098
+ }
5099
+ ].filter(x => !!x);
5100
+ }
5101
+ }
5102
+ NiceFilterViewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5103
+ NiceFilterViewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewModule, declarations: [NiceFilterViewComponent,
5104
+ NiceFilterCustomDataViewComponent,
5105
+ NiceFilterExportButtonsComponent,
5106
+ NiceFilterInfiniteScrollDataViewComponent,
5107
+ NiceFilterSearchComponent,
5108
+ NiceFilterDataDirective,
5109
+ NiceFilterExportDirective,
5110
+ NiceFilterMatTableViewDirective,
5111
+ NiceFilterMatSortSortingDirective,
5112
+ NiceFilterMatPaginatorPaginationDirective,
5113
+ NiceFilterQueryParamsDirective], imports: [TranslateModule,
5114
+ MatIconModule,
5115
+ FormsModule,
5116
+ AsyncPipe,
5117
+ NgIf,
5118
+ NgTemplateOutlet,
5119
+ MatTooltipModule,
5120
+ MatButtonModule,
5121
+ MatBottomSheetModule,
5122
+ NiceExportBottomSheetModule], exports: [NiceFilterViewComponent,
5123
+ NiceFilterCustomDataViewComponent,
5124
+ NiceFilterExportButtonsComponent,
5125
+ NiceFilterInfiniteScrollDataViewComponent,
5126
+ NiceFilterSearchComponent,
5127
+ NiceFilterDataDirective,
5128
+ NiceFilterExportDirective,
5129
+ NiceFilterMatTableViewDirective,
5130
+ NiceFilterMatSortSortingDirective,
5131
+ NiceFilterMatPaginatorPaginationDirective,
5132
+ NiceFilterQueryParamsDirective] });
5133
+ NiceFilterViewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewModule, imports: [TranslateModule,
5134
+ MatIconModule,
5135
+ FormsModule,
5136
+ MatTooltipModule,
5137
+ MatButtonModule,
5138
+ MatBottomSheetModule,
5139
+ NiceExportBottomSheetModule] });
5140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceFilterViewModule, decorators: [{
5141
+ type: NgModule,
5142
+ args: [{
5143
+ imports: [
5144
+ TranslateModule,
5145
+ MatIconModule,
5146
+ FormsModule,
5147
+ AsyncPipe,
5148
+ NgIf,
5149
+ NgTemplateOutlet,
5150
+ MatTooltipModule,
5151
+ MatButtonModule,
5152
+ MatBottomSheetModule,
5153
+ NiceExportBottomSheetModule
5154
+ ],
5155
+ declarations: [
5156
+ NiceFilterViewComponent,
5157
+ NiceFilterCustomDataViewComponent,
5158
+ NiceFilterExportButtonsComponent,
5159
+ NiceFilterInfiniteScrollDataViewComponent,
5160
+ NiceFilterSearchComponent,
5161
+ NiceFilterDataDirective,
5162
+ NiceFilterExportDirective,
5163
+ NiceFilterMatTableViewDirective,
5164
+ NiceFilterMatSortSortingDirective,
5165
+ NiceFilterMatPaginatorPaginationDirective,
5166
+ NiceFilterQueryParamsDirective
5167
+ ],
5168
+ providers: [],
5169
+ exports: [
5170
+ NiceFilterViewComponent,
5171
+ NiceFilterCustomDataViewComponent,
5172
+ NiceFilterExportButtonsComponent,
5173
+ NiceFilterInfiniteScrollDataViewComponent,
5174
+ NiceFilterSearchComponent,
5175
+ NiceFilterDataDirective,
5176
+ NiceFilterExportDirective,
5177
+ NiceFilterMatTableViewDirective,
5178
+ NiceFilterMatSortSortingDirective,
5179
+ NiceFilterMatPaginatorPaginationDirective,
5180
+ NiceFilterQueryParamsDirective
5181
+ ],
5182
+ }]
5183
+ }] });
5184
+
5185
+ class NicePreloadSelectedEntitiesProvider {
5186
+ }
5187
+ NicePreloadSelectedEntitiesProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NicePreloadSelectedEntitiesProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5188
+ NicePreloadSelectedEntitiesProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NicePreloadSelectedEntitiesProvider });
5189
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NicePreloadSelectedEntitiesProvider, decorators: [{
5190
+ type: Injectable
5191
+ }] });
5192
+
5065
5193
  // tslint:disable-next-line:directive-class-suffix
5066
5194
  class NiceSelectableListSelectAllDirective {
5067
5195
  constructor(niceFilterViewQuery, service, selectableListService) {
@@ -5101,85 +5229,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
5101
5229
  args: ["click"]
5102
5230
  }] } });
5103
5231
 
5104
- // tslint:disable-next-line:directive-class-suffix
5105
- class NiceSelectableListDirective {
5106
- constructor(service, selectableListService, route) {
5107
- this.service = service;
5108
- this.selectableListService = selectableListService;
5109
- this.route = route;
5110
- this.unsubscribeAll$ = new Subject();
5111
- this.unsubscribeQuerySub$ = new Subject();
5112
- }
5113
- ngOnInit() {
5114
- combineLatest([
5115
- this.route.queryParams.pipe(map((params) => params.selection), distinct()),
5116
- this.route.queryParams.pipe(map((params) => params.selected), distinct())
5117
- ]).pipe(takeUntil(this.unsubscribeAll$)).subscribe(([selection, selected]) => {
5118
- if (!selection) {
5119
- this.stateService.setQueryParams();
5120
- return;
5121
- }
5122
- const newSelection = typeof selection === "string" ? [+selection] : selection.map((s) => +s);
5123
- const newSelected = selected ? +selected : null;
5124
- const { ids, active } = this.stateQuery.getValue();
5125
- if (!ids.length || !ids.every((id) => newSelection.includes(id))) {
5126
- this.stateService.setEntities(newSelection, newSelected);
5127
- return;
5128
- }
5129
- if (newSelected && active !== newSelected) {
5130
- this.stateService.setActive(newSelected);
5131
- }
5132
- });
5133
- }
5134
- ngOnDestroy() {
5135
- this.unsubscribeAll$.next();
5136
- this.unsubscribeAll$.complete();
5137
- this.unsubscribeQuerySub$.next();
5138
- this.unsubscribeQuerySub$.complete();
5139
- }
5140
- ngOnChanges(changes) {
5141
- if ("options" in changes) {
5142
- this.service.setOptions(this.options);
5143
- }
5144
- if ("state" in changes) {
5145
- this.service.setState(this.state);
5146
- this.stateService = this.selectableListService.withState(this.state);
5147
- this.stateQuery = this.selectableListService.query(this.state);
5148
- this.listenOnStateChanges();
5149
- }
5150
- }
5151
- ngAfterContentInit() {
5152
- this.service.setCheckboxes(this.checkboxes);
5153
- }
5154
- listenOnStateChanges() {
5155
- this.unsubscribeQuerySub$.next();
5156
- this.stateQuery.selectEntityAction([
5157
- EntityActions.Add,
5158
- EntityActions.Remove,
5159
- EntityActions.Set
5160
- ]).pipe(takeUntil(this.unsubscribeQuerySub$)).subscribe(() => {
5161
- this.stateService.setQueryParams();
5162
- });
5163
- this.stateQuery.selectActiveId().pipe(takeUntil(this.unsubscribeQuerySub$)).subscribe(() => this.stateService.setQueryParams());
5164
- }
5165
- }
5166
- NiceSelectableListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListDirective, deps: [{ token: SelectableListContentService }, { token: NiceSelectableListService }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Directive });
5167
- 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 });
5168
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSelectableListDirective, decorators: [{
5169
- type: Directive,
5170
- args: [{
5171
- selector: "[niceSelectableList]",
5172
- providers: [SelectableListContentService]
5173
- }]
5174
- }], ctorParameters: function () { return [{ type: SelectableListContentService }, { type: NiceSelectableListService }, { type: i2.ActivatedRoute }]; }, propDecorators: { state: [{
5175
- type: Input
5176
- }], options: [{
5177
- type: Input
5178
- }], checkboxes: [{
5179
- type: ContentChildren,
5180
- args: [NiceSelectableListCheckboxDirective, { descendants: true }]
5181
- }] } });
5182
-
5183
5232
  class NiceSelectableListModule {
5184
5233
  static register(...providers) {
5185
5234
  return {