@ethlete/query 4.3.2 → 4.3.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/esm2022/lib/auth/bearer-auth-provider.mjs +3 -1
- package/esm2022/lib/directives/infinity-query-trigger.directive.mjs +5 -6
- package/esm2022/lib/directives/infinity-query.directive.mjs +5 -6
- package/esm2022/lib/directives/query.directive.mjs +24 -25
- package/esm2022/lib/request/request.util.mjs +1 -1
- package/fesm2022/ethlete-query.mjs +30 -28
- package/fesm2022/ethlete-query.mjs.map +1 -1
- package/lib/directives/infinity-query-trigger.directive.d.ts +1 -1
- package/lib/directives/infinity-query.directive.d.ts +1 -1
- package/lib/directives/query.directive.d.ts +2 -3
- package/lib/request/request.util.d.ts +1 -1
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@ import * as i1 from '@ethlete/core';
|
|
|
2
2
|
import { BehaviorSubjectWithSubscriberCount, getCookie, setCookie, deleteCookie, createDestroy, DelayableDirective, RouterStateService, clone, equal, ET_PROPERTY_REMOVED } from '@ethlete/core';
|
|
3
3
|
import { Observable, filter, takeWhile, switchMap, of, tap, BehaviorSubject, shareReplay, Subject, takeUntil, interval, skip, map, timer, combineLatest, withLatestFrom, fromEvent, startWith, debounceTime, take, concat } from 'rxjs';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { isDevMode,
|
|
5
|
+
import { isDevMode, inject, TemplateRef, ViewContainerRef, ErrorHandler, ChangeDetectorRef, Directive, Input, InjectionToken, ElementRef, NgZone, assertInInjectionContext } from '@angular/core';
|
|
6
6
|
import { FormGroup } from '@angular/forms';
|
|
7
7
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
8
8
|
|
|
@@ -1132,7 +1132,9 @@ class BearerAuthProvider {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
else {
|
|
1134
1134
|
this._tokens$.next({
|
|
1135
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1135
1136
|
token: state.response['token'],
|
|
1137
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1136
1138
|
refreshToken: state.response['refreshToken'],
|
|
1137
1139
|
});
|
|
1138
1140
|
}
|
|
@@ -1155,6 +1157,23 @@ class BearerAuthProvider {
|
|
|
1155
1157
|
}
|
|
1156
1158
|
|
|
1157
1159
|
class QueryDirective {
|
|
1160
|
+
constructor() {
|
|
1161
|
+
this._mainTemplateRef = inject(TemplateRef);
|
|
1162
|
+
this._viewContainerRef = inject(ViewContainerRef);
|
|
1163
|
+
this._errorHandler = inject(ErrorHandler);
|
|
1164
|
+
this._cdr = inject(ChangeDetectorRef);
|
|
1165
|
+
this._isMainViewCreated = false;
|
|
1166
|
+
this._subscription = null;
|
|
1167
|
+
this._viewContext = {
|
|
1168
|
+
$implicit: null,
|
|
1169
|
+
etQuery: null,
|
|
1170
|
+
loading: false,
|
|
1171
|
+
refreshing: false,
|
|
1172
|
+
error: null,
|
|
1173
|
+
progress: null,
|
|
1174
|
+
};
|
|
1175
|
+
this._cache = false;
|
|
1176
|
+
}
|
|
1158
1177
|
get query() {
|
|
1159
1178
|
return this._query;
|
|
1160
1179
|
}
|
|
@@ -1168,23 +1187,6 @@ class QueryDirective {
|
|
|
1168
1187
|
set cache(v) {
|
|
1169
1188
|
this._cache = v;
|
|
1170
1189
|
}
|
|
1171
|
-
constructor(_mainTemplateRef, _viewContainerRef, _errorHandler, _cdr) {
|
|
1172
|
-
this._mainTemplateRef = _mainTemplateRef;
|
|
1173
|
-
this._viewContainerRef = _viewContainerRef;
|
|
1174
|
-
this._errorHandler = _errorHandler;
|
|
1175
|
-
this._cdr = _cdr;
|
|
1176
|
-
this._isMainViewCreated = false;
|
|
1177
|
-
this._subscription = null;
|
|
1178
|
-
this._viewContext = {
|
|
1179
|
-
$implicit: null,
|
|
1180
|
-
etQuery: null,
|
|
1181
|
-
loading: false,
|
|
1182
|
-
refreshing: false,
|
|
1183
|
-
error: null,
|
|
1184
|
-
progress: null,
|
|
1185
|
-
};
|
|
1186
|
-
this._cache = false;
|
|
1187
|
-
}
|
|
1188
1190
|
static ngTemplateContextGuard(dir, ctx) {
|
|
1189
1191
|
return true;
|
|
1190
1192
|
}
|
|
@@ -1244,17 +1246,17 @@ class QueryDirective {
|
|
|
1244
1246
|
this._viewContainerRef.createEmbeddedView(this._mainTemplateRef, this._viewContext);
|
|
1245
1247
|
}
|
|
1246
1248
|
}
|
|
1247
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0
|
|
1248
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0
|
|
1249
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: QueryDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1250
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.0", type: QueryDirective, isStandalone: true, selector: "[etQuery]", inputs: { query: ["etQuery", "query"], cache: ["etQueryCache", "cache"] }, ngImport: i0 }); }
|
|
1249
1251
|
}
|
|
1250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0
|
|
1252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: QueryDirective, decorators: [{
|
|
1251
1253
|
type: Directive,
|
|
1252
1254
|
args: [{
|
|
1253
1255
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
1254
1256
|
selector: '[etQuery]',
|
|
1255
1257
|
standalone: true,
|
|
1256
1258
|
}]
|
|
1257
|
-
}],
|
|
1259
|
+
}], propDecorators: { query: [{
|
|
1258
1260
|
type: Input,
|
|
1259
1261
|
args: ['etQuery']
|
|
1260
1262
|
}], cache: [{
|
|
@@ -1573,10 +1575,10 @@ class InfinityQueryDirective {
|
|
|
1573
1575
|
this._viewContext.currentQuery = null;
|
|
1574
1576
|
this._data$.next([]);
|
|
1575
1577
|
}
|
|
1576
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0
|
|
1577
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0
|
|
1578
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: InfinityQueryDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1579
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.0", type: InfinityQueryDirective, isStandalone: true, selector: "[etInfinityQuery]", inputs: { infinityQuery: ["etInfinityQuery", "infinityQuery"] }, providers: [{ provide: INFINITY_QUERY_TOKEN, useExisting: InfinityQueryDirective }], exportAs: ["etInfinityQuery"], hostDirectives: [{ directive: i1.DelayableDirective }], ngImport: i0 }); }
|
|
1578
1580
|
}
|
|
1579
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0
|
|
1581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: InfinityQueryDirective, decorators: [{
|
|
1580
1582
|
type: Directive,
|
|
1581
1583
|
args: [{
|
|
1582
1584
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -1627,10 +1629,10 @@ class InfinityQueryTriggerDirective {
|
|
|
1627
1629
|
});
|
|
1628
1630
|
this._observer.observe(this._elementRef.nativeElement);
|
|
1629
1631
|
}
|
|
1630
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0
|
|
1631
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0
|
|
1632
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: InfinityQueryTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1633
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.0", type: InfinityQueryTriggerDirective, isStandalone: true, selector: "[etInfinityQueryTrigger], et-infinity-query-trigger", inputs: { scrollContainerSelector: "scrollContainerSelector" }, ngImport: i0 }); }
|
|
1632
1634
|
}
|
|
1633
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0
|
|
1635
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: InfinityQueryTriggerDirective, decorators: [{
|
|
1634
1636
|
type: Directive,
|
|
1635
1637
|
args: [{
|
|
1636
1638
|
// eslint-disable-next-line @angular-eslint/directive-selector
|