@ethlete/query 4.1.0 → 4.2.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i1 from '@ethlete/core';
|
|
2
2
|
import { BehaviorSubjectWithSubscriberCount, getCookie, setCookie, deleteCookie, DestroyService, DelayableDirective, equal, clone } from '@ethlete/core';
|
|
3
|
-
import { Observable, filter, takeWhile, switchMap, of, tap, BehaviorSubject, shareReplay, Subject, takeUntil, interval, skip, map, timer, combineLatest, withLatestFrom, fromEvent, startWith, take, concat,
|
|
3
|
+
import { Observable, filter, takeWhile, switchMap, of, tap, BehaviorSubject, shareReplay, Subject, takeUntil, interval, skip, map, timer, combineLatest, withLatestFrom, fromEvent, startWith, debounceTime, take, concat, distinctUntilChanged, pairwise } from 'rxjs';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { isDevMode, Directive, Input, InjectionToken, inject, ChangeDetectorRef, ViewContainerRef, TemplateRef, ErrorHandler, ElementRef } from '@angular/core';
|
|
6
6
|
import { FormGroup } from '@angular/forms';
|
|
@@ -1659,6 +1659,12 @@ class EntityStore {
|
|
|
1659
1659
|
}
|
|
1660
1660
|
return this._select(keyOrKeys);
|
|
1661
1661
|
}
|
|
1662
|
+
/**
|
|
1663
|
+
* **Note:** Prefer `select` over `selectWhere` when possible.
|
|
1664
|
+
*/
|
|
1665
|
+
selectWhere(predicate) {
|
|
1666
|
+
return this._change$.pipe(startWith(null), debounceTime(0), map(() => Array.from(this._dictionary.values()).filter(predicate)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
1667
|
+
}
|
|
1662
1668
|
set(keyOrKeys, valueOrValues) {
|
|
1663
1669
|
if (Array.isArray(keyOrKeys)) {
|
|
1664
1670
|
if (!Array.isArray(valueOrValues)) {
|