@firestitch/filter 18.2.15 → 18.2.16
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 -1
- package/app/components/filters-item/week/week.component.d.ts +0 -1
- package/app/helpers/create-filter-item.d.ts +1 -1
- package/app/interfaces/config.interface.d.ts +2 -1
- package/app/models/items/autocomplete-chips-item.d.ts +1 -2
- package/app/models/items/base-date-item.d.ts +1 -2
- package/app/models/items/base-date-range-item.d.ts +1 -2
- package/app/models/items/base-item.d.ts +4 -1
- package/app/models/items/chips-item.d.ts +1 -2
- package/app/models/items/range-item.d.ts +4 -8
- package/app/models/items/select-item.d.ts +1 -2
- package/app/models/items/week-item.d.ts +1 -2
- package/app/services/filter-controller.service.d.ts +0 -2
- package/esm2022/app/components/filter/filter.component.mjs +4 -7
- package/esm2022/app/components/filter-chips/filter-chips.component.mjs +3 -3
- package/esm2022/app/components/filters-item/checkbox/checkbox.component.mjs +2 -2
- package/esm2022/app/components/filters-item/week/week.component.mjs +3 -6
- package/esm2022/app/interfaces/config.interface.mjs +1 -1
- package/esm2022/app/models/filter-config.mjs +5 -2
- package/esm2022/app/models/items/autocomplete-chips-item.mjs +3 -6
- package/esm2022/app/models/items/base-date-item.mjs +3 -6
- package/esm2022/app/models/items/base-date-range-item.mjs +3 -6
- package/esm2022/app/models/items/base-item.mjs +10 -9
- package/esm2022/app/models/items/chips-item.mjs +3 -6
- package/esm2022/app/models/items/range-item.mjs +7 -10
- package/esm2022/app/models/items/select-item.mjs +7 -7
- package/esm2022/app/models/items/week-item.mjs +3 -40
- package/esm2022/app/services/filter-controller.service.mjs +11 -21
- package/esm2022/app/services/saved-filter-controller.service.mjs +8 -7
- package/fesm2022/firestitch-filter.mjs +67 -127
- package/fesm2022/firestitch-filter.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Injectable, Component, ChangeDetectionStrategy, Input, DestroyRef, Injector, EventEmitter, Output, InjectionToken, Directive, Optional, Self, ChangeDetectorRef, ViewChild, NgZone, ElementRef, ContentChild, HostBinding, Pipe, HostListener, NgModule } from '@angular/core';
|
|
3
3
|
import { FsPrompt } from '@firestitch/prompt';
|
|
4
|
-
import { BehaviorSubject, Subject, of, forkJoin, Observable, tap as tap$1, switchMap as switchMap$1, distinctUntilChanged as distinctUntilChanged$1, merge, filter
|
|
5
|
-
import { distinctUntilChanged, tap, switchMap, map,
|
|
4
|
+
import { BehaviorSubject, Subject, of, forkJoin, Observable, tap as tap$1, switchMap as switchMap$1, distinctUntilChanged as distinctUntilChanged$1, merge, filter, map as map$1, combineLatest, fromEvent, interval, takeUntil as takeUntil$1, debounceTime as debounceTime$1 } from 'rxjs';
|
|
5
|
+
import { distinctUntilChanged, tap, switchMap, map, debounceTime, finalize, takeUntil, filter as filter$1, delay, skip } from 'rxjs/operators';
|
|
6
6
|
import { FsStore } from '@firestitch/store';
|
|
7
7
|
import { NgSwitch, NgSwitchCase, NgClass, NgTemplateOutlet, NgSwitchDefault, NgIf, AsyncPipe, Location } from '@angular/common';
|
|
8
8
|
import { MatIconButton, MatFabButton, MatMiniFabButton, MatButton, MatIconAnchor } from '@angular/material/button';
|
|
@@ -24,15 +24,15 @@ import * as i6 from '@firestitch/file';
|
|
|
24
24
|
import { FsFileModule } from '@firestitch/file';
|
|
25
25
|
import * as i1$2 from '@firestitch/chip';
|
|
26
26
|
import { FsChipModule } from '@firestitch/chip';
|
|
27
|
-
import { isFunction, clone, toString, isObject
|
|
27
|
+
import { isFunction, clone, toString, isObject } from 'lodash-es';
|
|
28
28
|
import { iso8601, format } from '@firestitch/date';
|
|
29
29
|
import { isDate, isValid, parseISO } from 'date-fns';
|
|
30
|
-
import { isEmpty, getNormalizedPath } from '@firestitch/common';
|
|
31
30
|
import * as i3$2 from '@firestitch/datepicker';
|
|
32
31
|
import { formatPeriodObject, FsDatePickerModule } from '@firestitch/datepicker';
|
|
33
32
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
34
33
|
import * as i1$5 from '@angular/material/dialog';
|
|
35
34
|
import { MatDialogRef, MatDialogModule, MatDialog } from '@angular/material/dialog';
|
|
35
|
+
import { getNormalizedPath } from '@firestitch/common';
|
|
36
36
|
import { DrawerRef } from '@firestitch/drawer';
|
|
37
37
|
import { ActivatedRoute } from '@angular/router';
|
|
38
38
|
import { FsMessage } from '@firestitch/message';
|
|
@@ -166,7 +166,8 @@ class SavedFilterController {
|
|
|
166
166
|
};
|
|
167
167
|
}, {}),
|
|
168
168
|
};
|
|
169
|
-
return this._filterController.config.savedFilters
|
|
169
|
+
return this._filterController.config.savedFilters
|
|
170
|
+
.save(savedFilter)
|
|
170
171
|
.pipe(tap((_savedFilter) => {
|
|
171
172
|
this.savedFilters = this.activeFilter?.id ? this.savedFilters
|
|
172
173
|
.map((f) => f.id === savedFilter.id ? _savedFilter : f) : [
|
|
@@ -180,7 +181,8 @@ class SavedFilterController {
|
|
|
180
181
|
return !!this._filterController.config.savedFilters.order;
|
|
181
182
|
}
|
|
182
183
|
order(savedFilters) {
|
|
183
|
-
return this._filterController.config.savedFilters
|
|
184
|
+
return this._filterController.config.savedFilters
|
|
185
|
+
.order(savedFilters)
|
|
184
186
|
.pipe(tap(() => {
|
|
185
187
|
this.savedFilters = [
|
|
186
188
|
...savedFilters,
|
|
@@ -188,7 +190,8 @@ class SavedFilterController {
|
|
|
188
190
|
}));
|
|
189
191
|
}
|
|
190
192
|
delete(savedFilter) {
|
|
191
|
-
return this._filterController.config.savedFilters
|
|
193
|
+
return this._filterController.config.savedFilters
|
|
194
|
+
.delete(savedFilter)
|
|
192
195
|
.pipe(tap(() => {
|
|
193
196
|
this.savedFilters = this.savedFilters
|
|
194
197
|
.filter((f) => f.id !== savedFilter.id);
|
|
@@ -204,9 +207,7 @@ class SavedFilterController {
|
|
|
204
207
|
if (!existingFilter) {
|
|
205
208
|
throw new Error(`Saved filter cannot be activated, because it does not exists. Filter ID = ${savedFilter.id}`);
|
|
206
209
|
}
|
|
207
|
-
this._filterController.
|
|
208
|
-
this._filterController.values = existingFilter.filters;
|
|
209
|
-
});
|
|
210
|
+
this._filterController.values = existingFilter.filters;
|
|
210
211
|
this._activeFilter$.next(existingFilter);
|
|
211
212
|
}
|
|
212
213
|
else {
|
|
@@ -658,7 +659,6 @@ class BaseItem {
|
|
|
658
659
|
_value$ = new BehaviorSubject({ value: undefined, emitChange: true });
|
|
659
660
|
_values$ = new BehaviorSubject(null);
|
|
660
661
|
_destroy$ = new Subject();
|
|
661
|
-
_emitChange = true;
|
|
662
662
|
constructor(itemConfig, _additionalConfig, _filter) {
|
|
663
663
|
this._additionalConfig = _additionalConfig;
|
|
664
664
|
this._filter = _filter;
|
|
@@ -729,7 +729,7 @@ class BaseItem {
|
|
|
729
729
|
}
|
|
730
730
|
get chips$() {
|
|
731
731
|
return this.value$
|
|
732
|
-
.pipe(map(() => this.chips));
|
|
732
|
+
.pipe(map(() => this.chips || []));
|
|
733
733
|
}
|
|
734
734
|
set values(values) {
|
|
735
735
|
this._values$.next(values);
|
|
@@ -738,12 +738,14 @@ class BaseItem {
|
|
|
738
738
|
return this._values$.getValue();
|
|
739
739
|
}
|
|
740
740
|
get values$() {
|
|
741
|
-
return this._values$.asObservable()
|
|
742
|
-
|
|
741
|
+
return this._values$.asObservable();
|
|
742
|
+
}
|
|
743
|
+
get valueEvent$() {
|
|
744
|
+
return this._value$.asObservable();
|
|
743
745
|
}
|
|
744
746
|
get value$() {
|
|
745
747
|
return this._value$.asObservable()
|
|
746
|
-
.pipe(
|
|
748
|
+
.pipe(map((event) => event.value));
|
|
747
749
|
}
|
|
748
750
|
get value() {
|
|
749
751
|
return this._value$.getValue().value;
|
|
@@ -800,11 +802,11 @@ class BaseItem {
|
|
|
800
802
|
}), tap((values) => this.values = values || []));
|
|
801
803
|
}
|
|
802
804
|
initValue(value) {
|
|
803
|
-
this.value
|
|
805
|
+
this.setValue(value === undefined ? this.defaultValue : value);
|
|
804
806
|
}
|
|
805
807
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
806
808
|
clear(name = null) {
|
|
807
|
-
this.
|
|
809
|
+
this.setValue(this.defaultValue ?? undefined);
|
|
808
810
|
}
|
|
809
811
|
destroy() {
|
|
810
812
|
this._destroy$.next(null);
|
|
@@ -915,11 +917,8 @@ class AutocompleteChipsItem extends BaseAutocompleteItem {
|
|
|
915
917
|
get hasValue() {
|
|
916
918
|
return Array.isArray(super.value) && super.value.length > 0;
|
|
917
919
|
}
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
}
|
|
921
|
-
set value(value) {
|
|
922
|
-
super.value = value || [];
|
|
920
|
+
setValue(value, emitChange = true) {
|
|
921
|
+
super.setValue(Array.isArray(value) ? value : [], emitChange);
|
|
923
922
|
}
|
|
924
923
|
}
|
|
925
924
|
|
|
@@ -1058,11 +1057,8 @@ class ChipsItem extends BaseItem {
|
|
|
1058
1057
|
},
|
|
1059
1058
|
] : [];
|
|
1060
1059
|
}
|
|
1061
|
-
|
|
1062
|
-
super.
|
|
1063
|
-
}
|
|
1064
|
-
get value() {
|
|
1065
|
-
return super.value;
|
|
1060
|
+
setValue(value, emitChange = true) {
|
|
1061
|
+
super.setValue(Array.isArray(value) ? value : [], emitChange);
|
|
1066
1062
|
}
|
|
1067
1063
|
clear() {
|
|
1068
1064
|
this.value = [];
|
|
@@ -1081,16 +1077,13 @@ class BaseDateItem extends BaseItem {
|
|
|
1081
1077
|
this.maxYear = itemConfig.maxYear;
|
|
1082
1078
|
this.mode = itemConfig.mode || ItemDateMode.Calendar;
|
|
1083
1079
|
}
|
|
1084
|
-
|
|
1080
|
+
setValue(value, emitChange = true) {
|
|
1085
1081
|
if (value) {
|
|
1086
1082
|
if (!isDate(value) || !isValid(value)) {
|
|
1087
1083
|
value = parseISO(value);
|
|
1088
1084
|
}
|
|
1089
1085
|
}
|
|
1090
|
-
super.value
|
|
1091
|
-
}
|
|
1092
|
-
get value() {
|
|
1093
|
-
return super.value;
|
|
1086
|
+
super.setValue(value, emitChange);
|
|
1094
1087
|
}
|
|
1095
1088
|
}
|
|
1096
1089
|
|
|
@@ -1137,10 +1130,7 @@ class BaseDateRangeItem extends BaseItem {
|
|
|
1137
1130
|
get hasValue() {
|
|
1138
1131
|
return this.value?.from instanceof Date || this.value?.to instanceof Date;
|
|
1139
1132
|
}
|
|
1140
|
-
|
|
1141
|
-
return super.value;
|
|
1142
|
-
}
|
|
1143
|
-
set value(value) {
|
|
1133
|
+
setValue(value, emitChange = true) {
|
|
1144
1134
|
let from = value?.from;
|
|
1145
1135
|
let to = value?.to;
|
|
1146
1136
|
if (value) {
|
|
@@ -1151,7 +1141,7 @@ class BaseDateRangeItem extends BaseItem {
|
|
|
1151
1141
|
to = parseISO(to);
|
|
1152
1142
|
}
|
|
1153
1143
|
}
|
|
1154
|
-
super.
|
|
1144
|
+
super.setValue({ from, to }, emitChange);
|
|
1155
1145
|
}
|
|
1156
1146
|
get queryParam() {
|
|
1157
1147
|
if (!this.hasValue) {
|
|
@@ -1305,18 +1295,15 @@ class RangeItem extends BaseItem {
|
|
|
1305
1295
|
}
|
|
1306
1296
|
this.value = { ...value };
|
|
1307
1297
|
}
|
|
1308
|
-
get value() {
|
|
1309
|
-
return {
|
|
1310
|
-
min: super.value?.min,
|
|
1311
|
-
max: super.value?.max,
|
|
1312
|
-
};
|
|
1313
|
-
}
|
|
1314
|
-
set value(value) {
|
|
1315
|
-
super.value = value;
|
|
1316
|
-
}
|
|
1317
1298
|
get hasValue() {
|
|
1318
1299
|
return this.value?.min !== undefined || super.value?.max !== undefined;
|
|
1319
1300
|
}
|
|
1301
|
+
setValue(value, emitChange = true) {
|
|
1302
|
+
super.setValue({
|
|
1303
|
+
min: value?.min,
|
|
1304
|
+
max: value?.max,
|
|
1305
|
+
}, emitChange);
|
|
1306
|
+
}
|
|
1320
1307
|
init(value) {
|
|
1321
1308
|
return super.init(value)
|
|
1322
1309
|
.pipe(tap$1(() => {
|
|
@@ -1363,14 +1350,14 @@ class SelectItem extends BaseItem {
|
|
|
1363
1350
|
}
|
|
1364
1351
|
}));
|
|
1365
1352
|
}
|
|
1366
|
-
|
|
1353
|
+
setValue(value, emitChange = true) {
|
|
1367
1354
|
if (this.multiple) {
|
|
1368
|
-
|
|
1355
|
+
value = Array.isArray(value) ? value : [];
|
|
1369
1356
|
}
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
super.value
|
|
1357
|
+
else {
|
|
1358
|
+
value = Array.isArray(value) ? undefined : value;
|
|
1359
|
+
}
|
|
1360
|
+
super.setValue(value, emitChange);
|
|
1374
1361
|
}
|
|
1375
1362
|
get queryParam() {
|
|
1376
1363
|
if (!this.hasValue) {
|
|
@@ -1493,47 +1480,13 @@ class WeekItem extends BaseItem {
|
|
|
1493
1480
|
static create(config, filter) {
|
|
1494
1481
|
return new WeekItem(config, null, filter);
|
|
1495
1482
|
}
|
|
1496
|
-
|
|
1497
|
-
let value = clone(super.value);
|
|
1498
|
-
if (!isObject(value) ||
|
|
1499
|
-
(isEmpty(value.from, { zero: true }) && isEmpty(value.to, { zero: true }))) {
|
|
1500
|
-
value = undefined;
|
|
1501
|
-
}
|
|
1502
|
-
if (isEmpty(value, { zero: true })) {
|
|
1503
|
-
return undefined;
|
|
1504
|
-
}
|
|
1505
|
-
let from = value.from;
|
|
1506
|
-
let to = value.to;
|
|
1507
|
-
const period = value.period;
|
|
1508
|
-
value = {};
|
|
1509
|
-
if (from) {
|
|
1510
|
-
if (isString(from)) {
|
|
1511
|
-
from = parseISO(from);
|
|
1512
|
-
}
|
|
1513
|
-
if (isValid(from) && isDate(from)) {
|
|
1514
|
-
value.from = from;
|
|
1515
|
-
}
|
|
1516
|
-
}
|
|
1517
|
-
if (to) {
|
|
1518
|
-
if (isString(to)) {
|
|
1519
|
-
to = parseISO(to);
|
|
1520
|
-
}
|
|
1521
|
-
if (isValid(to) && isDate(to)) {
|
|
1522
|
-
value.to = to;
|
|
1523
|
-
}
|
|
1524
|
-
}
|
|
1525
|
-
if (period) {
|
|
1526
|
-
value.period = isString(period) ? parseInt(period, 10) : period;
|
|
1527
|
-
}
|
|
1528
|
-
return value;
|
|
1529
|
-
}
|
|
1530
|
-
set value(value) {
|
|
1483
|
+
setValue(value, emitChange = true) {
|
|
1531
1484
|
if (value) {
|
|
1532
1485
|
value.from = parseDate(value.from);
|
|
1533
1486
|
value.to = parseDate(value.to);
|
|
1534
1487
|
value.period = parseInt(value.period, 10) || undefined;
|
|
1535
1488
|
}
|
|
1536
|
-
super.value
|
|
1489
|
+
super.setValue(value, emitChange);
|
|
1537
1490
|
}
|
|
1538
1491
|
get query() {
|
|
1539
1492
|
const value = this.value;
|
|
@@ -1926,7 +1879,7 @@ class QueryParamController {
|
|
|
1926
1879
|
this._filterController = filterController;
|
|
1927
1880
|
this._enabled = this._filterController.config.queryParam;
|
|
1928
1881
|
merge(this._filterController.change$, this._filterController.init$)
|
|
1929
|
-
.pipe(filter
|
|
1882
|
+
.pipe(filter(() => this.enabled), tap$1(() => this.updateQueryParams()), takeUntilDestroyed(this._destroyRef))
|
|
1930
1883
|
.subscribe();
|
|
1931
1884
|
return of(null);
|
|
1932
1885
|
}
|
|
@@ -1985,7 +1938,6 @@ class FilterController {
|
|
|
1985
1938
|
_queryParamController = inject(QueryParamController);
|
|
1986
1939
|
_keywordController = inject(KeywordController);
|
|
1987
1940
|
_sortController = inject(SortController);
|
|
1988
|
-
_emitChange = true;
|
|
1989
1941
|
get items() {
|
|
1990
1942
|
return Array.from(this._items.values());
|
|
1991
1943
|
}
|
|
@@ -2033,20 +1985,12 @@ class FilterController {
|
|
|
2033
1985
|
getItem(name) {
|
|
2034
1986
|
return this._items.get(name);
|
|
2035
1987
|
}
|
|
2036
|
-
changeTransaction(fn) {
|
|
2037
|
-
this._emitChange = false;
|
|
2038
|
-
fn();
|
|
2039
|
-
this._emitChange = true;
|
|
2040
|
-
this._change$.next(null);
|
|
2041
|
-
}
|
|
2042
1988
|
filtersClear() {
|
|
2043
|
-
this.
|
|
2044
|
-
|
|
2045
|
-
item.clear();
|
|
2046
|
-
});
|
|
2047
|
-
this._keywordController.clear();
|
|
2048
|
-
this._sortController.clear();
|
|
1989
|
+
this.items.forEach((item) => {
|
|
1990
|
+
item.clear();
|
|
2049
1991
|
});
|
|
1992
|
+
this._keywordController.clear();
|
|
1993
|
+
this._sortController.clear();
|
|
2050
1994
|
}
|
|
2051
1995
|
get queryParam() {
|
|
2052
1996
|
return this.items
|
|
@@ -2070,11 +2014,10 @@ class FilterController {
|
|
|
2070
2014
|
};
|
|
2071
2015
|
}
|
|
2072
2016
|
set values(values) {
|
|
2073
|
-
this.
|
|
2074
|
-
|
|
2075
|
-
item.value = values[item.name];
|
|
2076
|
-
});
|
|
2017
|
+
this.items.forEach((item) => {
|
|
2018
|
+
item.setValue(values[item.name], false);
|
|
2077
2019
|
});
|
|
2020
|
+
this.change();
|
|
2078
2021
|
}
|
|
2079
2022
|
get values() {
|
|
2080
2023
|
return this.items
|
|
@@ -2145,12 +2088,12 @@ class FilterController {
|
|
|
2145
2088
|
}
|
|
2146
2089
|
_initChanges() {
|
|
2147
2090
|
merge(...this.items
|
|
2148
|
-
.map((item) => item.
|
|
2149
|
-
.pipe(map(() => item))))
|
|
2091
|
+
.map((item) => item.valueEvent$
|
|
2092
|
+
.pipe(filter$1((event) => event.emitChange), map(() => item))))
|
|
2150
2093
|
.pipe(tap((item) => this._change$.next([item])), takeUntil(this._destroy$))
|
|
2151
2094
|
.subscribe();
|
|
2152
2095
|
this._change$
|
|
2153
|
-
.pipe(
|
|
2096
|
+
.pipe(tap((items) => {
|
|
2154
2097
|
if (this._config.change) {
|
|
2155
2098
|
this._config.change(this.query, this._sortController.getSort());
|
|
2156
2099
|
}
|
|
@@ -2179,7 +2122,7 @@ class FocusControllerService {
|
|
|
2179
2122
|
}
|
|
2180
2123
|
listenFocusFor$(targetItem, targetType) {
|
|
2181
2124
|
return this._focusOn
|
|
2182
|
-
.pipe(filter((event) => !!event), filter(({ item, type }) => {
|
|
2125
|
+
.pipe(filter$1((event) => !!event), filter$1(({ item, type }) => {
|
|
2183
2126
|
return targetItem === item && targetType === type;
|
|
2184
2127
|
}), tap(() => this.clearFocus()));
|
|
2185
2128
|
}
|
|
@@ -2207,14 +2150,14 @@ class FsFilterChipsComponent {
|
|
|
2207
2150
|
item.clear(chip.name);
|
|
2208
2151
|
}
|
|
2209
2152
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FsFilterChipsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2210
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FsFilterChipsComponent, isStandalone: true, selector: "fs-filter-chips", ngImport: i0, template: "@for (item of items; track item.name) {\n @
|
|
2153
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FsFilterChipsComponent, isStandalone: true, selector: "fs-filter-chips", ngImport: i0, template: "@for (item of items; track item.name) {\n @for (chip of item.chips$ | async; track chip.label) {\n <fs-chip\n [removable]=\"item.showClear\"\n size=\"small\"\n (click)=\"click(item, chip)\"\n (removed)=\"remove(item, chip)\">\n {{ chip.value ? chip.label + ': ' + chip.value : chip.label }}\n </fs-chip>\n }\n}", styles: [""], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: FsChipModule }, { kind: "component", type: i1$2.FsChipComponent, selector: "fs-chip", inputs: ["selectable", "removable", "value", "maxWidth", "width", "backgroundColor", "borderColor", "color", "shape", "outlined", "icon", "image", "selected", "padding", "contrastColor", "size"], outputs: ["selectedToggled", "removed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2211
2154
|
}
|
|
2212
2155
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FsFilterChipsComponent, decorators: [{
|
|
2213
2156
|
type: Component,
|
|
2214
2157
|
args: [{ selector: 'fs-filter-chips', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
2215
2158
|
AsyncPipe,
|
|
2216
2159
|
FsChipModule,
|
|
2217
|
-
], template: "@for (item of items; track item.name) {\n @
|
|
2160
|
+
], template: "@for (item of items; track item.name) {\n @for (chip of item.chips$ | async; track chip.label) {\n <fs-chip\n [removable]=\"item.showClear\"\n size=\"small\"\n (click)=\"click(item, chip)\"\n (removed)=\"remove(item, chip)\">\n {{ chip.value ? chip.label + ': ' + chip.value : chip.label }}\n </fs-chip>\n }\n}" }]
|
|
2218
2161
|
}] });
|
|
2219
2162
|
|
|
2220
2163
|
class FsFilterDrawerActionsComponent {
|
|
@@ -2374,7 +2317,7 @@ class FsFilterOverlayService {
|
|
|
2374
2317
|
}
|
|
2375
2318
|
_openWhenChipClicked() {
|
|
2376
2319
|
this._focusController.focusOn$
|
|
2377
|
-
.pipe(filter((v) => !!v), takeUntil(this._destroy$))
|
|
2320
|
+
.pipe(filter$1((v) => !!v), takeUntil(this._destroy$))
|
|
2378
2321
|
.subscribe(() => {
|
|
2379
2322
|
if (!this.isOpened) {
|
|
2380
2323
|
this.open();
|
|
@@ -2752,7 +2695,10 @@ class FsFilterConfig {
|
|
|
2752
2695
|
init: data.init,
|
|
2753
2696
|
change: data.change,
|
|
2754
2697
|
reload: data.reload,
|
|
2755
|
-
autoReload:
|
|
2698
|
+
autoReload: {
|
|
2699
|
+
...data.autoReload,
|
|
2700
|
+
enabled: data.autoReload ? data.autoReload.enabled ?? true : false,
|
|
2701
|
+
},
|
|
2756
2702
|
clear: data.clear,
|
|
2757
2703
|
sortChange: data.sortChange,
|
|
2758
2704
|
case: data.case ?? 'camel',
|
|
@@ -3199,9 +3145,6 @@ class FilterComponent {
|
|
|
3199
3145
|
return this._filterController.items
|
|
3200
3146
|
.filter((item) => !item.hidden);
|
|
3201
3147
|
}
|
|
3202
|
-
get autoReload() {
|
|
3203
|
-
return !!this.config.autoReload;
|
|
3204
|
-
}
|
|
3205
3148
|
get hasFilterChips$() {
|
|
3206
3149
|
return this._hasFilterChips$.asObservable();
|
|
3207
3150
|
}
|
|
@@ -3406,7 +3349,7 @@ class FilterComponent {
|
|
|
3406
3349
|
_listenEscButton() {
|
|
3407
3350
|
this._zone.runOutsideAngular(() => {
|
|
3408
3351
|
fromEvent(window, 'keyup')
|
|
3409
|
-
.pipe(filter((event) => event.code === 'Escape'), takeUntil(this.closed), takeUntil(this._destroy$))
|
|
3352
|
+
.pipe(filter$1((event) => event.code === 'Escape'), takeUntil(this.closed), takeUntil(this._destroy$))
|
|
3410
3353
|
.subscribe(() => {
|
|
3411
3354
|
this._zone.run(() => {
|
|
3412
3355
|
this.hideDrawer();
|
|
@@ -3436,7 +3379,7 @@ class FilterComponent {
|
|
|
3436
3379
|
_initAutoReload() {
|
|
3437
3380
|
if (this.config.autoReload) {
|
|
3438
3381
|
interval(this.config.autoReload.seconds * 1000)
|
|
3439
|
-
.pipe(filter(() => this.autoReload), takeUntil(this._destroy$))
|
|
3382
|
+
.pipe(filter$1(() => this.config.autoReload.enabled), takeUntil(this._destroy$))
|
|
3440
3383
|
.subscribe(() => {
|
|
3441
3384
|
this.reload(null);
|
|
3442
3385
|
});
|
|
@@ -3467,7 +3410,7 @@ class FilterComponent {
|
|
|
3467
3410
|
ActionsController,
|
|
3468
3411
|
KeywordController,
|
|
3469
3412
|
SortController,
|
|
3470
|
-
], queries: [{ propertyName: "statusBar", first: true, predicate: FilterStatusBarDirective, descendants: true }], viewQueries: [{ propertyName: "keywordInput", first: true, predicate: KeywordInputComponent, descendants: true }, { propertyName: "reloadEl", first: true, predicate: ["reloadEl"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"filter-container\">\n @if (notInlineToolbar$ | async) {\n <ng-container *ngTemplateOutlet=\"heading\"></ng-container>\n }\n <div class=\"filter-inner-container\">\n @if (notInlineToolbar$ | async) {\n <div class=\"filter-inner-inputs\">\n @if (keywordVisible$ | async) {\n <fs-keyword-input [autofocus]=\"config.autofocus\"></fs-keyword-input>\n }\n @if (savedFilterController.enabled) {\n <fs-saved-filter-autocomplete-chips [savedFiltersController]=\"savedFilterController\"></fs-saved-filter-autocomplete-chips>\n }\n </div>\n } @else {\n <div>\n <ng-container *ngTemplateOutlet=\"heading\"></ng-container>\n <ng-container *ngTemplateOutlet=\"filterStatusBarChips\"></ng-container>\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"filterToolbar\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"filterActions\"></ng-container>\n </div>\n @if (notInlineToolbar$ | async) {\n <ng-container *ngTemplateOutlet=\"filterStatusBarChips\"></ng-container>\n }\n</div>\n<ng-template #filterStatusBarChips>\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 @if (config.chips) {\n <fs-filter-chips class=\"filter-chips\"></fs-filter-chips>\n }\n</ng-template>\n<ng-template #filterActions>\n @if (actionsVisible$ | async) {\n <div class=\"filter-actions\">\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 #filterToolbar>\n @if (config.reload || config.autoReload || ((filtersBtnVisible$ | async) && hasVisibleItemOrSorting)) {\n <div class=\"filter-toolbar\">\n @if ((filtersBtnVisible$ | async) && hasVisibleItemOrSorting) {\n <a\n mat-icon-button\n class=\"button-filters\"\n (click)=\"filterButtonClick($event)\"\n [color]=\"config.button.color\">\n @if (config.button.icon) {\n <mat-icon [svgIcon]=\"'filterOutline'\"></mat-icon>\n }\n </a>\n }\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
|
|
3413
|
+
], queries: [{ propertyName: "statusBar", first: true, predicate: FilterStatusBarDirective, descendants: true }], viewQueries: [{ propertyName: "keywordInput", first: true, predicate: KeywordInputComponent, descendants: true }, { propertyName: "reloadEl", first: true, predicate: ["reloadEl"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"filter-container\">\n @if (notInlineToolbar$ | async) {\n <ng-container *ngTemplateOutlet=\"heading\"></ng-container>\n }\n <div class=\"filter-inner-container\">\n @if (notInlineToolbar$ | async) {\n <div class=\"filter-inner-inputs\">\n @if (keywordVisible$ | async) {\n <fs-keyword-input [autofocus]=\"config.autofocus\"></fs-keyword-input>\n }\n @if (savedFilterController.enabled) {\n <fs-saved-filter-autocomplete-chips [savedFiltersController]=\"savedFilterController\"></fs-saved-filter-autocomplete-chips>\n }\n </div>\n } @else {\n <div>\n <ng-container *ngTemplateOutlet=\"heading\"></ng-container>\n <ng-container *ngTemplateOutlet=\"filterStatusBarChips\"></ng-container>\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"filterToolbar\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"filterActions\"></ng-container>\n </div>\n @if (notInlineToolbar$ | async) {\n <ng-container *ngTemplateOutlet=\"filterStatusBarChips\"></ng-container>\n }\n</div>\n<ng-template #filterStatusBarChips>\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 @if (config.chips) {\n <fs-filter-chips class=\"filter-chips\"></fs-filter-chips>\n }\n</ng-template>\n<ng-template #filterActions>\n @if (actionsVisible$ | async) {\n <div class=\"filter-actions\">\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 #filterToolbar>\n @if (config.reload || config.autoReload || ((filtersBtnVisible$ | async) && hasVisibleItemOrSorting)) {\n <div class=\"filter-toolbar\">\n @if ((filtersBtnVisible$ | async) && hasVisibleItemOrSorting) {\n <a\n mat-icon-button\n class=\"button-filters\"\n (click)=\"filterButtonClick($event)\"\n [color]=\"config.button.color\">\n @if (config.button.icon) {\n <mat-icon [svgIcon]=\"'filterOutline'\"></mat-icon>\n }\n </a>\n }\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 #heading>\n @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}.filter-status-container .filter-status{overflow:hidden;text-overflow:ellipsis;line-height:18px}.filter-container{width:100%}.filter-inner-container{flex-direction:row;box-sizing:border-box;display:flex;position:relative;align-items:center}.filter-inner-container .filter-inner-inputs{flex-direction:row;box-sizing:border-box;display:flex;align-items:center;min-width:0;gap: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;width:40px;padding:8px;height:40px;overflow:hidden}.filter-toolbar .button-filters ::ng-deep svg,.filter-toolbar .button-reload ::ng-deep svg{display:flex}.filter-toolbar .filter-reload{margin-left:10px;display:flex;align-items:center}.filter-toolbar .filter-reload .auto-reload{margin-right:5px}.filter-toolbar .filter-reload .auto-reload span{font-size:80%}.heading{margin-right:10px}.heading h2{margin:0}.heading h2+.subheading{margin:0}.results{min-height:90px;position:relative;overflow-x:auto;overflow-y:hidden}fs-filter-chips{margin:4px 0;display:flex;flex-wrap:wrap;gap:5px}@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: FsSavedFilterAutocompleteChipsComponent, selector: "fs-saved-filter-autocomplete-chips", inputs: ["savedFiltersController"] }, { 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 });
|
|
3471
3414
|
}
|
|
3472
3415
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FilterComponent, decorators: [{
|
|
3473
3416
|
type: Component,
|
|
@@ -3495,7 +3438,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3495
3438
|
MatSlideToggle,
|
|
3496
3439
|
AsyncPipe,
|
|
3497
3440
|
KeywordInputComponent,
|
|
3498
|
-
], template: "<div class=\"filter-container\">\n @if (notInlineToolbar$ | async) {\n <ng-container *ngTemplateOutlet=\"heading\"></ng-container>\n }\n <div class=\"filter-inner-container\">\n @if (notInlineToolbar$ | async) {\n <div class=\"filter-inner-inputs\">\n @if (keywordVisible$ | async) {\n <fs-keyword-input [autofocus]=\"config.autofocus\"></fs-keyword-input>\n }\n @if (savedFilterController.enabled) {\n <fs-saved-filter-autocomplete-chips [savedFiltersController]=\"savedFilterController\"></fs-saved-filter-autocomplete-chips>\n }\n </div>\n } @else {\n <div>\n <ng-container *ngTemplateOutlet=\"heading\"></ng-container>\n <ng-container *ngTemplateOutlet=\"filterStatusBarChips\"></ng-container>\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"filterToolbar\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"filterActions\"></ng-container>\n </div>\n @if (notInlineToolbar$ | async) {\n <ng-container *ngTemplateOutlet=\"filterStatusBarChips\"></ng-container>\n }\n</div>\n<ng-template #filterStatusBarChips>\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 @if (config.chips) {\n <fs-filter-chips class=\"filter-chips\"></fs-filter-chips>\n }\n</ng-template>\n<ng-template #filterActions>\n @if (actionsVisible$ | async) {\n <div class=\"filter-actions\">\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 #filterToolbar>\n @if (config.reload || config.autoReload || ((filtersBtnVisible$ | async) && hasVisibleItemOrSorting)) {\n <div class=\"filter-toolbar\">\n @if ((filtersBtnVisible$ | async) && hasVisibleItemOrSorting) {\n <a\n mat-icon-button\n class=\"button-filters\"\n (click)=\"filterButtonClick($event)\"\n [color]=\"config.button.color\">\n @if (config.button.icon) {\n <mat-icon [svgIcon]=\"'filterOutline'\"></mat-icon>\n }\n </a>\n }\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
|
|
3441
|
+
], template: "<div class=\"filter-container\">\n @if (notInlineToolbar$ | async) {\n <ng-container *ngTemplateOutlet=\"heading\"></ng-container>\n }\n <div class=\"filter-inner-container\">\n @if (notInlineToolbar$ | async) {\n <div class=\"filter-inner-inputs\">\n @if (keywordVisible$ | async) {\n <fs-keyword-input [autofocus]=\"config.autofocus\"></fs-keyword-input>\n }\n @if (savedFilterController.enabled) {\n <fs-saved-filter-autocomplete-chips [savedFiltersController]=\"savedFilterController\"></fs-saved-filter-autocomplete-chips>\n }\n </div>\n } @else {\n <div>\n <ng-container *ngTemplateOutlet=\"heading\"></ng-container>\n <ng-container *ngTemplateOutlet=\"filterStatusBarChips\"></ng-container>\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"filterToolbar\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"filterActions\"></ng-container>\n </div>\n @if (notInlineToolbar$ | async) {\n <ng-container *ngTemplateOutlet=\"filterStatusBarChips\"></ng-container>\n }\n</div>\n<ng-template #filterStatusBarChips>\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 @if (config.chips) {\n <fs-filter-chips class=\"filter-chips\"></fs-filter-chips>\n }\n</ng-template>\n<ng-template #filterActions>\n @if (actionsVisible$ | async) {\n <div class=\"filter-actions\">\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 #filterToolbar>\n @if (config.reload || config.autoReload || ((filtersBtnVisible$ | async) && hasVisibleItemOrSorting)) {\n <div class=\"filter-toolbar\">\n @if ((filtersBtnVisible$ | async) && hasVisibleItemOrSorting) {\n <a\n mat-icon-button\n class=\"button-filters\"\n (click)=\"filterButtonClick($event)\"\n [color]=\"config.button.color\">\n @if (config.button.icon) {\n <mat-icon [svgIcon]=\"'filterOutline'\"></mat-icon>\n }\n </a>\n }\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 #heading>\n @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}.filter-status-container .filter-status{overflow:hidden;text-overflow:ellipsis;line-height:18px}.filter-container{width:100%}.filter-inner-container{flex-direction:row;box-sizing:border-box;display:flex;position:relative;align-items:center}.filter-inner-container .filter-inner-inputs{flex-direction:row;box-sizing:border-box;display:flex;align-items:center;min-width:0;gap: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;width:40px;padding:8px;height:40px;overflow:hidden}.filter-toolbar .button-filters ::ng-deep svg,.filter-toolbar .button-reload ::ng-deep svg{display:flex}.filter-toolbar .filter-reload{margin-left:10px;display:flex;align-items:center}.filter-toolbar .filter-reload .auto-reload{margin-right:5px}.filter-toolbar .filter-reload .auto-reload span{font-size:80%}.heading{margin-right:10px}.heading h2{margin:0}.heading h2+.subheading{margin:0}.results{min-height:90px;position:relative;overflow-x:auto;overflow-y:hidden}fs-filter-chips{margin:4px 0;display:flex;flex-wrap:wrap;gap:5px}@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"] }]
|
|
3499
3442
|
}], ctorParameters: () => [], propDecorators: { keywordInput: [{
|
|
3500
3443
|
type: ViewChild,
|
|
3501
3444
|
args: [KeywordInputComponent]
|
|
@@ -3590,7 +3533,7 @@ class CheckboxComponent extends BaseItemComponent {
|
|
|
3590
3533
|
});
|
|
3591
3534
|
}
|
|
3592
3535
|
change() {
|
|
3593
|
-
this.item.
|
|
3536
|
+
this.item.setValue(this.value);
|
|
3594
3537
|
}
|
|
3595
3538
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3596
3539
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: CheckboxComponent, isStandalone: true, selector: "filter-item-checkbox", usesInheritance: true, ngImport: i0, template: "<fs-label-field>\n <mat-checkbox\n [(ngModel)]=\"value\"\n (ngModelChange)=\"change()\"\n [name]=\"item.name\">\n {{ item.label }}\n </mat-checkbox>\n</fs-label-field>", styles: ["fs-label-field{margin:0 0 -12px -8px}\n"], dependencies: [{ kind: "ngmodule", type: FsLabelModule }, { kind: "component", type: i1$6.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["appearance", "showOutline", "disabled", "focused", "hoverable", "padless"] }, { 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: "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])" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
@@ -3887,11 +3830,8 @@ class WeekComponent extends BaseItemComponent {
|
|
|
3887
3830
|
this._cdRef.detectChanges();
|
|
3888
3831
|
});
|
|
3889
3832
|
}
|
|
3890
|
-
change() {
|
|
3891
|
-
this.item.value = this.value;
|
|
3892
|
-
}
|
|
3893
3833
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: WeekComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3894
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: WeekComponent, isStandalone: true, selector: "filter-item-week", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>\n {{ item.label }}\n </mat-label>\n <input\n matInput\n fsDateWeekPicker\n [placeholder]=\"item.label\"\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"
|
|
3834
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: WeekComponent, isStandalone: true, selector: "filter-item-week", usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>\n {{ item.label }}\n </mat-label>\n <input\n matInput\n fsDateWeekPicker\n [placeholder]=\"item.label\"\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"item.value = value\"\n [seedDate]=\"item.seedDate\"\n [clear]=\"item.showClear\"\n [name]=\"item.name\">\n</mat-form-field>", 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: 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: FsDatePickerModule }, { kind: "component", type: i3$2.FsDateWeekPickerComponent, selector: "[fsDateWeekPicker]", inputs: ["minYear", "maxYear", "minDate", "maxDate", "seedDate", "period", "view"], outputs: ["change"] }, { kind: "directive", type: FocusToItemDirective, selector: "[fsFilterFocusTrigger]", inputs: ["fsFilterFocusTrigger", "focusTargetType"] }, { 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])" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3895
3835
|
}
|
|
3896
3836
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: WeekComponent, decorators: [{
|
|
3897
3837
|
type: Component,
|
|
@@ -3903,7 +3843,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3903
3843
|
FsDatePickerModule,
|
|
3904
3844
|
FocusToItemDirective,
|
|
3905
3845
|
FsFormModule,
|
|
3906
|
-
], template: "<mat-form-field>\n <mat-label>\n {{ item.label }}\n </mat-label>\n <input\n matInput\n fsDateWeekPicker\n [placeholder]=\"item.label\"\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"
|
|
3846
|
+
], template: "<mat-form-field>\n <mat-label>\n {{ item.label }}\n </mat-label>\n <input\n matInput\n fsDateWeekPicker\n [placeholder]=\"item.label\"\n [fsFilterFocusTrigger]=\"item\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"item.value = value\"\n [seedDate]=\"item.seedDate\"\n [clear]=\"item.showClear\"\n [name]=\"item.name\">\n</mat-form-field>" }]
|
|
3907
3847
|
}] });
|
|
3908
3848
|
|
|
3909
3849
|
class FilterItemComponent {
|