@firestitch/filter 12.12.14 → 12.13.0
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 +2 -1
- package/app/components/filter-chip/filter-chip.component.d.ts +1 -1
- package/app/components/filter-chips/filter-chips.component.d.ts +1 -1
- package/app/components/filter-drawer/filter-drawer.component.d.ts +8 -6
- package/app/components/filters-item/autocomplete/autocomplete.component.d.ts +1 -1
- package/app/components/filters-item/autocompletechips/autocompletechips.component.d.ts +1 -1
- package/app/components/filters-item/base-item/base-item.component.d.ts +5 -3
- package/app/components/filters-item/filter-item.component.d.ts +11 -9
- package/app/helpers/create-filter-item.d.ts +1 -1
- package/app/models/items/autocomplete/base-autocomplete-item.d.ts +3 -3
- package/app/models/items/base-item.d.ts +7 -6
- package/app/services/filter-overlay.service.d.ts +7 -5
- package/app/services/items-store.service.d.ts +3 -1
- package/bundles/firestitch-filter.umd.js +124 -128
- package/bundles/firestitch-filter.umd.js.map +1 -1
- package/esm2015/app/components/filter/filter.component.js +9 -8
- package/esm2015/app/components/filter-chip/filter-chip.component.js +4 -4
- package/esm2015/app/components/filter-chips/filter-chips.component.js +1 -1
- package/esm2015/app/components/filter-drawer/filter-drawer.component.js +15 -14
- package/esm2015/app/components/filters-item/autocomplete/autocomplete.component.js +3 -3
- package/esm2015/app/components/filters-item/autocompletechips/autocompletechips.component.js +2 -2
- package/esm2015/app/components/filters-item/base-item/base-item.component.js +6 -10
- package/esm2015/app/components/filters-item/filter-item.component.js +5 -3
- package/esm2015/app/fs-filter.module.js +1 -4
- package/esm2015/app/models/items/autocomplete/base-autocomplete-item.js +2 -1
- package/esm2015/app/models/items/base-item.js +6 -8
- package/esm2015/app/models/items/select/multiple-select-item.js +4 -6
- package/esm2015/app/models/items/select/simple-select-item.js +8 -10
- package/esm2015/app/pipes/remove-isolate-value.pipe.js +5 -7
- package/esm2015/app/services/filter-overlay.service.js +19 -15
- package/esm2015/app/services/items-store.service.js +13 -13
- package/fesm2015/firestitch-filter.js +116 -122
- package/fesm2015/firestitch-filter.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { Injectable, Optional, Component, ChangeDetectionStrategy, Inject, Input
|
|
|
3
3
|
import { BehaviorSubject, Subject, isObservable, forkJoin, of, timer, combineLatest, fromEvent, merge } from 'rxjs';
|
|
4
4
|
import { tap, finalize, take, takeUntil, debounceTime, filter as filter$1, distinctUntilChanged, switchMap, mapTo, startWith, map, delay, skip } from 'rxjs/operators';
|
|
5
5
|
import { filter, isArrayEqual, list, isEmpty, getNormalizedPath, remove, FsCommonModule } from '@firestitch/common';
|
|
6
|
-
import {
|
|
6
|
+
import { isObject, isFunction, clone, isString, toString, pickBy } from 'lodash-es';
|
|
7
7
|
import * as i3 from '@angular/common';
|
|
8
8
|
import { CommonModule } from '@angular/common';
|
|
9
9
|
import * as i1$1 from '@angular/router';
|
|
@@ -69,6 +69,43 @@ function filterFromQueryParam(param) {
|
|
|
69
69
|
return [decodeURIComponent(parts[0]), decodeURIComponent(parts[1])];
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
function objectsAreEquals(obj1, obj2) {
|
|
73
|
+
const oldKeys = Object.keys(obj1);
|
|
74
|
+
const currKeys = Object.keys(obj2);
|
|
75
|
+
if (oldKeys.length !== currKeys.length) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
for (const key in obj1) {
|
|
79
|
+
if (obj1.hasOwnProperty(key)) {
|
|
80
|
+
const oldItem = obj1[key];
|
|
81
|
+
const currItem = obj2[key];
|
|
82
|
+
const isArrays = Array.isArray(oldItem) && Array.isArray(currItem);
|
|
83
|
+
const isObjects = isObject(oldItem) && isObject(currItem);
|
|
84
|
+
if (isArrays && !arraysAreEquals(oldItem, currItem)) {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
else if (isObjects && !objectsAreEquals(oldItem, currItem)) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
else if (!isArrays && !isObjects && oldItem !== currItem) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
function arraysAreEquals(arr1, arr2) {
|
|
98
|
+
if (arr1.length !== arr2.length) {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
for (const el of arr1) {
|
|
102
|
+
if (arr2.indexOf(el) === -1) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
|
|
72
109
|
var ItemType;
|
|
73
110
|
(function (ItemType) {
|
|
74
111
|
ItemType["Text"] = "text";
|
|
@@ -224,13 +261,13 @@ class BaseItem {
|
|
|
224
261
|
this._pendingDefaultValue = false;
|
|
225
262
|
}));
|
|
226
263
|
}
|
|
227
|
-
initValues(persistedValue) {
|
|
264
|
+
initValues(filter, persistedValue) {
|
|
228
265
|
// this._initialized = false;
|
|
229
266
|
this.persistedValue = persistedValue;
|
|
230
267
|
this._initDefaultModel();
|
|
231
268
|
const isAutocomplete = this.type === ItemType.AutoComplete || this.type === ItemType.AutoCompleteChips;
|
|
232
269
|
if (this._valuesFn && !isAutocomplete) {
|
|
233
|
-
const valuesResult = this._valuesFn();
|
|
270
|
+
const valuesResult = this._valuesFn(null, filter);
|
|
234
271
|
if (isObservable(valuesResult)) {
|
|
235
272
|
this._pendingValues = true;
|
|
236
273
|
}
|
|
@@ -246,10 +283,10 @@ class BaseItem {
|
|
|
246
283
|
// this._initialized = true;
|
|
247
284
|
}
|
|
248
285
|
}
|
|
249
|
-
loadAsyncValues(reload = true) {
|
|
286
|
+
loadAsyncValues(filter, reload = true) {
|
|
250
287
|
if (reload || (!this.loading && this.hasPendingValues)) {
|
|
251
288
|
this.loading = true;
|
|
252
|
-
this._valuesFn()
|
|
289
|
+
this._valuesFn(null, filter)
|
|
253
290
|
.pipe(take(1), takeUntil(this._destroy$))
|
|
254
291
|
.subscribe((values) => {
|
|
255
292
|
this.values = values;
|
|
@@ -271,7 +308,6 @@ class BaseItem {
|
|
|
271
308
|
this._clear$.next(defaultValue);
|
|
272
309
|
this._clearValue(defaultValue);
|
|
273
310
|
}
|
|
274
|
-
;
|
|
275
311
|
getChipsContent(type) {
|
|
276
312
|
return '';
|
|
277
313
|
}
|
|
@@ -306,7 +342,6 @@ class BaseItem {
|
|
|
306
342
|
this.values = item.values;
|
|
307
343
|
}
|
|
308
344
|
}
|
|
309
|
-
;
|
|
310
345
|
_initDefaultModel() {
|
|
311
346
|
var _a;
|
|
312
347
|
const model = (_a = this.persistedValue) !== null && _a !== void 0 ? _a : this.defaultValue;
|
|
@@ -352,43 +387,6 @@ class BaseSelectItem extends BaseItem {
|
|
|
352
387
|
}
|
|
353
388
|
}
|
|
354
389
|
|
|
355
|
-
function objectsAreEquals(obj1, obj2) {
|
|
356
|
-
const oldKeys = Object.keys(obj1);
|
|
357
|
-
const currKeys = Object.keys(obj2);
|
|
358
|
-
if (oldKeys.length !== currKeys.length) {
|
|
359
|
-
return false;
|
|
360
|
-
}
|
|
361
|
-
for (const key in obj1) {
|
|
362
|
-
if (obj1.hasOwnProperty(key)) {
|
|
363
|
-
const oldItem = obj1[key];
|
|
364
|
-
const currItem = obj2[key];
|
|
365
|
-
const isArrays = Array.isArray(oldItem) && Array.isArray(currItem);
|
|
366
|
-
const isObjects = isObject(oldItem) && isObject(currItem);
|
|
367
|
-
if (isArrays && !arraysAreEquals(oldItem, currItem)) {
|
|
368
|
-
return false;
|
|
369
|
-
}
|
|
370
|
-
else if (isObjects && !objectsAreEquals(oldItem, currItem)) {
|
|
371
|
-
return false;
|
|
372
|
-
}
|
|
373
|
-
else if (!isArrays && !isObjects && oldItem !== currItem) {
|
|
374
|
-
return false;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
return true;
|
|
379
|
-
}
|
|
380
|
-
function arraysAreEquals(arr1, arr2) {
|
|
381
|
-
if (arr1.length !== arr2.length) {
|
|
382
|
-
return false;
|
|
383
|
-
}
|
|
384
|
-
for (const el of arr1) {
|
|
385
|
-
if (arr2.indexOf(el) === -1) {
|
|
386
|
-
return false;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
return true;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
390
|
class MultipleSelectItem extends BaseSelectItem {
|
|
393
391
|
constructor(itemConfig, _persistedValues) {
|
|
394
392
|
super(itemConfig, _persistedValues);
|
|
@@ -453,16 +451,14 @@ class MultipleSelectItem extends BaseSelectItem {
|
|
|
453
451
|
if (isNaN(val)) {
|
|
454
452
|
return val;
|
|
455
453
|
}
|
|
456
|
-
|
|
457
|
-
return +val;
|
|
458
|
-
}
|
|
454
|
+
return +val;
|
|
459
455
|
});
|
|
460
456
|
}
|
|
461
457
|
super._setModel(value);
|
|
462
458
|
}
|
|
463
459
|
_validateModel() {
|
|
464
460
|
const possibleValues = filter(this.model || [], (item) => {
|
|
465
|
-
return this.values.find(value => {
|
|
461
|
+
return this.values.find((value) => {
|
|
466
462
|
return value.value == item;
|
|
467
463
|
});
|
|
468
464
|
});
|
|
@@ -993,14 +989,12 @@ class SimpleSelectItem extends BaseSelectItem {
|
|
|
993
989
|
const itemValue = findValue(this.values, this.model, this.children);
|
|
994
990
|
return itemValue && itemValue.name;
|
|
995
991
|
}
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
return this.isolate.label;
|
|
1003
|
-
}
|
|
992
|
+
const itemValue = this.values.find((val) => val.value === this.model);
|
|
993
|
+
if (itemValue) {
|
|
994
|
+
return itemValue.name;
|
|
995
|
+
}
|
|
996
|
+
else if (this.isolate) {
|
|
997
|
+
return this.isolate.label;
|
|
1004
998
|
}
|
|
1005
999
|
}
|
|
1006
1000
|
get isChipVisible() {
|
|
@@ -1026,7 +1020,7 @@ class SimpleSelectItem extends BaseSelectItem {
|
|
|
1026
1020
|
super._setModel(value);
|
|
1027
1021
|
}
|
|
1028
1022
|
_validateModel() {
|
|
1029
|
-
const item = this.values.find(value => {
|
|
1023
|
+
const item = this.values.find((value) => {
|
|
1030
1024
|
return value.value == this.model;
|
|
1031
1025
|
});
|
|
1032
1026
|
const value = item ? item.value : '__all';
|
|
@@ -1216,6 +1210,7 @@ class BaseAutocompleteItem extends BaseItem {
|
|
|
1216
1210
|
return this._valuesFn;
|
|
1217
1211
|
}
|
|
1218
1212
|
_validateModel() {
|
|
1213
|
+
//
|
|
1219
1214
|
}
|
|
1220
1215
|
_parseConfig(item) {
|
|
1221
1216
|
var _a;
|
|
@@ -1555,12 +1550,12 @@ class FsFilterItemsStore {
|
|
|
1555
1550
|
get visibleItems() {
|
|
1556
1551
|
return this._visibleItems$.getValue();
|
|
1557
1552
|
}
|
|
1558
|
-
get visibleItems$() {
|
|
1559
|
-
return this._visibleItems$.asObservable();
|
|
1560
|
-
}
|
|
1561
1553
|
set visibleItems(items) {
|
|
1562
1554
|
this._visibleItems$.next(items);
|
|
1563
1555
|
}
|
|
1556
|
+
get visibleItems$() {
|
|
1557
|
+
return this._visibleItems$.asObservable();
|
|
1558
|
+
}
|
|
1564
1559
|
get hasKeyword() {
|
|
1565
1560
|
return this._hasKeyword;
|
|
1566
1561
|
}
|
|
@@ -1623,7 +1618,7 @@ class FsFilterItemsStore {
|
|
|
1623
1618
|
loadAsyncValues() {
|
|
1624
1619
|
this.items
|
|
1625
1620
|
.filter((item) => item.hasPendingValues)
|
|
1626
|
-
.forEach((item) => item.loadAsyncValues());
|
|
1621
|
+
.forEach((item) => item.loadAsyncValues(this.filter));
|
|
1627
1622
|
}
|
|
1628
1623
|
loadAsyncDefaults() {
|
|
1629
1624
|
// default values can be asynchronous, and we must load them if there is no persisted value instead
|
|
@@ -1645,10 +1640,10 @@ class FsFilterItemsStore {
|
|
|
1645
1640
|
.map((item) => item.loadDefaultValue()),
|
|
1646
1641
|
...valuesToBeLoaded
|
|
1647
1642
|
.map((item) => {
|
|
1648
|
-
item.loadAsyncValues();
|
|
1643
|
+
item.loadAsyncValues(this.filter);
|
|
1649
1644
|
return item.loading$
|
|
1650
1645
|
.pipe();
|
|
1651
|
-
})
|
|
1646
|
+
}),
|
|
1652
1647
|
])
|
|
1653
1648
|
.pipe(finalize(() => {
|
|
1654
1649
|
this._ready$.next(true);
|
|
@@ -1710,7 +1705,7 @@ class FsFilterItemsStore {
|
|
|
1710
1705
|
init(p) {
|
|
1711
1706
|
this.items
|
|
1712
1707
|
.forEach((item) => {
|
|
1713
|
-
item.initValues(p[item.name]);
|
|
1708
|
+
item.initValues(this.filter, p[item.name]);
|
|
1714
1709
|
});
|
|
1715
1710
|
this._initSortingItems(p);
|
|
1716
1711
|
this.loadAsyncDefaults();
|
|
@@ -1819,8 +1814,8 @@ class FsFilterItemsStore {
|
|
|
1819
1814
|
}
|
|
1820
1815
|
_initSortingItems(p) {
|
|
1821
1816
|
if (this.sortByItem && this.sortDirectionItem) {
|
|
1822
|
-
this.sortByItem.initValues(p[this.sortByItem.name]);
|
|
1823
|
-
this.sortDirectionItem.initValues(p[this.sortDirectionItem.name]);
|
|
1817
|
+
this.sortByItem.initValues(this.filter, p[this.sortByItem.name]);
|
|
1818
|
+
this.sortDirectionItem.initValues(this.filter, p[this.sortDirectionItem.name]);
|
|
1824
1819
|
}
|
|
1825
1820
|
}
|
|
1826
1821
|
_createSortingItems() {
|
|
@@ -1830,7 +1825,7 @@ class FsFilterItemsStore {
|
|
|
1830
1825
|
name: SORT_BY_FIELD,
|
|
1831
1826
|
type: ItemType.Select,
|
|
1832
1827
|
label: 'Sort By',
|
|
1833
|
-
values: this._config.sortValues
|
|
1828
|
+
values: this._config.sortValues,
|
|
1834
1829
|
};
|
|
1835
1830
|
if (this._config.sort && this._config.sort.value) {
|
|
1836
1831
|
sortByItem.default = this._config.sort.value;
|
|
@@ -1842,8 +1837,8 @@ class FsFilterItemsStore {
|
|
|
1842
1837
|
label: 'Sort Direction',
|
|
1843
1838
|
values: [
|
|
1844
1839
|
{ name: 'Ascending', value: 'asc' },
|
|
1845
|
-
{ name: 'Descending', value: 'desc' }
|
|
1846
|
-
]
|
|
1840
|
+
{ name: 'Descending', value: 'desc' },
|
|
1841
|
+
],
|
|
1847
1842
|
};
|
|
1848
1843
|
if (this._config.sort && this._config.sort.direction) {
|
|
1849
1844
|
sortDirectionItem.default = this._config.sort.direction;
|
|
@@ -2658,7 +2653,7 @@ class FsFilterChipComponent {
|
|
|
2658
2653
|
this.listenValueChangesForRanges();
|
|
2659
2654
|
this._updateVisibility();
|
|
2660
2655
|
if (this.item.hasPendingValues) {
|
|
2661
|
-
this.item.loadAsyncValues(false);
|
|
2656
|
+
this.item.loadAsyncValues(null, false);
|
|
2662
2657
|
this.item.values$
|
|
2663
2658
|
.pipe(take(2), takeUntil(this._destroy$))
|
|
2664
2659
|
.subscribe(() => {
|
|
@@ -2700,7 +2695,7 @@ class FsFilterChipComponent {
|
|
|
2700
2695
|
_initDelayRender() {
|
|
2701
2696
|
this.chipDelayedRender$ = combineLatest([
|
|
2702
2697
|
this.item.values$,
|
|
2703
|
-
this._chipRenderTimer$.pipe(startWith(false))
|
|
2698
|
+
this._chipRenderTimer$.pipe(startWith(false)),
|
|
2704
2699
|
])
|
|
2705
2700
|
.pipe(map(([values, timerValue]) => {
|
|
2706
2701
|
return !!values || timerValue;
|
|
@@ -2795,7 +2790,6 @@ class BaseItemComponent {
|
|
|
2795
2790
|
set item(value) {
|
|
2796
2791
|
this._item = value;
|
|
2797
2792
|
}
|
|
2798
|
-
;
|
|
2799
2793
|
get item() {
|
|
2800
2794
|
return this._item;
|
|
2801
2795
|
}
|
|
@@ -2809,12 +2803,7 @@ class BaseItemComponent {
|
|
|
2809
2803
|
}
|
|
2810
2804
|
ngOnChanges(changes) {
|
|
2811
2805
|
if (changes.item) {
|
|
2812
|
-
|
|
2813
|
-
this.label = this.item.label[0];
|
|
2814
|
-
}
|
|
2815
|
-
else {
|
|
2816
|
-
this.label = this.item.label;
|
|
2817
|
-
}
|
|
2806
|
+
this.label = Array.isArray(this.item.label) ? this.item.label[0] : this.item.label;
|
|
2818
2807
|
}
|
|
2819
2808
|
}
|
|
2820
2809
|
ngOnDestroy() {
|
|
@@ -2833,7 +2822,7 @@ class BaseItemComponent {
|
|
|
2833
2822
|
}
|
|
2834
2823
|
}
|
|
2835
2824
|
BaseItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: BaseItemComponent, deps: [{ token: i0.KeyValueDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2836
|
-
BaseItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: BaseItemComponent, selector: "base-item", inputs: { item: "item", inline: "inline" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2825
|
+
BaseItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: BaseItemComponent, selector: "base-item", inputs: { item: "item", inline: "inline", filter: "filter" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2837
2826
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: BaseItemComponent, decorators: [{
|
|
2838
2827
|
type: Component,
|
|
2839
2828
|
args: [{
|
|
@@ -2845,6 +2834,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2845
2834
|
type: Input
|
|
2846
2835
|
}], inline: [{
|
|
2847
2836
|
type: Input
|
|
2837
|
+
}], filter: [{
|
|
2838
|
+
type: Input
|
|
2848
2839
|
}] } });
|
|
2849
2840
|
|
|
2850
2841
|
class FocusToItemDirective {
|
|
@@ -3009,11 +3000,9 @@ class FsFilterIsolateValues {
|
|
|
3009
3000
|
if (!isolate) {
|
|
3010
3001
|
return values;
|
|
3011
3002
|
}
|
|
3012
|
-
|
|
3013
|
-
return
|
|
3014
|
-
|
|
3015
|
-
});
|
|
3016
|
-
}
|
|
3003
|
+
return values.filter((value) => {
|
|
3004
|
+
return value.value !== isolate.value;
|
|
3005
|
+
});
|
|
3017
3006
|
}
|
|
3018
3007
|
}
|
|
3019
3008
|
FsFilterIsolateValues.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterIsolateValues, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
@@ -3021,7 +3010,7 @@ FsFilterIsolateValues.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", vers
|
|
|
3021
3010
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterIsolateValues, decorators: [{
|
|
3022
3011
|
type: Pipe,
|
|
3023
3012
|
args: [{
|
|
3024
|
-
name: 'fsFilterIsolateValues'
|
|
3013
|
+
name: 'fsFilterIsolateValues',
|
|
3025
3014
|
}]
|
|
3026
3015
|
}] });
|
|
3027
3016
|
|
|
@@ -3251,7 +3240,7 @@ class AutocompleteComponent extends BaseItemComponent {
|
|
|
3251
3240
|
return data ? data.name : data;
|
|
3252
3241
|
};
|
|
3253
3242
|
this.fetch = (keyword) => {
|
|
3254
|
-
return this.item.valuesFn(keyword);
|
|
3243
|
+
return this.item.valuesFn(keyword, this.filter);
|
|
3255
3244
|
};
|
|
3256
3245
|
}
|
|
3257
3246
|
}
|
|
@@ -3272,7 +3261,7 @@ class AutocompletechipsComponent extends BaseItemComponent {
|
|
|
3272
3261
|
this._kvDiffers = _kvDiffers;
|
|
3273
3262
|
this._cd = _cd;
|
|
3274
3263
|
this.fetch = (keyword) => {
|
|
3275
|
-
return this.item.valuesFn(keyword);
|
|
3264
|
+
return this.item.valuesFn(keyword, this.filter);
|
|
3276
3265
|
};
|
|
3277
3266
|
}
|
|
3278
3267
|
// SP-T1747
|
|
@@ -3413,8 +3402,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3413
3402
|
class FilterItemComponent {
|
|
3414
3403
|
constructor(_cdRef) {
|
|
3415
3404
|
this._cdRef = _cdRef;
|
|
3416
|
-
this._destroy$ = new Subject();
|
|
3417
3405
|
this.itemType = ItemType;
|
|
3406
|
+
this._destroy$ = new Subject();
|
|
3418
3407
|
}
|
|
3419
3408
|
get textItem() {
|
|
3420
3409
|
return this.item;
|
|
@@ -3465,7 +3454,7 @@ class FilterItemComponent {
|
|
|
3465
3454
|
}
|
|
3466
3455
|
}
|
|
3467
3456
|
FilterItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterItemComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3468
|
-
FilterItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterItemComponent, selector: "filter-item", inputs: { item: "item" }, ngImport: i0, template: "<div class=\"filter filter-{{ item.type }}\">\n\n <ng-container [ngSwitch]=\"item.type\">\n <filter-item-text class=\"interface\"\n
|
|
3457
|
+
FilterItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterItemComponent, selector: "filter-item", inputs: { item: "item", filter: "filter" }, ngImport: i0, template: "<div class=\"filter filter-{{ item.type }}\">\n\n <ng-container [ngSwitch]=\"item.type\">\n <filter-item-text \n class=\"interface\"\n *ngSwitchCase=\"itemType.Text\"\n [item]=\"textItem\">\n </filter-item-text>\n\n <filter-item-select \n class=\"interface\"\n *ngSwitchCase=\"itemType.Select\"\n [item]=\"baseSelectItem\">\n </filter-item-select>\n\n <filter-item-chips \n class=\"interface\"\n *ngSwitchCase=\"itemType.Chips\"\n [item]=\"chipsItem\">\n </filter-item-chips>\n\n <filter-item-range \n class=\"interface interface-range\"\n *ngSwitchCase=\"itemType.Range\"\n [item]=\"rangeItem\">\n </filter-item-range>\n\n <filter-item-autocomplete \n class=\"interface\"\n *ngSwitchCase=\"itemType.AutoComplete\"\n [item]=\"autocompleteItem\"\n [filter]=\"filter\">\n </filter-item-autocomplete>\n\n <filter-item-autocompletechips \n class=\"interface\"\n *ngSwitchCase=\"itemType.AutoCompleteChips\"\n [item]=\"autocompleteChipsItem\"\n [filter]=\"filter\">\n </filter-item-autocompletechips>\n\n <filter-item-date \n class=\"interface interface-date\"\n *ngSwitchCase=\"itemType.Date\"\n [item]=\"dateItem\">\n </filter-item-date>\n\n <filter-item-date \n class=\"interface interface-date\"\n *ngSwitchCase=\"itemType.DateTime\"\n [item]=\"dateTimeItem\">\n </filter-item-date>\n\n <filter-item-date-range \n class=\"interface interface-date\"\n *ngSwitchCase=\"itemType.DateRange\"\n [item]=\"dateRangeItem\">\n </filter-item-date-range>\n\n <filter-item-date-range \n class=\"interface interface-date\"\n *ngSwitchCase=\"itemType.DateTimeRange\"\n [item]=\"dateTimeRangeItem\">\n </filter-item-date-range>\n\n <filter-item-week \n class=\"interface\"\n *ngSwitchCase=\"itemType.Week\"\n [item]=\"weekItem\">\n </filter-item-week>\n\n <filter-item-checkbox \n class=\"interface interface-checkbox\"\n *ngSwitchCase=\"itemType.Checkbox\"\n [item]=\"checkboxItem\">\n </filter-item-checkbox>\n </ng-container>\n\n</div>\n", components: [{ type: TextComponent, selector: "filter-item-text" }, { type: SelectComponent, selector: "filter-item-select" }, { type: ChipsComponent, selector: "filter-item-chips" }, { type: RangeComponent, selector: "filter-item-range" }, { type: AutocompleteComponent, selector: "filter-item-autocomplete" }, { type: AutocompletechipsComponent, selector: "filter-item-autocompletechips" }, { type: DateComponent, selector: "filter-item-date" }, { type: DateRangeComponent, selector: "filter-item-date-range" }, { type: WeekComponent, selector: "filter-item-week" }, { type: CheckboxComponent, selector: "filter-item-checkbox" }], directives: [{ type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3469
3458
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterItemComponent, decorators: [{
|
|
3470
3459
|
type: Component,
|
|
3471
3460
|
args: [{
|
|
@@ -3475,20 +3464,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3475
3464
|
}]
|
|
3476
3465
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { item: [{
|
|
3477
3466
|
type: Input
|
|
3467
|
+
}], filter: [{
|
|
3468
|
+
type: Input
|
|
3478
3469
|
}] } });
|
|
3479
3470
|
|
|
3480
3471
|
class FilterDrawerComponent {
|
|
3481
|
-
constructor(externalParams, _cd, _itemsStore,
|
|
3472
|
+
constructor(externalParams, _cd, _itemsStore, _overlayRef, _data) {
|
|
3482
3473
|
this.externalParams = externalParams;
|
|
3483
3474
|
this._cd = _cd;
|
|
3484
3475
|
this._itemsStore = _itemsStore;
|
|
3485
|
-
this.
|
|
3486
|
-
this.
|
|
3476
|
+
this._overlayRef = _overlayRef;
|
|
3477
|
+
this._data = _data;
|
|
3487
3478
|
this.inline = false;
|
|
3488
3479
|
this.windowDesktop = false;
|
|
3489
3480
|
this._itemsStore.prepareItems();
|
|
3490
|
-
this._clear =
|
|
3491
|
-
this._done =
|
|
3481
|
+
this._clear = _data.clear;
|
|
3482
|
+
this._done = _data.done;
|
|
3483
|
+
this.filter = _data.filter;
|
|
3492
3484
|
this.updateWindowWidth();
|
|
3493
3485
|
}
|
|
3494
3486
|
updateWindowWidth() {
|
|
@@ -3509,19 +3501,19 @@ class FilterDrawerComponent {
|
|
|
3509
3501
|
}
|
|
3510
3502
|
done() {
|
|
3511
3503
|
this._done();
|
|
3512
|
-
this.
|
|
3504
|
+
this._overlayRef.detach();
|
|
3513
3505
|
}
|
|
3514
3506
|
backdropClick() {
|
|
3515
3507
|
this.done();
|
|
3516
3508
|
}
|
|
3517
3509
|
}
|
|
3518
3510
|
FilterDrawerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterDrawerComponent, deps: [{ token: ExternalParamsController }, { token: i0.ChangeDetectorRef }, { token: FsFilterItemsStore }, { token: FILTER_DRAWER_OVERLAY }, { token: FILTER_DRAWER_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
3519
|
-
FilterDrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterDrawerComponent, selector: "ng-component", inputs: { inline: "inline" }, host: { listeners: { "window:resize": "updateWindowWidth()" } }, ngImport: i0, template: "<div class=\"filters\">\n <div class=\"filters-wrap\">\n\n <div class=\"filter-by\">\n <mat-icon>tune</mat-icon>\n <span class=\"text\">Filters</span>\n </div>\n\n <div class=\"overflow-shadow filter-items\">\n <div class=\"overflow-shadow-content\">\n <ng-container *fsSkeleton=\"(externalParams.pending$ | async) !== true\">\n <filter-item \n *ngFor=\"let filterItem of items$ | async\"\n class=\"filter-group\"\n [item]=\"filterItem\">\n </filter-item>\n\n <ng-container *ngIf=\"sortItem && sortItem.values && sortItem.values.length > 0\">\n <filter-item \n class=\"filter-group sort\"\n [item]=\"sortItem\">\n </filter-item>\n <filter-item \n class=\"filter-group sort\"\n [item]=\"sortDirectionItem\">\n </filter-item>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <fs-filter-drawer-actions \n class=\"filter-actions\"\n *ngIf=\"(externalParams.pending$ | async) !== true\"\n (clear)=\"clear()\"\n (done)=\"done()\">\n </fs-filter-drawer-actions>\n </div>\n</div>\n<div class=\"backdrop\" *ngIf=\"!windowDesktop\" (click)=\"backdropClick()\"></div>\n", styles: [":host ::ng-deep mat-form-field{width:100%}.filter-by{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:20px 25px}.filter-by mat-icon{margin-right:8px}.filter-by .text{font-weight:400;font-size:19px}.filter-actions{display:block;box-sizing:border-box;padding:13px}.filter-actions button{margin-right:6px}.filter-actions button:last-child{margin-right:0}.filters{position:fixed;display:block;top:0;right:0;z-index:1002;bottom:0}.filters .filters-wrap{background:#fff;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;width:85vw;max-width:350px;display:flex;flex-direction:column;height:100%;padding-top:calc(env(safe-area-inset-top))}.filters .filters-wrap .filter-items{overflow-y:auto}.filters .filters-wrap .filter-items .overflow-shadow-content{padding:0 25px;box-sizing:border-box}.filters .filter-group{margin:10px 0 0}.filters .filter-group:first-child{margin:0}.filters .filter label{white-space:nowrap;color:#0000008a}.filters .filter .interface.interface-range input,.filters .filter .interface.interface-range .mat-input-wrapper{text-align:center}.filters .filter .interface.interface-range{text-align:center}.filters .filter .interface.interface-datetime fs-datetime.has-time .md-input{width:100%}.filters .filter .interface fs-datetime-range input{text-align:center}.filters .filter .filter-label{width:1%;white-space:nowrap;vertical-align:middle;padding-right:15px}.filters md-autocomplete-container md-input-container{margin:0}.filters .isolate{margin-top:-12px}.filters .isolate .interface{line-height:20px;padding-bottom:1.25em}.filters .isolate md-checkbox{margin:0 0 0 2px}.backdrop{position:fixed;top:0;bottom:0;left:0;right:0;z-index:900;outline:none}\n"], components: [{ type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: FilterItemComponent, selector: "filter-item", inputs: ["item"] }, { type: FsFilterDrawerActionsComponent, selector: "fs-filter-drawer-actions", outputs: ["clear", "done"] }], directives: [{ type: i6$1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3511
|
+
FilterDrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FilterDrawerComponent, selector: "ng-component", inputs: { inline: "inline" }, host: { listeners: { "window:resize": "updateWindowWidth()" } }, ngImport: i0, template: "<div class=\"filters\">\n <div class=\"filters-wrap\">\n\n <div class=\"filter-by\">\n <mat-icon>tune</mat-icon>\n <span class=\"text\">Filters</span>\n </div>\n\n <div class=\"overflow-shadow filter-items\">\n <div class=\"overflow-shadow-content\">\n <ng-container *fsSkeleton=\"(externalParams.pending$ | async) !== true\">\n <filter-item \n *ngFor=\"let filterItem of items$ | async\"\n class=\"filter-group\"\n [item]=\"filterItem\"\n [filter]=\"filter\">\n </filter-item>\n\n <ng-container *ngIf=\"sortItem && sortItem.values && sortItem.values.length > 0\">\n <filter-item \n class=\"filter-group sort\"\n [item]=\"sortItem\"\n [filter]=\"filter\">\n </filter-item>\n <filter-item \n class=\"filter-group sort\"\n [item]=\"sortDirectionItem\"\n [filter]=\"filter\">\n </filter-item>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <fs-filter-drawer-actions \n class=\"filter-actions\"\n *ngIf=\"(externalParams.pending$ | async) !== true\"\n (clear)=\"clear()\"\n (done)=\"done()\">\n </fs-filter-drawer-actions>\n </div>\n</div>\n<div class=\"backdrop\" *ngIf=\"!windowDesktop\" (click)=\"backdropClick()\"></div>\n", styles: [":host ::ng-deep mat-form-field{width:100%}.filter-by{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:20px 25px}.filter-by mat-icon{margin-right:8px}.filter-by .text{font-weight:400;font-size:19px}.filter-actions{display:block;box-sizing:border-box;padding:13px}.filter-actions button{margin-right:6px}.filter-actions button:last-child{margin-right:0}.filters{position:fixed;display:block;top:0;right:0;z-index:1002;bottom:0}.filters .filters-wrap{background:#fff;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;width:85vw;max-width:350px;display:flex;flex-direction:column;height:100%;padding-top:calc(env(safe-area-inset-top))}.filters .filters-wrap .filter-items{overflow-y:auto}.filters .filters-wrap .filter-items .overflow-shadow-content{padding:0 25px;box-sizing:border-box}.filters .filter-group{margin:10px 0 0}.filters .filter-group:first-child{margin:0}.filters .filter label{white-space:nowrap;color:#0000008a}.filters .filter .interface.interface-range input,.filters .filter .interface.interface-range .mat-input-wrapper{text-align:center}.filters .filter .interface.interface-range{text-align:center}.filters .filter .interface.interface-datetime fs-datetime.has-time .md-input{width:100%}.filters .filter .interface fs-datetime-range input{text-align:center}.filters .filter .filter-label{width:1%;white-space:nowrap;vertical-align:middle;padding-right:15px}.filters md-autocomplete-container md-input-container{margin:0}.filters .isolate{margin-top:-12px}.filters .isolate .interface{line-height:20px;padding-bottom:1.25em}.filters .isolate md-checkbox{margin:0 0 0 2px}.backdrop{position:fixed;top:0;bottom:0;left:0;right:0;z-index:900;outline:none}\n"], components: [{ type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: FilterItemComponent, selector: "filter-item", inputs: ["item", "filter"] }, { type: FsFilterDrawerActionsComponent, selector: "fs-filter-drawer-actions", outputs: ["clear", "done"] }], directives: [{ type: i6$1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3520
3512
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FilterDrawerComponent, decorators: [{
|
|
3521
3513
|
type: Component,
|
|
3522
3514
|
args: [{
|
|
3523
3515
|
templateUrl: './filter-drawer.component.html',
|
|
3524
|
-
styleUrls: ['filter-drawer.component.scss'],
|
|
3516
|
+
styleUrls: ['./filter-drawer.component.scss'],
|
|
3525
3517
|
// Commented out because filter items are not updating with a delayed observable. Need to figure this out.
|
|
3526
3518
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3527
3519
|
}]
|
|
@@ -3531,11 +3523,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3531
3523
|
}] }, { type: undefined, decorators: [{
|
|
3532
3524
|
type: Inject,
|
|
3533
3525
|
args: [FILTER_DRAWER_DATA]
|
|
3534
|
-
}] }]; }, propDecorators: {
|
|
3526
|
+
}] }]; }, propDecorators: { inline: [{
|
|
3527
|
+
type: Input
|
|
3528
|
+
}], updateWindowWidth: [{
|
|
3535
3529
|
type: HostListener,
|
|
3536
3530
|
args: ['window:resize']
|
|
3537
|
-
}], inline: [{
|
|
3538
|
-
type: Input
|
|
3539
3531
|
}] } });
|
|
3540
3532
|
|
|
3541
3533
|
class ActionsController {
|
|
@@ -3668,9 +3660,9 @@ const FS_FILTER_META = new InjectionToken('fs.filter.meta', {
|
|
|
3668
3660
|
});
|
|
3669
3661
|
|
|
3670
3662
|
class FsFilterOverlayService {
|
|
3671
|
-
constructor(
|
|
3672
|
-
this._injector = _injector;
|
|
3663
|
+
constructor(_filterMeta, _injector, _overlay, _focusController) {
|
|
3673
3664
|
this._filterMeta = _filterMeta;
|
|
3665
|
+
this._injector = _injector;
|
|
3674
3666
|
this._overlay = _overlay;
|
|
3675
3667
|
this._focusController = _focusController;
|
|
3676
3668
|
this.detach$ = new Subject();
|
|
@@ -3691,7 +3683,7 @@ class FsFilterOverlayService {
|
|
|
3691
3683
|
if (this._overlayRef) {
|
|
3692
3684
|
this._overlayRef.detach();
|
|
3693
3685
|
this._overlayRef = null;
|
|
3694
|
-
this.
|
|
3686
|
+
this._removeFilterClass();
|
|
3695
3687
|
}
|
|
3696
3688
|
}
|
|
3697
3689
|
open() {
|
|
@@ -3711,8 +3703,8 @@ class FsFilterOverlayService {
|
|
|
3711
3703
|
.subscribe(() => {
|
|
3712
3704
|
this.attach$.next();
|
|
3713
3705
|
});
|
|
3714
|
-
this.
|
|
3715
|
-
return this.
|
|
3706
|
+
this._addFilterClass();
|
|
3707
|
+
return this._openPortalPreview();
|
|
3716
3708
|
}
|
|
3717
3709
|
ngOnDestroy() {
|
|
3718
3710
|
this._destroy$.next();
|
|
@@ -3721,12 +3713,16 @@ class FsFilterOverlayService {
|
|
|
3721
3713
|
_createOverlay() {
|
|
3722
3714
|
const overlayConfig = new OverlayConfig({
|
|
3723
3715
|
hasBackdrop: true,
|
|
3724
|
-
backdropClass: 'fs-filter-backdrop'
|
|
3716
|
+
backdropClass: 'fs-filter-backdrop',
|
|
3725
3717
|
});
|
|
3726
3718
|
return this._overlay.create(overlayConfig);
|
|
3727
3719
|
}
|
|
3728
|
-
|
|
3729
|
-
const data = {
|
|
3720
|
+
_openPortalPreview() {
|
|
3721
|
+
const data = {
|
|
3722
|
+
done: this._doneFn,
|
|
3723
|
+
clear: this._clearFn,
|
|
3724
|
+
filter: this.filter,
|
|
3725
|
+
};
|
|
3730
3726
|
const injector = this._createInjector(this._injector, data, this._overlayRef);
|
|
3731
3727
|
const containerPortal = new ComponentPortal(FilterDrawerComponent, undefined, injector);
|
|
3732
3728
|
const containerRef = this._overlayRef.attach(containerPortal);
|
|
@@ -3739,13 +3735,13 @@ class FsFilterOverlayService {
|
|
|
3739
3735
|
]);
|
|
3740
3736
|
return new PortalInjector(parentInjector, injectionTokens);
|
|
3741
3737
|
}
|
|
3742
|
-
|
|
3738
|
+
_removeFilterClass() {
|
|
3743
3739
|
this._filterMeta.openedFilters--;
|
|
3744
3740
|
if (this._filterMeta.openedFilters === 0) {
|
|
3745
3741
|
window.document.body.classList.remove('fs-filter-open');
|
|
3746
3742
|
}
|
|
3747
3743
|
}
|
|
3748
|
-
|
|
3744
|
+
_addFilterClass() {
|
|
3749
3745
|
this._filterMeta.openedFilters++;
|
|
3750
3746
|
if (this._filterMeta.openedFilters === 1) {
|
|
3751
3747
|
window.document.body.classList.add('fs-filter-open');
|
|
@@ -3761,14 +3757,14 @@ class FsFilterOverlayService {
|
|
|
3761
3757
|
});
|
|
3762
3758
|
}
|
|
3763
3759
|
}
|
|
3764
|
-
FsFilterOverlayService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterOverlayService, deps: [{ token:
|
|
3760
|
+
FsFilterOverlayService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterOverlayService, deps: [{ token: FS_FILTER_META }, { token: i0.Injector }, { token: i1$6.Overlay }, { token: FocusControllerService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3765
3761
|
FsFilterOverlayService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterOverlayService });
|
|
3766
3762
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsFilterOverlayService, decorators: [{
|
|
3767
3763
|
type: Injectable
|
|
3768
|
-
}], ctorParameters: function () { return [{ type:
|
|
3764
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
3769
3765
|
type: Inject,
|
|
3770
3766
|
args: [FS_FILTER_META]
|
|
3771
|
-
}] }, { type: i1$6.Overlay }, { type: FocusControllerService }]; } });
|
|
3767
|
+
}] }, { type: i0.Injector }, { type: i1$6.Overlay }, { type: FocusControllerService }]; } });
|
|
3772
3768
|
|
|
3773
3769
|
class FilterStatusBarDirective {
|
|
3774
3770
|
constructor(templateRef) {
|
|
@@ -3810,6 +3806,8 @@ class FilterComponent {
|
|
|
3810
3806
|
this._hasFilterChips$ = new BehaviorSubject(false);
|
|
3811
3807
|
this._keyword$ = new Subject();
|
|
3812
3808
|
this._destroy$ = new Subject();
|
|
3809
|
+
this._filterItems.filter = this;
|
|
3810
|
+
this._filterOverlay.filter = this;
|
|
3813
3811
|
this._listenWhenFilterReady();
|
|
3814
3812
|
this._updateWindowWidth();
|
|
3815
3813
|
this._filterOverlay.attach$
|
|
@@ -4032,9 +4030,7 @@ class FilterComponent {
|
|
|
4032
4030
|
return item.model;
|
|
4033
4031
|
}));
|
|
4034
4032
|
}
|
|
4035
|
-
|
|
4036
|
-
return null;
|
|
4037
|
-
}
|
|
4033
|
+
return null;
|
|
4038
4034
|
}
|
|
4039
4035
|
changeVisibility(state) {
|
|
4040
4036
|
if (state === this.showFilterMenu) {
|
|
@@ -4119,6 +4115,7 @@ class FilterComponent {
|
|
|
4119
4115
|
}
|
|
4120
4116
|
/**
|
|
4121
4117
|
* Update filter actions config
|
|
4118
|
+
*
|
|
4122
4119
|
* @param actions
|
|
4123
4120
|
*/
|
|
4124
4121
|
updateActions(actions) {
|
|
@@ -4167,6 +4164,9 @@ class FilterComponent {
|
|
|
4167
4164
|
this._externalParams.initItems();
|
|
4168
4165
|
this._syncSearchInputWithKeyword();
|
|
4169
4166
|
}
|
|
4167
|
+
keywordChange(keyword) {
|
|
4168
|
+
this._keyword$.next(keyword);
|
|
4169
|
+
}
|
|
4170
4170
|
_initFilterWithConfig(config) {
|
|
4171
4171
|
if (this.config) {
|
|
4172
4172
|
this._filterItems.destroyItems();
|
|
@@ -4209,9 +4209,6 @@ class FilterComponent {
|
|
|
4209
4209
|
});
|
|
4210
4210
|
});
|
|
4211
4211
|
}
|
|
4212
|
-
keywordChange(keyword) {
|
|
4213
|
-
this._keyword$.next(keyword);
|
|
4214
|
-
}
|
|
4215
4212
|
_listenInputChanges() {
|
|
4216
4213
|
this._keyword$
|
|
4217
4214
|
.pipe(debounceTime(200), distinctUntilChanged(), takeUntil(this._destroy$))
|
|
@@ -4574,9 +4571,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4574
4571
|
FilterStatusBarDirective,
|
|
4575
4572
|
FsSavedFiltersMenuComponent,
|
|
4576
4573
|
],
|
|
4577
|
-
entryComponents: [
|
|
4578
|
-
FilterDrawerComponent,
|
|
4579
|
-
],
|
|
4580
4574
|
}]
|
|
4581
4575
|
}] });
|
|
4582
4576
|
|