@firestitch/filter 9.9.1 → 9.9.3
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/bundles/firestitch-filter.umd.js +12 -6
- package/bundles/firestitch-filter.umd.js.map +1 -1
- package/bundles/firestitch-filter.umd.min.js +1 -1
- package/bundles/firestitch-filter.umd.min.js.map +1 -1
- package/esm2015/app/models/items/base-item.js +2 -2
- package/esm2015/app/services/external-params-controller.service.js +12 -6
- package/esm2015/app/services/items-store.service.js +2 -2
- package/esm5/app/models/items/base-item.js +2 -2
- package/esm5/app/services/external-params-controller.service.js +12 -6
- package/esm5/app/services/items-store.service.js +2 -2
- package/fesm2015/firestitch-filter.js +13 -7
- package/fesm2015/firestitch-filter.js.map +1 -1
- package/fesm5/firestitch-filter.js +13 -7
- package/fesm5/firestitch-filter.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __extends, __assign, __decorate, __metadata, __spread, __param, __values, __read } from 'tslib';
|
|
2
2
|
import { Injectable, Optional, Inject, Component, ChangeDetectionStrategy, InjectionToken, ChangeDetectorRef, HostListener, Input, Injector, Directive, EventEmitter, NgZone, Output, ContentChild, TemplateRef, ViewChild, ElementRef, HostBinding, ViewEncapsulation, KeyValueDiffers, Pipe, Self, NgModule } from '@angular/core';
|
|
3
3
|
import { ActivatedRoute, Router, RouterModule } from '@angular/router';
|
|
4
|
-
import { BehaviorSubject, Subject, isObservable, forkJoin, of, fromEvent,
|
|
4
|
+
import { BehaviorSubject, Subject, isObservable, forkJoin, combineLatest, of, fromEvent, merge, timer } from 'rxjs';
|
|
5
5
|
import { tap, finalize, take, takeUntil, debounceTime, filter as filter$1, distinctUntilChanged, switchMap, skip, map, mapTo, startWith, delay } from 'rxjs/operators';
|
|
6
6
|
import { isFunction, clone, isObject, isString, toString, pickBy } from 'lodash-es';
|
|
7
7
|
import { Alias, Model } from 'tsmodels';
|
|
@@ -308,6 +308,7 @@ var BaseItem = /** @class */ (function () {
|
|
|
308
308
|
});
|
|
309
309
|
BaseItem.prototype.loadDefaultValue = function () {
|
|
310
310
|
var _this = this;
|
|
311
|
+
this._pendingDefaultValue = true;
|
|
311
312
|
return this.defaultValueFn()
|
|
312
313
|
.pipe(tap(function (value) {
|
|
313
314
|
_this.defaultValue = value;
|
|
@@ -380,7 +381,6 @@ var BaseItem = /** @class */ (function () {
|
|
|
380
381
|
this.label = item.label;
|
|
381
382
|
this.chipLabel = item.chipLabel;
|
|
382
383
|
if (typeof item.default === 'function') {
|
|
383
|
-
this._pendingDefaultValue = true;
|
|
384
384
|
this.defaultValueFn = item.default;
|
|
385
385
|
}
|
|
386
386
|
else {
|
|
@@ -1683,7 +1683,7 @@ var FsFilterItemsStore = /** @class */ (function () {
|
|
|
1683
1683
|
var _this = this;
|
|
1684
1684
|
var pendingItems = this.items
|
|
1685
1685
|
.filter(function (item) {
|
|
1686
|
-
return item.
|
|
1686
|
+
return item.defaultValueFn
|
|
1687
1687
|
&& (item.persistedValue === null || item.persistedValue === undefined);
|
|
1688
1688
|
});
|
|
1689
1689
|
if (pendingItems.length > 0) {
|
|
@@ -2461,8 +2461,10 @@ var ExternalParamsController = /** @class */ (function () {
|
|
|
2461
2461
|
this._initSavedFilters();
|
|
2462
2462
|
this._pending$.next(true);
|
|
2463
2463
|
if (this._savedFilters.enabled) {
|
|
2464
|
-
|
|
2465
|
-
.
|
|
2464
|
+
combineLatest([
|
|
2465
|
+
this._itemsStore.ready$,
|
|
2466
|
+
this._savedFilters.load(),
|
|
2467
|
+
])
|
|
2466
2468
|
.pipe(takeUntil(this._destroy$))
|
|
2467
2469
|
.subscribe(function () {
|
|
2468
2470
|
_this._savedFilters.updateActiveFilter();
|
|
@@ -2472,8 +2474,12 @@ var ExternalParamsController = /** @class */ (function () {
|
|
|
2472
2474
|
});
|
|
2473
2475
|
}
|
|
2474
2476
|
else {
|
|
2475
|
-
this.
|
|
2476
|
-
|
|
2477
|
+
this._itemsStore.ready$
|
|
2478
|
+
.pipe(takeUntil(this._destroy$))
|
|
2479
|
+
.subscribe(function () {
|
|
2480
|
+
_this._initItemsValues();
|
|
2481
|
+
_this._pending$.next(false);
|
|
2482
|
+
});
|
|
2477
2483
|
}
|
|
2478
2484
|
this._listenItemsChange();
|
|
2479
2485
|
};
|