@ethlete/query 0.1.0-next.1 → 0.1.0-next.10
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 +4 -3
- package/esm2020/lib/directives/infinity-query-trigger.directive.mjs +3 -3
- package/esm2020/lib/directives/infinity-query.directive.mjs +37 -10
- package/esm2020/lib/directives/query.directive.mjs +3 -3
- package/esm2020/lib/infinite-query/infinity-query.types.mjs +1 -1
- package/esm2020/lib/query/query.mjs +6 -2
- package/esm2020/lib/query/query.utils.mjs +17 -2
- package/esm2020/lib/query-form/query-form.mjs +7 -4
- package/esm2020/lib/query-form/query-form.types.mjs +1 -1
- package/esm2020/lib/query-form/query-form.utils.mjs +21 -1
- package/esm2020/lib/request/request.mjs +5 -3
- package/esm2020/lib/request/request.types.mjs +1 -1
- package/esm2020/lib/request/request.util.mjs +24 -6
- package/esm2020/lib/utils/deep-freeze.util.mjs +5 -1
- package/fesm2015/ethlete-query.mjs +126 -29
- package/fesm2015/ethlete-query.mjs.map +1 -1
- package/fesm2020/ethlete-query.mjs +123 -29
- package/fesm2020/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 +8 -2
- package/lib/directives/query.directive.d.ts +1 -1
- package/lib/infinite-query/infinity-query.types.d.ts +5 -2
- package/lib/query/query.utils.d.ts +8 -3
- package/lib/query-form/query-form.d.ts +1 -1
- package/lib/query-form/query-form.types.d.ts +11 -1
- package/lib/query-form/query-form.utils.d.ts +5 -0
- package/lib/request/request.types.d.ts +2 -0
- package/lib/request/request.util.d.ts +2 -2
- package/lib/utils/deep-freeze.util.d.ts +1 -1
- package/package.json +6 -5
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { Subject, timer, filter, takeWhile, BehaviorSubject, interval, takeUntil, tap,
|
|
1
|
+
import { Subject, timer, filter, takeWhile, switchMap, of, BehaviorSubject, interval, takeUntil, tap, fromEvent, startWith, concat, take, debounceTime, combineLatest, map, distinctUntilChanged } from 'rxjs';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { Directive, Input, InjectionToken, inject, ChangeDetectorRef, ViewContainerRef, TemplateRef, ErrorHandler, ElementRef } from '@angular/core';
|
|
4
|
+
import * as i1 from '@ethlete/core';
|
|
5
|
+
import { DestroyDirective } from '@ethlete/core';
|
|
4
6
|
import { FormGroup } from '@angular/forms';
|
|
5
7
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
6
8
|
|
|
@@ -164,13 +166,15 @@ const buildTimestampFromSeconds = (seconds) => {
|
|
|
164
166
|
}
|
|
165
167
|
return new Date(Date.now() + seconds * 1000).getTime();
|
|
166
168
|
};
|
|
167
|
-
const buildRequestError = async (error) => {
|
|
169
|
+
const buildRequestError = async (error, route, requestInit) => {
|
|
168
170
|
if (error instanceof DOMException && error.code === error.ABORT_ERR) {
|
|
169
171
|
const err = {
|
|
170
172
|
code: -1,
|
|
171
173
|
message: 'Request aborted',
|
|
172
174
|
detail: null,
|
|
173
175
|
raw: error,
|
|
176
|
+
route,
|
|
177
|
+
requestInit,
|
|
174
178
|
};
|
|
175
179
|
return err;
|
|
176
180
|
}
|
|
@@ -180,6 +184,8 @@ const buildRequestError = async (error) => {
|
|
|
180
184
|
message: 'Syntax error',
|
|
181
185
|
detail: null,
|
|
182
186
|
raw: error,
|
|
187
|
+
route,
|
|
188
|
+
requestInit,
|
|
183
189
|
};
|
|
184
190
|
return err;
|
|
185
191
|
}
|
|
@@ -189,23 +195,35 @@ const buildRequestError = async (error) => {
|
|
|
189
195
|
message: `${error.name}: ${error.message}`,
|
|
190
196
|
detail: null,
|
|
191
197
|
raw: error,
|
|
198
|
+
route,
|
|
199
|
+
requestInit,
|
|
192
200
|
};
|
|
193
201
|
return err;
|
|
194
202
|
}
|
|
195
203
|
if (isFetchResponse(error)) {
|
|
196
204
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
197
|
-
let detail;
|
|
205
|
+
let detail = null;
|
|
198
206
|
try {
|
|
199
|
-
detail = await error.
|
|
207
|
+
detail = await error.json();
|
|
200
208
|
}
|
|
201
|
-
catch
|
|
202
|
-
|
|
209
|
+
catch {
|
|
210
|
+
// noop
|
|
211
|
+
}
|
|
212
|
+
if (!detail) {
|
|
213
|
+
try {
|
|
214
|
+
detail = await error.text();
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
// noop
|
|
218
|
+
}
|
|
203
219
|
}
|
|
204
220
|
const err = {
|
|
205
221
|
code: error.status,
|
|
206
222
|
message: error.statusText,
|
|
207
223
|
detail,
|
|
208
224
|
raw: error,
|
|
225
|
+
route,
|
|
226
|
+
requestInit,
|
|
209
227
|
};
|
|
210
228
|
return err;
|
|
211
229
|
}
|
|
@@ -214,6 +232,8 @@ const buildRequestError = async (error) => {
|
|
|
214
232
|
message: 'Unknown error',
|
|
215
233
|
detail: null,
|
|
216
234
|
raw: error,
|
|
235
|
+
route,
|
|
236
|
+
requestInit,
|
|
217
237
|
};
|
|
218
238
|
return err;
|
|
219
239
|
};
|
|
@@ -260,7 +280,9 @@ const request = async (options) => {
|
|
|
260
280
|
if (!response.ok) {
|
|
261
281
|
throw response;
|
|
262
282
|
}
|
|
263
|
-
const
|
|
283
|
+
const isJsonResponse = response.headers.get('Content-Type')?.includes('application/json');
|
|
284
|
+
const isTextResponse = response.headers.get('Content-Type')?.includes('text/plain');
|
|
285
|
+
const data = (isJsonResponse ? await response.json() : isTextResponse ? await response.text() : null);
|
|
264
286
|
const expiresInSeconds = options.cacheAdapter
|
|
265
287
|
? options.cacheAdapter(response.headers)
|
|
266
288
|
: extractExpiresInSeconds(response.headers);
|
|
@@ -268,7 +290,7 @@ const request = async (options) => {
|
|
|
268
290
|
return { data, expiresInTimestamp };
|
|
269
291
|
}
|
|
270
292
|
catch (error) {
|
|
271
|
-
throw await buildRequestError(error);
|
|
293
|
+
throw await buildRequestError(error, options.route, options.init);
|
|
272
294
|
}
|
|
273
295
|
};
|
|
274
296
|
|
|
@@ -345,11 +367,12 @@ class BearerAuthProvider {
|
|
|
345
367
|
route,
|
|
346
368
|
});
|
|
347
369
|
const body = bodyAdapter ? bodyAdapter(this._refreshToken) : { refreshToken: this._refreshToken };
|
|
370
|
+
const requestInit = { body: buildBody(body), method };
|
|
348
371
|
this.onRefreshInitiation$.next();
|
|
349
372
|
try {
|
|
350
373
|
const result = await request({
|
|
351
374
|
route: fullRoute,
|
|
352
|
-
init:
|
|
375
|
+
init: requestInit,
|
|
353
376
|
});
|
|
354
377
|
const tokens = responseAdapter ? responseAdapter(result.data) : result.data;
|
|
355
378
|
if (!tokens.token) {
|
|
@@ -364,7 +387,7 @@ class BearerAuthProvider {
|
|
|
364
387
|
}
|
|
365
388
|
catch (error) {
|
|
366
389
|
if (error instanceof Error) {
|
|
367
|
-
this.onRefreshFailure$.next(await buildRequestError(error));
|
|
390
|
+
this.onRefreshFailure$.next(await buildRequestError(error, fullRoute, requestInit));
|
|
368
391
|
}
|
|
369
392
|
else {
|
|
370
393
|
this.onRefreshFailure$.next(error);
|
|
@@ -397,6 +420,10 @@ const gql = (strings, ...values) => {
|
|
|
397
420
|
};
|
|
398
421
|
|
|
399
422
|
const deepFreeze = (object) => {
|
|
423
|
+
// check if object is actually an object or frozen
|
|
424
|
+
if (!object || typeof object !== 'object' || Object.isFrozen(object)) {
|
|
425
|
+
return object;
|
|
426
|
+
}
|
|
400
427
|
// Retrieve the property names defined on object
|
|
401
428
|
const propNames = Object.getOwnPropertyNames(object);
|
|
402
429
|
// Freeze properties before freezing self
|
|
@@ -427,11 +454,26 @@ function filterFailure() {
|
|
|
427
454
|
return source.pipe(filter((value) => isQueryStateFailure(value)));
|
|
428
455
|
};
|
|
429
456
|
}
|
|
457
|
+
function filterQueryStates(allowedStates) {
|
|
458
|
+
return function (source) {
|
|
459
|
+
return source.pipe(filter((value) => value && allowedStates.includes(value.type)));
|
|
460
|
+
};
|
|
461
|
+
}
|
|
430
462
|
function takeUntilResponse() {
|
|
431
463
|
return function (source) {
|
|
432
464
|
return source.pipe(takeWhile((value) => isQueryStateLoading(value), true));
|
|
433
465
|
};
|
|
434
466
|
}
|
|
467
|
+
function filterNull() {
|
|
468
|
+
return function (source) {
|
|
469
|
+
return source.pipe(filter((value) => value !== null));
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
function switchQueryState() {
|
|
473
|
+
return function (source) {
|
|
474
|
+
return source.pipe(switchMap((value) => value?.state$ ?? of(null)));
|
|
475
|
+
};
|
|
476
|
+
}
|
|
435
477
|
const isQueryStateLoading = (state) => state?.type === "LOADING" /* QueryStateType.Loading */;
|
|
436
478
|
const isQueryStateSuccess = (state) => state?.type === "SUCCESS" /* QueryStateType.Success */;
|
|
437
479
|
const isQueryStateFailure = (state) => state?.type === "FAILURE" /* QueryStateType.Failure */;
|
|
@@ -559,7 +601,11 @@ class Query {
|
|
|
559
601
|
const isResponseObject = typeof response === 'object';
|
|
560
602
|
const isGql = isGqlQueryConfig(this._queryConfig);
|
|
561
603
|
let responseData = null;
|
|
562
|
-
if (isGql &&
|
|
604
|
+
if (isGql &&
|
|
605
|
+
isResponseObject &&
|
|
606
|
+
!!response.data &&
|
|
607
|
+
typeof response.data === 'object' &&
|
|
608
|
+
'data' in response.data) {
|
|
563
609
|
responseData = response.data['data'];
|
|
564
610
|
}
|
|
565
611
|
else {
|
|
@@ -698,9 +744,9 @@ class QueryDirective {
|
|
|
698
744
|
}
|
|
699
745
|
}
|
|
700
746
|
}
|
|
701
|
-
QueryDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
702
|
-
QueryDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
703
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
747
|
+
QueryDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: QueryDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.ErrorHandler }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
748
|
+
QueryDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: QueryDirective, isStandalone: true, selector: "[query]", inputs: { query: "query", cache: ["queryCache", "cache"] }, ngImport: i0 });
|
|
749
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: QueryDirective, decorators: [{
|
|
704
750
|
type: Directive,
|
|
705
751
|
args: [{
|
|
706
752
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -880,6 +926,7 @@ const skipPaginationPageParamCalculator = ({ page, itemsPerPage }) => itemsPerPa
|
|
|
880
926
|
const INFINITY_QUERY_TOKEN = new InjectionToken('INFINITY_QUERY_TOKEN');
|
|
881
927
|
class InfinityQueryDirective {
|
|
882
928
|
constructor() {
|
|
929
|
+
this._queryConfigChanged$ = new Subject();
|
|
883
930
|
this._viewContext = {
|
|
884
931
|
$implicit: null,
|
|
885
932
|
infinityQuery: null,
|
|
@@ -893,17 +940,19 @@ class InfinityQueryDirective {
|
|
|
893
940
|
itemsPerPage: null,
|
|
894
941
|
};
|
|
895
942
|
this._infinityQueryInstance = null;
|
|
896
|
-
this._destroy$ =
|
|
943
|
+
this._destroy$ = inject(DestroyDirective).destroy$;
|
|
897
944
|
this._cdr = inject(ChangeDetectorRef);
|
|
898
945
|
this._viewContainerRef = inject(ViewContainerRef);
|
|
899
946
|
this._mainTemplateRef = inject((TemplateRef));
|
|
900
947
|
this._errorHandler = inject(ErrorHandler);
|
|
948
|
+
this._data$ = new BehaviorSubject([]);
|
|
901
949
|
this._isMainViewCreated = false;
|
|
902
950
|
}
|
|
903
951
|
get infinityQuery() {
|
|
904
952
|
return this._infinityQuery;
|
|
905
953
|
}
|
|
906
954
|
set infinityQuery(v) {
|
|
955
|
+
this._cleanup();
|
|
907
956
|
this._infinityQuery = v;
|
|
908
957
|
this._infinityQueryInstance = this._setupInfinityQuery(v);
|
|
909
958
|
this._loadNextPage();
|
|
@@ -914,6 +963,12 @@ class InfinityQueryDirective {
|
|
|
914
963
|
get instance() {
|
|
915
964
|
return this._infinityQueryInstance;
|
|
916
965
|
}
|
|
966
|
+
get data$() {
|
|
967
|
+
return this._data$.asObservable();
|
|
968
|
+
}
|
|
969
|
+
get data() {
|
|
970
|
+
return this._data$.getValue();
|
|
971
|
+
}
|
|
917
972
|
static ngTemplateContextGuard(dir, ctx) {
|
|
918
973
|
return true;
|
|
919
974
|
}
|
|
@@ -921,8 +976,6 @@ class InfinityQueryDirective {
|
|
|
921
976
|
this._renderMainView();
|
|
922
977
|
}
|
|
923
978
|
ngOnDestroy() {
|
|
924
|
-
this._destroy$.next(true);
|
|
925
|
-
this._destroy$.unsubscribe();
|
|
926
979
|
this.instance?._destroy();
|
|
927
980
|
}
|
|
928
981
|
_setupInfinityQuery(config) {
|
|
@@ -961,15 +1014,17 @@ class InfinityQueryDirective {
|
|
|
961
1014
|
this._viewContext.currentPage = null;
|
|
962
1015
|
this._viewContext.itemsPerPage = null;
|
|
963
1016
|
this._viewContext.totalPages = null;
|
|
1017
|
+
this._data$.next([]);
|
|
964
1018
|
}
|
|
965
1019
|
this._cdr.markForCheck();
|
|
966
|
-
}), takeUntil(this._destroy$))
|
|
1020
|
+
}), takeUntil(this._destroy$), takeUntil(this._queryConfigChanged$))
|
|
967
1021
|
.subscribe();
|
|
968
1022
|
instance.data$
|
|
969
1023
|
.pipe(tap((data) => {
|
|
970
1024
|
this._viewContext.infinityQuery = this._viewContext.$implicit = data;
|
|
1025
|
+
this._data$.next(data);
|
|
971
1026
|
this._cdr.markForCheck();
|
|
972
|
-
}), takeUntil(this._destroy$))
|
|
1027
|
+
}), takeUntil(this._destroy$), takeUntil(this._queryConfigChanged$))
|
|
973
1028
|
.subscribe();
|
|
974
1029
|
return instance;
|
|
975
1030
|
}
|
|
@@ -985,16 +1040,32 @@ class InfinityQueryDirective {
|
|
|
985
1040
|
this._viewContainerRef.createEmbeddedView(this._mainTemplateRef, this._viewContext);
|
|
986
1041
|
}
|
|
987
1042
|
}
|
|
1043
|
+
_cleanup() {
|
|
1044
|
+
this._queryConfigChanged$.next(true);
|
|
1045
|
+
this.instance?._destroy();
|
|
1046
|
+
this._viewContext.loading = false;
|
|
1047
|
+
this._viewContext.error = null;
|
|
1048
|
+
this._viewContext.infinityQuery = null;
|
|
1049
|
+
this._viewContext.$implicit = null;
|
|
1050
|
+
this._viewContext.isFirstLoad = false;
|
|
1051
|
+
this._viewContext.canLoadMore = false;
|
|
1052
|
+
this._viewContext.currentPage = null;
|
|
1053
|
+
this._viewContext.itemsPerPage = null;
|
|
1054
|
+
this._viewContext.totalPages = null;
|
|
1055
|
+
this._data$.next([]);
|
|
1056
|
+
}
|
|
988
1057
|
}
|
|
989
|
-
InfinityQueryDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
990
|
-
InfinityQueryDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
991
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1058
|
+
InfinityQueryDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: InfinityQueryDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1059
|
+
InfinityQueryDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: InfinityQueryDirective, isStandalone: true, selector: "[infinityQuery]", inputs: { infinityQuery: "infinityQuery" }, providers: [{ provide: INFINITY_QUERY_TOKEN, useExisting: InfinityQueryDirective }], exportAs: ["infinityQuery"], hostDirectives: [{ directive: i1.DestroyDirective }], ngImport: i0 });
|
|
1060
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: InfinityQueryDirective, decorators: [{
|
|
992
1061
|
type: Directive,
|
|
993
1062
|
args: [{
|
|
994
1063
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
995
1064
|
selector: '[infinityQuery]',
|
|
1065
|
+
exportAs: 'infinityQuery',
|
|
996
1066
|
standalone: true,
|
|
997
1067
|
providers: [{ provide: INFINITY_QUERY_TOKEN, useExisting: InfinityQueryDirective }],
|
|
1068
|
+
hostDirectives: [DestroyDirective],
|
|
998
1069
|
}]
|
|
999
1070
|
}], propDecorators: { infinityQuery: [{
|
|
1000
1071
|
type: Input
|
|
@@ -1037,9 +1108,9 @@ class InfinityQueryTriggerDirective {
|
|
|
1037
1108
|
this._observer.observe(this._elementRef.nativeElement);
|
|
1038
1109
|
}
|
|
1039
1110
|
}
|
|
1040
|
-
InfinityQueryTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1041
|
-
InfinityQueryTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1042
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1111
|
+
InfinityQueryTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: InfinityQueryTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1112
|
+
InfinityQueryTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: InfinityQueryTriggerDirective, isStandalone: true, selector: "[infinityQueryTrigger], infinity-query-trigger", inputs: { scrollContainerSelector: "scrollContainerSelector" }, ngImport: i0 });
|
|
1113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: InfinityQueryTriggerDirective, decorators: [{
|
|
1043
1114
|
type: Directive,
|
|
1044
1115
|
args: [{
|
|
1045
1116
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -1268,10 +1339,11 @@ class QueryForm {
|
|
|
1268
1339
|
const queryParams = this._activatedRoute.snapshot.queryParams;
|
|
1269
1340
|
for (const [key, field] of Object.entries(this._fields)) {
|
|
1270
1341
|
const value = queryParams[key];
|
|
1271
|
-
|
|
1342
|
+
// We only check using == because the value types can be different (e.g. "1" and 1)
|
|
1343
|
+
if (value === undefined || value == field.control.value) {
|
|
1272
1344
|
continue;
|
|
1273
1345
|
}
|
|
1274
|
-
const deserializedValue = field.data.
|
|
1346
|
+
const deserializedValue = field.data.queryParamToValueTransformFn?.(value) ?? value;
|
|
1275
1347
|
field.setValue(deserializedValue);
|
|
1276
1348
|
}
|
|
1277
1349
|
}
|
|
@@ -1321,7 +1393,9 @@ class QueryForm {
|
|
|
1321
1393
|
delete queryParams[key];
|
|
1322
1394
|
}
|
|
1323
1395
|
else {
|
|
1324
|
-
queryParams[key] =
|
|
1396
|
+
queryParams[key] = this._fields[key].data.valueToQueryParamTransformFn
|
|
1397
|
+
? this._fields[key].data.valueToQueryParamTransformFn?.(value)
|
|
1398
|
+
: value;
|
|
1325
1399
|
}
|
|
1326
1400
|
}
|
|
1327
1401
|
this._router.navigate([], {
|
|
@@ -1403,10 +1477,30 @@ const transformToDateArray = (value) => {
|
|
|
1403
1477
|
}
|
|
1404
1478
|
return null;
|
|
1405
1479
|
};
|
|
1480
|
+
const transformToSort = (value) => {
|
|
1481
|
+
if (typeof value === 'string') {
|
|
1482
|
+
const [active, direction] = value.split(':');
|
|
1483
|
+
return {
|
|
1484
|
+
active,
|
|
1485
|
+
direction: direction,
|
|
1486
|
+
};
|
|
1487
|
+
}
|
|
1488
|
+
return null;
|
|
1489
|
+
};
|
|
1490
|
+
const transformToSortQueryParam = (value) => {
|
|
1491
|
+
if (typeof value === 'string') {
|
|
1492
|
+
return value;
|
|
1493
|
+
}
|
|
1494
|
+
if (value && typeof value === 'object' && 'active' in value && 'direction' in value) {
|
|
1495
|
+
const valAsSort = value;
|
|
1496
|
+
return valAsSort.direction ? `${valAsSort.active}:${valAsSort.direction}` : null;
|
|
1497
|
+
}
|
|
1498
|
+
return null;
|
|
1499
|
+
};
|
|
1406
1500
|
|
|
1407
1501
|
/**
|
|
1408
1502
|
* Generated bundle index. Do not edit.
|
|
1409
1503
|
*/
|
|
1410
1504
|
|
|
1411
|
-
export { BasicAuthProvider, BearerAuthProvider, CustomHeaderAuthProvider, INFINITY_QUERY_TOKEN, InfinityQuery, InfinityQueryDirective, InfinityQueryTriggerDirective, Query, QueryClient, QueryDirective, QueryError, QueryField, QueryForm, QueryStore, buildBody, buildErrorMessage, buildGqlCacheKey, buildQueryArrayString, buildQueryString, buildRequestError, buildRoute, buildTimestampFromSeconds, createInfinityQueryConfig, decryptBearer, deepFreeze, def, extractExpiresInSeconds, filterFailure, filterInvalidParams, filterSuccess, gql, guessContentType, invalidBaseRouteError, invalidBodyError, invalidRouteError, isAbortRequestError, isBasicAuthProvider, isBearerAuthProvider, isCustomHeaderAuthProvider, isFetchResponse, isGqlQueryConfig, isParamValid, isQueryStateCancelled, isQueryStateFailure, isQueryStateLoading, isQueryStatePrepared, isQueryStateSuccess, isRequestError, mergeHeaders, pathParamsMissingInRouteFunctionError, queryStateAlreadyHasKeyError, queryStateCannotTransformError, queryStateDoesNotContainKeyError, request, shouldCacheQuery, skipPaginationPageParamCalculator, takeUntilResponse, transformGql, transformMethod, transformToBoolean, transformToBooleanArray, transformToDate, transformToDateArray, transformToNumber, transformToNumberArray, transformToString, transformToStringArray };
|
|
1505
|
+
export { BasicAuthProvider, BearerAuthProvider, CustomHeaderAuthProvider, INFINITY_QUERY_TOKEN, InfinityQuery, InfinityQueryDirective, InfinityQueryTriggerDirective, Query, QueryClient, QueryDirective, QueryError, QueryField, QueryForm, QueryStore, buildBody, buildErrorMessage, buildGqlCacheKey, buildQueryArrayString, buildQueryString, buildRequestError, buildRoute, buildTimestampFromSeconds, createInfinityQueryConfig, decryptBearer, deepFreeze, def, extractExpiresInSeconds, filterFailure, filterInvalidParams, filterNull, filterQueryStates, filterSuccess, gql, guessContentType, invalidBaseRouteError, invalidBodyError, invalidRouteError, isAbortRequestError, isBasicAuthProvider, isBearerAuthProvider, isCustomHeaderAuthProvider, isFetchResponse, isGqlQueryConfig, isParamValid, isQueryStateCancelled, isQueryStateFailure, isQueryStateLoading, isQueryStatePrepared, isQueryStateSuccess, isRequestError, mergeHeaders, pathParamsMissingInRouteFunctionError, queryStateAlreadyHasKeyError, queryStateCannotTransformError, queryStateDoesNotContainKeyError, request, shouldCacheQuery, skipPaginationPageParamCalculator, switchQueryState, takeUntilResponse, transformGql, transformMethod, transformToBoolean, transformToBooleanArray, transformToDate, transformToDateArray, transformToNumber, transformToNumberArray, transformToSort, transformToSortQueryParam, transformToString, transformToStringArray };
|
|
1412
1506
|
//# sourceMappingURL=ethlete-query.mjs.map
|