@ethlete/query 2.5.2 → 2.5.4
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/esm2020/lib/auth/bearer-auth-provider.mjs +2 -2
- package/esm2020/lib/directives/infinity-query-trigger.directive.mjs +3 -3
- package/esm2020/lib/directives/infinity-query.directive.mjs +3 -3
- package/esm2020/lib/directives/query.directive.mjs +3 -3
- package/esm2020/lib/query/query.mjs +7 -2
- package/esm2020/lib/query-form/query-form.mjs +5 -5
- package/fesm2015/ethlete-query.mjs +21 -16
- package/fesm2015/ethlete-query.mjs.map +1 -1
- package/fesm2020/ethlete-query.mjs +20 -15
- package/fesm2020/ethlete-query.mjs.map +1 -1
- package/lib/query-form/query-form.d.ts +6 -2
- package/package.json +2 -2
|
@@ -847,7 +847,12 @@ class Query {
|
|
|
847
847
|
: interval(config.interval);
|
|
848
848
|
this._pollingSubscription = _interval
|
|
849
849
|
.pipe(takeUntil(config.takeUntil), finalize(() => this.stopPolling()))
|
|
850
|
-
.subscribe(() =>
|
|
850
|
+
.subscribe(() => {
|
|
851
|
+
if (this.state.type === "LOADING" /* QueryStateType.Loading */) {
|
|
852
|
+
return;
|
|
853
|
+
}
|
|
854
|
+
this.execute({ skipCache: true, _triggeredVia: 'poll' });
|
|
855
|
+
});
|
|
851
856
|
return this;
|
|
852
857
|
}
|
|
853
858
|
stopPolling() {
|
|
@@ -948,7 +953,7 @@ class BearerAuthProvider {
|
|
|
948
953
|
}
|
|
949
954
|
if (this.tokens.token) {
|
|
950
955
|
this._prepareForRefresh();
|
|
951
|
-
if (this.tokens.refreshToken && this._config.refreshConfig?.cookieName) {
|
|
956
|
+
if (this.tokens.refreshToken && this._config.refreshConfig?.cookieName && cookieEnabled) {
|
|
952
957
|
setCookie(this._config.refreshConfig.cookieName, this.tokens.refreshToken);
|
|
953
958
|
}
|
|
954
959
|
}
|
|
@@ -1134,9 +1139,9 @@ class QueryDirective {
|
|
|
1134
1139
|
}
|
|
1135
1140
|
}
|
|
1136
1141
|
}
|
|
1137
|
-
QueryDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1138
|
-
QueryDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.
|
|
1139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1142
|
+
QueryDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: QueryDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.ErrorHandler }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1143
|
+
QueryDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.3", type: QueryDirective, isStandalone: true, selector: "[query]", inputs: { query: "query", cache: ["queryCache", "cache"] }, ngImport: i0 });
|
|
1144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: QueryDirective, decorators: [{
|
|
1140
1145
|
type: Directive,
|
|
1141
1146
|
args: [{
|
|
1142
1147
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -1474,9 +1479,9 @@ class InfinityQueryDirective {
|
|
|
1474
1479
|
this._data$.next([]);
|
|
1475
1480
|
}
|
|
1476
1481
|
}
|
|
1477
|
-
InfinityQueryDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1478
|
-
InfinityQueryDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.
|
|
1479
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1482
|
+
InfinityQueryDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: InfinityQueryDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1483
|
+
InfinityQueryDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.3", type: InfinityQueryDirective, isStandalone: true, selector: "[infinityQuery]", inputs: { infinityQuery: "infinityQuery" }, providers: [{ provide: INFINITY_QUERY_TOKEN, useExisting: InfinityQueryDirective }, DestroyService], exportAs: ["infinityQuery"], ngImport: i0 });
|
|
1484
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: InfinityQueryDirective, decorators: [{
|
|
1480
1485
|
type: Directive,
|
|
1481
1486
|
args: [{
|
|
1482
1487
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -1526,9 +1531,9 @@ class InfinityQueryTriggerDirective {
|
|
|
1526
1531
|
this._observer.observe(this._elementRef.nativeElement);
|
|
1527
1532
|
}
|
|
1528
1533
|
}
|
|
1529
|
-
InfinityQueryTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
1530
|
-
InfinityQueryTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.
|
|
1531
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
1534
|
+
InfinityQueryTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: InfinityQueryTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1535
|
+
InfinityQueryTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.3", type: InfinityQueryTriggerDirective, isStandalone: true, selector: "[infinityQueryTrigger], infinity-query-trigger", inputs: { scrollContainerSelector: "scrollContainerSelector" }, ngImport: i0 });
|
|
1536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: InfinityQueryTriggerDirective, decorators: [{
|
|
1532
1537
|
type: Directive,
|
|
1533
1538
|
args: [{
|
|
1534
1539
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -1792,11 +1797,11 @@ class QueryField {
|
|
|
1792
1797
|
this.changes$ = this._setupChangesObservable();
|
|
1793
1798
|
this._currentDebounceTimeout = null;
|
|
1794
1799
|
}
|
|
1795
|
-
setValue(value) {
|
|
1800
|
+
setValue(value, options) {
|
|
1796
1801
|
if (this._currentDebounceTimeout !== null) {
|
|
1797
1802
|
clearTimeout(this._currentDebounceTimeout);
|
|
1798
1803
|
}
|
|
1799
|
-
if (this.data.debounce) {
|
|
1804
|
+
if (this.data.debounce && !options?.skipDebounce) {
|
|
1800
1805
|
this._currentDebounceTimeout = window.setTimeout(() => {
|
|
1801
1806
|
this.control.setValue(value);
|
|
1802
1807
|
}, this.data.debounce);
|
|
@@ -1831,7 +1836,7 @@ class QueryForm {
|
|
|
1831
1836
|
}
|
|
1832
1837
|
}));
|
|
1833
1838
|
}
|
|
1834
|
-
setFormValueFromUrlQueryParams() {
|
|
1839
|
+
setFormValueFromUrlQueryParams(options) {
|
|
1835
1840
|
if (!this._activatedRoute) {
|
|
1836
1841
|
throw new Error('Cannot set form value from url query params without ActivatedRoute');
|
|
1837
1842
|
}
|
|
@@ -1843,7 +1848,7 @@ class QueryForm {
|
|
|
1843
1848
|
continue;
|
|
1844
1849
|
}
|
|
1845
1850
|
const deserializedValue = field.data.queryParamToValueTransformFn?.(value) ?? value;
|
|
1846
|
-
field.setValue(deserializedValue);
|
|
1851
|
+
field.setValue(deserializedValue, { skipDebounce: options?.skipDebounce ?? true });
|
|
1847
1852
|
}
|
|
1848
1853
|
}
|
|
1849
1854
|
updateFormOnUrlQueryParamsChange() {
|