@firestitch/filter 18.2.84 → 18.2.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/components/filter/filter.component.d.ts +0 -12
- package/app/components/filter-chips/filter-chips.component.d.ts +7 -1
- package/app/components/filters-item/range/range.component.d.ts +1 -0
- package/app/components/filters-item/select/select.component.d.ts +2 -5
- package/app/helpers/create-filter-item.d.ts +1 -1
- package/app/models/items/base-item.d.ts +2 -1
- package/esm2022/app/components/filter/filter.component.mjs +4 -31
- package/esm2022/app/components/filter-chips/filter-chips.component.mjs +57 -11
- package/esm2022/app/components/filters-item/range/range.component.mjs +29 -10
- package/esm2022/app/components/filters-item/select/select.component.mjs +6 -17
- package/esm2022/app/models/items/base-item.mjs +13 -10
- package/esm2022/app/models/items/keyword-item.mjs +2 -2
- package/esm2022/app/models/items/text-item.mjs +2 -2
- package/fesm2022/firestitch-filter.mjs +107 -80
- package/fesm2022/firestitch-filter.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable, Directive, Input, TemplateRef, DestroyRef, Component, ChangeDetectionStrategy, InjectionToken, ChangeDetectorRef, Injector, ViewChild, ElementRef, ViewChildren, EventEmitter, NgZone, Output, ContentChild, HostBinding, NgModule } from '@angular/core';
|
|
2
|
+
import { inject, Injectable, Directive, Input, TemplateRef, DestroyRef, Component, ChangeDetectionStrategy, InjectionToken, ChangeDetectorRef, Injector, ViewChild, signal, ElementRef, ViewChildren, EventEmitter, NgZone, Output, ContentChild, HostBinding, NgModule } from '@angular/core';
|
|
3
3
|
import { FsPrompt } from '@firestitch/prompt';
|
|
4
|
-
import { BehaviorSubject, Subject, of, forkJoin, Observable, tap as tap$1, map as map$1, switchMap as switchMap$1, distinctUntilChanged as distinctUntilChanged$1, merge, filter, take, delay, combineLatest, fromEvent, interval } from 'rxjs';
|
|
4
|
+
import { BehaviorSubject, Subject, of, forkJoin, Observable, tap as tap$1, map as map$1, switchMap as switchMap$1, distinctUntilChanged as distinctUntilChanged$1, merge, filter, take, delay, skip as skip$1, combineLatest, fromEvent, interval } from 'rxjs';
|
|
5
5
|
import { distinctUntilChanged, switchMap, tap, skip, takeUntil, map, debounceTime, finalize, filter as filter$1 } from 'rxjs/operators';
|
|
6
6
|
import { FsStore } from '@firestitch/store';
|
|
7
7
|
import { Location, NgSwitch, NgSwitchCase, NgClass, NgTemplateOutlet, NgSwitchDefault, NgIf, AsyncPipe } from '@angular/common';
|
|
8
8
|
import * as i1$1 from '@angular/forms';
|
|
9
9
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
10
|
-
import * as i3$
|
|
10
|
+
import * as i3$3 from '@angular/material/button';
|
|
11
11
|
import { MatIconButton, MatFabButton, MatMiniFabButton, MatButton, MatButtonModule, MatIconAnchor } from '@angular/material/button';
|
|
12
12
|
import { MatIcon } from '@angular/material/icon';
|
|
13
13
|
import { MatSlideToggle } from '@angular/material/slide-toggle';
|
|
14
|
-
import * as i3$
|
|
14
|
+
import * as i3$4 from '@firestitch/clear';
|
|
15
15
|
import { FsClearModule } from '@firestitch/clear';
|
|
16
16
|
import * as i3 from '@firestitch/form';
|
|
17
17
|
import { FsFormModule, FsButtonDirective } from '@firestitch/form';
|
|
@@ -31,7 +31,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
|
31
31
|
import { ActivatedRoute } from '@angular/router';
|
|
32
32
|
import * as i1$6 from '@angular/material/dialog';
|
|
33
33
|
import { MatDialogRef, MatDialogModule, MatDialog } from '@angular/material/dialog';
|
|
34
|
-
import * as
|
|
34
|
+
import * as i3$2 from '@firestitch/common';
|
|
35
35
|
import { getNormalizedPath, FsCommonModule } from '@firestitch/common';
|
|
36
36
|
import { DrawerRef } from '@firestitch/drawer';
|
|
37
37
|
import * as i1 from '@firestitch/popover';
|
|
@@ -1010,7 +1010,7 @@ class BaseItem {
|
|
|
1010
1010
|
initCallback;
|
|
1011
1011
|
_type;
|
|
1012
1012
|
_valuesFn;
|
|
1013
|
-
|
|
1013
|
+
_visible$ = new BehaviorSubject(false);
|
|
1014
1014
|
_value$ = new BehaviorSubject({ value: undefined, emitChange: true });
|
|
1015
1015
|
_values$ = new BehaviorSubject(null);
|
|
1016
1016
|
_secondaryVisible$ = new BehaviorSubject(false);
|
|
@@ -1044,20 +1044,23 @@ class BaseItem {
|
|
|
1044
1044
|
return this._filter;
|
|
1045
1045
|
}
|
|
1046
1046
|
get hidden$() {
|
|
1047
|
-
return this.
|
|
1047
|
+
return this._visible$.asObservable()
|
|
1048
|
+
.pipe(map((visible) => !visible));
|
|
1048
1049
|
}
|
|
1049
1050
|
get mergedLabel() {
|
|
1050
1051
|
return Array.isArray(this.label) ? this.label.join(' / ') : this.label;
|
|
1051
1052
|
}
|
|
1052
1053
|
get visible$() {
|
|
1053
|
-
return this.
|
|
1054
|
-
.pipe(map((hidden) => !hidden));
|
|
1054
|
+
return this._visible$.asObservable();
|
|
1055
1055
|
}
|
|
1056
1056
|
get visible() {
|
|
1057
|
-
return
|
|
1057
|
+
return this._visible$.getValue();
|
|
1058
|
+
}
|
|
1059
|
+
set visible(value) {
|
|
1060
|
+
this._visible$.next(value);
|
|
1058
1061
|
}
|
|
1059
1062
|
get hidden() {
|
|
1060
|
-
return this.
|
|
1063
|
+
return !this._visible$.getValue();
|
|
1061
1064
|
}
|
|
1062
1065
|
get isTypeAutocomplete() {
|
|
1063
1066
|
return this.type === ItemType.AutoComplete;
|
|
@@ -1154,13 +1157,13 @@ class BaseItem {
|
|
|
1154
1157
|
if (!this.primary) {
|
|
1155
1158
|
this.secondaryHide();
|
|
1156
1159
|
}
|
|
1157
|
-
this.
|
|
1160
|
+
this.visible = false;
|
|
1158
1161
|
}
|
|
1159
1162
|
show() {
|
|
1160
1163
|
if (!this.primary) {
|
|
1161
1164
|
this.secondaryShow();
|
|
1162
1165
|
}
|
|
1163
|
-
this.
|
|
1166
|
+
this.visible = true;
|
|
1164
1167
|
}
|
|
1165
1168
|
get query() {
|
|
1166
1169
|
if (!this.hasValue) {
|
|
@@ -1230,7 +1233,7 @@ class BaseItem {
|
|
|
1230
1233
|
this.primary = item.primary ?? false;
|
|
1231
1234
|
this.secondary = !this.primary && (item.secondary ?? false);
|
|
1232
1235
|
this.chipLabel = item.chipLabel;
|
|
1233
|
-
this.
|
|
1236
|
+
this.visible = !(item.hide ?? !(item.show ?? true));
|
|
1234
1237
|
this.clearable = item.clear ?? true;
|
|
1235
1238
|
this.persistanceDisabled = item.disablePersist ?? false;
|
|
1236
1239
|
this.queryParamsDisabled = item.disableQueryParams ?? false;
|
|
@@ -1818,7 +1821,7 @@ class TextItem extends BaseItem {
|
|
|
1818
1821
|
return params;
|
|
1819
1822
|
}
|
|
1820
1823
|
get chips() {
|
|
1821
|
-
if (!this.hasValue
|
|
1824
|
+
if (!this.hasValue) {
|
|
1822
1825
|
return [];
|
|
1823
1826
|
}
|
|
1824
1827
|
let value = this.value;
|
|
@@ -1862,7 +1865,7 @@ class KeywordItem extends TextItem {
|
|
|
1862
1865
|
return params;
|
|
1863
1866
|
}
|
|
1864
1867
|
get chips() {
|
|
1865
|
-
if (!this.hasValue
|
|
1868
|
+
if (!this.hasValue) {
|
|
1866
1869
|
return [];
|
|
1867
1870
|
}
|
|
1868
1871
|
return [
|
|
@@ -2919,22 +2922,37 @@ class RangeComponent extends BaseItemComponent {
|
|
|
2919
2922
|
min;
|
|
2920
2923
|
max;
|
|
2921
2924
|
ngOnInit() {
|
|
2922
|
-
this.
|
|
2923
|
-
|
|
2925
|
+
this.item.value$
|
|
2926
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
2927
|
+
.subscribe((value) => {
|
|
2928
|
+
this.min = value?.min;
|
|
2929
|
+
this.max = value?.max;
|
|
2930
|
+
this._cdRef.detectChanges();
|
|
2931
|
+
});
|
|
2924
2932
|
}
|
|
2925
2933
|
ngOnDestroy() {
|
|
2926
|
-
this.
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2934
|
+
if (this.triggerChangeOn === 'close') {
|
|
2935
|
+
this.item.value = {
|
|
2936
|
+
min: this.min,
|
|
2937
|
+
max: this.max,
|
|
2938
|
+
};
|
|
2939
|
+
}
|
|
2940
|
+
}
|
|
2941
|
+
change() {
|
|
2942
|
+
if (this.triggerChangeOn === 'change') {
|
|
2943
|
+
this.item.value = {
|
|
2944
|
+
min: this.min,
|
|
2945
|
+
max: this.max,
|
|
2946
|
+
};
|
|
2947
|
+
}
|
|
2930
2948
|
}
|
|
2931
2949
|
keyup(event) {
|
|
2932
|
-
if (event.key === 'Enter' || event.code === 'Tab') {
|
|
2950
|
+
if (this.triggerChangeOn === 'close' && (event.key === 'Enter' || event.code === 'Tab')) {
|
|
2933
2951
|
this.close();
|
|
2934
2952
|
}
|
|
2935
2953
|
}
|
|
2936
2954
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RangeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2937
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: RangeComponent, isStandalone: true, selector: "filter-item-range", inputs: { autofocusName: "autofocusName", floatLabel: "floatLabel" }, usesInheritance: true, ngImport: i0, template: "<div class=\"form-field\">\n <mat-form-field\n class=\"filter-range-min\"\n [floatLabel]=\"floatLabel\"\n class=\"form-field-padless\">\n <mat-label>\n {{ item.label[0] }}\n </mat-label>\n @if (item.prefix) {\n <span\n matTextPrefix\n class=\"text-prefix\"\n [innerHtml]=\"item.prefix\">\n </span>\n }\n <input\n matInput\n [fsFilterFocusTrigger]=\"autofocusName === 'min' || !min\"\n type=\"number\"\n [(ngModel)]=\"min\"\n (keyup)=\"keyup($event)\"\n #from>\n @if (item.suffix) {\n <span\n matSuffix\n class=\"text-suffix\"\n [innerHtml]=\"item.suffix\">\n </span>\n }\n </mat-form-field>\n <mat-form-field\n class=\"filter-range-max\"\n [floatLabel]=\"floatLabel\"\n class=\"form-field-padless\">\n <mat-label>\n {{ item.label[1] }}\n </mat-label>\n @if (item.prefix) {\n <span\n matTextPrefix\n class=\"text-prefix\"\n [innerHtml]=\"item.prefix\">\n </span>\n }\n <input\n matInput\n [fsFilterFocusTrigger]=\"autofocusName === 'max' || !!min\"\n type=\"number\"\n [(ngModel)]=\"max\"\n (keyup)=\"keyup($event)\"\n #to>\n @if (item.suffix) {\n <span\n matSuffix\n class=\"text-suffix\"\n [innerHtml]=\"item.suffix\">\n </span>\n }\n </mat-form-field>\n</div>", styles: [".form-field{display:flex}.form-field mat-form-field{min-width:0}.form-field mat-form-field+mat-form-field{margin-left:10px}\n"], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger"] }, { kind: "ngmodule", type: FsFormModule }, { kind: "directive", type: i3.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2955
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: RangeComponent, isStandalone: true, selector: "filter-item-range", inputs: { autofocusName: "autofocusName", floatLabel: "floatLabel" }, usesInheritance: true, ngImport: i0, template: "<div class=\"form-field\">\n <mat-form-field\n class=\"filter-range-min\"\n [floatLabel]=\"floatLabel\"\n class=\"form-field-padless\">\n <mat-label>\n {{ item.label[0] }}\n </mat-label>\n @if (item.prefix) {\n <span\n matTextPrefix\n class=\"text-prefix\"\n [innerHtml]=\"item.prefix\">\n </span>\n }\n <input\n matInput\n [fsFilterFocusTrigger]=\"autofocusName === 'min' || !min\"\n type=\"number\"\n [(ngModel)]=\"min\"\n (fsModelChange)=\"change()\"\n (keyup)=\"keyup($event)\"\n #from>\n @if (item.suffix) {\n <span\n matSuffix\n class=\"text-suffix\"\n [innerHtml]=\"item.suffix\">\n </span>\n }\n </mat-form-field>\n <mat-form-field\n class=\"filter-range-max\"\n [floatLabel]=\"floatLabel\"\n class=\"form-field-padless\">\n <mat-label>\n {{ item.label[1] }}\n </mat-label>\n @if (item.prefix) {\n <span\n matTextPrefix\n class=\"text-prefix\"\n [innerHtml]=\"item.prefix\">\n </span>\n }\n <input\n matInput\n [fsFilterFocusTrigger]=\"autofocusName === 'max' || !!min\"\n type=\"number\"\n [(ngModel)]=\"max\"\n (fsModelChange)=\"change()\"\n (keyup)=\"keyup($event)\"\n #to>\n @if (item.suffix) {\n <span\n matSuffix\n class=\"text-suffix\"\n [innerHtml]=\"item.suffix\">\n </span>\n }\n </mat-form-field>\n</div>", styles: [".form-field{display:flex}.form-field mat-form-field{min-width:0}.form-field mat-form-field+mat-form-field{margin-left:10px}\n"], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger"] }, { kind: "ngmodule", type: FsFormModule }, { kind: "directive", type: i3.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: FsCommonModule }, { kind: "directive", type: i3$2.FsModelChangeDirective, selector: "[fsModelChange]", inputs: ["fsModelChangeOptions"], outputs: ["fsModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2938
2956
|
}
|
|
2939
2957
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RangeComponent, decorators: [{
|
|
2940
2958
|
type: Component,
|
|
@@ -2947,7 +2965,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2947
2965
|
FocusToItemDirective,
|
|
2948
2966
|
FsFormModule,
|
|
2949
2967
|
MatSuffix,
|
|
2950
|
-
|
|
2968
|
+
FsCommonModule,
|
|
2969
|
+
], template: "<div class=\"form-field\">\n <mat-form-field\n class=\"filter-range-min\"\n [floatLabel]=\"floatLabel\"\n class=\"form-field-padless\">\n <mat-label>\n {{ item.label[0] }}\n </mat-label>\n @if (item.prefix) {\n <span\n matTextPrefix\n class=\"text-prefix\"\n [innerHtml]=\"item.prefix\">\n </span>\n }\n <input\n matInput\n [fsFilterFocusTrigger]=\"autofocusName === 'min' || !min\"\n type=\"number\"\n [(ngModel)]=\"min\"\n (fsModelChange)=\"change()\"\n (keyup)=\"keyup($event)\"\n #from>\n @if (item.suffix) {\n <span\n matSuffix\n class=\"text-suffix\"\n [innerHtml]=\"item.suffix\">\n </span>\n }\n </mat-form-field>\n <mat-form-field\n class=\"filter-range-max\"\n [floatLabel]=\"floatLabel\"\n class=\"form-field-padless\">\n <mat-label>\n {{ item.label[1] }}\n </mat-label>\n @if (item.prefix) {\n <span\n matTextPrefix\n class=\"text-prefix\"\n [innerHtml]=\"item.prefix\">\n </span>\n }\n <input\n matInput\n [fsFilterFocusTrigger]=\"autofocusName === 'max' || !!min\"\n type=\"number\"\n [(ngModel)]=\"max\"\n (fsModelChange)=\"change()\"\n (keyup)=\"keyup($event)\"\n #to>\n @if (item.suffix) {\n <span\n matSuffix\n class=\"text-suffix\"\n [innerHtml]=\"item.suffix\">\n </span>\n }\n </mat-form-field>\n</div>", styles: [".form-field{display:flex}.form-field mat-form-field{min-width:0}.form-field mat-form-field+mat-form-field{margin-left:10px}\n"] }]
|
|
2951
2970
|
}], propDecorators: { autofocusName: [{
|
|
2952
2971
|
type: Input
|
|
2953
2972
|
}], floatLabel: [{
|
|
@@ -2958,13 +2977,9 @@ class SelectComponent extends BaseItemComponent {
|
|
|
2958
2977
|
autofocus = false;
|
|
2959
2978
|
floatLabel = 'auto';
|
|
2960
2979
|
select;
|
|
2961
|
-
changed() {
|
|
2962
|
-
if (!this.item.multiple) {
|
|
2963
|
-
this.change();
|
|
2964
|
-
}
|
|
2965
|
-
}
|
|
2966
2980
|
selectOpenedChange(opened) {
|
|
2967
|
-
if (!opened
|
|
2981
|
+
if (!opened) {
|
|
2982
|
+
this.change();
|
|
2968
2983
|
this.close();
|
|
2969
2984
|
}
|
|
2970
2985
|
}
|
|
@@ -2980,20 +2995,12 @@ class SelectComponent extends BaseItemComponent {
|
|
|
2980
2995
|
}
|
|
2981
2996
|
this.item.value = value;
|
|
2982
2997
|
}
|
|
2983
|
-
ngOnDestroy() {
|
|
2984
|
-
if (this.item.isolate) {
|
|
2985
|
-
this.change();
|
|
2986
|
-
}
|
|
2987
|
-
}
|
|
2988
2998
|
ngOnInit() {
|
|
2989
2999
|
super.ngOnInit();
|
|
2990
3000
|
if (this.item.isolate && !this.item.hasValue) {
|
|
2991
3001
|
this.item.isolated = false;
|
|
2992
3002
|
}
|
|
2993
3003
|
}
|
|
2994
|
-
markForCheck() {
|
|
2995
|
-
this._cdRef.markForCheck();
|
|
2996
|
-
}
|
|
2997
3004
|
isolateChange(event) {
|
|
2998
3005
|
if (event.checked) {
|
|
2999
3006
|
this.value = this.item.multiple ? this.item.isolateValues : this.item.isolateValues[0];
|
|
@@ -3001,9 +3008,10 @@ class SelectComponent extends BaseItemComponent {
|
|
|
3001
3008
|
else {
|
|
3002
3009
|
this.value = this.item.multiple ? [] : null;
|
|
3003
3010
|
}
|
|
3011
|
+
this.change();
|
|
3004
3012
|
}
|
|
3005
3013
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3006
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SelectComponent, isStandalone: true, selector: "filter-item-select", inputs: { autofocus: "autofocus", floatLabel: "floatLabel" }, viewQueries: [{ propertyName: "select", first: true, predicate: MatSelect, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field\n [ngClass]=\"{ isolate: item.isolate }\"\n [floatLabel]=\"floatLabel\"\n class=\"form-field-padless\">\n <mat-label>\n {{ item.label }}\n </mat-label>\n <mat-select\n [fsFilterFocusTrigger]=\"autofocus && !item.isolate\"\n [(ngModel)]=\"value\"\n (openedChange)=\"selectOpenedChange($event)\"\n
|
|
3014
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SelectComponent, isStandalone: true, selector: "filter-item-select", inputs: { autofocus: "autofocus", floatLabel: "floatLabel" }, viewQueries: [{ propertyName: "select", first: true, predicate: MatSelect, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field\n [ngClass]=\"{ isolate: item.isolate }\"\n [floatLabel]=\"floatLabel\"\n class=\"form-field-padless\">\n <mat-label>\n {{ item.label }}\n </mat-label>\n <mat-select\n [fsFilterFocusTrigger]=\"autofocus && !item.isolate\"\n [(ngModel)]=\"value\"\n (openedChange)=\"selectOpenedChange($event)\"\n [multiple]=\"item.multiple\">\n @if (item.children) {\n @for (option of item.values$ | async; track option) {\n @if (option[item.children]) {\n <mat-optgroup [label]=\"option.name\">\n @for (childOption of option[item.children]; track childOption.value) {\n <mat-option [value]=\"childOption.value\">\n {{ childOption.name }}\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n <mat-option [value]=\"option.value\">\n {{ option.name }}\n </mat-option>\n }\n }\n } @else {\n @for (option of item.values$ | async; track option) {\n <mat-option [value]=\"option.value\">\n {{ option.name }}\n </mat-option>\n }\n }\n </mat-select>\n</mat-form-field>\n@if (item.isolate) {\n <div class=\"isolate-checkbox\">\n <mat-checkbox\n (change)=\"isolateChange($event)\"\n [(ngModel)]=\"item.isolated\">\n <span class=\"checkbox-label\">\n {{ item.isolateLabel }}\n </span>\n </mat-checkbox>\n </div>\n}", styles: [":host ::ng-deep .isolate .mat-mdc-form-field-hint-wrapper{padding-left:0;padding-right:0;padding-top:8px}:host ::ng-deep .isolate .mat-mdc-form-field-hint-wrapper mat-hint .mat-internal-form-field{position:relative}:host ::ng-deep .isolate .mat-mdc-form-field-hint-wrapper mat-hint .mat-internal-form-field .mdc-checkbox{position:absolute}:host ::ng-deep .isolate .mat-mdc-form-field-hint-wrapper mat-hint .mat-internal-form-field .mdc-label{margin-left:32px;font-size:smaller;line-height:normal}\n"], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger"] }, { kind: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: FsFormModule }, { kind: "directive", type: i3.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3007
3015
|
}
|
|
3008
3016
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SelectComponent, decorators: [{
|
|
3009
3017
|
type: Component,
|
|
@@ -3019,7 +3027,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3019
3027
|
MatOptgroup,
|
|
3020
3028
|
MatCheckbox,
|
|
3021
3029
|
AsyncPipe,
|
|
3022
|
-
], template: "<mat-form-field\n [ngClass]=\"{ isolate: item.isolate }\"\n [floatLabel]=\"floatLabel\"\n class=\"form-field-padless\">\n <mat-label>\n {{ item.label }}\n </mat-label>\n <mat-select\n [fsFilterFocusTrigger]=\"autofocus && !item.isolate\"\n [(ngModel)]=\"value\"\n (openedChange)=\"selectOpenedChange($event)\"\n
|
|
3030
|
+
], template: "<mat-form-field\n [ngClass]=\"{ isolate: item.isolate }\"\n [floatLabel]=\"floatLabel\"\n class=\"form-field-padless\">\n <mat-label>\n {{ item.label }}\n </mat-label>\n <mat-select\n [fsFilterFocusTrigger]=\"autofocus && !item.isolate\"\n [(ngModel)]=\"value\"\n (openedChange)=\"selectOpenedChange($event)\"\n [multiple]=\"item.multiple\">\n @if (item.children) {\n @for (option of item.values$ | async; track option) {\n @if (option[item.children]) {\n <mat-optgroup [label]=\"option.name\">\n @for (childOption of option[item.children]; track childOption.value) {\n <mat-option [value]=\"childOption.value\">\n {{ childOption.name }}\n </mat-option>\n }\n </mat-optgroup>\n } @else {\n <mat-option [value]=\"option.value\">\n {{ option.name }}\n </mat-option>\n }\n }\n } @else {\n @for (option of item.values$ | async; track option) {\n <mat-option [value]=\"option.value\">\n {{ option.name }}\n </mat-option>\n }\n }\n </mat-select>\n</mat-form-field>\n@if (item.isolate) {\n <div class=\"isolate-checkbox\">\n <mat-checkbox\n (change)=\"isolateChange($event)\"\n [(ngModel)]=\"item.isolated\">\n <span class=\"checkbox-label\">\n {{ item.isolateLabel }}\n </span>\n </mat-checkbox>\n </div>\n}", styles: [":host ::ng-deep .isolate .mat-mdc-form-field-hint-wrapper{padding-left:0;padding-right:0;padding-top:8px}:host ::ng-deep .isolate .mat-mdc-form-field-hint-wrapper mat-hint .mat-internal-form-field{position:relative}:host ::ng-deep .isolate .mat-mdc-form-field-hint-wrapper mat-hint .mat-internal-form-field .mdc-checkbox{position:absolute}:host ::ng-deep .isolate .mat-mdc-form-field-hint-wrapper mat-hint .mat-internal-form-field .mdc-label{margin-left:32px;font-size:smaller;line-height:normal}\n"] }]
|
|
3023
3031
|
}], propDecorators: { autofocus: [{
|
|
3024
3032
|
type: Input
|
|
3025
3033
|
}], floatLabel: [{
|
|
@@ -3050,7 +3058,7 @@ class TextComponent extends BaseItemComponent {
|
|
|
3050
3058
|
}
|
|
3051
3059
|
}
|
|
3052
3060
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3053
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: TextComponent, isStandalone: true, selector: "filter-item-text", inputs: { autofocus: "autofocus", floatLabel: "floatLabel" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field\n [floatLabel]=\"floatLabel\"\n class=\"form-field-padless\">\n <mat-label>\n {{ item.label }}\n </mat-label>\n @if (item.prefix) {\n <span\n matTextPrefix\n [innerHtml]=\"item.prefix\">\n </span>\n }\n <input\n matInput\n [(ngModel)]=\"value\"\n (keyup)=\"keyup($event)\"\n (fsModelChange)=\"change()\"\n [placeholder]=\"item.placeholder\"\n [fsFilterFocusTrigger]=\"autofocus\">\n @if (item.suffix) {\n <span\n matTextSuffix\n [innerHtml]=\"item.suffix\">\n </span>\n }\n</mat-form-field>", styles: [""], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: 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: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: FsCommonModule }, { kind: "directive", type:
|
|
3061
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: TextComponent, isStandalone: true, selector: "filter-item-text", inputs: { autofocus: "autofocus", floatLabel: "floatLabel" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field\n [floatLabel]=\"floatLabel\"\n class=\"form-field-padless\">\n <mat-label>\n {{ item.label }}\n </mat-label>\n @if (item.prefix) {\n <span\n matTextPrefix\n [innerHtml]=\"item.prefix\">\n </span>\n }\n <input\n matInput\n [(ngModel)]=\"value\"\n (keyup)=\"keyup($event)\"\n (fsModelChange)=\"change()\"\n [placeholder]=\"item.placeholder\"\n [fsFilterFocusTrigger]=\"autofocus\">\n @if (item.suffix) {\n <span\n matTextSuffix\n [innerHtml]=\"item.suffix\">\n </span>\n }\n</mat-form-field>", styles: [""], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: 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: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: FsCommonModule }, { kind: "directive", type: i3$2.FsModelChangeDirective, selector: "[fsModelChange]", inputs: ["fsModelChangeOptions"], outputs: ["fsModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3054
3062
|
}
|
|
3055
3063
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TextComponent, decorators: [{
|
|
3056
3064
|
type: Component,
|
|
@@ -3283,6 +3291,8 @@ class FsFilterChipsComponent {
|
|
|
3283
3291
|
chips;
|
|
3284
3292
|
ItemType = ItemType;
|
|
3285
3293
|
secondaryItems = [];
|
|
3294
|
+
moreFilterItems = signal([]);
|
|
3295
|
+
clearFiltersVisible = signal(false);
|
|
3286
3296
|
_filterController = inject(FilterController);
|
|
3287
3297
|
_dialog = inject(MatDialog);
|
|
3288
3298
|
_message = inject(FsMessage);
|
|
@@ -3294,8 +3304,7 @@ class FsFilterChipsComponent {
|
|
|
3294
3304
|
_elementRef = inject(ElementRef);
|
|
3295
3305
|
_hasSecondaryValue$ = new BehaviorSubject(false);
|
|
3296
3306
|
get items() {
|
|
3297
|
-
return this._filterController.items
|
|
3298
|
-
.filter((item) => !item.isTypeKeyword);
|
|
3307
|
+
return this._filterController.items;
|
|
3299
3308
|
}
|
|
3300
3309
|
addFilter(event) {
|
|
3301
3310
|
const item = event.value;
|
|
@@ -3306,10 +3315,6 @@ class FsFilterChipsComponent {
|
|
|
3306
3315
|
}), takeUntilDestroyed(this._destroyRef))
|
|
3307
3316
|
.subscribe();
|
|
3308
3317
|
}
|
|
3309
|
-
get disabledItems() {
|
|
3310
|
-
return this.items
|
|
3311
|
-
.filter((item) => !item.secondaryVisible && !item.hasValue && !item.primary && item.visible);
|
|
3312
|
-
}
|
|
3313
3318
|
get hasSecondaryValue$() {
|
|
3314
3319
|
return this._hasSecondaryValue$.asObservable();
|
|
3315
3320
|
}
|
|
@@ -3324,6 +3329,8 @@ class FsFilterChipsComponent {
|
|
|
3324
3329
|
this.secondaryItems = this.items
|
|
3325
3330
|
.filter((item) => !item.primary);
|
|
3326
3331
|
this._initHasSecondaryValue();
|
|
3332
|
+
this._initMoreFilterItems();
|
|
3333
|
+
this._initClearFiltersVisible();
|
|
3327
3334
|
}
|
|
3328
3335
|
clear() {
|
|
3329
3336
|
this._filterController.items
|
|
@@ -3434,6 +3441,9 @@ class FsFilterChipsComponent {
|
|
|
3434
3441
|
item.clear();
|
|
3435
3442
|
}
|
|
3436
3443
|
}
|
|
3444
|
+
removeItem(item) {
|
|
3445
|
+
item.secondaryHide();
|
|
3446
|
+
}
|
|
3437
3447
|
_attachContainer(overlayRef, item, name) {
|
|
3438
3448
|
const injector = this._createInjector(item, name);
|
|
3439
3449
|
const containerPortal = new ComponentPortal(FilterItemDialogComponent, undefined, injector);
|
|
@@ -3449,6 +3459,50 @@ class FsFilterChipsComponent {
|
|
|
3449
3459
|
parent: this._injector,
|
|
3450
3460
|
});
|
|
3451
3461
|
}
|
|
3462
|
+
_initMoreFilterItems() {
|
|
3463
|
+
merge(...this.items
|
|
3464
|
+
.reduce((accum, item) => {
|
|
3465
|
+
return [
|
|
3466
|
+
...accum,
|
|
3467
|
+
item.visible$
|
|
3468
|
+
.pipe(skip$1(1)),
|
|
3469
|
+
item.secondaryVisible$
|
|
3470
|
+
.pipe(skip$1(1)),
|
|
3471
|
+
];
|
|
3472
|
+
}, []))
|
|
3473
|
+
.pipe(tap$1(() => {
|
|
3474
|
+
this._updateMoreFilterItems();
|
|
3475
|
+
}), takeUntilDestroyed(this._destroyRef))
|
|
3476
|
+
.subscribe();
|
|
3477
|
+
this._updateMoreFilterItems();
|
|
3478
|
+
}
|
|
3479
|
+
_initClearFiltersVisible() {
|
|
3480
|
+
merge(...this.items
|
|
3481
|
+
.reduce((accum, item) => {
|
|
3482
|
+
return [
|
|
3483
|
+
...accum,
|
|
3484
|
+
item.visible$
|
|
3485
|
+
.pipe(skip$1(1)),
|
|
3486
|
+
item.hasValue$
|
|
3487
|
+
.pipe(skip$1(1)),
|
|
3488
|
+
];
|
|
3489
|
+
}, []))
|
|
3490
|
+
.pipe(tap$1(() => {
|
|
3491
|
+
this._updateClearItems();
|
|
3492
|
+
}), takeUntilDestroyed(this._destroyRef))
|
|
3493
|
+
.subscribe();
|
|
3494
|
+
this._updateClearItems();
|
|
3495
|
+
}
|
|
3496
|
+
_updateMoreFilterItems() {
|
|
3497
|
+
this.moreFilterItems
|
|
3498
|
+
.set(this.items
|
|
3499
|
+
.filter((item) => !item.primary && item.visible && !item.secondaryVisible));
|
|
3500
|
+
}
|
|
3501
|
+
_updateClearItems() {
|
|
3502
|
+
this.clearFiltersVisible
|
|
3503
|
+
.set(this.items
|
|
3504
|
+
.some((item) => item.clearable && item.hasValue && item.visible));
|
|
3505
|
+
}
|
|
3452
3506
|
_initHasSecondaryValue() {
|
|
3453
3507
|
this._hasSecondaryValue$.next(this.hasSecondaryValue);
|
|
3454
3508
|
this._filterController.change$
|
|
@@ -3458,7 +3512,7 @@ class FsFilterChipsComponent {
|
|
|
3458
3512
|
.subscribe();
|
|
3459
3513
|
}
|
|
3460
3514
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FsFilterChipsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3461
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FsFilterChipsComponent, isStandalone: true, selector: "fs-filter-chips", viewQueries: [{ propertyName: "chips", predicate: FsChipComponent, descendants: true }], ngImport: i0, template: "@if (items.length !== 0) {\n @for (item of secondaryItems; track item.name) {\n @if ((item.visible$ | async)
|
|
3515
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FsFilterChipsComponent, isStandalone: true, selector: "fs-filter-chips", viewQueries: [{ propertyName: "chips", predicate: FsChipComponent, descendants: true }], ngImport: i0, template: "@if (items.length !== 0) {\n @for (item of secondaryItems; track item.name) {\n @if ((item.visible$ | async)) {\n @if ((item.hasValue$ | async)) {\n @for (chip of item.chips$ | async; track chip.label) {\n <fs-chip\n class=\"filter-chip selected\"\n [size]=\"'medium'\"\n [borderColor]=\"'#ddd'\"\n [attr.data-filter-item]=\"item.name\"\n [outlined]=\"true\"\n (click)=\"openChip(item, chip.name)\">\n @if (chip.value) {\n {{ chip.label }}:\n <a>\n {{ chip.value }}\n </a>\n } @else {\n {{ chip.label }}\n }\n <ng-template\n fsChipSuffix\n [icon]=\"'cancel_circle_outline'\"\n (click)=\"removeChip(item, chip)\">\n </ng-template>\n </fs-chip>\n }\n }\n @if ((item.notValue$ | async) && (item.secondaryVisible$ | async)) {\n <fs-chip\n class=\"filter-chip\"\n [attr.data-filter-item]=\"item.name\"\n [size]=\"'medium'\"\n [borderColor]=\"'#ddd'\"\n (click)=\"openChip(item)\"\n [outlined]=\"true\">\n {{ item.mergedLabel }}\n <ng-template\n fsChipSuffix\n [icon]=\"'cancel_circle_outline'\"\n (click)=\"removeItem(item)\">\n </ng-template>\n </fs-chip>\n }\n }\n }\n @if (moreFilterItems().length > 0) {\n <mat-select\n class=\"more-filters-select mat-mdc-button-base\"\n [buttonType]=\"'basic'\"\n fsSelectButton\n [disableOptionCentering]=\"true\"\n [panelClass]=\"'fs-filter-no-initial-focus'\"\n [placeholder]=\"'More filters'\"\n (selectionChange)=\"addFilter($event)\"\n [deselectOnChange]=\"true\">\n @for (item of moreFilterItems(); track item.name) {\n <mat-option [value]=\"item\">\n {{ item.mergedLabel }}\n </mat-option>\n }\n </mat-select>\n }\n @if (savedFilterController.enabled) {\n <mat-select\n class=\"saved-filters-select mat-mdc-button-base\"\n [buttonType]=\"'basic'\"\n fsSelectButton\n [placeholder]=\"(savedFilterController.activeFilter$ | async) ? savedFilterController.singularLabel + ': ' + (savedFilterController.activeFilter$ | async).name : savedFilterController.pluralLabel\"\n [deselectOnChange]=\"true\">\n @if (savedFilterController.activeFilter$ | async) {\n <mat-option (click)=\"saveActiveFilter()\">\n Update filters\n </mat-option>\n <mat-option (click)=\"saveAs()\">\n Save as new\n </mat-option>\n } @else {\n <mat-option (click)=\"createSavedFilter()\">\n Create new\n </mat-option>\n }\n <mat-option (click)=\"manageSavedFilters()\">\n View all\n </mat-option>\n </mat-select>\n }\n @if (clearFiltersVisible()) {\n <a\n class=\"clear\"\n mat-button\n color=\"primary\"\n (click)=\"clear()\">\n Clear filters\n </a>\n }\n}", styles: [":host{display:flex;flex-wrap:wrap;align-items:center;gap:5px;max-width:100%;margin-top:4px;z-index:999}.saved-filters-select,.more-filters-select,.clear{display:flex;height:30px;font-size:90%}.saved-filters-select.clear,.more-filters-select.clear,.clear.clear{padding:0 10px}.saved-filters-select ::ng-deep .mat-mdc-select-value,.more-filters-select ::ng-deep .mat-mdc-select-value,.clear ::ng-deep .mat-mdc-select-value{padding:0 5px}.saved-filters-select ::ng-deep .mat-mdc-select-arrow-wrapper,.more-filters-select ::ng-deep .mat-mdc-select-arrow-wrapper,.clear ::ng-deep .mat-mdc-select-arrow-wrapper{padding-right:10px}::ng-deep .mat-mdc-select-panel.fs-filter-no-initial-focus .mat-mdc-option-active:not(:hover){background:transparent!important}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: FsChipModule }, { kind: "component", type: i1$5.FsChipComponent, selector: "fs-chip", inputs: ["selectable", "removable", "value", "maxWidth", "width", "backgroundColor", "borderColor", "color", "shape", "outlined", "outlineDash", "icon", "image", "selected", "padding", "contrastColor", "size"], outputs: ["selectedToggled", "removed", "click"] }, { kind: "directive", type: i1$5.FsChipSuffixDirective, selector: "[fsChipSuffix]", inputs: ["icon", "link", "linkTarget", "color", "data", "tooltip"], outputs: ["click"] }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption$1, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FsSelectButtonModule }, { kind: "directive", type: i3$1.FsSelectButtonDirective, selector: "[fsSelectButton]", inputs: ["color", "minWidth", "maxWidth", "width", "buttonType", "deselectOnChange"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$3.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit"] }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3462
3516
|
}
|
|
3463
3517
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FsFilterChipsComponent, decorators: [{
|
|
3464
3518
|
type: Component,
|
|
@@ -3471,7 +3525,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3471
3525
|
MatButtonModule,
|
|
3472
3526
|
FsButtonDirective,
|
|
3473
3527
|
FormsModule,
|
|
3474
|
-
], template: "@if (items.length !== 0) {\n @for (item of secondaryItems; track item.name) {\n @if ((item.visible$ | async)
|
|
3528
|
+
], template: "@if (items.length !== 0) {\n @for (item of secondaryItems; track item.name) {\n @if ((item.visible$ | async)) {\n @if ((item.hasValue$ | async)) {\n @for (chip of item.chips$ | async; track chip.label) {\n <fs-chip\n class=\"filter-chip selected\"\n [size]=\"'medium'\"\n [borderColor]=\"'#ddd'\"\n [attr.data-filter-item]=\"item.name\"\n [outlined]=\"true\"\n (click)=\"openChip(item, chip.name)\">\n @if (chip.value) {\n {{ chip.label }}:\n <a>\n {{ chip.value }}\n </a>\n } @else {\n {{ chip.label }}\n }\n <ng-template\n fsChipSuffix\n [icon]=\"'cancel_circle_outline'\"\n (click)=\"removeChip(item, chip)\">\n </ng-template>\n </fs-chip>\n }\n }\n @if ((item.notValue$ | async) && (item.secondaryVisible$ | async)) {\n <fs-chip\n class=\"filter-chip\"\n [attr.data-filter-item]=\"item.name\"\n [size]=\"'medium'\"\n [borderColor]=\"'#ddd'\"\n (click)=\"openChip(item)\"\n [outlined]=\"true\">\n {{ item.mergedLabel }}\n <ng-template\n fsChipSuffix\n [icon]=\"'cancel_circle_outline'\"\n (click)=\"removeItem(item)\">\n </ng-template>\n </fs-chip>\n }\n }\n }\n @if (moreFilterItems().length > 0) {\n <mat-select\n class=\"more-filters-select mat-mdc-button-base\"\n [buttonType]=\"'basic'\"\n fsSelectButton\n [disableOptionCentering]=\"true\"\n [panelClass]=\"'fs-filter-no-initial-focus'\"\n [placeholder]=\"'More filters'\"\n (selectionChange)=\"addFilter($event)\"\n [deselectOnChange]=\"true\">\n @for (item of moreFilterItems(); track item.name) {\n <mat-option [value]=\"item\">\n {{ item.mergedLabel }}\n </mat-option>\n }\n </mat-select>\n }\n @if (savedFilterController.enabled) {\n <mat-select\n class=\"saved-filters-select mat-mdc-button-base\"\n [buttonType]=\"'basic'\"\n fsSelectButton\n [placeholder]=\"(savedFilterController.activeFilter$ | async) ? savedFilterController.singularLabel + ': ' + (savedFilterController.activeFilter$ | async).name : savedFilterController.pluralLabel\"\n [deselectOnChange]=\"true\">\n @if (savedFilterController.activeFilter$ | async) {\n <mat-option (click)=\"saveActiveFilter()\">\n Update filters\n </mat-option>\n <mat-option (click)=\"saveAs()\">\n Save as new\n </mat-option>\n } @else {\n <mat-option (click)=\"createSavedFilter()\">\n Create new\n </mat-option>\n }\n <mat-option (click)=\"manageSavedFilters()\">\n View all\n </mat-option>\n </mat-select>\n }\n @if (clearFiltersVisible()) {\n <a\n class=\"clear\"\n mat-button\n color=\"primary\"\n (click)=\"clear()\">\n Clear filters\n </a>\n }\n}", styles: [":host{display:flex;flex-wrap:wrap;align-items:center;gap:5px;max-width:100%;margin-top:4px;z-index:999}.saved-filters-select,.more-filters-select,.clear{display:flex;height:30px;font-size:90%}.saved-filters-select.clear,.more-filters-select.clear,.clear.clear{padding:0 10px}.saved-filters-select ::ng-deep .mat-mdc-select-value,.more-filters-select ::ng-deep .mat-mdc-select-value,.clear ::ng-deep .mat-mdc-select-value{padding:0 5px}.saved-filters-select ::ng-deep .mat-mdc-select-arrow-wrapper,.more-filters-select ::ng-deep .mat-mdc-select-arrow-wrapper,.clear ::ng-deep .mat-mdc-select-arrow-wrapper{padding-right:10px}::ng-deep .mat-mdc-select-panel.fs-filter-no-initial-focus .mat-mdc-option-active:not(:hover){background:transparent!important}\n"] }]
|
|
3475
3529
|
}], propDecorators: { chips: [{
|
|
3476
3530
|
type: ViewChildren,
|
|
3477
3531
|
args: [FsChipComponent]
|
|
@@ -3541,7 +3595,7 @@ class KeywordInputComponent {
|
|
|
3541
3595
|
});
|
|
3542
3596
|
}
|
|
3543
3597
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KeywordInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3544
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: KeywordInputComponent, isStandalone: true, selector: "fs-keyword-input", inputs: { autofocus: "autofocus" }, viewQueries: [{ propertyName: "keywordMatInput", first: true, predicate: ["keywordMatInput"], descendants: true, read: MatInput }], ngImport: i0, template: "@if (keywordVisible$ | async) {\n <mat-form-field\n class=\"search-form-field form-field-padless\"\n [ngClass]=\"{ 'has-keyword': !!keyword }\">\n <span\n matPrefix\n class=\"icon\">\n <mat-icon matPrefix>\n search\n </mat-icon>\n </span>\n <input\n #keywordMatInput\n matInput\n [(ngModel)]=\"keyword\"\n (ngModelChange)=\"keywordChange($event)\"\n name=\"filter-input\"\n [fsClear]=\"true\"\n [placeholder]=\"searchPlaceholder\">\n </mat-form-field>\n}", styles: [".search-form-field{max-width:100%;width:250px;margin-top:0}.search-form-field .icon{margin-left:10px;color:#626262}.search-form-field ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}\n"], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: 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: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: FsFormModule }, { kind: "directive", type: i3.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "ngmodule", type: FsClearModule }, { kind: "component", type: i3$
|
|
3598
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: KeywordInputComponent, isStandalone: true, selector: "fs-keyword-input", inputs: { autofocus: "autofocus" }, viewQueries: [{ propertyName: "keywordMatInput", first: true, predicate: ["keywordMatInput"], descendants: true, read: MatInput }], ngImport: i0, template: "@if (keywordVisible$ | async) {\n <mat-form-field\n class=\"search-form-field form-field-padless\"\n [ngClass]=\"{ 'has-keyword': !!keyword }\">\n <span\n matPrefix\n class=\"icon\">\n <mat-icon matPrefix>\n search\n </mat-icon>\n </span>\n <input\n #keywordMatInput\n matInput\n [(ngModel)]=\"keyword\"\n (ngModelChange)=\"keywordChange($event)\"\n name=\"filter-input\"\n [fsClear]=\"true\"\n [placeholder]=\"searchPlaceholder\">\n </mat-form-field>\n}", styles: [".search-form-field{max-width:100%;width:250px;margin-top:0}.search-form-field .icon{margin-left:10px;color:#626262}.search-form-field ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}\n"], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: 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: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: FsFormModule }, { kind: "directive", type: i3.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "ngmodule", type: FsClearModule }, { kind: "component", type: i3$4.FsClearComponent, selector: "[fsClear]", inputs: ["ngModel", "visible", "fsClear"], outputs: ["ngModelChange", "cleared"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3545
3599
|
}
|
|
3546
3600
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KeywordInputComponent, decorators: [{
|
|
3547
3601
|
type: Component,
|
|
@@ -3579,8 +3633,6 @@ class FilterComponent {
|
|
|
3579
3633
|
fsFilterClass = true;
|
|
3580
3634
|
_config;
|
|
3581
3635
|
_filterConfig;
|
|
3582
|
-
_filtersVisible$ = new BehaviorSubject(true);
|
|
3583
|
-
_hasFilterChips$ = new BehaviorSubject(false);
|
|
3584
3636
|
_destroy$ = new Subject();
|
|
3585
3637
|
_defaultConfig = inject(FS_FILTER_CONFIG, { optional: true });
|
|
3586
3638
|
_zone = inject(NgZone);
|
|
@@ -3678,19 +3730,6 @@ class FilterComponent {
|
|
|
3678
3730
|
get hasHeading() {
|
|
3679
3731
|
return !!this.headingTemplate || !!this.config.heading;
|
|
3680
3732
|
}
|
|
3681
|
-
get hasFilterChips$() {
|
|
3682
|
-
return this._hasFilterChips$.asObservable();
|
|
3683
|
-
}
|
|
3684
|
-
get filtersVisible$() {
|
|
3685
|
-
return combineLatest({
|
|
3686
|
-
filtersVisible: this._filtersVisible$.asObservable(),
|
|
3687
|
-
hasVisibleItems: of(this.items
|
|
3688
|
-
.some((item) => item.visible && !item.isTypeKeyword)),
|
|
3689
|
-
})
|
|
3690
|
-
.pipe(map(({ filtersVisible, hasVisibleItems }) => {
|
|
3691
|
-
return filtersVisible && hasVisibleItems;
|
|
3692
|
-
}));
|
|
3693
|
-
}
|
|
3694
3733
|
get keywordVisible$() {
|
|
3695
3734
|
return this._keywordController.keywordVisible$;
|
|
3696
3735
|
}
|
|
@@ -3824,18 +3863,6 @@ class FilterComponent {
|
|
|
3824
3863
|
updateActions(actions) {
|
|
3825
3864
|
this._actionsController.initActions(actions);
|
|
3826
3865
|
}
|
|
3827
|
-
/**
|
|
3828
|
-
* Show "Filters" button
|
|
3829
|
-
*/
|
|
3830
|
-
showFilters() {
|
|
3831
|
-
this._filtersVisible$.next(true);
|
|
3832
|
-
}
|
|
3833
|
-
/**
|
|
3834
|
-
* Hide "Filters" button
|
|
3835
|
-
*/
|
|
3836
|
-
hideFilters() {
|
|
3837
|
-
this._filtersVisible$.next(false);
|
|
3838
|
-
}
|
|
3839
3866
|
/**
|
|
3840
3867
|
* Show "Keyword" field if it present
|
|
3841
3868
|
*/
|
|
@@ -3896,7 +3923,7 @@ class FilterComponent {
|
|
|
3896
3923
|
ActionsController,
|
|
3897
3924
|
KeywordController,
|
|
3898
3925
|
SortController,
|
|
3899
|
-
], queries: [{ propertyName: "statusBar", first: true, predicate: FilterStatusBarDirective, descendants: true }, { propertyName: "headingTemplate", first: true, predicate: FilterHeadingDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "keywordInput", first: true, predicate: KeywordInputComponent, descendants: true }, { propertyName: "reloadEl", first: true, predicate: ["reloadEl"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n class=\"filter-container\"\n [ngClass]=\"{ 'has-primary-filter': primaryFilterVisible$ | async }\"\n [ngClass]=\"{ 'keyword-full-width': keywordFullWidth$ | async }\">\n @if (primaryFilterVisible$ | async) {\n <ng-container *ngTemplateOutlet=\"headingTmpl\"></ng-container>\n }\n <div class=\"filter-bar-container\">\n @if (primaryFilterVisible$ | async) {\n <div class=\"filter-input-container\">\n @if (keywordVisible$ | async) {\n <fs-keyword-input [autofocus]=\"config.autofocus\"></fs-keyword-input>\n }\n @for (item of primaryItems; track item.name) {\n @if (item.visible$ | async) {\n <filter-item\n [item]=\"item\"\n [triggerChangeOn]=\"'change'\">\n </filter-item>\n }\n }\n </div>\n } @else if (hasHeading) {\n <div class=\"filter-heading-container\">\n <ng-container *ngTemplateOutlet=\"headingTmpl\"></ng-container>\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"chipsTmpl\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"filterActionsTmpl\"></ng-container>\n </div>\n @if ((primaryFilterVisible$ | async) === true || hasHeading) {\n <ng-container\n [ngTemplateOutlet]=\"chipsTmpl\"\n [ngTemplateOutletContext]=\"{ topMargin: true }\">\n </ng-container>\n }\n <ng-container *ngTemplateOutlet=\"statusBarTmpl\"></ng-container>\n</div>\n<ng-template\n #chipsTmpl\n let-topMargin=\"topMargin\">\n <fs-filter-chips\n class=\"filter-chips\"\n [ngClass]=\"{ 'top-margin': topMargin }\">\n </fs-filter-chips>\n</ng-template>\n<ng-template #statusBarTmpl>\n @if (statusBar) {\n <div\n class=\"filter-status-container\"\n [ngClass]=\"{ 'has-status': !!filterStatus.textContent }\">\n <div\n class=\"filter-status\"\n #filterStatus>\n <ng-container *ngTemplateOutlet=\"statusBar.templateRef\"></ng-container>\n </div>\n </div>\n }\n</ng-template>\n<ng-template #filterActionsTmpl>\n @if ((actionsVisible$ | async)) {\n <div class=\"filter-actions\">\n <ng-container [ngTemplateOutlet]=\"filterToolbarTmpl\"></ng-container>\n <fs-filter-actions\n [actions]=\"actions$ | async\"\n [kebabActions]=\"menuActions$ | async\">\n </fs-filter-actions>\n </div>\n }\n</ng-template>\n<ng-template #filterToolbarTmpl>\n @if (config.reload || config.autoReload
|
|
3926
|
+
], queries: [{ propertyName: "statusBar", first: true, predicate: FilterStatusBarDirective, descendants: true }, { propertyName: "headingTemplate", first: true, predicate: FilterHeadingDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "keywordInput", first: true, predicate: KeywordInputComponent, descendants: true }, { propertyName: "reloadEl", first: true, predicate: ["reloadEl"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n class=\"filter-container\"\n [ngClass]=\"{ 'has-primary-filter': primaryFilterVisible$ | async }\"\n [ngClass]=\"{ 'keyword-full-width': keywordFullWidth$ | async }\">\n @if (primaryFilterVisible$ | async) {\n <ng-container *ngTemplateOutlet=\"headingTmpl\"></ng-container>\n }\n <div class=\"filter-bar-container\">\n @if (primaryFilterVisible$ | async) {\n <div class=\"filter-input-container\">\n @if (keywordVisible$ | async) {\n <fs-keyword-input [autofocus]=\"config.autofocus\"></fs-keyword-input>\n }\n @for (item of primaryItems; track item.name) {\n @if (item.visible$ | async) {\n <filter-item\n [item]=\"item\"\n [triggerChangeOn]=\"'change'\">\n </filter-item>\n }\n }\n </div>\n } @else if (hasHeading) {\n <div class=\"filter-heading-container\">\n <ng-container *ngTemplateOutlet=\"headingTmpl\"></ng-container>\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"chipsTmpl\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"filterActionsTmpl\"></ng-container>\n </div>\n @if ((primaryFilterVisible$ | async) === true || hasHeading) {\n <ng-container\n [ngTemplateOutlet]=\"chipsTmpl\"\n [ngTemplateOutletContext]=\"{ topMargin: true }\">\n </ng-container>\n }\n <ng-container *ngTemplateOutlet=\"statusBarTmpl\"></ng-container>\n</div>\n<ng-template\n #chipsTmpl\n let-topMargin=\"topMargin\">\n <fs-filter-chips\n class=\"filter-chips\"\n [ngClass]=\"{ 'top-margin': topMargin }\">\n </fs-filter-chips>\n</ng-template>\n<ng-template #statusBarTmpl>\n @if (statusBar) {\n <div\n class=\"filter-status-container\"\n [ngClass]=\"{ 'has-status': !!filterStatus.textContent }\">\n <div\n class=\"filter-status\"\n #filterStatus>\n <ng-container *ngTemplateOutlet=\"statusBar.templateRef\"></ng-container>\n </div>\n </div>\n }\n</ng-template>\n<ng-template #filterActionsTmpl>\n @if ((actionsVisible$ | async)) {\n <div class=\"filter-actions\">\n <ng-container [ngTemplateOutlet]=\"filterToolbarTmpl\"></ng-container>\n <fs-filter-actions\n [actions]=\"actions$ | async\"\n [kebabActions]=\"menuActions$ | async\">\n </fs-filter-actions>\n </div>\n }\n</ng-template>\n<ng-template #filterToolbarTmpl>\n @if (config.reload || config.autoReload) {\n <div class=\"filter-toolbar\">\n @if (config.reload) {\n <a\n mat-icon-button\n (click)=\"reload($event)\"\n class=\"button-reload\">\n <mat-icon #reloadEl>\n refresh\n </mat-icon>\n </a>\n }\n @if (config.autoReload) {\n <div class=\"filter-reload\">\n <mat-slide-toggle\n name=\"autoReload\"\n class=\"auto-reload\"\n [ngModel]=\"config.autoReload.enabled\"\n (ngModelChange)=\"config.autoReload.enabled = $event\">\n <span>\n Auto refresh\n </span>\n </mat-slide-toggle>\n </div>\n }\n </div>\n }\n</ng-template>\n<ng-template #headingTmpl>\n @if (headingTemplate) {\n <ng-container *ngTemplateOutlet=\"headingTemplate\"></ng-container>\n } @else if (config.heading) {\n <div class=\"heading\">\n <h2>\n {{ config.heading }}\n </h2>\n <div class=\"subheading\">\n {{ config.subheading }}\n </div>\n </div>\n }\n</ng-template>", styles: [":host{margin-bottom:20px;display:block}.filter-status-container{flex-grow:1;display:flex;justify-content:center;flex-direction:column;align-self:flex-end;margin-top:4px}.filter-status-container .filter-status{overflow:hidden;text-overflow:ellipsis}.filter-container{width:100%}.filter-container.has-primary-filter .heading{margin-bottom:10px}.filter-container.has-primary-filter .filter-bar-container{margin-bottom:4px}.filter-container.keyword-full-width .filter-input-container{flex:1}.filter-container.keyword-full-width .filter-input-container fs-keyword-input{flex:1}.filter-container.keyword-full-width .filter-input-container fs-keyword-input ::ng-deep mat-form-field{width:100%}.filter-container .filter-bar-container{flex-direction:row;box-sizing:border-box;display:flex;position:relative;align-items:flex-start}.filter-container .filter-bar-container .filter-input-container{flex-direction:row;box-sizing:border-box;display:flex;align-items:center;min-width:0;column-gap:5px;row-gap:10px;flex-wrap:wrap}.filter-container .filter-bar-container .filter-heading-container{flex-direction:row;box-sizing:border-box;display:flex;align-items:center;min-width:0}.filter-container .filter-bar-container .filter-heading-container fs-keyword-input+fs-saved-filter-autocomplete-chips{margin-left:5px}.filter-actions{display:flex;align-items:center;flex:1;justify-content:flex-end}.filter-toolbar{white-space:nowrap;display:flex;align-items:center}.filter-toolbar .button-filters,.filter-toolbar .button-reload{display:flex;--mdc-icon-button-state-layer-size: 40px;padding:8px}.filter-toolbar .button-filters ::ng-deep svg,.filter-toolbar .button-reload ::ng-deep svg{display:flex}.filter-toolbar .button-reload{display:flex;align-items:center}.filter-toolbar .button-reload .auto-reload{margin-right:5px}.filter-toolbar .button-reload .auto-reload span{font-size:80%}.heading{margin-right:8px}.heading h2{margin:0}.heading h2+.subheading{margin:0}@media screen and (min-width: 1200px){html.fs-filter-open body{margin-right:350px}}html.fs-filter-open{scrollbar-width:none}:host ::ng-deep .auto-reload.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(12px,0,0)}:host ::ng-deep .auto-reload:not(.mat-checked) .mat-slide-toggle-content{color:#ccc}:host ::ng-deep .auto-reload .mat-slide-toggle-thumb,:host ::ng-deep .auto-reload .mat-slide-toggle-thumb-container{height:15px;width:15px}:host ::ng-deep .auto-reload .mat-slide-toggle-content{font-size:90%}:host ::ng-deep .auto-reload .mat-slide-toggle-bar{width:26px;height:10px;border-radius:10px}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: FilterItemComponent, selector: "filter-item", inputs: ["autofocus", "floatLabel", "autofocusName", "overlayRef", "item", "name", "triggerChangeOn"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: FsFormModule }, { kind: "directive", type: i3.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "ngmodule", type: FsClearModule }, { kind: "component", type: FsFilterChipsComponent, selector: "fs-filter-chips" }, { kind: "component", type: FsFilterActionsComponent, selector: "fs-filter-actions", inputs: ["kebabActions", "actions"] }, { kind: "component", type: MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: KeywordInputComponent, selector: "fs-keyword-input", inputs: ["autofocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3900
3927
|
}
|
|
3901
3928
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FilterComponent, decorators: [{
|
|
3902
3929
|
type: Component,
|
|
@@ -3923,7 +3950,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3923
3950
|
MatSlideToggle,
|
|
3924
3951
|
AsyncPipe,
|
|
3925
3952
|
KeywordInputComponent,
|
|
3926
|
-
], template: "<div\n class=\"filter-container\"\n [ngClass]=\"{ 'has-primary-filter': primaryFilterVisible$ | async }\"\n [ngClass]=\"{ 'keyword-full-width': keywordFullWidth$ | async }\">\n @if (primaryFilterVisible$ | async) {\n <ng-container *ngTemplateOutlet=\"headingTmpl\"></ng-container>\n }\n <div class=\"filter-bar-container\">\n @if (primaryFilterVisible$ | async) {\n <div class=\"filter-input-container\">\n @if (keywordVisible$ | async) {\n <fs-keyword-input [autofocus]=\"config.autofocus\"></fs-keyword-input>\n }\n @for (item of primaryItems; track item.name) {\n @if (item.visible$ | async) {\n <filter-item\n [item]=\"item\"\n [triggerChangeOn]=\"'change'\">\n </filter-item>\n }\n }\n </div>\n } @else if (hasHeading) {\n <div class=\"filter-heading-container\">\n <ng-container *ngTemplateOutlet=\"headingTmpl\"></ng-container>\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"chipsTmpl\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"filterActionsTmpl\"></ng-container>\n </div>\n @if ((primaryFilterVisible$ | async) === true || hasHeading) {\n <ng-container\n [ngTemplateOutlet]=\"chipsTmpl\"\n [ngTemplateOutletContext]=\"{ topMargin: true }\">\n </ng-container>\n }\n <ng-container *ngTemplateOutlet=\"statusBarTmpl\"></ng-container>\n</div>\n<ng-template\n #chipsTmpl\n let-topMargin=\"topMargin\">\n <fs-filter-chips\n class=\"filter-chips\"\n [ngClass]=\"{ 'top-margin': topMargin }\">\n </fs-filter-chips>\n</ng-template>\n<ng-template #statusBarTmpl>\n @if (statusBar) {\n <div\n class=\"filter-status-container\"\n [ngClass]=\"{ 'has-status': !!filterStatus.textContent }\">\n <div\n class=\"filter-status\"\n #filterStatus>\n <ng-container *ngTemplateOutlet=\"statusBar.templateRef\"></ng-container>\n </div>\n </div>\n }\n</ng-template>\n<ng-template #filterActionsTmpl>\n @if ((actionsVisible$ | async)) {\n <div class=\"filter-actions\">\n <ng-container [ngTemplateOutlet]=\"filterToolbarTmpl\"></ng-container>\n <fs-filter-actions\n [actions]=\"actions$ | async\"\n [kebabActions]=\"menuActions$ | async\">\n </fs-filter-actions>\n </div>\n }\n</ng-template>\n<ng-template #filterToolbarTmpl>\n @if (config.reload || config.autoReload
|
|
3953
|
+
], template: "<div\n class=\"filter-container\"\n [ngClass]=\"{ 'has-primary-filter': primaryFilterVisible$ | async }\"\n [ngClass]=\"{ 'keyword-full-width': keywordFullWidth$ | async }\">\n @if (primaryFilterVisible$ | async) {\n <ng-container *ngTemplateOutlet=\"headingTmpl\"></ng-container>\n }\n <div class=\"filter-bar-container\">\n @if (primaryFilterVisible$ | async) {\n <div class=\"filter-input-container\">\n @if (keywordVisible$ | async) {\n <fs-keyword-input [autofocus]=\"config.autofocus\"></fs-keyword-input>\n }\n @for (item of primaryItems; track item.name) {\n @if (item.visible$ | async) {\n <filter-item\n [item]=\"item\"\n [triggerChangeOn]=\"'change'\">\n </filter-item>\n }\n }\n </div>\n } @else if (hasHeading) {\n <div class=\"filter-heading-container\">\n <ng-container *ngTemplateOutlet=\"headingTmpl\"></ng-container>\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"chipsTmpl\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"filterActionsTmpl\"></ng-container>\n </div>\n @if ((primaryFilterVisible$ | async) === true || hasHeading) {\n <ng-container\n [ngTemplateOutlet]=\"chipsTmpl\"\n [ngTemplateOutletContext]=\"{ topMargin: true }\">\n </ng-container>\n }\n <ng-container *ngTemplateOutlet=\"statusBarTmpl\"></ng-container>\n</div>\n<ng-template\n #chipsTmpl\n let-topMargin=\"topMargin\">\n <fs-filter-chips\n class=\"filter-chips\"\n [ngClass]=\"{ 'top-margin': topMargin }\">\n </fs-filter-chips>\n</ng-template>\n<ng-template #statusBarTmpl>\n @if (statusBar) {\n <div\n class=\"filter-status-container\"\n [ngClass]=\"{ 'has-status': !!filterStatus.textContent }\">\n <div\n class=\"filter-status\"\n #filterStatus>\n <ng-container *ngTemplateOutlet=\"statusBar.templateRef\"></ng-container>\n </div>\n </div>\n }\n</ng-template>\n<ng-template #filterActionsTmpl>\n @if ((actionsVisible$ | async)) {\n <div class=\"filter-actions\">\n <ng-container [ngTemplateOutlet]=\"filterToolbarTmpl\"></ng-container>\n <fs-filter-actions\n [actions]=\"actions$ | async\"\n [kebabActions]=\"menuActions$ | async\">\n </fs-filter-actions>\n </div>\n }\n</ng-template>\n<ng-template #filterToolbarTmpl>\n @if (config.reload || config.autoReload) {\n <div class=\"filter-toolbar\">\n @if (config.reload) {\n <a\n mat-icon-button\n (click)=\"reload($event)\"\n class=\"button-reload\">\n <mat-icon #reloadEl>\n refresh\n </mat-icon>\n </a>\n }\n @if (config.autoReload) {\n <div class=\"filter-reload\">\n <mat-slide-toggle\n name=\"autoReload\"\n class=\"auto-reload\"\n [ngModel]=\"config.autoReload.enabled\"\n (ngModelChange)=\"config.autoReload.enabled = $event\">\n <span>\n Auto refresh\n </span>\n </mat-slide-toggle>\n </div>\n }\n </div>\n }\n</ng-template>\n<ng-template #headingTmpl>\n @if (headingTemplate) {\n <ng-container *ngTemplateOutlet=\"headingTemplate\"></ng-container>\n } @else if (config.heading) {\n <div class=\"heading\">\n <h2>\n {{ config.heading }}\n </h2>\n <div class=\"subheading\">\n {{ config.subheading }}\n </div>\n </div>\n }\n</ng-template>", styles: [":host{margin-bottom:20px;display:block}.filter-status-container{flex-grow:1;display:flex;justify-content:center;flex-direction:column;align-self:flex-end;margin-top:4px}.filter-status-container .filter-status{overflow:hidden;text-overflow:ellipsis}.filter-container{width:100%}.filter-container.has-primary-filter .heading{margin-bottom:10px}.filter-container.has-primary-filter .filter-bar-container{margin-bottom:4px}.filter-container.keyword-full-width .filter-input-container{flex:1}.filter-container.keyword-full-width .filter-input-container fs-keyword-input{flex:1}.filter-container.keyword-full-width .filter-input-container fs-keyword-input ::ng-deep mat-form-field{width:100%}.filter-container .filter-bar-container{flex-direction:row;box-sizing:border-box;display:flex;position:relative;align-items:flex-start}.filter-container .filter-bar-container .filter-input-container{flex-direction:row;box-sizing:border-box;display:flex;align-items:center;min-width:0;column-gap:5px;row-gap:10px;flex-wrap:wrap}.filter-container .filter-bar-container .filter-heading-container{flex-direction:row;box-sizing:border-box;display:flex;align-items:center;min-width:0}.filter-container .filter-bar-container .filter-heading-container fs-keyword-input+fs-saved-filter-autocomplete-chips{margin-left:5px}.filter-actions{display:flex;align-items:center;flex:1;justify-content:flex-end}.filter-toolbar{white-space:nowrap;display:flex;align-items:center}.filter-toolbar .button-filters,.filter-toolbar .button-reload{display:flex;--mdc-icon-button-state-layer-size: 40px;padding:8px}.filter-toolbar .button-filters ::ng-deep svg,.filter-toolbar .button-reload ::ng-deep svg{display:flex}.filter-toolbar .button-reload{display:flex;align-items:center}.filter-toolbar .button-reload .auto-reload{margin-right:5px}.filter-toolbar .button-reload .auto-reload span{font-size:80%}.heading{margin-right:8px}.heading h2{margin:0}.heading h2+.subheading{margin:0}@media screen and (min-width: 1200px){html.fs-filter-open body{margin-right:350px}}html.fs-filter-open{scrollbar-width:none}:host ::ng-deep .auto-reload.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(12px,0,0)}:host ::ng-deep .auto-reload:not(.mat-checked) .mat-slide-toggle-content{color:#ccc}:host ::ng-deep .auto-reload .mat-slide-toggle-thumb,:host ::ng-deep .auto-reload .mat-slide-toggle-thumb-container{height:15px;width:15px}:host ::ng-deep .auto-reload .mat-slide-toggle-content{font-size:90%}:host ::ng-deep .auto-reload .mat-slide-toggle-bar{width:26px;height:10px;border-radius:10px}\n"] }]
|
|
3927
3954
|
}], ctorParameters: () => [], propDecorators: { keywordInput: [{
|
|
3928
3955
|
type: ViewChild,
|
|
3929
3956
|
args: [KeywordInputComponent]
|